@botfabrik/engine-webclient 4.90.2 → 4.90.5
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.
|
@@ -90,7 +90,7 @@ For more details see https://formatjs.github.io/docs/getting-started/message-dis
|
|
|
90
90
|
*
|
|
91
91
|
* This source code is licensed under the MIT license found in the
|
|
92
92
|
* LICENSE file in the root directory of this source tree.
|
|
93
|
-
*/var Hg;function ux(){if(Hg)return De;Hg=1;var n=typeof Symbol=="function"&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,l=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,f=n?Symbol.for("react.profiler"):60114,h=n?Symbol.for("react.provider"):60109,d=n?Symbol.for("react.context"):60110,m=n?Symbol.for("react.async_mode"):60111,g=n?Symbol.for("react.concurrent_mode"):60111,_=n?Symbol.for("react.forward_ref"):60112,E=n?Symbol.for("react.suspense"):60113,y=n?Symbol.for("react.suspense_list"):60120,x=n?Symbol.for("react.memo"):60115,T=n?Symbol.for("react.lazy"):60116,z=n?Symbol.for("react.block"):60121,N=n?Symbol.for("react.fundamental"):60117,U=n?Symbol.for("react.responder"):60118,M=n?Symbol.for("react.scope"):60119;function O(S){if(typeof S=="object"&&S!==null){var k=S.$$typeof;switch(k){case r:switch(S=S.type,S){case m:case g:case l:case f:case u:case E:return S;default:switch(S=S&&S.$$typeof,S){case d:case _:case T:case x:case h:return S;default:return k}}case i:return k}}}function R(S){return O(S)===g}return De.AsyncMode=m,De.ConcurrentMode=g,De.ContextConsumer=d,De.ContextProvider=h,De.Element=r,De.ForwardRef=_,De.Fragment=l,De.Lazy=T,De.Memo=x,De.Portal=i,De.Profiler=f,De.StrictMode=u,De.Suspense=E,De.isAsyncMode=function(S){return R(S)||O(S)===m},De.isConcurrentMode=R,De.isContextConsumer=function(S){return O(S)===d},De.isContextProvider=function(S){return O(S)===h},De.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===r},De.isForwardRef=function(S){return O(S)===_},De.isFragment=function(S){return O(S)===l},De.isLazy=function(S){return O(S)===T},De.isMemo=function(S){return O(S)===x},De.isPortal=function(S){return O(S)===i},De.isProfiler=function(S){return O(S)===f},De.isStrictMode=function(S){return O(S)===u},De.isSuspense=function(S){return O(S)===E},De.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===l||S===g||S===f||S===u||S===E||S===y||typeof S=="object"&&S!==null&&(S.$$typeof===T||S.$$typeof===x||S.$$typeof===h||S.$$typeof===d||S.$$typeof===_||S.$$typeof===N||S.$$typeof===U||S.$$typeof===M||S.$$typeof===z)},De.typeOf=O,De}var Lg;function cx(){return Lg||(Lg=1,sf.exports=ux()),sf.exports}var lf,zg;function fx(){if(zg)return lf;zg=1;var n=cx(),r={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},l={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},f={};f[n.ForwardRef]=l,f[n.Memo]=u;function h(T){return n.isMemo(T)?u:f[T.$$typeof]||r}var d=Object.defineProperty,m=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,_=Object.getOwnPropertyDescriptor,E=Object.getPrototypeOf,y=Object.prototype;function x(T,z,N){if(typeof z!="string"){if(y){var U=E(z);U&&U!==y&&x(T,U,N)}var M=m(z);g&&(M=M.concat(g(z)));for(var O=h(T),R=h(z),S=0;S<M.length;++S){var k=M[S];if(!i[k]&&!(N&&N[k])&&!(R&&R[k])&&!(O&&O[k])){var Y=_(z,k);try{d(T,k,Y)}catch{}}}}return T}return lf=x,lf}fx();var Uh=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=I.createContext(null)):I.createContext(null);Uh.Consumer;var hx=Uh.Provider,dx=hx,mx=Uh;function bo(){var n=I.useContext(mx);return bb(n),n}var ch;(function(n){n.formatDate="FormattedDate",n.formatTime="FormattedTime",n.formatNumber="FormattedNumber",n.formatList="FormattedList",n.formatDisplayName="FormattedDisplayName"})(ch||(ch={}));var fh;(function(n){n.formatDate="FormattedDateParts",n.formatTime="FormattedTimeParts",n.formatNumber="FormattedNumberParts",n.formatList="FormattedListParts"})(fh||(fh={}));function Eb(n){var r=function(i){var l=bo(),u=i.value,f=i.children,h=_o(i,["value","children"]),d=typeof u=="string"?new Date(u||0):u,m=n==="formatDate"?l.formatDateToParts(d,h):l.formatTimeToParts(d,h);return f(m)};return r.displayName=fh[n],r}function fs(n){var r=function(i){var l=bo(),u=i.value,f=i.children,h=_o(i,["value","children"]),d=l[n](u,h);if(typeof f=="function")return f(d);var m=l.textComponent||I.Fragment;return I.createElement(m,null,d)};return r.displayName=ch[n],r}function Sb(n){return n&&Object.keys(n).reduce(function(r,i){var l=n[i];return r[i]=db(l)?lx(l):l,r},{})}var kg=function(n,r,i,l){for(var u=[],f=4;f<arguments.length;f++)u[f-4]=arguments[f];var h=Sb(l),d=uh.apply(void 0,bn([n,r,i,h],u,!1));return Array.isArray(d)?sx(d):d},Gg=function(n,r){var i=n.defaultRichTextElements,l=_o(n,["defaultRichTextElements"]),u=Sb(i),f=nx(te(te(te({},vb),l),{defaultRichTextElements:u}),r),h={locale:f.locale,timeZone:f.timeZone,fallbackOnEmptyString:f.fallbackOnEmptyString,formats:f.formats,defaultLocale:f.defaultLocale,defaultFormats:f.defaultFormats,messages:f.messages,onError:f.onError,defaultRichTextElements:u};return te(te({},f),{formatMessage:kg.bind(null,h,f.formatters),$t:kg.bind(null,h,f.formatters)})};function of(n){return{locale:n.locale,timeZone:n.timeZone,fallbackOnEmptyString:n.fallbackOnEmptyString,formats:n.formats,textComponent:n.textComponent,messages:n.messages,defaultLocale:n.defaultLocale,defaultFormats:n.defaultFormats,onError:n.onError,onWarn:n.onWarn,wrapRichTextChunksInFragment:n.wrapRichTextChunksInFragment,defaultRichTextElements:n.defaultRichTextElements}}var px=function(n){Wt(r,n);function r(){var i=n!==null&&n.apply(this,arguments)||this;return i.cache=gb(),i.state={cache:i.cache,intl:Gg(of(i.props),i.cache),prevConfig:of(i.props)},i}return r.getDerivedStateFromProps=function(i,l){var u=l.prevConfig,f=l.cache,h=of(i);return ox(u,h)?null:{intl:Gg(h,f),prevConfig:h}},r.prototype.render=function(){return bb(this.state.intl),I.createElement(dx,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=vb,r}(I.PureComponent);fs("formatDate");fs("formatTime");fs("formatNumber");fs("formatList");fs("formatDisplayName");Eb("formatDate");Eb("formatTime");const gx="_app_1rj0t_1",yx={app:gx},Pa=BS,kt=HS,Tb="%[a-f0-9]{2}",qg=new RegExp("("+Tb+")|([^%]+?)","gi"),Ig=new RegExp("("+Tb+")+","gi");function hh(n,r){try{return[decodeURIComponent(n.join(""))]}catch{}if(n.length===1)return n;r=r||1;const i=n.slice(0,r),l=n.slice(r);return Array.prototype.concat.call([],hh(i),hh(l))}function _x(n){try{return decodeURIComponent(n)}catch{let r=n.match(qg)||[];for(let i=1;i<r.length;i++)n=hh(r,i).join(""),r=n.match(qg)||[];return n}}function bx(n){const r={"%FE%FF":"��","%FF%FE":"��"};let i=Ig.exec(n);for(;i;){try{r[i[0]]=decodeURIComponent(i[0])}catch{const u=_x(i[0]);u!==i[0]&&(r[i[0]]=u)}i=Ig.exec(n)}r["%C2"]="�";const l=Object.keys(r);for(const u of l)n=n.replace(new RegExp(u,"g"),r[u]);return n}function vx(n){if(typeof n!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof n+"`");try{return decodeURIComponent(n)}catch{return bx(n)}}function Ex(n,r){const i={};if(Array.isArray(r))for(const l of r){const u=Object.getOwnPropertyDescriptor(n,l);u!=null&&u.enumerable&&Object.defineProperty(i,l,u)}else for(const l of Reflect.ownKeys(n)){const u=Object.getOwnPropertyDescriptor(n,l);if(u.enumerable){const f=n[l];r(l,f,n)&&Object.defineProperty(i,l,u)}}return i}function xb(n,r){if(!(typeof n=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(n===""||r==="")return[];const i=n.indexOf(r);return i===-1?[]:[n.slice(0,i),n.slice(i+r.length)]}const Sx=n=>n==null,Tx=n=>encodeURIComponent(n).replaceAll(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),dh=Symbol("encodeFragmentIdentifier");function xx(n){switch(n.arrayFormat){case"index":return r=>(i,l)=>{const u=i.length;return l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,[Je(r,n),"[",u,"]"].join("")]:[...i,[Je(r,n),"[",Je(u,n),"]=",Je(l,n)].join("")]};case"bracket":return r=>(i,l)=>l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,[Je(r,n),"[]"].join("")]:[...i,[Je(r,n),"[]=",Je(l,n)].join("")];case"colon-list-separator":return r=>(i,l)=>l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,[Je(r,n),":list="].join("")]:[...i,[Je(r,n),":list=",Je(l,n)].join("")];case"comma":case"separator":case"bracket-separator":{const r=n.arrayFormat==="bracket-separator"?"[]=":"=";return i=>(l,u)=>u===void 0||n.skipNull&&u===null||n.skipEmptyString&&u===""?l:(u=u===null?"":u,l.length===0?[[Je(i,n),r,Je(u,n)].join("")]:[[l,Je(u,n)].join(n.arrayFormatSeparator)])}default:return r=>(i,l)=>l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,Je(r,n)]:[...i,[Je(r,n),"=",Je(l,n)].join("")]}}function Ax(n){let r;switch(n.arrayFormat){case"index":return(i,l,u)=>{if(r=/\[(\d*)]$/.exec(i),i=i.replace(/\[\d*]$/,""),!r){u[i]=l;return}u[i]===void 0&&(u[i]={}),u[i][r[1]]=l};case"bracket":return(i,l,u)=>{if(r=/(\[])$/.exec(i),i=i.replace(/\[]$/,""),!r){u[i]=l;return}if(u[i]===void 0){u[i]=[l];return}u[i]=[...u[i],l]};case"colon-list-separator":return(i,l,u)=>{if(r=/(:list)$/.exec(i),i=i.replace(/:list$/,""),!r){u[i]=l;return}if(u[i]===void 0){u[i]=[l];return}u[i]=[...u[i],l]};case"comma":case"separator":return(i,l,u)=>{const f=typeof l=="string"&&l.includes(n.arrayFormatSeparator),h=typeof l=="string"&&!f&&Fn(l,n).includes(n.arrayFormatSeparator);l=h?Fn(l,n):l;const d=f||h?l.split(n.arrayFormatSeparator).map(m=>Fn(m,n)):l===null?l:Fn(l,n);u[i]=d};case"bracket-separator":return(i,l,u)=>{const f=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!f){u[i]=l&&Fn(l,n);return}const h=l===null?[]:Fn(l,n).split(n.arrayFormatSeparator);if(u[i]===void 0){u[i]=h;return}u[i]=[...u[i],...h]};default:return(i,l,u)=>{if(u[i]===void 0){u[i]=l;return}u[i]=[...[u[i]].flat(),l]}}}function Ab(n){if(typeof n!="string"||n.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Je(n,r){return r.encode?r.strict?Tx(n):encodeURIComponent(n):n}function Fn(n,r){return r.decode?vx(n):n}function Ob(n){return Array.isArray(n)?n.sort():typeof n=="object"?Ob(Object.keys(n)).sort((r,i)=>Number(r)-Number(i)).map(r=>n[r]):n}function wb(n){const r=n.indexOf("#");return r!==-1&&(n=n.slice(0,r)),n}function Ox(n){let r="";const i=n.indexOf("#");return i!==-1&&(r=n.slice(i)),r}function Fg(n,r,i){return i==="string"&&typeof n=="string"?n:typeof i=="function"&&typeof n=="string"?i(n):i==="boolean"&&n!==null&&(n.toLowerCase()==="true"||n.toLowerCase()==="false")?n.toLowerCase()==="true":i==="boolean"&&n!==null&&(n.toLowerCase()==="1"||n.toLowerCase()==="0")?n.toLowerCase()==="1":i==="string[]"&&r.arrayFormat!=="none"&&typeof n=="string"?[n]:i==="number[]"&&r.arrayFormat!=="none"&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?[Number(n)]:i==="number"&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?Number(n):r.parseBooleans&&n!==null&&(n.toLowerCase()==="true"||n.toLowerCase()==="false")?n.toLowerCase()==="true":r.parseNumbers&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?Number(n):n}function Hh(n){n=wb(n);const r=n.indexOf("?");return r===-1?"":n.slice(r+1)}function Lh(n,r){r={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...r},Ab(r.arrayFormatSeparator);const i=Ax(r),l=Object.create(null);if(typeof n!="string"||(n=n.trim().replace(/^[?#&]/,""),!n))return l;for(const u of n.split("&")){if(u==="")continue;const f=r.decode?u.replaceAll("+"," "):u;let[h,d]=xb(f,"=");h===void 0&&(h=f),d=d===void 0?null:["comma","separator","bracket-separator"].includes(r.arrayFormat)?d:Fn(d,r),i(Fn(h,r),d,l)}for(const[u,f]of Object.entries(l))if(typeof f=="object"&&f!==null&&r.types[u]!=="string")for(const[h,d]of Object.entries(f)){const m=r.types[u]?r.types[u].replace("[]",""):void 0;f[h]=Fg(d,r,m)}else typeof f=="object"&&f!==null&&r.types[u]==="string"?l[u]=Object.values(f).join(r.arrayFormatSeparator):l[u]=Fg(f,r,r.types[u]);return r.sort===!1?l:(r.sort===!0?Object.keys(l).sort():Object.keys(l).sort(r.sort)).reduce((u,f)=>{const h=l[f];return u[f]=h&&typeof h=="object"&&!Array.isArray(h)?Ob(h):h,u},Object.create(null))}function Rb(n,r){if(!n)return"";r={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...r},Ab(r.arrayFormatSeparator);const i=h=>r.skipNull&&Sx(n[h])||r.skipEmptyString&&n[h]==="",l=xx(r),u={};for(const[h,d]of Object.entries(n))i(h)||(u[h]=d);const f=Object.keys(u);return r.sort!==!1&&f.sort(r.sort),f.map(h=>{const d=n[h];return d===void 0?"":d===null?Je(h,r):Array.isArray(d)?d.length===0&&r.arrayFormat==="bracket-separator"?Je(h,r)+"[]":d.reduce(l(h),[]).join("&"):Je(h,r)+"="+Je(d,r)}).filter(h=>h.length>0).join("&")}function Cb(n,r){var u;r={decode:!0,...r};let[i,l]=xb(n,"#");return i===void 0&&(i=n),{url:((u=i==null?void 0:i.split("?"))==null?void 0:u[0])??"",query:Lh(Hh(n),r),...r&&r.parseFragmentIdentifier&&l?{fragmentIdentifier:Fn(l,r)}:{}}}function Nb(n,r){r={encode:!0,strict:!0,[dh]:!0,...r};const i=wb(n.url).split("?")[0]||"",l=Hh(n.url),u={...Lh(l,{sort:!1}),...n.query};let f=Rb(u,r);f&&(f=`?${f}`);let h=Ox(n.url);if(typeof n.fragmentIdentifier=="string"){const d=new URL(i);d.hash=n.fragmentIdentifier,h=r[dh]?d.hash:`#${n.fragmentIdentifier}`}return`${i}${f}${h}`}function Db(n,r,i){i={parseFragmentIdentifier:!0,[dh]:!1,...i};const{url:l,query:u,fragmentIdentifier:f}=Cb(n,i);return Nb({url:l,query:Ex(u,r),fragmentIdentifier:f},i)}function wx(n,r,i){const l=Array.isArray(r)?u=>!r.includes(u):(u,f)=>!r(u,f);return Db(n,l,i)}const vo=Object.freeze(Object.defineProperty({__proto__:null,exclude:wx,extract:Hh,parse:Lh,parseUrl:Cb,pick:Db,stringify:Rb,stringifyUrl:Nb},Symbol.toStringTag,{value:"Module"}));var an={},sn={},je={},Cl={},he={},Vg;function It(){return Vg||(Vg=1,Object.defineProperty(he,"__esModule",{value:!0}),he.GUEST_LOCALE_CHANGED=he.DRAWER_CLOSE=he.DRAWER_OPEN=he.CONVERSATION_RATING_FROM_GUEST=he.TRANSCRIPT_ITEM_GUEST_REACTION=he.TRANSCRIPT_MAIL_REQUEST=he.INBOX_CONNECT_REQUEST=he.RESTART_CHAT_REQUEST=he.EVENT_TO_GUEST=he.NLU_REQUEST_EVENT=he.EXPERTS_DISCONNECTED=he.EXPERTS_DISCONNECT_REQUEST=he.EXPERTS_CONNECTED=he.EXPERTS_CONNECT_REQUEST=he.MESSAGE_TO_GUEST=he.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST=he.MESSAGE_FROM_GUEST=he.GUEST_FEEDBACK_RESPONSE=he.GUEST_DISCONNECTED=he.GUEST_CONNECTED=he.TYPING_OFF=he.TYPING_ON=void 0,he.TYPING_ON="core.typing.on",he.TYPING_OFF="core.typing.off",he.GUEST_CONNECTED="core.guest.connected",he.GUEST_DISCONNECTED="core.guest.disconnected",he.GUEST_FEEDBACK_RESPONSE="core.guest.feedback.response",he.MESSAGE_FROM_GUEST="core.message.from.guest",he.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST="core.message.without.analysis.from.guest",he.MESSAGE_TO_GUEST="core.message.to.guest",he.EXPERTS_CONNECT_REQUEST="core.experts.connect.request",he.EXPERTS_CONNECTED="core.experts.connected",he.EXPERTS_DISCONNECT_REQUEST="core.experts.disconnect.request",he.EXPERTS_DISCONNECTED="core.experts.disconnected",he.NLU_REQUEST_EVENT="core.nlu.request.event",he.EVENT_TO_GUEST="core.event.to.guest",he.RESTART_CHAT_REQUEST="core.chat.restart.request",he.INBOX_CONNECT_REQUEST="core.inbox.connect.request",he.TRANSCRIPT_MAIL_REQUEST="core.transcript.mail.request",he.TRANSCRIPT_ITEM_GUEST_REACTION="core.transcript.item.guest.reaction",he.CONVERSATION_RATING_FROM_GUEST="core.conversation.rating.from.guest",he.DRAWER_OPEN="core.drawer.open",he.DRAWER_CLOSE="core.drawer.close",he.GUEST_LOCALE_CHANGED="core.guest.locale.changed"),he}var Pg;function Rx(){if(Pg)return Cl;Pg=1,Object.defineProperty(Cl,"__esModule",{value:!0});const n=It(),r=()=>({type:n.DRAWER_CLOSE});return Cl.default=r,Cl}var Nl={},Yg;function Cx(){if(Yg)return Nl;Yg=1,Object.defineProperty(Nl,"__esModule",{value:!0});const n=It(),r=(i,l)=>({type:n.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:i,intent:l}});return Nl.default=r,Nl}var Dl={},Zg;function Nx(){if(Zg)return Dl;Zg=1,Object.defineProperty(Dl,"__esModule",{value:!0});const n=It(),r=i=>({type:n.GUEST_CONNECTED,payload:{sessionId:i}});return Dl.default=r,Dl}var Ml={},Xg;function Dx(){if(Xg)return Ml;Xg=1,Object.defineProperty(Ml,"__esModule",{value:!0});const n=It(),r=i=>({type:n.GUEST_DISCONNECTED,payload:{sessionId:i}});return Ml.default=r,Ml}var Bl={},Qg;function Mx(){if(Qg)return Bl;Qg=1,Object.defineProperty(Bl,"__esModule",{value:!0});const n=It(),r=(i,l)=>({type:n.GUEST_LOCALE_CHANGED,payload:{previousLocale:i,newLocale:l}});return Bl.default=r,Bl}var jl={},Kg;function Bx(){if(Kg)return jl;Kg=1,Object.defineProperty(jl,"__esModule",{value:!0});const n=It(),r=i=>({type:n.DRAWER_OPEN,payload:{parameters:{contentUrl:i}}});return jl.default=r,jl}var Ul={},Pe={},$g;function zh(){if($g)return Pe;$g=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.getStringRepresentationFromMessage=Pe.MessageTypeEnum=Pe.AudioMessage=Pe.FileMessage=Pe.ImageMessage=Pe.VideoMessage=Pe.MarkdownMessage=Pe.DetailMessage=Pe.TextMessage=Pe.Message=void 0;class n{constructor(E,y,x=[],T=[]){Ce(this,"type");Ce(this,"sender");Ce(this,"sources");Ce(this,"quickReplies");this.type=E,this.sender=y,this.sources=x,this.quickReplies=T}addQuickReply(E,y){this.quickReplies.push({label:E,payload:y})}}Pe.Message=n;class r extends n{constructor(y,x,T=[],z=[]){super(m.TEXT,x,T,z);Ce(this,"text");this.text=y}}Pe.TextMessage=r;class i extends n{constructor(y,x){super(m.DETAIL,x);Ce(this,"title");Ce(this,"subtitle");Ce(this,"text");Ce(this,"imageUrl");Ce(this,"itemUrl");Ce(this,"buttons");this.title=y,this.text="",this.subtitle="",this.imageUrl="",this.itemUrl="",this.buttons=[]}setImageUrl(y){this.imageUrl=y}setItemUrl(y){this.itemUrl=y}setSubtitle(y){this.subtitle=y}setText(y){this.text=y}addButton(y){this.buttons.push(y)}}Pe.DetailMessage=i;class l extends n{constructor(y,x,T=[],z=[]){super(m.MARKDOWN,x,T,z);Ce(this,"markdown");this.markdown=y}}Pe.MarkdownMessage=l;class u extends n{constructor(y,x){super(m.VIDEO,x);Ce(this,"url");this.url=y}}Pe.VideoMessage=u;class f extends n{constructor(y,x){super(m.IMAGE,x);Ce(this,"url");this.url=y}}Pe.ImageMessage=f;class h extends n{constructor(y,x){super(m.FILE,x);Ce(this,"url");this.url=y}}Pe.FileMessage=h;class d extends n{constructor(y,x){super(m.AUDIO,x);Ce(this,"url");this.url=y}}Pe.AudioMessage=d;var m;(function(_){_.TEXT="TEXT",_.DETAIL="DETAIL",_.MARKDOWN="MARKDOWN",_.VIDEO="VIDEO",_.IMAGE="IMAGE",_.FILE="FILE",_.AUDIO="AUDIO"})(m||(Pe.MessageTypeEnum=m={}));const g=_=>{switch(_.type){case m.TEXT:return _.text;case m.DETAIL:{const E=_;return`${E.title} // ${E.subtitle}`}case m.MARKDOWN:return _.markdown;case m.VIDEO:return`Video Url: ${_.url}`;case m.IMAGE:return`Image Url: ${_.url}`;case m.FILE:return`File Url: ${_.url}`;case m.AUDIO:return`Audio Url: ${_.url}`;default:throw new Error("Unknown message type "+_.type)}};return Pe.getStringRepresentationFromMessage=g,Pe}var Lt={},Jg;function kh(){if(Jg)return Lt;Jg=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.UserType=Lt.PersonUser=Lt.GuestUser=Lt.BotUser=Lt.User=void 0;class n{constructor(h,d,m,g){Ce(this,"type");Ce(this,"id");Ce(this,"name");Ce(this,"avatar");this.type=h,this.id=d,this.name=m,this.avatar=g}}Lt.User=n;class r extends n{constructor(){super(u.BOT,null,"Chatbot","bot.svg")}}Lt.BotUser=r;class i extends n{constructor(){super(u.GUEST,null,"Guest","visitor.svg")}}Lt.GuestUser=i;class l extends n{constructor(h,d,m){super(u.PERSON,h,d,m)}}Lt.PersonUser=l;var u;return function(f){f.GUEST="GUEST",f.BOT="BOT",f.PERSON="PERSON"}(u||(Lt.UserType=u={})),Lt}var Wg;function jx(){if(Wg)return Ul;Wg=1,Object.defineProperty(Ul,"__esModule",{value:!0});const n=zh(),r=kh(),i=It(),l=u=>{const f=new n.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_FROM_GUEST,message:f}};return Ul.default=l,Ul}var Hl={},ey;function Ux(){if(ey)return Hl;ey=1,Object.defineProperty(Hl,"__esModule",{value:!0});const n=zh(),r=kh(),i=It(),l=(u,f={})=>{const h=new n.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:h,payload:f}};return Hl.default=l,Hl}var Ll={},ty;function Hx(){if(ty)return Ll;ty=1,Object.defineProperty(Ll,"__esModule",{value:!0});const n=It(),r=i=>({type:n.NLU_REQUEST_EVENT,event:i});return Ll.default=r,Ll}var zl={},ny;function Lx(){if(ny)return zl;ny=1,Object.defineProperty(zl,"__esModule",{value:!0});const n=It(),r=()=>({type:n.RESTART_CHAT_REQUEST});return zl.default=r,zl}var kl={},ry;function zx(){if(ry)return kl;ry=1,Object.defineProperty(kl,"__esModule",{value:!0});const n=It(),r=i=>({type:n.MESSAGE_TO_GUEST,message:i});return kl.default=r,kl}var Gl={},ay;function kx(){if(ay)return Gl;ay=1,Object.defineProperty(Gl,"__esModule",{value:!0});const n=It(),r=(i,l)=>({type:n.TRANSCRIPT_ITEM_GUEST_REACTION,payload:{actionId:i,reaction:l}});return Gl.default=r,Gl}var iy;function Gx(){if(iy)return je;iy=1;var n=je&&je.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(je,"__esModule",{value:!0}),je.transcriptItemGuestReaction=je.sendMessageToGuest=je.restartChatRequest=je.requestNLUEvent=je.receiveTextMessageWithoutAnalysisFromGuest=je.receiveTextMessageFromGuest=je.openDrawer=je.guestLocaleChanged=je.guestDisconnected=je.guestConnected=je.feedbackFromGuestResponse=je.closeDrawer=void 0;const r=n(Rx());je.closeDrawer=r.default;const i=n(Cx());je.feedbackFromGuestResponse=i.default;const l=n(Nx());je.guestConnected=l.default;const u=n(Dx());je.guestDisconnected=u.default;const f=n(Mx());je.guestLocaleChanged=f.default;const h=n(Bx());je.openDrawer=h.default;const d=n(jx());je.receiveTextMessageFromGuest=d.default;const m=n(Ux());je.receiveTextMessageWithoutAnalysisFromGuest=m.default;const g=n(Hx());je.requestNLUEvent=g.default;const _=n(Lx());je.restartChatRequest=_.default;const E=n(zx());je.sendMessageToGuest=E.default;const y=n(kx());return je.transcriptItemGuestReaction=y.default,je}var uf={},sy;function qx(){return sy||(sy=1,Object.defineProperty(uf,"__esModule",{value:!0})),uf}var ly;function Ix(){return ly||(ly=1,function(n){var r=sn&&sn.__createBinding||(Object.create?function(f,h,d,m){m===void 0&&(m=d);var g=Object.getOwnPropertyDescriptor(h,d);(!g||("get"in g?!h.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return h[d]}}),Object.defineProperty(f,m,g)}:function(f,h,d,m){m===void 0&&(m=d),f[m]=h[d]}),i=sn&&sn.__setModuleDefault||(Object.create?function(f,h){Object.defineProperty(f,"default",{enumerable:!0,value:h})}:function(f,h){f.default=h}),l=sn&&sn.__importStar||function(){var f=function(h){return f=Object.getOwnPropertyNames||function(d){var m=[];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(m[m.length]=g);return m},f(h)};return function(h){if(h&&h.__esModule)return h;var d={};if(h!=null)for(var m=f(h),g=0;g<m.length;g++)m[g]!=="default"&&r(d,h,m[g]);return i(d,h),d}}(),u=sn&&sn.__exportStar||function(f,h){for(var d in f)d!=="default"&&!Object.prototype.hasOwnProperty.call(h,d)&&r(h,f,d)};Object.defineProperty(n,"__esModule",{value:!0}),n.ActionTypes=n.Actions=void 0,n.Actions=l(Gx()),n.ActionTypes=l(It()),u(qx(),n)}(sn)),sn}var zt={},cf={},oy;function Fx(){return oy||(oy=1,Object.defineProperty(cf,"__esModule",{value:!0})),cf}var Zi={},uy;function Vx(){if(uy)return Zi;uy=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.NullableKnowledgeBaseAdapter=void 0;class n{async createApiKnowledgeBase(i){throw new Error("Method not implemented.")}async updateApiKnowledgeBase(i,l){throw new Error("Method not implemented.")}async deleteApiKnowledgeBase(i){throw new Error("Method not implemented.")}async upsertApiKnowledgeBase(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseById(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findApiKnowledgeBases(){throw new Error("Method not implemented.")}async deleteApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findKnowledgeBaseEntries(i){throw new Error("Method not implemented.")}async createKnowledgeBaseEntry(i,l){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntry(i,l,u){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntry(i,l){throw new Error("Method not implemented.")}async upsertKnowledgeBaseEntry(i,l){throw new Error("Method not implemented.")}async retrieveKnowledgeBaseEntryConfig(i,l){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntriesIndexedBeforeDate(i,l){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryAttachments(i,l){throw new Error("Method not implemented.")}async createKnowledgeBaseEntryAttachment(i,l,u){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntryAttachment(i,l,u,f){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntryAttachment(i,l,u){throw new Error("Method not implemented.")}async setIndexingStatus(i,l){throw new Error("Method not implemented.")}async subscribeToReindex(i,l){throw new Error("Method not implemented.")}isContentTypeSupported(i){throw new Error("Method not implemented.")}registerTool(i,l){throw new Error("Method not implemented.")}async getTools(i){throw new Error("Method not implemented.")}}return Zi.NullableKnowledgeBaseAdapter=n,Zi}var cy;function Px(){if(cy)return zt;cy=1;var n=zt&&zt.__createBinding||(Object.create?function(u,f,h,d){d===void 0&&(d=h);var m=Object.getOwnPropertyDescriptor(f,h);(!m||("get"in m?!f.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return f[h]}}),Object.defineProperty(u,d,m)}:function(u,f,h,d){d===void 0&&(d=h),u[d]=f[h]}),r=zt&&zt.__setModuleDefault||(Object.create?function(u,f){Object.defineProperty(u,"default",{enumerable:!0,value:f})}:function(u,f){u.default=f}),i=zt&&zt.__importStar||function(){var u=function(f){return u=Object.getOwnPropertyNames||function(h){var d=[];for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(d[d.length]=m);return d},u(f)};return function(f){if(f&&f.__esModule)return f;var h={};if(f!=null)for(var d=u(f),m=0;m<d.length;m++)d[m]!=="default"&&n(h,f,d[m]);return r(h,f),h}}();Object.defineProperty(zt,"__esModule",{value:!0}),zt.NullableCmsAdapter=zt.KnowledgeBase=void 0,zt.KnowledgeBase=i(Fx());const l=Vx();return zt.NullableCmsAdapter={knowledgeBase:new l.NullableKnowledgeBaseAdapter},zt}var Fr={},ff={},fy;function Yx(){return fy||(fy=1,Object.defineProperty(ff,"__esModule",{value:!0})),ff}var hf={},hy;function Zx(){return hy||(hy=1,Object.defineProperty(hf,"__esModule",{value:!0})),hf}var df={},dy;function Xx(){return dy||(dy=1,Object.defineProperty(df,"__esModule",{value:!0})),df}var mf={},my;function Qx(){return my||(my=1,Object.defineProperty(mf,"__esModule",{value:!0})),mf}var Xi={},py;function Kx(){if(py)return Xi;py=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.checkMiddlewareCondition=void 0;const n=async(r,i,l)=>(Array.isArray(r)?r:[r]).reduce(async(f,h)=>await f?await h(i,l):!1,Promise.resolve(!0));return Xi.checkMiddlewareCondition=n,Xi}var pf={},gy;function $x(){return gy||(gy=1,Object.defineProperty(pf,"__esModule",{value:!0})),pf}var gf={},yy;function Jx(){return yy||(yy=1,Object.defineProperty(gf,"__esModule",{value:!0})),gf}var yf={},_y;function Wx(){return _y||(_y=1,Object.defineProperty(yf,"__esModule",{value:!0})),yf}var by;function eA(){return by||(by=1,function(n){var r=Fr&&Fr.__createBinding||(Object.create?function(l,u,f,h){h===void 0&&(h=f);var d=Object.getOwnPropertyDescriptor(u,f);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return u[f]}}),Object.defineProperty(l,h,d)}:function(l,u,f,h){h===void 0&&(h=f),l[h]=u[f]}),i=Fr&&Fr.__exportStar||function(l,u){for(var f in l)f!=="default"&&!Object.prototype.hasOwnProperty.call(u,f)&&r(u,l,f)};Object.defineProperty(n,"__esModule",{value:!0}),i(Yx(),n),i(Zx(),n),i(Xx(),n),i(Qx(),n),i(Kx(),n),i($x(),n),i(Jx(),n),i(Wx(),n)}(Fr)),Fr}var Vr={},ln={},vy;function tA(){if(vy)return ln;vy=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.ButtonTypeEnum=ln.PostbackButton=ln.UrlButton=ln.Button=void 0;class n{constructor(f,h){Ce(this,"title");Ce(this,"type");this.title=f,this.type=h}}ln.Button=n;class r extends n{constructor(h,d){super(h,l.WEB_URL);Ce(this,"url");this.url=d}}ln.UrlButton=r;class i extends n{constructor(h,d){super(h,l.POSTBACK);Ce(this,"payload");this.payload=d}}ln.PostbackButton=i;var l;return function(u){u.WEB_URL="web_url",u.POSTBACK="postback"}(l||(ln.ButtonTypeEnum=l={})),ln}var _f={},Ey;function nA(){return Ey||(Ey=1,Object.defineProperty(_f,"__esModule",{value:!0})),_f}var Qi={},Sy;function rA(){if(Sy)return Qi;Sy=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.SatisfactionEnum=void 0;var n;return function(r){r.GOOD="GOOD",r.BAD="BAD"}(n||(Qi.SatisfactionEnum=n={})),Qi}var Ty;function xy(){return Ty||(Ty=1,function(n){var r=Vr&&Vr.__createBinding||(Object.create?function(l,u,f,h){h===void 0&&(h=f);var d=Object.getOwnPropertyDescriptor(u,f);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return u[f]}}),Object.defineProperty(l,h,d)}:function(l,u,f,h){h===void 0&&(h=f),l[h]=u[f]}),i=Vr&&Vr.__exportStar||function(l,u){for(var f in l)f!=="default"&&!Object.prototype.hasOwnProperty.call(u,f)&&r(u,l,f)};Object.defineProperty(n,"__esModule",{value:!0}),i(tA(),n),i(nA(),n),i(rA(),n),i(zh(),n),i(kh(),n)}(Vr)),Vr}var Ay;function aA(){return Ay||(Ay=1,function(n){var r=an&&an.__createBinding||(Object.create?function(f,h,d,m){m===void 0&&(m=d);var g=Object.getOwnPropertyDescriptor(h,d);(!g||("get"in g?!h.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return h[d]}}),Object.defineProperty(f,m,g)}:function(f,h,d,m){m===void 0&&(m=d),f[m]=h[d]}),i=an&&an.__setModuleDefault||(Object.create?function(f,h){Object.defineProperty(f,"default",{enumerable:!0,value:h})}:function(f,h){f.default=h}),l=an&&an.__exportStar||function(f,h){for(var d in f)d!=="default"&&!Object.prototype.hasOwnProperty.call(h,d)&&r(h,f,d)},u=an&&an.__importStar||function(){var f=function(h){return f=Object.getOwnPropertyNames||function(d){var m=[];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(m[m.length]=g);return m},f(h)};return function(h){if(h&&h.__esModule)return h;var d={};if(h!=null)for(var m=f(h),g=0;g<m.length;g++)m[g]!=="default"&&r(d,h,m[g]);return i(d,h),d}}();Object.defineProperty(n,"__esModule",{value:!0}),n.Model=n.CMS=void 0,l(Ix(),n),n.CMS=u(Px()),l(eA(),n),l(xy(),n),n.Model=u(xy())}(an)),an}var Ee=aA();const Mb=n=>r=>(n.payload.type!==Ee.ActionTypes.MESSAGE_FROM_GUEST&&r(Ee.Actions.receiveTextMessageWithoutAnalysisFromGuest(n.label,n.payload)),r(n.payload)),Bb=n=>(r,i)=>{const{quickReplies:l}=i().chat,u=l.find(f=>n.toLocaleLowerCase().indexOf(f.label.toLocaleLowerCase())>-1);return r(u?Mb({...u,label:n}):Ee.Actions.receiveTextMessageFromGuest(n))},Gh="MESSAGE_TO_PARENT_PAGE",qh="RESTORE_PREVIOUS_CHAT_MESSAGES",Ih="AUDIO_MESSAGE_FROM_USER",iA="EXPORT_TRANSCRIPT",Fh="RECEIVE_SPEECH_TRANSCRIPTION",Vh="ENABLE_CONVERSATION_RATING",jb="LOAD_SOURCE_INFOS_RESPONSE",Ub="LOAD_SOURCE_INFOS_ERROR",Ph="LOAD_SOURCE_INFOS_REQUEST",Yh="CLOSE_SOURCE_INFOS",sA="webclient.get.started",Hb="webclient.window.expand",Lb="webclient.window.close",zb="webclient.transcript.pdf.download",lA=[Gh,qh,Ih,iA,Fh,Vh,Ph,Yh],oA=n=>({type:Ih,buffer:n}),uA=n=>({type:Fh,transcription:n}),cA=n=>({type:Ee.ActionTypes.TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:n}}}),fA=()=>({type:zb}),hA=({rating:n})=>({type:Vh,payload:{rating:n}}),dA=(n,r)=>({type:Ee.ActionTypes.CONVERSATION_RATING_FROM_GUEST,payload:{value:n,feedback:r}}),kb=n=>Ee.Actions.requestNLUEvent(n),mA=n=>({type:qh,messages:n}),pA=n=>{switch(n.type){case Ee.ButtonTypeEnum.WEB_URL:return Gb(n.url);case Ee.ButtonTypeEnum.POSTBACK:return n.payload;default:throw new Error(`unknown button type ${n.type}`)}},gA=n=>Gb(n),Gb=n=>({type:Gh,message:{type:"webclient.change.url",url:n}});/*! js-cookie v3.0.5 | MIT */function ql(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var l in i)n[l]=i[l]}return n}var yA={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function mh(n,r){function i(u,f,h){if(!(typeof document>"u")){h=ql({},r,h),typeof h.expires=="number"&&(h.expires=new Date(Date.now()+h.expires*864e5)),h.expires&&(h.expires=h.expires.toUTCString()),u=encodeURIComponent(u).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var m in h)h[m]&&(d+="; "+m,h[m]!==!0&&(d+="="+h[m].split(";")[0]));return document.cookie=u+"="+n.write(f,u)+d}}function l(u){if(!(typeof document>"u"||arguments.length&&!u)){for(var f=document.cookie?document.cookie.split("; "):[],h={},d=0;d<f.length;d++){var m=f[d].split("="),g=m.slice(1).join("=");try{var _=decodeURIComponent(m[0]);if(h[_]=n.read(g,_),u===_)break}catch{}}return u?h[u]:h}}return Object.create({set:i,get:l,remove:function(u,f){i(u,"",ql({},f,{expires:-1}))},withAttributes:function(u){return mh(this.converter,ql({},this.attributes,u))},withConverter:function(u){return mh(ql({},this.converter,u),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}var Il=mh(yA,{path:"/"});const ct=[];for(let n=0;n<256;++n)ct.push((n+256).toString(16).slice(1));function _A(n,r=0){return(ct[n[r+0]]+ct[n[r+1]]+ct[n[r+2]]+ct[n[r+3]]+"-"+ct[n[r+4]]+ct[n[r+5]]+"-"+ct[n[r+6]]+ct[n[r+7]]+"-"+ct[n[r+8]]+ct[n[r+9]]+"-"+ct[n[r+10]]+ct[n[r+11]]+ct[n[r+12]]+ct[n[r+13]]+ct[n[r+14]]+ct[n[r+15]]).toLowerCase()}let bf;const bA=new Uint8Array(16);function vA(){if(!bf){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");bf=crypto.getRandomValues.bind(crypto)}return bf(bA)}const EA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Oy={randomUUID:EA};function ph(n,r,i){var u;if(Oy.randomUUID&&!n)return Oy.randomUUID();n=n||{};const l=n.random??((u=n.rng)==null?void 0:u.call(n))??vA();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,_A(l)}function ft(n){return`Minified Redux error #${n}; visit https://redux.js.org/Errors?code=${n} for the full message or use the non-minified dev environment for full errors. `}var SA=typeof Symbol=="function"&&Symbol.observable||"@@observable",wy=SA,vf=()=>Math.random().toString(36).substring(7).split("").join("."),TA={INIT:`@@redux/INIT${vf()}`,REPLACE:`@@redux/REPLACE${vf()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${vf()}`},uo=TA;function Zh(n){if(typeof n!="object"||n===null)return!1;let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r||Object.getPrototypeOf(n)===null}function qb(n,r,i){if(typeof n!="function")throw new Error(ft(2));if(typeof r=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(ft(0));if(typeof r=="function"&&typeof i>"u"&&(i=r,r=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(ft(1));return i(qb)(n,r)}let l=n,u=r,f=new Map,h=f,d=0,m=!1;function g(){h===f&&(h=new Map,f.forEach((N,U)=>{h.set(U,N)}))}function _(){if(m)throw new Error(ft(3));return u}function E(N){if(typeof N!="function")throw new Error(ft(4));if(m)throw new Error(ft(5));let U=!0;g();const M=d++;return h.set(M,N),function(){if(U){if(m)throw new Error(ft(6));U=!1,g(),h.delete(M),f=null}}}function y(N){if(!Zh(N))throw new Error(ft(7));if(typeof N.type>"u")throw new Error(ft(8));if(typeof N.type!="string")throw new Error(ft(17));if(m)throw new Error(ft(9));try{m=!0,u=l(u,N)}finally{m=!1}return(f=h).forEach(M=>{M()}),N}function x(N){if(typeof N!="function")throw new Error(ft(10));l=N,y({type:uo.REPLACE})}function T(){const N=E;return{subscribe(U){if(typeof U!="object"||U===null)throw new Error(ft(11));function M(){const R=U;R.next&&R.next(_())}return M(),{unsubscribe:N(M)}},[wy](){return this}}}return y({type:uo.INIT}),{dispatch:y,subscribe:E,getState:_,replaceReducer:x,[wy]:T}}function xA(n){Object.keys(n).forEach(r=>{const i=n[r];if(typeof i(void 0,{type:uo.INIT})>"u")throw new Error(ft(12));if(typeof i(void 0,{type:uo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ft(13))})}function Ib(n){const r=Object.keys(n),i={};for(let f=0;f<r.length;f++){const h=r[f];typeof n[h]=="function"&&(i[h]=n[h])}const l=Object.keys(i);let u;try{xA(i)}catch(f){u=f}return function(h={},d){if(u)throw u;let m=!1;const g={};for(let _=0;_<l.length;_++){const E=l[_],y=i[E],x=h[E],T=y(x,d);if(typeof T>"u")throw d&&d.type,new Error(ft(14));g[E]=T,m=m||T!==x}return m=m||l.length!==Object.keys(h).length,m?g:h}}function co(...n){return n.length===0?r=>r:n.length===1?n[0]:n.reduce((r,i)=>(...l)=>r(i(...l)))}function AA(...n){return r=>(i,l)=>{const u=r(i,l);let f=()=>{throw new Error(ft(15))};const h={getState:u.getState,dispatch:(m,...g)=>f(m,...g)},d=n.map(m=>m(h));return f=co(...d)(u.dispatch),{...u,dispatch:f}}}function OA(n){return Zh(n)&&"type"in n&&typeof n.type=="string"}var Fb=Symbol.for("immer-nothing"),Ry=Symbol.for("immer-draftable"),Gt=Symbol.for("immer-state");function cn(n,...r){throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var qa=Object.getPrototypeOf;function Jr(n){return!!n&&!!n[Gt]}function Zn(n){var r;return n?Vb(n)||Array.isArray(n)||!!n[Ry]||!!((r=n.constructor)!=null&&r[Ry])||So(n)||To(n):!1}var wA=Object.prototype.constructor.toString();function Vb(n){if(!n||typeof n!="object")return!1;const r=qa(n);if(r===null)return!0;const i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object?!0:typeof i=="function"&&Function.toString.call(i)===wA}function fo(n,r){Eo(n)===0?Reflect.ownKeys(n).forEach(i=>{r(i,n[i],n)}):n.forEach((i,l)=>r(l,i,n))}function Eo(n){const r=n[Gt];return r?r.type_:Array.isArray(n)?1:So(n)?2:To(n)?3:0}function gh(n,r){return Eo(n)===2?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function Pb(n,r,i){const l=Eo(n);l===2?n.set(r,i):l===3?n.add(i):n[r]=i}function RA(n,r){return n===r?n!==0||1/n===1/r:n!==n&&r!==r}function So(n){return n instanceof Map}function To(n){return n instanceof Set}function Xr(n){return n.copy_||n.base_}function yh(n,r){if(So(n))return new Map(n);if(To(n))return new Set(n);if(Array.isArray(n))return Array.prototype.slice.call(n);const i=Vb(n);if(r===!0||r==="class_only"&&!i){const l=Object.getOwnPropertyDescriptors(n);delete l[Gt];let u=Reflect.ownKeys(l);for(let f=0;f<u.length;f++){const h=u[f],d=l[h];d.writable===!1&&(d.writable=!0,d.configurable=!0),(d.get||d.set)&&(l[h]={configurable:!0,writable:!0,enumerable:d.enumerable,value:n[h]})}return Object.create(qa(n),l)}else{const l=qa(n);if(l!==null&&i)return{...n};const u=Object.create(l);return Object.assign(u,n)}}function Xh(n,r=!1){return xo(n)||Jr(n)||!Zn(n)||(Eo(n)>1&&(n.set=n.add=n.clear=n.delete=CA),Object.freeze(n),r&&Object.entries(n).forEach(([i,l])=>Xh(l,!0))),n}function CA(){cn(2)}function xo(n){return Object.isFrozen(n)}var NA={};function Wr(n){const r=NA[n];return r||cn(0,n),r}var as;function Yb(){return as}function DA(n,r){return{drafts_:[],parent_:n,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Cy(n,r){r&&(Wr("Patches"),n.patches_=[],n.inversePatches_=[],n.patchListener_=r)}function _h(n){bh(n),n.drafts_.forEach(MA),n.drafts_=null}function bh(n){n===as&&(as=n.parent_)}function Ny(n){return as=DA(as,n)}function MA(n){const r=n[Gt];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function Dy(n,r){r.unfinalizedDrafts_=r.drafts_.length;const i=r.drafts_[0];return n!==void 0&&n!==i?(i[Gt].modified_&&(_h(r),cn(4)),Zn(n)&&(n=ho(r,n),r.parent_||mo(r,n)),r.patches_&&Wr("Patches").generateReplacementPatches_(i[Gt].base_,n,r.patches_,r.inversePatches_)):n=ho(r,i,[]),_h(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),n!==Fb?n:void 0}function ho(n,r,i){if(xo(r))return r;const l=r[Gt];if(!l)return fo(r,(u,f)=>My(n,l,r,u,f,i)),r;if(l.scope_!==n)return r;if(!l.modified_)return mo(n,l.base_,!0),l.base_;if(!l.finalized_){l.finalized_=!0,l.scope_.unfinalizedDrafts_--;const u=l.copy_;let f=u,h=!1;l.type_===3&&(f=new Set(u),u.clear(),h=!0),fo(f,(d,m)=>My(n,l,u,d,m,i,h)),mo(n,u,!1),i&&n.patches_&&Wr("Patches").generatePatches_(l,i,n.patches_,n.inversePatches_)}return l.copy_}function My(n,r,i,l,u,f,h){if(Jr(u)){const d=f&&r&&r.type_!==3&&!gh(r.assigned_,l)?f.concat(l):void 0,m=ho(n,u,d);if(Pb(i,l,m),Jr(m))n.canAutoFreeze_=!1;else return}else h&&i.add(u);if(Zn(u)&&!xo(u)){if(!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1)return;ho(n,u),(!r||!r.scope_.parent_)&&typeof l!="symbol"&&Object.prototype.propertyIsEnumerable.call(i,l)&&mo(n,u)}}function mo(n,r,i=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&Xh(r,i)}function BA(n,r){const i=Array.isArray(n),l={type_:i?1:0,scope_:r?r.scope_:Yb(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1};let u=l,f=Qh;i&&(u=[l],f=is);const{revoke:h,proxy:d}=Proxy.revocable(u,f);return l.draft_=d,l.revoke_=h,d}var Qh={get(n,r){if(r===Gt)return n;const i=Xr(n);if(!gh(i,r))return jA(n,i,r);const l=i[r];return n.finalized_||!Zn(l)?l:l===Ef(n.base_,r)?(Sf(n),n.copy_[r]=Eh(l,n)):l},has(n,r){return r in Xr(n)},ownKeys(n){return Reflect.ownKeys(Xr(n))},set(n,r,i){const l=Zb(Xr(n),r);if(l!=null&&l.set)return l.set.call(n.draft_,i),!0;if(!n.modified_){const u=Ef(Xr(n),r),f=u==null?void 0:u[Gt];if(f&&f.base_===i)return n.copy_[r]=i,n.assigned_[r]=!1,!0;if(RA(i,u)&&(i!==void 0||gh(n.base_,r)))return!0;Sf(n),vh(n)}return n.copy_[r]===i&&(i!==void 0||r in n.copy_)||Number.isNaN(i)&&Number.isNaN(n.copy_[r])||(n.copy_[r]=i,n.assigned_[r]=!0),!0},deleteProperty(n,r){return Ef(n.base_,r)!==void 0||r in n.base_?(n.assigned_[r]=!1,Sf(n),vh(n)):delete n.assigned_[r],n.copy_&&delete n.copy_[r],!0},getOwnPropertyDescriptor(n,r){const i=Xr(n),l=Reflect.getOwnPropertyDescriptor(i,r);return l&&{writable:!0,configurable:n.type_!==1||r!=="length",enumerable:l.enumerable,value:i[r]}},defineProperty(){cn(11)},getPrototypeOf(n){return qa(n.base_)},setPrototypeOf(){cn(12)}},is={};fo(Qh,(n,r)=>{is[n]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});is.deleteProperty=function(n,r){return is.set.call(this,n,r,void 0)};is.set=function(n,r,i){return Qh.set.call(this,n[0],r,i,n[0])};function Ef(n,r){const i=n[Gt];return(i?Xr(i):n)[r]}function jA(n,r,i){var u;const l=Zb(r,i);return l?"value"in l?l.value:(u=l.get)==null?void 0:u.call(n.draft_):void 0}function Zb(n,r){if(!(r in n))return;let i=qa(n);for(;i;){const l=Object.getOwnPropertyDescriptor(i,r);if(l)return l;i=qa(i)}}function vh(n){n.modified_||(n.modified_=!0,n.parent_&&vh(n.parent_))}function Sf(n){n.copy_||(n.copy_=yh(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var UA=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,i,l)=>{if(typeof r=="function"&&typeof i!="function"){const f=i;i=r;const h=this;return function(m=f,...g){return h.produce(m,_=>i.call(this,_,...g))}}typeof i!="function"&&cn(6),l!==void 0&&typeof l!="function"&&cn(7);let u;if(Zn(r)){const f=Ny(this),h=Eh(r,void 0);let d=!0;try{u=i(h),d=!1}finally{d?_h(f):bh(f)}return Cy(f,l),Dy(u,f)}else if(!r||typeof r!="object"){if(u=i(r),u===void 0&&(u=r),u===Fb&&(u=void 0),this.autoFreeze_&&Xh(u,!0),l){const f=[],h=[];Wr("Patches").generateReplacementPatches_(r,u,f,h),l(f,h)}return u}else cn(1,r)},this.produceWithPatches=(r,i)=>{if(typeof r=="function")return(h,...d)=>this.produceWithPatches(h,m=>r(m,...d));let l,u;return[this.produce(r,i,(h,d)=>{l=h,u=d}),l,u]},typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze),typeof(n==null?void 0:n.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(n.useStrictShallowCopy)}createDraft(n){Zn(n)||cn(8),Jr(n)&&(n=HA(n));const r=Ny(this),i=Eh(n,void 0);return i[Gt].isManual_=!0,bh(r),i}finishDraft(n,r){const i=n&&n[Gt];(!i||!i.isManual_)&&cn(9);const{scope_:l}=i;return Cy(l,r),Dy(void 0,l)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}applyPatches(n,r){let i;for(i=r.length-1;i>=0;i--){const u=r[i];if(u.path.length===0&&u.op==="replace"){n=u.value;break}}i>-1&&(r=r.slice(i+1));const l=Wr("Patches").applyPatches_;return Jr(n)?l(n,r):this.produce(n,u=>l(u,r))}};function Eh(n,r){const i=So(n)?Wr("MapSet").proxyMap_(n,r):To(n)?Wr("MapSet").proxySet_(n,r):BA(n,r);return(r?r.scope_:Yb()).drafts_.push(i),i}function HA(n){return Jr(n)||cn(10,n),Xb(n)}function Xb(n){if(!Zn(n)||xo(n))return n;const r=n[Gt];let i;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,i=yh(n,r.scope_.immer_.useStrictShallowCopy_)}else i=yh(n,!0);return fo(i,(l,u)=>{Pb(i,l,Xb(u))}),r&&(r.finalized_=!1),i}var qt=new UA,Qb=qt.produce;qt.produceWithPatches.bind(qt);qt.setAutoFreeze.bind(qt);qt.setUseStrictShallowCopy.bind(qt);qt.applyPatches.bind(qt);qt.createDraft.bind(qt);qt.finishDraft.bind(qt);function Kb(n){return({dispatch:i,getState:l})=>u=>f=>typeof f=="function"?f(i,l,n):u(f)}var LA=Kb(),zA=Kb,kA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?co:co.apply(null,arguments)};function By(n,r){function i(...l){if(r){let u=r(...l);if(!u)throw new Error(Vn(0));return{type:n,payload:u.payload,..."meta"in u&&{meta:u.meta},..."error"in u&&{error:u.error}}}return{type:n,payload:l[0]}}return i.toString=()=>`${n}`,i.type=n,i.match=l=>OA(l)&&l.type===n,i}var $b=class ts extends Array{constructor(...r){super(...r),Object.setPrototypeOf(this,ts.prototype)}static get[Symbol.species](){return ts}concat(...r){return super.concat.apply(this,r)}prepend(...r){return r.length===1&&Array.isArray(r[0])?new ts(...r[0].concat(this)):new ts(...r.concat(this))}};function jy(n){return Zn(n)?Qb(n,()=>{}):n}function Fl(n,r,i){return n.has(r)?n.get(r):n.set(r,i(r)).get(r)}function GA(n){return typeof n=="boolean"}var qA=()=>function(r){const{thunk:i=!0,immutableCheck:l=!0,serializableCheck:u=!0,actionCreatorCheck:f=!0}=r??{};let h=new $b;return i&&(GA(i)?h.push(LA):h.push(zA(i.extraArgument))),h},IA="RTK_autoBatch",Uy=n=>r=>{setTimeout(r,n)},FA=(n={type:"raf"})=>r=>(...i)=>{const l=r(...i);let u=!0,f=!1,h=!1;const d=new Set,m=n.type==="tick"?queueMicrotask:n.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Uy(10):n.type==="callback"?n.queueNotification:Uy(n.timeout),g=()=>{h=!1,f&&(f=!1,d.forEach(_=>_()))};return Object.assign({},l,{subscribe(_){const E=()=>u&&_(),y=l.subscribe(E);return d.add(_),()=>{y(),d.delete(_)}},dispatch(_){var E;try{return u=!((E=_==null?void 0:_.meta)!=null&&E[IA]),f=!u,f&&(h||(h=!0,m(g))),l.dispatch(_)}finally{u=!0}}})},VA=n=>function(i){const{autoBatch:l=!0}=i??{};let u=new $b(n);return l&&u.push(FA(typeof l=="object"?l:void 0)),u};function PA(n){const r=qA(),{reducer:i=void 0,middleware:l,devTools:u=!0,preloadedState:f=void 0,enhancers:h=void 0}=n||{};let d;if(typeof i=="function")d=i;else if(Zh(i))d=Ib(i);else throw new Error(Vn(1));let m;typeof l=="function"?m=l(r):m=r();let g=co;u&&(g=kA({trace:!1,...typeof u=="object"&&u}));const _=AA(...m),E=VA(_);let y=typeof h=="function"?h(E):E();const x=g(...y);return qb(d,f,x)}function Jb(n){const r={},i=[];let l;const u={addCase(f,h){const d=typeof f=="string"?f:f.type;if(!d)throw new Error(Vn(28));if(d in r)throw new Error(Vn(29));return r[d]=h,u},addMatcher(f,h){return i.push({matcher:f,reducer:h}),u},addDefaultCase(f){return l=f,u}};return n(u),[r,i,l]}function YA(n){return typeof n=="function"}function ZA(n,r){let[i,l,u]=Jb(r),f;if(YA(n))f=()=>jy(n());else{const d=jy(n);f=()=>d}function h(d=f(),m){let g=[i[m.type],...l.filter(({matcher:_})=>_(m)).map(({reducer:_})=>_)];return g.filter(_=>!!_).length===0&&(g=[u]),g.reduce((_,E)=>{if(E)if(Jr(_)){const x=E(_,m);return x===void 0?_:x}else{if(Zn(_))return Qb(_,y=>E(y,m));{const y=E(_,m);if(y===void 0){if(_===null)return _;throw Error("A case reducer on a non-draftable value must not return undefined")}return y}}return _},d)}return h.getInitialState=f,h}var XA=Symbol.for("rtk-slice-createasyncthunk");function QA(n,r){return`${n}/${r}`}function KA({creators:n}={}){var i;const r=(i=n==null?void 0:n.asyncThunk)==null?void 0:i[XA];return function(u){const{name:f,reducerPath:h=f}=u;if(!f)throw new Error(Vn(11));const d=(typeof u.reducers=="function"?u.reducers(JA()):u.reducers)||{},m=Object.keys(d),g={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},_={addCase(R,S){const k=typeof R=="string"?R:R.type;if(!k)throw new Error(Vn(12));if(k in g.sliceCaseReducersByType)throw new Error(Vn(13));return g.sliceCaseReducersByType[k]=S,_},addMatcher(R,S){return g.sliceMatchers.push({matcher:R,reducer:S}),_},exposeAction(R,S){return g.actionCreators[R]=S,_},exposeCaseReducer(R,S){return g.sliceCaseReducersByName[R]=S,_}};m.forEach(R=>{const S=d[R],k={reducerName:R,type:QA(f,R),createNotation:typeof u.reducers=="function"};eO(S)?nO(k,S,_,r):WA(k,S,_)});function E(){const[R={},S=[],k=void 0]=typeof u.extraReducers=="function"?Jb(u.extraReducers):[u.extraReducers],Y={...R,...g.sliceCaseReducersByType};return ZA(u.initialState,K=>{for(let re in Y)K.addCase(re,Y[re]);for(let re of g.sliceMatchers)K.addMatcher(re.matcher,re.reducer);for(let re of S)K.addMatcher(re.matcher,re.reducer);k&&K.addDefaultCase(k)})}const y=R=>R,x=new Map,T=new WeakMap;let z;function N(R,S){return z||(z=E()),z(R,S)}function U(){return z||(z=E()),z.getInitialState()}function M(R,S=!1){function k(K){let re=K[R];return typeof re>"u"&&S&&(re=Fl(T,k,U)),re}function Y(K=y){const re=Fl(x,S,()=>new WeakMap);return Fl(re,K,()=>{const ee={};for(const[le,ie]of Object.entries(u.selectors??{}))ee[le]=$A(ie,K,()=>Fl(T,K,U),S);return ee})}return{reducerPath:R,getSelectors:Y,get selectors(){return Y(k)},selectSlice:k}}const O={name:f,reducer:N,actions:g.actionCreators,caseReducers:g.sliceCaseReducersByName,getInitialState:U,...M(h),injectInto(R,{reducerPath:S,...k}={}){const Y=S??h;return R.inject({reducerPath:Y,reducer:N},k),{...O,...M(Y,!0)}}};return O}}function $A(n,r,i,l){function u(f,...h){let d=r(f);return typeof d>"u"&&l&&(d=i()),n(d,...h)}return u.unwrapped=n,u}var Kh=KA();function JA(){function n(r,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:r,...i}}return n.withTypes=()=>n,{reducer(r){return Object.assign({[r.name](...i){return r(...i)}}[r.name],{_reducerDefinitionType:"reducer"})},preparedReducer(r,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:r,reducer:i}},asyncThunk:n}}function WA({type:n,reducerName:r,createNotation:i},l,u){let f,h;if("reducer"in l){if(i&&!tO(l))throw new Error(Vn(17));f=l.reducer,h=l.prepare}else f=l;u.addCase(n,f).exposeCaseReducer(r,f).exposeAction(r,h?By(n,h):By(n))}function eO(n){return n._reducerDefinitionType==="asyncThunk"}function tO(n){return n._reducerDefinitionType==="reducerWithPrepare"}function nO({type:n,reducerName:r},i,l,u){if(!u)throw new Error(Vn(18));const{payloadCreator:f,fulfilled:h,pending:d,rejected:m,settled:g,options:_}=i,E=u(n,f,_);l.exposeAction(r,E),h&&l.addCase(E.fulfilled,h),d&&l.addCase(E.pending,d),m&&l.addCase(E.rejected,m),g&&l.addMatcher(E.settled,g),l.exposeCaseReducer(r,{fulfilled:h||Vl,pending:d||Vl,rejected:m||Vl,settled:g||Vl})}function Vl(){}function Vn(n){return`Minified Redux Toolkit error #${n}; visit https://redux-toolkit.js.org/Errors?code=${n} for the full message or use the non-minified dev environment for full errors. `}const rO={formValues:{}},Wb=Kh({name:"start-screen",initialState:rO,reducers:{showStartScreen(n){n.startScreenStatus="VISIBLE",n.formValues={}},startChat(n,r){n.startScreenStatus="HIDDEN",n.formValues=r.payload}}}),{startChat:aO,showStartScreen:iO}=Wb.actions,sO=Wb.reducer,ev="RESET_CHAT_STATE",lO=()=>({type:Lb}),oO=()=>({type:ev}),Hy=n=>(r,i)=>{const l=i();return r({type:Ph,payload:{chunkId:n}}),fetch(`/cms/public/vector-store/chunks/${n}`,{headers:{"Accept-Language":l.intl.locale}}).then(u=>{if(!u.ok)throw r({type:Ub}),new Error(`HTTP error! Status: ${u.status}`);return u.json()}).then(u=>{const f={...u,chunkId:n};r({type:jb,payload:f})})},uO=()=>({type:Yh}),$h="CONNECT",Jh="CONNECTING",Wh="CONNECTED",ed="DISCONNECTED",td="RECONNECTED",nd="RESTORE_SESSION_ID",Ao="START",Oo="CLEAR_SESSION_ID",cO=[$h,Jh,Wh,ed,td,nd],fO=(n,r)=>({type:$h,clientName:n,querystrings:r}),hO=n=>({type:nd,sessionId:n}),dO=()=>({type:Jh}),mO=()=>({type:Wh}),pO=()=>({type:ed}),gO=()=>({type:td}),tv=(n,r)=>(i,l)=>{const u=l().connection,f=l().startScreen.formValues;let h=u.sessionId;h===void 0&&(h=ph());let d=u.userId;if(d===void 0){const m=Il.get("bubble-chat-user-id")||Il.get("bubble-chat-userId")||Il.get("bf-webclient-userId");d=m||ph(),Il.set("bubble-chat-user-id",d)}i({type:Ao,payload:{sessionId:h,userId:d,clientName:n,querystrings:{...r,...f}}})},wo=(n,r)=>(i,l)=>{const u=l().connection.sessionId||"";if(i(yO(u)),i(oO()),l().settings.enableStartScreen)i(iO());else return i(tv(n,r))},yO=n=>({type:Oo,payload:{sessionId:n}}),et=()=>{const n=bo();return i=>{const l=n.formatMessage({id:i});return l===i?void 0:l}};var Kr=(n=>(n[n.CONNECTING=0]="CONNECTING",n[n.CONNECTED=1]="CONNECTED",n[n.RECONNECTED=2]="RECONNECTED",n[n.DISCONNECTED=3]="DISCONNECTED",n))(Kr||{}),po=(n=>(n.GUEST="GUEST",n.BOT="BOT",n.PERSON="PERSON",n))(po||{});const _O="_container_q2uun_1",bO="_chatcontent_q2uun_6",vO="_accessabilityHidden_q2uun_12",Tf={container:_O,chatcontent:bO,accessabilityHidden:vO},EO="_messageContainer_1m8fy_1",SO="_messages_1m8fy_13",Ly={messageContainer:EO,messages:SO};function Qr(){return Qr=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(n[l]=i[l])}return n},Qr.apply(this,arguments)}const TO=["children","options"],ue={blockQuote:"0",breakLine:"1",breakThematic:"2",codeBlock:"3",codeFenced:"4",codeInline:"5",footnote:"6",footnoteReference:"7",gfmTask:"8",heading:"9",headingSetext:"10",htmlBlock:"11",htmlComment:"12",htmlSelfClosing:"13",image:"14",link:"15",linkAngleBraceStyleDetector:"16",linkBareUrlDetector:"17",linkMailtoDetector:"18",newlineCoalescer:"19",orderedList:"20",paragraph:"21",ref:"22",refImage:"23",refLink:"24",table:"25",text:"27",textBolded:"28",textEmphasized:"29",textEscaped:"30",textMarked:"31",textStrikethroughed:"32",unorderedList:"33"};var zy;(function(n){n[n.MAX=0]="MAX",n[n.HIGH=1]="HIGH",n[n.MED=2]="MED",n[n.LOW=3]="LOW",n[n.MIN=4]="MIN"})(zy||(zy={}));const ky=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((n,r)=>(n[r.toLowerCase()]=r,n),{class:"className",for:"htmlFor"}),Gy={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},xO=["style","script"],AO=["src","href","data","formAction","srcDoc","action"],OO=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,wO=/mailto:/i,RO=/\n{2,}$/,nv=/^(\s*>[\s\S]*?)(?=\n\n|$)/,CO=/^ *> ?/gm,NO=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,DO=/^ {2,}\n/,MO=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,rv=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,av=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,BO=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,jO=/^(?:\n *)*\n/,UO=/\r\n?/g,HO=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,LO=/^\[\^([^\]]+)]/,zO=/\f/g,kO=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,GO=/^\s*?\[(x|\s)\]/,iv=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,sv=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,lv=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Sh=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,qO=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,ov=/^<!--[\s\S]*?(?:-->)/,IO=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Th=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,FO=/^\{.*\}$/,VO=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,PO=/^<([^ >]+@[^ >]+)>/,YO=/^<([^ >]+:\/[^ >]+)>/,ZO=/-([a-z])?/gi,uv=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,XO=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,QO=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,KO=/^\[([^\]]*)\] ?\[([^\]]*)\]/,$O=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,JO=/\t/g,WO=/(^ *\||\| *$)/g,ew=/^ *:-+: *$/,tw=/^ *:-+ *$/,nw=/^ *-+: *$/,Ro="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",rw=new RegExp(`^([*_])\\1${Ro}\\1\\1(?!\\1)`),aw=new RegExp(`^([*_])${Ro}\\1(?!\\1)`),iw=new RegExp(`^(==)${Ro}\\1`),sw=new RegExp(`^(~~)${Ro}\\1`),lw=/^\\([^0-9A-Za-z\s])/,qy=/\\([^0-9A-Za-z\s])/g,ow=/^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/,uw=/^\n+/,cw=/^([ \t]*)/,fw=/\\([^\\])/g,hw=/(?:^|\n)( *)$/,rd="(?:\\d+\\.)",ad="(?:[*+-])";function cv(n){return"( *)("+(n===1?rd:ad)+") +"}const fv=cv(1),hv=cv(2);function dv(n){return new RegExp("^"+(n===1?fv:hv))}const dw=dv(1),mw=dv(2);function mv(n){return new RegExp("^"+(n===1?fv:hv)+"[^\\n]*(?:\\n(?!\\1"+(n===1?rd:ad)+" )[^\\n]*)*(\\n|$)","gm")}const pw=mv(1),gw=mv(2);function pv(n){const r=n===1?rd:ad;return new RegExp("^( *)("+r+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+r+" (?!"+r+" ))\\n*|\\s*\\n*$)")}const gv=pv(1),yv=pv(2);function Iy(n,r){const i=r===1,l=i?gv:yv,u=i?pw:gw,f=i?dw:mw;return{match:Ia(function(h,d){const m=hw.exec(d.prevCapture);return m&&(d.list||!d.inline&&!d.simple)?l.exec(h=m[1]+h):null}),order:1,parse(h,d,m){const g=i?+h[2]:void 0,_=h[0].replace(RO,`
|
|
93
|
+
*/var Hg;function ux(){if(Hg)return De;Hg=1;var n=typeof Symbol=="function"&&Symbol.for,r=n?Symbol.for("react.element"):60103,i=n?Symbol.for("react.portal"):60106,l=n?Symbol.for("react.fragment"):60107,u=n?Symbol.for("react.strict_mode"):60108,f=n?Symbol.for("react.profiler"):60114,h=n?Symbol.for("react.provider"):60109,d=n?Symbol.for("react.context"):60110,m=n?Symbol.for("react.async_mode"):60111,g=n?Symbol.for("react.concurrent_mode"):60111,_=n?Symbol.for("react.forward_ref"):60112,E=n?Symbol.for("react.suspense"):60113,y=n?Symbol.for("react.suspense_list"):60120,x=n?Symbol.for("react.memo"):60115,T=n?Symbol.for("react.lazy"):60116,z=n?Symbol.for("react.block"):60121,N=n?Symbol.for("react.fundamental"):60117,U=n?Symbol.for("react.responder"):60118,M=n?Symbol.for("react.scope"):60119;function O(S){if(typeof S=="object"&&S!==null){var k=S.$$typeof;switch(k){case r:switch(S=S.type,S){case m:case g:case l:case f:case u:case E:return S;default:switch(S=S&&S.$$typeof,S){case d:case _:case T:case x:case h:return S;default:return k}}case i:return k}}}function R(S){return O(S)===g}return De.AsyncMode=m,De.ConcurrentMode=g,De.ContextConsumer=d,De.ContextProvider=h,De.Element=r,De.ForwardRef=_,De.Fragment=l,De.Lazy=T,De.Memo=x,De.Portal=i,De.Profiler=f,De.StrictMode=u,De.Suspense=E,De.isAsyncMode=function(S){return R(S)||O(S)===m},De.isConcurrentMode=R,De.isContextConsumer=function(S){return O(S)===d},De.isContextProvider=function(S){return O(S)===h},De.isElement=function(S){return typeof S=="object"&&S!==null&&S.$$typeof===r},De.isForwardRef=function(S){return O(S)===_},De.isFragment=function(S){return O(S)===l},De.isLazy=function(S){return O(S)===T},De.isMemo=function(S){return O(S)===x},De.isPortal=function(S){return O(S)===i},De.isProfiler=function(S){return O(S)===f},De.isStrictMode=function(S){return O(S)===u},De.isSuspense=function(S){return O(S)===E},De.isValidElementType=function(S){return typeof S=="string"||typeof S=="function"||S===l||S===g||S===f||S===u||S===E||S===y||typeof S=="object"&&S!==null&&(S.$$typeof===T||S.$$typeof===x||S.$$typeof===h||S.$$typeof===d||S.$$typeof===_||S.$$typeof===N||S.$$typeof===U||S.$$typeof===M||S.$$typeof===z)},De.typeOf=O,De}var Lg;function cx(){return Lg||(Lg=1,sf.exports=ux()),sf.exports}var lf,zg;function fx(){if(zg)return lf;zg=1;var n=cx(),r={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},l={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},f={};f[n.ForwardRef]=l,f[n.Memo]=u;function h(T){return n.isMemo(T)?u:f[T.$$typeof]||r}var d=Object.defineProperty,m=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,_=Object.getOwnPropertyDescriptor,E=Object.getPrototypeOf,y=Object.prototype;function x(T,z,N){if(typeof z!="string"){if(y){var U=E(z);U&&U!==y&&x(T,U,N)}var M=m(z);g&&(M=M.concat(g(z)));for(var O=h(T),R=h(z),S=0;S<M.length;++S){var k=M[S];if(!i[k]&&!(N&&N[k])&&!(R&&R[k])&&!(O&&O[k])){var Y=_(z,k);try{d(T,k,Y)}catch{}}}}return T}return lf=x,lf}fx();var Uh=typeof window<"u"&&!window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__?window.__REACT_INTL_CONTEXT__||(window.__REACT_INTL_CONTEXT__=I.createContext(null)):I.createContext(null);Uh.Consumer;var hx=Uh.Provider,dx=hx,mx=Uh;function bo(){var n=I.useContext(mx);return bb(n),n}var ch;(function(n){n.formatDate="FormattedDate",n.formatTime="FormattedTime",n.formatNumber="FormattedNumber",n.formatList="FormattedList",n.formatDisplayName="FormattedDisplayName"})(ch||(ch={}));var fh;(function(n){n.formatDate="FormattedDateParts",n.formatTime="FormattedTimeParts",n.formatNumber="FormattedNumberParts",n.formatList="FormattedListParts"})(fh||(fh={}));function Eb(n){var r=function(i){var l=bo(),u=i.value,f=i.children,h=_o(i,["value","children"]),d=typeof u=="string"?new Date(u||0):u,m=n==="formatDate"?l.formatDateToParts(d,h):l.formatTimeToParts(d,h);return f(m)};return r.displayName=fh[n],r}function fs(n){var r=function(i){var l=bo(),u=i.value,f=i.children,h=_o(i,["value","children"]),d=l[n](u,h);if(typeof f=="function")return f(d);var m=l.textComponent||I.Fragment;return I.createElement(m,null,d)};return r.displayName=ch[n],r}function Sb(n){return n&&Object.keys(n).reduce(function(r,i){var l=n[i];return r[i]=db(l)?lx(l):l,r},{})}var kg=function(n,r,i,l){for(var u=[],f=4;f<arguments.length;f++)u[f-4]=arguments[f];var h=Sb(l),d=uh.apply(void 0,bn([n,r,i,h],u,!1));return Array.isArray(d)?sx(d):d},Gg=function(n,r){var i=n.defaultRichTextElements,l=_o(n,["defaultRichTextElements"]),u=Sb(i),f=nx(te(te(te({},vb),l),{defaultRichTextElements:u}),r),h={locale:f.locale,timeZone:f.timeZone,fallbackOnEmptyString:f.fallbackOnEmptyString,formats:f.formats,defaultLocale:f.defaultLocale,defaultFormats:f.defaultFormats,messages:f.messages,onError:f.onError,defaultRichTextElements:u};return te(te({},f),{formatMessage:kg.bind(null,h,f.formatters),$t:kg.bind(null,h,f.formatters)})};function of(n){return{locale:n.locale,timeZone:n.timeZone,fallbackOnEmptyString:n.fallbackOnEmptyString,formats:n.formats,textComponent:n.textComponent,messages:n.messages,defaultLocale:n.defaultLocale,defaultFormats:n.defaultFormats,onError:n.onError,onWarn:n.onWarn,wrapRichTextChunksInFragment:n.wrapRichTextChunksInFragment,defaultRichTextElements:n.defaultRichTextElements}}var px=function(n){Wt(r,n);function r(){var i=n!==null&&n.apply(this,arguments)||this;return i.cache=gb(),i.state={cache:i.cache,intl:Gg(of(i.props),i.cache),prevConfig:of(i.props)},i}return r.getDerivedStateFromProps=function(i,l){var u=l.prevConfig,f=l.cache,h=of(i);return ox(u,h)?null:{intl:Gg(h,f),prevConfig:h}},r.prototype.render=function(){return bb(this.state.intl),I.createElement(dx,{value:this.state.intl},this.props.children)},r.displayName="IntlProvider",r.defaultProps=vb,r}(I.PureComponent);fs("formatDate");fs("formatTime");fs("formatNumber");fs("formatList");fs("formatDisplayName");Eb("formatDate");Eb("formatTime");const gx="_app_1rj0t_1",yx={app:gx},Pa=BS,kt=HS,Tb="%[a-f0-9]{2}",qg=new RegExp("("+Tb+")|([^%]+?)","gi"),Ig=new RegExp("("+Tb+")+","gi");function hh(n,r){try{return[decodeURIComponent(n.join(""))]}catch{}if(n.length===1)return n;r=r||1;const i=n.slice(0,r),l=n.slice(r);return Array.prototype.concat.call([],hh(i),hh(l))}function _x(n){try{return decodeURIComponent(n)}catch{let r=n.match(qg)||[];for(let i=1;i<r.length;i++)n=hh(r,i).join(""),r=n.match(qg)||[];return n}}function bx(n){const r={"%FE%FF":"��","%FF%FE":"��"};let i=Ig.exec(n);for(;i;){try{r[i[0]]=decodeURIComponent(i[0])}catch{const u=_x(i[0]);u!==i[0]&&(r[i[0]]=u)}i=Ig.exec(n)}r["%C2"]="�";const l=Object.keys(r);for(const u of l)n=n.replace(new RegExp(u,"g"),r[u]);return n}function vx(n){if(typeof n!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof n+"`");try{return decodeURIComponent(n)}catch{return bx(n)}}function Ex(n,r){const i={};if(Array.isArray(r))for(const l of r){const u=Object.getOwnPropertyDescriptor(n,l);u!=null&&u.enumerable&&Object.defineProperty(i,l,u)}else for(const l of Reflect.ownKeys(n)){const u=Object.getOwnPropertyDescriptor(n,l);if(u.enumerable){const f=n[l];r(l,f,n)&&Object.defineProperty(i,l,u)}}return i}function xb(n,r){if(!(typeof n=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(n===""||r==="")return[];const i=n.indexOf(r);return i===-1?[]:[n.slice(0,i),n.slice(i+r.length)]}const Sx=n=>n==null,Tx=n=>encodeURIComponent(n).replaceAll(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),dh=Symbol("encodeFragmentIdentifier");function xx(n){switch(n.arrayFormat){case"index":return r=>(i,l)=>{const u=i.length;return l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,[Je(r,n),"[",u,"]"].join("")]:[...i,[Je(r,n),"[",Je(u,n),"]=",Je(l,n)].join("")]};case"bracket":return r=>(i,l)=>l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,[Je(r,n),"[]"].join("")]:[...i,[Je(r,n),"[]=",Je(l,n)].join("")];case"colon-list-separator":return r=>(i,l)=>l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,[Je(r,n),":list="].join("")]:[...i,[Je(r,n),":list=",Je(l,n)].join("")];case"comma":case"separator":case"bracket-separator":{const r=n.arrayFormat==="bracket-separator"?"[]=":"=";return i=>(l,u)=>u===void 0||n.skipNull&&u===null||n.skipEmptyString&&u===""?l:(u=u===null?"":u,l.length===0?[[Je(i,n),r,Je(u,n)].join("")]:[[l,Je(u,n)].join(n.arrayFormatSeparator)])}default:return r=>(i,l)=>l===void 0||n.skipNull&&l===null||n.skipEmptyString&&l===""?i:l===null?[...i,Je(r,n)]:[...i,[Je(r,n),"=",Je(l,n)].join("")]}}function Ax(n){let r;switch(n.arrayFormat){case"index":return(i,l,u)=>{if(r=/\[(\d*)]$/.exec(i),i=i.replace(/\[\d*]$/,""),!r){u[i]=l;return}u[i]===void 0&&(u[i]={}),u[i][r[1]]=l};case"bracket":return(i,l,u)=>{if(r=/(\[])$/.exec(i),i=i.replace(/\[]$/,""),!r){u[i]=l;return}if(u[i]===void 0){u[i]=[l];return}u[i]=[...u[i],l]};case"colon-list-separator":return(i,l,u)=>{if(r=/(:list)$/.exec(i),i=i.replace(/:list$/,""),!r){u[i]=l;return}if(u[i]===void 0){u[i]=[l];return}u[i]=[...u[i],l]};case"comma":case"separator":return(i,l,u)=>{const f=typeof l=="string"&&l.includes(n.arrayFormatSeparator),h=typeof l=="string"&&!f&&Fn(l,n).includes(n.arrayFormatSeparator);l=h?Fn(l,n):l;const d=f||h?l.split(n.arrayFormatSeparator).map(m=>Fn(m,n)):l===null?l:Fn(l,n);u[i]=d};case"bracket-separator":return(i,l,u)=>{const f=/(\[])$/.test(i);if(i=i.replace(/\[]$/,""),!f){u[i]=l&&Fn(l,n);return}const h=l===null?[]:Fn(l,n).split(n.arrayFormatSeparator);if(u[i]===void 0){u[i]=h;return}u[i]=[...u[i],...h]};default:return(i,l,u)=>{if(u[i]===void 0){u[i]=l;return}u[i]=[...[u[i]].flat(),l]}}}function Ab(n){if(typeof n!="string"||n.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Je(n,r){return r.encode?r.strict?Tx(n):encodeURIComponent(n):n}function Fn(n,r){return r.decode?vx(n):n}function Ob(n){return Array.isArray(n)?n.sort():typeof n=="object"?Ob(Object.keys(n)).sort((r,i)=>Number(r)-Number(i)).map(r=>n[r]):n}function wb(n){const r=n.indexOf("#");return r!==-1&&(n=n.slice(0,r)),n}function Ox(n){let r="";const i=n.indexOf("#");return i!==-1&&(r=n.slice(i)),r}function Fg(n,r,i){return i==="string"&&typeof n=="string"?n:typeof i=="function"&&typeof n=="string"?i(n):i==="boolean"&&n!==null&&(n.toLowerCase()==="true"||n.toLowerCase()==="false")?n.toLowerCase()==="true":i==="boolean"&&n!==null&&(n.toLowerCase()==="1"||n.toLowerCase()==="0")?n.toLowerCase()==="1":i==="string[]"&&r.arrayFormat!=="none"&&typeof n=="string"?[n]:i==="number[]"&&r.arrayFormat!=="none"&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?[Number(n)]:i==="number"&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?Number(n):r.parseBooleans&&n!==null&&(n.toLowerCase()==="true"||n.toLowerCase()==="false")?n.toLowerCase()==="true":r.parseNumbers&&!Number.isNaN(Number(n))&&typeof n=="string"&&n.trim()!==""?Number(n):n}function Hh(n){n=wb(n);const r=n.indexOf("?");return r===-1?"":n.slice(r+1)}function Lh(n,r){r={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...r},Ab(r.arrayFormatSeparator);const i=Ax(r),l=Object.create(null);if(typeof n!="string"||(n=n.trim().replace(/^[?#&]/,""),!n))return l;for(const u of n.split("&")){if(u==="")continue;const f=r.decode?u.replaceAll("+"," "):u;let[h,d]=xb(f,"=");h===void 0&&(h=f),d=d===void 0?null:["comma","separator","bracket-separator"].includes(r.arrayFormat)?d:Fn(d,r),i(Fn(h,r),d,l)}for(const[u,f]of Object.entries(l))if(typeof f=="object"&&f!==null&&r.types[u]!=="string")for(const[h,d]of Object.entries(f)){const m=r.types[u]?r.types[u].replace("[]",""):void 0;f[h]=Fg(d,r,m)}else typeof f=="object"&&f!==null&&r.types[u]==="string"?l[u]=Object.values(f).join(r.arrayFormatSeparator):l[u]=Fg(f,r,r.types[u]);return r.sort===!1?l:(r.sort===!0?Object.keys(l).sort():Object.keys(l).sort(r.sort)).reduce((u,f)=>{const h=l[f];return u[f]=h&&typeof h=="object"&&!Array.isArray(h)?Ob(h):h,u},Object.create(null))}function Rb(n,r){if(!n)return"";r={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...r},Ab(r.arrayFormatSeparator);const i=h=>r.skipNull&&Sx(n[h])||r.skipEmptyString&&n[h]==="",l=xx(r),u={};for(const[h,d]of Object.entries(n))i(h)||(u[h]=d);const f=Object.keys(u);return r.sort!==!1&&f.sort(r.sort),f.map(h=>{const d=n[h];return d===void 0?"":d===null?Je(h,r):Array.isArray(d)?d.length===0&&r.arrayFormat==="bracket-separator"?Je(h,r)+"[]":d.reduce(l(h),[]).join("&"):Je(h,r)+"="+Je(d,r)}).filter(h=>h.length>0).join("&")}function Cb(n,r){var u;r={decode:!0,...r};let[i,l]=xb(n,"#");return i===void 0&&(i=n),{url:((u=i==null?void 0:i.split("?"))==null?void 0:u[0])??"",query:Lh(Hh(n),r),...r&&r.parseFragmentIdentifier&&l?{fragmentIdentifier:Fn(l,r)}:{}}}function Nb(n,r){r={encode:!0,strict:!0,[dh]:!0,...r};const i=wb(n.url).split("?")[0]||"",l=Hh(n.url),u={...Lh(l,{sort:!1}),...n.query};let f=Rb(u,r);f&&(f=`?${f}`);let h=Ox(n.url);if(typeof n.fragmentIdentifier=="string"){const d=new URL(i);d.hash=n.fragmentIdentifier,h=r[dh]?d.hash:`#${n.fragmentIdentifier}`}return`${i}${f}${h}`}function Db(n,r,i){i={parseFragmentIdentifier:!0,[dh]:!1,...i};const{url:l,query:u,fragmentIdentifier:f}=Cb(n,i);return Nb({url:l,query:Ex(u,r),fragmentIdentifier:f},i)}function wx(n,r,i){const l=Array.isArray(r)?u=>!r.includes(u):(u,f)=>!r(u,f);return Db(n,l,i)}const vo=Object.freeze(Object.defineProperty({__proto__:null,exclude:wx,extract:Hh,parse:Lh,parseUrl:Cb,pick:Db,stringify:Rb,stringifyUrl:Nb},Symbol.toStringTag,{value:"Module"}));var an={},sn={},je={},Cl={},he={},Vg;function It(){return Vg||(Vg=1,Object.defineProperty(he,"__esModule",{value:!0}),he.GUEST_LOCALE_CHANGED=he.DRAWER_CLOSE=he.DRAWER_OPEN=he.CONVERSATION_RATING_FROM_GUEST=he.TRANSCRIPT_ITEM_GUEST_REACTION=he.TRANSCRIPT_MAIL_REQUEST=he.INBOX_CONNECT_REQUEST=he.RESTART_CHAT_REQUEST=he.EVENT_TO_GUEST=he.NLU_REQUEST_EVENT=he.EXPERTS_DISCONNECTED=he.EXPERTS_DISCONNECT_REQUEST=he.EXPERTS_CONNECTED=he.EXPERTS_CONNECT_REQUEST=he.MESSAGE_TO_GUEST=he.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST=he.MESSAGE_FROM_GUEST=he.GUEST_FEEDBACK_RESPONSE=he.GUEST_DISCONNECTED=he.GUEST_CONNECTED=he.TYPING_OFF=he.TYPING_ON=void 0,he.TYPING_ON="core.typing.on",he.TYPING_OFF="core.typing.off",he.GUEST_CONNECTED="core.guest.connected",he.GUEST_DISCONNECTED="core.guest.disconnected",he.GUEST_FEEDBACK_RESPONSE="core.guest.feedback.response",he.MESSAGE_FROM_GUEST="core.message.from.guest",he.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST="core.message.without.analysis.from.guest",he.MESSAGE_TO_GUEST="core.message.to.guest",he.EXPERTS_CONNECT_REQUEST="core.experts.connect.request",he.EXPERTS_CONNECTED="core.experts.connected",he.EXPERTS_DISCONNECT_REQUEST="core.experts.disconnect.request",he.EXPERTS_DISCONNECTED="core.experts.disconnected",he.NLU_REQUEST_EVENT="core.nlu.request.event",he.EVENT_TO_GUEST="core.event.to.guest",he.RESTART_CHAT_REQUEST="core.chat.restart.request",he.INBOX_CONNECT_REQUEST="core.inbox.connect.request",he.TRANSCRIPT_MAIL_REQUEST="core.transcript.mail.request",he.TRANSCRIPT_ITEM_GUEST_REACTION="core.transcript.item.guest.reaction",he.CONVERSATION_RATING_FROM_GUEST="core.conversation.rating.from.guest",he.DRAWER_OPEN="core.drawer.open",he.DRAWER_CLOSE="core.drawer.close",he.GUEST_LOCALE_CHANGED="core.guest.locale.changed"),he}var Pg;function Rx(){if(Pg)return Cl;Pg=1,Object.defineProperty(Cl,"__esModule",{value:!0});const n=It(),r=()=>({type:n.DRAWER_CLOSE});return Cl.default=r,Cl}var Nl={},Yg;function Cx(){if(Yg)return Nl;Yg=1,Object.defineProperty(Nl,"__esModule",{value:!0});const n=It(),r=(i,l)=>({type:n.GUEST_FEEDBACK_RESPONSE,payload:{satisfaction:i,intent:l}});return Nl.default=r,Nl}var Dl={},Zg;function Nx(){if(Zg)return Dl;Zg=1,Object.defineProperty(Dl,"__esModule",{value:!0});const n=It(),r=i=>({type:n.GUEST_CONNECTED,payload:{sessionId:i}});return Dl.default=r,Dl}var Ml={},Xg;function Dx(){if(Xg)return Ml;Xg=1,Object.defineProperty(Ml,"__esModule",{value:!0});const n=It(),r=i=>({type:n.GUEST_DISCONNECTED,payload:{sessionId:i}});return Ml.default=r,Ml}var Bl={},Qg;function Mx(){if(Qg)return Bl;Qg=1,Object.defineProperty(Bl,"__esModule",{value:!0});const n=It(),r=(i,l)=>({type:n.GUEST_LOCALE_CHANGED,payload:{previousLocale:i,newLocale:l}});return Bl.default=r,Bl}var jl={},Kg;function Bx(){if(Kg)return jl;Kg=1,Object.defineProperty(jl,"__esModule",{value:!0});const n=It(),r=i=>({type:n.DRAWER_OPEN,payload:{parameters:{contentUrl:i}}});return jl.default=r,jl}var Ul={},Pe={},$g;function zh(){if($g)return Pe;$g=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.getStringRepresentationFromMessage=Pe.MessageTypeEnum=Pe.AudioMessage=Pe.FileMessage=Pe.ImageMessage=Pe.VideoMessage=Pe.MarkdownMessage=Pe.DetailMessage=Pe.TextMessage=Pe.Message=void 0;class n{constructor(E,y,x=[],T=[]){Ce(this,"type");Ce(this,"sender");Ce(this,"sources");Ce(this,"quickReplies");this.type=E,this.sender=y,this.sources=x,this.quickReplies=T}addQuickReply(E,y){this.quickReplies.push({label:E,payload:y})}}Pe.Message=n;class r extends n{constructor(y,x,T=[],z=[]){super(m.TEXT,x,T,z);Ce(this,"text");this.text=y}}Pe.TextMessage=r;class i extends n{constructor(y,x){super(m.DETAIL,x);Ce(this,"title");Ce(this,"subtitle");Ce(this,"text");Ce(this,"imageUrl");Ce(this,"itemUrl");Ce(this,"buttons");this.title=y,this.text="",this.subtitle="",this.imageUrl="",this.itemUrl="",this.buttons=[]}setImageUrl(y){this.imageUrl=y}setItemUrl(y){this.itemUrl=y}setSubtitle(y){this.subtitle=y}setText(y){this.text=y}addButton(y){this.buttons.push(y)}}Pe.DetailMessage=i;class l extends n{constructor(y,x,T=[],z=[]){super(m.MARKDOWN,x,T,z);Ce(this,"markdown");this.markdown=y}}Pe.MarkdownMessage=l;class u extends n{constructor(y,x){super(m.VIDEO,x);Ce(this,"url");this.url=y}}Pe.VideoMessage=u;class f extends n{constructor(y,x){super(m.IMAGE,x);Ce(this,"url");this.url=y}}Pe.ImageMessage=f;class h extends n{constructor(y,x){super(m.FILE,x);Ce(this,"url");this.url=y}}Pe.FileMessage=h;class d extends n{constructor(y,x){super(m.AUDIO,x);Ce(this,"url");this.url=y}}Pe.AudioMessage=d;var m;(function(_){_.TEXT="TEXT",_.DETAIL="DETAIL",_.MARKDOWN="MARKDOWN",_.VIDEO="VIDEO",_.IMAGE="IMAGE",_.FILE="FILE",_.AUDIO="AUDIO"})(m||(Pe.MessageTypeEnum=m={}));const g=_=>{switch(_.type){case m.TEXT:return _.text;case m.DETAIL:{const E=_;return`${E.title} // ${E.subtitle}`}case m.MARKDOWN:return _.markdown;case m.VIDEO:return`Video Url: ${_.url}`;case m.IMAGE:return`Image Url: ${_.url}`;case m.FILE:return`File Url: ${_.url}`;case m.AUDIO:return`Audio Url: ${_.url}`;default:throw new Error("Unknown message type "+_.type)}};return Pe.getStringRepresentationFromMessage=g,Pe}var Lt={},Jg;function kh(){if(Jg)return Lt;Jg=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.UserType=Lt.PersonUser=Lt.GuestUser=Lt.BotUser=Lt.User=void 0;class n{constructor(h,d,m,g){Ce(this,"type");Ce(this,"id");Ce(this,"name");Ce(this,"avatar");this.type=h,this.id=d,this.name=m,this.avatar=g}}Lt.User=n;class r extends n{constructor(){super(u.BOT,null,"Chatbot","bot.svg")}}Lt.BotUser=r;class i extends n{constructor(){super(u.GUEST,null,"Guest","visitor.svg")}}Lt.GuestUser=i;class l extends n{constructor(h,d,m){super(u.PERSON,h,d,m)}}Lt.PersonUser=l;var u;return function(f){f.GUEST="GUEST",f.BOT="BOT",f.PERSON="PERSON"}(u||(Lt.UserType=u={})),Lt}var Wg;function jx(){if(Wg)return Ul;Wg=1,Object.defineProperty(Ul,"__esModule",{value:!0});const n=zh(),r=kh(),i=It(),l=u=>{const f=new n.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_FROM_GUEST,message:f}};return Ul.default=l,Ul}var Hl={},ey;function Ux(){if(ey)return Hl;ey=1,Object.defineProperty(Hl,"__esModule",{value:!0});const n=zh(),r=kh(),i=It(),l=(u,f={})=>{const h=new n.TextMessage(u,new r.GuestUser);return{type:i.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:h,payload:f}};return Hl.default=l,Hl}var Ll={},ty;function Hx(){if(ty)return Ll;ty=1,Object.defineProperty(Ll,"__esModule",{value:!0});const n=It(),r=i=>({type:n.NLU_REQUEST_EVENT,event:i});return Ll.default=r,Ll}var zl={},ny;function Lx(){if(ny)return zl;ny=1,Object.defineProperty(zl,"__esModule",{value:!0});const n=It(),r=()=>({type:n.RESTART_CHAT_REQUEST});return zl.default=r,zl}var kl={},ry;function zx(){if(ry)return kl;ry=1,Object.defineProperty(kl,"__esModule",{value:!0});const n=It(),r=i=>({type:n.MESSAGE_TO_GUEST,message:i});return kl.default=r,kl}var Gl={},ay;function kx(){if(ay)return Gl;ay=1,Object.defineProperty(Gl,"__esModule",{value:!0});const n=It(),r=(i,l)=>({type:n.TRANSCRIPT_ITEM_GUEST_REACTION,payload:{actionId:i,reaction:l}});return Gl.default=r,Gl}var iy;function Gx(){if(iy)return je;iy=1;var n=je&&je.__importDefault||function(x){return x&&x.__esModule?x:{default:x}};Object.defineProperty(je,"__esModule",{value:!0}),je.transcriptItemGuestReaction=je.sendMessageToGuest=je.restartChatRequest=je.requestNLUEvent=je.receiveTextMessageWithoutAnalysisFromGuest=je.receiveTextMessageFromGuest=je.openDrawer=je.guestLocaleChanged=je.guestDisconnected=je.guestConnected=je.feedbackFromGuestResponse=je.closeDrawer=void 0;const r=n(Rx());je.closeDrawer=r.default;const i=n(Cx());je.feedbackFromGuestResponse=i.default;const l=n(Nx());je.guestConnected=l.default;const u=n(Dx());je.guestDisconnected=u.default;const f=n(Mx());je.guestLocaleChanged=f.default;const h=n(Bx());je.openDrawer=h.default;const d=n(jx());je.receiveTextMessageFromGuest=d.default;const m=n(Ux());je.receiveTextMessageWithoutAnalysisFromGuest=m.default;const g=n(Hx());je.requestNLUEvent=g.default;const _=n(Lx());je.restartChatRequest=_.default;const E=n(zx());je.sendMessageToGuest=E.default;const y=n(kx());return je.transcriptItemGuestReaction=y.default,je}var uf={},sy;function qx(){return sy||(sy=1,Object.defineProperty(uf,"__esModule",{value:!0})),uf}var ly;function Ix(){return ly||(ly=1,function(n){var r=sn&&sn.__createBinding||(Object.create?function(f,h,d,m){m===void 0&&(m=d);var g=Object.getOwnPropertyDescriptor(h,d);(!g||("get"in g?!h.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return h[d]}}),Object.defineProperty(f,m,g)}:function(f,h,d,m){m===void 0&&(m=d),f[m]=h[d]}),i=sn&&sn.__setModuleDefault||(Object.create?function(f,h){Object.defineProperty(f,"default",{enumerable:!0,value:h})}:function(f,h){f.default=h}),l=sn&&sn.__importStar||function(){var f=function(h){return f=Object.getOwnPropertyNames||function(d){var m=[];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(m[m.length]=g);return m},f(h)};return function(h){if(h&&h.__esModule)return h;var d={};if(h!=null)for(var m=f(h),g=0;g<m.length;g++)m[g]!=="default"&&r(d,h,m[g]);return i(d,h),d}}(),u=sn&&sn.__exportStar||function(f,h){for(var d in f)d!=="default"&&!Object.prototype.hasOwnProperty.call(h,d)&&r(h,f,d)};Object.defineProperty(n,"__esModule",{value:!0}),n.ActionTypes=n.Actions=void 0,n.Actions=l(Gx()),n.ActionTypes=l(It()),u(qx(),n)}(sn)),sn}var zt={},cf={},oy;function Fx(){return oy||(oy=1,Object.defineProperty(cf,"__esModule",{value:!0})),cf}var Zi={},uy;function Vx(){if(uy)return Zi;uy=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.NullableKnowledgeBaseAdapter=void 0;class n{async createApiKnowledgeBase(i){throw new Error("Method not implemented.")}async updateApiKnowledgeBase(i,l){throw new Error("Method not implemented.")}async deleteApiKnowledgeBase(i){throw new Error("Method not implemented.")}async upsertApiKnowledgeBase(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseById(i){throw new Error("Method not implemented.")}async findApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findApiKnowledgeBases(){throw new Error("Method not implemented.")}async deleteApiKnowledgeBaseByName(i){throw new Error("Method not implemented.")}async findKnowledgeBaseEntries(i){throw new Error("Method not implemented.")}async createKnowledgeBaseEntry(i,l){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntry(i,l,u){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntry(i,l){throw new Error("Method not implemented.")}async upsertKnowledgeBaseEntry(i,l){throw new Error("Method not implemented.")}async retrieveKnowledgeBaseEntryConfig(i,l){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryByUriAlias(i,l){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntriesIndexedBeforeDate(i,l){throw new Error("Method not implemented.")}async findKnowledgeBaseEntryAttachments(i,l){throw new Error("Method not implemented.")}async createKnowledgeBaseEntryAttachment(i,l,u){throw new Error("Method not implemented.")}async updateKnowledgeBaseEntryAttachment(i,l,u,f){throw new Error("Method not implemented.")}async deleteKnowledgeBaseEntryAttachment(i,l,u){throw new Error("Method not implemented.")}async setIndexingStatus(i,l){throw new Error("Method not implemented.")}async subscribeToReindex(i,l){throw new Error("Method not implemented.")}isContentTypeSupported(i){throw new Error("Method not implemented.")}registerTool(i,l){throw new Error("Method not implemented.")}async getTools(i){throw new Error("Method not implemented.")}}return Zi.NullableKnowledgeBaseAdapter=n,Zi}var cy;function Px(){if(cy)return zt;cy=1;var n=zt&&zt.__createBinding||(Object.create?function(u,f,h,d){d===void 0&&(d=h);var m=Object.getOwnPropertyDescriptor(f,h);(!m||("get"in m?!f.__esModule:m.writable||m.configurable))&&(m={enumerable:!0,get:function(){return f[h]}}),Object.defineProperty(u,d,m)}:function(u,f,h,d){d===void 0&&(d=h),u[d]=f[h]}),r=zt&&zt.__setModuleDefault||(Object.create?function(u,f){Object.defineProperty(u,"default",{enumerable:!0,value:f})}:function(u,f){u.default=f}),i=zt&&zt.__importStar||function(){var u=function(f){return u=Object.getOwnPropertyNames||function(h){var d=[];for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(d[d.length]=m);return d},u(f)};return function(f){if(f&&f.__esModule)return f;var h={};if(f!=null)for(var d=u(f),m=0;m<d.length;m++)d[m]!=="default"&&n(h,f,d[m]);return r(h,f),h}}();Object.defineProperty(zt,"__esModule",{value:!0}),zt.NullableCmsAdapter=zt.KnowledgeBase=void 0,zt.KnowledgeBase=i(Fx());const l=Vx();return zt.NullableCmsAdapter={knowledgeBase:new l.NullableKnowledgeBaseAdapter},zt}var Fr={},ff={},fy;function Yx(){return fy||(fy=1,Object.defineProperty(ff,"__esModule",{value:!0})),ff}var hf={},hy;function Zx(){return hy||(hy=1,Object.defineProperty(hf,"__esModule",{value:!0})),hf}var df={},dy;function Xx(){return dy||(dy=1,Object.defineProperty(df,"__esModule",{value:!0})),df}var mf={},my;function Qx(){return my||(my=1,Object.defineProperty(mf,"__esModule",{value:!0})),mf}var Xi={},py;function Kx(){if(py)return Xi;py=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.checkMiddlewareCondition=void 0;const n=async(r,i,l)=>(Array.isArray(r)?r:[r]).reduce(async(f,h)=>await f?await h(i,l):!1,Promise.resolve(!0));return Xi.checkMiddlewareCondition=n,Xi}var pf={},gy;function $x(){return gy||(gy=1,Object.defineProperty(pf,"__esModule",{value:!0})),pf}var gf={},yy;function Jx(){return yy||(yy=1,Object.defineProperty(gf,"__esModule",{value:!0})),gf}var yf={},_y;function Wx(){return _y||(_y=1,Object.defineProperty(yf,"__esModule",{value:!0})),yf}var by;function eA(){return by||(by=1,function(n){var r=Fr&&Fr.__createBinding||(Object.create?function(l,u,f,h){h===void 0&&(h=f);var d=Object.getOwnPropertyDescriptor(u,f);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return u[f]}}),Object.defineProperty(l,h,d)}:function(l,u,f,h){h===void 0&&(h=f),l[h]=u[f]}),i=Fr&&Fr.__exportStar||function(l,u){for(var f in l)f!=="default"&&!Object.prototype.hasOwnProperty.call(u,f)&&r(u,l,f)};Object.defineProperty(n,"__esModule",{value:!0}),i(Yx(),n),i(Zx(),n),i(Xx(),n),i(Qx(),n),i(Kx(),n),i($x(),n),i(Jx(),n),i(Wx(),n)}(Fr)),Fr}var Vr={},ln={},vy;function tA(){if(vy)return ln;vy=1,Object.defineProperty(ln,"__esModule",{value:!0}),ln.ButtonTypeEnum=ln.PostbackButton=ln.UrlButton=ln.Button=void 0;class n{constructor(f,h){Ce(this,"title");Ce(this,"type");this.title=f,this.type=h}}ln.Button=n;class r extends n{constructor(h,d){super(h,l.WEB_URL);Ce(this,"url");this.url=d}}ln.UrlButton=r;class i extends n{constructor(h,d){super(h,l.POSTBACK);Ce(this,"payload");this.payload=d}}ln.PostbackButton=i;var l;return function(u){u.WEB_URL="web_url",u.POSTBACK="postback"}(l||(ln.ButtonTypeEnum=l={})),ln}var _f={},Ey;function nA(){return Ey||(Ey=1,Object.defineProperty(_f,"__esModule",{value:!0})),_f}var Qi={},Sy;function rA(){if(Sy)return Qi;Sy=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.SatisfactionEnum=void 0;var n;return function(r){r.GOOD="GOOD",r.BAD="BAD"}(n||(Qi.SatisfactionEnum=n={})),Qi}var Ty;function xy(){return Ty||(Ty=1,function(n){var r=Vr&&Vr.__createBinding||(Object.create?function(l,u,f,h){h===void 0&&(h=f);var d=Object.getOwnPropertyDescriptor(u,f);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return u[f]}}),Object.defineProperty(l,h,d)}:function(l,u,f,h){h===void 0&&(h=f),l[h]=u[f]}),i=Vr&&Vr.__exportStar||function(l,u){for(var f in l)f!=="default"&&!Object.prototype.hasOwnProperty.call(u,f)&&r(u,l,f)};Object.defineProperty(n,"__esModule",{value:!0}),i(tA(),n),i(nA(),n),i(rA(),n),i(zh(),n),i(kh(),n)}(Vr)),Vr}var Ay;function aA(){return Ay||(Ay=1,function(n){var r=an&&an.__createBinding||(Object.create?function(f,h,d,m){m===void 0&&(m=d);var g=Object.getOwnPropertyDescriptor(h,d);(!g||("get"in g?!h.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return h[d]}}),Object.defineProperty(f,m,g)}:function(f,h,d,m){m===void 0&&(m=d),f[m]=h[d]}),i=an&&an.__setModuleDefault||(Object.create?function(f,h){Object.defineProperty(f,"default",{enumerable:!0,value:h})}:function(f,h){f.default=h}),l=an&&an.__exportStar||function(f,h){for(var d in f)d!=="default"&&!Object.prototype.hasOwnProperty.call(h,d)&&r(h,f,d)},u=an&&an.__importStar||function(){var f=function(h){return f=Object.getOwnPropertyNames||function(d){var m=[];for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(m[m.length]=g);return m},f(h)};return function(h){if(h&&h.__esModule)return h;var d={};if(h!=null)for(var m=f(h),g=0;g<m.length;g++)m[g]!=="default"&&r(d,h,m[g]);return i(d,h),d}}();Object.defineProperty(n,"__esModule",{value:!0}),n.Model=n.CMS=void 0,l(Ix(),n),n.CMS=u(Px()),l(eA(),n),l(xy(),n),n.Model=u(xy())}(an)),an}var Ee=aA();const Mb=n=>r=>(n.payload.type!==Ee.ActionTypes.MESSAGE_FROM_GUEST&&r(Ee.Actions.receiveTextMessageWithoutAnalysisFromGuest(n.label,n.payload)),r(n.payload)),Bb=n=>(r,i)=>{const{quickReplies:l}=i().chat,u=l.find(f=>n.toLocaleLowerCase().indexOf(f.label.toLocaleLowerCase())>-1);return r(u?Mb({...u,label:n}):Ee.Actions.receiveTextMessageFromGuest(n))},Gh="MESSAGE_TO_PARENT_PAGE",qh="RESTORE_PREVIOUS_CHAT_MESSAGES",Ih="AUDIO_MESSAGE_FROM_USER",iA="EXPORT_TRANSCRIPT",Fh="RECEIVE_SPEECH_TRANSCRIPTION",Vh="ENABLE_CONVERSATION_RATING",jb="LOAD_SOURCE_INFOS_RESPONSE",Ub="LOAD_SOURCE_INFOS_ERROR",Ph="LOAD_SOURCE_INFOS_REQUEST",Yh="CLOSE_SOURCE_INFOS",sA="webclient.get.started",Hb="webclient.window.expand",Lb="webclient.window.close",zb="webclient.transcript.pdf.download",lA=[Gh,qh,Ih,iA,Fh,Vh,Ph,Yh],oA=n=>({type:Ih,buffer:n}),uA=n=>({type:Fh,transcription:n}),cA=n=>({type:Ee.ActionTypes.TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:n}}}),fA=()=>({type:zb}),hA=({rating:n})=>({type:Vh,payload:{rating:n}}),dA=(n,r)=>({type:Ee.ActionTypes.CONVERSATION_RATING_FROM_GUEST,payload:{value:n,feedback:r}}),kb=n=>Ee.Actions.requestNLUEvent(n),mA=n=>({type:qh,messages:n}),pA=n=>{switch(n.type){case Ee.ButtonTypeEnum.WEB_URL:return Gb(n.url);case Ee.ButtonTypeEnum.POSTBACK:return n.payload;default:throw new Error(`unknown button type ${n.type}`)}},gA=n=>Gb(n),Gb=n=>({type:Gh,message:{type:"webclient.change.url",url:n}});/*! js-cookie v3.0.5 | MIT */function ql(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var l in i)n[l]=i[l]}return n}var yA={read:function(n){return n[0]==='"'&&(n=n.slice(1,-1)),n.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(n){return encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function mh(n,r){function i(u,f,h){if(!(typeof document>"u")){h=ql({},r,h),typeof h.expires=="number"&&(h.expires=new Date(Date.now()+h.expires*864e5)),h.expires&&(h.expires=h.expires.toUTCString()),u=encodeURIComponent(u).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var m in h)h[m]&&(d+="; "+m,h[m]!==!0&&(d+="="+h[m].split(";")[0]));return document.cookie=u+"="+n.write(f,u)+d}}function l(u){if(!(typeof document>"u"||arguments.length&&!u)){for(var f=document.cookie?document.cookie.split("; "):[],h={},d=0;d<f.length;d++){var m=f[d].split("="),g=m.slice(1).join("=");try{var _=decodeURIComponent(m[0]);if(h[_]=n.read(g,_),u===_)break}catch{}}return u?h[u]:h}}return Object.create({set:i,get:l,remove:function(u,f){i(u,"",ql({},f,{expires:-1}))},withAttributes:function(u){return mh(this.converter,ql({},this.attributes,u))},withConverter:function(u){return mh(ql({},this.converter,u),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}var Il=mh(yA,{path:"/"});const ct=[];for(let n=0;n<256;++n)ct.push((n+256).toString(16).slice(1));function _A(n,r=0){return(ct[n[r+0]]+ct[n[r+1]]+ct[n[r+2]]+ct[n[r+3]]+"-"+ct[n[r+4]]+ct[n[r+5]]+"-"+ct[n[r+6]]+ct[n[r+7]]+"-"+ct[n[r+8]]+ct[n[r+9]]+"-"+ct[n[r+10]]+ct[n[r+11]]+ct[n[r+12]]+ct[n[r+13]]+ct[n[r+14]]+ct[n[r+15]]).toLowerCase()}let bf;const bA=new Uint8Array(16);function vA(){if(!bf){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");bf=crypto.getRandomValues.bind(crypto)}return bf(bA)}const EA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Oy={randomUUID:EA};function ph(n,r,i){var u;if(Oy.randomUUID&&!n)return Oy.randomUUID();n=n||{};const l=n.random??((u=n.rng)==null?void 0:u.call(n))??vA();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,_A(l)}function ft(n){return`Minified Redux error #${n}; visit https://redux.js.org/Errors?code=${n} for the full message or use the non-minified dev environment for full errors. `}var SA=typeof Symbol=="function"&&Symbol.observable||"@@observable",wy=SA,vf=()=>Math.random().toString(36).substring(7).split("").join("."),TA={INIT:`@@redux/INIT${vf()}`,REPLACE:`@@redux/REPLACE${vf()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${vf()}`},uo=TA;function Zh(n){if(typeof n!="object"||n===null)return!1;let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r||Object.getPrototypeOf(n)===null}function qb(n,r,i){if(typeof n!="function")throw new Error(ft(2));if(typeof r=="function"&&typeof i=="function"||typeof i=="function"&&typeof arguments[3]=="function")throw new Error(ft(0));if(typeof r=="function"&&typeof i>"u"&&(i=r,r=void 0),typeof i<"u"){if(typeof i!="function")throw new Error(ft(1));return i(qb)(n,r)}let l=n,u=r,f=new Map,h=f,d=0,m=!1;function g(){h===f&&(h=new Map,f.forEach((N,U)=>{h.set(U,N)}))}function _(){if(m)throw new Error(ft(3));return u}function E(N){if(typeof N!="function")throw new Error(ft(4));if(m)throw new Error(ft(5));let U=!0;g();const M=d++;return h.set(M,N),function(){if(U){if(m)throw new Error(ft(6));U=!1,g(),h.delete(M),f=null}}}function y(N){if(!Zh(N))throw new Error(ft(7));if(typeof N.type>"u")throw new Error(ft(8));if(typeof N.type!="string")throw new Error(ft(17));if(m)throw new Error(ft(9));try{m=!0,u=l(u,N)}finally{m=!1}return(f=h).forEach(M=>{M()}),N}function x(N){if(typeof N!="function")throw new Error(ft(10));l=N,y({type:uo.REPLACE})}function T(){const N=E;return{subscribe(U){if(typeof U!="object"||U===null)throw new Error(ft(11));function M(){const R=U;R.next&&R.next(_())}return M(),{unsubscribe:N(M)}},[wy](){return this}}}return y({type:uo.INIT}),{dispatch:y,subscribe:E,getState:_,replaceReducer:x,[wy]:T}}function xA(n){Object.keys(n).forEach(r=>{const i=n[r];if(typeof i(void 0,{type:uo.INIT})>"u")throw new Error(ft(12));if(typeof i(void 0,{type:uo.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ft(13))})}function Ib(n){const r=Object.keys(n),i={};for(let f=0;f<r.length;f++){const h=r[f];typeof n[h]=="function"&&(i[h]=n[h])}const l=Object.keys(i);let u;try{xA(i)}catch(f){u=f}return function(h={},d){if(u)throw u;let m=!1;const g={};for(let _=0;_<l.length;_++){const E=l[_],y=i[E],x=h[E],T=y(x,d);if(typeof T>"u")throw d&&d.type,new Error(ft(14));g[E]=T,m=m||T!==x}return m=m||l.length!==Object.keys(h).length,m?g:h}}function co(...n){return n.length===0?r=>r:n.length===1?n[0]:n.reduce((r,i)=>(...l)=>r(i(...l)))}function AA(...n){return r=>(i,l)=>{const u=r(i,l);let f=()=>{throw new Error(ft(15))};const h={getState:u.getState,dispatch:(m,...g)=>f(m,...g)},d=n.map(m=>m(h));return f=co(...d)(u.dispatch),{...u,dispatch:f}}}function OA(n){return Zh(n)&&"type"in n&&typeof n.type=="string"}var Fb=Symbol.for("immer-nothing"),Ry=Symbol.for("immer-draftable"),Gt=Symbol.for("immer-state");function cn(n,...r){throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var qa=Object.getPrototypeOf;function Jr(n){return!!n&&!!n[Gt]}function Zn(n){var r;return n?Vb(n)||Array.isArray(n)||!!n[Ry]||!!((r=n.constructor)!=null&&r[Ry])||So(n)||To(n):!1}var wA=Object.prototype.constructor.toString();function Vb(n){if(!n||typeof n!="object")return!1;const r=qa(n);if(r===null)return!0;const i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object?!0:typeof i=="function"&&Function.toString.call(i)===wA}function fo(n,r){Eo(n)===0?Reflect.ownKeys(n).forEach(i=>{r(i,n[i],n)}):n.forEach((i,l)=>r(l,i,n))}function Eo(n){const r=n[Gt];return r?r.type_:Array.isArray(n)?1:So(n)?2:To(n)?3:0}function gh(n,r){return Eo(n)===2?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function Pb(n,r,i){const l=Eo(n);l===2?n.set(r,i):l===3?n.add(i):n[r]=i}function RA(n,r){return n===r?n!==0||1/n===1/r:n!==n&&r!==r}function So(n){return n instanceof Map}function To(n){return n instanceof Set}function Xr(n){return n.copy_||n.base_}function yh(n,r){if(So(n))return new Map(n);if(To(n))return new Set(n);if(Array.isArray(n))return Array.prototype.slice.call(n);const i=Vb(n);if(r===!0||r==="class_only"&&!i){const l=Object.getOwnPropertyDescriptors(n);delete l[Gt];let u=Reflect.ownKeys(l);for(let f=0;f<u.length;f++){const h=u[f],d=l[h];d.writable===!1&&(d.writable=!0,d.configurable=!0),(d.get||d.set)&&(l[h]={configurable:!0,writable:!0,enumerable:d.enumerable,value:n[h]})}return Object.create(qa(n),l)}else{const l=qa(n);if(l!==null&&i)return{...n};const u=Object.create(l);return Object.assign(u,n)}}function Xh(n,r=!1){return xo(n)||Jr(n)||!Zn(n)||(Eo(n)>1&&(n.set=n.add=n.clear=n.delete=CA),Object.freeze(n),r&&Object.entries(n).forEach(([i,l])=>Xh(l,!0))),n}function CA(){cn(2)}function xo(n){return Object.isFrozen(n)}var NA={};function Wr(n){const r=NA[n];return r||cn(0,n),r}var as;function Yb(){return as}function DA(n,r){return{drafts_:[],parent_:n,immer_:r,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Cy(n,r){r&&(Wr("Patches"),n.patches_=[],n.inversePatches_=[],n.patchListener_=r)}function _h(n){bh(n),n.drafts_.forEach(MA),n.drafts_=null}function bh(n){n===as&&(as=n.parent_)}function Ny(n){return as=DA(as,n)}function MA(n){const r=n[Gt];r.type_===0||r.type_===1?r.revoke_():r.revoked_=!0}function Dy(n,r){r.unfinalizedDrafts_=r.drafts_.length;const i=r.drafts_[0];return n!==void 0&&n!==i?(i[Gt].modified_&&(_h(r),cn(4)),Zn(n)&&(n=ho(r,n),r.parent_||mo(r,n)),r.patches_&&Wr("Patches").generateReplacementPatches_(i[Gt].base_,n,r.patches_,r.inversePatches_)):n=ho(r,i,[]),_h(r),r.patches_&&r.patchListener_(r.patches_,r.inversePatches_),n!==Fb?n:void 0}function ho(n,r,i){if(xo(r))return r;const l=r[Gt];if(!l)return fo(r,(u,f)=>My(n,l,r,u,f,i)),r;if(l.scope_!==n)return r;if(!l.modified_)return mo(n,l.base_,!0),l.base_;if(!l.finalized_){l.finalized_=!0,l.scope_.unfinalizedDrafts_--;const u=l.copy_;let f=u,h=!1;l.type_===3&&(f=new Set(u),u.clear(),h=!0),fo(f,(d,m)=>My(n,l,u,d,m,i,h)),mo(n,u,!1),i&&n.patches_&&Wr("Patches").generatePatches_(l,i,n.patches_,n.inversePatches_)}return l.copy_}function My(n,r,i,l,u,f,h){if(Jr(u)){const d=f&&r&&r.type_!==3&&!gh(r.assigned_,l)?f.concat(l):void 0,m=ho(n,u,d);if(Pb(i,l,m),Jr(m))n.canAutoFreeze_=!1;else return}else h&&i.add(u);if(Zn(u)&&!xo(u)){if(!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1)return;ho(n,u),(!r||!r.scope_.parent_)&&typeof l!="symbol"&&Object.prototype.propertyIsEnumerable.call(i,l)&&mo(n,u)}}function mo(n,r,i=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&Xh(r,i)}function BA(n,r){const i=Array.isArray(n),l={type_:i?1:0,scope_:r?r.scope_:Yb(),modified_:!1,finalized_:!1,assigned_:{},parent_:r,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1};let u=l,f=Qh;i&&(u=[l],f=is);const{revoke:h,proxy:d}=Proxy.revocable(u,f);return l.draft_=d,l.revoke_=h,d}var Qh={get(n,r){if(r===Gt)return n;const i=Xr(n);if(!gh(i,r))return jA(n,i,r);const l=i[r];return n.finalized_||!Zn(l)?l:l===Ef(n.base_,r)?(Sf(n),n.copy_[r]=Eh(l,n)):l},has(n,r){return r in Xr(n)},ownKeys(n){return Reflect.ownKeys(Xr(n))},set(n,r,i){const l=Zb(Xr(n),r);if(l!=null&&l.set)return l.set.call(n.draft_,i),!0;if(!n.modified_){const u=Ef(Xr(n),r),f=u==null?void 0:u[Gt];if(f&&f.base_===i)return n.copy_[r]=i,n.assigned_[r]=!1,!0;if(RA(i,u)&&(i!==void 0||gh(n.base_,r)))return!0;Sf(n),vh(n)}return n.copy_[r]===i&&(i!==void 0||r in n.copy_)||Number.isNaN(i)&&Number.isNaN(n.copy_[r])||(n.copy_[r]=i,n.assigned_[r]=!0),!0},deleteProperty(n,r){return Ef(n.base_,r)!==void 0||r in n.base_?(n.assigned_[r]=!1,Sf(n),vh(n)):delete n.assigned_[r],n.copy_&&delete n.copy_[r],!0},getOwnPropertyDescriptor(n,r){const i=Xr(n),l=Reflect.getOwnPropertyDescriptor(i,r);return l&&{writable:!0,configurable:n.type_!==1||r!=="length",enumerable:l.enumerable,value:i[r]}},defineProperty(){cn(11)},getPrototypeOf(n){return qa(n.base_)},setPrototypeOf(){cn(12)}},is={};fo(Qh,(n,r)=>{is[n]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}});is.deleteProperty=function(n,r){return is.set.call(this,n,r,void 0)};is.set=function(n,r,i){return Qh.set.call(this,n[0],r,i,n[0])};function Ef(n,r){const i=n[Gt];return(i?Xr(i):n)[r]}function jA(n,r,i){var u;const l=Zb(r,i);return l?"value"in l?l.value:(u=l.get)==null?void 0:u.call(n.draft_):void 0}function Zb(n,r){if(!(r in n))return;let i=qa(n);for(;i;){const l=Object.getOwnPropertyDescriptor(i,r);if(l)return l;i=qa(i)}}function vh(n){n.modified_||(n.modified_=!0,n.parent_&&vh(n.parent_))}function Sf(n){n.copy_||(n.copy_=yh(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var UA=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(r,i,l)=>{if(typeof r=="function"&&typeof i!="function"){const f=i;i=r;const h=this;return function(m=f,...g){return h.produce(m,_=>i.call(this,_,...g))}}typeof i!="function"&&cn(6),l!==void 0&&typeof l!="function"&&cn(7);let u;if(Zn(r)){const f=Ny(this),h=Eh(r,void 0);let d=!0;try{u=i(h),d=!1}finally{d?_h(f):bh(f)}return Cy(f,l),Dy(u,f)}else if(!r||typeof r!="object"){if(u=i(r),u===void 0&&(u=r),u===Fb&&(u=void 0),this.autoFreeze_&&Xh(u,!0),l){const f=[],h=[];Wr("Patches").generateReplacementPatches_(r,u,f,h),l(f,h)}return u}else cn(1,r)},this.produceWithPatches=(r,i)=>{if(typeof r=="function")return(h,...d)=>this.produceWithPatches(h,m=>r(m,...d));let l,u;return[this.produce(r,i,(h,d)=>{l=h,u=d}),l,u]},typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze),typeof(n==null?void 0:n.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(n.useStrictShallowCopy)}createDraft(n){Zn(n)||cn(8),Jr(n)&&(n=HA(n));const r=Ny(this),i=Eh(n,void 0);return i[Gt].isManual_=!0,bh(r),i}finishDraft(n,r){const i=n&&n[Gt];(!i||!i.isManual_)&&cn(9);const{scope_:l}=i;return Cy(l,r),Dy(void 0,l)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}applyPatches(n,r){let i;for(i=r.length-1;i>=0;i--){const u=r[i];if(u.path.length===0&&u.op==="replace"){n=u.value;break}}i>-1&&(r=r.slice(i+1));const l=Wr("Patches").applyPatches_;return Jr(n)?l(n,r):this.produce(n,u=>l(u,r))}};function Eh(n,r){const i=So(n)?Wr("MapSet").proxyMap_(n,r):To(n)?Wr("MapSet").proxySet_(n,r):BA(n,r);return(r?r.scope_:Yb()).drafts_.push(i),i}function HA(n){return Jr(n)||cn(10,n),Xb(n)}function Xb(n){if(!Zn(n)||xo(n))return n;const r=n[Gt];let i;if(r){if(!r.modified_)return r.base_;r.finalized_=!0,i=yh(n,r.scope_.immer_.useStrictShallowCopy_)}else i=yh(n,!0);return fo(i,(l,u)=>{Pb(i,l,Xb(u))}),r&&(r.finalized_=!1),i}var qt=new UA,Qb=qt.produce;qt.produceWithPatches.bind(qt);qt.setAutoFreeze.bind(qt);qt.setUseStrictShallowCopy.bind(qt);qt.applyPatches.bind(qt);qt.createDraft.bind(qt);qt.finishDraft.bind(qt);function Kb(n){return({dispatch:i,getState:l})=>u=>f=>typeof f=="function"?f(i,l,n):u(f)}var LA=Kb(),zA=Kb,kA=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?co:co.apply(null,arguments)};function By(n,r){function i(...l){if(r){let u=r(...l);if(!u)throw new Error(Vn(0));return{type:n,payload:u.payload,..."meta"in u&&{meta:u.meta},..."error"in u&&{error:u.error}}}return{type:n,payload:l[0]}}return i.toString=()=>`${n}`,i.type=n,i.match=l=>OA(l)&&l.type===n,i}var $b=class ts extends Array{constructor(...r){super(...r),Object.setPrototypeOf(this,ts.prototype)}static get[Symbol.species](){return ts}concat(...r){return super.concat.apply(this,r)}prepend(...r){return r.length===1&&Array.isArray(r[0])?new ts(...r[0].concat(this)):new ts(...r.concat(this))}};function jy(n){return Zn(n)?Qb(n,()=>{}):n}function Fl(n,r,i){return n.has(r)?n.get(r):n.set(r,i(r)).get(r)}function GA(n){return typeof n=="boolean"}var qA=()=>function(r){const{thunk:i=!0,immutableCheck:l=!0,serializableCheck:u=!0,actionCreatorCheck:f=!0}=r??{};let h=new $b;return i&&(GA(i)?h.push(LA):h.push(zA(i.extraArgument))),h},IA="RTK_autoBatch",Uy=n=>r=>{setTimeout(r,n)},FA=(n={type:"raf"})=>r=>(...i)=>{const l=r(...i);let u=!0,f=!1,h=!1;const d=new Set,m=n.type==="tick"?queueMicrotask:n.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Uy(10):n.type==="callback"?n.queueNotification:Uy(n.timeout),g=()=>{h=!1,f&&(f=!1,d.forEach(_=>_()))};return Object.assign({},l,{subscribe(_){const E=()=>u&&_(),y=l.subscribe(E);return d.add(_),()=>{y(),d.delete(_)}},dispatch(_){var E;try{return u=!((E=_==null?void 0:_.meta)!=null&&E[IA]),f=!u,f&&(h||(h=!0,m(g))),l.dispatch(_)}finally{u=!0}}})},VA=n=>function(i){const{autoBatch:l=!0}=i??{};let u=new $b(n);return l&&u.push(FA(typeof l=="object"?l:void 0)),u};function PA(n){const r=qA(),{reducer:i=void 0,middleware:l,devTools:u=!0,preloadedState:f=void 0,enhancers:h=void 0}=n||{};let d;if(typeof i=="function")d=i;else if(Zh(i))d=Ib(i);else throw new Error(Vn(1));let m;typeof l=="function"?m=l(r):m=r();let g=co;u&&(g=kA({trace:!1,...typeof u=="object"&&u}));const _=AA(...m),E=VA(_);let y=typeof h=="function"?h(E):E();const x=g(...y);return qb(d,f,x)}function Jb(n){const r={},i=[];let l;const u={addCase(f,h){const d=typeof f=="string"?f:f.type;if(!d)throw new Error(Vn(28));if(d in r)throw new Error(Vn(29));return r[d]=h,u},addMatcher(f,h){return i.push({matcher:f,reducer:h}),u},addDefaultCase(f){return l=f,u}};return n(u),[r,i,l]}function YA(n){return typeof n=="function"}function ZA(n,r){let[i,l,u]=Jb(r),f;if(YA(n))f=()=>jy(n());else{const d=jy(n);f=()=>d}function h(d=f(),m){let g=[i[m.type],...l.filter(({matcher:_})=>_(m)).map(({reducer:_})=>_)];return g.filter(_=>!!_).length===0&&(g=[u]),g.reduce((_,E)=>{if(E)if(Jr(_)){const x=E(_,m);return x===void 0?_:x}else{if(Zn(_))return Qb(_,y=>E(y,m));{const y=E(_,m);if(y===void 0){if(_===null)return _;throw Error("A case reducer on a non-draftable value must not return undefined")}return y}}return _},d)}return h.getInitialState=f,h}var XA=Symbol.for("rtk-slice-createasyncthunk");function QA(n,r){return`${n}/${r}`}function KA({creators:n}={}){var i;const r=(i=n==null?void 0:n.asyncThunk)==null?void 0:i[XA];return function(u){const{name:f,reducerPath:h=f}=u;if(!f)throw new Error(Vn(11));const d=(typeof u.reducers=="function"?u.reducers(JA()):u.reducers)||{},m=Object.keys(d),g={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},_={addCase(R,S){const k=typeof R=="string"?R:R.type;if(!k)throw new Error(Vn(12));if(k in g.sliceCaseReducersByType)throw new Error(Vn(13));return g.sliceCaseReducersByType[k]=S,_},addMatcher(R,S){return g.sliceMatchers.push({matcher:R,reducer:S}),_},exposeAction(R,S){return g.actionCreators[R]=S,_},exposeCaseReducer(R,S){return g.sliceCaseReducersByName[R]=S,_}};m.forEach(R=>{const S=d[R],k={reducerName:R,type:QA(f,R),createNotation:typeof u.reducers=="function"};eO(S)?nO(k,S,_,r):WA(k,S,_)});function E(){const[R={},S=[],k=void 0]=typeof u.extraReducers=="function"?Jb(u.extraReducers):[u.extraReducers],Y={...R,...g.sliceCaseReducersByType};return ZA(u.initialState,K=>{for(let re in Y)K.addCase(re,Y[re]);for(let re of g.sliceMatchers)K.addMatcher(re.matcher,re.reducer);for(let re of S)K.addMatcher(re.matcher,re.reducer);k&&K.addDefaultCase(k)})}const y=R=>R,x=new Map,T=new WeakMap;let z;function N(R,S){return z||(z=E()),z(R,S)}function U(){return z||(z=E()),z.getInitialState()}function M(R,S=!1){function k(K){let re=K[R];return typeof re>"u"&&S&&(re=Fl(T,k,U)),re}function Y(K=y){const re=Fl(x,S,()=>new WeakMap);return Fl(re,K,()=>{const ee={};for(const[le,ie]of Object.entries(u.selectors??{}))ee[le]=$A(ie,K,()=>Fl(T,K,U),S);return ee})}return{reducerPath:R,getSelectors:Y,get selectors(){return Y(k)},selectSlice:k}}const O={name:f,reducer:N,actions:g.actionCreators,caseReducers:g.sliceCaseReducersByName,getInitialState:U,...M(h),injectInto(R,{reducerPath:S,...k}={}){const Y=S??h;return R.inject({reducerPath:Y,reducer:N},k),{...O,...M(Y,!0)}}};return O}}function $A(n,r,i,l){function u(f,...h){let d=r(f);return typeof d>"u"&&l&&(d=i()),n(d,...h)}return u.unwrapped=n,u}var Kh=KA();function JA(){function n(r,i){return{_reducerDefinitionType:"asyncThunk",payloadCreator:r,...i}}return n.withTypes=()=>n,{reducer(r){return Object.assign({[r.name](...i){return r(...i)}}[r.name],{_reducerDefinitionType:"reducer"})},preparedReducer(r,i){return{_reducerDefinitionType:"reducerWithPrepare",prepare:r,reducer:i}},asyncThunk:n}}function WA({type:n,reducerName:r,createNotation:i},l,u){let f,h;if("reducer"in l){if(i&&!tO(l))throw new Error(Vn(17));f=l.reducer,h=l.prepare}else f=l;u.addCase(n,f).exposeCaseReducer(r,f).exposeAction(r,h?By(n,h):By(n))}function eO(n){return n._reducerDefinitionType==="asyncThunk"}function tO(n){return n._reducerDefinitionType==="reducerWithPrepare"}function nO({type:n,reducerName:r},i,l,u){if(!u)throw new Error(Vn(18));const{payloadCreator:f,fulfilled:h,pending:d,rejected:m,settled:g,options:_}=i,E=u(n,f,_);l.exposeAction(r,E),h&&l.addCase(E.fulfilled,h),d&&l.addCase(E.pending,d),m&&l.addCase(E.rejected,m),g&&l.addMatcher(E.settled,g),l.exposeCaseReducer(r,{fulfilled:h||Vl,pending:d||Vl,rejected:m||Vl,settled:g||Vl})}function Vl(){}function Vn(n){return`Minified Redux Toolkit error #${n}; visit https://redux-toolkit.js.org/Errors?code=${n} for the full message or use the non-minified dev environment for full errors. `}const rO={formValues:{}},Wb=Kh({name:"start-screen",initialState:rO,reducers:{showStartScreen(n){n.startScreenStatus="VISIBLE",n.formValues={}},startChat(n,r){n.startScreenStatus="HIDDEN",n.formValues=r.payload}}}),{startChat:aO,showStartScreen:iO}=Wb.actions,sO=Wb.reducer,ev="RESET_CHAT_STATE",lO=()=>({type:Lb}),oO=()=>({type:ev}),Hy=n=>(r,i)=>{const l=i();return r({type:Ph,payload:{chunkId:n}}),fetch(`/cms/public/vector-store/chunks/${n}`,{headers:{"Accept-Language":l.intl.locale}}).then(u=>{if(!u.ok)throw r({type:Ub}),new Error(`HTTP error! Status: ${u.status}`);return u.json()}).then(u=>{const f={...u,chunkId:n};r({type:jb,payload:f})})},uO=()=>({type:Yh}),$h="CONNECT",Jh="CONNECTING",Wh="CONNECTED",ed="DISCONNECTED",td="RECONNECTED",nd="RESTORE_SESSION_ID",Ao="START",Oo="CLEAR_SESSION_ID",cO=[$h,Jh,Wh,ed,td,nd],fO=(n,r)=>({type:$h,clientName:n,querystrings:r}),hO=n=>({type:nd,sessionId:n}),dO=()=>({type:Jh}),mO=()=>({type:Wh}),pO=()=>({type:ed}),gO=()=>({type:td}),tv=(n,r)=>(i,l)=>{const u=l().connection,f=l().startScreen.formValues;let h=u.sessionId;h===void 0&&(h=ph());let d=u.userId;if(d===void 0){const m=Il.get("bubble-chat-user-id")||Il.get("bubble-chat-userId")||Il.get("bf-webclient-userId");d=m||ph(),Il.set("bubble-chat-user-id",d)}i({type:Ao,payload:{sessionId:h,userId:d,clientName:n,querystrings:{...r,...f}}})},wo=(n,r)=>(i,l)=>{const u=l().connection.sessionId||"";if(i(yO(u)),i(oO()),l().settings.enableStartScreen)i(iO());else return i(tv(n,r))},yO=n=>({type:Oo,payload:{sessionId:n}}),et=()=>{const n=bo();return i=>{const l=n.formatMessage({id:i});return l===i?void 0:l}};var Kr=(n=>(n[n.CONNECTING=0]="CONNECTING",n[n.CONNECTED=1]="CONNECTED",n[n.RECONNECTED=2]="RECONNECTED",n[n.DISCONNECTED=3]="DISCONNECTED",n))(Kr||{}),po=(n=>(n.GUEST="GUEST",n.BOT="BOT",n.PERSON="PERSON",n))(po||{});const _O="_container_q2uun_1",bO="_chatcontent_q2uun_6",vO="_accessabilityHidden_q2uun_12",Tf={container:_O,chatcontent:bO,accessabilityHidden:vO},EO="_messageContainer_1m8fy_1",SO="_messages_1m8fy_13",Ly={messageContainer:EO,messages:SO};function Qr(){return Qr=Object.assign?Object.assign.bind():function(n){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(n[l]=i[l])}return n},Qr.apply(this,arguments)}const TO=["children","options"],ue={blockQuote:"0",breakLine:"1",breakThematic:"2",codeBlock:"3",codeFenced:"4",codeInline:"5",footnote:"6",footnoteReference:"7",gfmTask:"8",heading:"9",headingSetext:"10",htmlBlock:"11",htmlComment:"12",htmlSelfClosing:"13",image:"14",link:"15",linkAngleBraceStyleDetector:"16",linkBareUrlDetector:"17",linkMailtoDetector:"18",newlineCoalescer:"19",orderedList:"20",paragraph:"21",ref:"22",refImage:"23",refLink:"24",table:"25",text:"27",textBolded:"28",textEmphasized:"29",textEscaped:"30",textMarked:"31",textStrikethroughed:"32",unorderedList:"33"};var zy;(function(n){n[n.MAX=0]="MAX",n[n.HIGH=1]="HIGH",n[n.MED=2]="MED",n[n.LOW=3]="LOW",n[n.MIN=4]="MIN"})(zy||(zy={}));const ky=["allowFullScreen","allowTransparency","autoComplete","autoFocus","autoPlay","cellPadding","cellSpacing","charSet","classId","colSpan","contentEditable","contextMenu","crossOrigin","encType","formAction","formEncType","formMethod","formNoValidate","formTarget","frameBorder","hrefLang","inputMode","keyParams","keyType","marginHeight","marginWidth","maxLength","mediaGroup","minLength","noValidate","radioGroup","readOnly","rowSpan","spellCheck","srcDoc","srcLang","srcSet","tabIndex","useMap"].reduce((n,r)=>(n[r.toLowerCase()]=r,n),{class:"className",for:"htmlFor"}),Gy={amp:"&",apos:"'",gt:">",lt:"<",nbsp:" ",quot:"“"},xO=["style","script"],AO=["src","href","data","formAction","srcDoc","action"],OO=/([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi,wO=/mailto:/i,RO=/\n{2,}$/,nv=/^(\s*>[\s\S]*?)(?=\n\n|$)/,CO=/^ *> ?/gm,NO=/^(?:\[!([^\]]*)\]\n)?([\s\S]*)/,DO=/^ {2,}\n/,MO=/^(?:( *[-*_])){3,} *(?:\n *)+\n/,rv=/^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/,av=/^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/,BO=/^(`+)((?:\\`|(?!\1)`|[^`])+)\1/,jO=/^(?:\n *)*\n/,UO=/\r\n?/g,HO=/^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/,LO=/^\[\^([^\]]+)]/,zO=/\f/g,kO=/^---[ \t]*\n(.|\n)*\n---[ \t]*\n/,GO=/^\s*?\[(x|\s)\]/,iv=/^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,sv=/^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/,lv=/^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/,Sh=/^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i,qO=/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi,ov=/^<!--[\s\S]*?(?:-->)/,IO=/^(data|aria|x)-[a-z_][a-z\d_.-]*$/,Th=/^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i,FO=/^\{.*\}$/,VO=/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,PO=/^<([^ >]+@[^ >]+)>/,YO=/^<([^ >]+:\/[^ >]+)>/,ZO=/-([a-z])?/gi,uv=/^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/,XO=/^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/,QO=/^!\[([^\]]*)\] ?\[([^\]]*)\]/,KO=/^\[([^\]]*)\] ?\[([^\]]*)\]/,$O=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/,JO=/\t/g,WO=/(^ *\||\| *$)/g,ew=/^ *:-+: *$/,tw=/^ *:-+ *$/,nw=/^ *-+: *$/,Ro="((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)",rw=new RegExp(`^([*_])\\1${Ro}\\1\\1(?!\\1)`),aw=new RegExp(`^([*_])${Ro}\\1(?!\\1)`),iw=new RegExp(`^(==)${Ro}\\1`),sw=new RegExp(`^(~~)${Ro}\\1`),lw=/^\\([^0-9A-Za-z\s])/,qy=/\\([^0-9A-Za-z\s])/g,ow=/^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/,uw=/^\n+/,cw=/^([ \t]*)/,fw=/\\([^\\])/g,hw=/(?:^|\n)( *)$/,rd="(?:\\d+\\.)",ad="(?:[*+-])";function cv(n){return"( *)("+(n===1?rd:ad)+") +"}const fv=cv(1),hv=cv(2);function dv(n){return new RegExp("^"+(n===1?fv:hv))}const dw=dv(1),mw=dv(2);function mv(n){return new RegExp("^"+(n===1?fv:hv)+"[^\\n]*(?:\\n(?!\\1"+(n===1?rd:ad)+" )[^\\n]*)*(\\n|$)","gm")}const pw=mv(1),gw=mv(2);function pv(n){const r=n===1?rd:ad;return new RegExp("^( *)("+r+") [\\s\\S]+?(?:\\n{2,}(?! )(?!\\1"+r+" (?!"+r+" ))\\n*|\\s*\\n*$)")}const gv=pv(1),yv=pv(2);function Iy(n,r){const i=r===1,l=i?gv:yv,u=i?pw:gw,f=i?dw:mw;return{match:Ia(function(h,d){const m=hw.exec(d.prevCapture);return m&&(d.list||!d.inline&&!d.simple)?l.exec(h=m[1]+h):null}),order:1,parse(h,d,m){const g=i?+h[2]:void 0,_=h[0].replace(RO,`
|
|
94
94
|
`).match(u);let E=!1;return{items:_.map(function(y,x){const T=f.exec(y)[0].length,z=new RegExp("^ {1,"+T+"}","gm"),N=y.replace(z,"").replace(f,""),U=x===_.length-1,M=N.indexOf(`
|
|
95
95
|
|
|
96
96
|
`)!==-1||U&&E;E=M;const O=m.inline,R=m.list;let S;m.list=!0,M?(m.inline=!1,S=ss(N)+`
|
|
@@ -116,4 +116,4 @@ For more details see https://formatjs.github.io/docs/getting-started/message-dis
|
|
|
116
116
|
|
|
117
117
|
- La cronologia delle chat è memorizzata nell'area UE e può essere visualizzata solo da persone autorizzate.
|
|
118
118
|
- Non inserire dati personali nella finestra di chat (password, data di nascita, ecc.).`,"general-conditions.accept-conditions-note":"Utilizzando la chat si accettano le condizioni d'uso.","block-user-input.title":"Attendere la risposta del chatbot.","conversation-rating.call-to-action.title":"Valuta questa chat","conversation-rating.overlay.title":"Quanto sei soddisfatto di questa chat?","conversation-rating.overlay.guest-feedback.input-placeholder":"Inserisci qui il tuo feedback (opzionale)","conversation-rating.overlay.star.very-bad":"Molto male","conversation-rating.overlay.star.very-good":"Molto buono","conversation-rating.overlay.bot-message.rate-feedback.value-1":"Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.","conversation-rating.overlay.bot-message.rate-feedback.value-2":"Oh, non suona bene. Vi prego di darmi un feedback in modo che possa imparare di più.","conversation-rating.overlay.bot-message.rate-feedback.value-3":"La media non è il mio obiettivo, cosa posso ancora migliorare?","conversation-rating.overlay.bot-message.rate-feedback.value-4":"Anche l'assenza è finita. Cosa posso migliorare per ottenere tutte le stelle la prossima volta?","conversation-rating.overlay.bot-message.rate-feedback.value-5":"Perfetto! Allora spero di potervi consigliare ancora una volta bene.","conversation-rating.overlay.bot-message.submit-feedback":"Grazie mille per il feedback. Mi impegno costantemente per migliorare.","conversation-rating.overlay.action.submit":"Invia","conversation-rating.overlay.action.close":"Chiudere","start-screen.intro":"","start-screen.start-chat":"Avviare la chat","header.restart-chat":"Riavviare la chat","header.expand-chat":"Allarga la chat","header.close-chat":"Ridurre al minimo la chat","source-infos.close":"Chiudere","source-infos.error.title":"Errore","source-infos.error.info":"Ops! Qualcosa è andato storto. Riprovare o contattare l'assistenza se il problema persiste.","commands.show-more.action":"Di più","commands.show-more.tooltip":"Mostra più comandi","commands.show-less.action":"Meno","commands.show-less.tooltip":"Mostra meno comandi"},c4=["de","en","fr","it"],jv={locale:"de",messages:Bv},f4=(n,r)=>{if(c4.includes(n)){const i=h4(n),l=s4(r);return{...i,...l}}return r},h4=n=>{switch(n.toString()){case"en":return l4;case"fr":return o4;case"it":return u4;default:return Bv}},d4=(n=m4,r)=>{switch(r.type){case Jh:return Object.assign({},n,{connectionState:Kr.CONNECTING});case Wh:return Object.assign({},n,{connectionState:Kr.CONNECTED});case ed:return Object.assign({},n,{connectionState:Kr.DISCONNECTED});case td:return Object.assign({},n,{connectionState:Kr.RECONNECTED});case nd:return Object.assign({},n,{sessionId:r.sessionId});case Ao:return Object.assign({},n,{sessionId:r.payload.sessionId,userId:r.payload.userId});case Oo:return Object.assign({},n,{sessionId:void 0});default:return n}},m4={connectionState:Kr.DISCONNECTED,sessionId:void 0,userId:void 0},p4=(n=H_,r)=>{switch(r.type){case ev:return H_;case Ao:return Zr({type:"webclient.chat.started"}),n;case Oo:return Zr({type:"webclient.chat.ended"}),n;case Ee.ActionTypes.TYPING_ON:return Object.assign({},n,{isBotTyping:!0});case Ee.ActionTypes.TYPING_OFF:return Object.assign({},n,{isBotTyping:!1});case Ee.ActionTypes.MESSAGE_FROM_GUEST:case Ee.ActionTypes.MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return U_(n,r.message);case Ee.ActionTypes.MESSAGE_TO_GUEST:{Zr(r);const i=Object.assign({},r.message,{_id:r.meta.actionId}),l=n.messages.filter(u=>u._id===r.meta.actionId).length>0;return Object.assign({},n,{isBotTyping:!1,messages:l?n.messages:n.messages.concat([i]),quickReplies:i.quickReplies?i.quickReplies:[]})}case qh:{const i=r.messages,l=i.length?i[i.length-1]:void 0;return Object.assign({},n,{isBotTyping:!1,messages:i,quickReplies:(l==null?void 0:l.quickReplies)||[]})}case Gh:return Zr(r.message),n;case Ee.ActionTypes.EVENT_TO_GUEST:return Zr(r.event),n;case Ee.ActionTypes.DRAWER_OPEN:return Object.assign({},n,{drawerContentUrl:r.payload.parameters.contentUrl});case Ee.ActionTypes.DRAWER_CLOSE:return Object.assign({},n,{drawerContentUrl:void 0});case Ee.ActionTypes.GUEST_LOCALE_CHANGED:return Object.assign({},n,{locale:r.payload.locale});case Hb:return Zr(r),n;case Lb:return Zr(r),n;case Fh:{const i=new Ee.TextMessage(r.transcription,new Ee.GuestUser),l=Object.assign({},i,{_id:ph()});return U_(n,l)}case Ee.ActionTypes.TRANSCRIPT_ITEM_GUEST_REACTION:{const i=n.messages.map(l=>l._id===r.payload.actionId?Object.assign({},l,{reaction:r.payload.reaction}):l);return Object.assign({},n,{messages:i})}case Vh:{const i={enabled:!0,rating:r.payload.rating};return Object.assign({},n,{conversationRating:i})}case Ee.ActionTypes.CONVERSATION_RATING_FROM_GUEST:{const i={...n.conversationRating,rating:r.payload};return Object.assign({},n,{conversationRating:i})}case Ph:return{...n,sourceInfos:{type:"loading",chunkId:r.payload.chunkId}};case Ub:return{...n,sourceInfos:{type:"loading-error"}};case jb:return{...n,sourceInfos:{type:"loaded",chunkId:r.payload.chunkId,knowledgeBaseType:r.payload.knowledgeBaseType,title:r.payload.title,content:r.payload.content,url:r.payload.url}};case Yh:return{...n,sourceInfos:void 0};default:return n}},U_=(n,r)=>{const i=n.messages[n.messages.length-1],l=(i==null?void 0:i.text)===r.text;return i&&i.sender.type===r.sender.type&&l?n:Object.assign({},n,{messages:n.messages.concat([r]),quickReplies:[]})},Zr=n=>{var r;g4()?(r=window.top)==null||r.postMessage(n,"*"):n.type==="webclient.change.url"&&window.open(n.url)},g4=()=>typeof window<"u"&&window.self!==window.top,H_={messages:[],quickReplies:[],isBotTyping:!1,conversationRating:{enabled:!1}},Uv=Kh({name:"intl",initialState:jv,reducers:{updateIntl:(n,r)=>{n.locale=r.payload.language,n.messages=r.payload.messages}}}),{updateIntl:y4}=Uv.actions,_4=Uv.reducer,b4={enableStartScreen:!1,enableStandaloneView:!1,enableTranscriptExportEmail:!1,enableTranscriptExportPdf:!1,enableGeneralConditions:!1,enableSpeechSupport:!1,commands:[]},Hv=Kh({name:"settings",initialState:b4,reducers:{setSettings(n,r){n.enableStartScreen=r.payload.enableStartScreen,n.enableStandaloneView=r.payload.enableStandaloneView,n.enableTranscriptExportEmail=r.payload.enableTranscriptExportEmail,n.enableTranscriptExportPdf=r.payload.enableTranscriptExportPdf,n.enableGeneralConditions=r.payload.enableGeneralConditions,n.enableSpeechSupport=r.payload.enableSpeechSupport,n.commands=r.payload.commands}}}),{setSettings:v4}=Hv.actions,E4=Hv.reducer,S4=Ib({settings:E4,chat:p4,startScreen:sO,connection:d4,intl:_4}),T4="bubble-chat",Lv="state-last-saved-at",zv="state",x4=n=>{try{if(!w4())return;const r=L_(n,Lv);if(O4(r))return;{const i=L_(n,zv);return i===null?void 0:JSON.parse(i)}}catch(r){console.error(r);return}},A4=(n,r)=>{try{const i=JSON.stringify(r);z_(n,zv,i);const l=new Date().toISOString();z_(n,Lv,l)}catch(i){console.error(i)}},O4=n=>{if(n===null)return!1;const r=new Date(n);return r.setHours(r.getHours()+12),new Date>r},w4=()=>typeof localStorage<"u",L_=(n,r)=>{const i=kv(n,r);return localStorage.getItem(i)},z_=(n,r,i)=>{const l=kv(n,r);return localStorage.setItem(l,i)},kv=(n,r)=>`${T4}-${n}-${r}`,xn=Object.create(null);xn.open="0";xn.close="1";xn.ping="2";xn.pong="3";xn.message="4";xn.upgrade="5";xn.noop="6";const ao=Object.create(null);Object.keys(xn).forEach(n=>{ao[xn[n]]=n});const xh={type:"error",data:"parser error"},Gv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",qv=typeof ArrayBuffer=="function",Iv=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,od=({type:n,data:r},i,l)=>Gv&&r instanceof Blob?i?l(r):k_(r,l):qv&&(r instanceof ArrayBuffer||Iv(r))?i?l(r):k_(new Blob([r]),l):l(xn[n]+(r||"")),k_=(n,r)=>{const i=new FileReader;return i.onload=function(){const l=i.result.split(",")[1];r("b"+(l||""))},i.readAsDataURL(n)};function G_(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let $f;function R4(n,r){if(Gv&&n.data instanceof Blob)return n.data.arrayBuffer().then(G_).then(r);if(qv&&(n.data instanceof ArrayBuffer||Iv(n.data)))return r(G_(n.data));od(n,!1,i=>{$f||($f=new TextEncoder),r($f.encode(i))})}const q_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<q_.length;n++)rs[q_.charCodeAt(n)]=n;const C4=n=>{let r=n.length*.75,i=n.length,l,u=0,f,h,d,m;n[n.length-1]==="="&&(r--,n[n.length-2]==="="&&r--);const g=new ArrayBuffer(r),_=new Uint8Array(g);for(l=0;l<i;l+=4)f=rs[n.charCodeAt(l)],h=rs[n.charCodeAt(l+1)],d=rs[n.charCodeAt(l+2)],m=rs[n.charCodeAt(l+3)],_[u++]=f<<2|h>>4,_[u++]=(h&15)<<4|d>>2,_[u++]=(d&3)<<6|m&63;return g},N4=typeof ArrayBuffer=="function",ud=(n,r)=>{if(typeof n!="string")return{type:"message",data:Fv(n,r)};const i=n.charAt(0);return i==="b"?{type:"message",data:D4(n.substring(1),r)}:ao[i]?n.length>1?{type:ao[i],data:n.substring(1)}:{type:ao[i]}:xh},D4=(n,r)=>{if(N4){const i=C4(n);return Fv(i,r)}else return{base64:!0,data:n}},Fv=(n,r)=>{switch(r){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},Vv="",M4=(n,r)=>{const i=n.length,l=new Array(i);let u=0;n.forEach((f,h)=>{od(f,!1,d=>{l[h]=d,++u===i&&r(l.join(Vv))})})},B4=(n,r)=>{const i=n.split(Vv),l=[];for(let u=0;u<i.length;u++){const f=ud(i[u],r);if(l.push(f),f.type==="error")break}return l};function j4(){return new TransformStream({transform(n,r){R4(n,i=>{const l=i.length;let u;if(l<126)u=new Uint8Array(1),new DataView(u.buffer).setUint8(0,l);else if(l<65536){u=new Uint8Array(3);const f=new DataView(u.buffer);f.setUint8(0,126),f.setUint16(1,l)}else{u=new Uint8Array(9);const f=new DataView(u.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(l))}n.data&&typeof n.data!="string"&&(u[0]|=128),r.enqueue(u),r.enqueue(i)})}})}let Jf;function eo(n){return n.reduce((r,i)=>r+i.length,0)}function to(n,r){if(n[0].length===r)return n.shift();const i=new Uint8Array(r);let l=0;for(let u=0;u<r;u++)i[u]=n[0][l++],l===n[0].length&&(n.shift(),l=0);return n.length&&l<n[0].length&&(n[0]=n[0].slice(l)),i}function U4(n,r){Jf||(Jf=new TextDecoder);const i=[];let l=0,u=-1,f=!1;return new TransformStream({transform(h,d){for(i.push(h);;){if(l===0){if(eo(i)<1)break;const m=to(i,1);f=(m[0]&128)===128,u=m[0]&127,u<126?l=3:u===126?l=1:l=2}else if(l===1){if(eo(i)<2)break;const m=to(i,2);u=new DataView(m.buffer,m.byteOffset,m.length).getUint16(0),l=3}else if(l===2){if(eo(i)<8)break;const m=to(i,8),g=new DataView(m.buffer,m.byteOffset,m.length),_=g.getUint32(0);if(_>Math.pow(2,21)-1){d.enqueue(xh);break}u=_*Math.pow(2,32)+g.getUint32(4),l=3}else{if(eo(i)<u)break;const m=to(i,u);d.enqueue(ud(f?m:Jf.decode(m),r)),l=0}if(u===0||u>n){d.enqueue(xh);break}}}})}const Pv=4;function We(n){if(n)return H4(n)}function H4(n){for(var r in We.prototype)n[r]=We.prototype[r];return n}We.prototype.on=We.prototype.addEventListener=function(n,r){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(r),this};We.prototype.once=function(n,r){function i(){this.off(n,i),r.apply(this,arguments)}return i.fn=r,this.on(n,i),this};We.prototype.off=We.prototype.removeListener=We.prototype.removeAllListeners=We.prototype.removeEventListener=function(n,r){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var i=this._callbacks["$"+n];if(!i)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var l,u=0;u<i.length;u++)if(l=i[u],l===r||l.fn===r){i.splice(u,1);break}return i.length===0&&delete this._callbacks["$"+n],this};We.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var r=new Array(arguments.length-1),i=this._callbacks["$"+n],l=1;l<arguments.length;l++)r[l-1]=arguments[l];if(i){i=i.slice(0);for(var l=0,u=i.length;l<u;++l)i[l].apply(this,r)}return this};We.prototype.emitReserved=We.prototype.emit;We.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};We.prototype.hasListeners=function(n){return!!this.listeners(n).length};const No=typeof Promise=="function"&&typeof Promise.resolve=="function"?r=>Promise.resolve().then(r):(r,i)=>i(r,0),Jt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),L4="arraybuffer";function Yv(n,...r){return r.reduce((i,l)=>(n.hasOwnProperty(l)&&(i[l]=n[l]),i),{})}const z4=Jt.setTimeout,k4=Jt.clearTimeout;function Do(n,r){r.useNativeTimers?(n.setTimeoutFn=z4.bind(Jt),n.clearTimeoutFn=k4.bind(Jt)):(n.setTimeoutFn=Jt.setTimeout.bind(Jt),n.clearTimeoutFn=Jt.clearTimeout.bind(Jt))}const G4=1.33;function q4(n){return typeof n=="string"?I4(n):Math.ceil((n.byteLength||n.size)*G4)}function I4(n){let r=0,i=0;for(let l=0,u=n.length;l<u;l++)r=n.charCodeAt(l),r<128?i+=1:r<2048?i+=2:r<55296||r>=57344?i+=3:(l++,i+=4);return i}function Zv(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function F4(n){let r="";for(let i in n)n.hasOwnProperty(i)&&(r.length&&(r+="&"),r+=encodeURIComponent(i)+"="+encodeURIComponent(n[i]));return r}function V4(n){let r={},i=n.split("&");for(let l=0,u=i.length;l<u;l++){let f=i[l].split("=");r[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return r}class P4 extends Error{constructor(r,i,l){super(r),this.description=i,this.context=l,this.type="TransportError"}}class cd extends We{constructor(r){super(),this.writable=!1,Do(this,r),this.opts=r,this.query=r.query,this.socket=r.socket,this.supportsBinary=!r.forceBase64}onError(r,i,l){return super.emitReserved("error",new P4(r,i,l)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(r){this.readyState==="open"&&this.write(r)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(r){const i=ud(r,this.socket.binaryType);this.onPacket(i)}onPacket(r){super.emitReserved("packet",r)}onClose(r){this.readyState="closed",super.emitReserved("close",r)}pause(r){}createUri(r,i={}){return r+"://"+this._hostname()+this._port()+this.opts.path+this._query(i)}_hostname(){const r=this.opts.hostname;return r.indexOf(":")===-1?r:"["+r+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(r){const i=F4(r);return i.length?"?"+i:""}}class Y4 extends cd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(r){this.readyState="pausing";const i=()=>{this.readyState="paused",r()};if(this._polling||!this.writable){let l=0;this._polling&&(l++,this.once("pollComplete",function(){--l||i()})),this.writable||(l++,this.once("drain",function(){--l||i()}))}else i()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(r){const i=l=>{if(this.readyState==="opening"&&l.type==="open"&&this.onOpen(),l.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(l)};B4(r,this.socket.binaryType).forEach(i),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const r=()=>{this.write([{type:"close"}])};this.readyState==="open"?r():this.once("open",r)}write(r){this.writable=!1,M4(r,i=>{this.doWrite(i,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const r=this.opts.secure?"https":"http",i=this.query||{};return this.opts.timestampRequests!==!1&&(i[this.opts.timestampParam]=Zv()),!this.supportsBinary&&!i.sid&&(i.b64=1),this.createUri(r,i)}}let Xv=!1;try{Xv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Z4=Xv;function X4(){}class Q4 extends Y4{constructor(r){if(super(r),typeof location<"u"){const i=location.protocol==="https:";let l=location.port;l||(l=i?"443":"80"),this.xd=typeof location<"u"&&r.hostname!==location.hostname||l!==r.port}}doWrite(r,i){const l=this.request({method:"POST",data:r});l.on("success",i),l.on("error",(u,f)=>{this.onError("xhr post error",u,f)})}doPoll(){const r=this.request();r.on("data",this.onData.bind(this)),r.on("error",(i,l)=>{this.onError("xhr poll error",i,l)}),this.pollXhr=r}}class En extends We{constructor(r,i,l){super(),this.createRequest=r,Do(this,l),this._opts=l,this._method=l.method||"GET",this._uri=i,this._data=l.data!==void 0?l.data:null,this._create()}_create(){var r;const i=Yv(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;const l=this._xhr=this.createRequest(i);try{l.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){l.setDisableHeaderCheck&&l.setDisableHeaderCheck(!0);for(let u in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(u)&&l.setRequestHeader(u,this._opts.extraHeaders[u])}}catch{}if(this._method==="POST")try{l.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{l.setRequestHeader("Accept","*/*")}catch{}(r=this._opts.cookieJar)===null||r===void 0||r.addCookies(l),"withCredentials"in l&&(l.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(l.timeout=this._opts.requestTimeout),l.onreadystatechange=()=>{var u;l.readyState===3&&((u=this._opts.cookieJar)===null||u===void 0||u.parseCookies(l.getResponseHeader("set-cookie"))),l.readyState===4&&(l.status===200||l.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof l.status=="number"?l.status:0)},0))},l.send(this._data)}catch(u){this.setTimeoutFn(()=>{this._onError(u)},0);return}typeof document<"u"&&(this._index=En.requestsCount++,En.requests[this._index]=this)}_onError(r){this.emitReserved("error",r,this._xhr),this._cleanup(!0)}_cleanup(r){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=X4,r)try{this._xhr.abort()}catch{}typeof document<"u"&&delete En.requests[this._index],this._xhr=null}}_onLoad(){const r=this._xhr.responseText;r!==null&&(this.emitReserved("data",r),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}En.requestsCount=0;En.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",I_);else if(typeof addEventListener=="function"){const n="onpagehide"in Jt?"pagehide":"unload";addEventListener(n,I_,!1)}}function I_(){for(let n in En.requests)En.requests.hasOwnProperty(n)&&En.requests[n].abort()}const K4=function(){const n=Qv({xdomain:!1});return n&&n.responseType!==null}();class $4 extends Q4{constructor(r){super(r);const i=r&&r.forceBase64;this.supportsBinary=K4&&!i}request(r={}){return Object.assign(r,{xd:this.xd},this.opts),new En(Qv,this.uri(),r)}}function Qv(n){const r=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!r||Z4))return new XMLHttpRequest}catch{}if(!r)try{return new Jt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Kv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class J4 extends cd{get name(){return"websocket"}doOpen(){const r=this.uri(),i=this.opts.protocols,l=Kv?{}:Yv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(l.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(r,i,l)}catch(u){return this.emitReserved("error",u)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=r=>this.onClose({description:"websocket connection closed",context:r}),this.ws.onmessage=r=>this.onData(r.data),this.ws.onerror=r=>this.onError("websocket error",r)}write(r){this.writable=!1;for(let i=0;i<r.length;i++){const l=r[i],u=i===r.length-1;od(l,this.supportsBinary,f=>{try{this.doWrite(l,f)}catch{}u&&No(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const r=this.opts.secure?"wss":"ws",i=this.query||{};return this.opts.timestampRequests&&(i[this.opts.timestampParam]=Zv()),this.supportsBinary||(i.b64=1),this.createUri(r,i)}}const Wf=Jt.WebSocket||Jt.MozWebSocket;class W4 extends J4{createSocket(r,i,l){return Kv?new Wf(r,i,l):i?new Wf(r,i):new Wf(r)}doWrite(r,i){this.ws.send(i)}}class eN extends cd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(r){return this.emitReserved("error",r)}this._transport.closed.then(()=>{this.onClose()}).catch(r=>{this.onError("webtransport error",r)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(r=>{const i=U4(Number.MAX_SAFE_INTEGER,this.socket.binaryType),l=r.readable.pipeThrough(i).getReader(),u=j4();u.readable.pipeTo(r.writable),this._writer=u.writable.getWriter();const f=()=>{l.read().then(({done:d,value:m})=>{d||(this.onPacket(m),f())}).catch(d=>{})};f();const h={type:"open"};this.query.sid&&(h.data=`{"sid":"${this.query.sid}"}`),this._writer.write(h).then(()=>this.onOpen())})})}write(r){this.writable=!1;for(let i=0;i<r.length;i++){const l=r[i],u=i===r.length-1;this._writer.write(l).then(()=>{u&&No(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var r;(r=this._transport)===null||r===void 0||r.close()}}const tN={websocket:W4,webtransport:eN,polling:$4},nN=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,rN=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ah(n){if(n.length>8e3)throw"URI too long";const r=n,i=n.indexOf("["),l=n.indexOf("]");i!=-1&&l!=-1&&(n=n.substring(0,i)+n.substring(i,l).replace(/:/g,";")+n.substring(l,n.length));let u=nN.exec(n||""),f={},h=14;for(;h--;)f[rN[h]]=u[h]||"";return i!=-1&&l!=-1&&(f.source=r,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=aN(f,f.path),f.queryKey=iN(f,f.query),f}function aN(n,r){const i=/\/{2,9}/g,l=r.replace(i,"/").split("/");return(r.slice(0,1)=="/"||r.length===0)&&l.splice(0,1),r.slice(-1)=="/"&&l.splice(l.length-1,1),l}function iN(n,r){const i={};return r.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(l,u,f){u&&(i[u]=f)}),i}const Oh=typeof addEventListener=="function"&&typeof removeEventListener=="function",io=[];Oh&&addEventListener("offline",()=>{io.forEach(n=>n())},!1);class Er extends We{constructor(r,i){if(super(),this.binaryType=L4,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,r&&typeof r=="object"&&(i=r,r=null),r){const l=Ah(r);i.hostname=l.host,i.secure=l.protocol==="https"||l.protocol==="wss",i.port=l.port,l.query&&(i.query=l.query)}else i.host&&(i.hostname=Ah(i.host).host);Do(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(l=>{const u=l.prototype.name;this.transports.push(u),this._transportsByName[u]=l}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=V4(this.opts.query)),Oh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},io.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(r){const i=Object.assign({},this.opts.query);i.EIO=Pv,i.transport=r,this.id&&(i.sid=this.id);const l=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[r]);return new this._transportsByName[r](l)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const r=this.opts.rememberUpgrade&&Er.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const i=this.createTransport(r);i.open(),this.setTransport(i)}setTransport(r){this.transport&&this.transport.removeAllListeners(),this.transport=r,r.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",Er.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",r),this.emitReserved("heartbeat"),r.type){case"open":this.onHandshake(JSON.parse(r.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const i=new Error("server error");i.code=r.data,this._onError(i);break;case"message":this.emitReserved("data",r.data),this.emitReserved("message",r.data);break}}onHandshake(r){this.emitReserved("handshake",r),this.id=r.sid,this.transport.query.sid=r.sid,this._pingInterval=r.pingInterval,this._pingTimeout=r.pingTimeout,this._maxPayload=r.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const r=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+r,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},r),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const r=this._getWritablePackets();this.transport.send(r),this._prevBufferLen=r.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let i=1;for(let l=0;l<this.writeBuffer.length;l++){const u=this.writeBuffer[l].data;if(u&&(i+=q4(u)),l>0&&i>this._maxPayload)return this.writeBuffer.slice(0,l);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const r=Date.now()>this._pingTimeoutTime;return r&&(this._pingTimeoutTime=0,No(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),r}write(r,i,l){return this._sendPacket("message",r,i,l),this}send(r,i,l){return this._sendPacket("message",r,i,l),this}_sendPacket(r,i,l,u){if(typeof i=="function"&&(u=i,i=void 0),typeof l=="function"&&(u=l,l=null),this.readyState==="closing"||this.readyState==="closed")return;l=l||{},l.compress=l.compress!==!1;const f={type:r,data:i,options:l};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),u&&this.once("flush",u),this.flush()}close(){const r=()=>{this._onClose("forced close"),this.transport.close()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),r()},l=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?l():r()}):this.upgrading?l():r()),this}_onError(r){if(Er.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",r),this._onClose("transport error",r)}_onClose(r,i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Oh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const l=io.indexOf(this._offlineEventListener);l!==-1&&io.splice(l,1)}this.readyState="closed",this.id=null,this.emitReserved("close",r,i),this.writeBuffer=[],this._prevBufferLen=0}}}Er.protocol=Pv;class sN extends Er{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let r=0;r<this._upgrades.length;r++)this._probe(this._upgrades[r])}_probe(r){let i=this.createTransport(r),l=!1;Er.priorWebsocketSuccess=!1;const u=()=>{l||(i.send([{type:"ping",data:"probe"}]),i.once("packet",E=>{if(!l)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",i),!i)return;Er.priorWebsocketSuccess=i.name==="websocket",this.transport.pause(()=>{l||this.readyState!=="closed"&&(_(),this.setTransport(i),i.send([{type:"upgrade"}]),this.emitReserved("upgrade",i),i=null,this.upgrading=!1,this.flush())})}else{const y=new Error("probe error");y.transport=i.name,this.emitReserved("upgradeError",y)}}))};function f(){l||(l=!0,_(),i.close(),i=null)}const h=E=>{const y=new Error("probe error: "+E);y.transport=i.name,f(),this.emitReserved("upgradeError",y)};function d(){h("transport closed")}function m(){h("socket closed")}function g(E){i&&E.name!==i.name&&f()}const _=()=>{i.removeListener("open",u),i.removeListener("error",h),i.removeListener("close",d),this.off("close",m),this.off("upgrading",g)};i.once("open",u),i.once("error",h),i.once("close",d),this.once("close",m),this.once("upgrading",g),this._upgrades.indexOf("webtransport")!==-1&&r!=="webtransport"?this.setTimeoutFn(()=>{l||i.open()},200):i.open()}onHandshake(r){this._upgrades=this._filterUpgrades(r.upgrades),super.onHandshake(r)}_filterUpgrades(r){const i=[];for(let l=0;l<r.length;l++)~this.transports.indexOf(r[l])&&i.push(r[l]);return i}}let lN=class extends sN{constructor(r,i={}){const l=typeof r=="object"?r:i;(!l.transports||l.transports&&typeof l.transports[0]=="string")&&(l.transports=(l.transports||["polling","websocket","webtransport"]).map(u=>tN[u]).filter(u=>!!u)),super(r,l)}};function oN(n,r="",i){let l=n;i=i||typeof location<"u"&&location,n==null&&(n=i.protocol+"//"+i.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=i.protocol+n:n=i.host+n),/^(https?|wss?):\/\//.test(n)||(typeof i<"u"?n=i.protocol+"//"+n:n="https://"+n),l=Ah(n)),l.port||(/^(http|ws)$/.test(l.protocol)?l.port="80":/^(http|ws)s$/.test(l.protocol)&&(l.port="443")),l.path=l.path||"/";const f=l.host.indexOf(":")!==-1?"["+l.host+"]":l.host;return l.id=l.protocol+"://"+f+":"+l.port+r,l.href=l.protocol+"://"+f+(i&&i.port===l.port?"":":"+l.port),l}const uN=typeof ArrayBuffer=="function",cN=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,$v=Object.prototype.toString,fN=typeof Blob=="function"||typeof Blob<"u"&&$v.call(Blob)==="[object BlobConstructor]",hN=typeof File=="function"||typeof File<"u"&&$v.call(File)==="[object FileConstructor]";function fd(n){return uN&&(n instanceof ArrayBuffer||cN(n))||fN&&n instanceof Blob||hN&&n instanceof File}function so(n,r){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let i=0,l=n.length;i<l;i++)if(so(n[i]))return!0;return!1}if(fd(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return so(n.toJSON(),!0);for(const i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&so(n[i]))return!0;return!1}function dN(n){const r=[],i=n.data,l=n;return l.data=wh(i,r),l.attachments=r.length,{packet:l,buffers:r}}function wh(n,r){if(!n)return n;if(fd(n)){const i={_placeholder:!0,num:r.length};return r.push(n),i}else if(Array.isArray(n)){const i=new Array(n.length);for(let l=0;l<n.length;l++)i[l]=wh(n[l],r);return i}else if(typeof n=="object"&&!(n instanceof Date)){const i={};for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(i[l]=wh(n[l],r));return i}return n}function mN(n,r){return n.data=Rh(n.data,r),delete n.attachments,n}function Rh(n,r){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<r.length)return r[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let i=0;i<n.length;i++)n[i]=Rh(n[i],r);else if(typeof n=="object")for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(n[i]=Rh(n[i],r));return n}const pN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],gN=5;var Ae;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(Ae||(Ae={}));class yN{constructor(r){this.replacer=r}encode(r){return(r.type===Ae.EVENT||r.type===Ae.ACK)&&so(r)?this.encodeAsBinary({type:r.type===Ae.EVENT?Ae.BINARY_EVENT:Ae.BINARY_ACK,nsp:r.nsp,data:r.data,id:r.id}):[this.encodeAsString(r)]}encodeAsString(r){let i=""+r.type;return(r.type===Ae.BINARY_EVENT||r.type===Ae.BINARY_ACK)&&(i+=r.attachments+"-"),r.nsp&&r.nsp!=="/"&&(i+=r.nsp+","),r.id!=null&&(i+=r.id),r.data!=null&&(i+=JSON.stringify(r.data,this.replacer)),i}encodeAsBinary(r){const i=dN(r),l=this.encodeAsString(i.packet),u=i.buffers;return u.unshift(l),u}}function F_(n){return Object.prototype.toString.call(n)==="[object Object]"}class hd extends We{constructor(r){super(),this.reviver=r}add(r){let i;if(typeof r=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");i=this.decodeString(r);const l=i.type===Ae.BINARY_EVENT;l||i.type===Ae.BINARY_ACK?(i.type=l?Ae.EVENT:Ae.ACK,this.reconstructor=new _N(i),i.attachments===0&&super.emitReserved("decoded",i)):super.emitReserved("decoded",i)}else if(fd(r)||r.base64)if(this.reconstructor)i=this.reconstructor.takeBinaryData(r),i&&(this.reconstructor=null,super.emitReserved("decoded",i));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+r)}decodeString(r){let i=0;const l={type:Number(r.charAt(0))};if(Ae[l.type]===void 0)throw new Error("unknown packet type "+l.type);if(l.type===Ae.BINARY_EVENT||l.type===Ae.BINARY_ACK){const f=i+1;for(;r.charAt(++i)!=="-"&&i!=r.length;);const h=r.substring(f,i);if(h!=Number(h)||r.charAt(i)!=="-")throw new Error("Illegal attachments");l.attachments=Number(h)}if(r.charAt(i+1)==="/"){const f=i+1;for(;++i&&!(r.charAt(i)===","||i===r.length););l.nsp=r.substring(f,i)}else l.nsp="/";const u=r.charAt(i+1);if(u!==""&&Number(u)==u){const f=i+1;for(;++i;){const h=r.charAt(i);if(h==null||Number(h)!=h){--i;break}if(i===r.length)break}l.id=Number(r.substring(f,i+1))}if(r.charAt(++i)){const f=this.tryParse(r.substr(i));if(hd.isPayloadValid(l.type,f))l.data=f;else throw new Error("invalid payload")}return l}tryParse(r){try{return JSON.parse(r,this.reviver)}catch{return!1}}static isPayloadValid(r,i){switch(r){case Ae.CONNECT:return F_(i);case Ae.DISCONNECT:return i===void 0;case Ae.CONNECT_ERROR:return typeof i=="string"||F_(i);case Ae.EVENT:case Ae.BINARY_EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&pN.indexOf(i[0])===-1);case Ae.ACK:case Ae.BINARY_ACK:return Array.isArray(i)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class _N{constructor(r){this.packet=r,this.buffers=[],this.reconPack=r}takeBinaryData(r){if(this.buffers.push(r),this.buffers.length===this.reconPack.attachments){const i=mN(this.reconPack,this.buffers);return this.finishedReconstruction(),i}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const bN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:hd,Encoder:yN,get PacketType(){return Ae},protocol:gN},Symbol.toStringTag,{value:"Module"}));function un(n,r,i){return n.on(r,i),function(){n.off(r,i)}}const vN=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Jv extends We{constructor(r,i,l){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=r,this.nsp=i,l&&l.auth&&(this.auth=l.auth),this._opts=Object.assign({},l),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const r=this.io;this.subs=[un(r,"open",this.onopen.bind(this)),un(r,"packet",this.onpacket.bind(this)),un(r,"error",this.onerror.bind(this)),un(r,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...r){return r.unshift("message"),this.emit.apply(this,r),this}emit(r,...i){var l,u,f;if(vN.hasOwnProperty(r))throw new Error('"'+r.toString()+'" is a reserved event name');if(i.unshift(r),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(i),this;const h={type:Ae.EVENT,data:i};if(h.options={},h.options.compress=this.flags.compress!==!1,typeof i[i.length-1]=="function"){const _=this.ids++,E=i.pop();this._registerAckCallback(_,E),h.id=_}const d=(u=(l=this.io.engine)===null||l===void 0?void 0:l.transport)===null||u===void 0?void 0:u.writable,m=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!d||(m?(this.notifyOutgoingListeners(h),this.packet(h)):this.sendBuffer.push(h)),this.flags={},this}_registerAckCallback(r,i){var l;const u=(l=this.flags.timeout)!==null&&l!==void 0?l:this._opts.ackTimeout;if(u===void 0){this.acks[r]=i;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[r];for(let d=0;d<this.sendBuffer.length;d++)this.sendBuffer[d].id===r&&this.sendBuffer.splice(d,1);i.call(this,new Error("operation has timed out"))},u),h=(...d)=>{this.io.clearTimeoutFn(f),i.apply(this,d)};h.withError=!0,this.acks[r]=h}emitWithAck(r,...i){return new Promise((l,u)=>{const f=(h,d)=>h?u(h):l(d);f.withError=!0,i.push(f),this.emit(r,...i)})}_addToQueue(r){let i;typeof r[r.length-1]=="function"&&(i=r.pop());const l={id:this._queueSeq++,tryCount:0,pending:!1,args:r,flags:Object.assign({fromQueue:!0},this.flags)};r.push((u,...f)=>l!==this._queue[0]?void 0:(u!==null?l.tryCount>this._opts.retries&&(this._queue.shift(),i&&i(u)):(this._queue.shift(),i&&i(null,...f)),l.pending=!1,this._drainQueue())),this._queue.push(l),this._drainQueue()}_drainQueue(r=!1){if(!this.connected||this._queue.length===0)return;const i=this._queue[0];i.pending&&!r||(i.pending=!0,i.tryCount++,this.flags=i.flags,this.emit.apply(this,i.args))}packet(r){r.nsp=this.nsp,this.io._packet(r)}onopen(){typeof this.auth=="function"?this.auth(r=>{this._sendConnectPacket(r)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(r){this.packet({type:Ae.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},r):r})}onerror(r){this.connected||this.emitReserved("connect_error",r)}onclose(r,i){this.connected=!1,delete this.id,this.emitReserved("disconnect",r,i),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(r=>{if(!this.sendBuffer.some(l=>String(l.id)===r)){const l=this.acks[r];delete this.acks[r],l.withError&&l.call(this,new Error("socket has been disconnected"))}})}onpacket(r){if(r.nsp===this.nsp)switch(r.type){case Ae.CONNECT:r.data&&r.data.sid?this.onconnect(r.data.sid,r.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ae.EVENT:case Ae.BINARY_EVENT:this.onevent(r);break;case Ae.ACK:case Ae.BINARY_ACK:this.onack(r);break;case Ae.DISCONNECT:this.ondisconnect();break;case Ae.CONNECT_ERROR:this.destroy();const l=new Error(r.data.message);l.data=r.data.data,this.emitReserved("connect_error",l);break}}onevent(r){const i=r.data||[];r.id!=null&&i.push(this.ack(r.id)),this.connected?this.emitEvent(i):this.receiveBuffer.push(Object.freeze(i))}emitEvent(r){if(this._anyListeners&&this._anyListeners.length){const i=this._anyListeners.slice();for(const l of i)l.apply(this,r)}super.emit.apply(this,r),this._pid&&r.length&&typeof r[r.length-1]=="string"&&(this._lastOffset=r[r.length-1])}ack(r){const i=this;let l=!1;return function(...u){l||(l=!0,i.packet({type:Ae.ACK,id:r,data:u}))}}onack(r){const i=this.acks[r.id];typeof i=="function"&&(delete this.acks[r.id],i.withError&&r.data.unshift(null),i.apply(this,r.data))}onconnect(r,i){this.id=r,this.recovered=i&&this._pid===i,this._pid=i,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(r=>this.emitEvent(r)),this.receiveBuffer=[],this.sendBuffer.forEach(r=>{this.notifyOutgoingListeners(r),this.packet(r)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(r=>r()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ae.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(r){return this.flags.compress=r,this}get volatile(){return this.flags.volatile=!0,this}timeout(r){return this.flags.timeout=r,this}onAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(r),this}prependAny(r){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(r),this}offAny(r){if(!this._anyListeners)return this;if(r){const i=this._anyListeners;for(let l=0;l<i.length;l++)if(r===i[l])return i.splice(l,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(r),this}prependAnyOutgoing(r){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(r),this}offAnyOutgoing(r){if(!this._anyOutgoingListeners)return this;if(r){const i=this._anyOutgoingListeners;for(let l=0;l<i.length;l++)if(r===i[l])return i.splice(l,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(r){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const i=this._anyOutgoingListeners.slice();for(const l of i)l.apply(this,r.data)}}}function Ya(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}Ya.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var r=Math.random(),i=Math.floor(r*this.jitter*n);n=(Math.floor(r*10)&1)==0?n-i:n+i}return Math.min(n,this.max)|0};Ya.prototype.reset=function(){this.attempts=0};Ya.prototype.setMin=function(n){this.ms=n};Ya.prototype.setMax=function(n){this.max=n};Ya.prototype.setJitter=function(n){this.jitter=n};class Ch extends We{constructor(r,i){var l;super(),this.nsps={},this.subs=[],r&&typeof r=="object"&&(i=r,r=void 0),i=i||{},i.path=i.path||"/socket.io",this.opts=i,Do(this,i),this.reconnection(i.reconnection!==!1),this.reconnectionAttempts(i.reconnectionAttempts||1/0),this.reconnectionDelay(i.reconnectionDelay||1e3),this.reconnectionDelayMax(i.reconnectionDelayMax||5e3),this.randomizationFactor((l=i.randomizationFactor)!==null&&l!==void 0?l:.5),this.backoff=new Ya({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(i.timeout==null?2e4:i.timeout),this._readyState="closed",this.uri=r;const u=i.parser||bN;this.encoder=new u.Encoder,this.decoder=new u.Decoder,this._autoConnect=i.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(r){return arguments.length?(this._reconnection=!!r,r||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(r){return r===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=r,this)}reconnectionDelay(r){var i;return r===void 0?this._reconnectionDelay:(this._reconnectionDelay=r,(i=this.backoff)===null||i===void 0||i.setMin(r),this)}randomizationFactor(r){var i;return r===void 0?this._randomizationFactor:(this._randomizationFactor=r,(i=this.backoff)===null||i===void 0||i.setJitter(r),this)}reconnectionDelayMax(r){var i;return r===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=r,(i=this.backoff)===null||i===void 0||i.setMax(r),this)}timeout(r){return arguments.length?(this._timeout=r,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(r){if(~this._readyState.indexOf("open"))return this;this.engine=new lN(this.uri,this.opts);const i=this.engine,l=this;this._readyState="opening",this.skipReconnect=!1;const u=un(i,"open",function(){l.onopen(),r&&r()}),f=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),r?r(d):this.maybeReconnectOnOpen()},h=un(i,"error",f);if(this._timeout!==!1){const d=this._timeout,m=this.setTimeoutFn(()=>{u(),f(new Error("timeout")),i.close()},d);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(u),this.subs.push(h),this}connect(r){return this.open(r)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const r=this.engine;this.subs.push(un(r,"ping",this.onping.bind(this)),un(r,"data",this.ondata.bind(this)),un(r,"error",this.onerror.bind(this)),un(r,"close",this.onclose.bind(this)),un(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(r){try{this.decoder.add(r)}catch(i){this.onclose("parse error",i)}}ondecoded(r){No(()=>{this.emitReserved("packet",r)},this.setTimeoutFn)}onerror(r){this.emitReserved("error",r)}socket(r,i){let l=this.nsps[r];return l?this._autoConnect&&!l.active&&l.connect():(l=new Jv(this,r,i),this.nsps[r]=l),l}_destroy(r){const i=Object.keys(this.nsps);for(const l of i)if(this.nsps[l].active)return;this._close()}_packet(r){const i=this.encoder.encode(r);for(let l=0;l<i.length;l++)this.engine.write(i[l],r.options)}cleanup(){this.subs.forEach(r=>r()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(r,i){var l;this.cleanup(),(l=this.engine)===null||l===void 0||l.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",r,i),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const r=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const i=this.backoff.duration();this._reconnecting=!0;const l=this.setTimeoutFn(()=>{r.skipReconnect||(this.emitReserved("reconnect_attempt",r.backoff.attempts),!r.skipReconnect&&r.open(u=>{u?(r._reconnecting=!1,r.reconnect(),this.emitReserved("reconnect_error",u)):r.onreconnect()}))},i);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}}onreconnect(){const r=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",r)}}const es={};function lo(n,r){typeof n=="object"&&(r=n,n=void 0),r=r||{};const i=oN(n,r.path||"/socket.io"),l=i.source,u=i.id,f=i.path,h=es[u]&&f in es[u].nsps,d=r.forceNew||r["force new connection"]||r.multiplex===!1||h;let m;return d?m=new Ch(l,r):(es[u]||(es[u]=new Ch(l,r)),m=es[u]),i.query&&!r.query&&(r.query=i.queryKey),m.socket(i.path,r)}Object.assign(lo,{Manager:Ch,Socket:Jv,io:lo,connect:lo});const EN=[Ee.ActionTypes.MESSAGE_TO_GUEST,Ee.ActionTypes.EVENT_TO_GUEST,Ee.ActionTypes.TYPING_ON,Ee.ActionTypes.TYPING_OFF,Ee.ActionTypes.RESTART_CHAT_REQUEST,...cO,...lA,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],SN=({dispatch:n,getState:r})=>i=>{let l=null;return u=>{const f=i(u);if(u.type===$h){l!=null&&l.disconnect(),n(dO());const h=`/chat?${vo.stringify(u.querystrings)}`;l=lo(`/${u.clientName}${h}`),l.on("action",n),l.on("connect",()=>n(mO())),l.on("disconnect",()=>n(pO())),l.on("reconnect",()=>n(gO())),l.on("set-translations",(d,m)=>{n(y4({language:d,messages:f4(d,m)}))}),l.on("set-settings",d=>{n(v4(d))}),l.on("enable-conversation-rating",d=>n(hA(d))),l.on("speech-transcription",d=>n(uA(d))),l.on("restore-client-state",d=>{n(hO(d.sessionId)),n(mA(d.messages))}),l.on("expand-window",({devices:d,initial:m=!1})=>{n({type:Hb,devices:d,initial:m})}),l.on("restart-chat",()=>{n(wo(u.clientName,u.querystrings))})}else if(u.type===Ao)l==null||l.emit("start-chat",u.payload);else if(u.type===Oo)l==null||l.emit("terminate-session",u.payload);else if(u.type===sA)l==null||l.emit("get-started",JSON.stringify(u));else if(u.type===Ih)l==null||l.emit("audio-message",u.buffer);else if(u.type===Ee.ActionTypes.CONVERSATION_RATING_FROM_GUEST)l==null||l.emit("conversation-rating",u.payload);else if(u.type===zb){const{connection:{sessionId:h}}=r();window.location.href=`/transcript-pdf/${h}`}else EN.indexOf(u.type)===-1&&u.meta===void 0&&l&&l.emit("action",JSON.stringify(u));return f}},Wv=Rv(),TN={...x4(Wv),intl:jv},Nh=PA({middleware:n=>n().concat(SN),reducer:S4,preloadedState:TN});Nh.subscribe(r4(()=>{const n=Nh.getState();A4(Wv,{connection:n.connection,startScreen:n.startScreen})},1e3));const xN=document.getElementById("root"),AN=B2.createRoot(xN);AN.render(b.jsx(NS,{store:Nh,children:b.jsx(F6,{})}));
|
|
119
|
-
//# sourceMappingURL=index-
|
|
119
|
+
//# sourceMappingURL=index-mzL-9NFo.js.map
|