@botfabrik/engine-webclient 4.104.32-alpha.0 → 4.104.33-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,134 @@
1
+ (function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))u(h);new MutationObserver(h=>{for(const m of h)if(m.type==="childList")for(const y of m.addedNodes)y.tagName==="LINK"&&y.rel==="modulepreload"&&u(y)}).observe(document,{childList:!0,subtree:!0});function o(h){const m={};return h.integrity&&(m.integrity=h.integrity),h.referrerPolicy&&(m.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?m.credentials="include":h.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function u(h){if(h.ep)return;h.ep=!0;const m=o(h);fetch(h.href,m)}})();function getDefaultExportFromCjs(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var jsxRuntime={exports:{}},reactJsxRuntime_production={};var hasRequiredReactJsxRuntime_production;function requireReactJsxRuntime_production(){if(hasRequiredReactJsxRuntime_production)return reactJsxRuntime_production;hasRequiredReactJsxRuntime_production=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function o(u,h,m){var y=null;if(m!==void 0&&(y=""+m),h.key!==void 0&&(y=""+h.key),"key"in h){m={};for(var _ in h)_!=="key"&&(m[_]=h[_])}else m=h;return h=m.ref,{$$typeof:n,type:u,key:y,ref:h!==void 0?h:null,props:m}}return reactJsxRuntime_production.Fragment=i,reactJsxRuntime_production.jsx=o,reactJsxRuntime_production.jsxs=o,reactJsxRuntime_production}var hasRequiredJsxRuntime;function requireJsxRuntime(){return hasRequiredJsxRuntime||(hasRequiredJsxRuntime=1,jsxRuntime.exports=requireReactJsxRuntime_production()),jsxRuntime.exports}var jsxRuntimeExports=requireJsxRuntime(),client={exports:{}},reactDomClient_production={},scheduler={exports:{}},scheduler_production={};var hasRequiredScheduler_production;function requireScheduler_production(){return hasRequiredScheduler_production||(hasRequiredScheduler_production=1,(function(n){function i(F,ce){var te=F.length;F.push(ce);e:for(;0<te;){var Se=te-1>>>1,xe=F[Se];if(0<h(xe,ce))F[Se]=ce,F[te]=xe,te=Se;else break e}}function o(F){return F.length===0?null:F[0]}function u(F){if(F.length===0)return null;var ce=F[0],te=F.pop();if(te!==ce){F[0]=te;e:for(var Se=0,xe=F.length,q=xe>>>1;Se<q;){var ie=2*(Se+1)-1,oe=F[ie],Ee=ie+1,pe=F[Ee];if(0>h(oe,te))Ee<xe&&0>h(pe,oe)?(F[Se]=pe,F[Ee]=te,Se=Ee):(F[Se]=oe,F[ie]=te,Se=ie);else if(Ee<xe&&0>h(pe,te))F[Se]=pe,F[Ee]=te,Se=Ee;else break e}}return ce}function h(F,ce){var te=F.sortIndex-ce.sortIndex;return te!==0?te:F.id-ce.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;n.unstable_now=function(){return m.now()}}else{var y=Date,_=y.now();n.unstable_now=function(){return y.now()-_}}var v=[],E=[],S=1,w=null,T=3,R=!1,D=!1,N=!1,M=!1,L=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function H(F){for(var ce=o(E);ce!==null;){if(ce.callback===null)u(E);else if(ce.startTime<=F)u(E),ce.sortIndex=ce.expirationTime,i(v,ce);else break;ce=o(E)}}function Y(F){if(N=!1,H(F),!D)if(o(v)!==null)D=!0,K||(K=!0,le());else{var ce=o(E);ce!==null&&_e(Y,ce.startTime-F)}}var K=!1,$=-1,Q=5,ne=-1;function fe(){return M?!0:!(n.unstable_now()-ne<Q)}function W(){if(M=!1,K){var F=n.unstable_now();ne=F;var ce=!0;try{e:{D=!1,N&&(N=!1,z($),$=-1),R=!0;var te=T;try{t:{for(H(F),w=o(v);w!==null&&!(w.expirationTime>F&&fe());){var Se=w.callback;if(typeof Se=="function"){w.callback=null,T=w.priorityLevel;var xe=Se(w.expirationTime<=F);if(F=n.unstable_now(),typeof xe=="function"){w.callback=xe,H(F),ce=!0;break t}w===o(v)&&u(v),H(F)}else u(v);w=o(v)}if(w!==null)ce=!0;else{var q=o(E);q!==null&&_e(Y,q.startTime-F),ce=!1}}break e}finally{w=null,T=te,R=!1}ce=void 0}}finally{ce?le():K=!1}}}var le;if(typeof U=="function")le=function(){U(W)};else if(typeof MessageChannel<"u"){var be=new MessageChannel,ve=be.port2;be.port1.onmessage=W,le=function(){ve.postMessage(null)}}else le=function(){L(W,0)};function _e(F,ce){$=L(function(){F(n.unstable_now())},ce)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(F){F.callback=null},n.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Q=0<F?Math.floor(1e3/F):5},n.unstable_getCurrentPriorityLevel=function(){return T},n.unstable_next=function(F){switch(T){case 1:case 2:case 3:var ce=3;break;default:ce=T}var te=T;T=ce;try{return F()}finally{T=te}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(F,ce){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var te=T;T=F;try{return ce()}finally{T=te}},n.unstable_scheduleCallback=function(F,ce,te){var Se=n.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?Se+te:Se):te=Se,F){case 1:var xe=-1;break;case 2:xe=250;break;case 5:xe=1073741823;break;case 4:xe=1e4;break;default:xe=5e3}return xe=te+xe,F={id:S++,callback:ce,priorityLevel:F,startTime:te,expirationTime:xe,sortIndex:-1},te>Se?(F.sortIndex=te,i(E,F),o(v)===null&&F===o(E)&&(N?(z($),$=-1):N=!0,_e(Y,te-Se))):(F.sortIndex=xe,i(v,F),D||R||(D=!0,K||(K=!0,le()))),F},n.unstable_shouldYield=fe,n.unstable_wrapCallback=function(F){var ce=T;return function(){var te=T;T=ce;try{return F.apply(this,arguments)}finally{T=te}}}})(scheduler_production)),scheduler_production}var hasRequiredScheduler;function requireScheduler(){return hasRequiredScheduler||(hasRequiredScheduler=1,scheduler.exports=requireScheduler_production()),scheduler.exports}var react={exports:{}},react_production={};var hasRequiredReact_production;function requireReact_production(){if(hasRequiredReact_production)return react_production;hasRequiredReact_production=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),y=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),E=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),T=Symbol.iterator;function R(q){return q===null||typeof q!="object"?null:(q=T&&q[T]||q["@@iterator"],typeof q=="function"?q:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,M={};function L(q,ie,oe){this.props=q,this.context=ie,this.refs=M,this.updater=oe||D}L.prototype.isReactComponent={},L.prototype.setState=function(q,ie){if(typeof q!="object"&&typeof q!="function"&&q!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,q,ie,"setState")},L.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};function z(){}z.prototype=L.prototype;function U(q,ie,oe){this.props=q,this.context=ie,this.refs=M,this.updater=oe||D}var H=U.prototype=new z;H.constructor=U,N(H,L.prototype),H.isPureReactComponent=!0;var Y=Array.isArray;function K(){}var $={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function ne(q,ie,oe){var Ee=oe.ref;return{$$typeof:n,type:q,key:ie,ref:Ee!==void 0?Ee:null,props:oe}}function fe(q,ie){return ne(q.type,ie,q.props)}function W(q){return typeof q=="object"&&q!==null&&q.$$typeof===n}function le(q){var ie={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(oe){return ie[oe]})}var be=/\/+/g;function ve(q,ie){return typeof q=="object"&&q!==null&&q.key!=null?le(""+q.key):ie.toString(36)}function _e(q){switch(q.status){case"fulfilled":return q.value;case"rejected":throw q.reason;default:switch(typeof q.status=="string"?q.then(K,K):(q.status="pending",q.then(function(ie){q.status==="pending"&&(q.status="fulfilled",q.value=ie)},function(ie){q.status==="pending"&&(q.status="rejected",q.reason=ie)})),q.status){case"fulfilled":return q.value;case"rejected":throw q.reason}}throw q}function F(q,ie,oe,Ee,pe){var Oe=typeof q;(Oe==="undefined"||Oe==="boolean")&&(q=null);var Te=!1;if(q===null)Te=!0;else switch(Oe){case"bigint":case"string":case"number":Te=!0;break;case"object":switch(q.$$typeof){case n:case i:Te=!0;break;case S:return Te=q._init,F(Te(q._payload),ie,oe,Ee,pe)}}if(Te)return pe=pe(q),Te=Ee===""?"."+ve(q,0):Ee,Y(pe)?(oe="",Te!=null&&(oe=Te.replace(be,"$&/")+"/"),F(pe,ie,oe,"",function(Ve){return Ve})):pe!=null&&(W(pe)&&(pe=fe(pe,oe+(pe.key==null||q&&q.key===pe.key?"":(""+pe.key).replace(be,"$&/")+"/")+Te)),ie.push(pe)),1;Te=0;var Ie=Ee===""?".":Ee+":";if(Y(q))for(var je=0;je<q.length;je++)Ee=q[je],Oe=Ie+ve(Ee,je),Te+=F(Ee,ie,oe,Oe,pe);else if(je=R(q),typeof je=="function")for(q=je.call(q),je=0;!(Ee=q.next()).done;)Ee=Ee.value,Oe=Ie+ve(Ee,je++),Te+=F(Ee,ie,oe,Oe,pe);else if(Oe==="object"){if(typeof q.then=="function")return F(_e(q),ie,oe,Ee,pe);throw ie=String(q),Error("Objects are not valid as a React child (found: "+(ie==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":ie)+"). If you meant to render a collection of children, use an array instead.")}return Te}function ce(q,ie,oe){if(q==null)return q;var Ee=[],pe=0;return F(q,Ee,"","",function(Oe){return ie.call(oe,Oe,pe++)}),Ee}function te(q){if(q._status===-1){var ie=q._result;ie=ie(),ie.then(function(oe){(q._status===0||q._status===-1)&&(q._status=1,q._result=oe)},function(oe){(q._status===0||q._status===-1)&&(q._status=2,q._result=oe)}),q._status===-1&&(q._status=0,q._result=ie)}if(q._status===1)return q._result.default;throw q._result}var Se=typeof reportError=="function"?reportError:function(q){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ie=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof q=="object"&&q!==null&&typeof q.message=="string"?String(q.message):String(q),error:q});if(!window.dispatchEvent(ie))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",q);return}console.error(q)},xe={map:ce,forEach:function(q,ie,oe){ce(q,function(){ie.apply(this,arguments)},oe)},count:function(q){var ie=0;return ce(q,function(){ie++}),ie},toArray:function(q){return ce(q,function(ie){return ie})||[]},only:function(q){if(!W(q))throw Error("React.Children.only expected to receive a single React element child.");return q}};return react_production.Activity=w,react_production.Children=xe,react_production.Component=L,react_production.Fragment=o,react_production.Profiler=h,react_production.PureComponent=U,react_production.StrictMode=u,react_production.Suspense=v,react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,react_production.__COMPILER_RUNTIME={__proto__:null,c:function(q){return $.H.useMemoCache(q)}},react_production.cache=function(q){return function(){return q.apply(null,arguments)}},react_production.cacheSignal=function(){return null},react_production.cloneElement=function(q,ie,oe){if(q==null)throw Error("The argument must be a React element, but you passed "+q+".");var Ee=N({},q.props),pe=q.key;if(ie!=null)for(Oe in ie.key!==void 0&&(pe=""+ie.key),ie)!Q.call(ie,Oe)||Oe==="key"||Oe==="__self"||Oe==="__source"||Oe==="ref"&&ie.ref===void 0||(Ee[Oe]=ie[Oe]);var Oe=arguments.length-2;if(Oe===1)Ee.children=oe;else if(1<Oe){for(var Te=Array(Oe),Ie=0;Ie<Oe;Ie++)Te[Ie]=arguments[Ie+2];Ee.children=Te}return ne(q.type,pe,Ee)},react_production.createContext=function(q){return q={$$typeof:y,_currentValue:q,_currentValue2:q,_threadCount:0,Provider:null,Consumer:null},q.Provider=q,q.Consumer={$$typeof:m,_context:q},q},react_production.createElement=function(q,ie,oe){var Ee,pe={},Oe=null;if(ie!=null)for(Ee in ie.key!==void 0&&(Oe=""+ie.key),ie)Q.call(ie,Ee)&&Ee!=="key"&&Ee!=="__self"&&Ee!=="__source"&&(pe[Ee]=ie[Ee]);var Te=arguments.length-2;if(Te===1)pe.children=oe;else if(1<Te){for(var Ie=Array(Te),je=0;je<Te;je++)Ie[je]=arguments[je+2];pe.children=Ie}if(q&&q.defaultProps)for(Ee in Te=q.defaultProps,Te)pe[Ee]===void 0&&(pe[Ee]=Te[Ee]);return ne(q,Oe,pe)},react_production.createRef=function(){return{current:null}},react_production.forwardRef=function(q){return{$$typeof:_,render:q}},react_production.isValidElement=W,react_production.lazy=function(q){return{$$typeof:S,_payload:{_status:-1,_result:q},_init:te}},react_production.memo=function(q,ie){return{$$typeof:E,type:q,compare:ie===void 0?null:ie}},react_production.startTransition=function(q){var ie=$.T,oe={};$.T=oe;try{var Ee=q(),pe=$.S;pe!==null&&pe(oe,Ee),typeof Ee=="object"&&Ee!==null&&typeof Ee.then=="function"&&Ee.then(K,Se)}catch(Oe){Se(Oe)}finally{ie!==null&&oe.types!==null&&(ie.types=oe.types),$.T=ie}},react_production.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},react_production.use=function(q){return $.H.use(q)},react_production.useActionState=function(q,ie,oe){return $.H.useActionState(q,ie,oe)},react_production.useCallback=function(q,ie){return $.H.useCallback(q,ie)},react_production.useContext=function(q){return $.H.useContext(q)},react_production.useDebugValue=function(){},react_production.useDeferredValue=function(q,ie){return $.H.useDeferredValue(q,ie)},react_production.useEffect=function(q,ie){return $.H.useEffect(q,ie)},react_production.useEffectEvent=function(q){return $.H.useEffectEvent(q)},react_production.useId=function(){return $.H.useId()},react_production.useImperativeHandle=function(q,ie,oe){return $.H.useImperativeHandle(q,ie,oe)},react_production.useInsertionEffect=function(q,ie){return $.H.useInsertionEffect(q,ie)},react_production.useLayoutEffect=function(q,ie){return $.H.useLayoutEffect(q,ie)},react_production.useMemo=function(q,ie){return $.H.useMemo(q,ie)},react_production.useOptimistic=function(q,ie){return $.H.useOptimistic(q,ie)},react_production.useReducer=function(q,ie,oe){return $.H.useReducer(q,ie,oe)},react_production.useRef=function(q){return $.H.useRef(q)},react_production.useState=function(q){return $.H.useState(q)},react_production.useSyncExternalStore=function(q,ie,oe){return $.H.useSyncExternalStore(q,ie,oe)},react_production.useTransition=function(){return $.H.useTransition()},react_production.version="19.2.3",react_production}var hasRequiredReact;function requireReact(){return hasRequiredReact||(hasRequiredReact=1,react.exports=requireReact_production()),react.exports}var reactDom={exports:{}},reactDom_production={};var hasRequiredReactDom_production;function requireReactDom_production(){if(hasRequiredReactDom_production)return reactDom_production;hasRequiredReactDom_production=1;var n=requireReact();function i(v){var E="https://react.dev/errors/"+v;if(1<arguments.length){E+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)E+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+v+"; visit "+E+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var u={d:{f:o,r:function(){throw Error(i(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},h=Symbol.for("react.portal");function m(v,E,S){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:w==null?null:""+w,children:v,containerInfo:E,implementation:S}}var y=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function _(v,E){if(v==="font")return"";if(typeof E=="string")return E==="use-credentials"?E:""}return reactDom_production.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,reactDom_production.createPortal=function(v,E){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!E||E.nodeType!==1&&E.nodeType!==9&&E.nodeType!==11)throw Error(i(299));return m(v,E,null,S)},reactDom_production.flushSync=function(v){var E=y.T,S=u.p;try{if(y.T=null,u.p=2,v)return v()}finally{y.T=E,u.p=S,u.d.f()}},reactDom_production.preconnect=function(v,E){typeof v=="string"&&(E?(E=E.crossOrigin,E=typeof E=="string"?E==="use-credentials"?E:"":void 0):E=null,u.d.C(v,E))},reactDom_production.prefetchDNS=function(v){typeof v=="string"&&u.d.D(v)},reactDom_production.preinit=function(v,E){if(typeof v=="string"&&E&&typeof E.as=="string"){var S=E.as,w=_(S,E.crossOrigin),T=typeof E.integrity=="string"?E.integrity:void 0,R=typeof E.fetchPriority=="string"?E.fetchPriority:void 0;S==="style"?u.d.S(v,typeof E.precedence=="string"?E.precedence:void 0,{crossOrigin:w,integrity:T,fetchPriority:R}):S==="script"&&u.d.X(v,{crossOrigin:w,integrity:T,fetchPriority:R,nonce:typeof E.nonce=="string"?E.nonce:void 0})}},reactDom_production.preinitModule=function(v,E){if(typeof v=="string")if(typeof E=="object"&&E!==null){if(E.as==null||E.as==="script"){var S=_(E.as,E.crossOrigin);u.d.M(v,{crossOrigin:S,integrity:typeof E.integrity=="string"?E.integrity:void 0,nonce:typeof E.nonce=="string"?E.nonce:void 0})}}else E==null&&u.d.M(v)},reactDom_production.preload=function(v,E){if(typeof v=="string"&&typeof E=="object"&&E!==null&&typeof E.as=="string"){var S=E.as,w=_(S,E.crossOrigin);u.d.L(v,S,{crossOrigin:w,integrity:typeof E.integrity=="string"?E.integrity:void 0,nonce:typeof E.nonce=="string"?E.nonce:void 0,type:typeof E.type=="string"?E.type:void 0,fetchPriority:typeof E.fetchPriority=="string"?E.fetchPriority:void 0,referrerPolicy:typeof E.referrerPolicy=="string"?E.referrerPolicy:void 0,imageSrcSet:typeof E.imageSrcSet=="string"?E.imageSrcSet:void 0,imageSizes:typeof E.imageSizes=="string"?E.imageSizes:void 0,media:typeof E.media=="string"?E.media:void 0})}},reactDom_production.preloadModule=function(v,E){if(typeof v=="string")if(E){var S=_(E.as,E.crossOrigin);u.d.m(v,{as:typeof E.as=="string"&&E.as!=="script"?E.as:void 0,crossOrigin:S,integrity:typeof E.integrity=="string"?E.integrity:void 0})}else u.d.m(v)},reactDom_production.requestFormReset=function(v){u.d.r(v)},reactDom_production.unstable_batchedUpdates=function(v,E){return v(E)},reactDom_production.useFormState=function(v,E,S){return y.H.useFormState(v,E,S)},reactDom_production.useFormStatus=function(){return y.H.useHostTransitionStatus()},reactDom_production.version="19.2.3",reactDom_production}var hasRequiredReactDom;function requireReactDom(){if(hasRequiredReactDom)return reactDom.exports;hasRequiredReactDom=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),reactDom.exports=requireReactDom_production(),reactDom.exports}var hasRequiredReactDomClient_production;function requireReactDomClient_production(){if(hasRequiredReactDomClient_production)return reactDomClient_production;hasRequiredReactDomClient_production=1;var n=requireScheduler(),i=requireReact(),o=requireReactDom();function u(e){var a="https://react.dev/errors/"+e;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)a+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var a=e,s=e;if(e.alternate)for(;a.return;)a=a.return;else{e=a;do a=e,(a.flags&4098)!==0&&(s=a.return),e=a.return;while(e)}return a.tag===3?s:null}function y(e){if(e.tag===13){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function _(e){if(e.tag===31){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function v(e){if(m(e)!==e)throw Error(u(188))}function E(e){var a=e.alternate;if(!a){if(a=m(e),a===null)throw Error(u(188));return a!==e?null:e}for(var s=e,f=a;;){var p=s.return;if(p===null)break;var g=p.alternate;if(g===null){if(f=p.return,f!==null){s=f;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===s)return v(p),e;if(g===f)return v(p),a;g=g.sibling}throw Error(u(188))}if(s.return!==f.return)s=p,f=g;else{for(var x=!1,A=p.child;A;){if(A===s){x=!0,s=p,f=g;break}if(A===f){x=!0,f=p,s=g;break}A=A.sibling}if(!x){for(A=g.child;A;){if(A===s){x=!0,s=g,f=p;break}if(A===f){x=!0,f=g,s=p;break}A=A.sibling}if(!x)throw Error(u(189))}}if(s.alternate!==f)throw Error(u(190))}if(s.tag!==3)throw Error(u(188));return s.stateNode.current===s?e:a}function S(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(a=S(e),a!==null)return a;e=e.sibling}return null}var w=Object.assign,T=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),U=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),Q=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),fe=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function le(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var be=Symbol.for("react.client.reference");function ve(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===be?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case L:return"Profiler";case M:return"StrictMode";case Y:return"Suspense";case K:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case D:return"Portal";case U:return e.displayName||"Context";case z:return(e._context.displayName||"Context")+".Consumer";case H:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $:return a=e.displayName||null,a!==null?a:ve(e.type)||"Memo";case Q:a=e._payload,e=e._init;try{return ve(e(a))}catch{}}return null}var _e=Array.isArray,F=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},Se=[],xe=-1;function q(e){return{current:e}}function ie(e){0>xe||(e.current=Se[xe],Se[xe]=null,xe--)}function oe(e,a){xe++,Se[xe]=e.current,e.current=a}var Ee=q(null),pe=q(null),Oe=q(null),Te=q(null);function Ie(e,a){switch(oe(Oe,a),oe(pe,e),oe(Ee,null),a.nodeType){case 9:case 11:e=(e=a.documentElement)&&(e=e.namespaceURI)?cd(e):0;break;default:if(e=a.tagName,a=a.namespaceURI)a=cd(a),e=fd(a,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ie(Ee),oe(Ee,e)}function je(){ie(Ee),ie(pe),ie(Oe)}function Ve(e){e.memoizedState!==null&&oe(Te,e);var a=Ee.current,s=fd(a,e.type);a!==s&&(oe(pe,e),oe(Ee,s))}function qt(e){pe.current===e&&(ie(Ee),ie(pe)),Te.current===e&&(ie(Te),Pr._currentValue=te)}var Ye,ot;function Xt(e){if(Ye===void 0)try{throw Error()}catch(s){var a=s.stack.trim().match(/\n( *(at )?)/);Ye=a&&a[1]||"",ot=-1<s.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Ye+e+ot}var ze=!1;function Je(e,a){if(!e||ze)return"";ze=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var f={DetermineComponentFrameRoot:function(){try{if(a){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(ae){var ee=ae}Reflect.construct(e,[],he)}else{try{he.call()}catch(ae){ee=ae}e.call(he.prototype)}}else{try{throw Error()}catch(ae){ee=ae}(he=e())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(ae){if(ae&&ee&&typeof ae.stack=="string")return[ae.stack,ee.stack]}return[null,null]}};f.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(f.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(f.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=f.DetermineComponentFrameRoot(),x=g[0],A=g[1];if(x&&A){var P=x.split(`
4
+ `),Z=A.split(`
5
+ `);for(p=f=0;f<P.length&&!P[f].includes("DetermineComponentFrameRoot");)f++;for(;p<Z.length&&!Z[p].includes("DetermineComponentFrameRoot");)p++;if(f===P.length||p===Z.length)for(f=P.length-1,p=Z.length-1;1<=f&&0<=p&&P[f]!==Z[p];)p--;for(;1<=f&&0<=p;f--,p--)if(P[f]!==Z[p]){if(f!==1||p!==1)do if(f--,p--,0>p||P[f]!==Z[p]){var se=`
6
+ `+P[f].replace(" at new "," at ");return e.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",e.displayName)),se}while(1<=f&&0<=p);break}}}finally{ze=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?Xt(s):""}function Rt(e,a){switch(e.tag){case 26:case 27:case 5:return Xt(e.type);case 16:return Xt("Lazy");case 13:return e.child!==a&&a!==null?Xt("Suspense Fallback"):Xt("Suspense");case 19:return Xt("SuspenseList");case 0:case 15:return Je(e.type,!1);case 11:return Je(e.type.render,!1);case 1:return Je(e.type,!0);case 31:return Xt("Activity");default:return""}}function At(e){try{var a="",s=null;do a+=Rt(e,s),s=e,e=e.return;while(e);return a}catch(f){return`
7
+ Error generating stack: `+f.message+`
8
+ `+f.stack}}var ft=Object.prototype.hasOwnProperty,ut=n.unstable_scheduleCallback,Fe=n.unstable_cancelCallback,nn=n.unstable_shouldYield,tt=n.unstable_requestPaint,we=n.unstable_now,ct=n.unstable_getCurrentPriorityLevel,Dt=n.unstable_ImmediatePriority,kt=n.unstable_UserBlockingPriority,Lt=n.unstable_NormalPriority,mn=n.unstable_LowPriority,Tn=n.unstable_IdlePriority,Wn=n.log,rt=n.unstable_setDisableYieldValue,hn=null,gt=null;function yt(e){if(typeof Wn=="function"&&rt(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(hn,e)}catch{}}var pt=Math.clz32?Math.clz32:An,Bt=Math.log,Rn=Math.LN2;function An(e){return e>>>=0,e===0?32:31-(Bt(e)/Rn|0)|0}var zt=256,Xe=262144,Yt=4194304;function _t(e){var a=e&42;if(a!==0)return a;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Cn(e,a,s){var f=e.pendingLanes;if(f===0)return 0;var p=0,g=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var A=f&134217727;return A!==0?(f=A&~g,f!==0?p=_t(f):(x&=A,x!==0?p=_t(x):s||(s=A&~e,s!==0&&(p=_t(s))))):(A=f&~g,A!==0?p=_t(A):x!==0?p=_t(x):s||(s=f&~e,s!==0&&(p=_t(s)))),p===0?0:a!==0&&a!==p&&(a&g)===0&&(g=p&-p,s=a&-a,g>=s||g===32&&(s&4194048)!==0)?a:p}function yn(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function vt(e,a){switch(e){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function sn(){var e=Yt;return Yt<<=1,(Yt&62914560)===0&&(Yt=4194304),e}function Jn(e){for(var a=[],s=0;31>s;s++)a.push(e);return a}function jn(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Hn(e,a,s,f,p,g){var x=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var A=e.entanglements,P=e.expirationTimes,Z=e.hiddenUpdates;for(s=x&~s;0<s;){var se=31-pt(s),he=1<<se;A[se]=0,P[se]=-1;var ee=Z[se];if(ee!==null)for(Z[se]=null,se=0;se<ee.length;se++){var ae=ee[se];ae!==null&&(ae.lane&=-536870913)}s&=~he}f!==0&&On(e,f,0),g!==0&&p===0&&e.tag!==0&&(e.suspendedLanes|=g&~(x&~a))}function On(e,a,s){e.pendingLanes|=a,e.suspendedLanes&=~a;var f=31-pt(a);e.entangledLanes|=a,e.entanglements[f]=e.entanglements[f]|1073741824|s&261930}function Nn(e,a){var s=e.entangledLanes|=a;for(e=e.entanglements;s;){var f=31-pt(s),p=1<<f;p&a|e[f]&a&&(e[f]|=a),s&=~p}}function vn(e,a){var s=a&-a;return s=(s&42)!==0?1:Kt(s),(s&(e.suspendedLanes|a))!==0?0:s}function Kt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Ke(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Qt(){var e=ce.p;return e!==0?e:(e=window.event,e===void 0?32:kd(e.type))}function Pt(e,a){var s=ce.p;try{return ce.p=e,a()}finally{ce.p=s}}var Wt=Math.random().toString(36).slice(2),Qe="__reactFiber$"+Wt,qe="__reactProps$"+Wt,Vt="__reactContainer$"+Wt,Nt="__reactEvents$"+Wt,lt="__reactListeners$"+Wt,qn="__reactHandles$"+Wt,wn="__reactResources$"+Wt,ye="__reactMarker$"+Wt;function V(e){delete e[Qe],delete e[qe],delete e[Nt],delete e[lt],delete e[qn]}function me(e){var a=e[Qe];if(a)return a;for(var s=e.parentNode;s;){if(a=s[Vt]||s[Qe]){if(s=a.alternate,a.child!==null||s!==null&&s.child!==null)for(e=vd(e);e!==null;){if(s=e[Qe])return s;e=vd(e)}return a}e=s,s=e.parentNode}return null}function ge(e){if(e=e[Qe]||e[Vt]){var a=e.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return e}return null}function ke(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e.stateNode;throw Error(u(33))}function Ue(e){var a=e[wn];return a||(a=e[wn]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Re(e){e[ye]=!0}var Ne=new Set,We={};function Ct(e,a){Be(e,a),Be(e+"Capture",a)}function Be(e,a){for(We[e]=a,e=0;e<a.length;e++)Ne.add(a[e])}var Ze=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),He={},Mt={};function Ot(e){return ft.call(Mt,e)?!0:ft.call(He,e)?!1:Ze.test(e)?Mt[e]=!0:(He[e]=!0,!1)}function Le(e,a,s){if(Ot(a))if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(a);return;case"boolean":var f=a.toLowerCase().slice(0,5);if(f!=="data-"&&f!=="aria-"){e.removeAttribute(a);return}}e.setAttribute(a,""+s)}}function an(e,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttribute(a,""+s)}}function Gt(e,a,s,f){if(f===null)e.removeAttribute(s);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(a,s,""+f)}}function jt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ut(e){var a=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Zn(e,a,s){var f=Object.getOwnPropertyDescriptor(e.constructor.prototype,a);if(!e.hasOwnProperty(a)&&typeof f<"u"&&typeof f.get=="function"&&typeof f.set=="function"){var p=f.get,g=f.set;return Object.defineProperty(e,a,{configurable:!0,get:function(){return p.call(this)},set:function(x){s=""+x,g.call(this,x)}}),Object.defineProperty(e,a,{enumerable:f.enumerable}),{getValue:function(){return s},setValue:function(x){s=""+x},stopTracking:function(){e._valueTracker=null,delete e[a]}}}}function Jt(e){if(!e._valueTracker){var a=Ut(e)?"checked":"value";e._valueTracker=Zn(e,a,""+e[a])}}function fa(e){if(!e)return!1;var a=e._valueTracker;if(!a)return!0;var s=a.getValue(),f="";return e&&(f=Ut(e)?e.checked?"true":"false":e.value),e=f,e!==s?(a.setValue(e),!0):!1}function bn(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Pn=/[\n"\\]/g;function Dn(e){return e.replace(Pn,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Zt(e,a,s,f,p,g,x,A){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),a!=null?x==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+jt(a)):e.value!==""+jt(a)&&(e.value=""+jt(a)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),a!=null?nr(e,x,jt(a)):s!=null?nr(e,x,jt(s)):f!=null&&e.removeAttribute("value"),p==null&&g!=null&&(e.defaultChecked=!!g),p!=null&&(e.checked=p&&typeof p!="function"&&typeof p!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?e.name=""+jt(A):e.removeAttribute("name")}function ga(e,a,s,f,p,g,x,A){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.type=g),a!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||a!=null)){Jt(e);return}s=s!=null?""+jt(s):"",a=a!=null?""+jt(a):s,A||a===e.value||(e.value=a),e.defaultValue=a}f=f??p,f=typeof f!="function"&&typeof f!="symbol"&&!!f,e.checked=A?e.checked:!!f,e.defaultChecked=!!f,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Jt(e)}function nr(e,a,s){a==="number"&&bn(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function za(e,a,s,f){if(e=e.options,a){a={};for(var p=0;p<s.length;p++)a["$"+s[p]]=!0;for(s=0;s<e.length;s++)p=a.hasOwnProperty("$"+e[s].value),e[s].selected!==p&&(e[s].selected=p),p&&f&&(e[s].defaultSelected=!0)}else{for(s=""+jt(s),a=null,p=0;p<e.length;p++){if(e[p].value===s){e[p].selected=!0,f&&(e[p].defaultSelected=!0);return}a!==null||e[p].disabled||(a=e[p])}a!==null&&(a.selected=!0)}}function Ua(e,a,s){if(a!=null&&(a=""+jt(a),a!==e.value&&(e.value=a),s==null)){e.defaultValue!==a&&(e.defaultValue=a);return}e.defaultValue=s!=null?""+jt(s):""}function Yr(e,a,s,f){if(a==null){if(f!=null){if(s!=null)throw Error(u(92));if(_e(f)){if(1<f.length)throw Error(u(93));f=f[0]}s=f}s==null&&(s=""),a=s}s=jt(a),e.defaultValue=s,f=e.textContent,f===s&&f!==""&&f!==null&&(e.value=f),Jt(e)}function ya(e,a){if(a){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=a;return}}e.textContent=a}var ls=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Kr(e,a,s){var f=a.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?f?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="":f?e.setProperty(a,s):typeof s!="number"||s===0||ls.has(a)?a==="float"?e.cssFloat=s:e[a]=(""+s).trim():e[a]=s+"px"}function oi(e,a,s){if(a!=null&&typeof a!="object")throw Error(u(62));if(e=e.style,s!=null){for(var f in s)!s.hasOwnProperty(f)||a!=null&&a.hasOwnProperty(f)||(f.indexOf("--")===0?e.setProperty(f,""):f==="float"?e.cssFloat="":e[f]="");for(var p in a)f=a[p],a.hasOwnProperty(p)&&s[p]!==f&&Kr(e,p,f)}else for(var g in a)a.hasOwnProperty(g)&&Kr(e,g,a[g])}function Ai(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qd=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Qr=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Wr(e){return Qr.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function sa(){}var ss=null;function os(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var va=null,ba=null;function ui(e){var a=ge(e);if(a&&(e=a.stateNode)){var s=e[qe]||null;e:switch(e=a.stateNode,a.type){case"input":if(Zt(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),a=s.name,s.type==="radio"&&a!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+Dn(""+a)+'"][type="radio"]'),a=0;a<s.length;a++){var f=s[a];if(f!==e&&f.form===e.form){var p=f[qe]||null;if(!p)throw Error(u(90));Zt(f,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<s.length;a++)f=s[a],f.form===e.form&&fa(f)}break e;case"textarea":Ua(e,s.value,s.defaultValue);break e;case"select":a=s.value,a!=null&&za(e,!!s.multiple,a,!1)}}}var Ea=!1;function ar(e,a,s){if(Ea)return e(a,s);Ea=!0;try{var f=e(a);return f}finally{if(Ea=!1,(va!==null||ba!==null)&&(zl(),va&&(a=va,e=ba,ba=va=null,ui(a),e)))for(a=0;a<e.length;a++)ui(e[a])}}function ir(e,a){var s=e.stateNode;if(s===null)return null;var f=s[qe]||null;if(f===null)return null;s=f[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(f=!f.disabled)||(e=e.type,f=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!f;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(u(231,a,typeof s));return s}var _a=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),us=!1;if(_a)try{var rr={};Object.defineProperty(rr,"passive",{get:function(){us=!0}}),window.addEventListener("test",rr,rr),window.removeEventListener("test",rr,rr)}catch{us=!1}var Ia=null,cs=null,Jr=null;function cu(){if(Jr)return Jr;var e,a=cs,s=a.length,f,p="value"in Ia?Ia.value:Ia.textContent,g=p.length;for(e=0;e<s&&a[e]===p[e];e++);var x=s-e;for(f=1;f<=x&&a[s-f]===p[g-f];f++);return Jr=p.slice(e,1<f?1-f:void 0)}function Zr(e){var a=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&a===13&&(e=13)):e=a,e===10&&(e=13),32<=e||e===13?e:0}function $r(){return!0}function fu(){return!1}function kn(e){function a(s,f,p,g,x){this._reactName=s,this._targetInst=p,this.type=f,this.nativeEvent=g,this.target=x,this.currentTarget=null;for(var A in e)e.hasOwnProperty(A)&&(s=e[A],this[A]=s?s(g):g[A]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?$r:fu,this.isPropagationStopped=fu,this}return w(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=$r)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=$r)},persist:function(){},isPersistent:$r}),a}var ci={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},el=kn(ci),lr=w({},ci,{view:0,detail:0}),Pd=kn(lr),fs,ds,sr,tl=w({},lr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ps,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sr&&(sr&&e.type==="mousemove"?(fs=e.screenX-sr.screenX,ds=e.screenY-sr.screenY):ds=fs=0,sr=e),fs)},movementY:function(e){return"movementY"in e?e.movementY:ds}}),du=kn(tl),Vd=w({},tl,{dataTransfer:0}),Gd=kn(Vd),Fd=w({},lr,{relatedTarget:0}),hs=kn(Fd),Xd=w({},ci,{animationName:0,elapsedTime:0,pseudoElement:0}),Yd=kn(Xd),Kd=w({},ci,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Qd=kn(Kd),Wd=w({},ci,{data:0}),hu=kn(Wd),Jd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},$d={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eh(e){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(e):(e=$d[e])?!!a[e]:!1}function ps(){return eh}var th=w({},lr,{key:function(e){if(e.key){var a=Jd[e.key]||e.key;if(a!=="Unidentified")return a}return e.type==="keypress"?(e=Zr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Zd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ps,charCode:function(e){return e.type==="keypress"?Zr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Zr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nh=kn(th),ah=w({},tl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),pu=kn(ah),ih=w({},lr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ps}),rh=kn(ih),lh=w({},ci,{propertyName:0,elapsedTime:0,pseudoElement:0}),sh=kn(lh),oh=w({},tl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),uh=kn(oh),ch=w({},ci,{newState:0,oldState:0}),fh=kn(ch),dh=[9,13,27,32],ms=_a&&"CompositionEvent"in window,or=null;_a&&"documentMode"in document&&(or=document.documentMode);var hh=_a&&"TextEvent"in window&&!or,mu=_a&&(!ms||or&&8<or&&11>=or),gu=" ",yu=!1;function vu(e,a){switch(e){case"keyup":return dh.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ci=!1;function ph(e,a){switch(e){case"compositionend":return bu(a);case"keypress":return a.which!==32?null:(yu=!0,gu);case"textInput":return e=a.data,e===gu&&yu?null:e;default:return null}}function mh(e,a){if(Ci)return e==="compositionend"||!ms&&vu(e,a)?(e=cu(),Jr=cs=Ia=null,Ci=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return mu&&a.locale!=="ko"?null:a.data;default:return null}}var gh={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Eu(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a==="input"?!!gh[e.type]:a==="textarea"}function _u(e,a,s,f){va?ba?ba.push(f):ba=[f]:va=f,a=Gl(a,"onChange"),0<a.length&&(s=new el("onChange","change",null,s,f),e.push({event:s,listeners:a}))}var ur=null,cr=null;function yh(e){id(e,0)}function nl(e){var a=ke(e);if(fa(a))return e}function xu(e,a){if(e==="change")return a}var Su=!1;if(_a){var gs;if(_a){var ys="oninput"in document;if(!ys){var Tu=document.createElement("div");Tu.setAttribute("oninput","return;"),ys=typeof Tu.oninput=="function"}gs=ys}else gs=!1;Su=gs&&(!document.documentMode||9<document.documentMode)}function Ru(){ur&&(ur.detachEvent("onpropertychange",Au),cr=ur=null)}function Au(e){if(e.propertyName==="value"&&nl(cr)){var a=[];_u(a,cr,e,os(e)),ar(yh,a)}}function vh(e,a,s){e==="focusin"?(Ru(),ur=a,cr=s,ur.attachEvent("onpropertychange",Au)):e==="focusout"&&Ru()}function bh(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return nl(cr)}function Eh(e,a){if(e==="click")return nl(a)}function _h(e,a){if(e==="input"||e==="change")return nl(a)}function xh(e,a){return e===a&&(e!==0||1/e===1/a)||e!==e&&a!==a}var Vn=typeof Object.is=="function"?Object.is:xh;function dr(e,a){if(Vn(e,a))return!0;if(typeof e!="object"||e===null||typeof a!="object"||a===null)return!1;var s=Object.keys(e),f=Object.keys(a);if(s.length!==f.length)return!1;for(f=0;f<s.length;f++){var p=s[f];if(!ft.call(a,p)||!Vn(e[p],a[p]))return!1}return!0}function Cu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ou(e,a){var s=Cu(e);e=0;for(var f;s;){if(s.nodeType===3){if(f=e+s.textContent.length,e<=a&&f>=a)return{node:s,offset:a-e};e=f}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Cu(s)}}function wu(e,a){return e&&a?e===a?!0:e&&e.nodeType===3?!1:a&&a.nodeType===3?wu(e,a.parentNode):"contains"in e?e.contains(a):e.compareDocumentPosition?!!(e.compareDocumentPosition(a)&16):!1:!1}function Nu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var a=bn(e.document);a instanceof e.HTMLIFrameElement;){try{var s=typeof a.contentWindow.location.href=="string"}catch{s=!1}if(s)e=a.contentWindow;else break;a=bn(e.document)}return a}function vs(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a&&(a==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||a==="textarea"||e.contentEditable==="true")}var Sh=_a&&"documentMode"in document&&11>=document.documentMode,Oi=null,bs=null,hr=null,Es=!1;function Mu(e,a,s){var f=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Es||Oi==null||Oi!==bn(f)||(f=Oi,"selectionStart"in f&&vs(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),hr&&dr(hr,f)||(hr=f,f=Gl(bs,"onSelect"),0<f.length&&(a=new el("onSelect","select",null,a,s),e.push({event:a,listeners:f}),a.target=Oi)))}function fi(e,a){var s={};return s[e.toLowerCase()]=a.toLowerCase(),s["Webkit"+e]="webkit"+a,s["Moz"+e]="moz"+a,s}var wi={animationend:fi("Animation","AnimationEnd"),animationiteration:fi("Animation","AnimationIteration"),animationstart:fi("Animation","AnimationStart"),transitionrun:fi("Transition","TransitionRun"),transitionstart:fi("Transition","TransitionStart"),transitioncancel:fi("Transition","TransitionCancel"),transitionend:fi("Transition","TransitionEnd")},_s={},ju={};_a&&(ju=document.createElement("div").style,"AnimationEvent"in window||(delete wi.animationend.animation,delete wi.animationiteration.animation,delete wi.animationstart.animation),"TransitionEvent"in window||delete wi.transitionend.transition);function di(e){if(_s[e])return _s[e];if(!wi[e])return e;var a=wi[e],s;for(s in a)if(a.hasOwnProperty(s)&&s in ju)return _s[e]=a[s];return e}var Du=di("animationend"),ku=di("animationiteration"),Lu=di("animationstart"),Th=di("transitionrun"),Rh=di("transitionstart"),Ah=di("transitioncancel"),Bu=di("transitionend"),zu=new Map,xs="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");xs.push("scrollEnd");function oa(e,a){zu.set(e,a),Ct(a,[e])}var al=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},$n=[],Ni=0,Ss=0;function il(){for(var e=Ni,a=Ss=Ni=0;a<e;){var s=$n[a];$n[a++]=null;var f=$n[a];$n[a++]=null;var p=$n[a];$n[a++]=null;var g=$n[a];if($n[a++]=null,f!==null&&p!==null){var x=f.pending;x===null?p.next=p:(p.next=x.next,x.next=p),f.pending=p}g!==0&&Uu(s,p,g)}}function rl(e,a,s,f){$n[Ni++]=e,$n[Ni++]=a,$n[Ni++]=s,$n[Ni++]=f,Ss|=f,e.lanes|=f,e=e.alternate,e!==null&&(e.lanes|=f)}function Ts(e,a,s,f){return rl(e,a,s,f),ll(e)}function hi(e,a){return rl(e,null,null,a),ll(e)}function Uu(e,a,s){e.lanes|=s;var f=e.alternate;f!==null&&(f.lanes|=s);for(var p=!1,g=e.return;g!==null;)g.childLanes|=s,f=g.alternate,f!==null&&(f.childLanes|=s),g.tag===22&&(e=g.stateNode,e===null||e._visibility&1||(p=!0)),e=g,g=g.return;return e.tag===3?(g=e.stateNode,p&&a!==null&&(p=31-pt(s),e=g.hiddenUpdates,f=e[p],f===null?e[p]=[a]:f.push(a),a.lane=s|536870912),g):null}function ll(e){if(50<Lr)throw Lr=0,ko=null,Error(u(185));for(var a=e.return;a!==null;)e=a,a=e.return;return e.tag===3?e.stateNode:null}var Mi={};function Ch(e,a,s,f){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gn(e,a,s,f){return new Ch(e,a,s,f)}function Rs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xa(e,a){var s=e.alternate;return s===null?(s=Gn(e.tag,a,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=a,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,a=e.dependencies,s.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function Iu(e,a){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=a,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,a=s.dependencies,e.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),e}function sl(e,a,s,f,p,g){var x=0;if(f=e,typeof e=="function")Rs(e)&&(x=1);else if(typeof e=="string")x=jp(e,s,Ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ne:return e=Gn(31,s,a,p),e.elementType=ne,e.lanes=g,e;case N:return pi(s.children,p,g,a);case M:x=8,p|=24;break;case L:return e=Gn(12,s,a,p|2),e.elementType=L,e.lanes=g,e;case Y:return e=Gn(13,s,a,p),e.elementType=Y,e.lanes=g,e;case K:return e=Gn(19,s,a,p),e.elementType=K,e.lanes=g,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case U:x=10;break e;case z:x=9;break e;case H:x=11;break e;case $:x=14;break e;case Q:x=16,f=null;break e}x=29,s=Error(u(130,e===null?"null":typeof e,"")),f=null}return a=Gn(x,s,a,p),a.elementType=e,a.type=f,a.lanes=g,a}function pi(e,a,s,f){return e=Gn(7,e,f,a),e.lanes=s,e}function As(e,a,s){return e=Gn(6,e,null,a),e.lanes=s,e}function Hu(e){var a=Gn(18,null,null,0);return a.stateNode=e,a}function Cs(e,a,s){return a=Gn(4,e.children!==null?e.children:[],e.key,a),a.lanes=s,a.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},a}var qu=new WeakMap;function ea(e,a){if(typeof e=="object"&&e!==null){var s=qu.get(e);return s!==void 0?s:(a={value:e,source:a,stack:At(a)},qu.set(e,a),a)}return{value:e,source:a,stack:At(a)}}var ji=[],Di=0,ol=null,pr=0,ta=[],na=0,Ha=null,da=1,ha="";function Sa(e,a){ji[Di++]=pr,ji[Di++]=ol,ol=e,pr=a}function Pu(e,a,s){ta[na++]=da,ta[na++]=ha,ta[na++]=Ha,Ha=e;var f=da;e=ha;var p=32-pt(f)-1;f&=~(1<<p),s+=1;var g=32-pt(a)+p;if(30<g){var x=p-p%5;g=(f&(1<<x)-1).toString(32),f>>=x,p-=x,da=1<<32-pt(a)+p|s<<p|f,ha=g+e}else da=1<<g|s<<p|f,ha=e}function Os(e){e.return!==null&&(Sa(e,1),Pu(e,1,0))}function ws(e){for(;e===ol;)ol=ji[--Di],ji[Di]=null,pr=ji[--Di],ji[Di]=null;for(;e===Ha;)Ha=ta[--na],ta[na]=null,ha=ta[--na],ta[na]=null,da=ta[--na],ta[na]=null}function Vu(e,a){ta[na++]=da,ta[na++]=ha,ta[na++]=Ha,da=a.id,ha=a.overflow,Ha=e}var En=null,It=null,st=!1,qa=null,aa=!1,Ns=Error(u(519));function Pa(e){var a=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw mr(ea(a,e)),Ns}function Gu(e){var a=e.stateNode,s=e.type,f=e.memoizedProps;switch(a[Qe]=e,a[qe]=f,s){case"dialog":et("cancel",a),et("close",a);break;case"iframe":case"object":case"embed":et("load",a);break;case"video":case"audio":for(s=0;s<zr.length;s++)et(zr[s],a);break;case"source":et("error",a);break;case"img":case"image":case"link":et("error",a),et("load",a);break;case"details":et("toggle",a);break;case"input":et("invalid",a),ga(a,f.value,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name,!0);break;case"select":et("invalid",a);break;case"textarea":et("invalid",a),Yr(a,f.value,f.defaultValue,f.children)}s=f.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||a.textContent===""+s||f.suppressHydrationWarning===!0||od(a.textContent,s)?(f.popover!=null&&(et("beforetoggle",a),et("toggle",a)),f.onScroll!=null&&et("scroll",a),f.onScrollEnd!=null&&et("scrollend",a),f.onClick!=null&&(a.onclick=sa),a=!0):a=!1,a||Pa(e,!0)}function Fu(e){for(En=e.return;En;)switch(En.tag){case 5:case 31:case 13:aa=!1;return;case 27:case 3:aa=!0;return;default:En=En.return}}function ki(e){if(e!==En)return!1;if(!st)return Fu(e),st=!0,!1;var a=e.tag,s;if((s=a!==3&&a!==27)&&((s=a===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||Qo(e.type,e.memoizedProps)),s=!s),s&&It&&Pa(e),Fu(e),a===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));It=yd(e)}else if(a===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));It=yd(e)}else a===27?(a=It,ni(e.type)?(e=eu,eu=null,It=e):It=a):It=En?ra(e.stateNode.nextSibling):null;return!0}function mi(){It=En=null,st=!1}function Ms(){var e=qa;return e!==null&&(Un===null?Un=e:Un.push.apply(Un,e),qa=null),e}function mr(e){qa===null?qa=[e]:qa.push(e)}var js=q(null),gi=null,Ta=null;function Va(e,a,s){oe(js,a._currentValue),a._currentValue=s}function Ra(e){e._currentValue=js.current,ie(js)}function Ds(e,a,s){for(;e!==null;){var f=e.alternate;if((e.childLanes&a)!==a?(e.childLanes|=a,f!==null&&(f.childLanes|=a)):f!==null&&(f.childLanes&a)!==a&&(f.childLanes|=a),e===s)break;e=e.return}}function ks(e,a,s,f){var p=e.child;for(p!==null&&(p.return=e);p!==null;){var g=p.dependencies;if(g!==null){var x=p.child;g=g.firstContext;e:for(;g!==null;){var A=g;g=p;for(var P=0;P<a.length;P++)if(A.context===a[P]){g.lanes|=s,A=g.alternate,A!==null&&(A.lanes|=s),Ds(g.return,s,e),f||(x=null);break e}g=A.next}}else if(p.tag===18){if(x=p.return,x===null)throw Error(u(341));x.lanes|=s,g=x.alternate,g!==null&&(g.lanes|=s),Ds(x,s,e),x=null}else x=p.child;if(x!==null)x.return=p;else for(x=p;x!==null;){if(x===e){x=null;break}if(p=x.sibling,p!==null){p.return=x.return,x=p;break}x=x.return}p=x}}function Li(e,a,s,f){e=null;for(var p=a,g=!1;p!==null;){if(!g){if((p.flags&524288)!==0)g=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var x=p.alternate;if(x===null)throw Error(u(387));if(x=x.memoizedProps,x!==null){var A=p.type;Vn(p.pendingProps.value,x.value)||(e!==null?e.push(A):e=[A])}}else if(p===Te.current){if(x=p.alternate,x===null)throw Error(u(387));x.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(e!==null?e.push(Pr):e=[Pr])}p=p.return}e!==null&&ks(a,e,s,f),a.flags|=262144}function ul(e){for(e=e.firstContext;e!==null;){if(!Vn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function yi(e){gi=e,Ta=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _n(e){return Xu(gi,e)}function cl(e,a){return gi===null&&yi(e),Xu(e,a)}function Xu(e,a){var s=a._currentValue;if(a={context:a,memoizedValue:s,next:null},Ta===null){if(e===null)throw Error(u(308));Ta=a,e.dependencies={lanes:0,firstContext:a},e.flags|=524288}else Ta=Ta.next=a;return s}var Oh=typeof AbortController<"u"?AbortController:function(){var e=[],a=this.signal={aborted:!1,addEventListener:function(s,f){e.push(f)}};this.abort=function(){a.aborted=!0,e.forEach(function(s){return s()})}},wh=n.unstable_scheduleCallback,Nh=n.unstable_NormalPriority,un={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ls(){return{controller:new Oh,data:new Map,refCount:0}}function gr(e){e.refCount--,e.refCount===0&&wh(Nh,function(){e.controller.abort()})}var yr=null,Bs=0,Bi=0,zi=null;function Mh(e,a){if(yr===null){var s=yr=[];Bs=0,Bi=Ho(),zi={status:"pending",value:void 0,then:function(f){s.push(f)}}}return Bs++,a.then(Yu,Yu),a}function Yu(){if(--Bs===0&&yr!==null){zi!==null&&(zi.status="fulfilled");var e=yr;yr=null,Bi=0,zi=null;for(var a=0;a<e.length;a++)(0,e[a])()}}function jh(e,a){var s=[],f={status:"pending",value:null,reason:null,then:function(p){s.push(p)}};return e.then(function(){f.status="fulfilled",f.value=a;for(var p=0;p<s.length;p++)(0,s[p])(a)},function(p){for(f.status="rejected",f.reason=p,p=0;p<s.length;p++)(0,s[p])(void 0)}),f}var Ku=F.S;F.S=function(e,a){jf=we(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&Mh(e,a),Ku!==null&&Ku(e,a)};var vi=q(null);function zs(){var e=vi.current;return e!==null?e:wt.pooledCache}function fl(e,a){a===null?oe(vi,vi.current):oe(vi,a.pool)}function Qu(){var e=zs();return e===null?null:{parent:un._currentValue,pool:e}}var Ui=Error(u(460)),Us=Error(u(474)),dl=Error(u(542)),hl={then:function(){}};function Wu(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ju(e,a,s){switch(s=e[s],s===void 0?e.push(a):s!==a&&(a.then(sa,sa),a=s),a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,$u(e),e;default:if(typeof a.status=="string")a.then(sa,sa);else{if(e=wt,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=a,e.status="pending",e.then(function(f){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=f}},function(f){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=f}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,$u(e),e}throw Ei=a,Ui}}function bi(e){try{var a=e._init;return a(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Ei=s,Ui):s}}var Ei=null;function Zu(){if(Ei===null)throw Error(u(459));var e=Ei;return Ei=null,e}function $u(e){if(e===Ui||e===dl)throw Error(u(483))}var Ii=null,vr=0;function pl(e){var a=vr;return vr+=1,Ii===null&&(Ii=[]),Ju(Ii,e,a)}function br(e,a){a=a.props.ref,e.ref=a!==void 0?a:null}function ml(e,a){throw a.$$typeof===T?Error(u(525)):(e=Object.prototype.toString.call(a),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":e)))}function ec(e){function a(X,G){if(e){var J=X.deletions;J===null?(X.deletions=[G],X.flags|=16):J.push(G)}}function s(X,G){if(!e)return null;for(;G!==null;)a(X,G),G=G.sibling;return null}function f(X){for(var G=new Map;X!==null;)X.key!==null?G.set(X.key,X):G.set(X.index,X),X=X.sibling;return G}function p(X,G){return X=xa(X,G),X.index=0,X.sibling=null,X}function g(X,G,J){return X.index=J,e?(J=X.alternate,J!==null?(J=J.index,J<G?(X.flags|=67108866,G):J):(X.flags|=67108866,G)):(X.flags|=1048576,G)}function x(X){return e&&X.alternate===null&&(X.flags|=67108866),X}function A(X,G,J,ue){return G===null||G.tag!==6?(G=As(J,X.mode,ue),G.return=X,G):(G=p(G,J),G.return=X,G)}function P(X,G,J,ue){var Me=J.type;return Me===N?se(X,G,J.props.children,ue,J.key):G!==null&&(G.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Q&&bi(Me)===G.type)?(G=p(G,J.props),br(G,J),G.return=X,G):(G=sl(J.type,J.key,J.props,null,X.mode,ue),br(G,J),G.return=X,G)}function Z(X,G,J,ue){return G===null||G.tag!==4||G.stateNode.containerInfo!==J.containerInfo||G.stateNode.implementation!==J.implementation?(G=Cs(J,X.mode,ue),G.return=X,G):(G=p(G,J.children||[]),G.return=X,G)}function se(X,G,J,ue,Me){return G===null||G.tag!==7?(G=pi(J,X.mode,ue,Me),G.return=X,G):(G=p(G,J),G.return=X,G)}function he(X,G,J){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=As(""+G,X.mode,J),G.return=X,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case R:return J=sl(G.type,G.key,G.props,null,X.mode,J),br(J,G),J.return=X,J;case D:return G=Cs(G,X.mode,J),G.return=X,G;case Q:return G=bi(G),he(X,G,J)}if(_e(G)||le(G))return G=pi(G,X.mode,J,null),G.return=X,G;if(typeof G.then=="function")return he(X,pl(G),J);if(G.$$typeof===U)return he(X,cl(X,G),J);ml(X,G)}return null}function ee(X,G,J,ue){var Me=G!==null?G.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return Me!==null?null:A(X,G,""+J,ue);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case R:return J.key===Me?P(X,G,J,ue):null;case D:return J.key===Me?Z(X,G,J,ue):null;case Q:return J=bi(J),ee(X,G,J,ue)}if(_e(J)||le(J))return Me!==null?null:se(X,G,J,ue,null);if(typeof J.then=="function")return ee(X,G,pl(J),ue);if(J.$$typeof===U)return ee(X,G,cl(X,J),ue);ml(X,J)}return null}function ae(X,G,J,ue,Me){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return X=X.get(J)||null,A(G,X,""+ue,Me);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case R:return X=X.get(ue.key===null?J:ue.key)||null,P(G,X,ue,Me);case D:return X=X.get(ue.key===null?J:ue.key)||null,Z(G,X,ue,Me);case Q:return ue=bi(ue),ae(X,G,J,ue,Me)}if(_e(ue)||le(ue))return X=X.get(J)||null,se(G,X,ue,Me,null);if(typeof ue.then=="function")return ae(X,G,J,pl(ue),Me);if(ue.$$typeof===U)return ae(X,G,J,cl(G,ue),Me);ml(G,ue)}return null}function Ae(X,G,J,ue){for(var Me=null,dt=null,Ce=G,Ge=G=0,at=null;Ce!==null&&Ge<J.length;Ge++){Ce.index>Ge?(at=Ce,Ce=null):at=Ce.sibling;var ht=ee(X,Ce,J[Ge],ue);if(ht===null){Ce===null&&(Ce=at);break}e&&Ce&&ht.alternate===null&&a(X,Ce),G=g(ht,G,Ge),dt===null?Me=ht:dt.sibling=ht,dt=ht,Ce=at}if(Ge===J.length)return s(X,Ce),st&&Sa(X,Ge),Me;if(Ce===null){for(;Ge<J.length;Ge++)Ce=he(X,J[Ge],ue),Ce!==null&&(G=g(Ce,G,Ge),dt===null?Me=Ce:dt.sibling=Ce,dt=Ce);return st&&Sa(X,Ge),Me}for(Ce=f(Ce);Ge<J.length;Ge++)at=ae(Ce,X,Ge,J[Ge],ue),at!==null&&(e&&at.alternate!==null&&Ce.delete(at.key===null?Ge:at.key),G=g(at,G,Ge),dt===null?Me=at:dt.sibling=at,dt=at);return e&&Ce.forEach(function(si){return a(X,si)}),st&&Sa(X,Ge),Me}function De(X,G,J,ue){if(J==null)throw Error(u(151));for(var Me=null,dt=null,Ce=G,Ge=G=0,at=null,ht=J.next();Ce!==null&&!ht.done;Ge++,ht=J.next()){Ce.index>Ge?(at=Ce,Ce=null):at=Ce.sibling;var si=ee(X,Ce,ht.value,ue);if(si===null){Ce===null&&(Ce=at);break}e&&Ce&&si.alternate===null&&a(X,Ce),G=g(si,G,Ge),dt===null?Me=si:dt.sibling=si,dt=si,Ce=at}if(ht.done)return s(X,Ce),st&&Sa(X,Ge),Me;if(Ce===null){for(;!ht.done;Ge++,ht=J.next())ht=he(X,ht.value,ue),ht!==null&&(G=g(ht,G,Ge),dt===null?Me=ht:dt.sibling=ht,dt=ht);return st&&Sa(X,Ge),Me}for(Ce=f(Ce);!ht.done;Ge++,ht=J.next())ht=ae(Ce,X,Ge,ht.value,ue),ht!==null&&(e&&ht.alternate!==null&&Ce.delete(ht.key===null?Ge:ht.key),G=g(ht,G,Ge),dt===null?Me=ht:dt.sibling=ht,dt=ht);return e&&Ce.forEach(function(Vp){return a(X,Vp)}),st&&Sa(X,Ge),Me}function Tt(X,G,J,ue){if(typeof J=="object"&&J!==null&&J.type===N&&J.key===null&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case R:e:{for(var Me=J.key;G!==null;){if(G.key===Me){if(Me=J.type,Me===N){if(G.tag===7){s(X,G.sibling),ue=p(G,J.props.children),ue.return=X,X=ue;break e}}else if(G.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Q&&bi(Me)===G.type){s(X,G.sibling),ue=p(G,J.props),br(ue,J),ue.return=X,X=ue;break e}s(X,G);break}else a(X,G);G=G.sibling}J.type===N?(ue=pi(J.props.children,X.mode,ue,J.key),ue.return=X,X=ue):(ue=sl(J.type,J.key,J.props,null,X.mode,ue),br(ue,J),ue.return=X,X=ue)}return x(X);case D:e:{for(Me=J.key;G!==null;){if(G.key===Me)if(G.tag===4&&G.stateNode.containerInfo===J.containerInfo&&G.stateNode.implementation===J.implementation){s(X,G.sibling),ue=p(G,J.children||[]),ue.return=X,X=ue;break e}else{s(X,G);break}else a(X,G);G=G.sibling}ue=Cs(J,X.mode,ue),ue.return=X,X=ue}return x(X);case Q:return J=bi(J),Tt(X,G,J,ue)}if(_e(J))return Ae(X,G,J,ue);if(le(J)){if(Me=le(J),typeof Me!="function")throw Error(u(150));return J=Me.call(J),De(X,G,J,ue)}if(typeof J.then=="function")return Tt(X,G,pl(J),ue);if(J.$$typeof===U)return Tt(X,G,cl(X,J),ue);ml(X,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,G!==null&&G.tag===6?(s(X,G.sibling),ue=p(G,J),ue.return=X,X=ue):(s(X,G),ue=As(J,X.mode,ue),ue.return=X,X=ue),x(X)):s(X,G)}return function(X,G,J,ue){try{vr=0;var Me=Tt(X,G,J,ue);return Ii=null,Me}catch(Ce){if(Ce===Ui||Ce===dl)throw Ce;var dt=Gn(29,Ce,null,X.mode);return dt.lanes=ue,dt.return=X,dt}}}var _i=ec(!0),tc=ec(!1),Ga=!1;function Is(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hs(e,a){e=e.updateQueue,a.updateQueue===e&&(a.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Fa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Xa(e,a,s){var f=e.updateQueue;if(f===null)return null;if(f=f.shared,(mt&2)!==0){var p=f.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),f.pending=a,a=ll(e),Uu(e,null,s),a}return rl(e,f,a,s),ll(e)}function Er(e,a,s){if(a=a.updateQueue,a!==null&&(a=a.shared,(s&4194048)!==0)){var f=a.lanes;f&=e.pendingLanes,s|=f,a.lanes=s,Nn(e,s)}}function qs(e,a){var s=e.updateQueue,f=e.alternate;if(f!==null&&(f=f.updateQueue,s===f)){var p=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var x={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?p=g=x:g=g.next=x,s=s.next}while(s!==null);g===null?p=g=a:g=g.next=a}else p=g=a;s={baseState:f.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:f.shared,callbacks:f.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=a:e.next=a,s.lastBaseUpdate=a}var Ps=!1;function _r(){if(Ps){var e=zi;if(e!==null)throw e}}function xr(e,a,s,f){Ps=!1;var p=e.updateQueue;Ga=!1;var g=p.firstBaseUpdate,x=p.lastBaseUpdate,A=p.shared.pending;if(A!==null){p.shared.pending=null;var P=A,Z=P.next;P.next=null,x===null?g=Z:x.next=Z,x=P;var se=e.alternate;se!==null&&(se=se.updateQueue,A=se.lastBaseUpdate,A!==x&&(A===null?se.firstBaseUpdate=Z:A.next=Z,se.lastBaseUpdate=P))}if(g!==null){var he=p.baseState;x=0,se=Z=P=null,A=g;do{var ee=A.lane&-536870913,ae=ee!==A.lane;if(ae?(nt&ee)===ee:(f&ee)===ee){ee!==0&&ee===Bi&&(Ps=!0),se!==null&&(se=se.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var Ae=e,De=A;ee=a;var Tt=s;switch(De.tag){case 1:if(Ae=De.payload,typeof Ae=="function"){he=Ae.call(Tt,he,ee);break e}he=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=De.payload,ee=typeof Ae=="function"?Ae.call(Tt,he,ee):Ae,ee==null)break e;he=w({},he,ee);break e;case 2:Ga=!0}}ee=A.callback,ee!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=p.callbacks,ae===null?p.callbacks=[ee]:ae.push(ee))}else ae={lane:ee,tag:A.tag,payload:A.payload,callback:A.callback,next:null},se===null?(Z=se=ae,P=he):se=se.next=ae,x|=ee;if(A=A.next,A===null){if(A=p.shared.pending,A===null)break;ae=A,A=ae.next,ae.next=null,p.lastBaseUpdate=ae,p.shared.pending=null}}while(!0);se===null&&(P=he),p.baseState=P,p.firstBaseUpdate=Z,p.lastBaseUpdate=se,g===null&&(p.shared.lanes=0),Ja|=x,e.lanes=x,e.memoizedState=he}}function nc(e,a){if(typeof e!="function")throw Error(u(191,e));e.call(a)}function ac(e,a){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)nc(s[e],a)}var Hi=q(null),gl=q(0);function ic(e,a){e=ka,oe(gl,e),oe(Hi,a),ka=e|a.baseLanes}function Vs(){oe(gl,ka),oe(Hi,Hi.current)}function Gs(){ka=gl.current,ie(Hi),ie(gl)}var Fn=q(null),ia=null;function Ya(e){var a=e.alternate;oe(rn,rn.current&1),oe(Fn,e),ia===null&&(a===null||Hi.current!==null||a.memoizedState!==null)&&(ia=e)}function Fs(e){oe(rn,rn.current),oe(Fn,e),ia===null&&(ia=e)}function rc(e){e.tag===22?(oe(rn,rn.current),oe(Fn,e),ia===null&&(ia=e)):Ka()}function Ka(){oe(rn,rn.current),oe(Fn,Fn.current)}function Xn(e){ie(Fn),ia===e&&(ia=null),ie(rn)}var rn=q(0);function yl(e){for(var a=e;a!==null;){if(a.tag===13){var s=a.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||Zo(s)||$o(s)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Aa=0,Pe=null,xt=null,cn=null,vl=!1,qi=!1,xi=!1,bl=0,Sr=0,Pi=null,Dh=0;function $t(){throw Error(u(321))}function Xs(e,a){if(a===null)return!1;for(var s=0;s<a.length&&s<e.length;s++)if(!Vn(e[s],a[s]))return!1;return!0}function Ys(e,a,s,f,p,g){return Aa=g,Pe=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,F.H=e===null||e.memoizedState===null?Pc:oo,xi=!1,g=s(f,p),xi=!1,qi&&(g=sc(a,s,f,p)),lc(e),g}function lc(e){F.H=Ar;var a=xt!==null&&xt.next!==null;if(Aa=0,cn=xt=Pe=null,vl=!1,Sr=0,Pi=null,a)throw Error(u(300));e===null||fn||(e=e.dependencies,e!==null&&ul(e)&&(fn=!0))}function sc(e,a,s,f){Pe=e;var p=0;do{if(qi&&(Pi=null),Sr=0,qi=!1,25<=p)throw Error(u(301));if(p+=1,cn=xt=null,e.updateQueue!=null){var g=e.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}F.H=Vc,g=a(s,f)}while(qi);return g}function kh(){var e=F.H,a=e.useState()[0];return a=typeof a.then=="function"?Tr(a):a,e=e.useState()[0],(xt!==null?xt.memoizedState:null)!==e&&(Pe.flags|=1024),a}function Ks(){var e=bl!==0;return bl=0,e}function Qs(e,a,s){a.updateQueue=e.updateQueue,a.flags&=-2053,e.lanes&=~s}function Ws(e){if(vl){for(e=e.memoizedState;e!==null;){var a=e.queue;a!==null&&(a.pending=null),e=e.next}vl=!1}Aa=0,cn=xt=Pe=null,qi=!1,Sr=bl=0,Pi=null}function Mn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return cn===null?Pe.memoizedState=cn=e:cn=cn.next=e,cn}function ln(){if(xt===null){var e=Pe.alternate;e=e!==null?e.memoizedState:null}else e=xt.next;var a=cn===null?Pe.memoizedState:cn.next;if(a!==null)cn=a,xt=e;else{if(e===null)throw Pe.alternate===null?Error(u(467)):Error(u(310));xt=e,e={memoizedState:xt.memoizedState,baseState:xt.baseState,baseQueue:xt.baseQueue,queue:xt.queue,next:null},cn===null?Pe.memoizedState=cn=e:cn=cn.next=e}return cn}function El(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Tr(e){var a=Sr;return Sr+=1,Pi===null&&(Pi=[]),e=Ju(Pi,e,a),a=Pe,(cn===null?a.memoizedState:cn.next)===null&&(a=a.alternate,F.H=a===null||a.memoizedState===null?Pc:oo),e}function _l(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Tr(e);if(e.$$typeof===U)return _n(e)}throw Error(u(438,String(e)))}function Js(e){var a=null,s=Pe.updateQueue;if(s!==null&&(a=s.memoCache),a==null){var f=Pe.alternate;f!==null&&(f=f.updateQueue,f!==null&&(f=f.memoCache,f!=null&&(a={data:f.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),s===null&&(s=El(),Pe.updateQueue=s),s.memoCache=a,s=a.data[a.index],s===void 0)for(s=a.data[a.index]=Array(e),f=0;f<e;f++)s[f]=fe;return a.index++,s}function Ca(e,a){return typeof a=="function"?a(e):a}function xl(e){var a=ln();return Zs(a,xt,e)}function Zs(e,a,s){var f=e.queue;if(f===null)throw Error(u(311));f.lastRenderedReducer=s;var p=e.baseQueue,g=f.pending;if(g!==null){if(p!==null){var x=p.next;p.next=g.next,g.next=x}a.baseQueue=p=g,f.pending=null}if(g=e.baseState,p===null)e.memoizedState=g;else{a=p.next;var A=x=null,P=null,Z=a,se=!1;do{var he=Z.lane&-536870913;if(he!==Z.lane?(nt&he)===he:(Aa&he)===he){var ee=Z.revertLane;if(ee===0)P!==null&&(P=P.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),he===Bi&&(se=!0);else if((Aa&ee)===ee){Z=Z.next,ee===Bi&&(se=!0);continue}else he={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},P===null?(A=P=he,x=g):P=P.next=he,Pe.lanes|=ee,Ja|=ee;he=Z.action,xi&&s(g,he),g=Z.hasEagerState?Z.eagerState:s(g,he)}else ee={lane:he,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},P===null?(A=P=ee,x=g):P=P.next=ee,Pe.lanes|=he,Ja|=he;Z=Z.next}while(Z!==null&&Z!==a);if(P===null?x=g:P.next=A,!Vn(g,e.memoizedState)&&(fn=!0,se&&(s=zi,s!==null)))throw s;e.memoizedState=g,e.baseState=x,e.baseQueue=P,f.lastRenderedState=g}return p===null&&(f.lanes=0),[e.memoizedState,f.dispatch]}function $s(e){var a=ln(),s=a.queue;if(s===null)throw Error(u(311));s.lastRenderedReducer=e;var f=s.dispatch,p=s.pending,g=a.memoizedState;if(p!==null){s.pending=null;var x=p=p.next;do g=e(g,x.action),x=x.next;while(x!==p);Vn(g,a.memoizedState)||(fn=!0),a.memoizedState=g,a.baseQueue===null&&(a.baseState=g),s.lastRenderedState=g}return[g,f]}function oc(e,a,s){var f=Pe,p=ln(),g=st;if(g){if(s===void 0)throw Error(u(407));s=s()}else s=a();var x=!Vn((xt||p).memoizedState,s);if(x&&(p.memoizedState=s,fn=!0),p=p.queue,no(fc.bind(null,f,p,e),[e]),p.getSnapshot!==a||x||cn!==null&&cn.memoizedState.tag&1){if(f.flags|=2048,Vi(9,{destroy:void 0},cc.bind(null,f,p,s,a),null),wt===null)throw Error(u(349));g||(Aa&127)!==0||uc(f,a,s)}return s}function uc(e,a,s){e.flags|=16384,e={getSnapshot:a,value:s},a=Pe.updateQueue,a===null?(a=El(),Pe.updateQueue=a,a.stores=[e]):(s=a.stores,s===null?a.stores=[e]:s.push(e))}function cc(e,a,s,f){a.value=s,a.getSnapshot=f,dc(a)&&hc(e)}function fc(e,a,s){return s(function(){dc(a)&&hc(e)})}function dc(e){var a=e.getSnapshot;e=e.value;try{var s=a();return!Vn(e,s)}catch{return!0}}function hc(e){var a=hi(e,2);a!==null&&In(a,e,2)}function eo(e){var a=Mn();if(typeof e=="function"){var s=e;if(e=s(),xi){yt(!0);try{s()}finally{yt(!1)}}}return a.memoizedState=a.baseState=e,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:e},a}function pc(e,a,s,f){return e.baseState=s,Zs(e,xt,typeof f=="function"?f:Ca)}function Lh(e,a,s,f,p){if(Rl(e))throw Error(u(485));if(e=a.action,e!==null){var g={payload:p,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){g.listeners.push(x)}};F.T!==null?s(!0):g.isTransition=!1,f(g),s=a.pending,s===null?(g.next=a.pending=g,mc(a,g)):(g.next=s.next,a.pending=s.next=g)}}function mc(e,a){var s=a.action,f=a.payload,p=e.state;if(a.isTransition){var g=F.T,x={};F.T=x;try{var A=s(p,f),P=F.S;P!==null&&P(x,A),gc(e,a,A)}catch(Z){to(e,a,Z)}finally{g!==null&&x.types!==null&&(g.types=x.types),F.T=g}}else try{g=s(p,f),gc(e,a,g)}catch(Z){to(e,a,Z)}}function gc(e,a,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(f){yc(e,a,f)},function(f){return to(e,a,f)}):yc(e,a,s)}function yc(e,a,s){a.status="fulfilled",a.value=s,vc(a),e.state=s,a=e.pending,a!==null&&(s=a.next,s===a?e.pending=null:(s=s.next,a.next=s,mc(e,s)))}function to(e,a,s){var f=e.pending;if(e.pending=null,f!==null){f=f.next;do a.status="rejected",a.reason=s,vc(a),a=a.next;while(a!==f)}e.action=null}function vc(e){e=e.listeners;for(var a=0;a<e.length;a++)(0,e[a])()}function bc(e,a){return a}function Ec(e,a){if(st){var s=wt.formState;if(s!==null){e:{var f=Pe;if(st){if(It){t:{for(var p=It,g=aa;p.nodeType!==8;){if(!g){p=null;break t}if(p=ra(p.nextSibling),p===null){p=null;break t}}g=p.data,p=g==="F!"||g==="F"?p:null}if(p){It=ra(p.nextSibling),f=p.data==="F!";break e}}Pa(f)}f=!1}f&&(a=s[0])}}return s=Mn(),s.memoizedState=s.baseState=a,f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bc,lastRenderedState:a},s.queue=f,s=Ic.bind(null,Pe,f),f.dispatch=s,f=eo(!1),g=so.bind(null,Pe,!1,f.queue),f=Mn(),p={state:a,dispatch:null,action:e,pending:null},f.queue=p,s=Lh.bind(null,Pe,p,g,s),p.dispatch=s,f.memoizedState=e,[a,s,!1]}function _c(e){var a=ln();return xc(a,xt,e)}function xc(e,a,s){if(a=Zs(e,a,bc)[0],e=xl(Ca)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var f=Tr(a)}catch(x){throw x===Ui?dl:x}else f=a;a=ln();var p=a.queue,g=p.dispatch;return s!==a.memoizedState&&(Pe.flags|=2048,Vi(9,{destroy:void 0},Bh.bind(null,p,s),null)),[f,g,e]}function Bh(e,a){e.action=a}function Sc(e){var a=ln(),s=xt;if(s!==null)return xc(a,s,e);ln(),a=a.memoizedState,s=ln();var f=s.queue.dispatch;return s.memoizedState=e,[a,f,!1]}function Vi(e,a,s,f){return e={tag:e,create:s,deps:f,inst:a,next:null},a=Pe.updateQueue,a===null&&(a=El(),Pe.updateQueue=a),s=a.lastEffect,s===null?a.lastEffect=e.next=e:(f=s.next,s.next=e,e.next=f,a.lastEffect=e),e}function Tc(){return ln().memoizedState}function Sl(e,a,s,f){var p=Mn();Pe.flags|=e,p.memoizedState=Vi(1|a,{destroy:void 0},s,f===void 0?null:f)}function Tl(e,a,s,f){var p=ln();f=f===void 0?null:f;var g=p.memoizedState.inst;xt!==null&&f!==null&&Xs(f,xt.memoizedState.deps)?p.memoizedState=Vi(a,g,s,f):(Pe.flags|=e,p.memoizedState=Vi(1|a,g,s,f))}function Rc(e,a){Sl(8390656,8,e,a)}function no(e,a){Tl(2048,8,e,a)}function zh(e){Pe.flags|=4;var a=Pe.updateQueue;if(a===null)a=El(),Pe.updateQueue=a,a.events=[e];else{var s=a.events;s===null?a.events=[e]:s.push(e)}}function Ac(e){var a=ln().memoizedState;return zh({ref:a,nextImpl:e}),function(){if((mt&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}function Cc(e,a){return Tl(4,2,e,a)}function Oc(e,a){return Tl(4,4,e,a)}function wc(e,a){if(typeof a=="function"){e=e();var s=a(e);return function(){typeof s=="function"?s():a(null)}}if(a!=null)return e=e(),a.current=e,function(){a.current=null}}function Nc(e,a,s){s=s!=null?s.concat([e]):null,Tl(4,4,wc.bind(null,a,e),s)}function ao(){}function Mc(e,a){var s=ln();a=a===void 0?null:a;var f=s.memoizedState;return a!==null&&Xs(a,f[1])?f[0]:(s.memoizedState=[e,a],e)}function jc(e,a){var s=ln();a=a===void 0?null:a;var f=s.memoizedState;if(a!==null&&Xs(a,f[1]))return f[0];if(f=e(),xi){yt(!0);try{e()}finally{yt(!1)}}return s.memoizedState=[f,a],f}function io(e,a,s){return s===void 0||(Aa&1073741824)!==0&&(nt&261930)===0?e.memoizedState=a:(e.memoizedState=s,e=kf(),Pe.lanes|=e,Ja|=e,s)}function Dc(e,a,s,f){return Vn(s,a)?s:Hi.current!==null?(e=io(e,s,f),Vn(e,a)||(fn=!0),e):(Aa&42)===0||(Aa&1073741824)!==0&&(nt&261930)===0?(fn=!0,e.memoizedState=s):(e=kf(),Pe.lanes|=e,Ja|=e,a)}function kc(e,a,s,f,p){var g=ce.p;ce.p=g!==0&&8>g?g:8;var x=F.T,A={};F.T=A,so(e,!1,a,s);try{var P=p(),Z=F.S;if(Z!==null&&Z(A,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var se=jh(P,f);Rr(e,a,se,Qn(e))}else Rr(e,a,f,Qn(e))}catch(he){Rr(e,a,{then:function(){},status:"rejected",reason:he},Qn())}finally{ce.p=g,x!==null&&A.types!==null&&(x.types=A.types),F.T=x}}function Uh(){}function ro(e,a,s,f){if(e.tag!==5)throw Error(u(476));var p=Lc(e).queue;kc(e,p,a,te,s===null?Uh:function(){return Bc(e),s(f)})}function Lc(e){var a=e.memoizedState;if(a!==null)return a;a={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:te},next:null};var s={};return a.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:s},next:null},e.memoizedState=a,e=e.alternate,e!==null&&(e.memoizedState=a),a}function Bc(e){var a=Lc(e);a.next===null&&(a=e.alternate.memoizedState),Rr(e,a.next.queue,{},Qn())}function lo(){return _n(Pr)}function zc(){return ln().memoizedState}function Uc(){return ln().memoizedState}function Ih(e){for(var a=e.return;a!==null;){switch(a.tag){case 24:case 3:var s=Qn();e=Fa(s);var f=Xa(a,e,s);f!==null&&(In(f,a,s),Er(f,a,s)),a={cache:Ls()},e.payload=a;return}a=a.return}}function Hh(e,a,s){var f=Qn();s={lane:f,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Rl(e)?Hc(a,s):(s=Ts(e,a,s,f),s!==null&&(In(s,e,f),qc(s,a,f)))}function Ic(e,a,s){var f=Qn();Rr(e,a,s,f)}function Rr(e,a,s,f){var p={lane:f,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(Rl(e))Hc(a,p);else{var g=e.alternate;if(e.lanes===0&&(g===null||g.lanes===0)&&(g=a.lastRenderedReducer,g!==null))try{var x=a.lastRenderedState,A=g(x,s);if(p.hasEagerState=!0,p.eagerState=A,Vn(A,x))return rl(e,a,p,0),wt===null&&il(),!1}catch{}if(s=Ts(e,a,p,f),s!==null)return In(s,e,f),qc(s,a,f),!0}return!1}function so(e,a,s,f){if(f={lane:2,revertLane:Ho(),gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Rl(e)){if(a)throw Error(u(479))}else a=Ts(e,s,f,2),a!==null&&In(a,e,2)}function Rl(e){var a=e.alternate;return e===Pe||a!==null&&a===Pe}function Hc(e,a){qi=vl=!0;var s=e.pending;s===null?a.next=a:(a.next=s.next,s.next=a),e.pending=a}function qc(e,a,s){if((s&4194048)!==0){var f=a.lanes;f&=e.pendingLanes,s|=f,a.lanes=s,Nn(e,s)}}var Ar={readContext:_n,use:_l,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useLayoutEffect:$t,useInsertionEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useSyncExternalStore:$t,useId:$t,useHostTransitionStatus:$t,useFormState:$t,useActionState:$t,useOptimistic:$t,useMemoCache:$t,useCacheRefresh:$t};Ar.useEffectEvent=$t;var Pc={readContext:_n,use:_l,useCallback:function(e,a){return Mn().memoizedState=[e,a===void 0?null:a],e},useContext:_n,useEffect:Rc,useImperativeHandle:function(e,a,s){s=s!=null?s.concat([e]):null,Sl(4194308,4,wc.bind(null,a,e),s)},useLayoutEffect:function(e,a){return Sl(4194308,4,e,a)},useInsertionEffect:function(e,a){Sl(4,2,e,a)},useMemo:function(e,a){var s=Mn();a=a===void 0?null:a;var f=e();if(xi){yt(!0);try{e()}finally{yt(!1)}}return s.memoizedState=[f,a],f},useReducer:function(e,a,s){var f=Mn();if(s!==void 0){var p=s(a);if(xi){yt(!0);try{s(a)}finally{yt(!1)}}}else p=a;return f.memoizedState=f.baseState=p,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:p},f.queue=e,e=e.dispatch=Hh.bind(null,Pe,e),[f.memoizedState,e]},useRef:function(e){var a=Mn();return e={current:e},a.memoizedState=e},useState:function(e){e=eo(e);var a=e.queue,s=Ic.bind(null,Pe,a);return a.dispatch=s,[e.memoizedState,s]},useDebugValue:ao,useDeferredValue:function(e,a){var s=Mn();return io(s,e,a)},useTransition:function(){var e=eo(!1);return e=kc.bind(null,Pe,e.queue,!0,!1),Mn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,a,s){var f=Pe,p=Mn();if(st){if(s===void 0)throw Error(u(407));s=s()}else{if(s=a(),wt===null)throw Error(u(349));(nt&127)!==0||uc(f,a,s)}p.memoizedState=s;var g={value:s,getSnapshot:a};return p.queue=g,Rc(fc.bind(null,f,g,e),[e]),f.flags|=2048,Vi(9,{destroy:void 0},cc.bind(null,f,g,s,a),null),s},useId:function(){var e=Mn(),a=wt.identifierPrefix;if(st){var s=ha,f=da;s=(f&~(1<<32-pt(f)-1)).toString(32)+s,a="_"+a+"R_"+s,s=bl++,0<s&&(a+="H"+s.toString(32)),a+="_"}else s=Dh++,a="_"+a+"r_"+s.toString(32)+"_";return e.memoizedState=a},useHostTransitionStatus:lo,useFormState:Ec,useActionState:Ec,useOptimistic:function(e){var a=Mn();a.memoizedState=a.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=s,a=so.bind(null,Pe,!0,s),s.dispatch=a,[e,a]},useMemoCache:Js,useCacheRefresh:function(){return Mn().memoizedState=Ih.bind(null,Pe)},useEffectEvent:function(e){var a=Mn(),s={impl:e};return a.memoizedState=s,function(){if((mt&2)!==0)throw Error(u(440));return s.impl.apply(void 0,arguments)}}},oo={readContext:_n,use:_l,useCallback:Mc,useContext:_n,useEffect:no,useImperativeHandle:Nc,useInsertionEffect:Cc,useLayoutEffect:Oc,useMemo:jc,useReducer:xl,useRef:Tc,useState:function(){return xl(Ca)},useDebugValue:ao,useDeferredValue:function(e,a){var s=ln();return Dc(s,xt.memoizedState,e,a)},useTransition:function(){var e=xl(Ca)[0],a=ln().memoizedState;return[typeof e=="boolean"?e:Tr(e),a]},useSyncExternalStore:oc,useId:zc,useHostTransitionStatus:lo,useFormState:_c,useActionState:_c,useOptimistic:function(e,a){var s=ln();return pc(s,xt,e,a)},useMemoCache:Js,useCacheRefresh:Uc};oo.useEffectEvent=Ac;var Vc={readContext:_n,use:_l,useCallback:Mc,useContext:_n,useEffect:no,useImperativeHandle:Nc,useInsertionEffect:Cc,useLayoutEffect:Oc,useMemo:jc,useReducer:$s,useRef:Tc,useState:function(){return $s(Ca)},useDebugValue:ao,useDeferredValue:function(e,a){var s=ln();return xt===null?io(s,e,a):Dc(s,xt.memoizedState,e,a)},useTransition:function(){var e=$s(Ca)[0],a=ln().memoizedState;return[typeof e=="boolean"?e:Tr(e),a]},useSyncExternalStore:oc,useId:zc,useHostTransitionStatus:lo,useFormState:Sc,useActionState:Sc,useOptimistic:function(e,a){var s=ln();return xt!==null?pc(s,xt,e,a):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:Js,useCacheRefresh:Uc};Vc.useEffectEvent=Ac;function uo(e,a,s,f){a=e.memoizedState,s=s(f,a),s=s==null?a:w({},a,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var co={enqueueSetState:function(e,a,s){e=e._reactInternals;var f=Qn(),p=Fa(f);p.payload=a,s!=null&&(p.callback=s),a=Xa(e,p,f),a!==null&&(In(a,e,f),Er(a,e,f))},enqueueReplaceState:function(e,a,s){e=e._reactInternals;var f=Qn(),p=Fa(f);p.tag=1,p.payload=a,s!=null&&(p.callback=s),a=Xa(e,p,f),a!==null&&(In(a,e,f),Er(a,e,f))},enqueueForceUpdate:function(e,a){e=e._reactInternals;var s=Qn(),f=Fa(s);f.tag=2,a!=null&&(f.callback=a),a=Xa(e,f,s),a!==null&&(In(a,e,s),Er(a,e,s))}};function Gc(e,a,s,f,p,g,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(f,g,x):a.prototype&&a.prototype.isPureReactComponent?!dr(s,f)||!dr(p,g):!0}function Fc(e,a,s,f){e=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(s,f),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(s,f),a.state!==e&&co.enqueueReplaceState(a,a.state,null)}function Si(e,a){var s=a;if("ref"in a){s={};for(var f in a)f!=="ref"&&(s[f]=a[f])}if(e=e.defaultProps){s===a&&(s=w({},s));for(var p in e)s[p]===void 0&&(s[p]=e[p])}return s}function Xc(e){al(e)}function Yc(e){console.error(e)}function Kc(e){al(e)}function Al(e,a){try{var s=e.onUncaughtError;s(a.value,{componentStack:a.stack})}catch(f){setTimeout(function(){throw f})}}function Qc(e,a,s){try{var f=e.onCaughtError;f(s.value,{componentStack:s.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function fo(e,a,s){return s=Fa(s),s.tag=3,s.payload={element:null},s.callback=function(){Al(e,a)},s}function Wc(e){return e=Fa(e),e.tag=3,e}function Jc(e,a,s,f){var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var g=f.value;e.payload=function(){return p(g)},e.callback=function(){Qc(a,s,f)}}var x=s.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Qc(a,s,f),typeof p!="function"&&(Za===null?Za=new Set([this]):Za.add(this));var A=f.stack;this.componentDidCatch(f.value,{componentStack:A!==null?A:""})})}function qh(e,a,s,f,p){if(s.flags|=32768,f!==null&&typeof f=="object"&&typeof f.then=="function"){if(a=s.alternate,a!==null&&Li(a,s,p,!0),s=Fn.current,s!==null){switch(s.tag){case 31:case 13:return ia===null?Ul():s.alternate===null&&tn===0&&(tn=3),s.flags&=-257,s.flags|=65536,s.lanes=p,f===hl?s.flags|=16384:(a=s.updateQueue,a===null?s.updateQueue=new Set([f]):a.add(f),zo(e,f,p)),!1;case 22:return s.flags|=65536,f===hl?s.flags|=16384:(a=s.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([f])},s.updateQueue=a):(s=a.retryQueue,s===null?a.retryQueue=new Set([f]):s.add(f)),zo(e,f,p)),!1}throw Error(u(435,s.tag))}return zo(e,f,p),Ul(),!1}if(st)return a=Fn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,f!==Ns&&(e=Error(u(422),{cause:f}),mr(ea(e,s)))):(f!==Ns&&(a=Error(u(423),{cause:f}),mr(ea(a,s))),e=e.current.alternate,e.flags|=65536,p&=-p,e.lanes|=p,f=ea(f,s),p=fo(e.stateNode,f,p),qs(e,p),tn!==4&&(tn=2)),!1;var g=Error(u(520),{cause:f});if(g=ea(g,s),kr===null?kr=[g]:kr.push(g),tn!==4&&(tn=2),a===null)return!0;f=ea(f,s),s=a;do{switch(s.tag){case 3:return s.flags|=65536,e=p&-p,s.lanes|=e,e=fo(s.stateNode,f,e),qs(s,e),!1;case 1:if(a=s.type,g=s.stateNode,(s.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Za===null||!Za.has(g))))return s.flags|=65536,p&=-p,s.lanes|=p,p=Wc(p),Jc(p,e,s,f),qs(s,p),!1}s=s.return}while(s!==null);return!1}var ho=Error(u(461)),fn=!1;function xn(e,a,s,f){a.child=e===null?tc(a,null,s,f):_i(a,e.child,s,f)}function Zc(e,a,s,f,p){s=s.render;var g=a.ref;if("ref"in f){var x={};for(var A in f)A!=="ref"&&(x[A]=f[A])}else x=f;return yi(a),f=Ys(e,a,s,x,g,p),A=Ks(),e!==null&&!fn?(Qs(e,a,p),Oa(e,a,p)):(st&&A&&Os(a),a.flags|=1,xn(e,a,f,p),a.child)}function $c(e,a,s,f,p){if(e===null){var g=s.type;return typeof g=="function"&&!Rs(g)&&g.defaultProps===void 0&&s.compare===null?(a.tag=15,a.type=g,ef(e,a,g,f,p)):(e=sl(s.type,null,f,a,a.mode,p),e.ref=a.ref,e.return=a,a.child=e)}if(g=e.child,!_o(e,p)){var x=g.memoizedProps;if(s=s.compare,s=s!==null?s:dr,s(x,f)&&e.ref===a.ref)return Oa(e,a,p)}return a.flags|=1,e=xa(g,f),e.ref=a.ref,e.return=a,a.child=e}function ef(e,a,s,f,p){if(e!==null){var g=e.memoizedProps;if(dr(g,f)&&e.ref===a.ref)if(fn=!1,a.pendingProps=f=g,_o(e,p))(e.flags&131072)!==0&&(fn=!0);else return a.lanes=e.lanes,Oa(e,a,p)}return po(e,a,s,f,p)}function tf(e,a,s,f){var p=f.children,g=e!==null?e.memoizedState:null;if(e===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),f.mode==="hidden"){if((a.flags&128)!==0){if(g=g!==null?g.baseLanes|s:s,e!==null){for(f=a.child=e.child,p=0;f!==null;)p=p|f.lanes|f.childLanes,f=f.sibling;f=p&~g}else f=0,a.child=null;return nf(e,a,g,s,f)}if((s&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},e!==null&&fl(a,g!==null?g.cachePool:null),g!==null?ic(a,g):Vs(),rc(a);else return f=a.lanes=536870912,nf(e,a,g!==null?g.baseLanes|s:s,s,f)}else g!==null?(fl(a,g.cachePool),ic(a,g),Ka(),a.memoizedState=null):(e!==null&&fl(a,null),Vs(),Ka());return xn(e,a,p,s),a.child}function Cr(e,a){return e!==null&&e.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function nf(e,a,s,f,p){var g=zs();return g=g===null?null:{parent:un._currentValue,pool:g},a.memoizedState={baseLanes:s,cachePool:g},e!==null&&fl(a,null),Vs(),rc(a),e!==null&&Li(e,a,f,!0),a.childLanes=p,null}function Cl(e,a){return a=wl({mode:a.mode,children:a.children},e.mode),a.ref=e.ref,e.child=a,a.return=e,a}function af(e,a,s){return _i(a,e.child,null,s),e=Cl(a,a.pendingProps),e.flags|=2,Xn(a),a.memoizedState=null,e}function Ph(e,a,s){var f=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,e===null){if(st){if(f.mode==="hidden")return e=Cl(a,f),a.lanes=536870912,Cr(null,e);if(Fs(a),(e=It)?(e=gd(e,aa),e=e!==null&&e.data==="&"?e:null,e!==null&&(a.memoizedState={dehydrated:e,treeContext:Ha!==null?{id:da,overflow:ha}:null,retryLane:536870912,hydrationErrors:null},s=Hu(e),s.return=a,a.child=s,En=a,It=null)):e=null,e===null)throw Pa(a);return a.lanes=536870912,null}return Cl(a,f)}var g=e.memoizedState;if(g!==null){var x=g.dehydrated;if(Fs(a),p)if(a.flags&256)a.flags&=-257,a=af(e,a,s);else if(a.memoizedState!==null)a.child=e.child,a.flags|=128,a=null;else throw Error(u(558));else if(fn||Li(e,a,s,!1),p=(s&e.childLanes)!==0,fn||p){if(f=wt,f!==null&&(x=vn(f,s),x!==0&&x!==g.retryLane))throw g.retryLane=x,hi(e,x),In(f,e,x),ho;Ul(),a=af(e,a,s)}else e=g.treeContext,It=ra(x.nextSibling),En=a,st=!0,qa=null,aa=!1,e!==null&&Vu(a,e),a=Cl(a,f),a.flags|=4096;return a}return e=xa(e.child,{mode:f.mode,children:f.children}),e.ref=a.ref,a.child=e,e.return=a,e}function Ol(e,a){var s=a.ref;if(s===null)e!==null&&e.ref!==null&&(a.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(u(284));(e===null||e.ref!==s)&&(a.flags|=4194816)}}function po(e,a,s,f,p){return yi(a),s=Ys(e,a,s,f,void 0,p),f=Ks(),e!==null&&!fn?(Qs(e,a,p),Oa(e,a,p)):(st&&f&&Os(a),a.flags|=1,xn(e,a,s,p),a.child)}function rf(e,a,s,f,p,g){return yi(a),a.updateQueue=null,s=sc(a,f,s,p),lc(e),f=Ks(),e!==null&&!fn?(Qs(e,a,g),Oa(e,a,g)):(st&&f&&Os(a),a.flags|=1,xn(e,a,s,g),a.child)}function lf(e,a,s,f,p){if(yi(a),a.stateNode===null){var g=Mi,x=s.contextType;typeof x=="object"&&x!==null&&(g=_n(x)),g=new s(f,g),a.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=co,a.stateNode=g,g._reactInternals=a,g=a.stateNode,g.props=f,g.state=a.memoizedState,g.refs={},Is(a),x=s.contextType,g.context=typeof x=="object"&&x!==null?_n(x):Mi,g.state=a.memoizedState,x=s.getDerivedStateFromProps,typeof x=="function"&&(uo(a,s,x,f),g.state=a.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(x=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),x!==g.state&&co.enqueueReplaceState(g,g.state,null),xr(a,f,g,p),_r(),g.state=a.memoizedState),typeof g.componentDidMount=="function"&&(a.flags|=4194308),f=!0}else if(e===null){g=a.stateNode;var A=a.memoizedProps,P=Si(s,A);g.props=P;var Z=g.context,se=s.contextType;x=Mi,typeof se=="object"&&se!==null&&(x=_n(se));var he=s.getDerivedStateFromProps;se=typeof he=="function"||typeof g.getSnapshotBeforeUpdate=="function",A=a.pendingProps!==A,se||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(A||Z!==x)&&Fc(a,g,f,x),Ga=!1;var ee=a.memoizedState;g.state=ee,xr(a,f,g,p),_r(),Z=a.memoizedState,A||ee!==Z||Ga?(typeof he=="function"&&(uo(a,s,he,f),Z=a.memoizedState),(P=Ga||Gc(a,s,P,f,ee,Z,x))?(se||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(a.flags|=4194308)):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=f,a.memoizedState=Z),g.props=f,g.state=Z,g.context=x,f=P):(typeof g.componentDidMount=="function"&&(a.flags|=4194308),f=!1)}else{g=a.stateNode,Hs(e,a),x=a.memoizedProps,se=Si(s,x),g.props=se,he=a.pendingProps,ee=g.context,Z=s.contextType,P=Mi,typeof Z=="object"&&Z!==null&&(P=_n(Z)),A=s.getDerivedStateFromProps,(Z=typeof A=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(x!==he||ee!==P)&&Fc(a,g,f,P),Ga=!1,ee=a.memoizedState,g.state=ee,xr(a,f,g,p),_r();var ae=a.memoizedState;x!==he||ee!==ae||Ga||e!==null&&e.dependencies!==null&&ul(e.dependencies)?(typeof A=="function"&&(uo(a,s,A,f),ae=a.memoizedState),(se=Ga||Gc(a,s,se,f,ee,ae,P)||e!==null&&e.dependencies!==null&&ul(e.dependencies))?(Z||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(f,ae,P),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(f,ae,P)),typeof g.componentDidUpdate=="function"&&(a.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof g.componentDidUpdate!="function"||x===e.memoizedProps&&ee===e.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ee===e.memoizedState||(a.flags|=1024),a.memoizedProps=f,a.memoizedState=ae),g.props=f,g.state=ae,g.context=P,f=se):(typeof g.componentDidUpdate!="function"||x===e.memoizedProps&&ee===e.memoizedState||(a.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&ee===e.memoizedState||(a.flags|=1024),f=!1)}return g=f,Ol(e,a),f=(a.flags&128)!==0,g||f?(g=a.stateNode,s=f&&typeof s.getDerivedStateFromError!="function"?null:g.render(),a.flags|=1,e!==null&&f?(a.child=_i(a,e.child,null,p),a.child=_i(a,null,s,p)):xn(e,a,s,p),a.memoizedState=g.state,e=a.child):e=Oa(e,a,p),e}function sf(e,a,s,f){return mi(),a.flags|=256,xn(e,a,s,f),a.child}var mo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function go(e){return{baseLanes:e,cachePool:Qu()}}function yo(e,a,s){return e=e!==null?e.childLanes&~s:0,a&&(e|=Kn),e}function of(e,a,s){var f=a.pendingProps,p=!1,g=(a.flags&128)!==0,x;if((x=g)||(x=e!==null&&e.memoizedState===null?!1:(rn.current&2)!==0),x&&(p=!0,a.flags&=-129),x=(a.flags&32)!==0,a.flags&=-33,e===null){if(st){if(p?Ya(a):Ka(),(e=It)?(e=gd(e,aa),e=e!==null&&e.data!=="&"?e:null,e!==null&&(a.memoizedState={dehydrated:e,treeContext:Ha!==null?{id:da,overflow:ha}:null,retryLane:536870912,hydrationErrors:null},s=Hu(e),s.return=a,a.child=s,En=a,It=null)):e=null,e===null)throw Pa(a);return $o(e)?a.lanes=32:a.lanes=536870912,null}var A=f.children;return f=f.fallback,p?(Ka(),p=a.mode,A=wl({mode:"hidden",children:A},p),f=pi(f,p,s,null),A.return=a,f.return=a,A.sibling=f,a.child=A,f=a.child,f.memoizedState=go(s),f.childLanes=yo(e,x,s),a.memoizedState=mo,Cr(null,f)):(Ya(a),vo(a,A))}var P=e.memoizedState;if(P!==null&&(A=P.dehydrated,A!==null)){if(g)a.flags&256?(Ya(a),a.flags&=-257,a=bo(e,a,s)):a.memoizedState!==null?(Ka(),a.child=e.child,a.flags|=128,a=null):(Ka(),A=f.fallback,p=a.mode,f=wl({mode:"visible",children:f.children},p),A=pi(A,p,s,null),A.flags|=2,f.return=a,A.return=a,f.sibling=A,a.child=f,_i(a,e.child,null,s),f=a.child,f.memoizedState=go(s),f.childLanes=yo(e,x,s),a.memoizedState=mo,a=Cr(null,f));else if(Ya(a),$o(A)){if(x=A.nextSibling&&A.nextSibling.dataset,x)var Z=x.dgst;x=Z,f=Error(u(419)),f.stack="",f.digest=x,mr({value:f,source:null,stack:null}),a=bo(e,a,s)}else if(fn||Li(e,a,s,!1),x=(s&e.childLanes)!==0,fn||x){if(x=wt,x!==null&&(f=vn(x,s),f!==0&&f!==P.retryLane))throw P.retryLane=f,hi(e,f),In(x,e,f),ho;Zo(A)||Ul(),a=bo(e,a,s)}else Zo(A)?(a.flags|=192,a.child=e.child,a=null):(e=P.treeContext,It=ra(A.nextSibling),En=a,st=!0,qa=null,aa=!1,e!==null&&Vu(a,e),a=vo(a,f.children),a.flags|=4096);return a}return p?(Ka(),A=f.fallback,p=a.mode,P=e.child,Z=P.sibling,f=xa(P,{mode:"hidden",children:f.children}),f.subtreeFlags=P.subtreeFlags&65011712,Z!==null?A=xa(Z,A):(A=pi(A,p,s,null),A.flags|=2),A.return=a,f.return=a,f.sibling=A,a.child=f,Cr(null,f),f=a.child,A=e.child.memoizedState,A===null?A=go(s):(p=A.cachePool,p!==null?(P=un._currentValue,p=p.parent!==P?{parent:P,pool:P}:p):p=Qu(),A={baseLanes:A.baseLanes|s,cachePool:p}),f.memoizedState=A,f.childLanes=yo(e,x,s),a.memoizedState=mo,Cr(e.child,f)):(Ya(a),s=e.child,e=s.sibling,s=xa(s,{mode:"visible",children:f.children}),s.return=a,s.sibling=null,e!==null&&(x=a.deletions,x===null?(a.deletions=[e],a.flags|=16):x.push(e)),a.child=s,a.memoizedState=null,s)}function vo(e,a){return a=wl({mode:"visible",children:a},e.mode),a.return=e,e.child=a}function wl(e,a){return e=Gn(22,e,null,a),e.lanes=0,e}function bo(e,a,s){return _i(a,e.child,null,s),e=vo(a,a.pendingProps.children),e.flags|=2,a.memoizedState=null,e}function uf(e,a,s){e.lanes|=a;var f=e.alternate;f!==null&&(f.lanes|=a),Ds(e.return,a,s)}function Eo(e,a,s,f,p,g){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:f,tail:s,tailMode:p,treeForkCount:g}:(x.isBackwards=a,x.rendering=null,x.renderingStartTime=0,x.last=f,x.tail=s,x.tailMode=p,x.treeForkCount=g)}function cf(e,a,s){var f=a.pendingProps,p=f.revealOrder,g=f.tail;f=f.children;var x=rn.current,A=(x&2)!==0;if(A?(x=x&1|2,a.flags|=128):x&=1,oe(rn,x),xn(e,a,f,s),f=st?pr:0,!A&&e!==null&&(e.flags&128)!==0)e:for(e=a.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&uf(e,s,a);else if(e.tag===19)uf(e,s,a);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===a)break e;for(;e.sibling===null;){if(e.return===null||e.return===a)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(p){case"forwards":for(s=a.child,p=null;s!==null;)e=s.alternate,e!==null&&yl(e)===null&&(p=s),s=s.sibling;s=p,s===null?(p=a.child,a.child=null):(p=s.sibling,s.sibling=null),Eo(a,!1,p,s,g,f);break;case"backwards":case"unstable_legacy-backwards":for(s=null,p=a.child,a.child=null;p!==null;){if(e=p.alternate,e!==null&&yl(e)===null){a.child=p;break}e=p.sibling,p.sibling=s,s=p,p=e}Eo(a,!0,s,null,g,f);break;case"together":Eo(a,!1,null,null,void 0,f);break;default:a.memoizedState=null}return a.child}function Oa(e,a,s){if(e!==null&&(a.dependencies=e.dependencies),Ja|=a.lanes,(s&a.childLanes)===0)if(e!==null){if(Li(e,a,s,!1),(s&a.childLanes)===0)return null}else return null;if(e!==null&&a.child!==e.child)throw Error(u(153));if(a.child!==null){for(e=a.child,s=xa(e,e.pendingProps),a.child=s,s.return=a;e.sibling!==null;)e=e.sibling,s=s.sibling=xa(e,e.pendingProps),s.return=a;s.sibling=null}return a.child}function _o(e,a){return(e.lanes&a)!==0?!0:(e=e.dependencies,!!(e!==null&&ul(e)))}function Vh(e,a,s){switch(a.tag){case 3:Ie(a,a.stateNode.containerInfo),Va(a,un,e.memoizedState.cache),mi();break;case 27:case 5:Ve(a);break;case 4:Ie(a,a.stateNode.containerInfo);break;case 10:Va(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,Fs(a),null;break;case 13:var f=a.memoizedState;if(f!==null)return f.dehydrated!==null?(Ya(a),a.flags|=128,null):(s&a.child.childLanes)!==0?of(e,a,s):(Ya(a),e=Oa(e,a,s),e!==null?e.sibling:null);Ya(a);break;case 19:var p=(e.flags&128)!==0;if(f=(s&a.childLanes)!==0,f||(Li(e,a,s,!1),f=(s&a.childLanes)!==0),p){if(f)return cf(e,a,s);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),oe(rn,rn.current),f)break;return null;case 22:return a.lanes=0,tf(e,a,s,a.pendingProps);case 24:Va(a,un,e.memoizedState.cache)}return Oa(e,a,s)}function ff(e,a,s){if(e!==null)if(e.memoizedProps!==a.pendingProps)fn=!0;else{if(!_o(e,s)&&(a.flags&128)===0)return fn=!1,Vh(e,a,s);fn=(e.flags&131072)!==0}else fn=!1,st&&(a.flags&1048576)!==0&&Pu(a,pr,a.index);switch(a.lanes=0,a.tag){case 16:e:{var f=a.pendingProps;if(e=bi(a.elementType),a.type=e,typeof e=="function")Rs(e)?(f=Si(e,f),a.tag=1,a=lf(null,a,e,f,s)):(a.tag=0,a=po(null,a,e,f,s));else{if(e!=null){var p=e.$$typeof;if(p===H){a.tag=11,a=Zc(null,a,e,f,s);break e}else if(p===$){a.tag=14,a=$c(null,a,e,f,s);break e}}throw a=ve(e)||e,Error(u(306,a,""))}}return a;case 0:return po(e,a,a.type,a.pendingProps,s);case 1:return f=a.type,p=Si(f,a.pendingProps),lf(e,a,f,p,s);case 3:e:{if(Ie(a,a.stateNode.containerInfo),e===null)throw Error(u(387));f=a.pendingProps;var g=a.memoizedState;p=g.element,Hs(e,a),xr(a,f,null,s);var x=a.memoizedState;if(f=x.cache,Va(a,un,f),f!==g.cache&&ks(a,[un],s,!0),_r(),f=x.element,g.isDehydrated)if(g={element:f,isDehydrated:!1,cache:x.cache},a.updateQueue.baseState=g,a.memoizedState=g,a.flags&256){a=sf(e,a,f,s);break e}else if(f!==p){p=ea(Error(u(424)),a),mr(p),a=sf(e,a,f,s);break e}else for(e=a.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,It=ra(e.firstChild),En=a,st=!0,qa=null,aa=!0,s=tc(a,null,f,s),a.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(mi(),f===p){a=Oa(e,a,s);break e}xn(e,a,f,s)}a=a.child}return a;case 26:return Ol(e,a),e===null?(s=xd(a.type,null,a.pendingProps,null))?a.memoizedState=s:st||(s=a.type,e=a.pendingProps,f=Fl(Oe.current).createElement(s),f[Qe]=a,f[qe]=e,Sn(f,s,e),Re(f),a.stateNode=f):a.memoizedState=xd(a.type,e.memoizedProps,a.pendingProps,e.memoizedState),null;case 27:return Ve(a),e===null&&st&&(f=a.stateNode=bd(a.type,a.pendingProps,Oe.current),En=a,aa=!0,p=It,ni(a.type)?(eu=p,It=ra(f.firstChild)):It=p),xn(e,a,a.pendingProps.children,s),Ol(e,a),e===null&&(a.flags|=4194304),a.child;case 5:return e===null&&st&&((p=f=It)&&(f=bp(f,a.type,a.pendingProps,aa),f!==null?(a.stateNode=f,En=a,It=ra(f.firstChild),aa=!1,p=!0):p=!1),p||Pa(a)),Ve(a),p=a.type,g=a.pendingProps,x=e!==null?e.memoizedProps:null,f=g.children,Qo(p,g)?f=null:x!==null&&Qo(p,x)&&(a.flags|=32),a.memoizedState!==null&&(p=Ys(e,a,kh,null,null,s),Pr._currentValue=p),Ol(e,a),xn(e,a,f,s),a.child;case 6:return e===null&&st&&((e=s=It)&&(s=Ep(s,a.pendingProps,aa),s!==null?(a.stateNode=s,En=a,It=null,e=!0):e=!1),e||Pa(a)),null;case 13:return of(e,a,s);case 4:return Ie(a,a.stateNode.containerInfo),f=a.pendingProps,e===null?a.child=_i(a,null,f,s):xn(e,a,f,s),a.child;case 11:return Zc(e,a,a.type,a.pendingProps,s);case 7:return xn(e,a,a.pendingProps,s),a.child;case 8:return xn(e,a,a.pendingProps.children,s),a.child;case 12:return xn(e,a,a.pendingProps.children,s),a.child;case 10:return f=a.pendingProps,Va(a,a.type,f.value),xn(e,a,f.children,s),a.child;case 9:return p=a.type._context,f=a.pendingProps.children,yi(a),p=_n(p),f=f(p),a.flags|=1,xn(e,a,f,s),a.child;case 14:return $c(e,a,a.type,a.pendingProps,s);case 15:return ef(e,a,a.type,a.pendingProps,s);case 19:return cf(e,a,s);case 31:return Ph(e,a,s);case 22:return tf(e,a,s,a.pendingProps);case 24:return yi(a),f=_n(un),e===null?(p=zs(),p===null&&(p=wt,g=Ls(),p.pooledCache=g,g.refCount++,g!==null&&(p.pooledCacheLanes|=s),p=g),a.memoizedState={parent:f,cache:p},Is(a),Va(a,un,p)):((e.lanes&s)!==0&&(Hs(e,a),xr(a,null,null,s),_r()),p=e.memoizedState,g=a.memoizedState,p.parent!==f?(p={parent:f,cache:f},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Va(a,un,f)):(f=g.cache,Va(a,un,f),f!==p.cache&&ks(a,[un],s,!0))),xn(e,a,a.pendingProps.children,s),a.child;case 29:throw a.pendingProps}throw Error(u(156,a.tag))}function wa(e){e.flags|=4}function xo(e,a,s,f,p){if((a=(e.mode&32)!==0)&&(a=!1),a){if(e.flags|=16777216,(p&335544128)===p)if(e.stateNode.complete)e.flags|=8192;else if(Uf())e.flags|=8192;else throw Ei=hl,Us}else e.flags&=-16777217}function df(e,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Cd(a))if(Uf())e.flags|=8192;else throw Ei=hl,Us}function Nl(e,a){a!==null&&(e.flags|=4),e.flags&16384&&(a=e.tag!==22?sn():536870912,e.lanes|=a,Yi|=a)}function Or(e,a){if(!st)switch(e.tailMode){case"hidden":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var f=null;s!==null;)s.alternate!==null&&(f=s),s=s.sibling;f===null?a||e.tail===null?e.tail=null:e.tail.sibling=null:f.sibling=null}}function Ht(e){var a=e.alternate!==null&&e.alternate.child===e.child,s=0,f=0;if(a)for(var p=e.child;p!==null;)s|=p.lanes|p.childLanes,f|=p.subtreeFlags&65011712,f|=p.flags&65011712,p.return=e,p=p.sibling;else for(p=e.child;p!==null;)s|=p.lanes|p.childLanes,f|=p.subtreeFlags,f|=p.flags,p.return=e,p=p.sibling;return e.subtreeFlags|=f,e.childLanes=s,a}function Gh(e,a,s){var f=a.pendingProps;switch(ws(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ht(a),null;case 1:return Ht(a),null;case 3:return s=a.stateNode,f=null,e!==null&&(f=e.memoizedState.cache),a.memoizedState.cache!==f&&(a.flags|=2048),Ra(un),je(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(ki(a)?wa(a):e===null||e.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Ms())),Ht(a),null;case 26:var p=a.type,g=a.memoizedState;return e===null?(wa(a),g!==null?(Ht(a),df(a,g)):(Ht(a),xo(a,p,null,f,s))):g?g!==e.memoizedState?(wa(a),Ht(a),df(a,g)):(Ht(a),a.flags&=-16777217):(e=e.memoizedProps,e!==f&&wa(a),Ht(a),xo(a,p,e,f,s)),null;case 27:if(qt(a),s=Oe.current,p=a.type,e!==null&&a.stateNode!=null)e.memoizedProps!==f&&wa(a);else{if(!f){if(a.stateNode===null)throw Error(u(166));return Ht(a),null}e=Ee.current,ki(a)?Gu(a):(e=bd(p,f,s),a.stateNode=e,wa(a))}return Ht(a),null;case 5:if(qt(a),p=a.type,e!==null&&a.stateNode!=null)e.memoizedProps!==f&&wa(a);else{if(!f){if(a.stateNode===null)throw Error(u(166));return Ht(a),null}if(g=Ee.current,ki(a))Gu(a);else{var x=Fl(Oe.current);switch(g){case 1:g=x.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:g=x.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":g=x.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":g=x.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":g=x.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof f.is=="string"?x.createElement("select",{is:f.is}):x.createElement("select"),f.multiple?g.multiple=!0:f.size&&(g.size=f.size);break;default:g=typeof f.is=="string"?x.createElement(p,{is:f.is}):x.createElement(p)}}g[Qe]=a,g[qe]=f;e:for(x=a.child;x!==null;){if(x.tag===5||x.tag===6)g.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===a)break e;for(;x.sibling===null;){if(x.return===null||x.return===a)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}a.stateNode=g;e:switch(Sn(g,p,f),p){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}f&&wa(a)}}return Ht(a),xo(a,a.type,e===null?null:e.memoizedProps,a.pendingProps,s),null;case 6:if(e&&a.stateNode!=null)e.memoizedProps!==f&&wa(a);else{if(typeof f!="string"&&a.stateNode===null)throw Error(u(166));if(e=Oe.current,ki(a)){if(e=a.stateNode,s=a.memoizedProps,f=null,p=En,p!==null)switch(p.tag){case 27:case 5:f=p.memoizedProps}e[Qe]=a,e=!!(e.nodeValue===s||f!==null&&f.suppressHydrationWarning===!0||od(e.nodeValue,s)),e||Pa(a,!0)}else e=Fl(e).createTextNode(f),e[Qe]=a,a.stateNode=e}return Ht(a),null;case 31:if(s=a.memoizedState,e===null||e.memoizedState!==null){if(f=ki(a),s!==null){if(e===null){if(!f)throw Error(u(318));if(e=a.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Qe]=a}else mi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ht(a),e=!1}else s=Ms(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return a.flags&256?(Xn(a),a):(Xn(a),null);if((a.flags&128)!==0)throw Error(u(558))}return Ht(a),null;case 13:if(f=a.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(p=ki(a),f!==null&&f.dehydrated!==null){if(e===null){if(!p)throw Error(u(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(u(317));p[Qe]=a}else mi(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ht(a),p=!1}else p=Ms(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(Xn(a),a):(Xn(a),null)}return Xn(a),(a.flags&128)!==0?(a.lanes=s,a):(s=f!==null,e=e!==null&&e.memoizedState!==null,s&&(f=a.child,p=null,f.alternate!==null&&f.alternate.memoizedState!==null&&f.alternate.memoizedState.cachePool!==null&&(p=f.alternate.memoizedState.cachePool.pool),g=null,f.memoizedState!==null&&f.memoizedState.cachePool!==null&&(g=f.memoizedState.cachePool.pool),g!==p&&(f.flags|=2048)),s!==e&&s&&(a.child.flags|=8192),Nl(a,a.updateQueue),Ht(a),null);case 4:return je(),e===null&&Go(a.stateNode.containerInfo),Ht(a),null;case 10:return Ra(a.type),Ht(a),null;case 19:if(ie(rn),f=a.memoizedState,f===null)return Ht(a),null;if(p=(a.flags&128)!==0,g=f.rendering,g===null)if(p)Or(f,!1);else{if(tn!==0||e!==null&&(e.flags&128)!==0)for(e=a.child;e!==null;){if(g=yl(e),g!==null){for(a.flags|=128,Or(f,!1),e=g.updateQueue,a.updateQueue=e,Nl(a,e),a.subtreeFlags=0,e=s,s=a.child;s!==null;)Iu(s,e),s=s.sibling;return oe(rn,rn.current&1|2),st&&Sa(a,f.treeForkCount),a.child}e=e.sibling}f.tail!==null&&we()>Ll&&(a.flags|=128,p=!0,Or(f,!1),a.lanes=4194304)}else{if(!p)if(e=yl(g),e!==null){if(a.flags|=128,p=!0,e=e.updateQueue,a.updateQueue=e,Nl(a,e),Or(f,!0),f.tail===null&&f.tailMode==="hidden"&&!g.alternate&&!st)return Ht(a),null}else 2*we()-f.renderingStartTime>Ll&&s!==536870912&&(a.flags|=128,p=!0,Or(f,!1),a.lanes=4194304);f.isBackwards?(g.sibling=a.child,a.child=g):(e=f.last,e!==null?e.sibling=g:a.child=g,f.last=g)}return f.tail!==null?(e=f.tail,f.rendering=e,f.tail=e.sibling,f.renderingStartTime=we(),e.sibling=null,s=rn.current,oe(rn,p?s&1|2:s&1),st&&Sa(a,f.treeForkCount),e):(Ht(a),null);case 22:case 23:return Xn(a),Gs(),f=a.memoizedState!==null,e!==null?e.memoizedState!==null!==f&&(a.flags|=8192):f&&(a.flags|=8192),f?(s&536870912)!==0&&(a.flags&128)===0&&(Ht(a),a.subtreeFlags&6&&(a.flags|=8192)):Ht(a),s=a.updateQueue,s!==null&&Nl(a,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),f=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),f!==s&&(a.flags|=2048),e!==null&&ie(vi),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),a.memoizedState.cache!==s&&(a.flags|=2048),Ra(un),Ht(a),null;case 25:return null;case 30:return null}throw Error(u(156,a.tag))}function Fh(e,a){switch(ws(a),a.tag){case 1:return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 3:return Ra(un),je(),e=a.flags,(e&65536)!==0&&(e&128)===0?(a.flags=e&-65537|128,a):null;case 26:case 27:case 5:return qt(a),null;case 31:if(a.memoizedState!==null){if(Xn(a),a.alternate===null)throw Error(u(340));mi()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 13:if(Xn(a),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error(u(340));mi()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 19:return ie(rn),null;case 4:return je(),null;case 10:return Ra(a.type),null;case 22:case 23:return Xn(a),Gs(),e!==null&&ie(vi),e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 24:return Ra(un),null;case 25:return null;default:return null}}function hf(e,a){switch(ws(a),a.tag){case 3:Ra(un),je();break;case 26:case 27:case 5:qt(a);break;case 4:je();break;case 31:a.memoizedState!==null&&Xn(a);break;case 13:Xn(a);break;case 19:ie(rn);break;case 10:Ra(a.type);break;case 22:case 23:Xn(a),Gs(),e!==null&&ie(vi);break;case 24:Ra(un)}}function wr(e,a){try{var s=a.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var p=f.next;s=p;do{if((s.tag&e)===e){f=void 0;var g=s.create,x=s.inst;f=g(),x.destroy=f}s=s.next}while(s!==p)}}catch(A){Et(a,a.return,A)}}function Qa(e,a,s){try{var f=a.updateQueue,p=f!==null?f.lastEffect:null;if(p!==null){var g=p.next;f=g;do{if((f.tag&e)===e){var x=f.inst,A=x.destroy;if(A!==void 0){x.destroy=void 0,p=a;var P=s,Z=A;try{Z()}catch(se){Et(p,P,se)}}}f=f.next}while(f!==g)}}catch(se){Et(a,a.return,se)}}function pf(e){var a=e.updateQueue;if(a!==null){var s=e.stateNode;try{ac(a,s)}catch(f){Et(e,e.return,f)}}}function mf(e,a,s){s.props=Si(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(f){Et(e,a,f)}}function Nr(e,a){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var f=e.stateNode;break;case 30:f=e.stateNode;break;default:f=e.stateNode}typeof s=="function"?e.refCleanup=s(f):s.current=f}}catch(p){Et(e,a,p)}}function pa(e,a){var s=e.ref,f=e.refCleanup;if(s!==null)if(typeof f=="function")try{f()}catch(p){Et(e,a,p)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){Et(e,a,p)}else s.current=null}function gf(e){var a=e.type,s=e.memoizedProps,f=e.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":s.autoFocus&&f.focus();break e;case"img":s.src?f.src=s.src:s.srcSet&&(f.srcset=s.srcSet)}}catch(p){Et(e,e.return,p)}}function So(e,a,s){try{var f=e.stateNode;hp(f,e.type,s,a),f[qe]=a}catch(p){Et(e,e.return,p)}}function yf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ni(e.type)||e.tag===4}function To(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ni(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ro(e,a,s){var f=e.tag;if(f===5||f===6)e=e.stateNode,a?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,a):(a=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,a.appendChild(e),s=s._reactRootContainer,s!=null||a.onclick!==null||(a.onclick=sa));else if(f!==4&&(f===27&&ni(e.type)&&(s=e.stateNode,a=null),e=e.child,e!==null))for(Ro(e,a,s),e=e.sibling;e!==null;)Ro(e,a,s),e=e.sibling}function Ml(e,a,s){var f=e.tag;if(f===5||f===6)e=e.stateNode,a?s.insertBefore(e,a):s.appendChild(e);else if(f!==4&&(f===27&&ni(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(Ml(e,a,s),e=e.sibling;e!==null;)Ml(e,a,s),e=e.sibling}function vf(e){var a=e.stateNode,s=e.memoizedProps;try{for(var f=e.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Sn(a,f,s),a[Qe]=e,a[qe]=s}catch(g){Et(e,e.return,g)}}var Na=!1,dn=!1,Ao=!1,bf=typeof WeakSet=="function"?WeakSet:Set,gn=null;function Xh(e,a){if(e=e.containerInfo,Yo=Zl,e=Nu(e),vs(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var f=s.getSelection&&s.getSelection();if(f&&f.rangeCount!==0){s=f.anchorNode;var p=f.anchorOffset,g=f.focusNode;f=f.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var x=0,A=-1,P=-1,Z=0,se=0,he=e,ee=null;t:for(;;){for(var ae;he!==s||p!==0&&he.nodeType!==3||(A=x+p),he!==g||f!==0&&he.nodeType!==3||(P=x+f),he.nodeType===3&&(x+=he.nodeValue.length),(ae=he.firstChild)!==null;)ee=he,he=ae;for(;;){if(he===e)break t;if(ee===s&&++Z===p&&(A=x),ee===g&&++se===f&&(P=x),(ae=he.nextSibling)!==null)break;he=ee,ee=he.parentNode}he=ae}s=A===-1||P===-1?null:{start:A,end:P}}else s=null}s=s||{start:0,end:0}}else s=null;for(Ko={focusedElem:e,selectionRange:s},Zl=!1,gn=a;gn!==null;)if(a=gn,e=a.child,(a.subtreeFlags&1028)!==0&&e!==null)e.return=a,gn=e;else for(;gn!==null;){switch(a=gn,g=a.alternate,e=a.flags,a.tag){case 0:if((e&4)!==0&&(e=a.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)p=e[s],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&g!==null){e=void 0,s=a,p=g.memoizedProps,g=g.memoizedState,f=s.stateNode;try{var Ae=Si(s.type,p);e=f.getSnapshotBeforeUpdate(Ae,g),f.__reactInternalSnapshotBeforeUpdate=e}catch(De){Et(s,s.return,De)}}break;case 3:if((e&1024)!==0){if(e=a.stateNode.containerInfo,s=e.nodeType,s===9)Jo(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Jo(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=a.sibling,e!==null){e.return=a.return,gn=e;break}gn=a.return}}function Ef(e,a,s){var f=s.flags;switch(s.tag){case 0:case 11:case 15:ja(e,s),f&4&&wr(5,s);break;case 1:if(ja(e,s),f&4)if(e=s.stateNode,a===null)try{e.componentDidMount()}catch(x){Et(s,s.return,x)}else{var p=Si(s.type,a.memoizedProps);a=a.memoizedState;try{e.componentDidUpdate(p,a,e.__reactInternalSnapshotBeforeUpdate)}catch(x){Et(s,s.return,x)}}f&64&&pf(s),f&512&&Nr(s,s.return);break;case 3:if(ja(e,s),f&64&&(e=s.updateQueue,e!==null)){if(a=null,s.child!==null)switch(s.child.tag){case 27:case 5:a=s.child.stateNode;break;case 1:a=s.child.stateNode}try{ac(e,a)}catch(x){Et(s,s.return,x)}}break;case 27:a===null&&f&4&&vf(s);case 26:case 5:ja(e,s),a===null&&f&4&&gf(s),f&512&&Nr(s,s.return);break;case 12:ja(e,s);break;case 31:ja(e,s),f&4&&Sf(e,s);break;case 13:ja(e,s),f&4&&Tf(e,s),f&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=tp.bind(null,s),_p(e,s))));break;case 22:if(f=s.memoizedState!==null||Na,!f){a=a!==null&&a.memoizedState!==null||dn,p=Na;var g=dn;Na=f,(dn=a)&&!g?Da(e,s,(s.subtreeFlags&8772)!==0):ja(e,s),Na=p,dn=g}break;case 30:break;default:ja(e,s)}}function _f(e){var a=e.alternate;a!==null&&(e.alternate=null,_f(a)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(a=e.stateNode,a!==null&&V(a)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ft=null,Ln=!1;function Ma(e,a,s){for(s=s.child;s!==null;)xf(e,a,s),s=s.sibling}function xf(e,a,s){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(hn,s)}catch{}switch(s.tag){case 26:dn||pa(s,a),Ma(e,a,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:dn||pa(s,a);var f=Ft,p=Ln;ni(s.type)&&(Ft=s.stateNode,Ln=!1),Ma(e,a,s),Ir(s.stateNode),Ft=f,Ln=p;break;case 5:dn||pa(s,a);case 6:if(f=Ft,p=Ln,Ft=null,Ma(e,a,s),Ft=f,Ln=p,Ft!==null)if(Ln)try{(Ft.nodeType===9?Ft.body:Ft.nodeName==="HTML"?Ft.ownerDocument.body:Ft).removeChild(s.stateNode)}catch(g){Et(s,a,g)}else try{Ft.removeChild(s.stateNode)}catch(g){Et(s,a,g)}break;case 18:Ft!==null&&(Ln?(e=Ft,pd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),tr(e)):pd(Ft,s.stateNode));break;case 4:f=Ft,p=Ln,Ft=s.stateNode.containerInfo,Ln=!0,Ma(e,a,s),Ft=f,Ln=p;break;case 0:case 11:case 14:case 15:Qa(2,s,a),dn||Qa(4,s,a),Ma(e,a,s);break;case 1:dn||(pa(s,a),f=s.stateNode,typeof f.componentWillUnmount=="function"&&mf(s,a,f)),Ma(e,a,s);break;case 21:Ma(e,a,s);break;case 22:dn=(f=dn)||s.memoizedState!==null,Ma(e,a,s),dn=f;break;default:Ma(e,a,s)}}function Sf(e,a){if(a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{tr(e)}catch(s){Et(a,a.return,s)}}}function Tf(e,a){if(a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{tr(e)}catch(s){Et(a,a.return,s)}}function Yh(e){switch(e.tag){case 31:case 13:case 19:var a=e.stateNode;return a===null&&(a=e.stateNode=new bf),a;case 22:return e=e.stateNode,a=e._retryCache,a===null&&(a=e._retryCache=new bf),a;default:throw Error(u(435,e.tag))}}function jl(e,a){var s=Yh(e);a.forEach(function(f){if(!s.has(f)){s.add(f);var p=np.bind(null,e,f);f.then(p,p)}})}function Bn(e,a){var s=a.deletions;if(s!==null)for(var f=0;f<s.length;f++){var p=s[f],g=e,x=a,A=x;e:for(;A!==null;){switch(A.tag){case 27:if(ni(A.type)){Ft=A.stateNode,Ln=!1;break e}break;case 5:Ft=A.stateNode,Ln=!1;break e;case 3:case 4:Ft=A.stateNode.containerInfo,Ln=!0;break e}A=A.return}if(Ft===null)throw Error(u(160));xf(g,x,p),Ft=null,Ln=!1,g=p.alternate,g!==null&&(g.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)Rf(a,e),a=a.sibling}var ua=null;function Rf(e,a){var s=e.alternate,f=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Bn(a,e),zn(e),f&4&&(Qa(3,e,e.return),wr(3,e),Qa(5,e,e.return));break;case 1:Bn(a,e),zn(e),f&512&&(dn||s===null||pa(s,s.return)),f&64&&Na&&(e=e.updateQueue,e!==null&&(f=e.callbacks,f!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?f:s.concat(f))));break;case 26:var p=ua;if(Bn(a,e),zn(e),f&512&&(dn||s===null||pa(s,s.return)),f&4){var g=s!==null?s.memoizedState:null;if(f=e.memoizedState,s===null)if(f===null)if(e.stateNode===null){e:{f=e.type,s=e.memoizedProps,p=p.ownerDocument||p;t:switch(f){case"title":g=p.getElementsByTagName("title")[0],(!g||g[ye]||g[Qe]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=p.createElement(f),p.head.insertBefore(g,p.querySelector("head > title"))),Sn(g,f,s),g[Qe]=e,Re(g),f=g;break e;case"link":var x=Rd("link","href",p).get(f+(s.href||""));if(x){for(var A=0;A<x.length;A++)if(g=x[A],g.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&g.getAttribute("rel")===(s.rel==null?null:s.rel)&&g.getAttribute("title")===(s.title==null?null:s.title)&&g.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){x.splice(A,1);break t}}g=p.createElement(f),Sn(g,f,s),p.head.appendChild(g);break;case"meta":if(x=Rd("meta","content",p).get(f+(s.content||""))){for(A=0;A<x.length;A++)if(g=x[A],g.getAttribute("content")===(s.content==null?null:""+s.content)&&g.getAttribute("name")===(s.name==null?null:s.name)&&g.getAttribute("property")===(s.property==null?null:s.property)&&g.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&g.getAttribute("charset")===(s.charSet==null?null:s.charSet)){x.splice(A,1);break t}}g=p.createElement(f),Sn(g,f,s),p.head.appendChild(g);break;default:throw Error(u(468,f))}g[Qe]=e,Re(g),f=g}e.stateNode=f}else Ad(p,e.type,e.stateNode);else e.stateNode=Td(p,f,e.memoizedProps);else g!==f?(g===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):g.count--,f===null?Ad(p,e.type,e.stateNode):Td(p,f,e.memoizedProps)):f===null&&e.stateNode!==null&&So(e,e.memoizedProps,s.memoizedProps)}break;case 27:Bn(a,e),zn(e),f&512&&(dn||s===null||pa(s,s.return)),s!==null&&f&4&&So(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Bn(a,e),zn(e),f&512&&(dn||s===null||pa(s,s.return)),e.flags&32){p=e.stateNode;try{ya(p,"")}catch(Ae){Et(e,e.return,Ae)}}f&4&&e.stateNode!=null&&(p=e.memoizedProps,So(e,p,s!==null?s.memoizedProps:p)),f&1024&&(Ao=!0);break;case 6:if(Bn(a,e),zn(e),f&4){if(e.stateNode===null)throw Error(u(162));f=e.memoizedProps,s=e.stateNode;try{s.nodeValue=f}catch(Ae){Et(e,e.return,Ae)}}break;case 3:if(Kl=null,p=ua,ua=Xl(a.containerInfo),Bn(a,e),ua=p,zn(e),f&4&&s!==null&&s.memoizedState.isDehydrated)try{tr(a.containerInfo)}catch(Ae){Et(e,e.return,Ae)}Ao&&(Ao=!1,Af(e));break;case 4:f=ua,ua=Xl(e.stateNode.containerInfo),Bn(a,e),zn(e),ua=f;break;case 12:Bn(a,e),zn(e);break;case 31:Bn(a,e),zn(e),f&4&&(f=e.updateQueue,f!==null&&(e.updateQueue=null,jl(e,f)));break;case 13:Bn(a,e),zn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(kl=we()),f&4&&(f=e.updateQueue,f!==null&&(e.updateQueue=null,jl(e,f)));break;case 22:p=e.memoizedState!==null;var P=s!==null&&s.memoizedState!==null,Z=Na,se=dn;if(Na=Z||p,dn=se||P,Bn(a,e),dn=se,Na=Z,zn(e),f&8192)e:for(a=e.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(s===null||P||Na||dn||Ti(e)),s=null,a=e;;){if(a.tag===5||a.tag===26){if(s===null){P=s=a;try{if(g=P.stateNode,p)x=g.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{A=P.stateNode;var he=P.memoizedProps.style,ee=he!=null&&he.hasOwnProperty("display")?he.display:null;A.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(Ae){Et(P,P.return,Ae)}}}else if(a.tag===6){if(s===null){P=a;try{P.stateNode.nodeValue=p?"":P.memoizedProps}catch(Ae){Et(P,P.return,Ae)}}}else if(a.tag===18){if(s===null){P=a;try{var ae=P.stateNode;p?md(ae,!0):md(P.stateNode,!1)}catch(Ae){Et(P,P.return,Ae)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===e)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break e;for(;a.sibling===null;){if(a.return===null||a.return===e)break e;s===a&&(s=null),a=a.return}s===a&&(s=null),a.sibling.return=a.return,a=a.sibling}f&4&&(f=e.updateQueue,f!==null&&(s=f.retryQueue,s!==null&&(f.retryQueue=null,jl(e,s))));break;case 19:Bn(a,e),zn(e),f&4&&(f=e.updateQueue,f!==null&&(e.updateQueue=null,jl(e,f)));break;case 30:break;case 21:break;default:Bn(a,e),zn(e)}}function zn(e){var a=e.flags;if(a&2){try{for(var s,f=e.return;f!==null;){if(yf(f)){s=f;break}f=f.return}if(s==null)throw Error(u(160));switch(s.tag){case 27:var p=s.stateNode,g=To(e);Ml(e,g,p);break;case 5:var x=s.stateNode;s.flags&32&&(ya(x,""),s.flags&=-33);var A=To(e);Ml(e,A,x);break;case 3:case 4:var P=s.stateNode.containerInfo,Z=To(e);Ro(e,Z,P);break;default:throw Error(u(161))}}catch(se){Et(e,e.return,se)}e.flags&=-3}a&4096&&(e.flags&=-4097)}function Af(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var a=e;Af(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),e=e.sibling}}function ja(e,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Ef(e,a.alternate,a),a=a.sibling}function Ti(e){for(e=e.child;e!==null;){var a=e;switch(a.tag){case 0:case 11:case 14:case 15:Qa(4,a,a.return),Ti(a);break;case 1:pa(a,a.return);var s=a.stateNode;typeof s.componentWillUnmount=="function"&&mf(a,a.return,s),Ti(a);break;case 27:Ir(a.stateNode);case 26:case 5:pa(a,a.return),Ti(a);break;case 22:a.memoizedState===null&&Ti(a);break;case 30:Ti(a);break;default:Ti(a)}e=e.sibling}}function Da(e,a,s){for(s=s&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var f=a.alternate,p=e,g=a,x=g.flags;switch(g.tag){case 0:case 11:case 15:Da(p,g,s),wr(4,g);break;case 1:if(Da(p,g,s),f=g,p=f.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(Z){Et(f,f.return,Z)}if(f=g,p=f.updateQueue,p!==null){var A=f.stateNode;try{var P=p.shared.hiddenCallbacks;if(P!==null)for(p.shared.hiddenCallbacks=null,p=0;p<P.length;p++)nc(P[p],A)}catch(Z){Et(f,f.return,Z)}}s&&x&64&&pf(g),Nr(g,g.return);break;case 27:vf(g);case 26:case 5:Da(p,g,s),s&&f===null&&x&4&&gf(g),Nr(g,g.return);break;case 12:Da(p,g,s);break;case 31:Da(p,g,s),s&&x&4&&Sf(p,g);break;case 13:Da(p,g,s),s&&x&4&&Tf(p,g);break;case 22:g.memoizedState===null&&Da(p,g,s),Nr(g,g.return);break;case 30:break;default:Da(p,g,s)}a=a.sibling}}function Co(e,a){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(e=a.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&gr(s))}function Oo(e,a){e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(a.refCount++,e!=null&&gr(e))}function ca(e,a,s,f){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Cf(e,a,s,f),a=a.sibling}function Cf(e,a,s,f){var p=a.flags;switch(a.tag){case 0:case 11:case 15:ca(e,a,s,f),p&2048&&wr(9,a);break;case 1:ca(e,a,s,f);break;case 3:ca(e,a,s,f),p&2048&&(e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(a.refCount++,e!=null&&gr(e)));break;case 12:if(p&2048){ca(e,a,s,f),e=a.stateNode;try{var g=a.memoizedProps,x=g.id,A=g.onPostCommit;typeof A=="function"&&A(x,a.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(P){Et(a,a.return,P)}}else ca(e,a,s,f);break;case 31:ca(e,a,s,f);break;case 13:ca(e,a,s,f);break;case 23:break;case 22:g=a.stateNode,x=a.alternate,a.memoizedState!==null?g._visibility&2?ca(e,a,s,f):Mr(e,a):g._visibility&2?ca(e,a,s,f):(g._visibility|=2,Gi(e,a,s,f,(a.subtreeFlags&10256)!==0||!1)),p&2048&&Co(x,a);break;case 24:ca(e,a,s,f),p&2048&&Oo(a.alternate,a);break;default:ca(e,a,s,f)}}function Gi(e,a,s,f,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var g=e,x=a,A=s,P=f,Z=x.flags;switch(x.tag){case 0:case 11:case 15:Gi(g,x,A,P,p),wr(8,x);break;case 23:break;case 22:var se=x.stateNode;x.memoizedState!==null?se._visibility&2?Gi(g,x,A,P,p):Mr(g,x):(se._visibility|=2,Gi(g,x,A,P,p)),p&&Z&2048&&Co(x.alternate,x);break;case 24:Gi(g,x,A,P,p),p&&Z&2048&&Oo(x.alternate,x);break;default:Gi(g,x,A,P,p)}a=a.sibling}}function Mr(e,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var s=e,f=a,p=f.flags;switch(f.tag){case 22:Mr(s,f),p&2048&&Co(f.alternate,f);break;case 24:Mr(s,f),p&2048&&Oo(f.alternate,f);break;default:Mr(s,f)}a=a.sibling}}var jr=8192;function Fi(e,a,s){if(e.subtreeFlags&jr)for(e=e.child;e!==null;)Of(e,a,s),e=e.sibling}function Of(e,a,s){switch(e.tag){case 26:Fi(e,a,s),e.flags&jr&&e.memoizedState!==null&&Dp(s,ua,e.memoizedState,e.memoizedProps);break;case 5:Fi(e,a,s);break;case 3:case 4:var f=ua;ua=Xl(e.stateNode.containerInfo),Fi(e,a,s),ua=f;break;case 22:e.memoizedState===null&&(f=e.alternate,f!==null&&f.memoizedState!==null?(f=jr,jr=16777216,Fi(e,a,s),jr=f):Fi(e,a,s));break;default:Fi(e,a,s)}}function wf(e){var a=e.alternate;if(a!==null&&(e=a.child,e!==null)){a.child=null;do a=e.sibling,e.sibling=null,e=a;while(e!==null)}}function Dr(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var f=a[s];gn=f,Mf(f,e)}wf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Nf(e),e=e.sibling}function Nf(e){switch(e.tag){case 0:case 11:case 15:Dr(e),e.flags&2048&&Qa(9,e,e.return);break;case 3:Dr(e);break;case 12:Dr(e);break;case 22:var a=e.stateNode;e.memoizedState!==null&&a._visibility&2&&(e.return===null||e.return.tag!==13)?(a._visibility&=-3,Dl(e)):Dr(e);break;default:Dr(e)}}function Dl(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var s=0;s<a.length;s++){var f=a[s];gn=f,Mf(f,e)}wf(e)}for(e=e.child;e!==null;){switch(a=e,a.tag){case 0:case 11:case 15:Qa(8,a,a.return),Dl(a);break;case 22:s=a.stateNode,s._visibility&2&&(s._visibility&=-3,Dl(a));break;default:Dl(a)}e=e.sibling}}function Mf(e,a){for(;gn!==null;){var s=gn;switch(s.tag){case 0:case 11:case 15:Qa(8,s,a);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var f=s.memoizedState.cachePool.pool;f!=null&&f.refCount++}break;case 24:gr(s.memoizedState.cache)}if(f=s.child,f!==null)f.return=s,gn=f;else e:for(s=e;gn!==null;){f=gn;var p=f.sibling,g=f.return;if(_f(f),f===s){gn=null;break e}if(p!==null){p.return=g,gn=p;break e}gn=g}}}var Kh={getCacheForType:function(e){var a=_n(un),s=a.data.get(e);return s===void 0&&(s=e(),a.data.set(e,s)),s},cacheSignal:function(){return _n(un).controller.signal}},Qh=typeof WeakMap=="function"?WeakMap:Map,mt=0,wt=null,$e=null,nt=0,bt=0,Yn=null,Wa=!1,Xi=!1,wo=!1,ka=0,tn=0,Ja=0,Ri=0,No=0,Kn=0,Yi=0,kr=null,Un=null,Mo=!1,kl=0,jf=0,Ll=1/0,Bl=null,Za=null,pn=0,$a=null,Ki=null,La=0,jo=0,Do=null,Df=null,Lr=0,ko=null;function Qn(){return(mt&2)!==0&&nt!==0?nt&-nt:F.T!==null?Ho():Qt()}function kf(){if(Kn===0)if((nt&536870912)===0||st){var e=Xe;Xe<<=1,(Xe&3932160)===0&&(Xe=262144),Kn=e}else Kn=536870912;return e=Fn.current,e!==null&&(e.flags|=32),Kn}function In(e,a,s){(e===wt&&(bt===2||bt===9)||e.cancelPendingCommit!==null)&&(Qi(e,0),ei(e,nt,Kn,!1)),jn(e,s),((mt&2)===0||e!==wt)&&(e===wt&&((mt&2)===0&&(Ri|=s),tn===4&&ei(e,nt,Kn,!1)),ma(e))}function Lf(e,a,s){if((mt&6)!==0)throw Error(u(327));var f=!s&&(a&127)===0&&(a&e.expiredLanes)===0||yn(e,a),p=f?Zh(e,a):Bo(e,a,!0),g=f;do{if(p===0){Xi&&!f&&ei(e,a,0,!1);break}else{if(s=e.current.alternate,g&&!Wh(s)){p=Bo(e,a,!1),g=!1;continue}if(p===2){if(g=a,e.errorRecoveryDisabledLanes&g)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){a=x;e:{var A=e;p=kr;var P=A.current.memoizedState.isDehydrated;if(P&&(Qi(A,x).flags|=256),x=Bo(A,x,!1),x!==2){if(wo&&!P){A.errorRecoveryDisabledLanes|=g,Ri|=g,p=4;break e}g=Un,Un=p,g!==null&&(Un===null?Un=g:Un.push.apply(Un,g))}p=x}if(g=!1,p!==2)continue}}if(p===1){Qi(e,0),ei(e,a,0,!0);break}e:{switch(f=e,g=p,g){case 0:case 1:throw Error(u(345));case 4:if((a&4194048)!==a)break;case 6:ei(f,a,Kn,!Wa);break e;case 2:Un=null;break;case 3:case 5:break;default:throw Error(u(329))}if((a&62914560)===a&&(p=kl+300-we(),10<p)){if(ei(f,a,Kn,!Wa),Cn(f,0,!0)!==0)break e;La=a,f.timeoutHandle=dd(Bf.bind(null,f,s,Un,Bl,Mo,a,Kn,Ri,Yi,Wa,g,"Throttled",-0,0),p);break e}Bf(f,s,Un,Bl,Mo,a,Kn,Ri,Yi,Wa,g,null,-0,0)}}break}while(!0);ma(e)}function Bf(e,a,s,f,p,g,x,A,P,Z,se,he,ee,ae){if(e.timeoutHandle=-1,he=a.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:sa},Of(a,g,he);var Ae=(g&62914560)===g?kl-we():(g&4194048)===g?jf-we():0;if(Ae=kp(he,Ae),Ae!==null){La=g,e.cancelPendingCommit=Ae(Gf.bind(null,e,a,g,s,f,p,x,A,P,se,he,null,ee,ae)),ei(e,g,x,!Z);return}}Gf(e,a,g,s,f,p,x,A,P)}function Wh(e){for(var a=e;;){var s=a.tag;if((s===0||s===11||s===15)&&a.flags&16384&&(s=a.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var f=0;f<s.length;f++){var p=s[f],g=p.getSnapshot;p=p.value;try{if(!Vn(g(),p))return!1}catch{return!1}}if(s=a.child,a.subtreeFlags&16384&&s!==null)s.return=a,a=s;else{if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ei(e,a,s,f){a&=~No,a&=~Ri,e.suspendedLanes|=a,e.pingedLanes&=~a,f&&(e.warmLanes|=a),f=e.expirationTimes;for(var p=a;0<p;){var g=31-pt(p),x=1<<g;f[g]=-1,p&=~x}s!==0&&On(e,s,a)}function zl(){return(mt&6)===0?(Br(0),!1):!0}function Lo(){if($e!==null){if(bt===0)var e=$e.return;else e=$e,Ta=gi=null,Ws(e),Ii=null,vr=0,e=$e;for(;e!==null;)hf(e.alternate,e),e=e.return;$e=null}}function Qi(e,a){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,gp(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),La=0,Lo(),wt=e,$e=s=xa(e.current,null),nt=a,bt=0,Yn=null,Wa=!1,Xi=yn(e,a),wo=!1,Yi=Kn=No=Ri=Ja=tn=0,Un=kr=null,Mo=!1,(a&8)!==0&&(a|=a&32);var f=e.entangledLanes;if(f!==0)for(e=e.entanglements,f&=a;0<f;){var p=31-pt(f),g=1<<p;a|=e[p],f&=~g}return ka=a,il(),s}function zf(e,a){Pe=null,F.H=Ar,a===Ui||a===dl?(a=Zu(),bt=3):a===Us?(a=Zu(),bt=4):bt=a===ho?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Yn=a,$e===null&&(tn=1,Al(e,ea(a,e.current)))}function Uf(){var e=Fn.current;return e===null?!0:(nt&4194048)===nt?ia===null:(nt&62914560)===nt||(nt&536870912)!==0?e===ia:!1}function If(){var e=F.H;return F.H=Ar,e===null?Ar:e}function Hf(){var e=F.A;return F.A=Kh,e}function Ul(){tn=4,Wa||(nt&4194048)!==nt&&Fn.current!==null||(Xi=!0),(Ja&134217727)===0&&(Ri&134217727)===0||wt===null||ei(wt,nt,Kn,!1)}function Bo(e,a,s){var f=mt;mt|=2;var p=If(),g=Hf();(wt!==e||nt!==a)&&(Bl=null,Qi(e,a)),a=!1;var x=tn;e:do try{if(bt!==0&&$e!==null){var A=$e,P=Yn;switch(bt){case 8:Lo(),x=6;break e;case 3:case 2:case 9:case 6:Fn.current===null&&(a=!0);var Z=bt;if(bt=0,Yn=null,Wi(e,A,P,Z),s&&Xi){x=0;break e}break;default:Z=bt,bt=0,Yn=null,Wi(e,A,P,Z)}}Jh(),x=tn;break}catch(se){zf(e,se)}while(!0);return a&&e.shellSuspendCounter++,Ta=gi=null,mt=f,F.H=p,F.A=g,$e===null&&(wt=null,nt=0,il()),x}function Jh(){for(;$e!==null;)qf($e)}function Zh(e,a){var s=mt;mt|=2;var f=If(),p=Hf();wt!==e||nt!==a?(Bl=null,Ll=we()+500,Qi(e,a)):Xi=yn(e,a);e:do try{if(bt!==0&&$e!==null){a=$e;var g=Yn;t:switch(bt){case 1:bt=0,Yn=null,Wi(e,a,g,1);break;case 2:case 9:if(Wu(g)){bt=0,Yn=null,Pf(a);break}a=function(){bt!==2&&bt!==9||wt!==e||(bt=7),ma(e)},g.then(a,a);break e;case 3:bt=7;break e;case 4:bt=5;break e;case 7:Wu(g)?(bt=0,Yn=null,Pf(a)):(bt=0,Yn=null,Wi(e,a,g,7));break;case 5:var x=null;switch($e.tag){case 26:x=$e.memoizedState;case 5:case 27:var A=$e;if(x?Cd(x):A.stateNode.complete){bt=0,Yn=null;var P=A.sibling;if(P!==null)$e=P;else{var Z=A.return;Z!==null?($e=Z,Il(Z)):$e=null}break t}}bt=0,Yn=null,Wi(e,a,g,5);break;case 6:bt=0,Yn=null,Wi(e,a,g,6);break;case 8:Lo(),tn=6;break e;default:throw Error(u(462))}}$h();break}catch(se){zf(e,se)}while(!0);return Ta=gi=null,F.H=f,F.A=p,mt=s,$e!==null?0:(wt=null,nt=0,il(),tn)}function $h(){for(;$e!==null&&!nn();)qf($e)}function qf(e){var a=ff(e.alternate,e,ka);e.memoizedProps=e.pendingProps,a===null?Il(e):$e=a}function Pf(e){var a=e,s=a.alternate;switch(a.tag){case 15:case 0:a=rf(s,a,a.pendingProps,a.type,void 0,nt);break;case 11:a=rf(s,a,a.pendingProps,a.type.render,a.ref,nt);break;case 5:Ws(a);default:hf(s,a),a=$e=Iu(a,ka),a=ff(s,a,ka)}e.memoizedProps=e.pendingProps,a===null?Il(e):$e=a}function Wi(e,a,s,f){Ta=gi=null,Ws(a),Ii=null,vr=0;var p=a.return;try{if(qh(e,p,a,s,nt)){tn=1,Al(e,ea(s,e.current)),$e=null;return}}catch(g){if(p!==null)throw $e=p,g;tn=1,Al(e,ea(s,e.current)),$e=null;return}a.flags&32768?(st||f===1?e=!0:Xi||(nt&536870912)!==0?e=!1:(Wa=e=!0,(f===2||f===9||f===3||f===6)&&(f=Fn.current,f!==null&&f.tag===13&&(f.flags|=16384))),Vf(a,e)):Il(a)}function Il(e){var a=e;do{if((a.flags&32768)!==0){Vf(a,Wa);return}e=a.return;var s=Gh(a.alternate,a,ka);if(s!==null){$e=s;return}if(a=a.sibling,a!==null){$e=a;return}$e=a=e}while(a!==null);tn===0&&(tn=5)}function Vf(e,a){do{var s=Fh(e.alternate,e);if(s!==null){s.flags&=32767,$e=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!a&&(e=e.sibling,e!==null)){$e=e;return}$e=e=s}while(e!==null);tn=6,$e=null}function Gf(e,a,s,f,p,g,x,A,P){e.cancelPendingCommit=null;do Hl();while(pn!==0);if((mt&6)!==0)throw Error(u(327));if(a!==null){if(a===e.current)throw Error(u(177));if(g=a.lanes|a.childLanes,g|=Ss,Hn(e,s,g,x,A,P),e===wt&&($e=wt=null,nt=0),Ki=a,$a=e,La=s,jo=g,Do=p,Df=f,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ap(Lt,function(){return Qf(),null})):(e.callbackNode=null,e.callbackPriority=0),f=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||f){f=F.T,F.T=null,p=ce.p,ce.p=2,x=mt,mt|=4;try{Xh(e,a,s)}finally{mt=x,ce.p=p,F.T=f}}pn=1,Ff(),Xf(),Yf()}}function Ff(){if(pn===1){pn=0;var e=$a,a=Ki,s=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||s){s=F.T,F.T=null;var f=ce.p;ce.p=2;var p=mt;mt|=4;try{Rf(a,e);var g=Ko,x=Nu(e.containerInfo),A=g.focusedElem,P=g.selectionRange;if(x!==A&&A&&A.ownerDocument&&wu(A.ownerDocument.documentElement,A)){if(P!==null&&vs(A)){var Z=P.start,se=P.end;if(se===void 0&&(se=Z),"selectionStart"in A)A.selectionStart=Z,A.selectionEnd=Math.min(se,A.value.length);else{var he=A.ownerDocument||document,ee=he&&he.defaultView||window;if(ee.getSelection){var ae=ee.getSelection(),Ae=A.textContent.length,De=Math.min(P.start,Ae),Tt=P.end===void 0?De:Math.min(P.end,Ae);!ae.extend&&De>Tt&&(x=Tt,Tt=De,De=x);var X=Ou(A,De),G=Ou(A,Tt);if(X&&G&&(ae.rangeCount!==1||ae.anchorNode!==X.node||ae.anchorOffset!==X.offset||ae.focusNode!==G.node||ae.focusOffset!==G.offset)){var J=he.createRange();J.setStart(X.node,X.offset),ae.removeAllRanges(),De>Tt?(ae.addRange(J),ae.extend(G.node,G.offset)):(J.setEnd(G.node,G.offset),ae.addRange(J))}}}}for(he=[],ae=A;ae=ae.parentNode;)ae.nodeType===1&&he.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<he.length;A++){var ue=he[A];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}Zl=!!Yo,Ko=Yo=null}finally{mt=p,ce.p=f,F.T=s}}e.current=a,pn=2}}function Xf(){if(pn===2){pn=0;var e=$a,a=Ki,s=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||s){s=F.T,F.T=null;var f=ce.p;ce.p=2;var p=mt;mt|=4;try{Ef(e,a.alternate,a)}finally{mt=p,ce.p=f,F.T=s}}pn=3}}function Yf(){if(pn===4||pn===3){pn=0,tt();var e=$a,a=Ki,s=La,f=Df;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?pn=5:(pn=0,Ki=$a=null,Kf(e,e.pendingLanes));var p=e.pendingLanes;if(p===0&&(Za=null),Ke(s),a=a.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(hn,a,void 0,(a.current.flags&128)===128)}catch{}if(f!==null){a=F.T,p=ce.p,ce.p=2,F.T=null;try{for(var g=e.onRecoverableError,x=0;x<f.length;x++){var A=f[x];g(A.value,{componentStack:A.stack})}}finally{F.T=a,ce.p=p}}(La&3)!==0&&Hl(),ma(e),p=e.pendingLanes,(s&261930)!==0&&(p&42)!==0?e===ko?Lr++:(Lr=0,ko=e):Lr=0,Br(0)}}function Kf(e,a){(e.pooledCacheLanes&=a)===0&&(a=e.pooledCache,a!=null&&(e.pooledCache=null,gr(a)))}function Hl(){return Ff(),Xf(),Yf(),Qf()}function Qf(){if(pn!==5)return!1;var e=$a,a=jo;jo=0;var s=Ke(La),f=F.T,p=ce.p;try{ce.p=32>s?32:s,F.T=null,s=Do,Do=null;var g=$a,x=La;if(pn=0,Ki=$a=null,La=0,(mt&6)!==0)throw Error(u(331));var A=mt;if(mt|=4,Nf(g.current),Cf(g,g.current,x,s),mt=A,Br(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(hn,g)}catch{}return!0}finally{ce.p=p,F.T=f,Kf(e,a)}}function Wf(e,a,s){a=ea(s,a),a=fo(e.stateNode,a,2),e=Xa(e,a,2),e!==null&&(jn(e,2),ma(e))}function Et(e,a,s){if(e.tag===3)Wf(e,e,s);else for(;a!==null;){if(a.tag===3){Wf(a,e,s);break}else if(a.tag===1){var f=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Za===null||!Za.has(f))){e=ea(s,e),s=Wc(2),f=Xa(a,s,2),f!==null&&(Jc(s,f,a,e),jn(f,2),ma(f));break}}a=a.return}}function zo(e,a,s){var f=e.pingCache;if(f===null){f=e.pingCache=new Qh;var p=new Set;f.set(a,p)}else p=f.get(a),p===void 0&&(p=new Set,f.set(a,p));p.has(s)||(wo=!0,p.add(s),e=ep.bind(null,e,a,s),a.then(e,e))}function ep(e,a,s){var f=e.pingCache;f!==null&&f.delete(a),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,wt===e&&(nt&s)===s&&(tn===4||tn===3&&(nt&62914560)===nt&&300>we()-kl?(mt&2)===0&&Qi(e,0):No|=s,Yi===nt&&(Yi=0)),ma(e)}function Jf(e,a){a===0&&(a=sn()),e=hi(e,a),e!==null&&(jn(e,a),ma(e))}function tp(e){var a=e.memoizedState,s=0;a!==null&&(s=a.retryLane),Jf(e,s)}function np(e,a){var s=0;switch(e.tag){case 31:case 13:var f=e.stateNode,p=e.memoizedState;p!==null&&(s=p.retryLane);break;case 19:f=e.stateNode;break;case 22:f=e.stateNode._retryCache;break;default:throw Error(u(314))}f!==null&&f.delete(a),Jf(e,s)}function ap(e,a){return ut(e,a)}var ql=null,Ji=null,Uo=!1,Pl=!1,Io=!1,ti=0;function ma(e){e!==Ji&&e.next===null&&(Ji===null?ql=Ji=e:Ji=Ji.next=e),Pl=!0,Uo||(Uo=!0,rp())}function Br(e,a){if(!Io&&Pl){Io=!0;do for(var s=!1,f=ql;f!==null;){if(e!==0){var p=f.pendingLanes;if(p===0)var g=0;else{var x=f.suspendedLanes,A=f.pingedLanes;g=(1<<31-pt(42|e)+1)-1,g&=p&~(x&~A),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,td(f,g))}else g=nt,g=Cn(f,f===wt?g:0,f.cancelPendingCommit!==null||f.timeoutHandle!==-1),(g&3)===0||yn(f,g)||(s=!0,td(f,g));f=f.next}while(s);Io=!1}}function ip(){Zf()}function Zf(){Pl=Uo=!1;var e=0;ti!==0&&mp()&&(e=ti);for(var a=we(),s=null,f=ql;f!==null;){var p=f.next,g=$f(f,a);g===0?(f.next=null,s===null?ql=p:s.next=p,p===null&&(Ji=s)):(s=f,(e!==0||(g&3)!==0)&&(Pl=!0)),f=p}pn!==0&&pn!==5||Br(e),ti!==0&&(ti=0)}function $f(e,a){for(var s=e.suspendedLanes,f=e.pingedLanes,p=e.expirationTimes,g=e.pendingLanes&-62914561;0<g;){var x=31-pt(g),A=1<<x,P=p[x];P===-1?((A&s)===0||(A&f)!==0)&&(p[x]=vt(A,a)):P<=a&&(e.expiredLanes|=A),g&=~A}if(a=wt,s=nt,s=Cn(e,e===a?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),f=e.callbackNode,s===0||e===a&&(bt===2||bt===9)||e.cancelPendingCommit!==null)return f!==null&&f!==null&&Fe(f),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||yn(e,s)){if(a=s&-s,a===e.callbackPriority)return a;switch(f!==null&&Fe(f),Ke(s)){case 2:case 8:s=kt;break;case 32:s=Lt;break;case 268435456:s=Tn;break;default:s=Lt}return f=ed.bind(null,e),s=ut(s,f),e.callbackPriority=a,e.callbackNode=s,a}return f!==null&&f!==null&&Fe(f),e.callbackPriority=2,e.callbackNode=null,2}function ed(e,a){if(pn!==0&&pn!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(Hl()&&e.callbackNode!==s)return null;var f=nt;return f=Cn(e,e===wt?f:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),f===0?null:(Lf(e,f,a),$f(e,we()),e.callbackNode!=null&&e.callbackNode===s?ed.bind(null,e):null)}function td(e,a){if(Hl())return null;Lf(e,a,!0)}function rp(){yp(function(){(mt&6)!==0?ut(Dt,ip):Zf()})}function Ho(){if(ti===0){var e=Bi;e===0&&(e=zt,zt<<=1,(zt&261888)===0&&(zt=256)),ti=e}return ti}function nd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Wr(""+e)}function ad(e,a){var s=a.ownerDocument.createElement("input");return s.name=a.name,s.value=a.value,e.id&&s.setAttribute("form",e.id),a.parentNode.insertBefore(s,a),e=new FormData(e),s.parentNode.removeChild(s),e}function lp(e,a,s,f,p){if(a==="submit"&&s&&s.stateNode===p){var g=nd((p[qe]||null).action),x=f.submitter;x&&(a=(a=x[qe]||null)?nd(a.formAction):x.getAttribute("formAction"),a!==null&&(g=a,x=null));var A=new el("action","action",null,f,p);e.push({event:A,listeners:[{instance:null,listener:function(){if(f.defaultPrevented){if(ti!==0){var P=x?ad(p,x):new FormData(p);ro(s,{pending:!0,data:P,method:p.method,action:g},null,P)}}else typeof g=="function"&&(A.preventDefault(),P=x?ad(p,x):new FormData(p),ro(s,{pending:!0,data:P,method:p.method,action:g},g,P))},currentTarget:p}]})}}for(var qo=0;qo<xs.length;qo++){var Po=xs[qo],sp=Po.toLowerCase(),op=Po[0].toUpperCase()+Po.slice(1);oa(sp,"on"+op)}oa(Du,"onAnimationEnd"),oa(ku,"onAnimationIteration"),oa(Lu,"onAnimationStart"),oa("dblclick","onDoubleClick"),oa("focusin","onFocus"),oa("focusout","onBlur"),oa(Th,"onTransitionRun"),oa(Rh,"onTransitionStart"),oa(Ah,"onTransitionCancel"),oa(Bu,"onTransitionEnd"),Be("onMouseEnter",["mouseout","mouseover"]),Be("onMouseLeave",["mouseout","mouseover"]),Be("onPointerEnter",["pointerout","pointerover"]),Be("onPointerLeave",["pointerout","pointerover"]),Ct("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ct("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ct("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ct("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ct("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ct("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),up=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zr));function id(e,a){a=(a&4)!==0;for(var s=0;s<e.length;s++){var f=e[s],p=f.event;f=f.listeners;e:{var g=void 0;if(a)for(var x=f.length-1;0<=x;x--){var A=f[x],P=A.instance,Z=A.currentTarget;if(A=A.listener,P!==g&&p.isPropagationStopped())break e;g=A,p.currentTarget=Z;try{g(p)}catch(se){al(se)}p.currentTarget=null,g=P}else for(x=0;x<f.length;x++){if(A=f[x],P=A.instance,Z=A.currentTarget,A=A.listener,P!==g&&p.isPropagationStopped())break e;g=A,p.currentTarget=Z;try{g(p)}catch(se){al(se)}p.currentTarget=null,g=P}}}}function et(e,a){var s=a[Nt];s===void 0&&(s=a[Nt]=new Set);var f=e+"__bubble";s.has(f)||(rd(a,e,2,!1),s.add(f))}function Vo(e,a,s){var f=0;a&&(f|=4),rd(s,e,f,a)}var Vl="_reactListening"+Math.random().toString(36).slice(2);function Go(e){if(!e[Vl]){e[Vl]=!0,Ne.forEach(function(s){s!=="selectionchange"&&(up.has(s)||Vo(s,!1,e),Vo(s,!0,e))});var a=e.nodeType===9?e:e.ownerDocument;a===null||a[Vl]||(a[Vl]=!0,Vo("selectionchange",!1,a))}}function rd(e,a,s,f){switch(kd(a)){case 2:var p=zp;break;case 8:p=Up;break;default:p=ru}s=p.bind(null,a,s,e),p=void 0,!us||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),f?p!==void 0?e.addEventListener(a,s,{capture:!0,passive:p}):e.addEventListener(a,s,!0):p!==void 0?e.addEventListener(a,s,{passive:p}):e.addEventListener(a,s,!1)}function Fo(e,a,s,f,p){var g=f;if((a&1)===0&&(a&2)===0&&f!==null)e:for(;;){if(f===null)return;var x=f.tag;if(x===3||x===4){var A=f.stateNode.containerInfo;if(A===p)break;if(x===4)for(x=f.return;x!==null;){var P=x.tag;if((P===3||P===4)&&x.stateNode.containerInfo===p)return;x=x.return}for(;A!==null;){if(x=me(A),x===null)return;if(P=x.tag,P===5||P===6||P===26||P===27){f=g=x;continue e}A=A.parentNode}}f=f.return}ar(function(){var Z=g,se=os(s),he=[];e:{var ee=zu.get(e);if(ee!==void 0){var ae=el,Ae=e;switch(e){case"keypress":if(Zr(s)===0)break e;case"keydown":case"keyup":ae=nh;break;case"focusin":Ae="focus",ae=hs;break;case"focusout":Ae="blur",ae=hs;break;case"beforeblur":case"afterblur":ae=hs;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ae=du;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=Gd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=rh;break;case Du:case ku:case Lu:ae=Yd;break;case Bu:ae=sh;break;case"scroll":case"scrollend":ae=Pd;break;case"wheel":ae=uh;break;case"copy":case"cut":case"paste":ae=Qd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=pu;break;case"toggle":case"beforetoggle":ae=fh}var De=(a&4)!==0,Tt=!De&&(e==="scroll"||e==="scrollend"),X=De?ee!==null?ee+"Capture":null:ee;De=[];for(var G=Z,J;G!==null;){var ue=G;if(J=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||J===null||X===null||(ue=ir(G,X),ue!=null&&De.push(Ur(G,ue,J))),Tt)break;G=G.return}0<De.length&&(ee=new ae(ee,Ae,null,s,se),he.push({event:ee,listeners:De}))}}if((a&7)===0){e:{if(ee=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",ee&&s!==ss&&(Ae=s.relatedTarget||s.fromElement)&&(me(Ae)||Ae[Vt]))break e;if((ae||ee)&&(ee=se.window===se?se:(ee=se.ownerDocument)?ee.defaultView||ee.parentWindow:window,ae?(Ae=s.relatedTarget||s.toElement,ae=Z,Ae=Ae?me(Ae):null,Ae!==null&&(Tt=m(Ae),De=Ae.tag,Ae!==Tt||De!==5&&De!==27&&De!==6)&&(Ae=null)):(ae=null,Ae=Z),ae!==Ae)){if(De=du,ue="onMouseLeave",X="onMouseEnter",G="mouse",(e==="pointerout"||e==="pointerover")&&(De=pu,ue="onPointerLeave",X="onPointerEnter",G="pointer"),Tt=ae==null?ee:ke(ae),J=Ae==null?ee:ke(Ae),ee=new De(ue,G+"leave",ae,s,se),ee.target=Tt,ee.relatedTarget=J,ue=null,me(se)===Z&&(De=new De(X,G+"enter",Ae,s,se),De.target=J,De.relatedTarget=Tt,ue=De),Tt=ue,ae&&Ae)t:{for(De=cp,X=ae,G=Ae,J=0,ue=X;ue;ue=De(ue))J++;ue=0;for(var Me=G;Me;Me=De(Me))ue++;for(;0<J-ue;)X=De(X),J--;for(;0<ue-J;)G=De(G),ue--;for(;J--;){if(X===G||G!==null&&X===G.alternate){De=X;break t}X=De(X),G=De(G)}De=null}else De=null;ae!==null&&ld(he,ee,ae,De,!1),Ae!==null&&Tt!==null&&ld(he,Tt,Ae,De,!0)}}e:{if(ee=Z?ke(Z):window,ae=ee.nodeName&&ee.nodeName.toLowerCase(),ae==="select"||ae==="input"&&ee.type==="file")var dt=xu;else if(Eu(ee))if(Su)dt=_h;else{dt=bh;var Ce=vh}else ae=ee.nodeName,!ae||ae.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?Z&&Ai(Z.elementType)&&(dt=xu):dt=Eh;if(dt&&(dt=dt(e,Z))){_u(he,dt,s,se);break e}Ce&&Ce(e,ee,Z),e==="focusout"&&Z&&ee.type==="number"&&Z.memoizedProps.value!=null&&nr(ee,"number",ee.value)}switch(Ce=Z?ke(Z):window,e){case"focusin":(Eu(Ce)||Ce.contentEditable==="true")&&(Oi=Ce,bs=Z,hr=null);break;case"focusout":hr=bs=Oi=null;break;case"mousedown":Es=!0;break;case"contextmenu":case"mouseup":case"dragend":Es=!1,Mu(he,s,se);break;case"selectionchange":if(Sh)break;case"keydown":case"keyup":Mu(he,s,se)}var Ge;if(ms)e:{switch(e){case"compositionstart":var at="onCompositionStart";break e;case"compositionend":at="onCompositionEnd";break e;case"compositionupdate":at="onCompositionUpdate";break e}at=void 0}else Ci?vu(e,s)&&(at="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(at="onCompositionStart");at&&(mu&&s.locale!=="ko"&&(Ci||at!=="onCompositionStart"?at==="onCompositionEnd"&&Ci&&(Ge=cu()):(Ia=se,cs="value"in Ia?Ia.value:Ia.textContent,Ci=!0)),Ce=Gl(Z,at),0<Ce.length&&(at=new hu(at,e,null,s,se),he.push({event:at,listeners:Ce}),Ge?at.data=Ge:(Ge=bu(s),Ge!==null&&(at.data=Ge)))),(Ge=hh?ph(e,s):mh(e,s))&&(at=Gl(Z,"onBeforeInput"),0<at.length&&(Ce=new hu("onBeforeInput","beforeinput",null,s,se),he.push({event:Ce,listeners:at}),Ce.data=Ge)),lp(he,e,Z,s,se)}id(he,a)})}function Ur(e,a,s){return{instance:e,listener:a,currentTarget:s}}function Gl(e,a){for(var s=a+"Capture",f=[];e!==null;){var p=e,g=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||g===null||(p=ir(e,s),p!=null&&f.unshift(Ur(e,p,g)),p=ir(e,a),p!=null&&f.push(Ur(e,p,g))),e.tag===3)return f;e=e.return}return[]}function cp(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ld(e,a,s,f,p){for(var g=a._reactName,x=[];s!==null&&s!==f;){var A=s,P=A.alternate,Z=A.stateNode;if(A=A.tag,P!==null&&P===f)break;A!==5&&A!==26&&A!==27||Z===null||(P=Z,p?(Z=ir(s,g),Z!=null&&x.unshift(Ur(s,Z,P))):p||(Z=ir(s,g),Z!=null&&x.push(Ur(s,Z,P)))),s=s.return}x.length!==0&&e.push({event:a,listeners:x})}var fp=/\r\n?/g,dp=/\u0000|\uFFFD/g;function sd(e){return(typeof e=="string"?e:""+e).replace(fp,`
9
+ `).replace(dp,"")}function od(e,a){return a=sd(a),sd(e)===a}function St(e,a,s,f,p,g){switch(s){case"children":typeof f=="string"?a==="body"||a==="textarea"&&f===""||ya(e,f):(typeof f=="number"||typeof f=="bigint")&&a!=="body"&&ya(e,""+f);break;case"className":an(e,"class",f);break;case"tabIndex":an(e,"tabindex",f);break;case"dir":case"role":case"viewBox":case"width":case"height":an(e,s,f);break;case"style":oi(e,f,g);break;case"data":if(a!=="object"){an(e,"data",f);break}case"src":case"href":if(f===""&&(a!=="a"||s!=="href")){e.removeAttribute(s);break}if(f==null||typeof f=="function"||typeof f=="symbol"||typeof f=="boolean"){e.removeAttribute(s);break}f=Wr(""+f),e.setAttribute(s,f);break;case"action":case"formAction":if(typeof f=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(s==="formAction"?(a!=="input"&&St(e,a,"name",p.name,p,null),St(e,a,"formEncType",p.formEncType,p,null),St(e,a,"formMethod",p.formMethod,p,null),St(e,a,"formTarget",p.formTarget,p,null)):(St(e,a,"encType",p.encType,p,null),St(e,a,"method",p.method,p,null),St(e,a,"target",p.target,p,null)));if(f==null||typeof f=="symbol"||typeof f=="boolean"){e.removeAttribute(s);break}f=Wr(""+f),e.setAttribute(s,f);break;case"onClick":f!=null&&(e.onclick=sa);break;case"onScroll":f!=null&&et("scroll",e);break;case"onScrollEnd":f!=null&&et("scrollend",e);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(u(61));if(s=f.__html,s!=null){if(p.children!=null)throw Error(u(60));e.innerHTML=s}}break;case"multiple":e.multiple=f&&typeof f!="function"&&typeof f!="symbol";break;case"muted":e.muted=f&&typeof f!="function"&&typeof f!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(f==null||typeof f=="function"||typeof f=="boolean"||typeof f=="symbol"){e.removeAttribute("xlink:href");break}s=Wr(""+f),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":f!=null&&typeof f!="function"&&typeof f!="symbol"?e.setAttribute(s,""+f):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":f&&typeof f!="function"&&typeof f!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":f===!0?e.setAttribute(s,""):f!==!1&&f!=null&&typeof f!="function"&&typeof f!="symbol"?e.setAttribute(s,f):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":f!=null&&typeof f!="function"&&typeof f!="symbol"&&!isNaN(f)&&1<=f?e.setAttribute(s,f):e.removeAttribute(s);break;case"rowSpan":case"start":f==null||typeof f=="function"||typeof f=="symbol"||isNaN(f)?e.removeAttribute(s):e.setAttribute(s,f);break;case"popover":et("beforetoggle",e),et("toggle",e),Le(e,"popover",f);break;case"xlinkActuate":Gt(e,"http://www.w3.org/1999/xlink","xlink:actuate",f);break;case"xlinkArcrole":Gt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",f);break;case"xlinkRole":Gt(e,"http://www.w3.org/1999/xlink","xlink:role",f);break;case"xlinkShow":Gt(e,"http://www.w3.org/1999/xlink","xlink:show",f);break;case"xlinkTitle":Gt(e,"http://www.w3.org/1999/xlink","xlink:title",f);break;case"xlinkType":Gt(e,"http://www.w3.org/1999/xlink","xlink:type",f);break;case"xmlBase":Gt(e,"http://www.w3.org/XML/1998/namespace","xml:base",f);break;case"xmlLang":Gt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",f);break;case"xmlSpace":Gt(e,"http://www.w3.org/XML/1998/namespace","xml:space",f);break;case"is":Le(e,"is",f);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=qd.get(s)||s,Le(e,s,f))}}function Xo(e,a,s,f,p,g){switch(s){case"style":oi(e,f,g);break;case"dangerouslySetInnerHTML":if(f!=null){if(typeof f!="object"||!("__html"in f))throw Error(u(61));if(s=f.__html,s!=null){if(p.children!=null)throw Error(u(60));e.innerHTML=s}}break;case"children":typeof f=="string"?ya(e,f):(typeof f=="number"||typeof f=="bigint")&&ya(e,""+f);break;case"onScroll":f!=null&&et("scroll",e);break;case"onScrollEnd":f!=null&&et("scrollend",e);break;case"onClick":f!=null&&(e.onclick=sa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!We.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(p=s.endsWith("Capture"),a=s.slice(2,p?s.length-7:void 0),g=e[qe]||null,g=g!=null?g[s]:null,typeof g=="function"&&e.removeEventListener(a,g,p),typeof f=="function")){typeof g!="function"&&g!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(a,f,p);break e}s in e?e[s]=f:f===!0?e.setAttribute(s,""):Le(e,s,f)}}}function Sn(e,a,s){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":et("error",e),et("load",e);var f=!1,p=!1,g;for(g in s)if(s.hasOwnProperty(g)){var x=s[g];if(x!=null)switch(g){case"src":f=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,a));default:St(e,a,g,x,s,null)}}p&&St(e,a,"srcSet",s.srcSet,s,null),f&&St(e,a,"src",s.src,s,null);return;case"input":et("invalid",e);var A=g=x=p=null,P=null,Z=null;for(f in s)if(s.hasOwnProperty(f)){var se=s[f];if(se!=null)switch(f){case"name":p=se;break;case"type":x=se;break;case"checked":P=se;break;case"defaultChecked":Z=se;break;case"value":g=se;break;case"defaultValue":A=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(u(137,a));break;default:St(e,a,f,se,s,null)}}ga(e,g,A,P,Z,x,p,!1);return;case"select":et("invalid",e),f=x=g=null;for(p in s)if(s.hasOwnProperty(p)&&(A=s[p],A!=null))switch(p){case"value":g=A;break;case"defaultValue":x=A;break;case"multiple":f=A;default:St(e,a,p,A,s,null)}a=g,s=x,e.multiple=!!f,a!=null?za(e,!!f,a,!1):s!=null&&za(e,!!f,s,!0);return;case"textarea":et("invalid",e),g=p=f=null;for(x in s)if(s.hasOwnProperty(x)&&(A=s[x],A!=null))switch(x){case"value":f=A;break;case"defaultValue":p=A;break;case"children":g=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(u(91));break;default:St(e,a,x,A,s,null)}Yr(e,f,p,g);return;case"option":for(P in s)s.hasOwnProperty(P)&&(f=s[P],f!=null)&&(P==="selected"?e.selected=f&&typeof f!="function"&&typeof f!="symbol":St(e,a,P,f,s,null));return;case"dialog":et("beforetoggle",e),et("toggle",e),et("cancel",e),et("close",e);break;case"iframe":case"object":et("load",e);break;case"video":case"audio":for(f=0;f<zr.length;f++)et(zr[f],e);break;case"image":et("error",e),et("load",e);break;case"details":et("toggle",e);break;case"embed":case"source":case"link":et("error",e),et("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Z in s)if(s.hasOwnProperty(Z)&&(f=s[Z],f!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,a));default:St(e,a,Z,f,s,null)}return;default:if(Ai(a)){for(se in s)s.hasOwnProperty(se)&&(f=s[se],f!==void 0&&Xo(e,a,se,f,s,void 0));return}}for(A in s)s.hasOwnProperty(A)&&(f=s[A],f!=null&&St(e,a,A,f,s,null))}function hp(e,a,s,f){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,g=null,x=null,A=null,P=null,Z=null,se=null;for(ae in s){var he=s[ae];if(s.hasOwnProperty(ae)&&he!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":P=he;default:f.hasOwnProperty(ae)||St(e,a,ae,null,f,he)}}for(var ee in f){var ae=f[ee];if(he=s[ee],f.hasOwnProperty(ee)&&(ae!=null||he!=null))switch(ee){case"type":g=ae;break;case"name":p=ae;break;case"checked":Z=ae;break;case"defaultChecked":se=ae;break;case"value":x=ae;break;case"defaultValue":A=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(u(137,a));break;default:ae!==he&&St(e,a,ee,ae,f,he)}}Zt(e,x,A,P,Z,se,g,p);return;case"select":ae=x=A=ee=null;for(g in s)if(P=s[g],s.hasOwnProperty(g)&&P!=null)switch(g){case"value":break;case"multiple":ae=P;default:f.hasOwnProperty(g)||St(e,a,g,null,f,P)}for(p in f)if(g=f[p],P=s[p],f.hasOwnProperty(p)&&(g!=null||P!=null))switch(p){case"value":ee=g;break;case"defaultValue":A=g;break;case"multiple":x=g;default:g!==P&&St(e,a,p,g,f,P)}a=A,s=x,f=ae,ee!=null?za(e,!!s,ee,!1):!!f!=!!s&&(a!=null?za(e,!!s,a,!0):za(e,!!s,s?[]:"",!1));return;case"textarea":ae=ee=null;for(A in s)if(p=s[A],s.hasOwnProperty(A)&&p!=null&&!f.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:St(e,a,A,null,f,p)}for(x in f)if(p=f[x],g=s[x],f.hasOwnProperty(x)&&(p!=null||g!=null))switch(x){case"value":ee=p;break;case"defaultValue":ae=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(u(91));break;default:p!==g&&St(e,a,x,p,f,g)}Ua(e,ee,ae);return;case"option":for(var Ae in s)ee=s[Ae],s.hasOwnProperty(Ae)&&ee!=null&&!f.hasOwnProperty(Ae)&&(Ae==="selected"?e.selected=!1:St(e,a,Ae,null,f,ee));for(P in f)ee=f[P],ae=s[P],f.hasOwnProperty(P)&&ee!==ae&&(ee!=null||ae!=null)&&(P==="selected"?e.selected=ee&&typeof ee!="function"&&typeof ee!="symbol":St(e,a,P,ee,f,ae));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var De in s)ee=s[De],s.hasOwnProperty(De)&&ee!=null&&!f.hasOwnProperty(De)&&St(e,a,De,null,f,ee);for(Z in f)if(ee=f[Z],ae=s[Z],f.hasOwnProperty(Z)&&ee!==ae&&(ee!=null||ae!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(u(137,a));break;default:St(e,a,Z,ee,f,ae)}return;default:if(Ai(a)){for(var Tt in s)ee=s[Tt],s.hasOwnProperty(Tt)&&ee!==void 0&&!f.hasOwnProperty(Tt)&&Xo(e,a,Tt,void 0,f,ee);for(se in f)ee=f[se],ae=s[se],!f.hasOwnProperty(se)||ee===ae||ee===void 0&&ae===void 0||Xo(e,a,se,ee,f,ae);return}}for(var X in s)ee=s[X],s.hasOwnProperty(X)&&ee!=null&&!f.hasOwnProperty(X)&&St(e,a,X,null,f,ee);for(he in f)ee=f[he],ae=s[he],!f.hasOwnProperty(he)||ee===ae||ee==null&&ae==null||St(e,a,he,ee,f,ae)}function ud(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function pp(){if(typeof performance.getEntriesByType=="function"){for(var e=0,a=0,s=performance.getEntriesByType("resource"),f=0;f<s.length;f++){var p=s[f],g=p.transferSize,x=p.initiatorType,A=p.duration;if(g&&A&&ud(x)){for(x=0,A=p.responseEnd,f+=1;f<s.length;f++){var P=s[f],Z=P.startTime;if(Z>A)break;var se=P.transferSize,he=P.initiatorType;se&&ud(he)&&(P=P.responseEnd,x+=se*(P<A?1:(A-Z)/(P-Z)))}if(--f,a+=8*(g+x)/(p.duration/1e3),e++,10<e)break}}if(0<e)return a/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Yo=null,Ko=null;function Fl(e){return e.nodeType===9?e:e.ownerDocument}function cd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function fd(e,a){if(e===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&a==="foreignObject"?0:e}function Qo(e,a){return e==="textarea"||e==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Wo=null;function mp(){var e=window.event;return e&&e.type==="popstate"?e===Wo?!1:(Wo=e,!0):(Wo=null,!1)}var dd=typeof setTimeout=="function"?setTimeout:void 0,gp=typeof clearTimeout=="function"?clearTimeout:void 0,hd=typeof Promise=="function"?Promise:void 0,yp=typeof queueMicrotask=="function"?queueMicrotask:typeof hd<"u"?function(e){return hd.resolve(null).then(e).catch(vp)}:dd;function vp(e){setTimeout(function(){throw e})}function ni(e){return e==="head"}function pd(e,a){var s=a,f=0;do{var p=s.nextSibling;if(e.removeChild(s),p&&p.nodeType===8)if(s=p.data,s==="/$"||s==="/&"){if(f===0){e.removeChild(p),tr(a);return}f--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")f++;else if(s==="html")Ir(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,Ir(s);for(var g=s.firstChild;g;){var x=g.nextSibling,A=g.nodeName;g[ye]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&g.rel.toLowerCase()==="stylesheet"||s.removeChild(g),g=x}}else s==="body"&&Ir(e.ownerDocument.body);s=p}while(s);tr(a)}function md(e,a){var s=e;e=0;do{var f=s.nextSibling;if(s.nodeType===1?a?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(a?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),f&&f.nodeType===8)if(s=f.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=f}while(s)}function Jo(e){var a=e.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var s=a;switch(a=a.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":Jo(s),V(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function bp(e,a,s,f){for(;e.nodeType===1;){var p=s;if(e.nodeName.toLowerCase()!==a.toLowerCase()){if(!f&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(f){if(!e[ye])switch(a){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(g=e.getAttribute("rel"),g==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(g!==p.rel||e.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||e.getAttribute("title")!==(p.title==null?null:p.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(g=e.getAttribute("src"),(g!==(p.src==null?null:p.src)||e.getAttribute("type")!==(p.type==null?null:p.type)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&g&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(a==="input"&&e.type==="hidden"){var g=p.name==null?null:""+p.name;if(p.type==="hidden"&&e.getAttribute("name")===g)return e}else return e;if(e=ra(e.nextSibling),e===null)break}return null}function Ep(e,a,s){if(a==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=ra(e.nextSibling),e===null))return null;return e}function gd(e,a){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ra(e.nextSibling),e===null))return null;return e}function Zo(e){return e.data==="$?"||e.data==="$~"}function $o(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function _p(e,a){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=a;else if(e.data!=="$?"||s.readyState!=="loading")a();else{var f=function(){a(),s.removeEventListener("DOMContentLoaded",f)};s.addEventListener("DOMContentLoaded",f),e._reactRetry=f}}function ra(e){for(;e!=null;e=e.nextSibling){var a=e.nodeType;if(a===1||a===3)break;if(a===8){if(a=e.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return e}var eu=null;function yd(e){e=e.nextSibling;for(var a=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(a===0)return ra(e.nextSibling);a--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||a++}e=e.nextSibling}return null}function vd(e){e=e.previousSibling;for(var a=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(a===0)return e;a--}else s!=="/$"&&s!=="/&"||a++}e=e.previousSibling}return null}function bd(e,a,s){switch(a=Fl(s),e){case"html":if(e=a.documentElement,!e)throw Error(u(452));return e;case"head":if(e=a.head,!e)throw Error(u(453));return e;case"body":if(e=a.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Ir(e){for(var a=e.attributes;a.length;)e.removeAttributeNode(a[0]);V(e)}var la=new Map,Ed=new Set;function Xl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ba=ce.d;ce.d={f:xp,r:Sp,D:Tp,C:Rp,L:Ap,m:Cp,X:wp,S:Op,M:Np};function xp(){var e=Ba.f(),a=zl();return e||a}function Sp(e){var a=ge(e);a!==null&&a.tag===5&&a.type==="form"?Bc(a):Ba.r(e)}var Zi=typeof document>"u"?null:document;function _d(e,a,s){var f=Zi;if(f&&typeof a=="string"&&a){var p=Dn(a);p='link[rel="'+e+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),Ed.has(p)||(Ed.add(p),e={rel:e,crossOrigin:s,href:a},f.querySelector(p)===null&&(a=f.createElement("link"),Sn(a,"link",e),Re(a),f.head.appendChild(a)))}}function Tp(e){Ba.D(e),_d("dns-prefetch",e,null)}function Rp(e,a){Ba.C(e,a),_d("preconnect",e,a)}function Ap(e,a,s){Ba.L(e,a,s);var f=Zi;if(f&&e&&a){var p='link[rel="preload"][as="'+Dn(a)+'"]';a==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+Dn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+Dn(s.imageSizes)+'"]')):p+='[href="'+Dn(e)+'"]';var g=p;switch(a){case"style":g=$i(e);break;case"script":g=er(e)}la.has(g)||(e=w({rel:"preload",href:a==="image"&&s&&s.imageSrcSet?void 0:e,as:a},s),la.set(g,e),f.querySelector(p)!==null||a==="style"&&f.querySelector(Hr(g))||a==="script"&&f.querySelector(qr(g))||(a=f.createElement("link"),Sn(a,"link",e),Re(a),f.head.appendChild(a)))}}function Cp(e,a){Ba.m(e,a);var s=Zi;if(s&&e){var f=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+Dn(f)+'"][href="'+Dn(e)+'"]',g=p;switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=er(e)}if(!la.has(g)&&(e=w({rel:"modulepreload",href:e},a),la.set(g,e),s.querySelector(p)===null)){switch(f){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(qr(g)))return}f=s.createElement("link"),Sn(f,"link",e),Re(f),s.head.appendChild(f)}}}function Op(e,a,s){Ba.S(e,a,s);var f=Zi;if(f&&e){var p=Ue(f).hoistableStyles,g=$i(e);a=a||"default";var x=p.get(g);if(!x){var A={loading:0,preload:null};if(x=f.querySelector(Hr(g)))A.loading=5;else{e=w({rel:"stylesheet",href:e,"data-precedence":a},s),(s=la.get(g))&&tu(e,s);var P=x=f.createElement("link");Re(P),Sn(P,"link",e),P._p=new Promise(function(Z,se){P.onload=Z,P.onerror=se}),P.addEventListener("load",function(){A.loading|=1}),P.addEventListener("error",function(){A.loading|=2}),A.loading|=4,Yl(x,a,f)}x={type:"stylesheet",instance:x,count:1,state:A},p.set(g,x)}}}function wp(e,a){Ba.X(e,a);var s=Zi;if(s&&e){var f=Ue(s).hoistableScripts,p=er(e),g=f.get(p);g||(g=s.querySelector(qr(p)),g||(e=w({src:e,async:!0},a),(a=la.get(p))&&nu(e,a),g=s.createElement("script"),Re(g),Sn(g,"link",e),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},f.set(p,g))}}function Np(e,a){Ba.M(e,a);var s=Zi;if(s&&e){var f=Ue(s).hoistableScripts,p=er(e),g=f.get(p);g||(g=s.querySelector(qr(p)),g||(e=w({src:e,async:!0,type:"module"},a),(a=la.get(p))&&nu(e,a),g=s.createElement("script"),Re(g),Sn(g,"link",e),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},f.set(p,g))}}function xd(e,a,s,f){var p=(p=Oe.current)?Xl(p):null;if(!p)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(a=$i(s.href),s=Ue(p).hoistableStyles,f=s.get(a),f||(f={type:"style",instance:null,count:0,state:null},s.set(a,f)),f):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=$i(s.href);var g=Ue(p).hoistableStyles,x=g.get(e);if(x||(p=p.ownerDocument||p,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(e,x),(g=p.querySelector(Hr(e)))&&!g._p&&(x.instance=g,x.state.loading=5),la.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},la.set(e,s),g||Mp(p,e,s,x.state))),a&&f===null)throw Error(u(528,""));return x}if(a&&f!==null)throw Error(u(529,""));return null;case"script":return a=s.async,s=s.src,typeof s=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=er(s),s=Ue(p).hoistableScripts,f=s.get(a),f||(f={type:"script",instance:null,count:0,state:null},s.set(a,f)),f):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function $i(e){return'href="'+Dn(e)+'"'}function Hr(e){return'link[rel="stylesheet"]['+e+"]"}function Sd(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function Mp(e,a,s,f){e.querySelector('link[rel="preload"][as="style"]['+a+"]")?f.loading=1:(a=e.createElement("link"),f.preload=a,a.addEventListener("load",function(){return f.loading|=1}),a.addEventListener("error",function(){return f.loading|=2}),Sn(a,"link",s),Re(a),e.head.appendChild(a))}function er(e){return'[src="'+Dn(e)+'"]'}function qr(e){return"script[async]"+e}function Td(e,a,s){if(a.count++,a.instance===null)switch(a.type){case"style":var f=e.querySelector('style[data-href~="'+Dn(s.href)+'"]');if(f)return a.instance=f,Re(f),f;var p=w({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return f=(e.ownerDocument||e).createElement("style"),Re(f),Sn(f,"style",p),Yl(f,s.precedence,e),a.instance=f;case"stylesheet":p=$i(s.href);var g=e.querySelector(Hr(p));if(g)return a.state.loading|=4,a.instance=g,Re(g),g;f=Sd(s),(p=la.get(p))&&tu(f,p),g=(e.ownerDocument||e).createElement("link"),Re(g);var x=g;return x._p=new Promise(function(A,P){x.onload=A,x.onerror=P}),Sn(g,"link",f),a.state.loading|=4,Yl(g,s.precedence,e),a.instance=g;case"script":return g=er(s.src),(p=e.querySelector(qr(g)))?(a.instance=p,Re(p),p):(f=s,(p=la.get(g))&&(f=w({},s),nu(f,p)),e=e.ownerDocument||e,p=e.createElement("script"),Re(p),Sn(p,"link",f),e.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(u(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(f=a.instance,a.state.loading|=4,Yl(f,s.precedence,e));return a.instance}function Yl(e,a,s){for(var f=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=f.length?f[f.length-1]:null,g=p,x=0;x<f.length;x++){var A=f[x];if(A.dataset.precedence===a)g=A;else if(g!==p)break}g?g.parentNode.insertBefore(e,g.nextSibling):(a=s.nodeType===9?s.head:s,a.insertBefore(e,a.firstChild))}function tu(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.title==null&&(e.title=a.title)}function nu(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.integrity==null&&(e.integrity=a.integrity)}var Kl=null;function Rd(e,a,s){if(Kl===null){var f=new Map,p=Kl=new Map;p.set(s,f)}else p=Kl,f=p.get(s),f||(f=new Map,p.set(s,f));if(f.has(e))return f;for(f.set(e,null),s=s.getElementsByTagName(e),p=0;p<s.length;p++){var g=s[p];if(!(g[ye]||g[Qe]||e==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var x=g.getAttribute(a)||"";x=e+x;var A=f.get(x);A?A.push(g):f.set(x,[g])}}return f}function Ad(e,a,s){e=e.ownerDocument||e,e.head.insertBefore(s,a==="title"?e.querySelector("head > title"):null)}function jp(e,a,s){if(s===1||a.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(e=a.disabled,typeof a.precedence=="string"&&e==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Cd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Dp(e,a,s,f){if(s.type==="stylesheet"&&(typeof f.media!="string"||matchMedia(f.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=$i(f.href),g=a.querySelector(Hr(p));if(g){a=g._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(e.count++,e=Ql.bind(e),a.then(e,e)),s.state.loading|=4,s.instance=g,Re(g);return}g=a.ownerDocument||a,f=Sd(f),(p=la.get(p))&&tu(f,p),g=g.createElement("link"),Re(g);var x=g;x._p=new Promise(function(A,P){x.onload=A,x.onerror=P}),Sn(g,"link",f),s.instance=g}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,a),(a=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=Ql.bind(e),a.addEventListener("load",s),a.addEventListener("error",s))}}var au=0;function kp(e,a){return e.stylesheets&&e.count===0&&Jl(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var f=setTimeout(function(){if(e.stylesheets&&Jl(e,e.stylesheets),e.unsuspend){var g=e.unsuspend;e.unsuspend=null,g()}},6e4+a);0<e.imgBytes&&au===0&&(au=62500*pp());var p=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Jl(e,e.stylesheets),e.unsuspend)){var g=e.unsuspend;e.unsuspend=null,g()}},(e.imgBytes>au?50:800)+a);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(f),clearTimeout(p)}}:null}function Ql(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Jl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Wl=null;function Jl(e,a){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Wl=new Map,a.forEach(Lp,e),Wl=null,Ql.call(e))}function Lp(e,a){if(!(a.state.loading&4)){var s=Wl.get(e);if(s)var f=s.get(null);else{s=new Map,Wl.set(e,s);for(var p=e.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<p.length;g++){var x=p[g];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(s.set(x.dataset.precedence,x),f=x)}f&&s.set(null,f)}p=a.instance,x=p.getAttribute("data-precedence"),g=s.get(x)||f,g===f&&s.set(null,p),s.set(x,p),this.count++,f=Ql.bind(this),p.addEventListener("load",f),p.addEventListener("error",f),g?g.parentNode.insertBefore(p,g.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(p,e.firstChild)),a.state.loading|=4}}var Pr={$$typeof:U,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function Bp(e,a,s,f,p,g,x,A,P){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Jn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jn(0),this.hiddenUpdates=Jn(null),this.identifierPrefix=f,this.onUncaughtError=p,this.onCaughtError=g,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=P,this.incompleteTransitions=new Map}function Od(e,a,s,f,p,g,x,A,P,Z,se,he){return e=new Bp(e,a,s,x,P,Z,se,he,A),a=1,g===!0&&(a|=24),g=Gn(3,null,null,a),e.current=g,g.stateNode=e,a=Ls(),a.refCount++,e.pooledCache=a,a.refCount++,g.memoizedState={element:f,isDehydrated:s,cache:a},Is(g),e}function wd(e){return e?(e=Mi,e):Mi}function Nd(e,a,s,f,p,g){p=wd(p),f.context===null?f.context=p:f.pendingContext=p,f=Fa(a),f.payload={element:s},g=g===void 0?null:g,g!==null&&(f.callback=g),s=Xa(e,f,a),s!==null&&(In(s,e,a),Er(s,e,a))}function Md(e,a){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<a?s:a}}function iu(e,a){Md(e,a),(e=e.alternate)&&Md(e,a)}function jd(e){if(e.tag===13||e.tag===31){var a=hi(e,67108864);a!==null&&In(a,e,67108864),iu(e,67108864)}}function Dd(e){if(e.tag===13||e.tag===31){var a=Qn();a=Kt(a);var s=hi(e,a);s!==null&&In(s,e,a),iu(e,a)}}var Zl=!0;function zp(e,a,s,f){var p=F.T;F.T=null;var g=ce.p;try{ce.p=2,ru(e,a,s,f)}finally{ce.p=g,F.T=p}}function Up(e,a,s,f){var p=F.T;F.T=null;var g=ce.p;try{ce.p=8,ru(e,a,s,f)}finally{ce.p=g,F.T=p}}function ru(e,a,s,f){if(Zl){var p=lu(f);if(p===null)Fo(e,a,f,$l,s),Ld(e,f);else if(Hp(p,e,a,s,f))f.stopPropagation();else if(Ld(e,f),a&4&&-1<Ip.indexOf(e)){for(;p!==null;){var g=ge(p);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var x=_t(g.pendingLanes);if(x!==0){var A=g;for(A.pendingLanes|=2,A.entangledLanes|=2;x;){var P=1<<31-pt(x);A.entanglements[1]|=P,x&=~P}ma(g),(mt&6)===0&&(Ll=we()+500,Br(0))}}break;case 31:case 13:A=hi(g,2),A!==null&&In(A,g,2),zl(),iu(g,2)}if(g=lu(f),g===null&&Fo(e,a,f,$l,s),g===p)break;p=g}p!==null&&f.stopPropagation()}else Fo(e,a,f,null,s)}}function lu(e){return e=os(e),su(e)}var $l=null;function su(e){if($l=null,e=me(e),e!==null){var a=m(e);if(a===null)e=null;else{var s=a.tag;if(s===13){if(e=y(a),e!==null)return e;e=null}else if(s===31){if(e=_(a),e!==null)return e;e=null}else if(s===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;e=null}else a!==e&&(e=null)}}return $l=e,null}function kd(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ct()){case Dt:return 2;case kt:return 8;case Lt:case mn:return 32;case Tn:return 268435456;default:return 32}default:return 32}}var ou=!1,ai=null,ii=null,ri=null,Vr=new Map,Gr=new Map,li=[],Ip="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ld(e,a){switch(e){case"focusin":case"focusout":ai=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":ri=null;break;case"pointerover":case"pointerout":Vr.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gr.delete(a.pointerId)}}function Fr(e,a,s,f,p,g){return e===null||e.nativeEvent!==g?(e={blockedOn:a,domEventName:s,eventSystemFlags:f,nativeEvent:g,targetContainers:[p]},a!==null&&(a=ge(a),a!==null&&jd(a)),e):(e.eventSystemFlags|=f,a=e.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),e)}function Hp(e,a,s,f,p){switch(a){case"focusin":return ai=Fr(ai,e,a,s,f,p),!0;case"dragenter":return ii=Fr(ii,e,a,s,f,p),!0;case"mouseover":return ri=Fr(ri,e,a,s,f,p),!0;case"pointerover":var g=p.pointerId;return Vr.set(g,Fr(Vr.get(g)||null,e,a,s,f,p)),!0;case"gotpointercapture":return g=p.pointerId,Gr.set(g,Fr(Gr.get(g)||null,e,a,s,f,p)),!0}return!1}function Bd(e){var a=me(e.target);if(a!==null){var s=m(a);if(s!==null){if(a=s.tag,a===13){if(a=y(s),a!==null){e.blockedOn=a,Pt(e.priority,function(){Dd(s)});return}}else if(a===31){if(a=_(s),a!==null){e.blockedOn=a,Pt(e.priority,function(){Dd(s)});return}}else if(a===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function es(e){if(e.blockedOn!==null)return!1;for(var a=e.targetContainers;0<a.length;){var s=lu(e.nativeEvent);if(s===null){s=e.nativeEvent;var f=new s.constructor(s.type,s);ss=f,s.target.dispatchEvent(f),ss=null}else return a=ge(s),a!==null&&jd(a),e.blockedOn=s,!1;a.shift()}return!0}function zd(e,a,s){es(e)&&s.delete(a)}function qp(){ou=!1,ai!==null&&es(ai)&&(ai=null),ii!==null&&es(ii)&&(ii=null),ri!==null&&es(ri)&&(ri=null),Vr.forEach(zd),Gr.forEach(zd)}function ts(e,a){e.blockedOn===a&&(e.blockedOn=null,ou||(ou=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,qp)))}var ns=null;function Ud(e){ns!==e&&(ns=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ns===e&&(ns=null);for(var a=0;a<e.length;a+=3){var s=e[a],f=e[a+1],p=e[a+2];if(typeof f!="function"){if(su(f||s)===null)continue;break}var g=ge(s);g!==null&&(e.splice(a,3),a-=3,ro(g,{pending:!0,data:p,method:s.method,action:f},f,p))}}))}function tr(e){function a(P){return ts(P,e)}ai!==null&&ts(ai,e),ii!==null&&ts(ii,e),ri!==null&&ts(ri,e),Vr.forEach(a),Gr.forEach(a);for(var s=0;s<li.length;s++){var f=li[s];f.blockedOn===e&&(f.blockedOn=null)}for(;0<li.length&&(s=li[0],s.blockedOn===null);)Bd(s),s.blockedOn===null&&li.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(f=0;f<s.length;f+=3){var p=s[f],g=s[f+1],x=p[qe]||null;if(typeof g=="function")x||Ud(s);else if(x){var A=null;if(g&&g.hasAttribute("formAction")){if(p=g,x=g[qe]||null)A=x.formAction;else if(su(p)!==null)continue}else A=x.action;typeof A=="function"?s[f+1]=A:(s.splice(f,3),f-=3),Ud(s)}}}function Id(){function e(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(x){return p=x})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),f||setTimeout(s,20)}function s(){if(!f&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var f=!1,p=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(s,100),function(){f=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function uu(e){this._internalRoot=e}as.prototype.render=uu.prototype.render=function(e){var a=this._internalRoot;if(a===null)throw Error(u(409));var s=a.current,f=Qn();Nd(s,f,e,a,null,null)},as.prototype.unmount=uu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var a=e.containerInfo;Nd(e.current,2,null,e,null,null),zl(),a[Vt]=null}};function as(e){this._internalRoot=e}as.prototype.unstable_scheduleHydration=function(e){if(e){var a=Qt();e={blockedOn:null,target:e,priority:a};for(var s=0;s<li.length&&a!==0&&a<li[s].priority;s++);li.splice(s,0,e),s===0&&Bd(e)}};var Hd=i.version;if(Hd!=="19.2.3")throw Error(u(527,Hd,"19.2.3"));ce.findDOMNode=function(e){var a=e._reactInternals;if(a===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=E(a),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var Pp={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var rs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rs.isDisabled&&rs.supportsFiber)try{hn=rs.inject(Pp),gt=rs}catch{}}return reactDomClient_production.createRoot=function(e,a){if(!h(e))throw Error(u(299));var s=!1,f="",p=Xc,g=Yc,x=Kc;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError)),a=Od(e,1,!1,null,null,s,f,null,p,g,x,Id),e[Vt]=a.current,Go(e),new uu(a)},reactDomClient_production.hydrateRoot=function(e,a,s){if(!h(e))throw Error(u(299));var f=!1,p="",g=Xc,x=Yc,A=Kc,P=null;return s!=null&&(s.unstable_strictMode===!0&&(f=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(x=s.onCaughtError),s.onRecoverableError!==void 0&&(A=s.onRecoverableError),s.formState!==void 0&&(P=s.formState)),a=Od(e,1,!0,a,s??null,f,p,P,g,x,A,Id),a.context=wd(null),s=a.current,f=Qn(),f=Kt(f),p=Fa(f),p.callback=null,Xa(s,p,f),s=f,a.current.lanes=s,jn(a,s),ma(a),e[Vt]=a.current,Go(e),new as(a)},reactDomClient_production.version="19.2.3",reactDomClient_production}var hasRequiredClient;function requireClient(){if(hasRequiredClient)return client.exports;hasRequiredClient=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),client.exports=requireReactDomClient_production(),client.exports}var clientExports=requireClient(),reactExports=requireReact();const React=getDefaultExportFromCjs(reactExports);var withSelector={exports:{}},useSyncExternalStoreWithSelector_production={};var hasRequiredUseSyncExternalStoreWithSelector_production;function requireUseSyncExternalStoreWithSelector_production(){if(hasRequiredUseSyncExternalStoreWithSelector_production)return useSyncExternalStoreWithSelector_production;hasRequiredUseSyncExternalStoreWithSelector_production=1;var n=requireReact();function i(v,E){return v===E&&(v!==0||1/v===1/E)||v!==v&&E!==E}var o=typeof Object.is=="function"?Object.is:i,u=n.useSyncExternalStore,h=n.useRef,m=n.useEffect,y=n.useMemo,_=n.useDebugValue;return useSyncExternalStoreWithSelector_production.useSyncExternalStoreWithSelector=function(v,E,S,w,T){var R=h(null);if(R.current===null){var D={hasValue:!1,value:null};R.current=D}else D=R.current;R=y(function(){function M(Y){if(!L){if(L=!0,z=Y,Y=w(Y),T!==void 0&&D.hasValue){var K=D.value;if(T(K,Y))return U=K}return U=Y}if(K=U,o(z,Y))return K;var $=w(Y);return T!==void 0&&T(K,$)?(z=Y,K):(z=Y,U=$)}var L=!1,z,U,H=S===void 0?null:S;return[function(){return M(E())},H===null?void 0:function(){return M(H())}]},[E,S,w,T]);var N=u(v,R[0],R[1]);return m(function(){D.hasValue=!0,D.value=N},[N]),_(N),N},useSyncExternalStoreWithSelector_production}var hasRequiredWithSelector;function requireWithSelector(){return hasRequiredWithSelector||(hasRequiredWithSelector=1,withSelector.exports=requireUseSyncExternalStoreWithSelector_production()),withSelector.exports}var withSelectorExports=requireWithSelector(),IS_REACT_19=reactExports.version.startsWith("19"),REACT_ELEMENT_TYPE=Symbol.for(IS_REACT_19?"react.transitional.element":"react.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_CONSUMER_TYPE=Symbol.for("react.consumer"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),ForwardRef=REACT_FORWARD_REF_TYPE,Memo=REACT_MEMO_TYPE;function typeOf(n){if(typeof n=="object"&&n!==null){const{$$typeof:i}=n;switch(i){case REACT_ELEMENT_TYPE:switch(n=n.type,n){case REACT_FRAGMENT_TYPE:case REACT_PROFILER_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_SUSPENSE_TYPE:case REACT_SUSPENSE_LIST_TYPE:return n;default:switch(n=n&&n.$$typeof,n){case REACT_CONTEXT_TYPE:case REACT_FORWARD_REF_TYPE:case REACT_LAZY_TYPE:case REACT_MEMO_TYPE:return n;case REACT_CONSUMER_TYPE:return n;default:return i}}case REACT_PORTAL_TYPE:return i}}}function isMemo(n){return typeOf(n)===REACT_MEMO_TYPE}function pureFinalPropsSelectorFactory(n,i,o,u,{areStatesEqual:h,areOwnPropsEqual:m,areStatePropsEqual:y}){let _=!1,v,E,S,w,T;function R(z,U){return v=z,E=U,S=n(v,E),w=i(u,E),T=o(S,w,E),_=!0,T}function D(){return S=n(v,E),i.dependsOnOwnProps&&(w=i(u,E)),T=o(S,w,E),T}function N(){return n.dependsOnOwnProps&&(S=n(v,E)),i.dependsOnOwnProps&&(w=i(u,E)),T=o(S,w,E),T}function M(){const z=n(v,E),U=!y(z,S);return S=z,U&&(T=o(S,w,E)),T}function L(z,U){const H=!m(U,E),Y=!h(z,v,U,E);return v=z,E=U,H&&Y?D():H?N():Y?M():T}return function(U,H){return _?L(U,H):R(U,H)}}function finalPropsSelectorFactory(n,{initMapStateToProps:i,initMapDispatchToProps:o,initMergeProps:u,...h}){const m=i(n,h),y=o(n,h),_=u(n,h);return pureFinalPropsSelectorFactory(m,y,_,n,h)}function bindActionCreators(n,i){const o={};for(const u in n){const h=n[u];typeof h=="function"&&(o[u]=(...m)=>i(h(...m)))}return o}function wrapMapToPropsConstant(n){return function(o){const u=n(o);function h(){return u}return h.dependsOnOwnProps=!1,h}}function getDependsOnOwnProps(n){return n.dependsOnOwnProps?!!n.dependsOnOwnProps:n.length!==1}function wrapMapToPropsFunc(n,i){return function(u,{displayName:h}){const m=function(_,v){return m.dependsOnOwnProps?m.mapToProps(_,v):m.mapToProps(_,void 0)};return m.dependsOnOwnProps=!0,m.mapToProps=function(_,v){m.mapToProps=n,m.dependsOnOwnProps=getDependsOnOwnProps(n);let E=m(_,v);return typeof E=="function"&&(m.mapToProps=E,m.dependsOnOwnProps=getDependsOnOwnProps(E),E=m(_,v)),E},m}}function createInvalidArgFactory(n,i){return(o,u)=>{throw new Error(`Invalid value of type ${typeof n} for ${i} argument when connecting component ${u.wrappedComponentName}.`)}}function mapDispatchToPropsFactory(n){return n&&typeof n=="object"?wrapMapToPropsConstant(i=>bindActionCreators(n,i)):n?typeof n=="function"?wrapMapToPropsFunc(n):createInvalidArgFactory(n,"mapDispatchToProps"):wrapMapToPropsConstant(i=>({dispatch:i}))}function mapStateToPropsFactory(n){return n?typeof n=="function"?wrapMapToPropsFunc(n):createInvalidArgFactory(n,"mapStateToProps"):wrapMapToPropsConstant(()=>({}))}function defaultMergeProps(n,i,o){return{...o,...n,...i}}function wrapMergePropsFunc(n){return function(o,{displayName:u,areMergedPropsEqual:h}){let m=!1,y;return function(v,E,S){const w=n(v,E,S);return m?h(w,y)||(y=w):(m=!0,y=w),y}}}function mergePropsFactory(n){return n?typeof n=="function"?wrapMergePropsFunc(n):createInvalidArgFactory(n,"mergeProps"):()=>defaultMergeProps}function defaultNoopBatch(n){n()}function createListenerCollection(){let n=null,i=null;return{clear(){n=null,i=null},notify(){defaultNoopBatch(()=>{let o=n;for(;o;)o.callback(),o=o.next})},get(){const o=[];let u=n;for(;u;)o.push(u),u=u.next;return o},subscribe(o){let u=!0;const h=i={callback:o,next:null,prev:i};return h.prev?h.prev.next=h:n=h,function(){!u||n===null||(u=!1,h.next?h.next.prev=h.prev:i=h.prev,h.prev?h.prev.next=h.next:n=h.next)}}}}var nullListeners={notify(){},get:()=>[]};function createSubscription(n,i){let o,u=nullListeners,h=0,m=!1;function y(N){S();const M=u.subscribe(N);let L=!1;return()=>{L||(L=!0,M(),w())}}function _(){u.notify()}function v(){D.onStateChange&&D.onStateChange()}function E(){return m}function S(){h++,o||(o=i?i.addNestedSub(v):n.subscribe(v),u=createListenerCollection())}function w(){h--,o&&h===0&&(o(),o=void 0,u.clear(),u=nullListeners)}function T(){m||(m=!0,S())}function R(){m&&(m=!1,w())}const D={addNestedSub:y,notifyNestedSubs:_,handleChangeWrapper:v,isSubscribed:E,trySubscribe:T,tryUnsubscribe:R,getListeners:()=>u};return D}var canUseDOM=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",isDOM=canUseDOM(),isRunningInReactNative=()=>typeof navigator<"u"&&navigator.product==="ReactNative",isReactNative$1=isRunningInReactNative(),getUseIsomorphicLayoutEffect=()=>isDOM||isReactNative$1?reactExports.useLayoutEffect:reactExports.useEffect,useIsomorphicLayoutEffect=getUseIsomorphicLayoutEffect();function is$1(n,i){return n===i?n!==0||i!==0||1/n===1/i:n!==n&&i!==i}function shallowEqual(n,i){if(is$1(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;const o=Object.keys(n),u=Object.keys(i);if(o.length!==u.length)return!1;for(let h=0;h<o.length;h++)if(!Object.prototype.hasOwnProperty.call(i,o[h])||!is$1(n[o[h]],i[o[h]]))return!1;return!0}var REACT_STATICS={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},KNOWN_STATICS={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},FORWARD_REF_STATICS={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},MEMO_STATICS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},TYPE_STATICS={[ForwardRef]:FORWARD_REF_STATICS,[Memo]:MEMO_STATICS};function getStatics(n){return isMemo(n)?MEMO_STATICS:TYPE_STATICS[n.$$typeof]||REACT_STATICS}var defineProperty=Object.defineProperty,getOwnPropertyNames=Object.getOwnPropertyNames,getOwnPropertySymbols=Object.getOwnPropertySymbols,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,getPrototypeOf$2=Object.getPrototypeOf,objectPrototype=Object.prototype;function hoistNonReactStatics(n,i){if(typeof i!="string"){if(objectPrototype){const m=getPrototypeOf$2(i);m&&m!==objectPrototype&&hoistNonReactStatics(n,m)}let o=getOwnPropertyNames(i);getOwnPropertySymbols&&(o=o.concat(getOwnPropertySymbols(i)));const u=getStatics(n),h=getStatics(i);for(let m=0;m<o.length;++m){const y=o[m];if(!KNOWN_STATICS[y]&&!(h&&h[y])&&!(u&&u[y])){const _=getOwnPropertyDescriptor$1(i,y);try{defineProperty(n,y,_)}catch{}}}}return n}var ContextKey=Symbol.for("react-redux-context"),gT=typeof globalThis<"u"?globalThis:{};function getContext(){if(!reactExports.createContext)return{};const n=gT[ContextKey]??=new Map;let i=n.get(reactExports.createContext);return i||(i=reactExports.createContext(null),n.set(reactExports.createContext,i)),i}var ReactReduxContext=getContext(),NO_SUBSCRIPTION_ARRAY=[null,null];function useIsomorphicLayoutEffectWithArgs(n,i,o){useIsomorphicLayoutEffect(()=>n(...i),o)}function captureWrapperProps(n,i,o,u,h,m){n.current=u,o.current=!1,h.current&&(h.current=null,m())}function subscribeUpdates(n,i,o,u,h,m,y,_,v,E,S){if(!n)return()=>{};let w=!1,T=null;const R=()=>{if(w||!_.current)return;const N=i.getState();let M,L;try{M=u(N,h.current)}catch(z){L=z,T=z}L||(T=null),M===m.current?y.current||E():(m.current=M,v.current=M,y.current=!0,S())};return o.onStateChange=R,o.trySubscribe(),R(),()=>{if(w=!0,o.tryUnsubscribe(),o.onStateChange=null,T)throw T}}function strictEqual(n,i){return n===i}function connect$1(n,i,o,{pure:u,areStatesEqual:h=strictEqual,areOwnPropsEqual:m=shallowEqual,areStatePropsEqual:y=shallowEqual,areMergedPropsEqual:_=shallowEqual,forwardRef:v=!1,context:E=ReactReduxContext}={}){const S=E,w=mapStateToPropsFactory(n),T=mapDispatchToPropsFactory(i),R=mergePropsFactory(o),D=!!n;return M=>{const L=M.displayName||M.name||"Component",z=`Connect(${L})`,U={shouldHandleStateChanges:D,displayName:z,wrappedComponentName:L,WrappedComponent:M,initMapStateToProps:w,initMapDispatchToProps:T,initMergeProps:R,areStatesEqual:h,areStatePropsEqual:y,areOwnPropsEqual:m,areMergedPropsEqual:_};function H($){const[Q,ne,fe]=reactExports.useMemo(()=>{const{reactReduxForwardedRef:Ye,...ot}=$;return[$.context,Ye,ot]},[$]),W=reactExports.useMemo(()=>{let Ye=S;return Q?.Consumer,Ye},[Q,S]),le=reactExports.useContext(W),be=!!$.store&&!!$.store.getState&&!!$.store.dispatch,ve=!!le&&!!le.store,_e=be?$.store:le.store,F=ve?le.getServerState:_e.getState,ce=reactExports.useMemo(()=>finalPropsSelectorFactory(_e.dispatch,U),[_e]),[te,Se]=reactExports.useMemo(()=>{if(!D)return NO_SUBSCRIPTION_ARRAY;const Ye=createSubscription(_e,be?void 0:le.subscription),ot=Ye.notifyNestedSubs.bind(Ye);return[Ye,ot]},[_e,be,le]),xe=reactExports.useMemo(()=>be?le:{...le,subscription:te},[be,le,te]),q=reactExports.useRef(void 0),ie=reactExports.useRef(fe),oe=reactExports.useRef(void 0),Ee=reactExports.useRef(!1),pe=reactExports.useRef(!1),Oe=reactExports.useRef(void 0);useIsomorphicLayoutEffect(()=>(pe.current=!0,()=>{pe.current=!1}),[]);const Te=reactExports.useMemo(()=>()=>oe.current&&fe===ie.current?oe.current:ce(_e.getState(),fe),[_e,fe]),Ie=reactExports.useMemo(()=>ot=>te?subscribeUpdates(D,_e,te,ce,ie,q,Ee,pe,oe,Se,ot):()=>{},[te]);useIsomorphicLayoutEffectWithArgs(captureWrapperProps,[ie,q,Ee,fe,oe,Se]);let je;try{je=reactExports.useSyncExternalStore(Ie,Te,F?()=>ce(F(),fe):Te)}catch(Ye){throw Oe.current&&(Ye.message+=`
10
+ The error may be correlated with this previous error:
11
+ ${Oe.current.stack}
12
+
13
+ `),Ye}useIsomorphicLayoutEffect(()=>{Oe.current=void 0,oe.current=void 0,q.current=je});const Ve=reactExports.useMemo(()=>reactExports.createElement(M,{...je,ref:ne}),[ne,M,je]);return reactExports.useMemo(()=>D?reactExports.createElement(W.Provider,{value:xe},Ve):Ve,[W,Ve,xe])}const K=reactExports.memo(H);if(K.WrappedComponent=M,K.displayName=H.displayName=z,v){const Q=reactExports.forwardRef(function(fe,W){return reactExports.createElement(K,{...fe,reactReduxForwardedRef:W})});return Q.displayName=z,Q.WrappedComponent=M,hoistNonReactStatics(Q,M)}return hoistNonReactStatics(K,M)}}var connect_default=connect$1;function Provider(n){const{children:i,context:o,serverState:u,store:h}=n,m=reactExports.useMemo(()=>{const v=createSubscription(h);return{store:h,subscription:v,getServerState:u?()=>u:void 0}},[h,u]),y=reactExports.useMemo(()=>h.getState(),[h]);useIsomorphicLayoutEffect(()=>{const{subscription:v}=m;return v.onStateChange=v.notifyNestedSubs,v.trySubscribe(),y!==h.getState()&&v.notifyNestedSubs(),()=>{v.tryUnsubscribe(),v.onStateChange=void 0}},[m,y]);const _=o||ReactReduxContext;return reactExports.createElement(_.Provider,{value:m},i)}var Provider_default=Provider;function createReduxContextHook(n=ReactReduxContext){return function(){return reactExports.useContext(n)}}var useReduxContext=createReduxContextHook();function createStoreHook(n=ReactReduxContext){const i=n===ReactReduxContext?useReduxContext:createReduxContextHook(n),o=()=>{const{store:u}=i();return u};return Object.assign(o,{withTypes:()=>o}),o}var useStore=createStoreHook();function createDispatchHook(n=ReactReduxContext){const i=n===ReactReduxContext?useStore:createStoreHook(n),o=()=>i().dispatch;return Object.assign(o,{withTypes:()=>o}),o}var useDispatch=createDispatchHook(),refEquality=(n,i)=>n===i;function createSelectorHook(n=ReactReduxContext){const i=n===ReactReduxContext?useReduxContext:createReduxContextHook(n),o=(u,h={})=>{const{equalityFn:m=refEquality}=typeof h=="function"?{equalityFn:h}:h,y=i(),{store:_,subscription:v,getServerState:E}=y;reactExports.useRef(!0);const S=reactExports.useCallback({[u.name](T){return u(T)}}[u.name],[u]),w=withSelectorExports.useSyncExternalStoreWithSelector(v.addNestedSub,_.getState,E||_.getState,S,m);return reactExports.useDebugValue(w),w};return Object.assign(o,{withTypes:()=>o}),o}var useSelector=createSelectorHook();function r(n){var i,o,u="";if(typeof n=="string"||typeof n=="number")u+=n;else if(typeof n=="object")if(Array.isArray(n)){var h=n.length;for(i=0;i<h;i++)n[i]&&(o=r(n[i]))&&(u&&(u+=" "),u+=o)}else for(o in n)n[o]&&(u&&(u+=" "),u+=o);return u}function clsx(){for(var n,i,o=0,u="",h=arguments.length;o<h;o++)(n=arguments[o])&&(i=r(n))&&(u&&(u+=" "),u+=i);return u}const app="_app_1rj0t_1",styles$o={app},TYPING_ON="core.typing.on",TYPING_OFF="core.typing.off",MESSAGE_FROM_GUEST="core.message.from.guest",MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST="core.message.without.analysis.from.guest",MESSAGE_TO_GUEST="core.message.to.guest",NLU_REQUEST_EVENT="core.nlu.request.event",EVENT_TO_GUEST="core.event.to.guest",RESTART_CHAT_REQUEST="core.chat.restart.request",TRANSCRIPT_MAIL_REQUEST="core.transcript.mail.request",TRANSCRIPT_ITEM_GUEST_REACTION="core.transcript.item.guest.reaction",CONVERSATION_RATING_FROM_GUEST="core.conversation.rating.from.guest",DRAWER_OPEN="core.drawer.open",DRAWER_CLOSE="core.drawer.close",GUEST_LOCALE_CHANGED="core.guest.locale.changed";var ButtonTypeEnum;(function(n){n.WEB_URL="web_url",n.POSTBACK="postback"})(ButtonTypeEnum||(ButtonTypeEnum={}));var SatisfactionEnum;(function(n){n.GOOD="GOOD",n.BAD="BAD"})(SatisfactionEnum||(SatisfactionEnum={}));let Message$2=class{type;sender;sources;quickReplies;constructor(i,o,u=[],h=[]){this.type=i,this.sender=o,this.sources=u,this.quickReplies=h}addQuickReply(i,o){this.quickReplies.push({label:i,payload:o})}},TextMessage$1=class extends Message$2{text;constructor(i,o,u=[],h=[]){super(MessageTypeEnum.TEXT,o,u,h),this.text=i}};var MessageTypeEnum;(function(n){n.TEXT="TEXT",n.DETAIL="DETAIL",n.MARKDOWN="MARKDOWN",n.VIDEO="VIDEO",n.IMAGE="IMAGE",n.FILE="FILE",n.AUDIO="AUDIO"})(MessageTypeEnum||(MessageTypeEnum={}));class User{type;id;name;avatar;constructor(i,o,u,h){this.type=i,this.id=o,this.name=u,this.avatar=h}}class BotUser extends User{constructor(){super(UserType$1.BOT,null,"Chatbot","bot.svg")}}class GuestUser extends User{constructor(){super(UserType$1.GUEST,null,"Guest","visitor.svg")}}var UserType$1;(function(n){n.GUEST="GUEST",n.BOT="BOT",n.PERSON="PERSON"})(UserType$1||(UserType$1={}));const receiveTextMessageFromGuest=n=>{const i=new TextMessage$1(n,new GuestUser);return{type:MESSAGE_FROM_GUEST,message:i}},receiveTextMessageWithoutAnalysisFromGuest=(n,i={})=>{const o=new TextMessage$1(n,new GuestUser);return{type:MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST,message:o,payload:i}},requestNLUEvent$1=n=>({type:NLU_REQUEST_EVENT,event:n}),transcriptItemGuestReaction=(n,i,o=null,u=null)=>({type:TRANSCRIPT_ITEM_GUEST_REACTION,payload:{actionId:n,reaction:i,category:o,comment:u}}),handleQuickReplyClick=n=>i=>(n.payload.type!==MESSAGE_FROM_GUEST&&i(receiveTextMessageWithoutAnalysisFromGuest(n.label,n.payload)),i(n.payload)),sendMessageFromUser=n=>(i,o)=>{const{quickReplies:u}=o().chat,h=u.find(m=>n.toLocaleLowerCase().indexOf(m.label.toLocaleLowerCase())>-1);return i(h?handleQuickReplyClick({...h,label:n}):JSON.parse(JSON.stringify(receiveTextMessageFromGuest(n))))},MESSAGE_TO_PARENT_PAGE="MESSAGE_TO_PARENT_PAGE",RESTORE_PREVIOUS_CHAT_MESSAGES="RESTORE_PREVIOUS_CHAT_MESSAGES",AUDIO_MESSAGE_FROM_USER="AUDIO_MESSAGE_FROM_USER",RECEIVE_SPEECH_TRANSCRIPTION="RECEIVE_SPEECH_TRANSCRIPTION",ENABLE_CONVERSATION_RATING="ENABLE_CONVERSATION_RATING",LOAD_SOURCE_INFOS_RESPONSE="LOAD_SOURCE_INFOS_RESPONSE",LOAD_SOURCE_INFOS_ERROR="LOAD_SOURCE_INFOS_ERROR",LOAD_SOURCE_INFOS_REQUEST="LOAD_SOURCE_INFOS_REQUEST",CLOSE_SOURCE_INFOS="CLOSE_SOURCE_INFOS",GET_STARTED="webclient.get.started",EXPAND_WINDOW="webclient.window.expand",CLOSE_WINDOW="webclient.window.close",DOWNLOAD_TRANSCRIPT_PDF="webclient.transcript.pdf.download",INTERNAL_ACTIONS$1=[MESSAGE_TO_PARENT_PAGE,RESTORE_PREVIOUS_CHAT_MESSAGES,AUDIO_MESSAGE_FROM_USER,RECEIVE_SPEECH_TRANSCRIPTION,ENABLE_CONVERSATION_RATING,LOAD_SOURCE_INFOS_REQUEST,CLOSE_SOURCE_INFOS],sendAudioMessageFromUser=n=>({type:AUDIO_MESSAGE_FROM_USER,buffer:n}),receiveSpeechTranscription=n=>({type:RECEIVE_SPEECH_TRANSCRIPTION,transcription:n}),exportTranscript=n=>({type:TRANSCRIPT_MAIL_REQUEST,payload:{parameters:{mailTo:n}}}),downloadTranscriptPdf=()=>({type:DOWNLOAD_TRANSCRIPT_PDF}),enableConversationRating=({rating:n})=>({type:ENABLE_CONVERSATION_RATING,payload:{rating:n}}),handleRatingFromUser=(n,i)=>({type:CONVERSATION_RATING_FROM_GUEST,payload:{value:n,feedback:i}}),requestNLUEvent=n=>requestNLUEvent$1(n),restorePreviousChatMessages=n=>({type:RESTORE_PREVIOUS_CHAT_MESSAGES,messages:n}),handleButtonClick=n=>{switch(n.type){case ButtonTypeEnum.WEB_URL:return notifyParentToChangePath(n.url);case ButtonTypeEnum.POSTBACK:return n.payload;default:throw new Error(`unknown button type ${n.type}`)}},handleLinkClick=n=>notifyParentToChangePath(n),notifyParentToChangePath=n=>({type:MESSAGE_TO_PARENT_PAGE,message:{type:"webclient.change.url",url:n}});function assign(n){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var u in o)n[u]=o[u]}return n}var defaultConverter={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 init(n,i){function o(h,m,y){if(!(typeof document>"u")){y=assign({},i,y),typeof y.expires=="number"&&(y.expires=new Date(Date.now()+y.expires*864e5)),y.expires&&(y.expires=y.expires.toUTCString()),h=encodeURIComponent(h).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var _="";for(var v in y)y[v]&&(_+="; "+v,y[v]!==!0&&(_+="="+y[v].split(";")[0]));return document.cookie=h+"="+n.write(m,h)+_}}function u(h){if(!(typeof document>"u"||arguments.length&&!h)){for(var m=document.cookie?document.cookie.split("; "):[],y={},_=0;_<m.length;_++){var v=m[_].split("="),E=v.slice(1).join("=");try{var S=decodeURIComponent(v[0]);if(y[S]=n.read(E,S),h===S)break}catch{}}return h?y[h]:y}}return Object.create({set:o,get:u,remove:function(h,m){o(h,"",assign({},m,{expires:-1}))},withAttributes:function(h){return init(this.converter,assign({},this.attributes,h))},withConverter:function(h){return init(assign({},this.converter,h),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(n)}})}var api=init(defaultConverter,{path:"/"});const byteToHex=[];for(let n=0;n<256;++n)byteToHex.push((n+256).toString(16).slice(1));function unsafeStringify(n,i=0){return(byteToHex[n[i+0]]+byteToHex[n[i+1]]+byteToHex[n[i+2]]+byteToHex[n[i+3]]+"-"+byteToHex[n[i+4]]+byteToHex[n[i+5]]+"-"+byteToHex[n[i+6]]+byteToHex[n[i+7]]+"-"+byteToHex[n[i+8]]+byteToHex[n[i+9]]+"-"+byteToHex[n[i+10]]+byteToHex[n[i+11]]+byteToHex[n[i+12]]+byteToHex[n[i+13]]+byteToHex[n[i+14]]+byteToHex[n[i+15]]).toLowerCase()}let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");getRandomValues=crypto.getRandomValues.bind(crypto)}return getRandomValues(rnds8)}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function _v4(n,i,o){n=n||{};const u=n.random??n.rng?.()??rng();if(u.length<16)throw new Error("Random bytes length must be >= 16");return u[6]=u[6]&15|64,u[8]=u[8]&63|128,unsafeStringify(u)}function v4(n,i,o){return native.randomUUID&&!n?native.randomUUID():_v4(n)}const getClientName=()=>extractClientNameFromPathname(window.location.pathname),extractClientNameFromPathname=n=>{const i=n.split("/"),o=n.endsWith("/");return i[i.length-(o?2:1)]};function formatProdErrorMessage$1(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 $$observable=typeof Symbol=="function"&&Symbol.observable||"@@observable",symbol_observable_default=$$observable,randomString$1=()=>Math.random().toString(36).substring(7).split("").join("."),ActionTypes={INIT:`@@redux/INIT${randomString$1()}`,REPLACE:`@@redux/REPLACE${randomString$1()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString$1()}`},actionTypes_default=ActionTypes;function isPlainObject$1(n){if(typeof n!="object"||n===null)return!1;let i=n;for(;Object.getPrototypeOf(i)!==null;)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(n)===i||Object.getPrototypeOf(n)===null}function createStore(n,i,o){if(typeof n!="function")throw new Error(formatProdErrorMessage$1(2));if(typeof i=="function"&&typeof o=="function"||typeof o=="function"&&typeof arguments[3]=="function")throw new Error(formatProdErrorMessage$1(0));if(typeof i=="function"&&typeof o>"u"&&(o=i,i=void 0),typeof o<"u"){if(typeof o!="function")throw new Error(formatProdErrorMessage$1(1));return o(createStore)(n,i)}let u=n,h=i,m=new Map,y=m,_=0,v=!1;function E(){y===m&&(y=new Map,m.forEach((M,L)=>{y.set(L,M)}))}function S(){if(v)throw new Error(formatProdErrorMessage$1(3));return h}function w(M){if(typeof M!="function")throw new Error(formatProdErrorMessage$1(4));if(v)throw new Error(formatProdErrorMessage$1(5));let L=!0;E();const z=_++;return y.set(z,M),function(){if(L){if(v)throw new Error(formatProdErrorMessage$1(6));L=!1,E(),y.delete(z),m=null}}}function T(M){if(!isPlainObject$1(M))throw new Error(formatProdErrorMessage$1(7));if(typeof M.type>"u")throw new Error(formatProdErrorMessage$1(8));if(typeof M.type!="string")throw new Error(formatProdErrorMessage$1(17));if(v)throw new Error(formatProdErrorMessage$1(9));try{v=!0,h=u(h,M)}finally{v=!1}return(m=y).forEach(z=>{z()}),M}function R(M){if(typeof M!="function")throw new Error(formatProdErrorMessage$1(10));u=M,T({type:actionTypes_default.REPLACE})}function D(){const M=w;return{subscribe(L){if(typeof L!="object"||L===null)throw new Error(formatProdErrorMessage$1(11));function z(){const H=L;H.next&&H.next(S())}return z(),{unsubscribe:M(z)}},[symbol_observable_default](){return this}}}return T({type:actionTypes_default.INIT}),{dispatch:T,subscribe:w,getState:S,replaceReducer:R,[symbol_observable_default]:D}}function assertReducerShape(n){Object.keys(n).forEach(i=>{const o=n[i];if(typeof o(void 0,{type:actionTypes_default.INIT})>"u")throw new Error(formatProdErrorMessage$1(12));if(typeof o(void 0,{type:actionTypes_default.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(formatProdErrorMessage$1(13))})}function combineReducers(n){const i=Object.keys(n),o={};for(let m=0;m<i.length;m++){const y=i[m];typeof n[y]=="function"&&(o[y]=n[y])}const u=Object.keys(o);let h;try{assertReducerShape(o)}catch(m){h=m}return function(y={},_){if(h)throw h;let v=!1;const E={};for(let S=0;S<u.length;S++){const w=u[S],T=o[w],R=y[w],D=T(R,_);if(typeof D>"u")throw _&&_.type,new Error(formatProdErrorMessage$1(14));E[w]=D,v=v||D!==R}return v=v||u.length!==Object.keys(y).length,v?E:y}}function compose(...n){return n.length===0?i=>i:n.length===1?n[0]:n.reduce((i,o)=>(...u)=>i(o(...u)))}function applyMiddleware(...n){return i=>(o,u)=>{const h=i(o,u);let m=()=>{throw new Error(formatProdErrorMessage$1(15))};const y={getState:h.getState,dispatch:(v,...E)=>m(v,...E)},_=n.map(v=>v(y));return m=compose(..._)(h.dispatch),{...h,dispatch:m}}}function isAction(n){return isPlainObject$1(n)&&"type"in n&&typeof n.type=="string"}var NOTHING=Symbol.for("immer-nothing"),DRAFTABLE=Symbol.for("immer-draftable"),DRAFT_STATE=Symbol.for("immer-state");function die(n,...i){throw new Error(`[Immer] minified error nr: ${n}. Full error at: https://bit.ly/3cXEKWf`)}var O$1=Object,getPrototypeOf$1=O$1.getPrototypeOf,CONSTRUCTOR="constructor",PROTOTYPE="prototype",CONFIGURABLE="configurable",ENUMERABLE="enumerable",WRITABLE="writable",VALUE="value",isDraft=n=>!!n&&!!n[DRAFT_STATE];function isDraftable(n){return n?isPlainObject(n)||isArray(n)||!!n[DRAFTABLE]||!!n[CONSTRUCTOR]?.[DRAFTABLE]||isMap(n)||isSet(n):!1}var objectCtorString=O$1[PROTOTYPE][CONSTRUCTOR].toString(),cachedCtorStrings=new WeakMap;function isPlainObject(n){if(!n||!isObjectish(n))return!1;const i=getPrototypeOf$1(n);if(i===null||i===O$1[PROTOTYPE])return!0;const o=O$1.hasOwnProperty.call(i,CONSTRUCTOR)&&i[CONSTRUCTOR];if(o===Object)return!0;if(!isFunction(o))return!1;let u=cachedCtorStrings.get(o);return u===void 0&&(u=Function.toString.call(o),cachedCtorStrings.set(o,u)),u===objectCtorString}function each(n,i,o=!0){getArchtype(n)===0?(o?Reflect.ownKeys(n):O$1.keys(n)).forEach(h=>{i(h,n[h],n)}):n.forEach((u,h)=>i(h,u,n))}function getArchtype(n){const i=n[DRAFT_STATE];return i?i.type_:isArray(n)?1:isMap(n)?2:isSet(n)?3:0}var has=(n,i,o=getArchtype(n))=>o===2?n.has(i):O$1[PROTOTYPE].hasOwnProperty.call(n,i),get=(n,i,o=getArchtype(n))=>o===2?n.get(i):n[i],set=(n,i,o,u=getArchtype(n))=>{u===2?n.set(i,o):u===3?n.add(o):n[i]=o};function is(n,i){return n===i?n!==0||1/n===1/i:n!==n&&i!==i}var isArray=Array.isArray,isMap=n=>n instanceof Map,isSet=n=>n instanceof Set,isObjectish=n=>typeof n=="object",isFunction=n=>typeof n=="function",isBoolean$1=n=>typeof n=="boolean";function isArrayIndex(n){const i=+n;return Number.isInteger(i)&&String(i)===n}var latest=n=>n.copy_||n.base_,getFinalValue=n=>n.modified_?n.copy_:n.base_;function shallowCopy(n,i){if(isMap(n))return new Map(n);if(isSet(n))return new Set(n);if(isArray(n))return Array[PROTOTYPE].slice.call(n);const o=isPlainObject(n);if(i===!0||i==="class_only"&&!o){const u=O$1.getOwnPropertyDescriptors(n);delete u[DRAFT_STATE];let h=Reflect.ownKeys(u);for(let m=0;m<h.length;m++){const y=h[m],_=u[y];_[WRITABLE]===!1&&(_[WRITABLE]=!0,_[CONFIGURABLE]=!0),(_.get||_.set)&&(u[y]={[CONFIGURABLE]:!0,[WRITABLE]:!0,[ENUMERABLE]:_[ENUMERABLE],[VALUE]:n[y]})}return O$1.create(getPrototypeOf$1(n),u)}else{const u=getPrototypeOf$1(n);if(u!==null&&o)return{...n};const h=O$1.create(u);return O$1.assign(h,n)}}function freeze$1(n,i=!1){return isFrozen$1(n)||isDraft(n)||!isDraftable(n)||(getArchtype(n)>1&&O$1.defineProperties(n,{set:dontMutateMethodOverride,add:dontMutateMethodOverride,clear:dontMutateMethodOverride,delete:dontMutateMethodOverride}),O$1.freeze(n),i&&each(n,(o,u)=>{freeze$1(u,!0)},!1)),n}function dontMutateFrozenCollections(){die(2)}var dontMutateMethodOverride={[VALUE]:dontMutateFrozenCollections};function isFrozen$1(n){return n===null||!isObjectish(n)?!0:O$1.isFrozen(n)}var PluginMapSet="MapSet",PluginPatches="Patches",PluginArrayMethods="ArrayMethods",plugins={};function getPlugin(n){const i=plugins[n];return i||die(0,n),i}var isPluginLoaded=n=>!!plugins[n],currentScope,getCurrentScope=()=>currentScope,createScope=(n,i)=>({drafts_:[],parent_:n,immer_:i,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:isPluginLoaded(PluginMapSet)?getPlugin(PluginMapSet):void 0,arrayMethodsPlugin_:isPluginLoaded(PluginArrayMethods)?getPlugin(PluginArrayMethods):void 0});function usePatchesInScope(n,i){i&&(n.patchPlugin_=getPlugin(PluginPatches),n.patches_=[],n.inversePatches_=[],n.patchListener_=i)}function revokeScope(n){leaveScope(n),n.drafts_.forEach(revokeDraft),n.drafts_=null}function leaveScope(n){n===currentScope&&(currentScope=n.parent_)}var enterScope=n=>currentScope=createScope(currentScope,n);function revokeDraft(n){const i=n[DRAFT_STATE];i.type_===0||i.type_===1?i.revoke_():i.revoked_=!0}function processResult(n,i){i.unfinalizedDrafts_=i.drafts_.length;const o=i.drafts_[0];if(n!==void 0&&n!==o){o[DRAFT_STATE].modified_&&(revokeScope(i),die(4)),isDraftable(n)&&(n=finalize(i,n));const{patchPlugin_:h}=i;h&&h.generateReplacementPatches_(o[DRAFT_STATE].base_,n,i)}else n=finalize(i,o);return maybeFreeze(i,n,!0),revokeScope(i),i.patches_&&i.patchListener_(i.patches_,i.inversePatches_),n!==NOTHING?n:void 0}function finalize(n,i){if(isFrozen$1(i))return i;const o=i[DRAFT_STATE];if(!o)return handleValue(i,n.handledSet_,n);if(!isSameScope(o,n))return i;if(!o.modified_)return o.base_;if(!o.finalized_){const{callbacks_:u}=o;if(u)for(;u.length>0;)u.pop()(n);generatePatchesAndFinalize(o,n)}return o.copy_}function maybeFreeze(n,i,o=!1){!n.parent_&&n.immer_.autoFreeze_&&n.canAutoFreeze_&&freeze$1(i,o)}function markStateFinalized(n){n.finalized_=!0,n.scope_.unfinalizedDrafts_--}var isSameScope=(n,i)=>n.scope_===i,EMPTY_LOCATIONS_RESULT=[];function updateDraftInParent(n,i,o,u){const h=latest(n),m=n.type_;if(u!==void 0&&get(h,u,m)===i){set(h,u,o,m);return}if(!n.draftLocations_){const _=n.draftLocations_=new Map;each(h,(v,E)=>{if(isDraft(E)){const S=_.get(E)||[];S.push(v),_.set(E,S)}})}const y=n.draftLocations_.get(i)??EMPTY_LOCATIONS_RESULT;for(const _ of y)set(h,_,o,m)}function registerChildFinalizationCallback(n,i,o){n.callbacks_.push(function(h){const m=i;if(!m||!isSameScope(m,h))return;h.mapSetPlugin_?.fixSetContents(m);const y=getFinalValue(m);updateDraftInParent(n,m.draft_??m,y,o),generatePatchesAndFinalize(m,h)})}function generatePatchesAndFinalize(n,i){if(n.modified_&&!n.finalized_&&(n.type_===3||n.type_===1&&n.allIndicesReassigned_||(n.assigned_?.size??0)>0)){const{patchPlugin_:u}=i;if(u){const h=u.getPath(n);h&&u.generatePatches_(n,h,i)}markStateFinalized(n)}}function handleCrossReference(n,i,o){const{scope_:u}=n;if(isDraft(o)){const h=o[DRAFT_STATE];isSameScope(h,u)&&h.callbacks_.push(function(){prepareCopy(n);const y=getFinalValue(h);updateDraftInParent(n,o,y,i)})}else isDraftable(o)&&n.callbacks_.push(function(){const m=latest(n);n.type_===3?m.has(o)&&handleValue(o,u.handledSet_,u):get(m,i,n.type_)===o&&u.drafts_.length>1&&(n.assigned_.get(i)??!1)===!0&&n.copy_&&handleValue(get(n.copy_,i,n.type_),u.handledSet_,u)})}function handleValue(n,i,o){return!o.immer_.autoFreeze_&&o.unfinalizedDrafts_<1||isDraft(n)||i.has(n)||!isDraftable(n)||isFrozen$1(n)||(i.add(n),each(n,(u,h)=>{if(isDraft(h)){const m=h[DRAFT_STATE];if(isSameScope(m,o)){const y=getFinalValue(m);set(n,u,y,n.type_),markStateFinalized(m)}}else isDraftable(h)&&handleValue(h,i,o)})),n}function createProxyProxy(n,i){const o=isArray(n),u={type_:o?1:0,scope_:i?i.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:i,base_:n,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let h=u,m=objectTraps;o&&(h=[u],m=arrayTraps);const{revoke:y,proxy:_}=Proxy.revocable(h,m);return u.draft_=_,u.revoke_=y,[_,u]}var objectTraps={get(n,i){if(i===DRAFT_STATE)return n;let o=n.scope_.arrayMethodsPlugin_;const u=n.type_===1&&typeof i=="string";if(u&&o?.isArrayOperationMethod(i))return o.createMethodInterceptor(n,i);const h=latest(n);if(!has(h,i,n.type_))return readPropFromProto(n,h,i);const m=h[i];if(n.finalized_||!isDraftable(m)||u&&n.operationMethod&&o?.isMutatingArrayMethod(n.operationMethod)&&isArrayIndex(i))return m;if(m===peek(n.base_,i)){prepareCopy(n);const y=n.type_===1?+i:i,_=createProxy(n.scope_,m,n,y);return n.copy_[y]=_}return m},has(n,i){return i in latest(n)},ownKeys(n){return Reflect.ownKeys(latest(n))},set(n,i,o){const u=getDescriptorFromProto(latest(n),i);if(u?.set)return u.set.call(n.draft_,o),!0;if(!n.modified_){const h=peek(latest(n),i),m=h?.[DRAFT_STATE];if(m&&m.base_===o)return n.copy_[i]=o,n.assigned_.set(i,!1),!0;if(is(o,h)&&(o!==void 0||has(n.base_,i,n.type_)))return!0;prepareCopy(n),markChanged(n)}return n.copy_[i]===o&&(o!==void 0||i in n.copy_)||Number.isNaN(o)&&Number.isNaN(n.copy_[i])||(n.copy_[i]=o,n.assigned_.set(i,!0),handleCrossReference(n,i,o)),!0},deleteProperty(n,i){return prepareCopy(n),peek(n.base_,i)!==void 0||i in n.base_?(n.assigned_.set(i,!1),markChanged(n)):n.assigned_.delete(i),n.copy_&&delete n.copy_[i],!0},getOwnPropertyDescriptor(n,i){const o=latest(n),u=Reflect.getOwnPropertyDescriptor(o,i);return u&&{[WRITABLE]:!0,[CONFIGURABLE]:n.type_!==1||i!=="length",[ENUMERABLE]:u[ENUMERABLE],[VALUE]:o[i]}},defineProperty(){die(11)},getPrototypeOf(n){return getPrototypeOf$1(n.base_)},setPrototypeOf(){die(12)}},arrayTraps={};for(let n in objectTraps){let i=objectTraps[n];arrayTraps[n]=function(){const o=arguments;return o[0]=o[0][0],i.apply(this,o)}}arrayTraps.deleteProperty=function(n,i){return arrayTraps.set.call(this,n,i,void 0)};arrayTraps.set=function(n,i,o){return objectTraps.set.call(this,n[0],i,o,n[0])};function peek(n,i){const o=n[DRAFT_STATE];return(o?latest(o):n)[i]}function readPropFromProto(n,i,o){const u=getDescriptorFromProto(i,o);return u?VALUE in u?u[VALUE]:u.get?.call(n.draft_):void 0}function getDescriptorFromProto(n,i){if(!(i in n))return;let o=getPrototypeOf$1(n);for(;o;){const u=Object.getOwnPropertyDescriptor(o,i);if(u)return u;o=getPrototypeOf$1(o)}}function markChanged(n){n.modified_||(n.modified_=!0,n.parent_&&markChanged(n.parent_))}function prepareCopy(n){n.copy_||(n.assigned_=new Map,n.copy_=shallowCopy(n.base_,n.scope_.immer_.useStrictShallowCopy_))}var Immer2=class{constructor(n){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(i,o,u)=>{if(isFunction(i)&&!isFunction(o)){const m=o;o=i;const y=this;return function(v=m,...E){return y.produce(v,S=>o.call(this,S,...E))}}isFunction(o)||die(6),u!==void 0&&!isFunction(u)&&die(7);let h;if(isDraftable(i)){const m=enterScope(this),y=createProxy(m,i,void 0);let _=!0;try{h=o(y),_=!1}finally{_?revokeScope(m):leaveScope(m)}return usePatchesInScope(m,u),processResult(h,m)}else if(!i||!isObjectish(i)){if(h=o(i),h===void 0&&(h=i),h===NOTHING&&(h=void 0),this.autoFreeze_&&freeze$1(h,!0),u){const m=[],y=[];getPlugin(PluginPatches).generateReplacementPatches_(i,h,{patches_:m,inversePatches_:y}),u(m,y)}return h}else die(1,i)},this.produceWithPatches=(i,o)=>{if(isFunction(i))return(y,..._)=>this.produceWithPatches(y,v=>i(v,..._));let u,h;return[this.produce(i,o,(y,_)=>{u=y,h=_}),u,h]},isBoolean$1(n?.autoFreeze)&&this.setAutoFreeze(n.autoFreeze),isBoolean$1(n?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(n.useStrictShallowCopy),isBoolean$1(n?.useStrictIteration)&&this.setUseStrictIteration(n.useStrictIteration)}createDraft(n){isDraftable(n)||die(8),isDraft(n)&&(n=current(n));const i=enterScope(this),o=createProxy(i,n,void 0);return o[DRAFT_STATE].isManual_=!0,leaveScope(i),o}finishDraft(n,i){const o=n&&n[DRAFT_STATE];(!o||!o.isManual_)&&die(9);const{scope_:u}=o;return usePatchesInScope(u,i),processResult(void 0,u)}setAutoFreeze(n){this.autoFreeze_=n}setUseStrictShallowCopy(n){this.useStrictShallowCopy_=n}setUseStrictIteration(n){this.useStrictIteration_=n}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(n,i){let o;for(o=i.length-1;o>=0;o--){const h=i[o];if(h.path.length===0&&h.op==="replace"){n=h.value;break}}o>-1&&(i=i.slice(o+1));const u=getPlugin(PluginPatches).applyPatches_;return isDraft(n)?u(n,i):this.produce(n,h=>u(h,i))}};function createProxy(n,i,o,u){const[h,m]=isMap(i)?getPlugin(PluginMapSet).proxyMap_(i,o):isSet(i)?getPlugin(PluginMapSet).proxySet_(i,o):createProxyProxy(i,o);return(o?.scope_??getCurrentScope()).drafts_.push(h),m.callbacks_=o?.callbacks_??[],m.key_=u,o&&u!==void 0?registerChildFinalizationCallback(o,m,u):m.callbacks_.push(function(v){v.mapSetPlugin_?.fixSetContents(m);const{patchPlugin_:E}=v;m.modified_&&E&&E.generatePatches_(m,[],v)}),h}function current(n){return isDraft(n)||die(10,n),currentImpl(n)}function currentImpl(n){if(!isDraftable(n)||isFrozen$1(n))return n;const i=n[DRAFT_STATE];let o,u=!0;if(i){if(!i.modified_)return i.base_;i.finalized_=!0,o=shallowCopy(n,i.scope_.immer_.useStrictShallowCopy_),u=i.scope_.immer_.shouldUseStrictIteration()}else o=shallowCopy(n,!0);return each(o,(h,m)=>{set(o,h,currentImpl(m))},u),i&&(i.finalized_=!1),o}var immer=new Immer2,produce=immer.produce;function createThunkMiddleware(n){return({dispatch:o,getState:u})=>h=>m=>typeof m=="function"?m(o,u,n):h(m)}var thunk=createThunkMiddleware(),withExtraArgument=createThunkMiddleware,composeWithDevTools=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?compose:compose.apply(null,arguments)};function createAction(n,i){function o(...u){if(i){let h=i(...u);if(!h)throw new Error(formatProdErrorMessage(0));return{type:n,payload:h.payload,..."meta"in h&&{meta:h.meta},..."error"in h&&{error:h.error}}}return{type:n,payload:u[0]}}return o.toString=()=>`${n}`,o.type=n,o.match=u=>isAction(u)&&u.type===n,o}var Tuple=class Xr extends Array{constructor(...i){super(...i),Object.setPrototypeOf(this,Xr.prototype)}static get[Symbol.species](){return Xr}concat(...i){return super.concat.apply(this,i)}prepend(...i){return i.length===1&&Array.isArray(i[0])?new Xr(...i[0].concat(this)):new Xr(...i.concat(this))}};function freezeDraftable(n){return isDraftable(n)?produce(n,()=>{}):n}function getOrInsertComputed(n,i,o){return n.has(i)?n.get(i):n.set(i,o(i)).get(i)}function isBoolean(n){return typeof n=="boolean"}var buildGetDefaultMiddleware=()=>function(i){const{thunk:o=!0,immutableCheck:u=!0,serializableCheck:h=!0,actionCreatorCheck:m=!0}=i??{};let y=new Tuple;return o&&(isBoolean(o)?y.push(thunk):y.push(withExtraArgument(o.extraArgument))),y},SHOULD_AUTOBATCH="RTK_autoBatch",createQueueWithTimer=n=>i=>{setTimeout(i,n)},autoBatchEnhancer=(n={type:"raf"})=>i=>(...o)=>{const u=i(...o);let h=!0,m=!1,y=!1;const _=new Set,v=n.type==="tick"?queueMicrotask:n.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:createQueueWithTimer(10):n.type==="callback"?n.queueNotification:createQueueWithTimer(n.timeout),E=()=>{y=!1,m&&(m=!1,_.forEach(S=>S()))};return Object.assign({},u,{subscribe(S){const w=()=>h&&S(),T=u.subscribe(w);return _.add(S),()=>{T(),_.delete(S)}},dispatch(S){try{return h=!S?.meta?.[SHOULD_AUTOBATCH],m=!h,m&&(y||(y=!0,v(E))),u.dispatch(S)}finally{h=!0}}})},buildGetDefaultEnhancers=n=>function(o){const{autoBatch:u=!0}=o??{};let h=new Tuple(n);return u&&h.push(autoBatchEnhancer(typeof u=="object"?u:void 0)),h};function configureStore(n){const i=buildGetDefaultMiddleware(),{reducer:o=void 0,middleware:u,devTools:h=!0,preloadedState:m=void 0,enhancers:y=void 0}=n||{};let _;if(typeof o=="function")_=o;else if(isPlainObject$1(o))_=combineReducers(o);else throw new Error(formatProdErrorMessage(1));let v;typeof u=="function"?v=u(i):v=i();let E=compose;h&&(E=composeWithDevTools({trace:!1,...typeof h=="object"&&h}));const S=applyMiddleware(...v),w=buildGetDefaultEnhancers(S);let T=typeof y=="function"?y(w):w();const R=E(...T);return createStore(_,m,R)}function executeReducerBuilderCallback(n){const i={},o=[];let u;const h={addCase(m,y){const _=typeof m=="string"?m:m.type;if(!_)throw new Error(formatProdErrorMessage(28));if(_ in i)throw new Error(formatProdErrorMessage(29));return i[_]=y,h},addAsyncThunk(m,y){return y.pending&&(i[m.pending.type]=y.pending),y.rejected&&(i[m.rejected.type]=y.rejected),y.fulfilled&&(i[m.fulfilled.type]=y.fulfilled),y.settled&&o.push({matcher:m.settled,reducer:y.settled}),h},addMatcher(m,y){return o.push({matcher:m,reducer:y}),h},addDefaultCase(m){return u=m,h}};return n(h),[i,o,u]}function isStateFunction(n){return typeof n=="function"}function createReducer(n,i){let[o,u,h]=executeReducerBuilderCallback(i),m;if(isStateFunction(n))m=()=>freezeDraftable(n());else{const _=freezeDraftable(n);m=()=>_}function y(_=m(),v){let E=[o[v.type],...u.filter(({matcher:S})=>S(v)).map(({reducer:S})=>S)];return E.filter(S=>!!S).length===0&&(E=[h]),E.reduce((S,w)=>{if(w)if(isDraft(S)){const R=w(S,v);return R===void 0?S:R}else{if(isDraftable(S))return produce(S,T=>w(T,v));{const T=w(S,v);if(T===void 0){if(S===null)return S;throw Error("A case reducer on a non-draftable value must not return undefined")}return T}}return S},_)}return y.getInitialState=m,y}var asyncThunkSymbol=Symbol.for("rtk-slice-createasyncthunk");function getType(n,i){return`${n}/${i}`}function buildCreateSlice({creators:n}={}){const i=n?.asyncThunk?.[asyncThunkSymbol];return function(u){const{name:h,reducerPath:m=h}=u;if(!h)throw new Error(formatProdErrorMessage(11));const y=(typeof u.reducers=="function"?u.reducers(buildReducerCreators()):u.reducers)||{},_=Object.keys(y),v={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},E={addCase(U,H){const Y=typeof U=="string"?U:U.type;if(!Y)throw new Error(formatProdErrorMessage(12));if(Y in v.sliceCaseReducersByType)throw new Error(formatProdErrorMessage(13));return v.sliceCaseReducersByType[Y]=H,E},addMatcher(U,H){return v.sliceMatchers.push({matcher:U,reducer:H}),E},exposeAction(U,H){return v.actionCreators[U]=H,E},exposeCaseReducer(U,H){return v.sliceCaseReducersByName[U]=H,E}};_.forEach(U=>{const H=y[U],Y={reducerName:U,type:getType(h,U),createNotation:typeof u.reducers=="function"};isAsyncThunkSliceReducerDefinition(H)?handleThunkCaseReducerDefinition(Y,H,E,i):handleNormalReducerDefinition(Y,H,E)});function S(){const[U={},H=[],Y=void 0]=typeof u.extraReducers=="function"?executeReducerBuilderCallback(u.extraReducers):[u.extraReducers],K={...U,...v.sliceCaseReducersByType};return createReducer(u.initialState,$=>{for(let Q in K)$.addCase(Q,K[Q]);for(let Q of v.sliceMatchers)$.addMatcher(Q.matcher,Q.reducer);for(let Q of H)$.addMatcher(Q.matcher,Q.reducer);Y&&$.addDefaultCase(Y)})}const w=U=>U,T=new Map,R=new WeakMap;let D;function N(U,H){return D||(D=S()),D(U,H)}function M(){return D||(D=S()),D.getInitialState()}function L(U,H=!1){function Y($){let Q=$[U];return typeof Q>"u"&&H&&(Q=getOrInsertComputed(R,Y,M)),Q}function K($=w){const Q=getOrInsertComputed(T,H,()=>new WeakMap);return getOrInsertComputed(Q,$,()=>{const ne={};for(const[fe,W]of Object.entries(u.selectors??{}))ne[fe]=wrapSelector(W,$,()=>getOrInsertComputed(R,$,M),H);return ne})}return{reducerPath:U,getSelectors:K,get selectors(){return K(Y)},selectSlice:Y}}const z={name:h,reducer:N,actions:v.actionCreators,caseReducers:v.sliceCaseReducersByName,getInitialState:M,...L(m),injectInto(U,{reducerPath:H,...Y}={}){const K=H??m;return U.inject({reducerPath:K,reducer:N},Y),{...z,...L(K,!0)}}};return z}}function wrapSelector(n,i,o,u){function h(m,...y){let _=i(m);return typeof _>"u"&&u&&(_=o()),n(_,...y)}return h.unwrapped=n,h}var createSlice=buildCreateSlice();function buildReducerCreators(){function n(i,o){return{_reducerDefinitionType:"asyncThunk",payloadCreator:i,...o}}return n.withTypes=()=>n,{reducer(i){return Object.assign({[i.name](...o){return i(...o)}}[i.name],{_reducerDefinitionType:"reducer"})},preparedReducer(i,o){return{_reducerDefinitionType:"reducerWithPrepare",prepare:i,reducer:o}},asyncThunk:n}}function handleNormalReducerDefinition({type:n,reducerName:i,createNotation:o},u,h){let m,y;if("reducer"in u){if(o&&!isCaseReducerWithPrepareDefinition(u))throw new Error(formatProdErrorMessage(17));m=u.reducer,y=u.prepare}else m=u;h.addCase(n,m).exposeCaseReducer(i,m).exposeAction(i,y?createAction(n,y):createAction(n))}function isAsyncThunkSliceReducerDefinition(n){return n._reducerDefinitionType==="asyncThunk"}function isCaseReducerWithPrepareDefinition(n){return n._reducerDefinitionType==="reducerWithPrepare"}function handleThunkCaseReducerDefinition({type:n,reducerName:i},o,u,h){if(!h)throw new Error(formatProdErrorMessage(18));const{payloadCreator:m,fulfilled:y,pending:_,rejected:v,settled:E,options:S}=o,w=h(n,m,S);u.exposeAction(i,w),y&&u.addCase(w.fulfilled,y),_&&u.addCase(w.pending,_),v&&u.addCase(w.rejected,v),E&&u.addMatcher(w.settled,E),u.exposeCaseReducer(i,{fulfilled:y||noop,pending:_||noop,rejected:v||noop,settled:E||noop})}function noop(){}function formatProdErrorMessage(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 initialState$4={formValues:{}},startPageSlice=createSlice({name:"start-screen",initialState:initialState$4,reducers:{showStartScreen(n){n.startScreenStatus="VISIBLE",n.formValues={}},startChat(n,i){n.startScreenStatus="HIDDEN",n.formValues=i.payload.formValues},startAuthenticatedChat(n,i){n.startScreenStatus="HIDDEN",n.loginToken=i.payload.loginToken,n.loginRequestToken=void 0},requestLogin(n,i){n.loginRequestToken=i.payload.loginRequestToken,n.formValues=i.payload.formValues},loginWindowClosed(n){n.loginRequestToken=void 0}}}),{startChat:startChat$1,startAuthenticatedChat,showStartScreen,requestLogin,loginWindowClosed}=startPageSlice.actions,startScreenReducer=startPageSlice.reducer,RESET_CHAT_STATE="RESET_CHAT_STATE",TOGGLE_TRANSCRIPT_MAIL_OVERLAY="TOGGLE_TRANSCRIPT_MAIL_OVERLAY",SHOW_CONVERSATION_RATING_OVERLAY="SHOW_CONVERSATION_RATING_OVERLAY",HIDE_CONVERSATION_RATING_OVERLAY="HIDE_CONVERSATION_RATING_OVERLAY",closeChatWindow=()=>({type:CLOSE_WINDOW}),resetChatState=()=>({type:RESET_CHAT_STATE}),toggleTranscriptMailOverlay=()=>({type:TOGGLE_TRANSCRIPT_MAIL_OVERLAY}),showConversationRatingOverlay=(n,i=void 0)=>({type:SHOW_CONVERSATION_RATING_OVERLAY,payload:{opener:n,defaultRating:i}}),hideConversationRatingOverlay=()=>({type:HIDE_CONVERSATION_RATING_OVERLAY}),loadSourceInfosRequest=(n,i,o)=>(u,h)=>{try{const m=h().connection.sessionId;if(!m)throw new Error("Session ID is not available");u({type:LOAD_SOURCE_INFOS_REQUEST,payload:{chunkId:o}}),fetchSourceInfos(n,m,i,o,!1,u),fetchSourceInfos(n,m,i,o,!0,u)}catch(m){console.error("Error loading source infos:",m),u({type:LOAD_SOURCE_INFOS_ERROR})}},fetchSourceInfos=(n,i,o,u,h,m)=>{const y=`/${n}/me/chat-widget/transcript/${o}/chunks/${u}?highlight=${h}`;fetch(y,{headers:{"x-bubble-chat-session-id":i}}).then(_=>{if(!_.ok)throw new Error(`HTTP error! Status: ${_.status}`);return _.json()}).then(_=>{const v={..._,chunkId:u,highlighted:h};m({type:LOAD_SOURCE_INFOS_RESPONSE,payload:v})}).catch(_=>{console.error("Error fetching source infos:",_),m({type:LOAD_SOURCE_INFOS_ERROR,payload:{highlighted:h}})})},closeSourceInfos=()=>({type:CLOSE_SOURCE_INFOS}),CONNECT="CONNECT",CONNECTING="CONNECTING",CONNECTED="CONNECTED",DISCONNECTED="DISCONNECTED",RECONNECTED="RECONNECTED",RESTORE_SESSION_ID="RESTORE_SESSION_ID",START="START",TERMINATE_SESSION="CLEAR_SESSION_ID",INTERNAL_ACTIONS=[CONNECT,CONNECTING,CONNECTED,DISCONNECTED,RECONNECTED,RESTORE_SESSION_ID],connect=(n,i)=>({type:CONNECT,clientName:n,querystrings:i}),restoreSessionId=n=>({type:RESTORE_SESSION_ID,sessionId:n}),connecting=()=>({type:CONNECTING}),connected=()=>({type:CONNECTED}),disconnected=()=>({type:DISCONNECTED}),reconnected=()=>({type:RECONNECTED}),startChat=n=>(i,o)=>{const u=o().connection,{formValues:h,loginToken:m}=o().startScreen;let y=u.sessionId;y===void 0&&(y=v4());let _=u.userId;if(_===void 0){const S=api.get("bubble-chat-user-id")||api.get("bubble-chat-userId")||api.get("bf-webclient-userId");_=S||v4(),api.set("bubble-chat-user-id",_,{expires:182})}const v=new URLSearchParams(o().connection.queryString||""),E=Object.fromEntries(v.entries());i({type:START,payload:{sessionId:y,userId:_,clientName:n,loginToken:m,querystrings:{...E,...h}}})},restartChat=()=>(n,i)=>{const o=i().connection.sessionId||"";if(n(terminateSession(o)),n(resetChatState()),i().settings.enableStartScreen)n(showStartScreen());else{const u=getClientName();return n(startChat(u))}},terminateSession=n=>({type:TERMINATE_SESSION,payload:{sessionId:n}}),useAppDispatch=useDispatch,useAppSelector=useSelector,useTranslation=()=>{const n=useAppSelector(o=>o.intl.messages);return o=>n[o]||void 0};var ConnectionStateEnum=(n=>(n[n.CONNECTING=0]="CONNECTING",n[n.CONNECTED=1]="CONNECTED",n[n.RECONNECTED=2]="RECONNECTED",n[n.DISCONNECTED=3]="DISCONNECTED",n))(ConnectionStateEnum||{}),UserType=(n=>(n.GUEST="GUEST",n.BOT="BOT",n.PERSON="PERSON",n))(UserType||{});const container$6="_container_q2uun_1",chatcontent="_chatcontent_q2uun_6",accessabilityHidden="_accessabilityHidden_q2uun_12",styles$n={container:container$6,chatcontent,accessabilityHidden},messageContainer$1="_messageContainer_1t640_1",messages="_messages_1t640_13",styles$m={messageContainer:messageContainer$1,messages};var j;function B(n){if(!j)if(typeof document<"u")j=document.createElement("textarea");else return;var i="&"+n+";";j.innerHTML=i;var o=j.value;return o!==i?o:void 0}var C$1={},Z6=Object.defineProperty,G6=(n,i)=>{for(var o in i)Z6(n,o,{get:i[o],enumerable:!0,configurable:!0,set:u=>i[o]=()=>u})},C=32,l=9,V0=13,d=10,t0=96,e1=126,g1=91,D9=94,C1=62,T9=35,D1=45,d1=61,k1=92,S9=42,$9=95,j9=60,E9=64,H9=93,F9=33,x9=38,P9=58,i1=102,c1=104,x1=119,r9=116,B$=112,zZ=115,_Z=160,qZ=12,I9=46,Z9=47,DZ=43,jZ=124,HZ=123,FZ=40,OZ=41,N$=120,y$=88,G9=48,Y9=57,m1=65,h1=90,a1=97,r1=122,K1=128,WZ=32,Y6={blockQuote:0,breakLine:1,breakThematic:2,codeBlock:3,codeInline:4,footnote:5,footnoteReference:6,frontmatter:7,gfmTask:8,heading:9,htmlBlock:10,htmlComment:11,htmlSelfClosing:12,image:13,link:14,orderedList:15,paragraph:16,ref:17,refCollection:18,table:19,text:20,textFormatted:21,unorderedList:22},O=Y6,P$={};G6(P$,{startsWith:()=>c,slugify:()=>J1,skipWhitespace:()=>g0,shouldFilterTag:()=>$$,sanitizer:()=>s1,parseFrontmatterBounds:()=>L$,normalizeInput:()=>p1,normalizeCRLF:()=>j6,isVoidElement:()=>K9,isUnicodeWhitespace:()=>V9,isUnicodePunctuation:()=>t9,isAlnumCode:()=>o9,isASCIIWhitespace:()=>g9,isASCIIPunctuation:()=>_6,inlineCharTypeTable:()=>f9,includes:()=>V6,htmlAttrsToJSXProps:()=>s9,hasKeys:()=>e9,getTag:()=>H6,getOverrideProps:()=>F6,get:()=>x$,findLineEnd:()=>I,extractPlainText:()=>wZ,endsWith:()=>n9,decodeEntityReferences:()=>M9,charClassTable:()=>W9,applyTagFilterToText:()=>Z$,VOID_ELEMENTS:()=>R$,SHOULD_RENDER_AS_BLOCK_R:()=>T$,SANITIZE_R:()=>O9,NAMED_CODES_TO_UNICODE:()=>K6,HTML_TO_JSX_MAP:()=>AZ,HTML_CHAR_CODE_R:()=>vZ,ATTRIBUTES_TO_SANITIZE:()=>S$});function L$(n){if(!c(n,"---"))return null;let i=3;for(;i<n.length&&(n[i]===" "||n[i]===" ");)i++;if(i<n.length&&n[i]==="\r"&&i++,i>=n.length||n[i]!==`
14
+ `)return null;i++;let o=!1;for(;i<n.length;){let u=i;for(;i<n.length&&n[i]!==`
15
+ `&&n[i]!=="\r";)i++;if(i>=n.length)break;let h=i;if(n[i]==="\r"&&i++,i<n.length&&n[i]===`
16
+ `&&i++,c(n,"---",u))return{endPos:i,hasValidYaml:o};let m=n.indexOf(":",u);m!==-1&&m<h&&(o=!0)}return null}var K6=C$1,vZ=/&([a-zA-Z0-9]+|#[0-9]{1,7}|#x[0-9a-fA-F]{1,6});/gi,AZ={class:"className",for:"htmlFor",allowfullscreen:"allowFullScreen",allowtransparency:"allowTransparency",autocomplete:"autoComplete",autofocus:"autoFocus",autoplay:"autoPlay",cellpadding:"cellPadding",cellspacing:"cellSpacing",charset:"charSet",classid:"classId",colspan:"colSpan",contenteditable:"contentEditable",contextmenu:"contextMenu",crossorigin:"crossOrigin",enctype:"encType",formaction:"formAction",formenctype:"formEncType",formmethod:"formMethod",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",hreflang:"hrefLang",inputmode:"inputMode",keyparams:"keyParams",keytype:"keyType",marginheight:"marginHeight",marginwidth:"marginWidth",maxlength:"maxLength",mediagroup:"mediaGroup",minlength:"minLength",novalidate:"noValidate",radiogroup:"radioGroup",readonly:"readOnly",rowspan:"rowSpan",spellcheck:"spellCheck",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",tabindex:"tabIndex",usemap:"useMap"};function s9(n){var i={};for(var o in n){var u=o.toLowerCase(),h=AZ[u];i[h||o]=n[o]}return i}var T$=/(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/;function M9(n){return n.indexOf("&")===-1?n:n.replace(vZ,(i,o)=>{var u=B(o);if(u)return u;if(o[0]==="#"){var h=o[1]==="x"||o[1]==="X"?parseInt(o.slice(2),16):parseInt(o.slice(1),10);return h===0||h>=55296&&h<=57343||h>1114111?"�":h<=65535?String.fromCharCode(h):String.fromCharCode(55296+(h-65536>>10),56320+(h-65536&1023))}return i})}var O9=/(javascript|vbscript|data(?!:image)):/i;function s1(n){if(O9.test(n))return null;if(n.indexOf("%")===-1)return n;try{let i=decodeURIComponent(n).replace(/[^A-Za-z0-9/:]/g,"");if(O9.test(i))return null}catch{return null}return n}var c0={},e0,x0;e0=[192,193,194,195,196,197,224,225,226,227,228,229,230,198];for(x0=0;x0<e0.length;x0++)c0[e0[x0]]="a";c0[231]=c0[199]="c";c0[240]=c0[208]="d";e0=[200,201,202,203,233,232,234,235];for(x0=0;x0<e0.length;x0++)c0[e0[x0]]="e";e0=[207,239,206,238,205,237,204,236];for(x0=0;x0<e0.length;x0++)c0[e0[x0]]="i";c0[209]=c0[241]="n";e0=[248,216,339,338,213,245,212,244,211,243,210,242];for(x0=0;x0<e0.length;x0++)c0[e0[x0]]="o";e0=[220,252,219,251,218,250,217,249];for(x0=0;x0<e0.length;x0++)c0[e0[x0]]="u";c0[376]=c0[255]=c0[221]=c0[253]="y";function o9(n){return n>=G9&&n<=Y9||n>=m1&&n<=h1||n>=a1&&n<=r1}function J1(n){for(var i=[],o=0;o<n.length;o++){var u=n.charCodeAt(o);if(o9(u))u>=m1&&u<=h1?i.push(String.fromCharCode(u+WZ)):i.push(n[o]);else if(u===C||u===D1)i.push("-");else{var h=c0[u];h&&i.push(h)}}return i.join("")}function V6(n,i){return n.indexOf(i)!==-1}function c(n,i,o){return n.startsWith(i,o)}function n9(n,i,o){return n.startsWith(i,(o===void 0?n.length:o)-i.length)}var R$=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr","circle","ellipse","line","path","polygon","polyline","rect","use","stop","animate","animateTransform","set"]);function K9(n){let i=n.toLowerCase();if(R$.has(i))return!0;let o=i.indexOf(":");return o!==-1?(i=i.slice(o+1),R$.has(i)):!1}var S$=["src","href","data","formAction","srcDoc","action"],E$=1,X9=2,MZ=1,U6=2,Q6=3,z6=4,W9=(function(){let n=new Uint8Array(128),i;for(n[l]=n[d]=n[qZ]=n[V0]=n[C]=E$,i=F9;i<=Z9;i++)n[i]=X9;for(i=P9;i<=E9;i++)n[i]=X9;for(i=g1;i<=t0;i++)n[i]=X9;for(i=HZ;i<=e1;i++)n[i]=X9;return n})(),f9=(function(){let n=new Uint8Array(128);return n[k1]=U6,n[g1]=z6,n[S9]=n[$9]=n[e1]=n[d1]=Q6,n[t0]=n[j9]=n[E9]=n[H9]=n[d]=n[C]=n[F9]=MZ,n[i1]=n[c1]=n[x1]=MZ,n})();function _6(n){return n<K1&&(W9[n]&X9)!==0}function g9(n){return n<K1&&(W9[n]&E$)!==0}var q6=/[\p{P}\p{S}]/u,D6=new RegExp("\\p{Zs}","u");function V9(n){if(!n)return!0;let i=n.charCodeAt(0);return i<K1?(W9[i]&E$)!==0:D6.test(n)}function t9(n){if(typeof n=="number")return n<K1&&(W9[n]&X9)!==0;if(!n)return!1;let i=n.charCodeAt(0);return i<K1?(W9[i]&X9)!==0:q6.test(n)}function I(n,i){let o=n.indexOf(`
17
+ `,i);return o===-1?n.length:o>0&&n.charCodeAt(o-1)===V0?o-1:o}var J9=[];function p1(n){var i=n.indexOf("\r"),o=n.indexOf("\0");if(i===-1&&o===-1)return n;var u=n.length;J9.length=0;var h=0,m=0;for(i===-1?m=o:o===-1?m=i:m=i<o?i:o;m<u;m++){var y=n.charCodeAt(m);y===V0?(h<m&&J9.push(n.slice(h,m)),m+1<u&&n.charCodeAt(m+1)===d&&m++,J9.push(`
18
+ `),h=m+1):y===0&&(h<m&&J9.push(n.slice(h,m)),J9.push("�"),h=m+1)}return h<u&&J9.push(n.slice(h)),J9.join("")}function j6(n){return p1(n)}function g0(n,i,o){let u=o??n.length;for(;i<u&&(n[i]===" "||n[i]===" ");)i++;return i}function e9(n){if(!n)return!1;for(var i in n)return!0;return!1}function x$(n,i,o){for(var u=n,h=i.split("."),m=0;m<h.length&&(u=u?.[h[m]],u!==void 0);)m++;return u||o}function H6(n,i){if(!i)return n;let o=x$(i,n,void 0);return typeof o=="string"?o:typeof o=="object"&&o.component?o.component:n}function F6(n,i){if(!i)return{};let o=x$(i,n,void 0);return typeof o=="object"&&o.props?o.props:{}}function wZ(n,i){for(var o="",u=0,h=n.length;u<h;u++){var m=n[u],y=m.type;if(y===i.text||y===i.codeInline){var _=m.text;_&&(o+=_)}else y===i.textFormatted||y===i.link?m.children&&(o+=wZ(m.children,i)):y===i.image&&m.alt&&(o+=m.alt)}return o}function $$(n){var i=n.toLowerCase();return i==="title"||i==="textarea"||i==="style"||i==="xmp"||i==="iframe"||i==="noembed"||i==="noframes"||i==="script"||i==="plaintext"}function Z$(n){return n.replace(/<(\/?)(title|textarea|style|xmp|iframe|noembed|noframes|script|plaintext)(\s|>|\/)/gi,function(i,o,u,h){return"&lt;"+o+u+h})}function O6(n){console.warn(n)}function A9(n,i,o,u){for(var h=b(o),m=n.length,y=u??m-i,_=0;_<y&&i+_<m&&b(n,i+_)===h;)_++;return _}function BZ(n,i,o,u,h){if(h===0?o>=u:i<=u)return!1;let m=h===0?n[o]:n[i-1],y=h===0?i>0?n[i-1]:null:o<n.length?n[o]:null;var _=b(m);if(_<K1?g9(_):V9(m))return!1;var v=y?b(y):null,E=y===null||y===`
19
+ `||y==="\r"||(v!==null?v<K1?g9(v):V9(y):!0),S=q$(_,m);return!S||E?!0:y?q$(b(y),y):!1}function Q$(n){for(var i="",o=0;o<n.length;)if(n[o]==="\\"&&o+1<n.length){var u=n[o+1];i+=t9(b(u))?u:"\\"+u,o+=2}else i+=n[o++];return M9(i)}function k(n,i){return i>=n.length?i:n.charCodeAt(i)===V0&&i+1<n.length&&n.charCodeAt(i+1)===d?i+2:(n.charCodeAt(i)===d,i+1)}function W6(n,i){if(n>=K1)return 0;var o=f9[n];return i&&o===1&&(n===i1||n===c1||n===x1)?0:o}function M6(n,i,o,u,h,m){if(!o.length||o[o.length-1].type!==O.blockQuote)return null;let y=g0(u,0,u.length);if(y>=u.length||u[y]!==">")return null;let _=uZ(n,i,h,m);if(!_)return null;let v=o[o.length-1],E=_;return E.children&&v.children.push(...E.children),E.endPos}function z$(n,i,o,u){return{type:O.heading,level:n,children:i,id:u(o)}}var p$=/\\(.)/g,v6=/\s+#+\s*$/,n$=/^(?:(\d{1,9})([.)])\s+(.*)$|(\d{1,9})([.)])\s*$|([-*+])\s+(.*)$|([-*+])\s*$)/,u$=/^(\d{1,9})([.)])(\s+|$)/,l$=/^([*+\-])(\s+|$)/,H$=/^<([a-z][^ >/\n\r]*) ?([^>]*?)>/i,gZ=/^<([a-z][^ >/]*) ?(?:[^>/]+[^/]|)>/i,b=function(n,i=0){return n.charCodeAt(i)},_$=function(n){return o9(b(n))},d$=function(n){return g9(b(n))},j1=function(n){return n===" "||n===" "},C9=function(n){return n===" "||n===" "||n===`
20
+ `||n==="\r"},q$=function(n,i){return t9(n<K1?n:i)},A6=function(n){var i=b(n);return _$(n)||i===D1||i===$9||i===P9||i===I9};function i$(n,i){var o=n.length;if(i>=o)return null;var u=b(n[i]);if(!U9(u))return null;for(var h=i,m=i;m<o;){var y=b(n[m]);if(y>=a1&&y<=r1||y>=m1&&y<=h1||y>=G9&&y<=Y9||y===D1)m++;else{var _=b(n[m]);if(_===C||_===l||_===d||_===V0||_===C1||_===Z9)break;return null}}if(m===h)return null;for(var v=n.slice(h,m),E=0;E<v.length;E++){var y=b(v[E]);if(!(y>=a1&&y<=r1||y>=m1&&y<=h1||y>=G9&&y<=Y9||y===D1))return null}return{tagName:v,tagLower:v.toLowerCase(),nextPos:m}}function n1(n,i){var o=U$(n,i);return!o||o.kind!=="tag"?null:{tagName:o.tagName||"",tagLower:o.tagNameLower||"",attrs:o.attrs||"",endPos:o.endPos,isClosing:o.isClosing||!1,isSelfClosing:o.isSelfClosing||!1,hasNewline:o.hasNewline,hasSpaceBeforeSlash:!1,whitespaceBeforeAttrs:o.whitespaceBeforeAttrs||""}}function w6(n,i,o){for(var u=1,h=i;u>0&&h<n.length;){var m=n.indexOf("<",h);if(m===-1)return null;var y=n1(n,m);if(!y){h=m+1;continue}if(y.isClosing&&y.tagLower===o&&--u===0)return[m,y.endPos];!y.isClosing&&!y.isSelfClosing&&y.tagLower===o&&u++,h=y.endPos}return null}var B6=/^\{.*\}$/,F$=/\n\n/,O$=/^(\s{0,3}#[#\s]|\s{0,3}[-*+]\s|\s{0,3}\d+\.\s|\s{0,3}>\s|\s{0,3}```)/m,N6=/<\/?(?:pre|script|style|textarea)\b/i,CZ=/^<[A-Z]/,y6=/\n$/,b6=new Set(["#",">","-","*","+","`","|","0","1","2","3","4","5","6","7","8","9"]);function R6(n,i,o,u){let h=i;for(;h<o;){if(n[h]==="\\"&&h+1<o){h+=2;continue}if(n[h]===u)return h;h++}return-1}function NZ(n,i){var o=i.indexOf(":");if(o>0){var u=i.slice(o+1).trim(),h=u.length;if(h>=2){var m=u[0];(m==='"'||m==="'")&&u[h-1]===m&&(u=u.slice(1,-1))}n.push([i.slice(0,o).trim(),u])}}function L6(n){var i=[];if(!n)return i;for(var o="",u=0,h="",m=0;m<n.length;m++){var y=n[m];if(y==='"'||y==="'")h?y===h&&(h="",u--):(h=y,u++);else if(y==="("&&n9(o,"url"))u++;else if(y===")"&&u>0)u--;else if(y===";"&&u===0){NZ(i,o),o="";continue}o+=y}return NZ(i,o),i}function T6(tag,key,value,sanitizeUrlFn,options){if(key==="style")return L6(value).reduce(function(n,[i,o]){let u=sanitizeUrlFn(o,tag,i);return u!=null&&(n[i.replace(/(-[a-z])/g,h=>h[1].toUpperCase())]=u),n},{});if(value.match(B6)){if(value=value.slice(1,value.length-1),value=value&&value.replace(p$,"$1"),value.length>0){let n=value[0];if(n==="["||n==="{")try{return JSON.parse(value)}catch{return value}}if(value==="true")return!0;if(value==="false")return!1;if(options.evalUnserializableExpressions)try{return eval(`(${value})`)}catch(n){return value}return value}return S$.indexOf(key)!==-1?sanitizeUrlFn(value&&value.replace(p$,"$1"),tag,key):value==="true"?!0:value==="false"?!1:value}function u1(n,i,o,u){let h={};if(!n||!n.trim())return h;let m=[],y=0,_=n.length;for(;y<_;){for(;y<_&&C9(n[y]);)y++;if(y>=_)break;let S=y;for(;y<_&&A6(n[y]);)y++;if(y===S){y++;continue}let w=n.slice(S,y);for(;y<_&&C9(n[y]);)y++;if(y>=_||n[y]!=="="){m.push(w);continue}for(y++;y<_&&C9(n[y]);)y++;if(y>=_){m.push(w+"=");break}let T=y,R=n[y];if(R==='"'||R==="'")for(y++;y<_;){if(n[y]===R){if(y+1>=_){y++;break}let D=n[y+1];if(C9(D)||D==="/"){y++;break}}y++}else if(R==="{"){let D=1;for(y++;y<_&&D>0;){if(n[y]==="{")D++;else if(n[y]==="}"&&(D--,D===0)){y++;break}y++}}else for(;y<_&&!C9(n[y]);)y++;m.push(w+"="+n.slice(T,y))}if(!m?.length)return h;let v=i.toLowerCase();for(let S=0;S<m.length;S++){let w=m[S],T=w.indexOf("=");if(T!==-1){let R=w.slice(0,T).trim(),D=R.toLowerCase();if(D==="ref")continue;let N=w.slice(T+1).trim(),M=(L=>{let z=L[0];return(z==='"'||z==="'")&&L.length>=2&&L[L.length-1]===z?L.slice(1,-1):L})(N);if(D==="href"&&v==="a"||D==="src"&&v==="img"){let L=u.sanitizer(M,v,D);if(L==null){O6(`Stripped unsafe ${D} on <${o}>`);continue}h[R]=L}else{let L=T6(v,D,M,u.sanitizer,u);h[R]=L}}else w!=="style"&&(h[w]=!0)}if(n.indexOf("%")!==-1)try{if(O9.test(decodeURIComponent(n)))for(var E in h)delete h[E]}catch{}else if(O9.test(n))for(var E in h)delete h[E];return h}var p9=function(n){return b6.has(n)};function S6(n,i,o){let u=i+1;for(;u<n.length&&n[u]!=="]";){if(n[u]==="\\"&&u+1<n.length){u+=2;continue}u++}if(u>=n.length)return{shouldSkip:!1,newPos:0};let h=i+1,m=u,y=h<m&&(n[h]===`
21
+ `||n[h]==="\r"),_=m>h&&(n[m-1]===`
22
+ `||n[m-1]==="\r"),v=u+1;if(v=g0(n,v),v>=n.length||n[v]!==":")return{shouldSkip:!1,newPos:0};if((y||_)&&o){let E=v+1;for(E=g0(n,E),E<n.length&&n[E]===`
23
+ `&&(E=g0(n,E+1));E<n.length&&n[E]!==`
24
+ `;)E++;return E<n.length&&E++,{shouldSkip:!0,newPos:E}}return E6(n,v)}function E6(n,i){let o=i+1;for(o=g0(n,o),o<n.length&&n[o]===`
25
+ `&&(o=g0(n,o+1));o<n.length&&n[o]!==`
26
+ `;)o++;if(o>=n.length)return{shouldSkip:!1,newPos:0};o++;let u=g0(n,o);if(u>=n.length||n[u]!=='"'&&n[u]!=="'")return{shouldSkip:!1,newPos:0};let h=n[u],m=u+1;for(;m<n.length&&n[m]!==h&&n[m]!==`
27
+ `;){if(n[m]==="\\"&&m+1<n.length){m+=2;continue}m++}if(m>=n.length||n[m]!==h)return{shouldSkip:!1,newPos:0};let y=g0(n,m+1);return y<n.length&&n[y]!==`
28
+ `&&n[y]!=="\r"?{shouldSkip:!0,newPos:o}:{shouldSkip:!1,newPos:0}}function kZ(n){for(var i=0;i<n.length;i++){var o=n[i];if(o.type===O.link)return!0;if(o.type===O.textFormatted){var u=o;if(u.children&&kZ(u.children))return!0}}return!1}function c$(n){for(var i="",o=0,u=n.length;o<u;o++){var h=n[o],m=h.type;if(m===O.text)i+=h.text;else if(m===O.image){var y=h;y.alt&&(i+=y.alt)}else if(m===O.textFormatted){var _=h;_.children&&(i+=c$(_.children))}else if(m===O.link){var v=h;v.children&&(i+=c$(v.children))}}return i}var x6=new Set([" "," ","\r",`
29
+ `,"\f","\v"]);function l1(n,i,o,u,h){for(var m=[],y=[],_=[],v=i,E=i,S=h.disableAutoLink||u.inAnchor,w=!1,T=!!u.inAnchor,R=!!h.disableParsingRawHTML,D=h.optimizeForStreaming,N=-1,M=-1,L=[],z=function(qe,Vt){if(D&&u.inHTML)return!1;if(!T){var Nt=f$(n,v,u,h,"<");if(Nt)return U(v),m.push(Nt),v=Nt.endPos,E=v,!0}if(R)return!1;var lt=M$(n,v,u,h);if(lt){U(v);var qn=m.length;return m.push(lt),L&&L.push(qn),v=lt.endPos,E=v,!0}if(D&&M===-1&&v+1<o){var wn=b(n,v+1);(wn>=m1&&wn<=h1||wn>=a1&&wn<=r1||wn===Z9||wn===F9)&&(M=v)}var ye=n1(n,v);if(!ye)return!1;var V=v+(ye.isClosing?2:1);if(V>=n.length||j1(n[V]))return!1;var me=n.indexOf(">",v+1);if(me!==-1){var ge=v+1,ke=me-ge;if(ke>=7){var Ue=c(n,"http://",ge);if(Ue||c(n,"https://",ge)){for(var Re=ge;Re<me;Re++)if(j1(n[Re]))return!1}}}var Ne=b(n,V);if(U9(Ne)&&V+1<n.length&&n[V+1]===":"||ye.isClosing&&ye.attrs.trim().length)return!1;if(ye.attrs.length)for(var We=!1,Ct="",Be=0;Be<ye.attrs.length;Be++){var Ze=ye.attrs[Be];if(We&&Ze===Ct)We=!1;else if(!We&&(Ze==='"'||Ze==="'"))We=!0,Ct=Ze;else if(Ze==="*"||Ze==="#"||Ze==="!"){for(var He=Be+1;He<ye.attrs.length&&ye.attrs[He]!=="="&&ye.attrs[He]!==" "&&ye.attrs[He]!==" ";)He++;if(He<ye.attrs.length&&ye.attrs[He]==="=")return!1}}var Mt=n.slice(v,ye.endPos),Ot=ye.tagName.toLowerCase(),Le=Mt,an=Le.indexOf(">");if(an!==-1){Le=Le.slice(an+1);var Gt="</"+Ot+">",jt=Le.indexOf(Gt);jt!==-1&&(Le=Le.slice(0,jt))}var Ut=[];if(Le.trim()&&h){var Zn={...u,inline:!1,inHTML:!0},Jt=Le.trim();F$.test(Jt)||O$.test(Jt)||H$.test(Jt)?Ut=d9(Jt,Zn,h):Jt&&(Zn.inline=!0,Ut=l1(Jt,0,Jt.length,Zn,h))}var fa=ye.whitespaceBeforeAttrs+ye.attrs,bn=u1(fa,Ot,ye.tagName,h),Pn={type:O.htmlBlock,tag:ye.tagName,attrs:bn,children:Ut,rawText:Mt,text:Le,verbatim:!0,endPos:ye.endPos};return U(v),m.push(Pn),v=Pn.endPos,E=v,!0},U=function(qe){if(qe>E){var Vt=n.slice(E,qe);m.push({type:O.text,text:w?M9(Vt):Vt}),E=qe,w=!1}};v<o;){var H=b(n,v),Y=W6(H,S);if(Y===0){for(H===x9&&(w=!0),v++;v<o&&(H=b(n,v),!(H>=K1));){H===x9&&(w=!0);var K=f9[H];if(K!==0){if(S&&K===1&&(H===i1||H===c1||H===x1)){v++;continue}break}v++}continue}if(H===t0){for(var $=v,Q=0;v+Q<o&&b(n,v+Q)===t0;)Q++;if(Q>0){for(var ne=v+Q,fe=-1,W=ne;W<o;){for(;W<o&&b(n,W)!==t0;)W++;if(W>=o)break;for(var le=0;W+le<o&&b(n,W+le)===t0;)le++;le>Q&&(le=Q);var be=W+le;if(le===Q&&(W<=ne||b(n,W-1)!==t0)&&(be>=o||b(n,be)!==t0)){fe=W,W=be;break}W++}if(fe!==-1){for(var ve=n.slice(ne,fe),_e=!1,F=0;F<ve.length;F++){var ce=b(ve,F);if(ce===d||ce===V0){_e=!0;break}}var te=ve;if(_e&&(te=ve.replace(/\r\n/g," ").replace(/\r/g," ").replace(/\n/g," ")),te.length>0){var Se=b(te,0),xe=b(te,te.length-1);if(Se===C&&xe===C){for(var q=1;q<te.length-1;q++)if(b(te,q)!==C){te=te.slice(1,te.length-1);break}}}U($),m.push({type:O.codeInline,text:te}),v=W,E=v;continue}if(D&&N===-1){N=$,U($),o=$;break}v=ne;continue}}if(!T&&!S&&(H===i1||H===c1||H===x1)){var ie=null,oe=v+1<o?b(n,v+1):0,Ee=v+2<o?b(n,v+2):0,pe=v+3<o?b(n,v+3):0,Oe=v+4<o?b(n,v+4):0,Te=v+5<o?b(n,v+5):0;if(H===c1&&oe===r9&&Ee===r9&&pe===B$?ie="h":H===x1&&oe===x1&&Ee===x1&&pe===I9?ie="w":H===i1&&oe===r9&&Ee===B$&&pe===P9&&Oe===Z9&&Te===Z9&&(ie="f"),ie){var Ie=f$(n,v,u,h,ie);if(Ie){U(v),m.push(Ie),v=Ie.endPos,E=v;continue}}}if(!T&&!S&&H===E9){var je=f$(n,v,u,h,"@");if(je&&"emailStart"in je){for(var{emailStart:Ve,endPos:qt}=je,Ye=[],be=y.length-1;be>=0;be--){var ot=y[be];ot.sourcePos>=Ve&&ot.sourcePos<qt&&(ot.nodeIndex>=0&&ot.nodeIndex<m.length&&(m.splice(ot.nodeIndex,1),Ye.push(ot.nodeIndex)),y.splice(be,1))}if(Ve<E){for(var W=m.length-1;W>=0;W--)if(m[W].type===O.text){m.splice(W,1),Ye.push(W);break}E=Ve}if(Ye.length){Ye.sort(function(qe,Vt){return qe-Vt});for(var Xt=0,ze=0;ze<y.length;ze++){for(var ot=y[ze];Xt<Ye.length&&Ye[Xt]<ot.nodeIndex;)Xt++;ot.nodeIndex-=Xt}}U(Ve),m.push(je),v=qt,E=v;continue}}if(!(H===j9&&z())){if(H===k1){if(v+1<o&&b(n,v+1)===d){for(var Je=v+2;Je<o&&b(n,Je)===C;)Je++;if(Je>=o){v++;continue}for(U(v),m.push({type:O.breakLine}),v+=2;v<o&&b(n,v)===C;)v++;E=v;continue}var Rt=v+1<o?n[v+1]:"";if(Rt&&"!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~".indexOf(Rt)!==-1){U(v),m.push({type:O.text,text:Rt==="&"?"&​":Rt}),v+=2,E=v;continue}}if(H===g1){if(!T){if(v+1<o&&n[v+1]==="^"){for(var At=v+2;At<o&&n[At]!=="]";)At++;if(At<o){var ft=n.slice(v+2,At);U(v),m.push({type:O.footnoteReference,target:`#${h.slugify(ft)}`,text:ft}),v=At+1,E=v;continue}}if(u.inList&&v+2<o&&b(n,v+2)===H9){var ut=b(n,v+1);if(ut===C||ut===N$||ut===y$){U(v),m.push({type:O.gfmTask,completed:ut===N$||ut===y$}),v+=3,E=v;continue}}}var Fe=!1;if(v>i&&n[v-1]==="!"){for(var nn=0,tt=v-2;tt>=i&&n[tt]==="\\";tt--)nn++;if((nn&1)===0&&(Fe=!0,E<v-1&&U(v-1),m.length>0&&m[m.length-1].type===O.text)){var we=m[m.length-1];we.text.endsWith("!")&&(we.text=we.text.slice(0,-1),!we.text&&m.pop())}}Fe||U(v),E=v+1,(!T||Fe)&&_.push({type:Fe?"image":"link",pos:Fe?v-1:v,resultIdx:m.length,inAnchor:T}),v++;continue}if(H===H9&&_.length>0){var ct=_[_.length-1],Dt=ct.pos+(ct.type==="image"?2:1),kt=v;U(v);var Lt=v+1,mn=t$(m,ct),Tn=ct.type==="link"&&kZ(mn),Wn=!1;if(!Tn&&Lt<o&&n[Lt]==="("){var rt=g6(n,Lt+1);if(rt){yZ(m,y,_,ct,Dt,kt,h.sanitizer(Q$(rt.target),"a","href"),rt.title?Q$(rt.title):void 0),v=rt.endPos,E=v;continue}}var hn=u.refs||{},gt=null,yt=v;if(Lt<o&&n[Lt]==="["){for(var pt=Lt+1,W=pt;W<o&&n[W]!=="]";)W++;W<o&&(gt=n.slice(pt,W),yt=W,Wn=!0)}(!Wn||gt==="")&&(gt=n.slice(Dt,kt));var Bt=hZ(gt);if(!Tn&&hn&&hn[Bt]){var Rn=hn[Bt];yZ(m,y,_,ct,Dt,kt,Rn.target,Rn.title),v=yt+1,E=v;continue}var An=ct.resultIdx;if(_.pop(),m.length=An,D){if(m.push(...mn),Lt<o&&n[Lt]==="(")return m}else ct.type==="image"&&m.push({type:O.text,text:"!"}),m.push({type:O.text,text:"["},...mn,{type:O.text,text:"]"});for(var F=0;F<y.length;F++)y[F].nodeIndex>=An&&y[F].nodeIndex++;v++,E=v;continue}if(H===S9||H===$9||H===e1||H===d1){var zt=n[v],Xe=v,Yt=A9(n,v,zt);if((zt==="~"||zt==="=")&&Yt!==2){v++;continue}var _t=Xe+Yt,Cn=BZ(n,Xe,_t,o,0),yn=BZ(n,Xe,_t,i,1),vt=Cn,sn=yn;if(zt==="_"&&Cn&&yn){if(Xe>0){var Jn=n[Xe-1],jn=b(Jn);vt=q$(jn,Jn)}if(_t<o){var Hn=n[_t],On=b(Hn);sn=q$(On,Hn)}}U(Xe),y.push({nodeIndex:m.length,type:zt,length:Yt,canOpen:vt,canClose:sn,active:!0,sourcePos:Xe,inAnchor:T}),m.push({type:O.text,text:n.slice(Xe,Xe+Yt)}),v=Xe+Yt,E=v;continue}if(H===d){for(var tt=v-1,Nn=0;tt>=E&&b(n,tt)===C;)Nn++,tt--;if(Nn>=2){for(var Je=v+1;Je<o&&b(n,Je)===C;)Je++;if(Je>=o){U(tt+1),v=o,E=o;continue}for(U(tt+1),m.push({type:O.breakLine}),v++;v<o&&b(n,v)===C;)v++;E=v;continue}var vn=v>E?b(n,v-1):0,ut=v+1<o?b(n,v+1):0,Kt=v>E&&vn===C&&ut===C?v-1:v;U(Kt),m.push({type:O.text,text:`
30
+ `}),E=v+1,v>i&&vn===C&&E<o&&b(n,E)===C&&E++,v=E;continue}for(H===x9&&(w=!0),v++;v<o;){var H=b(n,v);if(H>=K1)break;H===x9&&(w=!0);var K=f9[H];if(K===0){v++;continue}if(K===1&&(H===i1||H===c1||H===x1)&&S){v++;continue}break}}}if(U(v),y.length&&rZ(m,y),D){for(var Ke=m.length,Qt=L.length-1;Qt>=0;Qt--){var Pt=L[Qt];if(Pt<m.length&&m[Pt].type===O.htmlBlock){var Wt=m[Pt];if(!K9(Wt.tag)&&(!Wt.children||Wt.children.length===0)){m.splice(Pt,1),Pt<Ke&&Ke--;for(var F=0;F<y.length;F++)y[F].nodeIndex>Pt&&y[F].nodeIndex--;for(var F=Qt+1;F<L.length;F++)L[F]>Pt&&L[F]--}}}if(N!==-1&&N<Ke){for(var Qe=m.length-1;Qe>=0;Qe--)if(m[Qe].type===O.text){Ke=Qe;break}}if(M!==-1&&M<Ke){for(var Qe=m.length-1;Qe>=0;Qe--)if(m[Qe].type===O.text){Ke=Qe;break}}for(var W=y.length-1;W>=0;W--)if(y[W].active&&y[W].nodeIndex<Ke){m.splice(y[W].nodeIndex,1),y[W].nodeIndex<Ke&&Ke--;for(var be=0;be<W;be++)y[be].nodeIndex>y[W].nodeIndex&&y[be].nodeIndex--}return Ke<m.length&&(m.length=Ke),m}if(_.length){_.sort(function(qe,Vt){return qe.resultIdx-Vt.resultIdx});for(var W=0;W<_.length;W++)m.splice(_[W].resultIdx+W,0,{type:O.text,text:_[W].type==="image"?"![":"["})}return m}function P6(n,i,o,u,h){for(var m=!1,y=0;y<i.length;y++)if(i[y].sourcePos>=u&&i[y].sourcePos<h){m=!0;break}if(m){for(var _=t$(n,o),v=[],y=0;y<i.length;y++){var E=i[y];E.sourcePos>=u&&E.sourcePos<h&&v.push({nodeIndex:E.nodeIndex-o.resultIdx,type:E.type,length:E.length,canOpen:E.canOpen,canClose:E.canClose,active:E.active,sourcePos:E.sourcePos,inAnchor:E.inAnchor})}rZ(_,v),n.length=o.resultIdx;for(var S=0;S<_.length;S++)n.push(_[S]);for(var w=[],y=0;y<i.length;y++)(i[y].sourcePos<u||i[y].sourcePos>=h)&&w.push(i[y]);i.length=0;for(var S=0;S<w.length;S++)i.push(w[S])}}function I6(n,i,o,u){return n.type==="link"?{type:O.link,target:o,title:u,children:i}:{type:O.image,target:o||"",alt:c$(i),title:u}}function t$(n,i){return n.slice(i.resultIdx)}function yZ(n,i,o,u,h,m,y,_){P6(n,i,u,h,m);var v=t$(n,u);o.pop(),n.length=u.resultIdx,n.push(I6(u,v,y,_))}function f6(n,i,o){let u=g0(n,i),h=u<n.length&&n[u]==="<";h&&u++;let m=u;if(h&&u<n.length&&n[u]===">")return{target:"",endPos:u+1,hadSpace:!1};let y,_;var v=!1;if(h){for(_=u;_<n.length&&n[_]!==">";){let w=n[_];if(w===`
31
+ `||w==="\r"||w==="<")return null;if(w==="\\"){_+=2;continue}_++}if(_>=n.length||n[_]!==">")return null;_++;let E=m;for(;E<_-1&&j1(n[E]);)E++;let S=_-1;for(;S>E&&j1(n[S-1]);)S--;y=n.slice(E,S),u=_}else{let E=0;for(_=u;_<n.length;){let S=n[_];if(S===" "||S===" "||S===`
32
+ `){v=!0;break}if(S==="("){if(_>0&&n[_-1]==="\\"){_++;continue}E++,_++;continue}if(S===")"){if(_>0&&n[_-1]==="\\"){_++;continue}if(E===0)break;E--,_++;continue}_++}y=n.slice(m,_),u=_}return{target:y,endPos:u,hadSpace:v}}function bZ(n,i,o,u){let h=i,m=0;for(;h<n.length;){let _=n[h];if(j1(_))h++;else if(_===`
33
+ `){if(m>=1)break;m++,h++}else{if(V9(_))break;break}}if(o&&!u&&(h>=n.length||n[h]!=='"'&&n[h]!=="'"&&n[h]!=="("))return{title:void 0,endPos:h};let y;if(h<n.length){let _=n[h];if(_==='"'||_==="'"){h++;let v=h;for(;h<n.length&&n[h]!==_;)n[h]==="\\"&&h++,h++;h<n.length&&(y=n.slice(v,h),h++)}else if(_==="("){h++;let v=h,E=1;for(;h<n.length&&E>0;)n[h]==="\\"&&h+1<n.length?h++:n[h]==="("?E++:n[h]===")"&&E--,h++;E===0&&(y=n.slice(v,h-1))}}return h=g0(n,h),{title:y,endPos:h}}function g6(n,i,o){let u=f6(n,i);if(!u)return null;let h=i;h=g0(n,h);let m=h<n.length&&n[h]==="<";if(m&&u.target===""&&u.endPos===h+2){let _=bZ(n,u.endPos,!1,m);return _.endPos>=n.length||n[_.endPos]!==")"?null:{target:"",title:_.title,endPos:_.endPos+1}}let y=bZ(n,u.endPos,u.hadSpace,m);return y.endPos>=n.length||n[y.endPos]!==")"?null:{target:u.target,title:y.title,endPos:y.endPos+1}}var C6;(n=>{n[n.URI=0]="URI",n[n.EMAIL=1]="EMAIL",n[n.ANGLE=2]="ANGLE"})(C6||={});function U9(n){return n>=m1&&n<=h1||n>=a1&&n<=r1}function mZ(n){let i=n.indexOf(":");if(i<2||i>32)return!1;let o=b(n);if(!U9(o))return!1;for(let u=1;u<i;u++){let h=n[u];if(b(h),!_$(h)&&h!=="+"&&h!=="."&&h!=="-")return!1}return!0}function RZ(n,i,o){return i===0?!0:(o?`
34
+ \r*_~(`:`
35
+ *_~(`).indexOf(n[i-1])!==-1}function G$(n,i,o,u,h){let m=u(n,"a","href");return m?{type:O.link,target:m,children:[{type:O.text,text:i}],endPos:o,...h!==void 0?{emailStart:h}:{}}:null}function I$(n,i,o,u,h){if(o.inAnchor||h!==2&&u.disableAutoLink)return null;if(h===2){if(n[i]!=="<")return null;let N=i+1;for(;N<n.length&&n[N]!==">";){let Q=b(n,N);if(Q===C||Q===l||Q===d||Q===V0||Q<C)return null;N++}if(N>=n.length||n[N]!==">")return null;let M=n.slice(i+1,N);if(!M.length)return null;let L=M.indexOf("\\")!==-1,z=mZ(M),U=c(M,"http://")||c(M,"https://"),H=!1;if(!z&&!U&&M.length>=7){let Q=M[0];if(Q==="m"||Q==="M"){let ne=M.toLowerCase();if(c(ne,"mailto:")){H=!0;let fe=ne.indexOf(":"),W=M.slice(fe+1);return G$("mailto:"+W,M,N+1,u.sanitizer)}}}let Y=!L&&M.indexOf("@")!==-1&&M.indexOf("//")===-1&&!z;if(!U&&!H&&!Y&&!z)return null;let K=M,$=M;return!H&&!z&&!U&&Y&&(K="mailto:"+M),G$(K,$,N+1,u.sanitizer)}if(h===1){let N=i;for(;N>0&&(_$(n[N-1])||".+-_".indexOf(n[N-1])!==-1);)N--;if(N>=i||!RZ(n,N,!0))return null;let M=i+1,L=!1;for(;M<n.length;){let U=n[M];if(U===".")L=!0,M++;else if(_$(U)||U==="-"||U==="_")M++;else break}if(!L||M<=i+1)return null;for(;M>i+1&&n[M-1]===".";)M--;if(M>i+1&&(n[M-1]==="-"||n[M-1]==="_"))return null;if(M-(i+1)<1e4){if(n.indexOf(".",i+1)>=M||n.indexOf(".",i+1)===-1)return null}else if(n.slice(i+1,M).indexOf(".")===-1)return null;let z=n.slice(N,M);return G$("mailto:"+z,z,M,u.sanitizer,N)}let m=c(n,"http://",i)||c(n,"https://",i),y=!m&&c(n,"ftp://",i),_=!m&&!y&&c(n,"www.",i);if(!(m||y||_)||!RZ(n,i,!1))return null;for(var v=i+(m?b(n,i+4)===zZ?8:7:y?6:4),E=v;v<n.length;){let N=b(n,v);if(N===C||N===l||N===d||N===j9||N===C1)break;v++}if(v<=E)return null;let S=v;for(;S>E;){let N=n[S-1];if(S>E+1&&n[S-2]==="\\")break;if(N==="?"||N==="!"||N==="."||N===","||N===":"||N==="*"||N==="_"||N==="~")S--;else if(N===";"){let M=S-2;for(;M>=E&&n[M]!=="&"&&n[M]!==" ";)M--;if(M>=E&&n[M]==="&"){let L=n.slice(M+1,S-1);if(L.length>=2&&L.length<=10&&/^[a-zA-Z0-9]+$/.test(L)&&(L==="lt"||L==="gt"||L.length>=3&&(c(L,"amp")||c(L,"apos")||c(L,"quot")||c(L,"nbsp")||/^[a-z]{3,10}$/.test(L))))break;S=M;break}S--}else if(N===")"){let M=0,L=0;for(let z=E;z<S;z++)n[z]==="("&&M++,n[z]===")"&&L++;if(L>M)S--;else break}else break}if(v=S,v<=E)return null;for(var w=E,T=-1,R=-1;w<v;){let N=b(n,w);if(N>=m1&&N<=h1||N>=a1&&N<=r1||N>=G9&&N<=Y9||N===D1||N===$9||N===I9){N===I9&&(R=T,T=w),w++;continue}break}if(w===E||T===-1)return null;R===-1&&(R=E-1);for(let N=R+1;N<T;N++)if(n[N]==="_")return null;for(let N=T+1;N<w;N++)if(n[N]==="_")return null;let D=n.slice(i,v);return G$(_?"http://"+D:D,D,v,u.sanitizer)}function f$(n,i,o,u,h){return h==="<"?I$(n,i,o,u,2):h==="h"||h==="f"||h==="w"?I$(n,i,o,u,0):h==="@"?I$(n,i,o,u,1):null}function hZ(n){var i=n.trim(),o=i.replace(/[\s\t\n\r]+/g," ");return o.indexOf("ẞ")!==-1?o.replace(/\u1E9E/g,"ss").toLowerCase():o.toLowerCase()}function k6(n,i,o){if(i+3>=n.length||n[i]!=="[")return null;let u=n[i+1];return u!==" "&&u!=="x"&&u!=="X"||n[i+2]!=="]"?null:{type:O.gfmTask,completed:u.toLowerCase()==="x",endPos:i+3}}function e$(n,i,o,u){let{inline:h,inList:m,inBlockQuote:y}=i;u.inline!==void 0&&(i.inline=u.inline),u.list!==void 0&&(i.inList=u.list),u.inBlockQuote!==void 0&&(i.inBlockQuote=u.inBlockQuote);let _=d9(n,i,o);return i.inline=h,i.inList=m,i.inBlockQuote=y,_}function u9(n,i,o,u,h){return W$(u,!0,()=>l1(n,i,o,u,h))}function l9(n,i,o,u){var h=n[i];if(h===void 0)return null;var m=i,y=null,_=h,v=null,E=b(h),S=E===C||E===l;if(S){if(v=I(n,i),y=t(n,i,v),m=i+y.charCount,m>=n.length)return X$(n,i);_=n[m]}var w=y?y.spaceEquivalent:0;if(w>=4)return S?X$(n,i):null;var T=b(_);if(T===C1){var R=uZ(n,i,o,u);if(R)return R}else{if(T===$9)return D$(n,i);if(T===D1||T===S9||T===DZ){var D=D$(n,i);if(D)return D;var N=o$(n,i,o,u);if(N)return N}else if(T>=G9&&T<=Y9){var N=o$(n,i,o,u);if(N)return N}else{if(T===T9)return m6(n,m,o,u);if(T===g1)return B9(n,m,o,u,m+1<n.length&&b(n,m+1)===D9);if(T===j9&&!u.disableParsingRawHTML)return M$(n,m,o,u);if(T===t0||T===e1){if(v||(v=I(n,i)),y||(y=t(n,i,v)),y.spaceEquivalent<=3)return $Z(n,m,o,u)}else if(T===jZ)return aZ(n,i,o,u)}}return S?X$(n,i):null}function d9(n,i,o){let u=[],h=0;for(;h<n.length;){for(;h<n.length&&n[h]===`
36
+ `;)h++;if(h>=n.length)break;var m=n[h];if(i.inList&&u.length>0){var y=u[u.length-1];if(y?.type===O.paragraph){var _=y,v=b(m);if(v===D1||v===d1||v===C||v===l){var E=I(n,h),S=n.slice(h,E),w=t(n,h,E);if(w.spaceEquivalent<4){var T=S.slice(w.charCount).trim();if(cZ(u,T,o)){h=E+(E<n.length&&n[E]===`
37
+ `?1:0);continue}}}}}var R=l9(n,h,i,o);if(R){u.push(R),h=R.endPos;continue}var D=pZ(n,h,i,o);if(D){u.push(D),h=D.endPos;continue}var N=n.slice(h).trim();if(N){if(i.inBlockQuote&&u.length>0){let U=function(H){if(H.type===O.blockQuote){var Y=H;if(Y.children&&Y.children.length>0){var K=Y.children[Y.children.length-1];if(K.type===O.paragraph)return K}}else if(H.type===O.orderedList||H.type===O.unorderedList){var $=H;if($.items&&$.items.length>0){var Q=$.items[$.items.length-1];if(Q&&Q.length>0){var ne=Q[Q.length-1],fe=U(ne);if(fe)return fe}}}return null};for(var M=u.length-1;M>=0;M--){var _=U(u[M]);if(_){var z=a$(n,h,i,o);if(z){var L=z;_.children&&L.children&&_.children.push({type:O.text,text:`
38
+ `},...L.children),h=z.endPos;continue}}}}var z=a$(n,h,i,o);if(z){u.push(z),h=z.endPos;continue}}h++}return u}function m6(n,i,o,u){if(o.inline)return null;let h=I(n,i),m=t(n,i,h,3);if(m.spaceEquivalent>3&&!o.inList)return null;var y=i+m.charCount;if(y>=n.length||n[y]!=="#")return null;let _=A9(n,y,"#",6);if(y+=_,y>=n.length)return null;let v=n[y];if(v===`
39
+ `||v==="\r"){let R=I(n,y);return{...z$(_,[],"",u.slugify),endPos:R+(R<n.length?1:0)}}if(v!==" "&&v!==" ")return null;let E=y,S=I(n,E);var w=n.slice(E,S).replace(v6,"").trim();let T=u9(w,0,w.length,o,u);return{...z$(_,T,w,u.slugify),endPos:S+(S<n.length?1:0)}}function pZ(n,i,o,u){if(o.inline||o.inBlockQuote||o.inList)return null;let h=I(n,i);if(h>=n.length)return null;let m=k(n,h),y=-1,_=null;for(var v=0;m<n.length&&v<10;v++){let fe=I(n,m);if(fe>=n.length)break;for(var E=m;E<fe&&(b(n,E)===C||b(n,E)===l||b(n,E)===V0);)E++;if(E>=fe)break;for(var S=0,w=m;w<fe&&S<3&&b(n,w)===C;)S++,w++;if(w<fe){let W=b(n,w);if(W===d1||W===D1){let le=n[w];for(var T=0,R=!1,D=w;D<fe;){let be=b(n,D);if(be===W){if(R){T=0;break}T++}else if(be===C||be===l)R=!0;else{T=0;break}D++}if(T>=1){y=fe,_=le;break}}}m=k(n,fe)}if(!_)return null;let N=b(n,i);if(N===T9||N===C1||n[i]==="|")return null;let M=i;for(var L=i,z=!1;L<m;){let fe=I(n,L);if(fe>=m)break;for(var U=L;U<fe&&(b(n,U)===C||b(n,U)===l||b(n,U)===V0);)U++;U<fe&&(z=!0,M=fe),L=k(n,fe)}if(!z)return null;let H=n.slice(i,M);for(var Y=0,K=H.length;Y<K&&(H.charCodeAt(Y)===C||H.charCodeAt(Y)===l||H.charCodeAt(Y)===V0||H.charCodeAt(Y)===d);)Y++;for(;K>Y&&(H.charCodeAt(K-1)===C||H.charCodeAt(K-1)===l||H.charCodeAt(K-1)===V0||H.charCodeAt(K-1)===d);)K--;let $=H.slice(Y,K);if(!$)return null;let Q=_==="="?1:2,ne=u9($,0,$.length,o,u);return{...z$(Q,ne,$,u.slugify),endPos:y+(y<n.length?1:0)}}function a$(n,i,o,u){if(o.inline)return null;if(u.optimizeForStreaming&&n[i]==="|"){for(var h=Math.min(500,n.length-i),m=n.substr(i,h),y=0,_=!1,v=0;v<m.length;v++)m[v]==="|"&&y++,(m[v]==="-"||m[v]===":")&&(_=!0);if(y>=3&&_){for(var E=I(n,i);E<n.length;){var S=k(n,E);if(S>=n.length)break;var w=I(n,S),T=n.slice(S,w);if(T.indexOf("|")===-1&&T.indexOf("-")===-1||(E=w,w>=n.length))break}return{type:O.paragraph,children:[],endPos:k(n,E)}}}let R=i,D=n.length;for(;R<D;){let ze=I(n,R),Je=!0;for(let we=R;we<ze;we++){let ct=b(n,we);if(ct!==C&&ct!==l&&ct!==V0){Je=!1;break}}if(Je){R=ze;break}if(ze>=D){R=D;break}let Rt=k(n,ze);if(Rt>=D){R=D;break}let At=I(n,Rt),ft=!0,ut="";for(let we=Rt;we<At;we++){let ct=b(n,we);if(ct!==C&&ct!==l&&ct!==V0){ft=!1,ut===""&&(ut=n[we]);break}}if(ft){R=ze;break}let Fe=!1,nn=t(n,Rt,At),tt=nn.spaceEquivalent===4&&nn.charCount===4;if(ut==="<"&&!tt&&!u.disableParsingRawHTML){let we=Rt,ct=0;for(;we<At&&ct<3;){let Dt=b(n,we);if(Dt===C||Dt===l)ct++,we++;else break}if(we<At&&n[we]==="<"){var N=M$(n,we,{...o,inline:!1},u);N&&(Fe=!("canInterruptParagraph"in N)||N.canInterruptParagraph)}}if(tt)Fe=!1;else if(!Fe&&ut&&p9(ut))if(ut==="["){let we=Rt;we+1>=D||n[we+1]!=="^"?Fe=!1:Fe=!0}else if(ut==="*"||ut==="+")if(D$(n,Rt))Fe=!0;else{let we=Rt+1<D?n[Rt+1]:"";we&&j1(we)?Fe=!0:Fe=!1}else{let we=l9(n,Rt,o,u);we&&(we.type===O.codeBlock?t(n,Rt,At).spaceEquivalent>=4?Fe=!1:Fe=!0:we.type===O.unorderedList||we.type===O.orderedList?we.type===O.orderedList?Fe=we.start===1:Fe=!0:ut==="-"?(R>i,Fe=!0):we.type===O.ref?Fe=!1:Fe=!0)}if(Fe){R=ze;break}R=k(n,ze)}if(R<=i)return null;for(var M=i,L=R;M<L;){let ze=b(n,M);if(ze===C||ze===l)M++;else break}let z=I(n,M);var U=L>z,H;if(!U)H=n.slice(M,L);else{for(var Y=[],K=M,$=0;K<L;){var Q=I(n,K);if(Q>L&&(Q=L),$===0)Y.push(n.slice(K,Q));else{for(var ne=0;ne<4&&K+ne<Q&&b(n,K+ne)===C;)ne++;var fe=ne===4?K+4:K;Y.push(n.slice(fe,Q))}if(Q<L){let ze=b(n,Q);ze===V0||ze===d?(Y.push(`
40
+ `),K=k(n,Q)):K=L}else K=L;$++}H=Y.join("")}for(var W=H.length;W>0;){var le=H.charCodeAt(W-1);if(le===C||le===l)W--;else break}W<H.length&&(H=H.slice(0,W));let be=!1;for(let ze=0;ze<H.length;ze++){let Je=H.charCodeAt(ze);if(Je!==C&&Je!==l&&Je!==d&&Je!==V0){be=!0;break}}if(!be)return null;for(var ve=H,_e=R,F=-1,ce=R-1;ce>=M;){if(b(n,ce)===d){F=ce;break}ce--}if(F>=0){for(var te=!1,Se=M;Se<F;Se++){let ze=b(n,Se);if(ze!==C&&ze!==l&&ze!==d&&ze!==V0){te=!0;break}}if(!te){for(var xe=F+1;xe<n.length;){let ze=b(n,xe);if(ze===C||ze===l)xe++;else break}var q=xe-(F+1);if(q<4&&xe<n.length&&n[xe]==="["){var ie={...o,inline:!1},oe=B9(n,xe,ie,u,!1);if(oe){for(var Ee=0,ce=M;ce<=F;){let Je=n.indexOf(`
41
+ `,ce);if(Je===-1||Je>F)break;Ee++,ce=Je+1}var pe=0,Oe=0;for(ce=0;ce<H.length;){let Je=H.indexOf(`
42
+ `,ce);if(Je===-1)break;if(Oe++,Oe===Ee){pe=Je+1;break}ce=Je+1}pe>0&&(ve=H.slice(0,pe-1)),_e=oe.endPos,o.refs=ie.refs}}}}let Te=u9(ve,0,ve.length,o,u);var Ie={type:O.paragraph,children:Te,endPos:_e};if(Te.length>0){for(var je=[],Ve=Te.length-1;Ve>=0;Ve--){var qt=Te[Ve];if(qt.type===O.htmlSelfClosing&&qt.isClosingTag===!0)je.push(Ve);else if(qt.type===O.text){var Ye=qt;if(Ye.text&&Ye.text.trim().length>0)break}else break}if(je.length>=3){var ot=je[je.length-1],Xt=Te.slice(ot+1);Te.splice(ot+1),Ie.removedClosingTags=Xt}}return Ie}function h6(n,i){if(i!==0)return null;let o=L$(n);if(!o?.hasValidYaml)return null;let u=o.endPos-1;u>0&&n[u-1]==="\r"&&u--;let h=p1(n.slice(0,u));return{type:O.frontmatter,text:h,endPos:o.endPos}}function D$(n,i,o,u){let h=I(n,i),m=t(n,i,h,3);if(m.spaceEquivalent>3)return null;var y=i+m.charCount;if(y>=h)return null;let _=n[y];if(_!=="-"&&_!=="*"&&_!=="_")return null;for(var v=0,E=y;E<h;){var S=n[E];if(S===_)v++;else if(S!==" "&&S!==" ")return null;E++}return v<3?null:{type:O.breakThematic,endPos:k(n,h)}}function t(n,i,o,u){let h=0,m=0,y=i;for(;y<o;){var _=b(n,y);if(_!==C&&_!==l||u!==void 0&&h>=u)break;_===l?h+=4-h%4:h+=1,m++,y++}return{spaceEquivalent:h,charCount:m}}function LZ(n,i,o,u){let h=0,m=0,y=u;for(let w=i;w<o&&m<4;w++){var _=b(n,w);if(_===l){let T=4-y%4;if(m+=T,h++,y+=T,m>=4)break}else if(_===C){if(m++,h++,y++,m>=4)break}else break}let v=n.slice(i+h,o);for(var E=0,S=i;S<o&&(n[S]===" "&&E++,!(E>=2));S++);return E>=2&&c(v," ")&&u>0&&(v=" "+v.slice(1)),v}function X$(n,i,o){let u=I(n,i),h=t(n,i,u);if(h.spaceEquivalent<4)return null;let m=h.spaceEquivalent,y=I(n,i+h.charCount),_=i,v=0;for(var E=_-1;E>=0&&n[E]!==`
43
+ `&&n[E]!=="\r";)E--;for(E++;E<_;)n[E]===" "?v=v+4-v%4:v++,E++;let S=LZ(n,_,y,v),w=k(n,y);if(w>=n.length)return S.trim()?{type:O.codeBlock,text:S,endPos:w}:null;var T=[];T.push(S);let R=w;for(;R<n.length;){let N=I(n,R);if(w1(n,R,N)){let M=N+1;if(M<n.length){let L=I(n,M),z=t(n,M,L),U=n[M+z.charCount];if(U&&U!==`
44
+ `&&(z.spaceEquivalent<4||U===">"&&z.spaceEquivalent<m))break}T.push(`
45
+ `)}else{if(t(n,R,N).spaceEquivalent<4)break;let M=LZ(n,R,N,0);T.push(`
46
+ `),T.push(M)}R=k(n,N)}let D=T.join("");return D=D.replace(y6,""),D.trim()?{type:O.codeBlock,text:D,endPos:R}:null}function $Z(n,i,o,u){let h=n[i];if(h!=="`"&&h!=="~")return null;let m=A9(n,i,h);if(m<3)return null;let y=i;for(;y>0&&b(n,y-1)!==d;)y--;let _=t(n,y,i),v=_.spaceEquivalent,E=v;if(v===4&&_.charCount===4&&(v=0,E=4),v>=4)return null;let S=g0(n,i+m),w=I(n,S),T=n.slice(S,w).trim();if(h==="`"&&T.indexOf("`")!==-1)return null;T=T.replace(p$,"$1");let R=T.indexOf(" "),D=R>0?T.slice(0,R):T,N=R>0?T.slice(R+1).trim():"",M=N&&/=\s*["']/.test(N)?u1(N,"code","code",u):void 0,L=k(n,w),z=L,U=!1;for(;z<n.length;){let $=I(n,z),Q=z,ne=0;for(;Q<$;){let fe=b(n,Q);if(fe===C){if(ne++,Q++,ne>=4)break}else if(fe===l){if(ne+=4-ne%4,Q++,ne>=4)break}else break}if(ne<4){let fe=A9(n,Q,h,$-Q);if(fe>=m){let W=Q+fe;for(;W<$;){let le=b(n,W);if(le===C||le===l)W++;else break}if(W===$){U=!0;break}if(fe>=3&&W<$){let le=Q+fe;if(!(le<$&&(b(n,le)===C||b(n,le)===l))){let be=!0;if(h==="`"&&n.slice(le,$).indexOf("`")!==-1&&(be=!1),be)break}}}}else if(E===4&&v===0&&ne===4){let fe=A9(n,Q,h,$-Q);if(fe>=m&&w1(n,Q+fe,$)){U=!0;break}}z=k(n,$)}let H=z>L&&n[z-1]===`
47
+ `?z-1:z;H>L&&n[H-1]==="\r"&&H--;let Y=p1(n.slice(L,H));E&&(Y=r$(Y,E));let K=U&&z<n.length?k(n,I(n,z)):z;return{type:O.codeBlock,text:Y,lang:D,attrs:M,endPos:K}}function p6(n,i,o){for(var u=0;u<n.length;u++)if(!d$(n[u])){let m=e$(n,i,o,{inline:!1,inBlockQuote:!0});for(var h=0;h<m.length;h++){let y=m[h];"endPos"in y&&delete y.endPos}return m}return[]}function uZ(n,i,o,u){if(o.inline)return null;let h=i;for(;h<n.length&&(n[h]===" "||n[h]===" ");)h++;if(h>=n.length||n[h]!==">")return null;let m=i;for(var y=[],_=void 0,v=-1,E=!1,S=null,w=null,T=0,R=!1;m<n.length;){let Y=I(n,m),K=m;for(;K<Y&&(n[K]===" "||n[K]===" ");)K++;if(K<Y&&n[K]===">"){let $=K+1;$<Y&&n[$]===" "&&$++;let Q=t(n,$,Y).spaceEquivalent>=4,ne=!1,fe=null,W=0;if($<Y){let be=n[$];if(be==="`"||be==="~"){let ve=0,_e=$;for(;_e<Y&&n[_e]===be&&ve<20;)ve++,_e++;ve>=3&&(ne=!0,fe=be,W=ve)}}E&&S==="fenced"&&fe===w&&W>=T?(E=!1,S=null,w=null,T=0):(Q||ne)&&(E=!0,S=Q?"indented":"fenced",w=fe,T=W);var D=!Q&&!ne;if(D){for(var N=$;N<Y;N++)if(!d$(n[N])){D=!1;break}}R=D,v===-1&&!D&&(v=y.length);let le=K+1;if(le<Y&&n[le]===" "){y.push(" ");let be=4;for(let ve=le+1;ve<Y;ve++){let _e=n[ve];var M=b(_e);if(M===l){let F=4-be%4;F===1?y.push(" "):F===2?y.push(" "):F===3?y.push(" "):y.push(" ".repeat(F)),be+=F}else y.push(_e),be++}Y<n.length&&y.push(`
48
+ `)}else{let be=le;be<Y&&n[be]===" "&&be++,y.push(n.slice(be,Y)),Y<n.length&&y.push(`
49
+ `)}}else{for(var L=!0,N=m;N<Y;N++)if(!d$(n[N])){L=!1;break}if(L||E)break;if(t(n,m,Y).spaceEquivalent===0){let $=l9(n,m,o,u);if($&&$.type!==O.ref&&$.type!==O.codeBlock||R)break}y.push(n.slice(m,Y)),Y<n.length&&y.push(`
50
+ `)}m=k(n,Y)}if(m===i)return null;y.length>0&&y[y.length-1]===`
51
+ `&&y.pop();let z=y.join("");if(z.length>=4&&z.charCodeAt(0)===g1&&z.charCodeAt(1)===F9){let Y=z.indexOf(`]
52
+ `,2);Y>2&&(_=z.slice(2,Y),z=z.slice(Y+2))}let U=p6(z,o,u),H={type:O.blockQuote,children:U,endPos:m};return _&&(H.alert=_),H}function r$(n,i){return n.split(`
53
+ `).map(function(o){if(o.length===0)return o;let u=i,h=0,m=0,y=0;for(;m<o.length&&h<u;)if(o[m]===" ")h++,y++,m++;else if(o[m]===" "){let _=4-y%4;if(h+_<=u)h+=_,y+=_,m++;else{let v=u-h,E=Math.max(0,_-v);return" ".repeat(E)+o.slice(m+1)}}else break;return o.slice(m)}).join(`
54
+ `)}function K$(n,i,o,u,h=!0){let m=(h?`
55
+ `:"")+n,y=u9(m,0,m.length,o,u);i.length>0&&i[i.length-1].type===O.paragraph?i[i.length-1].children.push(...y):i.push(...y)}function k9(n){return n.some(function(i){return i.type===O.codeBlock||i.type===O.paragraph||i.type===O.blockQuote||i.type===O.orderedList||i.type===O.unorderedList||i.type===O.heading})}function g$(n){return!!n.match(n$)}function lZ(n){if(n.length===0)return n;var i=n[n.length-1];return(i.type===O.orderedList||i.type===O.unorderedList)&&i.items?.length>0?lZ(i.items.slice(-1)[0]):n}function s$(n,i,o,u,h,m,y){if(!c(h,"["))return null;var _={inline:!1,refs:m.refs||{}},v=B9(n,i+u.charCount,_,y,!1);return v?v.endPos:null}function TZ(n,i,o,u){return n.length!==1||!o||n[0].length!==0?!1:!!(i||!i&&u.trim()==="")}function SZ(n,i){var o=n.index||0;return i?o+n[1].length+n[2].length+1:o+n[1].length+1}function j$(n,i,o,u,h){for(var m=0,y=u+h,_=i;_<o&&m<4;){var v=b(n,_);if(v===C)m++,y++;else if(v===l){var E=4-y%4;if(m+E>4)break;m+=E,y+=E}else break;_++}return{contentStartColumn:y,contentStartPos:_}}function C$(n){var i=n.match(n$);return i?i[1]?{match:[n,i[1],i[2],i[3]],ordered:!0,listItemRegex:u$}:i[4]?{match:[n,i[4],i[5],""],ordered:!0,listItemRegex:u$}:i[6]?{match:[n,i[6],i[7]],ordered:!1,listItemRegex:l$}:i[8]?{match:[n,i[8],""],ordered:!1,listItemRegex:l$}:null:null}function o1(n,i,o,u,h,m,y){if(i.spaceEquivalent!==m)return!1;var _=n.match(y);if(_)return o?_[2]===h:_[1]===u;var v=n.match(n$);return v?o?v[4]&&v[5]===h:v[8]===u:!1}function dZ(n,i,o,u){for(var h=i,m=o,y=i[0];m<n.length;){var _=I(n,m),v=n.slice(m,_),E=c(v," ".repeat(u))?v.slice(u):v;if(c(E.trim(),y)&&A9(E.trim(),0,y)>=3)return{content:h,endPos:k(n,_)};h+=`
56
+ `+E,m=k(n,_)}return{content:h,endPos:m}}function Y$(n,i,o,u,h,m,y,_,v,E,S,w,T){var R=E?void 0:v[1],D=E?v[2]:void 0,N=E?u$:l$,M=S;if(!S)for(var L=k(n,m),z=L;z<n.length;){var U=I(n,z),H=n.slice(z,U),Y=t(n,z,U),K=Y.spaceEquivalent;if(w1(n,z,U)){var $=k(n,U);if($<n.length){var Q=I(n,$),ne=t(n,$,Q),fe=ne.spaceEquivalent,be=SZ(v,E),ve=h+_+be,_e=j$(n,ve,m,y,be),F=_e.contentStartColumn;if(fe+1>F){M=!0;break}}break}else if(K<=y){var W=H.slice(Y.charCount),le=W.match(N);if(le&&(E?le[2]===D:le[1]===R))break}z=k(n,U)}var be=SZ(v,E),ve=h+_+be,_e=j$(n,ve,m,y,be),F=_e.contentStartColumn,ce=u,te=k(n,m);if(c(u,"```")||c(u,"~~~")){var Se=E?v[1].length+v[2].length+1:v[1].length+1,xe=dZ(n,u,te,Se);ce=xe.content,te=xe.endPos}return i.push(iZ(ce,M,w,T)),o.push(F),{newCurrentPos:te,itemHasBlankLine:M}}function EZ(n,i,o,u,h,m){if(h>u||m.disableParsingRawHTML)return!1;let y=i+o;return y>=n.length||n[y]!=="<"?!1:u6(n,y)}function u6(n,i){if(i>=n.length||n[i]!=="<")return!1;let o=n.length,u=i+1;if(u<o&&n[u]==="/"&&u++,u>=o)return!1;let h=b(n,u);if(!U9(h))return!1;for(u++;u<o;){let y=n[u],_=b(n,u);if(y===">"||y===" "||y===" "||y===`
57
+ `||y==="\r"||y==="/")break;if(y==="-"||y==="_"||U9(_)||_>=48&&_<=57)u++;else return!1}let m=0;for(;u<o;){let y=n[u],_=b(n,u);if(m===1)y==='"'&&(m=0),u++;else if(m===2)y==="'"&&(m=0),u++;else if(y==='"')m=1,u++;else if(y==="'")m=2,u++;else{if(y===">")return!0;if(y==="/"&&u+1<o&&n[u+1]===">")return!0;if(_===10||_===13)return!1;u++}}return!1}function xZ(n,i,o,u,h,m,y,_,v,E,S,w){let T=u,R=!1;for(;T<n.length;){let D=I(n,T),N=t(n,T,D),M=N.spaceEquivalent;if(w1(n,T,D)){R=!0,T=k(n,D);continue}let L=n.slice(T+N.charCount,D);if(M<=h&&o1(L,N,m,y,_,h,v))break;if(M>=o){if(w&&R){let U=s$(n,T,D,N,L,E,S);if(U){T=U,R=!1;continue}}let z=V$(n,T,D,N,o-1,o,i,R,E,S,void 0);if(z.processed){T=z.newPos,R=z.wasBlank;continue}}else break}return T}function PZ(n,i,o,u){let h=e$(n,o,u,{inline:!1,list:!0});if(h.length>0)return!i&&h.length===1&&h[0].type===O.paragraph?h[0].children:h;let m=W$(o,!0,()=>l1(n,0,n.length,o,u));return i&&m.length>0?[{type:O.paragraph,children:m}]:m}function iZ(n,i,o,u){let h=k6(n,0);if(!(h&&(h.endPos>=n.length||n[h.endPos]===" ")))return PZ(n,i,o,u);let m=h.endPos<n.length?h.endPos+1:h.endPos,y=n.slice(m),_=PZ(y,i,o,u),v=[h];return h.endPos<n.length&&v.push({type:O.text,text:" "}),v.push(..._),v}function IZ(n,i){if(!n[0])return!1;let o=n[0].indexOf(i);if(o===-1)return!1;let u=o+i.length;if(u>=n[0].length)return!1;let h=n[0][u];return h?b(h)===_Z:!1}function cZ(n,i,o){if(n.length===0)return!1;let u=n[n.length-1],h=i.trim();if(!c(h,"=")&&!c(h,"-")||h.length<1||!/^[=-]+[ \t]*$/.test(h))return!1;let m=[],y="";if(u.type===O.paragraph){let v=u;m=v.children,y=v.children.map(E=>E.type===O.text?E.text:"").join("").trim()}else if(u.type===O.text){let v=[],E=n.length-1;for(;E>=0&&n[E].type===O.text;)v.unshift(n[E]),E--;v.length>0&&(m=v,y=v.map(S=>S.text).join("").trim())}if(!y)return!1;let _=h[0]==="="?1:2;if(u.type===O.paragraph)n.pop();else if(u.type===O.text)for(;n.length>0&&n[n.length-1].type===O.text;)n.pop();return n.push(z$(_,m,y,o.slugify)),!0}function V$(n,i,o,u,h,m,y,_,v,E,S,w){let T=u.spaceEquivalent,R=n.slice(i+u.charCount,o);if(T>=h+4){let L=X$(n,i);if(L){let z=L,U=r$(z.text||"",m);return y.push({...z,text:U}),{processed:!0,newPos:z.endPos,wasBlank:!1}}}let D=T-(m-1);if(T+1>=m&&D<=3){let L=i+u.charCount;if(L<o){let z=n[L];if(z==="`"||z==="~"){let U=$Z(n,L,v,E);if(U){let H=U,Y=r$(H.text||"",m-1);return y.push({...H,text:Y,endPos:H.endPos}),{processed:!0,newPos:H.endPos,wasBlank:!1}}}if(z==="|"){let U=aZ(n,L,v,E);if(U){let H=U;return y.push(H),{processed:!0,newPos:H.endPos,wasBlank:!1}}}}}if(R.length>0&&(R[0]==="-"||R[0]==="*"||R[0]==="+"||R[0]>="0"&&R[0]<="9")&&/^([-*+]|\d{1,9}[.)])\s+/.test(R)){let L=u9(R,0,R.length,v,E);return y.push({type:O.text,text:`
58
+ `},...L),{processed:!0,newPos:k(n,o),wasBlank:!1}}let N=M6(n,i,y,R,v,E);if(N!==null)return{processed:!0,newPos:N,wasBlank:!1};let M=e$(R,v,E,{inline:!1,list:!0});if(M.length>0){if(S&&M[0].type===O.paragraph){let L=M[0];y.push({type:O.text,text:`
59
+ `},...L.children),M.length>1&&y.push(...M.slice(1))}else if(!_&&M[0].type===O.paragraph&&y.length>0){let L=y[y.length-1],z=M[0];L.type===O.paragraph?L.children.push({type:O.text,text:`
60
+ `},...z.children):L.type===O.heading?y.push(...z.children):k9(y)?y.push(...M):y.push({type:O.text,text:" "},...z.children),M.length>1&&y.push(...M.slice(1))}else y.push(...M);return{processed:!0,newPos:k(n,o),wasBlank:!1}}if(_){let L=W$(v,!0,()=>l1(R,0,R.length,v,E));y.push({type:O.paragraph,children:L})}else K$(R,y,v,E);return{processed:!0,newPos:k(n,o),wasBlank:!1}}function o$(n,i,o,u){if(o.inline)return null;var h=o.inList;if(o.inList=!0,i>0){var m=b(n,i-1);if(m!==d&&m!==V0)return o.inList=h,null}var y=I(n,i),_=t(n,i,y);if(_.spaceEquivalent>3&&!o.inList)return o.inList=h,null;var v=n.slice(i,y),E=_.charCount,S=v.slice(E),w=C$(S);if(!w)return o.inList=h,null;var{match:T,ordered:R,listItemRegex:D}=w,N=_.spaceEquivalent,M=R?parseInt(T[1],10):void 0,L=R?T[2]:void 0,z=R?void 0:T[1],U=R?T[3]==="":T[2]==="";function H(ge,ke){if(ge===0)return!0;var Ue=b(n,ge-1);if(Ue!==d)return!1;if(!ke)return!0;for(var Re=ge-2;Re>=0;){var Ne=b(n,Re);if(Ne!==C&&Ne!==l)break;Re--}return Re<0||b(n,Re)===d}if(U&&!H(i,!0))return o.inList=h,null;if(R&&M!==1&&!H(i,!1)||!R&&IZ(T,z))return null;var Y=T.index||0,K=R?Y+T[1].length+T[2].length+1:U?Y+T[1].length:Y+T[1].length+1,$=i+E+K,Q=j$(n,$,y,N,K),ne=Q.contentStartColumn,fe=N+Y+T[1].length,W=R?fe+T[2].length+1:U?fe:fe+1,le=[],be=[];function ve(ge,ke,Ue){return Ue?ge>=ke:ge>ke}function _e(){return le[le.length-1]}function F(){return be[be.length-1]??ne}function ce(ge,ke){let Ue=lZ(ke),Re=o.inList;o.inList=!0;let Ne=o$(n,ge,o,u);return o.inList=Re,Ne?(Ue.push(Ne),Ne):null}for(var te=k(n,y),Se=te,xe=!1;Se<n.length;){var q=I(n,Se),ie=n.slice(Se,q);if(ie.trim()===""){for(var oe=k(n,q);oe<n.length;){var Ee=b(n,oe);if(Ee!==d){if(!x6.has(n[oe]))break}oe++}var pe=I(n,oe),Oe=n.slice(oe,pe),Te=t(n,oe,pe),Ie=Oe.slice(Te.charCount);if(o1(Ie,Te,R,z,L,N,D))xe=!0;else{var je=s$(n,oe,pe,Te,Ie,o,u);if(je){for(var Ve=je;Ve<n.length&&b(n,Ve)===d;)Ve++;if(Ve<n.length){var qt=I(n,Ve),Ye=n.slice(Ve,qt),ot=t(n,Ve,qt),Xt=Ye.slice(ot.charCount);o1(Xt,ot,R,z,L,N,D)&&(xe=!0)}}}break}var ze=t(n,Se,q),Je=ie.slice(ze.charCount),Rt=C$(Je);if(!Rt)break;var At=Rt.match;if(R){if(At[2]!==L)break}else if(At[1]!==z)break;Se=k(n,q)}var ft=R?T[3]:T[2];ft=ft.trimStart();for(var ut=i+E+(T.index||0),Fe=R?ut+T[1].length+T[2].length:ut+T[1].length,nn=Fe;nn<n.length;){var Ee=b(n,nn);if(Ee!==C&&Ee!==l)break;nn++}for(var tt=0,we=Fe;we<y;){var Ee=b(n,we);if(Ee===l)tt+=4-tt%4;else if(Ee===C)tt++;else break;we++}var ct=!1;if(Fe<n.length&&b(n,Fe)===l){for(var Dt=1,kt=Fe+1;kt<n.length&&b(n,kt)===l;)Dt++,kt++;Dt>=2&&(ft=" "+ft,ct=!0)}R||(U=U&&tt===0),tt>=4&&!ct&&(ft=" ".repeat(tt-1)+ft.trimStart()),ft.trim();let Lt=xe;if(!xe&&te<n.length)for(var mn=te;mn<n.length;){var Tn=I(n,mn),Wn=n.slice(mn,Tn);if(w1(n,mn,Tn)){for(var rt=k(n,Tn);rt<n.length;){var hn=I(n,rt);if(w1(n,rt,hn))rt=k(n,hn);else break}if(rt<n.length){var gt=t(n,rt,n.length),yt=gt.spaceEquivalent;if(yt>=N){for(var pt=n.slice(rt,I(n,rt)),Bt=pt.slice(gt.charCount).match(D),Rn=Bt&&(R?Bt[2]===L:Bt[1]===z),An=null,zt=te;zt<mn;zt=I(n,zt)+1){var Xe=I(n,zt),Yt=t(n,zt,Xe),_t=n.slice(zt,Xe).slice(Yt.charCount).match(D),Cn=_t&&Yt.spaceEquivalent>N&&Yt.spaceEquivalent>=ne&&(R?_t[2]===L:_t[1]===z);if(Cn){var yn=Yt.spaceEquivalent+1,vt=R?yn+_t[1].length+_t[2].length+1:yn+_t[1].length+1,sn=zt+Yt.charCount+_t[0].length,Jn=j$(n,sn,Xe,yn,vt-yn);An=Jn.contentStartColumn;break}}var jn=tt>=5?W:ne;!Rn&&yt>=jn&&(An===null||yt+1<An)&&(Lt=!0)}}break}var Hn=t(n,mn,Tn),On=Hn.spaceEquivalent,Nn=Wn.slice(Hn.charCount),vn=Nn.match(D),Kt=vn&&(R?vn[2]===L:vn[1]===z);if(Kt&&On<=N)break;mn=k(n,Tn)}var Ke=ft;if(c(ft,"```")||c(ft,"~~~")){var Qt=R?T[1].length+T[2].length+1:T[1].length+1,Pt=dZ(n,ft,te,Qt);Ke=Pt.content,te=Pt.endPos}var Wt=!U&&ft.trim()===""&&tt>0&&tt<5;if(!Lt)for(var Qe=Ke.length>0?Ke[0]:"",qe=Qe===">",i=te;i<n.length;){var y=I(n,i),v=n.slice(i,y);if(v.trim()==="")break;var _=t(n,i,y);if(_.spaceEquivalent<W)break;var S=v.slice(_.charCount);if(_.spaceEquivalent<=N&&o1(S,_,R,z,L,N,D)||g$(S)&&_.spaceEquivalent>N)break;var Vt=S.length>0?S[0]:"",Nt=Vt===">"&&qe;if(Vt===">"&&!Nt||Vt==="#"||c(S,"```")||c(S,"~~~"))break;Ke+=`
61
+ `+S,te=i=k(n,y)}if(le.push(iZ(Ke,Lt,o,u)),be.push(ne),Lt&&(tt>=5||Wt)){let ge=_e();te=xZ(n,ge,W,te,N,R,z,L,D,o,u,!0)}else if(!Lt){let ge=W-1;for(;te<n.length;){let ke=I(n,te),Ue=n.slice(te,ke),Re=t(n,te,ke),Ne=Re.spaceEquivalent,We=Ue.slice(Re.charCount);if(Ue.trim()===""||Ne<=N&&o1(We,Re,R,z,L,N,D)||g$(We)&&Ne>N||Ne<ge)break;let Ct=_e(),Be=V$(n,te,ke,Re,ge,ne,Ct,!1,o,u,!0);if(Be.processed)te=Be.newPos;else break}}for(var lt=!1;te<n.length;){let ge=I(n,te),ke=n.slice(te,ge),Ue=t(n,te,ge),Re=Ue.charCount,Ne=Ue.spaceEquivalent;if(ke.trim()==="")xe=!0,lt=!0,te=k(n,ge);else if(Ne<N){let We=ke.slice(Re);if(We.startsWith("<")&&EZ(n,te,Re,N,Ne,u))break;let Ct=We.trim();if(Ct.length>0&&le.length>0&&!p9(Ct[0])&&!o1(We,Ue,R,z,L,N,D)){let Be=_e();if(Be.length>0){let Ze=Be[Be.length-1];if(!lt&&(Ze.type===O.paragraph||Ze.type===O.text)){K$(We,Be,o,u),lt=!1,te=k(n,ge);continue}}}break}else{let We=ke.slice(Re);if(le.length>0){let He=be[le.length-1]||ne;if(Ne+1>=He&&!o1(We,Ue,R,z,L,N,D)){let Mt=_e();if(Mt.length>0&&cZ(Mt,We,u)){te=k(n,ge);continue}}}if(D$(n,te))break;if(lt){let He=s$(n,te,ge,Ue,We,o,u);if(He){te=He,lt=!1;continue}}if(Ne<=N){if(We.startsWith("<")&&EZ(n,te,Re,N,Ne,u))break;if(!o1(We,Ue,R,z,L,N,D)){if(Ne===N&&!lt){let He=We.trim();if(He.length>0&&!p9(He[0])){let Mt=l9(n,te,o,u);if(Mt&&Mt.type!==O.paragraph)break;let Ot=_e();if(Ot.length>0&&!k9(Ot)){K$(We,Ot,o,u,!0),lt=!1,te=k(n,ge);continue}}}break}}if(TZ(le,U,lt,ft))break;let Ct=C$(We),Be=Ct?Ct.match:null,Ze=Be&&(R?Be[2]===L:Be[1]===z);if(Ze&&Ne>3&&lt)break;if(Ze&&Ne<=N+3){if(Ne>=4&&lt)break;if(Ne===N){let He=R?Be[3]:Be[2];if(He=He.trimStart(),te=Y$(n,le,be,He,te,ge,Ne,Re,Be,R,xe,o,u).newCurrentPos,lt=!1,He.trim()===""){let Mt=le[le.length-1],Ot=F();te=xZ(n,Mt,Ot,te,N,R,z,L,D,o,u)}continue}if(Ne>N){if(lt){let Le=R?Be[3]:Be[2];Le=Le.trimStart(),te=Y$(n,le,be,Le,te,ge,Ne,Re,Be,R,xe,o,u).newCurrentPos,lt=!1;continue}let He=_e(),Mt=Ne+1,Ot=ve(Mt,F(),k9(He));if(Ot){let Le=ce(te,He);if(Le){te=Le.endPos,lt=!1;continue}}if(!Ot&&Ze){let Le=R?Be[3]:Be[2];if(Le=Le.trimStart(),!xe){let an=k(n,ge);for(;an<n.length;){let Gt=I(n,an),jt=n.slice(an,Gt),Ut=t(n,an,Gt),Zn=Ut.spaceEquivalent;if(jt.trim()===""){let Jt=k(n,Gt);if(Jt<n.length){let fa=t(n,Jt,n.length).spaceEquivalent,bn=Ne+(R?Be[1].length+Be[2].length+1:Be[1].length+1);if(fa+1>bn)break}break}else if(Zn<=N){let Jt=jt.slice(Ut.charCount).match(D);if(Jt&&(R?Jt[2]===L:Jt[1]===z)&&Zn<=N)break}an=k(n,Gt)}}te=Y$(n,le,be,Le,te,ge,Ne,Re,Be,R,xe,o,u).newCurrentPos,lt=!1;continue}else if(!Ot&&!Ze)break;{let Le=_e(),an=Le.length===0;if(an&&TZ(le,U,lt,ft))break;let Gt=Le.some(Ut=>Ut.type===O.codeBlock||Ut.type===O.paragraph||Ut.type===O.blockQuote||Ut.type===O.orderedList||Ut.type===O.unorderedList||Ut.type===O.heading),jt=an&&le.length===1?W:ne;if(Gt?Ne>=jt:Ne>jt){let Ut=V$(n,te,ge,Ue,jt,ne,_e(),lt,o,u,void 0);if(Ut.processed){lt=Ut.wasBlank,te=Ut.newPos;continue}}else break}}else if(Ne===N){if(!R&&Be&&IZ(Be,Be[1]))break;let He=R?Be[3]:Be[2];He=He.trimStart(),te=Y$(n,le,be,He,te,ge,N,Re,Be,R,xe,o,u).newCurrentPos,lt=!1}}else if(Ne>N){let He=_e();if(g$(We)){let Ot=Ne+1;if(ve(Ot,F(),k9(He))){let Le=ce(te,He);if(Le){te=Le.endPos,lt=!1;continue}}if(Ne-N>3){let Le=He.length>0?He[He.length-1]:null;if(Le&&(Le.type===O.paragraph||Le.type===O.text)){K$(We,He,o,u),lt=!1,te=k(n,ge);continue}}else break}else{let Ot=ce(te,He);if(Ot){te=Ot.endPos,lt=!1;continue}}let Mt=ne;if(k9(He)?Ne>=Mt-1:Ne>Mt-1){let Ot=V$(n,te,ge,Ue,Mt-1,ne,_e(),lt,o,u,void 0);if(Ot.processed){lt=Ot.wasBlank,te=Ot.newPos;continue}}else break}else break}}if(xe&&le.length>1&&le[0].length>0&&le[0][0].type!==O.paragraph){for(var qn=1;qn<le.length;qn++)if(le[qn].length>0&&le[qn][0].type===O.paragraph){for(var wn=!1,ye=0;ye<le[0].length;ye++){var V=le[0][ye].type;if(V===O.codeBlock||V===O.heading||V===O.blockQuote||V===O.orderedList||V===O.unorderedList||V===O.htmlBlock||V===O.breakThematic){wn=!0;break}}wn||(le[0]=[{type:O.paragraph,children:le[0]}]);break}}let me=R?{type:O.orderedList,items:le,ordered:!0,start:M}:{type:O.unorderedList,items:le,ordered:!1};return o.inList=h,{...me,endPos:te}}function aZ(n,i,o,u){if(o.inline)return null;let h=[],m=i;for(;m<n.length;){let D=I(n,m);if(w1(n,m,D))break;let N=n.slice(m,D).trim();if(!(N.indexOf("|")!==-1||h.length>=3&&N&&!p9(N[0])))break;h.push(N),m=k(n,D)}if(h.length<2)return null;let y=D=>D[0]==="|"&&D[D.length-1]==="|"?D.slice(1,-1):D,_=D=>{let N=[],M="",L=!1;for(let z=0;z<D.length;z++){let U=D[z];U==="\\"&&z+1<D.length&&D[z+1]==="|"?(M+="|",z++):U==="`"?(L=!L,M+=U):U==="|"&&!L?(N.push(M.trim()),M=""):M+=U}return N.push(M.trim()),N},v=_(y(h[0]));if(!v.length)return null;let E=_(y(h[1]));if(E.length!==v.length||E.some(D=>!/^:?-+:?$/.test(D)))return null;let S=E.map(D=>{let N=D[0]===":",M=D[D.length-1]===":";return N&&M?"center":N?"left":M?"right":null});if(u.optimizeForStreaming&&h.length===2)return null;let w=D=>W$(o,!0,()=>D.map(N=>l1(N,0,N.length,o,u))),T=w(v),R=h.slice(2).map(D=>{let N=D.indexOf("|")!==-1?_(y(D)):[D.trim()],M=v.length;for(;N.length<M;)N.push("");return N.length=M,w(N)});return{type:O.table,header:T,cells:R,align:S,endPos:m}}var l6=["div","p","section","article","aside","nav","header","footer","main","h1","h2","h3","h4","h5","h6","blockquote","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","td","th","form","fieldset","hr","pre","details","summary","figure","figcaption"],d6=new Set(["pre","script","style","textarea"]);function m9(n){return l6.indexOf(n.toLowerCase())!==-1}function w9(n){return d6.has(n)}function w1(n,i,o){for(var u=i;u<o;u++){let h=b(n,u);if(h!==C&&h!==l&&h!==V0)return!1}return!0}function W$(n,i,o){let u=n.inline;n.inline=i;try{return o()}finally{n.inline=u}}function k$(n,i,o){for(var u=i;u<o;){var h=I(n,u);if(w1(n,u,h))return u;u=k(n,h)}return o}function m$(n,i,o){return{type:O.htmlComment,text:p1(n),endPos:i,...o}}function v9(n,i,o,u,h,m,y,_,v){var E=p1(i),S=E;if(_&&(_.forceBlock||_.optimizeForStreaming)&&i&&!m){var w=new RegExp("^<"+n.toLowerCase()+"(\\s[^>]*)?>$","i");w.test(i.trim())&&(S="")}var T=S,R=n.toLowerCase(),D=new RegExp("^<"+R+"[\\s>]","i");if(D.test(T)){var N=T.indexOf(">");if(N!==-1){T=T.slice(N+1);var M="</"+R+">",L=T.indexOf(M);L!==-1&&(T=T.slice(0,L))}}else{var z="</"+R+">",U=T.indexOf(z);U!==-1&&(T=T.slice(0,U))}var H=[];if(T&&_&&!_.optimizeForStreaming){var Y=v||{inline:!1,inHTML:!0,inAnchor:!1},K=T.trim(),$=F$.test(K),Q=O$.test(K),ne=H$.test(K);if($||Q||ne){var fe={...Y,inline:!1,inHTML:!0,inAnchor:Y.inAnchor||R==="a"};H=d9(K,fe,_)}else if(K){var W={...Y,inline:!0,inHTML:!0,inAnchor:Y.inAnchor||R==="a"};H=l1(K,0,K.length,W,_)}}return{type:O.htmlBlock,tag:n,attrs:u||{},rawAttrs:h,children:H,rawText:S,text:T,verbatim:!0,isClosingTag:m,canInterruptParagraph:y,endPos:o}}function h9(n){let i=O$.test(n),o=F$.test(n),u=N6.test(n);return i||o&&!u}function fZ(n,i,o,u,h,m,y,_,v,E){if(!_.inHTML&&!_.inline&&!n9(h,`
62
+ `)){let Te=m,Ie=y.length;for(;Te<Ie;){let je=I(y,Te);if(w1(y,Te,je))break;let Ve=y.slice(Te,je).trim();if(Ve.length>0&&p9(Ve[0])){let qt=M$(y,Te,_,E);if(qt){Te=qt.endPos;continue}let Ye=n1(y,Te);if(Ye){Te=Ye.endPos;continue}return null}Te=k(y,je)}}let S=i,w=w9(S);var T=!w&&!K9(i),R=void 0;if(h){var D=h.indexOf(">");if(D!==-1){var N=h.slice(0,D+1);N.indexOf(`
63
+ `)!==-1&&(R=N);for(var M=D,L=1;L<D;L++){var z=N[L];if(z===" "||z===" "||z===`
64
+ `||z===">"){M=L;break}}o=N.slice(M,D)}}var U=o.replace(/^[\s\n\r\t]+/,""),H=u1(U,i,n,E),Y={...H},K=!1,$=!1;if(T&&u.length>0){var Q="</"+S,ne=u.indexOf(Q);if(ne>=0){for(var fe=ne+Q.length;fe<u.length&&(u[fe]===" "||u[fe]===" ");)fe++;if(fe<u.length&&u[fe]===">"){var W=u.slice(0,ne);h9(W)?(u=W,$=!0):K=!0}}if(!$){var le=u.length-1;if(u[le]===`
65
+ `){for(le--;le>=0&&(u[le]===" "||u[le]===" "||u[le]==="\r");)le--;le>=0&&u[le]===`
66
+ `&&(K=!0)}}}var be=w||T&&K&&!h9(u),ve=p1(u),_e=ve;if(be){ve.length>0&&ve[0]===`
67
+ `&&(ve=ve.slice(1),_e=ve),ve.length>0&&ve[ve.length-1]===`
68
+ `&&(ve=ve.slice(0,-1),_e=ve);var Q="</"+S+">",ne=ve.indexOf(Q);ne!==-1&&(ve=ve.slice(0,ne))}let F=ve.match(/^([ \t]*)/),ce=F?F[1]:"",te=new RegExp(`^${ce.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,"gm"),Se=ve.replace(te,""),xe=F$.test(Se),q=O$.test(Se),ie=S==="p",oe=H$.test(Se),Ee=ie?xe:xe||q||_.inHTML&&oe,pe=[];if(Se)if(Ee||oe){let Te={..._,inline:!1,inHTML:!0,inAnchor:_.inAnchor||S==="a"};pe=d9(Se,Te,E)}else{let Te={..._,inline:!0,inHTML:E.optimizeForStreaming?!0:_.inHTML,inAnchor:_.inAnchor||S==="a"};pe=l1(Se,0,Se.length,Te,E)}var Oe=void 0;return be&&(R!==void 0?Oe=R+_e:Oe=_e),{type:O.htmlBlock,tag:be?i:n,attrs:Y,rawAttrs:o,children:pe,rawText:Oe,text:Se,verbatim:be,canInterruptParagraph:!0,endPos:m}}function M$(n,i,o,u){if(n[i]!=="<"||u.optimizeForStreaming&&o.inHTML)return null;if(o.inline,i+1<n.length){if(n[i+1]==="?"){var h=U$(n,i);if(h&&h.kind==="pi")return m$(h.text||"",h.endPos,{raw:!0})}else if(n[i+1]==="!"){if(i+3<n.length&&n.slice(i,i+4)==="<!--"){o.inline;var m=U$(n,i);if(m&&m.kind==="comment"){var y=m.text||"",_=!1;return y==="<!-->"?(y="",_=!0):y==="<!--->"?(y="-",_=!0):y.startsWith("<!--")&&y.endsWith("-->")&&(y=y.slice(4,-3)),o.inline,m$(y,m.endPos,{endsWithGreaterThan:_})}}var v=U$(n,i);if(v&&(v.kind==="declaration"||v.kind==="cdata"))return m$(v.text||"",v.endPos,{raw:!0})}}if(i+1<n.length){let oi=n[i+1];if(oi===" "||oi===`
69
+ `||oi===" "||oi==="\r")return null}var E=n.indexOf(">",i+1);if(E!==-1){var S=n.slice(i+1,E),w=S.indexOf(" ")!==-1||S.indexOf(" ")!==-1;if(!w&&(c(S,"http://")||c(S,"https://"))||!w&&mZ(S))return null}var T=n1(n,i);if(!T&&!o.inline){for(var R=n.length,D=I(n,i),N=i,M=0;N<D&&M<3&&(n[N]===" "||n[N]===" ");)M++,N++;if(N>=D||n[N]!=="<")return null;if(N+1<D){var bn=i$(n,N+1);if(bn){var Pn=bn.tagName,L=m9(Pn);if(!L)return null;for(var z=bn.nextPos,U=!1,H=!1,Y="",K=D,$=!1;K<R&&!$;){for(var Q=!1;z<K;){var ne=n[z];if(H)ne===Y&&(H=!1,Y=""),(ne===`
70
+ `||ne==="\r")&&(U=!0),z++,Q=!0;else if(ne==='"'||ne==="'")H=!0,Y=ne,z++,Q=!0;else if(ne===`
71
+ `||ne==="\r"){U=!0,z++,Q=!0;var fe=I(n,z);if(fe===z)break;K=fe}else if(ne===">"){z++,$=!0;break}else z++,Q=!0}if($)break;if(!Q&&z>=K){var W=I(n,K+1);if(W<=K)break;K=W}else if(z>=K&&K<R){var W=I(n,K+1);if(W<=K)break;K=W}else break}if(!U&&$)return null;z>=D&&D<R&&(z=D);var le=L?"type6":"type7",be=z,ve=k$(n,k(n,D),R),_e=n.slice(be,ve),F=i+1<n.length&&n[i+1]==="/";if(le==="type7"&&_e.trim()===""){var ce=n.slice(i,ve),te=I(ce,0);te<ce.length&&te++;var Se=ce.slice(0,te);return v9(Pn,Se,ve,{},void 0,F,!1,u,o)}var xe=n.slice(i,ve);return v9(Pn,xe,ve,{},void 0,F,le==="type6",u,o)}}return null}if(!T)return null;if(E!==-1){var q=n.slice(i+1,E);if((c(q,"http://")||c(q,"https://"))&&(q.indexOf(" ")!==-1||q.indexOf(" ")!==-1))return null}var Ie=i+(T.isClosing?2:1);if(Ie<n.length){var ie=n[Ie],oe=b(ie);if((oe>=97&&oe<=122||oe>=65&&oe<=90)&&Ie+1<n.length&&n[Ie+1]===":")return null}if(T.isClosing){var Ee=T.attrs.trim();if(Ee.length>0)return null;if(!o.inline){for(var R=n.length,D=I(n,i),be=T.endPos,pe=be;pe<D&&(n[pe]===" "||n[pe]===" "||n[pe]==="\r");)pe++;var Oe=pe>=D||n[pe]==="<"&&(function(){var Qr=n1(n,pe);return Qr&&m9(Qr.tagLower)})();if(Oe){var ve=k$(n,k(n,D),R),_e=n.slice(be,ve);_e.length>0&&(_e[0]==="\r"&&_e[1]===`
72
+ `?_e=_e.slice(2):(_e[0]===`
73
+ `||_e[0]==="\r")&&(_e=_e.slice(1)));let sa=T.tagLower||T.tagName.toLowerCase();return v9(T.tagName,_e,ve,u1(T.whitespaceBeforeAttrs+T.attrs,sa,T.tagName,u),T.whitespaceBeforeAttrs+T.attrs,!0,!1,u,o)}}var Te=n.slice(i,T.endPos);return{type:O.htmlSelfClosing,tag:T.tagName,attrs:{},endPos:T.endPos,isClosingTag:!0,rawText:Te}}var Ie=i+(T.isClosing?2:1);if(Ie<n.length){var je=n[Ie];if(je===" "||je===" "||je===`
74
+ `||je==="\r")return null}var Ve=T.tagLower,qt=K9(T.tagName);let Ye=T.tagName.length>0&&T.tagName[0]>="A"&&T.tagName[0]<="Z";if(T.isSelfClosing||qt&&Ve!=="a"){if(T.hasNewline&&!Ye||!o.inHTML&&!o.inline&&!Ye)return null;var ot=T.attrs.replace(/\/\s*$/,""),Xt=u1(ot,Ve,T.tagName,u),Te=o.inline?n.slice(i,T.endPos):void 0;let Ai={type:O.htmlSelfClosing,tag:T.tagName,attrs:Xt,endPos:T.endPos};return Te!==void 0&&(Ai.rawText=Te),Ai}if(o.inline){var ze=T.attrs.replace(/\/\s*$/,""),Je=T.whitespaceBeforeAttrs+ze,Rt=u1(ze,Ve,T.tagName,u),At={...Rt},ft=T.endPos,ut=[];if(!K9(T.tagName)){var Fe=w6(n,T.endPos,Ve);if(Fe!==null){var nn=n.slice(T.endPos,Fe[0]);nn&&(o.inHTML&&H$.test(nn)||h9(nn)?ut=d9(nn,{...o,inline:!1,inHTML:!0,inAnchor:o.inAnchor||Ve==="a"},u):ut=l1(nn,0,nn.length,{...o,inline:!0,inHTML:u.optimizeForStreaming?!0:o.inHTML,inAnchor:o.inAnchor||Ve==="a"},u)),ft=Fe[1]}}return{type:O.htmlBlock,tag:T.tagName,attrs:At,rawAttrs:Je,children:ut,verbatim:!1,endPos:ft}}if(!o.inline){for(var R=n.length,D=I(n,i),tt=T.tagLower,we=w9(tt),ct=!we&&m9(T.tagName),Dt=!1,kt=i;kt<T.endPos;){if(n[kt]===">"){Dt=!0;break}kt++}for(var pe=T.endPos;pe<D&&(n[pe]===" "||n[pe]===" ");)pe++;var Lt=pe>=D||n[pe]===`
75
+ `||n[pe]==="\r"||ct&&pe<D||!Dt;if(we&&Dt&&!T.isClosing){var{tagName:mn,endPos:Tn,attrs:Wn}=T,rt=Tn;n[rt]===`
76
+ `&&rt++;for(var hn=rt,gt=rt,yt=1,pt=tt.length+1;yt>0;){var Bt=n.indexOf("<",rt);if(Bt===-1){gt=R,rt=R;break}var Rn=-1,An=-1;if(n[Bt+1]==="/")An=Bt;else if(Bt+pt+1<=R&&(n[Bt+1]===tt[0]||n[Bt+1]===mn[0])){var zt=n.substring(Bt+1,Bt+pt);zt.toLowerCase()===tt&&(n[Bt+pt]===" "||n[Bt+pt]===">")&&(Rn=Bt)}if(Rn===-1&&An===-1){rt=Bt+1;continue}if(Rn!==-1&&(An===-1||Rn<An))rt=Rn+pt+1,yt++;else{for(var Xe=An+2;Xe<R;){var Yt=n[Xe];if(Yt!==" "&&Yt!==" "&&Yt!==`
77
+ `&&Yt!=="\r")break;Xe++}if(Xe+tt.length>R)break;var _t=n.substring(Xe,Xe+tt.length);if(_t.toLowerCase()!==tt){rt=Xe;continue}for(Xe+=tt.length;Xe<R;){var Cn=n[Xe];if(Cn!==" "&&Cn!==" "&&Cn!==`
78
+ `&&Cn!=="\r")break;Xe++}if(Xe>=R||n[Xe]!==">"){rt=Xe;continue}var yn=Xe+1,vt=I(n,yn);gt=vt,rt=vt+1,yt--}}for(var sn=0;rt+sn<R&&n[rt+sn]===`
79
+ `;)sn++;var Jn=n.slice(i,rt+sn),jn=n.slice(hn,gt),Hn=rt+sn;return fZ(T.tagName,T.tagName,Wn,jn,Jn,Hn,n,o,!1,u)}if(Lt||!Dt){var le=ct?"type6":"type7",be=T.endPos,ve=k$(n,k(n,D),R);if(le==="type6"&&!T.isClosing){let ui=Ye?T.tagName:T.tagLower||T.tagName.toLowerCase();for(var On="</"+ui,Nn="<"+ui,vn=be,Kt=1,Ke=-1;vn<ve&&Kt>0;){for(var Qt=n.indexOf(Nn,vn),Pt=n.indexOf(On,vn);Qt!==-1&&Qt<ve;){var Wt=Qt+Nn.length;if(Wt>=R){Qt=-1;break}var Qe=n[Wt];if(Qe===" "||Qe===" "||Qe===`
80
+ `||Qe==="\r"||Qe===">")break;Qt=n.indexOf(Nn,Wt)}if((Qt===-1||Qt>=ve)&&(Qt=ve),(Pt===-1||Pt>=ve)&&(Pt=ve),Qt<Pt)Kt++,vn=Qt+Nn.length;else if(Pt<ve){if(Kt--,Kt===0){Ke=Pt;break}vn=Pt+On.length}else break}if(Ke!==-1&&Ke<ve){for(var qe=Ke+On.length;qe<R&&(n[qe]===" "||n[qe]===" ");)qe++;if(qe<R&&n[qe]===">"){for(var Vt=qe+1,Nt=Vt;Nt<R&&n[Nt]!==`
81
+ `;)Nt++;for(Nt<R&&Nt++;Nt<R&&(n[Nt]===" "||n[Nt]===" ");)Nt++;if(Nt<R&&n[Nt]==="<"&&!c(n.slice(Nt),On)){var lt=n1(n,Nt);lt&&(ve=Vt)}}}else if(Ke=n.indexOf(On,be),Ke!==-1){var qn=n.slice(be,Ke),wn=Ye||h9(qn);if(wn){for(var ye=Ke+On.length;ye<R&&(n[ye]===" "||n[ye]===" ");)ye++;if(ye<R&&n[ye]===">"){var V=I(n,ye+1);ve=V}}}}var _e=n.slice(be,ve),me=T.whitespaceBeforeAttrs+T.attrs,F=T.isClosing;let va=()=>{let ui=T.tagLower||T.tagName.toLowerCase(),Ea=T.whitespaceBeforeAttrs+T.attrs;return{parsed:u1(Ea,ui,T.tagName,u),raw:Ea}};if(le==="type7"&&_e.trim()===""){var ge=n.slice(i,T.endPos),ke=ge.indexOf(`
82
+ `)!==-1;if(ke)return null;var Ue=T.endPos,te=I(n,Ue);te<n.length&&te++;var Se=n.slice(i,te);let ar=va();return v9(T.tagName,Se,ve,ar.parsed,ar.raw,F,!1,u,o)}var Re=T.hasNewline,Ne=!Dt;if((Re||Ne)&&le==="type7"){var We=T.endPos,Ct=n.slice(i,We),Be=_e,xe=Ct+Be;let Ea=va();return v9(T.tagName,xe,ve,Ea.parsed,Ea.raw,F,!1,u,o)}let ba=T.tagLower||T.tagName.toLowerCase();var Ze=u1(me,ba,T.tagName,u),He={...Ze};if(le==="type6"){var Mt=_e,Ot=_e.indexOf("</"+ba);if(Ot>=0){for(var pe=Ot+2+T.tagName.length;pe<_e.length&&(_e[pe]===" "||_e[pe]===" ");)pe++;pe<_e.length&&_e[pe]===">"&&(Mt=_e.slice(0,Ot))}if(h9(Mt))return fZ(T.tagName,T.tagName,me,Mt,n.slice(i,T.endPos),ve,n,o,!1,u)}var Le=_e;Le.length>0&&(Le[0]==="\r"&&Le[1]===`
83
+ `?Le=Le.slice(2):(Le[0]===`
84
+ `||Le[0]==="\r")&&(Le=Le.slice(1)));for(var an=Le.split(`
85
+ `),Gt=1/0,jt=0;jt<an.length;jt++){var Ut=an[jt];if(Ut.trim().length!==0){for(var M=0;M<Ut.length&&(Ut[M]===" "||Ut[M]===" ");)M++;M<Gt&&(Gt=M)}}if(Gt>0&&Gt<1/0){for(var Zn=[],Jt=0;Jt<an.length;Jt++){var fa=an[Jt];fa.trim().length===0?Zn.push(fa):Zn.push(fa.slice(Gt))}Le=Zn.join(`
86
+ `)}return v9(T.tagName,Le,ve,He,me,F,le==="type6",u,o)}}if(o.inline)return null;var bn=i$(n,i+1);if(!bn)return null;var Pn=bn.tagName;if(!K9(Pn))return null;let Dn=bn.tagLower;for(var Zt=bn.nextPos,ga=n.length;Zt<ga&&j1(n[Zt]);)Zt++;for(var nr=Zt;Zt<ga&&n[Zt]!==">";)Zt++;if(Zt>=ga)return null;let za=n.slice(nr,Zt).trim(),Ua=Zt+1;for(;Ua<ga&&j1(n[Ua]);)Ua++;let Yr="</"+Dn+">",ya=n.toLowerCase().indexOf(Yr,Ua);if(ya!==-1&&n.slice(Ua,ya).trim())return null;Zt++;let ls=Zt;for(;Zt<ga&&j1(n[Zt]);)Zt++;Zt<ga&&n[Zt]===`
87
+ `&&Zt++;let Kr=u1(za,Pn,Pn,u);return{type:O.htmlSelfClosing,tag:Pn,attrs:Kr,endPos:ls}}function i6(n,i){if(n[i]!=="<")return null;var o=n.length,u=!1,h=i+1;i+1<o&&n[i+1]==="/"&&(u=!0,h=i+2);var m=i$(n,h);if(!m)return null;var{tagName:y,tagLower:_,nextPos:v}=m;if(v<o){var E=n[v];if(E===">"||E==="/"){var S=E===">"?v+1:v+2;if(E==="/"&&(v+1>=o||n[v+1]!==">"))return null;var w=E==="/",T=m9(y),R=!w9(_)&&!T;return{kind:"tag",tagNameLower:_,tagName:y,isClosing:u,isSelfClosing:w,hasNewline:!1,type6Candidate:T,type7Candidate:R,endPos:S,attrs:"",whitespaceBeforeAttrs:""}}}for(var D=v,N=!1;v<o;){var M=n[v],L=b(n,v);if(!(M===" "||M===" "))if(L===10||L===13)N=!0;else break;v++}for(var z=n.slice(D,v),U=v,H=0,Y=!1,K=!1,$=0;U<o;){var Q=n[U],L=b(n,U);if($===1){if(Q==='"'){if(U+1<o&&n[U+1]==='"')return null;$=0}U++}else if($===2)Q==="'"&&($=0),U++;else if(Q==='"')$=1,U++;else if(Q==="'")$=2,U++;else if(Q==="{"||Q==="}"&&H>0)H+=Q==="{"?1:-1,U++;else if(Q===">"&&H===0){if(U>v){for(var ne=U-1;ne>=v;){var fe=n[ne];if(fe!==" "&&fe!==" ")break;ne--}ne>=v&&n[ne]==="/"&&(Y=!0,K=ne<U-1)}U++;break}else{if(Q==="*"||Q==="#"||Q==="!"){for(var W=U+1;W<o;){var le=n[W];if(le==="="||le===" "||le===" "||le===`
88
+ `||le==="\r"||le===">")break;W++}if(W<o&&n[W]==="=")return null}(L===10||L===13)&&(N=!0),U++}}if(U>o||n[U-1]!==">"||$===1||$===2||H>0||K)return null;var be=U-1;Y&&be--;for(var ve=n.slice(v,be),_e=Y,F=-1,ce=!1,te="",Se=!1,xe=0;xe<ve.length;xe++){var M=ve[xe];if(ce)M===te&&(ce=!1,F=xe,te="",Se=!1);else if(M==='"'||M==="'")ce=!0,te=M,Se=!1;else if(M==="=")Se=!0;else if(F!==-1&&xe===F+1){var L=M.charCodeAt(0);if(U9(L))return null}else{if(Se&&!ce&&(M==="*"||M==="#"||M==="!"))return null;j1(M)&&(Se=!1)}}var q=m9(y),ie=!w9(_)&&!q;return{kind:"tag",tagNameLower:_,tagName:y,isClosing:u,isSelfClosing:_e,hasNewline:N,type6Candidate:q,type7Candidate:ie,endPos:U,attrs:ve,whitespaceBeforeAttrs:z}}function U$(n,i){if(i>=n.length||n[i]!=="<")return null;var o=n.length;if(i+1>=o)return null;var u=n[i+1];if(u==="!"){if(i+4<=o&&n.slice(i,i+4)==="<!--"){var h=i+4;if(h<o&&n[h]===">")return{kind:"comment",hasNewline:!1,endPos:h+1,text:n.slice(i,h+1),raw:!0};if(h+1<o&&n[h]==="-"&&n[h+1]===">")return{kind:"comment",hasNewline:!1,endPos:h+2,text:n.slice(i,h+2),raw:!0};for(;h+2<o;){if(n.slice(h,h+3)==="-->")return{kind:"comment",hasNewline:!1,endPos:h+3,text:n.slice(i,h+3),raw:!0};h++}return null}if(i+9<=o&&n.slice(i,i+9)==="<![CDATA["){for(var h=i+9;h+2<o;){if(n.slice(h,h+3)==="]]>")return{kind:"cdata",hasNewline:!1,endPos:h+3,text:n.slice(i,h+3),raw:!0};h++}return null}if(i+2<o&&U9(n.charCodeAt(i+2))){for(var h=i+2;h<o&&n[h]!==">";)h++;return h>=o?null:{kind:"declaration",hasNewline:!1,endPos:h+1,text:n.slice(i,h+1),raw:!0}}return null}if(u==="?"){for(var h=i+2;h+1<o;){if(n.slice(h,h+2)==="?>")return{kind:"pi",hasNewline:!1,endPos:h+2,text:n.slice(i,h+2),raw:!0};h++}return null}return i6(n,i)}function h$(n,i){if(i>=n.length)return!1;var o=n[i];return o==="="||o==="-"||o==="_"||o==="*"||o==="#"||o===">"||o==="`"||o==="~"||o==="["||o>="0"&&o<="9"}function J$(n,i){if(i>=n.length)return!1;var o=n[i];return o==='"'||o==="'"||o==="("}function c6(n,i,o){var u=n.length;if(i>=u||n[i]!==o)return null;i++;for(var h=i,m=!1;i<u&&n[i]!==o;){var y=n.charCodeAt(i);if(y===d){if(m)return null;m=!0,i++}else if(y===V0)if(i+1<u&&n.charCodeAt(i+1)===d){if(m)return null;m=!0,i+=2}else m=!1,i++;else m=!1,y===k1&&i+1<u&&i++,i++}return i>=u?null:{value:n.slice(h,i),endPos:i+1}}function a6(n,i){var o=n.length;if(i>=o||n[i]!=="(")return null;i++;for(var u=i,h=1,m=!1;i<o&&h>0;){var y=n.charCodeAt(i);if(y===d){if(m)return null;m=!0,i++}else if(y===V0)if(i+1<o&&n.charCodeAt(i+1)===d){if(m)return null;m=!0,i+=2}else m=!1,i++;else m=!1,y===k1&&i+1<o?i++:y===FZ?h++:y===OZ&&h--,i++}return h!==0?null:{value:n.slice(u,i-1),endPos:i}}function r6(n,i){for(var o=n.length,u=i;u<o;){var h=u===0||n[u-1]===`
89
+ `,m=n.charCodeAt(u);if(m===d&&u>i){var y=u+1;if(y<o&&n.charCodeAt(y)===V0&&y++,y<o&&n.charCodeAt(y)===d){for(var _=y+1;_<o&&(n[_]===" "||n[_]===" ");)_++;var v=_-(u+1);if(n.charCodeAt(u+1)===V0&&v--,_<o&&n.charCodeAt(_)!==d&&n.charCodeAt(_)!==V0&&v<4)return u}}if(h&&c(n,"[^",u)){for(var E=u+2;E<o&&n[E]!=="]";)E++;if(E<o&&n[E]==="]"&&E+1<o&&n[E+1]===":")return u}u++}return o}function s6(n,i,o){let u=n.length,h=i,m=h<u&&n[h]==="<";m&&h++;let y=h,_=y;if(y>=u){if(!m)return null;_=y}else{if(o>0&&y<u&&n[y]===`
90
+ `)return null;for(;_<u&&!(m&&n[_]===">");){if(n[_]===`
91
+ `){let ne=_+1;if(ne>=u||ne<u&&n[ne]===`
92
+ `)break;let fe=ne;for(;fe<u&&(n[fe]===" "||n[fe]===" ");)fe++;if(fe<u&&J$(n,fe)||fe<u&&n[fe]==="[")break;if(fe<u){let W=n[fe];if(h$(n,fe))break;if(W>="a"&&W<="z"){let le=fe+1;for(;le<u&&le<fe+32&&(n[le]>="a"&&n[le]<="z"||n[le]>="A"&&n[le]<="Z"||n[le]>="0"&&n[le]<="9"||n[le]==="+"||n[le]==="."||n[le]==="-");)le++;if(!(le<u&&n[le]===":"))break}}_=fe;continue}if(!m&&(n[_]===" "||n[_]===" ")){let ne=_+1;for(;ne<u&&(n[ne]===" "||n[ne]===" ");)ne++;if(ne<u&&J$(n,ne))break;if(ne<u&&n[ne]===`
93
+ `){let fe=ne+1;if(fe<u&&n[fe]===`
94
+ `)break;let W=fe;for(;W<u&&(n[W]===" "||n[W]===" ");)W++;if(W<u&&J$(n,W))break}}_++}}if(m&&(_>=u||n[_]!==">"))return null;let v=n.slice(y,_),E=[],S=0;for(let ne=0;ne<=v.length;ne++)if(ne===v.length||v[ne]===`
95
+ `){let fe=v.slice(S,ne);fe=fe.trim(),(fe.length>0||E.length===0)&&E.push(fe),ne<v.length&&E.push(`
96
+ `),S=ne+1}v=E.join(""),v=v.trim(),h=m?_+1:_;var w=!1;if(h<u&&n[h]===`
97
+ `){for(var T=h+1,R=T;R<u&&(n[R]===" "||n[R]===" ");)R++;if(R<u){let ne=n[R];if(h$(n,R)&&(w=!0),!w&&ne!=="="&&ne!=="-"){var D=I(n,R);if(D<u){for(var N=k(n,D),M=N;M<u&&(n[M]===" "||n[M]===" ");)M++;if(M<u){var L=n[M];(L==="="||L==="-")&&(w=!0)}}}}}if(!w&&h<u&&J$(n,h))return null;let z=0;for(;h<u&&!w;){let ne=n[h];if(ne===`
98
+ `){if(z++,z>1)break;h++;var U=h;if(h=g0(n,h),h<u&&V9(n[h])&&n[h]!==`
99
+ `){h=U-1;break}if(h<u&&(n[h],h$(n,h))){w=!0,h=U-1;break}}else if(ne===" "||ne===" ")h++;else{if(V9(ne))break;break}}let H;if(h<u){let ne=n[h];var Y=ne==="("?a6(n,h):ne==='"'||ne==="'"?c6(n,h,ne):null;if(Y===null&&(ne==='"'||ne==="'"||ne==="("))return null;if(Y){H=Y.value,h=Y.endPos;for(var K=h;K<u&&(n[K]===" "||n[K]===" ");)K++;if(K<u&&n[K]!==`
100
+ `&&n[K]!=="\r")return null;h=K}}if(h=g0(n,h),h<u&&n[h]!==`
101
+ `)for(var $=h;$<u&&n[$]!==`
102
+ `;){if(n[$]!==" "&&n[$]!==" ")return null;$++}if(H===void 0&&h<u&&n[h]!==`
103
+ `)for(var Q=h;Q<u&&n[Q]!==`
104
+ `;){if(n[Q]!==" "&&n[Q]!==" ")return null;Q++}return{endPos:h<u&&n[h]===`
105
+ `?h+1:h,target:v,title:H}}function o6(n,i){let o=r6(n,i),u=o<n.length&&n[o]===`
106
+ `&&n[o+1]===`
107
+ `,h=o,m=i;var y=[];let _=m,v=0,E=!1;for(;_<h;){let R=I(n,_);if(R>h&&(R=h),v===0){let D=R;for(;D>_&&(n[D-1]===" "||n[D-1]===" ");)D--;let N=n.slice(_,D);y.push(N),E=N.length===0}else{let D=0,N=_;for(;N<R&&N<_+4&&n[N]===" ";)D++,N++;let M=!1;for(let z=_;z<R;z++)if(n[z]!==" "&&n[z]!==" "&&n[z]!=="\r"){M=!0;break}let L=!M;D>=4&&E?y.push(n.slice(_,R)):D===4&&!E?y.push(n.slice(_+4,R)):y.push(n.slice(_,R)),E=L}if(R<h){let D=b(n,R);D===V0||D===d?(y.push(`
108
+ `),_=k(n,R)):_=h}else _=h;v++}let S=y.join("");u&&(S=S.replace(/\n$/,""));for(var w=S.length;w>0;){var T=S[w-1];if(T===`
109
+ `||T===" ")w--;else break}return w<S.length&&(S=S.slice(0,w)),{endPos:o,target:S,title:void 0}}function B9(n,i,o,u,h){if(n[i]!=="[")return null;var m=i+1<n.length&&n[i+1]==="^";if(h?!m:m)return null;for(var y=i;y>0&&n[y-1]!==`
110
+ `;)y--;if(t(n,y,i).spaceEquivalent>=4||o.inline)return null;var _=i+(h?2:1),v=n.length,E=R6(n,_,v,"]");if(E===-1)return null;var S=n.slice(_,E);if(S.length>999)return null;for(var w=!1,T=!1,R=!1,D=0;D<S.length;D++){var N=S[D];if(N==="\\"&&D+1<S.length){D++;continue}var M=b(N);M===g1||M===H9?T=!0:M===d||M===V0?R=!0:M!==C&&M!==l&&(w=!0)}if(!w||T)return null;var L=E+1;if(R){var z=b(n,_),U=b(n,E-1);if(z===d||z===V0||U===d||U===V0||L>=v||n[L]!==":")return null}else if((L>=v||n[L]!==":")&&(L=g0(n,L),L<v&&b(n,L)===d&&(L=g0(n,L+1)),L>=v||n[L]!==":"))return null;L++;for(var H=0;L<v;){var Y=b(n,L);if(Y===d){if(++H>1)break;L=g0(n,L+1)}else if(Y===C||Y===l)L++;else break}let K=h?o6(n,L):s6(n,L,H);if(!K)return null;let $=hZ(S),Q=o.refs||{},ne=h?`^${$}`:$;return Q[ne]||(Q[ne]={target:Q$(K.target.trim()),title:K.title?Q$(K.title):void 0},o.refs=Q),{type:h?O.footnote:O.ref,endPos:K.endPos}}function rZ(n,i,o){for(var u=[],h=0;h<i.length;){var m=i[h];if(!m||m.type!=="*"&&m.type!=="_"&&m.type!=="~"&&m.type!=="="){h++;continue}if(!m.canClose||!m.active){h++;continue}for(var y=m.type==="*"?0:m.type==="_"?1:m.type==="~"?2:3,_=y*6+m.length%3*2+(m.canOpen?1:0),v=u[_]!==void 0?u[_]:-1,E=-1,S=m.type,w=m.inAnchor,T=m.canOpen,R=m.length,D=R%3,N=h-1;N>v;N--){var M=i[N];if(!(!M||!M.active||M.type!==S||!M.canOpen||M.inAnchor!==w)){var L=M.length;if(!T&&!M.canClose||D===0||(L+R)%3!==0){E=N;break}}}if(E>=0){var z=i[E],L=z.length,U=L>=2&&R>=2,H=U?2:1;if(H>L||H>R){h++;continue}var Y=z.nodeIndex,K=m.nodeIndex,$=Y+1,Q=K,ne=n.slice($,Q);if(ne.length>0){var fe=Q-$;n.splice($,fe);for(var W=0;W<i.length;W++)i[W].nodeIndex>$&&(i[W].nodeIndex-=fe);K>$&&(K-=fe)}var le=z.type==="~"?"del":z.type==="="?"mark":U?"strong":"em",be={type:O.textFormatted,tag:le,children:ne},ve=n[Y];if(!ve||!ve.text){z.active=m.active=!1;continue}var _e=ve.text.length<=H;if(_e){n.splice(Y,1);for(var W=0;W<i.length;W++)i[W].nodeIndex>Y&&i[W].nodeIndex--;K>Y&&K--}else ve.text=ve.text.slice(H);var F=n[K];if(!F||!F.text){z.active=m.active=!1;continue}var ce=F.text.length<=H;if(ce){n.splice(K,1);for(var W=0;W<i.length;W++)i[W].nodeIndex>K&&i[W].nodeIndex--}else F.text=F.text.slice(H);var te=_e?Y<K?K-1:Y:Y+1;(te<0||te>n.length)&&(te=te<0?0:n.length),n.splice(te,0,be);for(var W=0;W<i.length;W++)i[W].nodeIndex>=te&&i[W].nodeIndex++;for(var W=E+1;W<h;W++)i[W].active=!1;_e?z.active=!1:(z.length-=H,z.length===0&&(z.active=!1)),ce?(m.active=!1,h++):(m.length-=H,m.length===0&&(m.active=!1,h++))}else u[_]=h-1,!m.canOpen&&(m.active=!1),h++}for(var Se=0,N=0;N<i.length;N++)i[N].active&&(i[Se++]=i[N]);i.length=Se}function i9(n,i,o){var u=[],h=0,m=-3,y=m;if(i.inline)return l1(n,0,n.length,i,o);if(h===0&&n.startsWith("---")){var _=h6(n,h);_&&(u.push(_),h=_.endPos)}for(;h<n.length;){for(;h<n.length&&n[h]===`
111
+ `;)h++;if(h>=n.length)break;y=m;let w=n[h],T=l9(n,h,i,o);if(T){if(T.type===O.codeBlock){var v=w==="`"||w==="~";if(!v&&(w===" "||w===" ")){let z=I(n,h),U=t(n,h,z);v=U.spaceEquivalent<=3&&h+U.charCount<n.length&&(n[h+U.charCount]==="`"||n[h+U.charCount]==="~")}}if(T.type===O.htmlComment){u.push(T);let z=h;h=T.endPos;let U=I(n,z);if(h<U){let H=n.slice(h,U);H.trim().length>0&&u.push({type:O.text,text:H}),h=U,h<n.length&&n[h]===`
112
+ `&&h++}continue}if(T.type===O.htmlBlock||T.type===O.htmlSelfClosing){if(!(T.type===O.htmlSelfClosing&&T.isClosingTag===!0&&!i.inline&&!i.inHTML)){u.push(T),h=T.endPos;continue}}else{u.push(T),h=T.endPos;continue}}let R=y!==m?y:h;if(y===m){if(j1(w)){let L=I(n,h),z=t(n,h,L),U=h+z.charCount;z.spaceEquivalent<=3&&U<n.length&&n[U]==="["?R=U:R=-1}else w==="["?R=h:R=-1;y=R}if(R>=0&&R+1<n.length&&n[R+1]==="^"&&(R=-1),R>=0){let L=B9(n,R,i,o,!1);if(L){u.push(L),h=L.endPos;continue}let z=S6(n,R,h===0);if(z.shouldSkip){h=z.newPos;continue}}let D=pZ(n,h,i,o);if(D){u.push(D),h=D.endPos;continue}let N=h;if(j1(n[N])){let L=I(n,h),z=t(n,h,L);N=h+z.charCount}if(N<n.length&&n[N]==="["&&N+1<n.length&&n[N+1]==="^"){let L=B9(n,N,i,o,!0);if(L){h=L.endPos;continue}}let M=a$(n,h,i,o);if(M){u.push(M),h=M.endPos;continue}h++}let E=i.refs||{},S={};for(let w in E)S[w]=E[w];return e9(S)?[{type:O.refCollection,refs:S},...u]:u}function v$(n,i,o){var u=0,h=!0;let m=n.length;for(;u<m;){for(var y=0;u<m&&b(n,u)===d;)y++,u++;if(u>=m)break;y>0&&(h=!0);let U=b(n,u);if(U===t0||U===e1){var _=$Z(n,u,{},o);if(_){u=_.endPos,h=!0;continue}}for(var v=u,E=0;v<m&&E<4;){let H=b(n,v);if(H===C)E++,v++;else if(H===l)E+=4-E%4,v++;else break}if(E<4&&v<m&&b(n,v)===g1&&h)if(v+1<m&&b(n,v+1)===D9){h=!1;var L=I(n,u);u=L>=m?m:k(n,L);continue}else{var S=B9(n,v,{inline:!1,refs:i},o,!1);if(S){u=S.endPos,h=!0;continue}var L=I(n,u),w=n.indexOf(":",v+1);if(w===-1||w>=L){var T=t(n,u,L);!w1(n,u,L)&&U!==T9&&U!==C1&&U!==D1&&U!==d1&&T.spaceEquivalent<4&&(h=!1)}u=L>=m?m:k(n,L);continue}if(U===C1&&h){for(var R=u,D=[];R<m;){for(var L=I(n,R),N=R;N<L;){let Y=b(n,N);if(Y===C||Y===l)N++;else break}if(N>=L||b(n,N)!==C1)break;var M=N+1;M<L&&(b(n,M)===C||b(n,M)===l)&&M++,D.push(n.slice(M,L)),R=k(n,L)}if(D.length){v$(D.join(`
113
+ `),i,o),u=R,h=!0;continue}}var L=I(n,u);if(L>=m)u=m;else{var z=w1(n,u,L),T=t(n,u,L);u=k(n,L),h=U===T9||U===C1||U===D1||U===d1||z||T.spaceEquivalent>=4}}}var t6=/^\n+/,ZZ=typeof reactExports.createContext<"u"?reactExports.createContext(void 0):void 0;function e6(n){let i=!1;for(let u=0;u<n.length;u++){let h=n.charCodeAt(u);if(h>127||h===k1||h===t0){i=!0;break}}if(!i)return n;let o="";for(let u=0;u<n.length;u++){let h=n[u];if(h==="%"&&u+2<n.length&&/[0-9A-Fa-f]/.test(n[u+1])&&/[0-9A-Fa-f]/.test(n[u+2]))o+=n[u]+n[u+1]+n[u+2],u+=2;else if(h.charCodeAt(0)===k1)o+="%5C";else if(h.charCodeAt(0)===t0)o+="%60";else{let m=h.charCodeAt(0);o+=m>127?encodeURIComponent(h):h}}return o}function $5(n,i,o,u,h,m,y,_){switch(n.type){case O.blockQuote:{let E={key:o.key};return n.alert&&(E.className="markdown-alert-"+m(n.alert.toLowerCase(),J1),n.children.unshift({attrs:{},children:[{type:O.text,text:n.alert}],verbatim:!0,type:O.htmlBlock,tag:"header"})),u("blockquote",E,i(n.children,o))}case O.breakLine:return u("br",{key:o.key});case O.breakThematic:return u("hr",{key:o.key});case O.frontmatter:return _.preserveFrontmatter?u("pre",{key:o.key},n.text):null;case O.codeBlock:let v=n.lang?M9(n.lang):"";return u("pre",{key:o.key},u("code",{...s9(n.attrs||{}),className:v?`language-${v} lang-${v}`:""},n.text));case O.codeInline:return u("code",{key:o.key},n.text);case O.footnoteReference:return u("a",{key:o.key,href:h(n.target,"a","href")},u("sup",{key:o.key},n.text));case O.gfmTask:return u("input",{checked:n.completed,key:o.key,readOnly:!0,type:"checkbox"});case O.heading:return u(`h${n.level}`,{id:n.id,key:o.key},i(n.children,o));case O.htmlBlock:{let E=n;if(_.tagfilter&&$$(E.tag)){let S;if("rawText"in E&&typeof E.rawText=="string")S=E.rawText;else{let w="";if(E.attrs)for(let[T,R]of Object.entries(E.attrs))R===!0?w+=` ${T}`:R!=null&&R!==!1&&(w+=` ${T}="${String(R)}"`);S=`<${E.tag}${w}>`}return u("span",{key:o.key},S)}if(E.rawText&&E.verbatim){let S=function(Q){if(Q.type===O.htmlSelfClosing&&"isClosingTag"in Q&&Q.isClosingTag)return[];if(Q.type===O.paragraph){let ne=Q.children;return ne?ne.flatMap(S):[]}return Q.type===O.text?Q.text?.trim()?[Q]:[]:Q.type===O.htmlBlock&&Q.children?[{...Q,children:Q.children?.flatMap(S)}]:[Q]},w=E.tag.toLowerCase(),T=w9(w),R=/<[a-z][^>]{0,100}>/i.test(E.rawText),D=/<\/?pre\b/i.test(E.rawText);if(T&&!R){let Q=E.rawText.replace(new RegExp("\\s*</"+w+">\\s*$","i"),"");return _.tagfilter&&(Q=Z$(Q)),u(n.tag,{key:o.key,...n.attrs},Q)}if(D){let Q=_.tagfilter?Z$(E.rawText):E.rawText;return u(n.tag,{key:o.key,...n.attrs,dangerouslySetInnerHTML:{__html:Q}})}let N={slugify:Q=>m(Q,J1),sanitizer:h,tagfilter:!0},M=E.rawText.replace(/>\s+</g,"><").replace(/\n+/g," ").trim();if(new RegExp(`^<${E.tag}(\\s[^>]*)?>(\\s*</${E.tag}>)?$`,"i").test(M))return u(n.tag,{key:o.key,...n.attrs});let L=i9(M,{inline:!1,refs:y,inHTML:!1},N),z="</"+E.tag.toLowerCase()+">",U=new RegExp(`^<${E.tag}(\\s|>)`,"i").test(M),H=M.toLowerCase().trimEnd().endsWith(z),Y=U&&H,K=!E.attrs||Object.keys(E.attrs).length===0,$=E.children&&E.children.length>0;return Y&&K?i(L.flatMap(S),o):Y&&$?u(n.tag,{key:o.key,...n.attrs},i(E.children,o)):u(n.tag,{key:o.key,...n.attrs},i(L.flatMap(S),o))}return u(n.tag,{key:o.key,...n.attrs},n.children?i(n.children,o):"")}case O.htmlSelfClosing:{let E=n;if(_.tagfilter&&$$(E.tag)){let S;if("rawText"in E&&typeof E.rawText=="string")S=E.rawText;else{let w="";if(E.attrs)for(let[T,R]of Object.entries(E.attrs))R===!0?w+=` ${T}`:R!=null&&R!==!1&&(w+=` ${T}="${String(R)}"`);S=`<${E.tag}${w} />`}return u("span",{key:o.key},S)}return u(n.tag,{key:o.key,...n.attrs})}case O.image:return u("img",{key:o.key,alt:n.alt&&n.alt.length>0?n.alt:void 0,title:n.title||void 0,src:h(n.target,"img","src")});case O.link:{let E={key:o.key};return n.target!=null&&(E.href=e6(n.target)),n.title&&(E.title=n.title),u("a",E,i(n.children,o))}case O.table:{let E=n;return u("table",{key:o.key},u("thead",null,u("tr",null,E.header.map(function(S,w){return u("th",{key:w,style:E.align[w]==null?{}:{textAlign:E.align[w]}},i(S,o))}))),u("tbody",null,E.cells.map(function(S,w){return u("tr",{key:w},S.map(function(T,R){return u("td",{key:R,style:E.align[R]==null?{}:{textAlign:E.align[R]}},i(T,o))}))})))}case O.text:return n.text;case O.textFormatted:return u(n.tag,{key:o.key},i(n.children,o));case O.orderedList:case O.unorderedList:{let E=n.type===O.orderedList?"ol":"ul";return u(E,{key:o.key,start:n.type===O.orderedList?n.start:void 0},n.items.map(function(S,w){return u("li",{key:w},i(S,o))}))}case O.paragraph:return u("p",{key:o.key},i(n.children,o));case O.ref:return null;default:return null}}var Z5=(n,i,o,u,h,m)=>{let y=(E,S,w)=>{let T=()=>$5(E,S,w,i,o,u,h,m);return n?n(T,E,S,w):T()},_=E=>E.map(S=>"text"in S?S.text:""),v=(E,S={})=>{let w=(S.renderDepth||0)+1;if(w>2500)return _(E);S.renderDepth=w;let T=S.key,R=[],D=!1;for(let N=0;N<E.length;N++){S.key=N;let M=y(E[N],v,S),L=typeof M=="string";if(L&&D)R[R.length-1]+=M;else if(M!==null)if(Array.isArray(M))for(let z=0;z<M.length;z++)R.push(M[z]);else R.push(M);D=L}return S.key=T,S.renderDepth=w-1,R};return v},G5=(...n)=>n.filter(Boolean).join(" "),GZ=(n,i,o)=>{let u=n,h=i.split("."),m=0;for(;m<h.length&&(u=u?.[h[m]],u!==void 0);)m++;return u||o},Y5=(n,i)=>{let o=GZ(i,n,void 0);return o?typeof o=="function"||typeof o=="object"&&"render"in o?o:GZ(i,`${n}.component`,n):n};function J5(n,i){let o={...i||{}};o.overrides=o.overrides||{};let u=o.slugify||J1,h=o.sanitizer||s1,m=o.createElement||reactExports.createElement,y=M=>A$(M,{...o,wrapper:null});function _(M,L,...z){let U=GZ(o.overrides,`${M}.props`,{}),H=s9(L||{});if(y)for(let[Y,K]of Object.entries(H))typeof K=="string"&&K.length>0&&K[0]==="<"&&(gZ.test(K)||CZ.test(K)||n1(K,0))&&(H[Y]=y(K.trim()));return m(Y5(M,o.overrides),{...H,...U,className:G5(H?.className,U.className)||void 0},...z)}let v=[];for(let M=0;M<n.length;M++){let L=n[M];if(L.type===O.htmlBlock&&"rawText"in L&&L.rawText&&/<\/?pre\b/i.test(L.rawText)&&M+1<n.length&&n[M+1].type===O.paragraph&&"removedClosingTags"in n[M+1]&&n[M+1].removedClosingTags){let z=function(K){let $="";for(let Q of K){let ne=Q.type;if(ne===O.text)$+=Q.text;else if(ne===O.htmlSelfClosing&&"rawText"in Q&&Q.rawText)$+=Q.rawText;else if(ne===O.textFormatted){let fe=Q,W=fe.tag==="em"?"_":fe.tag==="strong"?"**":"";$+=W+z(fe.children)+W}else"children"in Q&&Q.children&&($+=z(Q.children))}return $},U=L,H=n[M+1],Y=z(H.children);H.removedClosingTags&&(Y+=H.removedClosingTags.filter(K=>K.type===O.htmlSelfClosing&&"rawText"in K&&K.rawText&&K.rawText.indexOf(`</${U.tag}>`)===-1).map(K=>K.type===O.htmlSelfClosing&&"rawText"in K&&K.rawText||"").join("")),U.rawText=(U.rawText||"")+`
114
+ `+Y,U.text=U.rawText,M++}v.push(L)}n=v;let E={...o,slugify:M=>u(M,J1),sanitizer:h,tagfilter:o.tagfilter!==!1},S=n[0]&&n[0].type===O.refCollection?n[0].refs:{},w=Z5(o.renderRule,_,h,u,S,o),T=w(n,{inline:o.forceInline,refs:S}),R=[];for(let M in S)M.charCodeAt(0)===D9&&R.push({identifier:M,footnote:S[M].target});if(R.length&&T.push(_("footer",{key:"footer"},R.map(function(M){let L=M.identifier.charCodeAt(0)===D9?M.identifier.slice(1):M.identifier,z=i9(M.footnote,{inline:!0,refs:S},E);return _("div",{id:u(L,J1),key:M.identifier},L+": ",w(z,{inline:!0,refs:S}))}))),o.wrapper===null)return T;let D=o.wrapper||(o.forceInline?"span":"div"),N;if(T.length>1||o.forceWrapper)N=T;else return T.length===1?T[0]:null;return m(D,{key:"outer",...o.wrapperProps},N)}function A$(n="",i={}){let o={...i||{}};o.overrides=o.overrides||{};let u=o.slugify||J1,h=o.sanitizer||s1;function m(_){let v=o.forceInline||!o.forceBlock&&!T$.test(_),E={...o,slugify:T=>u(T,J1),sanitizer:h,tagfilter:o.tagfilter!==!1};v||v$(_,y,E);let S=_;if(!v){let T=S.length;for(;T>0&&(S[T-1]===`
115
+ `||S[T-1]==="\r");)T--;S=S.slice(0,T),S=`${S.replace(t6,"")}
116
+
117
+ `}if(o.optimizeForStreaming){let T=S.lastIndexOf("<");T!==-1&&S.slice(T).indexOf(">")===-1&&(S=S.slice(0,T))}let w=i9(v?_:S,{inline:v,refs:y},E);return J5(w,{...E,forceInline:v})}let y={};return m(n)}var oZ=({children:n,options:i,...o})=>{if(!(typeof reactExports.useContext<"u")){let y={...i,overrides:{...i?.overrides},wrapperProps:{...i?.wrapperProps,...o}};return A$(n??"",y)}let u=reactExports.useContext(ZZ),h=reactExports.useMemo(()=>({...u,...i,overrides:{...u?.overrides,...i?.overrides},wrapperProps:{...u?.wrapperProps,...i?.wrapperProps,...o}}),[u,i,o]),m=n??"";return reactExports.useMemo(()=>A$(m,h),[m,h])},X5=oZ;const generalConditionsContainer="_generalConditionsContainer_55hjg_1",generalConditions="_generalConditions_55hjg_1",generalConditionsHeader="_generalConditionsHeader_55hjg_15",generalConditionsBody="_generalConditionsBody_55hjg_26",generalConditionsAccept="_generalConditionsAccept_55hjg_35",styles$l={generalConditionsContainer,generalConditions,generalConditionsHeader,generalConditionsBody,generalConditionsAccept},CaretDown=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"currentColor",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"})}),CaretUp=()=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",fill:"currentColor",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M212.24,164.24a6,6,0,0,1-8.48,0L128,88.49,52.24,164.24a6,6,0,0,1-8.48-8.48l80-80a6,6,0,0,1,8.48,0l80,80A6,6,0,0,1,212.24,164.24Z"})}),HEADER_KEY="general-conditions.header",BODY_KEY="general-conditions.body",ACCEPT_KEY="general-conditions.accept-conditions-note",GeneralConditions=()=>{const n=useTranslation(),[i,o]=reactExports.useState(!1),u=()=>o(!i),h=_=>{_.key==="ArrowDown"||_.key==="ArrowRight"?o(!0):_.key==="ArrowUp"||_.key==="ArrowLeft"||_.key==="Escape"?o(!1):(_.key==="Enter"||_.key==="Space"||_.key===" ")&&u()},m=n(HEADER_KEY),y=n(ACCEPT_KEY);return jsxRuntimeExports.jsxs("div",{className:clsx(styles$l.generalConditionsContainer,"chat__generalConditions"),children:[!!m?.length&&jsxRuntimeExports.jsxs("div",{className:styles$l.generalConditions,children:[jsxRuntimeExports.jsxs("div",{role:"button",onClick:u,onKeyDown:h,tabIndex:0,className:clsx(styles$l.generalConditionsHeader,"chat__generalConditions__header"),"aria-controls":"general-conditions-body","aria-expanded":i?"true":"false","aria-pressed":i?"true":"false",children:[jsxRuntimeExports.jsx(X5,{children:m}),i?jsxRuntimeExports.jsx(CaretUp,{}):jsxRuntimeExports.jsx(CaretDown,{})]}),jsxRuntimeExports.jsx("div",{className:clsx(styles$l.generalConditionsBody,"chat__generalConditions__body"),id:"general-conditions-body",role:"region",tabIndex:-1,children:i&&jsxRuntimeExports.jsx(X5,{children:n(BODY_KEY)||""})})]}),!!y?.length&&jsxRuntimeExports.jsx("div",{className:clsx(styles$l.generalConditionsAccept,"chat__generalConditions__accept"),tabIndex:0,children:jsxRuntimeExports.jsx(X5,{children:n(ACCEPT_KEY)||""})})]})},messageContainer="_messageContainer_1rxi5_1",message="_message_1rxi5_1",messageBot="_messageBot_1rxi5_14",messageBotLast="_messageBotLast_1rxi5_45",avatar="_avatar_1rxi5_45",messageBotFirst="_messageBotFirst_1rxi5_54",messageBotAnimated="_messageBotAnimated_1rxi5_67",messageGuest="_messageGuest_1rxi5_78",messageGuestFirst="_messageGuestFirst_1rxi5_84",messageGuestLast="_messageGuestLast_1rxi5_90",botAvatar="_botAvatar_1rxi5_104",agentAvatar="_agentAvatar_1rxi5_108",bubble="_bubble_1rxi5_112",bubbleContent="_bubbleContent_1rxi5_118",bubbleLeft="_bubbleLeft_1rxi5_132",leftText="_leftText_1rxi5_143",bubbleRight="_bubbleRight_1rxi5_150",rightText="_rightText_1rxi5_160",sourceInfoReference="_sourceInfoReference_1rxi5_192",sourceInfoReferenceActive="_sourceInfoReferenceActive_1rxi5_204",styles$k={messageContainer,message,messageBot,messageBotLast,avatar,messageBotFirst,messageBotAnimated,messageGuest,messageGuestFirst,messageGuestLast,botAvatar,agentAvatar,bubble,bubbleContent,bubbleLeft,leftText,bubbleRight,rightText,sourceInfoReference,sourceInfoReferenceActive},useClickOutsideEventListener=(n,i)=>{reactExports.useEffect(()=>{const o=u=>{n.current&&!n.current.contains(u.target)&&i()};return document.addEventListener("mousedown",o),()=>document.removeEventListener("mousedown",o)},[n,i])};function debounce(n,i){let o=null,u=null;const h=(...m)=>{u=m,o&&clearTimeout(o),o=setTimeout(()=>{n(...u),o=null,u=null},i)};return h.flush=()=>{o&&u&&(clearTimeout(o),n(...u),o=null,u=null)},h}function throttle(n,i){let o=0,u=null;return((...h)=>{const m=Date.now(),y=m-o;y>=i?(o=m,n(...h)):(u&&clearTimeout(u),u=setTimeout(()=>{o=Date.now(),n(...h)},i-y))})}const container$5="_container_131ib_1",categoryContainer="_categoryContainer_131ib_13",categoryButton="_categoryButton_131ib_20",active$2="_active_131ib_35",commentTextarea="_commentTextarea_131ib_44",styles$j={container:container$5,categoryContainer,categoryButton,active:active$2,commentTextarea},useTrapFocusEffect=(n,i,o)=>{reactExports.useEffect(()=>{if(n){const u=()=>{const m=["button:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])',"a[href]","input:not([disabled])","select:not([disabled])"].join(","),y=i.current?Array.from(i.current.querySelectorAll(m)):[],_=o.current?Array.from(o.current.querySelectorAll(m)):[];return[...y,..._]},h=m=>{if(m.key==="Tab"){const y=u();if(y.length>0){const _=y[0],v=y[y.length-1],E=document.activeElement;!m.shiftKey&&E===v?(m.preventDefault(),_.focus()):m.shiftKey&&E===_&&(m.preventDefault(),v.focus())}}};return document.addEventListener("keydown",h,!0),()=>{document.removeEventListener("keydown",h,!0)}}},[n,i,o])},BadReactionForm=({open:n,actionsRef:i,reaction:o,onReaction:u})=>{const h=useTranslation(),m=reactExports.useRef(null),y=debounce(E=>{u({...o,comment:E})},300);reactExports.useEffect(()=>()=>y.flush(),[y]),useTrapFocusEffect(n,i,m);const _=E=>{u({...o,category:o.category===E?void 0:E})},v=E=>y(E.target.value);return n?jsxRuntimeExports.jsxs("div",{ref:m,className:styles$j.container,role:"dialog","aria-modal":"true","aria-labelledby":"bad-reaction-title",children:[jsxRuntimeExports.jsx("h2",{id:"bad-reaction-title",children:h("bot-bubble.reaction.say-more")}),jsxRuntimeExports.jsx("div",{className:styles$j.categoryContainer,role:"radiogroup",children:["WRONG_INFORMATION","MISSING_INFORMATION","OLD_INFORMATION","UNCLEAR","OFF_TOPIC"].map(E=>jsxRuntimeExports.jsx("button",{className:clsx(styles$j.categoryButton,o?.category===E&&styles$j.active),onClick:()=>_(E),"aria-pressed":o?.category===E,"aria-label":h(`bot-bubble.reaction.category.${E}`),tabIndex:0,role:"radio",children:h(`bot-bubble.reaction.category.${E}`)},E))}),jsxRuntimeExports.jsx("textarea",{id:"comment",name:"comment",placeholder:h("bot-bubble.reaction.comment"),defaultValue:o?.comment,onChange:v,className:styles$j.commentTextarea,rows:3,"aria-label":h("bot-bubble.reaction.comment")})]}):null},botMessageActionContainer="_botMessageActionContainer_g6hpe_1",alwaysVisible="_alwaysVisible_g6hpe_15",active$1="_active_g6hpe_19",botMessageActionInnerContainer="_botMessageActionInnerContainer_g6hpe_27",header$1="_header_g6hpe_52",botMessageActions="_botMessageActions_g6hpe_57",reported="_reported_g6hpe_68",action="_action_g6hpe_72",anyReport="_anyReport_g6hpe_120",closeButton="_closeButton_g6hpe_136",styles$i={botMessageActionContainer,alwaysVisible,active:active$1,botMessageActionInnerContainer,header:header$1,botMessageActions,reported,action,anyReport,closeButton},CloseButton=({isSubmitting:n,onClick:i})=>{const o=useTranslation();return jsxRuntimeExports.jsx("button",{className:clsx(styles$i.action,styles$i.closeButton,"tooltip--bottom-left"),"aria-label":o("bot-bubble.reaction.close"),"data-title":o("bot-bubble.reaction.close"),tabIndex:0,onClick:i,children:jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:n?jsxRuntimeExports.jsx("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}):jsxRuntimeExports.jsx("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"})})})},BotMessageActions=({alwaysVisible:n,senderType:i,reaction:o,botMessageRef:u,message:h,onReaction:m})=>{const y=useTranslation(),[_,v]=reactExports.useState(!1),[E,S]=reactExports.useState(!1),[w,T]=reactExports.useState(!1),R=reactExports.useRef(null),D=reactExports.useRef(null);useClickOutsideEventListener(R,()=>{T(!1)});const N=Y=>{Y.key==="Escape"&&T(!1)};reactExports.useEffect(()=>(document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}),[]),reactExports.useEffect(()=>{w&&R.current?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},[w]);const M=Y=>{D.current&&clearTimeout(D.current),S(!0),m(Y),D.current=setTimeout(()=>{S(!1)},1e3)},L=reactExports.useCallback(async()=>{if(u.current)try{v(!0);const Y=u.current.innerHTML,K=u.current.innerText;await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([Y],{type:"text/html"}),"text/plain":new Blob([K],{type:"text/plain"})})]),await new Promise($=>setTimeout($,1500))}finally{v(!1)}},[u]),z=()=>{T(!1),m(o?.type==="GOOD"?null:{type:"GOOD"})},U=()=>{m({...h.reaction,type:"BAD"}),T(!w)},H=Y=>K=>{(K.key==="Enter"||K.key===" ")&&Y()};return jsxRuntimeExports.jsx("div",{ref:R,className:clsx(styles$i.botMessageActionContainer,n&&styles$i.alwaysVisible,w&&styles$i.active),"aria-hidden":"true",children:jsxRuntimeExports.jsxs("div",{className:clsx(styles$i.botMessageActionInnerContainer,n&&styles$i.alwaysVisible,w&&styles$i.active,o&&styles$i.reported),role:"group","aria-label":y("bot-bubble.actions.label"),children:[jsxRuntimeExports.jsxs("div",{className:styles$i.header,children:[jsxRuntimeExports.jsxs("div",{className:clsx(styles$i.botMessageActions,o&&styles$i.reported),children:[i===UserType.BOT&&jsxRuntimeExports.jsx("button",{className:clsx(styles$i.action,o?.type&&styles$i.anyReport,o?.type==="GOOD"&&styles$i.reported,"tooltip--top-right"),tabIndex:0,"aria-label":y(o?.type==="GOOD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.good"),"aria-pressed":o?.type==="GOOD","data-title":y(o?.type==="GOOD"?"bot-bubble.reaction.remove":"bot-bubble.reaction.good"),onPointerDown:z,onKeyDown:H(z),children:jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:o?.type==="GOOD"?jsxRuntimeExports.jsx("path",{d:"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32Z"}):jsxRuntimeExports.jsx("path",{d:"M234,80.12A24,24,0,0,0,216,72H160V56a40,40,0,0,0-40-40,8,8,0,0,0-7.16,4.42L75.06,96H32a16,16,0,0,0-16,16v88a16,16,0,0,0,16,16H204a24,24,0,0,0,23.82-21l12-96A24,24,0,0,0,234,80.12ZM32,112H72v88H32ZM223.94,97l-12,96a8,8,0,0,1-7.94,7H88V105.89l36.71-73.43A24,24,0,0,1,144,56V80a8,8,0,0,0,8,8h64a8,8,0,0,1,7.94,9Z"})})}),i===UserType.BOT&&jsxRuntimeExports.jsx("button",{className:clsx(styles$i.action,o?.type&&styles$i.anyReport,o?.type==="BAD"&&styles$i.reported,"tooltip--top-right"),tabIndex:0,"aria-label":y("bot-bubble.reaction.bad"),"aria-pressed":o?.type==="BAD","data-title":y("bot-bubble.reaction.bad"),onPointerDown:U,onKeyDown:H(U),children:jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:o?.type==="BAD"?jsxRuntimeExports.jsx("path",{d:"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Z"}):jsxRuntimeExports.jsx("path",{d:"M239.82,157l-12-96A24,24,0,0,0,204,40H32A16,16,0,0,0,16,56v88a16,16,0,0,0,16,16H75.06l37.78,75.58A8,8,0,0,0,120,240a40,40,0,0,0,40-40V184h56a24,24,0,0,0,23.82-27ZM72,144H32V56H72Zm150,21.29a7.88,7.88,0,0,1-6,2.71H152a8,8,0,0,0-8,8v24a24,24,0,0,1-19.29,23.54L88,150.11V56H204a8,8,0,0,1,7.94,7l12,96A7.87,7.87,0,0,1,222,165.29Z"})})}),jsxRuntimeExports.jsx("button",{className:clsx(styles$i.action,"tooltip--top-right"),style:{visibility:w?"hidden":"visible"},tabIndex:0,"aria-label":y("bot-bubble.copy"),"data-title":y("bot-bubble.copy"),onClick:L,children:jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:_?jsxRuntimeExports.jsx("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}):jsxRuntimeExports.jsx("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"})})})]}),w&&jsxRuntimeExports.jsx(CloseButton,{isSubmitting:E,onClick:()=>T(!1)})]}),h.reaction&&jsxRuntimeExports.jsx(BadReactionForm,{open:w,actionsRef:R,reaction:h.reaction,onReaction:M})]})})},BotMessage=reactExports.forwardRef(({message:n,isAnimated:i,isLastMessage:o,isFirstMessageBySender:u,isLastMessageBySender:h,children:m,onReaction:y},_)=>{const v=useTranslation(),E=reactExports.useRef(null),S=n.sender.type===UserType$1.BOT;return jsxRuntimeExports.jsxs("li",{ref:_,className:clsx(styles$k.message,styles$k.messageBot,o&&styles$k.lastMessage,u&&styles$k.messageBotFirst,h&&styles$k.messageBotLast,"chat__bubbleContainer",i&&styles$k.messageBotAnimated,i&&"chat__bubbleContainer--animated",S?"chat__botBubbleContainer":"chat__agentBubbleContainer",u&&"chat__bubbleContainer--first",h&&"chat__bubbleContainer--last"),role:"article",children:[jsxRuntimeExports.jsx("img",{className:clsx(styles$k.avatar,S?styles$k.botAvatar:styles$k.agentAvatar,"chat__avatar",S?"chat__botAvatar":"chat__agentAvatar"),src:`${n.sender.avatar}`,alt:S?"Bot":"Agent",referrerPolicy:"no-referrer","aria-hidden":"true"}),jsxRuntimeExports.jsxs("div",{className:styles$k.messageContainer,children:[jsxRuntimeExports.jsx("div",{ref:E,className:clsx(styles$k.bubble,styles$k.bubbleLeft,"chat__bubble",S?"chat__botBubble":"chat__agentBubble"),tabIndex:0,role:"group","aria-label":v(S?"bot-bubble.label":"agent-bubble.label"),children:jsxRuntimeExports.jsx("div",{className:clsx(styles$k.leftText),children:m})}),y&&jsxRuntimeExports.jsx(BotMessageActions,{alwaysVisible:o&&h,senderType:n.sender.type,reaction:n.reaction,message:n,botMessageRef:E,onReaction:y})]})]})}),sourceList="_sourceList_1sc0q_1",source="_source_1sc0q_1",label="_label_1sc0q_39",styles$h={sourceList,source,label},Docx=n=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...n,children:jsxRuntimeExports.jsx("path",{d:"M52,146H36a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6H52a34,34,0,0,0,0-68Zm0,56H42V158H52a22,22,0,0,1,0,44Zm168.15-5.46a6,6,0,0,1,.18,8.48A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a16.23,16.23,0,0,0,11.67-5.28A6,6,0,0,1,220.15,196.54ZM128,146c-16.54,0-30,15.25-30,34s13.46,34,30,34,30-15.25,30-34S144.54,146,128,146Zm0,56c-9.93,0-18-9.87-18-22s8.07-22,18-22,18,9.87,18,22S137.93,202,128,202ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z"})}),File$1=n=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...n,children:jsxRuntimeExports.jsx("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"})}),Pdf=n=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...n,children:jsxRuntimeExports.jsx("path",{d:"M222,152a6,6,0,0,1-6,6H190v20h18a6,6,0,0,1,0,12H190v18a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6h32A6,6,0,0,1,222,152ZM90,172a26,26,0,0,1-26,26H54v10a6,6,0,0,1-12,0V152a6,6,0,0,1,6-6H64A26,26,0,0,1,90,172Zm-12,0a14,14,0,0,0-14-14H54v28H64A14,14,0,0,0,78,172Zm84,8a34,34,0,0,1-34,34H112a6,6,0,0,1-6-6V152a6,6,0,0,1,6-6h16A34,34,0,0,1,162,180Zm-12,0a22,22,0,0,0-22-22H118v44h10A22,22,0,0,0,150,180ZM42,112V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,0,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,0,1-12,0ZM158,82h35.52L158,46.48Z"})}),Web=n=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...n,children:jsxRuntimeExports.jsx("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z"})}),SourceIcon=({type:n,...i})=>{switch(n){case"WEBSITE":return jsxRuntimeExports.jsx(Web,{...i});case"PDF":return jsxRuntimeExports.jsx(Pdf,{...i});case"DOCX":return jsxRuntimeExports.jsx(Docx,{...i});default:return jsxRuntimeExports.jsx(File$1,{...i})}},MessageSources=({sources:n,onLinkClick:i})=>{const o=useTranslation(),u=m=>()=>{i(m.url)},h=m=>y=>{(y.key==="Enter"||y.key===" ")&&i(m.url)};return n.length?jsxRuntimeExports.jsx("ul",{className:styles$h.sourceList,"aria-label":o("bot-bubble.sources"),children:n.map(m=>jsxRuntimeExports.jsx("li",{className:styles$h.source,children:jsxRuntimeExports.jsxs("a",{role:"button",tabIndex:0,"aria-label":`${o("bot-bubble.source.open")}: ${m.label}`,onClick:u(m),onKeyDown:h(m),children:[jsxRuntimeExports.jsx(SourceIcon,{type:m.type,"aria-hidden":"true"}),jsxRuntimeExports.jsx("div",{className:styles$h.label,children:m.label})]})},m.url))}):null},button$2="_button_3ui4g_1",buttonDefault="_buttonDefault_3ui4g_13",buttonPrimary="_buttonPrimary_3ui4g_28",styles$g={button:button$2,buttonDefault,buttonPrimary},Button=({className:n,children:i,...o})=>jsxRuntimeExports.jsx("button",{className:clsx(styles$g.button,n),type:"button",role:"button",...o,children:i}),title="_title_137pi_1",buttons$1="_buttons_137pi_6",button$1="_button_137pi_6",imageContainer="_imageContainer_137pi_29",image="_image_137pi_29",video_container="_video_container_137pi_44",video="_video_137pi_44",only="_only_137pi_58",styles$f={title,buttons:buttons$1,button:button$1,imageContainer,image,video_container,video,only},Buttons=({buttons:n,onButtonClick:i})=>jsxRuntimeExports.jsx("div",{className:clsx(styles$f.buttons,"chat__bubbleButtons"),children:n.map((o,u)=>jsxRuntimeExports.jsx(Button,{className:clsx(styles$f.button,"chat__bubbleButton"),onClick:()=>i(o),children:o.title},u))}),OPEN_LINK_IN_NEW_TAB_INDICATOR="newtab#",MarkdownText=({markdown:n,markdownOptions:i={},onLinkClick:o})=>{const u=m=>y=>(y.preventDefault(),m&&o(m),!1),h=({title:m,href:y,children:_})=>y.indexOf(OPEN_LINK_IN_NEW_TAB_INDICATOR)===0?jsxRuntimeExports.jsx("a",{href:y.slice(OPEN_LINK_IN_NEW_TAB_INDICATOR.length),title:m,target:"_blank",rel:"noopener noreferrer",children:_}):jsxRuntimeExports.jsx("a",{onClick:u(y),title:m,href:y,children:_});return jsxRuntimeExports.jsx(X5,{options:{...i,overrides:{a:h}},children:n})},Text$2=({text:n,onLinkClick:i})=>n?jsxRuntimeExports.jsx("div",{children:jsxRuntimeExports.jsx(MarkdownText,{markdown:n,onLinkClick:i})}):null,Title=({title:n})=>n?jsxRuntimeExports.jsx("h1",{className:styles$f.title,children:n}):null,Body=({title:n,text:i,buttons:o,onButtonClick:u,onLinkClick:h})=>n?.length||i?.length||o?.length?jsxRuntimeExports.jsxs("div",{className:clsx(styles$k.bubbleContent),children:[jsxRuntimeExports.jsx(Title,{title:n}),jsxRuntimeExports.jsx(Text$2,{text:i,onLinkClick:h}),jsxRuntimeExports.jsx(Buttons,{buttons:o,onButtonClick:u})]}):null,Image=({alt:n,imageUrl:i,itemUrl:o,hasBody:u})=>i?o?o.indexOf("youtube.com")>-1?jsxRuntimeExports.jsx("div",{className:styles$f.video_container,children:jsxRuntimeExports.jsx("iframe",{className:clsx(styles$f.video,{[styles$f.only]:!u}),title:"Youtube",width:"100%",src:o+"?rel=0",frameBorder:"0",allowFullScreen:!0})}):jsxRuntimeExports.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:jsxRuntimeExports.jsx("div",{className:styles$f.imageContainer,children:jsxRuntimeExports.jsx("img",{className:clsx(styles$f.image,{[styles$f.only]:!u}),src:i,alt:n})})}):jsxRuntimeExports.jsx("div",{className:styles$f.imageContainer,children:jsxRuntimeExports.jsx("img",{className:clsx(styles$f.image,{[styles$f.only]:!u}),src:i,alt:n})}):null,DetailMessage=({title:n,text:i,imageUrl:o,itemUrl:u,buttons:h,sources:m,onButtonClick:y,onLinkClick:_})=>{const v=!!n?.length||!!i?.length||!!h?.length;return jsxRuntimeExports.jsxs("div",{className:clsx(styles$f.detailMessage),children:[jsxRuntimeExports.jsx(Image,{hasBody:v,imageUrl:o,itemUrl:u,alt:n||""}),v&&jsxRuntimeExports.jsx(Body,{title:n,text:i,buttons:h,onLinkClick:_,onButtonClick:y}),jsxRuntimeExports.jsx(MessageSources,{sources:m,onLinkClick:_})]})},UserMessage=reactExports.forwardRef(({isFirstMessageBySender:n,isLastMessageBySender:i,children:o},u)=>{const h=useTranslation();return jsxRuntimeExports.jsx("li",{ref:u,className:clsx(styles$k.message,styles$k.messageGuest,n&&styles$k.messageGuestFirst,i&&styles$k.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer",n&&"chat__bubbleContainer--first",i&&"chat__bubbleContainer--last"),role:"article",children:jsxRuntimeExports.jsx("div",{className:clsx(styles$k.bubble,styles$k.bubbleRight,"chat__bubble","chat__guestBubble"),tabIndex:0,role:"group","aria-label":h("guest-bubble.label"),children:jsxRuntimeExports.jsx("div",{className:clsx(styles$k.rightText),children:o})})})}),useClientName=()=>reactExports.useMemo(()=>getClientName(),[]),markdown="_markdown_nw7vg_1",markdownStyle={markdown},SOURCE_REFERENCE_CLASS="source-info-reference",MarkdownMessage=({actionId:n,markdown:i,sources:o,onLinkClick:u})=>{const h=useClientName(),m=useAppDispatch(),y=getFootnoteReferenceCounter(),_=useAppSelector(S=>{const w=S.chat.sourceInfos;if(w?.type==="loaded"||w?.type==="loading")return w.chunkId}),v=S=>w=>{const T=w.key;(T==="ArrowDown"||T==="ArrowRight"||T==="Enter"||T===" "||T==="Space")&&(w.stopPropagation(),m(loadSourceInfosRequest(h,n,S)))},E=S=>()=>{m(loadSourceInfosRequest(h,n,S))};return reactExports.useLayoutEffect(()=>{document.querySelectorAll(`.${SOURCE_REFERENCE_CLASS}`).forEach(S=>{const w=S.previousSibling;w&&w.nodeType===Node.TEXT_NODE&&w.textContent?.endsWith(" ")&&w.textContent?.trim().length&&S.classList.add(`${SOURCE_REFERENCE_CLASS}--before-space`);const T=S.nextSibling;T&&T.nodeType===Node.TEXT_NODE&&T.textContent?.startsWith(" ")&&T.textContent?.trim().length&&S.classList.add(`${SOURCE_REFERENCE_CLASS}--after-space`)})},[i]),jsxRuntimeExports.jsxs("div",{className:styles$k.bubbleContent,children:[jsxRuntimeExports.jsx("div",{className:markdownStyle.markdown,children:jsxRuntimeExports.jsx(MarkdownText,{markdown:i,onLinkClick:u,markdownOptions:{renderRule(S,w,T,R){if(w.type===O.footnoteReference){const D=w.text===_;return jsxRuntimeExports.jsx("span",{className:clsx(styles$k.sourceInfoReference,D&&styles$k.sourceInfoReferenceActive,SOURCE_REFERENCE_CLASS),children:jsxRuntimeExports.jsx("a",{type:"button",tabIndex:0,onClick:E(w.text),onKeyDown:v(w.text),children:y(w.text)})},R.key)}return S()}}})}),jsxRuntimeExports.jsx(MessageSources,{sources:o,onLinkClick:u})]})},getFootnoteReferenceCounter=()=>{const n=[];return o=>{const u=n.indexOf(o);return u>-1?u+1:(n.push(o),n.length)}},text$1="_text_gp0s0_1",command$1="_command_gp0s0_5",styles$e={text:text$1,command:command$1},Text$1=({text:n,commands:i=[]})=>{const o=i.find(h=>n.startsWith(`/${h}`)),u=o?n.slice(o.length+1):n;return jsxRuntimeExports.jsxs("div",{children:[o&&jsxRuntimeExports.jsxs("code",{className:styles$e.command,children:["/",o]}),u.split(`
118
+ `).map((h,m)=>jsxRuntimeExports.jsxs("span",{className:styles$e.text,children:[h,jsxRuntimeExports.jsx("br",{})]},m))]})},TextMessage=({text:n,commands:i,sources:o,onLinkClick:u})=>jsxRuntimeExports.jsxs("div",{className:styles$k.bubbleContent,children:[jsxRuntimeExports.jsx(Text$1,{text:n,commands:i}),jsxRuntimeExports.jsx(MessageSources,{sources:o,onLinkClick:u})]}),Message=reactExports.forwardRef(({message:n,commands:i,isLastMessage:o,isFirstMessageBySender:u,isLastMessageBySender:h,onReaction:m,onButtonClick:y,onLinkClick:_},v)=>{const E=getMessageCmp(n._id,n,i,y,_),S=w=>{m(n._id,w)};return n.sender.type===UserType$1.GUEST?jsxRuntimeExports.jsx(UserMessage,{ref:v,isFirstMessageBySender:u,isLastMessageBySender:h,children:E}):jsxRuntimeExports.jsx(BotMessage,{ref:v,message:n,isAnimated:!1,isLastMessage:o,isFirstMessageBySender:u,isLastMessageBySender:h,onReaction:S,children:E})}),getMessageCmp=(n,i,o,u,h)=>{switch(i.type){case MessageTypeEnum.TEXT:{const m=i;return jsxRuntimeExports.jsx(TextMessage,{text:m.text,commands:o,sources:i.sources||[],onLinkClick:h})}case MessageTypeEnum.DETAIL:{const m=i;return jsxRuntimeExports.jsx(DetailMessage,{title:m.title,text:m.text,imageUrl:m.imageUrl,itemUrl:m.itemUrl,buttons:m.buttons,sources:i.sources||[],onButtonClick:u,onLinkClick:h})}case MessageTypeEnum.MARKDOWN:{const m=i;return jsxRuntimeExports.jsx(MarkdownMessage,{actionId:n,markdown:m.markdown,sources:m.sources||[],onLinkClick:h})}}},areEqual=(n,i)=>n.message._id===i.message._id&&n.message.reaction===i.message.reaction&&n.isLastMessage===i.isLastMessage&&n.isFirstMessageBySender===i.isFirstMessageBySender&&n.isLastMessageBySender===i.isLastMessageBySender,Message$1=React.memo(Message,areEqual),ticontainer="_ticontainer_xg0dn_1",tiblock="_tiblock_xg0dn_5",tidot="_tidot_xg0dn_12",styles$d={ticontainer,tiblock,tidot},TypingIndicator=({isTyping:n=!1})=>jsxRuntimeExports.jsx("div",{className:styles$d.ticontainer,children:jsxRuntimeExports.jsx("div",{className:styles$d.tiblock,children:n?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:clsx(styles$d.tidot,"chat__typingIndicator"),"aria-hidden":"true"}),jsxRuntimeExports.jsx("div",{className:clsx(styles$d.tidot,"chat__typingIndicator"),"aria-hidden":"true"}),jsxRuntimeExports.jsx("div",{className:clsx(styles$d.tidot,"chat__typingIndicator"),"aria-hidden":"true"})]}):null})}),BotTypingMessage=Object.assign({_id:"typing-indicator"},new TextMessage$1("",new BotUser)),Conversation=({messages:n,isBotTyping:i,commands:o,onTranscriptItemReaction:u,onButtonClick:h,onLinkClick:m})=>{const y=useTranslation(),_=reactExports.useRef(0),v=reactExports.useRef(!0),E=reactExports.useRef(null),S=reactExports.useRef(null),w=reactExports.useRef(null),T=useAppSelector(N=>N.settings.enableGeneralConditions);reactExports.useLayoutEffect(()=>{if(n.length&&E.current&&(_.current<n.length||i)){if(S.current){const N=S.current.offsetTop;E.current.scrollTop=N}else if(w.current){const N=w.current.offsetTop;E.current.scrollTop=N}v.current&&(v.current=!1),_.current=n.length}},[n,v,i]);let R;const D=n.length;return jsxRuntimeExports.jsxs("div",{ref:E,className:clsx(styles$m.messageContainer,"chat__messageContainer"),style:{scrollBehavior:n.length&&v.current?"auto":"smooth"},id:"MessageContainer","aria-label":y("conversation.label"),children:[T&&jsxRuntimeExports.jsx(GeneralConditions,{}),jsxRuntimeExports.jsxs("ul",{className:styles$m.messages,role:"list",children:[n.map((N,M)=>{const L=getIsFirstMessageBySender(N,R),z=getIsLastMessageBySender(N,M,n,i);R=N.sender.type;const U=M+1===D,H=N._id||`added-${M}`;return jsxRuntimeExports.jsx(Message$1,{ref:U?w:null,message:N,commands:o,isLastMessage:U,isFirstMessageBySender:L,isLastMessageBySender:z,onButtonClick:h,onLinkClick:m,onReaction:u},H)}),i&&jsxRuntimeExports.jsx(BotMessage,{ref:S,message:BotTypingMessage,isLastMessage:!1,isAnimated:!0,isFirstMessageBySender:R!==UserType$1.BOT,isLastMessageBySender:!0,children:jsxRuntimeExports.jsx(TypingIndicator,{isTyping:!0})},"last")]})]})},getIsFirstMessageBySender=(n,i)=>!i||i!==n.sender.type,getIsLastMessageBySender=(n,i,o,u)=>{const h=n.sender.type,m=o.length;return i+1===m?!(h===UserType$1.BOT&&u):h!==o.at(i+1)?.sender.type},bottomSheet="_bottomSheet_jp8dl_1",bottomSheetOpen="_bottomSheetOpen_jp8dl_15",bottomSheetClose="_bottomSheetClose_jp8dl_20",bottomSheetStyles={bottomSheet,bottomSheetOpen,bottomSheetClose},container$4="_container_xc2nx_1",styles$c={container:container$4},Drawer=({contentUrl:n})=>{const i=useAppSelector(m=>m.connection.sessionId),[o,u]=reactExports.useState(!1);reactExports.useEffect(()=>{u(m=>m||!!n)},[n]);const h=reactExports.useMemo(()=>{if(n&&i){const m=new URL(n,document.baseURI);return m.searchParams.set("sessionId",i),m.toString()}else return},[n,i]);return jsxRuntimeExports.jsx("div",{className:clsx(styles$c.container,bottomSheetStyles.bottomSheet,{[bottomSheetStyles.bottomSheetOpen]:!!n,[bottomSheetStyles.bottomSheetClose]:o&&!n}),children:h&&jsxRuntimeExports.jsx("iframe",{title:"Drawer",id:"form-drawer",src:h,className:styles$c.iframe})})},container$3="_container_vvbth_1",styles$b={container:container$3},Link$1=({title:n,href:i,children:o})=>jsxRuntimeExports.jsx("a",{href:i,title:n,target:"_blank",rel:"noopener noreferrer",children:o}),PoweredBy=()=>{const i=useTranslation()("powered-by");return i&&i.length?jsxRuntimeExports.jsx("div",{className:clsx(styles$b.container,"chat__poweredBy"),children:jsxRuntimeExports.jsx(X5,{options:{overrides:{a:Link$1}},children:i})}):null},markdownToPlainText=(n,i)=>{const o=new Map;let u=0;return n.replace(/^#{1,6}\s+/gm,"").replace(/(\*\*|__)(.*?)\1/g,"$2").replace(/(\*|_)(.*?)\1/g,"$2").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/\[\^([^\]]+)\]/g,(h,m)=>(o.has(m)||o.set(m,++u),`(${i} ${o.get(m)})`)).replace(/`([^`]+)`/g,"$1").replace(/```[\s\S]*?```/g,"").replace(/^>\s+/gm,"").replace(/^(-{3,}|_{3,}|\*{3,})$/gm,"").replace(/^[\s]*[-*+]\s+/gm,"").replace(/^[\s]*\d+\.\s+/gm,"").replace(/\n{3,}/g,`
119
+
120
+ `).trim()},ScreenReaderAnnouncer=({messages:n,isBotTyping:i})=>{const o=reactExports.useRef(""),u=useTranslation(),h=u("bot-bubble.footnote"),m=v=>{switch(v.type){case"TEXT":return v.text||"";case"MARKDOWN":{const E=v.markdown||"";return markdownToPlainText(E,h)}case"DETAIL":return v.text||v.title||"";default:return""}},_=(()=>{if(i)return u("chatbot.typing")??"Chatbot is typing";const v=[...n].reverse().find(E=>E.sender.type===UserType.BOT);return v?m(v):""})();return reactExports.useEffect(()=>{_!==o.current&&(o.current=_)},[_]),jsxRuntimeExports.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:_})},DefaultButton=({className:n,children:i,...o})=>jsxRuntimeExports.jsx(Button,{className:clsx(styles$g.buttonDefault,n),type:"button",...o,children:i}),PrimaryButton=({className:n,children:i,...o})=>jsxRuntimeExports.jsx(Button,{className:clsx(styles$g.buttonPrimary,n),...o,children:i}),container$2="_container_h23mk_1",formContainer="_formContainer_h23mk_17",emailInput="_emailInput_h23mk_22",description="_description_h23mk_52",actions$3="_actions_h23mk_57",validationError="_validationError_h23mk_67",submitted="_submitted_h23mk_74",styles$a={container:container$2,formContainer,emailInput,description,actions:actions$3,validationError,submitted},TranscriptExport=({visible:n,onEmailExport:i,onClose:o})=>{const u=useTranslation(),[h,m]=reactExports.useState(void 0),[y,_]=reactExports.useState(!1),[v,E]=reactExports.useState(void 0),S=reactExports.useRef(null);reactExports.useEffect(()=>{n?(S.current?.focus(),_(!1),m(n)):h===!0&&m(!1)},[n,h]);const w=R=>{R.preventDefault(),v&&v.length>0&&(i(v),_(!0),setTimeout(o,3*1e3))},T=R=>{const D=R.target.value.trim(),N=/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(D);E(N?D:"")};return jsxRuntimeExports.jsxs("div",{className:clsx(styles$a.container,bottomSheetStyles.bottomSheet,{[bottomSheetStyles.bottomSheetOpen]:h===!0,[bottomSheetStyles.bottomSheetClose]:h===!1}),children:[jsxRuntimeExports.jsx("h2",{children:u("export-transcript.email.title")}),jsxRuntimeExports.jsx(X5,{className:styles$a.description,children:u("export-transcript.email.description")||""}),jsxRuntimeExports.jsxs("form",{onSubmit:w,className:styles$a.formContainer,children:[jsxRuntimeExports.jsxs("div",{children:[jsxRuntimeExports.jsx("input",{disabled:y,ref:S,type:"email",placeholder:u("export-transcript.email.placeholder"),className:styles$a.emailInput,onChange:T}),v?.length===0?jsxRuntimeExports.jsx("div",{className:styles$a.validationError,children:u("export-transcript.email.invalid")}):null]}),jsxRuntimeExports.jsxs("div",{className:styles$a.actions,children:[jsxRuntimeExports.jsx(DefaultButton,{onClick:o,children:u("export-transcript.email.cancel")}),jsxRuntimeExports.jsx(PrimaryButton,{type:"submit",disabled:y||v===void 0||v.length===0,children:u("export-transcript.email.send")})]})]}),y&&jsxRuntimeExports.jsx("div",{className:styles$a.submitted,children:u("export-transcript.email.success")})]})},inputContainer="_inputContainer_fi5ao_1",styles$9={inputContainer},blockUserInput="_blockUserInput_pot9c_1",styles$8={blockUserInput},BlockUserInput=({visible:n})=>{const i=useTranslation();return n?jsxRuntimeExports.jsx("div",{className:clsx(styles$8.blockUserInput,"chat__blockUserInput"),children:i("block-user-input.title")}):null},commandsDropdown="_commandsDropdown_fmklx_1",commands="_commands_fmklx_1",command="_command_fmklx_1",commandActive="_commandActive_fmklx_49",style={commandsDropdown,commands,command,commandActive},useKeyboardEffect=(n,i,o,u,h)=>{reactExports.useEffect(()=>{const m=y=>{if(n.length)switch(y.key){case"Enter":o(n[i]);break;case"ArrowUp":u(_=>_>0?_-1:n.length-1);break;case"ArrowDown":u(_=>_<n.length-1?_+1:0);break;case"Escape":h([]);break}};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m)}},[n,i,o,u,h])},CommandsDropdown=({text:n,commands:i,onSelectCommand:o,onVisibilityChange:u})=>{const h=reactExports.useRef(null),m=useTranslation(),[y,_]=reactExports.useState([]),[v,E]=reactExports.useState(calcMaxCommandLength(i)),[S,w]=reactExports.useState(0),T=R=>o(`/${R}`);return useClickOutsideEventListener(h,()=>_([])),useKeyboardEffect(y,S,T,w,_),reactExports.useEffect(()=>{E(calcMaxCommandLength(i))},[i]),reactExports.useEffect(()=>{const R=n.length||0;R===0||R>v||!n.startsWith("/")?_([]):_(i.filter(byText(n))),w(0)},[i,n,v]),reactExports.useEffect(()=>{u(!!y.length)},[y,u]),y.length?jsxRuntimeExports.jsx("div",{ref:h,className:style.commandsDropdown,children:jsxRuntimeExports.jsx("ul",{id:"command-list",className:style.commands,role:"listbox",children:y.map((R,D)=>jsxRuntimeExports.jsxs("li",{className:clsx([style.command,S===D&&style.commandActive]),role:"option",onClick:()=>T(R),onMouseOver:()=>w(D),children:[jsxRuntimeExports.jsxs("h1",{children:["/",R]}),jsxRuntimeExports.jsx("p",{children:m(`commands.${R}`)})]},R))})}):null},calcMaxCommandLength=n=>Math.max(...n.map(i=>i.length+1)),byText=n=>i=>{const o=`/${i}`;return o.startsWith(n)&&o.length>=n.length},callToActionContainer="_callToActionContainer_d8izj_1",callToActionTitle="_callToActionTitle_d8izj_23",rateOverlay="_rateOverlay_d8izj_30",body$1="_body_d8izj_52",footer$1="_footer_d8izj_60",actions$2="_actions_d8izj_75",bubbles="_bubbles_d8izj_89",stars="_stars_d8izj_191",starsSmall="_starsSmall_d8izj_205",starsLarge="_starsLarge_d8izj_211",star="_star_d8izj_191",starReadonly="_starReadonly_d8izj_225",starIcon="_starIcon_d8izj_235",starsDescriptionContainer="_starsDescriptionContainer_d8izj_253",starsDescription="_starsDescription_d8izj_253",styles$7={callToActionContainer,callToActionTitle,rateOverlay,body:body$1,footer:footer$1,actions:actions$2,bubbles,stars,starsSmall,starsLarge,star,starReadonly,starIcon,starsDescriptionContainer,starsDescription},Star=({value:n,index:i,count:o,readonly:u,onHover:h,onClick:m})=>{const y=_=>{m&&_.key==="Enter"&&m()};return jsxRuntimeExports.jsx("li",{className:clsx(styles$7.star,{[styles$7.starReadonly]:u},"chat__conversationRating__star"),children:jsxRuntimeExports.jsx("div",{role:"radio","aria-checked":n>i?"true":"false","aria-posinset":i+1,"aria-setsize":o,tabIndex:0,onMouseOver:h,onKeyDown:y,onClick:m,children:jsxRuntimeExports.jsx("span",{role:"img","aria-label":"Star",className:clsx(styles$7.starIcon),children:jsxRuntimeExports.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"star",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:jsxRuntimeExports.jsx("path",{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"})})})})})},STAR_COUNT=5,Stars=({value:n,size:i,readonly:o=!1,onChange:u})=>{const[h,m]=reactExports.useState(void 0),y=()=>{m(void 0)},_=E=>()=>{if(!o){const S=E+1;m(S)}},v=E=>()=>{u&&!o&&(u(E===0&&n===1?0:E+1),m(void 0))};return jsxRuntimeExports.jsx("ul",{tabIndex:0,role:"radiogroup",className:clsx(styles$7.stars,{[styles$7.starsSmall]:i==="small",[styles$7.starsLarge]:i==="large"},"chat__conversationRating__stars",{chat__conversationRating__stars__small:i==="small",chat__conversationRating__stars__large:i==="large"}),onMouseOut:y,children:Array(STAR_COUNT).fill(0).map((E,S)=>jsxRuntimeExports.jsx(Star,{value:h===void 0?n:h,index:S,count:STAR_COUNT,readonly:o,onHover:_(S),onClick:v(S)},S))})},CallToAction=({visible:n,onRate:i})=>{const o=useTranslation();return n?jsxRuntimeExports.jsxs("div",{className:clsx(styles$7.callToActionContainer,"chat__conversationRating__callToAction"),children:[jsxRuntimeExports.jsx("div",{className:clsx(styles$7.callToActionTitle,"chat__conversationRating__callToAction__title"),children:o("conversation-rating.call-to-action.title")}),jsxRuntimeExports.jsx(Stars,{value:0,size:"small",onChange:i})]}):null},BotBubble=({isFirstMessageBySender:n,isLastMessageBySender:i,children:o})=>jsxRuntimeExports.jsxs("div",{className:clsx(styles$k.message,styles$k.messageBot,n&&styles$k.messageBotFirst,i&&styles$k.messageBotLast,"chat__bubbleContainer","chat__botBubbleContainer",n&&"chat__bubbleContainer--first",i&&"chat__bubbleContainer--last"),children:[jsxRuntimeExports.jsx("img",{className:clsx(styles$k.avatar,styles$k.botAvatar),src:"bot.svg",alt:"Bot"}),jsxRuntimeExports.jsx("div",{className:clsx(styles$k.bubble,styles$k.bubbleLeft,"chat__bubble","chat__botBubble"),children:jsxRuntimeExports.jsx("div",{className:clsx(styles$k.leftText,styles$k.bubbleContent),children:o})})]}),GuestBubble=({children:n})=>jsxRuntimeExports.jsx("div",{className:clsx(styles$k.message,styles$k.messageGuest,styles$k.messageGuestFirst,styles$k.messageGuestLast,"chat__bubbleContainer","chat__guestBubbleContainer","chat__bubbleContainer--first","chat__bubbleContainer--last"),children:jsxRuntimeExports.jsx("div",{className:clsx(styles$k.bubble,styles$k.bubbleRight,"chat__bubble","chat__guestBubble"),children:jsxRuntimeExports.jsx("div",{className:clsx(styles$k.rightText,styles$k.bubbleContent),children:n})})}),RateOverlay=()=>{const n=useTranslation(),i=useAppDispatch(),o=useAppSelector(M=>M.chat.conversationRating),[u,h]=reactExports.useState(o.rating?.value||0),[m,y]=reactExports.useState(void 0),[_,v]=reactExports.useState(void 0),[E,S]=reactExports.useState({submitted:!1,feedback:""}),w=reactExports.useRef(null),[T,R]=reactExports.useState(!1);reactExports.useEffect(()=>{o.opener?(S({submitted:!1,feedback:""}),v(!0)):_===!0&&v(!1)},[o.opener,_]),reactExports.useEffect(()=>{h(o.rating?.value||0)},[o.rating?.value,o.opener]),reactExports.useEffect(()=>{w.current&&(w.current.value=o.rating?.feedback||"")},[o.rating?.feedback]),reactExports.useEffect(()=>{const M=u>0?n(`conversation-rating.overlay.bot-message.rate-feedback.value-${u}`):void 0;y(M?.length?M:void 0)},[u,n]),reactExports.useEffect(()=>{E.submitted?setTimeout(()=>R(!0),E.feedback.length?500:0):R(!1)},[E]);const D=M=>{M.preventDefault();const L=w.current?.value?.trim()||"";i(handleRatingFromUser(u,L)),S({submitted:!0,feedback:L})},N=()=>{o.opener==="CLOSE_CHAT"?i(closeChatWindow()):o.opener==="RESTART_CHAT"?i(restartChat()):i(hideConversationRatingOverlay())};return jsxRuntimeExports.jsx("div",{className:clsx(styles$7.rateOverlay,bottomSheetStyles.bottomSheet,"chat__conversationRating__overlay",{[bottomSheetStyles.bottomSheetOpen]:_===!0,[bottomSheetStyles.bottomSheetClose]:_===!1}),children:jsxRuntimeExports.jsxs("form",{onSubmit:D,children:[jsxRuntimeExports.jsxs("div",{className:clsx(styles$7.body,"chat__conversationRating__overlay__body"),children:[jsxRuntimeExports.jsx("div",{}),jsxRuntimeExports.jsx("div",{className:clsx(styles$7.bubbles),children:o.opener&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(BotBubble,{isFirstMessageBySender:!0,isLastMessageBySender:!m,children:[jsxRuntimeExports.jsx("h2",{children:n("conversation-rating.overlay.title")}),jsxRuntimeExports.jsxs("div",{className:clsx(styles$7.starsDescriptionContainer),children:[jsxRuntimeExports.jsx(Stars,{value:u,size:"large",readonly:E.submitted,onChange:h}),jsxRuntimeExports.jsxs("div",{className:clsx(styles$7.starsDescription),children:[jsxRuntimeExports.jsx("div",{children:n("conversation-rating.overlay.star.very-bad")}),jsxRuntimeExports.jsx("div",{children:n("conversation-rating.overlay.star.very-good")})]})]})]}),m&&jsxRuntimeExports.jsx(BotBubble,{isFirstMessageBySender:!1,isLastMessageBySender:!T||!!E.feedback.length,children:jsxRuntimeExports.jsx("div",{children:m})}),!!E.feedback.length&&jsxRuntimeExports.jsx(GuestBubble,{children:E.feedback}),T&&jsxRuntimeExports.jsx(BotBubble,{isFirstMessageBySender:!!E.feedback.length,isLastMessageBySender:!0,children:jsxRuntimeExports.jsx("div",{children:n("conversation-rating.overlay.bot-message.submit-feedback")})})]})})]}),jsxRuntimeExports.jsxs("div",{className:clsx(styles$7.footer,"chat__conversationRating__overlay__footer"),children:[!E.submitted&&jsxRuntimeExports.jsx("input",{ref:w,defaultValue:o.rating?.feedback||"",placeholder:n("conversation-rating.overlay.guest-feedback.input-placeholder")}),jsxRuntimeExports.jsxs("div",{className:clsx(styles$7.actions,"chat__conversationRating__overlay__footer__actions"),children:[E.submitted?jsxRuntimeExports.jsx(PrimaryButton,{type:"button",disabled:!u,onClick:N,children:o.opener==="CLOSE_CHAT"?n("conversation-rating.overlay.action.close-chat"):o.opener==="RESTART_CHAT"?n("conversation-rating.overlay.action.restart-chat"):n("conversation-rating.overlay.action.back-to-chat")},"close-button"):jsxRuntimeExports.jsx(PrimaryButton,{type:"submit",disabled:!u,children:n("conversation-rating.overlay.action.submit")},"submit-button"),o.opener!=="CHAT"&&!E.submitted&&jsxRuntimeExports.jsx(DefaultButton,{onClick:N,children:o.opener==="CLOSE_CHAT"?n("conversation-rating.overlay.action.close-chat"):o.opener==="RESTART_CHAT"?n("conversation-rating.overlay.action.restart-chat"):n("conversation-rating.overlay.action.cancel")})]})]})]})})},ConversationRating=({numberOfMessagesFromGuest:n})=>{const i=useAppDispatch(),o=useAppSelector(m=>m.chat.conversationRating),u=m=>{i(showConversationRatingOverlay("CHAT",m))},h=!o.rating?.value&&n>=1;return o.enabled?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(CallToAction,{visible:h,onRate:u}),jsxRuntimeExports.jsx(RateOverlay,{})]}):null},ConversationRating$1=reactExports.memo(ConversationRating),inputWrapper="_inputWrapper_m3q4d_1",withOpenCommands="_withOpenCommands_m3q4d_13",actions$1="_actions_m3q4d_18",messageInputWrapper="_messageInputWrapper_m3q4d_53",messageInput="_messageInput_m3q4d_53",buttons="_buttons_m3q4d_78",button="_button_m3q4d_78",styles$6={inputWrapper,withOpenCommands,actions:actions$1,messageInputWrapper,messageInput,buttons,button},audioRecorder="_audioRecorder_g845f_1",audioButton="_audioButton_g845f_6",recorderIcon="_recorderIcon_g845f_37",spinning="_spinning_g845f_60",styles$5={audioRecorder,audioButton,recorderIcon,spinning},BUFFER_SIZE=2048,OUTPUT_SAMPLE_RATE=16e3;class AudioRecorder extends React.Component{audioInput=null;volume=null;leftchannel=[];recorder=null;recordingLength=0;sampleRate=null;mediaStream=null;constructor(i){super(i),this.state={recordingState:"none"},this.triggerAudioRecording=this.triggerAudioRecording.bind(this),this.triggerAudioRecordingSuccess=this.triggerAudioRecordingSuccess.bind(this),this.initRecording=this.initRecording.bind(this),this.processRecordingInput=this.processRecordingInput.bind(this),this.handleClickSubmitAudio=this.handleClickSubmitAudio.bind(this),this.handleClickStopAudio=this.handleClickStopAudio.bind(this)}triggerAudioRecording(){this.setState({recordingState:"connecting"}),navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(this.triggerAudioRecordingSuccess)}triggerAudioRecordingSuccess(i){this.mediaStream=i,this.leftchannel.length=0,this.recordingLength=0,this.initRecording(i)}initRecording(i){const o=window.AudioContext||window.webkitAudioContext,u=new o;this.sampleRate=u.sampleRate,this.volume=u.createGain(),this.audioInput=u.createMediaStreamSource(i),this.audioInput.connect(this.volume),this.recorder=u.createScriptProcessor(BUFFER_SIZE,1,1),this.recorder.onaudioprocess=this.processRecordingInput,this.volume.connect(this.recorder),this.recorder.connect(u.destination)}processRecordingInput(i){if(this.state.recordingState==="connecting"&&this.setState({recordingState:"recording"}),this.state.recordingState!=="none"){const o=i.inputBuffer.getChannelData(0);this.leftchannel.push(new Float32Array(o)),this.recordingLength+=BUFFER_SIZE}}handleClickSubmitAudio(){const i=mergeBuffers(this.leftchannel,this.recordingLength),o=downsampleBuffer(i,this.sampleRate||0),u=createWav(o);this.props.onAudioRecorded(u),this.handleClickStopAudio()}handleClickStopAudio(){this.setState({recordingState:"none"}),this.audioInput?.disconnect(),this.volume?.disconnect(),this.recorder?.disconnect(),this.mediaStream&&this.mediaStream?.getAudioTracks().forEach(i=>{i.stop()})}render(){return jsxRuntimeExports.jsxs("div",{className:styles$5.audioRecorder,children:[this.state.recordingState==="none"&&jsxRuntimeExports.jsx("button",{className:clsx(styles$5.audioButton,"chat__button"),type:"submit","aria-label":this.props.translate("message-input.actions.start-audio-recording.label"),"data-title":this.props.translate("message-input.actions.start-audio-recording.label"),tabIndex:0,onClick:this.triggerAudioRecording,children:jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntimeExports.jsx("path",{d:"M12 14c1.66 0 2.99-1.34 2.99-3L15 5c0-1.66-1.34-3-3-3S9 3.34 9 5v6c0 1.66 1.34 3 3 3zm5.3-3c0 3-2.54 5.1-5.3 5.1S6.7 14 6.7 11H5c0 3.41 2.72 6.23 6 6.72V21h2v-3.28c3.28-.48 6-3.3 6-6.72h-1.7z"}),jsxRuntimeExports.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),this.state.recordingState==="connecting"&&jsxRuntimeExports.jsxs("svg",{className:styles$5.spinning,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntimeExports.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"}),jsxRuntimeExports.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]}),this.state.recordingState==="recording"&&jsxRuntimeExports.jsxs("div",{className:styles$5.audioRecorder,children:[jsxRuntimeExports.jsx("button",{className:clsx(styles$5.audioButton),onClick:this.handleClickStopAudio,"aria-label":this.props.translate("message-input.actions.stop-audio-recording.label"),tabIndex:0,children:jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntimeExports.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),jsxRuntimeExports.jsx("path",{d:"M0 0h24v24H0z",fill:"none"})]})}),jsxRuntimeExports.jsx("div",{className:styles$5.recorderIcon}),jsxRuntimeExports.jsx("button",{className:clsx(styles$5.audioButton),type:"submit",onClick:this.handleClickSubmitAudio,"aria-label":this.props.translate("message-input.actions.submit-audio-recording.label"),tabIndex:0,autoFocus:!0,children:jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:[jsxRuntimeExports.jsx("path",{d:"M0 0h24v24H0z",fill:"none"}),jsxRuntimeExports.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})]})})]})]})}}const createWav=n=>{const i=new ArrayBuffer(44+n.length*2),o=new DataView(i);writeUTFBytes(o,0,"RIFF"),o.setUint32(4,44+n.length*2,!0),writeUTFBytes(o,8,"WAVE"),writeUTFBytes(o,12,"fmt "),o.setUint32(16,16,!0),o.setUint16(20,1,!0),o.setUint16(22,1,!0),o.setUint32(24,OUTPUT_SAMPLE_RATE,!0),o.setUint32(28,OUTPUT_SAMPLE_RATE*4,!0),o.setUint16(32,4,!0),o.setUint16(34,16,!0),writeUTFBytes(o,36,"data"),o.setUint32(40,n.length*2,!0);const u=n.length;let h=44;const m=1;for(let y=0;y<u;y++)o.setInt16(h,n[y]*(32767*m),!0),h+=2;return new Blob([o],{type:"audio/wav"})},writeUTFBytes=(n,i,o)=>{for(let u=0;u<o.length;u++)n.setUint8(i+u,o.charCodeAt(u))},mergeBuffers=(n,i)=>{const o=new Float32Array(i);let u=0;const h=n.length;for(let m=0;m<h;m++){const y=n[m];o.set(y,u),u+=y.length}return o},downsampleBuffer=(n,i)=>{if(OUTPUT_SAMPLE_RATE===i)return n;const o=i/OUTPUT_SAMPLE_RATE,u=Math.round(n.length/o),h=new Float32Array(u);let m=0,y=0;for(;m<h.length;){const _=Math.round((m+1)*o);let v=0,E=0;for(let S=y;S<_&&S<n.length;S++)v+=n[S],E++;h[m]=v/E,m++,y=_}return h},CommandButton=({onClick:n})=>{const i=useTranslation();return jsxRuntimeExports.jsxs("button",{onClick:n,type:"button","aria-label":i("message-input.actions.command.label"),children:[jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"#000000",viewBox:"0 0 256 256",children:[jsxRuntimeExports.jsx("rect",{x:"32",y:"32",width:"192",height:"192",rx:"16",ry:"16",fill:"none",stroke:"currentColor","stroke-width":"16"}),jsxRuntimeExports.jsx("line",{x1:"80",y1:"176",x2:"176",y2:"80",stroke:"currentColor","stroke-width":"16","stroke-linecap":"round"})]}),jsxRuntimeExports.jsx("span",{children:i("message-input.actions.command.label")})]})},TextInput=({disabled:n,textInput:i,commandsVisible:o,hasCommands:u,onTextInput:h,onTextInputSubmit:m,onAudioRecorded:y})=>{const _=useTranslation(),v=reactExports.useRef(null),{enableSpeechSupport:E}=useAppSelector(N=>N.settings);reactExports.useEffect(()=>{v.current?.focus()},[i]);const S=()=>{const N=v.current;N&&i.trim().length>=1&&m(i.trim())&&(N.value="",N.style.height="",N.focus())},w=N=>{N.preventDefault(),S()},T=N=>{const M=N.target.value;h(M),N.target.style.height="";const{scrollHeight:L}=N.target;N.target.style.height=`${L>150?150:L}px`},R=N=>{N.code==="Enter"&&!N.shiftKey?(N.repeat||S(),N.preventDefault()):o&&(N.code==="ArrowUp"||N.code==="ArrowDown")&&N.preventDefault()},D=()=>{i.startsWith("/")?h(""):h("/")};return jsxRuntimeExports.jsxs("form",{className:clsx(styles$6.inputWrapper,o&&styles$6.withOpenCommands,"chat__textInput"),onSubmit:w,children:[jsxRuntimeExports.jsxs("div",{className:styles$6.messageInputWrapper,children:[jsxRuntimeExports.jsx("textarea",{id:"user_input",ref:v,className:styles$6.messageInput,tabIndex:0,placeholder:_("message-input-placeholder"),value:i,onChange:T,onKeyDown:R,"aria-label":_("message-input-label"),"aria-controls":u?"command-list":void 0,"aria-haspopup":u?"listbox":void 0}),u&&jsxRuntimeExports.jsx("div",{className:styles$6.actions,children:jsxRuntimeExports.jsx(CommandButton,{onClick:D})})]}),jsxRuntimeExports.jsx("div",{className:clsx(styles$6.buttons,"chat__buttons"),children:i.length||!E||navigator.mediaDevices===void 0?jsxRuntimeExports.jsx("button",{className:clsx(styles$6.button,"chat__button"),type:"submit","aria-label":_("message-input.actions.submit.label"),"data-title":_("message-input.actions.submit.label"),tabIndex:0,disabled:n,children:jsxRuntimeExports.jsx("svg",{viewBox:"64 64 896 896",focusable:"false",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:jsxRuntimeExports.jsx("path",{d:"M931.4 498.9L94.9 79.5c-3.4-1.7-7.3-2.1-11-1.2a15.99 15.99 0 00-11.7 19.3l86.2 352.2c1.3 5.3 5.2 9.6 10.4 11.3l147.7 50.7-147.6 50.7c-5.2 1.8-9.1 6-10.3 11.3L72.2 926.5c-.9 3.7-.5 7.6 1.2 10.9 3.9 7.9 13.5 11.1 21.5 7.2l836.5-417c3.1-1.5 5.6-4.1 7.2-7.1 3.9-8 .7-17.6-7.2-21.6zM170.8 826.3l50.3-205.6 295.2-101.3c2.3-.8 4.2-2.6 5-5 1.4-4.2-.8-8.7-5-10.2L221.1 403 171 198.2l628 314.9-628.2 313.2z"})})}):E&&navigator.mediaDevices!==void 0&&jsxRuntimeExports.jsx(AudioRecorder,{translate:_,onAudioRecorded:y})})]})},quickReplies="_quickReplies_83npe_1",quickReply="_quickReply_83npe_9",styles$4={quickReplies,quickReply},QuickReplies=({quickReplies:n,onQuickReplyClick:i})=>n.length?jsxRuntimeExports.jsx("div",{className:clsx(styles$4.quickReplies,"chat__quickReplies"),children:n.map(o=>jsxRuntimeExports.jsx(Button,{tabIndex:0,className:clsx(styles$4.quickReply,"chat__button","chat__quickReply"),onClick:()=>i(o),children:o.label},o.label))}):null,MIN_USER_BLOCKED_TIME=5e3,MIN_TIME_BETWEEN_USER_REQUESTS=1e3,UserInput=({isBotTyping:n,quickReplies:i,numberOfMessagesFromGuest:o,commands:u,onTextInput:h,onQuickReplyClick:m,onAudioRecorded:y})=>{const[_,v]=reactExports.useState(""),[E,S]=reactExports.useState(!1),[w,T]=reactExports.useState(!1),R=reactExports.useRef(0),D=reactExports.useRef(0);reactExports.useEffect(()=>{if(E&&!n){const L=R.current?Date.now()-R.current:0;L>MIN_USER_BLOCKED_TIME?S(!1):setTimeout(()=>{S(!1)},MIN_USER_BLOCKED_TIME-L)}},[E,n]),reactExports.useEffect(()=>{E&&(R.current=Date.now())},[E]);const N=L=>{const z=Date.now()-D.current<MIN_TIME_BETWEEN_USER_REQUESTS;return w?!1:n||z?(S(!0),!1):(h(L),v(""),D.current=Date.now(),!0)},M=L=>{v(L+" ")};return jsxRuntimeExports.jsxs("div",{className:clsx(styles$9.inputContainer),children:[jsxRuntimeExports.jsx(QuickReplies,{quickReplies:i,onQuickReplyClick:m}),jsxRuntimeExports.jsx(BlockUserInput,{visible:E}),!E&&jsxRuntimeExports.jsx(ConversationRating$1,{numberOfMessagesFromGuest:o}),!!u?.length&&jsxRuntimeExports.jsx(CommandsDropdown,{text:_,commands:u,onSelectCommand:M,onVisibilityChange:T}),jsxRuntimeExports.jsx(TextInput,{textInput:_,disabled:E,commandsVisible:w,hasCommands:!!u?.length,onTextInput:v,onTextInputSubmit:N,onAudioRecorded:y})]})},ChatComponent=({clientName:n,messages:i,quickReplies:o,isBotTyping:u,drawerContentUrl:h,onMessageFromUser:m,onQuickReplyClick:y,onButtonClick:_,onLinkClick:v,onAudioRecorded:E,onTranscriptExport:S,onTranscriptItemReaction:w})=>{const T=useAppDispatch(),R=useAppSelector(H=>H.connection.connectionState),{enableTranscriptExportEmail:D,commands:N}=useAppSelector(H=>H.settings),{showTranscriptMailOverlay:M,conversationRating:L}=useAppSelector(H=>H.chat),z=i.filter(H=>H.sender.type===UserType.GUEST).length;reactExports.useEffect(()=>{R===ConnectionStateEnum.CONNECTED&&T(startChat(n))},[n,R,T]);const U=()=>{T(toggleTranscriptMailOverlay())};return jsxRuntimeExports.jsxs("div",{className:styles$n.container,children:[jsxRuntimeExports.jsx(ScreenReaderAnnouncer,{messages:i,isBotTyping:u}),jsxRuntimeExports.jsxs("div",{className:clsx([styles$n.chatcontent,(M||L?.opener)&&styles$n.accessabilityHidden]),children:[jsxRuntimeExports.jsx(Conversation,{messages:i,isBotTyping:u,commands:N,onButtonClick:_,onLinkClick:v,onTranscriptItemReaction:w}),jsxRuntimeExports.jsx(UserInput,{isBotTyping:u,quickReplies:u?[]:o,numberOfMessagesFromGuest:z,commands:N,onQuickReplyClick:y,onTextInput:m,onAudioRecorded:E}),jsxRuntimeExports.jsx(PoweredBy,{})]}),D&&jsxRuntimeExports.jsx(TranscriptExport,{visible:!!M,onEmailExport:S,onClose:U}),jsxRuntimeExports.jsx(Drawer,{contentUrl:h})]})},mapStateToProps=n=>{const{messages:i,quickReplies:o,isBotTyping:u,drawerContentUrl:h}=n.chat;return{messages:i,quickReplies:o,isBotTyping:u,drawerContentUrl:h}},bindAction=n=>({onRestartChat:()=>n(restartChat()),onMessageFromUser:i=>n(sendMessageFromUser(i)),onAudioRecorded:i=>n(sendAudioMessageFromUser(i)),onActionFromUser:i=>n(i),onQuickReplyClick:i=>n(handleQuickReplyClick(i)),onNluEvent:i=>n(requestNLUEvent(i)),onButtonClick:i=>n(handleButtonClick(i)),onLinkClick:i=>n(handleLinkClick(i)),onTranscriptExport:i=>n(exportTranscript(i)),onTranscriptItemReaction:(i,o)=>{n(transcriptItemGuestReaction(i,o?.type||null,o?.category,o?.comment))}}),Chat=connect_default(mapStateToProps,bindAction)(ChatComponent),useIsInIframe=()=>reactExports.useMemo(()=>{try{return window.self!==window.top}catch{return!0}},[]),onButtonKeyDownHandler=n=>i=>{const o=i.key;(o==="ArrowDown"||o==="ArrowRight"||o==="Enter"||o===" "||o==="Space")&&(i.stopPropagation(),n())},CloseChatWindowButton=({onClick:n})=>{const i=useTranslation();return useIsInIframe()?jsxRuntimeExports.jsx("button",{className:"tooltip--bottom-left","aria-label":i("header.close-chat"),"data-title":i("header.close-chat"),tabIndex:0,onClick:n,onKeyDown:onButtonKeyDownHandler(n),children:jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"})})}):null},header="_header_3gvbz_1",logoContainer="_logoContainer_3gvbz_14",logo="_logo_3gvbz_14",actions="_actions_3gvbz_28",active="_active_3gvbz_43",menuContainer="_menuContainer_3gvbz_56",menu="_menu_3gvbz_56",divider="_divider_3gvbz_86",styles$3={header,logoContainer,logo,actions,active,menuContainer,menu,divider},MenuItemIcon=({icon:n})=>{switch(n){case"arrow-counter-clockwise":return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"})});case"download":return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"})});case"expand":return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M214,48V96a6,6,0,0,1-12,0V62.48l-53.76,53.76a6,6,0,0,1-8.48-8.48L193.52,54H160a6,6,0,0,1,0-12h48A6,6,0,0,1,214,48ZM107.76,139.76,54,193.52V160a6,6,0,0,0-12,0v48a6,6,0,0,0,6,6H96a6,6,0,0,0,0-12H62.48l53.76-53.76a6,6,0,0,0-8.48-8.48Z"})});case"mail":return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M224,48H32a8,8,0,0,0-8,8V192a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A8,8,0,0,0,224,48ZM203.43,64,128,133.15,52.57,64ZM216,192H40V74.19l82.59,75.71a8,8,0,0,0,10.82,0L216,74.19V192Z"})});case"phone":return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M144.27,45.93a8,8,0,0,1,9.8-5.66,86.22,86.22,0,0,1,61.66,61.66,8,8,0,0,1-5.66,9.8A8.23,8.23,0,0,1,208,112a8,8,0,0,1-7.73-5.94,70.35,70.35,0,0,0-50.33-50.33A8,8,0,0,1,144.27,45.93Zm-2.33,41.8c13.79,3.68,22.65,12.54,26.33,26.33A8,8,0,0,0,176,120a8.23,8.23,0,0,0,2.07-.27,8,8,0,0,0,5.66-9.8c-5.12-19.16-18.5-32.54-37.66-37.66a8,8,0,1,0-4.13,15.46Zm81.94,95.35A56.26,56.26,0,0,1,168,232C88.6,232,24,167.4,24,88A56.26,56.26,0,0,1,72.92,32.12a16,16,0,0,1,16.62,9.52l21.12,47.15,0,.12A16,16,0,0,1,109.39,104c-.18.27-.37.52-.57.77L88,129.45c7.49,15.22,23.41,31,38.83,38.51l24.34-20.71a8.12,8.12,0,0,1,.75-.56,16,16,0,0,1,15.17-1.4l.13.06,47.11,21.11A16,16,0,0,1,223.88,183.08Zm-15.88-2s-.07,0-.11,0h0l-47-21.05-24.35,20.71a8.44,8.44,0,0,1-.74.56,16,16,0,0,1-15.75,1.14c-18.73-9.05-37.4-27.58-46.46-46.11a16,16,0,0,1,1-15.7,6.13,6.13,0,0,1,.57-.77L96,95.15l-21-47a.61.61,0,0,1,0-.12A40.2,40.2,0,0,0,40,88,128.14,128.14,0,0,0,168,216,40.21,40.21,0,0,0,208,181.07Z"})});case"scroll":return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M96,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H104A8,8,0,0,1,96,104Zm8,40h64a8,8,0,0,0,0-16H104a8,8,0,0,0,0,16Zm128,48a32,32,0,0,1-32,32H88a32,32,0,0,1-32-32V64a16,16,0,0,0-32,0c0,5.74,4.83,9.62,4.88,9.66h0A8,8,0,0,1,24,88a7.89,7.89,0,0,1-4.79-1.61h0C18.05,85.54,8,77.61,8,64A32,32,0,0,1,40,32H176a32,32,0,0,1,32,32V168h8a8,8,0,0,1,4.8,1.6C222,170.46,232,178.39,232,192ZM96.26,173.48A8.07,8.07,0,0,1,104,168h88V64a16,16,0,0,0-16-16H67.69A31.71,31.71,0,0,1,72,64V192a16,16,0,0,0,32,0c0-5.74-4.83-9.62-4.88-9.66A7.82,7.82,0,0,1,96.26,173.48ZM216,192a12.58,12.58,0,0,0-3.23-8h-94a26.92,26.92,0,0,1,1.21,8,31.82,31.82,0,0,1-4.29,16H200A16,16,0,0,0,216,192Z"})});case"star":return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"})});case"link":return jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"})});default:return jsxRuntimeExports.jsx("div",{})}},MenuItem=reactExports.forwardRef(({selected:n,item:i,onClick:o},u)=>{const h=useTranslation(),m=y=>{y.preventDefault(),o()};return jsxRuntimeExports.jsx("li",{"aria-selected":n,role:"option",className:i.withDivider?styles$3.divider:void 0,children:jsxRuntimeExports.jsxs("a",{ref:u,type:"button",role:"button",tabIndex:-1,onClick:m,children:[jsxRuntimeExports.jsx(MenuItemIcon,{icon:i.icon}),jsxRuntimeExports.jsx("span",{children:h(`header.menu.${i.id}`)})]})})}),useMenuItems=(n,i)=>{const o=useIsInIframe(),{menuItems:u,enableStandaloneView:h,enableTranscriptExportPdf:m,enableTranscriptExportEmail:y}=useAppSelector(E=>E.settings),_=useAppSelector(E=>E.chat.conversationRating.enabled);return reactExports.useMemo(()=>{const E=[],S=u.filter(({visibility:w})=>n?w==="always"||w==="chat-only":w==="always"||w==="start-screen-only");if(n&&(E.push({id:"restart-chat",type:"restart-chat",icon:"arrow-counter-clockwise",visibility:"chat-only"}),o&&h&&E.push({id:"expand-chat-window",type:"expand-chat-window",icon:"expand",visibility:"always"}),i&&m&&E.push({id:"download-transcript",type:"download-transcript",icon:"download",visibility:"chat-only"}),i&&y&&E.push({id:"send-transcript",type:"send-transcript",icon:"mail",visibility:"chat-only"}),i&&_&&E.push({id:"rate-conversation",type:"rate-conversation",icon:"star",visibility:"chat-only"}),E.length>0&&S.length)){const w=E.pop();w&&u.length&&E.push({...w,withDivider:!0})}return E.push(...S),E},[n,i,m,y,h,_,o,u])},Menu=({chatStarted:n,hasGuestMessages:i})=>{const o=useAppDispatch(),u=useTranslation(),{enabled:h,opener:m}=useAppSelector(z=>z.chat.conversationRating),[y,_]=reactExports.useState(!1),[v,E]=reactExports.useState(-1),S=reactExports.useRef(null),w=reactExports.useRef(null),T=reactExports.useRef([]),R=useMenuItems(n,i);reactExports.useEffect(()=>{T.current[v]?.focus()},[v]);const D=reactExports.useCallback(()=>{o(i&&h&&!m?showConversationRatingOverlay("RESTART_CHAT"):restartChat()),_(!1),E(0)},[i,h,m,o]),N=reactExports.useCallback(z=>{switch(z.type){case"restart-chat":{D();break}case"expand-chat-window":{const U=new URL(window.location.origin);U.pathname=window.location.pathname,U.search=window.location.search,U.hash=window.location.hash,window.open(U.href,"_blank");break}case"download-transcript":{o(downloadTranscriptPdf());break}case"send-transcript":{o(toggleTranscriptMailOverlay());break}case"rate-conversation":{o(showConversationRatingOverlay("MENU"));break}case"link":{o(handleLinkClick(z.url));break}case"action":{o(JSON.parse(JSON.stringify(z.action)));break}}_(!1)},[o,D,_]);reactExports.useEffect(()=>{const z=U=>{if(y)switch(U.key){case"Enter":U.preventDefault(),N(R[v]);break;case"ArrowUp":E(H=>H>0?H-1:R.length-1);break;case"ArrowDown":E(H=>H<R.length-1?H+1:0);break;case"Escape":_(!1);break;case"Tab":v>-1&&_(!1);break}};return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}},[y,v,R,E,_,N]),reactExports.useEffect(()=>{y||E(-1)},[y,v]),useClickOutsideEventListener(w,()=>_(!1));const M=()=>{_(z=>!z)},L=()=>{setTimeout(()=>{const z=document.activeElement;w.current&&!w.current.contains(z)&&_(!1)},0)};return R.length?jsxRuntimeExports.jsxs("div",{className:clsx(styles$3.menuContainer),ref:w,children:[jsxRuntimeExports.jsx("button",{ref:S,className:clsx(y&&styles$3.active,y?"tooltip-hidden":"tooltip--bottom-left"),"aria-label":u("header.menu.title"),"data-title":u("header.menu.title"),onClick:M,onBlur:L,children:jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z"})})}),y&&jsxRuntimeExports.jsx("nav",{className:styles$3.menu,"aria-label":u("header.menu.title"),children:jsxRuntimeExports.jsx("ul",{tabIndex:0,children:R.map((z,U)=>jsxRuntimeExports.jsx(MenuItem,{ref:H=>{T.current[U]=H},selected:v===U,item:z,onClick:()=>N(z)},z.id))})})]}):null},Header$1=({className:n,chatStarted:i,...o})=>{const u=useAppDispatch(),h=useAppSelector(_=>_.chat.conversationRating),m=useAppSelector(_=>_.chat.messages.some(v=>v.sender.type===UserType$1.GUEST)),y=()=>{h.enabled&&!h.opener&&m?u(showConversationRatingOverlay("CLOSE_CHAT")):u(closeChatWindow())};return jsxRuntimeExports.jsxs("div",{className:clsx(styles$3.header,n),...o,children:[jsxRuntimeExports.jsx("div",{className:styles$3.logoContainer,children:jsxRuntimeExports.jsx("div",{className:styles$3.logo})}),jsxRuntimeExports.jsxs("div",{className:styles$3.actions,children:[jsxRuntimeExports.jsx(Menu,{chatStarted:i,hasGuestMessages:m}),jsxRuntimeExports.jsx(CloseChatWindowButton,{onClick:y})]})]})},chatwindow="_chatwindow_rkbir_1",chatwindowWithAside="_chatwindowWithAside_rkbir_21",styles$2={chatwindow,chatwindowWithAside},useIsSmallScreen=()=>{const[n,i]=reactExports.useState(!1);return reactExports.useEffect(()=>{const o=window.matchMedia("(max-width: 1023px)"),u=()=>i(o.matches);return u(),o.addEventListener("change",u),()=>o.removeEventListener("change",u)},[]),n},sourceInfos="_sourceInfos_vei0l_1",waitForLoading="_waitForLoading_vei0l_24",loadingContent="_loadingContent_vei0l_28",sourceHeader="_sourceHeader_vei0l_37",sourceHeaderIcon="_sourceHeaderIcon_vei0l_57",sourceContent="_sourceContent_vei0l_61",openSourceButton="_openSourceButton_vei0l_69",sourceButtonLabel="_sourceButtonLabel_vei0l_79",closeSourceInfosButton="_closeSourceInfosButton_vei0l_101",loadingSourceInfos="_loadingSourceInfos_vei0l_125",loading="_loading_vei0l_28",loadingError="_loadingError_vei0l_139",highlightLoadingInfo="_highlightLoadingInfo_vei0l_155",highlightLoadingInfoInnerContainer="_highlightLoadingInfoInnerContainer_vei0l_169",highlightLoadingInfoContent="_highlightLoadingInfoContent_vei0l_178",highlightLoadingInfoCloseIcon="_highlightLoadingInfoCloseIcon_vei0l_198",highlightLoader="_highlightLoader_vei0l_203",highlightLoaderLoading="_highlightLoaderLoading_vei0l_210",styles$1={sourceInfos,waitForLoading,loadingContent,sourceHeader,sourceHeaderIcon,sourceContent,openSourceButton,sourceButtonLabel,closeSourceInfosButton,loadingSourceInfos,loading,loadingError,highlightLoadingInfo,highlightLoadingInfoInnerContainer,highlightLoadingInfoContent,highlightLoadingInfoCloseIcon,highlightLoader,highlightLoaderLoading},CloseSourceInfosButton=({onClick:n})=>{const i=useTranslation();return jsxRuntimeExports.jsx("button",{className:clsx(styles$1.closeSourceInfosButton,"tooltip--bottom-left"),"aria-label":i("source-infos.close"),"data-title":i("source-infos.close"),tabIndex:0,onClick:n,children:jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"})})})},Header=reactExports.forwardRef(({sourceInfos:n,onClose:i,...o},u)=>jsxRuntimeExports.jsxs("div",{className:styles$1.sourceHeader,...o,ref:u,children:[jsxRuntimeExports.jsx("div",{children:n?jsxRuntimeExports.jsx("p",{id:"source-info-title",children:n.title}):jsxRuntimeExports.jsx("p",{children:" "})}),jsxRuntimeExports.jsx(CloseSourceInfosButton,{onClick:i})]})),HighlightLoader=({loading:n})=>jsxRuntimeExports.jsx("div",{className:styles$1.highlightLoader,children:n&&jsxRuntimeExports.jsx("div",{className:styles$1.highlightLoaderLoading})});const{entries,setPrototypeOf,isFrozen,getPrototypeOf,getOwnPropertyDescriptor}=Object;let{freeze,seal,create}=Object,{apply,construct}=typeof Reflect<"u"&&Reflect;freeze||(freeze=function(i){return i});seal||(seal=function(i){return i});apply||(apply=function(i,o){for(var u=arguments.length,h=new Array(u>2?u-2:0),m=2;m<u;m++)h[m-2]=arguments[m];return i.apply(o,h)});construct||(construct=function(i){for(var o=arguments.length,u=new Array(o>1?o-1:0),h=1;h<o;h++)u[h-1]=arguments[h];return new i(...u)});const arrayForEach=unapply(Array.prototype.forEach),arrayLastIndexOf=unapply(Array.prototype.lastIndexOf),arrayPop=unapply(Array.prototype.pop),arrayPush=unapply(Array.prototype.push),arraySplice=unapply(Array.prototype.splice),stringToLowerCase=unapply(String.prototype.toLowerCase),stringToString=unapply(String.prototype.toString),stringMatch=unapply(String.prototype.match),stringReplace=unapply(String.prototype.replace),stringIndexOf=unapply(String.prototype.indexOf),stringTrim=unapply(String.prototype.trim),objectHasOwnProperty=unapply(Object.prototype.hasOwnProperty),regExpTest=unapply(RegExp.prototype.test),typeErrorCreate=unconstruct(TypeError);function unapply(n){return function(i){i instanceof RegExp&&(i.lastIndex=0);for(var o=arguments.length,u=new Array(o>1?o-1:0),h=1;h<o;h++)u[h-1]=arguments[h];return apply(n,i,u)}}function unconstruct(n){return function(){for(var i=arguments.length,o=new Array(i),u=0;u<i;u++)o[u]=arguments[u];return construct(n,o)}}function addToSet(n,i){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:stringToLowerCase;setPrototypeOf&&setPrototypeOf(n,null);let u=i.length;for(;u--;){let h=i[u];if(typeof h=="string"){const m=o(h);m!==h&&(isFrozen(i)||(i[u]=m),h=m)}n[h]=!0}return n}function cleanArray(n){for(let i=0;i<n.length;i++)objectHasOwnProperty(n,i)||(n[i]=null);return n}function clone(n){const i=create(null);for(const[o,u]of entries(n))objectHasOwnProperty(n,o)&&(Array.isArray(u)?i[o]=cleanArray(u):u&&typeof u=="object"&&u.constructor===Object?i[o]=clone(u):i[o]=u);return i}function lookupGetter(n,i){for(;n!==null;){const u=getOwnPropertyDescriptor(n,i);if(u){if(u.get)return unapply(u.get);if(typeof u.value=="function")return unapply(u.value)}n=getPrototypeOf(n)}function o(){return null}return o}const html$1=freeze(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),svg$1=freeze(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),svgFilters=freeze(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),svgDisallowed=freeze(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),mathMl$1=freeze(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),mathMlDisallowed=freeze(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),text=freeze(["#text"]),html=freeze(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),svg=freeze(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),mathMl=freeze(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),xml=freeze(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),MUSTACHE_EXPR=seal(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ERB_EXPR=seal(/<%[\w\W]*|[\w\W]*%>/gm),TMPLIT_EXPR=seal(/\$\{[\w\W]*/gm),DATA_ATTR=seal(/^data-[\-\w.\u00B7-\uFFFF]+$/),ARIA_ATTR=seal(/^aria-[\-\w]+$/),IS_ALLOWED_URI=seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),IS_SCRIPT_OR_DATA=seal(/^(?:\w+script|data):/i),ATTR_WHITESPACE=seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),DOCTYPE_NAME=seal(/^html$/i),CUSTOM_ELEMENT=seal(/^[a-z][.\w]*(-[.\w]+)+$/i);var EXPRESSIONS=Object.freeze({__proto__:null,ARIA_ATTR,ATTR_WHITESPACE,CUSTOM_ELEMENT,DATA_ATTR,DOCTYPE_NAME,ERB_EXPR,IS_ALLOWED_URI,IS_SCRIPT_OR_DATA,MUSTACHE_EXPR,TMPLIT_EXPR});const NODE_TYPE={element:1,text:3,progressingInstruction:7,comment:8,document:9},getGlobal=function n(){return typeof window>"u"?null:window},_createTrustedTypesPolicy=function n(i,o){if(typeof i!="object"||typeof i.createPolicy!="function")return null;let u=null;const h="data-tt-policy-suffix";o&&o.hasAttribute(h)&&(u=o.getAttribute(h));const m="dompurify"+(u?"#"+u:"");try{return i.createPolicy(m,{createHTML(y){return y},createScriptURL(y){return y}})}catch{return console.warn("TrustedTypes policy "+m+" could not be created."),null}},_createHooksMap=function n(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function createDOMPurify(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:getGlobal();const i=ye=>createDOMPurify(ye);if(i.version="3.3.1",i.removed=[],!n||!n.document||n.document.nodeType!==NODE_TYPE.document||!n.Element)return i.isSupported=!1,i;let{document:o}=n;const u=o,h=u.currentScript,{DocumentFragment:m,HTMLTemplateElement:y,Node:_,Element:v,NodeFilter:E,NamedNodeMap:S=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:w,DOMParser:T,trustedTypes:R}=n,D=v.prototype,N=lookupGetter(D,"cloneNode"),M=lookupGetter(D,"remove"),L=lookupGetter(D,"nextSibling"),z=lookupGetter(D,"childNodes"),U=lookupGetter(D,"parentNode");if(typeof y=="function"){const ye=o.createElement("template");ye.content&&ye.content.ownerDocument&&(o=ye.content.ownerDocument)}let H,Y="";const{implementation:K,createNodeIterator:$,createDocumentFragment:Q,getElementsByTagName:ne}=o,{importNode:fe}=u;let W=_createHooksMap();i.isSupported=typeof entries=="function"&&typeof U=="function"&&K&&K.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:le,ERB_EXPR:be,TMPLIT_EXPR:ve,DATA_ATTR:_e,ARIA_ATTR:F,IS_SCRIPT_OR_DATA:ce,ATTR_WHITESPACE:te,CUSTOM_ELEMENT:Se}=EXPRESSIONS;let{IS_ALLOWED_URI:xe}=EXPRESSIONS,q=null;const ie=addToSet({},[...html$1,...svg$1,...svgFilters,...mathMl$1,...text]);let oe=null;const Ee=addToSet({},[...html,...svg,...mathMl,...xml]);let pe=Object.seal(create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,Te=null;const Ie=Object.seal(create(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let je=!0,Ve=!0,qt=!1,Ye=!0,ot=!1,Xt=!0,ze=!1,Je=!1,Rt=!1,At=!1,ft=!1,ut=!1,Fe=!0,nn=!1;const tt="user-content-";let we=!0,ct=!1,Dt={},kt=null;const Lt=addToSet({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let mn=null;const Tn=addToSet({},["audio","video","img","source","image","track"]);let Wn=null;const rt=addToSet({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),hn="http://www.w3.org/1998/Math/MathML",gt="http://www.w3.org/2000/svg",yt="http://www.w3.org/1999/xhtml";let pt=yt,Bt=!1,Rn=null;const An=addToSet({},[hn,gt,yt],stringToString);let zt=addToSet({},["mi","mo","mn","ms","mtext"]),Xe=addToSet({},["annotation-xml"]);const Yt=addToSet({},["title","style","font","a","script"]);let _t=null;const Cn=["application/xhtml+xml","text/html"],yn="text/html";let vt=null,sn=null;const Jn=o.createElement("form"),jn=function(V){return V instanceof RegExp||V instanceof Function},Hn=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(sn&&sn===V)){if((!V||typeof V!="object")&&(V={}),V=clone(V),_t=Cn.indexOf(V.PARSER_MEDIA_TYPE)===-1?yn:V.PARSER_MEDIA_TYPE,vt=_t==="application/xhtml+xml"?stringToString:stringToLowerCase,q=objectHasOwnProperty(V,"ALLOWED_TAGS")?addToSet({},V.ALLOWED_TAGS,vt):ie,oe=objectHasOwnProperty(V,"ALLOWED_ATTR")?addToSet({},V.ALLOWED_ATTR,vt):Ee,Rn=objectHasOwnProperty(V,"ALLOWED_NAMESPACES")?addToSet({},V.ALLOWED_NAMESPACES,stringToString):An,Wn=objectHasOwnProperty(V,"ADD_URI_SAFE_ATTR")?addToSet(clone(rt),V.ADD_URI_SAFE_ATTR,vt):rt,mn=objectHasOwnProperty(V,"ADD_DATA_URI_TAGS")?addToSet(clone(Tn),V.ADD_DATA_URI_TAGS,vt):Tn,kt=objectHasOwnProperty(V,"FORBID_CONTENTS")?addToSet({},V.FORBID_CONTENTS,vt):Lt,Oe=objectHasOwnProperty(V,"FORBID_TAGS")?addToSet({},V.FORBID_TAGS,vt):clone({}),Te=objectHasOwnProperty(V,"FORBID_ATTR")?addToSet({},V.FORBID_ATTR,vt):clone({}),Dt=objectHasOwnProperty(V,"USE_PROFILES")?V.USE_PROFILES:!1,je=V.ALLOW_ARIA_ATTR!==!1,Ve=V.ALLOW_DATA_ATTR!==!1,qt=V.ALLOW_UNKNOWN_PROTOCOLS||!1,Ye=V.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ot=V.SAFE_FOR_TEMPLATES||!1,Xt=V.SAFE_FOR_XML!==!1,ze=V.WHOLE_DOCUMENT||!1,At=V.RETURN_DOM||!1,ft=V.RETURN_DOM_FRAGMENT||!1,ut=V.RETURN_TRUSTED_TYPE||!1,Rt=V.FORCE_BODY||!1,Fe=V.SANITIZE_DOM!==!1,nn=V.SANITIZE_NAMED_PROPS||!1,we=V.KEEP_CONTENT!==!1,ct=V.IN_PLACE||!1,xe=V.ALLOWED_URI_REGEXP||IS_ALLOWED_URI,pt=V.NAMESPACE||yt,zt=V.MATHML_TEXT_INTEGRATION_POINTS||zt,Xe=V.HTML_INTEGRATION_POINTS||Xe,pe=V.CUSTOM_ELEMENT_HANDLING||{},V.CUSTOM_ELEMENT_HANDLING&&jn(V.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(pe.tagNameCheck=V.CUSTOM_ELEMENT_HANDLING.tagNameCheck),V.CUSTOM_ELEMENT_HANDLING&&jn(V.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(pe.attributeNameCheck=V.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),V.CUSTOM_ELEMENT_HANDLING&&typeof V.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(pe.allowCustomizedBuiltInElements=V.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ot&&(Ve=!1),ft&&(At=!0),Dt&&(q=addToSet({},text),oe=[],Dt.html===!0&&(addToSet(q,html$1),addToSet(oe,html)),Dt.svg===!0&&(addToSet(q,svg$1),addToSet(oe,svg),addToSet(oe,xml)),Dt.svgFilters===!0&&(addToSet(q,svgFilters),addToSet(oe,svg),addToSet(oe,xml)),Dt.mathMl===!0&&(addToSet(q,mathMl$1),addToSet(oe,mathMl),addToSet(oe,xml))),V.ADD_TAGS&&(typeof V.ADD_TAGS=="function"?Ie.tagCheck=V.ADD_TAGS:(q===ie&&(q=clone(q)),addToSet(q,V.ADD_TAGS,vt))),V.ADD_ATTR&&(typeof V.ADD_ATTR=="function"?Ie.attributeCheck=V.ADD_ATTR:(oe===Ee&&(oe=clone(oe)),addToSet(oe,V.ADD_ATTR,vt))),V.ADD_URI_SAFE_ATTR&&addToSet(Wn,V.ADD_URI_SAFE_ATTR,vt),V.FORBID_CONTENTS&&(kt===Lt&&(kt=clone(kt)),addToSet(kt,V.FORBID_CONTENTS,vt)),V.ADD_FORBID_CONTENTS&&(kt===Lt&&(kt=clone(kt)),addToSet(kt,V.ADD_FORBID_CONTENTS,vt)),we&&(q["#text"]=!0),ze&&addToSet(q,["html","head","body"]),q.table&&(addToSet(q,["tbody"]),delete Oe.tbody),V.TRUSTED_TYPES_POLICY){if(typeof V.TRUSTED_TYPES_POLICY.createHTML!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof V.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');H=V.TRUSTED_TYPES_POLICY,Y=H.createHTML("")}else H===void 0&&(H=_createTrustedTypesPolicy(R,h)),H!==null&&typeof Y=="string"&&(Y=H.createHTML(""));freeze&&freeze(V),sn=V}},On=addToSet({},[...svg$1,...svgFilters,...svgDisallowed]),Nn=addToSet({},[...mathMl$1,...mathMlDisallowed]),vn=function(V){let me=U(V);(!me||!me.tagName)&&(me={namespaceURI:pt,tagName:"template"});const ge=stringToLowerCase(V.tagName),ke=stringToLowerCase(me.tagName);return Rn[V.namespaceURI]?V.namespaceURI===gt?me.namespaceURI===yt?ge==="svg":me.namespaceURI===hn?ge==="svg"&&(ke==="annotation-xml"||zt[ke]):!!On[ge]:V.namespaceURI===hn?me.namespaceURI===yt?ge==="math":me.namespaceURI===gt?ge==="math"&&Xe[ke]:!!Nn[ge]:V.namespaceURI===yt?me.namespaceURI===gt&&!Xe[ke]||me.namespaceURI===hn&&!zt[ke]?!1:!Nn[ge]&&(Yt[ge]||!On[ge]):!!(_t==="application/xhtml+xml"&&Rn[V.namespaceURI]):!1},Kt=function(V){arrayPush(i.removed,{element:V});try{U(V).removeChild(V)}catch{M(V)}},Ke=function(V,me){try{arrayPush(i.removed,{attribute:me.getAttributeNode(V),from:me})}catch{arrayPush(i.removed,{attribute:null,from:me})}if(me.removeAttribute(V),V==="is")if(At||ft)try{Kt(me)}catch{}else try{me.setAttribute(V,"")}catch{}},Qt=function(V){let me=null,ge=null;if(Rt)V="<remove></remove>"+V;else{const Re=stringMatch(V,/^[\r\n\t ]+/);ge=Re&&Re[0]}_t==="application/xhtml+xml"&&pt===yt&&(V='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+V+"</body></html>");const ke=H?H.createHTML(V):V;if(pt===yt)try{me=new T().parseFromString(ke,_t)}catch{}if(!me||!me.documentElement){me=K.createDocument(pt,"template",null);try{me.documentElement.innerHTML=Bt?Y:ke}catch{}}const Ue=me.body||me.documentElement;return V&&ge&&Ue.insertBefore(o.createTextNode(ge),Ue.childNodes[0]||null),pt===yt?ne.call(me,ze?"html":"body")[0]:ze?me.documentElement:Ue},Pt=function(V){return $.call(V.ownerDocument||V,V,E.SHOW_ELEMENT|E.SHOW_COMMENT|E.SHOW_TEXT|E.SHOW_PROCESSING_INSTRUCTION|E.SHOW_CDATA_SECTION,null)},Wt=function(V){return V instanceof w&&(typeof V.nodeName!="string"||typeof V.textContent!="string"||typeof V.removeChild!="function"||!(V.attributes instanceof S)||typeof V.removeAttribute!="function"||typeof V.setAttribute!="function"||typeof V.namespaceURI!="string"||typeof V.insertBefore!="function"||typeof V.hasChildNodes!="function")},Qe=function(V){return typeof _=="function"&&V instanceof _};function qe(ye,V,me){arrayForEach(ye,ge=>{ge.call(i,V,me,sn)})}const Vt=function(V){let me=null;if(qe(W.beforeSanitizeElements,V,null),Wt(V))return Kt(V),!0;const ge=vt(V.nodeName);if(qe(W.uponSanitizeElement,V,{tagName:ge,allowedTags:q}),Xt&&V.hasChildNodes()&&!Qe(V.firstElementChild)&&regExpTest(/<[/\w!]/g,V.innerHTML)&&regExpTest(/<[/\w!]/g,V.textContent)||V.nodeType===NODE_TYPE.progressingInstruction||Xt&&V.nodeType===NODE_TYPE.comment&&regExpTest(/<[/\w]/g,V.data))return Kt(V),!0;if(!(Ie.tagCheck instanceof Function&&Ie.tagCheck(ge))&&(!q[ge]||Oe[ge])){if(!Oe[ge]&&lt(ge)&&(pe.tagNameCheck instanceof RegExp&&regExpTest(pe.tagNameCheck,ge)||pe.tagNameCheck instanceof Function&&pe.tagNameCheck(ge)))return!1;if(we&&!kt[ge]){const ke=U(V)||V.parentNode,Ue=z(V)||V.childNodes;if(Ue&&ke){const Re=Ue.length;for(let Ne=Re-1;Ne>=0;--Ne){const We=N(Ue[Ne],!0);We.__removalCount=(V.__removalCount||0)+1,ke.insertBefore(We,L(V))}}}return Kt(V),!0}return V instanceof v&&!vn(V)||(ge==="noscript"||ge==="noembed"||ge==="noframes")&&regExpTest(/<\/no(script|embed|frames)/i,V.innerHTML)?(Kt(V),!0):(ot&&V.nodeType===NODE_TYPE.text&&(me=V.textContent,arrayForEach([le,be,ve],ke=>{me=stringReplace(me,ke," ")}),V.textContent!==me&&(arrayPush(i.removed,{element:V.cloneNode()}),V.textContent=me)),qe(W.afterSanitizeElements,V,null),!1)},Nt=function(V,me,ge){if(Fe&&(me==="id"||me==="name")&&(ge in o||ge in Jn))return!1;if(!(Ve&&!Te[me]&&regExpTest(_e,me))){if(!(je&&regExpTest(F,me))){if(!(Ie.attributeCheck instanceof Function&&Ie.attributeCheck(me,V))){if(!oe[me]||Te[me]){if(!(lt(V)&&(pe.tagNameCheck instanceof RegExp&&regExpTest(pe.tagNameCheck,V)||pe.tagNameCheck instanceof Function&&pe.tagNameCheck(V))&&(pe.attributeNameCheck instanceof RegExp&&regExpTest(pe.attributeNameCheck,me)||pe.attributeNameCheck instanceof Function&&pe.attributeNameCheck(me,V))||me==="is"&&pe.allowCustomizedBuiltInElements&&(pe.tagNameCheck instanceof RegExp&&regExpTest(pe.tagNameCheck,ge)||pe.tagNameCheck instanceof Function&&pe.tagNameCheck(ge))))return!1}else if(!Wn[me]){if(!regExpTest(xe,stringReplace(ge,te,""))){if(!((me==="src"||me==="xlink:href"||me==="href")&&V!=="script"&&stringIndexOf(ge,"data:")===0&&mn[V])){if(!(qt&&!regExpTest(ce,stringReplace(ge,te,"")))){if(ge)return!1}}}}}}}return!0},lt=function(V){return V!=="annotation-xml"&&stringMatch(V,Se)},qn=function(V){qe(W.beforeSanitizeAttributes,V,null);const{attributes:me}=V;if(!me||Wt(V))return;const ge={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:oe,forceKeepAttr:void 0};let ke=me.length;for(;ke--;){const Ue=me[ke],{name:Re,namespaceURI:Ne,value:We}=Ue,Ct=vt(Re),Be=We;let Ze=Re==="value"?Be:stringTrim(Be);if(ge.attrName=Ct,ge.attrValue=Ze,ge.keepAttr=!0,ge.forceKeepAttr=void 0,qe(W.uponSanitizeAttribute,V,ge),Ze=ge.attrValue,nn&&(Ct==="id"||Ct==="name")&&(Ke(Re,V),Ze=tt+Ze),Xt&&regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i,Ze)){Ke(Re,V);continue}if(Ct==="attributename"&&stringMatch(Ze,"href")){Ke(Re,V);continue}if(ge.forceKeepAttr)continue;if(!ge.keepAttr){Ke(Re,V);continue}if(!Ye&&regExpTest(/\/>/i,Ze)){Ke(Re,V);continue}ot&&arrayForEach([le,be,ve],Mt=>{Ze=stringReplace(Ze,Mt," ")});const He=vt(V.nodeName);if(!Nt(He,Ct,Ze)){Ke(Re,V);continue}if(H&&typeof R=="object"&&typeof R.getAttributeType=="function"&&!Ne)switch(R.getAttributeType(He,Ct)){case"TrustedHTML":{Ze=H.createHTML(Ze);break}case"TrustedScriptURL":{Ze=H.createScriptURL(Ze);break}}if(Ze!==Be)try{Ne?V.setAttributeNS(Ne,Re,Ze):V.setAttribute(Re,Ze),Wt(V)?Kt(V):arrayPop(i.removed)}catch{Ke(Re,V)}}qe(W.afterSanitizeAttributes,V,null)},wn=function ye(V){let me=null;const ge=Pt(V);for(qe(W.beforeSanitizeShadowDOM,V,null);me=ge.nextNode();)qe(W.uponSanitizeShadowNode,me,null),Vt(me),qn(me),me.content instanceof m&&ye(me.content);qe(W.afterSanitizeShadowDOM,V,null)};return i.sanitize=function(ye){let V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},me=null,ge=null,ke=null,Ue=null;if(Bt=!ye,Bt&&(ye="<!-->"),typeof ye!="string"&&!Qe(ye))if(typeof ye.toString=="function"){if(ye=ye.toString(),typeof ye!="string")throw typeErrorCreate("dirty is not a string, aborting")}else throw typeErrorCreate("toString is not a function");if(!i.isSupported)return ye;if(Je||Hn(V),i.removed=[],typeof ye=="string"&&(ct=!1),ct){if(ye.nodeName){const We=vt(ye.nodeName);if(!q[We]||Oe[We])throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place")}}else if(ye instanceof _)me=Qt("<!---->"),ge=me.ownerDocument.importNode(ye,!0),ge.nodeType===NODE_TYPE.element&&ge.nodeName==="BODY"||ge.nodeName==="HTML"?me=ge:me.appendChild(ge);else{if(!At&&!ot&&!ze&&ye.indexOf("<")===-1)return H&&ut?H.createHTML(ye):ye;if(me=Qt(ye),!me)return At?null:ut?Y:""}me&&Rt&&Kt(me.firstChild);const Re=Pt(ct?ye:me);for(;ke=Re.nextNode();)Vt(ke),qn(ke),ke.content instanceof m&&wn(ke.content);if(ct)return ye;if(At){if(ft)for(Ue=Q.call(me.ownerDocument);me.firstChild;)Ue.appendChild(me.firstChild);else Ue=me;return(oe.shadowroot||oe.shadowrootmode)&&(Ue=fe.call(u,Ue,!0)),Ue}let Ne=ze?me.outerHTML:me.innerHTML;return ze&&q["!doctype"]&&me.ownerDocument&&me.ownerDocument.doctype&&me.ownerDocument.doctype.name&&regExpTest(DOCTYPE_NAME,me.ownerDocument.doctype.name)&&(Ne="<!DOCTYPE "+me.ownerDocument.doctype.name+`>
121
+ `+Ne),ot&&arrayForEach([le,be,ve],We=>{Ne=stringReplace(Ne,We," ")}),H&&ut?H.createHTML(Ne):Ne},i.setConfig=function(){let ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Hn(ye),Je=!0},i.clearConfig=function(){sn=null,Je=!1},i.isValidAttribute=function(ye,V,me){sn||Hn({});const ge=vt(ye),ke=vt(V);return Nt(ge,ke,me)},i.addHook=function(ye,V){typeof V=="function"&&arrayPush(W[ye],V)},i.removeHook=function(ye,V){if(V!==void 0){const me=arrayLastIndexOf(W[ye],V);return me===-1?void 0:arraySplice(W[ye],me,1)[0]}return arrayPop(W[ye])},i.removeHooks=function(ye){W[ye]=[]},i.removeAllHooks=function(){W=_createHooksMap()},i}var purify=createDOMPurify();const HighlightLoadingInfo=({onClose:n})=>{const i=useTranslation();return jsxRuntimeExports.jsxs("div",{className:styles$1.highlightLoadingInfo,onClick:n,children:[jsxRuntimeExports.jsx("div",{className:styles$1.highlightLoadingInfoCloseIcon,children:jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"})})}),jsxRuntimeExports.jsxs("div",{className:styles$1.highlightLoadingInfoInnerContainer,children:[jsxRuntimeExports.jsxs("div",{className:styles$1.highlightLoadingInfoContent,children:[jsxRuntimeExports.jsx("h3",{children:i("source-infos.highlight-loading.title")}),jsxRuntimeExports.jsx("p",{children:i("source-infos.highlight-loading.description")})]}),jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"#000000",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M253.66,106.34a8,8,0,0,0-11.32,0L192,156.69,107.31,72l50.35-50.34a8,8,0,1,0-11.32-11.32L96,60.69A16,16,0,0,0,93.18,79.5L72,100.69a16,16,0,0,0,0,22.62L76.69,128,18.34,186.34a8,8,0,0,0,3.13,13.25l72,24A7.88,7.88,0,0,0,96,224a8,8,0,0,0,5.66-2.34L136,187.31l4.69,4.69a16,16,0,0,0,22.62,0l21.19-21.18A16,16,0,0,0,203.31,168l50.35-50.34A8,8,0,0,0,253.66,106.34ZM93.84,206.85l-55-18.35L88,139.31,124.69,176ZM152,180.69,83.31,112,104,91.31,172.69,160Z"})})]})]})},MarkdownLink=({title:n,href:i,children:o})=>jsxRuntimeExports.jsx("a",{href:i,title:n,target:"_blank",rel:"noopener noreferrer",children:o}),DefaultLinkButton=({className:n,children:i,...o})=>jsxRuntimeExports.jsx("a",{className:clsx(styles$g.button,styles$g.buttonDefault,n),type:"button",role:"button",...o,children:i}),Text=n=>jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",...n,children:jsxRuntimeExports.jsx("path",{d:"M52,146H36a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6H52a34,34,0,0,0,0-68Zm0,56H42V158H52a22,22,0,0,1,0,44Zm168.15-5.46a6,6,0,0,1,.18,8.48A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.06,28.06,0,0,1,20.33,9,6,6,0,0,1-8.66,8.3A16.23,16.23,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a16.23,16.23,0,0,0,11.67-5.28A6,6,0,0,1,220.15,196.54ZM128,146c-16.54,0-30,15.25-30,34s13.46,34,30,34,30-15.25,30-34S144.54,146,128,146Zm0,56c-9.93,0-18-9.87-18-22s8.07-22,18-22,18,9.87,18,22S137.93,202,128,202ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z"})}),KnowledgeBaseTypeIcon=({type:n,...i})=>{switch(n){case"WEBSITE":return jsxRuntimeExports.jsx(Web,{...i});case"PDF":return jsxRuntimeExports.jsx(Pdf,{...i});case"DOCX":return jsxRuntimeExports.jsx(Docx,{...i});case"TEXT":return jsxRuntimeExports.jsx(Text,{...i});default:return jsxRuntimeExports.jsx(File$1,{...i})}},OpenButton=({url:n,knowledgeBaseType:i})=>{const o=useTranslation();return jsxRuntimeExports.jsx(DefaultLinkButton,{className:styles$1.openSourceButton,href:n,target:"_blank",children:jsxRuntimeExports.jsxs("div",{className:styles$1.sourceButtonLabel,children:[jsxRuntimeExports.jsx("div",{className:styles$1.sourceHeaderIcon,children:jsxRuntimeExports.jsx(KnowledgeBaseTypeIcon,{type:i})}),jsxRuntimeExports.jsx("p",{children:o("source-infos.open-source")})]})})},LoadedSourceInfos=({sourceInfos:{content:n,url:i,knowledgeBaseType:o,highlighted:u}})=>{const[h,m]=reactExports.useState(!u);reactExports.useEffect(()=>{u&&m(!1)},[u]);const y=purify.sanitize(n,{USE_PROFILES:{html:!0}});return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:clsx(styles$1.sourceContent,markdownStyle.markdown),children:[jsxRuntimeExports.jsx(X5,{options:{overrides:{a:MarkdownLink}},children:y}),h&&jsxRuntimeExports.jsx(HighlightLoadingInfo,{onClose:()=>m(!1)})]}),jsxRuntimeExports.jsx(OpenButton,{url:i,knowledgeBaseType:o})]})},fixingError=""+new URL("undraw_fixing-bugs-D_eYxJc6.svg",import.meta.url).href,LoadingError=()=>{const n=useTranslation();return jsxRuntimeExports.jsxs("div",{className:styles$1.loadingError,children:[jsxRuntimeExports.jsx("h1",{children:n("source-infos.error.title")}),jsxRuntimeExports.jsx("img",{src:fixingError,title:n("source-infos.error.title")}),jsxRuntimeExports.jsx("p",{children:n("source-infos.error.info")})]})},LoadingSourceInfos=()=>jsxRuntimeExports.jsx("div",{className:styles$1.loadingSourceInfos,children:jsxRuntimeExports.jsx("svg",{className:styles$1.loading,xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",children:jsxRuntimeExports.jsx("path",{d:"M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z"})})});function useSwipeToClose({sourceInfos:n,onClose:i,threshold:o=100}){const u=reactExports.useRef(null),[h,m]=reactExports.useState(0),[y,_]=reactExports.useState(!1),v=reactExports.useRef(null),E=reactExports.useRef(null),S=reactExports.useCallback(D=>{v.current=D,_(!0)},[]),w=reactExports.useCallback(D=>{if(v.current!==null&&y){const N=D-v.current;N>0&&m(N)}},[y]),T=reactExports.useCallback(()=>{_(!1),h>o&&i(),m(0),v.current=null},[h,o,i]),R=reactExports.useCallback(D=>{const N=Y=>S(Y.touches[0].clientY),M=Y=>w(Y.touches[0].clientY),L=()=>T(),z=Y=>{Y.preventDefault(),S(Y.clientY),window.addEventListener("mousemove",U),window.addEventListener("mouseup",H)},U=Y=>w(Y.clientY),H=()=>{T(),window.removeEventListener("mousemove",U),window.removeEventListener("mouseup",H)};D.addEventListener("touchstart",N),D.addEventListener("touchmove",M),D.addEventListener("touchend",L),D.addEventListener("mousedown",z),E.current=()=>{D.removeEventListener("touchstart",N),D.removeEventListener("touchmove",M),D.removeEventListener("touchend",L),D.removeEventListener("mousedown",z),window.removeEventListener("mousemove",U),window.removeEventListener("mouseup",H)}},[S,w,T]);return reactExports.useEffect(()=>{let D;return u.current?(E.current?.(),R(u.current)):(D=new MutationObserver(()=>{u.current&&(E.current?.(),R(u.current),D?.disconnect())}),D.observe(document.body,{childList:!0,subtree:!0})),()=>{D?.disconnect(),E.current?.()}},[R,n]),{ref:u,dragOffsetY:h,isDragging:y}}const useWaitForLoadingEffect=n=>{const[i,o]=reactExports.useState(!0);return reactExports.useEffect(()=>{let u=null;return n?.type==="loading"?(o(!0),u=setTimeout(()=>{o(!1)},300)):o(!n),()=>{u&&clearTimeout(u)}},[n]),i},SourceInfos=()=>{const n=useAppDispatch(),i=useAppSelector(v=>v.chat.sourceInfos),o=useIsSmallScreen(),u=reactExports.useRef(null),h=useWaitForLoadingEffect(i);reactExports.useEffect(()=>{u.current&&i?.type==="loading"&&(o?u.current.showModal():(u.current.setAttribute("open","true"),u.current?.focus()))},[i,o]);const m=reactExports.useCallback(()=>{u.current&&(o?u.current.close():u.current.removeAttribute("open"),n(closeSourceInfos()))},[n,o]),{ref:y,dragOffsetY:_}=useSwipeToClose({onClose:m,sourceInfos:i});return i?jsxRuntimeExports.jsx("dialog",{ref:u,className:clsx(styles$1.sourceInfos,h?styles$1.waitForLoading:i.type==="loading"?styles$1.loadingContent:""),style:o&&_?{transform:`translateY(${_}px)`}:{},onClose:m,autoFocus:!0,role:"dialog","aria-labelledby":"source-info-title",children:h?null:jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Header,{ref:y,tabIndex:-1,sourceInfos:i.type==="loaded"?i:void 0,onClose:m}),i.type==="loading"?jsxRuntimeExports.jsx(LoadingSourceInfos,{}):i.type==="loading-error"?jsxRuntimeExports.jsx(LoadingError,{}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(HighlightLoader,{loading:!i.highlighted}),jsxRuntimeExports.jsx(LoadedSourceInfos,{sourceInfos:i})]})]})}):null},container$1="_container_1hnv6_1",body="_body_1hnv6_7",intro="_intro_1hnv6_14",footer="_footer_1hnv6_48",footnote="_footnote_1hnv6_52",containerWithFootnote="_containerWithFootnote_1hnv6_67",startChatButton="_startChatButton_1hnv6_82",spinner="_spinner_1hnv6_97",formFields="_formFields_1hnv6_101",formField="_formField_1hnv6_101",radio="_radio_1hnv6_113",checkbox="_checkbox_1hnv6_120",input="_input_1hnv6_128",inputLabel="_inputLabel_1hnv6_162",selectWrapper="_selectWrapper_1hnv6_166",select="_select_1hnv6_166",selectLabel="_selectLabel_1hnv6_212",styles={container:container$1,body,intro,footer,footnote,containerWithFootnote,startChatButton,spinner,formFields,formField,radio,checkbox,input,inputLabel,selectWrapper,select,selectLabel},Checkbox=({name:n,label:i,defaultValue:o,required:u,onChange:h})=>{const m=y=>{h(y.currentTarget.checked?"true":"false")};return jsxRuntimeExports.jsxs("label",{className:clsx(styles.checkbox,"chat__startScreen__checkbox"),htmlFor:n,children:[jsxRuntimeExports.jsx("input",{type:"checkbox",id:n,name:n,defaultChecked:o==="true",required:u,onChange:m}),jsxRuntimeExports.jsx("div",{children:i})]})},Input=({type:n,name:i,label:o,defaultValue:u,placeholder:h,required:m,multiple:y,min:_,max:v,pattern:E,onChange:S})=>{const w=T=>{S(T.target.value)};return jsxRuntimeExports.jsxs("label",{className:clsx(styles.input,"chat__startScreen__input"),htmlFor:i,children:[jsxRuntimeExports.jsx("div",{className:clsx(styles.inputLabel),children:o}),jsxRuntimeExports.jsx("input",{type:n,id:i,name:i,defaultValue:u,placeholder:h,required:m,multiple:y,min:_,max:v,pattern:E,onChange:w})]})},Radio=({name:n,value:i,label:o,defaultChecked:u,required:h,onChange:m})=>{const y=`${n}-${i}`,_=v=>{m(v.target.value)};return jsxRuntimeExports.jsxs("label",{className:clsx(styles.radio,"chat__startScreen__radio"),htmlFor:y,children:[jsxRuntimeExports.jsx("input",{id:y,type:"radio",name:n,value:i,defaultChecked:u,required:h,onChange:_}),jsxRuntimeExports.jsx("span",{className:clsx(styles.label),children:o})]})},Select=({name:n,label:i,defaultValue:o,required:u,multiple:h,options:m,onChange:y})=>{const _=v=>{y(v.target.value)};return jsxRuntimeExports.jsxs("label",{className:clsx(styles.select,"chat__startScreen__select"),htmlFor:n,children:[jsxRuntimeExports.jsx("div",{className:clsx(styles.selectLabel),children:i}),jsxRuntimeExports.jsx("div",{className:clsx(styles.selectWrapper),children:jsxRuntimeExports.jsx("select",{id:n,name:n,defaultValue:o,required:u,multiple:h,onChange:_,children:Object.entries(m||{}).map(([v,E])=>jsxRuntimeExports.jsx("option",{value:v,selected:E===o,children:E}))})})]})},INTRO_KEY="start-screen.intro",START_CHAT_KEY="start-screen.start-chat",WAITING_FOR_LOGIN_KEY="start-screen.waiting-for-login",FOOTNOTE_KEY="start-screen.footnote",FORM_KEY="start-screen.form",FORM_FIELDS_KEY=`${FORM_KEY}.fields`,StartScreen=()=>{const n=useTranslation(),i=useAppDispatch(),o=useClientName(),u=useAppSelector(D=>D.startScreen.loginRequestToken),h=useAppSelector(D=>D.settings.requiresUserAuthentication);reactExports.useEffect(()=>{let D;if(u){const L=window.screenX+(window.outerWidth-600)/2,z=window.screenY+(window.outerHeight-700)/2,U=encodeURIComponent(o),H=new URL(window.location.origin);H.pathname=`/${U}/auth/login`,H.searchParams.set("loginRequestToken",u);const Y=window.open(H.href,"Login",`width=600,height=700,left=${L},top=${z},resizable=yes,scrollbars=yes`);D=setInterval(()=>{Y?.closed&&(i(loginWindowClosed()),clearInterval(D))},500)}return()=>{D&&clearInterval(D)}},[o,u,i]);const[m,y]=reactExports.useState({}),_=()=>{const D=Object.entries(m).reduce((N,[M,L])=>({...N,[M]:L.value}),{});i(h?requestLogin({loginRequestToken:v4(),formValues:D}):startChat$1({formValues:D}))},v=n(INTRO_KEY),E=n(u?WAITING_FOR_LOGIN_KEY:START_CHAT_KEY),S=n(FOOTNOTE_KEY),w=reactExports.useMemo(()=>n(FORM_FIELDS_KEY)?.split(";").map(D=>D.trim())??[],[n(FORM_FIELDS_KEY)]);reactExports.useEffect(()=>{w.length&&Object.keys(m).length===0&&y(w.reduce((D,N)=>({...D,[N]:toFormField(N,n)}),{}))},[n,w,m]);const T=D=>{D.preventDefault(),_()},R=D=>N=>{y(M=>({...M,[D]:{...M[D],value:N}}))};return jsxRuntimeExports.jsxs("form",{onSubmit:T,className:clsx(styles.container,S&&styles.containerWithFootnote,"chat__startScreen"),children:[jsxRuntimeExports.jsxs("div",{className:clsx(styles.body,"chat__startScreen__body"),children:[v&&jsxRuntimeExports.jsx("div",{className:clsx(styles.intro,"chat__startScreen__intro"),children:jsxRuntimeExports.jsx(X5,{options:{overrides:{a:Link}},children:v})}),jsxRuntimeExports.jsx("div",{className:clsx(styles.formFields,"chat__startScreen__fields"),children:Object.values(m).map(({type:D,name:N,label:M,placeholder:L,defaultValue:z,options:U,required:H,multiple:Y,min:K,max:$,pattern:Q})=>jsxRuntimeExports.jsx("div",{className:clsx(styles.formField,"chat__startScreen__field"),children:(()=>{switch(D){case"radio":return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{children:M}),Object.entries(U||{}).map(([ne,fe])=>jsxRuntimeExports.jsx(Radio,{name:N,value:ne,label:fe,defaultChecked:ne===z,required:H,onChange:R(N)},ne))]});case"checkbox":return jsxRuntimeExports.jsx(Checkbox,{name:N,label:M,defaultValue:z,required:H,onChange:R(N)});case"select":return jsxRuntimeExports.jsx(Select,{name:N,label:M,defaultValue:z,required:H,multiple:Y,options:U,onChange:R(N)});default:return jsxRuntimeExports.jsx(Input,{type:D,name:N,label:M,placeholder:L,defaultValue:z,required:H,multiple:Y,min:K,max:$,pattern:Q,onChange:R(N)})}})()},N))})]}),jsxRuntimeExports.jsxs("div",{className:clsx(styles.footer,"chat__startScreen__footer"),children:[jsxRuntimeExports.jsxs(PrimaryButton,{type:"submit",className:styles.startChatButton,disabled:!!u,children:[!!u&&jsxRuntimeExports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"currentColor",viewBox:"0 0 256 256",className:styles.spinner,children:jsxRuntimeExports.jsx("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm88,88H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"})}),jsxRuntimeExports.jsx("div",{children:E})]}),S&&jsxRuntimeExports.jsx("div",{className:styles.footnote,children:jsxRuntimeExports.jsx(X5,{options:{overrides:{a:Link}},children:S})})]})]})},Link=({title:n,href:i,children:o})=>jsxRuntimeExports.jsx("a",{href:i,title:n,target:"_blank",rel:"noopener noreferrer",children:o}),toFormField=(n,i)=>{const o=i(`${FORM_KEY}.${n}.type`)||"text",u=i(`${FORM_KEY}.${n}.required`)==="true",h=i(`${FORM_KEY}.${n}.multiple`)==="true",m=i(`${FORM_KEY}.${n}.placeholder`),y=i(`${FORM_KEY}.${n}.label`)||"",_=i(`${FORM_KEY}.${n}.defaultValue`),v=i(`${FORM_KEY}.${n}.min`),E=i(`${FORM_KEY}.${n}.max`),S=i(`${FORM_KEY}.${n}.pattern`),w=toFormFieldOptions(i(`${FORM_KEY}.${n}.options`));return{name:n,label:y,placeholder:m,value:getTypeSpecificValue(o,_,w)||"",defaultValue:_,options:w,type:o,required:u,multiple:h,min:v,max:E,pattern:S}},getTypeSpecificValue=(n,i,o)=>i||n==="select"&&Object.keys(o)[0]||"",toFormFieldOptions=(n="")=>n.split(";").map(i=>i.trim()).reduce((i,o)=>{const[u,h]=o.split(":").map(m=>m.trim());return{...i,[u]:h}},{}),useSetDocumentLanguageEffect=()=>{const n=useAppSelector(i=>i.intl.locale);reactExports.useEffect(()=>{window.document.documentElement.lang=n},[n])},INCOMING_EVENTS={TRIGGER_ACTION:"TRIGGER_ACTION",TRIGGER_STORY:"TRIGGER_STORY",CHAT_MESSAGE_FROM_GUEST:"CHAT_MESSAGE_FROM_GUEST",ON_CHAT_WINDOW_OPEN:"ON_CHAT_WINDOW_OPEN",ON_CHAT_WINDOW_CLOSE:"ON_CHAT_WINDOW_CLOSE",RESTART_CHAT:"RESTART_CHAT"},RootScene=({clientName:n})=>{useSetDocumentLanguageEffect();const i=useAppDispatch(),o=useAppSelector(S=>S.intl.messages),u=useTranslation(),h=useAppSelector(S=>S.settings.enableStartScreen),m=useAppSelector(S=>S.startScreen.startScreenStatus),y=useAppSelector(S=>S.connection.queryString),_=reactExports.useMemo(()=>new URLSearchParams(y||"?").get("cssClassName"),[y]);reactExports.useEffect(()=>{const S=new URLSearchParams(y||""),w=Object.fromEntries(S.entries()),T=R=>{if(!(!R.data?.type||!Object.values(INCOMING_EVENTS).includes(R.data.type))){if(R.origin!==window.location.origin&&R.source!==window.parent){console.warn("Rejected postMessage from untrusted origin:",R.origin);return}switch(R.data.type){case INCOMING_EVENTS.TRIGGER_ACTION:i(R.data.action);break;case INCOMING_EVENTS.TRIGGER_STORY:i(requestNLUEvent(R.data.story));break;case INCOMING_EVENTS.ON_CHAT_WINDOW_OPEN:i({type:"webclient.chatwindow.opened"});break;case INCOMING_EVENTS.ON_CHAT_WINDOW_CLOSE:i({type:"webclient.chatwindow.closed"});break;case INCOMING_EVENTS.CHAT_MESSAGE_FROM_GUEST:i(sendMessageFromUser(R.data.text));break;case INCOMING_EVENTS.RESTART_CHAT:i(restartChat());break}}};return i(connect(n,w)),window.addEventListener("message",T,!1),()=>window.removeEventListener("message",T)},[n,y,i]),reactExports.useEffect(()=>{const S=u("page.title");S&&document&&(document.title=S)},[o,u]);const v=h===void 0,E=h===!1||m==="HIDDEN";return jsxRuntimeExports.jsx("div",{className:clsx(styles$2.chatwindow,E&&styles$2.chatwindowWithAside,"chat__chatwindow",_),children:v?null:E?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("header",{children:jsxRuntimeExports.jsx(Header$1,{chatStarted:!0})}),jsxRuntimeExports.jsx("main",{children:jsxRuntimeExports.jsx(Chat,{clientName:n})}),jsxRuntimeExports.jsx("aside",{children:jsxRuntimeExports.jsx(SourceInfos,{})})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("header",{children:jsxRuntimeExports.jsx(Header$1,{chatStarted:!1})}),jsxRuntimeExports.jsx("main",{children:jsxRuntimeExports.jsx(StartScreen,{})})]})})},App=()=>{const n=useClientName(),i=useIsSmallScreen();return jsxRuntimeExports.jsx("div",{className:clsx([styles$o.app,i?"chat__small":"chat__large"]),children:jsxRuntimeExports.jsx(RootScene,{clientName:n})})},de={"page.title":"Bubble Chat Chatbot","message-input-label":"Benutzereingabe","message-input-placeholder":"Nachricht eingeben","message-input.actions.submit.label":"Nachricht senden","message-input.actions.start-audio-recording.label":"Spracheingabe starten","message-input.actions.stop-audio-recording.label":"Spracheingabe stoppen","message-input.actions.submit-audio-recording.label":"Spracheingabe übermitteln","message-input.actions.command.label":"Aktion ausführen","guest-bubble.label":"Ihre Nachricht","bot-bubble.label":"Nachricht des Chatbots","bot-bubble.actions.label":"Nachricht-Aktionen","bot-bubble.reaction.good":"Gefällt mir","bot-bubble.reaction.bad":"Gefällt mir nicht","bot-bubble.reaction.remove":"Markierung entfernen","bot-bubble.reaction.say-more":"Erzähle mir bitte mehr","bot-bubble.reaction.category.WRONG_INFORMATION":"Falsch","bot-bubble.reaction.category.MISSING_INFORMATION":"Unvollständig","bot-bubble.reaction.category.OLD_INFORMATION":"Veraltet","bot-bubble.reaction.category.UNCLEAR":"Unklar","bot-bubble.reaction.category.OFF_TOPIC":"Nicht zur Frage passend","bot-bubble.reaction.comment":"Gedanken mit mir teilen...","bot-bubble.reaction.close":"Schliessen","bot-bubble.copy":"Kopieren","bot-bubble.sources":"Quellenliste","bot-bubble.source.open":"Quelle öffnen","bot-bubble.footnote":"Fussnote","agent-bubble.label":"Nachricht des Live-Agenten","conversation.label":"Chat Verlauf","chatbot.typing":"Chatbot schreibt","export-transcript.email.title":"Chatverlauf per E-Mail versenden","export-transcript.email.description":"Bitte E-Mail-Adresse angeben, an die der Chatverlauf gesendet werden soll.","export-transcript.email.cancel":"Abbrechen","export-transcript.email.send":"Senden","export-transcript.email.placeholder":"E-Mail-Adresse","export-transcript.email.invalid":"Bitte gültige E-Mail-Adresse eingeben.","export-transcript.email.success":"Der Chatverlauf wurde an die hinterlegte E-Mail-Adresse übermittelt.","general-conditions.header":"**Nutzungsbedingungen**","general-conditions.body":`Bitte berücksichtigen Sie die folgenden Punkte:
122
+
123
+ - Der Chatverlauf wird im EU-Raum gespeichert und kann nur von autorisierten Personen eingesehen werden.
124
+ - Geben Sie im Chatfenster keine persönlichen Daten ein (Passwörter, Geburtsdatum usw.).`,"general-conditions.accept-conditions-note":"Mit der Verwendung des Chats erklären Sie sich mit den Nutzungsbedingungen einverstanden.","block-user-input.title":"Bitte auf die Antwort des Chatbots warten.","conversation-rating.call-to-action.title":"Bewerten Sie diesen Chat","conversation-rating.overlay.title":"Wie zufrieden sind Sie mit diesem Chat?","conversation-rating.overlay.guest-feedback.input-placeholder":"Feedback bitte hier eingeben (optional)","conversation-rating.overlay.star.very-bad":"Sehr schlecht","conversation-rating.overlay.star.very-good":"Sehr gut","conversation-rating.overlay.bot-message.rate-feedback.value-1":"Oh, das tönt nicht gut. Bitte geben Sie mir doch ein schriftliches Feedback, damit ich dazulernen kann.","conversation-rating.overlay.bot-message.rate-feedback.value-2":"Oh, das tönt nicht gut. Bitte geben Sie mir doch ein schriftliches Feedback, damit ich dazulernen kann.","conversation-rating.overlay.bot-message.rate-feedback.value-3":"Durchschnitt ist nicht mein Ziel, was kann ich noch verbessern?","conversation-rating.overlay.bot-message.rate-feedback.value-4":"Knapp daneben ist auch vorbei. Was kann ich noch verbessern, um das nächste Mal alle Sterne zu erreichen?","conversation-rating.overlay.bot-message.rate-feedback.value-5":"Perfekt! Dann hoffe ich, dass ich Sie wieder einmal so gut beraten kann.","conversation-rating.overlay.bot-message.submit-feedback":"Vielen Dank für die Rückmeldung. Ich bin bestrebt, mich ständig zu verbessern.","conversation-rating.overlay.action.submit":"Bewertung senden","conversation-rating.overlay.action.back-to-chat":"Zurück zum Chat","conversation-rating.overlay.action.close-chat":"Chat minimieren","conversation-rating.overlay.action.restart-chat":"Chat neu starten","conversation-rating.overlay.action.cancel":"Abbrechen","start-screen.intro":"","start-screen.start-chat":"Chat starten","start-screen.waiting-for-login":"Warte auf Login ...","header.close-chat":"Chat minimieren","header.menu.title":"Menü","header.menu.restart-chat":"Chat neu starten","header.menu.expand-chat-window":"Fenster maximieren","header.menu.download-transcript":"Chatverlauf herunterladen","header.menu.send-transcript":"Chatverlauf versenden","header.menu.export-transcript":"Chatverlauf exportieren","header.menu.rate-conversation":"Chat bewerten","source-infos.close":"Schliessen","source-infos.open-source":"Quelle öffnen","source-infos.error.title":"Fehler","source-infos.error.info":"Oops! Etwas ist schiefgelaufen. Bitte versuche es erneut oder kontaktiere den Support, falls das Problem weiterhin besteht.","source-infos.highlight-loading.title":"Relevante Inhalte werden markiert...","source-infos.highlight-loading.description":"Einen Moment – die Quelle wird analysiert.","commands.show-more.action":"Weitere ...","commands.show-more.tooltip":"Weitere Befehle anzeigen","commands.show-less.action":"Weniger ...","commands.show-less.tooltip":"Weniger Befehle anzeigen"},en={"page.title":"Bubble Chat Chatbot","message-input-label":"User input","message-input-placeholder":"Enter a message","message-input.actions.submit.label":"Send message","message-input.actions.start-audio-recording.label":"Start voice input","message-input.actions.stop-audio-recording.label":"Stop voice input","message-input.actions.submit-audio-recording.label":"Transmit voice input","guest-bubble.label":"Your message","message-input.actions.command.label":"Perform action","bot-bubble.label":"Message from the chatbot","bot-bubble.actions.label":"Message actions","bot-bubble.reaction.good":"I like","bot-bubble.reaction.bad":"I don't like it","bot-bubble.reaction.remove":"Remove marker","bot-bubble.reaction.say-more":"Please tell us more","bot-bubble.reaction.category.WRONG_INFORMATION":"Wrong","bot-bubble.reaction.category.MISSING_INFORMATION":"Incomplete","bot-bubble.reaction.category.OLD_INFORMATION":"Outdated","bot-bubble.reaction.category.UNCLEAR":"Unclear","bot-bubble.reaction.category.OFF_TOPIC":"Not relevant to the question","bot-bubble.reaction.comment":"Share your thoughts with us...","bot-bubble.reaction.close":"Close","bot-bubble.copy":"Copy","bot-bubble.sources":"Source list","bot-bubble.source.open":"Open source","bot-bubble.footnote":"Footnote","agent-bubble.label":"Message from the live agent","conversation.label":"Chat history","chatbot.typing":"Chatbot is typing","export-transcript.email.title":"Receive chat history","export-transcript.email.description":"Please enter the e-mail address to which the chat history should be sent.","export-transcript.email.cancel":"Cancel","export-transcript.email.send":"Send","export-transcript.email.placeholder":"E-mail address","export-transcript.email.invalid":"Please enter a valid e-mail address.","export-transcript.email.success":"The chat history was sent to the e-mail address provided.","general-conditions.header":"**Terms of use**","general-conditions.body":`Please consider the following points:
125
+
126
+ - The chat history is stored in the EU area and can only be viewed by authorized personnel.
127
+ - Do not enter any personal information in the chat window (passwords, date of birth, etc.)`,"general-conditions.accept-conditions-note":"By using the chat you agree to the terms of use.","block-user-input.title":"Please wait for the chatbot's response.","conversation-rating.call-to-action.title":"Rate this chat","conversation-rating.overlay.title":"How satisfied are you with this chat?","conversation-rating.overlay.guest-feedback.input-placeholder":"Please enter feedback here (optional)","conversation-rating.overlay.star.very-bad":"Very bad","conversation-rating.overlay.star.very-good":"Very good","conversation-rating.overlay.bot-message.rate-feedback.value-1":"Oh, that doesn't sound good. Please give me some feedback so that I can learn more.","conversation-rating.overlay.bot-message.rate-feedback.value-2":"Oh, that doesn't sound good. Please give me some feedback so that I can learn more.","conversation-rating.overlay.bot-message.rate-feedback.value-3":"Average is not my goal, what can I still improve?","conversation-rating.overlay.bot-message.rate-feedback.value-4":"Just missed is also over. What can I improve to achieve all stars next time?","conversation-rating.overlay.bot-message.rate-feedback.value-5":"Perfect! Then I hope that I can once again advise you so well.","conversation-rating.overlay.bot-message.submit-feedback":"Thank you for the feedback. I am constantly striving to improve.","conversation-rating.overlay.action.submit":"Send rating","conversation-rating.overlay.action.back-to-chat":"Close","conversation-rating.overlay.action.close-chat":"Minimize chat","conversation-rating.overlay.action.restart-chat":"Restart chat","conversation-rating.overlay.action.cancel":"Cancel","start-screen.intro":"","start-screen.start-chat":"Start chat","start-screen.waiting-for-login":"Waiting for login ...","header.close-chat":"Minimize chat","header.menu.title":"Menu","header.menu.restart-chat":"Restart chat","header.menu.expand-chat-window":"Maximize window","header.menu.download-transcript":"Download chat history","header.menu.export-transcript":"Export chat history","header.menu.send-transcript":"Send chat history","header.menu.rate-conversation":"Rate chat","source-infos.close":"Close","source-infos.open-source":"Open source","source-infos.error.title":"Error","source-infos.error.info":"Oops! Something went wrong. Please try again or contact support if the problem persists.","source-infos.highlight-loading.title":"Relevant content is highlighted...","source-infos.highlight-loading.description":"One moment - the source is being analyzed.","commands.show-more.action":"More","commands.show-more.tooltip":"Show more commands","commands.show-less.action":"Less","commands.show-less.tooltip":"Show less commands"};function flattenObject(n,i="",o="."){const u={};for(const h in n)if(Object.prototype.hasOwnProperty.call(n,h)){const m=n[h],y=i?`${i}${o}${h}`:h;m!==null&&typeof m=="object"&&!Array.isArray(m)?Object.assign(u,flattenObject(m,y,o)):u[y]=String(m)}return u}const fr={"page.title":"Bubble Chat Chatbot","message-input-label":"Input dell'utente","message-input-placeholder":"Saisir un message","message-input.actions.submit.label":"Envoyer un message","message-input.actions.start-audio-recording.label":"Démarrer la saisie vocale","message-input.actions.stop-audio-recording.label":"Arrêt de la saisie vocale","message-input.actions.submit-audio-recording.label":"Transmettre une entrée vocale","message-input.actions.command.label":"Exécuter l'action","guest-bubble.label":"Votre message","bot-bubble.label":"Message du chatbot","bot-bubble.actions.label":"Actions du message","bot-bubble.reaction.good":"J'aime bien","bot-bubble.reaction.bad":"Je n'aime pas","bot-bubble.reaction.remove":"Retirer le marqueur","bot-bubble.reaction.say-more":"Dis-nous en plus, s'il te plaît","bot-bubble.reaction.category.WRONG_INFORMATION":"Faux","bot-bubble.reaction.category.MISSING_INFORMATION":"Incomplet","bot-bubble.reaction.category.OLD_INFORMATION":"Obsolète","bot-bubble.reaction.category.UNCLEAR":"Peu clair","bot-bubble.reaction.category.OFF_TOPIC":"Hors sujet","bot-bubble.reaction.comment":"Partager ses pensées avec nous...","bot-bubble.reaction.close":"Fermer","bot-bubble.copy":"Copie","bot-bubble.sources":"Liste des sources","bot-bubble.source.open":"Ouvrir la source","bot-bubble.footnote":"Note de bas de page","agent-bubble.label":"Message de l'agent en direct","conversation.label":"Historique du chat","chatbot.typing":"Le chatbot écrit","export-transcript.email.title":"Recevoir l'historique du chat","export-transcript.email.description":"Veuillez indiquer l'adresse e-mail à laquelle l'historique de chat doit être envoyé.","export-transcript.email.cancel":"Annuler","export-transcript.email.send":"Envoyer","export-transcript.email.placeholder":"E-mail","export-transcript.email.invalid":"Veuillez entrer une adresse électronique valide.","export-transcript.email.success":"L'historique du chat a été envoyé à l'adresse e-mail fournie.","general-conditions.header":"**Conditions d'utilisation**","general-conditions.body":`Veuillez considérer les points suivants:
128
+
129
+ - L'historique du chat est stocké dans l'espace UE et ne peut être consulté que par les personnes autorisées.
130
+ - Ne saisissez aucune information personnelle dans la fenêtre de chat (mots de passe, date de naissance, etc.).`,"general-conditions.accept-conditions-note":"En utilisant le chat, vous acceptez les conditions d'utilisation.","block-user-input.title":"Veuillez attendre la réponse du chatbot.","conversation-rating.call-to-action.title":"Notez ce chat","conversation-rating.overlay.title":"Dans quelle mesure êtes-vous satisfait de ce chat ?","conversation-rating.overlay.guest-feedback.input-placeholder":"Veuillez saisir vos commentaires ici (facultatif)","conversation-rating.overlay.star.very-bad":"Très mauvais","conversation-rating.overlay.star.very-good":"Très bien","conversation-rating.overlay.bot-message.rate-feedback.value-1":"Oh, ça ne sonne pas bien. Merci de me donner un feedback pour que je puisse en apprendre davantage.","conversation-rating.overlay.bot-message.rate-feedback.value-2":"Oh, ça ne sonne pas bien. Merci de me donner un feedback pour que je puisse en apprendre davantage.","conversation-rating.overlay.bot-message.rate-feedback.value-3":"La moyenne n'est pas mon objectif, que puis-je encore améliorer ?","conversation-rating.overlay.bot-message.rate-feedback.value-4":"Le rater de peu, c'est le rater aussi. Que puis-je encore améliorer pour obtenir toutes les étoiles la prochaine fois ?","conversation-rating.overlay.bot-message.rate-feedback.value-5":"Parfait ! Alors j'espère pouvoir vous conseiller aussi bien une fois de plus.","conversation-rating.overlay.bot-message.submit-feedback":"Merci beaucoup pour votre feed-back. Je m'efforce de m'améliorer en permanence.","conversation-rating.overlay.action.submit":"Envoyer","conversation-rating.overlay.action.back-to-chat":"Fermer","conversation-rating.overlay.action.close-chat":"Minimiser le chat","conversation-rating.overlay.action.restart-chat":"Redémarrer le chat","conversation-rating.overlay.action.cancel":"Annuler","start-screen.intro":"","start-screen.start-chat":"Démarrer le chat","start-screen.waiting-for-login":"En attente de connexion ...","header.close-chat":"Minimiser le chat","header.menu.title":"Menu","header.menu.restart-chat":"Redémarrer le chat","header.menu.expand-chat-window":"Agrandir la fenêtre","header.menu.download-transcript":"Télécharger l'historique du chat","header.menu.send-transcript":"Envoyer l'historique du chat","header.menu.export-transcript":"Exporter l'historique du chat","header.menu.rate-conversation":"Évaluer le chat","source-infos.close":"Fermer","source-infos.open-source":"Ouvrir source","source-infos.error.title":"Erreur","source-infos.error.info":"Oups ! Quelque chose s'est mal passé. Merci de réessayer ou de contacter le support si le problème persiste.","source-infos.highlight-loading.title":"Contenus pertinents en surbrillance...","source-infos.highlight-loading.description":"Un instant - la source est analysée","commands.show-more.action":"Plus","commands.show-more.tooltip":"Afficher plus de commandes","commands.show-less.action":"Moins","commands.show-less.tooltip":"Afficher moins de commandes"},it={"page.title":"Bubble Chat Chatbot","message-input-label":"Input dell'utente","message-input-placeholder":"Inserire un messaggio","message-input.actions.submit.label":"Invia messaggio","message-input.actions.start-audio-recording.label":"Avviare l'input vocale","message-input.actions.stop-audio-recording.label":"Interrompere l'input vocale","message-input.actions.submit-audio-recording.label":"Trasmettere l'input vocale","message-input.actions.command.label":"Esegui azione","guest-bubble.label":"Il tuo messaggio","bot-bubble.label":"Messaggio del chatbot","bot-bubble.actions.label":"Azioni del messaggio","bot-bubble.reaction.good":"Mi piace","bot-bubble.reaction.bad":"Non mi piace","bot-bubble.reaction.remove":"Rimuovere il marcatore","bot-bubble.reaction.say-more":"Disci più, per favore","bot-bubble.reaction.category.WRONG_INFORMATION":"Errate","bot-bubble.reaction.category.MISSING_INFORMATION":"Incompleto","bot-bubble.reaction.category.OLD_INFORMATION":"Obsoleta","bot-bubble.reaction.category.UNCLEAR":"Poco chiaro","bot-bubble.reaction.category.OFF_TOPIC":"Non pertinente alla domanda","bot-bubble.reaction.comment":"Condividete con noi i vostri pensieri...","bot-bubble.reaction.close":"Chiudere","bot-bubble.copy":"Copia","bot-bubble.sources":"Elenco delle fonti","bot-bubble.source.open":"Fonte aperta","bot-bubble.footnote":"Nota a piè di pagina","agent-bubble.label":"Messaggio dell'agente dal vivo","conversation.label":"Cronologia chat","chatbot.typing":"Il chatbot sta scrivendo","export-transcript.email.title":"Ricevere la cronologia della chat","export-transcript.email.description":"Inserire l'indirizzo e-mail a cui inviare la cronologia della chat.","export-transcript.email.cancel":"Annulla","export-transcript.email.send":"Invia","export-transcript.email.placeholder":"E-mail","export-transcript.email.invalid":"Inserire un indirizzo e-mail valido.","export-transcript.email.success":"La cronologia della chat è stata inviata all'indirizzo e-mail fornito.","general-conditions.header":"**Condizioni di utilizzo**","general-conditions.body":`Si prega di considerare i seguenti punti:
131
+
132
+ - La cronologia delle chat è memorizzata nell'area UE e può essere visualizzata solo da persone autorizzate.
133
+ - 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.back-to-chat":"Chiudere","conversation-rating.overlay.action.close-chat":"Minimizzare la chat","conversation-rating.overlay.action.restart-chat":"Riavviare la chat","conversation-rating.overlay.action.cancel":"Annulla","start-screen.intro":"","start-screen.start-chat":"Avviare la chat","start-screen.waiting-for-login":"In attesa di login ...","header.close-chat":"Minimizzare la chat","header.menu.title":"Menu","header.menu.restart-chat":"Riavviare la chat","header.menu.expand-chat-window":"Espandere la finestra","header.menu.download-transcript":"Scaricare la trascrizione","header.menu.send-transcript":"Inviare la trascrizione","header.menu.export-transcript":"Esportare la trascrizione","header.menu.rate-conversation":"Valutare la conversazione","source-infos.close":"Chiudere","source-infos.open-source":"Fonte aperta","source-infos.error.title":"Errore","source-infos.error.info":"Ops! Qualcosa è andato storto. Riprovare o contattare l'assistenza se il problema persiste.","source-infos.highlight-loading.title":"Il contenuto rilevante è evidenziato...","source-infos.highlight-loading.description":"Un momento - la fonte è in fase di analisi","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"},supportedLocales=["de","en","fr","it"],initialState$3={locale:"de",messages:de},mergeMessages=(n,i)=>{if(supportedLocales.includes(n)){const o=getMessagesByLanguage(n),u=flattenObject(i);return{...o,...u}}return i},getMessagesByLanguage=n=>{switch(n.toString()){case"en":return en;case"fr":return fr;case"it":return it;default:return de}},backendConnectionReducer=(n=initialState$2,i)=>{switch(i.type){case CONNECTING:return Object.assign({},n,{connectionState:ConnectionStateEnum.CONNECTING});case CONNECTED:return Object.assign({},n,{connectionState:ConnectionStateEnum.CONNECTED});case DISCONNECTED:return Object.assign({},n,{connectionState:ConnectionStateEnum.DISCONNECTED});case RECONNECTED:return Object.assign({},n,{connectionState:ConnectionStateEnum.RECONNECTED});case RESTORE_SESSION_ID:return Object.assign({},n,{sessionId:i.sessionId});case START:return Object.assign({},n,{sessionId:i.payload.sessionId,userId:i.payload.userId});case TERMINATE_SESSION:return Object.assign({},n,{sessionId:void 0});default:return n}},initialState$2={connectionState:ConnectionStateEnum.DISCONNECTED,sessionId:void 0,userId:void 0,queryString:window.location.search},chatReducer=(n=initialState$1,i)=>{switch(i.type){case RESET_CHAT_STATE:return initialState$1;case START:return sendToParentPage({type:"webclient.chat.started"}),n;case TERMINATE_SESSION:return sendToParentPage({type:"webclient.chat.ended"}),n;case TYPING_ON:return Object.assign({},n,{isBotTyping:!0});case TYPING_OFF:return Object.assign({},n,{isBotTyping:!1});case MESSAGE_FROM_GUEST:case MESSAGE_WITHOUT_ANALYSIS_FROM_GUEST:return appendMessageFromGuestToState(n,i.message);case MESSAGE_TO_GUEST:{sendToParentPage(i);const o=Object.assign({},i.message,{_id:i.meta.actionId}),u=n.messages.filter(h=>h._id===i.meta.actionId).length>0;return Object.assign({},n,{isBotTyping:!1,messages:u?n.messages:n.messages.concat([o]),quickReplies:o.quickReplies?o.quickReplies:[]})}case RESTORE_PREVIOUS_CHAT_MESSAGES:{const o=i.messages,u=o.length?o[o.length-1]:void 0;return Object.assign({},n,{isBotTyping:!1,messages:o,quickReplies:u?.quickReplies||[]})}case MESSAGE_TO_PARENT_PAGE:return sendToParentPage(i.message),n;case EVENT_TO_GUEST:return sendToParentPage(i.event),n;case DRAWER_OPEN:return Object.assign({},n,{drawerContentUrl:i.payload.parameters.contentUrl});case DRAWER_CLOSE:return Object.assign({},n,{drawerContentUrl:void 0});case GUEST_LOCALE_CHANGED:return Object.assign({},n,{locale:i.payload.locale});case EXPAND_WINDOW:return sendToParentPage(i),n;case CLOSE_WINDOW:return sendToParentPage(i),{...n,conversationRating:{...n.conversationRating,opener:void 0}};case RECEIVE_SPEECH_TRANSCRIPTION:{const o=new TextMessage$1(i.transcription,new GuestUser),u=Object.assign({},o,{_id:v4()});return appendMessageFromGuestToState(n,u)}case TRANSCRIPT_ITEM_GUEST_REACTION:{const o=n.messages.map(u=>u._id===i.payload.actionId?Object.assign({},u,i.payload.reaction?{reaction:{type:i.payload.reaction,category:i.payload.category,comment:i.payload.comment}}:{reaction:void 0}):u);return Object.assign({},n,{messages:o})}case ENABLE_CONVERSATION_RATING:{const o={enabled:!0,rating:i.payload.rating};return Object.assign({},n,{conversationRating:o})}case CONVERSATION_RATING_FROM_GUEST:{const o={...n.conversationRating,rating:i.payload};return Object.assign({},n,{conversationRating:o})}case SHOW_CONVERSATION_RATING_OVERLAY:{const o={...n.conversationRating,opener:i.payload.opener,...i.payload.defaultRating?{rating:{value:i.payload.defaultRating,feedback:n.conversationRating.rating?.feedback||""}}:{}};return Object.assign({},n,{conversationRating:o})}case HIDE_CONVERSATION_RATING_OVERLAY:{const o={...n.conversationRating,opener:void 0};return Object.assign({},n,{conversationRating:o})}case LOAD_SOURCE_INFOS_REQUEST:return{...n,sourceInfos:{type:"loading",chunkId:i.payload.chunkId}};case LOAD_SOURCE_INFOS_ERROR:{const{highlighted:o}=i.payload;return n.sourceInfos?.type==="loaded"&&o?{...n,sourceInfos:{...n.sourceInfos,highlighted:!0}}:{...n,sourceInfos:{type:"loading-error"}}}case LOAD_SOURCE_INFOS_RESPONSE:{const o=n.sourceInfos?.type,{chunkId:u,knowledgeBaseType:h,title:m,content:y,highlighted:_,url:v}=i.payload,E=n.sourceInfos?.type==="loading"||n.sourceInfos?.type==="loaded"?n.sourceInfos?.chunkId:void 0;return E&&E!==u?n:o==="loading"||o==="loaded"&&_?{...n,sourceInfos:{type:"loaded",chunkId:u,knowledgeBaseType:h,title:m,content:y,highlighted:_,url:v}}:n}case CLOSE_SOURCE_INFOS:return{...n,sourceInfos:void 0};case TOGGLE_TRANSCRIPT_MAIL_OVERLAY:return{...n,showTranscriptMailOverlay:!n.showTranscriptMailOverlay,conversationRating:{...n.conversationRating,opener:void 0}};default:return n}},appendMessageFromGuestToState=(n,i)=>{const o=n.messages[n.messages.length-1],u=o?.text===i.text;return o&&o.sender.type===i.sender.type&&u?n:Object.assign({},n,{messages:n.messages.concat([i]),quickReplies:[]})},sendToParentPage=n=>{isIframe()?window.top?.postMessage(n,"*"):n.type==="webclient.change.url"&&window.open(n.url)},isIframe=()=>typeof window<"u"&&window.self!==window.top,initialState$1={messages:[],quickReplies:[],isBotTyping:!1,showTranscriptMailOverlay:!1,conversationRating:{enabled:!1}},counterSlice=createSlice({name:"intl",initialState:initialState$3,reducers:{updateIntl:(n,i)=>{n.locale=i.payload.language,n.messages=i.payload.messages}}}),{updateIntl}=counterSlice.actions,intlReducer=counterSlice.reducer,initialState={version:void 0,requiresUserAuthentication:!1,enableStartScreen:void 0,enableStandaloneView:!1,enableTranscriptExportEmail:!1,enableTranscriptExportPdf:!1,enableGeneralConditions:!1,enableSpeechSupport:!1,commands:[],menuItems:[]},settingsSlice=createSlice({name:"settings",initialState,reducers:{setSettings(n,i){n.version&&n.version!==i.payload.version?(console.log("version changed, reloading chat window"),window.location.reload()):(n.version=i.payload.version,n.requiresUserAuthentication=i.payload.requiresUserAuthentication,n.enableStartScreen=i.payload.enableStartScreen,n.enableStandaloneView=i.payload.enableStandaloneView,n.enableTranscriptExportEmail=i.payload.enableTranscriptExportEmail,n.enableTranscriptExportPdf=i.payload.enableTranscriptExportPdf,n.enableGeneralConditions=i.payload.enableGeneralConditions,n.enableSpeechSupport=i.payload.enableSpeechSupport,n.commands=i.payload.commands,n.menuItems=i.payload.menuItems||[])}}}),{setSettings}=settingsSlice.actions,settingsSlice$1=settingsSlice.reducer,rootReducer=combineReducers({settings:settingsSlice$1,chat:chatReducer,startScreen:startScreenReducer,connection:backendConnectionReducer,intl:intlReducer}),LOCAL_STORAGE_ITEM_PREFIX="bubble-chat",LOCAL_STORAGE_LAST_SAVED_ITEM_NAME="state-last-saved-at",LOCAL_STORAGE_STATE_ITEM_NAME="state",loadState=n=>{try{if(!supportsLocalStorage())return;const i=getStoreItem(n,LOCAL_STORAGE_LAST_SAVED_ITEM_NAME);if(isExpired(i))return;{const o=getStoreItem(n,LOCAL_STORAGE_STATE_ITEM_NAME);if(o===null)return;const u=JSON.parse(o),h=u.connection?.queryString;if(h!==void 0&&!queryStringsMatchIgnoringReferrer(h,window.location.search)){console.log("Ignoring persisted state due to different query string");return}else return u}}catch(i){console.error(i);return}},saveState=(n,i)=>{try{const o=JSON.stringify(i);setStoreItem(n,LOCAL_STORAGE_STATE_ITEM_NAME,o);const u=new Date().toISOString();setStoreItem(n,LOCAL_STORAGE_LAST_SAVED_ITEM_NAME,u)}catch(o){console.error(o)}},isExpired=n=>{if(n===null)return!1;const i=new Date(n);return i.setHours(i.getHours()+12),new Date>i},supportsLocalStorage=()=>typeof localStorage<"u",getStoreItem=(n,i)=>{const o=getStoreItemName(n,i);return localStorage.getItem(o)},setStoreItem=(n,i,o)=>{const u=getStoreItemName(n,i);return localStorage.setItem(u,o)},getStoreItemName=(n,i)=>`${LOCAL_STORAGE_ITEM_PREFIX}-${n}-${i}`,queryStringsMatchIgnoringReferrer=(n,i)=>{const o=new URLSearchParams(n),u=new URLSearchParams(i);o.delete("referrer"),u.delete("referrer");const h=Array.from(o.entries()).sort(),m=Array.from(u.entries()).sort();return h.length!==m.length?!1:h.every(([y,_],v)=>{const[E,S]=m[v];return y===E&&_===S})},PACKET_TYPES=Object.create(null);PACKET_TYPES.open="0";PACKET_TYPES.close="1";PACKET_TYPES.ping="2";PACKET_TYPES.pong="3";PACKET_TYPES.message="4";PACKET_TYPES.upgrade="5";PACKET_TYPES.noop="6";const PACKET_TYPES_REVERSE=Object.create(null);Object.keys(PACKET_TYPES).forEach(n=>{PACKET_TYPES_REVERSE[PACKET_TYPES[n]]=n});const ERROR_PACKET={type:"error",data:"parser error"},withNativeBlob$1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",withNativeArrayBuffer$2=typeof ArrayBuffer=="function",isView$1=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,encodePacket=({type:n,data:i},o,u)=>withNativeBlob$1&&i instanceof Blob?o?u(i):encodeBlobAsBase64(i,u):withNativeArrayBuffer$2&&(i instanceof ArrayBuffer||isView$1(i))?o?u(i):encodeBlobAsBase64(new Blob([i]),u):u(PACKET_TYPES[n]+(i||"")),encodeBlobAsBase64=(n,i)=>{const o=new FileReader;return o.onload=function(){const u=o.result.split(",")[1];i("b"+(u||""))},o.readAsDataURL(n)};function toArray(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let TEXT_ENCODER;function encodePacketToBinary(n,i){if(withNativeBlob$1&&n.data instanceof Blob)return n.data.arrayBuffer().then(toArray).then(i);if(withNativeArrayBuffer$2&&(n.data instanceof ArrayBuffer||isView$1(n.data)))return i(toArray(n.data));encodePacket(n,!1,o=>{TEXT_ENCODER||(TEXT_ENCODER=new TextEncoder),i(TEXT_ENCODER.encode(o))})}const chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lookup$1=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<chars.length;n++)lookup$1[chars.charCodeAt(n)]=n;const decode$1=n=>{let i=n.length*.75,o=n.length,u,h=0,m,y,_,v;n[n.length-1]==="="&&(i--,n[n.length-2]==="="&&i--);const E=new ArrayBuffer(i),S=new Uint8Array(E);for(u=0;u<o;u+=4)m=lookup$1[n.charCodeAt(u)],y=lookup$1[n.charCodeAt(u+1)],_=lookup$1[n.charCodeAt(u+2)],v=lookup$1[n.charCodeAt(u+3)],S[h++]=m<<2|y>>4,S[h++]=(y&15)<<4|_>>2,S[h++]=(_&3)<<6|v&63;return E},withNativeArrayBuffer$1=typeof ArrayBuffer=="function",decodePacket=(n,i)=>{if(typeof n!="string")return{type:"message",data:mapBinary(n,i)};const o=n.charAt(0);return o==="b"?{type:"message",data:decodeBase64Packet(n.substring(1),i)}:PACKET_TYPES_REVERSE[o]?n.length>1?{type:PACKET_TYPES_REVERSE[o],data:n.substring(1)}:{type:PACKET_TYPES_REVERSE[o]}:ERROR_PACKET},decodeBase64Packet=(n,i)=>{if(withNativeArrayBuffer$1){const o=decode$1(n);return mapBinary(o,i)}else return{base64:!0,data:n}},mapBinary=(n,i)=>i==="blob"?n instanceof Blob?n:new Blob([n]):n instanceof ArrayBuffer?n:n.buffer,SEPARATOR="",encodePayload=(n,i)=>{const o=n.length,u=new Array(o);let h=0;n.forEach((m,y)=>{encodePacket(m,!1,_=>{u[y]=_,++h===o&&i(u.join(SEPARATOR))})})},decodePayload=(n,i)=>{const o=n.split(SEPARATOR),u=[];for(let h=0;h<o.length;h++){const m=decodePacket(o[h],i);if(u.push(m),m.type==="error")break}return u};function createPacketEncoderStream(){return new TransformStream({transform(n,i){encodePacketToBinary(n,o=>{const u=o.length;let h;if(u<126)h=new Uint8Array(1),new DataView(h.buffer).setUint8(0,u);else if(u<65536){h=new Uint8Array(3);const m=new DataView(h.buffer);m.setUint8(0,126),m.setUint16(1,u)}else{h=new Uint8Array(9);const m=new DataView(h.buffer);m.setUint8(0,127),m.setBigUint64(1,BigInt(u))}n.data&&typeof n.data!="string"&&(h[0]|=128),i.enqueue(h),i.enqueue(o)})}})}let TEXT_DECODER;function totalLength(n){return n.reduce((i,o)=>i+o.length,0)}function concatChunks(n,i){if(n[0].length===i)return n.shift();const o=new Uint8Array(i);let u=0;for(let h=0;h<i;h++)o[h]=n[0][u++],u===n[0].length&&(n.shift(),u=0);return n.length&&u<n[0].length&&(n[0]=n[0].slice(u)),o}function createPacketDecoderStream(n,i){TEXT_DECODER||(TEXT_DECODER=new TextDecoder);const o=[];let u=0,h=-1,m=!1;return new TransformStream({transform(y,_){for(o.push(y);;){if(u===0){if(totalLength(o)<1)break;const v=concatChunks(o,1);m=(v[0]&128)===128,h=v[0]&127,h<126?u=3:h===126?u=1:u=2}else if(u===1){if(totalLength(o)<2)break;const v=concatChunks(o,2);h=new DataView(v.buffer,v.byteOffset,v.length).getUint16(0),u=3}else if(u===2){if(totalLength(o)<8)break;const v=concatChunks(o,8),E=new DataView(v.buffer,v.byteOffset,v.length),S=E.getUint32(0);if(S>Math.pow(2,21)-1){_.enqueue(ERROR_PACKET);break}h=S*Math.pow(2,32)+E.getUint32(4),u=3}else{if(totalLength(o)<h)break;const v=concatChunks(o,h);_.enqueue(decodePacket(m?v:TEXT_DECODER.decode(v),i)),u=0}if(h===0||h>n){_.enqueue(ERROR_PACKET);break}}}})}const protocol=4;function Emitter(n){if(n)return mixin(n)}function mixin(n){for(var i in Emitter.prototype)n[i]=Emitter.prototype[i];return n}Emitter.prototype.on=Emitter.prototype.addEventListener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this};Emitter.prototype.once=function(n,i){function o(){this.off(n,o),i.apply(this,arguments)}return o.fn=i,this.on(n,o),this};Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(n,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var o=this._callbacks["$"+n];if(!o)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var u,h=0;h<o.length;h++)if(u=o[h],u===i||u.fn===i){o.splice(h,1);break}return o.length===0&&delete this._callbacks["$"+n],this};Emitter.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),o=this._callbacks["$"+n],u=1;u<arguments.length;u++)i[u-1]=arguments[u];if(o){o=o.slice(0);for(var u=0,h=o.length;u<h;++u)o[u].apply(this,i)}return this};Emitter.prototype.emitReserved=Emitter.prototype.emit;Emitter.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};Emitter.prototype.hasListeners=function(n){return!!this.listeners(n).length};const nextTick=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,o)=>o(i,0),globalThisShim=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),defaultBinaryType="arraybuffer";function createCookieJar(){}function pick(n,...i){return i.reduce((o,u)=>(n.hasOwnProperty(u)&&(o[u]=n[u]),o),{})}const NATIVE_SET_TIMEOUT=globalThisShim.setTimeout,NATIVE_CLEAR_TIMEOUT=globalThisShim.clearTimeout;function installTimerFunctions(n,i){i.useNativeTimers?(n.setTimeoutFn=NATIVE_SET_TIMEOUT.bind(globalThisShim),n.clearTimeoutFn=NATIVE_CLEAR_TIMEOUT.bind(globalThisShim)):(n.setTimeoutFn=globalThisShim.setTimeout.bind(globalThisShim),n.clearTimeoutFn=globalThisShim.clearTimeout.bind(globalThisShim))}const BASE64_OVERHEAD=1.33;function byteLength(n){return typeof n=="string"?utf8Length(n):Math.ceil((n.byteLength||n.size)*BASE64_OVERHEAD)}function utf8Length(n){let i=0,o=0;for(let u=0,h=n.length;u<h;u++)i=n.charCodeAt(u),i<128?o+=1:i<2048?o+=2:i<55296||i>=57344?o+=3:(u++,o+=4);return o}function randomString(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function encode(n){let i="";for(let o in n)n.hasOwnProperty(o)&&(i.length&&(i+="&"),i+=encodeURIComponent(o)+"="+encodeURIComponent(n[o]));return i}function decode(n){let i={},o=n.split("&");for(let u=0,h=o.length;u<h;u++){let m=o[u].split("=");i[decodeURIComponent(m[0])]=decodeURIComponent(m[1])}return i}class TransportError extends Error{constructor(i,o,u){super(i),this.description=o,this.context=u,this.type="TransportError"}}class Transport extends Emitter{constructor(i){super(),this.writable=!1,installTimerFunctions(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,o,u){return super.emitReserved("error",new TransportError(i,o,u)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const o=decodePacket(i,this.socket.binaryType);this.onPacket(o)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,o={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(o)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const o=encode(i);return o.length?"?"+o:""}}class Polling extends Transport{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const o=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let u=0;this._polling&&(u++,this.once("pollComplete",function(){--u||o()})),this.writable||(u++,this.once("drain",function(){--u||o()}))}else o()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const o=u=>{if(this.readyState==="opening"&&u.type==="open"&&this.onOpen(),u.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(u)};decodePayload(i,this.socket.binaryType).forEach(o),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,encodePayload(i,o=>{this.doWrite(o,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",o=this.query||{};return this.opts.timestampRequests!==!1&&(o[this.opts.timestampParam]=randomString()),!this.supportsBinary&&!o.sid&&(o.b64=1),this.createUri(i,o)}}let value=!1;try{value=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch(n){}const hasCORS=value;function empty(){}class BaseXHR extends Polling{constructor(i){if(super(i),typeof location<"u"){const o=location.protocol==="https:";let u=location.port;u||(u=o?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||u!==i.port}}doWrite(i,o){const u=this.request({method:"POST",data:i});u.on("success",o),u.on("error",(h,m)=>{this.onError("xhr post error",h,m)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(o,u)=>{this.onError("xhr poll error",o,u)}),this.pollXhr=i}}class Request extends Emitter{constructor(i,o,u){super(),this.createRequest=i,installTimerFunctions(this,u),this._opts=u,this._method=u.method||"GET",this._uri=o,this._data=u.data!==void 0?u.data:null,this._create()}_create(){var i;const o=pick(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");o.xdomain=!!this._opts.xd;const u=this._xhr=this.createRequest(o);try{u.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){u.setDisableHeaderCheck&&u.setDisableHeaderCheck(!0);for(let h in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(h)&&u.setRequestHeader(h,this._opts.extraHeaders[h])}}catch{}if(this._method==="POST")try{u.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{u.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(u),"withCredentials"in u&&(u.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(u.timeout=this._opts.requestTimeout),u.onreadystatechange=()=>{var h;u.readyState===3&&((h=this._opts.cookieJar)===null||h===void 0||h.parseCookies(u.getResponseHeader("set-cookie"))),u.readyState===4&&(u.status===200||u.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof u.status=="number"?u.status:0)},0))},u.send(this._data)}catch(h){this.setTimeoutFn(()=>{this._onError(h)},0);return}typeof document<"u"&&(this._index=Request.requestsCount++,Request.requests[this._index]=this)}_onError(i){this.emitReserved("error",i,this._xhr),this._cleanup(!0)}_cleanup(i){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=empty,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Request.requests[this._index],this._xhr=null}}_onLoad(){const i=this._xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Request.requestsCount=0;Request.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",unloadHandler);else if(typeof addEventListener=="function"){const n="onpagehide"in globalThisShim?"pagehide":"unload";addEventListener(n,unloadHandler,!1)}}function unloadHandler(){for(let n in Request.requests)Request.requests.hasOwnProperty(n)&&Request.requests[n].abort()}const hasXHR2=(function(){const n=newRequest({xdomain:!1});return n&&n.responseType!==null})();class XHR extends BaseXHR{constructor(i){super(i);const o=i&&i.forceBase64;this.supportsBinary=hasXHR2&&!o}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new Request(newRequest,this.uri(),i)}}function newRequest(n){const i=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||hasCORS))return new XMLHttpRequest}catch{}if(!i)try{return new globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const isReactNative=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class BaseWS extends Transport{get name(){return"websocket"}doOpen(){const i=this.uri(),o=this.opts.protocols,u=isReactNative?{}:pick(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(u.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,o,u)}catch(h){return this.emitReserved("error",h)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let o=0;o<i.length;o++){const u=i[o],h=o===i.length-1;encodePacket(u,this.supportsBinary,m=>{try{this.doWrite(u,m)}catch{}h&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",o=this.query||{};return this.opts.timestampRequests&&(o[this.opts.timestampParam]=randomString()),this.supportsBinary||(o.b64=1),this.createUri(i,o)}}const WebSocketCtor=globalThisShim.WebSocket||globalThisShim.MozWebSocket;class WS extends BaseWS{createSocket(i,o,u){return isReactNative?new WebSocketCtor(i,o,u):o?new WebSocketCtor(i,o):new WebSocketCtor(i)}doWrite(i,o){this.ws.send(o)}}class WT extends Transport{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(i){return this.emitReserved("error",i)}this._transport.closed.then(()=>{this.onClose()}).catch(i=>{this.onError("webtransport error",i)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(i=>{const o=createPacketDecoderStream(Number.MAX_SAFE_INTEGER,this.socket.binaryType),u=i.readable.pipeThrough(o).getReader(),h=createPacketEncoderStream();h.readable.pipeTo(i.writable),this._writer=h.writable.getWriter();const m=()=>{u.read().then(({done:_,value:v})=>{_||(this.onPacket(v),m())}).catch(_=>{})};m();const y={type:"open"};this.query.sid&&(y.data=`{"sid":"${this.query.sid}"}`),this._writer.write(y).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let o=0;o<i.length;o++){const u=i[o],h=o===i.length-1;this._writer.write(u).then(()=>{h&&nextTick(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const transports={websocket:WS,webtransport:WT,polling:XHR},re=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,parts=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function parse(n){if(n.length>8e3)throw"URI too long";const i=n,o=n.indexOf("["),u=n.indexOf("]");o!=-1&&u!=-1&&(n=n.substring(0,o)+n.substring(o,u).replace(/:/g,";")+n.substring(u,n.length));let h=re.exec(n||""),m={},y=14;for(;y--;)m[parts[y]]=h[y]||"";return o!=-1&&u!=-1&&(m.source=i,m.host=m.host.substring(1,m.host.length-1).replace(/;/g,":"),m.authority=m.authority.replace("[","").replace("]","").replace(/;/g,":"),m.ipv6uri=!0),m.pathNames=pathNames(m,m.path),m.queryKey=queryKey(m,m.query),m}function pathNames(n,i){const o=/\/{2,9}/g,u=i.replace(o,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&u.splice(0,1),i.slice(-1)=="/"&&u.splice(u.length-1,1),u}function queryKey(n,i){const o={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(u,h,m){h&&(o[h]=m)}),o}const withEventListeners=typeof addEventListener=="function"&&typeof removeEventListener=="function",OFFLINE_EVENT_LISTENERS=[];withEventListeners&&addEventListener("offline",()=>{OFFLINE_EVENT_LISTENERS.forEach(n=>n())},!1);class SocketWithoutUpgrade extends Emitter{constructor(i,o){if(super(),this.binaryType=defaultBinaryType,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(o=i,i=null),i){const u=parse(i);o.hostname=u.host,o.secure=u.protocol==="https"||u.protocol==="wss",o.port=u.port,u.query&&(o.query=u.query)}else o.host&&(o.hostname=parse(o.host).host);installTimerFunctions(this,o),this.secure=o.secure!=null?o.secure:typeof location<"u"&&location.protocol==="https:",o.hostname&&!o.port&&(o.port=this.secure?"443":"80"),this.hostname=o.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=o.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},o.transports.forEach(u=>{const h=u.prototype.name;this.transports.push(h),this._transportsByName[h]=u}),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},o),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=decode(this.opts.query)),withEventListeners&&(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"})},OFFLINE_EVENT_LISTENERS.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const o=Object.assign({},this.opts.query);o.EIO=protocol,o.transport=i,this.id&&(o.sid=this.id);const u=Object.assign({},this.opts,{query:o,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](u)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&SocketWithoutUpgrade.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const o=this.createTransport(i);o.open(),this.setTransport(o)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",o=>this._onClose("transport close",o))}onOpen(){this.readyState="open",SocketWithoutUpgrade.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const o=new Error("server error");o.code=i.data,this._onError(o);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this._pingInterval=i.pingInterval,this._pingTimeout=i.pingTimeout,this._maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const i=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+i,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},i),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 i=this._getWritablePackets();this.transport.send(i),this._prevBufferLen=i.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let o=1;for(let u=0;u<this.writeBuffer.length;u++){const h=this.writeBuffer[u].data;if(h&&(o+=byteLength(h)),u>0&&o>this._maxPayload)return this.writeBuffer.slice(0,u);o+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,nextTick(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,o,u){return this._sendPacket("message",i,o,u),this}send(i,o,u){return this._sendPacket("message",i,o,u),this}_sendPacket(i,o,u,h){if(typeof o=="function"&&(h=o,o=void 0),typeof u=="function"&&(h=u,u=null),this.readyState==="closing"||this.readyState==="closed")return;u=u||{},u.compress=u.compress!==!1;const m={type:i,data:o,options:u};this.emitReserved("packetCreate",m),this.writeBuffer.push(m),h&&this.once("flush",h),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},o=()=>{this.off("upgrade",o),this.off("upgradeError",o),i()},u=()=>{this.once("upgrade",o),this.once("upgradeError",o)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?u():i()}):this.upgrading?u():i()),this}_onError(i){if(SocketWithoutUpgrade.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",i),this._onClose("transport error",i)}_onClose(i,o){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(),withEventListeners&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const u=OFFLINE_EVENT_LISTENERS.indexOf(this._offlineEventListener);u!==-1&&OFFLINE_EVENT_LISTENERS.splice(u,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,o),this.writeBuffer=[],this._prevBufferLen=0}}}SocketWithoutUpgrade.protocol=protocol;class SocketWithUpgrade extends SocketWithoutUpgrade{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let i=0;i<this._upgrades.length;i++)this._probe(this._upgrades[i])}_probe(i){let o=this.createTransport(i),u=!1;SocketWithoutUpgrade.priorWebsocketSuccess=!1;const h=()=>{u||(o.send([{type:"ping",data:"probe"}]),o.once("packet",w=>{if(!u)if(w.type==="pong"&&w.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",o),!o)return;SocketWithoutUpgrade.priorWebsocketSuccess=o.name==="websocket",this.transport.pause(()=>{u||this.readyState!=="closed"&&(S(),this.setTransport(o),o.send([{type:"upgrade"}]),this.emitReserved("upgrade",o),o=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=o.name,this.emitReserved("upgradeError",T)}}))};function m(){u||(u=!0,S(),o.close(),o=null)}const y=w=>{const T=new Error("probe error: "+w);T.transport=o.name,m(),this.emitReserved("upgradeError",T)};function _(){y("transport closed")}function v(){y("socket closed")}function E(w){o&&w.name!==o.name&&m()}const S=()=>{o.removeListener("open",h),o.removeListener("error",y),o.removeListener("close",_),this.off("close",v),this.off("upgrading",E)};o.once("open",h),o.once("error",y),o.once("close",_),this.once("close",v),this.once("upgrading",E),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{u||o.open()},200):o.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const o=[];for(let u=0;u<i.length;u++)~this.transports.indexOf(i[u])&&o.push(i[u]);return o}}let Socket$1=class extends SocketWithUpgrade{constructor(i,o={}){const u=typeof i=="object"?i:o;(!u.transports||u.transports&&typeof u.transports[0]=="string")&&(u.transports=(u.transports||["polling","websocket","webtransport"]).map(h=>transports[h]).filter(h=>!!h)),super(i,u)}};function url(n,i="",o){let u=n;o=o||typeof location<"u"&&location,n==null&&(n=o.protocol+"//"+o.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=o.protocol+n:n=o.host+n),/^(https?|wss?):\/\//.test(n)||(typeof o<"u"?n=o.protocol+"//"+n:n="https://"+n),u=parse(n)),u.port||(/^(http|ws)$/.test(u.protocol)?u.port="80":/^(http|ws)s$/.test(u.protocol)&&(u.port="443")),u.path=u.path||"/";const m=u.host.indexOf(":")!==-1?"["+u.host+"]":u.host;return u.id=u.protocol+"://"+m+":"+u.port+i,u.href=u.protocol+"://"+m+(o&&o.port===u.port?"":":"+u.port),u}const withNativeArrayBuffer=typeof ArrayBuffer=="function",isView=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,toString=Object.prototype.toString,withNativeBlob=typeof Blob=="function"||typeof Blob<"u"&&toString.call(Blob)==="[object BlobConstructor]",withNativeFile=typeof File=="function"||typeof File<"u"&&toString.call(File)==="[object FileConstructor]";function isBinary(n){return withNativeArrayBuffer&&(n instanceof ArrayBuffer||isView(n))||withNativeBlob&&n instanceof Blob||withNativeFile&&n instanceof File}function hasBinary(n,i){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let o=0,u=n.length;o<u;o++)if(hasBinary(n[o]))return!0;return!1}if(isBinary(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return hasBinary(n.toJSON(),!0);for(const o in n)if(Object.prototype.hasOwnProperty.call(n,o)&&hasBinary(n[o]))return!0;return!1}function deconstructPacket(n){const i=[],o=n.data,u=n;return u.data=_deconstructPacket(o,i),u.attachments=i.length,{packet:u,buffers:i}}function _deconstructPacket(n,i){if(!n)return n;if(isBinary(n)){const o={_placeholder:!0,num:i.length};return i.push(n),o}else if(Array.isArray(n)){const o=new Array(n.length);for(let u=0;u<n.length;u++)o[u]=_deconstructPacket(n[u],i);return o}else if(typeof n=="object"&&!(n instanceof Date)){const o={};for(const u in n)Object.prototype.hasOwnProperty.call(n,u)&&(o[u]=_deconstructPacket(n[u],i));return o}return n}function reconstructPacket(n,i){return n.data=_reconstructPacket(n.data,i),delete n.attachments,n}function _reconstructPacket(n,i){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<i.length)return i[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let o=0;o<n.length;o++)n[o]=_reconstructPacket(n[o],i);else if(typeof n=="object")for(const o in n)Object.prototype.hasOwnProperty.call(n,o)&&(n[o]=_reconstructPacket(n[o],i));return n}const RESERVED_EVENTS$1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var PacketType;(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"})(PacketType||(PacketType={}));class Encoder{constructor(i){this.replacer=i}encode(i){return(i.type===PacketType.EVENT||i.type===PacketType.ACK)&&hasBinary(i)?this.encodeAsBinary({type:i.type===PacketType.EVENT?PacketType.BINARY_EVENT:PacketType.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let o=""+i.type;return(i.type===PacketType.BINARY_EVENT||i.type===PacketType.BINARY_ACK)&&(o+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(o+=i.nsp+","),i.id!=null&&(o+=i.id),i.data!=null&&(o+=JSON.stringify(i.data,this.replacer)),o}encodeAsBinary(i){const o=deconstructPacket(i),u=this.encodeAsString(o.packet),h=o.buffers;return h.unshift(u),h}}class Decoder extends Emitter{constructor(i){super(),this.reviver=i}add(i){let o;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");o=this.decodeString(i);const u=o.type===PacketType.BINARY_EVENT;u||o.type===PacketType.BINARY_ACK?(o.type=u?PacketType.EVENT:PacketType.ACK,this.reconstructor=new BinaryReconstructor(o),o.attachments===0&&super.emitReserved("decoded",o)):super.emitReserved("decoded",o)}else if(isBinary(i)||i.base64)if(this.reconstructor)o=this.reconstructor.takeBinaryData(i),o&&(this.reconstructor=null,super.emitReserved("decoded",o));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let o=0;const u={type:Number(i.charAt(0))};if(PacketType[u.type]===void 0)throw new Error("unknown packet type "+u.type);if(u.type===PacketType.BINARY_EVENT||u.type===PacketType.BINARY_ACK){const m=o+1;for(;i.charAt(++o)!=="-"&&o!=i.length;);const y=i.substring(m,o);if(y!=Number(y)||i.charAt(o)!=="-")throw new Error("Illegal attachments");u.attachments=Number(y)}if(i.charAt(o+1)==="/"){const m=o+1;for(;++o&&!(i.charAt(o)===","||o===i.length););u.nsp=i.substring(m,o)}else u.nsp="/";const h=i.charAt(o+1);if(h!==""&&Number(h)==h){const m=o+1;for(;++o;){const y=i.charAt(o);if(y==null||Number(y)!=y){--o;break}if(o===i.length)break}u.id=Number(i.substring(m,o+1))}if(i.charAt(++o)){const m=this.tryParse(i.substr(o));if(Decoder.isPayloadValid(u.type,m))u.data=m;else throw new Error("invalid payload")}return u}tryParse(i){try{return JSON.parse(i,this.reviver)}catch{return!1}}static isPayloadValid(i,o){switch(i){case PacketType.CONNECT:return isObject(o);case PacketType.DISCONNECT:return o===void 0;case PacketType.CONNECT_ERROR:return typeof o=="string"||isObject(o);case PacketType.EVENT:case PacketType.BINARY_EVENT:return Array.isArray(o)&&(typeof o[0]=="number"||typeof o[0]=="string"&&RESERVED_EVENTS$1.indexOf(o[0])===-1);case PacketType.ACK:case PacketType.BINARY_ACK:return Array.isArray(o)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class BinaryReconstructor{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const o=reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),o}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function isObject(n){return Object.prototype.toString.call(n)==="[object Object]"}const parser=Object.freeze(Object.defineProperty({__proto__:null,Decoder,Encoder,get PacketType(){return PacketType}},Symbol.toStringTag,{value:"Module"}));function on(n,i,o){return n.on(i,o),function(){n.off(i,o)}}const RESERVED_EVENTS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Socket extends Emitter{constructor(i,o,u){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=i,this.nsp=o,u&&u.auth&&(this.auth=u.auth),this._opts=Object.assign({},u),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[on(i,"open",this.onopen.bind(this)),on(i,"packet",this.onpacket.bind(this)),on(i,"error",this.onerror.bind(this)),on(i,"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(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...o){var u,h,m;if(RESERVED_EVENTS.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(o.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(o),this;const y={type:PacketType.EVENT,data:o};if(y.options={},y.options.compress=this.flags.compress!==!1,typeof o[o.length-1]=="function"){const S=this.ids++,w=o.pop();this._registerAckCallback(S,w),y.id=S}const _=(h=(u=this.io.engine)===null||u===void 0?void 0:u.transport)===null||h===void 0?void 0:h.writable,v=this.connected&&!(!((m=this.io.engine)===null||m===void 0)&&m._hasPingExpired());return this.flags.volatile&&!_||(v?(this.notifyOutgoingListeners(y),this.packet(y)):this.sendBuffer.push(y)),this.flags={},this}_registerAckCallback(i,o){var u;const h=(u=this.flags.timeout)!==null&&u!==void 0?u:this._opts.ackTimeout;if(h===void 0){this.acks[i]=o;return}const m=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let _=0;_<this.sendBuffer.length;_++)this.sendBuffer[_].id===i&&this.sendBuffer.splice(_,1);o.call(this,new Error("operation has timed out"))},h),y=(..._)=>{this.io.clearTimeoutFn(m),o.apply(this,_)};y.withError=!0,this.acks[i]=y}emitWithAck(i,...o){return new Promise((u,h)=>{const m=(y,_)=>y?h(y):u(_);m.withError=!0,o.push(m),this.emit(i,...o)})}_addToQueue(i){let o;typeof i[i.length-1]=="function"&&(o=i.pop());const u={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((h,...m)=>(this._queue[0],h!==null?u.tryCount>this._opts.retries&&(this._queue.shift(),o&&o(h)):(this._queue.shift(),o&&o(null,...m)),u.pending=!1,this._drainQueue())),this._queue.push(u),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const o=this._queue[0];o.pending&&!i||(o.pending=!0,o.tryCount++,this.flags=o.flags,this.emit.apply(this,o.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,o){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,o),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(u=>String(u.id)===i)){const u=this.acks[i];delete this.acks[i],u.withError&&u.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case PacketType.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.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 PacketType.EVENT:case PacketType.BINARY_EVENT:this.onevent(i);break;case PacketType.ACK:case PacketType.BINARY_ACK:this.onack(i);break;case PacketType.DISCONNECT:this.ondisconnect();break;case PacketType.CONNECT_ERROR:this.destroy();const u=new Error(i.data.message);u.data=i.data.data,this.emitReserved("connect_error",u);break}}onevent(i){const o=i.data||[];i.id!=null&&o.push(this.ack(i.id)),this.connected?this.emitEvent(o):this.receiveBuffer.push(Object.freeze(o))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const o=this._anyListeners.slice();for(const u of o)u.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const o=this;let u=!1;return function(...h){u||(u=!0,o.packet({type:PacketType.ACK,id:i,data:h}))}}onack(i){const o=this.acks[i.id];typeof o=="function"&&(delete this.acks[i.id],o.withError&&i.data.unshift(null),o.apply(this,i.data))}onconnect(i,o){this.id=i,this.recovered=o&&this._pid===o,this._pid=o,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:PacketType.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const o=this._anyListeners;for(let u=0;u<o.length;u++)if(i===o[u])return o.splice(u,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const o=this._anyOutgoingListeners;for(let u=0;u<o.length;u++)if(i===o[u])return o.splice(u,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const o=this._anyOutgoingListeners.slice();for(const u of o)u.apply(this,i.data)}}}function Backoff(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}Backoff.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),o=Math.floor(i*this.jitter*n);n=(Math.floor(i*10)&1)==0?n-o:n+o}return Math.min(n,this.max)|0};Backoff.prototype.reset=function(){this.attempts=0};Backoff.prototype.setMin=function(n){this.ms=n};Backoff.prototype.setMax=function(n){this.max=n};Backoff.prototype.setJitter=function(n){this.jitter=n};class Manager extends Emitter{constructor(i,o){var u;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(o=i,i=void 0),o=o||{},o.path=o.path||"/socket.io",this.opts=o,installTimerFunctions(this,o),this.reconnection(o.reconnection!==!1),this.reconnectionAttempts(o.reconnectionAttempts||1/0),this.reconnectionDelay(o.reconnectionDelay||1e3),this.reconnectionDelayMax(o.reconnectionDelayMax||5e3),this.randomizationFactor((u=o.randomizationFactor)!==null&&u!==void 0?u:.5),this.backoff=new Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(o.timeout==null?2e4:o.timeout),this._readyState="closed",this.uri=i;const h=o.parser||parser;this.encoder=new h.Encoder,this.decoder=new h.Decoder,this._autoConnect=o.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,i||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var o;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(o=this.backoff)===null||o===void 0||o.setMin(i),this)}randomizationFactor(i){var o;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(o=this.backoff)===null||o===void 0||o.setJitter(i),this)}reconnectionDelayMax(i){var o;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(o=this.backoff)===null||o===void 0||o.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new Socket$1(this.uri,this.opts);const o=this.engine,u=this;this._readyState="opening",this.skipReconnect=!1;const h=on(o,"open",function(){u.onopen(),i&&i()}),m=_=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",_),i?i(_):this.maybeReconnectOnOpen()},y=on(o,"error",m);if(this._timeout!==!1){const _=this._timeout,v=this.setTimeoutFn(()=>{h(),m(new Error("timeout")),o.close()},_);this.opts.autoUnref&&v.unref(),this.subs.push(()=>{this.clearTimeoutFn(v)})}return this.subs.push(h),this.subs.push(y),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(on(i,"ping",this.onping.bind(this)),on(i,"data",this.ondata.bind(this)),on(i,"error",this.onerror.bind(this)),on(i,"close",this.onclose.bind(this)),on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(o){this.onclose("parse error",o)}}ondecoded(i){nextTick(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,o){let u=this.nsps[i];return u?this._autoConnect&&!u.active&&u.connect():(u=new Socket(this,i,o),this.nsps[i]=u),u}_destroy(i){const o=Object.keys(this.nsps);for(const u of o)if(this.nsps[u].active)return;this._close()}_packet(i){const o=this.encoder.encode(i);for(let u=0;u<o.length;u++)this.engine.write(o[u],i.options)}cleanup(){this.subs.forEach(i=>i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(i,o){var u;this.cleanup(),(u=this.engine)===null||u===void 0||u.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,o),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const o=this.backoff.duration();this._reconnecting=!0;const u=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(h=>{h?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",h)):i.onreconnect()}))},o);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const cache={};function lookup(n,i){typeof n=="object"&&(i=n,n=void 0),i=i||{};const o=url(n,i.path||"/socket.io"),u=o.source,h=o.id,m=o.path,y=cache[h]&&m in cache[h].nsps,_=i.forceNew||i["force new connection"]||i.multiplex===!1||y;let v;return _?v=new Manager(u,i):(cache[h]||(cache[h]=new Manager(u,i)),v=cache[h]),o.query&&!i.query&&(i.query=o.queryKey),v.socket(o.path,i)}Object.assign(lookup,{Manager,Socket,io:lookup,connect:lookup});const blacklist=[MESSAGE_TO_GUEST,EVENT_TO_GUEST,TYPING_ON,TYPING_OFF,RESTART_CHAT_REQUEST,...INTERNAL_ACTIONS,...INTERNAL_ACTIONS$1,"@@localize/SET_ACTIVE_LANGUAGE","@@localize/ADD_TRANSLATION_FOR_LANGUAGE"],socketMiddleware=({dispatch:n,getState:i})=>o=>{let u=null;return h=>{const m=o(h);if(h.type===CONNECT){u?.disconnect(),n(connecting());const y=`/chat?${new URLSearchParams(h.querystrings).toString()}`;u=lookup(`/${h.clientName}${y}`),u.on("action",n),u.on("connect",()=>n(connected())),u.on("disconnect",()=>n(disconnected())),u.on("reconnect",()=>n(reconnected())),u.on("set-translations",(_,v)=>{n(updateIntl({language:_,messages:mergeMessages(_,v)}))}),u.on("set-settings",_=>{n(setSettings(_))}),u.on("enable-conversation-rating",_=>n(enableConversationRating(_))),u.on("speech-transcription",_=>n(receiveSpeechTranscription(_))),u.on("restore-client-state",_=>{n(restoreSessionId(_.sessionId)),n(restorePreviousChatMessages(_.messages))}),u.on("expand-window",({devices:_,initial:v=!1})=>{n({type:EXPAND_WINDOW,devices:_,initial:v})}),u.on("restart-chat",()=>{n(restartChat())}),u.on("login-success",_=>{n(startAuthenticatedChat({loginToken:_.loginToken}))})}else if(h.type==="start-screen/requestLogin")u?.emit("login-requested",h.payload);else if(h.type===START)u?.emit("start-chat",h.payload);else if(h.type===TERMINATE_SESSION)u?.emit("terminate-session",h.payload);else if(h.type===GET_STARTED)u?.emit("get-started",JSON.stringify(h));else if(h.type===AUDIO_MESSAGE_FROM_USER)u?.emit("audio-message",h.buffer);else if(h.type===CONVERSATION_RATING_FROM_GUEST)u?.emit("conversation-rating",h.payload);else if(h.type===DOWNLOAD_TRANSCRIPT_PDF){const{connection:{sessionId:y}}=i();window.location.href=`/transcript-pdf/${y}`}else blacklist.indexOf(h.type)===-1&&h.meta===void 0&&u&&u.emit("action",JSON.stringify(h));return m}},clientName=getClientName(),preloadedState={...loadState(clientName),intl:initialState$3},store=configureStore({middleware:n=>n().concat(socketMiddleware),reducer:rootReducer,preloadedState});store.subscribe(throttle(()=>{const n=store.getState();saveState(clientName,{connection:n.connection,startScreen:n.startScreen})},1e3));const container=document.getElementById("root"),root=clientExports.createRoot(container);root.render(jsxRuntimeExports.jsx(Provider_default,{store,children:jsxRuntimeExports.jsx(App,{})}));
134
+ //# sourceMappingURL=index-B43vVEbp.js.map