@seamly/web-ui 20.2.0-alpha.2 → 20.2.0
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/build/dist/lib/deprecated-view.css +1 -1
- package/build/dist/lib/index.debug.js +73 -74
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.debug.min.js.LICENSE.txt +24 -24
- package/build/dist/lib/index.js +2767 -2544
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/standalone.js +1654 -1353
- package/build/dist/lib/standalone.min.js +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/javascripts/ui/components/conversation/event/participant.js +2 -7
- package/src/stylesheets/7-deprecated/5-components/_suggestions.scss +3 -0
- package/src/stylesheets/deprecated-view.scss +1 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see standalone.min.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(self,(function(){return function(){var t={6419:function(t,e,n){t.exports=n(7698)},1511:function(t,e,n){t.exports=n(3363)},1128:function(t,e,n){t.exports=n(7784)},4103:function(t,e,n){t.exports=n(8196)},7766:function(t,e,n){t.exports=n(8065)},62:function(t,e,n){t.exports=n(9455)},4494:function(t,e,n){t.exports=n(9743)},116:function(t,e,n){t.exports=n(1955)},2462:function(t,e,n){t.exports=n(6064)},4473:function(t,e,n){t.exports=n(1577)},6423:function(t,e,n){t.exports=n(4913)},8914:function(t,e,n){t.exports=n(6279)},8580:function(t,e,n){t.exports=n(3778)},1643:function(t,e,n){t.exports=n(9373)},2991:function(t,e,n){t.exports=n(1798)},2366:function(t,e,n){t.exports=n(2527)},7093:function(t,e,n){t.exports=n(8427)},3649:function(t,e,n){t.exports=n(2073)},7149:function(t,e,n){t.exports=n(5286)},7302:function(t,e,n){t.exports=n(2856)},5843:function(t,e,n){t.exports=n(6361)},9340:function(t,e,n){t.exports=n(8933)},1942:function(t,e,n){t.exports=n(3383)},368:function(t,e,n){t.exports=n(7396)},3978:function(t,e,n){t.exports=n(1910)},6295:function(t,e,n){t.exports=n(6209)},4074:function(t,e,n){t.exports=n(9427)},9649:function(t,e,n){t.exports=n(2857)},8604:function(t,e,n){n(4477)},4310:function(t,e,n){t.exports=n(9534)},1611:function(t,e,n){t.exports=n(6507)},6902:function(t,e,n){t.exports=n(3059)},455:function(t,e,n){t.exports=n(7795)},1238:function(t,e,n){t.exports=n(6877)},4198:function(t,e,n){t.exports=n(4888)},3476:function(t,e,n){t.exports=n(7460)},1581:function(t,e,n){t.exports=n(3474)},3032:function(t,e,n){t.exports=n(7989)},6384:function(t,e,n){t.exports=n(5519)},5420:function(t,e,n){t.exports=n(2547)},8341:function(t,e,n){t.exports=n(6509)},9996:function(t,e,n){t.exports=n(2209)},6976:function(t,e,n){t.exports=n(1258)},5683:function(t,e,n){t.exports=n(9447)},8317:function(t,e,n){t.exports=n(4408)},2088:function(t,e,n){t.exports=n(269)},4341:function(t,e,n){t.exports=n(3685)},3263:function(t,e,n){t.exports=n(4710)},9356:function(t,e,n){t.exports=n(3799)},2574:function(t,e,n){"use strict";var r,o=n(3649),i=n(6419),a=n(5420),s=n(8317),c=n(1511),l=n(8914);function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function p(){this._defaults=[]}l(r=["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"]).call(r,(function(t){p.prototype[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this._defaults.push({fn:t,args:n}),this}})),p.prototype._setDefaults=function(t){var e;l(e=this._defaults).call(e,(function(e){var n;t[e.fn].apply(t,function(t){if(c(t))return u(t)}(n=e.args)||function(t){if(void 0!==a&&s(Object(t)))return i(t)}(n)||function(t,e){var n;if(t){if("string"==typeof t)return u(t,e);var r=o(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?i(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}))},t.exports=p},1766:function(t,e,n){"use strict";var r,o,i=n(5420),a=n(8341),s=n(5843),c=n(1511),l=n(8914),u=n(7766),p=n(1643),f=n(3649),h=n(3032),d=n(4103);function v(t){return(v="function"==typeof i&&"symbol"==typeof a?function(t){return typeof t}:function(t){return t&&"function"==typeof i&&t.constructor===i&&t!==i.prototype?"symbol":typeof t})(t)}"undefined"!=typeof window?o=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),o=void 0):o=self;var y=n(8767),m=n(4445),g=n(129),b=n(8842),_=n(3508),w=n(1253),x=n(2574);function T(){}t.exports=function(t,n){return"function"==typeof n?new e.Request("GET",t).end(n):1===arguments.length?new e.Request("GET",t):new e.Request(t,n)};var E=e=t.exports;e.Request=N,E.getXHR=function(){if(o.XMLHttpRequest&&(!o.location||"file:"!==o.location.protocol||!o.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw new Error("Browser-only version of superagent could not find XHR")};var S=s("")?function(t){return s(t).call(t)}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function k(t){if(!_(t))return t;var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&A(e,n,t[n]);return e.join("&")}function A(t,e,n){if(void 0!==n)if(null!==n)if(c(n))l(n).call(n,(function(n){A(t,e,n)}));else if(_(n))for(var r in n){var o;Object.prototype.hasOwnProperty.call(n,r)&&A(t,u(o="".concat(e,"[")).call(o,r,"]"),n[r])}else t.push(encodeURI(e)+"="+encodeURIComponent(n));else t.push(encodeURI(e))}function O(t){for(var e,n,r={},o=t.split("&"),i=0,a=o.length;i<a;++i)e=o[i],-1===(n=p(e).call(e,"="))?r[decodeURIComponent(e)]="":r[decodeURIComponent(f(e).call(e,0,n))]=decodeURIComponent(f(e).call(e,n+1));return r}function C(t){return/[/+]json($|[^-\w])/i.test(t)}function I(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){for(var e,n,r,o,i=t.split(/\r?\n/),a={},s=0,c=i.length;s<c;++s)n=i[s],-1!==(e=p(n).call(n,":"))&&(r=f(n).call(n,0,e).toLowerCase(),o=S(f(n).call(n,e+1)),a[r]=o);return a}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function N(t,e){var n=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",(function(){var t,e=null,r=null;try{r=new I(n)}catch(t){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=t,n.xhr?(e.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,e.status=n.xhr.status?n.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),n.callback(e)}n.emit("response",r);try{n._isResponseOK(r)||(t=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(e){t=e}t?(t.original=e,t.response=r,t.status=r.status,n.callback(t,r)):n.callback(null,r)}))}function j(t,e,n){var r=E("DELETE",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}E.serializeObject=k,E.parseString=O,E.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},E.serialize={"application/x-www-form-urlencoded":g.stringify,"application/json":m},E.parse={"application/x-www-form-urlencoded":O,"application/json":JSON.parse},w(I.prototype),I.prototype._parseBody=function(t){var e=E.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&C(this.type)&&(e=E.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},I.prototype.toError=function(){var t,e,n=this.req,r=n.method,o=n.url,i=u(t=u(e="cannot ".concat(r," ")).call(e,o," (")).call(t,this.status,")"),a=new Error(i);return a.status=this.status,a.method=r,a.url=o,a},E.Response=I,y(N.prototype),b(N.prototype),N.prototype.type=function(t){return this.set("Content-Type",E.types[t]||t),this},N.prototype.accept=function(t){return this.set("Accept",E.types[t]||t),this},N.prototype.auth=function(t,e,n){1===arguments.length&&(e=""),"object"===v(e)&&null!==e&&(n=e,e=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var r=function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,n,r)},N.prototype.query=function(t){return"string"!=typeof t&&(t=k(t)),t&&this._query.push(t),this},N.prototype.attach=function(t,e,n){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,n||e.name)}return this},N.prototype._getFormData=function(){return this._formData||(this._formData=new o.FormData),this._formData},N.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var n=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),n(t,e)},N.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},N.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},N.prototype.ca=N.prototype.agent,N.prototype.buffer=N.prototype.ca,N.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},N.prototype.pipe=N.prototype.write,N.prototype._isHost=function(t){return t&&"object"===v(t)&&!c(t)&&"[object Object]"!==Object.prototype.toString.call(t)},N.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||T,this._finalizeQueryString(),this._end()},N.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=h((function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},N.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=E.getXHR();var e=this.xhr,n=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var n=e.readyState;if(n>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===n){var r;try{r=e.status}catch(t){r=0}if(!r){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var r=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(t._uploadTimeoutTimer)),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{e.addEventListener("progress",d(r).call(r,null,"download")),e.upload&&e.upload.addEventListener("progress",d(r).call(r,null,"upload"))}catch(t){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||E.serialize[o?o.split(";")[0]:""];!i&&C(o)&&(i=E.serialize["application/json"]),i&&(n=i(n))}for(var a in this.header)null!==this.header[a]&&Object.prototype.hasOwnProperty.call(this.header,a)&&e.setRequestHeader(a,this.header[a]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===n?null:n)},E.agent=function(){return new x},l(r=["GET","POST","OPTIONS","PATCH","PUT","DELETE"]).call(r,(function(t){x.prototype[t.toLowerCase()]=function(e,n){var r=new E.Request(t,e);return this._setDefaults(r),n&&r.end(n),r}})),x.prototype.del=x.prototype.delete,E.get=function(t,e,n){var r=E("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},E.head=function(t,e,n){var r=E("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},E.options=function(t,e,n){var r=E("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},E.del=j,E.delete=j,E.patch=function(t,e,n){var r=E("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},E.post=function(t,e,n){var r=E("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},E.put=function(t,e,n){var r=E("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}},3508:function(t,e,n){"use strict";var r=n(5420),o=n(8341);function i(t){return(i="function"==typeof r&&"symbol"==typeof o?function(t){return typeof t}:function(t){return t&&"function"==typeof r&&t.constructor===r&&t!==r.prototype?"symbol":typeof t})(t)}t.exports=function(t){return null!==t&&"object"===i(t)}},8842:function(t,e,n){"use strict";var r=n(5420),o=n(8341),i=n(6384),a=n(3476),s=n(1511),c=n(7766),l=n(5843),u=n(8580),p=n(1643),f=n(3649),h=n(7302),d=n(3032);function v(t){return(v="function"==typeof r&&"symbol"==typeof o?function(t){return typeof t}:function(t){return t&&"function"==typeof r&&t.constructor===r&&t!==r.prototype?"symbol":typeof t})(t)}var y=n(3508);function m(t){if(t)return function(t){for(var e in m.prototype)Object.prototype.hasOwnProperty.call(m.prototype,e)&&(t[e]=m.prototype[e]);return t}(t)}t.exports=m,m.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},m.prototype.parse=function(t){return this._parser=t,this},m.prototype.responseType=function(t){return this._responseType=t,this},m.prototype.serialize=function(t){return this._serializer=t,this},m.prototype.timeout=function(t){if(!t||"object"!==v(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},m.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var g=new i(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),b=new i([408,413,429,500,502,503,504,521,522,524]);m.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(t,e);if(!0===n)return!0;if(!1===n)return!1}catch(t){console.error(t)}if(e&&e.status&&b.has(e.status))return!0;if(t){if(t.code&&g.has(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},m.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},m.prototype.then=function(t,e){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new a((function(t,e){r.on("abort",(function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)e(n.timedoutError);else{var t=new Error("Aborted");t.code="ABORTED",t.status=n.status,t.method=n.method,t.url=n.url,e(t)}})),r.end((function(n,r){n?e(n):t(r)}))}))}return this._fullfilledPromise.then(t,e)},m.prototype.catch=function(t){return this.then(void 0,t)},m.prototype.use=function(t){return t(this),this},m.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},m.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},m.prototype.get=function(t){return this._header[t.toLowerCase()]},m.prototype.getHeader=m.prototype.get,m.prototype.set=function(t,e){if(y(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},m.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},m.prototype.field=function(t,e){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(y(t)){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&this.field(n,t[n]);return this}if(s(e)){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.field(t,e[r]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e),this},m.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},m.prototype._auth=function(t,e,n,r){var o;switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r(c(o="".concat(t,":")).call(o,e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},m.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},m.prototype.redirects=function(t){return this._maxRedirects=t,this},m.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},m.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},m.prototype.send=function(t){var e=y(t),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)s(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&y(this._data))for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._data[r]=t[r]);else if("string"==typeof t){var o,i;n||this.type("form"),(n=this._header["content-type"])&&(n=l(o=n.toLowerCase()).call(o)),this._data="application/x-www-form-urlencoded"===n?this._data?c(i="".concat(this._data,"&")).call(i,t):t:(this._data||"")+t}else this._data=t;return!e||this._isHost(t)||n||this.type("json"),this},m.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},m.prototype._finalizeQueryString=function(){var t,e=this._query.join("&");if(e&&(this.url+=(u(t=this.url).call(t,"?")?"&":"?")+e),this._query.length=0,this._sort){var n,r=p(n=this.url).call(n,"?");if(r>=0){var o,i,a=f(o=this.url).call(o,r+1).split("&");"function"==typeof this._sort?h(a).call(a,this._sort):h(a).call(a),this.url=f(i=this.url).call(i,0,r)+"?"+a.join("&")}}},m.prototype._appendQueryString=function(){console.warn("Unsupported")},m.prototype._timeoutError=function(t,e,n){if(!this._aborted){var r=new Error("".concat(t+e,"ms exceeded"));r.timeout=e,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},m.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=d((function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=d((function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},1253:function(t,e,n){"use strict";var r=n(6244);function o(t){if(t)return function(t){for(var e in o.prototype)Object.prototype.hasOwnProperty.call(o.prototype,e)&&(t[e]=o.prototype[e]);return t}(t)}t.exports=o,o.prototype.get=function(t){return this.header[t.toLowerCase()]},o.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=r.type(e);var n=r.params(e);for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(this[o]=n[o]);this.links={};try{t.link&&(this.links=r.parseLinks(t.link))}catch(t){}},o.prototype._setStatusProperties=function(t){var e=t/100|0;this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t}},6244:function(t,e,n){"use strict";var r=n(5420),o=n(9996),i=n(1511),a=n(6976),s=n(3649),c=n(6419);function l(t,e){var n;if(void 0===r||null==o(t)){if(i(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return u(t,e);var r=s(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?c(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var l=0,p=function(){};return{s:p,n:function(){return l>=t.length?{done:!0}:{done:!1,value:t[l++]}},e:function(t){throw t},f:p}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var f,h=!0,d=!1;return{s:function(){n=a(t)},n:function(){var t=n.next();return h=t.done,t},e:function(t){d=!0,f=t},f:function(){try{h||null==n.return||n.return()}finally{if(d)throw f}}}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}e.type=function(t){return t.split(/ *; */).shift()},e.params=function(t){var e,n={},r=l(t.split(/ *; */));try{for(r.s();!(e=r.n()).done;){var o=e.value.split(/ *= */),i=o.shift(),a=o.shift();i&&a&&(n[i]=a)}}catch(t){r.e(t)}finally{r.f()}return n},e.parseLinks=function(t){var e,n={},r=l(t.split(/ *, */));try{for(r.s();!(e=r.n()).done;){var o,i,a=e.value.split(/ *; */),c=s(o=a[0]).call(o,1,-1);n[s(i=a[1].split(/ *= */)[1]).call(i,1,-1)]=c}}catch(t){r.e(t)}finally{r.f()}return n},e.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t}},1905:function(t){t.exports=()=>()=>null},2698:function(t){t.exports=null},1924:function(t,e,n){"use strict";var r=n(210),o=n(5559),i=o(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&i(t,".prototype.")>-1?o(n):n}},5559:function(t,e,n){"use strict";var r=n(8612),o=n(210),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||r.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),l=o("%Object.defineProperty%",!0),u=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(t){l=null}t.exports=function(t){var e=s(r,a,arguments);if(c&&l){var n=c(e,"length");n.configurable&&l(e,"length",{value:1+u(0,t.length-(arguments.length-1))})}return e};var p=function(){return s(r,i,arguments)};l?l(t.exports,"apply",{value:p}):t.exports.apply=p},8767:function(t){function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}},4493:function(t,e,n){n(7971),n(3242);var r=n(4058);t.exports=r.Array.from},4034:function(t,e,n){n(2737);var r=n(4058);t.exports=r.Array.isArray},5367:function(t,e,n){n(5906);var r=n(5703);t.exports=r("Array").concat},1459:function(t,e,n){n(8851);var r=n(5703);t.exports=r("Array").every},6172:function(t,e,n){n(290);var r=n(5703);t.exports=r("Array").fill},2383:function(t,e,n){n(1501);var r=n(5703);t.exports=r("Array").filter},9:function(t,e,n){n(4929);var r=n(5703);t.exports=r("Array").findIndex},7671:function(t,e,n){n(833);var r=n(5703);t.exports=r("Array").find},4373:function(t,e,n){n(4944),n(1107);var r=n(5703);t.exports=r("Array").flat},9324:function(t,e,n){n(2437);var r=n(5703);t.exports=r("Array").forEach},991:function(t,e,n){n(7690);var r=n(5703);t.exports=r("Array").includes},8700:function(t,e,n){n(9076);var r=n(5703);t.exports=r("Array").indexOf},3866:function(t,e,n){n(8787);var r=n(5703);t.exports=r("Array").map},2999:function(t,e,n){n(1876);var r=n(5703);t.exports=r("Array").reduce},5573:function(t,e,n){n(1490);var r=n(5703);t.exports=r("Array").reverse},4900:function(t,e,n){n(186);var r=n(5703);t.exports=r("Array").slice},3824:function(t,e,n){n(6026);var r=n(5703);t.exports=r("Array").some},2948:function(t,e,n){n(4115);var r=n(5703);t.exports=r("Array").sort},1103:function(t,e,n){n(5160);var r=n(4058);t.exports=r.Date.now},7700:function(t,e,n){n(3381);var r=n(5703);t.exports=r("Function").bind},6246:function(t,e,n){var r=n(7700),o=Function.prototype;t.exports=function(t){var e=t.bind;return t===o||t instanceof Function&&e===o.bind?r:e}},6043:function(t,e,n){var r=n(5367),o=Array.prototype;t.exports=function(t){var e=t.concat;return t===o||t instanceof Array&&e===o.concat?r:e}},3160:function(t,e,n){var r=n(1459),o=Array.prototype;t.exports=function(t){var e=t.every;return t===o||t instanceof Array&&e===o.every?r:e}},446:function(t,e,n){var r=n(6172),o=Array.prototype;t.exports=function(t){var e=t.fill;return t===o||t instanceof Array&&e===o.fill?r:e}},2480:function(t,e,n){var r=n(2383),o=Array.prototype;t.exports=function(t){var e=t.filter;return t===o||t instanceof Array&&e===o.filter?r:e}},7147:function(t,e,n){var r=n(9),o=Array.prototype;t.exports=function(t){var e=t.findIndex;return t===o||t instanceof Array&&e===o.findIndex?r:e}},2236:function(t,e,n){var r=n(7671),o=Array.prototype;t.exports=function(t){var e=t.find;return t===o||t instanceof Array&&e===o.find?r:e}},8098:function(t,e,n){var r=n(4373),o=Array.prototype;t.exports=function(t){var e=t.flat;return t===o||t instanceof Array&&e===o.flat?r:e}},8557:function(t,e,n){var r=n(991),o=n(1631),i=Array.prototype,a=String.prototype;t.exports=function(t){var e=t.includes;return t===i||t instanceof Array&&e===i.includes?r:"string"==typeof t||t===a||t instanceof String&&e===a.includes?o:e}},4570:function(t,e,n){var r=n(8700),o=Array.prototype;t.exports=function(t){var e=t.indexOf;return t===o||t instanceof Array&&e===o.indexOf?r:e}},8287:function(t,e,n){var r=n(3866),o=Array.prototype;t.exports=function(t){var e=t.map;return t===o||t instanceof Array&&e===o.map?r:e}},8025:function(t,e,n){var r=n(2999),o=Array.prototype;t.exports=function(t){var e=t.reduce;return t===o||t instanceof Array&&e===o.reduce?r:e}},1060:function(t,e,n){var r=n(5573),o=Array.prototype;t.exports=function(t){var e=t.reverse;return t===o||t instanceof Array&&e===o.reverse?r:e}},9601:function(t,e,n){var r=n(4900),o=Array.prototype;t.exports=function(t){var e=t.slice;return t===o||t instanceof Array&&e===o.slice?r:e}},8299:function(t,e,n){var r=n(3824),o=Array.prototype;t.exports=function(t){var e=t.some;return t===o||t instanceof Array&&e===o.some?r:e}},9355:function(t,e,n){var r=n(2948),o=Array.prototype;t.exports=function(t){var e=t.sort;return t===o||t instanceof Array&&e===o.sort?r:e}},2774:function(t,e,n){var r=n(3348),o=String.prototype;t.exports=function(t){var e=t.trim;return"string"==typeof t||t===o||t instanceof String&&e===o.trim?r:e}},4426:function(t,e,n){n(2619);var r=n(4058);r.JSON||(r.JSON={stringify:JSON.stringify}),t.exports=function(t,e,n){return r.JSON.stringify.apply(null,arguments)}},5999:function(t,e,n){n(9221);var r=n(4058);t.exports=r.Object.assign},7702:function(t,e,n){n(4979);var r=n(4058).Object,o=t.exports=function(t,e){return r.defineProperties(t,e)};r.defineProperties.sham&&(o.sham=!0)},8171:function(t,e,n){n(6450);var r=n(4058).Object,o=t.exports=function(t,e,n){return r.defineProperty(t,e,n)};r.defineProperty.sham&&(o.sham=!0)},3081:function(t,e,n){n(1078);var r=n(4058);t.exports=r.Object.entries},286:function(t,e,n){n(6924);var r=n(4058).Object,o=t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)};r.getOwnPropertyDescriptor.sham&&(o.sham=!0)},2766:function(t,e,n){n(8482);var r=n(4058);t.exports=r.Object.getOwnPropertyDescriptors},3288:function(t,e,n){n(9816);var r=n(4058).Object;t.exports=function(t){return r.getOwnPropertyNames(t)}},498:function(t,e,n){n(5824);var r=n(4058);t.exports=r.Object.getOwnPropertySymbols},3966:function(t,e,n){n(7405);var r=n(4058);t.exports=r.Object.getPrototypeOf},8494:function(t,e,n){n(1724);var r=n(4058);t.exports=r.Object.keys},8430:function(t,e,n){n(6614);var r=n(4058);t.exports=r.Object.values},7579:function(t,e,n){n(9718);var r=n(4058);t.exports=r.parseFloat},8524:function(t,e,n){n(4038);var r=n(4058);t.exports=r.parseInt},2956:function(t,e,n){n(7627),n(6274),n(5967),n(8881),n(4560),n(7206),n(4349),n(7971);var r=n(4058);t.exports=r.Promise},6998:function(t,e,n){n(6274),n(5967),n(9008),n(7971);var r=n(4058);t.exports=r.Set},1631:function(t,e,n){n(1035);var r=n(5703);t.exports=r("String").includes},3348:function(t,e,n){n(7398);var r=n(5703);t.exports=r("String").trim},7473:function(t,e,n){n(5906),n(5967),n(5824),n(8555),n(2615),n(1732),n(5903),n(1825),n(8394),n(5915),n(1437),n(9791),n(9911),n(4315),n(3131),n(4714),n(659),n(9120),n(5327),n(1502);var r=n(4058);t.exports=r.Symbol},4227:function(t,e,n){n(6274),n(5967),n(7971),n(1825);var r=n(1477);t.exports=r.f("iterator")},2209:function(t,e,n){n(6274),n(7971),n(7634);var r=n(2902);t.exports=r},1258:function(t,e,n){n(6274),n(7971),n(7634);var r=n(429);t.exports=r},9447:function(t,e,n){var r=n(4570);t.exports=r},4408:function(t,e,n){n(6274),n(7971),n(7634);var r=n(663);t.exports=r},269:function(t,e,n){var r=n(5999);t.exports=r},3685:function(t,e,n){var r=n(8171);t.exports=r},4710:function(t,e,n){var r=n(498);t.exports=r},3799:function(t,e,n){var r=n(8494);t.exports=r},3916:function(t){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},1851:function(t,e,n){var r=n(941);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},8479:function(t){t.exports=function(){}},5743:function(t){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},6059:function(t,e,n){var r=n(941);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},1860:function(t,e,n){"use strict";var r=n(9678),o=n(9413),i=n(3057);t.exports=function(t){for(var e=r(this),n=i(e.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,l=void 0===c?n:o(c,n);l>s;)e[s++]=t;return e}},6837:function(t,e,n){"use strict";var r=n(3610).forEach,o=n(4194)("forEach");t.exports=o?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},1354:function(t,e,n){"use strict";var r=n(6843),o=n(9678),i=n(5196),a=n(6782),s=n(3057),c=n(5449),l=n(2902);t.exports=function(t){var e,n,u,p,f,h,d=o(t),v="function"==typeof this?this:Array,y=arguments.length,m=y>1?arguments[1]:void 0,g=void 0!==m,b=l(d),_=0;if(g&&(m=r(m,y>2?arguments[2]:void 0,2)),null==b||v==Array&&a(b))for(n=new v(e=s(d.length));e>_;_++)h=g?m(d[_],_):d[_],c(n,_,h);else for(f=(p=b.call(d)).next,n=new v;!(u=f.call(p)).done;_++)h=g?i(p,m,[u.value,_],!0):u.value,c(n,_,h);return n.length=_,n}},1692:function(t,e,n){var r=n(4529),o=n(3057),i=n(9413),a=function(t){return function(e,n,a){var s,c=r(e),l=o(c.length),u=i(a,l);if(t&&n!=n){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((t||u in c)&&c[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},3610:function(t,e,n){var r=n(6843),o=n(7026),i=n(9678),a=n(3057),s=n(4692),c=[].push,l=function(t){var e=1==t,n=2==t,l=3==t,u=4==t,p=6==t,f=7==t,h=5==t||p;return function(d,v,y,m){for(var g,b,_=i(d),w=o(_),x=r(v,y,3),T=a(w.length),E=0,S=m||s,k=e?S(d,T):n||f?S(d,0):void 0;T>E;E++)if((h||E in w)&&(b=x(g=w[E],E,_),t))if(e)k[E]=b;else if(b)switch(t){case 3:return!0;case 5:return g;case 6:return E;case 2:c.call(k,g)}else switch(t){case 4:return!1;case 7:c.call(k,g)}return p?-1:l||u?u:k}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},568:function(t,e,n){var r=n(5981),o=n(9813),i=n(3385),a=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},4194:function(t,e,n){"use strict";var r=n(5981);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},6499:function(t,e,n){var r=n(3916),o=n(9678),i=n(7026),a=n(3057),s=function(t){return function(e,n,s,c){r(n);var l=o(e),u=i(l),p=a(l.length),f=t?p-1:0,h=t?-1:1;if(s<2)for(;;){if(f in u){c=u[f],f+=h;break}if(f+=h,t?f<0:p<=f)throw TypeError("Reduce of empty array with no initial value")}for(;t?f>=0:p>f;f+=h)f in u&&(c=n(c,u[f],f,l));return c}};t.exports={left:s(!1),right:s(!0)}},1388:function(t){var e=Math.floor,n=function(t,i){var a=t.length,s=e(a/2);return a<8?r(t,i):o(n(t.slice(0,s),i),n(t.slice(s),i),i)},r=function(t,e){for(var n,r,o=t.length,i=1;i<o;){for(r=i,n=t[i];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==i++&&(t[r]=n)}return t},o=function(t,e,n){for(var r=t.length,o=e.length,i=0,a=0,s=[];i<r||a<o;)i<r&&a<o?s.push(n(t[i],e[a])<=0?t[i++]:e[a++]):s.push(i<r?t[i++]:e[a++]);return s};t.exports=n},5693:function(t,e,n){var r=n(941),o=n(1052),i=n(9813)("species");t.exports=function(t){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)?r(e)&&null===(e=e[i])&&(e=void 0):e=void 0),void 0===e?Array:e}},4692:function(t,e,n){var r=n(5693);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},5196:function(t,e,n){var r=n(6059),o=n(7609);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){throw o(t),e}}},1385:function(t,e,n){var r=n(9813)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},2532:function(t){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},9697:function(t,e,n){var r=n(2885),o=n(2532),i=n(9813)("toStringTag"),a="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:a?o(e):"Object"==(r=o(e))&&"function"==typeof e.callee?"Arguments":r}},5616:function(t,e,n){"use strict";var r=n(5988).f,o=n(9290),i=n(7524),a=n(6843),s=n(5743),c=n(3091),l=n(7771),u=n(4431),p=n(5746),f=n(1647).fastKey,h=n(5402),d=h.set,v=h.getterFor;t.exports={getConstructor:function(t,e,n,l){var u=t((function(t,r){s(t,u,e),d(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),p||(t.size=0),null!=r&&c(r,t[l],{that:t,AS_ENTRIES:n})})),h=v(e),y=function(t,e,n){var r,o,i=h(t),a=m(t,e);return a?a.value=n:(i.last=a={index:o=f(e,!0),key:e,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),p?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},m=function(t,e){var n,r=h(t),o=f(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==e)return n};return i(u.prototype,{clear:function(){for(var t=h(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,p?t.size=0:this.size=0},delete:function(t){var e=this,n=h(e),r=m(e,t);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first==r&&(n.first=o),n.last==r&&(n.last=i),p?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=h(this),r=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!m(this,t)}}),i(u.prototype,n?{get:function(t){var e=m(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),p&&r(u.prototype,"size",{get:function(){return h(this).size}}),u},setStrong:function(t,e,n){var r=e+" Iterator",o=v(e),i=v(r);l(t,e,(function(t,e){d(this,{type:r,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),u(e)}}},4683:function(t,e,n){"use strict";var r=n(6887),o=n(1899),i=n(1647),a=n(5981),s=n(2029),c=n(3091),l=n(5743),u=n(941),p=n(904),f=n(5988).f,h=n(3610).forEach,d=n(5746),v=n(5402),y=v.set,m=v.getterFor;t.exports=function(t,e,n){var v,g=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),_=g?"set":"add",w=o[t],x=w&&w.prototype,T={};if(d&&"function"==typeof w&&(b||x.forEach&&!a((function(){(new w).entries().next()})))){v=e((function(e,n){y(l(e,v,t),{type:t,collection:new w}),null!=n&&c(n,e[_],{that:e,AS_ENTRIES:g})}));var E=m(t);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in x)||b&&"clear"==t||s(v.prototype,t,(function(n,r){var o=E(this).collection;if(!e&&b&&!u(n))return"get"==t&&void 0;var i=o[t](0===n?0:n,r);return e?this:i}))})),b||f(v.prototype,"size",{configurable:!0,get:function(){return E(this).collection.size}})}else v=n.getConstructor(e,t,g,_),i.enable();return p(v,t,!1,!0),T[t]=v,r({global:!0,forced:!0},T),b||n.setStrong(v,t,g),v}},7772:function(t,e,n){var r=n(9813)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},4160:function(t,e,n){var r=n(5981);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},1046:function(t,e,n){"use strict";var r=n(5143).IteratorPrototype,o=n(9290),i=n(1887),a=n(904),s=n(2077),c=function(){return this};t.exports=function(t,e,n){var l=e+" Iterator";return t.prototype=o(r,{next:i(1,n)}),a(t,l,!1,!0),s[l]=c,t}},2029:function(t,e,n){var r=n(5746),o=n(5988),i=n(1887);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},1887:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},5449:function(t,e,n){"use strict";var r=n(3894),o=n(5988),i=n(1887);t.exports=function(t,e,n){var a=r(e);a in t?o.f(t,a,i(0,n)):t[a]=n}},7771:function(t,e,n){"use strict";var r=n(6887),o=n(1046),i=n(249),a=n(8929),s=n(904),c=n(2029),l=n(9754),u=n(9813),p=n(2529),f=n(2077),h=n(5143),d=h.IteratorPrototype,v=h.BUGGY_SAFARI_ITERATORS,y=u("iterator"),m="keys",g="values",b="entries",_=function(){return this};t.exports=function(t,e,n,u,h,w,x){o(n,e,u);var T,E,S,k=function(t){if(t===h&&N)return N;if(!v&&t in C)return C[t];switch(t){case m:case g:case b:return function(){return new n(this,t)}}return function(){return new n(this)}},A=e+" Iterator",O=!1,C=t.prototype,I=C[y]||C["@@iterator"]||h&&C[h],N=!v&&I||k(h),j="Array"==e&&C.entries||I;if(j&&(T=i(j.call(new t)),d!==Object.prototype&&T.next&&(p||i(T)===d||(a?a(T,d):"function"!=typeof T[y]&&c(T,y,_)),s(T,A,!0,!0),p&&(f[A]=_))),h==g&&I&&I.name!==g&&(O=!0,N=function(){return I.call(this)}),p&&!x||C[y]===N||c(C,y,N),f[e]=N,h)if(E={values:k(g),keys:w?N:k(m),entries:k(b)},x)for(S in E)(v||O||!(S in C))&&l(C,S,E[S]);else r({target:e,proto:!0,forced:v||O},E);return E}},6349:function(t,e,n){var r=n(4058),o=n(7457),i=n(1477),a=n(5988).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},5746:function(t,e,n){var r=n(5981);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},1333:function(t,e,n){var r=n(1899),o=n(941),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},3281:function(t){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},4342:function(t,e,n){var r=n(2861).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},3321:function(t){t.exports="object"==typeof window},7797:function(t,e,n){var r=n(2861);t.exports=/MSIE|Trident/.test(r)},2749:function(t,e,n){var r=n(2861);t.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(r)},6049:function(t,e,n){var r=n(2532),o=n(1899);t.exports="process"==r(o.process)},8045:function(t,e,n){var r=n(2861);t.exports=/web0s(?!.*chrome)/i.test(r)},2861:function(t,e,n){var r=n(626);t.exports=r("navigator","userAgent")||""},3385:function(t,e,n){var r,o,i=n(1899),a=n(2861),s=i.process,c=i.Deno,l=s&&s.versions||c&&c.version,u=l&&l.v8;u?o=(r=u.split("."))[0]<4?1:r[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),t.exports=o&&+o},8938:function(t,e,n){var r=n(2861).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},5703:function(t,e,n){var r=n(4058);t.exports=function(t){return r[t+"Prototype"]}},6759:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6887:function(t,e,n){"use strict";var r=n(1899),o=n(9677).f,i=n(7252),a=n(4058),s=n(6843),c=n(2029),l=n(7457),u=function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var n,p,f,h,d,v,y,m,g=t.target,b=t.global,_=t.stat,w=t.proto,x=b?r:_?r[g]:(r[g]||{}).prototype,T=b?a:a[g]||(a[g]={}),E=T.prototype;for(f in e)n=!i(b?f:g+(_?".":"#")+f,t.forced)&&x&&l(x,f),d=T[f],n&&(v=t.noTargetGet?(m=o(x,f))&&m.value:x[f]),h=n&&v?v:e[f],n&&typeof d==typeof h||(y=t.bind&&n?s(h,r):t.wrap&&n?u(h):w&&"function"==typeof h?s(Function.call,h):h,(t.sham||h&&h.sham||d&&d.sham)&&c(y,"sham",!0),T[f]=y,w&&(l(a,p=g+"Prototype")||c(a,p,{}),a[p][f]=h,t.real&&E&&!E[f]&&c(E,f,h)))}},5981:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},3092:function(t,e,n){"use strict";var r=n(1052),o=n(3057),i=n(6843),a=function(t,e,n,s,c,l,u,p){for(var f,h=c,d=0,v=!!u&&i(u,p,3);d<s;){if(d in n){if(f=v?v(n[d],d,e):n[d],l>0&&r(f))h=a(t,e,f,o(f.length),h,l-1)-1;else{if(h>=9007199254740991)throw TypeError("Exceed the acceptable array length");t[h]=f}h++}d++}return h};t.exports=a},5602:function(t,e,n){var r=n(5981);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},6843:function(t,e,n){var r=n(3916);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},8308:function(t,e,n){"use strict";var r=n(3916),o=n(941),i=[].slice,a={},s=function(t,e,n){if(!(e in a)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";a[e]=Function("C,a","return new C("+r.join(",")+")")}return a[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=i.call(arguments,1),a=function(){var r=n.concat(i.call(arguments));return this instanceof a?s(e,r.length,r):e.apply(t,r)};return o(e.prototype)&&(a.prototype=e.prototype),a}},626:function(t,e,n){var r=n(4058),o=n(1899),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},2902:function(t,e,n){var r=n(9697),o=n(2077),i=n(9813)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},429:function(t,e,n){var r=n(6059),o=n(2902);t.exports=function(t){var e=o(t);if("function"!=typeof e)throw TypeError(String(t)+" is not iterable");return r(e.call(t))}},1899:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},7457:function(t,e,n){var r=n(9678),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(r(t),e)}},7748:function(t){t.exports={}},4845:function(t,e,n){var r=n(1899);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},5463:function(t,e,n){var r=n(626);t.exports=r("document","documentElement")},2840:function(t,e,n){var r=n(5746),o=n(5981),i=n(1333);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},7026:function(t,e,n){var r=n(5981),o=n(2532),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},1302:function(t,e,n){var r=n(3030),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return o.call(t)}),t.exports=r.inspectSource},1647:function(t,e,n){var r=n(6887),o=n(7748),i=n(941),a=n(7457),s=n(5988).f,c=n(946),l=n(684),u=n(9418),p=n(5602),f=!1,h=u("meta"),d=0,v=Object.isExtensible||function(){return!0},y=function(t){s(t,h,{value:{objectID:"O"+d++,weakData:{}}})},m=t.exports={enable:function(){m.enable=function(){},f=!0;var t=c.f,e=[].splice,n={};n[h]=1,t(n).length&&(c.f=function(n){for(var r=t(n),o=0,i=r.length;o<i;o++)if(r[o]===h){e.call(r,o,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,h)){if(!v(t))return"F";if(!e)return"E";y(t)}return t[h].objectID},getWeakData:function(t,e){if(!a(t,h)){if(!v(t))return!0;if(!e)return!1;y(t)}return t[h].weakData},onFreeze:function(t){return p&&f&&v(t)&&!a(t,h)&&y(t),t}};o[h]=!0},5402:function(t,e,n){var r,o,i,a=n(8019),s=n(1899),c=n(941),l=n(2029),u=n(7457),p=n(3030),f=n(4262),h=n(7748),d="Object already initialized",v=s.WeakMap;if(a||p.state){var y=p.state||(p.state=new v),m=y.get,g=y.has,b=y.set;r=function(t,e){if(g.call(y,t))throw new TypeError(d);return e.facade=t,b.call(y,t,e),e},o=function(t){return m.call(y,t)||{}},i=function(t){return g.call(y,t)}}else{var _=f("state");h[_]=!0,r=function(t,e){if(u(t,_))throw new TypeError(d);return e.facade=t,l(t,_,e),e},o=function(t){return u(t,_)?t[_]:{}},i=function(t){return u(t,_)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},6782:function(t,e,n){var r=n(9813),o=n(2077),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},1052:function(t,e,n){var r=n(2532);t.exports=Array.isArray||function(t){return"Array"==r(t)}},7252:function(t,e,n){var r=n(5981),o=/#|\.prototype\./,i=function(t,e){var n=s[a(t)];return n==l||n!=c&&("function"==typeof e?r(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},s=i.data={},c=i.NATIVE="N",l=i.POLYFILL="P";t.exports=i},663:function(t,e,n){var r=n(9697),o=n(9813),i=n(2077),a=o("iterator");t.exports=function(t){var e=Object(t);return void 0!==e[a]||"@@iterator"in e||i.hasOwnProperty(r(e))}},941:function(t){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},2529:function(t){t.exports=!0},685:function(t,e,n){var r=n(941),o=n(2532),i=n(9813)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},6664:function(t,e,n){var r=n(626),o=n(2302);t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return"function"==typeof e&&Object(t)instanceof e}},3091:function(t,e,n){var r=n(6059),o=n(6782),i=n(3057),a=n(6843),s=n(2902),c=n(7609),l=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var u,p,f,h,d,v,y,m=n&&n.that,g=!(!n||!n.AS_ENTRIES),b=!(!n||!n.IS_ITERATOR),_=!(!n||!n.INTERRUPTED),w=a(e,m,1+g+_),x=function(t){return u&&c(u),new l(!0,t)},T=function(t){return g?(r(t),_?w(t[0],t[1],x):w(t[0],t[1])):_?w(t,x):w(t)};if(b)u=t;else{if("function"!=typeof(p=s(t)))throw TypeError("Target is not iterable");if(o(p)){for(f=0,h=i(t.length);h>f;f++)if((d=T(t[f]))&&d instanceof l)return d;return new l(!1)}u=p.call(t)}for(v=u.next;!(y=v.call(u)).done;){try{d=T(y.value)}catch(t){throw c(u),t}if("object"==typeof d&&d&&d instanceof l)return d}return new l(!1)}},7609:function(t,e,n){var r=n(6059);t.exports=function(t){var e=t.return;if(void 0!==e)return r(e.call(t)).value}},5143:function(t,e,n){"use strict";var r,o,i,a=n(5981),s=n(249),c=n(2029),l=n(7457),u=n(9813),p=n(2529),f=u("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(r=o):h=!0);var d=null==r||a((function(){var t={};return r[f].call(t)!==t}));d&&(r={}),p&&!d||l(r,f)||c(r,f,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},2077:function(t){t.exports={}},6132:function(t,e,n){var r,o,i,a,s,c,l,u,p=n(1899),f=n(9677).f,h=n(2941).set,d=n(2749),v=n(8045),y=n(6049),m=p.MutationObserver||p.WebKitMutationObserver,g=p.document,b=p.process,_=p.Promise,w=f(p,"queueMicrotask"),x=w&&w.value;x||(r=function(){var t,e;for(y&&(t=b.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},d||y||v||!m||!g?_&&_.resolve?((l=_.resolve(void 0)).constructor=_,u=l.then,a=function(){u.call(l,r)}):a=y?function(){b.nextTick(r)}:function(){h.call(p,r)}:(s=!0,c=g.createTextNode(""),new m(r).observe(c,{characterData:!0}),a=function(){c.data=s=!s})),t.exports=x||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},9297:function(t,e,n){var r=n(1899);t.exports=r.Promise},2497:function(t,e,n){var r=n(3385),o=n(5981);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8019:function(t,e,n){var r=n(1899),o=n(1302),i=r.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},9520:function(t,e,n){"use strict";var r=n(3916),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},344:function(t,e,n){var r=n(685);t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},4018:function(t,e,n){var r=n(1899),o=n(5803),i=n(4853).trim,a=n(3483),s=r.parseFloat,c=1/s(a+"-0")!=-1/0;t.exports=c?function(t){var e=i(o(t)),n=s(e);return 0===n&&"-"==e.charAt(0)?-0:n}:s},9806:function(t,e,n){var r=n(1899),o=n(5803),i=n(4853).trim,a=n(3483),s=r.parseInt,c=/^[+-]?0[Xx]/,l=8!==s(a+"08")||22!==s(a+"0x16");t.exports=l?function(t,e){var n=i(o(t));return s(n,e>>>0||(c.test(n)?16:10))}:s},4420:function(t,e,n){"use strict";var r=n(5746),o=n(5981),i=n(4771),a=n(7857),s=n(6760),c=n(9678),l=n(7026),u=Object.assign,p=Object.defineProperty;t.exports=!u||o((function(){if(r&&1!==u({b:1},u(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||i(u({},e)).join("")!=o}))?function(t,e){for(var n=c(t),o=arguments.length,u=1,p=a.f,f=s.f;o>u;)for(var h,d=l(arguments[u++]),v=p?i(d).concat(p(d)):i(d),y=v.length,m=0;y>m;)h=v[m++],r&&!f.call(d,h)||(n[h]=d[h]);return n}:u},9290:function(t,e,n){var r,o=n(6059),i=n(9938),a=n(6759),s=n(7748),c=n(5463),l=n(1333),u=n(4262)("IE_PROTO"),p=function(){},f=function(t){return"<script>"+t+"<\/script>"},h=function(t){t.write(f("")),t.close();var e=t.parentWindow.Object;return t=null,e},d=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}d=document.domain&&r?h(r):function(){var t,e=l("iframe");if(e.style)return e.style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F}()||h(r);for(var t=a.length;t--;)delete d.prototype[a[t]];return d()};s[u]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(p.prototype=o(t),n=new p,p.prototype=null,n[u]=t):n=d(),void 0===e?n:i(n,e)}},9938:function(t,e,n){var r=n(5746),o=n(5988),i=n(6059),a=n(4771);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),s=r.length,c=0;s>c;)o.f(t,n=r[c++],e[n]);return t}},5988:function(t,e,n){var r=n(5746),o=n(2840),i=n(6059),a=n(3894),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(i(t),e=a(e),i(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},9677:function(t,e,n){var r=n(5746),o=n(6760),i=n(1887),a=n(4529),s=n(3894),c=n(7457),l=n(2840),u=Object.getOwnPropertyDescriptor;e.f=r?u:function(t,e){if(t=a(t),e=s(e),l)try{return u(t,e)}catch(t){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},684:function(t,e,n){var r=n(4529),o=n(946).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},946:function(t,e,n){var r=n(5629),o=n(6759).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},7857:function(t,e){e.f=Object.getOwnPropertySymbols},249:function(t,e,n){var r=n(7457),o=n(9678),i=n(4262),a=n(4160),s=i("IE_PROTO"),c=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=o(t),r(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},5629:function(t,e,n){var r=n(7457),o=n(4529),i=n(1692).indexOf,a=n(7748);t.exports=function(t,e){var n,s=o(t),c=0,l=[];for(n in s)!r(a,n)&&r(s,n)&&l.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(l,n)||l.push(n));return l}},4771:function(t,e,n){var r=n(5629),o=n(6759);t.exports=Object.keys||function(t){return r(t,o)}},6760:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},8929:function(t,e,n){var r=n(6059),o=n(1851);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),o(i),e?t.call(n,i):n.__proto__=i,n}}():void 0)},8810:function(t,e,n){var r=n(5746),o=n(4771),i=n(4529),a=n(6760).f,s=function(t){return function(e){for(var n,s=i(e),c=o(s),l=c.length,u=0,p=[];l>u;)n=c[u++],r&&!a.call(s,n)||p.push(t?[n,s[n]]:s[n]);return p}};t.exports={entries:s(!0),values:s(!1)}},5623:function(t,e,n){"use strict";var r=n(2885),o=n(9697);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},9811:function(t,e,n){var r=n(941);t.exports=function(t,e){var n,o;if("string"===e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if("string"!==e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},1136:function(t,e,n){var r=n(626),o=n(946),i=n(7857),a=n(6059);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=i.f;return n?e.concat(n(t)):e}},4058:function(t){t.exports={}},2:function(t){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},6584:function(t,e,n){var r=n(6059),o=n(941),i=n(9520);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},7524:function(t,e,n){var r=n(9754);t.exports=function(t,e,n){for(var o in e)n&&n.unsafe&&t[o]?t[o]=e[o]:r(t,o,e[o],n);return t}},9754:function(t,e,n){var r=n(2029);t.exports=function(t,e,n,o){o&&o.enumerable?t[e]=n:r(t,e,n)}},8219:function(t){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},4911:function(t,e,n){var r=n(1899);t.exports=function(t,e){try{Object.defineProperty(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},4431:function(t,e,n){"use strict";var r=n(626),o=n(5988),i=n(9813),a=n(5746),s=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},904:function(t,e,n){var r=n(2885),o=n(5988).f,i=n(2029),a=n(7457),s=n(5623),c=n(9813)("toStringTag");t.exports=function(t,e,n,l){if(t){var u=n?t:t.prototype;a(u,c)||o(u,c,{configurable:!0,value:e}),l&&!r&&i(u,"toString",s)}}},4262:function(t,e,n){var r=n(8726),o=n(9418),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},3030:function(t,e,n){var r=n(1899),o=n(4911),i="__core-js_shared__",a=r[i]||o(i,{});t.exports=a},8726:function(t,e,n){var r=n(2529),o=n(3030);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.16.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},487:function(t,e,n){var r=n(6059),o=n(3916),i=n(9813)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},4620:function(t,e,n){var r=n(8459),o=n(5803),i=n(8219),a=function(t){return function(e,n){var a,s,c=o(i(e)),l=r(n),u=c.length;return l<0||l>=u?t?"":void 0:(a=c.charCodeAt(l))<55296||a>56319||l+1===u||(s=c.charCodeAt(l+1))<56320||s>57343?t?c.charAt(l):a:t?c.slice(l,l+2):s-56320+(a-55296<<10)+65536}};t.exports={codeAt:a(!1),charAt:a(!0)}},3093:function(t,e,n){var r=n(5981),o=n(3483);t.exports=function(t){return r((function(){return!!o[t]()||"
"!="
"[t]()||o[t].name!==t}))}},4853:function(t,e,n){var r=n(8219),o=n(5803),i="["+n(3483)+"]",a=RegExp("^"+i+i+"*"),s=RegExp(i+i+"*$"),c=function(t){return function(e){var n=o(r(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(s,"")),n}};t.exports={start:c(1),end:c(2),trim:c(3)}},2941:function(t,e,n){var r,o,i,a,s=n(1899),c=n(5981),l=n(6843),u=n(5463),p=n(1333),f=n(2749),h=n(6049),d=s.setImmediate,v=s.clearImmediate,y=s.process,m=s.MessageChannel,g=s.Dispatch,b=0,_={};try{r=s.location}catch(t){}var w=function(t){if(_.hasOwnProperty(t)){var e=_[t];delete _[t],e()}},x=function(t){return function(){w(t)}},T=function(t){w(t.data)},E=function(t){s.postMessage(String(t),r.protocol+"//"+r.host)};d&&v||(d=function(t){for(var e=[],n=arguments.length,r=1;n>r;)e.push(arguments[r++]);return _[++b]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},o(b),b},v=function(t){delete _[t]},h?o=function(t){y.nextTick(x(t))}:g&&g.now?o=function(t){g.now(x(t))}:m&&!f?(a=(i=new m).port2,i.port1.onmessage=T,o=l(a.postMessage,a,1)):s.addEventListener&&"function"==typeof postMessage&&!s.importScripts&&r&&"file:"!==r.protocol&&!c(E)?(o=E,s.addEventListener("message",T,!1)):o="onreadystatechange"in p("script")?function(t){u.appendChild(p("script")).onreadystatechange=function(){u.removeChild(this),w(t)}}:function(t){setTimeout(x(t),0)}),t.exports={set:d,clear:v}},9413:function(t,e,n){var r=n(8459),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},4529:function(t,e,n){var r=n(7026),o=n(8219);t.exports=function(t){return r(o(t))}},8459:function(t){var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},3057:function(t,e,n){var r=n(8459),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},9678:function(t,e,n){var r=n(8219);t.exports=function(t){return Object(r(t))}},6935:function(t,e,n){var r=n(941),o=n(6664),i=n(9811),a=n(9813)("toPrimitive");t.exports=function(t,e){if(!r(t)||o(t))return t;var n,s=t[a];if(void 0!==s){if(void 0===e&&(e="default"),n=s.call(t,e),!r(n)||o(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),i(t,e)}},3894:function(t,e,n){var r=n(6935),o=n(6664);t.exports=function(t){var e=r(t,"string");return o(e)?e:String(e)}},2885:function(t,e,n){var r={};r[n(9813)("toStringTag")]="z",t.exports="[object z]"===String(r)},5803:function(t,e,n){var r=n(6664);t.exports=function(t){if(r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},9418:function(t){var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},2302:function(t,e,n){var r=n(2497);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},1477:function(t,e,n){var r=n(9813);e.f=r},9813:function(t,e,n){var r=n(1899),o=n(8726),i=n(7457),a=n(9418),s=n(2497),c=n(2302),l=o("wks"),u=r.Symbol,p=c?u:u&&u.withoutSetter||a;t.exports=function(t){return i(l,t)&&(s||"string"==typeof l[t])||(s&&i(u,t)?l[t]=u[t]:l[t]=p("Symbol."+t)),l[t]}},3483:function(t){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},7627:function(t,e,n){"use strict";var r=n(6887),o=n(249),i=n(8929),a=n(9290),s=n(2029),c=n(1887),l=n(3091),u=n(5803),p=function(t,e){var n=this;if(!(n instanceof p))return new p(t,e);i&&(n=i(new Error(void 0),o(n))),void 0!==e&&s(n,"message",u(e));var r=[];return l(t,r.push,{that:r}),s(n,"errors",r),n};p.prototype=a(Error.prototype,{constructor:c(5,p),message:c(5,""),name:c(5,"AggregateError")}),r({global:!0},{AggregateError:p})},5906:function(t,e,n){"use strict";var r=n(6887),o=n(5981),i=n(1052),a=n(941),s=n(9678),c=n(3057),l=n(5449),u=n(4692),p=n(568),f=n(9813),h=n(3385),d=f("isConcatSpreadable"),v=9007199254740991,y="Maximum allowed index exceeded",m=h>=51||!o((function(){var t=[];return t[d]=!1,t.concat()[0]!==t})),g=p("concat"),b=function(t){if(!a(t))return!1;var e=t[d];return void 0!==e?!!e:i(t)};r({target:"Array",proto:!0,forced:!m||!g},{concat:function(t){var e,n,r,o,i,a=s(this),p=u(a,0),f=0;for(e=-1,r=arguments.length;e<r;e++)if(b(i=-1===e?a:arguments[e])){if(f+(o=c(i.length))>v)throw TypeError(y);for(n=0;n<o;n++,f++)n in i&&l(p,f,i[n])}else{if(f>=v)throw TypeError(y);l(p,f++,i)}return p.length=f,p}})},8851:function(t,e,n){"use strict";var r=n(6887),o=n(3610).every;r({target:"Array",proto:!0,forced:!n(4194)("every")},{every:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},290:function(t,e,n){var r=n(6887),o=n(1860),i=n(8479);r({target:"Array",proto:!0},{fill:o}),i("fill")},1501:function(t,e,n){"use strict";var r=n(6887),o=n(3610).filter;r({target:"Array",proto:!0,forced:!n(568)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},4929:function(t,e,n){"use strict";var r=n(6887),o=n(3610).findIndex,i=n(8479),a="findIndex",s=!0;a in[]&&Array(1).findIndex((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(a)},833:function(t,e,n){"use strict";var r=n(6887),o=n(3610).find,i=n(8479),a="find",s=!0;a in[]&&Array(1).find((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(a)},4944:function(t,e,n){"use strict";var r=n(6887),o=n(3092),i=n(9678),a=n(3057),s=n(8459),c=n(4692);r({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=i(this),n=a(e.length),r=c(e,0);return r.length=o(r,e,e,n,0,void 0===t?1:s(t)),r}})},2437:function(t,e,n){"use strict";var r=n(6887),o=n(6837);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},3242:function(t,e,n){var r=n(6887),o=n(1354);r({target:"Array",stat:!0,forced:!n(1385)((function(t){Array.from(t)}))},{from:o})},7690:function(t,e,n){"use strict";var r=n(6887),o=n(1692).includes,i=n(8479);r({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},9076:function(t,e,n){"use strict";var r=n(6887),o=n(1692).indexOf,i=n(4194),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,c=i("indexOf");r({target:"Array",proto:!0,forced:s||!c},{indexOf:function(t){return s?a.apply(this,arguments)||0:o(this,t,arguments.length>1?arguments[1]:void 0)}})},2737:function(t,e,n){n(6887)({target:"Array",stat:!0},{isArray:n(1052)})},6274:function(t,e,n){"use strict";var r=n(4529),o=n(8479),i=n(2077),a=n(5402),s=n(7771),c="Array Iterator",l=a.set,u=a.getterFor(c);t.exports=s(Array,"Array",(function(t,e){l(this,{type:c,target:r(t),index:0,kind:e})}),(function(){var t=u(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},8787:function(t,e,n){"use strict";var r=n(6887),o=n(3610).map;r({target:"Array",proto:!0,forced:!n(568)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},1876:function(t,e,n){"use strict";var r=n(6887),o=n(6499).left,i=n(4194),a=n(3385),s=n(6049);r({target:"Array",proto:!0,forced:!i("reduce")||!s&&a>79&&a<83},{reduce:function(t){return o(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},1490:function(t,e,n){"use strict";var r=n(6887),o=n(1052),i=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),i.call(this)}})},186:function(t,e,n){"use strict";var r=n(6887),o=n(941),i=n(1052),a=n(9413),s=n(3057),c=n(4529),l=n(5449),u=n(9813),p=n(568)("slice"),f=u("species"),h=[].slice,d=Math.max;r({target:"Array",proto:!0,forced:!p},{slice:function(t,e){var n,r,u,p=c(this),v=s(p.length),y=a(t,v),m=a(void 0===e?v:e,v);if(i(p)&&("function"!=typeof(n=p.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[f])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(p,y,m);for(r=new(void 0===n?Array:n)(d(m-y,0)),u=0;y<m;y++,u++)y in p&&l(r,u,p[y]);return r.length=u,r}})},6026:function(t,e,n){"use strict";var r=n(6887),o=n(3610).some;r({target:"Array",proto:!0,forced:!n(4194)("some")},{some:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},4115:function(t,e,n){"use strict";var r=n(6887),o=n(3916),i=n(9678),a=n(3057),s=n(5803),c=n(5981),l=n(1388),u=n(4194),p=n(4342),f=n(7797),h=n(3385),d=n(8938),v=[],y=v.sort,m=c((function(){v.sort(void 0)})),g=c((function(){v.sort(null)})),b=u("sort"),_=!c((function(){if(h)return h<70;if(!(p&&p>3)){if(f)return!0;if(d)return d<603;var t,e,n,r,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)v.push({k:e+r,v:n})}for(v.sort((function(t,e){return e.v-t.v})),r=0;r<v.length;r++)e=v[r].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));r({target:"Array",proto:!0,forced:m||!g||!b||!_},{sort:function(t){void 0!==t&&o(t);var e=i(this);if(_)return void 0===t?y.call(e):y.call(e,t);var n,r,c=[],u=a(e.length);for(r=0;r<u;r++)r in e&&c.push(e[r]);for(n=(c=l(c,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:s(e)>s(n)?1:-1}}(t))).length,r=0;r<n;)e[r]=c[r++];for(;r<u;)delete e[r++];return e}})},1107:function(t,e,n){n(8479)("flat")},5160:function(t,e,n){n(6887)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},3381:function(t,e,n){n(6887)({target:"Function",proto:!0},{bind:n(8308)})},2619:function(t,e,n){var r=n(6887),o=n(626),i=n(5981),a=o("JSON","stringify"),s=/[\uD800-\uDFFF]/g,c=/^[\uD800-\uDBFF]$/,l=/^[\uDC00-\uDFFF]$/,u=function(t,e,n){var r=n.charAt(e-1),o=n.charAt(e+1);return c.test(t)&&!l.test(o)||l.test(t)&&!c.test(r)?"\\u"+t.charCodeAt(0).toString(16):t},p=i((function(){return'"\\udf06\\ud834"'!==a("\udf06\ud834")||'"\\udead"'!==a("\udead")}));a&&r({target:"JSON",stat:!0,forced:p},{stringify:function(t,e,n){var r=a.apply(null,arguments);return"string"==typeof r?r.replace(s,u):r}})},9120:function(t,e,n){var r=n(1899);n(904)(r.JSON,"JSON",!0)},5327:function(){},9221:function(t,e,n){var r=n(6887),o=n(4420);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},4979:function(t,e,n){var r=n(6887),o=n(5746);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperties:n(9938)})},6450:function(t,e,n){var r=n(6887),o=n(5746);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:n(5988).f})},1078:function(t,e,n){var r=n(6887),o=n(8810).entries;r({target:"Object",stat:!0},{entries:function(t){return o(t)}})},6924:function(t,e,n){var r=n(6887),o=n(5981),i=n(4529),a=n(9677).f,s=n(5746),c=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||c,sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},8482:function(t,e,n){var r=n(6887),o=n(5746),i=n(1136),a=n(4529),s=n(9677),c=n(5449);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),o=s.f,l=i(r),u={},p=0;l.length>p;)void 0!==(n=o(r,e=l[p++]))&&c(u,e,n);return u}})},9816:function(t,e,n){var r=n(6887),o=n(5981),i=n(684).f;r({target:"Object",stat:!0,forced:o((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},7405:function(t,e,n){var r=n(6887),o=n(5981),i=n(9678),a=n(249),s=n(4160);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(i(t))}})},1724:function(t,e,n){var r=n(6887),o=n(9678),i=n(4771);r({target:"Object",stat:!0,forced:n(5981)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},5967:function(){},6614:function(t,e,n){var r=n(6887),o=n(8810).values;r({target:"Object",stat:!0},{values:function(t){return o(t)}})},9718:function(t,e,n){var r=n(6887),o=n(4018);r({global:!0,forced:parseFloat!=o},{parseFloat:o})},4038:function(t,e,n){var r=n(6887),o=n(9806);r({global:!0,forced:parseInt!=o},{parseInt:o})},4560:function(t,e,n){"use strict";var r=n(6887),o=n(3916),i=n(9520),a=n(2),s=n(3091);r({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=i.f(e),r=n.resolve,c=n.reject,l=a((function(){var n=o(e.resolve),i=[],a=0,c=1;s(t,(function(t){var o=a++,s=!1;i.push(void 0),c++,n.call(e,t).then((function(t){s||(s=!0,i[o]={status:"fulfilled",value:t},--c||r(i))}),(function(t){s||(s=!0,i[o]={status:"rejected",reason:t},--c||r(i))}))})),--c||r(i)}));return l.error&&c(l.value),n.promise}})},7206:function(t,e,n){"use strict";var r=n(6887),o=n(3916),i=n(626),a=n(9520),s=n(2),c=n(3091),l="No one promise resolved";r({target:"Promise",stat:!0},{any:function(t){var e=this,n=a.f(e),r=n.resolve,u=n.reject,p=s((function(){var n=o(e.resolve),a=[],s=0,p=1,f=!1;c(t,(function(t){var o=s++,c=!1;a.push(void 0),p++,n.call(e,t).then((function(t){c||f||(f=!0,r(t))}),(function(t){c||f||(c=!0,a[o]=t,--p||u(new(i("AggregateError"))(a,l)))}))})),--p||u(new(i("AggregateError"))(a,l))}));return p.error&&u(p.value),n.promise}})},4349:function(t,e,n){"use strict";var r=n(6887),o=n(2529),i=n(9297),a=n(5981),s=n(626),c=n(487),l=n(6584),u=n(9754);if(r({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=c(this,s("Promise")),n="function"==typeof t;return this.then(n?function(n){return l(e,t()).then((function(){return n}))}:t,n?function(n){return l(e,t()).then((function(){throw n}))}:t)}}),!o&&"function"==typeof i){var p=s("Promise").prototype.finally;i.prototype.finally!==p&&u(i.prototype,"finally",p,{unsafe:!0})}},8881:function(t,e,n){"use strict";var r,o,i,a,s=n(6887),c=n(2529),l=n(1899),u=n(626),p=n(9297),f=n(9754),h=n(7524),d=n(8929),v=n(904),y=n(4431),m=n(941),g=n(3916),b=n(5743),_=n(1302),w=n(3091),x=n(1385),T=n(487),E=n(2941).set,S=n(6132),k=n(6584),A=n(4845),O=n(9520),C=n(2),I=n(5402),N=n(7252),j=n(9813),P=n(3321),R=n(6049),L=n(3385),D=j("species"),U="Promise",M=I.get,z=I.set,F=I.getterFor(U),$=p&&p.prototype,B=p,H=$,V=l.TypeError,q=l.document,W=l.process,G=O.f,K=G,Y=!!(q&&q.createEvent&&l.dispatchEvent),J="function"==typeof PromiseRejectionEvent,Q="unhandledrejection",Z=!1,X=N(U,(function(){var t=_(B),e=t!==String(B);if(!e&&66===L)return!0;if(c&&!H.finally)return!0;if(L>=51&&/native code/.test(t))return!1;var n=new B((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[D]=r,!(Z=n.then((function(){}))instanceof r)||!e&&P&&!J})),tt=X||!x((function(t){B.all(t).catch((function(){}))})),et=function(t){var e;return!(!m(t)||"function"!=typeof(e=t.then))&&e},nt=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;S((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var a,s,c,l=n[i++],u=o?l.ok:l.fail,p=l.resolve,f=l.reject,h=l.domain;try{u?(o||(2===t.rejection&&at(t),t.rejection=1),!0===u?a=r:(h&&h.enter(),a=u(r),h&&(h.exit(),c=!0)),a===l.promise?f(V("Promise-chain cycle")):(s=et(a))?s.call(a,p,f):p(a)):f(r)}catch(t){h&&!c&&h.exit(),f(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ot(t)}))}},rt=function(t,e,n){var r,o;Y?((r=q.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),l.dispatchEvent(r)):r={promise:e,reason:n},!J&&(o=l["on"+t])?o(r):t===Q&&A("Unhandled promise rejection",n)},ot=function(t){E.call(l,(function(){var e,n=t.facade,r=t.value;if(it(t)&&(e=C((function(){R?W.emit("unhandledRejection",r,n):rt(Q,n,r)})),t.rejection=R||it(t)?2:1,e.error))throw e.value}))},it=function(t){return 1!==t.rejection&&!t.parent},at=function(t){E.call(l,(function(){var e=t.facade;R?W.emit("rejectionHandled",e):rt("rejectionhandled",e,t.value)}))},st=function(t,e,n){return function(r){t(e,r,n)}},ct=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,nt(t,!0))},lt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw V("Promise can't be resolved itself");var r=et(e);r?S((function(){var n={done:!1};try{r.call(e,st(lt,n,t),st(ct,n,t))}catch(e){ct(n,e,t)}})):(t.value=e,t.state=1,nt(t,!1))}catch(e){ct({done:!1},e,t)}}};if(X&&(H=(B=function(t){b(this,B,U),g(t),r.call(this);var e=M(this);try{t(st(lt,e),st(ct,e))}catch(t){ct(e,t)}}).prototype,(r=function(t){z(this,{type:U,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(H,{then:function(t,e){var n=F(this),r=G(T(this,B));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=R?W.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&nt(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=M(t);this.promise=t,this.resolve=st(lt,e),this.reject=st(ct,e)},O.f=G=function(t){return t===B||t===i?new o(t):K(t)},!c&&"function"==typeof p&&$!==Object.prototype)){a=$.then,Z||(f($,"then",(function(t,e){var n=this;return new B((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),f($,"catch",H.catch,{unsafe:!0}));try{delete $.constructor}catch(t){}d&&d($,H)}s({global:!0,wrap:!0,forced:X},{Promise:B}),v(B,U,!1,!0),y(U),i=u(U),s({target:U,stat:!0,forced:X},{reject:function(t){var e=G(this);return e.reject.call(void 0,t),e.promise}}),s({target:U,stat:!0,forced:c||X},{resolve:function(t){return k(c&&this===i?B:this,t)}}),s({target:U,stat:!0,forced:tt},{all:function(t){var e=this,n=G(e),r=n.resolve,o=n.reject,i=C((function(){var n=g(e.resolve),i=[],a=0,s=1;w(t,(function(t){var c=a++,l=!1;i.push(void 0),s++,n.call(e,t).then((function(t){l||(l=!0,i[c]=t,--s||r(i))}),o)})),--s||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=G(e),r=n.reject,o=C((function(){var o=g(e.resolve);w(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},1502:function(){},9008:function(t,e,n){"use strict";var r=n(4683),o=n(5616);t.exports=r("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),o)},1035:function(t,e,n){"use strict";var r=n(6887),o=n(344),i=n(8219),a=n(5803);r({target:"String",proto:!0,forced:!n(7772)("includes")},{includes:function(t){return!!~a(i(this)).indexOf(a(o(t)),arguments.length>1?arguments[1]:void 0)}})},7971:function(t,e,n){"use strict";var r=n(4620).charAt,o=n(5803),i=n(5402),a=n(7771),s="String Iterator",c=i.set,l=i.getterFor(s);a(String,"String",(function(t){c(this,{type:s,string:o(t),index:0})}),(function(){var t,e=l(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},7398:function(t,e,n){"use strict";var r=n(6887),o=n(4853).trim;r({target:"String",proto:!0,forced:n(3093)("trim")},{trim:function(){return o(this)}})},8555:function(t,e,n){n(6349)("asyncIterator")},2615:function(){},1732:function(t,e,n){n(6349)("hasInstance")},5903:function(t,e,n){n(6349)("isConcatSpreadable")},1825:function(t,e,n){n(6349)("iterator")},5824:function(t,e,n){"use strict";var r=n(6887),o=n(1899),i=n(626),a=n(2529),s=n(5746),c=n(2497),l=n(5981),u=n(7457),p=n(1052),f=n(941),h=n(6664),d=n(6059),v=n(9678),y=n(4529),m=n(3894),g=n(5803),b=n(1887),_=n(9290),w=n(4771),x=n(946),T=n(684),E=n(7857),S=n(9677),k=n(5988),A=n(6760),O=n(2029),C=n(9754),I=n(8726),N=n(4262),j=n(7748),P=n(9418),R=n(9813),L=n(1477),D=n(6349),U=n(904),M=n(5402),z=n(3610).forEach,F=N("hidden"),$="Symbol",B=R("toPrimitive"),H=M.set,V=M.getterFor($),q=Object.prototype,W=o.Symbol,G=i("JSON","stringify"),K=S.f,Y=k.f,J=T.f,Q=A.f,Z=I("symbols"),X=I("op-symbols"),tt=I("string-to-symbol-registry"),et=I("symbol-to-string-registry"),nt=I("wks"),rt=o.QObject,ot=!rt||!rt.prototype||!rt.prototype.findChild,it=s&&l((function(){return 7!=_(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=K(q,e);r&&delete q[e],Y(t,e,n),r&&t!==q&&Y(q,e,r)}:Y,at=function(t,e){var n=Z[t]=_(W.prototype);return H(n,{type:$,tag:t,description:e}),s||(n.description=e),n},st=function(t,e,n){t===q&&st(X,e,n),d(t);var r=m(e);return d(n),u(Z,r)?(n.enumerable?(u(t,F)&&t[F][r]&&(t[F][r]=!1),n=_(n,{enumerable:b(0,!1)})):(u(t,F)||Y(t,F,b(1,{})),t[F][r]=!0),it(t,r,n)):Y(t,r,n)},ct=function(t,e){d(t);var n=y(e),r=w(n).concat(ft(n));return z(r,(function(e){s&&!lt.call(n,e)||st(t,e,n[e])})),t},lt=function(t){var e=m(t),n=Q.call(this,e);return!(this===q&&u(Z,e)&&!u(X,e))&&(!(n||!u(this,e)||!u(Z,e)||u(this,F)&&this[F][e])||n)},ut=function(t,e){var n=y(t),r=m(e);if(n!==q||!u(Z,r)||u(X,r)){var o=K(n,r);return!o||!u(Z,r)||u(n,F)&&n[F][r]||(o.enumerable=!0),o}},pt=function(t){var e=J(y(t)),n=[];return z(e,(function(t){u(Z,t)||u(j,t)||n.push(t)})),n},ft=function(t){var e=t===q,n=J(e?X:y(t)),r=[];return z(n,(function(t){!u(Z,t)||e&&!u(q,t)||r.push(Z[t])})),r};c||(C((W=function(){if(this instanceof W)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,e=P(t),n=function(t){this===q&&n.call(X,t),u(this,F)&&u(this[F],e)&&(this[F][e]=!1),it(this,e,b(1,t))};return s&&ot&&it(q,e,{configurable:!0,set:n}),at(e,t)}).prototype,"toString",(function(){return V(this).tag})),C(W,"withoutSetter",(function(t){return at(P(t),t)})),A.f=lt,k.f=st,S.f=ut,x.f=T.f=pt,E.f=ft,L.f=function(t){return at(R(t),t)},s&&(Y(W.prototype,"description",{configurable:!0,get:function(){return V(this).description}}),a||C(q,"propertyIsEnumerable",lt,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:W}),z(w(nt),(function(t){D(t)})),r({target:$,stat:!0,forced:!c},{for:function(t){var e=g(t);if(u(tt,e))return tt[e];var n=W(e);return tt[e]=n,et[n]=e,n},keyFor:function(t){if(!h(t))throw TypeError(t+" is not a symbol");if(u(et,t))return et[t]},useSetter:function(){ot=!0},useSimple:function(){ot=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!s},{create:function(t,e){return void 0===e?_(t):ct(_(t),e)},defineProperty:st,defineProperties:ct,getOwnPropertyDescriptor:ut}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:pt,getOwnPropertySymbols:ft}),r({target:"Object",stat:!0,forced:l((function(){E.f(1)}))},{getOwnPropertySymbols:function(t){return E.f(v(t))}}),G&&r({target:"JSON",stat:!0,forced:!c||l((function(){var t=W();return"[null]"!=G([t])||"{}"!=G({a:t})||"{}"!=G(Object(t))}))},{stringify:function(t,e,n){for(var r,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=e,(f(e)||void 0!==t)&&!h(t))return p(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!h(e))return e}),o[1]=e,G.apply(null,o)}}),W.prototype[B]||O(W.prototype,B,W.prototype.valueOf),U(W,$),j[F]=!0},5915:function(t,e,n){n(6349)("matchAll")},8394:function(t,e,n){n(6349)("match")},1437:function(t,e,n){n(6349)("replace")},9791:function(t,e,n){n(6349)("search")},9911:function(t,e,n){n(6349)("species")},4315:function(t,e,n){n(6349)("split")},3131:function(t,e,n){n(6349)("toPrimitive")},4714:function(t,e,n){n(6349)("toStringTag")},659:function(t,e,n){n(6349)("unscopables")},7634:function(t,e,n){n(6274);var r=n(3281),o=n(1899),i=n(9697),a=n(2029),s=n(2077),c=n(9813)("toStringTag");for(var l in r){var u=o[l],p=u&&u.prototype;p&&i(p)!==c&&a(p,c,l),s[l]=s.Array}},1249:function(t,e,n){var r=n(6887),o=n(1899),i=n(2861),a=[].slice,s=function(t){return function(e,n){var r=arguments.length>2,o=r?a.call(arguments,2):void 0;return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(i)},{setTimeout:s(o.setTimeout),setInterval:s(o.setInterval)})},7698:function(t,e,n){var r=n(4493);t.exports=r},3363:function(t,e,n){var r=n(4034);t.exports=r},9216:function(t,e,n){var r=n(9324);t.exports=r},7784:function(t,e,n){var r=n(1103);t.exports=r},8196:function(t,e,n){var r=n(6246);t.exports=r},8065:function(t,e,n){var r=n(6043);t.exports=r},9455:function(t,e,n){var r=n(3160);t.exports=r},9743:function(t,e,n){var r=n(446);t.exports=r},1955:function(t,e,n){var r=n(2480);t.exports=r},6064:function(t,e,n){var r=n(7147);t.exports=r},1577:function(t,e,n){var r=n(2236);t.exports=r},4913:function(t,e,n){var r=n(8098);t.exports=r},6279:function(t,e,n){n(7634);var r=n(9216),o=n(9697),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.forEach;return t===i||t instanceof Array&&e===i.forEach||a.hasOwnProperty(o(t))?r:e}},3778:function(t,e,n){var r=n(8557);t.exports=r},9373:function(t,e,n){var r=n(4570);t.exports=r},1798:function(t,e,n){var r=n(8287);t.exports=r},2527:function(t,e,n){var r=n(8025);t.exports=r},8427:function(t,e,n){var r=n(1060);t.exports=r},2073:function(t,e,n){var r=n(9601);t.exports=r},5286:function(t,e,n){var r=n(8299);t.exports=r},2856:function(t,e,n){var r=n(9355);t.exports=r},6361:function(t,e,n){var r=n(2774);t.exports=r},8933:function(t,e,n){var r=n(4426);t.exports=r},3383:function(t,e,n){var r=n(5999);t.exports=r},7396:function(t,e,n){var r=n(7702);t.exports=r},1910:function(t,e,n){var r=n(8171);t.exports=r},6209:function(t,e,n){var r=n(3081);t.exports=r},9427:function(t,e,n){var r=n(286);t.exports=r},2857:function(t,e,n){var r=n(2766);t.exports=r},4477:function(t,e,n){var r=n(3288);t.exports=r},9534:function(t,e,n){var r=n(498);t.exports=r},6507:function(t,e,n){var r=n(3966);t.exports=r},3059:function(t,e,n){var r=n(8494);t.exports=r},7795:function(t,e,n){var r=n(8430);t.exports=r},6877:function(t,e,n){var r=n(7579);t.exports=r},4888:function(t,e,n){var r=n(8524);t.exports=r},7460:function(t,e,n){var r=n(2956);n(7634),t.exports=r},3474:function(t,e,n){n(1249);var r=n(4058);t.exports=r.setInterval},7989:function(t,e,n){n(1249);var r=n(4058);t.exports=r.setTimeout},5519:function(t,e,n){var r=n(6998);n(7634),t.exports=r},2547:function(t,e,n){var r=n(7473);n(7634),t.exports=r},6509:function(t,e,n){var r=n(4227);n(7634),t.exports=r},4289:function(t,e,n){"use strict";var r=n(2215),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,c=s&&function(){var t={};try{for(var e in s(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),l=function(t,e,n,r){var o;(!(e in t)||"function"==typeof(o=r)&&"[object Function]"===i.call(o)&&r())&&(c?s(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n)},u=function(t,e){var n=arguments.length>2?arguments[2]:{},i=r(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s<i.length;s+=1)l(t,i[s],e[i[s]],n[i[s]])};u.supportsDescriptors=!!c,t.exports=u},4445:function(t){t.exports=r,r.default=r,r.stable=a,r.stableStringify=a;var e=[],n=[];function r(t,r,i){var a;for(o(t,"",[],void 0),a=0===n.length?JSON.stringify(t,r,i):JSON.stringify(t,c(r),i);0!==e.length;){var s=e.pop();4===s.length?Object.defineProperty(s[0],s[1],s[3]):s[0][s[1]]=s[2]}return a}function o(t,r,i,a){var s;if("object"==typeof t&&null!==t){for(s=0;s<i.length;s++)if(i[s]===t){var c=Object.getOwnPropertyDescriptor(a,r);return void(void 0!==c.get?c.configurable?(Object.defineProperty(a,r,{value:"[Circular]"}),e.push([a,r,t,c])):n.push([t,r]):(a[r]="[Circular]",e.push([a,r,t])))}if(i.push(t),Array.isArray(t))for(s=0;s<t.length;s++)o(t[s],s,i,t);else{var l=Object.keys(t);for(s=0;s<l.length;s++){var u=l[s];o(t[u],u,i,t)}}i.pop()}}function i(t,e){return t<e?-1:t>e?1:0}function a(t,r,o){var i,a=s(t,"",[],void 0)||t;for(i=0===n.length?JSON.stringify(a,r,o):JSON.stringify(a,c(r),o);0!==e.length;){var l=e.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}return i}function s(t,r,o,a){var c;if("object"==typeof t&&null!==t){for(c=0;c<o.length;c++)if(o[c]===t){var l=Object.getOwnPropertyDescriptor(a,r);return void(void 0!==l.get?l.configurable?(Object.defineProperty(a,r,{value:"[Circular]"}),e.push([a,r,t,l])):n.push([t,r]):(a[r]="[Circular]",e.push([a,r,t])))}if("function"==typeof t.toJSON)return;if(o.push(t),Array.isArray(t))for(c=0;c<t.length;c++)s(t[c],c,o,t);else{var u={},p=Object.keys(t).sort(i);for(c=0;c<p.length;c++){var f=p[c];s(t[f],f,o,t),u[f]=t[f]}if(void 0===a)return u;e.push([a,r,t]),a[r]=u}o.pop()}}function c(t){return t=void 0!==t?t:function(t,e){return e},function(e,r){if(n.length>0)for(var o=0;o<n.length;o++){var i=n[o];if(i[1]===e&&i[0]===r){r="[Circular]",n.splice(o,1);break}}return t.call(this,e,r)}}},7648:function(t){"use strict";var e="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,r=Object.prototype.toString,o="[object Function]";t.exports=function(t){var i=this;if("function"!=typeof i||r.call(i)!==o)throw new TypeError(e+i);for(var a,s=n.call(arguments,1),c=function(){if(this instanceof a){var e=i.apply(this,s.concat(n.call(arguments)));return Object(e)===e?e:this}return i.apply(t,s.concat(n.call(arguments)))},l=Math.max(0,i.length-s.length),u=[],p=0;p<l;p++)u.push("$"+p);if(a=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(c),i.prototype){var f=function(){};f.prototype=i.prototype,a.prototype=new f,f.prototype=null}return a}},8612:function(t,e,n){"use strict";var r=n(7648);t.exports=Function.prototype.bind||r},210:function(t,e,n){"use strict";var r,o=SyntaxError,i=Function,a=TypeError,s=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(t){c=null}var l=function(){throw new a},u=c?function(){try{return l}catch(t){try{return c(arguments,"callee").get}catch(t){return l}}}():l,p=n(1405)(),f=Object.getPrototypeOf||function(t){return t.__proto__},h={},d="undefined"==typeof Uint8Array?r:f(Uint8Array),v={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":p?f([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p?f(f([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&p?f((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&p?f((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p?f(""[Symbol.iterator]()):r,"%Symbol%":p?Symbol:r,"%SyntaxError%":o,"%ThrowTypeError%":u,"%TypedArray%":d,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet},y=function t(e){var n;if("%AsyncFunction%"===e)n=s("async function () {}");else if("%GeneratorFunction%"===e)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=s("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&(n=f(o.prototype))}return v[e]=n,n},m={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},g=n(8612),b=n(7642),_=g.call(Function.call,Array.prototype.concat),w=g.call(Function.apply,Array.prototype.splice),x=g.call(Function.call,String.prototype.replace),T=g.call(Function.call,String.prototype.slice),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,k=function(t){var e=T(t,0,1),n=T(t,-1);if("%"===e&&"%"!==n)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var r=[];return x(t,E,(function(t,e,n,o){r[r.length]=n?x(o,S,"$1"):e||t})),r},A=function(t,e){var n,r=t;if(b(m,r)&&(r="%"+(n=m[r])[0]+"%"),b(v,r)){var i=v[r];if(i===h&&(i=y(r)),void 0===i&&!e)throw new a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new o("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');var n=k(t),r=n.length>0?n[0]:"",i=A("%"+r+"%",e),s=i.name,l=i.value,u=!1,p=i.alias;p&&(r=p[0],w(n,_([0,1],p)));for(var f=1,h=!0;f<n.length;f+=1){var d=n[f],y=T(d,0,1),m=T(d,-1);if(('"'===y||"'"===y||"`"===y||'"'===m||"'"===m||"`"===m)&&y!==m)throw new o("property names with quotes must have matching quotes");if("constructor"!==d&&h||(u=!0),b(v,s="%"+(r+="."+d)+"%"))l=v[s];else if(null!=l){if(!(d in l)){if(!e)throw new a("base intrinsic for "+t+" exists, but the property is not available.");return}if(c&&f+1>=n.length){var g=c(l,d);l=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:l[d]}else h=b(l,d),l=l[d];h&&!u&&(v[s]=l)}}return l}},1221:function(t){"use strict";"undefined"!=typeof self?t.exports=self:"undefined"!=typeof window?t.exports=window:t.exports=Function("return this")()},2503:function(t,e,n){"use strict";var r=n(4289),o=n(1221),i=n(2168),a=n(9471),s=i(),c=function(){return s};r(c,{getPolyfill:i,implementation:o,shim:a}),t.exports=c},2168:function(t,e,n){"use strict";var r=n(1221);t.exports=function(){return"object"==typeof n.g&&n.g&&n.g.Math===Math&&n.g.Array===Array?n.g:r}},9471:function(t,e,n){"use strict";var r=n(4289),o=n(2168);t.exports=function(){var t=o();if(r.supportsDescriptors){var e=Object.getOwnPropertyDescriptor(t,"globalThis");(!e||e.configurable&&(e.enumerable||e.writable||globalThis!==t))&&Object.defineProperty(t,"globalThis",{configurable:!0,enumerable:!1,value:t,writable:!1})}else"object"==typeof globalThis&&globalThis===t||(t.globalThis=t);return t}},1405:function(t,e,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5419);t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},5419:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7642:function(t,e,n){"use strict";var r=n(8612);t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},679:function(t){t.exports=function(t){var e={},n=[];(t=t||this).on=function(n,r,o){return(e[n]=e[n]||[]).push([r,o]),t},t.off=function(r,o){r||(e={});for(var i=e[r]||n,a=i.length=o?i.length:0;a--;)o==i[a][0]&&i.splice(a,1);return t},t.emit=function(r){for(var o,i=e[r]||n,a=i.length>0?i.slice(0,i.length):i,s=0;o=a[s++];)o[0].apply(o[1],n.slice.call(arguments,1));return t}}},631:function(t,e,n){var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=s&&c&&"function"==typeof c.get?c.get:null,u=s&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,v=Object.prototype.toString,y=Function.prototype.toString,m=String.prototype.match,g="function"==typeof BigInt?BigInt.prototype.valueOf:null,b=Object.getOwnPropertySymbols,_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,w="function"==typeof Symbol&&"object"==typeof Symbol.iterator,x=Object.prototype.propertyIsEnumerable,T=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null),E=n(4654).custom,S=E&&I(E)?E:null,k="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function A(t,e,n){var r="double"===(n.quoteStyle||e)?'"':"'";return r+t+r}function O(t){return String(t).replace(/"/g,""")}function C(t){return!("[object Array]"!==P(t)||k&&"object"==typeof t&&k in t)}function I(t){if(w)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!_)return!1;try{return _.call(t),!0}catch(t){}return!1}t.exports=function t(e,n,r,o){var s=n||{};if(j(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(j(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!j(s,"customInspect")||s.customInspect;if("boolean"!=typeof c)throw new TypeError('option "customInspect", if provided, must be `true` or `false`');if(j(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return L(e,s);if("number"==typeof e)return 0===e?1/0/e>0?"0":"-0":String(e);if("bigint"==typeof e)return String(e)+"n";var v=void 0===s.depth?5:s.depth;if(void 0===r&&(r=0),r>=v&&v>0&&"object"==typeof e)return C(e)?"[Array]":"[Object]";var b,x=function(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;n=Array(t.indent+1).join(" ")}return{base:n,prev:Array(e+1).join(n)}}(s,r);if(void 0===o)o=[];else if(R(o,e)>=0)return"[Circular]";function E(e,n,i){if(n&&(o=o.slice()).push(n),i){var a={depth:s.depth};return j(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,r+1,o)}return t(e,s,r+1,o)}if("function"==typeof e){var N=function(t){if(t.name)return t.name;var e=m.call(y.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),D=$(e,E);return"[Function"+(N?": "+N:" (anonymous)")+"]"+(D.length>0?" { "+D.join(", ")+" }":"")}if(I(e)){var B=w?String(e).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):_.call(e);return"object"!=typeof e||w?B:U(B)}if((b=e)&&"object"==typeof b&&("undefined"!=typeof HTMLElement&&b instanceof HTMLElement||"string"==typeof b.nodeName&&"function"==typeof b.getAttribute)){for(var H="<"+String(e.nodeName).toLowerCase(),V=e.attributes||[],q=0;q<V.length;q++)H+=" "+V[q].name+"="+A(O(V[q].value),"double",s);return H+=">",e.childNodes&&e.childNodes.length&&(H+="..."),H+"</"+String(e.nodeName).toLowerCase()+">"}if(C(e)){if(0===e.length)return"[]";var W=$(e,E);return x&&!function(t){for(var e=0;e<t.length;e++)if(R(t[e],"\n")>=0)return!1;return!0}(W)?"["+F(W,x)+"]":"[ "+W.join(", ")+" ]"}if(function(t){return!("[object Error]"!==P(t)||k&&"object"==typeof t&&k in t)}(e)){var G=$(e,E);return 0===G.length?"["+String(e)+"]":"{ ["+String(e)+"] "+G.join(", ")+" }"}if("object"==typeof e&&c){if(S&&"function"==typeof e[S])return e[S]();if("function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{l.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var K=[];return a.call(e,(function(t,n){K.push(E(n,e,!0)+" => "+E(t,e))})),z("Map",i.call(e),K,x)}if(function(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var Y=[];return u.call(e,(function(t){Y.push(E(t,e))})),z("Set",l.call(e),Y,x)}if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return M("WeakMap");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return M("WeakSet");if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{return h.call(t),!0}catch(t){}return!1}(e))return M("WeakRef");if(function(t){return!("[object Number]"!==P(t)||k&&"object"==typeof t&&k in t)}(e))return U(E(Number(e)));if(function(t){if(!t||"object"!=typeof t||!g)return!1;try{return g.call(t),!0}catch(t){}return!1}(e))return U(E(g.call(e)));if(function(t){return!("[object Boolean]"!==P(t)||k&&"object"==typeof t&&k in t)}(e))return U(d.call(e));if(function(t){return!("[object String]"!==P(t)||k&&"object"==typeof t&&k in t)}(e))return U(E(String(e)));if(!function(t){return!("[object Date]"!==P(t)||k&&"object"==typeof t&&k in t)}(e)&&!function(t){return!("[object RegExp]"!==P(t)||k&&"object"==typeof t&&k in t)}(e)){var J=$(e,E),Q=T?T(e)===Object.prototype:e instanceof Object||e.constructor===Object,Z=e instanceof Object?"":"null prototype",X=!Q&&k&&Object(e)===e&&k in e?P(e).slice(8,-1):Z?"Object":"",tt=(Q||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(X||Z?"["+[].concat(X||[],Z||[]).join(": ")+"] ":"");return 0===J.length?tt+"{}":x?tt+"{"+F(J,x)+"}":tt+"{ "+J.join(", ")+" }"}return String(e)};var N=Object.prototype.hasOwnProperty||function(t){return t in this};function j(t,e){return N.call(t,e)}function P(t){return v.call(t)}function R(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function L(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return L(t.slice(0,e.maxStringLength),e)+r}return A(t.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,D),"single",e)}function D(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+e.toString(16).toUpperCase()}function U(t){return"Object("+t+")"}function M(t){return t+" { ? }"}function z(t,e,n,r){return t+" ("+e+") {"+(r?F(n,r):n.join(", "))+"}"}function F(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+t.join(","+n)+"\n"+e.prev}function $(t,e){var n=C(t),r=[];if(n){r.length=t.length;for(var o=0;o<t.length;o++)r[o]=j(t,o)?e(t[o],t):""}var i,a="function"==typeof b?b(t):[];if(w){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in t)j(t,c)&&(n&&String(Number(c))===c&&c<t.length||w&&i["$"+c]instanceof Symbol||(/[^\w$]/.test(c)?r.push(e(c,t)+": "+e(t[c],t)):r.push(c+": "+e(t[c],t))));if("function"==typeof b)for(var l=0;l<a.length;l++)x.call(t,a[l])&&r.push("["+e(a[l])+"]: "+e(t[a[l]],t));return r}},8987:function(t,e,n){"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=n(1414),s=Object.prototype.propertyIsEnumerable,c=!s.call({toString:null},"toString"),l=s.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(t){var e=t.constructor;return e&&e.prototype===t},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!f["$"+t]&&o.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{p(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();r=function(t){var e=null!==t&&"object"==typeof t,n="[object Function]"===i.call(t),r=a(t),s=e&&"[object String]"===i.call(t),f=[];if(!e&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var d=l&&n;if(s&&t.length>0&&!o.call(t,0))for(var v=0;v<t.length;++v)f.push(String(v));if(r&&t.length>0)for(var y=0;y<t.length;++y)f.push(String(y));else for(var m in t)d&&"prototype"===m||!o.call(t,m)||f.push(String(m));if(c)for(var g=function(t){if("undefined"==typeof window||!h)return p(t);try{return p(t)}catch(t){return!1}}(t),b=0;b<u.length;++b)g&&"constructor"===u[b]||!o.call(t,u[b])||f.push(u[b]);return f}}t.exports=r},2215:function(t,e,n){"use strict";var r=Array.prototype.slice,o=n(1414),i=Object.keys,a=i?function(t){return i(t)}:n(8987),s=Object.keys;a.shim=function(){return Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return o(t)?s(r.call(t)):s(t)}):Object.keys=a,Object.keys||a},t.exports=a},1414:function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){var n=e.call(t),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),r}},5798:function(t){"use strict";var e=String.prototype.replace,n=/%20/g,r="RFC3986";t.exports={default:r,formatters:{RFC1738:function(t){return e.call(t,n,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:r}},129:function(t,e,n){"use strict";var r=n(8261),o=n(5235),i=n(5798);t.exports={formats:i,parse:o,stringify:r}},5235:function(t,e,n){"use strict";var r=n(2769),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},c=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},l=function(t,e,n,r){if(t){var i=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(i),l=s?i.slice(0,s.index):i,u=[];if(l){if(!n.plainObjects&&o.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var p=0;n.depth>0&&null!==(s=a.exec(i))&&p<n.depth;){if(p+=1,!n.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+i.slice(s.index)+"]"),function(t,e,n,r){for(var o=r?e:c(e,n),i=t.length-1;i>=0;--i){var a,s=t[i];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(l,10);n.parseArrays||""!==l?!isNaN(u)&&s!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[])[u]=o:a[l]=o:a={0:o}}o=a}return o}(u,e,n,r)}};t.exports=function(t,e){var n=function(t){if(!t)return a;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?a.charset:t.charset;return{allowDots:void 0===t.allowDots?a.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:a.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:a.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:a.comma,decoder:"function"==typeof t.decoder?t.decoder:a.decoder,delimiter:"string"==typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:a.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:a.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:a.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:a.strictNullHandling}}(e);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof t?function(t,e){var n,l={},u=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,p=e.parameterLimit===1/0?void 0:e.parameterLimit,f=u.split(e.delimiter,p),h=-1,d=e.charset;if(e.charsetSentinel)for(n=0;n<f.length;++n)0===f[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===f[n]?d="utf-8":"utf8=%26%2310003%3B"===f[n]&&(d="iso-8859-1"),h=n,n=f.length);for(n=0;n<f.length;++n)if(n!==h){var v,y,m=f[n],g=m.indexOf("]="),b=-1===g?m.indexOf("="):g+1;-1===b?(v=e.decoder(m,a.decoder,d,"key"),y=e.strictNullHandling?null:""):(v=e.decoder(m.slice(0,b),a.decoder,d,"key"),y=r.maybeMap(c(m.slice(b+1),e),(function(t){return e.decoder(t,a.decoder,d,"value")}))),y&&e.interpretNumericEntities&&"iso-8859-1"===d&&(y=s(y)),m.indexOf("[]=")>-1&&(y=i(y)?[y]:y),o.call(l,v)?l[v]=r.combine(l[v],y):l[v]=y}return l}(t,n):t,p=n.plainObjects?Object.create(null):{},f=Object.keys(u),h=0;h<f.length;++h){var d=f[h],v=l(d,u[d],n,"string"==typeof t);p=r.merge(p,v,n)}return!0===n.allowSparse?p:r.compact(p)}},8261:function(t,e,n){"use strict";var r=n(7478),o=n(2769),i=n(5798),a=Object.prototype.hasOwnProperty,s={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},c=Array.isArray,l=Array.prototype.push,u=function(t,e){l.apply(t,c(e)?e:[e])},p=Date.prototype.toISOString,f=i.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:f,formatter:i.formatters[f],indices:!1,serializeDate:function(t){return p.call(t)},skipNulls:!1,strictNullHandling:!1},d=function t(e,n,i,a,s,l,p,f,d,v,y,m,g,b,_){var w,x=e;if(_.has(e))throw new RangeError("Cyclic object value");if("function"==typeof p?x=p(n,x):x instanceof Date?x=v(x):"comma"===i&&c(x)&&(x=o.maybeMap(x,(function(t){return t instanceof Date?v(t):t}))),null===x){if(a)return l&&!g?l(n,h.encoder,b,"key",y):n;x=""}if("string"==typeof(w=x)||"number"==typeof w||"boolean"==typeof w||"symbol"==typeof w||"bigint"==typeof w||o.isBuffer(x))return l?[m(g?n:l(n,h.encoder,b,"key",y))+"="+m(l(x,h.encoder,b,"value",y))]:[m(n)+"="+m(String(x))];var T,E=[];if(void 0===x)return E;if("comma"===i&&c(x))T=[{value:x.length>0?x.join(",")||null:void 0}];else if(c(p))T=p;else{var S=Object.keys(x);T=f?S.sort(f):S}for(var k=0;k<T.length;++k){var A=T[k],O="object"==typeof A&&void 0!==A.value?A.value:x[A];if(!s||null!==O){var C=c(x)?"function"==typeof i?i(n,A):n:n+(d?"."+A:"["+A+"]");_.set(e,!0);var I=r();u(E,t(O,C,i,a,s,l,p,f,d,v,y,m,g,b,I))}}return E};t.exports=function(t,e){var n,o=t,l=function(t){if(!t)return h;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||h.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i.default;if(void 0!==t.format){if(!a.call(i.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=i.formatters[n],o=h.filter;return("function"==typeof t.filter||c(t.filter))&&(o=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===t.allowDots?h.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:h.charsetSentinel,delimiter:void 0===t.delimiter?h.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:h.encode,encoder:"function"==typeof t.encoder?t.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:h.encodeValuesOnly,filter:o,format:n,formatter:r,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:h.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:h.strictNullHandling}}(e);"function"==typeof l.filter?o=(0,l.filter)("",o):c(l.filter)&&(n=l.filter);var p,f=[];if("object"!=typeof o||null===o)return"";p=e&&e.arrayFormat in s?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var v=s[p];n||(n=Object.keys(o)),l.sort&&n.sort(l.sort);for(var y=r(),m=0;m<n.length;++m){var g=n[m];l.skipNulls&&null===o[g]||u(f,d(o[g],g,v,l.strictNullHandling,l.skipNulls,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,y))}var b=f.join(l.delimiter),_=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),b.length>0?_+b:""}},2769:function(t,e,n){"use strict";var r=n(5798),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),s=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)void 0!==t[r]&&(n[r]=t[r]);return n};t.exports={arrayToObject:s,assign:function(t,e){return Object.keys(e).reduce((function(t,n){return t[n]=e[n],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r<e.length;++r)for(var o=e[r],a=o.obj[o.prop],s=Object.keys(a),c=0;c<s.length;++c){var l=s[c],u=a[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(e.push({obj:a,prop:l}),n.push(u))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(i(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(t){return r}},encode:function(t,e,n,o,i){if(0===t.length)return t;var s=t;if("symbol"==typeof t?s=Symbol.prototype.toString.call(t):"string"!=typeof t&&(s=String(t)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var c="",l=0;l<s.length;++l){var u=s.charCodeAt(l);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===r.RFC1738&&(40===u||41===u)?c+=s.charAt(l):u<128?c+=a[u]:u<2048?c+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?c+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(l+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(l)),c+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return c},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(i(t)){for(var n=[],r=0;r<t.length;r+=1)n.push(e(t[r]));return n}return e(t)},merge:function t(e,n,r){if(!n)return e;if("object"!=typeof n){if(i(e))e.push(n);else{if(!e||"object"!=typeof e)return[e,n];(r&&(r.plainObjects||r.allowPrototypes)||!o.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(n);var a=e;return i(e)&&!i(n)&&(a=s(e,r)),i(e)&&i(n)?(n.forEach((function(n,i){if(o.call(e,i)){var a=e[i];a&&"object"==typeof a&&n&&"object"==typeof n?e[i]=t(a,n,r):e.push(n)}else e[i]=n})),e):Object.keys(n).reduce((function(e,i){var a=n[i];return o.call(e,i)?e[i]=t(e[i],a,r):e[i]=a,e}),a)}}},7478:function(t,e,n){"use strict";var r=n(210),o=n(1924),i=n(631),a=r("%TypeError%"),s=r("%WeakMap%",!0),c=r("%Map%",!0),l=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),p=o("WeakMap.prototype.has",!0),f=o("Map.prototype.get",!0),h=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),v=function(t,e){for(var n,r=t;null!==(n=r.next);r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n};t.exports=function(){var t,e,n,r={assert:function(t){if(!r.has(t))throw new a("Side channel does not contain "+i(t))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(t)return l(t,r)}else if(c){if(e)return f(e,r)}else if(n)return function(t,e){var n=v(t,e);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(t)return p(t,r)}else if(c){if(e)return d(e,r)}else if(n)return function(t,e){return!!v(t,e)}(n,r);return!1},set:function(r,o){s&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new s),u(t,r,o)):c?(e||(e=new c),h(e,r,o)):(n||(n={key:{},next:null}),function(t,e,n){var r=v(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}}(n,r,o))}};return r}},1839:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,n=t.Symbol;if("function"==typeof n)if(n.observable)e=n.observable;else{e=n.for("https://github.com/benlesh/symbol-observable");try{n.observable=e}catch(t){}}else e="@@observable";return e}},868:function(t,e,n){t.exports=n(1839)},3813:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.NO_IL=e.NO=e.MemoryStream=e.Stream=void 0;var i=n(868),a=n(2503),s=i.default(a.getPolyfill()),c={};function l(){}function u(t){for(var e=t.length,n=Array(e),r=0;r<e;++r)n[r]=t[r];return n}function p(t,e,n){try{return t.f(e)}catch(t){return n._e(t),c}}e.NO=c;var f={_n:l,_e:l,_c:l};function h(t){t._start=function(t){t.next=t._n,t.error=t._e,t.complete=t._c,this.start(t)},t._stop=t.stop}e.NO_IL=f;var d=function(){function t(t,e){this._stream=t,this._listener=e}return t.prototype.unsubscribe=function(){this._stream._remove(this._listener)},t}(),v=function(){function t(t){this._listener=t}return t.prototype.next=function(t){this._listener._n(t)},t.prototype.error=function(t){this._listener._e(t)},t.prototype.complete=function(){this._listener._c()},t}(),y=function(){function t(t){this.type="fromObservable",this.ins=t,this.active=!1}return t.prototype._start=function(t){this.out=t,this.active=!0,this._sub=this.ins.subscribe(new v(t)),this.active||this._sub.unsubscribe()},t.prototype._stop=function(){this._sub&&this._sub.unsubscribe(),this.active=!1},t}(),m=function(){function t(t){this.type="merge",this.insArr=t,this.out=c,this.ac=0}return t.prototype._start=function(t){this.out=t;var e=this.insArr,n=e.length;this.ac=n;for(var r=0;r<n;r++)e[r]._add(this)},t.prototype._stop=function(){for(var t=this.insArr,e=t.length,n=0;n<e;n++)t[n]._remove(this);this.out=c},t.prototype._n=function(t){var e=this.out;e!==c&&e._n(t)},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){if(--this.ac<=0){var t=this.out;if(t===c)return;t._c()}},t}(),g=function(){function t(t,e,n){this.i=t,this.out=e,this.p=n,n.ils.push(this)}return t.prototype._n=function(t){var e=this.p,n=this.out;if(n!==c&&e.up(t,this.i)){var r=u(e.vals);n._n(r)}},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.p;t.out!==c&&0==--t.Nc&&t.out._c()},t}(),b=function(){function t(t){this.type="combine",this.insArr=t,this.out=c,this.ils=[],this.Nc=this.Nn=0,this.vals=[]}return t.prototype.up=function(t,e){var n=this.vals[e],r=this.Nn?n===c?--this.Nn:this.Nn:0;return this.vals[e]=t,0===r},t.prototype._start=function(t){this.out=t;var e=this.insArr,n=this.Nc=this.Nn=e.length,r=this.vals=new Array(n);if(0===n)t._n([]),t._c();else for(var o=0;o<n;o++)r[o]=c,e[o]._add(new g(o,t,this))},t.prototype._stop=function(){for(var t=this.insArr,e=t.length,n=this.ils,r=0;r<e;r++)t[r]._remove(n[r]);this.out=c,this.ils=[],this.vals=[]},t}(),_=function(){function t(t){this.type="fromArray",this.a=t}return t.prototype._start=function(t){for(var e=this.a,n=0,r=e.length;n<r;n++)t._n(e[n]);t._c()},t.prototype._stop=function(){},t}(),w=function(){function t(t){this.type="fromPromise",this.on=!1,this.p=t}return t.prototype._start=function(t){var e=this;this.on=!0,this.p.then((function(n){e.on&&(t._n(n),t._c())}),(function(e){t._e(e)})).then(l,(function(t){setTimeout((function(){throw t}))}))},t.prototype._stop=function(){this.on=!1},t}(),x=function(){function t(t){this.type="periodic",this.period=t,this.intervalID=-1,this.i=0}return t.prototype._start=function(t){var e=this;this.intervalID=setInterval((function(){t._n(e.i++)}),this.period)},t.prototype._stop=function(){-1!==this.intervalID&&clearInterval(this.intervalID),this.intervalID=-1,this.i=0},t}(),T=function(){function t(t,e){this.type="debug",this.ins=t,this.out=c,this.s=l,this.l="","string"==typeof e?this.l=e:"function"==typeof e&&(this.s=e)}return t.prototype._start=function(t){this.out=t,this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c},t.prototype._n=function(t){var e=this.out;if(e!==c){var n=this.s,r=this.l;if(n!==l)try{n(t)}catch(t){e._e(t)}else r?console.log(r+":",t):console.log(t);e._n(t)}},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.out;t!==c&&t._c()},t}(),E=function(){function t(t,e){this.type="drop",this.ins=e,this.out=c,this.max=t,this.dropped=0}return t.prototype._start=function(t){this.out=t,this.dropped=0,this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c},t.prototype._n=function(t){var e=this.out;e!==c&&this.dropped++>=this.max&&e._n(t)},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.out;t!==c&&t._c()},t}(),S=function(){function t(t,e){this.out=t,this.op=e}return t.prototype._n=function(){this.op.end()},t.prototype._e=function(t){this.out._e(t)},t.prototype._c=function(){this.op.end()},t}(),k=function(){function t(t,e){this.type="endWhen",this.ins=e,this.out=c,this.o=t,this.oil=f}return t.prototype._start=function(t){this.out=t,this.o._add(this.oil=new S(t,this)),this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.o._remove(this.oil),this.out=c,this.oil=f},t.prototype.end=function(){var t=this.out;t!==c&&t._c()},t.prototype._n=function(t){var e=this.out;e!==c&&e._n(t)},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){this.end()},t}(),A=function(){function t(t,e){this.type="filter",this.ins=e,this.out=c,this.f=t}return t.prototype._start=function(t){this.out=t,this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c},t.prototype._n=function(t){var e=this.out;if(e!==c){var n=p(this,t,e);n!==c&&n&&e._n(t)}},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.out;t!==c&&t._c()},t}(),O=function(){function t(t,e){this.out=t,this.op=e}return t.prototype._n=function(t){this.out._n(t)},t.prototype._e=function(t){this.out._e(t)},t.prototype._c=function(){this.op.inner=c,this.op.less()},t}(),C=function(){function t(t){this.type="flatten",this.ins=t,this.out=c,this.open=!0,this.inner=c,this.il=f}return t.prototype._start=function(t){this.out=t,this.open=!0,this.inner=c,this.il=f,this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.inner!==c&&this.inner._remove(this.il),this.out=c,this.open=!0,this.inner=c,this.il=f},t.prototype.less=function(){var t=this.out;t!==c&&(this.open||this.inner!==c||t._c())},t.prototype._n=function(t){var e=this.out;if(e!==c){var n=this.inner,r=this.il;n!==c&&r!==f&&n._remove(r),(this.inner=t)._add(this.il=new O(e,this))}},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){this.open=!1,this.less()},t}(),I=function(){function t(t,e,n){var r=this;this.type="fold",this.ins=n,this.out=c,this.f=function(e){return t(r.acc,e)},this.acc=this.seed=e}return t.prototype._start=function(t){this.out=t,this.acc=this.seed,t._n(this.acc),this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c,this.acc=this.seed},t.prototype._n=function(t){var e=this.out;if(e!==c){var n=p(this,t,e);n!==c&&e._n(this.acc=n)}},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.out;t!==c&&t._c()},t}(),N=function(){function t(t){this.type="last",this.ins=t,this.out=c,this.has=!1,this.val=c}return t.prototype._start=function(t){this.out=t,this.has=!1,this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c,this.val=c},t.prototype._n=function(t){this.has=!0,this.val=t},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.out;t!==c&&(this.has?(t._n(this.val),t._c()):t._e(new Error("last() failed because input stream completed")))},t}(),j=function(){function t(t,e){this.type="map",this.ins=e,this.out=c,this.f=t}return t.prototype._start=function(t){this.out=t,this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c},t.prototype._n=function(t){var e=this.out;if(e!==c){var n=p(this,t,e);n!==c&&e._n(n)}},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.out;t!==c&&t._c()},t}(),P=function(){function t(t){this.type="remember",this.ins=t,this.out=c}return t.prototype._start=function(t){this.out=t,this.ins._add(t)},t.prototype._stop=function(){this.ins._remove(this.out),this.out=c},t}(),R=function(){function t(t,e){this.type="replaceError",this.ins=e,this.out=c,this.f=t}return t.prototype._start=function(t){this.out=t,this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c},t.prototype._n=function(t){var e=this.out;e!==c&&e._n(t)},t.prototype._e=function(t){var e=this.out;if(e!==c)try{this.ins._remove(this),(this.ins=this.f(t))._add(this)}catch(t){e._e(t)}},t.prototype._c=function(){var t=this.out;t!==c&&t._c()},t}(),L=function(){function t(t,e){this.type="startWith",this.ins=t,this.out=c,this.val=e}return t.prototype._start=function(t){this.out=t,this.out._n(this.val),this.ins._add(t)},t.prototype._stop=function(){this.ins._remove(this.out),this.out=c},t}(),D=function(){function t(t,e){this.type="take",this.ins=e,this.out=c,this.max=t,this.taken=0}return t.prototype._start=function(t){this.out=t,this.taken=0,this.max<=0?t._c():this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c},t.prototype._n=function(t){var e=this.out;if(e!==c){var n=++this.taken;n<this.max?e._n(t):n===this.max&&(e._n(t),e._c())}},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.out;t!==c&&t._c()},t}(),U=function(){function t(t){this._prod=t||c,this._ils=[],this._stopID=c,this._dl=c,this._d=!1,this._target=null,this._err=c}return t.prototype._n=function(t){var e=this._ils,n=e.length;if(this._d&&this._dl._n(t),1==n)e[0]._n(t);else{if(0==n)return;for(var r=u(e),o=0;o<n;o++)r[o]._n(t)}},t.prototype._e=function(t){if(this._err===c){this._err=t;var e=this._ils,n=e.length;if(this._x(),this._d&&this._dl._e(t),1==n)e[0]._e(t);else{if(0==n)return;for(var r=u(e),o=0;o<n;o++)r[o]._e(t)}if(!this._d&&0==n)throw this._err}},t.prototype._c=function(){var t=this._ils,e=t.length;if(this._x(),this._d&&this._dl._c(),1==e)t[0]._c();else{if(0==e)return;for(var n=u(t),r=0;r<e;r++)n[r]._c()}},t.prototype._x=function(){0!==this._ils.length&&(this._prod!==c&&this._prod._stop(),this._err=c,this._ils=[])},t.prototype._stopNow=function(){this._prod._stop(),this._err=c,this._stopID=c},t.prototype._add=function(t){var e=this._target;if(e)return e._add(t);var n=this._ils;if(n.push(t),!(n.length>1))if(this._stopID!==c)clearTimeout(this._stopID),this._stopID=c;else{var r=this._prod;r!==c&&r._start(this)}},t.prototype._remove=function(t){var e=this,n=this._target;if(n)return n._remove(t);var r=this._ils,o=r.indexOf(t);o>-1&&(r.splice(o,1),this._prod!==c&&r.length<=0?(this._err=c,this._stopID=setTimeout((function(){return e._stopNow()}))):1===r.length&&this._pruneCycles())},t.prototype._pruneCycles=function(){this._hasNoSinks(this,[])&&this._remove(this._ils[0])},t.prototype._hasNoSinks=function(t,e){if(-1!==e.indexOf(t))return!0;if(t.out===this)return!0;if(t.out&&t.out!==c)return this._hasNoSinks(t.out,e.concat(t));if(t._ils){for(var n=0,r=t._ils.length;n<r;n++)if(!this._hasNoSinks(t._ils[n],e.concat(t)))return!1;return!0}return!1},t.prototype.ctor=function(){return this instanceof M?M:t},t.prototype.addListener=function(t){t._n=t.next||l,t._e=t.error||l,t._c=t.complete||l,this._add(t)},t.prototype.removeListener=function(t){this._remove(t)},t.prototype.subscribe=function(t){return this.addListener(t),new d(this,t)},t.prototype[s]=function(){return this},t.create=function(e){if(e){if("function"!=typeof e.start||"function"!=typeof e.stop)throw new Error("producer requires both start and stop functions");h(e)}return new t(e)},t.createWithMemory=function(t){return t&&h(t),new M(t)},t.never=function(){return new t({_start:l,_stop:l})},t.empty=function(){return new t({_start:function(t){t._c()},_stop:l})},t.throw=function(e){return new t({_start:function(t){t._e(e)},_stop:l})},t.from=function(e){if("function"==typeof e[s])return t.fromObservable(e);if("function"==typeof e.then)return t.fromPromise(e);if(Array.isArray(e))return t.fromArray(e);throw new TypeError("Type of input to from() must be an Array, Promise, or Observable")},t.of=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.fromArray(e)},t.fromArray=function(e){return new t(new _(e))},t.fromPromise=function(e){return new t(new w(e))},t.fromObservable=function(e){if(void 0!==e.endWhen)return e;var n="function"==typeof e[s]?e[s]():e;return new t(new y(n))},t.periodic=function(e){return new t(new x(e))},t.prototype._map=function(t){return new(this.ctor())(new j(t,this))},t.prototype.map=function(t){return this._map(t)},t.prototype.mapTo=function(t){var e=this.map((function(){return t}));return e._prod.type="mapTo",e},t.prototype.filter=function(e){var n,r,o=this._prod;return new t(o instanceof A?new A((n=o.f,r=e,function(t){return n(t)&&r(t)}),o.ins):new A(e,this))},t.prototype.take=function(t){return new(this.ctor())(new D(t,this))},t.prototype.drop=function(e){return new t(new E(e,this))},t.prototype.last=function(){return new t(new N(this))},t.prototype.startWith=function(t){return new M(new L(this,t))},t.prototype.endWhen=function(t){return new(this.ctor())(new k(t,this))},t.prototype.fold=function(t,e){return new M(new I(t,e,this))},t.prototype.replaceError=function(t){return new(this.ctor())(new R(t,this))},t.prototype.flatten=function(){return new t(new C(this))},t.prototype.compose=function(t){return t(this)},t.prototype.remember=function(){return new M(new P(this))},t.prototype.debug=function(t){return new(this.ctor())(new T(this,t))},t.prototype.imitate=function(t){if(t instanceof M)throw new Error("A MemoryStream was given to imitate(), but it only supports a Stream. Read more about this restriction here: https://github.com/staltz/xstream#faq");this._target=t;for(var e=this._ils,n=e.length,r=0;r<n;r++)t._add(e[r]);this._ils=[]},t.prototype.shamefullySendNext=function(t){this._n(t)},t.prototype.shamefullySendError=function(t){this._e(t)},t.prototype.shamefullySendComplete=function(){this._c()},t.prototype.setDebugListener=function(t){t?(this._d=!0,t._n=t.next||l,t._e=t.error||l,t._c=t.complete||l,this._dl=t):(this._d=!1,this._dl=c)},t.merge=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new t(new m(e))},t.combine=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new t(new b(e))},t}();e.Stream=U;var M=function(t){function e(e){var n=t.call(this,e)||this;return n._has=!1,n}return o(e,t),e.prototype._n=function(e){this._v=e,this._has=!0,t.prototype._n.call(this,e)},e.prototype._add=function(t){var e=this._target;if(e)return e._add(t);var n=this._ils;if(n.push(t),n.length>1)this._has&&t._n(this._v);else if(this._stopID!==c)this._has&&t._n(this._v),clearTimeout(this._stopID),this._stopID=c;else if(this._has)t._n(this._v);else{var r=this._prod;r!==c&&r._start(this)}},e.prototype._stopNow=function(){this._has=!1,t.prototype._stopNow.call(this)},e.prototype._x=function(){this._has=!1,t.prototype._x.call(this)},e.prototype.map=function(t){return this._map(t)},e.prototype.mapTo=function(e){return t.prototype.mapTo.call(this,e)},e.prototype.take=function(e){return t.prototype.take.call(this,e)},e.prototype.endWhen=function(e){return t.prototype.endWhen.call(this,e)},e.prototype.replaceError=function(e){return t.prototype.replaceError.call(this,e)},e.prototype.remember=function(){return this},e.prototype.debug=function(e){return t.prototype.debug.call(this,e)},e}(U);e.MemoryStream=M;var z=U;e.default=z},4654:function(){}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{API:function(){return Fh},AgentInfo:function(){return id},Chat:function(){return Dc},ChatFrame:function(){return pf},ComponentFilter:function(){return kp},Conversation:function(){return Op},DeprecatedToggleButton:function(){return sd},DeprecatedView:function(){return hd},Engine:function(){return Xh},EntryContainer:function(){return Zp},EventParticipant:function(){return Gc},ExternalApi:function(){return od},Header:function(){return ad},Icon:function(){return ds},Interrupt:function(){return Uc},MessageContainer:function(){return Zc},SeamlyApiContext:function(){return ti},SeamlyEventBusContext:function(){return ei},SeamlyGeneralError:function(){return ca},SeamlyLiveRegionContext:function(){return Ia},SeamlyOfflineError:function(){return ua},StoreProvider:function(){return ke},Text:function(){return pu},View:function(){return bf},calculateVisibility:function(){return co},className:function(){return Xo},createReduxStore:function(){return Me},default:function(){return dd},eventTypes:function(){return kn},getUrlParams:function(){return pn},getUrlSearchString:function(){return fn},randomId:function(){return Jt},seamlyActions:function(){return Bn},useChoicePrompt:function(){return nl},useDispatch:function(){return ai},useEvents:function(){return mo},useGeneratedId:function(){return na},useI18n:function(){return Oi},useSeamlyChat:function(){return Ba},useSeamlyCommands:function(){return Ca},useSeamlyConfig:function(){return He},useSeamlyEventStream:function(){return Za},useSeamlyIdleDetachCountdown:function(){return Ya},useSeamlyMessageContainerClassNames:function(){return ci},useSeamlyOptions:function(){return Vi},useSeamlyVisibility:function(){return _a},useTranslatedEventData:function(){return ss},useTranslations:function(){return as},useTranslationsContainer:function(){return cs},visibilityStates:function(){return ye}}),n(2698);var t=n(1511),e=n.n(t),o=n(4103),i=n.n(o),a=n(4310),s=n.n(a),c=n(4074),l=n.n(c),u=n(9649),p=n.n(u),f=n(368),h=n.n(f),d=n(3978),v=n.n(d),y=n(4341);function m(t,e,n){return e in t?y(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=n(2991),b=n.n(g),_=n(116),w=n.n(_),x=n(8914),T=n.n(x),E=n(455),S=n.n(E),k=n(7149),A=n.n(k),O=n(6295),C=n.n(O),I=n(6902),N=n.n(I),j=n(3263),P=n(5683),R=n(9356);function L(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=R(t);for(r=0;r<i.length;r++)n=i[r],P(e).call(e,n)>=0||(o[n]=t[n]);return o}(t,e);if(j){var i=j(t);for(r=0;r<i.length;r++)n=i[r],P(e).call(e,n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var D,U,M,z,F,$,B,H={},V=[],q=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function W(t,e){for(var n in e)t[n]=e[n];return t}function G(t){var e=t.parentNode;e&&e.removeChild(t)}function K(t,e,n,r,o){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++M:o};return null==o&&null!=U.vnode&&U.vnode(i),i}function Y(t){return t.children}function J(t,e){this.props=t,this.context=e}function Q(t,e){if(null==e)return t.__?Q(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?Q(t):null}function Z(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return Z(t)}}function X(t){(!t.__d&&(t.__d=!0)&&z.push(t)&&!tt.__r++||$!==U.debounceRendering)&&(($=U.debounceRendering)||F)(tt)}function tt(){for(var t;tt.__r=z.length;)t=z.sort((function(t,e){return t.__v.__b-e.__v.__b})),z=[],t.some((function(t){var e,n,r,o,i,a;t.__d&&(i=(o=(e=t).__v).__e,(a=e.__P)&&(n=[],(r=W({},o)).__v=o.__v+1,lt(a,o,r,e.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,n,null==i?Q(o):i,o.__h),ut(n,o),o.__e!=i&&Z(o)))}))}function et(t,e,n,r,o,i,a,s,c,l){var u,p,f,h,d,v,y,m=r&&r.__k||V,g=m.length;for(n.__k=[],u=0;u<e.length;u++)if(null!=(h=n.__k[u]=null==(h=e[u])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?K(null,h,null,null,h):Array.isArray(h)?K(Y,{children:h},null,null,null):h.__b>0?K(h.type,h.props,h.key,null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(f=m[u])||f&&h.key==f.key&&h.type===f.type)m[u]=void 0;else for(p=0;p<g;p++){if((f=m[p])&&h.key==f.key&&h.type===f.type){m[p]=void 0;break}f=null}lt(t,h,f=f||H,o,i,a,s,c,l),d=h.__e,(p=h.ref)&&f.ref!=p&&(y||(y=[]),f.ref&&y.push(f.ref,null,h),y.push(p,h.__c||d,h)),null!=d?(null==v&&(v=d),"function"==typeof h.type&&h.__k===f.__k?h.__d=c=nt(h,c,t):c=ot(t,h,f,m,d,c),"function"==typeof n.type&&(n.__d=c)):c&&f.__e==c&&c.parentNode!=t&&(c=Q(f))}for(n.__e=v,u=g;u--;)null!=m[u]&&("function"==typeof n.type&&null!=m[u].__e&&m[u].__e==n.__d&&(n.__d=Q(r,u+1)),ht(m[u],m[u]));if(y)for(u=0;u<y.length;u++)ft(y[u],y[++u],y[++u])}function nt(t,e,n){for(var r,o=t.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=t,e="function"==typeof r.type?nt(r,e,n):ot(n,r,r,o,r.__e,e));return e}function rt(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){rt(t,e)})):e.push(t)),e}function ot(t,e,n,r,o,i){var a,s,c;if(void 0!==e.__d)a=e.__d,e.__d=void 0;else if(null==n||o!=i||null==o.parentNode)t:if(null==i||i.parentNode!==t)t.appendChild(o),a=null;else{for(s=i,c=0;(s=s.nextSibling)&&c<r.length;c+=2)if(s==o)break t;t.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function it(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||q.test(e)?n:n+"px"}function at(t,e,n,r,o){var i;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||it(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||it(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r||t.addEventListener(e,i?ct:st,i):t.removeEventListener(e,i?ct:st,i);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null!=n&&(!1!==n||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,n):t.removeAttribute(e))}}function st(t){this.l[t.type+!1](U.event?U.event(t):t)}function ct(t){this.l[t.type+!0](U.event?U.event(t):t)}function lt(t,e,n,r,o,i,a,s,c){var l,u,p,f,h,d,v,y,m,g,b,_=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(c=n.__h,s=e.__e=n.__e,e.__h=null,i=[s]),(l=U.__b)&&l(e);try{t:if("function"==typeof _){if(y=e.props,m=(l=_.contextType)&&r[l.__c],g=l?m?m.props.value:l.__:r,n.__c?v=(u=e.__c=n.__c).__=u.__E:("prototype"in _&&_.prototype.render?e.__c=u=new _(y,g):(e.__c=u=new J(y,g),u.constructor=_,u.render=dt),m&&m.sub(u),u.props=y,u.state||(u.state={}),u.context=g,u.__n=r,p=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=_.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=W({},u.__s)),W(u.__s,_.getDerivedStateFromProps(y,u.__s))),f=u.props,h=u.state,p)null==_.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==_.getDerivedStateFromProps&&y!==f&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(y,g),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(y,u.__s,g)||e.__v===n.__v){u.props=y,u.state=u.__s,e.__v!==n.__v&&(u.__d=!1),u.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),u.__h.length&&a.push(u);break t}null!=u.componentWillUpdate&&u.componentWillUpdate(y,u.__s,g),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(f,h,d)}))}u.context=g,u.props=y,u.state=u.__s,(l=U.__r)&&l(e),u.__d=!1,u.__v=e,u.__P=t,l=u.render(u.props,u.state,u.context),u.state=u.__s,null!=u.getChildContext&&(r=W(W({},r),u.getChildContext())),p||null==u.getSnapshotBeforeUpdate||(d=u.getSnapshotBeforeUpdate(f,h)),b=null!=l&&l.type===Y&&null==l.key?l.props.children:l,et(t,Array.isArray(b)?b:[b],e,n,r,o,i,a,s,c),u.base=e.__e,e.__h=null,u.__h.length&&a.push(u),v&&(u.__E=u.__=null),u.__e=!1}else null==i&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=pt(n.__e,e,n,r,o,i,a,c);(l=U.diffed)&&l(e)}catch(t){e.__v=null,(c||null!=i)&&(e.__e=s,e.__h=!!c,i[i.indexOf(s)]=null),U.__e(t,e,n)}}function ut(t,e){U.__c&&U.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){U.__e(t,e.__v)}}))}function pt(t,e,n,r,o,i,a,s){var c,l,u,p=n.props,f=e.props,h=e.type,d=0;if("svg"===h&&(o=!0),null!=i)for(;d<i.length;d++)if((c=i[d])&&"setAttribute"in c==!!h&&(h?c.localName===h:3===c.nodeType)){t=c,i[d]=null;break}if(null==t){if(null===h)return document.createTextNode(f);t=o?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,f.is&&f),i=null,s=!1}if(null===h)p===f||s&&t.data===f||(t.data=f);else{if(i=i&&D.call(t.childNodes),l=(p=n.props||H).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!s){if(null!=i)for(p={},d=0;d<t.attributes.length;d++)p[t.attributes[d].name]=t.attributes[d].value;(u||l)&&(u&&(l&&u.__html==l.__html||u.__html===t.innerHTML)||(t.innerHTML=u&&u.__html||""))}if(function(t,e,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in e||at(t,i,null,n[i],r);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===e[i]||at(t,i,e[i],n[i],r)}(t,f,p,o,s),u)e.__k=[];else if(d=e.props.children,et(t,Array.isArray(d)?d:[d],e,n,r,o&&"foreignObject"!==h,i,a,i?i[0]:n.__k&&Q(n,0),s),null!=i)for(d=i.length;d--;)null!=i[d]&&G(i[d]);s||("value"in f&&void 0!==(d=f.value)&&(d!==t.value||"progress"===h&&!d||"option"===h&&d!==p.value)&&at(t,"value",d,p.value,!1),"checked"in f&&void 0!==(d=f.checked)&&d!==t.checked&&at(t,"checked",d,p.checked,!1))}return t}function ft(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){U.__e(t,n)}}function ht(t,e,n){var r,o;if(U.unmount&&U.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||ft(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){U.__e(t,e)}r.base=r.__P=null}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&ht(r[o],e,"function"!=typeof t.type);n||null==t.__e||G(t.__e),t.__e=t.__d=void 0}function dt(t,e,n){return this.constructor(t,n)}function vt(t,e,n){var r,o,i;U.__&&U.__(t,e),o=(r="function"==typeof n)?null:n&&n.__k||e.__k,i=[],lt(e,t=(!r&&n||e).__k=function(t,e,n){var r,o,i,a={};for(i in e)"key"==i?r=e[i]:"ref"==i?o=e[i]:a[i]=e[i];if(arguments.length>2&&(a.children=arguments.length>3?D.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(i in t.defaultProps)void 0===a[i]&&(a[i]=t.defaultProps[i]);return K(t,a,r,o,null)}(Y,null,[t]),o||H,H,void 0!==e.ownerSVGElement,!r&&n?[n]:o?null:e.firstChild?D.call(e.childNodes):null,i,!r&&n?n:o?o.__e:e.firstChild,r),ut(i,t)}function yt(t,e){var n={__c:e="__cC"+B++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(X)},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}D=V.slice,U={__e:function(t,e){for(var n,r,o;e=e.__;)if((n=e.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(t)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(t),o=n.__d),o)return n.__E=n}catch(e){t=e}throw t}},M=0,J.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=W({},this.state),"function"==typeof t&&(t=t(W({},n),this.props)),t&&W(n,t),null!=t&&this.__v&&(e&&this.__h.push(e),X(this))},J.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),X(this))},J.prototype.render=Y,z=[],F="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tt.__r=0,B=0;var mt,gt,bt,_t=n(679),wt=n.n(_t),xt=0,Tt=[],Et=U.__b,St=U.__r,kt=U.diffed,At=U.__c,Ot=U.unmount;function Ct(t,e){U.__h&&U.__h(gt,t,xt||e),xt=0;var n=gt.__H||(gt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function It(t){return xt=1,Nt(Ht,t)}function Nt(t,e,n){var r=Ct(mt++,2);return r.t=t,r.__c||(r.__=[n?n(e):Ht(void 0,e),function(t){var e=r.t(r.__[0],t);r.__[0]!==e&&(r.__=[e,r.__[1]],r.__c.setState({}))}],r.__c=gt),r.__}function jt(t,e){var n=Ct(mt++,3);!U.__s&&Bt(n.__H,e)&&(n.__=t,n.__H=e,gt.__H.__h.push(n))}function Pt(t,e){var n=Ct(mt++,4);!U.__s&&Bt(n.__H,e)&&(n.__=t,n.__H=e,gt.__h.push(n))}function Rt(t){return xt=5,Lt((function(){return{current:t}}),[])}function Lt(t,e){var n=Ct(mt++,7);return Bt(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Dt(t,e){return xt=8,Lt((function(){return t}),e)}function Ut(t){var e=gt.context[t.__c],n=Ct(mt++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(gt)),e.props.value):t.__}function Mt(){for(var t;t=Tt.shift();)if(t.__P)try{t.__H.__h.forEach(Ft),t.__H.__h.forEach($t),t.__H.__h=[]}catch(e){t.__H.__h=[],U.__e(e,t.__v)}}U.__b=function(t){gt=null,Et&&Et(t)},U.__r=function(t){St&&St(t),mt=0;var e=(gt=t.__c).__H;e&&(e.__h.forEach(Ft),e.__h.forEach($t),e.__h=[])},U.diffed=function(t){kt&&kt(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==Tt.push(e)&&bt===U.requestAnimationFrame||((bt=U.requestAnimationFrame)||function(t){var e,n=function(){clearTimeout(r),zt&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);zt&&(e=requestAnimationFrame(n))})(Mt)),gt=null},U.__c=function(t,e){e.some((function(t){try{t.__h.forEach(Ft),t.__h=t.__h.filter((function(t){return!t.__||$t(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],U.__e(n,t.__v)}})),At&&At(t,e)},U.unmount=function(t){Ot&&Ot(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{Ft(t)}catch(t){e=t}})),e&&U.__e(e,n.__v))};var zt="function"==typeof requestAnimationFrame;function Ft(t){var e=gt,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),gt=e}function $t(t){var e=gt;t.__c=t.__(),gt=e}function Bt(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function Ht(t,e){return"function"==typeof e?e(t):e}var Vt=n(1942),qt=n.n(Vt),Wt=n(3649),Gt=n.n(Wt),Kt=n(1128),Yt=n.n(Kt);function Jt(){var t;return"_"+(Number(Gt()(t=String(Math.random())).call(t,2))+Yt()()+Math.round(performance.now())).toString(36)}function Qt(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}const Zt="//";function Xt(t,e,n="/"){return(r,...o)=>e(t+n+r,...o)}function te(t,e=(t=>({payload:t}))){const n=(...n)=>function(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Qt(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Qt(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}({type:t},e(...n));return n.toString=()=>String(t),n.match=e=>(null==e?void 0:e.type)===String(t),n}function ee(t,...e){const n=[];T()(e).call(e,(t=>{var e;const r=typeof t;if("string"===r)return n.push([t]);"object"!==r||t instanceof Array||T()(e=N()(t)).call(e,(e=>n.push([e,t[e]])))}));const r=Xt(t,te,"/");return b()(n).call(n,(t=>r(...t)))}function ne(t,e){const[n,r,o]=ee(t,{pending:(t,e)=>({meta:{arg:t,requestId:e,status:"pending"}}),fulfilled:(t,e,n)=>({payload:e,meta:{arg:t,requestId:n,status:"fulfilled"}}),rejected:(t,e,n)=>({error:e,meta:{arg:t,requestId:n,status:"rejected",error:String(e)}})});return qt()((i=>(a,s,c)=>{const l=Jt(),u=(async()=>{let t;try{a(n(i,l));const o=e(i,{dispatch:a,getState:s,extra:c}),u=await o;t=r(i,u,l)}catch(e){t=o(i,e,l)}return a(t),t})();return qt()(u,{type:t,arg:i,requestId:l})}),{type:t,pending:n,fulfilled:r,rejected:o})}function re(t){return{createAction:Xt(t,te,Zt),createActions:Xt(t,ee,Zt),createThunk:Xt(t,ne,Zt),createReducer:(e,n)=>function(t,e={},n){const r=(t=n,r)=>{const o=null==e?void 0:e[null==r?void 0:r.type];return o?o(t,r):t};return r.toString=()=>t,r}(t,e,n),selectState:e=>e[t]}}const{createAction:oe,createThunk:ie,createReducer:ae,selectState:se}=re("config"),ce=oe("initialize",(t=>({config:t}))),le=oe("update",(t=>({config:t}))),ue=oe("setPreChatEvents",(t=>({events:t})));function pe(t,e){return t===e}function fe(t,e,n){if(null===e||null===n||e.length!==n.length)return!1;for(var r=e.length,o=0;o<r;o++)if(!t(e[o],n[o]))return!1;return!0}function he(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every((function(t){return"function"==typeof t}))){var n=e.map((function(t){return typeof t})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return e}var de=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function(){for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];var i=0,a=r.pop(),s=he(r),c=t.apply(void 0,[function(){return i++,a.apply(null,arguments)}].concat(n)),l=t((function(){for(var t=[],e=s.length,n=0;n<e;n++)t.push(s[n].apply(null,arguments));return c.apply(null,t)}));return l.resultFunc=a,l.dependencies=s,l.recomputations=function(){return i},l.resetRecomputations=function(){return i=0},l}}((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pe,n=null,r=null;return function(){return fe(e,n,arguments)||(r=t.apply(null,arguments)),n=arguments,r}}));const ve="visibility",ye={hidden:"hidden",minimized:"minimized",open:"open",initialize:null};function me(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ge(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=me(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=me(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const be=de(se,(t=>{let e=ge({visible:"inline"===(null==t?void 0:t.layoutMode)?ye.open:ye.minimized,appContainerClassNames:t.appContainerClassNames||[]},t);return"function"==typeof e.appContainerClassNames&&(e=ge(ge({},e),{},{appContainerClassNames:e.appContainerClassNames(e)})),e})),_e=yt(void 0);var we=_e;const{Provider:xe,Consumer:Te}=_e;var Ee=0;function Se(t,e,n,r,o){var i,a,s={};for(a in e)"ref"==a?i=e[a]:s[a]=e[a];var c={type:t,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Ee,__source:r,__self:o};if("function"==typeof t&&(i=t.defaultProps))for(a in i)void 0===s[a]&&(s[a]=i[a]);return U.vnode&&U.vnode(c),c}function ke({store:t,children:e}){return Se(xe,{value:t,children:e})}function Ae(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Oe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ce(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Oe(Object(n),!0).forEach((function(e){Ae(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ie(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Ne="function"==typeof Symbol&&Symbol.observable||"@@observable",je=function(){return Math.random().toString(36).substring(7).split("").join(".")},Pe={INIT:"@@redux/INIT"+je(),REPLACE:"@@redux/REPLACE"+je(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+je()}};function Re(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Le(t,e,n){var r;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Ie(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Ie(1));return n(Le)(t,e)}if("function"!=typeof t)throw new Error(Ie(2));var o=t,i=e,a=[],s=a,c=!1;function l(){s===a&&(s=a.slice())}function u(){if(c)throw new Error(Ie(3));return i}function p(t){if("function"!=typeof t)throw new Error(Ie(4));if(c)throw new Error(Ie(5));var e=!0;return l(),s.push(t),function(){if(e){if(c)throw new Error(Ie(6));e=!1,l();var n=s.indexOf(t);s.splice(n,1),a=null}}}function f(t){if(!Re(t))throw new Error(Ie(7));if(void 0===t.type)throw new Error(Ie(8));if(c)throw new Error(Ie(9));try{c=!0,i=o(i,t)}finally{c=!1}for(var e=a=s,n=0;n<e.length;n++)(0,e[n])();return t}function h(t){if("function"!=typeof t)throw new Error(Ie(10));o=t,f({type:Pe.REPLACE})}function d(){var t,e=p;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Ie(11));function n(){t.next&&t.next(u())}return n(),{unsubscribe:e(n)}}})[Ne]=function(){return this},t}return f({type:Pe.INIT}),(r={dispatch:f,subscribe:p,getState:u,replaceReducer:h})[Ne]=d,r}function De(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}let Ue=De;function Me({reducers:t={},initialState:e={},middlewares:n=[]}={}){return Le(function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var o=e[r];"function"==typeof t[o]&&(n[o]=t[o])}var i,a=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:Pe.INIT}))throw new Error(Ie(12));if(void 0===n(void 0,{type:Pe.PROBE_UNKNOWN_ACTION()}))throw new Error(Ie(13))}))}(n)}catch(t){i=t}return function(t,e){if(void 0===t&&(t={}),i)throw i;for(var r=!1,o={},s=0;s<a.length;s++){var c=a[s],l=n[c],u=t[c],p=l(u,e);if(void 0===p)throw e&&e.type,new Error(Ie(14));o[c]=p,r=r||p!==u}return(r=r||a.length!==Object.keys(t).length)?o:t}}(t),e,Ue(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error(Ie(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=e.map((function(t){return t(o)}));return r=De.apply(void 0,i)(n.dispatch),Ce(Ce({},n),{},{dispatch:r})}}}(...n)))}function ze(){return Ut(we)}function Fe(){return ze().dispatch}function $e(t,e=[]){const n=ze(),[,r]=Nt((t=>t+1),0),o=Rt(),i=Dt(t,e),a=Rt(),s=Rt(),c=n.getState();return a.current===i&&s.current===c||(s.current=c,o.current=i(s.current),a.current=i),Pt((()=>n.subscribe((()=>{var t;if(n.getState()===s.current)return;const e=null===(t=a.current)||void 0===t?void 0:t.call(a,n.getState());e!==o.current&&(o.current=e,r())}))),[n]),o.current}const Be=function(t,e,n=[]){return $e(Dt((n=>t(n,e)),n),n)};function He(){return $e(be)}function Ve(){const{startChatIcon:t}=$e(be);return t}const qe="cvco",We="2",Ge="seamly-client-participant";var Ke=n(3032),Ye=n.n(Ke),Je=n(1238),Qe=n.n(Je),Ze=n(1643),Xe=n.n(Ze),tn=n(2366),en=n.n(tn),nn=n(8580),rn=n.n(nn);function on(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function an(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=on(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=on(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const sn=(t,e)=>{let n;return function(...r){const o=this;let i=!1;return clearTimeout(n),n=Ye()((()=>{n=null,i||t.apply(o,r),i=!1}),e),e=>{i=!0,e&&t.apply(o,r)}}},cn=t=>Math.ceil(t/1e3),ln=t=>{const e=Math.floor(t/60);return{minutes:e,seconds:t-60*e}},un=(t,e=2)=>{if(0===t)return"0 Bytes";const n=e<0?0:e,r=Math.floor(Math.log(t)/Math.log(1024));return Qe()((t/Math.pow(1024,r)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]},pn=()=>{const{search:t}=window.location;if(!t)return{};const e=Gt()(t).call(t,Xe()(t).call(t,"?")+1).split("&");return en()(e).call(e,((t,e)=>{const[n,r]=e.split("=");return an(an({},t),{},{[n]:decodeURIComponent(r)})}),{})},fn=t=>{var e;return en()(e=N()(t)).call(e,((e,n)=>`${e}${e?"&":""}${n}=${encodeURIComponent(t[n])}`),"")},hn={27:"Escape",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown"},dn={Escape:"Escape",End:"End",Home:"Home",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown"},vn=t=>t.code?dn[t.code]:hn[t.keyCode],yn=t=>{t&&t.focus()},mn=(t,e)=>{t&&(t.contains(document.activeElement)||t===document.activeElement)&&e()};var gn=n(7302),bn=n.n(gn),_n=n(7093),wn=n.n(_n),xn=n(4473),Tn=n.n(xn);function En(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Sn(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=En(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=En(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const kn={info:"info",message:"message",participant:"participant",system:"system"},An="text",On="text",Cn="upload",In="received",Nn="read",jn="custom",Pn="typing",Rn="read",Ln="detach_service",Dn="set_translation",Un="click_cta",Mn="assertive",zn="polite",Fn={new_topic:"newTopic",new_translation:"newTranslation"},$n="uploads",Bn={ADD_EVENT:"ADD_EVENT",CLEAR_EVENTS:"CLEAR_EVENTS",SET_HISTORY:"SET_HISTORY",SET_EVENTS_READ:"SET_EVENTS_READ",ACK_EVENT:"ACK_EVENT",SET_IS_LOADING:"SET_IS_LOADING",CLEAR_PARTICIPANTS:"CLEAR_PARTICIPANTS",SET_PARTICIPANT:"SET_PARTICIPANT",SET_HEADER_TITLE:"SET_HEADER_TITLE",SET_HEADER_SUB_TITLE:"SET_HEADER_SUB_TITLE",RESET_HISTORY_LOADED_FLAG:"RESET_HISTORY_LOADED_FLAG",SET_ACTIVE_SERVICE:"SET_ACTIVE_SERVICE",INIT_IDLE_DETACH_COUNTDOWN:"INIT_IDLE_DETACH_COUNTDOWN",DECREMENT_IDLE_DETACH_COUNTDOWN_COUNTER:"DECREMENT_IDLE_DETACH_COUNTDOWN_COUNTER",STOP_IDLE_DETACH_COUNTDOWN_COUNTER:"STOP_IDLE_DETACH_COUNTDOWN_COUNTER",CLEAR_IDLE_DETACH_COUNTDOWN:"CLEAR_IDLE_DETACH_COUNTDOWN",INIT_RESUME_CONVERSATION_PROMPT:"INIT_RESUME_CONVERSATION_PROMPT",CLEAR_RESUME_CONVERSATION_PROMPT:"CLEAR_RESUME_CONVERSATION_PROMPT",SET_SERVICE_DATA_ITEM:"SET_SERVICE_DATA_ITEM",SET_FEATURES:"SET_FEATURES",SET_FEATURE_ENABLED_STATE:"SET_FEATURE_ENABLED_STATE",CLEAR_FEATURES:"CLEAR_FEATURES",SET_INITIAL_STATE:"SET_INITIAL_STATE",SET_USER_SELECTED_OPTIONS:"SET_USER_SELECTED_OPTIONS",SET_USER_SELECTED_OPTION:"SET_USER_SELECTED_OPTION",SHOW_OPTION:"SHOW_OPTION",HIDE_OPTION:"HIDE_OPTION",SET_SERVICE_ENTRY_METADATA:"SET_SERVICE_ENTRY_METADATA",SET_BLOCK_AUTO_ENTRY_SWITCH:"SET_BLOCK_AUTO_ENTRY_SWITCH",SET_ACTIVE_ENTRY_TYPE:"SET_ACTIVE_ENTRY_TYPE",SET_USER_ENTRY_TYPE:"SET_USER_ENTRY_TYPE",REGISTER_UPLOAD:"REGISTER_UPLOAD",SET_UPLOAD_PROGRESS:"SET_UPLOAD_PROGRESS",SET_UPLOAD_COMPLETE:"SET_UPLOAD_COMPLETE",SET_UPLOAD_ERROR:"SET_UPLOAD_ERROR",CLEAR_UPLOAD:"CLEAR_UPLOAD",CLEAR_ALL_UPLOADS:"CLEAR_ALL_UPLOADS",SET_SEAMLY_CONTAINER_ELEMENT:"SET_SEAMLY_CONTAINER_ELEMENT"},Hn="navigate",{ADD_EVENT:Vn,CLEAR_EVENTS:qn,SET_HISTORY:Wn,SET_EVENTS_READ:Gn,ACK_EVENT:Kn,SET_IS_LOADING:Yn,CLEAR_PARTICIPANTS:Jn,SET_PARTICIPANT:Qn,SET_HEADER_TITLE:Zn,SET_HEADER_SUB_TITLE:Xn,RESET_HISTORY_LOADED_FLAG:tr,SET_ACTIVE_SERVICE:er,INIT_IDLE_DETACH_COUNTDOWN:nr,DECREMENT_IDLE_DETACH_COUNTDOWN_COUNTER:rr,STOP_IDLE_DETACH_COUNTDOWN_COUNTER:or,CLEAR_IDLE_DETACH_COUNTDOWN:ir,INIT_RESUME_CONVERSATION_PROMPT:ar,CLEAR_RESUME_CONVERSATION_PROMPT:sr,SET_SERVICE_DATA_ITEM:cr,SET_FEATURES:lr,SET_FEATURE_ENABLED_STATE:ur,CLEAR_FEATURES:pr,SET_INITIAL_STATE:fr,SET_USER_SELECTED_OPTION:hr,SET_USER_SELECTED_OPTIONS:dr,SHOW_OPTION:vr,HIDE_OPTION:yr,SET_BLOCK_AUTO_ENTRY_SWITCH:mr,SET_USER_ENTRY_TYPE:gr,SET_ACTIVE_ENTRY_TYPE:br,SET_SERVICE_ENTRY_METADATA:_r,REGISTER_UPLOAD:wr,SET_UPLOAD_PROGRESS:xr,SET_UPLOAD_COMPLETE:Tr,SET_UPLOAD_ERROR:Er,CLEAR_UPLOAD:Sr,CLEAR_ALL_UPLOADS:kr,SET_SEAMLY_CONTAINER_ELEMENT:Ar}=Bn,Or=({type:t,payload:e})=>t===kn.message&&!e.fromClient||t===kn.info&&e.type===An,Cr=t=>bn()(t).call(t,(({payload:{occurredAt:t}},{payload:{occurredAt:e}})=>t-e)),Ir=(t,e)=>{switch(e.type){case Jn:return{participants:{},currentAgent:""};case Qn:if(!t)return{participants:{},currentAgent:""};const{participants:n}=t||{participants:{}},{id:r,avatar:o,name:i,introduction:a}=e.participant,s=n[r],c=Sn(Sn({},n),{},{[r]:s?Sn(Sn(Sn(Sn({},s),o?{avatar:o}:{}),i?{name:i}:{}),a?{introduction:a}:{}):e.participant});return Sn(Sn({},t),{},{participants:c,currentAgent:t.currentAgent===r||e.fromClient?t.currentAgent:r});default:return t}},Nr=(t,e)=>{switch(e.type){case Zn:return Sn(Sn({},t),{},{title:e.title});case Xn:return Sn(Sn({},t),{},{subTitle:e.title});default:return t}},jr=(t,e)=>{const{entry:n}=e,{blockAutoEntrySwitch:r}=t;if(!n)return Sn(Sn({},t),{},{optionsOverride:{}});const{type:o,options:i}=n;let a=t.active;return r||o===t.userSelected||(a=o),Sn(Sn({},t),{},{active:a,optionsOverride:Sn(Sn({},t.optionsOverride),{},{[o]:i||{}})})};var Pr=n(3476),Rr=n.n(Pr);const{createAction:Lr,createThunk:Dr,createReducer:Ur,selectState:Mr}=re("i18n"),zr=de(Mr,(t=>t.translations)),Fr=de(Mr,(t=>t.initialLocale)),$r=de(Mr,(t=>t.locale)),Br=Lr("setInitialLocale",(t=>({locale:t}))),Hr=function(){let t=!1;const e=[],n=async()=>{if(!t)for(;e.length;){const n=e.shift();t=!0,await n().catch((()=>{})),t=!1}};return{next:n,runExclusively:async t=>{const r=new(Rr())(((n,r)=>{e.push((async()=>{try{n(await t())}catch(t){r(t)}}))}));return n(),r}}}(),Vr=Dr("setLocale",(async(t,{getState:e,extra:{api:n}})=>Hr.runExclusively((()=>{if(t!==$r(e()))return n.getTranslations(t)})))),{createActions:qr,createReducer:Wr,selectState:Gr}=re("translations"),[Kr,Yr]=qr("translate",{enable:t=>({locale:t}),disable:()=>({})}),[Jr,Qr]=qr("event",{enable:t=>({payloadId:t}),disable:t=>({payloadId:t})}),{createAction:Zr,createThunk:Xr,createReducer:to,selectState:eo}=re("app"),no=de(eo,(t=>t.userHasResponded)),{createAction:ro,createActions:oo,createThunk:io,createReducer:ao,selectState:so}=re("visibility"),co=({hasResponded:t,previousVisibility:e,requestedVisibility:n,config:r})=>{const{defaults:o,layoutMode:i,hideOnNoUserResponse:a}=r,{visible:s}=o||{};if("window"===i&&a&&n!==ye.open)return t?n||e||ye.open:ye.hidden;if("inline"===i&&t&&!n)return e||ye.open;const c=ye.minimized;return n||e||s||c},lo=de(so,(t=>t.visibility));function uo(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function po(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=uo(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=uo(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const fo=t=>t.state,ho=()=>$e(fo),vo=de(fo,be,no,(({events:t,serviceData:e},n,r)=>{var o;if(r||"inline"===n.layoutMode||!e.suggestion||null===(o=e.suggestion)||void 0===o||!o.body.length)return t;const i={type:"service_data",payload:e.suggestion};return[...t,i]})),yo=de(vo,be,((t,e)=>{var n;const{enabled:r,threshold:o}=(null==e||null===(n=e.messages)||void 0===n?void 0:n.timeIndicator)??{};if(!r)return t;const i=[];let a=null;return T()(t).call(t,((t,e)=>{if(0===e)i.push(po(po({},t),{},{timeIndicator:t.payload.occurredAt}));else{const e=a&&cn(t.payload.occurredAt-a.payload.occurredAt)>=o?t.payload.occurredAt:void 0;i.push(po(po({},t),{},{timeIndicator:e}))}a=t})),i})),mo=()=>$e(yo,[]),go=()=>ho().headerTitles,bo=()=>ho().unreadEvents,_o=()=>ho().skiplinkTargetId,wo=de(yo,(t=>{var e;const n=w()(t).call(t,(t=>"message"===t.type));return null===(e=n[n.length-1])||void 0===e?void 0:e.payload.id})),xo=()=>{const{participants:t,currentAgent:e}=ho().participantInfo;return e?t[e]:null},To=t=>ho().serviceData[t],Eo=()=>{const{layoutMode:t}=He();return{isInline:"inline"===t,isWindow:"window"===t,isResolving:!t}};function So(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ko(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=So(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=So(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Ao=ro("setFromStorage",(t=>({visibility:t}))),Oo=[ye.open,ye.minimized,ye.hidden],Co=io("set",((t,{getState:e,extra:{api:n,eventBus:r}})=>{const o=e(),i=lo(o),a=no(o),s=n.hasConversation(),c=be(o),{visibilityCallback:l=co,layoutMode:u}=c,{unreadEvents:p}=fo(o),f=l({hasConversation:s,hasResponded:a,previousVisibility:i,requestedVisibility:t,config:c});if(rn()(Oo).call(Oo,f)){if(i!==f)return n.store.set(ve,ko(ko({},n.store.get(ve)||{}),{},{[u]:t})),t&&r.emit("ui.visible",t,{visibility:t,hasConversation:s,hasResponded:a,unreadMessageCount:p}),f}else console.error('The visibilityCallback function should return "open", "minimized" or "hidden".')})),Io=io("initialize",(async(t,{dispatch:e,getState:n,extra:{api:r}})=>{var o;const{layoutMode:i}=be(n()),a=null===(o=r.store.get(ve))||void 0===o?void 0:o[i];a&&e(Ao(a)),e(Co(ye.initialize))}));class No extends Error{constructor(t){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,No),this.name="SeamlyUnavailableError",this.langKey="errors.seamlyUnavailable"}}var jo=n(1611),Po=n.n(jo);class Ro extends Error{constructor(t,...e){super(...e),Error.captureStackTrace&&Error.captureStackTrace(this,Po()(this)),this.originalError=t,null!=t&&t.payload&&(this.originalEvent=t,this.originalError=t.payload.error,this.message=`Event of type ${t.payload.type} encountered`),null!=t&&t.error&&(this.originalError=t.error)}}class Lo extends Ro{constructor(t,...e){super(t,...e),this.name="SeamlySessionExpiredError",this.action="reset"}}const{createAction:Do,createReducer:Uo,selectState:Mo}=re("interrupt"),zo=Do("set",(t=>({error:t}))),Fo=Do("clear"),$o=Zr("setHasResponded",(t=>({hasResponded:t}))),Bo=Xr("initialize",(async(t,{dispatch:e,extra:{api:n,config:r}})=>{var o;e(ce(r));let i=null==r||null===(o=r.context)||void 0===o?void 0:o.locale;try{const{features:t,defaultLocale:r,preChat:o,agentParticipant:a,userParticipant:s,startChatIcon:c}=await n.getConfig();e({type:Bn.SET_FEATURES,features:t}),i=i||r,e(Br(i)),e(ue(b()(o).call(o,(t=>({type:"message",payload:t}))))),e(le({agentParticipant:a,userParticipant:s,startChatIcon:c})),null!=a&&a.name&&e({type:Bn.SET_HEADER_SUB_TITLE,title:a.name})}catch(t){throw new No}try{var a;if(n.hasConversation()){var s;const t=await n.getConversationIntitialState();e({type:Bn.SET_INITIAL_STATE,initialState:t}),i=(null===(s=t.translation)||void 0===s?void 0:s.locale)||i,"userResponded"in t&&e($o(t.userResponded))}else null!=r&&null!==(a=r.context)&&void 0!==a&&a.translationLocale&&(i=r.context.translationLocale,n.send("action",{type:Dn,body:{enabled:!0,locale:i}}),e(Kr(i)))}catch(t){if(t instanceof Lo)throw t;throw new No}finally{await e(Vr(i)),e(Io())}})),Ho=Xr("reset",(async(t,{dispatch:e,extra:{api:n}})=>{try{await n.disconnect(),await n.clearStore(),e(Bo())}catch(t){e(zo(t))}})),Vo=["messages"];function qo(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Wo(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=qo(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=qo(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Go=Wo(Wo({},{namespace:"default",layoutMode:"window",messages:{agent:{showAvatar:!1,showName:!1},user:{showAvatar:!1,showName:!1},timeIndicator:{enabled:!1,threshold:36e5}}}),{},{hideOnNoUserResponse:!1,showDisclaimer:!1,showFaq:!1,customComponents:{},defaults:{},preChatEvents:[]}),Ko=["hideOnNoUserResponse","showDisclaimer","showFaq","namespace","customComponents","defaults","layoutMode","api","zIndex","context","appContainerClassNames","messages","visible","visibilityCallback","errorCallback","agentParticipant","userParticipant","startChatIcon"],Yo=(t,{config:e})=>{const n=((t,e)=>en()(e).call(e,((e,n)=>(n in t&&(e[n]=t[n]),e)),{}))(e,Ko),{messages:r}=n,o=L(n,Vo);let i=t;return N()(o).length>0&&(i=Wo(Wo({},i),o)),r&&(i=Wo(Wo({},i),{},{messages:Wo(Wo({},i.messages),r)})),i};var Jo=ae({[ce]:(t,e)=>Yo(t,e),[le]:(t,e)=>Yo(t,e),[Bo.pending]:()=>Go,[ue]:(t,{events:e})=>Wo(Wo({},t),{},{preChatEvents:e})},Go),Qo=n(6423),Zo=n.n(Qo);const Xo=(...t)=>{var e,n,r,o,i,a;return b()(e=w()(n=Zo()(r=b()(o=w()(i=b()(a=Zo()(t).call(t)).call(a,(t=>{var e;return"object"==typeof t?b()(e=C()(t)).call(e,(([t,e])=>e?t:"")).join(" "):t}))).call(i,(t=>"string"==typeof t))).call(o,(t=>t.split(" ")))).call(r)).call(n,(t=>t.length))).call(e,(t=>Xe()(t).call(t,qe)>-1?t:[qe,t].join("-"))).join(" ")},ti=yt(null),ei=yt(""),ni=()=>Ut(ti),ri=()=>ni().store||{},oi=()=>{const{get:t}=ri();return t?t("conversationUrl"):null},ii=()=>!!oi();var ai=Fe;const si=()=>He().appContainerClassNames,ci=t=>{const{fromClient:e}=t.payload,n=["message"];return"info"===t.type?n.push("message--source-info"):e?n.push("message--source-user"):n.push("message--source-agent"),n};function li(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ui(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return li(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?li(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function hi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function di(t){return t.reduce((function(t,e){return t.concat(Array.isArray(e)?di(e):e)}),[])}function vi(t){var e={};return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=r.length?r.map((function(t){return null===t?"null":void 0===t?"undefined":"function"==typeof t?t.toString():t instanceof Date?t.toISOString():JSON.stringify(t)})).join("|"):"_(no-args)_";if(Object.prototype.hasOwnProperty.call(e,i))return e[i];var a=t.apply(void 0,r);return e[i]=a,a}}function yi(t){for(var e=function(t){return/\s/.test(t)},n=[],r={},o=0,i=null,a=!1,s=0;s<t.length;){if(a&&(e(t[s])||"{"===t[s]))a=!1,i=t.slice(o,s),"{"===t[s]&&s--;else if(!a&&!e(t[s])){var c="{"===t[s];if(i&&c){var l=mi(t,s);if(-1===l)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));r[i]=t.slice(s+1,l),s=l,i=null}else i&&(n.push(i),i=null),a=!0,o=s}s++}return a&&(i=t.slice(o)),i&&n.push(i),{args:n,cases:r}}function mi(t,e){for(var n=0,r=e+1;r<t.length;r++){var o=t.charAt(r);if("}"===o){if(0===n)return r;n--}else"{"===o&&n++}return-1}function gi(t){return bi(t.slice(1,-1),",",3)}function bi(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!t)return r;if(1===n)return r.push(t),r;var o=t.indexOf(e);if(-1===o)return r.push(t),r;var i=t.substring(0,o).trim(),a=t.substring(o+e.length+1).trim();return r.push(i),bi(a,e,n-1,r)}var _i;function wi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function xi(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wi(Object(n),!0).forEach((function(e){hi(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wi(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Ti=0,Ei="other";function Si(t,e){for(var n=0,r="",o=0,i={};n<t.length;){if("#"!==t[n]||o)r+=t[n];else{var a="__hashToken".concat(Ti++);r+="{".concat(a,", number}"),i[a]=e}"{"===t[n]?o++:"}"===t[n]&&o--,n++}return{caseBody:r,numberValues:i}}var ki="other";const Ai=new(function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};pi(this,t),hi(this,"format",vi((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return di(n.process(t,e)).join("")}))),this.locale=e,this.typeHandlers=r}var e,n;return e=t,(n=[{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return[];var n=t.indexOf("{");if(-1!==n){var r=mi(t,n);if(-1===r)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));var o=t.substring(n,r+1);if(o){var i=[],a=t.substring(0,n);a&&i.push(a);var s=gi(o),c=ui(s,3),l=c[0],u=c[1],p=c[2],f=e[l];null==f&&(f="");var h=u&&this.typeHandlers[u];i.push(h?h(f,p,this.locale,e,this.process.bind(this)):f);var d=t.substring(r+1);return d&&i.push(this.process(d,e)),i}}return[t]}}])&&fi(e.prototype,n),t}())("en-GB",{plural:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=yi(e),a=i.args,s=i.cases,c=parseInt(t);a.forEach((function(t){t.startsWith("offset:")&&(c-=parseInt(t.slice("offset:".length)))}));var l=[];if("PluralRules"in Intl){void 0!==_i&&_i.resolvedOptions().locale===n||(_i=new Intl.PluralRules(n));var u=_i.select(c);u!==Ei&&l.push(u)}1===c&&l.push("one"),l.push("=".concat(c),Ei);for(var p=0;p<l.length;p++){var f=l[p];if(f in s){var h=Si(s[f],c),d=h.caseBody,v=h.numberValues;return o(d,xi(xi({},r),v))}}return t},select:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,o=yi(e),i=o.cases;return t in i?r(i[t],n):ki in i?r(i.other,n):t}});function Oi(){const t=$e(zr),e=$e($r),n=$e(Fr);return{t:Dt(((n,r={})=>{const o=t[n];return o?Ai.format(o,r):(console.warn(`Translation key: ${n} is missing in locale: ${e}`),null)}),[t,e]),locale:e,initialLocale:n}}function Ci(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ii(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Ci(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Ci(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Ni={translations:{"errors.configError.message":"We are sorry this happened, please retry at a later time.","errors.configError.srText":"A chat configuration error occurred. Our apologies, please retry at a later time.","errors.configError.title":"Chat configuration error.","errors.general.buttonText":"Restart chat","errors.general.message":"Do you want to start a new chat session?","errors.general.srText":"Something went wrong with the chat session. You can restart the chat.","errors.general.title":"Something went wrong","errors.seamlyOffline.message":"There might be a problem with your or our network connection. The chat session should resume as soon the connection is available again.","errors.seamlyOffline.srText":"The chat has connection issues. There might be a problem with your or our network connection. The chat session should resume as soon as the connection is available again.","errors.seamlyOffline.title":"Connection issues","errors.seamlyUnavailable.buttonText":"Try again","errors.seamlyUnavailable.message":"The server could not be reached. Try again in a little while.","errors.seamlyUnavailable.srText":"The chat server could not be reached. Try again in a little while.","errors.seamlyUnavailable.title":"Server unavailable"},isLoading:!1,initialLocale:void 0};var ji=Ur({[Br]:(t,{locale:e})=>Ii(Ii({},t),{},{initialLocale:e}),[Vr.pending]:t=>Ii(Ii({},t),{},{isLoading:!0}),[Vr.fulfilled]:(t,{payload:e,meta:{arg:n}})=>{var r,o;return Ii(Ii({},t),{},e?{isLoading:!1,locale:n,translations:en()(r=bn()(o=N()(e)).call(o)).call(r,((t,n)=>Ii(Ii({},t),{},{[n]:e[n]})),{})}:{isLoading:!1})},[Vr.rejected]:t=>Ii(Ii({},t),{},{isLoading:!1}),[Bo.pending]:()=>Ni},Ni);const{SET_SEAMLY_CONTAINER_ELEMENT:Pi}=Bn,Ri=t=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{const e="string"==typeof t?document.getElementById(t):t;yn(e)}))}))},Li=()=>{const{seamlyContainerElement:t}=ho(),e=ai();return[t,Dt((t=>{e({type:Pi,element:t})}),[e])]},Di=t=>Dt((()=>{Ri(t)}),[t]),Ui=()=>{const t=_o();return Di(t)};function Mi(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function zi(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Mi(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Mi(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const{SET_USER_SELECTED_OPTION:Fi,SET_USER_SELECTED_OPTIONS:$i,SHOW_OPTION:Bi,HIDE_OPTION:Hi}=Bn,Vi=()=>{var t,e;const{t:n}=Oi(),{options:r}=ho(),{panelActive:o,optionActive:i,userSelectedOptions:a,features:s}=r,{cobrowsing:c,sendTranscript:l}=s,u={cobrowsing:c,sendTranscript:l},p=b()(t=w()(e=N()(u)).call(e,(t=>u[t]))).call(t,(t=>({name:t,title:n(`options.${t}.menuTitle`),available:u[t].enabled}))),f=c||l,h=ai(),{get:d,set:v}=ri();return{allowOptionSelection:f,userSelectedOptions:a,features:s,menuOptions:p,initUserSelectedOptions:Dt((()=>{const t=d("options")||{};h({type:$i,options:t})}),[d,h]),setUserSelectedOptions:Dt((t=>{h({type:$i,options:t}),v("options",t)}),[v,h]),setUserSelectedOption:Dt(((t,e)=>{const n=d("options")||{};v("options",zi(zi({},n),{},{[t]:e})),h({type:Fi,option:t,value:e})}),[h,d,v]),showOption:t=>{h({type:Bi,optionName:t})},hideOption:()=>{h({type:Hi})},panelActive:o,optionActive:i}},qi=()=>{const{optionsButtonId:t}=ho();return{id:t,focusButton:Di(t)}};var Wi=n(62),Gi=n.n(Wi),Ki=yt({});function Yi(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ji(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Yi(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Yi(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const{CLEAR_ALL_UPLOADS:Qi}=Bn,Zi=()=>{const{showFileUpload:t,entryMeta:{options:e,optionsOverride:n},options:{features:{uploads:r}}}=ho(),{allowedMimeTypes:o,maxSize:i}=n.upload||{},{enabled:a,enabledFromEntry:s}=r||{},{allowedMimeTypes:c,maxSize:l}=Ji(Ji(Ji({},e.upload||{allowedMimeTypes:[],maxSize:0}),o?{allowedMimeTypes:o}:{}),i?{maxSize:i}:{});return{showFileUpload:t,accountAllowsUploads:!!r,serviceAllowsUploads:s||a,allowedMimeTypes:c,maxSize:l}},Xi=()=>{const{currentUploads:t}=ho(),e=ai(),n=Ut(Ki);return{uploadFile:Dt((t=>{n(t)}),[n]),clearUploads:Dt((()=>{e({type:Qi})}),[e]),currentUploads:t,isUploading:A()(t).call(t,(t=>t.uploading)),isComplete:Gi()(t).call(t,(t=>t.complete))}};var ta=n(5843),ea=n.n(ta);const na=()=>{const[t]=It((()=>Jt()));return t},ra=t=>{const e=Rt();e.current=t;const n="function"==typeof t;return Lt((()=>n?(...t)=>e.current(...t):void 0),[n])},oa=de(Mo,(({error:t})=>t));function ia(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function aa(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=ia(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=ia(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}function sa(){const{t:t}=Oi(),e=$e(oa);return{hasInterrupt:Boolean(e),meta:Lt((()=>{if(!e)return{};const{langKey:n,action:r}=e,o=t(`${n}.title`),i=t(`${n}.message`),a=t(`${n}.srText`),s=t(`${n}.buttonText`);return aa(aa(aa(aa({},n?{title:o,message:i,srText:a}:{}),r?{action:r}:{}),r&&n?{buttonText:s}:{}),{},{originalError:e})}),[t,e]),error:e}}class ca extends Ro{constructor(t,...e){super(t,...e),this.name="SeamlyGeneralError",this.langKey="errors.general",this.action="reset"}}class la extends Ro{constructor(t,...e){super(t,...e),this.name="SeamlyConfigurationError",this.langKey="errors.configError"}}class ua extends Ro{constructor(t,...e){super(t,...e),this.name="SeamlyOfflineError",this.langKey="errors.seamlyOffline"}}class pa extends Ro{constructor(t,...e){super(t,...e),this.name="SeamlyUnauthorizedError",this.langKey="errors.general",this.action="reset"}}const fa=[ca,la,Lo,ua,pa,No];function ha({api:t}){return()=>e=>n=>{const{error:r}=n;if(r){if(!A()(fa).call(fa,(t=>r instanceof t)))throw r;"reset"===r.action&&t.disconnect().then((()=>{t.clearStore()}))}return e(n)}}function da(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function va(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=da(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=da(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const ya={error:void 0},ma=(t,{error:e})=>va(va({},t),{},{error:e});var ga=Uo({[zo]:ma,[Bo.rejected]:ma,[Fo]:()=>ya,[Bo.pending]:()=>ya},ya);function ba(){return $e(no)}const _a=()=>{const t=Fe(),e=$e(lo);return{isVisible:!!e&&e!==ye.hidden,isOpen:e===ye.open,isMinimized:e===ye.minimized,visible:e,setVisibility:Dt((e=>t(Co(e))),[t])}};function wa(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function xa(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=wa(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=wa(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Ta={visibility:ye.initialize};var Ea=ao({[Ao]:(t,{visibility:e})=>xa(xa({},t),{},{visibility:e}),[Co.fulfilled]:(t,{payload:e})=>e?xa(xa({},t),{},{visibility:e}):t},Ta);function Sa(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ka(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Sa(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Sa(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const{ADD_EVENT:Aa,SET_INITIAL_STATE:Oa}=Bn;var Ca=()=>{const t=ni(),e=He(),n=ai(),r=Ut(ei),o=ba(),i=ii(),{visible:a}=_a(),s=bo(),c=Dt(((...t)=>{r.emit(...t)}),[r]),l=ra((()=>{t.sendContext(e.context||{}),c("ui.beforeStart",{visibility:a,hasConversation:i,hasResponded:o,unreadMessageCount:s}),t.send("start"),c("ui.start",{visibility:a,hasConversation:i,hasResponded:o,unreadMessageCount:s})})),u=Dt((async()=>{n(Ho())}),[n]),p=Dt((t=>({type:t,id:Jt(),transactionId:Jt(),participant:Ge,fromClient:!0,occurredAt:1e3*Yt()(),meta:{}})),[]),f=Dt((t=>ka(ka({},p("text")),{},{body:{text:t}})),[p]),h=Dt((({body:e,config:r={}})=>{if(""===ea()(e).call(e))return;const o=ka(ka({},f(e)),r);t.send("message",o),c("message",o),n({type:Aa,event:{type:"message",payload:o}})}),[t,n,c,f]),d=Dt((t=>{n({type:Aa,event:{type:"message",payload:f(t)}})}),[n,f]),v=Dt(((t,e,r,o,i,a,s)=>{n({type:Aa,event:{type:"message",payload:{type:"upload",id:t,transactionId:e,participant:Ge,fromClient:!0,occurredAt:r,meta:{},body:{contentType:o,filename:i,filesize:a,url:s}}}})}),[n]),y=Dt((t=>{const e={body:{subtype:t,type:"divider"},fromClient:!1,fromHistory:!0,id:Jt(),transactionId:Jt(),type:"divider"};n({type:Aa,event:{type:"info",payload:e}})}),[n]),m=Dt((({type:e,subtype:n})=>{const r={type:e,subtype:n,id:Jt(),transactionId:Jt(),participant:Ge,fromClient:!0};t.send("info",r)}),[t]),g=Dt((e=>{if(!e)return;t.send("action",e);const{type:n}=e;n!==Pn&&n!==Rn&&c(`action.${n}`,e)}),[t,c]),b=Dt((e=>{t.sendContext(e)}),[t]);return{connect:Dt((()=>t.connected?Rr().reject(new Error("The API is already connected")):t.connect().then((t=>{t&&n({type:Oa,initialState:t})})).catch((t=>{n(zo(t))}))),[t,n]),start:l,sendMessage:h,sendInfo:m,sendAction:g,sendContext:b,reset:u,emitEvent:c,addMessageBubble:d,addUploadBubble:v,addDivider:y,apiConfigReady:t.configReady}};const Ia=yt(null),Na=()=>{const t=Ut(Ia);return{sendPolite:Dt((e=>{t({ariaLive:zn,messageText:e})}),[t]),sendAssertive:Dt((e=>{t({ariaLive:Mn,messageText:e})}),[t])}};var ja=yt(null),Pa=()=>Ut(ja),Ra=n(1581),La=n.n(Ra);function Da(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}const{SET_BLOCK_AUTO_ENTRY_SWITCH:Ua,SET_ACTIVE_ENTRY_TYPE:Ma,SET_USER_ENTRY_TYPE:za}=Bn,Fa=()=>{const{default:t,active:e,userSelected:n,options:r}=ho().entryMeta,o=ai(),i=n||e||t,a=r[i]||{},s=Dt((t=>{o({type:Ua,value:t})}),[o]),c=Dt((t=>{o({type:Ma,entryType:t})}),[o]),l=Dt((t=>{o({type:za,entryType:t})}),[o]),u=Dt((()=>{n?l(null):c(t)}),[n,t,l,c]);return{activeEntry:i,activeEntryOptions:a,setActiveEntryType:c,setUserEntryType:l,cancelEntrySelection:u,setBlockAutoEntrySwitch:s}},{SET_IS_LOADING:$a}=Bn;var Ba=()=>{const{t:t}=Oi(),{layoutMode:e}=He(),{isOpen:n,isVisible:r,setVisibility:o}=_a(),i=ai(),a=mo(),s=Rt(null),{start:c,connect:l,apiConfigReady:u}=Ca(),p=ii(),f=Rt(null),h=Rt(null),{sendAssertive:d}=Na(),v=Rt(!1),y=a.length>0;return jt((()=>{r&&Ye()((()=>{d(t("window.srTexts.onLoad"))}),500)}),[r,d,t]),jt((()=>{if(r!==h.current)return f.current=n,void(h.current=r);null!==f.current&&d(t(n?"window.srTexts.onOpen":"window.srTexts.onClose")),f.current=n,h.current=r}),[n,r,d,t]),jt((()=>{s.current=Ye()((()=>{i({type:$a,isLoading:!0})}),500)}),[i]),jt((()=>{y&&(clearTimeout(s.current),i({type:$a,isLoading:!1}))}),[y,i]),jt((()=>{p&&u||(v.current=!1)}),[p,u]),jt((()=>{("window"!==e||n||p)&&!v.current&&u&&(p&&(clearTimeout(s.current),i({type:$a,isLoading:!1})),l().then((()=>{c()})),v.current=!0)}),[n,p,u,c,l,i,e]),{openChat:()=>{o(ye.open)},closeChat:()=>{o(ye.minimized)}}};function Ha(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Va(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Ha(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Ha(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const{CLEAR_IDLE_DETACH_COUNTDOWN:qa,INIT_IDLE_DETACH_COUNTDOWN:Wa,DECREMENT_IDLE_DETACH_COUNTDOWN_COUNTER:Ga,STOP_IDLE_DETACH_COUNTDOWN_COUNTER:Ka}=Bn;var Ya=()=>{const t=ai(),{idleDetachCountdown:e}=ho(),{isOpen:n}=_a(),r=Rt({});r.current={hasCountdown:e.hasCountdown,isActive:e.isActive,remaining:e.remaining,wasStopped:e.wasStopped,isOpen:n};const{emitEvent:o,sendAction:i}=Ca(),{t:a}=Oi(),{sendAssertive:s,sendPolite:c}=Na(),l=Dt((t=>{const{isOpen:e}=r.current;e&&s(t)}),[s]),u=Dt((t=>{const{isOpen:e}=r.current;e&&c(t)}),[c]),p=Dt((e=>{const n=(t=>Math.ceil(t/1e3))(e),r=ln(n);t({type:Wa,delaySeconds:n,delayTime:r}),o("idleTimer.start"),l(`${a("idleDetachWarning.countdownTitle")} ${a("idleDetachWarning.countdownText")} ${a("idleDetachWarning.countdownTimer",r)}`)}),[t,o,l,a]),f=Dt(((e,n)=>{const{hasCountdown:s,wasStopped:c}=r.current;s&&(e||(n||i({type:Ln}),l(a("idleDetachWarning.notifyTransferText"))),c||o("idleTimer.stop"),t({type:qa}))}),[t,i,o,l,a]),h=Dt((()=>{const{remaining:e}=r.current;if(e<=0)return;const n=e-1;n%10==0&&l(`${a("idleDetachWarning.countdownText")} ${a("idleDetachWarning.countdownTimer",ln(n))}`),t({type:Ga})}),[t,l,a]),d=Dt((()=>{const{isActive:e,remaining:n}=r.current;e&&(t({type:Ka}),n&&(o("idleTimer.stop"),u(a("idleDetachWarning.srCountDownStoppedText"))))}),[t,o,u,a]);return Va(Va({},e),{},{initCountdown:p,endCountdown:f,decrementCountdown:h,stopCountdown:d})};const{CLEAR_RESUME_CONVERSATION_PROMPT:Ja}=Bn;var Qa=()=>{const t=ai(),e=ho().resumeConversationPrompt,{sendAction:n}=Ca(),{t:r}=Oi(),{sendAssertive:o}=Na();return{continueChat:()=>{n({type:"dismiss",body:{type:"resume_conversation_prompt"}}),t({type:Ja})},hasPrompt:e,restartChat:()=>{o(r("resumeConversationPrompt.srNotifyRestartText")),n({type:Ln}),t({type:Ja})}}};const Za=(t,e)=>{const n=ni();jt((()=>{var r;n.stream&&(e?w()(r=n.stream()).call(r,e).subscribe({next:t}):n.stream().subscribe({next:t}))}),[n,t,e])};function Xa(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ts(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Xa(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Xa(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var es=to({[$o]:(t,{hasResponded:e})=>ts(ts({},t),{},{userHasResponded:e})},{userHasResponded:!1});const ns=(t,e)=>(n,r)=>r[t]||e,rs=Gr,os=de(rs,(t=>t.originalPayloadIds)),is=de(os,ns("payloadId"),((t,e)=>!rn()(t).call(t,e)));function as(){const{sendAction:t}=Ca(),e=Fe(),n=ra((n=>{t({type:Dn,body:{enabled:!0,locale:n}}),e(Kr(n))})),r=ra((()=>{t({type:Dn,body:{enabled:!1}}),e(Yr())})),{languages:o,isActive:i,isAvailable:a,currentLocale:s}=$e(rs,[]);return{languages:o,isActive:i,isAvailable:a,currentLocale:s,enableTranslations:n,disableTranslations:r}}function ss({payload:t}={}){var e,n,r;const o=null==t?void 0:t.id;let i,a;switch(null==t?void 0:t.type){case"participant":i=t.participant.introduction,a=t.participant.translatedIntroduction;break;default:i=null==t?void 0:t.body,a=null==t?void 0:t.translatedBody}const s=!!a,c=Be(is,{payloadId:o},[o]),l=Fe(),u=ra((()=>{l(c?Qr(o):Jr(o))}));return[s&&c?null===(e=a)||void 0===e?void 0:e.data:i,{hasTranslation:s,isTranslated:c&&s,toggleTranslation:u,translatedBy:null===(n=a)||void 0===n?void 0:n.translatedBy,locale:null===(r=a)||void 0===r?void 0:r.locale}]}function cs(){const t=$e(rs,[]).containerId;return{id:t,focusContainer:Di(t)}}function ls(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function us(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=ls(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=ls(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const ps={isActive:!1,currentLocale:void 0,isAvailable:!1,languages:[],originalPayloadIds:[],containerId:Jt()};var fs=Wr({[Bn.SET_FEATURES]:(t,e)=>{var n;const r=null==e||null===(n=e.features)||void 0===n?void 0:n.translation;return r?us(us({},t),{},{isAvailable:!0===r.enabled,languages:r.languages||[]}):t},[Bn.CLEAR_FEATURES]:()=>ps,[Kr]:(t,{locale:e})=>us(us({},t),{},{isActive:!0,currentLocale:e}),[Yr]:t=>us(us({},t),{},{isActive:!1,currentLocale:void 0}),[Jr]:(t,{payloadId:e})=>{var n,r;return rn()(n=t.originalPayloadIds).call(n,e)?us(us({},t),{},{originalPayloadIds:w()(r=t.originalPayloadIds).call(r,(t=>t!==e))}):t},[Qr]:(t,{payloadId:e})=>{var n;return rn()(n=t.originalPayloadIds).call(n,e)?t:us(us({},t),{},{originalPayloadIds:[...t.originalPayloadIds,e]})},[Bo.pending]:()=>ps},ps);const hs={send32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M6.714,14.985l17.837-7.906c0.681-0.302,1.414,0.301,1.25,1.027L22.273,23.59\tc-0.13,0.566-0.751,0.865-1.275,0.613l-3.623-1.752l-2.334,2.287c-0.572,0.562-1.538,0.156-1.538-0.645V21.01\tc0-0.217,0.078-0.43,0.222-0.594l7.676-8.841l-10.414,7.472l-4.351-2.445C5.987,16.236,6.033,15.287,6.714,14.985L6.714,14.985z"/></svg>',balloon32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M24,10.824v10.375c0,1.104-0.896,2-2,2h-4.694l-4.931,3.625v-3.625H10c-1.104,0-2-0.896-2-2V10.824\tc0-1.104,0.896-2,2-2h12C23.104,8.824,24,9.719,24,10.824z"/></svg>',newTopic32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><path fill="#4A48C1" d="M16,8.593l2.407,4.573l5.093,0.876l-3.604,3.702l0.74,5.115L16,20.574l-4.634,2.285l0.739-5.115L8.5,14.042\tl5.094-0.876L16,8.593z"/></svg>',newTranslation16:'<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path fill="#4A48C1" d="M8,0C3.6,0,0,3.6,0,8s3.6,8,8,8s8-3.6,8-8S12.4,0,8,0z M14.1,7.1h-1.4c-0.1-1.5-0.4-2.9-1-4\tC13,4,13.9,5.4,14.1,7.1z M7.1,2.1v5H5C5.2,4.7,6.1,2.9,7.1,2.1z M7.1,8.9v5c-1-0.7-1.9-2.5-2.1-5H7.1z M8.9,13.9v-5H11\tC10.8,11.3,9.9,13.2,8.9,13.9z M8.9,7.1v-5c1,0.7,1.9,2.5,2.1,5H8.9z M4.2,3.1c-0.5,1.1-0.9,2.5-1,4H1.9C2.1,5.4,3,4,4.2,3.1z M1.9,8.9h1.4c0.1,1.5,0.4,2.9,1,4C3,12,2.1,10.5,1.9,8.9z M11.8,12.9c0.5-1.1,0.9-2.5,1-4h1.4C13.9,10.5,13,12,11.8,12.9z"/></svg>',newTranslation32:'<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 32 32"><path fill="#4A48C1" d="M16,7c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4.1,9-9S20.9,7,16,7z M22.9,15h-1.6c-0.1-1.7-0.5-3.3-1.1-4.5\tC21.6,11.5,22.6,13.1,22.9,15z M15,9.4V15h-2.3C12.9,12.3,13.9,10.2,15,9.4z M15,17v5.6c-1.1-0.8-2.1-2.9-2.3-5.6H15z M17,22.6V17\th2.3C19.1,19.8,18.1,21.8,17,22.6z M17,15V9.4c1.1,0.8,2.1,2.9,2.3,5.6H17z M11.8,10.4c-0.6,1.3-1,2.8-1.1,4.5H9.1\tC9.4,13.1,10.4,11.5,11.8,10.4z M9.1,17h1.6c0.1,1.7,0.5,3.3,1.1,4.5C10.4,20.5,9.4,18.9,9.1,17z M20.2,21.5c0.6-1.3,1-2.8,1.1-4.5\th1.6C22.6,18.8,21.6,20.5,20.2,21.5z"/></svg>',avatar32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#003A5D" d="M0,4.717C0,2.112,2.112,0,4.717,0h22.566C29.888,0,32,2.112,32,4.717v22.566C32,29.887,29.888,32,27.283,32 H4.717C2.113,32,0,29.887,0,27.283V4.717z"/><path fill="#FFF" d="M10.103,14.901c-1.107,0-2.004-0.897-2.004-2.004s0.897-2.005,2.004-2.005c1.107,0,2.005,0.897,2.005,2.005 C12.108,14.004,11.211,14.901,10.103,14.901z M16,14.901c1.107,0,2.005-0.897,2.005-2.004S17.108,10.892,16,10.892 c-1.108,0-2.005,0.897-2.005,2.005C13.995,14.004,14.892,14.901,16,14.901z M21.896,10.892c-1.106,0-2.004,0.897-2.004,2.005 c0,1.107,0.896,2.004,2.004,2.004c1.109,0,2.005-0.897,2.005-2.004C23.901,11.789,23.005,10.892,21.896,10.892z M21.408,18.207 H10.783C11.83,23.973,20.361,23.973,21.408,18.207z"/></svg>',chevronDown8:'<svg xmlns="http://www.w3.org/2000/svg" width="8px" height="8px" x="0px" y="0px" viewBox="0 0 8 8"><defs/><path fill="#4A48C1" d="M-0.001,2.876c0-0.247,0.091-0.494,0.273-0.688c0.38-0.401,1.013-0.418,1.414-0.039l1.938,1.834\tc0.199,0.188,0.547,0.188,0.746,0L6.31,2.15c0.401-0.379,1.034-0.362,1.414,0.04c0.379,0.401,0.361,1.034-0.04,1.414L5.745,5.437\tC4.782,6.35,3.213,6.35,2.249,5.436L0.311,3.603C0.103,3.406-0.001,3.142-0.001,2.876z"/></svg>',chevronDown32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M16,20.425c-0.782,0-1.563-0.291-2.159-0.874l-6.541-6.408c-0.395-0.387-0.401-1.02-0.015-1.414\tc0.387-0.394,1.021-0.4,1.414-0.015l6.541,6.408c0.42,0.409,1.102,0.409,1.52-0.001l6.541-6.407c0.396-0.386,1.028-0.38,1.414,0.015\tc0.387,0.395,0.381,1.027-0.014,1.414l-6.541,6.407C17.563,20.133,16.782,20.425,16,20.425z"/></svg>',chevronRight8:'<svg xmlns="http://www.w3.org/2000/svg" width="8px" height="8px" x="0px" y="0px" viewBox="0 0 8 8"><defs/><path fill="#4A48C1" d="M2.875,7.998c-0.247,0-0.494-0.091-0.688-0.273c-0.401-0.38-0.418-1.013-0.039-1.414l1.834-1.938\tc0.188-0.199,0.188-0.547,0-0.746l-1.835-1.94c-0.379-0.401-0.362-1.034,0.04-1.414s1.034-0.361,1.414,0.04l1.834,1.939\tc0.913,0.963,0.913,2.532-0.001,3.496L3.601,7.686C3.405,7.894,3.14,7.998,2.875,7.998z"/></svg>',chevronRight16:'<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#4A48C1" d="M6.5,13c-0.247,0-0.494-0.091-0.687-0.273c-0.401-0.38-0.419-1.013-0.04-1.414L8.22,8.727\tc0.373-0.394,0.373-1.06,0-1.454L5.773,4.687c-0.379-0.401-0.362-1.034,0.04-1.414c0.4-0.378,1.034-0.362,1.414,0.04l2.446,2.586\tc1.096,1.159,1.096,3.043,0,4.203l-2.446,2.586C7.03,12.896,6.765,13,6.5,13z"/></svg>',close8:'<svg xmlns="http://www.w3.org/2000/svg" width="8px" height="8px" x="0px" y="0px" viewBox="0 0 8 8"><defs/><path fill="#4A48C1" d="M7.705,7.729C7.511,7.923,7.255,8.02,7,8.02c-0.257,0-0.514-0.099-0.709-0.295L4,5.423L1.709,7.725\tC1.513,7.921,1.257,8.02,1,8.02c-0.255,0-0.51-0.097-0.706-0.291c-0.391-0.39-0.393-1.022-0.003-1.414l2.298-2.309l-2.27-2.28\tC-0.07,1.334-0.068,0.701,0.323,0.311c0.392-0.389,1.024-0.387,1.415,0.003L4,2.587l2.263-2.274C6.653-0.077,7.287-0.079,7.677,0.31\tC8.068,0.7,8.07,1.333,7.681,1.725l-2.27,2.281l2.298,2.309C8.099,6.705,8.097,7.339,7.705,7.729z"/></svg>',close16:'<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#4A48C1" d="M12.709,11.295L9.411,7.982l3.262-3.276c0.39-0.392,0.388-1.024-0.004-1.414\tc-0.39-0.39-1.023-0.388-1.414,0.003L8,6.564L4.746,3.295C4.357,2.904,3.724,2.903,3.332,3.292C2.94,3.682,2.939,4.315,3.329,4.707\tl3.261,3.275l-3.298,3.313c-0.39,0.391-0.388,1.024,0.003,1.414C3.49,12.903,3.745,13,4,13c0.257,0,0.513-0.099,0.708-0.295L8,9.399\tl3.291,3.306C11.486,12.901,11.743,13,12,13c0.255,0,0.511-0.097,0.705-0.291C13.097,12.319,13.099,11.686,12.709,11.295z"/></svg>',enlarge32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M24,9v6.5c0,0.552-0.447,1-1,1s-1-0.448-1-1v-4.086L11.414,22H15.5c0.552,0,1,0.447,1,1s-0.448,1-1,1H9\tc-0.13,0-0.26-0.026-0.382-0.077c-0.245-0.102-0.439-0.296-0.541-0.541C8.026,23.26,8,23.13,8,23v-6.5c0-0.552,0.448-1,1-1\ts1,0.448,1,1v4.085L20.586,10H16.5c-0.552,0-1-0.448-1-1s0.448-1,1-1H23c0.13,0,0.26,0.026,0.382,0.077\tc0.245,0.102,0.439,0.296,0.541,0.541C23.974,8.74,24,8.87,24,9z"/></svg>',options32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M26.1,21.383c0.334-0.625,0.602-1.279,0.812-1.949L32,18.609V13.51l-5.058-0.846\tc-0.208-0.67-0.468-1.325-0.795-1.956l3.009-4.145l-3.604-3.634L21.38,5.903c-0.626-0.333-1.276-0.602-1.948-0.81L18.609,0\tl-5.098,0.001l-0.847,5.061c-0.669,0.203-1.326,0.465-1.957,0.794L6.562,2.847L2.929,6.449l2.973,4.171\tC5.569,11.247,5.3,11.9,5.091,12.569L0,13.373v5.099l5.06,0.866c0.204,0.669,0.467,1.324,0.796,1.955l-3.009,4.146l3.601,3.635\tl4.171-2.975c0.627,0.335,1.282,0.603,1.951,0.811L13.372,32h5.118l0.849-5.057c0.668-0.207,1.323-0.469,1.953-0.795l4.144,3.01\tl3.639-3.604L26.1,21.383z M19.01,19.035c-1.675,1.663-4.381,1.652-6.041-0.025c-1.662-1.675-1.649-4.381,0.024-6.042\tc1.676-1.661,4.382-1.648,6.043,0.025C20.699,14.67,20.686,17.377,19.01,19.035z"/></svg>',file32:'<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" x="0px" y="0px" version="1.1" viewBox="0 0 32 32"><path fill="#4A48C1" d="M16,28.5c-3.6,0-6.5-3-6.5-6.6V9.6c0-0.6,0.4-1,1-1s1,0.4,1,1v12.3c0,2.5,2,4.6,4.5,4.6\tc2.5,0,4.5-2.1,4.5-4.6V8.3c0-1.5-1.2-2.8-2.7-2.8c-1.5,0-2.7,1.3-2.7,2.8v13.5c0,0.6,0.5,1.1,1,1.1c0.6,0,1-0.5,1-1.1v-10\tc0-0.6,0.4-1,1-1s1,0.4,1,1v10c0,1.7-1.4,3.1-3,3.1s-3-1.4-3-3.1V8.3c0-2.6,2.1-4.8,4.7-4.8c2.6,0,4.7,2.2,4.7,4.8v13.6\tC22.5,25.5,19.6,28.5,16,28.5z"/></svg>',upload32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M9.488,13.481c-0.391-0.391-0.391-1.023,0-1.414l5.805-5.805c0.026-0.026,0.06-0.036,0.088-0.058\tc0.073-0.06,0.146-0.119,0.235-0.156c0.246-0.103,0.522-0.103,0.769,0c0.093,0.039,0.171,0.101,0.249,0.165\tc0.023,0.02,0.053,0.027,0.074,0.049l5.805,5.805c0.391,0.391,0.391,1.023,0,1.414c-0.195,0.195-0.451,0.293-0.707,0.293\ts-0.512-0.098-0.707-0.293L17,9.383V20.33c0,0.553-0.447,1-1,1c-0.552,0-1-0.447-1-1V9.383l-4.098,4.098\tC10.512,13.872,9.879,13.872,9.488,13.481z M22.819,24.031H9.181c-0.552,0-1,0.447-1,1s0.448,1,1,1h13.639c0.553,0,1-0.447,1-1\tS23.372,24.031,22.819,24.031z"/></svg>',download16:'<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#FFF" d="M3.175,7.726c-0.413-0.367-0.45-0.999-0.083-1.412c0.367-0.413,0.999-0.45,1.412-0.083L7,8.45V1.5\tc0-0.552,0.448-1,1-1c0.553,0,1,0.448,1,1v6.95l2.496-2.219c0.412-0.367,1.044-0.331,1.411,0.083\tc0.367,0.413,0.33,1.045-0.083,1.412l-4.16,3.698c-0.047,0.041-0.103,0.062-0.154,0.094c-0.047,0.028-0.089,0.064-0.141,0.085\tC8.25,11.649,8.125,11.677,8,11.677c-0.126,0-0.25-0.027-0.369-0.074c-0.05-0.021-0.09-0.055-0.136-0.083\tc-0.053-0.031-0.111-0.053-0.159-0.096L3.175,7.726z M12.018,13.5H3.983c-0.552,0-1,0.447-1,1s0.448,1,1,1h8.035\tc0.553,0,1-0.447,1-1S12.57,13.5,12.018,13.5z"/></svg>',error16:'<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#ad001f" d="M15.744,13.104L9.097,1.47c-0.604-1.055-1.59-1.055-2.193,0L0.256,13.104\tc-0.604,1.056-0.102,1.919,1.113,1.919H14.63C15.847,15.022,16.348,14.159,15.744,13.104z M7,5.045c0-0.552,0.448-1,1-1s1,0.448,1,1\tv3.656c0,0.552-0.448,1-1,1s-1-0.448-1-1V5.045z M8,13.212c-0.748,0-1.354-0.607-1.354-1.354c0-0.748,0.606-1.354,1.354-1.354\ts1.354,0.606,1.354,1.354C9.354,12.604,8.748,13.212,8,13.212z"/></svg>',arrowLeft16:'<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\x3e\n<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">\n<path fill="#5053A4" d="M13.6,8c0,0.6-0.4,1-1,1h-7l2.2,2.5c0.4,0.4,0.3,1-0.1,1.4c-0.2,0.2-0.4,0.2-0.7,0.2c-0.3,0-0.6-0.1-0.8-0.3\n\tL2.6,8.6c0,0-0.1-0.1-0.1-0.2c0,0-0.1-0.1-0.1-0.1c0-0.1-0.1-0.2-0.1-0.3c0,0,0,0,0,0c0,0,0,0,0,0c0-0.1,0-0.3,0.1-0.4\n\tc0,0,0.1-0.1,0.1-0.1c0-0.1,0.1-0.1,0.1-0.2l3.7-4.1c0.4-0.4,1-0.4,1.4-0.1c0.4,0.4,0.4,1,0.1,1.4L5.6,7h7C13.2,7,13.6,7.4,13.6,8z"\n\t/>\n</svg>\n',arrowRight16:'<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\x3e\n<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">\n<path fill="#5053A4" d="M2.4,8.1c0-0.6,0.4-1,1-1h7L8.1,4.5c-0.4-0.4-0.3-1,0.1-1.4c0.2-0.2,0.4-0.2,0.7-0.2c0.3,0,0.6,0.1,0.8,0.3\n\tl3.7,4.2c0,0,0.1,0.1,0.1,0.2c0,0,0.1,0.1,0.1,0.1c0,0.1,0.1,0.2,0.1,0.3c0,0,0,0,0,0c0,0,0,0,0,0c0,0.1,0,0.3-0.1,0.4\n\tc0,0-0.1,0.1-0.1,0.1c0,0.1-0.1,0.1-0.1,0.2l-3.7,4.1c-0.4,0.4-1,0.4-1.4,0.1c-0.4-0.4-0.4-1-0.1-1.4l2.2-2.4h-7\n\tC2.8,9.1,2.4,8.6,2.4,8.1z"/>\n</svg>\n'};var ds=({name:t,size:e="32",className:n,alt:r})=>{const o=`${t}${e}`;return Se(Y,{children:[Se("div",{"aria-hidden":"true",className:n||Xo("icon"),dangerouslySetInnerHTML:{__html:hs[o]}}),r&&Se("span",{className:Xo("visually-hidden"),children:r})]})},vs=n(4198),ys=n.n(vs);const ms={visible:Xo("transition--visible"),in:Xo("transition--in"),visuallyHidden:Xo("visually-hidden")},gs=S()(ms),bs="notRendered",_s="rendered",ws="visuallyHidden";var xs=({children:t,isActive:e,timeout:n,transitionStartState:r="notRendered",onInTransitionComplete:o,onOutTransitionComplete:i})=>{var a;const s=Rt(!1),c=n?ys()(n,10):300,l=ra(o),u=ra(i),p=r===ws,[f,h]=It((()=>p?[ms.visuallyHidden]:[])),d="notRendered"!==r||f.length>0;return jt((()=>{let t=null,n=null;return s.current&&!e&&(h([ms.visible]),t=Ye()((()=>{h([...p?[ms.visuallyHidden]:[]]),u&&(n=requestAnimationFrame((()=>{u()})))}),c)),!s.current&&e&&(h([ms.visible]),n=requestAnimationFrame((()=>{n=requestAnimationFrame((()=>{h([ms.visible,ms.in]),l&&(t=Ye()((()=>{l()}),c))}))}))),s.current=e,()=>{clearTimeout(t),cancelAnimationFrame(n)}}),[e,p,c,l,u]),d&&b()(a=rt(t)).call(a,(t=>{var e;const{className:n=""}=t.props;return function(t,e,n){var r,o,i,a=W({},t.props);for(i in e)"key"==i?r=e[i]:"ref"==i?o=e[i]:a[i]=e[i];return arguments.length>2&&(a.children=arguments.length>3?D.call(arguments,2):n),K(t.type,a,r||t.key,o||t.ref,null)}(t,{className:[...w()(e=n.split(" ")).call(e,(t=>!rn()(gs).call(gs,t))),...f].join(" ")})}))},Ts=({className:t,children:e,onCancel:n,headingText:r,cancelButtonText:o,disableButtonFocusing:i,cancelButtonRef:a,position:s="right"})=>{const c=Rt(null),l=na(),{hideOption:u}=Vi(),{focusButton:p}=qi();return jt((()=>{yn(c.current)}),[]),Se("section",{className:Xo("options",{"options--right":"left"!==s,"options--left":"left"===s},t),"aria-labelledby":l,tabIndex:"-1",ref:c,children:Se("div",{className:Xo("options__body"),children:[Se("h2",{id:l,className:Xo("options__title"),children:r}),Se("button",{type:"button",onClick:()=>{n&&n(),u(),i||p()},"aria-describedby":l,className:Xo("button","options__close"),ref:t=>{a&&(a.current=t)},children:[Se(ds,{name:"close",size:"16"}),Se("span",{children:o})]}),Se("div",{className:Xo("options__wrapper"),children:e})]})})};const{createActions:Es,createReducer:Ss,selectState:ks}=re("forms"),[As,Os]=Es("form",{register:(t,e)=>({formId:t,persistData:e}),deregister:t=>({formId:t})}),[Cs,Is,Ns,js]=Es("control",{register:(t,e)=>({formId:t,name:e}),deregister:(t,e)=>({formId:t,name:e}),updateValue:(t,e,n)=>({formId:t,name:e,value:n}),updateTouched:(t,e,n)=>({formId:t,name:e,touched:n})}),Ps=de(ks,ns("formId"),((t,e)=>t[e])),Rs=de(Ps,(t=>(null==t?void 0:t.controls)||{})),Ls=de(Rs,(t=>{var e;const n={};return T()(e=C()(t)).call(e,(([t,{value:e}])=>{n[t]=e})),n})),Ds=de(Rs,ns("name"),((t,e)=>{var n;return null===(n=t[e])||void 0===n?void 0:n.value})),Us=de(Rs,ns("name"),((t,e)=>{var n;return null===(n=t[e])||void 0===n?void 0:n.touched})),Ms=yt({});var zs=Ms;const{Provider:Fs,Consumer:$s}=Ms;function Bs(){return Ut(zs)}function Hs(t){const e=Fe(),{formId:n,updateControlValue:r,updateControlTouched:o,errors:i}=Bs(),a=!!Be(Ps,{formId:n},[n]),s=Rt();s.current=a;const c=Be(Ds,{formId:n,name:t},[n,t]),l=Be(Us,{formId:n,name:t},[n,t]),u=null==i?void 0:i[t],p=!u;jt((()=>{s.current&&e(Cs(n,t))}),[a,n,t,e]),Pt((()=>()=>{e(Is(n,t))}),[a,n,t,e]);const f=Dt((e=>r(t,e.target.value)),[t,r]),h=Dt((()=>{o(t,!0)}),[o,t]);return[Lt((()=>({name:t,onInput:f,onBlur:h,value:c})),[t,f,h,c]),Lt((()=>({isValid:p,error:u,touched:l})),[p,u,l])]}const Vs=["children","formId","persistData","onError","onSubmit","validationSchema"];function qs(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ws(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=qs(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=qs(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}function Gs(t){let{children:n,formId:r,persistData:o,onError:i,onSubmit:a,validationSchema:s}=t,c=L(t,Vs);const l=Fe(),u=Be(Ls,{formId:r},[r]),[p,f]=It(!1),[h,d]=It({}),{isValid:v,errors:y}=function(t,n){const r=Lt((()=>function(t,n={}){var r;return en()(r=C()(n)).call(r,((n,[r,o])=>{o&&!e()(o)&&(o=[o]);for(let e=0;e<(null===(i=o)||void 0===i?void 0:i.length);e++){var i;if(!o[e].fn(t[r],o[e].compareValue)){n[r]=o[e].errorText;break}}return n}),{})}(t,n)),[t,n]);return{isValid:0===N()(r).length,errors:r}}(u,s),m=Lt((()=>Ws(Ws({},y),h)),[y,h]);Pt((()=>{l(As(r,o))}),[r,o,l]),jt((()=>()=>{l(Os(r))}),[r,o,l]);const g=Dt(((t,e)=>{l(Ns(r,t,e))}),[r,l]),b=Dt(((t,e)=>{l(js(r,t,e))}),[l,r]),_=Dt(((t,e)=>{d((n=>Ws(Ws({},n),{},{[t]:e})))}),[d]),w=Dt((t=>{var e;t.preventDefault();const n="true"===(null===(e=t.submitter)||void 0===e?void 0:e.ariaDisabled);f(!n),!n&&v&&a(u,{updateControlValue:g,setError:_})}),[v,a,u,g,_]);jt((()=>{i&&i({errors:m,isSubmitted:p,isValid:0===N()(m).length})}),[p,m,i]);const x=Lt((()=>({formId:r,values:u,errors:m,isValid:0===N()(m).length,isSubmitted:p,handleSubmit:w,validationSchema:s,updateControlValue:g,updateControlTouched:b})),[r,u,m,p,w,s,g,b]);return r?a?Se(Fs,Ws(Ws({},c),{},{value:x,children:n})):(console.error('"onSubmit" is required.'),null):(console.error('"formId" is required.'),null)}function Ks(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ys(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Ks(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Ks(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Js={},Qs={controls:{}},Zs={value:"",touched:!1};function Xs(t,e,n,r){var o;const i=(null===(o=t[e])||void 0===o?void 0:o.controls[n])||Zs;return Ys(Ys({},t),{},{[e]:Ys(Ys({},t[e]),{},{controls:Ys(Ys({},t[e].controls),{},{[n]:Ys(Ys({},i),r)})})})}var tc=Ss({[As]:(t,{formId:e,persistData:n})=>{const r=n?t[e]??Ys(Ys({},Qs),{},{persistData:n}):Ys(Ys({},Qs),{},{persistData:n});return Ys(Ys({},t),{},{[e]:r})},[Os]:(t,{formId:e})=>{var n;const r=Ys({},t);return null!==(n=r[e])&&void 0!==n&&n.persistData||delete r[e],r},[Cs]:(t,{name:e,formId:n})=>Xs(t,n,e),[Is]:(t,{formId:e,name:n})=>{const r=t[e];if(!r)return t;if(r.persistData)return t;const o=Ys({},r.controls);return delete o[n],Ys(Ys({},t),{},{[e]:Ys(Ys({},r),{},{controls:o})})},[Ns]:(t,{formId:e,name:n,value:r})=>Xs(t,e,n,{value:r}),[js]:(t,{formId:e,name:n,touched:r})=>Xs(t,e,n,{touched:r}),[Bo.pending]:()=>Js},Js);const ec=["className","disableValidationClasses"];function nc(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}var rc=function(t){let{className:e,disableValidationClasses:n}=t,r=L(t,ec);const{handleSubmit:o,isValid:i,isSubmitted:a}=function(){const{handleSubmit:t,isSubmitted:e,isValid:n}=Bs();return{handleSubmit:t,isSubmitted:e,isValid:n}}(),s=["form"];return!n&&a&&(s.push("form--submitted"),i?s.push("form--valid"):s.push("form--invalid")),Se("form",function(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=nc(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=nc(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}({onSubmit:o,className:Xo([...s,e])},r))};function oc({id:t,error:e}){const[n,r]=It(!1);return jt((()=>{const t=Ye()((()=>r(!0)),300);return()=>clearTimeout(t)}),[]),Se("div",{className:Xo("error"),"aria-live":"assertive","aria-atomic":"true",children:n&&e&&Se("span",{id:t,className:Xo("error__message"),children:[Se(ds,{name:"error",size:"16"}),e]})})}var ic=({contentHint:t,id:e,labelText:n,labelClass:r=Xo("label"),validity:o,errorText:i,children:a})=>Se(Y,{children:[Se("label",{htmlFor:e,className:r,children:n}),t&&Se("span",{id:`${e}-content-hint`,className:Xo("input__content-hint"),children:t}),Se(oc,{id:`${e}-error`,error:!o&&i}),a]});const ac=["id","name","labelText","labelClass","contentHint","aria-describedby","options"];function sc(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function cc(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=sc(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=sc(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var lc=t=>{let{id:e,name:n,labelText:r,labelClass:o,contentHint:i,"aria-describedby":a,options:s=[]}=t,c=L(t,ac);const{isSubmitted:l}=Bs(),[u,{error:p}]=Hs(n),f=l&&p,h=[];return a&&h.push(a),i&&h.push(`${e}-content-hint`),f&&h.push(`${e}-error`),Se(ic,{id:e,contentHint:i,validity:!f,errorText:p,labelText:r,labelClass:o,children:Se("select",cc(cc(cc({id:e,name:n,"aria-invalid":f?"true":"false","aria-describedby":h.join(" ")||null},u),c),{},{children:b()(s).call(s,(t=>Se("option",{value:t.value,children:t.label},t.value)))}))})},uc=function({controlName:t,descriptionId:e}){const{t:n}=Oi(),{isActive:r,languages:o,currentLocale:i}=as(),{locale:a}=Oi(),s=Lt((()=>{var t;return null==o||null===(t=Tn()(o).call(o,(t=>t.locale===i)))||void 0===t?void 0:t.nativeName}),[o,i]),c=Lt((()=>{var t;return[{value:"",label:n("translations.settings.defaultOptionLabel")},...b()(t=w()(o).call(o,(t=>t.locale.toLowerCase()!==String(a).toLowerCase()))).call(t,(t=>({value:t.locale,label:t.nativeName})))]}),[n,o,a]);return Se(rc,{noValidate:"true",className:Xo("options__form"),children:[Se("p",{className:Xo("options__description"),id:e,children:n("translations.settings.description")}),r?Se(Y,{children:[Se("h3",{children:n("translations.settings.currentTranslationLabel")}),Se("p",{className:Xo("options__active-language"),children:s})]}):Se(lc,{name:t,type:"text",className:Xo("input__select"),"aria-describedby":e,labelClass:Xo("label"),labelText:n("translations.settings.inputLabel"),options:c,defaultValue:i||""}),Se("div",{className:Xo("options__actions"),children:Se("button",{type:"submit",className:Xo("button","button--primary","options__submit"),children:n(r?"translations.settings.endButtonText":"translations.settings.startButtonText")})})]})};const{REGISTER_FORM:pc,DE_REGISTER_FORM:fc,REGISTER:hc,DE_REGISTER:dc,SET_VALUE:vc,SET_VALIDITY:yc,SET_STATE:mc,SET_SUBMITTED:gc,SET_PERSIST_FORM_DATA:bc}={REGISTER_FORM:"REGISTER_FORM",DE_REGISTER_FORM:"DE_REGISTER_FORM",REGISTER:"REGISTER",DE_REGISTER:"DEREGISTER",SET_VALUE:"SET_VALUE",SET_VALIDITY:"SET_VALIDITY",SET_STATE:"SET_STATE",SET_SUBMITTED:"SET_SUBMITTED",SET_PERSIST_FORM_DATA:"SET_PERSIST_FORM_DATA"},_c=(t,e,n=null)=>({fn:t,errorText:e,compareValue:n}),wc=(t,e)=>{let n=!0;for(let r=0;r<t.length;r++)t[r].size>e&&(n=!1);return n},xc=t=>!(null==t||!t.length)>0,Tc=t=>{const e=t&&ea()(t).call(t);return!(!e||!e.match(/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i))},Ec=t=>!!t,Sc="translation-settings",kc="locale";var Ac=function({onClose:t}){const[e,n]=It(void 0),{t:r}=Oi(),{isActive:o,enableTranslations:i,disableTranslations:a}=as(),s=na(),{focusContainer:c}=cs(),l=Dt((({isValid:t,isSubmitted:e})=>{n(e&&!t?"options--error":void 0)}),[n]),u=Rt(0),p=Lt((()=>(u.current+=1,o?{}:{[kc]:_c(Ec,r("translations.settings.noLocaleText"))})),[o,r]);return Se(Ts,{className:e,onCancel:t,formName:Sc,headingText:r("translations.settings.title"),cancelButtonText:r("translations.settings.cancelButtonText"),position:"left",disableButtonFocusing:!0,children:Se(Gs,{onSubmit:({locale:e})=>{o?a():(i(e),t(),c())},formId:Sc,validationSchema:p,onError:l,children:Se(uc,{controlName:kc,descriptionId:s})},u.current)})};function Oc(){const{t:t}=Oi(),[e,n]=It(!1),r=Rt(null),o=na();return Se("div",{className:Xo("translations__container"),onKeyDown:t=>{e&&vn(t)===dn.Escape&&(n(!1),yn(r.current))},children:[Se(xs,{transitionStartState:bs,isActive:e,children:Se("div",{className:Xo("options__dialog"),role:"dialog",children:Se(Ac,{onClose:()=>{n(!1)}})})}),Se("button",{type:"button",className:Xo(["button","button--secondary","chat__options__button"]),id:o,onClick:()=>{n((t=>!t))},onKeyDown:t=>{vn(t)===dn.ArrowDown&&(n(!0),t.preventDefault())},ref:r,"aria-haspopup":"dialog","aria-expanded":e.toString(),children:[Se(ds,{name:"newTranslation",size:"16"}),Se("span",{className:Xo("button__text"),children:t("translations.settings.openButtonText")})]})]})}function Cc({id:t,label:e,onButtonClick:n,buttonText:r,srButtonText:o,type:i}){const a=na();return Se("section",{className:Xo("chat-status",i&&`chat-status--${i}`),id:t,tabIndex:"-1","aria-labelledby":a,children:[Se("h2",{className:Xo("chat-status__title"),id:a,children:e}),Se("button",{type:"button",className:Xo("button","button--tertiary"),onClick:n,children:[Se("span",{"aria-hidden":o?"true":void 0,children:r}),o&&Se("span",{className:Xo("visually-hidden"),children:o})]})]})}function Ic(){const{t:t}=Oi(),{id:e}=cs(),{hasInterrupt:n}=sa(),{isActive:r,disableTranslations:o,languages:i,currentLocale:a}=as(),s=Ui(),c=Lt((()=>{var t;return null==i||null===(t=Tn()(i).call(i,(t=>t.locale===a)))||void 0===t?void 0:t.nativeName}),[i,a]),l=Dt((()=>{o(),s()}),[o,s]);return!r||n?null:Se(Cc,{type:"translations",id:e,label:t("translations.status.label",{language:c}),onButtonClick:l,buttonText:t("translations.status.stopText"),srButtonText:t("translations.status.srStopText")})}const Nc=t=>`suggestions__item--${String(t).toLowerCase().replace(/[^a-z0-9_\\-]/,"")}`;var jc=({id:t,categories:e=[],question:n,onClick:r,hasIcon:o})=>{const i=Lt((()=>["suggestions-item",...b()(e).call(e,Nc)]),[e]),a=Dt((()=>{r&&r({id:t,question:n})}),[t,n,r]);return Se("li",{className:Xo(i),children:Se("button",{type:"button",onClick:a,className:Xo("button","button--primary"),children:[o&&Se(ds,{name:"chevronRight",size:"8"}),n]})})};function Pc(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}var Rc=({className:t,suggestions:e=[],onClickSuggestion:n,hasIcon:r=!0})=>Se("ul",{className:Xo("suggestions__list",t),children:b()(e).call(e,(t=>Se(jc,function(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Pc(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Pc(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}({hasIcon:r,onClick:n},t),t.id)))}),Lc=({isAside:t})=>{const{layoutMode:e}=He(),{t:n}=Oi(),{sendAction:r,addMessageBubble:o}=Ca(),{isOpen:i,setVisibility:a}=_a(),s=na(),c=Ui(),l=Rt(null),{sendPolite:u}=Na(),{hasInterrupt:p}=sa(),{hasCountdown:f,endCountdown:h}=Ya(),{hasPrompt:d,continueChat:v}=Qa(),y=ba(),m=To("suggestion"),[g]=ss({payload:m}),b=Lt((()=>m&&!p?g:[]),[m,p,g]),_=Rt(null),w=Rt(!1),x=Rt([]),T=!!b.length,E="inline"===e?(y||i)&&!t:y,S=Rt(E),k=T&&!E,A=T?b:x.current;x.current=A;const O=Dt((({id:t,question:e})=>{f&&h(!0),d&&v(),r({type:jn,originMessage:m.id,body:{type:"faqclick",body:{faqId:t,faqQuestion:e}}}),o(e),i||a(ye.open),c()}),[o,v,h,c,f,d,m,r,a,i]);jt((()=>{if(_.current!==b&&!E){if(T){const t=w.current?n("suggestions.srUpdatedText"):n("suggestions.srAvailableText");Ye()((()=>{u(t)}),30)}else w.current&&u(n("suggestions.srUnavailableText"));_.current=b}!S.current&&E?(mn(l.current,c),u(n("suggestions.srUnavailableText"))):!T&&w.current&&mn(l.current,c),w.current=T,S.current=E}),[b,T,E,c,u,n]);const C=n("suggestions.headingText"),I=n("suggestions.footerText");return Se(xs,{isActive:k,transitionStartState:bs,children:Se(C?"section":"div",{className:Xo("suggestions"),"aria-labelledby":C?s:null,ref:l,children:[C&&Se("p",{id:s,className:Xo("suggestions__heading"),children:C}),!!A.length&&Se(Rc,{suggestions:A,onClickSuggestion:O}),I&&!i&&Se("p",{className:Xo("suggestions__footer"),children:I})]})})},Dc=({children:t,className:e=""})=>{const{isOpen:n,isVisible:r,setVisibility:o}=_a(),{namespace:i,layoutMode:a}=He(),{isInline:s}=Eo(),c=si(),l=ba(),{t:u}=Oi(),p=["chat",`chat--layout-${a}`,`namespace--${i}`,...c,e];return n||"app"===a||p.push("chat--collapsed"),l&&p.push("chat--user-responded"),r&&Se("section",{className:Xo(p),onKeyDown:t=>{(t.code&&"Escape"===t.code||27===t.keyCode)&&!s&&n&&o(ye.minimized)},tabIndex:"-1","aria-label":u("chat.srLabel"),children:[Se("div",{className:Xo("chat-wrapper"),children:t}),"inline"===a&&n&&Se(Lc,{isAside:!0})]})},Uc=({originalError:t,title:e,message:n,buttonText:r,action:o,srText:i})=>{const a=Ca(),s=na(),{sendPolite:c}=Na(),l=Ui(),u=t instanceof Lo;return jt((()=>{u&&a[o]()}),[o,a,u]),jt((()=>{!u&&i&&Ye()((()=>{c(i)}),200)}),[c,i,u]),!u&&Se("section",{className:Xo("interrupt"),"aria-labelledby":s,children:Se("div",{className:Xo("interrupt__body"),children:[Se("h2",{id:s,className:Xo("interrupt__title"),children:e}),Se("p",{className:Xo("interrupt__message"),children:n}),r&&o&&Se("div",{className:Xo("interrupt__actions"),children:Se("button",{type:"button",className:Xo("button","button--primary"),onClick:()=>{a[o](),l()},children:r})})]})})},Mc=yt({}),zc=t=>{const e=Ut(Mc);let n=null;"choice_prompt"===t.payload.type&&(n=e[t.type][t.payload.body.prompt.type]);const r=e[t.type][t.payload.type]||e.fallback;return[r&&"function"!=typeof r?r[t.payload.body.type]||e.fallback:r,n]};function Fc(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function $c(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Fc(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Fc(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}function Bc({children:t,childrenHTML:e,className:n,graphicSrc:r,graphicType:o="icon",iconName:i,iconSize:a,iconClassName:s,dividerType:c}){const l=Boolean(i||r),u=e?{dangerouslySetInnerHTML:{__html:e}}:{children:t};return Se("div",{className:Xo("divider",c&&`divider--type-${c}`,n),children:[l&&Se("span",{className:Xo("divider__graphic"),children:i?Se(ds,{name:i,size:a,className:s}):Se("img",{src:r,className:Xo({icon:"icon"===o,avatar:"avatar"===o},s)})}),Se("div",$c({className:Xo("divider__body")},u))]})}const Hc={month:"long",day:"numeric",year:"numeric"},Vc={hour:"numeric",minute:"numeric"};var qc=({event:t})=>{const e=(()=>{const[t,e]=Nt((t=>t+1),0);return Dt((()=>{Ye()((()=>{e()}))}),[])})(),{date:n,time:r,timeUntilMidnight:o,srText:i}=(t=>{var e;const{t:n}=Oi(),r=He(),o=(null==r||null===(e=r.context)||void 0===e?void 0:e.locale)??[],i=new Date(t),a=new Date,s=new Date(a);s.setHours(24,0,0,0);const c=s-a,l=i.toString(),u=new Intl.DateTimeFormat(o,Vc).format(i);let p=((t,e)=>{const n=new Date(e).setHours(0,0,0,0),r=t.getTime(),o=864e5;return r>=n+o?t:r>n?"today":r>n-o?"yesterday":t})(i,a);switch(p){case"today":p=n("dateTime.today");break;case"yesterday":p=n("dateTime.yesterday");break;default:p=new Intl.DateTimeFormat(o,Hc).format(i)}return{date:p,srText:n("dateTime.srText",{date:p,time:u}),time:u,fullDateTime:l,timeUntilMidnight:c}})(cn(t.timeIndicator));return jt((()=>{const t=Ye()((()=>{e()}),o);return()=>{clearTimeout(t)}}),[e,o]),Se(Bc,{dividerType:"time-indicator",children:[Se("p",{className:Xo("divider__time"),"aria-hidden":"true",children:[Se("span",{children:n}),Se("span",{children:r})]}),Se("p",{className:Xo("visually-hidden"),children:i})]})},Wc=({event:t,newParticipant:e})=>{const[n,r]=zc(t);if(!n)return null;const o=["conversation__item"];return"info"===t.type?o.push("conversation__item--source-info"):t.payload.fromClient?o.push("conversation__item--source-user"):o.push("conversation__item--source-agent"),e&&o.push("conversation__item--new-participant"),Se("li",{className:Xo(o),children:[t.timeIndicator&&Se(qc,{event:t}),Se(n,{event:t,children:Se(r,{event:t})})]})},Gc=({eventPayload:t})=>{const{t:e}=Oi(),{fromClient:n,participant:r}=t,o=(t=>ho().participantInfo.participants[t])(r)||{},{messages:i}=He(),a=n?e("participants.user.name"):o&&o.name,{showAvatar:s,showName:c}=i[n?"user":"agent"]||{};if(!s&&!c)return null;const l=[];return s&&a&&o.avatar&&l.push(Se("span",{className:Xo("message__avatar"),children:Se("img",{src:o.avatar,className:Xo("avatar"),alt:""})})),c&&l.push(Se("span",{className:Xo("message__author-name"),children:a})),l.length>0&&Se("div",{className:Xo("message__author"),children:l})},Kc=()=>{const{id:t}=xo()||{};return Se("li",{className:Xo("conversation__item","conversation__item--source-agent"),children:Se("div",{className:Xo("message","message--source-agent","message--type-loading"),children:[Se(Gc,{eventPayload:{fromClient:!1,participant:t}}),Se("div",{className:Xo("message__body"),children:Se("span",{className:Xo("loader"),children:[Se("span",{className:Xo("loader__part","one")}),Se("span",{className:Xo("loader__part","two")}),Se("span",{className:Xo("loader__part","three")}),Se("span",{className:Xo("loader__part","four")})]})})]})})};const Yc=["showParticipant","showTranslationToggle","event","type","modifiers","children","bodyProps","info"];function Jc(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Qc(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Jc(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Jc(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var Zc=function(t){let{showParticipant:e=!0,showTranslationToggle:n=!0,event:r,type:o,modifiers:i,children:a,bodyProps:s={},info:c}=t,l=L(t,Yc);const u=ci(r),{t:p}=Oi(),[,{hasTranslation:f,isTranslated:h,toggleTranslation:d,locale:v}]=ss(r);var y;(o&&u.push("message--type-"+o),i)&&("string"==typeof i&&(i=w()(y=i.split(" ")).call(y,(t=>t.length))),T()(i).call(i,(t=>{u.push("message--"+t)})));return h&&u.push("message--is-translated"),f&&u.push("message--has-translation"),h&&(s=Qc(Qc({},s),{},{lang:v})),Se(Y,{children:Se("div",Qc(Qc({className:Xo(u)},l),{},{children:[e&&Se(Gc,{eventPayload:r.payload}),Se("div",Qc(Qc({className:Xo("message__body")},s),{},{children:a})),c&&Se("div",{"aria-hidden":"true",className:Xo("message__info"),children:c}),n&&f&&Se("div",{className:Xo("message__translation-info"),children:Se("button",{className:Xo("message__translation-toggle","button","button--secondary"),onClick:d,children:p(h?"translations.toggle.hideButtonText":"translations.toggle.showButtonText")})})]}))})};const Xc=["event","children"];function tl(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function el(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=tl(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=tl(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const nl=t=>{const{payload:e}=t,[n,r]=It(!1),{sendAction:o,addMessageBubble:i,addDivider:a}=Ca(),{activeServiceSessionId:s}=ho().serviceInfo,c=$e(wo),[l]=ss(t),{service:u}=e,p=Lt((()=>{var e;return el(el({},t),{},{payload:el(el({},t.payload),{},{body:null===(e=t.payload.body)||void 0===e?void 0:e.prompt,translatedBody:t.payload.translatedBody&&el(el({},t.payload.translatedBody),{},{data:t.payload.translatedBody.data.prompt})})})}),[t]),f=l.chooseAgain&&s===u.serviceSessionId&&e.id!==c;return jt((()=>{r(e.id===c)}),[e,c]),{body:l,subEvent:p,showOptions:n,chooseAgain:f,onChoiceClickHandler:t=>{f&&a("new_topic"),i(t.text),o({type:"pick_choice",originMessage:e.id,choice:{id:t.id,text:t.text,chooseAgain:f}}),r(!1)},onChooseAgainClickHandler:()=>{r((t=>!t))}}};let rl={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const ol=/[&<>"']/,il=/[&<>"']/g,al=/[<>"']|&(?!#?\w+;)/,sl=/[<>"']|&(?!#?\w+;)/g,cl={"&":"&","<":"<",">":">",'"':""","'":"'"},ll=t=>cl[t];function ul(t,e){if(e){if(ol.test(t))return t.replace(il,ll)}else if(al.test(t))return t.replace(sl,ll);return t}const pl=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function fl(t){return t.replace(pl,((t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}const hl=/(^|[^\[])\^/g;function dl(t,e){t=t.source||t,e=e||"";const n={replace:(e,r)=>(r=(r=r.source||r).replace(hl,"$1"),t=t.replace(e,r),n),getRegex:()=>new RegExp(t,e)};return n}const vl=/[^\w:]/g,yl=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ml(t,e,n){if(t){let t;try{t=decodeURIComponent(fl(n)).replace(vl,"").toLowerCase()}catch(t){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!yl.test(n)&&(n=function(t,e){gl[" "+t]||(bl.test(t)?gl[" "+t]=t+"/":gl[" "+t]=Sl(t,"/",!0));const n=-1===(t=gl[" "+t]).indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(_l,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(wl,"$1")+e:t+e}(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(t){return null}return n}const gl={},bl=/^[^:]+:\/*[^/]*$/,_l=/^([^:]+:)[\s\S]*$/,wl=/^([^:]+:\/*[^/]*)[\s\S]*$/,xl={exec:function(){}};function Tl(t){let e,n,r=1;for(;r<arguments.length;r++)for(n in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function El(t,e){const n=t.replace(/\|/g,((t,e,n)=>{let r=!1,o=e;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function Sl(t,e,n){const r=t.length;if(0===r)return"";let o=0;for(;o<r;){const i=t.charAt(r-o-1);if(i!==e||n){if(i===e||!n)break;o++}else o++}return t.substr(0,r-o)}function kl(t){t&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Al(t,e){if(e<1)return"";let n="";for(;e>1;)1&e&&(n+=t),e>>=1,t+=t;return n+t}function Ol(t,e,n,r){const o=e.href,i=e.title?ul(e.title):null,a=t[1].replace(/\\([\[\]])/g,"$1");if("!"!==t[0].charAt(0)){r.state.inLink=!0;const t={type:"link",raw:n,href:o,title:i,text:a,tokens:r.inlineTokens(a,[])};return r.state.inLink=!1,t}return{type:"image",raw:n,href:o,title:i,text:ul(a)}}class Cl{constructor(t){this.options=t||rl}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Sl(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],n=function(t,e){const n=t.match(/^(\s+)(?:```)/);if(null===n)return e;const r=n[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(null===e)return t;const[n]=e;return n.length>=r.length?t.slice(r.length):t})).join("\n")}(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim():e[2],text:n}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=Sl(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}const n={type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:[]};return this.lexer.inline(n.text,n.tokens),n}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){const t=e[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:e[0],tokens:this.lexer.blockTokens(t,[]),text:t}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n,r,o,i,a,s,c,l,u,p,f,h,d=e[1].trim();const v=d.length>1,y={type:"list",raw:"",ordered:v,start:v?+d.slice(0,-1):"",loose:!1,items:[]};d=v?`\\d{1,9}\\${d.slice(-1)}`:`\\${d}`,this.options.pedantic&&(d=v?d:"[*+-]");const m=new RegExp(`^( {0,3}${d})((?: [^\\n]*)?(?:\\n|$))`);for(;t&&(h=!1,e=m.exec(t))&&!this.rules.block.hr.test(t);){if(n=e[0],t=t.substring(n.length),l=e[2].split("\n",1)[0],u=t.split("\n",1)[0],this.options.pedantic?(i=2,f=l.trimLeft()):(i=e[2].search(/[^ ]/),i=i>4?1:i,f=l.slice(i),i+=e[1].length),s=!1,!l&&/^ *$/.test(u)&&(n+=u+"\n",t=t.substring(u.length+1),h=!0),!h){const e=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(p=t.split("\n",1)[0],l=p,this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!e.test(l));){if(l.search(/[^ ]/)>=i||!l.trim())f+="\n"+l.slice(i);else{if(s)break;f+="\n"+l}s||l.trim()||(s=!0),n+=p+"\n",t=t.substring(p.length+1)}}y.loose||(c?y.loose=!0:/\n *\n *$/.test(n)&&(c=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(f),r&&(o="[ ] "!==r[0],f=f.replace(/^\[[ xX]\] +/,""))),y.items.push({type:"list_item",raw:n,task:!!r,checked:o,loose:!1,text:f}),y.raw+=n}y.items[y.items.length-1].raw=n.trimRight(),y.items[y.items.length-1].text=f.trimRight(),y.raw=y.raw.trimRight();const g=y.items.length;for(a=0;a<g;a++){this.lexer.state.top=!1,y.items[a].tokens=this.lexer.blockTokens(y.items[a].text,[]);const t=y.items[a].tokens.filter((t=>"space"===t.type)),e=t.every((t=>{const e=t.raw.split("");let n=0;for(const t of e)if("\n"===t&&(n+=1),n>1)return!0;return!1}));!y.loose&&t.length&&e&&(y.loose=!0,y.items[a].loose=!0)}return y}}html(t){const e=this.rules.block.html.exec(t);if(e){const t={type:"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:e[0]};return this.options.sanitize&&(t.type="paragraph",t.text=this.options.sanitizer?this.options.sanitizer(e[0]):ul(e[0]),t.tokens=[],this.lexer.inline(t.text,t.tokens)),t}}def(t){const e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{type:"def",tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}}table(t){const e=this.rules.block.table.exec(t);if(e){const t={type:"table",header:El(e[1]).map((t=>({text:t}))),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=e[0];let n,r,o,i,a=t.align.length;for(n=0;n<a;n++)/^ *-+: *$/.test(t.align[n])?t.align[n]="right":/^ *:-+: *$/.test(t.align[n])?t.align[n]="center":/^ *:-+ *$/.test(t.align[n])?t.align[n]="left":t.align[n]=null;for(a=t.rows.length,n=0;n<a;n++)t.rows[n]=El(t.rows[n],t.header.length).map((t=>({text:t})));for(a=t.header.length,r=0;r<a;r++)t.header[r].tokens=[],this.lexer.inlineTokens(t.header[r].text,t.header[r].tokens);for(a=t.rows.length,r=0;r<a;r++)for(i=t.rows[r],o=0;o<i.length;o++)i[o].tokens=[],this.lexer.inlineTokens(i[o].text,i[o].tokens);return t}}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e){const t={type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:[]};return this.lexer.inline(t.text,t.tokens),t}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t={type:"paragraph",raw:e[0],text:"\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1],tokens:[]};return this.lexer.inline(t.text,t.tokens),t}}text(t){const e=this.rules.block.text.exec(t);if(e){const t={type:"text",raw:e[0],text:e[0],tokens:[]};return this.lexer.inline(t.text,t.tokens),t}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:ul(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):ul(e[0]):e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^</.test(t)){if(!/>$/.test(t))return;const e=Sl(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;const n=t.length;let r=0,o=0;for(;o<n;o++)if("\\"===t[o])o++;else if(t[o]===e[0])r++;else if(t[o]===e[1]&&(r--,r<0))return o;return-1}(e[2],"()");if(t>-1){const n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);t&&(n=t[1],r=t[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(t)?n.slice(1):n.slice(1,-1)),Ol(e,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},e[0],this.lexer)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let t=(n[2]||n[1]).replace(/\s+/g," ");if(t=e[t.toLowerCase()],!t||!t.href){const t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return Ol(n,t,n[0],this.lexer)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrong.lDelim.exec(t);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const o=r[1]||r[2]||"";if(!o||o&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let o,i,a=n,s=0;const c="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+n);null!=(r=c.exec(e));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(i=o.length,r[3]||r[4]){a+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){s+=i;continue}if(a-=i,a>0)continue;if(i=Math.min(i,i+a+s),Math.min(n,i)%2){const e=t.slice(1,n+r.index+i);return{type:"em",raw:t.slice(0,n+r.index+i+1),text:e,tokens:this.lexer.inlineTokens(e,[])}}const e=t.slice(2,n+r.index+i-1);return{type:"strong",raw:t.slice(0,n+r.index+i+1),text:e,tokens:this.lexer.inlineTokens(e,[])}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const n=/[^ ]/.test(t),r=/^ /.test(t)&&/ $/.test(t);return n&&r&&(t=t.substring(1,t.length-1)),t=ul(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2],[])}}autolink(t,e){const n=this.rules.inline.autolink.exec(t);if(n){let t,r;return"@"===n[2]?(t=ul(this.options.mangle?e(n[1]):n[1]),r="mailto:"+t):(t=ul(n[1]),r=t),{type:"link",raw:n[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t,e){let n;if(n=this.rules.inline.url.exec(t)){let t,r;if("@"===n[2])t=ul(this.options.mangle?e(n[0]):n[0]),r="mailto:"+t;else{let e;do{e=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(e!==n[0]);t=ul(n[0]),r="www."===n[1]?"http://"+t:t}return{type:"link",raw:n[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t,e){const n=this.rules.inline.text.exec(t);if(n){let t;return t=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):ul(n[0]):n[0]:ul(this.options.smartypants?e(n[0]):n[0]),{type:"text",raw:n[0],text:t}}}}const Il={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:xl,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Il.def=dl(Il.def).replace("label",Il._label).replace("title",Il._title).getRegex(),Il.bullet=/(?:[*+-]|\d{1,9}[.)])/,Il.listItemStart=dl(/^( *)(bull) */).replace("bull",Il.bullet).getRegex(),Il.list=dl(Il.list).replace(/bull/g,Il.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Il.def.source+")").getRegex(),Il._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Il._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Il.html=dl(Il.html,"i").replace("comment",Il._comment).replace("tag",Il._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Il.paragraph=dl(Il._paragraph).replace("hr",Il.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Il._tag).getRegex(),Il.blockquote=dl(Il.blockquote).replace("paragraph",Il.paragraph).getRegex(),Il.normal=Tl({},Il),Il.gfm=Tl({},Il.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Il.gfm.table=dl(Il.gfm.table).replace("hr",Il.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Il._tag).getRegex(),Il.gfm.paragraph=dl(Il._paragraph).replace("hr",Il.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Il.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Il._tag).getRegex(),Il.pedantic=Tl({},Il.normal,{html:dl("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Il._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:xl,paragraph:dl(Il.normal._paragraph).replace("hr",Il.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Il.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const Nl={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:xl,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:xl,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function jl(t){return t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function Pl(t){let e,n,r="";const o=t.length;for(e=0;e<o;e++)n=t.charCodeAt(e),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}Nl._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Nl.punctuation=dl(Nl.punctuation).replace(/punctuation/g,Nl._punctuation).getRegex(),Nl.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Nl.escapedEmSt=/\\\*|\\_/g,Nl._comment=dl(Il._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Nl.emStrong.lDelim=dl(Nl.emStrong.lDelim).replace(/punct/g,Nl._punctuation).getRegex(),Nl.emStrong.rDelimAst=dl(Nl.emStrong.rDelimAst,"g").replace(/punct/g,Nl._punctuation).getRegex(),Nl.emStrong.rDelimUnd=dl(Nl.emStrong.rDelimUnd,"g").replace(/punct/g,Nl._punctuation).getRegex(),Nl._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Nl._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Nl._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Nl.autolink=dl(Nl.autolink).replace("scheme",Nl._scheme).replace("email",Nl._email).getRegex(),Nl._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Nl.tag=dl(Nl.tag).replace("comment",Nl._comment).replace("attribute",Nl._attribute).getRegex(),Nl._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Nl._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Nl._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Nl.link=dl(Nl.link).replace("label",Nl._label).replace("href",Nl._href).replace("title",Nl._title).getRegex(),Nl.reflink=dl(Nl.reflink).replace("label",Nl._label).replace("ref",Il._label).getRegex(),Nl.nolink=dl(Nl.nolink).replace("ref",Il._label).getRegex(),Nl.reflinkSearch=dl(Nl.reflinkSearch,"g").replace("reflink",Nl.reflink).replace("nolink",Nl.nolink).getRegex(),Nl.normal=Tl({},Nl),Nl.pedantic=Tl({},Nl.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:dl(/^!?\[(label)\]\((.*?)\)/).replace("label",Nl._label).getRegex(),reflink:dl(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Nl._label).getRegex()}),Nl.gfm=Tl({},Nl.normal,{escape:dl(Nl.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Nl.gfm.url=dl(Nl.gfm.url,"i").replace("email",Nl.gfm._extended_email).getRegex(),Nl.breaks=Tl({},Nl.gfm,{br:dl(Nl.br).replace("{2,}","*").getRegex(),text:dl(Nl.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});class Rl{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||rl,this.options.tokenizer=this.options.tokenizer||new Cl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const e={block:Il.normal,inline:Nl.normal};this.options.pedantic?(e.block=Il.pedantic,e.inline=Nl.pedantic):this.options.gfm&&(e.block=Il.gfm,this.options.breaks?e.inline=Nl.breaks:e.inline=Nl.gfm),this.tokenizer.rules=e}static get rules(){return{block:Il,inline:Nl}}static lex(t,e){return new Rl(e).lex(t)}static lexInline(t,e){return new Rl(e).inlineTokens(t)}lex(t){let e;for(t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(t,this.tokens);e=this.inlineQueue.shift();)this.inlineTokens(e.src,e.tokens);return this.tokens}blockTokens(t,e=[]){let n,r,o,i;for(this.options.pedantic&&(t=t.replace(/^ +$/gm,""));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))))if(n=this.tokenizer.space(t))t=t.substring(n.raw.length),1===n.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(n);else if(n=this.tokenizer.code(t))t=t.substring(n.raw.length),r=e[e.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?e.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.heading(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.hr(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.blockquote(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.list(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.html(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.def(t))t=t.substring(n.raw.length),r=e[e.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.lheading(t))t=t.substring(n.raw.length),e.push(n);else{if(o=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startBlock.forEach((function(t){r=t.call({lexer:this},n),"number"==typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(o=t.substring(0,e+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o)))r=e[e.length-1],i&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):e.push(n),i=o.length!==t.length,t=t.substring(n.raw.length);else if(n=this.tokenizer.text(t))t=t.substring(n.raw.length),r=e[e.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):e.push(n);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e){this.inlineQueue.push({src:t,tokens:e})}inlineTokens(t,e=[]){let n,r,o,i,a,s,c=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)t.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+Al("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+Al("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(a||(s=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))))if(n=this.tokenizer.escape(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.tag(t))t=t.substring(n.raw.length),r=e[e.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(n=this.tokenizer.link(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(n.raw.length),r=e[e.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(n=this.tokenizer.emStrong(t,c,s))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.codespan(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.br(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.del(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.autolink(t,Pl))t=t.substring(n.raw.length),e.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(t,Pl))){if(o=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startInline.forEach((function(t){r=t.call({lexer:this},n),"number"==typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(o=t.substring(0,e+1))}if(n=this.tokenizer.inlineText(o,jl))t=t.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),a=!0,r=e[e.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(n.raw.length),e.push(n);return e}}class Ll{constructor(t){this.options=t||rl}code(t,e,n){const r=(e||"").match(/\S*/)[0];if(this.options.highlight){const e=this.options.highlight(t,r);null!=e&&e!==t&&(n=!0,t=e)}return t=t.replace(/\n$/,"")+"\n",r?'<pre><code class="'+this.options.langPrefix+ul(r,!0)+'">'+(n?t:ul(t,!0))+"</code></pre>\n":"<pre><code>"+(n?t:ul(t,!0))+"</code></pre>\n"}blockquote(t){return"<blockquote>\n"+t+"</blockquote>\n"}html(t){return t}heading(t,e,n,r){return this.options.headerIds?"<h"+e+' id="'+this.options.headerPrefix+r.slug(n)+'">'+t+"</h"+e+">\n":"<h"+e+">"+t+"</h"+e+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(t,e,n){const r=e?"ol":"ul";return"<"+r+(e&&1!==n?' start="'+n+'"':"")+">\n"+t+"</"+r+">\n"}listitem(t){return"<li>"+t+"</li>\n"}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return"<p>"+t+"</p>\n"}table(t,e){return e&&(e="<tbody>"+e+"</tbody>"),"<table>\n<thead>\n"+t+"</thead>\n"+e+"</table>\n"}tablerow(t){return"<tr>\n"+t+"</tr>\n"}tablecell(t,e){const n=e.header?"th":"td";return(e.align?"<"+n+' align="'+e.align+'">':"<"+n+">")+t+"</"+n+">\n"}strong(t){return"<strong>"+t+"</strong>"}em(t){return"<em>"+t+"</em>"}codespan(t){return"<code>"+t+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return"<del>"+t+"</del>"}link(t,e,n){if(null===(t=ml(this.options.sanitize,this.options.baseUrl,t)))return n;let r='<a href="'+ul(t)+'"';return e&&(r+=' title="'+e+'"'),r+=">"+n+"</a>",r}image(t,e,n){if(null===(t=ml(this.options.sanitize,this.options.baseUrl,t)))return n;let r='<img src="'+t+'" alt="'+n+'"';return e&&(r+=' title="'+e+'"'),r+=this.options.xhtml?"/>":">",r}text(t){return t}}class Dl{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,e,n){return""+n}image(t,e,n){return""+n}br(){return""}}class Ul{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,e){let n=t,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[t];do{r++,n=t+"-"+r}while(this.seen.hasOwnProperty(n))}return e||(this.seen[t]=r,this.seen[n]=0),n}slug(t,e={}){const n=this.serialize(t);return this.getNextSafeSlug(n,e.dryrun)}}class Ml{constructor(t){this.options=t||rl,this.options.renderer=this.options.renderer||new Ll,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Dl,this.slugger=new Ul}static parse(t,e){return new Ml(e).parse(t)}static parseInline(t,e){return new Ml(e).parseInline(t)}parse(t,e=!0){let n,r,o,i,a,s,c,l,u,p,f,h,d,v,y,m,g,b,_,w="";const x=t.length;for(n=0;n<x;n++)if(p=t[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[p.type]&&(_=this.options.extensions.renderers[p.type].call({parser:this},p),!1!==_||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(p.type)))w+=_||"";else switch(p.type){case"space":continue;case"hr":w+=this.renderer.hr();continue;case"heading":w+=this.renderer.heading(this.parseInline(p.tokens),p.depth,fl(this.parseInline(p.tokens,this.textRenderer)),this.slugger);continue;case"code":w+=this.renderer.code(p.text,p.lang,p.escaped);continue;case"table":for(l="",c="",i=p.header.length,r=0;r<i;r++)c+=this.renderer.tablecell(this.parseInline(p.header[r].tokens),{header:!0,align:p.align[r]});for(l+=this.renderer.tablerow(c),u="",i=p.rows.length,r=0;r<i;r++){for(s=p.rows[r],c="",a=s.length,o=0;o<a;o++)c+=this.renderer.tablecell(this.parseInline(s[o].tokens),{header:!1,align:p.align[o]});u+=this.renderer.tablerow(c)}w+=this.renderer.table(l,u);continue;case"blockquote":u=this.parse(p.tokens),w+=this.renderer.blockquote(u);continue;case"list":for(f=p.ordered,h=p.start,d=p.loose,i=p.items.length,u="",r=0;r<i;r++)y=p.items[r],m=y.checked,g=y.task,v="",y.task&&(b=this.renderer.checkbox(m),d?y.tokens.length>0&&"paragraph"===y.tokens[0].type?(y.tokens[0].text=b+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&"text"===y.tokens[0].tokens[0].type&&(y.tokens[0].tokens[0].text=b+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:b}):v+=b),v+=this.parse(y.tokens,d),u+=this.renderer.listitem(v,g,m);w+=this.renderer.list(u,f,h);continue;case"html":w+=this.renderer.html(p.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(p.tokens));continue;case"text":for(u=p.tokens?this.parseInline(p.tokens):p.text;n+1<x&&"text"===t[n+1].type;)p=t[++n],u+="\n"+(p.tokens?this.parseInline(p.tokens):p.text);w+=e?this.renderer.paragraph(u):u;continue;default:{const t='Token with "'+p.type+'" type was not found.';if(this.options.silent)return void console.error(t);throw new Error(t)}}return w}parseInline(t,e){e=e||this.renderer;let n,r,o,i="";const a=t.length;for(n=0;n<a;n++)if(r=t[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]&&(o=this.options.extensions.renderers[r.type].call({parser:this},r),!1!==o||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)))i+=o||"";else switch(r.type){case"escape":i+=e.text(r.text);break;case"html":i+=e.html(r.text);break;case"link":i+=e.link(r.href,r.title,this.parseInline(r.tokens,e));break;case"image":i+=e.image(r.href,r.title,r.text);break;case"strong":i+=e.strong(this.parseInline(r.tokens,e));break;case"em":i+=e.em(this.parseInline(r.tokens,e));break;case"codespan":i+=e.codespan(r.text);break;case"br":i+=e.br();break;case"del":i+=e.del(this.parseInline(r.tokens,e));break;case"text":i+=e.text(r.text);break;default:{const t='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(t);throw new Error(t)}}return i}}function zl(t,e,n){if(null==t)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof t)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");if("function"==typeof e&&(n=e,e=null),kl(e=Tl({},zl.defaults,e||{})),n){const r=e.highlight;let o;try{o=Rl.lex(t,e)}catch(t){return n(t)}const i=function(t){let i;if(!t)try{e.walkTokens&&zl.walkTokens(o,e.walkTokens),i=Ml.parse(o,e)}catch(e){t=e}return e.highlight=r,t?n(t):n(null,i)};if(!r||r.length<3)return i();if(delete e.highlight,!o.length)return i();let a=0;return zl.walkTokens(o,(function(t){"code"===t.type&&(a++,setTimeout((()=>{r(t.text,t.lang,(function(e,n){if(e)return i(e);null!=n&&n!==t.text&&(t.text=n,t.escaped=!0),a--,0===a&&i()}))}),0))})),void(0===a&&i())}try{const n=Rl.lex(t,e);return e.walkTokens&&zl.walkTokens(n,e.walkTokens),Ml.parse(n,e)}catch(t){if(t.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"<p>An error occurred:</p><pre>"+ul(t.message+"",!0)+"</pre>";throw t}}zl.options=zl.setOptions=function(t){var e;return Tl(zl.defaults,t),e=zl.defaults,rl=e,zl},zl.getDefaults=function(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}},zl.defaults=rl,zl.use=function(...t){const e=Tl({},...t),n=zl.defaults.extensions||{renderers:{},childTokens:{}};let r;t.forEach((t=>{if(t.extensions&&(r=!0,t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if(t.renderer){const e=n.renderers?n.renderers[t.name]:null;n.renderers[t.name]=e?function(...n){let r=t.renderer.apply(this,n);return!1===r&&(r=e.apply(this,n)),r}:t.renderer}if(t.tokenizer){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");n[t.level]?n[t.level].unshift(t.tokenizer):n[t.level]=[t.tokenizer],t.start&&("block"===t.level?n.startBlock?n.startBlock.push(t.start):n.startBlock=[t.start]:"inline"===t.level&&(n.startInline?n.startInline.push(t.start):n.startInline=[t.start]))}t.childTokens&&(n.childTokens[t.name]=t.childTokens)}))),t.renderer){const n=zl.defaults.renderer||new Ll;for(const e in t.renderer){const r=n[e];n[e]=(...o)=>{let i=t.renderer[e].apply(n,o);return!1===i&&(i=r.apply(n,o)),i}}e.renderer=n}if(t.tokenizer){const n=zl.defaults.tokenizer||new Cl;for(const e in t.tokenizer){const r=n[e];n[e]=(...o)=>{let i=t.tokenizer[e].apply(n,o);return!1===i&&(i=r.apply(n,o)),i}}e.tokenizer=n}if(t.walkTokens){const n=zl.defaults.walkTokens;e.walkTokens=function(e){t.walkTokens.call(this,e),n&&n.call(this,e)}}r&&(e.extensions=n),zl.setOptions(e)}))},zl.walkTokens=function(t,e){for(const n of t)switch(e.call(zl,n),n.type){case"table":for(const t of n.header)zl.walkTokens(t.tokens,e);for(const t of n.rows)for(const n of t)zl.walkTokens(n.tokens,e);break;case"list":zl.walkTokens(n.items,e);break;default:zl.defaults.extensions&&zl.defaults.extensions.childTokens&&zl.defaults.extensions.childTokens[n.type]?zl.defaults.extensions.childTokens[n.type].forEach((function(t){zl.walkTokens(n[t],e)})):n.tokens&&zl.walkTokens(n.tokens,e)}},zl.parseInline=function(t,e){if(null==t)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof t)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");kl(e=Tl({},zl.defaults,e||{}));try{const n=Rl.lexInline(t,e);return e.walkTokens&&zl.walkTokens(n,e.walkTokens),Ml.parseInline(n,e)}catch(t){if(t.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"<p>An error occurred:</p><pre>"+ul(t.message+"",!0)+"</pre>";throw t}},zl.Parser=Ml,zl.parser=Ml.parse,zl.Renderer=Ll,zl.TextRenderer=Dl,zl.Lexer=Rl,zl.lexer=Rl.lex,zl.Tokenizer=Cl,zl.Slugger=Ul,zl.parse=zl,zl.options,zl.setOptions,zl.use,zl.walkTokens,zl.parseInline,Ml.parse,Rl.lex;var Fl=t=>{try{return zl(t)}catch(e){return console.log("Could not parse message",t,e),""}},$l=t=>{const{sendAction:e}=Ca();return n=>{n.target&&n.target.dataset.linkId&&e({type:"navigate",originMessage:t,link:{id:n.target.dataset.linkId,url:n.target.getAttribute("href")}})}},Bl=Object.prototype.toString,Hl=Array.isArray||function(t){return"[object Array]"===Bl.call(t)};function Vl(t){return"function"==typeof t}function ql(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Wl(t,e){return null!=t&&"object"==typeof t&&e in t}var Gl=RegExp.prototype.test,Kl=/\S/;var Yl={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},Jl=/\s*/,Ql=/\s+/,Zl=/\s*=/,Xl=/\s*\}/,tu=/#|\^|\/|>|\{|&|=|!/;function eu(t){this.string=t,this.tail=t,this.pos=0}function nu(t,e){this.view=t,this.cache={".":this.view},this.parent=e}function ru(){this.templateCache={_cache:{},set:function(t,e){this._cache[t]=e},get:function(t){return this._cache[t]},clear:function(){this._cache={}}}}eu.prototype.eos=function(){return""===this.tail},eu.prototype.scan=function(t){var e=this.tail.match(t);if(!e||0!==e.index)return"";var n=e[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},eu.prototype.scanUntil=function(t){var e,n=this.tail.search(t);switch(n){case-1:e=this.tail,this.tail="";break;case 0:e="";break;default:e=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=e.length,e},nu.prototype.push=function(t){return new nu(t,this)},nu.prototype.lookup=function(t){var e,n,r,o=this.cache;if(o.hasOwnProperty(t))e=o[t];else{for(var i,a,s,c=this,l=!1;c;){if(t.indexOf(".")>0)for(i=c.view,a=t.split("."),s=0;null!=i&&s<a.length;)s===a.length-1&&(l=Wl(i,a[s])||(n=i,r=a[s],null!=n&&"object"!=typeof n&&n.hasOwnProperty&&n.hasOwnProperty(r))),i=i[a[s++]];else i=c.view[t],l=Wl(c.view,t);if(l){e=i;break}c=c.parent}o[t]=e}return Vl(e)&&(e=e.call(this.view)),e},ru.prototype.clearCache=function(){void 0!==this.templateCache&&this.templateCache.clear()},ru.prototype.parse=function(t,e){var n=this.templateCache,r=t+":"+(e||ou.tags).join(":"),o=void 0!==n,i=o?n.get(r):void 0;return null==i&&(i=function(t,e){if(!t)return[];var n,r,o,i,a=!1,s=[],c=[],l=[],u=!1,p=!1,f="",h=0;function d(){if(u&&!p)for(;l.length;)delete c[l.pop()];else l=[];u=!1,p=!1}function v(t){if("string"==typeof t&&(t=t.split(Ql,2)),!Hl(t)||2!==t.length)throw new Error("Invalid tags: "+t);n=new RegExp(ql(t[0])+"\\s*"),r=new RegExp("\\s*"+ql(t[1])),o=new RegExp("\\s*"+ql("}"+t[1]))}v(e||ou.tags);for(var y,m,g,b,_,w,x=new eu(t);!x.eos();){if(y=x.pos,g=x.scanUntil(n))for(var T=0,E=g.length;T<E;++T)i=b=g.charAt(T),function(t,e){return Gl.call(t,e)}(Kl,i)?(p=!0,a=!0,f+=" "):(l.push(c.length),f+=b),c.push(["text",b,y,y+1]),y+=1,"\n"===b&&(d(),f="",h=0,a=!1);if(!x.scan(n))break;if(u=!0,m=x.scan(tu)||"name",x.scan(Jl),"="===m?(g=x.scanUntil(Zl),x.scan(Zl),x.scanUntil(r)):"{"===m?(g=x.scanUntil(o),x.scan(Xl),x.scanUntil(r),m="&"):g=x.scanUntil(r),!x.scan(r))throw new Error("Unclosed tag at "+x.pos);if(_=">"==m?[m,g,y,x.pos,f,h,a]:[m,g,y,x.pos],h++,c.push(_),"#"===m||"^"===m)s.push(_);else if("/"===m){if(!(w=s.pop()))throw new Error('Unopened section "'+g+'" at '+y);if(w[1]!==g)throw new Error('Unclosed section "'+w[1]+'" at '+y)}else"name"===m||"{"===m||"&"===m?p=!0:"="===m&&v(g)}if(d(),w=s.pop())throw new Error('Unclosed section "'+w[1]+'" at '+x.pos);return function(t){for(var e,n=[],r=n,o=[],i=0,a=t.length;i<a;++i)switch((e=t[i])[0]){case"#":case"^":r.push(e),o.push(e),r=e[4]=[];break;case"/":o.pop()[5]=e[2],r=o.length>0?o[o.length-1][4]:n;break;default:r.push(e)}return n}(function(t){for(var e,n,r=[],o=0,i=t.length;o<i;++o)(e=t[o])&&("text"===e[0]&&n&&"text"===n[0]?(n[1]+=e[1],n[3]=e[3]):(r.push(e),n=e));return r}(c))}(t,e),o&&n.set(r,i)),i},ru.prototype.render=function(t,e,n,r){var o=this.getConfigTags(r),i=this.parse(t,o),a=e instanceof nu?e:new nu(e,void 0);return this.renderTokens(i,a,n,t,r)},ru.prototype.renderTokens=function(t,e,n,r,o){for(var i,a,s,c="",l=0,u=t.length;l<u;++l)s=void 0,"#"===(a=(i=t[l])[0])?s=this.renderSection(i,e,n,r,o):"^"===a?s=this.renderInverted(i,e,n,r,o):">"===a?s=this.renderPartial(i,e,n,o):"&"===a?s=this.unescapedValue(i,e):"name"===a?s=this.escapedValue(i,e,o):"text"===a&&(s=this.rawValue(i)),void 0!==s&&(c+=s);return c},ru.prototype.renderSection=function(t,e,n,r,o){var i=this,a="",s=e.lookup(t[1]);if(s){if(Hl(s))for(var c=0,l=s.length;c<l;++c)a+=this.renderTokens(t[4],e.push(s[c]),n,r,o);else if("object"==typeof s||"string"==typeof s||"number"==typeof s)a+=this.renderTokens(t[4],e.push(s),n,r,o);else if(Vl(s)){if("string"!=typeof r)throw new Error("Cannot use higher-order sections without the original template");null!=(s=s.call(e.view,r.slice(t[3],t[5]),(function(t){return i.render(t,e,n,o)})))&&(a+=s)}else a+=this.renderTokens(t[4],e,n,r,o);return a}},ru.prototype.renderInverted=function(t,e,n,r,o){var i=e.lookup(t[1]);if(!i||Hl(i)&&0===i.length)return this.renderTokens(t[4],e,n,r,o)},ru.prototype.indentPartial=function(t,e,n){for(var r=e.replace(/[^ \t]/g,""),o=t.split("\n"),i=0;i<o.length;i++)o[i].length&&(i>0||!n)&&(o[i]=r+o[i]);return o.join("\n")},ru.prototype.renderPartial=function(t,e,n,r){if(n){var o=this.getConfigTags(r),i=Vl(n)?n(t[1]):n[t[1]];if(null!=i){var a=t[6],s=t[5],c=t[4],l=i;0==s&&c&&(l=this.indentPartial(i,c,a));var u=this.parse(l,o);return this.renderTokens(u,e,n,l,r)}}},ru.prototype.unescapedValue=function(t,e){var n=e.lookup(t[1]);if(null!=n)return n},ru.prototype.escapedValue=function(t,e,n){var r=this.getConfigEscape(n)||ou.escape,o=e.lookup(t[1]);if(null!=o)return"number"==typeof o&&r===ou.escape?String(o):r(o)},ru.prototype.rawValue=function(t){return t[1]},ru.prototype.getConfigTags=function(t){return Hl(t)?t:t&&"object"==typeof t?t.tags:void 0},ru.prototype.getConfigEscape=function(t){return t&&"object"==typeof t&&!Hl(t)?t.escape:void 0};var ou={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){iu.templateCache=t},get templateCache(){return iu.templateCache}},iu=new ru;ou.clearCache=function(){return iu.clearCache()},ou.parse=function(t,e){return iu.parse(t,e)},ou.render=function(t,e,n,r){if("string"!=typeof t)throw new TypeError('Invalid template! Template should be a "string" but "'+(Hl(o=t)?"array":typeof o)+'" was given as the first argument for mustache#render(template, view, partials)');var o;return iu.render(t,e,n,r)},ou.escape=function(t){return String(t).replace(/[&<>"'`=\/]/g,(function(t){return Yl[t]}))},ou.Scanner=eu,ou.Context=nu,ou.Writer=ru;var au=ou;function su(t,e={}){var n;const r={};T()(n=C()(e)).call(n,(([t,e])=>{switch(e.type){case"link":r[t]=(t=>`<a href='${t.url}' data-link-id='${t.id}' ${t.newTab?'target="_blank"':""}>${t.name}</a>`)(e);break;case"text":r[t]=e.value}}),{});const o=au.escape;au.escape=function(t){return t};const i=au.render(t,r);return au.escape=o,i}au.escape=function(t){return t};const cu=["event"];function lu(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function uu(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=lu(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=lu(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var pu=t=>{let{event:e}=t,n=L(t,cu);const[r]=ss(e),o=$l(e.payload.id),i=Lt((()=>e.payload.fromClient?{children:Se("p",{children:r.text})}:{bodyProps:{dangerouslySetInnerHTML:{__html:su(Fl(r.text),r.variables)}}}),[r,e]);return Se(Zc,uu(uu({type:"text",event:e,onClick:o},n),i))},fu=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],hu=fu.join(","),du="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,vu=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return isNaN(e)?function(t){return"true"===t.contentEditable}(t)?0:"AUDIO"!==t.nodeName&&"VIDEO"!==t.nodeName&&"DETAILS"!==t.nodeName||null!==t.getAttribute("tabindex")?t.tabIndex:0:e},yu=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},mu=function(t){return"INPUT"===t.tagName},gu=function(t,e){return!(e.disabled||function(t){return mu(t)&&"hidden"===t.type}(e)||function(t,e){if("hidden"===getComputedStyle(t).visibility)return!0;var n=du.call(t,"details>summary:first-of-type")?t.parentElement:t;if(du.call(n,"details:not([open]) *"))return!0;if(e&&"full"!==e){if("non-zero-area"===e){var r=t.getBoundingClientRect(),o=r.width,i=r.height;return 0===o&&0===i}}else for(;t;){if("none"===getComputedStyle(t).display)return!0;t=t.parentElement}return!1}(e,t.displayCheck)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(mu(t)||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||"BUTTON"===t.tagName)for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var r=e.children.item(n);if("LEGEND"===r.tagName)return!r.contains(t)}return!0}e=e.parentElement}return!1}(e))},bu=function(t,e){return!(!gu(t,e)||function(t){return function(t){return mu(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||t.ownerDocument,r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var o=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!o||o===t}(t)}(e)||vu(e)<0)},_u=fu.concat("iframe").join(","),wu=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==du.call(t,_u)&&gu(e,t)};function xu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Tu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Eu,Su=(Eu=[],{activateTrap:function(t){if(Eu.length>0){var e=Eu[Eu.length-1];e!==t&&e.pause()}var n=Eu.indexOf(t);-1===n||Eu.splice(n,1),Eu.push(t)},deactivateTrap:function(t){var e=Eu.indexOf(t);-1!==e&&Eu.splice(e,1),Eu.length>0&&Eu[Eu.length-1].unpause()}}),ku=function(t){return setTimeout(t,0)},Au=function(t,e){var n=-1;return t.every((function(t,r){return!e(t)||(n=r,!1)})),n},Ou=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return"function"==typeof t?t.apply(void 0,n):t},Cu=function(t){return t.target.shadowRoot&&"function"==typeof t.composedPath?t.composedPath()[0]:t.target},Iu=function(t,e){var n,r=(null==e?void 0:e.document)||document,o=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?xu(Object(n),!0).forEach((function(e){Tu(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xu(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},e),i={containers:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(t,e,n){return t&&void 0!==t[e]?t[e]:o[n||e]},s=function(t){return!(!t||!i.containers.some((function(e){return e.contains(t)})))},c=function(t){var e=o[t];if("function"==typeof e){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];e=e.apply(void 0,i)}if(!e){if(void 0===e||!1===e)return e;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var s=e;if("string"==typeof e&&!(s=r.querySelector(e)))throw new Error("`".concat(t,"` as selector refers to no known node"));return s},l=function(){var t=c("initialFocus");if(!1===t)return!1;if(void 0===t)if(s(r.activeElement))t=r.activeElement;else{var e=i.tabbableGroups[0];t=e&&e.firstTabbableNode||c("fallbackFocus")}if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},u=function(){if(i.tabbableGroups=i.containers.map((function(t){var e,n,r,o=(n=[],r=[],function(t,e,n){var r=Array.prototype.slice.apply(t.querySelectorAll(hu));return e&&du.call(t,hu)&&r.unshift(t),r.filter(n)}(t,(e=e||{}).includeContainer,bu.bind(null,e)).forEach((function(t,e){var o=vu(t);0===o?n.push(t):r.push({documentOrder:e,tabIndex:o,node:t})})),r.sort(yu).map((function(t){return t.node})).concat(n));if(o.length>0)return{container:t,firstTabbableNode:o[0],lastTabbableNode:o[o.length-1]}})).filter((function(t){return!!t})),i.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},p=function t(e){!1!==e&&e!==r.activeElement&&(e&&e.focus?(e.focus({preventScroll:!!o.preventScroll}),i.mostRecentlyFocusedNode=e,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(e)&&e.select()):t(l()))},f=function(t){var e=c("setReturnFocus",t);return e||!1!==e&&t},h=function(t){var e=Cu(t);s(e)||(Ou(o.clickOutsideDeactivates,t)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!wu(e)}):Ou(o.allowOutsideClick,t)||t.preventDefault())},d=function(t){var e=Cu(t),n=s(e);n||e instanceof Document?n&&(i.mostRecentlyFocusedNode=e):(t.stopImmediatePropagation(),p(i.mostRecentlyFocusedNode||l()))},v=function(t){if(function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t)&&!1!==Ou(o.escapeDeactivates,t))return t.preventDefault(),void n.deactivate();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){var e=Cu(t);u();var n=null;if(i.tabbableGroups.length>0){var r=Au(i.tabbableGroups,(function(t){return t.container.contains(e)}));if(r<0)n=t.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(t.shiftKey){var o=Au(i.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e===n}));if(o<0&&i.tabbableGroups[r].container===e&&(o=r),o>=0){var a=0===o?i.tabbableGroups.length-1:o-1;n=i.tabbableGroups[a].lastTabbableNode}}else{var s=Au(i.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e===n}));if(s<0&&i.tabbableGroups[r].container===e&&(s=r),s>=0){var l=s===i.tabbableGroups.length-1?0:s+1;n=i.tabbableGroups[l].firstTabbableNode}}}else n=c("fallbackFocus");n&&(t.preventDefault(),p(n))}(t)},y=function(t){if(!Ou(o.clickOutsideDeactivates,t)){var e=Cu(t);s(e)||Ou(o.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())}},m=function(){if(i.active)return Su.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?ku((function(){p(l())})):p(l()),r.addEventListener("focusin",d,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",y,{capture:!0,passive:!1}),r.addEventListener("keydown",v,{capture:!0,passive:!1}),n},g=function(){if(i.active)return r.removeEventListener("focusin",d,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",y,!0),r.removeEventListener("keydown",v,!0),n};return(n={activate:function(t){if(i.active)return this;var e=a(t,"onActivate"),n=a(t,"onPostActivate"),o=a(t,"checkCanFocusTrap");o||u(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,e&&e();var s=function(){o&&u(),m(),n&&n()};return o?(o(i.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(t){if(!i.active)return this;clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,g(),i.active=!1,i.paused=!1,Su.deactivateTrap(n);var e=a(t,"onDeactivate"),r=a(t,"onPostDeactivate"),o=a(t,"checkCanReturnFocus");e&&e();var s=a(t,"returnFocus","returnFocusOnDeactivate"),c=function(){ku((function(){s&&p(f(i.nodeFocusedBeforeActivation)),r&&r()}))};return s&&o?(o(f(i.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,g()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,u(),m(),this):this},updateContainerElements:function(t){var e=[].concat(t).filter(Boolean);return i.containers=e.map((function(t){return"string"==typeof t?r.querySelector(t):t})),i.active&&u(),this}}).updateContainerElements(t),n};function Nu(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ju(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Nu(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Nu(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var Pu=({children:t,onClose:e,"aria-label":n,"aria-labelledby":r,fallBackFocusRef:o})=>{var i;const a=na(),s=Rt(null),c=Rt(null),[l,u]=It(!1);return jt((()=>(l&&(c.current=Iu(s.current,{initialFocus:o&&o.current?o.current:null}),c.current.activate()),()=>{c.current&&c.current.deactivate()})),[l,o]),jt((()=>{const t=(()=>{var t;const e=[],n=[];return T()(t=document.querySelectorAll('body > *:not([role="dialog"])')).call(t,(t=>{const r=t.getAttribute("aria-hidden");null!==r&&"false"!==r||(e.push(r),n.push(t),t.setAttribute("aria-hidden","true"))})),()=>{T()(n).call(n,((t,n)=>{const r=e[n];null===r?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",r)}))}})();return()=>{t()}}),[l]),jt((()=>{l&&s.current.addEventListener("keydown",(t=>{(t.code&&"Escape"===t.code||27===t.keyCode)&&e()}))}),[l,e]),Pt((()=>{const t=document.getElementsByTagName("body")[0],e=document.createElement("div");return e.setAttribute("id",a),e.setAttribute("role","dialog"),e.setAttribute("data-nosnippet","true"),e.setAttribute("aria-modal","true"),n&&e.setAttribute("aria-label",n),r&&e.setAttribute("aria-labelledby",r),t.appendChild(e),s.current=e,u(!0),()=>{s.current&&(t.removeChild(s.current),s.current=null)}}),[n,r,a]),"function"==typeof t?t({onClose:e,modalRenderFn:t=>s.current&&vt(t,s.current)}):s.current&&vt(b()(i=rt(t)).call(i,(t=>(t.props=ju(ju({},t.props),{},{onClose:e}),t))),s.current)},Ru=({url:t,description:e,onClose:n})=>{const{zIndex:r,layoutMode:o,namespace:i}=He(),a=Pa(),s=si(),c=Rt(null),{t:l}=Oi(),u=["modal",`app--layout-${o}`,`namespace--${i}`,...s],p=t=>{t.stopPropagation()},f=()=>{n()},h=r?{zIndex:r+1}:void 0;return Se(Pu,{onClose:n,"aria-label":l("lightbox.heading"),fallBackFocusRef:c,children:({onClose:n,modalRenderFn:r})=>r((n=>Se("div",{className:Xo(u),onClick:f,style:h,children:Se("div",{className:Xo("modal__float"),tabIndex:"-1",onMouseDown:a,onKeyDown:a,onTouchStart:a,onMouseMove:a,onWheel:a,onPointerDown:a,onPointerMove:a,ref:c,children:[Se("div",{className:Xo("modal__inner"),onClick:p,children:Se("img",{className:Xo("modal__image"),src:t,alt:e})}),Se("button",{type:"button",className:Xo("modal__close"),onClick:n,children:[Se(ds,{name:"close",size:"16"}),l("lightbox.closeLabel")]})]})}))(n))})},Lu=({description:t,url:e})=>{const{t:n}=Oi(),[r,o]=It(!1);return Se(Y,{children:[Se("button",{type:"button",className:Xo("modal__enlarge"),onClick:()=>{o(!0)},children:[n("message.image.srTextEnlargeButtonLabel",{description:t}),Se(ds,{name:"enlarge",size:"32"})]}),r&&Se(Ru,{url:e,description:t,onClose:()=>{o(!1)}})]})};const Du=["event","descriptorId"];function Uu(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Mu(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Uu(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Uu(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const zu=["event","descriptorId"];function Fu(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function $u(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Fu(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Fu(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Bu={[Fn.new_topic]:"newtopic"},Hu=["event"];function Vu(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}const qu={default:({event:t})=>{const{t:e}=Oi(),{subtype:n}=t.payload.body;return Se(Bc,{dividerType:Bu[Fn[n]],iconName:Fn[n],children:Se("p",{children:e(`dividerKeys.${Fn[n]}`)})})},[Fn.new_translation]:({event:t})=>{const{t:e}=Oi(),{translationEnabled:n,translationLocale:r,text:o}=t.payload.body,{enableTranslations:i,languages:a}=as(),s=Lt((()=>{var t;return null==a||null===(t=Tn()(a).call(a,(t=>t.locale===r)))||void 0===t?void 0:t.nativeName}),[a,r]);return Se(Bc,{iconName:"newTranslation",dividerType:"newtranslation",children:[Se("p",{className:Xo("divider__title"),children:e(n?"translations.divider.startText":"translations.divider.stopText",{language:s})}),n?Se("p",{children:o}):Se("button",{className:Xo("button","button--secondary"),onClick:()=>{i(r)},children:e("translations.divider.restartButtonText")})]})}};const Wu=["event"];function Gu(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ku(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Gu(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Gu(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Yu=["event"];function Ju(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Qu(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Ju(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Ju(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Zu=["event"];function Xu(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function tp(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Xu(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Xu(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const ep=({children:t,url:e,target:n})=>e?Se("a",{href:e,download:!0,target:n||void 0,className:Xo(["download","download-link"]),children:t}):Se("span",{className:Xo("download"),children:t});var np=n(4494),rp=n.n(np);function op({items:t,currentIndex:e,onChange:n,getItemKey:r,getItemLabel:o}){const i=t.length,a=Dt((t=>{const r=Number(t.target.dataset.item||"0"),o=Math.min(i-1,Math.max(0,r));o!==e&&n(o)}),[i,e,n]);return Se("div",{className:Xo("carousel-pagination__wrapper"),role:"group",children:Se("ul",{className:Xo("carousel-pagination"),children:b()(t).call(t,((t,n)=>{const i=e===n;return Se("li",{className:Xo("carousel-pagination__item",i?"is-active":void 0),children:Se("button",{className:Xo("carousel-pagination__button"),type:"button",onClick:a,"data-item":n,"aria-disabled":i?"true":void 0,"aria-label":o(t,n)})},r(t,n,"pagination-item-"))}))})})}function ip({items:t,currentIndex:e,onChange:n,children:r}){const{t:o}=Oi(),i=t.length;return Se("div",{className:Xo("carousel-controls"),children:[Se("button",{className:Xo("button","button--previous"),"aria-label":o("carousel.controls.previous"),onClick:()=>{n((e-1+i)%i)},children:Se(ds,{name:"arrowLeft",size:"16"})}),r,Se("button",{className:Xo("button","button--next"),"aria-label":o("carousel.controls.next"),onClick:()=>{n((e+1)%i)},children:Se(ds,{name:"arrowRight",size:"16"})})]})}function ap(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function sp(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=ap(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=ap(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var cp=({id:t,action:e,buttonText:n,description:r,hasFocus:o,image:i,title:a,isCarouselItem:s})=>{const c=Rt(null),{sendMessage:l,sendAction:u,emitEvent:p}=Ca(),f=na(),h=Rt(),d=e.type===Hn?"a":"button",v=Dt((()=>p("action.click_card",{type:Un,originMessage:t,action:e})),[p,t,e]),y=Dt((()=>{if(v(),"ask"===e.type)l({body:e.ask});else if("topic"===e.type){const{topic:t,fallbackMessage:n}=e;u({type:"set_topic",body:{name:t,fallbackMessage:n}})}}),[l,e,u,v]),m=Lt((()=>e.type===Hn?{href:e.link,rel:"noopener noreferrer",target:e.newTab?"_blank":"_self",onClick:v}:{onClick:y}),[e,y,v]);return jt((()=>{s&&(o&&h.current?window.requestAnimationFrame((()=>c.current.focus())):c.current.blur()),h.current=!0}),[o,s]),Se("div",{className:Xo("card__wrapper"),id:t,tabIndex:"-1",ref:c,children:[Se("img",{className:Xo("card__image"),src:i,alt:""}),Se("div",{className:Xo("card__content"),id:t,children:[a&&Se("h2",{className:Xo("card__title"),children:a}),r&&Se("div",{className:Xo("card__description"),dangerouslySetInnerHTML:{__html:Fl(r)}}),Se(d,sp(sp({tabIndex:s&&!o?"-1":void 0,className:Xo("button","button--primary"),"aria-describedby":f},m),{},{children:n}))]})]})};function lp(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function up(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=lp(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=lp(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}function pp({item:t,items:e,index:n,isActive:r}){const{t:o}=Oi();return Se("div",{className:Xo("carousel-item",`carousel-item--${t.type}`),role:"group","aria-roledescription":"slide","aria-label":o("carousel.slide.label",{index:n+1,total:e.length}),children:Se(cp,up(up({},t),{},{isCarouselItem:!0,hasFocus:r}))})}const fp=(t,e,n)=>`${n}${e}`,hp=t=>t.label,dp=({target:t})=>{t.scrollLeft=0};function vp({currentIndex:t,onChange:e,getItemKey:n=fp,getItemLabel:r=hp,items:o}){const i=na(),a=o.length,[s,c]=It(Number(t||"0"));jt((()=>{c(Number(t||"0"))}),[c,t]);const l=Rt([]);l.current=Lt((()=>{var t,e;return b()(t=rp()(e=Array(a)).call(e,1)).call(t,(()=>({current:null})))}),[a]);const u=Rt(!0),p=Rt();return p.current=e,jt((()=>{u.current?u.current=!1:p.current&&p.current(s)}),[s]),Se("div",{className:Xo("carousel"),role:"group","aria-roledescription":"carousel",children:[Se("div",{className:Xo("carousel__slides-wrapper"),onScroll:dp,children:Se("div",{id:i,className:Xo("carousel__slides"),style:{width:100*a+"%",left:-100*s+"%"},"aria-live":"polite","aria-atomic":"false",children:b()(o).call(o,((t,e)=>{const r=s===e;return Se("div",{ref:l.current[e],className:Xo("carousel__slide",r?"is-active":void 0),"aria-hidden":r?void 0:"true",children:Se(pp,{item:t,items:o,currentIndex:s,index:e,isActive:r})},n(t,e,"item-"))}))})}),Se("div",{className:Xo("carousel__controls"),children:Se(ip,{currentIndex:s,items:o,onChange:c,controlId:i,children:Se("div",{className:Xo("carousel__pagination"),children:Se(op,{currentIndex:s,items:o,onChange:c,getItemKey:n,getItemLabel:r})})})})]})}const yp=(t,e,n="")=>`${n}${t.title}:${e}`,mp=t=>t.title;function gp(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function bp(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=gp(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=gp(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const _p=["event"];function wp(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function xp(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=wp(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=wp(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}function Tp(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ep(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Tp(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Tp(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Sp={message:{choice_prompt:t=>{var e,n;let{event:r,children:o}=t,i=L(t,Xc);const{t:a}=Oi(),s=na(),{body:c,subEvent:l,showOptions:u,chooseAgain:p,onChoiceClickHandler:f,onChooseAgainClickHandler:h}=nl(r);return Se(Y,{children:[b()(e=rt(o)).call(e,(t=>(t.props=el(el({},t.props),{},{event:l,descriptorId:s,showTranslationToggle:!1}),t))),p&&Se("button",{type:"button",className:Xo("button","button--secondary","button--choose-again"),"aria-expanded":u?"true":"false",onClick:h,"aria-describedby":s,children:[a(u?"message.choicePrompts.cancelChooseAgain":"message.choicePrompts.chooseAgain"),Se(ds,{name:"chevronDown",size:"8"})]}),u&&Se(Zc,el(el({type:"choice-prompt",showParticipant:!1,event:r},i),{},{children:Se("ul",{className:Xo("choice-prompt","choice-prompt--many"),children:b()(n=c.choices).call(n,(t=>Se("li",{className:Xo("choice-prompt__item",{[`choice-prompt__item--${t.category}`]:t.category}),children:Se("button",{type:"button",className:Xo("button","button--primary"),onClick:()=>{f(t)},children:t.text})},t.id)))})}))]})},text:pu,image:t=>{let{event:e,descriptorId:n}=t,r=L(t,Du);const[o]=ss(e),{description:i,url:a,isZoomable:s}=o,[c,l]=It(!1);return Se(Zc,Mu(Mu({event:e,type:"image"},r),{},{children:[Se("img",{src:a,id:n,alt:i,onLoad:()=>{l(!0)}}),s&&c&&Se(Lu,{description:i,url:a})]}))},splash:t=>{let{event:e}=t,n=L(t,Yu);const{payload:r}=e,[o]=ss(e),i=$l(r.id);return Se(Zc,Qu(Qu({type:"splash",event:e,onClick:i},n),{},{bodyProps:{dangerouslySetInnerHTML:{__html:su(Fl(o.text),o.variables)}}}))},video:t=>{let{event:e,descriptorId:n}=t,r=L(t,zu);const[o]=ss(e),{description:i,url:a}=o;return ci(e).push("message--type-video"),Se(Zc,$u($u({event:e,type:"video"},r),{},{children:[Se("div",{id:n,className:Xo("visually-hidden"),children:i}),Se("iframe",{title:i,src:a,allow:"autoplay; encrypted-media",allowFullScreen:!0})]}))},upload:t=>{let{event:e}=t,n=L(t,Zu);const{t:r}=Oi(),[o]=ss(e),{fromClient:i}=e.payload,{filename:a,url:s}=o,c=Lt((()=>r(s?"fileUpload.srFileDownloadText":"fileUpload.srFileUploadedText",{fileName:a})),[s,a,r]);return Se(Zc,tp(tp({event:e,type:"upload"},n),{},{children:Se(ep,{url:s,target:i?void 0:"_blank",children:[Se(ds,{name:"download",size:"16"}),Se("span",{"aria-hidden":"true",className:Xo("file-download"),children:a}),Se("span",{className:Xo("visually-hidden"),children:c})]})}))},cta:({event:t})=>{const[e]=ss(t),n=$l(t.payload.id),{emitEvent:r}=Ca(),o=na(),i=Dt((()=>r("action.click_cta",{type:Un,originMessage:t.payload.id,link:{url:e.buttonLink}})),[r,e,t]);return Se(Zc,{type:"cta",event:t,children:[Se("div",{className:Xo("cta__content"),id:o,dangerouslySetInnerHTML:{__html:Fl(e.description)},onClick:n}),Se("a",{className:Xo("button","button--primary"),"aria-describedby":o,href:e.buttonLink,rel:"noreferrer",target:e.buttonNewTab?"_blank":"_self",onClick:i,children:e.buttonText})]})},carousel:({event:t})=>{const[e]=ss(t),n=e.cards;return Se(Zc,{event:t,modifiers:"type-carousel",children:Se(vp,{items:n,ItemComponent:pp,getItemKey:yp,getItemLabel:mp})})},card:({event:t})=>{const[e]=ss(t),n=na();return Se(Zc,{type:"card",event:t,children:Se(cp,bp({id:n},e))})}},info:{text:pu,divider:t=>{let{event:e}=t,n=L(t,Hu);return Se(qu[Fn[e.payload.body.subtype]]||qu.default,function(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Vu(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Vu(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}({event:e},n))},translation:t=>{let{event:e}=t,n=L(t,Wu);const{t:r}=Oi(),[o]=ss(e);return Se(Zc,Ku(Ku({type:"text",event:e},n),{},{children:r(o.key.join("."),o.variables)}))},timeIndicator:qc},participant:{participant:({event:t})=>{const{agent:e}=function(){const{agentParticipant:t,userParticipant:e}=$e(be);return{agent:t,user:e}}(),{participant:n}=t.payload,[r]=ss(t),o=Lt((()=>r?au.render(Fl(r),n):void 0),[r,n]);if(!o)return null;const i=n.avatar||(null==e?void 0:e.avatar);return Se(Bc,{graphicSrc:i,graphicType:n.avatar?"avatar":void 0,iconName:i?void 0:"balloon",childrenHTML:o,dividerType:"participant"})}},service_data:{suggestion:t=>{let{event:e}=t,n=L(t,_p);const{userResponded:r}=He(),[o,i]=It(!0),{t:a}=Oi(),s=a("suggestions.headingText"),c=a("suggestions.footerText"),{sendAction:l,addMessageBubble:u}=Ca(),{suggestions:p,payload:f}=(t=>{const{payload:e}=t,[n]=ss(t);return{suggestions:n,payload:e}})(e),h=Dt((({id:t,question:e})=>{i(!1),l({type:jn,originMessage:f.id,body:{type:"faqclick",body:{faqId:t,faqQuestion:e}}}),u(e)}),[f,l,u,i]);return!o||r?null:Se("div",{className:Xo("suggestions","suggestions--conversation"),children:[s&&Se("p",{className:Xo("suggestions__heading"),children:s}),Se(Zc,xp(xp({type:"suggestions",showParticipant:!1,event:e},n),{},{children:[Se(Rc,{className:"suggestions__list--conversation",onClickSuggestion:h,suggestions:p}),c&&Se("p",{className:Xo("suggestions__footer"),children:c})]}))]})}}};var kp=({children:t})=>{const{customComponents:e}=He(),n=Lt((()=>{var t;return en()(t=N()(Sp)).call(t,((t,n)=>Ep(Ep({},t),{},{[n]:Ep(Ep({},Sp[n]),e?e[n]:{})})),{fallback:pu})}),[e]);return Se(Mc.Provider,{value:n,children:t})},Ap=()=>{const{t:t}=Oi(),{showDisclaimer:e}=He();return e&&Se("div",{className:Xo("disclaimer"),tabIndex:"0",children:[Se("h2",{className:Xo("disclaimer__title"),children:t("disclaimer.title")}),Se("div",{className:Xo("disclaimer__message"),dangerouslySetInnerHTML:{__html:t("disclaimer.content")}})]})},Op=()=>{const{t:t}=Oi(),e=Rt(null),n=mo(),r=ho().isLoading,{isOpen:o}=_a(),i=_o(),a=Ui();return jt((()=>{window.requestAnimationFrame((()=>{e.current&&(e.current.scrollTop=e.current.scrollHeight)}))}),[n,r,o]),Se(Y,{children:[o&&Se("a",{className:Xo("skip-link"),href:`#${i}`,onClick:t=>{t.preventDefault(),a()},children:t("skiplinkText")}),Se("div",{className:Xo("chat__body"),ref:e,children:Se("div",{className:Xo("conversation__container"),children:[Se(Ap,{}),Se("ol",{className:Xo("conversation"),children:[Se(kp,{children:(()=>{let t=null;return b()(n).call(n,(e=>{const{type:n,payload:r}=e,{participant:o,fromClient:i}=r;let a=!1;if("participant"!==n){const n=i?"seamly-client-participant":o;"info"!==e.type&&t!==n&&(a=!0),t=n}return Se(Wc,{event:e,newParticipant:a},e.payload.id)}))})()}),r&&Se(Kc,{})]})]})})]})},Cp=({baseClassName:t,children:e,title:n})=>{const r=_o(),o=na();return Se("section",{id:r,className:Xo(t),"aria-describedby":o,tabIndex:"-1",children:[Se("h2",{className:Xo(`${t}__title`),id:o,children:n}),e]})},Ip=()=>{const{t:t}=Oi(),e=Ui(),n=Pa(),{emitEvent:r}=Ca(),{isActive:o,remaining:i,timer:a,endCountdown:s}=Ya(),c=i>0,l=t(c?"idleDetachWarning.countdownTitle":"idleDetachWarning.notifyTransferText");return Se(Cp,{baseClassName:"idle",title:l,children:c&&Se(Y,{children:[Se("div",{className:Xo("idle__count-container"),children:o&&Se(Y,{children:[Se("span",{className:Xo("idle__count-text"),children:t("idleDetachWarning.countdownText")}),Se("span",{className:Xo("idle__count-timer"),children:t("idleDetachWarning.countdownTimer",a)})]})}),Se("div",{className:Xo("idle__options"),children:[Se("button",{type:"button",className:Xo("button","button--primary"),onClick:()=>{n(),s(!0),e(),r("idleTimer.selectContinue")},children:t("idleDetachWarning.continueButton")}),Se("button",{type:"button",className:Xo("button","button--primary"),onClick:()=>{s(),e(),r("idleTimer.selectEnd")},children:t("idleDetachWarning.detachButton")})]})]})})},Np=()=>{const{t:t}=Oi(),e=Pa(),{name:n}=xo()||{},{continueChat:r,restartChat:o}=Qa();return Se(Cp,{baseClassName:"prompt",title:t("resumeConversationPrompt.title",{name:n}),children:Se("div",{className:Xo("prompt__options"),children:[Se("button",{type:"button",className:Xo("button","button--primary"),onClick:()=>{e(),r()},children:t("resumeConversationPrompt.continueButton")}),Se("button",{type:"button",className:Xo("button","button--primary"),onClick:o,children:t("resumeConversationPrompt.detachButton")})]})})},jp=n(2088);function Pp(){return(Pp=jp||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}const Rp=["id","name","type","labelText","labelClass","contentHint","aria-describedby"];function Lp(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Dp(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Lp(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Lp(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var Up=function(t){let{id:e,name:n,type:r,labelText:o,labelClass:i,contentHint:a,"aria-describedby":s}=t,c=L(t,Rp);const{isSubmitted:l}=Bs(),[u,{error:p}]=Hs(n),f=l&&p,h=[];return s&&h.push(s),a&&h.push(`${e}-content-hint`),f&&h.push(`${e}-error`),Se(ic,{id:e,contentHint:a,validity:!f,errorText:p,labelText:o,labelClass:i,children:Se("input",Dp(Dp({id:e,name:n,type:r,"aria-invalid":f?"true":"false","aria-describedby":h.join(" ")||null},u),c))})};function Mp({controlName:t,skipLinkId:e}){const{t:n}=Oi(),{sendAssertive:r}=Na(),{emitEvent:o}=Ca(),i=(()=>{const{sendAction:t}=Ca(),{features:e}=Vi(),{typingPeekahead:n}=e||{},r=Rt(null),o=Rt(null),i=Rt(!1),a=Rt(null);jt((()=>()=>{clearInterval(a.current),clearTimeout(r.current),clearTimeout(o.current)}),[]);const s=(e,r)=>{t(function(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Da(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Da(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}({type:Pn,state:e},n&&n.enabled?{body:{currentMessage:r}}:{}))};return t=>{t.code&&"Enter"===t.code||13===t.keyCode||(i.current=!0,a.current||(s(!0,t.target.value),a.current=La()((()=>{i.current?n&&n.enabled&&s(!0,t.target.value):(clearInterval(a.current),a.current=null)}),2e3)),clearTimeout(r.current),clearTimeout(o.current),r.current=Ye()((()=>{i.current=!1}),300),o.current=Ye()((()=>{s(!1,t.target.value)}),2e3))}})(),{setBlockAutoEntrySwitch:a}=Fa(),{hasCharacterLimit:s,characterLimit:c,reachedCharacterWarning:u,reachedCharacterLimit:f,remainingChars:d}=function(t){const{t:e}=Oi(),{sendAssertive:n}=Na(),{hasLimit:r,limit:o}=(()=>{const{entryMeta:{options:{text:t}}}=ho(),{limit:e}=t||{};return{hasLimit:null!=e,limit:null!=e?e:null}})(),i=Lt((()=>sn(n,300)),[n]),a=Lt((()=>sn(((t,n)=>{t&&i(e("input.srCharacterLimitText",{limit:n}))}),300)),[i,e]),[{value:s}]=Hs(t),c=r&&s?o-s.length:o,l=!!r&&c<=50,u=!!r&&c<0;return jt((()=>{a(l,c)}),[l,c,a]),{hasCharacterLimit:r,characterLimit:o,reachedCharacterWarning:l,reachedCharacterLimit:u,remainingChars:c}}(t),[{value:y}]=Hs(t),g=!!y,b=Dt((()=>{u&&r(n("input.srCharacterLimitText",{limit:d})),o("ui.inputFocus")}),[n,r,u,d,o]),_=Lt((()=>n("input.inputPlaceholder",{hasLimit:s,limit:s?c:null})),[n,s,c]),w=Lt((()=>n("input.inputLabel",{hasLimit:s,limit:s?c:null})),[n,s,c]);return Pt((()=>(a(g),()=>{a(!1)})),[a,g]),Se(rc,{className:Xo("entry-form"),disableValidationClasses:!0,noValidate:"true",children:[Se("div",{className:Xo(["input--text__container",...u&&!f?["character-warning"]:[],...f?["character-exceeded"]:[]]),children:[Se(Up,{id:e,type:"text",name:t,className:Xo("input__text"),autocomplete:"off",placeholder:_,labelText:w,labelClass:Xo("visually-hidden"),"aria-invalid":s?f:null,onKeyUp:i,onFocus:b}),Se("div",{className:Xo("character-count"),children:u&&Se("span",{children:d})})]}),Se("button",{className:Xo("button","input__submit"),type:"submit","aria-disabled":!g||f?"true":null,children:Se(ds,{name:"send",size:"32",alt:n("input.sendMessage")})})]})}function zp(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Fp(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=zp(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=zp(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const $p="userText";function Bp(t){let e=Pp({},t);const{isOpen:n,setVisibility:r}=_a(),o=_o(),i=Ui(),{sendMessage:a}=Ca(),s=Dt(((t,{updateControlValue:e})=>{a({body:t.userText}),e($p,""),i(),n||r(ye.open)}),[a,i,n,r]);return Se(Gs,Fp(Fp({},e),{},{formId:"textEntry",persistData:!0,onSubmit:s,children:Se(Mp,{controlName:$p,skipLinkId:o})}))}var Hp=()=>{const{t:t}=Oi(),{showFileUpload:e,serviceAllowsUploads:n}=Zi(),[r,o]=It(n),i=Ui(),a=Rt(null),{setUserEntryType:s,activeEntry:c}=Fa(),l=Rt(null),{sendPolite:u}=Na(),p=!!xo();return jt((()=>{mn(l.current,(()=>{n||i()})),o(n)}),[n,i]),jt((()=>{a.current&&!n&&u(t("fileUpload.srUnavailableText")),!1===a.current&&n&&u(t("fileUpload.srAvailableText")),p&&(a.current=n)}),[n,p,u,t]),!e&&c!==Cn&&Se(xs,{isActive:r,transitionStartState:_s,children:Se("div",{className:Xo("upload-toggle-wrapper"),children:Se(xs,{isActive:r,transitionStartState:ws,children:Se("button",{className:Xo(["button","button--secondary","upload-toggle"]),ref:l,"aria-disabled":r?null:"true",type:"button",onClick:r?()=>{s(Cn),i()}:null,children:Se(ds,{name:"file",size:"32",alt:t("fileUpload.toggleButtonText")})})})})})},Vp=()=>{const{t:t}=Oi(),{currentUploads:e}=Xi();return Se("div",{className:Xo("progress"),children:b()(e).call(e,(({id:e,name:n,progress:r,uploading:o,error:i})=>Se("div",{className:Xo("progress_container"),children:[Se("div",{className:Xo("progress__text"),children:[Se("span",{className:Xo("progress__text--file-name"),children:n}),Se("span",{className:Xo("progress__text--percentage"),children:`${r}%`})]}),Se(oc,{error:i}),Se("progress",{className:Xo("progress__bar"),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-label":t("fileUpload.srProgressLabel",{fileName:n}),max:"100","aria-valuenow":r,value:r,"aria-busy":o,children:`${r}%`})]},e)))})};function qp({id:t,name:e,labelText:n,contentHint:r,outputText:o,accept:i}){const{isSubmitted:a}=Bs(),[s,c]=It(!1),[{onInput:l,onBlur:u},{error:p}]=Hs(e),f=na(),h=na(),d=na(),v=a&&p,y=[d];r&&y.push(h),v&&y.push(f);const m=Dt((()=>{c(!0)}),[c]),g=Dt((()=>{c(!1),u()}),[c,u]),b=Dt((t=>{const e={target:{value:t.target.files}};l(e)}),[l]);return Se("div",{className:Xo("upload__container"),children:[r&&Se("span",{className:Xo("upload__content-hint"),id:h,children:r}),Se(oc,{id:f,error:v&&p}),Se("div",{className:Xo(["file-upload",...s?["focus-within"]:[]]),children:Se("label",{htmlFor:t,className:Xo("upload__label"),children:[Se(ds,{name:"upload",size:"32"}),Se("div",{children:[Se("span",{className:Xo(["upload__label--text"]),children:n}),Se("input",{id:t,className:Xo("upload__input"),type:"file",name:e,onChange:b,"aria-invalid":v?"true":"false","aria-describedby":y.join(" "),accept:i||null,onFocus:m,onBlur:g}),Se("span",{className:Xo("upload__output"),"aria-hidden":"true",id:d,children:o})]})]})})]})}function Wp({skiplinkId:t,controlName:e,accept:n,contentHint:r,isUploading:o,isComplete:i,onClickCancel:a}){const{t:s}=Oi(),[{value:c}]=Hs(e),l=c&&c.length>0,u=l?c[0].name:"";return Se(rc,{className:Xo("upload-form"),children:[Se(qp,{name:e,id:t,accept:n,labelText:s("fileUpload.labelText"),outputText:s("fileUpload.selectedText",{hasFile:l,filename:u}),contentHint:r}),Se("div",{className:Xo("upload__button-container"),children:[Se("button",{id:o||!i?t:void 0,type:"button",onClick:a,className:Xo("button","button--secondary","upload__cancel"),children:s("fileUpload.cancelButtonText")}),Se("button",{className:Xo("button","button--primary"),type:"submit",children:s("fileUpload.uploadButtonText")})]})]})}const Gp="fileListForm",Kp="fileList";var Yp=()=>{const{t:t}=Oi(),{sendPolite:e,sendAssertive:n}=Na(),r=_o(),o=Ui(),{serviceAllowsUploads:i,allowedMimeTypes:a,maxSize:s}=Zi(),c=Rt(null),l=Rt(i),{cancelEntrySelection:u}=Fa(),{uploadFile:p,clearUploads:f,isUploading:h,isComplete:d}=Xi(),{hasFile:v,selectedFileName:y,uploadHandle:m,hasServerError:g,progress:b}=((t,e)=>{const n=Be(Ds,{formId:t,name:e},[t,e]),{currentUploads:r}=Xi(),o=n&&n.length>0;let i=null,a=!1,s=0;if(r&&r.length>0){const t=r[0];i=t.uploadHandle,a=!!t.error,s=t.progress}return{hasFile:o,selectedFileName:o?n[0].name:"",uploadHandle:i,hasServerError:a,progress:s}})(Gp,Kp),_=na(),w=Rt(!0),x=t("fileUpload.contentHint",{size:un(s)}),T=Rt(""),E=Rt(null);jt((()=>{T.current&&E.current.contains(document.activeElement)&&"INPUT"===document.activeElement.tagName&&n(x),T.current=x}),[x,n]),jt((()=>{if(b>0)switch(b){case 1:e(t("fileUpload.srStartedText"));break;default:e(`${b}%`)}}),[b,e,t]),jt((()=>{w.current||h||!d||(f(),u(),o(),Ye()((()=>{e(t("fileUpload.srCompleteText"))}),300)),w.current=d}),[h,d,f,u,o,e,t]);const S=Dt((({fileList:t})=>{p(t[0]),o()}),[p,!1,o]),k=Dt((()=>{m&&m.abort(),f(),u(),o()}),[m,f,u,o]),A=Lt((()=>({[Kp]:[_c((()=>i),t("fileUpload.errors.unavailable")),_c(xc,t("fileUpload.errors.noFile")),_c(wc,t("fileUpload.errors.tooLarge"),s)]})),[s,i,t]);return Se("div",{className:Xo(["upload",...g?["upload--error"]:[]]),ref:E,children:Se(Gs,{formId:Gp,persistData:!0,onSubmit:S,validationSchema:A,children:[(h||!d)&&Se(Y,{children:[Se(Vp,{}),Se("div",{className:Xo("upload__button-container"),children:Se("button",{id:h||!d?r:void 0,type:"button",onClick:k,ref:c,className:Xo("button","button--secondary","upload__cancel"),children:t("fileUpload.cancelButtonText")})})]}),!h&&d&&Se(Wp,{controlName:Kp,skiplinkId:r,accept:a.join(", "),contentHint:x,isComplete:d,isUploading:h,outputText:t("fileUpload.selectedText",{hasFile:v,filename:y}),onClickCancel:k}),!l.current&&Se(Y,{children:[Se("span",{className:Xo("notification"),id:_,children:t("fileUpload.unavailableText")}),Se("div",{className:Xo("upload__button-container"),children:Se("button",{id:h||!d?r:void 0,type:"button",onClick:k,className:Xo("button","button--secondary","upload__cancel"),children:t("fileUpload.cancelButtonText")})})]})]})})};function Jp(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Qp(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Jp(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Jp(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var Zp=()=>{const{isOpen:t}=_a(),e=Rt(null),{hasCountdown:n}=Ya(),[r,o]=It(n),{hasPrompt:i}=Qa(),[a,s]=It(i),c=Ui(),l=Rt(!1),{activeEntry:u}=Fa(),[p,f]=It({text:Bp,upload:Yp}),[h,d]=It((()=>u)),v=He(),{accountAllowsUploads:y}=Zi(),m=Dt((()=>{mn(e.current,(()=>{c()}))}),[c]);jt((()=>{const{customComponents:t}=v,{entry:e}=t||{};e&&f((t=>Qp(Qp({},t),e)))}),[v]),jt((()=>{m(),o(n),s(i)}),[n,i,m]),jt((()=>{d(u),m()}),[u,m,e]),l.current=!(!e.current||!e.current.contains(document.activeElement));const g=p[h];return Se("div",{className:Xo("chat__entry"),ref:e,children:[r&&Se(Ip,{}),a&&Se(Np,{}),Se("div",{className:Xo(["entry__body",...n||i?["entry__body--hidden"]:[]]),children:[h!==Cn&&y&&t&&Se(Hp,{}),Se(g,{})]})]})},Xp=n(6419),tf=n.n(Xp),ef=n(2462),nf=n.n(ef);function rf({controlName:t,describedById:e}){const{t:n}=Oi();return Se(rc,{noValidate:"true",className:Xo("options__form"),children:[Se(Up,{name:t,type:"email",className:Xo("transcript__input"),"aria-describedby":e,labelClass:Xo("label"),labelText:n("options.sendTranscript.label")}),Se("div",{className:Xo("options__actions"),children:Se("button",{type:"submit",className:Xo("button","button--primary","options__submit"),children:n("options.sendTranscript.sendButtonText")})})]})}const of="email",af={sendTranscript:()=>{const[t,e]=It(void 0),{hideOption:n}=Vi(),{focusButton:r}=qi(),{t:o}=Oi(),i=na(),{sendAction:a}=Ca(),s=Lt((()=>({[of]:[_c(Ec,o("options.sendTranscript.noEmailText")),_c(Tc,o("options.sendTranscript.invalidEmailText"))]})),[o]),c=Dt((t=>{var e;const o=ea()(e=t.email).call(e);a({type:"send_transcript",body:{emailAddress:o}}),n(),r()}),[a,n,r]),l=Dt((({isValid:t,isSubmitted:n})=>{e(n&&!t?"options--error":void 0)}),[e]);return Se(Ts,{className:t,headingText:o("options.sendTranscript.title"),cancelButtonText:o("options.cancelButtonText"),children:[Se("p",{className:Xo("options__description"),id:i,children:o("options.sendTranscript.description")}),Se(Gs,{formId:"sendTranscript",onSubmit:c,validationSchema:s,onError:l,children:Se(rf,{controlName:of,describedById:i})})]})}};var sf=()=>{const{optionActive:t}=Vi(),e=Rt(null),n=af[t||e.current];return t&&(e.current=t),n?Se(n,{}):null},cf=()=>{const{t:t}=Oi(),{menuOptions:e,showOption:n,panelActive:r,hideOption:o}=Vi(),{id:i}=qi(),a=Rt(null),[s,c]=It(!1),l=Rt(null),u=e.length,p=Rt(tf()({length:u},(()=>({current:null})))),f=Rt(!1),h=u>1,d=e[0],v=Lt((()=>{var t;return null==d||null===(t=d.name)||void 0===t?void 0:ea()(t).call(t).replace(/\s+/g,"")}),[d]);return jt((()=>()=>{clearTimeout(a.current)}),[]),jt((()=>{s&&!f.current&&requestAnimationFrame((()=>{requestAnimationFrame((()=>{const t=nf()(e).call(e,(t=>t.available)),n=-1===t?0:t;yn(p.current[n])}))})),f.current=s}),[s,e]),u?Se("div",{className:Xo("options__container"),onKeyDown:t=>{s&&(vn(t)===dn.Escape&&(c(!1),yn(l.current)),vn(t)===dn.Home&&(yn(p.current[0]),t.preventDefault()),vn(t)===dn.End&&(yn(p.current[u-1]),t.preventDefault()))},onfocusout:()=>{h&&(a.current=Ye()((()=>{c(!1)}),200))},onfocusin:()=>{clearTimeout(a.current)},children:[Se(xs,{transitionStartState:bs,isActive:r,children:Se("div",{className:Xo("options__dialog"),children:Se(sf,{})})}),h&&Se(xs,{isActive:s,transitionStartState:bs,children:Se("ul",{className:Xo(["options__menu"]),role:"menu",tabIndex:"-1","aria-labelledby":i,children:b()(e).call(e,(({name:r,title:o,available:i},a)=>Se("li",{className:Xo("options__menu__item"),role:"menuitem","data-testid":r,children:Se("button",{type:"button",ref:t=>{p.current[a]=t},className:Xo(["button","button--secondary"]),onKeyDown:t=>((t,e)=>{if(vn(t)===dn.ArrowDown){const n=Math.min(u-1,e+1);yn(p.current[e===n?0:n]),t.preventDefault()}if(vn(t)===dn.ArrowUp){const n=Math.max(0,e-1);yn(p.current[e===n?u-1:n]),t.preventDefault()}})(t,a),onKeyPress:t=>((t,n)=>{const r=String.fromCharCode(t.charCode);if(1!==r.length||!r.match(/\S/))return;let o=-1;T()(e).call(e,((t,e)=>{e>n&&t.title.charAt(0).toLowerCase()===r.toLowerCase()&&-1===o&&(o=e)})),-1!==o&&yn(p.current[o])})(t,a),onClick:()=>((t,e)=>{e&&(c(!1),n(t))})(r,i),"aria-disabled":i?null:"true",children:[Se("span",{className:Xo("button__text"),children:[o,!i&&" "]}),!i&&Se("span",{className:Xo("button__state"),children:t("options.unavailableText")})]})},r)))})}),Se("button",{type:"button",className:Xo(["button","button--secondary","chat__options__button",...!h&&v?[`chat__options__button--${v}`]:[]]),id:i,onClick:()=>{r&&o(),h?c((t=>!t)):d.available&&n(d.name)},onKeyDown:h?t=>{vn(t)===dn.ArrowDown&&(c(!0),t.preventDefault())}:null,ref:l,"aria-haspopup":h?"menu":null,"aria-expanded":h?s.toString():null,"aria-disabled":h||d.available?null:"true",children:[h&&Se(ds,{name:"options",size:"32"}),Se("span",{className:Xo("button__text"),children:h?t("options.openButtonText"):`${d.title}${d.available?"":" "}`}),!h&&!d.available&&Se("span",{className:Xo("button__state"),children:t("options.unavailableText")})]})]}):null};function lf(){const{menuOptions:t,allowOptionSelection:e}=Vi(),{isAvailable:n}=as();return n||e&&t.length?Se("div",{className:Xo("chat__options"),children:[n&&Se("div",{className:Xo("chat__options-item","chat__options-item--left"),children:Se(Oc,{})}),e&&Se("div",{className:Xo("chat__options-item","chat__options-item--right"),children:Se(cf,{})})]}):null}function uf(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}var pf=function({children:t,interruptComponent:e}){const{hasInterrupt:n,meta:r}=sa(),{isOpen:o}=_a();return Se(Y,{children:[Se(Ic,{}),Se("div",{className:Xo("chat__container"),children:n?o?Se(e,function(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=uf(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=uf(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}({},r)):null:t}),o&&Se(lf,{})]})};function ff(){const{preChatEvents:t,layoutMode:e}=He(),{hasInterrupt:n}=sa(),{isOpen:r}=_a(),o=!(n||!t.length||r);return o&&Se("ul",{className:Xo("pre-chat-messages",`pre-chat-messages--${e}`),"aria-hidden":!o,children:b()(t).call(t,(t=>Se("li",{className:Xo("pre-chat-messages__message"),children:Se(hf,{event:t})},t.payload.id)))})}function hf({event:t}){const[e]=zc(t);return Se(e,{event:t})}function df(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}const vf=()=>{const t=Ve(),e=xo(),{hasInterrupt:n}=sa(),r=e&&!n,o=r?e.avatar:t;return o?Se("img",{className:Xo(r?"avatar":"icon"),src:o,alt:""}):Se(ds,{name:"avatar",size:"32"})};var yf=({onClick:t})=>{const e=ii(),{t:n}=Oi(),r=n(e?"window.openButton.srContinue":"window.openButton.srStart"),o=Ui(),{isOpen:i}=_a(),a=bo(),s=Dt((()=>{t(),o()}),[o,t]);return Se(xs,{isActive:!i,transitionStartState:_s,children:Se("button",{className:Xo("window-open-button"),"aria-label":r,"aria-hidden":i,onClick:s,children:[Se("span",{className:Xo("message-count"),"aria-hidden":"true",children:!!a&&a}),Se(vf,{})]})})},mf=({onClick:t})=>{const{t:e}=Oi(),n=Dt((()=>t()),[t]);return Se("button",{type:"button",className:Xo("button","collapse-button"),onClick:n,children:Se(ds,{name:"chevronDown",size:"32",alt:e("window.srCollapseButton")})})};const gf={app:()=>(Ba(),Se(Dc,{children:Se(pf,{interruptComponent:Uc,children:[Se(Op,{}),Se(Zp,{})]})})),inline:()=>{Ba();const{isOpen:t}=_a(),{hasInterrupt:e,meta:n}=sa();return e&&!t?Se(Uc,function(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=df(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=df(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}({},n)):Se(Y,{children:[Se(xs,{isActive:!t,transitionStartState:_s,children:Se("div",{className:Xo("unstarted-wrapper","unstarted-wrapper--inline"),children:[Se(ff,{}),Se(Lc,{})]})}),Se(xs,{isActive:t,transitionStartState:_s,children:Se(Dc,{children:Se(pf,{interruptComponent:Uc,children:[t&&Se(Op,{}),Se(Zp,{})]})})})]})},window:()=>{const{openChat:t,closeChat:e}=Ba(),{isOpen:n}=_a(),r=ba(),{t:o}=Oi(),i=o("window.chat.continue"),a=Lt((()=>({payload:{body:{text:i}}})),[i]);return Se(Y,{children:[Se(yf,{onClick:t}),Se(xs,{isActive:!n&&!r,transitionStartState:_s,children:Se("div",{className:Xo("unstarted-wrapper","unstarted-wrapper--window"),children:Se(ff,{})})}),Se(xs,{isActive:!n&&r,transitionStartState:bs,children:Se("div",{className:Xo("unstarted-wrapper","unstarted-wrapper--window","unstarted-wrapper--continue"),children:Se(pu,{event:a})})}),Se(xs,{isActive:n,transitionStartState:bs,children:Se(Dc,{children:[n&&Se(mf,{onClick:e}),Se(pf,{interruptComponent:Uc,children:[Se(Op,{}),Se(Zp,{})]})]})})]})}};var bf=()=>{const[,t]=Li(),{namespace:e,layoutMode:n,zIndex:r}=He(),{isOpen:o,isVisible:i}=_a(),a=si(),s=ba(),{locale:c}=Oi(),l=gf[n],u=Dt((e=>{t(e)}),[t]),p=Lt((()=>{if(c&&document.querySelector("html").getAttribute("lang")!==c)return c}),[c]);if(!l)return console.warn('"layoutMode" should be one of "app", "inline" or "window"'),null;const f=["app",`app--layout-${n}`,`namespace--${e}`,...a];return o||"app"===n||f.push("app--collapsed"),s&&f.push("app--user-responded"),i&&Se("div",{className:Xo(f),lang:p,tabIndex:"-1","data-nosnippet":!0,style:{zIndex:r},ref:u,children:Se(l,{})})};function _f(t,e,n=[]){const r=Ut(ei),o=Rt();o.current=e,jt((()=>{if(!Gi()(n).call(n,Boolean))return;const e=(...t)=>{var e;return null===(e=o.current)||void 0===e?void 0:e.call(o,...t)};return r.emit("function.register",t,e),()=>r.emit("function.unregister",t,e)}),[r,t,...n])}var wf=()=>{const t=He(),{sendMessage:e,sendContext:n,sendAction:r}=Ca(),{setVisibility:o,visible:i}=_a(),a=Rt(i),s=Ut(ei),c=ni(),l=bo(),u=Rt(null),p=Rt(null),{isInline:f,isResolving:h}=Eo(),{hasInterrupt:d}=sa(),v=oi(),y=Rt(null),m=Pa(),{enableTranslations:g,disableTranslations:b}=as();return jt((()=>{a.current=i}),[i]),_f("askText",(t=>{e({body:t})}),[null==c?void 0:c.send]),_f("setVariables",(t=>{n({variables:t})}),[null==c?void 0:c.send]),_f("getVisibility",(t=>{t?t(a.current):console.warn("A callback function is required for the getVisibility action.")})),_f("setVisibility",(t=>{var e;rn()(e=S()(ye)).call(e,t)?(m(),o(t)):console.error('Requested visibility states should be "open", "minimized" ,"hidden" or null.')}),[null==t?void 0:t.api]),_f("sendCustomAction",((t,e)=>{r({type:"custom",body:{type:t,body:e}})}),[c.send]),_f("setTopic",(({name:t,fallbackMessage:e})=>{t&&e?r({type:"set_topic",body:{name:t,fallbackMessage:e}}):console.warn("A name and a fallbackMessage are required for the setTopic action.")}),[c.send]),_f("setTranslation",(({enabled:t,locale:e})=>{t?g(e):b()}),[c.send]),jt((()=>{h||d||(y.current&&y.current!==v&&s.emit("unreadMessageCount",l),i===ye.open&&i!==p.current&&0!==u.current&&s.emit("unreadMessageCount",0),i!==ye.open&&l!==u.current&&s.emit("unreadMessageCount",l),p.current=i,u.current=l,y.current=v)}),[l,i,s,f,h,d,v]),null};const{SET_EVENTS_READ:xf}=Bn;var Tf=()=>{const{t:t}=Oi(),e=mo(),n=ai(),{isOpen:r,isVisible:o}=_a(),{sendAction:i}=Ca(),a=bo(),{sendPolite:s}=Na(),c=Lt((()=>sn(s,2e3)),[s]),l=Rt(null),u=Rt(null);return jt((()=>{var t;if(!r)return;const o=b()(t=w()(e).call(e,(t=>Or(t)&&t.payload.messageStatus===In))).call(t,(t=>t.payload.id));o.length>0&&(n({type:xf,ids:o}),i({type:Rn,events:o}))}),[e,n,r,i]),jt((()=>{l.current!==o&&!o&&u.current&&u.current(),0!==a&&!r&&o&&(u.current=c(t("message.srTextUnreadCount",{unreadCount:a}))),l.current=o}),[a,r,o,c,t]),null},Ef=()=>{const{t:t}=Oi(),e=mo(),n=Rt(0),r=Rt(0),o=ho().historyLoaded,{sendPolite:i}=Na(),{isOpen:a}=_a(),s=Rt(null),c=Rt(null),l=Lt((()=>sn((e=>{const n=w()(e).call(e,(({payload:t})=>!t.fromClient&&!t.fromHistory)).length;n>r.current&&(i(t("message.srNewEventCount",{newCount:n-r.current})),r.current=n)}),1e3)),[i,t]);return jt((()=>{e.length>n.current&&(a&&(c.current=l(e)),n.current=e.length)}),[e,l,a]),jt((()=>{s.current&&!a&&c.current&&(c.current(!0),c.current=null)}),[a]),jt((()=>{o&&Ye()((()=>{i(t("window.srTexts.onHistoryLoad"))}),500)}),[o,t,i]),null},Sf=({children:t})=>{const e=Ut(ei),[n,r]=It({}),o=Rt(!0),i=Dt((t=>{o.current&&(r(t),e.emit("aria-live",t))}),[r,e]);jt((()=>{let t=null;return n&&n.messageText&&(t=Ye()((()=>{i({}),clearTimeout(t)}),500)),()=>{clearTimeout(t)}}),[n,i]),jt((()=>()=>{o.current=!1}),[]);const{ariaLive:a,messageText:s}=n;return Se(Ia.Provider,{value:i,children:[t,Se("div",{className:Xo("app__live-container"),children:[Se("div",{"aria-live":"assertive","aria-atomic":"true",className:Xo("visually-hidden"),children:a===Mn?s:null}),Se("div",{"aria-live":"polite","aria-atomic":"true",className:Xo("visually-hidden"),children:a===zn?s:null})]})]})},kf=()=>{const{hasCountdown:t,isActive:e,remaining:n,decrementCountdown:r}=Ya();return((t,e)=>{const n=Rt(t);jt((()=>{n.current=t}),[t]),jt((()=>{if(null!==e){const t=La()((function(){n.current()}),e);return()=>clearInterval(t)}}),[e])})((()=>{r()}),t&&e&&n>0?1e3:null),null},Af=({children:t})=>{const e=Rt(0),{sendAction:n}=Ca(),{hasCountdown:r,isActive:o,stopCountdown:i}=Ya(),a=Dt((()=>{const t=(new Date).getTime(),a=()=>{n({type:"interactivity_update"}),e.current=t};r&&o&&(a(),i()),t-e.current>15e3&&a()}),[n,r,o,i]);return Se("div",{className:Xo("activity-monitor"),tabIndex:"-1",onMouseDown:a,onKeyUp:a,onTouchStart:a,onMouseMove:a,onWheel:a,onPointerDown:a,onPointerMove:a,children:Se(ja.Provider,{value:a,children:t})})},Of=()=>{const{initUserSelectedOptions:t}=Vi(),e=Rt(!1),n=He();return jt((()=>{n.api&&!e.current&&(e.current=!0,t())}),[t,n]),null};const Cf=["serviceSettings"],{ADD_EVENT:If,ACK_EVENT:Nf,SET_IS_LOADING:jf,SET_PARTICIPANT:Pf,SET_HEADER_SUB_TITLE:Rf,SET_ACTIVE_SERVICE:Lf,INIT_RESUME_CONVERSATION_PROMPT:Df,CLEAR_EVENTS:Uf,SET_SERVICE_DATA_ITEM:Mf,SET_FEATURE_ENABLED_STATE:zf,SET_SERVICE_ENTRY_METADATA:Ff,SET_HISTORY:$f}=Bn,Bf=["text","choice_prompt","image","video"];var Hf=({eventBus:t})=>{const{t:e}=Oi(),n=ni(),r=ai(),o=mo(),i=Rt(null),{setUserSelectedOption:a}=Vi(),{initCountdown:s,endCountdown:c}=Ya(),{emitEvent:l}=Ca();return jt((()=>{if(n.connectionInfo){var e;const o=t=>{const{payload:e}=t;if(!e||!e.participant)return;const{fromClient:n,participant:o}=e;!n&&o.name&&r({type:Rf,title:o.name}),r({type:Pf,participant:o,fromClient:n}),o.introduction&&r({type:If,event:t})};n.stream().subscribe({next:e=>{const{type:n,payload:i}=e;switch(n){case"ui":switch(i.state&&i.state.hasOwnProperty("loading")&&r({type:jf,isLoading:i.state.loading}),i.type){case"idle_detach_countdown":s(i.body.duration);break;case"idle_detach_countdown_elapsed":c(void 0,!0);break;case"resume_conversation_prompt":r({type:Df});break;case"user_first_response":r($o(!0)),t.emit("system.userFirstResponse",i.body)}break;case"message":switch(o(i),i.type){case"text":case"choice_prompt":case"splash":case"image":case"upload":case"video":case"cta":case"custom":case"carousel":case"card":i.service&&i.service.serviceSessionId&&r({type:Lf,activeServiceSessionId:i.service.serviceSessionId}),r({type:If,event:e})}break;case"participant":o(e);break;case"service_data":i.persist&&r({type:Mf,payload:i});break;case"ack":r({type:Nf,event:e});break;case"system":if("service_changed"===i.type){const{serviceSettings:t}=i,e=L(i,Cf),{uploads:n,entry:o}=t;r({type:zf,key:$n,enabled:!(!n||!n.enabled)}),r({type:Ff,entryMeta:o}),r({type:Lf,activeServiceSessionId:i.serviceSessionId}),l("system.serviceChanged",e)}break;case"info":"divider"!==i.type&&"text"!==i.type&&"translation"!==i.type||r({type:If,event:e});break;case"error":switch(i.type){case"find_conversation_erred":r(zo(new Lo(e)));break;case"seamly_offline":r(zo(new ua(e))),r({type:Uf});break;default:r(zo(new ca(e)))}break;case"socket_opened":r(Fo())}}}),w()(e=n.stream()).call(e,(t=>"message"===t.type&&rn()(Bf).call(Bf,t.payload.type))).subscribe({next:({payload:e})=>{e.id!==i.current&&t.emit("message",e),i.current=e.id}})}}),[r,n,t,e,a,s,c,l]),jt((()=>{if(n.stream){const e=w()(t=n.stream()).call(t,(t=>"sync"===t.type)).subscribe({next:t=>{const{payload:e}=t,i=o[o.length-1],{id:a}=e.lastEvent;i&&a===i.payload.id||n.getConversation().then((t=>{t&&r({type:$f,history:t})})).catch((t=>{r(zo(t))}))}});return()=>{e.unsubscribe()}}var t;return()=>{}}),[n,o,r]),null};const{REGISTER_UPLOAD:Vf,SET_UPLOAD_PROGRESS:qf,SET_UPLOAD_ERROR:Wf,SET_UPLOAD_COMPLETE:Gf}=Bn;var Kf=({children:t})=>{const{t:e}=Oi(),n=ai(),r=ni(),{addUploadBubble:o}=Ca();return Se(Ki.Provider,{value:t=>{const i=Jt(),a=r.uploadFile(t,(t=>{n({type:qf,fileId:i,progress:Math.ceil(t)})}),(t=>{const{id:e,transactionId:r,occurredAt:a,body:{contentType:s,filename:c,filesize:l,url:u}}=t.body;n({type:Gf,fileId:i}),o(e,r,a,s,c,l,u)}),(t=>{let r;switch(t&&t.body?t.body.error:""){case"file_uploads_are_disabled":r=e("fileUpload.errors.unavailable");break;case"request_entity_too_large":r=e("fileUpload.errors.tooLarge");break;case"file_has_invalid_mime_type":r=e("fileUpload.errors.wrongType");break;case"virus_found":r=e("fileUpload.errors.virusFound");break;default:r=e("fileUpload.errors.general")}n({type:Wf,fileId:i,errorText:r})}));n({type:Vf,fileId:i,fileName:t.name,uploadHandle:a})},children:t})};const{createAction:Yf}=re("errors"),Jf=Yf("catch-error",(t=>({error:t})));function Qf({api:t}){return({getState:e})=>{const n=n=>{const{errorCallback:r,namespace:o,api:i,layoutMode:a}=be(e());null==r||r(n.error,{namespace:o,api:i,layoutMode:a,conversationUrl:t.getConversationUrl(),action:n.type?n:void 0})};return t=>e=>{try{return e.error&&n(e),t(e)}catch(t){throw n({error:t}),t}}}}var Zf=({store:t,children:e,config:n,eventBus:r,api:o})=>(function(e){var n=Ct(mt++,10),r=It();n.__=e=>t.dispatch(Jf(e)),gt.componentDidCatch||(gt.componentDidCatch=function(t){n.__&&n.__(t),r[1](t)}),r[0]}(),Se(ke,{store:t,children:Se(ei.Provider,{value:r,children:Se(ti.Provider,{value:o,children:Se(Sf,{children:Se(kp,{children:[Se(Of,{config:n}),Se(Hf,{eventBus:r}),Se(Tf,{}),Se(Ef,{}),Se(kf,{}),Se(Af,{children:[Se(wf,{}),Se(Kf,{children:e})]})]})})})})}));function Xf(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function th(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Xf(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Xf(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var eh=t=>Se(Zf,th(th({},t),{},{children:Se(bf,{})})),nh=n(3813),rh=n.n(nh),oh=n(1766),ih=n.n(oh);n(8604);var ah=n(9340),sh=n.n(ah),ch=t=>"function"==typeof t?t:function(){return t},lh="undefined"!=typeof self?self:null,uh="undefined"!=typeof window?window:null,ph=lh||uh||void 0,fh="closed",hh="errored",dh="joined",vh="joining",yh="leaving",mh="phx_close",gh="phx_error",bh="phx_reply",_h="phx_leave",wh=class{constructor(t,e,n,r){this.channel=t,this.event=e,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:t,response:e,_ref:n}){var r,o;T()(r=w()(o=this.recHooks).call(o,(e=>e.status===t))).call(r,(t=>t.callback(e)))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,(t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)})),this.timeoutTimer=Ye()((()=>{this.trigger("timeout",{})}),this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},xh=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=Ye()((()=>{this.tries=this.tries+1,this.callback()}),this.timerCalc(this.tries+1))}},Th=class{static request(t,e,n,r,o,i,a){if(ph.XDomainRequest){let n=new ph.XDomainRequest;this.xdomainRequest(n,t,e,r,o,i,a)}else{let s=new ph.XMLHttpRequest;this.xhrRequest(s,t,e,n,r,o,i,a)}}static xdomainRequest(t,e,n,r,o,i,a){t.timeout=o,t.open(e,n),t.onload=()=>{let e=this.parseJSON(t.responseText);a&&a(e)},i&&(t.ontimeout=i),t.onprogress=()=>{},t.send(r)}static xhrRequest(t,e,n,r,o,i,a,s){t.open(e,n,!0),t.timeout=i,t.setRequestHeader("Content-Type",r),t.onerror=()=>{s&&s(null)},t.onreadystatechange=()=>{if(4===t.readyState&&s){let e=this.parseJSON(t.responseText);s(e)}},a&&(t.ontimeout=a),t.send(o)}static parseJSON(t){if(!t||""===t)return null;try{return JSON.parse(t)}catch(e){return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let n=[];for(var r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let o=e?`${e}[${r}]`:r,i=t[r];"object"==typeof i?n.push(this.serialize(i,o)):n.push(encodeURIComponent(o)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(t,e){if(0===N()(e).length)return t;let n=t.match(/\?/)?"&":"?";return`${t}${n}${this.serialize(e)}`}},Eh=class{constructor(t){this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=0,this.poll()}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/websocket"),"$1/longpoll")}endpointURL(){return Th.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(){this.close(),this.readyState=0}ontimeout(){this.onerror("timeout"),this.closeAndRetry()}poll(){var t;1!==this.readyState&&0!==this.readyState||Th.request("GET",this.endpointURL(),"application/json",null,this.timeout,i()(t=this.ontimeout).call(t,this),(t=>{if(t){var{status:e,token:n,messages:r}=t;this.token=n}else e=0;switch(e){case 200:T()(r).call(r,(t=>{Ye()((()=>{this.onmessage({data:t})}),0)})),this.poll();break;case 204:this.poll();break;case 410:this.readyState=1,this.onopen(),this.poll();break;case 403:this.onerror(),this.close();break;case 0:case 500:this.onerror(),this.closeAndRetry();break;default:throw new Error(`unhandled poll status ${e}`)}}))}send(t){var e;Th.request("POST",this.endpointURL(),"application/json",t,this.timeout,i()(e=this.onerror).call(e,this,"timeout"),(t=>{t&&200===t.status||(this.onerror(t&&t.status),this.closeAndRetry())}))}close(t,e){this.readyState=3,this.onclose()}},Sh={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(sh()(n))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[n,r,o,i,a]=JSON.parse(t);return e({join_ref:n,ref:r,topic:o,event:i,payload:a})}},binaryEncode(t){let{join_ref:e,ref:n,event:r,topic:o,payload:i}=t,a=this.META_LENGTH+e.length+n.length+o.length+r.length,s=new ArrayBuffer(this.HEADER_LENGTH+a),c=new DataView(s),l=0;c.setUint8(l++,this.KINDS.push),c.setUint8(l++,e.length),c.setUint8(l++,n.length),c.setUint8(l++,o.length),c.setUint8(l++,r.length),tf()(e,(t=>c.setUint8(l++,t.charCodeAt(0)))),tf()(n,(t=>c.setUint8(l++,t.charCodeAt(0)))),tf()(o,(t=>c.setUint8(l++,t.charCodeAt(0)))),tf()(r,(t=>c.setUint8(l++,t.charCodeAt(0))));var u=new Uint8Array(s.byteLength+i.byteLength);return u.set(new Uint8Array(s),0),u.set(new Uint8Array(i),s.byteLength),u.buffer},binaryDecode(t){let e=new DataView(t),n=e.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(t,e,r);case this.KINDS.reply:return this.decodeReply(t,e,r);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,r)}},decodePush(t,e,n){let r=e.getUint8(1),o=e.getUint8(2),i=e.getUint8(3),a=this.HEADER_LENGTH+this.META_LENGTH-1,s=n.decode(Gt()(t).call(t,a,a+r));a+=r;let c=n.decode(Gt()(t).call(t,a,a+o));a+=o;let l=n.decode(Gt()(t).call(t,a,a+i));return a+=i,{join_ref:s,ref:null,topic:c,event:l,payload:Gt()(t).call(t,a,t.byteLength)}},decodeReply(t,e,n){let r=e.getUint8(1),o=e.getUint8(2),i=e.getUint8(3),a=e.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(Gt()(t).call(t,s,s+r));s+=r;let l=n.decode(Gt()(t).call(t,s,s+o));s+=o;let u=n.decode(Gt()(t).call(t,s,s+i));s+=i;let p=n.decode(Gt()(t).call(t,s,s+a));s+=a;let f=Gt()(t).call(t,s,t.byteLength);return{join_ref:c,ref:l,topic:u,event:bh,payload:{status:p,response:f}}},decodeBroadcast(t,e,n){let r=e.getUint8(1),o=e.getUint8(2),i=this.HEADER_LENGTH+2,a=n.decode(Gt()(t).call(t,i,i+r));i+=r;let s=n.decode(Gt()(t).call(t,i,i+o));return i+=o,{join_ref:null,ref:null,topic:a,event:s,payload:Gt()(t).call(t,i,t.byteLength)}}};function kh(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ah(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=kh(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=kh(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var Oh=n(1905),Ch=n.n(Oh);function Ih(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Nh(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Ih(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Ih(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const jh=Ch()("seamly");class Ph{constructor(t,e,n,r){this.url=t,this.accessToken=r,this.channelName=e,this.channelTopic=n,this.connect(),this.socket.onError((t=>{jh("[SOCKET][ERROR]",t),this.emit({type:"error",payload:{type:"seamly_offline",error:t}})})),this.socket.onOpen((()=>{jh("[SOCKET]OPEN"),this.emit({type:"socket_opened"})})),this.channel.on("system",(t=>{switch(t.type){case"attach_channel_succeeded":this.emit({type:"connection",connected:!0,ready:!0})}})),this.socket.onClose((()=>{jh("[SOCKET]CLOSE"),this.emit({type:"connection",connected:!1,ready:!1})})),this.channel.onClose((()=>{jh("[CHANNEL]CLOSE"),this.emit({type:"connection",connected:!1,ready:!1})})),this.channel.onError((t=>{jh("[CHANNEL][ERROR]",t),this.emit({type:"connection",connected:!1,ready:!1})})),this.listenTo("ack"),this.listenTo("ui"),this.listenTo("error"),this.listenTo("participant",((t,e)=>Nh(Nh({},e),{},{type:t}))),this.listenTo("message"),this.listenTo("service_data"),this.listenTo("system"),this.listenTo("info"),this.listenTo("sync")}start(t){this.listener=t,this.channel.join().receive("ok",(()=>{jh("[CHANNEL][JOIN] OK"),this.emit({type:"connection",connected:!0,ready:!1})})).receive("error",(t=>{jh("[CHANNEL][JOIN] ERROR",t),this.emit({type:"error",payload:{type:"join_channel_erred",error:t}}),this.emit({type:"connection",connected:!1,ready:!1}),this.channel.socket.disconnect()})).receive("timeout",(()=>{jh("[CHANEL][JOIN] Networking issue. Still waiting...")}))}stop(){this.listener=null}connect(){const{url:t,params:e}=(t=>{var e;const n=Xe()(t).call(t,"?");return n<0?{url:t,params:{}}:{url:Gt()(t).call(t,0,n),params:en()(e=Gt()(t).call(t,n+1).split("&")).call(e,(function(t,e){const[n,r]=e.split("=");return Ah(Ah({},t),{},{[n]:decodeURIComponent(r)})}),{})}})(this.url);this.socket=new class{constructor(t,e={}){var n,r;this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=e.timeout||1e4,this.transport=e.transport||ph.WebSocket||Eh,this.establishedConnections=0,this.defaultEncoder=i()(n=Sh.encode).call(n,Sh),this.defaultDecoder=i()(r=Sh.decode).call(r,Sh),this.closeWasClean=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==Eh?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let o=null;uh&&uh.addEventListener&&(uh.addEventListener("pagehide",(t=>{this.conn&&(this.disconnect(),o=this.connectClock)})),uh.addEventListener("pageshow",(t=>{o===this.connectClock&&(o=null,this.connect())}))),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=t=>e.rejoinAfterMs?e.rejoinAfterMs(t):[1e3,2e3,5e3][t-1]||1e4,this.reconnectAfterMs=t=>e.reconnectAfterMs?e.reconnectAfterMs(t):[10,50,100,150,200,250,500,1e3,2e3][t-1]||5e3,this.logger=e.logger||null,this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=ch(e.params||{}),this.endPoint=`${t}/websocket`,this.vsn=e.vsn||"2.0.0",this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new xh((()=>{this.teardown((()=>this.connect()))}),this.reconnectAfterMs)}replaceTransport(t){this.disconnect(),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=Th.appendParams(Th.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return"/"!==t.charAt(0)?t:"/"===t.charAt(1)?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,n){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(t,e,n)}connect(t){this.connectClock++,t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ch(t)),this.conn||(this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t))}log(t,e,n){this.logger(t,e,n)}hasLogger(){return null!==this.logger}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onConnOpen(){var t;this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),T()(t=this.stateChangeCallbacks.open).call(t,(([,t])=>t()))}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.abnormalClose("heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,clearTimeout(this.heartbeatTimer),Ye()((()=>this.sendHeartbeat()),this.heartbeatIntervalMs))}teardown(t,e,n){if(!this.conn)return t&&t();this.waitForBufferDone((()=>{this.conn&&(e?this.conn.close(e,n||""):this.conn.close()),this.waitForSocketClosed((()=>{this.conn&&(this.conn.onclose=function(){},this.conn=null),t&&t()}))}))}waitForBufferDone(t,e=1){5!==e&&this.conn&&this.conn.bufferedAmount?Ye()((()=>{this.waitForBufferDone(t,e+1)}),150*e):t()}waitForSocketClosed(t,e=1){5!==e&&this.conn&&3!==this.conn.readyState?Ye()((()=>{this.waitForSocketClosed(t,e+1)}),150*e):t()}onConnClose(t){var e;let n=t&&t.code;this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(),clearTimeout(this.heartbeatTimer),this.closeWasClean||1e3===n||this.reconnectTimer.scheduleTimeout(),T()(e=this.stateChangeCallbacks.close).call(e,(([,e])=>e(t)))}onConnError(t){var e;this.hasLogger()&&this.log("transport",t);let n=this.transport,r=this.establishedConnections;T()(e=this.stateChangeCallbacks.error).call(e,(([,e])=>{e(t,n,r)})),(n===this.transport||r>0)&&this.triggerChanError()}triggerChanError(){var t;T()(t=this.channels).call(t,(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(gh)}))}connectionState(){switch(this.conn&&this.conn.readyState){case 0:return"connecting";case 1:return"open";case 2:return"closing";default:return"closed"}}isConnected(){return"open"===this.connectionState()}remove(t){var e;this.off(t.stateChangeRefs),this.channels=w()(e=this.channels).call(e,(e=>e.joinRef()!==t.joinRef()))}off(t){for(let n in this.stateChangeCallbacks){var e;this.stateChangeCallbacks[n]=w()(e=this.stateChangeCallbacks[n]).call(e,(([e])=>-1===Xe()(t).call(t,e)))}}channel(t,e={}){let n=new class{constructor(t,e,n){this.state=fh,this.topic=t,this.params=ch(e||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new wh(this,"phx_join",this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new xh((()=>{this.socket.isConnected()&&this.rejoin()}),this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError((()=>this.rejoinTimer.reset()))),this.stateChangeRefs.push(this.socket.onOpen((()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()}))),this.joinPush.receive("ok",(()=>{var t;this.state=dh,this.rejoinTimer.reset(),T()(t=this.pushBuffer).call(t,(t=>t.send())),this.pushBuffer=[]})),this.joinPush.receive("error",(()=>{this.state=hh,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()})),this.onClose((()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=fh,this.socket.remove(this)})),this.onError((t=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,t),this.isJoining()&&this.joinPush.reset(),this.state=hh,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()})),this.joinPush.receive("timeout",(()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new wh(this,_h,ch({}),this.timeout).send(),this.state=hh,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()})),this.on(bh,((t,e)=>{this.trigger(this.replyEventName(e),t)}))}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(t){this.on(mh,t)}onError(t){return this.on(gh,(e=>t(e)))}on(t,e){let n=this.bindingRef++;return this.bindings.push({event:t,ref:n,callback:e}),n}off(t,e){var n;this.bindings=w()(n=this.bindings).call(n,(n=>!(n.event===t&&(void 0===e||e===n.ref))))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,n=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new wh(this,t,(function(){return e}),n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=yh;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(mh,"leave")},n=new wh(this,_h,ch({}),t);return n.receive("ok",(()=>e())).receive("timeout",(()=>e())),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(t,e,n){return e}isMember(t,e,n,r){return!(this.topic!==t||r&&r!==this.joinRef()&&(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:n,joinRef:r}),1))}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=vh,this.joinPush.resend(t))}trigger(t,e,n,r){var o;let i=this.onMessage(t,e,n,r);if(e&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let a=w()(o=this.bindings).call(o,(e=>e.event===t));for(let t=0;t<a.length;t++)a[t].callback(i,n,r||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===fh}isErrored(){return this.state===hh}isJoined(){return this.state===dh}isJoining(){return this.state===vh}isLeaving(){return this.state===yh}}(t,e,this);return this.channels.push(n),n}push(t){if(this.hasLogger()){let{topic:e,event:n,payload:r,ref:o,join_ref:i}=t;this.log("push",`${e} ${n} (${i}, ${o})`,r)}this.isConnected()?this.encode(t,(t=>this.conn.send(t))):this.sendBuffer.push((()=>this.encode(t,(t=>this.conn.send(t)))))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimer=Ye()((()=>this.heartbeatTimeout()),this.heartbeatIntervalMs))}abnormalClose(t){this.closeWasClean=!1,this.isConnected()&&this.conn.close(1e3,t)}flushSendBuffer(){var t;this.isConnected()&&this.sendBuffer.length>0&&(T()(t=this.sendBuffer).call(t,(t=>t())),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,(t=>{let{topic:e,event:n,payload:r,ref:o,join_ref:i}=t;o&&o===this.pendingHeartbeatRef&&(clearTimeout(this.heartbeatTimer),this.pendingHeartbeatRef=null,Ye()((()=>this.sendHeartbeat()),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${r.status||""} ${e} ${n} ${o&&"("+o+")"||""}`,r);for(let t=0;t<this.channels.length;t++){const a=this.channels[t];a.isMember(e,n,r,i)&&a.trigger(n,r,o,i)}for(let e=0;e<this.stateChangeCallbacks.message.length;e++){let[,n]=this.stateChangeCallbacks.message[e];n(t)}}))}leaveOpenTopic(t){var e;let n=Tn()(e=this.channels).call(e,(e=>e.topic===t&&(e.isJoined()||e.isJoining())));n&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),n.leave())}}(t,{params:Nh(Nh({},e),{},{v:We})}),this.socket.connect(),this.channel=this.socket.channel(this.channelTopic,{authorization:`Bearer ${this.accessToken}`,channelName:this.channelName})}disconnect(){return new(Rr())((t=>{this.socket.disconnect(t)}))}listenTo(t,e=null){this.channel.on(t,(n=>{jh("[RECEIVE]",t,n),this.emit({type:t,payload:e?e(t,n):n})}))}emit(t){this.listener&&this.listener.next(t)}push(t,e,n){this.channel.push(t,e,n)}}function Rh(t){const e="cvco."+t;return{get(){var t;const n=[e,Gt()(t=e.split(".")).call(t,0,-1).join(".")];let r;do{r=sessionStorage.getItem(n[0])}while(n.shift()&&!r);return JSON.parse(r)},set(t){t&&sessionStorage.setItem(e,sh()(t))}}}class Lh{constructor(t){this.name=t}emit(t){this.listener&&this.listener.next(t)}start(t){this.listener=t}stop(){this.listener=null}}function Dh(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Uh(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Dh(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Dh(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Mh=Ch()("seamly");function zh(){if(!Intl||"undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;const t=Intl.DateTimeFormat();if(void 0===t||void 0===t.resolvedOptions)return null;const e=t.resolvedOptions().timeZone;return e&&(Xe()(e).call(e,"/")>-1||"UTC"===e)?e:null}class Fh{constructor({layoutMode:t,namespace:e,config:n={},context:r={}}){var o;this.store=function(t,e){const n=e(t),r=n.get()||{};return{get:t=>void 0===t?r:r[t],set:(t,e)=>(r[t]=e,n.set(r),e),delete(t){const e=this.get(t);return delete r[t],n.set(r),e}}}(`${e}.connection${r.locale?"."+r.locale:""}`,n.storageProvider||Rh),this.connectionInfo={apiKey:n.key,domain:n.domain||"api.seamly-app.com",secure:!1!==n.secure&&(n.secure||!0)},this.config={sendEnvironment:n.sendEnvironment??!0,context:Uh(Uh({},r),{},{channelName:r.channelName||"web"})},this.connected=!1,this.configReady=!1,this.externalId=n.externalId,this.layoutMode=t,this.internalProducer=new Lh("API"),this.internal$=rh().create(this.internalProducer).flatten(),this.connection$=w()(o=this.internal$).call(o,(t=>"connection"===t.type)),this.connection$.subscribe({next:({connected:t,ready:e})=>{this.connected=t,this.ready=e}}),this.URLS={}}getAccessToken(){return this.store.get("accessToken")}setAccessToken(t){this.store.set("accessToken",t)}getConversationUrl(){return this.store.get("conversationUrl")}setConversationUrl(t){this.store.set("conversationUrl",t)}hasConversation(){return!!this.getConversationUrl()}getChannelTopic(){return this.store.get("channelTopic")||this.store.get("channelName")}setChannelTopic(t){this.store.set("channelTopic",t)}clearStore(){this.store.delete("accessToken"),this.store.delete("conversationUrl"),this.store.delete("channelName"),this.store.delete("channelTopic")}getUrlPrefix(t){return`${this.connectionInfo.secure?`${t}s`:t}://${this.connectionInfo.domain}`}updateUrls({_links:t}){var e,n;this.URLS=en()(e=w()(n=C()(t)).call(n,(([t])=>"self"!==t))).call(e,((t,[e,{href:n}])=>Uh(Uh({},t),{},{[e]:n})),this.URLS)}async reset(){return await this.disconnect(),this.clearStore(),this.getConfig()}async disconnect(){this.conversationProducer&&await this.conversationProducer.disconnect(),this.connected=!1,this.configReady=!1}async createConversation(){try{const t=ih().post(`${this.getUrlPrefix("http")}${this.URLS.conversations}`).set("Content-Type","application/json").query({v:We}).withCredentials().send({externalId:this.externalId||void 0}),{body:e}=await t,{conversation:n}=e,r=Uh({},n);return delete r.accessToken,delete r.channelTopic,this.setAccessToken(n.accessToken),this.setChannelTopic(n.channelTopic),this.updateUrls(e),this.setConversationUrl(this.URLS.conversation),r}catch(t){if(t.status>=500)throw new ca(t);throw t}}getConfig(){return ih().post(`${this.getUrlPrefix("http")}/client/${this.connectionInfo.apiKey}/configs`).set("Content-Type","application/json").query({v:We}).send({context:Uh(Uh({},this.config.context),{},{environment:!0===this.config.sendEnvironment?this.getEnvironment():this.config.sendEnvironment})}).then((({body:t})=>(this.updateUrls(t),this.configReady=!0,t.config))).catch((t=>{if(404===t.status)throw new la;if(t.status>=500)throw new ca(t);throw t}))}async getConversation(){if(!this.hasConversation())return null;try{const{body:t}=await ih().get(`${this.getUrlPrefix("http")}${this.URLS.history}`).set("Authorization",`Bearer ${this.getAccessToken()}`).query({v:We});this.updateUrls(t);const{messages:e,participants:n,activeServiceSessionId:r,activeServiceSettings:o,serviceData:i,ui:a,translation:s}=t.history;return{events:b()(e).call(e,(([t,e])=>({type:t,payload:Uh(Uh({},e),{},{type:"participant"===t?t:e.type})}))),participants:n,activeServiceSessionId:r,activeServiceSettings:o,serviceData:i,resumeConversationPrompt:!!a&&Boolean(a.resumeConversationPrompt),translation:s}}catch(t){if(401===t.status)throw new pa(t);if(404===t.status)throw new Lo(t);if(t.status>=500)throw new ca(t);throw t}}async connect(){this.connected=!1;let t=null;return this.hasConversation()||(t=await this.createConversation()),this.conversationProducer=new Ph(`${this.getUrlPrefix("ws")}${this.URLS.socket}`,this.config.context.channelName,this.getChannelTopic(),this.getAccessToken()),this.internalProducer.emit(rh().create(this.conversationProducer)),this.config.sendEnvironment&&this.send("context",{environment:!0===this.config.sendEnvironment?this.getEnvironment():this.config.sendEnvironment},!1),t}uploadFile(t,e,n,r){const o=new FormData;o.append("upload",t);const i=ih().post(`${this.getUrlPrefix("http")}${this.URLS.uploads}`).set("Authorization",`Bearer ${this.getAccessToken()}`).send(o);return i.on("progress",(function(t){const{direction:n,percent:r}=t;"upload"===n&&"function"==typeof e&&e(r)})),i.then((t=>{n&&n(t)})).catch((t=>{if(!r)throw t;r(t.response)})),i}getConversationIntitialState(){return ih().get(`${this.getUrlPrefix("http")}${this.getConversationUrl()}`).set("Authorization",`Bearer ${this.getAccessToken()}`).query({v:We}).then((({body:t})=>(this.updateUrls(t),((t,e)=>{var n;return en()(n=N()(t)).call(n,((n,r)=>(rn()(e).call(e,r)||(n[r]=t[r]),n)),{})})(t.conversation,["accessToken","channelTopic"])))).catch((t=>{if(401===t.status)throw new pa(t);if(404===t.status)throw new Lo(t);if(t.status>=500)throw new ca(t);throw t}))}async getTranslations(t){try{const e=`${this.getUrlPrefix("http")}${this.URLS.translations}`.replace("{version}",String(1)).replace("{locale}",t),n=ih().get(e),{body:r}=await n;return r.translations}catch(t){if(t.status>=500)throw new ca(t);throw t}}send(t,e,n=!0){var r;!this.connected||n&&!this.ready?w()(r=this.connection$).call(r,(t=>n?t.connected&&t.ready:t.connected)).take(1).subscribe({next:()=>this.send(t,e,n)}):(Mh("[SEND]",t,e),this.conversationProducer.push(t,function(t,e){if("message"!==t)return e;const{type:n,body:r}=e;let{transactionId:o}=e;return o||(o=Jt()),{type:n,body:r,transactionId:o}}(t,e),1e4))}sendContext(t={}){const{locale:e,variables:n}=t,r={};if(e){if("string"!=typeof e)throw new Error("Locale must be a string");r.locale=e}if(n){if("object"!=typeof n)throw new Error("Variables must be an object");r.variables=n}0===N()(r).length&&r.constructor===Object||this.send("context",r,!1)}stream(){var t;return w()(t=this.internal$).call(t,(t=>"connection"!==t.type))}getEnvironment(){return{clientName:"@seamly/web-ui",clientVariant:this.layoutMode,clientVersion:"20.1.0",currentUrl:window.location.toString(),screenResolution:`${window.screen.width}x${window.screen.height}`,timezone:zh(),userAgent:navigator.userAgent}}}function $h(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(o){return"function"==typeof o?o(n,r,t):e(o)}}}}var Bh=$h();Bh.withExtraArgument=$h;var Hh=Bh;function Vh(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function qh(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Vh(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Vh(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}function Wh({api:t}){return()=>e=>n=>{const r=e(n);switch(n.type){case Bn.SET_USER_SELECTED_OPTIONS:t.store.set("options",n.options);break;case Bn.SET_USER_SELECTED_OPTION:t.store.set("options",qh(qh({},t.store.get("options")||{}),{},{[n.option]:n.value}))}return r}}const Gh={events:[],initialState:{},unreadEvents:0,isLoading:!1,idleDetachCountdown:{hasCountdown:!1,isActive:!1},resumeConversationPrompt:!1,serviceInfo:{activeServiceSessionId:""},participantInfo:{participants:{},currentAgent:""},headerTitles:{title:null,subTitle:""},historyLoaded:!1,skiplinkTargetId:Jt(),optionsButtonId:Jt(),headerCollapseButtonId:Jt(),serviceData:{},options:{features:{},panelActive:!1,optionActive:"",userSelectedOptions:{}},showFileUpload:!1,currentUploads:[],entryMeta:{default:On,active:On,userSelected:null,blockAutoEntrySwitch:!1,options:{},optionsOverride:{}},seamlyContainerElement:null};function Kh(t=Gh,e){return e.type===String(Bo.pending)?Gh:((t,e)=>{var n,r,o,i,a,s,c,l,u,p;switch(e.type){case Vn:const{type:f,payload:h}=e.event,d=t.options.features.hasOwnProperty($n),v=jr(t.entryMeta,h);let y=Sn({},t.options);if(d&&(f===kn.message||f===kn.participant)&&!h.fromClient){const{type:t}=h.entry||{};y=Sn(Sn({},y),{},{features:Sn(Sn({},y.features),{},{uploads:Sn(Sn({},y.features.uploads),{},{enabledFromEntry:t===Cn})})})}const m=Or(e.event);return Tn()(n=t.events).call(n,(t=>t.payload.id===h.id))?t:Sn(Sn({},t),{},{entryMeta:d||v.active!==Cn?v:Sn({},t.entryMeta),options:y,unreadEvents:m?t.unreadEvents+1:t.unreadEvents,events:[...t.events,Sn(Sn({},e.event),{},{payload:Sn(Sn({},m&&{messageStatus:h.fromClient?Nn:In}),h)})]});case Kn:if(!e.event.payload.transactionId)return console.warn("ACK received without transaction ID."),t;const g=Tn()(r=t.events).call(r,(t=>t.payload.transactionId===e.event.payload.transactionId)),{id:_,occurredAt:x}=e.event.payload;return g?Sn(Sn({},t),{},{events:Cr(b()(o=t.events).call(o,(t=>t.payload.id===g.payload.id?Sn(Sn({},t),{},{payload:Sn(Sn({},t.payload),{},{id:_,occurredAt:x})}):t)))}):t;case qn:return Sn(Sn({},t),{},{unreadEvents:0,events:[]});case Gn:return Sn(Sn({},t),{},{unreadEvents:0,events:b()(i=t.events).call(i,(t=>{var n;return-1!==Xe()(n=e.ids).call(n,t.payload.id)?Sn(Sn({},t),{},{payload:Sn(Sn({},t.payload),t.payload.messageStatus===In&&{messageStatus:Nn})}):t}))});case Wn:const{events:T,participants:E,activeServiceSessionId:S,activeServiceSettings:k={},serviceData:A,resumeConversationPrompt:O}=e.history,C=((t,e)=>{var n;const r=wn()(n=w()(e).call(e,(e=>!(Tn()(t).call(t,(t=>t.payload.id===e.payload.id))||"participant"===e.type&&!e.payload.participant.introduction)))).call(n);return Cr([...r,...t])})(t.events,T),I=Sn(Sn({},t.participantInfo.participants),E),N=Tn()(a=wn()(s=Gt()(C).call(C)).call(s)).call(a,(t=>("message"===t.type||"participant"===t.type)&&!t.payload.fromClient));let j=null;N&&("message"===N.type&&(j=N.payload.participant),"participant"===N.type&&(j=N.payload.participant.id));const{entry:P,uploads:R}=k,L=jr(Sn(Sn(Sn({},t.entryMeta),P),{},{active:P.default||An,options:Sn({},P&&P.options?P.options:{})}),C[C.length-1].payload);let D=Sn({},t.options.features);const U=D.hasOwnProperty($n);if(U){const{payload:t}=N,{type:e}=t.entry||{};D=Sn(Sn({},D),{},{uploads:{enabled:!(!R||!R.enabled),enabledFromEntry:e===Cn}})}const M=Sn(Sn({},t),{},{unreadEvents:w()(C).call(C,(t=>"message"===t.type&&t.payload.messageStatus===In)).length,events:w()(C).call(C,(t=>"participant"!==t.type||!!t.payload.participant.introduction)),participantInfo:Sn(Sn(Sn({},t.participantInfo),j?Ir(t.participantInfo,{type:Qn,participant:I[j]}):{}),{},{participants:I}),historyLoaded:!0,serviceInfo:Sn(Sn({},t.serviceInfo),{},{activeServiceSessionId:S}),serviceData:A||{},options:Sn(Sn({},t.options),{},{features:D}),entryMeta:U||L.active!==Cn?L:Sn({},t.entryMeta),resumeConversationPrompt:O||!1});return j&&(M.headerTitles=Nr(t.headerTitles,{type:Xn,title:I[j].name})),M;case tr:return Sn(Sn({},t),{},{historyLoaded:!1});case Yn:return Sn(Sn({},t),{},{isLoading:e.isLoading});case nr:const{delaySeconds:z,delayTime:F}=e;return Sn(Sn({},t),{},{idleDetachCountdown:{hasCountdown:!0,isActive:!0,wasStopped:!1,count:z,remaining:z,timer:F}});case rr:const{idleDetachCountdown:$}=t,{remaining:B}=$,H=B-1;return Sn(Sn({},t),{},{idleDetachCountdown:Sn(Sn({},t.idleDetachCountdown),{},{remaining:H,timer:ln(H)})});case or:return Sn(Sn({},t),{},{idleDetachCountdown:Sn(Sn({},t.idleDetachCountdown),{},{isActive:!1,wasStopped:!0})});case ir:return Sn(Sn({},t),{},{idleDetachCountdown:{hasCountdown:!1,isActive:!1}});case ar:return Sn(Sn({},t),{},{resumeConversationPrompt:!0});case sr:return Sn(Sn({},t),{},{resumeConversationPrompt:!1});case Qn:case Jn:return Sn(Sn({},t),{},{participantInfo:Ir(t.participantInfo,e)});case er:return t.serviceInfo.activeServiceSessionId!==e.activeServiceSessionId?Sn(Sn({},t),{},{serviceInfo:Sn(Sn({},t.serviceInfo),{},{activeServiceSessionId:e.activeServiceSessionId})}):t;case Zn:case Xn:return Sn(Sn({},t),{},{headerTitles:Nr(t.headerTitles,e)});case fr:return Sn(Sn({},t),{},{initialState:e.initialState});case cr:return Sn(Sn({},t),{},{serviceData:Sn(Sn({},t.serviceData),{},{[e.payload.type]:e.payload})});case lr:return Sn(Sn({},t),{},{options:Sn(Sn({},t.options),{},{features:e.features})});case ur:return t.options.features.hasOwnProperty(e.key)?Sn(Sn({},t),{},{options:Sn(Sn({},t.options),{},{features:Sn(Sn({},t.options.features),{},{[e.key]:Sn(Sn({},t.options.features[e.key]||{}),{},{enabled:e.enabled})})})}):t;case pr:return Sn(Sn({},t),{},{options:Sn(Sn({},t.options),{},{features:{}})});case vr:return Sn(Sn({},t),{},{options:Sn(Sn({},t.options),{},{panelActive:!0,optionActive:e.optionName})});case yr:return Sn(Sn({},t),{},{options:Sn(Sn({},t.options),{},{panelActive:!1,optionActive:""})});case dr:return Sn(Sn({},t),{},{options:Sn(Sn({},t.options),{},{userSelectedOptions:e.options})});case hr:const{option:V,value:q}=e;return Sn(Sn({},t),{},{options:Sn(Sn({},t.options),{},{userSelectedOptions:Sn(Sn({},t.options.userSelectedOptions),{},{[V]:q})})});case mr:const{value:W}=e;return Sn(Sn({},t),{},{entryMeta:Sn(Sn({},t.entryMeta),{},{blockAutoEntrySwitch:W})});case _r:const{entryMeta:G}=e;return Sn(Sn({},t),{},{entryMeta:Sn(Sn(Sn({},t.entryMeta),G),{},{active:G.default,options:Sn({},G.options||{}),overrideOptions:{}})});case br:const{entryType:K}=e;return Sn(Sn({},t),{},{entryMeta:Sn(Sn({},t.entryMeta),{},{active:K})});case gr:const{entryType:Y}=e;return Sn(Sn({},t),{},{entryMeta:Sn(Sn({},t.entryMeta),{},{userSelected:Y})});case wr:return Sn(Sn({},t),{},{currentUploads:[...t.currentUploads,{id:e.fileId,name:e.fileName,progress:1,uploading:!0,complete:!1,error:"",uploadHandle:e.uploadHandle}]});case xr:return Sn(Sn({},t),{},{currentUploads:b()(c=t.currentUploads).call(c,(t=>t.id===e.fileId?Sn(Sn({},t),{},{progress:e.progress,uploading:100!==e.progress,uploadHandle:100===e.progress?null:t.uploadHandle}):t))});case Er:return Sn(Sn({},t),{},{currentUploads:b()(l=t.currentUploads).call(l,(t=>t.id===e.fileId?Sn(Sn({},t),{},{error:e.errorText,progress:0,uploading:!1,uploadHandle:null}):t))});case Tr:return Sn(Sn({},t),{},{currentUploads:b()(u=t.currentUploads).call(u,(t=>t.id===e.fileId?Sn(Sn({},t),{},{complete:!0}):t))});case Sr:return Sn(Sn({},t),{},{currentUploads:w()(p=t.currentUploads).call(p,(t=>t.id!==e.fileId))});case kr:return Sn(Sn({},t),{},{currentUploads:[]});case Ar:return Sn(Sn({},t),{},{seamlyContainerElement:e.element});default:return t}})(t,e)}const Yh=["namespace","parentElement","showFaq"],Jh=["view"];function Qh(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Zh(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Qh(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Qh(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}class Xh{constructor(t,e){const{namespace:n="",parentElement:r,showFaq:o}=t,i=L(t,Yh);this.config=Zh(Zh({},i),{},{namespace:n,showFaq:!1!==o}),this.namespace=n,this.parentElement=r,this.externalApi=e,this.api=new Fh({layoutMode:t.layoutMode,namespace:t.namespace,config:t.api,context:t.context}),this.eventBus=new(wt()),this.functions={},this.registerFunctions({on:this.eventBus.on,off:this.eventBus.off}),this.eventBus.on("function.register",((t,e)=>this.registerFunction(t,e))),this.eventBus.on("function.unregister",((t,e)=>this.unregisterFunction(t,e)))}async render(){const t=this.config.customComponents||{},{view:e}=t,n=L(t,Jh),r=Zh(Zh({},this.config),{},{customComponents:N()(n).length?n:void 0}),o=function({initialState:t,api:e,eventBus:n,config:r}={}){return Me({reducers:{state:Kh,[String(es)]:es,[String(Jo)]:Jo,[String(tc)]:tc,[String(fs)]:fs,[String(ji)]:ji,[String(ga)]:ga,[String(Ea)]:Ea},initialState:t,middlewares:[Qf({api:e}),Hh.withExtraArgument({api:e,eventBus:n,config:r}),ha({api:e}),Wh({api:e}),({dispatch:t,getState:e})=>n=>r=>{var o,i,a,s,c,l,u;const p=n(r);switch(r.type){case String(Bn.SET_HISTORY):null!==(o=r.history)&&void 0!==o&&null!==(i=o.translation)&&void 0!==i&&i.enabled&&t(Kr(r.history.translation.locale));break;case String(Bn.SET_INITIAL_STATE):null!==(a=r.initialState)&&void 0!==a&&null!==(s=a.translation)&&void 0!==s&&s.enabled&&(t(Kr(r.initialState.translation.locale)),t(Vr(r.locale)));break;case String(Bn.ADD_EVENT):"info"===r.event.type&&"new_translation"===(null===(c=r.event)||void 0===c||null===(l=c.payload)||void 0===l||null===(u=l.body)||void 0===u?void 0:u.subtype)&&r.event.payload.body.translationEnabled&&t(Vr(r.event.payload.body.translationLocale));break;case String(Yr):const n=Fr(e());t(Vr(n))}return p}]})}({api:this.api,eventBus:this.eventBus,config:r});await o.dispatch(Bo()),vt(e?Se(Zf,{config:r,eventBus:this.eventBus,store:o,api:this.api,children:Se(e,{})}):Se(eh,{config:r,eventBus:this.eventBus,store:o,api:this.api}),this.parentElement)}destroy(){vt(null,this.parentElement),this.eventBus.off(),this.api.disconnect(),delete this.functions}registerFunctions(t){var e;T()(e=C()(t)).call(e,(([t,e])=>{this.registerFunction(t,e)}))}registerFunction(t,e){this.functions[t]=this.functions[t]||[],this.functions[t].push(e),this.externalApi.handleActions()}unregisterFunction(t,e){const n=this.functions[t];n&&n.length&&(this.functions[t]=w()(n).call(n,(t=>t!==e)))}execFunction(t,...e){const n=this.functions[t];return!(!n||!n.length||(T()(n).call(n,(n=>{try{n(...e)}catch(e){console.error(`Action(${t}) failed: `,e)}})),0))}}function td(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ed(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=td(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=td(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const nd=t=>"object"==typeof t&&"action"in t,rd=t=>ed(ed({},t),{},{args:e()(t.args)?t.args:[t.args]});var od=class{constructor(t){this._waitingActions=[],this._instances={},this.appConfig=t,this.context={}}push(...t){var e;(t=b()(e=w()(t).call(t,nd)).call(e,rd)).length&&(this._waitingActions.push(...t),this.handleActions())}handleActions(){const t=this._waitingActions;this._waitingActions=[],T()(t).call(t,(t=>{switch(t.action){case"init":this.handleInit(t);break;case"destroy":this.handleDestroy(t);break;default:this.handleAction(t)||this.setContext(t.action,...t.args)||this._waitingActions.push(t)}}))}setContext(t,e){switch(t){case"setTranslation":const{enabled:t,locale:n}=e;return t&&n&&(this.context.translationLocale=n),!0;default:return!1}}handleInit(t){const e=this.getUserConfig(...t.args),n=this.getCombinedConfig(e),{parentElement:r,namespace:o}=n||e;var i;if(o?T()(i=S()(this._instances)).call(i,(t=>{t.parentElement!==r&&t.namespace!==o||this.destroy(t)})):this.destroy(),n){const t=this.createInstance(n);this._instances[n.namespace]=t,this.context={},t.render()}}handleDestroy(t){this.destroy(t.instance)}handleAction(t){const{action:e,instance:n,args:r}=t,o=S()(this._instances);!n&&o.length>1&&console.warn(`Multiple instances detected. Due to potential race conditions, it is recommended to target a specific instance with the action: ${e}`);const i=b()(o).call(o,(t=>(!n||t.namespace===n)&&t.execFunction(e,...r)));return A()(i).call(i,Boolean)}createInstance(t){return new Xh(t,this)}destroy(t){var e;t?("string"==typeof t&&(t=this._instances[t]),t&&(t.destroy(),delete this._instances[t.namespace])):T()(e=C()(this._instances)).call(e,(([t,e])=>{e.destroy(),delete this._instances[t]}))}getUserConfig(t={}){return t}getCombinedConfig(t){if("function"==typeof this.appConfig)return this.appConfig(t);const e=ed(ed({},t.context||this.appConfig.context),this.context),n=ed(ed({},this.appConfig.defaults),t.defaults);return ed(ed(ed({},this.appConfig),t),{},{api:ed(ed({},this.appConfig.api),t.api),context:N()(e).length?e:void 0,defaults:N()(n).length?n:void 0})}},id=()=>{const{t:t}=Oi(),{title:e,subTitle:n}=go(),r=bo(),{isOpen:o}=_a(),i=xo(),{hasInterrupt:a}=sa(),s=Ve(),c=(null==i?void 0:i.avatar)??s,l=a?"":n,u=["message-count"];return o&&u.push("message-count__hide"),0===r&&u.push("message-count__empty"),(l||!o)&&Se("div",{className:Xo("agent-info"),children:[Se("div",{className:Xo("agent-info__graphic"),children:[c?Se("img",{className:Xo(null!=i&&i.avatar?"avatar":"icon"),src:c,alt:""}):Se(ds,{name:"avatar",size:"32"}),Se("span",{className:Xo(u),"aria-hidden":"true",children:r})]}),Se("div",{className:Xo("agent-info__body"),children:[Se("p",{className:Xo("agent-info__heading"),children:e??t("header.title")}),Se("p",{className:Xo("agent-info__text"),children:l})]})]})},ad=({children:t,onCloseChat:e})=>{const{headerCollapseButtonId:n}=ho(),r=Rt(null),{t:o}=Oi();return Se("header",{className:Xo("chat__header"),children:[t,Se("div",{className:Xo("header-controls"),children:Se("button",{type:"button",className:Xo("button","header-controls__collapse"),onClick:e,ref:r,id:n,children:Se(ds,{name:"chevronDown",size:"32",alt:o("header.collapseApp")})})})]})},sd=({onOpenChat:t})=>{const{t:e}=Oi(),n=na(),{isOpen:r}=_a(),o=Rt(null),i=Rt(null),a=Rt(),s=Ui(),c=(()=>{const t=Rt(null),[e]=Li();return t.current=e,Dt((e=>{mn(t.current,(()=>{Ri(e)}))}),[])})(),l=xo(),u=go().subTitle,{hasInterrupt:p}=sa(),{headerCollapseButtonId:f}=ho(),h=l&&!p;return Pt((()=>{!1===r&&!0===o.current&&c(i.current),o.current=r}),[r,c]),Se("div",{className:Xo("toggle-button"),children:[Se("div",{id:n,children:[Se("p",{className:Xo("toggle-button__title"),children:e(h?"toggleButton.resumeTitle":"toggleButton.title")}),Se("p",{className:Xo("toggle-button__subtitle"),children:h?u:e("toggleButton.subtitle")})]}),Se("button",{type:"button","aria-labelledby":n,className:Xo("toggle-button__button"),ref:i,onMouseUp:()=>{a.current="mouse"},onKeyUp:()=>{a.current="key"},onClick:()=>{t(),"mouse"===a.current?s():"key"===a.current&&c(f)}})]})};const cd=["categories"];function ld(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ud(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=ld(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=ld(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var pd=()=>{const{t:t}=Oi(),{sendAction:e,addMessageBubble:n}=Ca(),r=na(),o=Ui(),{sendPolite:i}=Na(),{hasInterrupt:a}=sa(),{hasCountdown:s,endCountdown:c}=Ya(),{hasPrompt:l,continueChat:u}=Qa(),p=To("suggestion"),[f]=ss({payload:p}),h=Lt((()=>{const t=p&&!a?f:[];return b()(t).call(t,(t=>{let{categories:e=[]}=t;return ud(ud({},L(t,cd)),{},{categories:e,classNames:["faqs__item",...b()(e).call(e,(t=>`faqs__item--${String(t).toLowerCase().replace(/[^a-z0-9_\\-]/,"")}`))]})}))}),[p,a,f]),d=Rt(null),v=Rt(!1),{isInline:y}=Eo(),m=ba(),g=!y&&m,_=Rt(g),w=!!h.length,x=w&&!g,T=Rt([]),E=w?h:T.current;T.current=E;const S=Rt(null);jt((()=>{if(d.current!==h&&!g){if(w){const e=v.current?t("faq.srUpdatedText"):t("faq.srAvailableText");Ye()((()=>{i(e)}),30)}else v.current&&i(t("faq.srUnavailableText"));d.current=h}!_.current&&g?(mn(S.current,o),i(t("faq.srUnavailableText"))):!w&&v.current&&mn(S.current,o),v.current=w,_.current=g}),[w,h,g,o,i,t]);const k=t("faq.headingText");return Se(xs,{isActive:x,transitionStartState:bs,children:Se(k?"section":"div",{className:Xo("faqs"),"aria-labelledby":k?r:null,ref:S,children:[k&&Se("h2",{id:r,className:Xo("faqs__heading"),children:k}),!!E.length&&Se("ul",{className:Xo("faqs__list"),children:b()(E).call(E,(t=>Se("li",{className:Xo(t.classNames),children:Se("button",{type:"button",onClick:()=>{(({id:t,question:r})=>{s&&c(!0),l&&u(),e({type:jn,originMessage:p.id,body:{type:"faqclick",body:{faqId:t,faqQuestion:r}}}),n(r),o()})(t)},className:Xo("button","button--secondary"),children:[Se(ds,{name:"chevronRight",size:"8"}),t.question]})},t.id.toString())))})]})})},fd=({children:t})=>{const[,e]=Li(),{isOpen:n,isVisible:r,setVisibility:o}=_a(),{zIndex:i,showFaq:a,layoutMode:s}=He(),{isInline:c}=Eo(),l=si(),u=ba(),{locale:p}=Oi(),f=Dt((t=>{e(t)}),[e]),h=Lt((()=>{if(p&&document.querySelector("html").getAttribute("lang")!==p)return p}),[p]),d=["app","app--deprecated",...l];return n||"window"!==s||d.push("app--collapsed"),u&&d.push("app--user-responded"),d.push(`app--layout-${s}`),r&&Se("section",{className:Xo(d),onKeyDown:t=>{(t.code&&"Escape"===t.code||27===t.keyCode)&&!c&&n&&o(ye.minimized)},lang:h,tabIndex:"-1",ref:f,style:{zIndex:i},"data-nosnippet":!0,children:[Se("div",{className:Xo("app-wrapper"),children:t}),a&&Se(pd,{})]})},hd=()=>{const{isVisible:t}=_a(),{openChat:e,closeChat:n}=Ba();return t&&Se(fd,{children:[Se(sd,{onOpenChat:e}),Se(ad,{onCloseChat:n,children:Se(id,{})}),Se(pf,{interruptComponent:Uc,children:[Se(Op,{}),Se(Zp,{})]})]})},dd=function(t){var n;if(window.seamly&&!e()(window.seamly))throw new Error("Seamly UI has already been initialised. Use the window.seamly object to start new instances instead.");const r=e()(window.seamly)?window.seamly:[],o=new od(t);window.seamly={push:i()(n=o.push).call(n,o)},o.push(...r)}}(),r}()}));
|
|
2
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(self,(function(){return function(){var t={6419:function(t,e,n){t.exports=n(7698)},1511:function(t,e,n){t.exports=n(3363)},1128:function(t,e,n){t.exports=n(7784)},4103:function(t,e,n){t.exports=n(8196)},7766:function(t,e,n){t.exports=n(8065)},62:function(t,e,n){t.exports=n(9455)},4494:function(t,e,n){t.exports=n(9743)},116:function(t,e,n){t.exports=n(1955)},2462:function(t,e,n){t.exports=n(6064)},4473:function(t,e,n){t.exports=n(1577)},6423:function(t,e,n){t.exports=n(4913)},8914:function(t,e,n){t.exports=n(6279)},8580:function(t,e,n){t.exports=n(3778)},1643:function(t,e,n){t.exports=n(9373)},2991:function(t,e,n){t.exports=n(1798)},2366:function(t,e,n){t.exports=n(2527)},7093:function(t,e,n){t.exports=n(8427)},3649:function(t,e,n){t.exports=n(2073)},7149:function(t,e,n){t.exports=n(5286)},7302:function(t,e,n){t.exports=n(2856)},5843:function(t,e,n){t.exports=n(6361)},9340:function(t,e,n){t.exports=n(8933)},925:function(t,e,n){t.exports=n(5838)},1942:function(t,e,n){t.exports=n(3383)},4943:function(t,e,n){t.exports=n(4471)},368:function(t,e,n){t.exports=n(7396)},3978:function(t,e,n){t.exports=n(1910)},6295:function(t,e,n){t.exports=n(6209)},4074:function(t,e,n){t.exports=n(9427)},9649:function(t,e,n){t.exports=n(2857)},8604:function(t,e,n){n(4477)},4310:function(t,e,n){t.exports=n(9534)},1611:function(t,e,n){t.exports=n(6507)},6902:function(t,e,n){t.exports=n(3059)},455:function(t,e,n){t.exports=n(7795)},1238:function(t,e,n){t.exports=n(6877)},4198:function(t,e,n){t.exports=n(4888)},3476:function(t,e,n){t.exports=n(7460)},1581:function(t,e,n){t.exports=n(3474)},3032:function(t,e,n){t.exports=n(7989)},6384:function(t,e,n){t.exports=n(5519)},5420:function(t,e,n){t.exports=n(2547)},8341:function(t,e,n){t.exports=n(6509)},9996:function(t,e,n){t.exports=n(2209)},5683:function(t,e,n){t.exports=n(9447)},2088:function(t,e,n){t.exports=n(269)},4341:function(t,e,n){t.exports=n(3685)},3263:function(t,e,n){t.exports=n(4710)},9356:function(t,e,n){t.exports=n(3799)},2574:function(t,e,n){"use strict";var r=n(5420),o=n(9996),i=n(6419),a=n(1511),s=n(3649);function c(t,e){var n;if(t){if("string"==typeof t)return l(t,e);var r=s(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?i(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(t,e):void 0}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(){this._defaults=[]}for(var p=function(){var t=h[f];u.prototype[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return this._defaults.push({fn:t,args:n}),this}},f=0,h=["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"];f<h.length;f++)p();u.prototype._setDefaults=function(t){var e,n,s=function(t,e){var n=void 0!==r&&o(t)||t["@@iterator"];if(!n){if(a(t)||(n=c(t))){n&&(t=n);var i=0,s=function(){};return{s:s,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,p=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return u=t.done,t},e:function(t){p=!0,l=t},f:function(){try{u||null==n.return||n.return()}finally{if(p)throw l}}}}(this._defaults);try{for(s.s();!(e=s.n()).done;){var u=e.value;t[u.fn].apply(t,function(t){if(a(t))return l(t)}(n=u.args)||function(t){if(void 0!==r&&null!=o(t)||null!=t["@@iterator"])return i(t)}(n)||c(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}}catch(t){s.e(t)}finally{s.f()}},t.exports=u},1766:function(t,e,n){"use strict";var r,o=n(5420),i=n(8341),a=n(9996),s=n(1511),c=n(3649),l=n(6419),u=n(5843),p=n(7766),f=n(1643),h=n(3032),d=n(4103);function v(t){return(v="function"==typeof o&&"symbol"==typeof i?function(t){return typeof t}:function(t){return t&&"function"==typeof o&&t.constructor===o&&t!==o.prototype?"symbol":typeof t})(t)}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}"undefined"!=typeof window?r=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),r=void 0):r=self;var m=n(8767),g=n(4445),b=n(2501),_=n(8842),w=n(6244),x=w.isObject,T=w.mixin,E=w.hasOwn,S=n(1253),k=n(2574);function A(){}t.exports=function(t,n){return"function"==typeof n?new e.Request("GET",t).end(n):1===arguments.length?new e.Request("GET",t):new e.Request(t,n)};var O=e=t.exports;e.Request=L,O.getXHR=function(){if(r.XMLHttpRequest&&(!r.location||"file:"!==r.location.protocol||!r.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw new Error("Browser-only version of superagent could not find XHR")};var C=u("")?function(t){return u(t).call(t)}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function I(t){if(!x(t))return t;var e=[];for(var n in t)E(t,n)&&N(e,n,t[n]);return e.join("&")}function N(t,e,n){if(void 0!==n)if(null!==n)if(s(n)){var r,i=function(t,e){var n=void 0!==o&&a(t)||t["@@iterator"];if(!n){if(s(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return y(t,e);var r=c(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?l(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,p=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return p=t.done,t},e:function(t){f=!0,u=t},f:function(){try{p||null==n.return||n.return()}finally{if(f)throw u}}}}(n);try{for(i.s();!(r=i.n()).done;)N(t,e,r.value)}catch(t){i.e(t)}finally{i.f()}}else if(x(n))for(var u in n){var f;E(n,u)&&N(t,p(f="".concat(e,"[")).call(f,u,"]"),n[u])}else t.push(encodeURI(e)+"="+encodeURIComponent(n));else t.push(encodeURI(e))}function j(t){for(var e,n,r={},o=t.split("&"),i=0,a=o.length;i<a;++i)e=o[i],-1===(n=f(e).call(e,"="))?r[decodeURIComponent(e)]="":r[decodeURIComponent(c(e).call(e,0,n))]=decodeURIComponent(c(e).call(e,n+1));return r}function R(t){return/[/+]json($|[^-\w])/i.test(t)}function P(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!==this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.headers=function(t){for(var e,n,r,o,i=t.split(/\r?\n/),a={},s=0,l=i.length;s<l;++s)n=i[s],-1!==(e=f(n).call(n,":"))&&(r=c(n).call(n,0,e).toLowerCase(),o=C(c(n).call(n,e+1)),a[r]=o);return a}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function L(t,e){var n=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",(function(){var t,e=null,r=null;try{r=new P(n)}catch(t){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=t,n.xhr?(e.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,e.status=n.xhr.status?n.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),n.callback(e)}n.emit("response",r);try{n._isResponseOK(r)||(t=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(e){t=e}t?(t.original=e,t.response=r,t.status=r.status,n.callback(t,r)):n.callback(null,r)}))}O.serializeObject=I,O.parseString=j,O.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},O.serialize={"application/x-www-form-urlencoded":b.stringify,"application/json":g},O.parse={"application/x-www-form-urlencoded":j,"application/json":JSON.parse},T(P.prototype,S.prototype),P.prototype._parseBody=function(t){var e=O.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&R(this.type)&&(e=O.parse["application/json"]),e&&t&&(t.length>0||t instanceof Object)?e(t):null)},P.prototype.toError=function(){var t,e,n=this.req,r=n.method,o=n.url,i=p(t=p(e="cannot ".concat(r," ")).call(e,o," (")).call(t,this.status,")"),a=new Error(i);return a.status=this.status,a.method=r,a.url=o,a},O.Response=P,m(L.prototype),T(L.prototype,_.prototype),L.prototype.type=function(t){return this.set("Content-Type",O.types[t]||t),this},L.prototype.accept=function(t){return this.set("Accept",O.types[t]||t),this},L.prototype.auth=function(t,e,n){1===arguments.length&&(e=""),"object"===v(e)&&null!==e&&(n=e,e=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var r=function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,n,r)},L.prototype.query=function(t){return"string"!=typeof t&&(t=I(t)),t&&this._query.push(t),this},L.prototype.attach=function(t,e,n){if(e){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,n||e.name)}return this},L.prototype._getFormData=function(){return this._formData||(this._formData=new r.FormData),this._formData},L.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var n=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),n(t,e)},L.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},L.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},L.prototype.ca=L.prototype.agent,L.prototype.buffer=L.prototype.ca,L.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},L.prototype.pipe=L.prototype.write,L.prototype._isHost=function(t){return t&&"object"===v(t)&&!s(t)&&"[object Object]"!==Object.prototype.toString.call(t)},L.prototype.end=function(t){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||A,this._finalizeQueryString(),this._end()},L.prototype._setUploadTimeout=function(){var t=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=h((function(){t._timeoutError("Upload timeout of ",t._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},L.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var t=this;this.xhr=O.getXHR();var e=this.xhr,n=this._formData||this._data;this._setTimeouts(),e.addEventListener("readystatechange",(function(){var n=e.readyState;if(n>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4===n){var r;try{r=e.status}catch(t){r=0}if(!r){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}}));var r=function(e,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(t._uploadTimeoutTimer)),n.direction=e,t.emit("progress",n)};if(this.hasListeners("progress"))try{e.addEventListener("progress",d(r).call(r,null,"download")),e.upload&&e.upload.addEventListener("progress",d(r).call(r,null,"upload"))}catch(t){}e.upload&&this._setUploadTimeout();try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!==this.method&&"HEAD"!==this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||O.serialize[o?o.split(";")[0]:""];!i&&R(o)&&(i=O.serialize["application/json"]),i&&(n=i(n))}for(var a in this.header)null!==this.header[a]&&E(this.header,a)&&e.setRequestHeader(a,this.header[a]);this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0===n?null:n)},O.agent=function(){return new k};for(var D=function(){var t=M[U];k.prototype[t.toLowerCase()]=function(e,n){var r=new O.Request(t,e);return this._setDefaults(r),n&&r.end(n),r}},U=0,M=["GET","POST","OPTIONS","PATCH","PUT","DELETE"];U<M.length;U++)D();function z(t,e,n){var r=O("DELETE",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}k.prototype.del=k.prototype.delete,O.get=function(t,e,n){var r=O("GET",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},O.head=function(t,e,n){var r=O("HEAD",t);return"function"==typeof e&&(n=e,e=null),e&&r.query(e),n&&r.end(n),r},O.options=function(t,e,n){var r=O("OPTIONS",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},O.del=z,O.delete=z,O.patch=function(t,e,n){var r=O("PATCH",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},O.post=function(t,e,n){var r=O("POST",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r},O.put=function(t,e,n){var r=O("PUT",t);return"function"==typeof e&&(n=e,e=null),e&&r.send(e),n&&r.end(n),r}},8842:function(t,e,n){"use strict";var r=n(5420),o=n(8341),i=n(6384),a=n(3476),s=n(1511),c=n(7766),l=n(5843),u=n(8580),p=n(1643),f=n(3649),h=n(7302),d=n(3032);function v(t){return(v="function"==typeof r&&"symbol"==typeof o?function(t){return typeof t}:function(t){return t&&"function"==typeof r&&t.constructor===r&&t!==r.prototype?"symbol":typeof t})(t)}var y=n(3695),m=n(6244),g=m.isObject,b=m.hasOwn;function _(){}t.exports=_,_.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},_.prototype.parse=function(t){return this._parser=t,this},_.prototype.responseType=function(t){return this._responseType=t,this},_.prototype.serialize=function(t){return this._serializer=t,this},_.prototype.timeout=function(t){if(!t||"object"!==v(t))return this._timeout=t,this._responseTimeout=0,this._uploadTimeout=0,this;for(var e in t)if(b(t,e))switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;case"upload":this._uploadTimeout=t.upload;break;default:console.warn("Unknown timeout option",e)}return this},_.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var w=new i(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),x=new i([408,413,429,500,502,503,504,521,522,524]);_.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(t,e);if(!0===n)return!0;if(!1===n)return!1}catch(t){console.error(t)}if(e&&e.status&&x.has(e.status))return!0;if(t){if(t.code&&w.has(t.code))return!0;if(t.timeout&&"ECONNABORTED"===t.code)return!0;if(t.crossDomain)return!0}return!1},_.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this.timedoutError=null,this._end()},_.prototype.then=function(t,e){var n=this;if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new a((function(t,e){r.on("abort",(function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)e(n.timedoutError);else{var t=new Error("Aborted");t.code="ABORTED",t.status=n.status,t.method=n.method,t.url=n.url,e(t)}})),r.end((function(n,r){n?e(n):t(r)}))}))}return this._fullfilledPromise.then(t,e)},_.prototype.catch=function(t){return this.then(void 0,t)},_.prototype.use=function(t){return t(this),this},_.prototype.ok=function(t){if("function"!=typeof t)throw new Error("Callback required");return this._okCallback=t,this},_.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},_.prototype.get=function(t){return this._header[t.toLowerCase()]},_.prototype.getHeader=_.prototype.get,_.prototype.set=function(t,e){if(g(t)){for(var n in t)b(t,n)&&this.set(n,t[n]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},_.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},_.prototype.field=function(t,e,n){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data)throw new Error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()");if(g(t)){for(var r in t)b(t,r)&&this.field(r,t[r]);return this}if(s(e)){for(var o in e)b(e,o)&&this.field(t,e[o]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=String(e)),this._getFormData().append(t,e,n),this},_.prototype.abort=function(){if(this._aborted)return this;if(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req){if(y.gte(process.version,"v13.0.0")&&y.lt(process.version,"v14.0.0"))throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes");y.gte(process.version,"v14.0.0")&&(this.req.destroyed=!0),this.req.abort()}return this.clearTimeout(),this.emit("abort"),this},_.prototype._auth=function(t,e,n,r){var o;switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r(c(o="".concat(t,":")).call(o,e))));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer ".concat(t))}return this},_.prototype.withCredentials=function(t){return void 0===t&&(t=!0),this._withCredentials=t,this},_.prototype.redirects=function(t){return this._maxRedirects=t,this},_.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw new TypeError("Invalid argument");return this._maxResponseSize=t,this},_.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},_.prototype.send=function(t){var e=g(t),n=this._header["content-type"];if(this._formData)throw new Error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()");if(e&&!this._data)s(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(e&&g(this._data))for(var r in t)b(t,r)&&(this._data[r]=t[r]);else if("string"==typeof t){var o,i;n||this.type("form"),(n=this._header["content-type"])&&(n=l(o=n.toLowerCase()).call(o)),this._data="application/x-www-form-urlencoded"===n?this._data?c(i="".concat(this._data,"&")).call(i,t):t:(this._data||"")+t}else this._data=t;return!e||this._isHost(t)||n||this.type("json"),this},_.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},_.prototype._finalizeQueryString=function(){var t,e=this._query.join("&");if(e&&(this.url+=(u(t=this.url).call(t,"?")?"&":"?")+e),this._query.length=0,this._sort){var n,r=p(n=this.url).call(n,"?");if(r>=0){var o,i,a=f(o=this.url).call(o,r+1).split("&");"function"==typeof this._sort?h(a).call(a,this._sort):h(a).call(a),this.url=f(i=this.url).call(i,0,r)+"?"+a.join("&")}}},_.prototype._appendQueryString=function(){console.warn("Unsupported")},_.prototype._timeoutError=function(t,e,n){if(!this._aborted){var r=new Error("".concat(t+e,"ms exceeded"));r.timeout=e,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},_.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=d((function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=d((function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},1253:function(t,e,n){"use strict";var r=n(925),o=n(6244);function i(){}t.exports=i,i.prototype.get=function(t){return this.header[t.toLowerCase()]},i.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=o.type(e);var n=o.params(e);for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(this[r]=n[r]);this.links={};try{t.link&&(this.links=o.parseLinks(t.link))}catch(t){}},i.prototype._setStatusProperties=function(t){var e=r(t/100);this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t}},6244:function(t,e,n){"use strict";var r=n(5420),o=n(8341),i=n(9996),a=n(1511),s=n(3649),c=n(6419);function l(t){return(l="function"==typeof r&&"symbol"==typeof o?function(t){return typeof t}:function(t){return t&&"function"==typeof r&&t.constructor===r&&t!==r.prototype?"symbol":typeof t})(t)}function u(t,e){var n=void 0!==r&&i(t)||t["@@iterator"];if(!n){if(a(t)||(n=function(t,e){var n;if(t){if("string"==typeof t)return p(t,e);var r=s(n=Object.prototype.toString.call(t)).call(n,8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?c(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var o=0,l=function(){};return{s:l,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,f=!0,h=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return f=t.done,t},e:function(t){h=!0,u=t},f:function(){try{f||null==n.return||n.return()}finally{if(h)throw u}}}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}e.type=function(t){return t.split(/ *; */).shift()},e.params=function(t){var e,n={},r=u(t.split(/ *; */));try{for(r.s();!(e=r.n()).done;){var o=e.value.split(/ *= */),i=o.shift(),a=o.shift();i&&a&&(n[i]=a)}}catch(t){r.e(t)}finally{r.f()}return n},e.parseLinks=function(t){var e,n={},r=u(t.split(/ *, */));try{for(r.s();!(e=r.n()).done;){var o,i,a=e.value.split(/ *; */),c=s(o=a[0]).call(o,1,-1);n[s(i=a[1].split(/ *= */)[1]).call(i,1,-1)]=c}}catch(t){r.e(t)}finally{r.f()}return n},e.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t},e.isObject=function(t){return null!==t&&"object"===l(t)},e.hasOwn=Object.hasOwn||function(t,e){if(null==t)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(new Object(t),e)},e.mixin=function(t,n){for(var r in n)e.hasOwn(n,r)&&(t[r]=n[r])}},3718:function(t){"use strict";var e=String.prototype.replace,n=/%20/g,r="RFC3986";t.exports={default:r,formatters:{RFC1738:function(t){return e.call(t,n,"+")},RFC3986:function(t){return String(t)}},RFC1738:"RFC1738",RFC3986:r}},2501:function(t,e,n){"use strict";var r=n(4383),o=n(4409),i=n(3718);t.exports={formats:i,parse:o,stringify:r}},4409:function(t,e,n){"use strict";var r=n(1511),o=n(4198),i=n(1643),a=n(3649),s=n(7766),c=n(4943),l=n(6902),u=n(4753),p=Object.prototype.hasOwnProperty,f=r,h={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:u.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},d=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(o(e,10))}))},v=function(t,e){return t&&"string"==typeof t&&e.comma&&i(t).call(t,",")>-1?t.split(","):t},y=function(t,e,n,r){if(t){var i=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,l=/(\[[^[\]]*])/g,u=n.depth>0&&/(\[[^[\]]*])/.exec(i),f=u?a(i).call(i,0,u.index):i,h=[];if(f){if(!n.plainObjects&&p.call(Object.prototype,f)&&!n.allowPrototypes)return;h.push(f)}for(var d=0;n.depth>0&&null!==(u=l.exec(i))&&d<n.depth;){var y;if(d+=1,!n.plainObjects&&p.call(Object.prototype,a(y=u[1]).call(y,1,-1))&&!n.allowPrototypes)return;h.push(u[1])}return u&&h.push("["+a(i).call(i,u.index)+"]"),function(t,e,n,r){for(var i=r?e:v(e,n),l=t.length-1;l>=0;--l){var u,p=t[l];if("[]"===p&&n.parseArrays){var f;u=s(f=[]).call(f,i)}else{u=n.plainObjects?c(null):{};var h="["===p.charAt(0)&&"]"===p.charAt(p.length-1)?a(p).call(p,1,-1):p,d=o(h,10);n.parseArrays||""!==h?!isNaN(d)&&p!==h&&String(d)===h&&d>=0&&n.parseArrays&&d<=n.arrayLimit?(u=[])[d]=i:"__proto__"!==h&&(u[h]=i):u={0:i}}i=u}return i}(h,e,n,r)}};t.exports=function(t,e){var n=function(t){if(!t)return h;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?h.charset:t.charset;return{allowDots:void 0===t.allowDots?h.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:h.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:h.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:h.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:h.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:h.comma,decoder:"function"==typeof t.decoder?t.decoder:h.decoder,delimiter:"string"==typeof t.delimiter||u.isRegExp(t.delimiter)?t.delimiter:h.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:h.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:h.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:h.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:h.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:h.strictNullHandling}}(e);if(""===t||null==t)return n.plainObjects?c(null):{};for(var r="string"==typeof t?function(t,e){var n,r={},o=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,s=e.parameterLimit===1/0?void 0:e.parameterLimit,c=o.split(e.delimiter,s),l=-1,y=e.charset;if(e.charsetSentinel)for(n=0;n<c.length;++n){var m;0===i(m=c[n]).call(m,"utf8=")&&("utf8=%E2%9C%93"===c[n]?y="utf-8":"utf8=%26%2310003%3B"===c[n]&&(y="iso-8859-1"),l=n,n=c.length)}for(n=0;n<c.length;++n)if(n!==l){var g,b,_=c[n],w=i(_).call(_,"]="),x=-1===w?i(_).call(_,"="):w+1;-1===x?(g=e.decoder(_,h.decoder,y,"key"),b=e.strictNullHandling?null:""):(g=e.decoder(a(_).call(_,0,x),h.decoder,y,"key"),b=u.maybeMap(v(a(_).call(_,x+1),e),(function(t){return e.decoder(t,h.decoder,y,"value")}))),b&&e.interpretNumericEntities&&"iso-8859-1"===y&&(b=d(b)),i(_).call(_,"[]=")>-1&&(b=f(b)?[b]:b),p.call(r,g)?r[g]=u.combine(r[g],b):r[g]=b}return r}(t,n):t,o=n.plainObjects?c(null):{},s=l(r),m=0;m<s.length;++m){var g=s[m],b=y(g,r[g],n,"string"==typeof t);o=u.merge(o,b,n)}return!0===n.allowSparse?o:u.compact(o)}},4383:function(t,e,n){"use strict";var r=n(1511),o=n(6902),i=n(7302),a=n(116),s=n(7478),c=n(4753),l=n(3718),u=Object.prototype.hasOwnProperty,p={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},f=r,h=String.prototype.split,d=Array.prototype.push,v=function(t,e){d.apply(t,f(e)?e:[e])},y=Date.prototype.toISOString,m=l.default,g={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:c.encode,encodeValuesOnly:!1,format:m,formatter:l.formatters[m],indices:!1,serializeDate:function(t){return y.call(t)},skipNulls:!1,strictNullHandling:!1},b={},_=function t(e,n,r,a,l,u,p,d,y,m,_,w,x,T,E){for(var S,k=e,A=E,O=0,C=!1;void 0!==(A=A.get(b))&&!C;){var I=A.get(e);if(O+=1,void 0!==I){if(I===O)throw new RangeError("Cyclic object value");C=!0}void 0===A.get(b)&&(O=0)}if("function"==typeof p?k=p(n,k):k instanceof Date?k=m(k):"comma"===r&&f(k)&&(k=c.maybeMap(k,(function(t){return t instanceof Date?m(t):t}))),null===k){if(a)return u&&!x?u(n,g.encoder,T,"key",_):n;k=""}if("string"==typeof(S=k)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||c.isBuffer(k)){if(u){var N=x?n:u(n,g.encoder,T,"key",_);if("comma"===r&&x){for(var j=h.call(String(k),","),R="",P=0;P<j.length;++P)R+=(0===P?"":",")+w(u(j[P],g.encoder,T,"value",_));return[w(N)+"="+R]}return[w(N)+"="+w(u(k,g.encoder,T,"value",_))]}return[w(n)+"="+w(String(k))]}var L,D=[];if(void 0===k)return D;if("comma"===r&&f(k))L=[{value:k.length>0?k.join(",")||null:void 0}];else if(f(p))L=p;else{var U=o(k);L=d?i(U).call(U,d):U}for(var M=0;M<L.length;++M){var z=L[M],F="object"==typeof z&&void 0!==z.value?z.value:k[z];if(!l||null!==F){var $=f(k)?"function"==typeof r?r(n,z):n:n+(y?"."+z:"["+z+"]");E.set(e,O);var B=s();B.set(b,E),v(D,t(F,$,r,a,l,u,p,d,y,m,_,w,x,T,B))}}return D};t.exports=function(t,e){var n,r=t,c=function(t){if(!t)return g;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||g.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=l.default;if(void 0!==t.format){if(!u.call(l.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=l.formatters[n],o=a(g);return("function"==typeof a(t)||f(a(t)))&&(o=a(t)),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:g.addQueryPrefix,allowDots:void 0===t.allowDots?g.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:g.charsetSentinel,delimiter:void 0===t.delimiter?g.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:g.encode,encoder:"function"==typeof t.encoder?t.encoder:g.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:g.encodeValuesOnly,filter:o,format:n,formatter:r,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:g.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:g.skipNulls,sort:"function"==typeof i(t)?i(t):null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:g.strictNullHandling}}(e);"function"==typeof a(c)?r=a(c)("",r):f(a(c))&&(n=a(c));var h,d=[];if("object"!=typeof r||null===r)return"";h=e&&e.arrayFormat in p?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var y=p[h];n||(n=o(r)),i(c)&&i(n).call(n,i(c));for(var m=s(),b=0;b<n.length;++b){var w=n[b];c.skipNulls&&null===r[w]||v(d,_(r[w],w,y,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,a(c),i(c),c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,m))}var x=d.join(c.delimiter),T=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?T+="utf8=%26%2310003%3B&":T+="utf8=%E2%9C%93&"),x.length>0?T+x:""}},4753:function(t,e,n){"use strict";var r=n(1511),o=n(4943),i=n(7766),a=n(8914),s=n(2366),c=n(6902),l=n(5420),u=n(4198),p=n(3649),f=n(1643),h=n(3718),d=Object.prototype.hasOwnProperty,v=r,y=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),m=function(t,e){for(var n=e&&e.plainObjects?o(null):{},r=0;r<t.length;++r)void 0!==t[r]&&(n[r]=t[r]);return n};t.exports={arrayToObject:m,assign:function(t,e){var n;return s(n=c(e)).call(n,(function(t,n){return t[n]=e[n],t}),t)},combine:function(t,e){var n;return i(n=[]).call(n,t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r<e.length;++r)for(var o=e[r],i=o.obj[o.prop],a=c(i),s=0;s<a.length;++s){var l=a[s],u=i[l];"object"==typeof u&&null!==u&&-1===f(n).call(n,u)&&(e.push({obj:i,prop:l}),n.push(u))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(v(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(t){return r}},encode:function(t,e,n,r,o){if(0===t.length)return t;var i=t;if("symbol"==typeof t?i=l.prototype.toString.call(t):"string"!=typeof t&&(i=String(t)),"iso-8859-1"===n)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+u(p(t).call(t,2),16)+"%3B"}));for(var a="",s=0;s<i.length;++s){var c=i.charCodeAt(s);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===h.RFC1738&&(40===c||41===c)?a+=i.charAt(s):c<128?a+=y[c]:c<2048?a+=y[192|c>>6]+y[128|63&c]:c<55296||c>=57344?a+=y[224|c>>12]+y[128|c>>6&63]+y[128|63&c]:(s+=1,c=65536+((1023&c)<<10|1023&i.charCodeAt(s)),a+=y[240|c>>18]+y[128|c>>12&63]+y[128|c>>6&63]+y[128|63&c])}return a},isBuffer:function(t){return!(!t||"object"!=typeof t||!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t)))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(v(t)){for(var n=[],r=0;r<t.length;r+=1)n.push(e(t[r]));return n}return e(t)},merge:function t(e,n,r){var o,l;if(!n)return e;if("object"!=typeof n){if(v(e))e.push(n);else{if(!e||"object"!=typeof e)return[e,n];(r&&(r.plainObjects||r.allowPrototypes)||!d.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!=typeof e)return i(l=[e]).call(l,n);var u=e;return v(e)&&!v(n)&&(u=m(e,r)),v(e)&&v(n)?(a(n).call(n,(function(n,o){if(d.call(e,o)){var i=e[o];i&&"object"==typeof i&&n&&"object"==typeof n?e[o]=t(i,n,r):e.push(n)}else e[o]=n})),e):s(o=c(n)).call(o,(function(e,o){var i=n[o];return d.call(e,o)?e[o]=t(e[o],i,r):e[o]=i,e}),u)}}},1905:function(t){t.exports=()=>()=>null},2698:function(t){t.exports=null},1924:function(t,e,n){"use strict";var r=n(210),o=n(5559),i=o(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&i(t,".prototype.")>-1?o(n):n}},5559:function(t,e,n){"use strict";var r=n(8612),o=n(210),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||r.call(a,i),c=o("%Object.getOwnPropertyDescriptor%",!0),l=o("%Object.defineProperty%",!0),u=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(t){l=null}t.exports=function(t){var e=s(r,a,arguments);if(c&&l){var n=c(e,"length");n.configurable&&l(e,"length",{value:1+u(0,t.length-(arguments.length-1))})}return e};var p=function(){return s(r,i,arguments)};l?l(t.exports,"apply",{value:p}):t.exports.apply=p},8767:function(t){function e(t){if(t)return function(t){for(var n in e.prototype)t[n]=e.prototype[n];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<r.length;o++)if((n=r[o])===e||n.fn===e){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}},4493:function(t,e,n){n(7971),n(3242);var r=n(4058);t.exports=r.Array.from},4034:function(t,e,n){n(2737);var r=n(4058);t.exports=r.Array.isArray},5367:function(t,e,n){n(5906);var r=n(5703);t.exports=r("Array").concat},1459:function(t,e,n){n(8851);var r=n(5703);t.exports=r("Array").every},6172:function(t,e,n){n(290);var r=n(5703);t.exports=r("Array").fill},2383:function(t,e,n){n(1501);var r=n(5703);t.exports=r("Array").filter},9:function(t,e,n){n(4929);var r=n(5703);t.exports=r("Array").findIndex},7671:function(t,e,n){n(833);var r=n(5703);t.exports=r("Array").find},4373:function(t,e,n){n(4944),n(1107);var r=n(5703);t.exports=r("Array").flat},9324:function(t,e,n){n(2437);var r=n(5703);t.exports=r("Array").forEach},991:function(t,e,n){n(7690);var r=n(5703);t.exports=r("Array").includes},8700:function(t,e,n){n(9076);var r=n(5703);t.exports=r("Array").indexOf},3866:function(t,e,n){n(8787);var r=n(5703);t.exports=r("Array").map},2999:function(t,e,n){n(1876);var r=n(5703);t.exports=r("Array").reduce},5573:function(t,e,n){n(1490);var r=n(5703);t.exports=r("Array").reverse},4900:function(t,e,n){n(186);var r=n(5703);t.exports=r("Array").slice},3824:function(t,e,n){n(6026);var r=n(5703);t.exports=r("Array").some},2948:function(t,e,n){n(4115);var r=n(5703);t.exports=r("Array").sort},1103:function(t,e,n){n(5160);var r=n(4058);t.exports=r.Date.now},7700:function(t,e,n){n(3381);var r=n(5703);t.exports=r("Function").bind},6246:function(t,e,n){var r=n(7700),o=Function.prototype;t.exports=function(t){var e=t.bind;return t===o||t instanceof Function&&e===o.bind?r:e}},6043:function(t,e,n){var r=n(5367),o=Array.prototype;t.exports=function(t){var e=t.concat;return t===o||t instanceof Array&&e===o.concat?r:e}},3160:function(t,e,n){var r=n(1459),o=Array.prototype;t.exports=function(t){var e=t.every;return t===o||t instanceof Array&&e===o.every?r:e}},446:function(t,e,n){var r=n(6172),o=Array.prototype;t.exports=function(t){var e=t.fill;return t===o||t instanceof Array&&e===o.fill?r:e}},2480:function(t,e,n){var r=n(2383),o=Array.prototype;t.exports=function(t){var e=t.filter;return t===o||t instanceof Array&&e===o.filter?r:e}},7147:function(t,e,n){var r=n(9),o=Array.prototype;t.exports=function(t){var e=t.findIndex;return t===o||t instanceof Array&&e===o.findIndex?r:e}},2236:function(t,e,n){var r=n(7671),o=Array.prototype;t.exports=function(t){var e=t.find;return t===o||t instanceof Array&&e===o.find?r:e}},8098:function(t,e,n){var r=n(4373),o=Array.prototype;t.exports=function(t){var e=t.flat;return t===o||t instanceof Array&&e===o.flat?r:e}},8557:function(t,e,n){var r=n(991),o=n(1631),i=Array.prototype,a=String.prototype;t.exports=function(t){var e=t.includes;return t===i||t instanceof Array&&e===i.includes?r:"string"==typeof t||t===a||t instanceof String&&e===a.includes?o:e}},4570:function(t,e,n){var r=n(8700),o=Array.prototype;t.exports=function(t){var e=t.indexOf;return t===o||t instanceof Array&&e===o.indexOf?r:e}},8287:function(t,e,n){var r=n(3866),o=Array.prototype;t.exports=function(t){var e=t.map;return t===o||t instanceof Array&&e===o.map?r:e}},8025:function(t,e,n){var r=n(2999),o=Array.prototype;t.exports=function(t){var e=t.reduce;return t===o||t instanceof Array&&e===o.reduce?r:e}},1060:function(t,e,n){var r=n(5573),o=Array.prototype;t.exports=function(t){var e=t.reverse;return t===o||t instanceof Array&&e===o.reverse?r:e}},9601:function(t,e,n){var r=n(4900),o=Array.prototype;t.exports=function(t){var e=t.slice;return t===o||t instanceof Array&&e===o.slice?r:e}},8299:function(t,e,n){var r=n(3824),o=Array.prototype;t.exports=function(t){var e=t.some;return t===o||t instanceof Array&&e===o.some?r:e}},9355:function(t,e,n){var r=n(2948),o=Array.prototype;t.exports=function(t){var e=t.sort;return t===o||t instanceof Array&&e===o.sort?r:e}},2774:function(t,e,n){var r=n(3348),o=String.prototype;t.exports=function(t){var e=t.trim;return"string"==typeof t||t===o||t instanceof String&&e===o.trim?r:e}},4426:function(t,e,n){n(2619);var r=n(4058);r.JSON||(r.JSON={stringify:JSON.stringify}),t.exports=function(t,e,n){return r.JSON.stringify.apply(null,arguments)}},9179:function(t,e,n){n(8103);var r=n(4058);t.exports=r.Math.trunc},5999:function(t,e,n){n(9221);var r=n(4058);t.exports=r.Object.assign},5254:function(t,e,n){n(3882);var r=n(4058).Object;t.exports=function(t,e){return r.create(t,e)}},7702:function(t,e,n){n(4979);var r=n(4058).Object,o=t.exports=function(t,e){return r.defineProperties(t,e)};r.defineProperties.sham&&(o.sham=!0)},8171:function(t,e,n){n(6450);var r=n(4058).Object,o=t.exports=function(t,e,n){return r.defineProperty(t,e,n)};r.defineProperty.sham&&(o.sham=!0)},3081:function(t,e,n){n(1078);var r=n(4058);t.exports=r.Object.entries},286:function(t,e,n){n(6924);var r=n(4058).Object,o=t.exports=function(t,e){return r.getOwnPropertyDescriptor(t,e)};r.getOwnPropertyDescriptor.sham&&(o.sham=!0)},2766:function(t,e,n){n(8482);var r=n(4058);t.exports=r.Object.getOwnPropertyDescriptors},3288:function(t,e,n){n(9816);var r=n(4058).Object;t.exports=function(t){return r.getOwnPropertyNames(t)}},498:function(t,e,n){n(5824);var r=n(4058);t.exports=r.Object.getOwnPropertySymbols},3966:function(t,e,n){n(7405);var r=n(4058);t.exports=r.Object.getPrototypeOf},8494:function(t,e,n){n(1724);var r=n(4058);t.exports=r.Object.keys},8430:function(t,e,n){n(6614);var r=n(4058);t.exports=r.Object.values},7579:function(t,e,n){n(9718);var r=n(4058);t.exports=r.parseFloat},8524:function(t,e,n){n(4038);var r=n(4058);t.exports=r.parseInt},2956:function(t,e,n){n(7627),n(6274),n(5967),n(8881),n(4560),n(7206),n(4349),n(7971);var r=n(4058);t.exports=r.Promise},6998:function(t,e,n){n(6274),n(5967),n(9008),n(7971);var r=n(4058);t.exports=r.Set},1631:function(t,e,n){n(1035);var r=n(5703);t.exports=r("String").includes},3348:function(t,e,n){n(7398);var r=n(5703);t.exports=r("String").trim},7473:function(t,e,n){n(5906),n(5967),n(5824),n(8555),n(2615),n(1732),n(5903),n(1825),n(8394),n(5915),n(1437),n(9791),n(9911),n(4315),n(3131),n(4714),n(659),n(9120),n(5327),n(1502);var r=n(4058);t.exports=r.Symbol},4227:function(t,e,n){n(6274),n(5967),n(7971),n(1825);var r=n(1477);t.exports=r.f("iterator")},2209:function(t,e,n){n(6274),n(7971),n(7634);var r=n(2902);t.exports=r},9447:function(t,e,n){var r=n(4570);t.exports=r},269:function(t,e,n){var r=n(5999);t.exports=r},3685:function(t,e,n){var r=n(8171);t.exports=r},4710:function(t,e,n){var r=n(498);t.exports=r},3799:function(t,e,n){var r=n(8494);t.exports=r},3916:function(t){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},1851:function(t,e,n){var r=n(941);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},8479:function(t){t.exports=function(){}},5743:function(t){t.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}},6059:function(t,e,n){var r=n(941);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},1860:function(t,e,n){"use strict";var r=n(9678),o=n(9413),i=n(3057);t.exports=function(t){for(var e=r(this),n=i(e.length),a=arguments.length,s=o(a>1?arguments[1]:void 0,n),c=a>2?arguments[2]:void 0,l=void 0===c?n:o(c,n);l>s;)e[s++]=t;return e}},6837:function(t,e,n){"use strict";var r=n(3610).forEach,o=n(4194)("forEach");t.exports=o?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},1354:function(t,e,n){"use strict";var r=n(6843),o=n(9678),i=n(5196),a=n(6782),s=n(3057),c=n(5449),l=n(2902);t.exports=function(t){var e,n,u,p,f,h,d=o(t),v="function"==typeof this?this:Array,y=arguments.length,m=y>1?arguments[1]:void 0,g=void 0!==m,b=l(d),_=0;if(g&&(m=r(m,y>2?arguments[2]:void 0,2)),null==b||v==Array&&a(b))for(n=new v(e=s(d.length));e>_;_++)h=g?m(d[_],_):d[_],c(n,_,h);else for(f=(p=b.call(d)).next,n=new v;!(u=f.call(p)).done;_++)h=g?i(p,m,[u.value,_],!0):u.value,c(n,_,h);return n.length=_,n}},1692:function(t,e,n){var r=n(4529),o=n(3057),i=n(9413),a=function(t){return function(e,n,a){var s,c=r(e),l=o(c.length),u=i(a,l);if(t&&n!=n){for(;l>u;)if((s=c[u++])!=s)return!0}else for(;l>u;u++)if((t||u in c)&&c[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},3610:function(t,e,n){var r=n(6843),o=n(7026),i=n(9678),a=n(3057),s=n(4692),c=[].push,l=function(t){var e=1==t,n=2==t,l=3==t,u=4==t,p=6==t,f=7==t,h=5==t||p;return function(d,v,y,m){for(var g,b,_=i(d),w=o(_),x=r(v,y,3),T=a(w.length),E=0,S=m||s,k=e?S(d,T):n||f?S(d,0):void 0;T>E;E++)if((h||E in w)&&(b=x(g=w[E],E,_),t))if(e)k[E]=b;else if(b)switch(t){case 3:return!0;case 5:return g;case 6:return E;case 2:c.call(k,g)}else switch(t){case 4:return!1;case 7:c.call(k,g)}return p?-1:l||u?u:k}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},568:function(t,e,n){var r=n(5981),o=n(9813),i=n(3385),a=o("species");t.exports=function(t){return i>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},4194:function(t,e,n){"use strict";var r=n(5981);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},6499:function(t,e,n){var r=n(3916),o=n(9678),i=n(7026),a=n(3057),s=function(t){return function(e,n,s,c){r(n);var l=o(e),u=i(l),p=a(l.length),f=t?p-1:0,h=t?-1:1;if(s<2)for(;;){if(f in u){c=u[f],f+=h;break}if(f+=h,t?f<0:p<=f)throw TypeError("Reduce of empty array with no initial value")}for(;t?f>=0:p>f;f+=h)f in u&&(c=n(c,u[f],f,l));return c}};t.exports={left:s(!1),right:s(!0)}},1388:function(t){var e=Math.floor,n=function(t,i){var a=t.length,s=e(a/2);return a<8?r(t,i):o(n(t.slice(0,s),i),n(t.slice(s),i),i)},r=function(t,e){for(var n,r,o=t.length,i=1;i<o;){for(r=i,n=t[i];r&&e(t[r-1],n)>0;)t[r]=t[--r];r!==i++&&(t[r]=n)}return t},o=function(t,e,n){for(var r=t.length,o=e.length,i=0,a=0,s=[];i<r||a<o;)i<r&&a<o?s.push(n(t[i],e[a])<=0?t[i++]:e[a++]):s.push(i<r?t[i++]:e[a++]);return s};t.exports=n},5693:function(t,e,n){var r=n(941),o=n(1052),i=n(9813)("species");t.exports=function(t){var e;return o(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!o(e.prototype)?r(e)&&null===(e=e[i])&&(e=void 0):e=void 0),void 0===e?Array:e}},4692:function(t,e,n){var r=n(5693);t.exports=function(t,e){return new(r(t))(0===e?0:e)}},5196:function(t,e,n){var r=n(6059),o=n(7609);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){throw o(t),e}}},1385:function(t,e,n){var r=n(9813)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(t){}return n}},2532:function(t){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},9697:function(t,e,n){var r=n(2885),o=n(2532),i=n(9813)("toStringTag"),a="Arguments"==o(function(){return arguments}());t.exports=r?o:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:a?o(e):"Object"==(r=o(e))&&"function"==typeof e.callee?"Arguments":r}},5616:function(t,e,n){"use strict";var r=n(5988).f,o=n(9290),i=n(7524),a=n(6843),s=n(5743),c=n(3091),l=n(7771),u=n(4431),p=n(5746),f=n(1647).fastKey,h=n(5402),d=h.set,v=h.getterFor;t.exports={getConstructor:function(t,e,n,l){var u=t((function(t,r){s(t,u,e),d(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),p||(t.size=0),null!=r&&c(r,t[l],{that:t,AS_ENTRIES:n})})),h=v(e),y=function(t,e,n){var r,o,i=h(t),a=m(t,e);return a?a.value=n:(i.last=a={index:o=f(e,!0),key:e,value:n,previous:r=i.last,next:void 0,removed:!1},i.first||(i.first=a),r&&(r.next=a),p?i.size++:t.size++,"F"!==o&&(i.index[o]=a)),t},m=function(t,e){var n,r=h(t),o=f(e);if("F"!==o)return r.index[o];for(n=r.first;n;n=n.next)if(n.key==e)return n};return i(u.prototype,{clear:function(){for(var t=h(this),e=t.index,n=t.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete e[n.index],n=n.next;t.first=t.last=void 0,p?t.size=0:this.size=0},delete:function(t){var e=this,n=h(e),r=m(e,t);if(r){var o=r.next,i=r.previous;delete n.index[r.index],r.removed=!0,i&&(i.next=o),o&&(o.previous=i),n.first==r&&(n.first=o),n.last==r&&(n.last=i),p?n.size--:e.size--}return!!r},forEach:function(t){for(var e,n=h(this),r=a(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.next:n.first;)for(r(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!m(this,t)}}),i(u.prototype,n?{get:function(t){var e=m(this,t);return e&&e.value},set:function(t,e){return y(this,0===t?0:t,e)}}:{add:function(t){return y(this,t=0===t?0:t,t)}}),p&&r(u.prototype,"size",{get:function(){return h(this).size}}),u},setStrong:function(t,e,n){var r=e+" Iterator",o=v(e),i=v(r);l(t,e,(function(t,e){d(this,{type:r,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,n=t.last;n&&n.removed;)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),u(e)}}},4683:function(t,e,n){"use strict";var r=n(6887),o=n(1899),i=n(1647),a=n(5981),s=n(2029),c=n(3091),l=n(5743),u=n(941),p=n(904),f=n(5988).f,h=n(3610).forEach,d=n(5746),v=n(5402),y=v.set,m=v.getterFor;t.exports=function(t,e,n){var v,g=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),_=g?"set":"add",w=o[t],x=w&&w.prototype,T={};if(d&&"function"==typeof w&&(b||x.forEach&&!a((function(){(new w).entries().next()})))){v=e((function(e,n){y(l(e,v,t),{type:t,collection:new w}),null!=n&&c(n,e[_],{that:e,AS_ENTRIES:g})}));var E=m(t);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(t){var e="add"==t||"set"==t;!(t in x)||b&&"clear"==t||s(v.prototype,t,(function(n,r){var o=E(this).collection;if(!e&&b&&!u(n))return"get"==t&&void 0;var i=o[t](0===n?0:n,r);return e?this:i}))})),b||f(v.prototype,"size",{configurable:!0,get:function(){return E(this).collection.size}})}else v=n.getConstructor(e,t,g,_),i.enable();return p(v,t,!1,!0),T[t]=v,r({global:!0,forced:!0},T),b||n.setStrong(v,t,g),v}},7772:function(t,e,n){var r=n(9813)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},4160:function(t,e,n){var r=n(5981);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},1046:function(t,e,n){"use strict";var r=n(5143).IteratorPrototype,o=n(9290),i=n(1887),a=n(904),s=n(2077),c=function(){return this};t.exports=function(t,e,n){var l=e+" Iterator";return t.prototype=o(r,{next:i(1,n)}),a(t,l,!1,!0),s[l]=c,t}},2029:function(t,e,n){var r=n(5746),o=n(5988),i=n(1887);t.exports=r?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},1887:function(t){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},5449:function(t,e,n){"use strict";var r=n(3894),o=n(5988),i=n(1887);t.exports=function(t,e,n){var a=r(e);a in t?o.f(t,a,i(0,n)):t[a]=n}},7771:function(t,e,n){"use strict";var r=n(6887),o=n(1046),i=n(249),a=n(8929),s=n(904),c=n(2029),l=n(9754),u=n(9813),p=n(2529),f=n(2077),h=n(5143),d=h.IteratorPrototype,v=h.BUGGY_SAFARI_ITERATORS,y=u("iterator"),m="keys",g="values",b="entries",_=function(){return this};t.exports=function(t,e,n,u,h,w,x){o(n,e,u);var T,E,S,k=function(t){if(t===h&&N)return N;if(!v&&t in C)return C[t];switch(t){case m:case g:case b:return function(){return new n(this,t)}}return function(){return new n(this)}},A=e+" Iterator",O=!1,C=t.prototype,I=C[y]||C["@@iterator"]||h&&C[h],N=!v&&I||k(h),j="Array"==e&&C.entries||I;if(j&&(T=i(j.call(new t)),d!==Object.prototype&&T.next&&(p||i(T)===d||(a?a(T,d):"function"!=typeof T[y]&&c(T,y,_)),s(T,A,!0,!0),p&&(f[A]=_))),h==g&&I&&I.name!==g&&(O=!0,N=function(){return I.call(this)}),p&&!x||C[y]===N||c(C,y,N),f[e]=N,h)if(E={values:k(g),keys:w?N:k(m),entries:k(b)},x)for(S in E)(v||O||!(S in C))&&l(C,S,E[S]);else r({target:e,proto:!0,forced:v||O},E);return E}},6349:function(t,e,n){var r=n(4058),o=n(7457),i=n(1477),a=n(5988).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});o(e,t)||a(e,t,{value:i.f(t)})}},5746:function(t,e,n){var r=n(5981);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},1333:function(t,e,n){var r=n(1899),o=n(941),i=r.document,a=o(i)&&o(i.createElement);t.exports=function(t){return a?i.createElement(t):{}}},3281:function(t){t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},4342:function(t,e,n){var r=n(2861).match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},3321:function(t){t.exports="object"==typeof window},7797:function(t,e,n){var r=n(2861);t.exports=/MSIE|Trident/.test(r)},2749:function(t,e,n){var r=n(2861);t.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(r)},6049:function(t,e,n){var r=n(2532),o=n(1899);t.exports="process"==r(o.process)},8045:function(t,e,n){var r=n(2861);t.exports=/web0s(?!.*chrome)/i.test(r)},2861:function(t,e,n){var r=n(626);t.exports=r("navigator","userAgent")||""},3385:function(t,e,n){var r,o,i=n(1899),a=n(2861),s=i.process,c=i.Deno,l=s&&s.versions||c&&c.version,u=l&&l.v8;u?o=(r=u.split("."))[0]<4?1:r[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),t.exports=o&&+o},8938:function(t,e,n){var r=n(2861).match(/AppleWebKit\/(\d+)\./);t.exports=!!r&&+r[1]},5703:function(t,e,n){var r=n(4058);t.exports=function(t){return r[t+"Prototype"]}},6759:function(t){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6887:function(t,e,n){"use strict";var r=n(1899),o=n(9677).f,i=n(7252),a=n(4058),s=n(6843),c=n(2029),l=n(7457),u=function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var n,p,f,h,d,v,y,m,g=t.target,b=t.global,_=t.stat,w=t.proto,x=b?r:_?r[g]:(r[g]||{}).prototype,T=b?a:a[g]||(a[g]={}),E=T.prototype;for(f in e)n=!i(b?f:g+(_?".":"#")+f,t.forced)&&x&&l(x,f),d=T[f],n&&(v=t.noTargetGet?(m=o(x,f))&&m.value:x[f]),h=n&&v?v:e[f],n&&typeof d==typeof h||(y=t.bind&&n?s(h,r):t.wrap&&n?u(h):w&&"function"==typeof h?s(Function.call,h):h,(t.sham||h&&h.sham||d&&d.sham)&&c(y,"sham",!0),T[f]=y,w&&(l(a,p=g+"Prototype")||c(a,p,{}),a[p][f]=h,t.real&&E&&!E[f]&&c(E,f,h)))}},5981:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},3092:function(t,e,n){"use strict";var r=n(1052),o=n(3057),i=n(6843),a=function(t,e,n,s,c,l,u,p){for(var f,h=c,d=0,v=!!u&&i(u,p,3);d<s;){if(d in n){if(f=v?v(n[d],d,e):n[d],l>0&&r(f))h=a(t,e,f,o(f.length),h,l-1)-1;else{if(h>=9007199254740991)throw TypeError("Exceed the acceptable array length");t[h]=f}h++}d++}return h};t.exports=a},5602:function(t,e,n){var r=n(5981);t.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},6843:function(t,e,n){var r=n(3916);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},8308:function(t,e,n){"use strict";var r=n(3916),o=n(941),i=[].slice,a={},s=function(t,e,n){if(!(e in a)){for(var r=[],o=0;o<e;o++)r[o]="a["+o+"]";a[e]=Function("C,a","return new C("+r.join(",")+")")}return a[e](t,n)};t.exports=Function.bind||function(t){var e=r(this),n=i.call(arguments,1),a=function(){var r=n.concat(i.call(arguments));return this instanceof a?s(e,r.length,r):e.apply(t,r)};return o(e.prototype)&&(a.prototype=e.prototype),a}},626:function(t,e,n){var r=n(4058),o=n(1899),i=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?i(r[t])||i(o[t]):r[t]&&r[t][e]||o[t]&&o[t][e]}},2902:function(t,e,n){var r=n(9697),o=n(2077),i=n(9813)("iterator");t.exports=function(t){if(null!=t)return t[i]||t["@@iterator"]||o[r(t)]}},1899:function(t,e,n){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},7457:function(t,e,n){var r=n(9678),o={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return o.call(r(t),e)}},7748:function(t){t.exports={}},4845:function(t,e,n){var r=n(1899);t.exports=function(t,e){var n=r.console;n&&n.error&&(1===arguments.length?n.error(t):n.error(t,e))}},5463:function(t,e,n){var r=n(626);t.exports=r("document","documentElement")},2840:function(t,e,n){var r=n(5746),o=n(5981),i=n(1333);t.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},7026:function(t,e,n){var r=n(5981),o=n(2532),i="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?i.call(t,""):Object(t)}:Object},1302:function(t,e,n){var r=n(3030),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return o.call(t)}),t.exports=r.inspectSource},1647:function(t,e,n){var r=n(6887),o=n(7748),i=n(941),a=n(7457),s=n(5988).f,c=n(946),l=n(684),u=n(9418),p=n(5602),f=!1,h=u("meta"),d=0,v=Object.isExtensible||function(){return!0},y=function(t){s(t,h,{value:{objectID:"O"+d++,weakData:{}}})},m=t.exports={enable:function(){m.enable=function(){},f=!0;var t=c.f,e=[].splice,n={};n[h]=1,t(n).length&&(c.f=function(n){for(var r=t(n),o=0,i=r.length;o<i;o++)if(r[o]===h){e.call(r,o,1);break}return r},r({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!i(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,h)){if(!v(t))return"F";if(!e)return"E";y(t)}return t[h].objectID},getWeakData:function(t,e){if(!a(t,h)){if(!v(t))return!0;if(!e)return!1;y(t)}return t[h].weakData},onFreeze:function(t){return p&&f&&v(t)&&!a(t,h)&&y(t),t}};o[h]=!0},5402:function(t,e,n){var r,o,i,a=n(8019),s=n(1899),c=n(941),l=n(2029),u=n(7457),p=n(3030),f=n(4262),h=n(7748),d="Object already initialized",v=s.WeakMap;if(a||p.state){var y=p.state||(p.state=new v),m=y.get,g=y.has,b=y.set;r=function(t,e){if(g.call(y,t))throw new TypeError(d);return e.facade=t,b.call(y,t,e),e},o=function(t){return m.call(y,t)||{}},i=function(t){return g.call(y,t)}}else{var _=f("state");h[_]=!0,r=function(t,e){if(u(t,_))throw new TypeError(d);return e.facade=t,l(t,_,e),e},o=function(t){return u(t,_)?t[_]:{}},i=function(t){return u(t,_)}}t.exports={set:r,get:o,has:i,enforce:function(t){return i(t)?o(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=o(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},6782:function(t,e,n){var r=n(9813),o=n(2077),i=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||a[i]===t)}},1052:function(t,e,n){var r=n(2532);t.exports=Array.isArray||function(t){return"Array"==r(t)}},7252:function(t,e,n){var r=n(5981),o=/#|\.prototype\./,i=function(t,e){var n=s[a(t)];return n==l||n!=c&&("function"==typeof e?r(e):!!e)},a=i.normalize=function(t){return String(t).replace(o,".").toLowerCase()},s=i.data={},c=i.NATIVE="N",l=i.POLYFILL="P";t.exports=i},941:function(t){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},2529:function(t){t.exports=!0},685:function(t,e,n){var r=n(941),o=n(2532),i=n(9813)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},6664:function(t,e,n){var r=n(626),o=n(2302);t.exports=o?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return"function"==typeof e&&Object(t)instanceof e}},3091:function(t,e,n){var r=n(6059),o=n(6782),i=n(3057),a=n(6843),s=n(2902),c=n(7609),l=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,n){var u,p,f,h,d,v,y,m=n&&n.that,g=!(!n||!n.AS_ENTRIES),b=!(!n||!n.IS_ITERATOR),_=!(!n||!n.INTERRUPTED),w=a(e,m,1+g+_),x=function(t){return u&&c(u),new l(!0,t)},T=function(t){return g?(r(t),_?w(t[0],t[1],x):w(t[0],t[1])):_?w(t,x):w(t)};if(b)u=t;else{if("function"!=typeof(p=s(t)))throw TypeError("Target is not iterable");if(o(p)){for(f=0,h=i(t.length);h>f;f++)if((d=T(t[f]))&&d instanceof l)return d;return new l(!1)}u=p.call(t)}for(v=u.next;!(y=v.call(u)).done;){try{d=T(y.value)}catch(t){throw c(u),t}if("object"==typeof d&&d&&d instanceof l)return d}return new l(!1)}},7609:function(t,e,n){var r=n(6059);t.exports=function(t){var e=t.return;if(void 0!==e)return r(e.call(t)).value}},5143:function(t,e,n){"use strict";var r,o,i,a=n(5981),s=n(249),c=n(2029),l=n(7457),u=n(9813),p=n(2529),f=u("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(r=o):h=!0);var d=null==r||a((function(){var t={};return r[f].call(t)!==t}));d&&(r={}),p&&!d||l(r,f)||c(r,f,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:h}},2077:function(t){t.exports={}},6132:function(t,e,n){var r,o,i,a,s,c,l,u,p=n(1899),f=n(9677).f,h=n(2941).set,d=n(2749),v=n(8045),y=n(6049),m=p.MutationObserver||p.WebKitMutationObserver,g=p.document,b=p.process,_=p.Promise,w=f(p,"queueMicrotask"),x=w&&w.value;x||(r=function(){var t,e;for(y&&(t=b.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?a():i=void 0,t}}i=void 0,t&&t.enter()},d||y||v||!m||!g?_&&_.resolve?((l=_.resolve(void 0)).constructor=_,u=l.then,a=function(){u.call(l,r)}):a=y?function(){b.nextTick(r)}:function(){h.call(p,r)}:(s=!0,c=g.createTextNode(""),new m(r).observe(c,{characterData:!0}),a=function(){c.data=s=!s})),t.exports=x||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,a()),i=e}},9297:function(t,e,n){var r=n(1899);t.exports=r.Promise},2497:function(t,e,n){var r=n(3385),o=n(5981);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},8019:function(t,e,n){var r=n(1899),o=n(1302),i=r.WeakMap;t.exports="function"==typeof i&&/native code/.test(o(i))},9520:function(t,e,n){"use strict";var r=n(3916),o=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=r(e),this.reject=r(n)};t.exports.f=function(t){return new o(t)}},344:function(t,e,n){var r=n(685);t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},4018:function(t,e,n){var r=n(1899),o=n(5803),i=n(4853).trim,a=n(3483),s=r.parseFloat,c=1/s(a+"-0")!=-1/0;t.exports=c?function(t){var e=i(o(t)),n=s(e);return 0===n&&"-"==e.charAt(0)?-0:n}:s},9806:function(t,e,n){var r=n(1899),o=n(5803),i=n(4853).trim,a=n(3483),s=r.parseInt,c=/^[+-]?0[Xx]/,l=8!==s(a+"08")||22!==s(a+"0x16");t.exports=l?function(t,e){var n=i(o(t));return s(n,e>>>0||(c.test(n)?16:10))}:s},4420:function(t,e,n){"use strict";var r=n(5746),o=n(5981),i=n(4771),a=n(7857),s=n(6760),c=n(9678),l=n(7026),u=Object.assign,p=Object.defineProperty;t.exports=!u||o((function(){if(r&&1!==u({b:1},u(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||i(u({},e)).join("")!=o}))?function(t,e){for(var n=c(t),o=arguments.length,u=1,p=a.f,f=s.f;o>u;)for(var h,d=l(arguments[u++]),v=p?i(d).concat(p(d)):i(d),y=v.length,m=0;y>m;)h=v[m++],r&&!f.call(d,h)||(n[h]=d[h]);return n}:u},9290:function(t,e,n){var r,o=n(6059),i=n(9938),a=n(6759),s=n(7748),c=n(5463),l=n(1333),u=n(4262)("IE_PROTO"),p=function(){},f=function(t){return"<script>"+t+"<\/script>"},h=function(t){t.write(f("")),t.close();var e=t.parentWindow.Object;return t=null,e},d=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}d=document.domain&&r?h(r):function(){var t,e=l("iframe");if(e.style)return e.style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F}()||h(r);for(var t=a.length;t--;)delete d.prototype[a[t]];return d()};s[u]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(p.prototype=o(t),n=new p,p.prototype=null,n[u]=t):n=d(),void 0===e?n:i(n,e)}},9938:function(t,e,n){var r=n(5746),o=n(5988),i=n(6059),a=n(4771);t.exports=r?Object.defineProperties:function(t,e){i(t);for(var n,r=a(e),s=r.length,c=0;s>c;)o.f(t,n=r[c++],e[n]);return t}},5988:function(t,e,n){var r=n(5746),o=n(2840),i=n(6059),a=n(3894),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(i(t),e=a(e),i(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},9677:function(t,e,n){var r=n(5746),o=n(6760),i=n(1887),a=n(4529),s=n(3894),c=n(7457),l=n(2840),u=Object.getOwnPropertyDescriptor;e.f=r?u:function(t,e){if(t=a(t),e=s(e),l)try{return u(t,e)}catch(t){}if(c(t,e))return i(!o.f.call(t,e),t[e])}},684:function(t,e,n){var r=n(4529),o=n(946).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==i.call(t)?function(t){try{return o(t)}catch(t){return a.slice()}}(t):o(r(t))}},946:function(t,e,n){var r=n(5629),o=n(6759).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},7857:function(t,e){e.f=Object.getOwnPropertySymbols},249:function(t,e,n){var r=n(7457),o=n(9678),i=n(4262),a=n(4160),s=i("IE_PROTO"),c=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=o(t),r(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},5629:function(t,e,n){var r=n(7457),o=n(4529),i=n(1692).indexOf,a=n(7748);t.exports=function(t,e){var n,s=o(t),c=0,l=[];for(n in s)!r(a,n)&&r(s,n)&&l.push(n);for(;e.length>c;)r(s,n=e[c++])&&(~i(l,n)||l.push(n));return l}},4771:function(t,e,n){var r=n(5629),o=n(6759);t.exports=Object.keys||function(t){return r(t,o)}},6760:function(t,e){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:n},8929:function(t,e,n){var r=n(6059),o=n(1851);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),o(i),e?t.call(n,i):n.__proto__=i,n}}():void 0)},8810:function(t,e,n){var r=n(5746),o=n(4771),i=n(4529),a=n(6760).f,s=function(t){return function(e){for(var n,s=i(e),c=o(s),l=c.length,u=0,p=[];l>u;)n=c[u++],r&&!a.call(s,n)||p.push(t?[n,s[n]]:s[n]);return p}};t.exports={entries:s(!0),values:s(!1)}},5623:function(t,e,n){"use strict";var r=n(2885),o=n(9697);t.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},9811:function(t,e,n){var r=n(941);t.exports=function(t,e){var n,o;if("string"===e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if("string"!==e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},1136:function(t,e,n){var r=n(626),o=n(946),i=n(7857),a=n(6059);t.exports=r("Reflect","ownKeys")||function(t){var e=o.f(a(t)),n=i.f;return n?e.concat(n(t)):e}},4058:function(t){t.exports={}},2:function(t){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},6584:function(t,e,n){var r=n(6059),o=n(941),i=n(9520);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t);return(0,n.resolve)(e),n.promise}},7524:function(t,e,n){var r=n(9754);t.exports=function(t,e,n){for(var o in e)n&&n.unsafe&&t[o]?t[o]=e[o]:r(t,o,e[o],n);return t}},9754:function(t,e,n){var r=n(2029);t.exports=function(t,e,n,o){o&&o.enumerable?t[e]=n:r(t,e,n)}},8219:function(t){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},4911:function(t,e,n){var r=n(1899);t.exports=function(t,e){try{Object.defineProperty(r,t,{value:e,configurable:!0,writable:!0})}catch(n){r[t]=e}return e}},4431:function(t,e,n){"use strict";var r=n(626),o=n(5988),i=n(9813),a=n(5746),s=i("species");t.exports=function(t){var e=r(t),n=o.f;a&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},904:function(t,e,n){var r=n(2885),o=n(5988).f,i=n(2029),a=n(7457),s=n(5623),c=n(9813)("toStringTag");t.exports=function(t,e,n,l){if(t){var u=n?t:t.prototype;a(u,c)||o(u,c,{configurable:!0,value:e}),l&&!r&&i(u,"toString",s)}}},4262:function(t,e,n){var r=n(8726),o=n(9418),i=r("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},3030:function(t,e,n){var r=n(1899),o=n(4911),i="__core-js_shared__",a=r[i]||o(i,{});t.exports=a},8726:function(t,e,n){var r=n(2529),o=n(3030);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.16.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},487:function(t,e,n){var r=n(6059),o=n(3916),i=n(9813)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[i])?e:o(n)}},4620:function(t,e,n){var r=n(8459),o=n(5803),i=n(8219),a=function(t){return function(e,n){var a,s,c=o(i(e)),l=r(n),u=c.length;return l<0||l>=u?t?"":void 0:(a=c.charCodeAt(l))<55296||a>56319||l+1===u||(s=c.charCodeAt(l+1))<56320||s>57343?t?c.charAt(l):a:t?c.slice(l,l+2):s-56320+(a-55296<<10)+65536}};t.exports={codeAt:a(!1),charAt:a(!0)}},3093:function(t,e,n){var r=n(5981),o=n(3483);t.exports=function(t){return r((function(){return!!o[t]()||"
"!="
"[t]()||o[t].name!==t}))}},4853:function(t,e,n){var r=n(8219),o=n(5803),i="["+n(3483)+"]",a=RegExp("^"+i+i+"*"),s=RegExp(i+i+"*$"),c=function(t){return function(e){var n=o(r(e));return 1&t&&(n=n.replace(a,"")),2&t&&(n=n.replace(s,"")),n}};t.exports={start:c(1),end:c(2),trim:c(3)}},2941:function(t,e,n){var r,o,i,a,s=n(1899),c=n(5981),l=n(6843),u=n(5463),p=n(1333),f=n(2749),h=n(6049),d=s.setImmediate,v=s.clearImmediate,y=s.process,m=s.MessageChannel,g=s.Dispatch,b=0,_={};try{r=s.location}catch(t){}var w=function(t){if(_.hasOwnProperty(t)){var e=_[t];delete _[t],e()}},x=function(t){return function(){w(t)}},T=function(t){w(t.data)},E=function(t){s.postMessage(String(t),r.protocol+"//"+r.host)};d&&v||(d=function(t){for(var e=[],n=arguments.length,r=1;n>r;)e.push(arguments[r++]);return _[++b]=function(){("function"==typeof t?t:Function(t)).apply(void 0,e)},o(b),b},v=function(t){delete _[t]},h?o=function(t){y.nextTick(x(t))}:g&&g.now?o=function(t){g.now(x(t))}:m&&!f?(a=(i=new m).port2,i.port1.onmessage=T,o=l(a.postMessage,a,1)):s.addEventListener&&"function"==typeof postMessage&&!s.importScripts&&r&&"file:"!==r.protocol&&!c(E)?(o=E,s.addEventListener("message",T,!1)):o="onreadystatechange"in p("script")?function(t){u.appendChild(p("script")).onreadystatechange=function(){u.removeChild(this),w(t)}}:function(t){setTimeout(x(t),0)}),t.exports={set:d,clear:v}},9413:function(t,e,n){var r=n(8459),o=Math.max,i=Math.min;t.exports=function(t,e){var n=r(t);return n<0?o(n+e,0):i(n,e)}},4529:function(t,e,n){var r=n(7026),o=n(8219);t.exports=function(t){return r(o(t))}},8459:function(t){var e=Math.ceil,n=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?n:e)(t)}},3057:function(t,e,n){var r=n(8459),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},9678:function(t,e,n){var r=n(8219);t.exports=function(t){return Object(r(t))}},6935:function(t,e,n){var r=n(941),o=n(6664),i=n(9811),a=n(9813)("toPrimitive");t.exports=function(t,e){if(!r(t)||o(t))return t;var n,s=t[a];if(void 0!==s){if(void 0===e&&(e="default"),n=s.call(t,e),!r(n)||o(n))return n;throw TypeError("Can't convert object to primitive value")}return void 0===e&&(e="number"),i(t,e)}},3894:function(t,e,n){var r=n(6935),o=n(6664);t.exports=function(t){var e=r(t,"string");return o(e)?e:String(e)}},2885:function(t,e,n){var r={};r[n(9813)("toStringTag")]="z",t.exports="[object z]"===String(r)},5803:function(t,e,n){var r=n(6664);t.exports=function(t){if(r(t))throw TypeError("Cannot convert a Symbol value to a string");return String(t)}},9418:function(t){var e=0,n=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+n).toString(36)}},2302:function(t,e,n){var r=n(2497);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},1477:function(t,e,n){var r=n(9813);e.f=r},9813:function(t,e,n){var r=n(1899),o=n(8726),i=n(7457),a=n(9418),s=n(2497),c=n(2302),l=o("wks"),u=r.Symbol,p=c?u:u&&u.withoutSetter||a;t.exports=function(t){return i(l,t)&&(s||"string"==typeof l[t])||(s&&i(u,t)?l[t]=u[t]:l[t]=p("Symbol."+t)),l[t]}},3483:function(t){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},7627:function(t,e,n){"use strict";var r=n(6887),o=n(249),i=n(8929),a=n(9290),s=n(2029),c=n(1887),l=n(3091),u=n(5803),p=function(t,e){var n=this;if(!(n instanceof p))return new p(t,e);i&&(n=i(new Error(void 0),o(n))),void 0!==e&&s(n,"message",u(e));var r=[];return l(t,r.push,{that:r}),s(n,"errors",r),n};p.prototype=a(Error.prototype,{constructor:c(5,p),message:c(5,""),name:c(5,"AggregateError")}),r({global:!0},{AggregateError:p})},5906:function(t,e,n){"use strict";var r=n(6887),o=n(5981),i=n(1052),a=n(941),s=n(9678),c=n(3057),l=n(5449),u=n(4692),p=n(568),f=n(9813),h=n(3385),d=f("isConcatSpreadable"),v=9007199254740991,y="Maximum allowed index exceeded",m=h>=51||!o((function(){var t=[];return t[d]=!1,t.concat()[0]!==t})),g=p("concat"),b=function(t){if(!a(t))return!1;var e=t[d];return void 0!==e?!!e:i(t)};r({target:"Array",proto:!0,forced:!m||!g},{concat:function(t){var e,n,r,o,i,a=s(this),p=u(a,0),f=0;for(e=-1,r=arguments.length;e<r;e++)if(b(i=-1===e?a:arguments[e])){if(f+(o=c(i.length))>v)throw TypeError(y);for(n=0;n<o;n++,f++)n in i&&l(p,f,i[n])}else{if(f>=v)throw TypeError(y);l(p,f++,i)}return p.length=f,p}})},8851:function(t,e,n){"use strict";var r=n(6887),o=n(3610).every;r({target:"Array",proto:!0,forced:!n(4194)("every")},{every:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},290:function(t,e,n){var r=n(6887),o=n(1860),i=n(8479);r({target:"Array",proto:!0},{fill:o}),i("fill")},1501:function(t,e,n){"use strict";var r=n(6887),o=n(3610).filter;r({target:"Array",proto:!0,forced:!n(568)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},4929:function(t,e,n){"use strict";var r=n(6887),o=n(3610).findIndex,i=n(8479),a="findIndex",s=!0;a in[]&&Array(1).findIndex((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(a)},833:function(t,e,n){"use strict";var r=n(6887),o=n(3610).find,i=n(8479),a="find",s=!0;a in[]&&Array(1).find((function(){s=!1})),r({target:"Array",proto:!0,forced:s},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(a)},4944:function(t,e,n){"use strict";var r=n(6887),o=n(3092),i=n(9678),a=n(3057),s=n(8459),c=n(4692);r({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=i(this),n=a(e.length),r=c(e,0);return r.length=o(r,e,e,n,0,void 0===t?1:s(t)),r}})},2437:function(t,e,n){"use strict";var r=n(6887),o=n(6837);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},3242:function(t,e,n){var r=n(6887),o=n(1354);r({target:"Array",stat:!0,forced:!n(1385)((function(t){Array.from(t)}))},{from:o})},7690:function(t,e,n){"use strict";var r=n(6887),o=n(1692).includes,i=n(8479);r({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},9076:function(t,e,n){"use strict";var r=n(6887),o=n(1692).indexOf,i=n(4194),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,c=i("indexOf");r({target:"Array",proto:!0,forced:s||!c},{indexOf:function(t){return s?a.apply(this,arguments)||0:o(this,t,arguments.length>1?arguments[1]:void 0)}})},2737:function(t,e,n){n(6887)({target:"Array",stat:!0},{isArray:n(1052)})},6274:function(t,e,n){"use strict";var r=n(4529),o=n(8479),i=n(2077),a=n(5402),s=n(7771),c="Array Iterator",l=a.set,u=a.getterFor(c);t.exports=s(Array,"Array",(function(t,e){l(this,{type:c,target:r(t),index:0,kind:e})}),(function(){var t=u(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},8787:function(t,e,n){"use strict";var r=n(6887),o=n(3610).map;r({target:"Array",proto:!0,forced:!n(568)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},1876:function(t,e,n){"use strict";var r=n(6887),o=n(6499).left,i=n(4194),a=n(3385),s=n(6049);r({target:"Array",proto:!0,forced:!i("reduce")||!s&&a>79&&a<83},{reduce:function(t){return o(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},1490:function(t,e,n){"use strict";var r=n(6887),o=n(1052),i=[].reverse,a=[1,2];r({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return o(this)&&(this.length=this.length),i.call(this)}})},186:function(t,e,n){"use strict";var r=n(6887),o=n(941),i=n(1052),a=n(9413),s=n(3057),c=n(4529),l=n(5449),u=n(9813),p=n(568)("slice"),f=u("species"),h=[].slice,d=Math.max;r({target:"Array",proto:!0,forced:!p},{slice:function(t,e){var n,r,u,p=c(this),v=s(p.length),y=a(t,v),m=a(void 0===e?v:e,v);if(i(p)&&("function"!=typeof(n=p.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[f])&&(n=void 0):n=void 0,n===Array||void 0===n))return h.call(p,y,m);for(r=new(void 0===n?Array:n)(d(m-y,0)),u=0;y<m;y++,u++)y in p&&l(r,u,p[y]);return r.length=u,r}})},6026:function(t,e,n){"use strict";var r=n(6887),o=n(3610).some;r({target:"Array",proto:!0,forced:!n(4194)("some")},{some:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},4115:function(t,e,n){"use strict";var r=n(6887),o=n(3916),i=n(9678),a=n(3057),s=n(5803),c=n(5981),l=n(1388),u=n(4194),p=n(4342),f=n(7797),h=n(3385),d=n(8938),v=[],y=v.sort,m=c((function(){v.sort(void 0)})),g=c((function(){v.sort(null)})),b=u("sort"),_=!c((function(){if(h)return h<70;if(!(p&&p>3)){if(f)return!0;if(d)return d<603;var t,e,n,r,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(r=0;r<47;r++)v.push({k:e+r,v:n})}for(v.sort((function(t,e){return e.v-t.v})),r=0;r<v.length;r++)e=v[r].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));r({target:"Array",proto:!0,forced:m||!g||!b||!_},{sort:function(t){void 0!==t&&o(t);var e=i(this);if(_)return void 0===t?y.call(e):y.call(e,t);var n,r,c=[],u=a(e.length);for(r=0;r<u;r++)r in e&&c.push(e[r]);for(n=(c=l(c,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:s(e)>s(n)?1:-1}}(t))).length,r=0;r<n;)e[r]=c[r++];for(;r<u;)delete e[r++];return e}})},1107:function(t,e,n){n(8479)("flat")},5160:function(t,e,n){n(6887)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},3381:function(t,e,n){n(6887)({target:"Function",proto:!0},{bind:n(8308)})},2619:function(t,e,n){var r=n(6887),o=n(626),i=n(5981),a=o("JSON","stringify"),s=/[\uD800-\uDFFF]/g,c=/^[\uD800-\uDBFF]$/,l=/^[\uDC00-\uDFFF]$/,u=function(t,e,n){var r=n.charAt(e-1),o=n.charAt(e+1);return c.test(t)&&!l.test(o)||l.test(t)&&!c.test(r)?"\\u"+t.charCodeAt(0).toString(16):t},p=i((function(){return'"\\udf06\\ud834"'!==a("\udf06\ud834")||'"\\udead"'!==a("\udead")}));a&&r({target:"JSON",stat:!0,forced:p},{stringify:function(t,e,n){var r=a.apply(null,arguments);return"string"==typeof r?r.replace(s,u):r}})},9120:function(t,e,n){var r=n(1899);n(904)(r.JSON,"JSON",!0)},5327:function(){},8103:function(t,e,n){var r=n(6887),o=Math.ceil,i=Math.floor;r({target:"Math",stat:!0},{trunc:function(t){return(t>0?i:o)(t)}})},9221:function(t,e,n){var r=n(6887),o=n(4420);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},3882:function(t,e,n){n(6887)({target:"Object",stat:!0,sham:!n(5746)},{create:n(9290)})},4979:function(t,e,n){var r=n(6887),o=n(5746);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperties:n(9938)})},6450:function(t,e,n){var r=n(6887),o=n(5746);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:n(5988).f})},1078:function(t,e,n){var r=n(6887),o=n(8810).entries;r({target:"Object",stat:!0},{entries:function(t){return o(t)}})},6924:function(t,e,n){var r=n(6887),o=n(5981),i=n(4529),a=n(9677).f,s=n(5746),c=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||c,sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(i(t),e)}})},8482:function(t,e,n){var r=n(6887),o=n(5746),i=n(1136),a=n(4529),s=n(9677),c=n(5449);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),o=s.f,l=i(r),u={},p=0;l.length>p;)void 0!==(n=o(r,e=l[p++]))&&c(u,e,n);return u}})},9816:function(t,e,n){var r=n(6887),o=n(5981),i=n(684).f;r({target:"Object",stat:!0,forced:o((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},7405:function(t,e,n){var r=n(6887),o=n(5981),i=n(9678),a=n(249),s=n(4160);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(i(t))}})},1724:function(t,e,n){var r=n(6887),o=n(9678),i=n(4771);r({target:"Object",stat:!0,forced:n(5981)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},5967:function(){},6614:function(t,e,n){var r=n(6887),o=n(8810).values;r({target:"Object",stat:!0},{values:function(t){return o(t)}})},9718:function(t,e,n){var r=n(6887),o=n(4018);r({global:!0,forced:parseFloat!=o},{parseFloat:o})},4038:function(t,e,n){var r=n(6887),o=n(9806);r({global:!0,forced:parseInt!=o},{parseInt:o})},4560:function(t,e,n){"use strict";var r=n(6887),o=n(3916),i=n(9520),a=n(2),s=n(3091);r({target:"Promise",stat:!0},{allSettled:function(t){var e=this,n=i.f(e),r=n.resolve,c=n.reject,l=a((function(){var n=o(e.resolve),i=[],a=0,c=1;s(t,(function(t){var o=a++,s=!1;i.push(void 0),c++,n.call(e,t).then((function(t){s||(s=!0,i[o]={status:"fulfilled",value:t},--c||r(i))}),(function(t){s||(s=!0,i[o]={status:"rejected",reason:t},--c||r(i))}))})),--c||r(i)}));return l.error&&c(l.value),n.promise}})},7206:function(t,e,n){"use strict";var r=n(6887),o=n(3916),i=n(626),a=n(9520),s=n(2),c=n(3091),l="No one promise resolved";r({target:"Promise",stat:!0},{any:function(t){var e=this,n=a.f(e),r=n.resolve,u=n.reject,p=s((function(){var n=o(e.resolve),a=[],s=0,p=1,f=!1;c(t,(function(t){var o=s++,c=!1;a.push(void 0),p++,n.call(e,t).then((function(t){c||f||(f=!0,r(t))}),(function(t){c||f||(c=!0,a[o]=t,--p||u(new(i("AggregateError"))(a,l)))}))})),--p||u(new(i("AggregateError"))(a,l))}));return p.error&&u(p.value),n.promise}})},4349:function(t,e,n){"use strict";var r=n(6887),o=n(2529),i=n(9297),a=n(5981),s=n(626),c=n(487),l=n(6584),u=n(9754);if(r({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(t){var e=c(this,s("Promise")),n="function"==typeof t;return this.then(n?function(n){return l(e,t()).then((function(){return n}))}:t,n?function(n){return l(e,t()).then((function(){throw n}))}:t)}}),!o&&"function"==typeof i){var p=s("Promise").prototype.finally;i.prototype.finally!==p&&u(i.prototype,"finally",p,{unsafe:!0})}},8881:function(t,e,n){"use strict";var r,o,i,a,s=n(6887),c=n(2529),l=n(1899),u=n(626),p=n(9297),f=n(9754),h=n(7524),d=n(8929),v=n(904),y=n(4431),m=n(941),g=n(3916),b=n(5743),_=n(1302),w=n(3091),x=n(1385),T=n(487),E=n(2941).set,S=n(6132),k=n(6584),A=n(4845),O=n(9520),C=n(2),I=n(5402),N=n(7252),j=n(9813),R=n(3321),P=n(6049),L=n(3385),D=j("species"),U="Promise",M=I.get,z=I.set,F=I.getterFor(U),$=p&&p.prototype,B=p,H=$,V=l.TypeError,q=l.document,W=l.process,G=O.f,K=G,Y=!!(q&&q.createEvent&&l.dispatchEvent),J="function"==typeof PromiseRejectionEvent,Q="unhandledrejection",Z=!1,X=N(U,(function(){var t=_(B),e=t!==String(B);if(!e&&66===L)return!0;if(c&&!H.finally)return!0;if(L>=51&&/native code/.test(t))return!1;var n=new B((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[D]=r,!(Z=n.then((function(){}))instanceof r)||!e&&R&&!J})),tt=X||!x((function(t){B.all(t).catch((function(){}))})),et=function(t){var e;return!(!m(t)||"function"!=typeof(e=t.then))&&e},nt=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;S((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var a,s,c,l=n[i++],u=o?l.ok:l.fail,p=l.resolve,f=l.reject,h=l.domain;try{u?(o||(2===t.rejection&&at(t),t.rejection=1),!0===u?a=r:(h&&h.enter(),a=u(r),h&&(h.exit(),c=!0)),a===l.promise?f(V("Promise-chain cycle")):(s=et(a))?s.call(a,p,f):p(a)):f(r)}catch(t){h&&!c&&h.exit(),f(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ot(t)}))}},rt=function(t,e,n){var r,o;Y?((r=q.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),l.dispatchEvent(r)):r={promise:e,reason:n},!J&&(o=l["on"+t])?o(r):t===Q&&A("Unhandled promise rejection",n)},ot=function(t){E.call(l,(function(){var e,n=t.facade,r=t.value;if(it(t)&&(e=C((function(){P?W.emit("unhandledRejection",r,n):rt(Q,n,r)})),t.rejection=P||it(t)?2:1,e.error))throw e.value}))},it=function(t){return 1!==t.rejection&&!t.parent},at=function(t){E.call(l,(function(){var e=t.facade;P?W.emit("rejectionHandled",e):rt("rejectionhandled",e,t.value)}))},st=function(t,e,n){return function(r){t(e,r,n)}},ct=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,nt(t,!0))},lt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw V("Promise can't be resolved itself");var r=et(e);r?S((function(){var n={done:!1};try{r.call(e,st(lt,n,t),st(ct,n,t))}catch(e){ct(n,e,t)}})):(t.value=e,t.state=1,nt(t,!1))}catch(e){ct({done:!1},e,t)}}};if(X&&(H=(B=function(t){b(this,B,U),g(t),r.call(this);var e=M(this);try{t(st(lt,e),st(ct,e))}catch(t){ct(e,t)}}).prototype,(r=function(t){z(this,{type:U,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(H,{then:function(t,e){var n=F(this),r=G(T(this,B));return r.ok="function"!=typeof t||t,r.fail="function"==typeof e&&e,r.domain=P?W.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&nt(n,!1),r.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new r,e=M(t);this.promise=t,this.resolve=st(lt,e),this.reject=st(ct,e)},O.f=G=function(t){return t===B||t===i?new o(t):K(t)},!c&&"function"==typeof p&&$!==Object.prototype)){a=$.then,Z||(f($,"then",(function(t,e){var n=this;return new B((function(t,e){a.call(n,t,e)})).then(t,e)}),{unsafe:!0}),f($,"catch",H.catch,{unsafe:!0}));try{delete $.constructor}catch(t){}d&&d($,H)}s({global:!0,wrap:!0,forced:X},{Promise:B}),v(B,U,!1,!0),y(U),i=u(U),s({target:U,stat:!0,forced:X},{reject:function(t){var e=G(this);return e.reject.call(void 0,t),e.promise}}),s({target:U,stat:!0,forced:c||X},{resolve:function(t){return k(c&&this===i?B:this,t)}}),s({target:U,stat:!0,forced:tt},{all:function(t){var e=this,n=G(e),r=n.resolve,o=n.reject,i=C((function(){var n=g(e.resolve),i=[],a=0,s=1;w(t,(function(t){var c=a++,l=!1;i.push(void 0),s++,n.call(e,t).then((function(t){l||(l=!0,i[c]=t,--s||r(i))}),o)})),--s||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=G(e),r=n.reject,o=C((function(){var o=g(e.resolve);w(t,(function(t){o.call(e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},1502:function(){},9008:function(t,e,n){"use strict";var r=n(4683),o=n(5616);t.exports=r("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),o)},1035:function(t,e,n){"use strict";var r=n(6887),o=n(344),i=n(8219),a=n(5803);r({target:"String",proto:!0,forced:!n(7772)("includes")},{includes:function(t){return!!~a(i(this)).indexOf(a(o(t)),arguments.length>1?arguments[1]:void 0)}})},7971:function(t,e,n){"use strict";var r=n(4620).charAt,o=n(5803),i=n(5402),a=n(7771),s="String Iterator",c=i.set,l=i.getterFor(s);a(String,"String",(function(t){c(this,{type:s,string:o(t),index:0})}),(function(){var t,e=l(this),n=e.string,o=e.index;return o>=n.length?{value:void 0,done:!0}:(t=r(n,o),e.index+=t.length,{value:t,done:!1})}))},7398:function(t,e,n){"use strict";var r=n(6887),o=n(4853).trim;r({target:"String",proto:!0,forced:n(3093)("trim")},{trim:function(){return o(this)}})},8555:function(t,e,n){n(6349)("asyncIterator")},2615:function(){},1732:function(t,e,n){n(6349)("hasInstance")},5903:function(t,e,n){n(6349)("isConcatSpreadable")},1825:function(t,e,n){n(6349)("iterator")},5824:function(t,e,n){"use strict";var r=n(6887),o=n(1899),i=n(626),a=n(2529),s=n(5746),c=n(2497),l=n(5981),u=n(7457),p=n(1052),f=n(941),h=n(6664),d=n(6059),v=n(9678),y=n(4529),m=n(3894),g=n(5803),b=n(1887),_=n(9290),w=n(4771),x=n(946),T=n(684),E=n(7857),S=n(9677),k=n(5988),A=n(6760),O=n(2029),C=n(9754),I=n(8726),N=n(4262),j=n(7748),R=n(9418),P=n(9813),L=n(1477),D=n(6349),U=n(904),M=n(5402),z=n(3610).forEach,F=N("hidden"),$="Symbol",B=P("toPrimitive"),H=M.set,V=M.getterFor($),q=Object.prototype,W=o.Symbol,G=i("JSON","stringify"),K=S.f,Y=k.f,J=T.f,Q=A.f,Z=I("symbols"),X=I("op-symbols"),tt=I("string-to-symbol-registry"),et=I("symbol-to-string-registry"),nt=I("wks"),rt=o.QObject,ot=!rt||!rt.prototype||!rt.prototype.findChild,it=s&&l((function(){return 7!=_(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=K(q,e);r&&delete q[e],Y(t,e,n),r&&t!==q&&Y(q,e,r)}:Y,at=function(t,e){var n=Z[t]=_(W.prototype);return H(n,{type:$,tag:t,description:e}),s||(n.description=e),n},st=function(t,e,n){t===q&&st(X,e,n),d(t);var r=m(e);return d(n),u(Z,r)?(n.enumerable?(u(t,F)&&t[F][r]&&(t[F][r]=!1),n=_(n,{enumerable:b(0,!1)})):(u(t,F)||Y(t,F,b(1,{})),t[F][r]=!0),it(t,r,n)):Y(t,r,n)},ct=function(t,e){d(t);var n=y(e),r=w(n).concat(ft(n));return z(r,(function(e){s&&!lt.call(n,e)||st(t,e,n[e])})),t},lt=function(t){var e=m(t),n=Q.call(this,e);return!(this===q&&u(Z,e)&&!u(X,e))&&(!(n||!u(this,e)||!u(Z,e)||u(this,F)&&this[F][e])||n)},ut=function(t,e){var n=y(t),r=m(e);if(n!==q||!u(Z,r)||u(X,r)){var o=K(n,r);return!o||!u(Z,r)||u(n,F)&&n[F][r]||(o.enumerable=!0),o}},pt=function(t){var e=J(y(t)),n=[];return z(e,(function(t){u(Z,t)||u(j,t)||n.push(t)})),n},ft=function(t){var e=t===q,n=J(e?X:y(t)),r=[];return z(n,(function(t){!u(Z,t)||e&&!u(q,t)||r.push(Z[t])})),r};c||(C((W=function(){if(this instanceof W)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?g(arguments[0]):void 0,e=R(t),n=function(t){this===q&&n.call(X,t),u(this,F)&&u(this[F],e)&&(this[F][e]=!1),it(this,e,b(1,t))};return s&&ot&&it(q,e,{configurable:!0,set:n}),at(e,t)}).prototype,"toString",(function(){return V(this).tag})),C(W,"withoutSetter",(function(t){return at(R(t),t)})),A.f=lt,k.f=st,S.f=ut,x.f=T.f=pt,E.f=ft,L.f=function(t){return at(P(t),t)},s&&(Y(W.prototype,"description",{configurable:!0,get:function(){return V(this).description}}),a||C(q,"propertyIsEnumerable",lt,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!c,sham:!c},{Symbol:W}),z(w(nt),(function(t){D(t)})),r({target:$,stat:!0,forced:!c},{for:function(t){var e=g(t);if(u(tt,e))return tt[e];var n=W(e);return tt[e]=n,et[n]=e,n},keyFor:function(t){if(!h(t))throw TypeError(t+" is not a symbol");if(u(et,t))return et[t]},useSetter:function(){ot=!0},useSimple:function(){ot=!1}}),r({target:"Object",stat:!0,forced:!c,sham:!s},{create:function(t,e){return void 0===e?_(t):ct(_(t),e)},defineProperty:st,defineProperties:ct,getOwnPropertyDescriptor:ut}),r({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:pt,getOwnPropertySymbols:ft}),r({target:"Object",stat:!0,forced:l((function(){E.f(1)}))},{getOwnPropertySymbols:function(t){return E.f(v(t))}}),G&&r({target:"JSON",stat:!0,forced:!c||l((function(){var t=W();return"[null]"!=G([t])||"{}"!=G({a:t})||"{}"!=G(Object(t))}))},{stringify:function(t,e,n){for(var r,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=e,(f(e)||void 0!==t)&&!h(t))return p(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!h(e))return e}),o[1]=e,G.apply(null,o)}}),W.prototype[B]||O(W.prototype,B,W.prototype.valueOf),U(W,$),j[F]=!0},5915:function(t,e,n){n(6349)("matchAll")},8394:function(t,e,n){n(6349)("match")},1437:function(t,e,n){n(6349)("replace")},9791:function(t,e,n){n(6349)("search")},9911:function(t,e,n){n(6349)("species")},4315:function(t,e,n){n(6349)("split")},3131:function(t,e,n){n(6349)("toPrimitive")},4714:function(t,e,n){n(6349)("toStringTag")},659:function(t,e,n){n(6349)("unscopables")},7634:function(t,e,n){n(6274);var r=n(3281),o=n(1899),i=n(9697),a=n(2029),s=n(2077),c=n(9813)("toStringTag");for(var l in r){var u=o[l],p=u&&u.prototype;p&&i(p)!==c&&a(p,c,l),s[l]=s.Array}},1249:function(t,e,n){var r=n(6887),o=n(1899),i=n(2861),a=[].slice,s=function(t){return function(e,n){var r=arguments.length>2,o=r?a.call(arguments,2):void 0;return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,o)}:e,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(i)},{setTimeout:s(o.setTimeout),setInterval:s(o.setInterval)})},7698:function(t,e,n){var r=n(4493);t.exports=r},3363:function(t,e,n){var r=n(4034);t.exports=r},9216:function(t,e,n){var r=n(9324);t.exports=r},7784:function(t,e,n){var r=n(1103);t.exports=r},8196:function(t,e,n){var r=n(6246);t.exports=r},8065:function(t,e,n){var r=n(6043);t.exports=r},9455:function(t,e,n){var r=n(3160);t.exports=r},9743:function(t,e,n){var r=n(446);t.exports=r},1955:function(t,e,n){var r=n(2480);t.exports=r},6064:function(t,e,n){var r=n(7147);t.exports=r},1577:function(t,e,n){var r=n(2236);t.exports=r},4913:function(t,e,n){var r=n(8098);t.exports=r},6279:function(t,e,n){n(7634);var r=n(9216),o=n(9697),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};t.exports=function(t){var e=t.forEach;return t===i||t instanceof Array&&e===i.forEach||a.hasOwnProperty(o(t))?r:e}},3778:function(t,e,n){var r=n(8557);t.exports=r},9373:function(t,e,n){var r=n(4570);t.exports=r},1798:function(t,e,n){var r=n(8287);t.exports=r},2527:function(t,e,n){var r=n(8025);t.exports=r},8427:function(t,e,n){var r=n(1060);t.exports=r},2073:function(t,e,n){var r=n(9601);t.exports=r},5286:function(t,e,n){var r=n(8299);t.exports=r},2856:function(t,e,n){var r=n(9355);t.exports=r},6361:function(t,e,n){var r=n(2774);t.exports=r},8933:function(t,e,n){var r=n(4426);t.exports=r},5838:function(t,e,n){var r=n(9179);t.exports=r},3383:function(t,e,n){var r=n(5999);t.exports=r},4471:function(t,e,n){var r=n(5254);t.exports=r},7396:function(t,e,n){var r=n(7702);t.exports=r},1910:function(t,e,n){var r=n(8171);t.exports=r},6209:function(t,e,n){var r=n(3081);t.exports=r},9427:function(t,e,n){var r=n(286);t.exports=r},2857:function(t,e,n){var r=n(2766);t.exports=r},4477:function(t,e,n){var r=n(3288);t.exports=r},9534:function(t,e,n){var r=n(498);t.exports=r},6507:function(t,e,n){var r=n(3966);t.exports=r},3059:function(t,e,n){var r=n(8494);t.exports=r},7795:function(t,e,n){var r=n(8430);t.exports=r},6877:function(t,e,n){var r=n(7579);t.exports=r},4888:function(t,e,n){var r=n(8524);t.exports=r},7460:function(t,e,n){var r=n(2956);n(7634),t.exports=r},3474:function(t,e,n){n(1249);var r=n(4058);t.exports=r.setInterval},7989:function(t,e,n){n(1249);var r=n(4058);t.exports=r.setTimeout},5519:function(t,e,n){var r=n(6998);n(7634),t.exports=r},2547:function(t,e,n){var r=n(7473);n(7634),t.exports=r},6509:function(t,e,n){var r=n(4227);n(7634),t.exports=r},4289:function(t,e,n){"use strict";var r=n(2215),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,s=Object.defineProperty,c=s&&function(){var t={};try{for(var e in s(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),l=function(t,e,n,r){var o;(!(e in t)||"function"==typeof(o=r)&&"[object Function]"===i.call(o)&&r())&&(c?s(t,e,{configurable:!0,enumerable:!1,value:n,writable:!0}):t[e]=n)},u=function(t,e){var n=arguments.length>2?arguments[2]:{},i=r(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var s=0;s<i.length;s+=1)l(t,i[s],e[i[s]],n[i[s]])};u.supportsDescriptors=!!c,t.exports=u},4445:function(t){t.exports=a,a.default=a,a.stable=u,a.stableStringify=u;var e="[...]",n="[Circular]",r=[],o=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function a(t,e,n,a){var s;void 0===a&&(a=i()),c(t,"",0,[],void 0,0,a);try{s=0===o.length?JSON.stringify(t,e,n):JSON.stringify(t,f(e),n)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var l=r.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return s}function s(t,e,n,i){var a=Object.getOwnPropertyDescriptor(i,n);void 0!==a.get?a.configurable?(Object.defineProperty(i,n,{value:t}),r.push([i,n,e,a])):o.push([e,n,t]):(i[n]=t,r.push([i,n,e]))}function c(t,r,o,i,a,l,u){var p;if(l+=1,"object"==typeof t&&null!==t){for(p=0;p<i.length;p++)if(i[p]===t)return void s(n,t,r,a);if(void 0!==u.depthLimit&&l>u.depthLimit)return void s(e,t,r,a);if(void 0!==u.edgesLimit&&o+1>u.edgesLimit)return void s(e,t,r,a);if(i.push(t),Array.isArray(t))for(p=0;p<t.length;p++)c(t[p],p,p,i,t,l,u);else{var f=Object.keys(t);for(p=0;p<f.length;p++){var h=f[p];c(t[h],h,p,i,t,l,u)}}i.pop()}}function l(t,e){return t<e?-1:t>e?1:0}function u(t,e,n,a){void 0===a&&(a=i());var s,c=p(t,"",0,[],void 0,0,a)||t;try{s=0===o.length?JSON.stringify(c,e,n):JSON.stringify(c,f(e),n)}catch(t){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var l=r.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return s}function p(t,o,i,a,c,u,f){var h;if(u+=1,"object"==typeof t&&null!==t){for(h=0;h<a.length;h++)if(a[h]===t)return void s(n,t,o,c);try{if("function"==typeof t.toJSON)return}catch(t){return}if(void 0!==f.depthLimit&&u>f.depthLimit)return void s(e,t,o,c);if(void 0!==f.edgesLimit&&i+1>f.edgesLimit)return void s(e,t,o,c);if(a.push(t),Array.isArray(t))for(h=0;h<t.length;h++)p(t[h],h,h,a,t,u,f);else{var d={},v=Object.keys(t).sort(l);for(h=0;h<v.length;h++){var y=v[h];p(t[y],y,h,a,t,u,f),d[y]=t[y]}if(void 0===c)return d;r.push([c,o,t]),c[o]=d}a.pop()}}function f(t){return t=void 0!==t?t:function(t,e){return e},function(e,n){if(o.length>0)for(var r=0;r<o.length;r++){var i=o[r];if(i[1]===e&&i[0]===n){n=i[2],o.splice(r,1);break}}return t.call(this,e,n)}}},7648:function(t){"use strict";var e="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,r=Object.prototype.toString,o="[object Function]";t.exports=function(t){var i=this;if("function"!=typeof i||r.call(i)!==o)throw new TypeError(e+i);for(var a,s=n.call(arguments,1),c=function(){if(this instanceof a){var e=i.apply(this,s.concat(n.call(arguments)));return Object(e)===e?e:this}return i.apply(t,s.concat(n.call(arguments)))},l=Math.max(0,i.length-s.length),u=[],p=0;p<l;p++)u.push("$"+p);if(a=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(c),i.prototype){var f=function(){};f.prototype=i.prototype,a.prototype=new f,f.prototype=null}return a}},8612:function(t,e,n){"use strict";var r=n(7648);t.exports=Function.prototype.bind||r},210:function(t,e,n){"use strict";var r,o=SyntaxError,i=Function,a=TypeError,s=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(t){c=null}var l=function(){throw new a},u=c?function(){try{return l}catch(t){try{return c(arguments,"callee").get}catch(t){return l}}}():l,p=n(1405)(),f=Object.getPrototypeOf||function(t){return t.__proto__},h={},d="undefined"==typeof Uint8Array?r:f(Uint8Array),v={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":p?f([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p?f(f([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&p?f((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&p?f((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p?f(""[Symbol.iterator]()):r,"%Symbol%":p?Symbol:r,"%SyntaxError%":o,"%ThrowTypeError%":u,"%TypedArray%":d,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet},y=function t(e){var n;if("%AsyncFunction%"===e)n=s("async function () {}");else if("%GeneratorFunction%"===e)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=s("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&(n=f(o.prototype))}return v[e]=n,n},m={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},g=n(8612),b=n(7642),_=g.call(Function.call,Array.prototype.concat),w=g.call(Function.apply,Array.prototype.splice),x=g.call(Function.call,String.prototype.replace),T=g.call(Function.call,String.prototype.slice),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,S=/\\(\\)?/g,k=function(t){var e=T(t,0,1),n=T(t,-1);if("%"===e&&"%"!==n)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new o("invalid intrinsic syntax, expected opening `%`");var r=[];return x(t,E,(function(t,e,n,o){r[r.length]=n?x(o,S,"$1"):e||t})),r},A=function(t,e){var n,r=t;if(b(m,r)&&(r="%"+(n=m[r])[0]+"%"),b(v,r)){var i=v[r];if(i===h&&(i=y(r)),void 0===i&&!e)throw new a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new o("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');var n=k(t),r=n.length>0?n[0]:"",i=A("%"+r+"%",e),s=i.name,l=i.value,u=!1,p=i.alias;p&&(r=p[0],w(n,_([0,1],p)));for(var f=1,h=!0;f<n.length;f+=1){var d=n[f],y=T(d,0,1),m=T(d,-1);if(('"'===y||"'"===y||"`"===y||'"'===m||"'"===m||"`"===m)&&y!==m)throw new o("property names with quotes must have matching quotes");if("constructor"!==d&&h||(u=!0),b(v,s="%"+(r+="."+d)+"%"))l=v[s];else if(null!=l){if(!(d in l)){if(!e)throw new a("base intrinsic for "+t+" exists, but the property is not available.");return}if(c&&f+1>=n.length){var g=c(l,d);l=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:l[d]}else h=b(l,d),l=l[d];h&&!u&&(v[s]=l)}}return l}},1221:function(t){"use strict";"undefined"!=typeof self?t.exports=self:"undefined"!=typeof window?t.exports=window:t.exports=Function("return this")()},2503:function(t,e,n){"use strict";var r=n(4289),o=n(1221),i=n(2168),a=n(9471),s=i(),c=function(){return s};r(c,{getPolyfill:i,implementation:o,shim:a}),t.exports=c},2168:function(t,e,n){"use strict";var r=n(1221);t.exports=function(){return"object"==typeof n.g&&n.g&&n.g.Math===Math&&n.g.Array===Array?n.g:r}},9471:function(t,e,n){"use strict";var r=n(4289),o=n(2168);t.exports=function(){var t=o();if(r.supportsDescriptors){var e=Object.getOwnPropertyDescriptor(t,"globalThis");(!e||e.configurable&&(e.enumerable||e.writable||globalThis!==t))&&Object.defineProperty(t,"globalThis",{configurable:!0,enumerable:!1,value:t,writable:!1})}else"object"==typeof globalThis&&globalThis===t||(t.globalThis=t);return t}},1405:function(t,e,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5419);t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},5419:function(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7642:function(t,e,n){"use strict";var r=n(8612);t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},679:function(t){t.exports=function(t){var e={},n=[];(t=t||this).on=function(n,r,o){return(e[n]=e[n]||[]).push([r,o]),t},t.off=function(r,o){r||(e={});for(var i=e[r]||n,a=i.length=o?i.length:0;a--;)o==i[a][0]&&i.splice(a,1);return t},t.emit=function(r){for(var o,i=e[r]||n,a=i.length>0?i.slice(0,i.length):i,s=0;o=a[s++];)o[0].apply(o[1],n.slice.call(arguments,1));return t}}},631:function(t,e,n){var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=s&&c&&"function"==typeof c.get?c.get:null,u=s&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,h="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,v=Object.prototype.toString,y=Function.prototype.toString,m=String.prototype.match,g="function"==typeof BigInt?BigInt.prototype.valueOf:null,b=Object.getOwnPropertySymbols,_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,w="function"==typeof Symbol&&"object"==typeof Symbol.iterator,x=Object.prototype.propertyIsEnumerable,T=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null),E=n(4654).custom,S=E&&I(E)?E:null,k="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function A(t,e,n){var r="double"===(n.quoteStyle||e)?'"':"'";return r+t+r}function O(t){return String(t).replace(/"/g,""")}function C(t){return!("[object Array]"!==R(t)||k&&"object"==typeof t&&k in t)}function I(t){if(w)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!_)return!1;try{return _.call(t),!0}catch(t){}return!1}t.exports=function t(e,n,r,o){var s=n||{};if(j(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(j(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!j(s,"customInspect")||s.customInspect;if("boolean"!=typeof c)throw new TypeError('option "customInspect", if provided, must be `true` or `false`');if(j(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return L(e,s);if("number"==typeof e)return 0===e?1/0/e>0?"0":"-0":String(e);if("bigint"==typeof e)return String(e)+"n";var v=void 0===s.depth?5:s.depth;if(void 0===r&&(r=0),r>=v&&v>0&&"object"==typeof e)return C(e)?"[Array]":"[Object]";var b,x=function(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;n=Array(t.indent+1).join(" ")}return{base:n,prev:Array(e+1).join(n)}}(s,r);if(void 0===o)o=[];else if(P(o,e)>=0)return"[Circular]";function E(e,n,i){if(n&&(o=o.slice()).push(n),i){var a={depth:s.depth};return j(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),t(e,a,r+1,o)}return t(e,s,r+1,o)}if("function"==typeof e){var N=function(t){if(t.name)return t.name;var e=m.call(y.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),D=$(e,E);return"[Function"+(N?": "+N:" (anonymous)")+"]"+(D.length>0?" { "+D.join(", ")+" }":"")}if(I(e)){var B=w?String(e).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):_.call(e);return"object"!=typeof e||w?B:U(B)}if((b=e)&&"object"==typeof b&&("undefined"!=typeof HTMLElement&&b instanceof HTMLElement||"string"==typeof b.nodeName&&"function"==typeof b.getAttribute)){for(var H="<"+String(e.nodeName).toLowerCase(),V=e.attributes||[],q=0;q<V.length;q++)H+=" "+V[q].name+"="+A(O(V[q].value),"double",s);return H+=">",e.childNodes&&e.childNodes.length&&(H+="..."),H+"</"+String(e.nodeName).toLowerCase()+">"}if(C(e)){if(0===e.length)return"[]";var W=$(e,E);return x&&!function(t){for(var e=0;e<t.length;e++)if(P(t[e],"\n")>=0)return!1;return!0}(W)?"["+F(W,x)+"]":"[ "+W.join(", ")+" ]"}if(function(t){return!("[object Error]"!==R(t)||k&&"object"==typeof t&&k in t)}(e)){var G=$(e,E);return 0===G.length?"["+String(e)+"]":"{ ["+String(e)+"] "+G.join(", ")+" }"}if("object"==typeof e&&c){if(S&&"function"==typeof e[S])return e[S]();if("function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{l.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var K=[];return a.call(e,(function(t,n){K.push(E(n,e,!0)+" => "+E(t,e))})),z("Map",i.call(e),K,x)}if(function(t){if(!l||!t||"object"!=typeof t)return!1;try{l.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var Y=[];return u.call(e,(function(t){Y.push(E(t,e))})),z("Set",l.call(e),Y,x)}if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return M("WeakMap");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return M("WeakSet");if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{return h.call(t),!0}catch(t){}return!1}(e))return M("WeakRef");if(function(t){return!("[object Number]"!==R(t)||k&&"object"==typeof t&&k in t)}(e))return U(E(Number(e)));if(function(t){if(!t||"object"!=typeof t||!g)return!1;try{return g.call(t),!0}catch(t){}return!1}(e))return U(E(g.call(e)));if(function(t){return!("[object Boolean]"!==R(t)||k&&"object"==typeof t&&k in t)}(e))return U(d.call(e));if(function(t){return!("[object String]"!==R(t)||k&&"object"==typeof t&&k in t)}(e))return U(E(String(e)));if(!function(t){return!("[object Date]"!==R(t)||k&&"object"==typeof t&&k in t)}(e)&&!function(t){return!("[object RegExp]"!==R(t)||k&&"object"==typeof t&&k in t)}(e)){var J=$(e,E),Q=T?T(e)===Object.prototype:e instanceof Object||e.constructor===Object,Z=e instanceof Object?"":"null prototype",X=!Q&&k&&Object(e)===e&&k in e?R(e).slice(8,-1):Z?"Object":"",tt=(Q||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(X||Z?"["+[].concat(X||[],Z||[]).join(": ")+"] ":"");return 0===J.length?tt+"{}":x?tt+"{"+F(J,x)+"}":tt+"{ "+J.join(", ")+" }"}return String(e)};var N=Object.prototype.hasOwnProperty||function(t){return t in this};function j(t,e){return N.call(t,e)}function R(t){return v.call(t)}function P(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function L(t,e){if(t.length>e.maxStringLength){var n=t.length-e.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return L(t.slice(0,e.maxStringLength),e)+r}return A(t.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,D),"single",e)}function D(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+e.toString(16).toUpperCase()}function U(t){return"Object("+t+")"}function M(t){return t+" { ? }"}function z(t,e,n,r){return t+" ("+e+") {"+(r?F(n,r):n.join(", "))+"}"}function F(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+t.join(","+n)+"\n"+e.prev}function $(t,e){var n=C(t),r=[];if(n){r.length=t.length;for(var o=0;o<t.length;o++)r[o]=j(t,o)?e(t[o],t):""}var i,a="function"==typeof b?b(t):[];if(w){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in t)j(t,c)&&(n&&String(Number(c))===c&&c<t.length||w&&i["$"+c]instanceof Symbol||(/[^\w$]/.test(c)?r.push(e(c,t)+": "+e(t[c],t)):r.push(c+": "+e(t[c],t))));if("function"==typeof b)for(var l=0;l<a.length;l++)x.call(t,a[l])&&r.push("["+e(a[l])+"]: "+e(t[a[l]],t));return r}},8987:function(t,e,n){"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=n(1414),s=Object.prototype.propertyIsEnumerable,c=!s.call({toString:null},"toString"),l=s.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(t){var e=t.constructor;return e&&e.prototype===t},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!f["$"+t]&&o.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{p(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();r=function(t){var e=null!==t&&"object"==typeof t,n="[object Function]"===i.call(t),r=a(t),s=e&&"[object String]"===i.call(t),f=[];if(!e&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var d=l&&n;if(s&&t.length>0&&!o.call(t,0))for(var v=0;v<t.length;++v)f.push(String(v));if(r&&t.length>0)for(var y=0;y<t.length;++y)f.push(String(y));else for(var m in t)d&&"prototype"===m||!o.call(t,m)||f.push(String(m));if(c)for(var g=function(t){if("undefined"==typeof window||!h)return p(t);try{return p(t)}catch(t){return!1}}(t),b=0;b<u.length;++b)g&&"constructor"===u[b]||!o.call(t,u[b])||f.push(u[b]);return f}}t.exports=r},2215:function(t,e,n){"use strict";var r=Array.prototype.slice,o=n(1414),i=Object.keys,a=i?function(t){return i(t)}:n(8987),s=Object.keys;a.shim=function(){return Object.keys?function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2)||(Object.keys=function(t){return o(t)?s(r.call(t)):s(t)}):Object.keys=a,Object.keys||a},t.exports=a},1414:function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){var n=e.call(t),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),r}},7478:function(t,e,n){"use strict";var r=n(210),o=n(1924),i=n(631),a=r("%TypeError%"),s=r("%WeakMap%",!0),c=r("%Map%",!0),l=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),p=o("WeakMap.prototype.has",!0),f=o("Map.prototype.get",!0),h=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),v=function(t,e){for(var n,r=t;null!==(n=r.next);r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n};t.exports=function(){var t,e,n,r={assert:function(t){if(!r.has(t))throw new a("Side channel does not contain "+i(t))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(t)return l(t,r)}else if(c){if(e)return f(e,r)}else if(n)return function(t,e){var n=v(t,e);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(t)return p(t,r)}else if(c){if(e)return d(e,r)}else if(n)return function(t,e){return!!v(t,e)}(n,r);return!1},set:function(r,o){s&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new s),u(t,r,o)):c?(e||(e=new c),h(e,r,o)):(n||(n={key:{},next:null}),function(t,e,n){var r=v(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}}(n,r,o))}};return r}},1839:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e,n=t.Symbol;if("function"==typeof n)if(n.observable)e=n.observable;else{e=n.for("https://github.com/benlesh/symbol-observable");try{n.observable=e}catch(t){}}else e="@@observable";return e}},868:function(t,e,n){t.exports=n(1839)},3813:function(t,e,n){"use strict";var r,o=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.NO_IL=e.NO=e.MemoryStream=e.Stream=void 0;var i=n(868),a=n(2503),s=i.default(a.getPolyfill()),c={};function l(){}function u(t){for(var e=t.length,n=Array(e),r=0;r<e;++r)n[r]=t[r];return n}function p(t,e,n){try{return t.f(e)}catch(t){return n._e(t),c}}e.NO=c;var f={_n:l,_e:l,_c:l};function h(t){t._start=function(t){t.next=t._n,t.error=t._e,t.complete=t._c,this.start(t)},t._stop=t.stop}e.NO_IL=f;var d=function(){function t(t,e){this._stream=t,this._listener=e}return t.prototype.unsubscribe=function(){this._stream._remove(this._listener)},t}(),v=function(){function t(t){this._listener=t}return t.prototype.next=function(t){this._listener._n(t)},t.prototype.error=function(t){this._listener._e(t)},t.prototype.complete=function(){this._listener._c()},t}(),y=function(){function t(t){this.type="fromObservable",this.ins=t,this.active=!1}return t.prototype._start=function(t){this.out=t,this.active=!0,this._sub=this.ins.subscribe(new v(t)),this.active||this._sub.unsubscribe()},t.prototype._stop=function(){this._sub&&this._sub.unsubscribe(),this.active=!1},t}(),m=function(){function t(t){this.type="merge",this.insArr=t,this.out=c,this.ac=0}return t.prototype._start=function(t){this.out=t;var e=this.insArr,n=e.length;this.ac=n;for(var r=0;r<n;r++)e[r]._add(this)},t.prototype._stop=function(){for(var t=this.insArr,e=t.length,n=0;n<e;n++)t[n]._remove(this);this.out=c},t.prototype._n=function(t){var e=this.out;e!==c&&e._n(t)},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){if(--this.ac<=0){var t=this.out;if(t===c)return;t._c()}},t}(),g=function(){function t(t,e,n){this.i=t,this.out=e,this.p=n,n.ils.push(this)}return t.prototype._n=function(t){var e=this.p,n=this.out;if(n!==c&&e.up(t,this.i)){var r=u(e.vals);n._n(r)}},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.p;t.out!==c&&0==--t.Nc&&t.out._c()},t}(),b=function(){function t(t){this.type="combine",this.insArr=t,this.out=c,this.ils=[],this.Nc=this.Nn=0,this.vals=[]}return t.prototype.up=function(t,e){var n=this.vals[e],r=this.Nn?n===c?--this.Nn:this.Nn:0;return this.vals[e]=t,0===r},t.prototype._start=function(t){this.out=t;var e=this.insArr,n=this.Nc=this.Nn=e.length,r=this.vals=new Array(n);if(0===n)t._n([]),t._c();else for(var o=0;o<n;o++)r[o]=c,e[o]._add(new g(o,t,this))},t.prototype._stop=function(){for(var t=this.insArr,e=t.length,n=this.ils,r=0;r<e;r++)t[r]._remove(n[r]);this.out=c,this.ils=[],this.vals=[]},t}(),_=function(){function t(t){this.type="fromArray",this.a=t}return t.prototype._start=function(t){for(var e=this.a,n=0,r=e.length;n<r;n++)t._n(e[n]);t._c()},t.prototype._stop=function(){},t}(),w=function(){function t(t){this.type="fromPromise",this.on=!1,this.p=t}return t.prototype._start=function(t){var e=this;this.on=!0,this.p.then((function(n){e.on&&(t._n(n),t._c())}),(function(e){t._e(e)})).then(l,(function(t){setTimeout((function(){throw t}))}))},t.prototype._stop=function(){this.on=!1},t}(),x=function(){function t(t){this.type="periodic",this.period=t,this.intervalID=-1,this.i=0}return t.prototype._start=function(t){var e=this;this.intervalID=setInterval((function(){t._n(e.i++)}),this.period)},t.prototype._stop=function(){-1!==this.intervalID&&clearInterval(this.intervalID),this.intervalID=-1,this.i=0},t}(),T=function(){function t(t,e){this.type="debug",this.ins=t,this.out=c,this.s=l,this.l="","string"==typeof e?this.l=e:"function"==typeof e&&(this.s=e)}return t.prototype._start=function(t){this.out=t,this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c},t.prototype._n=function(t){var e=this.out;if(e!==c){var n=this.s,r=this.l;if(n!==l)try{n(t)}catch(t){e._e(t)}else r?console.log(r+":",t):console.log(t);e._n(t)}},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.out;t!==c&&t._c()},t}(),E=function(){function t(t,e){this.type="drop",this.ins=e,this.out=c,this.max=t,this.dropped=0}return t.prototype._start=function(t){this.out=t,this.dropped=0,this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c},t.prototype._n=function(t){var e=this.out;e!==c&&this.dropped++>=this.max&&e._n(t)},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.out;t!==c&&t._c()},t}(),S=function(){function t(t,e){this.out=t,this.op=e}return t.prototype._n=function(){this.op.end()},t.prototype._e=function(t){this.out._e(t)},t.prototype._c=function(){this.op.end()},t}(),k=function(){function t(t,e){this.type="endWhen",this.ins=e,this.out=c,this.o=t,this.oil=f}return t.prototype._start=function(t){this.out=t,this.o._add(this.oil=new S(t,this)),this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.o._remove(this.oil),this.out=c,this.oil=f},t.prototype.end=function(){var t=this.out;t!==c&&t._c()},t.prototype._n=function(t){var e=this.out;e!==c&&e._n(t)},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){this.end()},t}(),A=function(){function t(t,e){this.type="filter",this.ins=e,this.out=c,this.f=t}return t.prototype._start=function(t){this.out=t,this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c},t.prototype._n=function(t){var e=this.out;if(e!==c){var n=p(this,t,e);n!==c&&n&&e._n(t)}},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.out;t!==c&&t._c()},t}(),O=function(){function t(t,e){this.out=t,this.op=e}return t.prototype._n=function(t){this.out._n(t)},t.prototype._e=function(t){this.out._e(t)},t.prototype._c=function(){this.op.inner=c,this.op.less()},t}(),C=function(){function t(t){this.type="flatten",this.ins=t,this.out=c,this.open=!0,this.inner=c,this.il=f}return t.prototype._start=function(t){this.out=t,this.open=!0,this.inner=c,this.il=f,this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.inner!==c&&this.inner._remove(this.il),this.out=c,this.open=!0,this.inner=c,this.il=f},t.prototype.less=function(){var t=this.out;t!==c&&(this.open||this.inner!==c||t._c())},t.prototype._n=function(t){var e=this.out;if(e!==c){var n=this.inner,r=this.il;n!==c&&r!==f&&n._remove(r),(this.inner=t)._add(this.il=new O(e,this))}},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){this.open=!1,this.less()},t}(),I=function(){function t(t,e,n){var r=this;this.type="fold",this.ins=n,this.out=c,this.f=function(e){return t(r.acc,e)},this.acc=this.seed=e}return t.prototype._start=function(t){this.out=t,this.acc=this.seed,t._n(this.acc),this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c,this.acc=this.seed},t.prototype._n=function(t){var e=this.out;if(e!==c){var n=p(this,t,e);n!==c&&e._n(this.acc=n)}},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.out;t!==c&&t._c()},t}(),N=function(){function t(t){this.type="last",this.ins=t,this.out=c,this.has=!1,this.val=c}return t.prototype._start=function(t){this.out=t,this.has=!1,this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c,this.val=c},t.prototype._n=function(t){this.has=!0,this.val=t},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.out;t!==c&&(this.has?(t._n(this.val),t._c()):t._e(new Error("last() failed because input stream completed")))},t}(),j=function(){function t(t,e){this.type="map",this.ins=e,this.out=c,this.f=t}return t.prototype._start=function(t){this.out=t,this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c},t.prototype._n=function(t){var e=this.out;if(e!==c){var n=p(this,t,e);n!==c&&e._n(n)}},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.out;t!==c&&t._c()},t}(),R=function(){function t(t){this.type="remember",this.ins=t,this.out=c}return t.prototype._start=function(t){this.out=t,this.ins._add(t)},t.prototype._stop=function(){this.ins._remove(this.out),this.out=c},t}(),P=function(){function t(t,e){this.type="replaceError",this.ins=e,this.out=c,this.f=t}return t.prototype._start=function(t){this.out=t,this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c},t.prototype._n=function(t){var e=this.out;e!==c&&e._n(t)},t.prototype._e=function(t){var e=this.out;if(e!==c)try{this.ins._remove(this),(this.ins=this.f(t))._add(this)}catch(t){e._e(t)}},t.prototype._c=function(){var t=this.out;t!==c&&t._c()},t}(),L=function(){function t(t,e){this.type="startWith",this.ins=t,this.out=c,this.val=e}return t.prototype._start=function(t){this.out=t,this.out._n(this.val),this.ins._add(t)},t.prototype._stop=function(){this.ins._remove(this.out),this.out=c},t}(),D=function(){function t(t,e){this.type="take",this.ins=e,this.out=c,this.max=t,this.taken=0}return t.prototype._start=function(t){this.out=t,this.taken=0,this.max<=0?t._c():this.ins._add(this)},t.prototype._stop=function(){this.ins._remove(this),this.out=c},t.prototype._n=function(t){var e=this.out;if(e!==c){var n=++this.taken;n<this.max?e._n(t):n===this.max&&(e._n(t),e._c())}},t.prototype._e=function(t){var e=this.out;e!==c&&e._e(t)},t.prototype._c=function(){var t=this.out;t!==c&&t._c()},t}(),U=function(){function t(t){this._prod=t||c,this._ils=[],this._stopID=c,this._dl=c,this._d=!1,this._target=null,this._err=c}return t.prototype._n=function(t){var e=this._ils,n=e.length;if(this._d&&this._dl._n(t),1==n)e[0]._n(t);else{if(0==n)return;for(var r=u(e),o=0;o<n;o++)r[o]._n(t)}},t.prototype._e=function(t){if(this._err===c){this._err=t;var e=this._ils,n=e.length;if(this._x(),this._d&&this._dl._e(t),1==n)e[0]._e(t);else{if(0==n)return;for(var r=u(e),o=0;o<n;o++)r[o]._e(t)}if(!this._d&&0==n)throw this._err}},t.prototype._c=function(){var t=this._ils,e=t.length;if(this._x(),this._d&&this._dl._c(),1==e)t[0]._c();else{if(0==e)return;for(var n=u(t),r=0;r<e;r++)n[r]._c()}},t.prototype._x=function(){0!==this._ils.length&&(this._prod!==c&&this._prod._stop(),this._err=c,this._ils=[])},t.prototype._stopNow=function(){this._prod._stop(),this._err=c,this._stopID=c},t.prototype._add=function(t){var e=this._target;if(e)return e._add(t);var n=this._ils;if(n.push(t),!(n.length>1))if(this._stopID!==c)clearTimeout(this._stopID),this._stopID=c;else{var r=this._prod;r!==c&&r._start(this)}},t.prototype._remove=function(t){var e=this,n=this._target;if(n)return n._remove(t);var r=this._ils,o=r.indexOf(t);o>-1&&(r.splice(o,1),this._prod!==c&&r.length<=0?(this._err=c,this._stopID=setTimeout((function(){return e._stopNow()}))):1===r.length&&this._pruneCycles())},t.prototype._pruneCycles=function(){this._hasNoSinks(this,[])&&this._remove(this._ils[0])},t.prototype._hasNoSinks=function(t,e){if(-1!==e.indexOf(t))return!0;if(t.out===this)return!0;if(t.out&&t.out!==c)return this._hasNoSinks(t.out,e.concat(t));if(t._ils){for(var n=0,r=t._ils.length;n<r;n++)if(!this._hasNoSinks(t._ils[n],e.concat(t)))return!1;return!0}return!1},t.prototype.ctor=function(){return this instanceof M?M:t},t.prototype.addListener=function(t){t._n=t.next||l,t._e=t.error||l,t._c=t.complete||l,this._add(t)},t.prototype.removeListener=function(t){this._remove(t)},t.prototype.subscribe=function(t){return this.addListener(t),new d(this,t)},t.prototype[s]=function(){return this},t.create=function(e){if(e){if("function"!=typeof e.start||"function"!=typeof e.stop)throw new Error("producer requires both start and stop functions");h(e)}return new t(e)},t.createWithMemory=function(t){return t&&h(t),new M(t)},t.never=function(){return new t({_start:l,_stop:l})},t.empty=function(){return new t({_start:function(t){t._c()},_stop:l})},t.throw=function(e){return new t({_start:function(t){t._e(e)},_stop:l})},t.from=function(e){if("function"==typeof e[s])return t.fromObservable(e);if("function"==typeof e.then)return t.fromPromise(e);if(Array.isArray(e))return t.fromArray(e);throw new TypeError("Type of input to from() must be an Array, Promise, or Observable")},t.of=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.fromArray(e)},t.fromArray=function(e){return new t(new _(e))},t.fromPromise=function(e){return new t(new w(e))},t.fromObservable=function(e){if(void 0!==e.endWhen)return e;var n="function"==typeof e[s]?e[s]():e;return new t(new y(n))},t.periodic=function(e){return new t(new x(e))},t.prototype._map=function(t){return new(this.ctor())(new j(t,this))},t.prototype.map=function(t){return this._map(t)},t.prototype.mapTo=function(t){var e=this.map((function(){return t}));return e._prod.type="mapTo",e},t.prototype.filter=function(e){var n,r,o=this._prod;return new t(o instanceof A?new A((n=o.f,r=e,function(t){return n(t)&&r(t)}),o.ins):new A(e,this))},t.prototype.take=function(t){return new(this.ctor())(new D(t,this))},t.prototype.drop=function(e){return new t(new E(e,this))},t.prototype.last=function(){return new t(new N(this))},t.prototype.startWith=function(t){return new M(new L(this,t))},t.prototype.endWhen=function(t){return new(this.ctor())(new k(t,this))},t.prototype.fold=function(t,e){return new M(new I(t,e,this))},t.prototype.replaceError=function(t){return new(this.ctor())(new P(t,this))},t.prototype.flatten=function(){return new t(new C(this))},t.prototype.compose=function(t){return t(this)},t.prototype.remember=function(){return new M(new R(this))},t.prototype.debug=function(t){return new(this.ctor())(new T(this,t))},t.prototype.imitate=function(t){if(t instanceof M)throw new Error("A MemoryStream was given to imitate(), but it only supports a Stream. Read more about this restriction here: https://github.com/staltz/xstream#faq");this._target=t;for(var e=this._ils,n=e.length,r=0;r<n;r++)t._add(e[r]);this._ils=[]},t.prototype.shamefullySendNext=function(t){this._n(t)},t.prototype.shamefullySendError=function(t){this._e(t)},t.prototype.shamefullySendComplete=function(){this._c()},t.prototype.setDebugListener=function(t){t?(this._d=!0,t._n=t.next||l,t._e=t.error||l,t._c=t.complete||l,this._dl=t):(this._d=!1,this._dl=c)},t.merge=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new t(new m(e))},t.combine=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return new t(new b(e))},t}();e.Stream=U;var M=function(t){function e(e){var n=t.call(this,e)||this;return n._has=!1,n}return o(e,t),e.prototype._n=function(e){this._v=e,this._has=!0,t.prototype._n.call(this,e)},e.prototype._add=function(t){var e=this._target;if(e)return e._add(t);var n=this._ils;if(n.push(t),n.length>1)this._has&&t._n(this._v);else if(this._stopID!==c)this._has&&t._n(this._v),clearTimeout(this._stopID),this._stopID=c;else if(this._has)t._n(this._v);else{var r=this._prod;r!==c&&r._start(this)}},e.prototype._stopNow=function(){this._has=!1,t.prototype._stopNow.call(this)},e.prototype._x=function(){this._has=!1,t.prototype._x.call(this)},e.prototype.map=function(t){return this._map(t)},e.prototype.mapTo=function(e){return t.prototype.mapTo.call(this,e)},e.prototype.take=function(e){return t.prototype.take.call(this,e)},e.prototype.endWhen=function(e){return t.prototype.endWhen.call(this,e)},e.prototype.replaceError=function(e){return t.prototype.replaceError.call(this,e)},e.prototype.remember=function(){return this},e.prototype.debug=function(e){return t.prototype.debug.call(this,e)},e}(U);e.MemoryStream=M;var z=U;e.default=z},4654:function(){},3695:function(){}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r].call(i.exports,i,i.exports,n),i.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return function(){"use strict";n.r(r),n.d(r,{API:function(){return Fh},AgentInfo:function(){return id},Chat:function(){return Dc},ChatFrame:function(){return pf},ComponentFilter:function(){return kp},Conversation:function(){return Op},DeprecatedToggleButton:function(){return sd},DeprecatedView:function(){return hd},Engine:function(){return Xh},EntryContainer:function(){return Zp},EventParticipant:function(){return Gc},ExternalApi:function(){return od},Header:function(){return ad},Icon:function(){return ds},Interrupt:function(){return Uc},MessageContainer:function(){return Zc},SeamlyApiContext:function(){return ti},SeamlyEventBusContext:function(){return ei},SeamlyGeneralError:function(){return ca},SeamlyLiveRegionContext:function(){return Ia},SeamlyOfflineError:function(){return ua},StoreProvider:function(){return ke},Text:function(){return pu},View:function(){return bf},calculateVisibility:function(){return co},className:function(){return Xo},createReduxStore:function(){return Me},default:function(){return dd},eventTypes:function(){return kn},getUrlParams:function(){return pn},getUrlSearchString:function(){return fn},randomId:function(){return Jt},seamlyActions:function(){return Bn},useChoicePrompt:function(){return nl},useDispatch:function(){return ai},useEvents:function(){return mo},useGeneratedId:function(){return na},useI18n:function(){return Oi},useSeamlyChat:function(){return Ba},useSeamlyCommands:function(){return Ca},useSeamlyConfig:function(){return He},useSeamlyEventStream:function(){return Za},useSeamlyIdleDetachCountdown:function(){return Ya},useSeamlyMessageContainerClassNames:function(){return ci},useSeamlyOptions:function(){return Vi},useSeamlyVisibility:function(){return _a},useTranslatedEventData:function(){return ss},useTranslations:function(){return as},useTranslationsContainer:function(){return cs},visibilityStates:function(){return ye}}),n(2698);var t=n(1511),e=n.n(t),o=n(4103),i=n.n(o),a=n(4310),s=n.n(a),c=n(4074),l=n.n(c),u=n(9649),p=n.n(u),f=n(368),h=n.n(f),d=n(3978),v=n.n(d),y=n(4341);function m(t,e,n){return e in t?y(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var g=n(2991),b=n.n(g),_=n(116),w=n.n(_),x=n(8914),T=n.n(x),E=n(455),S=n.n(E),k=n(7149),A=n.n(k),O=n(6295),C=n.n(O),I=n(6902),N=n.n(I),j=n(3263),R=n(5683),P=n(9356);function L(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=P(t);for(r=0;r<i.length;r++)n=i[r],R(e).call(e,n)>=0||(o[n]=t[n]);return o}(t,e);if(j){var i=j(t);for(r=0;r<i.length;r++)n=i[r],R(e).call(e,n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}var D,U,M,z,F,$,B,H={},V=[],q=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function W(t,e){for(var n in e)t[n]=e[n];return t}function G(t){var e=t.parentNode;e&&e.removeChild(t)}function K(t,e,n,r,o){var i={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++M:o};return null==o&&null!=U.vnode&&U.vnode(i),i}function Y(t){return t.children}function J(t,e){this.props=t,this.context=e}function Q(t,e){if(null==e)return t.__?Q(t.__,t.__.__k.indexOf(t)+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?Q(t):null}function Z(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return Z(t)}}function X(t){(!t.__d&&(t.__d=!0)&&z.push(t)&&!tt.__r++||$!==U.debounceRendering)&&(($=U.debounceRendering)||F)(tt)}function tt(){for(var t;tt.__r=z.length;)t=z.sort((function(t,e){return t.__v.__b-e.__v.__b})),z=[],t.some((function(t){var e,n,r,o,i,a;t.__d&&(i=(o=(e=t).__v).__e,(a=e.__P)&&(n=[],(r=W({},o)).__v=o.__v+1,lt(a,o,r,e.__n,void 0!==a.ownerSVGElement,null!=o.__h?[i]:null,n,null==i?Q(o):i,o.__h),ut(n,o),o.__e!=i&&Z(o)))}))}function et(t,e,n,r,o,i,a,s,c,l){var u,p,f,h,d,v,y,m=r&&r.__k||V,g=m.length;for(n.__k=[],u=0;u<e.length;u++)if(null!=(h=n.__k[u]=null==(h=e[u])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?K(null,h,null,null,h):Array.isArray(h)?K(Y,{children:h},null,null,null):h.__b>0?K(h.type,h.props,h.key,null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(f=m[u])||f&&h.key==f.key&&h.type===f.type)m[u]=void 0;else for(p=0;p<g;p++){if((f=m[p])&&h.key==f.key&&h.type===f.type){m[p]=void 0;break}f=null}lt(t,h,f=f||H,o,i,a,s,c,l),d=h.__e,(p=h.ref)&&f.ref!=p&&(y||(y=[]),f.ref&&y.push(f.ref,null,h),y.push(p,h.__c||d,h)),null!=d?(null==v&&(v=d),"function"==typeof h.type&&h.__k===f.__k?h.__d=c=nt(h,c,t):c=ot(t,h,f,m,d,c),"function"==typeof n.type&&(n.__d=c)):c&&f.__e==c&&c.parentNode!=t&&(c=Q(f))}for(n.__e=v,u=g;u--;)null!=m[u]&&("function"==typeof n.type&&null!=m[u].__e&&m[u].__e==n.__d&&(n.__d=Q(r,u+1)),ht(m[u],m[u]));if(y)for(u=0;u<y.length;u++)ft(y[u],y[++u],y[++u])}function nt(t,e,n){for(var r,o=t.__k,i=0;o&&i<o.length;i++)(r=o[i])&&(r.__=t,e="function"==typeof r.type?nt(r,e,n):ot(n,r,r,o,r.__e,e));return e}function rt(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){rt(t,e)})):e.push(t)),e}function ot(t,e,n,r,o,i){var a,s,c;if(void 0!==e.__d)a=e.__d,e.__d=void 0;else if(null==n||o!=i||null==o.parentNode)t:if(null==i||i.parentNode!==t)t.appendChild(o),a=null;else{for(s=i,c=0;(s=s.nextSibling)&&c<r.length;c+=2)if(s==o)break t;t.insertBefore(o,i),a=i}return void 0!==a?a:o.nextSibling}function it(t,e,n){"-"===e[0]?t.setProperty(e,n):t[e]=null==n?"":"number"!=typeof n||q.test(e)?n:n+"px"}function at(t,e,n,r,o){var i;t:if("style"===e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof r&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||it(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||it(t.style,e,n[e])}else if("o"===e[0]&&"n"===e[1])i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=n,n?r||t.addEventListener(e,i?ct:st,i):t.removeEventListener(e,i?ct:st,i);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==n?"":n;break t}catch(t){}"function"==typeof n||(null!=n&&(!1!==n||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,n):t.removeAttribute(e))}}function st(t){this.l[t.type+!1](U.event?U.event(t):t)}function ct(t){this.l[t.type+!0](U.event?U.event(t):t)}function lt(t,e,n,r,o,i,a,s,c){var l,u,p,f,h,d,v,y,m,g,b,_=e.type;if(void 0!==e.constructor)return null;null!=n.__h&&(c=n.__h,s=e.__e=n.__e,e.__h=null,i=[s]),(l=U.__b)&&l(e);try{t:if("function"==typeof _){if(y=e.props,m=(l=_.contextType)&&r[l.__c],g=l?m?m.props.value:l.__:r,n.__c?v=(u=e.__c=n.__c).__=u.__E:("prototype"in _&&_.prototype.render?e.__c=u=new _(y,g):(e.__c=u=new J(y,g),u.constructor=_,u.render=dt),m&&m.sub(u),u.props=y,u.state||(u.state={}),u.context=g,u.__n=r,p=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=_.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=W({},u.__s)),W(u.__s,_.getDerivedStateFromProps(y,u.__s))),f=u.props,h=u.state,p)null==_.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==_.getDerivedStateFromProps&&y!==f&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(y,g),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(y,u.__s,g)||e.__v===n.__v){u.props=y,u.state=u.__s,e.__v!==n.__v&&(u.__d=!1),u.__v=e,e.__e=n.__e,e.__k=n.__k,e.__k.forEach((function(t){t&&(t.__=e)})),u.__h.length&&a.push(u);break t}null!=u.componentWillUpdate&&u.componentWillUpdate(y,u.__s,g),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(f,h,d)}))}u.context=g,u.props=y,u.state=u.__s,(l=U.__r)&&l(e),u.__d=!1,u.__v=e,u.__P=t,l=u.render(u.props,u.state,u.context),u.state=u.__s,null!=u.getChildContext&&(r=W(W({},r),u.getChildContext())),p||null==u.getSnapshotBeforeUpdate||(d=u.getSnapshotBeforeUpdate(f,h)),b=null!=l&&l.type===Y&&null==l.key?l.props.children:l,et(t,Array.isArray(b)?b:[b],e,n,r,o,i,a,s,c),u.base=e.__e,e.__h=null,u.__h.length&&a.push(u),v&&(u.__E=u.__=null),u.__e=!1}else null==i&&e.__v===n.__v?(e.__k=n.__k,e.__e=n.__e):e.__e=pt(n.__e,e,n,r,o,i,a,c);(l=U.diffed)&&l(e)}catch(t){e.__v=null,(c||null!=i)&&(e.__e=s,e.__h=!!c,i[i.indexOf(s)]=null),U.__e(t,e,n)}}function ut(t,e){U.__c&&U.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){U.__e(t,e.__v)}}))}function pt(t,e,n,r,o,i,a,s){var c,l,u,p=n.props,f=e.props,h=e.type,d=0;if("svg"===h&&(o=!0),null!=i)for(;d<i.length;d++)if((c=i[d])&&"setAttribute"in c==!!h&&(h?c.localName===h:3===c.nodeType)){t=c,i[d]=null;break}if(null==t){if(null===h)return document.createTextNode(f);t=o?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,f.is&&f),i=null,s=!1}if(null===h)p===f||s&&t.data===f||(t.data=f);else{if(i=i&&D.call(t.childNodes),l=(p=n.props||H).dangerouslySetInnerHTML,u=f.dangerouslySetInnerHTML,!s){if(null!=i)for(p={},d=0;d<t.attributes.length;d++)p[t.attributes[d].name]=t.attributes[d].value;(u||l)&&(u&&(l&&u.__html==l.__html||u.__html===t.innerHTML)||(t.innerHTML=u&&u.__html||""))}if(function(t,e,n,r,o){var i;for(i in n)"children"===i||"key"===i||i in e||at(t,i,null,n[i],r);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===e[i]||at(t,i,e[i],n[i],r)}(t,f,p,o,s),u)e.__k=[];else if(d=e.props.children,et(t,Array.isArray(d)?d:[d],e,n,r,o&&"foreignObject"!==h,i,a,i?i[0]:n.__k&&Q(n,0),s),null!=i)for(d=i.length;d--;)null!=i[d]&&G(i[d]);s||("value"in f&&void 0!==(d=f.value)&&(d!==t.value||"progress"===h&&!d||"option"===h&&d!==p.value)&&at(t,"value",d,p.value,!1),"checked"in f&&void 0!==(d=f.checked)&&d!==t.checked&&at(t,"checked",d,p.checked,!1))}return t}function ft(t,e,n){try{"function"==typeof t?t(e):t.current=e}catch(t){U.__e(t,n)}}function ht(t,e,n){var r,o;if(U.unmount&&U.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||ft(r,null,e)),null!=(r=t.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(t){U.__e(t,e)}r.base=r.__P=null}if(r=t.__k)for(o=0;o<r.length;o++)r[o]&&ht(r[o],e,"function"!=typeof t.type);n||null==t.__e||G(t.__e),t.__e=t.__d=void 0}function dt(t,e,n){return this.constructor(t,n)}function vt(t,e,n){var r,o,i;U.__&&U.__(t,e),o=(r="function"==typeof n)?null:n&&n.__k||e.__k,i=[],lt(e,t=(!r&&n||e).__k=function(t,e,n){var r,o,i,a={};for(i in e)"key"==i?r=e[i]:"ref"==i?o=e[i]:a[i]=e[i];if(arguments.length>2&&(a.children=arguments.length>3?D.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(i in t.defaultProps)void 0===a[i]&&(a[i]=t.defaultProps[i]);return K(t,a,r,o,null)}(Y,null,[t]),o||H,H,void 0!==e.ownerSVGElement,!r&&n?[n]:o?null:e.firstChild?D.call(e.childNodes):null,i,!r&&n?n:o?o.__e:e.firstChild,r),ut(i,t)}function yt(t,e){var n={__c:e="__cC"+B++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var n,r;return this.getChildContext||(n=[],(r={})[e]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&n.some(X)},this.sub=function(t){n.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){n.splice(n.indexOf(t),1),e&&e.call(t)}}),t.children}};return n.Provider.__=n.Consumer.contextType=n}D=V.slice,U={__e:function(t,e){for(var n,r,o;e=e.__;)if((n=e.__c)&&!n.__)try{if((r=n.constructor)&&null!=r.getDerivedStateFromError&&(n.setState(r.getDerivedStateFromError(t)),o=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(t),o=n.__d),o)return n.__E=n}catch(e){t=e}throw t}},M=0,J.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=W({},this.state),"function"==typeof t&&(t=t(W({},n),this.props)),t&&W(n,t),null!=t&&this.__v&&(e&&this.__h.push(e),X(this))},J.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),X(this))},J.prototype.render=Y,z=[],F="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,tt.__r=0,B=0;var mt,gt,bt,_t=n(679),wt=n.n(_t),xt=0,Tt=[],Et=U.__b,St=U.__r,kt=U.diffed,At=U.__c,Ot=U.unmount;function Ct(t,e){U.__h&&U.__h(gt,t,xt||e),xt=0;var n=gt.__H||(gt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function It(t){return xt=1,Nt(Ht,t)}function Nt(t,e,n){var r=Ct(mt++,2);return r.t=t,r.__c||(r.__=[n?n(e):Ht(void 0,e),function(t){var e=r.t(r.__[0],t);r.__[0]!==e&&(r.__=[e,r.__[1]],r.__c.setState({}))}],r.__c=gt),r.__}function jt(t,e){var n=Ct(mt++,3);!U.__s&&Bt(n.__H,e)&&(n.__=t,n.__H=e,gt.__H.__h.push(n))}function Rt(t,e){var n=Ct(mt++,4);!U.__s&&Bt(n.__H,e)&&(n.__=t,n.__H=e,gt.__h.push(n))}function Pt(t){return xt=5,Lt((function(){return{current:t}}),[])}function Lt(t,e){var n=Ct(mt++,7);return Bt(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Dt(t,e){return xt=8,Lt((function(){return t}),e)}function Ut(t){var e=gt.context[t.__c],n=Ct(mt++,9);return n.c=t,e?(null==n.__&&(n.__=!0,e.sub(gt)),e.props.value):t.__}function Mt(){for(var t;t=Tt.shift();)if(t.__P)try{t.__H.__h.forEach(Ft),t.__H.__h.forEach($t),t.__H.__h=[]}catch(e){t.__H.__h=[],U.__e(e,t.__v)}}U.__b=function(t){gt=null,Et&&Et(t)},U.__r=function(t){St&&St(t),mt=0;var e=(gt=t.__c).__H;e&&(e.__h.forEach(Ft),e.__h.forEach($t),e.__h=[])},U.diffed=function(t){kt&&kt(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==Tt.push(e)&&bt===U.requestAnimationFrame||((bt=U.requestAnimationFrame)||function(t){var e,n=function(){clearTimeout(r),zt&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);zt&&(e=requestAnimationFrame(n))})(Mt)),gt=null},U.__c=function(t,e){e.some((function(t){try{t.__h.forEach(Ft),t.__h=t.__h.filter((function(t){return!t.__||$t(t)}))}catch(n){e.some((function(t){t.__h&&(t.__h=[])})),e=[],U.__e(n,t.__v)}})),At&&At(t,e)},U.unmount=function(t){Ot&&Ot(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach((function(t){try{Ft(t)}catch(t){e=t}})),e&&U.__e(e,n.__v))};var zt="function"==typeof requestAnimationFrame;function Ft(t){var e=gt,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),gt=e}function $t(t){var e=gt;t.__c=t.__(),gt=e}function Bt(t,e){return!t||t.length!==e.length||e.some((function(e,n){return e!==t[n]}))}function Ht(t,e){return"function"==typeof e?e(t):e}var Vt=n(1942),qt=n.n(Vt),Wt=n(3649),Gt=n.n(Wt),Kt=n(1128),Yt=n.n(Kt);function Jt(){var t;return"_"+(Number(Gt()(t=String(Math.random())).call(t,2))+Yt()()+Math.round(performance.now())).toString(36)}function Qt(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}const Zt="//";function Xt(t,e,n="/"){return(r,...o)=>e(t+n+r,...o)}function te(t,e=(t=>({payload:t}))){const n=(...n)=>function(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Qt(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Qt(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}({type:t},e(...n));return n.toString=()=>String(t),n.match=e=>(null==e?void 0:e.type)===String(t),n}function ee(t,...e){const n=[];T()(e).call(e,(t=>{var e;const r=typeof t;if("string"===r)return n.push([t]);"object"!==r||t instanceof Array||T()(e=N()(t)).call(e,(e=>n.push([e,t[e]])))}));const r=Xt(t,te,"/");return b()(n).call(n,(t=>r(...t)))}function ne(t,e){const[n,r,o]=ee(t,{pending:(t,e)=>({meta:{arg:t,requestId:e,status:"pending"}}),fulfilled:(t,e,n)=>({payload:e,meta:{arg:t,requestId:n,status:"fulfilled"}}),rejected:(t,e,n)=>({error:e,meta:{arg:t,requestId:n,status:"rejected",error:String(e)}})});return qt()((i=>(a,s,c)=>{const l=Jt(),u=(async()=>{let t;try{a(n(i,l));const o=e(i,{dispatch:a,getState:s,extra:c}),u=await o;t=r(i,u,l)}catch(e){t=o(i,e,l)}return a(t),t})();return qt()(u,{type:t,arg:i,requestId:l})}),{type:t,pending:n,fulfilled:r,rejected:o})}function re(t){return{createAction:Xt(t,te,Zt),createActions:Xt(t,ee,Zt),createThunk:Xt(t,ne,Zt),createReducer:(e,n)=>function(t,e={},n){const r=(t=n,r)=>{const o=null==e?void 0:e[null==r?void 0:r.type];return o?o(t,r):t};return r.toString=()=>t,r}(t,e,n),selectState:e=>e[t]}}const{createAction:oe,createThunk:ie,createReducer:ae,selectState:se}=re("config"),ce=oe("initialize",(t=>({config:t}))),le=oe("update",(t=>({config:t}))),ue=oe("setPreChatEvents",(t=>({events:t})));function pe(t,e){return t===e}function fe(t,e,n){if(null===e||null===n||e.length!==n.length)return!1;for(var r=e.length,o=0;o<r;o++)if(!t(e[o],n[o]))return!1;return!0}function he(t){var e=Array.isArray(t[0])?t[0]:t;if(!e.every((function(t){return"function"==typeof t}))){var n=e.map((function(t){return typeof t})).join(", ");throw new Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+n+"]")}return e}var de=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return function(){for(var e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];var i=0,a=r.pop(),s=he(r),c=t.apply(void 0,[function(){return i++,a.apply(null,arguments)}].concat(n)),l=t((function(){for(var t=[],e=s.length,n=0;n<e;n++)t.push(s[n].apply(null,arguments));return c.apply(null,t)}));return l.resultFunc=a,l.dependencies=s,l.recomputations=function(){return i},l.resetRecomputations=function(){return i=0},l}}((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:pe,n=null,r=null;return function(){return fe(e,n,arguments)||(r=t.apply(null,arguments)),n=arguments,r}}));const ve="visibility",ye={hidden:"hidden",minimized:"minimized",open:"open",initialize:null};function me(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ge(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=me(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=me(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const be=de(se,(t=>{let e=ge({visible:"inline"===(null==t?void 0:t.layoutMode)?ye.open:ye.minimized,appContainerClassNames:t.appContainerClassNames||[]},t);return"function"==typeof e.appContainerClassNames&&(e=ge(ge({},e),{},{appContainerClassNames:e.appContainerClassNames(e)})),e})),_e=yt(void 0);var we=_e;const{Provider:xe,Consumer:Te}=_e;var Ee=0;function Se(t,e,n,r,o){var i,a,s={};for(a in e)"ref"==a?i=e[a]:s[a]=e[a];var c={type:t,props:s,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Ee,__source:r,__self:o};if("function"==typeof t&&(i=t.defaultProps))for(a in i)void 0===s[a]&&(s[a]=i[a]);return U.vnode&&U.vnode(c),c}function ke({store:t,children:e}){return Se(xe,{value:t,children:e})}function Ae(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Oe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ce(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Oe(Object(n),!0).forEach((function(e){Ae(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Oe(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ie(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var Ne="function"==typeof Symbol&&Symbol.observable||"@@observable",je=function(){return Math.random().toString(36).substring(7).split("").join(".")},Re={INIT:"@@redux/INIT"+je(),REPLACE:"@@redux/REPLACE"+je(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+je()}};function Pe(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Le(t,e,n){var r;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Ie(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Ie(1));return n(Le)(t,e)}if("function"!=typeof t)throw new Error(Ie(2));var o=t,i=e,a=[],s=a,c=!1;function l(){s===a&&(s=a.slice())}function u(){if(c)throw new Error(Ie(3));return i}function p(t){if("function"!=typeof t)throw new Error(Ie(4));if(c)throw new Error(Ie(5));var e=!0;return l(),s.push(t),function(){if(e){if(c)throw new Error(Ie(6));e=!1,l();var n=s.indexOf(t);s.splice(n,1),a=null}}}function f(t){if(!Pe(t))throw new Error(Ie(7));if(void 0===t.type)throw new Error(Ie(8));if(c)throw new Error(Ie(9));try{c=!0,i=o(i,t)}finally{c=!1}for(var e=a=s,n=0;n<e.length;n++)(0,e[n])();return t}function h(t){if("function"!=typeof t)throw new Error(Ie(10));o=t,f({type:Re.REPLACE})}function d(){var t,e=p;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Ie(11));function n(){t.next&&t.next(u())}return n(),{unsubscribe:e(n)}}})[Ne]=function(){return this},t}return f({type:Re.INIT}),(r={dispatch:f,subscribe:p,getState:u,replaceReducer:h})[Ne]=d,r}function De(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}let Ue=De;function Me({reducers:t={},initialState:e={},middlewares:n=[]}={}){return Le(function(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var o=e[r];"function"==typeof t[o]&&(n[o]=t[o])}var i,a=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:Re.INIT}))throw new Error(Ie(12));if(void 0===n(void 0,{type:Re.PROBE_UNKNOWN_ACTION()}))throw new Error(Ie(13))}))}(n)}catch(t){i=t}return function(t,e){if(void 0===t&&(t={}),i)throw i;for(var r=!1,o={},s=0;s<a.length;s++){var c=a[s],l=n[c],u=t[c],p=l(u,e);if(void 0===p)throw e&&e.type,new Error(Ie(14));o[c]=p,r=r||p!==u}return(r=r||a.length!==Object.keys(t).length)?o:t}}(t),e,Ue(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error(Ie(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=e.map((function(t){return t(o)}));return r=De.apply(void 0,i)(n.dispatch),Ce(Ce({},n),{},{dispatch:r})}}}(...n)))}function ze(){return Ut(we)}function Fe(){return ze().dispatch}function $e(t,e=[]){const n=ze(),[,r]=Nt((t=>t+1),0),o=Pt(),i=Dt(t,e),a=Pt(),s=Pt(),c=n.getState();return a.current===i&&s.current===c||(s.current=c,o.current=i(s.current),a.current=i),Rt((()=>n.subscribe((()=>{var t;if(n.getState()===s.current)return;const e=null===(t=a.current)||void 0===t?void 0:t.call(a,n.getState());e!==o.current&&(o.current=e,r())}))),[n]),o.current}const Be=function(t,e,n=[]){return $e(Dt((n=>t(n,e)),n),n)};function He(){return $e(be)}function Ve(){const{startChatIcon:t}=$e(be);return t}const qe="cvco",We="2",Ge="seamly-client-participant";var Ke=n(3032),Ye=n.n(Ke),Je=n(1238),Qe=n.n(Je),Ze=n(1643),Xe=n.n(Ze),tn=n(2366),en=n.n(tn),nn=n(8580),rn=n.n(nn);function on(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function an(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=on(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=on(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const sn=(t,e)=>{let n;return function(...r){const o=this;let i=!1;return clearTimeout(n),n=Ye()((()=>{n=null,i||t.apply(o,r),i=!1}),e),e=>{i=!0,e&&t.apply(o,r)}}},cn=t=>Math.ceil(t/1e3),ln=t=>{const e=Math.floor(t/60);return{minutes:e,seconds:t-60*e}},un=(t,e=2)=>{if(0===t)return"0 Bytes";const n=e<0?0:e,r=Math.floor(Math.log(t)/Math.log(1024));return Qe()((t/Math.pow(1024,r)).toFixed(n))+" "+["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]},pn=()=>{const{search:t}=window.location;if(!t)return{};const e=Gt()(t).call(t,Xe()(t).call(t,"?")+1).split("&");return en()(e).call(e,((t,e)=>{const[n,r]=e.split("=");return an(an({},t),{},{[n]:decodeURIComponent(r)})}),{})},fn=t=>{var e;return en()(e=N()(t)).call(e,((e,n)=>`${e}${e?"&":""}${n}=${encodeURIComponent(t[n])}`),"")},hn={27:"Escape",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown"},dn={Escape:"Escape",End:"End",Home:"Home",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown"},vn=t=>t.code?dn[t.code]:hn[t.keyCode],yn=t=>{t&&t.focus()},mn=(t,e)=>{t&&(t.contains(document.activeElement)||t===document.activeElement)&&e()};var gn=n(7302),bn=n.n(gn),_n=n(7093),wn=n.n(_n),xn=n(4473),Tn=n.n(xn);function En(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Sn(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=En(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=En(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const kn={info:"info",message:"message",participant:"participant",system:"system"},An="text",On="text",Cn="upload",In="received",Nn="read",jn="custom",Rn="typing",Pn="read",Ln="detach_service",Dn="set_translation",Un="click_cta",Mn="assertive",zn="polite",Fn={new_topic:"newTopic",new_translation:"newTranslation"},$n="uploads",Bn={ADD_EVENT:"ADD_EVENT",CLEAR_EVENTS:"CLEAR_EVENTS",SET_HISTORY:"SET_HISTORY",SET_EVENTS_READ:"SET_EVENTS_READ",ACK_EVENT:"ACK_EVENT",SET_IS_LOADING:"SET_IS_LOADING",CLEAR_PARTICIPANTS:"CLEAR_PARTICIPANTS",SET_PARTICIPANT:"SET_PARTICIPANT",SET_HEADER_TITLE:"SET_HEADER_TITLE",SET_HEADER_SUB_TITLE:"SET_HEADER_SUB_TITLE",RESET_HISTORY_LOADED_FLAG:"RESET_HISTORY_LOADED_FLAG",SET_ACTIVE_SERVICE:"SET_ACTIVE_SERVICE",INIT_IDLE_DETACH_COUNTDOWN:"INIT_IDLE_DETACH_COUNTDOWN",DECREMENT_IDLE_DETACH_COUNTDOWN_COUNTER:"DECREMENT_IDLE_DETACH_COUNTDOWN_COUNTER",STOP_IDLE_DETACH_COUNTDOWN_COUNTER:"STOP_IDLE_DETACH_COUNTDOWN_COUNTER",CLEAR_IDLE_DETACH_COUNTDOWN:"CLEAR_IDLE_DETACH_COUNTDOWN",INIT_RESUME_CONVERSATION_PROMPT:"INIT_RESUME_CONVERSATION_PROMPT",CLEAR_RESUME_CONVERSATION_PROMPT:"CLEAR_RESUME_CONVERSATION_PROMPT",SET_SERVICE_DATA_ITEM:"SET_SERVICE_DATA_ITEM",SET_FEATURES:"SET_FEATURES",SET_FEATURE_ENABLED_STATE:"SET_FEATURE_ENABLED_STATE",CLEAR_FEATURES:"CLEAR_FEATURES",SET_INITIAL_STATE:"SET_INITIAL_STATE",SET_USER_SELECTED_OPTIONS:"SET_USER_SELECTED_OPTIONS",SET_USER_SELECTED_OPTION:"SET_USER_SELECTED_OPTION",SHOW_OPTION:"SHOW_OPTION",HIDE_OPTION:"HIDE_OPTION",SET_SERVICE_ENTRY_METADATA:"SET_SERVICE_ENTRY_METADATA",SET_BLOCK_AUTO_ENTRY_SWITCH:"SET_BLOCK_AUTO_ENTRY_SWITCH",SET_ACTIVE_ENTRY_TYPE:"SET_ACTIVE_ENTRY_TYPE",SET_USER_ENTRY_TYPE:"SET_USER_ENTRY_TYPE",REGISTER_UPLOAD:"REGISTER_UPLOAD",SET_UPLOAD_PROGRESS:"SET_UPLOAD_PROGRESS",SET_UPLOAD_COMPLETE:"SET_UPLOAD_COMPLETE",SET_UPLOAD_ERROR:"SET_UPLOAD_ERROR",CLEAR_UPLOAD:"CLEAR_UPLOAD",CLEAR_ALL_UPLOADS:"CLEAR_ALL_UPLOADS",SET_SEAMLY_CONTAINER_ELEMENT:"SET_SEAMLY_CONTAINER_ELEMENT"},Hn="navigate",{ADD_EVENT:Vn,CLEAR_EVENTS:qn,SET_HISTORY:Wn,SET_EVENTS_READ:Gn,ACK_EVENT:Kn,SET_IS_LOADING:Yn,CLEAR_PARTICIPANTS:Jn,SET_PARTICIPANT:Qn,SET_HEADER_TITLE:Zn,SET_HEADER_SUB_TITLE:Xn,RESET_HISTORY_LOADED_FLAG:tr,SET_ACTIVE_SERVICE:er,INIT_IDLE_DETACH_COUNTDOWN:nr,DECREMENT_IDLE_DETACH_COUNTDOWN_COUNTER:rr,STOP_IDLE_DETACH_COUNTDOWN_COUNTER:or,CLEAR_IDLE_DETACH_COUNTDOWN:ir,INIT_RESUME_CONVERSATION_PROMPT:ar,CLEAR_RESUME_CONVERSATION_PROMPT:sr,SET_SERVICE_DATA_ITEM:cr,SET_FEATURES:lr,SET_FEATURE_ENABLED_STATE:ur,CLEAR_FEATURES:pr,SET_INITIAL_STATE:fr,SET_USER_SELECTED_OPTION:hr,SET_USER_SELECTED_OPTIONS:dr,SHOW_OPTION:vr,HIDE_OPTION:yr,SET_BLOCK_AUTO_ENTRY_SWITCH:mr,SET_USER_ENTRY_TYPE:gr,SET_ACTIVE_ENTRY_TYPE:br,SET_SERVICE_ENTRY_METADATA:_r,REGISTER_UPLOAD:wr,SET_UPLOAD_PROGRESS:xr,SET_UPLOAD_COMPLETE:Tr,SET_UPLOAD_ERROR:Er,CLEAR_UPLOAD:Sr,CLEAR_ALL_UPLOADS:kr,SET_SEAMLY_CONTAINER_ELEMENT:Ar}=Bn,Or=({type:t,payload:e})=>t===kn.message&&!e.fromClient||t===kn.info&&e.type===An,Cr=t=>bn()(t).call(t,(({payload:{occurredAt:t}},{payload:{occurredAt:e}})=>t-e)),Ir=(t,e)=>{switch(e.type){case Jn:return{participants:{},currentAgent:""};case Qn:if(!t)return{participants:{},currentAgent:""};const{participants:n}=t||{participants:{}},{id:r,avatar:o,name:i,introduction:a}=e.participant,s=n[r],c=Sn(Sn({},n),{},{[r]:s?Sn(Sn(Sn(Sn({},s),o?{avatar:o}:{}),i?{name:i}:{}),a?{introduction:a}:{}):e.participant});return Sn(Sn({},t),{},{participants:c,currentAgent:t.currentAgent===r||e.fromClient?t.currentAgent:r});default:return t}},Nr=(t,e)=>{switch(e.type){case Zn:return Sn(Sn({},t),{},{title:e.title});case Xn:return Sn(Sn({},t),{},{subTitle:e.title});default:return t}},jr=(t,e)=>{const{entry:n}=e,{blockAutoEntrySwitch:r}=t;if(!n)return Sn(Sn({},t),{},{optionsOverride:{}});const{type:o,options:i}=n;let a=t.active;return r||o===t.userSelected||(a=o),Sn(Sn({},t),{},{active:a,optionsOverride:Sn(Sn({},t.optionsOverride),{},{[o]:i||{}})})};var Rr=n(3476),Pr=n.n(Rr);const{createAction:Lr,createThunk:Dr,createReducer:Ur,selectState:Mr}=re("i18n"),zr=de(Mr,(t=>t.translations)),Fr=de(Mr,(t=>t.initialLocale)),$r=de(Mr,(t=>t.locale)),Br=Lr("setInitialLocale",(t=>({locale:t}))),Hr=function(){let t=!1;const e=[],n=async()=>{if(!t)for(;e.length;){const n=e.shift();t=!0,await n().catch((()=>{})),t=!1}};return{next:n,runExclusively:async t=>{const r=new(Pr())(((n,r)=>{e.push((async()=>{try{n(await t())}catch(t){r(t)}}))}));return n(),r}}}(),Vr=Dr("setLocale",(async(t,{getState:e,extra:{api:n}})=>Hr.runExclusively((()=>{if(t!==$r(e()))return n.getTranslations(t)})))),{createActions:qr,createReducer:Wr,selectState:Gr}=re("translations"),[Kr,Yr]=qr("translate",{enable:t=>({locale:t}),disable:()=>({})}),[Jr,Qr]=qr("event",{enable:t=>({payloadId:t}),disable:t=>({payloadId:t})}),{createAction:Zr,createThunk:Xr,createReducer:to,selectState:eo}=re("app"),no=de(eo,(t=>t.userHasResponded)),{createAction:ro,createActions:oo,createThunk:io,createReducer:ao,selectState:so}=re("visibility"),co=({hasResponded:t,previousVisibility:e,requestedVisibility:n,config:r})=>{const{defaults:o,layoutMode:i,hideOnNoUserResponse:a}=r,{visible:s}=o||{};if("window"===i&&a&&n!==ye.open)return t?n||e||ye.open:ye.hidden;if("inline"===i&&t&&!n)return e||ye.open;const c=ye.minimized;return n||e||s||c},lo=de(so,(t=>t.visibility));function uo(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function po(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=uo(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=uo(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const fo=t=>t.state,ho=()=>$e(fo),vo=de(fo,be,no,(({events:t,serviceData:e},n,r)=>{var o;if(r||"inline"===n.layoutMode||!e.suggestion||null===(o=e.suggestion)||void 0===o||!o.body.length)return t;const i={type:"service_data",payload:e.suggestion};return[...t,i]})),yo=de(vo,be,((t,e)=>{var n;const{enabled:r,threshold:o}=(null==e||null===(n=e.messages)||void 0===n?void 0:n.timeIndicator)??{};if(!r)return t;const i=[];let a=null;return T()(t).call(t,((t,e)=>{if(0===e)i.push(po(po({},t),{},{timeIndicator:t.payload.occurredAt}));else{const e=a&&cn(t.payload.occurredAt-a.payload.occurredAt)>=o?t.payload.occurredAt:void 0;i.push(po(po({},t),{},{timeIndicator:e}))}a=t})),i})),mo=()=>$e(yo,[]),go=()=>ho().headerTitles,bo=()=>ho().unreadEvents,_o=()=>ho().skiplinkTargetId,wo=de(yo,(t=>{var e;const n=w()(t).call(t,(t=>"message"===t.type));return null===(e=n[n.length-1])||void 0===e?void 0:e.payload.id})),xo=()=>{const{participants:t,currentAgent:e}=ho().participantInfo;return e?t[e]:null},To=t=>ho().serviceData[t],Eo=()=>{const{layoutMode:t}=He();return{isInline:"inline"===t,isWindow:"window"===t,isResolving:!t}};function So(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ko(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=So(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=So(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Ao=ro("setFromStorage",(t=>({visibility:t}))),Oo=[ye.open,ye.minimized,ye.hidden],Co=io("set",((t,{getState:e,extra:{api:n,eventBus:r}})=>{const o=e(),i=lo(o),a=no(o),s=n.hasConversation(),c=be(o),{visibilityCallback:l=co,layoutMode:u}=c,{unreadEvents:p}=fo(o),f=l({hasConversation:s,hasResponded:a,previousVisibility:i,requestedVisibility:t,config:c});if(rn()(Oo).call(Oo,f)){if(i!==f)return n.store.set(ve,ko(ko({},n.store.get(ve)||{}),{},{[u]:t})),t&&r.emit("ui.visible",t,{visibility:t,hasConversation:s,hasResponded:a,unreadMessageCount:p}),f}else console.error('The visibilityCallback function should return "open", "minimized" or "hidden".')})),Io=io("initialize",(async(t,{dispatch:e,getState:n,extra:{api:r}})=>{var o;const{layoutMode:i}=be(n()),a=null===(o=r.store.get(ve))||void 0===o?void 0:o[i];a&&e(Ao(a)),e(Co(ye.initialize))}));class No extends Error{constructor(t){super(t),Error.captureStackTrace&&Error.captureStackTrace(this,No),this.name="SeamlyUnavailableError",this.langKey="errors.seamlyUnavailable"}}var jo=n(1611),Ro=n.n(jo);class Po extends Error{constructor(t,...e){super(...e),Error.captureStackTrace&&Error.captureStackTrace(this,Ro()(this)),this.originalError=t,null!=t&&t.payload&&(this.originalEvent=t,this.originalError=t.payload.error,this.message=`Event of type ${t.payload.type} encountered`),null!=t&&t.error&&(this.originalError=t.error)}}class Lo extends Po{constructor(t,...e){super(t,...e),this.name="SeamlySessionExpiredError",this.action="reset"}}const{createAction:Do,createReducer:Uo,selectState:Mo}=re("interrupt"),zo=Do("set",(t=>({error:t}))),Fo=Do("clear"),$o=Zr("setHasResponded",(t=>({hasResponded:t}))),Bo=Xr("initialize",(async(t,{dispatch:e,extra:{api:n,config:r}})=>{var o;e(ce(r));let i=null==r||null===(o=r.context)||void 0===o?void 0:o.locale;try{const{features:t,defaultLocale:r,preChat:o,agentParticipant:a,userParticipant:s,startChatIcon:c}=await n.getConfig();e({type:Bn.SET_FEATURES,features:t}),i=i||r,e(Br(i)),e(ue(b()(o).call(o,(t=>({type:"message",payload:t}))))),e(le({agentParticipant:a,userParticipant:s,startChatIcon:c})),null!=a&&a.name&&e({type:Bn.SET_HEADER_SUB_TITLE,title:a.name})}catch(t){throw new No}try{var a;if(n.hasConversation()){var s;const t=await n.getConversationIntitialState();e({type:Bn.SET_INITIAL_STATE,initialState:t}),i=(null===(s=t.translation)||void 0===s?void 0:s.locale)||i,"userResponded"in t&&e($o(t.userResponded))}else null!=r&&null!==(a=r.context)&&void 0!==a&&a.translationLocale&&(i=r.context.translationLocale,n.send("action",{type:Dn,body:{enabled:!0,locale:i}}),e(Kr(i)))}catch(t){if(t instanceof Lo)throw t;throw new No}finally{await e(Vr(i)),e(Io())}})),Ho=Xr("reset",(async(t,{dispatch:e,extra:{api:n}})=>{try{await n.disconnect(),await n.clearStore(),e(Bo())}catch(t){e(zo(t))}})),Vo=["messages"];function qo(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Wo(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=qo(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=qo(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Go=Wo(Wo({},{namespace:"default",layoutMode:"window",messages:{agent:{showAvatar:!1,showName:!1},user:{showAvatar:!1,showName:!1},timeIndicator:{enabled:!1,threshold:36e5}}}),{},{hideOnNoUserResponse:!1,showDisclaimer:!1,showFaq:!1,customComponents:{},defaults:{},preChatEvents:[]}),Ko=["hideOnNoUserResponse","showDisclaimer","showFaq","namespace","customComponents","defaults","layoutMode","api","zIndex","context","appContainerClassNames","messages","visible","visibilityCallback","errorCallback","agentParticipant","userParticipant","startChatIcon"],Yo=(t,{config:e})=>{const n=((t,e)=>en()(e).call(e,((e,n)=>(n in t&&(e[n]=t[n]),e)),{}))(e,Ko),{messages:r}=n,o=L(n,Vo);let i=t;return N()(o).length>0&&(i=Wo(Wo({},i),o)),r&&(i=Wo(Wo({},i),{},{messages:Wo(Wo({},i.messages),r)})),i};var Jo=ae({[ce]:(t,e)=>Yo(t,e),[le]:(t,e)=>Yo(t,e),[Bo.pending]:()=>Go,[ue]:(t,{events:e})=>Wo(Wo({},t),{},{preChatEvents:e})},Go),Qo=n(6423),Zo=n.n(Qo);const Xo=(...t)=>{var e,n,r,o,i,a;return b()(e=w()(n=Zo()(r=b()(o=w()(i=b()(a=Zo()(t).call(t)).call(a,(t=>{var e;return"object"==typeof t?b()(e=C()(t)).call(e,(([t,e])=>e?t:"")).join(" "):t}))).call(i,(t=>"string"==typeof t))).call(o,(t=>t.split(" ")))).call(r)).call(n,(t=>t.length))).call(e,(t=>Xe()(t).call(t,qe)>-1?t:[qe,t].join("-"))).join(" ")},ti=yt(null),ei=yt(""),ni=()=>Ut(ti),ri=()=>ni().store||{},oi=()=>{const{get:t}=ri();return t?t("conversationUrl"):null},ii=()=>!!oi();var ai=Fe;const si=()=>He().appContainerClassNames,ci=t=>{const{fromClient:e}=t.payload,n=["message"];return"info"===t.type?n.push("message--source-info"):e?n.push("message--source-user"):n.push("message--source-agent"),n};function li(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ui(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return li(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?li(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function pi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function hi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function di(t){return t.reduce((function(t,e){return t.concat(Array.isArray(e)?di(e):e)}),[])}function vi(t){var e={};return function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];var i=r.length?r.map((function(t){return null===t?"null":void 0===t?"undefined":"function"==typeof t?t.toString():t instanceof Date?t.toISOString():JSON.stringify(t)})).join("|"):"_(no-args)_";if(Object.prototype.hasOwnProperty.call(e,i))return e[i];var a=t.apply(void 0,r);return e[i]=a,a}}function yi(t){for(var e=function(t){return/\s/.test(t)},n=[],r={},o=0,i=null,a=!1,s=0;s<t.length;){if(a&&(e(t[s])||"{"===t[s]))a=!1,i=t.slice(o,s),"{"===t[s]&&s--;else if(!a&&!e(t[s])){var c="{"===t[s];if(i&&c){var l=mi(t,s);if(-1===l)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));r[i]=t.slice(s+1,l),s=l,i=null}else i&&(n.push(i),i=null),a=!0,o=s}s++}return a&&(i=t.slice(o)),i&&n.push(i),{args:n,cases:r}}function mi(t,e){for(var n=0,r=e+1;r<t.length;r++){var o=t.charAt(r);if("}"===o){if(0===n)return r;n--}else"{"===o&&n++}return-1}function gi(t){return bi(t.slice(1,-1),",",3)}function bi(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!t)return r;if(1===n)return r.push(t),r;var o=t.indexOf(e);if(-1===o)return r.push(t),r;var i=t.substring(0,o).trim(),a=t.substring(o+e.length+1).trim();return r.push(i),bi(a,e,n-1,r)}var _i;function wi(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function xi(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wi(Object(n),!0).forEach((function(e){hi(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wi(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Ti=0,Ei="other";function Si(t,e){for(var n=0,r="",o=0,i={};n<t.length;){if("#"!==t[n]||o)r+=t[n];else{var a="__hashToken".concat(Ti++);r+="{".concat(a,", number}"),i[a]=e}"{"===t[n]?o++:"}"===t[n]&&o--,n++}return{caseBody:r,numberValues:i}}var ki="other";const Ai=new(function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};pi(this,t),hi(this,"format",vi((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return di(n.process(t,e)).join("")}))),this.locale=e,this.typeHandlers=r}var e,n;return e=t,(n=[{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return[];var n=t.indexOf("{");if(-1!==n){var r=mi(t,n);if(-1===r)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));var o=t.substring(n,r+1);if(o){var i=[],a=t.substring(0,n);a&&i.push(a);var s=gi(o),c=ui(s,3),l=c[0],u=c[1],p=c[2],f=e[l];null==f&&(f="");var h=u&&this.typeHandlers[u];i.push(h?h(f,p,this.locale,e,this.process.bind(this)):f);var d=t.substring(r+1);return d&&i.push(this.process(d,e)),i}}return[t]}}])&&fi(e.prototype,n),t}())("en-GB",{plural:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,i=yi(e),a=i.args,s=i.cases,c=parseInt(t);a.forEach((function(t){t.startsWith("offset:")&&(c-=parseInt(t.slice("offset:".length)))}));var l=[];if("PluralRules"in Intl){void 0!==_i&&_i.resolvedOptions().locale===n||(_i=new Intl.PluralRules(n));var u=_i.select(c);u!==Ei&&l.push(u)}1===c&&l.push("one"),l.push("=".concat(c),Ei);for(var p=0;p<l.length;p++){var f=l[p];if(f in s){var h=Si(s[f],c),d=h.caseBody,v=h.numberValues;return o(d,xi(xi({},r),v))}}return t},select:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,o=yi(e),i=o.cases;return t in i?r(i[t],n):ki in i?r(i.other,n):t}});function Oi(){const t=$e(zr),e=$e($r),n=$e(Fr);return{t:Dt(((n,r={})=>{const o=t[n];return o?Ai.format(o,r):(console.warn(`Translation key: ${n} is missing in locale: ${e}`),null)}),[t,e]),locale:e,initialLocale:n}}function Ci(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ii(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Ci(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Ci(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Ni={translations:{"errors.configError.message":"We are sorry this happened, please retry at a later time.","errors.configError.srText":"A chat configuration error occurred. Our apologies, please retry at a later time.","errors.configError.title":"Chat configuration error.","errors.general.buttonText":"Restart chat","errors.general.message":"Do you want to start a new chat session?","errors.general.srText":"Something went wrong with the chat session. You can restart the chat.","errors.general.title":"Something went wrong","errors.seamlyOffline.message":"There might be a problem with your or our network connection. The chat session should resume as soon the connection is available again.","errors.seamlyOffline.srText":"The chat has connection issues. There might be a problem with your or our network connection. The chat session should resume as soon as the connection is available again.","errors.seamlyOffline.title":"Connection issues","errors.seamlyUnavailable.buttonText":"Try again","errors.seamlyUnavailable.message":"The server could not be reached. Try again in a little while.","errors.seamlyUnavailable.srText":"The chat server could not be reached. Try again in a little while.","errors.seamlyUnavailable.title":"Server unavailable"},isLoading:!1,initialLocale:void 0};var ji=Ur({[Br]:(t,{locale:e})=>Ii(Ii({},t),{},{initialLocale:e}),[Vr.pending]:t=>Ii(Ii({},t),{},{isLoading:!0}),[Vr.fulfilled]:(t,{payload:e,meta:{arg:n}})=>{var r,o;return Ii(Ii({},t),{},e?{isLoading:!1,locale:n,translations:en()(r=bn()(o=N()(e)).call(o)).call(r,((t,n)=>Ii(Ii({},t),{},{[n]:e[n]})),{})}:{isLoading:!1})},[Vr.rejected]:t=>Ii(Ii({},t),{},{isLoading:!1}),[Bo.pending]:()=>Ni},Ni);const{SET_SEAMLY_CONTAINER_ELEMENT:Ri}=Bn,Pi=t=>{requestAnimationFrame((()=>{requestAnimationFrame((()=>{const e="string"==typeof t?document.getElementById(t):t;yn(e)}))}))},Li=()=>{const{seamlyContainerElement:t}=ho(),e=ai();return[t,Dt((t=>{e({type:Ri,element:t})}),[e])]},Di=t=>Dt((()=>{Pi(t)}),[t]),Ui=()=>{const t=_o();return Di(t)};function Mi(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function zi(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Mi(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Mi(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const{SET_USER_SELECTED_OPTION:Fi,SET_USER_SELECTED_OPTIONS:$i,SHOW_OPTION:Bi,HIDE_OPTION:Hi}=Bn,Vi=()=>{var t,e;const{t:n}=Oi(),{options:r}=ho(),{panelActive:o,optionActive:i,userSelectedOptions:a,features:s}=r,{cobrowsing:c,sendTranscript:l}=s,u={cobrowsing:c,sendTranscript:l},p=b()(t=w()(e=N()(u)).call(e,(t=>u[t]))).call(t,(t=>({name:t,title:n(`options.${t}.menuTitle`),available:u[t].enabled}))),f=c||l,h=ai(),{get:d,set:v}=ri();return{allowOptionSelection:f,userSelectedOptions:a,features:s,menuOptions:p,initUserSelectedOptions:Dt((()=>{const t=d("options")||{};h({type:$i,options:t})}),[d,h]),setUserSelectedOptions:Dt((t=>{h({type:$i,options:t}),v("options",t)}),[v,h]),setUserSelectedOption:Dt(((t,e)=>{const n=d("options")||{};v("options",zi(zi({},n),{},{[t]:e})),h({type:Fi,option:t,value:e})}),[h,d,v]),showOption:t=>{h({type:Bi,optionName:t})},hideOption:()=>{h({type:Hi})},panelActive:o,optionActive:i}},qi=()=>{const{optionsButtonId:t}=ho();return{id:t,focusButton:Di(t)}};var Wi=n(62),Gi=n.n(Wi),Ki=yt({});function Yi(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ji(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Yi(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Yi(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const{CLEAR_ALL_UPLOADS:Qi}=Bn,Zi=()=>{const{showFileUpload:t,entryMeta:{options:e,optionsOverride:n},options:{features:{uploads:r}}}=ho(),{allowedMimeTypes:o,maxSize:i}=n.upload||{},{enabled:a,enabledFromEntry:s}=r||{},{allowedMimeTypes:c,maxSize:l}=Ji(Ji(Ji({},e.upload||{allowedMimeTypes:[],maxSize:0}),o?{allowedMimeTypes:o}:{}),i?{maxSize:i}:{});return{showFileUpload:t,accountAllowsUploads:!!r,serviceAllowsUploads:s||a,allowedMimeTypes:c,maxSize:l}},Xi=()=>{const{currentUploads:t}=ho(),e=ai(),n=Ut(Ki);return{uploadFile:Dt((t=>{n(t)}),[n]),clearUploads:Dt((()=>{e({type:Qi})}),[e]),currentUploads:t,isUploading:A()(t).call(t,(t=>t.uploading)),isComplete:Gi()(t).call(t,(t=>t.complete))}};var ta=n(5843),ea=n.n(ta);const na=()=>{const[t]=It((()=>Jt()));return t},ra=t=>{const e=Pt();e.current=t;const n="function"==typeof t;return Lt((()=>n?(...t)=>e.current(...t):void 0),[n])},oa=de(Mo,(({error:t})=>t));function ia(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function aa(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=ia(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=ia(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}function sa(){const{t:t}=Oi(),e=$e(oa);return{hasInterrupt:Boolean(e),meta:Lt((()=>{if(!e)return{};const{langKey:n,action:r}=e,o=t(`${n}.title`),i=t(`${n}.message`),a=t(`${n}.srText`),s=t(`${n}.buttonText`);return aa(aa(aa(aa({},n?{title:o,message:i,srText:a}:{}),r?{action:r}:{}),r&&n?{buttonText:s}:{}),{},{originalError:e})}),[t,e]),error:e}}class ca extends Po{constructor(t,...e){super(t,...e),this.name="SeamlyGeneralError",this.langKey="errors.general",this.action="reset"}}class la extends Po{constructor(t,...e){super(t,...e),this.name="SeamlyConfigurationError",this.langKey="errors.configError"}}class ua extends Po{constructor(t,...e){super(t,...e),this.name="SeamlyOfflineError",this.langKey="errors.seamlyOffline"}}class pa extends Po{constructor(t,...e){super(t,...e),this.name="SeamlyUnauthorizedError",this.langKey="errors.general",this.action="reset"}}const fa=[ca,la,Lo,ua,pa,No];function ha({api:t}){return()=>e=>n=>{const{error:r}=n;if(r){if(!A()(fa).call(fa,(t=>r instanceof t)))throw r;"reset"===r.action&&t.disconnect().then((()=>{t.clearStore()}))}return e(n)}}function da(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function va(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=da(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=da(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const ya={error:void 0},ma=(t,{error:e})=>va(va({},t),{},{error:e});var ga=Uo({[zo]:ma,[Bo.rejected]:ma,[Fo]:()=>ya,[Bo.pending]:()=>ya},ya);function ba(){return $e(no)}const _a=()=>{const t=Fe(),e=$e(lo);return{isVisible:!!e&&e!==ye.hidden,isOpen:e===ye.open,isMinimized:e===ye.minimized,visible:e,setVisibility:Dt((e=>t(Co(e))),[t])}};function wa(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function xa(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=wa(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=wa(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Ta={visibility:ye.initialize};var Ea=ao({[Ao]:(t,{visibility:e})=>xa(xa({},t),{},{visibility:e}),[Co.fulfilled]:(t,{payload:e})=>e?xa(xa({},t),{},{visibility:e}):t},Ta);function Sa(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ka(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Sa(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Sa(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const{ADD_EVENT:Aa,SET_INITIAL_STATE:Oa}=Bn;var Ca=()=>{const t=ni(),e=He(),n=ai(),r=Ut(ei),o=ba(),i=ii(),{visible:a}=_a(),s=bo(),c=Dt(((...t)=>{r.emit(...t)}),[r]),l=ra((()=>{t.sendContext(e.context||{}),c("ui.beforeStart",{visibility:a,hasConversation:i,hasResponded:o,unreadMessageCount:s}),t.send("start"),c("ui.start",{visibility:a,hasConversation:i,hasResponded:o,unreadMessageCount:s})})),u=Dt((async()=>{n(Ho())}),[n]),p=Dt((t=>({type:t,id:Jt(),transactionId:Jt(),participant:Ge,fromClient:!0,occurredAt:1e3*Yt()(),meta:{}})),[]),f=Dt((t=>ka(ka({},p("text")),{},{body:{text:t}})),[p]),h=Dt((({body:e,config:r={}})=>{if(""===ea()(e).call(e))return;const o=ka(ka({},f(e)),r);t.send("message",o),c("message",o),n({type:Aa,event:{type:"message",payload:o}})}),[t,n,c,f]),d=Dt((t=>{n({type:Aa,event:{type:"message",payload:f(t)}})}),[n,f]),v=Dt(((t,e,r,o,i,a,s)=>{n({type:Aa,event:{type:"message",payload:{type:"upload",id:t,transactionId:e,participant:Ge,fromClient:!0,occurredAt:r,meta:{},body:{contentType:o,filename:i,filesize:a,url:s}}}})}),[n]),y=Dt((t=>{const e={body:{subtype:t,type:"divider"},fromClient:!1,fromHistory:!0,id:Jt(),transactionId:Jt(),type:"divider"};n({type:Aa,event:{type:"info",payload:e}})}),[n]),m=Dt((({type:e,subtype:n})=>{const r={type:e,subtype:n,id:Jt(),transactionId:Jt(),participant:Ge,fromClient:!0};t.send("info",r)}),[t]),g=Dt((e=>{if(!e)return;t.send("action",e);const{type:n}=e;n!==Rn&&n!==Pn&&c(`action.${n}`,e)}),[t,c]),b=Dt((e=>{t.sendContext(e)}),[t]);return{connect:Dt((()=>t.connected?Pr().reject(new Error("The API is already connected")):t.connect().then((t=>{t&&n({type:Oa,initialState:t})})).catch((t=>{n(zo(t))}))),[t,n]),start:l,sendMessage:h,sendInfo:m,sendAction:g,sendContext:b,reset:u,emitEvent:c,addMessageBubble:d,addUploadBubble:v,addDivider:y,apiConfigReady:t.configReady}};const Ia=yt(null),Na=()=>{const t=Ut(Ia);return{sendPolite:Dt((e=>{t({ariaLive:zn,messageText:e})}),[t]),sendAssertive:Dt((e=>{t({ariaLive:Mn,messageText:e})}),[t])}};var ja=yt(null),Ra=()=>Ut(ja),Pa=n(1581),La=n.n(Pa);function Da(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}const{SET_BLOCK_AUTO_ENTRY_SWITCH:Ua,SET_ACTIVE_ENTRY_TYPE:Ma,SET_USER_ENTRY_TYPE:za}=Bn,Fa=()=>{const{default:t,active:e,userSelected:n,options:r}=ho().entryMeta,o=ai(),i=n||e||t,a=r[i]||{},s=Dt((t=>{o({type:Ua,value:t})}),[o]),c=Dt((t=>{o({type:Ma,entryType:t})}),[o]),l=Dt((t=>{o({type:za,entryType:t})}),[o]),u=Dt((()=>{n?l(null):c(t)}),[n,t,l,c]);return{activeEntry:i,activeEntryOptions:a,setActiveEntryType:c,setUserEntryType:l,cancelEntrySelection:u,setBlockAutoEntrySwitch:s}},{SET_IS_LOADING:$a}=Bn;var Ba=()=>{const{t:t}=Oi(),{layoutMode:e}=He(),{isOpen:n,isVisible:r,setVisibility:o}=_a(),i=ai(),a=mo(),s=Pt(null),{start:c,connect:l,apiConfigReady:u}=Ca(),p=ii(),f=Pt(null),h=Pt(null),{sendAssertive:d}=Na(),v=Pt(!1),y=a.length>0;return jt((()=>{r&&Ye()((()=>{d(t("window.srTexts.onLoad"))}),500)}),[r,d,t]),jt((()=>{if(r!==h.current)return f.current=n,void(h.current=r);null!==f.current&&d(t(n?"window.srTexts.onOpen":"window.srTexts.onClose")),f.current=n,h.current=r}),[n,r,d,t]),jt((()=>{s.current=Ye()((()=>{i({type:$a,isLoading:!0})}),500)}),[i]),jt((()=>{y&&(clearTimeout(s.current),i({type:$a,isLoading:!1}))}),[y,i]),jt((()=>{p&&u||(v.current=!1)}),[p,u]),jt((()=>{("window"!==e||n||p)&&!v.current&&u&&(p&&(clearTimeout(s.current),i({type:$a,isLoading:!1})),l().then((()=>{c()})),v.current=!0)}),[n,p,u,c,l,i,e]),{openChat:()=>{o(ye.open)},closeChat:()=>{o(ye.minimized)}}};function Ha(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Va(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Ha(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Ha(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const{CLEAR_IDLE_DETACH_COUNTDOWN:qa,INIT_IDLE_DETACH_COUNTDOWN:Wa,DECREMENT_IDLE_DETACH_COUNTDOWN_COUNTER:Ga,STOP_IDLE_DETACH_COUNTDOWN_COUNTER:Ka}=Bn;var Ya=()=>{const t=ai(),{idleDetachCountdown:e}=ho(),{isOpen:n}=_a(),r=Pt({});r.current={hasCountdown:e.hasCountdown,isActive:e.isActive,remaining:e.remaining,wasStopped:e.wasStopped,isOpen:n};const{emitEvent:o,sendAction:i}=Ca(),{t:a}=Oi(),{sendAssertive:s,sendPolite:c}=Na(),l=Dt((t=>{const{isOpen:e}=r.current;e&&s(t)}),[s]),u=Dt((t=>{const{isOpen:e}=r.current;e&&c(t)}),[c]),p=Dt((e=>{const n=(t=>Math.ceil(t/1e3))(e),r=ln(n);t({type:Wa,delaySeconds:n,delayTime:r}),o("idleTimer.start"),l(`${a("idleDetachWarning.countdownTitle")} ${a("idleDetachWarning.countdownText")} ${a("idleDetachWarning.countdownTimer",r)}`)}),[t,o,l,a]),f=Dt(((e,n)=>{const{hasCountdown:s,wasStopped:c}=r.current;s&&(e||(n||i({type:Ln}),l(a("idleDetachWarning.notifyTransferText"))),c||o("idleTimer.stop"),t({type:qa}))}),[t,i,o,l,a]),h=Dt((()=>{const{remaining:e}=r.current;if(e<=0)return;const n=e-1;n%10==0&&l(`${a("idleDetachWarning.countdownText")} ${a("idleDetachWarning.countdownTimer",ln(n))}`),t({type:Ga})}),[t,l,a]),d=Dt((()=>{const{isActive:e,remaining:n}=r.current;e&&(t({type:Ka}),n&&(o("idleTimer.stop"),u(a("idleDetachWarning.srCountDownStoppedText"))))}),[t,o,u,a]);return Va(Va({},e),{},{initCountdown:p,endCountdown:f,decrementCountdown:h,stopCountdown:d})};const{CLEAR_RESUME_CONVERSATION_PROMPT:Ja}=Bn;var Qa=()=>{const t=ai(),e=ho().resumeConversationPrompt,{sendAction:n}=Ca(),{t:r}=Oi(),{sendAssertive:o}=Na();return{continueChat:()=>{n({type:"dismiss",body:{type:"resume_conversation_prompt"}}),t({type:Ja})},hasPrompt:e,restartChat:()=>{o(r("resumeConversationPrompt.srNotifyRestartText")),n({type:Ln}),t({type:Ja})}}};const Za=(t,e)=>{const n=ni();jt((()=>{var r;n.stream&&(e?w()(r=n.stream()).call(r,e).subscribe({next:t}):n.stream().subscribe({next:t}))}),[n,t,e])};function Xa(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ts(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Xa(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Xa(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var es=to({[$o]:(t,{hasResponded:e})=>ts(ts({},t),{},{userHasResponded:e})},{userHasResponded:!1});const ns=(t,e)=>(n,r)=>r[t]||e,rs=Gr,os=de(rs,(t=>t.originalPayloadIds)),is=de(os,ns("payloadId"),((t,e)=>!rn()(t).call(t,e)));function as(){const{sendAction:t}=Ca(),e=Fe(),n=ra((n=>{t({type:Dn,body:{enabled:!0,locale:n}}),e(Kr(n))})),r=ra((()=>{t({type:Dn,body:{enabled:!1}}),e(Yr())})),{languages:o,isActive:i,isAvailable:a,currentLocale:s}=$e(rs,[]);return{languages:o,isActive:i,isAvailable:a,currentLocale:s,enableTranslations:n,disableTranslations:r}}function ss({payload:t}={}){var e,n,r;const o=null==t?void 0:t.id;let i,a;switch(null==t?void 0:t.type){case"participant":i=t.participant.introduction,a=t.participant.translatedIntroduction;break;default:i=null==t?void 0:t.body,a=null==t?void 0:t.translatedBody}const s=!!a,c=Be(is,{payloadId:o},[o]),l=Fe(),u=ra((()=>{l(c?Qr(o):Jr(o))}));return[s&&c?null===(e=a)||void 0===e?void 0:e.data:i,{hasTranslation:s,isTranslated:c&&s,toggleTranslation:u,translatedBy:null===(n=a)||void 0===n?void 0:n.translatedBy,locale:null===(r=a)||void 0===r?void 0:r.locale}]}function cs(){const t=$e(rs,[]).containerId;return{id:t,focusContainer:Di(t)}}function ls(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function us(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=ls(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=ls(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const ps={isActive:!1,currentLocale:void 0,isAvailable:!1,languages:[],originalPayloadIds:[],containerId:Jt()};var fs=Wr({[Bn.SET_FEATURES]:(t,e)=>{var n;const r=null==e||null===(n=e.features)||void 0===n?void 0:n.translation;return r?us(us({},t),{},{isAvailable:!0===r.enabled,languages:r.languages||[]}):t},[Bn.CLEAR_FEATURES]:()=>ps,[Kr]:(t,{locale:e})=>us(us({},t),{},{isActive:!0,currentLocale:e}),[Yr]:t=>us(us({},t),{},{isActive:!1,currentLocale:void 0}),[Jr]:(t,{payloadId:e})=>{var n,r;return rn()(n=t.originalPayloadIds).call(n,e)?us(us({},t),{},{originalPayloadIds:w()(r=t.originalPayloadIds).call(r,(t=>t!==e))}):t},[Qr]:(t,{payloadId:e})=>{var n;return rn()(n=t.originalPayloadIds).call(n,e)?t:us(us({},t),{},{originalPayloadIds:[...t.originalPayloadIds,e]})},[Bo.pending]:()=>ps},ps);const hs={send32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M6.714,14.985l17.837-7.906c0.681-0.302,1.414,0.301,1.25,1.027L22.273,23.59\tc-0.13,0.566-0.751,0.865-1.275,0.613l-3.623-1.752l-2.334,2.287c-0.572,0.562-1.538,0.156-1.538-0.645V21.01\tc0-0.217,0.078-0.43,0.222-0.594l7.676-8.841l-10.414,7.472l-4.351-2.445C5.987,16.236,6.033,15.287,6.714,14.985L6.714,14.985z"/></svg>',balloon32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M24,10.824v10.375c0,1.104-0.896,2-2,2h-4.694l-4.931,3.625v-3.625H10c-1.104,0-2-0.896-2-2V10.824\tc0-1.104,0.896-2,2-2h12C23.104,8.824,24,9.719,24,10.824z"/></svg>',newTopic32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><path fill="#4A48C1" d="M16,8.593l2.407,4.573l5.093,0.876l-3.604,3.702l0.74,5.115L16,20.574l-4.634,2.285l0.739-5.115L8.5,14.042\tl5.094-0.876L16,8.593z"/></svg>',newTranslation16:'<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 16 16"><path fill="#4A48C1" d="M8,0C3.6,0,0,3.6,0,8s3.6,8,8,8s8-3.6,8-8S12.4,0,8,0z M14.1,7.1h-1.4c-0.1-1.5-0.4-2.9-1-4\tC13,4,13.9,5.4,14.1,7.1z M7.1,2.1v5H5C5.2,4.7,6.1,2.9,7.1,2.1z M7.1,8.9v5c-1-0.7-1.9-2.5-2.1-5H7.1z M8.9,13.9v-5H11\tC10.8,11.3,9.9,13.2,8.9,13.9z M8.9,7.1v-5c1,0.7,1.9,2.5,2.1,5H8.9z M4.2,3.1c-0.5,1.1-0.9,2.5-1,4H1.9C2.1,5.4,3,4,4.2,3.1z M1.9,8.9h1.4c0.1,1.5,0.4,2.9,1,4C3,12,2.1,10.5,1.9,8.9z M11.8,12.9c0.5-1.1,0.9-2.5,1-4h1.4C13.9,10.5,13,12,11.8,12.9z"/></svg>',newTranslation32:'<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 32 32"><path fill="#4A48C1" d="M16,7c-4.9,0-9,4.1-9,9s4.1,9,9,9s9-4.1,9-9S20.9,7,16,7z M22.9,15h-1.6c-0.1-1.7-0.5-3.3-1.1-4.5\tC21.6,11.5,22.6,13.1,22.9,15z M15,9.4V15h-2.3C12.9,12.3,13.9,10.2,15,9.4z M15,17v5.6c-1.1-0.8-2.1-2.9-2.3-5.6H15z M17,22.6V17\th2.3C19.1,19.8,18.1,21.8,17,22.6z M17,15V9.4c1.1,0.8,2.1,2.9,2.3,5.6H17z M11.8,10.4c-0.6,1.3-1,2.8-1.1,4.5H9.1\tC9.4,13.1,10.4,11.5,11.8,10.4z M9.1,17h1.6c0.1,1.7,0.5,3.3,1.1,4.5C10.4,20.5,9.4,18.9,9.1,17z M20.2,21.5c0.6-1.3,1-2.8,1.1-4.5\th1.6C22.6,18.8,21.6,20.5,20.2,21.5z"/></svg>',avatar32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#003A5D" d="M0,4.717C0,2.112,2.112,0,4.717,0h22.566C29.888,0,32,2.112,32,4.717v22.566C32,29.887,29.888,32,27.283,32 H4.717C2.113,32,0,29.887,0,27.283V4.717z"/><path fill="#FFF" d="M10.103,14.901c-1.107,0-2.004-0.897-2.004-2.004s0.897-2.005,2.004-2.005c1.107,0,2.005,0.897,2.005,2.005 C12.108,14.004,11.211,14.901,10.103,14.901z M16,14.901c1.107,0,2.005-0.897,2.005-2.004S17.108,10.892,16,10.892 c-1.108,0-2.005,0.897-2.005,2.005C13.995,14.004,14.892,14.901,16,14.901z M21.896,10.892c-1.106,0-2.004,0.897-2.004,2.005 c0,1.107,0.896,2.004,2.004,2.004c1.109,0,2.005-0.897,2.005-2.004C23.901,11.789,23.005,10.892,21.896,10.892z M21.408,18.207 H10.783C11.83,23.973,20.361,23.973,21.408,18.207z"/></svg>',chevronDown8:'<svg xmlns="http://www.w3.org/2000/svg" width="8px" height="8px" x="0px" y="0px" viewBox="0 0 8 8"><defs/><path fill="#4A48C1" d="M-0.001,2.876c0-0.247,0.091-0.494,0.273-0.688c0.38-0.401,1.013-0.418,1.414-0.039l1.938,1.834\tc0.199,0.188,0.547,0.188,0.746,0L6.31,2.15c0.401-0.379,1.034-0.362,1.414,0.04c0.379,0.401,0.361,1.034-0.04,1.414L5.745,5.437\tC4.782,6.35,3.213,6.35,2.249,5.436L0.311,3.603C0.103,3.406-0.001,3.142-0.001,2.876z"/></svg>',chevronDown32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M16,20.425c-0.782,0-1.563-0.291-2.159-0.874l-6.541-6.408c-0.395-0.387-0.401-1.02-0.015-1.414\tc0.387-0.394,1.021-0.4,1.414-0.015l6.541,6.408c0.42,0.409,1.102,0.409,1.52-0.001l6.541-6.407c0.396-0.386,1.028-0.38,1.414,0.015\tc0.387,0.395,0.381,1.027-0.014,1.414l-6.541,6.407C17.563,20.133,16.782,20.425,16,20.425z"/></svg>',chevronRight8:'<svg xmlns="http://www.w3.org/2000/svg" width="8px" height="8px" x="0px" y="0px" viewBox="0 0 8 8"><defs/><path fill="#4A48C1" d="M2.875,7.998c-0.247,0-0.494-0.091-0.688-0.273c-0.401-0.38-0.418-1.013-0.039-1.414l1.834-1.938\tc0.188-0.199,0.188-0.547,0-0.746l-1.835-1.94c-0.379-0.401-0.362-1.034,0.04-1.414s1.034-0.361,1.414,0.04l1.834,1.939\tc0.913,0.963,0.913,2.532-0.001,3.496L3.601,7.686C3.405,7.894,3.14,7.998,2.875,7.998z"/></svg>',chevronRight16:'<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#4A48C1" d="M6.5,13c-0.247,0-0.494-0.091-0.687-0.273c-0.401-0.38-0.419-1.013-0.04-1.414L8.22,8.727\tc0.373-0.394,0.373-1.06,0-1.454L5.773,4.687c-0.379-0.401-0.362-1.034,0.04-1.414c0.4-0.378,1.034-0.362,1.414,0.04l2.446,2.586\tc1.096,1.159,1.096,3.043,0,4.203l-2.446,2.586C7.03,12.896,6.765,13,6.5,13z"/></svg>',close8:'<svg xmlns="http://www.w3.org/2000/svg" width="8px" height="8px" x="0px" y="0px" viewBox="0 0 8 8"><defs/><path fill="#4A48C1" d="M7.705,7.729C7.511,7.923,7.255,8.02,7,8.02c-0.257,0-0.514-0.099-0.709-0.295L4,5.423L1.709,7.725\tC1.513,7.921,1.257,8.02,1,8.02c-0.255,0-0.51-0.097-0.706-0.291c-0.391-0.39-0.393-1.022-0.003-1.414l2.298-2.309l-2.27-2.28\tC-0.07,1.334-0.068,0.701,0.323,0.311c0.392-0.389,1.024-0.387,1.415,0.003L4,2.587l2.263-2.274C6.653-0.077,7.287-0.079,7.677,0.31\tC8.068,0.7,8.07,1.333,7.681,1.725l-2.27,2.281l2.298,2.309C8.099,6.705,8.097,7.339,7.705,7.729z"/></svg>',close16:'<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#4A48C1" d="M12.709,11.295L9.411,7.982l3.262-3.276c0.39-0.392,0.388-1.024-0.004-1.414\tc-0.39-0.39-1.023-0.388-1.414,0.003L8,6.564L4.746,3.295C4.357,2.904,3.724,2.903,3.332,3.292C2.94,3.682,2.939,4.315,3.329,4.707\tl3.261,3.275l-3.298,3.313c-0.39,0.391-0.388,1.024,0.003,1.414C3.49,12.903,3.745,13,4,13c0.257,0,0.513-0.099,0.708-0.295L8,9.399\tl3.291,3.306C11.486,12.901,11.743,13,12,13c0.255,0,0.511-0.097,0.705-0.291C13.097,12.319,13.099,11.686,12.709,11.295z"/></svg>',enlarge32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M24,9v6.5c0,0.552-0.447,1-1,1s-1-0.448-1-1v-4.086L11.414,22H15.5c0.552,0,1,0.447,1,1s-0.448,1-1,1H9\tc-0.13,0-0.26-0.026-0.382-0.077c-0.245-0.102-0.439-0.296-0.541-0.541C8.026,23.26,8,23.13,8,23v-6.5c0-0.552,0.448-1,1-1\ts1,0.448,1,1v4.085L20.586,10H16.5c-0.552,0-1-0.448-1-1s0.448-1,1-1H23c0.13,0,0.26,0.026,0.382,0.077\tc0.245,0.102,0.439,0.296,0.541,0.541C23.974,8.74,24,8.87,24,9z"/></svg>',options32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M26.1,21.383c0.334-0.625,0.602-1.279,0.812-1.949L32,18.609V13.51l-5.058-0.846\tc-0.208-0.67-0.468-1.325-0.795-1.956l3.009-4.145l-3.604-3.634L21.38,5.903c-0.626-0.333-1.276-0.602-1.948-0.81L18.609,0\tl-5.098,0.001l-0.847,5.061c-0.669,0.203-1.326,0.465-1.957,0.794L6.562,2.847L2.929,6.449l2.973,4.171\tC5.569,11.247,5.3,11.9,5.091,12.569L0,13.373v5.099l5.06,0.866c0.204,0.669,0.467,1.324,0.796,1.955l-3.009,4.146l3.601,3.635\tl4.171-2.975c0.627,0.335,1.282,0.603,1.951,0.811L13.372,32h5.118l0.849-5.057c0.668-0.207,1.323-0.469,1.953-0.795l4.144,3.01\tl3.639-3.604L26.1,21.383z M19.01,19.035c-1.675,1.663-4.381,1.652-6.041-0.025c-1.662-1.675-1.649-4.381,0.024-6.042\tc1.676-1.661,4.382-1.648,6.043,0.025C20.699,14.67,20.686,17.377,19.01,19.035z"/></svg>',file32:'<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" x="0px" y="0px" version="1.1" viewBox="0 0 32 32"><path fill="#4A48C1" d="M16,28.5c-3.6,0-6.5-3-6.5-6.6V9.6c0-0.6,0.4-1,1-1s1,0.4,1,1v12.3c0,2.5,2,4.6,4.5,4.6\tc2.5,0,4.5-2.1,4.5-4.6V8.3c0-1.5-1.2-2.8-2.7-2.8c-1.5,0-2.7,1.3-2.7,2.8v13.5c0,0.6,0.5,1.1,1,1.1c0.6,0,1-0.5,1-1.1v-10\tc0-0.6,0.4-1,1-1s1,0.4,1,1v10c0,1.7-1.4,3.1-3,3.1s-3-1.4-3-3.1V8.3c0-2.6,2.1-4.8,4.7-4.8c2.6,0,4.7,2.2,4.7,4.8v13.6\tC22.5,25.5,19.6,28.5,16,28.5z"/></svg>',upload32:'<svg xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" x="0px" y="0px" viewBox="0 0 32 32"><defs/><path fill="#4A48C1" d="M9.488,13.481c-0.391-0.391-0.391-1.023,0-1.414l5.805-5.805c0.026-0.026,0.06-0.036,0.088-0.058\tc0.073-0.06,0.146-0.119,0.235-0.156c0.246-0.103,0.522-0.103,0.769,0c0.093,0.039,0.171,0.101,0.249,0.165\tc0.023,0.02,0.053,0.027,0.074,0.049l5.805,5.805c0.391,0.391,0.391,1.023,0,1.414c-0.195,0.195-0.451,0.293-0.707,0.293\ts-0.512-0.098-0.707-0.293L17,9.383V20.33c0,0.553-0.447,1-1,1c-0.552,0-1-0.447-1-1V9.383l-4.098,4.098\tC10.512,13.872,9.879,13.872,9.488,13.481z M22.819,24.031H9.181c-0.552,0-1,0.447-1,1s0.448,1,1,1h13.639c0.553,0,1-0.447,1-1\tS23.372,24.031,22.819,24.031z"/></svg>',download16:'<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#FFF" d="M3.175,7.726c-0.413-0.367-0.45-0.999-0.083-1.412c0.367-0.413,0.999-0.45,1.412-0.083L7,8.45V1.5\tc0-0.552,0.448-1,1-1c0.553,0,1,0.448,1,1v6.95l2.496-2.219c0.412-0.367,1.044-0.331,1.411,0.083\tc0.367,0.413,0.33,1.045-0.083,1.412l-4.16,3.698c-0.047,0.041-0.103,0.062-0.154,0.094c-0.047,0.028-0.089,0.064-0.141,0.085\tC8.25,11.649,8.125,11.677,8,11.677c-0.126,0-0.25-0.027-0.369-0.074c-0.05-0.021-0.09-0.055-0.136-0.083\tc-0.053-0.031-0.111-0.053-0.159-0.096L3.175,7.726z M12.018,13.5H3.983c-0.552,0-1,0.447-1,1s0.448,1,1,1h8.035\tc0.553,0,1-0.447,1-1S12.57,13.5,12.018,13.5z"/></svg>',error16:'<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" x="0px" y="0px" viewBox="0 0 16 16"><defs/><path fill="#ad001f" d="M15.744,13.104L9.097,1.47c-0.604-1.055-1.59-1.055-2.193,0L0.256,13.104\tc-0.604,1.056-0.102,1.919,1.113,1.919H14.63C15.847,15.022,16.348,14.159,15.744,13.104z M7,5.045c0-0.552,0.448-1,1-1s1,0.448,1,1\tv3.656c0,0.552-0.448,1-1,1s-1-0.448-1-1V5.045z M8,13.212c-0.748,0-1.354-0.607-1.354-1.354c0-0.748,0.606-1.354,1.354-1.354\ts1.354,0.606,1.354,1.354C9.354,12.604,8.748,13.212,8,13.212z"/></svg>',arrowLeft16:'<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\x3e\n<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">\n<path fill="#5053A4" d="M13.6,8c0,0.6-0.4,1-1,1h-7l2.2,2.5c0.4,0.4,0.3,1-0.1,1.4c-0.2,0.2-0.4,0.2-0.7,0.2c-0.3,0-0.6-0.1-0.8-0.3\n\tL2.6,8.6c0,0-0.1-0.1-0.1-0.2c0,0-0.1-0.1-0.1-0.1c0-0.1-0.1-0.2-0.1-0.3c0,0,0,0,0,0c0,0,0,0,0,0c0-0.1,0-0.3,0.1-0.4\n\tc0,0,0.1-0.1,0.1-0.1c0-0.1,0.1-0.1,0.1-0.2l3.7-4.1c0.4-0.4,1-0.4,1.4-0.1c0.4,0.4,0.4,1,0.1,1.4L5.6,7h7C13.2,7,13.6,7.4,13.6,8z"\n\t/>\n</svg>\n',arrowRight16:'<?xml version="1.0" encoding="utf-8"?>\n\x3c!-- Generator: Adobe Illustrator 25.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --\x3e\n<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"\n\t viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">\n<path fill="#5053A4" d="M2.4,8.1c0-0.6,0.4-1,1-1h7L8.1,4.5c-0.4-0.4-0.3-1,0.1-1.4c0.2-0.2,0.4-0.2,0.7-0.2c0.3,0,0.6,0.1,0.8,0.3\n\tl3.7,4.2c0,0,0.1,0.1,0.1,0.2c0,0,0.1,0.1,0.1,0.1c0,0.1,0.1,0.2,0.1,0.3c0,0,0,0,0,0c0,0,0,0,0,0c0,0.1,0,0.3-0.1,0.4\n\tc0,0-0.1,0.1-0.1,0.1c0,0.1-0.1,0.1-0.1,0.2l-3.7,4.1c-0.4,0.4-1,0.4-1.4,0.1c-0.4-0.4-0.4-1-0.1-1.4l2.2-2.4h-7\n\tC2.8,9.1,2.4,8.6,2.4,8.1z"/>\n</svg>\n'};var ds=({name:t,size:e="32",className:n,alt:r})=>{const o=`${t}${e}`;return Se(Y,{children:[Se("div",{"aria-hidden":"true",className:n||Xo("icon"),dangerouslySetInnerHTML:{__html:hs[o]}}),r&&Se("span",{className:Xo("visually-hidden"),children:r})]})},vs=n(4198),ys=n.n(vs);const ms={visible:Xo("transition--visible"),in:Xo("transition--in"),visuallyHidden:Xo("visually-hidden")},gs=S()(ms),bs="notRendered",_s="rendered",ws="visuallyHidden";var xs=({children:t,isActive:e,timeout:n,transitionStartState:r="notRendered",onInTransitionComplete:o,onOutTransitionComplete:i})=>{var a;const s=Pt(!1),c=n?ys()(n,10):300,l=ra(o),u=ra(i),p=r===ws,[f,h]=It((()=>p?[ms.visuallyHidden]:[])),d="notRendered"!==r||f.length>0;return jt((()=>{let t=null,n=null;return s.current&&!e&&(h([ms.visible]),t=Ye()((()=>{h([...p?[ms.visuallyHidden]:[]]),u&&(n=requestAnimationFrame((()=>{u()})))}),c)),!s.current&&e&&(h([ms.visible]),n=requestAnimationFrame((()=>{n=requestAnimationFrame((()=>{h([ms.visible,ms.in]),l&&(t=Ye()((()=>{l()}),c))}))}))),s.current=e,()=>{clearTimeout(t),cancelAnimationFrame(n)}}),[e,p,c,l,u]),d&&b()(a=rt(t)).call(a,(t=>{var e;const{className:n=""}=t.props;return function(t,e,n){var r,o,i,a=W({},t.props);for(i in e)"key"==i?r=e[i]:"ref"==i?o=e[i]:a[i]=e[i];return arguments.length>2&&(a.children=arguments.length>3?D.call(arguments,2):n),K(t.type,a,r||t.key,o||t.ref,null)}(t,{className:[...w()(e=n.split(" ")).call(e,(t=>!rn()(gs).call(gs,t))),...f].join(" ")})}))},Ts=({className:t,children:e,onCancel:n,headingText:r,cancelButtonText:o,disableButtonFocusing:i,cancelButtonRef:a,position:s="right"})=>{const c=Pt(null),l=na(),{hideOption:u}=Vi(),{focusButton:p}=qi();return jt((()=>{yn(c.current)}),[]),Se("section",{className:Xo("options",{"options--right":"left"!==s,"options--left":"left"===s},t),"aria-labelledby":l,tabIndex:"-1",ref:c,children:Se("div",{className:Xo("options__body"),children:[Se("h2",{id:l,className:Xo("options__title"),children:r}),Se("button",{type:"button",onClick:()=>{n&&n(),u(),i||p()},"aria-describedby":l,className:Xo("button","options__close"),ref:t=>{a&&(a.current=t)},children:[Se(ds,{name:"close",size:"16"}),Se("span",{children:o})]}),Se("div",{className:Xo("options__wrapper"),children:e})]})})};const{createActions:Es,createReducer:Ss,selectState:ks}=re("forms"),[As,Os]=Es("form",{register:(t,e)=>({formId:t,persistData:e}),deregister:t=>({formId:t})}),[Cs,Is,Ns,js]=Es("control",{register:(t,e)=>({formId:t,name:e}),deregister:(t,e)=>({formId:t,name:e}),updateValue:(t,e,n)=>({formId:t,name:e,value:n}),updateTouched:(t,e,n)=>({formId:t,name:e,touched:n})}),Rs=de(ks,ns("formId"),((t,e)=>t[e])),Ps=de(Rs,(t=>(null==t?void 0:t.controls)||{})),Ls=de(Ps,(t=>{var e;const n={};return T()(e=C()(t)).call(e,(([t,{value:e}])=>{n[t]=e})),n})),Ds=de(Ps,ns("name"),((t,e)=>{var n;return null===(n=t[e])||void 0===n?void 0:n.value})),Us=de(Ps,ns("name"),((t,e)=>{var n;return null===(n=t[e])||void 0===n?void 0:n.touched})),Ms=yt({});var zs=Ms;const{Provider:Fs,Consumer:$s}=Ms;function Bs(){return Ut(zs)}function Hs(t){const e=Fe(),{formId:n,updateControlValue:r,updateControlTouched:o,errors:i}=Bs(),a=!!Be(Rs,{formId:n},[n]),s=Pt();s.current=a;const c=Be(Ds,{formId:n,name:t},[n,t]),l=Be(Us,{formId:n,name:t},[n,t]),u=null==i?void 0:i[t],p=!u;jt((()=>{s.current&&e(Cs(n,t))}),[a,n,t,e]),Rt((()=>()=>{e(Is(n,t))}),[a,n,t,e]);const f=Dt((e=>r(t,e.target.value)),[t,r]),h=Dt((()=>{o(t,!0)}),[o,t]);return[Lt((()=>({name:t,onInput:f,onBlur:h,value:c})),[t,f,h,c]),Lt((()=>({isValid:p,error:u,touched:l})),[p,u,l])]}const Vs=["children","formId","persistData","onError","onSubmit","validationSchema"];function qs(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ws(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=qs(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=qs(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}function Gs(t){let{children:n,formId:r,persistData:o,onError:i,onSubmit:a,validationSchema:s}=t,c=L(t,Vs);const l=Fe(),u=Be(Ls,{formId:r},[r]),[p,f]=It(!1),[h,d]=It({}),{isValid:v,errors:y}=function(t,n){const r=Lt((()=>function(t,n={}){var r;return en()(r=C()(n)).call(r,((n,[r,o])=>{o&&!e()(o)&&(o=[o]);for(let e=0;e<(null===(i=o)||void 0===i?void 0:i.length);e++){var i;if(!o[e].fn(t[r],o[e].compareValue)){n[r]=o[e].errorText;break}}return n}),{})}(t,n)),[t,n]);return{isValid:0===N()(r).length,errors:r}}(u,s),m=Lt((()=>Ws(Ws({},y),h)),[y,h]);Rt((()=>{l(As(r,o))}),[r,o,l]),jt((()=>()=>{l(Os(r))}),[r,o,l]);const g=Dt(((t,e)=>{l(Ns(r,t,e))}),[r,l]),b=Dt(((t,e)=>{l(js(r,t,e))}),[l,r]),_=Dt(((t,e)=>{d((n=>Ws(Ws({},n),{},{[t]:e})))}),[d]),w=Dt((t=>{var e;t.preventDefault();const n="true"===(null===(e=t.submitter)||void 0===e?void 0:e.ariaDisabled);f(!n),!n&&v&&a(u,{updateControlValue:g,setError:_})}),[v,a,u,g,_]);jt((()=>{i&&i({errors:m,isSubmitted:p,isValid:0===N()(m).length})}),[p,m,i]);const x=Lt((()=>({formId:r,values:u,errors:m,isValid:0===N()(m).length,isSubmitted:p,handleSubmit:w,validationSchema:s,updateControlValue:g,updateControlTouched:b})),[r,u,m,p,w,s,g,b]);return r?a?Se(Fs,Ws(Ws({},c),{},{value:x,children:n})):(console.error('"onSubmit" is required.'),null):(console.error('"formId" is required.'),null)}function Ks(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ys(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Ks(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Ks(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Js={},Qs={controls:{}},Zs={value:"",touched:!1};function Xs(t,e,n,r){var o;const i=(null===(o=t[e])||void 0===o?void 0:o.controls[n])||Zs;return Ys(Ys({},t),{},{[e]:Ys(Ys({},t[e]),{},{controls:Ys(Ys({},t[e].controls),{},{[n]:Ys(Ys({},i),r)})})})}var tc=Ss({[As]:(t,{formId:e,persistData:n})=>{const r=n?t[e]??Ys(Ys({},Qs),{},{persistData:n}):Ys(Ys({},Qs),{},{persistData:n});return Ys(Ys({},t),{},{[e]:r})},[Os]:(t,{formId:e})=>{var n;const r=Ys({},t);return null!==(n=r[e])&&void 0!==n&&n.persistData||delete r[e],r},[Cs]:(t,{name:e,formId:n})=>Xs(t,n,e),[Is]:(t,{formId:e,name:n})=>{const r=t[e];if(!r)return t;if(r.persistData)return t;const o=Ys({},r.controls);return delete o[n],Ys(Ys({},t),{},{[e]:Ys(Ys({},r),{},{controls:o})})},[Ns]:(t,{formId:e,name:n,value:r})=>Xs(t,e,n,{value:r}),[js]:(t,{formId:e,name:n,touched:r})=>Xs(t,e,n,{touched:r}),[Bo.pending]:()=>Js},Js);const ec=["className","disableValidationClasses"];function nc(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}var rc=function(t){let{className:e,disableValidationClasses:n}=t,r=L(t,ec);const{handleSubmit:o,isValid:i,isSubmitted:a}=function(){const{handleSubmit:t,isSubmitted:e,isValid:n}=Bs();return{handleSubmit:t,isSubmitted:e,isValid:n}}(),s=["form"];return!n&&a&&(s.push("form--submitted"),i?s.push("form--valid"):s.push("form--invalid")),Se("form",function(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=nc(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=nc(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}({onSubmit:o,className:Xo([...s,e])},r))};function oc({id:t,error:e}){const[n,r]=It(!1);return jt((()=>{const t=Ye()((()=>r(!0)),300);return()=>clearTimeout(t)}),[]),Se("div",{className:Xo("error"),"aria-live":"assertive","aria-atomic":"true",children:n&&e&&Se("span",{id:t,className:Xo("error__message"),children:[Se(ds,{name:"error",size:"16"}),e]})})}var ic=({contentHint:t,id:e,labelText:n,labelClass:r=Xo("label"),validity:o,errorText:i,children:a})=>Se(Y,{children:[Se("label",{htmlFor:e,className:r,children:n}),t&&Se("span",{id:`${e}-content-hint`,className:Xo("input__content-hint"),children:t}),Se(oc,{id:`${e}-error`,error:!o&&i}),a]});const ac=["id","name","labelText","labelClass","contentHint","aria-describedby","options"];function sc(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function cc(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=sc(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=sc(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var lc=t=>{let{id:e,name:n,labelText:r,labelClass:o,contentHint:i,"aria-describedby":a,options:s=[]}=t,c=L(t,ac);const{isSubmitted:l}=Bs(),[u,{error:p}]=Hs(n),f=l&&p,h=[];return a&&h.push(a),i&&h.push(`${e}-content-hint`),f&&h.push(`${e}-error`),Se(ic,{id:e,contentHint:i,validity:!f,errorText:p,labelText:r,labelClass:o,children:Se("select",cc(cc(cc({id:e,name:n,"aria-invalid":f?"true":"false","aria-describedby":h.join(" ")||null},u),c),{},{children:b()(s).call(s,(t=>Se("option",{value:t.value,children:t.label},t.value)))}))})},uc=function({controlName:t,descriptionId:e}){const{t:n}=Oi(),{isActive:r,languages:o,currentLocale:i}=as(),{locale:a}=Oi(),s=Lt((()=>{var t;return null==o||null===(t=Tn()(o).call(o,(t=>t.locale===i)))||void 0===t?void 0:t.nativeName}),[o,i]),c=Lt((()=>{var t;return[{value:"",label:n("translations.settings.defaultOptionLabel")},...b()(t=w()(o).call(o,(t=>t.locale.toLowerCase()!==String(a).toLowerCase()))).call(t,(t=>({value:t.locale,label:t.nativeName})))]}),[n,o,a]);return Se(rc,{noValidate:"true",className:Xo("options__form"),children:[Se("p",{className:Xo("options__description"),id:e,children:n("translations.settings.description")}),r?Se(Y,{children:[Se("h3",{children:n("translations.settings.currentTranslationLabel")}),Se("p",{className:Xo("options__active-language"),children:s})]}):Se(lc,{name:t,type:"text",className:Xo("input__select"),"aria-describedby":e,labelClass:Xo("label"),labelText:n("translations.settings.inputLabel"),options:c,defaultValue:i||""}),Se("div",{className:Xo("options__actions"),children:Se("button",{type:"submit",className:Xo("button","button--primary","options__submit"),children:n(r?"translations.settings.endButtonText":"translations.settings.startButtonText")})})]})};const{REGISTER_FORM:pc,DE_REGISTER_FORM:fc,REGISTER:hc,DE_REGISTER:dc,SET_VALUE:vc,SET_VALIDITY:yc,SET_STATE:mc,SET_SUBMITTED:gc,SET_PERSIST_FORM_DATA:bc}={REGISTER_FORM:"REGISTER_FORM",DE_REGISTER_FORM:"DE_REGISTER_FORM",REGISTER:"REGISTER",DE_REGISTER:"DEREGISTER",SET_VALUE:"SET_VALUE",SET_VALIDITY:"SET_VALIDITY",SET_STATE:"SET_STATE",SET_SUBMITTED:"SET_SUBMITTED",SET_PERSIST_FORM_DATA:"SET_PERSIST_FORM_DATA"},_c=(t,e,n=null)=>({fn:t,errorText:e,compareValue:n}),wc=(t,e)=>{let n=!0;for(let r=0;r<t.length;r++)t[r].size>e&&(n=!1);return n},xc=t=>!(null==t||!t.length)>0,Tc=t=>{const e=t&&ea()(t).call(t);return!(!e||!e.match(/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i))},Ec=t=>!!t,Sc="translation-settings",kc="locale";var Ac=function({onClose:t}){const[e,n]=It(void 0),{t:r}=Oi(),{isActive:o,enableTranslations:i,disableTranslations:a}=as(),s=na(),{focusContainer:c}=cs(),l=Dt((({isValid:t,isSubmitted:e})=>{n(e&&!t?"options--error":void 0)}),[n]),u=Pt(0),p=Lt((()=>(u.current+=1,o?{}:{[kc]:_c(Ec,r("translations.settings.noLocaleText"))})),[o,r]);return Se(Ts,{className:e,onCancel:t,formName:Sc,headingText:r("translations.settings.title"),cancelButtonText:r("translations.settings.cancelButtonText"),position:"left",disableButtonFocusing:!0,children:Se(Gs,{onSubmit:({locale:e})=>{o?a():(i(e),t(),c())},formId:Sc,validationSchema:p,onError:l,children:Se(uc,{controlName:kc,descriptionId:s})},u.current)})};function Oc(){const{t:t}=Oi(),[e,n]=It(!1),r=Pt(null),o=na();return Se("div",{className:Xo("translations__container"),onKeyDown:t=>{e&&vn(t)===dn.Escape&&(n(!1),yn(r.current))},children:[Se(xs,{transitionStartState:bs,isActive:e,children:Se("div",{className:Xo("options__dialog"),role:"dialog",children:Se(Ac,{onClose:()=>{n(!1)}})})}),Se("button",{type:"button",className:Xo(["button","button--secondary","chat__options__button"]),id:o,onClick:()=>{n((t=>!t))},onKeyDown:t=>{vn(t)===dn.ArrowDown&&(n(!0),t.preventDefault())},ref:r,"aria-haspopup":"dialog","aria-expanded":e.toString(),children:[Se(ds,{name:"newTranslation",size:"16"}),Se("span",{className:Xo("button__text"),children:t("translations.settings.openButtonText")})]})]})}function Cc({id:t,label:e,onButtonClick:n,buttonText:r,srButtonText:o,type:i}){const a=na();return Se("section",{className:Xo("chat-status",i&&`chat-status--${i}`),id:t,tabIndex:"-1","aria-labelledby":a,children:[Se("h2",{className:Xo("chat-status__title"),id:a,children:e}),Se("button",{type:"button",className:Xo("button","button--tertiary"),onClick:n,children:[Se("span",{"aria-hidden":o?"true":void 0,children:r}),o&&Se("span",{className:Xo("visually-hidden"),children:o})]})]})}function Ic(){const{t:t}=Oi(),{id:e}=cs(),{hasInterrupt:n}=sa(),{isActive:r,disableTranslations:o,languages:i,currentLocale:a}=as(),s=Ui(),c=Lt((()=>{var t;return null==i||null===(t=Tn()(i).call(i,(t=>t.locale===a)))||void 0===t?void 0:t.nativeName}),[i,a]),l=Dt((()=>{o(),s()}),[o,s]);return!r||n?null:Se(Cc,{type:"translations",id:e,label:t("translations.status.label",{language:c}),onButtonClick:l,buttonText:t("translations.status.stopText"),srButtonText:t("translations.status.srStopText")})}const Nc=t=>`suggestions__item--${String(t).toLowerCase().replace(/[^a-z0-9_\\-]/,"")}`;var jc=({id:t,categories:e=[],question:n,onClick:r,hasIcon:o})=>{const i=Lt((()=>["suggestions-item",...b()(e).call(e,Nc)]),[e]),a=Dt((()=>{r&&r({id:t,question:n})}),[t,n,r]);return Se("li",{className:Xo(i),children:Se("button",{type:"button",onClick:a,className:Xo("button","button--primary"),children:[o&&Se(ds,{name:"chevronRight",size:"8"}),n]})})};function Rc(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}var Pc=({className:t,suggestions:e=[],onClickSuggestion:n,hasIcon:r=!0})=>Se("ul",{className:Xo("suggestions__list",t),children:b()(e).call(e,(t=>Se(jc,function(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Rc(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Rc(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}({hasIcon:r,onClick:n},t),t.id)))}),Lc=({isAside:t})=>{const{layoutMode:e}=He(),{t:n}=Oi(),{sendAction:r,addMessageBubble:o}=Ca(),{isOpen:i,setVisibility:a}=_a(),s=na(),c=Ui(),l=Pt(null),{sendPolite:u}=Na(),{hasInterrupt:p}=sa(),{hasCountdown:f,endCountdown:h}=Ya(),{hasPrompt:d,continueChat:v}=Qa(),y=ba(),m=To("suggestion"),[g]=ss({payload:m}),b=Lt((()=>m&&!p?g:[]),[m,p,g]),_=Pt(null),w=Pt(!1),x=Pt([]),T=!!b.length,E="inline"===e?(y||i)&&!t:y,S=Pt(E),k=T&&!E,A=T?b:x.current;x.current=A;const O=Dt((({id:t,question:e})=>{f&&h(!0),d&&v(),r({type:jn,originMessage:m.id,body:{type:"faqclick",body:{faqId:t,faqQuestion:e}}}),o(e),i||a(ye.open),c()}),[o,v,h,c,f,d,m,r,a,i]);jt((()=>{if(_.current!==b&&!E){if(T){const t=w.current?n("suggestions.srUpdatedText"):n("suggestions.srAvailableText");Ye()((()=>{u(t)}),30)}else w.current&&u(n("suggestions.srUnavailableText"));_.current=b}!S.current&&E?(mn(l.current,c),u(n("suggestions.srUnavailableText"))):!T&&w.current&&mn(l.current,c),w.current=T,S.current=E}),[b,T,E,c,u,n]);const C=n("suggestions.headingText"),I=n("suggestions.footerText");return Se(xs,{isActive:k,transitionStartState:bs,children:Se(C?"section":"div",{className:Xo("suggestions"),"aria-labelledby":C?s:null,ref:l,children:[C&&Se("p",{id:s,className:Xo("suggestions__heading"),children:C}),!!A.length&&Se(Pc,{suggestions:A,onClickSuggestion:O}),I&&!i&&Se("p",{className:Xo("suggestions__footer"),children:I})]})})},Dc=({children:t,className:e=""})=>{const{isOpen:n,isVisible:r,setVisibility:o}=_a(),{namespace:i,layoutMode:a}=He(),{isInline:s}=Eo(),c=si(),l=ba(),{t:u}=Oi(),p=["chat",`chat--layout-${a}`,`namespace--${i}`,...c,e];return n||"app"===a||p.push("chat--collapsed"),l&&p.push("chat--user-responded"),r&&Se("section",{className:Xo(p),onKeyDown:t=>{(t.code&&"Escape"===t.code||27===t.keyCode)&&!s&&n&&o(ye.minimized)},tabIndex:"-1","aria-label":u("chat.srLabel"),children:[Se("div",{className:Xo("chat-wrapper"),children:t}),"inline"===a&&n&&Se(Lc,{isAside:!0})]})},Uc=({originalError:t,title:e,message:n,buttonText:r,action:o,srText:i})=>{const a=Ca(),s=na(),{sendPolite:c}=Na(),l=Ui(),u=t instanceof Lo;return jt((()=>{u&&a[o]()}),[o,a,u]),jt((()=>{!u&&i&&Ye()((()=>{c(i)}),200)}),[c,i,u]),!u&&Se("section",{className:Xo("interrupt"),"aria-labelledby":s,children:Se("div",{className:Xo("interrupt__body"),children:[Se("h2",{id:s,className:Xo("interrupt__title"),children:e}),Se("p",{className:Xo("interrupt__message"),children:n}),r&&o&&Se("div",{className:Xo("interrupt__actions"),children:Se("button",{type:"button",className:Xo("button","button--primary"),onClick:()=>{a[o](),l()},children:r})})]})})},Mc=yt({}),zc=t=>{const e=Ut(Mc);let n=null;"choice_prompt"===t.payload.type&&(n=e[t.type][t.payload.body.prompt.type]);const r=e[t.type][t.payload.type]||e.fallback;return[r&&"function"!=typeof r?r[t.payload.body.type]||e.fallback:r,n]};function Fc(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function $c(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Fc(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Fc(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}function Bc({children:t,childrenHTML:e,className:n,graphicSrc:r,graphicType:o="icon",iconName:i,iconSize:a,iconClassName:s,dividerType:c}){const l=Boolean(i||r),u=e?{dangerouslySetInnerHTML:{__html:e}}:{children:t};return Se("div",{className:Xo("divider",c&&`divider--type-${c}`,n),children:[l&&Se("span",{className:Xo("divider__graphic"),children:i?Se(ds,{name:i,size:a,className:s}):Se("img",{src:r,className:Xo({icon:"icon"===o,avatar:"avatar"===o},s)})}),Se("div",$c({className:Xo("divider__body")},u))]})}const Hc={month:"long",day:"numeric",year:"numeric"},Vc={hour:"numeric",minute:"numeric"};var qc=({event:t})=>{const e=(()=>{const[t,e]=Nt((t=>t+1),0);return Dt((()=>{Ye()((()=>{e()}))}),[])})(),{date:n,time:r,timeUntilMidnight:o,srText:i}=(t=>{var e;const{t:n}=Oi(),r=He(),o=(null==r||null===(e=r.context)||void 0===e?void 0:e.locale)??[],i=new Date(t),a=new Date,s=new Date(a);s.setHours(24,0,0,0);const c=s-a,l=i.toString(),u=new Intl.DateTimeFormat(o,Vc).format(i);let p=((t,e)=>{const n=new Date(e).setHours(0,0,0,0),r=t.getTime(),o=864e5;return r>=n+o?t:r>n?"today":r>n-o?"yesterday":t})(i,a);switch(p){case"today":p=n("dateTime.today");break;case"yesterday":p=n("dateTime.yesterday");break;default:p=new Intl.DateTimeFormat(o,Hc).format(i)}return{date:p,srText:n("dateTime.srText",{date:p,time:u}),time:u,fullDateTime:l,timeUntilMidnight:c}})(cn(t.timeIndicator));return jt((()=>{const t=Ye()((()=>{e()}),o);return()=>{clearTimeout(t)}}),[e,o]),Se(Bc,{dividerType:"time-indicator",children:[Se("p",{className:Xo("divider__time"),"aria-hidden":"true",children:[Se("span",{children:n}),Se("span",{children:r})]}),Se("p",{className:Xo("visually-hidden"),children:i})]})},Wc=({event:t,newParticipant:e})=>{const[n,r]=zc(t);if(!n)return null;const o=["conversation__item"];return"info"===t.type?o.push("conversation__item--source-info"):t.payload.fromClient?o.push("conversation__item--source-user"):o.push("conversation__item--source-agent"),e&&o.push("conversation__item--new-participant"),Se("li",{className:Xo(o),children:[t.timeIndicator&&Se(qc,{event:t}),Se(n,{event:t,children:Se(r,{event:t})})]})},Gc=({eventPayload:t})=>{const{t:e}=Oi(),{fromClient:n,participant:r}=t,o=(t=>ho().participantInfo.participants[t])(r)||{},{messages:i}=He(),a=n?e("participants.user.name"):o&&o.name,{showAvatar:s,showName:c}=i[n?"user":"agent"]||{};if(!s&&!c)return null;const l=[];return s&&a&&o.avatar&&l.push(Se("span",{className:Xo("message__avatar"),children:Se("img",{src:o.avatar,className:Xo("avatar"),alt:""})})),c&&l.push(Se("span",{className:Xo("message__author-name"),children:a})),l.length>0&&Se("div",{className:Xo("message__author"),children:l})},Kc=()=>{const{id:t}=xo()||{};return Se("li",{className:Xo("conversation__item","conversation__item--source-agent"),children:Se("div",{className:Xo("message","message--source-agent","message--type-loading"),children:[Se(Gc,{eventPayload:{fromClient:!1,participant:t}}),Se("div",{className:Xo("message__body"),children:Se("span",{className:Xo("loader"),children:[Se("span",{className:Xo("loader__part","one")}),Se("span",{className:Xo("loader__part","two")}),Se("span",{className:Xo("loader__part","three")}),Se("span",{className:Xo("loader__part","four")})]})})]})})};const Yc=["showParticipant","showTranslationToggle","event","type","modifiers","children","bodyProps","info"];function Jc(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Qc(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Jc(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Jc(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var Zc=function(t){let{showParticipant:e=!0,showTranslationToggle:n=!0,event:r,type:o,modifiers:i,children:a,bodyProps:s={},info:c}=t,l=L(t,Yc);const u=ci(r),{t:p}=Oi(),[,{hasTranslation:f,isTranslated:h,toggleTranslation:d,locale:v}]=ss(r);var y;(o&&u.push("message--type-"+o),i)&&("string"==typeof i&&(i=w()(y=i.split(" ")).call(y,(t=>t.length))),T()(i).call(i,(t=>{u.push("message--"+t)})));return h&&u.push("message--is-translated"),f&&u.push("message--has-translation"),h&&(s=Qc(Qc({},s),{},{lang:v})),Se(Y,{children:Se("div",Qc(Qc({className:Xo(u)},l),{},{children:[e&&Se(Gc,{eventPayload:r.payload}),Se("div",Qc(Qc({className:Xo("message__body")},s),{},{children:a})),c&&Se("div",{"aria-hidden":"true",className:Xo("message__info"),children:c}),n&&f&&Se("div",{className:Xo("message__translation-info"),children:Se("button",{className:Xo("message__translation-toggle","button","button--secondary"),onClick:d,children:p(h?"translations.toggle.hideButtonText":"translations.toggle.showButtonText")})})]}))})};const Xc=["event","children"];function tl(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function el(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=tl(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=tl(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const nl=t=>{const{payload:e}=t,[n,r]=It(!1),{sendAction:o,addMessageBubble:i,addDivider:a}=Ca(),{activeServiceSessionId:s}=ho().serviceInfo,c=$e(wo),[l]=ss(t),{service:u}=e,p=Lt((()=>{var e;return el(el({},t),{},{payload:el(el({},t.payload),{},{body:null===(e=t.payload.body)||void 0===e?void 0:e.prompt,translatedBody:t.payload.translatedBody&&el(el({},t.payload.translatedBody),{},{data:t.payload.translatedBody.data.prompt})})})}),[t]),f=l.chooseAgain&&s===u.serviceSessionId&&e.id!==c;return jt((()=>{r(e.id===c)}),[e,c]),{body:l,subEvent:p,showOptions:n,chooseAgain:f,onChoiceClickHandler:t=>{f&&a("new_topic"),i(t.text),o({type:"pick_choice",originMessage:e.id,choice:{id:t.id,text:t.text,chooseAgain:f}}),r(!1)},onChooseAgainClickHandler:()=>{r((t=>!t))}}};let rl={baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1};const ol=/[&<>"']/,il=/[&<>"']/g,al=/[<>"']|&(?!#?\w+;)/,sl=/[<>"']|&(?!#?\w+;)/g,cl={"&":"&","<":"<",">":">",'"':""","'":"'"},ll=t=>cl[t];function ul(t,e){if(e){if(ol.test(t))return t.replace(il,ll)}else if(al.test(t))return t.replace(sl,ll);return t}const pl=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function fl(t){return t.replace(pl,((t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):""))}const hl=/(^|[^\[])\^/g;function dl(t,e){t=t.source||t,e=e||"";const n={replace:(e,r)=>(r=(r=r.source||r).replace(hl,"$1"),t=t.replace(e,r),n),getRegex:()=>new RegExp(t,e)};return n}const vl=/[^\w:]/g,yl=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function ml(t,e,n){if(t){let t;try{t=decodeURIComponent(fl(n)).replace(vl,"").toLowerCase()}catch(t){return null}if(0===t.indexOf("javascript:")||0===t.indexOf("vbscript:")||0===t.indexOf("data:"))return null}e&&!yl.test(n)&&(n=function(t,e){gl[" "+t]||(bl.test(t)?gl[" "+t]=t+"/":gl[" "+t]=Sl(t,"/",!0));const n=-1===(t=gl[" "+t]).indexOf(":");return"//"===e.substring(0,2)?n?e:t.replace(_l,"$1")+e:"/"===e.charAt(0)?n?e:t.replace(wl,"$1")+e:t+e}(e,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(t){return null}return n}const gl={},bl=/^[^:]+:\/*[^/]*$/,_l=/^([^:]+:)[\s\S]*$/,wl=/^([^:]+:\/*[^/]*)[\s\S]*$/,xl={exec:function(){}};function Tl(t){let e,n,r=1;for(;r<arguments.length;r++)for(n in e=arguments[r],e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function El(t,e){const n=t.replace(/\|/g,((t,e,n)=>{let r=!1,o=e;for(;--o>=0&&"\\"===n[o];)r=!r;return r?"|":" |"})).split(/ \|/);let r=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),n.length>e)n.splice(e);else for(;n.length<e;)n.push("");for(;r<n.length;r++)n[r]=n[r].trim().replace(/\\\|/g,"|");return n}function Sl(t,e,n){const r=t.length;if(0===r)return"";let o=0;for(;o<r;){const i=t.charAt(r-o-1);if(i!==e||n){if(i===e||!n)break;o++}else o++}return t.substr(0,r-o)}function kl(t){t&&t.sanitize&&!t.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Al(t,e){if(e<1)return"";let n="";for(;e>1;)1&e&&(n+=t),e>>=1,t+=t;return n+t}function Ol(t,e,n,r){const o=e.href,i=e.title?ul(e.title):null,a=t[1].replace(/\\([\[\]])/g,"$1");if("!"!==t[0].charAt(0)){r.state.inLink=!0;const t={type:"link",raw:n,href:o,title:i,text:a,tokens:r.inlineTokens(a,[])};return r.state.inLink=!1,t}return{type:"image",raw:n,href:o,title:i,text:ul(a)}}class Cl{constructor(t){this.options=t||rl}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const t=e[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:Sl(t,"\n")}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const t=e[0],n=function(t,e){const n=t.match(/^(\s+)(?:```)/);if(null===n)return e;const r=n[1];return e.split("\n").map((t=>{const e=t.match(/^\s+/);if(null===e)return t;const[n]=e;return n.length>=r.length?t.slice(r.length):t})).join("\n")}(t,e[3]||"");return{type:"code",raw:t,lang:e[2]?e[2].trim():e[2],text:n}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(/#$/.test(t)){const e=Sl(t,"#");this.options.pedantic?t=e.trim():e&&!/ $/.test(e)||(t=e.trim())}const n={type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:[]};return this.lexer.inline(n.text,n.tokens),n}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:e[0]}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){const t=e[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:e[0],tokens:this.lexer.blockTokens(t,[]),text:t}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n,r,o,i,a,s,c,l,u,p,f,h,d=e[1].trim();const v=d.length>1,y={type:"list",raw:"",ordered:v,start:v?+d.slice(0,-1):"",loose:!1,items:[]};d=v?`\\d{1,9}\\${d.slice(-1)}`:`\\${d}`,this.options.pedantic&&(d=v?d:"[*+-]");const m=new RegExp(`^( {0,3}${d})((?: [^\\n]*)?(?:\\n|$))`);for(;t&&(h=!1,e=m.exec(t))&&!this.rules.block.hr.test(t);){if(n=e[0],t=t.substring(n.length),l=e[2].split("\n",1)[0],u=t.split("\n",1)[0],this.options.pedantic?(i=2,f=l.trimLeft()):(i=e[2].search(/[^ ]/),i=i>4?1:i,f=l.slice(i),i+=e[1].length),s=!1,!l&&/^ *$/.test(u)&&(n+=u+"\n",t=t.substring(u.length+1),h=!0),!h){const e=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;t&&(p=t.split("\n",1)[0],l=p,this.options.pedantic&&(l=l.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!e.test(l));){if(l.search(/[^ ]/)>=i||!l.trim())f+="\n"+l.slice(i);else{if(s)break;f+="\n"+l}s||l.trim()||(s=!0),n+=p+"\n",t=t.substring(p.length+1)}}y.loose||(c?y.loose=!0:/\n *\n *$/.test(n)&&(c=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(f),r&&(o="[ ] "!==r[0],f=f.replace(/^\[[ xX]\] +/,""))),y.items.push({type:"list_item",raw:n,task:!!r,checked:o,loose:!1,text:f}),y.raw+=n}y.items[y.items.length-1].raw=n.trimRight(),y.items[y.items.length-1].text=f.trimRight(),y.raw=y.raw.trimRight();const g=y.items.length;for(a=0;a<g;a++){this.lexer.state.top=!1,y.items[a].tokens=this.lexer.blockTokens(y.items[a].text,[]);const t=y.items[a].tokens.filter((t=>"space"===t.type)),e=t.every((t=>{const e=t.raw.split("");let n=0;for(const t of e)if("\n"===t&&(n+=1),n>1)return!0;return!1}));!y.loose&&t.length&&e&&(y.loose=!0,y.items[a].loose=!0)}return y}}html(t){const e=this.rules.block.html.exec(t);if(e){const t={type:"html",raw:e[0],pre:!this.options.sanitizer&&("pre"===e[1]||"script"===e[1]||"style"===e[1]),text:e[0]};return this.options.sanitize&&(t.type="paragraph",t.text=this.options.sanitizer?this.options.sanitizer(e[0]):ul(e[0]),t.tokens=[],this.lexer.inline(t.text,t.tokens)),t}}def(t){const e=this.rules.block.def.exec(t);if(e)return e[3]&&(e[3]=e[3].substring(1,e[3].length-1)),{type:"def",tag:e[1].toLowerCase().replace(/\s+/g," "),raw:e[0],href:e[2],title:e[3]}}table(t){const e=this.rules.block.table.exec(t);if(e){const t={type:"table",header:El(e[1]).map((t=>({text:t}))),align:e[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:e[3]&&e[3].trim()?e[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(t.header.length===t.align.length){t.raw=e[0];let n,r,o,i,a=t.align.length;for(n=0;n<a;n++)/^ *-+: *$/.test(t.align[n])?t.align[n]="right":/^ *:-+: *$/.test(t.align[n])?t.align[n]="center":/^ *:-+ *$/.test(t.align[n])?t.align[n]="left":t.align[n]=null;for(a=t.rows.length,n=0;n<a;n++)t.rows[n]=El(t.rows[n],t.header.length).map((t=>({text:t})));for(a=t.header.length,r=0;r<a;r++)t.header[r].tokens=[],this.lexer.inlineTokens(t.header[r].text,t.header[r].tokens);for(a=t.rows.length,r=0;r<a;r++)for(i=t.rows[r],o=0;o<i.length;o++)i[o].tokens=[],this.lexer.inlineTokens(i[o].text,i[o].tokens);return t}}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e){const t={type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:[]};return this.lexer.inline(t.text,t.tokens),t}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const t={type:"paragraph",raw:e[0],text:"\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1],tokens:[]};return this.lexer.inline(t.text,t.tokens),t}}text(t){const e=this.rules.block.text.exec(t);if(e){const t={type:"text",raw:e[0],text:e[0],tokens:[]};return this.lexer.inline(t.text,t.tokens),t}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:ul(e[1])}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&/^<a /i.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(e[0]):ul(e[0]):e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const t=e[2].trim();if(!this.options.pedantic&&/^</.test(t)){if(!/>$/.test(t))return;const e=Sl(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{const t=function(t,e){if(-1===t.indexOf(e[1]))return-1;const n=t.length;let r=0,o=0;for(;o<n;o++)if("\\"===t[o])o++;else if(t[o]===e[0])r++;else if(t[o]===e[1]&&(r--,r<0))return o;return-1}(e[2],"()");if(t>-1){const n=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,n).trim(),e[3]=""}}let n=e[2],r="";if(this.options.pedantic){const t=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);t&&(n=t[1],r=t[3])}else r=e[3]?e[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(n=this.options.pedantic&&!/>$/.test(t)?n.slice(1):n.slice(1,-1)),Ol(e,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},e[0],this.lexer)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let t=(n[2]||n[1]).replace(/\s+/g," ");if(t=e[t.toLowerCase()],!t||!t.href){const t=n[0].charAt(0);return{type:"text",raw:t,text:t}}return Ol(n,t,n[0],this.lexer)}}emStrong(t,e,n=""){let r=this.rules.inline.emStrong.lDelim.exec(t);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const o=r[1]||r[2]||"";if(!o||o&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let o,i,a=n,s=0;const c="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(c.lastIndex=0,e=e.slice(-1*t.length+n);null!=(r=c.exec(e));){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(i=o.length,r[3]||r[4]){a+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){s+=i;continue}if(a-=i,a>0)continue;if(i=Math.min(i,i+a+s),Math.min(n,i)%2){const e=t.slice(1,n+r.index+i);return{type:"em",raw:t.slice(0,n+r.index+i+1),text:e,tokens:this.lexer.inlineTokens(e,[])}}const e=t.slice(2,n+r.index+i-1);return{type:"strong",raw:t.slice(0,n+r.index+i+1),text:e,tokens:this.lexer.inlineTokens(e,[])}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(/\n/g," ");const n=/[^ ]/.test(t),r=/^ /.test(t)&&/ $/.test(t);return n&&r&&(t=t.substring(1,t.length-1)),t=ul(t,!0),{type:"codespan",raw:e[0],text:t}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2],[])}}autolink(t,e){const n=this.rules.inline.autolink.exec(t);if(n){let t,r;return"@"===n[2]?(t=ul(this.options.mangle?e(n[1]):n[1]),r="mailto:"+t):(t=ul(n[1]),r=t),{type:"link",raw:n[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t,e){let n;if(n=this.rules.inline.url.exec(t)){let t,r;if("@"===n[2])t=ul(this.options.mangle?e(n[0]):n[0]),r="mailto:"+t;else{let e;do{e=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(e!==n[0]);t=ul(n[0]),r="www."===n[1]?"http://"+t:t}return{type:"link",raw:n[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t,e){const n=this.rules.inline.text.exec(t);if(n){let t;return t=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):ul(n[0]):n[0]:ul(this.options.smartypants?e(n[0]):n[0]),{type:"text",raw:n[0],text:t}}}}const Il={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:xl,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};Il.def=dl(Il.def).replace("label",Il._label).replace("title",Il._title).getRegex(),Il.bullet=/(?:[*+-]|\d{1,9}[.)])/,Il.listItemStart=dl(/^( *)(bull) */).replace("bull",Il.bullet).getRegex(),Il.list=dl(Il.list).replace(/bull/g,Il.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Il.def.source+")").getRegex(),Il._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Il._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Il.html=dl(Il.html,"i").replace("comment",Il._comment).replace("tag",Il._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Il.paragraph=dl(Il._paragraph).replace("hr",Il.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Il._tag).getRegex(),Il.blockquote=dl(Il.blockquote).replace("paragraph",Il.paragraph).getRegex(),Il.normal=Tl({},Il),Il.gfm=Tl({},Il.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Il.gfm.table=dl(Il.gfm.table).replace("hr",Il.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Il._tag).getRegex(),Il.gfm.paragraph=dl(Il._paragraph).replace("hr",Il.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",Il.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Il._tag).getRegex(),Il.pedantic=Tl({},Il.normal,{html:dl("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",Il._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:xl,paragraph:dl(Il.normal._paragraph).replace("hr",Il.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",Il.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const Nl={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:xl,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:xl,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};function jl(t){return t.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…")}function Rl(t){let e,n,r="";const o=t.length;for(e=0;e<o;e++)n=t.charCodeAt(e),Math.random()>.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}Nl._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Nl.punctuation=dl(Nl.punctuation).replace(/punctuation/g,Nl._punctuation).getRegex(),Nl.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Nl.escapedEmSt=/\\\*|\\_/g,Nl._comment=dl(Il._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),Nl.emStrong.lDelim=dl(Nl.emStrong.lDelim).replace(/punct/g,Nl._punctuation).getRegex(),Nl.emStrong.rDelimAst=dl(Nl.emStrong.rDelimAst,"g").replace(/punct/g,Nl._punctuation).getRegex(),Nl.emStrong.rDelimUnd=dl(Nl.emStrong.rDelimUnd,"g").replace(/punct/g,Nl._punctuation).getRegex(),Nl._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Nl._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Nl._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,Nl.autolink=dl(Nl.autolink).replace("scheme",Nl._scheme).replace("email",Nl._email).getRegex(),Nl._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Nl.tag=dl(Nl.tag).replace("comment",Nl._comment).replace("attribute",Nl._attribute).getRegex(),Nl._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Nl._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Nl._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Nl.link=dl(Nl.link).replace("label",Nl._label).replace("href",Nl._href).replace("title",Nl._title).getRegex(),Nl.reflink=dl(Nl.reflink).replace("label",Nl._label).replace("ref",Il._label).getRegex(),Nl.nolink=dl(Nl.nolink).replace("ref",Il._label).getRegex(),Nl.reflinkSearch=dl(Nl.reflinkSearch,"g").replace("reflink",Nl.reflink).replace("nolink",Nl.nolink).getRegex(),Nl.normal=Tl({},Nl),Nl.pedantic=Tl({},Nl.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:dl(/^!?\[(label)\]\((.*?)\)/).replace("label",Nl._label).getRegex(),reflink:dl(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Nl._label).getRegex()}),Nl.gfm=Tl({},Nl.normal,{escape:dl(Nl.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Nl.gfm.url=dl(Nl.gfm.url,"i").replace("email",Nl.gfm._extended_email).getRegex(),Nl.breaks=Tl({},Nl.gfm,{br:dl(Nl.br).replace("{2,}","*").getRegex(),text:dl(Nl.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});class Pl{constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||rl,this.options.tokenizer=this.options.tokenizer||new Cl,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const e={block:Il.normal,inline:Nl.normal};this.options.pedantic?(e.block=Il.pedantic,e.inline=Nl.pedantic):this.options.gfm&&(e.block=Il.gfm,this.options.breaks?e.inline=Nl.breaks:e.inline=Nl.gfm),this.tokenizer.rules=e}static get rules(){return{block:Il,inline:Nl}}static lex(t,e){return new Pl(e).lex(t)}static lexInline(t,e){return new Pl(e).inlineTokens(t)}lex(t){let e;for(t=t.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(t,this.tokens);e=this.inlineQueue.shift();)this.inlineTokens(e.src,e.tokens);return this.tokens}blockTokens(t,e=[]){let n,r,o,i;for(this.options.pedantic&&(t=t.replace(/^ +$/gm,""));t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))))if(n=this.tokenizer.space(t))t=t.substring(n.raw.length),1===n.raw.length&&e.length>0?e[e.length-1].raw+="\n":e.push(n);else if(n=this.tokenizer.code(t))t=t.substring(n.raw.length),r=e[e.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?e.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.heading(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.hr(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.blockquote(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.list(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.html(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.def(t))t=t.substring(n.raw.length),r=e[e.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.lheading(t))t=t.substring(n.raw.length),e.push(n);else{if(o=t,this.options.extensions&&this.options.extensions.startBlock){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startBlock.forEach((function(t){r=t.call({lexer:this},n),"number"==typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(o=t.substring(0,e+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o)))r=e[e.length-1],i&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):e.push(n),i=o.length!==t.length,t=t.substring(n.raw.length);else if(n=this.tokenizer.text(t))t=t.substring(n.raw.length),r=e[e.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):e.push(n);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e){this.inlineQueue.push({src:t,tokens:e})}inlineTokens(t,e=[]){let n,r,o,i,a,s,c=t;if(this.tokens.links){const t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(c));)t.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,i.index)+"["+Al("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(i=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,i.index)+"["+Al("a",i[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,i.index)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;t;)if(a||(s=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},t,e))&&(t=t.substring(n.raw.length),e.push(n),!0)))))if(n=this.tokenizer.escape(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.tag(t))t=t.substring(n.raw.length),r=e[e.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(n=this.tokenizer.link(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.reflink(t,this.tokens.links))t=t.substring(n.raw.length),r=e[e.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(n=this.tokenizer.emStrong(t,c,s))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.codespan(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.br(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.del(t))t=t.substring(n.raw.length),e.push(n);else if(n=this.tokenizer.autolink(t,Rl))t=t.substring(n.raw.length),e.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(t,Rl))){if(o=t,this.options.extensions&&this.options.extensions.startInline){let e=1/0;const n=t.slice(1);let r;this.options.extensions.startInline.forEach((function(t){r=t.call({lexer:this},n),"number"==typeof r&&r>=0&&(e=Math.min(e,r))})),e<1/0&&e>=0&&(o=t.substring(0,e+1))}if(n=this.tokenizer.inlineText(o,jl))t=t.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),a=!0,r=e[e.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):e.push(n);else if(t){const e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}else t=t.substring(n.raw.length),e.push(n);return e}}class Ll{constructor(t){this.options=t||rl}code(t,e,n){const r=(e||"").match(/\S*/)[0];if(this.options.highlight){const e=this.options.highlight(t,r);null!=e&&e!==t&&(n=!0,t=e)}return t=t.replace(/\n$/,"")+"\n",r?'<pre><code class="'+this.options.langPrefix+ul(r,!0)+'">'+(n?t:ul(t,!0))+"</code></pre>\n":"<pre><code>"+(n?t:ul(t,!0))+"</code></pre>\n"}blockquote(t){return"<blockquote>\n"+t+"</blockquote>\n"}html(t){return t}heading(t,e,n,r){return this.options.headerIds?"<h"+e+' id="'+this.options.headerPrefix+r.slug(n)+'">'+t+"</h"+e+">\n":"<h"+e+">"+t+"</h"+e+">\n"}hr(){return this.options.xhtml?"<hr/>\n":"<hr>\n"}list(t,e,n){const r=e?"ol":"ul";return"<"+r+(e&&1!==n?' start="'+n+'"':"")+">\n"+t+"</"+r+">\n"}listitem(t){return"<li>"+t+"</li>\n"}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(t){return"<p>"+t+"</p>\n"}table(t,e){return e&&(e="<tbody>"+e+"</tbody>"),"<table>\n<thead>\n"+t+"</thead>\n"+e+"</table>\n"}tablerow(t){return"<tr>\n"+t+"</tr>\n"}tablecell(t,e){const n=e.header?"th":"td";return(e.align?"<"+n+' align="'+e.align+'">':"<"+n+">")+t+"</"+n+">\n"}strong(t){return"<strong>"+t+"</strong>"}em(t){return"<em>"+t+"</em>"}codespan(t){return"<code>"+t+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(t){return"<del>"+t+"</del>"}link(t,e,n){if(null===(t=ml(this.options.sanitize,this.options.baseUrl,t)))return n;let r='<a href="'+ul(t)+'"';return e&&(r+=' title="'+e+'"'),r+=">"+n+"</a>",r}image(t,e,n){if(null===(t=ml(this.options.sanitize,this.options.baseUrl,t)))return n;let r='<img src="'+t+'" alt="'+n+'"';return e&&(r+=' title="'+e+'"'),r+=this.options.xhtml?"/>":">",r}text(t){return t}}class Dl{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,e,n){return""+n}image(t,e,n){return""+n}br(){return""}}class Ul{constructor(){this.seen={}}serialize(t){return t.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(t,e){let n=t,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[t];do{r++,n=t+"-"+r}while(this.seen.hasOwnProperty(n))}return e||(this.seen[t]=r,this.seen[n]=0),n}slug(t,e={}){const n=this.serialize(t);return this.getNextSafeSlug(n,e.dryrun)}}class Ml{constructor(t){this.options=t||rl,this.options.renderer=this.options.renderer||new Ll,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Dl,this.slugger=new Ul}static parse(t,e){return new Ml(e).parse(t)}static parseInline(t,e){return new Ml(e).parseInline(t)}parse(t,e=!0){let n,r,o,i,a,s,c,l,u,p,f,h,d,v,y,m,g,b,_,w="";const x=t.length;for(n=0;n<x;n++)if(p=t[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[p.type]&&(_=this.options.extensions.renderers[p.type].call({parser:this},p),!1!==_||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(p.type)))w+=_||"";else switch(p.type){case"space":continue;case"hr":w+=this.renderer.hr();continue;case"heading":w+=this.renderer.heading(this.parseInline(p.tokens),p.depth,fl(this.parseInline(p.tokens,this.textRenderer)),this.slugger);continue;case"code":w+=this.renderer.code(p.text,p.lang,p.escaped);continue;case"table":for(l="",c="",i=p.header.length,r=0;r<i;r++)c+=this.renderer.tablecell(this.parseInline(p.header[r].tokens),{header:!0,align:p.align[r]});for(l+=this.renderer.tablerow(c),u="",i=p.rows.length,r=0;r<i;r++){for(s=p.rows[r],c="",a=s.length,o=0;o<a;o++)c+=this.renderer.tablecell(this.parseInline(s[o].tokens),{header:!1,align:p.align[o]});u+=this.renderer.tablerow(c)}w+=this.renderer.table(l,u);continue;case"blockquote":u=this.parse(p.tokens),w+=this.renderer.blockquote(u);continue;case"list":for(f=p.ordered,h=p.start,d=p.loose,i=p.items.length,u="",r=0;r<i;r++)y=p.items[r],m=y.checked,g=y.task,v="",y.task&&(b=this.renderer.checkbox(m),d?y.tokens.length>0&&"paragraph"===y.tokens[0].type?(y.tokens[0].text=b+" "+y.tokens[0].text,y.tokens[0].tokens&&y.tokens[0].tokens.length>0&&"text"===y.tokens[0].tokens[0].type&&(y.tokens[0].tokens[0].text=b+" "+y.tokens[0].tokens[0].text)):y.tokens.unshift({type:"text",text:b}):v+=b),v+=this.parse(y.tokens,d),u+=this.renderer.listitem(v,g,m);w+=this.renderer.list(u,f,h);continue;case"html":w+=this.renderer.html(p.text);continue;case"paragraph":w+=this.renderer.paragraph(this.parseInline(p.tokens));continue;case"text":for(u=p.tokens?this.parseInline(p.tokens):p.text;n+1<x&&"text"===t[n+1].type;)p=t[++n],u+="\n"+(p.tokens?this.parseInline(p.tokens):p.text);w+=e?this.renderer.paragraph(u):u;continue;default:{const t='Token with "'+p.type+'" type was not found.';if(this.options.silent)return void console.error(t);throw new Error(t)}}return w}parseInline(t,e){e=e||this.renderer;let n,r,o,i="";const a=t.length;for(n=0;n<a;n++)if(r=t[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[r.type]&&(o=this.options.extensions.renderers[r.type].call({parser:this},r),!1!==o||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(r.type)))i+=o||"";else switch(r.type){case"escape":i+=e.text(r.text);break;case"html":i+=e.html(r.text);break;case"link":i+=e.link(r.href,r.title,this.parseInline(r.tokens,e));break;case"image":i+=e.image(r.href,r.title,r.text);break;case"strong":i+=e.strong(this.parseInline(r.tokens,e));break;case"em":i+=e.em(this.parseInline(r.tokens,e));break;case"codespan":i+=e.codespan(r.text);break;case"br":i+=e.br();break;case"del":i+=e.del(this.parseInline(r.tokens,e));break;case"text":i+=e.text(r.text);break;default:{const t='Token with "'+r.type+'" type was not found.';if(this.options.silent)return void console.error(t);throw new Error(t)}}return i}}function zl(t,e,n){if(null==t)throw new Error("marked(): input parameter is undefined or null");if("string"!=typeof t)throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");if("function"==typeof e&&(n=e,e=null),kl(e=Tl({},zl.defaults,e||{})),n){const r=e.highlight;let o;try{o=Pl.lex(t,e)}catch(t){return n(t)}const i=function(t){let i;if(!t)try{e.walkTokens&&zl.walkTokens(o,e.walkTokens),i=Ml.parse(o,e)}catch(e){t=e}return e.highlight=r,t?n(t):n(null,i)};if(!r||r.length<3)return i();if(delete e.highlight,!o.length)return i();let a=0;return zl.walkTokens(o,(function(t){"code"===t.type&&(a++,setTimeout((()=>{r(t.text,t.lang,(function(e,n){if(e)return i(e);null!=n&&n!==t.text&&(t.text=n,t.escaped=!0),a--,0===a&&i()}))}),0))})),void(0===a&&i())}try{const n=Pl.lex(t,e);return e.walkTokens&&zl.walkTokens(n,e.walkTokens),Ml.parse(n,e)}catch(t){if(t.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"<p>An error occurred:</p><pre>"+ul(t.message+"",!0)+"</pre>";throw t}}zl.options=zl.setOptions=function(t){var e;return Tl(zl.defaults,t),e=zl.defaults,rl=e,zl},zl.getDefaults=function(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}},zl.defaults=rl,zl.use=function(...t){const e=Tl({},...t),n=zl.defaults.extensions||{renderers:{},childTokens:{}};let r;t.forEach((t=>{if(t.extensions&&(r=!0,t.extensions.forEach((t=>{if(!t.name)throw new Error("extension name required");if(t.renderer){const e=n.renderers?n.renderers[t.name]:null;n.renderers[t.name]=e?function(...n){let r=t.renderer.apply(this,n);return!1===r&&(r=e.apply(this,n)),r}:t.renderer}if(t.tokenizer){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");n[t.level]?n[t.level].unshift(t.tokenizer):n[t.level]=[t.tokenizer],t.start&&("block"===t.level?n.startBlock?n.startBlock.push(t.start):n.startBlock=[t.start]:"inline"===t.level&&(n.startInline?n.startInline.push(t.start):n.startInline=[t.start]))}t.childTokens&&(n.childTokens[t.name]=t.childTokens)}))),t.renderer){const n=zl.defaults.renderer||new Ll;for(const e in t.renderer){const r=n[e];n[e]=(...o)=>{let i=t.renderer[e].apply(n,o);return!1===i&&(i=r.apply(n,o)),i}}e.renderer=n}if(t.tokenizer){const n=zl.defaults.tokenizer||new Cl;for(const e in t.tokenizer){const r=n[e];n[e]=(...o)=>{let i=t.tokenizer[e].apply(n,o);return!1===i&&(i=r.apply(n,o)),i}}e.tokenizer=n}if(t.walkTokens){const n=zl.defaults.walkTokens;e.walkTokens=function(e){t.walkTokens.call(this,e),n&&n.call(this,e)}}r&&(e.extensions=n),zl.setOptions(e)}))},zl.walkTokens=function(t,e){for(const n of t)switch(e.call(zl,n),n.type){case"table":for(const t of n.header)zl.walkTokens(t.tokens,e);for(const t of n.rows)for(const n of t)zl.walkTokens(n.tokens,e);break;case"list":zl.walkTokens(n.items,e);break;default:zl.defaults.extensions&&zl.defaults.extensions.childTokens&&zl.defaults.extensions.childTokens[n.type]?zl.defaults.extensions.childTokens[n.type].forEach((function(t){zl.walkTokens(n[t],e)})):n.tokens&&zl.walkTokens(n.tokens,e)}},zl.parseInline=function(t,e){if(null==t)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!=typeof t)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected");kl(e=Tl({},zl.defaults,e||{}));try{const n=Pl.lexInline(t,e);return e.walkTokens&&zl.walkTokens(n,e.walkTokens),Ml.parseInline(n,e)}catch(t){if(t.message+="\nPlease report this to https://github.com/markedjs/marked.",e.silent)return"<p>An error occurred:</p><pre>"+ul(t.message+"",!0)+"</pre>";throw t}},zl.Parser=Ml,zl.parser=Ml.parse,zl.Renderer=Ll,zl.TextRenderer=Dl,zl.Lexer=Pl,zl.lexer=Pl.lex,zl.Tokenizer=Cl,zl.Slugger=Ul,zl.parse=zl,zl.options,zl.setOptions,zl.use,zl.walkTokens,zl.parseInline,Ml.parse,Pl.lex;var Fl=t=>{try{return zl(t)}catch(e){return console.log("Could not parse message",t,e),""}},$l=t=>{const{sendAction:e}=Ca();return n=>{n.target&&n.target.dataset.linkId&&e({type:"navigate",originMessage:t,link:{id:n.target.dataset.linkId,url:n.target.getAttribute("href")}})}},Bl=Object.prototype.toString,Hl=Array.isArray||function(t){return"[object Array]"===Bl.call(t)};function Vl(t){return"function"==typeof t}function ql(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Wl(t,e){return null!=t&&"object"==typeof t&&e in t}var Gl=RegExp.prototype.test,Kl=/\S/;var Yl={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="},Jl=/\s*/,Ql=/\s+/,Zl=/\s*=/,Xl=/\s*\}/,tu=/#|\^|\/|>|\{|&|=|!/;function eu(t){this.string=t,this.tail=t,this.pos=0}function nu(t,e){this.view=t,this.cache={".":this.view},this.parent=e}function ru(){this.templateCache={_cache:{},set:function(t,e){this._cache[t]=e},get:function(t){return this._cache[t]},clear:function(){this._cache={}}}}eu.prototype.eos=function(){return""===this.tail},eu.prototype.scan=function(t){var e=this.tail.match(t);if(!e||0!==e.index)return"";var n=e[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},eu.prototype.scanUntil=function(t){var e,n=this.tail.search(t);switch(n){case-1:e=this.tail,this.tail="";break;case 0:e="";break;default:e=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=e.length,e},nu.prototype.push=function(t){return new nu(t,this)},nu.prototype.lookup=function(t){var e,n,r,o=this.cache;if(o.hasOwnProperty(t))e=o[t];else{for(var i,a,s,c=this,l=!1;c;){if(t.indexOf(".")>0)for(i=c.view,a=t.split("."),s=0;null!=i&&s<a.length;)s===a.length-1&&(l=Wl(i,a[s])||(n=i,r=a[s],null!=n&&"object"!=typeof n&&n.hasOwnProperty&&n.hasOwnProperty(r))),i=i[a[s++]];else i=c.view[t],l=Wl(c.view,t);if(l){e=i;break}c=c.parent}o[t]=e}return Vl(e)&&(e=e.call(this.view)),e},ru.prototype.clearCache=function(){void 0!==this.templateCache&&this.templateCache.clear()},ru.prototype.parse=function(t,e){var n=this.templateCache,r=t+":"+(e||ou.tags).join(":"),o=void 0!==n,i=o?n.get(r):void 0;return null==i&&(i=function(t,e){if(!t)return[];var n,r,o,i,a=!1,s=[],c=[],l=[],u=!1,p=!1,f="",h=0;function d(){if(u&&!p)for(;l.length;)delete c[l.pop()];else l=[];u=!1,p=!1}function v(t){if("string"==typeof t&&(t=t.split(Ql,2)),!Hl(t)||2!==t.length)throw new Error("Invalid tags: "+t);n=new RegExp(ql(t[0])+"\\s*"),r=new RegExp("\\s*"+ql(t[1])),o=new RegExp("\\s*"+ql("}"+t[1]))}v(e||ou.tags);for(var y,m,g,b,_,w,x=new eu(t);!x.eos();){if(y=x.pos,g=x.scanUntil(n))for(var T=0,E=g.length;T<E;++T)i=b=g.charAt(T),function(t,e){return Gl.call(t,e)}(Kl,i)?(p=!0,a=!0,f+=" "):(l.push(c.length),f+=b),c.push(["text",b,y,y+1]),y+=1,"\n"===b&&(d(),f="",h=0,a=!1);if(!x.scan(n))break;if(u=!0,m=x.scan(tu)||"name",x.scan(Jl),"="===m?(g=x.scanUntil(Zl),x.scan(Zl),x.scanUntil(r)):"{"===m?(g=x.scanUntil(o),x.scan(Xl),x.scanUntil(r),m="&"):g=x.scanUntil(r),!x.scan(r))throw new Error("Unclosed tag at "+x.pos);if(_=">"==m?[m,g,y,x.pos,f,h,a]:[m,g,y,x.pos],h++,c.push(_),"#"===m||"^"===m)s.push(_);else if("/"===m){if(!(w=s.pop()))throw new Error('Unopened section "'+g+'" at '+y);if(w[1]!==g)throw new Error('Unclosed section "'+w[1]+'" at '+y)}else"name"===m||"{"===m||"&"===m?p=!0:"="===m&&v(g)}if(d(),w=s.pop())throw new Error('Unclosed section "'+w[1]+'" at '+x.pos);return function(t){for(var e,n=[],r=n,o=[],i=0,a=t.length;i<a;++i)switch((e=t[i])[0]){case"#":case"^":r.push(e),o.push(e),r=e[4]=[];break;case"/":o.pop()[5]=e[2],r=o.length>0?o[o.length-1][4]:n;break;default:r.push(e)}return n}(function(t){for(var e,n,r=[],o=0,i=t.length;o<i;++o)(e=t[o])&&("text"===e[0]&&n&&"text"===n[0]?(n[1]+=e[1],n[3]=e[3]):(r.push(e),n=e));return r}(c))}(t,e),o&&n.set(r,i)),i},ru.prototype.render=function(t,e,n,r){var o=this.getConfigTags(r),i=this.parse(t,o),a=e instanceof nu?e:new nu(e,void 0);return this.renderTokens(i,a,n,t,r)},ru.prototype.renderTokens=function(t,e,n,r,o){for(var i,a,s,c="",l=0,u=t.length;l<u;++l)s=void 0,"#"===(a=(i=t[l])[0])?s=this.renderSection(i,e,n,r,o):"^"===a?s=this.renderInverted(i,e,n,r,o):">"===a?s=this.renderPartial(i,e,n,o):"&"===a?s=this.unescapedValue(i,e):"name"===a?s=this.escapedValue(i,e,o):"text"===a&&(s=this.rawValue(i)),void 0!==s&&(c+=s);return c},ru.prototype.renderSection=function(t,e,n,r,o){var i=this,a="",s=e.lookup(t[1]);if(s){if(Hl(s))for(var c=0,l=s.length;c<l;++c)a+=this.renderTokens(t[4],e.push(s[c]),n,r,o);else if("object"==typeof s||"string"==typeof s||"number"==typeof s)a+=this.renderTokens(t[4],e.push(s),n,r,o);else if(Vl(s)){if("string"!=typeof r)throw new Error("Cannot use higher-order sections without the original template");null!=(s=s.call(e.view,r.slice(t[3],t[5]),(function(t){return i.render(t,e,n,o)})))&&(a+=s)}else a+=this.renderTokens(t[4],e,n,r,o);return a}},ru.prototype.renderInverted=function(t,e,n,r,o){var i=e.lookup(t[1]);if(!i||Hl(i)&&0===i.length)return this.renderTokens(t[4],e,n,r,o)},ru.prototype.indentPartial=function(t,e,n){for(var r=e.replace(/[^ \t]/g,""),o=t.split("\n"),i=0;i<o.length;i++)o[i].length&&(i>0||!n)&&(o[i]=r+o[i]);return o.join("\n")},ru.prototype.renderPartial=function(t,e,n,r){if(n){var o=this.getConfigTags(r),i=Vl(n)?n(t[1]):n[t[1]];if(null!=i){var a=t[6],s=t[5],c=t[4],l=i;0==s&&c&&(l=this.indentPartial(i,c,a));var u=this.parse(l,o);return this.renderTokens(u,e,n,l,r)}}},ru.prototype.unescapedValue=function(t,e){var n=e.lookup(t[1]);if(null!=n)return n},ru.prototype.escapedValue=function(t,e,n){var r=this.getConfigEscape(n)||ou.escape,o=e.lookup(t[1]);if(null!=o)return"number"==typeof o&&r===ou.escape?String(o):r(o)},ru.prototype.rawValue=function(t){return t[1]},ru.prototype.getConfigTags=function(t){return Hl(t)?t:t&&"object"==typeof t?t.tags:void 0},ru.prototype.getConfigEscape=function(t){return t&&"object"==typeof t&&!Hl(t)?t.escape:void 0};var ou={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(t){iu.templateCache=t},get templateCache(){return iu.templateCache}},iu=new ru;ou.clearCache=function(){return iu.clearCache()},ou.parse=function(t,e){return iu.parse(t,e)},ou.render=function(t,e,n,r){if("string"!=typeof t)throw new TypeError('Invalid template! Template should be a "string" but "'+(Hl(o=t)?"array":typeof o)+'" was given as the first argument for mustache#render(template, view, partials)');var o;return iu.render(t,e,n,r)},ou.escape=function(t){return String(t).replace(/[&<>"'`=\/]/g,(function(t){return Yl[t]}))},ou.Scanner=eu,ou.Context=nu,ou.Writer=ru;var au=ou;function su(t,e={}){var n;const r={};T()(n=C()(e)).call(n,(([t,e])=>{switch(e.type){case"link":r[t]=(t=>`<a href='${t.url}' data-link-id='${t.id}' ${t.newTab?'target="_blank"':""}>${t.name}</a>`)(e);break;case"text":r[t]=e.value}}),{});const o=au.escape;au.escape=function(t){return t};const i=au.render(t,r);return au.escape=o,i}au.escape=function(t){return t};const cu=["event"];function lu(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function uu(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=lu(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=lu(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var pu=t=>{let{event:e}=t,n=L(t,cu);const[r]=ss(e),o=$l(e.payload.id),i=Lt((()=>e.payload.fromClient?{children:Se("p",{children:r.text})}:{bodyProps:{dangerouslySetInnerHTML:{__html:su(Fl(r.text),r.variables)}}}),[r,e]);return Se(Zc,uu(uu({type:"text",event:e,onClick:o},n),i))},fu=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],hu=fu.join(","),du="undefined"==typeof Element?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,vu=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return isNaN(e)?function(t){return"true"===t.contentEditable}(t)?0:"AUDIO"!==t.nodeName&&"VIDEO"!==t.nodeName&&"DETAILS"!==t.nodeName||null!==t.getAttribute("tabindex")?t.tabIndex:0:e},yu=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},mu=function(t){return"INPUT"===t.tagName},gu=function(t,e){return!(e.disabled||function(t){return mu(t)&&"hidden"===t.type}(e)||function(t,e){if("hidden"===getComputedStyle(t).visibility)return!0;var n=du.call(t,"details>summary:first-of-type")?t.parentElement:t;if(du.call(n,"details:not([open]) *"))return!0;if(e&&"full"!==e){if("non-zero-area"===e){var r=t.getBoundingClientRect(),o=r.width,i=r.height;return 0===o&&0===i}}else for(;t;){if("none"===getComputedStyle(t).display)return!0;t=t.parentElement}return!1}(e,t.displayCheck)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(mu(t)||"SELECT"===t.tagName||"TEXTAREA"===t.tagName||"BUTTON"===t.tagName)for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var r=e.children.item(n);if("LEGEND"===r.tagName)return!r.contains(t)}return!0}e=e.parentElement}return!1}(e))},bu=function(t,e){return!(!gu(t,e)||function(t){return function(t){return mu(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||t.ownerDocument,r=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=r(window.CSS.escape(t.name));else try{e=r(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var o=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!o||o===t}(t)}(e)||vu(e)<0)},_u=fu.concat("iframe").join(","),wu=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==du.call(t,_u)&&gu(e,t)};function xu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Tu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Eu,Su=(Eu=[],{activateTrap:function(t){if(Eu.length>0){var e=Eu[Eu.length-1];e!==t&&e.pause()}var n=Eu.indexOf(t);-1===n||Eu.splice(n,1),Eu.push(t)},deactivateTrap:function(t){var e=Eu.indexOf(t);-1!==e&&Eu.splice(e,1),Eu.length>0&&Eu[Eu.length-1].unpause()}}),ku=function(t){return setTimeout(t,0)},Au=function(t,e){var n=-1;return t.every((function(t,r){return!e(t)||(n=r,!1)})),n},Ou=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return"function"==typeof t?t.apply(void 0,n):t},Cu=function(t){return t.target.shadowRoot&&"function"==typeof t.composedPath?t.composedPath()[0]:t.target},Iu=function(t,e){var n,r=(null==e?void 0:e.document)||document,o=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?xu(Object(n),!0).forEach((function(e){Tu(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xu(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},e),i={containers:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},a=function(t,e,n){return t&&void 0!==t[e]?t[e]:o[n||e]},s=function(t){return!(!t||!i.containers.some((function(e){return e.contains(t)})))},c=function(t){var e=o[t];if("function"==typeof e){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];e=e.apply(void 0,i)}if(!e){if(void 0===e||!1===e)return e;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var s=e;if("string"==typeof e&&!(s=r.querySelector(e)))throw new Error("`".concat(t,"` as selector refers to no known node"));return s},l=function(){var t=c("initialFocus");if(!1===t)return!1;if(void 0===t)if(s(r.activeElement))t=r.activeElement;else{var e=i.tabbableGroups[0];t=e&&e.firstTabbableNode||c("fallbackFocus")}if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},u=function(){if(i.tabbableGroups=i.containers.map((function(t){var e,n,r,o=(n=[],r=[],function(t,e,n){var r=Array.prototype.slice.apply(t.querySelectorAll(hu));return e&&du.call(t,hu)&&r.unshift(t),r.filter(n)}(t,(e=e||{}).includeContainer,bu.bind(null,e)).forEach((function(t,e){var o=vu(t);0===o?n.push(t):r.push({documentOrder:e,tabIndex:o,node:t})})),r.sort(yu).map((function(t){return t.node})).concat(n));if(o.length>0)return{container:t,firstTabbableNode:o[0],lastTabbableNode:o[o.length-1]}})).filter((function(t){return!!t})),i.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},p=function t(e){!1!==e&&e!==r.activeElement&&(e&&e.focus?(e.focus({preventScroll:!!o.preventScroll}),i.mostRecentlyFocusedNode=e,function(t){return t.tagName&&"input"===t.tagName.toLowerCase()&&"function"==typeof t.select}(e)&&e.select()):t(l()))},f=function(t){var e=c("setReturnFocus",t);return e||!1!==e&&t},h=function(t){var e=Cu(t);s(e)||(Ou(o.clickOutsideDeactivates,t)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!wu(e)}):Ou(o.allowOutsideClick,t)||t.preventDefault())},d=function(t){var e=Cu(t),n=s(e);n||e instanceof Document?n&&(i.mostRecentlyFocusedNode=e):(t.stopImmediatePropagation(),p(i.mostRecentlyFocusedNode||l()))},v=function(t){if(function(t){return"Escape"===t.key||"Esc"===t.key||27===t.keyCode}(t)&&!1!==Ou(o.escapeDeactivates,t))return t.preventDefault(),void n.deactivate();(function(t){return"Tab"===t.key||9===t.keyCode})(t)&&function(t){var e=Cu(t);u();var n=null;if(i.tabbableGroups.length>0){var r=Au(i.tabbableGroups,(function(t){return t.container.contains(e)}));if(r<0)n=t.shiftKey?i.tabbableGroups[i.tabbableGroups.length-1].lastTabbableNode:i.tabbableGroups[0].firstTabbableNode;else if(t.shiftKey){var o=Au(i.tabbableGroups,(function(t){var n=t.firstTabbableNode;return e===n}));if(o<0&&i.tabbableGroups[r].container===e&&(o=r),o>=0){var a=0===o?i.tabbableGroups.length-1:o-1;n=i.tabbableGroups[a].lastTabbableNode}}else{var s=Au(i.tabbableGroups,(function(t){var n=t.lastTabbableNode;return e===n}));if(s<0&&i.tabbableGroups[r].container===e&&(s=r),s>=0){var l=s===i.tabbableGroups.length-1?0:s+1;n=i.tabbableGroups[l].firstTabbableNode}}}else n=c("fallbackFocus");n&&(t.preventDefault(),p(n))}(t)},y=function(t){if(!Ou(o.clickOutsideDeactivates,t)){var e=Cu(t);s(e)||Ou(o.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())}},m=function(){if(i.active)return Su.activateTrap(n),i.delayInitialFocusTimer=o.delayInitialFocus?ku((function(){p(l())})):p(l()),r.addEventListener("focusin",d,!0),r.addEventListener("mousedown",h,{capture:!0,passive:!1}),r.addEventListener("touchstart",h,{capture:!0,passive:!1}),r.addEventListener("click",y,{capture:!0,passive:!1}),r.addEventListener("keydown",v,{capture:!0,passive:!1}),n},g=function(){if(i.active)return r.removeEventListener("focusin",d,!0),r.removeEventListener("mousedown",h,!0),r.removeEventListener("touchstart",h,!0),r.removeEventListener("click",y,!0),r.removeEventListener("keydown",v,!0),n};return(n={activate:function(t){if(i.active)return this;var e=a(t,"onActivate"),n=a(t,"onPostActivate"),o=a(t,"checkCanFocusTrap");o||u(),i.active=!0,i.paused=!1,i.nodeFocusedBeforeActivation=r.activeElement,e&&e();var s=function(){o&&u(),m(),n&&n()};return o?(o(i.containers.concat()).then(s,s),this):(s(),this)},deactivate:function(t){if(!i.active)return this;clearTimeout(i.delayInitialFocusTimer),i.delayInitialFocusTimer=void 0,g(),i.active=!1,i.paused=!1,Su.deactivateTrap(n);var e=a(t,"onDeactivate"),r=a(t,"onPostDeactivate"),o=a(t,"checkCanReturnFocus");e&&e();var s=a(t,"returnFocus","returnFocusOnDeactivate"),c=function(){ku((function(){s&&p(f(i.nodeFocusedBeforeActivation)),r&&r()}))};return s&&o?(o(f(i.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)},pause:function(){return i.paused||!i.active||(i.paused=!0,g()),this},unpause:function(){return i.paused&&i.active?(i.paused=!1,u(),m(),this):this},updateContainerElements:function(t){var e=[].concat(t).filter(Boolean);return i.containers=e.map((function(t){return"string"==typeof t?r.querySelector(t):t})),i.active&&u(),this}}).updateContainerElements(t),n};function Nu(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ju(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Nu(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Nu(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var Ru=({children:t,onClose:e,"aria-label":n,"aria-labelledby":r,fallBackFocusRef:o})=>{var i;const a=na(),s=Pt(null),c=Pt(null),[l,u]=It(!1);return jt((()=>(l&&(c.current=Iu(s.current,{initialFocus:o&&o.current?o.current:null}),c.current.activate()),()=>{c.current&&c.current.deactivate()})),[l,o]),jt((()=>{const t=(()=>{var t;const e=[],n=[];return T()(t=document.querySelectorAll('body > *:not([role="dialog"])')).call(t,(t=>{const r=t.getAttribute("aria-hidden");null!==r&&"false"!==r||(e.push(r),n.push(t),t.setAttribute("aria-hidden","true"))})),()=>{T()(n).call(n,((t,n)=>{const r=e[n];null===r?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",r)}))}})();return()=>{t()}}),[l]),jt((()=>{l&&s.current.addEventListener("keydown",(t=>{(t.code&&"Escape"===t.code||27===t.keyCode)&&e()}))}),[l,e]),Rt((()=>{const t=document.getElementsByTagName("body")[0],e=document.createElement("div");return e.setAttribute("id",a),e.setAttribute("role","dialog"),e.setAttribute("data-nosnippet","true"),e.setAttribute("aria-modal","true"),n&&e.setAttribute("aria-label",n),r&&e.setAttribute("aria-labelledby",r),t.appendChild(e),s.current=e,u(!0),()=>{s.current&&(t.removeChild(s.current),s.current=null)}}),[n,r,a]),"function"==typeof t?t({onClose:e,modalRenderFn:t=>s.current&&vt(t,s.current)}):s.current&&vt(b()(i=rt(t)).call(i,(t=>(t.props=ju(ju({},t.props),{},{onClose:e}),t))),s.current)},Pu=({url:t,description:e,onClose:n})=>{const{zIndex:r,layoutMode:o,namespace:i}=He(),a=Ra(),s=si(),c=Pt(null),{t:l}=Oi(),u=["modal",`app--layout-${o}`,`namespace--${i}`,...s],p=t=>{t.stopPropagation()},f=()=>{n()},h=r?{zIndex:r+1}:void 0;return Se(Ru,{onClose:n,"aria-label":l("lightbox.heading"),fallBackFocusRef:c,children:({onClose:n,modalRenderFn:r})=>r((n=>Se("div",{className:Xo(u),onClick:f,style:h,children:Se("div",{className:Xo("modal__float"),tabIndex:"-1",onMouseDown:a,onKeyDown:a,onTouchStart:a,onMouseMove:a,onWheel:a,onPointerDown:a,onPointerMove:a,ref:c,children:[Se("div",{className:Xo("modal__inner"),onClick:p,children:Se("img",{className:Xo("modal__image"),src:t,alt:e})}),Se("button",{type:"button",className:Xo("modal__close"),onClick:n,children:[Se(ds,{name:"close",size:"16"}),l("lightbox.closeLabel")]})]})}))(n))})},Lu=({description:t,url:e})=>{const{t:n}=Oi(),[r,o]=It(!1);return Se(Y,{children:[Se("button",{type:"button",className:Xo("modal__enlarge"),onClick:()=>{o(!0)},children:[n("message.image.srTextEnlargeButtonLabel",{description:t}),Se(ds,{name:"enlarge",size:"32"})]}),r&&Se(Pu,{url:e,description:t,onClose:()=>{o(!1)}})]})};const Du=["event","descriptorId"];function Uu(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Mu(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Uu(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Uu(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const zu=["event","descriptorId"];function Fu(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function $u(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Fu(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Fu(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Bu={[Fn.new_topic]:"newtopic"},Hu=["event"];function Vu(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}const qu={default:({event:t})=>{const{t:e}=Oi(),{subtype:n}=t.payload.body;return Se(Bc,{dividerType:Bu[Fn[n]],iconName:Fn[n],children:Se("p",{children:e(`dividerKeys.${Fn[n]}`)})})},[Fn.new_translation]:({event:t})=>{const{t:e}=Oi(),{translationEnabled:n,translationLocale:r,text:o}=t.payload.body,{enableTranslations:i,languages:a}=as(),s=Lt((()=>{var t;return null==a||null===(t=Tn()(a).call(a,(t=>t.locale===r)))||void 0===t?void 0:t.nativeName}),[a,r]);return Se(Bc,{iconName:"newTranslation",dividerType:"newtranslation",children:[Se("p",{className:Xo("divider__title"),children:e(n?"translations.divider.startText":"translations.divider.stopText",{language:s})}),n?Se("p",{children:o}):Se("button",{className:Xo("button","button--secondary"),onClick:()=>{i(r)},children:e("translations.divider.restartButtonText")})]})}};const Wu=["event"];function Gu(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ku(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Gu(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Gu(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Yu=["event"];function Ju(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Qu(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Ju(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Ju(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Zu=["event"];function Xu(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function tp(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Xu(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Xu(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const ep=({children:t,url:e,target:n})=>e?Se("a",{href:e,download:!0,target:n||void 0,className:Xo(["download","download-link"]),children:t}):Se("span",{className:Xo("download"),children:t});var np=n(4494),rp=n.n(np);function op({items:t,currentIndex:e,onChange:n,getItemKey:r,getItemLabel:o}){const i=t.length,a=Dt((t=>{const r=Number(t.target.dataset.item||"0"),o=Math.min(i-1,Math.max(0,r));o!==e&&n(o)}),[i,e,n]);return Se("div",{className:Xo("carousel-pagination__wrapper"),role:"group",children:Se("ul",{className:Xo("carousel-pagination"),children:b()(t).call(t,((t,n)=>{const i=e===n;return Se("li",{className:Xo("carousel-pagination__item",i?"is-active":void 0),children:Se("button",{className:Xo("carousel-pagination__button"),type:"button",onClick:a,"data-item":n,"aria-disabled":i?"true":void 0,"aria-label":o(t,n)})},r(t,n,"pagination-item-"))}))})})}function ip({items:t,currentIndex:e,onChange:n,children:r}){const{t:o}=Oi(),i=t.length;return Se("div",{className:Xo("carousel-controls"),children:[Se("button",{className:Xo("button","button--previous"),"aria-label":o("carousel.controls.previous"),onClick:()=>{n((e-1+i)%i)},children:Se(ds,{name:"arrowLeft",size:"16"})}),r,Se("button",{className:Xo("button","button--next"),"aria-label":o("carousel.controls.next"),onClick:()=>{n((e+1)%i)},children:Se(ds,{name:"arrowRight",size:"16"})})]})}function ap(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function sp(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=ap(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=ap(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var cp=({id:t,action:e,buttonText:n,description:r,hasFocus:o,image:i,title:a,isCarouselItem:s})=>{const c=Pt(null),{sendMessage:l,sendAction:u,emitEvent:p}=Ca(),f=na(),h=Pt(),d=e.type===Hn?"a":"button",v=Dt((()=>p("action.click_card",{type:Un,originMessage:t,action:e})),[p,t,e]),y=Dt((()=>{if(v(),"ask"===e.type)l({body:e.ask});else if("topic"===e.type){const{topic:t,fallbackMessage:n}=e;u({type:"set_topic",body:{name:t,fallbackMessage:n}})}}),[l,e,u,v]),m=Lt((()=>e.type===Hn?{href:e.link,rel:"noopener noreferrer",target:e.newTab?"_blank":"_self",onClick:v}:{onClick:y}),[e,y,v]);return jt((()=>{s&&(o&&h.current?window.requestAnimationFrame((()=>c.current.focus())):c.current.blur()),h.current=!0}),[o,s]),Se("div",{className:Xo("card__wrapper"),id:t,tabIndex:"-1",ref:c,children:[Se("img",{className:Xo("card__image"),src:i,alt:""}),Se("div",{className:Xo("card__content"),id:t,children:[a&&Se("h2",{className:Xo("card__title"),children:a}),r&&Se("div",{className:Xo("card__description"),dangerouslySetInnerHTML:{__html:Fl(r)}}),Se(d,sp(sp({tabIndex:s&&!o?"-1":void 0,className:Xo("button","button--primary"),"aria-describedby":f},m),{},{children:n}))]})]})};function lp(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function up(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=lp(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=lp(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}function pp({item:t,items:e,index:n,isActive:r}){const{t:o}=Oi();return Se("div",{className:Xo("carousel-item",`carousel-item--${t.type}`),role:"group","aria-roledescription":"slide","aria-label":o("carousel.slide.label",{index:n+1,total:e.length}),children:Se(cp,up(up({},t),{},{isCarouselItem:!0,hasFocus:r}))})}const fp=(t,e,n)=>`${n}${e}`,hp=t=>t.label,dp=({target:t})=>{t.scrollLeft=0};function vp({currentIndex:t,onChange:e,getItemKey:n=fp,getItemLabel:r=hp,items:o}){const i=na(),a=o.length,[s,c]=It(Number(t||"0"));jt((()=>{c(Number(t||"0"))}),[c,t]);const l=Pt([]);l.current=Lt((()=>{var t,e;return b()(t=rp()(e=Array(a)).call(e,1)).call(t,(()=>({current:null})))}),[a]);const u=Pt(!0),p=Pt();return p.current=e,jt((()=>{u.current?u.current=!1:p.current&&p.current(s)}),[s]),Se("div",{className:Xo("carousel"),role:"group","aria-roledescription":"carousel",children:[Se("div",{className:Xo("carousel__slides-wrapper"),onScroll:dp,children:Se("div",{id:i,className:Xo("carousel__slides"),style:{width:100*a+"%",left:-100*s+"%"},"aria-live":"polite","aria-atomic":"false",children:b()(o).call(o,((t,e)=>{const r=s===e;return Se("div",{ref:l.current[e],className:Xo("carousel__slide",r?"is-active":void 0),"aria-hidden":r?void 0:"true",children:Se(pp,{item:t,items:o,currentIndex:s,index:e,isActive:r})},n(t,e,"item-"))}))})}),Se("div",{className:Xo("carousel__controls"),children:Se(ip,{currentIndex:s,items:o,onChange:c,controlId:i,children:Se("div",{className:Xo("carousel__pagination"),children:Se(op,{currentIndex:s,items:o,onChange:c,getItemKey:n,getItemLabel:r})})})})]})}const yp=(t,e,n="")=>`${n}${t.title}:${e}`,mp=t=>t.title;function gp(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function bp(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=gp(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=gp(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const _p=["event"];function wp(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function xp(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=wp(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=wp(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}function Tp(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ep(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Tp(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Tp(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Sp={message:{choice_prompt:t=>{var e,n;let{event:r,children:o}=t,i=L(t,Xc);const{t:a}=Oi(),s=na(),{body:c,subEvent:l,showOptions:u,chooseAgain:p,onChoiceClickHandler:f,onChooseAgainClickHandler:h}=nl(r);return Se(Y,{children:[b()(e=rt(o)).call(e,(t=>(t.props=el(el({},t.props),{},{event:l,descriptorId:s,showTranslationToggle:!1}),t))),p&&Se("button",{type:"button",className:Xo("button","button--secondary","button--choose-again"),"aria-expanded":u?"true":"false",onClick:h,"aria-describedby":s,children:[a(u?"message.choicePrompts.cancelChooseAgain":"message.choicePrompts.chooseAgain"),Se(ds,{name:"chevronDown",size:"8"})]}),u&&Se(Zc,el(el({type:"choice-prompt",showParticipant:!1,event:r},i),{},{children:Se("ul",{className:Xo("choice-prompt","choice-prompt--many"),children:b()(n=c.choices).call(n,(t=>Se("li",{className:Xo("choice-prompt__item",{[`choice-prompt__item--${t.category}`]:t.category}),children:Se("button",{type:"button",className:Xo("button","button--primary"),onClick:()=>{f(t)},children:t.text})},t.id)))})}))]})},text:pu,image:t=>{let{event:e,descriptorId:n}=t,r=L(t,Du);const[o]=ss(e),{description:i,url:a,isZoomable:s}=o,[c,l]=It(!1);return Se(Zc,Mu(Mu({event:e,type:"image"},r),{},{children:[Se("img",{src:a,id:n,alt:i,onLoad:()=>{l(!0)}}),s&&c&&Se(Lu,{description:i,url:a})]}))},splash:t=>{let{event:e}=t,n=L(t,Yu);const{payload:r}=e,[o]=ss(e),i=$l(r.id);return Se(Zc,Qu(Qu({type:"splash",event:e,onClick:i},n),{},{bodyProps:{dangerouslySetInnerHTML:{__html:su(Fl(o.text),o.variables)}}}))},video:t=>{let{event:e,descriptorId:n}=t,r=L(t,zu);const[o]=ss(e),{description:i,url:a}=o;return ci(e).push("message--type-video"),Se(Zc,$u($u({event:e,type:"video"},r),{},{children:[Se("div",{id:n,className:Xo("visually-hidden"),children:i}),Se("iframe",{title:i,src:a,allow:"autoplay; encrypted-media",allowFullScreen:!0})]}))},upload:t=>{let{event:e}=t,n=L(t,Zu);const{t:r}=Oi(),[o]=ss(e),{fromClient:i}=e.payload,{filename:a,url:s}=o,c=Lt((()=>r(s?"fileUpload.srFileDownloadText":"fileUpload.srFileUploadedText",{fileName:a})),[s,a,r]);return Se(Zc,tp(tp({event:e,type:"upload"},n),{},{children:Se(ep,{url:s,target:i?void 0:"_blank",children:[Se(ds,{name:"download",size:"16"}),Se("span",{"aria-hidden":"true",className:Xo("file-download"),children:a}),Se("span",{className:Xo("visually-hidden"),children:c})]})}))},cta:({event:t})=>{const[e]=ss(t),n=$l(t.payload.id),{emitEvent:r}=Ca(),o=na(),i=Dt((()=>r("action.click_cta",{type:Un,originMessage:t.payload.id,link:{url:e.buttonLink}})),[r,e,t]);return Se(Zc,{type:"cta",event:t,children:[Se("div",{className:Xo("cta__content"),id:o,dangerouslySetInnerHTML:{__html:Fl(e.description)},onClick:n}),Se("a",{className:Xo("button","button--primary"),"aria-describedby":o,href:e.buttonLink,rel:"noreferrer",target:e.buttonNewTab?"_blank":"_self",onClick:i,children:e.buttonText})]})},carousel:({event:t})=>{const[e]=ss(t),n=e.cards;return Se(Zc,{event:t,modifiers:"type-carousel",children:Se(vp,{items:n,ItemComponent:pp,getItemKey:yp,getItemLabel:mp})})},card:({event:t})=>{const[e]=ss(t),n=na();return Se(Zc,{type:"card",event:t,children:Se(cp,bp({id:n},e))})}},info:{text:pu,divider:t=>{let{event:e}=t,n=L(t,Hu);return Se(qu[Fn[e.payload.body.subtype]]||qu.default,function(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Vu(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Vu(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}({event:e},n))},translation:t=>{let{event:e}=t,n=L(t,Wu);const{t:r}=Oi(),[o]=ss(e);return Se(Zc,Ku(Ku({type:"text",event:e},n),{},{children:r(o.key.join("."),o.variables)}))},timeIndicator:qc},participant:{participant:({event:t})=>{const{participant:e}=t.payload,[n]=ss(t),r=Lt((()=>n?au.render(Fl(n),e):void 0),[n,e]);return r?Se(Bc,{graphicSrc:e.avatar,graphicType:e.avatar?"avatar":void 0,iconName:e.avatar?void 0:"balloon",childrenHTML:r,dividerType:"participant"}):null}},service_data:{suggestion:t=>{let{event:e}=t,n=L(t,_p);const{userResponded:r}=He(),[o,i]=It(!0),{t:a}=Oi(),s=a("suggestions.headingText"),c=a("suggestions.footerText"),{sendAction:l,addMessageBubble:u}=Ca(),{suggestions:p,payload:f}=(t=>{const{payload:e}=t,[n]=ss(t);return{suggestions:n,payload:e}})(e),h=Dt((({id:t,question:e})=>{i(!1),l({type:jn,originMessage:f.id,body:{type:"faqclick",body:{faqId:t,faqQuestion:e}}}),u(e)}),[f,l,u,i]);return!o||r?null:Se("div",{className:Xo("suggestions","suggestions--conversation"),children:[s&&Se("p",{className:Xo("suggestions__heading"),children:s}),Se(Zc,xp(xp({type:"suggestions",showParticipant:!1,event:e},n),{},{children:[Se(Pc,{className:"suggestions__list--conversation",onClickSuggestion:h,suggestions:p}),c&&Se("p",{className:Xo("suggestions__footer"),children:c})]}))]})}}};var kp=({children:t})=>{const{customComponents:e}=He(),n=Lt((()=>{var t;return en()(t=N()(Sp)).call(t,((t,n)=>Ep(Ep({},t),{},{[n]:Ep(Ep({},Sp[n]),e?e[n]:{})})),{fallback:pu})}),[e]);return Se(Mc.Provider,{value:n,children:t})},Ap=()=>{const{t:t}=Oi(),{showDisclaimer:e}=He();return e&&Se("div",{className:Xo("disclaimer"),tabIndex:"0",children:[Se("h2",{className:Xo("disclaimer__title"),children:t("disclaimer.title")}),Se("div",{className:Xo("disclaimer__message"),dangerouslySetInnerHTML:{__html:t("disclaimer.content")}})]})},Op=()=>{const{t:t}=Oi(),e=Pt(null),n=mo(),r=ho().isLoading,{isOpen:o}=_a(),i=_o(),a=Ui();return jt((()=>{window.requestAnimationFrame((()=>{e.current&&(e.current.scrollTop=e.current.scrollHeight)}))}),[n,r,o]),Se(Y,{children:[o&&Se("a",{className:Xo("skip-link"),href:`#${i}`,onClick:t=>{t.preventDefault(),a()},children:t("skiplinkText")}),Se("div",{className:Xo("chat__body"),ref:e,children:Se("div",{className:Xo("conversation__container"),children:[Se(Ap,{}),Se("ol",{className:Xo("conversation"),children:[Se(kp,{children:(()=>{let t=null;return b()(n).call(n,(e=>{const{type:n,payload:r}=e,{participant:o,fromClient:i}=r;let a=!1;if("participant"!==n){const n=i?"seamly-client-participant":o;"info"!==e.type&&t!==n&&(a=!0),t=n}return Se(Wc,{event:e,newParticipant:a},e.payload.id)}))})()}),r&&Se(Kc,{})]})]})})]})},Cp=({baseClassName:t,children:e,title:n})=>{const r=_o(),o=na();return Se("section",{id:r,className:Xo(t),"aria-describedby":o,tabIndex:"-1",children:[Se("h2",{className:Xo(`${t}__title`),id:o,children:n}),e]})},Ip=()=>{const{t:t}=Oi(),e=Ui(),n=Ra(),{emitEvent:r}=Ca(),{isActive:o,remaining:i,timer:a,endCountdown:s}=Ya(),c=i>0,l=t(c?"idleDetachWarning.countdownTitle":"idleDetachWarning.notifyTransferText");return Se(Cp,{baseClassName:"idle",title:l,children:c&&Se(Y,{children:[Se("div",{className:Xo("idle__count-container"),children:o&&Se(Y,{children:[Se("span",{className:Xo("idle__count-text"),children:t("idleDetachWarning.countdownText")}),Se("span",{className:Xo("idle__count-timer"),children:t("idleDetachWarning.countdownTimer",a)})]})}),Se("div",{className:Xo("idle__options"),children:[Se("button",{type:"button",className:Xo("button","button--primary"),onClick:()=>{n(),s(!0),e(),r("idleTimer.selectContinue")},children:t("idleDetachWarning.continueButton")}),Se("button",{type:"button",className:Xo("button","button--primary"),onClick:()=>{s(),e(),r("idleTimer.selectEnd")},children:t("idleDetachWarning.detachButton")})]})]})})},Np=()=>{const{t:t}=Oi(),e=Ra(),{name:n}=xo()||{},{continueChat:r,restartChat:o}=Qa();return Se(Cp,{baseClassName:"prompt",title:t("resumeConversationPrompt.title",{name:n}),children:Se("div",{className:Xo("prompt__options"),children:[Se("button",{type:"button",className:Xo("button","button--primary"),onClick:()=>{e(),r()},children:t("resumeConversationPrompt.continueButton")}),Se("button",{type:"button",className:Xo("button","button--primary"),onClick:o,children:t("resumeConversationPrompt.detachButton")})]})})},jp=n(2088);function Rp(){return(Rp=jp||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}const Pp=["id","name","type","labelText","labelClass","contentHint","aria-describedby"];function Lp(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Dp(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Lp(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Lp(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var Up=function(t){let{id:e,name:n,type:r,labelText:o,labelClass:i,contentHint:a,"aria-describedby":s}=t,c=L(t,Pp);const{isSubmitted:l}=Bs(),[u,{error:p}]=Hs(n),f=l&&p,h=[];return s&&h.push(s),a&&h.push(`${e}-content-hint`),f&&h.push(`${e}-error`),Se(ic,{id:e,contentHint:a,validity:!f,errorText:p,labelText:o,labelClass:i,children:Se("input",Dp(Dp({id:e,name:n,type:r,"aria-invalid":f?"true":"false","aria-describedby":h.join(" ")||null},u),c))})};function Mp({controlName:t,skipLinkId:e}){const{t:n}=Oi(),{sendAssertive:r}=Na(),{emitEvent:o}=Ca(),i=(()=>{const{sendAction:t}=Ca(),{features:e}=Vi(),{typingPeekahead:n}=e||{},r=Pt(null),o=Pt(null),i=Pt(!1),a=Pt(null);jt((()=>()=>{clearInterval(a.current),clearTimeout(r.current),clearTimeout(o.current)}),[]);const s=(e,r)=>{t(function(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Da(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Da(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}({type:Rn,state:e},n&&n.enabled?{body:{currentMessage:r}}:{}))};return t=>{t.code&&"Enter"===t.code||13===t.keyCode||(i.current=!0,a.current||(s(!0,t.target.value),a.current=La()((()=>{i.current?n&&n.enabled&&s(!0,t.target.value):(clearInterval(a.current),a.current=null)}),2e3)),clearTimeout(r.current),clearTimeout(o.current),r.current=Ye()((()=>{i.current=!1}),300),o.current=Ye()((()=>{s(!1,t.target.value)}),2e3))}})(),{setBlockAutoEntrySwitch:a}=Fa(),{hasCharacterLimit:s,characterLimit:c,reachedCharacterWarning:u,reachedCharacterLimit:f,remainingChars:d}=function(t){const{t:e}=Oi(),{sendAssertive:n}=Na(),{hasLimit:r,limit:o}=(()=>{const{entryMeta:{options:{text:t}}}=ho(),{limit:e}=t||{};return{hasLimit:null!=e,limit:null!=e?e:null}})(),i=Lt((()=>sn(n,300)),[n]),a=Lt((()=>sn(((t,n)=>{t&&i(e("input.srCharacterLimitText",{limit:n}))}),300)),[i,e]),[{value:s}]=Hs(t),c=r&&s?o-s.length:o,l=!!r&&c<=50,u=!!r&&c<0;return jt((()=>{a(l,c)}),[l,c,a]),{hasCharacterLimit:r,characterLimit:o,reachedCharacterWarning:l,reachedCharacterLimit:u,remainingChars:c}}(t),[{value:y}]=Hs(t),g=!!y,b=Dt((()=>{u&&r(n("input.srCharacterLimitText",{limit:d})),o("ui.inputFocus")}),[n,r,u,d,o]),_=Lt((()=>n("input.inputPlaceholder",{hasLimit:s,limit:s?c:null})),[n,s,c]),w=Lt((()=>n("input.inputLabel",{hasLimit:s,limit:s?c:null})),[n,s,c]);return Rt((()=>(a(g),()=>{a(!1)})),[a,g]),Se(rc,{className:Xo("entry-form"),disableValidationClasses:!0,noValidate:"true",children:[Se("div",{className:Xo(["input--text__container",...u&&!f?["character-warning"]:[],...f?["character-exceeded"]:[]]),children:[Se(Up,{id:e,type:"text",name:t,className:Xo("input__text"),autocomplete:"off",placeholder:_,labelText:w,labelClass:Xo("visually-hidden"),"aria-invalid":s?f:null,onKeyUp:i,onFocus:b}),Se("div",{className:Xo("character-count"),children:u&&Se("span",{children:d})})]}),Se("button",{className:Xo("button","input__submit"),type:"submit","aria-disabled":!g||f?"true":null,children:Se(ds,{name:"send",size:"32",alt:n("input.sendMessage")})})]})}function zp(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Fp(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=zp(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=zp(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const $p="userText";function Bp(t){let e=Rp({},t);const{isOpen:n,setVisibility:r}=_a(),o=_o(),i=Ui(),{sendMessage:a}=Ca(),s=Dt(((t,{updateControlValue:e})=>{a({body:t.userText}),e($p,""),i(),n||r(ye.open)}),[a,i,n,r]);return Se(Gs,Fp(Fp({},e),{},{formId:"textEntry",persistData:!0,onSubmit:s,children:Se(Mp,{controlName:$p,skipLinkId:o})}))}var Hp=()=>{const{t:t}=Oi(),{showFileUpload:e,serviceAllowsUploads:n}=Zi(),[r,o]=It(n),i=Ui(),a=Pt(null),{setUserEntryType:s,activeEntry:c}=Fa(),l=Pt(null),{sendPolite:u}=Na(),p=!!xo();return jt((()=>{mn(l.current,(()=>{n||i()})),o(n)}),[n,i]),jt((()=>{a.current&&!n&&u(t("fileUpload.srUnavailableText")),!1===a.current&&n&&u(t("fileUpload.srAvailableText")),p&&(a.current=n)}),[n,p,u,t]),!e&&c!==Cn&&Se(xs,{isActive:r,transitionStartState:_s,children:Se("div",{className:Xo("upload-toggle-wrapper"),children:Se(xs,{isActive:r,transitionStartState:ws,children:Se("button",{className:Xo(["button","button--secondary","upload-toggle"]),ref:l,"aria-disabled":r?null:"true",type:"button",onClick:r?()=>{s(Cn),i()}:null,children:Se(ds,{name:"file",size:"32",alt:t("fileUpload.toggleButtonText")})})})})})},Vp=()=>{const{t:t}=Oi(),{currentUploads:e}=Xi();return Se("div",{className:Xo("progress"),children:b()(e).call(e,(({id:e,name:n,progress:r,uploading:o,error:i})=>Se("div",{className:Xo("progress_container"),children:[Se("div",{className:Xo("progress__text"),children:[Se("span",{className:Xo("progress__text--file-name"),children:n}),Se("span",{className:Xo("progress__text--percentage"),children:`${r}%`})]}),Se(oc,{error:i}),Se("progress",{className:Xo("progress__bar"),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-label":t("fileUpload.srProgressLabel",{fileName:n}),max:"100","aria-valuenow":r,value:r,"aria-busy":o,children:`${r}%`})]},e)))})};function qp({id:t,name:e,labelText:n,contentHint:r,outputText:o,accept:i}){const{isSubmitted:a}=Bs(),[s,c]=It(!1),[{onInput:l,onBlur:u},{error:p}]=Hs(e),f=na(),h=na(),d=na(),v=a&&p,y=[d];r&&y.push(h),v&&y.push(f);const m=Dt((()=>{c(!0)}),[c]),g=Dt((()=>{c(!1),u()}),[c,u]),b=Dt((t=>{const e={target:{value:t.target.files}};l(e)}),[l]);return Se("div",{className:Xo("upload__container"),children:[r&&Se("span",{className:Xo("upload__content-hint"),id:h,children:r}),Se(oc,{id:f,error:v&&p}),Se("div",{className:Xo(["file-upload",...s?["focus-within"]:[]]),children:Se("label",{htmlFor:t,className:Xo("upload__label"),children:[Se(ds,{name:"upload",size:"32"}),Se("div",{children:[Se("span",{className:Xo(["upload__label--text"]),children:n}),Se("input",{id:t,className:Xo("upload__input"),type:"file",name:e,onChange:b,"aria-invalid":v?"true":"false","aria-describedby":y.join(" "),accept:i||null,onFocus:m,onBlur:g}),Se("span",{className:Xo("upload__output"),"aria-hidden":"true",id:d,children:o})]})]})})]})}function Wp({skiplinkId:t,controlName:e,accept:n,contentHint:r,isUploading:o,isComplete:i,onClickCancel:a}){const{t:s}=Oi(),[{value:c}]=Hs(e),l=c&&c.length>0,u=l?c[0].name:"";return Se(rc,{className:Xo("upload-form"),children:[Se(qp,{name:e,id:t,accept:n,labelText:s("fileUpload.labelText"),outputText:s("fileUpload.selectedText",{hasFile:l,filename:u}),contentHint:r}),Se("div",{className:Xo("upload__button-container"),children:[Se("button",{id:o||!i?t:void 0,type:"button",onClick:a,className:Xo("button","button--secondary","upload__cancel"),children:s("fileUpload.cancelButtonText")}),Se("button",{className:Xo("button","button--primary"),type:"submit",children:s("fileUpload.uploadButtonText")})]})]})}const Gp="fileListForm",Kp="fileList";var Yp=()=>{const{t:t}=Oi(),{sendPolite:e,sendAssertive:n}=Na(),r=_o(),o=Ui(),{serviceAllowsUploads:i,allowedMimeTypes:a,maxSize:s}=Zi(),c=Pt(null),l=Pt(i),{cancelEntrySelection:u}=Fa(),{uploadFile:p,clearUploads:f,isUploading:h,isComplete:d}=Xi(),{hasFile:v,selectedFileName:y,uploadHandle:m,hasServerError:g,progress:b}=((t,e)=>{const n=Be(Ds,{formId:t,name:e},[t,e]),{currentUploads:r}=Xi(),o=n&&n.length>0;let i=null,a=!1,s=0;if(r&&r.length>0){const t=r[0];i=t.uploadHandle,a=!!t.error,s=t.progress}return{hasFile:o,selectedFileName:o?n[0].name:"",uploadHandle:i,hasServerError:a,progress:s}})(Gp,Kp),_=na(),w=Pt(!0),x=t("fileUpload.contentHint",{size:un(s)}),T=Pt(""),E=Pt(null);jt((()=>{T.current&&E.current.contains(document.activeElement)&&"INPUT"===document.activeElement.tagName&&n(x),T.current=x}),[x,n]),jt((()=>{if(b>0)switch(b){case 1:e(t("fileUpload.srStartedText"));break;default:e(`${b}%`)}}),[b,e,t]),jt((()=>{w.current||h||!d||(f(),u(),o(),Ye()((()=>{e(t("fileUpload.srCompleteText"))}),300)),w.current=d}),[h,d,f,u,o,e,t]);const S=Dt((({fileList:t})=>{p(t[0]),o()}),[p,!1,o]),k=Dt((()=>{m&&m.abort(),f(),u(),o()}),[m,f,u,o]),A=Lt((()=>({[Kp]:[_c((()=>i),t("fileUpload.errors.unavailable")),_c(xc,t("fileUpload.errors.noFile")),_c(wc,t("fileUpload.errors.tooLarge"),s)]})),[s,i,t]);return Se("div",{className:Xo(["upload",...g?["upload--error"]:[]]),ref:E,children:Se(Gs,{formId:Gp,persistData:!0,onSubmit:S,validationSchema:A,children:[(h||!d)&&Se(Y,{children:[Se(Vp,{}),Se("div",{className:Xo("upload__button-container"),children:Se("button",{id:h||!d?r:void 0,type:"button",onClick:k,ref:c,className:Xo("button","button--secondary","upload__cancel"),children:t("fileUpload.cancelButtonText")})})]}),!h&&d&&Se(Wp,{controlName:Kp,skiplinkId:r,accept:a.join(", "),contentHint:x,isComplete:d,isUploading:h,outputText:t("fileUpload.selectedText",{hasFile:v,filename:y}),onClickCancel:k}),!l.current&&Se(Y,{children:[Se("span",{className:Xo("notification"),id:_,children:t("fileUpload.unavailableText")}),Se("div",{className:Xo("upload__button-container"),children:Se("button",{id:h||!d?r:void 0,type:"button",onClick:k,className:Xo("button","button--secondary","upload__cancel"),children:t("fileUpload.cancelButtonText")})})]})]})})};function Jp(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Qp(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Jp(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Jp(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var Zp=()=>{const{isOpen:t}=_a(),e=Pt(null),{hasCountdown:n}=Ya(),[r,o]=It(n),{hasPrompt:i}=Qa(),[a,s]=It(i),c=Ui(),l=Pt(!1),{activeEntry:u}=Fa(),[p,f]=It({text:Bp,upload:Yp}),[h,d]=It((()=>u)),v=He(),{accountAllowsUploads:y}=Zi(),m=Dt((()=>{mn(e.current,(()=>{c()}))}),[c]);jt((()=>{const{customComponents:t}=v,{entry:e}=t||{};e&&f((t=>Qp(Qp({},t),e)))}),[v]),jt((()=>{m(),o(n),s(i)}),[n,i,m]),jt((()=>{d(u),m()}),[u,m,e]),l.current=!(!e.current||!e.current.contains(document.activeElement));const g=p[h];return Se("div",{className:Xo("chat__entry"),ref:e,children:[r&&Se(Ip,{}),a&&Se(Np,{}),Se("div",{className:Xo(["entry__body",...n||i?["entry__body--hidden"]:[]]),children:[h!==Cn&&y&&t&&Se(Hp,{}),Se(g,{})]})]})},Xp=n(6419),tf=n.n(Xp),ef=n(2462),nf=n.n(ef);function rf({controlName:t,describedById:e}){const{t:n}=Oi();return Se(rc,{noValidate:"true",className:Xo("options__form"),children:[Se(Up,{name:t,type:"email",className:Xo("transcript__input"),"aria-describedby":e,labelClass:Xo("label"),labelText:n("options.sendTranscript.label")}),Se("div",{className:Xo("options__actions"),children:Se("button",{type:"submit",className:Xo("button","button--primary","options__submit"),children:n("options.sendTranscript.sendButtonText")})})]})}const of="email",af={sendTranscript:()=>{const[t,e]=It(void 0),{hideOption:n}=Vi(),{focusButton:r}=qi(),{t:o}=Oi(),i=na(),{sendAction:a}=Ca(),s=Lt((()=>({[of]:[_c(Ec,o("options.sendTranscript.noEmailText")),_c(Tc,o("options.sendTranscript.invalidEmailText"))]})),[o]),c=Dt((t=>{var e;const o=ea()(e=t.email).call(e);a({type:"send_transcript",body:{emailAddress:o}}),n(),r()}),[a,n,r]),l=Dt((({isValid:t,isSubmitted:n})=>{e(n&&!t?"options--error":void 0)}),[e]);return Se(Ts,{className:t,headingText:o("options.sendTranscript.title"),cancelButtonText:o("options.cancelButtonText"),children:[Se("p",{className:Xo("options__description"),id:i,children:o("options.sendTranscript.description")}),Se(Gs,{formId:"sendTranscript",onSubmit:c,validationSchema:s,onError:l,children:Se(rf,{controlName:of,describedById:i})})]})}};var sf=()=>{const{optionActive:t}=Vi(),e=Pt(null),n=af[t||e.current];return t&&(e.current=t),n?Se(n,{}):null},cf=()=>{const{t:t}=Oi(),{menuOptions:e,showOption:n,panelActive:r,hideOption:o}=Vi(),{id:i}=qi(),a=Pt(null),[s,c]=It(!1),l=Pt(null),u=e.length,p=Pt(tf()({length:u},(()=>({current:null})))),f=Pt(!1),h=u>1,d=e[0],v=Lt((()=>{var t;return null==d||null===(t=d.name)||void 0===t?void 0:ea()(t).call(t).replace(/\s+/g,"")}),[d]);return jt((()=>()=>{clearTimeout(a.current)}),[]),jt((()=>{s&&!f.current&&requestAnimationFrame((()=>{requestAnimationFrame((()=>{const t=nf()(e).call(e,(t=>t.available)),n=-1===t?0:t;yn(p.current[n])}))})),f.current=s}),[s,e]),u?Se("div",{className:Xo("options__container"),onKeyDown:t=>{s&&(vn(t)===dn.Escape&&(c(!1),yn(l.current)),vn(t)===dn.Home&&(yn(p.current[0]),t.preventDefault()),vn(t)===dn.End&&(yn(p.current[u-1]),t.preventDefault()))},onfocusout:()=>{h&&(a.current=Ye()((()=>{c(!1)}),200))},onfocusin:()=>{clearTimeout(a.current)},children:[Se(xs,{transitionStartState:bs,isActive:r,children:Se("div",{className:Xo("options__dialog"),children:Se(sf,{})})}),h&&Se(xs,{isActive:s,transitionStartState:bs,children:Se("ul",{className:Xo(["options__menu"]),role:"menu",tabIndex:"-1","aria-labelledby":i,children:b()(e).call(e,(({name:r,title:o,available:i},a)=>Se("li",{className:Xo("options__menu__item"),role:"menuitem","data-testid":r,children:Se("button",{type:"button",ref:t=>{p.current[a]=t},className:Xo(["button","button--secondary"]),onKeyDown:t=>((t,e)=>{if(vn(t)===dn.ArrowDown){const n=Math.min(u-1,e+1);yn(p.current[e===n?0:n]),t.preventDefault()}if(vn(t)===dn.ArrowUp){const n=Math.max(0,e-1);yn(p.current[e===n?u-1:n]),t.preventDefault()}})(t,a),onKeyPress:t=>((t,n)=>{const r=String.fromCharCode(t.charCode);if(1!==r.length||!r.match(/\S/))return;let o=-1;T()(e).call(e,((t,e)=>{e>n&&t.title.charAt(0).toLowerCase()===r.toLowerCase()&&-1===o&&(o=e)})),-1!==o&&yn(p.current[o])})(t,a),onClick:()=>((t,e)=>{e&&(c(!1),n(t))})(r,i),"aria-disabled":i?null:"true",children:[Se("span",{className:Xo("button__text"),children:[o,!i&&" "]}),!i&&Se("span",{className:Xo("button__state"),children:t("options.unavailableText")})]})},r)))})}),Se("button",{type:"button",className:Xo(["button","button--secondary","chat__options__button",...!h&&v?[`chat__options__button--${v}`]:[]]),id:i,onClick:()=>{r&&o(),h?c((t=>!t)):d.available&&n(d.name)},onKeyDown:h?t=>{vn(t)===dn.ArrowDown&&(c(!0),t.preventDefault())}:null,ref:l,"aria-haspopup":h?"menu":null,"aria-expanded":h?s.toString():null,"aria-disabled":h||d.available?null:"true",children:[h&&Se(ds,{name:"options",size:"32"}),Se("span",{className:Xo("button__text"),children:h?t("options.openButtonText"):`${d.title}${d.available?"":" "}`}),!h&&!d.available&&Se("span",{className:Xo("button__state"),children:t("options.unavailableText")})]})]}):null};function lf(){const{menuOptions:t,allowOptionSelection:e}=Vi(),{isAvailable:n}=as();return n||e&&t.length?Se("div",{className:Xo("chat__options"),children:[n&&Se("div",{className:Xo("chat__options-item","chat__options-item--left"),children:Se(Oc,{})}),e&&Se("div",{className:Xo("chat__options-item","chat__options-item--right"),children:Se(cf,{})})]}):null}function uf(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}var pf=function({children:t,interruptComponent:e}){const{hasInterrupt:n,meta:r}=sa(),{isOpen:o}=_a();return Se(Y,{children:[Se(Ic,{}),Se("div",{className:Xo("chat__container"),children:n?o?Se(e,function(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=uf(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=uf(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}({},r)):null:t}),o&&Se(lf,{})]})};function ff(){const{preChatEvents:t,layoutMode:e}=He(),{hasInterrupt:n}=sa(),{isOpen:r}=_a(),o=!(n||!t.length||r);return o&&Se("ul",{className:Xo("pre-chat-messages",`pre-chat-messages--${e}`),"aria-hidden":!o,children:b()(t).call(t,(t=>Se("li",{className:Xo("pre-chat-messages__message"),children:Se(hf,{event:t})},t.payload.id)))})}function hf({event:t}){const[e]=zc(t);return Se(e,{event:t})}function df(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}const vf=()=>{const t=Ve(),e=xo(),{hasInterrupt:n}=sa(),r=e&&!n,o=r?e.avatar:t;return o?Se("img",{className:Xo(r?"avatar":"icon"),src:o,alt:""}):Se(ds,{name:"avatar",size:"32"})};var yf=({onClick:t})=>{const e=ii(),{t:n}=Oi(),r=n(e?"window.openButton.srContinue":"window.openButton.srStart"),o=Ui(),{isOpen:i}=_a(),a=bo(),s=Dt((()=>{t(),o()}),[o,t]);return Se(xs,{isActive:!i,transitionStartState:_s,children:Se("button",{className:Xo("window-open-button"),"aria-label":r,"aria-hidden":i,onClick:s,children:[Se("span",{className:Xo("message-count"),"aria-hidden":"true",children:!!a&&a}),Se(vf,{})]})})},mf=({onClick:t})=>{const{t:e}=Oi(),n=Dt((()=>t()),[t]);return Se("button",{type:"button",className:Xo("button","collapse-button"),onClick:n,children:Se(ds,{name:"chevronDown",size:"32",alt:e("window.srCollapseButton")})})};const gf={app:()=>(Ba(),Se(Dc,{children:Se(pf,{interruptComponent:Uc,children:[Se(Op,{}),Se(Zp,{})]})})),inline:()=>{Ba();const{isOpen:t}=_a(),{hasInterrupt:e,meta:n}=sa();return e&&!t?Se(Uc,function(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=df(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=df(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}({},n)):Se(Y,{children:[Se(xs,{isActive:!t,transitionStartState:_s,children:Se("div",{className:Xo("unstarted-wrapper","unstarted-wrapper--inline"),children:[Se(ff,{}),Se(Lc,{})]})}),Se(xs,{isActive:t,transitionStartState:_s,children:Se(Dc,{children:Se(pf,{interruptComponent:Uc,children:[t&&Se(Op,{}),Se(Zp,{})]})})})]})},window:()=>{const{openChat:t,closeChat:e}=Ba(),{isOpen:n}=_a(),r=ba(),{t:o}=Oi(),i=o("window.chat.continue"),a=Lt((()=>({payload:{body:{text:i}}})),[i]);return Se(Y,{children:[Se(yf,{onClick:t}),Se(xs,{isActive:!n&&!r,transitionStartState:_s,children:Se("div",{className:Xo("unstarted-wrapper","unstarted-wrapper--window"),children:Se(ff,{})})}),Se(xs,{isActive:!n&&r,transitionStartState:bs,children:Se("div",{className:Xo("unstarted-wrapper","unstarted-wrapper--window","unstarted-wrapper--continue"),children:Se(pu,{event:a})})}),Se(xs,{isActive:n,transitionStartState:bs,children:Se(Dc,{children:[n&&Se(mf,{onClick:e}),Se(pf,{interruptComponent:Uc,children:[Se(Op,{}),Se(Zp,{})]})]})})]})}};var bf=()=>{const[,t]=Li(),{namespace:e,layoutMode:n,zIndex:r}=He(),{isOpen:o,isVisible:i}=_a(),a=si(),s=ba(),{locale:c}=Oi(),l=gf[n],u=Dt((e=>{t(e)}),[t]),p=Lt((()=>{if(c&&document.querySelector("html").getAttribute("lang")!==c)return c}),[c]);if(!l)return console.warn('"layoutMode" should be one of "app", "inline" or "window"'),null;const f=["app",`app--layout-${n}`,`namespace--${e}`,...a];return o||"app"===n||f.push("app--collapsed"),s&&f.push("app--user-responded"),i&&Se("div",{className:Xo(f),lang:p,tabIndex:"-1","data-nosnippet":!0,style:{zIndex:r},ref:u,children:Se(l,{})})};function _f(t,e,n=[]){const r=Ut(ei),o=Pt();o.current=e,jt((()=>{if(!Gi()(n).call(n,Boolean))return;const e=(...t)=>{var e;return null===(e=o.current)||void 0===e?void 0:e.call(o,...t)};return r.emit("function.register",t,e),()=>r.emit("function.unregister",t,e)}),[r,t,...n])}var wf=()=>{const t=He(),{sendMessage:e,sendContext:n,sendAction:r}=Ca(),{setVisibility:o,visible:i}=_a(),a=Pt(i),s=Ut(ei),c=ni(),l=bo(),u=Pt(null),p=Pt(null),{isInline:f,isResolving:h}=Eo(),{hasInterrupt:d}=sa(),v=oi(),y=Pt(null),m=Ra(),{enableTranslations:g,disableTranslations:b}=as();return jt((()=>{a.current=i}),[i]),_f("askText",(t=>{e({body:t})}),[null==c?void 0:c.send]),_f("setVariables",(t=>{n({variables:t})}),[null==c?void 0:c.send]),_f("getVisibility",(t=>{t?t(a.current):console.warn("A callback function is required for the getVisibility action.")})),_f("setVisibility",(t=>{var e;rn()(e=S()(ye)).call(e,t)?(m(),o(t)):console.error('Requested visibility states should be "open", "minimized" ,"hidden" or null.')}),[null==t?void 0:t.api]),_f("sendCustomAction",((t,e)=>{r({type:"custom",body:{type:t,body:e}})}),[c.send]),_f("setTopic",(({name:t,fallbackMessage:e})=>{t&&e?r({type:"set_topic",body:{name:t,fallbackMessage:e}}):console.warn("A name and a fallbackMessage are required for the setTopic action.")}),[c.send]),_f("setTranslation",(({enabled:t,locale:e})=>{t?g(e):b()}),[c.send]),jt((()=>{h||d||(y.current&&y.current!==v&&s.emit("unreadMessageCount",l),i===ye.open&&i!==p.current&&0!==u.current&&s.emit("unreadMessageCount",0),i!==ye.open&&l!==u.current&&s.emit("unreadMessageCount",l),p.current=i,u.current=l,y.current=v)}),[l,i,s,f,h,d,v]),null};const{SET_EVENTS_READ:xf}=Bn;var Tf=()=>{const{t:t}=Oi(),e=mo(),n=ai(),{isOpen:r,isVisible:o}=_a(),{sendAction:i}=Ca(),a=bo(),{sendPolite:s}=Na(),c=Lt((()=>sn(s,2e3)),[s]),l=Pt(null),u=Pt(null);return jt((()=>{var t;if(!r)return;const o=b()(t=w()(e).call(e,(t=>Or(t)&&t.payload.messageStatus===In))).call(t,(t=>t.payload.id));o.length>0&&(n({type:xf,ids:o}),i({type:Pn,events:o}))}),[e,n,r,i]),jt((()=>{l.current!==o&&!o&&u.current&&u.current(),0!==a&&!r&&o&&(u.current=c(t("message.srTextUnreadCount",{unreadCount:a}))),l.current=o}),[a,r,o,c,t]),null},Ef=()=>{const{t:t}=Oi(),e=mo(),n=Pt(0),r=Pt(0),o=ho().historyLoaded,{sendPolite:i}=Na(),{isOpen:a}=_a(),s=Pt(null),c=Pt(null),l=Lt((()=>sn((e=>{const n=w()(e).call(e,(({payload:t})=>!t.fromClient&&!t.fromHistory)).length;n>r.current&&(i(t("message.srNewEventCount",{newCount:n-r.current})),r.current=n)}),1e3)),[i,t]);return jt((()=>{e.length>n.current&&(a&&(c.current=l(e)),n.current=e.length)}),[e,l,a]),jt((()=>{s.current&&!a&&c.current&&(c.current(!0),c.current=null)}),[a]),jt((()=>{o&&Ye()((()=>{i(t("window.srTexts.onHistoryLoad"))}),500)}),[o,t,i]),null},Sf=({children:t})=>{const e=Ut(ei),[n,r]=It({}),o=Pt(!0),i=Dt((t=>{o.current&&(r(t),e.emit("aria-live",t))}),[r,e]);jt((()=>{let t=null;return n&&n.messageText&&(t=Ye()((()=>{i({}),clearTimeout(t)}),500)),()=>{clearTimeout(t)}}),[n,i]),jt((()=>()=>{o.current=!1}),[]);const{ariaLive:a,messageText:s}=n;return Se(Ia.Provider,{value:i,children:[t,Se("div",{className:Xo("app__live-container"),children:[Se("div",{"aria-live":"assertive","aria-atomic":"true",className:Xo("visually-hidden"),children:a===Mn?s:null}),Se("div",{"aria-live":"polite","aria-atomic":"true",className:Xo("visually-hidden"),children:a===zn?s:null})]})]})},kf=()=>{const{hasCountdown:t,isActive:e,remaining:n,decrementCountdown:r}=Ya();return((t,e)=>{const n=Pt(t);jt((()=>{n.current=t}),[t]),jt((()=>{if(null!==e){const t=La()((function(){n.current()}),e);return()=>clearInterval(t)}}),[e])})((()=>{r()}),t&&e&&n>0?1e3:null),null},Af=({children:t})=>{const e=Pt(0),{sendAction:n}=Ca(),{hasCountdown:r,isActive:o,stopCountdown:i}=Ya(),a=Dt((()=>{const t=(new Date).getTime(),a=()=>{n({type:"interactivity_update"}),e.current=t};r&&o&&(a(),i()),t-e.current>15e3&&a()}),[n,r,o,i]);return Se("div",{className:Xo("activity-monitor"),tabIndex:"-1",onMouseDown:a,onKeyUp:a,onTouchStart:a,onMouseMove:a,onWheel:a,onPointerDown:a,onPointerMove:a,children:Se(ja.Provider,{value:a,children:t})})},Of=()=>{const{initUserSelectedOptions:t}=Vi(),e=Pt(!1),n=He();return jt((()=>{n.api&&!e.current&&(e.current=!0,t())}),[t,n]),null};const Cf=["serviceSettings"],{ADD_EVENT:If,ACK_EVENT:Nf,SET_IS_LOADING:jf,SET_PARTICIPANT:Rf,SET_HEADER_SUB_TITLE:Pf,SET_ACTIVE_SERVICE:Lf,INIT_RESUME_CONVERSATION_PROMPT:Df,CLEAR_EVENTS:Uf,SET_SERVICE_DATA_ITEM:Mf,SET_FEATURE_ENABLED_STATE:zf,SET_SERVICE_ENTRY_METADATA:Ff,SET_HISTORY:$f}=Bn,Bf=["text","choice_prompt","image","video"];var Hf=({eventBus:t})=>{const{t:e}=Oi(),n=ni(),r=ai(),o=mo(),i=Pt(null),{setUserSelectedOption:a}=Vi(),{initCountdown:s,endCountdown:c}=Ya(),{emitEvent:l}=Ca();return jt((()=>{if(n.connectionInfo){var e;const o=t=>{const{payload:e}=t;if(!e||!e.participant)return;const{fromClient:n,participant:o}=e;!n&&o.name&&r({type:Pf,title:o.name}),r({type:Rf,participant:o,fromClient:n}),o.introduction&&r({type:If,event:t})};n.stream().subscribe({next:e=>{const{type:n,payload:i}=e;switch(n){case"ui":switch(i.state&&i.state.hasOwnProperty("loading")&&r({type:jf,isLoading:i.state.loading}),i.type){case"idle_detach_countdown":s(i.body.duration);break;case"idle_detach_countdown_elapsed":c(void 0,!0);break;case"resume_conversation_prompt":r({type:Df});break;case"user_first_response":r($o(!0)),t.emit("system.userFirstResponse",i.body)}break;case"message":switch(o(i),i.type){case"text":case"choice_prompt":case"splash":case"image":case"upload":case"video":case"cta":case"custom":case"carousel":case"card":i.service&&i.service.serviceSessionId&&r({type:Lf,activeServiceSessionId:i.service.serviceSessionId}),r({type:If,event:e})}break;case"participant":o(e);break;case"service_data":i.persist&&r({type:Mf,payload:i});break;case"ack":r({type:Nf,event:e});break;case"system":if("service_changed"===i.type){const{serviceSettings:t}=i,e=L(i,Cf),{uploads:n,entry:o}=t;r({type:zf,key:$n,enabled:!(!n||!n.enabled)}),r({type:Ff,entryMeta:o}),r({type:Lf,activeServiceSessionId:i.serviceSessionId}),l("system.serviceChanged",e)}break;case"info":"divider"!==i.type&&"text"!==i.type&&"translation"!==i.type||r({type:If,event:e});break;case"error":switch(i.type){case"find_conversation_erred":r(zo(new Lo(e)));break;case"seamly_offline":r(zo(new ua(e))),r({type:Uf});break;default:r(zo(new ca(e)))}break;case"socket_opened":r(Fo())}}}),w()(e=n.stream()).call(e,(t=>"message"===t.type&&rn()(Bf).call(Bf,t.payload.type))).subscribe({next:({payload:e})=>{e.id!==i.current&&t.emit("message",e),i.current=e.id}})}}),[r,n,t,e,a,s,c,l]),jt((()=>{if(n.stream){const e=w()(t=n.stream()).call(t,(t=>"sync"===t.type)).subscribe({next:t=>{const{payload:e}=t,i=o[o.length-1],{id:a}=e.lastEvent;i&&a===i.payload.id||n.getConversation().then((t=>{t&&r({type:$f,history:t})})).catch((t=>{r(zo(t))}))}});return()=>{e.unsubscribe()}}var t;return()=>{}}),[n,o,r]),null};const{REGISTER_UPLOAD:Vf,SET_UPLOAD_PROGRESS:qf,SET_UPLOAD_ERROR:Wf,SET_UPLOAD_COMPLETE:Gf}=Bn;var Kf=({children:t})=>{const{t:e}=Oi(),n=ai(),r=ni(),{addUploadBubble:o}=Ca();return Se(Ki.Provider,{value:t=>{const i=Jt(),a=r.uploadFile(t,(t=>{n({type:qf,fileId:i,progress:Math.ceil(t)})}),(t=>{const{id:e,transactionId:r,occurredAt:a,body:{contentType:s,filename:c,filesize:l,url:u}}=t.body;n({type:Gf,fileId:i}),o(e,r,a,s,c,l,u)}),(t=>{let r;switch(t&&t.body?t.body.error:""){case"file_uploads_are_disabled":r=e("fileUpload.errors.unavailable");break;case"request_entity_too_large":r=e("fileUpload.errors.tooLarge");break;case"file_has_invalid_mime_type":r=e("fileUpload.errors.wrongType");break;case"virus_found":r=e("fileUpload.errors.virusFound");break;default:r=e("fileUpload.errors.general")}n({type:Wf,fileId:i,errorText:r})}));n({type:Vf,fileId:i,fileName:t.name,uploadHandle:a})},children:t})};const{createAction:Yf}=re("errors"),Jf=Yf("catch-error",(t=>({error:t})));function Qf({api:t}){return({getState:e})=>{const n=n=>{const{errorCallback:r,namespace:o,api:i,layoutMode:a}=be(e());null==r||r(n.error,{namespace:o,api:i,layoutMode:a,conversationUrl:t.getConversationUrl(),action:n.type?n:void 0})};return t=>e=>{try{return e.error&&n(e),t(e)}catch(t){throw n({error:t}),t}}}}var Zf=({store:t,children:e,config:n,eventBus:r,api:o})=>(function(e){var n=Ct(mt++,10),r=It();n.__=e=>t.dispatch(Jf(e)),gt.componentDidCatch||(gt.componentDidCatch=function(t){n.__&&n.__(t),r[1](t)}),r[0]}(),Se(ke,{store:t,children:Se(ei.Provider,{value:r,children:Se(ti.Provider,{value:o,children:Se(Sf,{children:Se(kp,{children:[Se(Of,{config:n}),Se(Hf,{eventBus:r}),Se(Tf,{}),Se(Ef,{}),Se(kf,{}),Se(Af,{children:[Se(wf,{}),Se(Kf,{children:e})]})]})})})})}));function Xf(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function th(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Xf(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Xf(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var eh=t=>Se(Zf,th(th({},t),{},{children:Se(bf,{})})),nh=n(3813),rh=n.n(nh),oh=n(1766),ih=n.n(oh);n(8604);var ah=n(9340),sh=n.n(ah),ch=t=>"function"==typeof t?t:function(){return t},lh="undefined"!=typeof self?self:null,uh="undefined"!=typeof window?window:null,ph=lh||uh||void 0,fh="closed",hh="errored",dh="joined",vh="joining",yh="leaving",mh="phx_close",gh="phx_error",bh="phx_reply",_h="phx_leave",wh=class{constructor(t,e,n,r){this.channel=t,this.event=e,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:t,response:e,_ref:n}){var r,o;T()(r=w()(o=this.recHooks).call(o,(e=>e.status===t))).call(r,(t=>t.callback(e)))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,(t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)})),this.timeoutTimer=Ye()((()=>{this.trigger("timeout",{})}),this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},xh=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=Ye()((()=>{this.tries=this.tries+1,this.callback()}),this.timerCalc(this.tries+1))}},Th=class{static request(t,e,n,r,o,i,a){if(ph.XDomainRequest){let n=new ph.XDomainRequest;this.xdomainRequest(n,t,e,r,o,i,a)}else{let s=new ph.XMLHttpRequest;this.xhrRequest(s,t,e,n,r,o,i,a)}}static xdomainRequest(t,e,n,r,o,i,a){t.timeout=o,t.open(e,n),t.onload=()=>{let e=this.parseJSON(t.responseText);a&&a(e)},i&&(t.ontimeout=i),t.onprogress=()=>{},t.send(r)}static xhrRequest(t,e,n,r,o,i,a,s){t.open(e,n,!0),t.timeout=i,t.setRequestHeader("Content-Type",r),t.onerror=()=>{s&&s(null)},t.onreadystatechange=()=>{if(4===t.readyState&&s){let e=this.parseJSON(t.responseText);s(e)}},a&&(t.ontimeout=a),t.send(o)}static parseJSON(t){if(!t||""===t)return null;try{return JSON.parse(t)}catch(e){return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let n=[];for(var r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let o=e?`${e}[${r}]`:r,i=t[r];"object"==typeof i?n.push(this.serialize(i,o)):n.push(encodeURIComponent(o)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(t,e){if(0===N()(e).length)return t;let n=t.match(/\?/)?"&":"?";return`${t}${n}${this.serialize(e)}`}},Eh=class{constructor(t){this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=0,this.poll()}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/websocket"),"$1/longpoll")}endpointURL(){return Th.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(){this.close(),this.readyState=0}ontimeout(){this.onerror("timeout"),this.closeAndRetry()}poll(){var t;1!==this.readyState&&0!==this.readyState||Th.request("GET",this.endpointURL(),"application/json",null,this.timeout,i()(t=this.ontimeout).call(t,this),(t=>{if(t){var{status:e,token:n,messages:r}=t;this.token=n}else e=0;switch(e){case 200:T()(r).call(r,(t=>{Ye()((()=>{this.onmessage({data:t})}),0)})),this.poll();break;case 204:this.poll();break;case 410:this.readyState=1,this.onopen(),this.poll();break;case 403:this.onerror(),this.close();break;case 0:case 500:this.onerror(),this.closeAndRetry();break;default:throw new Error(`unhandled poll status ${e}`)}}))}send(t){var e;Th.request("POST",this.endpointURL(),"application/json",t,this.timeout,i()(e=this.onerror).call(e,this,"timeout"),(t=>{t&&200===t.status||(this.onerror(t&&t.status),this.closeAndRetry())}))}close(t,e){this.readyState=3,this.onclose()}},Sh={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(sh()(n))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[n,r,o,i,a]=JSON.parse(t);return e({join_ref:n,ref:r,topic:o,event:i,payload:a})}},binaryEncode(t){let{join_ref:e,ref:n,event:r,topic:o,payload:i}=t,a=this.META_LENGTH+e.length+n.length+o.length+r.length,s=new ArrayBuffer(this.HEADER_LENGTH+a),c=new DataView(s),l=0;c.setUint8(l++,this.KINDS.push),c.setUint8(l++,e.length),c.setUint8(l++,n.length),c.setUint8(l++,o.length),c.setUint8(l++,r.length),tf()(e,(t=>c.setUint8(l++,t.charCodeAt(0)))),tf()(n,(t=>c.setUint8(l++,t.charCodeAt(0)))),tf()(o,(t=>c.setUint8(l++,t.charCodeAt(0)))),tf()(r,(t=>c.setUint8(l++,t.charCodeAt(0))));var u=new Uint8Array(s.byteLength+i.byteLength);return u.set(new Uint8Array(s),0),u.set(new Uint8Array(i),s.byteLength),u.buffer},binaryDecode(t){let e=new DataView(t),n=e.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(t,e,r);case this.KINDS.reply:return this.decodeReply(t,e,r);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,r)}},decodePush(t,e,n){let r=e.getUint8(1),o=e.getUint8(2),i=e.getUint8(3),a=this.HEADER_LENGTH+this.META_LENGTH-1,s=n.decode(Gt()(t).call(t,a,a+r));a+=r;let c=n.decode(Gt()(t).call(t,a,a+o));a+=o;let l=n.decode(Gt()(t).call(t,a,a+i));return a+=i,{join_ref:s,ref:null,topic:c,event:l,payload:Gt()(t).call(t,a,t.byteLength)}},decodeReply(t,e,n){let r=e.getUint8(1),o=e.getUint8(2),i=e.getUint8(3),a=e.getUint8(4),s=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(Gt()(t).call(t,s,s+r));s+=r;let l=n.decode(Gt()(t).call(t,s,s+o));s+=o;let u=n.decode(Gt()(t).call(t,s,s+i));s+=i;let p=n.decode(Gt()(t).call(t,s,s+a));s+=a;let f=Gt()(t).call(t,s,t.byteLength);return{join_ref:c,ref:l,topic:u,event:bh,payload:{status:p,response:f}}},decodeBroadcast(t,e,n){let r=e.getUint8(1),o=e.getUint8(2),i=this.HEADER_LENGTH+2,a=n.decode(Gt()(t).call(t,i,i+r));i+=r;let s=n.decode(Gt()(t).call(t,i,i+o));return i+=o,{join_ref:null,ref:null,topic:a,event:s,payload:Gt()(t).call(t,i,t.byteLength)}}};function kh(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ah(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=kh(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=kh(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var Oh=n(1905),Ch=n.n(Oh);function Ih(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Nh(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Ih(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Ih(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const jh=Ch()("seamly");class Rh{constructor(t,e,n,r){this.url=t,this.accessToken=r,this.channelName=e,this.channelTopic=n,this.connect(),this.socket.onError((t=>{jh("[SOCKET][ERROR]",t),this.emit({type:"error",payload:{type:"seamly_offline",error:t}})})),this.socket.onOpen((()=>{jh("[SOCKET]OPEN"),this.emit({type:"socket_opened"})})),this.channel.on("system",(t=>{switch(t.type){case"attach_channel_succeeded":this.emit({type:"connection",connected:!0,ready:!0})}})),this.socket.onClose((()=>{jh("[SOCKET]CLOSE"),this.emit({type:"connection",connected:!1,ready:!1})})),this.channel.onClose((()=>{jh("[CHANNEL]CLOSE"),this.emit({type:"connection",connected:!1,ready:!1})})),this.channel.onError((t=>{jh("[CHANNEL][ERROR]",t),this.emit({type:"connection",connected:!1,ready:!1})})),this.listenTo("ack"),this.listenTo("ui"),this.listenTo("error"),this.listenTo("participant",((t,e)=>Nh(Nh({},e),{},{type:t}))),this.listenTo("message"),this.listenTo("service_data"),this.listenTo("system"),this.listenTo("info"),this.listenTo("sync")}start(t){this.listener=t,this.channel.join().receive("ok",(()=>{jh("[CHANNEL][JOIN] OK"),this.emit({type:"connection",connected:!0,ready:!1})})).receive("error",(t=>{jh("[CHANNEL][JOIN] ERROR",t),this.emit({type:"error",payload:{type:"join_channel_erred",error:t}}),this.emit({type:"connection",connected:!1,ready:!1}),this.channel.socket.disconnect()})).receive("timeout",(()=>{jh("[CHANEL][JOIN] Networking issue. Still waiting...")}))}stop(){this.listener=null}connect(){const{url:t,params:e}=(t=>{var e;const n=Xe()(t).call(t,"?");return n<0?{url:t,params:{}}:{url:Gt()(t).call(t,0,n),params:en()(e=Gt()(t).call(t,n+1).split("&")).call(e,(function(t,e){const[n,r]=e.split("=");return Ah(Ah({},t),{},{[n]:decodeURIComponent(r)})}),{})}})(this.url);this.socket=new class{constructor(t,e={}){var n,r;this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=e.timeout||1e4,this.transport=e.transport||ph.WebSocket||Eh,this.establishedConnections=0,this.defaultEncoder=i()(n=Sh.encode).call(n,Sh),this.defaultDecoder=i()(r=Sh.decode).call(r,Sh),this.closeWasClean=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.transport!==Eh?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let o=null;uh&&uh.addEventListener&&(uh.addEventListener("pagehide",(t=>{this.conn&&(this.disconnect(),o=this.connectClock)})),uh.addEventListener("pageshow",(t=>{o===this.connectClock&&(o=null,this.connect())}))),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.rejoinAfterMs=t=>e.rejoinAfterMs?e.rejoinAfterMs(t):[1e3,2e3,5e3][t-1]||1e4,this.reconnectAfterMs=t=>e.reconnectAfterMs?e.reconnectAfterMs(t):[10,50,100,150,200,250,500,1e3,2e3][t-1]||5e3,this.logger=e.logger||null,this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=ch(e.params||{}),this.endPoint=`${t}/websocket`,this.vsn=e.vsn||"2.0.0",this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new xh((()=>{this.teardown((()=>this.connect()))}),this.reconnectAfterMs)}replaceTransport(t){this.disconnect(),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=Th.appendParams(Th.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return"/"!==t.charAt(0)?t:"/"===t.charAt(1)?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,n){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(t,e,n)}connect(t){this.connectClock++,t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=ch(t)),this.conn||(this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=t=>this.onConnError(t),this.conn.onmessage=t=>this.onConnMessage(t),this.conn.onclose=t=>this.onConnClose(t))}log(t,e,n){this.logger(t,e,n)}hasLogger(){return null!==this.logger}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onConnOpen(){var t;this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),T()(t=this.stateChangeCallbacks.open).call(t,(([,t])=>t()))}heartbeatTimeout(){this.pendingHeartbeatRef&&(this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),this.abnormalClose("heartbeat timeout"))}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,clearTimeout(this.heartbeatTimer),Ye()((()=>this.sendHeartbeat()),this.heartbeatIntervalMs))}teardown(t,e,n){if(!this.conn)return t&&t();this.waitForBufferDone((()=>{this.conn&&(e?this.conn.close(e,n||""):this.conn.close()),this.waitForSocketClosed((()=>{this.conn&&(this.conn.onclose=function(){},this.conn=null),t&&t()}))}))}waitForBufferDone(t,e=1){5!==e&&this.conn&&this.conn.bufferedAmount?Ye()((()=>{this.waitForBufferDone(t,e+1)}),150*e):t()}waitForSocketClosed(t,e=1){5!==e&&this.conn&&3!==this.conn.readyState?Ye()((()=>{this.waitForSocketClosed(t,e+1)}),150*e):t()}onConnClose(t){var e;let n=t&&t.code;this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(),clearTimeout(this.heartbeatTimer),this.closeWasClean||1e3===n||this.reconnectTimer.scheduleTimeout(),T()(e=this.stateChangeCallbacks.close).call(e,(([,e])=>e(t)))}onConnError(t){var e;this.hasLogger()&&this.log("transport",t);let n=this.transport,r=this.establishedConnections;T()(e=this.stateChangeCallbacks.error).call(e,(([,e])=>{e(t,n,r)})),(n===this.transport||r>0)&&this.triggerChanError()}triggerChanError(){var t;T()(t=this.channels).call(t,(t=>{t.isErrored()||t.isLeaving()||t.isClosed()||t.trigger(gh)}))}connectionState(){switch(this.conn&&this.conn.readyState){case 0:return"connecting";case 1:return"open";case 2:return"closing";default:return"closed"}}isConnected(){return"open"===this.connectionState()}remove(t){var e;this.off(t.stateChangeRefs),this.channels=w()(e=this.channels).call(e,(e=>e.joinRef()!==t.joinRef()))}off(t){for(let n in this.stateChangeCallbacks){var e;this.stateChangeCallbacks[n]=w()(e=this.stateChangeCallbacks[n]).call(e,(([e])=>-1===Xe()(t).call(t,e)))}}channel(t,e={}){let n=new class{constructor(t,e,n){this.state=fh,this.topic=t,this.params=ch(e||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new wh(this,"phx_join",this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new xh((()=>{this.socket.isConnected()&&this.rejoin()}),this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError((()=>this.rejoinTimer.reset()))),this.stateChangeRefs.push(this.socket.onOpen((()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()}))),this.joinPush.receive("ok",(()=>{var t;this.state=dh,this.rejoinTimer.reset(),T()(t=this.pushBuffer).call(t,(t=>t.send())),this.pushBuffer=[]})),this.joinPush.receive("error",(()=>{this.state=hh,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()})),this.onClose((()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic} ${this.joinRef()}`),this.state=fh,this.socket.remove(this)})),this.onError((t=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,t),this.isJoining()&&this.joinPush.reset(),this.state=hh,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()})),this.joinPush.receive("timeout",(()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic} (${this.joinRef()})`,this.joinPush.timeout),new wh(this,_h,ch({}),this.timeout).send(),this.state=hh,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()})),this.on(bh,((t,e)=>{this.trigger(this.replyEventName(e),t)}))}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(t){this.on(mh,t)}onError(t){return this.on(gh,(e=>t(e)))}on(t,e){let n=this.bindingRef++;return this.bindings.push({event:t,ref:n,callback:e}),n}off(t,e){var n;this.bindings=w()(n=this.bindings).call(n,(n=>!(n.event===t&&(void 0===e||e===n.ref))))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,n=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new wh(this,t,(function(){return e}),n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=yh;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(mh,"leave")},n=new wh(this,_h,ch({}),t);return n.receive("ok",(()=>e())).receive("timeout",(()=>e())),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(t,e,n){return e}isMember(t,e,n,r){return!(this.topic!==t||r&&r!==this.joinRef()&&(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:n,joinRef:r}),1))}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=vh,this.joinPush.resend(t))}trigger(t,e,n,r){var o;let i=this.onMessage(t,e,n,r);if(e&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let a=w()(o=this.bindings).call(o,(e=>e.event===t));for(let t=0;t<a.length;t++)a[t].callback(i,n,r||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===fh}isErrored(){return this.state===hh}isJoined(){return this.state===dh}isJoining(){return this.state===vh}isLeaving(){return this.state===yh}}(t,e,this);return this.channels.push(n),n}push(t){if(this.hasLogger()){let{topic:e,event:n,payload:r,ref:o,join_ref:i}=t;this.log("push",`${e} ${n} (${i}, ${o})`,r)}this.isConnected()?this.encode(t,(t=>this.conn.send(t))):this.sendBuffer.push((()=>this.encode(t,(t=>this.conn.send(t)))))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimer=Ye()((()=>this.heartbeatTimeout()),this.heartbeatIntervalMs))}abnormalClose(t){this.closeWasClean=!1,this.isConnected()&&this.conn.close(1e3,t)}flushSendBuffer(){var t;this.isConnected()&&this.sendBuffer.length>0&&(T()(t=this.sendBuffer).call(t,(t=>t())),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,(t=>{let{topic:e,event:n,payload:r,ref:o,join_ref:i}=t;o&&o===this.pendingHeartbeatRef&&(clearTimeout(this.heartbeatTimer),this.pendingHeartbeatRef=null,Ye()((()=>this.sendHeartbeat()),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${r.status||""} ${e} ${n} ${o&&"("+o+")"||""}`,r);for(let t=0;t<this.channels.length;t++){const a=this.channels[t];a.isMember(e,n,r,i)&&a.trigger(n,r,o,i)}for(let e=0;e<this.stateChangeCallbacks.message.length;e++){let[,n]=this.stateChangeCallbacks.message[e];n(t)}}))}leaveOpenTopic(t){var e;let n=Tn()(e=this.channels).call(e,(e=>e.topic===t&&(e.isJoined()||e.isJoining())));n&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),n.leave())}}(t,{params:Nh(Nh({},e),{},{v:We})}),this.socket.connect(),this.channel=this.socket.channel(this.channelTopic,{authorization:`Bearer ${this.accessToken}`,channelName:this.channelName})}disconnect(){return new(Pr())((t=>{this.socket.disconnect(t)}))}listenTo(t,e=null){this.channel.on(t,(n=>{jh("[RECEIVE]",t,n),this.emit({type:t,payload:e?e(t,n):n})}))}emit(t){this.listener&&this.listener.next(t)}push(t,e,n){this.channel.push(t,e,n)}}function Ph(t){const e="cvco."+t;return{get(){var t;const n=[e,Gt()(t=e.split(".")).call(t,0,-1).join(".")];let r;do{r=sessionStorage.getItem(n[0])}while(n.shift()&&!r);return JSON.parse(r)},set(t){t&&sessionStorage.setItem(e,sh()(t))}}}class Lh{constructor(t){this.name=t}emit(t){this.listener&&this.listener.next(t)}start(t){this.listener=t}stop(){this.listener=null}}function Dh(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Uh(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Dh(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Dh(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const Mh=Ch()("seamly");function zh(){if(!Intl||"undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;const t=Intl.DateTimeFormat();if(void 0===t||void 0===t.resolvedOptions)return null;const e=t.resolvedOptions().timeZone;return e&&(Xe()(e).call(e,"/")>-1||"UTC"===e)?e:null}class Fh{constructor({layoutMode:t,namespace:e,config:n={},context:r={}}){var o;this.store=function(t,e){const n=e(t),r=n.get()||{};return{get:t=>void 0===t?r:r[t],set:(t,e)=>(r[t]=e,n.set(r),e),delete(t){const e=this.get(t);return delete r[t],n.set(r),e}}}(`${e}.connection${r.locale?"."+r.locale:""}`,n.storageProvider||Ph),this.connectionInfo={apiKey:n.key,domain:n.domain||"api.seamly-app.com",secure:!1!==n.secure&&(n.secure||!0)},this.config={sendEnvironment:n.sendEnvironment??!0,context:Uh(Uh({},r),{},{channelName:r.channelName||"web"})},this.connected=!1,this.configReady=!1,this.externalId=n.externalId,this.layoutMode=t,this.internalProducer=new Lh("API"),this.internal$=rh().create(this.internalProducer).flatten(),this.connection$=w()(o=this.internal$).call(o,(t=>"connection"===t.type)),this.connection$.subscribe({next:({connected:t,ready:e})=>{this.connected=t,this.ready=e}}),this.URLS={}}getAccessToken(){return this.store.get("accessToken")}setAccessToken(t){this.store.set("accessToken",t)}getConversationUrl(){return this.store.get("conversationUrl")}setConversationUrl(t){this.store.set("conversationUrl",t)}hasConversation(){return!!this.getConversationUrl()}getChannelTopic(){return this.store.get("channelTopic")||this.store.get("channelName")}setChannelTopic(t){this.store.set("channelTopic",t)}clearStore(){this.store.delete("accessToken"),this.store.delete("conversationUrl"),this.store.delete("channelName"),this.store.delete("channelTopic")}getUrlPrefix(t){return`${this.connectionInfo.secure?`${t}s`:t}://${this.connectionInfo.domain}`}updateUrls({_links:t}){var e,n;this.URLS=en()(e=w()(n=C()(t)).call(n,(([t])=>"self"!==t))).call(e,((t,[e,{href:n}])=>Uh(Uh({},t),{},{[e]:n})),this.URLS)}async reset(){return await this.disconnect(),this.clearStore(),this.getConfig()}async disconnect(){this.conversationProducer&&await this.conversationProducer.disconnect(),this.connected=!1,this.configReady=!1}async createConversation(){try{const t=ih().post(`${this.getUrlPrefix("http")}${this.URLS.conversations}`).set("Content-Type","application/json").query({v:We}).withCredentials().send({externalId:this.externalId||void 0}),{body:e}=await t,{conversation:n}=e,r=Uh({},n);return delete r.accessToken,delete r.channelTopic,this.setAccessToken(n.accessToken),this.setChannelTopic(n.channelTopic),this.updateUrls(e),this.setConversationUrl(this.URLS.conversation),r}catch(t){if(t.status>=500)throw new ca(t);throw t}}getConfig(){return ih().post(`${this.getUrlPrefix("http")}/client/${this.connectionInfo.apiKey}/configs`).set("Content-Type","application/json").query({v:We}).send({context:Uh(Uh({},this.config.context),{},{environment:!0===this.config.sendEnvironment?this.getEnvironment():this.config.sendEnvironment})}).then((({body:t})=>(this.updateUrls(t),this.configReady=!0,t.config))).catch((t=>{if(404===t.status)throw new la;if(t.status>=500)throw new ca(t);throw t}))}async getConversation(){if(!this.hasConversation())return null;try{const{body:t}=await ih().get(`${this.getUrlPrefix("http")}${this.URLS.history}`).set("Authorization",`Bearer ${this.getAccessToken()}`).query({v:We});this.updateUrls(t);const{messages:e,participants:n,activeServiceSessionId:r,activeServiceSettings:o,serviceData:i,ui:a,translation:s}=t.history;return{events:b()(e).call(e,(([t,e])=>({type:t,payload:Uh(Uh({},e),{},{type:"participant"===t?t:e.type})}))),participants:n,activeServiceSessionId:r,activeServiceSettings:o,serviceData:i,resumeConversationPrompt:!!a&&Boolean(a.resumeConversationPrompt),translation:s}}catch(t){if(401===t.status)throw new pa(t);if(404===t.status)throw new Lo(t);if(t.status>=500)throw new ca(t);throw t}}async connect(){this.connected=!1;let t=null;return this.hasConversation()||(t=await this.createConversation()),this.conversationProducer=new Rh(`${this.getUrlPrefix("ws")}${this.URLS.socket}`,this.config.context.channelName,this.getChannelTopic(),this.getAccessToken()),this.internalProducer.emit(rh().create(this.conversationProducer)),this.config.sendEnvironment&&this.send("context",{environment:!0===this.config.sendEnvironment?this.getEnvironment():this.config.sendEnvironment},!1),t}uploadFile(t,e,n,r){const o=new FormData;o.append("upload",t);const i=ih().post(`${this.getUrlPrefix("http")}${this.URLS.uploads}`).set("Authorization",`Bearer ${this.getAccessToken()}`).send(o);return i.on("progress",(function(t){const{direction:n,percent:r}=t;"upload"===n&&"function"==typeof e&&e(r)})),i.then((t=>{n&&n(t)})).catch((t=>{if(!r)throw t;r(t.response)})),i}getConversationIntitialState(){return ih().get(`${this.getUrlPrefix("http")}${this.getConversationUrl()}`).set("Authorization",`Bearer ${this.getAccessToken()}`).query({v:We}).then((({body:t})=>(this.updateUrls(t),((t,e)=>{var n;return en()(n=N()(t)).call(n,((n,r)=>(rn()(e).call(e,r)||(n[r]=t[r]),n)),{})})(t.conversation,["accessToken","channelTopic"])))).catch((t=>{if(401===t.status)throw new pa(t);if(404===t.status)throw new Lo(t);if(t.status>=500)throw new ca(t);throw t}))}async getTranslations(t){try{const e=`${this.getUrlPrefix("http")}${this.URLS.translations}`.replace("{version}",String(1)).replace("{locale}",t),n=ih().get(e),{body:r}=await n;return r.translations}catch(t){if(t.status>=500)throw new ca(t);throw t}}send(t,e,n=!0){var r;!this.connected||n&&!this.ready?w()(r=this.connection$).call(r,(t=>n?t.connected&&t.ready:t.connected)).take(1).subscribe({next:()=>this.send(t,e,n)}):(Mh("[SEND]",t,e),this.conversationProducer.push(t,function(t,e){if("message"!==t)return e;const{type:n,body:r}=e;let{transactionId:o}=e;return o||(o=Jt()),{type:n,body:r,transactionId:o}}(t,e),1e4))}sendContext(t={}){const{locale:e,variables:n}=t,r={};if(e){if("string"!=typeof e)throw new Error("Locale must be a string");r.locale=e}if(n){if("object"!=typeof n)throw new Error("Variables must be an object");r.variables=n}0===N()(r).length&&r.constructor===Object||this.send("context",r,!1)}stream(){var t;return w()(t=this.internal$).call(t,(t=>"connection"!==t.type))}getEnvironment(){return{clientName:"@seamly/web-ui",clientVariant:this.layoutMode,clientVersion:"20.2.0",currentUrl:window.location.toString(),screenResolution:`${window.screen.width}x${window.screen.height}`,timezone:zh(),userAgent:navigator.userAgent}}}function $h(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(o){return"function"==typeof o?o(n,r,t):e(o)}}}}var Bh=$h();Bh.withExtraArgument=$h;var Hh=Bh;function Vh(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function qh(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Vh(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Vh(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}function Wh({api:t}){return()=>e=>n=>{const r=e(n);switch(n.type){case Bn.SET_USER_SELECTED_OPTIONS:t.store.set("options",n.options);break;case Bn.SET_USER_SELECTED_OPTION:t.store.set("options",qh(qh({},t.store.get("options")||{}),{},{[n.option]:n.value}))}return r}}const Gh={events:[],initialState:{},unreadEvents:0,isLoading:!1,idleDetachCountdown:{hasCountdown:!1,isActive:!1},resumeConversationPrompt:!1,serviceInfo:{activeServiceSessionId:""},participantInfo:{participants:{},currentAgent:""},headerTitles:{title:null,subTitle:""},historyLoaded:!1,skiplinkTargetId:Jt(),optionsButtonId:Jt(),headerCollapseButtonId:Jt(),serviceData:{},options:{features:{},panelActive:!1,optionActive:"",userSelectedOptions:{}},showFileUpload:!1,currentUploads:[],entryMeta:{default:On,active:On,userSelected:null,blockAutoEntrySwitch:!1,options:{},optionsOverride:{}},seamlyContainerElement:null};function Kh(t=Gh,e){return e.type===String(Bo.pending)?Gh:((t,e)=>{var n,r,o,i,a,s,c,l,u,p;switch(e.type){case Vn:const{type:f,payload:h}=e.event,d=t.options.features.hasOwnProperty($n),v=jr(t.entryMeta,h);let y=Sn({},t.options);if(d&&(f===kn.message||f===kn.participant)&&!h.fromClient){const{type:t}=h.entry||{};y=Sn(Sn({},y),{},{features:Sn(Sn({},y.features),{},{uploads:Sn(Sn({},y.features.uploads),{},{enabledFromEntry:t===Cn})})})}const m=Or(e.event);return Tn()(n=t.events).call(n,(t=>t.payload.id===h.id))?t:Sn(Sn({},t),{},{entryMeta:d||v.active!==Cn?v:Sn({},t.entryMeta),options:y,unreadEvents:m?t.unreadEvents+1:t.unreadEvents,events:[...t.events,Sn(Sn({},e.event),{},{payload:Sn(Sn({},m&&{messageStatus:h.fromClient?Nn:In}),h)})]});case Kn:if(!e.event.payload.transactionId)return console.warn("ACK received without transaction ID."),t;const g=Tn()(r=t.events).call(r,(t=>t.payload.transactionId===e.event.payload.transactionId)),{id:_,occurredAt:x}=e.event.payload;return g?Sn(Sn({},t),{},{events:Cr(b()(o=t.events).call(o,(t=>t.payload.id===g.payload.id?Sn(Sn({},t),{},{payload:Sn(Sn({},t.payload),{},{id:_,occurredAt:x})}):t)))}):t;case qn:return Sn(Sn({},t),{},{unreadEvents:0,events:[]});case Gn:return Sn(Sn({},t),{},{unreadEvents:0,events:b()(i=t.events).call(i,(t=>{var n;return-1!==Xe()(n=e.ids).call(n,t.payload.id)?Sn(Sn({},t),{},{payload:Sn(Sn({},t.payload),t.payload.messageStatus===In&&{messageStatus:Nn})}):t}))});case Wn:const{events:T,participants:E,activeServiceSessionId:S,activeServiceSettings:k={},serviceData:A,resumeConversationPrompt:O}=e.history,C=((t,e)=>{var n;const r=wn()(n=w()(e).call(e,(e=>!(Tn()(t).call(t,(t=>t.payload.id===e.payload.id))||"participant"===e.type&&!e.payload.participant.introduction)))).call(n);return Cr([...r,...t])})(t.events,T),I=Sn(Sn({},t.participantInfo.participants),E),N=Tn()(a=wn()(s=Gt()(C).call(C)).call(s)).call(a,(t=>("message"===t.type||"participant"===t.type)&&!t.payload.fromClient));let j=null;N&&("message"===N.type&&(j=N.payload.participant),"participant"===N.type&&(j=N.payload.participant.id));const{entry:R,uploads:P}=k,L=jr(Sn(Sn(Sn({},t.entryMeta),R),{},{active:R.default||An,options:Sn({},R&&R.options?R.options:{})}),C[C.length-1].payload);let D=Sn({},t.options.features);const U=D.hasOwnProperty($n);if(U){const{payload:t}=N,{type:e}=t.entry||{};D=Sn(Sn({},D),{},{uploads:{enabled:!(!P||!P.enabled),enabledFromEntry:e===Cn}})}const M=Sn(Sn({},t),{},{unreadEvents:w()(C).call(C,(t=>"message"===t.type&&t.payload.messageStatus===In)).length,events:w()(C).call(C,(t=>"participant"!==t.type||!!t.payload.participant.introduction)),participantInfo:Sn(Sn(Sn({},t.participantInfo),j?Ir(t.participantInfo,{type:Qn,participant:I[j]}):{}),{},{participants:I}),historyLoaded:!0,serviceInfo:Sn(Sn({},t.serviceInfo),{},{activeServiceSessionId:S}),serviceData:A||{},options:Sn(Sn({},t.options),{},{features:D}),entryMeta:U||L.active!==Cn?L:Sn({},t.entryMeta),resumeConversationPrompt:O||!1});return j&&(M.headerTitles=Nr(t.headerTitles,{type:Xn,title:I[j].name})),M;case tr:return Sn(Sn({},t),{},{historyLoaded:!1});case Yn:return Sn(Sn({},t),{},{isLoading:e.isLoading});case nr:const{delaySeconds:z,delayTime:F}=e;return Sn(Sn({},t),{},{idleDetachCountdown:{hasCountdown:!0,isActive:!0,wasStopped:!1,count:z,remaining:z,timer:F}});case rr:const{idleDetachCountdown:$}=t,{remaining:B}=$,H=B-1;return Sn(Sn({},t),{},{idleDetachCountdown:Sn(Sn({},t.idleDetachCountdown),{},{remaining:H,timer:ln(H)})});case or:return Sn(Sn({},t),{},{idleDetachCountdown:Sn(Sn({},t.idleDetachCountdown),{},{isActive:!1,wasStopped:!0})});case ir:return Sn(Sn({},t),{},{idleDetachCountdown:{hasCountdown:!1,isActive:!1}});case ar:return Sn(Sn({},t),{},{resumeConversationPrompt:!0});case sr:return Sn(Sn({},t),{},{resumeConversationPrompt:!1});case Qn:case Jn:return Sn(Sn({},t),{},{participantInfo:Ir(t.participantInfo,e)});case er:return t.serviceInfo.activeServiceSessionId!==e.activeServiceSessionId?Sn(Sn({},t),{},{serviceInfo:Sn(Sn({},t.serviceInfo),{},{activeServiceSessionId:e.activeServiceSessionId})}):t;case Zn:case Xn:return Sn(Sn({},t),{},{headerTitles:Nr(t.headerTitles,e)});case fr:return Sn(Sn({},t),{},{initialState:e.initialState});case cr:return Sn(Sn({},t),{},{serviceData:Sn(Sn({},t.serviceData),{},{[e.payload.type]:e.payload})});case lr:return Sn(Sn({},t),{},{options:Sn(Sn({},t.options),{},{features:e.features})});case ur:return t.options.features.hasOwnProperty(e.key)?Sn(Sn({},t),{},{options:Sn(Sn({},t.options),{},{features:Sn(Sn({},t.options.features),{},{[e.key]:Sn(Sn({},t.options.features[e.key]||{}),{},{enabled:e.enabled})})})}):t;case pr:return Sn(Sn({},t),{},{options:Sn(Sn({},t.options),{},{features:{}})});case vr:return Sn(Sn({},t),{},{options:Sn(Sn({},t.options),{},{panelActive:!0,optionActive:e.optionName})});case yr:return Sn(Sn({},t),{},{options:Sn(Sn({},t.options),{},{panelActive:!1,optionActive:""})});case dr:return Sn(Sn({},t),{},{options:Sn(Sn({},t.options),{},{userSelectedOptions:e.options})});case hr:const{option:V,value:q}=e;return Sn(Sn({},t),{},{options:Sn(Sn({},t.options),{},{userSelectedOptions:Sn(Sn({},t.options.userSelectedOptions),{},{[V]:q})})});case mr:const{value:W}=e;return Sn(Sn({},t),{},{entryMeta:Sn(Sn({},t.entryMeta),{},{blockAutoEntrySwitch:W})});case _r:const{entryMeta:G}=e;return Sn(Sn({},t),{},{entryMeta:Sn(Sn(Sn({},t.entryMeta),G),{},{active:G.default,options:Sn({},G.options||{}),overrideOptions:{}})});case br:const{entryType:K}=e;return Sn(Sn({},t),{},{entryMeta:Sn(Sn({},t.entryMeta),{},{active:K})});case gr:const{entryType:Y}=e;return Sn(Sn({},t),{},{entryMeta:Sn(Sn({},t.entryMeta),{},{userSelected:Y})});case wr:return Sn(Sn({},t),{},{currentUploads:[...t.currentUploads,{id:e.fileId,name:e.fileName,progress:1,uploading:!0,complete:!1,error:"",uploadHandle:e.uploadHandle}]});case xr:return Sn(Sn({},t),{},{currentUploads:b()(c=t.currentUploads).call(c,(t=>t.id===e.fileId?Sn(Sn({},t),{},{progress:e.progress,uploading:100!==e.progress,uploadHandle:100===e.progress?null:t.uploadHandle}):t))});case Er:return Sn(Sn({},t),{},{currentUploads:b()(l=t.currentUploads).call(l,(t=>t.id===e.fileId?Sn(Sn({},t),{},{error:e.errorText,progress:0,uploading:!1,uploadHandle:null}):t))});case Tr:return Sn(Sn({},t),{},{currentUploads:b()(u=t.currentUploads).call(u,(t=>t.id===e.fileId?Sn(Sn({},t),{},{complete:!0}):t))});case Sr:return Sn(Sn({},t),{},{currentUploads:w()(p=t.currentUploads).call(p,(t=>t.id!==e.fileId))});case kr:return Sn(Sn({},t),{},{currentUploads:[]});case Ar:return Sn(Sn({},t),{},{seamlyContainerElement:e.element});default:return t}})(t,e)}const Yh=["namespace","parentElement","showFaq"],Jh=["view"];function Qh(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function Zh(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=Qh(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=Qh(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}class Xh{constructor(t,e){const{namespace:n="",parentElement:r,showFaq:o}=t,i=L(t,Yh);this.config=Zh(Zh({},i),{},{namespace:n,showFaq:!1!==o}),this.namespace=n,this.parentElement=r,this.externalApi=e,this.api=new Fh({layoutMode:t.layoutMode,namespace:t.namespace,config:t.api,context:t.context}),this.eventBus=new(wt()),this.functions={},this.registerFunctions({on:this.eventBus.on,off:this.eventBus.off}),this.eventBus.on("function.register",((t,e)=>this.registerFunction(t,e))),this.eventBus.on("function.unregister",((t,e)=>this.unregisterFunction(t,e)))}async render(){const t=this.config.customComponents||{},{view:e}=t,n=L(t,Jh),r=Zh(Zh({},this.config),{},{customComponents:N()(n).length?n:void 0}),o=function({initialState:t,api:e,eventBus:n,config:r}={}){return Me({reducers:{state:Kh,[String(es)]:es,[String(Jo)]:Jo,[String(tc)]:tc,[String(fs)]:fs,[String(ji)]:ji,[String(ga)]:ga,[String(Ea)]:Ea},initialState:t,middlewares:[Qf({api:e}),Hh.withExtraArgument({api:e,eventBus:n,config:r}),ha({api:e}),Wh({api:e}),({dispatch:t,getState:e})=>n=>r=>{var o,i,a,s,c,l,u;const p=n(r);switch(r.type){case String(Bn.SET_HISTORY):null!==(o=r.history)&&void 0!==o&&null!==(i=o.translation)&&void 0!==i&&i.enabled&&t(Kr(r.history.translation.locale));break;case String(Bn.SET_INITIAL_STATE):null!==(a=r.initialState)&&void 0!==a&&null!==(s=a.translation)&&void 0!==s&&s.enabled&&(t(Kr(r.initialState.translation.locale)),t(Vr(r.locale)));break;case String(Bn.ADD_EVENT):"info"===r.event.type&&"new_translation"===(null===(c=r.event)||void 0===c||null===(l=c.payload)||void 0===l||null===(u=l.body)||void 0===u?void 0:u.subtype)&&r.event.payload.body.translationEnabled&&t(Vr(r.event.payload.body.translationLocale));break;case String(Yr):const n=Fr(e());t(Vr(n))}return p}]})}({api:this.api,eventBus:this.eventBus,config:r});await o.dispatch(Bo()),vt(e?Se(Zf,{config:r,eventBus:this.eventBus,store:o,api:this.api,children:Se(e,{})}):Se(eh,{config:r,eventBus:this.eventBus,store:o,api:this.api}),this.parentElement)}destroy(){vt(null,this.parentElement),this.eventBus.off(),this.api.disconnect(),delete this.functions}registerFunctions(t){var e;T()(e=C()(t)).call(e,(([t,e])=>{this.registerFunction(t,e)}))}registerFunction(t,e){this.functions[t]=this.functions[t]||[],this.functions[t].push(e),this.externalApi.handleActions()}unregisterFunction(t,e){const n=this.functions[t];n&&n.length&&(this.functions[t]=w()(n).call(n,(t=>t!==e)))}execFunction(t,...e){const n=this.functions[t];return!(!n||!n.length||(T()(n).call(n,(n=>{try{n(...e)}catch(e){console.error(`Action(${t}) failed: `,e)}})),0))}}function td(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ed(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=td(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=td(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}const nd=t=>"object"==typeof t&&"action"in t,rd=t=>ed(ed({},t),{},{args:e()(t.args)?t.args:[t.args]});var od=class{constructor(t){this._waitingActions=[],this._instances={},this.appConfig=t,this.context={}}push(...t){var e;(t=b()(e=w()(t).call(t,nd)).call(e,rd)).length&&(this._waitingActions.push(...t),this.handleActions())}handleActions(){const t=this._waitingActions;this._waitingActions=[],T()(t).call(t,(t=>{switch(t.action){case"init":this.handleInit(t);break;case"destroy":this.handleDestroy(t);break;default:this.handleAction(t)||this.setContext(t.action,...t.args)||this._waitingActions.push(t)}}))}setContext(t,e){switch(t){case"setTranslation":const{enabled:t,locale:n}=e;return t&&n&&(this.context.translationLocale=n),!0;default:return!1}}handleInit(t){const e=this.getUserConfig(...t.args),n=this.getCombinedConfig(e),{parentElement:r,namespace:o}=n||e;var i;if(o?T()(i=S()(this._instances)).call(i,(t=>{t.parentElement!==r&&t.namespace!==o||this.destroy(t)})):this.destroy(),n){const t=this.createInstance(n);this._instances[n.namespace]=t,this.context={},t.render()}}handleDestroy(t){this.destroy(t.instance)}handleAction(t){const{action:e,instance:n,args:r}=t,o=S()(this._instances);!n&&o.length>1&&console.warn(`Multiple instances detected. Due to potential race conditions, it is recommended to target a specific instance with the action: ${e}`);const i=b()(o).call(o,(t=>(!n||t.namespace===n)&&t.execFunction(e,...r)));return A()(i).call(i,Boolean)}createInstance(t){return new Xh(t,this)}destroy(t){var e;t?("string"==typeof t&&(t=this._instances[t]),t&&(t.destroy(),delete this._instances[t.namespace])):T()(e=C()(this._instances)).call(e,(([t,e])=>{e.destroy(),delete this._instances[t]}))}getUserConfig(t={}){return t}getCombinedConfig(t){if("function"==typeof this.appConfig)return this.appConfig(t);const e=ed(ed({},t.context||this.appConfig.context),this.context),n=ed(ed({},this.appConfig.defaults),t.defaults);return ed(ed(ed({},this.appConfig),t),{},{api:ed(ed({},this.appConfig.api),t.api),context:N()(e).length?e:void 0,defaults:N()(n).length?n:void 0})}},id=()=>{const{t:t}=Oi(),{title:e,subTitle:n}=go(),r=bo(),{isOpen:o}=_a(),i=xo(),{hasInterrupt:a}=sa(),s=Ve(),c=(null==i?void 0:i.avatar)??s,l=a?"":n,u=["message-count"];return o&&u.push("message-count__hide"),0===r&&u.push("message-count__empty"),(l||!o)&&Se("div",{className:Xo("agent-info"),children:[Se("div",{className:Xo("agent-info__graphic"),children:[c?Se("img",{className:Xo(null!=i&&i.avatar?"avatar":"icon"),src:c,alt:""}):Se(ds,{name:"avatar",size:"32"}),Se("span",{className:Xo(u),"aria-hidden":"true",children:r})]}),Se("div",{className:Xo("agent-info__body"),children:[Se("p",{className:Xo("agent-info__heading"),children:e??t("header.title")}),Se("p",{className:Xo("agent-info__text"),children:l})]})]})},ad=({children:t,onCloseChat:e})=>{const{headerCollapseButtonId:n}=ho(),r=Pt(null),{t:o}=Oi();return Se("header",{className:Xo("chat__header"),children:[t,Se("div",{className:Xo("header-controls"),children:Se("button",{type:"button",className:Xo("button","header-controls__collapse"),onClick:e,ref:r,id:n,children:Se(ds,{name:"chevronDown",size:"32",alt:o("header.collapseApp")})})})]})},sd=({onOpenChat:t})=>{const{t:e}=Oi(),n=na(),{isOpen:r}=_a(),o=Pt(null),i=Pt(null),a=Pt(),s=Ui(),c=(()=>{const t=Pt(null),[e]=Li();return t.current=e,Dt((e=>{mn(t.current,(()=>{Pi(e)}))}),[])})(),l=xo(),u=go().subTitle,{hasInterrupt:p}=sa(),{headerCollapseButtonId:f}=ho(),h=l&&!p;return Rt((()=>{!1===r&&!0===o.current&&c(i.current),o.current=r}),[r,c]),Se("div",{className:Xo("toggle-button"),children:[Se("div",{id:n,children:[Se("p",{className:Xo("toggle-button__title"),children:e(h?"toggleButton.resumeTitle":"toggleButton.title")}),Se("p",{className:Xo("toggle-button__subtitle"),children:h?u:e("toggleButton.subtitle")})]}),Se("button",{type:"button","aria-labelledby":n,className:Xo("toggle-button__button"),ref:i,onMouseUp:()=>{a.current="mouse"},onKeyUp:()=>{a.current="key"},onClick:()=>{t(),"mouse"===a.current?s():"key"===a.current&&c(f)}})]})};const cd=["categories"];function ld(t,e){var n=N()(t);if(s()){var r=s()(t);e&&(r=w()(r).call(r,(function(e){return l()(t,e).enumerable}))),n.push.apply(n,r)}return n}function ud(t){for(var e=1;e<arguments.length;e++){var n,r=null!=arguments[e]?arguments[e]:{};if(e%2)T()(n=ld(Object(r),!0)).call(n,(function(e){m(t,e,r[e])}));else if(p())h()(t,p()(r));else{var o;T()(o=ld(Object(r))).call(o,(function(e){v()(t,e,l()(r,e))}))}}return t}var pd=()=>{const{t:t}=Oi(),{sendAction:e,addMessageBubble:n}=Ca(),r=na(),o=Ui(),{sendPolite:i}=Na(),{hasInterrupt:a}=sa(),{hasCountdown:s,endCountdown:c}=Ya(),{hasPrompt:l,continueChat:u}=Qa(),p=To("suggestion"),[f]=ss({payload:p}),h=Lt((()=>{const t=p&&!a?f:[];return b()(t).call(t,(t=>{let{categories:e=[]}=t;return ud(ud({},L(t,cd)),{},{categories:e,classNames:["faqs__item",...b()(e).call(e,(t=>`faqs__item--${String(t).toLowerCase().replace(/[^a-z0-9_\\-]/,"")}`))]})}))}),[p,a,f]),d=Pt(null),v=Pt(!1),{isInline:y}=Eo(),m=ba(),g=!y&&m,_=Pt(g),w=!!h.length,x=w&&!g,T=Pt([]),E=w?h:T.current;T.current=E;const S=Pt(null);jt((()=>{if(d.current!==h&&!g){if(w){const e=v.current?t("faq.srUpdatedText"):t("faq.srAvailableText");Ye()((()=>{i(e)}),30)}else v.current&&i(t("faq.srUnavailableText"));d.current=h}!_.current&&g?(mn(S.current,o),i(t("faq.srUnavailableText"))):!w&&v.current&&mn(S.current,o),v.current=w,_.current=g}),[w,h,g,o,i,t]);const k=t("faq.headingText");return Se(xs,{isActive:x,transitionStartState:bs,children:Se(k?"section":"div",{className:Xo("faqs"),"aria-labelledby":k?r:null,ref:S,children:[k&&Se("h2",{id:r,className:Xo("faqs__heading"),children:k}),!!E.length&&Se("ul",{className:Xo("faqs__list"),children:b()(E).call(E,(t=>Se("li",{className:Xo(t.classNames),children:Se("button",{type:"button",onClick:()=>{(({id:t,question:r})=>{s&&c(!0),l&&u(),e({type:jn,originMessage:p.id,body:{type:"faqclick",body:{faqId:t,faqQuestion:r}}}),n(r),o()})(t)},className:Xo("button","button--secondary"),children:[Se(ds,{name:"chevronRight",size:"8"}),t.question]})},t.id.toString())))})]})})},fd=({children:t})=>{const[,e]=Li(),{isOpen:n,isVisible:r,setVisibility:o}=_a(),{zIndex:i,showFaq:a,layoutMode:s}=He(),{isInline:c}=Eo(),l=si(),u=ba(),{locale:p}=Oi(),f=Dt((t=>{e(t)}),[e]),h=Lt((()=>{if(p&&document.querySelector("html").getAttribute("lang")!==p)return p}),[p]),d=["app","app--deprecated",...l];return n||"window"!==s||d.push("app--collapsed"),u&&d.push("app--user-responded"),d.push(`app--layout-${s}`),r&&Se("section",{className:Xo(d),onKeyDown:t=>{(t.code&&"Escape"===t.code||27===t.keyCode)&&!c&&n&&o(ye.minimized)},lang:h,tabIndex:"-1",ref:f,style:{zIndex:i},"data-nosnippet":!0,children:[Se("div",{className:Xo("app-wrapper"),children:t}),a&&Se(pd,{})]})},hd=()=>{const{isVisible:t}=_a(),{openChat:e,closeChat:n}=Ba();return t&&Se(fd,{children:[Se(sd,{onOpenChat:e}),Se(ad,{onCloseChat:n,children:Se(id,{})}),Se(pf,{interruptComponent:Uc,children:[Se(Op,{}),Se(Zp,{})]})]})},dd=function(t){var n;if(window.seamly&&!e()(window.seamly))throw new Error("Seamly UI has already been initialised. Use the window.seamly object to start new instances instead.");const r=e()(window.seamly)?window.seamly:[],o=new od(t);window.seamly={push:i()(n=o.push).call(n,o)},o.push(...r)}}(),r}()}));
|