@seamly/web-ui 20.8.0-beta.5 → 20.8.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.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see index.min.js.LICENSE.txt */
2
- (()=>{var e={575:(e,t,n)=>{"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function o(e){return!!e&&!!e[q]}function i(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===W}(e)||Array.isArray(e)||!!e[z]||!!e.constructor[z]||d(e)||f(e))}function s(e){return o(e)||r(23,e),e[q].t}function a(e,t,n){void 0===n&&(n=!1),0===c(e)?(n?Object.keys:G)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function c(e){var t=e[q];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:d(e)?2:f(e)?3:0}function l(e,t){return 2===c(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function u(e,t,n){var r=c(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e){return B&&e instanceof Map}function f(e){return H&&e instanceof Set}function h(e){return e.o||e.t}function y(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Z(e);delete t[q];for(var n=G(t),r=0;r<n.length;r++){var o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function m(e,t){return void 0===t&&(t=!1),v(e)||o(e)||!i(e)||(c(e)>1&&(e.set=e.add=e.clear=e.delete=b),Object.freeze(e),t&&a(e,(function(e,t){return m(t,!0)}),!0)),e}function b(){r(2)}function v(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function g(e){var t=K[e];return t||r(18,e),t}function O(){return U}function w(e,t){t&&(g("Patches"),e.u=[],e.s=[],e.v=t)}function j(e){S(e),e.p.forEach(x),e.p=null}function S(e){e===U&&(U=e.l)}function _(e){return U={p:[],l:U,h:e,m:!0,_:0}}function x(e){var t=e[q];0===t.i||1===t.i?t.j():t.O=!0}function C(e,t){t._=t.p.length;var n=t.p[0],o=void 0!==e&&e!==n;return t.h.g||g("ES5").S(t,e,o),o?(n[q].P&&(j(t),r(4)),i(e)&&(e=E(t,e),t.l||T(t,e)),t.u&&g("Patches").M(n[q].t,e,t.u,t.s)):e=E(t,n,[]),j(t),t.u&&t.v(t.u,t.s),e!==V?e:void 0}function E(e,t,n){if(v(t))return t;var r=t[q];if(!r)return a(t,(function(o,i){return P(e,r,t,o,i,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return T(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=y(r.k):r.o;a(3===r.i?new Set(o):o,(function(t,i){return P(e,r,o,t,i,n)})),T(e,o,!1),n&&e.u&&g("Patches").R(r,n,e.u,e.s)}return r.o}function P(e,t,n,r,s,a){if(o(s)){var c=E(e,s,a&&t&&3!==t.i&&!l(t.D,r)?a.concat(r):void 0);if(u(n,r,c),!o(c))return;e.m=!1}if(i(s)&&!v(s)){if(!e.h.F&&e._<1)return;E(e,s),t&&t.A.l||T(e,s)}}function T(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&m(t,n)}function N(e,t){var n=e[q];return(n?h(n):e)[t]}function I(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function k(e){e.P||(e.P=!0,e.l&&k(e.l))}function A(e){e.o||(e.o=y(e.t))}function D(e,t,n){var r=d(t)?g("MapSet").N(t,n):f(t)?g("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:O(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,i=J;n&&(o=[r],i=X);var s=Proxy.revocable(o,i),a=s.revoke,c=s.proxy;return r.k=c,r.j=a,c}(t,n):g("ES5").J(t,n);return(n?n.A:O()).p.push(r),r}function R(e){return o(e)||r(22,e),function e(t){if(!i(t))return t;var n,r=t[q],o=c(t);if(r){if(!r.P&&(r.i<4||!g("ES5").K(r)))return r.t;r.I=!0,n=M(t,o),r.I=!1}else n=M(t,o);return a(n,(function(t,o){r&&function(e,t){return 2===c(e)?e.get(t):e[t]}(r.t,t)===o||u(n,t,e(o))})),3===o?new Set(n):n}(e)}function M(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return y(e)}n.r(t),n.d(t,{MiddlewareArray:()=>Ue,TaskAbortError:()=>Pt,__DO_NOT_USE__ActionTypes:()=>ce,addListener:()=>Ut,applyMiddleware:()=>me,bindActionCreators:()=>he,clearAllListeners:()=>Ft,combineReducers:()=>de,compose:()=>ye,configureStore:()=>We,createAction:()=>Ge,createAsyncThunk:()=>ut,createDraftSafeSelector:()=>Re,createEntityAdapter:()=>ot,createImmutableStateInvariantMiddleware:()=>He,createListenerMiddleware:()=>Vt,createNextState:()=>te,createReducer:()=>Xe,createSelector:()=>be.createSelector,createSerializableStateInvariantMiddleware:()=>ze,createSlice:()=>Qe,createStore:()=>ue,current:()=>R,findNonSerializableValue:()=>Ve,freeze:()=>m,getDefaultMiddleware:()=>qe,getType:()=>Ke,isAllOf:()=>ht,isAnyOf:()=>ft,isAsyncThunkAction:()=>wt,isDraft:()=>o,isFulfilled:()=>Ot,isImmutableDefault:()=>Be,isPending:()=>bt,isPlain:()=>$e,isPlainObject:()=>Le,isRejected:()=>vt,isRejectedWithValue:()=>gt,legacy_createStore:()=>pe,miniSerializeError:()=>lt,nanoid:()=>it,original:()=>s,removeListener:()=>Bt,unwrapResult:()=>pt});var L,U,F="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),B="undefined"!=typeof Map,H="undefined"!=typeof Set,$="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,V=F?Symbol.for("immer-nothing"):((L={})["immer-nothing"]=!0,L),z=F?Symbol.for("immer-draftable"):"__$immer_draftable",q=F?Symbol.for("immer-state"):"__$immer_state",W=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),G="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Z=Object.getOwnPropertyDescriptors||function(e){var t={};return G(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},K={},J={get:function(e,t){if(t===q)return e;var n=h(e);if(!l(n,t))return function(e,t,n){var r,o=I(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!i(r)?r:r===N(e.t,t)?(A(e),e.o[t]=D(e.A.h,r,e)):r},has:function(e,t){return t in h(e)},ownKeys:function(e){return Reflect.ownKeys(h(e))},set:function(e,t,n){var r=I(h(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=N(h(e),t),i=null==o?void 0:o[q];if(i&&i.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(p(n,o)&&(void 0!==n||l(e.t,t)))return!0;A(e),k(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==N(e.t,t)||t in e.t?(e.D[t]=!1,A(e),k(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=h(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){r(12)}},X={};a(J,(function(e,t){X[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),X.deleteProperty=function(e,t){return X.set.call(this,e,t,void 0)},X.set=function(e,t,n){return J.set.call(this,e[0],t,n,e[0])};var Q=function(){function e(e){var t=this;this.g=$,this.F=!0,this.produce=function(e,n,o){if("function"==typeof e&&"function"!=typeof n){var s=n;n=e;var a=t;return function(e){var t=this;void 0===e&&(e=s);for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return a.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(o))}))}}var c;if("function"!=typeof n&&r(6),void 0!==o&&"function"!=typeof o&&r(7),i(e)){var l=_(t),u=D(t,e,void 0),p=!0;try{c=n(u),p=!1}finally{p?j(l):S(l)}return"undefined"!=typeof Promise&&c instanceof Promise?c.then((function(e){return w(l,o),C(e,l)}),(function(e){throw j(l),e})):(w(l,o),C(c,l))}if(!e||"object"!=typeof e){if(void 0===(c=n(e))&&(c=e),c===V&&(c=void 0),t.F&&m(c,!0),o){var d=[],f=[];g("Patches").M(e,c,d,f),o(d,f)}return c}r(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(o))}))};var r,o,i=t.produce(e,n,(function(e,t){r=e,o=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,r,o]})):[i,r,o]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){i(e)||r(8),o(e)&&(e=R(e));var t=_(this),n=D(this,e,void 0);return n[q].C=!0,S(t),n},t.finishDraft=function(e,t){var n=(e&&e[q]).A;return w(n,t),C(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!$&&r(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=g("Patches").$;return o(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),Y=new Q,ee=Y.produce;Y.produceWithPatches.bind(Y),Y.setAutoFreeze.bind(Y),Y.setUseProxies.bind(Y),Y.applyPatches.bind(Y),Y.createDraft.bind(Y),Y.finishDraft.bind(Y);const te=ee;var ne=n(4942);function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){(0,ne.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ie(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var se="function"==typeof Symbol&&Symbol.observable||"@@observable",ae=function(){return Math.random().toString(36).substring(7).split("").join(".")},ce={INIT:"@@redux/INIT"+ae(),REPLACE:"@@redux/REPLACE"+ae(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ae()}};function le(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ue(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(ie(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(ie(1));return n(ue)(e,t)}if("function"!=typeof e)throw new Error(ie(2));var o=e,i=t,s=[],a=s,c=!1;function l(){a===s&&(a=s.slice())}function u(){if(c)throw new Error(ie(3));return i}function p(e){if("function"!=typeof e)throw new Error(ie(4));if(c)throw new Error(ie(5));var t=!0;return l(),a.push(e),function(){if(t){if(c)throw new Error(ie(6));t=!1,l();var n=a.indexOf(e);a.splice(n,1),s=null}}}function d(e){if(!le(e))throw new Error(ie(7));if(void 0===e.type)throw new Error(ie(8));if(c)throw new Error(ie(9));try{c=!0,i=o(i,e)}finally{c=!1}for(var t=s=a,n=0;n<t.length;n++)(0,t[n])();return e}function f(e){if("function"!=typeof e)throw new Error(ie(10));o=e,d({type:ce.REPLACE})}function h(){var e,t=p;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(ie(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[se]=function(){return this},e}return d({type:ce.INIT}),(r={dispatch:d,subscribe:p,getState:u,replaceReducer:f})[se]=h,r}var pe=ue;function de(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}var i,s=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:ce.INIT}))throw new Error(ie(12));if(void 0===n(void 0,{type:ce.PROBE_UNKNOWN_ACTION()}))throw new Error(ie(13))}))}(n)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var r=!1,o={},a=0;a<s.length;a++){var c=s[a],l=n[c],u=e[c],p=l(u,t);if(void 0===p)throw t&&t.type,new Error(ie(14));o[c]=p,r=r||p!==u}return(r=r||s.length!==Object.keys(e).length)?o:e}}function fe(e,t){return function(){return t(e.apply(this,arguments))}}function he(e,t){if("function"==typeof e)return fe(e,t);if("object"!=typeof e||null===e)throw new Error(ie(16));var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=fe(o,t))}return n}function ye(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function me(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(ie(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return r=ye.apply(void 0,i)(n.dispatch),oe(oe({},n),{},{dispatch:r})}}}var be=n(573);function ve(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}var ge=ve();ge.withExtraArgument=ve;const Oe=ge;var we,je=(we=function(e,t){return we=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},we(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}we(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Se=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},_e=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},xe=Object.defineProperty,Ce=Object.defineProperties,Ee=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Ie=function(e,t,n){return t in e?xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},ke=function(e,t){for(var n in t||(t={}))Te.call(t,n)&&Ie(e,n,t[n]);if(Pe)for(var r=0,o=Pe(t);r<o.length;r++)n=o[r],Ne.call(t,n)&&Ie(e,n,t[n]);return e},Ae=function(e,t){return Ce(e,Ee(t))},De=function(e,t,n){return new Promise((function(r,o){var i=function(e){try{a(n.next(e))}catch(e){o(e)}},s=function(e){try{a(n.throw(e))}catch(e){o(e)}},a=function(e){return e.done?r(e.value):Promise.resolve(e.value).then(i,s)};a((n=n.apply(e,t)).next())}))},Re=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=be.createSelector.apply(void 0,e),r=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return n.apply(void 0,_e([o(e)?R(e):e],t))};return r},Me="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ye:ye.apply(null,arguments)};function Le(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Ue=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return je(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,_e([void 0],e[0].concat(this)))):new(t.bind.apply(t,_e([void 0],e.concat(this))))},t}(Array);function Fe(e){return i(e)?te(e,(function(){})):e}function Be(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function He(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}function $e(e){var t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||Le(e)}function Ve(e,t,n,r,o){var i;if(void 0===t&&(t=""),void 0===n&&(n=$e),void 0===o&&(o=[]),!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;for(var s=null!=r?r(e):Object.entries(e),a=o.length>0,c=0,l=s;c<l.length;c++){var u=l[c],p=u[0],d=u[1],f=t?t+"."+p:p;if(!(a&&o.indexOf(f)>=0)){if(!n(d))return{keyPath:f,value:d};if("object"==typeof d&&(i=Ve(d,f,n,r,o)))return i}}return!1}function ze(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}function qe(e){void 0===e&&(e={});var t=e.thunk,n=void 0===t||t,r=(e.immutableCheck,e.serializableCheck,new Ue);return n&&(function(e){return"boolean"==typeof e}(n)?r.push(Oe):r.push(Oe.withExtraArgument(n.extraArgument))),r}function We(e){var t,n=function(e){return qe(e)},r=e||{},o=r.reducer,i=void 0===o?void 0:o,s=r.middleware,a=void 0===s?n():s,c=r.devTools,l=void 0===c||c,u=r.preloadedState,p=void 0===u?void 0:u,d=r.enhancers,f=void 0===d?void 0:d;if("function"==typeof i)t=i;else{if(!Le(i))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=de(i)}var h=a;"function"==typeof h&&(h=h(n));var y=me.apply(void 0,h),m=ye;l&&(m=Me(ke({trace:!1},"object"==typeof l&&l)));var b=[y];return Array.isArray(f)?b=_e([y],f):"function"==typeof f&&(b=f(b)),ue(t,p,m.apply(void 0,b))}function Ge(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(t){var o=t.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return ke(ke({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:n[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(t){return t.type===e},n}function Ze(e){return["type","payload","error","meta"].indexOf(e)>-1}function Ke(e){return""+e}function Je(e){var t,n={},r=[],o={addCase:function(e,t){var r="string"==typeof e?e:e.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=t,o},addMatcher:function(e,t){return r.push({matcher:e,reducer:t}),o},addDefaultCase:function(e){return t=e,o}};return e(o),[n,r,t]}function Xe(e,t,n,r){void 0===n&&(n=[]);var s,a="function"==typeof t?Je(t):[t,n,r],c=a[0],l=a[1],u=a[2];if(function(e){return"function"==typeof e}(e))s=function(){return Fe(e())};else{var p=Fe(e);s=function(){return p}}function d(e,t){void 0===e&&(e=s());var n=_e([c[t.type]],l.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===n.filter((function(e){return!!e})).length&&(n=[u]),n.reduce((function(e,n){if(n){var r;if(o(e))return void 0===(r=n(e,t))?e:r;if(i(e))return te(e,(function(e){return n(e,t)}));if(void 0===(r=n(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return e}),e)}return d.getInitialState=s,d}function Qe(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n,r="function"==typeof e.initialState?e.initialState:Fe(e.initialState),o=e.reducers||{},i=Object.keys(o),s={},a={},c={};function l(){var t="function"==typeof e.extraReducers?Je(e.extraReducers):[e.extraReducers],n=t[0],o=void 0===n?{}:n,i=t[1],s=void 0===i?[]:i,c=t[2],l=void 0===c?void 0:c,u=ke(ke({},o),a);return Xe(r,u,s,l)}return i.forEach((function(e){var n,r,i=o[e],l=t+"/"+e;"reducer"in i?(n=i.reducer,r=i.prepare):n=i,s[e]=n,a[l]=n,c[e]=r?Ge(l,r):Ge(l)})),{name:t,reducer:function(e,t){return n||(n=l()),n(e,t)},actions:c,caseReducers:s,getInitialState:function(){return n||(n=l()),n.getInitialState()}}}function Ye(e){return function(t,n){var r=function(t){var r;Le(r=n)&&"string"==typeof r.type&&Object.keys(r).every(Ze)?e(n.payload,t):e(n,t)};return o(t)?(r(t),t):te(t,r)}}function et(e,t){return t(e)}function tt(e){return Array.isArray(e)||(e=Object.values(e)),e}function nt(e,t,n){for(var r=[],o=[],i=0,s=e=tt(e);i<s.length;i++){var a=s[i],c=et(a,t);c in n.entities?o.push({id:c,changes:a}):r.push(a)}return[r,o]}function rt(e){function t(t,n){var r=et(t,e);r in n.entities||(n.ids.push(r),n.entities[r]=t)}function n(e,n){for(var r=0,o=e=tt(e);r<o.length;r++)t(o[r],n)}function r(t,n){var r=et(t,e);r in n.entities||n.ids.push(r),n.entities[r]=t}function o(e,t){var n=!1;e.forEach((function(e){e in t.entities&&(delete t.entities[e],n=!0)})),n&&(t.ids=t.ids.filter((function(e){return e in t.entities})))}function i(t,n){var r={},o={};if(t.forEach((function(e){e.id in n.entities&&(o[e.id]={id:e.id,changes:ke(ke({},o[e.id]?o[e.id].changes:null),e.changes)})})),(t=Object.values(o)).length>0){var i=t.filter((function(t){return function(t,n,r){var o=r.entities[n.id],i=Object.assign({},o,n.changes),s=et(i,e),a=s!==n.id;return a&&(t[n.id]=s,delete r.entities[n.id]),r.entities[s]=i,a}(r,t,n)})).length>0;i&&(n.ids=Object.keys(n.entities))}}function s(t,r){var o=nt(t,e,r),s=o[0];i(o[1],r),n(s,r)}return{removeAll:(a=function(e){Object.assign(e,{ids:[],entities:{}})},c=Ye((function(e,t){return a(t)})),function(e){return c(e,void 0)}),addOne:Ye(t),addMany:Ye(n),setOne:Ye(r),setMany:Ye((function(e,t){for(var n=0,o=e=tt(e);n<o.length;n++)r(o[n],t)})),setAll:Ye((function(e,t){e=tt(e),t.ids=[],t.entities={},n(e,t)})),updateOne:Ye((function(e,t){return i([e],t)})),updateMany:Ye(i),upsertOne:Ye((function(e,t){return s([e],t)})),upsertMany:Ye(s),removeOne:Ye((function(e,t){return o([e],t)})),removeMany:Ye(o)};var a,c}function ot(e){void 0===e&&(e={});var t=ke({sortComparer:!1,selectId:function(e){return e.id}},e),n=t.selectId,r=t.sortComparer,o={getInitialState:function(e){return void 0===e&&(e={}),Object.assign({ids:[],entities:{}},e)}},i={getSelectors:function(e){var t=function(e){return e.ids},n=function(e){return e.entities},r=Re(t,n,(function(e,t){return e.map((function(e){return t[e]}))})),o=function(e,t){return t},i=function(e,t){return e[t]},s=Re(t,(function(e){return e.length}));if(!e)return{selectIds:t,selectEntities:n,selectAll:r,selectTotal:s,selectById:Re(n,o,i)};var a=Re(e,n);return{selectIds:Re(e,t),selectEntities:a,selectAll:Re(e,r),selectTotal:Re(e,s),selectById:Re(a,o,i)}}},s=r?function(e,t){var n=rt(e);function r(t,n){var r=(t=tt(t)).filter((function(t){return!(et(t,e)in n.entities)}));0!==r.length&&a(r,n)}function o(e,t){0!==(e=tt(e)).length&&a(e,t)}function i(t,n){for(var r=!1,o=0,i=t;o<i.length;o++){var s=i[o],a=n.entities[s.id];if(a){r=!0,Object.assign(a,s.changes);var l=e(a);s.id!==l&&(delete n.entities[s.id],n.entities[l]=a)}}r&&c(n)}function s(t,n){var o=nt(t,e,n),s=o[0];i(o[1],n),r(s,n)}function a(t,n){t.forEach((function(t){n.entities[e(t)]=t})),c(n)}function c(n){var r=Object.values(n.entities);r.sort(t);var o=r.map(e);(function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(n.ids,o)||(n.ids=o)}return{removeOne:n.removeOne,removeMany:n.removeMany,removeAll:n.removeAll,addOne:Ye((function(e,t){return r([e],t)})),updateOne:Ye((function(e,t){return i([e],t)})),upsertOne:Ye((function(e,t){return s([e],t)})),setOne:Ye((function(e,t){return o([e],t)})),setMany:Ye(o),setAll:Ye((function(e,t){e=tt(e),t.entities={},t.ids=[],r(e,t)})),addMany:Ye(r),updateMany:Ye(i),upsertMany:Ye(s)}}(n,r):rt(n);return ke(ke(ke({selectId:n,sortComparer:r},o),i),s)}var it=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},st=["name","message","stack","code"],at=function(e,t){this.payload=e,this.meta=t},ct=function(e,t){this.payload=e,this.meta=t},lt=function(e){if("object"==typeof e&&null!==e){for(var t={},n=0,r=st;n<r.length;n++){var o=r[n];"string"==typeof e[o]&&(t[o]=e[o])}return t}return{message:String(e)}};function ut(e,t,n){var r=Ge(e+"/fulfilled",(function(e,t,n,r){return{payload:e,meta:Ae(ke({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),o=Ge(e+"/pending",(function(e,t,n){return{payload:void 0,meta:Ae(ke({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),i=Ge(e+"/rejected",(function(e,t,r,o,i){return{payload:o,error:(n&&n.serializeError||lt)(e||"Rejected"),meta:Ae(ke({},i||{}),{arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),s="undefined"!=typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return e.prototype.abort=function(){},e}();return Object.assign((function(e){return function(a,c,l){var u,p=(null==n?void 0:n.idGenerator)?n.idGenerator(e):it(),d=new s,f=new Promise((function(e,t){return d.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:u||"Aborted"})}))})),h=!1,y=function(){return De(this,null,(function(){var s,u,y,m,b;return Se(this,(function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),null===(g=m=null==(s=null==n?void 0:n.condition)?void 0:s.call(n,e,{getState:c,extra:l}))||"object"!=typeof g||"function"!=typeof g.then?[3,2]:[4,m];case 1:m=v.sent(),v.label=2;case 2:if(!1===m)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return h=!0,a(o(p,e,null==(u=null==n?void 0:n.getPendingMeta)?void 0:u.call(n,{requestId:p,arg:e},{getState:c,extra:l}))),[4,Promise.race([f,Promise.resolve(t(e,{dispatch:a,getState:c,extra:l,requestId:p,signal:d.signal,rejectWithValue:function(e,t){return new at(e,t)},fulfillWithValue:function(e,t){return new ct(e,t)}})).then((function(t){if(t instanceof at)throw t;return t instanceof ct?r(t.payload,p,e,t.meta):r(t,p,e)}))])];case 3:return y=v.sent(),[3,5];case 4:return b=v.sent(),y=b instanceof at?i(null,p,e,b.payload,b.meta):i(b,p,e),[3,5];case 5:return n&&!n.dispatchConditionRejection&&i.match(y)&&y.meta.condition||a(y),[2,y]}var g}))}))}();return Object.assign(y,{abort:function(e){h&&(u=e,d.abort())},requestId:p,arg:e,unwrap:function(){return y.then(pt)}})}}),{pending:o,rejected:i,fulfilled:r,typePrefix:e})}function pt(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var dt=function(e,t){return function(e){return e&&"function"==typeof e.match}(e)?e.match(t):e(t)};function ft(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.some((function(e){return dt(e,t)}))}}function ht(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.every((function(e){return dt(e,t)}))}}function yt(e,t){if(!e||!e.meta)return!1;var n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function mt(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function bt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return yt(e,["pending"])}:mt(e)?function(t){var n=e.map((function(e){return e.pending}));return ft.apply(void 0,n)(t)}:bt()(e[0])}function vt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return yt(e,["rejected"])}:mt(e)?function(t){var n=e.map((function(e){return e.rejected}));return ft.apply(void 0,n)(t)}:vt()(e[0])}function gt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return e&&e.meta&&e.meta.rejectedWithValue};return 0===e.length||mt(e)?function(t){return ht(vt.apply(void 0,e),n)(t)}:gt()(e[0])}function Ot(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return yt(e,["fulfilled"])}:mt(e)?function(t){var n=e.map((function(e){return e.fulfilled}));return ft.apply(void 0,n)(t)}:Ot()(e[0])}function wt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return yt(e,["pending","fulfilled","rejected"])}:mt(e)?function(t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push(i.pending,i.rejected,i.fulfilled)}return ft.apply(void 0,n)(t)}:wt()(e[0])}var jt=function(e,t){if("function"!=typeof e)throw new TypeError(t+" is not a function")},St=function(){},_t=function(e,t){return void 0===t&&(t=St),e.catch(t),e},xt=function(e,t){e.addEventListener("abort",t,{once:!0})},Ct=function(e,t){var n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Et="listener-cancelled",Pt=function(e){this.code=e,this.name="TaskAbortError",this.message="task cancelled (reason: "+e+")"},Tt=function(e){if(e.aborted)throw new Pt(e.reason)},Nt=function(e){return _t(new Promise((function(t,n){var r=function(){return n(new Pt(e.reason))};e.aborted?r():xt(e,r)})))},It=function(e){return function(t){return _t(Promise.race([Nt(e),t]).then((function(t){return Tt(e),t})))}},kt=function(e){var t=It(e);return function(e){return t(new Promise((function(t){return setTimeout(t,e)})))}},At=Object.assign,Dt={},Rt="listenerMiddleware",Mt=function(e){var t=e.type,n=e.actionCreator,r=e.matcher,o=e.predicate,i=e.effect;if(t)o=Ge(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return jt(i,"options.listener"),{predicate:o,type:t,effect:i}},Lt=function(e,t,n){try{e(t,n)}catch(e){setTimeout((function(){throw e}),0)}},Ut=Ge(Rt+"/add"),Ft=Ge(Rt+"/removeAll"),Bt=Ge(Rt+"/remove"),Ht=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error.apply(console,_e([Rt+"/error"],e))},$t=function(e){e.pending.forEach((function(e){Ct(e,Et)}))};function Vt(e){var t=this;void 0===e&&(e={});var n=new Map,r=e.extra,o=e.onError,i=void 0===o?Ht:o;jt(i,"onError");var s=function(e){for(var t=0,r=Array.from(n.values());t<r.length;t++){var o=r[t];if(e(o))return o}},a=function(e){var t=s((function(t){return t.effect===e.effect}));return t||(t=function(e){var t=Mt(e),n=t.type,r=t.predicate,o=t.effect;return{id:it(),effect:o,type:n,predicate:r,pending:new Set,unsubscribe:function(){throw new Error("Unsubscribe not initialized")}}}(e)),function(e){return e.unsubscribe=function(){return n.delete(e.id)},n.set(e.id,e),function(t){e.unsubscribe(),(null==t?void 0:t.cancelActive)&&$t(e)}}(t)},c=function(e){var t=Mt(e),n=t.type,r=t.effect,o=t.predicate,i=s((function(e){return("string"==typeof n?e.type===n:e.predicate===o)&&e.effect===r}));return i&&(i.unsubscribe(),e.cancelActive&&$t(i)),!!i},l=function(e,o,s,c){return De(t,null,(function(){var t,l,u;return Se(this,(function(p){switch(p.label){case 0:t=new AbortController,l=function(e,t){return function(n,r){return _t(function(n,r){return De(void 0,null,(function(){var o,i,s,a;return Se(this,(function(c){switch(c.label){case 0:Tt(t),o=function(){},i=new Promise((function(t){o=e({predicate:n,effect:function(e,n){n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}})})),s=[Nt(t),i],null!=r&&s.push(new Promise((function(e){return setTimeout(e,r,null)}))),c.label=1;case 1:return c.trys.push([1,,3,4]),[4,Promise.race(s)];case 2:return a=c.sent(),Tt(t),[2,a];case 3:return o(),[7];case 4:return[2]}}))}))}(n,r))}}(a,t.signal),p.label=1;case 1:return p.trys.push([1,3,4,5]),e.pending.add(t),[4,Promise.resolve(e.effect(o,At({},s,{getOriginalState:c,condition:function(e,t){return l(e,t).then(Boolean)},take:l,delay:kt(t.signal),pause:It(t.signal),extra:r,signal:t.signal,fork:(d=t.signal,function(e){jt(e,"taskExecutor");var t,n=new AbortController;t=n,xt(d,(function(){return Ct(t,d.reason)}));var r,o,i=(r=function(){return De(void 0,null,(function(){var t;return Se(this,(function(r){switch(r.label){case 0:return Tt(d),Tt(n.signal),[4,e({pause:It(n.signal),delay:kt(n.signal),signal:n.signal})];case 1:return t=r.sent(),Tt(n.signal),[2,t]}}))}))},o=function(){return Ct(n,"task-completed")},De(void 0,null,(function(){var e;return Se(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,4,5]),[4,Promise.resolve()];case 1:return t.sent(),[4,r()];case 2:return[2,{status:"ok",value:t.sent()}];case 3:return[2,{status:(e=t.sent())instanceof Pt?"cancelled":"rejected",error:e}];case 4:return null==o||o(),[7];case 5:return[2]}}))})));return{result:It(d)(i),cancel:function(){Ct(n,"task-cancelled")}}}),unsubscribe:e.unsubscribe,subscribe:function(){n.set(e.id,e)},cancelActiveListeners:function(){e.pending.forEach((function(e,n,r){e!==t&&(Ct(e,Et),r.delete(e))}))}})))];case 2:return p.sent(),[3,5];case 3:return(u=p.sent())instanceof Pt||Lt(i,u,{raisedBy:"effect"}),[3,5];case 4:return Ct(t,"listener-completed"),e.pending.delete(t),[7];case 5:return[2]}var d}))}))},u=function(e){return function(){e.forEach($t),e.clear()}}(n);return{middleware:function(e){return function(t){return function(r){if(Ut.match(r))return a(r.payload);if(!Ft.match(r)){if(Bt.match(r))return c(r.payload);var o,s=e.getState(),p=function(){if(s===Dt)throw new Error(Rt+": getOriginalState can only be called synchronously");return s};try{if(o=t(r),n.size>0)for(var d=e.getState(),f=Array.from(n.values()),h=0,y=f;h<y.length;h++){var m=y[h],b=!1;try{b=m.predicate(r,d,s)}catch(e){b=!1,Lt(i,e,{raisedBy:"predicate"})}b&&l(m,r,e,p)}}finally{s=Dt}return o}u()}}},startListening:a,stopListening:c,clearListeners:u}}!function(){function e(e,t){var n=i[e];return n?n.enumerable=t:i[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[q];return J.get(t,e)},set:function(t){var n=this[q];J.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var o=e[t][q];if(!o.P)switch(o.i){case 5:r(o)&&k(o);break;case 4:n(o)&&k(o)}}}function n(e){for(var t=e.t,n=e.k,r=G(n),o=r.length-1;o>=0;o--){var i=r[o];if(i!==q){var s=t[i];if(void 0===s&&!l(t,i))return!0;var a=n[i],c=a&&a[q];if(c?c.t!==s:!p(a,s))return!0}}var u=!!t[q];return r.length!==G(t).length+(u?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return!0;return!1}var i={};!function(e,t){K[e]||(K[e]=t)}("ES5",{J:function(t,n){var r=Array.isArray(t),o=function(t,n){if(t){for(var r=Array(n.length),o=0;o<n.length;o++)Object.defineProperty(r,""+o,e(o,!0));return r}var i=Z(n);delete i[q];for(var s=G(i),a=0;a<s.length;a++){var c=s[a];i[c]=e(c,t||!!i[c].enumerable)}return Object.create(Object.getPrototypeOf(n),i)}(r,t),i={i:r?5:4,A:n?n.A:O(),P:!1,I:!1,D:{},l:n,t,k:o,o:null,O:!1,C:!1};return Object.defineProperty(o,q,{value:i,writable:!0}),o},S:function(e,n,i){i?o(n)&&n[q].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[q];if(n){var o=n.t,i=n.k,s=n.D,c=n.i;if(4===c)a(i,(function(t){t!==q&&(void 0!==o[t]||l(o,t)?s[t]||e(i[t]):(s[t]=!0,k(n)))})),a(o,(function(e){void 0!==i[e]||l(i,e)||(s[e]=!1,k(n))}));else if(5===c){if(r(n)&&(k(n),s.length=!0),i.length<o.length)for(var u=i.length;u<o.length;u++)s[u]=!1;else for(var p=o.length;p<i.length;p++)s[p]=!0;for(var d=Math.min(i.length,o.length),f=0;f<d;f++)i.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&e(i[f])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):r(e)}})}()},8601:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e,t)||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 i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.r(t),n.d(t,{MessageFormatter:()=>y,findClosingBracket:()=>p,parseCases:()=>u,pluralTypeHandler:()=>w,selectTypeHandler:()=>S,splitFormattedArgument:()=>d});var a=n(4942);function c(e){return e.reduce((function(e,t){return e.concat(Array.isArray(t)?c(t):t)}),[])}function l(e){var t={};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(e){return null===e?"null":void 0===e?"undefined":"function"==typeof e?e.toString():e instanceof Date?e.toISOString():JSON.stringify(e)})).join("|"):"_(no-args)_";if(Object.prototype.hasOwnProperty.call(t,i))return t[i];var s=e.apply(void 0,r);return t[i]=s,s}}function u(e){for(var t=function(e){return/\s/.test(e)},n=[],r={},o=0,i=null,s=!1,a=0;a<e.length;){if(s&&(t(e[a])||"{"===e[a]))s=!1,i=e.slice(o,a),"{"===e[a]&&a--;else if(!s&&!t(e[a])){var c="{"===e[a];if(i&&c){var l=p(e,a);if(-1===l)throw new Error('Unbalanced curly braces in string: "'.concat(e,'"'));r[i]=e.slice(a+1,l),a=l,i=null}else i&&(n.push(i),i=null),s=!0,o=a}a++}return s&&(i=e.slice(o)),i&&n.push(i),{args:n,cases:r}}function p(e,t){for(var n=0,r=t+1;r<e.length;r++){var o=e.charAt(r);if("}"===o){if(0===n)return r;n--}else"{"===o&&n++}return-1}function d(e){return f(e.slice(1,-1),",",3)}function f(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!e)return r;if(1===n)return r.push(e),r;var o=e.indexOf(t);if(-1===o)return r.push(e),r;var i=e.substring(0,o).trim(),s=e.substring(o+t.length+1).trim();return r.push(i),f(s,t,n-1,r)}var h,y=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,e),(0,a.Z)(this,"format",l((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(n.process(e,t)).join("")}))),this.locale=t,this.typeHandlers=r}var t,n;return t=e,n=[{key:"process",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return[];var n=e.indexOf("{");if(-1!==n){var r=p(e,n);if(-1===r)throw new Error('Unbalanced curly braces in string: "'.concat(e,'"'));var i=e.substring(n,r+1);if(i){var s=[],a=e.substring(0,n);a&&s.push(a);var c=d(i),l=o(c,3),u=l[0],f=l[1],h=l[2],y=t[u];null==y&&(y="");var m=f&&this.typeHandlers[f];s.push(m?m(y,h,this.locale,t,this.process.bind(this)):y);var b=e.substring(r+1);return b&&s.push(this.process(b,t)),s}}return[e]}}],n&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=0,g="other";function O(e,t){for(var n=0,r="",o=0,i={};n<e.length;){if("#"!==e[n]||o)r+=e[n];else{var s="__hashToken".concat(v++);r+="{".concat(s,", number}"),i[s]=t}"{"===e[n]?o++:"}"===e[n]&&o--,n++}return{caseBody:r,numberValues:i}}function w(e){var t=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=u(t),s=i.args,a=i.cases,c=parseInt(e);s.forEach((function(e){e.startsWith("offset:")&&(c-=parseInt(e.slice("offset:".length)))}));var l=[];if("PluralRules"in Intl){void 0!==h&&h.resolvedOptions().locale===n||(h=new Intl.PluralRules(n));var p=h.select(c);p!==g&&l.push(p)}1===c&&l.push("one"),l.push("=".concat(c),g);for(var d=0;d<l.length;d++){var f=l[d];if(f in a){var y=O(a[f],c),m=y.caseBody,v=y.numberValues;return o(m,b(b({},r),v))}}return e}var j="other";function S(e){var t=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=u(t),i=o.cases;return e in i?r(i[e],n):j in i?r(i.other,n):e}},2574:e=>{"use strict";function t(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function r(){this._defaults=[]}for(var o=function(){var e=s[i];r.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this._defaults.push({fn:e,args:n}),this}},i=0,s=["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"];i<s.length;i++)o();r.prototype._setDefaults=function(e){var r,o,i=function(e,n){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=t(e))){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 s,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw s}}}}(this._defaults);try{for(i.s();!(r=i.n()).done;){var s=r.value;e[s.fn].apply(e,function(e){if(Array.isArray(e))return n(e)}(o=s.args)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||t(o)||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(e){i.e(e)}finally{i.f()}},e.exports=r},1766:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i;"undefined"!=typeof window?i=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),i=void 0):i=self;var s=n(8767),a=n(4445),c=n(2501),l=n(8842),u=n(6244),p=u.isObject,d=u.mixin,f=u.hasOwn,h=n(1253),y=n(2574);function m(){}e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1===arguments.length?new t.Request("GET",e):new t.Request(e,n)};var b=t=e.exports;t.Request=_,b.getXHR=function(){if(i.XMLHttpRequest&&(!i.location||"file:"!==i.location.protocol))return new XMLHttpRequest;throw new Error("Browser-only version of superagent could not find XHR")};var v="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function g(e){if(!p(e))return e;var t=[];for(var n in e)f(e,n)&&O(t,n,e[n]);return t.join("&")}function O(e,t,n){if(void 0!==n)if(null!==n)if(Array.isArray(n)){var r,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 s,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,s=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw s}}}}(n);try{for(i.s();!(r=i.n()).done;)O(e,t,r.value)}catch(e){i.e(e)}finally{i.f()}}else if(p(n))for(var s in n)f(n,s)&&O(e,"".concat(t,"[").concat(s,"]"),n[s]);else e.push(encodeURI(t)+"="+encodeURIComponent(n));else e.push(encodeURI(t))}function w(e){for(var t,n,r={},o=e.split("&"),i=0,s=o.length;i<s;++i)-1===(n=(t=o[i]).indexOf("="))?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function j(e){return/[/+]json($|[^-\w])/i.test(e)}function S(e){this.req=e,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 t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){for(var t,n,r,o,i=e.split(/\r?\n/),s={},a=0,c=i.length;a<c;++a)-1!==(t=(n=i[a]).indexOf(":"))&&(r=n.slice(0,t).toLowerCase(),o=v(n.slice(t+1)),s[r]=o);return s}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function _(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,r=null;try{r=new S(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",r);try{n._isResponseOK(r)||(e=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=r,e.status=e.status||r.status,n.callback(e,r)):n.callback(null,r)}))}b.serializeObject=g,b.parseString=w,b.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"},b.serialize={"application/x-www-form-urlencoded":c.stringify,"application/json":a},b.parse={"application/x-www-form-urlencoded":w,"application/json":JSON.parse},d(S.prototype,h.prototype),S.prototype._parseBody=function(e){var t=b.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&j(this.type)&&(t=b.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},S.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),o=new Error(r);return o.status=this.status,o.method=t,o.url=n,o},b.Response=S,s(_.prototype),d(_.prototype,l.prototype),_.prototype.type=function(e){return this.set("Content-Type",b.types[e]||e),this},_.prototype.accept=function(e){return this.set("Accept",b.types[e]||e),this},_.prototype.auth=function(e,t,n){1===arguments.length&&(t=""),"object"===r(t)&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var o=n.encoder?n.encoder:function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,n,o)},_.prototype.query=function(e){return"string"!=typeof e&&(e=g(e)),e&&this._query.push(e),this},_.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},_.prototype._getFormData=function(){return this._formData||(this._formData=new i.FormData),this._formData},_.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},_.prototype.crossDomainError=function(){var e=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.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},_.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},_.prototype.ca=_.prototype.agent,_.prototype.buffer=_.prototype.ca,_.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},_.prototype.pipe=_.prototype.write,_.prototype._isHost=function(e){return e&&"object"===r(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},_.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||m,this._finalizeQueryString(),this._end()},_.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},_.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=b.getXHR();var t=this.xhr,n=this._formData||this._data;this._setTimeouts(),t.addEventListener("readystatechange",(function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}}));var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",r.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",r.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.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||b.serialize[o?o.split(";")[0]:""];!i&&j(o)&&(i=b.serialize["application/json"]),i&&(n=i(n))}for(var s in this.header)null!==this.header[s]&&f(this.header,s)&&t.setRequestHeader(s,this.header[s]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},b.agent=function(){return new y};for(var x=function(){var e=E[C];y.prototype[e.toLowerCase()]=function(t,n){var r=new b.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}},C=0,E=["GET","POST","OPTIONS","PATCH","PUT","DELETE"];C<E.length;C++)x();function P(e,t,n){var r=b("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}y.prototype.del=y.prototype.delete,b.get=function(e,t,n){var r=b("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},b.head=function(e,t,n){var r=b("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},b.options=function(e,t,n){var r=b("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.del=P,b.delete=P,b.patch=function(e,t,n){var r=b("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.post=function(e,t,n){var r=b("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.put=function(e,t,n){var r=b("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},8842:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var o=n(3695),i=n(6244),s=i.isObject,a=i.hasOwn;function c(){}e.exports=c,c.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},c.prototype.parse=function(e){return this._parser=e,this},c.prototype.responseType=function(e){return this._responseType=e,this},c.prototype.serialize=function(e){return this._serializer=e,this},c.prototype.timeout=function(e){if(!e||"object"!==r(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(a(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},c.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var l=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),u=new Set([408,413,429,500,502,503,504,521,522,524]);c.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&u.has(t.status))return!0;if(e){if(e.code&&l.has(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},c.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()},c.prototype.then=function(e,t){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 Promise((function(e,t){r.on("abort",(function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)t(n.timedoutError);else{var e=new Error("Aborted");e.code="ABORTED",e.status=n.status,e.method=n.method,e.url=n.url,t(e)}})),r.end((function(n,r){n?t(n):e(r)}))}))}return this._fullfilledPromise.then(e,t)},c.prototype.catch=function(e){return this.then(void 0,e)},c.prototype.use=function(e){return e(this),this},c.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},c.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},c.prototype.get=function(e){return this._header[e.toLowerCase()]},c.prototype.getHeader=c.prototype.get,c.prototype.set=function(e,t){if(s(e)){for(var n in e)a(e,n)&&this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},c.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},c.prototype.field=function(e,t,n){if(null==e)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(s(e)){for(var r in e)a(e,r)&&this.field(r,e[r]);return this}if(Array.isArray(t)){for(var o in t)a(t,o)&&this.field(e,t[o]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),n?this._getFormData().append(e,t,n):this._getFormData().append(e,t),this},c.prototype.abort=function(){if(this._aborted)return this;if(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req){if(o.gte(process.version,"v13.0.0")&&o.lt(process.version,"v14.0.0"))throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes");o.gte(process.version,"v14.0.0")&&(this.req.destroyed=!0),this.req.abort()}return this.clearTimeout(),this.emit("abort"),this},c.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},c.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},c.prototype.redirects=function(e){return this._maxRedirects=e,this},c.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},c.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},c.prototype.send=function(e){var t=s(e),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(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&s(this._data))for(var r in e)a(e,r)&&(this._data[r]=e[r]);else"string"==typeof e?(n||this.type("form"),(n=this._header["content-type"])&&(n=n.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},c.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},c.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.slice(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,t)+"?"+n.join("&")}}},c.prototype._appendQueryString=function(){console.warn("Unsupported")},c.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error("".concat(e+t,"ms exceeded"));r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},c.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},1253:(e,t,n)=>{"use strict";var r=n(6244);function o(){}e.exports=o,o.prototype.get=function(e){return this.header[e.toLowerCase()]},o.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=r.type(t);var n=r.params(t);for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(this[o]=n[o]);this.links={};try{e.link&&(this.links=r.parseLinks(e.link))}catch(e){}},o.prototype._setStatusProperties=function(e){var t=Math.trunc(e/100);this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e}},6244:(e,t)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 s,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,s=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw s}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){var t,n={},o=r(e.split(/ *; */));try{for(o.s();!(t=o.n()).done;){var i=t.value.split(/ *= */),s=i.shift(),a=i.shift();s&&a&&(n[s]=a)}}catch(e){o.e(e)}finally{o.f()}return n},t.parseLinks=function(e){var t,n={},o=r(e.split(/ *, */));try{for(o.s();!(t=o.n()).done;){var i=t.value.split(/ *; */),s=i[0].slice(1,-1);n[i[1].split(/ *= */)[1].slice(1,-1)]=s}}catch(e){o.e(e)}finally{o.f()}return n},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e},t.isObject=function(e){return null!==e&&"object"===n(e)},t.hasOwn=Object.hasOwn||function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(new Object(e),t)},t.mixin=function(e,n){for(var r in n)t.hasOwn(n,r)&&(e[r]=n[r])}},3718:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC3986";e.exports={default:r,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}},2501:(e,t,n)=>{"use strict";var r=n(4383),o=n(4409),i=n(3718);e.exports={formats:i,parse:o,stringify:r}},4409:(e,t,n)=>{"use strict";var r=n(4753),o=Object.prototype.hasOwnProperty,i=Array.isArray,s={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},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(i),l=a?i.slice(0,a.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!==(a=s.exec(i))&&p<n.depth;){if(p+=1,!n.plainObjects&&o.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(a[1])}return a&&u.push("["+i.slice(a.index)+"]"),function(e,t,n,r){for(var o=r?t:c(t,n),i=e.length-1;i>=0;--i){var s,a=e[i];if("[]"===a&&n.parseArrays)s=[].concat(o);else{s=n.plainObjects?Object.create(null):{};var l="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,u=parseInt(l,10);n.parseArrays||""!==l?!isNaN(u)&&a!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[])[u]=o:"__proto__"!==l&&(s[l]=o):s={0:o}}o=s}return o}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return s;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?s.charset:e.charset;return{allowDots:void 0===e.allowDots?s.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var n,l={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,p=t.parameterLimit===1/0?void 0:t.parameterLimit,d=u.split(t.delimiter,p),f=-1,h=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?h="utf-8":"utf8=%26%2310003%3B"===d[n]&&(h="iso-8859-1"),f=n,n=d.length);for(n=0;n<d.length;++n)if(n!==f){var y,m,b=d[n],v=b.indexOf("]="),g=-1===v?b.indexOf("="):v+1;-1===g?(y=t.decoder(b,s.decoder,h,"key"),m=t.strictNullHandling?null:""):(y=t.decoder(b.slice(0,g),s.decoder,h,"key"),m=r.maybeMap(c(b.slice(g+1),t),(function(e){return t.decoder(e,s.decoder,h,"value")}))),m&&t.interpretNumericEntities&&"iso-8859-1"===h&&(m=a(m)),b.indexOf("[]=")>-1&&(m=i(m)?[m]:m),o.call(l,y)?l[y]=r.combine(l[y],m):l[y]=m}return l}(e,n):e,p=n.plainObjects?Object.create(null):{},d=Object.keys(u),f=0;f<d.length;++f){var h=d[f],y=l(h,u[h],n,"string"==typeof e);p=r.merge(p,y,n)}return!0===n.allowSparse?p:r.compact(p)}},4383:(e,t,n)=>{"use strict";var r=n(7478),o=n(4753),i=n(3718),s=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,l=String.prototype.split,u=Array.prototype.push,p=function(e,t){u.apply(e,c(t)?t:[t])},d=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(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},y={},m=function e(t,n,i,s,a,u,d,f,m,b,v,g,O,w,j,S){for(var _,x=t,C=S,E=0,P=!1;void 0!==(C=C.get(y))&&!P;){var T=C.get(t);if(E+=1,void 0!==T){if(T===E)throw new RangeError("Cyclic object value");P=!0}void 0===C.get(y)&&(E=0)}if("function"==typeof f?x=f(n,x):x instanceof Date?x=v(x):"comma"===i&&c(x)&&(x=o.maybeMap(x,(function(e){return e instanceof Date?v(e):e}))),null===x){if(a)return d&&!w?d(n,h.encoder,j,"key",g):n;x=""}if("string"==typeof(_=x)||"number"==typeof _||"boolean"==typeof _||"symbol"==typeof _||"bigint"==typeof _||o.isBuffer(x)){if(d){var N=w?n:d(n,h.encoder,j,"key",g);if("comma"===i&&w){for(var I=l.call(String(x),","),k="",A=0;A<I.length;++A)k+=(0===A?"":",")+O(d(I[A],h.encoder,j,"value",g));return[O(N)+(s&&c(x)&&1===I.length?"[]":"")+"="+k]}return[O(N)+"="+O(d(x,h.encoder,j,"value",g))]}return[O(n)+"="+O(String(x))]}var D,R=[];if(void 0===x)return R;if("comma"===i&&c(x))D=[{value:x.length>0?x.join(",")||null:void 0}];else if(c(f))D=f;else{var M=Object.keys(x);D=m?M.sort(m):M}for(var L=s&&c(x)&&1===x.length?n+"[]":n,U=0;U<D.length;++U){var F=D[U],B="object"==typeof F&&void 0!==F.value?F.value:x[F];if(!u||null!==B){var H=c(x)?"function"==typeof i?i(L,F):L:L+(b?"."+F:"["+F+"]");S.set(t,E);var $=r();$.set(y,S),p(R,e(B,H,i,s,a,u,d,f,m,b,v,g,O,w,j,$))}}return R};e.exports=function(e,t){var n,o=e,l=function(e){if(!e)return h;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i.default;if(void 0!==e.format){if(!s.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=i.formatters[n],o=h.filter;return("function"==typeof e.filter||c(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:o,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}}(t);"function"==typeof l.filter?o=(0,l.filter)("",o):c(l.filter)&&(n=l.filter);var u,d=[];if("object"!=typeof o||null===o)return"";u=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=a[u];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var y="comma"===f&&t&&t.commaRoundTrip;n||(n=Object.keys(o)),l.sort&&n.sort(l.sort);for(var b=r(),v=0;v<n.length;++v){var g=n[v];l.skipNulls&&null===o[g]||p(d,m(o[g],g,f,y,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,b))}var O=d.join(l.delimiter),w=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),O.length>0?w+O:""}},4753:(e,t,n)=>{"use strict";var r=n(3718),o=Object.prototype.hasOwnProperty,i=Array.isArray,s=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],s=o.obj[o.prop],a=Object.keys(s),c=0;c<a.length;++c){var l=a[c],u=s[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:s,prop:l}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,o,i){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var c="",l=0;l<a.length;++l){var u=a.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+=a.charAt(l):u<128?c+=s[u]:u<2048?c+=s[192|u>>6]+s[128|63&u]:u<55296||u>=57344?c+=s[224|u>>12]+s[128|u>>6&63]+s[128|63&u]:(l+=1,u=65536+((1023&u)<<10|1023&a.charCodeAt(l)),c+=s[240|u>>18]+s[128|u>>12&63]+s[128|u>>6&63]+s[128|63&u])}return c},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(i(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!o.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var s=t;return i(t)&&!i(n)&&(s=a(t,r)),i(t)&&i(n)?(n.forEach((function(n,i){if(o.call(t,i)){var s=t[i];s&&"object"==typeof s&&n&&"object"==typeof n?t[i]=e(s,n,r):t.push(n)}else t[i]=n})),t):Object.keys(n).reduce((function(t,i){var s=n[i];return o.call(t,i)?t[i]=e(t[i],s,r):t[i]=s,t}),s)}}},2112:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultConfig=t.typingTimeout=t.defaultTransitionTimeMs=t.maxCharacterSrDebounceDelay=t.maxCharacterWarningLimit=t.activitySendDelay=t.screenReaderDebounceDelaySeconds=t.newMessageScreenReaderWait=t.unreadScreenReaderWait=t.userParticipantId=t.apiVersion=t.CSS_NAME=void 0,t.CSS_NAME="cvco",t.apiVersion="2",t.userParticipantId="seamly-client-participant",t.unreadScreenReaderWait=2e3,t.newMessageScreenReaderWait=1e3,t.screenReaderDebounceDelaySeconds=10,t.activitySendDelay=15e3,t.maxCharacterWarningLimit=50,t.maxCharacterSrDebounceDelay=300,t.defaultTransitionTimeMs=300,t.typingTimeout=2e3,t.defaultConfig={namespace:"default",layoutMode:"window",messages:{agent:{showAvatar:!1,showName:!1},user:{showAvatar:!1,showName:!1},timeIndicator:{enabled:!1,threshold:36e5}}}},4134:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resetApp=t.initializeApp=void 0;const i=n(575),s=o(n(3872)),a=o(n(9060)),c=n(915),l=n(59),u=n(5234),p=n(5740);t.initializeApp=(0,i.createAsyncThunk)("initializeApp",((e,{extra:{api:t,config:n},rejectWithValue:o,dispatch:i})=>r(void 0,void 0,void 0,(function*(){var e,r,i,c;let l=null===(e=null==n?void 0:n.context)||void 0===e?void 0:e.locale;try{if(t.hasConversation()){const e=yield t.getConversationIntitialState();return l=(null===(r=e.translation)||void 0===r?void 0:r.locale)||l,{initialState:e,locale:l,config:n}}return(null===(i=null==n?void 0:n.context)||void 0===i?void 0:i.topic)&&t.send("action",{type:p.actionTypes.setTopic,body:{name:n.context.topic,fallbackMessage:n.context.topic}}),(null===(c=null==n?void 0:n.context)||void 0===c?void 0:c.translationLocale)&&(l=n.context.translationLocale,t.send("action",{type:p.actionTypes.setTranslation,body:{enabled:!0,locale:l}})),{initialState:void 0,locale:l,config:n}}catch(e){if(e instanceof s.default){const e=new s.default;return o({name:e.name,message:e.message,originalEvent:e.originalEvent,originalError:e.originalError,action:e.action})}const t=new a.default;return o({name:t.name,message:t.message,langKey:t.langKey})}})))),t.resetApp=(0,i.createAsyncThunk)("resetApp",((e,{dispatch:n,extra:{api:o}})=>r(void 0,void 0,void 0,(function*(){yield o.disconnect(),yield o.clearStore(),n((0,c.resetConfig)()),yield n((0,c.initializeConfig)());try{const{locale:e}=yield n((0,t.initializeApp)()).unwrap();yield n((0,l.setLocale)(e))}catch(e){}n((0,u.initializeVisibility)())}))))},5865:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectUserHasResponded=void 0;const r=n(575);t.selectUserHasResponded=(0,r.createSelector)((({app:e})=>e),(({userHasResponded:e})=>e))},5150:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setHasResponded=t.appSlice=void 0;const r=n(575),o=n(4134),i={userHasResponded:!1};t.appSlice=(0,r.createSlice)({name:"app",initialState:i,reducers:{setHasResponded:(e,{payload:t})=>{e.userHasResponded=t}},extraReducers:e=>{e.addCase(o.resetApp.pending,(()=>i)).addCase(o.initializeApp.fulfilled,((e,{payload:t})=>{var n;t.initialState&&"userResponded"in t.initialState&&(e.userHasResponded=null===(n=t.initialState)||void 0===n?void 0:n.userResponded)}))}}),t.setHasResponded=t.appSlice.actions.setHasResponded,t.default=t.appSlice.reducer},915:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resetConfig=t.initializeConfig=void 0;const i=n(575),s=o(n(9060));t.initializeConfig=(0,i.createAsyncThunk)("initializeConfig",((e,{extra:{api:t,config:n},rejectWithValue:o})=>r(void 0,void 0,void 0,(function*(){var e;try{const{features:r,defaultLocale:o,preChat:i,agentParticipant:s,userParticipant:a,startChatIcon:c}=yield t.getConfig(),l=(null===(e=null==n?void 0:n.context)||void 0===e?void 0:e.locale)||o,{connectWhenInView:u}=n;return{features:r,defaultLocale:o,preChat:i,agentParticipant:s,userParticipant:a,startChatIcon:c,locale:l,connectWhenInView:u}}catch(e){const t=new s.default;return o({name:t.name,langKey:t.langKey,message:t.message})}})))),t.resetConfig=(0,i.createAsyncThunk)("resetConfig",((e,{extra:{config:t}})=>r(void 0,void 0,void 0,(function*(){return t}))))},6065:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useStartChatIcon=t.useParticipants=t.useConfig=void 0;const r=n(4788),o=n(6113);t.useConfig=()=>(0,o.useSelector)(r.selectConfig),t.useParticipants=function(){const{agentParticipant:e,userParticipant:n}=(0,t.useConfig)();return{agent:e,user:n}},t.useStartChatIcon=function(){const{startChatIcon:e}=(0,t.useConfig)();return e}},4788:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectConfig=void 0;const r=n(575),o=n(2629);t.selectConfig=(0,r.createSelector)((({config:e})=>e),(e=>{let t=Object.assign({visible:"inline"===(null==e?void 0:e.layoutMode)?o.visibilityStates.open:o.visibilityStates.minimized,appContainerClassNames:e.appContainerClassNames||[]},e);return"function"==typeof t.appContainerClassNames&&(t=Object.assign(Object.assign({},t),{appContainerClassNames:t.appContainerClassNames(t)})),t}))},3394:function(e,t,n){"use strict";var r,o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.setPreChatEvents=t.updateConfig=t.setConfig=t.configSlice=t.initialConfigState=void 0;const i=n(575),s=n(2112),a=n(915),c=n(4959);t.initialConfigState=Object.assign(Object.assign({},s.defaultConfig),{api:{domain:"",key:"",secure:!0},hideOnNoUserResponse:!1,connectWhenInView:!0,showDisclaimer:!1,showFaq:!1,showSuggestions:!0,customComponents:{},defaults:{visible:null},preChatEvents:[]});const l=["hideOnNoUserResponse","connectWhenInView","showDisclaimer","showFaq","showSuggestions","namespace","customComponents","defaults","layoutMode","api","zIndex","context","appContainerClassNames","messages","visible","visibilityCallback","errorCallback","agentParticipant","userParticipant","startChatIcon"],u=(e,t)=>{const n=(0,c.pick)(t,l),{messages:r}=n,i=o(n,["messages"]);let s=e;return Object.keys(i).length>0&&(s=Object.assign(Object.assign({},s),i)),r&&(s=Object.assign(Object.assign({},s),{messages:Object.assign(Object.assign({},s.messages),r)})),s};t.configSlice=(0,i.createSlice)({name:"config",initialState:t.initialConfigState,reducers:{setConfig:(e,{payload:t})=>u(e,t),updateConfig:(e,{payload:t})=>u(e,t),setPreChatEvents:(e,{payload:{events:t}})=>{e.preChatEvents=t}},extraReducers:e=>{e.addCase(a.resetConfig.fulfilled,(e=>e)).addCase(a.initializeConfig.fulfilled,((e,{payload:{preChat:t,agentParticipant:n,userParticipant:r,startChatIcon:o}})=>{e.preChatEvents=t.map((e=>({type:"message",payload:e}))),e.agentParticipant=n,e.userParticipant=r,e.startChatIcon=o}))}}),r=t.configSlice.actions,t.setConfig=r.setConfig,t.updateConfig=r.updateConfig,t.setPreChatEvents=r.setPreChatEvents,t.default=t.configSlice.reducer},4189:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Consumer=t.Provider=void 0;const r=(0,n(7210).createContext)({handleSubmit:()=>{},isSubmitted:!1,isValid:!1,updateControlValue:()=>{},updateControlTouched:()=>{},errors:void 0});t.default=r,t.Provider=r.Provider,t.Consumer=r.Consumer},7346:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useFormControl=t.useValidations=t.useForm=t.useFormContext=void 0;const o=n(4972),i=n(9141),s=n(9207),a=n(6113),c=r(n(4189)),l=n(1361);function u(){return(0,s.useContext)(c.default)}t.useFormContext=u,t.useForm=function(){const{handleSubmit:e,isSubmitted:t,isValid:n}=u();return{handleSubmit:e,isSubmitted:t,isValid:n}},t.useValidations=function(e,t){const n=(0,s.useMemo)((()=>(0,l.validate)(e,t)),[e,t]);return{isValid:0===Object.keys(n).length,errors:n}},t.useFormControl=function(e){const t=(0,a.useDispatch)(),{formId:n,updateControlValue:r,updateControlTouched:c,errors:l}=u(),p=!!(0,a.useSelector)((e=>(0,i.getFormById)(e,{formId:n}))),d=(0,a.useSelector)((t=>(0,i.getControlValueByName)(t,{formId:n,name:e}))),f=(0,a.useSelector)((t=>(0,i.getControlTouchedByName)(t,{formId:n,name:e}))),h=null==l?void 0:l[e],y=!h;(0,s.useEffect)((()=>{p&&t((0,o.registerControl)({formId:n,name:e}))}),[p,n,e,t]),(0,s.useLayoutEffect)((()=>()=>{t((0,o.deregisterControl)({formId:n,name:e}))}),[p,n,e,t]);const m=(0,s.useCallback)((t=>r(e,t.target.value)),[e,r]),b=(0,s.useCallback)((()=>{c(e,!0)}),[c,e]);return[(0,s.useMemo)((()=>({name:e,onInput:m,onBlur:b,value:d})),[e,m,b,d]),(0,s.useMemo)((()=>({isValid:y,error:h,touched:f})),[y,h,f])]}},9141:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getControlTouchedByName=t.getControlValueByName=t.getFormValuesByFormId=t.getFormControlsByFormId=t.getFormById=t.getState=void 0;const r=n(575);t.getState=({forms:e})=>e,t.getFormById=(0,r.createSelector)(t.getState,((e,{formId:t})=>t),((e,t)=>e[t])),t.getFormControlsByFormId=(0,r.createSelector)(t.getFormById,(e=>(null==e?void 0:e.controls)||{})),t.getFormValuesByFormId=(0,r.createSelector)(t.getFormControlsByFormId,(e=>{const t={};return Object.entries(e).forEach((([e,{value:n}])=>{t[e]=n})),t})),t.getControlValueByName=(0,r.createSelector)(t.getFormControlsByFormId,((e,{name:t})=>t),((e,t)=>{var n;return null===(n=e[t])||void 0===n?void 0:n.value})),t.getControlTouchedByName=(0,r.createSelector)(t.getFormControlsByFormId,((e,{name:t})=>t),((e,t)=>{var n;return null===(n=e[t])||void 0===n?void 0:n.touched}))},4972:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.updateControlTouched=t.updateControlValue=t.deregisterControl=t.registerControl=t.deregisterForm=t.registerForm=t.formsSlice=void 0;const o=n(575),i=n(4134),s={controls:{}},a={value:"",touched:!1},c={controls:a};t.formsSlice=(0,o.createSlice)({name:"forms",initialState:c,reducers:{registerForm:(e,{payload:{persistData:t,formId:n}})=>{var r;const o=t&&null!==(r=e[n])&&void 0!==r?r:Object.assign(Object.assign({},s),{persistData:t});e[n]=o},deregisterForm:(e,{payload:{formId:t}})=>{var n;return(null===(n=e[t])||void 0===n?void 0:n.persistData)||delete e[t],e},registerControl:(e,{payload:{name:t,formId:n}})=>{e[n].controls={[t]:a}},deregisterControl:(e,{payload:{name:t,formId:n}})=>{const r=e[n];if(!r)return e;if(r.persistData)return e;const o=Object.assign({},r.controls);return delete o[t],Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},r),{controls:o})})},updateControlValue:(e,{payload:{formId:t,name:n,value:r}})=>{var o;(null===(o=e[t])||void 0===o?void 0:o.controls)&&(e[t].controls[n].value=r)},updateControlTouched:(e,{payload:{formId:t,name:n,touched:r}})=>{var o;(null===(o=e[t])||void 0===o?void 0:o.controls[n])&&(e[t].controls[n].touched=r)}},extraReducers:e=>{e.addCase(i.resetApp.pending,(()=>c))}}),r=t.formsSlice.actions,t.registerForm=r.registerForm,t.deregisterForm=r.deregisterForm,t.registerControl=r.registerControl,t.deregisterControl=r.deregisterControl,t.updateControlValue=r.updateControlValue,t.updateControlTouched=r.updateControlTouched,t.default=t.formsSlice.reducer},1361:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=void 0,t.validate=function(e,t={}){return Object.entries(t).reduce(((t,[n,r])=>{var o;const i=Array.isArray(r)?r:[r];for(let r=0;null!==(o=r<(null==i?void 0:i.length))&&void 0!==o&&o;r++)if(!i[r].fn(e[n],i[r].compareValue)){t[n]=i[r].errorText;break}return t}),{})}},59:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.setLocale=void 0;const o=n(575);t.setLocale=(0,o.createAsyncThunk)("setLocale",((e,{extra:{api:t}})=>r(void 0,void 0,void 0,(function*(){return{translations:yield t.getTranslations(e),locale:e}}))),{condition:(e,{getState:t})=>{const{i18n:{isLoading:n,locale:r}}=t();if(e===r||n)return!1}})},546:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useI18n=void 0;const s=n(8601),a=n(9207),c=n(6113),l=i(n(7658)),u=new s.MessageFormatter("en-GB",{plural:s.pluralTypeHandler,select:s.selectTypeHandler});t.useI18n=function(){const e=(0,c.useSelector)(l.selectTranslations),t=(0,c.useSelector)(l.selectLocale),n=(0,c.useSelector)(l.selectInitialLocale),r=(0,c.useSelector)((e=>e.i18n.isLoading));return{t:(0,a.useCallback)(((n,o={})=>{const i=e[n];return i?u.format(i,o):(r||console.warn(`Translation key: ${n} is missing in locale: ${t}`),null)}),[e,t,r]),locale:t,initialLocale:n}}},7658:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectLocale=t.selectInitialLocale=t.selectTranslations=void 0;const r=n(573);t.selectTranslations=(0,r.createSelector)((({i18n:e})=>e),(({translations:e})=>e)),t.selectInitialLocale=(0,r.createSelector)((({i18n:e})=>e),(({initialLocale:e})=>e)),t.selectLocale=(0,r.createSelector)((({i18n:e})=>e),(({locale:e})=>e))},5217:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.setTranslations=t.setInitialLocale=t.i18nSlice=void 0;const o=n(575),i=n(915),s=n(59);t.i18nSlice=(0,o.createSlice)({name:"app",initialState:{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,locale:void 0},reducers:{setInitialLocale:(e,t)=>{e.initialLocale=t.payload},setTranslations:(e,{payload:t})=>{e.translations=t}},extraReducers:e=>{e.addCase(i.initializeConfig.fulfilled,((e,{payload:t})=>{e.initialLocale=t.locale})).addCase(s.setLocale.pending,(e=>{e.isLoading=!0})).addCase(s.setLocale.rejected,(e=>{e.isLoading=!1})).addCase(s.setLocale.fulfilled,((e,{payload:t})=>{e.isLoading=!1,(null==t?void 0:t.translations)&&(e.locale=t.locale,e.translations=Object.keys(t.translations).sort().reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t.translations[n]})),{}))}))}}),r=t.i18nSlice.actions,t.setInitialLocale=r.setInitialLocale,t.setTranslations=r.setTranslations,t.default=t.i18nSlice.reducer},8877:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useInterrupt=void 0;const s=n(546),a=n(9207),c=n(6113),l=i(n(5373));t.useInterrupt=function(){const{t:e}=(0,s.useI18n)(),t=(0,c.useSelector)(l.selectError);return{hasInterrupt:Boolean(t),meta:(0,a.useMemo)((()=>{if(!t)return{};const{langKey:n,action:r}=t,o=e(`${n}.title`),i=e(`${n}.message`),s=e(`${n}.srText`),a=e(`${n}.buttonText`);return Object.assign(Object.assign(Object.assign(Object.assign({},n?{title:o,message:i,srText:s}:{}),r?{action:r}:{}),r&&n?{buttonText:a}:{}),{originalError:t})}),[e,t]),error:t}}},117:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(3317)),i=r(n(662)),s=r(n(7865)),a=r(n(3872)),c=r(n(9638)),l=r(n(9060)),u=n(5560),p=[i.default,o.default,a.default,s.default,c.default,l.default];t.default=function({api:e}){return()=>t=>n=>{const{payload:r,type:o}=n;if(o===u.setInterrupt.type){if(!p.some((e=>r.name===e.name)))throw new Error(r);"reset"===r.action&&e.disconnect().then((()=>{e.clearStore()}))}return t(n)}}},5373:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectError=void 0;const r=n(575);t.selectError=(0,r.createSelector)((({interrupt:e})=>e),(({error:e})=>e))},5560:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.clearInterrupt=t.setInterrupt=t.interruptSlice=void 0;const o=n(575),i=n(4134),s=n(915),a=n(59),c=n(5234),l={error:void 0};t.interruptSlice=(0,o.createSlice)({name:"interrupt",initialState:l,reducers:{setInterrupt:(e,t)=>{e.error=t.payload},clearInterrupt:()=>l},extraReducers:e=>{e.addCase(i.resetApp.fulfilled,(()=>l)).addMatcher((0,o.isAnyOf)(i.initializeApp.rejected,s.initializeConfig.rejected,a.setLocale.rejected,c.setVisibility.rejected,c.initializeVisibility.rejected),((e,{payload:t})=>{e.error=t}))}}),r=t.interruptSlice.actions,t.setInterrupt=r.setInterrupt,t.clearInterrupt=r.clearInterrupt,t.default=t.interruptSlice.reducer},2752:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useAppDispatch=t.createStore=void 0;const o=n(575),i=r(n(5150)),s=r(n(3394)),a=n(2285),c=r(n(4972)),l=r(n(5217)),u=r(n(117)),p=r(n(5560)),d=r(n(2190)),f=r(n(1153)),h=r(n(3128)),y=r(n(841)),m=r(n(579)),b=n(6113);t.createStore=function({initialState:e,api:t,eventBus:n,config:r}){return(0,o.configureStore)({reducer:{state:f.default,app:i.default,config:s.default,i18n:l.default,translations:y.default,visibility:m.default,forms:c.default,interrupt:p.default},preloadedState:e,middleware:e=>e({thunk:{extraArgument:{api:t,eventBus:n,config:r}},serializableCheck:!1}).concat([(0,a.createErrorsMiddleware)({api:t}),(0,u.default)({api:t}),(0,d.default)({api:t}),h.default])})},t.useAppDispatch=b.useDispatch},1153:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.stopIdleDetachCountdownCounter=t.showOption=t.setUserSelectedOptions=t.setUserSelectedOption=t.setUserEntryType=t.setUploadProgress=t.setUploadError=t.setUploadComplete=t.setServiceEntryMetadata=t.setServiceDataItem=t.setSeamlyContainerElement=t.setParticipant=t.setLoadedImageEventIds=t.setIsLoading=t.setInitialState=t.setHistory=t.setHeaderTitle=t.setHeaderSubTitle=t.setFeatures=t.setFeatureEnabledState=t.setEventsRead=t.setBlockAutoEntrySwitch=t.setActiveService=t.setActiveEntryType=t.resetHistoryLoadedFlag=t.registerUpload=t.initResumeConversationPrompt=t.initIdleDetachCountdown=t.hideOption=t.decrementIdleDetachCountdownCounter=t.clearResumeConversationPrompt=t.clearIdleDetachCountdown=t.clearFeatures=t.clearEvents=t.clearAllUploads=t.addEvent=t.ackEvent=t.storeSlice=t.initialStoreState=t.mergeHistory=t.orderHistory=t.isUnreadMessage=void 0;const o=n(575),i=n(4134),s=n(915),a=n(9643),c=n(4959),l=n(5740);t.isUnreadMessage=({type:e,payload:t})=>e===l.eventTypes.message&&!t.fromClient||e===l.eventTypes.info&&t.type===l.payloadTypes.text,t.orderHistory=e=>e.sort((({payload:{occurredAt:e}},{payload:{occurredAt:t}})=>e-t)),t.mergeHistory=(e,n)=>{const r=e.filter((e=>!n.some((t=>t.payload.id===e.payload.id)))),o=n.filter((e=>!("participant"===e.type&&!e.payload.participant.introduction))).reverse();return(0,t.orderHistory)([...o,...r])};const u=(e,t)=>{if(!e)return{participants:{},currentAgent:""};const{participants:n}=e||{participants:{}},{id:r,avatar:o,name:i,introduction:s}=t.participant,a=n[r],c=Object.assign(Object.assign({},n),{[r]:a?Object.assign(Object.assign(Object.assign(Object.assign({},a),o?{avatar:o}:{}),i?{name:i}:{}),s?{introduction:s}:{}):t.participant});return Object.assign(Object.assign({},e),{participants:c,currentAgent:e.currentAgent===r||t.fromClient?e.currentAgent:r})},p=(e,t)=>{const n="message"===t.type?null==t?void 0:t.payload.entry:{},{blockAutoEntrySwitch:r}=e;if(!n)return Object.assign(Object.assign({},e),{optionsOverride:{}});const{type:o,options:i}=n;let s=e.active;return r||o===e.userSelected||(s=o),Object.assign(Object.assign({},e),{active:s,optionsOverride:Object.assign(Object.assign({},e.optionsOverride),{[o]:i||{}})})};t.initialStoreState={events:[],initialState:{userResponded:!1},unreadEvents:0,userHasResponded:!1,loadedImageEventIds:[],isLoading:!1,idleDetachCountdown:{hasCountdown:!1,isActive:!1,remaining:void 0,wasStopped:void 0,count:void 0,timer:void 0},resumeConversationPrompt:!1,serviceInfo:{activeServiceSessionId:""},participantInfo:{participants:{},currentAgent:""},headerTitles:{title:null,subTitle:""},historyLoaded:!1,skiplinkTargetId:(0,a.randomId)(),optionsButtonId:(0,a.randomId)(),headerCollapseButtonId:(0,a.randomId)(),serviceData:{},options:{features:{},panelActive:!1,optionActive:"",userSelectedOptions:{}},showFileUpload:!1,currentUploads:[],entryMeta:{default:l.entryTypes.text,active:l.entryTypes.text,userSelected:null,blockAutoEntrySwitch:!1,options:{},optionsOverride:{}},seamlyContainerElement:null},t.storeSlice=(0,o.createSlice)({name:"store",initialState:t.initialStoreState,reducers:{addEvent:(e,n)=>{var r,o;const{type:i,payload:s}=n.payload,c=e.options.features.hasOwnProperty(l.featureKeys.uploads);let u=Object.assign({},e.options);if(c&&(i===l.eventTypes.message||i===l.eventTypes.participant)&&!s.fromClient){const e="message"===i?null===(r=s.entry)||void 0===r?void 0:r.type:{};u=Object.assign(Object.assign({},u),{features:Object.assign(Object.assign({},u.features),{uploads:Object.assign(Object.assign({},null===(o=u.features)||void 0===o?void 0:o.uploads),{enabledFromEntry:e===l.entryTypes.upload})})})}const d=(0,t.isUnreadMessage)(n.payload);if(e.events.find((e=>e.payload.id===s.id)))return;const f=p(e.entryMeta,n.payload);e.entryMeta=c||f.active!==l.entryTypes.upload?f:Object.assign({},e.entryMeta),e.options=u,d&&(e.unreadEvents+=1,n.payload.payload.messageStatus=s.fromClient?l.readStates.read:l.readStates.received),n.payload.payload.key=(0,a.randomId)(),e.events.push(n.payload)},ackEvent:(e,{payload:n})=>{if(!n.transactionId)return void console.warn("ACK received without transaction ID.");const r=e.events.find((e=>e.payload.transactionId===n.transactionId)),{id:o,occurredAt:i}=n;r&&(e.events=(0,t.orderHistory)(e.events.map((e=>e.payload.id===r.payload.id?Object.assign(Object.assign({},e),{payload:Object.assign(Object.assign({},e.payload),{id:o,occurredAt:i})}):e))))},clearEvents:e=>{e.unreadEvents=0,e.loadedImageEventIds=[],e.events=[]},setEventsRead:(e,{payload:t})=>{e.unreadEvents=0,e.events.forEach((e=>(-1!==t.indexOf(e.payload.id)&&(e.payload=Object.assign(Object.assign({},e.payload),e.payload.messageStatus===l.readStates.received&&{messageStatus:l.readStates.read})),e)))},setLoadedImageEventIds:(e,{payload:t})=>{e.loadedImageEventIds.push(t)},setHistory:(e,{payload:{events:n,participants:r,activeServiceSessionId:o,activeServiceSettings:i={},serviceData:s,resumeConversationPrompt:a}})=>{var c;const d=(0,t.mergeHistory)(e.events,n),f=Object.assign(Object.assign({},e.participantInfo.participants),r),h=d.slice().reverse().find((e=>("message"===e.type||"participant"===e.type)&&!e.payload.fromClient));let y=null;h&&("message"===h.type&&(y=h.payload.participant),"participant"===h.type&&(y=h.payload.participant.id));const{entry:m}=i,{upload:b}=m.options,v=p(Object.assign(Object.assign(Object.assign({},e.entryMeta),m),{active:m.default||l.payloadTypes.text,options:Object.assign({},m&&m.options?m.options:{})}),d[d.length-1]);let g=Object.assign({},e.options.features);const O=g.hasOwnProperty(l.featureKeys.uploads);if(O&&"message"===(null==h?void 0:h.type)){const{payload:e}=h,t=(null===(c=null==e?void 0:e.entry)||void 0===c?void 0:c.type)||{};g=Object.assign(Object.assign({},g),{uploads:{enabled:!(!b||!b.enabled),enabledFromEntry:t===l.entryTypes.upload}})}e.unreadEvents=d.filter((e=>"message"===e.type&&e.payload.messageStatus===l.readStates.received)).length,e.events=d.filter((e=>"participant"!==e.type||!!e.payload.participant.introduction)),e.participantInfo=Object.assign(Object.assign(Object.assign({},e.participantInfo),y?u(e.participantInfo,{participant:f[y]}):{}),{participants:f}),e.historyLoaded=!0,e.serviceInfo=Object.assign(Object.assign({},e.serviceInfo),{activeServiceSessionId:o}),e.serviceData=Object.assign(Object.assign({},e.serviceData),s),e.options=Object.assign(Object.assign({},e.options),{features:g||{}}),e.entryMeta=O||v.active!==l.entryTypes.upload?v:Object.assign({},e.entryMeta),e.resumeConversationPrompt=a||!1,y&&(e.headerTitles.subTitle=f[y].name)},resetHistoryLoadedFlag:e=>{e.historyLoaded=!1},setIsLoading:(e,{payload:t})=>{e.isLoading=t},initIdleDetachCountdown:(e,{payload:t})=>{const{delaySeconds:n,delayTime:r}=t;e.idleDetachCountdown={hasCountdown:!0,isActive:!0,wasStopped:!1,count:n,remaining:n,timer:r}},decrementIdleDetachCountdownCounter:e=>{const{idleDetachCountdown:t}=e,{remaining:n}=t,r=n-1;e.idleDetachCountdown.remaining=r,e.idleDetachCountdown.timer=(0,c.getTimeFromSeconds)(r)},stopIdleDetachCountdownCounter:e=>{e.idleDetachCountdown.isActive=!1,e.idleDetachCountdown.wasStopped=!0},clearIdleDetachCountdown:e=>{e.idleDetachCountdown.hasCountdown=!1,e.idleDetachCountdown.isActive=!1},initResumeConversationPrompt:e=>{e.resumeConversationPrompt=!0},clearResumeConversationPrompt:e=>{e.resumeConversationPrompt=!1},setParticipant:(e,{payload:t})=>{e.participantInfo=u(e.participantInfo,{participant:t.participant,fromClient:t.fromClient})},setActiveService:(e,{payload:t})=>{e.serviceInfo.activeServiceSessionId!==t&&(e.serviceInfo.activeServiceSessionId=t)},setHeaderTitle:(e,{payload:t})=>{e.headerTitles.title=t},setHeaderSubTitle:(e,{payload:t})=>{e.headerTitles.subTitle=t},setInitialState:(e,{payload:n})=>{e.initialState=n.initialState,e.unreadEvents=t.initialStoreState.unreadEvents},setServiceDataItem:(e,{payload:t})=>{e.serviceData[t.type]=t},setFeatures:(e,{payload:t})=>{t.features&&(e.options.features=t.features)},setFeatureEnabledState:(e,{payload:t})=>{e.options.features.hasOwnProperty(t.key)&&(e.options.features[t.key].enabled=t.enabled)},clearFeatures:e=>{e.options.features={}},showOption:(e,{payload:t})=>{e.options.panelActive=!0,e.options.optionActive=t},hideOption:e=>{e.options.panelActive=!1,e.options.optionActive=""},setUserSelectedOptions:(e,{payload:t})=>{e.options.userSelectedOptions=t},setUserSelectedOption:(e,{payload:t})=>{const{option:n,value:r}=t;e.options.userSelectedOptions[n]=r},setBlockAutoEntrySwitch:(e,{payload:t})=>{e.entryMeta.blockAutoEntrySwitch=t},setServiceEntryMetadata:(e,{payload:t})=>{e.entryMeta.active=t.default,e.entryMeta.options=t.options||{},e.entryMeta.optionsOverride={}},setActiveEntryType:(e,{payload:t})=>{e.entryMeta.active=t},setUserEntryType:(e,{payload:t})=>{e.entryMeta.userSelected=t},registerUpload:(e,{payload:t})=>{e.currentUploads.push({id:t.fileId,name:t.fileName,progress:1,uploading:!0,complete:!1,error:"",uploadHandle:t.uploadHandle})},setUploadProgress:(e,{payload:t})=>{e.currentUploads=e.currentUploads.map((e=>e.id===t.fileId?Object.assign(Object.assign({},e),{progress:t.progress,uploading:100!==t.progress,uploadHandle:100===t.progress?null:e.uploadHandle}):e))},setUploadError:(e,{payload:t})=>{e.currentUploads=e.currentUploads.map((e=>e.id===t.fileId?Object.assign(Object.assign({},e),{error:t.errorText,progress:0,uploading:!1,uploadHandle:null}):e))},setUploadComplete:(e,{payload:t})=>{e.currentUploads=e.currentUploads.map((e=>e.id===t?Object.assign(Object.assign({},e),{complete:!0}):e))},clearAllUploads:e=>{e.currentUploads=[]},setSeamlyContainerElement:(e,{payload:t})=>{e.seamlyContainerElement=t}},extraReducers:e=>{e.addCase(i.resetApp.pending,(()=>t.initialStoreState)).addCase(s.initializeConfig.fulfilled,((e,{payload:t})=>{var n;e.headerTitles.subTitle=null===(n=t.agentParticipant)||void 0===n?void 0:n.name,t.features&&(e.options.features=t.features)})).addCase(i.initializeApp.fulfilled,((e,{payload:t})=>{t.initialState&&(e.initialState=t.initialState)}))}}),r=t.storeSlice.actions,t.ackEvent=r.ackEvent,t.addEvent=r.addEvent,t.clearAllUploads=r.clearAllUploads,t.clearEvents=r.clearEvents,t.clearFeatures=r.clearFeatures,t.clearIdleDetachCountdown=r.clearIdleDetachCountdown,t.clearResumeConversationPrompt=r.clearResumeConversationPrompt,t.decrementIdleDetachCountdownCounter=r.decrementIdleDetachCountdownCounter,t.hideOption=r.hideOption,t.initIdleDetachCountdown=r.initIdleDetachCountdown,t.initResumeConversationPrompt=r.initResumeConversationPrompt,t.registerUpload=r.registerUpload,t.resetHistoryLoadedFlag=r.resetHistoryLoadedFlag,t.setActiveEntryType=r.setActiveEntryType,t.setActiveService=r.setActiveService,t.setBlockAutoEntrySwitch=r.setBlockAutoEntrySwitch,t.setEventsRead=r.setEventsRead,t.setFeatureEnabledState=r.setFeatureEnabledState,t.setFeatures=r.setFeatures,t.setHeaderSubTitle=r.setHeaderSubTitle,t.setHeaderTitle=r.setHeaderTitle,t.setHistory=r.setHistory,t.setInitialState=r.setInitialState,t.setIsLoading=r.setIsLoading,t.setLoadedImageEventIds=r.setLoadedImageEventIds,t.setParticipant=r.setParticipant,t.setSeamlyContainerElement=r.setSeamlyContainerElement,t.setServiceDataItem=r.setServiceDataItem,t.setServiceEntryMetadata=r.setServiceEntryMetadata,t.setUploadComplete=r.setUploadComplete,t.setUploadError=r.setUploadError,t.setUploadProgress=r.setUploadProgress,t.setUserEntryType=r.setUserEntryType,t.setUserSelectedOption=r.setUserSelectedOption,t.setUserSelectedOptions=r.setUserSelectedOptions,t.showOption=r.showOption,t.stopIdleDetachCountdownCounter=r.stopIdleDetachCountdownCounter,t.default=t.storeSlice.reducer},2108:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLocaleNativeName=t.useTranslationsContainer=t.useTranslatedEventData=t.useTranslations=void 0;const r=n(6787),o=n(841),i=n(9207),s=n(6113),a=n(2849),c=n(5740);function l(){const{sendAction:e}=(0,a.useSeamlyCommands)(),t=(0,s.useDispatch)(),n=(0,i.useCallback)((n=>{e({type:c.actionTypes.setTranslation,body:{enabled:!0,locale:n}}),t((0,o.enableTranslation)(n))}),[e,t]),r=(0,i.useCallback)((()=>{e({type:c.actionTypes.setTranslation,body:{enabled:!1}}),t((0,o.disableTranslation)())}),[e,t]),{languages:l,isActive:u,isAvailable:p,currentLocale:d}=(0,s.useSelector)((({translations:e})=>e));return{languages:l,isActive:u,isAvailable:p,currentLocale:d,enableTranslations:n,disableTranslations:r}}t.useTranslations=l,t.useTranslatedEventData=function(e){const{translatedBody:t,body:n}=e.payload?"participant"===e.type?{body:null===(o=e.payload)||void 0===o?void 0:o.participant.introduction,translatedBody:null===(a=null===(i=e.payload)||void 0===i?void 0:i.participant)||void 0===a?void 0:a.translatedIntroduction}:{body:e.payload.body,translatedBody:e.payload.translatedBody}:{body:void 0,translatedBody:void 0};var o,i,a;const c=!!t,l=(0,s.useSelector)((0,r.selectIsTranslated)(e));return{body:c&&l?null==t?void 0:t.data:n,hasTranslation:c,isTranslated:l&&c,locale:null==t?void 0:t.locale}},t.useTranslationsContainer=function(){const e=(0,s.useSelector)((({translations:e})=>e.containerId));return{id:e,focusContainer:(0,a.useElementFocusingById)(e)}},t.useLocaleNativeName=function(e){const{languages:t}=l();return(0,i.useMemo)((()=>{var n;return null===(n=null==t?void 0:t.find((t=>t.locale===e)))||void 0===n?void 0:n.nativeName}),[e,t])}},6787:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectIsTranslated=void 0;const r=n(575);t.selectIsTranslated=e=>(0,r.createSelector)((e=>e.translations.translatedEventGroups),(t=>Object.values(t).every((t=>{var n;return!t.includes(null===(n=null==e?void 0:e.payload)||void 0===n?void 0:n.id)}))))},841:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.disableEventsTranslation=t.enableEventsTranslation=t.disableTranslation=t.enableTranslation=t.translationSlice=t.translationsInitialState=void 0;const o=n(575),i=n(915),s=n(1153);t.translationsInitialState={isActive:!1,currentLocale:void 0,isAvailable:!1,languages:[],containerId:(0,o.nanoid)(),translatedEventGroups:{}};const a=(e,t)=>{const n=[...e].reduce(((e,{payload:n},r,o)=>{var i;if(e[t]){if("divider"===(null==n?void 0:n.type)&&(null===(i=null==n?void 0:n.body)||void 0===i?void 0:i.translationEnabled))return o.splice(0),e;e[t].push(n.id)}return n.id===t&&(e[t]=[]),e}),{}),[[r,o]]=Object.entries(n),i=e.filter((e=>{var t;return"divider"===(null===(t=e.payload)||void 0===t?void 0:t.type)})).map((e=>e.payload.id)).at(-1);return{lastGroupId:i,groupId:r,eventIds:o}};t.translationSlice=(0,o.createSlice)({name:"translation",initialState:t.translationsInitialState,reducers:{enableTranslation:(e,{payload:t})=>{e.isActive=!0,e.currentLocale=t},disableTranslation:e=>{e.isActive=!1,e.currentLocale=void 0},enableEventsTranslation:(e,{payload:{events:t,id:n}})=>{delete e.translatedEventGroups[n];const{lastGroupId:r}=a(t,n);e.lastGroupId=r},disableEventsTranslation:(e,{payload:{events:t,id:n}})=>{const{lastGroupId:r,groupId:o,eventIds:i}=a(t,n);e.lastGroupId=r,e.translatedEventGroups[o]=i}},extraReducers:e=>{e.addCase(i.initializeConfig.fulfilled,((e,{payload:t})=>{var n;const r=null===(n=null==t?void 0:t.features)||void 0===n?void 0:n.translation;r&&(e.isAvailable=!0===r.enabled,e.languages=r.languages)})).addCase(s.addEvent,((e,{payload:t})=>{e.translatedEventGroups[e.lastGroupId]&&e.translatedEventGroups[e.lastGroupId].push(t.payload.id)}))}}),r=t.translationSlice.actions,t.enableTranslation=r.enableTranslation,t.disableTranslation=r.disableTranslation,t.enableEventsTranslation=r.enableEventsTranslation,t.disableEventsTranslation=r.disableEventsTranslation,t.default=t.translationSlice.reducer},5234:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.initializeVisibility=t.setVisibility=void 0;const a=n(575),c=n(5865),l=i(n(4788)),u=n(579),p=n(2421),d=n(4809),f=n(2629),h=i(n(3489)),y=[f.visibilityStates.open,f.visibilityStates.minimized,f.visibilityStates.hidden];t.setVisibility=(0,a.createAsyncThunk)("setVisibility",((e,{getState:t,extra:{api:n,eventBus:r}})=>{const o=t(),i=h.selectVisibility(o),s=(0,c.selectUserHasResponded)(o),a=n.hasConversation(),u=l.selectConfig(o),{visibilityCallback:m=p.calculateVisibility,layoutMode:b}=u,{unreadEvents:v}=(0,d.selectState)(o),g=m({hasResponded:s,previousVisibility:i,requestedVisibility:e,config:u});if(y.includes(g)){if(i!==g)return n.store.set(f.StoreKey,Object.assign(Object.assign({},n.store.get(f.StoreKey)||{}),{[b]:e})),e&&r.emit("ui.visible",e,{visibility:e,hasConversation:a,hasResponded:s,unreadMessageCount:v}),g}else console.error('The visibilityCallback function should return "open", "minimized" or "hidden".')})),t.initializeVisibility=(0,a.createAsyncThunk)("initialize",((e,{dispatch:n,getState:r,extra:{api:o}})=>s(void 0,void 0,void 0,(function*(){var e;const{layoutMode:i}=l.selectConfig(r()),s=null===(e=o.store.get(f.StoreKey))||void 0===e?void 0:e[i];return s&&n((0,u.setFromStorage)(s)),n((0,t.setVisibility)(s)),s}))))},3742:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useShowInlineView=t.useVisibility=void 0;const s=n(6065),a=n(2752),c=n(5234),l=n(579),u=n(9207),p=n(6113),d=n(2629),f=i(n(3489));t.useVisibility=()=>{const e=(0,a.useAppDispatch)(),t=(0,p.useSelector)(f.selectVisibility);return{isVisible:!!t&&t!==d.visibilityStates.hidden,isOpen:t===d.visibilityStates.open,isMinimized:t===d.visibilityStates.minimized,visible:t,setVisibility:(0,u.useCallback)((t=>e((0,c.setVisibility)(t))),[e])}},t.useShowInlineView=()=>{const e=(0,p.useDispatch)(),{connectWhenInView:t}=(0,s.useConfig)(),n=(0,p.useSelector)(f.selectShowInlineView),{containerRef:r,isVisible:o}=(({freezeOnceVisible:e=!1,enabled:t=!0})=>{const[n,r]=(0,u.useState)(null),o=(0,u.useRef)(null),i=!!(null==n?void 0:n.isIntersecting)||!t,s=i&&e,a=([e])=>r(e);return(0,u.useEffect)((()=>{const e=null==o?void 0:o.current;if(!window.IntersectionObserver||s||!e||!t)return()=>{};const n=new IntersectionObserver(a,{threshold:0,root:null,rootMargin:"0%"});return n.observe(e),()=>n.disconnect()}),[t,s]),{isVisible:i,containerRef:o}})({enabled:t,freezeOnceVisible:!0});return(0,u.useEffect)((()=>{o&&e((0,l.setShowInlineView)())}),[e,o]),{containerRef:r,showInlineView:n}}},3489:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectShowInlineView=t.selectVisibility=void 0;const r=n(575);t.selectVisibility=(0,r.createSelector)((({visibility:e})=>e),(e=>e.visibility)),t.selectShowInlineView=(0,r.createSelector)((({visibility:e})=>e),(e=>e.showInlineView))},579:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setShowInlineView=t.setFromStorage=t.visibilitySlice=void 0;const r=n(575),o=n(915),i=n(5234),s={visibility:n(2629).visibilityStates.initialize,showInlineView:!1};t.visibilitySlice=(0,r.createSlice)({name:"visibility",initialState:s,reducers:{setFromStorage:(e,t)=>{e.visibility=t.payload},setShowInlineView:e=>{e.showInlineView=!0}},extraReducers:e=>{e.addCase(i.setVisibility.fulfilled,((e,{payload:t})=>{t&&(e.visibility=t)})).addCase(o.initializeConfig.fulfilled,((e,{payload:t})=>{t.connectWhenInView||(e.showInlineView=!t.connectWhenInView)}))}}),t.setFromStorage=t.visibilitySlice.actions.setFromStorage,t.setShowInlineView=t.visibilitySlice.actions.setShowInlineView,t.default=t.visibilitySlice.reducer},5647:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useSeamlyActions=t.eventTypes=t.getUrlSearchString=t.getUrlParams=t.useSeamlyOptions=t.useSeamlyMessageContainerClassNames=t.useSeamlyIdleDetachCountdown=t.useSeamlyEventStream=t.useSeamlyCommands=t.useSeamlyChat=t.useGeneratedId=t.useEvents=t.DeprecatedView=t.View=t.Interrupt=t.Icon=t.Header=t.ChatFrame=t.Chat=t.AgentInfo=t.EntryContainer=t.DeprecatedToggleButton=t.SeamlyLiveRegionContext=t.SeamlyEventBusContext=t.SeamlyApiContext=t.MessageContainer=t.Text=t.EventParticipant=t.useChoicePrompt=t.Conversation=t.ComponentFilter=t.randomId=t.ExternalApi=t.Engine=t.className=t.calculateVisibility=t.visibilityStates=t.useSeamlyVisibility=t.useTranslationsContainer=t.useTranslations=t.useTranslatedEventData=t.useI18n=t.useSeamlyConfig=t.SeamlyOfflineError=t.SeamlyGeneralError=t.SeamlyStoreProvider=t.API=void 0;const o=r(n(3022));t.default=o.default;var i=n(6666);Object.defineProperty(t,"API",{enumerable:!0,get:function(){return i.API}});var s=n(6113);Object.defineProperty(t,"SeamlyStoreProvider",{enumerable:!0,get:function(){return s.Provider}});var a=n(662);Object.defineProperty(t,"SeamlyGeneralError",{enumerable:!0,get:function(){return r(a).default}});var c=n(7865);Object.defineProperty(t,"SeamlyOfflineError",{enumerable:!0,get:function(){return r(c).default}});var l=n(6065);Object.defineProperty(t,"useSeamlyConfig",{enumerable:!0,get:function(){return l.useConfig}});var u=n(546);Object.defineProperty(t,"useI18n",{enumerable:!0,get:function(){return u.useI18n}});var p=n(2108);Object.defineProperty(t,"useTranslatedEventData",{enumerable:!0,get:function(){return p.useTranslatedEventData}}),Object.defineProperty(t,"useTranslations",{enumerable:!0,get:function(){return p.useTranslations}}),Object.defineProperty(t,"useTranslationsContainer",{enumerable:!0,get:function(){return p.useTranslationsContainer}});var d=n(3742);Object.defineProperty(t,"useSeamlyVisibility",{enumerable:!0,get:function(){return d.useVisibility}});var f=n(2629);Object.defineProperty(t,"visibilityStates",{enumerable:!0,get:function(){return f.visibilityStates}});var h=n(2421);Object.defineProperty(t,"calculateVisibility",{enumerable:!0,get:function(){return h.calculateVisibility}});var y=n(5567);Object.defineProperty(t,"className",{enumerable:!0,get:function(){return y.className}});var m=n(9409);Object.defineProperty(t,"Engine",{enumerable:!0,get:function(){return r(m).default}});var b=n(7053);Object.defineProperty(t,"ExternalApi",{enumerable:!0,get:function(){return r(b).default}});var v=n(9643);Object.defineProperty(t,"randomId",{enumerable:!0,get:function(){return v.randomId}});var g=n(4921);Object.defineProperty(t,"ComponentFilter",{enumerable:!0,get:function(){return r(g).default}});var O=n(2212);Object.defineProperty(t,"Conversation",{enumerable:!0,get:function(){return r(O).default}});var w=n(9661);Object.defineProperty(t,"useChoicePrompt",{enumerable:!0,get:function(){return w.useChoicePrompt}});var j=n(7409);Object.defineProperty(t,"EventParticipant",{enumerable:!0,get:function(){return r(j).default}});var S=n(6425);Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return r(S).default}});var _=n(1989);Object.defineProperty(t,"MessageContainer",{enumerable:!0,get:function(){return r(_).default}});var x=n(2331);Object.defineProperty(t,"SeamlyApiContext",{enumerable:!0,get:function(){return x.SeamlyApiContext}}),Object.defineProperty(t,"SeamlyEventBusContext",{enumerable:!0,get:function(){return x.SeamlyEventBusContext}});var C=n(8803);Object.defineProperty(t,"SeamlyLiveRegionContext",{enumerable:!0,get:function(){return C.SeamlyLiveRegionContext}});var E=n(8219);Object.defineProperty(t,"DeprecatedToggleButton",{enumerable:!0,get:function(){return r(E).default}});var P=n(9104);Object.defineProperty(t,"EntryContainer",{enumerable:!0,get:function(){return r(P).default}});var T=n(5663);Object.defineProperty(t,"AgentInfo",{enumerable:!0,get:function(){return r(T).default}});var N=n(1474);Object.defineProperty(t,"Chat",{enumerable:!0,get:function(){return r(N).default}});var I=n(142);Object.defineProperty(t,"ChatFrame",{enumerable:!0,get:function(){return r(I).default}});var k=n(2494);Object.defineProperty(t,"Header",{enumerable:!0,get:function(){return r(k).default}});var A=n(7209);Object.defineProperty(t,"Icon",{enumerable:!0,get:function(){return r(A).default}});var D=n(9965);Object.defineProperty(t,"Interrupt",{enumerable:!0,get:function(){return r(D).default}});var R=n(9180);Object.defineProperty(t,"View",{enumerable:!0,get:function(){return r(R).default}});var M=n(2718);Object.defineProperty(t,"DeprecatedView",{enumerable:!0,get:function(){return r(M).default}});var L=n(2849);Object.defineProperty(t,"useEvents",{enumerable:!0,get:function(){return L.useEvents}}),Object.defineProperty(t,"useGeneratedId",{enumerable:!0,get:function(){return L.useGeneratedId}}),Object.defineProperty(t,"useSeamlyChat",{enumerable:!0,get:function(){return L.useSeamlyChat}}),Object.defineProperty(t,"useSeamlyCommands",{enumerable:!0,get:function(){return L.useSeamlyCommands}}),Object.defineProperty(t,"useSeamlyEventStream",{enumerable:!0,get:function(){return L.useSeamlyEventStream}}),Object.defineProperty(t,"useSeamlyIdleDetachCountdown",{enumerable:!0,get:function(){return L.useSeamlyIdleDetachCountdown}}),Object.defineProperty(t,"useSeamlyMessageContainerClassNames",{enumerable:!0,get:function(){return L.useSeamlyMessageContainerClassNames}}),Object.defineProperty(t,"useSeamlyOptions",{enumerable:!0,get:function(){return L.useSeamlyOptions}});var U=n(4959);Object.defineProperty(t,"getUrlParams",{enumerable:!0,get:function(){return U.getUrlParams}}),Object.defineProperty(t,"getUrlSearchString",{enumerable:!0,get:function(){return U.getUrlSearchString}});var F=n(5740);Object.defineProperty(t,"eventTypes",{enumerable:!0,get:function(){return F.eventTypes}});var B=n(6870);Object.defineProperty(t,"useSeamlyActions",{enumerable:!0,get:function(){return B.useSeamlyActions}})},6870:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useSeamlyActions=void 0;const r=n(1153),o=n(6113);t.useSeamlyActions=()=>{const e=(0,o.useDispatch)();return{addEvent:t=>e((0,r.addEvent)(t)),clearEvents:()=>e((0,r.clearEvents)()),setHistory:t=>e((0,r.setHistory)(t)),setEventsRead:t=>e((0,r.setEventsRead)(t)),setLoadedImageEventIds:t=>e((0,r.setLoadedImageEventIds)(t)),ackEvent:t=>e((0,r.ackEvent)(t)),setIsLoading:t=>e((0,r.setIsLoading)(t)),setParticipant:t=>e((0,r.setParticipant)(t)),setHeaderTitle:t=>e((0,r.setHeaderTitle)(t)),setHeaderSubTitle:t=>e((0,r.setHeaderSubTitle)(t)),resetHistoryLoadedFlag:()=>e((0,r.resetHistoryLoadedFlag)()),setActiveService:()=>e((0,r.setActiveService)()),initIdleDetachCountdown:t=>e((0,r.initIdleDetachCountdown)(t)),decrementIdleDetachCountdownCounter:()=>e((0,r.decrementIdleDetachCountdownCounter)()),stopIdleDetachCountdownCounter:()=>e((0,r.stopIdleDetachCountdownCounter)()),clearIdleDetachCountdown:()=>e((0,r.clearIdleDetachCountdown)()),initResumeConversationPrompt:()=>e((0,r.initResumeConversationPrompt)()),clearResumeConversationPrompt:()=>e((0,r.clearResumeConversationPrompt)()),setServiceDataItem:t=>e((0,r.setServiceDataItem)(t)),setFeatures:t=>e((0,r.setFeatures)(t)),setFeatureEnabledState:t=>e((0,r.setFeatureEnabledState)(t)),clearFeatures:()=>e((0,r.clearFeatures)()),setInitialState:t=>e((0,r.setInitialState)(t)),setUserSelectedOptions:t=>e((0,r.setUserSelectedOptions)(t)),setUserSelectedOption:t=>e((0,r.setUserSelectedOption)(t)),showOption:t=>e((0,r.showOption)(t)),hideOption:()=>e((0,r.hideOption)()),setServiceEntryMetadata:t=>e((0,r.setServiceEntryMetadata)(t)),setBlockAutoEntrySwitch:t=>e((0,r.setBlockAutoEntrySwitch)(t)),setActiveEntryType:t=>e((0,r.setActiveEntryType)(t)),setUserEntryType:t=>e((0,r.setUserEntryType)(t)),registerUpload:t=>e((0,r.registerUpload)(t)),setUploadProgress:t=>e((0,r.setUploadProgress)(t)),setUploadComplete:t=>e((0,r.setUploadComplete)(t)),setUploadError:t=>e((0,r.setUploadError)(t)),clearAllUploads:()=>e((0,r.clearAllUploads)()),setSeamlyContainerElement:t=>e((0,r.setSeamlyContainerElement)(t))}}},5740:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cardTypes=t.featureKeys=t.dividerKeys=t.ariaLiveLevels=t.dismissTypes=t.actionTypes=t.readStates=t.entryTypes=t.payloadTypes=t.eventTypes=void 0,t.eventTypes={info:"info",message:"message",participant:"participant",system:"system"},t.payloadTypes={choicePrompt:"choice_prompt",text:"text",image:"image",video:"video",participant:"participant",divider:"divider",translation:"translation",message:"message",countdown:"countdown",upload:"upload",cta:"cta",splash:"splash"},t.entryTypes={text:"text",upload:"upload"},t.readStates={received:"received",read:"read"},t.actionTypes={pickChoice:"pick_choice",navigate:"navigate",custom:"custom",typing:"typing",read:"read",detachService:"detach_service",interactivityUpdate:"interactivity_update",dismiss:"dismiss",sendTranscript:"send_transcript",setTopic:"set_topic",setTranslation:"set_translation",clickCta:"click_cta",clickCard:"click_card"},t.dismissTypes={resumeConversationPrompt:"resume_conversation_prompt"},t.ariaLiveLevels={assertive:"assertive",polite:"polite"},t.dividerKeys={new_topic:"newTopic",new_translation:"newTranslation"},t.featureKeys={sendTranscript:"sendTranscript",typingPeekahead:"typingPeekahead",uploads:"uploads"},t.cardTypes={ask:"ask",navigate:"navigate",topic:"topic"}},3293:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});class r extends Error{constructor(e,...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,Object.getPrototypeOf(this)),this.originalError=e,e?.payload&&(this.originalEvent=e,this.originalError=e.payload.error,this.message=`Event of type ${e.payload.type} encountered`),e?.error&&(this.originalError=e.error)}}},3317:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(3293);class o extends r.Z{constructor(e,...t){super(e,...t),this.name="SeamlyConfigurationError",this.langKey="errors.configError"}}},662:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(3293);class o extends r.Z{constructor(e,...t){super(e,...t),this.name="SeamlyGeneralError",this.langKey="errors.general",this.action="reset"}}},7865:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(3293);class o extends r.Z{constructor(e,...t){super(e,...t),this.name="SeamlyOfflineError",this.langKey="errors.seamlyOffline"}}},3872:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(3293);class o extends r.Z{constructor(e,...t){super(e,...t),this.name="SeamlySessionExpiredError",this.action="reset"}}},9638:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(3293);class o extends r.Z{constructor(e,...t){super(e,...t),this.name="SeamlyUnauthorizedError",this.langKey="errors.general",this.action="reset"}}},9060:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});class r extends Error{constructor(e){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,r),this.name="SeamlyUnavailableError",this.langKey="errors.seamlyUnavailable"}}},6666:(e,t,n)=>{"use strict";n.r(t),n.d(t,{API:()=>K});var r=n(3813),o=n.n(r),i=n(1766),s=n.n(i),a=n(2112),c=n(9643);function l(e){const t=`cvco.${e}`;return{get(){const e=[t,t.split(".").slice(0,-1).join(".")];let n;do{n=sessionStorage.getItem(e[0])}while(e.shift()&&!n);return JSON.parse(n)},set(e){e&&sessionStorage.setItem(t,JSON.stringify(e))}}}var u=n(1905),p=n.n(u),d=n(4959),f=e=>"function"==typeof e?e:function(){return e},h="undefined"!=typeof self?self:null,y="undefined"!=typeof window?window:null,m=h||y||m,b="closed",v="errored",g="joined",O="joining",w="leaving",j="phx_close",S="phx_error",_="phx_reply",x="phx_leave",C=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(e){this.timeout=e,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(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter((t=>t.status===e)).forEach((e=>e.callback(t)))}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,(e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)})),this.timeoutTimer=setTimeout((()=>{this.trigger("timeout",{})}),this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},E=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout((()=>{this.tries=this.tries+1,this.callback()}),this.timerCalc(this.tries+1))}},P=class{static request(e,t,n,r,o,i,s){if(m.XDomainRequest){let n=new m.XDomainRequest;return this.xdomainRequest(n,e,t,r,o,i,s)}{let a=new m.XMLHttpRequest;return this.xhrRequest(a,e,t,n,r,o,i,s)}}static xdomainRequest(e,t,n,r,o,i,s){return e.timeout=o,e.open(t,n),e.onload=()=>{let t=this.parseJSON(e.responseText);s&&s(t)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,o,i,s,a){return e.open(t,n,!0),e.timeout=i,e.setRequestHeader("Content-Type",r),e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(4===e.readyState&&a){let t=this.parseJSON(e.responseText);a(t)}},s&&(e.ontimeout=s),e.send(o),e}static parseJSON(e){if(!e||""===e)return null;try{return JSON.parse(e)}catch(t){return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let o=t?`${t}[${r}]`:r,i=e[r];"object"==typeof i?n.push(this.serialize(i,o)):n.push(encodeURIComponent(o)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(e,t){if(0===Object.keys(t).length)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},T=class{constructor(e){this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=0,this.poll()}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/websocket"),"$1/longpoll")}endpointURL(){return P.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=0}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return 1===this.readyState||0===this.readyState}poll(){this.ajax("GET",null,(()=>this.ontimeout()),(e=>{if(e){var{status:t,token:n,messages:r}=e;this.token=n}else t=0;switch(t){case 200:r.forEach((e=>{setTimeout((()=>this.onmessage({data:e})),0)})),this.poll();break;case 204:this.poll();break;case 410:this.readyState=1,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${t}`)}}))}send(e){this.ajax("POST",e,(()=>this.onerror("timeout")),(e=>{e&&200===e.status||(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1))}))}close(e,t,n){for(let e of this.reqs)e.abort();this.readyState=3;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});"undefined"!=typeof CloseEvent?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r){let o;o=P.request(e,this.endpointURL(),"application/json",t,this.timeout,(()=>{this.reqs.delete(o),n()}),(e=>{this.reqs.delete(o),this.isActive()&&r(e)})),this.reqs.add(o)}},N={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,o,i,s]=JSON.parse(e);return t({join_ref:n,ref:r,topic:o,event:i,payload:s})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:o,payload:i}=e,s=this.META_LENGTH+t.length+n.length+o.length+r.length,a=new ArrayBuffer(this.HEADER_LENGTH+s),c=new DataView(a),l=0;c.setUint8(l++,this.KINDS.push),c.setUint8(l++,t.length),c.setUint8(l++,n.length),c.setUint8(l++,o.length),c.setUint8(l++,r.length),Array.from(t,(e=>c.setUint8(l++,e.charCodeAt(0)))),Array.from(n,(e=>c.setUint8(l++,e.charCodeAt(0)))),Array.from(o,(e=>c.setUint8(l++,e.charCodeAt(0)))),Array.from(r,(e=>c.setUint8(l++,e.charCodeAt(0))));var u=new Uint8Array(a.byteLength+i.byteLength);return u.set(new Uint8Array(a),0),u.set(new Uint8Array(i),a.byteLength),u.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}},decodePush(e,t,n){let r=t.getUint8(1),o=t.getUint8(2),i=t.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(e.slice(s,s+r));s+=r;let c=n.decode(e.slice(s,s+o));s+=o;let l=n.decode(e.slice(s,s+i));return s+=i,{join_ref:a,ref:null,topic:c,event:l,payload:e.slice(s,e.byteLength)}},decodeReply(e,t,n){let r=t.getUint8(1),o=t.getUint8(2),i=t.getUint8(3),s=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(a,a+r));a+=r;let l=n.decode(e.slice(a,a+o));a+=o;let u=n.decode(e.slice(a,a+i));a+=i;let p=n.decode(e.slice(a,a+s));a+=s;let d=e.slice(a,e.byteLength);return{join_ref:c,ref:l,topic:u,event:_,payload:{status:p,response:d}}},decodeBroadcast(e,t,n){let r=t.getUint8(1),o=t.getUint8(2),i=this.HEADER_LENGTH+2,s=n.decode(e.slice(i,i+r));i+=r;let a=n.decode(e.slice(i,i+o));return i+=o,{join_ref:null,ref:null,topic:s,event:a,payload:e.slice(i,e.byteLength)}}};function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const L=p()("seamly");class U{constructor(e,t,n,r){this.url=e,this.accessToken=r,this.channelName=t,this.channelTopic=n,this.connect(),this.socket.onError((e=>{L("[SOCKET][ERROR]",e),this.emit({type:"error",payload:{type:"seamly_offline",error:e}})})),this.socket.onOpen((()=>{L("[SOCKET]OPEN"),this.emit({type:"socket_opened"})})),this.channel.on("system",(e=>{"attach_channel_succeeded"===e.type&&this.emit({type:"connection",connected:!0,ready:!0})})),this.socket.onClose((()=>{L("[SOCKET]CLOSE"),this.emit({type:"connection",connected:!1,ready:!1})})),this.channel.onClose((()=>{L("[CHANNEL]CLOSE"),this.emit({type:"connection",connected:!1,ready:!1})})),this.channel.onError((e=>{L("[CHANNEL][ERROR]",e),this.emit({type:"connection",connected:!1,ready:!1})})),this.listenTo("ack"),this.listenTo("ui"),this.listenTo("error"),this.listenTo("participant",((e,t)=>R(R({},t),{},{type:e}))),this.listenTo("message"),this.listenTo("service_data"),this.listenTo("system"),this.listenTo("info"),this.listenTo("sync")}start(e){this.listener=e,this.channel.join().receive("ok",(()=>{L("[CHANNEL][JOIN] OK"),this.emit({type:"connection",connected:!0,ready:!1})})).receive("error",(e=>{L("[CHANNEL][JOIN] ERROR",e),this.emit({type:"error",payload:{type:"join_channel_erred",error:e}}),this.emit({type:"connection",connected:!1,ready:!1}),this.channel.socket.disconnect()})).receive("timeout",(()=>{L("[CHANEL][JOIN] Networking issue. Still waiting...")}))}stop(){this.listener=null}connect(){const{url:e,params:t}=(e=>{const t=e.indexOf("?");return t<0?{url:e,params:{}}:{url:e.slice(0,t),params:e.slice(t+1).split("&").reduce((function(e,t){const[n,r]=t.split("=");return k(k({},e),{},{[n]:decodeURIComponent(r)})}),{})}})(this.url);this.socket=new class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=t.timeout||1e4,this.transport=t.transport||m.WebSocket||T,this.establishedConnections=0,this.defaultEncoder=N.encode.bind(N),this.defaultDecoder=N.decode.bind(N),this.closeWasClean=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.transport!==T?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;y&&y.addEventListener&&(y.addEventListener("pagehide",(e=>{this.conn&&(this.disconnect(),n=this.connectClock)})),y.addEventListener("pageshow",(e=>{n===this.connectClock&&(n=null,this.connect())}))),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.rejoinAfterMs=e=>t.rejoinAfterMs?t.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4,this.reconnectAfterMs=e=>t.reconnectAfterMs?t.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3,this.logger=t.logger||null,this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=f(t.params||{}),this.endPoint=`${e}/websocket`,this.vsn=t.vsn||"2.0.0",this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new E((()=>{this.teardown((()=>this.connect()))}),this.reconnectAfterMs)}getLongPollTransport(){return T}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.sendBuffer=[],this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=P.appendParams(P.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(e,t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=f(e)),this.conn||(this.connectClock++,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=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e))}log(e,t,n){this.logger(e,t,n)}hasLogger(){return null!==this.logger}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage((o=>{o.ref===t&&(this.off([r]),e(Date.now()-n))}));return!0}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach((([,e])=>e()))}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),setTimeout((()=>this.sendHeartbeat()),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();this.waitForBufferDone((()=>{this.conn&&(t?this.conn.close(t,n||""):this.conn.close()),this.waitForSocketClosed((()=>{this.conn&&(this.conn.onclose=function(){},this.conn=null),e&&e()}))}))}waitForBufferDone(e,t=1){5!==t&&this.conn&&this.conn.bufferedAmount?setTimeout((()=>{this.waitForBufferDone(e,t+1)}),150*t):e()}waitForSocketClosed(e,t=1){5!==t&&this.conn&&3!==this.conn.readyState?setTimeout((()=>{this.waitForSocketClosed(e,t+1)}),150*t):e()}onConnClose(e){let t=e&&e.code;this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),clearTimeout(this.heartbeatTimer),this.closeWasClean||1e3===t||this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((([,t])=>t(e)))}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,n=this.establishedConnections;this.stateChangeCallbacks.error.forEach((([,r])=>{r(e,t,n)})),(t===this.transport||n>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach((e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(S)}))}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(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter((t=>t.joinRef()!==e.joinRef()))}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter((([t])=>-1===e.indexOf(t)))}channel(e,t={}){let n=new class{constructor(e,t,n){this.state=b,this.topic=e,this.params=f(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new C(this,"phx_join",this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new E((()=>{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",(()=>{this.state=g,this.rejoinTimer.reset(),this.pushBuffer.forEach((e=>e.send())),this.pushBuffer=[]})),this.joinPush.receive("error",(()=>{this.state=v,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=b,this.socket.remove(this)})),this.onError((e=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,e),this.isJoining()&&this.joinPush.reset(),this.state=v,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 C(this,x,f({}),this.timeout).send(),this.state=v,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()})),this.on(_,((e,t)=>{this.trigger(this.replyEventName(t),e)}))}join(e=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=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(e){this.on(j,e)}onError(e){return this.on(S,(t=>e(t)))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter((n=>!(n.event===e&&(void 0===t||t===n.ref))))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new C(this,e,(function(){return t}),n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=w;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(j,"leave")},n=new C(this,x,f({}),e);return n.receive("ok",(()=>t())).receive("timeout",(()=>t())),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}isMember(e,t,n,r){return!(this.topic!==e||r&&r!==this.joinRef()&&(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),1))}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=O,this.joinPush.resend(e))}trigger(e,t,n,r){let o=this.onMessage(e,t,n,r);if(t&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter((t=>t.event===e));for(let e=0;e<i.length;e++)i[e].callback(o,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===b}isErrored(){return this.state===v}isJoined(){return this.state===g}isJoining(){return this.state===O}isLeaving(){return this.state===w}}(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:o,join_ref:i}=e;this.log("push",`${t} ${n} (${i}, ${o})`,r)}this.isConnected()?this.encode(e,(e=>this.conn.send(e))):this.sendBuffer.push((()=>this.encode(e,(e=>this.conn.send(e)))))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimer=setTimeout((()=>this.heartbeatTimeout()),this.heartbeatIntervalMs))}abnormalClose(e){this.closeWasClean=!1,this.isConnected()&&this.conn.close(1e3,e)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((e=>e())),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,(e=>{let{topic:t,event:n,payload:r,ref:o,join_ref:i}=e;o&&o===this.pendingHeartbeatRef&&(clearTimeout(this.heartbeatTimer),this.pendingHeartbeatRef=null,setTimeout((()=>this.sendHeartbeat()),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${r.status||""} ${t} ${n} ${o&&"("+o+")"||""}`,r);for(let e=0;e<this.channels.length;e++){const s=this.channels[e];s.isMember(t,n,r,i)&&s.trigger(n,r,o,i)}for(let t=0;t<this.stateChangeCallbacks.message.length;t++){let[,n]=this.stateChangeCallbacks.message[t];n(e)}}))}leaveOpenTopic(e){let t=this.channels.find((t=>t.topic===e&&(t.isJoined()||t.isJoining())));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}}(e,{params:R(R({},t),{},{v:a.apiVersion})}),this.socket.connect(),this.channel=this.socket.channel(this.channelTopic,{authorization:`Bearer ${this.accessToken}`,channelName:this.channelName})}disconnect(){return new Promise((e=>{this.socket.disconnect(e)}))}listenTo(e,t=null){this.channel.on(e,(n=>{L("[RECEIVE]",e,n),this.emit({type:e,payload:t?t(e,n):n})}))}emit(e){this.listener&&this.listener.next(e)}push(e,t,n){this.channel.push(e,t,n)}}class F{constructor(e){this.name=e}emit(e){this.listener&&this.listener.next(e)}start(e){this.listener=e}stop(){this.listener=null}}var B=n(3872),H=n(3317),$=n(662),V=n(9638);function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){W(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const G=p()("seamly");function Z(){if(!Intl||"undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;const e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;const t=e.resolvedOptions().timeZone;return t&&(t.indexOf("/")>-1||"UTC"===t)?t:null}class K{constructor({layoutMode:e,namespace:t,config:n={},context:r={}}){this.store=function(e,t){const n=t(e),r=n.get()||{};return{get:e=>void 0===e?r:r[e],set:(e,t)=>(r[e]=t,n.set(r),t),delete(e){const t=this.get(e);return delete r[e],n.set(r),t}}}(`${t}.connection${r.locale?`.${r.locale}`:""}`,n.storageProvider||l),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:q(q({},r),{},{channelName:r.channelName||"web"})},this.connected=!1,this.configReady=!1,this.externalId=n.externalId,this.layoutMode=e,this.userResponded=!1,this.internalProducer=new F("API"),this.internal$=o().create(this.internalProducer).flatten(),this.connection$=this.internal$.filter((e=>"connection"===e.type)),this.connection$.subscribe({next:({connected:e,ready:t})=>{this.connected=e,this.ready=t}}),this.URLS={},window.addEventListener("pageshow",(e=>{e.persisted&&this.connected&&this.connect()}))}getAccessToken(){return this.store.get("accessToken")}setAccessToken(e){this.store.set("accessToken",e)}getConversationUrl(){return this.store.get("conversationUrl")}setConversationUrl(e){this.store.set("conversationUrl",e)}hasConversation(){return!!this.getConversationUrl()}getChannelTopic(){return this.store.get("channelTopic")||this.store.get("channelName")}setChannelTopic(e){this.store.set("channelTopic",e)}getLocale=e=>e||this.locale;clearStore(){this.store.delete("accessToken"),this.store.delete("conversationUrl"),this.store.delete("channelName"),this.store.delete("channelTopic")}getUrlPrefix(e){return`${this.connectionInfo.secure?`${e}s`:e}://${this.connectionInfo.domain}`}updateUrls({_links:e}){this.URLS=Object.entries(e).filter((([e])=>"self"!==e)).reduce(((e,[t,{href:n}])=>q(q({},e),{},{[t]: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 e=s().post(`${this.getUrlPrefix("http")}${this.URLS.conversations}`).set("Content-Type","application/json").query({v:a.apiVersion}).withCredentials().send({externalId:this.externalId||void 0}),{body:t}=await e,{conversation:n}=t,r=q({},n);return delete r.accessToken,delete r.channelTopic,this.setAccessToken(n.accessToken),this.setChannelTopic(n.channelTopic),this.updateUrls(t),this.setConversationUrl(this.URLS.conversation),this.locale=n.translation?.locale,this.userResponded=n.userResponded,r}catch(e){if(e.status>=500)throw new $.default(e);throw e}}getConfig(){return s().post(`${this.getUrlPrefix("http")}/client/${this.connectionInfo.apiKey}/configs`).set("Content-Type","application/json").query({v:a.apiVersion}).send({context:q(q({},this.config.context),{},{environment:!0===this.config.sendEnvironment?this.getEnvironment():this.config.sendEnvironment})}).then((({body:e})=>(this.updateUrls(e),this.configReady=!0,e.config))).catch((e=>{if(404===e.status)throw new H.default;if(e.status>=500)throw new $.default(e);throw e}))}async getConversation(){if(!this.hasConversation())return null;try{const{body:e}=await s().get(`${this.getUrlPrefix("http")}${this.URLS.history}`).set("Authorization",`Bearer ${this.getAccessToken()}`).query({v:a.apiVersion});this.updateUrls(e);const{messages:t,participants:n,activeServiceSessionId:r,activeServiceSettings:o,serviceData:i,ui:c,translation:l}=e.history;return{events:t.map((([e,t])=>({type:e,payload:q(q({},t),{},{type:"participant"===e?e:t.type})}))),participants:n,activeServiceSessionId:r,activeServiceSettings:o,serviceData:i,resumeConversationPrompt:!!c&&Boolean(c.resumeConversationPrompt),translation:l}}catch(e){if(401===e.status)throw new V.default(e);if(404===e.status)throw new B.default(e);if(e.status>=500)throw new $.default(e);throw e}}async connect(){this.connected=!1;let e=null;return this.hasConversation()||(e=await this.createConversation()),this.conversationProducer=new U(`${this.getUrlPrefix("ws")}${this.URLS.socket}`,this.config.context.channelName,this.getChannelTopic(),this.getAccessToken()),this.internalProducer.emit(o().create(this.conversationProducer)),this.config.sendEnvironment&&this.send("context",{environment:!0===this.config.sendEnvironment?this.getEnvironment():this.config.sendEnvironment},!1),e}uploadFile(e,t,n,r){const o=new FormData;o.append("upload",e);const i=s().post(`${this.getUrlPrefix("http")}${this.URLS.uploads}`).set("Authorization",`Bearer ${this.getAccessToken()}`).send(o);return i.on("progress",(function(e){const{direction:n,percent:r}=e;"upload"===n&&"function"==typeof t&&t(r)})),i.then((e=>{n&&n(e)})).catch((e=>{if(!r)throw e;r(e.response)})),i}getConversationIntitialState(){return s().get(`${this.getUrlPrefix("http")}${this.getConversationUrl()}`).set("Authorization",`Bearer ${this.getAccessToken()}`).query({v:a.apiVersion}).then((({body:e})=>(this.updateUrls(e),this.userResponded=e.conversation.userResponded,(0,d.omit)(e.conversation,["accessToken","channelTopic"])))).catch((e=>{if(401===e.status)throw new V.default(e);if(404===e.status)throw new B.default(e);if(e.status>=500)throw new $.default(e);throw e}))}async getTranslations(e){try{const t=`${this.getUrlPrefix("http")}${this.URLS.translations}`.replace("{version}",String(1)).replace("{locale}",this.getLocale(e)),n=s().get(t),{body:r}=await n;return r.translations}catch(e){if(e.status>=500)throw new $.default(e);throw e}}send(e,t,n=!0){!this.connected||n&&!this.ready?this.connection$.filter((e=>n?e.connected&&e.ready:e.connected)).take(1).subscribe({next:()=>this.send(e,t,n)}):(G("[SEND]",e,t),this.conversationProducer.push(e,function(e,t){if("message"!==e)return t;const{type:n,body:r}=t;let{transactionId:o}=t;return o||(o=(0,c.randomId)()),{type:n,body:r,transactionId:o}}(e,t),1e4))}sendContext(e={}){const{locale:t,variables:n}=e,r={};if(t){if("string"!=typeof t)throw new Error("Locale must be a string");r.locale=t}if(n){if("object"!=typeof n)throw new Error("Variables must be an object");r.variables=n}0===Object.keys(r).length&&r.constructor===Object||this.send("context",r,!1)}stream(){return this.internal$.filter((e=>"connection"!==e.type))}getEnvironment(){return{clientName:"@seamly/web-ui",clientVariant:this.layoutMode,clientVersion:"20.7.0",currentUrl:window.location.toString(),screenResolution:`${window.screen.width}x${window.screen.height}`,timezone:Z(),userAgent:navigator.userAgent}}}},9279:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});var r=n(5865),o=n(6113);const i=()=>(0,o.useSelector)(r.selectUserHasResponded)},2285:(e,t,n)=>{"use strict";n.r(t),n.d(t,{catchError:()=>i,createErrorsMiddleware:()=>s});var r=n(575),o=n(4788);const i=(0,r.createAction)("catch-error",(e=>({error:e})));function s({api:e}){return({getState:t})=>{const n=n=>{const{errorCallback:r,namespace:i,api:s,layoutMode:a}=(0,o.selectConfig)(t());r?.(n.error,{namespace:i,api:s,layoutMode:a,conversationUrl:e.getConversationUrl(),action:n.type?n:void 0})};return e=>t=>{try{return t.payload?.originalEvent?.payload&&n({error:t.payload,type:t.payload?.originalEvent?.payload?.type}),e(t)}catch(e){throw n({error:e}),e}}}}},2190:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(1153);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a({api:e}){return()=>t=>n=>{const o=t(n);switch(n.type){case r.setUserSelectedOptions.toString():e.store.set("options",n.payload);break;case r.setUserSelectedOption.toString():e.store.set("options",i(i({},e.store.get("options")||{}),{},{[n.payload.option]:n.payload.value}))}return o}}},3128:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(915),o=n(59),i=n(7658),s=n(1153),a=n(841);function c({dispatch:e,getState:t}){return n=>c=>{const l=n(c),{payload:u}=c;switch(c.type){case s.setHistory.type:u?.translation?.enabled&&(e((0,a.enableTranslation)(u.translation.locale)),e((0,o.setLocale)(u.translation.locale)));break;case r.initializeConfig.fulfilled.type:u.locale&&e((0,o.setLocale)(u.locale));break;case s.setInitialState.type:u?.translation?.enabled&&(e((0,a.enableTranslation)(u.translation.locale)),e((0,o.setLocale)(u.locale)));break;case s.addEvent.type:"info"===u.type&&"new_translation"===u?.payload?.body?.subtype&&u.payload.body.translationEnabled&&e((0,o.setLocale)(u.payload.body.translationLocale));break;case a.disableTranslation.type:const n=(0,i.selectInitialLocale)(t());e((0,o.setLocale)(n))}return l}}},2629:(e,t,n)=>{"use strict";n.r(t),n.d(t,{StoreKey:()=>r,visibilityStates:()=>o});const r="visibility",o={hidden:"hidden",minimized:"minimized",open:"open",initialize:null}},2421:(e,t,n)=>{"use strict";n.r(t),n.d(t,{calculateVisibility:()=>o});var r=n(2629);const o=({hasResponded:e,previousVisibility:t,requestedVisibility:n,config:o})=>{const{defaults:i,layoutMode:s,hideOnNoUserResponse:a}=o,{visible:c}=i||{};if("app"===s&&!t)return r.visibilityStates.open;if("window"===s&&a&&n!==r.visibilityStates.open)return e?n||t||r.visibilityStates.open:r.visibilityStates.hidden;if("inline"===s&&e&&!n)return t||r.visibilityStates.open;const l=r.visibilityStates.minimized;return n||t||c||l}},5567:(e,t,n)=>{"use strict";n.r(t),n.d(t,{className:()=>o});var r=n(2112);const o=(...e)=>e.flat().map((e=>"object"==typeof e?Object.entries(e).map((([e,t])=>t?e:"")).join(" "):e)).filter((e=>"string"==typeof e)).map((e=>e.split(" "))).flat().filter((e=>e.length)).map((e=>e.indexOf(r.CSS_NAME)>-1?e:[r.CSS_NAME,e].join("-"))).join(" ")},1905:e=>{e.exports=()=>()=>null},9409:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>pe});var r=n(6666),o=n(4134),i=n(915),s=n(3394),a=n(59),c=n(2752),l=n(5234),u=n(679),p=n.n(u),d=n(7210),f=n(9180),h=n(2285),y=n(9207),m=n(6113),b=n(4921),v=n(2849),g=n(2112),O=n(5567),w=n(6460),j=n(7844);const S=({children:e})=>{const t=(0,y.useRef)(0),{sendAction:n}=(0,v.useSeamlyCommands)(),{hasCountdown:r,isActive:o,stopCountdown:i}=(0,v.useSeamlyIdleDetachCountdown)(),s=(0,y.useCallback)((()=>{const e=(new Date).getTime(),s=()=>{n({type:"interactivity_update"}),t.current=e};r&&o&&(s(),i()),e-t.current>g.activitySendDelay&&s()}),[n,r,o,i]);return(0,j.jsx)("div",{className:(0,O.className)("activity-monitor"),tabIndex:"-1",onMouseDown:s,onKeyUp:s,onTouchStart:s,onMouseMove:s,onWheel:s,onPointerDown:s,onPointerMove:s,children:(0,j.jsx)(w.Z.Provider,{value:s,children:e})})};var _=n(2331),x=n(662),C=n(7865),E=n(3872),P=n(5150),T=n(5560),N=n(1153),I=n(5740);const k=["serviceSettings"];const A=["text","choice_prompt","image","video"],D=({eventBus:e})=>{const t=(0,v.useSeamlyApiContext)(),n=(0,m.useDispatch)(),r=(0,v.useEvents)(),o=(0,y.useRef)(null),{initCountdown:i,endCountdown:s}=(0,v.useSeamlyIdleDetachCountdown)(),{emitEvent:a}=(0,v.useSeamlyCommands)();return(0,y.useEffect)((()=>{if(t.connectionInfo){const r=e=>{const{payload:t}=e;if(!t||!t.participant)return;const{fromClient:r,participant:o}=t;!r&&o.name&&n((0,N.setHeaderSubTitle)(o.name)),n((0,N.setParticipant)({participant:o,fromClient:r})),o.introduction&&n((0,N.addEvent)(e))},c=t.stream().subscribe({next:t=>{const{type:o,payload:c}=t;switch(o){case"ui":switch(c.state&&c.state.hasOwnProperty("loading")&&n((0,N.setIsLoading)(c.state.loading)),c.type){case"idle_detach_countdown":i(c.body.duration);break;case"idle_detach_countdown_elapsed":s(void 0,!0);break;case"resume_conversation_prompt":n((0,N.initResumeConversationPrompt)());break;case"user_first_response":n((0,P.setHasResponded)(!0)),e.emit("system.userFirstResponse",c.body)}break;case"message":switch(r(c),c.type){case"text":case"choice_prompt":case"splash":case"image":case"upload":case"video":case"cta":case"custom":case"carousel":case"card":c.service&&c.service.serviceSessionId&&n((0,N.setActiveService)(c.service.serviceSessionId)),n((0,N.addEvent)(t))}break;case"participant":r(t);break;case"service_data":c.persist&&n((0,N.setServiceDataItem)(c));break;case"ack":n((0,N.ackEvent)(t.payload));break;case"system":if("service_changed"===c.type){const{serviceSettings:e}=c,t=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(c,k),{entry:r}=e,{upload:o}=r.options;n((0,N.setFeatureEnabledState)({key:I.featureKeys.uploads,enabled:!(!o||!o.enabled)})),n((0,N.setServiceEntryMetadata)(r)),n((0,N.setActiveService)(c.serviceSessionId)),a("system.serviceChanged",t)}break;case"info":"divider"!==c.type&&"text"!==c.type&&"translation"!==c.type||n((0,N.addEvent)(t));break;case"error":switch(c.type){case"find_conversation_erred":const e=new E.default(t);n((0,T.setInterrupt)({name:e.name,action:e.action,message:e.message,originalEvent:e.originalEvent,originalError:e.originalError}));break;case"seamly_offline":const r=new C.default(t);n((0,T.setInterrupt)({name:r.name,message:r.message,langKey:r.langKey,originalEvent:r.originalEvent,originalError:r.originalError})),n((0,N.clearEvents)());break;default:const o=new x.default(t);n((0,T.setInterrupt)({name:o.name,message:o.message,langKey:o.langKey,originalEvent:o.originalEvent,originalError:o.originalError,action:o.action}))}break;case"socket_opened":n((0,T.clearInterrupt)())}}});return t.stream().filter((e=>"message"===e.type&&A.includes(e.payload.type))).subscribe({next:({payload:t})=>{t.id!==o.current&&e.emit("message",t),o.current=t.id}}),()=>{c.unsubscribe()}}return()=>{}}),[n,t,e,i,s,a]),(0,y.useEffect)((()=>{if(t.stream){const e=t.stream().filter((e=>"sync"===e.type)).subscribe({next:e=>{const{payload:o}=e,i=r[r.length-1],{id:s}=o.lastEvent;i&&s===i.payload.id||t.getConversation().then((e=>{e&&n((0,N.setHistory)(e))})).catch((e=>{n((0,T.setInterrupt)({name:e.name,message:e.message,langKey:e.langKey,originalEvent:e.originalEvent,originalError:e.originalError}))}))}});return()=>{e.unsubscribe()}}return()=>{}}),[t,r,n]),null};var R=n(546),M=n(9643),L=n(641);const U=({children:e})=>{const{t}=(0,R.useI18n)(),n=(0,m.useDispatch)(),r=(0,v.useSeamlyApiContext)(),{addUploadBubble:o}=(0,v.useSeamlyCommands)();return(0,j.jsx)(L.Z.Provider,{value:e=>{const i=(0,M.randomId)(),s=r.uploadFile(e,(e=>{n((0,N.setUploadProgress)({fileId:i,progress:Math.ceil(e)}))}),(e=>{const{id:t,transactionId:r,occurredAt:s,body:{contentType:a,filename:c,filesize:l,url:u}}=e.body;n((0,N.setUploadComplete)(i)),o(t,r,s,a,c,l,u)}),(e=>{let r;switch(e&&e.body?e.body.error:""){case"file_uploads_are_disabled":r=t("fileUpload.errors.unavailable");break;case"request_entity_too_large":r=t("fileUpload.errors.tooLarge");break;case"file_has_invalid_mime_type":r=t("fileUpload.errors.wrongType");break;case"virus_found":r=t("fileUpload.errors.virusFound");break;default:r=t("fileUpload.errors.general")}n((0,N.setUploadError)({fileId:i,errorText:r}))}));n((0,N.registerUpload)({fileId:i,fileName:e.name,uploadHandle:s}))},children:e})};var F=n(1154);const B=()=>{const{hasCountdown:e,isActive:t,remaining:n,decrementCountdown:r}=(0,F.Z)();return((e,t)=>{const n=(0,y.useRef)(e);(0,y.useEffect)((()=>{n.current=e}),[e]),(0,y.useEffect)((()=>{if(null!==t){const e=setInterval((function(){n.current()}),t);return()=>clearInterval(e)}}),[t])})((()=>{r()}),e&&t&&n>0?1e3:null),null};var H=n(6065);const $=()=>{const{initUserSelectedOptions:e}=(0,v.useSeamlyOptions)(),t=(0,y.useRef)(!1),n=(0,H.useConfig)();return(0,y.useEffect)((()=>{n.api&&!t.current&&(t.current=!0,e())}),[e,n]),null};var V=n(2108),z=n(8877),q=n(3742),W=n(2629);function G(e,t,n=[]){const r=(0,y.useContext)(_.SeamlyEventBusContext),o=(0,y.useRef)();o.current=t,(0,y.useEffect)((()=>{if(!n.every(Boolean))return;const t=(...e)=>o.current?.(...e);return r.emit("function.register",e,t),()=>r.emit("function.unregister",e,t)}),[r,e,...n])}const Z=()=>{const e=(0,H.useConfig)(),{sendMessage:t,sendContext:n,sendAction:r}=(0,v.useSeamlyCommands)(),{setVisibility:o,visible:i}=(0,q.useVisibility)(),s=(0,y.useRef)(i),a=(0,y.useContext)(_.SeamlyEventBusContext),c=(0,v.useSeamlyApiContext)(),l=(0,v.useSeamlyUnreadCount)(),u=(0,y.useRef)(null),p=(0,y.useRef)(null),{isInline:d,isResolving:f}=(0,v.useSeamlyLayoutMode)(),{hasInterrupt:h}=(0,z.useInterrupt)(),m=(0,v.useSeamlyConversationUrl)(),b=(0,y.useRef)(null),g=(0,v.useSeamlyActivityEventHandler)(),{enableTranslations:O,disableTranslations:w}=(0,V.useTranslations)();return(0,y.useEffect)((()=>{s.current=i}),[i]),G("askText",(e=>{t({body:e})}),[c?.send]),G("setVariables",(e=>{n({variables:e})}),[c?.send]),G("getVisibility",(e=>{e?e(s.current):console.warn("A callback function is required for the getVisibility action.")})),G("setVisibility",(e=>{Object.values(W.visibilityStates).includes(e)?(g(),o(e)):console.error('Requested visibility states should be "open", "minimized" ,"hidden" or null.')}),[e?.api]),G("sendCustomAction",((e,t)=>{r({type:"custom",body:{type:e,body:t}})}),[c.send]),G("setTopic",(({name:e,fallbackMessage:t})=>{e&&t?r({type:I.actionTypes.setTopic,body:{name:e,fallbackMessage:t}}):console.warn("A name and a fallbackMessage are required for the setTopic action.")}),[c.send]),G("setTranslation",(({enabled:e,locale:t})=>{e?O(t):w()}),[c.send]),(0,y.useEffect)((()=>{f||h||(b.current&&b.current!==m&&a.emit("unreadMessageCount",l),i===W.visibilityStates.open&&i!==p.current&&0!==u.current&&a.emit("unreadMessageCount",0),i!==W.visibilityStates.open&&l!==u.current&&a.emit("unreadMessageCount",l),p.current=i,u.current=l,b.current=m)}),[l,i,a,d,f,h,m]),null};var K=n(8803);const J=({children:e})=>{const t=(0,y.useContext)(_.SeamlyEventBusContext),[n,r]=(0,y.useState)({}),o=(0,y.useRef)(!0),i=(0,y.useCallback)((e=>{o.current&&(r(e),t.emit("aria-live",e))}),[r,t]);(0,y.useEffect)((()=>{let e=null;return n&&n.messageText&&(e=setTimeout((()=>{i({}),clearTimeout(e)}),500)),()=>{clearTimeout(e)}}),[n,i]),(0,y.useEffect)((()=>()=>{o.current=!1}),[]);const{ariaLive:s,messageText:a}=n;return(0,j.jsxs)(K.SeamlyLiveRegionContext.Provider,{value:i,children:[e,(0,j.jsxs)("div",{className:(0,O.className)("app__live-container"),children:[(0,j.jsx)("div",{"aria-live":"assertive","aria-atomic":"true",className:(0,O.className)("visually-hidden"),children:s===I.ariaLiveLevels.assertive?a:null}),(0,j.jsx)("div",{"aria-live":"polite","aria-atomic":"true",className:(0,O.className)("visually-hidden"),children:s===I.ariaLiveLevels.polite?a:null})]})]})};var X=n(4959);const Q=()=>{const{t:e}=(0,R.useI18n)(),t=(0,v.useEvents)(),n=(0,y.useRef)(0),r=(0,y.useRef)(0),o=(0,v.useSeamlyIsHistoryLoaded)(),{sendPolite:i}=(0,v.useLiveRegion)(),{isOpen:s}=(0,q.useVisibility)(),a=(0,y.useRef)(null),c=(0,y.useRef)(null),l=(0,y.useMemo)((()=>(0,X.debounce)((t=>{const n=t.filter((({payload:e})=>!e.fromClient&&!e.fromHistory)).length;n>r.current&&(i(e("message.srNewEventCount",{newCount:n-r.current})),r.current=n)}),g.newMessageScreenReaderWait)),[i,e]);return(0,y.useEffect)((()=>{t.length>n.current&&(s&&(c.current=l(t)),n.current=t.length)}),[t,l,s]),(0,y.useEffect)((()=>{a.current&&!s&&c.current&&(c.current(!0),c.current=null)}),[s]),(0,y.useEffect)((()=>{o&&setTimeout((()=>{i(e("window.srTexts.onHistoryLoad"))}),500)}),[o,e,i]),null},Y=()=>{const{t:e}=(0,R.useI18n)(),t=(0,v.useEvents)(),n=(0,m.useDispatch)(),{isOpen:r,isVisible:o}=(0,q.useVisibility)(),{sendAction:i}=(0,v.useSeamlyCommands)(),s=(0,v.useSeamlyUnreadCount)(),{sendPolite:a}=(0,v.useLiveRegion)(),c=(0,y.useMemo)((()=>(0,X.debounce)(a,g.unreadScreenReaderWait)),[a]),l=(0,y.useRef)(null),u=(0,y.useRef)(null);return(0,y.useEffect)((()=>{if(!r)return;const e=t.filter((e=>(0,N.isUnreadMessage)(e)&&e.payload.messageStatus===I.readStates.received)).map((e=>e.payload.id));e.length>0&&(n((0,N.setEventsRead)(e)),i({type:I.actionTypes.read,events:e}))}),[t,n,r,i]),(0,y.useEffect)((()=>{l.current!==o&&!o&&u.current&&u.current(),0!==s&&!r&&o&&(u.current=c(e("message.srTextUnreadCount",{unreadCount:s}))),l.current=o}),[s,r,o,c,e]),null},ee=({store:e,children:t,eventBus:n,api:r})=>((0,y.useErrorBoundary)((t=>e.dispatch((0,h.catchError)(t)))),(0,j.jsx)(m.Provider,{store:e,children:(0,j.jsx)(_.SeamlyEventBusContext.Provider,{value:n,children:(0,j.jsx)(_.SeamlyApiContext.Provider,{value:r,children:(0,j.jsx)(J,{children:(0,j.jsxs)(b.default,{children:[(0,j.jsx)($,{}),(0,j.jsx)(D,{eventBus:n}),(0,j.jsx)(Y,{}),(0,j.jsx)(Q,{}),(0,j.jsx)(B,{}),(0,j.jsxs)(S,{children:[(0,j.jsx)(Z,{}),(0,j.jsx)(U,{children:t})]})]})})})})}));function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const oe=e=>(0,j.jsx)(ee,ne(ne({},e),{},{children:(0,j.jsx)(f.default,{})})),ie=["namespace","parentElement","showFaq"],se=["view"];function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){le(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ue(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}class pe{constructor(e,t){const{namespace:n="",parentElement:o,showFaq:i}=e,s=ue(e,ie);this.config=ce(ce({},s),{},{namespace:n,showFaq:!1!==i}),this.namespace=n,this.parentElement=o,this.externalApi=t,this.api=new r.API({layoutMode:e.layoutMode,namespace:e.namespace,config:e.api,context:e.context}),this.eventBus=new(p()),this.functions={},this.registerFunctions({on:this.eventBus.on,off:this.eventBus.off}),this.eventBus.on("function.register",((e,t)=>this.registerFunction(e,t))),this.eventBus.on("function.unregister",((e,t)=>this.unregisterFunction(e,t)))}async render(){const e=this.config.customComponents||{},{view:t}=e,n=ue(e,se),r=ce(ce({},this.config),{},{customComponents:Object.keys(n).length?n:void 0}),u=(0,c.createStore)({api:this.api,eventBus:this.eventBus,config:r,initialState:void 0});u.dispatch((0,s.setConfig)(r)),await u.dispatch((0,i.initializeConfig)());try{const{locale:e}=await u.dispatch((0,o.initializeApp)()).unwrap();await u.dispatch((0,a.setLocale)(e))}catch(e){}u.dispatch((0,l.initializeVisibility)()),t?(0,d.render)((0,j.jsx)(ee,{eventBus:this.eventBus,store:u,api:this.api,children:(0,j.jsx)(t,{})}),this.parentElement):(0,d.render)((0,j.jsx)(oe,{config:r,eventBus:this.eventBus,store:u,api:this.api}),this.parentElement)}destroy(){(0,d.render)(null,this.parentElement),this.eventBus.off(),this.api.disconnect(),delete this.functions}registerFunctions(e){Object.entries(e).forEach((([e,t])=>{this.registerFunction(e,t)}))}registerFunction(e,t){this.functions[e]=this.functions[e]||[],this.functions[e].push(t),this.externalApi.handleActions()}unregisterFunction(e,t){const n=this.functions[e];n&&n.length&&(this.functions[e]=n.filter((e=>e!==t)))}execFunction(e,...t){const n=this.functions[e];return!(!n||!n.length||(n.forEach((n=>{try{n(...t)}catch(t){console.error(`Action(${e}) failed: `,t)}})),0))}}},7053:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(9409);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const a=e=>"object"==typeof e&&"action"in e,c=e=>i(i({},e),{},{args:Array.isArray(e.args)?e.args:[e.args]}),l=class{constructor(e){this._waitingActions=[],this._instances={},this.appConfig=e,this.context={}}push(...e){(e=e.filter(a).map(c)).length&&(this._waitingActions.push(...e),this.handleActions())}handleActions(){const e=this._waitingActions;this._waitingActions=[],e.forEach((e=>{switch(e.action){case"init":this.handleInit(e);break;case"destroy":this.handleDestroy(e);break;default:this.handleAction(e)||this.setContext(e.action,...e.args)||this._waitingActions.push(e)}}))}setContext(e,t){switch(e){case"setTopic":const{name:e}=t;return e&&(this.context.topic=e),!0;case"setTranslation":const{enabled:n,locale:r}=t;return n&&r&&(this.context.translationLocale=r),!0;case"setVariables":return Object.keys(t).length>0&&(this.context.variables=i({},t)),!0;default:return!1}}handleInit(e){const t=this.getUserConfig(...e.args),n=this.getCombinedConfig(t),{parentElement:r,namespace:o}=n||t;if(o?Object.values(this._instances).forEach((e=>{e.parentElement!==r&&e.namespace!==o||this.destroy(e)})):this.destroy(),n){const e=this.createInstance(n);this._instances[n.namespace]=e,this.context={},e.render()}}handleDestroy(e){this.destroy(e.instance)}handleAction(e){const{action:t,instance:n,args:r}=e,o=Object.values(this._instances);return!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: ${t}`),o.map((e=>(!n||e.namespace===n)&&e.execFunction(t,...r))).some(Boolean)}createInstance(e){return new r.default(e,this)}destroy(e){e?("string"==typeof e&&(e=this._instances[e]),e&&(e.destroy(),delete this._instances[e.namespace])):Object.entries(this._instances).forEach((([e,t])=>{t.destroy(),delete this._instances[e]}))}getUserConfig(e={}){return e}getCombinedConfig(e){const t=i(i({},e.context||this.appConfig.context),this.context),n=this.getMergedVariables(e);Object.keys(n).length>0&&(t.variables=n);const r=i(i({},this.appConfig.defaults),e.defaults),o=i(i(i({},this.appConfig),e),{},{api:i(i({},this.appConfig.api),e.api),context:Object.keys(t).length?t:void 0,defaults:Object.keys(r).length?r:void 0});return"function"==typeof this.appConfig?this.appConfig(o):o}getMergedVariables(e){return i(i(i({},this.appConfig.context?.variables||{}),e.context?.variables||{}),this.context.variables||{})}}},3022:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(7053);function o(e){if(window.seamly&&!Array.isArray(window.seamly))throw new Error("Seamly UI has already been initialised. Use the window.seamly object to start new instances instead.");const t=Array.isArray(window.seamly)?window.seamly:[],n=new r.default(e);window.seamly={push:n.push.bind(n)},n.push(...t)}},9643:(e,t,n)=>{"use strict";function r(){return`_${(Number(String(Math.random()).slice(2))+Date.now()+Math.round(performance.now())).toString(36)}`}n.r(t),n.d(t,{randomId:()=>r})},5423:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(7210).createContext)({})},4921:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>at});var r=n(9207),o=n(6065),i=n(5423),s=n(9661),a=n(6425),c=n(1153),l=n(2108),u=n(6113),p=n(1989),d=n(546),f=n(2849),h=n(5567),y=n(7209),m=n(7210),b=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],v=b.join(","),g="undefined"==typeof Element,O=g?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,w=!g&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},j=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(v));return t&&O.call(e,v)&&r.unshift(e),r.filter(n)},S=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),c=e(a.length?a:s.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scope:s,candidates:c})}else{O.call(s,v)&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var l=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),u=!r.shadowRootFilter||r.shadowRootFilter(s);if(l&&u){var p=e(!0===l?s.children:l.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scope:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},_=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},x=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},C=function(e){return"INPUT"===e.tagName},E=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},P=function(e,t){return!(t.disabled||function(e){return C(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=O.call(e,"details>summary:first-of-type")?e.parentElement:e;if(O.call(o,"details:not([open]) *"))return!0;var i=w(e).host,s=(null==i?void 0:i.ownerDocument.contains(i))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return E(e)}else{if("function"==typeof r){for(var a=e;e;){var c=e.parentElement,l=w(e);if(c&&!c.shadowRoot&&!0===r(c))return E(e);e=e.assignedSlot?e.assignedSlot:c||l===e.ownerDocument?c:l.host}e=a}if(s)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!O.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},T=function(e,t){return!(function(e){return function(e){return C(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||w(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){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",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||_(t)<0||!P(e,t))},N=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},I=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scope,s=i?t.scope:t,a=_(s,i),c=i?e(t.candidates):s;0===a?i?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:a,item:t,isScope:i,content:c})})),r.sort(x).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},k=function(e,t){var n;return n=(t=t||{}).getShadowRoot?S([e],t.includeContainer,{filter:T.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:N}):j(e,t.includeContainer,T.bind(null,t)),I(n)},A=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==O.call(e,v)&&T(t,e)},D=b.concat("iframe").join(","),R=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==O.call(e,D)&&P(t,e)};function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var F,B=(F=[],{activateTrap:function(e){if(F.length>0){var t=F[F.length-1];t!==e&&t.pause()}var n=F.indexOf(e);-1===n||F.splice(n,1),F.push(e)},deactivateTrap:function(e){var t=F.indexOf(e);-1!==t&&F.splice(t,1),F.length>0&&F[F.length-1].unpause()}}),H=function(e){return setTimeout(e,0)},$=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},V=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},z=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},q=n(4959);function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){Z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const K=({children:e,onClose:t,"aria-label":n,"aria-labelledby":o,fallBackFocusRef:i})=>{const s=(0,f.useGeneratedId)(),a=(0,r.useRef)(null),c=(0,r.useRef)(null),[l,u]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{return l&&(c.current=(e=a.current,t={initialFocus:i&&i.current?i.current:null},r=(null==t?void 0:t.document)||document,o=L({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},u=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},p=function(e){return s.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},d=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var a=t;if("string"==typeof t&&!(a=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return a},f=function(){var e=d("initialFocus");if(!1===e)return!1;if(void 0===e)if(p(r.activeElement)>=0)e=r.activeElement;else{var t=s.tabbableGroups[0];e=t&&t.firstTabbableNode||d("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},h=function(){if(s.containerGroups=s.containers.map((function(e){var t,n,r=k(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?S([t],n.includeContainer,{filter:P.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):j(t,n.includeContainer,P.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return A(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return A(e,o.tabbableOptions)}))}}})),s.tabbableGroups=s.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),s.tabbableGroups.length<=0&&!d("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},y=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(f()))},m=function(e){var t=d("setReturnFocus",e);return t||!1!==t&&e},b=function(e){var t=z(e);p(t)>=0||(V(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!R(t,o.tabbableOptions)}):V(o.allowOutsideClick,e)||e.preventDefault())},v=function(e){var t=z(e),n=p(t)>=0;n||t instanceof Document?n&&(s.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),y(s.mostRecentlyFocusedNode||f()))},g=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==V(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=z(e);h();var n=null;if(s.tabbableGroups.length>0){var r=p(t),i=r>=0?s.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var a=$(s.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(a<0&&(i.container===t||R(t,o.tabbableOptions)&&!A(t,o.tabbableOptions)&&!i.nextTabbableNode(t,!1))&&(a=r),a>=0){var c=0===a?s.tabbableGroups.length-1:a-1;n=s.tabbableGroups[c].lastTabbableNode}}else{var l=$(s.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(l<0&&(i.container===t||R(t,o.tabbableOptions)&&!A(t,o.tabbableOptions)&&!i.nextTabbableNode(t))&&(l=r),l>=0){var u=l===s.tabbableGroups.length-1?0:l+1;n=s.tabbableGroups[u].firstTabbableNode}}}else n=d("fallbackFocus");n&&(e.preventDefault(),y(n))}(e)},O=function(e){var t=z(e);p(t)>=0||V(o.clickOutsideDeactivates,e)||V(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},w=function(){if(s.active)return B.activateTrap(n),s.delayInitialFocusTimer=o.delayInitialFocus?H((function(){y(f())})):y(f()),r.addEventListener("focusin",v,!0),r.addEventListener("mousedown",b,{capture:!0,passive:!1}),r.addEventListener("touchstart",b,{capture:!0,passive:!1}),r.addEventListener("click",O,{capture:!0,passive:!1}),r.addEventListener("keydown",g,{capture:!0,passive:!1}),n},_=function(){if(s.active)return r.removeEventListener("focusin",v,!0),r.removeEventListener("mousedown",b,!0),r.removeEventListener("touchstart",b,!0),r.removeEventListener("click",O,!0),r.removeEventListener("keydown",g,!0),n},(n={get active(){return s.active},get paused(){return s.paused},activate:function(e){if(s.active)return this;var t=u(e,"onActivate"),n=u(e,"onPostActivate"),o=u(e,"checkCanFocusTrap");o||h(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=r.activeElement,t&&t();var i=function(){o&&h(),w(),n&&n()};return o?(o(s.containers.concat()).then(i,i),this):(i(),this)},deactivate:function(e){if(!s.active)return this;var t=L({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,_(),s.active=!1,s.paused=!1,B.deactivateTrap(n);var r=u(t,"onDeactivate"),i=u(t,"onPostDeactivate"),a=u(t,"checkCanReturnFocus"),c=u(t,"returnFocus","returnFocusOnDeactivate");r&&r();var l=function(){H((function(){c&&y(m(s.nodeFocusedBeforeActivation)),i&&i()}))};return c&&a?(a(m(s.nodeFocusedBeforeActivation)).then(l,l),this):(l(),this)},pause:function(){return s.paused||!s.active||(s.paused=!0,_()),this},unpause:function(){return s.paused&&s.active?(s.paused=!1,h(),w(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return s.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),s.active&&h(),this}}).updateContainerElements(e),n),c.current.activate()),()=>{c.current&&c.current.deactivate()};var e,t,n,r,o,s,u,p,d,f,h,y,m,b,v,g,O,w,_}),[l,i]),(0,r.useEffect)((()=>{const e=(0,q.createAriaHider)();return()=>{e()}}),[l]),(0,r.useEffect)((()=>{l&&a.current.addEventListener("keydown",(e=>{(e.code&&"Escape"===e.code||27===e.keyCode)&&t()}))}),[l,t]),(0,r.useLayoutEffect)((()=>{const e=document.getElementsByTagName("body")[0],t=document.createElement("div");return t.setAttribute("id",s),t.setAttribute("role","dialog"),t.setAttribute("data-nosnippet","true"),t.setAttribute("aria-modal","true"),n&&t.setAttribute("aria-label",n),o&&t.setAttribute("aria-labelledby",o),e.appendChild(t),a.current=t,u(!0),()=>{a.current&&(e.removeChild(a.current),a.current=null)}}),[n,o,s]),"function"==typeof e?e({onClose:t,modalRenderFn:e=>a.current&&(0,m.render)(e,a.current)}):a.current&&(0,m.render)((0,m.toChildArray)(e).map((e=>(e.props=G(G({},e.props),{},{onClose:t}),e))),a.current)};var J=n(7844);const X=({url:e,description:t,onClose:n})=>{const{zIndex:i,layoutMode:s,namespace:a}=(0,o.useConfig)(),c=(0,f.useSeamlyActivityEventHandler)(),l=(0,f.useSeamlyAppContainerClassNames)(),u=(0,r.useRef)(null),{t:p}=(0,d.useI18n)(),m=["modal",`app--layout-${s}`,`namespace--${a}`,...l],b=e=>{e.stopPropagation()},v=()=>{n()},g=i?{zIndex:i+1}:void 0;return(0,J.jsx)(K,{onClose:n,"aria-label":p("lightbox.heading"),fallBackFocusRef:u,children:({onClose:n,modalRenderFn:r})=>r((n=>(0,J.jsx)("div",{className:(0,h.className)(m),onClick:v,style:g,children:(0,J.jsxs)("div",{className:(0,h.className)("modal__float"),tabIndex:"-1",onMouseDown:c,onKeyDown:c,onTouchStart:c,onMouseMove:c,onWheel:c,onPointerDown:c,onPointerMove:c,ref:u,children:[(0,J.jsx)("div",{className:(0,h.className)("modal__inner"),onClick:b,children:(0,J.jsx)("img",{className:(0,h.className)("modal__image"),src:e,alt:t})}),(0,J.jsxs)("button",{type:"button",className:(0,h.className)("modal__close"),onClick:n,children:[(0,J.jsx)(y.default,{name:"close",size:"16"}),p("lightbox.closeLabel")]})]})}))(n))})},Q=({description:e,url:t})=>{const{t:n}=(0,d.useI18n)(),[o,i]=(0,r.useState)(!1);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)("button",{type:"button",className:(0,h.className)("modal__enlarge"),onClick:()=>{i(!0)},children:[n("message.image.srTextEnlargeButtonLabel",{description:e}),(0,J.jsx)(y.default,{name:"enlarge",size:"32"})]}),o&&(0,J.jsx)(X,{url:t,description:e,onClose:()=>{i(!1)}})]})},Y=["event","descriptorId"];function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const re=["event","descriptorId"];function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ae=n(5740),ce=n(8711);const le={[ae.dividerKeys.new_topic]:"newtopic"};var ue=n(841);const pe=["event"];function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const he={default:({event:e})=>{const{t}=(0,d.useI18n)(),{subtype:n}=e.payload.body,r=le[ae.dividerKeys[n]];return(0,J.jsx)(ce.Z,{dividerType:r,iconName:ae.dividerKeys[n],children:(0,J.jsx)("p",{children:t(`dividerKeys.${ae.dividerKeys[n]}`)})})},[ae.dividerKeys.new_translation]:({event:e})=>{const{t}=(0,d.useI18n)(),n=(0,f.useEvents)(),{body:{translationEnabled:o,translationLocale:i,text:s},id:a}=e.payload,{enableTranslations:c}=(0,l.useTranslations)(),p=(0,l.useLocaleNativeName)(i),y=(0,u.useSelector)((e=>e.translations.translatedEventGroups)),m=(0,u.useDispatch)(),b=(0,r.useCallback)((()=>{y[a]?m((0,ue.enableEventsTranslation)({events:n,id:a})):m((0,ue.disableEventsTranslation)({events:n,id:a}))}),[m,n,a,y]);return(0,J.jsxs)(ce.Z,{iconName:"newTranslation",dividerType:"newtranslation",children:[(0,J.jsx)("p",{className:(0,h.className)("divider__title"),children:t(o?"translations.divider.startText":"translations.divider.stopText",{language:p})}),o?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("p",{children:s}),(0,J.jsx)("button",{className:(0,h.className)("button","button--secondary"),onClick:b,children:t(y[a]?"translations.toggle.showTranslationsButtonText":"translations.toggle.hideTranslationsButtonText")})]}):(0,J.jsx)("button",{className:(0,h.className)("button","button--secondary"),"data-testid":"restartTranslationButton",onClick:()=>{c(i)},children:t("translations.divider.restartButtonText")})]})}},ye=["event"];function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ge=n(5327);const Oe=["event"];function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){Se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _e=["event"];function xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(n),!0).forEach((function(t){Ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Pe=({children:e,url:t,target:n})=>t?(0,J.jsx)("a",{href:t,download:!0,target:n||void 0,className:(0,h.className)(["download","download-link"]),children:e}):(0,J.jsx)("span",{className:(0,h.className)("download"),children:e});var Te=n(36),Ne=n(5029);function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){Ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const De=({id:e,action:t,buttonText:n,description:o,hasFocus:i,image:s,title:a,isCarouselItem:c})=>{const l=(0,r.useRef)(null),{sendMessage:u,sendAction:p,emitEvent:d}=(0,f.useSeamlyCommands)(),y=(0,f.useGeneratedId)(),m=(0,r.useRef)(),b=t.type===ae.cardTypes.navigate?"a":"button",v=(0,r.useCallback)((()=>d(`action.${ae.actionTypes.clickCard}`,{type:ae.actionTypes.clickCta,originMessage:e,action:t})),[d,e,t]),g=(0,r.useCallback)((()=>{if(v(),t.type===ae.cardTypes.ask)u({body:t.ask});else if(t.type===ae.cardTypes.topic){const{topic:e,fallbackMessage:n}=t;p({type:ae.actionTypes.setTopic,body:{name:e,fallbackMessage:n}})}}),[u,t,p,v]),O=(0,r.useMemo)((()=>t.type===ae.cardTypes.navigate?{href:t.link,rel:"noopener noreferrer",target:t.newTab?"_blank":"_self",onClick:v}:{onClick:g}),[t,g,v]);return(0,r.useEffect)((()=>{c&&(i&&m.current?window.requestAnimationFrame((()=>l.current.focus())):l.current.blur()),m.current=!0}),[i,c]),(0,J.jsxs)("div",{className:(0,h.className)("card__wrapper"),id:e,tabIndex:"-1",ref:l,children:[(0,J.jsx)("img",{className:(0,h.className)("card__image"),src:s,alt:""}),(0,J.jsxs)("div",{className:(0,h.className)("card__content"),id:e,children:[a&&(0,J.jsx)("h2",{className:(0,h.className)("card__title"),children:a}),o&&(0,J.jsx)("div",{className:(0,h.className)("card__description"),dangerouslySetInnerHTML:{__html:o}}),(0,J.jsx)(b,ke(ke({tabIndex:c&&!i?"-1":void 0,className:(0,h.className)("button","button--primary"),"aria-describedby":y},O),{},{children:n}))]})]})};function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){Le(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ue({item:e,items:t,index:n,isActive:r}){const{t:o}=(0,d.useI18n)();return(0,J.jsx)("div",{className:(0,h.className)("carousel-item",`carousel-item--${e.type}`),role:"group","aria-roledescription":"slide","aria-label":o("carousel.slide.label",{index:n+1,total:t.length}),children:(0,J.jsx)(De,Me(Me({},e),{},{isCarouselItem:!0,hasFocus:r}))})}function Fe({items:e,currentIndex:t,onChange:n,getItemKey:o,getItemLabel:i}){const s=e.length,a=(0,r.useCallback)((e=>{const r=Number(e.target.dataset.item||"0"),o=Math.min(s-1,Math.max(0,r));o!==t&&n(o)}),[s,t,n]);return(0,J.jsx)("div",{className:(0,h.className)("carousel-pagination__wrapper"),role:"group",children:(0,J.jsx)("ul",{className:(0,h.className)("carousel-pagination"),children:e.map(((e,n)=>{const r=t===n;return(0,J.jsx)("li",{className:(0,h.className)("carousel-pagination__item",r?"is-active":void 0),children:(0,J.jsx)("button",{className:(0,h.className)("carousel-pagination__button"),type:"button",onClick:a,"data-item":n,"aria-disabled":r?"true":void 0,"aria-label":i(e,n)})},o(e,n,"pagination-item-"))}))})})}function Be({items:e,currentIndex:t,onChange:n,children:r}){const{t:o}=(0,d.useI18n)(),i=e.length;return(0,J.jsxs)("div",{className:(0,h.className)("carousel-controls"),children:[(0,J.jsx)("button",{className:(0,h.className)("button","button--previous"),"aria-label":o("carousel.controls.previous"),onClick:()=>{n((t-1+i)%i)},children:(0,J.jsx)(y.default,{name:"arrowLeft",size:"16"})}),r,(0,J.jsx)("button",{className:(0,h.className)("button","button--next"),"aria-label":o("carousel.controls.next"),onClick:()=>{n((t+1)%i)},children:(0,J.jsx)(y.default,{name:"arrowRight",size:"16"})})]})}const He=(e,t,n)=>`${n}${t}`,$e=e=>e.label,Ve=({target:e})=>{e.scrollLeft=0};function ze({currentIndex:e,onChange:t,getItemKey:n=He,getItemLabel:o=$e,items:i}){const s=(0,Ne.I8)(),a=i.length,[c,l]=(0,r.useState)(Number(e||"0"));(0,r.useEffect)((()=>{l(Number(e||"0"))}),[l,e]);const u=(0,r.useRef)([]);u.current=(0,r.useMemo)((()=>Array(a).fill(1).map((()=>(0,m.createRef)()))),[a]);const p=(0,r.useRef)(!0),d=(0,r.useRef)();return d.current=t,(0,r.useEffect)((()=>{p.current?p.current=!1:d.current&&d.current(c)}),[c]),(0,J.jsxs)("div",{className:(0,h.className)("carousel"),role:"group","aria-roledescription":"carousel",children:[(0,J.jsx)("div",{className:(0,h.className)("carousel__slides-wrapper"),onScroll:Ve,children:(0,J.jsx)("div",{id:s,className:(0,h.className)("carousel__slides"),style:{width:100*a+"%",left:-100*c+"%"},"aria-live":"polite","aria-atomic":"false",children:i.map(((e,t)=>{const r=c===t;return(0,J.jsx)("div",{ref:u.current[t],className:(0,h.className)("carousel__slide",r?"is-active":void 0),"aria-hidden":r?void 0:"true",children:(0,J.jsx)(Ue,{item:e,items:i,currentIndex:c,index:t,isActive:r})},n(e,t,"item-"))}))})}),(0,J.jsx)("div",{className:(0,h.className)("carousel__controls"),children:(0,J.jsx)(Be,{currentIndex:c,items:i,onChange:l,controlId:s,children:(0,J.jsx)("div",{className:(0,h.className)("carousel__pagination"),children:(0,J.jsx)(Fe,{currentIndex:c,items:i,onChange:l,getItemKey:n,getItemLabel:o})})})})]})}const qe=(e,t,n="")=>`${n}${e.title}:${t}`,We=e=>e.title;function Ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ge(Object(n),!0).forEach((function(t){Ke(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ke(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Je=n(9279),Xe=n(5150),Qe=n(2841);const Ye=["event"];function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){nt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){it(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function it(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const st={message:{choice_prompt:s.default,text:a.default,image:e=>{let{event:t,descriptorId:n}=e,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Y);const{body:i}=(0,l.useTranslatedEventData)(t),{description:s,url:a,isZoomable:d}=i,[f,h]=(0,r.useState)(!1),y=(0,u.useDispatch)();return(0,J.jsxs)(p.default,te(te({event:t,type:"image"},o),{},{children:[(0,J.jsx)("img",{src:a,id:n,alt:s,onLoad:()=>{y((0,c.setLoadedImageEventIds)(t.payload.id)),h(!0)}}),d&&f&&(0,J.jsx)(Q,{description:s,url:a})]}))},splash:e=>{let{event:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Oe);const{payload:r}=t,{body:o}=(0,l.useTranslatedEventData)(t),i=(0,ge.Z)(r.id);return(0,J.jsx)(p.default,je(je({type:"splash",event:t,onClick:i},n),{},{bodyProps:{dangerouslySetInnerHTML:{__html:o.text}}}))},video:e=>{let{event:t,descriptorId:n}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,re);const{body:o}=(0,l.useTranslatedEventData)(t),{description:i,url:s}=o;return(0,f.useSeamlyMessageContainerClassNames)(t).push("message--type-video"),(0,J.jsxs)(p.default,ie(ie({event:t,type:"video"},r),{},{children:[(0,J.jsx)("div",{id:n,className:(0,h.className)("visually-hidden"),children:i}),(0,J.jsx)("iframe",{title:i,src:s,allow:"autoplay; encrypted-media",allowFullScreen:!0})]}))},upload:e=>{let{event:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,_e);const{t:o}=(0,d.useI18n)(),{body:i}=(0,l.useTranslatedEventData)(t),{fromClient:s}=t.payload,{filename:a,url:c}=i,u=(0,r.useMemo)((()=>o(c?"fileUpload.srFileDownloadText":"fileUpload.srFileUploadedText",{fileName:a})),[c,a,o]);return(0,J.jsx)(p.default,Ce(Ce({event:t,type:"upload"},n),{},{children:(0,J.jsxs)(Pe,{url:c,target:s?void 0:"_blank",children:[(0,J.jsx)(y.default,{name:"download",size:"16"}),(0,J.jsx)("span",{"aria-hidden":"true",className:(0,h.className)("file-download"),children:a}),(0,J.jsx)("span",{className:(0,h.className)("visually-hidden"),children:u})]})}))},cta:({event:e})=>{const{body:t}=(0,l.useTranslatedEventData)(e),n=(0,ge.Z)(e.payload.id),{emitEvent:o}=(0,f.useSeamlyCommands)(),i=(0,f.useGeneratedId)(),s=(0,r.useCallback)((()=>o(`action.${ae.actionTypes.clickCta}`,{type:ae.actionTypes.clickCta,originMessage:e.payload.id,link:{url:t.buttonLink}})),[o,t,e]);return(0,J.jsxs)(p.default,{type:"cta",event:e,children:[(0,J.jsx)("div",{className:(0,h.className)("cta__content"),id:i,dangerouslySetInnerHTML:{__html:t.description},onClick:n}),(0,J.jsx)("a",{className:(0,h.className)("button","button--primary"),"aria-describedby":i,href:t.buttonLink,rel:"noreferrer",target:t.buttonNewTab?"_blank":"_self",onClick:s,children:t.buttonText})]})},carousel:({event:e})=>{const{body:t}=(0,l.useTranslatedEventData)(e),n=t.cards;return(0,J.jsx)(p.default,{event:e,modifiers:"type-carousel",children:(0,J.jsx)(ze,{items:n,ItemComponent:Ue,getItemKey:qe,getItemLabel:We})})},card:({event:e})=>{const{body:t}=(0,l.useTranslatedEventData)(e),n=(0,f.useGeneratedId)();return(0,J.jsx)(p.default,{type:"card",event:e,children:(0,J.jsx)(De,Ze({id:n},t))})}},info:{text:a.default,divider:e=>{let{event:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,pe);const r=he[ae.dividerKeys[t.payload.body.subtype]]||he.default;return(0,J.jsx)(r,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){fe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({event:t},n))},translation:e=>{let{event:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ye);const{t:r}=(0,d.useI18n)(),{body:o}=(0,l.useTranslatedEventData)(t);return(0,J.jsx)(p.default,be(be({type:"text",event:t},n),{},{children:r(o.key.join("."),o.variables)}))},timeIndicator:Te.Z},participant:{participant:({event:e})=>{const{participant:t}=e.payload,{body:n}=(0,l.useTranslatedEventData)(e);return n?(0,J.jsx)(ce.Z,{graphicSrc:t.avatar,graphicType:t.avatar?"avatar":void 0,iconName:t.avatar?void 0:"balloon",childrenHTML:n,dividerType:"participant"}):null}},service_data:{suggestion:e=>{let{event:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Ye);const[i,s]=(0,r.useState)(!0),a=(0,u.useDispatch)(),c=(0,Je.h)(),{sendAction:y,addMessageBubble:m}=(0,f.useSeamlyCommands)(),{suggestions:b,payload:v}=(e=>{const{payload:t}=e,{body:n}=(0,l.useTranslatedEventData)(e);return{suggestions:n,payload:t}})(t),{showSuggestions:g}=(0,o.useConfig)(),O=(0,f.useEvents)(),{t:w}=(0,d.useI18n)(),j=w("suggestions.headingText"),S=w("suggestions.footerText"),_=(0,r.useMemo)((()=>O.some((({payload:e})=>e?.transactionLast))),[O]),x=(0,r.useCallback)((({id:e,question:t})=>{s(!1),a((0,Xe.setHasResponded)(!0)),y({type:ae.actionTypes.custom,originMessage:v.id,body:{type:"faqclick",body:{faqId:e,faqQuestion:t}}}),m(t)}),[a,y,v.id,m]);return i&&!c&&_&&g?(0,J.jsxs)("div",{className:(0,h.className)("suggestions","suggestions--conversation"),children:[j&&(0,J.jsx)("p",{className:(0,h.className)("suggestions__heading"),children:j}),(0,J.jsxs)(p.default,tt(tt({type:"suggestions",showParticipant:!1,event:t},n),{},{children:[(0,J.jsx)(Qe.Z,{className:"suggestions__list--conversation",onClickSuggestion:x,suggestions:b}),S&&(0,J.jsx)("p",{className:(0,h.className)("suggestions__footer"),children:S})]}))]}):null}}},at=({children:e})=>{const{customComponents:t}=(0,o.useConfig)(),n=(0,r.useMemo)((()=>Object.keys(st).reduce(((e,n)=>ot(ot({},e),{},{[n]:ot(ot({},st[n]),t?t[n]:{})})),{fallback:a.default})),[t]);return(0,J.jsx)(i.Z.Provider,{value:n,children:e})}},2212:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>O});var r=n(546),o=n(3742),i=n(5567),s=n(9207),a=n(6065),c=n(7844);const l=()=>{const{t:e}=(0,r.useI18n)(),{showDisclaimer:t}=(0,a.useConfig)();return t&&(0,c.jsxs)("div",{className:(0,i.className)("disclaimer"),tabIndex:"0",children:[(0,c.jsx)("h2",{className:(0,i.className)("disclaimer__title"),children:e("disclaimer.title")}),(0,c.jsx)("div",{className:(0,i.className)("disclaimer__message"),dangerouslySetInnerHTML:{__html:e("disclaimer.content")}})]})};var u=n(8956),p=n(2849),d=n(4809),f=n(4921),h=n(2562),y=n(36);const m=({event:e,newParticipant:t})=>{const[n,r]=(0,h.Z)(e);if(!n)return null;const o=["conversation__item"];return"info"===e.type?o.push("conversation__item--source-info"):e.payload.fromClient?o.push("conversation__item--source-user"):o.push("conversation__item--source-agent"),t&&o.push("conversation__item--new-participant"),(0,c.jsxs)("li",{className:(0,i.className)(o),children:[e.timeIndicator&&(0,c.jsx)(y.Z,{event:e}),(0,c.jsx)(n,{event:e,children:(0,c.jsx)(r,{event:e})})]})};var b=n(7409);const v=()=>{const{id:e}=(0,p.useSeamlyCurrentAgent)()||{};return(0,c.jsx)("li",{className:(0,i.className)("conversation__item","conversation__item--source-agent"),children:(0,c.jsxs)("div",{className:(0,i.className)("message","message--source-agent","message--type-loading"),children:[(0,c.jsx)(b.default,{eventPayload:{fromClient:!1,participant:e}}),(0,c.jsx)("div",{className:(0,i.className)("message__body"),children:(0,c.jsxs)("span",{className:(0,i.className)("loader"),children:[(0,c.jsx)("span",{className:(0,i.className)("loader__part","one")}),(0,c.jsx)("span",{className:(0,i.className)("loader__part","two")}),(0,c.jsx)("span",{className:(0,i.className)("loader__part","three")}),(0,c.jsx)("span",{className:(0,i.className)("loader__part","four")})]})})]})})},g=()=>{const e=(0,d.useEvents)();let t=null;return e.map((e=>{const{type:n,payload:r}=e,{participant:o,fromClient:i}=r;let s=!1;if("participant"!==n){const n=i?"seamly-client-participant":o;"info"!==e.type&&t!==n&&(s=!0),t=n}return(0,c.jsx)(m,{event:e,newParticipant:s},e.payload.key||e.payload.id)}))},O=()=>{const{t:e}=(0,r.useI18n)(),t=(0,s.useRef)(null),n=(0,d.useEvents)(),a=(0,p.useSeamlyIsLoading)(),{isOpen:h}=(0,o.useVisibility)(),y=(0,p.useSkiplink)(),m=(0,p.useSkiplinkTargetFocusing)(),b=(0,d.useLoadedImageEventIds)();return(0,s.useLayoutEffect)((()=>{const e=t.current;e&&requestAnimationFrame((async()=>{await(0,u.Vs)(30),e.scrollTop=e.scrollHeight}))}),[n,a,h,b]),(0,c.jsxs)(c.Fragment,{children:[h&&(0,c.jsx)("a",{className:(0,i.className)("skip-link"),href:`#${y}`,onClick:e=>{e.preventDefault(),m()},children:e("skiplinkText")}),(0,c.jsx)("div",{className:(0,i.className)("chat__body"),ref:t,children:(0,c.jsxs)("div",{className:(0,i.className)("conversation__container"),children:[(0,c.jsx)(l,{}),(0,c.jsxs)("ol",{className:(0,i.className)("conversation"),children:[(0,c.jsx)(f.default,{children:(0,c.jsx)(g,{})}),a&&(0,c.jsx)(v,{})]})]})})]})}},8711:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(5567),o=n(7209),i=n(7844);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l({children:e,childrenHTML:t,className:n,graphicSrc:s,graphicType:c="icon",iconName:l,iconSize:u,iconClassName:p,dividerType:d}){const f=Boolean(l||s),h=t?{dangerouslySetInnerHTML:{__html:t}}:{children:e};return(0,i.jsxs)("div",{className:(0,r.className)("divider",d&&`divider--type-${d}`,n),children:[f&&(0,i.jsx)("span",{className:(0,r.className)("divider__graphic"),children:l?(0,i.jsx)(o.default,{name:l,size:u,className:p}):(0,i.jsx)("img",{src:s,className:(0,r.className)({icon:"icon"===c,avatar:"avatar"===c},p)})}),(0,i.jsx)("div",a({className:(0,r.className)("divider__body")},h))]})}},9661:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>v,useChoicePrompt:()=>b});var r=n(7210),o=n(9207),i=n(2849),s=n(5567),a=n(5740),c=n(7209),l=n(546),u=n(2108),p=n(1989),d=n(7844);const f=["event","children"];function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b=e=>{const{payload:t}=e,[n,r]=(0,o.useState)(!1),{sendAction:s,addMessageBubble:c,addDivider:l}=(0,i.useSeamlyCommands)(),{activeServiceSessionId:p}=(0,i.useSeamlyServiceInfo)(),d=(0,i.useLastMessageEventId)(),{body:f}=(0,u.useTranslatedEventData)(e),{service:h}=t,m=(0,o.useMemo)((()=>y(y({},e),{},{payload:y(y({},e.payload),{},{body:e.payload.body?.prompt,translatedBody:e.payload.translatedBody&&y(y({},e.payload.translatedBody),{},{data:e.payload.translatedBody.data.prompt})})})),[e]),b=f.chooseAgain&&p===h.serviceSessionId&&t.id!==d;return(0,o.useEffect)((()=>{r(t.id===d)}),[t,d]),{body:f,subEvent:m,showOptions:n,chooseAgain:b,onChoiceClickHandler:e=>{b&&l("new_topic"),c(e.text),s({type:a.actionTypes.pickChoice,originMessage:t.id,choice:{id:e.id,text:e.text,chooseAgain:b}}),r(!1)},onChooseAgainClickHandler:()=>{r((e=>!e))}}},v=e=>{let{event:t,children:n}=e,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,f);const{t:a}=(0,l.useI18n)(),u=(0,i.useGeneratedId)(),{body:h,subEvent:m,showOptions:v,chooseAgain:g,onChoiceClickHandler:O,onChooseAgainClickHandler:w}=b(t);return(0,d.jsxs)(d.Fragment,{children:[(0,r.toChildArray)(n).map((e=>(e.props=y(y({},e.props),{},{event:m,descriptorId:u,showTranslationToggle:!1}),e))),g&&(0,d.jsxs)("button",{type:"button",className:(0,s.className)("button","button--secondary","button--choose-again"),"aria-expanded":v?"true":"false",onClick:w,"aria-describedby":u,children:[a(v?"message.choicePrompts.cancelChooseAgain":"message.choicePrompts.chooseAgain"),(0,d.jsx)(c.default,{name:"chevronDown",size:"8"})]}),v&&(0,d.jsx)(p.default,y(y({type:"choice-prompt",showParticipant:!1,event:t},o),{},{children:(0,d.jsx)("ul",{className:(0,s.className)("choice-prompt","choice-prompt--many"),children:h.choices.map((e=>(0,d.jsx)("li",{className:(0,s.className)("choice-prompt__item",{[`choice-prompt__item--${e.category}`]:e.category}),children:(0,d.jsx)("button",{type:"button",className:(0,s.className)("button","button--primary"),onClick:()=>{O(e)},children:e.text})},e.id)))})}))]})}},36:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(9207),o=n(8711),i=n(5567),s=n(4959),a=n(546),c=n(6065);const l={month:"long",day:"numeric",year:"numeric"},u={hour:"numeric",minute:"numeric"};var p=n(5029),d=n(7844);const f=({event:e})=>{const t=(0,p.NW)(),{date:n,time:f,timeUntilMidnight:h,srText:y}=(e=>{const{t}=(0,a.useI18n)(),n=(0,c.useConfig)()?.context?.locale??[],r=new Date(e),o=new Date,i=new Date(o);i.setHours(24,0,0,0);const p=i-o,d=r.toString(),f=new Intl.DateTimeFormat(n,u).format(r);let h=(0,s.getRelativeDate)(r,o);switch(h){case"today":h=t("dateTime.today");break;case"yesterday":h=t("dateTime.yesterday");break;default:h=new Intl.DateTimeFormat(n,l).format(r)}return{date:h,srText:t("dateTime.srText",{date:h,time:f}),time:f,fullDateTime:d,timeUntilMidnight:p}})((0,s.microsecondsToMilliseconds)(e.timeIndicator));return(0,r.useEffect)((()=>{const e=setTimeout((()=>{t()}),h);return()=>{clearTimeout(e)}}),[t,h]),(0,d.jsxs)(o.Z,{dividerType:"time-indicator",children:[(0,d.jsxs)("p",{className:(0,i.className)("divider__time"),"aria-hidden":"true",children:[(0,d.jsx)("span",{children:n}),(0,d.jsx)("span",{children:f})]}),(0,d.jsx)("p",{className:(0,i.className)("visually-hidden"),children:y})]})}},7409:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(2849),o=n(5567),i=n(6065),s=n(546),a=n(7844);const c=({eventPayload:e})=>{const{t}=(0,s.useI18n)(),{fromClient:n,participant:c}=e,l=(0,r.useSeamlyParticipant)(c)||{},{messages:u}=(0,i.useConfig)(),p=n?t("participants.user.name"):l&&l.name,{showAvatar:d,showName:f}=u[n?"user":"agent"]||{};if(!d&&!f)return null;const h=[];return d&&p&&l.avatar&&h.push((0,a.jsx)("span",{className:(0,o.className)("message__avatar"),children:(0,a.jsx)("img",{src:l.avatar,className:(0,o.className)("avatar"),alt:""})})),f&&h.push((0,a.jsx)("span",{className:(0,o.className)("message__author-name"),children:p})),h.length>0&&(0,a.jsx)("div",{className:(0,o.className)("message__author"),children:h})}},5327:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5740),o=n(2849);const i=e=>{const{sendAction:t}=(0,o.useSeamlyCommands)();return n=>{n.target&&n.target.dataset.linkId&&t({type:r.actionTypes.navigate,originMessage:e,link:{id:n.target.dataset.linkId,url:n.target.getAttribute("href")}})}}},6425:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(9207),o=n(1989),i=n(2108),s=n(5327),a=n(7844);const c=["event"];function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=e=>{let{event:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,c);const{body:l}=(0,i.useTranslatedEventData)(t),p=(0,s.Z)(t.payload.id),d=(0,r.useMemo)((()=>t.payload.optimisticallyInjected?{children:(0,a.jsx)("p",{children:l.text})}:{bodyProps:{dangerouslySetInnerHTML:{__html:l.text}}}),[l,t]);return(0,a.jsx)(o.default,u(u({type:"text",event:t,onClick:p},n),d))}},1989:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5567),o=n(3357),i=n(2108),s=n(7409),a=n(7844);const c=["showParticipant","event","type","modifiers","children","bodyProps","info"];function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=function(e){let{showParticipant:t=!0,event:n,type:l,modifiers:p,children:d,bodyProps:f={},info:h}=e,y=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,c);const m=(0,o.j)(n),{hasTranslation:b,isTranslated:v,locale:g}=(0,i.useTranslatedEventData)(n);return l&&m.push(`message--type-${l}`),p&&("string"==typeof p&&(p=p.split(" ").filter((e=>e.length))),p.forEach((e=>{m.push(`message--${e}`)}))),v&&m.push("message--is-translated"),b&&m.push("message--has-translation"),v&&(f=u(u({},f),{},{lang:g})),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",u(u({className:(0,r.className)(m)},y),{},{children:[t&&(0,a.jsx)(s.default,{eventPayload:n.payload}),(0,a.jsx)("div",u(u({className:(0,r.className)("message__body")},f),{},{children:d})),h&&(0,a.jsx)("div",{"aria-hidden":"true",className:(0,r.className)("message__info"),children:h})]}))})}},6460:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(7210).createContext)(null)},2331:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SeamlyApiContext:()=>o,SeamlyEventBusContext:()=>i});var r=n(7210);const o=(0,r.createContext)(null),i=(0,r.createContext)(null)},641:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(7210).createContext)({})},8803:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SeamlyLiveRegionContext:()=>r});const r=(0,n(7210).createContext)(null)},8219:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(9207),o=n(546),i=n(5567),s=n(2849),a=n(8877),c=n(3742),l=n(7844);const u=({onOpenChat:e})=>{const{t}=(0,o.useI18n)(),n=(0,s.useGeneratedId)(),{isOpen:u}=(0,c.useVisibility)(),p=(0,r.useRef)(null),d=(0,r.useRef)(null),f=(0,r.useRef)(),h=(0,s.useSkiplinkTargetFocusing)(),y=(0,s.useFocusIfSeamlyContainedFocus)(),m=(0,s.useSeamlyCurrentAgent)(),b=(0,s.useSeamlyHeaderData)().subTitle,{hasInterrupt:v}=(0,a.useInterrupt)(),{headerCollapseButtonId:g}=(0,s.useSeamlyStateContext)(),O=m&&!v;return(0,r.useLayoutEffect)((()=>{!1===u&&!0===p.current&&y(d.current),p.current=u}),[u,y]),(0,l.jsxs)("div",{className:(0,i.className)("toggle-button"),children:[(0,l.jsxs)("div",{id:n,children:[(0,l.jsx)("p",{className:(0,i.className)("toggle-button__title"),children:t(O?"toggleButton.resumeTitle":"toggleButton.title")}),(0,l.jsx)("p",{className:(0,i.className)("toggle-button__subtitle"),children:O?b:t("toggleButton.subtitle")})]}),(0,l.jsx)("button",{type:"button","aria-labelledby":n,className:(0,i.className)("toggle-button__button"),ref:d,onMouseUp:()=>{f.current="mouse"},onKeyUp:()=>{f.current="key"},onClick:()=>{e(),"mouse"===f.current?h():"key"===f.current&&y(g)}})]})}},9104:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>re});var r=n(9207),o=n(5567),i=n(2849),s=n(5740),a=n(4959),c=n(546),l=n(1154),u=n(8956),p=n(2463),d=n(4431),f=n(7844);const h=({baseClassName:e,children:t,title:n})=>{const r=(0,i.useSkiplink)(),s=(0,i.useGeneratedId)();return(0,f.jsxs)("section",{id:r,className:(0,o.className)(e),"aria-describedby":s,tabIndex:"-1",children:[(0,f.jsx)("h2",{className:(0,o.className)(`${e}__title`),id:s,children:n}),t]})},y=()=>{const{t:e}=(0,c.useI18n)(),t=(0,u.MI)(),n=(0,p.Z)(),{emitEvent:r}=(0,d.Z)(),{isActive:i,remaining:s,timer:a,endCountdown:y}=(0,l.Z)(),m=s>0,b=e(m?"idleDetachWarning.countdownTitle":"idleDetachWarning.notifyTransferText");return(0,f.jsx)(h,{baseClassName:"idle",title:b,children:m&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:(0,o.className)("idle__count-container"),children:i&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{className:(0,o.className)("idle__count-text"),children:e("idleDetachWarning.countdownText")}),(0,f.jsx)("span",{className:(0,o.className)("idle__count-timer"),children:e("idleDetachWarning.countdownTimer",a)})]})}),(0,f.jsxs)("div",{className:(0,o.className)("idle__options"),children:[(0,f.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{n(),y(!0),t(),r("idleTimer.selectContinue")},children:e("idleDetachWarning.continueButton")}),(0,f.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{y(),t(),r("idleTimer.selectEnd")},children:e("idleDetachWarning.detachButton")})]})]})})};var m=n(1256),b=n(4809);const v=()=>{const{t:e}=(0,c.useI18n)(),t=(0,p.Z)(),{name:n}=(0,b.useSeamlyCurrentAgent)()||{},{continueChat:r,restartChat:i}=(0,m.Z)();return(0,f.jsx)(h,{baseClassName:"prompt",title:e("resumeConversationPrompt.title",{name:n}),children:(0,f.jsxs)("div",{className:(0,o.className)("prompt__options"),children:[(0,f.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{t(),r()},children:e("resumeConversationPrompt.continueButton")}),(0,f.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:i,children:e("resumeConversationPrompt.detachButton")})]})})};var g=n(6065),O=n(3742),w=n(2112),j=n(1153),S=n(6113);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const C=()=>{const{default:e,active:t,userSelected:n,options:o,optionsOverride:i}=(0,b.useSeamlyStateContext)().entryMeta,s=(0,S.useDispatch)(),a=n||t||e,c=i[a]||o[a]||{},l=(0,r.useCallback)((e=>{s((0,j.setBlockAutoEntrySwitch)(e))}),[s]),u=(0,r.useCallback)((e=>{s((0,j.setActiveEntryType)(e))}),[s]),p=(0,r.useCallback)((e=>{s((0,j.setUserEntryType)(e))}),[s]),d=(0,r.useCallback)((()=>{n?p(null):u(e)}),[n,e,p,u]);return{activeEntry:a,activeEntryOptions:c,setActiveEntryType:u,setUserEntryType:p,cancelEntrySelection:d,setBlockAutoEntrySwitch:l}};var E=n(3240),P=n.n(E),T=n(2629),N=n(7346),I=n(7929),k=n(7629),A=n(7209),D=n(6639);function R({controlName:e,skipLinkId:t}){const{t:n}=(0,c.useI18n)(),{sendAssertive:l}=(0,i.useLiveRegion)(),{emitEvent:u}=(0,i.useSeamlyCommands)(),p=(()=>{const{sendAction:e}=(0,i.useSeamlyCommands)(),{features:t}=(0,i.useSeamlyOptions)(),{typingPeekahead:n}=t||{},o=(0,r.useRef)(null),a=(0,r.useRef)(null),c=(0,r.useRef)(!1),l=(0,r.useRef)(null);(0,r.useEffect)((()=>()=>{clearInterval(l.current),clearTimeout(o.current),clearTimeout(a.current)}),[]);const u=(t,r)=>{e(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({type:s.actionTypes.typing,state:t},n&&n.enabled?{body:{currentMessage:r}}:{}))};return e=>{e.code&&"Enter"===e.code||13===e.keyCode||(c.current=!0,l.current||(u(!0,e.target.value),l.current=setInterval((()=>{c.current?n&&n.enabled&&u(!0,e.target.value):(clearInterval(l.current),l.current=null)}),w.typingTimeout)),clearTimeout(o.current),clearTimeout(a.current),o.current=setTimeout((()=>{c.current=!1}),300),a.current=setTimeout((()=>{u(!1,e.target.value)}),w.typingTimeout))}})(),{setBlockAutoEntrySwitch:d}=C(),{hasCharacterLimit:h,characterLimit:y,reachedCharacterWarning:m,reachedCharacterLimit:v,remainingChars:g}=function(e){const{t}=(0,c.useI18n)(),{sendAssertive:n}=(0,D.t)(),{hasLimit:o,limit:i}=(0,b.useEntryTextLimit)(),s=(0,r.useMemo)((()=>(0,a.debounce)(n,w.maxCharacterSrDebounceDelay)),[n]),l=(0,r.useMemo)((()=>(0,a.debounce)(((e,n)=>{e&&s(t("input.srCharacterLimitText",{limit:n}))}),w.maxCharacterSrDebounceDelay)),[s,t]),[{value:u}]=(0,N.useFormControl)(e),p=o&&u?i-u.length:i,d=!!o&&p<=w.maxCharacterWarningLimit,f=!!o&&p<0;return(0,r.useEffect)((()=>{l(d,p)}),[d,p,l]),{hasCharacterLimit:o,characterLimit:i,reachedCharacterWarning:d,reachedCharacterLimit:f,remainingChars:p}}(e),[{value:O}]=(0,N.useFormControl)(e),j=!!O,S=(0,r.useCallback)((()=>{m&&l(n("input.srCharacterLimitText",{limit:g})),u("ui.inputFocus")}),[n,l,m,g,u]),E=(0,r.useMemo)((()=>n("input.inputPlaceholder",{hasLimit:h,limit:h?y:null})),[n,h,y]),P=(0,r.useMemo)((()=>n("input.inputLabel",{hasLimit:h,limit:h?y:null})),[n,h,y]);return(0,r.useLayoutEffect)((()=>(d(j),()=>{d(!1)})),[d,j]),(0,f.jsxs)(I.Z,{className:(0,o.className)("entry-form"),disableValidationClasses:!0,noValidate:"true",children:[(0,f.jsxs)("div",{className:(0,o.className)(["input--text__container",...m&&!v?["character-warning"]:[],...v?["character-exceeded"]:[]]),children:[(0,f.jsx)(k.Z,{id:t,type:"text",name:e,className:(0,o.className)("input__text"),autocomplete:"off",placeholder:E,labelText:P,labelClass:(0,o.className)("visually-hidden"),"aria-invalid":h?v:null,onKeyUp:p,onFocus:S}),(0,f.jsx)("div",{className:(0,o.className)("character-count"),children:m&&(0,f.jsx)("span",{children:g})})]}),(0,f.jsx)("button",{className:(0,o.className)("button","input__submit"),type:"submit",onPointerDown:e=>{e.preventDefault()},"aria-disabled":!j||v?"true":null,children:(0,f.jsx)(A.default,{name:"send",size:"32",alt:n("input.sendMessage")})})]})}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F.apply(this,arguments)}const B="userText";function H(e){let t=F({},e);const{isOpen:n,setVisibility:o}=(0,O.useVisibility)(),s=(0,i.useSkiplink)(),a=(0,i.useSkiplinkTargetFocusing)(),{sendMessage:c}=(0,i.useSeamlyCommands)(),l=(0,r.useCallback)(((e,{updateControlValue:t})=>{c({body:e.userText}),t(B,""),a(),n||o(T.visibilityStates.open)}),[c,a,n,o]);return(0,f.jsx)(P(),L(L({},t),{},{formId:"textEntry",persistData:!0,onSubmit:l,children:(0,f.jsx)(R,{controlName:B,skipLinkId:s})}))}var $=n(1433);const V=()=>{const{t:e}=(0,c.useI18n)(),{showFileUpload:t,serviceAllowsUploads:n}=(0,i.useFileUploadMeta)(),[l,u]=(0,r.useState)(n),p=(0,i.useSkiplinkTargetFocusing)(),d=(0,r.useRef)(null),{setUserEntryType:h,activeEntry:y}=C(),m=(0,r.useRef)(null),{sendPolite:b}=(0,i.useLiveRegion)(),v=!!(0,i.useSeamlyCurrentAgent)();return(0,r.useEffect)((()=>{(0,a.runIfElementContainsOrHasFocus)(m.current,(()=>{n||p()})),u(n)}),[n,p]),(0,r.useEffect)((()=>{d.current&&!n&&b(e("fileUpload.srUnavailableText")),!1===d.current&&n&&b(e("fileUpload.srAvailableText")),v&&(d.current=n)}),[n,v,b,e]),!t&&y!==s.entryTypes.upload&&(0,f.jsx)($.Z,{isActive:l,transitionStartState:$.I.rendered,children:(0,f.jsx)("div",{className:(0,o.className)("upload-toggle-wrapper"),children:(0,f.jsx)($.Z,{isActive:l,transitionStartState:$.I.visuallyHidden,children:(0,f.jsx)("button",{className:(0,o.className)(["button","button--secondary","upload-toggle"]),ref:m,"aria-disabled":l?null:"true",type:"button",onClick:l?()=>{h(s.entryTypes.upload),p()}:null,children:(0,f.jsx)(A.default,{name:"file",size:"32",alt:e("fileUpload.toggleButtonText")})})})})})};var z=n(2312);const q=()=>{const{t:e}=(0,c.useI18n)(),{currentUploads:t}=(0,i.useFileUploads)();return(0,f.jsx)("div",{className:(0,o.className)("progress"),children:t.map((({id:t,name:n,progress:r,uploading:i,error:s})=>(0,f.jsxs)("div",{className:(0,o.className)("progress_container"),children:[(0,f.jsxs)("div",{className:(0,o.className)("progress__text"),children:[(0,f.jsx)("span",{className:(0,o.className)("progress__text--file-name"),children:n}),(0,f.jsx)("span",{className:(0,o.className)("progress__text--percentage"),children:`${r}%`})]}),(0,f.jsx)(z.Z,{error:s}),(0,f.jsx)("progress",{className:(0,o.className)("progress__bar"),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-label":e("fileUpload.srProgressLabel",{fileName:n}),max:"100","aria-valuenow":r,value:r,"aria-busy":i,children:`${r}%`})]},t)))})};var W=n(9141);var G=n(1442),Z=n(6273);function K({id:e,name:t,labelText:n,contentHint:s,outputText:a,accept:c}){const{isSubmitted:l}=(0,N.useFormContext)(),[u,p]=(0,r.useState)(!1),[{onInput:d,onBlur:h},{error:y}]=(0,N.useFormControl)(t),m=(0,i.useGeneratedId)(),b=(0,i.useGeneratedId)(),v=(0,i.useGeneratedId)(),g=l&&y,O=[v];s&&O.push(b),g&&O.push(m);const w=(0,r.useCallback)((()=>{p(!0)}),[p]),j=(0,r.useCallback)((()=>{p(!1),h()}),[p,h]),S=(0,r.useCallback)((e=>{const t={target:{value:e.target.files}};d(t)}),[d]);return(0,f.jsxs)("div",{className:(0,o.className)("upload__container"),children:[s&&(0,f.jsx)("span",{className:(0,o.className)("upload__content-hint"),id:b,children:s}),(0,f.jsx)(z.Z,{id:m,error:g&&y}),(0,f.jsx)("div",{className:(0,o.className)(["file-upload",...u?["focus-within"]:[]]),children:(0,f.jsxs)("label",{htmlFor:e,className:(0,o.className)("upload__label"),children:[(0,f.jsx)(A.default,{name:"upload",size:"32"}),(0,f.jsxs)("div",{children:[(0,f.jsx)("span",{className:(0,o.className)(["upload__label--text"]),children:n}),(0,f.jsx)("input",{id:e,className:(0,o.className)("upload__input"),type:"file",name:t,onChange:S,"aria-invalid":g?"true":"false","aria-describedby":O.join(" "),accept:c||null,onFocus:w,onBlur:j}),(0,f.jsx)("span",{className:(0,o.className)("upload__output"),"aria-hidden":"true",id:v,children:a})]})]})})]})}function J({skiplinkId:e,controlName:t,accept:n,contentHint:r,isUploading:i,isComplete:s,onClickCancel:a}){const{t:l}=(0,c.useI18n)(),[{value:u}]=(0,N.useFormControl)(t),p=u&&u.length>0,d=p?u[0].name:"";return(0,f.jsxs)(I.Z,{className:(0,o.className)("upload-form"),children:[(0,f.jsx)(K,{name:t,id:e,accept:n,labelText:l("fileUpload.labelText"),outputText:l("fileUpload.selectedText",{hasFile:p,filename:d}),contentHint:r}),(0,f.jsxs)("div",{className:(0,o.className)("upload__button-container"),children:[(0,f.jsx)("button",{id:i||!s?e:void 0,type:"button",onClick:a,className:(0,o.className)("button","button--secondary","upload__cancel"),children:l("fileUpload.cancelButtonText")}),(0,f.jsx)("button",{className:(0,o.className)("button","button--primary"),type:"submit",children:l("fileUpload.uploadButtonText")})]})]})}const X="fileListForm",Q="fileList",Y=()=>{const{t:e}=(0,c.useI18n)(),{sendPolite:t,sendAssertive:n}=(0,i.useLiveRegion)(),s=(0,i.useSkiplink)(),l=(0,i.useSkiplinkTargetFocusing)(),{serviceAllowsUploads:u,allowedMimeTypes:p,maxSize:d}=(0,i.useFileUploadMeta)(),h=(0,r.useRef)(null),y=(0,r.useRef)(u),{cancelEntrySelection:m}=C(),{uploadFile:b,clearUploads:v,isUploading:g,isComplete:O}=(0,i.useFileUploads)(),{hasFile:w,selectedFileName:j,uploadHandle:_,hasServerError:x,progress:E}=((e,t)=>{const n=(0,S.useSelector)((n=>(0,W.getControlValueByName)(n,{formId:e,name:t}))),{currentUploads:r}=(0,i.useFileUploads)(),o=n&&n.length>0;let s=null,a=!1,c=0;if(r&&r.length>0){const e=r[0];s=e.uploadHandle,a=!!e.error,c=e.progress}return{hasFile:o,selectedFileName:o?n[0].name:"",uploadHandle:s,hasServerError:a,progress:c}})(X,Q),T=(0,i.useGeneratedId)(),N=(0,r.useRef)(!0),I=e("fileUpload.contentHint",{size:(0,a.formatBytes)(d)}),k=(0,r.useRef)(""),A=(0,r.useRef)(null);(0,r.useEffect)((()=>{k.current&&A.current.contains(document.activeElement)&&"INPUT"===document.activeElement.tagName&&n(I),k.current=I}),[I,n]),(0,r.useEffect)((()=>{E>0&&t(1===E?e("fileUpload.srStartedText"):`${E}%`)}),[E,t,e]),(0,r.useEffect)((()=>{N.current||g||!O||(v(),m(),l(),setTimeout((()=>{t(e("fileUpload.srCompleteText"))}),300)),N.current=O}),[g,O,v,m,l,t,e]);const D=(0,r.useCallback)((({fileList:e})=>{b(e[0]),l()}),[b,!1,l]),R=(0,r.useCallback)((()=>{_&&_.abort(),v(),m(),l()}),[_,v,m,l]),M=(0,r.useMemo)((()=>({[Q]:[(0,G.T)((()=>u),e("fileUpload.errors.unavailable")),(0,G.T)(Z.IZ,e("fileUpload.errors.noFile")),(0,G.T)(Z.NO,e("fileUpload.errors.tooLarge"),d)]})),[d,u,e]);return(0,f.jsx)("div",{className:(0,o.className)(["upload",...x?["upload--error"]:[]]),ref:A,children:(0,f.jsxs)(P(),{formId:X,persistData:!0,onSubmit:D,validationSchema:M,children:[(g||!O)&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(q,{}),(0,f.jsx)("div",{className:(0,o.className)("upload__button-container"),children:(0,f.jsx)("button",{id:g||!O?s:void 0,type:"button",onClick:R,ref:h,className:(0,o.className)("button","button--secondary","upload__cancel"),children:e("fileUpload.cancelButtonText")})})]}),!g&&O&&(0,f.jsx)(J,{controlName:Q,skiplinkId:s,accept:p.join(", "),contentHint:I,isComplete:O,isUploading:g,outputText:e("fileUpload.selectedText",{hasFile:w,filename:j}),onClickCancel:R}),!y.current&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{className:(0,o.className)("notification"),id:T,children:e("fileUpload.unavailableText")}),(0,f.jsx)("div",{className:(0,o.className)("upload__button-container"),children:(0,f.jsx)("button",{id:g||!O?s:void 0,type:"button",onClick:R,className:(0,o.className)("button","button--secondary","upload__cancel"),children:e("fileUpload.cancelButtonText")})})]})]})})};function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const re=()=>{const{isOpen:e}=(0,O.useVisibility)(),t=(0,r.useRef)(null),{hasCountdown:n}=(0,i.useSeamlyIdleDetachCountdown)(),[c,l]=(0,r.useState)(n),{hasPrompt:u}=(0,i.useSeamlyResumeConversationPrompt)(),[p,d]=(0,r.useState)(u),h=(0,i.useSkiplinkTargetFocusing)(),m=(0,r.useRef)(!1),{activeEntry:b}=C(),[w,j]=(0,r.useState)({text:H,upload:Y}),[S,_]=(0,r.useState)((()=>b)),x=(0,g.useConfig)(),{accountAllowsUploads:E}=(0,i.useFileUploadMeta)(),P=(0,r.useCallback)((()=>{(0,a.runIfElementContainsOrHasFocus)(t.current,h)}),[h]);(0,r.useEffect)((()=>{const{customComponents:e}=x,{entry:t}=e||{};t&&j((e=>te(te({},e),t)))}),[x]),(0,r.useEffect)((()=>{P(),l(n),d(u)}),[n,u,P]),(0,r.useEffect)((()=>{_(b),P()}),[b,P,t]),m.current=!(!t.current||!t.current.contains(document.activeElement));const T=w[S];return(0,f.jsxs)("div",{className:(0,o.className)("chat__entry"),ref:t,children:[c&&(0,f.jsx)(y,{}),p&&(0,f.jsx)(v,{}),(0,f.jsxs)("div",{className:(0,o.className)(["entry__body",...n||u?["entry__body--hidden"]:[]]),children:[S!==s.entryTypes.upload&&E&&e&&(0,f.jsx)(V,{}),(0,f.jsx)(T,{})]})]})}},2312:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(9207),o=n(5567),i=n(7209),s=n(7844);function a({id:e,error:t}){const[n,a]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=setTimeout((()=>a(!0)),300);return()=>clearTimeout(e)}),[]),(0,s.jsx)("div",{className:(0,o.className)("error"),"aria-live":"assertive","aria-atomic":"true",children:n&&t&&(0,s.jsxs)("span",{id:e,className:(0,o.className)("error__message"),children:[(0,s.jsx)(i.default,{name:"error",size:"16"}),t]})})}},7929:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(7346),o=n(5567),i=n(7844);const s=["className","disableValidationClasses"];function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=function(e){let{className:t,disableValidationClasses:n}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,s);const{handleSubmit:u,isValid:p,isSubmitted:d}=(0,r.useForm)(),f=["form"];return!n&&d&&(f.push("form--submitted"),p?f.push("form--valid"):f.push("form--invalid")),(0,i.jsx)("form",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({onSubmit:u,className:(0,o.className)([...f,t])},l))}},7629:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(7346),o=n(3224),i=n(7844);const s=["id","name","type","labelText","labelClass","contentHint","aria-describedby"];function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=function(e){let{id:t,name:n,type:a,labelText:l,labelClass:u,contentHint:p,"aria-describedby":d}=e,f=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,s);const{isSubmitted:h}=(0,r.useFormContext)(),[y,{error:m}]=(0,r.useFormControl)(n),b=h&&m,v=[];return d&&v.push(d),p&&v.push(`${t}-content-hint`),b&&v.push(`${t}-error`),(0,i.jsx)(o.Z,{id:t,contentHint:p,validity:!b,errorText:m,labelText:l,labelClass:u,children:(0,i.jsx)("input",c(c({id:t,name:n,type:a,"aria-invalid":b?"true":"false","aria-describedby":v.join(" ")||null},y),f))})}},3224:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(5567),o=n(2312),i=n(7844);const s=({contentHint:e,id:t,labelText:n,labelClass:s=(0,r.className)("label"),validity:a,errorText:c,children:l})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("label",{htmlFor:t,className:s,children:n}),e&&(0,i.jsx)("span",{id:`${t}-content-hint`,className:(0,r.className)("input__content-hint"),children:e}),(0,i.jsx)(o.Z,{id:`${t}-error`,error:!a&&c}),l]})},5663:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(2849),o=n(5567),i=n(546),s=n(8877),a=n(6065),c=n(3742),l=n(7209),u=n(7844);const p=()=>{const{t:e}=(0,i.useI18n)(),{title:t,subTitle:n}=(0,r.useSeamlyHeaderData)(),p=(0,r.useSeamlyUnreadCount)(),{isOpen:d}=(0,c.useVisibility)(),f=(0,r.useSeamlyCurrentAgent)(),{hasInterrupt:h}=(0,s.useInterrupt)(),y=(0,a.useStartChatIcon)(),m=f?.avatar??y,b=h?"":n,v=["message-count"];return d&&v.push("message-count__hide"),0===p&&v.push("message-count__empty"),(b||!d)&&(0,u.jsxs)("div",{className:(0,o.className)("agent-info"),children:[(0,u.jsxs)("div",{className:(0,o.className)("agent-info__graphic"),children:[m?(0,u.jsx)("img",{className:(0,o.className)(f?.avatar?"avatar":"icon"),src:m,alt:""}):(0,u.jsx)(l.default,{name:"avatar",size:"32"}),(0,u.jsx)("span",{className:(0,o.className)(v),"aria-hidden":"true",children:p})]}),(0,u.jsxs)("div",{className:(0,o.className)("agent-info__body"),children:[(0,u.jsx)("p",{className:(0,o.className)("agent-info__heading"),children:t??e("header.title")}),(0,u.jsx)("p",{className:(0,o.className)("agent-info__text"),children:b})]})]})}},142:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>W});var r=n(5567),o=n(2849),i=n(7210),s=n(9207),a=n(546),c=n(7209),l=n(1433),u=n(4959),p=n(8956),d=n(7844);const f=({className:e,children:t,onCancel:n,headingText:i,cancelButtonText:a,disableButtonFocusing:l,cancelButtonRef:p,position:f="right"})=>{const h=(0,s.useRef)(null),y=(0,o.useGeneratedId)(),{hideOption:m}=(0,o.useSeamlyOptions)(),{focusButton:b}=(0,o.useOptionButton)();return(0,s.useEffect)((()=>{(0,u.focusElement)(h.current)}),[]),(0,d.jsx)("section",{className:(0,r.className)("options",{"options--right":"left"!==f,"options--left":"left"===f},e),"aria-labelledby":y,tabIndex:"-1",ref:h,children:(0,d.jsxs)("div",{className:(0,r.className)("options__body"),children:[(0,d.jsx)("h2",{id:y,className:(0,r.className)("options__title"),children:i}),(0,d.jsxs)("button",{type:"button",onClick:()=>{n&&n(),m(),l||b()},"aria-describedby":y,className:(0,r.className)("button","options__close"),ref:e=>{p&&(p.current=e)},children:[(0,d.jsx)(c.default,{name:"close",size:"16"}),(0,d.jsx)("span",{children:a})]}),(0,d.jsx)("div",{className:(0,r.className)("options__wrapper"),children:t})]})})};var h=n(5740),y=n(3240),m=n.n(y),b=n(1442),v=n(6273),g=n(7929),O=n(7629);function w({controlName:e,describedById:t}){const{t:n}=(0,a.useI18n)();return(0,d.jsxs)(g.Z,{noValidate:"true",className:(0,r.className)("options__form"),children:[(0,d.jsx)(O.Z,{name:e,type:"email",className:(0,r.className)("transcript__input"),"aria-describedby":t,labelClass:(0,r.className)("label"),labelText:n("options.sendTranscript.label")}),(0,d.jsx)("div",{className:(0,r.className)("options__actions"),children:(0,d.jsx)("button",{type:"submit",className:(0,r.className)("button","button--primary","options__submit"),children:n("options.sendTranscript.sendButtonText")})})]})}const j="email",S={sendTranscript:()=>{const[e,t]=(0,s.useState)(void 0),{hideOption:n}=(0,o.useSeamlyOptions)(),{focusButton:i}=(0,o.useOptionButton)(),{t:c}=(0,a.useI18n)(),l=(0,o.useGeneratedId)(),{sendAction:u}=(0,o.useSeamlyCommands)(),p=(0,s.useMemo)((()=>({[j]:[(0,b.T)(v.OP,c("options.sendTranscript.noEmailText")),(0,b.T)(v.nE,c("options.sendTranscript.invalidEmailText"))]})),[c]),y=(0,s.useCallback)((e=>{const t=e.email.trim();u({type:h.actionTypes.sendTranscript,body:{emailAddress:t}}),n(),i()}),[u,n,i]),g=(0,s.useCallback)((({isValid:e,isSubmitted:n})=>{t(n&&!e?"options--error":void 0)}),[t]);return(0,d.jsxs)(f,{className:e,headingText:c("options.sendTranscript.title"),cancelButtonText:c("options.cancelButtonText"),children:[(0,d.jsx)("p",{className:(0,r.className)("options__description"),id:l,children:c("options.sendTranscript.description")}),(0,d.jsx)(m(),{formId:"sendTranscript",onSubmit:y,validationSchema:p,onError:g,children:(0,d.jsx)(w,{controlName:j,describedById:l})})]})}},_=()=>{const{optionActive:e}=(0,o.useSeamlyOptions)(),t=(0,s.useRef)(null),n=S[e||t.current];return e&&(t.current=e),n?(0,d.jsx)(n,{}):null},x=()=>{const{t:e}=(0,a.useI18n)(),{menuOptions:t,showOption:n,panelActive:f,hideOption:h}=(0,o.useSeamlyOptions)(),{id:y}=(0,o.useOptionButton)(),m=(0,s.useRef)(null),[b,v]=(0,s.useState)(!1),g=(0,s.useRef)(null),O=t.length,w=(0,s.useRef)(Array.from({length:O},(()=>(0,i.createRef)()))),j=(0,s.useRef)(!1),S=O>1,x=t[0],C=(0,s.useMemo)((()=>x?.name?.trim().replace(/\s+/g,"")),[x]);return(0,s.useEffect)((()=>()=>{clearTimeout(m.current)}),[]),(0,s.useEffect)((()=>{b&&!j.current&&requestAnimationFrame((async()=>{await(0,p.Vs)(60);const e=t.findIndex((e=>e.available)),n=-1===e?0:e;(0,u.focusElement)(w.current[n])})),j.current=b}),[b,t]),O?(0,d.jsxs)("div",{className:(0,r.className)("options__container"),onKeyDown:e=>{b&&((0,u.getKey)(e)===u.keyNames.Escape&&(v(!1),(0,u.focusElement)(g.current)),(0,u.getKey)(e)===u.keyNames.Home&&((0,u.focusElement)(w.current[0]),e.preventDefault()),(0,u.getKey)(e)===u.keyNames.End&&((0,u.focusElement)(w.current[O-1]),e.preventDefault()))},onfocusout:()=>{S&&(m.current=setTimeout((()=>{v(!1)}),200))},onfocusin:()=>{clearTimeout(m.current)},children:[(0,d.jsx)(l.Z,{transitionStartState:l.I.notRendered,isActive:f,children:(0,d.jsx)("div",{className:(0,r.className)("options__dialog"),children:(0,d.jsx)(_,{})})}),S&&(0,d.jsx)(l.Z,{isActive:b,transitionStartState:l.I.notRendered,children:(0,d.jsx)("ul",{className:(0,r.className)(["options__menu"]),role:"menu",tabIndex:"-1","aria-labelledby":y,children:t.map((({name:o,title:i,available:s},a)=>(0,d.jsx)("li",{className:(0,r.className)("options__menu__item"),role:"menuitem","data-testid":o,children:(0,d.jsxs)("button",{type:"button",ref:e=>{w.current[a]=e},className:(0,r.className)(["button","button--secondary"]),onKeyDown:e=>((e,t)=>{if((0,u.getKey)(e)===u.keyNames.ArrowDown){const n=Math.min(O-1,t+1);(0,u.focusElement)(w.current[t===n?0:n]),e.preventDefault()}if((0,u.getKey)(e)===u.keyNames.ArrowUp){const n=Math.max(0,t-1);(0,u.focusElement)(w.current[t===n?O-1:n]),e.preventDefault()}})(e,a),onKeyPress:e=>((e,n)=>{const r=String.fromCharCode(e.charCode);if(1!==r.length||!r.match(/\S/))return;let o=-1;t.forEach(((e,t)=>{t>n&&e.title.charAt(0).toLowerCase()===r.toLowerCase()&&-1===o&&(o=t)})),-1!==o&&(0,u.focusElement)(w.current[o])})(e,a),onClick:()=>((e,t)=>{t&&(v(!1),n(e))})(o,s),"aria-disabled":s?null:"true",children:[(0,d.jsxs)("span",{className:(0,r.className)("button__text"),children:[i,!s&&" "]}),!s&&(0,d.jsx)("span",{className:(0,r.className)("button__state"),children:e("options.unavailableText")})]})},o)))})}),(0,d.jsxs)("button",{type:"button",className:(0,r.className)(["button","button--secondary","chat__options__button",...!S&&C?[`chat__options__button--${C}`]:[]]),id:y,onClick:()=>{f&&h(),S?v((e=>!e)):x.available&&n(x.name)},onKeyDown:S?e=>{(0,u.getKey)(e)===u.keyNames.ArrowDown&&(v(!0),e.preventDefault())}:null,ref:g,"aria-haspopup":S?"menu":null,"aria-expanded":S?b.toString():null,"aria-disabled":S||x.available?null:"true",children:[S&&(0,d.jsx)(c.default,{name:"options",size:"32"}),(0,d.jsx)("span",{className:(0,r.className)("button__text"),children:S?e("options.openButtonText"):`${x.title}${x.available?"":" "}`}),!S&&!x.available&&(0,d.jsx)("span",{className:(0,r.className)("button__state"),children:e("options.unavailableText")})]})]}):null};var C=n(2108),E=n(7346),P=n(3224);const T=["id","name","labelText","labelClass","contentHint","aria-describedby","options"];function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const A=e=>{let{id:t,name:n,labelText:r,labelClass:o,contentHint:i,"aria-describedby":s,options:a=[]}=e,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,T);const{isSubmitted:l}=(0,E.useFormContext)(),[u,{error:p}]=(0,E.useFormControl)(n),f=l&&p,h=[];return s&&h.push(s),i&&h.push(`${t}-content-hint`),f&&h.push(`${t}-error`),(0,d.jsx)(P.Z,{id:t,contentHint:i,validity:!f,errorText:p,labelText:r,labelClass:o,children:(0,d.jsx)("select",I(I(I({id:t,name:n,"aria-invalid":f?"true":"false","aria-describedby":h.join(" ")||null},u),c),{},{children:a.map((e=>(0,d.jsx)("option",{value:e.value,children:e.label},e.value)))}))})},D=function({controlName:e,descriptionId:t}){const{t:n}=(0,a.useI18n)(),{isActive:o,languages:i,currentLocale:c}=(0,C.useTranslations)(),{locale:l}=(0,a.useI18n)(),u=(0,C.useLocaleNativeName)(c),p=(0,s.useMemo)((()=>[{value:"",label:n("translations.settings.defaultOptionLabel")},...i.filter((e=>e.locale.toLowerCase()!==String(l).toLowerCase())).map((e=>({value:e.locale,label:e.nativeName})))]),[n,i,l]);return(0,d.jsxs)(g.Z,{noValidate:"true",className:(0,r.className)("options__form"),children:[(0,d.jsx)("p",{className:(0,r.className)("options__description"),id:t,children:n("translations.settings.description")}),o?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h3",{children:n("translations.settings.currentTranslationLabel")}),(0,d.jsx)("p",{className:(0,r.className)("options__active-language"),children:u})]}):(0,d.jsx)(A,{name:e,type:"text",className:(0,r.className)("input__select"),"aria-describedby":t,labelClass:(0,r.className)("label"),labelText:n("translations.settings.inputLabel"),options:p,defaultValue:c||""}),(0,d.jsx)("div",{className:(0,r.className)("options__actions"),children:(0,d.jsx)("button",{type:"submit",className:(0,r.className)("button","button--primary","options__submit"),children:n(o?"translations.settings.endButtonText":"translations.settings.startButtonText")})})]})},R="translation-settings",M="locale",L=function({onClose:e}){const[t,n]=(0,s.useState)(void 0),{t:r}=(0,a.useI18n)(),{isActive:i,enableTranslations:c,disableTranslations:l}=(0,C.useTranslations)(),u=(0,o.useGeneratedId)(),{focusContainer:p}=(0,C.useTranslationsContainer)(),h=(0,s.useCallback)((({isValid:e,isSubmitted:t})=>{n(t&&!e?"options--error":void 0)}),[n]),y=(0,s.useRef)(0),g=(0,s.useMemo)((()=>(y.current+=1,i?{}:{[M]:(0,b.T)(v.OP,r("translations.settings.noLocaleText"))})),[i,r]);return(0,d.jsx)(f,{className:t,onCancel:e,formName:R,headingText:r("translations.settings.title"),cancelButtonText:r("translations.settings.cancelButtonText"),position:"left",disableButtonFocusing:!0,children:(0,d.jsx)(m(),{onSubmit:({locale:t})=>{i?l():(c(t),e(),p())},formId:R,validationSchema:g,onError:h,children:(0,d.jsx)(D,{controlName:M,descriptionId:u})},y.current)})};function U(){const{t:e,locale:t}=(0,a.useI18n)(),[n,i]=(0,s.useState)(!1),p=(0,s.useRef)(null),f=(0,o.useGeneratedId)(),h=(0,C.useLocaleNativeName)(t);return(0,d.jsxs)("div",{className:(0,r.className)("translations__container"),onKeyDown:e=>{n&&(0,u.getKey)(e)===u.keyNames.Escape&&(i(!1),(0,u.focusElement)(p.current))},children:[(0,d.jsx)(l.Z,{transitionStartState:l.I.notRendered,isActive:n,children:(0,d.jsx)("div",{className:(0,r.className)("options__dialog"),role:"dialog",children:(0,d.jsx)(L,{onClose:()=>{i(!1)}})})}),(0,d.jsxs)("button",{type:"button",className:(0,r.className)(["button","button--secondary","chat__options__button"]),id:f,onClick:()=>{i((e=>!e))},onKeyDown:e=>{(0,u.getKey)(e)===u.keyNames.ArrowDown&&(i(!0),e.preventDefault())},ref:p,"aria-haspopup":"dialog","aria-expanded":n.toString(),children:[(0,d.jsx)(c.default,{name:"newTranslation",size:"16"}),(0,d.jsx)("span",{className:(0,r.className)("button__text"),children:e("translations.settings.openButtonText",{hasLanguage:!!h,language:h})})]})]})}function F(){const{menuOptions:e,allowOptionSelection:t}=(0,o.useSeamlyOptions)(),{isAvailable:n}=(0,C.useTranslations)();return n||t&&e.length?(0,d.jsxs)("div",{className:(0,r.className)("chat__options"),children:[n&&(0,d.jsx)("div",{className:(0,r.className)("chat__options-item","chat__options-item--left"),children:(0,d.jsx)(U,{})}),t&&(0,d.jsx)("div",{className:(0,r.className)("chat__options-item","chat__options-item--right"),children:(0,d.jsx)(x,{})})]}):null}var B=n(8877),H=n(3742);function $({id:e,label:t,onButtonClick:n,buttonText:i,srButtonText:s,type:a}){const c=(0,o.useGeneratedId)();return(0,d.jsxs)("section",{className:(0,r.className)("chat-status",a&&`chat-status--${a}`),id:e,tabIndex:"-1","aria-labelledby":c,children:[(0,d.jsx)("h2",{className:(0,r.className)("chat-status__title"),id:c,children:t}),(0,d.jsxs)("button",{type:"button",className:(0,r.className)("button","button--tertiary"),onClick:n,children:[(0,d.jsx)("span",{"aria-hidden":s?"true":void 0,children:i}),s&&(0,d.jsx)("span",{className:(0,r.className)("visually-hidden"),children:s})]})]})}function V(){const{t:e}=(0,a.useI18n)(),{id:t}=(0,C.useTranslationsContainer)(),{hasInterrupt:n}=(0,B.useInterrupt)(),{isActive:r,disableTranslations:i,currentLocale:c}=(0,C.useTranslations)(),l=(0,C.useLocaleNativeName)(c),u=(0,o.useSkiplinkTargetFocusing)(),p=(0,s.useCallback)((()=>{i(),u()}),[i,u]);return!r||n?null:(0,d.jsx)($,{type:"translations",id:t,label:e("translations.status.label",{language:l}),onButtonClick:p,buttonText:e("translations.status.stopText"),srButtonText:e("translations.status.srStopText")})}function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const W=function({children:e,interruptComponent:t}){const{hasInterrupt:n,meta:o}=(0,B.useInterrupt)(),{isOpen:i}=(0,H.useVisibility)();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(V,{}),(0,d.jsx)("div",{className:(0,r.className)("chat__container"),children:n?i?(0,d.jsx)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){q(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},o)):null:e}),i&&(0,d.jsx)(F,{})]})}},1474:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(9279),o=n(6065),i=n(546),s=n(3742);const a=require("preact/compat");var c=n(5567),l=n(4809),u=n(3357),p=n(2629),d=n(1581),f=n(7844);const h=(0,a.forwardRef)((({children:e,className:t=""},n)=>{const{isOpen:a,isVisible:h,setVisibility:y}=(0,s.useVisibility)(),{namespace:m,layoutMode:b}=(0,o.useConfig)(),{isInline:v}=(0,l.useSeamlyLayoutMode)(),g=(0,u.P)(),O=(0,r.h)(),{t:w}=(0,i.useI18n)(),j=["chat",`chat--layout-${b}`,`namespace--${m}`,...g,t];return a||"app"===b||j.push("chat--collapsed"),O&&j.push("chat--user-responded"),h&&(0,f.jsxs)("section",{className:(0,c.className)(j),onKeyDown:e=>{(e.code&&"Escape"===e.code||27===e.keyCode)&&!v&&a&&y(p.visibilityStates.minimized)},tabIndex:"-1",ref:n,"aria-label":w("chat.srLabel"),children:[(0,f.jsx)("div",{className:(0,c.className)("chat-wrapper"),children:e}),"inline"===b&&a&&(0,f.jsx)(d.Z,{isAside:!0})]})}))},2494:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(9207),o=n(5567),i=n(546),s=n(2849),a=n(7209),c=n(7844);const l=({children:e,onCloseChat:t})=>{const{headerCollapseButtonId:n}=(0,s.useSeamlyStateContext)(),l=(0,r.useRef)(null),{t:u}=(0,i.useI18n)();return(0,c.jsxs)("header",{className:(0,o.className)("chat__header"),children:[e,(0,c.jsx)("div",{className:(0,o.className)("header-controls"),children:(0,c.jsx)("button",{type:"button",className:(0,o.className)("button","header-controls__collapse"),onClick:t,ref:l,id:n,children:(0,c.jsx)(a.default,{name:"chevronDown",size:"32",alt:u("header.collapseApp")})})})]})}},7209:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5567),o=n(7844);const i={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 version="1.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 32 32" enable-background="new 0 0 32 32" xml:space="preserve">\n<path fill="#4A48C1" d="M10,14.8c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S11.1,14.8,10,14.8z M15.9,14.8c1.1,0,2-0.9,2-2s-0.9-2-2-2\n\ts-2,0.9-2,2S14.8,14.8,15.9,14.8z M21.8,10.8c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S22.9,10.8,21.8,10.8z M21.3,18.1H10.7\n\tC11.7,23.9,20.2,23.9,21.3,18.1z"/>\n</svg>\n',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'},s=({name:e,size:t="32",className:n,alt:s})=>{const a=`${e}${t}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{"aria-hidden":"true",className:n||(0,r.className)("icon"),dangerouslySetInnerHTML:{__html:i[a]}}),s&&(0,o.jsx)("span",{className:(0,r.className)("visually-hidden"),children:s})]})}},9965:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(9207),o=n(5567),i=n(2849),s=n(7844);const a=({originalError:e,title:t,message:n,buttonText:a,action:c,srText:l})=>{const u=(0,i.useSeamlyCommands)(),p=(0,i.useGeneratedId)(),{sendPolite:d}=(0,i.useLiveRegion)(),f=(0,i.useSkiplinkTargetFocusing)(),h="SeamlySessionExpiredError"===e.name;return(0,r.useEffect)((()=>{h&&u[c]()}),[c,u,h]),(0,r.useEffect)((()=>{!h&&l&&setTimeout((()=>{d(l)}),200)}),[d,l,h]),h?(0,s.jsx)(s.Fragment,{}):(0,s.jsx)("section",{className:(0,o.className)("interrupt"),"aria-labelledby":p,children:(0,s.jsxs)("div",{className:(0,o.className)("interrupt__body"),children:[(0,s.jsx)("h2",{id:p,className:(0,o.className)("interrupt__title"),children:t}),(0,s.jsx)("p",{className:(0,o.className)("interrupt__message"),children:n}),a&&c&&(0,s.jsx)("div",{className:(0,o.className)("interrupt__actions"),children:(0,s.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{u[c](),f()},children:a})})]})})}},1581:(e,t,n)=>{"use strict";n.d(t,{Z:()=>_});var r=n(9279),o=n(6065),i=n(546),s=n(8877),a=n(2108),c=n(2629),l=n(3742),u=n(5567),p=n(9207),d=n(2841),f=n(1433),h=n(8956),y=n(6639),m=n(4809),b=n(4431),v=n(1154),g=n(1256),O=n(5029),w=n(4959),j=n(5740),S=n(7844);const _=({isAside:e=!1})=>{const{isInline:t}=(0,m.useSeamlyLayoutMode)(),{t:n}=(0,i.useI18n)(),{sendAction:_,addMessageBubble:x}=(0,b.Z)(),{isOpen:C,setVisibility:E}=(0,l.useVisibility)(),{showSuggestions:P}=(0,o.useConfig)(),T=(0,O.I8)(),N=(0,h.MI)(),I=(0,p.useRef)(null),{sendPolite:k}=(0,y.t)(),{hasInterrupt:A}=(0,s.useInterrupt)(),{hasCountdown:D,endCountdown:R}=(0,v.Z)(),{hasPrompt:M,continueChat:L}=(0,g.Z)(),U=(0,r.h)(),F=(0,m.useSeamlyServiceData)("suggestion"),{body:B}=(0,a.useTranslatedEventData)({payload:F}),H=(0,p.useMemo)((()=>F&&!A?B:[]),[F,A,B]),$=(0,p.useRef)(null),V=(0,p.useRef)(!1),z=(0,p.useRef)([]),q=!!H.length,W=t?(U||C)&&!e:U,G=(0,p.useRef)(W),Z=q&&!W&&P,K=q?H:z.current;z.current=K;const J=(0,p.useMemo)((()=>{const t=["suggestions"];return e&&t.push("suggestions--aside"),(0,u.className)(t)}),[e]),X=(0,p.useCallback)((({id:e,question:t})=>{D&&R(!0),M&&L(),_({type:j.actionTypes.custom,originMessage:F.id,body:{type:"faqclick",body:{faqId:e,faqQuestion:t}}}),x(t),C||E(c.visibilityStates.open),N()}),[x,L,R,N,D,M,F,_,E,C]);(0,p.useEffect)((()=>{if($.current!==H&&!W){if(q){const e=V.current?n("suggestions.srUpdatedText"):n("suggestions.srAvailableText");setTimeout((()=>{k(e)}),30)}else V.current&&k(n("suggestions.srUnavailableText"));$.current=H}!G.current&&W?((0,w.runIfElementContainsOrHasFocus)(I.current,N),k(n("suggestions.srUnavailableText"))):!q&&V.current&&(0,w.runIfElementContainsOrHasFocus)(I.current,N),V.current=q,G.current=W}),[H,q,W,N,k,n]);const Q=n("suggestions.headingText"),Y=n("suggestions.footerText"),ee=Q?"section":"div";return(0,S.jsx)(f.Z,{isActive:Z,transitionStartState:f.I.notRendered,children:(0,S.jsxs)(ee,{className:J,"aria-labelledby":Q?T:null,ref:I,children:[Q&&(0,S.jsx)("p",{id:T,className:(0,u.className)("suggestions__heading"),children:Q}),!!K.length&&(0,S.jsx)(d.Z,{suggestions:K,onClickSuggestion:X}),Y&&!C&&(0,S.jsx)("p",{className:(0,u.className)("suggestions__footer"),children:Y})]})})}},2841:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(5567),o=n(9207),i=n(7209),s=n(7844);const a=e=>`suggestions__item--${String(e).toLowerCase().replace(/[^a-z0-9_\\-]/,"")}`,c=({id:e,categories:t=[],question:n,onClick:c,hasIcon:l})=>{const u=(0,o.useMemo)((()=>["suggestions__item",...t.map(a)]),[t]),p=(0,o.useCallback)((()=>{c&&c({id:e,question:n})}),[e,n,c]);return(0,s.jsx)("li",{className:(0,r.className)(u),children:(0,s.jsxs)("button",{type:"button",onClick:p,className:(0,r.className)("button","button--primary"),children:[l&&(0,s.jsx)(i.default,{name:"chevronRight",size:"8"}),n]})})};function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=({className:e,suggestions:t=[],onClickSuggestion:n,hasIcon:o=!0})=>(0,s.jsx)("ul",{className:(0,r.className)("suggestions__list",e),children:t.map((e=>(0,s.jsx)(c,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({hasIcon:o,onClick:n},e),e.id)))})},2718:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>F});var r=n(3742),o=n(9279),i=n(6065),s=n(546),a=n(2629),c=n(5567),l=n(9207),u=n(7209),p=n(5740),d=n(4959),f=n(4431),h=n(4809),y=n(5029),m=n(8956),b=n(6639),v=n(1154),g=n(1256),O=n(1433),w=n(2108),j=n(8877),S=n(7844);const _=["categories"];function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const P=()=>{const{t:e}=(0,s.useI18n)(),{sendAction:t,addMessageBubble:n}=(0,f.Z)(),r=(0,y.I8)(),i=(0,m.MI)(),{sendPolite:a}=(0,b.t)(),{hasInterrupt:x}=(0,j.useInterrupt)(),{hasCountdown:E,endCountdown:P}=(0,v.Z)(),{hasPrompt:T,continueChat:N}=(0,g.Z)(),I=(0,h.useSeamlyServiceData)("suggestion"),{body:k}=(0,w.useTranslatedEventData)({payload:I}),A=(0,l.useMemo)((()=>(I&&!x?k:[]).map((e=>{let{categories:t=[]}=e;return C(C({},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,_)),{},{categories:t,classNames:["faqs__item",...t.map((e=>`faqs__item--${String(e).toLowerCase().replace(/[^a-z0-9_\\-]/,"")}`))]})}))),[I,x,k]),D=(0,l.useRef)(null),R=(0,l.useRef)(!1),{isInline:M}=(0,h.useSeamlyLayoutMode)(),L=(0,o.h)(),U=!M&&L,F=(0,l.useRef)(U),B=!!A.length,H=B&&!U,$=(0,l.useRef)([]),V=B?A:$.current;$.current=V;const z=(0,l.useRef)(null);(0,l.useEffect)((()=>{if(D.current!==A&&!U){if(B){const t=R.current?e("faq.srUpdatedText"):e("faq.srAvailableText");setTimeout((()=>{a(t)}),30)}else R.current&&a(e("faq.srUnavailableText"));D.current=A}!F.current&&U?((0,d.runIfElementContainsOrHasFocus)(z.current,i),a(e("faq.srUnavailableText"))):!B&&R.current&&(0,d.runIfElementContainsOrHasFocus)(z.current,i),R.current=B,F.current=U}),[B,A,U,i,a,e]);const q=e("faq.headingText"),W=q?"section":"div";return(0,S.jsx)(O.Z,{isActive:H,transitionStartState:O.I.notRendered,children:(0,S.jsxs)(W,{className:(0,c.className)("faqs"),"aria-labelledby":q?r:null,ref:z,children:[q&&(0,S.jsx)("h2",{id:r,className:(0,c.className)("faqs__heading"),children:q}),!!V.length&&(0,S.jsx)("ul",{className:(0,c.className)("faqs__list"),children:V.map((e=>(0,S.jsx)("li",{className:(0,c.className)(e.classNames),children:(0,S.jsxs)("button",{type:"button",onClick:()=>{(({id:e,question:r})=>{E&&P(!0),T&&N(),t({type:p.actionTypes.custom,originMessage:I.id,body:{type:"faqclick",body:{faqId:e,faqQuestion:r}}}),n(r),i()})(e)},className:(0,c.className)("button","button--secondary"),children:[(0,S.jsx)(u.default,{name:"chevronRight",size:"8"}),e.question]})},e.id.toString())))})]})})};var T=n(2849);const N=({children:e})=>{const[,t]=(0,T.useSeamlyContainerElement)(),{isOpen:n,isVisible:u,setVisibility:p}=(0,r.useVisibility)(),{zIndex:d,showFaq:f,layoutMode:h}=(0,i.useConfig)(),{isInline:y}=(0,T.useSeamlyLayoutMode)(),m=(0,T.useSeamlyAppContainerClassNames)(),b=(0,o.h)(),{locale:v}=(0,s.useI18n)(),g=(0,l.useCallback)((e=>{t(e)}),[t]),O=(0,l.useMemo)((()=>{if(v&&document.querySelector("html").getAttribute("lang")!==v)return v}),[v]),w=["app","app--deprecated",...m];return n||"window"!==h||w.push("app--collapsed"),b&&w.push("app--user-responded"),w.push(`app--layout-${h}`),u&&(0,S.jsxs)("section",{className:(0,c.className)(w),onKeyDown:e=>{(e.code&&"Escape"===e.code||27===e.keyCode)&&!y&&n&&p(a.visibilityStates.minimized)},lang:O,tabIndex:"-1",ref:g,style:{zIndex:d},"data-nosnippet":!0,children:[(0,S.jsx)("div",{className:(0,c.className)("app-wrapper"),children:e}),f&&(0,S.jsx)(P,{})]})};var I=n(142),k=n(5663),A=n(2494),D=n(2212),R=n(9104),M=n(9965),L=n(8219);const U=({children:e})=>{const{showInlineView:t,containerRef:n}=(0,r.useShowInlineView)();return(0,S.jsx)("div",{ref:n,children:t&&e})},F=()=>{const{isVisible:e}=(0,r.useVisibility)(),{openChat:t,closeChat:n}=(0,T.useSeamlyChat)();return e&&(0,S.jsx)(U,{children:(0,S.jsxs)(N,{children:[(0,S.jsx)(L.default,{onOpenChat:t}),(0,S.jsx)(A.default,{onCloseChat:n,children:(0,S.jsx)(k.default,{})}),(0,S.jsxs)(I.default,{interruptComponent:M.default,children:[(0,S.jsx)(D.default,{}),(0,S.jsx)(R.default,{})]})]})})}},9180:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>R});var r=n(9279),o=n(9207),i=n(3742),s=n(8956),a=n(6065),c=n(3357),l=n(546),u=n(1474),p=n(9965),d=n(2212),f=n(9104),h=n(142),y=n(4956),m=n(7844);var b=n(5567),v=n(8877),g=n(2562);function O({event:e}){const[t]=(0,g.Z)(e);return(0,m.jsx)(t,{event:e})}function w(){const{preChatEvents:e,layoutMode:t}=(0,a.useConfig)(),{hasInterrupt:n}=(0,v.useInterrupt)(),{isOpen:r}=(0,i.useVisibility)(),o=!(n||!e?.length||r);return o&&(0,m.jsx)("ul",{className:(0,b.className)("pre-chat-messages",`pre-chat-messages--${t}`),"aria-hidden":!o,children:e.map((e=>(0,m.jsx)("li",{className:(0,b.className)("pre-chat-messages__message"),children:(0,m.jsx)(O,{event:e})},e.payload.id)))})}var j=n(1581),S=n(1433);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C=n(2849),E=n(6425),P=n(7209);const T=({onClick:e})=>{const{t}=(0,l.useI18n)(),n=(0,o.useCallback)((()=>e()),[e]);return(0,m.jsx)("button",{type:"button",className:(0,b.className)("button","collapse-button"),onClick:n,children:(0,m.jsx)(P.default,{name:"chevronDown",size:"32",alt:t("window.srCollapseButton")})})};var N=n(6591),I=n(4809);const k=()=>{const e=(0,a.useStartChatIcon)(),t=(0,I.useSeamlyCurrentAgent)(),{hasInterrupt:n}=(0,v.useInterrupt)(),r=t&&!n,o=r?t.avatar:e;return o?(0,m.jsx)("img",{className:(0,b.className)(r?"avatar":"icon"),src:o,alt:""}):(0,m.jsx)(P.default,{name:"avatar",size:"32"})},A=({onClick:e})=>{const t=(0,N.iW)(),{t:n}=(0,l.useI18n)(),r=t()?n("window.openButton.srContinue"):n("window.openButton.srStart"),a=(0,s.MI)(),{isOpen:c}=(0,i.useVisibility)(),u=(0,I.useSeamlyUnreadCount)(),p=(0,o.useCallback)((()=>{e(),a()}),[a,e]);return(0,m.jsx)(S.Z,{isActive:!c,transitionStartState:S.I.rendered,children:(0,m.jsxs)("button",{className:(0,b.className)("window-open-button"),"aria-label":r,"aria-hidden":c,onClick:p,children:[(0,m.jsx)("span",{className:(0,b.className)("message-count"),"aria-hidden":"true",children:!!u&&u}),(0,m.jsx)(k,{})]})})},D={app:()=>((0,y.Z)(),(0,m.jsx)(u.default,{children:(0,m.jsxs)(h.default,{interruptComponent:p.default,children:[(0,m.jsx)(d.default,{}),(0,m.jsx)(f.default,{})]})})),inline:()=>{(0,y.Z)();const{showInlineView:e,containerRef:t}=(0,i.useShowInlineView)(),{isOpen:n}=(0,i.useVisibility)(),{hasInterrupt:r,meta:o}=(0,v.useInterrupt)();return r&&!n?(0,m.jsx)(p.default,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},o)):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(S.Z,{isActive:!n,transitionStartState:S.I.rendered,children:(0,m.jsxs)("div",{ref:t,className:(0,b.className)("unstarted-wrapper","unstarted-wrapper--inline"),children:[(0,m.jsx)(w,{}),(0,m.jsx)(j.Z,{})]})}),(0,m.jsx)(S.Z,{isActive:n,transitionStartState:S.I.rendered,children:(0,m.jsx)(u.default,{ref:t,children:e&&(0,m.jsxs)(h.default,{interruptComponent:p.default,children:[n&&(0,m.jsx)(d.default,{}),(0,m.jsx)(f.default,{})]})})})]})},window:()=>{const{openChat:e,closeChat:t}=(0,C.useSeamlyChat)(),{isOpen:n}=(0,i.useVisibility)(),s=(0,r.h)(),{t:a}=(0,l.useI18n)(),c=a("window.chat.continue"),y=(0,o.useMemo)((()=>({payload:{body:{text:c}}})),[c]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(A,{onClick:e}),(0,m.jsx)(S.Z,{isActive:!n&&!s,transitionStartState:S.I.rendered,children:(0,m.jsx)("div",{className:(0,b.className)("unstarted-wrapper","unstarted-wrapper--window"),children:(0,m.jsx)(w,{})})}),(0,m.jsx)(S.Z,{isActive:!n&&s,transitionStartState:S.I.notRendered,children:(0,m.jsx)("div",{className:(0,b.className)("unstarted-wrapper","unstarted-wrapper--window","unstarted-wrapper--continue"),children:(0,m.jsx)(E.default,{event:y})})}),(0,m.jsx)(S.Z,{isActive:n,transitionStartState:S.I.notRendered,children:(0,m.jsxs)(u.default,{children:[n&&(0,m.jsx)(T,{onClick:t}),(0,m.jsxs)(h.default,{interruptComponent:p.default,children:[(0,m.jsx)(d.default,{}),(0,m.jsx)(f.default,{})]})]})})]})}},R=({children:e})=>{const[,t]=(0,s.dW)(),{namespace:n,layoutMode:u,zIndex:p}=(0,a.useConfig)(),{isOpen:d,isVisible:f}=(0,i.useVisibility)(),h=(0,c.P)(),y=(0,r.h)(),{locale:v}=(0,l.useI18n)(),g=D[u],O=(0,o.useCallback)((e=>{t(e)}),[t]),w=(0,o.useMemo)((()=>{if(v&&document.querySelector("html").getAttribute("lang")!==v)return v}),[v]);if(!g)return console.warn('"layoutMode" should be one of "app", "inline" or "window"'),null;const j=["app",`app--layout-${u}`,`namespace--${n}`,...h];return d||"app"===u||j.push("app--collapsed"),y&&j.push("app--user-responded"),f&&(0,m.jsx)("div",{className:(0,b.className)(j),lang:w,tabIndex:"-1","data-nosnippet":!0,style:{zIndex:p},ref:O,children:e||(0,m.jsx)(g,{})})}},1433:(e,t,n)=>{"use strict";n.d(t,{I:()=>u,Z:()=>p});var r=n(7210),o=n(9207),i=n(2849),s=n(5567),a=n(2112);const c={visible:(0,s.className)("transition--visible"),in:(0,s.className)("transition--in"),visuallyHidden:(0,s.className)("visually-hidden")},l=Object.values(c),u={notRendered:"notRendered",rendered:"rendered",visuallyHidden:"visuallyHidden"},p=({children:e,isActive:t,timeout:n,transitionStartState:s=u.notRendered,onInTransitionComplete:p,onOutTransitionComplete:d})=>{const f=(0,o.useRef)(!1),h=n?parseInt(n,10):a.defaultTransitionTimeMs,y=(0,i.useStableCallback)(p),m=(0,i.useStableCallback)(d),b=s===u.visuallyHidden,[v,g]=(0,o.useState)((()=>b?[c.visuallyHidden]:[])),O="notRendered"!==s||v.length>0;return(0,o.useEffect)((()=>{let e=null,n=null;return f.current&&!t&&(g([c.visible]),e=setTimeout((()=>{g([...b?[c.visuallyHidden]:[]]),m&&(n=requestAnimationFrame((()=>{m()})))}),h)),!f.current&&t&&(g([c.visible]),n=requestAnimationFrame((()=>{n=requestAnimationFrame((()=>{g([c.visible,c.in]),y&&(e=setTimeout((()=>{y()}),h))}))}))),f.current=t,()=>{clearTimeout(e),cancelAnimationFrame(n)}}),[t,b,h,y,m]),O&&(0,r.toChildArray)(e).map((e=>{const{className:t=""}=e.props,n=t.split(" ").filter((e=>!l.includes(e)));return(0,r.cloneElement)(e,{className:[...n,...v].join(" ")})}))}},3357:(e,t,n)=>{"use strict";n.d(t,{P:()=>o,j:()=>i});var r=n(6065);const o=()=>(0,r.useConfig)().appContainerClassNames,i=e=>{const{fromClient:t}=e.payload,n=["message"];return"info"===e.type?n.push("message--source-info"):t?n.push("message--source-user"):n.push("message--source-agent"),n}},8956:(e,t,n)=>{"use strict";n.d(t,{CE:()=>f,MI:()=>d,Vs:()=>c,aJ:()=>p,dW:()=>u});var r=n(1153),o=n(9207),i=n(6113),s=n(4959),a=n(4809);const c=(e=0)=>new Promise((t=>{setTimeout(t,e)})),l=e=>{requestAnimationFrame((async()=>{await c(180);const t="string"==typeof e?document.getElementById(e):e;(0,s.focusElement)(t)}))},u=()=>{const{seamlyContainerElement:e}=(0,a.useSeamlyStateContext)(),t=(0,i.useDispatch)();return[e,(0,o.useCallback)((e=>{t((0,r.setSeamlyContainerElement)(e))}),[t])]},p=e=>(0,o.useCallback)((()=>{l(e)}),[e]),d=()=>{const e=(0,a.useSkiplink)();return p(e)},f=()=>{const e=(0,o.useRef)(null),[t]=u();return e.current=t,(0,o.useCallback)((t=>{(0,s.runIfElementContainsOrHasFocus)(e.current,(()=>{l(t)}))}),[])}},6639:(e,t,n)=>{"use strict";n.d(t,{a:()=>s,t:()=>a});var r=n(9207),o=n(8803),i=n(5740);const s=()=>(0,r.useContext)(o.SeamlyLiveRegionContext),a=()=>{const e=s();return{sendPolite:(0,r.useCallback)((t=>{t&&e({ariaLive:i.ariaLiveLevels.polite,messageText:t})}),[e]),sendAssertive:(0,r.useCallback)((t=>{t&&e({ariaLive:i.ariaLiveLevels.assertive,messageText:t})}),[e])}}},6591:(e,t,n)=>{"use strict";n.d(t,{Af:()=>a,eu:()=>s,iW:()=>c,jM:()=>i});var r=n(9207),o=n(2331);const i=()=>(0,r.useContext)(o.SeamlyApiContext),s=()=>i().store||{},a=()=>{const{get:e}=s();return e?e("conversationUrl"):null},c=()=>{const e=i();return(0,r.useCallback)((()=>e.hasConversation()),[e])}},2849:(e,t,n)=>{"use strict";n.r(t),n.d(t,{useElementFocusingById:()=>i.aJ,useEntryTextLimit:()=>u.useEntryTextLimit,useEvents:()=>u.useEvents,useFileUploadMeta:()=>h,useFileUploads:()=>y,useFocusIfSeamlyContainedFocus:()=>i.CE,useForceUpdate:()=>P.NW,useGeneratedId:()=>P.I8,useLastMessageEventId:()=>u.useLastMessageEventId,useLiveRegion:()=>m.t,useOptionButton:()=>j,useSeamlyActivityEventHandler:()=>S.Z,useSeamlyApiContext:()=>o.jM,useSeamlyAppContainerClassNames:()=>s.P,useSeamlyChat:()=>_.Z,useSeamlyCommands:()=>x.Z,useSeamlyContainerElement:()=>i.dW,useSeamlyConversationUrl:()=>o.Af,useSeamlyCurrentAgent:()=>u.useSeamlyCurrentAgent,useSeamlyEventStream:()=>T,useSeamlyHeaderData:()=>u.useSeamlyHeaderData,useSeamlyIdleDetachCountdown:()=>C.Z,useSeamlyIsHistoryLoaded:()=>u.useSeamlyIsHistoryLoaded,useSeamlyIsLoading:()=>u.useSeamlyIsLoading,useSeamlyLayoutMode:()=>u.useSeamlyLayoutMode,useSeamlyLiveRegionContext:()=>m.a,useSeamlyMessageContainerClassNames:()=>s.j,useSeamlyOptions:()=>w,useSeamlyParticipant:()=>u.useSeamlyParticipant,useSeamlyResumeConversationPrompt:()=>E.Z,useSeamlyServiceData:()=>u.useSeamlyServiceData,useSeamlyServiceInfo:()=>u.useSeamlyServiceInfo,useSeamlyStateContext:()=>u.useSeamlyStateContext,useSeamlyUnreadCount:()=>u.useSeamlyUnreadCount,useSkiplink:()=>u.useSkiplink,useSkiplinkTargetFocusing:()=>i.MI,useStableCallback:()=>P.R9});var r=n(9207),o=n(6591),i=n(8956),s=n(3357),a=n(1153),c=n(6113),l=n(641),u=n(4809);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const h=()=>{const{showFileUpload:e,entryMeta:{options:t,optionsOverride:n},options:{features:{uploads:r}}}=(0,u.useSeamlyStateContext)(),{allowedMimeTypes:o,maxSize:i}=n.upload||{},{enabled:s,enabledFromEntry:a}=r||{},{allowedMimeTypes:c,maxSize:l}=d(d(d({},t.upload||{allowedMimeTypes:[],maxSize:0}),o?{allowedMimeTypes:o}:{}),i?{maxSize:i}:{});return{showFileUpload:e,accountAllowsUploads:!!r,serviceAllowsUploads:a||s,allowedMimeTypes:c,maxSize:l}},y=()=>{const{currentUploads:e}=(0,u.useSeamlyStateContext)(),t=(0,c.useDispatch)(),n=(0,r.useContext)(l.Z);return{uploadFile:(0,r.useCallback)((e=>{n(e)}),[n]),clearUploads:(0,r.useCallback)((()=>{t((0,a.clearAllUploads)())}),[t]),currentUploads:e,isUploading:e.some((e=>e.uploading)),isComplete:e.every((e=>e.complete))}};var m=n(6639),b=n(546);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const w=()=>{const{t:e}=(0,b.useI18n)(),{options:t}=(0,u.useSeamlyStateContext)(),{panelActive:n,optionActive:i,userSelectedOptions:s,features:l}=t,{cobrowsing:p,sendTranscript:d}=l,f={cobrowsing:p,sendTranscript:d},h=Object.keys(f).filter((e=>f[e])).map((t=>({name:t,title:e(`options.${t}.menuTitle`),available:f[t].enabled}))),y=p||d,m=(0,c.useDispatch)(),{get:v,set:O}=(0,o.eu)();return{allowOptionSelection:y,userSelectedOptions:s,features:l,menuOptions:h,initUserSelectedOptions:(0,r.useCallback)((()=>{const e=v("options")||{};m((0,a.setUserSelectedOptions)(e))}),[v,m]),setUserSelectedOptions:(0,r.useCallback)((e=>{m((0,a.setUserSelectedOptions)(e)),O("options",e)}),[O,m]),setUserSelectedOption:(0,r.useCallback)(((e,t)=>{const n=v("options")||{};O("options",g(g({},n),{},{[e]:t})),m((0,a.setUserSelectedOption)({option:e,value:t}))}),[m,v,O]),showOption:e=>{m((0,a.showOption)(e))},hideOption:()=>{m((0,a.hideOption)())},panelActive:n,optionActive:i}},j=()=>{const{optionsButtonId:e}=(0,u.useSeamlyStateContext)();return{id:e,focusButton:(0,i.aJ)(e)}};var S=n(2463),_=n(4956),x=n(4431),C=n(1154),E=n(1256),P=n(5029);const T=(e,t)=>{const n=(0,o.jM)();(0,r.useEffect)((()=>{n.stream&&(t?n.stream().filter(t).subscribe({next:e}):n.stream().subscribe({next:e}))}),[n,e,t])}},4809:(e,t,n)=>{"use strict";n.r(t),n.d(t,{selectEventIds:()=>b,selectEvents:()=>y,selectEventsWithSuggestion:()=>h,selectState:()=>d,useEntryTextLimit:()=>I,useEvents:()=>m,useEventsIds:()=>v,useLastMessageEventId:()=>E,useLoadedImageEventIds:()=>j,useSeamlyCurrentAgent:()=>T,useSeamlyHeaderData:()=>O,useSeamlyIsHistoryLoaded:()=>P,useSeamlyIsLoading:()=>g,useSeamlyLayoutMode:()=>k,useSeamlyParticipant:()=>_,useSeamlyServiceData:()=>N,useSeamlyServiceInfo:()=>x,useSeamlyStateContext:()=>f,useSeamlyUnreadCount:()=>w,useSkiplink:()=>S});var r=n(4788),o=n(4959),i=n(573),s=n(5865),a=n(6065),c=n(6113);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=({state:e})=>e,f=()=>(0,c.useSelector)(d),h=(0,i.createSelector)(d,r.selectConfig,s.selectUserHasResponded,(({events:e,serviceData:t},n,r)=>{if(r||"inline"===n.layoutMode||!t?.suggestion||!t?.suggestion?.body.length)return e;const o={type:"service_data",payload:t.suggestion};return[...e,o]})),y=(0,i.createSelector)(h,r.selectConfig,((e,t)=>{const{enabled:n,threshold:r}=t?.messages?.timeIndicator??{};if(!n)return e;const i=[];let s=null;return e.forEach(((e,t)=>{if(0===t)i.push(u(u({},e),{},{timeIndicator:e.payload.occurredAt}));else{const t=s&&(0,o.microsecondsToMilliseconds)(e.payload.occurredAt-s.payload.occurredAt)>=r?e.payload.occurredAt:void 0;i.push(u(u({},e),{},{timeIndicator:t}))}s=e})),i})),m=()=>(0,c.useSelector)(y),b=(0,i.createSelector)(y,(e=>e.map((e=>e.payload.id)))),v=()=>(0,c.useSelector)(b),g=()=>f().isLoading,O=()=>f().headerTitles,w=()=>f().unreadEvents,j=()=>f().loadedImageEventIds,S=()=>f().skiplinkTargetId,_=e=>f().participantInfo.participants[e],x=()=>f().serviceInfo,C=(0,i.createSelector)(y,(e=>{const t=e.filter((e=>"message"===e.type));return t[t.length-1]?.payload.id})),E=()=>(0,c.useSelector)(C),P=()=>f().historyLoaded,T=()=>{const{participants:e,currentAgent:t}=f().participantInfo;return t?e[t]:null},N=e=>f().serviceData[e],I=()=>{const{entryMeta:{options:{text:e},optionsOverride:{text:t}}}=f(),{limit:n}=t||e||{limit:null};return{hasLimit:null!==n,limit:null!==n?n:null}},k=()=>{const{layoutMode:e}=(0,a.useConfig)();return{isInline:"inline"===e,isWindow:"window"===e,isResolving:!e}}},2562:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9207),o=n(5423),i=n(5740);const s=e=>{const t=(0,r.useContext)(o.Z);let n=null;e.payload.type===i.payloadTypes.choicePrompt&&(n=t[e.type][e.payload.body.prompt.type]);const s=t[e.type][e.payload.type]||t.fallback;return[s&&"function"!=typeof s?s[e.payload.body.type]||t.fallback:s,n]}},2463:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9207),o=n(6460);const i=()=>(0,r.useContext)(o.Z)},4956:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(546),o=n(1153),i=n(2629),s=n(3742),a=n(9207),c=n(6113),l=n(3489),u=n(6639),p=n(6591),d=n(4809),f=n(4431);const h=()=>{const e=(0,d.useEvents)(),{t}=(0,r.useI18n)(),{isInline:n,isWindow:h}=(0,d.useSeamlyLayoutMode)(),{isOpen:y,isVisible:m,setVisibility:b}=(0,s.useVisibility)(),v=(0,c.useSelector)(l.selectShowInlineView),g=(0,c.useDispatch)(),O=(0,a.useRef)(null),{start:w,connect:j,apiConfigReady:S,apiConnected:_}=(0,f.Z)(),x=(0,p.iW)(),C=(0,a.useRef)(null),E=(0,a.useRef)(null),P=(0,a.useRef)(!1),{sendAssertive:T}=(0,u.t)();(0,a.useEffect)((()=>{m&&setTimeout((()=>{T(t("window.srTexts.onLoad"))}),500)}),[m,T,t]),(0,a.useEffect)((()=>{if(m!==E.current)return C.current=y,void(E.current=m);null!==C.current&&T(t(y?"window.srTexts.onOpen":"window.srTexts.onClose")),C.current=y,E.current=m}),[y,m,T,t]),(0,a.useEffect)((()=>(O.current=setTimeout((()=>{g((0,o.setIsLoading)(!0))}),500),()=>{clearTimeout(O.current)})),[g]),(0,a.useEffect)((()=>(e.length&&(O.current=setTimeout((()=>{g((0,o.setIsLoading)(!1))}),5e3)),()=>{clearTimeout(O.current)})),[e,g]),(0,a.useEffect)((()=>{S&&_||(P.current=!1)}),[S,_]);const N=(0,a.useCallback)((async()=>{_||await j(),(y||m&&n)&&(w(),P.current=!0)}),[_,j,n,y,m,w]);return(0,a.useEffect)((()=>{!S||P.current||h&&!y&&!x()||n&&!v||(x()&&y&&(clearTimeout(O.current),g((0,o.setIsLoading)(!1))),N())}),[S,N,g,x,n,y,h,v]),{openChat:()=>{b(i.visibilityStates.open)},closeChat:()=>{b(i.visibilityStates.minimized)}}}},4431:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(2112),o=n(9279),i=n(4134),s=n(5150),a=n(6065),c=n(5560),l=n(1153),u=n(2629),p=n(3742),d=n(9643),f=n(9207),h=n(6113),y=n(2331),m=n(5740),b=n(6591),v=n(4809);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const j=()=>{const e=(0,b.jM)(),t=(0,a.useConfig)(),n=(0,h.useDispatch)(),g=(0,f.useContext)(y.SeamlyEventBusContext),w=(0,o.h)(),j=(0,b.iW)(),{visible:S,setVisibility:_}=(0,p.useVisibility)(),x=(0,v.useSeamlyUnreadCount)(),C=(0,f.useCallback)(((...e)=>{g.emit(...e)}),[g]),E=(0,f.useCallback)((()=>{e.sendContext(t.context||{}),C("ui.beforeStart",{visibility:S,hasConversation:j(),hasResponded:w,unreadMessageCount:x}),e.send("start"),C("ui.start",{visibility:S,hasConversation:j(),hasResponded:w,unreadMessageCount:x})}),[e,t.context,C,j,w,x,S]),P=(0,f.useCallback)((async()=>{n(i.resetApp())}),[n]),T=(0,f.useCallback)((e=>({type:e,id:(0,d.randomId)(),transactionId:(0,d.randomId)(),participant:r.userParticipantId,fromClient:!0,occurredAt:1e3*Date.now(),meta:{}})),[]),N=(0,f.useCallback)((e=>O(O({},T("text")),{},{body:{text:e}})),[T]),I=(0,f.useCallback)((({body:t,config:r={}})=>{if(""===t.trim())return;const o=O(O({},N(t)),r);e.send("message",o),C("message",o),n((0,l.addEvent)({type:"message",payload:O(O({},o),{},{optimisticallyInjected:!0})}))}),[e,n,C,N]),k=(0,f.useCallback)((e=>{n((0,l.addEvent)({type:"message",payload:N(e)}))}),[n,N]),A=(0,f.useCallback)(((e,t,o,i,s,a,c)=>{n((0,l.addEvent)({type:"message",payload:{type:"upload",id:e,transactionId:t,participant:r.userParticipantId,fromClient:!0,occurredAt:o,meta:{},body:{contentType:i,filename:s,filesize:a,url:c}}}))}),[n]),D=(0,f.useCallback)((e=>{const t={body:{subtype:e,type:"divider"},fromClient:!1,fromHistory:!0,id:(0,d.randomId)(),transactionId:(0,d.randomId)(),type:"divider"};n((0,l.addEvent)({type:"info",payload:t}))}),[n]),R=(0,f.useCallback)((t=>{if(!t)return;e.send("action",t);const{type:n}=t;n!==m.actionTypes.typing&&n!==m.actionTypes.read&&C(`action.${n}`,t)}),[e,C]),M=(0,f.useCallback)((t=>{e.sendContext(t)}),[e]);return{connect:(0,f.useCallback)((()=>e.connected?Promise.reject(new Error("The API is already connected")):e.connect().then((e=>{e&&(n((0,l.setInitialState)(e)),e.userResponded&&(n((0,s.setHasResponded)(e.userResponded)),_(u.visibilityStates.open)))})).catch((e=>{n((0,c.setInterrupt)({name:e.name,message:e.message,langKey:e.langKey,originalEvent:e.originalEvent,originalError:e.originalError}))}))),[e,n,_]),start:E,sendMessage:I,sendAction:R,sendContext:M,reset:P,emitEvent:C,addMessageBubble:k,addUploadBubble:A,addDivider:D,apiConnected:e.connected,apiConfigReady:e.configReady}}},1154:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(2112),o=n(546),i=n(3742),s=n(1153),a=n(9207),c=n(6113),l=n(4959),u=n(5740),p=n(6639),d=n(4809),f=n(4431);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b=()=>{const e=(0,c.useDispatch)(),{idleDetachCountdown:t}=(0,d.useSeamlyStateContext)(),{isOpen:n}=(0,i.useVisibility)(),h=(0,a.useRef)({});h.current={hasCountdown:t.hasCountdown,isActive:t.isActive,remaining:t.remaining,wasStopped:t.wasStopped,isOpen:n};const{emitEvent:m,sendAction:b}=(0,f.Z)(),{t:v}=(0,o.useI18n)(),{sendAssertive:g,sendPolite:O}=(0,p.t)(),w=(0,a.useCallback)((e=>{const{isOpen:t}=h.current;t&&g(e)}),[g]),j=(0,a.useCallback)((e=>{const{isOpen:t}=h.current;t&&O(e)}),[O]),S=(0,a.useCallback)((t=>{const n=(0,l.millisecondsToSeconds)(t),r=(0,l.getTimeFromSeconds)(n);e((0,s.initIdleDetachCountdown)({delaySeconds:n,delayTime:r})),m("idleTimer.start"),w(`${v("idleDetachWarning.countdownTitle")} ${v("idleDetachWarning.countdownText")} ${v("idleDetachWarning.countdownTimer",r)}`)}),[e,m,w,v]),_=(0,a.useCallback)(((t,n)=>{const{hasCountdown:r,wasStopped:o}=h.current;r&&(t||(n||b({type:u.actionTypes.detachService}),w(v("idleDetachWarning.notifyTransferText"))),o||m("idleTimer.stop"),e((0,s.clearIdleDetachCountdown)()))}),[e,b,m,w,v]),x=(0,a.useCallback)((()=>{const{remaining:t}=h.current;if(t<=0)return;const n=t-1;n%r.screenReaderDebounceDelaySeconds==0&&w(`${v("idleDetachWarning.countdownText")} ${v("idleDetachWarning.countdownTimer",(0,l.getTimeFromSeconds)(n))}`),e((0,s.decrementIdleDetachCountdownCounter)())}),[e,w,v]),C=(0,a.useCallback)((()=>{const{isActive:t,remaining:n}=h.current;t&&(e((0,s.stopIdleDetachCountdownCounter)()),n&&(m("idleTimer.stop"),j(v("idleDetachWarning.srCountDownStoppedText"))))}),[e,m,j,v]);return y(y({},t),{},{initCountdown:S,endCountdown:_,decrementCountdown:x,stopCountdown:C})}},1256:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(546),o=n(1153),i=n(6113),s=n(5740),a=n(6639),c=n(4809),l=n(4431);const u=()=>{const e=(0,i.useDispatch)(),t=(0,c.useSeamlyStateContext)().resumeConversationPrompt,{sendAction:n}=(0,l.Z)(),{t:u}=(0,r.useI18n)(),{sendAssertive:p}=(0,a.t)();return{continueChat:()=>{n({type:s.actionTypes.dismiss,body:{type:s.dismissTypes.resumeConversationPrompt}}),e((0,o.clearResumeConversationPrompt)())},hasPrompt:t,restartChat:()=>{p(u("resumeConversationPrompt.srNotifyRestartText")),n({type:s.actionTypes.detachService}),e((0,o.clearResumeConversationPrompt)())}}}},5029:(e,t,n)=>{"use strict";n.d(t,{I8:()=>s,NW:()=>i,R9:()=>a});var r=n(9643),o=n(9207);const i=()=>{const[e,t]=(0,o.useReducer)((e=>e+1),0);return(0,o.useCallback)((()=>{setTimeout((()=>{t()}))}),[])},s=()=>{const[e]=(0,o.useState)((()=>(0,r.randomId)()));return e},a=e=>{const t=(0,o.useRef)(null);t.current=e;const n="function"==typeof e;return(0,o.useMemo)((()=>n?(...e)=>t.current(...e):void 0),[n])}},1442:(e,t,n)=>{"use strict";n.d(t,{T:()=>r});const r=(e,t,n=null)=>({fn:e,errorText:t,compareValue:n})},4959:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t),n.d(t,{closestElement:()=>c,createAriaHider:()=>l,debounce:()=>s,elementMatch:()=>a,focusElement:()=>O,formatBytes:()=>h,getKey:()=>g,getRelativeDate:()=>j,getTimeFromSeconds:()=>f,getUrlParams:()=>y,getUrlSearchString:()=>m,keyCodes:()=>b,keyNames:()=>v,microsecondsToMilliseconds:()=>d,millisecondsToSeconds:()=>p,omit:()=>_,pick:()=>S,propIsTrue:()=>u,runIfElementContainsOrHasFocus:()=>w});const s=(e,t)=>{let n;return function(...r){let o=!1;return clearTimeout(n),n=setTimeout((()=>{n=null,o||e.apply(this,r),o=!1}),t),t=>{o=!0,t&&e.apply(this,r)}}},a=(e,t)=>{if(e.matches)e.matches(t);else{if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}return!1},c=(e,t)=>{if(e.closest)return e.closest(t);let n=e;do{if(a(n,t))break;n=n.parentElement||n.parentNode}while(null!==n&&1===n.nodeType);return null!==n&&1===n.nodeType?n:null},l=()=>{const e=[],t=[];return document.querySelectorAll('body > *:not([role="dialog"])').forEach((n=>{const r=n.getAttribute("aria-hidden");null!==r&&"false"!==r||(e.push(r),t.push(n),n.setAttribute("aria-hidden","true"))})),()=>{t.forEach(((t,n)=>{const r=e[n];null===r?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",r)}))}},u=e=>"true"===e||!0===e,p=e=>Math.ceil(e/1e3),d=e=>Math.ceil(e/1e3),f=e=>{const t=Math.floor(e/60);return{minutes:t,seconds:e-60*t}},h=(e,t=2)=>{if(0===e)return"0 Bytes";const n=t<0?0:t,r=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/1024**r).toFixed(n))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}`},y=()=>{const{search:e}=window.location;return e?e.slice(e.indexOf("?")+1).split("&").reduce(((e,t)=>{const[n,r]=t.split("=");return o(o({},e),{},{[n]:decodeURIComponent(r)})}),{}):{}},m=e=>Object.keys(e).reduce(((t,n)=>`${t}${t?"&":""}${n}=${encodeURIComponent(e[n])}`),""),b={27:"Escape",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown"},v={Escape:"Escape",End:"End",Home:"Home",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown"},g=e=>e.code?v[e.code]:b[e.keyCode],O=e=>{e&&e.focus()},w=(e,t)=>{e&&(e.contains(document.activeElement)||e===document.activeElement)&&t()},j=(e,t)=>{const n=new Date(t).setHours(0,0,0,0),r=e.getTime(),o=864e5;return r>=n+o?e:r>n?"today":r>n-o?"yesterday":e},S=(e,t)=>t.reduce(((t,n)=>(n in e&&(t[n]=e[n]),t)),{}),_=(e,t)=>Object.keys(e).reduce(((n,r)=>(t.includes(r)||(n[r]=e[r]),n)),{})},6273:(e,t,n)=>{"use strict";n.d(t,{IZ:()=>o,NO:()=>r,OP:()=>s,nE:()=>i});const r=(e,t)=>{let n=!0;for(let r=0;r<e.length;r++)e[r].size>t&&(n=!1);return n},o=e=>!!e?.length>0,i=e=>{const t=e&&e.trim();return!(!t||!t.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))},s=e=>!!e},1924:(e,t,n)=>{"use strict";var r=n(210),o=n(5559),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},5559:(e,t,n)=>{"use strict";var r=n(8612),o=n(210),i=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),a=o("%Reflect.apply%",!0)||r.call(s,i),c=o("%Object.getOwnPropertyDescriptor%",!0),l=o("%Object.defineProperty%",!0),u=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var t=a(r,s,arguments);if(c&&l){var n=c(t,"length");n.configurable&&l(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var p=function(){return a(r,i,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},8767:e=>{function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}},4289:(e,t,n)=>{"use strict";var r=n(2215),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,s=Array.prototype.concat,a=Object.defineProperty,c=n(1044)(),l=a&&c,u=function(e,t,n,r){var o;(!(t in e)||"function"==typeof(o=r)&&"[object Function]"===i.call(o)&&r())&&(l?a(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},p=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=s.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a<i.length;a+=1)u(e,i[a],t[i[a]],n[i[a]])};p.supportsDescriptors=!!l,e.exports=p},4445:e=>{e.exports=s,s.default=s,s.stable=u,s.stableStringify=u;var t="[...]",n="[Circular]",r=[],o=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,n,s){var a;void 0===s&&(s=i()),c(e,"",0,[],void 0,0,s);try{a=0===o.length?JSON.stringify(e,t,n):JSON.stringify(e,d(t),n)}catch(e){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 a}function a(e,t,n,i){var s=Object.getOwnPropertyDescriptor(i,n);void 0!==s.get?s.configurable?(Object.defineProperty(i,n,{value:e}),r.push([i,n,t,s])):o.push([t,n,e]):(i[n]=e,r.push([i,n,t]))}function c(e,r,o,i,s,l,u){var p;if(l+=1,"object"==typeof e&&null!==e){for(p=0;p<i.length;p++)if(i[p]===e)return void a(n,e,r,s);if(void 0!==u.depthLimit&&l>u.depthLimit)return void a(t,e,r,s);if(void 0!==u.edgesLimit&&o+1>u.edgesLimit)return void a(t,e,r,s);if(i.push(e),Array.isArray(e))for(p=0;p<e.length;p++)c(e[p],p,p,i,e,l,u);else{var d=Object.keys(e);for(p=0;p<d.length;p++){var f=d[p];c(e[f],f,p,i,e,l,u)}}i.pop()}}function l(e,t){return e<t?-1:e>t?1:0}function u(e,t,n,s){void 0===s&&(s=i());var a,c=p(e,"",0,[],void 0,0,s)||e;try{a=0===o.length?JSON.stringify(c,t,n):JSON.stringify(c,d(t),n)}catch(e){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 a}function p(e,o,i,s,c,u,d){var f;if(u+=1,"object"==typeof e&&null!==e){for(f=0;f<s.length;f++)if(s[f]===e)return void a(n,e,o,c);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==d.depthLimit&&u>d.depthLimit)return void a(t,e,o,c);if(void 0!==d.edgesLimit&&i+1>d.edgesLimit)return void a(t,e,o,c);if(s.push(e),Array.isArray(e))for(f=0;f<e.length;f++)p(e[f],f,f,s,e,u,d);else{var h={},y=Object.keys(e).sort(l);for(f=0;f<y.length;f++){var m=y[f];p(e[m],m,f,s,e,u,d),h[m]=e[m]}if(void 0===c)return h;r.push([c,o,e]),c[o]=h}s.pop()}}function d(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(o.length>0)for(var r=0;r<o.length;r++){var i=o[r];if(i[1]===t&&i[0]===n){n=i[2],o.splice(r,1);break}}return e.call(this,t,n)}}},7648:e=>{"use strict";var t="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,r=Object.prototype.toString,o="[object Function]";e.exports=function(e){var i=this;if("function"!=typeof i||r.call(i)!==o)throw new TypeError(t+i);for(var s,a=n.call(arguments,1),c=function(){if(this instanceof s){var t=i.apply(this,a.concat(n.call(arguments)));return Object(t)===t?t:this}return i.apply(e,a.concat(n.call(arguments)))},l=Math.max(0,i.length-a.length),u=[],p=0;p<l;p++)u.push("$"+p);if(s=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(c),i.prototype){var d=function(){};d.prototype=i.prototype,s.prototype=new d,d.prototype=null}return s}},8612:(e,t,n)=>{"use strict";var r=n(7648);e.exports=Function.prototype.bind||r},210:(e,t,n)=>{"use strict";var r,o=SyntaxError,i=Function,s=TypeError,a=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var l=function(){throw new s},u=c?function(){try{return l}catch(e){try{return c(arguments,"callee").get}catch(e){return l}}}():l,p=n(1405)(),d=Object.getPrototypeOf||function(e){return e.__proto__},f={},h="undefined"==typeof Uint8Array?r:d(Uint8Array),y={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":p?d([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%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%":f,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p?d(d([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&p?d((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?d((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p?d(""[Symbol.iterator]()):r,"%Symbol%":p?Symbol:r,"%SyntaxError%":o,"%ThrowTypeError%":u,"%TypedArray%":h,"%TypeError%":s,"%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},m=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(n=d(o.prototype))}return y[t]=n,n},b={"%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"]},v=n(8612),g=n(7642),O=v.call(Function.call,Array.prototype.concat),w=v.call(Function.apply,Array.prototype.splice),j=v.call(Function.call,String.prototype.replace),S=v.call(Function.call,String.prototype.slice),_=v.call(Function.call,RegExp.prototype.exec),x=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,E=function(e){var t=S(e,0,1),n=S(e,-1);if("%"===t&&"%"!==n)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var r=[];return j(e,x,(function(e,t,n,o){r[r.length]=n?j(o,C,"$1"):t||e})),r},P=function(e,t){var n,r=e;if(g(b,r)&&(r="%"+(n=b[r])[0]+"%"),g(y,r)){var i=y[r];if(i===f&&(i=m(r)),void 0===i&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===_(/^%?[^%]*%?$/g,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=E(e),r=n.length>0?n[0]:"",i=P("%"+r+"%",t),a=i.name,l=i.value,u=!1,p=i.alias;p&&(r=p[0],w(n,O([0,1],p)));for(var d=1,f=!0;d<n.length;d+=1){var h=n[d],m=S(h,0,1),b=S(h,-1);if(('"'===m||"'"===m||"`"===m||'"'===b||"'"===b||"`"===b)&&m!==b)throw new o("property names with quotes must have matching quotes");if("constructor"!==h&&f||(u=!0),g(y,a="%"+(r+="."+h)+"%"))l=y[a];else if(null!=l){if(!(h in l)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(c&&d+1>=n.length){var v=c(l,h);l=(f=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:l[h]}else f=g(l,h),l=l[h];f&&!u&&(y[a]=l)}}return l}},1221:e=>{"use strict";"undefined"!=typeof self?e.exports=self:"undefined"!=typeof window?e.exports=window:e.exports=Function("return this")()},2503:(e,t,n)=>{"use strict";var r=n(4289),o=n(1221),i=n(2168),s=n(9471),a=i(),c=function(){return a};r(c,{getPolyfill:i,implementation:o,shim:s}),e.exports=c},2168:(e,t,n)=>{"use strict";var r=n(1221);e.exports=function(){return"object"==typeof n.g&&n.g&&n.g.Math===Math&&n.g.Array===Array?n.g:r}},9471:(e,t,n)=>{"use strict";var r=n(4289),o=n(2168);e.exports=function(){var e=o();if(r.supportsDescriptors){var t=Object.getOwnPropertyDescriptor(e,"globalThis");t&&(!t.configurable||!t.enumerable&&t.writable&&globalThis===e)||Object.defineProperty(e,"globalThis",{configurable:!0,enumerable:!1,value:e,writable:!0})}else"object"==typeof globalThis&&globalThis===e||(e.globalThis=e);return e}},1044:(e,t,n)=>{"use strict";var r=n(210)("%Object.defineProperty%",!0),o=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},1405:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5419);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7642:(e,t,n)=>{"use strict";var r=n(8612);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},8679:(e,t,n)=>{"use strict";var r=n(9864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function c(e){return r.isMemo(e)?s:a[e.$$typeof]||o}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var l=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var s=u(n);p&&(s=s.concat(p(n)));for(var a=c(t),y=c(n),m=0;m<s.length;++m){var b=s[m];if(!(i[b]||r&&r[b]||y&&y[b]||a&&a[b])){var v=d(n,b);try{l(t,b,v)}catch(e){}}}}return t}},679:e=>{e.exports=function(e){var t={},n=[];(e=e||this).on=function(n,r,o){return(t[n]=t[n]||[]).push([r,o]),e},e.off=function(r,o){r||(t={});for(var i=t[r]||n,s=i.length=o?i.length:0;s--;)o==i[s][0]&&i.splice(s,1);return e},e.emit=function(r){for(var o,i=t[r]||n,s=i.length>0?i.slice(0,i.length):i,a=0;o=s[a++];)o[0].apply(o[1],n.slice.call(arguments,1));return e}}},631:(e,t,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,s=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=a&&c&&"function"==typeof c.get?c.get:null,u=a&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,y=Object.prototype.toString,m=Function.prototype.toString,b=String.prototype.match,v=String.prototype.slice,g=String.prototype.replace,O=String.prototype.toUpperCase,w=String.prototype.toLowerCase,j=RegExp.prototype.test,S=Array.prototype.concat,_=Array.prototype.join,x=Array.prototype.slice,C=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,N="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,k=Object.prototype.propertyIsEnumerable,A=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function D(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||j.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-C(-e):C(e);if(r!==e){var o=String(r),i=v.call(t,o.length+1);return g.call(o,n,"$&_")+"."+g.call(g.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return g.call(t,n,"$&_")}var R=n(4654),M=R.custom,L=$(M)?M:null;function U(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function F(e){return g.call(String(e),/"/g,"&quot;")}function B(e){return!("[object Array]"!==q(e)||I&&"object"==typeof e&&I in e)}function H(e){return!("[object RegExp]"!==q(e)||I&&"object"==typeof e&&I in e)}function $(e){if(N)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!T)return!1;try{return T.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,r,o){var a=n||{};if(z(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(z(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!z(a,"customInspect")||a.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(z(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(z(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=a.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return G(t,a);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var O=String(t);return y?D(t,O):O}if("bigint"==typeof t){var j=String(t)+"n";return y?D(t,j):j}var C=void 0===a.depth?5:a.depth;if(void 0===r&&(r=0),r>=C&&C>0&&"object"==typeof t)return B(t)?"[Array]":"[Object]";var P,M=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=_.call(Array(e.indent+1)," ")}return{base:n,prev:_.call(Array(t+1),n)}}(a,r);if(void 0===o)o=[];else if(W(o,t)>=0)return"[Circular]";function V(t,n,i){if(n&&(o=x.call(o)).push(n),i){var s={depth:a.depth};return z(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,r+1,o)}return e(t,a,r+1,o)}if("function"==typeof t&&!H(t)){var Z=function(e){if(e.name)return e.name;var t=b.call(m.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ee=Y(t,V);return"[Function"+(Z?": "+Z:" (anonymous)")+"]"+(ee.length>0?" { "+_.call(ee,", ")+" }":"")}if($(t)){var te=N?g.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(t);return"object"!=typeof t||N?te:K(te)}if((P=t)&&"object"==typeof P&&("undefined"!=typeof HTMLElement&&P instanceof HTMLElement||"string"==typeof P.nodeName&&"function"==typeof P.getAttribute)){for(var ne="<"+w.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe<re.length;oe++)ne+=" "+re[oe].name+"="+U(F(re[oe].value),"double",a);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+"</"+w.call(String(t.nodeName))+">"}if(B(t)){if(0===t.length)return"[]";var ie=Y(t,V);return M&&!function(e){for(var t=0;t<e.length;t++)if(W(e[t],"\n")>=0)return!1;return!0}(ie)?"["+Q(ie,M)+"]":"[ "+_.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==q(e)||I&&"object"==typeof e&&I in e)}(t)){var se=Y(t,V);return"cause"in Error.prototype||!("cause"in t)||k.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+_.call(se,", ")+" }":"{ ["+String(t)+"] "+_.call(S.call("[cause]: "+V(t.cause),se),", ")+" }"}if("object"==typeof t&&c){if(L&&"function"==typeof t[L]&&R)return R(t,{depth:C-r});if("symbol"!==c&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return s.call(t,(function(e,n){ae.push(V(n,t,!0)+" => "+V(e,t))})),X("Map",i.call(t),ae,M)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ce=[];return u.call(t,(function(e){ce.push(V(e,t))})),X("Set",l.call(t),ce,M)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return J("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return J("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return J("WeakRef");if(function(e){return!("[object Number]"!==q(e)||I&&"object"==typeof e&&I in e)}(t))return K(V(Number(t)));if(function(e){if(!e||"object"!=typeof e||!E)return!1;try{return E.call(e),!0}catch(e){}return!1}(t))return K(V(E.call(t)));if(function(e){return!("[object Boolean]"!==q(e)||I&&"object"==typeof e&&I in e)}(t))return K(h.call(t));if(function(e){return!("[object String]"!==q(e)||I&&"object"==typeof e&&I in e)}(t))return K(V(String(t)));if(!function(e){return!("[object Date]"!==q(e)||I&&"object"==typeof e&&I in e)}(t)&&!H(t)){var le=Y(t,V),ue=A?A(t)===Object.prototype:t instanceof Object||t.constructor===Object,pe=t instanceof Object?"":"null prototype",de=!ue&&I&&Object(t)===t&&I in t?v.call(q(t),8,-1):pe?"Object":"",fe=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(de||pe?"["+_.call(S.call([],de||[],pe||[]),": ")+"] ":"");return 0===le.length?fe+"{}":M?fe+"{"+Q(le,M)+"}":fe+"{ "+_.call(le,", ")+" }"}return String(t)};var V=Object.prototype.hasOwnProperty||function(e){return e in this};function z(e,t){return V.call(e,t)}function q(e){return y.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function G(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return G(v.call(e,0,t.maxStringLength),t)+r}return U(g.call(g.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Z),"single",t)}function Z(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+O.call(t.toString(16))}function K(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function X(e,t,n,r){return e+" ("+t+") {"+(r?Q(n,r):_.call(n,", "))+"}"}function Q(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+_.call(e,","+n)+"\n"+t.prev}function Y(e,t){var n=B(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=z(e,o)?t(e[o],e):""}var i,s="function"==typeof P?P(e):[];if(N){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var c in e)z(e,c)&&(n&&String(Number(c))===c&&c<e.length||N&&i["$"+c]instanceof Symbol||(j.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if("function"==typeof P)for(var l=0;l<s.length;l++)k.call(e,s[l])&&r.push("["+t(s[l])+"]: "+t(e[s[l]],e));return r}},8987:(e,t,n)=>{"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,s=n(1414),a=Object.prototype.propertyIsEnumerable,c=!a.call({toString:null},"toString"),l=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},d={$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},f=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===i.call(e),r=s(e),a=t&&"[object String]"===i.call(e),d=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var h=l&&n;if(a&&e.length>0&&!o.call(e,0))for(var y=0;y<e.length;++y)d.push(String(y));if(r&&e.length>0)for(var m=0;m<e.length;++m)d.push(String(m));else for(var b in e)h&&"prototype"===b||!o.call(e,b)||d.push(String(b));if(c)for(var v=function(e){if("undefined"==typeof window||!f)return p(e);try{return p(e)}catch(e){return!1}}(e),g=0;g<u.length;++g)v&&"constructor"===u[g]||!o.call(e,u[g])||d.push(u[g]);return d}}e.exports=r},2215:(e,t,n)=>{"use strict";var r=Array.prototype.slice,o=n(1414),i=Object.keys,s=i?function(e){return i(e)}:n(8987),a=Object.keys;s.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?a(r.call(e)):a(e)})}else Object.keys=s;return Object.keys||s},e.exports=s},1414:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var n=t.call(e),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),r}},8661:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Children:()=>h,Component:()=>i.Component,Fragment:()=>i.Fragment,PureComponent:()=>c,StrictMode:()=>Z,Suspense:()=>b,SuspenseList:()=>O,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>F,cloneElement:()=>V,createContext:()=>i.createContext,createElement:()=>i.createElement,createFactory:()=>H,createPortal:()=>_,createRef:()=>i.createRef,default:()=>ee,findDOMNode:()=>q,flushSync:()=>G,forwardRef:()=>d,hydrate:()=>N,isValidElement:()=>$,lazy:()=>g,memo:()=>l,render:()=>T,startTransition:()=>K,unmountComponentAtNode:()=>z,unstable_batchedUpdates:()=>W,useDeferredValue:()=>J,useInsertionEffect:()=>Q,useSyncExternalStore:()=>Y,useTransition:()=>X,version:()=>B});var r=n(9207),o={};for(const e in r)["default","createElement","createContext","createRef","Fragment","Component","startTransition","useDeferredValue","useTransition","useInsertionEffect","useSyncExternalStore","version","Children","render","hydrate","unmountComponentAtNode","createPortal","createFactory","cloneElement","isValidElement","findDOMNode","PureComponent","memo","forwardRef","flushSync","unstable_batchedUpdates","StrictMode","Suspense","SuspenseList","lazy","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED"].indexOf(e)<0&&(o[e]=()=>r[e]);n.d(t,o);var i=n(7210);function s(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function c(e){this.props=e}function l(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:a(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,i.createElement)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(c.prototype=new i.Component).isPureReactComponent=!0,c.prototype.shouldComponentUpdate=function(e,t){return a(this.props,e)||a(this.state,t)};var u=i.options.__b;i.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),u&&u(e)};var p="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function d(e){function t(t){var n=s({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=p,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var f=function(e,t){return null==e?null:(0,i.toChildArray)((0,i.toChildArray)(e).map(t))},h={map:f,forEach:f,count:function(e){return e?(0,i.toChildArray)(e).length:0},only:function(e){var t=(0,i.toChildArray)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:i.toChildArray},y=i.options.__e;i.options.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);y(e,t,n,r)};var m=i.options.unmount;function b(){this.__u=0,this.t=null,this.__b=null}function v(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function g(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,i.createElement)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function O(){this.u=null,this.o=null}i.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),m&&m(e)},(b.prototype=new i.Component).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=v(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},b.prototype.componentWillUnmount=function(){this.t=[]},b.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=s({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&(0,i.createElement)(i.Fragment,null,e.fallback);return o&&(o.__h=null),[(0,i.createElement)(i.Fragment,null,t.__a?null:e.children),o]};var w=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function j(e){return this.getChildContext=function(){return e.context},e.children}function S(e){var t=this,n=e.i;t.componentWillUnmount=function(){(0,i.render)(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),(0,i.render)((0,i.createElement)(j,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function _(e,t){var n=(0,i.createElement)(S,{__v:e,i:t});return n.containerInfo=t,n}(O.prototype=new i.Component).__a=function(e){var t=this,n=v(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),w(t,e,r)):o()};n?n(i):i()}},O.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,i.toChildArray)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},O.prototype.componentDidUpdate=O.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){w(e,n,t)}))};var x="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,C=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,E="undefined"!=typeof document,P=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function T(e,t,n){return null==t.__k&&(t.textContent=""),(0,i.render)(e,t),"function"==typeof n&&n(),e?e.__c:null}function N(e,t,n){return(0,i.hydrate)(e,t),"function"==typeof n&&n(),e?e.__c:null}i.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(i.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var I=i.options.event;function k(){}function A(){return this.cancelBubble}function D(){return this.defaultPrevented}i.options.event=function(e){return I&&(e=I(e)),e.persist=k,e.isPropagationStopped=A,e.isDefaultPrevented=D,e.nativeEvent=e};var R,M={configurable:!0,get:function(){return this.class}},L=i.options.vnode;i.options.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var o=-1===t.indexOf("-");for(var s in r={},n){var a=n[s];E&&"children"===s&&"noscript"===t||"value"===s&&"defaultValue"in n&&null==a||("defaultValue"===s&&"value"in n&&null==n.value?s="value":"download"===s&&!0===a?a="":/ondoubleclick/i.test(s)?s="ondblclick":/^onchange(textarea|input)/i.test(s+t)&&!P(n.type)?s="oninput":/^onfocus$/i.test(s)?s="onfocusin":/^onblur$/i.test(s)?s="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(s)?s=s.toLowerCase():o&&C.test(s)?s=s.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(s)&&(s=s.toLowerCase(),r[s]&&(s="oninputCapture")),r[s]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,i.toChildArray)(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=(0,i.toChildArray)(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(M.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",M))}e.$$typeof=x,L&&L(e)};var U=i.options.__r;i.options.__r=function(e){U&&U(e),R=e.__c};var F={ReactCurrentDispatcher:{current:{readContext:function(e){return R.__n[e.__c].props.value}}}},B="17.0.2";function H(e){return i.createElement.bind(null,e)}function $(e){return!!e&&e.$$typeof===x}function V(e){return $(e)?i.cloneElement.apply(null,arguments):e}function z(e){return!!e.__k&&((0,i.render)(null,e),!0)}function q(e){return e&&(e.base||1===e.nodeType&&e)||null}var W=function(e,t){return e(t)},G=function(e,t){return e(t)},Z=i.Fragment;function K(e){e()}function J(e){return e}function X(){return[!1,K]}var Q=r.useLayoutEffect;function Y(e,t){var n=t(),o=(0,r.useState)({s:{__:n,h:t}}),i=o[0].s,s=o[1];return(0,r.useLayoutEffect)((function(){i.__=n,i.h=t,i.__!==t()&&s({s:i})}),[e,n,t]),(0,r.useEffect)((function(){return i.__!==i.h()&&s({s:i}),e((function(){i.__!==i.h()&&s({s:i})}))}),[e]),n}const ee={useState:r.useState,useReducer:r.useReducer,useEffect:r.useEffect,useLayoutEffect:r.useLayoutEffect,useInsertionEffect:r.useLayoutEffect,useTransition:X,useDeferredValue:J,useSyncExternalStore:Y,startTransition:K,useRef:r.useRef,useImperativeHandle:r.useImperativeHandle,useMemo:r.useMemo,useCallback:r.useCallback,useContext:r.useContext,useDebugValue:r.useDebugValue,version:"17.0.2",Children:h,render:T,hydrate:N,unmountComponentAtNode:z,createPortal:_,createElement:i.createElement,createContext:i.createContext,createFactory:H,cloneElement:V,createRef:i.createRef,Fragment:i.Fragment,isValidElement:$,findDOMNode:q,Component:i.Component,PureComponent:c,memo:l,forwardRef:d,flushSync:G,unstable_batchedUpdates:W,StrictMode:i.Fragment,Suspense:b,SuspenseList:O,lazy:g,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:F}},9921:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,y=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,g=n?Symbol.for("react.responder"):60118,O=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case p:case i:case a:case s:case f:return e;default:switch(e=e&&e.$$typeof){case l:case d:case m:case y:case c:return e;default:return t}}case o:return t}}}function j(e){return w(e)===p}t.AsyncMode=u,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=c,t.Element=r,t.ForwardRef=d,t.Fragment=i,t.Lazy=m,t.Memo=y,t.Portal=o,t.Profiler=a,t.StrictMode=s,t.Suspense=f,t.isAsyncMode=function(e){return j(e)||w(e)===u},t.isConcurrentMode=j,t.isContextConsumer=function(e){return w(e)===l},t.isContextProvider=function(e){return w(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===d},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===m},t.isMemo=function(e){return w(e)===y},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===p||e===a||e===s||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===y||e.$$typeof===c||e.$$typeof===l||e.$$typeof===d||e.$$typeof===v||e.$$typeof===g||e.$$typeof===O||e.$$typeof===b)},t.typeOf=w},9864:(e,t,n)=>{"use strict";e.exports=n(9921)},6113:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Provider:()=>U,ReactReduxContext:()=>c,batch:()=>i.unstable_batchedUpdates,connect:()=>L,createDispatchHook:()=>H,createSelectorHook:()=>f,createStoreHook:()=>F,shallowEqual:()=>I,useDispatch:()=>$,useSelector:()=>h,useStore:()=>B});var r=n(1688),o=n(2798),i=n(8661);let s=function(e){e()};const a=()=>s,c=i.default.createContext(null);function l(){return(0,i.useContext)(c)}const u=()=>{throw new Error("uSES not initialized!")};let p=u;const d=(e,t)=>e===t;function f(e=c){const t=e===c?l:()=>(0,i.useContext)(e);return function(e,n=d){const{store:r,subscription:o,getServerState:s}=t(),a=p(o.addNestedSub,r.getState,s||r.getState,e,n);return(0,i.useDebugValue)(a),a}}const h=f();function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function m(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var b=n(8679),v=n.n(b),g=n(2973);const O=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function w(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a,c,l,u,p,d=!1;return function(f,h){return d?function(d,f){const h=!i(f,c),y=!o(d,a);return a=d,c=f,h&&y?(l=e(a,c),t.dependsOnOwnProps&&(u=t(r,c)),p=n(l,u,c),p):h?(e.dependsOnOwnProps&&(l=e(a,c)),t.dependsOnOwnProps&&(u=t(r,c)),p=n(l,u,c),p):y?function(){const t=e(a,c),r=!s(t,l);return l=t,r&&(p=n(l,u,c)),p}():p}(f,h):(a=f,c=h,l=e(a,c),u=t(r,c),p=n(l,u,c),d=!0,p)}}function j(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function S(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function _(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=S(e);let o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=S(o),o=r(t,n)),o},r}}function x(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function C(e,t,n){return y({},n,e,t)}const E={notify(){},get:()=>[]};function P(e,t){let n,r=E;function o(){s.onStateChange&&s.onStateChange()}function i(){n||(n=t?t.addNestedSub(o):e.subscribe(o),r=function(){const e=a();let t=null,n=null;return{clear(){t=null,n=null},notify(){e((()=>{let e=t;for(;e;)e.callback(),e=e.next}))},get(){let e=[],n=t;for(;n;)e.push(n),n=n.next;return e},subscribe(e){let r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}const s={addNestedSub:function(e){return i(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(n)},trySubscribe:i,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=E)},getListeners:()=>r};return s}const T="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?i.useLayoutEffect:i.useEffect;function N(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function I(e,t){if(N(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!N(e[n[r]],t[n[r]]))return!1;return!0}const k=["reactReduxForwardedRef"];let A=u;const D=[null,null];function R(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function M(e,t){return e===t}const L=function(e,t,n,{pure:r,areStatesEqual:o=M,areOwnPropsEqual:s=I,areStatePropsEqual:a=I,areMergedPropsEqual:l=I,forwardRef:u=!1,context:p=c}={}){const d=p,f=function(e){return e?"function"==typeof e?_(e):x(e,"mapStateToProps"):j((()=>({})))}(e),h=function(e){return e&&"object"==typeof e?j((t=>function(e,t){const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=(...e)=>t(o(...e)))}return n}(e,t))):e?"function"==typeof e?_(e):x(e,"mapDispatchToProps"):j((e=>({dispatch:e})))}(t),b=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let o,i=!1;return function(t,n,s){const a=e(t,n,s);return i?r(a,o)||(o=a):(i=!0,o=a),o}}}(e):x(e,"mergeProps"):()=>C}(n),S=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:S,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:f,initMapDispatchToProps:h,initMergeProps:b,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:s,areMergedPropsEqual:l};function c(t){const[n,o,s]=(0,i.useMemo)((()=>{const{reactReduxForwardedRef:e}=t,n=m(t,k);return[t.context,e,n]}),[t]),a=(0,i.useMemo)((()=>n&&n.Consumer&&(0,g.isContextConsumer)(i.default.createElement(n.Consumer,null))?n:d),[n,d]),c=(0,i.useContext)(a),l=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),u=Boolean(c)&&Boolean(c.store),p=l?t.store:c.store,f=u?c.getServerState:p.getState,h=(0,i.useMemo)((()=>function(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=m(t,O);return w(n(e,i),r(e,i),o(e,i),e,i)}(p.dispatch,r)),[p]),[b,v]=(0,i.useMemo)((()=>{if(!S)return D;const e=P(p,l?void 0:c.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[p,l,c]),j=(0,i.useMemo)((()=>l?c:y({},c,{subscription:b})),[l,c,b]),_=(0,i.useRef)(),x=(0,i.useRef)(s),C=(0,i.useRef)(),E=(0,i.useRef)(!1),N=((0,i.useRef)(!1),(0,i.useRef)(!1)),I=(0,i.useRef)();T((()=>(N.current=!0,()=>{N.current=!1})),[]);const M=(0,i.useMemo)((()=>()=>C.current&&s===x.current?C.current:h(p.getState(),s)),[p,s]),L=(0,i.useMemo)((()=>e=>b?function(e,t,n,r,o,i,s,a,c,l,u){if(!e)return()=>{};let p=!1,d=null;const f=()=>{if(p||!a.current)return;const e=t.getState();let n,f;try{n=r(e,o.current)}catch(e){f=e,d=e}f||(d=null),n===i.current?s.current||l():(i.current=n,c.current=n,s.current=!0,u())};return n.onStateChange=f,n.trySubscribe(),f(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}(S,p,b,h,x,_,E,N,C,v,e):()=>{}),[b]);var U,F;let B;U=R,F=[x,_,E,s,C,v],T((()=>U(...F)),undefined);try{B=A(L,M,f?()=>h(f(),s):M)}catch(e){throw I.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${I.current.stack}\n\n`),e}T((()=>{I.current=void 0,C.current=void 0,_.current=B}));const H=(0,i.useMemo)((()=>i.default.createElement(e,y({},B,{ref:o}))),[o,e,B]);return(0,i.useMemo)((()=>S?i.default.createElement(a.Provider,{value:j},H):H),[a,H,j])}const p=i.default.memo(c);if(p.WrappedComponent=e,p.displayName=c.displayName=n,u){const t=i.default.forwardRef((function(e,t){return i.default.createElement(p,y({},e,{reactReduxForwardedRef:t}))}));return t.displayName=n,t.WrappedComponent=e,v()(t,e)}return v()(p,e)}},U=function({store:e,context:t,children:n,serverState:r}){const o=(0,i.useMemo)((()=>{const t=P(e);return{store:e,subscription:t,getServerState:r?()=>r:void 0}}),[e,r]),s=(0,i.useMemo)((()=>e.getState()),[e]);T((()=>{const{subscription:t}=o;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),s!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}}),[o,s]);const a=t||c;return i.default.createElement(a.Provider,{value:o},n)};function F(e=c){const t=e===c?l:()=>(0,i.useContext)(e);return function(){const{store:e}=t();return e}}const B=F();function H(e=c){const t=e===c?B:F(e);return function(){return t().dispatch}}const $=H();var V,z;V=o.useSyncExternalStoreWithSelector,p=V,(e=>{A=e})(r.useSyncExternalStore),z=i.unstable_batchedUpdates,s=z},8359:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy");Symbol.for("react.offscreen");Symbol.for("react.module.reference"),t.isContextConsumer=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case s:case i:case p:case d:return e;default:switch(e=e&&e.$$typeof){case l:case c:case u:case h:case f:case a:return e;default:return t}}case r:return t}}}(e)===c}},2973:(e,t,n)=>{"use strict";e.exports=n(8359)},573:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createSelector:()=>c,createSelectorCreator:()=>a,createStructuredSelector:()=>l,defaultEqualityCheck:()=>o,defaultMemoize:()=>i});var r="NOT_FOUND",o=function(e,t){return e===t};function i(e,t){var n,i,s="object"==typeof t?t:{equalityCheck:t},a=s.equalityCheck,c=void 0===a?o:a,l=s.maxSize,u=void 0===l?1:l,p=s.resultEqualityCheck,d=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}(c),f=1===u?(n=d,{get:function(e){return i&&n(i.key,e)?i.value:r},put:function(e,t){i={key:e,value:t}},getEntries:function(){return i?[i]:[]},clear:function(){i=void 0}}):function(e,t){var n=[];function o(e){var o=n.findIndex((function(n){return t(e,n.key)}));if(o>-1){var i=n[o];return o>0&&(n.splice(o,1),n.unshift(i)),i.value}return r}return{get:o,put:function(t,i){o(t)===r&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(u,d);function h(){var t=f.get(arguments);if(t===r){if(t=e.apply(null,arguments),p){var n=f.getEntries(),o=n.find((function(e){return p(e.value,t)}));o&&(t=o.value)}f.put(arguments,t)}return t}return h.clearCache=function(){return f.clear()},h}function s(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var i,a=0,c={memoizeOptions:void 0},l=r.pop();if("object"==typeof l&&(c=l,l=r.pop()),"function"!=typeof l)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof l+"]");var u=c,p=u.memoizeOptions,d=void 0===p?n:p,f=Array.isArray(d)?d:[d],h=s(r),y=e.apply(void 0,[function(){return a++,l.apply(null,arguments)}].concat(f)),m=e((function(){for(var e=[],t=h.length,n=0;n<t;n++)e.push(h[n].apply(null,arguments));return i=y.apply(null,e)}));return Object.assign(m,{resultFunc:l,memoizedResultFunc:y,dependencies:h,lastResult:function(){return i},recomputations:function(){return a},resetRecomputations:function(){return a=0}}),m};return o}var c=a(i),l=function(e,t){if(void 0===t&&(t=c),"object"!=typeof e)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e),r=t(n.map((function(t){return e[t]})),(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce((function(e,t,r){return e[n[r]]=t,e}),{})}));return r}},7478:(e,t,n)=>{"use strict";var r=n(210),o=n(1924),i=n(631),s=r("%TypeError%"),a=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),d=o("Map.prototype.get",!0),f=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),y=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new s("Side channel does not contain "+i(e))},get:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(e)return l(e,r)}else if(c){if(t)return d(t,r)}else if(n)return function(e,t){var n=y(e,t);return n&&n.value}(n,r)},has:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(e)return p(e,r)}else if(c){if(t)return h(t,r)}else if(n)return function(e,t){return!!y(e,t)}(n,r);return!1},set:function(r,o){a&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new a),u(e,r,o)):c?(t||(t=new c),f(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=y(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r}},1839:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.Symbol;if("function"==typeof n)if(n.observable)t=n.observable;else{t=n.for("https://github.com/benlesh/symbol-observable");try{n.observable=t}catch(e){}}else t="@@observable";return t}},868:(e,t,n)=>{e.exports=n(1839)},3240:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});const o=n(7844),i=n(5150),s=n(4189),a=n(7346),c=n(9141),l=n(4972),u=n(9207),p=n(6113);t.default=function(e){var{children:t,formId:n,persistData:d,onError:f,onSubmit:h,validationSchema:y}=e,m=r(e,["children","formId","persistData","onError","onSubmit","validationSchema"]);const b=(0,p.useDispatch)(),v=(0,p.useSelector)((e=>(0,c.getFormValuesByFormId)(e,{formId:n}))),[g,O]=(0,u.useState)(!1),[w,j]=(0,u.useState)({}),{isValid:S,errors:_}=(0,a.useValidations)(v,y),x=(0,u.useMemo)((()=>Object.assign(Object.assign({},_),w)),[_,w]);(0,u.useLayoutEffect)((()=>{b((0,l.registerForm)({formId:n,persistData:d}))}),[n,d,b]),(0,u.useEffect)((()=>()=>{b((0,l.deregisterForm)({formId:n}))}),[n,d,b]);const C=(0,u.useCallback)(((e,t)=>{b((0,l.updateControlValue)({formId:n,name:e,value:t}))}),[n,b]),E=(0,u.useCallback)(((e,t)=>{b((0,l.updateControlTouched)({formId:n,name:e,touched:t}))}),[b,n]),P=(0,u.useCallback)(((e,t)=>{j((n=>Object.assign(Object.assign({},n),{[e]:t})))}),[j]),T=(0,u.useCallback)((e=>{var t;e.preventDefault();const n="true"===(null===(t=e.submitter)||void 0===t?void 0:t.ariaDisabled);O(!n),!n&&S&&(b((0,i.setHasResponded)(!0)),h(v,{updateControlValue:C,setError:P}))}),[S,b,h,v,C,P]);(0,u.useEffect)((()=>{f&&f({errors:x,isSubmitted:g,isValid:0===Object.keys(x).length})}),[g,x,f]);const N=(0,u.useMemo)((()=>({formId:n,values:v,errors:x,isValid:0===Object.keys(x).length,isSubmitted:g,handleSubmit:T,validationSchema:y,updateControlValue:C,updateControlTouched:E})),[n,v,x,g,T,y,C,E]);return n?h?(0,o.jsx)(s.Provider,Object.assign({},m,{value:N},{children:t})):(console.error('"onSubmit" is required.'),null):(console.error('"formId" is required.'),null)}},3250:(e,t,n)=>{"use strict";var r=n(8661),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,a=r.useLayoutEffect,c=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return a((function(){o.value=n,o.getSnapshot=t,l(o)&&u({inst:o})}),[e,n,t]),s((function(){return l(o)&&u({inst:o}),e((function(){l(o)&&u({inst:o})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},139:(e,t,n)=>{"use strict";var r=n(8661),o=n(1688),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=o.useSyncExternalStore,a=r.useRef,c=r.useEffect,l=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var p=a(null);if(null===p.current){var d={hasValue:!1,value:null};p.current=d}else d=p.current;p=l((function(){function e(e){if(!c){if(c=!0,s=e,e=r(e),void 0!==o&&d.hasValue){var t=d.value;if(o(t,e))return a=t}return a=e}if(t=a,i(s,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(s=e,a=n)}var s,a,c=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]}),[t,n,r,o]);var f=s(e,p[0],p[1]);return c((function(){d.hasValue=!0,d.value=f}),[f]),u(f),f}},1688:(e,t,n)=>{"use strict";e.exports=n(3250)},2798:(e,t,n)=>{"use strict";e.exports=n(139)},3813:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.NO_IL=t.NO=t.MemoryStream=t.Stream=void 0;var i=n(868),s=n(2503),a=i.default(s.getPolyfill()),c={};function l(){}function u(e){for(var t=e.length,n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function p(e,t,n){try{return e.f(t)}catch(e){return n._e(e),c}}t.NO=c;var d={_n:l,_e:l,_c:l};function f(e){e._start=function(e){e.next=e._n,e.error=e._e,e.complete=e._c,this.start(e)},e._stop=e.stop}t.NO_IL=d;var h=function(){function e(e,t){this._stream=e,this._listener=t}return e.prototype.unsubscribe=function(){this._stream._remove(this._listener)},e}(),y=function(){function e(e){this._listener=e}return e.prototype.next=function(e){this._listener._n(e)},e.prototype.error=function(e){this._listener._e(e)},e.prototype.complete=function(){this._listener._c()},e}(),m=function(){function e(e){this.type="fromObservable",this.ins=e,this.active=!1}return e.prototype._start=function(e){this.out=e,this.active=!0,this._sub=this.ins.subscribe(new y(e)),this.active||this._sub.unsubscribe()},e.prototype._stop=function(){this._sub&&this._sub.unsubscribe(),this.active=!1},e}(),b=function(){function e(e){this.type="merge",this.insArr=e,this.out=c,this.ac=0}return e.prototype._start=function(e){this.out=e;var t=this.insArr,n=t.length;this.ac=n;for(var r=0;r<n;r++)t[r]._add(this)},e.prototype._stop=function(){for(var e=this.insArr,t=e.length,n=0;n<t;n++)e[n]._remove(this);this.out=c},e.prototype._n=function(e){var t=this.out;t!==c&&t._n(e)},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){if(--this.ac<=0){var e=this.out;if(e===c)return;e._c()}},e}(),v=function(){function e(e,t,n){this.i=e,this.out=t,this.p=n,n.ils.push(this)}return e.prototype._n=function(e){var t=this.p,n=this.out;if(n!==c&&t.up(e,this.i)){var r=u(t.vals);n._n(r)}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.p;e.out!==c&&0==--e.Nc&&e.out._c()},e}(),g=function(){function e(e){this.type="combine",this.insArr=e,this.out=c,this.ils=[],this.Nc=this.Nn=0,this.vals=[]}return e.prototype.up=function(e,t){var n=this.vals[t],r=this.Nn?n===c?--this.Nn:this.Nn:0;return this.vals[t]=e,0===r},e.prototype._start=function(e){this.out=e;var t=this.insArr,n=this.Nc=this.Nn=t.length,r=this.vals=new Array(n);if(0===n)e._n([]),e._c();else for(var o=0;o<n;o++)r[o]=c,t[o]._add(new v(o,e,this))},e.prototype._stop=function(){for(var e=this.insArr,t=e.length,n=this.ils,r=0;r<t;r++)e[r]._remove(n[r]);this.out=c,this.ils=[],this.vals=[]},e}(),O=function(){function e(e){this.type="fromArray",this.a=e}return e.prototype._start=function(e){for(var t=this.a,n=0,r=t.length;n<r;n++)e._n(t[n]);e._c()},e.prototype._stop=function(){},e}(),w=function(){function e(e){this.type="fromPromise",this.on=!1,this.p=e}return e.prototype._start=function(e){var t=this;this.on=!0,this.p.then((function(n){t.on&&(e._n(n),e._c())}),(function(t){e._e(t)})).then(l,(function(e){setTimeout((function(){throw e}))}))},e.prototype._stop=function(){this.on=!1},e}(),j=function(){function e(e){this.type="periodic",this.period=e,this.intervalID=-1,this.i=0}return e.prototype._start=function(e){var t=this;this.intervalID=setInterval((function(){e._n(t.i++)}),this.period)},e.prototype._stop=function(){-1!==this.intervalID&&clearInterval(this.intervalID),this.intervalID=-1,this.i=0},e}(),S=function(){function e(e,t){this.type="debug",this.ins=e,this.out=c,this.s=l,this.l="","string"==typeof t?this.l=t:"function"==typeof t&&(this.s=t)}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=this.s,r=this.l;if(n!==l)try{n(e)}catch(e){t._e(e)}else r?console.log(r+":",e):console.log(e);t._n(e)}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),_=function(){function e(e,t){this.type="drop",this.ins=t,this.out=c,this.max=e,this.dropped=0}return e.prototype._start=function(e){this.out=e,this.dropped=0,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;t!==c&&this.dropped++>=this.max&&t._n(e)},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),x=function(){function e(e,t){this.out=e,this.op=t}return e.prototype._n=function(){this.op.end()},e.prototype._e=function(e){this.out._e(e)},e.prototype._c=function(){this.op.end()},e}(),C=function(){function e(e,t){this.type="endWhen",this.ins=t,this.out=c,this.o=e,this.oil=d}return e.prototype._start=function(e){this.out=e,this.o._add(this.oil=new x(e,this)),this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.o._remove(this.oil),this.out=c,this.oil=d},e.prototype.end=function(){var e=this.out;e!==c&&e._c()},e.prototype._n=function(e){var t=this.out;t!==c&&t._n(e)},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){this.end()},e}(),E=function(){function e(e,t){this.type="filter",this.ins=t,this.out=c,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=p(this,e,t);n!==c&&n&&t._n(e)}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),P=function(){function e(e,t){this.out=e,this.op=t}return e.prototype._n=function(e){this.out._n(e)},e.prototype._e=function(e){this.out._e(e)},e.prototype._c=function(){this.op.inner=c,this.op.less()},e}(),T=function(){function e(e){this.type="flatten",this.ins=e,this.out=c,this.open=!0,this.inner=c,this.il=d}return e.prototype._start=function(e){this.out=e,this.open=!0,this.inner=c,this.il=d,this.ins._add(this)},e.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=d},e.prototype.less=function(){var e=this.out;e!==c&&(this.open||this.inner!==c||e._c())},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=this.inner,r=this.il;n!==c&&r!==d&&n._remove(r),(this.inner=e)._add(this.il=new P(t,this))}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){this.open=!1,this.less()},e}(),N=function(){function e(e,t,n){var r=this;this.type="fold",this.ins=n,this.out=c,this.f=function(t){return e(r.acc,t)},this.acc=this.seed=t}return e.prototype._start=function(e){this.out=e,this.acc=this.seed,e._n(this.acc),this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c,this.acc=this.seed},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=p(this,e,t);n!==c&&t._n(this.acc=n)}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),I=function(){function e(e){this.type="last",this.ins=e,this.out=c,this.has=!1,this.val=c}return e.prototype._start=function(e){this.out=e,this.has=!1,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c,this.val=c},e.prototype._n=function(e){this.has=!0,this.val=e},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&(this.has?(e._n(this.val),e._c()):e._e(new Error("last() failed because input stream completed")))},e}(),k=function(){function e(e,t){this.type="map",this.ins=t,this.out=c,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=p(this,e,t);n!==c&&t._n(n)}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),A=function(){function e(e){this.type="remember",this.ins=e,this.out=c}return e.prototype._start=function(e){this.out=e,this.ins._add(e)},e.prototype._stop=function(){this.ins._remove(this.out),this.out=c},e}(),D=function(){function e(e,t){this.type="replaceError",this.ins=t,this.out=c,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;t!==c&&t._n(e)},e.prototype._e=function(e){var t=this.out;if(t!==c)try{this.ins._remove(this),(this.ins=this.f(e))._add(this)}catch(e){t._e(e)}},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),R=function(){function e(e,t){this.type="startWith",this.ins=e,this.out=c,this.val=t}return e.prototype._start=function(e){this.out=e,this.out._n(this.val),this.ins._add(e)},e.prototype._stop=function(){this.ins._remove(this.out),this.out=c},e}(),M=function(){function e(e,t){this.type="take",this.ins=t,this.out=c,this.max=e,this.taken=0}return e.prototype._start=function(e){this.out=e,this.taken=0,this.max<=0?e._c():this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=++this.taken;n<this.max?t._n(e):n===this.max&&(t._n(e),t._c())}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),L=function(){function e(e){this._prod=e||c,this._ils=[],this._stopID=c,this._dl=c,this._d=!1,this._target=null,this._err=c}return e.prototype._n=function(e){var t=this._ils,n=t.length;if(this._d&&this._dl._n(e),1==n)t[0]._n(e);else{if(0==n)return;for(var r=u(t),o=0;o<n;o++)r[o]._n(e)}},e.prototype._e=function(e){if(this._err===c){this._err=e;var t=this._ils,n=t.length;if(this._x(),this._d&&this._dl._e(e),1==n)t[0]._e(e);else{if(0==n)return;for(var r=u(t),o=0;o<n;o++)r[o]._e(e)}if(!this._d&&0==n)throw this._err}},e.prototype._c=function(){var e=this._ils,t=e.length;if(this._x(),this._d&&this._dl._c(),1==t)e[0]._c();else{if(0==t)return;for(var n=u(e),r=0;r<t;r++)n[r]._c()}},e.prototype._x=function(){0!==this._ils.length&&(this._prod!==c&&this._prod._stop(),this._err=c,this._ils=[])},e.prototype._stopNow=function(){this._prod._stop(),this._err=c,this._stopID=c},e.prototype._add=function(e){var t=this._target;if(t)return t._add(e);var n=this._ils;if(n.push(e),!(n.length>1))if(this._stopID!==c)clearTimeout(this._stopID),this._stopID=c;else{var r=this._prod;r!==c&&r._start(this)}},e.prototype._remove=function(e){var t=this,n=this._target;if(n)return n._remove(e);var r=this._ils,o=r.indexOf(e);o>-1&&(r.splice(o,1),this._prod!==c&&r.length<=0?(this._err=c,this._stopID=setTimeout((function(){return t._stopNow()}))):1===r.length&&this._pruneCycles())},e.prototype._pruneCycles=function(){this._hasNoSinks(this,[])&&this._remove(this._ils[0])},e.prototype._hasNoSinks=function(e,t){if(-1!==t.indexOf(e))return!0;if(e.out===this)return!0;if(e.out&&e.out!==c)return this._hasNoSinks(e.out,t.concat(e));if(e._ils){for(var n=0,r=e._ils.length;n<r;n++)if(!this._hasNoSinks(e._ils[n],t.concat(e)))return!1;return!0}return!1},e.prototype.ctor=function(){return this instanceof U?U:e},e.prototype.addListener=function(e){e._n=e.next||l,e._e=e.error||l,e._c=e.complete||l,this._add(e)},e.prototype.removeListener=function(e){this._remove(e)},e.prototype.subscribe=function(e){return this.addListener(e),new h(this,e)},e.prototype[a]=function(){return this},e.create=function(t){if(t){if("function"!=typeof t.start||"function"!=typeof t.stop)throw new Error("producer requires both start and stop functions");f(t)}return new e(t)},e.createWithMemory=function(e){return e&&f(e),new U(e)},e.never=function(){return new e({_start:l,_stop:l})},e.empty=function(){return new e({_start:function(e){e._c()},_stop:l})},e.throw=function(t){return new e({_start:function(e){e._e(t)},_stop:l})},e.from=function(t){if("function"==typeof t[a])return e.fromObservable(t);if("function"==typeof t.then)return e.fromPromise(t);if(Array.isArray(t))return e.fromArray(t);throw new TypeError("Type of input to from() must be an Array, Promise, or Observable")},e.of=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.fromArray(t)},e.fromArray=function(t){return new e(new O(t))},e.fromPromise=function(t){return new e(new w(t))},e.fromObservable=function(t){if(void 0!==t.endWhen)return t;var n="function"==typeof t[a]?t[a]():t;return new e(new m(n))},e.periodic=function(t){return new e(new j(t))},e.prototype._map=function(e){return new(this.ctor())(new k(e,this))},e.prototype.map=function(e){return this._map(e)},e.prototype.mapTo=function(e){var t=this.map((function(){return e}));return t._prod.type="mapTo",t},e.prototype.filter=function(t){var n,r,o=this._prod;return new e(o instanceof E?new E((n=o.f,r=t,function(e){return n(e)&&r(e)}),o.ins):new E(t,this))},e.prototype.take=function(e){return new(this.ctor())(new M(e,this))},e.prototype.drop=function(t){return new e(new _(t,this))},e.prototype.last=function(){return new e(new I(this))},e.prototype.startWith=function(e){return new U(new R(this,e))},e.prototype.endWhen=function(e){return new(this.ctor())(new C(e,this))},e.prototype.fold=function(e,t){return new U(new N(e,t,this))},e.prototype.replaceError=function(e){return new(this.ctor())(new D(e,this))},e.prototype.flatten=function(){return new e(new T(this))},e.prototype.compose=function(e){return e(this)},e.prototype.remember=function(){return new U(new A(this))},e.prototype.debug=function(e){return new(this.ctor())(new S(this,e))},e.prototype.imitate=function(e){if(e instanceof U)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=e;for(var t=this._ils,n=t.length,r=0;r<n;r++)e._add(t[r]);this._ils=[]},e.prototype.shamefullySendNext=function(e){this._n(e)},e.prototype.shamefullySendError=function(e){this._e(e)},e.prototype.shamefullySendComplete=function(){this._c()},e.prototype.setDebugListener=function(e){e?(this._d=!0,e._n=e.next||l,e._e=e.error||l,e._c=e.complete||l,this._dl=e):(this._d=!1,this._dl=c)},e.merge=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new e(new b(t))},e.combine=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new e(new g(t))},e}();t.Stream=L;var U=function(e){function t(t){var n=e.call(this,t)||this;return n._has=!1,n}return o(t,e),t.prototype._n=function(t){this._v=t,this._has=!0,e.prototype._n.call(this,t)},t.prototype._add=function(e){var t=this._target;if(t)return t._add(e);var n=this._ils;if(n.push(e),n.length>1)this._has&&e._n(this._v);else if(this._stopID!==c)this._has&&e._n(this._v),clearTimeout(this._stopID),this._stopID=c;else if(this._has)e._n(this._v);else{var r=this._prod;r!==c&&r._start(this)}},t.prototype._stopNow=function(){this._has=!1,e.prototype._stopNow.call(this)},t.prototype._x=function(){this._has=!1,e.prototype._x.call(this)},t.prototype.map=function(e){return this._map(e)},t.prototype.mapTo=function(t){return e.prototype.mapTo.call(this,t)},t.prototype.take=function(t){return e.prototype.take.call(this,t)},t.prototype.endWhen=function(t){return e.prototype.endWhen.call(this,t)},t.prototype.replaceError=function(t){return e.prototype.replaceError.call(this,t)},t.prototype.remember=function(){return this},t.prototype.debug=function(t){return e.prototype.debug.call(this,t)},t}(L);t.MemoryStream=U;var F=L;t.default=F},7210:e=>{"use strict";e.exports=require("preact")},9207:e=>{"use strict";e.exports=require("preact/hooks")},7844:e=>{"use strict";e.exports=require("preact/jsx-runtime")},4654:()=>{},3695:()=>{},4942:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r})}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r=n(5647);module.exports=r})();
2
+ (()=>{var e={575:(e,t,n)=>{"use strict";function r(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function o(e){return!!e&&!!e[q]}function i(e){return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===W}(e)||Array.isArray(e)||!!e[z]||!!e.constructor[z]||d(e)||f(e))}function s(e){return o(e)||r(23,e),e[q].t}function a(e,t,n){void 0===n&&(n=!1),0===c(e)?(n?Object.keys:G)(e).forEach((function(r){n&&"symbol"==typeof r||t(r,e[r],e)})):e.forEach((function(n,r){return t(r,n,e)}))}function c(e){var t=e[q];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:d(e)?2:f(e)?3:0}function l(e,t){return 2===c(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function u(e,t,n){var r=c(e);2===r?e.set(t,n):3===r?(e.delete(t),e.add(n)):e[t]=n}function p(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function d(e){return B&&e instanceof Map}function f(e){return H&&e instanceof Set}function h(e){return e.o||e.t}function y(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Z(e);delete t[q];for(var n=G(t),r=0;r<n.length;r++){var o=n[r],i=t[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Object.getPrototypeOf(e),t)}function m(e,t){return void 0===t&&(t=!1),v(e)||o(e)||!i(e)||(c(e)>1&&(e.set=e.add=e.clear=e.delete=b),Object.freeze(e),t&&a(e,(function(e,t){return m(t,!0)}),!0)),e}function b(){r(2)}function v(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function g(e){var t=K[e];return t||r(18,e),t}function O(){return U}function w(e,t){t&&(g("Patches"),e.u=[],e.s=[],e.v=t)}function j(e){S(e),e.p.forEach(x),e.p=null}function S(e){e===U&&(U=e.l)}function _(e){return U={p:[],l:U,h:e,m:!0,_:0}}function x(e){var t=e[q];0===t.i||1===t.i?t.j():t.O=!0}function C(e,t){t._=t.p.length;var n=t.p[0],o=void 0!==e&&e!==n;return t.h.g||g("ES5").S(t,e,o),o?(n[q].P&&(j(t),r(4)),i(e)&&(e=E(t,e),t.l||T(t,e)),t.u&&g("Patches").M(n[q].t,e,t.u,t.s)):e=E(t,n,[]),j(t),t.u&&t.v(t.u,t.s),e!==V?e:void 0}function E(e,t,n){if(v(t))return t;var r=t[q];if(!r)return a(t,(function(o,i){return P(e,r,t,o,i,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return T(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var o=4===r.i||5===r.i?r.o=y(r.k):r.o;a(3===r.i?new Set(o):o,(function(t,i){return P(e,r,o,t,i,n)})),T(e,o,!1),n&&e.u&&g("Patches").R(r,n,e.u,e.s)}return r.o}function P(e,t,n,r,s,a){if(o(s)){var c=E(e,s,a&&t&&3!==t.i&&!l(t.D,r)?a.concat(r):void 0);if(u(n,r,c),!o(c))return;e.m=!1}if(i(s)&&!v(s)){if(!e.h.F&&e._<1)return;E(e,s),t&&t.A.l||T(e,s)}}function T(e,t,n){void 0===n&&(n=!1),e.h.F&&e.m&&m(t,n)}function N(e,t){var n=e[q];return(n?h(n):e)[t]}function I(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function k(e){e.P||(e.P=!0,e.l&&k(e.l))}function A(e){e.o||(e.o=y(e.t))}function D(e,t,n){var r=d(t)?g("MapSet").N(t,n):f(t)?g("MapSet").T(t,n):e.g?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:O(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},o=r,i=J;n&&(o=[r],i=X);var s=Proxy.revocable(o,i),a=s.revoke,c=s.proxy;return r.k=c,r.j=a,c}(t,n):g("ES5").J(t,n);return(n?n.A:O()).p.push(r),r}function R(e){return o(e)||r(22,e),function e(t){if(!i(t))return t;var n,r=t[q],o=c(t);if(r){if(!r.P&&(r.i<4||!g("ES5").K(r)))return r.t;r.I=!0,n=M(t,o),r.I=!1}else n=M(t,o);return a(n,(function(t,o){r&&function(e,t){return 2===c(e)?e.get(t):e[t]}(r.t,t)===o||u(n,t,e(o))})),3===o?new Set(n):n}(e)}function M(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return y(e)}n.r(t),n.d(t,{MiddlewareArray:()=>Ue,TaskAbortError:()=>Pt,__DO_NOT_USE__ActionTypes:()=>ce,addListener:()=>Ut,applyMiddleware:()=>me,bindActionCreators:()=>he,clearAllListeners:()=>Ft,combineReducers:()=>de,compose:()=>ye,configureStore:()=>We,createAction:()=>Ge,createAsyncThunk:()=>ut,createDraftSafeSelector:()=>Re,createEntityAdapter:()=>ot,createImmutableStateInvariantMiddleware:()=>He,createListenerMiddleware:()=>Vt,createNextState:()=>te,createReducer:()=>Xe,createSelector:()=>be.createSelector,createSerializableStateInvariantMiddleware:()=>ze,createSlice:()=>Qe,createStore:()=>ue,current:()=>R,findNonSerializableValue:()=>Ve,freeze:()=>m,getDefaultMiddleware:()=>qe,getType:()=>Ke,isAllOf:()=>ht,isAnyOf:()=>ft,isAsyncThunkAction:()=>wt,isDraft:()=>o,isFulfilled:()=>Ot,isImmutableDefault:()=>Be,isPending:()=>bt,isPlain:()=>$e,isPlainObject:()=>Le,isRejected:()=>vt,isRejectedWithValue:()=>gt,legacy_createStore:()=>pe,miniSerializeError:()=>lt,nanoid:()=>it,original:()=>s,removeListener:()=>Bt,unwrapResult:()=>pt});var L,U,F="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),B="undefined"!=typeof Map,H="undefined"!=typeof Set,$="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,V=F?Symbol.for("immer-nothing"):((L={})["immer-nothing"]=!0,L),z=F?Symbol.for("immer-draftable"):"__$immer_draftable",q=F?Symbol.for("immer-state"):"__$immer_state",W=("undefined"!=typeof Symbol&&Symbol.iterator,""+Object.prototype.constructor),G="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Z=Object.getOwnPropertyDescriptors||function(e){var t={};return G(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},K={},J={get:function(e,t){if(t===q)return e;var n=h(e);if(!l(n,t))return function(e,t,n){var r,o=I(t,n);return o?"value"in o?o.value:null===(r=o.get)||void 0===r?void 0:r.call(e.k):void 0}(e,n,t);var r=n[t];return e.I||!i(r)?r:r===N(e.t,t)?(A(e),e.o[t]=D(e.A.h,r,e)):r},has:function(e,t){return t in h(e)},ownKeys:function(e){return Reflect.ownKeys(h(e))},set:function(e,t,n){var r=I(h(e),t);if(null==r?void 0:r.set)return r.set.call(e.k,n),!0;if(!e.P){var o=N(h(e),t),i=null==o?void 0:o[q];if(i&&i.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(p(n,o)&&(void 0!==n||l(e.t,t)))return!0;A(e),k(e)}return e.o[t]===n&&"number"!=typeof n&&(void 0!==n||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==N(e.t,t)||t in e.t?(e.D[t]=!1,A(e),k(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=h(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:r.enumerable,value:n[t]}:r},defineProperty:function(){r(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){r(12)}},X={};a(J,(function(e,t){X[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),X.deleteProperty=function(e,t){return X.set.call(this,e,t,void 0)},X.set=function(e,t,n){return J.set.call(this,e[0],t,n,e[0])};var Q=function(){function e(e){var t=this;this.g=$,this.F=!0,this.produce=function(e,n,o){if("function"==typeof e&&"function"!=typeof n){var s=n;n=e;var a=t;return function(e){var t=this;void 0===e&&(e=s);for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return a.produce(e,(function(e){var r;return(r=n).call.apply(r,[t,e].concat(o))}))}}var c;if("function"!=typeof n&&r(6),void 0!==o&&"function"!=typeof o&&r(7),i(e)){var l=_(t),u=D(t,e,void 0),p=!0;try{c=n(u),p=!1}finally{p?j(l):S(l)}return"undefined"!=typeof Promise&&c instanceof Promise?c.then((function(e){return w(l,o),C(e,l)}),(function(e){throw j(l),e})):(w(l,o),C(c,l))}if(!e||"object"!=typeof e){if(void 0===(c=n(e))&&(c=e),c===V&&(c=void 0),t.F&&m(c,!0),o){var d=[],f=[];g("Patches").M(e,c,d,f),o(d,f)}return c}r(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var r=arguments.length,o=Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(o))}))};var r,o,i=t.produce(e,n,(function(e,t){r=e,o=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,r,o]})):[i,r,o]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){i(e)||r(8),o(e)&&(e=R(e));var t=_(this),n=D(this,e,void 0);return n[q].C=!0,S(t),n},t.finishDraft=function(e,t){var n=(e&&e[q]).A;return w(n,t),C(void 0,n)},t.setAutoFreeze=function(e){this.F=e},t.setUseProxies=function(e){e&&!$&&r(20),this.g=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var i=g("Patches").$;return o(e)?i(e,t):this.produce(e,(function(e){return i(e,t)}))},e}(),Y=new Q,ee=Y.produce;Y.produceWithPatches.bind(Y),Y.setAutoFreeze.bind(Y),Y.setUseProxies.bind(Y),Y.applyPatches.bind(Y),Y.createDraft.bind(Y),Y.finishDraft.bind(Y);const te=ee;var ne=n(4942);function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){(0,ne.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ie(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var se="function"==typeof Symbol&&Symbol.observable||"@@observable",ae=function(){return Math.random().toString(36).substring(7).split("").join(".")},ce={INIT:"@@redux/INIT"+ae(),REPLACE:"@@redux/REPLACE"+ae(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ae()}};function le(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ue(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(ie(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(ie(1));return n(ue)(e,t)}if("function"!=typeof e)throw new Error(ie(2));var o=e,i=t,s=[],a=s,c=!1;function l(){a===s&&(a=s.slice())}function u(){if(c)throw new Error(ie(3));return i}function p(e){if("function"!=typeof e)throw new Error(ie(4));if(c)throw new Error(ie(5));var t=!0;return l(),a.push(e),function(){if(t){if(c)throw new Error(ie(6));t=!1,l();var n=a.indexOf(e);a.splice(n,1),s=null}}}function d(e){if(!le(e))throw new Error(ie(7));if(void 0===e.type)throw new Error(ie(8));if(c)throw new Error(ie(9));try{c=!0,i=o(i,e)}finally{c=!1}for(var t=s=a,n=0;n<t.length;n++)(0,t[n])();return e}function f(e){if("function"!=typeof e)throw new Error(ie(10));o=e,d({type:ce.REPLACE})}function h(){var e,t=p;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(ie(11));function n(){e.next&&e.next(u())}return n(),{unsubscribe:t(n)}}})[se]=function(){return this},e}return d({type:ce.INIT}),(r={dispatch:d,subscribe:p,getState:u,replaceReducer:f})[se]=h,r}var pe=ue;function de(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}var i,s=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:ce.INIT}))throw new Error(ie(12));if(void 0===n(void 0,{type:ce.PROBE_UNKNOWN_ACTION()}))throw new Error(ie(13))}))}(n)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var r=!1,o={},a=0;a<s.length;a++){var c=s[a],l=n[c],u=e[c],p=l(u,t);if(void 0===p)throw t&&t.type,new Error(ie(14));o[c]=p,r=r||p!==u}return(r=r||s.length!==Object.keys(e).length)?o:e}}function fe(e,t){return function(){return t(e.apply(this,arguments))}}function he(e,t){if("function"==typeof e)return fe(e,t);if("object"!=typeof e||null===e)throw new Error(ie(16));var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=fe(o,t))}return n}function ye(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function me(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error(ie(15))},o={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return r=ye.apply(void 0,i)(n.dispatch),oe(oe({},n),{},{dispatch:r})}}}var be=n(573);function ve(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(o){return"function"==typeof o?o(n,r,e):t(o)}}}}var ge=ve();ge.withExtraArgument=ve;const Oe=ge;var we,je=(we=function(e,t){return we=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},we(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}we(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Se=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!((o=(o=s.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},_e=function(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e},xe=Object.defineProperty,Ce=Object.defineProperties,Ee=Object.getOwnPropertyDescriptors,Pe=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,Ie=function(e,t,n){return t in e?xe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},ke=function(e,t){for(var n in t||(t={}))Te.call(t,n)&&Ie(e,n,t[n]);if(Pe)for(var r=0,o=Pe(t);r<o.length;r++)n=o[r],Ne.call(t,n)&&Ie(e,n,t[n]);return e},Ae=function(e,t){return Ce(e,Ee(t))},De=function(e,t,n){return new Promise((function(r,o){var i=function(e){try{a(n.next(e))}catch(e){o(e)}},s=function(e){try{a(n.throw(e))}catch(e){o(e)}},a=function(e){return e.done?r(e.value):Promise.resolve(e.value).then(i,s)};a((n=n.apply(e,t)).next())}))},Re=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=be.createSelector.apply(void 0,e),r=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return n.apply(void 0,_e([o(e)?R(e):e],t))};return r},Me="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?ye:ye.apply(null,arguments)};function Le(e){if("object"!=typeof e||null===e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var n=t;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return t===n}"undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var Ue=function(e){function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=e.apply(this,n)||this;return Object.setPrototypeOf(o,t.prototype),o}return je(t,e),Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.prototype.concat.apply(this,t)},t.prototype.prepend=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return 1===e.length&&Array.isArray(e[0])?new(t.bind.apply(t,_e([void 0],e[0].concat(this)))):new(t.bind.apply(t,_e([void 0],e.concat(this))))},t}(Array);function Fe(e){return i(e)?te(e,(function(){})):e}function Be(e){return"object"!=typeof e||null==e||Object.isFrozen(e)}function He(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}function $e(e){var t=typeof e;return null==e||"string"===t||"boolean"===t||"number"===t||Array.isArray(e)||Le(e)}function Ve(e,t,n,r,o){var i;if(void 0===t&&(t=""),void 0===n&&(n=$e),void 0===o&&(o=[]),!n(e))return{keyPath:t||"<root>",value:e};if("object"!=typeof e||null===e)return!1;for(var s=null!=r?r(e):Object.entries(e),a=o.length>0,c=0,l=s;c<l.length;c++){var u=l[c],p=u[0],d=u[1],f=t?t+"."+p:p;if(!(a&&o.indexOf(f)>=0)){if(!n(d))return{keyPath:f,value:d};if("object"==typeof d&&(i=Ve(d,f,n,r,o)))return i}}return!1}function ze(e){return void 0===e&&(e={}),function(){return function(e){return function(t){return e(t)}}}}function qe(e){void 0===e&&(e={});var t=e.thunk,n=void 0===t||t,r=(e.immutableCheck,e.serializableCheck,new Ue);return n&&(function(e){return"boolean"==typeof e}(n)?r.push(Oe):r.push(Oe.withExtraArgument(n.extraArgument))),r}function We(e){var t,n=function(e){return qe(e)},r=e||{},o=r.reducer,i=void 0===o?void 0:o,s=r.middleware,a=void 0===s?n():s,c=r.devTools,l=void 0===c||c,u=r.preloadedState,p=void 0===u?void 0:u,d=r.enhancers,f=void 0===d?void 0:d;if("function"==typeof i)t=i;else{if(!Le(i))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');t=de(i)}var h=a;"function"==typeof h&&(h=h(n));var y=me.apply(void 0,h),m=ye;l&&(m=Me(ke({trace:!1},"object"==typeof l&&l)));var b=[y];return Array.isArray(f)?b=_e([y],f):"function"==typeof f&&(b=f(b)),ue(t,p,m.apply(void 0,b))}function Ge(e,t){function n(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(t){var o=t.apply(void 0,n);if(!o)throw new Error("prepareAction did not return an object");return ke(ke({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:n[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(t){return t.type===e},n}function Ze(e){return["type","payload","error","meta"].indexOf(e)>-1}function Ke(e){return""+e}function Je(e){var t,n={},r=[],o={addCase:function(e,t){var r="string"==typeof e?e:e.type;if(r in n)throw new Error("addCase cannot be called with two reducers for the same action type");return n[r]=t,o},addMatcher:function(e,t){return r.push({matcher:e,reducer:t}),o},addDefaultCase:function(e){return t=e,o}};return e(o),[n,r,t]}function Xe(e,t,n,r){void 0===n&&(n=[]);var s,a="function"==typeof t?Je(t):[t,n,r],c=a[0],l=a[1],u=a[2];if(function(e){return"function"==typeof e}(e))s=function(){return Fe(e())};else{var p=Fe(e);s=function(){return p}}function d(e,t){void 0===e&&(e=s());var n=_e([c[t.type]],l.filter((function(e){return(0,e.matcher)(t)})).map((function(e){return e.reducer})));return 0===n.filter((function(e){return!!e})).length&&(n=[u]),n.reduce((function(e,n){if(n){var r;if(o(e))return void 0===(r=n(e,t))?e:r;if(i(e))return te(e,(function(e){return n(e,t)}));if(void 0===(r=n(e,t))){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return r}return e}),e)}return d.getInitialState=s,d}function Qe(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n,r="function"==typeof e.initialState?e.initialState:Fe(e.initialState),o=e.reducers||{},i=Object.keys(o),s={},a={},c={};function l(){var t="function"==typeof e.extraReducers?Je(e.extraReducers):[e.extraReducers],n=t[0],o=void 0===n?{}:n,i=t[1],s=void 0===i?[]:i,c=t[2],l=void 0===c?void 0:c,u=ke(ke({},o),a);return Xe(r,u,s,l)}return i.forEach((function(e){var n,r,i=o[e],l=t+"/"+e;"reducer"in i?(n=i.reducer,r=i.prepare):n=i,s[e]=n,a[l]=n,c[e]=r?Ge(l,r):Ge(l)})),{name:t,reducer:function(e,t){return n||(n=l()),n(e,t)},actions:c,caseReducers:s,getInitialState:function(){return n||(n=l()),n.getInitialState()}}}function Ye(e){return function(t,n){var r=function(t){var r;Le(r=n)&&"string"==typeof r.type&&Object.keys(r).every(Ze)?e(n.payload,t):e(n,t)};return o(t)?(r(t),t):te(t,r)}}function et(e,t){return t(e)}function tt(e){return Array.isArray(e)||(e=Object.values(e)),e}function nt(e,t,n){for(var r=[],o=[],i=0,s=e=tt(e);i<s.length;i++){var a=s[i],c=et(a,t);c in n.entities?o.push({id:c,changes:a}):r.push(a)}return[r,o]}function rt(e){function t(t,n){var r=et(t,e);r in n.entities||(n.ids.push(r),n.entities[r]=t)}function n(e,n){for(var r=0,o=e=tt(e);r<o.length;r++)t(o[r],n)}function r(t,n){var r=et(t,e);r in n.entities||n.ids.push(r),n.entities[r]=t}function o(e,t){var n=!1;e.forEach((function(e){e in t.entities&&(delete t.entities[e],n=!0)})),n&&(t.ids=t.ids.filter((function(e){return e in t.entities})))}function i(t,n){var r={},o={};if(t.forEach((function(e){e.id in n.entities&&(o[e.id]={id:e.id,changes:ke(ke({},o[e.id]?o[e.id].changes:null),e.changes)})})),(t=Object.values(o)).length>0){var i=t.filter((function(t){return function(t,n,r){var o=r.entities[n.id],i=Object.assign({},o,n.changes),s=et(i,e),a=s!==n.id;return a&&(t[n.id]=s,delete r.entities[n.id]),r.entities[s]=i,a}(r,t,n)})).length>0;i&&(n.ids=Object.keys(n.entities))}}function s(t,r){var o=nt(t,e,r),s=o[0];i(o[1],r),n(s,r)}return{removeAll:(a=function(e){Object.assign(e,{ids:[],entities:{}})},c=Ye((function(e,t){return a(t)})),function(e){return c(e,void 0)}),addOne:Ye(t),addMany:Ye(n),setOne:Ye(r),setMany:Ye((function(e,t){for(var n=0,o=e=tt(e);n<o.length;n++)r(o[n],t)})),setAll:Ye((function(e,t){e=tt(e),t.ids=[],t.entities={},n(e,t)})),updateOne:Ye((function(e,t){return i([e],t)})),updateMany:Ye(i),upsertOne:Ye((function(e,t){return s([e],t)})),upsertMany:Ye(s),removeOne:Ye((function(e,t){return o([e],t)})),removeMany:Ye(o)};var a,c}function ot(e){void 0===e&&(e={});var t=ke({sortComparer:!1,selectId:function(e){return e.id}},e),n=t.selectId,r=t.sortComparer,o={getInitialState:function(e){return void 0===e&&(e={}),Object.assign({ids:[],entities:{}},e)}},i={getSelectors:function(e){var t=function(e){return e.ids},n=function(e){return e.entities},r=Re(t,n,(function(e,t){return e.map((function(e){return t[e]}))})),o=function(e,t){return t},i=function(e,t){return e[t]},s=Re(t,(function(e){return e.length}));if(!e)return{selectIds:t,selectEntities:n,selectAll:r,selectTotal:s,selectById:Re(n,o,i)};var a=Re(e,n);return{selectIds:Re(e,t),selectEntities:a,selectAll:Re(e,r),selectTotal:Re(e,s),selectById:Re(a,o,i)}}},s=r?function(e,t){var n=rt(e);function r(t,n){var r=(t=tt(t)).filter((function(t){return!(et(t,e)in n.entities)}));0!==r.length&&a(r,n)}function o(e,t){0!==(e=tt(e)).length&&a(e,t)}function i(t,n){for(var r=!1,o=0,i=t;o<i.length;o++){var s=i[o],a=n.entities[s.id];if(a){r=!0,Object.assign(a,s.changes);var l=e(a);s.id!==l&&(delete n.entities[s.id],n.entities[l]=a)}}r&&c(n)}function s(t,n){var o=nt(t,e,n),s=o[0];i(o[1],n),r(s,n)}function a(t,n){t.forEach((function(t){n.entities[e(t)]=t})),c(n)}function c(n){var r=Object.values(n.entities);r.sort(t);var o=r.map(e);(function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(e[n]!==t[n])return!1;return!0})(n.ids,o)||(n.ids=o)}return{removeOne:n.removeOne,removeMany:n.removeMany,removeAll:n.removeAll,addOne:Ye((function(e,t){return r([e],t)})),updateOne:Ye((function(e,t){return i([e],t)})),upsertOne:Ye((function(e,t){return s([e],t)})),setOne:Ye((function(e,t){return o([e],t)})),setMany:Ye(o),setAll:Ye((function(e,t){e=tt(e),t.entities={},t.ids=[],r(e,t)})),addMany:Ye(r),updateMany:Ye(i),upsertMany:Ye(s)}}(n,r):rt(n);return ke(ke(ke({selectId:n,sortComparer:r},o),i),s)}var it=function(e){void 0===e&&(e=21);for(var t="",n=e;n--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},st=["name","message","stack","code"],at=function(e,t){this.payload=e,this.meta=t},ct=function(e,t){this.payload=e,this.meta=t},lt=function(e){if("object"==typeof e&&null!==e){for(var t={},n=0,r=st;n<r.length;n++){var o=r[n];"string"==typeof e[o]&&(t[o]=e[o])}return t}return{message:String(e)}};function ut(e,t,n){var r=Ge(e+"/fulfilled",(function(e,t,n,r){return{payload:e,meta:Ae(ke({},r||{}),{arg:n,requestId:t,requestStatus:"fulfilled"})}})),o=Ge(e+"/pending",(function(e,t,n){return{payload:void 0,meta:Ae(ke({},n||{}),{arg:t,requestId:e,requestStatus:"pending"})}})),i=Ge(e+"/rejected",(function(e,t,r,o,i){return{payload:o,error:(n&&n.serializeError||lt)(e||"Rejected"),meta:Ae(ke({},i||{}),{arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)})}})),s="undefined"!=typeof AbortController?AbortController:function(){function e(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return e.prototype.abort=function(){},e}();return Object.assign((function(e){return function(a,c,l){var u,p=(null==n?void 0:n.idGenerator)?n.idGenerator(e):it(),d=new s,f=new Promise((function(e,t){return d.signal.addEventListener("abort",(function(){return t({name:"AbortError",message:u||"Aborted"})}))})),h=!1,y=function(){return De(this,null,(function(){var s,u,y,m,b;return Se(this,(function(v){switch(v.label){case 0:return v.trys.push([0,4,,5]),null===(g=m=null==(s=null==n?void 0:n.condition)?void 0:s.call(n,e,{getState:c,extra:l}))||"object"!=typeof g||"function"!=typeof g.then?[3,2]:[4,m];case 1:m=v.sent(),v.label=2;case 2:if(!1===m)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return h=!0,a(o(p,e,null==(u=null==n?void 0:n.getPendingMeta)?void 0:u.call(n,{requestId:p,arg:e},{getState:c,extra:l}))),[4,Promise.race([f,Promise.resolve(t(e,{dispatch:a,getState:c,extra:l,requestId:p,signal:d.signal,rejectWithValue:function(e,t){return new at(e,t)},fulfillWithValue:function(e,t){return new ct(e,t)}})).then((function(t){if(t instanceof at)throw t;return t instanceof ct?r(t.payload,p,e,t.meta):r(t,p,e)}))])];case 3:return y=v.sent(),[3,5];case 4:return b=v.sent(),y=b instanceof at?i(null,p,e,b.payload,b.meta):i(b,p,e),[3,5];case 5:return n&&!n.dispatchConditionRejection&&i.match(y)&&y.meta.condition||a(y),[2,y]}var g}))}))}();return Object.assign(y,{abort:function(e){h&&(u=e,d.abort())},requestId:p,arg:e,unwrap:function(){return y.then(pt)}})}}),{pending:o,rejected:i,fulfilled:r,typePrefix:e})}function pt(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var dt=function(e,t){return function(e){return e&&"function"==typeof e.match}(e)?e.match(t):e(t)};function ft(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.some((function(e){return dt(e,t)}))}}function ht(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return e.every((function(e){return dt(e,t)}))}}function yt(e,t){if(!e||!e.meta)return!1;var n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function mt(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function bt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return yt(e,["pending"])}:mt(e)?function(t){var n=e.map((function(e){return e.pending}));return ft.apply(void 0,n)(t)}:bt()(e[0])}function vt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return yt(e,["rejected"])}:mt(e)?function(t){var n=e.map((function(e){return e.rejected}));return ft.apply(void 0,n)(t)}:vt()(e[0])}function gt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(e){return e&&e.meta&&e.meta.rejectedWithValue};return 0===e.length||mt(e)?function(t){return ht(vt.apply(void 0,e),n)(t)}:gt()(e[0])}function Ot(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return yt(e,["fulfilled"])}:mt(e)?function(t){var n=e.map((function(e){return e.fulfilled}));return ft.apply(void 0,n)(t)}:Ot()(e[0])}function wt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 0===e.length?function(e){return yt(e,["pending","fulfilled","rejected"])}:mt(e)?function(t){for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push(i.pending,i.rejected,i.fulfilled)}return ft.apply(void 0,n)(t)}:wt()(e[0])}var jt=function(e,t){if("function"!=typeof e)throw new TypeError(t+" is not a function")},St=function(){},_t=function(e,t){return void 0===t&&(t=St),e.catch(t),e},xt=function(e,t){e.addEventListener("abort",t,{once:!0})},Ct=function(e,t){var n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Et="listener-cancelled",Pt=function(e){this.code=e,this.name="TaskAbortError",this.message="task cancelled (reason: "+e+")"},Tt=function(e){if(e.aborted)throw new Pt(e.reason)},Nt=function(e){return _t(new Promise((function(t,n){var r=function(){return n(new Pt(e.reason))};e.aborted?r():xt(e,r)})))},It=function(e){return function(t){return _t(Promise.race([Nt(e),t]).then((function(t){return Tt(e),t})))}},kt=function(e){var t=It(e);return function(e){return t(new Promise((function(t){return setTimeout(t,e)})))}},At=Object.assign,Dt={},Rt="listenerMiddleware",Mt=function(e){var t=e.type,n=e.actionCreator,r=e.matcher,o=e.predicate,i=e.effect;if(t)o=Ge(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error("Creating or removing a listener requires one of the known fields for matching an action");return jt(i,"options.listener"),{predicate:o,type:t,effect:i}},Lt=function(e,t,n){try{e(t,n)}catch(e){setTimeout((function(){throw e}),0)}},Ut=Ge(Rt+"/add"),Ft=Ge(Rt+"/removeAll"),Bt=Ge(Rt+"/remove"),Ht=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];console.error.apply(console,_e([Rt+"/error"],e))},$t=function(e){e.pending.forEach((function(e){Ct(e,Et)}))};function Vt(e){var t=this;void 0===e&&(e={});var n=new Map,r=e.extra,o=e.onError,i=void 0===o?Ht:o;jt(i,"onError");var s=function(e){for(var t=0,r=Array.from(n.values());t<r.length;t++){var o=r[t];if(e(o))return o}},a=function(e){var t=s((function(t){return t.effect===e.effect}));return t||(t=function(e){var t=Mt(e),n=t.type,r=t.predicate,o=t.effect;return{id:it(),effect:o,type:n,predicate:r,pending:new Set,unsubscribe:function(){throw new Error("Unsubscribe not initialized")}}}(e)),function(e){return e.unsubscribe=function(){return n.delete(e.id)},n.set(e.id,e),function(t){e.unsubscribe(),(null==t?void 0:t.cancelActive)&&$t(e)}}(t)},c=function(e){var t=Mt(e),n=t.type,r=t.effect,o=t.predicate,i=s((function(e){return("string"==typeof n?e.type===n:e.predicate===o)&&e.effect===r}));return i&&(i.unsubscribe(),e.cancelActive&&$t(i)),!!i},l=function(e,o,s,c){return De(t,null,(function(){var t,l,u;return Se(this,(function(p){switch(p.label){case 0:t=new AbortController,l=function(e,t){return function(n,r){return _t(function(n,r){return De(void 0,null,(function(){var o,i,s,a;return Se(this,(function(c){switch(c.label){case 0:Tt(t),o=function(){},i=new Promise((function(t){o=e({predicate:n,effect:function(e,n){n.unsubscribe(),t([e,n.getState(),n.getOriginalState()])}})})),s=[Nt(t),i],null!=r&&s.push(new Promise((function(e){return setTimeout(e,r,null)}))),c.label=1;case 1:return c.trys.push([1,,3,4]),[4,Promise.race(s)];case 2:return a=c.sent(),Tt(t),[2,a];case 3:return o(),[7];case 4:return[2]}}))}))}(n,r))}}(a,t.signal),p.label=1;case 1:return p.trys.push([1,3,4,5]),e.pending.add(t),[4,Promise.resolve(e.effect(o,At({},s,{getOriginalState:c,condition:function(e,t){return l(e,t).then(Boolean)},take:l,delay:kt(t.signal),pause:It(t.signal),extra:r,signal:t.signal,fork:(d=t.signal,function(e){jt(e,"taskExecutor");var t,n=new AbortController;t=n,xt(d,(function(){return Ct(t,d.reason)}));var r,o,i=(r=function(){return De(void 0,null,(function(){var t;return Se(this,(function(r){switch(r.label){case 0:return Tt(d),Tt(n.signal),[4,e({pause:It(n.signal),delay:kt(n.signal),signal:n.signal})];case 1:return t=r.sent(),Tt(n.signal),[2,t]}}))}))},o=function(){return Ct(n,"task-completed")},De(void 0,null,(function(){var e;return Se(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,4,5]),[4,Promise.resolve()];case 1:return t.sent(),[4,r()];case 2:return[2,{status:"ok",value:t.sent()}];case 3:return[2,{status:(e=t.sent())instanceof Pt?"cancelled":"rejected",error:e}];case 4:return null==o||o(),[7];case 5:return[2]}}))})));return{result:It(d)(i),cancel:function(){Ct(n,"task-cancelled")}}}),unsubscribe:e.unsubscribe,subscribe:function(){n.set(e.id,e)},cancelActiveListeners:function(){e.pending.forEach((function(e,n,r){e!==t&&(Ct(e,Et),r.delete(e))}))}})))];case 2:return p.sent(),[3,5];case 3:return(u=p.sent())instanceof Pt||Lt(i,u,{raisedBy:"effect"}),[3,5];case 4:return Ct(t,"listener-completed"),e.pending.delete(t),[7];case 5:return[2]}var d}))}))},u=function(e){return function(){e.forEach($t),e.clear()}}(n);return{middleware:function(e){return function(t){return function(r){if(Ut.match(r))return a(r.payload);if(!Ft.match(r)){if(Bt.match(r))return c(r.payload);var o,s=e.getState(),p=function(){if(s===Dt)throw new Error(Rt+": getOriginalState can only be called synchronously");return s};try{if(o=t(r),n.size>0)for(var d=e.getState(),f=Array.from(n.values()),h=0,y=f;h<y.length;h++){var m=y[h],b=!1;try{b=m.predicate(r,d,s)}catch(e){b=!1,Lt(i,e,{raisedBy:"predicate"})}b&&l(m,r,e,p)}}finally{s=Dt}return o}u()}}},startListening:a,stopListening:c,clearListeners:u}}!function(){function e(e,t){var n=i[e];return n?n.enumerable=t:i[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[q];return J.get(t,e)},set:function(t){var n=this[q];J.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var o=e[t][q];if(!o.P)switch(o.i){case 5:r(o)&&k(o);break;case 4:n(o)&&k(o)}}}function n(e){for(var t=e.t,n=e.k,r=G(n),o=r.length-1;o>=0;o--){var i=r[o];if(i!==q){var s=t[i];if(void 0===s&&!l(t,i))return!0;var a=n[i],c=a&&a[q];if(c?c.t!==s:!p(a,s))return!0}}var u=!!t[q];return r.length!==G(t).length+(u?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r<t.length;r++)if(!t.hasOwnProperty(r))return!0;return!1}var i={};!function(e,t){K[e]||(K[e]=t)}("ES5",{J:function(t,n){var r=Array.isArray(t),o=function(t,n){if(t){for(var r=Array(n.length),o=0;o<n.length;o++)Object.defineProperty(r,""+o,e(o,!0));return r}var i=Z(n);delete i[q];for(var s=G(i),a=0;a<s.length;a++){var c=s[a];i[c]=e(c,t||!!i[c].enumerable)}return Object.create(Object.getPrototypeOf(n),i)}(r,t),i={i:r?5:4,A:n?n.A:O(),P:!1,I:!1,D:{},l:n,t,k:o,o:null,O:!1,C:!1};return Object.defineProperty(o,q,{value:i,writable:!0}),o},S:function(e,n,i){i?o(n)&&n[q].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[q];if(n){var o=n.t,i=n.k,s=n.D,c=n.i;if(4===c)a(i,(function(t){t!==q&&(void 0!==o[t]||l(o,t)?s[t]||e(i[t]):(s[t]=!0,k(n)))})),a(o,(function(e){void 0!==i[e]||l(i,e)||(s[e]=!1,k(n))}));else if(5===c){if(r(n)&&(k(n),s.length=!0),i.length<o.length)for(var u=i.length;u<o.length;u++)s[u]=!1;else for(var p=o.length;p<i.length;p++)s[p]=!0;for(var d=Math.min(i.length,o.length),f=0;f<d;f++)i.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&e(i[f])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):r(e)}})}()},8601:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e,t)||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 i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.r(t),n.d(t,{MessageFormatter:()=>y,findClosingBracket:()=>p,parseCases:()=>u,pluralTypeHandler:()=>w,selectTypeHandler:()=>S,splitFormattedArgument:()=>d});var a=n(4942);function c(e){return e.reduce((function(e,t){return e.concat(Array.isArray(t)?c(t):t)}),[])}function l(e){var t={};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(e){return null===e?"null":void 0===e?"undefined":"function"==typeof e?e.toString():e instanceof Date?e.toISOString():JSON.stringify(e)})).join("|"):"_(no-args)_";if(Object.prototype.hasOwnProperty.call(t,i))return t[i];var s=e.apply(void 0,r);return t[i]=s,s}}function u(e){for(var t=function(e){return/\s/.test(e)},n=[],r={},o=0,i=null,s=!1,a=0;a<e.length;){if(s&&(t(e[a])||"{"===e[a]))s=!1,i=e.slice(o,a),"{"===e[a]&&a--;else if(!s&&!t(e[a])){var c="{"===e[a];if(i&&c){var l=p(e,a);if(-1===l)throw new Error('Unbalanced curly braces in string: "'.concat(e,'"'));r[i]=e.slice(a+1,l),a=l,i=null}else i&&(n.push(i),i=null),s=!0,o=a}a++}return s&&(i=e.slice(o)),i&&n.push(i),{args:n,cases:r}}function p(e,t){for(var n=0,r=t+1;r<e.length;r++){var o=e.charAt(r);if("}"===o){if(0===n)return r;n--}else"{"===o&&n++}return-1}function d(e){return f(e.slice(1,-1),",",3)}function f(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(!e)return r;if(1===n)return r.push(e),r;var o=e.indexOf(t);if(-1===o)return r.push(e),r;var i=e.substring(0,o).trim(),s=e.substring(o+t.length+1).trim();return r.push(i),f(s,t,n-1,r)}var h,y=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,e),(0,a.Z)(this,"format",l((function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(n.process(e,t)).join("")}))),this.locale=t,this.typeHandlers=r}var t,n;return t=e,n=[{key:"process",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return[];var n=e.indexOf("{");if(-1!==n){var r=p(e,n);if(-1===r)throw new Error('Unbalanced curly braces in string: "'.concat(e,'"'));var i=e.substring(n,r+1);if(i){var s=[],a=e.substring(0,n);a&&s.push(a);var c=d(i),l=o(c,3),u=l[0],f=l[1],h=l[2],y=t[u];null==y&&(y="");var m=f&&this.typeHandlers[f];s.push(m?m(y,h,this.locale,t,this.process.bind(this)):y);var b=e.substring(r+1);return b&&s.push(this.process(b,t)),s}}return[e]}}],n&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=0,g="other";function O(e,t){for(var n=0,r="",o=0,i={};n<e.length;){if("#"!==e[n]||o)r+=e[n];else{var s="__hashToken".concat(v++);r+="{".concat(s,", number}"),i[s]=t}"{"===e[n]?o++:"}"===e[n]&&o--,n++}return{caseBody:r,numberValues:i}}function w(e){var t=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=u(t),s=i.args,a=i.cases,c=parseInt(e);s.forEach((function(e){e.startsWith("offset:")&&(c-=parseInt(e.slice("offset:".length)))}));var l=[];if("PluralRules"in Intl){void 0!==h&&h.resolvedOptions().locale===n||(h=new Intl.PluralRules(n));var p=h.select(c);p!==g&&l.push(p)}1===c&&l.push("one"),l.push("=".concat(c),g);for(var d=0;d<l.length;d++){var f=l[d];if(f in a){var y=O(a[f],c),m=y.caseBody,v=y.numberValues;return o(m,b(b({},r),v))}}return e}var j="other";function S(e){var t=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=u(t),i=o.cases;return e in i?r(i[e],n):j in i?r(i.other,n):e}},2574:e=>{"use strict";function t(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function r(){this._defaults=[]}for(var o=function(){var e=s[i];r.prototype[e]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this._defaults.push({fn:e,args:n}),this}},i=0,s=["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert","disableTLSCerts"];i<s.length;i++)o();r.prototype._setDefaults=function(e){var r,o,i=function(e,n){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=t(e))){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},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 s,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw s}}}}(this._defaults);try{for(i.s();!(r=i.n()).done;){var s=r.value;e[s.fn].apply(e,function(e){if(Array.isArray(e))return n(e)}(o=s.args)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||t(o)||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(e){i.e(e)}finally{i.f()}},e.exports=r},1766:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i;"undefined"!=typeof window?i=window:"undefined"==typeof self?(console.warn("Using browser-only version of superagent in non-browser environment"),i=void 0):i=self;var s=n(8767),a=n(4445),c=n(2501),l=n(8842),u=n(6244),p=u.isObject,d=u.mixin,f=u.hasOwn,h=n(1253),y=n(2574);function m(){}e.exports=function(e,n){return"function"==typeof n?new t.Request("GET",e).end(n):1===arguments.length?new t.Request("GET",e):new t.Request(e,n)};var b=t=e.exports;t.Request=_,b.getXHR=function(){if(i.XMLHttpRequest&&(!i.location||"file:"!==i.location.protocol))return new XMLHttpRequest;throw new Error("Browser-only version of superagent could not find XHR")};var v="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};function g(e){if(!p(e))return e;var t=[];for(var n in e)f(e,n)&&O(t,n,e[n]);return t.join("&")}function O(e,t,n){if(void 0!==n)if(null!==n)if(Array.isArray(n)){var r,i=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 s,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,s=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw s}}}}(n);try{for(i.s();!(r=i.n()).done;)O(e,t,r.value)}catch(e){i.e(e)}finally{i.f()}}else if(p(n))for(var s in n)f(n,s)&&O(e,"".concat(t,"[").concat(s,"]"),n[s]);else e.push(encodeURI(t)+"="+encodeURIComponent(n));else e.push(encodeURI(t))}function w(e){for(var t,n,r={},o=e.split("&"),i=0,s=o.length;i<s;++i)-1===(n=(t=o[i]).indexOf("="))?r[decodeURIComponent(t)]="":r[decodeURIComponent(t.slice(0,n))]=decodeURIComponent(t.slice(n+1));return r}function j(e){return/[/+]json($|[^-\w])/i.test(e)}function S(e){this.req=e,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 t=this.xhr.status;1223===t&&(t=204),this._setStatusProperties(t),this.headers=function(e){for(var t,n,r,o,i=e.split(/\r?\n/),s={},a=0,c=i.length;a<c;++a)-1!==(t=(n=i[a]).indexOf(":"))&&(r=n.slice(0,t).toLowerCase(),o=v(n.slice(t+1)),s[r]=o);return s}(this.xhr.getAllResponseHeaders()),this.header=this.headers,this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&e._responseType?this.body=this.xhr.response:this.body="HEAD"===this.req.method?null:this._parseBody(this.text?this.text:this.xhr.response)}function _(e,t){var n=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",(function(){var e,t=null,r=null;try{r=new S(n)}catch(e){return(t=new Error("Parser is unable to parse the response")).parse=!0,t.original=e,n.xhr?(t.rawResponse=void 0===n.xhr.responseType?n.xhr.responseText:n.xhr.response,t.status=n.xhr.status?n.xhr.status:null,t.statusCode=t.status):(t.rawResponse=null,t.status=null),n.callback(t)}n.emit("response",r);try{n._isResponseOK(r)||(e=new Error(r.statusText||r.text||"Unsuccessful HTTP response"))}catch(t){e=t}e?(e.original=t,e.response=r,e.status=e.status||r.status,n.callback(e,r)):n.callback(null,r)}))}b.serializeObject=g,b.parseString=w,b.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"},b.serialize={"application/x-www-form-urlencoded":c.stringify,"application/json":a},b.parse={"application/x-www-form-urlencoded":w,"application/json":JSON.parse},d(S.prototype,h.prototype),S.prototype._parseBody=function(e){var t=b.parse[this.type];return this.req._parser?this.req._parser(this,e):(!t&&j(this.type)&&(t=b.parse["application/json"]),t&&e&&(e.length>0||e instanceof Object)?t(e):null)},S.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot ".concat(t," ").concat(n," (").concat(this.status,")"),o=new Error(r);return o.status=this.status,o.method=t,o.url=n,o},b.Response=S,s(_.prototype),d(_.prototype,l.prototype),_.prototype.type=function(e){return this.set("Content-Type",b.types[e]||e),this},_.prototype.accept=function(e){return this.set("Accept",b.types[e]||e),this},_.prototype.auth=function(e,t,n){1===arguments.length&&(t=""),"object"===r(t)&&null!==t&&(n=t,t=""),n||(n={type:"function"==typeof btoa?"basic":"auto"});var o=n.encoder?n.encoder:function(e){if("function"==typeof btoa)return btoa(e);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(e,t,n,o)},_.prototype.query=function(e){return"string"!=typeof e&&(e=g(e)),e&&this._query.push(e),this},_.prototype.attach=function(e,t,n){if(t){if(this._data)throw new Error("superagent can't mix .send() and .attach()");this._getFormData().append(e,t,n||t.name)}return this},_.prototype._getFormData=function(){return this._formData||(this._formData=new i.FormData),this._formData},_.prototype.callback=function(e,t){if(this._shouldRetry(e,t))return this._retry();var n=this._callback;this.clearTimeout(),e&&(this._maxRetries&&(e.retries=this._retries-1),this.emit("error",e)),n(e,t)},_.prototype.crossDomainError=function(){var e=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.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},_.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},_.prototype.ca=_.prototype.agent,_.prototype.buffer=_.prototype.ca,_.prototype.write=function(){throw new Error("Streaming is not supported in browser version of superagent")},_.prototype.pipe=_.prototype.write,_.prototype._isHost=function(e){return e&&"object"===r(e)&&!Array.isArray(e)&&"[object Object]"!==Object.prototype.toString.call(e)},_.prototype.end=function(e){this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=e||m,this._finalizeQueryString(),this._end()},_.prototype._setUploadTimeout=function(){var e=this;this._uploadTimeout&&!this._uploadTimeoutTimer&&(this._uploadTimeoutTimer=setTimeout((function(){e._timeoutError("Upload timeout of ",e._uploadTimeout,"ETIMEDOUT")}),this._uploadTimeout))},_.prototype._end=function(){if(this._aborted)return this.callback(new Error("The request has been aborted even before .end() was called"));var e=this;this.xhr=b.getXHR();var t=this.xhr,n=this._formData||this._data;this._setTimeouts(),t.addEventListener("readystatechange",(function(){var n=t.readyState;if(n>=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4===n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}}));var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100,100===n.percent&&clearTimeout(e._uploadTimeoutTimer)),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.addEventListener("progress",r.bind(null,"download")),t.upload&&t.upload.addEventListener("progress",r.bind(null,"upload"))}catch(e){}t.upload&&this._setUploadTimeout();try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.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||b.serialize[o?o.split(";")[0]:""];!i&&j(o)&&(i=b.serialize["application/json"]),i&&(n=i(n))}for(var s in this.header)null!==this.header[s]&&f(this.header,s)&&t.setRequestHeader(s,this.header[s]);this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0===n?null:n)},b.agent=function(){return new y};for(var x=function(){var e=E[C];y.prototype[e.toLowerCase()]=function(t,n){var r=new b.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}},C=0,E=["GET","POST","OPTIONS","PATCH","PUT","DELETE"];C<E.length;C++)x();function P(e,t,n){var r=b("DELETE",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}y.prototype.del=y.prototype.delete,b.get=function(e,t,n){var r=b("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},b.head=function(e,t,n){var r=b("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},b.options=function(e,t,n){var r=b("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.del=P,b.delete=P,b.patch=function(e,t,n){var r=b("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.post=function(e,t,n){var r=b("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.put=function(e,t,n){var r=b("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},8842:(e,t,n)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var o=n(3695),i=n(6244),s=i.isObject,a=i.hasOwn;function c(){}e.exports=c,c.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),clearTimeout(this._uploadTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,delete this._uploadTimeoutTimer,this},c.prototype.parse=function(e){return this._parser=e,this},c.prototype.responseType=function(e){return this._responseType=e,this},c.prototype.serialize=function(e){return this._serializer=e,this},c.prototype.timeout=function(e){if(!e||"object"!==r(e))return this._timeout=e,this._responseTimeout=0,this._uploadTimeout=0,this;for(var t in e)if(a(e,t))switch(t){case"deadline":this._timeout=e.deadline;break;case"response":this._responseTimeout=e.response;break;case"upload":this._uploadTimeout=e.upload;break;default:console.warn("Unknown timeout option",t)}return this},c.prototype.retry=function(e,t){return 0!==arguments.length&&!0!==e||(e=1),e<=0&&(e=0),this._maxRetries=e,this._retries=0,this._retryCallback=t,this};var l=new Set(["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"]),u=new Set([408,413,429,500,502,503,504,521,522,524]);c.prototype._shouldRetry=function(e,t){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&u.has(t.status))return!0;if(e){if(e.code&&l.has(e.code))return!0;if(e.timeout&&"ECONNABORTED"===e.code)return!0;if(e.crossDomain)return!0}return!1},c.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()},c.prototype.then=function(e,t){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 Promise((function(e,t){r.on("abort",(function(){if(!(n._maxRetries&&n._maxRetries>n._retries))if(n.timedout&&n.timedoutError)t(n.timedoutError);else{var e=new Error("Aborted");e.code="ABORTED",e.status=n.status,e.method=n.method,e.url=n.url,t(e)}})),r.end((function(n,r){n?t(n):e(r)}))}))}return this._fullfilledPromise.then(e,t)},c.prototype.catch=function(e){return this.then(void 0,e)},c.prototype.use=function(e){return e(this),this},c.prototype.ok=function(e){if("function"!=typeof e)throw new Error("Callback required");return this._okCallback=e,this},c.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},c.prototype.get=function(e){return this._header[e.toLowerCase()]},c.prototype.getHeader=c.prototype.get,c.prototype.set=function(e,t){if(s(e)){for(var n in e)a(e,n)&&this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},c.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},c.prototype.field=function(e,t,n){if(null==e)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(s(e)){for(var r in e)a(e,r)&&this.field(r,e[r]);return this}if(Array.isArray(t)){for(var o in t)a(t,o)&&this.field(e,t[o]);return this}if(null==t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=String(t)),n?this._getFormData().append(e,t,n):this._getFormData().append(e,t),this},c.prototype.abort=function(){if(this._aborted)return this;if(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req){if(o.gte(process.version,"v13.0.0")&&o.lt(process.version,"v14.0.0"))throw new Error("Superagent does not work in v13 properly with abort() due to Node.js core changes");o.gte(process.version,"v14.0.0")&&(this.req.destroyed=!0),this.req.abort()}return this.clearTimeout(),this.emit("abort"),this},c.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic ".concat(r("".concat(e,":").concat(t))));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer ".concat(e))}return this},c.prototype.withCredentials=function(e){return void 0===e&&(e=!0),this._withCredentials=e,this},c.prototype.redirects=function(e){return this._maxRedirects=e,this},c.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw new TypeError("Invalid argument");return this._maxResponseSize=e,this},c.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},c.prototype.send=function(e){var t=s(e),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(t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw new Error("Can't merge these send calls");if(t&&s(this._data))for(var r in e)a(e,r)&&(this._data[r]=e[r]);else"string"==typeof e?(n||this.type("form"),(n=this._header["content-type"])&&(n=n.toLowerCase().trim()),this._data="application/x-www-form-urlencoded"===n?this._data?"".concat(this._data,"&").concat(e):e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)||n||this.type("json"),this},c.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},c.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.includes("?")?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.slice(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.slice(0,t)+"?"+n.join("&")}}},c.prototype._appendQueryString=function(){console.warn("Unsupported")},c.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error("".concat(e+t,"ms exceeded"));r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.timedoutError=r,this.abort(),this.callback(r)}},c.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},1253:(e,t,n)=>{"use strict";var r=n(6244);function o(){}e.exports=o,o.prototype.get=function(e){return this.header[e.toLowerCase()]},o.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=r.type(t);var n=r.params(t);for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(this[o]=n[o]);this.links={};try{e.link&&(this.links=r.parseLinks(e.link))}catch(e){}},o.prototype._setStatusProperties=function(e){var t=Math.trunc(e/100);this.statusCode=e,this.status=this.statusCode,this.statusType=t,this.info=1===t,this.ok=2===t,this.redirect=3===t,this.clientError=4===t,this.serverError=5===t,this.error=(4===t||5===t)&&this.toError(),this.created=201===e,this.accepted=202===e,this.noContent=204===e,this.badRequest=400===e,this.unauthorized=401===e,this.notAcceptable=406===e,this.forbidden=403===e,this.notFound=404===e,this.unprocessableEntity=422===e}},6244:(e,t)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 s,a=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){c=!0,s=e},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw s}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){var t,n={},o=r(e.split(/ *; */));try{for(o.s();!(t=o.n()).done;){var i=t.value.split(/ *= */),s=i.shift(),a=i.shift();s&&a&&(n[s]=a)}}catch(e){o.e(e)}finally{o.f()}return n},t.parseLinks=function(e){var t,n={},o=r(e.split(/ *, */));try{for(o.s();!(t=o.n()).done;){var i=t.value.split(/ *; */),s=i[0].slice(1,-1);n[i[1].split(/ *= */)[1].slice(1,-1)]=s}}catch(e){o.e(e)}finally{o.f()}return n},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e},t.isObject=function(e){return null!==e&&"object"===n(e)},t.hasOwn=Object.hasOwn||function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(new Object(e),t)},t.mixin=function(e,n){for(var r in n)t.hasOwn(n,r)&&(e[r]=n[r])}},3718:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC3986";e.exports={default:r,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}},2501:(e,t,n)=>{"use strict";var r=n(4383),o=n(4409),i=n(3718);e.exports={formats:i,parse:o,stringify:r}},4409:(e,t,n)=>{"use strict";var r=n(4753),o=Object.prototype.hasOwnProperty,i=Array.isArray,s={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},a=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,s=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(i),l=a?i.slice(0,a.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!==(a=s.exec(i))&&p<n.depth;){if(p+=1,!n.plainObjects&&o.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(a[1])}return a&&u.push("["+i.slice(a.index)+"]"),function(e,t,n,r){for(var o=r?t:c(t,n),i=e.length-1;i>=0;--i){var s,a=e[i];if("[]"===a&&n.parseArrays)s=[].concat(o);else{s=n.plainObjects?Object.create(null):{};var l="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,u=parseInt(l,10);n.parseArrays||""!==l?!isNaN(u)&&a!==l&&String(u)===l&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(s=[])[u]=o:"__proto__"!==l&&(s[l]=o):s={0:o}}o=s}return o}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return s;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?s.charset:e.charset;return{allowDots:void 0===e.allowDots?s.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:s.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:s.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:s.comma,decoder:"function"==typeof e.decoder?e.decoder:s.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:s.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:s.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:s.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:s.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:s.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var n,l={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,p=t.parameterLimit===1/0?void 0:t.parameterLimit,d=u.split(t.delimiter,p),f=-1,h=t.charset;if(t.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?h="utf-8":"utf8=%26%2310003%3B"===d[n]&&(h="iso-8859-1"),f=n,n=d.length);for(n=0;n<d.length;++n)if(n!==f){var y,m,b=d[n],v=b.indexOf("]="),g=-1===v?b.indexOf("="):v+1;-1===g?(y=t.decoder(b,s.decoder,h,"key"),m=t.strictNullHandling?null:""):(y=t.decoder(b.slice(0,g),s.decoder,h,"key"),m=r.maybeMap(c(b.slice(g+1),t),(function(e){return t.decoder(e,s.decoder,h,"value")}))),m&&t.interpretNumericEntities&&"iso-8859-1"===h&&(m=a(m)),b.indexOf("[]=")>-1&&(m=i(m)?[m]:m),o.call(l,y)?l[y]=r.combine(l[y],m):l[y]=m}return l}(e,n):e,p=n.plainObjects?Object.create(null):{},d=Object.keys(u),f=0;f<d.length;++f){var h=d[f],y=l(h,u[h],n,"string"==typeof e);p=r.merge(p,y,n)}return!0===n.allowSparse?p:r.compact(p)}},4383:(e,t,n)=>{"use strict";var r=n(7478),o=n(4753),i=n(3718),s=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},c=Array.isArray,l=String.prototype.split,u=Array.prototype.push,p=function(e,t){u.apply(e,c(t)?t:[t])},d=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(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},y={},m=function e(t,n,i,s,a,u,d,f,m,b,v,g,O,w,j,S){for(var _,x=t,C=S,E=0,P=!1;void 0!==(C=C.get(y))&&!P;){var T=C.get(t);if(E+=1,void 0!==T){if(T===E)throw new RangeError("Cyclic object value");P=!0}void 0===C.get(y)&&(E=0)}if("function"==typeof f?x=f(n,x):x instanceof Date?x=v(x):"comma"===i&&c(x)&&(x=o.maybeMap(x,(function(e){return e instanceof Date?v(e):e}))),null===x){if(a)return d&&!w?d(n,h.encoder,j,"key",g):n;x=""}if("string"==typeof(_=x)||"number"==typeof _||"boolean"==typeof _||"symbol"==typeof _||"bigint"==typeof _||o.isBuffer(x)){if(d){var N=w?n:d(n,h.encoder,j,"key",g);if("comma"===i&&w){for(var I=l.call(String(x),","),k="",A=0;A<I.length;++A)k+=(0===A?"":",")+O(d(I[A],h.encoder,j,"value",g));return[O(N)+(s&&c(x)&&1===I.length?"[]":"")+"="+k]}return[O(N)+"="+O(d(x,h.encoder,j,"value",g))]}return[O(n)+"="+O(String(x))]}var D,R=[];if(void 0===x)return R;if("comma"===i&&c(x))D=[{value:x.length>0?x.join(",")||null:void 0}];else if(c(f))D=f;else{var M=Object.keys(x);D=m?M.sort(m):M}for(var L=s&&c(x)&&1===x.length?n+"[]":n,U=0;U<D.length;++U){var F=D[U],B="object"==typeof F&&void 0!==F.value?F.value:x[F];if(!u||null!==B){var H=c(x)?"function"==typeof i?i(L,F):L:L+(b?"."+F:"["+F+"]");S.set(t,E);var $=r();$.set(y,S),p(R,e(B,H,i,s,a,u,d,f,m,b,v,g,O,w,j,$))}}return R};e.exports=function(e,t){var n,o=e,l=function(e){if(!e)return h;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i.default;if(void 0!==e.format){if(!s.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=i.formatters[n],o=h.filter;return("function"==typeof e.filter||c(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:void 0===e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:void 0===e.delimiter?h.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:h.encode,encoder:"function"==typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:o,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}}(t);"function"==typeof l.filter?o=(0,l.filter)("",o):c(l.filter)&&(n=l.filter);var u,d=[];if("object"!=typeof o||null===o)return"";u=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=a[u];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var y="comma"===f&&t&&t.commaRoundTrip;n||(n=Object.keys(o)),l.sort&&n.sort(l.sort);for(var b=r(),v=0;v<n.length;++v){var g=n[v];l.skipNulls&&null===o[g]||p(d,m(o[g],g,f,y,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,b))}var O=d.join(l.delimiter),w=!0===l.addQueryPrefix?"?":"";return l.charsetSentinel&&("iso-8859-1"===l.charset?w+="utf8=%26%2310003%3B&":w+="utf8=%E2%9C%93&"),O.length>0?w+O:""}},4753:(e,t,n)=>{"use strict";var r=n(3718),o=Object.prototype.hasOwnProperty,i=Array.isArray,s=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),a=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:a,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],s=o.obj[o.prop],a=Object.keys(s),c=0;c<a.length;++c){var l=a[c],u=s[l];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:s,prop:l}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,o,i){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var c="",l=0;l<a.length;++l){var u=a.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+=a.charAt(l):u<128?c+=s[u]:u<2048?c+=s[192|u>>6]+s[128|63&u]:u<55296||u>=57344?c+=s[224|u>>12]+s[128|u>>6&63]+s[128|63&u]:(l+=1,u=65536+((1023&u)<<10|1023&a.charCodeAt(l)),c+=s[240|u>>18]+s[128|u>>12&63]+s[128|u>>6&63]+s[128|63&u])}return c},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(i(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!o.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var s=t;return i(t)&&!i(n)&&(s=a(t,r)),i(t)&&i(n)?(n.forEach((function(n,i){if(o.call(t,i)){var s=t[i];s&&"object"==typeof s&&n&&"object"==typeof n?t[i]=e(s,n,r):t.push(n)}else t[i]=n})),t):Object.keys(n).reduce((function(t,i){var s=n[i];return o.call(t,i)?t[i]=e(t[i],s,r):t[i]=s,t}),s)}}},2112:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultConfig=t.typingTimeout=t.defaultTransitionTimeMs=t.maxCharacterSrDebounceDelay=t.maxCharacterWarningLimit=t.activitySendDelay=t.screenReaderDebounceDelaySeconds=t.newMessageScreenReaderWait=t.unreadScreenReaderWait=t.userParticipantId=t.apiVersion=t.CSS_NAME=void 0,t.CSS_NAME="cvco",t.apiVersion="2",t.userParticipantId="seamly-client-participant",t.unreadScreenReaderWait=2e3,t.newMessageScreenReaderWait=1e3,t.screenReaderDebounceDelaySeconds=10,t.activitySendDelay=15e3,t.maxCharacterWarningLimit=50,t.maxCharacterSrDebounceDelay=300,t.defaultTransitionTimeMs=300,t.typingTimeout=2e3,t.defaultConfig={namespace:"default",layoutMode:"window",messages:{agent:{showAvatar:!1,showName:!1},user:{showAvatar:!1,showName:!1},timeIndicator:{enabled:!1,threshold:36e5}}}},4134:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resetApp=t.initializeApp=void 0;const i=n(575),s=o(n(3872)),a=o(n(9060)),c=n(915),l=n(59),u=n(5234),p=n(5740);t.initializeApp=(0,i.createAsyncThunk)("initializeApp",((e,{extra:{api:t,config:n},rejectWithValue:o,dispatch:i})=>r(void 0,void 0,void 0,(function*(){var e,r,i,c;let l=null===(e=null==n?void 0:n.context)||void 0===e?void 0:e.locale;try{if(t.hasConversation()){const e=yield t.getConversationIntitialState();return l=(null===(r=e.translation)||void 0===r?void 0:r.locale)||l,{initialState:e,locale:l,config:n}}return(null===(i=null==n?void 0:n.context)||void 0===i?void 0:i.topic)&&t.send("action",{type:p.actionTypes.setTopic,body:{name:n.context.topic,fallbackMessage:n.context.topic}}),(null===(c=null==n?void 0:n.context)||void 0===c?void 0:c.translationLocale)&&(l=n.context.translationLocale,t.send("action",{type:p.actionTypes.setTranslation,body:{enabled:!0,locale:l}})),{initialState:void 0,locale:l,config:n}}catch(e){if(e instanceof s.default){const e=new s.default;return o({name:e.name,message:e.message,originalEvent:e.originalEvent,originalError:e.originalError,action:e.action})}const t=new a.default;return o({name:t.name,message:t.message,langKey:t.langKey})}})))),t.resetApp=(0,i.createAsyncThunk)("resetApp",((e,{dispatch:n,extra:{api:o}})=>r(void 0,void 0,void 0,(function*(){yield o.disconnect(),yield o.clearStore(),n((0,c.resetConfig)()),yield n((0,c.initializeConfig)());try{const{locale:e}=yield n((0,t.initializeApp)()).unwrap();yield n((0,l.setLocale)(e))}catch(e){}n((0,u.initializeVisibility)())}))))},5865:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectUserHasResponded=void 0;const r=n(575);t.selectUserHasResponded=(0,r.createSelector)((({app:e})=>e),(({userHasResponded:e})=>e))},5150:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setHasResponded=t.appSlice=void 0;const r=n(575),o=n(4134),i={userHasResponded:!1};t.appSlice=(0,r.createSlice)({name:"app",initialState:i,reducers:{setHasResponded:(e,{payload:t})=>{e.userHasResponded=t}},extraReducers:e=>{e.addCase(o.resetApp.pending,(()=>i)).addCase(o.initializeApp.fulfilled,((e,{payload:t})=>{var n;t.initialState&&"userResponded"in t.initialState&&(e.userHasResponded=null===(n=t.initialState)||void 0===n?void 0:n.userResponded)}))}}),t.setHasResponded=t.appSlice.actions.setHasResponded,t.default=t.appSlice.reducer},915:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.resetConfig=t.initializeConfig=void 0;const i=n(575),s=o(n(9060));t.initializeConfig=(0,i.createAsyncThunk)("initializeConfig",((e,{extra:{api:t,config:n},rejectWithValue:o})=>r(void 0,void 0,void 0,(function*(){var e;try{const{features:r,defaultLocale:o,preChat:i,agentParticipant:s,userParticipant:a,startChatIcon:c}=yield t.getConfig(),l=(null===(e=null==n?void 0:n.context)||void 0===e?void 0:e.locale)||o,{connectWhenInView:u}=n;return{features:r,defaultLocale:o,preChat:i,agentParticipant:s,userParticipant:a,startChatIcon:c,locale:l,connectWhenInView:u}}catch(e){const t=new s.default;return o({name:t.name,langKey:t.langKey,message:t.message})}})))),t.resetConfig=(0,i.createAsyncThunk)("resetConfig",((e,{extra:{config:t}})=>r(void 0,void 0,void 0,(function*(){return t}))))},6065:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useStartChatIcon=t.useParticipants=t.useConfig=void 0;const r=n(4788),o=n(6113);t.useConfig=()=>(0,o.useSelector)(r.selectConfig),t.useParticipants=function(){const{agentParticipant:e,userParticipant:n}=(0,t.useConfig)();return{agent:e,user:n}},t.useStartChatIcon=function(){const{startChatIcon:e}=(0,t.useConfig)();return e}},4788:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectConfig=void 0;const r=n(575),o=n(2629);t.selectConfig=(0,r.createSelector)((({config:e})=>e),(e=>{let t=Object.assign({visible:"inline"===(null==e?void 0:e.layoutMode)?o.visibilityStates.open:o.visibilityStates.minimized,appContainerClassNames:e.appContainerClassNames||[]},e);return"function"==typeof t.appContainerClassNames&&(t=Object.assign(Object.assign({},t),{appContainerClassNames:t.appContainerClassNames(t)})),t}))},3394:function(e,t,n){"use strict";var r,o=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.setPreChatEvents=t.updateConfig=t.setConfig=t.configSlice=t.initialConfigState=void 0;const i=n(575),s=n(2112),a=n(915),c=n(4959);t.initialConfigState=Object.assign(Object.assign({},s.defaultConfig),{api:{domain:"",key:"",secure:!0},hideOnNoUserResponse:!1,connectWhenInView:!0,showDisclaimer:!1,showFaq:!1,showSuggestions:!0,customComponents:{},defaults:{visible:null},preChatEvents:[]});const l=["hideOnNoUserResponse","connectWhenInView","showDisclaimer","showFaq","showSuggestions","namespace","customComponents","defaults","layoutMode","api","zIndex","context","appContainerClassNames","messages","visible","visibilityCallback","errorCallback","agentParticipant","userParticipant","startChatIcon"],u=(e,t)=>{const n=(0,c.pick)(t,l),{messages:r}=n,i=o(n,["messages"]);let s=e;return Object.keys(i).length>0&&(s=Object.assign(Object.assign({},s),i)),r&&(s=Object.assign(Object.assign({},s),{messages:Object.assign(Object.assign({},s.messages),r)})),s};t.configSlice=(0,i.createSlice)({name:"config",initialState:t.initialConfigState,reducers:{setConfig:(e,{payload:t})=>u(e,t),updateConfig:(e,{payload:t})=>u(e,t),setPreChatEvents:(e,{payload:{events:t}})=>{e.preChatEvents=t}},extraReducers:e=>{e.addCase(a.resetConfig.fulfilled,(e=>e)).addCase(a.initializeConfig.fulfilled,((e,{payload:{preChat:t,agentParticipant:n,userParticipant:r,startChatIcon:o}})=>{e.preChatEvents=t.map((e=>({type:"message",payload:e}))),e.agentParticipant=n,e.userParticipant=r,e.startChatIcon=o}))}}),r=t.configSlice.actions,t.setConfig=r.setConfig,t.updateConfig=r.updateConfig,t.setPreChatEvents=r.setPreChatEvents,t.default=t.configSlice.reducer},4189:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Consumer=t.Provider=void 0;const r=(0,n(7210).createContext)({handleSubmit:()=>{},isSubmitted:!1,isValid:!1,updateControlValue:()=>{},updateControlTouched:()=>{},errors:void 0});t.default=r,t.Provider=r.Provider,t.Consumer=r.Consumer},7346:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useFormControl=t.useValidations=t.useForm=t.useFormContext=void 0;const o=n(4972),i=n(9141),s=n(9207),a=n(6113),c=r(n(4189)),l=n(1361);function u(){return(0,s.useContext)(c.default)}t.useFormContext=u,t.useForm=function(){const{handleSubmit:e,isSubmitted:t,isValid:n}=u();return{handleSubmit:e,isSubmitted:t,isValid:n}},t.useValidations=function(e,t){const n=(0,s.useMemo)((()=>(0,l.validate)(e,t)),[e,t]);return{isValid:0===Object.keys(n).length,errors:n}},t.useFormControl=function(e){const t=(0,a.useDispatch)(),{formId:n,updateControlValue:r,updateControlTouched:c,errors:l}=u(),p=!!(0,a.useSelector)((e=>(0,i.getFormById)(e,{formId:n}))),d=(0,a.useSelector)((t=>(0,i.getControlValueByName)(t,{formId:n,name:e}))),f=(0,a.useSelector)((t=>(0,i.getControlTouchedByName)(t,{formId:n,name:e}))),h=null==l?void 0:l[e],y=!h;(0,s.useEffect)((()=>{p&&t((0,o.registerControl)({formId:n,name:e}))}),[p,n,e,t]),(0,s.useLayoutEffect)((()=>()=>{t((0,o.deregisterControl)({formId:n,name:e}))}),[p,n,e,t]);const m=(0,s.useCallback)((t=>r(e,t.target.value)),[e,r]),b=(0,s.useCallback)((()=>{c(e,!0)}),[c,e]);return[(0,s.useMemo)((()=>({name:e,onInput:m,onBlur:b,value:d})),[e,m,b,d]),(0,s.useMemo)((()=>({isValid:y,error:h,touched:f})),[y,h,f])]}},9141:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getControlTouchedByName=t.getControlValueByName=t.getFormValuesByFormId=t.getFormControlsByFormId=t.getFormById=t.getState=void 0;const r=n(575);t.getState=({forms:e})=>e,t.getFormById=(0,r.createSelector)(t.getState,((e,{formId:t})=>t),((e,t)=>e[t])),t.getFormControlsByFormId=(0,r.createSelector)(t.getFormById,(e=>(null==e?void 0:e.controls)||{})),t.getFormValuesByFormId=(0,r.createSelector)(t.getFormControlsByFormId,(e=>{const t={};return Object.entries(e).forEach((([e,{value:n}])=>{t[e]=n})),t})),t.getControlValueByName=(0,r.createSelector)(t.getFormControlsByFormId,((e,{name:t})=>t),((e,t)=>{var n;return null===(n=e[t])||void 0===n?void 0:n.value})),t.getControlTouchedByName=(0,r.createSelector)(t.getFormControlsByFormId,((e,{name:t})=>t),((e,t)=>{var n;return null===(n=e[t])||void 0===n?void 0:n.touched}))},4972:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.updateControlTouched=t.updateControlValue=t.deregisterControl=t.registerControl=t.deregisterForm=t.registerForm=t.formsSlice=void 0;const o=n(575),i=n(4134),s={controls:{}},a={value:"",touched:!1},c={controls:a};t.formsSlice=(0,o.createSlice)({name:"forms",initialState:c,reducers:{registerForm:(e,{payload:{persistData:t,formId:n}})=>{var r;const o=t&&null!==(r=e[n])&&void 0!==r?r:Object.assign(Object.assign({},s),{persistData:t});e[n]=o},deregisterForm:(e,{payload:{formId:t}})=>{var n;return(null===(n=e[t])||void 0===n?void 0:n.persistData)||delete e[t],e},registerControl:(e,{payload:{name:t,formId:n}})=>{e[n].controls={[t]:a}},deregisterControl:(e,{payload:{name:t,formId:n}})=>{const r=e[n];if(!r)return e;if(r.persistData)return e;const o=Object.assign({},r.controls);return delete o[t],Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},r),{controls:o})})},updateControlValue:(e,{payload:{formId:t,name:n,value:r}})=>{var o;(null===(o=e[t])||void 0===o?void 0:o.controls)&&(e[t].controls[n].value=r)},updateControlTouched:(e,{payload:{formId:t,name:n,touched:r}})=>{var o;(null===(o=e[t])||void 0===o?void 0:o.controls[n])&&(e[t].controls[n].touched=r)}},extraReducers:e=>{e.addCase(i.resetApp.pending,(()=>c))}}),r=t.formsSlice.actions,t.registerForm=r.registerForm,t.deregisterForm=r.deregisterForm,t.registerControl=r.registerControl,t.deregisterControl=r.deregisterControl,t.updateControlValue=r.updateControlValue,t.updateControlTouched=r.updateControlTouched,t.default=t.formsSlice.reducer},1361:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validate=void 0,t.validate=function(e,t={}){return Object.entries(t).reduce(((t,[n,r])=>{var o;const i=Array.isArray(r)?r:[r];for(let r=0;null!==(o=r<(null==i?void 0:i.length))&&void 0!==o&&o;r++)if(!i[r].fn(e[n],i[r].compareValue)){t[n]=i[r].errorText;break}return t}),{})}},59:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.setLocale=void 0;const o=n(575);t.setLocale=(0,o.createAsyncThunk)("setLocale",((e,{extra:{api:t}})=>r(void 0,void 0,void 0,(function*(){return{translations:yield t.getTranslations(e),locale:e}}))),{condition:(e,{getState:t})=>{const{i18n:{isLoading:n,locale:r}}=t();if(e===r||n)return!1}})},546:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useI18n=void 0;const s=n(8601),a=n(9207),c=n(6113),l=i(n(7658)),u=new s.MessageFormatter("en-GB",{plural:s.pluralTypeHandler,select:s.selectTypeHandler});t.useI18n=function(){const e=(0,c.useSelector)(l.selectTranslations),t=(0,c.useSelector)(l.selectLocale),n=(0,c.useSelector)(l.selectInitialLocale),r=(0,c.useSelector)((e=>e.i18n.isLoading));return{t:(0,a.useCallback)(((n,o={})=>{const i=e[n];return i?u.format(i,o):(r||console.warn(`Translation key: ${n} is missing in locale: ${t}`),null)}),[e,t,r]),locale:t,initialLocale:n}}},7658:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectLocale=t.selectInitialLocale=t.selectTranslations=void 0;const r=n(573);t.selectTranslations=(0,r.createSelector)((({i18n:e})=>e),(({translations:e})=>e)),t.selectInitialLocale=(0,r.createSelector)((({i18n:e})=>e),(({initialLocale:e})=>e)),t.selectLocale=(0,r.createSelector)((({i18n:e})=>e),(({locale:e})=>e))},5217:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.setTranslations=t.setInitialLocale=t.i18nSlice=void 0;const o=n(575),i=n(915),s=n(59);t.i18nSlice=(0,o.createSlice)({name:"app",initialState:{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,locale:void 0},reducers:{setInitialLocale:(e,t)=>{e.initialLocale=t.payload},setTranslations:(e,{payload:t})=>{e.translations=t}},extraReducers:e=>{e.addCase(i.initializeConfig.fulfilled,((e,{payload:t})=>{e.initialLocale=t.locale})).addCase(s.setLocale.pending,(e=>{e.isLoading=!0})).addCase(s.setLocale.rejected,(e=>{e.isLoading=!1})).addCase(s.setLocale.fulfilled,((e,{payload:t})=>{e.isLoading=!1,(null==t?void 0:t.translations)&&(e.locale=t.locale,e.translations=Object.keys(t.translations).sort().reduce(((e,n)=>Object.assign(Object.assign({},e),{[n]:t.translations[n]})),{}))}))}}),r=t.i18nSlice.actions,t.setInitialLocale=r.setInitialLocale,t.setTranslations=r.setTranslations,t.default=t.i18nSlice.reducer},8877:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useInterrupt=void 0;const s=n(546),a=n(9207),c=n(6113),l=i(n(5373));t.useInterrupt=function(){const{t:e}=(0,s.useI18n)(),t=(0,c.useSelector)(l.selectError);return{hasInterrupt:Boolean(t),meta:(0,a.useMemo)((()=>{if(!t)return{};const{langKey:n,action:r}=t,o=e(`${n}.title`),i=e(`${n}.message`),s=e(`${n}.srText`),a=e(`${n}.buttonText`);return Object.assign(Object.assign(Object.assign(Object.assign({},n?{title:o,message:i,srText:s}:{}),r?{action:r}:{}),r&&n?{buttonText:a}:{}),{originalError:t})}),[e,t]),error:t}}},117:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(3317)),i=r(n(662)),s=r(n(7865)),a=r(n(3872)),c=r(n(9638)),l=r(n(9060)),u=n(5560),p=[i.default,o.default,a.default,s.default,c.default,l.default];t.default=function({api:e}){return()=>t=>n=>{const{payload:r,type:o}=n;if(o===u.setInterrupt.type){if(!p.some((e=>r.name===e.name)))throw new Error(r);"reset"===r.action&&e.disconnect().then((()=>{e.clearStore()}))}return t(n)}}},5373:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectError=void 0;const r=n(575);t.selectError=(0,r.createSelector)((({interrupt:e})=>e),(({error:e})=>e))},5560:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.clearInterrupt=t.setInterrupt=t.interruptSlice=void 0;const o=n(575),i=n(4134),s=n(915),a=n(59),c=n(5234),l={error:void 0};t.interruptSlice=(0,o.createSlice)({name:"interrupt",initialState:l,reducers:{setInterrupt:(e,t)=>{e.error=t.payload},clearInterrupt:()=>l},extraReducers:e=>{e.addCase(i.resetApp.fulfilled,(()=>l)).addMatcher((0,o.isAnyOf)(i.initializeApp.rejected,s.initializeConfig.rejected,a.setLocale.rejected,c.setVisibility.rejected,c.initializeVisibility.rejected),((e,{payload:t})=>{e.error=t}))}}),r=t.interruptSlice.actions,t.setInterrupt=r.setInterrupt,t.clearInterrupt=r.clearInterrupt,t.default=t.interruptSlice.reducer},2752:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useAppDispatch=t.createStore=void 0;const o=n(575),i=r(n(5150)),s=r(n(3394)),a=n(2285),c=r(n(4972)),l=r(n(5217)),u=r(n(117)),p=r(n(5560)),d=r(n(2190)),f=r(n(1153)),h=r(n(3128)),y=r(n(841)),m=r(n(579)),b=n(6113);t.createStore=function({initialState:e,api:t,eventBus:n,config:r}){return(0,o.configureStore)({reducer:{state:f.default,app:i.default,config:s.default,i18n:l.default,translations:y.default,visibility:m.default,forms:c.default,interrupt:p.default},preloadedState:e,middleware:e=>e({thunk:{extraArgument:{api:t,eventBus:n,config:r}},serializableCheck:!1}).concat([(0,a.createErrorsMiddleware)({api:t}),(0,u.default)({api:t}),(0,d.default)({api:t}),h.default])})},t.useAppDispatch=b.useDispatch},1153:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.stopIdleDetachCountdownCounter=t.showOption=t.setUserSelectedOptions=t.setUserSelectedOption=t.setUserEntryType=t.setUploadProgress=t.setUploadError=t.setUploadComplete=t.setServiceEntryMetadata=t.setServiceDataItem=t.setSeamlyContainerElement=t.setParticipant=t.setLoadedImageEventIds=t.setIsLoading=t.setInitialState=t.setHistory=t.setHeaderTitle=t.setHeaderSubTitle=t.setFeatures=t.setFeatureEnabledState=t.setEventsRead=t.setBlockAutoEntrySwitch=t.setActiveService=t.setActiveEntryType=t.resetHistoryLoadedFlag=t.registerUpload=t.initResumeConversationPrompt=t.initIdleDetachCountdown=t.hideOption=t.decrementIdleDetachCountdownCounter=t.clearResumeConversationPrompt=t.clearIdleDetachCountdown=t.clearFeatures=t.clearEvents=t.clearAllUploads=t.addEvent=t.ackEvent=t.storeSlice=t.initialStoreState=t.mergeHistory=t.orderHistory=t.isUnreadMessage=void 0;const o=n(575),i=n(4134),s=n(915),a=n(9643),c=n(4959),l=n(5740);t.isUnreadMessage=({type:e,payload:t})=>e===l.eventTypes.message&&!t.fromClient||e===l.eventTypes.info&&t.type===l.payloadTypes.text,t.orderHistory=e=>e.sort((({payload:{occurredAt:e}},{payload:{occurredAt:t}})=>e-t)),t.mergeHistory=(e,n)=>{const r=e.filter((e=>!n.some((t=>t.payload.id===e.payload.id)))),o=n.filter((e=>!("participant"===e.type&&!e.payload.participant.introduction))).reverse();return(0,t.orderHistory)([...o,...r])};const u=(e,t)=>{if(!e)return{participants:{},currentAgent:""};const{participants:n}=e||{participants:{}},{id:r,avatar:o,name:i,introduction:s}=t.participant,a=n[r],c=Object.assign(Object.assign({},n),{[r]:a?Object.assign(Object.assign(Object.assign(Object.assign({},a),o?{avatar:o}:{}),i?{name:i}:{}),s?{introduction:s}:{}):t.participant});return Object.assign(Object.assign({},e),{participants:c,currentAgent:e.currentAgent===r||t.fromClient?e.currentAgent:r})},p=(e,t)=>{const n="message"===t.type?null==t?void 0:t.payload.entry:{},{blockAutoEntrySwitch:r}=e;if(!n)return Object.assign(Object.assign({},e),{optionsOverride:{}});const{type:o,options:i}=n;let s=e.active;return r||o===e.userSelected||(s=o),Object.assign(Object.assign({},e),{active:s,optionsOverride:Object.assign(Object.assign({},e.optionsOverride),{[o]:i||{}})})};t.initialStoreState={events:[],initialState:{userResponded:!1},unreadEvents:0,userHasResponded:!1,loadedImageEventIds:[],isLoading:!1,idleDetachCountdown:{hasCountdown:!1,isActive:!1,remaining:void 0,wasStopped:void 0,count:void 0,timer:void 0},resumeConversationPrompt:!1,serviceInfo:{activeServiceSessionId:""},participantInfo:{participants:{},currentAgent:""},headerTitles:{title:null,subTitle:""},historyLoaded:!1,skiplinkTargetId:(0,a.randomId)(),optionsButtonId:(0,a.randomId)(),headerCollapseButtonId:(0,a.randomId)(),serviceData:{},options:{features:{},panelActive:!1,optionActive:"",userSelectedOptions:{}},showFileUpload:!1,currentUploads:[],entryMeta:{default:l.entryTypes.text,active:l.entryTypes.text,userSelected:null,blockAutoEntrySwitch:!1,options:{},optionsOverride:{}},seamlyContainerElement:null},t.storeSlice=(0,o.createSlice)({name:"store",initialState:t.initialStoreState,reducers:{addEvent:(e,n)=>{var r,o;const{type:i,payload:s}=n.payload,c=e.options.features.hasOwnProperty(l.featureKeys.uploads);let u=Object.assign({},e.options);if(c&&(i===l.eventTypes.message||i===l.eventTypes.participant)&&!s.fromClient){const e="message"===i?null===(r=s.entry)||void 0===r?void 0:r.type:{};u=Object.assign(Object.assign({},u),{features:Object.assign(Object.assign({},u.features),{uploads:Object.assign(Object.assign({},null===(o=u.features)||void 0===o?void 0:o.uploads),{enabledFromEntry:e===l.entryTypes.upload})})})}const d=(0,t.isUnreadMessage)(n.payload);if(e.events.find((e=>e.payload.id===s.id)))return;const f=p(e.entryMeta,n.payload);e.entryMeta=c||f.active!==l.entryTypes.upload?f:Object.assign({},e.entryMeta),e.options=u,d&&(e.unreadEvents+=1,n.payload.payload.messageStatus=s.fromClient?l.readStates.read:l.readStates.received),n.payload.payload.key=(0,a.randomId)(),e.events.push(n.payload)},ackEvent:(e,{payload:n})=>{if(!n.transactionId)return void console.warn("ACK received without transaction ID.");const r=e.events.find((e=>e.payload.transactionId===n.transactionId)),{id:o,occurredAt:i}=n;r&&(e.events=(0,t.orderHistory)(e.events.map((e=>e.payload.id===r.payload.id?Object.assign(Object.assign({},e),{payload:Object.assign(Object.assign({},e.payload),{id:o,occurredAt:i})}):e))))},clearEvents:e=>{e.unreadEvents=0,e.loadedImageEventIds=[],e.events=[]},setEventsRead:(e,{payload:t})=>{e.unreadEvents=0,e.events.forEach((e=>(-1!==t.indexOf(e.payload.id)&&(e.payload=Object.assign(Object.assign({},e.payload),e.payload.messageStatus===l.readStates.received&&{messageStatus:l.readStates.read})),e)))},setLoadedImageEventIds:(e,{payload:t})=>{e.loadedImageEventIds.push(t)},setHistory:(e,{payload:{events:n,participants:r,activeServiceSessionId:o,activeServiceSettings:i={},serviceData:s,resumeConversationPrompt:a}})=>{var c;const d=(0,t.mergeHistory)(e.events,n),f=Object.assign(Object.assign({},e.participantInfo.participants),r),h=d.slice().reverse().find((e=>("message"===e.type||"participant"===e.type)&&!e.payload.fromClient));let y=null;h&&("message"===h.type&&(y=h.payload.participant),"participant"===h.type&&(y=h.payload.participant.id));const{entry:m}=i,{upload:b}=m.options,v=p(Object.assign(Object.assign(Object.assign({},e.entryMeta),m),{active:m.default||l.payloadTypes.text,options:Object.assign({},m&&m.options?m.options:{})}),d[d.length-1]);let g=Object.assign({},e.options.features);const O=g.hasOwnProperty(l.featureKeys.uploads);if(O&&"message"===(null==h?void 0:h.type)){const{payload:e}=h,t=(null===(c=null==e?void 0:e.entry)||void 0===c?void 0:c.type)||{};g=Object.assign(Object.assign({},g),{uploads:{enabled:!(!b||!b.enabled),enabledFromEntry:t===l.entryTypes.upload}})}e.unreadEvents=d.filter((e=>"message"===e.type&&e.payload.messageStatus===l.readStates.received)).length,e.events=d.filter((e=>"participant"!==e.type||!!e.payload.participant.introduction)),e.participantInfo=Object.assign(Object.assign(Object.assign({},e.participantInfo),y?u(e.participantInfo,{participant:f[y]}):{}),{participants:f}),e.historyLoaded=!0,e.serviceInfo=Object.assign(Object.assign({},e.serviceInfo),{activeServiceSessionId:o}),e.serviceData=Object.assign(Object.assign({},e.serviceData),s),e.options=Object.assign(Object.assign({},e.options),{features:g||{}}),e.entryMeta=O||v.active!==l.entryTypes.upload?v:Object.assign({},e.entryMeta),e.resumeConversationPrompt=a||!1,y&&(e.headerTitles.subTitle=f[y].name)},resetHistoryLoadedFlag:e=>{e.historyLoaded=!1},setIsLoading:(e,{payload:t})=>{e.isLoading=t},initIdleDetachCountdown:(e,{payload:t})=>{const{delaySeconds:n,delayTime:r}=t;e.idleDetachCountdown={hasCountdown:!0,isActive:!0,wasStopped:!1,count:n,remaining:n,timer:r}},decrementIdleDetachCountdownCounter:e=>{const{idleDetachCountdown:t}=e,{remaining:n}=t,r=n-1;e.idleDetachCountdown.remaining=r,e.idleDetachCountdown.timer=(0,c.getTimeFromSeconds)(r)},stopIdleDetachCountdownCounter:e=>{e.idleDetachCountdown.isActive=!1,e.idleDetachCountdown.wasStopped=!0},clearIdleDetachCountdown:e=>{e.idleDetachCountdown.hasCountdown=!1,e.idleDetachCountdown.isActive=!1},initResumeConversationPrompt:e=>{e.resumeConversationPrompt=!0},clearResumeConversationPrompt:e=>{e.resumeConversationPrompt=!1},setParticipant:(e,{payload:t})=>{e.participantInfo=u(e.participantInfo,{participant:t.participant,fromClient:t.fromClient})},setActiveService:(e,{payload:t})=>{e.serviceInfo.activeServiceSessionId!==t&&(e.serviceInfo.activeServiceSessionId=t)},setHeaderTitle:(e,{payload:t})=>{e.headerTitles.title=t},setHeaderSubTitle:(e,{payload:t})=>{e.headerTitles.subTitle=t},setInitialState:(e,{payload:n})=>{e.initialState=n.initialState,e.unreadEvents=t.initialStoreState.unreadEvents},setServiceDataItem:(e,{payload:t})=>{e.serviceData[t.type]=t},setFeatures:(e,{payload:t})=>{t.features&&(e.options.features=t.features)},setFeatureEnabledState:(e,{payload:t})=>{e.options.features.hasOwnProperty(t.key)&&(e.options.features[t.key].enabled=t.enabled)},clearFeatures:e=>{e.options.features={}},showOption:(e,{payload:t})=>{e.options.panelActive=!0,e.options.optionActive=t},hideOption:e=>{e.options.panelActive=!1,e.options.optionActive=""},setUserSelectedOptions:(e,{payload:t})=>{e.options.userSelectedOptions=t},setUserSelectedOption:(e,{payload:t})=>{const{option:n,value:r}=t;e.options.userSelectedOptions[n]=r},setBlockAutoEntrySwitch:(e,{payload:t})=>{e.entryMeta.blockAutoEntrySwitch=t},setServiceEntryMetadata:(e,{payload:t})=>{e.entryMeta.active=t.default,e.entryMeta.options=t.options||{},e.entryMeta.optionsOverride={}},setActiveEntryType:(e,{payload:t})=>{e.entryMeta.active=t},setUserEntryType:(e,{payload:t})=>{e.entryMeta.userSelected=t},registerUpload:(e,{payload:t})=>{e.currentUploads.push({id:t.fileId,name:t.fileName,progress:1,uploading:!0,complete:!1,error:"",uploadHandle:t.uploadHandle})},setUploadProgress:(e,{payload:t})=>{e.currentUploads=e.currentUploads.map((e=>e.id===t.fileId?Object.assign(Object.assign({},e),{progress:t.progress,uploading:100!==t.progress,uploadHandle:100===t.progress?null:e.uploadHandle}):e))},setUploadError:(e,{payload:t})=>{e.currentUploads=e.currentUploads.map((e=>e.id===t.fileId?Object.assign(Object.assign({},e),{error:t.errorText,progress:0,uploading:!1,uploadHandle:null}):e))},setUploadComplete:(e,{payload:t})=>{e.currentUploads=e.currentUploads.map((e=>e.id===t?Object.assign(Object.assign({},e),{complete:!0}):e))},clearAllUploads:e=>{e.currentUploads=[]},setSeamlyContainerElement:(e,{payload:t})=>{e.seamlyContainerElement=t}},extraReducers:e=>{e.addCase(i.resetApp.pending,(()=>t.initialStoreState)).addCase(s.initializeConfig.fulfilled,((e,{payload:t})=>{var n;e.headerTitles.subTitle=null===(n=t.agentParticipant)||void 0===n?void 0:n.name,t.features&&(e.options.features=t.features)})).addCase(i.initializeApp.fulfilled,((e,{payload:t})=>{t.initialState&&(e.initialState=t.initialState)}))}}),r=t.storeSlice.actions,t.ackEvent=r.ackEvent,t.addEvent=r.addEvent,t.clearAllUploads=r.clearAllUploads,t.clearEvents=r.clearEvents,t.clearFeatures=r.clearFeatures,t.clearIdleDetachCountdown=r.clearIdleDetachCountdown,t.clearResumeConversationPrompt=r.clearResumeConversationPrompt,t.decrementIdleDetachCountdownCounter=r.decrementIdleDetachCountdownCounter,t.hideOption=r.hideOption,t.initIdleDetachCountdown=r.initIdleDetachCountdown,t.initResumeConversationPrompt=r.initResumeConversationPrompt,t.registerUpload=r.registerUpload,t.resetHistoryLoadedFlag=r.resetHistoryLoadedFlag,t.setActiveEntryType=r.setActiveEntryType,t.setActiveService=r.setActiveService,t.setBlockAutoEntrySwitch=r.setBlockAutoEntrySwitch,t.setEventsRead=r.setEventsRead,t.setFeatureEnabledState=r.setFeatureEnabledState,t.setFeatures=r.setFeatures,t.setHeaderSubTitle=r.setHeaderSubTitle,t.setHeaderTitle=r.setHeaderTitle,t.setHistory=r.setHistory,t.setInitialState=r.setInitialState,t.setIsLoading=r.setIsLoading,t.setLoadedImageEventIds=r.setLoadedImageEventIds,t.setParticipant=r.setParticipant,t.setSeamlyContainerElement=r.setSeamlyContainerElement,t.setServiceDataItem=r.setServiceDataItem,t.setServiceEntryMetadata=r.setServiceEntryMetadata,t.setUploadComplete=r.setUploadComplete,t.setUploadError=r.setUploadError,t.setUploadProgress=r.setUploadProgress,t.setUserEntryType=r.setUserEntryType,t.setUserSelectedOption=r.setUserSelectedOption,t.setUserSelectedOptions=r.setUserSelectedOptions,t.showOption=r.showOption,t.stopIdleDetachCountdownCounter=r.stopIdleDetachCountdownCounter,t.default=t.storeSlice.reducer},2108:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useLocaleNativeName=t.useTranslationsContainer=t.useTranslatedEventData=t.useTranslations=void 0;const r=n(6787),o=n(841),i=n(9207),s=n(6113),a=n(2849),c=n(5740);function l(){const{sendAction:e}=(0,a.useSeamlyCommands)(),t=(0,s.useDispatch)(),n=(0,i.useCallback)((n=>{e({type:c.actionTypes.setTranslation,body:{enabled:!0,locale:n}}),t((0,o.enableTranslation)(n))}),[e,t]),r=(0,i.useCallback)((()=>{e({type:c.actionTypes.setTranslation,body:{enabled:!1}}),t((0,o.disableTranslation)())}),[e,t]),{languages:l,isActive:u,isAvailable:p,currentLocale:d}=(0,s.useSelector)((({translations:e})=>e));return{languages:l,isActive:u,isAvailable:p,currentLocale:d,enableTranslations:n,disableTranslations:r}}t.useTranslations=l,t.useTranslatedEventData=function(e){const{translatedBody:t,body:n}=e.payload?"participant"===e.type?{body:null===(o=e.payload)||void 0===o?void 0:o.participant.introduction,translatedBody:null===(a=null===(i=e.payload)||void 0===i?void 0:i.participant)||void 0===a?void 0:a.translatedIntroduction}:{body:e.payload.body,translatedBody:e.payload.translatedBody}:{body:void 0,translatedBody:void 0};var o,i,a;const c=!!t,l=(0,s.useSelector)((0,r.selectIsTranslated)(e));return{body:c&&l?null==t?void 0:t.data:n,hasTranslation:c,isTranslated:l&&c,locale:null==t?void 0:t.locale}},t.useTranslationsContainer=function(){const e=(0,s.useSelector)((({translations:e})=>e.containerId));return{id:e,focusContainer:(0,a.useElementFocusingById)(e)}},t.useLocaleNativeName=function(e){const{languages:t}=l();return(0,i.useMemo)((()=>{var n;return null===(n=null==t?void 0:t.find((t=>t.locale===e)))||void 0===n?void 0:n.nativeName}),[e,t])}},6787:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectIsTranslated=void 0;const r=n(575);t.selectIsTranslated=e=>(0,r.createSelector)((e=>e.translations.translatedEventGroups),(t=>Object.values(t).every((t=>{var n;return!t.includes(null===(n=null==e?void 0:e.payload)||void 0===n?void 0:n.id)}))))},841:(e,t,n)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.disableEventsTranslation=t.enableEventsTranslation=t.disableTranslation=t.enableTranslation=t.translationSlice=t.translationsInitialState=void 0;const o=n(575),i=n(915),s=n(1153);t.translationsInitialState={isActive:!1,currentLocale:void 0,isAvailable:!1,languages:[],containerId:(0,o.nanoid)(),translatedEventGroups:{}};const a=(e,t)=>{const n=[...e].reduce(((e,{payload:n},r,o)=>{var i;if(e[t]){if("divider"===(null==n?void 0:n.type)&&(null===(i=null==n?void 0:n.body)||void 0===i?void 0:i.translationEnabled))return o.splice(0),e;e[t].push(n.id)}return n.id===t&&(e[t]=[]),e}),{}),[[r,o]]=Object.entries(n),i=e.filter((e=>{var t;return"divider"===(null===(t=e.payload)||void 0===t?void 0:t.type)})).map((e=>e.payload.id)).at(-1);return{lastGroupId:i,groupId:r,eventIds:o}};t.translationSlice=(0,o.createSlice)({name:"translation",initialState:t.translationsInitialState,reducers:{enableTranslation:(e,{payload:t})=>{e.isActive=!0,e.currentLocale=t},disableTranslation:e=>{e.isActive=!1,e.currentLocale=void 0},enableEventsTranslation:(e,{payload:{events:t,id:n}})=>{delete e.translatedEventGroups[n];const{lastGroupId:r}=a(t,n);e.lastGroupId=r},disableEventsTranslation:(e,{payload:{events:t,id:n}})=>{const{lastGroupId:r,groupId:o,eventIds:i}=a(t,n);e.lastGroupId=r,e.translatedEventGroups[o]=i}},extraReducers:e=>{e.addCase(i.initializeConfig.fulfilled,((e,{payload:t})=>{var n;const r=null===(n=null==t?void 0:t.features)||void 0===n?void 0:n.translation;r&&(e.isAvailable=!0===r.enabled,e.languages=r.languages)})).addCase(s.addEvent,((e,{payload:t})=>{e.translatedEventGroups[e.lastGroupId]&&e.translatedEventGroups[e.lastGroupId].push(t.payload.id)}))}}),r=t.translationSlice.actions,t.enableTranslation=r.enableTranslation,t.disableTranslation=r.disableTranslation,t.enableEventsTranslation=r.enableEventsTranslation,t.disableEventsTranslation=r.disableEventsTranslation,t.default=t.translationSlice.reducer},5234:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{c(r.next(e))}catch(e){i(e)}}function a(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.initializeVisibility=t.setVisibility=void 0;const a=n(575),c=n(5865),l=i(n(4788)),u=n(579),p=n(2421),d=n(4809),f=n(2629),h=i(n(3489)),y=[f.visibilityStates.open,f.visibilityStates.minimized,f.visibilityStates.hidden];t.setVisibility=(0,a.createAsyncThunk)("setVisibility",((e,{getState:t,extra:{api:n,eventBus:r}})=>{const o=t(),i=h.selectVisibility(o),s=(0,c.selectUserHasResponded)(o),a=n.hasConversation(),u=l.selectConfig(o),{visibilityCallback:m=p.calculateVisibility,layoutMode:b}=u,{unreadEvents:v}=(0,d.selectState)(o),g=m({hasResponded:s,previousVisibility:i,requestedVisibility:e,config:u});if(y.includes(g)){if(i!==g)return n.store.set(f.StoreKey,Object.assign(Object.assign({},n.store.get(f.StoreKey)||{}),{[b]:e})),e&&r.emit("ui.visible",e,{visibility:e,hasConversation:a,hasResponded:s,unreadMessageCount:v}),g}else console.error('The visibilityCallback function should return "open", "minimized" or "hidden".')})),t.initializeVisibility=(0,a.createAsyncThunk)("initialize",((e,{dispatch:n,getState:r,extra:{api:o}})=>s(void 0,void 0,void 0,(function*(){var e;const{layoutMode:i}=l.selectConfig(r()),s=null===(e=o.store.get(f.StoreKey))||void 0===e?void 0:e[i];return s&&n((0,u.setFromStorage)(s)),n((0,t.setVisibility)(s)),s}))))},3742:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useShowInlineView=t.useVisibility=void 0;const s=n(6065),a=n(2752),c=n(5234),l=n(579),u=n(9207),p=n(6113),d=n(2629),f=i(n(3489));t.useVisibility=()=>{const e=(0,a.useAppDispatch)(),t=(0,p.useSelector)(f.selectVisibility);return{isVisible:!!t&&t!==d.visibilityStates.hidden,isOpen:t===d.visibilityStates.open,isMinimized:t===d.visibilityStates.minimized,visible:t,setVisibility:(0,u.useCallback)((t=>e((0,c.setVisibility)(t))),[e])}},t.useShowInlineView=()=>{const e=(0,p.useDispatch)(),{connectWhenInView:t}=(0,s.useConfig)(),n=(0,p.useSelector)(f.selectShowInlineView),{containerRef:r,isVisible:o}=(({freezeOnceVisible:e=!1,enabled:t=!0})=>{const[n,r]=(0,u.useState)(null),o=(0,u.useRef)(null),i=!!(null==n?void 0:n.isIntersecting)||!t,s=i&&e,a=([e])=>r(e);return(0,u.useEffect)((()=>{const e=null==o?void 0:o.current;if(!window.IntersectionObserver||s||!e||!t)return()=>{};const n=new IntersectionObserver(a,{threshold:0,root:null,rootMargin:"0%"});return n.observe(e),()=>n.disconnect()}),[t,s]),{isVisible:i,containerRef:o}})({enabled:t,freezeOnceVisible:!0});return(0,u.useEffect)((()=>{o&&e((0,l.setShowInlineView)())}),[e,o]),{containerRef:r,showInlineView:n}}},3489:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectShowInlineView=t.selectVisibility=void 0;const r=n(575);t.selectVisibility=(0,r.createSelector)((({visibility:e})=>e),(e=>e.visibility)),t.selectShowInlineView=(0,r.createSelector)((({visibility:e})=>e),(e=>e.showInlineView))},579:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setShowInlineView=t.setFromStorage=t.visibilitySlice=void 0;const r=n(575),o=n(915),i=n(5234),s={visibility:n(2629).visibilityStates.initialize,showInlineView:!1};t.visibilitySlice=(0,r.createSlice)({name:"visibility",initialState:s,reducers:{setFromStorage:(e,t)=>{e.visibility=t.payload},setShowInlineView:e=>{e.showInlineView=!0}},extraReducers:e=>{e.addCase(i.setVisibility.fulfilled,((e,{payload:t})=>{t&&(e.visibility=t)})).addCase(o.initializeConfig.fulfilled,((e,{payload:t})=>{t.connectWhenInView||(e.showInlineView=!t.connectWhenInView)}))}}),t.setFromStorage=t.visibilitySlice.actions.setFromStorage,t.setShowInlineView=t.visibilitySlice.actions.setShowInlineView,t.default=t.visibilitySlice.reducer},5647:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.useSeamlyActions=t.eventTypes=t.getUrlSearchString=t.getUrlParams=t.useSeamlyOptions=t.useSeamlyMessageContainerClassNames=t.useSeamlyIdleDetachCountdown=t.useSeamlyEventStream=t.useSeamlyCommands=t.useSeamlyChat=t.useGeneratedId=t.useEvents=t.DeprecatedView=t.View=t.Interrupt=t.Icon=t.Header=t.ChatFrame=t.Chat=t.AgentInfo=t.EntryContainer=t.DeprecatedToggleButton=t.SeamlyLiveRegionContext=t.SeamlyEventBusContext=t.SeamlyApiContext=t.MessageContainer=t.Text=t.EventParticipant=t.useChoicePrompt=t.Conversation=t.ComponentFilter=t.randomId=t.ExternalApi=t.Engine=t.className=t.calculateVisibility=t.visibilityStates=t.useSeamlyVisibility=t.useTranslationsContainer=t.useTranslations=t.useTranslatedEventData=t.useI18n=t.useSeamlyConfig=t.SeamlyOfflineError=t.SeamlyGeneralError=t.SeamlyStoreProvider=t.API=void 0;const o=r(n(3022));t.default=o.default;var i=n(6666);Object.defineProperty(t,"API",{enumerable:!0,get:function(){return i.API}});var s=n(6113);Object.defineProperty(t,"SeamlyStoreProvider",{enumerable:!0,get:function(){return s.Provider}});var a=n(662);Object.defineProperty(t,"SeamlyGeneralError",{enumerable:!0,get:function(){return r(a).default}});var c=n(7865);Object.defineProperty(t,"SeamlyOfflineError",{enumerable:!0,get:function(){return r(c).default}});var l=n(6065);Object.defineProperty(t,"useSeamlyConfig",{enumerable:!0,get:function(){return l.useConfig}});var u=n(546);Object.defineProperty(t,"useI18n",{enumerable:!0,get:function(){return u.useI18n}});var p=n(2108);Object.defineProperty(t,"useTranslatedEventData",{enumerable:!0,get:function(){return p.useTranslatedEventData}}),Object.defineProperty(t,"useTranslations",{enumerable:!0,get:function(){return p.useTranslations}}),Object.defineProperty(t,"useTranslationsContainer",{enumerable:!0,get:function(){return p.useTranslationsContainer}});var d=n(3742);Object.defineProperty(t,"useSeamlyVisibility",{enumerable:!0,get:function(){return d.useVisibility}});var f=n(2629);Object.defineProperty(t,"visibilityStates",{enumerable:!0,get:function(){return f.visibilityStates}});var h=n(2421);Object.defineProperty(t,"calculateVisibility",{enumerable:!0,get:function(){return h.calculateVisibility}});var y=n(5567);Object.defineProperty(t,"className",{enumerable:!0,get:function(){return y.className}});var m=n(9409);Object.defineProperty(t,"Engine",{enumerable:!0,get:function(){return r(m).default}});var b=n(7053);Object.defineProperty(t,"ExternalApi",{enumerable:!0,get:function(){return r(b).default}});var v=n(9643);Object.defineProperty(t,"randomId",{enumerable:!0,get:function(){return v.randomId}});var g=n(4921);Object.defineProperty(t,"ComponentFilter",{enumerable:!0,get:function(){return r(g).default}});var O=n(2212);Object.defineProperty(t,"Conversation",{enumerable:!0,get:function(){return r(O).default}});var w=n(9661);Object.defineProperty(t,"useChoicePrompt",{enumerable:!0,get:function(){return w.useChoicePrompt}});var j=n(7409);Object.defineProperty(t,"EventParticipant",{enumerable:!0,get:function(){return r(j).default}});var S=n(6425);Object.defineProperty(t,"Text",{enumerable:!0,get:function(){return r(S).default}});var _=n(1989);Object.defineProperty(t,"MessageContainer",{enumerable:!0,get:function(){return r(_).default}});var x=n(2331);Object.defineProperty(t,"SeamlyApiContext",{enumerable:!0,get:function(){return x.SeamlyApiContext}}),Object.defineProperty(t,"SeamlyEventBusContext",{enumerable:!0,get:function(){return x.SeamlyEventBusContext}});var C=n(8803);Object.defineProperty(t,"SeamlyLiveRegionContext",{enumerable:!0,get:function(){return C.SeamlyLiveRegionContext}});var E=n(8219);Object.defineProperty(t,"DeprecatedToggleButton",{enumerable:!0,get:function(){return r(E).default}});var P=n(9104);Object.defineProperty(t,"EntryContainer",{enumerable:!0,get:function(){return r(P).default}});var T=n(5663);Object.defineProperty(t,"AgentInfo",{enumerable:!0,get:function(){return r(T).default}});var N=n(1474);Object.defineProperty(t,"Chat",{enumerable:!0,get:function(){return r(N).default}});var I=n(142);Object.defineProperty(t,"ChatFrame",{enumerable:!0,get:function(){return r(I).default}});var k=n(2494);Object.defineProperty(t,"Header",{enumerable:!0,get:function(){return r(k).default}});var A=n(7209);Object.defineProperty(t,"Icon",{enumerable:!0,get:function(){return r(A).default}});var D=n(9965);Object.defineProperty(t,"Interrupt",{enumerable:!0,get:function(){return r(D).default}});var R=n(9180);Object.defineProperty(t,"View",{enumerable:!0,get:function(){return r(R).default}});var M=n(2718);Object.defineProperty(t,"DeprecatedView",{enumerable:!0,get:function(){return r(M).default}});var L=n(2849);Object.defineProperty(t,"useEvents",{enumerable:!0,get:function(){return L.useEvents}}),Object.defineProperty(t,"useGeneratedId",{enumerable:!0,get:function(){return L.useGeneratedId}}),Object.defineProperty(t,"useSeamlyChat",{enumerable:!0,get:function(){return L.useSeamlyChat}}),Object.defineProperty(t,"useSeamlyCommands",{enumerable:!0,get:function(){return L.useSeamlyCommands}}),Object.defineProperty(t,"useSeamlyEventStream",{enumerable:!0,get:function(){return L.useSeamlyEventStream}}),Object.defineProperty(t,"useSeamlyIdleDetachCountdown",{enumerable:!0,get:function(){return L.useSeamlyIdleDetachCountdown}}),Object.defineProperty(t,"useSeamlyMessageContainerClassNames",{enumerable:!0,get:function(){return L.useSeamlyMessageContainerClassNames}}),Object.defineProperty(t,"useSeamlyOptions",{enumerable:!0,get:function(){return L.useSeamlyOptions}});var U=n(4959);Object.defineProperty(t,"getUrlParams",{enumerable:!0,get:function(){return U.getUrlParams}}),Object.defineProperty(t,"getUrlSearchString",{enumerable:!0,get:function(){return U.getUrlSearchString}});var F=n(5740);Object.defineProperty(t,"eventTypes",{enumerable:!0,get:function(){return F.eventTypes}});var B=n(6870);Object.defineProperty(t,"useSeamlyActions",{enumerable:!0,get:function(){return B.useSeamlyActions}})},6870:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useSeamlyActions=void 0;const r=n(1153),o=n(6113);t.useSeamlyActions=()=>{const e=(0,o.useDispatch)();return{addEvent:t=>e((0,r.addEvent)(t)),clearEvents:()=>e((0,r.clearEvents)()),setHistory:t=>e((0,r.setHistory)(t)),setEventsRead:t=>e((0,r.setEventsRead)(t)),setLoadedImageEventIds:t=>e((0,r.setLoadedImageEventIds)(t)),ackEvent:t=>e((0,r.ackEvent)(t)),setIsLoading:t=>e((0,r.setIsLoading)(t)),setParticipant:t=>e((0,r.setParticipant)(t)),setHeaderTitle:t=>e((0,r.setHeaderTitle)(t)),setHeaderSubTitle:t=>e((0,r.setHeaderSubTitle)(t)),resetHistoryLoadedFlag:()=>e((0,r.resetHistoryLoadedFlag)()),setActiveService:()=>e((0,r.setActiveService)()),initIdleDetachCountdown:t=>e((0,r.initIdleDetachCountdown)(t)),decrementIdleDetachCountdownCounter:()=>e((0,r.decrementIdleDetachCountdownCounter)()),stopIdleDetachCountdownCounter:()=>e((0,r.stopIdleDetachCountdownCounter)()),clearIdleDetachCountdown:()=>e((0,r.clearIdleDetachCountdown)()),initResumeConversationPrompt:()=>e((0,r.initResumeConversationPrompt)()),clearResumeConversationPrompt:()=>e((0,r.clearResumeConversationPrompt)()),setServiceDataItem:t=>e((0,r.setServiceDataItem)(t)),setFeatures:t=>e((0,r.setFeatures)(t)),setFeatureEnabledState:t=>e((0,r.setFeatureEnabledState)(t)),clearFeatures:()=>e((0,r.clearFeatures)()),setInitialState:t=>e((0,r.setInitialState)(t)),setUserSelectedOptions:t=>e((0,r.setUserSelectedOptions)(t)),setUserSelectedOption:t=>e((0,r.setUserSelectedOption)(t)),showOption:t=>e((0,r.showOption)(t)),hideOption:()=>e((0,r.hideOption)()),setServiceEntryMetadata:t=>e((0,r.setServiceEntryMetadata)(t)),setBlockAutoEntrySwitch:t=>e((0,r.setBlockAutoEntrySwitch)(t)),setActiveEntryType:t=>e((0,r.setActiveEntryType)(t)),setUserEntryType:t=>e((0,r.setUserEntryType)(t)),registerUpload:t=>e((0,r.registerUpload)(t)),setUploadProgress:t=>e((0,r.setUploadProgress)(t)),setUploadComplete:t=>e((0,r.setUploadComplete)(t)),setUploadError:t=>e((0,r.setUploadError)(t)),clearAllUploads:()=>e((0,r.clearAllUploads)()),setSeamlyContainerElement:t=>e((0,r.setSeamlyContainerElement)(t))}}},5740:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cardTypes=t.featureKeys=t.dividerKeys=t.ariaLiveLevels=t.dismissTypes=t.actionTypes=t.readStates=t.entryTypes=t.payloadTypes=t.eventTypes=void 0,t.eventTypes={info:"info",message:"message",participant:"participant",system:"system"},t.payloadTypes={choicePrompt:"choice_prompt",text:"text",image:"image",video:"video",participant:"participant",divider:"divider",translation:"translation",message:"message",countdown:"countdown",upload:"upload",cta:"cta",splash:"splash"},t.entryTypes={text:"text",upload:"upload"},t.readStates={received:"received",read:"read"},t.actionTypes={pickChoice:"pick_choice",navigate:"navigate",custom:"custom",typing:"typing",read:"read",detachService:"detach_service",interactivityUpdate:"interactivity_update",dismiss:"dismiss",sendTranscript:"send_transcript",setTopic:"set_topic",setTranslation:"set_translation",clickCta:"click_cta",clickCard:"click_card"},t.dismissTypes={resumeConversationPrompt:"resume_conversation_prompt"},t.ariaLiveLevels={assertive:"assertive",polite:"polite"},t.dividerKeys={new_topic:"newTopic",new_translation:"newTranslation"},t.featureKeys={sendTranscript:"sendTranscript",typingPeekahead:"typingPeekahead",uploads:"uploads"},t.cardTypes={ask:"ask",navigate:"navigate",topic:"topic"}},3293:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});class r extends Error{constructor(e,...t){super(...t),Error.captureStackTrace&&Error.captureStackTrace(this,Object.getPrototypeOf(this)),this.originalError=e,e?.payload&&(this.originalEvent=e,this.originalError=e.payload.error,this.message=`Event of type ${e.payload.type} encountered`),e?.error&&(this.originalError=e.error)}}},3317:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(3293);class o extends r.Z{constructor(e,...t){super(e,...t),this.name="SeamlyConfigurationError",this.langKey="errors.configError"}}},662:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(3293);class o extends r.Z{constructor(e,...t){super(e,...t),this.name="SeamlyGeneralError",this.langKey="errors.general",this.action="reset"}}},7865:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(3293);class o extends r.Z{constructor(e,...t){super(e,...t),this.name="SeamlyOfflineError",this.langKey="errors.seamlyOffline"}}},3872:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(3293);class o extends r.Z{constructor(e,...t){super(e,...t),this.name="SeamlySessionExpiredError",this.action="reset"}}},9638:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(3293);class o extends r.Z{constructor(e,...t){super(e,...t),this.name="SeamlyUnauthorizedError",this.langKey="errors.general",this.action="reset"}}},9060:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});class r extends Error{constructor(e){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,r),this.name="SeamlyUnavailableError",this.langKey="errors.seamlyUnavailable"}}},6666:(e,t,n)=>{"use strict";n.r(t),n.d(t,{API:()=>K});var r=n(3813),o=n.n(r),i=n(1766),s=n.n(i),a=n(2112),c=n(9643);function l(e){const t=`cvco.${e}`;return{get(){const e=[t,t.split(".").slice(0,-1).join(".")];let n;do{n=sessionStorage.getItem(e[0])}while(e.shift()&&!n);return JSON.parse(n)},set(e){e&&sessionStorage.setItem(t,JSON.stringify(e))}}}var u=n(1905),p=n.n(u),d=n(4959),f=e=>"function"==typeof e?e:function(){return e},h="undefined"!=typeof self?self:null,y="undefined"!=typeof window?window:null,m=h||y||m,b="closed",v="errored",g="joined",O="joining",w="leaving",j="phx_close",S="phx_error",_="phx_reply",x="phx_leave",C=class{constructor(e,t,n,r){this.channel=e,this.event=t,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1}resend(e){this.timeout=e,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(e,t){return this.hasReceived(e)&&t(this.receivedResp.response),this.recHooks.push({status:e,callback:t}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}matchReceive({status:e,response:t,_ref:n}){this.recHooks.filter((t=>t.status===e)).forEach((e=>e.callback(t)))}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,(e=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=e,this.matchReceive(e)})),this.timeoutTimer=setTimeout((()=>{this.trigger("timeout",{})}),this.timeout)}hasReceived(e){return this.receivedResp&&this.receivedResp.status===e}trigger(e,t){this.channel.trigger(this.refEvent,{status:e,response:t})}},E=class{constructor(e,t){this.callback=e,this.timerCalc=t,this.timer=null,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout((()=>{this.tries=this.tries+1,this.callback()}),this.timerCalc(this.tries+1))}},P=class{static request(e,t,n,r,o,i,s){if(m.XDomainRequest){let n=new m.XDomainRequest;return this.xdomainRequest(n,e,t,r,o,i,s)}{let a=new m.XMLHttpRequest;return this.xhrRequest(a,e,t,n,r,o,i,s)}}static xdomainRequest(e,t,n,r,o,i,s){return e.timeout=o,e.open(t,n),e.onload=()=>{let t=this.parseJSON(e.responseText);s&&s(t)},i&&(e.ontimeout=i),e.onprogress=()=>{},e.send(r),e}static xhrRequest(e,t,n,r,o,i,s,a){return e.open(t,n,!0),e.timeout=i,e.setRequestHeader("Content-Type",r),e.onerror=()=>a&&a(null),e.onreadystatechange=()=>{if(4===e.readyState&&a){let t=this.parseJSON(e.responseText);a(t)}},s&&(e.ontimeout=s),e.send(o),e}static parseJSON(e){if(!e||""===e)return null;try{return JSON.parse(e)}catch(t){return console&&console.log("failed to parse JSON response",e),null}}static serialize(e,t){let n=[];for(var r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let o=t?`${t}[${r}]`:r,i=e[r];"object"==typeof i?n.push(this.serialize(i,o)):n.push(encodeURIComponent(o)+"="+encodeURIComponent(i))}return n.join("&")}static appendParams(e,t){if(0===Object.keys(t).length)return e;let n=e.match(/\?/)?"&":"?";return`${e}${n}${this.serialize(t)}`}},T=class{constructor(e){this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(e),this.readyState=0,this.poll()}normalizeEndpoint(e){return e.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/websocket"),"$1/longpoll")}endpointURL(){return P.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(e,t,n){this.close(e,t,n),this.readyState=0}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return 1===this.readyState||0===this.readyState}poll(){this.ajax("GET",null,(()=>this.ontimeout()),(e=>{if(e){var{status:t,token:n,messages:r}=e;this.token=n}else t=0;switch(t){case 200:r.forEach((e=>{setTimeout((()=>this.onmessage({data:e})),0)})),this.poll();break;case 204:this.poll();break;case 410:this.readyState=1,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${t}`)}}))}send(e){this.ajax("POST",e,(()=>this.onerror("timeout")),(e=>{e&&200===e.status||(this.onerror(e&&e.status),this.closeAndRetry(1011,"internal server error",!1))}))}close(e,t,n){for(let e of this.reqs)e.abort();this.readyState=3;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:e,reason:t,wasClean:n});"undefined"!=typeof CloseEvent?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(e,t,n,r){let o;o=P.request(e,this.endpointURL(),"application/json",t,this.timeout,(()=>{this.reqs.delete(o),n()}),(e=>{this.reqs.delete(o),this.isActive()&&r(e)})),this.reqs.add(o)}},N={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(e,t){if(e.payload.constructor===ArrayBuffer)return t(this.binaryEncode(e));{let n=[e.join_ref,e.ref,e.topic,e.event,e.payload];return t(JSON.stringify(n))}},decode(e,t){if(e.constructor===ArrayBuffer)return t(this.binaryDecode(e));{let[n,r,o,i,s]=JSON.parse(e);return t({join_ref:n,ref:r,topic:o,event:i,payload:s})}},binaryEncode(e){let{join_ref:t,ref:n,event:r,topic:o,payload:i}=e,s=this.META_LENGTH+t.length+n.length+o.length+r.length,a=new ArrayBuffer(this.HEADER_LENGTH+s),c=new DataView(a),l=0;c.setUint8(l++,this.KINDS.push),c.setUint8(l++,t.length),c.setUint8(l++,n.length),c.setUint8(l++,o.length),c.setUint8(l++,r.length),Array.from(t,(e=>c.setUint8(l++,e.charCodeAt(0)))),Array.from(n,(e=>c.setUint8(l++,e.charCodeAt(0)))),Array.from(o,(e=>c.setUint8(l++,e.charCodeAt(0)))),Array.from(r,(e=>c.setUint8(l++,e.charCodeAt(0))));var u=new Uint8Array(a.byteLength+i.byteLength);return u.set(new Uint8Array(a),0),u.set(new Uint8Array(i),a.byteLength),u.buffer},binaryDecode(e){let t=new DataView(e),n=t.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(e,t,r);case this.KINDS.reply:return this.decodeReply(e,t,r);case this.KINDS.broadcast:return this.decodeBroadcast(e,t,r)}},decodePush(e,t,n){let r=t.getUint8(1),o=t.getUint8(2),i=t.getUint8(3),s=this.HEADER_LENGTH+this.META_LENGTH-1,a=n.decode(e.slice(s,s+r));s+=r;let c=n.decode(e.slice(s,s+o));s+=o;let l=n.decode(e.slice(s,s+i));return s+=i,{join_ref:a,ref:null,topic:c,event:l,payload:e.slice(s,e.byteLength)}},decodeReply(e,t,n){let r=t.getUint8(1),o=t.getUint8(2),i=t.getUint8(3),s=t.getUint8(4),a=this.HEADER_LENGTH+this.META_LENGTH,c=n.decode(e.slice(a,a+r));a+=r;let l=n.decode(e.slice(a,a+o));a+=o;let u=n.decode(e.slice(a,a+i));a+=i;let p=n.decode(e.slice(a,a+s));a+=s;let d=e.slice(a,e.byteLength);return{join_ref:c,ref:l,topic:u,event:_,payload:{status:p,response:d}}},decodeBroadcast(e,t,n){let r=t.getUint8(1),o=t.getUint8(2),i=this.HEADER_LENGTH+2,s=n.decode(e.slice(i,i+r));i+=r;let a=n.decode(e.slice(i,i+o));return i+=o,{join_ref:null,ref:null,topic:s,event:a,payload:e.slice(i,e.byteLength)}}};function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){A(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?D(Object(n),!0).forEach((function(t){M(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):D(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function M(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const L=p()("seamly");class U{constructor(e,t,n,r){this.url=e,this.accessToken=r,this.channelName=t,this.channelTopic=n,this.connect(),this.socket.onError((e=>{L("[SOCKET][ERROR]",e),this.emit({type:"error",payload:{type:"seamly_offline",error:e}})})),this.socket.onOpen((()=>{L("[SOCKET]OPEN"),this.emit({type:"socket_opened"})})),this.channel.on("system",(e=>{"attach_channel_succeeded"===e.type&&this.emit({type:"connection",connected:!0,ready:!0})})),this.socket.onClose((()=>{L("[SOCKET]CLOSE"),this.emit({type:"connection",connected:!1,ready:!1})})),this.channel.onClose((()=>{L("[CHANNEL]CLOSE"),this.emit({type:"connection",connected:!1,ready:!1})})),this.channel.onError((e=>{L("[CHANNEL][ERROR]",e),this.emit({type:"connection",connected:!1,ready:!1})})),this.listenTo("ack"),this.listenTo("ui"),this.listenTo("error"),this.listenTo("participant",((e,t)=>R(R({},t),{},{type:e}))),this.listenTo("message"),this.listenTo("service_data"),this.listenTo("system"),this.listenTo("info"),this.listenTo("sync")}start(e){this.listener=e,this.channel.join().receive("ok",(()=>{L("[CHANNEL][JOIN] OK"),this.emit({type:"connection",connected:!0,ready:!1})})).receive("error",(e=>{L("[CHANNEL][JOIN] ERROR",e),this.emit({type:"error",payload:{type:"join_channel_erred",error:e}}),this.emit({type:"connection",connected:!1,ready:!1}),this.channel.socket.disconnect()})).receive("timeout",(()=>{L("[CHANEL][JOIN] Networking issue. Still waiting...")}))}stop(){this.listener=null}connect(){const{url:e,params:t}=(e=>{const t=e.indexOf("?");return t<0?{url:e,params:{}}:{url:e.slice(0,t),params:e.slice(t+1).split("&").reduce((function(e,t){const[n,r]=t.split("=");return k(k({},e),{},{[n]:decodeURIComponent(r)})}),{})}})(this.url);this.socket=new class{constructor(e,t={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=t.timeout||1e4,this.transport=t.transport||m.WebSocket||T,this.establishedConnections=0,this.defaultEncoder=N.encode.bind(N),this.defaultDecoder=N.decode.bind(N),this.closeWasClean=!1,this.binaryType=t.binaryType||"arraybuffer",this.connectClock=1,this.transport!==T?(this.encode=t.encode||this.defaultEncoder,this.decode=t.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let n=null;y&&y.addEventListener&&(y.addEventListener("pagehide",(e=>{this.conn&&(this.disconnect(),n=this.connectClock)})),y.addEventListener("pageshow",(e=>{n===this.connectClock&&(n=null,this.connect())}))),this.heartbeatIntervalMs=t.heartbeatIntervalMs||3e4,this.rejoinAfterMs=e=>t.rejoinAfterMs?t.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4,this.reconnectAfterMs=e=>t.reconnectAfterMs?t.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3,this.logger=t.logger||null,this.longpollerTimeout=t.longpollerTimeout||2e4,this.params=f(t.params||{}),this.endPoint=`${e}/websocket`,this.vsn=t.vsn||"2.0.0",this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new E((()=>{this.teardown((()=>this.connect()))}),this.reconnectAfterMs)}getLongPollTransport(){return T}replaceTransport(e){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.sendBuffer=[],this.conn&&(this.conn.close(),this.conn=null),this.transport=e}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let e=P.appendParams(P.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?`${this.protocol()}:${e}`:`${this.protocol()}://${location.host}${e}`}disconnect(e,t,n){this.connectClock++,this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(e,t,n)}connect(e){e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=f(e)),this.conn||(this.connectClock++,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=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e))}log(e,t,n){this.logger(e,t,n)}hasLogger(){return null!==this.logger}onOpen(e){let t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}onClose(e){let t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}onError(e){let t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}onMessage(e){let t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}ping(e){if(!this.isConnected())return!1;let t=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:t});let r=this.onMessage((o=>{o.ref===t&&(this.off([r]),e(Date.now()-n))}));return!0}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach((([,e])=>e()))}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),setTimeout((()=>this.sendHeartbeat()),this.heartbeatIntervalMs))}teardown(e,t,n){if(!this.conn)return e&&e();this.waitForBufferDone((()=>{this.conn&&(t?this.conn.close(t,n||""):this.conn.close()),this.waitForSocketClosed((()=>{this.conn&&(this.conn.onclose=function(){},this.conn=null),e&&e()}))}))}waitForBufferDone(e,t=1){5!==t&&this.conn&&this.conn.bufferedAmount?setTimeout((()=>{this.waitForBufferDone(e,t+1)}),150*t):e()}waitForSocketClosed(e,t=1){5!==t&&this.conn&&3!==this.conn.readyState?setTimeout((()=>{this.waitForSocketClosed(e,t+1)}),150*t):e()}onConnClose(e){let t=e&&e.code;this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),clearTimeout(this.heartbeatTimer),this.closeWasClean||1e3===t||this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((([,t])=>t(e)))}onConnError(e){this.hasLogger()&&this.log("transport",e);let t=this.transport,n=this.establishedConnections;this.stateChangeCallbacks.error.forEach((([,r])=>{r(e,t,n)})),(t===this.transport||n>0)&&this.triggerChanError()}triggerChanError(){this.channels.forEach((e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(S)}))}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(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter((t=>t.joinRef()!==e.joinRef()))}off(e){for(let t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter((([t])=>-1===e.indexOf(t)))}channel(e,t={}){let n=new class{constructor(e,t,n){this.state=b,this.topic=e,this.params=f(t||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new C(this,"phx_join",this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new E((()=>{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",(()=>{this.state=g,this.rejoinTimer.reset(),this.pushBuffer.forEach((e=>e.send())),this.pushBuffer=[]})),this.joinPush.receive("error",(()=>{this.state=v,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=b,this.socket.remove(this)})),this.onError((e=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,e),this.isJoining()&&this.joinPush.reset(),this.state=v,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 C(this,x,f({}),this.timeout).send(),this.state=v,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()})),this.on(_,((e,t)=>{this.trigger(this.replyEventName(t),e)}))}join(e=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=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}onClose(e){this.on(j,e)}onError(e){return this.on(S,(t=>e(t)))}on(e,t){let n=this.bindingRef++;return this.bindings.push({event:e,ref:n,callback:t}),n}off(e,t){this.bindings=this.bindings.filter((n=>!(n.event===e&&(void 0===t||t===n.ref))))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(e,t,n=this.timeout){if(t=t||{},!this.joinedOnce)throw new Error(`tried to push '${e}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new C(this,e,(function(){return t}),n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(e=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=w;let t=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(j,"leave")},n=new C(this,x,f({}),e);return n.receive("ok",(()=>t())).receive("timeout",(()=>t())),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(e,t,n){return t}isMember(e,t,n,r){return!(this.topic!==e||r&&r!==this.joinRef()&&(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:n,joinRef:r}),1))}joinRef(){return this.joinPush.ref}rejoin(e=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=O,this.joinPush.resend(e))}trigger(e,t,n,r){let o=this.onMessage(e,t,n,r);if(t&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let i=this.bindings.filter((t=>t.event===e));for(let e=0;e<i.length;e++)i[e].callback(o,n,r||this.joinRef())}replyEventName(e){return`chan_reply_${e}`}isClosed(){return this.state===b}isErrored(){return this.state===v}isJoined(){return this.state===g}isJoining(){return this.state===O}isLeaving(){return this.state===w}}(e,t,this);return this.channels.push(n),n}push(e){if(this.hasLogger()){let{topic:t,event:n,payload:r,ref:o,join_ref:i}=e;this.log("push",`${t} ${n} (${i}, ${o})`,r)}this.isConnected()?this.encode(e,(e=>this.conn.send(e))):this.sendBuffer.push((()=>this.encode(e,(e=>this.conn.send(e)))))}makeRef(){let e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}sendHeartbeat(){this.pendingHeartbeatRef&&!this.isConnected()||(this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef}),this.heartbeatTimer=setTimeout((()=>this.heartbeatTimeout()),this.heartbeatIntervalMs))}abnormalClose(e){this.closeWasClean=!1,this.isConnected()&&this.conn.close(1e3,e)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((e=>e())),this.sendBuffer=[])}onConnMessage(e){this.decode(e.data,(e=>{let{topic:t,event:n,payload:r,ref:o,join_ref:i}=e;o&&o===this.pendingHeartbeatRef&&(clearTimeout(this.heartbeatTimer),this.pendingHeartbeatRef=null,setTimeout((()=>this.sendHeartbeat()),this.heartbeatIntervalMs)),this.hasLogger()&&this.log("receive",`${r.status||""} ${t} ${n} ${o&&"("+o+")"||""}`,r);for(let e=0;e<this.channels.length;e++){const s=this.channels[e];s.isMember(t,n,r,i)&&s.trigger(n,r,o,i)}for(let t=0;t<this.stateChangeCallbacks.message.length;t++){let[,n]=this.stateChangeCallbacks.message[t];n(e)}}))}leaveOpenTopic(e){let t=this.channels.find((t=>t.topic===e&&(t.isJoined()||t.isJoining())));t&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${e}"`),t.leave())}}(e,{params:R(R({},t),{},{v:a.apiVersion})}),this.socket.connect(),this.channel=this.socket.channel(this.channelTopic,{authorization:`Bearer ${this.accessToken}`,channelName:this.channelName})}disconnect(){return new Promise((e=>{this.socket.disconnect(e)}))}listenTo(e,t=null){this.channel.on(e,(n=>{L("[RECEIVE]",e,n),this.emit({type:e,payload:t?t(e,n):n})}))}emit(e){this.listener&&this.listener.next(e)}push(e,t,n){this.channel.push(e,t,n)}}class F{constructor(e){this.name=e}emit(e){this.listener&&this.listener.next(e)}start(e){this.listener=e}stop(){this.listener=null}}var B=n(3872),H=n(3317),$=n(662),V=n(9638);function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){W(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function W(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const G=p()("seamly");function Z(){if(!Intl||"undefined"==typeof Intl||void 0===Intl.DateTimeFormat)return null;const e=Intl.DateTimeFormat();if(void 0===e||void 0===e.resolvedOptions)return null;const t=e.resolvedOptions().timeZone;return t&&(t.indexOf("/")>-1||"UTC"===t)?t:null}class K{constructor({layoutMode:e,namespace:t,config:n={},context:r={}}){this.store=function(e,t){const n=t(e),r=n.get()||{};return{get:e=>void 0===e?r:r[e],set:(e,t)=>(r[e]=t,n.set(r),t),delete(e){const t=this.get(e);return delete r[e],n.set(r),t}}}(`${t}.connection${r.locale?`.${r.locale}`:""}`,n.storageProvider||l),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:q(q({},r),{},{channelName:r.channelName||"web"})},this.connected=!1,this.configReady=!1,this.externalId=n.externalId,this.layoutMode=e,this.userResponded=!1,this.internalProducer=new F("API"),this.internal$=o().create(this.internalProducer).flatten(),this.connection$=this.internal$.filter((e=>"connection"===e.type)),this.connection$.subscribe({next:({connected:e,ready:t})=>{this.connected=e,this.ready=t}}),this.URLS={},window.addEventListener("pageshow",(e=>{e.persisted&&this.connected&&this.connect()}))}getAccessToken(){return this.store.get("accessToken")}setAccessToken(e){this.store.set("accessToken",e)}getConversationUrl(){return this.store.get("conversationUrl")}setConversationUrl(e){this.store.set("conversationUrl",e)}hasConversation(){return!!this.getConversationUrl()}getChannelTopic(){return this.store.get("channelTopic")||this.store.get("channelName")}setChannelTopic(e){this.store.set("channelTopic",e)}getLocale=e=>e||this.locale;clearStore(){this.store.delete("accessToken"),this.store.delete("conversationUrl"),this.store.delete("channelName"),this.store.delete("channelTopic")}getUrlPrefix(e){return`${this.connectionInfo.secure?`${e}s`:e}://${this.connectionInfo.domain}`}updateUrls({_links:e}){this.URLS=Object.entries(e).filter((([e])=>"self"!==e)).reduce(((e,[t,{href:n}])=>q(q({},e),{},{[t]: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 e=s().post(`${this.getUrlPrefix("http")}${this.URLS.conversations}`).set("Content-Type","application/json").query({v:a.apiVersion}).withCredentials().send({externalId:this.externalId||void 0}),{body:t}=await e,{conversation:n}=t,r=q({},n);return delete r.accessToken,delete r.channelTopic,this.setAccessToken(n.accessToken),this.setChannelTopic(n.channelTopic),this.updateUrls(t),this.setConversationUrl(this.URLS.conversation),this.locale=n.translation?.locale,this.userResponded=n.userResponded,r}catch(e){if(e.status>=500)throw new $.default(e);throw e}}getConfig(){return s().post(`${this.getUrlPrefix("http")}/client/${this.connectionInfo.apiKey}/configs`).set("Content-Type","application/json").query({v:a.apiVersion}).send({context:q(q({},this.config.context),{},{environment:!0===this.config.sendEnvironment?this.getEnvironment():this.config.sendEnvironment})}).then((({body:e})=>(this.updateUrls(e),this.configReady=!0,e.config))).catch((e=>{if(404===e.status)throw new H.default;if(e.status>=500)throw new $.default(e);throw e}))}async getConversation(){if(!this.hasConversation())return null;try{const{body:e}=await s().get(`${this.getUrlPrefix("http")}${this.URLS.history}`).set("Authorization",`Bearer ${this.getAccessToken()}`).query({v:a.apiVersion});this.updateUrls(e);const{messages:t,participants:n,activeServiceSessionId:r,activeServiceSettings:o,serviceData:i,ui:c,translation:l}=e.history;return{events:t.map((([e,t])=>({type:e,payload:q(q({},t),{},{type:"participant"===e?e:t.type})}))),participants:n,activeServiceSessionId:r,activeServiceSettings:o,serviceData:i,resumeConversationPrompt:!!c&&Boolean(c.resumeConversationPrompt),translation:l}}catch(e){if(401===e.status)throw new V.default(e);if(404===e.status)throw new B.default(e);if(e.status>=500)throw new $.default(e);throw e}}async connect(){this.connected=!1;let e=null;return this.hasConversation()||(e=await this.createConversation()),this.conversationProducer=new U(`${this.getUrlPrefix("ws")}${this.URLS.socket}`,this.config.context.channelName,this.getChannelTopic(),this.getAccessToken()),this.internalProducer.emit(o().create(this.conversationProducer)),this.config.sendEnvironment&&this.send("context",{environment:!0===this.config.sendEnvironment?this.getEnvironment():this.config.sendEnvironment},!1),e}uploadFile(e,t,n,r){const o=new FormData;o.append("upload",e);const i=s().post(`${this.getUrlPrefix("http")}${this.URLS.uploads}`).set("Authorization",`Bearer ${this.getAccessToken()}`).send(o);return i.on("progress",(function(e){const{direction:n,percent:r}=e;"upload"===n&&"function"==typeof t&&t(r)})),i.then((e=>{n&&n(e)})).catch((e=>{if(!r)throw e;r(e.response)})),i}getConversationIntitialState(){return s().get(`${this.getUrlPrefix("http")}${this.getConversationUrl()}`).set("Authorization",`Bearer ${this.getAccessToken()}`).query({v:a.apiVersion}).then((({body:e})=>(this.updateUrls(e),this.userResponded=e.conversation.userResponded,(0,d.omit)(e.conversation,["accessToken","channelTopic"])))).catch((e=>{if(401===e.status)throw new V.default(e);if(404===e.status)throw new B.default(e);if(e.status>=500)throw new $.default(e);throw e}))}async getTranslations(e){try{const t=`${this.getUrlPrefix("http")}${this.URLS.translations}`.replace("{version}",String(1)).replace("{locale}",this.getLocale(e)),n=s().get(t),{body:r}=await n;return r.translations}catch(e){if(e.status>=500)throw new $.default(e);throw e}}send(e,t,n=!0){!this.connected||n&&!this.ready?this.connection$.filter((e=>n?e.connected&&e.ready:e.connected)).take(1).subscribe({next:()=>this.send(e,t,n)}):(G("[SEND]",e,t),this.conversationProducer.push(e,function(e,t){if("message"!==e)return t;const{type:n,body:r}=t;let{transactionId:o}=t;return o||(o=(0,c.randomId)()),{type:n,body:r,transactionId:o}}(e,t),1e4))}sendContext(e={}){const{locale:t,variables:n}=e,r={};if(t){if("string"!=typeof t)throw new Error("Locale must be a string");r.locale=t}if(n){if("object"!=typeof n)throw new Error("Variables must be an object");r.variables=n}0===Object.keys(r).length&&r.constructor===Object||this.send("context",r,!1)}stream(){return this.internal$.filter((e=>"connection"!==e.type))}getEnvironment(){return{clientName:"@seamly/web-ui",clientVariant:this.layoutMode,clientVersion:"20.8.0",currentUrl:window.location.toString(),screenResolution:`${window.screen.width}x${window.screen.height}`,timezone:Z(),userAgent:navigator.userAgent}}}},9279:(e,t,n)=>{"use strict";n.d(t,{h:()=>i});var r=n(5865),o=n(6113);const i=()=>(0,o.useSelector)(r.selectUserHasResponded)},2285:(e,t,n)=>{"use strict";n.r(t),n.d(t,{catchError:()=>i,createErrorsMiddleware:()=>s});var r=n(575),o=n(4788);const i=(0,r.createAction)("catch-error",(e=>({error:e})));function s({api:e}){return({getState:t})=>{const n=n=>{const{errorCallback:r,namespace:i,api:s,layoutMode:a}=(0,o.selectConfig)(t());r?.(n.error,{namespace:i,api:s,layoutMode:a,conversationUrl:e.getConversationUrl(),action:n.type?n:void 0})};return e=>t=>{try{return t.payload?.originalEvent?.payload&&n({error:t.payload,type:t.payload?.originalEvent?.payload?.type}),e(t)}catch(e){throw n({error:e}),e}}}}},2190:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(1153);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a({api:e}){return()=>t=>n=>{const o=t(n);switch(n.type){case r.setUserSelectedOptions.toString():e.store.set("options",n.payload);break;case r.setUserSelectedOption.toString():e.store.set("options",i(i({},e.store.get("options")||{}),{},{[n.payload.option]:n.payload.value}))}return o}}},3128:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(915),o=n(59),i=n(7658),s=n(1153),a=n(841);function c({dispatch:e,getState:t}){return n=>c=>{const l=n(c),{payload:u}=c;switch(c.type){case s.setHistory.type:u?.translation?.enabled&&(e((0,a.enableTranslation)(u.translation.locale)),e((0,o.setLocale)(u.translation.locale)));break;case r.initializeConfig.fulfilled.type:u.locale&&e((0,o.setLocale)(u.locale));break;case s.setInitialState.type:u?.translation?.enabled&&(e((0,a.enableTranslation)(u.translation.locale)),e((0,o.setLocale)(u.locale)));break;case s.addEvent.type:"info"===u.type&&"new_translation"===u?.payload?.body?.subtype&&u.payload.body.translationEnabled&&e((0,o.setLocale)(u.payload.body.translationLocale));break;case a.disableTranslation.type:const n=(0,i.selectInitialLocale)(t());e((0,o.setLocale)(n))}return l}}},2629:(e,t,n)=>{"use strict";n.r(t),n.d(t,{StoreKey:()=>r,visibilityStates:()=>o});const r="visibility",o={hidden:"hidden",minimized:"minimized",open:"open",initialize:null}},2421:(e,t,n)=>{"use strict";n.r(t),n.d(t,{calculateVisibility:()=>o});var r=n(2629);const o=({hasResponded:e,previousVisibility:t,requestedVisibility:n,config:o})=>{const{defaults:i,layoutMode:s,hideOnNoUserResponse:a}=o,{visible:c}=i||{};if("app"===s&&!t)return r.visibilityStates.open;if("window"===s&&a&&n!==r.visibilityStates.open)return e?n||t||r.visibilityStates.open:r.visibilityStates.hidden;if("inline"===s&&e&&!n)return t||r.visibilityStates.open;const l=r.visibilityStates.minimized;return n||t||c||l}},5567:(e,t,n)=>{"use strict";n.r(t),n.d(t,{className:()=>o});var r=n(2112);const o=(...e)=>e.flat().map((e=>"object"==typeof e?Object.entries(e).map((([e,t])=>t?e:"")).join(" "):e)).filter((e=>"string"==typeof e)).map((e=>e.split(" "))).flat().filter((e=>e.length)).map((e=>e.indexOf(r.CSS_NAME)>-1?e:[r.CSS_NAME,e].join("-"))).join(" ")},1905:e=>{e.exports=()=>()=>null},9409:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>pe});var r=n(6666),o=n(4134),i=n(915),s=n(3394),a=n(59),c=n(2752),l=n(5234),u=n(679),p=n.n(u),d=n(7210),f=n(9180),h=n(2285),y=n(9207),m=n(6113),b=n(4921),v=n(2849),g=n(2112),O=n(5567),w=n(6460),j=n(7844);const S=({children:e})=>{const t=(0,y.useRef)(0),{sendAction:n}=(0,v.useSeamlyCommands)(),{hasCountdown:r,isActive:o,stopCountdown:i}=(0,v.useSeamlyIdleDetachCountdown)(),s=(0,y.useCallback)((()=>{const e=(new Date).getTime(),s=()=>{n({type:"interactivity_update"}),t.current=e};r&&o&&(s(),i()),e-t.current>g.activitySendDelay&&s()}),[n,r,o,i]);return(0,j.jsx)("div",{className:(0,O.className)("activity-monitor"),tabIndex:"-1",onMouseDown:s,onKeyUp:s,onTouchStart:s,onMouseMove:s,onWheel:s,onPointerDown:s,onPointerMove:s,children:(0,j.jsx)(w.Z.Provider,{value:s,children:e})})};var _=n(2331),x=n(662),C=n(7865),E=n(3872),P=n(5150),T=n(5560),N=n(1153),I=n(5740);const k=["serviceSettings"];const A=["text","choice_prompt","image","video"],D=({eventBus:e})=>{const t=(0,v.useSeamlyApiContext)(),n=(0,m.useDispatch)(),r=(0,v.useEvents)(),o=(0,y.useRef)(null),{initCountdown:i,endCountdown:s}=(0,v.useSeamlyIdleDetachCountdown)(),{emitEvent:a}=(0,v.useSeamlyCommands)();return(0,y.useEffect)((()=>{if(t.connectionInfo){const r=e=>{const{payload:t}=e;if(!t||!t.participant)return;const{fromClient:r,participant:o}=t;!r&&o.name&&n((0,N.setHeaderSubTitle)(o.name)),n((0,N.setParticipant)({participant:o,fromClient:r})),o.introduction&&n((0,N.addEvent)(e))},c=t.stream().subscribe({next:t=>{const{type:o,payload:c}=t;switch(o){case"ui":switch(c.state&&c.state.hasOwnProperty("loading")&&n((0,N.setIsLoading)(c.state.loading)),c.type){case"idle_detach_countdown":i(c.body.duration);break;case"idle_detach_countdown_elapsed":s(void 0,!0);break;case"resume_conversation_prompt":n((0,N.initResumeConversationPrompt)());break;case"user_first_response":n((0,P.setHasResponded)(!0)),e.emit("system.userFirstResponse",c.body)}break;case"message":switch(r(c),c.type){case"text":case"choice_prompt":case"splash":case"image":case"upload":case"video":case"cta":case"custom":case"carousel":case"card":c.service&&c.service.serviceSessionId&&n((0,N.setActiveService)(c.service.serviceSessionId)),n((0,N.addEvent)(t))}break;case"participant":r(t);break;case"service_data":c.persist&&n((0,N.setServiceDataItem)(c));break;case"ack":n((0,N.ackEvent)(t.payload));break;case"system":if("service_changed"===c.type){const{serviceSettings:e}=c,t=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(c,k),{entry:r}=e,{upload:o}=r.options;n((0,N.setFeatureEnabledState)({key:I.featureKeys.uploads,enabled:!(!o||!o.enabled)})),n((0,N.setServiceEntryMetadata)(r)),n((0,N.setActiveService)(c.serviceSessionId)),a("system.serviceChanged",t)}break;case"info":"divider"!==c.type&&"text"!==c.type&&"translation"!==c.type||n((0,N.addEvent)(t));break;case"error":switch(c.type){case"find_conversation_erred":const e=new E.default(t);n((0,T.setInterrupt)({name:e.name,action:e.action,message:e.message,originalEvent:e.originalEvent,originalError:e.originalError}));break;case"seamly_offline":const r=new C.default(t);n((0,T.setInterrupt)({name:r.name,message:r.message,langKey:r.langKey,originalEvent:r.originalEvent,originalError:r.originalError})),n((0,N.clearEvents)());break;default:const o=new x.default(t);n((0,T.setInterrupt)({name:o.name,message:o.message,langKey:o.langKey,originalEvent:o.originalEvent,originalError:o.originalError,action:o.action}))}break;case"socket_opened":n((0,T.clearInterrupt)())}}});return t.stream().filter((e=>"message"===e.type&&A.includes(e.payload.type))).subscribe({next:({payload:t})=>{t.id!==o.current&&e.emit("message",t),o.current=t.id}}),()=>{c.unsubscribe()}}return()=>{}}),[n,t,e,i,s,a]),(0,y.useEffect)((()=>{if(t.stream){const e=t.stream().filter((e=>"sync"===e.type)).subscribe({next:e=>{const{payload:o}=e,i=r[r.length-1],{id:s}=o.lastEvent;i&&s===i.payload.id||t.getConversation().then((e=>{e&&n((0,N.setHistory)(e))})).catch((e=>{n((0,T.setInterrupt)({name:e.name,message:e.message,langKey:e.langKey,originalEvent:e.originalEvent,originalError:e.originalError}))}))}});return()=>{e.unsubscribe()}}return()=>{}}),[t,r,n]),null};var R=n(546),M=n(9643),L=n(641);const U=({children:e})=>{const{t}=(0,R.useI18n)(),n=(0,m.useDispatch)(),r=(0,v.useSeamlyApiContext)(),{addUploadBubble:o}=(0,v.useSeamlyCommands)();return(0,j.jsx)(L.Z.Provider,{value:e=>{const i=(0,M.randomId)(),s=r.uploadFile(e,(e=>{n((0,N.setUploadProgress)({fileId:i,progress:Math.ceil(e)}))}),(e=>{const{id:t,transactionId:r,occurredAt:s,body:{contentType:a,filename:c,filesize:l,url:u}}=e.body;n((0,N.setUploadComplete)(i)),o(t,r,s,a,c,l,u)}),(e=>{let r;switch(e&&e.body?e.body.error:""){case"file_uploads_are_disabled":r=t("fileUpload.errors.unavailable");break;case"request_entity_too_large":r=t("fileUpload.errors.tooLarge");break;case"file_has_invalid_mime_type":r=t("fileUpload.errors.wrongType");break;case"virus_found":r=t("fileUpload.errors.virusFound");break;default:r=t("fileUpload.errors.general")}n((0,N.setUploadError)({fileId:i,errorText:r}))}));n((0,N.registerUpload)({fileId:i,fileName:e.name,uploadHandle:s}))},children:e})};var F=n(1154);const B=()=>{const{hasCountdown:e,isActive:t,remaining:n,decrementCountdown:r}=(0,F.Z)();return((e,t)=>{const n=(0,y.useRef)(e);(0,y.useEffect)((()=>{n.current=e}),[e]),(0,y.useEffect)((()=>{if(null!==t){const e=setInterval((function(){n.current()}),t);return()=>clearInterval(e)}}),[t])})((()=>{r()}),e&&t&&n>0?1e3:null),null};var H=n(6065);const $=()=>{const{initUserSelectedOptions:e}=(0,v.useSeamlyOptions)(),t=(0,y.useRef)(!1),n=(0,H.useConfig)();return(0,y.useEffect)((()=>{n.api&&!t.current&&(t.current=!0,e())}),[e,n]),null};var V=n(2108),z=n(8877),q=n(3742),W=n(2629);function G(e,t,n=[]){const r=(0,y.useContext)(_.SeamlyEventBusContext),o=(0,y.useRef)();o.current=t,(0,y.useEffect)((()=>{if(!n.every(Boolean))return;const t=(...e)=>o.current?.(...e);return r.emit("function.register",e,t),()=>r.emit("function.unregister",e,t)}),[r,e,...n])}const Z=()=>{const e=(0,H.useConfig)(),{sendMessage:t,sendContext:n,sendAction:r}=(0,v.useSeamlyCommands)(),{setVisibility:o,visible:i}=(0,q.useVisibility)(),s=(0,y.useRef)(i),a=(0,y.useContext)(_.SeamlyEventBusContext),c=(0,v.useSeamlyApiContext)(),l=(0,v.useSeamlyUnreadCount)(),u=(0,y.useRef)(null),p=(0,y.useRef)(null),{isInline:d,isResolving:f}=(0,v.useSeamlyLayoutMode)(),{hasInterrupt:h}=(0,z.useInterrupt)(),m=(0,v.useSeamlyConversationUrl)(),b=(0,y.useRef)(null),g=(0,v.useSeamlyActivityEventHandler)(),{enableTranslations:O,disableTranslations:w}=(0,V.useTranslations)();return(0,y.useEffect)((()=>{s.current=i}),[i]),G("askText",(e=>{t({body:e})}),[c?.send]),G("setVariables",(e=>{n({variables:e})}),[c?.send]),G("getVisibility",(e=>{e?e(s.current):console.warn("A callback function is required for the getVisibility action.")})),G("setVisibility",(e=>{Object.values(W.visibilityStates).includes(e)?(g(),o(e)):console.error('Requested visibility states should be "open", "minimized" ,"hidden" or null.')}),[e?.api]),G("sendCustomAction",((e,t)=>{r({type:"custom",body:{type:e,body:t}})}),[c.send]),G("setTopic",(({name:e,fallbackMessage:t})=>{e&&t?r({type:I.actionTypes.setTopic,body:{name:e,fallbackMessage:t}}):console.warn("A name and a fallbackMessage are required for the setTopic action.")}),[c.send]),G("setTranslation",(({enabled:e,locale:t})=>{e?O(t):w()}),[c.send]),(0,y.useEffect)((()=>{f||h||(b.current&&b.current!==m&&a.emit("unreadMessageCount",l),i===W.visibilityStates.open&&i!==p.current&&0!==u.current&&a.emit("unreadMessageCount",0),i!==W.visibilityStates.open&&l!==u.current&&a.emit("unreadMessageCount",l),p.current=i,u.current=l,b.current=m)}),[l,i,a,d,f,h,m]),null};var K=n(8803);const J=({children:e})=>{const t=(0,y.useContext)(_.SeamlyEventBusContext),[n,r]=(0,y.useState)({}),o=(0,y.useRef)(!0),i=(0,y.useCallback)((e=>{o.current&&(r(e),t.emit("aria-live",e))}),[r,t]);(0,y.useEffect)((()=>{let e=null;return n&&n.messageText&&(e=setTimeout((()=>{i({}),clearTimeout(e)}),500)),()=>{clearTimeout(e)}}),[n,i]),(0,y.useEffect)((()=>()=>{o.current=!1}),[]);const{ariaLive:s,messageText:a}=n;return(0,j.jsxs)(K.SeamlyLiveRegionContext.Provider,{value:i,children:[e,(0,j.jsxs)("div",{className:(0,O.className)("app__live-container"),children:[(0,j.jsx)("div",{"aria-live":"assertive","aria-atomic":"true",className:(0,O.className)("visually-hidden"),children:s===I.ariaLiveLevels.assertive?a:null}),(0,j.jsx)("div",{"aria-live":"polite","aria-atomic":"true",className:(0,O.className)("visually-hidden"),children:s===I.ariaLiveLevels.polite?a:null})]})]})};var X=n(4959);const Q=()=>{const{t:e}=(0,R.useI18n)(),t=(0,v.useEvents)(),n=(0,y.useRef)(0),r=(0,y.useRef)(0),o=(0,v.useSeamlyIsHistoryLoaded)(),{sendPolite:i}=(0,v.useLiveRegion)(),{isOpen:s}=(0,q.useVisibility)(),a=(0,y.useRef)(null),c=(0,y.useRef)(null),l=(0,y.useMemo)((()=>(0,X.debounce)((t=>{const n=t.filter((({payload:e})=>!e.fromClient&&!e.fromHistory)).length;n>r.current&&(i(e("message.srNewEventCount",{newCount:n-r.current})),r.current=n)}),g.newMessageScreenReaderWait)),[i,e]);return(0,y.useEffect)((()=>{t.length>n.current&&(s&&(c.current=l(t)),n.current=t.length)}),[t,l,s]),(0,y.useEffect)((()=>{a.current&&!s&&c.current&&(c.current(!0),c.current=null)}),[s]),(0,y.useEffect)((()=>{o&&setTimeout((()=>{i(e("window.srTexts.onHistoryLoad"))}),500)}),[o,e,i]),null},Y=()=>{const{t:e}=(0,R.useI18n)(),t=(0,v.useEvents)(),n=(0,m.useDispatch)(),{isOpen:r,isVisible:o}=(0,q.useVisibility)(),{sendAction:i}=(0,v.useSeamlyCommands)(),s=(0,v.useSeamlyUnreadCount)(),{sendPolite:a}=(0,v.useLiveRegion)(),c=(0,y.useMemo)((()=>(0,X.debounce)(a,g.unreadScreenReaderWait)),[a]),l=(0,y.useRef)(null),u=(0,y.useRef)(null);return(0,y.useEffect)((()=>{if(!r)return;const e=t.filter((e=>(0,N.isUnreadMessage)(e)&&e.payload.messageStatus===I.readStates.received)).map((e=>e.payload.id));e.length>0&&(n((0,N.setEventsRead)(e)),i({type:I.actionTypes.read,events:e}))}),[t,n,r,i]),(0,y.useEffect)((()=>{l.current!==o&&!o&&u.current&&u.current(),0!==s&&!r&&o&&(u.current=c(e("message.srTextUnreadCount",{unreadCount:s}))),l.current=o}),[s,r,o,c,e]),null},ee=({store:e,children:t,eventBus:n,api:r})=>((0,y.useErrorBoundary)((t=>e.dispatch((0,h.catchError)(t)))),(0,j.jsx)(m.Provider,{store:e,children:(0,j.jsx)(_.SeamlyEventBusContext.Provider,{value:n,children:(0,j.jsx)(_.SeamlyApiContext.Provider,{value:r,children:(0,j.jsx)(J,{children:(0,j.jsxs)(b.default,{children:[(0,j.jsx)($,{}),(0,j.jsx)(D,{eventBus:n}),(0,j.jsx)(Y,{}),(0,j.jsx)(Q,{}),(0,j.jsx)(B,{}),(0,j.jsxs)(S,{children:[(0,j.jsx)(Z,{}),(0,j.jsx)(U,{children:t})]})]})})})})}));function te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ne(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?te(Object(n),!0).forEach((function(t){re(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const oe=e=>(0,j.jsx)(ee,ne(ne({},e),{},{children:(0,j.jsx)(f.default,{})})),ie=["namespace","parentElement","showFaq"],se=["view"];function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ae(Object(n),!0).forEach((function(t){le(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ue(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}class pe{constructor(e,t){const{namespace:n="",parentElement:o,showFaq:i}=e,s=ue(e,ie);this.config=ce(ce({},s),{},{namespace:n,showFaq:!1!==i}),this.namespace=n,this.parentElement=o,this.externalApi=t,this.api=new r.API({layoutMode:e.layoutMode,namespace:e.namespace,config:e.api,context:e.context}),this.eventBus=new(p()),this.functions={},this.registerFunctions({on:this.eventBus.on,off:this.eventBus.off}),this.eventBus.on("function.register",((e,t)=>this.registerFunction(e,t))),this.eventBus.on("function.unregister",((e,t)=>this.unregisterFunction(e,t)))}async render(){const e=this.config.customComponents||{},{view:t}=e,n=ue(e,se),r=ce(ce({},this.config),{},{customComponents:Object.keys(n).length?n:void 0}),u=(0,c.createStore)({api:this.api,eventBus:this.eventBus,config:r,initialState:void 0});u.dispatch((0,s.setConfig)(r)),await u.dispatch((0,i.initializeConfig)());try{const{locale:e}=await u.dispatch((0,o.initializeApp)()).unwrap();await u.dispatch((0,a.setLocale)(e))}catch(e){}u.dispatch((0,l.initializeVisibility)()),t?(0,d.render)((0,j.jsx)(ee,{eventBus:this.eventBus,store:u,api:this.api,children:(0,j.jsx)(t,{})}),this.parentElement):(0,d.render)((0,j.jsx)(oe,{config:r,eventBus:this.eventBus,store:u,api:this.api}),this.parentElement)}destroy(){(0,d.render)(null,this.parentElement),this.eventBus.off(),this.api.disconnect(),delete this.functions}registerFunctions(e){Object.entries(e).forEach((([e,t])=>{this.registerFunction(e,t)}))}registerFunction(e,t){this.functions[e]=this.functions[e]||[],this.functions[e].push(t),this.externalApi.handleActions()}unregisterFunction(e,t){const n=this.functions[e];n&&n.length&&(this.functions[e]=n.filter((e=>e!==t)))}execFunction(e,...t){const n=this.functions[e];return!(!n||!n.length||(n.forEach((n=>{try{n(...t)}catch(t){console.error(`Action(${e}) failed: `,t)}})),0))}}},7053:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(9409);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){s(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const a=e=>"object"==typeof e&&"action"in e,c=e=>i(i({},e),{},{args:Array.isArray(e.args)?e.args:[e.args]}),l=class{constructor(e){this._waitingActions=[],this._instances={},this.appConfig=e,this.context={}}push(...e){(e=e.filter(a).map(c)).length&&(this._waitingActions.push(...e),this.handleActions())}handleActions(){const e=this._waitingActions;this._waitingActions=[],e.forEach((e=>{switch(e.action){case"init":this.handleInit(e);break;case"destroy":this.handleDestroy(e);break;default:this.handleAction(e)||this.setContext(e.action,...e.args)||this._waitingActions.push(e)}}))}setContext(e,t){switch(e){case"setTopic":const{name:e}=t;return e&&(this.context.topic=e),!0;case"setTranslation":const{enabled:n,locale:r}=t;return n&&r&&(this.context.translationLocale=r),!0;case"setVariables":return Object.keys(t).length>0&&(this.context.variables=i({},t)),!0;default:return!1}}handleInit(e){const t=this.getUserConfig(...e.args),n=this.getCombinedConfig(t),{parentElement:r,namespace:o}=n||t;if(o?Object.values(this._instances).forEach((e=>{e.parentElement!==r&&e.namespace!==o||this.destroy(e)})):this.destroy(),n){const e=this.createInstance(n);this._instances[n.namespace]=e,this.context={},e.render()}}handleDestroy(e){this.destroy(e.instance)}handleAction(e){const{action:t,instance:n,args:r}=e,o=Object.values(this._instances);return!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: ${t}`),o.map((e=>(!n||e.namespace===n)&&e.execFunction(t,...r))).some(Boolean)}createInstance(e){return new r.default(e,this)}destroy(e){e?("string"==typeof e&&(e=this._instances[e]),e&&(e.destroy(),delete this._instances[e.namespace])):Object.entries(this._instances).forEach((([e,t])=>{t.destroy(),delete this._instances[e]}))}getUserConfig(e={}){return e}getCombinedConfig(e){const t=i(i({},e.context||this.appConfig.context),this.context),n=this.getMergedVariables(e);Object.keys(n).length>0&&(t.variables=n);const r=i(i({},this.appConfig.defaults),e.defaults),o=i(i(i({},this.appConfig),e),{},{api:i(i({},this.appConfig.api),e.api),context:Object.keys(t).length?t:void 0,defaults:Object.keys(r).length?r:void 0});return"function"==typeof this.appConfig?this.appConfig(o):o}getMergedVariables(e){return i(i(i({},this.appConfig.context?.variables||{}),e.context?.variables||{}),this.context.variables||{})}}},3022:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(7053);function o(e){if(window.seamly&&!Array.isArray(window.seamly))throw new Error("Seamly UI has already been initialised. Use the window.seamly object to start new instances instead.");const t=Array.isArray(window.seamly)?window.seamly:[],n=new r.default(e);window.seamly={push:n.push.bind(n)},n.push(...t)}},9643:(e,t,n)=>{"use strict";function r(){return`_${(Number(String(Math.random()).slice(2))+Date.now()+Math.round(performance.now())).toString(36)}`}n.r(t),n.d(t,{randomId:()=>r})},5423:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(7210).createContext)({})},4921:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>at});var r=n(9207),o=n(6065),i=n(5423),s=n(9661),a=n(6425),c=n(1153),l=n(2108),u=n(6113),p=n(1989),d=n(546),f=n(2849),h=n(5567),y=n(7209),m=n(7210),b=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],v=b.join(","),g="undefined"==typeof Element,O=g?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,w=!g&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},j=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(v));return t&&O.call(e,v)&&r.unshift(e),r.filter(n)},S=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if("SLOT"===s.tagName){var a=s.assignedElements(),c=e(a.length?a:s.children,!0,r);r.flatten?o.push.apply(o,c):o.push({scope:s,candidates:c})}else{O.call(s,v)&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var l=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),u=!r.shadowRootFilter||r.shadowRootFilter(s);if(l&&u){var p=e(!0===l?s.children:l.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scope:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},_=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},x=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},C=function(e){return"INPUT"===e.tagName},E=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},P=function(e,t){return!(t.disabled||function(e){return C(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=O.call(e,"details>summary:first-of-type")?e.parentElement:e;if(O.call(o,"details:not([open]) *"))return!0;var i=w(e).host,s=(null==i?void 0:i.ownerDocument.contains(i))||e.ownerDocument.contains(e);if(n&&"full"!==n){if("non-zero-area"===n)return E(e)}else{if("function"==typeof r){for(var a=e;e;){var c=e.parentElement,l=w(e);if(c&&!c.shadowRoot&&!0===r(c))return E(e);e=e.assignedSlot?e.assignedSlot:c||l===e.ownerDocument?c:l.host}e=a}if(s)return!e.getClientRects().length}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!O.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},T=function(e,t){return!(function(e){return function(e){return C(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||w(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){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",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||_(t)<0||!P(e,t))},N=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},I=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scope,s=i?t.scope:t,a=_(s,i),c=i?e(t.candidates):s;0===a?i?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:a,item:t,isScope:i,content:c})})),r.sort(x).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},k=function(e,t){var n;return n=(t=t||{}).getShadowRoot?S([e],t.includeContainer,{filter:T.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:N}):j(e,t.includeContainer,T.bind(null,t)),I(n)},A=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==O.call(e,v)&&T(t,e)},D=b.concat("iframe").join(","),R=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==O.call(e,D)&&P(t,e)};function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var F,B=(F=[],{activateTrap:function(e){if(F.length>0){var t=F[F.length-1];t!==e&&t.pause()}var n=F.indexOf(e);-1===n||F.splice(n,1),F.push(e)},deactivateTrap:function(e){var t=F.indexOf(e);-1!==t&&F.splice(t,1),F.length>0&&F[F.length-1].unpause()}}),H=function(e){return setTimeout(e,0)},$=function(e,t){var n=-1;return e.every((function(e,r){return!t(e)||(n=r,!1)})),n},V=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"==typeof e?e.apply(void 0,n):e},z=function(e){return e.target.shadowRoot&&"function"==typeof e.composedPath?e.composedPath()[0]:e.target},q=n(4959);function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){Z(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const K=({children:e,onClose:t,"aria-label":n,"aria-labelledby":o,fallBackFocusRef:i})=>{const s=(0,f.useGeneratedId)(),a=(0,r.useRef)(null),c=(0,r.useRef)(null),[l,u]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{return l&&(c.current=(e=a.current,t={initialFocus:i&&i.current?i.current:null},r=(null==t?void 0:t.document)||document,o=L({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0},t),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0},u=function(e,t,n){return e&&void 0!==e[t]?e[t]:o[n||t]},p=function(e){return s.containerGroups.findIndex((function(t){var n=t.container,r=t.tabbableNodes;return n.contains(e)||r.find((function(t){return t===e}))}))},d=function(e){var t=o[e];if("function"==typeof t){for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];t=t.apply(void 0,i)}if(!0===t&&(t=void 0),!t){if(void 0===t||!1===t)return t;throw new Error("`".concat(e,"` was specified but was not a node, or did not return a node"))}var a=t;if("string"==typeof t&&!(a=r.querySelector(t)))throw new Error("`".concat(e,"` as selector refers to no known node"));return a},f=function(){var e=d("initialFocus");if(!1===e)return!1;if(void 0===e)if(p(r.activeElement)>=0)e=r.activeElement;else{var t=s.tabbableGroups[0];e=t&&t.firstTabbableNode||d("fallbackFocus")}if(!e)throw new Error("Your focus-trap needs to have at least one focusable element");return e},h=function(){if(s.containerGroups=s.containers.map((function(e){var t,n,r=k(e,o.tabbableOptions),i=(t=e,(n=(n=o.tabbableOptions)||{}).getShadowRoot?S([t],n.includeContainer,{filter:P.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):j(t,n.includeContainer,P.bind(null,n)));return{container:e,tabbableNodes:r,focusableNodes:i,firstTabbableNode:r.length>0?r[0]:null,lastTabbableNode:r.length>0?r[r.length-1]:null,nextTabbableNode:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=i.findIndex((function(t){return t===e}));if(!(n<0))return t?i.slice(n+1).find((function(e){return A(e,o.tabbableOptions)})):i.slice(0,n).reverse().find((function(e){return A(e,o.tabbableOptions)}))}}})),s.tabbableGroups=s.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),s.tabbableGroups.length<=0&&!d("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},y=function e(t){!1!==t&&t!==r.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(f()))},m=function(e){var t=d("setReturnFocus",e);return t||!1!==t&&e},b=function(e){var t=z(e);p(t)>=0||(V(o.clickOutsideDeactivates,e)?n.deactivate({returnFocus:o.returnFocusOnDeactivate&&!R(t,o.tabbableOptions)}):V(o.allowOutsideClick,e)||e.preventDefault())},v=function(e){var t=z(e),n=p(t)>=0;n||t instanceof Document?n&&(s.mostRecentlyFocusedNode=t):(e.stopImmediatePropagation(),y(s.mostRecentlyFocusedNode||f()))},g=function(e){if(function(e){return"Escape"===e.key||"Esc"===e.key||27===e.keyCode}(e)&&!1!==V(o.escapeDeactivates,e))return e.preventDefault(),void n.deactivate();(function(e){return"Tab"===e.key||9===e.keyCode})(e)&&function(e){var t=z(e);h();var n=null;if(s.tabbableGroups.length>0){var r=p(t),i=r>=0?s.containerGroups[r]:void 0;if(r<0)n=e.shiftKey?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(e.shiftKey){var a=$(s.tabbableGroups,(function(e){var n=e.firstTabbableNode;return t===n}));if(a<0&&(i.container===t||R(t,o.tabbableOptions)&&!A(t,o.tabbableOptions)&&!i.nextTabbableNode(t,!1))&&(a=r),a>=0){var c=0===a?s.tabbableGroups.length-1:a-1;n=s.tabbableGroups[c].lastTabbableNode}}else{var l=$(s.tabbableGroups,(function(e){var n=e.lastTabbableNode;return t===n}));if(l<0&&(i.container===t||R(t,o.tabbableOptions)&&!A(t,o.tabbableOptions)&&!i.nextTabbableNode(t))&&(l=r),l>=0){var u=l===s.tabbableGroups.length-1?0:l+1;n=s.tabbableGroups[u].firstTabbableNode}}}else n=d("fallbackFocus");n&&(e.preventDefault(),y(n))}(e)},O=function(e){var t=z(e);p(t)>=0||V(o.clickOutsideDeactivates,e)||V(o.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},w=function(){if(s.active)return B.activateTrap(n),s.delayInitialFocusTimer=o.delayInitialFocus?H((function(){y(f())})):y(f()),r.addEventListener("focusin",v,!0),r.addEventListener("mousedown",b,{capture:!0,passive:!1}),r.addEventListener("touchstart",b,{capture:!0,passive:!1}),r.addEventListener("click",O,{capture:!0,passive:!1}),r.addEventListener("keydown",g,{capture:!0,passive:!1}),n},_=function(){if(s.active)return r.removeEventListener("focusin",v,!0),r.removeEventListener("mousedown",b,!0),r.removeEventListener("touchstart",b,!0),r.removeEventListener("click",O,!0),r.removeEventListener("keydown",g,!0),n},(n={get active(){return s.active},get paused(){return s.paused},activate:function(e){if(s.active)return this;var t=u(e,"onActivate"),n=u(e,"onPostActivate"),o=u(e,"checkCanFocusTrap");o||h(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=r.activeElement,t&&t();var i=function(){o&&h(),w(),n&&n()};return o?(o(s.containers.concat()).then(i,i),this):(i(),this)},deactivate:function(e){if(!s.active)return this;var t=L({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},e);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,_(),s.active=!1,s.paused=!1,B.deactivateTrap(n);var r=u(t,"onDeactivate"),i=u(t,"onPostDeactivate"),a=u(t,"checkCanReturnFocus"),c=u(t,"returnFocus","returnFocusOnDeactivate");r&&r();var l=function(){H((function(){c&&y(m(s.nodeFocusedBeforeActivation)),i&&i()}))};return c&&a?(a(m(s.nodeFocusedBeforeActivation)).then(l,l),this):(l(),this)},pause:function(){return s.paused||!s.active||(s.paused=!0,_()),this},unpause:function(){return s.paused&&s.active?(s.paused=!1,h(),w(),this):this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return s.containers=t.map((function(e){return"string"==typeof e?r.querySelector(e):e})),s.active&&h(),this}}).updateContainerElements(e),n),c.current.activate()),()=>{c.current&&c.current.deactivate()};var e,t,n,r,o,s,u,p,d,f,h,y,m,b,v,g,O,w,_}),[l,i]),(0,r.useEffect)((()=>{const e=(0,q.createAriaHider)();return()=>{e()}}),[l]),(0,r.useEffect)((()=>{l&&a.current.addEventListener("keydown",(e=>{(e.code&&"Escape"===e.code||27===e.keyCode)&&t()}))}),[l,t]),(0,r.useLayoutEffect)((()=>{const e=document.getElementsByTagName("body")[0],t=document.createElement("div");return t.setAttribute("id",s),t.setAttribute("role","dialog"),t.setAttribute("data-nosnippet","true"),t.setAttribute("aria-modal","true"),n&&t.setAttribute("aria-label",n),o&&t.setAttribute("aria-labelledby",o),e.appendChild(t),a.current=t,u(!0),()=>{a.current&&(e.removeChild(a.current),a.current=null)}}),[n,o,s]),"function"==typeof e?e({onClose:t,modalRenderFn:e=>a.current&&(0,m.render)(e,a.current)}):a.current&&(0,m.render)((0,m.toChildArray)(e).map((e=>(e.props=G(G({},e.props),{},{onClose:t}),e))),a.current)};var J=n(7844);const X=({url:e,description:t,onClose:n})=>{const{zIndex:i,layoutMode:s,namespace:a}=(0,o.useConfig)(),c=(0,f.useSeamlyActivityEventHandler)(),l=(0,f.useSeamlyAppContainerClassNames)(),u=(0,r.useRef)(null),{t:p}=(0,d.useI18n)(),m=["modal",`app--layout-${s}`,`namespace--${a}`,...l],b=e=>{e.stopPropagation()},v=()=>{n()},g=i?{zIndex:i+1}:void 0;return(0,J.jsx)(K,{onClose:n,"aria-label":p("lightbox.heading"),fallBackFocusRef:u,children:({onClose:n,modalRenderFn:r})=>r((n=>(0,J.jsx)("div",{className:(0,h.className)(m),onClick:v,style:g,children:(0,J.jsxs)("div",{className:(0,h.className)("modal__float"),tabIndex:"-1",onMouseDown:c,onKeyDown:c,onTouchStart:c,onMouseMove:c,onWheel:c,onPointerDown:c,onPointerMove:c,ref:u,children:[(0,J.jsx)("div",{className:(0,h.className)("modal__inner"),onClick:b,children:(0,J.jsx)("img",{className:(0,h.className)("modal__image"),src:e,alt:t})}),(0,J.jsxs)("button",{type:"button",className:(0,h.className)("modal__close"),onClick:n,children:[(0,J.jsx)(y.default,{name:"close",size:"16"}),p("lightbox.closeLabel")]})]})}))(n))})},Q=({description:e,url:t})=>{const{t:n}=(0,d.useI18n)(),[o,i]=(0,r.useState)(!1);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)("button",{type:"button",className:(0,h.className)("modal__enlarge"),onClick:()=>{i(!0)},children:[n("message.image.srTextEnlargeButtonLabel",{description:e}),(0,J.jsx)(y.default,{name:"enlarge",size:"32"})]}),o&&(0,J.jsx)(X,{url:t,description:e,onClose:()=>{i(!1)}})]})},Y=["event","descriptorId"];function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const re=["event","descriptorId"];function oe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oe(Object(n),!0).forEach((function(t){se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ae=n(5740),ce=n(8711);const le={[ae.dividerKeys.new_topic]:"newtopic"};var ue=n(841);const pe=["event"];function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const he={default:({event:e})=>{const{t}=(0,d.useI18n)(),{subtype:n}=e.payload.body,r=le[ae.dividerKeys[n]];return(0,J.jsx)(ce.Z,{dividerType:r,iconName:ae.dividerKeys[n],children:(0,J.jsx)("p",{children:t(`dividerKeys.${ae.dividerKeys[n]}`)})})},[ae.dividerKeys.new_translation]:({event:e})=>{const{t}=(0,d.useI18n)(),n=(0,f.useEvents)(),{body:{translationEnabled:o,translationLocale:i,text:s},id:a}=e.payload,{enableTranslations:c}=(0,l.useTranslations)(),p=(0,l.useLocaleNativeName)(i),y=(0,u.useSelector)((e=>e.translations.translatedEventGroups)),m=(0,u.useDispatch)(),b=(0,r.useCallback)((()=>{y[a]?m((0,ue.enableEventsTranslation)({events:n,id:a})):m((0,ue.disableEventsTranslation)({events:n,id:a}))}),[m,n,a,y]);return(0,J.jsxs)(ce.Z,{iconName:"newTranslation",dividerType:"newtranslation",children:[(0,J.jsx)("p",{className:(0,h.className)("divider__title"),children:t(o?"translations.divider.startText":"translations.divider.stopText",{language:p})}),o?(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)("p",{children:s}),(0,J.jsx)("button",{className:(0,h.className)("button","button--secondary"),onClick:b,children:t(y[a]?"translations.toggle.showTranslationsButtonText":"translations.toggle.hideTranslationsButtonText")})]}):(0,J.jsx)("button",{className:(0,h.className)("button","button--secondary"),"data-testid":"restartTranslationButton",onClick:()=>{c(i)},children:t("translations.divider.restartButtonText")})]})}},ye=["event"];function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?me(Object(n),!0).forEach((function(t){ve(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ge=n(5327);const Oe=["event"];function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){Se(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _e=["event"];function xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(n),!0).forEach((function(t){Ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Pe=({children:e,url:t,target:n})=>t?(0,J.jsx)("a",{href:t,download:!0,target:n||void 0,className:(0,h.className)(["download","download-link"]),children:e}):(0,J.jsx)("span",{className:(0,h.className)("download"),children:e});var Te=n(36),Ne=n(5029);function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){Ae(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ae(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const De=({id:e,action:t,buttonText:n,description:o,hasFocus:i,image:s,title:a,isCarouselItem:c})=>{const l=(0,r.useRef)(null),{sendMessage:u,sendAction:p,emitEvent:d}=(0,f.useSeamlyCommands)(),y=(0,f.useGeneratedId)(),m=(0,r.useRef)(),b=t.type===ae.cardTypes.navigate?"a":"button",v=(0,r.useCallback)((()=>d(`action.${ae.actionTypes.clickCard}`,{type:ae.actionTypes.clickCta,originMessage:e,action:t})),[d,e,t]),g=(0,r.useCallback)((()=>{if(v(),t.type===ae.cardTypes.ask)u({body:t.ask});else if(t.type===ae.cardTypes.topic){const{topic:e,fallbackMessage:n}=t;p({type:ae.actionTypes.setTopic,body:{name:e,fallbackMessage:n}})}}),[u,t,p,v]),O=(0,r.useMemo)((()=>t.type===ae.cardTypes.navigate?{href:t.link,rel:"noopener noreferrer",target:t.newTab?"_blank":"_self",onClick:v}:{onClick:g}),[t,g,v]);return(0,r.useEffect)((()=>{c&&(i&&m.current?window.requestAnimationFrame((()=>l.current.focus())):l.current.blur()),m.current=!0}),[i,c]),(0,J.jsxs)("div",{className:(0,h.className)("card__wrapper"),id:e,tabIndex:"-1",ref:l,children:[(0,J.jsx)("img",{className:(0,h.className)("card__image"),src:s,alt:""}),(0,J.jsxs)("div",{className:(0,h.className)("card__content"),id:e,children:[a&&(0,J.jsx)("h2",{className:(0,h.className)("card__title"),children:a}),o&&(0,J.jsx)("div",{className:(0,h.className)("card__description"),dangerouslySetInnerHTML:{__html:o}}),(0,J.jsx)(b,ke(ke({tabIndex:c&&!i?"-1":void 0,className:(0,h.className)("button","button--primary"),"aria-describedby":y},O),{},{children:n}))]})]})};function Re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(n),!0).forEach((function(t){Le(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ue({item:e,items:t,index:n,isActive:r}){const{t:o}=(0,d.useI18n)();return(0,J.jsx)("div",{className:(0,h.className)("carousel-item",`carousel-item--${e.type}`),role:"group","aria-roledescription":"slide","aria-label":o("carousel.slide.label",{index:n+1,total:t.length}),children:(0,J.jsx)(De,Me(Me({},e),{},{isCarouselItem:!0,hasFocus:r}))})}function Fe({items:e,currentIndex:t,onChange:n,getItemKey:o,getItemLabel:i}){const s=e.length,a=(0,r.useCallback)((e=>{const r=Number(e.target.dataset.item||"0"),o=Math.min(s-1,Math.max(0,r));o!==t&&n(o)}),[s,t,n]);return(0,J.jsx)("div",{className:(0,h.className)("carousel-pagination__wrapper"),role:"group",children:(0,J.jsx)("ul",{className:(0,h.className)("carousel-pagination"),children:e.map(((e,n)=>{const r=t===n;return(0,J.jsx)("li",{className:(0,h.className)("carousel-pagination__item",r?"is-active":void 0),children:(0,J.jsx)("button",{className:(0,h.className)("carousel-pagination__button"),type:"button",onClick:a,"data-item":n,"aria-disabled":r?"true":void 0,"aria-label":i(e,n)})},o(e,n,"pagination-item-"))}))})})}function Be({items:e,currentIndex:t,onChange:n,children:r}){const{t:o}=(0,d.useI18n)(),i=e.length;return(0,J.jsxs)("div",{className:(0,h.className)("carousel-controls"),children:[(0,J.jsx)("button",{className:(0,h.className)("button","button--previous"),"aria-label":o("carousel.controls.previous"),onClick:()=>{n((t-1+i)%i)},children:(0,J.jsx)(y.default,{name:"arrowLeft",size:"16"})}),r,(0,J.jsx)("button",{className:(0,h.className)("button","button--next"),"aria-label":o("carousel.controls.next"),onClick:()=>{n((t+1)%i)},children:(0,J.jsx)(y.default,{name:"arrowRight",size:"16"})})]})}const He=(e,t,n)=>`${n}${t}`,$e=e=>e.label,Ve=({target:e})=>{e.scrollLeft=0};function ze({currentIndex:e,onChange:t,getItemKey:n=He,getItemLabel:o=$e,items:i}){const s=(0,Ne.I8)(),a=i.length,[c,l]=(0,r.useState)(Number(e||"0"));(0,r.useEffect)((()=>{l(Number(e||"0"))}),[l,e]);const u=(0,r.useRef)([]);u.current=(0,r.useMemo)((()=>Array(a).fill(1).map((()=>(0,m.createRef)()))),[a]);const p=(0,r.useRef)(!0),d=(0,r.useRef)();return d.current=t,(0,r.useEffect)((()=>{p.current?p.current=!1:d.current&&d.current(c)}),[c]),(0,J.jsxs)("div",{className:(0,h.className)("carousel"),role:"group","aria-roledescription":"carousel",children:[(0,J.jsx)("div",{className:(0,h.className)("carousel__slides-wrapper"),onScroll:Ve,children:(0,J.jsx)("div",{id:s,className:(0,h.className)("carousel__slides"),style:{width:100*a+"%",left:-100*c+"%"},"aria-live":"polite","aria-atomic":"false",children:i.map(((e,t)=>{const r=c===t;return(0,J.jsx)("div",{ref:u.current[t],className:(0,h.className)("carousel__slide",r?"is-active":void 0),"aria-hidden":r?void 0:"true",children:(0,J.jsx)(Ue,{item:e,items:i,currentIndex:c,index:t,isActive:r})},n(e,t,"item-"))}))})}),(0,J.jsx)("div",{className:(0,h.className)("carousel__controls"),children:(0,J.jsx)(Be,{currentIndex:c,items:i,onChange:l,controlId:s,children:(0,J.jsx)("div",{className:(0,h.className)("carousel__pagination"),children:(0,J.jsx)(Fe,{currentIndex:c,items:i,onChange:l,getItemKey:n,getItemLabel:o})})})})]})}const qe=(e,t,n="")=>`${n}${e.title}:${t}`,We=e=>e.title;function Ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ge(Object(n),!0).forEach((function(t){Ke(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ge(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ke(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Je=n(9279),Xe=n(5150),Qe=n(2841);const Ye=["event"];function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){nt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function nt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){it(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function it(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const st={message:{choice_prompt:s.default,text:a.default,image:e=>{let{event:t,descriptorId:n}=e,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Y);const{body:i}=(0,l.useTranslatedEventData)(t),{description:s,url:a,isZoomable:d}=i,[f,h]=(0,r.useState)(!1),y=(0,u.useDispatch)();return(0,J.jsxs)(p.default,te(te({event:t,type:"image"},o),{},{children:[(0,J.jsx)("img",{src:a,id:n,alt:s,onLoad:()=>{y((0,c.setLoadedImageEventIds)(t.payload.id)),h(!0)}}),d&&f&&(0,J.jsx)(Q,{description:s,url:a})]}))},splash:e=>{let{event:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Oe);const{payload:r}=t,{body:o}=(0,l.useTranslatedEventData)(t),i=(0,ge.Z)(r.id);return(0,J.jsx)(p.default,je(je({type:"splash",event:t,onClick:i},n),{},{bodyProps:{dangerouslySetInnerHTML:{__html:o.text}}}))},video:e=>{let{event:t,descriptorId:n}=e,r=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,re);const{body:o}=(0,l.useTranslatedEventData)(t),{description:i,url:s}=o;return(0,f.useSeamlyMessageContainerClassNames)(t).push("message--type-video"),(0,J.jsxs)(p.default,ie(ie({event:t,type:"video"},r),{},{children:[(0,J.jsx)("div",{id:n,className:(0,h.className)("visually-hidden"),children:i}),(0,J.jsx)("iframe",{title:i,src:s,allow:"autoplay; encrypted-media",allowFullScreen:!0})]}))},upload:e=>{let{event:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,_e);const{t:o}=(0,d.useI18n)(),{body:i}=(0,l.useTranslatedEventData)(t),{fromClient:s}=t.payload,{filename:a,url:c}=i,u=(0,r.useMemo)((()=>o(c?"fileUpload.srFileDownloadText":"fileUpload.srFileUploadedText",{fileName:a})),[c,a,o]);return(0,J.jsx)(p.default,Ce(Ce({event:t,type:"upload"},n),{},{children:(0,J.jsxs)(Pe,{url:c,target:s?void 0:"_blank",children:[(0,J.jsx)(y.default,{name:"download",size:"16"}),(0,J.jsx)("span",{"aria-hidden":"true",className:(0,h.className)("file-download"),children:a}),(0,J.jsx)("span",{className:(0,h.className)("visually-hidden"),children:u})]})}))},cta:({event:e})=>{const{body:t}=(0,l.useTranslatedEventData)(e),n=(0,ge.Z)(e.payload.id),{emitEvent:o}=(0,f.useSeamlyCommands)(),i=(0,f.useGeneratedId)(),s=(0,r.useCallback)((()=>o(`action.${ae.actionTypes.clickCta}`,{type:ae.actionTypes.clickCta,originMessage:e.payload.id,link:{url:t.buttonLink}})),[o,t,e]);return(0,J.jsxs)(p.default,{type:"cta",event:e,children:[(0,J.jsx)("div",{className:(0,h.className)("cta__content"),id:i,dangerouslySetInnerHTML:{__html:t.description},onClick:n}),(0,J.jsx)("a",{className:(0,h.className)("button","button--primary"),"aria-describedby":i,href:t.buttonLink,rel:"noreferrer",target:t.buttonNewTab?"_blank":"_self",onClick:s,children:t.buttonText})]})},carousel:({event:e})=>{const{body:t}=(0,l.useTranslatedEventData)(e),n=t.cards;return(0,J.jsx)(p.default,{event:e,modifiers:"type-carousel",children:(0,J.jsx)(ze,{items:n,ItemComponent:Ue,getItemKey:qe,getItemLabel:We})})},card:({event:e})=>{const{body:t}=(0,l.useTranslatedEventData)(e),n=(0,f.useGeneratedId)();return(0,J.jsx)(p.default,{type:"card",event:e,children:(0,J.jsx)(De,Ze({id:n},t))})}},info:{text:a.default,divider:e=>{let{event:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,pe);const r=he[ae.dividerKeys[t.payload.body.subtype]]||he.default;return(0,J.jsx)(r,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){fe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({event:t},n))},translation:e=>{let{event:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,ye);const{t:r}=(0,d.useI18n)(),{body:o}=(0,l.useTranslatedEventData)(t);return(0,J.jsx)(p.default,be(be({type:"text",event:t},n),{},{children:r(o.key.join("."),o.variables)}))},timeIndicator:Te.Z},participant:{participant:({event:e})=>{const{participant:t}=e.payload,{body:n}=(0,l.useTranslatedEventData)(e);return n?(0,J.jsx)(ce.Z,{graphicSrc:t.avatar,graphicType:t.avatar?"avatar":void 0,iconName:t.avatar?void 0:"balloon",childrenHTML:n,dividerType:"participant"}):null}},service_data:{suggestion:e=>{let{event:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,Ye);const[i,s]=(0,r.useState)(!0),a=(0,u.useDispatch)(),c=(0,Je.h)(),{sendAction:y,addMessageBubble:m}=(0,f.useSeamlyCommands)(),{suggestions:b,payload:v}=(e=>{const{payload:t}=e,{body:n}=(0,l.useTranslatedEventData)(e);return{suggestions:n,payload:t}})(t),{showSuggestions:g}=(0,o.useConfig)(),O=(0,f.useEvents)(),{t:w}=(0,d.useI18n)(),j=w("suggestions.headingText"),S=w("suggestions.footerText"),_=(0,r.useMemo)((()=>O.some((({payload:e})=>e?.transactionLast))),[O]),x=(0,r.useCallback)((({id:e,question:t})=>{s(!1),a((0,Xe.setHasResponded)(!0)),y({type:ae.actionTypes.custom,originMessage:v.id,body:{type:"faqclick",body:{faqId:e,faqQuestion:t}}}),m(t)}),[a,y,v.id,m]);return i&&!c&&_&&g?(0,J.jsxs)("div",{className:(0,h.className)("suggestions","suggestions--conversation"),children:[j&&(0,J.jsx)("p",{className:(0,h.className)("suggestions__heading"),children:j}),(0,J.jsxs)(p.default,tt(tt({type:"suggestions",showParticipant:!1,event:t},n),{},{children:[(0,J.jsx)(Qe.Z,{className:"suggestions__list--conversation",onClickSuggestion:x,suggestions:b}),S&&(0,J.jsx)("p",{className:(0,h.className)("suggestions__footer"),children:S})]}))]}):null}}},at=({children:e})=>{const{customComponents:t}=(0,o.useConfig)(),n=(0,r.useMemo)((()=>Object.keys(st).reduce(((e,n)=>ot(ot({},e),{},{[n]:ot(ot({},st[n]),t?t[n]:{})})),{fallback:a.default})),[t]);return(0,J.jsx)(i.Z.Provider,{value:n,children:e})}},2212:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>O});var r=n(546),o=n(3742),i=n(5567),s=n(9207),a=n(6065),c=n(7844);const l=()=>{const{t:e}=(0,r.useI18n)(),{showDisclaimer:t}=(0,a.useConfig)();return t&&(0,c.jsxs)("div",{className:(0,i.className)("disclaimer"),tabIndex:"0",children:[(0,c.jsx)("h2",{className:(0,i.className)("disclaimer__title"),children:e("disclaimer.title")}),(0,c.jsx)("div",{className:(0,i.className)("disclaimer__message"),dangerouslySetInnerHTML:{__html:e("disclaimer.content")}})]})};var u=n(8956),p=n(2849),d=n(4809),f=n(4921),h=n(2562),y=n(36);const m=({event:e,newParticipant:t})=>{const[n,r]=(0,h.Z)(e);if(!n)return null;const o=["conversation__item"];return"info"===e.type?o.push("conversation__item--source-info"):e.payload.fromClient?o.push("conversation__item--source-user"):o.push("conversation__item--source-agent"),t&&o.push("conversation__item--new-participant"),(0,c.jsxs)("li",{className:(0,i.className)(o),children:[e.timeIndicator&&(0,c.jsx)(y.Z,{event:e}),(0,c.jsx)(n,{event:e,children:(0,c.jsx)(r,{event:e})})]})};var b=n(7409);const v=()=>{const{id:e}=(0,p.useSeamlyCurrentAgent)()||{};return(0,c.jsx)("li",{className:(0,i.className)("conversation__item","conversation__item--source-agent"),children:(0,c.jsxs)("div",{className:(0,i.className)("message","message--source-agent","message--type-loading"),children:[(0,c.jsx)(b.default,{eventPayload:{fromClient:!1,participant:e}}),(0,c.jsx)("div",{className:(0,i.className)("message__body"),children:(0,c.jsxs)("span",{className:(0,i.className)("loader"),children:[(0,c.jsx)("span",{className:(0,i.className)("loader__part","one")}),(0,c.jsx)("span",{className:(0,i.className)("loader__part","two")}),(0,c.jsx)("span",{className:(0,i.className)("loader__part","three")}),(0,c.jsx)("span",{className:(0,i.className)("loader__part","four")})]})})]})})},g=()=>{const e=(0,d.useEvents)();let t=null;return e.map((e=>{const{type:n,payload:r}=e,{participant:o,fromClient:i}=r;let s=!1;if("participant"!==n){const n=i?"seamly-client-participant":o;"info"!==e.type&&t!==n&&(s=!0),t=n}return(0,c.jsx)(m,{event:e,newParticipant:s},e.payload.key||e.payload.id)}))},O=()=>{const{t:e}=(0,r.useI18n)(),t=(0,s.useRef)(null),n=(0,d.useEvents)(),a=(0,p.useSeamlyIsLoading)(),{isOpen:h}=(0,o.useVisibility)(),y=(0,p.useSkiplink)(),m=(0,p.useSkiplinkTargetFocusing)(),b=(0,d.useLoadedImageEventIds)();return(0,s.useLayoutEffect)((()=>{const e=t.current;e&&requestAnimationFrame((async()=>{await(0,u.Vs)(30),e.scrollTop=e.scrollHeight}))}),[n,a,h,b]),(0,c.jsxs)(c.Fragment,{children:[h&&(0,c.jsx)("a",{className:(0,i.className)("skip-link"),href:`#${y}`,onClick:e=>{e.preventDefault(),m()},children:e("skiplinkText")}),(0,c.jsx)("div",{className:(0,i.className)("chat__body"),ref:t,children:(0,c.jsxs)("div",{className:(0,i.className)("conversation__container"),children:[(0,c.jsx)(l,{}),(0,c.jsxs)("ol",{className:(0,i.className)("conversation"),children:[(0,c.jsx)(f.default,{children:(0,c.jsx)(g,{})}),a&&(0,c.jsx)(v,{})]})]})})]})}},8711:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(5567),o=n(7209),i=n(7844);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l({children:e,childrenHTML:t,className:n,graphicSrc:s,graphicType:c="icon",iconName:l,iconSize:u,iconClassName:p,dividerType:d}){const f=Boolean(l||s),h=t?{dangerouslySetInnerHTML:{__html:t}}:{children:e};return(0,i.jsxs)("div",{className:(0,r.className)("divider",d&&`divider--type-${d}`,n),children:[f&&(0,i.jsx)("span",{className:(0,r.className)("divider__graphic"),children:l?(0,i.jsx)(o.default,{name:l,size:u,className:p}):(0,i.jsx)("img",{src:s,className:(0,r.className)({icon:"icon"===c,avatar:"avatar"===c},p)})}),(0,i.jsx)("div",a({className:(0,r.className)("divider__body")},h))]})}},9661:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>v,useChoicePrompt:()=>b});var r=n(7210),o=n(9207),i=n(2849),s=n(5567),a=n(5740),c=n(7209),l=n(546),u=n(2108),p=n(1989),d=n(7844);const f=["event","children"];function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b=e=>{const{payload:t}=e,[n,r]=(0,o.useState)(!1),{sendAction:s,addMessageBubble:c,addDivider:l}=(0,i.useSeamlyCommands)(),{activeServiceSessionId:p}=(0,i.useSeamlyServiceInfo)(),d=(0,i.useLastMessageEventId)(),{body:f}=(0,u.useTranslatedEventData)(e),{service:h}=t,m=(0,o.useMemo)((()=>y(y({},e),{},{payload:y(y({},e.payload),{},{body:e.payload.body?.prompt,translatedBody:e.payload.translatedBody&&y(y({},e.payload.translatedBody),{},{data:e.payload.translatedBody.data.prompt})})})),[e]),b=f.chooseAgain&&p===h.serviceSessionId&&t.id!==d;return(0,o.useEffect)((()=>{r(t.id===d)}),[t,d]),{body:f,subEvent:m,showOptions:n,chooseAgain:b,onChoiceClickHandler:e=>{b&&l("new_topic"),c(e.text),s({type:a.actionTypes.pickChoice,originMessage:t.id,choice:{id:e.id,text:e.text,chooseAgain:b}}),r(!1)},onChooseAgainClickHandler:()=>{r((e=>!e))}}},v=e=>{let{event:t,children:n}=e,o=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,f);const{t:a}=(0,l.useI18n)(),u=(0,i.useGeneratedId)(),{body:h,subEvent:m,showOptions:v,chooseAgain:g,onChoiceClickHandler:O,onChooseAgainClickHandler:w}=b(t);return(0,d.jsxs)(d.Fragment,{children:[(0,r.toChildArray)(n).map((e=>(e.props=y(y({},e.props),{},{event:m,descriptorId:u,showTranslationToggle:!1}),e))),g&&(0,d.jsxs)("button",{type:"button",className:(0,s.className)("button","button--secondary","button--choose-again"),"aria-expanded":v?"true":"false",onClick:w,"aria-describedby":u,children:[a(v?"message.choicePrompts.cancelChooseAgain":"message.choicePrompts.chooseAgain"),(0,d.jsx)(c.default,{name:"chevronDown",size:"8"})]}),v&&(0,d.jsx)(p.default,y(y({type:"choice-prompt",showParticipant:!1,event:t},o),{},{children:(0,d.jsx)("ul",{className:(0,s.className)("choice-prompt","choice-prompt--many"),children:h.choices.map((e=>(0,d.jsx)("li",{className:(0,s.className)("choice-prompt__item",{[`choice-prompt__item--${e.category}`]:e.category}),children:(0,d.jsx)("button",{type:"button",className:(0,s.className)("button","button--primary"),onClick:()=>{O(e)},children:e.text})},e.id)))})}))]})}},36:(e,t,n)=>{"use strict";n.d(t,{Z:()=>f});var r=n(9207),o=n(8711),i=n(5567),s=n(4959),a=n(546),c=n(6065);const l={month:"long",day:"numeric",year:"numeric"},u={hour:"numeric",minute:"numeric"};var p=n(5029),d=n(7844);const f=({event:e})=>{const t=(0,p.NW)(),{date:n,time:f,timeUntilMidnight:h,srText:y}=(e=>{const{t}=(0,a.useI18n)(),n=(0,c.useConfig)()?.context?.locale??[],r=new Date(e),o=new Date,i=new Date(o);i.setHours(24,0,0,0);const p=i-o,d=r.toString(),f=new Intl.DateTimeFormat(n,u).format(r);let h=(0,s.getRelativeDate)(r,o);switch(h){case"today":h=t("dateTime.today");break;case"yesterday":h=t("dateTime.yesterday");break;default:h=new Intl.DateTimeFormat(n,l).format(r)}return{date:h,srText:t("dateTime.srText",{date:h,time:f}),time:f,fullDateTime:d,timeUntilMidnight:p}})((0,s.microsecondsToMilliseconds)(e.timeIndicator));return(0,r.useEffect)((()=>{const e=setTimeout((()=>{t()}),h);return()=>{clearTimeout(e)}}),[t,h]),(0,d.jsxs)(o.Z,{dividerType:"time-indicator",children:[(0,d.jsxs)("p",{className:(0,i.className)("divider__time"),"aria-hidden":"true",children:[(0,d.jsx)("span",{children:n}),(0,d.jsx)("span",{children:f})]}),(0,d.jsx)("p",{className:(0,i.className)("visually-hidden"),children:y})]})}},7409:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(2849),o=n(5567),i=n(6065),s=n(546),a=n(7844);const c=({eventPayload:e})=>{const{t}=(0,s.useI18n)(),{fromClient:n,participant:c}=e,l=(0,r.useSeamlyParticipant)(c)||{},{messages:u}=(0,i.useConfig)(),p=n?t("participants.user.name"):l&&l.name,{showAvatar:d,showName:f}=u[n?"user":"agent"]||{};if(!d&&!f)return null;const h=[];return d&&p&&l.avatar&&h.push((0,a.jsx)("span",{className:(0,o.className)("message__avatar"),children:(0,a.jsx)("img",{src:l.avatar,className:(0,o.className)("avatar"),alt:""})})),f&&h.push((0,a.jsx)("span",{className:(0,o.className)("message__author-name"),children:p})),h.length>0&&(0,a.jsx)("div",{className:(0,o.className)("message__author"),children:h})}},5327:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(5740),o=n(2849);const i=e=>{const{sendAction:t}=(0,o.useSeamlyCommands)();return n=>{n.target&&n.target.dataset.linkId&&t({type:r.actionTypes.navigate,originMessage:e,link:{id:n.target.dataset.linkId,url:n.target.getAttribute("href")}})}}},6425:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(9207),o=n(1989),i=n(2108),s=n(5327),a=n(7844);const c=["event"];function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=e=>{let{event:t}=e,n=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,c);const{body:l}=(0,i.useTranslatedEventData)(t),p=(0,s.Z)(t.payload.id),d=(0,r.useMemo)((()=>t.payload.optimisticallyInjected?{children:(0,a.jsx)("p",{children:l.text})}:{bodyProps:{dangerouslySetInnerHTML:{__html:l.text}}}),[l,t]);return(0,a.jsx)(o.default,u(u({type:"text",event:t,onClick:p},n),d))}},1989:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>d});var r=n(5567),o=n(3357),i=n(2108),s=n(7409),a=n(7844);const c=["showParticipant","event","type","modifiers","children","bodyProps","info"];function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=function(e){let{showParticipant:t=!0,event:n,type:l,modifiers:p,children:d,bodyProps:f={},info:h}=e,y=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,c);const m=(0,o.j)(n),{hasTranslation:b,isTranslated:v,locale:g}=(0,i.useTranslatedEventData)(n);return l&&m.push(`message--type-${l}`),p&&("string"==typeof p&&(p=p.split(" ").filter((e=>e.length))),p.forEach((e=>{m.push(`message--${e}`)}))),v&&m.push("message--is-translated"),b&&m.push("message--has-translation"),v&&(f=u(u({},f),{},{lang:g})),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",u(u({className:(0,r.className)(m)},y),{},{children:[t&&(0,a.jsx)(s.default,{eventPayload:n.payload}),(0,a.jsx)("div",u(u({className:(0,r.className)("message__body")},f),{},{children:d})),h&&(0,a.jsx)("div",{"aria-hidden":"true",className:(0,r.className)("message__info"),children:h})]}))})}},6460:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(7210).createContext)(null)},2331:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SeamlyApiContext:()=>o,SeamlyEventBusContext:()=>i});var r=n(7210);const o=(0,r.createContext)(null),i=(0,r.createContext)(null)},641:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=(0,n(7210).createContext)({})},8803:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SeamlyLiveRegionContext:()=>r});const r=(0,n(7210).createContext)(null)},8219:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=n(9207),o=n(546),i=n(5567),s=n(2849),a=n(8877),c=n(3742),l=n(7844);const u=({onOpenChat:e})=>{const{t}=(0,o.useI18n)(),n=(0,s.useGeneratedId)(),{isOpen:u}=(0,c.useVisibility)(),p=(0,r.useRef)(null),d=(0,r.useRef)(null),f=(0,r.useRef)(),h=(0,s.useSkiplinkTargetFocusing)(),y=(0,s.useFocusIfSeamlyContainedFocus)(),m=(0,s.useSeamlyCurrentAgent)(),b=(0,s.useSeamlyHeaderData)().subTitle,{hasInterrupt:v}=(0,a.useInterrupt)(),{headerCollapseButtonId:g}=(0,s.useSeamlyStateContext)(),O=m&&!v;return(0,r.useLayoutEffect)((()=>{!1===u&&!0===p.current&&y(d.current),p.current=u}),[u,y]),(0,l.jsxs)("div",{className:(0,i.className)("toggle-button"),children:[(0,l.jsxs)("div",{id:n,children:[(0,l.jsx)("p",{className:(0,i.className)("toggle-button__title"),children:t(O?"toggleButton.resumeTitle":"toggleButton.title")}),(0,l.jsx)("p",{className:(0,i.className)("toggle-button__subtitle"),children:O?b:t("toggleButton.subtitle")})]}),(0,l.jsx)("button",{type:"button","aria-labelledby":n,className:(0,i.className)("toggle-button__button"),ref:d,onMouseUp:()=>{f.current="mouse"},onKeyUp:()=>{f.current="key"},onClick:()=>{e(),"mouse"===f.current?h():"key"===f.current&&y(g)}})]})}},9104:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>re});var r=n(9207),o=n(5567),i=n(2849),s=n(5740),a=n(4959),c=n(546),l=n(1154),u=n(8956),p=n(2463),d=n(4431),f=n(7844);const h=({baseClassName:e,children:t,title:n})=>{const r=(0,i.useSkiplink)(),s=(0,i.useGeneratedId)();return(0,f.jsxs)("section",{id:r,className:(0,o.className)(e),"aria-describedby":s,tabIndex:"-1",children:[(0,f.jsx)("h2",{className:(0,o.className)(`${e}__title`),id:s,children:n}),t]})},y=()=>{const{t:e}=(0,c.useI18n)(),t=(0,u.MI)(),n=(0,p.Z)(),{emitEvent:r}=(0,d.Z)(),{isActive:i,remaining:s,timer:a,endCountdown:y}=(0,l.Z)(),m=s>0,b=e(m?"idleDetachWarning.countdownTitle":"idleDetachWarning.notifyTransferText");return(0,f.jsx)(h,{baseClassName:"idle",title:b,children:m&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{className:(0,o.className)("idle__count-container"),children:i&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{className:(0,o.className)("idle__count-text"),children:e("idleDetachWarning.countdownText")}),(0,f.jsx)("span",{className:(0,o.className)("idle__count-timer"),children:e("idleDetachWarning.countdownTimer",a)})]})}),(0,f.jsxs)("div",{className:(0,o.className)("idle__options"),children:[(0,f.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{n(),y(!0),t(),r("idleTimer.selectContinue")},children:e("idleDetachWarning.continueButton")}),(0,f.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{y(),t(),r("idleTimer.selectEnd")},children:e("idleDetachWarning.detachButton")})]})]})})};var m=n(1256),b=n(4809);const v=()=>{const{t:e}=(0,c.useI18n)(),t=(0,p.Z)(),{name:n}=(0,b.useSeamlyCurrentAgent)()||{},{continueChat:r,restartChat:i}=(0,m.Z)();return(0,f.jsx)(h,{baseClassName:"prompt",title:e("resumeConversationPrompt.title",{name:n}),children:(0,f.jsxs)("div",{className:(0,o.className)("prompt__options"),children:[(0,f.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{t(),r()},children:e("resumeConversationPrompt.continueButton")}),(0,f.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:i,children:e("resumeConversationPrompt.detachButton")})]})})};var g=n(6065),O=n(3742),w=n(2112),j=n(1153),S=n(6113);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const C=()=>{const{default:e,active:t,userSelected:n,options:o,optionsOverride:i}=(0,b.useSeamlyStateContext)().entryMeta,s=(0,S.useDispatch)(),a=n||t||e,c=i[a]||o[a]||{},l=(0,r.useCallback)((e=>{s((0,j.setBlockAutoEntrySwitch)(e))}),[s]),u=(0,r.useCallback)((e=>{s((0,j.setActiveEntryType)(e))}),[s]),p=(0,r.useCallback)((e=>{s((0,j.setUserEntryType)(e))}),[s]),d=(0,r.useCallback)((()=>{n?p(null):u(e)}),[n,e,p,u]);return{activeEntry:a,activeEntryOptions:c,setActiveEntryType:u,setUserEntryType:p,cancelEntrySelection:d,setBlockAutoEntrySwitch:l}};var E=n(3240),P=n.n(E),T=n(2629),N=n(7346),I=n(7929),k=n(7629),A=n(7209),D=n(6639);function R({controlName:e,skipLinkId:t}){const{t:n}=(0,c.useI18n)(),{sendAssertive:l}=(0,i.useLiveRegion)(),{emitEvent:u}=(0,i.useSeamlyCommands)(),p=(()=>{const{sendAction:e}=(0,i.useSeamlyCommands)(),{features:t}=(0,i.useSeamlyOptions)(),{typingPeekahead:n}=t||{},o=(0,r.useRef)(null),a=(0,r.useRef)(null),c=(0,r.useRef)(!1),l=(0,r.useRef)(null);(0,r.useEffect)((()=>()=>{clearInterval(l.current),clearTimeout(o.current),clearTimeout(a.current)}),[]);const u=(t,r)=>{e(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({type:s.actionTypes.typing,state:t},n&&n.enabled?{body:{currentMessage:r}}:{}))};return e=>{e.code&&"Enter"===e.code||13===e.keyCode||(c.current=!0,l.current||(u(!0,e.target.value),l.current=setInterval((()=>{c.current?n&&n.enabled&&u(!0,e.target.value):(clearInterval(l.current),l.current=null)}),w.typingTimeout)),clearTimeout(o.current),clearTimeout(a.current),o.current=setTimeout((()=>{c.current=!1}),300),a.current=setTimeout((()=>{u(!1,e.target.value)}),w.typingTimeout))}})(),{setBlockAutoEntrySwitch:d}=C(),{hasCharacterLimit:h,characterLimit:y,reachedCharacterWarning:m,reachedCharacterLimit:v,remainingChars:g}=function(e){const{t}=(0,c.useI18n)(),{sendAssertive:n}=(0,D.t)(),{hasLimit:o,limit:i}=(0,b.useEntryTextLimit)(),s=(0,r.useMemo)((()=>(0,a.debounce)(n,w.maxCharacterSrDebounceDelay)),[n]),l=(0,r.useMemo)((()=>(0,a.debounce)(((e,n)=>{e&&s(t("input.srCharacterLimitText",{limit:n}))}),w.maxCharacterSrDebounceDelay)),[s,t]),[{value:u}]=(0,N.useFormControl)(e),p=o&&u?i-u.length:i,d=!!o&&p<=w.maxCharacterWarningLimit,f=!!o&&p<0;return(0,r.useEffect)((()=>{l(d,p)}),[d,p,l]),{hasCharacterLimit:o,characterLimit:i,reachedCharacterWarning:d,reachedCharacterLimit:f,remainingChars:p}}(e),[{value:O}]=(0,N.useFormControl)(e),j=!!O,S=(0,r.useCallback)((()=>{m&&l(n("input.srCharacterLimitText",{limit:g})),u("ui.inputFocus")}),[n,l,m,g,u]),E=(0,r.useMemo)((()=>n("input.inputPlaceholder",{hasLimit:h,limit:h?y:null})),[n,h,y]),P=(0,r.useMemo)((()=>n("input.inputLabel",{hasLimit:h,limit:h?y:null})),[n,h,y]);return(0,r.useLayoutEffect)((()=>(d(j),()=>{d(!1)})),[d,j]),(0,f.jsxs)(I.Z,{className:(0,o.className)("entry-form"),disableValidationClasses:!0,noValidate:"true",children:[(0,f.jsxs)("div",{className:(0,o.className)(["input--text__container",...m&&!v?["character-warning"]:[],...v?["character-exceeded"]:[]]),children:[(0,f.jsx)(k.Z,{id:t,type:"text",name:e,className:(0,o.className)("input__text"),autocomplete:"off",placeholder:E,labelText:P,labelClass:(0,o.className)("visually-hidden"),"aria-invalid":h?v:null,onKeyUp:p,onFocus:S}),(0,f.jsx)("div",{className:(0,o.className)("character-count"),children:m&&(0,f.jsx)("span",{children:g})})]}),(0,f.jsx)("button",{className:(0,o.className)("button","input__submit"),type:"submit",onPointerDown:e=>{e.preventDefault()},"aria-disabled":!j||v?"true":null,children:(0,f.jsx)(A.default,{name:"send",size:"32",alt:n("input.sendMessage")})})]})}function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function L(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){U(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},F.apply(this,arguments)}const B="textMessageEntry";function H(e){let t=F({},e);const{isOpen:n,setVisibility:o}=(0,O.useVisibility)(),s=(0,i.useSkiplink)(),a=(0,i.useSkiplinkTargetFocusing)(),{sendMessage:c}=(0,i.useSeamlyCommands)(),l=(0,r.useCallback)(((e,{updateControlValue:t})=>{c({body:e[B]}),t(B,""),a(),n||o(T.visibilityStates.open)}),[c,a,n,o]);return(0,f.jsx)(P(),L(L({},t),{},{formId:"textEntry",persistData:!0,onSubmit:l,children:(0,f.jsx)(R,{controlName:B,skipLinkId:s})}))}var $=n(1433);const V=()=>{const{t:e}=(0,c.useI18n)(),{showFileUpload:t,serviceAllowsUploads:n}=(0,i.useFileUploadMeta)(),[l,u]=(0,r.useState)(n),p=(0,i.useSkiplinkTargetFocusing)(),d=(0,r.useRef)(null),{setUserEntryType:h,activeEntry:y}=C(),m=(0,r.useRef)(null),{sendPolite:b}=(0,i.useLiveRegion)(),v=!!(0,i.useSeamlyCurrentAgent)();return(0,r.useEffect)((()=>{(0,a.runIfElementContainsOrHasFocus)(m.current,(()=>{n||p()})),u(n)}),[n,p]),(0,r.useEffect)((()=>{d.current&&!n&&b(e("fileUpload.srUnavailableText")),!1===d.current&&n&&b(e("fileUpload.srAvailableText")),v&&(d.current=n)}),[n,v,b,e]),!t&&y!==s.entryTypes.upload&&(0,f.jsx)($.Z,{isActive:l,transitionStartState:$.I.rendered,children:(0,f.jsx)("div",{className:(0,o.className)("upload-toggle-wrapper"),children:(0,f.jsx)($.Z,{isActive:l,transitionStartState:$.I.visuallyHidden,children:(0,f.jsx)("button",{className:(0,o.className)(["button","button--secondary","upload-toggle"]),ref:m,"aria-disabled":l?null:"true",type:"button",onClick:l?()=>{h(s.entryTypes.upload),p()}:null,children:(0,f.jsx)(A.default,{name:"file",size:"32",alt:e("fileUpload.toggleButtonText")})})})})})};var z=n(2312);const q=()=>{const{t:e}=(0,c.useI18n)(),{currentUploads:t}=(0,i.useFileUploads)();return(0,f.jsx)("div",{className:(0,o.className)("progress"),children:t.map((({id:t,name:n,progress:r,uploading:i,error:s})=>(0,f.jsxs)("div",{className:(0,o.className)("progress_container"),children:[(0,f.jsxs)("div",{className:(0,o.className)("progress__text"),children:[(0,f.jsx)("span",{className:(0,o.className)("progress__text--file-name"),children:n}),(0,f.jsx)("span",{className:(0,o.className)("progress__text--percentage"),children:`${r}%`})]}),(0,f.jsx)(z.Z,{error:s}),(0,f.jsx)("progress",{className:(0,o.className)("progress__bar"),role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-label":e("fileUpload.srProgressLabel",{fileName:n}),max:"100","aria-valuenow":r,value:r,"aria-busy":i,children:`${r}%`})]},t)))})};var W=n(9141);var G=n(1442),Z=n(6273);function K({id:e,name:t,labelText:n,contentHint:s,outputText:a,accept:c}){const{isSubmitted:l}=(0,N.useFormContext)(),[u,p]=(0,r.useState)(!1),[{onInput:d,onBlur:h},{error:y}]=(0,N.useFormControl)(t),m=(0,i.useGeneratedId)(),b=(0,i.useGeneratedId)(),v=(0,i.useGeneratedId)(),g=l&&y,O=[v];s&&O.push(b),g&&O.push(m);const w=(0,r.useCallback)((()=>{p(!0)}),[p]),j=(0,r.useCallback)((()=>{p(!1),h()}),[p,h]),S=(0,r.useCallback)((e=>{const t={target:{value:e.target.files}};d(t)}),[d]);return(0,f.jsxs)("div",{className:(0,o.className)("upload__container"),children:[s&&(0,f.jsx)("span",{className:(0,o.className)("upload__content-hint"),id:b,children:s}),(0,f.jsx)(z.Z,{id:m,error:g&&y}),(0,f.jsx)("div",{className:(0,o.className)(["file-upload",...u?["focus-within"]:[]]),children:(0,f.jsxs)("label",{htmlFor:e,className:(0,o.className)("upload__label"),children:[(0,f.jsx)(A.default,{name:"upload",size:"32"}),(0,f.jsxs)("div",{children:[(0,f.jsx)("span",{className:(0,o.className)(["upload__label--text"]),children:n}),(0,f.jsx)("input",{id:e,className:(0,o.className)("upload__input"),type:"file",name:t,onChange:S,"aria-invalid":g?"true":"false","aria-describedby":O.join(" "),accept:c||null,onFocus:w,onBlur:j}),(0,f.jsx)("span",{className:(0,o.className)("upload__output"),"aria-hidden":"true",id:v,children:a})]})]})})]})}function J({skiplinkId:e,controlName:t,accept:n,contentHint:r,isUploading:i,isComplete:s,onClickCancel:a}){const{t:l}=(0,c.useI18n)(),[{value:u}]=(0,N.useFormControl)(t),p=u&&u.length>0,d=p?u[0].name:"";return(0,f.jsxs)(I.Z,{className:(0,o.className)("upload-form"),children:[(0,f.jsx)(K,{name:t,id:e,accept:n,labelText:l("fileUpload.labelText"),outputText:l("fileUpload.selectedText",{hasFile:p,filename:d}),contentHint:r}),(0,f.jsxs)("div",{className:(0,o.className)("upload__button-container"),children:[(0,f.jsx)("button",{id:i||!s?e:void 0,type:"button",onClick:a,className:(0,o.className)("button","button--secondary","upload__cancel"),children:l("fileUpload.cancelButtonText")}),(0,f.jsx)("button",{className:(0,o.className)("button","button--primary"),type:"submit",children:l("fileUpload.uploadButtonText")})]})]})}const X="fileListForm",Q="fileList",Y=()=>{const{t:e}=(0,c.useI18n)(),{sendPolite:t,sendAssertive:n}=(0,i.useLiveRegion)(),s=(0,i.useSkiplink)(),l=(0,i.useSkiplinkTargetFocusing)(),{serviceAllowsUploads:u,allowedMimeTypes:p,maxSize:d}=(0,i.useFileUploadMeta)(),h=(0,r.useRef)(null),y=(0,r.useRef)(u),{cancelEntrySelection:m}=C(),{uploadFile:b,clearUploads:v,isUploading:g,isComplete:O}=(0,i.useFileUploads)(),{hasFile:w,selectedFileName:j,uploadHandle:_,hasServerError:x,progress:E}=((e,t)=>{const n=(0,S.useSelector)((n=>(0,W.getControlValueByName)(n,{formId:e,name:t}))),{currentUploads:r}=(0,i.useFileUploads)(),o=n&&n.length>0;let s=null,a=!1,c=0;if(r&&r.length>0){const e=r[0];s=e.uploadHandle,a=!!e.error,c=e.progress}return{hasFile:o,selectedFileName:o?n[0].name:"",uploadHandle:s,hasServerError:a,progress:c}})(X,Q),T=(0,i.useGeneratedId)(),N=(0,r.useRef)(!0),I=e("fileUpload.contentHint",{size:(0,a.formatBytes)(d)}),k=(0,r.useRef)(""),A=(0,r.useRef)(null);(0,r.useEffect)((()=>{k.current&&A.current.contains(document.activeElement)&&"INPUT"===document.activeElement.tagName&&n(I),k.current=I}),[I,n]),(0,r.useEffect)((()=>{E>0&&t(1===E?e("fileUpload.srStartedText"):`${E}%`)}),[E,t,e]),(0,r.useEffect)((()=>{N.current||g||!O||(v(),m(),l(),setTimeout((()=>{t(e("fileUpload.srCompleteText"))}),300)),N.current=O}),[g,O,v,m,l,t,e]);const D=(0,r.useCallback)((({fileList:e})=>{b(e[0]),l()}),[b,!1,l]),R=(0,r.useCallback)((()=>{_&&_.abort(),v(),m(),l()}),[_,v,m,l]),M=(0,r.useMemo)((()=>({[Q]:[(0,G.T)((()=>u),e("fileUpload.errors.unavailable")),(0,G.T)(Z.IZ,e("fileUpload.errors.noFile")),(0,G.T)(Z.NO,e("fileUpload.errors.tooLarge"),d)]})),[d,u,e]);return(0,f.jsx)("div",{className:(0,o.className)(["upload",...x?["upload--error"]:[]]),ref:A,children:(0,f.jsxs)(P(),{formId:X,persistData:!0,onSubmit:D,validationSchema:M,children:[(g||!O)&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(q,{}),(0,f.jsx)("div",{className:(0,o.className)("upload__button-container"),children:(0,f.jsx)("button",{id:g||!O?s:void 0,type:"button",onClick:R,ref:h,className:(0,o.className)("button","button--secondary","upload__cancel"),children:e("fileUpload.cancelButtonText")})})]}),!g&&O&&(0,f.jsx)(J,{controlName:Q,skiplinkId:s,accept:p.join(", "),contentHint:I,isComplete:O,isUploading:g,outputText:e("fileUpload.selectedText",{hasFile:w,filename:j}),onClickCancel:R}),!y.current&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("span",{className:(0,o.className)("notification"),id:T,children:e("fileUpload.unavailableText")}),(0,f.jsx)("div",{className:(0,o.className)("upload__button-container"),children:(0,f.jsx)("button",{id:g||!O?s:void 0,type:"button",onClick:R,className:(0,o.className)("button","button--secondary","upload__cancel"),children:e("fileUpload.cancelButtonText")})})]})]})})};function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function te(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(n),!0).forEach((function(t){ne(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const re=()=>{const{isOpen:e}=(0,O.useVisibility)(),t=(0,r.useRef)(null),{hasCountdown:n}=(0,i.useSeamlyIdleDetachCountdown)(),[c,l]=(0,r.useState)(n),{hasPrompt:u}=(0,i.useSeamlyResumeConversationPrompt)(),[p,d]=(0,r.useState)(u),h=(0,i.useSkiplinkTargetFocusing)(),m=(0,r.useRef)(!1),{activeEntry:b}=C(),[w,j]=(0,r.useState)({text:H,upload:Y}),[S,_]=(0,r.useState)((()=>b)),x=(0,g.useConfig)(),{accountAllowsUploads:E}=(0,i.useFileUploadMeta)(),P=(0,r.useCallback)((()=>{(0,a.runIfElementContainsOrHasFocus)(t.current,h)}),[h]);(0,r.useEffect)((()=>{const{customComponents:e}=x,{entry:t}=e||{};t&&j((e=>te(te({},e),t)))}),[x]),(0,r.useEffect)((()=>{P(),l(n),d(u)}),[n,u,P]),(0,r.useEffect)((()=>{_(b),P()}),[b,P,t]),m.current=!(!t.current||!t.current.contains(document.activeElement));const T=w[S];return(0,f.jsxs)("div",{className:(0,o.className)("chat__entry"),ref:t,children:[c&&(0,f.jsx)(y,{}),p&&(0,f.jsx)(v,{}),(0,f.jsxs)("div",{className:(0,o.className)(["entry__body",...n||u?["entry__body--hidden"]:[]]),children:[S!==s.entryTypes.upload&&E&&e&&(0,f.jsx)(V,{}),(0,f.jsx)(T,{})]})]})}},2312:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(9207),o=n(5567),i=n(7209),s=n(7844);function a({id:e,error:t}){const[n,a]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=setTimeout((()=>a(!0)),300);return()=>clearTimeout(e)}),[]),(0,s.jsx)("div",{className:(0,o.className)("error"),"aria-live":"assertive","aria-atomic":"true",children:n&&t&&(0,s.jsxs)("span",{id:e,className:(0,o.className)("error__message"),children:[(0,s.jsx)(i.default,{name:"error",size:"16"}),t]})})}},7929:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l});var r=n(7346),o=n(5567),i=n(7844);const s=["className","disableValidationClasses"];function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const l=function(e){let{className:t,disableValidationClasses:n}=e,l=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,s);const{handleSubmit:u,isValid:p,isSubmitted:d}=(0,r.useForm)(),f=["form"];return!n&&d&&(f.push("form--submitted"),p?f.push("form--valid"):f.push("form--invalid")),(0,i.jsx)("form",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({onSubmit:u,className:(0,o.className)([...f,t])},l))}},7629:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(7346),o=n(3224),i=n(7844);const s=["id","name","type","labelText","labelClass","contentHint","aria-describedby"];function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const u=function(e){let{id:t,name:n,type:a,labelText:l,labelClass:u,contentHint:p,"aria-describedby":d}=e,f=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,s);const{isSubmitted:h}=(0,r.useFormContext)(),[y,{error:m}]=(0,r.useFormControl)(n),b=h&&m,v=[];return d&&v.push(d),p&&v.push(`${t}-content-hint`),b&&v.push(`${t}-error`),(0,i.jsx)(o.Z,{id:t,contentHint:p,validity:!b,errorText:m,labelText:l,labelClass:u,children:(0,i.jsx)("input",c(c({id:t,name:n,type:a,"aria-invalid":b?"true":"false","aria-describedby":v.join(" ")||null},y),f))})}},3224:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(5567),o=n(2312),i=n(7844);const s=({contentHint:e,id:t,labelText:n,labelClass:s=(0,r.className)("label"),validity:a,errorText:c,children:l})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("label",{htmlFor:t,className:s,children:n}),e&&(0,i.jsx)("span",{id:`${t}-content-hint`,className:(0,r.className)("input__content-hint"),children:e}),(0,i.jsx)(o.Z,{id:`${t}-error`,error:!a&&c}),l]})},5663:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>p});var r=n(2849),o=n(5567),i=n(546),s=n(8877),a=n(6065),c=n(3742),l=n(7209),u=n(7844);const p=()=>{const{t:e}=(0,i.useI18n)(),{title:t,subTitle:n}=(0,r.useSeamlyHeaderData)(),p=(0,r.useSeamlyUnreadCount)(),{isOpen:d}=(0,c.useVisibility)(),f=(0,r.useSeamlyCurrentAgent)(),{hasInterrupt:h}=(0,s.useInterrupt)(),y=(0,a.useStartChatIcon)(),m=f?.avatar??y,b=h?"":n,v=["message-count"];return d&&v.push("message-count__hide"),0===p&&v.push("message-count__empty"),(b||!d)&&(0,u.jsxs)("div",{className:(0,o.className)("agent-info"),children:[(0,u.jsxs)("div",{className:(0,o.className)("agent-info__graphic"),children:[m?(0,u.jsx)("img",{className:(0,o.className)(f?.avatar?"avatar":"icon"),src:m,alt:""}):(0,u.jsx)(l.default,{name:"avatar",size:"32"}),(0,u.jsx)("span",{className:(0,o.className)(v),"aria-hidden":"true",children:p})]}),(0,u.jsxs)("div",{className:(0,o.className)("agent-info__body"),children:[(0,u.jsx)("p",{className:(0,o.className)("agent-info__heading"),children:t??e("header.title")}),(0,u.jsx)("p",{className:(0,o.className)("agent-info__text"),children:b})]})]})}},142:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>W});var r=n(5567),o=n(2849),i=n(7210),s=n(9207),a=n(546),c=n(7209),l=n(1433),u=n(4959),p=n(8956),d=n(7844);const f=({className:e,children:t,onCancel:n,headingText:i,cancelButtonText:a,disableButtonFocusing:l,cancelButtonRef:p,position:f="right"})=>{const h=(0,s.useRef)(null),y=(0,o.useGeneratedId)(),{hideOption:m}=(0,o.useSeamlyOptions)(),{focusButton:b}=(0,o.useOptionButton)();return(0,s.useEffect)((()=>{(0,u.focusElement)(h.current)}),[]),(0,d.jsx)("section",{className:(0,r.className)("options",{"options--right":"left"!==f,"options--left":"left"===f},e),"aria-labelledby":y,tabIndex:"-1",ref:h,children:(0,d.jsxs)("div",{className:(0,r.className)("options__body"),children:[(0,d.jsx)("h2",{id:y,className:(0,r.className)("options__title"),children:i}),(0,d.jsxs)("button",{type:"button",onClick:()=>{n&&n(),m(),l||b()},"aria-describedby":y,className:(0,r.className)("button","options__close"),ref:e=>{p&&(p.current=e)},children:[(0,d.jsx)(c.default,{name:"close",size:"16"}),(0,d.jsx)("span",{children:a})]}),(0,d.jsx)("div",{className:(0,r.className)("options__wrapper"),children:t})]})})};var h=n(5740),y=n(3240),m=n.n(y),b=n(1442),v=n(6273),g=n(7929),O=n(7629);function w({controlName:e,describedById:t}){const{t:n}=(0,a.useI18n)();return(0,d.jsxs)(g.Z,{noValidate:"true",className:(0,r.className)("options__form"),children:[(0,d.jsx)(O.Z,{name:e,type:"email",className:(0,r.className)("transcript__input"),"aria-describedby":t,labelClass:(0,r.className)("label"),labelText:n("options.sendTranscript.label")}),(0,d.jsx)("div",{className:(0,r.className)("options__actions"),children:(0,d.jsx)("button",{type:"submit",className:(0,r.className)("button","button--primary","options__submit"),children:n("options.sendTranscript.sendButtonText")})})]})}const j="email",S={sendTranscript:()=>{const[e,t]=(0,s.useState)(void 0),{hideOption:n}=(0,o.useSeamlyOptions)(),{focusButton:i}=(0,o.useOptionButton)(),{t:c}=(0,a.useI18n)(),l=(0,o.useGeneratedId)(),{sendAction:u}=(0,o.useSeamlyCommands)(),p=(0,s.useMemo)((()=>({[j]:[(0,b.T)(v.OP,c("options.sendTranscript.noEmailText")),(0,b.T)(v.nE,c("options.sendTranscript.invalidEmailText"))]})),[c]),y=(0,s.useCallback)((e=>{const t=e.email.trim();u({type:h.actionTypes.sendTranscript,body:{emailAddress:t}}),n(),i()}),[u,n,i]),g=(0,s.useCallback)((({isValid:e,isSubmitted:n})=>{t(n&&!e?"options--error":void 0)}),[t]);return(0,d.jsxs)(f,{className:e,headingText:c("options.sendTranscript.title"),cancelButtonText:c("options.cancelButtonText"),children:[(0,d.jsx)("p",{className:(0,r.className)("options__description"),id:l,children:c("options.sendTranscript.description")}),(0,d.jsx)(m(),{formId:"sendTranscript",onSubmit:y,validationSchema:p,onError:g,children:(0,d.jsx)(w,{controlName:j,describedById:l})})]})}},_=()=>{const{optionActive:e}=(0,o.useSeamlyOptions)(),t=(0,s.useRef)(null),n=S[e||t.current];return e&&(t.current=e),n?(0,d.jsx)(n,{}):null},x=()=>{const{t:e}=(0,a.useI18n)(),{menuOptions:t,showOption:n,panelActive:f,hideOption:h}=(0,o.useSeamlyOptions)(),{id:y}=(0,o.useOptionButton)(),m=(0,s.useRef)(null),[b,v]=(0,s.useState)(!1),g=(0,s.useRef)(null),O=t.length,w=(0,s.useRef)(Array.from({length:O},(()=>(0,i.createRef)()))),j=(0,s.useRef)(!1),S=O>1,x=t[0],C=(0,s.useMemo)((()=>x?.name?.trim().replace(/\s+/g,"")),[x]);return(0,s.useEffect)((()=>()=>{clearTimeout(m.current)}),[]),(0,s.useEffect)((()=>{b&&!j.current&&requestAnimationFrame((async()=>{await(0,p.Vs)(60);const e=t.findIndex((e=>e.available)),n=-1===e?0:e;(0,u.focusElement)(w.current[n])})),j.current=b}),[b,t]),O?(0,d.jsxs)("div",{className:(0,r.className)("options__container"),onKeyDown:e=>{b&&((0,u.getKey)(e)===u.keyNames.Escape&&(v(!1),(0,u.focusElement)(g.current)),(0,u.getKey)(e)===u.keyNames.Home&&((0,u.focusElement)(w.current[0]),e.preventDefault()),(0,u.getKey)(e)===u.keyNames.End&&((0,u.focusElement)(w.current[O-1]),e.preventDefault()))},onfocusout:()=>{S&&(m.current=setTimeout((()=>{v(!1)}),200))},onfocusin:()=>{clearTimeout(m.current)},children:[(0,d.jsx)(l.Z,{transitionStartState:l.I.notRendered,isActive:f,children:(0,d.jsx)("div",{className:(0,r.className)("options__dialog"),children:(0,d.jsx)(_,{})})}),S&&(0,d.jsx)(l.Z,{isActive:b,transitionStartState:l.I.notRendered,children:(0,d.jsx)("ul",{className:(0,r.className)(["options__menu"]),role:"menu",tabIndex:"-1","aria-labelledby":y,children:t.map((({name:o,title:i,available:s},a)=>(0,d.jsx)("li",{className:(0,r.className)("options__menu__item"),role:"menuitem","data-testid":o,children:(0,d.jsxs)("button",{type:"button",ref:e=>{w.current[a]=e},className:(0,r.className)(["button","button--secondary"]),onKeyDown:e=>((e,t)=>{if((0,u.getKey)(e)===u.keyNames.ArrowDown){const n=Math.min(O-1,t+1);(0,u.focusElement)(w.current[t===n?0:n]),e.preventDefault()}if((0,u.getKey)(e)===u.keyNames.ArrowUp){const n=Math.max(0,t-1);(0,u.focusElement)(w.current[t===n?O-1:n]),e.preventDefault()}})(e,a),onKeyPress:e=>((e,n)=>{const r=String.fromCharCode(e.charCode);if(1!==r.length||!r.match(/\S/))return;let o=-1;t.forEach(((e,t)=>{t>n&&e.title.charAt(0).toLowerCase()===r.toLowerCase()&&-1===o&&(o=t)})),-1!==o&&(0,u.focusElement)(w.current[o])})(e,a),onClick:()=>((e,t)=>{t&&(v(!1),n(e))})(o,s),"aria-disabled":s?null:"true",children:[(0,d.jsxs)("span",{className:(0,r.className)("button__text"),children:[i,!s&&" "]}),!s&&(0,d.jsx)("span",{className:(0,r.className)("button__state"),children:e("options.unavailableText")})]})},o)))})}),(0,d.jsxs)("button",{type:"button",className:(0,r.className)(["button","button--secondary","chat__options__button",...!S&&C?[`chat__options__button--${C}`]:[]]),id:y,onClick:()=>{f&&h(),S?v((e=>!e)):x.available&&n(x.name)},onKeyDown:S?e=>{(0,u.getKey)(e)===u.keyNames.ArrowDown&&(v(!0),e.preventDefault())}:null,ref:g,"aria-haspopup":S?"menu":null,"aria-expanded":S?b.toString():null,"aria-disabled":S||x.available?null:"true",children:[S&&(0,d.jsx)(c.default,{name:"options",size:"32"}),(0,d.jsx)("span",{className:(0,r.className)("button__text"),children:S?e("options.openButtonText"):`${x.title}${x.available?"":" "}`}),!S&&!x.available&&(0,d.jsx)("span",{className:(0,r.className)("button__state"),children:e("options.unavailableText")})]})]}):null};var C=n(2108),E=n(7346),P=n(3224);const T=["id","name","labelText","labelClass","contentHint","aria-describedby","options"];function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?N(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):N(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const A=e=>{let{id:t,name:n,labelText:r,labelClass:o,contentHint:i,"aria-describedby":s,options:a=[]}=e,c=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,T);const{isSubmitted:l}=(0,E.useFormContext)(),[u,{error:p}]=(0,E.useFormControl)(n),f=l&&p,h=[];return s&&h.push(s),i&&h.push(`${t}-content-hint`),f&&h.push(`${t}-error`),(0,d.jsx)(P.Z,{id:t,contentHint:i,validity:!f,errorText:p,labelText:r,labelClass:o,children:(0,d.jsx)("select",I(I(I({id:t,name:n,"aria-invalid":f?"true":"false","aria-describedby":h.join(" ")||null},u),c),{},{children:a.map((e=>(0,d.jsx)("option",{value:e.value,children:e.label},e.value)))}))})},D=function({controlName:e,descriptionId:t}){const{t:n}=(0,a.useI18n)(),{isActive:o,languages:i,currentLocale:c}=(0,C.useTranslations)(),{locale:l}=(0,a.useI18n)(),u=(0,C.useLocaleNativeName)(c),p=(0,s.useMemo)((()=>[{value:"",label:n("translations.settings.defaultOptionLabel")},...i.filter((e=>e.locale.toLowerCase()!==String(l).toLowerCase())).map((e=>({value:e.locale,label:e.nativeName})))]),[n,i,l]);return(0,d.jsxs)(g.Z,{noValidate:"true",className:(0,r.className)("options__form"),children:[(0,d.jsx)("p",{className:(0,r.className)("options__description"),id:t,children:n("translations.settings.description")}),o?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("h3",{children:n("translations.settings.currentTranslationLabel")}),(0,d.jsx)("p",{className:(0,r.className)("options__active-language"),children:u})]}):(0,d.jsx)(A,{name:e,type:"text",className:(0,r.className)("input__select"),"aria-describedby":t,labelClass:(0,r.className)("label"),labelText:n("translations.settings.inputLabel"),options:p,defaultValue:c||""}),(0,d.jsx)("div",{className:(0,r.className)("options__actions"),children:(0,d.jsx)("button",{type:"submit",className:(0,r.className)("button","button--primary","options__submit"),children:n(o?"translations.settings.endButtonText":"translations.settings.startButtonText")})})]})},R="translation-settings",M="locale",L=function({onClose:e}){const[t,n]=(0,s.useState)(void 0),{t:r}=(0,a.useI18n)(),{isActive:i,enableTranslations:c,disableTranslations:l}=(0,C.useTranslations)(),u=(0,o.useGeneratedId)(),{focusContainer:p}=(0,C.useTranslationsContainer)(),h=(0,s.useCallback)((({isValid:e,isSubmitted:t})=>{n(t&&!e?"options--error":void 0)}),[n]),y=(0,s.useRef)(0),g=(0,s.useMemo)((()=>(y.current+=1,i?{}:{[M]:(0,b.T)(v.OP,r("translations.settings.noLocaleText"))})),[i,r]);return(0,d.jsx)(f,{className:t,onCancel:e,formName:R,headingText:r("translations.settings.title"),cancelButtonText:r("translations.settings.cancelButtonText"),position:"left",disableButtonFocusing:!0,children:(0,d.jsx)(m(),{onSubmit:({locale:t})=>{i?l():(c(t),e(),p())},formId:R,validationSchema:g,onError:h,children:(0,d.jsx)(D,{controlName:M,descriptionId:u})},y.current)})};function U(){const{t:e,locale:t}=(0,a.useI18n)(),[n,i]=(0,s.useState)(!1),p=(0,s.useRef)(null),f=(0,o.useGeneratedId)(),h=(0,C.useLocaleNativeName)(t);return(0,d.jsxs)("div",{className:(0,r.className)("translations__container"),onKeyDown:e=>{n&&(0,u.getKey)(e)===u.keyNames.Escape&&(i(!1),(0,u.focusElement)(p.current))},children:[(0,d.jsx)(l.Z,{transitionStartState:l.I.notRendered,isActive:n,children:(0,d.jsx)("div",{className:(0,r.className)("options__dialog"),role:"dialog",children:(0,d.jsx)(L,{onClose:()=>{i(!1)}})})}),(0,d.jsxs)("button",{type:"button",className:(0,r.className)(["button","button--secondary","chat__options__button"]),id:f,onClick:()=>{i((e=>!e))},onKeyDown:e=>{(0,u.getKey)(e)===u.keyNames.ArrowDown&&(i(!0),e.preventDefault())},ref:p,"aria-haspopup":"dialog","aria-expanded":n.toString(),children:[(0,d.jsx)(c.default,{name:"newTranslation",size:"16"}),(0,d.jsx)("span",{className:(0,r.className)("button__text"),children:e("translations.settings.openButtonText",{hasLanguage:!!h,language:h})})]})]})}function F(){const{menuOptions:e,allowOptionSelection:t}=(0,o.useSeamlyOptions)(),{isAvailable:n}=(0,C.useTranslations)();return n||t&&e.length?(0,d.jsxs)("div",{className:(0,r.className)("chat__options"),children:[n&&(0,d.jsx)("div",{className:(0,r.className)("chat__options-item","chat__options-item--left"),children:(0,d.jsx)(U,{})}),t&&(0,d.jsx)("div",{className:(0,r.className)("chat__options-item","chat__options-item--right"),children:(0,d.jsx)(x,{})})]}):null}var B=n(8877),H=n(3742);function $({id:e,label:t,onButtonClick:n,buttonText:i,srButtonText:s,type:a}){const c=(0,o.useGeneratedId)();return(0,d.jsxs)("section",{className:(0,r.className)("chat-status",a&&`chat-status--${a}`),id:e,tabIndex:"-1","aria-labelledby":c,children:[(0,d.jsx)("h2",{className:(0,r.className)("chat-status__title"),id:c,children:t}),(0,d.jsxs)("button",{type:"button",className:(0,r.className)("button","button--tertiary"),onClick:n,children:[(0,d.jsx)("span",{"aria-hidden":s?"true":void 0,children:i}),s&&(0,d.jsx)("span",{className:(0,r.className)("visually-hidden"),children:s})]})]})}function V(){const{t:e}=(0,a.useI18n)(),{id:t}=(0,C.useTranslationsContainer)(),{hasInterrupt:n}=(0,B.useInterrupt)(),{isActive:r,disableTranslations:i,currentLocale:c}=(0,C.useTranslations)(),l=(0,C.useLocaleNativeName)(c),u=(0,o.useSkiplinkTargetFocusing)(),p=(0,s.useCallback)((()=>{i(),u()}),[i,u]);return!r||n?null:(0,d.jsx)($,{type:"translations",id:t,label:e("translations.status.label",{language:l}),onButtonClick:p,buttonText:e("translations.status.stopText"),srButtonText:e("translations.status.srStopText")})}function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const W=function({children:e,interruptComponent:t}){const{hasInterrupt:n,meta:o}=(0,B.useInterrupt)(),{isOpen:i}=(0,H.useVisibility)();return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(V,{}),(0,d.jsx)("div",{className:(0,r.className)("chat__container"),children:n?i?(0,d.jsx)(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){q(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},o)):null:e}),i&&(0,d.jsx)(F,{})]})}},1474:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>h});var r=n(9279),o=n(6065),i=n(546),s=n(3742);const a=require("preact/compat");var c=n(5567),l=n(4809),u=n(3357),p=n(2629),d=n(1581),f=n(7844);const h=(0,a.forwardRef)((({children:e,className:t=""},n)=>{const{isOpen:a,isVisible:h,setVisibility:y}=(0,s.useVisibility)(),{namespace:m,layoutMode:b}=(0,o.useConfig)(),{isInline:v}=(0,l.useSeamlyLayoutMode)(),g=(0,u.P)(),O=(0,r.h)(),{t:w}=(0,i.useI18n)(),j=["chat",`chat--layout-${b}`,`namespace--${m}`,...g,t];return a||"app"===b||j.push("chat--collapsed"),O&&j.push("chat--user-responded"),h&&(0,f.jsxs)("section",{className:(0,c.className)(j),onKeyDown:e=>{(e.code&&"Escape"===e.code||27===e.keyCode)&&!v&&a&&y(p.visibilityStates.minimized)},tabIndex:"-1",ref:n,"aria-label":w("chat.srLabel"),children:[(0,f.jsx)("div",{className:(0,c.className)("chat-wrapper"),children:e}),"inline"===b&&a&&(0,f.jsx)(d.Z,{isAside:!0})]})}))},2494:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(9207),o=n(5567),i=n(546),s=n(2849),a=n(7209),c=n(7844);const l=({children:e,onCloseChat:t})=>{const{headerCollapseButtonId:n}=(0,s.useSeamlyStateContext)(),l=(0,r.useRef)(null),{t:u}=(0,i.useI18n)();return(0,c.jsxs)("header",{className:(0,o.className)("chat__header"),children:[e,(0,c.jsx)("div",{className:(0,o.className)("header-controls"),children:(0,c.jsx)("button",{type:"button",className:(0,o.className)("button","header-controls__collapse"),onClick:t,ref:l,id:n,children:(0,c.jsx)(a.default,{name:"chevronDown",size:"32",alt:u("header.collapseApp")})})})]})}},7209:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(5567),o=n(7844);const i={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 version="1.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 32 32" enable-background="new 0 0 32 32" xml:space="preserve">\n<path fill="#4A48C1" d="M10,14.8c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S11.1,14.8,10,14.8z M15.9,14.8c1.1,0,2-0.9,2-2s-0.9-2-2-2\n\ts-2,0.9-2,2S14.8,14.8,15.9,14.8z M21.8,10.8c-1.1,0-2,0.9-2,2s0.9,2,2,2s2-0.9,2-2S22.9,10.8,21.8,10.8z M21.3,18.1H10.7\n\tC11.7,23.9,20.2,23.9,21.3,18.1z"/>\n</svg>\n',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'},s=({name:e,size:t="32",className:n,alt:s})=>{const a=`${e}${t}`;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{"aria-hidden":"true",className:n||(0,r.className)("icon"),dangerouslySetInnerHTML:{__html:i[a]}}),s&&(0,o.jsx)("span",{className:(0,r.className)("visually-hidden"),children:s})]})}},9965:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(9207),o=n(5567),i=n(2849),s=n(7844);const a=({originalError:e,title:t,message:n,buttonText:a,action:c,srText:l})=>{const u=(0,i.useSeamlyCommands)(),p=(0,i.useGeneratedId)(),{sendPolite:d}=(0,i.useLiveRegion)(),f=(0,i.useSkiplinkTargetFocusing)(),h="SeamlySessionExpiredError"===e.name;return(0,r.useEffect)((()=>{h&&u[c]()}),[c,u,h]),(0,r.useEffect)((()=>{!h&&l&&setTimeout((()=>{d(l)}),200)}),[d,l,h]),h?(0,s.jsx)(s.Fragment,{}):(0,s.jsx)("section",{className:(0,o.className)("interrupt"),"aria-labelledby":p,children:(0,s.jsxs)("div",{className:(0,o.className)("interrupt__body"),children:[(0,s.jsx)("h2",{id:p,className:(0,o.className)("interrupt__title"),children:t}),(0,s.jsx)("p",{className:(0,o.className)("interrupt__message"),children:n}),a&&c&&(0,s.jsx)("div",{className:(0,o.className)("interrupt__actions"),children:(0,s.jsx)("button",{type:"button",className:(0,o.className)("button","button--primary"),onClick:()=>{u[c](),f()},children:a})})]})})}},1581:(e,t,n)=>{"use strict";n.d(t,{Z:()=>_});var r=n(9279),o=n(6065),i=n(546),s=n(8877),a=n(2108),c=n(2629),l=n(3742),u=n(5567),p=n(9207),d=n(2841),f=n(1433),h=n(8956),y=n(6639),m=n(4809),b=n(4431),v=n(1154),g=n(1256),O=n(5029),w=n(4959),j=n(5740),S=n(7844);const _=({isAside:e=!1})=>{const{isInline:t}=(0,m.useSeamlyLayoutMode)(),{t:n}=(0,i.useI18n)(),{sendAction:_,addMessageBubble:x}=(0,b.Z)(),{isOpen:C,setVisibility:E}=(0,l.useVisibility)(),{showSuggestions:P}=(0,o.useConfig)(),T=(0,O.I8)(),N=(0,h.MI)(),I=(0,p.useRef)(null),{sendPolite:k}=(0,y.t)(),{hasInterrupt:A}=(0,s.useInterrupt)(),{hasCountdown:D,endCountdown:R}=(0,v.Z)(),{hasPrompt:M,continueChat:L}=(0,g.Z)(),U=(0,r.h)(),F=(0,m.useSeamlyServiceData)("suggestion"),{body:B}=(0,a.useTranslatedEventData)({payload:F}),H=(0,p.useMemo)((()=>F&&!A?B:[]),[F,A,B]),$=(0,p.useRef)(null),V=(0,p.useRef)(!1),z=(0,p.useRef)([]),q=!!H.length,W=t?(U||C)&&!e:U,G=(0,p.useRef)(W),Z=q&&!W&&P,K=q?H:z.current;z.current=K;const J=(0,p.useMemo)((()=>{const t=["suggestions"];return e&&t.push("suggestions--aside"),(0,u.className)(t)}),[e]),X=(0,p.useCallback)((({id:e,question:t})=>{D&&R(!0),M&&L(),_({type:j.actionTypes.custom,originMessage:F.id,body:{type:"faqclick",body:{faqId:e,faqQuestion:t}}}),x(t),C||E(c.visibilityStates.open),N()}),[x,L,R,N,D,M,F,_,E,C]);(0,p.useEffect)((()=>{if($.current!==H&&!W){if(q){const e=V.current?n("suggestions.srUpdatedText"):n("suggestions.srAvailableText");setTimeout((()=>{k(e)}),30)}else V.current&&k(n("suggestions.srUnavailableText"));$.current=H}!G.current&&W?((0,w.runIfElementContainsOrHasFocus)(I.current,N),k(n("suggestions.srUnavailableText"))):!q&&V.current&&(0,w.runIfElementContainsOrHasFocus)(I.current,N),V.current=q,G.current=W}),[H,q,W,N,k,n]);const Q=n("suggestions.headingText"),Y=n("suggestions.footerText"),ee=Q?"section":"div";return(0,S.jsx)(f.Z,{isActive:Z,transitionStartState:f.I.notRendered,children:(0,S.jsxs)(ee,{className:J,"aria-labelledby":Q?T:null,ref:I,children:[Q&&(0,S.jsx)("p",{id:T,className:(0,u.className)("suggestions__heading"),children:Q}),!!K.length&&(0,S.jsx)(d.Z,{suggestions:K,onClickSuggestion:X}),Y&&!C&&(0,S.jsx)("p",{className:(0,u.className)("suggestions__footer"),children:Y})]})})}},2841:(e,t,n)=>{"use strict";n.d(t,{Z:()=>p});var r=n(5567),o=n(9207),i=n(7209),s=n(7844);const a=e=>`suggestions__item--${String(e).toLowerCase().replace(/[^a-z0-9_\\-]/,"")}`,c=({id:e,categories:t=[],question:n,onClick:c,hasIcon:l})=>{const u=(0,o.useMemo)((()=>["suggestions__item",...t.map(a)]),[t]),p=(0,o.useCallback)((()=>{c&&c({id:e,question:n})}),[e,n,c]);return(0,s.jsx)("li",{className:(0,r.className)(u),children:(0,s.jsxs)("button",{type:"button",onClick:p,className:(0,r.className)("button","button--primary"),children:[l&&(0,s.jsx)(i.default,{name:"chevronRight",size:"8"}),n]})})};function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const p=({className:e,suggestions:t=[],onClickSuggestion:n,hasIcon:o=!0})=>(0,s.jsx)("ul",{className:(0,r.className)("suggestions__list",e),children:t.map((e=>(0,s.jsx)(c,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({hasIcon:o,onClick:n},e),e.id)))})},2718:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>F});var r=n(3742),o=n(9279),i=n(6065),s=n(546),a=n(2629),c=n(5567),l=n(9207),u=n(7209),p=n(5740),d=n(4959),f=n(4431),h=n(4809),y=n(5029),m=n(8956),b=n(6639),v=n(1154),g=n(1256),O=n(1433),w=n(2108),j=n(8877),S=n(7844);const _=["categories"];function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){E(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const P=()=>{const{t:e}=(0,s.useI18n)(),{sendAction:t,addMessageBubble:n}=(0,f.Z)(),r=(0,y.I8)(),i=(0,m.MI)(),{sendPolite:a}=(0,b.t)(),{hasInterrupt:x}=(0,j.useInterrupt)(),{hasCountdown:E,endCountdown:P}=(0,v.Z)(),{hasPrompt:T,continueChat:N}=(0,g.Z)(),I=(0,h.useSeamlyServiceData)("suggestion"),{body:k}=(0,w.useTranslatedEventData)({payload:I}),A=(0,l.useMemo)((()=>(I&&!x?k:[]).map((e=>{let{categories:t=[]}=e;return C(C({},function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,_)),{},{categories:t,classNames:["faqs__item",...t.map((e=>`faqs__item--${String(e).toLowerCase().replace(/[^a-z0-9_\\-]/,"")}`))]})}))),[I,x,k]),D=(0,l.useRef)(null),R=(0,l.useRef)(!1),{isInline:M}=(0,h.useSeamlyLayoutMode)(),L=(0,o.h)(),U=!M&&L,F=(0,l.useRef)(U),B=!!A.length,H=B&&!U,$=(0,l.useRef)([]),V=B?A:$.current;$.current=V;const z=(0,l.useRef)(null);(0,l.useEffect)((()=>{if(D.current!==A&&!U){if(B){const t=R.current?e("faq.srUpdatedText"):e("faq.srAvailableText");setTimeout((()=>{a(t)}),30)}else R.current&&a(e("faq.srUnavailableText"));D.current=A}!F.current&&U?((0,d.runIfElementContainsOrHasFocus)(z.current,i),a(e("faq.srUnavailableText"))):!B&&R.current&&(0,d.runIfElementContainsOrHasFocus)(z.current,i),R.current=B,F.current=U}),[B,A,U,i,a,e]);const q=e("faq.headingText"),W=q?"section":"div";return(0,S.jsx)(O.Z,{isActive:H,transitionStartState:O.I.notRendered,children:(0,S.jsxs)(W,{className:(0,c.className)("faqs"),"aria-labelledby":q?r:null,ref:z,children:[q&&(0,S.jsx)("h2",{id:r,className:(0,c.className)("faqs__heading"),children:q}),!!V.length&&(0,S.jsx)("ul",{className:(0,c.className)("faqs__list"),children:V.map((e=>(0,S.jsx)("li",{className:(0,c.className)(e.classNames),children:(0,S.jsxs)("button",{type:"button",onClick:()=>{(({id:e,question:r})=>{E&&P(!0),T&&N(),t({type:p.actionTypes.custom,originMessage:I.id,body:{type:"faqclick",body:{faqId:e,faqQuestion:r}}}),n(r),i()})(e)},className:(0,c.className)("button","button--secondary"),children:[(0,S.jsx)(u.default,{name:"chevronRight",size:"8"}),e.question]})},e.id.toString())))})]})})};var T=n(2849);const N=({children:e})=>{const[,t]=(0,T.useSeamlyContainerElement)(),{isOpen:n,isVisible:u,setVisibility:p}=(0,r.useVisibility)(),{zIndex:d,showFaq:f,layoutMode:h}=(0,i.useConfig)(),{isInline:y}=(0,T.useSeamlyLayoutMode)(),m=(0,T.useSeamlyAppContainerClassNames)(),b=(0,o.h)(),{locale:v}=(0,s.useI18n)(),g=(0,l.useCallback)((e=>{t(e)}),[t]),O=(0,l.useMemo)((()=>{if(v&&document.querySelector("html").getAttribute("lang")!==v)return v}),[v]),w=["app","app--deprecated",...m];return n||"window"!==h||w.push("app--collapsed"),b&&w.push("app--user-responded"),w.push(`app--layout-${h}`),u&&(0,S.jsxs)("section",{className:(0,c.className)(w),onKeyDown:e=>{(e.code&&"Escape"===e.code||27===e.keyCode)&&!y&&n&&p(a.visibilityStates.minimized)},lang:O,tabIndex:"-1",ref:g,style:{zIndex:d},"data-nosnippet":!0,children:[(0,S.jsx)("div",{className:(0,c.className)("app-wrapper"),children:e}),f&&(0,S.jsx)(P,{})]})};var I=n(142),k=n(5663),A=n(2494),D=n(2212),R=n(9104),M=n(9965),L=n(8219);const U=({children:e})=>{const{showInlineView:t,containerRef:n}=(0,r.useShowInlineView)();return(0,S.jsx)("div",{ref:n,children:t&&e})},F=()=>{const{isVisible:e}=(0,r.useVisibility)(),{openChat:t,closeChat:n}=(0,T.useSeamlyChat)();return e&&(0,S.jsx)(U,{children:(0,S.jsxs)(N,{children:[(0,S.jsx)(L.default,{onOpenChat:t}),(0,S.jsx)(A.default,{onCloseChat:n,children:(0,S.jsx)(k.default,{})}),(0,S.jsxs)(I.default,{interruptComponent:M.default,children:[(0,S.jsx)(D.default,{}),(0,S.jsx)(R.default,{})]})]})})}},9180:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>R});var r=n(9279),o=n(9207),i=n(3742),s=n(8956),a=n(6065),c=n(3357),l=n(546),u=n(1474),p=n(9965),d=n(2212),f=n(9104),h=n(142),y=n(4956),m=n(7844);var b=n(5567),v=n(8877),g=n(2562);function O({event:e}){const[t]=(0,g.Z)(e);return(0,m.jsx)(t,{event:e})}function w(){const{preChatEvents:e,layoutMode:t}=(0,a.useConfig)(),{hasInterrupt:n}=(0,v.useInterrupt)(),{isOpen:r}=(0,i.useVisibility)(),o=!(n||!e?.length||r);return o&&(0,m.jsx)("ul",{className:(0,b.className)("pre-chat-messages",`pre-chat-messages--${t}`),"aria-hidden":!o,children:e.map((e=>(0,m.jsx)("li",{className:(0,b.className)("pre-chat-messages__message"),children:(0,m.jsx)(O,{event:e})},e.payload.id)))})}var j=n(1581),S=n(1433);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var C=n(2849),E=n(6425),P=n(7209);const T=({onClick:e})=>{const{t}=(0,l.useI18n)(),n=(0,o.useCallback)((()=>e()),[e]);return(0,m.jsx)("button",{type:"button",className:(0,b.className)("button","collapse-button"),onClick:n,children:(0,m.jsx)(P.default,{name:"chevronDown",size:"32",alt:t("window.srCollapseButton")})})};var N=n(6591),I=n(4809);const k=()=>{const e=(0,a.useStartChatIcon)(),t=(0,I.useSeamlyCurrentAgent)(),{hasInterrupt:n}=(0,v.useInterrupt)(),r=t&&!n,o=r?t.avatar:e;return o?(0,m.jsx)("img",{className:(0,b.className)(r?"avatar":"icon"),src:o,alt:""}):(0,m.jsx)(P.default,{name:"avatar",size:"32"})},A=({onClick:e})=>{const t=(0,N.iW)(),{t:n}=(0,l.useI18n)(),r=t()?n("window.openButton.srContinue"):n("window.openButton.srStart"),a=(0,s.MI)(),{isOpen:c}=(0,i.useVisibility)(),u=(0,I.useSeamlyUnreadCount)(),p=(0,o.useCallback)((()=>{e(),a()}),[a,e]);return(0,m.jsx)(S.Z,{isActive:!c,transitionStartState:S.I.rendered,children:(0,m.jsxs)("button",{className:(0,b.className)("window-open-button"),"aria-label":r,"aria-hidden":c,onClick:p,children:[(0,m.jsx)("span",{className:(0,b.className)("message-count"),"aria-hidden":"true",children:!!u&&u}),(0,m.jsx)(k,{})]})})},D={app:()=>((0,y.Z)(),(0,m.jsx)(u.default,{children:(0,m.jsxs)(h.default,{interruptComponent:p.default,children:[(0,m.jsx)(d.default,{}),(0,m.jsx)(f.default,{})]})})),inline:()=>{(0,y.Z)();const{showInlineView:e,containerRef:t}=(0,i.useShowInlineView)(),{isOpen:n}=(0,i.useVisibility)(),{hasInterrupt:r,meta:o}=(0,v.useInterrupt)();return r&&!n?(0,m.jsx)(p.default,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){x(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},o)):(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(S.Z,{isActive:!n,transitionStartState:S.I.rendered,children:(0,m.jsxs)("div",{ref:t,className:(0,b.className)("unstarted-wrapper","unstarted-wrapper--inline"),children:[(0,m.jsx)(w,{}),(0,m.jsx)(j.Z,{})]})}),(0,m.jsx)(S.Z,{isActive:n,transitionStartState:S.I.rendered,children:(0,m.jsx)(u.default,{ref:t,children:e&&(0,m.jsxs)(h.default,{interruptComponent:p.default,children:[n&&(0,m.jsx)(d.default,{}),(0,m.jsx)(f.default,{})]})})})]})},window:()=>{const{openChat:e,closeChat:t}=(0,C.useSeamlyChat)(),{isOpen:n}=(0,i.useVisibility)(),s=(0,r.h)(),{t:a}=(0,l.useI18n)(),c=a("window.chat.continue"),y=(0,o.useMemo)((()=>({payload:{body:{text:c}}})),[c]);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(A,{onClick:e}),(0,m.jsx)(S.Z,{isActive:!n&&!s,transitionStartState:S.I.rendered,children:(0,m.jsx)("div",{className:(0,b.className)("unstarted-wrapper","unstarted-wrapper--window"),children:(0,m.jsx)(w,{})})}),(0,m.jsx)(S.Z,{isActive:!n&&s,transitionStartState:S.I.notRendered,children:(0,m.jsx)("div",{className:(0,b.className)("unstarted-wrapper","unstarted-wrapper--window","unstarted-wrapper--continue"),children:(0,m.jsx)(E.default,{event:y})})}),(0,m.jsx)(S.Z,{isActive:n,transitionStartState:S.I.notRendered,children:(0,m.jsxs)(u.default,{children:[n&&(0,m.jsx)(T,{onClick:t}),(0,m.jsxs)(h.default,{interruptComponent:p.default,children:[(0,m.jsx)(d.default,{}),(0,m.jsx)(f.default,{})]})]})})]})}},R=({children:e})=>{const[,t]=(0,s.dW)(),{namespace:n,layoutMode:u,zIndex:p}=(0,a.useConfig)(),{isOpen:d,isVisible:f}=(0,i.useVisibility)(),h=(0,c.P)(),y=(0,r.h)(),{locale:v}=(0,l.useI18n)(),g=D[u],O=(0,o.useCallback)((e=>{t(e)}),[t]),w=(0,o.useMemo)((()=>{if(v&&document.querySelector("html").getAttribute("lang")!==v)return v}),[v]);if(!g)return console.warn('"layoutMode" should be one of "app", "inline" or "window"'),null;const j=["app",`app--layout-${u}`,`namespace--${n}`,...h];return d||"app"===u||j.push("app--collapsed"),y&&j.push("app--user-responded"),f&&(0,m.jsx)("div",{className:(0,b.className)(j),lang:w,tabIndex:"-1","data-nosnippet":!0,style:{zIndex:p},ref:O,children:e||(0,m.jsx)(g,{})})}},1433:(e,t,n)=>{"use strict";n.d(t,{I:()=>u,Z:()=>p});var r=n(7210),o=n(9207),i=n(2849),s=n(5567),a=n(2112);const c={visible:(0,s.className)("transition--visible"),in:(0,s.className)("transition--in"),visuallyHidden:(0,s.className)("visually-hidden")},l=Object.values(c),u={notRendered:"notRendered",rendered:"rendered",visuallyHidden:"visuallyHidden"},p=({children:e,isActive:t,timeout:n,transitionStartState:s=u.notRendered,onInTransitionComplete:p,onOutTransitionComplete:d})=>{const f=(0,o.useRef)(!1),h=n?parseInt(n,10):a.defaultTransitionTimeMs,y=(0,i.useStableCallback)(p),m=(0,i.useStableCallback)(d),b=s===u.visuallyHidden,[v,g]=(0,o.useState)((()=>b?[c.visuallyHidden]:[])),O="notRendered"!==s||v.length>0;return(0,o.useEffect)((()=>{let e=null,n=null;return f.current&&!t&&(g([c.visible]),e=setTimeout((()=>{g([...b?[c.visuallyHidden]:[]]),m&&(n=requestAnimationFrame((()=>{m()})))}),h)),!f.current&&t&&(g([c.visible]),n=requestAnimationFrame((()=>{n=requestAnimationFrame((()=>{g([c.visible,c.in]),y&&(e=setTimeout((()=>{y()}),h))}))}))),f.current=t,()=>{clearTimeout(e),cancelAnimationFrame(n)}}),[t,b,h,y,m]),O&&(0,r.toChildArray)(e).map((e=>{const{className:t=""}=e.props,n=t.split(" ").filter((e=>!l.includes(e)));return(0,r.cloneElement)(e,{className:[...n,...v].join(" ")})}))}},3357:(e,t,n)=>{"use strict";n.d(t,{P:()=>o,j:()=>i});var r=n(6065);const o=()=>(0,r.useConfig)().appContainerClassNames,i=e=>{const{fromClient:t}=e.payload,n=["message"];return"info"===e.type?n.push("message--source-info"):t?n.push("message--source-user"):n.push("message--source-agent"),n}},8956:(e,t,n)=>{"use strict";n.d(t,{CE:()=>f,MI:()=>d,Vs:()=>c,aJ:()=>p,dW:()=>u});var r=n(1153),o=n(9207),i=n(6113),s=n(4959),a=n(4809);const c=(e=0)=>new Promise((t=>{setTimeout(t,e)})),l=e=>{requestAnimationFrame((async()=>{await c(180);const t="string"==typeof e?document.getElementById(e):e;(0,s.focusElement)(t)}))},u=()=>{const{seamlyContainerElement:e}=(0,a.useSeamlyStateContext)(),t=(0,i.useDispatch)();return[e,(0,o.useCallback)((e=>{t((0,r.setSeamlyContainerElement)(e))}),[t])]},p=e=>(0,o.useCallback)((()=>{l(e)}),[e]),d=()=>{const e=(0,a.useSkiplink)();return p(e)},f=()=>{const e=(0,o.useRef)(null),[t]=u();return e.current=t,(0,o.useCallback)((t=>{(0,s.runIfElementContainsOrHasFocus)(e.current,(()=>{l(t)}))}),[])}},6639:(e,t,n)=>{"use strict";n.d(t,{a:()=>s,t:()=>a});var r=n(9207),o=n(8803),i=n(5740);const s=()=>(0,r.useContext)(o.SeamlyLiveRegionContext),a=()=>{const e=s();return{sendPolite:(0,r.useCallback)((t=>{t&&e({ariaLive:i.ariaLiveLevels.polite,messageText:t})}),[e]),sendAssertive:(0,r.useCallback)((t=>{t&&e({ariaLive:i.ariaLiveLevels.assertive,messageText:t})}),[e])}}},6591:(e,t,n)=>{"use strict";n.d(t,{Af:()=>a,eu:()=>s,iW:()=>c,jM:()=>i});var r=n(9207),o=n(2331);const i=()=>(0,r.useContext)(o.SeamlyApiContext),s=()=>i().store||{},a=()=>{const{get:e}=s();return e?e("conversationUrl"):null},c=()=>{const e=i();return(0,r.useCallback)((()=>e.hasConversation()),[e])}},2849:(e,t,n)=>{"use strict";n.r(t),n.d(t,{useElementFocusingById:()=>i.aJ,useEntryTextLimit:()=>u.useEntryTextLimit,useEvents:()=>u.useEvents,useFileUploadMeta:()=>h,useFileUploads:()=>y,useFocusIfSeamlyContainedFocus:()=>i.CE,useForceUpdate:()=>P.NW,useGeneratedId:()=>P.I8,useLastMessageEventId:()=>u.useLastMessageEventId,useLiveRegion:()=>m.t,useOptionButton:()=>j,useSeamlyActivityEventHandler:()=>S.Z,useSeamlyApiContext:()=>o.jM,useSeamlyAppContainerClassNames:()=>s.P,useSeamlyChat:()=>_.Z,useSeamlyCommands:()=>x.Z,useSeamlyContainerElement:()=>i.dW,useSeamlyConversationUrl:()=>o.Af,useSeamlyCurrentAgent:()=>u.useSeamlyCurrentAgent,useSeamlyEventStream:()=>T,useSeamlyHeaderData:()=>u.useSeamlyHeaderData,useSeamlyIdleDetachCountdown:()=>C.Z,useSeamlyIsHistoryLoaded:()=>u.useSeamlyIsHistoryLoaded,useSeamlyIsLoading:()=>u.useSeamlyIsLoading,useSeamlyLayoutMode:()=>u.useSeamlyLayoutMode,useSeamlyLiveRegionContext:()=>m.a,useSeamlyMessageContainerClassNames:()=>s.j,useSeamlyOptions:()=>w,useSeamlyParticipant:()=>u.useSeamlyParticipant,useSeamlyResumeConversationPrompt:()=>E.Z,useSeamlyServiceData:()=>u.useSeamlyServiceData,useSeamlyServiceInfo:()=>u.useSeamlyServiceInfo,useSeamlyStateContext:()=>u.useSeamlyStateContext,useSeamlyUnreadCount:()=>u.useSeamlyUnreadCount,useSkiplink:()=>u.useSkiplink,useSkiplinkTargetFocusing:()=>i.MI,useStableCallback:()=>P.R9});var r=n(9207),o=n(6591),i=n(8956),s=n(3357),a=n(1153),c=n(6113),l=n(641),u=n(4809);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){f(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const h=()=>{const{showFileUpload:e,entryMeta:{options:t,optionsOverride:n},options:{features:{uploads:r}}}=(0,u.useSeamlyStateContext)(),{allowedMimeTypes:o,maxSize:i}=n.upload||{},{enabled:s,enabledFromEntry:a}=r||{},{allowedMimeTypes:c,maxSize:l}=d(d(d({},t.upload||{allowedMimeTypes:[],maxSize:0}),o?{allowedMimeTypes:o}:{}),i?{maxSize:i}:{});return{showFileUpload:e,accountAllowsUploads:!!r,serviceAllowsUploads:a||s,allowedMimeTypes:c,maxSize:l}},y=()=>{const{currentUploads:e}=(0,u.useSeamlyStateContext)(),t=(0,c.useDispatch)(),n=(0,r.useContext)(l.Z);return{uploadFile:(0,r.useCallback)((e=>{n(e)}),[n]),clearUploads:(0,r.useCallback)((()=>{t((0,a.clearAllUploads)())}),[t]),currentUploads:e,isUploading:e.some((e=>e.uploading)),isComplete:e.every((e=>e.complete))}};var m=n(6639),b=n(546);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){O(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const w=()=>{const{t:e}=(0,b.useI18n)(),{options:t}=(0,u.useSeamlyStateContext)(),{panelActive:n,optionActive:i,userSelectedOptions:s,features:l}=t,{cobrowsing:p,sendTranscript:d}=l,f={cobrowsing:p,sendTranscript:d},h=Object.keys(f).filter((e=>f[e])).map((t=>({name:t,title:e(`options.${t}.menuTitle`),available:f[t].enabled}))),y=p||d,m=(0,c.useDispatch)(),{get:v,set:O}=(0,o.eu)();return{allowOptionSelection:y,userSelectedOptions:s,features:l,menuOptions:h,initUserSelectedOptions:(0,r.useCallback)((()=>{const e=v("options")||{};m((0,a.setUserSelectedOptions)(e))}),[v,m]),setUserSelectedOptions:(0,r.useCallback)((e=>{m((0,a.setUserSelectedOptions)(e)),O("options",e)}),[O,m]),setUserSelectedOption:(0,r.useCallback)(((e,t)=>{const n=v("options")||{};O("options",g(g({},n),{},{[e]:t})),m((0,a.setUserSelectedOption)({option:e,value:t}))}),[m,v,O]),showOption:e=>{m((0,a.showOption)(e))},hideOption:()=>{m((0,a.hideOption)())},panelActive:n,optionActive:i}},j=()=>{const{optionsButtonId:e}=(0,u.useSeamlyStateContext)();return{id:e,focusButton:(0,i.aJ)(e)}};var S=n(2463),_=n(4956),x=n(4431),C=n(1154),E=n(1256),P=n(5029);const T=(e,t)=>{const n=(0,o.jM)();(0,r.useEffect)((()=>{n.stream&&(t?n.stream().filter(t).subscribe({next:e}):n.stream().subscribe({next:e}))}),[n,e,t])}},4809:(e,t,n)=>{"use strict";n.r(t),n.d(t,{selectEventIds:()=>b,selectEvents:()=>y,selectEventsWithSuggestion:()=>h,selectState:()=>d,useEntryTextLimit:()=>I,useEvents:()=>m,useEventsIds:()=>v,useLastMessageEventId:()=>E,useLoadedImageEventIds:()=>j,useSeamlyCurrentAgent:()=>T,useSeamlyHeaderData:()=>O,useSeamlyIsHistoryLoaded:()=>P,useSeamlyIsLoading:()=>g,useSeamlyLayoutMode:()=>k,useSeamlyParticipant:()=>_,useSeamlyServiceData:()=>N,useSeamlyServiceInfo:()=>x,useSeamlyStateContext:()=>f,useSeamlyUnreadCount:()=>w,useSkiplink:()=>S});var r=n(4788),o=n(4959),i=n(573),s=n(5865),a=n(6065),c=n(6113);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){p(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const d=({state:e})=>e,f=()=>(0,c.useSelector)(d),h=(0,i.createSelector)(d,r.selectConfig,s.selectUserHasResponded,(({events:e,serviceData:t},n,r)=>{if(r||"inline"===n.layoutMode||!t?.suggestion||!t?.suggestion?.body.length)return e;const o={type:"service_data",payload:t.suggestion};return[...e,o]})),y=(0,i.createSelector)(h,r.selectConfig,((e,t)=>{const{enabled:n,threshold:r}=t?.messages?.timeIndicator??{};if(!n)return e;const i=[];let s=null;return e.forEach(((e,t)=>{if(0===t)i.push(u(u({},e),{},{timeIndicator:e.payload.occurredAt}));else{const t=s&&(0,o.microsecondsToMilliseconds)(e.payload.occurredAt-s.payload.occurredAt)>=r?e.payload.occurredAt:void 0;i.push(u(u({},e),{},{timeIndicator:t}))}s=e})),i})),m=()=>(0,c.useSelector)(y),b=(0,i.createSelector)(y,(e=>e.map((e=>e.payload.id)))),v=()=>(0,c.useSelector)(b),g=()=>f().isLoading,O=()=>f().headerTitles,w=()=>f().unreadEvents,j=()=>f().loadedImageEventIds,S=()=>f().skiplinkTargetId,_=e=>f().participantInfo.participants[e],x=()=>f().serviceInfo,C=(0,i.createSelector)(y,(e=>{const t=e.filter((e=>"message"===e.type));return t[t.length-1]?.payload.id})),E=()=>(0,c.useSelector)(C),P=()=>f().historyLoaded,T=()=>{const{participants:e,currentAgent:t}=f().participantInfo;return t?e[t]:null},N=e=>f().serviceData[e],I=()=>{const{entryMeta:{options:{text:e},optionsOverride:{text:t}}}=f(),{limit:n}=t||e||{limit:null};return{hasLimit:null!==n,limit:null!==n?n:null}},k=()=>{const{layoutMode:e}=(0,a.useConfig)();return{isInline:"inline"===e,isWindow:"window"===e,isResolving:!e}}},2562:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(9207),o=n(5423),i=n(5740);const s=e=>{const t=(0,r.useContext)(o.Z);let n=null;e.payload.type===i.payloadTypes.choicePrompt&&(n=t[e.type][e.payload.body.prompt.type]);const s=t[e.type][e.payload.type]||t.fallback;return[s&&"function"!=typeof s?s[e.payload.body.type]||t.fallback:s,n]}},2463:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(9207),o=n(6460);const i=()=>(0,r.useContext)(o.Z)},4956:(e,t,n)=>{"use strict";n.d(t,{Z:()=>h});var r=n(546),o=n(1153),i=n(2629),s=n(3742),a=n(9207),c=n(6113),l=n(3489),u=n(6639),p=n(6591),d=n(4809),f=n(4431);const h=()=>{const e=(0,d.useEvents)(),{t}=(0,r.useI18n)(),{isInline:n,isWindow:h}=(0,d.useSeamlyLayoutMode)(),{isOpen:y,isVisible:m,setVisibility:b}=(0,s.useVisibility)(),v=(0,c.useSelector)(l.selectShowInlineView),g=(0,c.useDispatch)(),O=(0,a.useRef)(null),{start:w,connect:j,apiConfigReady:S,apiConnected:_}=(0,f.Z)(),x=(0,p.iW)(),C=(0,a.useRef)(null),E=(0,a.useRef)(null),P=(0,a.useRef)(!1),{sendAssertive:T}=(0,u.t)();(0,a.useEffect)((()=>{m&&setTimeout((()=>{T(t("window.srTexts.onLoad"))}),500)}),[m,T,t]),(0,a.useEffect)((()=>{if(m!==E.current)return C.current=y,void(E.current=m);null!==C.current&&T(t(y?"window.srTexts.onOpen":"window.srTexts.onClose")),C.current=y,E.current=m}),[y,m,T,t]),(0,a.useEffect)((()=>(O.current=setTimeout((()=>{g((0,o.setIsLoading)(!0))}),500),()=>{clearTimeout(O.current)})),[g]),(0,a.useEffect)((()=>(e.length&&(O.current=setTimeout((()=>{g((0,o.setIsLoading)(!1))}),5e3)),()=>{clearTimeout(O.current)})),[e,g]),(0,a.useEffect)((()=>{S&&_||(P.current=!1)}),[S,_]);const N=(0,a.useCallback)((async()=>{_||await j(),(y||m&&n)&&(w(),P.current=!0)}),[_,j,n,y,m,w]);return(0,a.useEffect)((()=>{!S||P.current||h&&!y&&!x()||n&&!v||(x()&&y&&(clearTimeout(O.current),g((0,o.setIsLoading)(!1))),N())}),[S,N,g,x,n,y,h,v]),{openChat:()=>{b(i.visibilityStates.open)},closeChat:()=>{b(i.visibilityStates.minimized)}}}},4431:(e,t,n)=>{"use strict";n.d(t,{Z:()=>j});var r=n(2112),o=n(9279),i=n(4134),s=n(5150),a=n(6065),c=n(5560),l=n(1153),u=n(2629),p=n(3742),d=n(9643),f=n(9207),h=n(6113),y=n(2331),m=n(5740),b=n(6591),v=n(4809);function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const j=()=>{const e=(0,b.jM)(),t=(0,a.useConfig)(),n=(0,h.useDispatch)(),g=(0,f.useContext)(y.SeamlyEventBusContext),w=(0,o.h)(),j=(0,b.iW)(),{visible:S,setVisibility:_}=(0,p.useVisibility)(),x=(0,v.useSeamlyUnreadCount)(),C=(0,f.useCallback)(((...e)=>{g.emit(...e)}),[g]),E=(0,f.useCallback)((()=>{e.sendContext(t.context||{}),C("ui.beforeStart",{visibility:S,hasConversation:j(),hasResponded:w,unreadMessageCount:x}),e.send("start"),C("ui.start",{visibility:S,hasConversation:j(),hasResponded:w,unreadMessageCount:x})}),[e,t.context,C,j,w,x,S]),P=(0,f.useCallback)((async()=>{n(i.resetApp())}),[n]),T=(0,f.useCallback)((e=>({type:e,id:(0,d.randomId)(),transactionId:(0,d.randomId)(),participant:r.userParticipantId,fromClient:!0,occurredAt:1e3*Date.now(),meta:{}})),[]),N=(0,f.useCallback)((e=>O(O({},T("text")),{},{body:{text:e}})),[T]),I=(0,f.useCallback)((({body:t,config:r={}})=>{if(""===t.trim())return;const o=O(O({},N(t)),r);e.send("message",o),C("message",o),n((0,l.addEvent)({type:"message",payload:O(O({},o),{},{optimisticallyInjected:!0})}))}),[e,n,C,N]),k=(0,f.useCallback)((e=>{n((0,l.addEvent)({type:"message",payload:N(e)}))}),[n,N]),A=(0,f.useCallback)(((e,t,o,i,s,a,c)=>{n((0,l.addEvent)({type:"message",payload:{type:"upload",id:e,transactionId:t,participant:r.userParticipantId,fromClient:!0,occurredAt:o,meta:{},body:{contentType:i,filename:s,filesize:a,url:c}}}))}),[n]),D=(0,f.useCallback)((e=>{const t={body:{subtype:e,type:"divider"},fromClient:!1,fromHistory:!0,id:(0,d.randomId)(),transactionId:(0,d.randomId)(),type:"divider"};n((0,l.addEvent)({type:"info",payload:t}))}),[n]),R=(0,f.useCallback)((t=>{if(!t)return;e.send("action",t);const{type:n}=t;n!==m.actionTypes.typing&&n!==m.actionTypes.read&&C(`action.${n}`,t)}),[e,C]),M=(0,f.useCallback)((t=>{e.sendContext(t)}),[e]);return{connect:(0,f.useCallback)((()=>e.connected?Promise.reject(new Error("The API is already connected")):e.connect().then((e=>{e&&(n((0,l.setInitialState)(e)),e.userResponded&&(n((0,s.setHasResponded)(e.userResponded)),_(u.visibilityStates.open)))})).catch((e=>{n((0,c.setInterrupt)({name:e.name,message:e.message,langKey:e.langKey,originalEvent:e.originalEvent,originalError:e.originalError}))}))),[e,n,_]),start:E,sendMessage:I,sendAction:R,sendContext:M,reset:P,emitEvent:C,addMessageBubble:k,addUploadBubble:A,addDivider:D,apiConnected:e.connected,apiConfigReady:e.configReady}}},1154:(e,t,n)=>{"use strict";n.d(t,{Z:()=>b});var r=n(2112),o=n(546),i=n(3742),s=n(1153),a=n(9207),c=n(6113),l=n(4959),u=n(5740),p=n(6639),d=n(4809),f=n(4431);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b=()=>{const e=(0,c.useDispatch)(),{idleDetachCountdown:t}=(0,d.useSeamlyStateContext)(),{isOpen:n}=(0,i.useVisibility)(),h=(0,a.useRef)({});h.current={hasCountdown:t.hasCountdown,isActive:t.isActive,remaining:t.remaining,wasStopped:t.wasStopped,isOpen:n};const{emitEvent:m,sendAction:b}=(0,f.Z)(),{t:v}=(0,o.useI18n)(),{sendAssertive:g,sendPolite:O}=(0,p.t)(),w=(0,a.useCallback)((e=>{const{isOpen:t}=h.current;t&&g(e)}),[g]),j=(0,a.useCallback)((e=>{const{isOpen:t}=h.current;t&&O(e)}),[O]),S=(0,a.useCallback)((t=>{const n=(0,l.millisecondsToSeconds)(t),r=(0,l.getTimeFromSeconds)(n);e((0,s.initIdleDetachCountdown)({delaySeconds:n,delayTime:r})),m("idleTimer.start"),w(`${v("idleDetachWarning.countdownTitle")} ${v("idleDetachWarning.countdownText")} ${v("idleDetachWarning.countdownTimer",r)}`)}),[e,m,w,v]),_=(0,a.useCallback)(((t,n)=>{const{hasCountdown:r,wasStopped:o}=h.current;r&&(t||(n||b({type:u.actionTypes.detachService}),w(v("idleDetachWarning.notifyTransferText"))),o||m("idleTimer.stop"),e((0,s.clearIdleDetachCountdown)()))}),[e,b,m,w,v]),x=(0,a.useCallback)((()=>{const{remaining:t}=h.current;if(t<=0)return;const n=t-1;n%r.screenReaderDebounceDelaySeconds==0&&w(`${v("idleDetachWarning.countdownText")} ${v("idleDetachWarning.countdownTimer",(0,l.getTimeFromSeconds)(n))}`),e((0,s.decrementIdleDetachCountdownCounter)())}),[e,w,v]),C=(0,a.useCallback)((()=>{const{isActive:t,remaining:n}=h.current;t&&(e((0,s.stopIdleDetachCountdownCounter)()),n&&(m("idleTimer.stop"),j(v("idleDetachWarning.srCountDownStoppedText"))))}),[e,m,j,v]);return y(y({},t),{},{initCountdown:S,endCountdown:_,decrementCountdown:x,stopCountdown:C})}},1256:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(546),o=n(1153),i=n(6113),s=n(5740),a=n(6639),c=n(4809),l=n(4431);const u=()=>{const e=(0,i.useDispatch)(),t=(0,c.useSeamlyStateContext)().resumeConversationPrompt,{sendAction:n}=(0,l.Z)(),{t:u}=(0,r.useI18n)(),{sendAssertive:p}=(0,a.t)();return{continueChat:()=>{n({type:s.actionTypes.dismiss,body:{type:s.dismissTypes.resumeConversationPrompt}}),e((0,o.clearResumeConversationPrompt)())},hasPrompt:t,restartChat:()=>{p(u("resumeConversationPrompt.srNotifyRestartText")),n({type:s.actionTypes.detachService}),e((0,o.clearResumeConversationPrompt)())}}}},5029:(e,t,n)=>{"use strict";n.d(t,{I8:()=>s,NW:()=>i,R9:()=>a});var r=n(9643),o=n(9207);const i=()=>{const[e,t]=(0,o.useReducer)((e=>e+1),0);return(0,o.useCallback)((()=>{setTimeout((()=>{t()}))}),[])},s=()=>{const[e]=(0,o.useState)((()=>(0,r.randomId)()));return e},a=e=>{const t=(0,o.useRef)(null);t.current=e;const n="function"==typeof e;return(0,o.useMemo)((()=>n?(...e)=>t.current(...e):void 0),[n])}},1442:(e,t,n)=>{"use strict";n.d(t,{T:()=>r});const r=(e,t,n=null)=>({fn:e,errorText:t,compareValue:n})},4959:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t),n.d(t,{closestElement:()=>c,createAriaHider:()=>l,debounce:()=>s,elementMatch:()=>a,focusElement:()=>O,formatBytes:()=>h,getKey:()=>g,getRelativeDate:()=>j,getTimeFromSeconds:()=>f,getUrlParams:()=>y,getUrlSearchString:()=>m,keyCodes:()=>b,keyNames:()=>v,microsecondsToMilliseconds:()=>d,millisecondsToSeconds:()=>p,omit:()=>_,pick:()=>S,propIsTrue:()=>u,runIfElementContainsOrHasFocus:()=>w});const s=(e,t)=>{let n;return function(...r){let o=!1;return clearTimeout(n),n=setTimeout((()=>{n=null,o||e.apply(this,r),o=!1}),t),t=>{o=!0,t&&e.apply(this,r)}}},a=(e,t)=>{if(e.matches)e.matches(t);else{if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}return!1},c=(e,t)=>{if(e.closest)return e.closest(t);let n=e;do{if(a(n,t))break;n=n.parentElement||n.parentNode}while(null!==n&&1===n.nodeType);return null!==n&&1===n.nodeType?n:null},l=()=>{const e=[],t=[];return document.querySelectorAll('body > *:not([role="dialog"])').forEach((n=>{const r=n.getAttribute("aria-hidden");null!==r&&"false"!==r||(e.push(r),t.push(n),n.setAttribute("aria-hidden","true"))})),()=>{t.forEach(((t,n)=>{const r=e[n];null===r?t.removeAttribute("aria-hidden"):t.setAttribute("aria-hidden",r)}))}},u=e=>"true"===e||!0===e,p=e=>Math.ceil(e/1e3),d=e=>Math.ceil(e/1e3),f=e=>{const t=Math.floor(e/60);return{minutes:t,seconds:e-60*t}},h=(e,t=2)=>{if(0===e)return"0 Bytes";const n=t<0?0:t,r=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/1024**r).toFixed(n))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][r]}`},y=()=>{const{search:e}=window.location;return e?e.slice(e.indexOf("?")+1).split("&").reduce(((e,t)=>{const[n,r]=t.split("=");return o(o({},e),{},{[n]:decodeURIComponent(r)})}),{}):{}},m=e=>Object.keys(e).reduce(((t,n)=>`${t}${t?"&":""}${n}=${encodeURIComponent(e[n])}`),""),b={27:"Escape",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown"},v={Escape:"Escape",End:"End",Home:"Home",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown"},g=e=>e.code?v[e.code]:b[e.keyCode],O=e=>{e&&e.focus()},w=(e,t)=>{e&&(e.contains(document.activeElement)||e===document.activeElement)&&t()},j=(e,t)=>{const n=new Date(t).setHours(0,0,0,0),r=e.getTime(),o=864e5;return r>=n+o?e:r>n?"today":r>n-o?"yesterday":e},S=(e,t)=>t.reduce(((t,n)=>(n in e&&(t[n]=e[n]),t)),{}),_=(e,t)=>Object.keys(e).reduce(((n,r)=>(t.includes(r)||(n[r]=e[r]),n)),{})},6273:(e,t,n)=>{"use strict";n.d(t,{IZ:()=>o,NO:()=>r,OP:()=>s,nE:()=>i});const r=(e,t)=>{let n=!0;for(let r=0;r<e.length;r++)e[r].size>t&&(n=!1);return n},o=e=>!!e?.length>0,i=e=>{const t=e&&e.trim();return!(!t||!t.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))},s=e=>!!e},1924:(e,t,n)=>{"use strict";var r=n(210),o=n(5559),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},5559:(e,t,n)=>{"use strict";var r=n(8612),o=n(210),i=o("%Function.prototype.apply%"),s=o("%Function.prototype.call%"),a=o("%Reflect.apply%",!0)||r.call(s,i),c=o("%Object.getOwnPropertyDescriptor%",!0),l=o("%Object.defineProperty%",!0),u=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var t=a(r,s,arguments);if(c&&l){var n=c(t,"length");n.configurable&&l(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var p=function(){return a(r,i,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},8767:e=>{function t(e){if(e)return function(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}(e)}e.exports=t,t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}},4289:(e,t,n)=>{"use strict";var r=n(2215),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,s=Array.prototype.concat,a=Object.defineProperty,c=n(1044)(),l=a&&c,u=function(e,t,n,r){var o;(!(t in e)||"function"==typeof(o=r)&&"[object Function]"===i.call(o)&&r())&&(l?a(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},p=function(e,t){var n=arguments.length>2?arguments[2]:{},i=r(t);o&&(i=s.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a<i.length;a+=1)u(e,i[a],t[i[a]],n[i[a]])};p.supportsDescriptors=!!l,e.exports=p},4445:e=>{e.exports=s,s.default=s,s.stable=u,s.stableStringify=u;var t="[...]",n="[Circular]",r=[],o=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,n,s){var a;void 0===s&&(s=i()),c(e,"",0,[],void 0,0,s);try{a=0===o.length?JSON.stringify(e,t,n):JSON.stringify(e,d(t),n)}catch(e){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 a}function a(e,t,n,i){var s=Object.getOwnPropertyDescriptor(i,n);void 0!==s.get?s.configurable?(Object.defineProperty(i,n,{value:e}),r.push([i,n,t,s])):o.push([t,n,e]):(i[n]=e,r.push([i,n,t]))}function c(e,r,o,i,s,l,u){var p;if(l+=1,"object"==typeof e&&null!==e){for(p=0;p<i.length;p++)if(i[p]===e)return void a(n,e,r,s);if(void 0!==u.depthLimit&&l>u.depthLimit)return void a(t,e,r,s);if(void 0!==u.edgesLimit&&o+1>u.edgesLimit)return void a(t,e,r,s);if(i.push(e),Array.isArray(e))for(p=0;p<e.length;p++)c(e[p],p,p,i,e,l,u);else{var d=Object.keys(e);for(p=0;p<d.length;p++){var f=d[p];c(e[f],f,p,i,e,l,u)}}i.pop()}}function l(e,t){return e<t?-1:e>t?1:0}function u(e,t,n,s){void 0===s&&(s=i());var a,c=p(e,"",0,[],void 0,0,s)||e;try{a=0===o.length?JSON.stringify(c,t,n):JSON.stringify(c,d(t),n)}catch(e){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 a}function p(e,o,i,s,c,u,d){var f;if(u+=1,"object"==typeof e&&null!==e){for(f=0;f<s.length;f++)if(s[f]===e)return void a(n,e,o,c);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==d.depthLimit&&u>d.depthLimit)return void a(t,e,o,c);if(void 0!==d.edgesLimit&&i+1>d.edgesLimit)return void a(t,e,o,c);if(s.push(e),Array.isArray(e))for(f=0;f<e.length;f++)p(e[f],f,f,s,e,u,d);else{var h={},y=Object.keys(e).sort(l);for(f=0;f<y.length;f++){var m=y[f];p(e[m],m,f,s,e,u,d),h[m]=e[m]}if(void 0===c)return h;r.push([c,o,e]),c[o]=h}s.pop()}}function d(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(o.length>0)for(var r=0;r<o.length;r++){var i=o[r];if(i[1]===t&&i[0]===n){n=i[2],o.splice(r,1);break}}return e.call(this,t,n)}}},7648:e=>{"use strict";var t="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,r=Object.prototype.toString,o="[object Function]";e.exports=function(e){var i=this;if("function"!=typeof i||r.call(i)!==o)throw new TypeError(t+i);for(var s,a=n.call(arguments,1),c=function(){if(this instanceof s){var t=i.apply(this,a.concat(n.call(arguments)));return Object(t)===t?t:this}return i.apply(e,a.concat(n.call(arguments)))},l=Math.max(0,i.length-a.length),u=[],p=0;p<l;p++)u.push("$"+p);if(s=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(c),i.prototype){var d=function(){};d.prototype=i.prototype,s.prototype=new d,d.prototype=null}return s}},8612:(e,t,n)=>{"use strict";var r=n(7648);e.exports=Function.prototype.bind||r},210:(e,t,n)=>{"use strict";var r,o=SyntaxError,i=Function,s=TypeError,a=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}var l=function(){throw new s},u=c?function(){try{return l}catch(e){try{return c(arguments,"callee").get}catch(e){return l}}}():l,p=n(1405)(),d=Object.getPrototypeOf||function(e){return e.__proto__},f={},h="undefined"==typeof Uint8Array?r:d(Uint8Array),y={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":p?d([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%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%":f,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p?d(d([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&p?d((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?d((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p?d(""[Symbol.iterator]()):r,"%Symbol%":p?Symbol:r,"%SyntaxError%":o,"%ThrowTypeError%":u,"%TypedArray%":h,"%TypeError%":s,"%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},m=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(n=d(o.prototype))}return y[t]=n,n},b={"%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"]},v=n(8612),g=n(7642),O=v.call(Function.call,Array.prototype.concat),w=v.call(Function.apply,Array.prototype.splice),j=v.call(Function.call,String.prototype.replace),S=v.call(Function.call,String.prototype.slice),_=v.call(Function.call,RegExp.prototype.exec),x=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,E=function(e){var t=S(e,0,1),n=S(e,-1);if("%"===t&&"%"!==n)throw new o("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new o("invalid intrinsic syntax, expected opening `%`");var r=[];return j(e,x,(function(e,t,n,o){r[r.length]=n?j(o,C,"$1"):t||e})),r},P=function(e,t){var n,r=e;if(g(b,r)&&(r="%"+(n=b[r])[0]+"%"),g(y,r)){var i=y[r];if(i===f&&(i=m(r)),void 0===i&&!t)throw new s("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:i}}throw new o("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new s('"allowMissing" argument must be a boolean');if(null===_(/^%?[^%]*%?$/g,e))throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=E(e),r=n.length>0?n[0]:"",i=P("%"+r+"%",t),a=i.name,l=i.value,u=!1,p=i.alias;p&&(r=p[0],w(n,O([0,1],p)));for(var d=1,f=!0;d<n.length;d+=1){var h=n[d],m=S(h,0,1),b=S(h,-1);if(('"'===m||"'"===m||"`"===m||'"'===b||"'"===b||"`"===b)&&m!==b)throw new o("property names with quotes must have matching quotes");if("constructor"!==h&&f||(u=!0),g(y,a="%"+(r+="."+h)+"%"))l=y[a];else if(null!=l){if(!(h in l)){if(!t)throw new s("base intrinsic for "+e+" exists, but the property is not available.");return}if(c&&d+1>=n.length){var v=c(l,h);l=(f=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:l[h]}else f=g(l,h),l=l[h];f&&!u&&(y[a]=l)}}return l}},1221:e=>{"use strict";"undefined"!=typeof self?e.exports=self:"undefined"!=typeof window?e.exports=window:e.exports=Function("return this")()},2503:(e,t,n)=>{"use strict";var r=n(4289),o=n(1221),i=n(2168),s=n(9471),a=i(),c=function(){return a};r(c,{getPolyfill:i,implementation:o,shim:s}),e.exports=c},2168:(e,t,n)=>{"use strict";var r=n(1221);e.exports=function(){return"object"==typeof n.g&&n.g&&n.g.Math===Math&&n.g.Array===Array?n.g:r}},9471:(e,t,n)=>{"use strict";var r=n(4289),o=n(2168);e.exports=function(){var e=o();if(r.supportsDescriptors){var t=Object.getOwnPropertyDescriptor(e,"globalThis");t&&(!t.configurable||!t.enumerable&&t.writable&&globalThis===e)||Object.defineProperty(e,"globalThis",{configurable:!0,enumerable:!1,value:e,writable:!0})}else"object"==typeof globalThis&&globalThis===e||(e.globalThis=e);return e}},1044:(e,t,n)=>{"use strict";var r=n(210)("%Object.defineProperty%",!0),o=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},1405:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(5419);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&o()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},7642:(e,t,n)=>{"use strict";var r=n(8612);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},8679:(e,t,n)=>{"use strict";var r=n(9864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function c(e){return r.isMemo(e)?s:a[e.$$typeof]||o}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var l=Object.defineProperty,u=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var s=u(n);p&&(s=s.concat(p(n)));for(var a=c(t),y=c(n),m=0;m<s.length;++m){var b=s[m];if(!(i[b]||r&&r[b]||y&&y[b]||a&&a[b])){var v=d(n,b);try{l(t,b,v)}catch(e){}}}}return t}},679:e=>{e.exports=function(e){var t={},n=[];(e=e||this).on=function(n,r,o){return(t[n]=t[n]||[]).push([r,o]),e},e.off=function(r,o){r||(t={});for(var i=t[r]||n,s=i.length=o?i.length:0;s--;)o==i[s][0]&&i.splice(s,1);return e},e.emit=function(r){for(var o,i=t[r]||n,s=i.length>0?i.slice(0,i.length):i,a=0;o=s[a++];)o[0].apply(o[1],n.slice.call(arguments,1));return e}}},631:(e,t,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,s=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=a&&c&&"function"==typeof c.get?c.get:null,u=a&&Set.prototype.forEach,p="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,y=Object.prototype.toString,m=Function.prototype.toString,b=String.prototype.match,v=String.prototype.slice,g=String.prototype.replace,O=String.prototype.toUpperCase,w=String.prototype.toLowerCase,j=RegExp.prototype.test,S=Array.prototype.concat,_=Array.prototype.join,x=Array.prototype.slice,C=Math.floor,E="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,N="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,k=Object.prototype.propertyIsEnumerable,A=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function D(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||j.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-C(-e):C(e);if(r!==e){var o=String(r),i=v.call(t,o.length+1);return g.call(o,n,"$&_")+"."+g.call(g.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return g.call(t,n,"$&_")}var R=n(4654),M=R.custom,L=$(M)?M:null;function U(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function F(e){return g.call(String(e),/"/g,"&quot;")}function B(e){return!("[object Array]"!==q(e)||I&&"object"==typeof e&&I in e)}function H(e){return!("[object RegExp]"!==q(e)||I&&"object"==typeof e&&I in e)}function $(e){if(N)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!T)return!1;try{return T.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,r,o){var a=n||{};if(z(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(z(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=!z(a,"customInspect")||a.customInspect;if("boolean"!=typeof c&&"symbol"!==c)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(z(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(z(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=a.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return G(t,a);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var O=String(t);return y?D(t,O):O}if("bigint"==typeof t){var j=String(t)+"n";return y?D(t,j):j}var C=void 0===a.depth?5:a.depth;if(void 0===r&&(r=0),r>=C&&C>0&&"object"==typeof t)return B(t)?"[Array]":"[Object]";var P,M=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=_.call(Array(e.indent+1)," ")}return{base:n,prev:_.call(Array(t+1),n)}}(a,r);if(void 0===o)o=[];else if(W(o,t)>=0)return"[Circular]";function V(t,n,i){if(n&&(o=x.call(o)).push(n),i){var s={depth:a.depth};return z(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,r+1,o)}return e(t,a,r+1,o)}if("function"==typeof t&&!H(t)){var Z=function(e){if(e.name)return e.name;var t=b.call(m.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ee=Y(t,V);return"[Function"+(Z?": "+Z:" (anonymous)")+"]"+(ee.length>0?" { "+_.call(ee,", ")+" }":"")}if($(t)){var te=N?g.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):T.call(t);return"object"!=typeof t||N?te:K(te)}if((P=t)&&"object"==typeof P&&("undefined"!=typeof HTMLElement&&P instanceof HTMLElement||"string"==typeof P.nodeName&&"function"==typeof P.getAttribute)){for(var ne="<"+w.call(String(t.nodeName)),re=t.attributes||[],oe=0;oe<re.length;oe++)ne+=" "+re[oe].name+"="+U(F(re[oe].value),"double",a);return ne+=">",t.childNodes&&t.childNodes.length&&(ne+="..."),ne+"</"+w.call(String(t.nodeName))+">"}if(B(t)){if(0===t.length)return"[]";var ie=Y(t,V);return M&&!function(e){for(var t=0;t<e.length;t++)if(W(e[t],"\n")>=0)return!1;return!0}(ie)?"["+Q(ie,M)+"]":"[ "+_.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==q(e)||I&&"object"==typeof e&&I in e)}(t)){var se=Y(t,V);return"cause"in Error.prototype||!("cause"in t)||k.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+_.call(se,", ")+" }":"{ ["+String(t)+"] "+_.call(S.call("[cause]: "+V(t.cause),se),", ")+" }"}if("object"==typeof t&&c){if(L&&"function"==typeof t[L]&&R)return R(t,{depth:C-r});if("symbol"!==c&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ae=[];return s.call(t,(function(e,n){ae.push(V(n,t,!0)+" => "+V(e,t))})),X("Map",i.call(t),ae,M)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ce=[];return u.call(t,(function(e){ce.push(V(e,t))})),X("Set",l.call(t),ce,M)}if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return J("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return J("WeakSet");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{return f.call(e),!0}catch(e){}return!1}(t))return J("WeakRef");if(function(e){return!("[object Number]"!==q(e)||I&&"object"==typeof e&&I in e)}(t))return K(V(Number(t)));if(function(e){if(!e||"object"!=typeof e||!E)return!1;try{return E.call(e),!0}catch(e){}return!1}(t))return K(V(E.call(t)));if(function(e){return!("[object Boolean]"!==q(e)||I&&"object"==typeof e&&I in e)}(t))return K(h.call(t));if(function(e){return!("[object String]"!==q(e)||I&&"object"==typeof e&&I in e)}(t))return K(V(String(t)));if(!function(e){return!("[object Date]"!==q(e)||I&&"object"==typeof e&&I in e)}(t)&&!H(t)){var le=Y(t,V),ue=A?A(t)===Object.prototype:t instanceof Object||t.constructor===Object,pe=t instanceof Object?"":"null prototype",de=!ue&&I&&Object(t)===t&&I in t?v.call(q(t),8,-1):pe?"Object":"",fe=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(de||pe?"["+_.call(S.call([],de||[],pe||[]),": ")+"] ":"");return 0===le.length?fe+"{}":M?fe+"{"+Q(le,M)+"}":fe+"{ "+_.call(le,", ")+" }"}return String(t)};var V=Object.prototype.hasOwnProperty||function(e){return e in this};function z(e,t){return V.call(e,t)}function q(e){return y.call(e)}function W(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function G(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return G(v.call(e,0,t.maxStringLength),t)+r}return U(g.call(g.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Z),"single",t)}function Z(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+O.call(t.toString(16))}function K(e){return"Object("+e+")"}function J(e){return e+" { ? }"}function X(e,t,n,r){return e+" ("+t+") {"+(r?Q(n,r):_.call(n,", "))+"}"}function Q(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+_.call(e,","+n)+"\n"+t.prev}function Y(e,t){var n=B(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=z(e,o)?t(e[o],e):""}var i,s="function"==typeof P?P(e):[];if(N){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var c in e)z(e,c)&&(n&&String(Number(c))===c&&c<e.length||N&&i["$"+c]instanceof Symbol||(j.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if("function"==typeof P)for(var l=0;l<s.length;l++)k.call(e,s[l])&&r.push("["+t(s[l])+"]: "+t(e[s[l]],e));return r}},8987:(e,t,n)=>{"use strict";var r;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,s=n(1414),a=Object.prototype.propertyIsEnumerable,c=!a.call({toString:null},"toString"),l=a.call((function(){}),"prototype"),u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},d={$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},f=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();r=function(e){var t=null!==e&&"object"==typeof e,n="[object Function]"===i.call(e),r=s(e),a=t&&"[object String]"===i.call(e),d=[];if(!t&&!n&&!r)throw new TypeError("Object.keys called on a non-object");var h=l&&n;if(a&&e.length>0&&!o.call(e,0))for(var y=0;y<e.length;++y)d.push(String(y));if(r&&e.length>0)for(var m=0;m<e.length;++m)d.push(String(m));else for(var b in e)h&&"prototype"===b||!o.call(e,b)||d.push(String(b));if(c)for(var v=function(e){if("undefined"==typeof window||!f)return p(e);try{return p(e)}catch(e){return!1}}(e),g=0;g<u.length;++g)v&&"constructor"===u[g]||!o.call(e,u[g])||d.push(u[g]);return d}}e.exports=r},2215:(e,t,n)=>{"use strict";var r=Array.prototype.slice,o=n(1414),i=Object.keys,s=i?function(e){return i(e)}:n(8987),a=Object.keys;s.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?a(r.call(e)):a(e)})}else Object.keys=s;return Object.keys||s},e.exports=s},1414:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var n=t.call(e),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),r}},8661:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Children:()=>h,Component:()=>i.Component,Fragment:()=>i.Fragment,PureComponent:()=>c,StrictMode:()=>Z,Suspense:()=>b,SuspenseList:()=>O,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>F,cloneElement:()=>V,createContext:()=>i.createContext,createElement:()=>i.createElement,createFactory:()=>H,createPortal:()=>_,createRef:()=>i.createRef,default:()=>ee,findDOMNode:()=>q,flushSync:()=>G,forwardRef:()=>d,hydrate:()=>N,isValidElement:()=>$,lazy:()=>g,memo:()=>l,render:()=>T,startTransition:()=>K,unmountComponentAtNode:()=>z,unstable_batchedUpdates:()=>W,useDeferredValue:()=>J,useInsertionEffect:()=>Q,useSyncExternalStore:()=>Y,useTransition:()=>X,version:()=>B});var r=n(9207),o={};for(const e in r)["default","createElement","createContext","createRef","Fragment","Component","startTransition","useDeferredValue","useTransition","useInsertionEffect","useSyncExternalStore","version","Children","render","hydrate","unmountComponentAtNode","createPortal","createFactory","cloneElement","isValidElement","findDOMNode","PureComponent","memo","forwardRef","flushSync","unstable_batchedUpdates","StrictMode","Suspense","SuspenseList","lazy","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED"].indexOf(e)<0&&(o[e]=()=>r[e]);n.d(t,o);var i=n(7210);function s(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function c(e){this.props=e}function l(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:a(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,i.createElement)(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(c.prototype=new i.Component).isPureReactComponent=!0,c.prototype.shouldComponentUpdate=function(e,t){return a(this.props,e)||a(this.state,t)};var u=i.options.__b;i.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),u&&u(e)};var p="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function d(e){function t(t){var n=s({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=p,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var f=function(e,t){return null==e?null:(0,i.toChildArray)((0,i.toChildArray)(e).map(t))},h={map:f,forEach:f,count:function(e){return e?(0,i.toChildArray)(e).length:0},only:function(e){var t=(0,i.toChildArray)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:i.toChildArray},y=i.options.__e;i.options.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);y(e,t,n,r)};var m=i.options.unmount;function b(){this.__u=0,this.t=null,this.__b=null}function v(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function g(e){var t,n,r;function o(o){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,i.createElement)(n,o)}return o.displayName="Lazy",o.__f=!0,o}function O(){this.u=null,this.o=null}i.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),m&&m(e)},(b.prototype=new i.Component).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=v(r.__v),i=!1,s=function(){i||(i=!0,n.__R=null,o?o(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)})),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},b.prototype.componentWillUnmount=function(){this.t=[]},b.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),t.__c.__H=null),null!=(t=s({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return e(t,n,r)}))),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&(0,i.createElement)(i.Fragment,null,e.fallback);return o&&(o.__h=null),[(0,i.createElement)(i.Fragment,null,t.__a?null:e.children),o]};var w=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function j(e){return this.getChildContext=function(){return e.context},e.children}function S(e){var t=this,n=e.i;t.componentWillUnmount=function(){(0,i.render)(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),(0,i.render)((0,i.createElement)(j,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function _(e,t){var n=(0,i.createElement)(S,{__v:e,i:t});return n.containerInfo=t,n}(O.prototype=new i.Component).__a=function(e){var t=this,n=v(t.__v),r=t.o.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),w(t,e,r)):o()};n?n(i):i()}},O.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,i.toChildArray)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},O.prototype.componentDidUpdate=O.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,n){w(e,n,t)}))};var x="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,C=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,E="undefined"!=typeof document,P=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function T(e,t,n){return null==t.__k&&(t.textContent=""),(0,i.render)(e,t),"function"==typeof n&&n(),e?e.__c:null}function N(e,t,n){return(0,i.hydrate)(e,t),"function"==typeof n&&n(),e?e.__c:null}i.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(i.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var I=i.options.event;function k(){}function A(){return this.cancelBubble}function D(){return this.defaultPrevented}i.options.event=function(e){return I&&(e=I(e)),e.persist=k,e.isPropagationStopped=A,e.isDefaultPrevented=D,e.nativeEvent=e};var R,M={configurable:!0,get:function(){return this.class}},L=i.options.vnode;i.options.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var o=-1===t.indexOf("-");for(var s in r={},n){var a=n[s];E&&"children"===s&&"noscript"===t||"value"===s&&"defaultValue"in n&&null==a||("defaultValue"===s&&"value"in n&&null==n.value?s="value":"download"===s&&!0===a?a="":/ondoubleclick/i.test(s)?s="ondblclick":/^onchange(textarea|input)/i.test(s+t)&&!P(n.type)?s="oninput":/^onfocus$/i.test(s)?s="onfocusin":/^onblur$/i.test(s)?s="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(s)?s=s.toLowerCase():o&&C.test(s)?s=s.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(s)&&(s=s.toLowerCase(),r[s]&&(s="oninputCapture")),r[s]=a)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=(0,i.toChildArray)(n.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==t&&null!=r.defaultValue&&(r.value=(0,i.toChildArray)(n.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),e.props=r,n.class!=n.className&&(M.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",M))}e.$$typeof=x,L&&L(e)};var U=i.options.__r;i.options.__r=function(e){U&&U(e),R=e.__c};var F={ReactCurrentDispatcher:{current:{readContext:function(e){return R.__n[e.__c].props.value}}}},B="17.0.2";function H(e){return i.createElement.bind(null,e)}function $(e){return!!e&&e.$$typeof===x}function V(e){return $(e)?i.cloneElement.apply(null,arguments):e}function z(e){return!!e.__k&&((0,i.render)(null,e),!0)}function q(e){return e&&(e.base||1===e.nodeType&&e)||null}var W=function(e,t){return e(t)},G=function(e,t){return e(t)},Z=i.Fragment;function K(e){e()}function J(e){return e}function X(){return[!1,K]}var Q=r.useLayoutEffect;function Y(e,t){var n=t(),o=(0,r.useState)({s:{__:n,h:t}}),i=o[0].s,s=o[1];return(0,r.useLayoutEffect)((function(){i.__=n,i.h=t,i.__!==t()&&s({s:i})}),[e,n,t]),(0,r.useEffect)((function(){return i.__!==i.h()&&s({s:i}),e((function(){i.__!==i.h()&&s({s:i})}))}),[e]),n}const ee={useState:r.useState,useReducer:r.useReducer,useEffect:r.useEffect,useLayoutEffect:r.useLayoutEffect,useInsertionEffect:r.useLayoutEffect,useTransition:X,useDeferredValue:J,useSyncExternalStore:Y,startTransition:K,useRef:r.useRef,useImperativeHandle:r.useImperativeHandle,useMemo:r.useMemo,useCallback:r.useCallback,useContext:r.useContext,useDebugValue:r.useDebugValue,version:"17.0.2",Children:h,render:T,hydrate:N,unmountComponentAtNode:z,createPortal:_,createElement:i.createElement,createContext:i.createContext,createFactory:H,cloneElement:V,createRef:i.createRef,Fragment:i.Fragment,isValidElement:$,findDOMNode:q,Component:i.Component,PureComponent:c,memo:l,forwardRef:d,flushSync:G,unstable_batchedUpdates:W,StrictMode:i.Fragment,Suspense:b,SuspenseList:O,lazy:g,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:F}},9921:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,c=n?Symbol.for("react.provider"):60109,l=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,p=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,y=n?Symbol.for("react.memo"):60115,m=n?Symbol.for("react.lazy"):60116,b=n?Symbol.for("react.block"):60121,v=n?Symbol.for("react.fundamental"):60117,g=n?Symbol.for("react.responder"):60118,O=n?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case p:case i:case a:case s:case f:return e;default:switch(e=e&&e.$$typeof){case l:case d:case m:case y:case c:return e;default:return t}}case o:return t}}}function j(e){return w(e)===p}t.AsyncMode=u,t.ConcurrentMode=p,t.ContextConsumer=l,t.ContextProvider=c,t.Element=r,t.ForwardRef=d,t.Fragment=i,t.Lazy=m,t.Memo=y,t.Portal=o,t.Profiler=a,t.StrictMode=s,t.Suspense=f,t.isAsyncMode=function(e){return j(e)||w(e)===u},t.isConcurrentMode=j,t.isContextConsumer=function(e){return w(e)===l},t.isContextProvider=function(e){return w(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===d},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===m},t.isMemo=function(e){return w(e)===y},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===a},t.isStrictMode=function(e){return w(e)===s},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===p||e===a||e===s||e===f||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===y||e.$$typeof===c||e.$$typeof===l||e.$$typeof===d||e.$$typeof===v||e.$$typeof===g||e.$$typeof===O||e.$$typeof===b)},t.typeOf=w},9864:(e,t,n)=>{"use strict";e.exports=n(9921)},6113:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Provider:()=>U,ReactReduxContext:()=>c,batch:()=>i.unstable_batchedUpdates,connect:()=>L,createDispatchHook:()=>H,createSelectorHook:()=>f,createStoreHook:()=>F,shallowEqual:()=>I,useDispatch:()=>$,useSelector:()=>h,useStore:()=>B});var r=n(1688),o=n(2798),i=n(8661);let s=function(e){e()};const a=()=>s,c=i.default.createContext(null);function l(){return(0,i.useContext)(c)}const u=()=>{throw new Error("uSES not initialized!")};let p=u;const d=(e,t)=>e===t;function f(e=c){const t=e===c?l:()=>(0,i.useContext)(e);return function(e,n=d){const{store:r,subscription:o,getServerState:s}=t(),a=p(o.addNestedSub,r.getState,s||r.getState,e,n);return(0,i.useDebugValue)(a),a}}const h=f();function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y.apply(this,arguments)}function m(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}var b=n(8679),v=n.n(b),g=n(2973);const O=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function w(e,t,n,r,{areStatesEqual:o,areOwnPropsEqual:i,areStatePropsEqual:s}){let a,c,l,u,p,d=!1;return function(f,h){return d?function(d,f){const h=!i(f,c),y=!o(d,a);return a=d,c=f,h&&y?(l=e(a,c),t.dependsOnOwnProps&&(u=t(r,c)),p=n(l,u,c),p):h?(e.dependsOnOwnProps&&(l=e(a,c)),t.dependsOnOwnProps&&(u=t(r,c)),p=n(l,u,c),p):y?function(){const t=e(a,c),r=!s(t,l);return l=t,r&&(p=n(l,u,c)),p}():p}(f,h):(a=f,c=h,l=e(a,c),u=t(r,c),p=n(l,u,c),d=!0,p)}}function j(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function S(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function _(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=S(e);let o=r(t,n);return"function"==typeof o&&(r.mapToProps=o,r.dependsOnOwnProps=S(o),o=r(t,n)),o},r}}function x(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function C(e,t,n){return y({},n,e,t)}const E={notify(){},get:()=>[]};function P(e,t){let n,r=E;function o(){s.onStateChange&&s.onStateChange()}function i(){n||(n=t?t.addNestedSub(o):e.subscribe(o),r=function(){const e=a();let t=null,n=null;return{clear(){t=null,n=null},notify(){e((()=>{let e=t;for(;e;)e.callback(),e=e.next}))},get(){let e=[],n=t;for(;n;)e.push(n),n=n.next;return e},subscribe(e){let r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}const s={addNestedSub:function(e){return i(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(n)},trySubscribe:i,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=E)},getListeners:()=>r};return s}const T="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?i.useLayoutEffect:i.useEffect;function N(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function I(e,t){if(N(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!N(e[n[r]],t[n[r]]))return!1;return!0}const k=["reactReduxForwardedRef"];let A=u;const D=[null,null];function R(e,t,n,r,o,i){e.current=r,n.current=!1,o.current&&(o.current=null,i())}function M(e,t){return e===t}const L=function(e,t,n,{pure:r,areStatesEqual:o=M,areOwnPropsEqual:s=I,areStatePropsEqual:a=I,areMergedPropsEqual:l=I,forwardRef:u=!1,context:p=c}={}){const d=p,f=function(e){return e?"function"==typeof e?_(e):x(e,"mapStateToProps"):j((()=>({})))}(e),h=function(e){return e&&"object"==typeof e?j((t=>function(e,t){const n={};for(const r in e){const o=e[r];"function"==typeof o&&(n[r]=(...e)=>t(o(...e)))}return n}(e,t))):e?"function"==typeof e?_(e):x(e,"mapDispatchToProps"):j((e=>({dispatch:e})))}(t),b=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let o,i=!1;return function(t,n,s){const a=e(t,n,s);return i?r(a,o)||(o=a):(i=!0,o=a),o}}}(e):x(e,"mergeProps"):()=>C}(n),S=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:S,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:f,initMapDispatchToProps:h,initMergeProps:b,areStatesEqual:o,areStatePropsEqual:a,areOwnPropsEqual:s,areMergedPropsEqual:l};function c(t){const[n,o,s]=(0,i.useMemo)((()=>{const{reactReduxForwardedRef:e}=t,n=m(t,k);return[t.context,e,n]}),[t]),a=(0,i.useMemo)((()=>n&&n.Consumer&&(0,g.isContextConsumer)(i.default.createElement(n.Consumer,null))?n:d),[n,d]),c=(0,i.useContext)(a),l=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),u=Boolean(c)&&Boolean(c.store),p=l?t.store:c.store,f=u?c.getServerState:p.getState,h=(0,i.useMemo)((()=>function(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:o}=t,i=m(t,O);return w(n(e,i),r(e,i),o(e,i),e,i)}(p.dispatch,r)),[p]),[b,v]=(0,i.useMemo)((()=>{if(!S)return D;const e=P(p,l?void 0:c.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[p,l,c]),j=(0,i.useMemo)((()=>l?c:y({},c,{subscription:b})),[l,c,b]),_=(0,i.useRef)(),x=(0,i.useRef)(s),C=(0,i.useRef)(),E=(0,i.useRef)(!1),N=((0,i.useRef)(!1),(0,i.useRef)(!1)),I=(0,i.useRef)();T((()=>(N.current=!0,()=>{N.current=!1})),[]);const M=(0,i.useMemo)((()=>()=>C.current&&s===x.current?C.current:h(p.getState(),s)),[p,s]),L=(0,i.useMemo)((()=>e=>b?function(e,t,n,r,o,i,s,a,c,l,u){if(!e)return()=>{};let p=!1,d=null;const f=()=>{if(p||!a.current)return;const e=t.getState();let n,f;try{n=r(e,o.current)}catch(e){f=e,d=e}f||(d=null),n===i.current?s.current||l():(i.current=n,c.current=n,s.current=!0,u())};return n.onStateChange=f,n.trySubscribe(),f(),()=>{if(p=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}(S,p,b,h,x,_,E,N,C,v,e):()=>{}),[b]);var U,F;let B;U=R,F=[x,_,E,s,C,v],T((()=>U(...F)),undefined);try{B=A(L,M,f?()=>h(f(),s):M)}catch(e){throw I.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${I.current.stack}\n\n`),e}T((()=>{I.current=void 0,C.current=void 0,_.current=B}));const H=(0,i.useMemo)((()=>i.default.createElement(e,y({},B,{ref:o}))),[o,e,B]);return(0,i.useMemo)((()=>S?i.default.createElement(a.Provider,{value:j},H):H),[a,H,j])}const p=i.default.memo(c);if(p.WrappedComponent=e,p.displayName=c.displayName=n,u){const t=i.default.forwardRef((function(e,t){return i.default.createElement(p,y({},e,{reactReduxForwardedRef:t}))}));return t.displayName=n,t.WrappedComponent=e,v()(t,e)}return v()(p,e)}},U=function({store:e,context:t,children:n,serverState:r}){const o=(0,i.useMemo)((()=>{const t=P(e);return{store:e,subscription:t,getServerState:r?()=>r:void 0}}),[e,r]),s=(0,i.useMemo)((()=>e.getState()),[e]);T((()=>{const{subscription:t}=o;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),s!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}}),[o,s]);const a=t||c;return i.default.createElement(a.Provider,{value:o},n)};function F(e=c){const t=e===c?l:()=>(0,i.useContext)(e);return function(){const{store:e}=t();return e}}const B=F();function H(e=c){const t=e===c?B:F(e);return function(){return t().dispatch}}const $=H();var V,z;V=o.useSyncExternalStoreWithSelector,p=V,(e=>{A=e})(r.useSyncExternalStore),z=i.unstable_batchedUpdates,s=z},8359:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),c=Symbol.for("react.context"),l=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy");Symbol.for("react.offscreen");Symbol.for("react.module.reference"),t.isContextConsumer=function(e){return function(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case s:case i:case p:case d:return e;default:switch(e=e&&e.$$typeof){case l:case c:case u:case h:case f:case a:return e;default:return t}}case r:return t}}}(e)===c}},2973:(e,t,n)=>{"use strict";e.exports=n(8359)},573:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createSelector:()=>c,createSelectorCreator:()=>a,createStructuredSelector:()=>l,defaultEqualityCheck:()=>o,defaultMemoize:()=>i});var r="NOT_FOUND",o=function(e,t){return e===t};function i(e,t){var n,i,s="object"==typeof t?t:{equalityCheck:t},a=s.equalityCheck,c=void 0===a?o:a,l=s.maxSize,u=void 0===l?1:l,p=s.resultEqualityCheck,d=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var r=t.length,o=0;o<r;o++)if(!e(t[o],n[o]))return!1;return!0}}(c),f=1===u?(n=d,{get:function(e){return i&&n(i.key,e)?i.value:r},put:function(e,t){i={key:e,value:t}},getEntries:function(){return i?[i]:[]},clear:function(){i=void 0}}):function(e,t){var n=[];function o(e){var o=n.findIndex((function(n){return t(e,n.key)}));if(o>-1){var i=n[o];return o>0&&(n.splice(o,1),n.unshift(i)),i.value}return r}return{get:o,put:function(t,i){o(t)===r&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(u,d);function h(){var t=f.get(arguments);if(t===r){if(t=e.apply(null,arguments),p){var n=f.getEntries(),o=n.find((function(e){return p(e.value,t)}));o&&(t=o.value)}f.put(arguments,t)}return t}return h.clearCache=function(){return f.clear()},h}function s(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var i,a=0,c={memoizeOptions:void 0},l=r.pop();if("object"==typeof l&&(c=l,l=r.pop()),"function"!=typeof l)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof l+"]");var u=c,p=u.memoizeOptions,d=void 0===p?n:p,f=Array.isArray(d)?d:[d],h=s(r),y=e.apply(void 0,[function(){return a++,l.apply(null,arguments)}].concat(f)),m=e((function(){for(var e=[],t=h.length,n=0;n<t;n++)e.push(h[n].apply(null,arguments));return i=y.apply(null,e)}));return Object.assign(m,{resultFunc:l,memoizedResultFunc:y,dependencies:h,lastResult:function(){return i},recomputations:function(){return a},resetRecomputations:function(){return a=0}}),m};return o}var c=a(i),l=function(e,t){if(void 0===t&&(t=c),"object"!=typeof e)throw new Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var n=Object.keys(e),r=t(n.map((function(t){return e[t]})),(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce((function(e,t,r){return e[n[r]]=t,e}),{})}));return r}},7478:(e,t,n)=>{"use strict";var r=n(210),o=n(1924),i=n(631),s=r("%TypeError%"),a=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),d=o("Map.prototype.get",!0),f=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),y=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new s("Side channel does not contain "+i(e))},get:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(e)return l(e,r)}else if(c){if(t)return d(t,r)}else if(n)return function(e,t){var n=y(e,t);return n&&n.value}(n,r)},has:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(e)return p(e,r)}else if(c){if(t)return h(t,r)}else if(n)return function(e,t){return!!y(e,t)}(n,r);return!1},set:function(r,o){a&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new a),u(e,r,o)):c?(t||(t=new c),f(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=y(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r}},1839:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=e.Symbol;if("function"==typeof n)if(n.observable)t=n.observable;else{t=n.for("https://github.com/benlesh/symbol-observable");try{n.observable=t}catch(e){}}else t="@@observable";return t}},868:(e,t,n)=>{e.exports=n(1839)},3240:function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0});const o=n(7844),i=n(5150),s=n(4189),a=n(7346),c=n(9141),l=n(4972),u=n(9207),p=n(6113);t.default=function(e){var{children:t,formId:n,persistData:d,onError:f,onSubmit:h,validationSchema:y}=e,m=r(e,["children","formId","persistData","onError","onSubmit","validationSchema"]);const b=(0,p.useDispatch)(),v=(0,p.useSelector)((e=>(0,c.getFormValuesByFormId)(e,{formId:n}))),[g,O]=(0,u.useState)(!1),[w,j]=(0,u.useState)({}),{isValid:S,errors:_}=(0,a.useValidations)(v,y),x=(0,u.useMemo)((()=>Object.assign(Object.assign({},_),w)),[_,w]);(0,u.useLayoutEffect)((()=>{b((0,l.registerForm)({formId:n,persistData:d}))}),[n,d,b]),(0,u.useEffect)((()=>()=>{b((0,l.deregisterForm)({formId:n}))}),[n,d,b]);const C=(0,u.useCallback)(((e,t)=>{b((0,l.updateControlValue)({formId:n,name:e,value:t}))}),[n,b]),E=(0,u.useCallback)(((e,t)=>{b((0,l.updateControlTouched)({formId:n,name:e,touched:t}))}),[b,n]),P=(0,u.useCallback)(((e,t)=>{j((n=>Object.assign(Object.assign({},n),{[e]:t})))}),[j]),T=(0,u.useCallback)((e=>{var t;e.preventDefault();const n="true"===(null===(t=e.submitter)||void 0===t?void 0:t.ariaDisabled);O(!n),!n&&S&&(b((0,i.setHasResponded)(!0)),h(v,{updateControlValue:C,setError:P}))}),[S,b,h,v,C,P]);(0,u.useEffect)((()=>{f&&f({errors:x,isSubmitted:g,isValid:0===Object.keys(x).length})}),[g,x,f]);const N=(0,u.useMemo)((()=>({formId:n,values:v,errors:x,isValid:0===Object.keys(x).length,isSubmitted:g,handleSubmit:T,validationSchema:y,updateControlValue:C,updateControlTouched:E})),[n,v,x,g,T,y,C,E]);return n?h?(0,o.jsx)(s.Provider,Object.assign({},m,{value:N},{children:t})):(console.error('"onSubmit" is required.'),null):(console.error('"formId" is required.'),null)}},3250:(e,t,n)=>{"use strict";var r=n(8661),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,a=r.useLayoutEffect,c=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return a((function(){o.value=n,o.getSnapshot=t,l(o)&&u({inst:o})}),[e,n,t]),s((function(){return l(o)&&u({inst:o}),e((function(){l(o)&&u({inst:o})}))}),[e]),c(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},139:(e,t,n)=>{"use strict";var r=n(8661),o=n(1688),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=o.useSyncExternalStore,a=r.useRef,c=r.useEffect,l=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var p=a(null);if(null===p.current){var d={hasValue:!1,value:null};p.current=d}else d=p.current;p=l((function(){function e(e){if(!c){if(c=!0,s=e,e=r(e),void 0!==o&&d.hasValue){var t=d.value;if(o(t,e))return a=t}return a=e}if(t=a,i(s,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(s=e,a=n)}var s,a,c=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]}),[t,n,r,o]);var f=s(e,p[0],p[1]);return c((function(){d.hasValue=!0,d.value=f}),[f]),u(f),f}},1688:(e,t,n)=>{"use strict";e.exports=n(3250)},2798:(e,t,n)=>{"use strict";e.exports=n(139)},3813:function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.NO_IL=t.NO=t.MemoryStream=t.Stream=void 0;var i=n(868),s=n(2503),a=i.default(s.getPolyfill()),c={};function l(){}function u(e){for(var t=e.length,n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function p(e,t,n){try{return e.f(t)}catch(e){return n._e(e),c}}t.NO=c;var d={_n:l,_e:l,_c:l};function f(e){e._start=function(e){e.next=e._n,e.error=e._e,e.complete=e._c,this.start(e)},e._stop=e.stop}t.NO_IL=d;var h=function(){function e(e,t){this._stream=e,this._listener=t}return e.prototype.unsubscribe=function(){this._stream._remove(this._listener)},e}(),y=function(){function e(e){this._listener=e}return e.prototype.next=function(e){this._listener._n(e)},e.prototype.error=function(e){this._listener._e(e)},e.prototype.complete=function(){this._listener._c()},e}(),m=function(){function e(e){this.type="fromObservable",this.ins=e,this.active=!1}return e.prototype._start=function(e){this.out=e,this.active=!0,this._sub=this.ins.subscribe(new y(e)),this.active||this._sub.unsubscribe()},e.prototype._stop=function(){this._sub&&this._sub.unsubscribe(),this.active=!1},e}(),b=function(){function e(e){this.type="merge",this.insArr=e,this.out=c,this.ac=0}return e.prototype._start=function(e){this.out=e;var t=this.insArr,n=t.length;this.ac=n;for(var r=0;r<n;r++)t[r]._add(this)},e.prototype._stop=function(){for(var e=this.insArr,t=e.length,n=0;n<t;n++)e[n]._remove(this);this.out=c},e.prototype._n=function(e){var t=this.out;t!==c&&t._n(e)},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){if(--this.ac<=0){var e=this.out;if(e===c)return;e._c()}},e}(),v=function(){function e(e,t,n){this.i=e,this.out=t,this.p=n,n.ils.push(this)}return e.prototype._n=function(e){var t=this.p,n=this.out;if(n!==c&&t.up(e,this.i)){var r=u(t.vals);n._n(r)}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.p;e.out!==c&&0==--e.Nc&&e.out._c()},e}(),g=function(){function e(e){this.type="combine",this.insArr=e,this.out=c,this.ils=[],this.Nc=this.Nn=0,this.vals=[]}return e.prototype.up=function(e,t){var n=this.vals[t],r=this.Nn?n===c?--this.Nn:this.Nn:0;return this.vals[t]=e,0===r},e.prototype._start=function(e){this.out=e;var t=this.insArr,n=this.Nc=this.Nn=t.length,r=this.vals=new Array(n);if(0===n)e._n([]),e._c();else for(var o=0;o<n;o++)r[o]=c,t[o]._add(new v(o,e,this))},e.prototype._stop=function(){for(var e=this.insArr,t=e.length,n=this.ils,r=0;r<t;r++)e[r]._remove(n[r]);this.out=c,this.ils=[],this.vals=[]},e}(),O=function(){function e(e){this.type="fromArray",this.a=e}return e.prototype._start=function(e){for(var t=this.a,n=0,r=t.length;n<r;n++)e._n(t[n]);e._c()},e.prototype._stop=function(){},e}(),w=function(){function e(e){this.type="fromPromise",this.on=!1,this.p=e}return e.prototype._start=function(e){var t=this;this.on=!0,this.p.then((function(n){t.on&&(e._n(n),e._c())}),(function(t){e._e(t)})).then(l,(function(e){setTimeout((function(){throw e}))}))},e.prototype._stop=function(){this.on=!1},e}(),j=function(){function e(e){this.type="periodic",this.period=e,this.intervalID=-1,this.i=0}return e.prototype._start=function(e){var t=this;this.intervalID=setInterval((function(){e._n(t.i++)}),this.period)},e.prototype._stop=function(){-1!==this.intervalID&&clearInterval(this.intervalID),this.intervalID=-1,this.i=0},e}(),S=function(){function e(e,t){this.type="debug",this.ins=e,this.out=c,this.s=l,this.l="","string"==typeof t?this.l=t:"function"==typeof t&&(this.s=t)}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=this.s,r=this.l;if(n!==l)try{n(e)}catch(e){t._e(e)}else r?console.log(r+":",e):console.log(e);t._n(e)}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),_=function(){function e(e,t){this.type="drop",this.ins=t,this.out=c,this.max=e,this.dropped=0}return e.prototype._start=function(e){this.out=e,this.dropped=0,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;t!==c&&this.dropped++>=this.max&&t._n(e)},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),x=function(){function e(e,t){this.out=e,this.op=t}return e.prototype._n=function(){this.op.end()},e.prototype._e=function(e){this.out._e(e)},e.prototype._c=function(){this.op.end()},e}(),C=function(){function e(e,t){this.type="endWhen",this.ins=t,this.out=c,this.o=e,this.oil=d}return e.prototype._start=function(e){this.out=e,this.o._add(this.oil=new x(e,this)),this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.o._remove(this.oil),this.out=c,this.oil=d},e.prototype.end=function(){var e=this.out;e!==c&&e._c()},e.prototype._n=function(e){var t=this.out;t!==c&&t._n(e)},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){this.end()},e}(),E=function(){function e(e,t){this.type="filter",this.ins=t,this.out=c,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=p(this,e,t);n!==c&&n&&t._n(e)}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),P=function(){function e(e,t){this.out=e,this.op=t}return e.prototype._n=function(e){this.out._n(e)},e.prototype._e=function(e){this.out._e(e)},e.prototype._c=function(){this.op.inner=c,this.op.less()},e}(),T=function(){function e(e){this.type="flatten",this.ins=e,this.out=c,this.open=!0,this.inner=c,this.il=d}return e.prototype._start=function(e){this.out=e,this.open=!0,this.inner=c,this.il=d,this.ins._add(this)},e.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=d},e.prototype.less=function(){var e=this.out;e!==c&&(this.open||this.inner!==c||e._c())},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=this.inner,r=this.il;n!==c&&r!==d&&n._remove(r),(this.inner=e)._add(this.il=new P(t,this))}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){this.open=!1,this.less()},e}(),N=function(){function e(e,t,n){var r=this;this.type="fold",this.ins=n,this.out=c,this.f=function(t){return e(r.acc,t)},this.acc=this.seed=t}return e.prototype._start=function(e){this.out=e,this.acc=this.seed,e._n(this.acc),this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c,this.acc=this.seed},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=p(this,e,t);n!==c&&t._n(this.acc=n)}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),I=function(){function e(e){this.type="last",this.ins=e,this.out=c,this.has=!1,this.val=c}return e.prototype._start=function(e){this.out=e,this.has=!1,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c,this.val=c},e.prototype._n=function(e){this.has=!0,this.val=e},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&(this.has?(e._n(this.val),e._c()):e._e(new Error("last() failed because input stream completed")))},e}(),k=function(){function e(e,t){this.type="map",this.ins=t,this.out=c,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=p(this,e,t);n!==c&&t._n(n)}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),A=function(){function e(e){this.type="remember",this.ins=e,this.out=c}return e.prototype._start=function(e){this.out=e,this.ins._add(e)},e.prototype._stop=function(){this.ins._remove(this.out),this.out=c},e}(),D=function(){function e(e,t){this.type="replaceError",this.ins=t,this.out=c,this.f=e}return e.prototype._start=function(e){this.out=e,this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;t!==c&&t._n(e)},e.prototype._e=function(e){var t=this.out;if(t!==c)try{this.ins._remove(this),(this.ins=this.f(e))._add(this)}catch(e){t._e(e)}},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),R=function(){function e(e,t){this.type="startWith",this.ins=e,this.out=c,this.val=t}return e.prototype._start=function(e){this.out=e,this.out._n(this.val),this.ins._add(e)},e.prototype._stop=function(){this.ins._remove(this.out),this.out=c},e}(),M=function(){function e(e,t){this.type="take",this.ins=t,this.out=c,this.max=e,this.taken=0}return e.prototype._start=function(e){this.out=e,this.taken=0,this.max<=0?e._c():this.ins._add(this)},e.prototype._stop=function(){this.ins._remove(this),this.out=c},e.prototype._n=function(e){var t=this.out;if(t!==c){var n=++this.taken;n<this.max?t._n(e):n===this.max&&(t._n(e),t._c())}},e.prototype._e=function(e){var t=this.out;t!==c&&t._e(e)},e.prototype._c=function(){var e=this.out;e!==c&&e._c()},e}(),L=function(){function e(e){this._prod=e||c,this._ils=[],this._stopID=c,this._dl=c,this._d=!1,this._target=null,this._err=c}return e.prototype._n=function(e){var t=this._ils,n=t.length;if(this._d&&this._dl._n(e),1==n)t[0]._n(e);else{if(0==n)return;for(var r=u(t),o=0;o<n;o++)r[o]._n(e)}},e.prototype._e=function(e){if(this._err===c){this._err=e;var t=this._ils,n=t.length;if(this._x(),this._d&&this._dl._e(e),1==n)t[0]._e(e);else{if(0==n)return;for(var r=u(t),o=0;o<n;o++)r[o]._e(e)}if(!this._d&&0==n)throw this._err}},e.prototype._c=function(){var e=this._ils,t=e.length;if(this._x(),this._d&&this._dl._c(),1==t)e[0]._c();else{if(0==t)return;for(var n=u(e),r=0;r<t;r++)n[r]._c()}},e.prototype._x=function(){0!==this._ils.length&&(this._prod!==c&&this._prod._stop(),this._err=c,this._ils=[])},e.prototype._stopNow=function(){this._prod._stop(),this._err=c,this._stopID=c},e.prototype._add=function(e){var t=this._target;if(t)return t._add(e);var n=this._ils;if(n.push(e),!(n.length>1))if(this._stopID!==c)clearTimeout(this._stopID),this._stopID=c;else{var r=this._prod;r!==c&&r._start(this)}},e.prototype._remove=function(e){var t=this,n=this._target;if(n)return n._remove(e);var r=this._ils,o=r.indexOf(e);o>-1&&(r.splice(o,1),this._prod!==c&&r.length<=0?(this._err=c,this._stopID=setTimeout((function(){return t._stopNow()}))):1===r.length&&this._pruneCycles())},e.prototype._pruneCycles=function(){this._hasNoSinks(this,[])&&this._remove(this._ils[0])},e.prototype._hasNoSinks=function(e,t){if(-1!==t.indexOf(e))return!0;if(e.out===this)return!0;if(e.out&&e.out!==c)return this._hasNoSinks(e.out,t.concat(e));if(e._ils){for(var n=0,r=e._ils.length;n<r;n++)if(!this._hasNoSinks(e._ils[n],t.concat(e)))return!1;return!0}return!1},e.prototype.ctor=function(){return this instanceof U?U:e},e.prototype.addListener=function(e){e._n=e.next||l,e._e=e.error||l,e._c=e.complete||l,this._add(e)},e.prototype.removeListener=function(e){this._remove(e)},e.prototype.subscribe=function(e){return this.addListener(e),new h(this,e)},e.prototype[a]=function(){return this},e.create=function(t){if(t){if("function"!=typeof t.start||"function"!=typeof t.stop)throw new Error("producer requires both start and stop functions");f(t)}return new e(t)},e.createWithMemory=function(e){return e&&f(e),new U(e)},e.never=function(){return new e({_start:l,_stop:l})},e.empty=function(){return new e({_start:function(e){e._c()},_stop:l})},e.throw=function(t){return new e({_start:function(e){e._e(t)},_stop:l})},e.from=function(t){if("function"==typeof t[a])return e.fromObservable(t);if("function"==typeof t.then)return e.fromPromise(t);if(Array.isArray(t))return e.fromArray(t);throw new TypeError("Type of input to from() must be an Array, Promise, or Observable")},e.of=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.fromArray(t)},e.fromArray=function(t){return new e(new O(t))},e.fromPromise=function(t){return new e(new w(t))},e.fromObservable=function(t){if(void 0!==t.endWhen)return t;var n="function"==typeof t[a]?t[a]():t;return new e(new m(n))},e.periodic=function(t){return new e(new j(t))},e.prototype._map=function(e){return new(this.ctor())(new k(e,this))},e.prototype.map=function(e){return this._map(e)},e.prototype.mapTo=function(e){var t=this.map((function(){return e}));return t._prod.type="mapTo",t},e.prototype.filter=function(t){var n,r,o=this._prod;return new e(o instanceof E?new E((n=o.f,r=t,function(e){return n(e)&&r(e)}),o.ins):new E(t,this))},e.prototype.take=function(e){return new(this.ctor())(new M(e,this))},e.prototype.drop=function(t){return new e(new _(t,this))},e.prototype.last=function(){return new e(new I(this))},e.prototype.startWith=function(e){return new U(new R(this,e))},e.prototype.endWhen=function(e){return new(this.ctor())(new C(e,this))},e.prototype.fold=function(e,t){return new U(new N(e,t,this))},e.prototype.replaceError=function(e){return new(this.ctor())(new D(e,this))},e.prototype.flatten=function(){return new e(new T(this))},e.prototype.compose=function(e){return e(this)},e.prototype.remember=function(){return new U(new A(this))},e.prototype.debug=function(e){return new(this.ctor())(new S(this,e))},e.prototype.imitate=function(e){if(e instanceof U)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=e;for(var t=this._ils,n=t.length,r=0;r<n;r++)e._add(t[r]);this._ils=[]},e.prototype.shamefullySendNext=function(e){this._n(e)},e.prototype.shamefullySendError=function(e){this._e(e)},e.prototype.shamefullySendComplete=function(){this._c()},e.prototype.setDebugListener=function(e){e?(this._d=!0,e._n=e.next||l,e._e=e.error||l,e._c=e.complete||l,this._dl=e):(this._d=!1,this._dl=c)},e.merge=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new e(new b(t))},e.combine=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new e(new g(t))},e}();t.Stream=L;var U=function(e){function t(t){var n=e.call(this,t)||this;return n._has=!1,n}return o(t,e),t.prototype._n=function(t){this._v=t,this._has=!0,e.prototype._n.call(this,t)},t.prototype._add=function(e){var t=this._target;if(t)return t._add(e);var n=this._ils;if(n.push(e),n.length>1)this._has&&e._n(this._v);else if(this._stopID!==c)this._has&&e._n(this._v),clearTimeout(this._stopID),this._stopID=c;else if(this._has)e._n(this._v);else{var r=this._prod;r!==c&&r._start(this)}},t.prototype._stopNow=function(){this._has=!1,e.prototype._stopNow.call(this)},t.prototype._x=function(){this._has=!1,e.prototype._x.call(this)},t.prototype.map=function(e){return this._map(e)},t.prototype.mapTo=function(t){return e.prototype.mapTo.call(this,t)},t.prototype.take=function(t){return e.prototype.take.call(this,t)},t.prototype.endWhen=function(t){return e.prototype.endWhen.call(this,t)},t.prototype.replaceError=function(t){return e.prototype.replaceError.call(this,t)},t.prototype.remember=function(){return this},t.prototype.debug=function(t){return e.prototype.debug.call(this,t)},t}(L);t.MemoryStream=U;var F=L;t.default=F},7210:e=>{"use strict";e.exports=require("preact")},9207:e=>{"use strict";e.exports=require("preact/hooks")},7844:e=>{"use strict";e.exports=require("preact/jsx-runtime")},4654:()=>{},3695:()=>{},4942:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:()=>r})}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r=n(5647);module.exports=r})();