ss-chatbot-widget 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/x-bot-widget.js +24 -24
- package/package.json +1 -1
package/dist/x-bot-widget.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
(function(){"use strict";function h2(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const s=Object.getOwnPropertyDescriptor(r,a);s&&Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Ku(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gh={exports:{}},rl={};var N0;function p2(){if(N0)return rl;N0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,s){var u=null;if(s!==void 0&&(u=""+s),a.key!==void 0&&(u=""+a.key),"key"in a){s={};for(var f in a)f!=="key"&&(s[f]=a[f])}else s=a;return a=s.ref,{$$typeof:e,type:r,key:u,ref:a!==void 0?a:null,props:s}}return rl.Fragment=t,rl.jsx=n,rl.jsxs=n,rl}var I0;function m2(){return I0||(I0=1,gh.exports=p2()),gh.exports}var L=m2(),yh={exports:{}},il={},vh={exports:{}},bh={};var M0;function g2(){return M0||(M0=1,(function(e){function t(D,Z){var se=D.length;D.push(Z);e:for(;0<se;){var ue=se-1>>>1,B=D[ue];if(0<a(B,Z))D[ue]=Z,D[se]=B,se=ue;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var Z=D[0],se=D.pop();if(se!==Z){D[0]=se;e:for(var ue=0,B=D.length,z=B>>>1;ue<z;){var W=2*(ue+1)-1,I=D[W],pe=W+1,ve=D[pe];if(0>a(I,se))pe<B&&0>a(ve,I)?(D[ue]=ve,D[pe]=se,ue=pe):(D[ue]=I,D[W]=se,ue=W);else if(pe<B&&0>a(ve,se))D[ue]=ve,D[pe]=se,ue=pe;else break e}}return Z}function a(D,Z){var se=D.sortIndex-Z.sortIndex;return se!==0?se:D.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var d=[],h=[],g=1,y=null,b=3,v=!1,x=!1,E=!1,_=!1,w=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function A(D){for(var Z=n(h);Z!==null;){if(Z.callback===null)r(h);else if(Z.startTime<=D)r(h),Z.sortIndex=Z.expirationTime,t(d,Z);else break;Z=n(h)}}function M(D){if(E=!1,A(D),!x)if(n(d)!==null)x=!0,R||(R=!0,C());else{var Z=n(h);Z!==null&&P(M,Z.startTime-D)}}var R=!1,$=-1,H=5,V=-1;function K(){return _?!0:!(e.unstable_now()-V<H)}function G(){if(_=!1,R){var D=e.unstable_now();V=D;var Z=!0;try{e:{x=!1,E&&(E=!1,O($),$=-1),v=!0;var se=b;try{t:{for(A(D),y=n(d);y!==null&&!(y.expirationTime>D&&K());){var ue=y.callback;if(typeof ue=="function"){y.callback=null,b=y.priorityLevel;var B=ue(y.expirationTime<=D);if(D=e.unstable_now(),typeof B=="function"){y.callback=B,A(D),Z=!0;break t}y===n(d)&&r(d),A(D)}else r(d);y=n(d)}if(y!==null)Z=!0;else{var z=n(h);z!==null&&P(M,z.startTime-D),Z=!1}}break e}finally{y=null,b=se,v=!1}Z=void 0}}finally{Z?C():R=!1}}}var C;if(typeof T=="function")C=function(){T(G)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,U=q.port2;q.port1.onmessage=G,C=function(){U.postMessage(null)}}else C=function(){w(G,0)};function P(D,Z){$=w(function(){D(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(D){switch(b){case 1:case 2:case 3:var Z=3;break;default:Z=b}var se=b;b=Z;try{return D()}finally{b=se}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(D,Z){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var se=b;b=D;try{return Z()}finally{b=se}},e.unstable_scheduleCallback=function(D,Z,se){var ue=e.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?ue+se:ue):se=ue,D){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=se+B,D={id:g++,callback:Z,priorityLevel:D,startTime:se,expirationTime:B,sortIndex:-1},se>ue?(D.sortIndex=se,t(h,D),n(d)===null&&D===n(h)&&(E?(O($),$=-1):E=!0,P(M,se-ue))):(D.sortIndex=B,t(d,D),x||v||(x=!0,R||(R=!0,C()))),D},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(D){var Z=b;return function(){var se=b;b=Z;try{return D.apply(this,arguments)}finally{b=se}}}})(bh)),bh}var D0;function y2(){return D0||(D0=1,vh.exports=g2()),vh.exports}var Sh={exports:{}},Ge={};var B0;function v2(){if(B0)return Ge;B0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function v(z){return z===null||typeof z!="object"?null:(z=b&&z[b]||z["@@iterator"],typeof z=="function"?z:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,_={};function w(z,W,I){this.props=z,this.context=W,this.refs=_,this.updater=I||x}w.prototype.isReactComponent={},w.prototype.setState=function(z,W){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,W,"setState")},w.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function O(){}O.prototype=w.prototype;function T(z,W,I){this.props=z,this.context=W,this.refs=_,this.updater=I||x}var A=T.prototype=new O;A.constructor=T,E(A,w.prototype),A.isPureReactComponent=!0;var M=Array.isArray;function R(){}var $={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function V(z,W,I){var pe=I.ref;return{$$typeof:e,type:z,key:W,ref:pe!==void 0?pe:null,props:I}}function K(z,W){return V(z.type,W,z.props)}function G(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function C(z){var W={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(I){return W[I]})}var q=/\/+/g;function U(z,W){return typeof z=="object"&&z!==null&&z.key!=null?C(""+z.key):W.toString(36)}function P(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(R,R):(z.status="pending",z.then(function(W){z.status==="pending"&&(z.status="fulfilled",z.value=W)},function(W){z.status==="pending"&&(z.status="rejected",z.reason=W)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function D(z,W,I,pe,ve){var he=typeof z;(he==="undefined"||he==="boolean")&&(z=null);var xe=!1;if(z===null)xe=!0;else switch(he){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(z.$$typeof){case e:case t:xe=!0;break;case g:return xe=z._init,D(xe(z._payload),W,I,pe,ve)}}if(xe)return ve=ve(z),xe=pe===""?"."+U(z,0):pe,M(ve)?(I="",xe!=null&&(I=xe.replace(q,"$&/")+"/"),D(ve,W,I,"",function(Me){return Me})):ve!=null&&(G(ve)&&(ve=K(ve,I+(ve.key==null||z&&z.key===ve.key?"":(""+ve.key).replace(q,"$&/")+"/")+xe)),W.push(ve)),1;xe=0;var Ke=pe===""?".":pe+":";if(M(z))for(var Ie=0;Ie<z.length;Ie++)pe=z[Ie],he=Ke+U(pe,Ie),xe+=D(pe,W,I,he,ve);else if(Ie=v(z),typeof Ie=="function")for(z=Ie.call(z),Ie=0;!(pe=z.next()).done;)pe=pe.value,he=Ke+U(pe,Ie++),xe+=D(pe,W,I,he,ve);else if(he==="object"){if(typeof z.then=="function")return D(P(z),W,I,pe,ve);throw W=String(z),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return xe}function Z(z,W,I){if(z==null)return z;var pe=[],ve=0;return D(z,pe,"","",function(he){return W.call(I,he,ve++)}),pe}function se(z){if(z._status===-1){var W=z._result;W=W(),W.then(function(I){(z._status===0||z._status===-1)&&(z._status=1,z._result=I)},function(I){(z._status===0||z._status===-1)&&(z._status=2,z._result=I)}),z._status===-1&&(z._status=0,z._result=W)}if(z._status===1)return z._result.default;throw z._result}var ue=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},B={map:Z,forEach:function(z,W,I){Z(z,function(){W.apply(this,arguments)},I)},count:function(z){var W=0;return Z(z,function(){W++}),W},toArray:function(z){return Z(z,function(W){return W})||[]},only:function(z){if(!G(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Ge.Activity=y,Ge.Children=B,Ge.Component=w,Ge.Fragment=n,Ge.Profiler=a,Ge.PureComponent=T,Ge.StrictMode=r,Ge.Suspense=d,Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Ge.__COMPILER_RUNTIME={__proto__:null,c:function(z){return $.H.useMemoCache(z)}},Ge.cache=function(z){return function(){return z.apply(null,arguments)}},Ge.cacheSignal=function(){return null},Ge.cloneElement=function(z,W,I){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var pe=E({},z.props),ve=z.key;if(W!=null)for(he in W.key!==void 0&&(ve=""+W.key),W)!H.call(W,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&W.ref===void 0||(pe[he]=W[he]);var he=arguments.length-2;if(he===1)pe.children=I;else if(1<he){for(var xe=Array(he),Ke=0;Ke<he;Ke++)xe[Ke]=arguments[Ke+2];pe.children=xe}return V(z.type,ve,pe)},Ge.createContext=function(z){return z={$$typeof:u,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:s,_context:z},z},Ge.createElement=function(z,W,I){var pe,ve={},he=null;if(W!=null)for(pe in W.key!==void 0&&(he=""+W.key),W)H.call(W,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(ve[pe]=W[pe]);var xe=arguments.length-2;if(xe===1)ve.children=I;else if(1<xe){for(var Ke=Array(xe),Ie=0;Ie<xe;Ie++)Ke[Ie]=arguments[Ie+2];ve.children=Ke}if(z&&z.defaultProps)for(pe in xe=z.defaultProps,xe)ve[pe]===void 0&&(ve[pe]=xe[pe]);return V(z,he,ve)},Ge.createRef=function(){return{current:null}},Ge.forwardRef=function(z){return{$$typeof:f,render:z}},Ge.isValidElement=G,Ge.lazy=function(z){return{$$typeof:g,_payload:{_status:-1,_result:z},_init:se}},Ge.memo=function(z,W){return{$$typeof:h,type:z,compare:W===void 0?null:W}},Ge.startTransition=function(z){var W=$.T,I={};$.T=I;try{var pe=z(),ve=$.S;ve!==null&&ve(I,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(R,ue)}catch(he){ue(he)}finally{W!==null&&I.types!==null&&(W.types=I.types),$.T=W}},Ge.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Ge.use=function(z){return $.H.use(z)},Ge.useActionState=function(z,W,I){return $.H.useActionState(z,W,I)},Ge.useCallback=function(z,W){return $.H.useCallback(z,W)},Ge.useContext=function(z){return $.H.useContext(z)},Ge.useDebugValue=function(){},Ge.useDeferredValue=function(z,W){return $.H.useDeferredValue(z,W)},Ge.useEffect=function(z,W){return $.H.useEffect(z,W)},Ge.useEffectEvent=function(z){return $.H.useEffectEvent(z)},Ge.useId=function(){return $.H.useId()},Ge.useImperativeHandle=function(z,W,I){return $.H.useImperativeHandle(z,W,I)},Ge.useInsertionEffect=function(z,W){return $.H.useInsertionEffect(z,W)},Ge.useLayoutEffect=function(z,W){return $.H.useLayoutEffect(z,W)},Ge.useMemo=function(z,W){return $.H.useMemo(z,W)},Ge.useOptimistic=function(z,W){return $.H.useOptimistic(z,W)},Ge.useReducer=function(z,W,I){return $.H.useReducer(z,W,I)},Ge.useRef=function(z){return $.H.useRef(z)},Ge.useState=function(z){return $.H.useState(z)},Ge.useSyncExternalStore=function(z,W,I){return $.H.useSyncExternalStore(z,W,I)},Ge.useTransition=function(){return $.H.useTransition()},Ge.version="19.2.4",Ge}var z0;function xh(){return z0||(z0=1,Sh.exports=v2()),Sh.exports}var Eh={exports:{}},qn={};var L0;function b2(){if(L0)return qn;L0=1;var e=xh();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function s(d,h,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:y==null?null:""+y,children:d,containerInfo:h,implementation:g}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return qn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,qn.createPortal=function(d,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return s(d,h,null,g)},qn.flushSync=function(d){var h=u.T,g=r.p;try{if(u.T=null,r.p=2,d)return d()}finally{u.T=h,r.p=g,r.d.f()}},qn.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(d,h))},qn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},qn.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var g=h.as,y=f(g,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?r.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:v}):g==="script"&&r.d.X(d,{crossOrigin:y,integrity:b,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},qn.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=f(h.as,h.crossOrigin);r.d.M(d,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(d)},qn.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,y=f(g,h.crossOrigin);r.d.L(d,g,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},qn.preloadModule=function(d,h){if(typeof d=="string")if(h){var g=f(h.as,h.crossOrigin);r.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(d)},qn.requestFormReset=function(d){r.d.r(d)},qn.unstable_batchedUpdates=function(d,h){return d(h)},qn.useFormState=function(d,h,g){return u.H.useFormState(d,h,g)},qn.useFormStatus=function(){return u.H.useHostTransitionStatus()},qn.version="19.2.4",qn}var $0;function P0(){if($0)return Eh.exports;$0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Eh.exports=b2(),Eh.exports}var U0;function S2(){if(U0)return il;U0=1;var e=y2(),t=xh(),n=P0();function r(i){var o="https://react.dev/errors/"+i;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function s(i){var o=i,l=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(l=o.return),i=o.return;while(i)}return o.tag===3?l:null}function u(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function f(i){if(i.tag===31){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function d(i){if(s(i)!==i)throw Error(r(188))}function h(i){var o=i.alternate;if(!o){if(o=s(i),o===null)throw Error(r(188));return o!==i?null:i}for(var l=i,c=o;;){var p=l.return;if(p===null)break;var m=p.alternate;if(m===null){if(c=p.return,c!==null){l=c;continue}break}if(p.child===m.child){for(m=p.child;m;){if(m===l)return d(p),i;if(m===c)return d(p),o;m=m.sibling}throw Error(r(188))}if(l.return!==c.return)l=p,c=m;else{for(var S=!1,k=p.child;k;){if(k===l){S=!0,l=p,c=m;break}if(k===c){S=!0,c=p,l=m;break}k=k.sibling}if(!S){for(k=m.child;k;){if(k===l){S=!0,l=m,c=p;break}if(k===c){S=!0,c=m,l=p;break}k=k.sibling}if(!S)throw Error(r(189))}}if(l.alternate!==c)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?i:o}function g(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i;for(i=i.child;i!==null;){if(o=g(i),o!==null)return o;i=i.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),T=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function C(i){return i===null||typeof i!="object"?null:(i=G&&i[G]||i["@@iterator"],typeof i=="function"?i:null)}var q=Symbol.for("react.client.reference");function U(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===q?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case E:return"Fragment";case w:return"Profiler";case _:return"StrictMode";case M:return"Suspense";case R:return"SuspenseList";case V:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case x:return"Portal";case T:return i.displayName||"Context";case O:return(i._context.displayName||"Context")+".Consumer";case A:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case $:return o=i.displayName||null,o!==null?o:U(i.type)||"Memo";case H:o=i._payload,i=i._init;try{return U(i(o))}catch{}}return null}var P=Array.isArray,D=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},ue=[],B=-1;function z(i){return{current:i}}function W(i){0>B||(i.current=ue[B],ue[B]=null,B--)}function I(i,o){B++,ue[B]=i.current,i.current=o}var pe=z(null),ve=z(null),he=z(null),xe=z(null);function Ke(i,o){switch(I(he,o),I(ve,i),I(pe,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?zT(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=zT(o),i=LT(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}W(pe),I(pe,i)}function Ie(){W(pe),W(ve),W(he)}function Me(i){i.memoizedState!==null&&I(xe,i);var o=pe.current,l=LT(o,i.type);o!==l&&(I(ve,i),I(pe,l))}function Fe(i){ve.current===i&&(W(pe),W(ve)),xe.current===i&&(W(xe),qu._currentValue=se)}var ft,Tn;function $e(i){if(ft===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);ft=o&&o[1]||"",Tn=-1<l.stack.indexOf(`
|
|
1
|
+
(function(){"use strict";function h2(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const s=Object.getOwnPropertyDescriptor(r,a);s&&Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>r[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Ku(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gh={exports:{}},il={};var N0;function p2(){if(N0)return il;N0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,a,s){var u=null;if(s!==void 0&&(u=""+s),a.key!==void 0&&(u=""+a.key),"key"in a){s={};for(var f in a)f!=="key"&&(s[f]=a[f])}else s=a;return a=s.ref,{$$typeof:e,type:r,key:u,ref:a!==void 0?a:null,props:s}}return il.Fragment=t,il.jsx=n,il.jsxs=n,il}var I0;function m2(){return I0||(I0=1,gh.exports=p2()),gh.exports}var L=m2(),yh={exports:{}},ol={},vh={exports:{}},bh={};var M0;function g2(){return M0||(M0=1,(function(e){function t(D,Z){var se=D.length;D.push(Z);e:for(;0<se;){var ue=se-1>>>1,B=D[ue];if(0<a(B,Z))D[ue]=Z,D[se]=B,se=ue;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var Z=D[0],se=D.pop();if(se!==Z){D[0]=se;e:for(var ue=0,B=D.length,z=B>>>1;ue<z;){var W=2*(ue+1)-1,I=D[W],pe=W+1,ve=D[pe];if(0>a(I,se))pe<B&&0>a(ve,I)?(D[ue]=ve,D[pe]=se,ue=pe):(D[ue]=I,D[W]=se,ue=W);else if(pe<B&&0>a(ve,se))D[ue]=ve,D[pe]=se,ue=pe;else break e}}return Z}function a(D,Z){var se=D.sortIndex-Z.sortIndex;return se!==0?se:D.id-Z.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var d=[],h=[],g=1,y=null,b=3,v=!1,x=!1,E=!1,_=!1,w=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function A(D){for(var Z=n(h);Z!==null;){if(Z.callback===null)r(h);else if(Z.startTime<=D)r(h),Z.sortIndex=Z.expirationTime,t(d,Z);else break;Z=n(h)}}function M(D){if(E=!1,A(D),!x)if(n(d)!==null)x=!0,R||(R=!0,C());else{var Z=n(h);Z!==null&&P(M,Z.startTime-D)}}var R=!1,$=-1,H=5,V=-1;function K(){return _?!0:!(e.unstable_now()-V<H)}function G(){if(_=!1,R){var D=e.unstable_now();V=D;var Z=!0;try{e:{x=!1,E&&(E=!1,O($),$=-1),v=!0;var se=b;try{t:{for(A(D),y=n(d);y!==null&&!(y.expirationTime>D&&K());){var ue=y.callback;if(typeof ue=="function"){y.callback=null,b=y.priorityLevel;var B=ue(y.expirationTime<=D);if(D=e.unstable_now(),typeof B=="function"){y.callback=B,A(D),Z=!0;break t}y===n(d)&&r(d),A(D)}else r(d);y=n(d)}if(y!==null)Z=!0;else{var z=n(h);z!==null&&P(M,z.startTime-D),Z=!1}}break e}finally{y=null,b=se,v=!1}Z=void 0}}finally{Z?C():R=!1}}}var C;if(typeof T=="function")C=function(){T(G)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,U=q.port2;q.port1.onmessage=G,C=function(){U.postMessage(null)}}else C=function(){w(G,0)};function P(D,Z){$=w(function(){D(e.unstable_now())},Z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(D){switch(b){case 1:case 2:case 3:var Z=3;break;default:Z=b}var se=b;b=Z;try{return D()}finally{b=se}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(D,Z){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var se=b;b=D;try{return Z()}finally{b=se}},e.unstable_scheduleCallback=function(D,Z,se){var ue=e.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?ue+se:ue):se=ue,D){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=se+B,D={id:g++,callback:Z,priorityLevel:D,startTime:se,expirationTime:B,sortIndex:-1},se>ue?(D.sortIndex=se,t(h,D),n(d)===null&&D===n(h)&&(E?(O($),$=-1):E=!0,P(M,se-ue))):(D.sortIndex=B,t(d,D),x||v||(x=!0,R||(R=!0,C()))),D},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(D){var Z=b;return function(){var se=b;b=Z;try{return D.apply(this,arguments)}finally{b=se}}}})(bh)),bh}var D0;function y2(){return D0||(D0=1,vh.exports=g2()),vh.exports}var Sh={exports:{}},Ge={};var B0;function v2(){if(B0)return Ge;B0=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function v(z){return z===null||typeof z!="object"?null:(z=b&&z[b]||z["@@iterator"],typeof z=="function"?z:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,_={};function w(z,W,I){this.props=z,this.context=W,this.refs=_,this.updater=I||x}w.prototype.isReactComponent={},w.prototype.setState=function(z,W){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,W,"setState")},w.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function O(){}O.prototype=w.prototype;function T(z,W,I){this.props=z,this.context=W,this.refs=_,this.updater=I||x}var A=T.prototype=new O;A.constructor=T,E(A,w.prototype),A.isPureReactComponent=!0;var M=Array.isArray;function R(){}var $={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function V(z,W,I){var pe=I.ref;return{$$typeof:e,type:z,key:W,ref:pe!==void 0?pe:null,props:I}}function K(z,W){return V(z.type,W,z.props)}function G(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function C(z){var W={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(I){return W[I]})}var q=/\/+/g;function U(z,W){return typeof z=="object"&&z!==null&&z.key!=null?C(""+z.key):W.toString(36)}function P(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(R,R):(z.status="pending",z.then(function(W){z.status==="pending"&&(z.status="fulfilled",z.value=W)},function(W){z.status==="pending"&&(z.status="rejected",z.reason=W)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function D(z,W,I,pe,ve){var he=typeof z;(he==="undefined"||he==="boolean")&&(z=null);var xe=!1;if(z===null)xe=!0;else switch(he){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(z.$$typeof){case e:case t:xe=!0;break;case g:return xe=z._init,D(xe(z._payload),W,I,pe,ve)}}if(xe)return ve=ve(z),xe=pe===""?"."+U(z,0):pe,M(ve)?(I="",xe!=null&&(I=xe.replace(q,"$&/")+"/"),D(ve,W,I,"",function(Me){return Me})):ve!=null&&(G(ve)&&(ve=K(ve,I+(ve.key==null||z&&z.key===ve.key?"":(""+ve.key).replace(q,"$&/")+"/")+xe)),W.push(ve)),1;xe=0;var Ke=pe===""?".":pe+":";if(M(z))for(var Ie=0;Ie<z.length;Ie++)pe=z[Ie],he=Ke+U(pe,Ie),xe+=D(pe,W,I,he,ve);else if(Ie=v(z),typeof Ie=="function")for(z=Ie.call(z),Ie=0;!(pe=z.next()).done;)pe=pe.value,he=Ke+U(pe,Ie++),xe+=D(pe,W,I,he,ve);else if(he==="object"){if(typeof z.then=="function")return D(P(z),W,I,pe,ve);throw W=String(z),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.")}return xe}function Z(z,W,I){if(z==null)return z;var pe=[],ve=0;return D(z,pe,"","",function(he){return W.call(I,he,ve++)}),pe}function se(z){if(z._status===-1){var W=z._result;W=W(),W.then(function(I){(z._status===0||z._status===-1)&&(z._status=1,z._result=I)},function(I){(z._status===0||z._status===-1)&&(z._status=2,z._result=I)}),z._status===-1&&(z._status=0,z._result=W)}if(z._status===1)return z._result.default;throw z._result}var ue=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var W=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(W))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},B={map:Z,forEach:function(z,W,I){Z(z,function(){W.apply(this,arguments)},I)},count:function(z){var W=0;return Z(z,function(){W++}),W},toArray:function(z){return Z(z,function(W){return W})||[]},only:function(z){if(!G(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Ge.Activity=y,Ge.Children=B,Ge.Component=w,Ge.Fragment=n,Ge.Profiler=a,Ge.PureComponent=T,Ge.StrictMode=r,Ge.Suspense=d,Ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Ge.__COMPILER_RUNTIME={__proto__:null,c:function(z){return $.H.useMemoCache(z)}},Ge.cache=function(z){return function(){return z.apply(null,arguments)}},Ge.cacheSignal=function(){return null},Ge.cloneElement=function(z,W,I){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var pe=E({},z.props),ve=z.key;if(W!=null)for(he in W.key!==void 0&&(ve=""+W.key),W)!H.call(W,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&W.ref===void 0||(pe[he]=W[he]);var he=arguments.length-2;if(he===1)pe.children=I;else if(1<he){for(var xe=Array(he),Ke=0;Ke<he;Ke++)xe[Ke]=arguments[Ke+2];pe.children=xe}return V(z.type,ve,pe)},Ge.createContext=function(z){return z={$$typeof:u,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:s,_context:z},z},Ge.createElement=function(z,W,I){var pe,ve={},he=null;if(W!=null)for(pe in W.key!==void 0&&(he=""+W.key),W)H.call(W,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(ve[pe]=W[pe]);var xe=arguments.length-2;if(xe===1)ve.children=I;else if(1<xe){for(var Ke=Array(xe),Ie=0;Ie<xe;Ie++)Ke[Ie]=arguments[Ie+2];ve.children=Ke}if(z&&z.defaultProps)for(pe in xe=z.defaultProps,xe)ve[pe]===void 0&&(ve[pe]=xe[pe]);return V(z,he,ve)},Ge.createRef=function(){return{current:null}},Ge.forwardRef=function(z){return{$$typeof:f,render:z}},Ge.isValidElement=G,Ge.lazy=function(z){return{$$typeof:g,_payload:{_status:-1,_result:z},_init:se}},Ge.memo=function(z,W){return{$$typeof:h,type:z,compare:W===void 0?null:W}},Ge.startTransition=function(z){var W=$.T,I={};$.T=I;try{var pe=z(),ve=$.S;ve!==null&&ve(I,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(R,ue)}catch(he){ue(he)}finally{W!==null&&I.types!==null&&(W.types=I.types),$.T=W}},Ge.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Ge.use=function(z){return $.H.use(z)},Ge.useActionState=function(z,W,I){return $.H.useActionState(z,W,I)},Ge.useCallback=function(z,W){return $.H.useCallback(z,W)},Ge.useContext=function(z){return $.H.useContext(z)},Ge.useDebugValue=function(){},Ge.useDeferredValue=function(z,W){return $.H.useDeferredValue(z,W)},Ge.useEffect=function(z,W){return $.H.useEffect(z,W)},Ge.useEffectEvent=function(z){return $.H.useEffectEvent(z)},Ge.useId=function(){return $.H.useId()},Ge.useImperativeHandle=function(z,W,I){return $.H.useImperativeHandle(z,W,I)},Ge.useInsertionEffect=function(z,W){return $.H.useInsertionEffect(z,W)},Ge.useLayoutEffect=function(z,W){return $.H.useLayoutEffect(z,W)},Ge.useMemo=function(z,W){return $.H.useMemo(z,W)},Ge.useOptimistic=function(z,W){return $.H.useOptimistic(z,W)},Ge.useReducer=function(z,W,I){return $.H.useReducer(z,W,I)},Ge.useRef=function(z){return $.H.useRef(z)},Ge.useState=function(z){return $.H.useState(z)},Ge.useSyncExternalStore=function(z,W,I){return $.H.useSyncExternalStore(z,W,I)},Ge.useTransition=function(){return $.H.useTransition()},Ge.version="19.2.4",Ge}var z0;function xh(){return z0||(z0=1,Sh.exports=v2()),Sh.exports}var Eh={exports:{}},qn={};var L0;function b2(){if(L0)return qn;L0=1;var e=xh();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},a=Symbol.for("react.portal");function s(d,h,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:y==null?null:""+y,children:d,containerInfo:h,implementation:g}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return qn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,qn.createPortal=function(d,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return s(d,h,null,g)},qn.flushSync=function(d){var h=u.T,g=r.p;try{if(u.T=null,r.p=2,d)return d()}finally{u.T=h,r.p=g,r.d.f()}},qn.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(d,h))},qn.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},qn.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var g=h.as,y=f(g,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?r.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:v}):g==="script"&&r.d.X(d,{crossOrigin:y,integrity:b,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},qn.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=f(h.as,h.crossOrigin);r.d.M(d,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(d)},qn.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,y=f(g,h.crossOrigin);r.d.L(d,g,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},qn.preloadModule=function(d,h){if(typeof d=="string")if(h){var g=f(h.as,h.crossOrigin);r.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(d)},qn.requestFormReset=function(d){r.d.r(d)},qn.unstable_batchedUpdates=function(d,h){return d(h)},qn.useFormState=function(d,h,g){return u.H.useFormState(d,h,g)},qn.useFormStatus=function(){return u.H.useHostTransitionStatus()},qn.version="19.2.4",qn}var $0;function P0(){if($0)return Eh.exports;$0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Eh.exports=b2(),Eh.exports}var U0;function S2(){if(U0)return ol;U0=1;var e=y2(),t=xh(),n=P0();function r(i){var o="https://react.dev/errors/"+i;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function s(i){var o=i,l=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(l=o.return),i=o.return;while(i)}return o.tag===3?l:null}function u(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function f(i){if(i.tag===31){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function d(i){if(s(i)!==i)throw Error(r(188))}function h(i){var o=i.alternate;if(!o){if(o=s(i),o===null)throw Error(r(188));return o!==i?null:i}for(var l=i,c=o;;){var p=l.return;if(p===null)break;var m=p.alternate;if(m===null){if(c=p.return,c!==null){l=c;continue}break}if(p.child===m.child){for(m=p.child;m;){if(m===l)return d(p),i;if(m===c)return d(p),o;m=m.sibling}throw Error(r(188))}if(l.return!==c.return)l=p,c=m;else{for(var S=!1,k=p.child;k;){if(k===l){S=!0,l=p,c=m;break}if(k===c){S=!0,c=p,l=m;break}k=k.sibling}if(!S){for(k=m.child;k;){if(k===l){S=!0,l=m,c=p;break}if(k===c){S=!0,c=m,l=p;break}k=k.sibling}if(!S)throw Error(r(189))}}if(l.alternate!==c)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?i:o}function g(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i;for(i=i.child;i!==null;){if(o=g(i),o!==null)return o;i=i.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),T=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),G=Symbol.iterator;function C(i){return i===null||typeof i!="object"?null:(i=G&&i[G]||i["@@iterator"],typeof i=="function"?i:null)}var q=Symbol.for("react.client.reference");function U(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===q?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case E:return"Fragment";case w:return"Profiler";case _:return"StrictMode";case M:return"Suspense";case R:return"SuspenseList";case V:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case x:return"Portal";case T:return i.displayName||"Context";case O:return(i._context.displayName||"Context")+".Consumer";case A:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case $:return o=i.displayName||null,o!==null?o:U(i.type)||"Memo";case H:o=i._payload,i=i._init;try{return U(i(o))}catch{}}return null}var P=Array.isArray,D=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},ue=[],B=-1;function z(i){return{current:i}}function W(i){0>B||(i.current=ue[B],ue[B]=null,B--)}function I(i,o){B++,ue[B]=i.current,i.current=o}var pe=z(null),ve=z(null),he=z(null),xe=z(null);function Ke(i,o){switch(I(he,o),I(ve,i),I(pe,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?zT(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=zT(o),i=LT(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}W(pe),I(pe,i)}function Ie(){W(pe),W(ve),W(he)}function Me(i){i.memoizedState!==null&&I(xe,i);var o=pe.current,l=LT(o,i.type);o!==l&&(I(ve,i),I(pe,l))}function Fe(i){ve.current===i&&(W(pe),W(ve)),xe.current===i&&(W(xe),qu._currentValue=se)}var ft,Tn;function $e(i){if(ft===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);ft=o&&o[1]||"",Tn=-1<l.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
3
|
`+ft+i+Tn}var Je=!1;function Jt(i,o){if(!i||Je)return"";Je=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(o){var le=function(){throw Error()};if(Object.defineProperty(le.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(le,[])}catch(ne){var ee=ne}Reflect.construct(i,[],le)}else{try{le.call()}catch(ne){ee=ne}i.call(le.prototype)}}else{try{throw Error()}catch(ne){ee=ne}(le=i())&&typeof le.catch=="function"&&le.catch(function(){})}}catch(ne){if(ne&&ee&&typeof ne.stack=="string")return[ne.stack,ee.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=c.DetermineComponentFrameRoot(),S=m[0],k=m[1];if(S&&k){var j=S.split(`
|
|
4
4
|
`),J=k.split(`
|
|
5
5
|
`);for(p=c=0;c<j.length&&!j[c].includes("DetermineComponentFrameRoot");)c++;for(;p<J.length&&!J[p].includes("DetermineComponentFrameRoot");)p++;if(c===j.length||p===J.length)for(c=j.length-1,p=J.length-1;1<=c&&0<=p&&j[c]!==J[p];)p--;for(;1<=c&&0<=p;c--,p--)if(j[c]!==J[p]){if(c!==1||p!==1)do if(c--,p--,0>p||j[c]!==J[p]){var ie=`
|
|
6
6
|
`+j[c].replace(" at new "," at ");return i.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",i.displayName)),ie}while(1<=c&&0<=p);break}}}finally{Je=!1,Error.prepareStackTrace=l}return(l=i?i.displayName||i.name:"")?$e(l):""}function on(i,o){switch(i.tag){case 26:case 27:case 5:return $e(i.type);case 16:return $e("Lazy");case 13:return i.child!==o&&o!==null?$e("Suspense Fallback"):$e("Suspense");case 19:return $e("SuspenseList");case 0:case 15:return Jt(i.type,!1);case 11:return Jt(i.type.render,!1);case 1:return Jt(i.type,!0);case 31:return $e("Activity");default:return""}}function Ht(i){try{var o="",l=null;do o+=on(i,l),l=i,i=i.return;while(i);return o}catch(c){return`
|
|
7
7
|
Error generating stack: `+c.message+`
|
|
8
|
-
`+c.stack}}var Tt=Object.prototype.hasOwnProperty,an=e.unstable_scheduleCallback,It=e.unstable_cancelCallback,Re=e.unstable_shouldYield,Cr=e.unstable_requestPaint,tt=e.unstable_now,oi=e.unstable_getCurrentPriorityLevel,te=e.unstable_ImmediatePriority,ce=e.unstable_UserBlockingPriority,we=e.unstable_NormalPriority,ze=e.unstable_LowPriority,We=e.unstable_IdlePriority,et=e.log,In=e.unstable_setDisableYieldValue,hn=null,sn=null;function Qn(i){if(typeof et=="function"&&In(i),sn&&typeof sn.setStrictMode=="function")try{sn.setStrictMode(hn,i)}catch{}}var At=Math.clz32?Math.clz32:Mn,Te=Math.log,rt=Math.LN2;function Mn(i){return i>>>=0,i===0?32:31-(Te(i)/rt|0)|0}var ai=256,Sa=262144,nd=4194304;function xa(i){var o=i&42;if(o!==0)return o;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function rd(i,o,l){var c=i.pendingLanes;if(c===0)return 0;var p=0,m=i.suspendedLanes,S=i.pingedLanes;i=i.warmLanes;var k=c&134217727;return k!==0?(c=k&~m,c!==0?p=xa(c):(S&=k,S!==0?p=xa(S):l||(l=k&~i,l!==0&&(p=xa(l))))):(k=c&~m,k!==0?p=xa(k):S!==0?p=xa(S):l||(l=c&~i,l!==0&&(p=xa(l)))),p===0?0:o!==0&&o!==p&&(o&m)===0&&(m=p&-p,l=o&-o,m>=l||m===32&&(l&4194048)!==0)?o:p}function ou(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function PP(i,o){switch(i){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 y_(){var i=nd;return nd<<=1,(nd&62914560)===0&&(nd=4194304),i}function bg(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function au(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function UP(i,o,l,c,p,m){var S=i.pendingLanes;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=l,i.entangledLanes&=l,i.errorRecoveryDisabledLanes&=l,i.shellSuspendCounter=0;var k=i.entanglements,j=i.expirationTimes,J=i.hiddenUpdates;for(l=S&~l;0<l;){var ie=31-At(l),le=1<<ie;k[ie]=0,j[ie]=-1;var ee=J[ie];if(ee!==null)for(J[ie]=null,ie=0;ie<ee.length;ie++){var ne=ee[ie];ne!==null&&(ne.lane&=-536870913)}l&=~le}c!==0&&v_(i,c,0),m!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=m&~(S&~o))}function v_(i,o,l){i.pendingLanes|=o,i.suspendedLanes&=~o;var c=31-At(o);i.entangledLanes|=o,i.entanglements[c]=i.entanglements[c]|1073741824|l&261930}function b_(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var c=31-At(l),p=1<<c;p&o|i[c]&o&&(i[c]|=o),l&=~p}}function S_(i,o){var l=o&-o;return l=(l&42)!==0?1:Sg(l),(l&(i.suspendedLanes|o))!==0?0:l}function Sg(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function xg(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function x_(){var i=Z.p;return i!==0?i:(i=window.event,i===void 0?32:a2(i.type))}function E_(i,o){var l=Z.p;try{return Z.p=i,o()}finally{Z.p=l}}var wo=Math.random().toString(36).slice(2),jn="__reactFiber$"+wo,cr="__reactProps$"+wo,bs="__reactContainer$"+wo,Eg="__reactEvents$"+wo,jP="__reactListeners$"+wo,HP="__reactHandles$"+wo,__="__reactResources$"+wo,su="__reactMarker$"+wo;function _g(i){delete i[jn],delete i[cr],delete i[Eg],delete i[jP],delete i[HP]}function Ss(i){var o=i[jn];if(o)return o;for(var l=i.parentNode;l;){if(o=l[bs]||l[jn]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=FT(i);i!==null;){if(l=i[jn])return l;i=FT(i)}return o}i=l,l=i.parentNode}return null}function xs(i){if(i=i[jn]||i[bs]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function lu(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function Es(i){var o=i[__];return o||(o=i[__]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Ln(i){i[su]=!0}var w_=new Set,C_={};function Ea(i,o){_s(i,o),_s(i+"Capture",o)}function _s(i,o){for(C_[i]=o,i=0;i<o.length;i++)w_.add(o[i])}var VP=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]*$"),T_={},A_={};function FP(i){return Tt.call(A_,i)?!0:Tt.call(T_,i)?!1:VP.test(i)?A_[i]=!0:(T_[i]=!0,!1)}function id(i,o,l){if(FP(o))if(l===null)i.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var c=o.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+l)}}function od(i,o,l){if(l===null)i.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttribute(o,""+l)}}function Vi(i,o,l,c){if(c===null)i.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttributeNS(o,l,""+c)}}function Ur(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function k_(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function GP(i,o,l){var c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o);if(!i.hasOwnProperty(o)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,m=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return p.call(this)},set:function(S){l=""+S,m.call(this,S)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return l},setValue:function(S){l=""+S},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function wg(i){if(!i._valueTracker){var o=k_(i)?"checked":"value";i._valueTracker=GP(i,o,""+i[o])}}function R_(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),c="";return i&&(c=k_(i)?i.checked?"true":"false":i.value),i=c,i!==l?(o.setValue(i),!0):!1}function ad(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var qP=/[\n"\\]/g;function jr(i){return i.replace(qP,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Cg(i,o,l,c,p,m,S,k){i.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?i.type=S:i.removeAttribute("type"),o!=null?S==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+Ur(o)):i.value!==""+Ur(o)&&(i.value=""+Ur(o)):S!=="submit"&&S!=="reset"||i.removeAttribute("value"),o!=null?Tg(i,S,Ur(o)):l!=null?Tg(i,S,Ur(l)):c!=null&&i.removeAttribute("value"),p==null&&m!=null&&(i.defaultChecked=!!m),p!=null&&(i.checked=p&&typeof p!="function"&&typeof p!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?i.name=""+Ur(k):i.removeAttribute("name")}function O_(i,o,l,c,p,m,S,k){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(i.type=m),o!=null||l!=null){if(!(m!=="submit"&&m!=="reset"||o!=null)){wg(i);return}l=l!=null?""+Ur(l):"",o=o!=null?""+Ur(o):l,k||o===i.value||(i.value=o),i.defaultValue=o}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,i.checked=k?i.checked:!!c,i.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(i.name=S),wg(i)}function Tg(i,o,l){o==="number"&&ad(i.ownerDocument)===i||i.defaultValue===""+l||(i.defaultValue=""+l)}function ws(i,o,l,c){if(i=i.options,o){o={};for(var p=0;p<l.length;p++)o["$"+l[p]]=!0;for(l=0;l<i.length;l++)p=o.hasOwnProperty("$"+i[l].value),i[l].selected!==p&&(i[l].selected=p),p&&c&&(i[l].defaultSelected=!0)}else{for(l=""+Ur(l),o=null,p=0;p<i.length;p++){if(i[p].value===l){i[p].selected=!0,c&&(i[p].defaultSelected=!0);return}o!==null||i[p].disabled||(o=i[p])}o!==null&&(o.selected=!0)}}function N_(i,o,l){if(o!=null&&(o=""+Ur(o),o!==i.value&&(i.value=o),l==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=l!=null?""+Ur(l):""}function I_(i,o,l,c){if(o==null){if(c!=null){if(l!=null)throw Error(r(92));if(P(c)){if(1<c.length)throw Error(r(93));c=c[0]}l=c}l==null&&(l=""),o=l}l=Ur(o),i.defaultValue=l,c=i.textContent,c===l&&c!==""&&c!==null&&(i.value=c),wg(i)}function Cs(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}var YP=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 M_(i,o,l){var c=o.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":c?i.setProperty(o,l):typeof l!="number"||l===0||YP.has(o)?o==="float"?i.cssFloat=l:i[o]=(""+l).trim():i[o]=l+"px"}function D_(i,o,l){if(o!=null&&typeof o!="object")throw Error(r(62));if(i=i.style,l!=null){for(var c in l)!l.hasOwnProperty(c)||o!=null&&o.hasOwnProperty(c)||(c.indexOf("--")===0?i.setProperty(c,""):c==="float"?i.cssFloat="":i[c]="");for(var p in o)c=o[p],o.hasOwnProperty(p)&&l[p]!==c&&M_(i,p,c)}else for(var m in o)o.hasOwnProperty(m)&&M_(i,m,o[m])}function Ag(i){if(i.indexOf("-")===-1)return!1;switch(i){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 XP=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"]]),ZP=/^[\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 sd(i){return ZP.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Fi(){}var kg=null;function Rg(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ts=null,As=null;function B_(i){var o=xs(i);if(o&&(i=o.stateNode)){var l=i[cr]||null;e:switch(i=o.stateNode,o.type){case"input":if(Cg(i,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),o=l.name,l.type==="radio"&&o!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+jr(""+o)+'"][type="radio"]'),o=0;o<l.length;o++){var c=l[o];if(c!==i&&c.form===i.form){var p=c[cr]||null;if(!p)throw Error(r(90));Cg(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(o=0;o<l.length;o++)c=l[o],c.form===i.form&&R_(c)}break e;case"textarea":N_(i,l.value,l.defaultValue);break e;case"select":o=l.value,o!=null&&ws(i,!!l.multiple,o,!1)}}}var Og=!1;function z_(i,o,l){if(Og)return i(o,l);Og=!0;try{var c=i(o);return c}finally{if(Og=!1,(Ts!==null||As!==null)&&(Xd(),Ts&&(o=Ts,i=As,As=Ts=null,B_(o),i)))for(o=0;o<i.length;o++)B_(i[o])}}function uu(i,o){var l=i.stateNode;if(l===null)return null;var c=l[cr]||null;if(c===null)return null;l=c[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(i=i.type,c=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!c;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(r(231,o,typeof l));return l}var Gi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ng=!1;if(Gi)try{var cu={};Object.defineProperty(cu,"passive",{get:function(){Ng=!0}}),window.addEventListener("test",cu,cu),window.removeEventListener("test",cu,cu)}catch{Ng=!1}var Co=null,Ig=null,ld=null;function L_(){if(ld)return ld;var i,o=Ig,l=o.length,c,p="value"in Co?Co.value:Co.textContent,m=p.length;for(i=0;i<l&&o[i]===p[i];i++);var S=l-i;for(c=1;c<=S&&o[l-c]===p[m-c];c++);return ld=p.slice(i,1<c?1-c:void 0)}function ud(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function cd(){return!0}function $_(){return!1}function fr(i){function o(l,c,p,m,S){this._reactName=l,this._targetInst=p,this.type=c,this.nativeEvent=m,this.target=S,this.currentTarget=null;for(var k in i)i.hasOwnProperty(k)&&(l=i[k],this[k]=l?l(m):m[k]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?cd:$_,this.isPropagationStopped=$_,this}return y(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=cd)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=cd)},persist:function(){},isPersistent:cd}),o}var _a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fd=fr(_a),fu=y({},_a,{view:0,detail:0}),KP=fr(fu),Mg,Dg,du,dd=y({},fu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zg,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==du&&(du&&i.type==="mousemove"?(Mg=i.screenX-du.screenX,Dg=i.screenY-du.screenY):Dg=Mg=0,du=i),Mg)},movementY:function(i){return"movementY"in i?i.movementY:Dg}}),P_=fr(dd),WP=y({},dd,{dataTransfer:0}),QP=fr(WP),JP=y({},fu,{relatedTarget:0}),Bg=fr(JP),e8=y({},_a,{animationName:0,elapsedTime:0,pseudoElement:0}),t8=fr(e8),n8=y({},_a,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),r8=fr(n8),i8=y({},_a,{data:0}),U_=fr(i8),o8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a8={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"},s8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function l8(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=s8[i])?!!o[i]:!1}function zg(){return l8}var u8=y({},fu,{key:function(i){if(i.key){var o=o8[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=ud(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?a8[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zg,charCode:function(i){return i.type==="keypress"?ud(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?ud(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),c8=fr(u8),f8=y({},dd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),j_=fr(f8),d8=y({},fu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zg}),h8=fr(d8),p8=y({},_a,{propertyName:0,elapsedTime:0,pseudoElement:0}),m8=fr(p8),g8=y({},dd,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),y8=fr(g8),v8=y({},_a,{newState:0,oldState:0}),b8=fr(v8),S8=[9,13,27,32],Lg=Gi&&"CompositionEvent"in window,hu=null;Gi&&"documentMode"in document&&(hu=document.documentMode);var x8=Gi&&"TextEvent"in window&&!hu,H_=Gi&&(!Lg||hu&&8<hu&&11>=hu),V_=" ",F_=!1;function G_(i,o){switch(i){case"keyup":return S8.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function q_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var ks=!1;function E8(i,o){switch(i){case"compositionend":return q_(o);case"keypress":return o.which!==32?null:(F_=!0,V_);case"textInput":return i=o.data,i===V_&&F_?null:i;default:return null}}function _8(i,o){if(ks)return i==="compositionend"||!Lg&&G_(i,o)?(i=L_(),ld=Ig=Co=null,ks=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return H_&&o.locale!=="ko"?null:o.data;default:return null}}var w8={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 Y_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!w8[i.type]:o==="textarea"}function X_(i,o,l,c){Ts?As?As.push(c):As=[c]:Ts=c,o=th(o,"onChange"),0<o.length&&(l=new fd("onChange","change",null,l,c),i.push({event:l,listeners:o}))}var pu=null,mu=null;function C8(i){OT(i,0)}function hd(i){var o=lu(i);if(R_(o))return i}function Z_(i,o){if(i==="change")return o}var K_=!1;if(Gi){var $g;if(Gi){var Pg="oninput"in document;if(!Pg){var W_=document.createElement("div");W_.setAttribute("oninput","return;"),Pg=typeof W_.oninput=="function"}$g=Pg}else $g=!1;K_=$g&&(!document.documentMode||9<document.documentMode)}function Q_(){pu&&(pu.detachEvent("onpropertychange",J_),mu=pu=null)}function J_(i){if(i.propertyName==="value"&&hd(mu)){var o=[];X_(o,mu,i,Rg(i)),z_(C8,o)}}function T8(i,o,l){i==="focusin"?(Q_(),pu=o,mu=l,pu.attachEvent("onpropertychange",J_)):i==="focusout"&&Q_()}function A8(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return hd(mu)}function k8(i,o){if(i==="click")return hd(o)}function R8(i,o){if(i==="input"||i==="change")return hd(o)}function O8(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Tr=typeof Object.is=="function"?Object.is:O8;function gu(i,o){if(Tr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var l=Object.keys(i),c=Object.keys(o);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var p=l[c];if(!Tt.call(o,p)||!Tr(i[p],o[p]))return!1}return!0}function ew(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function tw(i,o){var l=ew(i);i=0;for(var c;l;){if(l.nodeType===3){if(c=i+l.textContent.length,i<=o&&c>=o)return{node:l,offset:o-i};i=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=ew(l)}}function nw(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?nw(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function rw(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=ad(i.document);o instanceof i.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch{l=!1}if(l)i=o.contentWindow;else break;o=ad(i.document)}return o}function Ug(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}var N8=Gi&&"documentMode"in document&&11>=document.documentMode,Rs=null,jg=null,yu=null,Hg=!1;function iw(i,o,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Hg||Rs==null||Rs!==ad(c)||(c=Rs,"selectionStart"in c&&Ug(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),yu&&gu(yu,c)||(yu=c,c=th(jg,"onSelect"),0<c.length&&(o=new fd("onSelect","select",null,o,l),i.push({event:o,listeners:c}),o.target=Rs)))}function wa(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var Os={animationend:wa("Animation","AnimationEnd"),animationiteration:wa("Animation","AnimationIteration"),animationstart:wa("Animation","AnimationStart"),transitionrun:wa("Transition","TransitionRun"),transitionstart:wa("Transition","TransitionStart"),transitioncancel:wa("Transition","TransitionCancel"),transitionend:wa("Transition","TransitionEnd")},Vg={},ow={};Gi&&(ow=document.createElement("div").style,"AnimationEvent"in window||(delete Os.animationend.animation,delete Os.animationiteration.animation,delete Os.animationstart.animation),"TransitionEvent"in window||delete Os.transitionend.transition);function Ca(i){if(Vg[i])return Vg[i];if(!Os[i])return i;var o=Os[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in ow)return Vg[i]=o[l];return i}var aw=Ca("animationend"),sw=Ca("animationiteration"),lw=Ca("animationstart"),I8=Ca("transitionrun"),M8=Ca("transitionstart"),D8=Ca("transitioncancel"),uw=Ca("transitionend"),cw=new Map,Fg="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(" ");Fg.push("scrollEnd");function si(i,o){cw.set(i,o),Ea(o,[i])}var pd=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Hr=[],Ns=0,Gg=0;function md(){for(var i=Ns,o=Gg=Ns=0;o<i;){var l=Hr[o];Hr[o++]=null;var c=Hr[o];Hr[o++]=null;var p=Hr[o];Hr[o++]=null;var m=Hr[o];if(Hr[o++]=null,c!==null&&p!==null){var S=c.pending;S===null?p.next=p:(p.next=S.next,S.next=p),c.pending=p}m!==0&&fw(l,p,m)}}function gd(i,o,l,c){Hr[Ns++]=i,Hr[Ns++]=o,Hr[Ns++]=l,Hr[Ns++]=c,Gg|=c,i.lanes|=c,i=i.alternate,i!==null&&(i.lanes|=c)}function qg(i,o,l,c){return gd(i,o,l,c),yd(i)}function Ta(i,o){return gd(i,null,null,o),yd(i)}function fw(i,o,l){i.lanes|=l;var c=i.alternate;c!==null&&(c.lanes|=l);for(var p=!1,m=i.return;m!==null;)m.childLanes|=l,c=m.alternate,c!==null&&(c.childLanes|=l),m.tag===22&&(i=m.stateNode,i===null||i._visibility&1||(p=!0)),i=m,m=m.return;return i.tag===3?(m=i.stateNode,p&&o!==null&&(p=31-At(l),i=m.hiddenUpdates,c=i[p],c===null?i[p]=[o]:c.push(o),o.lane=l|536870912),m):null}function yd(i){if(50<Pu)throw Pu=0,t0=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var Is={};function B8(i,o,l,c){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ar(i,o,l,c){return new B8(i,o,l,c)}function Yg(i){return i=i.prototype,!(!i||!i.isReactComponent)}function qi(i,o){var l=i.alternate;return l===null?(l=Ar(i.tag,o,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=o,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&65011712,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,o=i.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l.refCleanup=i.refCleanup,l}function dw(i,o){i.flags&=65011714;var l=i.alternate;return l===null?(i.childLanes=0,i.lanes=o,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,o=l.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),i}function vd(i,o,l,c,p,m){var S=0;if(c=i,typeof i=="function")Yg(i)&&(S=1);else if(typeof i=="string")S=UU(i,l,pe.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case V:return i=Ar(31,l,o,p),i.elementType=V,i.lanes=m,i;case E:return Aa(l.children,p,m,o);case _:S=8,p|=24;break;case w:return i=Ar(12,l,o,p|2),i.elementType=w,i.lanes=m,i;case M:return i=Ar(13,l,o,p),i.elementType=M,i.lanes=m,i;case R:return i=Ar(19,l,o,p),i.elementType=R,i.lanes=m,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:S=10;break e;case O:S=9;break e;case A:S=11;break e;case $:S=14;break e;case H:S=16,c=null;break e}S=29,l=Error(r(130,i===null?"null":typeof i,"")),c=null}return o=Ar(S,l,o,p),o.elementType=i,o.type=c,o.lanes=m,o}function Aa(i,o,l,c){return i=Ar(7,i,c,o),i.lanes=l,i}function Xg(i,o,l){return i=Ar(6,i,null,o),i.lanes=l,i}function hw(i){var o=Ar(18,null,null,0);return o.stateNode=i,o}function Zg(i,o,l){return o=Ar(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var pw=new WeakMap;function Vr(i,o){if(typeof i=="object"&&i!==null){var l=pw.get(i);return l!==void 0?l:(o={value:i,source:o,stack:Ht(o)},pw.set(i,o),o)}return{value:i,source:o,stack:Ht(o)}}var Ms=[],Ds=0,bd=null,vu=0,Fr=[],Gr=0,To=null,Ai=1,ki="";function Yi(i,o){Ms[Ds++]=vu,Ms[Ds++]=bd,bd=i,vu=o}function mw(i,o,l){Fr[Gr++]=Ai,Fr[Gr++]=ki,Fr[Gr++]=To,To=i;var c=Ai;i=ki;var p=32-At(c)-1;c&=~(1<<p),l+=1;var m=32-At(o)+p;if(30<m){var S=p-p%5;m=(c&(1<<S)-1).toString(32),c>>=S,p-=S,Ai=1<<32-At(o)+p|l<<p|c,ki=m+i}else Ai=1<<m|l<<p|c,ki=i}function Kg(i){i.return!==null&&(Yi(i,1),mw(i,1,0))}function Wg(i){for(;i===bd;)bd=Ms[--Ds],Ms[Ds]=null,vu=Ms[--Ds],Ms[Ds]=null;for(;i===To;)To=Fr[--Gr],Fr[Gr]=null,ki=Fr[--Gr],Fr[Gr]=null,Ai=Fr[--Gr],Fr[Gr]=null}function gw(i,o){Fr[Gr++]=Ai,Fr[Gr++]=ki,Fr[Gr++]=To,Ai=o.id,ki=o.overflow,To=i}var Hn=null,Xt=null,ct=!1,Ao=null,qr=!1,Qg=Error(r(519));function ko(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw bu(Vr(o,i)),Qg}function yw(i){var o=i.stateNode,l=i.type,c=i.memoizedProps;switch(o[jn]=i,o[cr]=c,l){case"dialog":ot("cancel",o),ot("close",o);break;case"iframe":case"object":case"embed":ot("load",o);break;case"video":case"audio":for(l=0;l<ju.length;l++)ot(ju[l],o);break;case"source":ot("error",o);break;case"img":case"image":case"link":ot("error",o),ot("load",o);break;case"details":ot("toggle",o);break;case"input":ot("invalid",o),O_(o,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":ot("invalid",o);break;case"textarea":ot("invalid",o),I_(o,c.value,c.defaultValue,c.children)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||o.textContent===""+l||c.suppressHydrationWarning===!0||DT(o.textContent,l)?(c.popover!=null&&(ot("beforetoggle",o),ot("toggle",o)),c.onScroll!=null&&ot("scroll",o),c.onScrollEnd!=null&&ot("scrollend",o),c.onClick!=null&&(o.onclick=Fi),o=!0):o=!1,o||ko(i,!0)}function vw(i){for(Hn=i.return;Hn;)switch(Hn.tag){case 5:case 31:case 13:qr=!1;return;case 27:case 3:qr=!0;return;default:Hn=Hn.return}}function Bs(i){if(i!==Hn)return!1;if(!ct)return vw(i),ct=!0,!1;var o=i.tag,l;if((l=o!==3&&o!==27)&&((l=o===5)&&(l=i.type,l=!(l!=="form"&&l!=="button")||g0(i.type,i.memoizedProps)),l=!l),l&&Xt&&ko(i),vw(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Xt=VT(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Xt=VT(i)}else o===27?(o=Xt,Ho(i.type)?(i=x0,x0=null,Xt=i):Xt=o):Xt=Hn?Xr(i.stateNode.nextSibling):null;return!0}function ka(){Xt=Hn=null,ct=!1}function Jg(){var i=Ao;return i!==null&&(mr===null?mr=i:mr.push.apply(mr,i),Ao=null),i}function bu(i){Ao===null?Ao=[i]:Ao.push(i)}var ey=z(null),Ra=null,Xi=null;function Ro(i,o,l){I(ey,o._currentValue),o._currentValue=l}function Zi(i){i._currentValue=ey.current,W(ey)}function ty(i,o,l){for(;i!==null;){var c=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,c!==null&&(c.childLanes|=o)):c!==null&&(c.childLanes&o)!==o&&(c.childLanes|=o),i===l)break;i=i.return}}function ny(i,o,l,c){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var m=p.dependencies;if(m!==null){var S=p.child;m=m.firstContext;e:for(;m!==null;){var k=m;m=p;for(var j=0;j<o.length;j++)if(k.context===o[j]){m.lanes|=l,k=m.alternate,k!==null&&(k.lanes|=l),ty(m.return,l,i),c||(S=null);break e}m=k.next}}else if(p.tag===18){if(S=p.return,S===null)throw Error(r(341));S.lanes|=l,m=S.alternate,m!==null&&(m.lanes|=l),ty(S,l,i),S=null}else S=p.child;if(S!==null)S.return=p;else for(S=p;S!==null;){if(S===i){S=null;break}if(p=S.sibling,p!==null){p.return=S.return,S=p;break}S=S.return}p=S}}function zs(i,o,l,c){i=null;for(var p=o,m=!1;p!==null;){if(!m){if((p.flags&524288)!==0)m=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var S=p.alternate;if(S===null)throw Error(r(387));if(S=S.memoizedProps,S!==null){var k=p.type;Tr(p.pendingProps.value,S.value)||(i!==null?i.push(k):i=[k])}}else if(p===xe.current){if(S=p.alternate,S===null)throw Error(r(387));S.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(i!==null?i.push(qu):i=[qu])}p=p.return}i!==null&&ny(o,i,l,c),o.flags|=262144}function Sd(i){for(i=i.firstContext;i!==null;){if(!Tr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Oa(i){Ra=i,Xi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Vn(i){return bw(Ra,i)}function xd(i,o){return Ra===null&&Oa(i),bw(i,o)}function bw(i,o){var l=o._currentValue;if(o={context:o,memoizedValue:l,next:null},Xi===null){if(i===null)throw Error(r(308));Xi=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else Xi=Xi.next=o;return l}var z8=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(l,c){i.push(c)}};this.abort=function(){o.aborted=!0,i.forEach(function(l){return l()})}},L8=e.unstable_scheduleCallback,$8=e.unstable_NormalPriority,An={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ry(){return{controller:new z8,data:new Map,refCount:0}}function Su(i){i.refCount--,i.refCount===0&&L8($8,function(){i.controller.abort()})}var xu=null,iy=0,Ls=0,$s=null;function P8(i,o){if(xu===null){var l=xu=[];iy=0,Ls=s0(),$s={status:"pending",value:void 0,then:function(c){l.push(c)}}}return iy++,o.then(Sw,Sw),o}function Sw(){if(--iy===0&&xu!==null){$s!==null&&($s.status="fulfilled");var i=xu;xu=null,Ls=0,$s=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function U8(i,o){var l=[],c={status:"pending",value:null,reason:null,then:function(p){l.push(p)}};return i.then(function(){c.status="fulfilled",c.value=o;for(var p=0;p<l.length;p++)(0,l[p])(o)},function(p){for(c.status="rejected",c.reason=p,p=0;p<l.length;p++)(0,l[p])(void 0)}),c}var xw=D.S;D.S=function(i,o){iT=tt(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&P8(i,o),xw!==null&&xw(i,o)};var Na=z(null);function oy(){var i=Na.current;return i!==null?i:Vt.pooledCache}function Ed(i,o){o===null?I(Na,Na.current):I(Na,o.pool)}function Ew(){var i=oy();return i===null?null:{parent:An._currentValue,pool:i}}var Ps=Error(r(460)),ay=Error(r(474)),_d=Error(r(542)),wd={then:function(){}};function _w(i){return i=i.status,i==="fulfilled"||i==="rejected"}function ww(i,o,l){switch(l=i[l],l===void 0?i.push(o):l!==o&&(o.then(Fi,Fi),o=l),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Tw(i),i;default:if(typeof o.status=="string")o.then(Fi,Fi);else{if(i=Vt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=o,i.status="pending",i.then(function(c){if(o.status==="pending"){var p=o;p.status="fulfilled",p.value=c}},function(c){if(o.status==="pending"){var p=o;p.status="rejected",p.reason=c}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Tw(i),i}throw Ma=o,Ps}}function Ia(i){try{var o=i._init;return o(i._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ma=l,Ps):l}}var Ma=null;function Cw(){if(Ma===null)throw Error(r(459));var i=Ma;return Ma=null,i}function Tw(i){if(i===Ps||i===_d)throw Error(r(483))}var Us=null,Eu=0;function Cd(i){var o=Eu;return Eu+=1,Us===null&&(Us=[]),ww(Us,i,o)}function _u(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function Td(i,o){throw o.$$typeof===b?Error(r(525)):(i=Object.prototype.toString.call(o),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function Aw(i){function o(Y,F){if(i){var Q=Y.deletions;Q===null?(Y.deletions=[F],Y.flags|=16):Q.push(F)}}function l(Y,F){if(!i)return null;for(;F!==null;)o(Y,F),F=F.sibling;return null}function c(Y){for(var F=new Map;Y!==null;)Y.key!==null?F.set(Y.key,Y):F.set(Y.index,Y),Y=Y.sibling;return F}function p(Y,F){return Y=qi(Y,F),Y.index=0,Y.sibling=null,Y}function m(Y,F,Q){return Y.index=Q,i?(Q=Y.alternate,Q!==null?(Q=Q.index,Q<F?(Y.flags|=67108866,F):Q):(Y.flags|=67108866,F)):(Y.flags|=1048576,F)}function S(Y){return i&&Y.alternate===null&&(Y.flags|=67108866),Y}function k(Y,F,Q,oe){return F===null||F.tag!==6?(F=Xg(Q,Y.mode,oe),F.return=Y,F):(F=p(F,Q),F.return=Y,F)}function j(Y,F,Q,oe){var Le=Q.type;return Le===E?ie(Y,F,Q.props.children,oe,Q.key):F!==null&&(F.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===H&&Ia(Le)===F.type)?(F=p(F,Q.props),_u(F,Q),F.return=Y,F):(F=vd(Q.type,Q.key,Q.props,null,Y.mode,oe),_u(F,Q),F.return=Y,F)}function J(Y,F,Q,oe){return F===null||F.tag!==4||F.stateNode.containerInfo!==Q.containerInfo||F.stateNode.implementation!==Q.implementation?(F=Zg(Q,Y.mode,oe),F.return=Y,F):(F=p(F,Q.children||[]),F.return=Y,F)}function ie(Y,F,Q,oe,Le){return F===null||F.tag!==7?(F=Aa(Q,Y.mode,oe,Le),F.return=Y,F):(F=p(F,Q),F.return=Y,F)}function le(Y,F,Q){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=Xg(""+F,Y.mode,Q),F.return=Y,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case v:return Q=vd(F.type,F.key,F.props,null,Y.mode,Q),_u(Q,F),Q.return=Y,Q;case x:return F=Zg(F,Y.mode,Q),F.return=Y,F;case H:return F=Ia(F),le(Y,F,Q)}if(P(F)||C(F))return F=Aa(F,Y.mode,Q,null),F.return=Y,F;if(typeof F.then=="function")return le(Y,Cd(F),Q);if(F.$$typeof===T)return le(Y,xd(Y,F),Q);Td(Y,F)}return null}function ee(Y,F,Q,oe){var Le=F!==null?F.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Le!==null?null:k(Y,F,""+Q,oe);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:return Q.key===Le?j(Y,F,Q,oe):null;case x:return Q.key===Le?J(Y,F,Q,oe):null;case H:return Q=Ia(Q),ee(Y,F,Q,oe)}if(P(Q)||C(Q))return Le!==null?null:ie(Y,F,Q,oe,null);if(typeof Q.then=="function")return ee(Y,F,Cd(Q),oe);if(Q.$$typeof===T)return ee(Y,F,xd(Y,Q),oe);Td(Y,Q)}return null}function ne(Y,F,Q,oe,Le){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Y=Y.get(Q)||null,k(F,Y,""+oe,Le);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case v:return Y=Y.get(oe.key===null?Q:oe.key)||null,j(F,Y,oe,Le);case x:return Y=Y.get(oe.key===null?Q:oe.key)||null,J(F,Y,oe,Le);case H:return oe=Ia(oe),ne(Y,F,Q,oe,Le)}if(P(oe)||C(oe))return Y=Y.get(Q)||null,ie(F,Y,oe,Le,null);if(typeof oe.then=="function")return ne(Y,F,Q,Cd(oe),Le);if(oe.$$typeof===T)return ne(Y,F,Q,xd(F,oe),Le);Td(F,oe)}return null}function Ce(Y,F,Q,oe){for(var Le=null,mt=null,Ae=F,Qe=F=0,lt=null;Ae!==null&&Qe<Q.length;Qe++){Ae.index>Qe?(lt=Ae,Ae=null):lt=Ae.sibling;var gt=ee(Y,Ae,Q[Qe],oe);if(gt===null){Ae===null&&(Ae=lt);break}i&&Ae&>.alternate===null&&o(Y,Ae),F=m(gt,F,Qe),mt===null?Le=gt:mt.sibling=gt,mt=gt,Ae=lt}if(Qe===Q.length)return l(Y,Ae),ct&&Yi(Y,Qe),Le;if(Ae===null){for(;Qe<Q.length;Qe++)Ae=le(Y,Q[Qe],oe),Ae!==null&&(F=m(Ae,F,Qe),mt===null?Le=Ae:mt.sibling=Ae,mt=Ae);return ct&&Yi(Y,Qe),Le}for(Ae=c(Ae);Qe<Q.length;Qe++)lt=ne(Ae,Y,Qe,Q[Qe],oe),lt!==null&&(i&<.alternate!==null&&Ae.delete(lt.key===null?Qe:lt.key),F=m(lt,F,Qe),mt===null?Le=lt:mt.sibling=lt,mt=lt);return i&&Ae.forEach(function(Yo){return o(Y,Yo)}),ct&&Yi(Y,Qe),Le}function Pe(Y,F,Q,oe){if(Q==null)throw Error(r(151));for(var Le=null,mt=null,Ae=F,Qe=F=0,lt=null,gt=Q.next();Ae!==null&&!gt.done;Qe++,gt=Q.next()){Ae.index>Qe?(lt=Ae,Ae=null):lt=Ae.sibling;var Yo=ee(Y,Ae,gt.value,oe);if(Yo===null){Ae===null&&(Ae=lt);break}i&&Ae&&Yo.alternate===null&&o(Y,Ae),F=m(Yo,F,Qe),mt===null?Le=Yo:mt.sibling=Yo,mt=Yo,Ae=lt}if(gt.done)return l(Y,Ae),ct&&Yi(Y,Qe),Le;if(Ae===null){for(;!gt.done;Qe++,gt=Q.next())gt=le(Y,gt.value,oe),gt!==null&&(F=m(gt,F,Qe),mt===null?Le=gt:mt.sibling=gt,mt=gt);return ct&&Yi(Y,Qe),Le}for(Ae=c(Ae);!gt.done;Qe++,gt=Q.next())gt=ne(Ae,Y,Qe,gt.value,oe),gt!==null&&(i&>.alternate!==null&&Ae.delete(gt.key===null?Qe:gt.key),F=m(gt,F,Qe),mt===null?Le=gt:mt.sibling=gt,mt=gt);return i&&Ae.forEach(function(WU){return o(Y,WU)}),ct&&Yi(Y,Qe),Le}function jt(Y,F,Q,oe){if(typeof Q=="object"&&Q!==null&&Q.type===E&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:e:{for(var Le=Q.key;F!==null;){if(F.key===Le){if(Le=Q.type,Le===E){if(F.tag===7){l(Y,F.sibling),oe=p(F,Q.props.children),oe.return=Y,Y=oe;break e}}else if(F.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===H&&Ia(Le)===F.type){l(Y,F.sibling),oe=p(F,Q.props),_u(oe,Q),oe.return=Y,Y=oe;break e}l(Y,F);break}else o(Y,F);F=F.sibling}Q.type===E?(oe=Aa(Q.props.children,Y.mode,oe,Q.key),oe.return=Y,Y=oe):(oe=vd(Q.type,Q.key,Q.props,null,Y.mode,oe),_u(oe,Q),oe.return=Y,Y=oe)}return S(Y);case x:e:{for(Le=Q.key;F!==null;){if(F.key===Le)if(F.tag===4&&F.stateNode.containerInfo===Q.containerInfo&&F.stateNode.implementation===Q.implementation){l(Y,F.sibling),oe=p(F,Q.children||[]),oe.return=Y,Y=oe;break e}else{l(Y,F);break}else o(Y,F);F=F.sibling}oe=Zg(Q,Y.mode,oe),oe.return=Y,Y=oe}return S(Y);case H:return Q=Ia(Q),jt(Y,F,Q,oe)}if(P(Q))return Ce(Y,F,Q,oe);if(C(Q)){if(Le=C(Q),typeof Le!="function")throw Error(r(150));return Q=Le.call(Q),Pe(Y,F,Q,oe)}if(typeof Q.then=="function")return jt(Y,F,Cd(Q),oe);if(Q.$$typeof===T)return jt(Y,F,xd(Y,Q),oe);Td(Y,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,F!==null&&F.tag===6?(l(Y,F.sibling),oe=p(F,Q),oe.return=Y,Y=oe):(l(Y,F),oe=Xg(Q,Y.mode,oe),oe.return=Y,Y=oe),S(Y)):l(Y,F)}return function(Y,F,Q,oe){try{Eu=0;var Le=jt(Y,F,Q,oe);return Us=null,Le}catch(Ae){if(Ae===Ps||Ae===_d)throw Ae;var mt=Ar(29,Ae,null,Y.mode);return mt.lanes=oe,mt.return=Y,mt}}}var Da=Aw(!0),kw=Aw(!1),Oo=!1;function sy(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ly(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function No(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Io(i,o,l){var c=i.updateQueue;if(c===null)return null;if(c=c.shared,(St&2)!==0){var p=c.pending;return p===null?o.next=o:(o.next=p.next,p.next=o),c.pending=o,o=yd(i),fw(i,null,l),o}return gd(i,c,o,l),yd(i)}function wu(i,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194048)!==0)){var c=o.lanes;c&=i.pendingLanes,l|=c,o.lanes=l,b_(i,l)}}function uy(i,o){var l=i.updateQueue,c=i.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var p=null,m=null;if(l=l.firstBaseUpdate,l!==null){do{var S={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};m===null?p=m=S:m=m.next=S,l=l.next}while(l!==null);m===null?p=m=o:m=m.next=o}else p=m=o;l={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:c.shared,callbacks:c.callbacks},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=o:i.next=o,l.lastBaseUpdate=o}var cy=!1;function Cu(){if(cy){var i=$s;if(i!==null)throw i}}function Tu(i,o,l,c){cy=!1;var p=i.updateQueue;Oo=!1;var m=p.firstBaseUpdate,S=p.lastBaseUpdate,k=p.shared.pending;if(k!==null){p.shared.pending=null;var j=k,J=j.next;j.next=null,S===null?m=J:S.next=J,S=j;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,k=ie.lastBaseUpdate,k!==S&&(k===null?ie.firstBaseUpdate=J:k.next=J,ie.lastBaseUpdate=j))}if(m!==null){var le=p.baseState;S=0,ie=J=j=null,k=m;do{var ee=k.lane&-536870913,ne=ee!==k.lane;if(ne?(st&ee)===ee:(c&ee)===ee){ee!==0&&ee===Ls&&(cy=!0),ie!==null&&(ie=ie.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ce=i,Pe=k;ee=o;var jt=l;switch(Pe.tag){case 1:if(Ce=Pe.payload,typeof Ce=="function"){le=Ce.call(jt,le,ee);break e}le=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Pe.payload,ee=typeof Ce=="function"?Ce.call(jt,le,ee):Ce,ee==null)break e;le=y({},le,ee);break e;case 2:Oo=!0}}ee=k.callback,ee!==null&&(i.flags|=64,ne&&(i.flags|=8192),ne=p.callbacks,ne===null?p.callbacks=[ee]:ne.push(ee))}else ne={lane:ee,tag:k.tag,payload:k.payload,callback:k.callback,next:null},ie===null?(J=ie=ne,j=le):ie=ie.next=ne,S|=ee;if(k=k.next,k===null){if(k=p.shared.pending,k===null)break;ne=k,k=ne.next,ne.next=null,p.lastBaseUpdate=ne,p.shared.pending=null}}while(!0);ie===null&&(j=le),p.baseState=j,p.firstBaseUpdate=J,p.lastBaseUpdate=ie,m===null&&(p.shared.lanes=0),Lo|=S,i.lanes=S,i.memoizedState=le}}function Rw(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function Ow(i,o){var l=i.callbacks;if(l!==null)for(i.callbacks=null,i=0;i<l.length;i++)Rw(l[i],o)}var js=z(null),Ad=z(0);function Nw(i,o){i=io,I(Ad,i),I(js,o),io=i|o.baseLanes}function fy(){I(Ad,io),I(js,js.current)}function dy(){io=Ad.current,W(js),W(Ad)}var kr=z(null),Yr=null;function Mo(i){var o=i.alternate;I(bn,bn.current&1),I(kr,i),Yr===null&&(o===null||js.current!==null||o.memoizedState!==null)&&(Yr=i)}function hy(i){I(bn,bn.current),I(kr,i),Yr===null&&(Yr=i)}function Iw(i){i.tag===22?(I(bn,bn.current),I(kr,i),Yr===null&&(Yr=i)):Do()}function Do(){I(bn,bn.current),I(kr,kr.current)}function Rr(i){W(kr),Yr===i&&(Yr=null),W(bn)}var bn=z(0);function kd(i){for(var o=i;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||b0(l)||S0(l)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Ki=0,Ye=null,Pt=null,kn=null,Rd=!1,Hs=!1,Ba=!1,Od=0,Au=0,Vs=null,j8=0;function pn(){throw Error(r(321))}function py(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!Tr(i[l],o[l]))return!1;return!0}function my(i,o,l,c,p,m){return Ki=m,Ye=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,D.H=i===null||i.memoizedState===null?mC:Oy,Ba=!1,m=l(c,p),Ba=!1,Hs&&(m=Dw(o,l,c,p)),Mw(i),m}function Mw(i){D.H=Ou;var o=Pt!==null&&Pt.next!==null;if(Ki=0,kn=Pt=Ye=null,Rd=!1,Au=0,Vs=null,o)throw Error(r(300));i===null||Rn||(i=i.dependencies,i!==null&&Sd(i)&&(Rn=!0))}function Dw(i,o,l,c){Ye=i;var p=0;do{if(Hs&&(Vs=null),Au=0,Hs=!1,25<=p)throw Error(r(301));if(p+=1,kn=Pt=null,i.updateQueue!=null){var m=i.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}D.H=gC,m=o(l,c)}while(Hs);return m}function H8(){var i=D.H,o=i.useState()[0];return o=typeof o.then=="function"?ku(o):o,i=i.useState()[0],(Pt!==null?Pt.memoizedState:null)!==i&&(Ye.flags|=1024),o}function gy(){var i=Od!==0;return Od=0,i}function yy(i,o,l){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~l}function vy(i){if(Rd){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Rd=!1}Ki=0,kn=Pt=Ye=null,Hs=!1,Au=Od=0,Vs=null}function or(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kn===null?Ye.memoizedState=kn=i:kn=kn.next=i,kn}function Sn(){if(Pt===null){var i=Ye.alternate;i=i!==null?i.memoizedState:null}else i=Pt.next;var o=kn===null?Ye.memoizedState:kn.next;if(o!==null)kn=o,Pt=i;else{if(i===null)throw Ye.alternate===null?Error(r(467)):Error(r(310));Pt=i,i={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},kn===null?Ye.memoizedState=kn=i:kn=kn.next=i}return kn}function Nd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ku(i){var o=Au;return Au+=1,Vs===null&&(Vs=[]),i=ww(Vs,i,o),o=Ye,(kn===null?o.memoizedState:kn.next)===null&&(o=o.alternate,D.H=o===null||o.memoizedState===null?mC:Oy),i}function Id(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return ku(i);if(i.$$typeof===T)return Vn(i)}throw Error(r(438,String(i)))}function by(i){var o=null,l=Ye.updateQueue;if(l!==null&&(o=l.memoCache),o==null){var c=Ye.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(o={data:c.data.map(function(p){return p.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),l===null&&(l=Nd(),Ye.updateQueue=l),l.memoCache=o,l=o.data[o.index],l===void 0)for(l=o.data[o.index]=Array(i),c=0;c<i;c++)l[c]=K;return o.index++,l}function Wi(i,o){return typeof o=="function"?o(i):o}function Md(i){var o=Sn();return Sy(o,Pt,i)}function Sy(i,o,l){var c=i.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=l;var p=i.baseQueue,m=c.pending;if(m!==null){if(p!==null){var S=p.next;p.next=m.next,m.next=S}o.baseQueue=p=m,c.pending=null}if(m=i.baseState,p===null)i.memoizedState=m;else{o=p.next;var k=S=null,j=null,J=o,ie=!1;do{var le=J.lane&-536870913;if(le!==J.lane?(st&le)===le:(Ki&le)===le){var ee=J.revertLane;if(ee===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),le===Ls&&(ie=!0);else if((Ki&ee)===ee){J=J.next,ee===Ls&&(ie=!0);continue}else le={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},j===null?(k=j=le,S=m):j=j.next=le,Ye.lanes|=ee,Lo|=ee;le=J.action,Ba&&l(m,le),m=J.hasEagerState?J.eagerState:l(m,le)}else ee={lane:le,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},j===null?(k=j=ee,S=m):j=j.next=ee,Ye.lanes|=le,Lo|=le;J=J.next}while(J!==null&&J!==o);if(j===null?S=m:j.next=k,!Tr(m,i.memoizedState)&&(Rn=!0,ie&&(l=$s,l!==null)))throw l;i.memoizedState=m,i.baseState=S,i.baseQueue=j,c.lastRenderedState=m}return p===null&&(c.lanes=0),[i.memoizedState,c.dispatch]}function xy(i){var o=Sn(),l=o.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=i;var c=l.dispatch,p=l.pending,m=o.memoizedState;if(p!==null){l.pending=null;var S=p=p.next;do m=i(m,S.action),S=S.next;while(S!==p);Tr(m,o.memoizedState)||(Rn=!0),o.memoizedState=m,o.baseQueue===null&&(o.baseState=m),l.lastRenderedState=m}return[m,c]}function Bw(i,o,l){var c=Ye,p=Sn(),m=ct;if(m){if(l===void 0)throw Error(r(407));l=l()}else l=o();var S=!Tr((Pt||p).memoizedState,l);if(S&&(p.memoizedState=l,Rn=!0),p=p.queue,wy($w.bind(null,c,p,i),[i]),p.getSnapshot!==o||S||kn!==null&&kn.memoizedState.tag&1){if(c.flags|=2048,Fs(9,{destroy:void 0},Lw.bind(null,c,p,l,o),null),Vt===null)throw Error(r(349));m||(Ki&127)!==0||zw(c,o,l)}return l}function zw(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=Ye.updateQueue,o===null?(o=Nd(),Ye.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function Lw(i,o,l,c){o.value=l,o.getSnapshot=c,Pw(o)&&Uw(i)}function $w(i,o,l){return l(function(){Pw(o)&&Uw(i)})}function Pw(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!Tr(i,l)}catch{return!0}}function Uw(i){var o=Ta(i,2);o!==null&&gr(o,i,2)}function Ey(i){var o=or();if(typeof i=="function"){var l=i;if(i=l(),Ba){Qn(!0);try{l()}finally{Qn(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wi,lastRenderedState:i},o}function jw(i,o,l,c){return i.baseState=l,Sy(i,Pt,typeof c=="function"?c:Wi)}function V8(i,o,l,c,p){if(zd(i))throw Error(r(485));if(i=o.action,i!==null){var m={payload:p,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){m.listeners.push(S)}};D.T!==null?l(!0):m.isTransition=!1,c(m),l=o.pending,l===null?(m.next=o.pending=m,Hw(o,m)):(m.next=l.next,o.pending=l.next=m)}}function Hw(i,o){var l=o.action,c=o.payload,p=i.state;if(o.isTransition){var m=D.T,S={};D.T=S;try{var k=l(p,c),j=D.S;j!==null&&j(S,k),Vw(i,o,k)}catch(J){_y(i,o,J)}finally{m!==null&&S.types!==null&&(m.types=S.types),D.T=m}}else try{m=l(p,c),Vw(i,o,m)}catch(J){_y(i,o,J)}}function Vw(i,o,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){Fw(i,o,c)},function(c){return _y(i,o,c)}):Fw(i,o,l)}function Fw(i,o,l){o.status="fulfilled",o.value=l,Gw(o),i.state=l,o=i.pending,o!==null&&(l=o.next,l===o?i.pending=null:(l=l.next,o.next=l,Hw(i,l)))}function _y(i,o,l){var c=i.pending;if(i.pending=null,c!==null){c=c.next;do o.status="rejected",o.reason=l,Gw(o),o=o.next;while(o!==c)}i.action=null}function Gw(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function qw(i,o){return o}function Yw(i,o){if(ct){var l=Vt.formState;if(l!==null){e:{var c=Ye;if(ct){if(Xt){t:{for(var p=Xt,m=qr;p.nodeType!==8;){if(!m){p=null;break t}if(p=Xr(p.nextSibling),p===null){p=null;break t}}m=p.data,p=m==="F!"||m==="F"?p:null}if(p){Xt=Xr(p.nextSibling),c=p.data==="F!";break e}}ko(c)}c=!1}c&&(o=l[0])}}return l=or(),l.memoizedState=l.baseState=o,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qw,lastRenderedState:o},l.queue=c,l=dC.bind(null,Ye,c),c.dispatch=l,c=Ey(!1),m=Ry.bind(null,Ye,!1,c.queue),c=or(),p={state:o,dispatch:null,action:i,pending:null},c.queue=p,l=V8.bind(null,Ye,p,m,l),p.dispatch=l,c.memoizedState=i,[o,l,!1]}function Xw(i){var o=Sn();return Zw(o,Pt,i)}function Zw(i,o,l){if(o=Sy(i,o,qw)[0],i=Md(Wi)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var c=ku(o)}catch(S){throw S===Ps?_d:S}else c=o;o=Sn();var p=o.queue,m=p.dispatch;return l!==o.memoizedState&&(Ye.flags|=2048,Fs(9,{destroy:void 0},F8.bind(null,p,l),null)),[c,m,i]}function F8(i,o){i.action=o}function Kw(i){var o=Sn(),l=Pt;if(l!==null)return Zw(o,l,i);Sn(),o=o.memoizedState,l=Sn();var c=l.queue.dispatch;return l.memoizedState=i,[o,c,!1]}function Fs(i,o,l,c){return i={tag:i,create:l,deps:c,inst:o,next:null},o=Ye.updateQueue,o===null&&(o=Nd(),Ye.updateQueue=o),l=o.lastEffect,l===null?o.lastEffect=i.next=i:(c=l.next,l.next=i,i.next=c,o.lastEffect=i),i}function Ww(){return Sn().memoizedState}function Dd(i,o,l,c){var p=or();Ye.flags|=i,p.memoizedState=Fs(1|o,{destroy:void 0},l,c===void 0?null:c)}function Bd(i,o,l,c){var p=Sn();c=c===void 0?null:c;var m=p.memoizedState.inst;Pt!==null&&c!==null&&py(c,Pt.memoizedState.deps)?p.memoizedState=Fs(o,m,l,c):(Ye.flags|=i,p.memoizedState=Fs(1|o,m,l,c))}function Qw(i,o){Dd(8390656,8,i,o)}function wy(i,o){Bd(2048,8,i,o)}function G8(i){Ye.flags|=4;var o=Ye.updateQueue;if(o===null)o=Nd(),Ye.updateQueue=o,o.events=[i];else{var l=o.events;l===null?o.events=[i]:l.push(i)}}function Jw(i){var o=Sn().memoizedState;return G8({ref:o,nextImpl:i}),function(){if((St&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function eC(i,o){return Bd(4,2,i,o)}function tC(i,o){return Bd(4,4,i,o)}function nC(i,o){if(typeof o=="function"){i=i();var l=o(i);return function(){typeof l=="function"?l():o(null)}}if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function rC(i,o,l){l=l!=null?l.concat([i]):null,Bd(4,4,nC.bind(null,o,i),l)}function Cy(){}function iC(i,o){var l=Sn();o=o===void 0?null:o;var c=l.memoizedState;return o!==null&&py(o,c[1])?c[0]:(l.memoizedState=[i,o],i)}function oC(i,o){var l=Sn();o=o===void 0?null:o;var c=l.memoizedState;if(o!==null&&py(o,c[1]))return c[0];if(c=i(),Ba){Qn(!0);try{i()}finally{Qn(!1)}}return l.memoizedState=[c,o],c}function Ty(i,o,l){return l===void 0||(Ki&1073741824)!==0&&(st&261930)===0?i.memoizedState=o:(i.memoizedState=l,i=aT(),Ye.lanes|=i,Lo|=i,l)}function aC(i,o,l,c){return Tr(l,o)?l:js.current!==null?(i=Ty(i,l,c),Tr(i,o)||(Rn=!0),i):(Ki&42)===0||(Ki&1073741824)!==0&&(st&261930)===0?(Rn=!0,i.memoizedState=l):(i=aT(),Ye.lanes|=i,Lo|=i,o)}function sC(i,o,l,c,p){var m=Z.p;Z.p=m!==0&&8>m?m:8;var S=D.T,k={};D.T=k,Ry(i,!1,o,l);try{var j=p(),J=D.S;if(J!==null&&J(k,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var ie=U8(j,c);Ru(i,o,ie,Ir(i))}else Ru(i,o,c,Ir(i))}catch(le){Ru(i,o,{then:function(){},status:"rejected",reason:le},Ir())}finally{Z.p=m,S!==null&&k.types!==null&&(S.types=k.types),D.T=S}}function q8(){}function Ay(i,o,l,c){if(i.tag!==5)throw Error(r(476));var p=lC(i).queue;sC(i,p,o,se,l===null?q8:function(){return uC(i),l(c)})}function lC(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wi,lastRenderedState:se},next:null};var l={};return o.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wi,lastRenderedState:l},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function uC(i){var o=lC(i);o.next===null&&(o=i.alternate.memoizedState),Ru(i,o.next.queue,{},Ir())}function ky(){return Vn(qu)}function cC(){return Sn().memoizedState}function fC(){return Sn().memoizedState}function Y8(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var l=Ir();i=No(l);var c=Io(o,i,l);c!==null&&(gr(c,o,l),wu(c,o,l)),o={cache:ry()},i.payload=o;return}o=o.return}}function X8(i,o,l){var c=Ir();l={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},zd(i)?hC(o,l):(l=qg(i,o,l,c),l!==null&&(gr(l,i,c),pC(l,o,c)))}function dC(i,o,l){var c=Ir();Ru(i,o,l,c)}function Ru(i,o,l,c){var p={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(zd(i))hC(o,p);else{var m=i.alternate;if(i.lanes===0&&(m===null||m.lanes===0)&&(m=o.lastRenderedReducer,m!==null))try{var S=o.lastRenderedState,k=m(S,l);if(p.hasEagerState=!0,p.eagerState=k,Tr(k,S))return gd(i,o,p,0),Vt===null&&md(),!1}catch{}if(l=qg(i,o,p,c),l!==null)return gr(l,i,c),pC(l,o,c),!0}return!1}function Ry(i,o,l,c){if(c={lane:2,revertLane:s0(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},zd(i)){if(o)throw Error(r(479))}else o=qg(i,l,c,2),o!==null&&gr(o,i,2)}function zd(i){var o=i.alternate;return i===Ye||o!==null&&o===Ye}function hC(i,o){Hs=Rd=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function pC(i,o,l){if((l&4194048)!==0){var c=o.lanes;c&=i.pendingLanes,l|=c,o.lanes=l,b_(i,l)}}var Ou={readContext:Vn,use:Id,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useLayoutEffect:pn,useInsertionEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useDeferredValue:pn,useTransition:pn,useSyncExternalStore:pn,useId:pn,useHostTransitionStatus:pn,useFormState:pn,useActionState:pn,useOptimistic:pn,useMemoCache:pn,useCacheRefresh:pn};Ou.useEffectEvent=pn;var mC={readContext:Vn,use:Id,useCallback:function(i,o){return or().memoizedState=[i,o===void 0?null:o],i},useContext:Vn,useEffect:Qw,useImperativeHandle:function(i,o,l){l=l!=null?l.concat([i]):null,Dd(4194308,4,nC.bind(null,o,i),l)},useLayoutEffect:function(i,o){return Dd(4194308,4,i,o)},useInsertionEffect:function(i,o){Dd(4,2,i,o)},useMemo:function(i,o){var l=or();o=o===void 0?null:o;var c=i();if(Ba){Qn(!0);try{i()}finally{Qn(!1)}}return l.memoizedState=[c,o],c},useReducer:function(i,o,l){var c=or();if(l!==void 0){var p=l(o);if(Ba){Qn(!0);try{l(o)}finally{Qn(!1)}}}else p=o;return c.memoizedState=c.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},c.queue=i,i=i.dispatch=X8.bind(null,Ye,i),[c.memoizedState,i]},useRef:function(i){var o=or();return i={current:i},o.memoizedState=i},useState:function(i){i=Ey(i);var o=i.queue,l=dC.bind(null,Ye,o);return o.dispatch=l,[i.memoizedState,l]},useDebugValue:Cy,useDeferredValue:function(i,o){var l=or();return Ty(l,i,o)},useTransition:function(){var i=Ey(!1);return i=sC.bind(null,Ye,i.queue,!0,!1),or().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,l){var c=Ye,p=or();if(ct){if(l===void 0)throw Error(r(407));l=l()}else{if(l=o(),Vt===null)throw Error(r(349));(st&127)!==0||zw(c,o,l)}p.memoizedState=l;var m={value:l,getSnapshot:o};return p.queue=m,Qw($w.bind(null,c,m,i),[i]),c.flags|=2048,Fs(9,{destroy:void 0},Lw.bind(null,c,m,l,o),null),l},useId:function(){var i=or(),o=Vt.identifierPrefix;if(ct){var l=ki,c=Ai;l=(c&~(1<<32-At(c)-1)).toString(32)+l,o="_"+o+"R_"+l,l=Od++,0<l&&(o+="H"+l.toString(32)),o+="_"}else l=j8++,o="_"+o+"r_"+l.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:ky,useFormState:Yw,useActionState:Yw,useOptimistic:function(i){var o=or();o.memoizedState=o.baseState=i;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=l,o=Ry.bind(null,Ye,!0,l),l.dispatch=o,[i,o]},useMemoCache:by,useCacheRefresh:function(){return or().memoizedState=Y8.bind(null,Ye)},useEffectEvent:function(i){var o=or(),l={impl:i};return o.memoizedState=l,function(){if((St&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Oy={readContext:Vn,use:Id,useCallback:iC,useContext:Vn,useEffect:wy,useImperativeHandle:rC,useInsertionEffect:eC,useLayoutEffect:tC,useMemo:oC,useReducer:Md,useRef:Ww,useState:function(){return Md(Wi)},useDebugValue:Cy,useDeferredValue:function(i,o){var l=Sn();return aC(l,Pt.memoizedState,i,o)},useTransition:function(){var i=Md(Wi)[0],o=Sn().memoizedState;return[typeof i=="boolean"?i:ku(i),o]},useSyncExternalStore:Bw,useId:cC,useHostTransitionStatus:ky,useFormState:Xw,useActionState:Xw,useOptimistic:function(i,o){var l=Sn();return jw(l,Pt,i,o)},useMemoCache:by,useCacheRefresh:fC};Oy.useEffectEvent=Jw;var gC={readContext:Vn,use:Id,useCallback:iC,useContext:Vn,useEffect:wy,useImperativeHandle:rC,useInsertionEffect:eC,useLayoutEffect:tC,useMemo:oC,useReducer:xy,useRef:Ww,useState:function(){return xy(Wi)},useDebugValue:Cy,useDeferredValue:function(i,o){var l=Sn();return Pt===null?Ty(l,i,o):aC(l,Pt.memoizedState,i,o)},useTransition:function(){var i=xy(Wi)[0],o=Sn().memoizedState;return[typeof i=="boolean"?i:ku(i),o]},useSyncExternalStore:Bw,useId:cC,useHostTransitionStatus:ky,useFormState:Kw,useActionState:Kw,useOptimistic:function(i,o){var l=Sn();return Pt!==null?jw(l,Pt,i,o):(l.baseState=i,[i,l.queue.dispatch])},useMemoCache:by,useCacheRefresh:fC};gC.useEffectEvent=Jw;function Ny(i,o,l,c){o=i.memoizedState,l=l(c,o),l=l==null?o:y({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Iy={enqueueSetState:function(i,o,l){i=i._reactInternals;var c=Ir(),p=No(c);p.payload=o,l!=null&&(p.callback=l),o=Io(i,p,c),o!==null&&(gr(o,i,c),wu(o,i,c))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var c=Ir(),p=No(c);p.tag=1,p.payload=o,l!=null&&(p.callback=l),o=Io(i,p,c),o!==null&&(gr(o,i,c),wu(o,i,c))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=Ir(),c=No(l);c.tag=2,o!=null&&(c.callback=o),o=Io(i,c,l),o!==null&&(gr(o,i,l),wu(o,i,l))}};function yC(i,o,l,c,p,m,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(c,m,S):o.prototype&&o.prototype.isPureReactComponent?!gu(l,c)||!gu(p,m):!0}function vC(i,o,l,c){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,c),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,c),o.state!==i&&Iy.enqueueReplaceState(o,o.state,null)}function za(i,o){var l=o;if("ref"in o){l={};for(var c in o)c!=="ref"&&(l[c]=o[c])}if(i=i.defaultProps){l===o&&(l=y({},l));for(var p in i)l[p]===void 0&&(l[p]=i[p])}return l}function bC(i){pd(i)}function SC(i){console.error(i)}function xC(i){pd(i)}function Ld(i,o){try{var l=i.onUncaughtError;l(o.value,{componentStack:o.stack})}catch(c){setTimeout(function(){throw c})}}function EC(i,o,l){try{var c=i.onCaughtError;c(l.value,{componentStack:l.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function My(i,o,l){return l=No(l),l.tag=3,l.payload={element:null},l.callback=function(){Ld(i,o)},l}function _C(i){return i=No(i),i.tag=3,i}function wC(i,o,l,c){var p=l.type.getDerivedStateFromError;if(typeof p=="function"){var m=c.value;i.payload=function(){return p(m)},i.callback=function(){EC(o,l,c)}}var S=l.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(i.callback=function(){EC(o,l,c),typeof p!="function"&&($o===null?$o=new Set([this]):$o.add(this));var k=c.stack;this.componentDidCatch(c.value,{componentStack:k!==null?k:""})})}function Z8(i,o,l,c,p){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(o=l.alternate,o!==null&&zs(o,l,p,!0),l=kr.current,l!==null){switch(l.tag){case 31:case 13:return Yr===null?Zd():l.alternate===null&&mn===0&&(mn=3),l.flags&=-257,l.flags|=65536,l.lanes=p,c===wd?l.flags|=16384:(o=l.updateQueue,o===null?l.updateQueue=new Set([c]):o.add(c),i0(i,c,p)),!1;case 22:return l.flags|=65536,c===wd?l.flags|=16384:(o=l.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=o):(l=o.retryQueue,l===null?o.retryQueue=new Set([c]):l.add(c)),i0(i,c,p)),!1}throw Error(r(435,l.tag))}return i0(i,c,p),Zd(),!1}if(ct)return o=kr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=p,c!==Qg&&(i=Error(r(422),{cause:c}),bu(Vr(i,l)))):(c!==Qg&&(o=Error(r(423),{cause:c}),bu(Vr(o,l))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,c=Vr(c,l),p=My(i.stateNode,c,p),uy(i,p),mn!==4&&(mn=2)),!1;var m=Error(r(520),{cause:c});if(m=Vr(m,l),$u===null?$u=[m]:$u.push(m),mn!==4&&(mn=2),o===null)return!0;c=Vr(c,l),l=o;do{switch(l.tag){case 3:return l.flags|=65536,i=p&-p,l.lanes|=i,i=My(l.stateNode,c,i),uy(l,i),!1;case 1:if(o=l.type,m=l.stateNode,(l.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&($o===null||!$o.has(m))))return l.flags|=65536,p&=-p,l.lanes|=p,p=_C(p),wC(p,i,l,c),uy(l,p),!1}l=l.return}while(l!==null);return!1}var Dy=Error(r(461)),Rn=!1;function Fn(i,o,l,c){o.child=i===null?kw(o,null,l,c):Da(o,i.child,l,c)}function CC(i,o,l,c,p){l=l.render;var m=o.ref;if("ref"in c){var S={};for(var k in c)k!=="ref"&&(S[k]=c[k])}else S=c;return Oa(o),c=my(i,o,l,S,m,p),k=gy(),i!==null&&!Rn?(yy(i,o,p),Qi(i,o,p)):(ct&&k&&Kg(o),o.flags|=1,Fn(i,o,c,p),o.child)}function TC(i,o,l,c,p){if(i===null){var m=l.type;return typeof m=="function"&&!Yg(m)&&m.defaultProps===void 0&&l.compare===null?(o.tag=15,o.type=m,AC(i,o,m,c,p)):(i=vd(l.type,null,c,o,o.mode,p),i.ref=o.ref,i.return=o,o.child=i)}if(m=i.child,!Hy(i,p)){var S=m.memoizedProps;if(l=l.compare,l=l!==null?l:gu,l(S,c)&&i.ref===o.ref)return Qi(i,o,p)}return o.flags|=1,i=qi(m,c),i.ref=o.ref,i.return=o,o.child=i}function AC(i,o,l,c,p){if(i!==null){var m=i.memoizedProps;if(gu(m,c)&&i.ref===o.ref)if(Rn=!1,o.pendingProps=c=m,Hy(i,p))(i.flags&131072)!==0&&(Rn=!0);else return o.lanes=i.lanes,Qi(i,o,p)}return By(i,o,l,c,p)}function kC(i,o,l,c){var p=c.children,m=i!==null?i.memoizedState:null;if(i===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((o.flags&128)!==0){if(m=m!==null?m.baseLanes|l:l,i!==null){for(c=o.child=i.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~m}else c=0,o.child=null;return RC(i,o,m,l,c)}if((l&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&Ed(o,m!==null?m.cachePool:null),m!==null?Nw(o,m):fy(),Iw(o);else return c=o.lanes=536870912,RC(i,o,m!==null?m.baseLanes|l:l,l,c)}else m!==null?(Ed(o,m.cachePool),Nw(o,m),Do(),o.memoizedState=null):(i!==null&&Ed(o,null),fy(),Do());return Fn(i,o,p,l),o.child}function Nu(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function RC(i,o,l,c,p){var m=oy();return m=m===null?null:{parent:An._currentValue,pool:m},o.memoizedState={baseLanes:l,cachePool:m},i!==null&&Ed(o,null),fy(),Iw(o),i!==null&&zs(i,o,c,!0),o.childLanes=p,null}function $d(i,o){return o=Ud({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function OC(i,o,l){return Da(o,i.child,null,l),i=$d(o,o.pendingProps),i.flags|=2,Rr(o),o.memoizedState=null,i}function K8(i,o,l){var c=o.pendingProps,p=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(ct){if(c.mode==="hidden")return i=$d(o,c),o.lanes=536870912,Nu(null,i);if(hy(o),(i=Xt)?(i=HT(i,qr),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:To!==null?{id:Ai,overflow:ki}:null,retryLane:536870912,hydrationErrors:null},l=hw(i),l.return=o,o.child=l,Hn=o,Xt=null)):i=null,i===null)throw ko(o);return o.lanes=536870912,null}return $d(o,c)}var m=i.memoizedState;if(m!==null){var S=m.dehydrated;if(hy(o),p)if(o.flags&256)o.flags&=-257,o=OC(i,o,l);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(r(558));else if(Rn||zs(i,o,l,!1),p=(l&i.childLanes)!==0,Rn||p){if(c=Vt,c!==null&&(S=S_(c,l),S!==0&&S!==m.retryLane))throw m.retryLane=S,Ta(i,S),gr(c,i,S),Dy;Zd(),o=OC(i,o,l)}else i=m.treeContext,Xt=Xr(S.nextSibling),Hn=o,ct=!0,Ao=null,qr=!1,i!==null&&gw(o,i),o=$d(o,c),o.flags|=4096;return o}return i=qi(i.child,{mode:c.mode,children:c.children}),i.ref=o.ref,o.child=i,i.return=o,i}function Pd(i,o){var l=o.ref;if(l===null)i!==null&&i.ref!==null&&(o.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(i===null||i.ref!==l)&&(o.flags|=4194816)}}function By(i,o,l,c,p){return Oa(o),l=my(i,o,l,c,void 0,p),c=gy(),i!==null&&!Rn?(yy(i,o,p),Qi(i,o,p)):(ct&&c&&Kg(o),o.flags|=1,Fn(i,o,l,p),o.child)}function NC(i,o,l,c,p,m){return Oa(o),o.updateQueue=null,l=Dw(o,c,l,p),Mw(i),c=gy(),i!==null&&!Rn?(yy(i,o,m),Qi(i,o,m)):(ct&&c&&Kg(o),o.flags|=1,Fn(i,o,l,m),o.child)}function IC(i,o,l,c,p){if(Oa(o),o.stateNode===null){var m=Is,S=l.contextType;typeof S=="object"&&S!==null&&(m=Vn(S)),m=new l(c,m),o.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Iy,o.stateNode=m,m._reactInternals=o,m=o.stateNode,m.props=c,m.state=o.memoizedState,m.refs={},sy(o),S=l.contextType,m.context=typeof S=="object"&&S!==null?Vn(S):Is,m.state=o.memoizedState,S=l.getDerivedStateFromProps,typeof S=="function"&&(Ny(o,l,S,c),m.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(S=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),S!==m.state&&Iy.enqueueReplaceState(m,m.state,null),Tu(o,c,m,p),Cu(),m.state=o.memoizedState),typeof m.componentDidMount=="function"&&(o.flags|=4194308),c=!0}else if(i===null){m=o.stateNode;var k=o.memoizedProps,j=za(l,k);m.props=j;var J=m.context,ie=l.contextType;S=Is,typeof ie=="object"&&ie!==null&&(S=Vn(ie));var le=l.getDerivedStateFromProps;ie=typeof le=="function"||typeof m.getSnapshotBeforeUpdate=="function",k=o.pendingProps!==k,ie||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k||J!==S)&&vC(o,m,c,S),Oo=!1;var ee=o.memoizedState;m.state=ee,Tu(o,c,m,p),Cu(),J=o.memoizedState,k||ee!==J||Oo?(typeof le=="function"&&(Ny(o,l,le,c),J=o.memoizedState),(j=Oo||yC(o,l,j,c,ee,J,S))?(ie||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(o.flags|=4194308)):(typeof m.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=c,o.memoizedState=J),m.props=c,m.state=J,m.context=S,c=j):(typeof m.componentDidMount=="function"&&(o.flags|=4194308),c=!1)}else{m=o.stateNode,ly(i,o),S=o.memoizedProps,ie=za(l,S),m.props=ie,le=o.pendingProps,ee=m.context,J=l.contextType,j=Is,typeof J=="object"&&J!==null&&(j=Vn(J)),k=l.getDerivedStateFromProps,(J=typeof k=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S!==le||ee!==j)&&vC(o,m,c,j),Oo=!1,ee=o.memoizedState,m.state=ee,Tu(o,c,m,p),Cu();var ne=o.memoizedState;S!==le||ee!==ne||Oo||i!==null&&i.dependencies!==null&&Sd(i.dependencies)?(typeof k=="function"&&(Ny(o,l,k,c),ne=o.memoizedState),(ie=Oo||yC(o,l,ie,c,ee,ne,j)||i!==null&&i.dependencies!==null&&Sd(i.dependencies))?(J||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(c,ne,j),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(c,ne,j)),typeof m.componentDidUpdate=="function"&&(o.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof m.componentDidUpdate!="function"||S===i.memoizedProps&&ee===i.memoizedState||(o.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&ee===i.memoizedState||(o.flags|=1024),o.memoizedProps=c,o.memoizedState=ne),m.props=c,m.state=ne,m.context=j,c=ie):(typeof m.componentDidUpdate!="function"||S===i.memoizedProps&&ee===i.memoizedState||(o.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&ee===i.memoizedState||(o.flags|=1024),c=!1)}return m=c,Pd(i,o),c=(o.flags&128)!==0,m||c?(m=o.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:m.render(),o.flags|=1,i!==null&&c?(o.child=Da(o,i.child,null,p),o.child=Da(o,null,l,p)):Fn(i,o,l,p),o.memoizedState=m.state,i=o.child):i=Qi(i,o,p),i}function MC(i,o,l,c){return ka(),o.flags|=256,Fn(i,o,l,c),o.child}var zy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ly(i){return{baseLanes:i,cachePool:Ew()}}function $y(i,o,l){return i=i!==null?i.childLanes&~l:0,o&&(i|=Nr),i}function DC(i,o,l){var c=o.pendingProps,p=!1,m=(o.flags&128)!==0,S;if((S=m)||(S=i!==null&&i.memoizedState===null?!1:(bn.current&2)!==0),S&&(p=!0,o.flags&=-129),S=(o.flags&32)!==0,o.flags&=-33,i===null){if(ct){if(p?Mo(o):Do(),(i=Xt)?(i=HT(i,qr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:To!==null?{id:Ai,overflow:ki}:null,retryLane:536870912,hydrationErrors:null},l=hw(i),l.return=o,o.child=l,Hn=o,Xt=null)):i=null,i===null)throw ko(o);return S0(i)?o.lanes=32:o.lanes=536870912,null}var k=c.children;return c=c.fallback,p?(Do(),p=o.mode,k=Ud({mode:"hidden",children:k},p),c=Aa(c,p,l,null),k.return=o,c.return=o,k.sibling=c,o.child=k,c=o.child,c.memoizedState=Ly(l),c.childLanes=$y(i,S,l),o.memoizedState=zy,Nu(null,c)):(Mo(o),Py(o,k))}var j=i.memoizedState;if(j!==null&&(k=j.dehydrated,k!==null)){if(m)o.flags&256?(Mo(o),o.flags&=-257,o=Uy(i,o,l)):o.memoizedState!==null?(Do(),o.child=i.child,o.flags|=128,o=null):(Do(),k=c.fallback,p=o.mode,c=Ud({mode:"visible",children:c.children},p),k=Aa(k,p,l,null),k.flags|=2,c.return=o,k.return=o,c.sibling=k,o.child=c,Da(o,i.child,null,l),c=o.child,c.memoizedState=Ly(l),c.childLanes=$y(i,S,l),o.memoizedState=zy,o=Nu(null,c));else if(Mo(o),S0(k)){if(S=k.nextSibling&&k.nextSibling.dataset,S)var J=S.dgst;S=J,c=Error(r(419)),c.stack="",c.digest=S,bu({value:c,source:null,stack:null}),o=Uy(i,o,l)}else if(Rn||zs(i,o,l,!1),S=(l&i.childLanes)!==0,Rn||S){if(S=Vt,S!==null&&(c=S_(S,l),c!==0&&c!==j.retryLane))throw j.retryLane=c,Ta(i,c),gr(S,i,c),Dy;b0(k)||Zd(),o=Uy(i,o,l)}else b0(k)?(o.flags|=192,o.child=i.child,o=null):(i=j.treeContext,Xt=Xr(k.nextSibling),Hn=o,ct=!0,Ao=null,qr=!1,i!==null&&gw(o,i),o=Py(o,c.children),o.flags|=4096);return o}return p?(Do(),k=c.fallback,p=o.mode,j=i.child,J=j.sibling,c=qi(j,{mode:"hidden",children:c.children}),c.subtreeFlags=j.subtreeFlags&65011712,J!==null?k=qi(J,k):(k=Aa(k,p,l,null),k.flags|=2),k.return=o,c.return=o,c.sibling=k,o.child=c,Nu(null,c),c=o.child,k=i.child.memoizedState,k===null?k=Ly(l):(p=k.cachePool,p!==null?(j=An._currentValue,p=p.parent!==j?{parent:j,pool:j}:p):p=Ew(),k={baseLanes:k.baseLanes|l,cachePool:p}),c.memoizedState=k,c.childLanes=$y(i,S,l),o.memoizedState=zy,Nu(i.child,c)):(Mo(o),l=i.child,i=l.sibling,l=qi(l,{mode:"visible",children:c.children}),l.return=o,l.sibling=null,i!==null&&(S=o.deletions,S===null?(o.deletions=[i],o.flags|=16):S.push(i)),o.child=l,o.memoizedState=null,l)}function Py(i,o){return o=Ud({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Ud(i,o){return i=Ar(22,i,null,o),i.lanes=0,i}function Uy(i,o,l){return Da(o,i.child,null,l),i=Py(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function BC(i,o,l){i.lanes|=o;var c=i.alternate;c!==null&&(c.lanes|=o),ty(i.return,o,l)}function jy(i,o,l,c,p,m){var S=i.memoizedState;S===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:p,treeForkCount:m}:(S.isBackwards=o,S.rendering=null,S.renderingStartTime=0,S.last=c,S.tail=l,S.tailMode=p,S.treeForkCount=m)}function zC(i,o,l){var c=o.pendingProps,p=c.revealOrder,m=c.tail;c=c.children;var S=bn.current,k=(S&2)!==0;if(k?(S=S&1|2,o.flags|=128):S&=1,I(bn,S),Fn(i,o,c,l),c=ct?vu:0,!k&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&BC(i,l,o);else if(i.tag===19)BC(i,l,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(p){case"forwards":for(l=o.child,p=null;l!==null;)i=l.alternate,i!==null&&kd(i)===null&&(p=l),l=l.sibling;l=p,l===null?(p=o.child,o.child=null):(p=l.sibling,l.sibling=null),jy(o,!1,p,l,m,c);break;case"backwards":case"unstable_legacy-backwards":for(l=null,p=o.child,o.child=null;p!==null;){if(i=p.alternate,i!==null&&kd(i)===null){o.child=p;break}i=p.sibling,p.sibling=l,l=p,p=i}jy(o,!0,l,null,m,c);break;case"together":jy(o,!1,null,null,void 0,c);break;default:o.memoizedState=null}return o.child}function Qi(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),Lo|=o.lanes,(l&o.childLanes)===0)if(i!==null){if(zs(i,o,l,!1),(l&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error(r(153));if(o.child!==null){for(i=o.child,l=qi(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=qi(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function Hy(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&Sd(i)))}function W8(i,o,l){switch(o.tag){case 3:Ke(o,o.stateNode.containerInfo),Ro(o,An,i.memoizedState.cache),ka();break;case 27:case 5:Me(o);break;case 4:Ke(o,o.stateNode.containerInfo);break;case 10:Ro(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,hy(o),null;break;case 13:var c=o.memoizedState;if(c!==null)return c.dehydrated!==null?(Mo(o),o.flags|=128,null):(l&o.child.childLanes)!==0?DC(i,o,l):(Mo(o),i=Qi(i,o,l),i!==null?i.sibling:null);Mo(o);break;case 19:var p=(i.flags&128)!==0;if(c=(l&o.childLanes)!==0,c||(zs(i,o,l,!1),c=(l&o.childLanes)!==0),p){if(c)return zC(i,o,l);o.flags|=128}if(p=o.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),I(bn,bn.current),c)break;return null;case 22:return o.lanes=0,kC(i,o,l,o.pendingProps);case 24:Ro(o,An,i.memoizedState.cache)}return Qi(i,o,l)}function LC(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps)Rn=!0;else{if(!Hy(i,l)&&(o.flags&128)===0)return Rn=!1,W8(i,o,l);Rn=(i.flags&131072)!==0}else Rn=!1,ct&&(o.flags&1048576)!==0&&mw(o,vu,o.index);switch(o.lanes=0,o.tag){case 16:e:{var c=o.pendingProps;if(i=Ia(o.elementType),o.type=i,typeof i=="function")Yg(i)?(c=za(i,c),o.tag=1,o=IC(null,o,i,c,l)):(o.tag=0,o=By(null,o,i,c,l));else{if(i!=null){var p=i.$$typeof;if(p===A){o.tag=11,o=CC(null,o,i,c,l);break e}else if(p===$){o.tag=14,o=TC(null,o,i,c,l);break e}}throw o=U(i)||i,Error(r(306,o,""))}}return o;case 0:return By(i,o,o.type,o.pendingProps,l);case 1:return c=o.type,p=za(c,o.pendingProps),IC(i,o,c,p,l);case 3:e:{if(Ke(o,o.stateNode.containerInfo),i===null)throw Error(r(387));c=o.pendingProps;var m=o.memoizedState;p=m.element,ly(i,o),Tu(o,c,null,l);var S=o.memoizedState;if(c=S.cache,Ro(o,An,c),c!==m.cache&&ny(o,[An],l,!0),Cu(),c=S.element,m.isDehydrated)if(m={element:c,isDehydrated:!1,cache:S.cache},o.updateQueue.baseState=m,o.memoizedState=m,o.flags&256){o=MC(i,o,c,l);break e}else if(c!==p){p=Vr(Error(r(424)),o),bu(p),o=MC(i,o,c,l);break e}else for(i=o.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,Xt=Xr(i.firstChild),Hn=o,ct=!0,Ao=null,qr=!0,l=kw(o,null,c,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ka(),c===p){o=Qi(i,o,l);break e}Fn(i,o,c,l)}o=o.child}return o;case 26:return Pd(i,o),i===null?(l=XT(o.type,null,o.pendingProps,null))?o.memoizedState=l:ct||(l=o.type,i=o.pendingProps,c=nh(he.current).createElement(l),c[jn]=o,c[cr]=i,Gn(c,l,i),Ln(c),o.stateNode=c):o.memoizedState=XT(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return Me(o),i===null&&ct&&(c=o.stateNode=GT(o.type,o.pendingProps,he.current),Hn=o,qr=!0,p=Xt,Ho(o.type)?(x0=p,Xt=Xr(c.firstChild)):Xt=p),Fn(i,o,o.pendingProps.children,l),Pd(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&ct&&((p=c=Xt)&&(c=AU(c,o.type,o.pendingProps,qr),c!==null?(o.stateNode=c,Hn=o,Xt=Xr(c.firstChild),qr=!1,p=!0):p=!1),p||ko(o)),Me(o),p=o.type,m=o.pendingProps,S=i!==null?i.memoizedProps:null,c=m.children,g0(p,m)?c=null:S!==null&&g0(p,S)&&(o.flags|=32),o.memoizedState!==null&&(p=my(i,o,H8,null,null,l),qu._currentValue=p),Pd(i,o),Fn(i,o,c,l),o.child;case 6:return i===null&&ct&&((i=l=Xt)&&(l=kU(l,o.pendingProps,qr),l!==null?(o.stateNode=l,Hn=o,Xt=null,i=!0):i=!1),i||ko(o)),null;case 13:return DC(i,o,l);case 4:return Ke(o,o.stateNode.containerInfo),c=o.pendingProps,i===null?o.child=Da(o,null,c,l):Fn(i,o,c,l),o.child;case 11:return CC(i,o,o.type,o.pendingProps,l);case 7:return Fn(i,o,o.pendingProps,l),o.child;case 8:return Fn(i,o,o.pendingProps.children,l),o.child;case 12:return Fn(i,o,o.pendingProps.children,l),o.child;case 10:return c=o.pendingProps,Ro(o,o.type,c.value),Fn(i,o,c.children,l),o.child;case 9:return p=o.type._context,c=o.pendingProps.children,Oa(o),p=Vn(p),c=c(p),o.flags|=1,Fn(i,o,c,l),o.child;case 14:return TC(i,o,o.type,o.pendingProps,l);case 15:return AC(i,o,o.type,o.pendingProps,l);case 19:return zC(i,o,l);case 31:return K8(i,o,l);case 22:return kC(i,o,l,o.pendingProps);case 24:return Oa(o),c=Vn(An),i===null?(p=oy(),p===null&&(p=Vt,m=ry(),p.pooledCache=m,m.refCount++,m!==null&&(p.pooledCacheLanes|=l),p=m),o.memoizedState={parent:c,cache:p},sy(o),Ro(o,An,p)):((i.lanes&l)!==0&&(ly(i,o),Tu(o,null,null,l),Cu()),p=i.memoizedState,m=o.memoizedState,p.parent!==c?(p={parent:c,cache:c},o.memoizedState=p,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=p),Ro(o,An,c)):(c=m.cache,Ro(o,An,c),c!==p.cache&&ny(o,[An],l,!0))),Fn(i,o,o.pendingProps.children,l),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function Ji(i){i.flags|=4}function Vy(i,o,l,c,p){if((o=(i.mode&32)!==0)&&(o=!1),o){if(i.flags|=16777216,(p&335544128)===p)if(i.stateNode.complete)i.flags|=8192;else if(cT())i.flags|=8192;else throw Ma=wd,ay}else i.flags&=-16777217}function $C(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!JT(o))if(cT())i.flags|=8192;else throw Ma=wd,ay}function jd(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?y_():536870912,i.lanes|=o,Xs|=o)}function Iu(i,o){if(!ct)switch(i.tailMode){case"hidden":o=i.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:c.sibling=null}}function Zt(i){var o=i.alternate!==null&&i.alternate.child===i.child,l=0,c=0;if(o)for(var p=i.child;p!==null;)l|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=i,p=p.sibling;else for(p=i.child;p!==null;)l|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=i,p=p.sibling;return i.subtreeFlags|=c,i.childLanes=l,o}function Q8(i,o,l){var c=o.pendingProps;switch(Wg(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(o),null;case 1:return Zt(o),null;case 3:return l=o.stateNode,c=null,i!==null&&(c=i.memoizedState.cache),o.memoizedState.cache!==c&&(o.flags|=2048),Zi(An),Ie(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(i===null||i.child===null)&&(Bs(o)?Ji(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Jg())),Zt(o),null;case 26:var p=o.type,m=o.memoizedState;return i===null?(Ji(o),m!==null?(Zt(o),$C(o,m)):(Zt(o),Vy(o,p,null,c,l))):m?m!==i.memoizedState?(Ji(o),Zt(o),$C(o,m)):(Zt(o),o.flags&=-16777217):(i=i.memoizedProps,i!==c&&Ji(o),Zt(o),Vy(o,p,i,c,l)),null;case 27:if(Fe(o),l=he.current,p=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==c&&Ji(o);else{if(!c){if(o.stateNode===null)throw Error(r(166));return Zt(o),null}i=pe.current,Bs(o)?yw(o):(i=GT(p,c,l),o.stateNode=i,Ji(o))}return Zt(o),null;case 5:if(Fe(o),p=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==c&&Ji(o);else{if(!c){if(o.stateNode===null)throw Error(r(166));return Zt(o),null}if(m=pe.current,Bs(o))yw(o);else{var S=nh(he.current);switch(m){case 1:m=S.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:m=S.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":m=S.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":m=S.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":m=S.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof c.is=="string"?S.createElement("select",{is:c.is}):S.createElement("select"),c.multiple?m.multiple=!0:c.size&&(m.size=c.size);break;default:m=typeof c.is=="string"?S.createElement(p,{is:c.is}):S.createElement(p)}}m[jn]=o,m[cr]=c;e:for(S=o.child;S!==null;){if(S.tag===5||S.tag===6)m.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===o)break e;for(;S.sibling===null;){if(S.return===null||S.return===o)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}o.stateNode=m;e:switch(Gn(m,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Ji(o)}}return Zt(o),Vy(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,l),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==c&&Ji(o);else{if(typeof c!="string"&&o.stateNode===null)throw Error(r(166));if(i=he.current,Bs(o)){if(i=o.stateNode,l=o.memoizedProps,c=null,p=Hn,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}i[jn]=o,i=!!(i.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||DT(i.nodeValue,l)),i||ko(o,!0)}else i=nh(i).createTextNode(c),i[jn]=o,o.stateNode=i}return Zt(o),null;case 31:if(l=o.memoizedState,i===null||i.memoizedState!==null){if(c=Bs(o),l!==null){if(i===null){if(!c)throw Error(r(318));if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[jn]=o}else ka(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Zt(o),i=!1}else l=Jg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=l),i=!0;if(!i)return o.flags&256?(Rr(o),o):(Rr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return Zt(o),null;case 13:if(c=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(p=Bs(o),c!==null&&c.dehydrated!==null){if(i===null){if(!p)throw Error(r(318));if(p=o.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[jn]=o}else ka(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Zt(o),p=!1}else p=Jg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),p=!0;if(!p)return o.flags&256?(Rr(o),o):(Rr(o),null)}return Rr(o),(o.flags&128)!==0?(o.lanes=l,o):(l=c!==null,i=i!==null&&i.memoizedState!==null,l&&(c=o.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),m=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(m=c.memoizedState.cachePool.pool),m!==p&&(c.flags|=2048)),l!==i&&l&&(o.child.flags|=8192),jd(o,o.updateQueue),Zt(o),null);case 4:return Ie(),i===null&&f0(o.stateNode.containerInfo),Zt(o),null;case 10:return Zi(o.type),Zt(o),null;case 19:if(W(bn),c=o.memoizedState,c===null)return Zt(o),null;if(p=(o.flags&128)!==0,m=c.rendering,m===null)if(p)Iu(c,!1);else{if(mn!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(m=kd(i),m!==null){for(o.flags|=128,Iu(c,!1),i=m.updateQueue,o.updateQueue=i,jd(o,i),o.subtreeFlags=0,i=l,l=o.child;l!==null;)dw(l,i),l=l.sibling;return I(bn,bn.current&1|2),ct&&Yi(o,c.treeForkCount),o.child}i=i.sibling}c.tail!==null&&tt()>qd&&(o.flags|=128,p=!0,Iu(c,!1),o.lanes=4194304)}else{if(!p)if(i=kd(m),i!==null){if(o.flags|=128,p=!0,i=i.updateQueue,o.updateQueue=i,jd(o,i),Iu(c,!0),c.tail===null&&c.tailMode==="hidden"&&!m.alternate&&!ct)return Zt(o),null}else 2*tt()-c.renderingStartTime>qd&&l!==536870912&&(o.flags|=128,p=!0,Iu(c,!1),o.lanes=4194304);c.isBackwards?(m.sibling=o.child,o.child=m):(i=c.last,i!==null?i.sibling=m:o.child=m,c.last=m)}return c.tail!==null?(i=c.tail,c.rendering=i,c.tail=i.sibling,c.renderingStartTime=tt(),i.sibling=null,l=bn.current,I(bn,p?l&1|2:l&1),ct&&Yi(o,c.treeForkCount),i):(Zt(o),null);case 22:case 23:return Rr(o),dy(),c=o.memoizedState!==null,i!==null?i.memoizedState!==null!==c&&(o.flags|=8192):c&&(o.flags|=8192),c?(l&536870912)!==0&&(o.flags&128)===0&&(Zt(o),o.subtreeFlags&6&&(o.flags|=8192)):Zt(o),l=o.updateQueue,l!==null&&jd(o,l.retryQueue),l=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),c=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),c!==l&&(o.flags|=2048),i!==null&&W(Na),null;case 24:return l=null,i!==null&&(l=i.memoizedState.cache),o.memoizedState.cache!==l&&(o.flags|=2048),Zi(An),Zt(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function J8(i,o){switch(Wg(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Zi(An),Ie(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return Fe(o),null;case 31:if(o.memoizedState!==null){if(Rr(o),o.alternate===null)throw Error(r(340));ka()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(Rr(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));ka()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return W(bn),null;case 4:return Ie(),null;case 10:return Zi(o.type),null;case 22:case 23:return Rr(o),dy(),i!==null&&W(Na),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return Zi(An),null;case 25:return null;default:return null}}function PC(i,o){switch(Wg(o),o.tag){case 3:Zi(An),Ie();break;case 26:case 27:case 5:Fe(o);break;case 4:Ie();break;case 31:o.memoizedState!==null&&Rr(o);break;case 13:Rr(o);break;case 19:W(bn);break;case 10:Zi(o.type);break;case 22:case 23:Rr(o),dy(),i!==null&&W(Na);break;case 24:Zi(An)}}function Mu(i,o){try{var l=o.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var p=c.next;l=p;do{if((l.tag&i)===i){c=void 0;var m=l.create,S=l.inst;c=m(),S.destroy=c}l=l.next}while(l!==p)}}catch(k){Dt(o,o.return,k)}}function Bo(i,o,l){try{var c=o.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var m=p.next;c=m;do{if((c.tag&i)===i){var S=c.inst,k=S.destroy;if(k!==void 0){S.destroy=void 0,p=o;var j=l,J=k;try{J()}catch(ie){Dt(p,j,ie)}}}c=c.next}while(c!==m)}}catch(ie){Dt(o,o.return,ie)}}function UC(i){var o=i.updateQueue;if(o!==null){var l=i.stateNode;try{Ow(o,l)}catch(c){Dt(i,i.return,c)}}}function jC(i,o,l){l.props=za(i.type,i.memoizedProps),l.state=i.memoizedState;try{l.componentWillUnmount()}catch(c){Dt(i,o,c)}}function Du(i,o){try{var l=i.ref;if(l!==null){switch(i.tag){case 26:case 27:case 5:var c=i.stateNode;break;case 30:c=i.stateNode;break;default:c=i.stateNode}typeof l=="function"?i.refCleanup=l(c):l.current=c}}catch(p){Dt(i,o,p)}}function Ri(i,o){var l=i.ref,c=i.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(p){Dt(i,o,p)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(p){Dt(i,o,p)}else l.current=null}function HC(i){var o=i.type,l=i.memoizedProps,c=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break e;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(p){Dt(i,i.return,p)}}function Fy(i,o,l){try{var c=i.stateNode;xU(c,i.type,l,o),c[cr]=o}catch(p){Dt(i,i.return,p)}}function VC(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Ho(i.type)||i.tag===4}function Gy(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||VC(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Ho(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function qy(i,o,l){var c=i.tag;if(c===5||c===6)i=i.stateNode,o?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(i,o):(o=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,o.appendChild(i),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=Fi));else if(c!==4&&(c===27&&Ho(i.type)&&(l=i.stateNode,o=null),i=i.child,i!==null))for(qy(i,o,l),i=i.sibling;i!==null;)qy(i,o,l),i=i.sibling}function Hd(i,o,l){var c=i.tag;if(c===5||c===6)i=i.stateNode,o?l.insertBefore(i,o):l.appendChild(i);else if(c!==4&&(c===27&&Ho(i.type)&&(l=i.stateNode),i=i.child,i!==null))for(Hd(i,o,l),i=i.sibling;i!==null;)Hd(i,o,l),i=i.sibling}function FC(i){var o=i.stateNode,l=i.memoizedProps;try{for(var c=i.type,p=o.attributes;p.length;)o.removeAttributeNode(p[0]);Gn(o,c,l),o[jn]=i,o[cr]=l}catch(m){Dt(i,i.return,m)}}var eo=!1,On=!1,Yy=!1,GC=typeof WeakSet=="function"?WeakSet:Set,$n=null;function eU(i,o){if(i=i.containerInfo,p0=uh,i=rw(i),Ug(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var p=c.anchorOffset,m=c.focusNode;c=c.focusOffset;try{l.nodeType,m.nodeType}catch{l=null;break e}var S=0,k=-1,j=-1,J=0,ie=0,le=i,ee=null;t:for(;;){for(var ne;le!==l||p!==0&&le.nodeType!==3||(k=S+p),le!==m||c!==0&&le.nodeType!==3||(j=S+c),le.nodeType===3&&(S+=le.nodeValue.length),(ne=le.firstChild)!==null;)ee=le,le=ne;for(;;){if(le===i)break t;if(ee===l&&++J===p&&(k=S),ee===m&&++ie===c&&(j=S),(ne=le.nextSibling)!==null)break;le=ee,ee=le.parentNode}le=ne}l=k===-1||j===-1?null:{start:k,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for(m0={focusedElem:i,selectionRange:l},uh=!1,$n=o;$n!==null;)if(o=$n,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,$n=i;else for(;$n!==null;){switch(o=$n,m=o.alternate,i=o.flags,o.tag){case 0:if((i&4)!==0&&(i=o.updateQueue,i=i!==null?i.events:null,i!==null))for(l=0;l<i.length;l++)p=i[l],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&m!==null){i=void 0,l=o,p=m.memoizedProps,m=m.memoizedState,c=l.stateNode;try{var Ce=za(l.type,p);i=c.getSnapshotBeforeUpdate(Ce,m),c.__reactInternalSnapshotBeforeUpdate=i}catch(Pe){Dt(l,l.return,Pe)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,l=i.nodeType,l===9)v0(i);else if(l===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":v0(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=o.sibling,i!==null){i.return=o.return,$n=i;break}$n=o.return}}function qC(i,o,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:no(i,l),c&4&&Mu(5,l);break;case 1:if(no(i,l),c&4)if(i=l.stateNode,o===null)try{i.componentDidMount()}catch(S){Dt(l,l.return,S)}else{var p=za(l.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(p,o,i.__reactInternalSnapshotBeforeUpdate)}catch(S){Dt(l,l.return,S)}}c&64&&UC(l),c&512&&Du(l,l.return);break;case 3:if(no(i,l),c&64&&(i=l.updateQueue,i!==null)){if(o=null,l.child!==null)switch(l.child.tag){case 27:case 5:o=l.child.stateNode;break;case 1:o=l.child.stateNode}try{Ow(i,o)}catch(S){Dt(l,l.return,S)}}break;case 27:o===null&&c&4&&FC(l);case 26:case 5:no(i,l),o===null&&c&4&&HC(l),c&512&&Du(l,l.return);break;case 12:no(i,l);break;case 31:no(i,l),c&4&&ZC(i,l);break;case 13:no(i,l),c&4&&KC(i,l),c&64&&(i=l.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(l=uU.bind(null,l),RU(i,l))));break;case 22:if(c=l.memoizedState!==null||eo,!c){o=o!==null&&o.memoizedState!==null||On,p=eo;var m=On;eo=c,(On=o)&&!m?ro(i,l,(l.subtreeFlags&8772)!==0):no(i,l),eo=p,On=m}break;case 30:break;default:no(i,l)}}function YC(i){var o=i.alternate;o!==null&&(i.alternate=null,YC(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&_g(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var en=null,dr=!1;function to(i,o,l){for(l=l.child;l!==null;)XC(i,o,l),l=l.sibling}function XC(i,o,l){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(hn,l)}catch{}switch(l.tag){case 26:On||Ri(l,o),to(i,o,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:On||Ri(l,o);var c=en,p=dr;Ho(l.type)&&(en=l.stateNode,dr=!1),to(i,o,l),Vu(l.stateNode),en=c,dr=p;break;case 5:On||Ri(l,o);case 6:if(c=en,p=dr,en=null,to(i,o,l),en=c,dr=p,en!==null)if(dr)try{(en.nodeType===9?en.body:en.nodeName==="HTML"?en.ownerDocument.body:en).removeChild(l.stateNode)}catch(m){Dt(l,o,m)}else try{en.removeChild(l.stateNode)}catch(m){Dt(l,o,m)}break;case 18:en!==null&&(dr?(i=en,UT(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,l.stateNode),nl(i)):UT(en,l.stateNode));break;case 4:c=en,p=dr,en=l.stateNode.containerInfo,dr=!0,to(i,o,l),en=c,dr=p;break;case 0:case 11:case 14:case 15:Bo(2,l,o),On||Bo(4,l,o),to(i,o,l);break;case 1:On||(Ri(l,o),c=l.stateNode,typeof c.componentWillUnmount=="function"&&jC(l,o,c)),to(i,o,l);break;case 21:to(i,o,l);break;case 22:On=(c=On)||l.memoizedState!==null,to(i,o,l),On=c;break;default:to(i,o,l)}}function ZC(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{nl(i)}catch(l){Dt(o,o.return,l)}}}function KC(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{nl(i)}catch(l){Dt(o,o.return,l)}}function tU(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new GC),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new GC),o;default:throw Error(r(435,i.tag))}}function Vd(i,o){var l=tU(i);o.forEach(function(c){if(!l.has(c)){l.add(c);var p=cU.bind(null,i,c);c.then(p,p)}})}function hr(i,o){var l=o.deletions;if(l!==null)for(var c=0;c<l.length;c++){var p=l[c],m=i,S=o,k=S;e:for(;k!==null;){switch(k.tag){case 27:if(Ho(k.type)){en=k.stateNode,dr=!1;break e}break;case 5:en=k.stateNode,dr=!1;break e;case 3:case 4:en=k.stateNode.containerInfo,dr=!0;break e}k=k.return}if(en===null)throw Error(r(160));XC(m,S,p),en=null,dr=!1,m=p.alternate,m!==null&&(m.return=null),p.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)WC(o,i),o=o.sibling}var li=null;function WC(i,o){var l=i.alternate,c=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:hr(o,i),pr(i),c&4&&(Bo(3,i,i.return),Mu(3,i),Bo(5,i,i.return));break;case 1:hr(o,i),pr(i),c&512&&(On||l===null||Ri(l,l.return)),c&64&&eo&&(i=i.updateQueue,i!==null&&(c=i.callbacks,c!==null&&(l=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=l===null?c:l.concat(c))));break;case 26:var p=li;if(hr(o,i),pr(i),c&512&&(On||l===null||Ri(l,l.return)),c&4){var m=l!==null?l.memoizedState:null;if(c=i.memoizedState,l===null)if(c===null)if(i.stateNode===null){e:{c=i.type,l=i.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":m=p.getElementsByTagName("title")[0],(!m||m[su]||m[jn]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=p.createElement(c),p.head.insertBefore(m,p.querySelector("head > title"))),Gn(m,c,l),m[jn]=i,Ln(m),c=m;break e;case"link":var S=WT("link","href",p).get(c+(l.href||""));if(S){for(var k=0;k<S.length;k++)if(m=S[k],m.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&m.getAttribute("rel")===(l.rel==null?null:l.rel)&&m.getAttribute("title")===(l.title==null?null:l.title)&&m.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){S.splice(k,1);break t}}m=p.createElement(c),Gn(m,c,l),p.head.appendChild(m);break;case"meta":if(S=WT("meta","content",p).get(c+(l.content||""))){for(k=0;k<S.length;k++)if(m=S[k],m.getAttribute("content")===(l.content==null?null:""+l.content)&&m.getAttribute("name")===(l.name==null?null:l.name)&&m.getAttribute("property")===(l.property==null?null:l.property)&&m.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&m.getAttribute("charset")===(l.charSet==null?null:l.charSet)){S.splice(k,1);break t}}m=p.createElement(c),Gn(m,c,l),p.head.appendChild(m);break;default:throw Error(r(468,c))}m[jn]=i,Ln(m),c=m}i.stateNode=c}else QT(p,i.type,i.stateNode);else i.stateNode=KT(p,c,i.memoizedProps);else m!==c?(m===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):m.count--,c===null?QT(p,i.type,i.stateNode):KT(p,c,i.memoizedProps)):c===null&&i.stateNode!==null&&Fy(i,i.memoizedProps,l.memoizedProps)}break;case 27:hr(o,i),pr(i),c&512&&(On||l===null||Ri(l,l.return)),l!==null&&c&4&&Fy(i,i.memoizedProps,l.memoizedProps);break;case 5:if(hr(o,i),pr(i),c&512&&(On||l===null||Ri(l,l.return)),i.flags&32){p=i.stateNode;try{Cs(p,"")}catch(Ce){Dt(i,i.return,Ce)}}c&4&&i.stateNode!=null&&(p=i.memoizedProps,Fy(i,p,l!==null?l.memoizedProps:p)),c&1024&&(Yy=!0);break;case 6:if(hr(o,i),pr(i),c&4){if(i.stateNode===null)throw Error(r(162));c=i.memoizedProps,l=i.stateNode;try{l.nodeValue=c}catch(Ce){Dt(i,i.return,Ce)}}break;case 3:if(oh=null,p=li,li=rh(o.containerInfo),hr(o,i),li=p,pr(i),c&4&&l!==null&&l.memoizedState.isDehydrated)try{nl(o.containerInfo)}catch(Ce){Dt(i,i.return,Ce)}Yy&&(Yy=!1,QC(i));break;case 4:c=li,li=rh(i.stateNode.containerInfo),hr(o,i),pr(i),li=c;break;case 12:hr(o,i),pr(i);break;case 31:hr(o,i),pr(i),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Vd(i,c)));break;case 13:hr(o,i),pr(i),i.child.flags&8192&&i.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Gd=tt()),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Vd(i,c)));break;case 22:p=i.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,J=eo,ie=On;if(eo=J||p,On=ie||j,hr(o,i),On=ie,eo=J,pr(i),c&8192)e:for(o=i.stateNode,o._visibility=p?o._visibility&-2:o._visibility|1,p&&(l===null||j||eo||On||La(i)),l=null,o=i;;){if(o.tag===5||o.tag===26){if(l===null){j=l=o;try{if(m=j.stateNode,p)S=m.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{k=j.stateNode;var le=j.memoizedProps.style,ee=le!=null&&le.hasOwnProperty("display")?le.display:null;k.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(Ce){Dt(j,j.return,Ce)}}}else if(o.tag===6){if(l===null){j=o;try{j.stateNode.nodeValue=p?"":j.memoizedProps}catch(Ce){Dt(j,j.return,Ce)}}}else if(o.tag===18){if(l===null){j=o;try{var ne=j.stateNode;p?jT(ne,!0):jT(j.stateNode,!1)}catch(Ce){Dt(j,j.return,Ce)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;l===o&&(l=null),o=o.return}l===o&&(l=null),o.sibling.return=o.return,o=o.sibling}c&4&&(c=i.updateQueue,c!==null&&(l=c.retryQueue,l!==null&&(c.retryQueue=null,Vd(i,l))));break;case 19:hr(o,i),pr(i),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Vd(i,c)));break;case 30:break;case 21:break;default:hr(o,i),pr(i)}}function pr(i){var o=i.flags;if(o&2){try{for(var l,c=i.return;c!==null;){if(VC(c)){l=c;break}c=c.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var p=l.stateNode,m=Gy(i);Hd(i,m,p);break;case 5:var S=l.stateNode;l.flags&32&&(Cs(S,""),l.flags&=-33);var k=Gy(i);Hd(i,k,S);break;case 3:case 4:var j=l.stateNode.containerInfo,J=Gy(i);qy(i,J,j);break;default:throw Error(r(161))}}catch(ie){Dt(i,i.return,ie)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function QC(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;QC(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function no(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)qC(i,o.alternate,o),o=o.sibling}function La(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Bo(4,o,o.return),La(o);break;case 1:Ri(o,o.return);var l=o.stateNode;typeof l.componentWillUnmount=="function"&&jC(o,o.return,l),La(o);break;case 27:Vu(o.stateNode);case 26:case 5:Ri(o,o.return),La(o);break;case 22:o.memoizedState===null&&La(o);break;case 30:La(o);break;default:La(o)}i=i.sibling}}function ro(i,o,l){for(l=l&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var c=o.alternate,p=i,m=o,S=m.flags;switch(m.tag){case 0:case 11:case 15:ro(p,m,l),Mu(4,m);break;case 1:if(ro(p,m,l),c=m,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(J){Dt(c,c.return,J)}if(c=m,p=c.updateQueue,p!==null){var k=c.stateNode;try{var j=p.shared.hiddenCallbacks;if(j!==null)for(p.shared.hiddenCallbacks=null,p=0;p<j.length;p++)Rw(j[p],k)}catch(J){Dt(c,c.return,J)}}l&&S&64&&UC(m),Du(m,m.return);break;case 27:FC(m);case 26:case 5:ro(p,m,l),l&&c===null&&S&4&&HC(m),Du(m,m.return);break;case 12:ro(p,m,l);break;case 31:ro(p,m,l),l&&S&4&&ZC(p,m);break;case 13:ro(p,m,l),l&&S&4&&KC(p,m);break;case 22:m.memoizedState===null&&ro(p,m,l),Du(m,m.return);break;case 30:break;default:ro(p,m,l)}o=o.sibling}}function Xy(i,o){var l=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==l&&(i!=null&&i.refCount++,l!=null&&Su(l))}function Zy(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&Su(i))}function ui(i,o,l,c){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)JC(i,o,l,c),o=o.sibling}function JC(i,o,l,c){var p=o.flags;switch(o.tag){case 0:case 11:case 15:ui(i,o,l,c),p&2048&&Mu(9,o);break;case 1:ui(i,o,l,c);break;case 3:ui(i,o,l,c),p&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&Su(i)));break;case 12:if(p&2048){ui(i,o,l,c),i=o.stateNode;try{var m=o.memoizedProps,S=m.id,k=m.onPostCommit;typeof k=="function"&&k(S,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(j){Dt(o,o.return,j)}}else ui(i,o,l,c);break;case 31:ui(i,o,l,c);break;case 13:ui(i,o,l,c);break;case 23:break;case 22:m=o.stateNode,S=o.alternate,o.memoizedState!==null?m._visibility&2?ui(i,o,l,c):Bu(i,o):m._visibility&2?ui(i,o,l,c):(m._visibility|=2,Gs(i,o,l,c,(o.subtreeFlags&10256)!==0||!1)),p&2048&&Xy(S,o);break;case 24:ui(i,o,l,c),p&2048&&Zy(o.alternate,o);break;default:ui(i,o,l,c)}}function Gs(i,o,l,c,p){for(p=p&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var m=i,S=o,k=l,j=c,J=S.flags;switch(S.tag){case 0:case 11:case 15:Gs(m,S,k,j,p),Mu(8,S);break;case 23:break;case 22:var ie=S.stateNode;S.memoizedState!==null?ie._visibility&2?Gs(m,S,k,j,p):Bu(m,S):(ie._visibility|=2,Gs(m,S,k,j,p)),p&&J&2048&&Xy(S.alternate,S);break;case 24:Gs(m,S,k,j,p),p&&J&2048&&Zy(S.alternate,S);break;default:Gs(m,S,k,j,p)}o=o.sibling}}function Bu(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var l=i,c=o,p=c.flags;switch(c.tag){case 22:Bu(l,c),p&2048&&Xy(c.alternate,c);break;case 24:Bu(l,c),p&2048&&Zy(c.alternate,c);break;default:Bu(l,c)}o=o.sibling}}var zu=8192;function qs(i,o,l){if(i.subtreeFlags&zu)for(i=i.child;i!==null;)eT(i,o,l),i=i.sibling}function eT(i,o,l){switch(i.tag){case 26:qs(i,o,l),i.flags&zu&&i.memoizedState!==null&&jU(l,li,i.memoizedState,i.memoizedProps);break;case 5:qs(i,o,l);break;case 3:case 4:var c=li;li=rh(i.stateNode.containerInfo),qs(i,o,l),li=c;break;case 22:i.memoizedState===null&&(c=i.alternate,c!==null&&c.memoizedState!==null?(c=zu,zu=16777216,qs(i,o,l),zu=c):qs(i,o,l));break;default:qs(i,o,l)}}function tT(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function Lu(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var l=0;l<o.length;l++){var c=o[l];$n=c,rT(c,i)}tT(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)nT(i),i=i.sibling}function nT(i){switch(i.tag){case 0:case 11:case 15:Lu(i),i.flags&2048&&Bo(9,i,i.return);break;case 3:Lu(i);break;case 12:Lu(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,Fd(i)):Lu(i);break;default:Lu(i)}}function Fd(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var l=0;l<o.length;l++){var c=o[l];$n=c,rT(c,i)}tT(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Bo(8,o,o.return),Fd(o);break;case 22:l=o.stateNode,l._visibility&2&&(l._visibility&=-3,Fd(o));break;default:Fd(o)}i=i.sibling}}function rT(i,o){for(;$n!==null;){var l=$n;switch(l.tag){case 0:case 11:case 15:Bo(8,l,o);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Su(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,$n=c;else e:for(l=i;$n!==null;){c=$n;var p=c.sibling,m=c.return;if(YC(c),c===l){$n=null;break e}if(p!==null){p.return=m,$n=p;break e}$n=m}}}var nU={getCacheForType:function(i){var o=Vn(An),l=o.data.get(i);return l===void 0&&(l=i(),o.data.set(i,l)),l},cacheSignal:function(){return Vn(An).controller.signal}},rU=typeof WeakMap=="function"?WeakMap:Map,St=0,Vt=null,it=null,st=0,Mt=0,Or=null,zo=!1,Ys=!1,Ky=!1,io=0,mn=0,Lo=0,$a=0,Wy=0,Nr=0,Xs=0,$u=null,mr=null,Qy=!1,Gd=0,iT=0,qd=1/0,Yd=null,$o=null,Dn=0,Po=null,Zs=null,oo=0,Jy=0,e0=null,oT=null,Pu=0,t0=null;function Ir(){return(St&2)!==0&&st!==0?st&-st:D.T!==null?s0():x_()}function aT(){if(Nr===0)if((st&536870912)===0||ct){var i=Sa;Sa<<=1,(Sa&3932160)===0&&(Sa=262144),Nr=i}else Nr=536870912;return i=kr.current,i!==null&&(i.flags|=32),Nr}function gr(i,o,l){(i===Vt&&(Mt===2||Mt===9)||i.cancelPendingCommit!==null)&&(Ks(i,0),Uo(i,st,Nr,!1)),au(i,l),((St&2)===0||i!==Vt)&&(i===Vt&&((St&2)===0&&($a|=l),mn===4&&Uo(i,st,Nr,!1)),Oi(i))}function sT(i,o,l){if((St&6)!==0)throw Error(r(327));var c=!l&&(o&127)===0&&(o&i.expiredLanes)===0||ou(i,o),p=c?aU(i,o):r0(i,o,!0),m=c;do{if(p===0){Ys&&!c&&Uo(i,o,0,!1);break}else{if(l=i.current.alternate,m&&!iU(l)){p=r0(i,o,!1),m=!1;continue}if(p===2){if(m=o,i.errorRecoveryDisabledLanes&m)var S=0;else S=i.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){o=S;e:{var k=i;p=$u;var j=k.current.memoizedState.isDehydrated;if(j&&(Ks(k,S).flags|=256),S=r0(k,S,!1),S!==2){if(Ky&&!j){k.errorRecoveryDisabledLanes|=m,$a|=m,p=4;break e}m=mr,mr=p,m!==null&&(mr===null?mr=m:mr.push.apply(mr,m))}p=S}if(m=!1,p!==2)continue}}if(p===1){Ks(i,0),Uo(i,o,0,!0);break}e:{switch(c=i,m=p,m){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:Uo(c,o,Nr,!zo);break e;case 2:mr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(p=Gd+300-tt(),10<p)){if(Uo(c,o,Nr,!zo),rd(c,0,!0)!==0)break e;oo=o,c.timeoutHandle=$T(lT.bind(null,c,l,mr,Yd,Qy,o,Nr,$a,Xs,zo,m,"Throttled",-0,0),p);break e}lT(c,l,mr,Yd,Qy,o,Nr,$a,Xs,zo,m,null,-0,0)}}break}while(!0);Oi(i)}function lT(i,o,l,c,p,m,S,k,j,J,ie,le,ee,ne){if(i.timeoutHandle=-1,le=o.subtreeFlags,le&8192||(le&16785408)===16785408){le={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fi},eT(o,m,le);var Ce=(m&62914560)===m?Gd-tt():(m&4194048)===m?iT-tt():0;if(Ce=HU(le,Ce),Ce!==null){oo=m,i.cancelPendingCommit=Ce(gT.bind(null,i,o,m,l,c,p,S,k,j,ie,le,null,ee,ne)),Uo(i,m,S,!J);return}}gT(i,o,m,l,c,p,S,k,j)}function iU(i){for(var o=i;;){var l=o.tag;if((l===0||l===11||l===15)&&o.flags&16384&&(l=o.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var c=0;c<l.length;c++){var p=l[c],m=p.getSnapshot;p=p.value;try{if(!Tr(m(),p))return!1}catch{return!1}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Uo(i,o,l,c){o&=~Wy,o&=~$a,i.suspendedLanes|=o,i.pingedLanes&=~o,c&&(i.warmLanes|=o),c=i.expirationTimes;for(var p=o;0<p;){var m=31-At(p),S=1<<m;c[m]=-1,p&=~S}l!==0&&v_(i,l,o)}function Xd(){return(St&6)===0?(Uu(0),!1):!0}function n0(){if(it!==null){if(Mt===0)var i=it.return;else i=it,Xi=Ra=null,vy(i),Us=null,Eu=0,i=it;for(;i!==null;)PC(i.alternate,i),i=i.return;it=null}}function Ks(i,o){var l=i.timeoutHandle;l!==-1&&(i.timeoutHandle=-1,wU(l)),l=i.cancelPendingCommit,l!==null&&(i.cancelPendingCommit=null,l()),oo=0,n0(),Vt=i,it=l=qi(i.current,null),st=o,Mt=0,Or=null,zo=!1,Ys=ou(i,o),Ky=!1,Xs=Nr=Wy=$a=Lo=mn=0,mr=$u=null,Qy=!1,(o&8)!==0&&(o|=o&32);var c=i.entangledLanes;if(c!==0)for(i=i.entanglements,c&=o;0<c;){var p=31-At(c),m=1<<p;o|=i[p],c&=~m}return io=o,md(),l}function uT(i,o){Ye=null,D.H=Ou,o===Ps||o===_d?(o=Cw(),Mt=3):o===ay?(o=Cw(),Mt=4):Mt=o===Dy?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Or=o,it===null&&(mn=1,Ld(i,Vr(o,i.current)))}function cT(){var i=kr.current;return i===null?!0:(st&4194048)===st?Yr===null:(st&62914560)===st||(st&536870912)!==0?i===Yr:!1}function fT(){var i=D.H;return D.H=Ou,i===null?Ou:i}function dT(){var i=D.A;return D.A=nU,i}function Zd(){mn=4,zo||(st&4194048)!==st&&kr.current!==null||(Ys=!0),(Lo&134217727)===0&&($a&134217727)===0||Vt===null||Uo(Vt,st,Nr,!1)}function r0(i,o,l){var c=St;St|=2;var p=fT(),m=dT();(Vt!==i||st!==o)&&(Yd=null,Ks(i,o)),o=!1;var S=mn;e:do try{if(Mt!==0&&it!==null){var k=it,j=Or;switch(Mt){case 8:n0(),S=6;break e;case 3:case 2:case 9:case 6:kr.current===null&&(o=!0);var J=Mt;if(Mt=0,Or=null,Ws(i,k,j,J),l&&Ys){S=0;break e}break;default:J=Mt,Mt=0,Or=null,Ws(i,k,j,J)}}oU(),S=mn;break}catch(ie){uT(i,ie)}while(!0);return o&&i.shellSuspendCounter++,Xi=Ra=null,St=c,D.H=p,D.A=m,it===null&&(Vt=null,st=0,md()),S}function oU(){for(;it!==null;)hT(it)}function aU(i,o){var l=St;St|=2;var c=fT(),p=dT();Vt!==i||st!==o?(Yd=null,qd=tt()+500,Ks(i,o)):Ys=ou(i,o);e:do try{if(Mt!==0&&it!==null){o=it;var m=Or;t:switch(Mt){case 1:Mt=0,Or=null,Ws(i,o,m,1);break;case 2:case 9:if(_w(m)){Mt=0,Or=null,pT(o);break}o=function(){Mt!==2&&Mt!==9||Vt!==i||(Mt=7),Oi(i)},m.then(o,o);break e;case 3:Mt=7;break e;case 4:Mt=5;break e;case 7:_w(m)?(Mt=0,Or=null,pT(o)):(Mt=0,Or=null,Ws(i,o,m,7));break;case 5:var S=null;switch(it.tag){case 26:S=it.memoizedState;case 5:case 27:var k=it;if(S?JT(S):k.stateNode.complete){Mt=0,Or=null;var j=k.sibling;if(j!==null)it=j;else{var J=k.return;J!==null?(it=J,Kd(J)):it=null}break t}}Mt=0,Or=null,Ws(i,o,m,5);break;case 6:Mt=0,Or=null,Ws(i,o,m,6);break;case 8:n0(),mn=6;break e;default:throw Error(r(462))}}sU();break}catch(ie){uT(i,ie)}while(!0);return Xi=Ra=null,D.H=c,D.A=p,St=l,it!==null?0:(Vt=null,st=0,md(),mn)}function sU(){for(;it!==null&&!Re();)hT(it)}function hT(i){var o=LC(i.alternate,i,io);i.memoizedProps=i.pendingProps,o===null?Kd(i):it=o}function pT(i){var o=i,l=o.alternate;switch(o.tag){case 15:case 0:o=NC(l,o,o.pendingProps,o.type,void 0,st);break;case 11:o=NC(l,o,o.pendingProps,o.type.render,o.ref,st);break;case 5:vy(o);default:PC(l,o),o=it=dw(o,io),o=LC(l,o,io)}i.memoizedProps=i.pendingProps,o===null?Kd(i):it=o}function Ws(i,o,l,c){Xi=Ra=null,vy(o),Us=null,Eu=0;var p=o.return;try{if(Z8(i,p,o,l,st)){mn=1,Ld(i,Vr(l,i.current)),it=null;return}}catch(m){if(p!==null)throw it=p,m;mn=1,Ld(i,Vr(l,i.current)),it=null;return}o.flags&32768?(ct||c===1?i=!0:Ys||(st&536870912)!==0?i=!1:(zo=i=!0,(c===2||c===9||c===3||c===6)&&(c=kr.current,c!==null&&c.tag===13&&(c.flags|=16384))),mT(o,i)):Kd(o)}function Kd(i){var o=i;do{if((o.flags&32768)!==0){mT(o,zo);return}i=o.return;var l=Q8(o.alternate,o,io);if(l!==null){it=l;return}if(o=o.sibling,o!==null){it=o;return}it=o=i}while(o!==null);mn===0&&(mn=5)}function mT(i,o){do{var l=J8(i.alternate,i);if(l!==null){l.flags&=32767,it=l;return}if(l=i.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!o&&(i=i.sibling,i!==null)){it=i;return}it=i=l}while(i!==null);mn=6,it=null}function gT(i,o,l,c,p,m,S,k,j){i.cancelPendingCommit=null;do Wd();while(Dn!==0);if((St&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(m=o.lanes|o.childLanes,m|=Gg,UP(i,l,m,S,k,j),i===Vt&&(it=Vt=null,st=0),Zs=o,Po=i,oo=l,Jy=m,e0=p,oT=c,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,fU(we,function(){return xT(),null})):(i.callbackNode=null,i.callbackPriority=0),c=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||c){c=D.T,D.T=null,p=Z.p,Z.p=2,S=St,St|=4;try{eU(i,o,l)}finally{St=S,Z.p=p,D.T=c}}Dn=1,yT(),vT(),bT()}}function yT(){if(Dn===1){Dn=0;var i=Po,o=Zs,l=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var c=Z.p;Z.p=2;var p=St;St|=4;try{WC(o,i);var m=m0,S=rw(i.containerInfo),k=m.focusedElem,j=m.selectionRange;if(S!==k&&k&&k.ownerDocument&&nw(k.ownerDocument.documentElement,k)){if(j!==null&&Ug(k)){var J=j.start,ie=j.end;if(ie===void 0&&(ie=J),"selectionStart"in k)k.selectionStart=J,k.selectionEnd=Math.min(ie,k.value.length);else{var le=k.ownerDocument||document,ee=le&&le.defaultView||window;if(ee.getSelection){var ne=ee.getSelection(),Ce=k.textContent.length,Pe=Math.min(j.start,Ce),jt=j.end===void 0?Pe:Math.min(j.end,Ce);!ne.extend&&Pe>jt&&(S=jt,jt=Pe,Pe=S);var Y=tw(k,Pe),F=tw(k,jt);if(Y&&F&&(ne.rangeCount!==1||ne.anchorNode!==Y.node||ne.anchorOffset!==Y.offset||ne.focusNode!==F.node||ne.focusOffset!==F.offset)){var Q=le.createRange();Q.setStart(Y.node,Y.offset),ne.removeAllRanges(),Pe>jt?(ne.addRange(Q),ne.extend(F.node,F.offset)):(Q.setEnd(F.node,F.offset),ne.addRange(Q))}}}}for(le=[],ne=k;ne=ne.parentNode;)ne.nodeType===1&&le.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<le.length;k++){var oe=le[k];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}uh=!!p0,m0=p0=null}finally{St=p,Z.p=c,D.T=l}}i.current=o,Dn=2}}function vT(){if(Dn===2){Dn=0;var i=Po,o=Zs,l=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var c=Z.p;Z.p=2;var p=St;St|=4;try{qC(i,o.alternate,o)}finally{St=p,Z.p=c,D.T=l}}Dn=3}}function bT(){if(Dn===4||Dn===3){Dn=0,Cr();var i=Po,o=Zs,l=oo,c=oT;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Dn=5:(Dn=0,Zs=Po=null,ST(i,i.pendingLanes));var p=i.pendingLanes;if(p===0&&($o=null),xg(l),o=o.stateNode,sn&&typeof sn.onCommitFiberRoot=="function")try{sn.onCommitFiberRoot(hn,o,void 0,(o.current.flags&128)===128)}catch{}if(c!==null){o=D.T,p=Z.p,Z.p=2,D.T=null;try{for(var m=i.onRecoverableError,S=0;S<c.length;S++){var k=c[S];m(k.value,{componentStack:k.stack})}}finally{D.T=o,Z.p=p}}(oo&3)!==0&&Wd(),Oi(i),p=i.pendingLanes,(l&261930)!==0&&(p&42)!==0?i===t0?Pu++:(Pu=0,t0=i):Pu=0,Uu(0)}}function ST(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,Su(o)))}function Wd(){return yT(),vT(),bT(),xT()}function xT(){if(Dn!==5)return!1;var i=Po,o=Jy;Jy=0;var l=xg(oo),c=D.T,p=Z.p;try{Z.p=32>l?32:l,D.T=null,l=e0,e0=null;var m=Po,S=oo;if(Dn=0,Zs=Po=null,oo=0,(St&6)!==0)throw Error(r(331));var k=St;if(St|=4,nT(m.current),JC(m,m.current,S,l),St=k,Uu(0,!1),sn&&typeof sn.onPostCommitFiberRoot=="function")try{sn.onPostCommitFiberRoot(hn,m)}catch{}return!0}finally{Z.p=p,D.T=c,ST(i,o)}}function ET(i,o,l){o=Vr(l,o),o=My(i.stateNode,o,2),i=Io(i,o,2),i!==null&&(au(i,2),Oi(i))}function Dt(i,o,l){if(i.tag===3)ET(i,i,l);else for(;o!==null;){if(o.tag===3){ET(o,i,l);break}else if(o.tag===1){var c=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&($o===null||!$o.has(c))){i=Vr(l,i),l=_C(2),c=Io(o,l,2),c!==null&&(wC(l,c,o,i),au(c,2),Oi(c));break}}o=o.return}}function i0(i,o,l){var c=i.pingCache;if(c===null){c=i.pingCache=new rU;var p=new Set;c.set(o,p)}else p=c.get(o),p===void 0&&(p=new Set,c.set(o,p));p.has(l)||(Ky=!0,p.add(l),i=lU.bind(null,i,o,l),o.then(i,i))}function lU(i,o,l){var c=i.pingCache;c!==null&&c.delete(o),i.pingedLanes|=i.suspendedLanes&l,i.warmLanes&=~l,Vt===i&&(st&l)===l&&(mn===4||mn===3&&(st&62914560)===st&&300>tt()-Gd?(St&2)===0&&Ks(i,0):Wy|=l,Xs===st&&(Xs=0)),Oi(i)}function _T(i,o){o===0&&(o=y_()),i=Ta(i,o),i!==null&&(au(i,o),Oi(i))}function uU(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),_T(i,l)}function cU(i,o){var l=0;switch(i.tag){case 31:case 13:var c=i.stateNode,p=i.memoizedState;p!==null&&(l=p.retryLane);break;case 19:c=i.stateNode;break;case 22:c=i.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(o),_T(i,l)}function fU(i,o){return an(i,o)}var Qd=null,Qs=null,o0=!1,Jd=!1,a0=!1,jo=0;function Oi(i){i!==Qs&&i.next===null&&(Qs===null?Qd=Qs=i:Qs=Qs.next=i),Jd=!0,o0||(o0=!0,hU())}function Uu(i,o){if(!a0&&Jd){a0=!0;do for(var l=!1,c=Qd;c!==null;){if(i!==0){var p=c.pendingLanes;if(p===0)var m=0;else{var S=c.suspendedLanes,k=c.pingedLanes;m=(1<<31-At(42|i)+1)-1,m&=p&~(S&~k),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(l=!0,AT(c,m))}else m=st,m=rd(c,c===Vt?m:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(m&3)===0||ou(c,m)||(l=!0,AT(c,m));c=c.next}while(l);a0=!1}}function dU(){wT()}function wT(){Jd=o0=!1;var i=0;jo!==0&&_U()&&(i=jo);for(var o=tt(),l=null,c=Qd;c!==null;){var p=c.next,m=CT(c,o);m===0?(c.next=null,l===null?Qd=p:l.next=p,p===null&&(Qs=l)):(l=c,(i!==0||(m&3)!==0)&&(Jd=!0)),c=p}Dn!==0&&Dn!==5||Uu(i),jo!==0&&(jo=0)}function CT(i,o){for(var l=i.suspendedLanes,c=i.pingedLanes,p=i.expirationTimes,m=i.pendingLanes&-62914561;0<m;){var S=31-At(m),k=1<<S,j=p[S];j===-1?((k&l)===0||(k&c)!==0)&&(p[S]=PP(k,o)):j<=o&&(i.expiredLanes|=k),m&=~k}if(o=Vt,l=st,l=rd(i,i===o?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),c=i.callbackNode,l===0||i===o&&(Mt===2||Mt===9)||i.cancelPendingCommit!==null)return c!==null&&c!==null&&It(c),i.callbackNode=null,i.callbackPriority=0;if((l&3)===0||ou(i,l)){if(o=l&-l,o===i.callbackPriority)return o;switch(c!==null&&It(c),xg(l)){case 2:case 8:l=ce;break;case 32:l=we;break;case 268435456:l=We;break;default:l=we}return c=TT.bind(null,i),l=an(l,c),i.callbackPriority=o,i.callbackNode=l,o}return c!==null&&c!==null&&It(c),i.callbackPriority=2,i.callbackNode=null,2}function TT(i,o){if(Dn!==0&&Dn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var l=i.callbackNode;if(Wd()&&i.callbackNode!==l)return null;var c=st;return c=rd(i,i===Vt?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),c===0?null:(sT(i,c,o),CT(i,tt()),i.callbackNode!=null&&i.callbackNode===l?TT.bind(null,i):null)}function AT(i,o){if(Wd())return null;sT(i,o,!0)}function hU(){CU(function(){(St&6)!==0?an(te,dU):wT()})}function s0(){if(jo===0){var i=Ls;i===0&&(i=ai,ai<<=1,(ai&261888)===0&&(ai=256)),jo=i}return jo}function kT(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:sd(""+i)}function RT(i,o){var l=o.ownerDocument.createElement("input");return l.name=o.name,l.value=o.value,i.id&&l.setAttribute("form",i.id),o.parentNode.insertBefore(l,o),i=new FormData(i),l.parentNode.removeChild(l),i}function pU(i,o,l,c,p){if(o==="submit"&&l&&l.stateNode===p){var m=kT((p[cr]||null).action),S=c.submitter;S&&(o=(o=S[cr]||null)?kT(o.formAction):S.getAttribute("formAction"),o!==null&&(m=o,S=null));var k=new fd("action","action",null,c,p);i.push({event:k,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(jo!==0){var j=S?RT(p,S):new FormData(p);Ay(l,{pending:!0,data:j,method:p.method,action:m},null,j)}}else typeof m=="function"&&(k.preventDefault(),j=S?RT(p,S):new FormData(p),Ay(l,{pending:!0,data:j,method:p.method,action:m},m,j))},currentTarget:p}]})}}for(var l0=0;l0<Fg.length;l0++){var u0=Fg[l0],mU=u0.toLowerCase(),gU=u0[0].toUpperCase()+u0.slice(1);si(mU,"on"+gU)}si(aw,"onAnimationEnd"),si(sw,"onAnimationIteration"),si(lw,"onAnimationStart"),si("dblclick","onDoubleClick"),si("focusin","onFocus"),si("focusout","onBlur"),si(I8,"onTransitionRun"),si(M8,"onTransitionStart"),si(D8,"onTransitionCancel"),si(uw,"onTransitionEnd"),_s("onMouseEnter",["mouseout","mouseover"]),_s("onMouseLeave",["mouseout","mouseover"]),_s("onPointerEnter",["pointerout","pointerover"]),_s("onPointerLeave",["pointerout","pointerover"]),Ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ju="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(" "),yU=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ju));function OT(i,o){o=(o&4)!==0;for(var l=0;l<i.length;l++){var c=i[l],p=c.event;c=c.listeners;e:{var m=void 0;if(o)for(var S=c.length-1;0<=S;S--){var k=c[S],j=k.instance,J=k.currentTarget;if(k=k.listener,j!==m&&p.isPropagationStopped())break e;m=k,p.currentTarget=J;try{m(p)}catch(ie){pd(ie)}p.currentTarget=null,m=j}else for(S=0;S<c.length;S++){if(k=c[S],j=k.instance,J=k.currentTarget,k=k.listener,j!==m&&p.isPropagationStopped())break e;m=k,p.currentTarget=J;try{m(p)}catch(ie){pd(ie)}p.currentTarget=null,m=j}}}}function ot(i,o){var l=o[Eg];l===void 0&&(l=o[Eg]=new Set);var c=i+"__bubble";l.has(c)||(NT(o,i,2,!1),l.add(c))}function c0(i,o,l){var c=0;o&&(c|=4),NT(l,i,c,o)}var eh="_reactListening"+Math.random().toString(36).slice(2);function f0(i){if(!i[eh]){i[eh]=!0,w_.forEach(function(l){l!=="selectionchange"&&(yU.has(l)||c0(l,!1,i),c0(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[eh]||(o[eh]=!0,c0("selectionchange",!1,o))}}function NT(i,o,l,c){switch(a2(o)){case 2:var p=GU;break;case 8:p=qU;break;default:p=T0}l=p.bind(null,o,l,i),p=void 0,!Ng||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(p=!0),c?p!==void 0?i.addEventListener(o,l,{capture:!0,passive:p}):i.addEventListener(o,l,!0):p!==void 0?i.addEventListener(o,l,{passive:p}):i.addEventListener(o,l,!1)}function d0(i,o,l,c,p){var m=c;if((o&1)===0&&(o&2)===0&&c!==null)e:for(;;){if(c===null)return;var S=c.tag;if(S===3||S===4){var k=c.stateNode.containerInfo;if(k===p)break;if(S===4)for(S=c.return;S!==null;){var j=S.tag;if((j===3||j===4)&&S.stateNode.containerInfo===p)return;S=S.return}for(;k!==null;){if(S=Ss(k),S===null)return;if(j=S.tag,j===5||j===6||j===26||j===27){c=m=S;continue e}k=k.parentNode}}c=c.return}z_(function(){var J=m,ie=Rg(l),le=[];e:{var ee=cw.get(i);if(ee!==void 0){var ne=fd,Ce=i;switch(i){case"keypress":if(ud(l)===0)break e;case"keydown":case"keyup":ne=c8;break;case"focusin":Ce="focus",ne=Bg;break;case"focusout":Ce="blur",ne=Bg;break;case"beforeblur":case"afterblur":ne=Bg;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=P_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=QP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=h8;break;case aw:case sw:case lw:ne=t8;break;case uw:ne=m8;break;case"scroll":case"scrollend":ne=KP;break;case"wheel":ne=y8;break;case"copy":case"cut":case"paste":ne=r8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=j_;break;case"toggle":case"beforetoggle":ne=b8}var Pe=(o&4)!==0,jt=!Pe&&(i==="scroll"||i==="scrollend"),Y=Pe?ee!==null?ee+"Capture":null:ee;Pe=[];for(var F=J,Q;F!==null;){var oe=F;if(Q=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||Q===null||Y===null||(oe=uu(F,Y),oe!=null&&Pe.push(Hu(F,oe,Q))),jt)break;F=F.return}0<Pe.length&&(ee=new ne(ee,Ce,null,l,ie),le.push({event:ee,listeners:Pe}))}}if((o&7)===0){e:{if(ee=i==="mouseover"||i==="pointerover",ne=i==="mouseout"||i==="pointerout",ee&&l!==kg&&(Ce=l.relatedTarget||l.fromElement)&&(Ss(Ce)||Ce[bs]))break e;if((ne||ee)&&(ee=ie.window===ie?ie:(ee=ie.ownerDocument)?ee.defaultView||ee.parentWindow:window,ne?(Ce=l.relatedTarget||l.toElement,ne=J,Ce=Ce?Ss(Ce):null,Ce!==null&&(jt=s(Ce),Pe=Ce.tag,Ce!==jt||Pe!==5&&Pe!==27&&Pe!==6)&&(Ce=null)):(ne=null,Ce=J),ne!==Ce)){if(Pe=P_,oe="onMouseLeave",Y="onMouseEnter",F="mouse",(i==="pointerout"||i==="pointerover")&&(Pe=j_,oe="onPointerLeave",Y="onPointerEnter",F="pointer"),jt=ne==null?ee:lu(ne),Q=Ce==null?ee:lu(Ce),ee=new Pe(oe,F+"leave",ne,l,ie),ee.target=jt,ee.relatedTarget=Q,oe=null,Ss(ie)===J&&(Pe=new Pe(Y,F+"enter",Ce,l,ie),Pe.target=Q,Pe.relatedTarget=jt,oe=Pe),jt=oe,ne&&Ce)t:{for(Pe=vU,Y=ne,F=Ce,Q=0,oe=Y;oe;oe=Pe(oe))Q++;oe=0;for(var Le=F;Le;Le=Pe(Le))oe++;for(;0<Q-oe;)Y=Pe(Y),Q--;for(;0<oe-Q;)F=Pe(F),oe--;for(;Q--;){if(Y===F||F!==null&&Y===F.alternate){Pe=Y;break t}Y=Pe(Y),F=Pe(F)}Pe=null}else Pe=null;ne!==null&&IT(le,ee,ne,Pe,!1),Ce!==null&&jt!==null&&IT(le,jt,Ce,Pe,!0)}}e:{if(ee=J?lu(J):window,ne=ee.nodeName&&ee.nodeName.toLowerCase(),ne==="select"||ne==="input"&&ee.type==="file")var mt=Z_;else if(Y_(ee))if(K_)mt=R8;else{mt=A8;var Ae=T8}else ne=ee.nodeName,!ne||ne.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?J&&Ag(J.elementType)&&(mt=Z_):mt=k8;if(mt&&(mt=mt(i,J))){X_(le,mt,l,ie);break e}Ae&&Ae(i,ee,J),i==="focusout"&&J&&ee.type==="number"&&J.memoizedProps.value!=null&&Tg(ee,"number",ee.value)}switch(Ae=J?lu(J):window,i){case"focusin":(Y_(Ae)||Ae.contentEditable==="true")&&(Rs=Ae,jg=J,yu=null);break;case"focusout":yu=jg=Rs=null;break;case"mousedown":Hg=!0;break;case"contextmenu":case"mouseup":case"dragend":Hg=!1,iw(le,l,ie);break;case"selectionchange":if(N8)break;case"keydown":case"keyup":iw(le,l,ie)}var Qe;if(Lg)e:{switch(i){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else ks?G_(i,l)&&(lt="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(lt="onCompositionStart");lt&&(H_&&l.locale!=="ko"&&(ks||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&ks&&(Qe=L_()):(Co=ie,Ig="value"in Co?Co.value:Co.textContent,ks=!0)),Ae=th(J,lt),0<Ae.length&&(lt=new U_(lt,i,null,l,ie),le.push({event:lt,listeners:Ae}),Qe?lt.data=Qe:(Qe=q_(l),Qe!==null&&(lt.data=Qe)))),(Qe=x8?E8(i,l):_8(i,l))&&(lt=th(J,"onBeforeInput"),0<lt.length&&(Ae=new U_("onBeforeInput","beforeinput",null,l,ie),le.push({event:Ae,listeners:lt}),Ae.data=Qe)),pU(le,i,J,l,ie)}OT(le,o)})}function Hu(i,o,l){return{instance:i,listener:o,currentTarget:l}}function th(i,o){for(var l=o+"Capture",c=[];i!==null;){var p=i,m=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||m===null||(p=uu(i,l),p!=null&&c.unshift(Hu(i,p,m)),p=uu(i,o),p!=null&&c.push(Hu(i,p,m))),i.tag===3)return c;i=i.return}return[]}function vU(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function IT(i,o,l,c,p){for(var m=o._reactName,S=[];l!==null&&l!==c;){var k=l,j=k.alternate,J=k.stateNode;if(k=k.tag,j!==null&&j===c)break;k!==5&&k!==26&&k!==27||J===null||(j=J,p?(J=uu(l,m),J!=null&&S.unshift(Hu(l,J,j))):p||(J=uu(l,m),J!=null&&S.push(Hu(l,J,j)))),l=l.return}S.length!==0&&i.push({event:o,listeners:S})}var bU=/\r\n?/g,SU=/\u0000|\uFFFD/g;function MT(i){return(typeof i=="string"?i:""+i).replace(bU,`
|
|
9
|
-
`).replace(SU,"")}function DT(i,o){return o=MT(o),MT(i)===o}function Ut(i,o,l,c,p,m){switch(l){case"children":typeof c=="string"?o==="body"||o==="textarea"&&c===""||Cs(i,c):(typeof c=="number"||typeof c=="bigint")&&o!=="body"&&Cs(i,""+c);break;case"className":od(i,"class",c);break;case"tabIndex":od(i,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":od(i,l,c);break;case"style":D_(i,c,m);break;case"data":if(o!=="object"){od(i,"data",c);break}case"src":case"href":if(c===""&&(o!=="a"||l!=="href")){i.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){i.removeAttribute(l);break}c=sd(""+c),i.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="function"){i.setAttribute(l,"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 m=="function"&&(l==="formAction"?(o!=="input"&&Ut(i,o,"name",p.name,p,null),Ut(i,o,"formEncType",p.formEncType,p,null),Ut(i,o,"formMethod",p.formMethod,p,null),Ut(i,o,"formTarget",p.formTarget,p,null)):(Ut(i,o,"encType",p.encType,p,null),Ut(i,o,"method",p.method,p,null),Ut(i,o,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){i.removeAttribute(l);break}c=sd(""+c),i.setAttribute(l,c);break;case"onClick":c!=null&&(i.onclick=Fi);break;case"onScroll":c!=null&&ot("scroll",i);break;case"onScrollEnd":c!=null&&ot("scrollend",i);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(l=c.__html,l!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=l}}break;case"multiple":i.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":i.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){i.removeAttribute("xlink:href");break}l=sd(""+c),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(l,""+c):i.removeAttribute(l);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":c&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(l,""):i.removeAttribute(l);break;case"capture":case"download":c===!0?i.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(l,c):i.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?i.setAttribute(l,c):i.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?i.removeAttribute(l):i.setAttribute(l,c);break;case"popover":ot("beforetoggle",i),ot("toggle",i),id(i,"popover",c);break;case"xlinkActuate":Vi(i,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Vi(i,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Vi(i,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Vi(i,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Vi(i,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Vi(i,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Vi(i,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Vi(i,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Vi(i,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":id(i,"is",c);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=XP.get(l)||l,id(i,l,c))}}function h0(i,o,l,c,p,m){switch(l){case"style":D_(i,c,m);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(l=c.__html,l!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=l}}break;case"children":typeof c=="string"?Cs(i,c):(typeof c=="number"||typeof c=="bigint")&&Cs(i,""+c);break;case"onScroll":c!=null&&ot("scroll",i);break;case"onScrollEnd":c!=null&&ot("scrollend",i);break;case"onClick":c!=null&&(i.onclick=Fi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!C_.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(p=l.endsWith("Capture"),o=l.slice(2,p?l.length-7:void 0),m=i[cr]||null,m=m!=null?m[l]:null,typeof m=="function"&&i.removeEventListener(o,m,p),typeof c=="function")){typeof m!="function"&&m!==null&&(l in i?i[l]=null:i.hasAttribute(l)&&i.removeAttribute(l)),i.addEventListener(o,c,p);break e}l in i?i[l]=c:c===!0?i.setAttribute(l,""):id(i,l,c)}}}function Gn(i,o,l){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ot("error",i),ot("load",i);var c=!1,p=!1,m;for(m in l)if(l.hasOwnProperty(m)){var S=l[m];if(S!=null)switch(m){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:Ut(i,o,m,S,l,null)}}p&&Ut(i,o,"srcSet",l.srcSet,l,null),c&&Ut(i,o,"src",l.src,l,null);return;case"input":ot("invalid",i);var k=m=S=p=null,j=null,J=null;for(c in l)if(l.hasOwnProperty(c)){var ie=l[c];if(ie!=null)switch(c){case"name":p=ie;break;case"type":S=ie;break;case"checked":j=ie;break;case"defaultChecked":J=ie;break;case"value":m=ie;break;case"defaultValue":k=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(r(137,o));break;default:Ut(i,o,c,ie,l,null)}}O_(i,m,k,j,J,S,p,!1);return;case"select":ot("invalid",i),c=S=m=null;for(p in l)if(l.hasOwnProperty(p)&&(k=l[p],k!=null))switch(p){case"value":m=k;break;case"defaultValue":S=k;break;case"multiple":c=k;default:Ut(i,o,p,k,l,null)}o=m,l=S,i.multiple=!!c,o!=null?ws(i,!!c,o,!1):l!=null&&ws(i,!!c,l,!0);return;case"textarea":ot("invalid",i),m=p=c=null;for(S in l)if(l.hasOwnProperty(S)&&(k=l[S],k!=null))switch(S){case"value":c=k;break;case"defaultValue":p=k;break;case"children":m=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:Ut(i,o,S,k,l,null)}I_(i,c,p,m);return;case"option":for(j in l)l.hasOwnProperty(j)&&(c=l[j],c!=null)&&(j==="selected"?i.selected=c&&typeof c!="function"&&typeof c!="symbol":Ut(i,o,j,c,l,null));return;case"dialog":ot("beforetoggle",i),ot("toggle",i),ot("cancel",i),ot("close",i);break;case"iframe":case"object":ot("load",i);break;case"video":case"audio":for(c=0;c<ju.length;c++)ot(ju[c],i);break;case"image":ot("error",i),ot("load",i);break;case"details":ot("toggle",i);break;case"embed":case"source":case"link":ot("error",i),ot("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in l)if(l.hasOwnProperty(J)&&(c=l[J],c!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:Ut(i,o,J,c,l,null)}return;default:if(Ag(o)){for(ie in l)l.hasOwnProperty(ie)&&(c=l[ie],c!==void 0&&h0(i,o,ie,c,l,void 0));return}}for(k in l)l.hasOwnProperty(k)&&(c=l[k],c!=null&&Ut(i,o,k,c,l,null))}function xU(i,o,l,c){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,m=null,S=null,k=null,j=null,J=null,ie=null;for(ne in l){var le=l[ne];if(l.hasOwnProperty(ne)&&le!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":j=le;default:c.hasOwnProperty(ne)||Ut(i,o,ne,null,c,le)}}for(var ee in c){var ne=c[ee];if(le=l[ee],c.hasOwnProperty(ee)&&(ne!=null||le!=null))switch(ee){case"type":m=ne;break;case"name":p=ne;break;case"checked":J=ne;break;case"defaultChecked":ie=ne;break;case"value":S=ne;break;case"defaultValue":k=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,o));break;default:ne!==le&&Ut(i,o,ee,ne,c,le)}}Cg(i,S,k,j,J,ie,m,p);return;case"select":ne=S=k=ee=null;for(m in l)if(j=l[m],l.hasOwnProperty(m)&&j!=null)switch(m){case"value":break;case"multiple":ne=j;default:c.hasOwnProperty(m)||Ut(i,o,m,null,c,j)}for(p in c)if(m=c[p],j=l[p],c.hasOwnProperty(p)&&(m!=null||j!=null))switch(p){case"value":ee=m;break;case"defaultValue":k=m;break;case"multiple":S=m;default:m!==j&&Ut(i,o,p,m,c,j)}o=k,l=S,c=ne,ee!=null?ws(i,!!l,ee,!1):!!c!=!!l&&(o!=null?ws(i,!!l,o,!0):ws(i,!!l,l?[]:"",!1));return;case"textarea":ne=ee=null;for(k in l)if(p=l[k],l.hasOwnProperty(k)&&p!=null&&!c.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:Ut(i,o,k,null,c,p)}for(S in c)if(p=c[S],m=l[S],c.hasOwnProperty(S)&&(p!=null||m!=null))switch(S){case"value":ee=p;break;case"defaultValue":ne=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(r(91));break;default:p!==m&&Ut(i,o,S,p,c,m)}N_(i,ee,ne);return;case"option":for(var Ce in l)ee=l[Ce],l.hasOwnProperty(Ce)&&ee!=null&&!c.hasOwnProperty(Ce)&&(Ce==="selected"?i.selected=!1:Ut(i,o,Ce,null,c,ee));for(j in c)ee=c[j],ne=l[j],c.hasOwnProperty(j)&&ee!==ne&&(ee!=null||ne!=null)&&(j==="selected"?i.selected=ee&&typeof ee!="function"&&typeof ee!="symbol":Ut(i,o,j,ee,c,ne));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 Pe in l)ee=l[Pe],l.hasOwnProperty(Pe)&&ee!=null&&!c.hasOwnProperty(Pe)&&Ut(i,o,Pe,null,c,ee);for(J in c)if(ee=c[J],ne=l[J],c.hasOwnProperty(J)&&ee!==ne&&(ee!=null||ne!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,o));break;default:Ut(i,o,J,ee,c,ne)}return;default:if(Ag(o)){for(var jt in l)ee=l[jt],l.hasOwnProperty(jt)&&ee!==void 0&&!c.hasOwnProperty(jt)&&h0(i,o,jt,void 0,c,ee);for(ie in c)ee=c[ie],ne=l[ie],!c.hasOwnProperty(ie)||ee===ne||ee===void 0&&ne===void 0||h0(i,o,ie,ee,c,ne);return}}for(var Y in l)ee=l[Y],l.hasOwnProperty(Y)&&ee!=null&&!c.hasOwnProperty(Y)&&Ut(i,o,Y,null,c,ee);for(le in c)ee=c[le],ne=l[le],!c.hasOwnProperty(le)||ee===ne||ee==null&&ne==null||Ut(i,o,le,ee,c,ne)}function BT(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function EU(){if(typeof performance.getEntriesByType=="function"){for(var i=0,o=0,l=performance.getEntriesByType("resource"),c=0;c<l.length;c++){var p=l[c],m=p.transferSize,S=p.initiatorType,k=p.duration;if(m&&k&&BT(S)){for(S=0,k=p.responseEnd,c+=1;c<l.length;c++){var j=l[c],J=j.startTime;if(J>k)break;var ie=j.transferSize,le=j.initiatorType;ie&&BT(le)&&(j=j.responseEnd,S+=ie*(j<k?1:(k-J)/(j-J)))}if(--c,o+=8*(m+S)/(p.duration/1e3),i++,10<i)break}}if(0<i)return o/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var p0=null,m0=null;function nh(i){return i.nodeType===9?i:i.ownerDocument}function zT(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function LT(i,o){if(i===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&o==="foreignObject"?0:i}function g0(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var y0=null;function _U(){var i=window.event;return i&&i.type==="popstate"?i===y0?!1:(y0=i,!0):(y0=null,!1)}var $T=typeof setTimeout=="function"?setTimeout:void 0,wU=typeof clearTimeout=="function"?clearTimeout:void 0,PT=typeof Promise=="function"?Promise:void 0,CU=typeof queueMicrotask=="function"?queueMicrotask:typeof PT<"u"?function(i){return PT.resolve(null).then(i).catch(TU)}:$T;function TU(i){setTimeout(function(){throw i})}function Ho(i){return i==="head"}function UT(i,o){var l=o,c=0;do{var p=l.nextSibling;if(i.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"||l==="/&"){if(c===0){i.removeChild(p),nl(o);return}c--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")c++;else if(l==="html")Vu(i.ownerDocument.documentElement);else if(l==="head"){l=i.ownerDocument.head,Vu(l);for(var m=l.firstChild;m;){var S=m.nextSibling,k=m.nodeName;m[su]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&m.rel.toLowerCase()==="stylesheet"||l.removeChild(m),m=S}}else l==="body"&&Vu(i.ownerDocument.body);l=p}while(l);nl(o)}function jT(i,o){var l=i;i=0;do{var c=l.nextSibling;if(l.nodeType===1?o?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(o?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),c&&c.nodeType===8)if(l=c.data,l==="/$"){if(i===0)break;i--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||i++;l=c}while(l)}function v0(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var l=o;switch(o=o.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":v0(l),_g(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}i.removeChild(l)}}function AU(i,o,l,c){for(;i.nodeType===1;){var p=l;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!c&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(c){if(!i[su])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(m=i.getAttribute("rel"),m==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(m!==p.rel||i.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||i.getAttribute("title")!==(p.title==null?null:p.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(m=i.getAttribute("src"),(m!==(p.src==null?null:p.src)||i.getAttribute("type")!==(p.type==null?null:p.type)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&m&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var m=p.name==null?null:""+p.name;if(p.type==="hidden"&&i.getAttribute("name")===m)return i}else return i;if(i=Xr(i.nextSibling),i===null)break}return null}function kU(i,o,l){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=Xr(i.nextSibling),i===null))return null;return i}function HT(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=Xr(i.nextSibling),i===null))return null;return i}function b0(i){return i.data==="$?"||i.data==="$~"}function S0(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function RU(i,o){var l=i.ownerDocument;if(i.data==="$~")i._reactRetry=o;else if(i.data!=="$?"||l.readyState!=="loading")o();else{var c=function(){o(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),i._reactRetry=c}}function Xr(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return i}var x0=null;function VT(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"||l==="/&"){if(o===0)return Xr(i.nextSibling);o--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||o++}i=i.nextSibling}return null}function FT(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(o===0)return i;o--}else l!=="/$"&&l!=="/&"||o++}i=i.previousSibling}return null}function GT(i,o,l){switch(o=nh(l),i){case"html":if(i=o.documentElement,!i)throw Error(r(452));return i;case"head":if(i=o.head,!i)throw Error(r(453));return i;case"body":if(i=o.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Vu(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);_g(i)}var Zr=new Map,qT=new Set;function rh(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ao=Z.d;Z.d={f:OU,r:NU,D:IU,C:MU,L:DU,m:BU,X:LU,S:zU,M:$U};function OU(){var i=ao.f(),o=Xd();return i||o}function NU(i){var o=xs(i);o!==null&&o.tag===5&&o.type==="form"?uC(o):ao.r(i)}var Js=typeof document>"u"?null:document;function YT(i,o,l){var c=Js;if(c&&typeof o=="string"&&o){var p=jr(o);p='link[rel="'+i+'"][href="'+p+'"]',typeof l=="string"&&(p+='[crossorigin="'+l+'"]'),qT.has(p)||(qT.add(p),i={rel:i,crossOrigin:l,href:o},c.querySelector(p)===null&&(o=c.createElement("link"),Gn(o,"link",i),Ln(o),c.head.appendChild(o)))}}function IU(i){ao.D(i),YT("dns-prefetch",i,null)}function MU(i,o){ao.C(i,o),YT("preconnect",i,o)}function DU(i,o,l){ao.L(i,o,l);var c=Js;if(c&&i&&o){var p='link[rel="preload"][as="'+jr(o)+'"]';o==="image"&&l&&l.imageSrcSet?(p+='[imagesrcset="'+jr(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(p+='[imagesizes="'+jr(l.imageSizes)+'"]')):p+='[href="'+jr(i)+'"]';var m=p;switch(o){case"style":m=el(i);break;case"script":m=tl(i)}Zr.has(m)||(i=y({rel:"preload",href:o==="image"&&l&&l.imageSrcSet?void 0:i,as:o},l),Zr.set(m,i),c.querySelector(p)!==null||o==="style"&&c.querySelector(Fu(m))||o==="script"&&c.querySelector(Gu(m))||(o=c.createElement("link"),Gn(o,"link",i),Ln(o),c.head.appendChild(o)))}}function BU(i,o){ao.m(i,o);var l=Js;if(l&&i){var c=o&&typeof o.as=="string"?o.as:"script",p='link[rel="modulepreload"][as="'+jr(c)+'"][href="'+jr(i)+'"]',m=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=tl(i)}if(!Zr.has(m)&&(i=y({rel:"modulepreload",href:i},o),Zr.set(m,i),l.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Gu(m)))return}c=l.createElement("link"),Gn(c,"link",i),Ln(c),l.head.appendChild(c)}}}function zU(i,o,l){ao.S(i,o,l);var c=Js;if(c&&i){var p=Es(c).hoistableStyles,m=el(i);o=o||"default";var S=p.get(m);if(!S){var k={loading:0,preload:null};if(S=c.querySelector(Fu(m)))k.loading=5;else{i=y({rel:"stylesheet",href:i,"data-precedence":o},l),(l=Zr.get(m))&&E0(i,l);var j=S=c.createElement("link");Ln(j),Gn(j,"link",i),j._p=new Promise(function(J,ie){j.onload=J,j.onerror=ie}),j.addEventListener("load",function(){k.loading|=1}),j.addEventListener("error",function(){k.loading|=2}),k.loading|=4,ih(S,o,c)}S={type:"stylesheet",instance:S,count:1,state:k},p.set(m,S)}}}function LU(i,o){ao.X(i,o);var l=Js;if(l&&i){var c=Es(l).hoistableScripts,p=tl(i),m=c.get(p);m||(m=l.querySelector(Gu(p)),m||(i=y({src:i,async:!0},o),(o=Zr.get(p))&&_0(i,o),m=l.createElement("script"),Ln(m),Gn(m,"link",i),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(p,m))}}function $U(i,o){ao.M(i,o);var l=Js;if(l&&i){var c=Es(l).hoistableScripts,p=tl(i),m=c.get(p);m||(m=l.querySelector(Gu(p)),m||(i=y({src:i,async:!0,type:"module"},o),(o=Zr.get(p))&&_0(i,o),m=l.createElement("script"),Ln(m),Gn(m,"link",i),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(p,m))}}function XT(i,o,l,c){var p=(p=he.current)?rh(p):null;if(!p)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(o=el(l.href),l=Es(p).hoistableStyles,c=l.get(o),c||(c={type:"style",instance:null,count:0,state:null},l.set(o,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){i=el(l.href);var m=Es(p).hoistableStyles,S=m.get(i);if(S||(p=p.ownerDocument||p,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(i,S),(m=p.querySelector(Fu(i)))&&!m._p&&(S.instance=m,S.state.loading=5),Zr.has(i)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Zr.set(i,l),m||PU(p,i,l,S.state))),o&&c===null)throw Error(r(528,""));return S}if(o&&c!==null)throw Error(r(529,""));return null;case"script":return o=l.async,l=l.src,typeof l=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=tl(l),l=Es(p).hoistableScripts,c=l.get(o),c||(c={type:"script",instance:null,count:0,state:null},l.set(o,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function el(i){return'href="'+jr(i)+'"'}function Fu(i){return'link[rel="stylesheet"]['+i+"]"}function ZT(i){return y({},i,{"data-precedence":i.precedence,precedence:null})}function PU(i,o,l,c){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?c.loading=1:(o=i.createElement("link"),c.preload=o,o.addEventListener("load",function(){return c.loading|=1}),o.addEventListener("error",function(){return c.loading|=2}),Gn(o,"link",l),Ln(o),i.head.appendChild(o))}function tl(i){return'[src="'+jr(i)+'"]'}function Gu(i){return"script[async]"+i}function KT(i,o,l){if(o.count++,o.instance===null)switch(o.type){case"style":var c=i.querySelector('style[data-href~="'+jr(l.href)+'"]');if(c)return o.instance=c,Ln(c),c;var p=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(i.ownerDocument||i).createElement("style"),Ln(c),Gn(c,"style",p),ih(c,l.precedence,i),o.instance=c;case"stylesheet":p=el(l.href);var m=i.querySelector(Fu(p));if(m)return o.state.loading|=4,o.instance=m,Ln(m),m;c=ZT(l),(p=Zr.get(p))&&E0(c,p),m=(i.ownerDocument||i).createElement("link"),Ln(m);var S=m;return S._p=new Promise(function(k,j){S.onload=k,S.onerror=j}),Gn(m,"link",c),o.state.loading|=4,ih(m,l.precedence,i),o.instance=m;case"script":return m=tl(l.src),(p=i.querySelector(Gu(m)))?(o.instance=p,Ln(p),p):(c=l,(p=Zr.get(m))&&(c=y({},l),_0(c,p)),i=i.ownerDocument||i,p=i.createElement("script"),Ln(p),Gn(p,"link",c),i.head.appendChild(p),o.instance=p);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(c=o.instance,o.state.loading|=4,ih(c,l.precedence,i));return o.instance}function ih(i,o,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,m=p,S=0;S<c.length;S++){var k=c[S];if(k.dataset.precedence===o)m=k;else if(m!==p)break}m?m.parentNode.insertBefore(i,m.nextSibling):(o=l.nodeType===9?l.head:l,o.insertBefore(i,o.firstChild))}function E0(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function _0(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var oh=null;function WT(i,o,l){if(oh===null){var c=new Map,p=oh=new Map;p.set(l,c)}else p=oh,c=p.get(l),c||(c=new Map,p.set(l,c));if(c.has(i))return c;for(c.set(i,null),l=l.getElementsByTagName(i),p=0;p<l.length;p++){var m=l[p];if(!(m[su]||m[jn]||i==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var S=m.getAttribute(o)||"";S=i+S;var k=c.get(S);k?k.push(m):c.set(S,[m])}}return c}function QT(i,o,l){i=i.ownerDocument||i,i.head.insertBefore(l,o==="title"?i.querySelector("head > title"):null)}function UU(i,o,l){if(l===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(i=o.disabled,typeof o.precedence=="string"&&i==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function JT(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function jU(i,o,l,c){if(l.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var p=el(c.href),m=o.querySelector(Fu(p));if(m){o=m._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=ah.bind(i),o.then(i,i)),l.state.loading|=4,l.instance=m,Ln(m);return}m=o.ownerDocument||o,c=ZT(c),(p=Zr.get(p))&&E0(c,p),m=m.createElement("link"),Ln(m);var S=m;S._p=new Promise(function(k,j){S.onload=k,S.onerror=j}),Gn(m,"link",c),l.instance=m}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(l,o),(o=l.state.preload)&&(l.state.loading&3)===0&&(i.count++,l=ah.bind(i),o.addEventListener("load",l),o.addEventListener("error",l))}}var w0=0;function HU(i,o){return i.stylesheets&&i.count===0&&lh(i,i.stylesheets),0<i.count||0<i.imgCount?function(l){var c=setTimeout(function(){if(i.stylesheets&&lh(i,i.stylesheets),i.unsuspend){var m=i.unsuspend;i.unsuspend=null,m()}},6e4+o);0<i.imgBytes&&w0===0&&(w0=62500*EU());var p=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&lh(i,i.stylesheets),i.unsuspend)){var m=i.unsuspend;i.unsuspend=null,m()}},(i.imgBytes>w0?50:800)+o);return i.unsuspend=l,function(){i.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function ah(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lh(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var sh=null;function lh(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,sh=new Map,o.forEach(VU,i),sh=null,ah.call(i))}function VU(i,o){if(!(o.state.loading&4)){var l=sh.get(i);if(l)var c=l.get(null);else{l=new Map,sh.set(i,l);for(var p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<p.length;m++){var S=p[m];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(l.set(S.dataset.precedence,S),c=S)}c&&l.set(null,c)}p=o.instance,S=p.getAttribute("data-precedence"),m=l.get(S)||c,m===c&&l.set(null,p),l.set(S,p),this.count++,c=ah.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),m?m.parentNode.insertBefore(p,m.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(p,i.firstChild)),o.state.loading|=4}}var qu={$$typeof:T,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function FU(i,o,l,c,p,m,S,k,j){this.tag=1,this.containerInfo=i,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=bg(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bg(0),this.hiddenUpdates=bg(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=m,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function e2(i,o,l,c,p,m,S,k,j,J,ie,le){return i=new FU(i,o,l,S,j,J,ie,le,k),o=1,m===!0&&(o|=24),m=Ar(3,null,null,o),i.current=m,m.stateNode=i,o=ry(),o.refCount++,i.pooledCache=o,o.refCount++,m.memoizedState={element:c,isDehydrated:l,cache:o},sy(m),i}function t2(i){return i?(i=Is,i):Is}function n2(i,o,l,c,p,m){p=t2(p),c.context===null?c.context=p:c.pendingContext=p,c=No(o),c.payload={element:l},m=m===void 0?null:m,m!==null&&(c.callback=m),l=Io(i,c,o),l!==null&&(gr(l,i,o),wu(l,i,o))}function r2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function C0(i,o){r2(i,o),(i=i.alternate)&&r2(i,o)}function i2(i){if(i.tag===13||i.tag===31){var o=Ta(i,67108864);o!==null&&gr(o,i,67108864),C0(i,67108864)}}function o2(i){if(i.tag===13||i.tag===31){var o=Ir();o=Sg(o);var l=Ta(i,o);l!==null&&gr(l,i,o),C0(i,o)}}var uh=!0;function GU(i,o,l,c){var p=D.T;D.T=null;var m=Z.p;try{Z.p=2,T0(i,o,l,c)}finally{Z.p=m,D.T=p}}function qU(i,o,l,c){var p=D.T;D.T=null;var m=Z.p;try{Z.p=8,T0(i,o,l,c)}finally{Z.p=m,D.T=p}}function T0(i,o,l,c){if(uh){var p=A0(c);if(p===null)d0(i,o,c,ch,l),s2(i,c);else if(XU(p,i,o,l,c))c.stopPropagation();else if(s2(i,c),o&4&&-1<YU.indexOf(i)){for(;p!==null;){var m=xs(p);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var S=xa(m.pendingLanes);if(S!==0){var k=m;for(k.pendingLanes|=2,k.entangledLanes|=2;S;){var j=1<<31-At(S);k.entanglements[1]|=j,S&=~j}Oi(m),(St&6)===0&&(qd=tt()+500,Uu(0))}}break;case 31:case 13:k=Ta(m,2),k!==null&&gr(k,m,2),Xd(),C0(m,2)}if(m=A0(c),m===null&&d0(i,o,c,ch,l),m===p)break;p=m}p!==null&&c.stopPropagation()}else d0(i,o,c,null,l)}}function A0(i){return i=Rg(i),k0(i)}var ch=null;function k0(i){if(ch=null,i=Ss(i),i!==null){var o=s(i);if(o===null)i=null;else{var l=o.tag;if(l===13){if(i=u(o),i!==null)return i;i=null}else if(l===31){if(i=f(o),i!==null)return i;i=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return ch=i,null}function a2(i){switch(i){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(oi()){case te:return 2;case ce:return 8;case we:case ze:return 32;case We:return 268435456;default:return 32}default:return 32}}var R0=!1,Vo=null,Fo=null,Go=null,Yu=new Map,Xu=new Map,qo=[],YU="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 s2(i,o){switch(i){case"focusin":case"focusout":Vo=null;break;case"dragenter":case"dragleave":Fo=null;break;case"mouseover":case"mouseout":Go=null;break;case"pointerover":case"pointerout":Yu.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xu.delete(o.pointerId)}}function Zu(i,o,l,c,p,m){return i===null||i.nativeEvent!==m?(i={blockedOn:o,domEventName:l,eventSystemFlags:c,nativeEvent:m,targetContainers:[p]},o!==null&&(o=xs(o),o!==null&&i2(o)),i):(i.eventSystemFlags|=c,o=i.targetContainers,p!==null&&o.indexOf(p)===-1&&o.push(p),i)}function XU(i,o,l,c,p){switch(o){case"focusin":return Vo=Zu(Vo,i,o,l,c,p),!0;case"dragenter":return Fo=Zu(Fo,i,o,l,c,p),!0;case"mouseover":return Go=Zu(Go,i,o,l,c,p),!0;case"pointerover":var m=p.pointerId;return Yu.set(m,Zu(Yu.get(m)||null,i,o,l,c,p)),!0;case"gotpointercapture":return m=p.pointerId,Xu.set(m,Zu(Xu.get(m)||null,i,o,l,c,p)),!0}return!1}function l2(i){var o=Ss(i.target);if(o!==null){var l=s(o);if(l!==null){if(o=l.tag,o===13){if(o=u(l),o!==null){i.blockedOn=o,E_(i.priority,function(){o2(l)});return}}else if(o===31){if(o=f(l),o!==null){i.blockedOn=o,E_(i.priority,function(){o2(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function fh(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=A0(i.nativeEvent);if(l===null){l=i.nativeEvent;var c=new l.constructor(l.type,l);kg=c,l.target.dispatchEvent(c),kg=null}else return o=xs(l),o!==null&&i2(o),i.blockedOn=l,!1;o.shift()}return!0}function u2(i,o,l){fh(i)&&l.delete(o)}function ZU(){R0=!1,Vo!==null&&fh(Vo)&&(Vo=null),Fo!==null&&fh(Fo)&&(Fo=null),Go!==null&&fh(Go)&&(Go=null),Yu.forEach(u2),Xu.forEach(u2)}function dh(i,o){i.blockedOn===o&&(i.blockedOn=null,R0||(R0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ZU)))}var hh=null;function c2(i){hh!==i&&(hh=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){hh===i&&(hh=null);for(var o=0;o<i.length;o+=3){var l=i[o],c=i[o+1],p=i[o+2];if(typeof c!="function"){if(k0(c||l)===null)continue;break}var m=xs(l);m!==null&&(i.splice(o,3),o-=3,Ay(m,{pending:!0,data:p,method:l.method,action:c},c,p))}}))}function nl(i){function o(j){return dh(j,i)}Vo!==null&&dh(Vo,i),Fo!==null&&dh(Fo,i),Go!==null&&dh(Go,i),Yu.forEach(o),Xu.forEach(o);for(var l=0;l<qo.length;l++){var c=qo[l];c.blockedOn===i&&(c.blockedOn=null)}for(;0<qo.length&&(l=qo[0],l.blockedOn===null);)l2(l),l.blockedOn===null&&qo.shift();if(l=(i.ownerDocument||i).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var p=l[c],m=l[c+1],S=p[cr]||null;if(typeof m=="function")S||c2(l);else if(S){var k=null;if(m&&m.hasAttribute("formAction")){if(p=m,S=m[cr]||null)k=S.formAction;else if(k0(p)!==null)continue}else k=S.action;typeof k=="function"?l[c+1]=k:(l.splice(c,3),c-=3),c2(l)}}}function f2(){function i(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(S){return p=S})},focusReset:"manual",scroll:"manual"})}function o(){p!==null&&(p(),p=null),c||setTimeout(l,20)}function l(){if(!c&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(l,100),function(){c=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),p!==null&&(p(),p=null)}}}function O0(i){this._internalRoot=i}ph.prototype.render=O0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var l=o.current,c=Ir();n2(l,c,i,o,null,null)},ph.prototype.unmount=O0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;n2(i.current,2,null,i,null,null),Xd(),o[bs]=null}};function ph(i){this._internalRoot=i}ph.prototype.unstable_scheduleHydration=function(i){if(i){var o=x_();i={blockedOn:null,target:i,priority:o};for(var l=0;l<qo.length&&o!==0&&o<qo[l].priority;l++);qo.splice(l,0,i),l===0&&l2(i)}};var d2=t.version;if(d2!=="19.2.4")throw Error(r(527,d2,"19.2.4"));Z.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=h(o),i=i!==null?g(i):null,i=i===null?null:i.stateNode,i};var KU={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mh.isDisabled&&mh.supportsFiber)try{hn=mh.inject(KU),sn=mh}catch{}}return il.createRoot=function(i,o){if(!a(i))throw Error(r(299));var l=!1,c="",p=bC,m=SC,S=xC;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(c=o.identifierPrefix),o.onUncaughtError!==void 0&&(p=o.onUncaughtError),o.onCaughtError!==void 0&&(m=o.onCaughtError),o.onRecoverableError!==void 0&&(S=o.onRecoverableError)),o=e2(i,1,!1,null,null,l,c,null,p,m,S,f2),i[bs]=o.current,f0(i),new O0(o)},il.hydrateRoot=function(i,o,l){if(!a(i))throw Error(r(299));var c=!1,p="",m=bC,S=SC,k=xC,j=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(m=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(k=l.onRecoverableError),l.formState!==void 0&&(j=l.formState)),o=e2(i,1,!0,o,l??null,c,p,j,m,S,k,f2),o.context=t2(null),l=o.current,c=Ir(),c=Sg(c),p=No(c),p.callback=null,Io(l,p,c),l=c,o.current.lanes=l,au(o,l),Oi(o),i[bs]=o.current,f0(i),new ph(o)},il.version="19.2.4",il}var j0;function x2(){if(j0)return yh.exports;j0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),yh.exports=S2(),yh.exports}var E2=x2();function _2(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function w2(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var C2=(function(){function e(n){var r=this;this._insertTag=function(a){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(a,s),r.tags.push(a)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(w2(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var s=_2(a);try{s.insertRule(r,s.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var a;return(a=r.parentNode)==null?void 0:a.removeChild(r)}),this.tags=[],this.ctr=0},e})(),Yn="-ms-",Wu="-moz-",yt="-webkit-",H0="comm",_h="rule",wh="decl",T2="@import",V0="@keyframes",A2="@layer",k2=Math.abs,Qu=String.fromCharCode,R2=Object.assign;function O2(e,t){return Pn(e,0)^45?(((t<<2^Pn(e,0))<<2^Pn(e,1))<<2^Pn(e,2))<<2^Pn(e,3):0}function F0(e){return e.trim()}function N2(e,t){return(e=t.exec(e))?e[0]:e}function vt(e,t,n){return e.replace(t,n)}function Ch(e,t){return e.indexOf(t)}function Pn(e,t){return e.charCodeAt(t)|0}function ol(e,t,n){return e.slice(t,n)}function ci(e){return e.length}function Th(e){return e.length}function Ju(e,t){return t.push(e),e}function I2(e,t){return e.map(t).join("")}var ec=1,Pa=1,G0=0,ar=0,xn=0,Ua="";function tc(e,t,n,r,a,s,u){return{value:e,root:t,parent:n,type:r,props:a,children:s,line:ec,column:Pa,length:u,return:""}}function al(e,t){return R2(tc("",null,null,"",null,null,0),e,{length:-e.length},t)}function M2(){return xn}function D2(){return xn=ar>0?Pn(Ua,--ar):0,Pa--,xn===10&&(Pa=1,ec--),xn}function yr(){return xn=ar<G0?Pn(Ua,ar++):0,Pa++,xn===10&&(Pa=1,ec++),xn}function fi(){return Pn(Ua,ar)}function nc(){return ar}function sl(e,t){return ol(Ua,e,t)}function ll(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function q0(e){return ec=Pa=1,G0=ci(Ua=e),ar=0,[]}function Y0(e){return Ua="",e}function rc(e){return F0(sl(ar-1,Ah(e===91?e+2:e===40?e+1:e)))}function B2(e){for(;(xn=fi())&&xn<33;)yr();return ll(e)>2||ll(xn)>3?"":" "}function z2(e,t){for(;--t&&yr()&&!(xn<48||xn>102||xn>57&&xn<65||xn>70&&xn<97););return sl(e,nc()+(t<6&&fi()==32&&yr()==32))}function Ah(e){for(;yr();)switch(xn){case e:return ar;case 34:case 39:e!==34&&e!==39&&Ah(xn);break;case 40:e===41&&Ah(e);break;case 92:yr();break}return ar}function L2(e,t){for(;yr()&&e+xn!==57;)if(e+xn===84&&fi()===47)break;return"/*"+sl(t,ar-1)+"*"+Qu(e===47?e:yr())}function $2(e){for(;!ll(fi());)yr();return sl(e,ar)}function P2(e){return Y0(ic("",null,null,null,[""],e=q0(e),0,[0],e))}function ic(e,t,n,r,a,s,u,f,d){for(var h=0,g=0,y=u,b=0,v=0,x=0,E=1,_=1,w=1,O=0,T="",A=a,M=s,R=r,$=T;_;)switch(x=O,O=yr()){case 40:if(x!=108&&Pn($,y-1)==58){Ch($+=vt(rc(O),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:$+=rc(O);break;case 9:case 10:case 13:case 32:$+=B2(x);break;case 92:$+=z2(nc()-1,7);continue;case 47:switch(fi()){case 42:case 47:Ju(U2(L2(yr(),nc()),t,n),d);break;default:$+="/"}break;case 123*E:f[h++]=ci($)*w;case 125*E:case 59:case 0:switch(O){case 0:case 125:_=0;case 59+g:w==-1&&($=vt($,/\f/g,"")),v>0&&ci($)-y&&Ju(v>32?Z0($+";",r,n,y-1):Z0(vt($," ","")+";",r,n,y-2),d);break;case 59:$+=";";default:if(Ju(R=X0($,t,n,h,g,a,f,T,A=[],M=[],y),s),O===123)if(g===0)ic($,t,R,R,A,s,y,f,M);else switch(b===99&&Pn($,3)===110?100:b){case 100:case 108:case 109:case 115:ic(e,R,R,r&&Ju(X0(e,R,R,0,0,a,f,T,a,A=[],y),M),a,M,y,f,r?A:M);break;default:ic($,R,R,R,[""],M,0,f,M)}}h=g=v=0,E=w=1,T=$="",y=u;break;case 58:y=1+ci($),v=x;default:if(E<1){if(O==123)--E;else if(O==125&&E++==0&&D2()==125)continue}switch($+=Qu(O),O*E){case 38:w=g>0?1:($+="\f",-1);break;case 44:f[h++]=(ci($)-1)*w,w=1;break;case 64:fi()===45&&($+=rc(yr())),b=fi(),g=y=ci(T=$+=$2(nc())),O++;break;case 45:x===45&&ci($)==2&&(E=0)}}return s}function X0(e,t,n,r,a,s,u,f,d,h,g){for(var y=a-1,b=a===0?s:[""],v=Th(b),x=0,E=0,_=0;x<r;++x)for(var w=0,O=ol(e,y+1,y=k2(E=u[x])),T=e;w<v;++w)(T=F0(E>0?b[w]+" "+O:vt(O,/&\f/g,b[w])))&&(d[_++]=T);return tc(e,t,n,a===0?_h:f,d,h,g)}function U2(e,t,n){return tc(e,t,n,H0,Qu(M2()),ol(e,2,-2),0)}function Z0(e,t,n,r){return tc(e,t,n,wh,ol(e,0,r),ol(e,r+1,-1),r)}function ja(e,t){for(var n="",r=Th(e),a=0;a<r;a++)n+=t(e[a],a,e,t)||"";return n}function j2(e,t,n,r){switch(e.type){case A2:if(e.children.length)break;case T2:case wh:return e.return=e.return||e.value;case H0:return"";case V0:return e.return=e.value+"{"+ja(e.children,r)+"}";case _h:e.value=e.props.join(",")}return ci(n=ja(e.children,r))?e.return=e.value+"{"+n+"}":""}function H2(e){var t=Th(e);return function(n,r,a,s){for(var u="",f=0;f<t;f++)u+=e[f](n,r,a,s)||"";return u}}function V2(e){return function(t){t.root||(t=t.return)&&e(t)}}function K0(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var F2=function(t,n,r){for(var a=0,s=0;a=s,s=fi(),a===38&&s===12&&(n[r]=1),!ll(s);)yr();return sl(t,ar)},G2=function(t,n){var r=-1,a=44;do switch(ll(a)){case 0:a===38&&fi()===12&&(n[r]=1),t[r]+=F2(ar-1,n,r);break;case 2:t[r]+=rc(a);break;case 4:if(a===44){t[++r]=fi()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Qu(a)}while(a=yr());return t},q2=function(t,n){return Y0(G2(q0(t),n))},W0=new WeakMap,Y2=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,a=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!W0.get(r))&&!a){W0.set(t,!0);for(var s=[],u=q2(n,s),f=r.props,d=0,h=0;d<u.length;d++)for(var g=0;g<f.length;g++,h++)t.props[h]=s[d]?u[d].replace(/&\f/g,f[g]):f[g]+" "+u[d]}}},X2=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Q0(e,t){switch(O2(e,t)){case 5103:return yt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return yt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return yt+e+Wu+e+Yn+e+e;case 6828:case 4268:return yt+e+Yn+e+e;case 6165:return yt+e+Yn+"flex-"+e+e;case 5187:return yt+e+vt(e,/(\w+).+(:[^]+)/,yt+"box-$1$2"+Yn+"flex-$1$2")+e;case 5443:return yt+e+Yn+"flex-item-"+vt(e,/flex-|-self/,"")+e;case 4675:return yt+e+Yn+"flex-line-pack"+vt(e,/align-content|flex-|-self/,"")+e;case 5548:return yt+e+Yn+vt(e,"shrink","negative")+e;case 5292:return yt+e+Yn+vt(e,"basis","preferred-size")+e;case 6060:return yt+"box-"+vt(e,"-grow","")+yt+e+Yn+vt(e,"grow","positive")+e;case 4554:return yt+vt(e,/([^-])(transform)/g,"$1"+yt+"$2")+e;case 6187:return vt(vt(vt(e,/(zoom-|grab)/,yt+"$1"),/(image-set)/,yt+"$1"),e,"")+e;case 5495:case 3959:return vt(e,/(image-set\([^]*)/,yt+"$1$`$1");case 4968:return vt(vt(e,/(.+:)(flex-)?(.*)/,yt+"box-pack:$3"+Yn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+yt+e+e;case 4095:case 3583:case 4068:case 2532:return vt(e,/(.+)-inline(.+)/,yt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ci(e)-1-t>6)switch(Pn(e,t+1)){case 109:if(Pn(e,t+4)!==45)break;case 102:return vt(e,/(.+:)(.+)-([^]+)/,"$1"+yt+"$2-$3$1"+Wu+(Pn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ch(e,"stretch")?Q0(vt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Pn(e,t+1)!==115)break;case 6444:switch(Pn(e,ci(e)-3-(~Ch(e,"!important")&&10))){case 107:return vt(e,":",":"+yt)+e;case 101:return vt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+yt+(Pn(e,14)===45?"inline-":"")+"box$3$1"+yt+"$2$3$1"+Yn+"$2box$3")+e}break;case 5936:switch(Pn(e,t+11)){case 114:return yt+e+Yn+vt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return yt+e+Yn+vt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return yt+e+Yn+vt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return yt+e+Yn+e+e}return e}var Z2=function(t,n,r,a){if(t.length>-1&&!t.return)switch(t.type){case wh:t.return=Q0(t.value,t.length);break;case V0:return ja([al(t,{value:vt(t.value,"@","@"+yt)})],a);case _h:if(t.length)return I2(t.props,function(s){switch(N2(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ja([al(t,{props:[vt(s,/:(read-\w+)/,":"+Wu+"$1")]})],a);case"::placeholder":return ja([al(t,{props:[vt(s,/:(plac\w+)/,":"+yt+"input-$1")]}),al(t,{props:[vt(s,/:(plac\w+)/,":"+Wu+"$1")]}),al(t,{props:[vt(s,/:(plac\w+)/,Yn+"input-$1")]})],a)}return""})}},K2=[Z2],J0=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(E){var _=E.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(E),E.setAttribute("data-s",""))})}var a=t.stylisPlugins||K2,s={},u,f=[];u=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(E){for(var _=E.getAttribute("data-emotion").split(" "),w=1;w<_.length;w++)s[_[w]]=!0;f.push(E)});var d,h=[Y2,X2];{var g,y=[j2,V2(function(E){g.insert(E)})],b=H2(h.concat(a,y)),v=function(_){return ja(P2(_),b)};d=function(_,w,O,T){g=O,v(_?_+"{"+w.styles+"}":w.styles),T&&(x.inserted[w.name]=!0)}}var x={key:n,sheet:new C2({key:n,container:u,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:d};return x.sheet.hydrate(f),x},N=xh();const Jn=Ku(N),oc=h2({__proto__:null,default:Jn},[N]);function ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ac.apply(null,arguments)}var kh={exports:{}},xt={};var ev;function W2(){if(ev)return xt;ev=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,E=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function T(M){if(typeof M=="object"&&M!==null){var R=M.$$typeof;switch(R){case t:switch(M=M.type,M){case d:case h:case r:case s:case a:case y:return M;default:switch(M=M&&M.$$typeof,M){case f:case g:case x:case v:case u:return M;default:return R}}case n:return R}}}function A(M){return T(M)===h}return xt.AsyncMode=d,xt.ConcurrentMode=h,xt.ContextConsumer=f,xt.ContextProvider=u,xt.Element=t,xt.ForwardRef=g,xt.Fragment=r,xt.Lazy=x,xt.Memo=v,xt.Portal=n,xt.Profiler=s,xt.StrictMode=a,xt.Suspense=y,xt.isAsyncMode=function(M){return A(M)||T(M)===d},xt.isConcurrentMode=A,xt.isContextConsumer=function(M){return T(M)===f},xt.isContextProvider=function(M){return T(M)===u},xt.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===t},xt.isForwardRef=function(M){return T(M)===g},xt.isFragment=function(M){return T(M)===r},xt.isLazy=function(M){return T(M)===x},xt.isMemo=function(M){return T(M)===v},xt.isPortal=function(M){return T(M)===n},xt.isProfiler=function(M){return T(M)===s},xt.isStrictMode=function(M){return T(M)===a},xt.isSuspense=function(M){return T(M)===y},xt.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===r||M===h||M===s||M===a||M===y||M===b||typeof M=="object"&&M!==null&&(M.$$typeof===x||M.$$typeof===v||M.$$typeof===u||M.$$typeof===f||M.$$typeof===g||M.$$typeof===_||M.$$typeof===w||M.$$typeof===O||M.$$typeof===E)},xt.typeOf=T,xt}var tv;function Q2(){return tv||(tv=1,kh.exports=W2()),kh.exports}var Rh,nv;function J2(){if(nv)return Rh;nv=1;var e=Q2(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[e.ForwardRef]=r,s[e.Memo]=a;function u(x){return e.isMemo(x)?a:s[x.$$typeof]||t}var f=Object.defineProperty,d=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,g=Object.getOwnPropertyDescriptor,y=Object.getPrototypeOf,b=Object.prototype;function v(x,E,_){if(typeof E!="string"){if(b){var w=y(E);w&&w!==b&&v(x,w,_)}var O=d(E);h&&(O=O.concat(h(E)));for(var T=u(x),A=u(E),M=0;M<O.length;++M){var R=O[M];if(!n[R]&&!(_&&_[R])&&!(A&&A[R])&&!(T&&T[R])){var $=g(E,R);try{f(x,R,$)}catch{}}}}return x}return Rh=v,Rh}J2();var eA=!0;function rv(e,t,n){var r="";return n.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):a&&(r+=a+" ")}),r}var Oh=function(t,n,r){var a=t.key+"-"+n.name;(r===!1||eA===!1)&&t.registered[a]===void 0&&(t.registered[a]=n.styles)},Nh=function(t,n,r){Oh(t,n,r);var a=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+a:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function tA(e){for(var t=0,n,r=0,a=e.length;a>=4;++r,a-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var nA={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},rA=/[A-Z]|^ms/g,iA=/_EMO_([^_]+?)_([^]*?)_EMO_/g,iv=function(t){return t.charCodeAt(1)===45},ov=function(t){return t!=null&&typeof t!="boolean"},Ih=K0(function(e){return iv(e)?e:e.replace(rA,"-$&").toLowerCase()}),av=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(iA,function(r,a,s){return di={name:a,styles:s,next:di},a})}return nA[t]!==1&&!iv(t)&&typeof n=="number"&&n!==0?n+"px":n};function ul(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var a=n;if(a.anim===1)return di={name:a.name,styles:a.styles,next:di},a.name;var s=n;if(s.styles!==void 0){var u=s.next;if(u!==void 0)for(;u!==void 0;)di={name:u.name,styles:u.styles,next:di},u=u.next;var f=s.styles+";";return f}return oA(e,t,n)}case"function":{if(e!==void 0){var d=di,h=n(e);return di=d,ul(e,t,h)}break}}var g=n;if(t==null)return g;var y=t[g];return y!==void 0?y:g}function oA(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=ul(e,t,n[a])+";";else for(var s in n){var u=n[s];if(typeof u!="object"){var f=u;t!=null&&t[f]!==void 0?r+=s+"{"+t[f]+"}":ov(f)&&(r+=Ih(s)+":"+av(s,f)+";")}else if(Array.isArray(u)&&typeof u[0]=="string"&&(t==null||t[u[0]]===void 0))for(var d=0;d<u.length;d++)ov(u[d])&&(r+=Ih(s)+":"+av(s,u[d])+";");else{var h=ul(e,t,u);switch(s){case"animation":case"animationName":{r+=Ih(s)+":"+h+";";break}default:r+=s+"{"+h+"}"}}}return r}var sv=/label:\s*([^\s;{]+)\s*(;|$)/g,di;function cl(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,a="";di=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,a+=ul(n,t,s);else{var u=s;a+=u[0]}for(var f=1;f<e.length;f++)if(a+=ul(n,t,e[f]),r){var d=s;a+=d[f]}sv.lastIndex=0;for(var h="",g;(g=sv.exec(a))!==null;)h+="-"+g[1];var y=tA(a)+h;return{name:y,styles:a,next:di}}var aA=function(t){return t()},lv=oc.useInsertionEffect?oc.useInsertionEffect:!1,uv=lv||aA,cv=lv||N.useLayoutEffect,fv=N.createContext(typeof HTMLElement<"u"?J0({key:"css"}):null),sA=fv.Provider,Mh=function(t){return N.forwardRef(function(n,r){var a=N.useContext(fv);return t(n,a,r)})},fl=N.createContext({}),Dh={}.hasOwnProperty,Bh="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",lA=function(t,n){var r={};for(var a in n)Dh.call(n,a)&&(r[a]=n[a]);return r[Bh]=t,r},uA=function(t){var n=t.cache,r=t.serialized,a=t.isStringTag;return Oh(n,r,a),uv(function(){return Nh(n,r,a)}),null},cA=Mh(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var a=e[Bh],s=[r],u="";typeof e.className=="string"?u=rv(t.registered,s,e.className):e.className!=null&&(u=e.className+" ");var f=cl(s,void 0,N.useContext(fl));u+=t.key+"-"+f.name;var d={};for(var h in e)Dh.call(e,h)&&h!=="css"&&h!==Bh&&(d[h]=e[h]);return d.className=u,n&&(d.ref=n),N.createElement(N.Fragment,null,N.createElement(uA,{cache:t,serialized:f,isStringTag:typeof a=="string"}),N.createElement(a,d))}),fA=cA,dv=function(t,n){var r=arguments;if(n==null||!Dh.call(n,"css"))return N.createElement.apply(void 0,r);var a=r.length,s=new Array(a);s[0]=fA,s[1]=lA(t,n);for(var u=2;u<a;u++)s[u]=r[u];return N.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(dv||(dv={}));var dA=Mh(function(e,t){var n=e.styles,r=cl([n],void 0,N.useContext(fl)),a=N.useRef();return cv(function(){var s=t.key+"-global",u=new t.sheet.constructor({key:s,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),f=!1,d=document.querySelector('style[data-emotion="'+s+" "+r.name+'"]');return t.sheet.tags.length&&(u.before=t.sheet.tags[0]),d!==null&&(f=!0,d.setAttribute("data-emotion",s),u.hydrate([d])),a.current=[u,f],function(){u.flush()}},[t]),cv(function(){var s=a.current,u=s[0],f=s[1];if(f){s[1]=!1;return}if(r.next!==void 0&&Nh(t,r.next,!0),u.tags.length){var d=u.tags[u.tags.length-1].nextElementSibling;u.before=d,u.flush()}t.insert("",r,u,!1)},[t,r.name]),null});function zh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return cl(t)}function dl(){var e=zh.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const hl={black:"#000",white:"#fff"},Ha={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Va={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Fa={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Ga={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},qa={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},pl={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},hA={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Ni(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Kr="$$material";var pA=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,mA=K0(function(e){return pA.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),gA=mA,yA=function(t){return t!=="theme"},hv=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?gA:yA},pv=function(t,n,r){var a;if(n){var s=n.shouldForwardProp;a=t.__emotion_forwardProp&&s?function(u){return t.__emotion_forwardProp(u)&&s(u)}:s}return typeof a!="function"&&r&&(a=t.__emotion_forwardProp),a},vA=function(t){var n=t.cache,r=t.serialized,a=t.isStringTag;return Oh(n,r,a),uv(function(){return Nh(n,r,a)}),null},bA=function e(t,n){var r=t.__emotion_real===t,a=r&&t.__emotion_base||t,s,u;n!==void 0&&(s=n.label,u=n.target);var f=pv(t,n,r),d=f||hv(a),h=!d("as");return function(){var g=arguments,y=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&y.push("label:"+s+";"),g[0]==null||g[0].raw===void 0)y.push.apply(y,g);else{var b=g[0];y.push(b[0]);for(var v=g.length,x=1;x<v;x++)y.push(g[x],b[x])}var E=Mh(function(_,w,O){var T=h&&_.as||a,A="",M=[],R=_;if(_.theme==null){R={};for(var $ in _)R[$]=_[$];R.theme=N.useContext(fl)}typeof _.className=="string"?A=rv(w.registered,M,_.className):_.className!=null&&(A=_.className+" ");var H=cl(y.concat(M),w.registered,R);A+=w.key+"-"+H.name,u!==void 0&&(A+=" "+u);var V=h&&f===void 0?hv(T):d,K={};for(var G in _)h&&G==="as"||V(G)&&(K[G]=_[G]);return K.className=A,O&&(K.ref=O),N.createElement(N.Fragment,null,N.createElement(vA,{cache:w,serialized:H,isStringTag:typeof T=="string"}),N.createElement(T,K))});return E.displayName=s!==void 0?s:"Styled("+(typeof a=="string"?a:a.displayName||a.name||"Component")+")",E.defaultProps=t.defaultProps,E.__emotion_real=E,E.__emotion_base=a,E.__emotion_styles=y,E.__emotion_forwardProp=f,Object.defineProperty(E,"toString",{value:function(){return"."+u}}),E.withComponent=function(_,w){var O=e(_,ac({},n,w,{shouldForwardProp:pv(E,w,!0)}));return O.apply(void 0,y)},E}},SA=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Lh=bA.bind(null);SA.forEach(function(e){Lh[e]=Lh(e)});function xA(e){return e==null||Object.keys(e).length===0}function mv(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?a=>t(xA(a)?n:a):t;return L.jsx(dA,{styles:r})}function gv(e,t){return Lh(e,t)}function EA(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const yv=[];function so(e){return yv[0]=e,cl(yv)}var $h={exports:{}},Bt={};var vv;function _A(){if(vv)return Bt;vv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),v=Symbol.for("react.client.reference");function x(E){if(typeof E=="object"&&E!==null){var _=E.$$typeof;switch(_){case e:switch(E=E.type,E){case n:case a:case r:case d:case h:case b:return E;default:switch(E=E&&E.$$typeof,E){case u:case f:case y:case g:return E;case s:return E;default:return _}}case t:return _}}}return Bt.ContextConsumer=s,Bt.ContextProvider=u,Bt.Element=e,Bt.ForwardRef=f,Bt.Fragment=n,Bt.Lazy=y,Bt.Memo=g,Bt.Portal=t,Bt.Profiler=a,Bt.StrictMode=r,Bt.Suspense=d,Bt.SuspenseList=h,Bt.isContextConsumer=function(E){return x(E)===s},Bt.isContextProvider=function(E){return x(E)===u},Bt.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===e},Bt.isForwardRef=function(E){return x(E)===f},Bt.isFragment=function(E){return x(E)===n},Bt.isLazy=function(E){return x(E)===y},Bt.isMemo=function(E){return x(E)===g},Bt.isPortal=function(E){return x(E)===t},Bt.isProfiler=function(E){return x(E)===a},Bt.isStrictMode=function(E){return x(E)===r},Bt.isSuspense=function(E){return x(E)===d},Bt.isSuspenseList=function(E){return x(E)===h},Bt.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===a||E===r||E===d||E===h||typeof E=="object"&&E!==null&&(E.$$typeof===y||E.$$typeof===g||E.$$typeof===u||E.$$typeof===s||E.$$typeof===f||E.$$typeof===v||E.getModuleId!==void 0)},Bt.typeOf=x,Bt}var bv;function wA(){return bv||(bv=1,$h.exports=_A()),$h.exports}var Sv=wA();function hi(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function xv(e){if(N.isValidElement(e)||Sv.isValidElementType(e)||!hi(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=xv(e[n])}),t}function Bn(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return hi(e)&&hi(t)&&Object.keys(t).forEach(a=>{N.isValidElement(t[a])||Sv.isValidElementType(t[a])?r[a]=t[a]:hi(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&hi(e[a])?r[a]=Bn(e[a],t[a],n):n.clone?r[a]=hi(t[a])?xv(t[a]):t[a]:r[a]=t[a]}),r}const CA=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function TA(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...a}=e,s=CA(t),u=Object.keys(s);function f(b){return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${n})`}function d(b){return`@media (max-width:${(typeof t[b]=="number"?t[b]:b)-r/100}${n})`}function h(b,v){const x=u.indexOf(v);return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${n}) and (max-width:${(x!==-1&&typeof t[u[x]]=="number"?t[u[x]]:v)-r/100}${n})`}function g(b){return u.indexOf(b)+1<u.length?h(b,u[u.indexOf(b)+1]):f(b)}function y(b){const v=u.indexOf(b);return v===0?f(u[1]):v===u.length-1?d(u[v]):h(b,u[u.indexOf(b)+1]).replace("@media","@media not all and")}return{keys:u,values:s,up:f,down:d,between:h,only:g,not:y,unit:n,...a}}function Ev(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,a)=>{const s=/min-width:\s*([0-9.]+)/;return+(r.match(s)?.[1]||0)-+(a.match(s)?.[1]||0)});return n.length?n.reduce((r,a)=>{const s=t[a];return delete r[a],r[a]=s,r},{...t}):t}function AA(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function kA(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,a]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(a).up(s)}function RA(e){const t=(s,u)=>s.replace("@media",u?`@container ${u}`:"@container");function n(s,u){s.up=(...f)=>t(e.breakpoints.up(...f),u),s.down=(...f)=>t(e.breakpoints.down(...f),u),s.between=(...f)=>t(e.breakpoints.between(...f),u),s.only=(...f)=>t(e.breakpoints.only(...f),u),s.not=(...f)=>{const d=t(e.breakpoints.not(...f),u);return d.includes("not all and")?d.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):d}}const r={},a=s=>(n(r,s),r);return n(a),{...e,containerQueries:a}}const OA={borderRadius:4};function ml(e,t){return t?Bn(e,t,{clone:!1}):e}const sc={xs:0,sm:600,md:900,lg:1200,xl:1536},_v={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${sc[e]}px)`},NA={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:sc[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Wr(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||_v;return t.reduce((u,f,d)=>(u[s.up(s.keys[d])]=n(t[d]),u),{})}if(typeof t=="object"){const s=r.breakpoints||_v;return Object.keys(t).reduce((u,f)=>{if(AA(s.keys,f)){const d=kA(r.containerQueries?r:NA,f);d&&(u[d]=n(t[f],f))}else if(Object.keys(s.values||sc).includes(f)){const d=s.up(f);u[d]=n(t[f],f)}else{const d=f;u[d]=t[d]}return u},{})}return n(t)}function wv(e={}){return e.keys?.reduce((n,r)=>{const a=e.up(r);return n[a]={},n},{})||{}}function Ph(e,t){return e.reduce((n,r)=>{const a=n[r];return(!a||Object.keys(a).length===0)&&delete n[r],n},t)}function IA(e,...t){const n=wv(e),r=[n,...t].reduce((a,s)=>Bn(a,s),{});return Ph(Object.keys(n),r)}function MA(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((a,s)=>{s<e.length&&(n[a]=!0)}):r.forEach(a=>{e[a]!=null&&(n[a]=!0)}),n}function Uh({values:e,breakpoints:t,base:n}){const r=n||MA(e,t),a=Object.keys(r);if(a.length===0)return e;let s;return a.reduce((u,f,d)=>(Array.isArray(e)?(u[f]=e[d]!=null?e[d]:e[s],s=d):typeof e=="object"?(u[f]=e[f]!=null?e[f]:e[s],s=f):u[f]=e,u),{})}function ye(e){if(typeof e!="string")throw new Error(Ni(7));return e.charAt(0).toUpperCase()+e.slice(1)}function pi(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((a,s)=>a&&a[s]?a[s]:null,e);if(r!=null)return r}return t.split(".").reduce((r,a)=>r&&r[a]!=null?r[a]:null,e)}function lc(e,t,n,r=n){let a;return typeof e=="function"?a=e(n):Array.isArray(e)?a=e[n]||r:a=pi(e,n)||r,t&&(a=t(a,r,e)),a}function gn(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:a}=e,s=u=>{if(u[t]==null)return null;const f=u[t],d=u.theme,h=pi(d,r)||{};return Wr(u,f,y=>{let b=lc(h,a,y);return y===b&&typeof y=="string"&&(b=lc(h,a,`${t}${y==="default"?"":ye(y)}`,y)),n===!1?b:{[n]:b}})};return s.propTypes={},s.filterProps=[t],s}function DA(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const BA={m:"margin",p:"padding"},zA={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Cv={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},LA=DA(e=>{if(e.length>2)if(Cv[e])e=Cv[e];else return[e];const[t,n]=e.split(""),r=BA[t],a=zA[n]||"";return Array.isArray(a)?a.map(s=>r+s):[r+a]}),jh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Hh=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...jh,...Hh];function gl(e,t,n,r){const a=pi(e,t,!0)??n;return typeof a=="number"||typeof a=="string"?s=>typeof s=="string"?s:typeof a=="string"?a.startsWith("var(")&&s===0?0:a.startsWith("var(")&&s===1?a:`calc(${s} * ${a})`:a*s:Array.isArray(a)?s=>{if(typeof s=="string")return s;const u=Math.abs(s),f=a[u];return s>=0?f:typeof f=="number"?-f:typeof f=="string"&&f.startsWith("var(")?`calc(-1 * ${f})`:`-${f}`}:typeof a=="function"?a:()=>{}}function uc(e){return gl(e,"spacing",8)}function Xo(e,t){return typeof t=="string"||t==null?t:e(t)}function $A(e,t){return n=>e.reduce((r,a)=>(r[a]=Xo(t,n),r),{})}function PA(e,t,n,r){if(!t.includes(n))return null;const a=LA(n),s=$A(a,r),u=e[n];return Wr(e,u,s)}function Tv(e,t){const n=uc(e.theme);return Object.keys(e).map(r=>PA(e,t,r,n)).reduce(ml,{})}function ln(e){return Tv(e,jh)}ln.propTypes={},ln.filterProps=jh;function un(e){return Tv(e,Hh)}un.propTypes={},un.filterProps=Hh;function Av(e=8,t=uc({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(s=>{const u=t(s);return typeof u=="number"?`${u}px`:u}).join(" ");return n.mui=!0,n}function cc(...e){const t=e.reduce((r,a)=>(a.filterProps.forEach(s=>{r[s]=a}),r),{}),n=r=>Object.keys(r).reduce((a,s)=>t[s]?ml(a,t[s](r)):a,{});return n.propTypes={},n.filterProps=e.reduce((r,a)=>r.concat(a.filterProps),[]),n}function Mr(e){return typeof e!="number"?e:`${e}px solid`}function Dr(e,t){return gn({prop:e,themeKey:"borders",transform:t})}const UA=Dr("border",Mr),jA=Dr("borderTop",Mr),HA=Dr("borderRight",Mr),VA=Dr("borderBottom",Mr),FA=Dr("borderLeft",Mr),GA=Dr("borderColor"),qA=Dr("borderTopColor"),YA=Dr("borderRightColor"),XA=Dr("borderBottomColor"),ZA=Dr("borderLeftColor"),KA=Dr("outline",Mr),WA=Dr("outlineColor"),fc=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=gl(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Xo(t,r)});return Wr(e,e.borderRadius,n)}return null};fc.propTypes={},fc.filterProps=["borderRadius"],cc(UA,jA,HA,VA,FA,GA,qA,YA,XA,ZA,fc,KA,WA);const dc=e=>{if(e.gap!==void 0&&e.gap!==null){const t=gl(e.theme,"spacing",8),n=r=>({gap:Xo(t,r)});return Wr(e,e.gap,n)}return null};dc.propTypes={},dc.filterProps=["gap"];const hc=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=gl(e.theme,"spacing",8),n=r=>({columnGap:Xo(t,r)});return Wr(e,e.columnGap,n)}return null};hc.propTypes={},hc.filterProps=["columnGap"];const pc=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=gl(e.theme,"spacing",8),n=r=>({rowGap:Xo(t,r)});return Wr(e,e.rowGap,n)}return null};pc.propTypes={},pc.filterProps=["rowGap"];const QA=gn({prop:"gridColumn"}),JA=gn({prop:"gridRow"}),ek=gn({prop:"gridAutoFlow"}),tk=gn({prop:"gridAutoColumns"}),nk=gn({prop:"gridAutoRows"}),rk=gn({prop:"gridTemplateColumns"}),ik=gn({prop:"gridTemplateRows"}),ok=gn({prop:"gridTemplateAreas"}),ak=gn({prop:"gridArea"});cc(dc,hc,pc,QA,JA,ek,tk,nk,rk,ik,ok,ak);function Ya(e,t){return t==="grey"?t:e}const sk=gn({prop:"color",themeKey:"palette",transform:Ya}),lk=gn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ya}),uk=gn({prop:"backgroundColor",themeKey:"palette",transform:Ya});cc(sk,lk,uk);function vr(e){return e<=1&&e!==0?`${e*100}%`:e}const ck=gn({prop:"width",transform:vr}),Vh=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||sc[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:vr(n)}};return Wr(e,e.maxWidth,t)}return null};Vh.filterProps=["maxWidth"];const fk=gn({prop:"minWidth",transform:vr}),dk=gn({prop:"height",transform:vr}),hk=gn({prop:"maxHeight",transform:vr}),pk=gn({prop:"minHeight",transform:vr});gn({prop:"size",cssProperty:"width",transform:vr}),gn({prop:"size",cssProperty:"height",transform:vr});const mk=gn({prop:"boxSizing"});cc(ck,Vh,fk,dk,hk,pk,mk);const yl={border:{themeKey:"borders",transform:Mr},borderTop:{themeKey:"borders",transform:Mr},borderRight:{themeKey:"borders",transform:Mr},borderBottom:{themeKey:"borders",transform:Mr},borderLeft:{themeKey:"borders",transform:Mr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Mr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:fc},color:{themeKey:"palette",transform:Ya},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ya},backgroundColor:{themeKey:"palette",transform:Ya},p:{style:un},pt:{style:un},pr:{style:un},pb:{style:un},pl:{style:un},px:{style:un},py:{style:un},padding:{style:un},paddingTop:{style:un},paddingRight:{style:un},paddingBottom:{style:un},paddingLeft:{style:un},paddingX:{style:un},paddingY:{style:un},paddingInline:{style:un},paddingInlineStart:{style:un},paddingInlineEnd:{style:un},paddingBlock:{style:un},paddingBlockStart:{style:un},paddingBlockEnd:{style:un},m:{style:ln},mt:{style:ln},mr:{style:ln},mb:{style:ln},ml:{style:ln},mx:{style:ln},my:{style:ln},margin:{style:ln},marginTop:{style:ln},marginRight:{style:ln},marginBottom:{style:ln},marginLeft:{style:ln},marginX:{style:ln},marginY:{style:ln},marginInline:{style:ln},marginInlineStart:{style:ln},marginInlineEnd:{style:ln},marginBlock:{style:ln},marginBlockStart:{style:ln},marginBlockEnd:{style:ln},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:dc},rowGap:{style:pc},columnGap:{style:hc},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:vr},maxWidth:{style:Vh},minWidth:{transform:vr},height:{transform:vr},maxHeight:{transform:vr},minHeight:{transform:vr},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function gk(...e){const t=e.reduce((r,a)=>r.concat(Object.keys(a)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function yk(e,t){return typeof e=="function"?e(t):e}function vk(){function e(n,r,a,s){const u={[n]:r,theme:a},f=s[n];if(!f)return{[n]:r};const{cssProperty:d=n,themeKey:h,transform:g,style:y}=f;if(r==null)return null;if(h==="typography"&&r==="inherit")return{[n]:r};const b=pi(a,h)||{};return y?y(u):Wr(u,r,x=>{let E=lc(b,g,x);return x===E&&typeof x=="string"&&(E=lc(b,g,`${n}${x==="default"?"":ye(x)}`,x)),d===!1?E:{[d]:E}})}function t(n){const{sx:r,theme:a={},nested:s}=n||{};if(!r)return null;const u=a.unstable_sxConfig??yl;function f(d){let h=d;if(typeof d=="function")h=d(a);else if(typeof d!="object")return d;if(!h)return null;const g=wv(a.breakpoints),y=Object.keys(g);let b=g;return Object.keys(h).forEach(v=>{const x=yk(h[v],a);if(x!=null)if(typeof x=="object")if(u[v])b=ml(b,e(v,x,a,u));else{const E=Wr({theme:a},x,_=>({[v]:_}));gk(E,x)?b[v]=t({sx:x,theme:a,nested:!0}):b=ml(b,E)}else b=ml(b,e(v,x,a,u))}),!s&&a.modularCssLayers?{"@layer sx":Ev(a,Ph(y,b))}:Ev(a,Ph(y,b))}return Array.isArray(r)?r.map(f):f(r)}return t}const lo=vk();lo.filterProps=["sx"];function bk(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function mc(e={},...t){const{breakpoints:n={},palette:r={},spacing:a,shape:s={},...u}=e,f=TA(n),d=Av(a);let h=Bn({breakpoints:f,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:d,shape:{...OA,...s}},u);return h=RA(h),h.applyStyles=bk,h=t.reduce((g,y)=>Bn(g,y),h),h.unstable_sxConfig={...yl,...u?.unstable_sxConfig},h.unstable_sx=function(y){return lo({sx:y,theme:this})},h}function Sk(e){return Object.keys(e).length===0}function gc(e=null){const t=N.useContext(fl);return!t||Sk(t)?e:t}const xk=mc();function yc(e=xk){return gc(e)}function Fh(e){const t=so(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function kv({styles:e,themeId:t,defaultTheme:n={}}){const r=yc(n),a=t&&r[t]||r;let s=typeof e=="function"?e(a):e;return a.modularCssLayers&&(Array.isArray(s)?s=s.map(u=>Fh(typeof u=="function"?u(a):u)):s=Fh(s)),L.jsx(mv,{styles:s})}const Ek=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??yl;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function Gh(e){const{sx:t,...n}=e,{systemProps:r,otherProps:a}=Ek(n);let s;return Array.isArray(t)?s=[r,...t]:typeof t=="function"?s=(...u)=>{const f=t(...u);return hi(f)?{...r,...f}:r}:s={...r,...t},{...a,sx:s}}const Rv=e=>e,Ov=(()=>{let e=Rv;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Rv}}})();function Nv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Nv(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ue(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Nv(e))&&(r&&(r+=" "),r+=t);return r}function _k(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:a}=e,s=gv("div",{shouldForwardProp:f=>f!=="theme"&&f!=="sx"&&f!=="as"})(lo);return N.forwardRef(function(d,h){const g=yc(n),{className:y,component:b="div",...v}=Gh(d);return L.jsx(s,{as:b,ref:h,className:Ue(y,a?a(r):r),theme:t&&g[t]||g,...v})})}const wk={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Et(e,t,n="Mui"){const r=wk[t];return r?`${n}-${r}`:`${Ov.generate(e)}-${t}`}function _t(e,t,n="Mui"){const r={};return t.forEach(a=>{r[a]=Et(e,a,n)}),r}function Iv(e){const{variants:t,...n}=e,r={variants:t,style:so(n),isProcessed:!0};return r.style===n||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=so(a.style))}),r}const Ck=mc();function qh(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Zo(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Tk(e){return e?(t,n)=>n[e]:null}function Ak(e,t,n){e.theme=Rk(e.theme)?n:e.theme[t]||e.theme}function vc(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(a=>vc(e,a,n));if(Array.isArray(r?.variants)){let a;if(r.isProcessed)a=n?Zo(r.style,n):r.style;else{const{variants:s,...u}=r;a=n?Zo(so(u),n):u}return Mv(e,r.variants,[a],n)}return r?.isProcessed?n?Zo(so(r.style),n):r.style:n?Zo(so(r),n):r}function Mv(e,t,n=[],r=void 0){let a;e:for(let s=0;s<t.length;s+=1){const u=t[s];if(typeof u.props=="function"){if(a??={...e,...e.ownerState,ownerState:e.ownerState},!u.props(a))continue}else for(const f in u.props)if(e[f]!==u.props[f]&&e.ownerState?.[f]!==u.props[f])continue e;typeof u.style=="function"?(a??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Zo(so(u.style(a)),r):u.style(a))):n.push(r?Zo(so(u.style),r):u.style)}return n}function Dv(e={}){const{themeId:t,defaultTheme:n=Ck,rootShouldForwardProp:r=qh,slotShouldForwardProp:a=qh}=e;function s(f){Ak(f,t,n)}return(f,d={})=>{EA(f,R=>R.filter($=>$!==lo));const{name:h,slot:g,skipVariantsResolver:y,skipSx:b,overridesResolver:v=Tk(Nk(g)),...x}=d,E=h&&h.startsWith("Mui")||g?"components":"custom",_=y!==void 0?y:g&&g!=="Root"&&g!=="root"||!1,w=b||!1;let O=qh;g==="Root"||g==="root"?O=r:g?O=a:Ok(f)&&(O=void 0);const T=gv(f,{shouldForwardProp:O,label:kk(),...x}),A=R=>{if(R.__emotion_real===R)return R;if(typeof R=="function")return function(H){return vc(H,R,H.theme.modularCssLayers?E:void 0)};if(hi(R)){const $=Iv(R);return function(V){return $.variants?vc(V,$,V.theme.modularCssLayers?E:void 0):V.theme.modularCssLayers?Zo($.style,E):$.style}}return R},M=(...R)=>{const $=[],H=R.map(A),V=[];if($.push(s),h&&v&&V.push(function(q){const P=q.theme.components?.[h]?.styleOverrides;if(!P)return null;const D={};for(const Z in P)D[Z]=vc(q,P[Z],q.theme.modularCssLayers?"theme":void 0);return v(q,D)}),h&&!_&&V.push(function(q){const P=q.theme?.components?.[h]?.variants;return P?Mv(q,P,[],q.theme.modularCssLayers?"theme":void 0):null}),w||V.push(lo),Array.isArray(H[0])){const C=H.shift(),q=new Array($.length).fill(""),U=new Array(V.length).fill("");let P;P=[...q,...C,...U],P.raw=[...q,...C.raw,...U],$.unshift(P)}const K=[...$,...H,...V],G=T(...K);return f.muiName&&(G.muiName=f.muiName),G};return T.withConfig&&(M.withConfig=T.withConfig),M}}function kk(e,t){return void 0}function Rk(e){for(const t in e)return!1;return!0}function Ok(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Nk(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Ik=Dv();function vl(e,t,n=!1){const r={...t};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const s=a;if(s==="components"||s==="slots")r[s]={...e[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){const u=e[s],f=t[s];if(!f)r[s]=u||{};else if(!u)r[s]=f;else{r[s]={...f};for(const d in u)if(Object.prototype.hasOwnProperty.call(u,d)){const h=d;r[s][h]=vl(u[h],f[h],n)}}}else s==="className"&&n&&t.className?r.className=Ue(e?.className,t?.className):s==="style"&&n&&t.style?r.style={...e?.style,...t?.style}:r[s]===void 0&&(r[s]=e[s])}return r}function Bv(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:vl(t.components[n].defaultProps,r)}function Mk({props:e,name:t,defaultTheme:n,themeId:r}){let a=yc(n);return r&&(a=a[r]||a),Bv({theme:a,name:t,props:e})}const mi=typeof window<"u"?N.useLayoutEffect:N.useEffect;function Dk(e,t,n,r,a){const[s,u]=N.useState(()=>a&&n?n(e).matches:r?r(e).matches:t);return mi(()=>{if(!n)return;const f=n(e),d=()=>{u(f.matches)};return d(),f.addEventListener("change",d),()=>{f.removeEventListener("change",d)}},[e,n]),s}const zv={...oc}.useSyncExternalStore;function Bk(e,t,n,r,a){const s=N.useCallback(()=>t,[t]),u=N.useMemo(()=>{if(a&&n)return()=>n(e).matches;if(r!==null){const{matches:g}=r(e);return()=>g}return s},[s,e,r,a,n]),[f,d]=N.useMemo(()=>{if(n===null)return[s,()=>()=>{}];const g=n(e);return[()=>g.matches,y=>(g.addEventListener("change",y),()=>{g.removeEventListener("change",y)})]},[s,n,e]);return zv(d,f,u)}function Lv(e={}){const{themeId:t}=e;return function(r,a={}){let s=gc();s&&t&&(s=s[t]||s);const u=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:f=!1,matchMedia:d=u?window.matchMedia:null,ssrMatchMedia:h=null,noSsr:g=!1}=Bv({name:"MuiUseMediaQuery",props:a,theme:s});let y=typeof r=="function"?r(s):r;return y=y.replace(/^@media( ?)/m,""),y.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
|
|
10
|
-
`)),(zv!==void 0?Bk:Dk)(y,f,d,h,g)}}Lv();function zk(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Yh(e,t=0,n=1){return zk(e,t,n)}function Lk(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,a)=>a<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function uo(e){if(e.type)return e;if(e.charAt(0)==="#")return uo(Lk(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Ni(9,e));let r=e.substring(t+1,e.length-1),a;if(n==="color"){if(r=r.split(" "),a=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(a))throw new Error(Ni(10,a))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:a}}const $k=e=>{const t=uo(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},
|
|
8
|
+
`+c.stack}}var Tt=Object.prototype.hasOwnProperty,an=e.unstable_scheduleCallback,It=e.unstable_cancelCallback,Re=e.unstable_shouldYield,Cr=e.unstable_requestPaint,tt=e.unstable_now,oi=e.unstable_getCurrentPriorityLevel,te=e.unstable_ImmediatePriority,ce=e.unstable_UserBlockingPriority,we=e.unstable_NormalPriority,ze=e.unstable_LowPriority,We=e.unstable_IdlePriority,et=e.log,In=e.unstable_setDisableYieldValue,hn=null,sn=null;function Qn(i){if(typeof et=="function"&&In(i),sn&&typeof sn.setStrictMode=="function")try{sn.setStrictMode(hn,i)}catch{}}var At=Math.clz32?Math.clz32:Mn,Te=Math.log,rt=Math.LN2;function Mn(i){return i>>>=0,i===0?32:31-(Te(i)/rt|0)|0}var ai=256,Sa=262144,nd=4194304;function xa(i){var o=i&42;if(o!==0)return o;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function rd(i,o,l){var c=i.pendingLanes;if(c===0)return 0;var p=0,m=i.suspendedLanes,S=i.pingedLanes;i=i.warmLanes;var k=c&134217727;return k!==0?(c=k&~m,c!==0?p=xa(c):(S&=k,S!==0?p=xa(S):l||(l=k&~i,l!==0&&(p=xa(l))))):(k=c&~m,k!==0?p=xa(k):S!==0?p=xa(S):l||(l=c&~i,l!==0&&(p=xa(l)))),p===0?0:o!==0&&o!==p&&(o&m)===0&&(m=p&-p,l=o&-o,m>=l||m===32&&(l&4194048)!==0)?o:p}function ou(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function PP(i,o){switch(i){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 y_(){var i=nd;return nd<<=1,(nd&62914560)===0&&(nd=4194304),i}function bg(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function au(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function UP(i,o,l,c,p,m){var S=i.pendingLanes;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=l,i.entangledLanes&=l,i.errorRecoveryDisabledLanes&=l,i.shellSuspendCounter=0;var k=i.entanglements,j=i.expirationTimes,J=i.hiddenUpdates;for(l=S&~l;0<l;){var ie=31-At(l),le=1<<ie;k[ie]=0,j[ie]=-1;var ee=J[ie];if(ee!==null)for(J[ie]=null,ie=0;ie<ee.length;ie++){var ne=ee[ie];ne!==null&&(ne.lane&=-536870913)}l&=~le}c!==0&&v_(i,c,0),m!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=m&~(S&~o))}function v_(i,o,l){i.pendingLanes|=o,i.suspendedLanes&=~o;var c=31-At(o);i.entangledLanes|=o,i.entanglements[c]=i.entanglements[c]|1073741824|l&261930}function b_(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var c=31-At(l),p=1<<c;p&o|i[c]&o&&(i[c]|=o),l&=~p}}function S_(i,o){var l=o&-o;return l=(l&42)!==0?1:Sg(l),(l&(i.suspendedLanes|o))!==0?0:l}function Sg(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function xg(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function x_(){var i=Z.p;return i!==0?i:(i=window.event,i===void 0?32:a2(i.type))}function E_(i,o){var l=Z.p;try{return Z.p=i,o()}finally{Z.p=l}}var wo=Math.random().toString(36).slice(2),jn="__reactFiber$"+wo,cr="__reactProps$"+wo,Ss="__reactContainer$"+wo,Eg="__reactEvents$"+wo,jP="__reactListeners$"+wo,HP="__reactHandles$"+wo,__="__reactResources$"+wo,su="__reactMarker$"+wo;function _g(i){delete i[jn],delete i[cr],delete i[Eg],delete i[jP],delete i[HP]}function xs(i){var o=i[jn];if(o)return o;for(var l=i.parentNode;l;){if(o=l[Ss]||l[jn]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=FT(i);i!==null;){if(l=i[jn])return l;i=FT(i)}return o}i=l,l=i.parentNode}return null}function Es(i){if(i=i[jn]||i[Ss]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function lu(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function _s(i){var o=i[__];return o||(o=i[__]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Ln(i){i[su]=!0}var w_=new Set,C_={};function Ea(i,o){ws(i,o),ws(i+"Capture",o)}function ws(i,o){for(C_[i]=o,i=0;i<o.length;i++)w_.add(o[i])}var VP=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]*$"),T_={},A_={};function FP(i){return Tt.call(A_,i)?!0:Tt.call(T_,i)?!1:VP.test(i)?A_[i]=!0:(T_[i]=!0,!1)}function id(i,o,l){if(FP(o))if(l===null)i.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var c=o.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+l)}}function od(i,o,l){if(l===null)i.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttribute(o,""+l)}}function Vi(i,o,l,c){if(c===null)i.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttributeNS(o,l,""+c)}}function Ur(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function k_(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function GP(i,o,l){var c=Object.getOwnPropertyDescriptor(i.constructor.prototype,o);if(!i.hasOwnProperty(o)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,m=c.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return p.call(this)},set:function(S){l=""+S,m.call(this,S)}}),Object.defineProperty(i,o,{enumerable:c.enumerable}),{getValue:function(){return l},setValue:function(S){l=""+S},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function wg(i){if(!i._valueTracker){var o=k_(i)?"checked":"value";i._valueTracker=GP(i,o,""+i[o])}}function R_(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),c="";return i&&(c=k_(i)?i.checked?"true":"false":i.value),i=c,i!==l?(o.setValue(i),!0):!1}function ad(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var qP=/[\n"\\]/g;function jr(i){return i.replace(qP,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Cg(i,o,l,c,p,m,S,k){i.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?i.type=S:i.removeAttribute("type"),o!=null?S==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+Ur(o)):i.value!==""+Ur(o)&&(i.value=""+Ur(o)):S!=="submit"&&S!=="reset"||i.removeAttribute("value"),o!=null?Tg(i,S,Ur(o)):l!=null?Tg(i,S,Ur(l)):c!=null&&i.removeAttribute("value"),p==null&&m!=null&&(i.defaultChecked=!!m),p!=null&&(i.checked=p&&typeof p!="function"&&typeof p!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?i.name=""+Ur(k):i.removeAttribute("name")}function O_(i,o,l,c,p,m,S,k){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(i.type=m),o!=null||l!=null){if(!(m!=="submit"&&m!=="reset"||o!=null)){wg(i);return}l=l!=null?""+Ur(l):"",o=o!=null?""+Ur(o):l,k||o===i.value||(i.value=o),i.defaultValue=o}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,i.checked=k?i.checked:!!c,i.defaultChecked=!!c,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(i.name=S),wg(i)}function Tg(i,o,l){o==="number"&&ad(i.ownerDocument)===i||i.defaultValue===""+l||(i.defaultValue=""+l)}function Cs(i,o,l,c){if(i=i.options,o){o={};for(var p=0;p<l.length;p++)o["$"+l[p]]=!0;for(l=0;l<i.length;l++)p=o.hasOwnProperty("$"+i[l].value),i[l].selected!==p&&(i[l].selected=p),p&&c&&(i[l].defaultSelected=!0)}else{for(l=""+Ur(l),o=null,p=0;p<i.length;p++){if(i[p].value===l){i[p].selected=!0,c&&(i[p].defaultSelected=!0);return}o!==null||i[p].disabled||(o=i[p])}o!==null&&(o.selected=!0)}}function N_(i,o,l){if(o!=null&&(o=""+Ur(o),o!==i.value&&(i.value=o),l==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=l!=null?""+Ur(l):""}function I_(i,o,l,c){if(o==null){if(c!=null){if(l!=null)throw Error(r(92));if(P(c)){if(1<c.length)throw Error(r(93));c=c[0]}l=c}l==null&&(l=""),o=l}l=Ur(o),i.defaultValue=l,c=i.textContent,c===l&&c!==""&&c!==null&&(i.value=c),wg(i)}function Ts(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}var YP=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 M_(i,o,l){var c=o.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":c?i.setProperty(o,l):typeof l!="number"||l===0||YP.has(o)?o==="float"?i.cssFloat=l:i[o]=(""+l).trim():i[o]=l+"px"}function D_(i,o,l){if(o!=null&&typeof o!="object")throw Error(r(62));if(i=i.style,l!=null){for(var c in l)!l.hasOwnProperty(c)||o!=null&&o.hasOwnProperty(c)||(c.indexOf("--")===0?i.setProperty(c,""):c==="float"?i.cssFloat="":i[c]="");for(var p in o)c=o[p],o.hasOwnProperty(p)&&l[p]!==c&&M_(i,p,c)}else for(var m in o)o.hasOwnProperty(m)&&M_(i,m,o[m])}function Ag(i){if(i.indexOf("-")===-1)return!1;switch(i){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 XP=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"]]),ZP=/^[\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 sd(i){return ZP.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Fi(){}var kg=null;function Rg(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var As=null,ks=null;function B_(i){var o=Es(i);if(o&&(i=o.stateNode)){var l=i[cr]||null;e:switch(i=o.stateNode,o.type){case"input":if(Cg(i,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),o=l.name,l.type==="radio"&&o!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+jr(""+o)+'"][type="radio"]'),o=0;o<l.length;o++){var c=l[o];if(c!==i&&c.form===i.form){var p=c[cr]||null;if(!p)throw Error(r(90));Cg(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(o=0;o<l.length;o++)c=l[o],c.form===i.form&&R_(c)}break e;case"textarea":N_(i,l.value,l.defaultValue);break e;case"select":o=l.value,o!=null&&Cs(i,!!l.multiple,o,!1)}}}var Og=!1;function z_(i,o,l){if(Og)return i(o,l);Og=!0;try{var c=i(o);return c}finally{if(Og=!1,(As!==null||ks!==null)&&(Xd(),As&&(o=As,i=ks,ks=As=null,B_(o),i)))for(o=0;o<i.length;o++)B_(i[o])}}function uu(i,o){var l=i.stateNode;if(l===null)return null;var c=l[cr]||null;if(c===null)return null;l=c[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(i=i.type,c=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!c;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(r(231,o,typeof l));return l}var Gi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ng=!1;if(Gi)try{var cu={};Object.defineProperty(cu,"passive",{get:function(){Ng=!0}}),window.addEventListener("test",cu,cu),window.removeEventListener("test",cu,cu)}catch{Ng=!1}var Co=null,Ig=null,ld=null;function L_(){if(ld)return ld;var i,o=Ig,l=o.length,c,p="value"in Co?Co.value:Co.textContent,m=p.length;for(i=0;i<l&&o[i]===p[i];i++);var S=l-i;for(c=1;c<=S&&o[l-c]===p[m-c];c++);return ld=p.slice(i,1<c?1-c:void 0)}function ud(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function cd(){return!0}function $_(){return!1}function fr(i){function o(l,c,p,m,S){this._reactName=l,this._targetInst=p,this.type=c,this.nativeEvent=m,this.target=S,this.currentTarget=null;for(var k in i)i.hasOwnProperty(k)&&(l=i[k],this[k]=l?l(m):m[k]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?cd:$_,this.isPropagationStopped=$_,this}return y(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=cd)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=cd)},persist:function(){},isPersistent:cd}),o}var _a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fd=fr(_a),fu=y({},_a,{view:0,detail:0}),KP=fr(fu),Mg,Dg,du,dd=y({},fu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zg,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==du&&(du&&i.type==="mousemove"?(Mg=i.screenX-du.screenX,Dg=i.screenY-du.screenY):Dg=Mg=0,du=i),Mg)},movementY:function(i){return"movementY"in i?i.movementY:Dg}}),P_=fr(dd),WP=y({},dd,{dataTransfer:0}),QP=fr(WP),JP=y({},fu,{relatedTarget:0}),Bg=fr(JP),e8=y({},_a,{animationName:0,elapsedTime:0,pseudoElement:0}),t8=fr(e8),n8=y({},_a,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),r8=fr(n8),i8=y({},_a,{data:0}),U_=fr(i8),o8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a8={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"},s8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function l8(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=s8[i])?!!o[i]:!1}function zg(){return l8}var u8=y({},fu,{key:function(i){if(i.key){var o=o8[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=ud(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?a8[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zg,charCode:function(i){return i.type==="keypress"?ud(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?ud(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),c8=fr(u8),f8=y({},dd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),j_=fr(f8),d8=y({},fu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zg}),h8=fr(d8),p8=y({},_a,{propertyName:0,elapsedTime:0,pseudoElement:0}),m8=fr(p8),g8=y({},dd,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),y8=fr(g8),v8=y({},_a,{newState:0,oldState:0}),b8=fr(v8),S8=[9,13,27,32],Lg=Gi&&"CompositionEvent"in window,hu=null;Gi&&"documentMode"in document&&(hu=document.documentMode);var x8=Gi&&"TextEvent"in window&&!hu,H_=Gi&&(!Lg||hu&&8<hu&&11>=hu),V_=" ",F_=!1;function G_(i,o){switch(i){case"keyup":return S8.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function q_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Rs=!1;function E8(i,o){switch(i){case"compositionend":return q_(o);case"keypress":return o.which!==32?null:(F_=!0,V_);case"textInput":return i=o.data,i===V_&&F_?null:i;default:return null}}function _8(i,o){if(Rs)return i==="compositionend"||!Lg&&G_(i,o)?(i=L_(),ld=Ig=Co=null,Rs=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return H_&&o.locale!=="ko"?null:o.data;default:return null}}var w8={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 Y_(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!w8[i.type]:o==="textarea"}function X_(i,o,l,c){As?ks?ks.push(c):ks=[c]:As=c,o=th(o,"onChange"),0<o.length&&(l=new fd("onChange","change",null,l,c),i.push({event:l,listeners:o}))}var pu=null,mu=null;function C8(i){OT(i,0)}function hd(i){var o=lu(i);if(R_(o))return i}function Z_(i,o){if(i==="change")return o}var K_=!1;if(Gi){var $g;if(Gi){var Pg="oninput"in document;if(!Pg){var W_=document.createElement("div");W_.setAttribute("oninput","return;"),Pg=typeof W_.oninput=="function"}$g=Pg}else $g=!1;K_=$g&&(!document.documentMode||9<document.documentMode)}function Q_(){pu&&(pu.detachEvent("onpropertychange",J_),mu=pu=null)}function J_(i){if(i.propertyName==="value"&&hd(mu)){var o=[];X_(o,mu,i,Rg(i)),z_(C8,o)}}function T8(i,o,l){i==="focusin"?(Q_(),pu=o,mu=l,pu.attachEvent("onpropertychange",J_)):i==="focusout"&&Q_()}function A8(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return hd(mu)}function k8(i,o){if(i==="click")return hd(o)}function R8(i,o){if(i==="input"||i==="change")return hd(o)}function O8(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Tr=typeof Object.is=="function"?Object.is:O8;function gu(i,o){if(Tr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var l=Object.keys(i),c=Object.keys(o);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var p=l[c];if(!Tt.call(o,p)||!Tr(i[p],o[p]))return!1}return!0}function ew(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function tw(i,o){var l=ew(i);i=0;for(var c;l;){if(l.nodeType===3){if(c=i+l.textContent.length,i<=o&&c>=o)return{node:l,offset:o-i};i=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=ew(l)}}function nw(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?nw(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function rw(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=ad(i.document);o instanceof i.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch{l=!1}if(l)i=o.contentWindow;else break;o=ad(i.document)}return o}function Ug(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}var N8=Gi&&"documentMode"in document&&11>=document.documentMode,Os=null,jg=null,yu=null,Hg=!1;function iw(i,o,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Hg||Os==null||Os!==ad(c)||(c=Os,"selectionStart"in c&&Ug(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),yu&&gu(yu,c)||(yu=c,c=th(jg,"onSelect"),0<c.length&&(o=new fd("onSelect","select",null,o,l),i.push({event:o,listeners:c}),o.target=Os)))}function wa(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var Ns={animationend:wa("Animation","AnimationEnd"),animationiteration:wa("Animation","AnimationIteration"),animationstart:wa("Animation","AnimationStart"),transitionrun:wa("Transition","TransitionRun"),transitionstart:wa("Transition","TransitionStart"),transitioncancel:wa("Transition","TransitionCancel"),transitionend:wa("Transition","TransitionEnd")},Vg={},ow={};Gi&&(ow=document.createElement("div").style,"AnimationEvent"in window||(delete Ns.animationend.animation,delete Ns.animationiteration.animation,delete Ns.animationstart.animation),"TransitionEvent"in window||delete Ns.transitionend.transition);function Ca(i){if(Vg[i])return Vg[i];if(!Ns[i])return i;var o=Ns[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in ow)return Vg[i]=o[l];return i}var aw=Ca("animationend"),sw=Ca("animationiteration"),lw=Ca("animationstart"),I8=Ca("transitionrun"),M8=Ca("transitionstart"),D8=Ca("transitioncancel"),uw=Ca("transitionend"),cw=new Map,Fg="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(" ");Fg.push("scrollEnd");function si(i,o){cw.set(i,o),Ea(o,[i])}var pd=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},Hr=[],Is=0,Gg=0;function md(){for(var i=Is,o=Gg=Is=0;o<i;){var l=Hr[o];Hr[o++]=null;var c=Hr[o];Hr[o++]=null;var p=Hr[o];Hr[o++]=null;var m=Hr[o];if(Hr[o++]=null,c!==null&&p!==null){var S=c.pending;S===null?p.next=p:(p.next=S.next,S.next=p),c.pending=p}m!==0&&fw(l,p,m)}}function gd(i,o,l,c){Hr[Is++]=i,Hr[Is++]=o,Hr[Is++]=l,Hr[Is++]=c,Gg|=c,i.lanes|=c,i=i.alternate,i!==null&&(i.lanes|=c)}function qg(i,o,l,c){return gd(i,o,l,c),yd(i)}function Ta(i,o){return gd(i,null,null,o),yd(i)}function fw(i,o,l){i.lanes|=l;var c=i.alternate;c!==null&&(c.lanes|=l);for(var p=!1,m=i.return;m!==null;)m.childLanes|=l,c=m.alternate,c!==null&&(c.childLanes|=l),m.tag===22&&(i=m.stateNode,i===null||i._visibility&1||(p=!0)),i=m,m=m.return;return i.tag===3?(m=i.stateNode,p&&o!==null&&(p=31-At(l),i=m.hiddenUpdates,c=i[p],c===null?i[p]=[o]:c.push(o),o.lane=l|536870912),m):null}function yd(i){if(50<Pu)throw Pu=0,t0=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var Ms={};function B8(i,o,l,c){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ar(i,o,l,c){return new B8(i,o,l,c)}function Yg(i){return i=i.prototype,!(!i||!i.isReactComponent)}function qi(i,o){var l=i.alternate;return l===null?(l=Ar(i.tag,o,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=o,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&65011712,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,o=i.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l.refCleanup=i.refCleanup,l}function dw(i,o){i.flags&=65011714;var l=i.alternate;return l===null?(i.childLanes=0,i.lanes=o,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,o=l.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),i}function vd(i,o,l,c,p,m){var S=0;if(c=i,typeof i=="function")Yg(i)&&(S=1);else if(typeof i=="string")S=UU(i,l,pe.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case V:return i=Ar(31,l,o,p),i.elementType=V,i.lanes=m,i;case E:return Aa(l.children,p,m,o);case _:S=8,p|=24;break;case w:return i=Ar(12,l,o,p|2),i.elementType=w,i.lanes=m,i;case M:return i=Ar(13,l,o,p),i.elementType=M,i.lanes=m,i;case R:return i=Ar(19,l,o,p),i.elementType=R,i.lanes=m,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:S=10;break e;case O:S=9;break e;case A:S=11;break e;case $:S=14;break e;case H:S=16,c=null;break e}S=29,l=Error(r(130,i===null?"null":typeof i,"")),c=null}return o=Ar(S,l,o,p),o.elementType=i,o.type=c,o.lanes=m,o}function Aa(i,o,l,c){return i=Ar(7,i,c,o),i.lanes=l,i}function Xg(i,o,l){return i=Ar(6,i,null,o),i.lanes=l,i}function hw(i){var o=Ar(18,null,null,0);return o.stateNode=i,o}function Zg(i,o,l){return o=Ar(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var pw=new WeakMap;function Vr(i,o){if(typeof i=="object"&&i!==null){var l=pw.get(i);return l!==void 0?l:(o={value:i,source:o,stack:Ht(o)},pw.set(i,o),o)}return{value:i,source:o,stack:Ht(o)}}var Ds=[],Bs=0,bd=null,vu=0,Fr=[],Gr=0,To=null,Ai=1,ki="";function Yi(i,o){Ds[Bs++]=vu,Ds[Bs++]=bd,bd=i,vu=o}function mw(i,o,l){Fr[Gr++]=Ai,Fr[Gr++]=ki,Fr[Gr++]=To,To=i;var c=Ai;i=ki;var p=32-At(c)-1;c&=~(1<<p),l+=1;var m=32-At(o)+p;if(30<m){var S=p-p%5;m=(c&(1<<S)-1).toString(32),c>>=S,p-=S,Ai=1<<32-At(o)+p|l<<p|c,ki=m+i}else Ai=1<<m|l<<p|c,ki=i}function Kg(i){i.return!==null&&(Yi(i,1),mw(i,1,0))}function Wg(i){for(;i===bd;)bd=Ds[--Bs],Ds[Bs]=null,vu=Ds[--Bs],Ds[Bs]=null;for(;i===To;)To=Fr[--Gr],Fr[Gr]=null,ki=Fr[--Gr],Fr[Gr]=null,Ai=Fr[--Gr],Fr[Gr]=null}function gw(i,o){Fr[Gr++]=Ai,Fr[Gr++]=ki,Fr[Gr++]=To,Ai=o.id,ki=o.overflow,To=i}var Hn=null,Xt=null,ct=!1,Ao=null,qr=!1,Qg=Error(r(519));function ko(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw bu(Vr(o,i)),Qg}function yw(i){var o=i.stateNode,l=i.type,c=i.memoizedProps;switch(o[jn]=i,o[cr]=c,l){case"dialog":ot("cancel",o),ot("close",o);break;case"iframe":case"object":case"embed":ot("load",o);break;case"video":case"audio":for(l=0;l<ju.length;l++)ot(ju[l],o);break;case"source":ot("error",o);break;case"img":case"image":case"link":ot("error",o),ot("load",o);break;case"details":ot("toggle",o);break;case"input":ot("invalid",o),O_(o,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":ot("invalid",o);break;case"textarea":ot("invalid",o),I_(o,c.value,c.defaultValue,c.children)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||o.textContent===""+l||c.suppressHydrationWarning===!0||DT(o.textContent,l)?(c.popover!=null&&(ot("beforetoggle",o),ot("toggle",o)),c.onScroll!=null&&ot("scroll",o),c.onScrollEnd!=null&&ot("scrollend",o),c.onClick!=null&&(o.onclick=Fi),o=!0):o=!1,o||ko(i,!0)}function vw(i){for(Hn=i.return;Hn;)switch(Hn.tag){case 5:case 31:case 13:qr=!1;return;case 27:case 3:qr=!0;return;default:Hn=Hn.return}}function zs(i){if(i!==Hn)return!1;if(!ct)return vw(i),ct=!0,!1;var o=i.tag,l;if((l=o!==3&&o!==27)&&((l=o===5)&&(l=i.type,l=!(l!=="form"&&l!=="button")||g0(i.type,i.memoizedProps)),l=!l),l&&Xt&&ko(i),vw(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Xt=VT(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));Xt=VT(i)}else o===27?(o=Xt,Ho(i.type)?(i=x0,x0=null,Xt=i):Xt=o):Xt=Hn?Xr(i.stateNode.nextSibling):null;return!0}function ka(){Xt=Hn=null,ct=!1}function Jg(){var i=Ao;return i!==null&&(mr===null?mr=i:mr.push.apply(mr,i),Ao=null),i}function bu(i){Ao===null?Ao=[i]:Ao.push(i)}var ey=z(null),Ra=null,Xi=null;function Ro(i,o,l){I(ey,o._currentValue),o._currentValue=l}function Zi(i){i._currentValue=ey.current,W(ey)}function ty(i,o,l){for(;i!==null;){var c=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,c!==null&&(c.childLanes|=o)):c!==null&&(c.childLanes&o)!==o&&(c.childLanes|=o),i===l)break;i=i.return}}function ny(i,o,l,c){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var m=p.dependencies;if(m!==null){var S=p.child;m=m.firstContext;e:for(;m!==null;){var k=m;m=p;for(var j=0;j<o.length;j++)if(k.context===o[j]){m.lanes|=l,k=m.alternate,k!==null&&(k.lanes|=l),ty(m.return,l,i),c||(S=null);break e}m=k.next}}else if(p.tag===18){if(S=p.return,S===null)throw Error(r(341));S.lanes|=l,m=S.alternate,m!==null&&(m.lanes|=l),ty(S,l,i),S=null}else S=p.child;if(S!==null)S.return=p;else for(S=p;S!==null;){if(S===i){S=null;break}if(p=S.sibling,p!==null){p.return=S.return,S=p;break}S=S.return}p=S}}function Ls(i,o,l,c){i=null;for(var p=o,m=!1;p!==null;){if(!m){if((p.flags&524288)!==0)m=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var S=p.alternate;if(S===null)throw Error(r(387));if(S=S.memoizedProps,S!==null){var k=p.type;Tr(p.pendingProps.value,S.value)||(i!==null?i.push(k):i=[k])}}else if(p===xe.current){if(S=p.alternate,S===null)throw Error(r(387));S.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(i!==null?i.push(qu):i=[qu])}p=p.return}i!==null&&ny(o,i,l,c),o.flags|=262144}function Sd(i){for(i=i.firstContext;i!==null;){if(!Tr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Oa(i){Ra=i,Xi=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Vn(i){return bw(Ra,i)}function xd(i,o){return Ra===null&&Oa(i),bw(i,o)}function bw(i,o){var l=o._currentValue;if(o={context:o,memoizedValue:l,next:null},Xi===null){if(i===null)throw Error(r(308));Xi=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else Xi=Xi.next=o;return l}var z8=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(l,c){i.push(c)}};this.abort=function(){o.aborted=!0,i.forEach(function(l){return l()})}},L8=e.unstable_scheduleCallback,$8=e.unstable_NormalPriority,An={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ry(){return{controller:new z8,data:new Map,refCount:0}}function Su(i){i.refCount--,i.refCount===0&&L8($8,function(){i.controller.abort()})}var xu=null,iy=0,$s=0,Ps=null;function P8(i,o){if(xu===null){var l=xu=[];iy=0,$s=s0(),Ps={status:"pending",value:void 0,then:function(c){l.push(c)}}}return iy++,o.then(Sw,Sw),o}function Sw(){if(--iy===0&&xu!==null){Ps!==null&&(Ps.status="fulfilled");var i=xu;xu=null,$s=0,Ps=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function U8(i,o){var l=[],c={status:"pending",value:null,reason:null,then:function(p){l.push(p)}};return i.then(function(){c.status="fulfilled",c.value=o;for(var p=0;p<l.length;p++)(0,l[p])(o)},function(p){for(c.status="rejected",c.reason=p,p=0;p<l.length;p++)(0,l[p])(void 0)}),c}var xw=D.S;D.S=function(i,o){iT=tt(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&P8(i,o),xw!==null&&xw(i,o)};var Na=z(null);function oy(){var i=Na.current;return i!==null?i:Vt.pooledCache}function Ed(i,o){o===null?I(Na,Na.current):I(Na,o.pool)}function Ew(){var i=oy();return i===null?null:{parent:An._currentValue,pool:i}}var Us=Error(r(460)),ay=Error(r(474)),_d=Error(r(542)),wd={then:function(){}};function _w(i){return i=i.status,i==="fulfilled"||i==="rejected"}function ww(i,o,l){switch(l=i[l],l===void 0?i.push(o):l!==o&&(o.then(Fi,Fi),o=l),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Tw(i),i;default:if(typeof o.status=="string")o.then(Fi,Fi);else{if(i=Vt,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=o,i.status="pending",i.then(function(c){if(o.status==="pending"){var p=o;p.status="fulfilled",p.value=c}},function(c){if(o.status==="pending"){var p=o;p.status="rejected",p.reason=c}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Tw(i),i}throw Ma=o,Us}}function Ia(i){try{var o=i._init;return o(i._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ma=l,Us):l}}var Ma=null;function Cw(){if(Ma===null)throw Error(r(459));var i=Ma;return Ma=null,i}function Tw(i){if(i===Us||i===_d)throw Error(r(483))}var js=null,Eu=0;function Cd(i){var o=Eu;return Eu+=1,js===null&&(js=[]),ww(js,i,o)}function _u(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function Td(i,o){throw o.$$typeof===b?Error(r(525)):(i=Object.prototype.toString.call(o),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function Aw(i){function o(Y,F){if(i){var Q=Y.deletions;Q===null?(Y.deletions=[F],Y.flags|=16):Q.push(F)}}function l(Y,F){if(!i)return null;for(;F!==null;)o(Y,F),F=F.sibling;return null}function c(Y){for(var F=new Map;Y!==null;)Y.key!==null?F.set(Y.key,Y):F.set(Y.index,Y),Y=Y.sibling;return F}function p(Y,F){return Y=qi(Y,F),Y.index=0,Y.sibling=null,Y}function m(Y,F,Q){return Y.index=Q,i?(Q=Y.alternate,Q!==null?(Q=Q.index,Q<F?(Y.flags|=67108866,F):Q):(Y.flags|=67108866,F)):(Y.flags|=1048576,F)}function S(Y){return i&&Y.alternate===null&&(Y.flags|=67108866),Y}function k(Y,F,Q,oe){return F===null||F.tag!==6?(F=Xg(Q,Y.mode,oe),F.return=Y,F):(F=p(F,Q),F.return=Y,F)}function j(Y,F,Q,oe){var Le=Q.type;return Le===E?ie(Y,F,Q.props.children,oe,Q.key):F!==null&&(F.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===H&&Ia(Le)===F.type)?(F=p(F,Q.props),_u(F,Q),F.return=Y,F):(F=vd(Q.type,Q.key,Q.props,null,Y.mode,oe),_u(F,Q),F.return=Y,F)}function J(Y,F,Q,oe){return F===null||F.tag!==4||F.stateNode.containerInfo!==Q.containerInfo||F.stateNode.implementation!==Q.implementation?(F=Zg(Q,Y.mode,oe),F.return=Y,F):(F=p(F,Q.children||[]),F.return=Y,F)}function ie(Y,F,Q,oe,Le){return F===null||F.tag!==7?(F=Aa(Q,Y.mode,oe,Le),F.return=Y,F):(F=p(F,Q),F.return=Y,F)}function le(Y,F,Q){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=Xg(""+F,Y.mode,Q),F.return=Y,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case v:return Q=vd(F.type,F.key,F.props,null,Y.mode,Q),_u(Q,F),Q.return=Y,Q;case x:return F=Zg(F,Y.mode,Q),F.return=Y,F;case H:return F=Ia(F),le(Y,F,Q)}if(P(F)||C(F))return F=Aa(F,Y.mode,Q,null),F.return=Y,F;if(typeof F.then=="function")return le(Y,Cd(F),Q);if(F.$$typeof===T)return le(Y,xd(Y,F),Q);Td(Y,F)}return null}function ee(Y,F,Q,oe){var Le=F!==null?F.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Le!==null?null:k(Y,F,""+Q,oe);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:return Q.key===Le?j(Y,F,Q,oe):null;case x:return Q.key===Le?J(Y,F,Q,oe):null;case H:return Q=Ia(Q),ee(Y,F,Q,oe)}if(P(Q)||C(Q))return Le!==null?null:ie(Y,F,Q,oe,null);if(typeof Q.then=="function")return ee(Y,F,Cd(Q),oe);if(Q.$$typeof===T)return ee(Y,F,xd(Y,Q),oe);Td(Y,Q)}return null}function ne(Y,F,Q,oe,Le){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Y=Y.get(Q)||null,k(F,Y,""+oe,Le);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case v:return Y=Y.get(oe.key===null?Q:oe.key)||null,j(F,Y,oe,Le);case x:return Y=Y.get(oe.key===null?Q:oe.key)||null,J(F,Y,oe,Le);case H:return oe=Ia(oe),ne(Y,F,Q,oe,Le)}if(P(oe)||C(oe))return Y=Y.get(Q)||null,ie(F,Y,oe,Le,null);if(typeof oe.then=="function")return ne(Y,F,Q,Cd(oe),Le);if(oe.$$typeof===T)return ne(Y,F,Q,xd(F,oe),Le);Td(F,oe)}return null}function Ce(Y,F,Q,oe){for(var Le=null,mt=null,Ae=F,Qe=F=0,lt=null;Ae!==null&&Qe<Q.length;Qe++){Ae.index>Qe?(lt=Ae,Ae=null):lt=Ae.sibling;var gt=ee(Y,Ae,Q[Qe],oe);if(gt===null){Ae===null&&(Ae=lt);break}i&&Ae&>.alternate===null&&o(Y,Ae),F=m(gt,F,Qe),mt===null?Le=gt:mt.sibling=gt,mt=gt,Ae=lt}if(Qe===Q.length)return l(Y,Ae),ct&&Yi(Y,Qe),Le;if(Ae===null){for(;Qe<Q.length;Qe++)Ae=le(Y,Q[Qe],oe),Ae!==null&&(F=m(Ae,F,Qe),mt===null?Le=Ae:mt.sibling=Ae,mt=Ae);return ct&&Yi(Y,Qe),Le}for(Ae=c(Ae);Qe<Q.length;Qe++)lt=ne(Ae,Y,Qe,Q[Qe],oe),lt!==null&&(i&<.alternate!==null&&Ae.delete(lt.key===null?Qe:lt.key),F=m(lt,F,Qe),mt===null?Le=lt:mt.sibling=lt,mt=lt);return i&&Ae.forEach(function(Yo){return o(Y,Yo)}),ct&&Yi(Y,Qe),Le}function Pe(Y,F,Q,oe){if(Q==null)throw Error(r(151));for(var Le=null,mt=null,Ae=F,Qe=F=0,lt=null,gt=Q.next();Ae!==null&&!gt.done;Qe++,gt=Q.next()){Ae.index>Qe?(lt=Ae,Ae=null):lt=Ae.sibling;var Yo=ee(Y,Ae,gt.value,oe);if(Yo===null){Ae===null&&(Ae=lt);break}i&&Ae&&Yo.alternate===null&&o(Y,Ae),F=m(Yo,F,Qe),mt===null?Le=Yo:mt.sibling=Yo,mt=Yo,Ae=lt}if(gt.done)return l(Y,Ae),ct&&Yi(Y,Qe),Le;if(Ae===null){for(;!gt.done;Qe++,gt=Q.next())gt=le(Y,gt.value,oe),gt!==null&&(F=m(gt,F,Qe),mt===null?Le=gt:mt.sibling=gt,mt=gt);return ct&&Yi(Y,Qe),Le}for(Ae=c(Ae);!gt.done;Qe++,gt=Q.next())gt=ne(Ae,Y,Qe,gt.value,oe),gt!==null&&(i&>.alternate!==null&&Ae.delete(gt.key===null?Qe:gt.key),F=m(gt,F,Qe),mt===null?Le=gt:mt.sibling=gt,mt=gt);return i&&Ae.forEach(function(WU){return o(Y,WU)}),ct&&Yi(Y,Qe),Le}function jt(Y,F,Q,oe){if(typeof Q=="object"&&Q!==null&&Q.type===E&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:e:{for(var Le=Q.key;F!==null;){if(F.key===Le){if(Le=Q.type,Le===E){if(F.tag===7){l(Y,F.sibling),oe=p(F,Q.props.children),oe.return=Y,Y=oe;break e}}else if(F.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===H&&Ia(Le)===F.type){l(Y,F.sibling),oe=p(F,Q.props),_u(oe,Q),oe.return=Y,Y=oe;break e}l(Y,F);break}else o(Y,F);F=F.sibling}Q.type===E?(oe=Aa(Q.props.children,Y.mode,oe,Q.key),oe.return=Y,Y=oe):(oe=vd(Q.type,Q.key,Q.props,null,Y.mode,oe),_u(oe,Q),oe.return=Y,Y=oe)}return S(Y);case x:e:{for(Le=Q.key;F!==null;){if(F.key===Le)if(F.tag===4&&F.stateNode.containerInfo===Q.containerInfo&&F.stateNode.implementation===Q.implementation){l(Y,F.sibling),oe=p(F,Q.children||[]),oe.return=Y,Y=oe;break e}else{l(Y,F);break}else o(Y,F);F=F.sibling}oe=Zg(Q,Y.mode,oe),oe.return=Y,Y=oe}return S(Y);case H:return Q=Ia(Q),jt(Y,F,Q,oe)}if(P(Q))return Ce(Y,F,Q,oe);if(C(Q)){if(Le=C(Q),typeof Le!="function")throw Error(r(150));return Q=Le.call(Q),Pe(Y,F,Q,oe)}if(typeof Q.then=="function")return jt(Y,F,Cd(Q),oe);if(Q.$$typeof===T)return jt(Y,F,xd(Y,Q),oe);Td(Y,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,F!==null&&F.tag===6?(l(Y,F.sibling),oe=p(F,Q),oe.return=Y,Y=oe):(l(Y,F),oe=Xg(Q,Y.mode,oe),oe.return=Y,Y=oe),S(Y)):l(Y,F)}return function(Y,F,Q,oe){try{Eu=0;var Le=jt(Y,F,Q,oe);return js=null,Le}catch(Ae){if(Ae===Us||Ae===_d)throw Ae;var mt=Ar(29,Ae,null,Y.mode);return mt.lanes=oe,mt.return=Y,mt}}}var Da=Aw(!0),kw=Aw(!1),Oo=!1;function sy(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ly(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function No(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Io(i,o,l){var c=i.updateQueue;if(c===null)return null;if(c=c.shared,(St&2)!==0){var p=c.pending;return p===null?o.next=o:(o.next=p.next,p.next=o),c.pending=o,o=yd(i),fw(i,null,l),o}return gd(i,c,o,l),yd(i)}function wu(i,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194048)!==0)){var c=o.lanes;c&=i.pendingLanes,l|=c,o.lanes=l,b_(i,l)}}function uy(i,o){var l=i.updateQueue,c=i.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var p=null,m=null;if(l=l.firstBaseUpdate,l!==null){do{var S={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};m===null?p=m=S:m=m.next=S,l=l.next}while(l!==null);m===null?p=m=o:m=m.next=o}else p=m=o;l={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:c.shared,callbacks:c.callbacks},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=o:i.next=o,l.lastBaseUpdate=o}var cy=!1;function Cu(){if(cy){var i=Ps;if(i!==null)throw i}}function Tu(i,o,l,c){cy=!1;var p=i.updateQueue;Oo=!1;var m=p.firstBaseUpdate,S=p.lastBaseUpdate,k=p.shared.pending;if(k!==null){p.shared.pending=null;var j=k,J=j.next;j.next=null,S===null?m=J:S.next=J,S=j;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,k=ie.lastBaseUpdate,k!==S&&(k===null?ie.firstBaseUpdate=J:k.next=J,ie.lastBaseUpdate=j))}if(m!==null){var le=p.baseState;S=0,ie=J=j=null,k=m;do{var ee=k.lane&-536870913,ne=ee!==k.lane;if(ne?(st&ee)===ee:(c&ee)===ee){ee!==0&&ee===$s&&(cy=!0),ie!==null&&(ie=ie.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ce=i,Pe=k;ee=o;var jt=l;switch(Pe.tag){case 1:if(Ce=Pe.payload,typeof Ce=="function"){le=Ce.call(jt,le,ee);break e}le=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Pe.payload,ee=typeof Ce=="function"?Ce.call(jt,le,ee):Ce,ee==null)break e;le=y({},le,ee);break e;case 2:Oo=!0}}ee=k.callback,ee!==null&&(i.flags|=64,ne&&(i.flags|=8192),ne=p.callbacks,ne===null?p.callbacks=[ee]:ne.push(ee))}else ne={lane:ee,tag:k.tag,payload:k.payload,callback:k.callback,next:null},ie===null?(J=ie=ne,j=le):ie=ie.next=ne,S|=ee;if(k=k.next,k===null){if(k=p.shared.pending,k===null)break;ne=k,k=ne.next,ne.next=null,p.lastBaseUpdate=ne,p.shared.pending=null}}while(!0);ie===null&&(j=le),p.baseState=j,p.firstBaseUpdate=J,p.lastBaseUpdate=ie,m===null&&(p.shared.lanes=0),Lo|=S,i.lanes=S,i.memoizedState=le}}function Rw(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function Ow(i,o){var l=i.callbacks;if(l!==null)for(i.callbacks=null,i=0;i<l.length;i++)Rw(l[i],o)}var Hs=z(null),Ad=z(0);function Nw(i,o){i=io,I(Ad,i),I(Hs,o),io=i|o.baseLanes}function fy(){I(Ad,io),I(Hs,Hs.current)}function dy(){io=Ad.current,W(Hs),W(Ad)}var kr=z(null),Yr=null;function Mo(i){var o=i.alternate;I(Sn,Sn.current&1),I(kr,i),Yr===null&&(o===null||Hs.current!==null||o.memoizedState!==null)&&(Yr=i)}function hy(i){I(Sn,Sn.current),I(kr,i),Yr===null&&(Yr=i)}function Iw(i){i.tag===22?(I(Sn,Sn.current),I(kr,i),Yr===null&&(Yr=i)):Do()}function Do(){I(Sn,Sn.current),I(kr,kr.current)}function Rr(i){W(kr),Yr===i&&(Yr=null),W(Sn)}var Sn=z(0);function kd(i){for(var o=i;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||b0(l)||S0(l)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Ki=0,Ye=null,Pt=null,kn=null,Rd=!1,Vs=!1,Ba=!1,Od=0,Au=0,Fs=null,j8=0;function pn(){throw Error(r(321))}function py(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!Tr(i[l],o[l]))return!1;return!0}function my(i,o,l,c,p,m){return Ki=m,Ye=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,D.H=i===null||i.memoizedState===null?mC:Oy,Ba=!1,m=l(c,p),Ba=!1,Vs&&(m=Dw(o,l,c,p)),Mw(i),m}function Mw(i){D.H=Ou;var o=Pt!==null&&Pt.next!==null;if(Ki=0,kn=Pt=Ye=null,Rd=!1,Au=0,Fs=null,o)throw Error(r(300));i===null||Rn||(i=i.dependencies,i!==null&&Sd(i)&&(Rn=!0))}function Dw(i,o,l,c){Ye=i;var p=0;do{if(Vs&&(Fs=null),Au=0,Vs=!1,25<=p)throw Error(r(301));if(p+=1,kn=Pt=null,i.updateQueue!=null){var m=i.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}D.H=gC,m=o(l,c)}while(Vs);return m}function H8(){var i=D.H,o=i.useState()[0];return o=typeof o.then=="function"?ku(o):o,i=i.useState()[0],(Pt!==null?Pt.memoizedState:null)!==i&&(Ye.flags|=1024),o}function gy(){var i=Od!==0;return Od=0,i}function yy(i,o,l){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~l}function vy(i){if(Rd){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Rd=!1}Ki=0,kn=Pt=Ye=null,Vs=!1,Au=Od=0,Fs=null}function or(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kn===null?Ye.memoizedState=kn=i:kn=kn.next=i,kn}function xn(){if(Pt===null){var i=Ye.alternate;i=i!==null?i.memoizedState:null}else i=Pt.next;var o=kn===null?Ye.memoizedState:kn.next;if(o!==null)kn=o,Pt=i;else{if(i===null)throw Ye.alternate===null?Error(r(467)):Error(r(310));Pt=i,i={memoizedState:Pt.memoizedState,baseState:Pt.baseState,baseQueue:Pt.baseQueue,queue:Pt.queue,next:null},kn===null?Ye.memoizedState=kn=i:kn=kn.next=i}return kn}function Nd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ku(i){var o=Au;return Au+=1,Fs===null&&(Fs=[]),i=ww(Fs,i,o),o=Ye,(kn===null?o.memoizedState:kn.next)===null&&(o=o.alternate,D.H=o===null||o.memoizedState===null?mC:Oy),i}function Id(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return ku(i);if(i.$$typeof===T)return Vn(i)}throw Error(r(438,String(i)))}function by(i){var o=null,l=Ye.updateQueue;if(l!==null&&(o=l.memoCache),o==null){var c=Ye.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(o={data:c.data.map(function(p){return p.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),l===null&&(l=Nd(),Ye.updateQueue=l),l.memoCache=o,l=o.data[o.index],l===void 0)for(l=o.data[o.index]=Array(i),c=0;c<i;c++)l[c]=K;return o.index++,l}function Wi(i,o){return typeof o=="function"?o(i):o}function Md(i){var o=xn();return Sy(o,Pt,i)}function Sy(i,o,l){var c=i.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=l;var p=i.baseQueue,m=c.pending;if(m!==null){if(p!==null){var S=p.next;p.next=m.next,m.next=S}o.baseQueue=p=m,c.pending=null}if(m=i.baseState,p===null)i.memoizedState=m;else{o=p.next;var k=S=null,j=null,J=o,ie=!1;do{var le=J.lane&-536870913;if(le!==J.lane?(st&le)===le:(Ki&le)===le){var ee=J.revertLane;if(ee===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null}),le===$s&&(ie=!0);else if((Ki&ee)===ee){J=J.next,ee===$s&&(ie=!0);continue}else le={lane:0,revertLane:J.revertLane,gesture:null,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},j===null?(k=j=le,S=m):j=j.next=le,Ye.lanes|=ee,Lo|=ee;le=J.action,Ba&&l(m,le),m=J.hasEagerState?J.eagerState:l(m,le)}else ee={lane:le,revertLane:J.revertLane,gesture:J.gesture,action:J.action,hasEagerState:J.hasEagerState,eagerState:J.eagerState,next:null},j===null?(k=j=ee,S=m):j=j.next=ee,Ye.lanes|=le,Lo|=le;J=J.next}while(J!==null&&J!==o);if(j===null?S=m:j.next=k,!Tr(m,i.memoizedState)&&(Rn=!0,ie&&(l=Ps,l!==null)))throw l;i.memoizedState=m,i.baseState=S,i.baseQueue=j,c.lastRenderedState=m}return p===null&&(c.lanes=0),[i.memoizedState,c.dispatch]}function xy(i){var o=xn(),l=o.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=i;var c=l.dispatch,p=l.pending,m=o.memoizedState;if(p!==null){l.pending=null;var S=p=p.next;do m=i(m,S.action),S=S.next;while(S!==p);Tr(m,o.memoizedState)||(Rn=!0),o.memoizedState=m,o.baseQueue===null&&(o.baseState=m),l.lastRenderedState=m}return[m,c]}function Bw(i,o,l){var c=Ye,p=xn(),m=ct;if(m){if(l===void 0)throw Error(r(407));l=l()}else l=o();var S=!Tr((Pt||p).memoizedState,l);if(S&&(p.memoizedState=l,Rn=!0),p=p.queue,wy($w.bind(null,c,p,i),[i]),p.getSnapshot!==o||S||kn!==null&&kn.memoizedState.tag&1){if(c.flags|=2048,Gs(9,{destroy:void 0},Lw.bind(null,c,p,l,o),null),Vt===null)throw Error(r(349));m||(Ki&127)!==0||zw(c,o,l)}return l}function zw(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=Ye.updateQueue,o===null?(o=Nd(),Ye.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function Lw(i,o,l,c){o.value=l,o.getSnapshot=c,Pw(o)&&Uw(i)}function $w(i,o,l){return l(function(){Pw(o)&&Uw(i)})}function Pw(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!Tr(i,l)}catch{return!0}}function Uw(i){var o=Ta(i,2);o!==null&&gr(o,i,2)}function Ey(i){var o=or();if(typeof i=="function"){var l=i;if(i=l(),Ba){Qn(!0);try{l()}finally{Qn(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wi,lastRenderedState:i},o}function jw(i,o,l,c){return i.baseState=l,Sy(i,Pt,typeof c=="function"?c:Wi)}function V8(i,o,l,c,p){if(zd(i))throw Error(r(485));if(i=o.action,i!==null){var m={payload:p,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){m.listeners.push(S)}};D.T!==null?l(!0):m.isTransition=!1,c(m),l=o.pending,l===null?(m.next=o.pending=m,Hw(o,m)):(m.next=l.next,o.pending=l.next=m)}}function Hw(i,o){var l=o.action,c=o.payload,p=i.state;if(o.isTransition){var m=D.T,S={};D.T=S;try{var k=l(p,c),j=D.S;j!==null&&j(S,k),Vw(i,o,k)}catch(J){_y(i,o,J)}finally{m!==null&&S.types!==null&&(m.types=S.types),D.T=m}}else try{m=l(p,c),Vw(i,o,m)}catch(J){_y(i,o,J)}}function Vw(i,o,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){Fw(i,o,c)},function(c){return _y(i,o,c)}):Fw(i,o,l)}function Fw(i,o,l){o.status="fulfilled",o.value=l,Gw(o),i.state=l,o=i.pending,o!==null&&(l=o.next,l===o?i.pending=null:(l=l.next,o.next=l,Hw(i,l)))}function _y(i,o,l){var c=i.pending;if(i.pending=null,c!==null){c=c.next;do o.status="rejected",o.reason=l,Gw(o),o=o.next;while(o!==c)}i.action=null}function Gw(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function qw(i,o){return o}function Yw(i,o){if(ct){var l=Vt.formState;if(l!==null){e:{var c=Ye;if(ct){if(Xt){t:{for(var p=Xt,m=qr;p.nodeType!==8;){if(!m){p=null;break t}if(p=Xr(p.nextSibling),p===null){p=null;break t}}m=p.data,p=m==="F!"||m==="F"?p:null}if(p){Xt=Xr(p.nextSibling),c=p.data==="F!";break e}}ko(c)}c=!1}c&&(o=l[0])}}return l=or(),l.memoizedState=l.baseState=o,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qw,lastRenderedState:o},l.queue=c,l=dC.bind(null,Ye,c),c.dispatch=l,c=Ey(!1),m=Ry.bind(null,Ye,!1,c.queue),c=or(),p={state:o,dispatch:null,action:i,pending:null},c.queue=p,l=V8.bind(null,Ye,p,m,l),p.dispatch=l,c.memoizedState=i,[o,l,!1]}function Xw(i){var o=xn();return Zw(o,Pt,i)}function Zw(i,o,l){if(o=Sy(i,o,qw)[0],i=Md(Wi)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var c=ku(o)}catch(S){throw S===Us?_d:S}else c=o;o=xn();var p=o.queue,m=p.dispatch;return l!==o.memoizedState&&(Ye.flags|=2048,Gs(9,{destroy:void 0},F8.bind(null,p,l),null)),[c,m,i]}function F8(i,o){i.action=o}function Kw(i){var o=xn(),l=Pt;if(l!==null)return Zw(o,l,i);xn(),o=o.memoizedState,l=xn();var c=l.queue.dispatch;return l.memoizedState=i,[o,c,!1]}function Gs(i,o,l,c){return i={tag:i,create:l,deps:c,inst:o,next:null},o=Ye.updateQueue,o===null&&(o=Nd(),Ye.updateQueue=o),l=o.lastEffect,l===null?o.lastEffect=i.next=i:(c=l.next,l.next=i,i.next=c,o.lastEffect=i),i}function Ww(){return xn().memoizedState}function Dd(i,o,l,c){var p=or();Ye.flags|=i,p.memoizedState=Gs(1|o,{destroy:void 0},l,c===void 0?null:c)}function Bd(i,o,l,c){var p=xn();c=c===void 0?null:c;var m=p.memoizedState.inst;Pt!==null&&c!==null&&py(c,Pt.memoizedState.deps)?p.memoizedState=Gs(o,m,l,c):(Ye.flags|=i,p.memoizedState=Gs(1|o,m,l,c))}function Qw(i,o){Dd(8390656,8,i,o)}function wy(i,o){Bd(2048,8,i,o)}function G8(i){Ye.flags|=4;var o=Ye.updateQueue;if(o===null)o=Nd(),Ye.updateQueue=o,o.events=[i];else{var l=o.events;l===null?o.events=[i]:l.push(i)}}function Jw(i){var o=xn().memoizedState;return G8({ref:o,nextImpl:i}),function(){if((St&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function eC(i,o){return Bd(4,2,i,o)}function tC(i,o){return Bd(4,4,i,o)}function nC(i,o){if(typeof o=="function"){i=i();var l=o(i);return function(){typeof l=="function"?l():o(null)}}if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function rC(i,o,l){l=l!=null?l.concat([i]):null,Bd(4,4,nC.bind(null,o,i),l)}function Cy(){}function iC(i,o){var l=xn();o=o===void 0?null:o;var c=l.memoizedState;return o!==null&&py(o,c[1])?c[0]:(l.memoizedState=[i,o],i)}function oC(i,o){var l=xn();o=o===void 0?null:o;var c=l.memoizedState;if(o!==null&&py(o,c[1]))return c[0];if(c=i(),Ba){Qn(!0);try{i()}finally{Qn(!1)}}return l.memoizedState=[c,o],c}function Ty(i,o,l){return l===void 0||(Ki&1073741824)!==0&&(st&261930)===0?i.memoizedState=o:(i.memoizedState=l,i=aT(),Ye.lanes|=i,Lo|=i,l)}function aC(i,o,l,c){return Tr(l,o)?l:Hs.current!==null?(i=Ty(i,l,c),Tr(i,o)||(Rn=!0),i):(Ki&42)===0||(Ki&1073741824)!==0&&(st&261930)===0?(Rn=!0,i.memoizedState=l):(i=aT(),Ye.lanes|=i,Lo|=i,o)}function sC(i,o,l,c,p){var m=Z.p;Z.p=m!==0&&8>m?m:8;var S=D.T,k={};D.T=k,Ry(i,!1,o,l);try{var j=p(),J=D.S;if(J!==null&&J(k,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var ie=U8(j,c);Ru(i,o,ie,Ir(i))}else Ru(i,o,c,Ir(i))}catch(le){Ru(i,o,{then:function(){},status:"rejected",reason:le},Ir())}finally{Z.p=m,S!==null&&k.types!==null&&(S.types=k.types),D.T=S}}function q8(){}function Ay(i,o,l,c){if(i.tag!==5)throw Error(r(476));var p=lC(i).queue;sC(i,p,o,se,l===null?q8:function(){return uC(i),l(c)})}function lC(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wi,lastRenderedState:se},next:null};var l={};return o.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wi,lastRenderedState:l},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function uC(i){var o=lC(i);o.next===null&&(o=i.alternate.memoizedState),Ru(i,o.next.queue,{},Ir())}function ky(){return Vn(qu)}function cC(){return xn().memoizedState}function fC(){return xn().memoizedState}function Y8(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var l=Ir();i=No(l);var c=Io(o,i,l);c!==null&&(gr(c,o,l),wu(c,o,l)),o={cache:ry()},i.payload=o;return}o=o.return}}function X8(i,o,l){var c=Ir();l={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},zd(i)?hC(o,l):(l=qg(i,o,l,c),l!==null&&(gr(l,i,c),pC(l,o,c)))}function dC(i,o,l){var c=Ir();Ru(i,o,l,c)}function Ru(i,o,l,c){var p={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(zd(i))hC(o,p);else{var m=i.alternate;if(i.lanes===0&&(m===null||m.lanes===0)&&(m=o.lastRenderedReducer,m!==null))try{var S=o.lastRenderedState,k=m(S,l);if(p.hasEagerState=!0,p.eagerState=k,Tr(k,S))return gd(i,o,p,0),Vt===null&&md(),!1}catch{}if(l=qg(i,o,p,c),l!==null)return gr(l,i,c),pC(l,o,c),!0}return!1}function Ry(i,o,l,c){if(c={lane:2,revertLane:s0(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},zd(i)){if(o)throw Error(r(479))}else o=qg(i,l,c,2),o!==null&&gr(o,i,2)}function zd(i){var o=i.alternate;return i===Ye||o!==null&&o===Ye}function hC(i,o){Vs=Rd=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function pC(i,o,l){if((l&4194048)!==0){var c=o.lanes;c&=i.pendingLanes,l|=c,o.lanes=l,b_(i,l)}}var Ou={readContext:Vn,use:Id,useCallback:pn,useContext:pn,useEffect:pn,useImperativeHandle:pn,useLayoutEffect:pn,useInsertionEffect:pn,useMemo:pn,useReducer:pn,useRef:pn,useState:pn,useDebugValue:pn,useDeferredValue:pn,useTransition:pn,useSyncExternalStore:pn,useId:pn,useHostTransitionStatus:pn,useFormState:pn,useActionState:pn,useOptimistic:pn,useMemoCache:pn,useCacheRefresh:pn};Ou.useEffectEvent=pn;var mC={readContext:Vn,use:Id,useCallback:function(i,o){return or().memoizedState=[i,o===void 0?null:o],i},useContext:Vn,useEffect:Qw,useImperativeHandle:function(i,o,l){l=l!=null?l.concat([i]):null,Dd(4194308,4,nC.bind(null,o,i),l)},useLayoutEffect:function(i,o){return Dd(4194308,4,i,o)},useInsertionEffect:function(i,o){Dd(4,2,i,o)},useMemo:function(i,o){var l=or();o=o===void 0?null:o;var c=i();if(Ba){Qn(!0);try{i()}finally{Qn(!1)}}return l.memoizedState=[c,o],c},useReducer:function(i,o,l){var c=or();if(l!==void 0){var p=l(o);if(Ba){Qn(!0);try{l(o)}finally{Qn(!1)}}}else p=o;return c.memoizedState=c.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},c.queue=i,i=i.dispatch=X8.bind(null,Ye,i),[c.memoizedState,i]},useRef:function(i){var o=or();return i={current:i},o.memoizedState=i},useState:function(i){i=Ey(i);var o=i.queue,l=dC.bind(null,Ye,o);return o.dispatch=l,[i.memoizedState,l]},useDebugValue:Cy,useDeferredValue:function(i,o){var l=or();return Ty(l,i,o)},useTransition:function(){var i=Ey(!1);return i=sC.bind(null,Ye,i.queue,!0,!1),or().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,l){var c=Ye,p=or();if(ct){if(l===void 0)throw Error(r(407));l=l()}else{if(l=o(),Vt===null)throw Error(r(349));(st&127)!==0||zw(c,o,l)}p.memoizedState=l;var m={value:l,getSnapshot:o};return p.queue=m,Qw($w.bind(null,c,m,i),[i]),c.flags|=2048,Gs(9,{destroy:void 0},Lw.bind(null,c,m,l,o),null),l},useId:function(){var i=or(),o=Vt.identifierPrefix;if(ct){var l=ki,c=Ai;l=(c&~(1<<32-At(c)-1)).toString(32)+l,o="_"+o+"R_"+l,l=Od++,0<l&&(o+="H"+l.toString(32)),o+="_"}else l=j8++,o="_"+o+"r_"+l.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:ky,useFormState:Yw,useActionState:Yw,useOptimistic:function(i){var o=or();o.memoizedState=o.baseState=i;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=l,o=Ry.bind(null,Ye,!0,l),l.dispatch=o,[i,o]},useMemoCache:by,useCacheRefresh:function(){return or().memoizedState=Y8.bind(null,Ye)},useEffectEvent:function(i){var o=or(),l={impl:i};return o.memoizedState=l,function(){if((St&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},Oy={readContext:Vn,use:Id,useCallback:iC,useContext:Vn,useEffect:wy,useImperativeHandle:rC,useInsertionEffect:eC,useLayoutEffect:tC,useMemo:oC,useReducer:Md,useRef:Ww,useState:function(){return Md(Wi)},useDebugValue:Cy,useDeferredValue:function(i,o){var l=xn();return aC(l,Pt.memoizedState,i,o)},useTransition:function(){var i=Md(Wi)[0],o=xn().memoizedState;return[typeof i=="boolean"?i:ku(i),o]},useSyncExternalStore:Bw,useId:cC,useHostTransitionStatus:ky,useFormState:Xw,useActionState:Xw,useOptimistic:function(i,o){var l=xn();return jw(l,Pt,i,o)},useMemoCache:by,useCacheRefresh:fC};Oy.useEffectEvent=Jw;var gC={readContext:Vn,use:Id,useCallback:iC,useContext:Vn,useEffect:wy,useImperativeHandle:rC,useInsertionEffect:eC,useLayoutEffect:tC,useMemo:oC,useReducer:xy,useRef:Ww,useState:function(){return xy(Wi)},useDebugValue:Cy,useDeferredValue:function(i,o){var l=xn();return Pt===null?Ty(l,i,o):aC(l,Pt.memoizedState,i,o)},useTransition:function(){var i=xy(Wi)[0],o=xn().memoizedState;return[typeof i=="boolean"?i:ku(i),o]},useSyncExternalStore:Bw,useId:cC,useHostTransitionStatus:ky,useFormState:Kw,useActionState:Kw,useOptimistic:function(i,o){var l=xn();return Pt!==null?jw(l,Pt,i,o):(l.baseState=i,[i,l.queue.dispatch])},useMemoCache:by,useCacheRefresh:fC};gC.useEffectEvent=Jw;function Ny(i,o,l,c){o=i.memoizedState,l=l(c,o),l=l==null?o:y({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Iy={enqueueSetState:function(i,o,l){i=i._reactInternals;var c=Ir(),p=No(c);p.payload=o,l!=null&&(p.callback=l),o=Io(i,p,c),o!==null&&(gr(o,i,c),wu(o,i,c))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var c=Ir(),p=No(c);p.tag=1,p.payload=o,l!=null&&(p.callback=l),o=Io(i,p,c),o!==null&&(gr(o,i,c),wu(o,i,c))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=Ir(),c=No(l);c.tag=2,o!=null&&(c.callback=o),o=Io(i,c,l),o!==null&&(gr(o,i,l),wu(o,i,l))}};function yC(i,o,l,c,p,m,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(c,m,S):o.prototype&&o.prototype.isPureReactComponent?!gu(l,c)||!gu(p,m):!0}function vC(i,o,l,c){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,c),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,c),o.state!==i&&Iy.enqueueReplaceState(o,o.state,null)}function za(i,o){var l=o;if("ref"in o){l={};for(var c in o)c!=="ref"&&(l[c]=o[c])}if(i=i.defaultProps){l===o&&(l=y({},l));for(var p in i)l[p]===void 0&&(l[p]=i[p])}return l}function bC(i){pd(i)}function SC(i){console.error(i)}function xC(i){pd(i)}function Ld(i,o){try{var l=i.onUncaughtError;l(o.value,{componentStack:o.stack})}catch(c){setTimeout(function(){throw c})}}function EC(i,o,l){try{var c=i.onCaughtError;c(l.value,{componentStack:l.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function My(i,o,l){return l=No(l),l.tag=3,l.payload={element:null},l.callback=function(){Ld(i,o)},l}function _C(i){return i=No(i),i.tag=3,i}function wC(i,o,l,c){var p=l.type.getDerivedStateFromError;if(typeof p=="function"){var m=c.value;i.payload=function(){return p(m)},i.callback=function(){EC(o,l,c)}}var S=l.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(i.callback=function(){EC(o,l,c),typeof p!="function"&&($o===null?$o=new Set([this]):$o.add(this));var k=c.stack;this.componentDidCatch(c.value,{componentStack:k!==null?k:""})})}function Z8(i,o,l,c,p){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(o=l.alternate,o!==null&&Ls(o,l,p,!0),l=kr.current,l!==null){switch(l.tag){case 31:case 13:return Yr===null?Zd():l.alternate===null&&mn===0&&(mn=3),l.flags&=-257,l.flags|=65536,l.lanes=p,c===wd?l.flags|=16384:(o=l.updateQueue,o===null?l.updateQueue=new Set([c]):o.add(c),i0(i,c,p)),!1;case 22:return l.flags|=65536,c===wd?l.flags|=16384:(o=l.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=o):(l=o.retryQueue,l===null?o.retryQueue=new Set([c]):l.add(c)),i0(i,c,p)),!1}throw Error(r(435,l.tag))}return i0(i,c,p),Zd(),!1}if(ct)return o=kr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=p,c!==Qg&&(i=Error(r(422),{cause:c}),bu(Vr(i,l)))):(c!==Qg&&(o=Error(r(423),{cause:c}),bu(Vr(o,l))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,c=Vr(c,l),p=My(i.stateNode,c,p),uy(i,p),mn!==4&&(mn=2)),!1;var m=Error(r(520),{cause:c});if(m=Vr(m,l),$u===null?$u=[m]:$u.push(m),mn!==4&&(mn=2),o===null)return!0;c=Vr(c,l),l=o;do{switch(l.tag){case 3:return l.flags|=65536,i=p&-p,l.lanes|=i,i=My(l.stateNode,c,i),uy(l,i),!1;case 1:if(o=l.type,m=l.stateNode,(l.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&($o===null||!$o.has(m))))return l.flags|=65536,p&=-p,l.lanes|=p,p=_C(p),wC(p,i,l,c),uy(l,p),!1}l=l.return}while(l!==null);return!1}var Dy=Error(r(461)),Rn=!1;function Fn(i,o,l,c){o.child=i===null?kw(o,null,l,c):Da(o,i.child,l,c)}function CC(i,o,l,c,p){l=l.render;var m=o.ref;if("ref"in c){var S={};for(var k in c)k!=="ref"&&(S[k]=c[k])}else S=c;return Oa(o),c=my(i,o,l,S,m,p),k=gy(),i!==null&&!Rn?(yy(i,o,p),Qi(i,o,p)):(ct&&k&&Kg(o),o.flags|=1,Fn(i,o,c,p),o.child)}function TC(i,o,l,c,p){if(i===null){var m=l.type;return typeof m=="function"&&!Yg(m)&&m.defaultProps===void 0&&l.compare===null?(o.tag=15,o.type=m,AC(i,o,m,c,p)):(i=vd(l.type,null,c,o,o.mode,p),i.ref=o.ref,i.return=o,o.child=i)}if(m=i.child,!Hy(i,p)){var S=m.memoizedProps;if(l=l.compare,l=l!==null?l:gu,l(S,c)&&i.ref===o.ref)return Qi(i,o,p)}return o.flags|=1,i=qi(m,c),i.ref=o.ref,i.return=o,o.child=i}function AC(i,o,l,c,p){if(i!==null){var m=i.memoizedProps;if(gu(m,c)&&i.ref===o.ref)if(Rn=!1,o.pendingProps=c=m,Hy(i,p))(i.flags&131072)!==0&&(Rn=!0);else return o.lanes=i.lanes,Qi(i,o,p)}return By(i,o,l,c,p)}function kC(i,o,l,c){var p=c.children,m=i!==null?i.memoizedState:null;if(i===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((o.flags&128)!==0){if(m=m!==null?m.baseLanes|l:l,i!==null){for(c=o.child=i.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~m}else c=0,o.child=null;return RC(i,o,m,l,c)}if((l&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&Ed(o,m!==null?m.cachePool:null),m!==null?Nw(o,m):fy(),Iw(o);else return c=o.lanes=536870912,RC(i,o,m!==null?m.baseLanes|l:l,l,c)}else m!==null?(Ed(o,m.cachePool),Nw(o,m),Do(),o.memoizedState=null):(i!==null&&Ed(o,null),fy(),Do());return Fn(i,o,p,l),o.child}function Nu(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function RC(i,o,l,c,p){var m=oy();return m=m===null?null:{parent:An._currentValue,pool:m},o.memoizedState={baseLanes:l,cachePool:m},i!==null&&Ed(o,null),fy(),Iw(o),i!==null&&Ls(i,o,c,!0),o.childLanes=p,null}function $d(i,o){return o=Ud({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function OC(i,o,l){return Da(o,i.child,null,l),i=$d(o,o.pendingProps),i.flags|=2,Rr(o),o.memoizedState=null,i}function K8(i,o,l){var c=o.pendingProps,p=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(ct){if(c.mode==="hidden")return i=$d(o,c),o.lanes=536870912,Nu(null,i);if(hy(o),(i=Xt)?(i=HT(i,qr),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:To!==null?{id:Ai,overflow:ki}:null,retryLane:536870912,hydrationErrors:null},l=hw(i),l.return=o,o.child=l,Hn=o,Xt=null)):i=null,i===null)throw ko(o);return o.lanes=536870912,null}return $d(o,c)}var m=i.memoizedState;if(m!==null){var S=m.dehydrated;if(hy(o),p)if(o.flags&256)o.flags&=-257,o=OC(i,o,l);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(r(558));else if(Rn||Ls(i,o,l,!1),p=(l&i.childLanes)!==0,Rn||p){if(c=Vt,c!==null&&(S=S_(c,l),S!==0&&S!==m.retryLane))throw m.retryLane=S,Ta(i,S),gr(c,i,S),Dy;Zd(),o=OC(i,o,l)}else i=m.treeContext,Xt=Xr(S.nextSibling),Hn=o,ct=!0,Ao=null,qr=!1,i!==null&&gw(o,i),o=$d(o,c),o.flags|=4096;return o}return i=qi(i.child,{mode:c.mode,children:c.children}),i.ref=o.ref,o.child=i,i.return=o,i}function Pd(i,o){var l=o.ref;if(l===null)i!==null&&i.ref!==null&&(o.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(i===null||i.ref!==l)&&(o.flags|=4194816)}}function By(i,o,l,c,p){return Oa(o),l=my(i,o,l,c,void 0,p),c=gy(),i!==null&&!Rn?(yy(i,o,p),Qi(i,o,p)):(ct&&c&&Kg(o),o.flags|=1,Fn(i,o,l,p),o.child)}function NC(i,o,l,c,p,m){return Oa(o),o.updateQueue=null,l=Dw(o,c,l,p),Mw(i),c=gy(),i!==null&&!Rn?(yy(i,o,m),Qi(i,o,m)):(ct&&c&&Kg(o),o.flags|=1,Fn(i,o,l,m),o.child)}function IC(i,o,l,c,p){if(Oa(o),o.stateNode===null){var m=Ms,S=l.contextType;typeof S=="object"&&S!==null&&(m=Vn(S)),m=new l(c,m),o.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Iy,o.stateNode=m,m._reactInternals=o,m=o.stateNode,m.props=c,m.state=o.memoizedState,m.refs={},sy(o),S=l.contextType,m.context=typeof S=="object"&&S!==null?Vn(S):Ms,m.state=o.memoizedState,S=l.getDerivedStateFromProps,typeof S=="function"&&(Ny(o,l,S,c),m.state=o.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(S=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),S!==m.state&&Iy.enqueueReplaceState(m,m.state,null),Tu(o,c,m,p),Cu(),m.state=o.memoizedState),typeof m.componentDidMount=="function"&&(o.flags|=4194308),c=!0}else if(i===null){m=o.stateNode;var k=o.memoizedProps,j=za(l,k);m.props=j;var J=m.context,ie=l.contextType;S=Ms,typeof ie=="object"&&ie!==null&&(S=Vn(ie));var le=l.getDerivedStateFromProps;ie=typeof le=="function"||typeof m.getSnapshotBeforeUpdate=="function",k=o.pendingProps!==k,ie||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(k||J!==S)&&vC(o,m,c,S),Oo=!1;var ee=o.memoizedState;m.state=ee,Tu(o,c,m,p),Cu(),J=o.memoizedState,k||ee!==J||Oo?(typeof le=="function"&&(Ny(o,l,le,c),J=o.memoizedState),(j=Oo||yC(o,l,j,c,ee,J,S))?(ie||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(o.flags|=4194308)):(typeof m.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=c,o.memoizedState=J),m.props=c,m.state=J,m.context=S,c=j):(typeof m.componentDidMount=="function"&&(o.flags|=4194308),c=!1)}else{m=o.stateNode,ly(i,o),S=o.memoizedProps,ie=za(l,S),m.props=ie,le=o.pendingProps,ee=m.context,J=l.contextType,j=Ms,typeof J=="object"&&J!==null&&(j=Vn(J)),k=l.getDerivedStateFromProps,(J=typeof k=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S!==le||ee!==j)&&vC(o,m,c,j),Oo=!1,ee=o.memoizedState,m.state=ee,Tu(o,c,m,p),Cu();var ne=o.memoizedState;S!==le||ee!==ne||Oo||i!==null&&i.dependencies!==null&&Sd(i.dependencies)?(typeof k=="function"&&(Ny(o,l,k,c),ne=o.memoizedState),(ie=Oo||yC(o,l,ie,c,ee,ne,j)||i!==null&&i.dependencies!==null&&Sd(i.dependencies))?(J||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(c,ne,j),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(c,ne,j)),typeof m.componentDidUpdate=="function"&&(o.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof m.componentDidUpdate!="function"||S===i.memoizedProps&&ee===i.memoizedState||(o.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&ee===i.memoizedState||(o.flags|=1024),o.memoizedProps=c,o.memoizedState=ne),m.props=c,m.state=ne,m.context=j,c=ie):(typeof m.componentDidUpdate!="function"||S===i.memoizedProps&&ee===i.memoizedState||(o.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&ee===i.memoizedState||(o.flags|=1024),c=!1)}return m=c,Pd(i,o),c=(o.flags&128)!==0,m||c?(m=o.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:m.render(),o.flags|=1,i!==null&&c?(o.child=Da(o,i.child,null,p),o.child=Da(o,null,l,p)):Fn(i,o,l,p),o.memoizedState=m.state,i=o.child):i=Qi(i,o,p),i}function MC(i,o,l,c){return ka(),o.flags|=256,Fn(i,o,l,c),o.child}var zy={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ly(i){return{baseLanes:i,cachePool:Ew()}}function $y(i,o,l){return i=i!==null?i.childLanes&~l:0,o&&(i|=Nr),i}function DC(i,o,l){var c=o.pendingProps,p=!1,m=(o.flags&128)!==0,S;if((S=m)||(S=i!==null&&i.memoizedState===null?!1:(Sn.current&2)!==0),S&&(p=!0,o.flags&=-129),S=(o.flags&32)!==0,o.flags&=-33,i===null){if(ct){if(p?Mo(o):Do(),(i=Xt)?(i=HT(i,qr),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:To!==null?{id:Ai,overflow:ki}:null,retryLane:536870912,hydrationErrors:null},l=hw(i),l.return=o,o.child=l,Hn=o,Xt=null)):i=null,i===null)throw ko(o);return S0(i)?o.lanes=32:o.lanes=536870912,null}var k=c.children;return c=c.fallback,p?(Do(),p=o.mode,k=Ud({mode:"hidden",children:k},p),c=Aa(c,p,l,null),k.return=o,c.return=o,k.sibling=c,o.child=k,c=o.child,c.memoizedState=Ly(l),c.childLanes=$y(i,S,l),o.memoizedState=zy,Nu(null,c)):(Mo(o),Py(o,k))}var j=i.memoizedState;if(j!==null&&(k=j.dehydrated,k!==null)){if(m)o.flags&256?(Mo(o),o.flags&=-257,o=Uy(i,o,l)):o.memoizedState!==null?(Do(),o.child=i.child,o.flags|=128,o=null):(Do(),k=c.fallback,p=o.mode,c=Ud({mode:"visible",children:c.children},p),k=Aa(k,p,l,null),k.flags|=2,c.return=o,k.return=o,c.sibling=k,o.child=c,Da(o,i.child,null,l),c=o.child,c.memoizedState=Ly(l),c.childLanes=$y(i,S,l),o.memoizedState=zy,o=Nu(null,c));else if(Mo(o),S0(k)){if(S=k.nextSibling&&k.nextSibling.dataset,S)var J=S.dgst;S=J,c=Error(r(419)),c.stack="",c.digest=S,bu({value:c,source:null,stack:null}),o=Uy(i,o,l)}else if(Rn||Ls(i,o,l,!1),S=(l&i.childLanes)!==0,Rn||S){if(S=Vt,S!==null&&(c=S_(S,l),c!==0&&c!==j.retryLane))throw j.retryLane=c,Ta(i,c),gr(S,i,c),Dy;b0(k)||Zd(),o=Uy(i,o,l)}else b0(k)?(o.flags|=192,o.child=i.child,o=null):(i=j.treeContext,Xt=Xr(k.nextSibling),Hn=o,ct=!0,Ao=null,qr=!1,i!==null&&gw(o,i),o=Py(o,c.children),o.flags|=4096);return o}return p?(Do(),k=c.fallback,p=o.mode,j=i.child,J=j.sibling,c=qi(j,{mode:"hidden",children:c.children}),c.subtreeFlags=j.subtreeFlags&65011712,J!==null?k=qi(J,k):(k=Aa(k,p,l,null),k.flags|=2),k.return=o,c.return=o,c.sibling=k,o.child=c,Nu(null,c),c=o.child,k=i.child.memoizedState,k===null?k=Ly(l):(p=k.cachePool,p!==null?(j=An._currentValue,p=p.parent!==j?{parent:j,pool:j}:p):p=Ew(),k={baseLanes:k.baseLanes|l,cachePool:p}),c.memoizedState=k,c.childLanes=$y(i,S,l),o.memoizedState=zy,Nu(i.child,c)):(Mo(o),l=i.child,i=l.sibling,l=qi(l,{mode:"visible",children:c.children}),l.return=o,l.sibling=null,i!==null&&(S=o.deletions,S===null?(o.deletions=[i],o.flags|=16):S.push(i)),o.child=l,o.memoizedState=null,l)}function Py(i,o){return o=Ud({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Ud(i,o){return i=Ar(22,i,null,o),i.lanes=0,i}function Uy(i,o,l){return Da(o,i.child,null,l),i=Py(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function BC(i,o,l){i.lanes|=o;var c=i.alternate;c!==null&&(c.lanes|=o),ty(i.return,o,l)}function jy(i,o,l,c,p,m){var S=i.memoizedState;S===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:p,treeForkCount:m}:(S.isBackwards=o,S.rendering=null,S.renderingStartTime=0,S.last=c,S.tail=l,S.tailMode=p,S.treeForkCount=m)}function zC(i,o,l){var c=o.pendingProps,p=c.revealOrder,m=c.tail;c=c.children;var S=Sn.current,k=(S&2)!==0;if(k?(S=S&1|2,o.flags|=128):S&=1,I(Sn,S),Fn(i,o,c,l),c=ct?vu:0,!k&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&BC(i,l,o);else if(i.tag===19)BC(i,l,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(p){case"forwards":for(l=o.child,p=null;l!==null;)i=l.alternate,i!==null&&kd(i)===null&&(p=l),l=l.sibling;l=p,l===null?(p=o.child,o.child=null):(p=l.sibling,l.sibling=null),jy(o,!1,p,l,m,c);break;case"backwards":case"unstable_legacy-backwards":for(l=null,p=o.child,o.child=null;p!==null;){if(i=p.alternate,i!==null&&kd(i)===null){o.child=p;break}i=p.sibling,p.sibling=l,l=p,p=i}jy(o,!0,l,null,m,c);break;case"together":jy(o,!1,null,null,void 0,c);break;default:o.memoizedState=null}return o.child}function Qi(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),Lo|=o.lanes,(l&o.childLanes)===0)if(i!==null){if(Ls(i,o,l,!1),(l&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error(r(153));if(o.child!==null){for(i=o.child,l=qi(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=qi(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function Hy(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&Sd(i)))}function W8(i,o,l){switch(o.tag){case 3:Ke(o,o.stateNode.containerInfo),Ro(o,An,i.memoizedState.cache),ka();break;case 27:case 5:Me(o);break;case 4:Ke(o,o.stateNode.containerInfo);break;case 10:Ro(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,hy(o),null;break;case 13:var c=o.memoizedState;if(c!==null)return c.dehydrated!==null?(Mo(o),o.flags|=128,null):(l&o.child.childLanes)!==0?DC(i,o,l):(Mo(o),i=Qi(i,o,l),i!==null?i.sibling:null);Mo(o);break;case 19:var p=(i.flags&128)!==0;if(c=(l&o.childLanes)!==0,c||(Ls(i,o,l,!1),c=(l&o.childLanes)!==0),p){if(c)return zC(i,o,l);o.flags|=128}if(p=o.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),I(Sn,Sn.current),c)break;return null;case 22:return o.lanes=0,kC(i,o,l,o.pendingProps);case 24:Ro(o,An,i.memoizedState.cache)}return Qi(i,o,l)}function LC(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps)Rn=!0;else{if(!Hy(i,l)&&(o.flags&128)===0)return Rn=!1,W8(i,o,l);Rn=(i.flags&131072)!==0}else Rn=!1,ct&&(o.flags&1048576)!==0&&mw(o,vu,o.index);switch(o.lanes=0,o.tag){case 16:e:{var c=o.pendingProps;if(i=Ia(o.elementType),o.type=i,typeof i=="function")Yg(i)?(c=za(i,c),o.tag=1,o=IC(null,o,i,c,l)):(o.tag=0,o=By(null,o,i,c,l));else{if(i!=null){var p=i.$$typeof;if(p===A){o.tag=11,o=CC(null,o,i,c,l);break e}else if(p===$){o.tag=14,o=TC(null,o,i,c,l);break e}}throw o=U(i)||i,Error(r(306,o,""))}}return o;case 0:return By(i,o,o.type,o.pendingProps,l);case 1:return c=o.type,p=za(c,o.pendingProps),IC(i,o,c,p,l);case 3:e:{if(Ke(o,o.stateNode.containerInfo),i===null)throw Error(r(387));c=o.pendingProps;var m=o.memoizedState;p=m.element,ly(i,o),Tu(o,c,null,l);var S=o.memoizedState;if(c=S.cache,Ro(o,An,c),c!==m.cache&&ny(o,[An],l,!0),Cu(),c=S.element,m.isDehydrated)if(m={element:c,isDehydrated:!1,cache:S.cache},o.updateQueue.baseState=m,o.memoizedState=m,o.flags&256){o=MC(i,o,c,l);break e}else if(c!==p){p=Vr(Error(r(424)),o),bu(p),o=MC(i,o,c,l);break e}else for(i=o.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,Xt=Xr(i.firstChild),Hn=o,ct=!0,Ao=null,qr=!0,l=kw(o,null,c,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(ka(),c===p){o=Qi(i,o,l);break e}Fn(i,o,c,l)}o=o.child}return o;case 26:return Pd(i,o),i===null?(l=XT(o.type,null,o.pendingProps,null))?o.memoizedState=l:ct||(l=o.type,i=o.pendingProps,c=nh(he.current).createElement(l),c[jn]=o,c[cr]=i,Gn(c,l,i),Ln(c),o.stateNode=c):o.memoizedState=XT(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return Me(o),i===null&&ct&&(c=o.stateNode=GT(o.type,o.pendingProps,he.current),Hn=o,qr=!0,p=Xt,Ho(o.type)?(x0=p,Xt=Xr(c.firstChild)):Xt=p),Fn(i,o,o.pendingProps.children,l),Pd(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&ct&&((p=c=Xt)&&(c=AU(c,o.type,o.pendingProps,qr),c!==null?(o.stateNode=c,Hn=o,Xt=Xr(c.firstChild),qr=!1,p=!0):p=!1),p||ko(o)),Me(o),p=o.type,m=o.pendingProps,S=i!==null?i.memoizedProps:null,c=m.children,g0(p,m)?c=null:S!==null&&g0(p,S)&&(o.flags|=32),o.memoizedState!==null&&(p=my(i,o,H8,null,null,l),qu._currentValue=p),Pd(i,o),Fn(i,o,c,l),o.child;case 6:return i===null&&ct&&((i=l=Xt)&&(l=kU(l,o.pendingProps,qr),l!==null?(o.stateNode=l,Hn=o,Xt=null,i=!0):i=!1),i||ko(o)),null;case 13:return DC(i,o,l);case 4:return Ke(o,o.stateNode.containerInfo),c=o.pendingProps,i===null?o.child=Da(o,null,c,l):Fn(i,o,c,l),o.child;case 11:return CC(i,o,o.type,o.pendingProps,l);case 7:return Fn(i,o,o.pendingProps,l),o.child;case 8:return Fn(i,o,o.pendingProps.children,l),o.child;case 12:return Fn(i,o,o.pendingProps.children,l),o.child;case 10:return c=o.pendingProps,Ro(o,o.type,c.value),Fn(i,o,c.children,l),o.child;case 9:return p=o.type._context,c=o.pendingProps.children,Oa(o),p=Vn(p),c=c(p),o.flags|=1,Fn(i,o,c,l),o.child;case 14:return TC(i,o,o.type,o.pendingProps,l);case 15:return AC(i,o,o.type,o.pendingProps,l);case 19:return zC(i,o,l);case 31:return K8(i,o,l);case 22:return kC(i,o,l,o.pendingProps);case 24:return Oa(o),c=Vn(An),i===null?(p=oy(),p===null&&(p=Vt,m=ry(),p.pooledCache=m,m.refCount++,m!==null&&(p.pooledCacheLanes|=l),p=m),o.memoizedState={parent:c,cache:p},sy(o),Ro(o,An,p)):((i.lanes&l)!==0&&(ly(i,o),Tu(o,null,null,l),Cu()),p=i.memoizedState,m=o.memoizedState,p.parent!==c?(p={parent:c,cache:c},o.memoizedState=p,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=p),Ro(o,An,c)):(c=m.cache,Ro(o,An,c),c!==p.cache&&ny(o,[An],l,!0))),Fn(i,o,o.pendingProps.children,l),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function Ji(i){i.flags|=4}function Vy(i,o,l,c,p){if((o=(i.mode&32)!==0)&&(o=!1),o){if(i.flags|=16777216,(p&335544128)===p)if(i.stateNode.complete)i.flags|=8192;else if(cT())i.flags|=8192;else throw Ma=wd,ay}else i.flags&=-16777217}function $C(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!JT(o))if(cT())i.flags|=8192;else throw Ma=wd,ay}function jd(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?y_():536870912,i.lanes|=o,Zs|=o)}function Iu(i,o){if(!ct)switch(i.tailMode){case"hidden":o=i.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:c.sibling=null}}function Zt(i){var o=i.alternate!==null&&i.alternate.child===i.child,l=0,c=0;if(o)for(var p=i.child;p!==null;)l|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=i,p=p.sibling;else for(p=i.child;p!==null;)l|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=i,p=p.sibling;return i.subtreeFlags|=c,i.childLanes=l,o}function Q8(i,o,l){var c=o.pendingProps;switch(Wg(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(o),null;case 1:return Zt(o),null;case 3:return l=o.stateNode,c=null,i!==null&&(c=i.memoizedState.cache),o.memoizedState.cache!==c&&(o.flags|=2048),Zi(An),Ie(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(i===null||i.child===null)&&(zs(o)?Ji(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Jg())),Zt(o),null;case 26:var p=o.type,m=o.memoizedState;return i===null?(Ji(o),m!==null?(Zt(o),$C(o,m)):(Zt(o),Vy(o,p,null,c,l))):m?m!==i.memoizedState?(Ji(o),Zt(o),$C(o,m)):(Zt(o),o.flags&=-16777217):(i=i.memoizedProps,i!==c&&Ji(o),Zt(o),Vy(o,p,i,c,l)),null;case 27:if(Fe(o),l=he.current,p=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==c&&Ji(o);else{if(!c){if(o.stateNode===null)throw Error(r(166));return Zt(o),null}i=pe.current,zs(o)?yw(o):(i=GT(p,c,l),o.stateNode=i,Ji(o))}return Zt(o),null;case 5:if(Fe(o),p=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==c&&Ji(o);else{if(!c){if(o.stateNode===null)throw Error(r(166));return Zt(o),null}if(m=pe.current,zs(o))yw(o);else{var S=nh(he.current);switch(m){case 1:m=S.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:m=S.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":m=S.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":m=S.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":m=S.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof c.is=="string"?S.createElement("select",{is:c.is}):S.createElement("select"),c.multiple?m.multiple=!0:c.size&&(m.size=c.size);break;default:m=typeof c.is=="string"?S.createElement(p,{is:c.is}):S.createElement(p)}}m[jn]=o,m[cr]=c;e:for(S=o.child;S!==null;){if(S.tag===5||S.tag===6)m.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===o)break e;for(;S.sibling===null;){if(S.return===null||S.return===o)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}o.stateNode=m;e:switch(Gn(m,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Ji(o)}}return Zt(o),Vy(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,l),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==c&&Ji(o);else{if(typeof c!="string"&&o.stateNode===null)throw Error(r(166));if(i=he.current,zs(o)){if(i=o.stateNode,l=o.memoizedProps,c=null,p=Hn,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}i[jn]=o,i=!!(i.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||DT(i.nodeValue,l)),i||ko(o,!0)}else i=nh(i).createTextNode(c),i[jn]=o,o.stateNode=i}return Zt(o),null;case 31:if(l=o.memoizedState,i===null||i.memoizedState!==null){if(c=zs(o),l!==null){if(i===null){if(!c)throw Error(r(318));if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[jn]=o}else ka(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Zt(o),i=!1}else l=Jg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=l),i=!0;if(!i)return o.flags&256?(Rr(o),o):(Rr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return Zt(o),null;case 13:if(c=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(p=zs(o),c!==null&&c.dehydrated!==null){if(i===null){if(!p)throw Error(r(318));if(p=o.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(r(317));p[jn]=o}else ka(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Zt(o),p=!1}else p=Jg(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),p=!0;if(!p)return o.flags&256?(Rr(o),o):(Rr(o),null)}return Rr(o),(o.flags&128)!==0?(o.lanes=l,o):(l=c!==null,i=i!==null&&i.memoizedState!==null,l&&(c=o.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),m=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(m=c.memoizedState.cachePool.pool),m!==p&&(c.flags|=2048)),l!==i&&l&&(o.child.flags|=8192),jd(o,o.updateQueue),Zt(o),null);case 4:return Ie(),i===null&&f0(o.stateNode.containerInfo),Zt(o),null;case 10:return Zi(o.type),Zt(o),null;case 19:if(W(Sn),c=o.memoizedState,c===null)return Zt(o),null;if(p=(o.flags&128)!==0,m=c.rendering,m===null)if(p)Iu(c,!1);else{if(mn!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(m=kd(i),m!==null){for(o.flags|=128,Iu(c,!1),i=m.updateQueue,o.updateQueue=i,jd(o,i),o.subtreeFlags=0,i=l,l=o.child;l!==null;)dw(l,i),l=l.sibling;return I(Sn,Sn.current&1|2),ct&&Yi(o,c.treeForkCount),o.child}i=i.sibling}c.tail!==null&&tt()>qd&&(o.flags|=128,p=!0,Iu(c,!1),o.lanes=4194304)}else{if(!p)if(i=kd(m),i!==null){if(o.flags|=128,p=!0,i=i.updateQueue,o.updateQueue=i,jd(o,i),Iu(c,!0),c.tail===null&&c.tailMode==="hidden"&&!m.alternate&&!ct)return Zt(o),null}else 2*tt()-c.renderingStartTime>qd&&l!==536870912&&(o.flags|=128,p=!0,Iu(c,!1),o.lanes=4194304);c.isBackwards?(m.sibling=o.child,o.child=m):(i=c.last,i!==null?i.sibling=m:o.child=m,c.last=m)}return c.tail!==null?(i=c.tail,c.rendering=i,c.tail=i.sibling,c.renderingStartTime=tt(),i.sibling=null,l=Sn.current,I(Sn,p?l&1|2:l&1),ct&&Yi(o,c.treeForkCount),i):(Zt(o),null);case 22:case 23:return Rr(o),dy(),c=o.memoizedState!==null,i!==null?i.memoizedState!==null!==c&&(o.flags|=8192):c&&(o.flags|=8192),c?(l&536870912)!==0&&(o.flags&128)===0&&(Zt(o),o.subtreeFlags&6&&(o.flags|=8192)):Zt(o),l=o.updateQueue,l!==null&&jd(o,l.retryQueue),l=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),c=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(c=o.memoizedState.cachePool.pool),c!==l&&(o.flags|=2048),i!==null&&W(Na),null;case 24:return l=null,i!==null&&(l=i.memoizedState.cache),o.memoizedState.cache!==l&&(o.flags|=2048),Zi(An),Zt(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function J8(i,o){switch(Wg(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Zi(An),Ie(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return Fe(o),null;case 31:if(o.memoizedState!==null){if(Rr(o),o.alternate===null)throw Error(r(340));ka()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(Rr(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));ka()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return W(Sn),null;case 4:return Ie(),null;case 10:return Zi(o.type),null;case 22:case 23:return Rr(o),dy(),i!==null&&W(Na),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return Zi(An),null;case 25:return null;default:return null}}function PC(i,o){switch(Wg(o),o.tag){case 3:Zi(An),Ie();break;case 26:case 27:case 5:Fe(o);break;case 4:Ie();break;case 31:o.memoizedState!==null&&Rr(o);break;case 13:Rr(o);break;case 19:W(Sn);break;case 10:Zi(o.type);break;case 22:case 23:Rr(o),dy(),i!==null&&W(Na);break;case 24:Zi(An)}}function Mu(i,o){try{var l=o.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var p=c.next;l=p;do{if((l.tag&i)===i){c=void 0;var m=l.create,S=l.inst;c=m(),S.destroy=c}l=l.next}while(l!==p)}}catch(k){Dt(o,o.return,k)}}function Bo(i,o,l){try{var c=o.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var m=p.next;c=m;do{if((c.tag&i)===i){var S=c.inst,k=S.destroy;if(k!==void 0){S.destroy=void 0,p=o;var j=l,J=k;try{J()}catch(ie){Dt(p,j,ie)}}}c=c.next}while(c!==m)}}catch(ie){Dt(o,o.return,ie)}}function UC(i){var o=i.updateQueue;if(o!==null){var l=i.stateNode;try{Ow(o,l)}catch(c){Dt(i,i.return,c)}}}function jC(i,o,l){l.props=za(i.type,i.memoizedProps),l.state=i.memoizedState;try{l.componentWillUnmount()}catch(c){Dt(i,o,c)}}function Du(i,o){try{var l=i.ref;if(l!==null){switch(i.tag){case 26:case 27:case 5:var c=i.stateNode;break;case 30:c=i.stateNode;break;default:c=i.stateNode}typeof l=="function"?i.refCleanup=l(c):l.current=c}}catch(p){Dt(i,o,p)}}function Ri(i,o){var l=i.ref,c=i.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(p){Dt(i,o,p)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(p){Dt(i,o,p)}else l.current=null}function HC(i){var o=i.type,l=i.memoizedProps,c=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break e;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(p){Dt(i,i.return,p)}}function Fy(i,o,l){try{var c=i.stateNode;xU(c,i.type,l,o),c[cr]=o}catch(p){Dt(i,i.return,p)}}function VC(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&Ho(i.type)||i.tag===4}function Gy(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||VC(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&Ho(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function qy(i,o,l){var c=i.tag;if(c===5||c===6)i=i.stateNode,o?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(i,o):(o=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,o.appendChild(i),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=Fi));else if(c!==4&&(c===27&&Ho(i.type)&&(l=i.stateNode,o=null),i=i.child,i!==null))for(qy(i,o,l),i=i.sibling;i!==null;)qy(i,o,l),i=i.sibling}function Hd(i,o,l){var c=i.tag;if(c===5||c===6)i=i.stateNode,o?l.insertBefore(i,o):l.appendChild(i);else if(c!==4&&(c===27&&Ho(i.type)&&(l=i.stateNode),i=i.child,i!==null))for(Hd(i,o,l),i=i.sibling;i!==null;)Hd(i,o,l),i=i.sibling}function FC(i){var o=i.stateNode,l=i.memoizedProps;try{for(var c=i.type,p=o.attributes;p.length;)o.removeAttributeNode(p[0]);Gn(o,c,l),o[jn]=i,o[cr]=l}catch(m){Dt(i,i.return,m)}}var eo=!1,On=!1,Yy=!1,GC=typeof WeakSet=="function"?WeakSet:Set,$n=null;function eU(i,o){if(i=i.containerInfo,p0=uh,i=rw(i),Ug(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var p=c.anchorOffset,m=c.focusNode;c=c.focusOffset;try{l.nodeType,m.nodeType}catch{l=null;break e}var S=0,k=-1,j=-1,J=0,ie=0,le=i,ee=null;t:for(;;){for(var ne;le!==l||p!==0&&le.nodeType!==3||(k=S+p),le!==m||c!==0&&le.nodeType!==3||(j=S+c),le.nodeType===3&&(S+=le.nodeValue.length),(ne=le.firstChild)!==null;)ee=le,le=ne;for(;;){if(le===i)break t;if(ee===l&&++J===p&&(k=S),ee===m&&++ie===c&&(j=S),(ne=le.nextSibling)!==null)break;le=ee,ee=le.parentNode}le=ne}l=k===-1||j===-1?null:{start:k,end:j}}else l=null}l=l||{start:0,end:0}}else l=null;for(m0={focusedElem:i,selectionRange:l},uh=!1,$n=o;$n!==null;)if(o=$n,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,$n=i;else for(;$n!==null;){switch(o=$n,m=o.alternate,i=o.flags,o.tag){case 0:if((i&4)!==0&&(i=o.updateQueue,i=i!==null?i.events:null,i!==null))for(l=0;l<i.length;l++)p=i[l],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&m!==null){i=void 0,l=o,p=m.memoizedProps,m=m.memoizedState,c=l.stateNode;try{var Ce=za(l.type,p);i=c.getSnapshotBeforeUpdate(Ce,m),c.__reactInternalSnapshotBeforeUpdate=i}catch(Pe){Dt(l,l.return,Pe)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,l=i.nodeType,l===9)v0(i);else if(l===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":v0(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=o.sibling,i!==null){i.return=o.return,$n=i;break}$n=o.return}}function qC(i,o,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:no(i,l),c&4&&Mu(5,l);break;case 1:if(no(i,l),c&4)if(i=l.stateNode,o===null)try{i.componentDidMount()}catch(S){Dt(l,l.return,S)}else{var p=za(l.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(p,o,i.__reactInternalSnapshotBeforeUpdate)}catch(S){Dt(l,l.return,S)}}c&64&&UC(l),c&512&&Du(l,l.return);break;case 3:if(no(i,l),c&64&&(i=l.updateQueue,i!==null)){if(o=null,l.child!==null)switch(l.child.tag){case 27:case 5:o=l.child.stateNode;break;case 1:o=l.child.stateNode}try{Ow(i,o)}catch(S){Dt(l,l.return,S)}}break;case 27:o===null&&c&4&&FC(l);case 26:case 5:no(i,l),o===null&&c&4&&HC(l),c&512&&Du(l,l.return);break;case 12:no(i,l);break;case 31:no(i,l),c&4&&ZC(i,l);break;case 13:no(i,l),c&4&&KC(i,l),c&64&&(i=l.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(l=uU.bind(null,l),RU(i,l))));break;case 22:if(c=l.memoizedState!==null||eo,!c){o=o!==null&&o.memoizedState!==null||On,p=eo;var m=On;eo=c,(On=o)&&!m?ro(i,l,(l.subtreeFlags&8772)!==0):no(i,l),eo=p,On=m}break;case 30:break;default:no(i,l)}}function YC(i){var o=i.alternate;o!==null&&(i.alternate=null,YC(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&_g(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var en=null,dr=!1;function to(i,o,l){for(l=l.child;l!==null;)XC(i,o,l),l=l.sibling}function XC(i,o,l){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(hn,l)}catch{}switch(l.tag){case 26:On||Ri(l,o),to(i,o,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:On||Ri(l,o);var c=en,p=dr;Ho(l.type)&&(en=l.stateNode,dr=!1),to(i,o,l),Vu(l.stateNode),en=c,dr=p;break;case 5:On||Ri(l,o);case 6:if(c=en,p=dr,en=null,to(i,o,l),en=c,dr=p,en!==null)if(dr)try{(en.nodeType===9?en.body:en.nodeName==="HTML"?en.ownerDocument.body:en).removeChild(l.stateNode)}catch(m){Dt(l,o,m)}else try{en.removeChild(l.stateNode)}catch(m){Dt(l,o,m)}break;case 18:en!==null&&(dr?(i=en,UT(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,l.stateNode),rl(i)):UT(en,l.stateNode));break;case 4:c=en,p=dr,en=l.stateNode.containerInfo,dr=!0,to(i,o,l),en=c,dr=p;break;case 0:case 11:case 14:case 15:Bo(2,l,o),On||Bo(4,l,o),to(i,o,l);break;case 1:On||(Ri(l,o),c=l.stateNode,typeof c.componentWillUnmount=="function"&&jC(l,o,c)),to(i,o,l);break;case 21:to(i,o,l);break;case 22:On=(c=On)||l.memoizedState!==null,to(i,o,l),On=c;break;default:to(i,o,l)}}function ZC(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{rl(i)}catch(l){Dt(o,o.return,l)}}}function KC(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{rl(i)}catch(l){Dt(o,o.return,l)}}function tU(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new GC),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new GC),o;default:throw Error(r(435,i.tag))}}function Vd(i,o){var l=tU(i);o.forEach(function(c){if(!l.has(c)){l.add(c);var p=cU.bind(null,i,c);c.then(p,p)}})}function hr(i,o){var l=o.deletions;if(l!==null)for(var c=0;c<l.length;c++){var p=l[c],m=i,S=o,k=S;e:for(;k!==null;){switch(k.tag){case 27:if(Ho(k.type)){en=k.stateNode,dr=!1;break e}break;case 5:en=k.stateNode,dr=!1;break e;case 3:case 4:en=k.stateNode.containerInfo,dr=!0;break e}k=k.return}if(en===null)throw Error(r(160));XC(m,S,p),en=null,dr=!1,m=p.alternate,m!==null&&(m.return=null),p.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)WC(o,i),o=o.sibling}var li=null;function WC(i,o){var l=i.alternate,c=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:hr(o,i),pr(i),c&4&&(Bo(3,i,i.return),Mu(3,i),Bo(5,i,i.return));break;case 1:hr(o,i),pr(i),c&512&&(On||l===null||Ri(l,l.return)),c&64&&eo&&(i=i.updateQueue,i!==null&&(c=i.callbacks,c!==null&&(l=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=l===null?c:l.concat(c))));break;case 26:var p=li;if(hr(o,i),pr(i),c&512&&(On||l===null||Ri(l,l.return)),c&4){var m=l!==null?l.memoizedState:null;if(c=i.memoizedState,l===null)if(c===null)if(i.stateNode===null){e:{c=i.type,l=i.memoizedProps,p=p.ownerDocument||p;t:switch(c){case"title":m=p.getElementsByTagName("title")[0],(!m||m[su]||m[jn]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=p.createElement(c),p.head.insertBefore(m,p.querySelector("head > title"))),Gn(m,c,l),m[jn]=i,Ln(m),c=m;break e;case"link":var S=WT("link","href",p).get(c+(l.href||""));if(S){for(var k=0;k<S.length;k++)if(m=S[k],m.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&m.getAttribute("rel")===(l.rel==null?null:l.rel)&&m.getAttribute("title")===(l.title==null?null:l.title)&&m.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){S.splice(k,1);break t}}m=p.createElement(c),Gn(m,c,l),p.head.appendChild(m);break;case"meta":if(S=WT("meta","content",p).get(c+(l.content||""))){for(k=0;k<S.length;k++)if(m=S[k],m.getAttribute("content")===(l.content==null?null:""+l.content)&&m.getAttribute("name")===(l.name==null?null:l.name)&&m.getAttribute("property")===(l.property==null?null:l.property)&&m.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&m.getAttribute("charset")===(l.charSet==null?null:l.charSet)){S.splice(k,1);break t}}m=p.createElement(c),Gn(m,c,l),p.head.appendChild(m);break;default:throw Error(r(468,c))}m[jn]=i,Ln(m),c=m}i.stateNode=c}else QT(p,i.type,i.stateNode);else i.stateNode=KT(p,c,i.memoizedProps);else m!==c?(m===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):m.count--,c===null?QT(p,i.type,i.stateNode):KT(p,c,i.memoizedProps)):c===null&&i.stateNode!==null&&Fy(i,i.memoizedProps,l.memoizedProps)}break;case 27:hr(o,i),pr(i),c&512&&(On||l===null||Ri(l,l.return)),l!==null&&c&4&&Fy(i,i.memoizedProps,l.memoizedProps);break;case 5:if(hr(o,i),pr(i),c&512&&(On||l===null||Ri(l,l.return)),i.flags&32){p=i.stateNode;try{Ts(p,"")}catch(Ce){Dt(i,i.return,Ce)}}c&4&&i.stateNode!=null&&(p=i.memoizedProps,Fy(i,p,l!==null?l.memoizedProps:p)),c&1024&&(Yy=!0);break;case 6:if(hr(o,i),pr(i),c&4){if(i.stateNode===null)throw Error(r(162));c=i.memoizedProps,l=i.stateNode;try{l.nodeValue=c}catch(Ce){Dt(i,i.return,Ce)}}break;case 3:if(oh=null,p=li,li=rh(o.containerInfo),hr(o,i),li=p,pr(i),c&4&&l!==null&&l.memoizedState.isDehydrated)try{rl(o.containerInfo)}catch(Ce){Dt(i,i.return,Ce)}Yy&&(Yy=!1,QC(i));break;case 4:c=li,li=rh(i.stateNode.containerInfo),hr(o,i),pr(i),li=c;break;case 12:hr(o,i),pr(i);break;case 31:hr(o,i),pr(i),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Vd(i,c)));break;case 13:hr(o,i),pr(i),i.child.flags&8192&&i.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Gd=tt()),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Vd(i,c)));break;case 22:p=i.memoizedState!==null;var j=l!==null&&l.memoizedState!==null,J=eo,ie=On;if(eo=J||p,On=ie||j,hr(o,i),On=ie,eo=J,pr(i),c&8192)e:for(o=i.stateNode,o._visibility=p?o._visibility&-2:o._visibility|1,p&&(l===null||j||eo||On||La(i)),l=null,o=i;;){if(o.tag===5||o.tag===26){if(l===null){j=l=o;try{if(m=j.stateNode,p)S=m.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{k=j.stateNode;var le=j.memoizedProps.style,ee=le!=null&&le.hasOwnProperty("display")?le.display:null;k.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(Ce){Dt(j,j.return,Ce)}}}else if(o.tag===6){if(l===null){j=o;try{j.stateNode.nodeValue=p?"":j.memoizedProps}catch(Ce){Dt(j,j.return,Ce)}}}else if(o.tag===18){if(l===null){j=o;try{var ne=j.stateNode;p?jT(ne,!0):jT(j.stateNode,!1)}catch(Ce){Dt(j,j.return,Ce)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;l===o&&(l=null),o=o.return}l===o&&(l=null),o.sibling.return=o.return,o=o.sibling}c&4&&(c=i.updateQueue,c!==null&&(l=c.retryQueue,l!==null&&(c.retryQueue=null,Vd(i,l))));break;case 19:hr(o,i),pr(i),c&4&&(c=i.updateQueue,c!==null&&(i.updateQueue=null,Vd(i,c)));break;case 30:break;case 21:break;default:hr(o,i),pr(i)}}function pr(i){var o=i.flags;if(o&2){try{for(var l,c=i.return;c!==null;){if(VC(c)){l=c;break}c=c.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var p=l.stateNode,m=Gy(i);Hd(i,m,p);break;case 5:var S=l.stateNode;l.flags&32&&(Ts(S,""),l.flags&=-33);var k=Gy(i);Hd(i,k,S);break;case 3:case 4:var j=l.stateNode.containerInfo,J=Gy(i);qy(i,J,j);break;default:throw Error(r(161))}}catch(ie){Dt(i,i.return,ie)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function QC(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;QC(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function no(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)qC(i,o.alternate,o),o=o.sibling}function La(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Bo(4,o,o.return),La(o);break;case 1:Ri(o,o.return);var l=o.stateNode;typeof l.componentWillUnmount=="function"&&jC(o,o.return,l),La(o);break;case 27:Vu(o.stateNode);case 26:case 5:Ri(o,o.return),La(o);break;case 22:o.memoizedState===null&&La(o);break;case 30:La(o);break;default:La(o)}i=i.sibling}}function ro(i,o,l){for(l=l&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var c=o.alternate,p=i,m=o,S=m.flags;switch(m.tag){case 0:case 11:case 15:ro(p,m,l),Mu(4,m);break;case 1:if(ro(p,m,l),c=m,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(J){Dt(c,c.return,J)}if(c=m,p=c.updateQueue,p!==null){var k=c.stateNode;try{var j=p.shared.hiddenCallbacks;if(j!==null)for(p.shared.hiddenCallbacks=null,p=0;p<j.length;p++)Rw(j[p],k)}catch(J){Dt(c,c.return,J)}}l&&S&64&&UC(m),Du(m,m.return);break;case 27:FC(m);case 26:case 5:ro(p,m,l),l&&c===null&&S&4&&HC(m),Du(m,m.return);break;case 12:ro(p,m,l);break;case 31:ro(p,m,l),l&&S&4&&ZC(p,m);break;case 13:ro(p,m,l),l&&S&4&&KC(p,m);break;case 22:m.memoizedState===null&&ro(p,m,l),Du(m,m.return);break;case 30:break;default:ro(p,m,l)}o=o.sibling}}function Xy(i,o){var l=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==l&&(i!=null&&i.refCount++,l!=null&&Su(l))}function Zy(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&Su(i))}function ui(i,o,l,c){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)JC(i,o,l,c),o=o.sibling}function JC(i,o,l,c){var p=o.flags;switch(o.tag){case 0:case 11:case 15:ui(i,o,l,c),p&2048&&Mu(9,o);break;case 1:ui(i,o,l,c);break;case 3:ui(i,o,l,c),p&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&Su(i)));break;case 12:if(p&2048){ui(i,o,l,c),i=o.stateNode;try{var m=o.memoizedProps,S=m.id,k=m.onPostCommit;typeof k=="function"&&k(S,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(j){Dt(o,o.return,j)}}else ui(i,o,l,c);break;case 31:ui(i,o,l,c);break;case 13:ui(i,o,l,c);break;case 23:break;case 22:m=o.stateNode,S=o.alternate,o.memoizedState!==null?m._visibility&2?ui(i,o,l,c):Bu(i,o):m._visibility&2?ui(i,o,l,c):(m._visibility|=2,qs(i,o,l,c,(o.subtreeFlags&10256)!==0||!1)),p&2048&&Xy(S,o);break;case 24:ui(i,o,l,c),p&2048&&Zy(o.alternate,o);break;default:ui(i,o,l,c)}}function qs(i,o,l,c,p){for(p=p&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var m=i,S=o,k=l,j=c,J=S.flags;switch(S.tag){case 0:case 11:case 15:qs(m,S,k,j,p),Mu(8,S);break;case 23:break;case 22:var ie=S.stateNode;S.memoizedState!==null?ie._visibility&2?qs(m,S,k,j,p):Bu(m,S):(ie._visibility|=2,qs(m,S,k,j,p)),p&&J&2048&&Xy(S.alternate,S);break;case 24:qs(m,S,k,j,p),p&&J&2048&&Zy(S.alternate,S);break;default:qs(m,S,k,j,p)}o=o.sibling}}function Bu(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var l=i,c=o,p=c.flags;switch(c.tag){case 22:Bu(l,c),p&2048&&Xy(c.alternate,c);break;case 24:Bu(l,c),p&2048&&Zy(c.alternate,c);break;default:Bu(l,c)}o=o.sibling}}var zu=8192;function Ys(i,o,l){if(i.subtreeFlags&zu)for(i=i.child;i!==null;)eT(i,o,l),i=i.sibling}function eT(i,o,l){switch(i.tag){case 26:Ys(i,o,l),i.flags&zu&&i.memoizedState!==null&&jU(l,li,i.memoizedState,i.memoizedProps);break;case 5:Ys(i,o,l);break;case 3:case 4:var c=li;li=rh(i.stateNode.containerInfo),Ys(i,o,l),li=c;break;case 22:i.memoizedState===null&&(c=i.alternate,c!==null&&c.memoizedState!==null?(c=zu,zu=16777216,Ys(i,o,l),zu=c):Ys(i,o,l));break;default:Ys(i,o,l)}}function tT(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function Lu(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var l=0;l<o.length;l++){var c=o[l];$n=c,rT(c,i)}tT(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)nT(i),i=i.sibling}function nT(i){switch(i.tag){case 0:case 11:case 15:Lu(i),i.flags&2048&&Bo(9,i,i.return);break;case 3:Lu(i);break;case 12:Lu(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,Fd(i)):Lu(i);break;default:Lu(i)}}function Fd(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var l=0;l<o.length;l++){var c=o[l];$n=c,rT(c,i)}tT(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Bo(8,o,o.return),Fd(o);break;case 22:l=o.stateNode,l._visibility&2&&(l._visibility&=-3,Fd(o));break;default:Fd(o)}i=i.sibling}}function rT(i,o){for(;$n!==null;){var l=$n;switch(l.tag){case 0:case 11:case 15:Bo(8,l,o);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:Su(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,$n=c;else e:for(l=i;$n!==null;){c=$n;var p=c.sibling,m=c.return;if(YC(c),c===l){$n=null;break e}if(p!==null){p.return=m,$n=p;break e}$n=m}}}var nU={getCacheForType:function(i){var o=Vn(An),l=o.data.get(i);return l===void 0&&(l=i(),o.data.set(i,l)),l},cacheSignal:function(){return Vn(An).controller.signal}},rU=typeof WeakMap=="function"?WeakMap:Map,St=0,Vt=null,it=null,st=0,Mt=0,Or=null,zo=!1,Xs=!1,Ky=!1,io=0,mn=0,Lo=0,$a=0,Wy=0,Nr=0,Zs=0,$u=null,mr=null,Qy=!1,Gd=0,iT=0,qd=1/0,Yd=null,$o=null,Dn=0,Po=null,Ks=null,oo=0,Jy=0,e0=null,oT=null,Pu=0,t0=null;function Ir(){return(St&2)!==0&&st!==0?st&-st:D.T!==null?s0():x_()}function aT(){if(Nr===0)if((st&536870912)===0||ct){var i=Sa;Sa<<=1,(Sa&3932160)===0&&(Sa=262144),Nr=i}else Nr=536870912;return i=kr.current,i!==null&&(i.flags|=32),Nr}function gr(i,o,l){(i===Vt&&(Mt===2||Mt===9)||i.cancelPendingCommit!==null)&&(Ws(i,0),Uo(i,st,Nr,!1)),au(i,l),((St&2)===0||i!==Vt)&&(i===Vt&&((St&2)===0&&($a|=l),mn===4&&Uo(i,st,Nr,!1)),Oi(i))}function sT(i,o,l){if((St&6)!==0)throw Error(r(327));var c=!l&&(o&127)===0&&(o&i.expiredLanes)===0||ou(i,o),p=c?aU(i,o):r0(i,o,!0),m=c;do{if(p===0){Xs&&!c&&Uo(i,o,0,!1);break}else{if(l=i.current.alternate,m&&!iU(l)){p=r0(i,o,!1),m=!1;continue}if(p===2){if(m=o,i.errorRecoveryDisabledLanes&m)var S=0;else S=i.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){o=S;e:{var k=i;p=$u;var j=k.current.memoizedState.isDehydrated;if(j&&(Ws(k,S).flags|=256),S=r0(k,S,!1),S!==2){if(Ky&&!j){k.errorRecoveryDisabledLanes|=m,$a|=m,p=4;break e}m=mr,mr=p,m!==null&&(mr===null?mr=m:mr.push.apply(mr,m))}p=S}if(m=!1,p!==2)continue}}if(p===1){Ws(i,0),Uo(i,o,0,!0);break}e:{switch(c=i,m=p,m){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:Uo(c,o,Nr,!zo);break e;case 2:mr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(p=Gd+300-tt(),10<p)){if(Uo(c,o,Nr,!zo),rd(c,0,!0)!==0)break e;oo=o,c.timeoutHandle=$T(lT.bind(null,c,l,mr,Yd,Qy,o,Nr,$a,Zs,zo,m,"Throttled",-0,0),p);break e}lT(c,l,mr,Yd,Qy,o,Nr,$a,Zs,zo,m,null,-0,0)}}break}while(!0);Oi(i)}function lT(i,o,l,c,p,m,S,k,j,J,ie,le,ee,ne){if(i.timeoutHandle=-1,le=o.subtreeFlags,le&8192||(le&16785408)===16785408){le={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fi},eT(o,m,le);var Ce=(m&62914560)===m?Gd-tt():(m&4194048)===m?iT-tt():0;if(Ce=HU(le,Ce),Ce!==null){oo=m,i.cancelPendingCommit=Ce(gT.bind(null,i,o,m,l,c,p,S,k,j,ie,le,null,ee,ne)),Uo(i,m,S,!J);return}}gT(i,o,m,l,c,p,S,k,j)}function iU(i){for(var o=i;;){var l=o.tag;if((l===0||l===11||l===15)&&o.flags&16384&&(l=o.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var c=0;c<l.length;c++){var p=l[c],m=p.getSnapshot;p=p.value;try{if(!Tr(m(),p))return!1}catch{return!1}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Uo(i,o,l,c){o&=~Wy,o&=~$a,i.suspendedLanes|=o,i.pingedLanes&=~o,c&&(i.warmLanes|=o),c=i.expirationTimes;for(var p=o;0<p;){var m=31-At(p),S=1<<m;c[m]=-1,p&=~S}l!==0&&v_(i,l,o)}function Xd(){return(St&6)===0?(Uu(0),!1):!0}function n0(){if(it!==null){if(Mt===0)var i=it.return;else i=it,Xi=Ra=null,vy(i),js=null,Eu=0,i=it;for(;i!==null;)PC(i.alternate,i),i=i.return;it=null}}function Ws(i,o){var l=i.timeoutHandle;l!==-1&&(i.timeoutHandle=-1,wU(l)),l=i.cancelPendingCommit,l!==null&&(i.cancelPendingCommit=null,l()),oo=0,n0(),Vt=i,it=l=qi(i.current,null),st=o,Mt=0,Or=null,zo=!1,Xs=ou(i,o),Ky=!1,Zs=Nr=Wy=$a=Lo=mn=0,mr=$u=null,Qy=!1,(o&8)!==0&&(o|=o&32);var c=i.entangledLanes;if(c!==0)for(i=i.entanglements,c&=o;0<c;){var p=31-At(c),m=1<<p;o|=i[p],c&=~m}return io=o,md(),l}function uT(i,o){Ye=null,D.H=Ou,o===Us||o===_d?(o=Cw(),Mt=3):o===ay?(o=Cw(),Mt=4):Mt=o===Dy?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Or=o,it===null&&(mn=1,Ld(i,Vr(o,i.current)))}function cT(){var i=kr.current;return i===null?!0:(st&4194048)===st?Yr===null:(st&62914560)===st||(st&536870912)!==0?i===Yr:!1}function fT(){var i=D.H;return D.H=Ou,i===null?Ou:i}function dT(){var i=D.A;return D.A=nU,i}function Zd(){mn=4,zo||(st&4194048)!==st&&kr.current!==null||(Xs=!0),(Lo&134217727)===0&&($a&134217727)===0||Vt===null||Uo(Vt,st,Nr,!1)}function r0(i,o,l){var c=St;St|=2;var p=fT(),m=dT();(Vt!==i||st!==o)&&(Yd=null,Ws(i,o)),o=!1;var S=mn;e:do try{if(Mt!==0&&it!==null){var k=it,j=Or;switch(Mt){case 8:n0(),S=6;break e;case 3:case 2:case 9:case 6:kr.current===null&&(o=!0);var J=Mt;if(Mt=0,Or=null,Qs(i,k,j,J),l&&Xs){S=0;break e}break;default:J=Mt,Mt=0,Or=null,Qs(i,k,j,J)}}oU(),S=mn;break}catch(ie){uT(i,ie)}while(!0);return o&&i.shellSuspendCounter++,Xi=Ra=null,St=c,D.H=p,D.A=m,it===null&&(Vt=null,st=0,md()),S}function oU(){for(;it!==null;)hT(it)}function aU(i,o){var l=St;St|=2;var c=fT(),p=dT();Vt!==i||st!==o?(Yd=null,qd=tt()+500,Ws(i,o)):Xs=ou(i,o);e:do try{if(Mt!==0&&it!==null){o=it;var m=Or;t:switch(Mt){case 1:Mt=0,Or=null,Qs(i,o,m,1);break;case 2:case 9:if(_w(m)){Mt=0,Or=null,pT(o);break}o=function(){Mt!==2&&Mt!==9||Vt!==i||(Mt=7),Oi(i)},m.then(o,o);break e;case 3:Mt=7;break e;case 4:Mt=5;break e;case 7:_w(m)?(Mt=0,Or=null,pT(o)):(Mt=0,Or=null,Qs(i,o,m,7));break;case 5:var S=null;switch(it.tag){case 26:S=it.memoizedState;case 5:case 27:var k=it;if(S?JT(S):k.stateNode.complete){Mt=0,Or=null;var j=k.sibling;if(j!==null)it=j;else{var J=k.return;J!==null?(it=J,Kd(J)):it=null}break t}}Mt=0,Or=null,Qs(i,o,m,5);break;case 6:Mt=0,Or=null,Qs(i,o,m,6);break;case 8:n0(),mn=6;break e;default:throw Error(r(462))}}sU();break}catch(ie){uT(i,ie)}while(!0);return Xi=Ra=null,D.H=c,D.A=p,St=l,it!==null?0:(Vt=null,st=0,md(),mn)}function sU(){for(;it!==null&&!Re();)hT(it)}function hT(i){var o=LC(i.alternate,i,io);i.memoizedProps=i.pendingProps,o===null?Kd(i):it=o}function pT(i){var o=i,l=o.alternate;switch(o.tag){case 15:case 0:o=NC(l,o,o.pendingProps,o.type,void 0,st);break;case 11:o=NC(l,o,o.pendingProps,o.type.render,o.ref,st);break;case 5:vy(o);default:PC(l,o),o=it=dw(o,io),o=LC(l,o,io)}i.memoizedProps=i.pendingProps,o===null?Kd(i):it=o}function Qs(i,o,l,c){Xi=Ra=null,vy(o),js=null,Eu=0;var p=o.return;try{if(Z8(i,p,o,l,st)){mn=1,Ld(i,Vr(l,i.current)),it=null;return}}catch(m){if(p!==null)throw it=p,m;mn=1,Ld(i,Vr(l,i.current)),it=null;return}o.flags&32768?(ct||c===1?i=!0:Xs||(st&536870912)!==0?i=!1:(zo=i=!0,(c===2||c===9||c===3||c===6)&&(c=kr.current,c!==null&&c.tag===13&&(c.flags|=16384))),mT(o,i)):Kd(o)}function Kd(i){var o=i;do{if((o.flags&32768)!==0){mT(o,zo);return}i=o.return;var l=Q8(o.alternate,o,io);if(l!==null){it=l;return}if(o=o.sibling,o!==null){it=o;return}it=o=i}while(o!==null);mn===0&&(mn=5)}function mT(i,o){do{var l=J8(i.alternate,i);if(l!==null){l.flags&=32767,it=l;return}if(l=i.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!o&&(i=i.sibling,i!==null)){it=i;return}it=i=l}while(i!==null);mn=6,it=null}function gT(i,o,l,c,p,m,S,k,j){i.cancelPendingCommit=null;do Wd();while(Dn!==0);if((St&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(m=o.lanes|o.childLanes,m|=Gg,UP(i,l,m,S,k,j),i===Vt&&(it=Vt=null,st=0),Ks=o,Po=i,oo=l,Jy=m,e0=p,oT=c,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,fU(we,function(){return xT(),null})):(i.callbackNode=null,i.callbackPriority=0),c=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||c){c=D.T,D.T=null,p=Z.p,Z.p=2,S=St,St|=4;try{eU(i,o,l)}finally{St=S,Z.p=p,D.T=c}}Dn=1,yT(),vT(),bT()}}function yT(){if(Dn===1){Dn=0;var i=Po,o=Ks,l=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var c=Z.p;Z.p=2;var p=St;St|=4;try{WC(o,i);var m=m0,S=rw(i.containerInfo),k=m.focusedElem,j=m.selectionRange;if(S!==k&&k&&k.ownerDocument&&nw(k.ownerDocument.documentElement,k)){if(j!==null&&Ug(k)){var J=j.start,ie=j.end;if(ie===void 0&&(ie=J),"selectionStart"in k)k.selectionStart=J,k.selectionEnd=Math.min(ie,k.value.length);else{var le=k.ownerDocument||document,ee=le&&le.defaultView||window;if(ee.getSelection){var ne=ee.getSelection(),Ce=k.textContent.length,Pe=Math.min(j.start,Ce),jt=j.end===void 0?Pe:Math.min(j.end,Ce);!ne.extend&&Pe>jt&&(S=jt,jt=Pe,Pe=S);var Y=tw(k,Pe),F=tw(k,jt);if(Y&&F&&(ne.rangeCount!==1||ne.anchorNode!==Y.node||ne.anchorOffset!==Y.offset||ne.focusNode!==F.node||ne.focusOffset!==F.offset)){var Q=le.createRange();Q.setStart(Y.node,Y.offset),ne.removeAllRanges(),Pe>jt?(ne.addRange(Q),ne.extend(F.node,F.offset)):(Q.setEnd(F.node,F.offset),ne.addRange(Q))}}}}for(le=[],ne=k;ne=ne.parentNode;)ne.nodeType===1&&le.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<le.length;k++){var oe=le[k];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}uh=!!p0,m0=p0=null}finally{St=p,Z.p=c,D.T=l}}i.current=o,Dn=2}}function vT(){if(Dn===2){Dn=0;var i=Po,o=Ks,l=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var c=Z.p;Z.p=2;var p=St;St|=4;try{qC(i,o.alternate,o)}finally{St=p,Z.p=c,D.T=l}}Dn=3}}function bT(){if(Dn===4||Dn===3){Dn=0,Cr();var i=Po,o=Ks,l=oo,c=oT;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Dn=5:(Dn=0,Ks=Po=null,ST(i,i.pendingLanes));var p=i.pendingLanes;if(p===0&&($o=null),xg(l),o=o.stateNode,sn&&typeof sn.onCommitFiberRoot=="function")try{sn.onCommitFiberRoot(hn,o,void 0,(o.current.flags&128)===128)}catch{}if(c!==null){o=D.T,p=Z.p,Z.p=2,D.T=null;try{for(var m=i.onRecoverableError,S=0;S<c.length;S++){var k=c[S];m(k.value,{componentStack:k.stack})}}finally{D.T=o,Z.p=p}}(oo&3)!==0&&Wd(),Oi(i),p=i.pendingLanes,(l&261930)!==0&&(p&42)!==0?i===t0?Pu++:(Pu=0,t0=i):Pu=0,Uu(0)}}function ST(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,Su(o)))}function Wd(){return yT(),vT(),bT(),xT()}function xT(){if(Dn!==5)return!1;var i=Po,o=Jy;Jy=0;var l=xg(oo),c=D.T,p=Z.p;try{Z.p=32>l?32:l,D.T=null,l=e0,e0=null;var m=Po,S=oo;if(Dn=0,Ks=Po=null,oo=0,(St&6)!==0)throw Error(r(331));var k=St;if(St|=4,nT(m.current),JC(m,m.current,S,l),St=k,Uu(0,!1),sn&&typeof sn.onPostCommitFiberRoot=="function")try{sn.onPostCommitFiberRoot(hn,m)}catch{}return!0}finally{Z.p=p,D.T=c,ST(i,o)}}function ET(i,o,l){o=Vr(l,o),o=My(i.stateNode,o,2),i=Io(i,o,2),i!==null&&(au(i,2),Oi(i))}function Dt(i,o,l){if(i.tag===3)ET(i,i,l);else for(;o!==null;){if(o.tag===3){ET(o,i,l);break}else if(o.tag===1){var c=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&($o===null||!$o.has(c))){i=Vr(l,i),l=_C(2),c=Io(o,l,2),c!==null&&(wC(l,c,o,i),au(c,2),Oi(c));break}}o=o.return}}function i0(i,o,l){var c=i.pingCache;if(c===null){c=i.pingCache=new rU;var p=new Set;c.set(o,p)}else p=c.get(o),p===void 0&&(p=new Set,c.set(o,p));p.has(l)||(Ky=!0,p.add(l),i=lU.bind(null,i,o,l),o.then(i,i))}function lU(i,o,l){var c=i.pingCache;c!==null&&c.delete(o),i.pingedLanes|=i.suspendedLanes&l,i.warmLanes&=~l,Vt===i&&(st&l)===l&&(mn===4||mn===3&&(st&62914560)===st&&300>tt()-Gd?(St&2)===0&&Ws(i,0):Wy|=l,Zs===st&&(Zs=0)),Oi(i)}function _T(i,o){o===0&&(o=y_()),i=Ta(i,o),i!==null&&(au(i,o),Oi(i))}function uU(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),_T(i,l)}function cU(i,o){var l=0;switch(i.tag){case 31:case 13:var c=i.stateNode,p=i.memoizedState;p!==null&&(l=p.retryLane);break;case 19:c=i.stateNode;break;case 22:c=i.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(o),_T(i,l)}function fU(i,o){return an(i,o)}var Qd=null,Js=null,o0=!1,Jd=!1,a0=!1,jo=0;function Oi(i){i!==Js&&i.next===null&&(Js===null?Qd=Js=i:Js=Js.next=i),Jd=!0,o0||(o0=!0,hU())}function Uu(i,o){if(!a0&&Jd){a0=!0;do for(var l=!1,c=Qd;c!==null;){if(i!==0){var p=c.pendingLanes;if(p===0)var m=0;else{var S=c.suspendedLanes,k=c.pingedLanes;m=(1<<31-At(42|i)+1)-1,m&=p&~(S&~k),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(l=!0,AT(c,m))}else m=st,m=rd(c,c===Vt?m:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(m&3)===0||ou(c,m)||(l=!0,AT(c,m));c=c.next}while(l);a0=!1}}function dU(){wT()}function wT(){Jd=o0=!1;var i=0;jo!==0&&_U()&&(i=jo);for(var o=tt(),l=null,c=Qd;c!==null;){var p=c.next,m=CT(c,o);m===0?(c.next=null,l===null?Qd=p:l.next=p,p===null&&(Js=l)):(l=c,(i!==0||(m&3)!==0)&&(Jd=!0)),c=p}Dn!==0&&Dn!==5||Uu(i),jo!==0&&(jo=0)}function CT(i,o){for(var l=i.suspendedLanes,c=i.pingedLanes,p=i.expirationTimes,m=i.pendingLanes&-62914561;0<m;){var S=31-At(m),k=1<<S,j=p[S];j===-1?((k&l)===0||(k&c)!==0)&&(p[S]=PP(k,o)):j<=o&&(i.expiredLanes|=k),m&=~k}if(o=Vt,l=st,l=rd(i,i===o?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),c=i.callbackNode,l===0||i===o&&(Mt===2||Mt===9)||i.cancelPendingCommit!==null)return c!==null&&c!==null&&It(c),i.callbackNode=null,i.callbackPriority=0;if((l&3)===0||ou(i,l)){if(o=l&-l,o===i.callbackPriority)return o;switch(c!==null&&It(c),xg(l)){case 2:case 8:l=ce;break;case 32:l=we;break;case 268435456:l=We;break;default:l=we}return c=TT.bind(null,i),l=an(l,c),i.callbackPriority=o,i.callbackNode=l,o}return c!==null&&c!==null&&It(c),i.callbackPriority=2,i.callbackNode=null,2}function TT(i,o){if(Dn!==0&&Dn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var l=i.callbackNode;if(Wd()&&i.callbackNode!==l)return null;var c=st;return c=rd(i,i===Vt?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),c===0?null:(sT(i,c,o),CT(i,tt()),i.callbackNode!=null&&i.callbackNode===l?TT.bind(null,i):null)}function AT(i,o){if(Wd())return null;sT(i,o,!0)}function hU(){CU(function(){(St&6)!==0?an(te,dU):wT()})}function s0(){if(jo===0){var i=$s;i===0&&(i=ai,ai<<=1,(ai&261888)===0&&(ai=256)),jo=i}return jo}function kT(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:sd(""+i)}function RT(i,o){var l=o.ownerDocument.createElement("input");return l.name=o.name,l.value=o.value,i.id&&l.setAttribute("form",i.id),o.parentNode.insertBefore(l,o),i=new FormData(i),l.parentNode.removeChild(l),i}function pU(i,o,l,c,p){if(o==="submit"&&l&&l.stateNode===p){var m=kT((p[cr]||null).action),S=c.submitter;S&&(o=(o=S[cr]||null)?kT(o.formAction):S.getAttribute("formAction"),o!==null&&(m=o,S=null));var k=new fd("action","action",null,c,p);i.push({event:k,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(jo!==0){var j=S?RT(p,S):new FormData(p);Ay(l,{pending:!0,data:j,method:p.method,action:m},null,j)}}else typeof m=="function"&&(k.preventDefault(),j=S?RT(p,S):new FormData(p),Ay(l,{pending:!0,data:j,method:p.method,action:m},m,j))},currentTarget:p}]})}}for(var l0=0;l0<Fg.length;l0++){var u0=Fg[l0],mU=u0.toLowerCase(),gU=u0[0].toUpperCase()+u0.slice(1);si(mU,"on"+gU)}si(aw,"onAnimationEnd"),si(sw,"onAnimationIteration"),si(lw,"onAnimationStart"),si("dblclick","onDoubleClick"),si("focusin","onFocus"),si("focusout","onBlur"),si(I8,"onTransitionRun"),si(M8,"onTransitionStart"),si(D8,"onTransitionCancel"),si(uw,"onTransitionEnd"),ws("onMouseEnter",["mouseout","mouseover"]),ws("onMouseLeave",["mouseout","mouseover"]),ws("onPointerEnter",["pointerout","pointerover"]),ws("onPointerLeave",["pointerout","pointerover"]),Ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ju="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(" "),yU=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ju));function OT(i,o){o=(o&4)!==0;for(var l=0;l<i.length;l++){var c=i[l],p=c.event;c=c.listeners;e:{var m=void 0;if(o)for(var S=c.length-1;0<=S;S--){var k=c[S],j=k.instance,J=k.currentTarget;if(k=k.listener,j!==m&&p.isPropagationStopped())break e;m=k,p.currentTarget=J;try{m(p)}catch(ie){pd(ie)}p.currentTarget=null,m=j}else for(S=0;S<c.length;S++){if(k=c[S],j=k.instance,J=k.currentTarget,k=k.listener,j!==m&&p.isPropagationStopped())break e;m=k,p.currentTarget=J;try{m(p)}catch(ie){pd(ie)}p.currentTarget=null,m=j}}}}function ot(i,o){var l=o[Eg];l===void 0&&(l=o[Eg]=new Set);var c=i+"__bubble";l.has(c)||(NT(o,i,2,!1),l.add(c))}function c0(i,o,l){var c=0;o&&(c|=4),NT(l,i,c,o)}var eh="_reactListening"+Math.random().toString(36).slice(2);function f0(i){if(!i[eh]){i[eh]=!0,w_.forEach(function(l){l!=="selectionchange"&&(yU.has(l)||c0(l,!1,i),c0(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[eh]||(o[eh]=!0,c0("selectionchange",!1,o))}}function NT(i,o,l,c){switch(a2(o)){case 2:var p=GU;break;case 8:p=qU;break;default:p=T0}l=p.bind(null,o,l,i),p=void 0,!Ng||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(p=!0),c?p!==void 0?i.addEventListener(o,l,{capture:!0,passive:p}):i.addEventListener(o,l,!0):p!==void 0?i.addEventListener(o,l,{passive:p}):i.addEventListener(o,l,!1)}function d0(i,o,l,c,p){var m=c;if((o&1)===0&&(o&2)===0&&c!==null)e:for(;;){if(c===null)return;var S=c.tag;if(S===3||S===4){var k=c.stateNode.containerInfo;if(k===p)break;if(S===4)for(S=c.return;S!==null;){var j=S.tag;if((j===3||j===4)&&S.stateNode.containerInfo===p)return;S=S.return}for(;k!==null;){if(S=xs(k),S===null)return;if(j=S.tag,j===5||j===6||j===26||j===27){c=m=S;continue e}k=k.parentNode}}c=c.return}z_(function(){var J=m,ie=Rg(l),le=[];e:{var ee=cw.get(i);if(ee!==void 0){var ne=fd,Ce=i;switch(i){case"keypress":if(ud(l)===0)break e;case"keydown":case"keyup":ne=c8;break;case"focusin":Ce="focus",ne=Bg;break;case"focusout":Ce="blur",ne=Bg;break;case"beforeblur":case"afterblur":ne=Bg;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=P_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=QP;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=h8;break;case aw:case sw:case lw:ne=t8;break;case uw:ne=m8;break;case"scroll":case"scrollend":ne=KP;break;case"wheel":ne=y8;break;case"copy":case"cut":case"paste":ne=r8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=j_;break;case"toggle":case"beforetoggle":ne=b8}var Pe=(o&4)!==0,jt=!Pe&&(i==="scroll"||i==="scrollend"),Y=Pe?ee!==null?ee+"Capture":null:ee;Pe=[];for(var F=J,Q;F!==null;){var oe=F;if(Q=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||Q===null||Y===null||(oe=uu(F,Y),oe!=null&&Pe.push(Hu(F,oe,Q))),jt)break;F=F.return}0<Pe.length&&(ee=new ne(ee,Ce,null,l,ie),le.push({event:ee,listeners:Pe}))}}if((o&7)===0){e:{if(ee=i==="mouseover"||i==="pointerover",ne=i==="mouseout"||i==="pointerout",ee&&l!==kg&&(Ce=l.relatedTarget||l.fromElement)&&(xs(Ce)||Ce[Ss]))break e;if((ne||ee)&&(ee=ie.window===ie?ie:(ee=ie.ownerDocument)?ee.defaultView||ee.parentWindow:window,ne?(Ce=l.relatedTarget||l.toElement,ne=J,Ce=Ce?xs(Ce):null,Ce!==null&&(jt=s(Ce),Pe=Ce.tag,Ce!==jt||Pe!==5&&Pe!==27&&Pe!==6)&&(Ce=null)):(ne=null,Ce=J),ne!==Ce)){if(Pe=P_,oe="onMouseLeave",Y="onMouseEnter",F="mouse",(i==="pointerout"||i==="pointerover")&&(Pe=j_,oe="onPointerLeave",Y="onPointerEnter",F="pointer"),jt=ne==null?ee:lu(ne),Q=Ce==null?ee:lu(Ce),ee=new Pe(oe,F+"leave",ne,l,ie),ee.target=jt,ee.relatedTarget=Q,oe=null,xs(ie)===J&&(Pe=new Pe(Y,F+"enter",Ce,l,ie),Pe.target=Q,Pe.relatedTarget=jt,oe=Pe),jt=oe,ne&&Ce)t:{for(Pe=vU,Y=ne,F=Ce,Q=0,oe=Y;oe;oe=Pe(oe))Q++;oe=0;for(var Le=F;Le;Le=Pe(Le))oe++;for(;0<Q-oe;)Y=Pe(Y),Q--;for(;0<oe-Q;)F=Pe(F),oe--;for(;Q--;){if(Y===F||F!==null&&Y===F.alternate){Pe=Y;break t}Y=Pe(Y),F=Pe(F)}Pe=null}else Pe=null;ne!==null&&IT(le,ee,ne,Pe,!1),Ce!==null&&jt!==null&&IT(le,jt,Ce,Pe,!0)}}e:{if(ee=J?lu(J):window,ne=ee.nodeName&&ee.nodeName.toLowerCase(),ne==="select"||ne==="input"&&ee.type==="file")var mt=Z_;else if(Y_(ee))if(K_)mt=R8;else{mt=A8;var Ae=T8}else ne=ee.nodeName,!ne||ne.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?J&&Ag(J.elementType)&&(mt=Z_):mt=k8;if(mt&&(mt=mt(i,J))){X_(le,mt,l,ie);break e}Ae&&Ae(i,ee,J),i==="focusout"&&J&&ee.type==="number"&&J.memoizedProps.value!=null&&Tg(ee,"number",ee.value)}switch(Ae=J?lu(J):window,i){case"focusin":(Y_(Ae)||Ae.contentEditable==="true")&&(Os=Ae,jg=J,yu=null);break;case"focusout":yu=jg=Os=null;break;case"mousedown":Hg=!0;break;case"contextmenu":case"mouseup":case"dragend":Hg=!1,iw(le,l,ie);break;case"selectionchange":if(N8)break;case"keydown":case"keyup":iw(le,l,ie)}var Qe;if(Lg)e:{switch(i){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else Rs?G_(i,l)&&(lt="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(lt="onCompositionStart");lt&&(H_&&l.locale!=="ko"&&(Rs||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&Rs&&(Qe=L_()):(Co=ie,Ig="value"in Co?Co.value:Co.textContent,Rs=!0)),Ae=th(J,lt),0<Ae.length&&(lt=new U_(lt,i,null,l,ie),le.push({event:lt,listeners:Ae}),Qe?lt.data=Qe:(Qe=q_(l),Qe!==null&&(lt.data=Qe)))),(Qe=x8?E8(i,l):_8(i,l))&&(lt=th(J,"onBeforeInput"),0<lt.length&&(Ae=new U_("onBeforeInput","beforeinput",null,l,ie),le.push({event:Ae,listeners:lt}),Ae.data=Qe)),pU(le,i,J,l,ie)}OT(le,o)})}function Hu(i,o,l){return{instance:i,listener:o,currentTarget:l}}function th(i,o){for(var l=o+"Capture",c=[];i!==null;){var p=i,m=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||m===null||(p=uu(i,l),p!=null&&c.unshift(Hu(i,p,m)),p=uu(i,o),p!=null&&c.push(Hu(i,p,m))),i.tag===3)return c;i=i.return}return[]}function vU(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function IT(i,o,l,c,p){for(var m=o._reactName,S=[];l!==null&&l!==c;){var k=l,j=k.alternate,J=k.stateNode;if(k=k.tag,j!==null&&j===c)break;k!==5&&k!==26&&k!==27||J===null||(j=J,p?(J=uu(l,m),J!=null&&S.unshift(Hu(l,J,j))):p||(J=uu(l,m),J!=null&&S.push(Hu(l,J,j)))),l=l.return}S.length!==0&&i.push({event:o,listeners:S})}var bU=/\r\n?/g,SU=/\u0000|\uFFFD/g;function MT(i){return(typeof i=="string"?i:""+i).replace(bU,`
|
|
9
|
+
`).replace(SU,"")}function DT(i,o){return o=MT(o),MT(i)===o}function Ut(i,o,l,c,p,m){switch(l){case"children":typeof c=="string"?o==="body"||o==="textarea"&&c===""||Ts(i,c):(typeof c=="number"||typeof c=="bigint")&&o!=="body"&&Ts(i,""+c);break;case"className":od(i,"class",c);break;case"tabIndex":od(i,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":od(i,l,c);break;case"style":D_(i,c,m);break;case"data":if(o!=="object"){od(i,"data",c);break}case"src":case"href":if(c===""&&(o!=="a"||l!=="href")){i.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){i.removeAttribute(l);break}c=sd(""+c),i.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="function"){i.setAttribute(l,"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 m=="function"&&(l==="formAction"?(o!=="input"&&Ut(i,o,"name",p.name,p,null),Ut(i,o,"formEncType",p.formEncType,p,null),Ut(i,o,"formMethod",p.formMethod,p,null),Ut(i,o,"formTarget",p.formTarget,p,null)):(Ut(i,o,"encType",p.encType,p,null),Ut(i,o,"method",p.method,p,null),Ut(i,o,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){i.removeAttribute(l);break}c=sd(""+c),i.setAttribute(l,c);break;case"onClick":c!=null&&(i.onclick=Fi);break;case"onScroll":c!=null&&ot("scroll",i);break;case"onScrollEnd":c!=null&&ot("scrollend",i);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(l=c.__html,l!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=l}}break;case"multiple":i.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":i.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){i.removeAttribute("xlink:href");break}l=sd(""+c),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(l,""+c):i.removeAttribute(l);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":c&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(l,""):i.removeAttribute(l);break;case"capture":case"download":c===!0?i.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?i.setAttribute(l,c):i.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?i.setAttribute(l,c):i.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?i.removeAttribute(l):i.setAttribute(l,c);break;case"popover":ot("beforetoggle",i),ot("toggle",i),id(i,"popover",c);break;case"xlinkActuate":Vi(i,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Vi(i,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Vi(i,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Vi(i,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Vi(i,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Vi(i,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Vi(i,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Vi(i,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Vi(i,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":id(i,"is",c);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=XP.get(l)||l,id(i,l,c))}}function h0(i,o,l,c,p,m){switch(l){case"style":D_(i,c,m);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(l=c.__html,l!=null){if(p.children!=null)throw Error(r(60));i.innerHTML=l}}break;case"children":typeof c=="string"?Ts(i,c):(typeof c=="number"||typeof c=="bigint")&&Ts(i,""+c);break;case"onScroll":c!=null&&ot("scroll",i);break;case"onScrollEnd":c!=null&&ot("scrollend",i);break;case"onClick":c!=null&&(i.onclick=Fi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!C_.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(p=l.endsWith("Capture"),o=l.slice(2,p?l.length-7:void 0),m=i[cr]||null,m=m!=null?m[l]:null,typeof m=="function"&&i.removeEventListener(o,m,p),typeof c=="function")){typeof m!="function"&&m!==null&&(l in i?i[l]=null:i.hasAttribute(l)&&i.removeAttribute(l)),i.addEventListener(o,c,p);break e}l in i?i[l]=c:c===!0?i.setAttribute(l,""):id(i,l,c)}}}function Gn(i,o,l){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ot("error",i),ot("load",i);var c=!1,p=!1,m;for(m in l)if(l.hasOwnProperty(m)){var S=l[m];if(S!=null)switch(m){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:Ut(i,o,m,S,l,null)}}p&&Ut(i,o,"srcSet",l.srcSet,l,null),c&&Ut(i,o,"src",l.src,l,null);return;case"input":ot("invalid",i);var k=m=S=p=null,j=null,J=null;for(c in l)if(l.hasOwnProperty(c)){var ie=l[c];if(ie!=null)switch(c){case"name":p=ie;break;case"type":S=ie;break;case"checked":j=ie;break;case"defaultChecked":J=ie;break;case"value":m=ie;break;case"defaultValue":k=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(r(137,o));break;default:Ut(i,o,c,ie,l,null)}}O_(i,m,k,j,J,S,p,!1);return;case"select":ot("invalid",i),c=S=m=null;for(p in l)if(l.hasOwnProperty(p)&&(k=l[p],k!=null))switch(p){case"value":m=k;break;case"defaultValue":S=k;break;case"multiple":c=k;default:Ut(i,o,p,k,l,null)}o=m,l=S,i.multiple=!!c,o!=null?Cs(i,!!c,o,!1):l!=null&&Cs(i,!!c,l,!0);return;case"textarea":ot("invalid",i),m=p=c=null;for(S in l)if(l.hasOwnProperty(S)&&(k=l[S],k!=null))switch(S){case"value":c=k;break;case"defaultValue":p=k;break;case"children":m=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:Ut(i,o,S,k,l,null)}I_(i,c,p,m);return;case"option":for(j in l)l.hasOwnProperty(j)&&(c=l[j],c!=null)&&(j==="selected"?i.selected=c&&typeof c!="function"&&typeof c!="symbol":Ut(i,o,j,c,l,null));return;case"dialog":ot("beforetoggle",i),ot("toggle",i),ot("cancel",i),ot("close",i);break;case"iframe":case"object":ot("load",i);break;case"video":case"audio":for(c=0;c<ju.length;c++)ot(ju[c],i);break;case"image":ot("error",i),ot("load",i);break;case"details":ot("toggle",i);break;case"embed":case"source":case"link":ot("error",i),ot("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(J in l)if(l.hasOwnProperty(J)&&(c=l[J],c!=null))switch(J){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:Ut(i,o,J,c,l,null)}return;default:if(Ag(o)){for(ie in l)l.hasOwnProperty(ie)&&(c=l[ie],c!==void 0&&h0(i,o,ie,c,l,void 0));return}}for(k in l)l.hasOwnProperty(k)&&(c=l[k],c!=null&&Ut(i,o,k,c,l,null))}function xU(i,o,l,c){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,m=null,S=null,k=null,j=null,J=null,ie=null;for(ne in l){var le=l[ne];if(l.hasOwnProperty(ne)&&le!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":j=le;default:c.hasOwnProperty(ne)||Ut(i,o,ne,null,c,le)}}for(var ee in c){var ne=c[ee];if(le=l[ee],c.hasOwnProperty(ee)&&(ne!=null||le!=null))switch(ee){case"type":m=ne;break;case"name":p=ne;break;case"checked":J=ne;break;case"defaultChecked":ie=ne;break;case"value":S=ne;break;case"defaultValue":k=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,o));break;default:ne!==le&&Ut(i,o,ee,ne,c,le)}}Cg(i,S,k,j,J,ie,m,p);return;case"select":ne=S=k=ee=null;for(m in l)if(j=l[m],l.hasOwnProperty(m)&&j!=null)switch(m){case"value":break;case"multiple":ne=j;default:c.hasOwnProperty(m)||Ut(i,o,m,null,c,j)}for(p in c)if(m=c[p],j=l[p],c.hasOwnProperty(p)&&(m!=null||j!=null))switch(p){case"value":ee=m;break;case"defaultValue":k=m;break;case"multiple":S=m;default:m!==j&&Ut(i,o,p,m,c,j)}o=k,l=S,c=ne,ee!=null?Cs(i,!!l,ee,!1):!!c!=!!l&&(o!=null?Cs(i,!!l,o,!0):Cs(i,!!l,l?[]:"",!1));return;case"textarea":ne=ee=null;for(k in l)if(p=l[k],l.hasOwnProperty(k)&&p!=null&&!c.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:Ut(i,o,k,null,c,p)}for(S in c)if(p=c[S],m=l[S],c.hasOwnProperty(S)&&(p!=null||m!=null))switch(S){case"value":ee=p;break;case"defaultValue":ne=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(r(91));break;default:p!==m&&Ut(i,o,S,p,c,m)}N_(i,ee,ne);return;case"option":for(var Ce in l)ee=l[Ce],l.hasOwnProperty(Ce)&&ee!=null&&!c.hasOwnProperty(Ce)&&(Ce==="selected"?i.selected=!1:Ut(i,o,Ce,null,c,ee));for(j in c)ee=c[j],ne=l[j],c.hasOwnProperty(j)&&ee!==ne&&(ee!=null||ne!=null)&&(j==="selected"?i.selected=ee&&typeof ee!="function"&&typeof ee!="symbol":Ut(i,o,j,ee,c,ne));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 Pe in l)ee=l[Pe],l.hasOwnProperty(Pe)&&ee!=null&&!c.hasOwnProperty(Pe)&&Ut(i,o,Pe,null,c,ee);for(J in c)if(ee=c[J],ne=l[J],c.hasOwnProperty(J)&&ee!==ne&&(ee!=null||ne!=null))switch(J){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,o));break;default:Ut(i,o,J,ee,c,ne)}return;default:if(Ag(o)){for(var jt in l)ee=l[jt],l.hasOwnProperty(jt)&&ee!==void 0&&!c.hasOwnProperty(jt)&&h0(i,o,jt,void 0,c,ee);for(ie in c)ee=c[ie],ne=l[ie],!c.hasOwnProperty(ie)||ee===ne||ee===void 0&&ne===void 0||h0(i,o,ie,ee,c,ne);return}}for(var Y in l)ee=l[Y],l.hasOwnProperty(Y)&&ee!=null&&!c.hasOwnProperty(Y)&&Ut(i,o,Y,null,c,ee);for(le in c)ee=c[le],ne=l[le],!c.hasOwnProperty(le)||ee===ne||ee==null&&ne==null||Ut(i,o,le,ee,c,ne)}function BT(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function EU(){if(typeof performance.getEntriesByType=="function"){for(var i=0,o=0,l=performance.getEntriesByType("resource"),c=0;c<l.length;c++){var p=l[c],m=p.transferSize,S=p.initiatorType,k=p.duration;if(m&&k&&BT(S)){for(S=0,k=p.responseEnd,c+=1;c<l.length;c++){var j=l[c],J=j.startTime;if(J>k)break;var ie=j.transferSize,le=j.initiatorType;ie&&BT(le)&&(j=j.responseEnd,S+=ie*(j<k?1:(k-J)/(j-J)))}if(--c,o+=8*(m+S)/(p.duration/1e3),i++,10<i)break}}if(0<i)return o/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var p0=null,m0=null;function nh(i){return i.nodeType===9?i:i.ownerDocument}function zT(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function LT(i,o){if(i===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&o==="foreignObject"?0:i}function g0(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var y0=null;function _U(){var i=window.event;return i&&i.type==="popstate"?i===y0?!1:(y0=i,!0):(y0=null,!1)}var $T=typeof setTimeout=="function"?setTimeout:void 0,wU=typeof clearTimeout=="function"?clearTimeout:void 0,PT=typeof Promise=="function"?Promise:void 0,CU=typeof queueMicrotask=="function"?queueMicrotask:typeof PT<"u"?function(i){return PT.resolve(null).then(i).catch(TU)}:$T;function TU(i){setTimeout(function(){throw i})}function Ho(i){return i==="head"}function UT(i,o){var l=o,c=0;do{var p=l.nextSibling;if(i.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"||l==="/&"){if(c===0){i.removeChild(p),rl(o);return}c--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")c++;else if(l==="html")Vu(i.ownerDocument.documentElement);else if(l==="head"){l=i.ownerDocument.head,Vu(l);for(var m=l.firstChild;m;){var S=m.nextSibling,k=m.nodeName;m[su]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&m.rel.toLowerCase()==="stylesheet"||l.removeChild(m),m=S}}else l==="body"&&Vu(i.ownerDocument.body);l=p}while(l);rl(o)}function jT(i,o){var l=i;i=0;do{var c=l.nextSibling;if(l.nodeType===1?o?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(o?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),c&&c.nodeType===8)if(l=c.data,l==="/$"){if(i===0)break;i--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||i++;l=c}while(l)}function v0(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var l=o;switch(o=o.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":v0(l),_g(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}i.removeChild(l)}}function AU(i,o,l,c){for(;i.nodeType===1;){var p=l;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!c&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(c){if(!i[su])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(m=i.getAttribute("rel"),m==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(m!==p.rel||i.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||i.getAttribute("title")!==(p.title==null?null:p.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(m=i.getAttribute("src"),(m!==(p.src==null?null:p.src)||i.getAttribute("type")!==(p.type==null?null:p.type)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&m&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var m=p.name==null?null:""+p.name;if(p.type==="hidden"&&i.getAttribute("name")===m)return i}else return i;if(i=Xr(i.nextSibling),i===null)break}return null}function kU(i,o,l){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=Xr(i.nextSibling),i===null))return null;return i}function HT(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=Xr(i.nextSibling),i===null))return null;return i}function b0(i){return i.data==="$?"||i.data==="$~"}function S0(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function RU(i,o){var l=i.ownerDocument;if(i.data==="$~")i._reactRetry=o;else if(i.data!=="$?"||l.readyState!=="loading")o();else{var c=function(){o(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),i._reactRetry=c}}function Xr(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return i}var x0=null;function VT(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"||l==="/&"){if(o===0)return Xr(i.nextSibling);o--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||o++}i=i.nextSibling}return null}function FT(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(o===0)return i;o--}else l!=="/$"&&l!=="/&"||o++}i=i.previousSibling}return null}function GT(i,o,l){switch(o=nh(l),i){case"html":if(i=o.documentElement,!i)throw Error(r(452));return i;case"head":if(i=o.head,!i)throw Error(r(453));return i;case"body":if(i=o.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Vu(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);_g(i)}var Zr=new Map,qT=new Set;function rh(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ao=Z.d;Z.d={f:OU,r:NU,D:IU,C:MU,L:DU,m:BU,X:LU,S:zU,M:$U};function OU(){var i=ao.f(),o=Xd();return i||o}function NU(i){var o=Es(i);o!==null&&o.tag===5&&o.type==="form"?uC(o):ao.r(i)}var el=typeof document>"u"?null:document;function YT(i,o,l){var c=el;if(c&&typeof o=="string"&&o){var p=jr(o);p='link[rel="'+i+'"][href="'+p+'"]',typeof l=="string"&&(p+='[crossorigin="'+l+'"]'),qT.has(p)||(qT.add(p),i={rel:i,crossOrigin:l,href:o},c.querySelector(p)===null&&(o=c.createElement("link"),Gn(o,"link",i),Ln(o),c.head.appendChild(o)))}}function IU(i){ao.D(i),YT("dns-prefetch",i,null)}function MU(i,o){ao.C(i,o),YT("preconnect",i,o)}function DU(i,o,l){ao.L(i,o,l);var c=el;if(c&&i&&o){var p='link[rel="preload"][as="'+jr(o)+'"]';o==="image"&&l&&l.imageSrcSet?(p+='[imagesrcset="'+jr(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(p+='[imagesizes="'+jr(l.imageSizes)+'"]')):p+='[href="'+jr(i)+'"]';var m=p;switch(o){case"style":m=tl(i);break;case"script":m=nl(i)}Zr.has(m)||(i=y({rel:"preload",href:o==="image"&&l&&l.imageSrcSet?void 0:i,as:o},l),Zr.set(m,i),c.querySelector(p)!==null||o==="style"&&c.querySelector(Fu(m))||o==="script"&&c.querySelector(Gu(m))||(o=c.createElement("link"),Gn(o,"link",i),Ln(o),c.head.appendChild(o)))}}function BU(i,o){ao.m(i,o);var l=el;if(l&&i){var c=o&&typeof o.as=="string"?o.as:"script",p='link[rel="modulepreload"][as="'+jr(c)+'"][href="'+jr(i)+'"]',m=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=nl(i)}if(!Zr.has(m)&&(i=y({rel:"modulepreload",href:i},o),Zr.set(m,i),l.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Gu(m)))return}c=l.createElement("link"),Gn(c,"link",i),Ln(c),l.head.appendChild(c)}}}function zU(i,o,l){ao.S(i,o,l);var c=el;if(c&&i){var p=_s(c).hoistableStyles,m=tl(i);o=o||"default";var S=p.get(m);if(!S){var k={loading:0,preload:null};if(S=c.querySelector(Fu(m)))k.loading=5;else{i=y({rel:"stylesheet",href:i,"data-precedence":o},l),(l=Zr.get(m))&&E0(i,l);var j=S=c.createElement("link");Ln(j),Gn(j,"link",i),j._p=new Promise(function(J,ie){j.onload=J,j.onerror=ie}),j.addEventListener("load",function(){k.loading|=1}),j.addEventListener("error",function(){k.loading|=2}),k.loading|=4,ih(S,o,c)}S={type:"stylesheet",instance:S,count:1,state:k},p.set(m,S)}}}function LU(i,o){ao.X(i,o);var l=el;if(l&&i){var c=_s(l).hoistableScripts,p=nl(i),m=c.get(p);m||(m=l.querySelector(Gu(p)),m||(i=y({src:i,async:!0},o),(o=Zr.get(p))&&_0(i,o),m=l.createElement("script"),Ln(m),Gn(m,"link",i),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(p,m))}}function $U(i,o){ao.M(i,o);var l=el;if(l&&i){var c=_s(l).hoistableScripts,p=nl(i),m=c.get(p);m||(m=l.querySelector(Gu(p)),m||(i=y({src:i,async:!0,type:"module"},o),(o=Zr.get(p))&&_0(i,o),m=l.createElement("script"),Ln(m),Gn(m,"link",i),l.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(p,m))}}function XT(i,o,l,c){var p=(p=he.current)?rh(p):null;if(!p)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(o=tl(l.href),l=_s(p).hoistableStyles,c=l.get(o),c||(c={type:"style",instance:null,count:0,state:null},l.set(o,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){i=tl(l.href);var m=_s(p).hoistableStyles,S=m.get(i);if(S||(p=p.ownerDocument||p,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(i,S),(m=p.querySelector(Fu(i)))&&!m._p&&(S.instance=m,S.state.loading=5),Zr.has(i)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Zr.set(i,l),m||PU(p,i,l,S.state))),o&&c===null)throw Error(r(528,""));return S}if(o&&c!==null)throw Error(r(529,""));return null;case"script":return o=l.async,l=l.src,typeof l=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=nl(l),l=_s(p).hoistableScripts,c=l.get(o),c||(c={type:"script",instance:null,count:0,state:null},l.set(o,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function tl(i){return'href="'+jr(i)+'"'}function Fu(i){return'link[rel="stylesheet"]['+i+"]"}function ZT(i){return y({},i,{"data-precedence":i.precedence,precedence:null})}function PU(i,o,l,c){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?c.loading=1:(o=i.createElement("link"),c.preload=o,o.addEventListener("load",function(){return c.loading|=1}),o.addEventListener("error",function(){return c.loading|=2}),Gn(o,"link",l),Ln(o),i.head.appendChild(o))}function nl(i){return'[src="'+jr(i)+'"]'}function Gu(i){return"script[async]"+i}function KT(i,o,l){if(o.count++,o.instance===null)switch(o.type){case"style":var c=i.querySelector('style[data-href~="'+jr(l.href)+'"]');if(c)return o.instance=c,Ln(c),c;var p=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(i.ownerDocument||i).createElement("style"),Ln(c),Gn(c,"style",p),ih(c,l.precedence,i),o.instance=c;case"stylesheet":p=tl(l.href);var m=i.querySelector(Fu(p));if(m)return o.state.loading|=4,o.instance=m,Ln(m),m;c=ZT(l),(p=Zr.get(p))&&E0(c,p),m=(i.ownerDocument||i).createElement("link"),Ln(m);var S=m;return S._p=new Promise(function(k,j){S.onload=k,S.onerror=j}),Gn(m,"link",c),o.state.loading|=4,ih(m,l.precedence,i),o.instance=m;case"script":return m=nl(l.src),(p=i.querySelector(Gu(m)))?(o.instance=p,Ln(p),p):(c=l,(p=Zr.get(m))&&(c=y({},l),_0(c,p)),i=i.ownerDocument||i,p=i.createElement("script"),Ln(p),Gn(p,"link",c),i.head.appendChild(p),o.instance=p);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(c=o.instance,o.state.loading|=4,ih(c,l.precedence,i));return o.instance}function ih(i,o,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,m=p,S=0;S<c.length;S++){var k=c[S];if(k.dataset.precedence===o)m=k;else if(m!==p)break}m?m.parentNode.insertBefore(i,m.nextSibling):(o=l.nodeType===9?l.head:l,o.insertBefore(i,o.firstChild))}function E0(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function _0(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var oh=null;function WT(i,o,l){if(oh===null){var c=new Map,p=oh=new Map;p.set(l,c)}else p=oh,c=p.get(l),c||(c=new Map,p.set(l,c));if(c.has(i))return c;for(c.set(i,null),l=l.getElementsByTagName(i),p=0;p<l.length;p++){var m=l[p];if(!(m[su]||m[jn]||i==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var S=m.getAttribute(o)||"";S=i+S;var k=c.get(S);k?k.push(m):c.set(S,[m])}}return c}function QT(i,o,l){i=i.ownerDocument||i,i.head.insertBefore(l,o==="title"?i.querySelector("head > title"):null)}function UU(i,o,l){if(l===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(i=o.disabled,typeof o.precedence=="string"&&i==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function JT(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function jU(i,o,l,c){if(l.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var p=tl(c.href),m=o.querySelector(Fu(p));if(m){o=m._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=ah.bind(i),o.then(i,i)),l.state.loading|=4,l.instance=m,Ln(m);return}m=o.ownerDocument||o,c=ZT(c),(p=Zr.get(p))&&E0(c,p),m=m.createElement("link"),Ln(m);var S=m;S._p=new Promise(function(k,j){S.onload=k,S.onerror=j}),Gn(m,"link",c),l.instance=m}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(l,o),(o=l.state.preload)&&(l.state.loading&3)===0&&(i.count++,l=ah.bind(i),o.addEventListener("load",l),o.addEventListener("error",l))}}var w0=0;function HU(i,o){return i.stylesheets&&i.count===0&&lh(i,i.stylesheets),0<i.count||0<i.imgCount?function(l){var c=setTimeout(function(){if(i.stylesheets&&lh(i,i.stylesheets),i.unsuspend){var m=i.unsuspend;i.unsuspend=null,m()}},6e4+o);0<i.imgBytes&&w0===0&&(w0=62500*EU());var p=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&lh(i,i.stylesheets),i.unsuspend)){var m=i.unsuspend;i.unsuspend=null,m()}},(i.imgBytes>w0?50:800)+o);return i.unsuspend=l,function(){i.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function ah(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lh(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var sh=null;function lh(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,sh=new Map,o.forEach(VU,i),sh=null,ah.call(i))}function VU(i,o){if(!(o.state.loading&4)){var l=sh.get(i);if(l)var c=l.get(null);else{l=new Map,sh.set(i,l);for(var p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<p.length;m++){var S=p[m];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(l.set(S.dataset.precedence,S),c=S)}c&&l.set(null,c)}p=o.instance,S=p.getAttribute("data-precedence"),m=l.get(S)||c,m===c&&l.set(null,p),l.set(S,p),this.count++,c=ah.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),m?m.parentNode.insertBefore(p,m.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(p,i.firstChild)),o.state.loading|=4}}var qu={$$typeof:T,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function FU(i,o,l,c,p,m,S,k,j){this.tag=1,this.containerInfo=i,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=bg(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bg(0),this.hiddenUpdates=bg(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=m,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.incompleteTransitions=new Map}function e2(i,o,l,c,p,m,S,k,j,J,ie,le){return i=new FU(i,o,l,S,j,J,ie,le,k),o=1,m===!0&&(o|=24),m=Ar(3,null,null,o),i.current=m,m.stateNode=i,o=ry(),o.refCount++,i.pooledCache=o,o.refCount++,m.memoizedState={element:c,isDehydrated:l,cache:o},sy(m),i}function t2(i){return i?(i=Ms,i):Ms}function n2(i,o,l,c,p,m){p=t2(p),c.context===null?c.context=p:c.pendingContext=p,c=No(o),c.payload={element:l},m=m===void 0?null:m,m!==null&&(c.callback=m),l=Io(i,c,o),l!==null&&(gr(l,i,o),wu(l,i,o))}function r2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function C0(i,o){r2(i,o),(i=i.alternate)&&r2(i,o)}function i2(i){if(i.tag===13||i.tag===31){var o=Ta(i,67108864);o!==null&&gr(o,i,67108864),C0(i,67108864)}}function o2(i){if(i.tag===13||i.tag===31){var o=Ir();o=Sg(o);var l=Ta(i,o);l!==null&&gr(l,i,o),C0(i,o)}}var uh=!0;function GU(i,o,l,c){var p=D.T;D.T=null;var m=Z.p;try{Z.p=2,T0(i,o,l,c)}finally{Z.p=m,D.T=p}}function qU(i,o,l,c){var p=D.T;D.T=null;var m=Z.p;try{Z.p=8,T0(i,o,l,c)}finally{Z.p=m,D.T=p}}function T0(i,o,l,c){if(uh){var p=A0(c);if(p===null)d0(i,o,c,ch,l),s2(i,c);else if(XU(p,i,o,l,c))c.stopPropagation();else if(s2(i,c),o&4&&-1<YU.indexOf(i)){for(;p!==null;){var m=Es(p);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var S=xa(m.pendingLanes);if(S!==0){var k=m;for(k.pendingLanes|=2,k.entangledLanes|=2;S;){var j=1<<31-At(S);k.entanglements[1]|=j,S&=~j}Oi(m),(St&6)===0&&(qd=tt()+500,Uu(0))}}break;case 31:case 13:k=Ta(m,2),k!==null&&gr(k,m,2),Xd(),C0(m,2)}if(m=A0(c),m===null&&d0(i,o,c,ch,l),m===p)break;p=m}p!==null&&c.stopPropagation()}else d0(i,o,c,null,l)}}function A0(i){return i=Rg(i),k0(i)}var ch=null;function k0(i){if(ch=null,i=xs(i),i!==null){var o=s(i);if(o===null)i=null;else{var l=o.tag;if(l===13){if(i=u(o),i!==null)return i;i=null}else if(l===31){if(i=f(o),i!==null)return i;i=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return ch=i,null}function a2(i){switch(i){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(oi()){case te:return 2;case ce:return 8;case we:case ze:return 32;case We:return 268435456;default:return 32}default:return 32}}var R0=!1,Vo=null,Fo=null,Go=null,Yu=new Map,Xu=new Map,qo=[],YU="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 s2(i,o){switch(i){case"focusin":case"focusout":Vo=null;break;case"dragenter":case"dragleave":Fo=null;break;case"mouseover":case"mouseout":Go=null;break;case"pointerover":case"pointerout":Yu.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xu.delete(o.pointerId)}}function Zu(i,o,l,c,p,m){return i===null||i.nativeEvent!==m?(i={blockedOn:o,domEventName:l,eventSystemFlags:c,nativeEvent:m,targetContainers:[p]},o!==null&&(o=Es(o),o!==null&&i2(o)),i):(i.eventSystemFlags|=c,o=i.targetContainers,p!==null&&o.indexOf(p)===-1&&o.push(p),i)}function XU(i,o,l,c,p){switch(o){case"focusin":return Vo=Zu(Vo,i,o,l,c,p),!0;case"dragenter":return Fo=Zu(Fo,i,o,l,c,p),!0;case"mouseover":return Go=Zu(Go,i,o,l,c,p),!0;case"pointerover":var m=p.pointerId;return Yu.set(m,Zu(Yu.get(m)||null,i,o,l,c,p)),!0;case"gotpointercapture":return m=p.pointerId,Xu.set(m,Zu(Xu.get(m)||null,i,o,l,c,p)),!0}return!1}function l2(i){var o=xs(i.target);if(o!==null){var l=s(o);if(l!==null){if(o=l.tag,o===13){if(o=u(l),o!==null){i.blockedOn=o,E_(i.priority,function(){o2(l)});return}}else if(o===31){if(o=f(l),o!==null){i.blockedOn=o,E_(i.priority,function(){o2(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function fh(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=A0(i.nativeEvent);if(l===null){l=i.nativeEvent;var c=new l.constructor(l.type,l);kg=c,l.target.dispatchEvent(c),kg=null}else return o=Es(l),o!==null&&i2(o),i.blockedOn=l,!1;o.shift()}return!0}function u2(i,o,l){fh(i)&&l.delete(o)}function ZU(){R0=!1,Vo!==null&&fh(Vo)&&(Vo=null),Fo!==null&&fh(Fo)&&(Fo=null),Go!==null&&fh(Go)&&(Go=null),Yu.forEach(u2),Xu.forEach(u2)}function dh(i,o){i.blockedOn===o&&(i.blockedOn=null,R0||(R0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ZU)))}var hh=null;function c2(i){hh!==i&&(hh=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){hh===i&&(hh=null);for(var o=0;o<i.length;o+=3){var l=i[o],c=i[o+1],p=i[o+2];if(typeof c!="function"){if(k0(c||l)===null)continue;break}var m=Es(l);m!==null&&(i.splice(o,3),o-=3,Ay(m,{pending:!0,data:p,method:l.method,action:c},c,p))}}))}function rl(i){function o(j){return dh(j,i)}Vo!==null&&dh(Vo,i),Fo!==null&&dh(Fo,i),Go!==null&&dh(Go,i),Yu.forEach(o),Xu.forEach(o);for(var l=0;l<qo.length;l++){var c=qo[l];c.blockedOn===i&&(c.blockedOn=null)}for(;0<qo.length&&(l=qo[0],l.blockedOn===null);)l2(l),l.blockedOn===null&&qo.shift();if(l=(i.ownerDocument||i).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var p=l[c],m=l[c+1],S=p[cr]||null;if(typeof m=="function")S||c2(l);else if(S){var k=null;if(m&&m.hasAttribute("formAction")){if(p=m,S=m[cr]||null)k=S.formAction;else if(k0(p)!==null)continue}else k=S.action;typeof k=="function"?l[c+1]=k:(l.splice(c,3),c-=3),c2(l)}}}function f2(){function i(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(S){return p=S})},focusReset:"manual",scroll:"manual"})}function o(){p!==null&&(p(),p=null),c||setTimeout(l,20)}function l(){if(!c&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(l,100),function(){c=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),p!==null&&(p(),p=null)}}}function O0(i){this._internalRoot=i}ph.prototype.render=O0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var l=o.current,c=Ir();n2(l,c,i,o,null,null)},ph.prototype.unmount=O0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;n2(i.current,2,null,i,null,null),Xd(),o[Ss]=null}};function ph(i){this._internalRoot=i}ph.prototype.unstable_scheduleHydration=function(i){if(i){var o=x_();i={blockedOn:null,target:i,priority:o};for(var l=0;l<qo.length&&o!==0&&o<qo[l].priority;l++);qo.splice(l,0,i),l===0&&l2(i)}};var d2=t.version;if(d2!=="19.2.4")throw Error(r(527,d2,"19.2.4"));Z.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=h(o),i=i!==null?g(i):null,i=i===null?null:i.stateNode,i};var KU={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mh.isDisabled&&mh.supportsFiber)try{hn=mh.inject(KU),sn=mh}catch{}}return ol.createRoot=function(i,o){if(!a(i))throw Error(r(299));var l=!1,c="",p=bC,m=SC,S=xC;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(c=o.identifierPrefix),o.onUncaughtError!==void 0&&(p=o.onUncaughtError),o.onCaughtError!==void 0&&(m=o.onCaughtError),o.onRecoverableError!==void 0&&(S=o.onRecoverableError)),o=e2(i,1,!1,null,null,l,c,null,p,m,S,f2),i[Ss]=o.current,f0(i),new O0(o)},ol.hydrateRoot=function(i,o,l){if(!a(i))throw Error(r(299));var c=!1,p="",m=bC,S=SC,k=xC,j=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(m=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(k=l.onRecoverableError),l.formState!==void 0&&(j=l.formState)),o=e2(i,1,!0,o,l??null,c,p,j,m,S,k,f2),o.context=t2(null),l=o.current,c=Ir(),c=Sg(c),p=No(c),p.callback=null,Io(l,p,c),l=c,o.current.lanes=l,au(o,l),Oi(o),i[Ss]=o.current,f0(i),new ph(o)},ol.version="19.2.4",ol}var j0;function x2(){if(j0)return yh.exports;j0=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),yh.exports=S2(),yh.exports}var E2=x2();function _2(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function w2(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var C2=(function(){function e(n){var r=this;this._insertTag=function(a){var s;r.tags.length===0?r.insertionPoint?s=r.insertionPoint.nextSibling:r.prepend?s=r.container.firstChild:s=r.before:s=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(a,s),r.tags.push(a)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(w2(this));var a=this.tags[this.tags.length-1];if(this.isSpeedy){var s=_2(a);try{s.insertRule(r,s.cssRules.length)}catch{}}else a.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var a;return(a=r.parentNode)==null?void 0:a.removeChild(r)}),this.tags=[],this.ctr=0},e})(),Yn="-ms-",Wu="-moz-",yt="-webkit-",H0="comm",_h="rule",wh="decl",T2="@import",V0="@keyframes",A2="@layer",k2=Math.abs,Qu=String.fromCharCode,R2=Object.assign;function O2(e,t){return Pn(e,0)^45?(((t<<2^Pn(e,0))<<2^Pn(e,1))<<2^Pn(e,2))<<2^Pn(e,3):0}function F0(e){return e.trim()}function N2(e,t){return(e=t.exec(e))?e[0]:e}function vt(e,t,n){return e.replace(t,n)}function Ch(e,t){return e.indexOf(t)}function Pn(e,t){return e.charCodeAt(t)|0}function al(e,t,n){return e.slice(t,n)}function ci(e){return e.length}function Th(e){return e.length}function Ju(e,t){return t.push(e),e}function I2(e,t){return e.map(t).join("")}var ec=1,Pa=1,G0=0,ar=0,En=0,Ua="";function tc(e,t,n,r,a,s,u){return{value:e,root:t,parent:n,type:r,props:a,children:s,line:ec,column:Pa,length:u,return:""}}function sl(e,t){return R2(tc("",null,null,"",null,null,0),e,{length:-e.length},t)}function M2(){return En}function D2(){return En=ar>0?Pn(Ua,--ar):0,Pa--,En===10&&(Pa=1,ec--),En}function yr(){return En=ar<G0?Pn(Ua,ar++):0,Pa++,En===10&&(Pa=1,ec++),En}function fi(){return Pn(Ua,ar)}function nc(){return ar}function ll(e,t){return al(Ua,e,t)}function ul(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function q0(e){return ec=Pa=1,G0=ci(Ua=e),ar=0,[]}function Y0(e){return Ua="",e}function rc(e){return F0(ll(ar-1,Ah(e===91?e+2:e===40?e+1:e)))}function B2(e){for(;(En=fi())&&En<33;)yr();return ul(e)>2||ul(En)>3?"":" "}function z2(e,t){for(;--t&&yr()&&!(En<48||En>102||En>57&&En<65||En>70&&En<97););return ll(e,nc()+(t<6&&fi()==32&&yr()==32))}function Ah(e){for(;yr();)switch(En){case e:return ar;case 34:case 39:e!==34&&e!==39&&Ah(En);break;case 40:e===41&&Ah(e);break;case 92:yr();break}return ar}function L2(e,t){for(;yr()&&e+En!==57;)if(e+En===84&&fi()===47)break;return"/*"+ll(t,ar-1)+"*"+Qu(e===47?e:yr())}function $2(e){for(;!ul(fi());)yr();return ll(e,ar)}function P2(e){return Y0(ic("",null,null,null,[""],e=q0(e),0,[0],e))}function ic(e,t,n,r,a,s,u,f,d){for(var h=0,g=0,y=u,b=0,v=0,x=0,E=1,_=1,w=1,O=0,T="",A=a,M=s,R=r,$=T;_;)switch(x=O,O=yr()){case 40:if(x!=108&&Pn($,y-1)==58){Ch($+=vt(rc(O),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:$+=rc(O);break;case 9:case 10:case 13:case 32:$+=B2(x);break;case 92:$+=z2(nc()-1,7);continue;case 47:switch(fi()){case 42:case 47:Ju(U2(L2(yr(),nc()),t,n),d);break;default:$+="/"}break;case 123*E:f[h++]=ci($)*w;case 125*E:case 59:case 0:switch(O){case 0:case 125:_=0;case 59+g:w==-1&&($=vt($,/\f/g,"")),v>0&&ci($)-y&&Ju(v>32?Z0($+";",r,n,y-1):Z0(vt($," ","")+";",r,n,y-2),d);break;case 59:$+=";";default:if(Ju(R=X0($,t,n,h,g,a,f,T,A=[],M=[],y),s),O===123)if(g===0)ic($,t,R,R,A,s,y,f,M);else switch(b===99&&Pn($,3)===110?100:b){case 100:case 108:case 109:case 115:ic(e,R,R,r&&Ju(X0(e,R,R,0,0,a,f,T,a,A=[],y),M),a,M,y,f,r?A:M);break;default:ic($,R,R,R,[""],M,0,f,M)}}h=g=v=0,E=w=1,T=$="",y=u;break;case 58:y=1+ci($),v=x;default:if(E<1){if(O==123)--E;else if(O==125&&E++==0&&D2()==125)continue}switch($+=Qu(O),O*E){case 38:w=g>0?1:($+="\f",-1);break;case 44:f[h++]=(ci($)-1)*w,w=1;break;case 64:fi()===45&&($+=rc(yr())),b=fi(),g=y=ci(T=$+=$2(nc())),O++;break;case 45:x===45&&ci($)==2&&(E=0)}}return s}function X0(e,t,n,r,a,s,u,f,d,h,g){for(var y=a-1,b=a===0?s:[""],v=Th(b),x=0,E=0,_=0;x<r;++x)for(var w=0,O=al(e,y+1,y=k2(E=u[x])),T=e;w<v;++w)(T=F0(E>0?b[w]+" "+O:vt(O,/&\f/g,b[w])))&&(d[_++]=T);return tc(e,t,n,a===0?_h:f,d,h,g)}function U2(e,t,n){return tc(e,t,n,H0,Qu(M2()),al(e,2,-2),0)}function Z0(e,t,n,r){return tc(e,t,n,wh,al(e,0,r),al(e,r+1,-1),r)}function ja(e,t){for(var n="",r=Th(e),a=0;a<r;a++)n+=t(e[a],a,e,t)||"";return n}function j2(e,t,n,r){switch(e.type){case A2:if(e.children.length)break;case T2:case wh:return e.return=e.return||e.value;case H0:return"";case V0:return e.return=e.value+"{"+ja(e.children,r)+"}";case _h:e.value=e.props.join(",")}return ci(n=ja(e.children,r))?e.return=e.value+"{"+n+"}":""}function H2(e){var t=Th(e);return function(n,r,a,s){for(var u="",f=0;f<t;f++)u+=e[f](n,r,a,s)||"";return u}}function V2(e){return function(t){t.root||(t=t.return)&&e(t)}}function K0(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var F2=function(t,n,r){for(var a=0,s=0;a=s,s=fi(),a===38&&s===12&&(n[r]=1),!ul(s);)yr();return ll(t,ar)},G2=function(t,n){var r=-1,a=44;do switch(ul(a)){case 0:a===38&&fi()===12&&(n[r]=1),t[r]+=F2(ar-1,n,r);break;case 2:t[r]+=rc(a);break;case 4:if(a===44){t[++r]=fi()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=Qu(a)}while(a=yr());return t},q2=function(t,n){return Y0(G2(q0(t),n))},W0=new WeakMap,Y2=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,a=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!W0.get(r))&&!a){W0.set(t,!0);for(var s=[],u=q2(n,s),f=r.props,d=0,h=0;d<u.length;d++)for(var g=0;g<f.length;g++,h++)t.props[h]=s[d]?u[d].replace(/&\f/g,f[g]):f[g]+" "+u[d]}}},X2=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function Q0(e,t){switch(O2(e,t)){case 5103:return yt+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return yt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return yt+e+Wu+e+Yn+e+e;case 6828:case 4268:return yt+e+Yn+e+e;case 6165:return yt+e+Yn+"flex-"+e+e;case 5187:return yt+e+vt(e,/(\w+).+(:[^]+)/,yt+"box-$1$2"+Yn+"flex-$1$2")+e;case 5443:return yt+e+Yn+"flex-item-"+vt(e,/flex-|-self/,"")+e;case 4675:return yt+e+Yn+"flex-line-pack"+vt(e,/align-content|flex-|-self/,"")+e;case 5548:return yt+e+Yn+vt(e,"shrink","negative")+e;case 5292:return yt+e+Yn+vt(e,"basis","preferred-size")+e;case 6060:return yt+"box-"+vt(e,"-grow","")+yt+e+Yn+vt(e,"grow","positive")+e;case 4554:return yt+vt(e,/([^-])(transform)/g,"$1"+yt+"$2")+e;case 6187:return vt(vt(vt(e,/(zoom-|grab)/,yt+"$1"),/(image-set)/,yt+"$1"),e,"")+e;case 5495:case 3959:return vt(e,/(image-set\([^]*)/,yt+"$1$`$1");case 4968:return vt(vt(e,/(.+:)(flex-)?(.*)/,yt+"box-pack:$3"+Yn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+yt+e+e;case 4095:case 3583:case 4068:case 2532:return vt(e,/(.+)-inline(.+)/,yt+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ci(e)-1-t>6)switch(Pn(e,t+1)){case 109:if(Pn(e,t+4)!==45)break;case 102:return vt(e,/(.+:)(.+)-([^]+)/,"$1"+yt+"$2-$3$1"+Wu+(Pn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ch(e,"stretch")?Q0(vt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Pn(e,t+1)!==115)break;case 6444:switch(Pn(e,ci(e)-3-(~Ch(e,"!important")&&10))){case 107:return vt(e,":",":"+yt)+e;case 101:return vt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+yt+(Pn(e,14)===45?"inline-":"")+"box$3$1"+yt+"$2$3$1"+Yn+"$2box$3")+e}break;case 5936:switch(Pn(e,t+11)){case 114:return yt+e+Yn+vt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return yt+e+Yn+vt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return yt+e+Yn+vt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return yt+e+Yn+e+e}return e}var Z2=function(t,n,r,a){if(t.length>-1&&!t.return)switch(t.type){case wh:t.return=Q0(t.value,t.length);break;case V0:return ja([sl(t,{value:vt(t.value,"@","@"+yt)})],a);case _h:if(t.length)return I2(t.props,function(s){switch(N2(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ja([sl(t,{props:[vt(s,/:(read-\w+)/,":"+Wu+"$1")]})],a);case"::placeholder":return ja([sl(t,{props:[vt(s,/:(plac\w+)/,":"+yt+"input-$1")]}),sl(t,{props:[vt(s,/:(plac\w+)/,":"+Wu+"$1")]}),sl(t,{props:[vt(s,/:(plac\w+)/,Yn+"input-$1")]})],a)}return""})}},K2=[Z2],J0=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(E){var _=E.getAttribute("data-emotion");_.indexOf(" ")!==-1&&(document.head.appendChild(E),E.setAttribute("data-s",""))})}var a=t.stylisPlugins||K2,s={},u,f=[];u=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(E){for(var _=E.getAttribute("data-emotion").split(" "),w=1;w<_.length;w++)s[_[w]]=!0;f.push(E)});var d,h=[Y2,X2];{var g,y=[j2,V2(function(E){g.insert(E)})],b=H2(h.concat(a,y)),v=function(_){return ja(P2(_),b)};d=function(_,w,O,T){g=O,v(_?_+"{"+w.styles+"}":w.styles),T&&(x.inserted[w.name]=!0)}}var x={key:n,sheet:new C2({key:n,container:u,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:s,registered:{},insert:d};return x.sheet.hydrate(f),x},N=xh();const Jn=Ku(N),oc=h2({__proto__:null,default:Jn},[N]);function ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ac.apply(null,arguments)}var kh={exports:{}},xt={};var ev;function W2(){if(ev)return xt;ev=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,f=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,h=e?Symbol.for("react.concurrent_mode"):60111,g=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,b=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,x=e?Symbol.for("react.lazy"):60116,E=e?Symbol.for("react.block"):60121,_=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,O=e?Symbol.for("react.scope"):60119;function T(M){if(typeof M=="object"&&M!==null){var R=M.$$typeof;switch(R){case t:switch(M=M.type,M){case d:case h:case r:case s:case a:case y:return M;default:switch(M=M&&M.$$typeof,M){case f:case g:case x:case v:case u:return M;default:return R}}case n:return R}}}function A(M){return T(M)===h}return xt.AsyncMode=d,xt.ConcurrentMode=h,xt.ContextConsumer=f,xt.ContextProvider=u,xt.Element=t,xt.ForwardRef=g,xt.Fragment=r,xt.Lazy=x,xt.Memo=v,xt.Portal=n,xt.Profiler=s,xt.StrictMode=a,xt.Suspense=y,xt.isAsyncMode=function(M){return A(M)||T(M)===d},xt.isConcurrentMode=A,xt.isContextConsumer=function(M){return T(M)===f},xt.isContextProvider=function(M){return T(M)===u},xt.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===t},xt.isForwardRef=function(M){return T(M)===g},xt.isFragment=function(M){return T(M)===r},xt.isLazy=function(M){return T(M)===x},xt.isMemo=function(M){return T(M)===v},xt.isPortal=function(M){return T(M)===n},xt.isProfiler=function(M){return T(M)===s},xt.isStrictMode=function(M){return T(M)===a},xt.isSuspense=function(M){return T(M)===y},xt.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===r||M===h||M===s||M===a||M===y||M===b||typeof M=="object"&&M!==null&&(M.$$typeof===x||M.$$typeof===v||M.$$typeof===u||M.$$typeof===f||M.$$typeof===g||M.$$typeof===_||M.$$typeof===w||M.$$typeof===O||M.$$typeof===E)},xt.typeOf=T,xt}var tv;function Q2(){return tv||(tv=1,kh.exports=W2()),kh.exports}var Rh,nv;function J2(){if(nv)return Rh;nv=1;var e=Q2(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[e.ForwardRef]=r,s[e.Memo]=a;function u(x){return e.isMemo(x)?a:s[x.$$typeof]||t}var f=Object.defineProperty,d=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,g=Object.getOwnPropertyDescriptor,y=Object.getPrototypeOf,b=Object.prototype;function v(x,E,_){if(typeof E!="string"){if(b){var w=y(E);w&&w!==b&&v(x,w,_)}var O=d(E);h&&(O=O.concat(h(E)));for(var T=u(x),A=u(E),M=0;M<O.length;++M){var R=O[M];if(!n[R]&&!(_&&_[R])&&!(A&&A[R])&&!(T&&T[R])){var $=g(E,R);try{f(x,R,$)}catch{}}}}return x}return Rh=v,Rh}J2();var eA=!0;function rv(e,t,n){var r="";return n.split(" ").forEach(function(a){e[a]!==void 0?t.push(e[a]+";"):a&&(r+=a+" ")}),r}var Oh=function(t,n,r){var a=t.key+"-"+n.name;(r===!1||eA===!1)&&t.registered[a]===void 0&&(t.registered[a]=n.styles)},Nh=function(t,n,r){Oh(t,n,r);var a=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+a:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function tA(e){for(var t=0,n,r=0,a=e.length;a>=4;++r,a-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var nA={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},rA=/[A-Z]|^ms/g,iA=/_EMO_([^_]+?)_([^]*?)_EMO_/g,iv=function(t){return t.charCodeAt(1)===45},ov=function(t){return t!=null&&typeof t!="boolean"},Ih=K0(function(e){return iv(e)?e:e.replace(rA,"-$&").toLowerCase()}),av=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(iA,function(r,a,s){return di={name:a,styles:s,next:di},a})}return nA[t]!==1&&!iv(t)&&typeof n=="number"&&n!==0?n+"px":n};function cl(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var a=n;if(a.anim===1)return di={name:a.name,styles:a.styles,next:di},a.name;var s=n;if(s.styles!==void 0){var u=s.next;if(u!==void 0)for(;u!==void 0;)di={name:u.name,styles:u.styles,next:di},u=u.next;var f=s.styles+";";return f}return oA(e,t,n)}case"function":{if(e!==void 0){var d=di,h=n(e);return di=d,cl(e,t,h)}break}}var g=n;if(t==null)return g;var y=t[g];return y!==void 0?y:g}function oA(e,t,n){var r="";if(Array.isArray(n))for(var a=0;a<n.length;a++)r+=cl(e,t,n[a])+";";else for(var s in n){var u=n[s];if(typeof u!="object"){var f=u;t!=null&&t[f]!==void 0?r+=s+"{"+t[f]+"}":ov(f)&&(r+=Ih(s)+":"+av(s,f)+";")}else if(Array.isArray(u)&&typeof u[0]=="string"&&(t==null||t[u[0]]===void 0))for(var d=0;d<u.length;d++)ov(u[d])&&(r+=Ih(s)+":"+av(s,u[d])+";");else{var h=cl(e,t,u);switch(s){case"animation":case"animationName":{r+=Ih(s)+":"+h+";";break}default:r+=s+"{"+h+"}"}}}return r}var sv=/label:\s*([^\s;{]+)\s*(;|$)/g,di;function fl(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,a="";di=void 0;var s=e[0];if(s==null||s.raw===void 0)r=!1,a+=cl(n,t,s);else{var u=s;a+=u[0]}for(var f=1;f<e.length;f++)if(a+=cl(n,t,e[f]),r){var d=s;a+=d[f]}sv.lastIndex=0;for(var h="",g;(g=sv.exec(a))!==null;)h+="-"+g[1];var y=tA(a)+h;return{name:y,styles:a,next:di}}var aA=function(t){return t()},lv=oc.useInsertionEffect?oc.useInsertionEffect:!1,uv=lv||aA,cv=lv||N.useLayoutEffect,fv=N.createContext(typeof HTMLElement<"u"?J0({key:"css"}):null),sA=fv.Provider,Mh=function(t){return N.forwardRef(function(n,r){var a=N.useContext(fv);return t(n,a,r)})},dl=N.createContext({}),Dh={}.hasOwnProperty,Bh="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",lA=function(t,n){var r={};for(var a in n)Dh.call(n,a)&&(r[a]=n[a]);return r[Bh]=t,r},uA=function(t){var n=t.cache,r=t.serialized,a=t.isStringTag;return Oh(n,r,a),uv(function(){return Nh(n,r,a)}),null},cA=Mh(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var a=e[Bh],s=[r],u="";typeof e.className=="string"?u=rv(t.registered,s,e.className):e.className!=null&&(u=e.className+" ");var f=fl(s,void 0,N.useContext(dl));u+=t.key+"-"+f.name;var d={};for(var h in e)Dh.call(e,h)&&h!=="css"&&h!==Bh&&(d[h]=e[h]);return d.className=u,n&&(d.ref=n),N.createElement(N.Fragment,null,N.createElement(uA,{cache:t,serialized:f,isStringTag:typeof a=="string"}),N.createElement(a,d))}),fA=cA,dv=function(t,n){var r=arguments;if(n==null||!Dh.call(n,"css"))return N.createElement.apply(void 0,r);var a=r.length,s=new Array(a);s[0]=fA,s[1]=lA(t,n);for(var u=2;u<a;u++)s[u]=r[u];return N.createElement.apply(null,s)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(dv||(dv={}));var dA=Mh(function(e,t){var n=e.styles,r=fl([n],void 0,N.useContext(dl)),a=N.useRef();return cv(function(){var s=t.key+"-global",u=new t.sheet.constructor({key:s,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),f=!1,d=document.querySelector('style[data-emotion="'+s+" "+r.name+'"]');return t.sheet.tags.length&&(u.before=t.sheet.tags[0]),d!==null&&(f=!0,d.setAttribute("data-emotion",s),u.hydrate([d])),a.current=[u,f],function(){u.flush()}},[t]),cv(function(){var s=a.current,u=s[0],f=s[1];if(f){s[1]=!1;return}if(r.next!==void 0&&Nh(t,r.next,!0),u.tags.length){var d=u.tags[u.tags.length-1].nextElementSibling;u.before=d,u.flush()}t.insert("",r,u,!1)},[t,r.name]),null});function zh(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return fl(t)}function hl(){var e=zh.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const pl={black:"#000",white:"#fff"},Ha={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},Va={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},Fa={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},Ga={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},qa={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"},ml={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},hA={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};function Ni(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Kr="$$material";var pA=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,mA=K0(function(e){return pA.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),gA=mA,yA=function(t){return t!=="theme"},hv=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?gA:yA},pv=function(t,n,r){var a;if(n){var s=n.shouldForwardProp;a=t.__emotion_forwardProp&&s?function(u){return t.__emotion_forwardProp(u)&&s(u)}:s}return typeof a!="function"&&r&&(a=t.__emotion_forwardProp),a},vA=function(t){var n=t.cache,r=t.serialized,a=t.isStringTag;return Oh(n,r,a),uv(function(){return Nh(n,r,a)}),null},bA=function e(t,n){var r=t.__emotion_real===t,a=r&&t.__emotion_base||t,s,u;n!==void 0&&(s=n.label,u=n.target);var f=pv(t,n,r),d=f||hv(a),h=!d("as");return function(){var g=arguments,y=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&y.push("label:"+s+";"),g[0]==null||g[0].raw===void 0)y.push.apply(y,g);else{var b=g[0];y.push(b[0]);for(var v=g.length,x=1;x<v;x++)y.push(g[x],b[x])}var E=Mh(function(_,w,O){var T=h&&_.as||a,A="",M=[],R=_;if(_.theme==null){R={};for(var $ in _)R[$]=_[$];R.theme=N.useContext(dl)}typeof _.className=="string"?A=rv(w.registered,M,_.className):_.className!=null&&(A=_.className+" ");var H=fl(y.concat(M),w.registered,R);A+=w.key+"-"+H.name,u!==void 0&&(A+=" "+u);var V=h&&f===void 0?hv(T):d,K={};for(var G in _)h&&G==="as"||V(G)&&(K[G]=_[G]);return K.className=A,O&&(K.ref=O),N.createElement(N.Fragment,null,N.createElement(vA,{cache:w,serialized:H,isStringTag:typeof T=="string"}),N.createElement(T,K))});return E.displayName=s!==void 0?s:"Styled("+(typeof a=="string"?a:a.displayName||a.name||"Component")+")",E.defaultProps=t.defaultProps,E.__emotion_real=E,E.__emotion_base=a,E.__emotion_styles=y,E.__emotion_forwardProp=f,Object.defineProperty(E,"toString",{value:function(){return"."+u}}),E.withComponent=function(_,w){var O=e(_,ac({},n,w,{shouldForwardProp:pv(E,w,!0)}));return O.apply(void 0,y)},E}},SA=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],Lh=bA.bind(null);SA.forEach(function(e){Lh[e]=Lh(e)});function xA(e){return e==null||Object.keys(e).length===0}function mv(e){const{styles:t,defaultTheme:n={}}=e,r=typeof t=="function"?a=>t(xA(a)?n:a):t;return L.jsx(dA,{styles:r})}function gv(e,t){return Lh(e,t)}function EA(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const yv=[];function so(e){return yv[0]=e,fl(yv)}var $h={exports:{}},Bt={};var vv;function _A(){if(vv)return Bt;vv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),b=Symbol.for("react.view_transition"),v=Symbol.for("react.client.reference");function x(E){if(typeof E=="object"&&E!==null){var _=E.$$typeof;switch(_){case e:switch(E=E.type,E){case n:case a:case r:case d:case h:case b:return E;default:switch(E=E&&E.$$typeof,E){case u:case f:case y:case g:return E;case s:return E;default:return _}}case t:return _}}}return Bt.ContextConsumer=s,Bt.ContextProvider=u,Bt.Element=e,Bt.ForwardRef=f,Bt.Fragment=n,Bt.Lazy=y,Bt.Memo=g,Bt.Portal=t,Bt.Profiler=a,Bt.StrictMode=r,Bt.Suspense=d,Bt.SuspenseList=h,Bt.isContextConsumer=function(E){return x(E)===s},Bt.isContextProvider=function(E){return x(E)===u},Bt.isElement=function(E){return typeof E=="object"&&E!==null&&E.$$typeof===e},Bt.isForwardRef=function(E){return x(E)===f},Bt.isFragment=function(E){return x(E)===n},Bt.isLazy=function(E){return x(E)===y},Bt.isMemo=function(E){return x(E)===g},Bt.isPortal=function(E){return x(E)===t},Bt.isProfiler=function(E){return x(E)===a},Bt.isStrictMode=function(E){return x(E)===r},Bt.isSuspense=function(E){return x(E)===d},Bt.isSuspenseList=function(E){return x(E)===h},Bt.isValidElementType=function(E){return typeof E=="string"||typeof E=="function"||E===n||E===a||E===r||E===d||E===h||typeof E=="object"&&E!==null&&(E.$$typeof===y||E.$$typeof===g||E.$$typeof===u||E.$$typeof===s||E.$$typeof===f||E.$$typeof===v||E.getModuleId!==void 0)},Bt.typeOf=x,Bt}var bv;function wA(){return bv||(bv=1,$h.exports=_A()),$h.exports}var Sv=wA();function hi(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function xv(e){if(N.isValidElement(e)||Sv.isValidElementType(e)||!hi(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=xv(e[n])}),t}function Bn(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return hi(e)&&hi(t)&&Object.keys(t).forEach(a=>{N.isValidElement(t[a])||Sv.isValidElementType(t[a])?r[a]=t[a]:hi(t[a])&&Object.prototype.hasOwnProperty.call(e,a)&&hi(e[a])?r[a]=Bn(e[a],t[a],n):n.clone?r[a]=hi(t[a])?xv(t[a]):t[a]:r[a]=t[a]}),r}const CA=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function TA(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...a}=e,s=CA(t),u=Object.keys(s);function f(b){return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${n})`}function d(b){return`@media (max-width:${(typeof t[b]=="number"?t[b]:b)-r/100}${n})`}function h(b,v){const x=u.indexOf(v);return`@media (min-width:${typeof t[b]=="number"?t[b]:b}${n}) and (max-width:${(x!==-1&&typeof t[u[x]]=="number"?t[u[x]]:v)-r/100}${n})`}function g(b){return u.indexOf(b)+1<u.length?h(b,u[u.indexOf(b)+1]):f(b)}function y(b){const v=u.indexOf(b);return v===0?f(u[1]):v===u.length-1?d(u[v]):h(b,u[u.indexOf(b)+1]).replace("@media","@media not all and")}return{keys:u,values:s,up:f,down:d,between:h,only:g,not:y,unit:n,...a}}function Ev(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter(r=>r.startsWith("@container")).sort((r,a)=>{const s=/min-width:\s*([0-9.]+)/;return+(r.match(s)?.[1]||0)-+(a.match(s)?.[1]||0)});return n.length?n.reduce((r,a)=>{const s=t[a];return delete r[a],r[a]=s,r},{...t}):t}function AA(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function kA(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,a]=n,s=Number.isNaN(+r)?r||0:+r;return e.containerQueries(a).up(s)}function RA(e){const t=(s,u)=>s.replace("@media",u?`@container ${u}`:"@container");function n(s,u){s.up=(...f)=>t(e.breakpoints.up(...f),u),s.down=(...f)=>t(e.breakpoints.down(...f),u),s.between=(...f)=>t(e.breakpoints.between(...f),u),s.only=(...f)=>t(e.breakpoints.only(...f),u),s.not=(...f)=>{const d=t(e.breakpoints.not(...f),u);return d.includes("not all and")?d.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):d}}const r={},a=s=>(n(r,s),r);return n(a),{...e,containerQueries:a}}const OA={borderRadius:4};function gl(e,t){return t?Bn(e,t,{clone:!1}):e}const sc={xs:0,sm:600,md:900,lg:1200,xl:1536},_v={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${sc[e]}px)`},NA={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:sc[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Wr(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||_v;return t.reduce((u,f,d)=>(u[s.up(s.keys[d])]=n(t[d]),u),{})}if(typeof t=="object"){const s=r.breakpoints||_v;return Object.keys(t).reduce((u,f)=>{if(AA(s.keys,f)){const d=kA(r.containerQueries?r:NA,f);d&&(u[d]=n(t[f],f))}else if(Object.keys(s.values||sc).includes(f)){const d=s.up(f);u[d]=n(t[f],f)}else{const d=f;u[d]=t[d]}return u},{})}return n(t)}function wv(e={}){return e.keys?.reduce((n,r)=>{const a=e.up(r);return n[a]={},n},{})||{}}function Ph(e,t){return e.reduce((n,r)=>{const a=n[r];return(!a||Object.keys(a).length===0)&&delete n[r],n},t)}function IA(e,...t){const n=wv(e),r=[n,...t].reduce((a,s)=>Bn(a,s),{});return Ph(Object.keys(n),r)}function MA(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((a,s)=>{s<e.length&&(n[a]=!0)}):r.forEach(a=>{e[a]!=null&&(n[a]=!0)}),n}function Uh({values:e,breakpoints:t,base:n}){const r=n||MA(e,t),a=Object.keys(r);if(a.length===0)return e;let s;return a.reduce((u,f,d)=>(Array.isArray(e)?(u[f]=e[d]!=null?e[d]:e[s],s=d):typeof e=="object"?(u[f]=e[f]!=null?e[f]:e[s],s=f):u[f]=e,u),{})}function ye(e){if(typeof e!="string")throw new Error(Ni(7));return e.charAt(0).toUpperCase()+e.slice(1)}function pi(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((a,s)=>a&&a[s]?a[s]:null,e);if(r!=null)return r}return t.split(".").reduce((r,a)=>r&&r[a]!=null?r[a]:null,e)}function lc(e,t,n,r=n){let a;return typeof e=="function"?a=e(n):Array.isArray(e)?a=e[n]||r:a=pi(e,n)||r,t&&(a=t(a,r,e)),a}function gn(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:a}=e,s=u=>{if(u[t]==null)return null;const f=u[t],d=u.theme,h=pi(d,r)||{};return Wr(u,f,y=>{let b=lc(h,a,y);return y===b&&typeof y=="string"&&(b=lc(h,a,`${t}${y==="default"?"":ye(y)}`,y)),n===!1?b:{[n]:b}})};return s.propTypes={},s.filterProps=[t],s}function DA(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const BA={m:"margin",p:"padding"},zA={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},Cv={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},LA=DA(e=>{if(e.length>2)if(Cv[e])e=Cv[e];else return[e];const[t,n]=e.split(""),r=BA[t],a=zA[n]||"";return Array.isArray(a)?a.map(s=>r+s):[r+a]}),jh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Hh=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...jh,...Hh];function yl(e,t,n,r){const a=pi(e,t,!0)??n;return typeof a=="number"||typeof a=="string"?s=>typeof s=="string"?s:typeof a=="string"?a.startsWith("var(")&&s===0?0:a.startsWith("var(")&&s===1?a:`calc(${s} * ${a})`:a*s:Array.isArray(a)?s=>{if(typeof s=="string")return s;const u=Math.abs(s),f=a[u];return s>=0?f:typeof f=="number"?-f:typeof f=="string"&&f.startsWith("var(")?`calc(-1 * ${f})`:`-${f}`}:typeof a=="function"?a:()=>{}}function uc(e){return yl(e,"spacing",8)}function Xo(e,t){return typeof t=="string"||t==null?t:e(t)}function $A(e,t){return n=>e.reduce((r,a)=>(r[a]=Xo(t,n),r),{})}function PA(e,t,n,r){if(!t.includes(n))return null;const a=LA(n),s=$A(a,r),u=e[n];return Wr(e,u,s)}function Tv(e,t){const n=uc(e.theme);return Object.keys(e).map(r=>PA(e,t,r,n)).reduce(gl,{})}function ln(e){return Tv(e,jh)}ln.propTypes={},ln.filterProps=jh;function un(e){return Tv(e,Hh)}un.propTypes={},un.filterProps=Hh;function Av(e=8,t=uc({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(s=>{const u=t(s);return typeof u=="number"?`${u}px`:u}).join(" ");return n.mui=!0,n}function cc(...e){const t=e.reduce((r,a)=>(a.filterProps.forEach(s=>{r[s]=a}),r),{}),n=r=>Object.keys(r).reduce((a,s)=>t[s]?gl(a,t[s](r)):a,{});return n.propTypes={},n.filterProps=e.reduce((r,a)=>r.concat(a.filterProps),[]),n}function Mr(e){return typeof e!="number"?e:`${e}px solid`}function Dr(e,t){return gn({prop:e,themeKey:"borders",transform:t})}const UA=Dr("border",Mr),jA=Dr("borderTop",Mr),HA=Dr("borderRight",Mr),VA=Dr("borderBottom",Mr),FA=Dr("borderLeft",Mr),GA=Dr("borderColor"),qA=Dr("borderTopColor"),YA=Dr("borderRightColor"),XA=Dr("borderBottomColor"),ZA=Dr("borderLeftColor"),KA=Dr("outline",Mr),WA=Dr("outlineColor"),fc=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=yl(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Xo(t,r)});return Wr(e,e.borderRadius,n)}return null};fc.propTypes={},fc.filterProps=["borderRadius"],cc(UA,jA,HA,VA,FA,GA,qA,YA,XA,ZA,fc,KA,WA);const dc=e=>{if(e.gap!==void 0&&e.gap!==null){const t=yl(e.theme,"spacing",8),n=r=>({gap:Xo(t,r)});return Wr(e,e.gap,n)}return null};dc.propTypes={},dc.filterProps=["gap"];const hc=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=yl(e.theme,"spacing",8),n=r=>({columnGap:Xo(t,r)});return Wr(e,e.columnGap,n)}return null};hc.propTypes={},hc.filterProps=["columnGap"];const pc=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=yl(e.theme,"spacing",8),n=r=>({rowGap:Xo(t,r)});return Wr(e,e.rowGap,n)}return null};pc.propTypes={},pc.filterProps=["rowGap"];const QA=gn({prop:"gridColumn"}),JA=gn({prop:"gridRow"}),ek=gn({prop:"gridAutoFlow"}),tk=gn({prop:"gridAutoColumns"}),nk=gn({prop:"gridAutoRows"}),rk=gn({prop:"gridTemplateColumns"}),ik=gn({prop:"gridTemplateRows"}),ok=gn({prop:"gridTemplateAreas"}),ak=gn({prop:"gridArea"});cc(dc,hc,pc,QA,JA,ek,tk,nk,rk,ik,ok,ak);function Ya(e,t){return t==="grey"?t:e}const sk=gn({prop:"color",themeKey:"palette",transform:Ya}),lk=gn({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ya}),uk=gn({prop:"backgroundColor",themeKey:"palette",transform:Ya});cc(sk,lk,uk);function vr(e){return e<=1&&e!==0?`${e*100}%`:e}const ck=gn({prop:"width",transform:vr}),Vh=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{const r=e.theme?.breakpoints?.values?.[n]||sc[n];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:vr(n)}};return Wr(e,e.maxWidth,t)}return null};Vh.filterProps=["maxWidth"];const fk=gn({prop:"minWidth",transform:vr}),dk=gn({prop:"height",transform:vr}),hk=gn({prop:"maxHeight",transform:vr}),pk=gn({prop:"minHeight",transform:vr});gn({prop:"size",cssProperty:"width",transform:vr}),gn({prop:"size",cssProperty:"height",transform:vr});const mk=gn({prop:"boxSizing"});cc(ck,Vh,fk,dk,hk,pk,mk);const vl={border:{themeKey:"borders",transform:Mr},borderTop:{themeKey:"borders",transform:Mr},borderRight:{themeKey:"borders",transform:Mr},borderBottom:{themeKey:"borders",transform:Mr},borderLeft:{themeKey:"borders",transform:Mr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Mr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:fc},color:{themeKey:"palette",transform:Ya},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Ya},backgroundColor:{themeKey:"palette",transform:Ya},p:{style:un},pt:{style:un},pr:{style:un},pb:{style:un},pl:{style:un},px:{style:un},py:{style:un},padding:{style:un},paddingTop:{style:un},paddingRight:{style:un},paddingBottom:{style:un},paddingLeft:{style:un},paddingX:{style:un},paddingY:{style:un},paddingInline:{style:un},paddingInlineStart:{style:un},paddingInlineEnd:{style:un},paddingBlock:{style:un},paddingBlockStart:{style:un},paddingBlockEnd:{style:un},m:{style:ln},mt:{style:ln},mr:{style:ln},mb:{style:ln},ml:{style:ln},mx:{style:ln},my:{style:ln},margin:{style:ln},marginTop:{style:ln},marginRight:{style:ln},marginBottom:{style:ln},marginLeft:{style:ln},marginX:{style:ln},marginY:{style:ln},marginInline:{style:ln},marginInlineStart:{style:ln},marginInlineEnd:{style:ln},marginBlock:{style:ln},marginBlockStart:{style:ln},marginBlockEnd:{style:ln},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:dc},rowGap:{style:pc},columnGap:{style:hc},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:vr},maxWidth:{style:Vh},minWidth:{transform:vr},height:{transform:vr},maxHeight:{transform:vr},minHeight:{transform:vr},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function gk(...e){const t=e.reduce((r,a)=>r.concat(Object.keys(a)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function yk(e,t){return typeof e=="function"?e(t):e}function vk(){function e(n,r,a,s){const u={[n]:r,theme:a},f=s[n];if(!f)return{[n]:r};const{cssProperty:d=n,themeKey:h,transform:g,style:y}=f;if(r==null)return null;if(h==="typography"&&r==="inherit")return{[n]:r};const b=pi(a,h)||{};return y?y(u):Wr(u,r,x=>{let E=lc(b,g,x);return x===E&&typeof x=="string"&&(E=lc(b,g,`${n}${x==="default"?"":ye(x)}`,x)),d===!1?E:{[d]:E}})}function t(n){const{sx:r,theme:a={},nested:s}=n||{};if(!r)return null;const u=a.unstable_sxConfig??vl;function f(d){let h=d;if(typeof d=="function")h=d(a);else if(typeof d!="object")return d;if(!h)return null;const g=wv(a.breakpoints),y=Object.keys(g);let b=g;return Object.keys(h).forEach(v=>{const x=yk(h[v],a);if(x!=null)if(typeof x=="object")if(u[v])b=gl(b,e(v,x,a,u));else{const E=Wr({theme:a},x,_=>({[v]:_}));gk(E,x)?b[v]=t({sx:x,theme:a,nested:!0}):b=gl(b,E)}else b=gl(b,e(v,x,a,u))}),!s&&a.modularCssLayers?{"@layer sx":Ev(a,Ph(y,b))}:Ev(a,Ph(y,b))}return Array.isArray(r)?r.map(f):f(r)}return t}const lo=vk();lo.filterProps=["sx"];function bk(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||typeof n.getColorSchemeSelector!="function")return{};let r=n.getColorSchemeSelector(e);return r==="&"?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function mc(e={},...t){const{breakpoints:n={},palette:r={},spacing:a,shape:s={},...u}=e,f=TA(n),d=Av(a);let h=Bn({breakpoints:f,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:d,shape:{...OA,...s}},u);return h=RA(h),h.applyStyles=bk,h=t.reduce((g,y)=>Bn(g,y),h),h.unstable_sxConfig={...vl,...u?.unstable_sxConfig},h.unstable_sx=function(y){return lo({sx:y,theme:this})},h}function Sk(e){return Object.keys(e).length===0}function gc(e=null){const t=N.useContext(dl);return!t||Sk(t)?e:t}const xk=mc();function yc(e=xk){return gc(e)}function Fh(e){const t=so(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function kv({styles:e,themeId:t,defaultTheme:n={}}){const r=yc(n),a=t&&r[t]||r;let s=typeof e=="function"?e(a):e;return a.modularCssLayers&&(Array.isArray(s)?s=s.map(u=>Fh(typeof u=="function"?u(a):u)):s=Fh(s)),L.jsx(mv,{styles:s})}const Ek=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??vl;return Object.keys(e).forEach(r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]}),t};function Gh(e){const{sx:t,...n}=e,{systemProps:r,otherProps:a}=Ek(n);let s;return Array.isArray(t)?s=[r,...t]:typeof t=="function"?s=(...u)=>{const f=t(...u);return hi(f)?{...r,...f}:r}:s={...r,...t},{...a,sx:s}}const Rv=e=>e,Ov=(()=>{let e=Rv;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Rv}}})();function Nv(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=Nv(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ue(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Nv(e))&&(r&&(r+=" "),r+=t);return r}function _k(e={}){const{themeId:t,defaultTheme:n,defaultClassName:r="MuiBox-root",generateClassName:a}=e,s=gv("div",{shouldForwardProp:f=>f!=="theme"&&f!=="sx"&&f!=="as"})(lo);return N.forwardRef(function(d,h){const g=yc(n),{className:y,component:b="div",...v}=Gh(d);return L.jsx(s,{as:b,ref:h,className:Ue(y,a?a(r):r),theme:t&&g[t]||g,...v})})}const wk={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Et(e,t,n="Mui"){const r=wk[t];return r?`${n}-${r}`:`${Ov.generate(e)}-${t}`}function _t(e,t,n="Mui"){const r={};return t.forEach(a=>{r[a]=Et(e,a,n)}),r}function Iv(e){const{variants:t,...n}=e,r={variants:t,style:so(n),isProcessed:!0};return r.style===n||t&&t.forEach(a=>{typeof a.style!="function"&&(a.style=so(a.style))}),r}const Ck=mc();function qh(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Zo(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function Tk(e){return e?(t,n)=>n[e]:null}function Ak(e,t,n){e.theme=Rk(e.theme)?n:e.theme[t]||e.theme}function vc(e,t,n){const r=typeof t=="function"?t(e):t;if(Array.isArray(r))return r.flatMap(a=>vc(e,a,n));if(Array.isArray(r?.variants)){let a;if(r.isProcessed)a=n?Zo(r.style,n):r.style;else{const{variants:s,...u}=r;a=n?Zo(so(u),n):u}return Mv(e,r.variants,[a],n)}return r?.isProcessed?n?Zo(so(r.style),n):r.style:n?Zo(so(r),n):r}function Mv(e,t,n=[],r=void 0){let a;e:for(let s=0;s<t.length;s+=1){const u=t[s];if(typeof u.props=="function"){if(a??={...e,...e.ownerState,ownerState:e.ownerState},!u.props(a))continue}else for(const f in u.props)if(e[f]!==u.props[f]&&e.ownerState?.[f]!==u.props[f])continue e;typeof u.style=="function"?(a??={...e,...e.ownerState,ownerState:e.ownerState},n.push(r?Zo(so(u.style(a)),r):u.style(a))):n.push(r?Zo(so(u.style),r):u.style)}return n}function Dv(e={}){const{themeId:t,defaultTheme:n=Ck,rootShouldForwardProp:r=qh,slotShouldForwardProp:a=qh}=e;function s(f){Ak(f,t,n)}return(f,d={})=>{EA(f,R=>R.filter($=>$!==lo));const{name:h,slot:g,skipVariantsResolver:y,skipSx:b,overridesResolver:v=Tk(Nk(g)),...x}=d,E=h&&h.startsWith("Mui")||g?"components":"custom",_=y!==void 0?y:g&&g!=="Root"&&g!=="root"||!1,w=b||!1;let O=qh;g==="Root"||g==="root"?O=r:g?O=a:Ok(f)&&(O=void 0);const T=gv(f,{shouldForwardProp:O,label:kk(),...x}),A=R=>{if(R.__emotion_real===R)return R;if(typeof R=="function")return function(H){return vc(H,R,H.theme.modularCssLayers?E:void 0)};if(hi(R)){const $=Iv(R);return function(V){return $.variants?vc(V,$,V.theme.modularCssLayers?E:void 0):V.theme.modularCssLayers?Zo($.style,E):$.style}}return R},M=(...R)=>{const $=[],H=R.map(A),V=[];if($.push(s),h&&v&&V.push(function(q){const P=q.theme.components?.[h]?.styleOverrides;if(!P)return null;const D={};for(const Z in P)D[Z]=vc(q,P[Z],q.theme.modularCssLayers?"theme":void 0);return v(q,D)}),h&&!_&&V.push(function(q){const P=q.theme?.components?.[h]?.variants;return P?Mv(q,P,[],q.theme.modularCssLayers?"theme":void 0):null}),w||V.push(lo),Array.isArray(H[0])){const C=H.shift(),q=new Array($.length).fill(""),U=new Array(V.length).fill("");let P;P=[...q,...C,...U],P.raw=[...q,...C.raw,...U],$.unshift(P)}const K=[...$,...H,...V],G=T(...K);return f.muiName&&(G.muiName=f.muiName),G};return T.withConfig&&(M.withConfig=T.withConfig),M}}function kk(e,t){return void 0}function Rk(e){for(const t in e)return!1;return!0}function Ok(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Nk(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Ik=Dv();function bl(e,t,n=!1){const r={...t};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const s=a;if(s==="components"||s==="slots")r[s]={...e[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){const u=e[s],f=t[s];if(!f)r[s]=u||{};else if(!u)r[s]=f;else{r[s]={...f};for(const d in u)if(Object.prototype.hasOwnProperty.call(u,d)){const h=d;r[s][h]=bl(u[h],f[h],n)}}}else s==="className"&&n&&t.className?r.className=Ue(e?.className,t?.className):s==="style"&&n&&t.style?r.style={...e?.style,...t?.style}:r[s]===void 0&&(r[s]=e[s])}return r}function Bv(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:bl(t.components[n].defaultProps,r)}function Mk({props:e,name:t,defaultTheme:n,themeId:r}){let a=yc(n);return r&&(a=a[r]||a),Bv({theme:a,name:t,props:e})}const mi=typeof window<"u"?N.useLayoutEffect:N.useEffect;function Dk(e,t,n,r,a){const[s,u]=N.useState(()=>a&&n?n(e).matches:r?r(e).matches:t);return mi(()=>{if(!n)return;const f=n(e),d=()=>{u(f.matches)};return d(),f.addEventListener("change",d),()=>{f.removeEventListener("change",d)}},[e,n]),s}const zv={...oc}.useSyncExternalStore;function Bk(e,t,n,r,a){const s=N.useCallback(()=>t,[t]),u=N.useMemo(()=>{if(a&&n)return()=>n(e).matches;if(r!==null){const{matches:g}=r(e);return()=>g}return s},[s,e,r,a,n]),[f,d]=N.useMemo(()=>{if(n===null)return[s,()=>()=>{}];const g=n(e);return[()=>g.matches,y=>(g.addEventListener("change",y),()=>{g.removeEventListener("change",y)})]},[s,n,e]);return zv(d,f,u)}function Lv(e={}){const{themeId:t}=e;return function(r,a={}){let s=gc();s&&t&&(s=s[t]||s);const u=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:f=!1,matchMedia:d=u?window.matchMedia:null,ssrMatchMedia:h=null,noSsr:g=!1}=Bv({name:"MuiUseMediaQuery",props:a,theme:s});let y=typeof r=="function"?r(s):r;return y=y.replace(/^@media( ?)/m,""),y.includes("print")&&console.warn(["MUI: You have provided a `print` query to the `useMediaQuery` hook.","Using the print media query to modify print styles can lead to unexpected results.","Consider using the `displayPrint` field in the `sx` prop instead.","More information about `displayPrint` on our docs: https://mui.com/system/display/#display-in-print."].join(`
|
|
10
|
+
`)),(zv!==void 0?Bk:Dk)(y,f,d,h,g)}}Lv();function zk(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function Yh(e,t=0,n=1){return zk(e,t,n)}function Lk(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,a)=>a<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function uo(e){if(e.type)return e;if(e.charAt(0)==="#")return uo(Lk(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Ni(9,e));let r=e.substring(t+1,e.length-1),a;if(n==="color"){if(r=r.split(" "),a=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(a))throw new Error(Ni(10,a))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:a}}const $k=e=>{const t=uo(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},Sl=(e,t)=>{try{return $k(e)}catch{return e}};function bc(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((a,s)=>s<3?parseInt(a,10):a):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function $v(e){e=uo(e);const{values:t}=e,n=t[0],r=t[1]/100,a=t[2]/100,s=r*Math.min(a,1-a),u=(h,g=(h+n/30)%12)=>a-s*Math.max(Math.min(g-3,9-g,1),-1);let f="rgb";const d=[Math.round(u(0)*255),Math.round(u(8)*255),Math.round(u(4)*255)];return e.type==="hsla"&&(f+="a",d.push(t[3])),bc({type:f,values:d})}function Xh(e){e=uo(e);let t=e.type==="hsl"||e.type==="hsla"?uo($v(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Pk(e,t){const n=Xh(e),r=Xh(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function xl(e,t){return e=uo(e),t=Yh(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,bc(e)}function Ko(e,t,n){try{return xl(e,t)}catch{return e}}function Sc(e,t){if(e=uo(e),t=Yh(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return bc(e)}function kt(e,t,n){try{return Sc(e,t)}catch{return e}}function xc(e,t){if(e=uo(e),t=Yh(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return bc(e)}function Rt(e,t,n){try{return xc(e,t)}catch{return e}}function Uk(e,t=.15){return Xh(e)>.5?Sc(e,t):xc(e,t)}function Ec(e,t,n){try{return Uk(e,t)}catch{return e}}const Pv=N.createContext(null);function Zh(){return N.useContext(Pv)}const jk=typeof Symbol=="function"&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function Hk(e,t){return typeof t=="function"?t(e):{...e,...t}}function Vk(e){const{children:t,theme:n}=e,r=Zh(),a=N.useMemo(()=>{const s=r===null?{...n}:Hk(r,n);return s!=null&&(s[jk]=r!==null),s},[n,r]);return L.jsx(Pv.Provider,{value:a,children:t})}const Uv=N.createContext();function Fk({value:e,...t}){return L.jsx(Uv.Provider,{value:e??!0,...t})}const Gk=()=>N.useContext(Uv)??!1,jv=N.createContext(void 0);function qk({value:e,children:t}){return L.jsx(jv.Provider,{value:e,children:t})}function Yk(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const a=t.components[n];return a.defaultProps?bl(a.defaultProps,r,t.components.mergeClassNameAndStyle):!a.styleOverrides&&!a.variants?bl(a,r,t.components.mergeClassNameAndStyle):r}function Xk({props:e,name:t}){const n=N.useContext(jv);return Yk({props:e,name:t,theme:{components:n}})}let Hv=0;function Zk(e){const[t,n]=N.useState(e),r=e||t;return N.useEffect(()=>{t==null&&(Hv+=1,n(`mui-${Hv}`))},[t]),r}const Vv={...oc}.useId;function El(e){if(Vv!==void 0){const t=Vv();return e??t}return Zk(e)}function Kk(e){const t=gc(),n=El()||"",{modularCssLayers:r}=e;let a="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return!r||t!==null?a="":typeof r=="string"?a=r.replace(/mui(?!\.)/g,a):a=`@layer ${a};`,mi(()=>{const s=document.querySelector("head");if(!s)return;const u=s.firstChild;if(a){if(u&&u.hasAttribute?.("data-mui-layer-order")&&u.getAttribute("data-mui-layer-order")===n)return;const f=document.createElement("style");f.setAttribute("data-mui-layer-order",n),f.textContent=a,s.prepend(f)}else s.querySelector(`style[data-mui-layer-order="${n}"]`)?.remove()},[a,n]),a?L.jsx(kv,{styles:a}):null}const Fv={};function Gv(e,t,n,r=!1){return N.useMemo(()=>{const a=e&&t[e]||t;if(typeof n=="function"){const s=n(a),u=e?{...t,[e]:s}:s;return r?()=>u:u}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function qv(e){const{children:t,theme:n,themeId:r}=e,a=gc(Fv),s=Zh()||Fv,u=Gv(r,a,n),f=Gv(r,s,n,!0),d=(r?u[r]:u).direction==="rtl",h=Kk(u);return L.jsx(Vk,{theme:f,children:L.jsx(dl.Provider,{value:u,children:L.jsx(Fk,{value:d,children:L.jsxs(qk,{value:r?u[r].components:u.components,children:[h,t]})})})})}const Yv={theme:void 0};function Wk(e){let t,n;return function(a){let s=t;return(s===void 0||a.theme!==n)&&(Yv.theme=a.theme,s=Iv(e(Yv)),t=s,n=a.theme),s}}const Kh="mode",Wh="color-scheme",Qk="data-color-scheme";function Jk(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:a=Kh,colorSchemeStorageKey:s=Wh,attribute:u=Qk,colorSchemeNode:f="document.documentElement",nonce:d}=e||{};let h="",g=u;if(u==="class"&&(g=".%s"),u==="data"&&(g="[data-%s]"),g.startsWith(".")){const b=g.substring(1);h+=`${f}.classList.remove('${b}'.replace('%s', light), '${b}'.replace('%s', dark));
|
|
11
11
|
${f}.classList.add('${b}'.replace('%s', colorScheme));`}const y=g.match(/\[([^[\]]+)\]/);if(y){const[b,v]=y[1].split("=");v||(h+=`${f}.removeAttribute('${b}'.replace('%s', light));
|
|
12
12
|
${f}.removeAttribute('${b}'.replace('%s', dark));`),h+=`
|
|
13
13
|
${f}.setAttribute('${b}'.replace('%s', colorScheme), ${v?`${v}.replace('%s', colorScheme)`:'""'});`}else g!==".%s"&&(h+=`${f}.setAttribute('${g}', colorScheme);`);return L.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?d:"",dangerouslySetInnerHTML:{__html:`(function() {
|
|
@@ -34,14 +34,14 @@ try {
|
|
|
34
34
|
if (colorScheme) {
|
|
35
35
|
${h}
|
|
36
36
|
}
|
|
37
|
-
} catch(e){}})();`}},"mui-color-scheme-init")}function eR(){}const tR=({key:e,storageWindow:t})=>(!t&&typeof window<"u"&&(t=window),{get(n){if(typeof window>"u")return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return eR;const r=a=>{const s=a.newValue;a.key===e&&n(s)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function Qh(){}function Xv(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Zv(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function nR(e){return Zv(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function rR(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:a=[],modeStorageKey:s=Kh,colorSchemeStorageKey:u=Wh,storageWindow:f=typeof window>"u"?void 0:window,storageManager:d=tR,noSsr:h=!1}=e,g=a.join(","),y=a.length>1,b=N.useMemo(()=>d?.({key:s,storageWindow:f}),[d,s,f]),v=N.useMemo(()=>d?.({key:`${u}-light`,storageWindow:f}),[d,u,f]),x=N.useMemo(()=>d?.({key:`${u}-dark`,storageWindow:f}),[d,u,f]),[E,_]=N.useState(()=>{const H=b?.get(t)||t,V=v?.get(n)||n,K=x?.get(r)||r;return{mode:H,systemMode:Xv(H),lightColorScheme:V,darkColorScheme:K}}),[w,O]=N.useState(h||!y);N.useEffect(()=>{O(!0)},[]);const T=nR(E),A=N.useCallback(H=>{_(V=>{if(H===V.mode)return V;const K=H??t;return b?.set(K),{...V,mode:K,systemMode:Xv(K)}})},[b,t]),M=N.useCallback(H=>{H?typeof H=="string"?H&&!g.includes(H)?console.error(`\`${H}\` does not exist in \`theme.colorSchemes\`.`):_(V=>{const K={...V};return Zv(V,G=>{G==="light"&&(v?.set(H),K.lightColorScheme=H),G==="dark"&&(x?.set(H),K.darkColorScheme=H)}),K}):_(V=>{const K={...V},G=H.light===null?n:H.light,C=H.dark===null?r:H.dark;return G&&(g.includes(G)?(K.lightColorScheme=G,v?.set(G)):console.error(`\`${G}\` does not exist in \`theme.colorSchemes\`.`)),C&&(g.includes(C)?(K.darkColorScheme=C,x?.set(C)):console.error(`\`${C}\` does not exist in \`theme.colorSchemes\`.`)),K}):_(V=>(v?.set(n),x?.set(r),{...V,lightColorScheme:n,darkColorScheme:r}))},[g,v,x,n,r]),R=N.useCallback(H=>{E.mode==="system"&&_(V=>{const K=H?.matches?"dark":"light";return V.systemMode===K?V:{...V,systemMode:K}})},[E.mode]),$=N.useRef(R);return $.current=R,N.useEffect(()=>{if(typeof window.matchMedia!="function"||!y)return;const H=(...K)=>$.current(...K),V=window.matchMedia("(prefers-color-scheme: dark)");return V.addListener(H),H(V),()=>{V.removeListener(H)}},[y]),N.useEffect(()=>{if(y){const H=b?.subscribe(G=>{(!G||["light","dark","system"].includes(G))&&A(G||t)})||Qh,V=v?.subscribe(G=>{(!G||g.match(G))&&M({light:G})})||Qh,K=x?.subscribe(G=>{(!G||g.match(G))&&M({dark:G})})||Qh;return()=>{H(),V(),K()}}},[M,A,g,t,f,y,b,v,x]),{...E,mode:w?E.mode:void 0,systemMode:w?E.systemMode:void 0,colorScheme:w?T:void 0,setMode:A,setColorScheme:M}}const iR="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function oR(e){const{themeId:t,theme:n={},modeStorageKey:r=Kh,colorSchemeStorageKey:a=Wh,disableTransitionOnChange:s=!1,defaultColorScheme:u,resolveTheme:f}=e,d={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},h=N.createContext(void 0),g=()=>N.useContext(h)||d,y={},b={};function v(w){const{children:O,theme:T,modeStorageKey:A=r,colorSchemeStorageKey:M=a,disableTransitionOnChange:R=s,storageManager:$,storageWindow:H=typeof window>"u"?void 0:window,documentNode:V=typeof document>"u"?void 0:document,colorSchemeNode:K=typeof document>"u"?void 0:document.documentElement,disableNestedContext:G=!1,disableStyleSheetGeneration:C=!1,defaultMode:q="system",forceThemeRerender:U=!1,noSsr:P}=w,D=N.useRef(!1),Z=Zh(),se=N.useContext(h),ue=!!se&&!G,B=N.useMemo(()=>T||(typeof n=="function"?n():n),[T]),z=B[t],W=z||B,{colorSchemes:I=y,components:pe=b,cssVarPrefix:ve}=W,he=Object.keys(I).filter(te=>!!I[te]).join(","),xe=N.useMemo(()=>he.split(","),[he]),Ke=typeof u=="string"?u:u.light,Ie=typeof u=="string"?u:u.dark,Me=I[Ke]&&I[Ie]?q:I[W.defaultColorScheme]?.palette?.mode||W.palette?.mode,{mode:Fe,setMode:ft,systemMode:Tn,lightColorScheme:$e,darkColorScheme:Je,colorScheme:Jt,setColorScheme:on}=rR({supportedColorSchemes:xe,defaultLightColorScheme:Ke,defaultDarkColorScheme:Ie,modeStorageKey:A,colorSchemeStorageKey:M,defaultMode:Me,storageManager:$,storageWindow:H,noSsr:P});let Ht=Fe,Tt=Jt;ue&&(Ht=se.mode,Tt=se.colorScheme);let an=Tt||W.defaultColorScheme;W.vars&&!U&&(an=W.defaultColorScheme);const It=N.useMemo(()=>{const te=W.generateThemeVars?.()||W.vars,ce={...W,components:pe,colorSchemes:I,cssVarPrefix:ve,vars:te};if(typeof ce.generateSpacing=="function"&&(ce.spacing=ce.generateSpacing()),an){const we=I[an];we&&typeof we=="object"&&Object.keys(we).forEach(ze=>{we[ze]&&typeof we[ze]=="object"?ce[ze]={...ce[ze],...we[ze]}:ce[ze]=we[ze]})}return f?f(ce):ce},[W,an,pe,I,ve]),Re=W.colorSchemeSelector;mi(()=>{if(Tt&&K&&Re&&Re!=="media"){const te=Re;let ce=Re;if(te==="class"&&(ce=".%s"),te==="data"&&(ce="[data-%s]"),te?.startsWith("data-")&&!te.includes("%s")&&(ce=`[${te}="%s"]`),ce.startsWith("."))K.classList.remove(...xe.map(we=>ce.substring(1).replace("%s",we))),K.classList.add(ce.substring(1).replace("%s",Tt));else{const we=ce.replace("%s",Tt).match(/\[([^\]]+)\]/);if(we){const[ze,We]=we[1].split("=");We||xe.forEach(et=>{K.removeAttribute(ze.replace(Tt,et))}),K.setAttribute(ze,We?We.replace(/"|'/g,""):"")}else K.setAttribute(ce,Tt)}}},[Tt,Re,K,xe]),N.useEffect(()=>{let te;if(R&&D.current&&V){const ce=V.createElement("style");ce.appendChild(V.createTextNode(iR)),V.head.appendChild(ce),window.getComputedStyle(V.body),te=setTimeout(()=>{V.head.removeChild(ce)},1)}return()=>{clearTimeout(te)}},[Tt,R,V]),N.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]);const Cr=N.useMemo(()=>({allColorSchemes:xe,colorScheme:Tt,darkColorScheme:Je,lightColorScheme:$e,mode:Ht,setColorScheme:on,setMode:ft,systemMode:Tn}),[xe,Tt,Je,$e,Ht,on,ft,Tn,It.colorSchemeSelector]);let tt=!0;(C||W.cssVariables===!1||ue&&Z?.cssVarPrefix===ve)&&(tt=!1);const oi=L.jsxs(N.Fragment,{children:[L.jsx(qv,{themeId:z?t:void 0,theme:It,children:O}),tt&&L.jsx(mv,{styles:It.generateStyleSheets?.()||[]})]});return ue?oi:L.jsx(h.Provider,{value:Cr,children:oi})}const x=typeof u=="string"?u:u.light,E=typeof u=="string"?u:u.dark;return{CssVarsProvider:v,useColorScheme:g,getInitColorSchemeScript:w=>Jk({colorSchemeStorageKey:a,defaultLightColorScheme:x,defaultDarkColorScheme:E,modeStorageKey:r,...w})}}function aR(e=""){function t(...r){if(!r.length)return"";const a=r[0];return typeof a=="string"&&!a.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${a}${t(...r.slice(1))})`:`, ${a}`}return(r,...a)=>`var(--${e?`${e}-`:""}${r}${t(...a)})`}const Kv=(e,t,n,r=[])=>{let a=e;t.forEach((s,u)=>{u===t.length-1?Array.isArray(a)?a[Number(s)]=n:a&&typeof a=="object"&&(a[s]=n):a&&typeof a=="object"&&(a[s]||(a[s]=r.includes(s)?[]:{}),a=a[s])})},sR=(e,t,n)=>{function r(a,s=[],u=[]){Object.entries(a).forEach(([f,d])=>{(!n||n&&!n([...s,f]))&&d!=null&&(typeof d=="object"&&Object.keys(d).length>0?r(d,[...s,f],Array.isArray(d)?[...u,f]:u):t([...s,f],d,u))})}r(e)},lR=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Jh(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},a={},s={},u={};return sR(e,(f,d,h)=>{if((typeof d=="string"||typeof d=="number")&&(!r||!r(f,d))){const g=`--${n?`${n}-`:""}${f.join("-")}`,y=lR(f,d);Object.assign(a,{[g]:y}),Kv(s,f,`var(${g})`,h),Kv(u,f,`var(${g}, ${y})`,h)}},f=>f[0]==="vars"),{css:a,vars:s,varsWithDefaults:u}}function uR(e,t={}){const{getSelector:n=w,disableCssColorScheme:r,colorSchemeSelector:a,enableContrastVars:s}=t,{colorSchemes:u={},components:f,defaultColorScheme:d="light",...h}=e,{vars:g,css:y,varsWithDefaults:b}=Jh(h,t);let v=b;const x={},{[d]:E,..._}=u;if(Object.entries(_||{}).forEach(([A,M])=>{const{vars:R,css:$,varsWithDefaults:H}=Jh(M,t);v=Bn(v,H),x[A]={css:$,vars:R}}),E){const{css:A,vars:M,varsWithDefaults:R}=Jh(E,t);v=Bn(v,R),x[d]={css:A,vars:M}}function w(A,M){let R=a;if(a==="class"&&(R=".%s"),a==="data"&&(R="[data-%s]"),a?.startsWith("data-")&&!a.includes("%s")&&(R=`[${a}="%s"]`),A){if(R==="media")return e.defaultColorScheme===A?":root":{[`@media (prefers-color-scheme: ${u[A]?.palette?.mode||A})`]:{":root":M}};if(R)return e.defaultColorScheme===A?`:root, ${R.replace("%s",String(A))}`:R.replace("%s",String(A))}return":root"}return{vars:v,generateThemeVars:()=>{let A={...g};return Object.entries(x).forEach(([,{vars:M}])=>{A=Bn(A,M)}),A},generateStyleSheets:()=>{const A=[],M=e.defaultColorScheme||"light";function R(V,K){Object.keys(K).length&&A.push(typeof V=="string"?{[V]:{...K}}:V)}R(n(void 0,{...y}),y);const{[M]:$,...H}=x;if($){const{css:V}=$,K=u[M]?.palette?.mode,G=!r&&K?{colorScheme:K,...V}:{...V};R(n(M,{...G}),G)}return Object.entries(H).forEach(([V,{css:K}])=>{const G=u[V]?.palette?.mode,C=!r&&G?{colorScheme:G,...K}:{...K};R(n(V,{...C}),C)}),s&&A.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),A}}}function cR(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}function wt(e,t,n=void 0){const r={};for(const a in e){const s=e[a];let u="",f=!0;for(let d=0;d<s.length;d+=1){const h=s[d];h&&(u+=(f===!0?"":" ")+t(h),f=!1,n&&n[h]&&(u+=" "+n[h]))}r[a]=u}return r}function ep(e,t){return N.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const fR=mc(),dR=Ik("div",{name:"MuiStack",slot:"Root"});function hR(e){return Mk({props:e,name:"MuiStack",defaultTheme:fR})}function pR(e,t){const n=N.Children.toArray(e).filter(Boolean);return n.reduce((r,a,s)=>(r.push(a),s<n.length-1&&r.push(N.cloneElement(t,{key:`separator-${s}`})),r),[])}const mR=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],gR=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...Wr({theme:t},Uh({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r}))};if(e.spacing){const r=uc(t),a=Object.keys(t.breakpoints.values).reduce((d,h)=>((typeof e.spacing=="object"&&e.spacing[h]!=null||typeof e.direction=="object"&&e.direction[h]!=null)&&(d[h]=!0),d),{}),s=Uh({values:e.direction,base:a}),u=Uh({values:e.spacing,base:a});typeof s=="object"&&Object.keys(s).forEach((d,h,g)=>{if(!s[d]){const b=h>0?s[g[h-1]]:"column";s[d]=b}}),n=Bn(n,Wr({theme:t},u,(d,h)=>e.useFlexGap?{gap:Xo(r,d)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${mR(h?s[h]:e.direction)}`]:Xo(r,d)}}))}return n=IA(t.breakpoints,n),n};function yR(e={}){const{createStyledComponent:t=dR,useThemeProps:n=hR,componentName:r="MuiStack"}=e,a=()=>wt({root:["root"]},d=>Et(r,d),{}),s=t(gR);return N.forwardRef(function(d,h){const g=n(d),y=Gh(g),{component:b="div",direction:v="column",spacing:x=0,divider:E,children:_,className:w,useFlexGap:O=!1,...T}=y,A={direction:v,spacing:x,useFlexGap:O},M=a();return L.jsx(s,{as:b,ownerState:A,ref:h,className:Ue(M.root,w),...T,children:E?pR(_,E):_})})}function Wv(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:hl.white,default:hl.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Qv=Wv();function Jv(){return{text:{primary:hl.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:hl.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const tp=Jv();function eb(e,t,n,r){const a=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=xc(e.main,a):t==="dark"&&(e.dark=Sc(e.main,s)))}function tb(e,t,n,r,a){const s=a.light||a,u=a.dark||a*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(s*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(u*100).toFixed(0)}%)`))}function vR(e="light"){return e==="dark"?{main:Fa[200],light:Fa[50],dark:Fa[400]}:{main:Fa[700],light:Fa[400],dark:Fa[800]}}function bR(e="light"){return e==="dark"?{main:Va[200],light:Va[50],dark:Va[400]}:{main:Va[500],light:Va[300],dark:Va[700]}}function SR(e="light"){return e==="dark"?{main:Ha[500],light:Ha[300],dark:Ha[700]}:{main:Ha[700],light:Ha[400],dark:Ha[800]}}function xR(e="light"){return e==="dark"?{main:Ga[400],light:Ga[300],dark:Ga[700]}:{main:Ga[700],light:Ga[500],dark:Ga[900]}}function ER(e="light"){return e==="dark"?{main:qa[400],light:qa[300],dark:qa[700]}:{main:qa[800],light:qa[500],dark:qa[900]}}function _R(e="light"){return e==="dark"?{main:pl[400],light:pl[300],dark:pl[700]}:{main:"#ed6c02",light:pl[500],dark:pl[900]}}function wR(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function np(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:a,...s}=e,u=e.primary||vR(t),f=e.secondary||bR(t),d=e.error||SR(t),h=e.info||xR(t),g=e.success||ER(t),y=e.warning||_R(t);function b(_){return a?wR(_):Pk(_,tp.text.primary)>=n?tp.text.primary:Qv.text.primary}const v=({color:_,name:w,mainShade:O=500,lightShade:T=300,darkShade:A=700})=>{if(_={..._},!_.main&&_[O]&&(_.main=_[O]),!_.hasOwnProperty("main"))throw new Error(Ni(11,w?` (${w})`:"",O));if(typeof _.main!="string")throw new Error(Ni(12,w?` (${w})`:"",JSON.stringify(_.main)));return a?(tb(a,_,"light",T,r),tb(a,_,"dark",A,r)):(eb(_,"light",T,r),eb(_,"dark",A,r)),_.contrastText||(_.contrastText=b(_.main)),_};let x;return t==="light"?x=Wv():t==="dark"&&(x=Jv()),Bn({common:{...hl},mode:t,primary:v({color:u,name:"primary"}),secondary:v({color:f,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:v({color:d,name:"error"}),warning:v({color:y,name:"warning"}),info:v({color:h,name:"info"}),success:v({color:g,name:"success"}),grey:hA,contrastThreshold:n,getContrastText:b,augmentColor:v,tonalOffset:r,...x},s)}function CR(e){const t={};return Object.entries(e).forEach(r=>{const[a,s]=r;typeof s=="object"&&(t[a]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function TR(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function AR(e){return Math.round(e*1e5)/1e5}const nb={textTransform:"uppercase"},rb='"Roboto", "Helvetica", "Arial", sans-serif';function ib(e,t){const{fontFamily:n=rb,fontSize:r=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:u=500,fontWeightBold:f=700,htmlFontSize:d=16,allVariants:h,pxToRem:g,...y}=typeof t=="function"?t(e):t,b=r/14,v=g||(_=>`${_/d*b}rem`),x=(_,w,O,T,A)=>({fontFamily:n,fontWeight:_,fontSize:v(w),lineHeight:O,...n===rb?{letterSpacing:`${AR(T/w)}em`}:{},...A,...h}),E={h1:x(a,96,1.167,-1.5),h2:x(a,60,1.2,-.5),h3:x(s,48,1.167,0),h4:x(s,34,1.235,.25),h5:x(s,24,1.334,0),h6:x(u,20,1.6,.15),subtitle1:x(s,16,1.75,.15),subtitle2:x(u,14,1.57,.1),body1:x(s,16,1.5,.15),body2:x(s,14,1.43,.15),button:x(u,14,1.75,.4,nb),caption:x(s,12,1.66,.4),overline:x(s,12,2.66,1,nb),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Bn({htmlFontSize:d,pxToRem:v,fontFamily:n,fontSize:r,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:u,fontWeightBold:f,...E},y,{clone:!1})}const kR=.2,RR=.14,OR=.12;function Kt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${kR})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${RR})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${OR})`].join(",")}const NR=["none",Kt(0,2,1,-1,0,1,1,0,0,1,3,0),Kt(0,3,1,-2,0,2,2,0,0,1,5,0),Kt(0,3,3,-2,0,3,4,0,0,1,8,0),Kt(0,2,4,-1,0,4,5,0,0,1,10,0),Kt(0,3,5,-1,0,5,8,0,0,1,14,0),Kt(0,3,5,-1,0,6,10,0,0,1,18,0),Kt(0,4,5,-2,0,7,10,1,0,2,16,1),Kt(0,5,5,-3,0,8,10,1,0,3,14,2),Kt(0,5,6,-3,0,9,12,1,0,3,16,2),Kt(0,6,6,-3,0,10,14,1,0,4,18,3),Kt(0,6,7,-4,0,11,15,1,0,4,20,3),Kt(0,7,8,-4,0,12,17,2,0,5,22,4),Kt(0,7,8,-4,0,13,19,2,0,5,24,4),Kt(0,7,9,-4,0,14,21,2,0,5,26,4),Kt(0,8,9,-5,0,15,22,2,0,6,28,5),Kt(0,8,10,-5,0,16,24,2,0,6,30,5),Kt(0,8,11,-5,0,17,26,2,0,6,32,5),Kt(0,9,11,-5,0,18,28,2,0,7,34,6),Kt(0,9,12,-6,0,19,29,2,0,7,36,6),Kt(0,10,13,-6,0,20,31,3,0,8,38,7),Kt(0,10,13,-6,0,21,33,3,0,8,40,7),Kt(0,10,14,-6,0,22,35,3,0,8,42,7),Kt(0,11,14,-7,0,23,36,3,0,9,44,8),Kt(0,11,15,-7,0,24,38,3,0,9,46,8)],IR={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},MR={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ob(e){return`${Math.round(e)}ms`}function DR(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function BR(e){const t={...IR,...e.easing},n={...MR,...e.duration};return{getAutoHeightDuration:DR,create:(a=["all"],s={})=>{const{duration:u=n.standard,easing:f=t.easeInOut,delay:d=0,...h}=s;return(Array.isArray(a)?a:[a]).map(g=>`${g} ${typeof u=="string"?u:ob(u)} ${f} ${typeof d=="string"?d:ob(d)}`).join(",")},...e,easing:t,duration:n}}const zR={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function LR(e){return hi(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function ab(e={}){const t={...e};function n(r){const a=Object.entries(r);for(let s=0;s<a.length;s++){const[u,f]=a[s];!LR(f)||u.startsWith("unstable_")?delete r[u]:hi(f)&&(r[u]={...f},n(r[u]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
37
|
+
} catch(e){}})();`}},"mui-color-scheme-init")}function eR(){}const tR=({key:e,storageWindow:t})=>(!t&&typeof window<"u"&&(t=window),{get(n){if(typeof window>"u")return;if(!t)return n;let r;try{r=t.localStorage.getItem(e)}catch{}return r||n},set:n=>{if(t)try{t.localStorage.setItem(e,n)}catch{}},subscribe:n=>{if(!t)return eR;const r=a=>{const s=a.newValue;a.key===e&&n(s)};return t.addEventListener("storage",r),()=>{t.removeEventListener("storage",r)}}});function Qh(){}function Xv(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Zv(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function nR(e){return Zv(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function rR(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:a=[],modeStorageKey:s=Kh,colorSchemeStorageKey:u=Wh,storageWindow:f=typeof window>"u"?void 0:window,storageManager:d=tR,noSsr:h=!1}=e,g=a.join(","),y=a.length>1,b=N.useMemo(()=>d?.({key:s,storageWindow:f}),[d,s,f]),v=N.useMemo(()=>d?.({key:`${u}-light`,storageWindow:f}),[d,u,f]),x=N.useMemo(()=>d?.({key:`${u}-dark`,storageWindow:f}),[d,u,f]),[E,_]=N.useState(()=>{const H=b?.get(t)||t,V=v?.get(n)||n,K=x?.get(r)||r;return{mode:H,systemMode:Xv(H),lightColorScheme:V,darkColorScheme:K}}),[w,O]=N.useState(h||!y);N.useEffect(()=>{O(!0)},[]);const T=nR(E),A=N.useCallback(H=>{_(V=>{if(H===V.mode)return V;const K=H??t;return b?.set(K),{...V,mode:K,systemMode:Xv(K)}})},[b,t]),M=N.useCallback(H=>{H?typeof H=="string"?H&&!g.includes(H)?console.error(`\`${H}\` does not exist in \`theme.colorSchemes\`.`):_(V=>{const K={...V};return Zv(V,G=>{G==="light"&&(v?.set(H),K.lightColorScheme=H),G==="dark"&&(x?.set(H),K.darkColorScheme=H)}),K}):_(V=>{const K={...V},G=H.light===null?n:H.light,C=H.dark===null?r:H.dark;return G&&(g.includes(G)?(K.lightColorScheme=G,v?.set(G)):console.error(`\`${G}\` does not exist in \`theme.colorSchemes\`.`)),C&&(g.includes(C)?(K.darkColorScheme=C,x?.set(C)):console.error(`\`${C}\` does not exist in \`theme.colorSchemes\`.`)),K}):_(V=>(v?.set(n),x?.set(r),{...V,lightColorScheme:n,darkColorScheme:r}))},[g,v,x,n,r]),R=N.useCallback(H=>{E.mode==="system"&&_(V=>{const K=H?.matches?"dark":"light";return V.systemMode===K?V:{...V,systemMode:K}})},[E.mode]),$=N.useRef(R);return $.current=R,N.useEffect(()=>{if(typeof window.matchMedia!="function"||!y)return;const H=(...K)=>$.current(...K),V=window.matchMedia("(prefers-color-scheme: dark)");return V.addListener(H),H(V),()=>{V.removeListener(H)}},[y]),N.useEffect(()=>{if(y){const H=b?.subscribe(G=>{(!G||["light","dark","system"].includes(G))&&A(G||t)})||Qh,V=v?.subscribe(G=>{(!G||g.match(G))&&M({light:G})})||Qh,K=x?.subscribe(G=>{(!G||g.match(G))&&M({dark:G})})||Qh;return()=>{H(),V(),K()}}},[M,A,g,t,f,y,b,v,x]),{...E,mode:w?E.mode:void 0,systemMode:w?E.systemMode:void 0,colorScheme:w?T:void 0,setMode:A,setColorScheme:M}}const iR="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function oR(e){const{themeId:t,theme:n={},modeStorageKey:r=Kh,colorSchemeStorageKey:a=Wh,disableTransitionOnChange:s=!1,defaultColorScheme:u,resolveTheme:f}=e,d={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},h=N.createContext(void 0),g=()=>N.useContext(h)||d,y={},b={};function v(w){const{children:O,theme:T,modeStorageKey:A=r,colorSchemeStorageKey:M=a,disableTransitionOnChange:R=s,storageManager:$,storageWindow:H=typeof window>"u"?void 0:window,documentNode:V=typeof document>"u"?void 0:document,colorSchemeNode:K=typeof document>"u"?void 0:document.documentElement,disableNestedContext:G=!1,disableStyleSheetGeneration:C=!1,defaultMode:q="system",forceThemeRerender:U=!1,noSsr:P}=w,D=N.useRef(!1),Z=Zh(),se=N.useContext(h),ue=!!se&&!G,B=N.useMemo(()=>T||(typeof n=="function"?n():n),[T]),z=B[t],W=z||B,{colorSchemes:I=y,components:pe=b,cssVarPrefix:ve}=W,he=Object.keys(I).filter(te=>!!I[te]).join(","),xe=N.useMemo(()=>he.split(","),[he]),Ke=typeof u=="string"?u:u.light,Ie=typeof u=="string"?u:u.dark,Me=I[Ke]&&I[Ie]?q:I[W.defaultColorScheme]?.palette?.mode||W.palette?.mode,{mode:Fe,setMode:ft,systemMode:Tn,lightColorScheme:$e,darkColorScheme:Je,colorScheme:Jt,setColorScheme:on}=rR({supportedColorSchemes:xe,defaultLightColorScheme:Ke,defaultDarkColorScheme:Ie,modeStorageKey:A,colorSchemeStorageKey:M,defaultMode:Me,storageManager:$,storageWindow:H,noSsr:P});let Ht=Fe,Tt=Jt;ue&&(Ht=se.mode,Tt=se.colorScheme);let an=Tt||W.defaultColorScheme;W.vars&&!U&&(an=W.defaultColorScheme);const It=N.useMemo(()=>{const te=W.generateThemeVars?.()||W.vars,ce={...W,components:pe,colorSchemes:I,cssVarPrefix:ve,vars:te};if(typeof ce.generateSpacing=="function"&&(ce.spacing=ce.generateSpacing()),an){const we=I[an];we&&typeof we=="object"&&Object.keys(we).forEach(ze=>{we[ze]&&typeof we[ze]=="object"?ce[ze]={...ce[ze],...we[ze]}:ce[ze]=we[ze]})}return f?f(ce):ce},[W,an,pe,I,ve]),Re=W.colorSchemeSelector;mi(()=>{if(Tt&&K&&Re&&Re!=="media"){const te=Re;let ce=Re;if(te==="class"&&(ce=".%s"),te==="data"&&(ce="[data-%s]"),te?.startsWith("data-")&&!te.includes("%s")&&(ce=`[${te}="%s"]`),ce.startsWith("."))K.classList.remove(...xe.map(we=>ce.substring(1).replace("%s",we))),K.classList.add(ce.substring(1).replace("%s",Tt));else{const we=ce.replace("%s",Tt).match(/\[([^\]]+)\]/);if(we){const[ze,We]=we[1].split("=");We||xe.forEach(et=>{K.removeAttribute(ze.replace(Tt,et))}),K.setAttribute(ze,We?We.replace(/"|'/g,""):"")}else K.setAttribute(ce,Tt)}}},[Tt,Re,K,xe]),N.useEffect(()=>{let te;if(R&&D.current&&V){const ce=V.createElement("style");ce.appendChild(V.createTextNode(iR)),V.head.appendChild(ce),window.getComputedStyle(V.body),te=setTimeout(()=>{V.head.removeChild(ce)},1)}return()=>{clearTimeout(te)}},[Tt,R,V]),N.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]);const Cr=N.useMemo(()=>({allColorSchemes:xe,colorScheme:Tt,darkColorScheme:Je,lightColorScheme:$e,mode:Ht,setColorScheme:on,setMode:ft,systemMode:Tn}),[xe,Tt,Je,$e,Ht,on,ft,Tn,It.colorSchemeSelector]);let tt=!0;(C||W.cssVariables===!1||ue&&Z?.cssVarPrefix===ve)&&(tt=!1);const oi=L.jsxs(N.Fragment,{children:[L.jsx(qv,{themeId:z?t:void 0,theme:It,children:O}),tt&&L.jsx(mv,{styles:It.generateStyleSheets?.()||[]})]});return ue?oi:L.jsx(h.Provider,{value:Cr,children:oi})}const x=typeof u=="string"?u:u.light,E=typeof u=="string"?u:u.dark;return{CssVarsProvider:v,useColorScheme:g,getInitColorSchemeScript:w=>Jk({colorSchemeStorageKey:a,defaultLightColorScheme:x,defaultDarkColorScheme:E,modeStorageKey:r,...w})}}function aR(e=""){function t(...r){if(!r.length)return"";const a=r[0];return typeof a=="string"&&!a.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${a}${t(...r.slice(1))})`:`, ${a}`}return(r,...a)=>`var(--${e?`${e}-`:""}${r}${t(...a)})`}const Kv=(e,t,n,r=[])=>{let a=e;t.forEach((s,u)=>{u===t.length-1?Array.isArray(a)?a[Number(s)]=n:a&&typeof a=="object"&&(a[s]=n):a&&typeof a=="object"&&(a[s]||(a[s]=r.includes(s)?[]:{}),a=a[s])})},sR=(e,t,n)=>{function r(a,s=[],u=[]){Object.entries(a).forEach(([f,d])=>{(!n||n&&!n([...s,f]))&&d!=null&&(typeof d=="object"&&Object.keys(d).length>0?r(d,[...s,f],Array.isArray(d)?[...u,f]:u):t([...s,f],d,u))})}r(e)},lR=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function Jh(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},a={},s={},u={};return sR(e,(f,d,h)=>{if((typeof d=="string"||typeof d=="number")&&(!r||!r(f,d))){const g=`--${n?`${n}-`:""}${f.join("-")}`,y=lR(f,d);Object.assign(a,{[g]:y}),Kv(s,f,`var(${g})`,h),Kv(u,f,`var(${g}, ${y})`,h)}},f=>f[0]==="vars"),{css:a,vars:s,varsWithDefaults:u}}function uR(e,t={}){const{getSelector:n=w,disableCssColorScheme:r,colorSchemeSelector:a,enableContrastVars:s}=t,{colorSchemes:u={},components:f,defaultColorScheme:d="light",...h}=e,{vars:g,css:y,varsWithDefaults:b}=Jh(h,t);let v=b;const x={},{[d]:E,..._}=u;if(Object.entries(_||{}).forEach(([A,M])=>{const{vars:R,css:$,varsWithDefaults:H}=Jh(M,t);v=Bn(v,H),x[A]={css:$,vars:R}}),E){const{css:A,vars:M,varsWithDefaults:R}=Jh(E,t);v=Bn(v,R),x[d]={css:A,vars:M}}function w(A,M){let R=a;if(a==="class"&&(R=".%s"),a==="data"&&(R="[data-%s]"),a?.startsWith("data-")&&!a.includes("%s")&&(R=`[${a}="%s"]`),A){if(R==="media")return e.defaultColorScheme===A?":root":{[`@media (prefers-color-scheme: ${u[A]?.palette?.mode||A})`]:{":root":M}};if(R)return e.defaultColorScheme===A?`:root, ${R.replace("%s",String(A))}`:R.replace("%s",String(A))}return":root"}return{vars:v,generateThemeVars:()=>{let A={...g};return Object.entries(x).forEach(([,{vars:M}])=>{A=Bn(A,M)}),A},generateStyleSheets:()=>{const A=[],M=e.defaultColorScheme||"light";function R(V,K){Object.keys(K).length&&A.push(typeof V=="string"?{[V]:{...K}}:V)}R(n(void 0,{...y}),y);const{[M]:$,...H}=x;if($){const{css:V}=$,K=u[M]?.palette?.mode,G=!r&&K?{colorScheme:K,...V}:{...V};R(n(M,{...G}),G)}return Object.entries(H).forEach(([V,{css:K}])=>{const G=u[V]?.palette?.mode,C=!r&&G?{colorScheme:G,...K}:{...K};R(n(V,{...C}),C)}),s&&A.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),A}}}function cR(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}function wt(e,t,n=void 0){const r={};for(const a in e){const s=e[a];let u="",f=!0;for(let d=0;d<s.length;d+=1){const h=s[d];h&&(u+=(f===!0?"":" ")+t(h),f=!1,n&&n[h]&&(u+=" "+n[h]))}r[a]=u}return r}function ep(e,t){return N.isValidElement(e)&&t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const fR=mc(),dR=Ik("div",{name:"MuiStack",slot:"Root"});function hR(e){return Mk({props:e,name:"MuiStack",defaultTheme:fR})}function pR(e,t){const n=N.Children.toArray(e).filter(Boolean);return n.reduce((r,a,s)=>(r.push(a),s<n.length-1&&r.push(N.cloneElement(t,{key:`separator-${s}`})),r),[])}const mR=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],gR=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...Wr({theme:t},Uh({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r}))};if(e.spacing){const r=uc(t),a=Object.keys(t.breakpoints.values).reduce((d,h)=>((typeof e.spacing=="object"&&e.spacing[h]!=null||typeof e.direction=="object"&&e.direction[h]!=null)&&(d[h]=!0),d),{}),s=Uh({values:e.direction,base:a}),u=Uh({values:e.spacing,base:a});typeof s=="object"&&Object.keys(s).forEach((d,h,g)=>{if(!s[d]){const b=h>0?s[g[h-1]]:"column";s[d]=b}}),n=Bn(n,Wr({theme:t},u,(d,h)=>e.useFlexGap?{gap:Xo(r,d)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${mR(h?s[h]:e.direction)}`]:Xo(r,d)}}))}return n=IA(t.breakpoints,n),n};function yR(e={}){const{createStyledComponent:t=dR,useThemeProps:n=hR,componentName:r="MuiStack"}=e,a=()=>wt({root:["root"]},d=>Et(r,d),{}),s=t(gR);return N.forwardRef(function(d,h){const g=n(d),y=Gh(g),{component:b="div",direction:v="column",spacing:x=0,divider:E,children:_,className:w,useFlexGap:O=!1,...T}=y,A={direction:v,spacing:x,useFlexGap:O},M=a();return L.jsx(s,{as:b,ownerState:A,ref:h,className:Ue(M.root,w),...T,children:E?pR(_,E):_})})}function Wv(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:pl.white,default:pl.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Qv=Wv();function Jv(){return{text:{primary:pl.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:pl.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const tp=Jv();function eb(e,t,n,r){const a=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=xc(e.main,a):t==="dark"&&(e.dark=Sc(e.main,s)))}function tb(e,t,n,r,a){const s=a.light||a,u=a.dark||a*1.5;t[n]||(t.hasOwnProperty(r)?t[n]=t[r]:n==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(s*100).toFixed(0)}%)`:n==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(u*100).toFixed(0)}%)`))}function vR(e="light"){return e==="dark"?{main:Fa[200],light:Fa[50],dark:Fa[400]}:{main:Fa[700],light:Fa[400],dark:Fa[800]}}function bR(e="light"){return e==="dark"?{main:Va[200],light:Va[50],dark:Va[400]}:{main:Va[500],light:Va[300],dark:Va[700]}}function SR(e="light"){return e==="dark"?{main:Ha[500],light:Ha[300],dark:Ha[700]}:{main:Ha[700],light:Ha[400],dark:Ha[800]}}function xR(e="light"){return e==="dark"?{main:Ga[400],light:Ga[300],dark:Ga[700]}:{main:Ga[700],light:Ga[500],dark:Ga[900]}}function ER(e="light"){return e==="dark"?{main:qa[400],light:qa[300],dark:qa[700]}:{main:qa[800],light:qa[500],dark:qa[900]}}function _R(e="light"){return e==="dark"?{main:ml[400],light:ml[300],dark:ml[700]}:{main:"#ed6c02",light:ml[500],dark:ml[900]}}function wR(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function np(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,colorSpace:a,...s}=e,u=e.primary||vR(t),f=e.secondary||bR(t),d=e.error||SR(t),h=e.info||xR(t),g=e.success||ER(t),y=e.warning||_R(t);function b(_){return a?wR(_):Pk(_,tp.text.primary)>=n?tp.text.primary:Qv.text.primary}const v=({color:_,name:w,mainShade:O=500,lightShade:T=300,darkShade:A=700})=>{if(_={..._},!_.main&&_[O]&&(_.main=_[O]),!_.hasOwnProperty("main"))throw new Error(Ni(11,w?` (${w})`:"",O));if(typeof _.main!="string")throw new Error(Ni(12,w?` (${w})`:"",JSON.stringify(_.main)));return a?(tb(a,_,"light",T,r),tb(a,_,"dark",A,r)):(eb(_,"light",T,r),eb(_,"dark",A,r)),_.contrastText||(_.contrastText=b(_.main)),_};let x;return t==="light"?x=Wv():t==="dark"&&(x=Jv()),Bn({common:{...pl},mode:t,primary:v({color:u,name:"primary"}),secondary:v({color:f,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:v({color:d,name:"error"}),warning:v({color:y,name:"warning"}),info:v({color:h,name:"info"}),success:v({color:g,name:"success"}),grey:hA,contrastThreshold:n,getContrastText:b,augmentColor:v,tonalOffset:r,...x},s)}function CR(e){const t={};return Object.entries(e).forEach(r=>{const[a,s]=r;typeof s=="object"&&(t[a]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)}),t}function TR(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function AR(e){return Math.round(e*1e5)/1e5}const nb={textTransform:"uppercase"},rb='"Roboto", "Helvetica", "Arial", sans-serif';function ib(e,t){const{fontFamily:n=rb,fontSize:r=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:u=500,fontWeightBold:f=700,htmlFontSize:d=16,allVariants:h,pxToRem:g,...y}=typeof t=="function"?t(e):t,b=r/14,v=g||(_=>`${_/d*b}rem`),x=(_,w,O,T,A)=>({fontFamily:n,fontWeight:_,fontSize:v(w),lineHeight:O,...n===rb?{letterSpacing:`${AR(T/w)}em`}:{},...A,...h}),E={h1:x(a,96,1.167,-1.5),h2:x(a,60,1.2,-.5),h3:x(s,48,1.167,0),h4:x(s,34,1.235,.25),h5:x(s,24,1.334,0),h6:x(u,20,1.6,.15),subtitle1:x(s,16,1.75,.15),subtitle2:x(u,14,1.57,.1),body1:x(s,16,1.5,.15),body2:x(s,14,1.43,.15),button:x(u,14,1.75,.4,nb),caption:x(s,12,1.66,.4),overline:x(s,12,2.66,1,nb),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return Bn({htmlFontSize:d,pxToRem:v,fontFamily:n,fontSize:r,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:u,fontWeightBold:f,...E},y,{clone:!1})}const kR=.2,RR=.14,OR=.12;function Kt(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${kR})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${RR})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${OR})`].join(",")}const NR=["none",Kt(0,2,1,-1,0,1,1,0,0,1,3,0),Kt(0,3,1,-2,0,2,2,0,0,1,5,0),Kt(0,3,3,-2,0,3,4,0,0,1,8,0),Kt(0,2,4,-1,0,4,5,0,0,1,10,0),Kt(0,3,5,-1,0,5,8,0,0,1,14,0),Kt(0,3,5,-1,0,6,10,0,0,1,18,0),Kt(0,4,5,-2,0,7,10,1,0,2,16,1),Kt(0,5,5,-3,0,8,10,1,0,3,14,2),Kt(0,5,6,-3,0,9,12,1,0,3,16,2),Kt(0,6,6,-3,0,10,14,1,0,4,18,3),Kt(0,6,7,-4,0,11,15,1,0,4,20,3),Kt(0,7,8,-4,0,12,17,2,0,5,22,4),Kt(0,7,8,-4,0,13,19,2,0,5,24,4),Kt(0,7,9,-4,0,14,21,2,0,5,26,4),Kt(0,8,9,-5,0,15,22,2,0,6,28,5),Kt(0,8,10,-5,0,16,24,2,0,6,30,5),Kt(0,8,11,-5,0,17,26,2,0,6,32,5),Kt(0,9,11,-5,0,18,28,2,0,7,34,6),Kt(0,9,12,-6,0,19,29,2,0,7,36,6),Kt(0,10,13,-6,0,20,31,3,0,8,38,7),Kt(0,10,13,-6,0,21,33,3,0,8,40,7),Kt(0,10,14,-6,0,22,35,3,0,8,42,7),Kt(0,11,14,-7,0,23,36,3,0,9,44,8),Kt(0,11,15,-7,0,24,38,3,0,9,46,8)],IR={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},MR={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ob(e){return`${Math.round(e)}ms`}function DR(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function BR(e){const t={...IR,...e.easing},n={...MR,...e.duration};return{getAutoHeightDuration:DR,create:(a=["all"],s={})=>{const{duration:u=n.standard,easing:f=t.easeInOut,delay:d=0,...h}=s;return(Array.isArray(a)?a:[a]).map(g=>`${g} ${typeof u=="string"?u:ob(u)} ${f} ${typeof d=="string"?d:ob(d)}`).join(",")},...e,easing:t,duration:n}}const zR={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function LR(e){return hi(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function ab(e={}){const t={...e};function n(r){const a=Object.entries(r);for(let s=0;s<a.length;s++){const[u,f]=a[s];!LR(f)||u.startsWith("unstable_")?delete r[u]:hi(f)&&(r[u]={...f},n(r[u]))}}return n(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
|
|
38
38
|
|
|
39
39
|
const theme = ${JSON.stringify(t,null,2)};
|
|
40
40
|
|
|
41
41
|
theme.breakpoints = createBreakpoints(theme.breakpoints || {});
|
|
42
42
|
theme.transitions = createTransitions(theme.transitions || {});
|
|
43
43
|
|
|
44
|
-
export default theme;`}function sb(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const $R=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;r<t.length;r+=1)n+=+t[r];return n};function PR(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:Sl(t,$R(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${sb(n)})`:xc(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${sb(n)})`:Sc(t,n)}})}function rp(e={},...t){const{breakpoints:n,mixins:r={},spacing:a,palette:s={},transitions:u={},typography:f={},shape:d,colorSpace:h,...g}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(Ni(20));const y=np({...s,colorSpace:h}),b=mc(e);let v=Bn(b,{mixins:TR(b.breakpoints,r),palette:y,shadows:NR.slice(),typography:ib(y,f),transitions:BR(u),zIndex:{...zR}});return v=Bn(v,g),v=t.reduce((x,E)=>Bn(x,E),v),v.unstable_sxConfig={...yl,...g?.unstable_sxConfig},v.unstable_sx=function(E){return lo({sx:E,theme:this})},v.toRuntimeSource=ab,PR(v),v}function ip(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const UR=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=ip(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function lb(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function ub(e){return e==="dark"?UR:[]}function jR(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:a,...s}=e,u=np({...t,colorSpace:a});return{palette:u,opacity:{...lb(u.mode),...n},overlays:r||ub(u.mode),...s}}function HR(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const VR=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],FR=e=>(t,n)=>{const r=e.rootSelector||":root",a=e.colorSchemeSelector;let s=a;if(a==="class"&&(s=".%s"),a==="data"&&(s="[data-%s]"),a?.startsWith("data-")&&!a.includes("%s")&&(s=`[${a}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const u={};return VR(e.cssVarPrefix).forEach(f=>{u[f]=n[f],delete n[f]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:u}}:s?{[s.replace("%s",t)]:u,[`${r}, ${s.replace("%s",t)}`]:n}:{[r]:{...n,...u}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(s)return s.replace("%s",String(t))}return r};function GR(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function re(e,t,n){!e[t]&&n&&(e[t]=n)}function El(e){return typeof e!="string"||!e.startsWith("hsl")?e:$v(e)}function Ii(e,t){`${t}Channel`in e||(e[`${t}Channel`]=bl(El(e[t])))}function qR(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const gi=e=>{try{return e()}catch{}},YR=(e="mui")=>aR(e);function op(e,t,n,r,a){if(!n)return;n=n===!0?{}:n;const s=a==="dark"?"dark":"light";if(!r){t[a]=jR({...n,palette:{mode:s,...n?.palette},colorSpace:e});return}const{palette:u,...f}=rp({...r,palette:{mode:s,...n?.palette},colorSpace:e});return t[a]={...n,palette:u,opacity:{...lb(s),...n?.opacity},overlays:n?.overlays||ub(s)},f}function XR(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:a=!1,cssVarPrefix:s="mui",nativeColor:u=!1,shouldSkipGeneratingVar:f=HR,colorSchemeSelector:d=n.light&&n.dark?"media":void 0,rootSelector:h=":root",...g}=e,y=Object.keys(n)[0],b=r||(n.light&&y!=="light"?"light":y),v=YR(s),{[b]:x,light:E,dark:_,...w}=n,O={...w};let T=x;if((b==="dark"&&!("dark"in n)||b==="light"&&!("light"in n))&&(T=!0),!T)throw new Error(Ni(21,b));let A;u&&(A="oklch");const M=op(A,O,T,g,b);E&&!O.light&&op(A,O,E,void 0,"light"),_&&!O.dark&&op(A,O,_,void 0,"dark");let R={defaultColorScheme:b,...M,cssVarPrefix:s,colorSchemeSelector:d,rootSelector:h,getCssVar:v,colorSchemes:O,font:{...CR(M.typography),...M.font},spacing:qR(g.spacing)};Object.keys(R.colorSchemes).forEach(G=>{const C=R.colorSchemes[G].palette,q=P=>{const D=P.split("-"),Z=D[1],se=D[2];return v(P,C[Z][se])};C.mode==="light"&&(re(C.common,"background","#fff"),re(C.common,"onBackground","#000")),C.mode==="dark"&&(re(C.common,"background","#000"),re(C.common,"onBackground","#fff"));function U(P,D,Z){if(A){let se;return P===Ko&&(se=`transparent ${((1-Z)*100).toFixed(0)}%`),P===kt&&(se=`#000 ${(Z*100).toFixed(0)}%`),P===Rt&&(se=`#fff ${(Z*100).toFixed(0)}%`),`color-mix(in ${A}, ${D}, ${se})`}return P(D,Z)}if(GR(C,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),C.mode==="light"){re(C.Alert,"errorColor",U(kt,C.error.light,.6)),re(C.Alert,"infoColor",U(kt,C.info.light,.6)),re(C.Alert,"successColor",U(kt,C.success.light,.6)),re(C.Alert,"warningColor",U(kt,C.warning.light,.6)),re(C.Alert,"errorFilledBg",q("palette-error-main")),re(C.Alert,"infoFilledBg",q("palette-info-main")),re(C.Alert,"successFilledBg",q("palette-success-main")),re(C.Alert,"warningFilledBg",q("palette-warning-main")),re(C.Alert,"errorFilledColor",gi(()=>C.getContrastText(C.error.main))),re(C.Alert,"infoFilledColor",gi(()=>C.getContrastText(C.info.main))),re(C.Alert,"successFilledColor",gi(()=>C.getContrastText(C.success.main))),re(C.Alert,"warningFilledColor",gi(()=>C.getContrastText(C.warning.main))),re(C.Alert,"errorStandardBg",U(Rt,C.error.light,.9)),re(C.Alert,"infoStandardBg",U(Rt,C.info.light,.9)),re(C.Alert,"successStandardBg",U(Rt,C.success.light,.9)),re(C.Alert,"warningStandardBg",U(Rt,C.warning.light,.9)),re(C.Alert,"errorIconColor",q("palette-error-main")),re(C.Alert,"infoIconColor",q("palette-info-main")),re(C.Alert,"successIconColor",q("palette-success-main")),re(C.Alert,"warningIconColor",q("palette-warning-main")),re(C.AppBar,"defaultBg",q("palette-grey-100")),re(C.Avatar,"defaultBg",q("palette-grey-400")),re(C.Button,"inheritContainedBg",q("palette-grey-300")),re(C.Button,"inheritContainedHoverBg",q("palette-grey-A100")),re(C.Chip,"defaultBorder",q("palette-grey-400")),re(C.Chip,"defaultAvatarColor",q("palette-grey-700")),re(C.Chip,"defaultIconColor",q("palette-grey-700")),re(C.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),re(C.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),re(C.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),re(C.LinearProgress,"primaryBg",U(Rt,C.primary.main,.62)),re(C.LinearProgress,"secondaryBg",U(Rt,C.secondary.main,.62)),re(C.LinearProgress,"errorBg",U(Rt,C.error.main,.62)),re(C.LinearProgress,"infoBg",U(Rt,C.info.main,.62)),re(C.LinearProgress,"successBg",U(Rt,C.success.main,.62)),re(C.LinearProgress,"warningBg",U(Rt,C.warning.main,.62)),re(C.Skeleton,"bg",A?U(Ko,C.text.primary,.11):`rgba(${q("palette-text-primaryChannel")} / 0.11)`),re(C.Slider,"primaryTrack",U(Rt,C.primary.main,.62)),re(C.Slider,"secondaryTrack",U(Rt,C.secondary.main,.62)),re(C.Slider,"errorTrack",U(Rt,C.error.main,.62)),re(C.Slider,"infoTrack",U(Rt,C.info.main,.62)),re(C.Slider,"successTrack",U(Rt,C.success.main,.62)),re(C.Slider,"warningTrack",U(Rt,C.warning.main,.62));const P=A?U(kt,C.background.default,.6825):Ec(C.background.default,.8);re(C.SnackbarContent,"bg",P),re(C.SnackbarContent,"color",gi(()=>A?tp.text.primary:C.getContrastText(P))),re(C.SpeedDialAction,"fabHoverBg",Ec(C.background.paper,.15)),re(C.StepConnector,"border",q("palette-grey-400")),re(C.StepContent,"border",q("palette-grey-400")),re(C.Switch,"defaultColor",q("palette-common-white")),re(C.Switch,"defaultDisabledColor",q("palette-grey-100")),re(C.Switch,"primaryDisabledColor",U(Rt,C.primary.main,.62)),re(C.Switch,"secondaryDisabledColor",U(Rt,C.secondary.main,.62)),re(C.Switch,"errorDisabledColor",U(Rt,C.error.main,.62)),re(C.Switch,"infoDisabledColor",U(Rt,C.info.main,.62)),re(C.Switch,"successDisabledColor",U(Rt,C.success.main,.62)),re(C.Switch,"warningDisabledColor",U(Rt,C.warning.main,.62)),re(C.TableCell,"border",U(Rt,U(Ko,C.divider,1),.88)),re(C.Tooltip,"bg",U(Ko,C.grey[700],.92))}if(C.mode==="dark"){re(C.Alert,"errorColor",U(Rt,C.error.light,.6)),re(C.Alert,"infoColor",U(Rt,C.info.light,.6)),re(C.Alert,"successColor",U(Rt,C.success.light,.6)),re(C.Alert,"warningColor",U(Rt,C.warning.light,.6)),re(C.Alert,"errorFilledBg",q("palette-error-dark")),re(C.Alert,"infoFilledBg",q("palette-info-dark")),re(C.Alert,"successFilledBg",q("palette-success-dark")),re(C.Alert,"warningFilledBg",q("palette-warning-dark")),re(C.Alert,"errorFilledColor",gi(()=>C.getContrastText(C.error.dark))),re(C.Alert,"infoFilledColor",gi(()=>C.getContrastText(C.info.dark))),re(C.Alert,"successFilledColor",gi(()=>C.getContrastText(C.success.dark))),re(C.Alert,"warningFilledColor",gi(()=>C.getContrastText(C.warning.dark))),re(C.Alert,"errorStandardBg",U(kt,C.error.light,.9)),re(C.Alert,"infoStandardBg",U(kt,C.info.light,.9)),re(C.Alert,"successStandardBg",U(kt,C.success.light,.9)),re(C.Alert,"warningStandardBg",U(kt,C.warning.light,.9)),re(C.Alert,"errorIconColor",q("palette-error-main")),re(C.Alert,"infoIconColor",q("palette-info-main")),re(C.Alert,"successIconColor",q("palette-success-main")),re(C.Alert,"warningIconColor",q("palette-warning-main")),re(C.AppBar,"defaultBg",q("palette-grey-900")),re(C.AppBar,"darkBg",q("palette-background-paper")),re(C.AppBar,"darkColor",q("palette-text-primary")),re(C.Avatar,"defaultBg",q("palette-grey-600")),re(C.Button,"inheritContainedBg",q("palette-grey-800")),re(C.Button,"inheritContainedHoverBg",q("palette-grey-700")),re(C.Chip,"defaultBorder",q("palette-grey-700")),re(C.Chip,"defaultAvatarColor",q("palette-grey-300")),re(C.Chip,"defaultIconColor",q("palette-grey-300")),re(C.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),re(C.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),re(C.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),re(C.LinearProgress,"primaryBg",U(kt,C.primary.main,.5)),re(C.LinearProgress,"secondaryBg",U(kt,C.secondary.main,.5)),re(C.LinearProgress,"errorBg",U(kt,C.error.main,.5)),re(C.LinearProgress,"infoBg",U(kt,C.info.main,.5)),re(C.LinearProgress,"successBg",U(kt,C.success.main,.5)),re(C.LinearProgress,"warningBg",U(kt,C.warning.main,.5)),re(C.Skeleton,"bg",A?U(Ko,C.text.primary,.13):`rgba(${q("palette-text-primaryChannel")} / 0.13)`),re(C.Slider,"primaryTrack",U(kt,C.primary.main,.5)),re(C.Slider,"secondaryTrack",U(kt,C.secondary.main,.5)),re(C.Slider,"errorTrack",U(kt,C.error.main,.5)),re(C.Slider,"infoTrack",U(kt,C.info.main,.5)),re(C.Slider,"successTrack",U(kt,C.success.main,.5)),re(C.Slider,"warningTrack",U(kt,C.warning.main,.5));const P=A?U(Rt,C.background.default,.985):Ec(C.background.default,.98);re(C.SnackbarContent,"bg",P),re(C.SnackbarContent,"color",gi(()=>A?Qv.text.primary:C.getContrastText(P))),re(C.SpeedDialAction,"fabHoverBg",Ec(C.background.paper,.15)),re(C.StepConnector,"border",q("palette-grey-600")),re(C.StepContent,"border",q("palette-grey-600")),re(C.Switch,"defaultColor",q("palette-grey-300")),re(C.Switch,"defaultDisabledColor",q("palette-grey-600")),re(C.Switch,"primaryDisabledColor",U(kt,C.primary.main,.55)),re(C.Switch,"secondaryDisabledColor",U(kt,C.secondary.main,.55)),re(C.Switch,"errorDisabledColor",U(kt,C.error.main,.55)),re(C.Switch,"infoDisabledColor",U(kt,C.info.main,.55)),re(C.Switch,"successDisabledColor",U(kt,C.success.main,.55)),re(C.Switch,"warningDisabledColor",U(kt,C.warning.main,.55)),re(C.TableCell,"border",U(kt,U(Ko,C.divider,1),.68)),re(C.Tooltip,"bg",U(Ko,C.grey[700],.92))}Ii(C.background,"default"),Ii(C.background,"paper"),Ii(C.common,"background"),Ii(C.common,"onBackground"),Ii(C,"divider"),Object.keys(C).forEach(P=>{const D=C[P];P!=="tonalOffset"&&D&&typeof D=="object"&&(D.main&&re(C[P],"mainChannel",bl(El(D.main))),D.light&&re(C[P],"lightChannel",bl(El(D.light))),D.dark&&re(C[P],"darkChannel",bl(El(D.dark))),D.contrastText&&re(C[P],"contrastTextChannel",bl(El(D.contrastText))),P==="text"&&(Ii(C[P],"primary"),Ii(C[P],"secondary")),P==="action"&&(D.active&&Ii(C[P],"active"),D.selected&&Ii(C[P],"selected")))})}),R=t.reduce((G,C)=>Bn(G,C),R);const $={prefix:s,disableCssColorScheme:a,shouldSkipGeneratingVar:f,getSelector:FR(R),enableContrastVars:u},{vars:H,generateThemeVars:V,generateStyleSheets:K}=uR(R,$);return R.vars=H,Object.entries(R.colorSchemes[R.defaultColorScheme]).forEach(([G,C])=>{R[G]=C}),R.generateThemeVars=V,R.generateStyleSheets=K,R.generateSpacing=function(){return Av(g.spacing,uc(this))},R.getColorSchemeSelector=cR(d),R.spacing=R.generateSpacing(),R.shouldSkipGeneratingVar=f,R.unstable_sxConfig={...yl,...g?.unstable_sxConfig},R.unstable_sx=function(C){return lo({sx:C,theme:this})},R.toRuntimeSource=ab,R}function cb(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:np({...n===!0?{}:n.palette,mode:t})})}function _c(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:a=n?void 0:{light:!0},defaultColorScheme:s=n?.mode,...u}=e,f=s||"light",d=a?.[f],h={...a,...n?{[f]:{...typeof d!="boolean"&&d,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return rp(e,...t);let g=n;"palette"in e||h[f]&&(h[f]!==!0?g=h[f].palette:f==="dark"&&(g={mode:"dark"}));const y=rp({...e,palette:g},...t);return y.defaultColorScheme=f,y.colorSchemes=h,y.palette.mode==="light"&&(y.colorSchemes.light={...h.light!==!0&&h.light,palette:y.palette},cb(y,"dark",h.dark)),y.palette.mode==="dark"&&(y.colorSchemes.dark={...h.dark!==!0&&h.dark,palette:y.palette},cb(y,"light",h.light)),y}return!n&&!("light"in h)&&f==="light"&&(h.light=!0),XR({...u,colorSchemes:h,defaultColorScheme:f,...typeof r!="boolean"&&r},...t)}const ap=_c();function _l(){const e=yc(ap);return e[Kr]||e}function fb(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Qr=e=>fb(e)&&e!=="classes",Ee=Dv({themeId:Kr,defaultTheme:ap,rootShouldForwardProp:Qr});function ZR({theme:e,...t}){const n=Kr in e?e[Kr]:void 0;return L.jsx(qv,{...t,themeId:n?Kr:void 0,theme:n||e})}const wc={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:KR}=oR({themeId:Kr,theme:()=>_c({cssVariables:!0}),colorSchemeStorageKey:wc.colorSchemeStorageKey,modeStorageKey:wc.modeStorageKey,defaultColorScheme:{light:wc.defaultLightColorScheme,dark:wc.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:ib(e.palette,e.typography)};return t.unstable_sx=function(r){return lo({sx:r,theme:this})},t}}),WR=KR;function QR({theme:e,...t}){const n=N.useMemo(()=>{if(typeof e=="function")return e;const r=Kr in e?e[Kr]:e;return"colorSchemes"in r?null:"vars"in r?e:{...e,vars:null}},[e]);return n?L.jsx(ZR,{theme:n,...t}):L.jsx(WR,{theme:e,...t})}function db(...e){return e.reduce((t,n)=>n==null?t:function(...a){t.apply(this,a),n.apply(this,a)},()=>{})}function JR(e){return L.jsx(kv,{...e,defaultTheme:ap,themeId:Kr})}function sp(e){return function(n){return L.jsx(JR,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function eO(){return Gh}const zt=Wk;function Ct(e){return Xk(e)}function tO(e){return Et("MuiSvgIcon",e)}_t("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const nO=e=>{const{color:t,fontSize:n,classes:r}=e,a={root:["root",t!=="inherit"&&`color${ye(t)}`,`fontSize${ye(n)}`]};return wt(a,tO,r)},rO=Ee("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ye(n.color)}`],t[`fontSize${ye(n.fontSize)}`]]}})(zt(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),lp=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiSvgIcon"}),{children:a,className:s,color:u="inherit",component:f="svg",fontSize:d="medium",htmlColor:h,inheritViewBox:g=!1,titleAccess:y,viewBox:b="0 0 24 24",...v}=r,x=N.isValidElement(a)&&a.type==="svg",E={...r,color:u,component:f,fontSize:d,instanceFontSize:t.fontSize,inheritViewBox:g,viewBox:b,hasSvgAsChild:x},_={};g||(_.viewBox=b);const w=nO(E);return L.jsxs(rO,{as:f,className:Ue(w.root,s),focusable:"false",color:h,"aria-hidden":y?void 0:!0,role:y?"img":void 0,ref:n,..._,...v,...x&&a.props,ownerState:E,children:[x?a.props.children:a,y?L.jsx("title",{children:y}):null]})});lp.muiName="SvgIcon";function Xn(e,t){function n(r,a){return L.jsx(lp,{"data-testid":void 0,ref:a,...r,children:e})}return n.muiName=lp.muiName,N.memo(N.forwardRef(n))}function hb(e,t=166){let n;function r(...a){const s=()=>{e.apply(this,a)};clearTimeout(n),n=setTimeout(s,t)}return r.clear=()=>{clearTimeout(n)},r}function Jr(e){return e&&e.ownerDocument||document}function Mi(e){return Jr(e).defaultView||window}function pb(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function mb(e){const{controlled:t,default:n,name:r,state:a="value"}=e,{current:s}=N.useRef(t!==void 0),[u,f]=N.useState(n),d=s?t:u,h=N.useCallback(g=>{s||f(g)},[]);return[d,h]}function Wo(e){const t=N.useRef(e);return mi(()=>{t.current=e}),N.useRef((...n)=>(0,t.current)(...n)).current}function er(...e){const t=N.useRef(void 0),n=N.useCallback(r=>{const a=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const u=s,f=u(r);return typeof f=="function"?f:()=>{u(null)}}return s.current=r,()=>{s.current=null}});return()=>{a.forEach(s=>s?.())}},e);return N.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function iO(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function oO(e,t){if(!e)return t;function n(u,f){const d={};return Object.keys(f).forEach(h=>{iO(h,f[h])&&typeof u[h]=="function"&&(d[h]=(...g)=>{u[h](...g),f[h](...g)})}),d}if(typeof e=="function"||typeof t=="function")return u=>{const f=typeof t=="function"?t(u):t,d=typeof e=="function"?e({...u,...f}):e,h=Ue(u?.className,f?.className,d?.className),g=n(d,f);return{...f,...d,...g,...!!h&&{className:h},...f?.style&&d?.style&&{style:{...f.style,...d.style}},...f?.sx&&d?.sx&&{sx:[...Array.isArray(f.sx)?f.sx:[f.sx],...Array.isArray(d.sx)?d.sx:[d.sx]]}}};const r=t,a=n(e,r),s=Ue(r?.className,e?.className);return{...t,...e,...a,...!!s&&{className:s},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function gb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function up(e,t){return up=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},up(e,t)}function yb(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,up(e,t)}var vb=P0();const Cc=Ku(vb),bb={disabled:!1},Tc=Jn.createContext(null);var aO=function(t){return t.scrollTop},wl="unmounted",Qo="exited",Jo="entering",Xa="entered",cp="exiting",yi=(function(e){yb(t,e);function t(r,a){var s;s=e.call(this,r,a)||this;var u=a,f=u&&!u.isMounting?r.enter:r.appear,d;return s.appearStatus=null,r.in?f?(d=Qo,s.appearStatus=Jo):d=Xa:r.unmountOnExit||r.mountOnEnter?d=wl:d=Qo,s.state={status:d},s.nextCallback=null,s}t.getDerivedStateFromProps=function(a,s){var u=a.in;return u&&s.status===wl?{status:Qo}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(a){var s=null;if(a!==this.props){var u=this.state.status;this.props.in?u!==Jo&&u!==Xa&&(s=Jo):(u===Jo||u===Xa)&&(s=cp)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var a=this.props.timeout,s,u,f;return s=u=f=a,a!=null&&typeof a!="number"&&(s=a.exit,u=a.enter,f=a.appear!==void 0?a.appear:u),{exit:s,enter:u,appear:f}},n.updateStatus=function(a,s){if(a===void 0&&(a=!1),s!==null)if(this.cancelNextCallback(),s===Jo){if(this.props.unmountOnExit||this.props.mountOnEnter){var u=this.props.nodeRef?this.props.nodeRef.current:Cc.findDOMNode(this);u&&aO(u)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Qo&&this.setState({status:wl})},n.performEnter=function(a){var s=this,u=this.props.enter,f=this.context?this.context.isMounting:a,d=this.props.nodeRef?[f]:[Cc.findDOMNode(this),f],h=d[0],g=d[1],y=this.getTimeouts(),b=f?y.appear:y.enter;if(!a&&!u||bb.disabled){this.safeSetState({status:Xa},function(){s.props.onEntered(h)});return}this.props.onEnter(h,g),this.safeSetState({status:Jo},function(){s.props.onEntering(h,g),s.onTransitionEnd(b,function(){s.safeSetState({status:Xa},function(){s.props.onEntered(h,g)})})})},n.performExit=function(){var a=this,s=this.props.exit,u=this.getTimeouts(),f=this.props.nodeRef?void 0:Cc.findDOMNode(this);if(!s||bb.disabled){this.safeSetState({status:Qo},function(){a.props.onExited(f)});return}this.props.onExit(f),this.safeSetState({status:cp},function(){a.props.onExiting(f),a.onTransitionEnd(u.exit,function(){a.safeSetState({status:Qo},function(){a.props.onExited(f)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(a,s){s=this.setNextCallback(s),this.setState(a,s)},n.setNextCallback=function(a){var s=this,u=!0;return this.nextCallback=function(f){u&&(u=!1,s.nextCallback=null,a(f))},this.nextCallback.cancel=function(){u=!1},this.nextCallback},n.onTransitionEnd=function(a,s){this.setNextCallback(s);var u=this.props.nodeRef?this.props.nodeRef.current:Cc.findDOMNode(this),f=a==null&&!this.props.addEndListener;if(!u||f){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var d=this.props.nodeRef?[this.nextCallback]:[u,this.nextCallback],h=d[0],g=d[1];this.props.addEndListener(h,g)}a!=null&&setTimeout(this.nextCallback,a)},n.render=function(){var a=this.state.status;if(a===wl)return null;var s=this.props,u=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var f=gb(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Jn.createElement(Tc.Provider,{value:null},typeof u=="function"?u(a,f):Jn.cloneElement(Jn.Children.only(u),f))},t})(Jn.Component);yi.contextType=Tc,yi.propTypes={};function Za(){}yi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Za,onEntering:Za,onEntered:Za,onExit:Za,onExiting:Za,onExited:Za},yi.UNMOUNTED=wl,yi.EXITED=Qo,yi.ENTERING=Jo,yi.ENTERED=Xa,yi.EXITING=cp;function sO(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fp(e,t){var n=function(s){return t&&N.isValidElement(s)?t(s):s},r=Object.create(null);return e&&N.Children.map(e,function(a){return a}).forEach(function(a){r[a.key]=n(a)}),r}function lO(e,t){e=e||{},t=t||{};function n(g){return g in t?t[g]:e[g]}var r=Object.create(null),a=[];for(var s in e)s in t?a.length&&(r[s]=a,a=[]):a.push(s);var u,f={};for(var d in t){if(r[d])for(u=0;u<r[d].length;u++){var h=r[d][u];f[r[d][u]]=n(h)}f[d]=n(d)}for(u=0;u<a.length;u++)f[a[u]]=n(a[u]);return f}function ea(e,t,n){return n[t]!=null?n[t]:e.props[t]}function uO(e,t){return fp(e.children,function(n){return N.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:ea(n,"appear",e),enter:ea(n,"enter",e),exit:ea(n,"exit",e)})})}function cO(e,t,n){var r=fp(e.children),a=lO(t,r);return Object.keys(a).forEach(function(s){var u=a[s];if(N.isValidElement(u)){var f=s in t,d=s in r,h=t[s],g=N.isValidElement(h)&&!h.props.in;d&&(!f||g)?a[s]=N.cloneElement(u,{onExited:n.bind(null,u),in:!0,exit:ea(u,"exit",e),enter:ea(u,"enter",e)}):!d&&f&&!g?a[s]=N.cloneElement(u,{in:!1}):d&&f&&N.isValidElement(h)&&(a[s]=N.cloneElement(u,{onExited:n.bind(null,u),in:h.props.in,exit:ea(u,"exit",e),enter:ea(u,"enter",e)}))}}),a}var fO=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},dO={component:"div",childFactory:function(t){return t}},dp=(function(e){yb(t,e);function t(r,a){var s;s=e.call(this,r,a)||this;var u=s.handleExited.bind(sO(s));return s.state={contextValue:{isMounting:!0},handleExited:u,firstRender:!0},s}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(a,s){var u=s.children,f=s.handleExited,d=s.firstRender;return{children:d?uO(a,f):cO(a,u,f),firstRender:!1}},n.handleExited=function(a,s){var u=fp(this.props.children);a.key in u||(a.props.onExited&&a.props.onExited(s),this.mounted&&this.setState(function(f){var d=ac({},f.children);return delete d[a.key],{children:d}}))},n.render=function(){var a=this.props,s=a.component,u=a.childFactory,f=gb(a,["component","childFactory"]),d=this.state.contextValue,h=fO(this.state.children).map(u);return delete f.appear,delete f.enter,delete f.exit,s===null?Jn.createElement(Tc.Provider,{value:d},h):Jn.createElement(Tc.Provider,{value:d},Jn.createElement(s,f,h))},t})(Jn.Component);dp.propTypes={},dp.defaultProps=dO;const Sb={};function xb(e,t){const n=N.useRef(Sb);return n.current===Sb&&(n.current=e(t)),n}const hO=[];function pO(e){N.useEffect(e,hO)}class hp{static create(){return new hp}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Eb(){const e=xb(hp.create).current;return pO(e.disposeEffect),e}const _b=e=>e.scrollTop;function Ac(e,t){const{timeout:n,easing:r,style:a={}}=e;return{duration:a.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:a.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:a.transitionDelay}}function kc(e){return typeof e=="string"}function wb(e,t,n){return e===void 0||kc(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Cb(e,t,n){return typeof e=="function"?e(t,n):e}function Tb(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Ab(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function kb(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:a,className:s}=e;if(!t){const v=Ue(n?.className,s,a?.className,r?.className),x={...n?.style,...a?.style,...r?.style},E={...n,...a,...r};return v.length>0&&(E.className=v),Object.keys(x).length>0&&(E.style=x),{props:E,internalRef:void 0}}const u=Tb({...a,...r}),f=Ab(r),d=Ab(a),h=t(u),g=Ue(h?.className,n?.className,s,a?.className,r?.className),y={...h?.style,...n?.style,...a?.style,...r?.style},b={...h,...n,...d,...f};return g.length>0&&(b.className=g),Object.keys(y).length>0&&(b.style=y),{props:b,internalRef:h.ref}}function Ot(e,t){const{className:n,elementType:r,ownerState:a,externalForwardedProps:s,internalForwardedProps:u,shouldForwardComponentProp:f=!1,...d}=t,{component:h,slots:g={[e]:void 0},slotProps:y={[e]:void 0},...b}=s,v=g[e]||r,x=Cb(y[e],a),{props:{component:E,..._},internalRef:w}=kb({className:n,...d,externalForwardedProps:e==="root"?b:void 0,externalSlotProps:x}),O=er(w,x?.ref,t.ref),T=e==="root"?E||h:E,A=wb(v,{...e==="root"&&!h&&!g[e]&&u,...e!=="root"&&!g[e]&&u,..._,...T&&!f&&{as:T},...T&&f&&{component:T},ref:O},a);return[v,A]}function mO(e){return Et("MuiPaper",e)}_t("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const gO=e=>{const{square:t,elevation:n,variant:r,classes:a}=e,s={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return wt(s,mO,a)},yO=Ee("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(zt(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Rc=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiPaper"}),a=_l(),{className:s,component:u="div",elevation:f=1,square:d=!1,variant:h="elevation",...g}=r,y={...r,component:u,elevation:f,square:d,variant:h},b=gO(y);return L.jsx(yO,{as:u,ownerState:y,className:Ue(b.root,s),ref:n,...g,style:{...h==="elevation"&&{"--Paper-shadow":(a.vars||a).shadows[f],...a.vars&&{"--Paper-overlay":a.vars.overlays?.[f]},...!a.vars&&a.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${Sl("#fff",ip(f))}, ${Sl("#fff",ip(f))})`}},...g.style}})});function Oc(e){try{return e.matches(":focus-visible")}catch{}return!1}class Nc{static create(){return new Nc}static use(){const t=xb(Nc.create).current,[n,r]=N.useState(!1);return t.shouldMount=n,t.setShouldMount=r,N.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=bO(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function vO(){return Nc.use()}function bO(){let e,t;const n=new Promise((r,a)=>{e=r,t=a});return n.resolve=e,n.reject=t,n}function SO(e){const{className:t,classes:n,pulsate:r=!1,rippleX:a,rippleY:s,rippleSize:u,in:f,onExited:d,timeout:h}=e,[g,y]=N.useState(!1),b=Ue(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),v={width:u,height:u,top:-(u/2)+s,left:-(u/2)+a},x=Ue(n.child,g&&n.childLeaving,r&&n.childPulsate);return!f&&!g&&y(!0),N.useEffect(()=>{if(!f&&d!=null){const E=setTimeout(d,h);return()=>{clearTimeout(E)}}},[d,f,h]),L.jsx("span",{className:b,style:v,children:L.jsx("span",{className:x})})}const Br=_t("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),pp=550,xO=80,EO=dl`
|
|
44
|
+
export default theme;`}function sb(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const $R=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let n=0;for(let r=0;r<t.length;r+=1)n+=+t[r];return n};function PR(e){Object.assign(e,{alpha(t,n){const r=this||e;return r.colorSpace?`oklch(from ${t} l c h / ${typeof n=="string"?`calc(${n})`:n})`:r.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof n=="string"?`calc(${n})`:n})`:xl(t,$R(n))},lighten(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #fff ${sb(n)})`:xc(t,n)},darken(t,n){const r=this||e;return r.colorSpace?`color-mix(in ${r.colorSpace}, ${t}, #000 ${sb(n)})`:Sc(t,n)}})}function rp(e={},...t){const{breakpoints:n,mixins:r={},spacing:a,palette:s={},transitions:u={},typography:f={},shape:d,colorSpace:h,...g}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(Ni(20));const y=np({...s,colorSpace:h}),b=mc(e);let v=Bn(b,{mixins:TR(b.breakpoints,r),palette:y,shadows:NR.slice(),typography:ib(y,f),transitions:BR(u),zIndex:{...zR}});return v=Bn(v,g),v=t.reduce((x,E)=>Bn(x,E),v),v.unstable_sxConfig={...vl,...g?.unstable_sxConfig},v.unstable_sx=function(E){return lo({sx:E,theme:this})},v.toRuntimeSource=ab,PR(v),v}function ip(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const UR=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=ip(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function lb(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function ub(e){return e==="dark"?UR:[]}function jR(e){const{palette:t={mode:"light"},opacity:n,overlays:r,colorSpace:a,...s}=e,u=np({...t,colorSpace:a});return{palette:u,opacity:{...lb(u.mode),...n},overlays:r||ub(u.mode),...s}}function HR(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const VR=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],FR=e=>(t,n)=>{const r=e.rootSelector||":root",a=e.colorSchemeSelector;let s=a;if(a==="class"&&(s=".%s"),a==="data"&&(s="[data-%s]"),a?.startsWith("data-")&&!a.includes("%s")&&(s=`[${a}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const u={};return VR(e.cssVarPrefix).forEach(f=>{u[f]=n[f],delete n[f]}),s==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:u}}:s?{[s.replace("%s",t)]:u,[`${r}, ${s.replace("%s",t)}`]:n}:{[r]:{...n,...u}}}if(s&&s!=="media")return`${r}, ${s.replace("%s",String(t))}`}else if(t){if(s==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(s)return s.replace("%s",String(t))}return r};function GR(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function re(e,t,n){!e[t]&&n&&(e[t]=n)}function _l(e){return typeof e!="string"||!e.startsWith("hsl")?e:$v(e)}function Ii(e,t){`${t}Channel`in e||(e[`${t}Channel`]=Sl(_l(e[t])))}function qR(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const gi=e=>{try{return e()}catch{}},YR=(e="mui")=>aR(e);function op(e,t,n,r,a){if(!n)return;n=n===!0?{}:n;const s=a==="dark"?"dark":"light";if(!r){t[a]=jR({...n,palette:{mode:s,...n?.palette},colorSpace:e});return}const{palette:u,...f}=rp({...r,palette:{mode:s,...n?.palette},colorSpace:e});return t[a]={...n,palette:u,opacity:{...lb(s),...n?.opacity},overlays:n?.overlays||ub(s)},f}function XR(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:a=!1,cssVarPrefix:s="mui",nativeColor:u=!1,shouldSkipGeneratingVar:f=HR,colorSchemeSelector:d=n.light&&n.dark?"media":void 0,rootSelector:h=":root",...g}=e,y=Object.keys(n)[0],b=r||(n.light&&y!=="light"?"light":y),v=YR(s),{[b]:x,light:E,dark:_,...w}=n,O={...w};let T=x;if((b==="dark"&&!("dark"in n)||b==="light"&&!("light"in n))&&(T=!0),!T)throw new Error(Ni(21,b));let A;u&&(A="oklch");const M=op(A,O,T,g,b);E&&!O.light&&op(A,O,E,void 0,"light"),_&&!O.dark&&op(A,O,_,void 0,"dark");let R={defaultColorScheme:b,...M,cssVarPrefix:s,colorSchemeSelector:d,rootSelector:h,getCssVar:v,colorSchemes:O,font:{...CR(M.typography),...M.font},spacing:qR(g.spacing)};Object.keys(R.colorSchemes).forEach(G=>{const C=R.colorSchemes[G].palette,q=P=>{const D=P.split("-"),Z=D[1],se=D[2];return v(P,C[Z][se])};C.mode==="light"&&(re(C.common,"background","#fff"),re(C.common,"onBackground","#000")),C.mode==="dark"&&(re(C.common,"background","#000"),re(C.common,"onBackground","#fff"));function U(P,D,Z){if(A){let se;return P===Ko&&(se=`transparent ${((1-Z)*100).toFixed(0)}%`),P===kt&&(se=`#000 ${(Z*100).toFixed(0)}%`),P===Rt&&(se=`#fff ${(Z*100).toFixed(0)}%`),`color-mix(in ${A}, ${D}, ${se})`}return P(D,Z)}if(GR(C,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),C.mode==="light"){re(C.Alert,"errorColor",U(kt,C.error.light,.6)),re(C.Alert,"infoColor",U(kt,C.info.light,.6)),re(C.Alert,"successColor",U(kt,C.success.light,.6)),re(C.Alert,"warningColor",U(kt,C.warning.light,.6)),re(C.Alert,"errorFilledBg",q("palette-error-main")),re(C.Alert,"infoFilledBg",q("palette-info-main")),re(C.Alert,"successFilledBg",q("palette-success-main")),re(C.Alert,"warningFilledBg",q("palette-warning-main")),re(C.Alert,"errorFilledColor",gi(()=>C.getContrastText(C.error.main))),re(C.Alert,"infoFilledColor",gi(()=>C.getContrastText(C.info.main))),re(C.Alert,"successFilledColor",gi(()=>C.getContrastText(C.success.main))),re(C.Alert,"warningFilledColor",gi(()=>C.getContrastText(C.warning.main))),re(C.Alert,"errorStandardBg",U(Rt,C.error.light,.9)),re(C.Alert,"infoStandardBg",U(Rt,C.info.light,.9)),re(C.Alert,"successStandardBg",U(Rt,C.success.light,.9)),re(C.Alert,"warningStandardBg",U(Rt,C.warning.light,.9)),re(C.Alert,"errorIconColor",q("palette-error-main")),re(C.Alert,"infoIconColor",q("palette-info-main")),re(C.Alert,"successIconColor",q("palette-success-main")),re(C.Alert,"warningIconColor",q("palette-warning-main")),re(C.AppBar,"defaultBg",q("palette-grey-100")),re(C.Avatar,"defaultBg",q("palette-grey-400")),re(C.Button,"inheritContainedBg",q("palette-grey-300")),re(C.Button,"inheritContainedHoverBg",q("palette-grey-A100")),re(C.Chip,"defaultBorder",q("palette-grey-400")),re(C.Chip,"defaultAvatarColor",q("palette-grey-700")),re(C.Chip,"defaultIconColor",q("palette-grey-700")),re(C.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),re(C.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),re(C.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),re(C.LinearProgress,"primaryBg",U(Rt,C.primary.main,.62)),re(C.LinearProgress,"secondaryBg",U(Rt,C.secondary.main,.62)),re(C.LinearProgress,"errorBg",U(Rt,C.error.main,.62)),re(C.LinearProgress,"infoBg",U(Rt,C.info.main,.62)),re(C.LinearProgress,"successBg",U(Rt,C.success.main,.62)),re(C.LinearProgress,"warningBg",U(Rt,C.warning.main,.62)),re(C.Skeleton,"bg",A?U(Ko,C.text.primary,.11):`rgba(${q("palette-text-primaryChannel")} / 0.11)`),re(C.Slider,"primaryTrack",U(Rt,C.primary.main,.62)),re(C.Slider,"secondaryTrack",U(Rt,C.secondary.main,.62)),re(C.Slider,"errorTrack",U(Rt,C.error.main,.62)),re(C.Slider,"infoTrack",U(Rt,C.info.main,.62)),re(C.Slider,"successTrack",U(Rt,C.success.main,.62)),re(C.Slider,"warningTrack",U(Rt,C.warning.main,.62));const P=A?U(kt,C.background.default,.6825):Ec(C.background.default,.8);re(C.SnackbarContent,"bg",P),re(C.SnackbarContent,"color",gi(()=>A?tp.text.primary:C.getContrastText(P))),re(C.SpeedDialAction,"fabHoverBg",Ec(C.background.paper,.15)),re(C.StepConnector,"border",q("palette-grey-400")),re(C.StepContent,"border",q("palette-grey-400")),re(C.Switch,"defaultColor",q("palette-common-white")),re(C.Switch,"defaultDisabledColor",q("palette-grey-100")),re(C.Switch,"primaryDisabledColor",U(Rt,C.primary.main,.62)),re(C.Switch,"secondaryDisabledColor",U(Rt,C.secondary.main,.62)),re(C.Switch,"errorDisabledColor",U(Rt,C.error.main,.62)),re(C.Switch,"infoDisabledColor",U(Rt,C.info.main,.62)),re(C.Switch,"successDisabledColor",U(Rt,C.success.main,.62)),re(C.Switch,"warningDisabledColor",U(Rt,C.warning.main,.62)),re(C.TableCell,"border",U(Rt,U(Ko,C.divider,1),.88)),re(C.Tooltip,"bg",U(Ko,C.grey[700],.92))}if(C.mode==="dark"){re(C.Alert,"errorColor",U(Rt,C.error.light,.6)),re(C.Alert,"infoColor",U(Rt,C.info.light,.6)),re(C.Alert,"successColor",U(Rt,C.success.light,.6)),re(C.Alert,"warningColor",U(Rt,C.warning.light,.6)),re(C.Alert,"errorFilledBg",q("palette-error-dark")),re(C.Alert,"infoFilledBg",q("palette-info-dark")),re(C.Alert,"successFilledBg",q("palette-success-dark")),re(C.Alert,"warningFilledBg",q("palette-warning-dark")),re(C.Alert,"errorFilledColor",gi(()=>C.getContrastText(C.error.dark))),re(C.Alert,"infoFilledColor",gi(()=>C.getContrastText(C.info.dark))),re(C.Alert,"successFilledColor",gi(()=>C.getContrastText(C.success.dark))),re(C.Alert,"warningFilledColor",gi(()=>C.getContrastText(C.warning.dark))),re(C.Alert,"errorStandardBg",U(kt,C.error.light,.9)),re(C.Alert,"infoStandardBg",U(kt,C.info.light,.9)),re(C.Alert,"successStandardBg",U(kt,C.success.light,.9)),re(C.Alert,"warningStandardBg",U(kt,C.warning.light,.9)),re(C.Alert,"errorIconColor",q("palette-error-main")),re(C.Alert,"infoIconColor",q("palette-info-main")),re(C.Alert,"successIconColor",q("palette-success-main")),re(C.Alert,"warningIconColor",q("palette-warning-main")),re(C.AppBar,"defaultBg",q("palette-grey-900")),re(C.AppBar,"darkBg",q("palette-background-paper")),re(C.AppBar,"darkColor",q("palette-text-primary")),re(C.Avatar,"defaultBg",q("palette-grey-600")),re(C.Button,"inheritContainedBg",q("palette-grey-800")),re(C.Button,"inheritContainedHoverBg",q("palette-grey-700")),re(C.Chip,"defaultBorder",q("palette-grey-700")),re(C.Chip,"defaultAvatarColor",q("palette-grey-300")),re(C.Chip,"defaultIconColor",q("palette-grey-300")),re(C.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),re(C.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),re(C.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),re(C.LinearProgress,"primaryBg",U(kt,C.primary.main,.5)),re(C.LinearProgress,"secondaryBg",U(kt,C.secondary.main,.5)),re(C.LinearProgress,"errorBg",U(kt,C.error.main,.5)),re(C.LinearProgress,"infoBg",U(kt,C.info.main,.5)),re(C.LinearProgress,"successBg",U(kt,C.success.main,.5)),re(C.LinearProgress,"warningBg",U(kt,C.warning.main,.5)),re(C.Skeleton,"bg",A?U(Ko,C.text.primary,.13):`rgba(${q("palette-text-primaryChannel")} / 0.13)`),re(C.Slider,"primaryTrack",U(kt,C.primary.main,.5)),re(C.Slider,"secondaryTrack",U(kt,C.secondary.main,.5)),re(C.Slider,"errorTrack",U(kt,C.error.main,.5)),re(C.Slider,"infoTrack",U(kt,C.info.main,.5)),re(C.Slider,"successTrack",U(kt,C.success.main,.5)),re(C.Slider,"warningTrack",U(kt,C.warning.main,.5));const P=A?U(Rt,C.background.default,.985):Ec(C.background.default,.98);re(C.SnackbarContent,"bg",P),re(C.SnackbarContent,"color",gi(()=>A?Qv.text.primary:C.getContrastText(P))),re(C.SpeedDialAction,"fabHoverBg",Ec(C.background.paper,.15)),re(C.StepConnector,"border",q("palette-grey-600")),re(C.StepContent,"border",q("palette-grey-600")),re(C.Switch,"defaultColor",q("palette-grey-300")),re(C.Switch,"defaultDisabledColor",q("palette-grey-600")),re(C.Switch,"primaryDisabledColor",U(kt,C.primary.main,.55)),re(C.Switch,"secondaryDisabledColor",U(kt,C.secondary.main,.55)),re(C.Switch,"errorDisabledColor",U(kt,C.error.main,.55)),re(C.Switch,"infoDisabledColor",U(kt,C.info.main,.55)),re(C.Switch,"successDisabledColor",U(kt,C.success.main,.55)),re(C.Switch,"warningDisabledColor",U(kt,C.warning.main,.55)),re(C.TableCell,"border",U(kt,U(Ko,C.divider,1),.68)),re(C.Tooltip,"bg",U(Ko,C.grey[700],.92))}Ii(C.background,"default"),Ii(C.background,"paper"),Ii(C.common,"background"),Ii(C.common,"onBackground"),Ii(C,"divider"),Object.keys(C).forEach(P=>{const D=C[P];P!=="tonalOffset"&&D&&typeof D=="object"&&(D.main&&re(C[P],"mainChannel",Sl(_l(D.main))),D.light&&re(C[P],"lightChannel",Sl(_l(D.light))),D.dark&&re(C[P],"darkChannel",Sl(_l(D.dark))),D.contrastText&&re(C[P],"contrastTextChannel",Sl(_l(D.contrastText))),P==="text"&&(Ii(C[P],"primary"),Ii(C[P],"secondary")),P==="action"&&(D.active&&Ii(C[P],"active"),D.selected&&Ii(C[P],"selected")))})}),R=t.reduce((G,C)=>Bn(G,C),R);const $={prefix:s,disableCssColorScheme:a,shouldSkipGeneratingVar:f,getSelector:FR(R),enableContrastVars:u},{vars:H,generateThemeVars:V,generateStyleSheets:K}=uR(R,$);return R.vars=H,Object.entries(R.colorSchemes[R.defaultColorScheme]).forEach(([G,C])=>{R[G]=C}),R.generateThemeVars=V,R.generateStyleSheets=K,R.generateSpacing=function(){return Av(g.spacing,uc(this))},R.getColorSchemeSelector=cR(d),R.spacing=R.generateSpacing(),R.shouldSkipGeneratingVar=f,R.unstable_sxConfig={...vl,...g?.unstable_sxConfig},R.unstable_sx=function(C){return lo({sx:C,theme:this})},R.toRuntimeSource=ab,R}function cb(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:np({...n===!0?{}:n.palette,mode:t})})}function _c(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:a=n?void 0:{light:!0},defaultColorScheme:s=n?.mode,...u}=e,f=s||"light",d=a?.[f],h={...a,...n?{[f]:{...typeof d!="boolean"&&d,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return rp(e,...t);let g=n;"palette"in e||h[f]&&(h[f]!==!0?g=h[f].palette:f==="dark"&&(g={mode:"dark"}));const y=rp({...e,palette:g},...t);return y.defaultColorScheme=f,y.colorSchemes=h,y.palette.mode==="light"&&(y.colorSchemes.light={...h.light!==!0&&h.light,palette:y.palette},cb(y,"dark",h.dark)),y.palette.mode==="dark"&&(y.colorSchemes.dark={...h.dark!==!0&&h.dark,palette:y.palette},cb(y,"light",h.light)),y}return!n&&!("light"in h)&&f==="light"&&(h.light=!0),XR({...u,colorSchemes:h,defaultColorScheme:f,...typeof r!="boolean"&&r},...t)}const ap=_c();function Xa(){const e=yc(ap);return e[Kr]||e}function fb(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const Qr=e=>fb(e)&&e!=="classes",Ee=Dv({themeId:Kr,defaultTheme:ap,rootShouldForwardProp:Qr});function ZR({theme:e,...t}){const n=Kr in e?e[Kr]:void 0;return L.jsx(qv,{...t,themeId:n?Kr:void 0,theme:n||e})}const wc={colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:KR}=oR({themeId:Kr,theme:()=>_c({cssVariables:!0}),colorSchemeStorageKey:wc.colorSchemeStorageKey,modeStorageKey:wc.modeStorageKey,defaultColorScheme:{light:wc.defaultLightColorScheme,dark:wc.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:ib(e.palette,e.typography)};return t.unstable_sx=function(r){return lo({sx:r,theme:this})},t}}),WR=KR;function QR({theme:e,...t}){const n=N.useMemo(()=>{if(typeof e=="function")return e;const r=Kr in e?e[Kr]:e;return"colorSchemes"in r?null:"vars"in r?e:{...e,vars:null}},[e]);return n?L.jsx(ZR,{theme:n,...t}):L.jsx(WR,{theme:e,...t})}function db(...e){return e.reduce((t,n)=>n==null?t:function(...a){t.apply(this,a),n.apply(this,a)},()=>{})}function JR(e){return L.jsx(kv,{...e,defaultTheme:ap,themeId:Kr})}function sp(e){return function(n){return L.jsx(JR,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function eO(){return Gh}const zt=Wk;function Ct(e){return Xk(e)}function tO(e){return Et("MuiSvgIcon",e)}_t("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const nO=e=>{const{color:t,fontSize:n,classes:r}=e,a={root:["root",t!=="inherit"&&`color${ye(t)}`,`fontSize${ye(n)}`]};return wt(a,tO,r)},rO=Ee("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${ye(n.color)}`],t[`fontSize${ye(n.fontSize)}`]]}})(zt(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,t])=>t&&t.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),lp=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiSvgIcon"}),{children:a,className:s,color:u="inherit",component:f="svg",fontSize:d="medium",htmlColor:h,inheritViewBox:g=!1,titleAccess:y,viewBox:b="0 0 24 24",...v}=r,x=N.isValidElement(a)&&a.type==="svg",E={...r,color:u,component:f,fontSize:d,instanceFontSize:t.fontSize,inheritViewBox:g,viewBox:b,hasSvgAsChild:x},_={};g||(_.viewBox=b);const w=nO(E);return L.jsxs(rO,{as:f,className:Ue(w.root,s),focusable:"false",color:h,"aria-hidden":y?void 0:!0,role:y?"img":void 0,ref:n,..._,...v,...x&&a.props,ownerState:E,children:[x?a.props.children:a,y?L.jsx("title",{children:y}):null]})});lp.muiName="SvgIcon";function Xn(e,t){function n(r,a){return L.jsx(lp,{"data-testid":void 0,ref:a,...r,children:e})}return n.muiName=lp.muiName,N.memo(N.forwardRef(n))}function hb(e,t=166){let n;function r(...a){const s=()=>{e.apply(this,a)};clearTimeout(n),n=setTimeout(s,t)}return r.clear=()=>{clearTimeout(n)},r}function Jr(e){return e&&e.ownerDocument||document}function Mi(e){return Jr(e).defaultView||window}function pb(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function mb(e){const{controlled:t,default:n,name:r,state:a="value"}=e,{current:s}=N.useRef(t!==void 0),[u,f]=N.useState(n),d=s?t:u,h=N.useCallback(g=>{s||f(g)},[]);return[d,h]}function Wo(e){const t=N.useRef(e);return mi(()=>{t.current=e}),N.useRef((...n)=>(0,t.current)(...n)).current}function er(...e){const t=N.useRef(void 0),n=N.useCallback(r=>{const a=e.map(s=>{if(s==null)return null;if(typeof s=="function"){const u=s,f=u(r);return typeof f=="function"?f:()=>{u(null)}}return s.current=r,()=>{s.current=null}});return()=>{a.forEach(s=>s?.())}},e);return N.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function iO(e,t){const n=e.charCodeAt(2);return e[0]==="o"&&e[1]==="n"&&n>=65&&n<=90&&typeof t=="function"}function oO(e,t){if(!e)return t;function n(u,f){const d={};return Object.keys(f).forEach(h=>{iO(h,f[h])&&typeof u[h]=="function"&&(d[h]=(...g)=>{u[h](...g),f[h](...g)})}),d}if(typeof e=="function"||typeof t=="function")return u=>{const f=typeof t=="function"?t(u):t,d=typeof e=="function"?e({...u,...f}):e,h=Ue(u?.className,f?.className,d?.className),g=n(d,f);return{...f,...d,...g,...!!h&&{className:h},...f?.style&&d?.style&&{style:{...f.style,...d.style}},...f?.sx&&d?.sx&&{sx:[...Array.isArray(f.sx)?f.sx:[f.sx],...Array.isArray(d.sx)?d.sx:[d.sx]]}}};const r=t,a=n(e,r),s=Ue(r?.className,e?.className);return{...t,...e,...a,...!!s&&{className:s},...r?.style&&e?.style&&{style:{...r.style,...e.style}},...r?.sx&&e?.sx&&{sx:[...Array.isArray(r.sx)?r.sx:[r.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function gb(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function up(e,t){return up=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},up(e,t)}function yb(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,up(e,t)}var vb=P0();const Cc=Ku(vb),bb={disabled:!1},Tc=Jn.createContext(null);var aO=function(t){return t.scrollTop},wl="unmounted",Qo="exited",Jo="entering",Za="entered",cp="exiting",yi=(function(e){yb(t,e);function t(r,a){var s;s=e.call(this,r,a)||this;var u=a,f=u&&!u.isMounting?r.enter:r.appear,d;return s.appearStatus=null,r.in?f?(d=Qo,s.appearStatus=Jo):d=Za:r.unmountOnExit||r.mountOnEnter?d=wl:d=Qo,s.state={status:d},s.nextCallback=null,s}t.getDerivedStateFromProps=function(a,s){var u=a.in;return u&&s.status===wl?{status:Qo}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(a){var s=null;if(a!==this.props){var u=this.state.status;this.props.in?u!==Jo&&u!==Za&&(s=Jo):(u===Jo||u===Za)&&(s=cp)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var a=this.props.timeout,s,u,f;return s=u=f=a,a!=null&&typeof a!="number"&&(s=a.exit,u=a.enter,f=a.appear!==void 0?a.appear:u),{exit:s,enter:u,appear:f}},n.updateStatus=function(a,s){if(a===void 0&&(a=!1),s!==null)if(this.cancelNextCallback(),s===Jo){if(this.props.unmountOnExit||this.props.mountOnEnter){var u=this.props.nodeRef?this.props.nodeRef.current:Cc.findDOMNode(this);u&&aO(u)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Qo&&this.setState({status:wl})},n.performEnter=function(a){var s=this,u=this.props.enter,f=this.context?this.context.isMounting:a,d=this.props.nodeRef?[f]:[Cc.findDOMNode(this),f],h=d[0],g=d[1],y=this.getTimeouts(),b=f?y.appear:y.enter;if(!a&&!u||bb.disabled){this.safeSetState({status:Za},function(){s.props.onEntered(h)});return}this.props.onEnter(h,g),this.safeSetState({status:Jo},function(){s.props.onEntering(h,g),s.onTransitionEnd(b,function(){s.safeSetState({status:Za},function(){s.props.onEntered(h,g)})})})},n.performExit=function(){var a=this,s=this.props.exit,u=this.getTimeouts(),f=this.props.nodeRef?void 0:Cc.findDOMNode(this);if(!s||bb.disabled){this.safeSetState({status:Qo},function(){a.props.onExited(f)});return}this.props.onExit(f),this.safeSetState({status:cp},function(){a.props.onExiting(f),a.onTransitionEnd(u.exit,function(){a.safeSetState({status:Qo},function(){a.props.onExited(f)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(a,s){s=this.setNextCallback(s),this.setState(a,s)},n.setNextCallback=function(a){var s=this,u=!0;return this.nextCallback=function(f){u&&(u=!1,s.nextCallback=null,a(f))},this.nextCallback.cancel=function(){u=!1},this.nextCallback},n.onTransitionEnd=function(a,s){this.setNextCallback(s);var u=this.props.nodeRef?this.props.nodeRef.current:Cc.findDOMNode(this),f=a==null&&!this.props.addEndListener;if(!u||f){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var d=this.props.nodeRef?[this.nextCallback]:[u,this.nextCallback],h=d[0],g=d[1];this.props.addEndListener(h,g)}a!=null&&setTimeout(this.nextCallback,a)},n.render=function(){var a=this.state.status;if(a===wl)return null;var s=this.props,u=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var f=gb(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Jn.createElement(Tc.Provider,{value:null},typeof u=="function"?u(a,f):Jn.cloneElement(Jn.Children.only(u),f))},t})(Jn.Component);yi.contextType=Tc,yi.propTypes={};function Ka(){}yi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ka,onEntering:Ka,onEntered:Ka,onExit:Ka,onExiting:Ka,onExited:Ka},yi.UNMOUNTED=wl,yi.EXITED=Qo,yi.ENTERING=Jo,yi.ENTERED=Za,yi.EXITING=cp;function sO(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fp(e,t){var n=function(s){return t&&N.isValidElement(s)?t(s):s},r=Object.create(null);return e&&N.Children.map(e,function(a){return a}).forEach(function(a){r[a.key]=n(a)}),r}function lO(e,t){e=e||{},t=t||{};function n(g){return g in t?t[g]:e[g]}var r=Object.create(null),a=[];for(var s in e)s in t?a.length&&(r[s]=a,a=[]):a.push(s);var u,f={};for(var d in t){if(r[d])for(u=0;u<r[d].length;u++){var h=r[d][u];f[r[d][u]]=n(h)}f[d]=n(d)}for(u=0;u<a.length;u++)f[a[u]]=n(a[u]);return f}function ea(e,t,n){return n[t]!=null?n[t]:e.props[t]}function uO(e,t){return fp(e.children,function(n){return N.cloneElement(n,{onExited:t.bind(null,n),in:!0,appear:ea(n,"appear",e),enter:ea(n,"enter",e),exit:ea(n,"exit",e)})})}function cO(e,t,n){var r=fp(e.children),a=lO(t,r);return Object.keys(a).forEach(function(s){var u=a[s];if(N.isValidElement(u)){var f=s in t,d=s in r,h=t[s],g=N.isValidElement(h)&&!h.props.in;d&&(!f||g)?a[s]=N.cloneElement(u,{onExited:n.bind(null,u),in:!0,exit:ea(u,"exit",e),enter:ea(u,"enter",e)}):!d&&f&&!g?a[s]=N.cloneElement(u,{in:!1}):d&&f&&N.isValidElement(h)&&(a[s]=N.cloneElement(u,{onExited:n.bind(null,u),in:h.props.in,exit:ea(u,"exit",e),enter:ea(u,"enter",e)}))}}),a}var fO=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},dO={component:"div",childFactory:function(t){return t}},dp=(function(e){yb(t,e);function t(r,a){var s;s=e.call(this,r,a)||this;var u=s.handleExited.bind(sO(s));return s.state={contextValue:{isMounting:!0},handleExited:u,firstRender:!0},s}var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(a,s){var u=s.children,f=s.handleExited,d=s.firstRender;return{children:d?uO(a,f):cO(a,u,f),firstRender:!1}},n.handleExited=function(a,s){var u=fp(this.props.children);a.key in u||(a.props.onExited&&a.props.onExited(s),this.mounted&&this.setState(function(f){var d=ac({},f.children);return delete d[a.key],{children:d}}))},n.render=function(){var a=this.props,s=a.component,u=a.childFactory,f=gb(a,["component","childFactory"]),d=this.state.contextValue,h=fO(this.state.children).map(u);return delete f.appear,delete f.enter,delete f.exit,s===null?Jn.createElement(Tc.Provider,{value:d},h):Jn.createElement(Tc.Provider,{value:d},Jn.createElement(s,f,h))},t})(Jn.Component);dp.propTypes={},dp.defaultProps=dO;const Sb={};function xb(e,t){const n=N.useRef(Sb);return n.current===Sb&&(n.current=e(t)),n}const hO=[];function pO(e){N.useEffect(e,hO)}class hp{static create(){return new hp}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function Eb(){const e=xb(hp.create).current;return pO(e.disposeEffect),e}const _b=e=>e.scrollTop;function Ac(e,t){const{timeout:n,easing:r,style:a={}}=e;return{duration:a.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:a.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:a.transitionDelay}}function kc(e){return typeof e=="string"}function wb(e,t,n){return e===void 0||kc(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function Cb(e,t,n){return typeof e=="function"?e(t,n):e}function Tb(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function Ab(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function kb(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:a,className:s}=e;if(!t){const v=Ue(n?.className,s,a?.className,r?.className),x={...n?.style,...a?.style,...r?.style},E={...n,...a,...r};return v.length>0&&(E.className=v),Object.keys(x).length>0&&(E.style=x),{props:E,internalRef:void 0}}const u=Tb({...a,...r}),f=Ab(r),d=Ab(a),h=t(u),g=Ue(h?.className,n?.className,s,a?.className,r?.className),y={...h?.style,...n?.style,...a?.style,...r?.style},b={...h,...n,...d,...f};return g.length>0&&(b.className=g),Object.keys(y).length>0&&(b.style=y),{props:b,internalRef:h.ref}}function Ot(e,t){const{className:n,elementType:r,ownerState:a,externalForwardedProps:s,internalForwardedProps:u,shouldForwardComponentProp:f=!1,...d}=t,{component:h,slots:g={[e]:void 0},slotProps:y={[e]:void 0},...b}=s,v=g[e]||r,x=Cb(y[e],a),{props:{component:E,..._},internalRef:w}=kb({className:n,...d,externalForwardedProps:e==="root"?b:void 0,externalSlotProps:x}),O=er(w,x?.ref,t.ref),T=e==="root"?E||h:E,A=wb(v,{...e==="root"&&!h&&!g[e]&&u,...e!=="root"&&!g[e]&&u,..._,...T&&!f&&{as:T},...T&&f&&{component:T},ref:O},a);return[v,A]}function mO(e){return Et("MuiPaper",e)}_t("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const gO=e=>{const{square:t,elevation:n,variant:r,classes:a}=e,s={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return wt(s,mO,a)},yO=Ee("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(zt(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Rc=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiPaper"}),a=Xa(),{className:s,component:u="div",elevation:f=1,square:d=!1,variant:h="elevation",...g}=r,y={...r,component:u,elevation:f,square:d,variant:h},b=gO(y);return L.jsx(yO,{as:u,ownerState:y,className:Ue(b.root,s),ref:n,...g,style:{...h==="elevation"&&{"--Paper-shadow":(a.vars||a).shadows[f],...a.vars&&{"--Paper-overlay":a.vars.overlays?.[f]},...!a.vars&&a.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${xl("#fff",ip(f))}, ${xl("#fff",ip(f))})`}},...g.style}})});function Oc(e){try{return e.matches(":focus-visible")}catch{}return!1}class Nc{static create(){return new Nc}static use(){const t=xb(Nc.create).current,[n,r]=N.useState(!1);return t.shouldMount=n,t.setShouldMount=r,N.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=bO(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...t){this.mount().then(()=>this.ref.current?.start(...t))}stop(...t){this.mount().then(()=>this.ref.current?.stop(...t))}pulsate(...t){this.mount().then(()=>this.ref.current?.pulsate(...t))}}function vO(){return Nc.use()}function bO(){let e,t;const n=new Promise((r,a)=>{e=r,t=a});return n.resolve=e,n.reject=t,n}function SO(e){const{className:t,classes:n,pulsate:r=!1,rippleX:a,rippleY:s,rippleSize:u,in:f,onExited:d,timeout:h}=e,[g,y]=N.useState(!1),b=Ue(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),v={width:u,height:u,top:-(u/2)+s,left:-(u/2)+a},x=Ue(n.child,g&&n.childLeaving,r&&n.childPulsate);return!f&&!g&&y(!0),N.useEffect(()=>{if(!f&&d!=null){const E=setTimeout(d,h);return()=>{clearTimeout(E)}}},[d,f,h]),L.jsx("span",{className:b,style:v,children:L.jsx("span",{className:x})})}const Br=_t("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),pp=550,xO=80,EO=hl`
|
|
45
45
|
0% {
|
|
46
46
|
transform: scale(0);
|
|
47
47
|
opacity: 0.1;
|
|
@@ -51,7 +51,7 @@ export default theme;`}function sb(e){return typeof e=="number"?`${(e*100).toFix
|
|
|
51
51
|
transform: scale(1);
|
|
52
52
|
opacity: 0.3;
|
|
53
53
|
}
|
|
54
|
-
`,_O=
|
|
54
|
+
`,_O=hl`
|
|
55
55
|
0% {
|
|
56
56
|
opacity: 1;
|
|
57
57
|
}
|
|
@@ -59,7 +59,7 @@ export default theme;`}function sb(e){return typeof e=="number"?`${(e*100).toFix
|
|
|
59
59
|
100% {
|
|
60
60
|
opacity: 0;
|
|
61
61
|
}
|
|
62
|
-
`,wO=
|
|
62
|
+
`,wO=hl`
|
|
63
63
|
0% {
|
|
64
64
|
transform: scale(1);
|
|
65
65
|
}
|
|
@@ -114,7 +114,7 @@ export default theme;`}function sb(e){return typeof e=="number"?`${(e*100).toFix
|
|
|
114
114
|
animation-iteration-count: infinite;
|
|
115
115
|
animation-delay: 200ms;
|
|
116
116
|
}
|
|
117
|
-
`,AO=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiTouchRipple"}),{center:a=!1,classes:s={},className:u,...f}=r,[d,h]=N.useState([]),g=N.useRef(0),y=N.useRef(null);N.useEffect(()=>{y.current&&(y.current(),y.current=null)},[d]);const b=N.useRef(!1),v=Eb(),x=N.useRef(null),E=N.useRef(null),_=N.useCallback(A=>{const{pulsate:M,rippleX:R,rippleY:$,rippleSize:H,cb:V}=A;h(K=>[...K,L.jsx(TO,{classes:{ripple:Ue(s.ripple,Br.ripple),rippleVisible:Ue(s.rippleVisible,Br.rippleVisible),ripplePulsate:Ue(s.ripplePulsate,Br.ripplePulsate),child:Ue(s.child,Br.child),childLeaving:Ue(s.childLeaving,Br.childLeaving),childPulsate:Ue(s.childPulsate,Br.childPulsate)},timeout:pp,pulsate:M,rippleX:R,rippleY:$,rippleSize:H},g.current)]),g.current+=1,y.current=V},[s]),w=N.useCallback((A={},M={},R=()=>{})=>{const{pulsate:$=!1,center:H=a||M.pulsate,fakeElement:V=!1}=M;if(A?.type==="mousedown"&&b.current){b.current=!1;return}A?.type==="touchstart"&&(b.current=!0);const K=V?null:E.current,G=K?K.getBoundingClientRect():{width:0,height:0,left:0,top:0};let C,q,U;if(H||A===void 0||A.clientX===0&&A.clientY===0||!A.clientX&&!A.touches)C=Math.round(G.width/2),q=Math.round(G.height/2);else{const{clientX:P,clientY:D}=A.touches&&A.touches.length>0?A.touches[0]:A;C=Math.round(P-G.left),q=Math.round(D-G.top)}if(H)U=Math.sqrt((2*G.width**2+G.height**2)/3),U%2===0&&(U+=1);else{const P=Math.max(Math.abs((K?K.clientWidth:0)-C),C)*2+2,D=Math.max(Math.abs((K?K.clientHeight:0)-q),q)*2+2;U=Math.sqrt(P**2+D**2)}A?.touches?x.current===null&&(x.current=()=>{_({pulsate:$,rippleX:C,rippleY:q,rippleSize:U,cb:R})},v.start(xO,()=>{x.current&&(x.current(),x.current=null)})):_({pulsate:$,rippleX:C,rippleY:q,rippleSize:U,cb:R})},[a,_,v]),O=N.useCallback(()=>{w({},{pulsate:!0})},[w]),T=N.useCallback((A,M)=>{if(v.clear(),A?.type==="touchend"&&x.current){x.current(),x.current=null,v.start(0,()=>{T(A,M)});return}x.current=null,h(R=>R.length>0?R.slice(1):R),y.current=M},[v]);return N.useImperativeHandle(n,()=>({pulsate:O,start:w,stop:T}),[O,w,T]),L.jsx(CO,{className:Ue(Br.root,s.root,u),ref:E,...f,children:L.jsx(dp,{component:null,exit:!0,children:d})})});function kO(e){return Et("MuiButtonBase",e)}const RO=_t("MuiButtonBase",["root","disabled","focusVisible"]),OO=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:a}=e,u=wt({root:["root",t&&"disabled",n&&"focusVisible"]},kO,a);return n&&r&&(u.root+=` ${r}`),u},NO=Ee("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${RO.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ic=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiButtonBase"}),{action:a,centerRipple:s=!1,children:u,className:f,component:d="button",disabled:h=!1,disableRipple:g=!1,disableTouchRipple:y=!1,focusRipple:b=!1,focusVisibleClassName:v,LinkComponent:x="a",onBlur:E,onClick:_,onContextMenu:w,onDragLeave:O,onFocus:T,onFocusVisible:A,onKeyDown:M,onKeyUp:R,onMouseDown:$,onMouseLeave:H,onMouseUp:V,onTouchEnd:K,onTouchMove:G,onTouchStart:C,tabIndex:q=0,TouchRippleProps:U,touchRippleRef:P,type:D,...Z}=r,se=N.useRef(null),ue=vO(),B=er(ue.ref,P),[z,W]=N.useState(!1);h&&z&&W(!1),N.useImperativeHandle(a,()=>({focusVisible:()=>{W(!0),se.current.focus()}}),[]);const I=ue.shouldMount&&!g&&!h;N.useEffect(()=>{z&&b&&!g&&ue.pulsate()},[g,b,z,ue]);const pe=Di(ue,"start",$,y),ve=Di(ue,"stop",w,y),he=Di(ue,"stop",O,y),xe=Di(ue,"stop",V,y),Ke=Di(ue,"stop",Re=>{z&&Re.preventDefault(),H&&H(Re)},y),Ie=Di(ue,"start",C,y),Me=Di(ue,"stop",K,y),Fe=Di(ue,"stop",G,y),ft=Di(ue,"stop",Re=>{Oc(Re.target)||W(!1),E&&E(Re)},!1),Tn=Wo(Re=>{se.current||(se.current=Re.currentTarget),Oc(Re.target)&&(W(!0),A&&A(Re)),T&&T(Re)}),$e=()=>{const Re=se.current;return d&&d!=="button"&&!(Re.tagName==="A"&&Re.href)},Je=Wo(Re=>{b&&!Re.repeat&&z&&Re.key===" "&&ue.stop(Re,()=>{ue.start(Re)}),Re.target===Re.currentTarget&&$e()&&Re.key===" "&&Re.preventDefault(),M&&M(Re),Re.target===Re.currentTarget&&$e()&&Re.key==="Enter"&&!h&&(Re.preventDefault(),_&&_(Re))}),Jt=Wo(Re=>{b&&Re.key===" "&&z&&!Re.defaultPrevented&&ue.stop(Re,()=>{ue.pulsate(Re)}),R&&R(Re),_&&Re.target===Re.currentTarget&&$e()&&Re.key===" "&&!Re.defaultPrevented&&_(Re)});let on=d;on==="button"&&(Z.href||Z.to)&&(on=x);const Ht={};if(on==="button"){const Re=!!Z.formAction;Ht.type=D===void 0&&!Re?"button":D,Ht.disabled=h}else!Z.href&&!Z.to&&(Ht.role="button"),h&&(Ht["aria-disabled"]=h);const Tt=er(n,se),an={...r,centerRipple:s,component:d,disabled:h,disableRipple:g,disableTouchRipple:y,focusRipple:b,tabIndex:q,focusVisible:z},It=OO(an);return L.jsxs(NO,{as:on,className:Ue(It.root,f),ownerState:an,onBlur:ft,onClick:_,onContextMenu:ve,onFocus:Tn,onKeyDown:Je,onKeyUp:Jt,onMouseDown:pe,onMouseLeave:Ke,onMouseUp:xe,onDragLeave:he,onTouchEnd:Me,onTouchMove:Fe,onTouchStart:Ie,ref:Tt,tabIndex:h?-1:q,type:D,...Ht,...Z,children:[u,I?L.jsx(AO,{ref:B,center:s,...U}):null]})});function Di(e,t,n,r=!1){return Wo(a=>(n&&n(a),r||e[t](a),!0))}function IO(e){return typeof e.main=="string"}function MO(e,t=[]){if(!IO(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function zn(e=[]){return([,t])=>t&&MO(t,e)}function DO(e){return Et("MuiAlert",e)}const Rb=_t("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function BO(e){return Et("MuiCircularProgress",e)}_t("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const ei=44,mp=
|
|
117
|
+
`,AO=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiTouchRipple"}),{center:a=!1,classes:s={},className:u,...f}=r,[d,h]=N.useState([]),g=N.useRef(0),y=N.useRef(null);N.useEffect(()=>{y.current&&(y.current(),y.current=null)},[d]);const b=N.useRef(!1),v=Eb(),x=N.useRef(null),E=N.useRef(null),_=N.useCallback(A=>{const{pulsate:M,rippleX:R,rippleY:$,rippleSize:H,cb:V}=A;h(K=>[...K,L.jsx(TO,{classes:{ripple:Ue(s.ripple,Br.ripple),rippleVisible:Ue(s.rippleVisible,Br.rippleVisible),ripplePulsate:Ue(s.ripplePulsate,Br.ripplePulsate),child:Ue(s.child,Br.child),childLeaving:Ue(s.childLeaving,Br.childLeaving),childPulsate:Ue(s.childPulsate,Br.childPulsate)},timeout:pp,pulsate:M,rippleX:R,rippleY:$,rippleSize:H},g.current)]),g.current+=1,y.current=V},[s]),w=N.useCallback((A={},M={},R=()=>{})=>{const{pulsate:$=!1,center:H=a||M.pulsate,fakeElement:V=!1}=M;if(A?.type==="mousedown"&&b.current){b.current=!1;return}A?.type==="touchstart"&&(b.current=!0);const K=V?null:E.current,G=K?K.getBoundingClientRect():{width:0,height:0,left:0,top:0};let C,q,U;if(H||A===void 0||A.clientX===0&&A.clientY===0||!A.clientX&&!A.touches)C=Math.round(G.width/2),q=Math.round(G.height/2);else{const{clientX:P,clientY:D}=A.touches&&A.touches.length>0?A.touches[0]:A;C=Math.round(P-G.left),q=Math.round(D-G.top)}if(H)U=Math.sqrt((2*G.width**2+G.height**2)/3),U%2===0&&(U+=1);else{const P=Math.max(Math.abs((K?K.clientWidth:0)-C),C)*2+2,D=Math.max(Math.abs((K?K.clientHeight:0)-q),q)*2+2;U=Math.sqrt(P**2+D**2)}A?.touches?x.current===null&&(x.current=()=>{_({pulsate:$,rippleX:C,rippleY:q,rippleSize:U,cb:R})},v.start(xO,()=>{x.current&&(x.current(),x.current=null)})):_({pulsate:$,rippleX:C,rippleY:q,rippleSize:U,cb:R})},[a,_,v]),O=N.useCallback(()=>{w({},{pulsate:!0})},[w]),T=N.useCallback((A,M)=>{if(v.clear(),A?.type==="touchend"&&x.current){x.current(),x.current=null,v.start(0,()=>{T(A,M)});return}x.current=null,h(R=>R.length>0?R.slice(1):R),y.current=M},[v]);return N.useImperativeHandle(n,()=>({pulsate:O,start:w,stop:T}),[O,w,T]),L.jsx(CO,{className:Ue(Br.root,s.root,u),ref:E,...f,children:L.jsx(dp,{component:null,exit:!0,children:d})})});function kO(e){return Et("MuiButtonBase",e)}const RO=_t("MuiButtonBase",["root","disabled","focusVisible"]),OO=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:a}=e,u=wt({root:["root",t&&"disabled",n&&"focusVisible"]},kO,a);return n&&r&&(u.root+=` ${r}`),u},NO=Ee("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${RO.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ic=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiButtonBase"}),{action:a,centerRipple:s=!1,children:u,className:f,component:d="button",disabled:h=!1,disableRipple:g=!1,disableTouchRipple:y=!1,focusRipple:b=!1,focusVisibleClassName:v,LinkComponent:x="a",onBlur:E,onClick:_,onContextMenu:w,onDragLeave:O,onFocus:T,onFocusVisible:A,onKeyDown:M,onKeyUp:R,onMouseDown:$,onMouseLeave:H,onMouseUp:V,onTouchEnd:K,onTouchMove:G,onTouchStart:C,tabIndex:q=0,TouchRippleProps:U,touchRippleRef:P,type:D,...Z}=r,se=N.useRef(null),ue=vO(),B=er(ue.ref,P),[z,W]=N.useState(!1);h&&z&&W(!1),N.useImperativeHandle(a,()=>({focusVisible:()=>{W(!0),se.current.focus()}}),[]);const I=ue.shouldMount&&!g&&!h;N.useEffect(()=>{z&&b&&!g&&ue.pulsate()},[g,b,z,ue]);const pe=Di(ue,"start",$,y),ve=Di(ue,"stop",w,y),he=Di(ue,"stop",O,y),xe=Di(ue,"stop",V,y),Ke=Di(ue,"stop",Re=>{z&&Re.preventDefault(),H&&H(Re)},y),Ie=Di(ue,"start",C,y),Me=Di(ue,"stop",K,y),Fe=Di(ue,"stop",G,y),ft=Di(ue,"stop",Re=>{Oc(Re.target)||W(!1),E&&E(Re)},!1),Tn=Wo(Re=>{se.current||(se.current=Re.currentTarget),Oc(Re.target)&&(W(!0),A&&A(Re)),T&&T(Re)}),$e=()=>{const Re=se.current;return d&&d!=="button"&&!(Re.tagName==="A"&&Re.href)},Je=Wo(Re=>{b&&!Re.repeat&&z&&Re.key===" "&&ue.stop(Re,()=>{ue.start(Re)}),Re.target===Re.currentTarget&&$e()&&Re.key===" "&&Re.preventDefault(),M&&M(Re),Re.target===Re.currentTarget&&$e()&&Re.key==="Enter"&&!h&&(Re.preventDefault(),_&&_(Re))}),Jt=Wo(Re=>{b&&Re.key===" "&&z&&!Re.defaultPrevented&&ue.stop(Re,()=>{ue.pulsate(Re)}),R&&R(Re),_&&Re.target===Re.currentTarget&&$e()&&Re.key===" "&&!Re.defaultPrevented&&_(Re)});let on=d;on==="button"&&(Z.href||Z.to)&&(on=x);const Ht={};if(on==="button"){const Re=!!Z.formAction;Ht.type=D===void 0&&!Re?"button":D,Ht.disabled=h}else!Z.href&&!Z.to&&(Ht.role="button"),h&&(Ht["aria-disabled"]=h);const Tt=er(n,se),an={...r,centerRipple:s,component:d,disabled:h,disableRipple:g,disableTouchRipple:y,focusRipple:b,tabIndex:q,focusVisible:z},It=OO(an);return L.jsxs(NO,{as:on,className:Ue(It.root,f),ownerState:an,onBlur:ft,onClick:_,onContextMenu:ve,onFocus:Tn,onKeyDown:Je,onKeyUp:Jt,onMouseDown:pe,onMouseLeave:Ke,onMouseUp:xe,onDragLeave:he,onTouchEnd:Me,onTouchMove:Fe,onTouchStart:Ie,ref:Tt,tabIndex:h?-1:q,type:D,...Ht,...Z,children:[u,I?L.jsx(AO,{ref:B,center:s,...U}):null]})});function Di(e,t,n,r=!1){return Wo(a=>(n&&n(a),r||e[t](a),!0))}function IO(e){return typeof e.main=="string"}function MO(e,t=[]){if(!IO(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function zn(e=[]){return([,t])=>t&&MO(t,e)}function DO(e){return Et("MuiAlert",e)}const Rb=_t("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function BO(e){return Et("MuiCircularProgress",e)}_t("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const ei=44,mp=hl`
|
|
118
118
|
0% {
|
|
119
119
|
transform: rotate(0deg);
|
|
120
120
|
}
|
|
@@ -122,7 +122,7 @@ export default theme;`}function sb(e){return typeof e=="number"?`${(e*100).toFix
|
|
|
122
122
|
100% {
|
|
123
123
|
transform: rotate(360deg);
|
|
124
124
|
}
|
|
125
|
-
`,gp=
|
|
125
|
+
`,gp=hl`
|
|
126
126
|
0% {
|
|
127
127
|
stroke-dasharray: 1px, 200px;
|
|
128
128
|
stroke-dashoffset: 0;
|
|
@@ -141,37 +141,37 @@ export default theme;`}function sb(e){return typeof e=="number"?`${(e*100).toFix
|
|
|
141
141
|
animation: ${mp} 1.4s linear infinite;
|
|
142
142
|
`:null,LO=typeof gp!="string"?zh`
|
|
143
143
|
animation: ${gp} 1.4s ease-in-out infinite;
|
|
144
|
-
`:null,$O=e=>{const{classes:t,variant:n,color:r,disableShrink:a}=e,s={root:["root",n,`color${ye(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${ye(n)}`,a&&"circleDisableShrink"]};return wt(s,BO,t)},PO=Ee("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ye(n.color)}`]]}})(zt(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:zO||{animation:`${mp} 1.4s linear infinite`}},...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),UO=Ee("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),jO=Ee("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ye(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(zt(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:LO||{animation:`${gp} 1.4s ease-in-out infinite`}}]}))),HO=Ee("circle",{name:"MuiCircularProgress",slot:"Track"})(zt(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),Ob=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiCircularProgress"}),{className:a,color:s="primary",disableShrink:u=!1,enableTrackSlot:f=!1,size:d=40,style:h,thickness:g=3.6,value:y=0,variant:b="indeterminate",...v}=r,x={...r,color:s,disableShrink:u,size:d,thickness:g,value:y,variant:b,enableTrackSlot:f},E=$O(x),_={},w={},O={};if(b==="determinate"){const T=2*Math.PI*((ei-g)/2);_.strokeDasharray=T.toFixed(3),O["aria-valuenow"]=Math.round(y),_.strokeDashoffset=`${((100-y)/100*T).toFixed(3)}px`,w.transform="rotate(-90deg)"}return L.jsx(PO,{className:Ue(E.root,a),style:{width:d,height:d,...w,...h},ownerState:x,ref:n,role:"progressbar",...O,...v,children:L.jsxs(UO,{className:E.svg,ownerState:x,viewBox:`${ei/2} ${ei/2} ${ei} ${ei}`,children:[f?L.jsx(HO,{className:E.track,ownerState:x,cx:ei,cy:ei,r:(ei-g)/2,fill:"none",strokeWidth:g,"aria-hidden":"true"}):null,L.jsx(jO,{className:E.circle,style:_,ownerState:x,cx:ei,cy:ei,r:(ei-g)/2,fill:"none",strokeWidth:g})]})})});function VO(e){return Et("MuiIconButton",e)}const Nb=_t("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),FO=e=>{const{classes:t,disabled:n,color:r,edge:a,size:s,loading:u}=e,f={root:["root",u&&"loading",n&&"disabled",r!=="default"&&`color${ye(r)}`,a&&`edge${ye(a)}`,`size${ye(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return wt(f,VO,t)},GO=Ee(Ic,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${ye(n.color)}`],n.edge&&t[`edge${ye(n.edge)}`],t[`size${ye(n.size)}`]]}})(zt(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),zt(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Nb.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Nb.loading}`]:{color:"transparent"}}))),qO=Ee("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Cl=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiIconButton"}),{edge:a=!1,children:s,className:u,color:f="default",disabled:d=!1,disableFocusRipple:h=!1,size:g="medium",id:y,loading:b=null,loadingIndicator:v,...x}=r,E=xl(y),_=v??L.jsx(Ob,{"aria-labelledby":E,color:"inherit",size:16}),w={...r,edge:a,color:f,disabled:d,disableFocusRipple:h,loading:b,loadingIndicator:_,size:g},O=FO(w);return L.jsxs(GO,{id:b?E:y,className:Ue(O.root,u),centerRipple:!0,focusRipple:!h,disabled:d||b,ref:n,...x,ownerState:w,children:[typeof b=="boolean"&&L.jsx("span",{className:O.loadingWrapper,style:{display:"contents"},children:L.jsx(qO,{className:O.loadingIndicator,ownerState:w,children:b&&_})}),s]})}),YO=Xn(L.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),XO=Xn(L.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),ZO=Xn(L.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),KO=Xn(L.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),WO=Xn(L.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"})),QO=e=>{const{variant:t,color:n,severity:r,classes:a}=e,s={root:["root",`color${ye(n||r)}`,`${t}${ye(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return wt(s,DO,a)},JO=Ee(Rc,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ye(n.color||n.severity)}`]]}})(zt(({theme:e})=>{const t=e.palette.mode==="light"?e.darken:e.lighten,n=e.palette.mode==="light"?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(zn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${Rb.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(zn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${Rb.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(zn(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),eN=Ee("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),tN=Ee("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),nN=Ee("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),rN={success:L.jsx(YO,{fontSize:"inherit"}),warning:L.jsx(XO,{fontSize:"inherit"}),error:L.jsx(ZO,{fontSize:"inherit"}),info:L.jsx(KO,{fontSize:"inherit"})},iN=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiAlert"}),{action:a,children:s,className:u,closeText:f="Close",color:d,components:h={},componentsProps:g={},icon:y,iconMapping:b=rN,onClose:v,role:x="alert",severity:E="success",slotProps:_={},slots:w={},variant:O="standard",...T}=r,A={...r,color:d,severity:E,variant:O,colorSeverity:d||E},M=QO(A),R={slots:{closeButton:h.CloseButton,closeIcon:h.CloseIcon,...w},slotProps:{...g,..._}},[$,H]=Ot("root",{ref:n,shouldForwardComponentProp:!0,className:Ue(M.root,u),elementType:JO,externalForwardedProps:{...R,...T},ownerState:A,additionalProps:{role:x,elevation:0}}),[V,K]=Ot("icon",{className:M.icon,elementType:eN,externalForwardedProps:R,ownerState:A}),[G,C]=Ot("message",{className:M.message,elementType:tN,externalForwardedProps:R,ownerState:A}),[q,U]=Ot("action",{className:M.action,elementType:nN,externalForwardedProps:R,ownerState:A}),[P,D]=Ot("closeButton",{elementType:Cl,externalForwardedProps:R,ownerState:A}),[Z,se]=Ot("closeIcon",{elementType:WO,externalForwardedProps:R,ownerState:A});return L.jsxs($,{...H,children:[y!==!1?L.jsx(V,{...K,children:y||b[E]}):null,L.jsx(G,{...C,children:s}),a!=null?L.jsx(q,{...U,children:a}):null,a==null&&v?L.jsx(q,{...U,children:L.jsx(P,{size:"small","aria-label":f,title:f,color:"inherit",onClick:v,...D,children:L.jsx(Z,{fontSize:"small",...se})})}):null]})});function oN(e){return Et("MuiTypography",e)}_t("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const aN={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},sN=eO(),lN=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:a,variant:s,classes:u}=e,f={root:["root",s,e.align!=="inherit"&&`align${ye(t)}`,n&&"gutterBottom",r&&"noWrap",a&&"paragraph"]};return wt(f,oN,u)},uN=Ee("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${ye(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(zt(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,n])=>t!=="inherit"&&n&&typeof n=="object").map(([t,n])=>({props:{variant:t},style:n})),...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${ye(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}))),Ib={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},ti=N.forwardRef(function(t,n){const{color:r,...a}=Ct({props:t,name:"MuiTypography"}),s=!aN[r],u=sN({...a,...s&&{color:r}}),{align:f="inherit",className:d,component:h,gutterBottom:g=!1,noWrap:y=!1,paragraph:b=!1,variant:v="body1",variantMapping:x=Ib,...E}=u,_={...u,align:f,color:r,className:d,component:h,gutterBottom:g,noWrap:y,paragraph:b,variant:v,variantMapping:x},w=h||(b?"p":x[v]||Ib[v])||"span",O=lN(_);return L.jsx(uN,{as:w,ref:n,className:Ue(O.root,d),...E,ownerState:_,style:{...f!=="inherit"&&{"--Typography-textAlign":f},...E.style}})});function Mb(e){const t=N.useRef({});return N.useEffect(()=>{t.current=e}),t.current}function cN(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:a=!1,...s}=e,u=a?{}:Cb(n,r),{props:f,internalRef:d}=kb({...s,externalSlotProps:u}),h=er(d,u?.ref,e.additionalProps?.ref);return wb(t,{...f,ref:h},r)}function Tl(e){return parseInt(N.version,10)>=19?e?.props?.ref||null:e?.ref||null}function fN(e){return typeof e=="function"?e():e}const dN=N.forwardRef(function(t,n){const{children:r,container:a,disablePortal:s=!1}=t,[u,f]=N.useState(null),d=er(N.isValidElement(r)?Tl(r):null,n);if(mi(()=>{s||f(fN(a)||document.body)},[a,s]),mi(()=>{if(u&&!s)return pb(n,u),()=>{pb(n,null)}},[n,u,s]),s){if(N.isValidElement(r)){const h={ref:d};return N.cloneElement(r,h)}return r}return u&&vb.createPortal(r,u)}),hN=Xn(L.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function pN(e){return Et("MuiChip",e)}const nt=_t("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),mN=e=>{const{classes:t,disabled:n,size:r,color:a,iconColor:s,onDelete:u,clickable:f,variant:d}=e,h={root:["root",d,n&&"disabled",`size${ye(r)}`,`color${ye(a)}`,f&&"clickable",f&&`clickableColor${ye(a)}`,u&&"deletable",u&&`deletableColor${ye(a)}`,`${d}${ye(a)}`],label:["label",`label${ye(r)}`],avatar:["avatar",`avatar${ye(r)}`,`avatarColor${ye(a)}`],icon:["icon",`icon${ye(r)}`,`iconColor${ye(s)}`],deleteIcon:["deleteIcon",`deleteIcon${ye(r)}`,`deleteIconColor${ye(a)}`,`deleteIcon${ye(d)}Color${ye(a)}`]};return wt(h,pN,t)},gN=Ee("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:a,clickable:s,onDelete:u,size:f,variant:d}=n;return[{[`& .${nt.avatar}`]:t.avatar},{[`& .${nt.avatar}`]:t[`avatar${ye(f)}`]},{[`& .${nt.avatar}`]:t[`avatarColor${ye(r)}`]},{[`& .${nt.icon}`]:t.icon},{[`& .${nt.icon}`]:t[`icon${ye(f)}`]},{[`& .${nt.icon}`]:t[`iconColor${ye(a)}`]},{[`& .${nt.deleteIcon}`]:t.deleteIcon},{[`& .${nt.deleteIcon}`]:t[`deleteIcon${ye(f)}`]},{[`& .${nt.deleteIcon}`]:t[`deleteIconColor${ye(r)}`]},{[`& .${nt.deleteIcon}`]:t[`deleteIcon${ye(d)}Color${ye(r)}`]},t.root,t[`size${ye(f)}`],t[`color${ye(r)}`],s&&t.clickable,s&&r!=="default"&&t[`clickableColor${ye(r)}`],u&&t.deletable,u&&r!=="default"&&t[`deletableColor${ye(r)}`],t[d],t[`${d}${ye(r)}`]]}})(zt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${nt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${nt.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${nt.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${nt.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${nt.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${nt.icon}`]:{marginLeft:5,marginRight:-6},[`& .${nt.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${nt.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${nt.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(zn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${nt.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${nt.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${nt.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${nt.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(zn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${nt.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${nt.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(zn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${nt.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${nt.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${nt.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${nt.avatar}`]:{marginLeft:4},[`& .${nt.avatarSmall}`]:{marginLeft:2},[`& .${nt.icon}`]:{marginLeft:4},[`& .${nt.iconSmall}`]:{marginLeft:2},[`& .${nt.deleteIcon}`]:{marginRight:5},[`& .${nt.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(zn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.alpha((e.vars||e).palette[n].main,.7)}`,[`&.${nt.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${nt.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.focusOpacity)},[`& .${nt.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),yN=Ee("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${ye(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function Db(e){return e.key==="Backspace"||e.key==="Delete"}const vN=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiChip"}),{avatar:a,className:s,clickable:u,color:f="default",component:d,deleteIcon:h,disabled:g=!1,icon:y,label:b,onClick:v,onDelete:x,onKeyDown:E,onKeyUp:_,size:w="medium",variant:O="filled",tabIndex:T,skipFocusWhenDisabled:A=!1,slots:M={},slotProps:R={},...$}=r,H=N.useRef(null),V=er(H,n),K=he=>{he.stopPropagation(),x&&x(he)},G=he=>{he.currentTarget===he.target&&Db(he)&&he.preventDefault(),E&&E(he)},C=he=>{he.currentTarget===he.target&&x&&Db(he)&&x(he),_&&_(he)},q=u!==!1&&v?!0:u,U=q||x?Ic:d||"div",P={...r,component:U,disabled:g,size:w,color:f,iconColor:N.isValidElement(y)&&y.props.color||f,onDelete:!!x,clickable:q,variant:O},D=mN(P),Z=U===Ic?{component:d||"div",focusVisibleClassName:D.focusVisible,...x&&{disableRipple:!0}}:{};let se=null;x&&(se=h&&N.isValidElement(h)?N.cloneElement(h,{className:Ue(h.props.className,D.deleteIcon),onClick:K}):L.jsx(hN,{className:D.deleteIcon,onClick:K}));let ue=null;a&&N.isValidElement(a)&&(ue=N.cloneElement(a,{className:Ue(D.avatar,a.props.className)}));let B=null;y&&N.isValidElement(y)&&(B=N.cloneElement(y,{className:Ue(D.icon,y.props.className)}));const z={slots:M,slotProps:R},[W,I]=Ot("root",{elementType:gN,externalForwardedProps:{...z,...$},ownerState:P,shouldForwardComponentProp:!0,ref:V,className:Ue(D.root,s),additionalProps:{disabled:q&&g?!0:void 0,tabIndex:A&&g?-1:T,...Z},getSlotProps:he=>({...he,onClick:xe=>{he.onClick?.(xe),v?.(xe)},onKeyDown:xe=>{he.onKeyDown?.(xe),G(xe)},onKeyUp:xe=>{he.onKeyUp?.(xe),C(xe)}})}),[pe,ve]=Ot("label",{elementType:yN,externalForwardedProps:z,ownerState:P,className:D.label});return L.jsxs(W,{as:U,...I,children:[ue||B,L.jsx(pe,{...ve,children:b}),se]})});function Mc(e){return parseInt(e,10)||0}const bN={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function SN(e){for(const t in e)return!1;return!0}function Bb(e){return SN(e)||e.outerHeightStyle===0&&!e.overflowing}const xN=N.forwardRef(function(t,n){const{onChange:r,maxRows:a,minRows:s=1,style:u,value:f,...d}=t,{current:h}=N.useRef(f!=null),g=N.useRef(null),y=er(n,g),b=N.useRef(null),v=N.useRef(null),x=N.useCallback(()=>{const T=g.current,A=v.current;if(!T||!A)return;const R=Mi(T).getComputedStyle(T);if(R.width==="0px")return{outerHeightStyle:0,overflowing:!1};A.style.width=R.width,A.value=T.value||t.placeholder||"x",A.value.slice(-1)===`
|
|
144
|
+
`:null,$O=e=>{const{classes:t,variant:n,color:r,disableShrink:a}=e,s={root:["root",n,`color${ye(r)}`],svg:["svg"],track:["track"],circle:["circle",`circle${ye(n)}`,a&&"circleDisableShrink"]};return wt(s,BO,t)},PO=Ee("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${ye(n.color)}`]]}})(zt(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:zO||{animation:`${mp} 1.4s linear infinite`}},...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),UO=Ee("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),jO=Ee("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${ye(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(zt(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:LO||{animation:`${gp} 1.4s ease-in-out infinite`}}]}))),HO=Ee("circle",{name:"MuiCircularProgress",slot:"Track"})(zt(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),Ob=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiCircularProgress"}),{className:a,color:s="primary",disableShrink:u=!1,enableTrackSlot:f=!1,size:d=40,style:h,thickness:g=3.6,value:y=0,variant:b="indeterminate",...v}=r,x={...r,color:s,disableShrink:u,size:d,thickness:g,value:y,variant:b,enableTrackSlot:f},E=$O(x),_={},w={},O={};if(b==="determinate"){const T=2*Math.PI*((ei-g)/2);_.strokeDasharray=T.toFixed(3),O["aria-valuenow"]=Math.round(y),_.strokeDashoffset=`${((100-y)/100*T).toFixed(3)}px`,w.transform="rotate(-90deg)"}return L.jsx(PO,{className:Ue(E.root,a),style:{width:d,height:d,...w,...h},ownerState:x,ref:n,role:"progressbar",...O,...v,children:L.jsxs(UO,{className:E.svg,ownerState:x,viewBox:`${ei/2} ${ei/2} ${ei} ${ei}`,children:[f?L.jsx(HO,{className:E.track,ownerState:x,cx:ei,cy:ei,r:(ei-g)/2,fill:"none",strokeWidth:g,"aria-hidden":"true"}):null,L.jsx(jO,{className:E.circle,style:_,ownerState:x,cx:ei,cy:ei,r:(ei-g)/2,fill:"none",strokeWidth:g})]})})});function VO(e){return Et("MuiIconButton",e)}const Nb=_t("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge","loading","loadingIndicator","loadingWrapper"]),FO=e=>{const{classes:t,disabled:n,color:r,edge:a,size:s,loading:u}=e,f={root:["root",u&&"loading",n&&"disabled",r!=="default"&&`color${ye(r)}`,a&&`edge${ye(a)}`,`size${ye(s)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]};return wt(f,VO,t)},GO=Ee(Ic,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${ye(n.color)}`],n.edge&&t[`edge${ye(n.edge)}`],t[`size${ye(n.size)}`]]}})(zt(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),zt(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${Nb.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled},[`&.${Nb.loading}`]:{color:"transparent"}}))),qO=Ee("span",{name:"MuiIconButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",top:"50%",left:"50%",transform:"translate(-50%, -50%)",color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:"flex"}}]})),Cl=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiIconButton"}),{edge:a=!1,children:s,className:u,color:f="default",disabled:d=!1,disableFocusRipple:h=!1,size:g="medium",id:y,loading:b=null,loadingIndicator:v,...x}=r,E=El(y),_=v??L.jsx(Ob,{"aria-labelledby":E,color:"inherit",size:16}),w={...r,edge:a,color:f,disabled:d,disableFocusRipple:h,loading:b,loadingIndicator:_,size:g},O=FO(w);return L.jsxs(GO,{id:b?E:y,className:Ue(O.root,u),centerRipple:!0,focusRipple:!h,disabled:d||b,ref:n,...x,ownerState:w,children:[typeof b=="boolean"&&L.jsx("span",{className:O.loadingWrapper,style:{display:"contents"},children:L.jsx(qO,{className:O.loadingIndicator,ownerState:w,children:b&&_})}),s]})}),YO=Xn(L.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"})),XO=Xn(L.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"})),ZO=Xn(L.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"})),KO=Xn(L.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"})),WO=Xn(L.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"})),QO=e=>{const{variant:t,color:n,severity:r,classes:a}=e,s={root:["root",`color${ye(n||r)}`,`${t}${ye(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return wt(s,DO,a)},JO=Ee(Rc,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ye(n.color||n.severity)}`]]}})(zt(({theme:e})=>{const t=e.palette.mode==="light"?e.darken:e.lighten,n=e.palette.mode==="light"?e.lighten:e.darken;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(zn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${Rb.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(zn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${Rb.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(zn(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),eN=Ee("div",{name:"MuiAlert",slot:"Icon"})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),tN=Ee("div",{name:"MuiAlert",slot:"Message"})({padding:"8px 0",minWidth:0,overflow:"auto"}),nN=Ee("div",{name:"MuiAlert",slot:"Action"})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),rN={success:L.jsx(YO,{fontSize:"inherit"}),warning:L.jsx(XO,{fontSize:"inherit"}),error:L.jsx(ZO,{fontSize:"inherit"}),info:L.jsx(KO,{fontSize:"inherit"})},iN=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiAlert"}),{action:a,children:s,className:u,closeText:f="Close",color:d,components:h={},componentsProps:g={},icon:y,iconMapping:b=rN,onClose:v,role:x="alert",severity:E="success",slotProps:_={},slots:w={},variant:O="standard",...T}=r,A={...r,color:d,severity:E,variant:O,colorSeverity:d||E},M=QO(A),R={slots:{closeButton:h.CloseButton,closeIcon:h.CloseIcon,...w},slotProps:{...g,..._}},[$,H]=Ot("root",{ref:n,shouldForwardComponentProp:!0,className:Ue(M.root,u),elementType:JO,externalForwardedProps:{...R,...T},ownerState:A,additionalProps:{role:x,elevation:0}}),[V,K]=Ot("icon",{className:M.icon,elementType:eN,externalForwardedProps:R,ownerState:A}),[G,C]=Ot("message",{className:M.message,elementType:tN,externalForwardedProps:R,ownerState:A}),[q,U]=Ot("action",{className:M.action,elementType:nN,externalForwardedProps:R,ownerState:A}),[P,D]=Ot("closeButton",{elementType:Cl,externalForwardedProps:R,ownerState:A}),[Z,se]=Ot("closeIcon",{elementType:WO,externalForwardedProps:R,ownerState:A});return L.jsxs($,{...H,children:[y!==!1?L.jsx(V,{...K,children:y||b[E]}):null,L.jsx(G,{...C,children:s}),a!=null?L.jsx(q,{...U,children:a}):null,a==null&&v?L.jsx(q,{...U,children:L.jsx(P,{size:"small","aria-label":f,title:f,color:"inherit",onClick:v,...D,children:L.jsx(Z,{fontSize:"small",...se})})}):null]})});function oN(e){return Et("MuiTypography",e)}_t("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const aN={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},sN=eO(),lN=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:a,variant:s,classes:u}=e,f={root:["root",s,e.align!=="inherit"&&`align${ye(t)}`,n&&"gutterBottom",r&&"noWrap",a&&"paragraph"]};return wt(f,oN,u)},uN=Ee("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${ye(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(zt(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([t,n])=>t!=="inherit"&&n&&typeof n=="object").map(([t,n])=>({props:{variant:t},style:n})),...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,t])=>typeof t=="string").map(([t])=>({props:{color:`text${ye(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:t})=>t.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:t})=>t.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:t})=>t.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:t})=>t.paragraph,style:{marginBottom:16}}]}))),Ib={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},ti=N.forwardRef(function(t,n){const{color:r,...a}=Ct({props:t,name:"MuiTypography"}),s=!aN[r],u=sN({...a,...s&&{color:r}}),{align:f="inherit",className:d,component:h,gutterBottom:g=!1,noWrap:y=!1,paragraph:b=!1,variant:v="body1",variantMapping:x=Ib,...E}=u,_={...u,align:f,color:r,className:d,component:h,gutterBottom:g,noWrap:y,paragraph:b,variant:v,variantMapping:x},w=h||(b?"p":x[v]||Ib[v])||"span",O=lN(_);return L.jsx(uN,{as:w,ref:n,className:Ue(O.root,d),...E,ownerState:_,style:{...f!=="inherit"&&{"--Typography-textAlign":f},...E.style}})});function Mb(e){const t=N.useRef({});return N.useEffect(()=>{t.current=e}),t.current}function cN(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:a=!1,...s}=e,u=a?{}:Cb(n,r),{props:f,internalRef:d}=kb({...s,externalSlotProps:u}),h=er(d,u?.ref,e.additionalProps?.ref);return wb(t,{...f,ref:h},r)}function Tl(e){return parseInt(N.version,10)>=19?e?.props?.ref||null:e?.ref||null}function fN(e){return typeof e=="function"?e():e}const dN=N.forwardRef(function(t,n){const{children:r,container:a,disablePortal:s=!1}=t,[u,f]=N.useState(null),d=er(N.isValidElement(r)?Tl(r):null,n);if(mi(()=>{s||f(fN(a)||document.body)},[a,s]),mi(()=>{if(u&&!s)return pb(n,u),()=>{pb(n,null)}},[n,u,s]),s){if(N.isValidElement(r)){const h={ref:d};return N.cloneElement(r,h)}return r}return u&&vb.createPortal(r,u)}),hN=Xn(L.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}));function pN(e){return Et("MuiChip",e)}const nt=_t("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),mN=e=>{const{classes:t,disabled:n,size:r,color:a,iconColor:s,onDelete:u,clickable:f,variant:d}=e,h={root:["root",d,n&&"disabled",`size${ye(r)}`,`color${ye(a)}`,f&&"clickable",f&&`clickableColor${ye(a)}`,u&&"deletable",u&&`deletableColor${ye(a)}`,`${d}${ye(a)}`],label:["label",`label${ye(r)}`],avatar:["avatar",`avatar${ye(r)}`,`avatarColor${ye(a)}`],icon:["icon",`icon${ye(r)}`,`iconColor${ye(s)}`],deleteIcon:["deleteIcon",`deleteIcon${ye(r)}`,`deleteIconColor${ye(a)}`,`deleteIcon${ye(d)}Color${ye(a)}`]};return wt(h,pN,t)},gN=Ee("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:a,clickable:s,onDelete:u,size:f,variant:d}=n;return[{[`& .${nt.avatar}`]:t.avatar},{[`& .${nt.avatar}`]:t[`avatar${ye(f)}`]},{[`& .${nt.avatar}`]:t[`avatarColor${ye(r)}`]},{[`& .${nt.icon}`]:t.icon},{[`& .${nt.icon}`]:t[`icon${ye(f)}`]},{[`& .${nt.icon}`]:t[`iconColor${ye(a)}`]},{[`& .${nt.deleteIcon}`]:t.deleteIcon},{[`& .${nt.deleteIcon}`]:t[`deleteIcon${ye(f)}`]},{[`& .${nt.deleteIcon}`]:t[`deleteIconColor${ye(r)}`]},{[`& .${nt.deleteIcon}`]:t[`deleteIcon${ye(d)}Color${ye(r)}`]},t.root,t[`size${ye(f)}`],t[`color${ye(r)}`],s&&t.clickable,s&&r!=="default"&&t[`clickableColor${ye(r)}`],u&&t.deletable,u&&r!=="default"&&t[`deletableColor${ye(r)}`],t[d],t[`${d}${ye(r)}`]]}})(zt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,lineHeight:1.5,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${nt.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${nt.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${nt.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${nt.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${nt.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${nt.icon}`]:{marginLeft:5,marginRight:-6},[`& .${nt.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.alpha((e.vars||e).palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.alpha((e.vars||e).palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${nt.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${nt.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(zn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${nt.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${nt.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${nt.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${nt.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}}},...Object.entries(e.palette).filter(zn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${nt.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`)},[`&.${nt.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.action.selected,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(zn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${nt.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${nt.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${nt.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${nt.avatar}`]:{marginLeft:4},[`& .${nt.avatarSmall}`]:{marginLeft:2},[`& .${nt.icon}`]:{marginLeft:4},[`& .${nt.iconSmall}`]:{marginLeft:2},[`& .${nt.deleteIcon}`]:{marginRight:5},[`& .${nt.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(zn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.alpha((e.vars||e).palette[n].main,.7)}`,[`&.${nt.clickable}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.hoverOpacity)},[`&.${nt.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette[n].main,(e.vars||e).palette.action.focusOpacity)},[`& .${nt.deleteIcon}`]:{color:e.alpha((e.vars||e).palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),yN=Ee("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${ye(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function Db(e){return e.key==="Backspace"||e.key==="Delete"}const vN=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiChip"}),{avatar:a,className:s,clickable:u,color:f="default",component:d,deleteIcon:h,disabled:g=!1,icon:y,label:b,onClick:v,onDelete:x,onKeyDown:E,onKeyUp:_,size:w="medium",variant:O="filled",tabIndex:T,skipFocusWhenDisabled:A=!1,slots:M={},slotProps:R={},...$}=r,H=N.useRef(null),V=er(H,n),K=he=>{he.stopPropagation(),x&&x(he)},G=he=>{he.currentTarget===he.target&&Db(he)&&he.preventDefault(),E&&E(he)},C=he=>{he.currentTarget===he.target&&x&&Db(he)&&x(he),_&&_(he)},q=u!==!1&&v?!0:u,U=q||x?Ic:d||"div",P={...r,component:U,disabled:g,size:w,color:f,iconColor:N.isValidElement(y)&&y.props.color||f,onDelete:!!x,clickable:q,variant:O},D=mN(P),Z=U===Ic?{component:d||"div",focusVisibleClassName:D.focusVisible,...x&&{disableRipple:!0}}:{};let se=null;x&&(se=h&&N.isValidElement(h)?N.cloneElement(h,{className:Ue(h.props.className,D.deleteIcon),onClick:K}):L.jsx(hN,{className:D.deleteIcon,onClick:K}));let ue=null;a&&N.isValidElement(a)&&(ue=N.cloneElement(a,{className:Ue(D.avatar,a.props.className)}));let B=null;y&&N.isValidElement(y)&&(B=N.cloneElement(y,{className:Ue(D.icon,y.props.className)}));const z={slots:M,slotProps:R},[W,I]=Ot("root",{elementType:gN,externalForwardedProps:{...z,...$},ownerState:P,shouldForwardComponentProp:!0,ref:V,className:Ue(D.root,s),additionalProps:{disabled:q&&g?!0:void 0,tabIndex:A&&g?-1:T,...Z},getSlotProps:he=>({...he,onClick:xe=>{he.onClick?.(xe),v?.(xe)},onKeyDown:xe=>{he.onKeyDown?.(xe),G(xe)},onKeyUp:xe=>{he.onKeyUp?.(xe),C(xe)}})}),[pe,ve]=Ot("label",{elementType:yN,externalForwardedProps:z,ownerState:P,className:D.label});return L.jsxs(W,{as:U,...I,children:[ue||B,L.jsx(pe,{...ve,children:b}),se]})});function Mc(e){return parseInt(e,10)||0}const bN={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function SN(e){for(const t in e)return!1;return!0}function Bb(e){return SN(e)||e.outerHeightStyle===0&&!e.overflowing}const xN=N.forwardRef(function(t,n){const{onChange:r,maxRows:a,minRows:s=1,style:u,value:f,...d}=t,{current:h}=N.useRef(f!=null),g=N.useRef(null),y=er(n,g),b=N.useRef(null),v=N.useRef(null),x=N.useCallback(()=>{const T=g.current,A=v.current;if(!T||!A)return;const R=Mi(T).getComputedStyle(T);if(R.width==="0px")return{outerHeightStyle:0,overflowing:!1};A.style.width=R.width,A.value=T.value||t.placeholder||"x",A.value.slice(-1)===`
|
|
145
145
|
`&&(A.value+=" ");const $=R.boxSizing,H=Mc(R.paddingBottom)+Mc(R.paddingTop),V=Mc(R.borderBottomWidth)+Mc(R.borderTopWidth),K=A.scrollHeight;A.value="x";const G=A.scrollHeight;let C=K;s&&(C=Math.max(Number(s)*G,C)),a&&(C=Math.min(Number(a)*G,C)),C=Math.max(C,G);const q=C+($==="border-box"?H+V:0),U=Math.abs(C-K)<=1;return{outerHeightStyle:q,overflowing:U}},[a,s,t.placeholder]),E=Wo(()=>{const T=g.current,A=x();if(!T||!A||Bb(A))return!1;const M=A.outerHeightStyle;return b.current!=null&&b.current!==M}),_=N.useCallback(()=>{const T=g.current,A=x();if(!T||!A||Bb(A))return;const M=A.outerHeightStyle;b.current!==M&&(b.current=M,T.style.height=`${M}px`),T.style.overflow=A.overflowing?"hidden":""},[x]),w=N.useRef(-1);mi(()=>{const T=hb(_),A=g?.current;if(!A)return;const M=Mi(A);M.addEventListener("resize",T);let R;return typeof ResizeObserver<"u"&&(R=new ResizeObserver(()=>{E()&&(R.unobserve(A),cancelAnimationFrame(w.current),_(),w.current=requestAnimationFrame(()=>{R.observe(A)}))}),R.observe(A)),()=>{T.clear(),cancelAnimationFrame(w.current),M.removeEventListener("resize",T),R&&R.disconnect()}},[x,_,E]),mi(()=>{_()});const O=T=>{h||_();const A=T.target,M=A.value.length,R=A.value.endsWith(`
|
|
146
|
-
`),$=A.selectionStart===M;R&&$&&A.setSelectionRange(M,M),r&&r(T)};return L.jsxs(N.Fragment,{children:[L.jsx("textarea",{value:f,onChange:O,ref:y,rows:s,style:u,...d}),L.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:v,tabIndex:-1,style:{...bN.shadow,...u,paddingTop:0,paddingBottom:0}})]})});function Ka({props:e,states:t,muiFormControl:n}){return t.reduce((r,a)=>(r[a]=e[a],n&&typeof e[a]>"u"&&(r[a]=n[a]),r),{})}const yp=N.createContext(void 0);function Wa(){return N.useContext(yp)}function zb(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Dc(e,t=!1){return e&&(zb(e.value)&&e.value!==""||t&&zb(e.defaultValue)&&e.defaultValue!=="")}function EN(e){return e.startAdornment}function _N(e){return Et("MuiInputBase",e)}const Qa=_t("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Lb;const Bc=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${ye(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},zc=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},wN=e=>{const{classes:t,color:n,disabled:r,error:a,endAdornment:s,focused:u,formControl:f,fullWidth:d,hiddenLabel:h,multiline:g,readOnly:y,size:b,startAdornment:v,type:x}=e,E={root:["root",`color${ye(n)}`,r&&"disabled",a&&"error",d&&"fullWidth",u&&"focused",f&&"formControl",b&&b!=="medium"&&`size${ye(b)}`,g&&"multiline",v&&"adornedStart",s&&"adornedEnd",h&&"hiddenLabel",y&&"readOnly"],input:["input",r&&"disabled",x==="search"&&"inputTypeSearch",g&&"inputMultiline",b==="small"&&"inputSizeSmall",h&&"inputHiddenLabel",v&&"inputAdornedStart",s&&"inputAdornedEnd",y&&"readOnly"]};return wt(E,_N,t)},Lc=Ee("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Bc})(zt(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Qa.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),$c=Ee("input",{name:"MuiInputBase",slot:"Input",overridesResolver:zc})(zt(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},a=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Qa.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus::-ms-input-placeholder":a},[`&.${Qa.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:s})=>!s.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:s})=>s.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),$b=sp({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),vp=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiInputBase"}),{"aria-describedby":a,autoComplete:s,autoFocus:u,className:f,color:d,components:h={},componentsProps:g={},defaultValue:y,disabled:b,disableInjectingGlobalStyles:v,endAdornment:x,error:E,fullWidth:_=!1,id:w,inputComponent:O="input",inputProps:T={},inputRef:A,margin:M,maxRows:R,minRows:$,multiline:H=!1,name:V,onBlur:K,onChange:G,onClick:C,onFocus:q,onKeyDown:U,onKeyUp:P,placeholder:D,readOnly:Z,renderSuffix:se,rows:ue,size:B,slotProps:z={},slots:W={},startAdornment:I,type:pe="text",value:ve,...he}=r,xe=T.value!=null?T.value:ve,{current:Ke}=N.useRef(xe!=null),Ie=N.useRef(),Me=N.useCallback(et=>{},[]),Fe=er(Ie,A,T.ref,Me),[ft,Tn]=N.useState(!1),$e=Wa(),Je=Ka({props:r,muiFormControl:$e,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Je.focused=$e?$e.focused:ft,N.useEffect(()=>{!$e&&b&&ft&&(Tn(!1),K&&K())},[$e,b,ft,K]);const Jt=$e&&$e.onFilled,on=$e&&$e.onEmpty,Ht=N.useCallback(et=>{Dc(et)?Jt&&Jt():on&&on()},[Jt,on]);mi(()=>{Ke&&Ht({value:xe})},[xe,Ht,Ke]);const Tt=et=>{q&&q(et),T.onFocus&&T.onFocus(et),$e&&$e.onFocus?$e.onFocus(et):Tn(!0)},an=et=>{K&&K(et),T.onBlur&&T.onBlur(et),$e&&$e.onBlur?$e.onBlur(et):Tn(!1)},It=(et,...In)=>{if(!Ke){const hn=et.target||Ie.current;if(hn==null)throw new Error(Ni(1));Ht({value:hn.value})}T.onChange&&T.onChange(et,...In),G&&G(et,...In)};N.useEffect(()=>{Ht(Ie.current)},[]);const Re=et=>{Ie.current&&et.currentTarget===et.target&&Ie.current.focus(),C&&C(et)};let Cr=O,tt=T;H&&Cr==="input"&&(ue?tt={type:void 0,minRows:ue,maxRows:ue,...tt}:tt={type:void 0,maxRows:R,minRows:$,...tt},Cr=xN);const oi=et=>{Ht(et.animationName==="mui-auto-fill-cancel"?Ie.current:{value:"x"})};N.useEffect(()=>{$e&&$e.setAdornedStart(!!I)},[$e,I]);const te={...r,color:Je.color||"primary",disabled:Je.disabled,endAdornment:x,error:Je.error,focused:Je.focused,formControl:$e,fullWidth:_,hiddenLabel:Je.hiddenLabel,multiline:H,size:Je.size,startAdornment:I,type:pe},ce=wN(te),we=W.root||h.Root||Lc,ze=z.root||g.root||{},We=W.input||h.Input||$c;return tt={...tt,...z.input??g.input},L.jsxs(N.Fragment,{children:[!v&&typeof $b=="function"&&(Lb||(Lb=L.jsx($b,{}))),L.jsxs(we,{...ze,ref:n,onClick:Re,...he,...!kc(we)&&{ownerState:{...te,...ze.ownerState}},className:Ue(ce.root,ze.className,f,Z&&"MuiInputBase-readOnly"),children:[I,L.jsx(yp.Provider,{value:null,children:L.jsx(We,{"aria-invalid":Je.error,"aria-describedby":a,autoComplete:s,autoFocus:u,defaultValue:y,disabled:Je.disabled,id:w,onAnimationStart:oi,name:V,placeholder:D,readOnly:Z,required:Je.required,rows:ue,value:xe,onKeyDown:U,onKeyUp:P,type:pe,...tt,...!kc(We)&&{as:Cr,ownerState:{...te,...tt.ownerState}},ref:Fe,className:Ue(ce.input,tt.className,Z&&"MuiInputBase-readOnly"),onBlur:an,onChange:It,onFocus:Tt})}),x,se?se({...Je,startAdornment:I}):null]})]})});function CN(e){return Et("MuiInput",e)}const Al={...Qa,..._t("MuiInput",["root","underline","input"])};function TN(e){return Et("MuiOutlinedInput",e)}const vi={...Qa,..._t("MuiOutlinedInput",["root","notchedOutline","input"])};function AN(e){return Et("MuiFilledInput",e)}const ta={...Qa,..._t("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},kN=Xn(L.jsx("path",{d:"M7 10l5 5 5-5z"})),RN=Xn(L.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));function ON(e){return Et("MuiAvatar",e)}_t("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const NN=e=>{const{classes:t,variant:n,colorDefault:r}=e;return wt({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},ON,t)},IN=Ee("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(zt(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),MN=Ee("img",{name:"MuiAvatar",slot:"Img"})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),DN=Ee(RN,{name:"MuiAvatar",slot:"Fallback"})({width:"75%",height:"75%"});function BN({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[a,s]=N.useState(!1);return N.useEffect(()=>{if(!n&&!r)return;s(!1);let u=!0;const f=new Image;return f.onload=()=>{u&&s("loaded")},f.onerror=()=>{u&&s("error")},f.crossOrigin=e,f.referrerPolicy=t,f.src=n,r&&(f.srcset=r),()=>{u=!1}},[e,t,n,r]),a}const Pc=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiAvatar"}),{alt:a,children:s,className:u,component:f="div",slots:d={},slotProps:h={},imgProps:g,sizes:y,src:b,srcSet:v,variant:x="circular",...E}=r;let _=null;const w={...r,component:f,variant:x},O=BN({...g,...typeof h.img=="function"?h.img(w):h.img,src:b,srcSet:v}),T=b||v,A=T&&O!=="error";w.colorDefault=!A,delete w.ownerState;const M=NN(w),[R,$]=Ot("root",{ref:n,className:Ue(M.root,u),elementType:IN,externalForwardedProps:{slots:d,slotProps:h,component:f,...E},ownerState:w}),[H,V]=Ot("img",{className:M.img,elementType:MN,externalForwardedProps:{slots:d,slotProps:{img:{...g,...h.img}}},additionalProps:{alt:a,src:b,srcSet:v,sizes:y},ownerState:w}),[K,G]=Ot("fallback",{className:M.fallback,elementType:DN,externalForwardedProps:{slots:d,slotProps:h},shouldForwardComponentProp:!0,ownerState:w});return A?_=L.jsx(H,{...V}):s||s===0?_=s:T&&a?_=a[0]:_=L.jsx(K,{...G}),L.jsx(R,{...$,children:_})}),zN={entering:{opacity:1},entered:{opacity:1}},LN=N.forwardRef(function(t,n){const r=_l(),a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:u=!0,children:f,easing:d,in:h,onEnter:g,onEntered:y,onEntering:b,onExit:v,onExited:x,onExiting:E,style:_,timeout:w=a,TransitionComponent:O=yi,...T}=t,A=N.useRef(null),M=er(A,Tl(f),n),R=U=>P=>{if(U){const D=A.current;P===void 0?U(D):U(D,P)}},$=R(b),H=R((U,P)=>{_b(U);const D=Ac({style:_,timeout:w,easing:d},{mode:"enter"});U.style.webkitTransition=r.transitions.create("opacity",D),U.style.transition=r.transitions.create("opacity",D),g&&g(U,P)}),V=R(y),K=R(E),G=R(U=>{const P=Ac({style:_,timeout:w,easing:d},{mode:"exit"});U.style.webkitTransition=r.transitions.create("opacity",P),U.style.transition=r.transitions.create("opacity",P),v&&v(U)}),C=R(x),q=U=>{s&&s(A.current,U)};return L.jsx(O,{appear:u,in:h,nodeRef:A,onEnter:H,onEntered:V,onEntering:$,onExit:G,onExited:C,onExiting:K,addEndListener:q,timeout:w,...T,children:(U,{ownerState:P,...D})=>N.cloneElement(f,{style:{opacity:0,visibility:U==="exited"&&!h?"hidden":void 0,...zN[U],..._,...f.props.style},ref:M,...D})})});function $N(e){return Et("MuiBackdrop",e)}_t("MuiBackdrop",["root","invisible"]);const PN=e=>{const{classes:t,invisible:n}=e;return wt({root:["root",n&&"invisible"]},$N,t)},UN=Ee("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),jN=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiBackdrop"}),{children:a,className:s,component:u="div",invisible:f=!1,open:d,components:h={},componentsProps:g={},slotProps:y={},slots:b={},TransitionComponent:v,transitionDuration:x,...E}=r,_={...r,component:u,invisible:f},w=PN(_),O={transition:v,root:h.Root,...b},T={...g,...y},A={component:u,slots:O,slotProps:T},[M,R]=Ot("root",{elementType:UN,externalForwardedProps:A,className:Ue(w.root,s),ownerState:_}),[$,H]=Ot("transition",{elementType:LN,externalForwardedProps:A,ownerState:_});return L.jsx($,{in:d,timeout:x,...E,...H,children:L.jsx(M,{"aria-hidden":!0,...R,ref:n,children:a})})});function HN(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:a=!1}=e,s=Mb({badgeContent:t,max:r});let u=n;n===!1&&t===0&&!a&&(u=!0);const{badgeContent:f,max:d=r}=u?s:e,h=f&&Number(f)>d?`${d}+`:f;return{badgeContent:f,invisible:u,max:d,displayValue:h}}function VN(e){return Et("MuiBadge",e)}const co=_t("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),bp=10,Sp=4,FN=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:a,variant:s,classes:u={}}=e,f={root:["root"],badge:["badge",s,r&&"invisible",`anchorOrigin${ye(n.vertical)}${ye(n.horizontal)}`,`anchorOrigin${ye(n.vertical)}${ye(n.horizontal)}${ye(a)}`,`overlap${ye(a)}`,t!=="default"&&`color${ye(t)}`]};return wt(f,VN,u)},GN=Ee("span",{name:"MuiBadge",slot:"Root"})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),qN=Ee("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${ye(n.anchorOrigin.vertical)}${ye(n.anchorOrigin.horizontal)}${ye(n.overlap)}`],n.color!=="default"&&t[`color${ye(n.color)}`],n.invisible&&t.invisible]}})(zt(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:bp*2,lineHeight:1,padding:"0 6px",height:bp*2,borderRadius:bp,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(zn(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:Sp,height:Sp*2,minWidth:Sp*2,padding:0}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${co.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${co.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${co.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${co.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${co.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${co.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${co.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${co.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function Pb(e){return{vertical:e?.vertical??"top",horizontal:e?.horizontal??"right"}}const YN=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiBadge"}),{anchorOrigin:a,className:s,classes:u,component:f,components:d={},componentsProps:h={},children:g,overlap:y="rectangular",color:b="default",invisible:v=!1,max:x=99,badgeContent:E,slots:_,slotProps:w,showZero:O=!1,variant:T="standard",...A}=r,{badgeContent:M,invisible:R,max:$,displayValue:H}=HN({max:x,invisible:v,badgeContent:E,showZero:O}),V=Mb({anchorOrigin:Pb(a),color:b,overlap:y,variant:T,badgeContent:E}),K=R||M==null&&T!=="dot",{color:G=b,overlap:C=y,anchorOrigin:q,variant:U=T}=K?V:r,P=Pb(q),D=U!=="dot"?H:void 0,Z={...r,badgeContent:M,invisible:K,max:$,displayValue:D,showZero:O,anchorOrigin:P,color:G,overlap:C,variant:U},se=FN(Z),ue={slots:{root:_?.root??d.Root,badge:_?.badge??d.Badge},slotProps:{root:w?.root??h.root,badge:w?.badge??h.badge}},[B,z]=Ot("root",{elementType:GN,externalForwardedProps:{...ue,...A},ownerState:Z,className:Ue(se.root,s),ref:n,additionalProps:{as:f}}),[W,I]=Ot("badge",{elementType:qN,externalForwardedProps:ue,ownerState:Z,className:se.badge});return L.jsxs(B,{...z,children:[g,L.jsx(W,{...I,children:D})]})}),XN=_t("MuiBox",["root"]),ZN=_c(),En=_k({themeId:Kr,defaultTheme:ZN,defaultClassName:XN.root,generateClassName:Ov.generate});function KN(e){return Et("MuiButton",e)}const na=_t("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),WN=N.createContext({}),QN=N.createContext(void 0),JN=e=>{const{color:t,disableElevation:n,fullWidth:r,size:a,variant:s,loading:u,loadingPosition:f,classes:d}=e,h={root:["root",u&&"loading",s,`${s}${ye(t)}`,`size${ye(a)}`,`${s}Size${ye(a)}`,`color${ye(t)}`,n&&"disableElevation",r&&"fullWidth",u&&`loadingPosition${ye(f)}`],startIcon:["icon","startIcon",`iconSize${ye(a)}`],endIcon:["icon","endIcon",`iconSize${ye(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},g=wt(h,KN,d);return{...d,...g}},Ub=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],e3=Ee(Ic,{shouldForwardProp:e=>Qr(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ye(n.color)}`],t[`size${ye(n.size)}`],t[`${n.variant}Size${ye(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(zt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${na.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${na.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${na.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${na.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(zn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${na.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${na.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${na.loading}`]:{color:"transparent"}}}]}})),t3=Ee("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ye(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Ub]})),n3=Ee("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ye(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Ub]})),r3=Ee("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),jb=Ee("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Uc=N.forwardRef(function(t,n){const r=N.useContext(WN),a=N.useContext(QN),s=vl(r,t),u=Ct({props:s,name:"MuiButton"}),{children:f,color:d="primary",component:h="button",className:g,disabled:y=!1,disableElevation:b=!1,disableFocusRipple:v=!1,endIcon:x,focusVisibleClassName:E,fullWidth:_=!1,id:w,loading:O=null,loadingIndicator:T,loadingPosition:A="center",size:M="medium",startIcon:R,type:$,variant:H="text",...V}=u,K=xl(w),G=T??L.jsx(Ob,{"aria-labelledby":K,color:"inherit",size:16}),C={...u,color:d,component:h,disabled:y,disableElevation:b,disableFocusRipple:v,fullWidth:_,loading:O,loadingIndicator:G,loadingPosition:A,size:M,type:$,variant:H},q=JN(C),U=(R||O&&A==="start")&&L.jsx(t3,{className:q.startIcon,ownerState:C,children:R||L.jsx(jb,{className:q.loadingIconPlaceholder,ownerState:C})}),P=(x||O&&A==="end")&&L.jsx(n3,{className:q.endIcon,ownerState:C,children:x||L.jsx(jb,{className:q.loadingIconPlaceholder,ownerState:C})}),D=a||"",Z=typeof O=="boolean"?L.jsx("span",{className:q.loadingWrapper,style:{display:"contents"},children:O&&L.jsx(r3,{className:q.loadingIndicator,ownerState:C,children:G})}):null;return L.jsxs(e3,{ownerState:C,className:Ue(r.className,q.root,g,D),component:h,disabled:y||O,focusRipple:!v,focusVisibleClassName:Ue(q.focusVisible,E),ref:n,type:$,id:O?K:w,...V,classes:q,children:[U,A!=="end"&&Z,f,A==="end"&&Z,P]})}),xp=typeof sp({})=="function",i3=(e,t)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&!e.vars&&{colorScheme:e.palette.mode}}),o3=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),Hb=(e,t=!1)=>{const n={};t&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([s,u])=>{const f=e.getColorSchemeSelector(s);f.startsWith("@")?n[f]={":root":{colorScheme:u.palette?.mode}}:n[f.replace(/\s*&/,"")]={colorScheme:u.palette?.mode}});let r={html:i3(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...o3(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...n};const a=e.components?.MuiCssBaseline?.styleOverrides;return a&&(r=[r,a]),r},jc="mui-ecs",a3=e=>{const t=Hb(e,!1),n=Array.isArray(t)?t[0]:t;return!e.vars&&n&&(n.html[`:root:has(${jc})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([r,a])=>{const s=e.getColorSchemeSelector(r);s.startsWith("@")?n[s]={[`:root:not(:has(.${jc}))`]:{colorScheme:a.palette?.mode}}:n[s.replace(/\s*&/,"")]={[`&:not(:has(.${jc}))`]:{colorScheme:a.palette?.mode}}}),t},s3=sp(xp?({theme:e,enableColorScheme:t})=>Hb(e,t):({theme:e})=>a3(e));function l3(e){const t=Ct({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return L.jsxs(N.Fragment,{children:[xp&&L.jsx(s3,{enableColorScheme:r}),!xp&&!r&&L.jsx("span",{className:jc,style:{display:"none"}}),n]})}function Vb(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function u3(e){const t=Jr(e);return t.body===e?Mi(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function kl(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Fb(e){return parseFloat(Mi(e).getComputedStyle(e).paddingRight)||0}function c3(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function Gb(e,t,n,r,a){const s=[t,n,...r];[].forEach.call(e.children,u=>{const f=!s.includes(u),d=!c3(u);f&&d&&kl(u,a)})}function Ep(e,t){let n=-1;return e.some((r,a)=>t(r)?(n=a,!0):!1),n}function f3(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(u3(r)){const u=Vb(Mi(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Fb(r)+u}px`;const f=Jr(r).querySelectorAll(".mui-fixed");[].forEach.call(f,d=>{n.push({value:d.style.paddingRight,property:"padding-right",el:d}),d.style.paddingRight=`${Fb(d)+u}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=Jr(r).body;else{const u=r.parentElement,f=Mi(r);s=u?.nodeName==="HTML"&&f.getComputedStyle(u).overflowY==="scroll"?u:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:u,property:f})=>{s?u.style.setProperty(f,s):u.style.removeProperty(f)})}}function d3(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class h3{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&kl(t.modalRef,!1);const a=d3(n);Gb(n,t.mount,t.modalRef,a,!0);const s=Ep(this.containers,u=>u.container===n);return s!==-1?(this.containers[s].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:a}),r)}mount(t,n){const r=Ep(this.containers,s=>s.modals.includes(t)),a=this.containers[r];a.restore||(a.restore=f3(a,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const a=Ep(this.containers,u=>u.modals.includes(t)),s=this.containers[a];if(s.modals.splice(s.modals.indexOf(t),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),t.modalRef&&kl(t.modalRef,n),Gb(s.container,t.mount,t.modalRef,s.hiddenSiblings,!1),this.containers.splice(a,1);else{const u=s.modals[s.modals.length-1];u.modalRef&&kl(u.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Rl(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const p3=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function m3(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function g3(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function y3(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||g3(e))}function v3(e){const t=[],n=[];return Array.from(e.querySelectorAll(p3)).forEach((r,a)=>{const s=m3(r);s===-1||!y3(r)||(s===0?t.push(r):n.push({documentOrder:a,tabIndex:s,node:r}))}),n.sort((r,a)=>r.tabIndex===a.tabIndex?r.documentOrder-a.documentOrder:r.tabIndex-a.tabIndex).map(r=>r.node).concat(t)}function b3(){return!0}function S3(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:a=!1,getTabbable:s=v3,isEnabled:u=b3,open:f}=e,d=N.useRef(!1),h=N.useRef(null),g=N.useRef(null),y=N.useRef(null),b=N.useRef(null),v=N.useRef(!1),x=N.useRef(null),E=er(Tl(t),x),_=N.useRef(null);N.useEffect(()=>{!f||!x.current||(v.current=!n)},[n,f]),N.useEffect(()=>{if(!f||!x.current)return;const T=Jr(x.current),A=Rl(T);return x.current.contains(A)||(x.current.hasAttribute("tabIndex")||x.current.setAttribute("tabIndex","-1"),v.current&&x.current.focus()),()=>{a||(y.current&&y.current.focus&&(d.current=!0,y.current.focus()),y.current=null)}},[f]),N.useEffect(()=>{if(!f||!x.current)return;const T=Jr(x.current),A=$=>{if(_.current=$,r||!u()||$.key!=="Tab")return;Rl(T)===x.current&&$.shiftKey&&(d.current=!0,g.current&&g.current.focus())},M=()=>{const $=x.current;if($===null)return;const H=Rl(T);if(!T.hasFocus()||!u()||d.current){d.current=!1;return}if($.contains(H)||r&&H!==h.current&&H!==g.current)return;if(H!==b.current)b.current=null;else if(b.current!==null)return;if(!v.current)return;let V=[];if((H===h.current||H===g.current)&&(V=s(x.current)),V.length>0){const K=!!(_.current?.shiftKey&&_.current?.key==="Tab"),G=V[0],C=V[V.length-1];typeof G!="string"&&typeof C!="string"&&(K?C.focus():G.focus())}else $.focus()};T.addEventListener("focusin",M),T.addEventListener("keydown",A,!0);const R=setInterval(()=>{const $=Rl(T);$&&$.tagName==="BODY"&&M()},50);return()=>{clearInterval(R),T.removeEventListener("focusin",M),T.removeEventListener("keydown",A,!0)}},[n,r,a,u,f,s]);const w=T=>{y.current===null&&(y.current=T.relatedTarget),v.current=!0,b.current=T.target;const A=t.props.onFocus;A&&A(T)},O=T=>{y.current===null&&(y.current=T.relatedTarget),v.current=!0};return L.jsxs(N.Fragment,{children:[L.jsx("div",{tabIndex:f?0:-1,onFocus:O,ref:h,"data-testid":"sentinelStart"}),N.cloneElement(t,{ref:E,onFocus:w}),L.jsx("div",{tabIndex:f?0:-1,onFocus:O,ref:g,"data-testid":"sentinelEnd"})]})}function x3(e){return typeof e=="function"?e():e}function E3(e){return e?e.props.hasOwnProperty("in"):!1}const qb=()=>{},Hc=new h3;function _3(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:u,children:f,onClose:d,open:h,rootRef:g}=e,y=N.useRef({}),b=N.useRef(null),v=N.useRef(null),x=er(v,g),[E,_]=N.useState(!h),w=E3(f);let O=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(O=!1);const T=()=>Jr(b.current),A=()=>(y.current.modalRef=v.current,y.current.mount=b.current,y.current),M=()=>{Hc.mount(A(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},R=Wo(()=>{const P=x3(t)||T().body;Hc.add(A(),P),v.current&&M()}),$=()=>Hc.isTopModal(A()),H=Wo(P=>{b.current=P,P&&(h&&$()?M():v.current&&kl(v.current,O))}),V=N.useCallback(()=>{Hc.remove(A(),O)},[O]);N.useEffect(()=>()=>{V()},[V]),N.useEffect(()=>{h?R():(!w||!a)&&V()},[h,V,w,a,R]);const K=P=>D=>{P.onKeyDown?.(D),!(D.key!=="Escape"||D.which===229||!$())&&(n||(D.stopPropagation(),d&&d(D,"escapeKeyDown")))},G=P=>D=>{P.onClick?.(D),D.target===D.currentTarget&&d&&d(D,"backdropClick")};return{getRootProps:(P={})=>{const D=Tb(e);delete D.onTransitionEnter,delete D.onTransitionExited;const Z={...D,...P};return{role:"presentation",...Z,onKeyDown:K(Z),ref:x}},getBackdropProps:(P={})=>{const D=P;return{"aria-hidden":!0,...D,onClick:G(D),open:h}},getTransitionProps:()=>{const P=()=>{_(!1),s&&s()},D=()=>{_(!0),u&&u(),a&&V()};return{onEnter:db(P,f?.props.onEnter??qb),onExited:db(D,f?.props.onExited??qb)}},rootRef:x,portalRef:H,isTopModal:$,exited:E,hasTransition:w}}function w3(e){return Et("MuiModal",e)}_t("MuiModal",["root","hidden","backdrop"]);const C3=e=>{const{open:t,exited:n,classes:r}=e;return wt({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},w3,r)},T3=Ee("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(zt(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),A3=Ee(jN,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),k3=N.forwardRef(function(t,n){const r=Ct({name:"MuiModal",props:t}),{BackdropComponent:a=A3,BackdropProps:s,classes:u,className:f,closeAfterTransition:d=!1,children:h,container:g,component:y,components:b={},componentsProps:v={},disableAutoFocus:x=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:_=!1,disablePortal:w=!1,disableRestoreFocus:O=!1,disableScrollLock:T=!1,hideBackdrop:A=!1,keepMounted:M=!1,onClose:R,onTransitionEnter:$,onTransitionExited:H,open:V,slotProps:K={},slots:G={},theme:C,...q}=r,U={...r,closeAfterTransition:d,disableAutoFocus:x,disableEnforceFocus:E,disableEscapeKeyDown:_,disablePortal:w,disableRestoreFocus:O,disableScrollLock:T,hideBackdrop:A,keepMounted:M},{getRootProps:P,getBackdropProps:D,getTransitionProps:Z,portalRef:se,isTopModal:ue,exited:B,hasTransition:z}=_3({...U,rootRef:n}),W={...U,exited:B},I=C3(W),pe={};if(h.props.tabIndex===void 0&&(pe.tabIndex="-1"),z){const{onEnter:Me,onExited:Fe}=Z();pe.onEnter=Me,pe.onExited=Fe}const ve={slots:{root:b.Root,backdrop:b.Backdrop,...G},slotProps:{...v,...K}},[he,xe]=Ot("root",{ref:n,elementType:T3,externalForwardedProps:{...ve,...q,component:y},getSlotProps:P,ownerState:W,className:Ue(f,I?.root,!W.open&&W.exited&&I?.hidden)}),[Ke,Ie]=Ot("backdrop",{ref:s?.ref,elementType:a,externalForwardedProps:ve,shouldForwardComponentProp:!0,additionalProps:s,getSlotProps:Me=>D({...Me,onClick:Fe=>{Me?.onClick&&Me.onClick(Fe)}}),className:Ue(s?.className,I?.backdrop),ownerState:W});return!M&&!V&&(!z||B)?null:L.jsx(dN,{ref:se,container:g,disablePortal:w,children:L.jsxs(he,{...xe,children:[!A&&a?L.jsx(Ke,{...Ie}):null,L.jsx(S3,{disableEnforceFocus:E,disableAutoFocus:x,disableRestoreFocus:O,isEnabled:ue,open:V,children:N.cloneElement(h,pe)})]})})}),R3=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:a,size:s,hiddenLabel:u,multiline:f}=e,d={root:["root",!n&&"underline",r&&"adornedStart",a&&"adornedEnd",s==="small"&&`size${ye(s)}`,u&&"hiddenLabel",f&&"multiline"],input:["input"]},h=wt(d,AN,t);return{...t,...h}},O3=Ee(Lc,{shouldForwardProp:e=>Qr(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Bc(e,t),!n.disableUnderline&&t.underline]}})(zt(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${ta.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${ta.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s},variants:[{props:({ownerState:u})=>!u.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ta.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ta.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ta.disabled}, .${ta.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ta.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(zn()).map(([u])=>({props:{disableUnderline:!1,color:u},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[u]?.main}`}}})),{props:({ownerState:u})=>u.startAdornment,style:{paddingLeft:12}},{props:({ownerState:u})=>u.endAdornment,style:{paddingRight:12}},{props:({ownerState:u})=>u.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:u,size:f})=>u.multiline&&f==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:u})=>u.multiline&&u.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:u})=>u.multiline&&u.hiddenLabel&&u.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),N3=Ee($c,{name:"MuiFilledInput",slot:"Input",overridesResolver:zc})(zt(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),_p=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiFilledInput"}),{disableUnderline:a=!1,components:s={},componentsProps:u,fullWidth:f=!1,hiddenLabel:d,inputComponent:h="input",multiline:g=!1,slotProps:y,slots:b={},type:v="text",...x}=r,E={...r,disableUnderline:a,fullWidth:f,inputComponent:h,multiline:g,type:v},_=R3(r),w={root:{ownerState:E},input:{ownerState:E}},O=y??u?Bn(w,y??u):w,T=b.root??s.Root??O3,A=b.input??s.Input??N3;return L.jsx(vp,{slots:{root:T,input:A},slotProps:O,fullWidth:f,inputComponent:h,multiline:g,ref:n,type:v,...x,classes:_})});_p.muiName="Input";function I3(e){return Et("MuiFormControl",e)}_t("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const M3=e=>{const{classes:t,margin:n,fullWidth:r}=e,a={root:["root",n!=="none"&&`margin${ye(n)}`,r&&"fullWidth"]};return wt(a,I3,t)},D3=Ee("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${ye(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),B3=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiFormControl"}),{children:a,className:s,color:u="primary",component:f="div",disabled:d=!1,error:h=!1,focused:g,fullWidth:y=!1,hiddenLabel:b=!1,margin:v="none",required:x=!1,size:E="medium",variant:_="outlined",...w}=r,O={...r,color:u,component:f,disabled:d,error:h,fullWidth:y,hiddenLabel:b,margin:v,required:x,size:E,variant:_},T=M3(O),[A,M]=N.useState(()=>{let P=!1;return a&&N.Children.forEach(a,D=>{if(!ep(D,["Input","Select"]))return;const Z=ep(D,["Select"])?D.props.input:D;Z&&EN(Z.props)&&(P=!0)}),P}),[R,$]=N.useState(()=>{let P=!1;return a&&N.Children.forEach(a,D=>{ep(D,["Input","Select"])&&(Dc(D.props,!0)||Dc(D.props.inputProps,!0))&&(P=!0)}),P}),[H,V]=N.useState(!1);d&&H&&V(!1);const K=g!==void 0&&!d?g:H;let G;N.useRef(!1);const C=N.useCallback(()=>{$(!0)},[]),q=N.useCallback(()=>{$(!1)},[]),U=N.useMemo(()=>({adornedStart:A,setAdornedStart:M,color:u,disabled:d,error:h,filled:R,focused:K,fullWidth:y,hiddenLabel:b,size:E,onBlur:()=>{V(!1)},onFocus:()=>{V(!0)},onEmpty:q,onFilled:C,registerEffect:G,required:x,variant:_}),[A,u,d,h,R,K,y,b,G,q,C,x,E,_]);return L.jsx(yp.Provider,{value:U,children:L.jsx(D3,{as:f,ownerState:O,className:Ue(T.root,s),ref:n,...w,children:a})})});function z3(e){return Et("MuiFormHelperText",e)}const Yb=_t("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Xb;const L3=e=>{const{classes:t,contained:n,size:r,disabled:a,error:s,filled:u,focused:f,required:d}=e,h={root:["root",a&&"disabled",s&&"error",r&&`size${ye(r)}`,n&&"contained",f&&"focused",u&&"filled",d&&"required"]};return wt(h,z3,t)},$3=Ee("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${ye(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(zt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Yb.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Yb.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),P3=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiFormHelperText"}),{children:a,className:s,component:u="p",disabled:f,error:d,filled:h,focused:g,margin:y,required:b,variant:v,...x}=r,E=Wa(),_=Ka({props:r,muiFormControl:E,states:["variant","size","disabled","error","filled","focused","required"]}),w={...r,component:u,contained:_.variant==="filled"||_.variant==="outlined",variant:_.variant,size:_.size,disabled:_.disabled,error:_.error,filled:_.filled,focused:_.focused,required:_.required};delete w.ownerState;const O=L3(w);return L.jsx($3,{as:u,className:Ue(O.root,s),ref:n,...x,ownerState:w,children:a===" "?Xb||(Xb=L.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):a})});function U3(e){return Et("MuiFormLabel",e)}const Ol=_t("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),j3=e=>{const{classes:t,color:n,focused:r,disabled:a,error:s,filled:u,required:f}=e,d={root:["root",`color${ye(n)}`,a&&"disabled",s&&"error",u&&"filled",r&&"focused",f&&"required"],asterisk:["asterisk",s&&"error"]};return wt(d,U3,t)},H3=Ee("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(zt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{[`&.${Ol.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Ol.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Ol.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),V3=Ee("span",{name:"MuiFormLabel",slot:"Asterisk"})(zt(({theme:e})=>({[`&.${Ol.error}`]:{color:(e.vars||e).palette.error.main}}))),F3=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiFormLabel"}),{children:a,className:s,color:u,component:f="label",disabled:d,error:h,filled:g,focused:y,required:b,...v}=r,x=Wa(),E=Ka({props:r,muiFormControl:x,states:["color","required","focused","disabled","error","filled"]}),_={...r,color:E.color||"primary",component:f,disabled:E.disabled,error:E.error,filled:E.filled,focused:E.focused,required:E.required},w=j3(_);return L.jsxs(H3,{as:f,ownerState:_,className:Ue(w.root,s),ref:n,...v,children:[a,E.required&&L.jsxs(V3,{ownerState:_,"aria-hidden":!0,className:w.asterisk,children:[" ","*"]})]})});function wp(e){return`scale(${e}, ${e**2})`}const G3={entering:{opacity:1,transform:wp(1)},entered:{opacity:1,transform:"none"}},Cp=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Tp=N.forwardRef(function(t,n){const{addEndListener:r,appear:a=!0,children:s,easing:u,in:f,onEnter:d,onEntered:h,onEntering:g,onExit:y,onExited:b,onExiting:v,style:x,timeout:E="auto",TransitionComponent:_=yi,...w}=t,O=Eb(),T=N.useRef(),A=_l(),M=N.useRef(null),R=er(M,Tl(s),n),$=P=>D=>{if(P){const Z=M.current;D===void 0?P(Z):P(Z,D)}},H=$(g),V=$((P,D)=>{_b(P);const{duration:Z,delay:se,easing:ue}=Ac({style:x,timeout:E,easing:u},{mode:"enter"});let B;E==="auto"?(B=A.transitions.getAutoHeightDuration(P.clientHeight),T.current=B):B=Z,P.style.transition=[A.transitions.create("opacity",{duration:B,delay:se}),A.transitions.create("transform",{duration:Cp?B:B*.666,delay:se,easing:ue})].join(","),d&&d(P,D)}),K=$(h),G=$(v),C=$(P=>{const{duration:D,delay:Z,easing:se}=Ac({style:x,timeout:E,easing:u},{mode:"exit"});let ue;E==="auto"?(ue=A.transitions.getAutoHeightDuration(P.clientHeight),T.current=ue):ue=D,P.style.transition=[A.transitions.create("opacity",{duration:ue,delay:Z}),A.transitions.create("transform",{duration:Cp?ue:ue*.666,delay:Cp?Z:Z||ue*.333,easing:se})].join(","),P.style.opacity=0,P.style.transform=wp(.75),y&&y(P)}),q=$(b),U=P=>{E==="auto"&&O.start(T.current||0,P),r&&r(M.current,P)};return L.jsx(_,{appear:a,in:f,nodeRef:M,onEnter:V,onEntered:K,onEntering:H,onExit:C,onExited:q,onExiting:G,addEndListener:U,timeout:E==="auto"?null:E,...w,children:(P,{ownerState:D,...Z})=>N.cloneElement(s,{style:{opacity:0,transform:wp(.75),visibility:P==="exited"&&!f?"hidden":void 0,...G3[P],...x,...s.props.style},ref:R,...Z})})});Tp&&(Tp.muiSupportAuto=!0);const q3=e=>{const{classes:t,disableUnderline:n}=e,a=wt({root:["root",!n&&"underline"],input:["input"]},CN,t);return{...t,...a}},Y3=Ee(Lc,{shouldForwardProp:e=>Qr(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Bc(e,t),!n.disableUnderline&&t.underline]}})(zt(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Al.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Al.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Al.disabled}, .${Al.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Al.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(zn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),X3=Ee($c,{name:"MuiInput",slot:"Input",overridesResolver:zc})({}),Ap=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiInput"}),{disableUnderline:a=!1,components:s={},componentsProps:u,fullWidth:f=!1,inputComponent:d="input",multiline:h=!1,slotProps:g,slots:y={},type:b="text",...v}=r,x=q3(r),_={root:{ownerState:{disableUnderline:a}}},w=g??u?Bn(g??u,_):_,O=y.root??s.Root??Y3,T=y.input??s.Input??X3;return L.jsx(vp,{slots:{root:O,input:T},slotProps:w,fullWidth:f,inputComponent:d,multiline:h,ref:n,type:b,...v,classes:x})});Ap.muiName="Input";function Z3(e){return Et("MuiInputLabel",e)}_t("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const K3=e=>{const{classes:t,formControl:n,size:r,shrink:a,disableAnimation:s,variant:u,required:f}=e,d={root:["root",n&&"formControl",!s&&"animated",a&&"shrink",r&&r!=="medium"&&`size${ye(r)}`,u],asterisk:[f&&"asterisk"]},h=wt(d,Z3,t);return{...t,...h}},W3=Ee(F3,{shouldForwardProp:e=>Qr(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ol.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(zt(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Q3=N.forwardRef(function(t,n){const r=Ct({name:"MuiInputLabel",props:t}),{disableAnimation:a=!1,margin:s,shrink:u,variant:f,className:d,...h}=r,g=Wa();let y=u;typeof y>"u"&&g&&(y=g.filled||g.focused||g.adornedStart);const b=Ka({props:r,muiFormControl:g,states:["size","variant","required","focused"]}),v={...r,disableAnimation:a,formControl:g,shrink:y,size:b.size,variant:b.variant,required:b.required,focused:b.focused},x=K3(v);return L.jsx(W3,{"data-shrink":y,ref:n,className:Ue(x.root,d),...h,ownerState:v,classes:x})});function J3(e){return Et("MuiLink",e)}const eI=_t("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),tI=({theme:e,ownerState:t})=>{const n=t.color;if("colorSpace"in e&&e.colorSpace){const s=pi(e,`palette.${n}.main`)||pi(e,`palette.${n}`)||t.color;return e.alpha(s,.4)}const r=pi(e,`palette.${n}.main`,!1)||pi(e,`palette.${n}`,!1)||t.color,a=pi(e,`palette.${n}.mainChannel`)||pi(e,`palette.${n}Channel`);return"vars"in e&&a?`rgba(${a} / 0.4)`:Sl(r,.4)},Zb={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},nI=e=>{const{classes:t,component:n,focusVisible:r,underline:a}=e,s={root:["root",`underline${ye(a)}`,n==="button"&&"button",r&&"focusVisible"]};return wt(s,J3,t)},rI=Ee(ti,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${ye(n.underline)}`],n.component==="button"&&t.button]}})(zt(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:t,ownerState:n})=>t==="always"&&n.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},{props:({underline:t,ownerState:n})=>t==="always"&&n.color==="inherit",style:e.colorSpace?{textDecorationColor:e.alpha("currentColor",.4)}:null},...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{underline:"always",color:t},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette[t].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${eI.focusVisible}`]:{outline:"auto"}}}]}))),iI=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiLink"}),a=_l(),{className:s,color:u="primary",component:f="a",onBlur:d,onFocus:h,TypographyClasses:g,underline:y="always",variant:b="inherit",sx:v,...x}=r,[E,_]=N.useState(!1),w=M=>{Oc(M.target)||_(!1),d&&d(M)},O=M=>{Oc(M.target)&&_(!0),h&&h(M)},T={...r,color:u,component:f,focusVisible:E,underline:y,variant:b},A=nI(T);return L.jsx(rI,{color:u,className:Ue(A.root,s),classes:g,component:f,onBlur:w,onFocus:O,ref:n,ownerState:T,variant:b,...x,sx:[...Zb[u]===void 0?[{color:u}]:[],...Array.isArray(v)?v:[v]],style:{...x.style,...y==="always"&&u!=="inherit"&&!Zb[u]&&{"--Link-underlineColor":tI({theme:a,ownerState:T})}}})}),oI=N.createContext({});function aI(e){return Et("MuiList",e)}_t("MuiList",["root","padding","dense","subheader"]);const sI=e=>{const{classes:t,disablePadding:n,dense:r,subheader:a}=e;return wt({root:["root",!n&&"padding",r&&"dense",a&&"subheader"]},aI,t)},lI=Ee("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),uI=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiList"}),{children:a,className:s,component:u="ul",dense:f=!1,disablePadding:d=!1,subheader:h,...g}=r,y=N.useMemo(()=>({dense:f}),[f]),b={...r,component:u,dense:f,disablePadding:d},v=sI(b);return L.jsx(oI.Provider,{value:y,children:L.jsxs(lI,{as:u,className:Ue(v.root,s),ref:n,ownerState:b,...g,children:[h,a]})})});function kp(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Kb(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Wb(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function Nl(e,t,n,r,a,s){let u=!1,f=a(e,t,t?n:!1);for(;f;){if(f===e.firstChild){if(u)return!1;u=!0}const d=r?!1:f.disabled||f.getAttribute("aria-disabled")==="true";if(!f.hasAttribute("tabindex")||!Wb(f,s)||d)f=a(e,f,n);else return f.focus(),!0}return!1}const cI=N.forwardRef(function(t,n){const{actions:r,autoFocus:a=!1,autoFocusItem:s=!1,children:u,className:f,disabledItemsFocusable:d=!1,disableListWrap:h=!1,onKeyDown:g,variant:y="selectedMenu",...b}=t,v=N.useRef(null),x=N.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});mi(()=>{a&&v.current.focus()},[a]),N.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(T,{direction:A})=>{const M=!v.current.style.width;if(T.clientHeight<v.current.clientHeight&&M){const R=`${Vb(Mi(T))}px`;v.current.style[A==="rtl"?"paddingLeft":"paddingRight"]=R,v.current.style.width=`calc(100% + ${R})`}return v.current}}),[]);const E=T=>{const A=v.current,M=T.key;if(T.ctrlKey||T.metaKey||T.altKey){g&&g(T);return}const $=Rl(Jr(A));if(M==="ArrowDown")T.preventDefault(),Nl(A,$,h,d,kp);else if(M==="ArrowUp")T.preventDefault(),Nl(A,$,h,d,Kb);else if(M==="Home")T.preventDefault(),Nl(A,null,h,d,kp);else if(M==="End")T.preventDefault(),Nl(A,null,h,d,Kb);else if(M.length===1){const H=x.current,V=M.toLowerCase(),K=performance.now();H.keys.length>0&&(K-H.lastTime>500?(H.keys=[],H.repeating=!0,H.previousKeyMatched=!0):H.repeating&&V!==H.keys[0]&&(H.repeating=!1)),H.lastTime=K,H.keys.push(V);const G=$&&!H.repeating&&Wb($,H);H.previousKeyMatched&&(G||Nl(A,$,!1,d,kp,H))?T.preventDefault():H.previousKeyMatched=!1}g&&g(T)},_=er(v,n);let w=-1;N.Children.forEach(u,(T,A)=>{if(!N.isValidElement(T)){w===A&&(w+=1,w>=u.length&&(w=-1));return}T.props.disabled||(y==="selectedMenu"&&T.props.selected||w===-1)&&(w=A),w===A&&(T.props.disabled||T.props.muiSkipListHighlight||T.type.muiSkipListHighlight)&&(w+=1,w>=u.length&&(w=-1))});const O=N.Children.map(u,(T,A)=>{if(A===w){const M={};return s&&(M.autoFocus=!0),T.props.tabIndex===void 0&&y==="selectedMenu"&&(M.tabIndex=0),N.cloneElement(T,M)}return T});return L.jsx(uI,{role:"menu",ref:_,className:f,onKeyDown:E,tabIndex:a?0:-1,...b,children:O})});function fI(e){return Et("MuiPopover",e)}_t("MuiPopover",["root","paper"]);function Qb(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function Jb(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function eS(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Vc(e){return typeof e=="function"?e():e}const dI=e=>{const{classes:t}=e;return wt({root:["root"],paper:["paper"]},fI,t)},hI=Ee(k3,{name:"MuiPopover",slot:"Root"})({}),tS=Ee(Rc,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),pI=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:d="anchorEl",children:h,className:g,container:y,elevation:b=8,marginThreshold:v=16,open:x,PaperProps:E={},slots:_={},slotProps:w={},transformOrigin:O={vertical:"top",horizontal:"left"},TransitionComponent:T,transitionDuration:A="auto",TransitionProps:M={},disableScrollLock:R=!1,...$}=r,H=N.useRef(),V={...r,anchorOrigin:u,anchorReference:d,elevation:b,marginThreshold:v,transformOrigin:O,TransitionComponent:T,transitionDuration:A,TransitionProps:M},K=dI(V),G=N.useCallback(()=>{if(d==="anchorPosition")return f;const Me=Vc(s),ft=(Me&&Me.nodeType===1?Me:Jr(H.current).body).getBoundingClientRect();return{top:ft.top+Qb(ft,u.vertical),left:ft.left+Jb(ft,u.horizontal)}},[s,u.horizontal,u.vertical,f,d]),C=N.useCallback(Me=>({vertical:Qb(Me,O.vertical),horizontal:Jb(Me,O.horizontal)}),[O.horizontal,O.vertical]),q=N.useCallback(Me=>{const Fe={width:Me.offsetWidth,height:Me.offsetHeight},ft=C(Fe);if(d==="none")return{top:null,left:null,transformOrigin:eS(ft)};const Tn=G();let $e=Tn.top-ft.vertical,Je=Tn.left-ft.horizontal;const Jt=$e+Fe.height,on=Je+Fe.width,Ht=Mi(Vc(s)),Tt=Ht.innerHeight-v,an=Ht.innerWidth-v;if(v!==null&&$e<v){const It=$e-v;$e-=It,ft.vertical+=It}else if(v!==null&&Jt>Tt){const It=Jt-Tt;$e-=It,ft.vertical+=It}if(v!==null&&Je<v){const It=Je-v;Je-=It,ft.horizontal+=It}else if(on>an){const It=on-an;Je-=It,ft.horizontal+=It}return{top:`${Math.round($e)}px`,left:`${Math.round(Je)}px`,transformOrigin:eS(ft)}},[s,d,G,C,v]),[U,P]=N.useState(x),D=N.useCallback(()=>{const Me=H.current;if(!Me)return;const Fe=q(Me);Fe.top!==null&&Me.style.setProperty("top",Fe.top),Fe.left!==null&&(Me.style.left=Fe.left),Me.style.transformOrigin=Fe.transformOrigin,P(!0)},[q]);N.useEffect(()=>(R&&window.addEventListener("scroll",D),()=>window.removeEventListener("scroll",D)),[s,R,D]);const Z=()=>{D()},se=()=>{P(!1)};N.useEffect(()=>{x&&D()}),N.useImperativeHandle(a,()=>x?{updatePosition:()=>{D()}}:null,[x,D]),N.useEffect(()=>{if(!x)return;const Me=hb(()=>{D()}),Fe=Mi(Vc(s));return Fe.addEventListener("resize",Me),()=>{Me.clear(),Fe.removeEventListener("resize",Me)}},[s,x,D]);let ue=A;const B={slots:{transition:T,..._},slotProps:{transition:M,paper:E,...w}},[z,W]=Ot("transition",{elementType:Tp,externalForwardedProps:B,ownerState:V,getSlotProps:Me=>({...Me,onEntering:(Fe,ft)=>{Me.onEntering?.(Fe,ft),Z()},onExited:Fe=>{Me.onExited?.(Fe),se()}}),additionalProps:{appear:!0,in:x}});A==="auto"&&!z.muiSupportAuto&&(ue=void 0);const I=y||(s?Jr(Vc(s)).body:void 0),[pe,{slots:ve,slotProps:he,...xe}]=Ot("root",{ref:n,elementType:hI,externalForwardedProps:{...B,...$},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:_.backdrop},slotProps:{backdrop:oO(typeof w.backdrop=="function"?w.backdrop(V):w.backdrop,{invisible:!0})},container:I,open:x},ownerState:V,className:Ue(K.root,g)}),[Ke,Ie]=Ot("paper",{ref:H,className:K.paper,elementType:tS,externalForwardedProps:B,shouldForwardComponentProp:!0,additionalProps:{elevation:b,style:U?void 0:{opacity:0}},ownerState:V});return L.jsx(pe,{...xe,...!kc(pe)&&{slots:ve,slotProps:he,disableScrollLock:R},children:L.jsx(z,{...W,timeout:ue,children:L.jsx(Ke,{...Ie,children:h})})})});function mI(e){return Et("MuiMenu",e)}_t("MuiMenu",["root","paper","list"]);const gI={vertical:"top",horizontal:"right"},yI={vertical:"top",horizontal:"left"},vI=e=>{const{classes:t}=e;return wt({root:["root"],paper:["paper"],list:["list"]},mI,t)},bI=Ee(pI,{shouldForwardProp:e=>Qr(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),SI=Ee(tS,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),xI=Ee(cI,{name:"MuiMenu",slot:"List"})({outline:0}),EI=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:u,disableAutoFocusItem:f=!1,MenuListProps:d={},onClose:h,open:g,PaperProps:y={},PopoverClasses:b,transitionDuration:v="auto",TransitionProps:{onEntering:x,...E}={},variant:_="selectedMenu",slots:w={},slotProps:O={},...T}=r,A=Gk(),M={...r,autoFocus:a,disableAutoFocusItem:f,MenuListProps:d,onEntering:x,PaperProps:y,transitionDuration:v,TransitionProps:E,variant:_},R=vI(M),$=a&&!f&&g,H=N.useRef(null),V=(ue,B)=>{H.current&&H.current.adjustStyleForScrollbar(ue,{direction:A?"rtl":"ltr"}),x&&x(ue,B)},K=ue=>{ue.key==="Tab"&&(ue.preventDefault(),h&&h(ue,"tabKeyDown"))};let G=-1;N.Children.map(s,(ue,B)=>{N.isValidElement(ue)&&(ue.props.disabled||(_==="selectedMenu"&&ue.props.selected||G===-1)&&(G=B))});const C={slots:w,slotProps:{list:d,transition:E,paper:y,...O}},q=cN({elementType:w.root,externalSlotProps:O.root,ownerState:M,className:[R.root,u]}),[U,P]=Ot("paper",{className:R.paper,elementType:SI,externalForwardedProps:C,shouldForwardComponentProp:!0,ownerState:M}),[D,Z]=Ot("list",{className:Ue(R.list,d.className),elementType:xI,shouldForwardComponentProp:!0,externalForwardedProps:C,getSlotProps:ue=>({...ue,onKeyDown:B=>{K(B),ue.onKeyDown?.(B)}}),ownerState:M}),se=typeof C.slotProps.transition=="function"?C.slotProps.transition(M):C.slotProps.transition;return L.jsx(bI,{onClose:h,anchorOrigin:{vertical:"bottom",horizontal:A?"right":"left"},transformOrigin:A?gI:yI,slots:{root:w.root,paper:U,backdrop:w.backdrop,...w.transition&&{transition:w.transition}},slotProps:{root:q,paper:P,backdrop:typeof O.backdrop=="function"?O.backdrop(M):O.backdrop,transition:{...se,onEntering:(...ue)=>{V(...ue),se?.onEntering?.(...ue)}}},open:g,ref:n,transitionDuration:v,ownerState:M,...T,classes:b,children:L.jsx(D,{actions:H,autoFocus:a&&(G===-1||f),autoFocusItem:$,variant:_,...Z,children:s})})});function _I(e){return Et("MuiNativeSelect",e)}const Rp=_t("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),wI=e=>{const{classes:t,variant:n,disabled:r,multiple:a,open:s,error:u}=e,f={select:["select",n,r&&"disabled",a&&"multiple",u&&"error"],icon:["icon",`icon${ye(n)}`,s&&"iconOpen",r&&"disabled"]};return wt(f,_I,t)},nS=Ee("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Rp.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),CI=Ee(nS,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Qr,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Rp.multiple}`]:t.multiple}]}})({}),rS=Ee("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Rp.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),TI=Ee(rS,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ye(n.variant)}`],n.open&&t.iconOpen]}})({}),AI=N.forwardRef(function(t,n){const{className:r,disabled:a,error:s,IconComponent:u,inputRef:f,variant:d="standard",...h}=t,g={...t,disabled:a,variant:d,error:s},y=wI(g);return L.jsxs(N.Fragment,{children:[L.jsx(CI,{ownerState:g,className:Ue(y.select,r),disabled:a,ref:f||n,...h}),t.multiple?null:L.jsx(TI,{as:u,ownerState:g,className:y.icon})]})});var iS;const kI=Ee("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Qr})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),RI=Ee("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Qr})(zt(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function OI(e){const{children:t,classes:n,className:r,label:a,notched:s,...u}=e,f=a!=null&&a!=="",d={...e,notched:s,withLabel:f};return L.jsx(kI,{"aria-hidden":!0,className:r,ownerState:d,...u,children:L.jsx(RI,{ownerState:d,children:f?L.jsx("span",{children:a}):iS||(iS=L.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}const NI=e=>{const{classes:t}=e,r=wt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},TN,t);return{...t,...r}},II=Ee(Lc,{shouldForwardProp:e=>Qr(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Bc})(zt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${vi.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${vi.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${vi.focused} .${vi.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(zn()).map(([n])=>({props:{color:n},style:{[`&.${vi.focused} .${vi.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${vi.error} .${vi.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${vi.disabled} .${vi.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),MI=Ee(OI,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(zt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),DI=Ee($c,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:zc})(zt(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),Op=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiOutlinedInput"}),{components:a={},fullWidth:s=!1,inputComponent:u="input",label:f,multiline:d=!1,notched:h,slots:g={},slotProps:y={},type:b="text",...v}=r,x=NI(r),E=Wa(),_=Ka({props:r,muiFormControl:E,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w={...r,color:_.color||"primary",disabled:_.disabled,error:_.error,focused:_.focused,formControl:E,fullWidth:s,hiddenLabel:_.hiddenLabel,multiline:d,size:_.size,type:b},O=g.root??a.Root??II,T=g.input??a.Input??DI,[A,M]=Ot("notchedOutline",{elementType:MI,className:x.notchedOutline,shouldForwardComponentProp:!0,ownerState:w,externalForwardedProps:{slots:g,slotProps:y},additionalProps:{label:f!=null&&f!==""&&_.required?L.jsxs(N.Fragment,{children:[f," ","*"]}):f}});return L.jsx(vp,{slots:{root:O,input:T},slotProps:y,renderSuffix:R=>L.jsx(A,{...M,notched:typeof h<"u"?h:!!(R.startAdornment||R.filled||R.focused)}),fullWidth:s,inputComponent:u,multiline:d,ref:n,type:b,...v,classes:{...x,notchedOutline:null}})});Op.muiName="Input";function oS(e){return Et("MuiSelect",e)}const Il=_t("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var aS;const BI=Ee(nS,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Il.select}`]:t.select},{[`&.${Il.select}`]:t[n.variant]},{[`&.${Il.error}`]:t.error},{[`&.${Il.multiple}`]:t.multiple}]}})({[`&.${Il.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),zI=Ee(rS,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ye(n.variant)}`],n.open&&t.iconOpen]}})({}),LI=Ee("input",{shouldForwardProp:e=>fb(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function sS(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function $I(e){return e==null||typeof e=="string"&&!e.trim()}const PI=e=>{const{classes:t,variant:n,disabled:r,multiple:a,open:s,error:u}=e,f={select:["select",n,r&&"disabled",a&&"multiple",u&&"error"],icon:["icon",`icon${ye(n)}`,s&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return wt(f,oS,t)},UI=N.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":a,autoFocus:s,autoWidth:u,children:f,className:d,defaultOpen:h,defaultValue:g,disabled:y,displayEmpty:b,error:v=!1,IconComponent:x,inputRef:E,labelId:_,MenuProps:w={},multiple:O,name:T,onBlur:A,onChange:M,onClose:R,onFocus:$,onKeyDown:H,onMouseDown:V,onOpen:K,open:G,readOnly:C,renderValue:q,required:U,SelectDisplayProps:P={},tabIndex:D,type:Z,value:se,variant:ue="standard",...B}=t,[z,W]=mb({controlled:se,default:g,name:"Select"}),[I,pe]=mb({controlled:G,default:h,name:"Select"}),ve=N.useRef(null),he=N.useRef(null),[xe,Ke]=N.useState(null),{current:Ie}=N.useRef(G!=null),[Me,Fe]=N.useState(),ft=er(n,E),Tn=N.useCallback(Te=>{he.current=Te,Te&&Ke(Te)},[]),$e=xe?.parentNode;N.useImperativeHandle(ft,()=>({focus:()=>{he.current.focus()},node:ve.current,value:z}),[z]);const Je=xe!==null&&I;N.useEffect(()=>{if(!Je||!$e||u||typeof ResizeObserver>"u")return;const Te=new ResizeObserver(()=>{Fe($e.clientWidth)});return Te.observe($e),()=>{Te.disconnect()}},[Je,$e,u]),N.useEffect(()=>{h&&I&&xe&&!Ie&&(Fe(u?null:$e.clientWidth),he.current.focus())},[xe,u]),N.useEffect(()=>{s&&he.current.focus()},[s]),N.useEffect(()=>{if(!_)return;const Te=Jr(he.current).getElementById(_);if(Te){const rt=()=>{getSelection().isCollapsed&&he.current.focus()};return Te.addEventListener("click",rt),()=>{Te.removeEventListener("click",rt)}}},[_]);const Jt=(Te,rt)=>{Te?K&&K(rt):R&&R(rt),Ie||(Fe(u?null:$e.clientWidth),pe(Te))},on=Te=>{V?.(Te),Te.button===0&&(Te.preventDefault(),he.current.focus(),Jt(!0,Te))},Ht=Te=>{Jt(!1,Te)},Tt=N.Children.toArray(f),an=Te=>{const rt=Tt.find(Mn=>Mn.props.value===Te.target.value);rt!==void 0&&(W(rt.props.value),M&&M(Te,rt))},It=Te=>rt=>{let Mn;if(rt.currentTarget.hasAttribute("tabindex")){if(O){Mn=Array.isArray(z)?z.slice():[];const ai=z.indexOf(Te.props.value);ai===-1?Mn.push(Te.props.value):Mn.splice(ai,1)}else Mn=Te.props.value;if(Te.props.onClick&&Te.props.onClick(rt),z!==Mn&&(W(Mn),M)){const ai=rt.nativeEvent||rt,Sa=new ai.constructor(ai.type,ai);Object.defineProperty(Sa,"target",{writable:!0,value:{value:Mn,name:T}}),M(Sa,Te)}O||Jt(!1,rt)}},Re=Te=>{C||([" ","ArrowUp","ArrowDown","Enter"].includes(Te.key)&&(Te.preventDefault(),Jt(!0,Te)),H?.(Te))},Cr=Te=>{!Je&&A&&(Object.defineProperty(Te,"target",{writable:!0,value:{value:z,name:T}}),A(Te))};delete B["aria-invalid"];let tt,oi;const te=[];let ce=!1;(Dc({value:z})||b)&&(q?tt=q(z):ce=!0);const we=Tt.map(Te=>{if(!N.isValidElement(Te))return null;let rt;if(O){if(!Array.isArray(z))throw new Error(Ni(2));rt=z.some(Mn=>sS(Mn,Te.props.value)),rt&&ce&&te.push(Te.props.children)}else rt=sS(z,Te.props.value),rt&&ce&&(oi=Te.props.children);return N.cloneElement(Te,{"aria-selected":rt?"true":"false",onClick:It(Te),onKeyUp:Mn=>{Mn.key===" "&&Mn.preventDefault(),Te.props.onKeyUp&&Te.props.onKeyUp(Mn)},role:"option",selected:rt,value:void 0,"data-value":Te.props.value})});ce&&(O?te.length===0?tt=null:tt=te.reduce((Te,rt,Mn)=>(Te.push(rt),Mn<te.length-1&&Te.push(", "),Te),[]):tt=oi);let ze=Me;!u&&Ie&&xe&&(ze=$e.clientWidth);let We;typeof D<"u"?We=D:We=y?null:0;const et=P.id||(T?`mui-component-select-${T}`:void 0),In={...t,variant:ue,value:z,open:Je,error:v},hn=PI(In),sn={...w.PaperProps,...typeof w.slotProps?.paper=="function"?w.slotProps.paper(In):w.slotProps?.paper},Qn={...w.MenuListProps,...typeof w.slotProps?.list=="function"?w.slotProps.list(In):w.slotProps?.list},At=xl();return L.jsxs(N.Fragment,{children:[L.jsx(BI,{as:"div",ref:Tn,tabIndex:We,role:"combobox","aria-controls":Je?At:void 0,"aria-disabled":y?"true":void 0,"aria-expanded":Je?"true":"false","aria-haspopup":"listbox","aria-label":a,"aria-labelledby":[_,et].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":U?"true":void 0,"aria-invalid":v?"true":void 0,onKeyDown:Re,onMouseDown:y||C?null:on,onBlur:Cr,onFocus:$,...P,ownerState:In,className:Ue(P.className,hn.select,d),id:et,children:$I(tt)?aS||(aS=L.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):tt}),L.jsx(LI,{"aria-invalid":v,value:Array.isArray(z)?z.join(","):z,name:T,ref:ve,"aria-hidden":!0,onChange:an,tabIndex:-1,disabled:y,className:hn.nativeInput,autoFocus:s,required:U,...B,ownerState:In}),L.jsx(zI,{as:x,className:hn.icon,ownerState:In}),L.jsx(EI,{id:`menu-${T||""}`,anchorEl:$e,open:Je,onClose:Ht,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...w,slotProps:{...w.slotProps,list:{"aria-labelledby":_,role:"listbox","aria-multiselectable":O?"true":void 0,disableListWrap:!0,id:At,...Qn},paper:{...sn,style:{minWidth:ze,...sn!=null?sn.style:null}}},children:we})]})}),jI=e=>{const{classes:t}=e,r=wt({root:["root"]},oS,t);return{...t,...r}},Np={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Qr(e)&&e!=="variant"},HI=Ee(Ap,Np)(""),VI=Ee(Op,Np)(""),FI=Ee(_p,Np)(""),lS=N.forwardRef(function(t,n){const r=Ct({name:"MuiSelect",props:t}),{autoWidth:a=!1,children:s,classes:u={},className:f,defaultOpen:d=!1,displayEmpty:h=!1,IconComponent:g=kN,id:y,input:b,inputProps:v,label:x,labelId:E,MenuProps:_,multiple:w=!1,native:O=!1,onClose:T,onOpen:A,open:M,renderValue:R,SelectDisplayProps:$,variant:H="outlined",...V}=r,K=O?AI:UI,G=Wa(),C=Ka({props:r,muiFormControl:G,states:["variant","error"]}),q=C.variant||H,U={...r,variant:q,classes:u},P=jI(U),{root:D,...Z}=P,se=b||{standard:L.jsx(HI,{ownerState:U}),outlined:L.jsx(VI,{label:x,ownerState:U}),filled:L.jsx(FI,{ownerState:U})}[q],ue=er(n,Tl(se));return L.jsx(N.Fragment,{children:N.cloneElement(se,{inputComponent:K,inputProps:{children:s,error:C.error,IconComponent:g,variant:q,type:void 0,multiple:w,...O?{id:y}:{autoWidth:a,defaultOpen:d,displayEmpty:h,labelId:E,MenuProps:_,onClose:T,onOpen:A,open:M,renderValue:R,SelectDisplayProps:{id:y,...$}},...v,classes:v?Bn(Z,v.classes):Z,...b?b.props.inputProps:{}},...(w&&O||h)&&q==="outlined"?{notched:!0}:{},ref:ue,className:Ue(se.props.className,f,P.root),...!b&&{variant:q},...V})})});lS.muiName="Select";const Fc=yR({createStyledComponent:Ee("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Ct({props:e,name:"MuiStack"})});function GI(e){return Et("MuiTextField",e)}_t("MuiTextField",["root"]);const qI={standard:Ap,filled:_p,outlined:Op},YI=e=>{const{classes:t}=e;return wt({root:["root"]},GI,t)},XI=Ee(B3,{name:"MuiTextField",slot:"Root"})({}),Ip=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiTextField"}),{autoComplete:a,autoFocus:s=!1,children:u,className:f,color:d="primary",defaultValue:h,disabled:g=!1,error:y=!1,FormHelperTextProps:b,fullWidth:v=!1,helperText:x,id:E,InputLabelProps:_,inputProps:w,InputProps:O,inputRef:T,label:A,maxRows:M,minRows:R,multiline:$=!1,name:H,onBlur:V,onChange:K,onFocus:G,placeholder:C,required:q=!1,rows:U,select:P=!1,SelectProps:D,slots:Z={},slotProps:se={},type:ue,value:B,variant:z="outlined",...W}=r,I={...r,autoFocus:s,color:d,disabled:g,error:y,fullWidth:v,multiline:$,required:q,select:P,variant:z},pe=YI(I),ve=xl(E),he=x&&ve?`${ve}-helper-text`:void 0,xe=A&&ve?`${ve}-label`:void 0,Ke=qI[z],Ie={slots:Z,slotProps:{input:O,inputLabel:_,htmlInput:w,formHelperText:b,select:D,...se}},Me={},Fe=Ie.slotProps.inputLabel;z==="outlined"&&(Fe&&typeof Fe.shrink<"u"&&(Me.notched=Fe.shrink),Me.label=A),P&&((!D||!D.native)&&(Me.id=void 0),Me["aria-describedby"]=void 0);const[ft,Tn]=Ot("root",{elementType:XI,shouldForwardComponentProp:!0,externalForwardedProps:{...Ie,...W},ownerState:I,className:Ue(pe.root,f),ref:n,additionalProps:{disabled:g,error:y,fullWidth:v,required:q,color:d,variant:z}}),[$e,Je]=Ot("input",{elementType:Ke,externalForwardedProps:Ie,additionalProps:Me,ownerState:I}),[Jt,on]=Ot("inputLabel",{elementType:Q3,externalForwardedProps:Ie,ownerState:I}),[Ht,Tt]=Ot("htmlInput",{elementType:"input",externalForwardedProps:Ie,ownerState:I}),[an,It]=Ot("formHelperText",{elementType:P3,externalForwardedProps:Ie,ownerState:I}),[Re,Cr]=Ot("select",{elementType:lS,externalForwardedProps:Ie,ownerState:I}),tt=L.jsx($e,{"aria-describedby":he,autoComplete:a,autoFocus:s,defaultValue:h,fullWidth:v,multiline:$,name:H,rows:U,maxRows:M,minRows:R,type:ue,value:B,id:ve,inputRef:T,onBlur:V,onChange:K,onFocus:G,placeholder:C,inputProps:Tt,slots:{input:Z.htmlInput?Ht:void 0},...Je});return L.jsxs(ft,{...Tn,children:[A!=null&&A!==""&&L.jsx(Jt,{htmlFor:ve,id:xe,...on,children:A}),P?L.jsx(Re,{"aria-describedby":he,id:ve,labelId:xe,value:B,input:tt,...Cr,children:u}):tt,x&&L.jsx(an,{id:he,...It,children:x})]})}),ZI=Lv({themeId:Kr});var dt;(function(e){e.assertEqual=a=>{};function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const s={};for(const u of a)s[u]=u;return s},e.getValidEnumValues=a=>{const s=e.objectKeys(a).filter(f=>typeof a[a[f]]!="number"),u={};for(const f of s)u[f]=a[f];return e.objectValues(u)},e.objectValues=a=>e.objectKeys(a).map(function(s){return a[s]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const s=[];for(const u in a)Object.prototype.hasOwnProperty.call(a,u)&&s.push(u);return s},e.find=(a,s)=>{for(const u of a)if(s(u))return u},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,s=" | "){return a.map(u=>typeof u=="string"?`'${u}'`:u).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(dt||(dt={}));var uS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(uS||(uS={}));const _e=dt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fo=e=>{switch(typeof e){case"undefined":return _e.undefined;case"string":return _e.string;case"number":return Number.isNaN(e)?_e.nan:_e.number;case"boolean":return _e.boolean;case"function":return _e.function;case"bigint":return _e.bigint;case"symbol":return _e.symbol;case"object":return Array.isArray(e)?_e.array:e===null?_e.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?_e.promise:typeof Map<"u"&&e instanceof Map?_e.map:typeof Set<"u"&&e instanceof Set?_e.set:typeof Date<"u"&&e instanceof Date?_e.date:_e.object;default:return _e.unknown}},me=dt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Bi extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(s){return s.message},r={_errors:[]},a=s=>{for(const u of s.issues)if(u.code==="invalid_union")u.unionErrors.map(a);else if(u.code==="invalid_return_type")a(u.returnTypeError);else if(u.code==="invalid_arguments")a(u.argumentsError);else if(u.path.length===0)r._errors.push(n(u));else{let f=r,d=0;for(;d<u.path.length;){const h=u.path[d];d===u.path.length-1?(f[h]=f[h]||{_errors:[]},f[h]._errors.push(n(u))):f[h]=f[h]||{_errors:[]},f=f[h],d++}}};return a(this),r}static assert(t){if(!(t instanceof Bi))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,dt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)if(a.path.length>0){const s=a.path[0];n[s]=n[s]||[],n[s].push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Bi.create=e=>new Bi(e);const Mp=(e,t)=>{let n;switch(e.code){case me.invalid_type:e.received===_e.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,dt.jsonStringifyReplacer)}`;break;case me.unrecognized_keys:n=`Unrecognized key(s) in object: ${dt.joinValues(e.keys,", ")}`;break;case me.invalid_union:n="Invalid input";break;case me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${dt.joinValues(e.options)}`;break;case me.invalid_enum_value:n=`Invalid enum value. Expected ${dt.joinValues(e.options)}, received '${e.received}'`;break;case me.invalid_arguments:n="Invalid function arguments";break;case me.invalid_return_type:n="Invalid function return type";break;case me.invalid_date:n="Invalid date";break;case me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:dt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case me.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case me.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case me.custom:n="Invalid input";break;case me.invalid_intersection_types:n="Intersection results could not be merged";break;case me.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case me.not_finite:n="Number must be finite";break;default:n=t.defaultError,dt.assertNever(e)}return{message:n}};let KI=Mp;function WI(){return KI}const QI=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,s=[...n,...a.path||[]],u={...a,path:s};if(a.message!==void 0)return{...a,path:s,message:a.message};let f="";const d=r.filter(h=>!!h).slice().reverse();for(const h of d)f=h(u,{data:t,defaultError:f}).message;return{...a,path:s,message:f}};function Se(e,t){const n=WI(),r=QI({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Mp?void 0:Mp].filter(a=>!!a)});e.common.issues.push(r)}class tr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return je;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const s=await a.key,u=await a.value;r.push({key:s,value:u})}return tr.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:s,value:u}=a;if(s.status==="aborted"||u.status==="aborted")return je;s.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof u.value<"u"||a.alwaysSet)&&(r[s.value]=u.value)}return{status:t.value,value:r}}}const je=Object.freeze({status:"aborted"}),Ml=e=>({status:"dirty",value:e}),zr=e=>({status:"valid",value:e}),cS=e=>e.status==="aborted",fS=e=>e.status==="dirty",Ja=e=>e.status==="valid",Gc=e=>typeof Promise<"u"&&e instanceof Promise;var ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ke||(ke={}));class bi{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const dS=(e,t)=>{if(Ja(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Bi(e.common.issues);return this._error=n,this._error}}};function Xe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(u,f)=>{const{message:d}=e;return u.code==="invalid_enum_value"?{message:d??f.defaultError}:typeof f.data>"u"?{message:d??r??f.defaultError}:u.code!=="invalid_type"?{message:f.defaultError}:{message:d??n??f.defaultError}},description:a}}class at{get description(){return this._def.description}_getType(t){return fo(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:fo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new tr,ctx:{common:t.parent.common,data:t.data,parsedType:fo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Gc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fo(t)},a=this._parseSync({data:t,path:r.path,parent:r});return dS(r,a)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fo(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return Ja(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>Ja(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fo(t)},a=this._parse({data:t,path:r.path,parent:r}),s=await(Gc(a)?a:Promise.resolve(a));return dS(r,s)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,s)=>{const u=t(a),f=()=>s.addIssue({code:me.custom,...r(a)});return typeof Promise<"u"&&u instanceof Promise?u.then(d=>d?!0:(f(),!1)):u?!0:(f(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new oa({schema:this,typeName:He.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return $i.create(this,this._def)}nullable(){return aa.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Si.create(this)}promise(){return Qc.create(this,this._def)}or(t){return Yc.create([this,t],this._def)}and(t){return Xc.create(this,t,this._def)}transform(t){return new oa({...Xe(this._def),schema:this,typeName:He.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Jc({...Xe(this._def),innerType:this,defaultValue:n,typeName:He.ZodDefault})}brand(){return new xS({typeName:He.ZodBranded,type:this,...Xe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ef({...Xe(this._def),innerType:this,catchValue:n,typeName:He.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Hp.create(this,t)}readonly(){return tf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const JI=/^c[^\s-]{8,}$/i,eM=/^[0-9a-z]+$/,tM=/^[0-9A-HJKMNP-TV-Z]{26}$/i,nM=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,rM=/^[a-z0-9_-]{21}$/i,iM=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,oM=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,aM=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Dp;const lM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,uM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,cM=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,fM=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dM=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,hM=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,hS="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",pM=new RegExp(`^${hS}$`);function pS(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function mM(e){return new RegExp(`^${pS(e)}$`)}function gM(e){let t=`${hS}T${pS(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function yM(e,t){return!!((t==="v4"||!t)&&lM.test(e)||(t==="v6"||!t)&&cM.test(e))}function vM(e,t){if(!iM.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function bM(e,t){return!!((t==="v4"||!t)&&uM.test(e)||(t==="v6"||!t)&&fM.test(e))}class zi extends at{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==_e.string){const s=this._getOrReturnCtx(t);return Se(s,{code:me.invalid_type,expected:_e.string,received:s.parsedType}),je}const r=new tr;let a;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:me.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:me.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const u=t.data.length>s.value,f=t.data.length<s.value;(u||f)&&(a=this._getOrReturnCtx(t,a),u?Se(a,{code:me.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):f&&Se(a,{code:me.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")aM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"email",code:me.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Dp||(Dp=new RegExp(sM,"u")),Dp.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"emoji",code:me.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")nM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"uuid",code:me.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")rM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"nanoid",code:me.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")JI.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"cuid",code:me.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")eM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"cuid2",code:me.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")tM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"ulid",code:me.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),Se(a,{validation:"url",code:me.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"regex",code:me.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?gM(s).test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?pM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?mM(s).test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?oM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"duration",code:me.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?yM(t.data,s.version)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"ip",code:me.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?vM(t.data,s.alg)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"jwt",code:me.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?bM(t.data,s.version)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"cidr",code:me.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?dM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"base64",code:me.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?hM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"base64url",code:me.invalid_string,message:s.message}),r.dirty()):dt.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:me.invalid_string,...ke.errToObj(r)})}_addCheck(t){return new zi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ke.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ke.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ke.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ke.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ke.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ke.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...ke.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...ke.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ke.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ke.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...ke.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ke.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ke.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ke.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ke.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ke.errToObj(n)})}nonempty(t){return this.min(1,ke.errToObj(t))}trim(){return new zi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new zi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new zi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}zi.create=e=>new zi({checks:[],typeName:He.ZodString,coerce:e?.coerce??!1,...Xe(e)});function SM(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,s=Number.parseInt(e.toFixed(a).replace(".","")),u=Number.parseInt(t.toFixed(a).replace(".",""));return s%u/10**a}class es extends at{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==_e.number){const s=this._getOrReturnCtx(t);return Se(s,{code:me.invalid_type,expected:_e.number,received:s.parsedType}),je}let r;const a=new tr;for(const s of this._def.checks)s.kind==="int"?dt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Se(r,{code:me.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?SM(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Se(r,{code:me.not_finite,message:s.message}),a.dirty()):dt.assertNever(s);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,a){return new es({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(a)}]})}_addCheck(t){return new es({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&dt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}es.create=e=>new es({checks:[],typeName:He.ZodNumber,coerce:e?.coerce||!1,...Xe(e)});class Dl extends at{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==_e.bigint)return this._getInvalidInput(t);let r;const a=new tr;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):dt.assertNever(s);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Se(n,{code:me.invalid_type,expected:_e.bigint,received:n.parsedType}),je}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,a){return new Dl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(a)}]})}_addCheck(t){return new Dl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Dl.create=e=>new Dl({checks:[],typeName:He.ZodBigInt,coerce:e?.coerce??!1,...Xe(e)});class Bp extends at{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==_e.boolean){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:_e.boolean,received:r.parsedType}),je}return zr(t.data)}}Bp.create=e=>new Bp({typeName:He.ZodBoolean,coerce:e?.coerce||!1,...Xe(e)});class qc extends at{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==_e.date){const s=this._getOrReturnCtx(t);return Se(s,{code:me.invalid_type,expected:_e.date,received:s.parsedType}),je}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return Se(s,{code:me.invalid_date}),je}const r=new tr;let a;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:me.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:me.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):dt.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new qc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ke.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ke.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}qc.create=e=>new qc({checks:[],coerce:e?.coerce||!1,typeName:He.ZodDate,...Xe(e)});class mS extends at{_parse(t){if(this._getType(t)!==_e.symbol){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:_e.symbol,received:r.parsedType}),je}return zr(t.data)}}mS.create=e=>new mS({typeName:He.ZodSymbol,...Xe(e)});class zp extends at{_parse(t){if(this._getType(t)!==_e.undefined){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:_e.undefined,received:r.parsedType}),je}return zr(t.data)}}zp.create=e=>new zp({typeName:He.ZodUndefined,...Xe(e)});class Lp extends at{_parse(t){if(this._getType(t)!==_e.null){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:_e.null,received:r.parsedType}),je}return zr(t.data)}}Lp.create=e=>new Lp({typeName:He.ZodNull,...Xe(e)});class $p extends at{constructor(){super(...arguments),this._any=!0}_parse(t){return zr(t.data)}}$p.create=e=>new $p({typeName:He.ZodAny,...Xe(e)});class gS extends at{constructor(){super(...arguments),this._unknown=!0}_parse(t){return zr(t.data)}}gS.create=e=>new gS({typeName:He.ZodUnknown,...Xe(e)});class ho extends at{_parse(t){const n=this._getOrReturnCtx(t);return Se(n,{code:me.invalid_type,expected:_e.never,received:n.parsedType}),je}}ho.create=e=>new ho({typeName:He.ZodNever,...Xe(e)});class yS extends at{_parse(t){if(this._getType(t)!==_e.undefined){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:_e.void,received:r.parsedType}),je}return zr(t.data)}}yS.create=e=>new yS({typeName:He.ZodVoid,...Xe(e)});class Si extends at{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==_e.array)return Se(n,{code:me.invalid_type,expected:_e.array,received:n.parsedType}),je;if(a.exactLength!==null){const u=n.data.length>a.exactLength.value,f=n.data.length<a.exactLength.value;(u||f)&&(Se(n,{code:u?me.too_big:me.too_small,minimum:f?a.exactLength.value:void 0,maximum:u?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(Se(n,{code:me.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(Se(n,{code:me.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((u,f)=>a.type._parseAsync(new bi(n,u,n.path,f)))).then(u=>tr.mergeArray(r,u));const s=[...n.data].map((u,f)=>a.type._parseSync(new bi(n,u,n.path,f)));return tr.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Si({...this._def,minLength:{value:t,message:ke.toString(n)}})}max(t,n){return new Si({...this._def,maxLength:{value:t,message:ke.toString(n)}})}length(t,n){return new Si({...this._def,exactLength:{value:t,message:ke.toString(n)}})}nonempty(t){return this.min(1,t)}}Si.create=(e,t)=>new Si({type:e,minLength:null,maxLength:null,exactLength:null,typeName:He.ZodArray,...Xe(t)});function ts(e){if(e instanceof _n){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=$i.create(ts(r))}return new _n({...e._def,shape:()=>t})}else return e instanceof Si?new Si({...e._def,type:ts(e.element)}):e instanceof $i?$i.create(ts(e.unwrap())):e instanceof aa?aa.create(ts(e.unwrap())):e instanceof ra?ra.create(e.items.map(t=>ts(t))):e}class _n extends at{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=dt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==_e.object){const h=this._getOrReturnCtx(t);return Se(h,{code:me.invalid_type,expected:_e.object,received:h.parsedType}),je}const{status:r,ctx:a}=this._processInputParams(t),{shape:s,keys:u}=this._getCached(),f=[];if(!(this._def.catchall instanceof ho&&this._def.unknownKeys==="strip"))for(const h in a.data)u.includes(h)||f.push(h);const d=[];for(const h of u){const g=s[h],y=a.data[h];d.push({key:{status:"valid",value:h},value:g._parse(new bi(a,y,a.path,h)),alwaysSet:h in a.data})}if(this._def.catchall instanceof ho){const h=this._def.unknownKeys;if(h==="passthrough")for(const g of f)d.push({key:{status:"valid",value:g},value:{status:"valid",value:a.data[g]}});else if(h==="strict")f.length>0&&(Se(a,{code:me.unrecognized_keys,keys:f}),r.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const g of f){const y=a.data[g];d.push({key:{status:"valid",value:g},value:h._parse(new bi(a,y,a.path,g)),alwaysSet:g in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const h=[];for(const g of d){const y=await g.key,b=await g.value;h.push({key:y,value:b,alwaysSet:g.alwaysSet})}return h}).then(h=>tr.mergeObjectSync(r,h)):tr.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return ke.errToObj,new _n({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const a=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:ke.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new _n({...this._def,unknownKeys:"strip"})}passthrough(){return new _n({...this._def,unknownKeys:"passthrough"})}extend(t){return new _n({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new _n({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:He.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new _n({...this._def,catchall:t})}pick(t){const n={};for(const r of dt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new _n({...this._def,shape:()=>n})}omit(t){const n={};for(const r of dt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new _n({...this._def,shape:()=>n})}deepPartial(){return ts(this)}partial(t){const n={};for(const r of dt.objectKeys(this.shape)){const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}return new _n({...this._def,shape:()=>n})}required(t){const n={};for(const r of dt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof $i;)s=s._def.innerType;n[r]=s}return new _n({...this._def,shape:()=>n})}keyof(){return bS(dt.objectKeys(this.shape))}}_n.create=(e,t)=>new _n({shape:()=>e,unknownKeys:"strip",catchall:ho.create(),typeName:He.ZodObject,...Xe(t)}),_n.strictCreate=(e,t)=>new _n({shape:()=>e,unknownKeys:"strict",catchall:ho.create(),typeName:He.ZodObject,...Xe(t)}),_n.lazycreate=(e,t)=>new _n({shape:e,unknownKeys:"strip",catchall:ho.create(),typeName:He.ZodObject,...Xe(t)});class Yc extends at{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(s){for(const f of s)if(f.result.status==="valid")return f.result;for(const f of s)if(f.result.status==="dirty")return n.common.issues.push(...f.ctx.common.issues),f.result;const u=s.map(f=>new Bi(f.ctx.common.issues));return Se(n,{code:me.invalid_union,unionErrors:u}),je}if(n.common.async)return Promise.all(r.map(async s=>{const u={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:u}),ctx:u}})).then(a);{let s;const u=[];for(const d of r){const h={...n,common:{...n.common,issues:[]},parent:null},g=d._parseSync({data:n.data,path:n.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!s&&(s={result:g,ctx:h}),h.common.issues.length&&u.push(h.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const f=u.map(d=>new Bi(d));return Se(n,{code:me.invalid_union,unionErrors:f}),je}}get options(){return this._def.options}}Yc.create=(e,t)=>new Yc({options:e,typeName:He.ZodUnion,...Xe(t)});const Li=e=>e instanceof jp?Li(e.schema):e instanceof oa?Li(e.innerType()):e instanceof Kc?[e.value]:e instanceof ia?e.options:e instanceof Wc?dt.objectValues(e.enum):e instanceof Jc?Li(e._def.innerType):e instanceof zp?[void 0]:e instanceof Lp?[null]:e instanceof $i?[void 0,...Li(e.unwrap())]:e instanceof aa?[null,...Li(e.unwrap())]:e instanceof xS||e instanceof tf?Li(e.unwrap()):e instanceof ef?Li(e._def.innerType):[];class Pp extends at{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==_e.object)return Se(n,{code:me.invalid_type,expected:_e.object,received:n.parsedType}),je;const r=this.discriminator,a=n.data[r],s=this.optionsMap.get(a);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(Se(n,{code:me.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),je)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const a=new Map;for(const s of n){const u=Li(s.shape[t]);if(!u.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const f of u){if(a.has(f))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(f)}`);a.set(f,s)}}return new Pp({typeName:He.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a,...Xe(r)})}}function Up(e,t){const n=fo(e),r=fo(t);if(e===t)return{valid:!0,data:e};if(n===_e.object&&r===_e.object){const a=dt.objectKeys(t),s=dt.objectKeys(e).filter(f=>a.indexOf(f)!==-1),u={...e,...t};for(const f of s){const d=Up(e[f],t[f]);if(!d.valid)return{valid:!1};u[f]=d.data}return{valid:!0,data:u}}else if(n===_e.array&&r===_e.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let s=0;s<e.length;s++){const u=e[s],f=t[s],d=Up(u,f);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===_e.date&&r===_e.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Xc extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(s,u)=>{if(cS(s)||cS(u))return je;const f=Up(s.value,u.value);return f.valid?((fS(s)||fS(u))&&n.dirty(),{status:n.value,value:f.data}):(Se(r,{code:me.invalid_intersection_types}),je)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,u])=>a(s,u)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Xc.create=(e,t,n)=>new Xc({left:e,right:t,typeName:He.ZodIntersection,...Xe(n)});class ra extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.array)return Se(r,{code:me.invalid_type,expected:_e.array,received:r.parsedType}),je;if(r.data.length<this._def.items.length)return Se(r,{code:me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),je;!this._def.rest&&r.data.length>this._def.items.length&&(Se(r,{code:me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((u,f)=>{const d=this._def.items[f]||this._def.rest;return d?d._parse(new bi(r,u,r.path,f)):null}).filter(u=>!!u);return r.common.async?Promise.all(s).then(u=>tr.mergeArray(n,u)):tr.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new ra({...this._def,rest:t})}}ra.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ra({items:e,typeName:He.ZodTuple,rest:null,...Xe(t)})};class Zc extends at{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.object)return Se(r,{code:me.invalid_type,expected:_e.object,received:r.parsedType}),je;const a=[],s=this._def.keyType,u=this._def.valueType;for(const f in r.data)a.push({key:s._parse(new bi(r,f,r.path,f)),value:u._parse(new bi(r,r.data[f],r.path,f)),alwaysSet:f in r.data});return r.common.async?tr.mergeObjectAsync(n,a):tr.mergeObjectSync(n,a)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof at?new Zc({keyType:t,valueType:n,typeName:He.ZodRecord,...Xe(r)}):new Zc({keyType:zi.create(),valueType:t,typeName:He.ZodRecord,...Xe(n)})}}class vS extends at{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.map)return Se(r,{code:me.invalid_type,expected:_e.map,received:r.parsedType}),je;const a=this._def.keyType,s=this._def.valueType,u=[...r.data.entries()].map(([f,d],h)=>({key:a._parse(new bi(r,f,r.path,[h,"key"])),value:s._parse(new bi(r,d,r.path,[h,"value"]))}));if(r.common.async){const f=new Map;return Promise.resolve().then(async()=>{for(const d of u){const h=await d.key,g=await d.value;if(h.status==="aborted"||g.status==="aborted")return je;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),f.set(h.value,g.value)}return{status:n.value,value:f}})}else{const f=new Map;for(const d of u){const h=d.key,g=d.value;if(h.status==="aborted"||g.status==="aborted")return je;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),f.set(h.value,g.value)}return{status:n.value,value:f}}}}vS.create=(e,t,n)=>new vS({valueType:t,keyType:e,typeName:He.ZodMap,...Xe(n)});class Bl extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.set)return Se(r,{code:me.invalid_type,expected:_e.set,received:r.parsedType}),je;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(Se(r,{code:me.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(Se(r,{code:me.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const s=this._def.valueType;function u(d){const h=new Set;for(const g of d){if(g.status==="aborted")return je;g.status==="dirty"&&n.dirty(),h.add(g.value)}return{status:n.value,value:h}}const f=[...r.data.values()].map((d,h)=>s._parse(new bi(r,d,r.path,h)));return r.common.async?Promise.all(f).then(d=>u(d)):u(f)}min(t,n){return new Bl({...this._def,minSize:{value:t,message:ke.toString(n)}})}max(t,n){return new Bl({...this._def,maxSize:{value:t,message:ke.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Bl.create=(e,t)=>new Bl({valueType:e,minSize:null,maxSize:null,typeName:He.ZodSet,...Xe(t)});class jp extends at{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}jp.create=(e,t)=>new jp({getter:e,typeName:He.ZodLazy,...Xe(t)});class Kc extends at{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Se(n,{received:n.data,code:me.invalid_literal,expected:this._def.value}),je}return{status:"valid",value:t.data}}get value(){return this._def.value}}Kc.create=(e,t)=>new Kc({value:e,typeName:He.ZodLiteral,...Xe(t)});function bS(e,t){return new ia({values:e,typeName:He.ZodEnum,...Xe(t)})}class ia extends at{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Se(n,{expected:dt.joinValues(r),received:n.parsedType,code:me.invalid_type}),je}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Se(n,{received:n.data,code:me.invalid_enum_value,options:r}),je}return zr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ia.create(t,{...this._def,...n})}exclude(t,n=this._def){return ia.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ia.create=bS;class Wc extends at{_parse(t){const n=dt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==_e.string&&r.parsedType!==_e.number){const a=dt.objectValues(n);return Se(r,{expected:dt.joinValues(a),received:r.parsedType,code:me.invalid_type}),je}if(this._cache||(this._cache=new Set(dt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=dt.objectValues(n);return Se(r,{received:r.data,code:me.invalid_enum_value,options:a}),je}return zr(t.data)}get enum(){return this._def.values}}Wc.create=(e,t)=>new Wc({values:e,typeName:He.ZodNativeEnum,...Xe(t)});class Qc extends at{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==_e.promise&&n.common.async===!1)return Se(n,{code:me.invalid_type,expected:_e.promise,received:n.parsedType}),je;const r=n.parsedType===_e.promise?n.data:Promise.resolve(n.data);return zr(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Qc.create=(e,t)=>new Qc({type:e,typeName:He.ZodPromise,...Xe(t)});class oa extends at{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===He.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,s={addIssue:u=>{Se(r,u),u.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),a.type==="preprocess"){const u=a.transform(r.data,s);if(r.common.async)return Promise.resolve(u).then(async f=>{if(n.value==="aborted")return je;const d=await this._def.schema._parseAsync({data:f,path:r.path,parent:r});return d.status==="aborted"?je:d.status==="dirty"||n.value==="dirty"?Ml(d.value):d});{if(n.value==="aborted")return je;const f=this._def.schema._parseSync({data:u,path:r.path,parent:r});return f.status==="aborted"?je:f.status==="dirty"||n.value==="dirty"?Ml(f.value):f}}if(a.type==="refinement"){const u=f=>{const d=a.refinement(f,s);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f};if(r.common.async===!1){const f=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return f.status==="aborted"?je:(f.status==="dirty"&&n.dirty(),u(f.value),{status:n.value,value:f.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(f=>f.status==="aborted"?je:(f.status==="dirty"&&n.dirty(),u(f.value).then(()=>({status:n.value,value:f.value}))))}if(a.type==="transform")if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ja(u))return je;const f=a.transform(u.value,s);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:f}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>Ja(u)?Promise.resolve(a.transform(u.value,s)).then(f=>({status:n.value,value:f})):je);dt.assertNever(a)}}oa.create=(e,t,n)=>new oa({schema:e,typeName:He.ZodEffects,effect:t,...Xe(n)}),oa.createWithPreprocess=(e,t,n)=>new oa({schema:t,effect:{type:"preprocess",transform:e},typeName:He.ZodEffects,...Xe(n)});class $i extends at{_parse(t){return this._getType(t)===_e.undefined?zr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$i.create=(e,t)=>new $i({innerType:e,typeName:He.ZodOptional,...Xe(t)});class aa extends at{_parse(t){return this._getType(t)===_e.null?zr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}aa.create=(e,t)=>new aa({innerType:e,typeName:He.ZodNullable,...Xe(t)});class Jc extends at{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===_e.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Jc.create=(e,t)=>new Jc({innerType:e,typeName:He.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Xe(t)});class ef extends at{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Gc(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Bi(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Bi(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ef.create=(e,t)=>new ef({innerType:e,typeName:He.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Xe(t)});class SS extends at{_parse(t){if(this._getType(t)!==_e.nan){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:_e.nan,received:r.parsedType}),je}return{status:"valid",value:t.data}}}SS.create=e=>new SS({typeName:He.ZodNaN,...Xe(e)});class xS extends at{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Hp extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?je:s.status==="dirty"?(n.dirty(),Ml(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?je:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new Hp({in:t,out:n,typeName:He.ZodPipeline})}}class tf extends at{_parse(t){const n=this._def.innerType._parse(t),r=a=>(Ja(a)&&(a.value=Object.freeze(a.value)),a);return Gc(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}tf.create=(e,t)=>new tf({innerType:e,typeName:He.ZodReadonly,...Xe(t)});var He;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(He||(He={}));const de=zi.create,xM=es.create,Vp=Bp.create,nr=$p.create;ho.create;const po=Si.create,Wt=_n.create,Fp=Yc.create,nf=Pp.create;Xc.create,ra.create;const ES=Zc.create,Oe=Kc.create,_S=ia.create,EM=Wc.create;Qc.create,$i.create,aa.create;var _M=Wt({name:de(),arguments:de()}),wM=Wt({id:de(),type:Oe("function"),function:_M}),rf=Wt({id:de(),role:de(),content:de().optional(),name:de().optional()}),CM=Wt({type:Oe("text"),text:de()}),wS=Wt({type:Oe("binary"),mimeType:de(),id:de().optional(),url:de().optional(),data:de().optional(),filename:de().optional()}),CS=(e,t)=>{!e.id&&!e.url&&!e.data&&t.addIssue({code:me.custom,message:"BinaryInputContent requires at least one of id, url, or data.",path:["id"]})};wS.superRefine((e,t)=>{CS(e,t)});var TM=nf("type",[CM,wS]),AM=TM.superRefine((e,t)=>{e.type==="binary"&&CS(e,t)}),kM=rf.extend({role:Oe("developer"),content:de()}),RM=rf.extend({role:Oe("system"),content:de()}),OM=rf.extend({role:Oe("assistant"),content:de().optional(),toolCalls:po(wM).optional()}),NM=rf.extend({role:Oe("user"),content:Fp([de(),po(AM)])}),IM=Wt({id:de(),content:de(),role:Oe("tool"),toolCallId:de(),error:de().optional()}),MM=Wt({id:de(),role:Oe("activity"),activityType:de(),content:ES(nr())}),TS=nf("role",[kM,RM,OM,NM,IM,MM]);Fp([Oe("developer"),Oe("system"),Oe("assistant"),Oe("user"),Oe("tool"),Oe("activity")]);var DM=Wt({description:de(),value:de()}),BM=Wt({name:de(),description:de(),parameters:nr()}),zM=Wt({threadId:de(),runId:de(),parentRunId:de().optional(),state:nr(),messages:po(TS),tools:po(BM),context:po(DM),forwardedProps:nr()}),LM=nr(),cn=class extends Error{constructor(e){super(e)}},AS=class extends cn{constructor(){super("Connect not implemented. This method is not supported by the current agent.")}},kS=Fp([Oe("developer"),Oe("system"),Oe("assistant"),Oe("user")]),fe=(e=>(e.TEXT_MESSAGE_START="TEXT_MESSAGE_START",e.TEXT_MESSAGE_CONTENT="TEXT_MESSAGE_CONTENT",e.TEXT_MESSAGE_END="TEXT_MESSAGE_END",e.TEXT_MESSAGE_CHUNK="TEXT_MESSAGE_CHUNK",e.THINKING_TEXT_MESSAGE_START="THINKING_TEXT_MESSAGE_START",e.THINKING_TEXT_MESSAGE_CONTENT="THINKING_TEXT_MESSAGE_CONTENT",e.THINKING_TEXT_MESSAGE_END="THINKING_TEXT_MESSAGE_END",e.TOOL_CALL_START="TOOL_CALL_START",e.TOOL_CALL_ARGS="TOOL_CALL_ARGS",e.TOOL_CALL_END="TOOL_CALL_END",e.TOOL_CALL_CHUNK="TOOL_CALL_CHUNK",e.TOOL_CALL_RESULT="TOOL_CALL_RESULT",e.THINKING_START="THINKING_START",e.THINKING_END="THINKING_END",e.STATE_SNAPSHOT="STATE_SNAPSHOT",e.STATE_DELTA="STATE_DELTA",e.MESSAGES_SNAPSHOT="MESSAGES_SNAPSHOT",e.ACTIVITY_SNAPSHOT="ACTIVITY_SNAPSHOT",e.ACTIVITY_DELTA="ACTIVITY_DELTA",e.RAW="RAW",e.CUSTOM="CUSTOM",e.RUN_STARTED="RUN_STARTED",e.RUN_FINISHED="RUN_FINISHED",e.RUN_ERROR="RUN_ERROR",e.STEP_STARTED="STEP_STARTED",e.STEP_FINISHED="STEP_FINISHED",e))(fe||{}),Yt=Wt({type:EM(fe),timestamp:xM().optional(),rawEvent:nr().optional()}).passthrough(),$M=Yt.extend({type:Oe("TEXT_MESSAGE_START"),messageId:de(),role:kS.default("assistant")}),RS=Yt.extend({type:Oe("TEXT_MESSAGE_CONTENT"),messageId:de(),delta:de().refine(e=>e.length>0,"Delta must not be an empty string")}),PM=Yt.extend({type:Oe("TEXT_MESSAGE_END"),messageId:de()}),UM=Yt.extend({type:Oe("TEXT_MESSAGE_CHUNK"),messageId:de().optional(),role:kS.optional(),delta:de().optional()}),jM=Yt.extend({type:Oe("THINKING_TEXT_MESSAGE_START")}),HM=RS.omit({messageId:!0,type:!0}).extend({type:Oe("THINKING_TEXT_MESSAGE_CONTENT")}),VM=Yt.extend({type:Oe("THINKING_TEXT_MESSAGE_END")}),FM=Yt.extend({type:Oe("TOOL_CALL_START"),toolCallId:de(),toolCallName:de(),parentMessageId:de().optional()}),GM=Yt.extend({type:Oe("TOOL_CALL_ARGS"),toolCallId:de(),delta:de()}),qM=Yt.extend({type:Oe("TOOL_CALL_END"),toolCallId:de()}),YM=Yt.extend({messageId:de(),type:Oe("TOOL_CALL_RESULT"),toolCallId:de(),content:de(),role:Oe("tool").optional()}),XM=Yt.extend({type:Oe("TOOL_CALL_CHUNK"),toolCallId:de().optional(),toolCallName:de().optional(),parentMessageId:de().optional(),delta:de().optional()}),ZM=Yt.extend({type:Oe("THINKING_START"),title:de().optional()}),KM=Yt.extend({type:Oe("THINKING_END")}),WM=Yt.extend({type:Oe("STATE_SNAPSHOT"),snapshot:LM}),QM=Yt.extend({type:Oe("STATE_DELTA"),delta:po(nr())}),JM=Yt.extend({type:Oe("MESSAGES_SNAPSHOT"),messages:po(TS)}),e4=Yt.extend({type:Oe("ACTIVITY_SNAPSHOT"),messageId:de(),activityType:de(),content:ES(nr()),replace:Vp().optional().default(!0)}),t4=Yt.extend({type:Oe("ACTIVITY_DELTA"),messageId:de(),activityType:de(),patch:po(nr())}),n4=Yt.extend({type:Oe("RAW"),event:nr(),source:de().optional()}),r4=Yt.extend({type:Oe("CUSTOM"),name:de(),value:nr()}),i4=Yt.extend({type:Oe("RUN_STARTED"),threadId:de(),runId:de(),parentRunId:de().optional(),input:zM.optional()}),o4=Yt.extend({type:Oe("RUN_FINISHED"),threadId:de(),runId:de(),result:nr().optional()}),a4=Yt.extend({type:Oe("RUN_ERROR"),message:de(),code:de().optional()}),s4=Yt.extend({type:Oe("STEP_STARTED"),stepName:de()}),l4=Yt.extend({type:Oe("STEP_FINISHED"),stepName:de()}),OS=nf("type",[$M,RS,PM,UM,ZM,KM,jM,HM,VM,FM,GM,qM,XM,YM,WM,QM,JM,e4,t4,n4,r4,i4,o4,a4,s4,l4]);function fn(e){return typeof e=="function"}function u4(e){return fn(e?.lift)}function xi(e){return function(t){if(u4(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}var Gp=function(e,t){return Gp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},Gp(e,t)};function ns(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Gp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function c4(e,t,n,r){function a(s){return s instanceof n?s:new n(function(u){u(s)})}return new(n||(n=Promise))(function(s,u){function f(g){try{h(r.next(g))}catch(y){u(y)}}function d(g){try{h(r.throw(g))}catch(y){u(y)}}function h(g){g.done?s(g.value):a(g.value).then(f,d)}h((r=r.apply(e,t||[])).next())})}function NS(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,a,s,u=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return u.next=f(0),u.throw=f(1),u.return=f(2),typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function f(h){return function(g){return d([h,g])}}function d(h){if(r)throw new TypeError("Generator is already executing.");for(;u&&(u=0,h[0]&&(n=0)),n;)try{if(r=1,a&&(s=h[0]&2?a.return:h[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,h[1])).done)return s;switch(a=0,s&&(h=[h[0]&2,s.value]),h[0]){case 0:case 1:s=h;break;case 4:return n.label++,{value:h[1],done:!1};case 5:n.label++,a=h[1],h=[0];continue;case 7:h=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!s||h[1]>s[0]&&h[1]<s[3])){n.label=h[1];break}if(h[0]===6&&n.label<s[1]){n.label=s[1],s=h;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(h);break}s[2]&&n.ops.pop(),n.trys.pop();continue}h=t.call(e,n)}catch(g){h=[6,g],a=0}finally{r=s=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function rs(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function qp(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),a,s=[],u;try{for(;(t===void 0||t-- >0)&&!(a=r.next()).done;)s.push(a.value)}catch(f){u={error:f}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(u)throw u.error}}return s}function Yp(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,s;r<a;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function is(e){return this instanceof is?(this.v=e,this):new is(e)}function f4(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),a,s=[];return a=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),f("next"),f("throw"),f("return",u),a[Symbol.asyncIterator]=function(){return this},a;function u(v){return function(x){return Promise.resolve(x).then(v,y)}}function f(v,x){r[v]&&(a[v]=function(E){return new Promise(function(_,w){s.push([v,E,_,w])>1||d(v,E)})},x&&(a[v]=x(a[v])))}function d(v,x){try{h(r[v](x))}catch(E){b(s[0][3],E)}}function h(v){v.value instanceof is?Promise.resolve(v.value.v).then(g,y):b(s[0][2],v)}function g(v){d("next",v)}function y(v){d("throw",v)}function b(v,x){v(x),s.shift(),s.length&&d(s[0][0],s[0][1])}}function d4(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof rs=="function"?rs(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=e[s]&&function(u){return new Promise(function(f,d){u=e[s](u),a(f,d,u.done,u.value)})}}function a(s,u,f,d){Promise.resolve(d).then(function(h){s({value:h,done:f})},u)}}typeof SuppressedError=="function"&&SuppressedError;var IS=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function MS(e){return fn(e?.then)}function Xp(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Zp=Xp(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
146
|
+
`),$=A.selectionStart===M;R&&$&&A.setSelectionRange(M,M),r&&r(T)};return L.jsxs(N.Fragment,{children:[L.jsx("textarea",{value:f,onChange:O,ref:y,rows:s,style:u,...d}),L.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:v,tabIndex:-1,style:{...bN.shadow,...u,paddingTop:0,paddingBottom:0}})]})});function Wa({props:e,states:t,muiFormControl:n}){return t.reduce((r,a)=>(r[a]=e[a],n&&typeof e[a]>"u"&&(r[a]=n[a]),r),{})}const yp=N.createContext(void 0);function Qa(){return N.useContext(yp)}function zb(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function Dc(e,t=!1){return e&&(zb(e.value)&&e.value!==""||t&&zb(e.defaultValue)&&e.defaultValue!=="")}function EN(e){return e.startAdornment}function _N(e){return Et("MuiInputBase",e)}const Ja=_t("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var Lb;const Bc=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${ye(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},zc=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},wN=e=>{const{classes:t,color:n,disabled:r,error:a,endAdornment:s,focused:u,formControl:f,fullWidth:d,hiddenLabel:h,multiline:g,readOnly:y,size:b,startAdornment:v,type:x}=e,E={root:["root",`color${ye(n)}`,r&&"disabled",a&&"error",d&&"fullWidth",u&&"focused",f&&"formControl",b&&b!=="medium"&&`size${ye(b)}`,g&&"multiline",v&&"adornedStart",s&&"adornedEnd",h&&"hiddenLabel",y&&"readOnly"],input:["input",r&&"disabled",x==="search"&&"inputTypeSearch",g&&"inputMultiline",b==="small"&&"inputSizeSmall",h&&"inputHiddenLabel",v&&"inputAdornedStart",s&&"inputAdornedEnd",y&&"readOnly"]};return wt(E,_N,t)},Lc=Ee("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Bc})(zt(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Ja.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),$c=Ee("input",{name:"MuiInputBase",slot:"Input",overridesResolver:zc})(zt(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},a=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Ja.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus::-ms-input-placeholder":a},[`&.${Ja.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:s})=>!s.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:s})=>s.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),$b=sp({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),vp=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiInputBase"}),{"aria-describedby":a,autoComplete:s,autoFocus:u,className:f,color:d,components:h={},componentsProps:g={},defaultValue:y,disabled:b,disableInjectingGlobalStyles:v,endAdornment:x,error:E,fullWidth:_=!1,id:w,inputComponent:O="input",inputProps:T={},inputRef:A,margin:M,maxRows:R,minRows:$,multiline:H=!1,name:V,onBlur:K,onChange:G,onClick:C,onFocus:q,onKeyDown:U,onKeyUp:P,placeholder:D,readOnly:Z,renderSuffix:se,rows:ue,size:B,slotProps:z={},slots:W={},startAdornment:I,type:pe="text",value:ve,...he}=r,xe=T.value!=null?T.value:ve,{current:Ke}=N.useRef(xe!=null),Ie=N.useRef(),Me=N.useCallback(et=>{},[]),Fe=er(Ie,A,T.ref,Me),[ft,Tn]=N.useState(!1),$e=Qa(),Je=Wa({props:r,muiFormControl:$e,states:["color","disabled","error","hiddenLabel","size","required","filled"]});Je.focused=$e?$e.focused:ft,N.useEffect(()=>{!$e&&b&&ft&&(Tn(!1),K&&K())},[$e,b,ft,K]);const Jt=$e&&$e.onFilled,on=$e&&$e.onEmpty,Ht=N.useCallback(et=>{Dc(et)?Jt&&Jt():on&&on()},[Jt,on]);mi(()=>{Ke&&Ht({value:xe})},[xe,Ht,Ke]);const Tt=et=>{q&&q(et),T.onFocus&&T.onFocus(et),$e&&$e.onFocus?$e.onFocus(et):Tn(!0)},an=et=>{K&&K(et),T.onBlur&&T.onBlur(et),$e&&$e.onBlur?$e.onBlur(et):Tn(!1)},It=(et,...In)=>{if(!Ke){const hn=et.target||Ie.current;if(hn==null)throw new Error(Ni(1));Ht({value:hn.value})}T.onChange&&T.onChange(et,...In),G&&G(et,...In)};N.useEffect(()=>{Ht(Ie.current)},[]);const Re=et=>{Ie.current&&et.currentTarget===et.target&&Ie.current.focus(),C&&C(et)};let Cr=O,tt=T;H&&Cr==="input"&&(ue?tt={type:void 0,minRows:ue,maxRows:ue,...tt}:tt={type:void 0,maxRows:R,minRows:$,...tt},Cr=xN);const oi=et=>{Ht(et.animationName==="mui-auto-fill-cancel"?Ie.current:{value:"x"})};N.useEffect(()=>{$e&&$e.setAdornedStart(!!I)},[$e,I]);const te={...r,color:Je.color||"primary",disabled:Je.disabled,endAdornment:x,error:Je.error,focused:Je.focused,formControl:$e,fullWidth:_,hiddenLabel:Je.hiddenLabel,multiline:H,size:Je.size,startAdornment:I,type:pe},ce=wN(te),we=W.root||h.Root||Lc,ze=z.root||g.root||{},We=W.input||h.Input||$c;return tt={...tt,...z.input??g.input},L.jsxs(N.Fragment,{children:[!v&&typeof $b=="function"&&(Lb||(Lb=L.jsx($b,{}))),L.jsxs(we,{...ze,ref:n,onClick:Re,...he,...!kc(we)&&{ownerState:{...te,...ze.ownerState}},className:Ue(ce.root,ze.className,f,Z&&"MuiInputBase-readOnly"),children:[I,L.jsx(yp.Provider,{value:null,children:L.jsx(We,{"aria-invalid":Je.error,"aria-describedby":a,autoComplete:s,autoFocus:u,defaultValue:y,disabled:Je.disabled,id:w,onAnimationStart:oi,name:V,placeholder:D,readOnly:Z,required:Je.required,rows:ue,value:xe,onKeyDown:U,onKeyUp:P,type:pe,...tt,...!kc(We)&&{as:Cr,ownerState:{...te,...tt.ownerState}},ref:Fe,className:Ue(ce.input,tt.className,Z&&"MuiInputBase-readOnly"),onBlur:an,onChange:It,onFocus:Tt})}),x,se?se({...Je,startAdornment:I}):null]})]})});function CN(e){return Et("MuiInput",e)}const Al={...Ja,..._t("MuiInput",["root","underline","input"])};function TN(e){return Et("MuiOutlinedInput",e)}const vi={...Ja,..._t("MuiOutlinedInput",["root","notchedOutline","input"])};function AN(e){return Et("MuiFilledInput",e)}const ta={...Ja,..._t("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},kN=Xn(L.jsx("path",{d:"M7 10l5 5 5-5z"})),RN=Xn(L.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}));function ON(e){return Et("MuiAvatar",e)}_t("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]);const NN=e=>{const{classes:t,variant:n,colorDefault:r}=e;return wt({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},ON,t)},IN=Ee("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(zt(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),MN=Ee("img",{name:"MuiAvatar",slot:"Img"})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),DN=Ee(RN,{name:"MuiAvatar",slot:"Fallback"})({width:"75%",height:"75%"});function BN({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[a,s]=N.useState(!1);return N.useEffect(()=>{if(!n&&!r)return;s(!1);let u=!0;const f=new Image;return f.onload=()=>{u&&s("loaded")},f.onerror=()=>{u&&s("error")},f.crossOrigin=e,f.referrerPolicy=t,f.src=n,r&&(f.srcset=r),()=>{u=!1}},[e,t,n,r]),a}const Pc=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiAvatar"}),{alt:a,children:s,className:u,component:f="div",slots:d={},slotProps:h={},imgProps:g,sizes:y,src:b,srcSet:v,variant:x="circular",...E}=r;let _=null;const w={...r,component:f,variant:x},O=BN({...g,...typeof h.img=="function"?h.img(w):h.img,src:b,srcSet:v}),T=b||v,A=T&&O!=="error";w.colorDefault=!A,delete w.ownerState;const M=NN(w),[R,$]=Ot("root",{ref:n,className:Ue(M.root,u),elementType:IN,externalForwardedProps:{slots:d,slotProps:h,component:f,...E},ownerState:w}),[H,V]=Ot("img",{className:M.img,elementType:MN,externalForwardedProps:{slots:d,slotProps:{img:{...g,...h.img}}},additionalProps:{alt:a,src:b,srcSet:v,sizes:y},ownerState:w}),[K,G]=Ot("fallback",{className:M.fallback,elementType:DN,externalForwardedProps:{slots:d,slotProps:h},shouldForwardComponentProp:!0,ownerState:w});return A?_=L.jsx(H,{...V}):s||s===0?_=s:T&&a?_=a[0]:_=L.jsx(K,{...G}),L.jsx(R,{...$,children:_})}),zN={entering:{opacity:1},entered:{opacity:1}},LN=N.forwardRef(function(t,n){const r=Xa(),a={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:u=!0,children:f,easing:d,in:h,onEnter:g,onEntered:y,onEntering:b,onExit:v,onExited:x,onExiting:E,style:_,timeout:w=a,TransitionComponent:O=yi,...T}=t,A=N.useRef(null),M=er(A,Tl(f),n),R=U=>P=>{if(U){const D=A.current;P===void 0?U(D):U(D,P)}},$=R(b),H=R((U,P)=>{_b(U);const D=Ac({style:_,timeout:w,easing:d},{mode:"enter"});U.style.webkitTransition=r.transitions.create("opacity",D),U.style.transition=r.transitions.create("opacity",D),g&&g(U,P)}),V=R(y),K=R(E),G=R(U=>{const P=Ac({style:_,timeout:w,easing:d},{mode:"exit"});U.style.webkitTransition=r.transitions.create("opacity",P),U.style.transition=r.transitions.create("opacity",P),v&&v(U)}),C=R(x),q=U=>{s&&s(A.current,U)};return L.jsx(O,{appear:u,in:h,nodeRef:A,onEnter:H,onEntered:V,onEntering:$,onExit:G,onExited:C,onExiting:K,addEndListener:q,timeout:w,...T,children:(U,{ownerState:P,...D})=>N.cloneElement(f,{style:{opacity:0,visibility:U==="exited"&&!h?"hidden":void 0,...zN[U],..._,...f.props.style},ref:M,...D})})});function $N(e){return Et("MuiBackdrop",e)}_t("MuiBackdrop",["root","invisible"]);const PN=e=>{const{classes:t,invisible:n}=e;return wt({root:["root",n&&"invisible"]},$N,t)},UN=Ee("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),jN=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiBackdrop"}),{children:a,className:s,component:u="div",invisible:f=!1,open:d,components:h={},componentsProps:g={},slotProps:y={},slots:b={},TransitionComponent:v,transitionDuration:x,...E}=r,_={...r,component:u,invisible:f},w=PN(_),O={transition:v,root:h.Root,...b},T={...g,...y},A={component:u,slots:O,slotProps:T},[M,R]=Ot("root",{elementType:UN,externalForwardedProps:A,className:Ue(w.root,s),ownerState:_}),[$,H]=Ot("transition",{elementType:LN,externalForwardedProps:A,ownerState:_});return L.jsx($,{in:d,timeout:x,...E,...H,children:L.jsx(M,{"aria-hidden":!0,...R,ref:n,children:a})})});function HN(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:a=!1}=e,s=Mb({badgeContent:t,max:r});let u=n;n===!1&&t===0&&!a&&(u=!0);const{badgeContent:f,max:d=r}=u?s:e,h=f&&Number(f)>d?`${d}+`:f;return{badgeContent:f,invisible:u,max:d,displayValue:h}}function VN(e){return Et("MuiBadge",e)}const co=_t("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),bp=10,Sp=4,FN=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:a,variant:s,classes:u={}}=e,f={root:["root"],badge:["badge",s,r&&"invisible",`anchorOrigin${ye(n.vertical)}${ye(n.horizontal)}`,`anchorOrigin${ye(n.vertical)}${ye(n.horizontal)}${ye(a)}`,`overlap${ye(a)}`,t!=="default"&&`color${ye(t)}`]};return wt(f,VN,u)},GN=Ee("span",{name:"MuiBadge",slot:"Root"})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),qN=Ee("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${ye(n.anchorOrigin.vertical)}${ye(n.anchorOrigin.horizontal)}${ye(n.overlap)}`],n.color!=="default"&&t[`color${ye(n.color)}`],n.invisible&&t.invisible]}})(zt(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:bp*2,lineHeight:1,padding:"0 6px",height:bp*2,borderRadius:bp,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(zn(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:Sp,height:Sp*2,minWidth:Sp*2,padding:0}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${co.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${co.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${co.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${co.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${co.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${co.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${co.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${co.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function Pb(e){return{vertical:e?.vertical??"top",horizontal:e?.horizontal??"right"}}const YN=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiBadge"}),{anchorOrigin:a,className:s,classes:u,component:f,components:d={},componentsProps:h={},children:g,overlap:y="rectangular",color:b="default",invisible:v=!1,max:x=99,badgeContent:E,slots:_,slotProps:w,showZero:O=!1,variant:T="standard",...A}=r,{badgeContent:M,invisible:R,max:$,displayValue:H}=HN({max:x,invisible:v,badgeContent:E,showZero:O}),V=Mb({anchorOrigin:Pb(a),color:b,overlap:y,variant:T,badgeContent:E}),K=R||M==null&&T!=="dot",{color:G=b,overlap:C=y,anchorOrigin:q,variant:U=T}=K?V:r,P=Pb(q),D=U!=="dot"?H:void 0,Z={...r,badgeContent:M,invisible:K,max:$,displayValue:D,showZero:O,anchorOrigin:P,color:G,overlap:C,variant:U},se=FN(Z),ue={slots:{root:_?.root??d.Root,badge:_?.badge??d.Badge},slotProps:{root:w?.root??h.root,badge:w?.badge??h.badge}},[B,z]=Ot("root",{elementType:GN,externalForwardedProps:{...ue,...A},ownerState:Z,className:Ue(se.root,s),ref:n,additionalProps:{as:f}}),[W,I]=Ot("badge",{elementType:qN,externalForwardedProps:ue,ownerState:Z,className:se.badge});return L.jsxs(B,{...z,children:[g,L.jsx(W,{...I,children:D})]})}),XN=_t("MuiBox",["root"]),ZN=_c(),yn=_k({themeId:Kr,defaultTheme:ZN,defaultClassName:XN.root,generateClassName:Ov.generate});function KN(e){return Et("MuiButton",e)}const na=_t("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),WN=N.createContext({}),QN=N.createContext(void 0),JN=e=>{const{color:t,disableElevation:n,fullWidth:r,size:a,variant:s,loading:u,loadingPosition:f,classes:d}=e,h={root:["root",u&&"loading",s,`${s}${ye(t)}`,`size${ye(a)}`,`${s}Size${ye(a)}`,`color${ye(t)}`,n&&"disableElevation",r&&"fullWidth",u&&`loadingPosition${ye(f)}`],startIcon:["icon","startIcon",`iconSize${ye(a)}`],endIcon:["icon","endIcon",`iconSize${ye(a)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},g=wt(h,KN,d);return{...d,...g}},Ub=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],e3=Ee(Ic,{shouldForwardProp:e=>Qr(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${ye(n.color)}`],t[`size${ye(n.size)}`],t[`${n.variant}Size${ye(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(zt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${na.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${na.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${na.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${na.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(zn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[r].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${na.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${na.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${na.loading}`]:{color:"transparent"}}}]}})),t3=Ee("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${ye(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Ub]})),n3=Ee("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${ye(n.size)}`]]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Ub]})),r3=Ee("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),jb=Ee("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),Uc=N.forwardRef(function(t,n){const r=N.useContext(WN),a=N.useContext(QN),s=bl(r,t),u=Ct({props:s,name:"MuiButton"}),{children:f,color:d="primary",component:h="button",className:g,disabled:y=!1,disableElevation:b=!1,disableFocusRipple:v=!1,endIcon:x,focusVisibleClassName:E,fullWidth:_=!1,id:w,loading:O=null,loadingIndicator:T,loadingPosition:A="center",size:M="medium",startIcon:R,type:$,variant:H="text",...V}=u,K=El(w),G=T??L.jsx(Ob,{"aria-labelledby":K,color:"inherit",size:16}),C={...u,color:d,component:h,disabled:y,disableElevation:b,disableFocusRipple:v,fullWidth:_,loading:O,loadingIndicator:G,loadingPosition:A,size:M,type:$,variant:H},q=JN(C),U=(R||O&&A==="start")&&L.jsx(t3,{className:q.startIcon,ownerState:C,children:R||L.jsx(jb,{className:q.loadingIconPlaceholder,ownerState:C})}),P=(x||O&&A==="end")&&L.jsx(n3,{className:q.endIcon,ownerState:C,children:x||L.jsx(jb,{className:q.loadingIconPlaceholder,ownerState:C})}),D=a||"",Z=typeof O=="boolean"?L.jsx("span",{className:q.loadingWrapper,style:{display:"contents"},children:O&&L.jsx(r3,{className:q.loadingIndicator,ownerState:C,children:G})}):null;return L.jsxs(e3,{ownerState:C,className:Ue(r.className,q.root,g,D),component:h,disabled:y||O,focusRipple:!v,focusVisibleClassName:Ue(q.focusVisible,E),ref:n,type:$,id:O?K:w,...V,classes:q,children:[U,A!=="end"&&Z,f,A==="end"&&Z,P]})}),xp=typeof sp({})=="function",i3=(e,t)=>({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%",...t&&!e.vars&&{colorScheme:e.palette.mode}}),o3=e=>({color:(e.vars||e).palette.text.primary,...e.typography.body1,backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),Hb=(e,t=!1)=>{const n={};t&&e.colorSchemes&&typeof e.getColorSchemeSelector=="function"&&Object.entries(e.colorSchemes).forEach(([s,u])=>{const f=e.getColorSchemeSelector(s);f.startsWith("@")?n[f]={":root":{colorScheme:u.palette?.mode}}:n[f.replace(/\s*&/,"")]={colorScheme:u.palette?.mode}});let r={html:i3(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:{margin:0,...o3(e),"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}},...n};const a=e.components?.MuiCssBaseline?.styleOverrides;return a&&(r=[r,a]),r},jc="mui-ecs",a3=e=>{const t=Hb(e,!1),n=Array.isArray(t)?t[0]:t;return!e.vars&&n&&(n.html[`:root:has(${jc})`]={colorScheme:e.palette.mode}),e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([r,a])=>{const s=e.getColorSchemeSelector(r);s.startsWith("@")?n[s]={[`:root:not(:has(.${jc}))`]:{colorScheme:a.palette?.mode}}:n[s.replace(/\s*&/,"")]={[`&:not(:has(.${jc}))`]:{colorScheme:a.palette?.mode}}}),t},s3=sp(xp?({theme:e,enableColorScheme:t})=>Hb(e,t):({theme:e})=>a3(e));function l3(e){const t=Ct({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return L.jsxs(N.Fragment,{children:[xp&&L.jsx(s3,{enableColorScheme:r}),!xp&&!r&&L.jsx("span",{className:jc,style:{display:"none"}}),n]})}function Vb(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function u3(e){const t=Jr(e);return t.body===e?Mi(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function kl(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function Fb(e){return parseFloat(Mi(e).getComputedStyle(e).paddingRight)||0}function c3(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function Gb(e,t,n,r,a){const s=[t,n,...r];[].forEach.call(e.children,u=>{const f=!s.includes(u),d=!c3(u);f&&d&&kl(u,a)})}function Ep(e,t){let n=-1;return e.some((r,a)=>t(r)?(n=a,!0):!1),n}function f3(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(u3(r)){const u=Vb(Mi(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${Fb(r)+u}px`;const f=Jr(r).querySelectorAll(".mui-fixed");[].forEach.call(f,d=>{n.push({value:d.style.paddingRight,property:"padding-right",el:d}),d.style.paddingRight=`${Fb(d)+u}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=Jr(r).body;else{const u=r.parentElement,f=Mi(r);s=u?.nodeName==="HTML"&&f.getComputedStyle(u).overflowY==="scroll"?u:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:u,property:f})=>{s?u.style.setProperty(f,s):u.style.removeProperty(f)})}}function d3(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class h3{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&kl(t.modalRef,!1);const a=d3(n);Gb(n,t.mount,t.modalRef,a,!0);const s=Ep(this.containers,u=>u.container===n);return s!==-1?(this.containers[s].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:a}),r)}mount(t,n){const r=Ep(this.containers,s=>s.modals.includes(t)),a=this.containers[r];a.restore||(a.restore=f3(a,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const a=Ep(this.containers,u=>u.modals.includes(t)),s=this.containers[a];if(s.modals.splice(s.modals.indexOf(t),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),t.modalRef&&kl(t.modalRef,n),Gb(s.container,t.mount,t.modalRef,s.hiddenSiblings,!1),this.containers.splice(a,1);else{const u=s.modals[s.modals.length-1];u.modalRef&&kl(u.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function Rl(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const p3=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function m3(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function g3(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function y3(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||g3(e))}function v3(e){const t=[],n=[];return Array.from(e.querySelectorAll(p3)).forEach((r,a)=>{const s=m3(r);s===-1||!y3(r)||(s===0?t.push(r):n.push({documentOrder:a,tabIndex:s,node:r}))}),n.sort((r,a)=>r.tabIndex===a.tabIndex?r.documentOrder-a.documentOrder:r.tabIndex-a.tabIndex).map(r=>r.node).concat(t)}function b3(){return!0}function S3(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:a=!1,getTabbable:s=v3,isEnabled:u=b3,open:f}=e,d=N.useRef(!1),h=N.useRef(null),g=N.useRef(null),y=N.useRef(null),b=N.useRef(null),v=N.useRef(!1),x=N.useRef(null),E=er(Tl(t),x),_=N.useRef(null);N.useEffect(()=>{!f||!x.current||(v.current=!n)},[n,f]),N.useEffect(()=>{if(!f||!x.current)return;const T=Jr(x.current),A=Rl(T);return x.current.contains(A)||(x.current.hasAttribute("tabIndex")||x.current.setAttribute("tabIndex","-1"),v.current&&x.current.focus()),()=>{a||(y.current&&y.current.focus&&(d.current=!0,y.current.focus()),y.current=null)}},[f]),N.useEffect(()=>{if(!f||!x.current)return;const T=Jr(x.current),A=$=>{if(_.current=$,r||!u()||$.key!=="Tab")return;Rl(T)===x.current&&$.shiftKey&&(d.current=!0,g.current&&g.current.focus())},M=()=>{const $=x.current;if($===null)return;const H=Rl(T);if(!T.hasFocus()||!u()||d.current){d.current=!1;return}if($.contains(H)||r&&H!==h.current&&H!==g.current)return;if(H!==b.current)b.current=null;else if(b.current!==null)return;if(!v.current)return;let V=[];if((H===h.current||H===g.current)&&(V=s(x.current)),V.length>0){const K=!!(_.current?.shiftKey&&_.current?.key==="Tab"),G=V[0],C=V[V.length-1];typeof G!="string"&&typeof C!="string"&&(K?C.focus():G.focus())}else $.focus()};T.addEventListener("focusin",M),T.addEventListener("keydown",A,!0);const R=setInterval(()=>{const $=Rl(T);$&&$.tagName==="BODY"&&M()},50);return()=>{clearInterval(R),T.removeEventListener("focusin",M),T.removeEventListener("keydown",A,!0)}},[n,r,a,u,f,s]);const w=T=>{y.current===null&&(y.current=T.relatedTarget),v.current=!0,b.current=T.target;const A=t.props.onFocus;A&&A(T)},O=T=>{y.current===null&&(y.current=T.relatedTarget),v.current=!0};return L.jsxs(N.Fragment,{children:[L.jsx("div",{tabIndex:f?0:-1,onFocus:O,ref:h,"data-testid":"sentinelStart"}),N.cloneElement(t,{ref:E,onFocus:w}),L.jsx("div",{tabIndex:f?0:-1,onFocus:O,ref:g,"data-testid":"sentinelEnd"})]})}function x3(e){return typeof e=="function"?e():e}function E3(e){return e?e.props.hasOwnProperty("in"):!1}const qb=()=>{},Hc=new h3;function _3(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:a=!1,onTransitionEnter:s,onTransitionExited:u,children:f,onClose:d,open:h,rootRef:g}=e,y=N.useRef({}),b=N.useRef(null),v=N.useRef(null),x=er(v,g),[E,_]=N.useState(!h),w=E3(f);let O=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(O=!1);const T=()=>Jr(b.current),A=()=>(y.current.modalRef=v.current,y.current.mount=b.current,y.current),M=()=>{Hc.mount(A(),{disableScrollLock:r}),v.current&&(v.current.scrollTop=0)},R=Wo(()=>{const P=x3(t)||T().body;Hc.add(A(),P),v.current&&M()}),$=()=>Hc.isTopModal(A()),H=Wo(P=>{b.current=P,P&&(h&&$()?M():v.current&&kl(v.current,O))}),V=N.useCallback(()=>{Hc.remove(A(),O)},[O]);N.useEffect(()=>()=>{V()},[V]),N.useEffect(()=>{h?R():(!w||!a)&&V()},[h,V,w,a,R]);const K=P=>D=>{P.onKeyDown?.(D),!(D.key!=="Escape"||D.which===229||!$())&&(n||(D.stopPropagation(),d&&d(D,"escapeKeyDown")))},G=P=>D=>{P.onClick?.(D),D.target===D.currentTarget&&d&&d(D,"backdropClick")};return{getRootProps:(P={})=>{const D=Tb(e);delete D.onTransitionEnter,delete D.onTransitionExited;const Z={...D,...P};return{role:"presentation",...Z,onKeyDown:K(Z),ref:x}},getBackdropProps:(P={})=>{const D=P;return{"aria-hidden":!0,...D,onClick:G(D),open:h}},getTransitionProps:()=>{const P=()=>{_(!1),s&&s()},D=()=>{_(!0),u&&u(),a&&V()};return{onEnter:db(P,f?.props.onEnter??qb),onExited:db(D,f?.props.onExited??qb)}},rootRef:x,portalRef:H,isTopModal:$,exited:E,hasTransition:w}}function w3(e){return Et("MuiModal",e)}_t("MuiModal",["root","hidden","backdrop"]);const C3=e=>{const{open:t,exited:n,classes:r}=e;return wt({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},w3,r)},T3=Ee("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(zt(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),A3=Ee(jN,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),k3=N.forwardRef(function(t,n){const r=Ct({name:"MuiModal",props:t}),{BackdropComponent:a=A3,BackdropProps:s,classes:u,className:f,closeAfterTransition:d=!1,children:h,container:g,component:y,components:b={},componentsProps:v={},disableAutoFocus:x=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:_=!1,disablePortal:w=!1,disableRestoreFocus:O=!1,disableScrollLock:T=!1,hideBackdrop:A=!1,keepMounted:M=!1,onClose:R,onTransitionEnter:$,onTransitionExited:H,open:V,slotProps:K={},slots:G={},theme:C,...q}=r,U={...r,closeAfterTransition:d,disableAutoFocus:x,disableEnforceFocus:E,disableEscapeKeyDown:_,disablePortal:w,disableRestoreFocus:O,disableScrollLock:T,hideBackdrop:A,keepMounted:M},{getRootProps:P,getBackdropProps:D,getTransitionProps:Z,portalRef:se,isTopModal:ue,exited:B,hasTransition:z}=_3({...U,rootRef:n}),W={...U,exited:B},I=C3(W),pe={};if(h.props.tabIndex===void 0&&(pe.tabIndex="-1"),z){const{onEnter:Me,onExited:Fe}=Z();pe.onEnter=Me,pe.onExited=Fe}const ve={slots:{root:b.Root,backdrop:b.Backdrop,...G},slotProps:{...v,...K}},[he,xe]=Ot("root",{ref:n,elementType:T3,externalForwardedProps:{...ve,...q,component:y},getSlotProps:P,ownerState:W,className:Ue(f,I?.root,!W.open&&W.exited&&I?.hidden)}),[Ke,Ie]=Ot("backdrop",{ref:s?.ref,elementType:a,externalForwardedProps:ve,shouldForwardComponentProp:!0,additionalProps:s,getSlotProps:Me=>D({...Me,onClick:Fe=>{Me?.onClick&&Me.onClick(Fe)}}),className:Ue(s?.className,I?.backdrop),ownerState:W});return!M&&!V&&(!z||B)?null:L.jsx(dN,{ref:se,container:g,disablePortal:w,children:L.jsxs(he,{...xe,children:[!A&&a?L.jsx(Ke,{...Ie}):null,L.jsx(S3,{disableEnforceFocus:E,disableAutoFocus:x,disableRestoreFocus:O,isEnabled:ue,open:V,children:N.cloneElement(h,pe)})]})})}),R3=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:a,size:s,hiddenLabel:u,multiline:f}=e,d={root:["root",!n&&"underline",r&&"adornedStart",a&&"adornedEnd",s==="small"&&`size${ye(s)}`,u&&"hiddenLabel",f&&"multiline"],input:["input"]},h=wt(d,AN,t);return{...t,...h}},O3=Ee(Lc,{shouldForwardProp:e=>Qr(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Bc(e,t),!n.disableUnderline&&t.underline]}})(zt(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",a=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",s=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:a,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${ta.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${ta.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:s},variants:[{props:({ownerState:u})=>!u.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ta.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ta.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ta.disabled}, .${ta.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ta.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(zn()).map(([u])=>({props:{disableUnderline:!1,color:u},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[u]?.main}`}}})),{props:({ownerState:u})=>u.startAdornment,style:{paddingLeft:12}},{props:({ownerState:u})=>u.endAdornment,style:{paddingRight:12}},{props:({ownerState:u})=>u.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:u,size:f})=>u.multiline&&f==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:u})=>u.multiline&&u.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:u})=>u.multiline&&u.hiddenLabel&&u.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),N3=Ee($c,{name:"MuiFilledInput",slot:"Input",overridesResolver:zc})(zt(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),_p=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiFilledInput"}),{disableUnderline:a=!1,components:s={},componentsProps:u,fullWidth:f=!1,hiddenLabel:d,inputComponent:h="input",multiline:g=!1,slotProps:y,slots:b={},type:v="text",...x}=r,E={...r,disableUnderline:a,fullWidth:f,inputComponent:h,multiline:g,type:v},_=R3(r),w={root:{ownerState:E},input:{ownerState:E}},O=y??u?Bn(w,y??u):w,T=b.root??s.Root??O3,A=b.input??s.Input??N3;return L.jsx(vp,{slots:{root:T,input:A},slotProps:O,fullWidth:f,inputComponent:h,multiline:g,ref:n,type:v,...x,classes:_})});_p.muiName="Input";function I3(e){return Et("MuiFormControl",e)}_t("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const M3=e=>{const{classes:t,margin:n,fullWidth:r}=e,a={root:["root",n!=="none"&&`margin${ye(n)}`,r&&"fullWidth"]};return wt(a,I3,t)},D3=Ee("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${ye(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),B3=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiFormControl"}),{children:a,className:s,color:u="primary",component:f="div",disabled:d=!1,error:h=!1,focused:g,fullWidth:y=!1,hiddenLabel:b=!1,margin:v="none",required:x=!1,size:E="medium",variant:_="outlined",...w}=r,O={...r,color:u,component:f,disabled:d,error:h,fullWidth:y,hiddenLabel:b,margin:v,required:x,size:E,variant:_},T=M3(O),[A,M]=N.useState(()=>{let P=!1;return a&&N.Children.forEach(a,D=>{if(!ep(D,["Input","Select"]))return;const Z=ep(D,["Select"])?D.props.input:D;Z&&EN(Z.props)&&(P=!0)}),P}),[R,$]=N.useState(()=>{let P=!1;return a&&N.Children.forEach(a,D=>{ep(D,["Input","Select"])&&(Dc(D.props,!0)||Dc(D.props.inputProps,!0))&&(P=!0)}),P}),[H,V]=N.useState(!1);d&&H&&V(!1);const K=g!==void 0&&!d?g:H;let G;N.useRef(!1);const C=N.useCallback(()=>{$(!0)},[]),q=N.useCallback(()=>{$(!1)},[]),U=N.useMemo(()=>({adornedStart:A,setAdornedStart:M,color:u,disabled:d,error:h,filled:R,focused:K,fullWidth:y,hiddenLabel:b,size:E,onBlur:()=>{V(!1)},onFocus:()=>{V(!0)},onEmpty:q,onFilled:C,registerEffect:G,required:x,variant:_}),[A,u,d,h,R,K,y,b,G,q,C,x,E,_]);return L.jsx(yp.Provider,{value:U,children:L.jsx(D3,{as:f,ownerState:O,className:Ue(T.root,s),ref:n,...w,children:a})})});function z3(e){return Et("MuiFormHelperText",e)}const Yb=_t("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Xb;const L3=e=>{const{classes:t,contained:n,size:r,disabled:a,error:s,filled:u,focused:f,required:d}=e,h={root:["root",a&&"disabled",s&&"error",r&&`size${ye(r)}`,n&&"contained",f&&"focused",u&&"filled",d&&"required"]};return wt(h,z3,t)},$3=Ee("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${ye(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(zt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${Yb.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Yb.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),P3=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiFormHelperText"}),{children:a,className:s,component:u="p",disabled:f,error:d,filled:h,focused:g,margin:y,required:b,variant:v,...x}=r,E=Qa(),_=Wa({props:r,muiFormControl:E,states:["variant","size","disabled","error","filled","focused","required"]}),w={...r,component:u,contained:_.variant==="filled"||_.variant==="outlined",variant:_.variant,size:_.size,disabled:_.disabled,error:_.error,filled:_.filled,focused:_.focused,required:_.required};delete w.ownerState;const O=L3(w);return L.jsx($3,{as:u,className:Ue(O.root,s),ref:n,...x,ownerState:w,children:a===" "?Xb||(Xb=L.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):a})});function U3(e){return Et("MuiFormLabel",e)}const Ol=_t("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),j3=e=>{const{classes:t,color:n,focused:r,disabled:a,error:s,filled:u,required:f}=e,d={root:["root",`color${ye(n)}`,a&&"disabled",s&&"error",u&&"filled",r&&"focused",f&&"required"],asterisk:["asterisk",s&&"error"]};return wt(d,U3,t)},H3=Ee("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color==="secondary"&&t.colorSecondary,n.filled&&t.filled]}})(zt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{[`&.${Ol.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Ol.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Ol.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),V3=Ee("span",{name:"MuiFormLabel",slot:"Asterisk"})(zt(({theme:e})=>({[`&.${Ol.error}`]:{color:(e.vars||e).palette.error.main}}))),F3=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiFormLabel"}),{children:a,className:s,color:u,component:f="label",disabled:d,error:h,filled:g,focused:y,required:b,...v}=r,x=Qa(),E=Wa({props:r,muiFormControl:x,states:["color","required","focused","disabled","error","filled"]}),_={...r,color:E.color||"primary",component:f,disabled:E.disabled,error:E.error,filled:E.filled,focused:E.focused,required:E.required},w=j3(_);return L.jsxs(H3,{as:f,ownerState:_,className:Ue(w.root,s),ref:n,...v,children:[a,E.required&&L.jsxs(V3,{ownerState:_,"aria-hidden":!0,className:w.asterisk,children:[" ","*"]})]})});function wp(e){return`scale(${e}, ${e**2})`}const G3={entering:{opacity:1,transform:wp(1)},entered:{opacity:1,transform:"none"}},Cp=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Tp=N.forwardRef(function(t,n){const{addEndListener:r,appear:a=!0,children:s,easing:u,in:f,onEnter:d,onEntered:h,onEntering:g,onExit:y,onExited:b,onExiting:v,style:x,timeout:E="auto",TransitionComponent:_=yi,...w}=t,O=Eb(),T=N.useRef(),A=Xa(),M=N.useRef(null),R=er(M,Tl(s),n),$=P=>D=>{if(P){const Z=M.current;D===void 0?P(Z):P(Z,D)}},H=$(g),V=$((P,D)=>{_b(P);const{duration:Z,delay:se,easing:ue}=Ac({style:x,timeout:E,easing:u},{mode:"enter"});let B;E==="auto"?(B=A.transitions.getAutoHeightDuration(P.clientHeight),T.current=B):B=Z,P.style.transition=[A.transitions.create("opacity",{duration:B,delay:se}),A.transitions.create("transform",{duration:Cp?B:B*.666,delay:se,easing:ue})].join(","),d&&d(P,D)}),K=$(h),G=$(v),C=$(P=>{const{duration:D,delay:Z,easing:se}=Ac({style:x,timeout:E,easing:u},{mode:"exit"});let ue;E==="auto"?(ue=A.transitions.getAutoHeightDuration(P.clientHeight),T.current=ue):ue=D,P.style.transition=[A.transitions.create("opacity",{duration:ue,delay:Z}),A.transitions.create("transform",{duration:Cp?ue:ue*.666,delay:Cp?Z:Z||ue*.333,easing:se})].join(","),P.style.opacity=0,P.style.transform=wp(.75),y&&y(P)}),q=$(b),U=P=>{E==="auto"&&O.start(T.current||0,P),r&&r(M.current,P)};return L.jsx(_,{appear:a,in:f,nodeRef:M,onEnter:V,onEntered:K,onEntering:H,onExit:C,onExited:q,onExiting:G,addEndListener:U,timeout:E==="auto"?null:E,...w,children:(P,{ownerState:D,...Z})=>N.cloneElement(s,{style:{opacity:0,transform:wp(.75),visibility:P==="exited"&&!f?"hidden":void 0,...G3[P],...x,...s.props.style},ref:R,...Z})})});Tp&&(Tp.muiSupportAuto=!0);const q3=e=>{const{classes:t,disableUnderline:n}=e,a=wt({root:["root",!n&&"underline"],input:["input"]},CN,t);return{...t,...a}},Y3=Ee(Lc,{shouldForwardProp:e=>Qr(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Bc(e,t),!n.disableUnderline&&t.underline]}})(zt(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Al.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Al.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Al.disabled}, .${Al.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Al.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(zn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),X3=Ee($c,{name:"MuiInput",slot:"Input",overridesResolver:zc})({}),Ap=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiInput"}),{disableUnderline:a=!1,components:s={},componentsProps:u,fullWidth:f=!1,inputComponent:d="input",multiline:h=!1,slotProps:g,slots:y={},type:b="text",...v}=r,x=q3(r),_={root:{ownerState:{disableUnderline:a}}},w=g??u?Bn(g??u,_):_,O=y.root??s.Root??Y3,T=y.input??s.Input??X3;return L.jsx(vp,{slots:{root:O,input:T},slotProps:w,fullWidth:f,inputComponent:d,multiline:h,ref:n,type:b,...v,classes:x})});Ap.muiName="Input";function Z3(e){return Et("MuiInputLabel",e)}_t("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const K3=e=>{const{classes:t,formControl:n,size:r,shrink:a,disableAnimation:s,variant:u,required:f}=e,d={root:["root",n&&"formControl",!s&&"animated",a&&"shrink",r&&r!=="medium"&&`size${ye(r)}`,u],asterisk:[f&&"asterisk"]},h=wt(d,Z3,t);return{...t,...h}},W3=Ee(F3,{shouldForwardProp:e=>Qr(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ol.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(zt(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Q3=N.forwardRef(function(t,n){const r=Ct({name:"MuiInputLabel",props:t}),{disableAnimation:a=!1,margin:s,shrink:u,variant:f,className:d,...h}=r,g=Qa();let y=u;typeof y>"u"&&g&&(y=g.filled||g.focused||g.adornedStart);const b=Wa({props:r,muiFormControl:g,states:["size","variant","required","focused"]}),v={...r,disableAnimation:a,formControl:g,shrink:y,size:b.size,variant:b.variant,required:b.required,focused:b.focused},x=K3(v);return L.jsx(W3,{"data-shrink":y,ref:n,className:Ue(x.root,d),...h,ownerState:v,classes:x})});function J3(e){return Et("MuiLink",e)}const eI=_t("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),tI=({theme:e,ownerState:t})=>{const n=t.color;if("colorSpace"in e&&e.colorSpace){const s=pi(e,`palette.${n}.main`)||pi(e,`palette.${n}`)||t.color;return e.alpha(s,.4)}const r=pi(e,`palette.${n}.main`,!1)||pi(e,`palette.${n}`,!1)||t.color,a=pi(e,`palette.${n}.mainChannel`)||pi(e,`palette.${n}Channel`);return"vars"in e&&a?`rgba(${a} / 0.4)`:xl(r,.4)},Zb={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},nI=e=>{const{classes:t,component:n,focusVisible:r,underline:a}=e,s={root:["root",`underline${ye(a)}`,n==="button"&&"button",r&&"focusVisible"]};return wt(s,J3,t)},rI=Ee(ti,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${ye(n.underline)}`],n.component==="button"&&t.button]}})(zt(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:t,ownerState:n})=>t==="always"&&n.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},{props:({underline:t,ownerState:n})=>t==="always"&&n.color==="inherit",style:e.colorSpace?{textDecorationColor:e.alpha("currentColor",.4)}:null},...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{underline:"always",color:t},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette[t].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.alpha((e.vars||e).palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${eI.focusVisible}`]:{outline:"auto"}}}]}))),iI=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiLink"}),a=Xa(),{className:s,color:u="primary",component:f="a",onBlur:d,onFocus:h,TypographyClasses:g,underline:y="always",variant:b="inherit",sx:v,...x}=r,[E,_]=N.useState(!1),w=M=>{Oc(M.target)||_(!1),d&&d(M)},O=M=>{Oc(M.target)&&_(!0),h&&h(M)},T={...r,color:u,component:f,focusVisible:E,underline:y,variant:b},A=nI(T);return L.jsx(rI,{color:u,className:Ue(A.root,s),classes:g,component:f,onBlur:w,onFocus:O,ref:n,ownerState:T,variant:b,...x,sx:[...Zb[u]===void 0?[{color:u}]:[],...Array.isArray(v)?v:[v]],style:{...x.style,...y==="always"&&u!=="inherit"&&!Zb[u]&&{"--Link-underlineColor":tI({theme:a,ownerState:T})}}})}),oI=N.createContext({});function aI(e){return Et("MuiList",e)}_t("MuiList",["root","padding","dense","subheader"]);const sI=e=>{const{classes:t,disablePadding:n,dense:r,subheader:a}=e;return wt({root:["root",!n&&"padding",r&&"dense",a&&"subheader"]},aI,t)},lI=Ee("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),uI=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiList"}),{children:a,className:s,component:u="ul",dense:f=!1,disablePadding:d=!1,subheader:h,...g}=r,y=N.useMemo(()=>({dense:f}),[f]),b={...r,component:u,dense:f,disablePadding:d},v=sI(b);return L.jsx(oI.Provider,{value:y,children:L.jsxs(lI,{as:u,className:Ue(v.root,s),ref:n,ownerState:b,...g,children:[h,a]})})});function kp(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function Kb(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Wb(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function Nl(e,t,n,r,a,s){let u=!1,f=a(e,t,t?n:!1);for(;f;){if(f===e.firstChild){if(u)return!1;u=!0}const d=r?!1:f.disabled||f.getAttribute("aria-disabled")==="true";if(!f.hasAttribute("tabindex")||!Wb(f,s)||d)f=a(e,f,n);else return f.focus(),!0}return!1}const cI=N.forwardRef(function(t,n){const{actions:r,autoFocus:a=!1,autoFocusItem:s=!1,children:u,className:f,disabledItemsFocusable:d=!1,disableListWrap:h=!1,onKeyDown:g,variant:y="selectedMenu",...b}=t,v=N.useRef(null),x=N.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});mi(()=>{a&&v.current.focus()},[a]),N.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(T,{direction:A})=>{const M=!v.current.style.width;if(T.clientHeight<v.current.clientHeight&&M){const R=`${Vb(Mi(T))}px`;v.current.style[A==="rtl"?"paddingLeft":"paddingRight"]=R,v.current.style.width=`calc(100% + ${R})`}return v.current}}),[]);const E=T=>{const A=v.current,M=T.key;if(T.ctrlKey||T.metaKey||T.altKey){g&&g(T);return}const $=Rl(Jr(A));if(M==="ArrowDown")T.preventDefault(),Nl(A,$,h,d,kp);else if(M==="ArrowUp")T.preventDefault(),Nl(A,$,h,d,Kb);else if(M==="Home")T.preventDefault(),Nl(A,null,h,d,kp);else if(M==="End")T.preventDefault(),Nl(A,null,h,d,Kb);else if(M.length===1){const H=x.current,V=M.toLowerCase(),K=performance.now();H.keys.length>0&&(K-H.lastTime>500?(H.keys=[],H.repeating=!0,H.previousKeyMatched=!0):H.repeating&&V!==H.keys[0]&&(H.repeating=!1)),H.lastTime=K,H.keys.push(V);const G=$&&!H.repeating&&Wb($,H);H.previousKeyMatched&&(G||Nl(A,$,!1,d,kp,H))?T.preventDefault():H.previousKeyMatched=!1}g&&g(T)},_=er(v,n);let w=-1;N.Children.forEach(u,(T,A)=>{if(!N.isValidElement(T)){w===A&&(w+=1,w>=u.length&&(w=-1));return}T.props.disabled||(y==="selectedMenu"&&T.props.selected||w===-1)&&(w=A),w===A&&(T.props.disabled||T.props.muiSkipListHighlight||T.type.muiSkipListHighlight)&&(w+=1,w>=u.length&&(w=-1))});const O=N.Children.map(u,(T,A)=>{if(A===w){const M={};return s&&(M.autoFocus=!0),T.props.tabIndex===void 0&&y==="selectedMenu"&&(M.tabIndex=0),N.cloneElement(T,M)}return T});return L.jsx(uI,{role:"menu",ref:_,className:f,onKeyDown:E,tabIndex:a?0:-1,...b,children:O})});function fI(e){return Et("MuiPopover",e)}_t("MuiPopover",["root","paper"]);function Qb(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function Jb(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function eS(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Vc(e){return typeof e=="function"?e():e}const dI=e=>{const{classes:t}=e;return wt({root:["root"],paper:["paper"]},fI,t)},hI=Ee(k3,{name:"MuiPopover",slot:"Root"})({}),tS=Ee(Rc,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),pI=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiPopover"}),{action:a,anchorEl:s,anchorOrigin:u={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:d="anchorEl",children:h,className:g,container:y,elevation:b=8,marginThreshold:v=16,open:x,PaperProps:E={},slots:_={},slotProps:w={},transformOrigin:O={vertical:"top",horizontal:"left"},TransitionComponent:T,transitionDuration:A="auto",TransitionProps:M={},disableScrollLock:R=!1,...$}=r,H=N.useRef(),V={...r,anchorOrigin:u,anchorReference:d,elevation:b,marginThreshold:v,transformOrigin:O,TransitionComponent:T,transitionDuration:A,TransitionProps:M},K=dI(V),G=N.useCallback(()=>{if(d==="anchorPosition")return f;const Me=Vc(s),ft=(Me&&Me.nodeType===1?Me:Jr(H.current).body).getBoundingClientRect();return{top:ft.top+Qb(ft,u.vertical),left:ft.left+Jb(ft,u.horizontal)}},[s,u.horizontal,u.vertical,f,d]),C=N.useCallback(Me=>({vertical:Qb(Me,O.vertical),horizontal:Jb(Me,O.horizontal)}),[O.horizontal,O.vertical]),q=N.useCallback(Me=>{const Fe={width:Me.offsetWidth,height:Me.offsetHeight},ft=C(Fe);if(d==="none")return{top:null,left:null,transformOrigin:eS(ft)};const Tn=G();let $e=Tn.top-ft.vertical,Je=Tn.left-ft.horizontal;const Jt=$e+Fe.height,on=Je+Fe.width,Ht=Mi(Vc(s)),Tt=Ht.innerHeight-v,an=Ht.innerWidth-v;if(v!==null&&$e<v){const It=$e-v;$e-=It,ft.vertical+=It}else if(v!==null&&Jt>Tt){const It=Jt-Tt;$e-=It,ft.vertical+=It}if(v!==null&&Je<v){const It=Je-v;Je-=It,ft.horizontal+=It}else if(on>an){const It=on-an;Je-=It,ft.horizontal+=It}return{top:`${Math.round($e)}px`,left:`${Math.round(Je)}px`,transformOrigin:eS(ft)}},[s,d,G,C,v]),[U,P]=N.useState(x),D=N.useCallback(()=>{const Me=H.current;if(!Me)return;const Fe=q(Me);Fe.top!==null&&Me.style.setProperty("top",Fe.top),Fe.left!==null&&(Me.style.left=Fe.left),Me.style.transformOrigin=Fe.transformOrigin,P(!0)},[q]);N.useEffect(()=>(R&&window.addEventListener("scroll",D),()=>window.removeEventListener("scroll",D)),[s,R,D]);const Z=()=>{D()},se=()=>{P(!1)};N.useEffect(()=>{x&&D()}),N.useImperativeHandle(a,()=>x?{updatePosition:()=>{D()}}:null,[x,D]),N.useEffect(()=>{if(!x)return;const Me=hb(()=>{D()}),Fe=Mi(Vc(s));return Fe.addEventListener("resize",Me),()=>{Me.clear(),Fe.removeEventListener("resize",Me)}},[s,x,D]);let ue=A;const B={slots:{transition:T,..._},slotProps:{transition:M,paper:E,...w}},[z,W]=Ot("transition",{elementType:Tp,externalForwardedProps:B,ownerState:V,getSlotProps:Me=>({...Me,onEntering:(Fe,ft)=>{Me.onEntering?.(Fe,ft),Z()},onExited:Fe=>{Me.onExited?.(Fe),se()}}),additionalProps:{appear:!0,in:x}});A==="auto"&&!z.muiSupportAuto&&(ue=void 0);const I=y||(s?Jr(Vc(s)).body:void 0),[pe,{slots:ve,slotProps:he,...xe}]=Ot("root",{ref:n,elementType:hI,externalForwardedProps:{...B,...$},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:_.backdrop},slotProps:{backdrop:oO(typeof w.backdrop=="function"?w.backdrop(V):w.backdrop,{invisible:!0})},container:I,open:x},ownerState:V,className:Ue(K.root,g)}),[Ke,Ie]=Ot("paper",{ref:H,className:K.paper,elementType:tS,externalForwardedProps:B,shouldForwardComponentProp:!0,additionalProps:{elevation:b,style:U?void 0:{opacity:0}},ownerState:V});return L.jsx(pe,{...xe,...!kc(pe)&&{slots:ve,slotProps:he,disableScrollLock:R},children:L.jsx(z,{...W,timeout:ue,children:L.jsx(Ke,{...Ie,children:h})})})});function mI(e){return Et("MuiMenu",e)}_t("MuiMenu",["root","paper","list"]);const gI={vertical:"top",horizontal:"right"},yI={vertical:"top",horizontal:"left"},vI=e=>{const{classes:t}=e;return wt({root:["root"],paper:["paper"],list:["list"]},mI,t)},bI=Ee(pI,{shouldForwardProp:e=>Qr(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),SI=Ee(tS,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),xI=Ee(cI,{name:"MuiMenu",slot:"List"})({outline:0}),EI=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiMenu"}),{autoFocus:a=!0,children:s,className:u,disableAutoFocusItem:f=!1,MenuListProps:d={},onClose:h,open:g,PaperProps:y={},PopoverClasses:b,transitionDuration:v="auto",TransitionProps:{onEntering:x,...E}={},variant:_="selectedMenu",slots:w={},slotProps:O={},...T}=r,A=Gk(),M={...r,autoFocus:a,disableAutoFocusItem:f,MenuListProps:d,onEntering:x,PaperProps:y,transitionDuration:v,TransitionProps:E,variant:_},R=vI(M),$=a&&!f&&g,H=N.useRef(null),V=(ue,B)=>{H.current&&H.current.adjustStyleForScrollbar(ue,{direction:A?"rtl":"ltr"}),x&&x(ue,B)},K=ue=>{ue.key==="Tab"&&(ue.preventDefault(),h&&h(ue,"tabKeyDown"))};let G=-1;N.Children.map(s,(ue,B)=>{N.isValidElement(ue)&&(ue.props.disabled||(_==="selectedMenu"&&ue.props.selected||G===-1)&&(G=B))});const C={slots:w,slotProps:{list:d,transition:E,paper:y,...O}},q=cN({elementType:w.root,externalSlotProps:O.root,ownerState:M,className:[R.root,u]}),[U,P]=Ot("paper",{className:R.paper,elementType:SI,externalForwardedProps:C,shouldForwardComponentProp:!0,ownerState:M}),[D,Z]=Ot("list",{className:Ue(R.list,d.className),elementType:xI,shouldForwardComponentProp:!0,externalForwardedProps:C,getSlotProps:ue=>({...ue,onKeyDown:B=>{K(B),ue.onKeyDown?.(B)}}),ownerState:M}),se=typeof C.slotProps.transition=="function"?C.slotProps.transition(M):C.slotProps.transition;return L.jsx(bI,{onClose:h,anchorOrigin:{vertical:"bottom",horizontal:A?"right":"left"},transformOrigin:A?gI:yI,slots:{root:w.root,paper:U,backdrop:w.backdrop,...w.transition&&{transition:w.transition}},slotProps:{root:q,paper:P,backdrop:typeof O.backdrop=="function"?O.backdrop(M):O.backdrop,transition:{...se,onEntering:(...ue)=>{V(...ue),se?.onEntering?.(...ue)}}},open:g,ref:n,transitionDuration:v,ownerState:M,...T,classes:b,children:L.jsx(D,{actions:H,autoFocus:a&&(G===-1||f),autoFocusItem:$,variant:_,...Z,children:s})})});function _I(e){return Et("MuiNativeSelect",e)}const Rp=_t("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),wI=e=>{const{classes:t,variant:n,disabled:r,multiple:a,open:s,error:u}=e,f={select:["select",n,r&&"disabled",a&&"multiple",u&&"error"],icon:["icon",`icon${ye(n)}`,s&&"iconOpen",r&&"disabled"]};return wt(f,_I,t)},nS=Ee("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Rp.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),CI=Ee(nS,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:Qr,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Rp.multiple}`]:t.multiple}]}})({}),rS=Ee("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Rp.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),TI=Ee(rS,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ye(n.variant)}`],n.open&&t.iconOpen]}})({}),AI=N.forwardRef(function(t,n){const{className:r,disabled:a,error:s,IconComponent:u,inputRef:f,variant:d="standard",...h}=t,g={...t,disabled:a,variant:d,error:s},y=wI(g);return L.jsxs(N.Fragment,{children:[L.jsx(CI,{ownerState:g,className:Ue(y.select,r),disabled:a,ref:f||n,...h}),t.multiple?null:L.jsx(TI,{as:u,ownerState:g,className:y.icon})]})});var iS;const kI=Ee("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:Qr})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),RI=Ee("legend",{name:"MuiNotchedOutlined",shouldForwardProp:Qr})(zt(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function OI(e){const{children:t,classes:n,className:r,label:a,notched:s,...u}=e,f=a!=null&&a!=="",d={...e,notched:s,withLabel:f};return L.jsx(kI,{"aria-hidden":!0,className:r,ownerState:d,...u,children:L.jsx(RI,{ownerState:d,children:f?L.jsx("span",{children:a}):iS||(iS=L.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}const NI=e=>{const{classes:t}=e,r=wt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},TN,t);return{...t,...r}},II=Ee(Lc,{shouldForwardProp:e=>Qr(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Bc})(zt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${vi.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${vi.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${vi.focused} .${vi.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(zn()).map(([n])=>({props:{color:n},style:{[`&.${vi.focused} .${vi.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${vi.error} .${vi.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${vi.disabled} .${vi.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),MI=Ee(OI,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(zt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),DI=Ee($c,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:zc})(zt(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),Op=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiOutlinedInput"}),{components:a={},fullWidth:s=!1,inputComponent:u="input",label:f,multiline:d=!1,notched:h,slots:g={},slotProps:y={},type:b="text",...v}=r,x=NI(r),E=Qa(),_=Wa({props:r,muiFormControl:E,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w={...r,color:_.color||"primary",disabled:_.disabled,error:_.error,focused:_.focused,formControl:E,fullWidth:s,hiddenLabel:_.hiddenLabel,multiline:d,size:_.size,type:b},O=g.root??a.Root??II,T=g.input??a.Input??DI,[A,M]=Ot("notchedOutline",{elementType:MI,className:x.notchedOutline,shouldForwardComponentProp:!0,ownerState:w,externalForwardedProps:{slots:g,slotProps:y},additionalProps:{label:f!=null&&f!==""&&_.required?L.jsxs(N.Fragment,{children:[f," ","*"]}):f}});return L.jsx(vp,{slots:{root:O,input:T},slotProps:y,renderSuffix:R=>L.jsx(A,{...M,notched:typeof h<"u"?h:!!(R.startAdornment||R.filled||R.focused)}),fullWidth:s,inputComponent:u,multiline:d,ref:n,type:b,...v,classes:{...x,notchedOutline:null}})});Op.muiName="Input";function oS(e){return Et("MuiSelect",e)}const Il=_t("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var aS;const BI=Ee(nS,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Il.select}`]:t.select},{[`&.${Il.select}`]:t[n.variant]},{[`&.${Il.error}`]:t.error},{[`&.${Il.multiple}`]:t.multiple}]}})({[`&.${Il.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),zI=Ee(rS,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${ye(n.variant)}`],n.open&&t.iconOpen]}})({}),LI=Ee("input",{shouldForwardProp:e=>fb(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function sS(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function $I(e){return e==null||typeof e=="string"&&!e.trim()}const PI=e=>{const{classes:t,variant:n,disabled:r,multiple:a,open:s,error:u}=e,f={select:["select",n,r&&"disabled",a&&"multiple",u&&"error"],icon:["icon",`icon${ye(n)}`,s&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return wt(f,oS,t)},UI=N.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":a,autoFocus:s,autoWidth:u,children:f,className:d,defaultOpen:h,defaultValue:g,disabled:y,displayEmpty:b,error:v=!1,IconComponent:x,inputRef:E,labelId:_,MenuProps:w={},multiple:O,name:T,onBlur:A,onChange:M,onClose:R,onFocus:$,onKeyDown:H,onMouseDown:V,onOpen:K,open:G,readOnly:C,renderValue:q,required:U,SelectDisplayProps:P={},tabIndex:D,type:Z,value:se,variant:ue="standard",...B}=t,[z,W]=mb({controlled:se,default:g,name:"Select"}),[I,pe]=mb({controlled:G,default:h,name:"Select"}),ve=N.useRef(null),he=N.useRef(null),[xe,Ke]=N.useState(null),{current:Ie}=N.useRef(G!=null),[Me,Fe]=N.useState(),ft=er(n,E),Tn=N.useCallback(Te=>{he.current=Te,Te&&Ke(Te)},[]),$e=xe?.parentNode;N.useImperativeHandle(ft,()=>({focus:()=>{he.current.focus()},node:ve.current,value:z}),[z]);const Je=xe!==null&&I;N.useEffect(()=>{if(!Je||!$e||u||typeof ResizeObserver>"u")return;const Te=new ResizeObserver(()=>{Fe($e.clientWidth)});return Te.observe($e),()=>{Te.disconnect()}},[Je,$e,u]),N.useEffect(()=>{h&&I&&xe&&!Ie&&(Fe(u?null:$e.clientWidth),he.current.focus())},[xe,u]),N.useEffect(()=>{s&&he.current.focus()},[s]),N.useEffect(()=>{if(!_)return;const Te=Jr(he.current).getElementById(_);if(Te){const rt=()=>{getSelection().isCollapsed&&he.current.focus()};return Te.addEventListener("click",rt),()=>{Te.removeEventListener("click",rt)}}},[_]);const Jt=(Te,rt)=>{Te?K&&K(rt):R&&R(rt),Ie||(Fe(u?null:$e.clientWidth),pe(Te))},on=Te=>{V?.(Te),Te.button===0&&(Te.preventDefault(),he.current.focus(),Jt(!0,Te))},Ht=Te=>{Jt(!1,Te)},Tt=N.Children.toArray(f),an=Te=>{const rt=Tt.find(Mn=>Mn.props.value===Te.target.value);rt!==void 0&&(W(rt.props.value),M&&M(Te,rt))},It=Te=>rt=>{let Mn;if(rt.currentTarget.hasAttribute("tabindex")){if(O){Mn=Array.isArray(z)?z.slice():[];const ai=z.indexOf(Te.props.value);ai===-1?Mn.push(Te.props.value):Mn.splice(ai,1)}else Mn=Te.props.value;if(Te.props.onClick&&Te.props.onClick(rt),z!==Mn&&(W(Mn),M)){const ai=rt.nativeEvent||rt,Sa=new ai.constructor(ai.type,ai);Object.defineProperty(Sa,"target",{writable:!0,value:{value:Mn,name:T}}),M(Sa,Te)}O||Jt(!1,rt)}},Re=Te=>{C||([" ","ArrowUp","ArrowDown","Enter"].includes(Te.key)&&(Te.preventDefault(),Jt(!0,Te)),H?.(Te))},Cr=Te=>{!Je&&A&&(Object.defineProperty(Te,"target",{writable:!0,value:{value:z,name:T}}),A(Te))};delete B["aria-invalid"];let tt,oi;const te=[];let ce=!1;(Dc({value:z})||b)&&(q?tt=q(z):ce=!0);const we=Tt.map(Te=>{if(!N.isValidElement(Te))return null;let rt;if(O){if(!Array.isArray(z))throw new Error(Ni(2));rt=z.some(Mn=>sS(Mn,Te.props.value)),rt&&ce&&te.push(Te.props.children)}else rt=sS(z,Te.props.value),rt&&ce&&(oi=Te.props.children);return N.cloneElement(Te,{"aria-selected":rt?"true":"false",onClick:It(Te),onKeyUp:Mn=>{Mn.key===" "&&Mn.preventDefault(),Te.props.onKeyUp&&Te.props.onKeyUp(Mn)},role:"option",selected:rt,value:void 0,"data-value":Te.props.value})});ce&&(O?te.length===0?tt=null:tt=te.reduce((Te,rt,Mn)=>(Te.push(rt),Mn<te.length-1&&Te.push(", "),Te),[]):tt=oi);let ze=Me;!u&&Ie&&xe&&(ze=$e.clientWidth);let We;typeof D<"u"?We=D:We=y?null:0;const et=P.id||(T?`mui-component-select-${T}`:void 0),In={...t,variant:ue,value:z,open:Je,error:v},hn=PI(In),sn={...w.PaperProps,...typeof w.slotProps?.paper=="function"?w.slotProps.paper(In):w.slotProps?.paper},Qn={...w.MenuListProps,...typeof w.slotProps?.list=="function"?w.slotProps.list(In):w.slotProps?.list},At=El();return L.jsxs(N.Fragment,{children:[L.jsx(BI,{as:"div",ref:Tn,tabIndex:We,role:"combobox","aria-controls":Je?At:void 0,"aria-disabled":y?"true":void 0,"aria-expanded":Je?"true":"false","aria-haspopup":"listbox","aria-label":a,"aria-labelledby":[_,et].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":U?"true":void 0,"aria-invalid":v?"true":void 0,onKeyDown:Re,onMouseDown:y||C?null:on,onBlur:Cr,onFocus:$,...P,ownerState:In,className:Ue(P.className,hn.select,d),id:et,children:$I(tt)?aS||(aS=L.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):tt}),L.jsx(LI,{"aria-invalid":v,value:Array.isArray(z)?z.join(","):z,name:T,ref:ve,"aria-hidden":!0,onChange:an,tabIndex:-1,disabled:y,className:hn.nativeInput,autoFocus:s,required:U,...B,ownerState:In}),L.jsx(zI,{as:x,className:hn.icon,ownerState:In}),L.jsx(EI,{id:`menu-${T||""}`,anchorEl:$e,open:Je,onClose:Ht,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...w,slotProps:{...w.slotProps,list:{"aria-labelledby":_,role:"listbox","aria-multiselectable":O?"true":void 0,disableListWrap:!0,id:At,...Qn},paper:{...sn,style:{minWidth:ze,...sn!=null?sn.style:null}}},children:we})]})}),jI=e=>{const{classes:t}=e,r=wt({root:["root"]},oS,t);return{...t,...r}},Np={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Qr(e)&&e!=="variant"},HI=Ee(Ap,Np)(""),VI=Ee(Op,Np)(""),FI=Ee(_p,Np)(""),lS=N.forwardRef(function(t,n){const r=Ct({name:"MuiSelect",props:t}),{autoWidth:a=!1,children:s,classes:u={},className:f,defaultOpen:d=!1,displayEmpty:h=!1,IconComponent:g=kN,id:y,input:b,inputProps:v,label:x,labelId:E,MenuProps:_,multiple:w=!1,native:O=!1,onClose:T,onOpen:A,open:M,renderValue:R,SelectDisplayProps:$,variant:H="outlined",...V}=r,K=O?AI:UI,G=Qa(),C=Wa({props:r,muiFormControl:G,states:["variant","error"]}),q=C.variant||H,U={...r,variant:q,classes:u},P=jI(U),{root:D,...Z}=P,se=b||{standard:L.jsx(HI,{ownerState:U}),outlined:L.jsx(VI,{label:x,ownerState:U}),filled:L.jsx(FI,{ownerState:U})}[q],ue=er(n,Tl(se));return L.jsx(N.Fragment,{children:N.cloneElement(se,{inputComponent:K,inputProps:{children:s,error:C.error,IconComponent:g,variant:q,type:void 0,multiple:w,...O?{id:y}:{autoWidth:a,defaultOpen:d,displayEmpty:h,labelId:E,MenuProps:_,onClose:T,onOpen:A,open:M,renderValue:R,SelectDisplayProps:{id:y,...$}},...v,classes:v?Bn(Z,v.classes):Z,...b?b.props.inputProps:{}},...(w&&O||h)&&q==="outlined"?{notched:!0}:{},ref:ue,className:Ue(se.props.className,f,P.root),...!b&&{variant:q},...V})})});lS.muiName="Select";const Fc=yR({createStyledComponent:Ee("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>Ct({props:e,name:"MuiStack"})});function GI(e){return Et("MuiTextField",e)}_t("MuiTextField",["root"]);const qI={standard:Ap,filled:_p,outlined:Op},YI=e=>{const{classes:t}=e;return wt({root:["root"]},GI,t)},XI=Ee(B3,{name:"MuiTextField",slot:"Root"})({}),Ip=N.forwardRef(function(t,n){const r=Ct({props:t,name:"MuiTextField"}),{autoComplete:a,autoFocus:s=!1,children:u,className:f,color:d="primary",defaultValue:h,disabled:g=!1,error:y=!1,FormHelperTextProps:b,fullWidth:v=!1,helperText:x,id:E,InputLabelProps:_,inputProps:w,InputProps:O,inputRef:T,label:A,maxRows:M,minRows:R,multiline:$=!1,name:H,onBlur:V,onChange:K,onFocus:G,placeholder:C,required:q=!1,rows:U,select:P=!1,SelectProps:D,slots:Z={},slotProps:se={},type:ue,value:B,variant:z="outlined",...W}=r,I={...r,autoFocus:s,color:d,disabled:g,error:y,fullWidth:v,multiline:$,required:q,select:P,variant:z},pe=YI(I),ve=El(E),he=x&&ve?`${ve}-helper-text`:void 0,xe=A&&ve?`${ve}-label`:void 0,Ke=qI[z],Ie={slots:Z,slotProps:{input:O,inputLabel:_,htmlInput:w,formHelperText:b,select:D,...se}},Me={},Fe=Ie.slotProps.inputLabel;z==="outlined"&&(Fe&&typeof Fe.shrink<"u"&&(Me.notched=Fe.shrink),Me.label=A),P&&((!D||!D.native)&&(Me.id=void 0),Me["aria-describedby"]=void 0);const[ft,Tn]=Ot("root",{elementType:XI,shouldForwardComponentProp:!0,externalForwardedProps:{...Ie,...W},ownerState:I,className:Ue(pe.root,f),ref:n,additionalProps:{disabled:g,error:y,fullWidth:v,required:q,color:d,variant:z}}),[$e,Je]=Ot("input",{elementType:Ke,externalForwardedProps:Ie,additionalProps:Me,ownerState:I}),[Jt,on]=Ot("inputLabel",{elementType:Q3,externalForwardedProps:Ie,ownerState:I}),[Ht,Tt]=Ot("htmlInput",{elementType:"input",externalForwardedProps:Ie,ownerState:I}),[an,It]=Ot("formHelperText",{elementType:P3,externalForwardedProps:Ie,ownerState:I}),[Re,Cr]=Ot("select",{elementType:lS,externalForwardedProps:Ie,ownerState:I}),tt=L.jsx($e,{"aria-describedby":he,autoComplete:a,autoFocus:s,defaultValue:h,fullWidth:v,multiline:$,name:H,rows:U,maxRows:M,minRows:R,type:ue,value:B,id:ve,inputRef:T,onBlur:V,onChange:K,onFocus:G,placeholder:C,inputProps:Tt,slots:{input:Z.htmlInput?Ht:void 0},...Je});return L.jsxs(ft,{...Tn,children:[A!=null&&A!==""&&L.jsx(Jt,{htmlFor:ve,id:xe,...on,children:A}),P?L.jsx(Re,{"aria-describedby":he,id:ve,labelId:xe,value:B,input:tt,...Cr,children:u}):tt,x&&L.jsx(an,{id:he,...It,children:x})]})}),ZI=Lv({themeId:Kr});var dt;(function(e){e.assertEqual=a=>{};function t(a){}e.assertIs=t;function n(a){throw new Error}e.assertNever=n,e.arrayToEnum=a=>{const s={};for(const u of a)s[u]=u;return s},e.getValidEnumValues=a=>{const s=e.objectKeys(a).filter(f=>typeof a[a[f]]!="number"),u={};for(const f of s)u[f]=a[f];return e.objectValues(u)},e.objectValues=a=>e.objectKeys(a).map(function(s){return a[s]}),e.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const s=[];for(const u in a)Object.prototype.hasOwnProperty.call(a,u)&&s.push(u);return s},e.find=(a,s)=>{for(const u of a)if(s(u))return u},e.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,s=" | "){return a.map(u=>typeof u=="string"?`'${u}'`:u).join(s)}e.joinValues=r,e.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(dt||(dt={}));var uS;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(uS||(uS={}));const _e=dt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fo=e=>{switch(typeof e){case"undefined":return _e.undefined;case"string":return _e.string;case"number":return Number.isNaN(e)?_e.nan:_e.number;case"boolean":return _e.boolean;case"function":return _e.function;case"bigint":return _e.bigint;case"symbol":return _e.symbol;case"object":return Array.isArray(e)?_e.array:e===null?_e.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?_e.promise:typeof Map<"u"&&e instanceof Map?_e.map:typeof Set<"u"&&e instanceof Set?_e.set:typeof Date<"u"&&e instanceof Date?_e.date:_e.object;default:return _e.unknown}},me=dt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Bi extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(s){return s.message},r={_errors:[]},a=s=>{for(const u of s.issues)if(u.code==="invalid_union")u.unionErrors.map(a);else if(u.code==="invalid_return_type")a(u.returnTypeError);else if(u.code==="invalid_arguments")a(u.argumentsError);else if(u.path.length===0)r._errors.push(n(u));else{let f=r,d=0;for(;d<u.path.length;){const h=u.path[d];d===u.path.length-1?(f[h]=f[h]||{_errors:[]},f[h]._errors.push(n(u))):f[h]=f[h]||{_errors:[]},f=f[h],d++}}};return a(this),r}static assert(t){if(!(t instanceof Bi))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,dt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const a of this.issues)if(a.path.length>0){const s=a.path[0];n[s]=n[s]||[],n[s].push(t(a))}else r.push(t(a));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Bi.create=e=>new Bi(e);const Mp=(e,t)=>{let n;switch(e.code){case me.invalid_type:e.received===_e.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,dt.jsonStringifyReplacer)}`;break;case me.unrecognized_keys:n=`Unrecognized key(s) in object: ${dt.joinValues(e.keys,", ")}`;break;case me.invalid_union:n="Invalid input";break;case me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${dt.joinValues(e.options)}`;break;case me.invalid_enum_value:n=`Invalid enum value. Expected ${dt.joinValues(e.options)}, received '${e.received}'`;break;case me.invalid_arguments:n="Invalid function arguments";break;case me.invalid_return_type:n="Invalid function return type";break;case me.invalid_date:n="Invalid date";break;case me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:dt.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case me.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case me.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case me.custom:n="Invalid input";break;case me.invalid_intersection_types:n="Intersection results could not be merged";break;case me.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case me.not_finite:n="Number must be finite";break;default:n=t.defaultError,dt.assertNever(e)}return{message:n}};let KI=Mp;function WI(){return KI}const QI=e=>{const{data:t,path:n,errorMaps:r,issueData:a}=e,s=[...n,...a.path||[]],u={...a,path:s};if(a.message!==void 0)return{...a,path:s,message:a.message};let f="";const d=r.filter(h=>!!h).slice().reverse();for(const h of d)f=h(u,{data:t,defaultError:f}).message;return{...a,path:s,message:f}};function Se(e,t){const n=WI(),r=QI({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Mp?void 0:Mp].filter(a=>!!a)});e.common.issues.push(r)}class tr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const a of n){if(a.status==="aborted")return je;a.status==="dirty"&&t.dirty(),r.push(a.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const a of n){const s=await a.key,u=await a.value;r.push({key:s,value:u})}return tr.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const a of n){const{key:s,value:u}=a;if(s.status==="aborted"||u.status==="aborted")return je;s.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),s.value!=="__proto__"&&(typeof u.value<"u"||a.alwaysSet)&&(r[s.value]=u.value)}return{status:t.value,value:r}}}const je=Object.freeze({status:"aborted"}),Ml=e=>({status:"dirty",value:e}),zr=e=>({status:"valid",value:e}),cS=e=>e.status==="aborted",fS=e=>e.status==="dirty",es=e=>e.status==="valid",Gc=e=>typeof Promise<"u"&&e instanceof Promise;var ke;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(ke||(ke={}));class bi{constructor(t,n,r,a){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const dS=(e,t)=>{if(es(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Bi(e.common.issues);return this._error=n,this._error}}};function Xe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:a}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(u,f)=>{const{message:d}=e;return u.code==="invalid_enum_value"?{message:d??f.defaultError}:typeof f.data>"u"?{message:d??r??f.defaultError}:u.code!=="invalid_type"?{message:f.defaultError}:{message:d??n??f.defaultError}},description:a}}class at{get description(){return this._def.description}_getType(t){return fo(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:fo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new tr,ctx:{common:t.parent.common,data:t.data,parsedType:fo(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Gc(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){const r={common:{issues:[],async:n?.async??!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fo(t)},a=this._parseSync({data:t,path:r.path,parent:r});return dS(r,a)}"~validate"(t){const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fo(t)};if(!this["~standard"].async)try{const r=this._parseSync({data:t,path:[],parent:n});return es(r)?{value:r.value}:{issues:n.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(r=>es(r)?{value:r.value}:{issues:n.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fo(t)},a=this._parse({data:t,path:r.path,parent:r}),s=await(Gc(a)?a:Promise.resolve(a));return dS(r,s)}refine(t,n){const r=a=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(a):n;return this._refinement((a,s)=>{const u=t(a),f=()=>s.addIssue({code:me.custom,...r(a)});return typeof Promise<"u"&&u instanceof Promise?u.then(d=>d?!0:(f(),!1)):u?!0:(f(),!1)})}refinement(t,n){return this._refinement((r,a)=>t(r)?!0:(a.addIssue(typeof n=="function"?n(r,a):n),!1))}_refinement(t){return new oa({schema:this,typeName:He.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return $i.create(this,this._def)}nullable(){return aa.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Si.create(this)}promise(){return Qc.create(this,this._def)}or(t){return Yc.create([this,t],this._def)}and(t){return Xc.create(this,t,this._def)}transform(t){return new oa({...Xe(this._def),schema:this,typeName:He.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Jc({...Xe(this._def),innerType:this,defaultValue:n,typeName:He.ZodDefault})}brand(){return new xS({typeName:He.ZodBranded,type:this,...Xe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new ef({...Xe(this._def),innerType:this,catchValue:n,typeName:He.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Hp.create(this,t)}readonly(){return tf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const JI=/^c[^\s-]{8,}$/i,eM=/^[0-9a-z]+$/,tM=/^[0-9A-HJKMNP-TV-Z]{26}$/i,nM=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,rM=/^[a-z0-9_-]{21}$/i,iM=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,oM=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,aM=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,sM="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Dp;const lM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,uM=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,cM=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,fM=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dM=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,hM=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,hS="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",pM=new RegExp(`^${hS}$`);function pS(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function mM(e){return new RegExp(`^${pS(e)}$`)}function gM(e){let t=`${hS}T${pS(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function yM(e,t){return!!((t==="v4"||!t)&&lM.test(e)||(t==="v6"||!t)&&cM.test(e))}function vM(e,t){if(!iM.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function bM(e,t){return!!((t==="v4"||!t)&&uM.test(e)||(t==="v6"||!t)&&fM.test(e))}class zi extends at{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==_e.string){const s=this._getOrReturnCtx(t);return Se(s,{code:me.invalid_type,expected:_e.string,received:s.parsedType}),je}const r=new tr;let a;for(const s of this._def.checks)if(s.kind==="min")t.data.length<s.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:me.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")t.data.length>s.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:me.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const u=t.data.length>s.value,f=t.data.length<s.value;(u||f)&&(a=this._getOrReturnCtx(t,a),u?Se(a,{code:me.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):f&&Se(a,{code:me.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")aM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"email",code:me.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")Dp||(Dp=new RegExp(sM,"u")),Dp.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"emoji",code:me.invalid_string,message:s.message}),r.dirty());else if(s.kind==="uuid")nM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"uuid",code:me.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")rM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"nanoid",code:me.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")JI.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"cuid",code:me.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")eM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"cuid2",code:me.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")tM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"ulid",code:me.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),Se(a,{validation:"url",code:me.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"regex",code:me.invalid_string,message:s.message}),r.dirty())):s.kind==="trim"?t.data=t.data.trim():s.kind==="includes"?t.data.includes(s.value,s.position)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?t.data=t.data.toLowerCase():s.kind==="toUpperCase"?t.data=t.data.toUpperCase():s.kind==="startsWith"?t.data.startsWith(s.value)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?t.data.endsWith(s.value)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?gM(s).test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?pM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?mM(s).test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{code:me.invalid_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?oM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"duration",code:me.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?yM(t.data,s.version)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"ip",code:me.invalid_string,message:s.message}),r.dirty()):s.kind==="jwt"?vM(t.data,s.alg)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"jwt",code:me.invalid_string,message:s.message}),r.dirty()):s.kind==="cidr"?bM(t.data,s.version)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"cidr",code:me.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?dM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"base64",code:me.invalid_string,message:s.message}),r.dirty()):s.kind==="base64url"?hM.test(t.data)||(a=this._getOrReturnCtx(t,a),Se(a,{validation:"base64url",code:me.invalid_string,message:s.message}),r.dirty()):dt.assertNever(s);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(a=>t.test(a),{validation:n,code:me.invalid_string,...ke.errToObj(r)})}_addCheck(t){return new zi({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...ke.errToObj(t)})}url(t){return this._addCheck({kind:"url",...ke.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...ke.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...ke.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...ke.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...ke.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...ke.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...ke.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...ke.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...ke.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...ke.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...ke.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...ke.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...ke.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...ke.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...ke.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...ke.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...ke.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...ke.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...ke.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...ke.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...ke.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...ke.errToObj(n)})}nonempty(t){return this.min(1,ke.errToObj(t))}trim(){return new zi({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new zi({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new zi({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}zi.create=e=>new zi({checks:[],typeName:He.ZodString,coerce:e?.coerce??!1,...Xe(e)});function SM(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,a=n>r?n:r,s=Number.parseInt(e.toFixed(a).replace(".","")),u=Number.parseInt(t.toFixed(a).replace(".",""));return s%u/10**a}class ts extends at{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==_e.number){const s=this._getOrReturnCtx(t);return Se(s,{code:me.invalid_type,expected:_e.number,received:s.parsedType}),je}let r;const a=new tr;for(const s of this._def.checks)s.kind==="int"?dt.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Se(r,{code:me.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty()):s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?SM(t.data,s.value)!==0&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Se(r,{code:me.not_finite,message:s.message}),a.dirty()):dt.assertNever(s);return{status:a.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,a){return new ts({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(a)}]})}_addCheck(t){return new ts({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:ke.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:ke.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&dt.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}ts.create=e=>new ts({checks:[],typeName:He.ZodNumber,coerce:e?.coerce||!1,...Xe(e)});class Dl extends at{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==_e.bigint)return this._getInvalidInput(t);let r;const a=new tr;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?t.data<s.value:t.data<=s.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?t.data>s.value:t.data>=s.value)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="multipleOf"?t.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Se(r,{code:me.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):dt.assertNever(s);return{status:a.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Se(n,{code:me.invalid_type,expected:_e.bigint,received:n.parsedType}),je}gte(t,n){return this.setLimit("min",t,!0,ke.toString(n))}gt(t,n){return this.setLimit("min",t,!1,ke.toString(n))}lte(t,n){return this.setLimit("max",t,!0,ke.toString(n))}lt(t,n){return this.setLimit("max",t,!1,ke.toString(n))}setLimit(t,n,r,a){return new Dl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:ke.toString(a)}]})}_addCheck(t){return new Dl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:ke.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Dl.create=e=>new Dl({checks:[],typeName:He.ZodBigInt,coerce:e?.coerce??!1,...Xe(e)});class Bp extends at{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==_e.boolean){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:_e.boolean,received:r.parsedType}),je}return zr(t.data)}}Bp.create=e=>new Bp({typeName:He.ZodBoolean,coerce:e?.coerce||!1,...Xe(e)});class qc extends at{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==_e.date){const s=this._getOrReturnCtx(t);return Se(s,{code:me.invalid_type,expected:_e.date,received:s.parsedType}),je}if(Number.isNaN(t.data.getTime())){const s=this._getOrReturnCtx(t);return Se(s,{code:me.invalid_date}),je}const r=new tr;let a;for(const s of this._def.checks)s.kind==="min"?t.data.getTime()<s.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:me.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?t.data.getTime()>s.value&&(a=this._getOrReturnCtx(t,a),Se(a,{code:me.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):dt.assertNever(s);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new qc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:ke.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:ke.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}qc.create=e=>new qc({checks:[],coerce:e?.coerce||!1,typeName:He.ZodDate,...Xe(e)});class mS extends at{_parse(t){if(this._getType(t)!==_e.symbol){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:_e.symbol,received:r.parsedType}),je}return zr(t.data)}}mS.create=e=>new mS({typeName:He.ZodSymbol,...Xe(e)});class zp extends at{_parse(t){if(this._getType(t)!==_e.undefined){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:_e.undefined,received:r.parsedType}),je}return zr(t.data)}}zp.create=e=>new zp({typeName:He.ZodUndefined,...Xe(e)});class Lp extends at{_parse(t){if(this._getType(t)!==_e.null){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:_e.null,received:r.parsedType}),je}return zr(t.data)}}Lp.create=e=>new Lp({typeName:He.ZodNull,...Xe(e)});class $p extends at{constructor(){super(...arguments),this._any=!0}_parse(t){return zr(t.data)}}$p.create=e=>new $p({typeName:He.ZodAny,...Xe(e)});class gS extends at{constructor(){super(...arguments),this._unknown=!0}_parse(t){return zr(t.data)}}gS.create=e=>new gS({typeName:He.ZodUnknown,...Xe(e)});class ho extends at{_parse(t){const n=this._getOrReturnCtx(t);return Se(n,{code:me.invalid_type,expected:_e.never,received:n.parsedType}),je}}ho.create=e=>new ho({typeName:He.ZodNever,...Xe(e)});class yS extends at{_parse(t){if(this._getType(t)!==_e.undefined){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:_e.void,received:r.parsedType}),je}return zr(t.data)}}yS.create=e=>new yS({typeName:He.ZodVoid,...Xe(e)});class Si extends at{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),a=this._def;if(n.parsedType!==_e.array)return Se(n,{code:me.invalid_type,expected:_e.array,received:n.parsedType}),je;if(a.exactLength!==null){const u=n.data.length>a.exactLength.value,f=n.data.length<a.exactLength.value;(u||f)&&(Se(n,{code:u?me.too_big:me.too_small,minimum:f?a.exactLength.value:void 0,maximum:u?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&n.data.length<a.minLength.value&&(Se(n,{code:me.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&n.data.length>a.maxLength.value&&(Se(n,{code:me.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((u,f)=>a.type._parseAsync(new bi(n,u,n.path,f)))).then(u=>tr.mergeArray(r,u));const s=[...n.data].map((u,f)=>a.type._parseSync(new bi(n,u,n.path,f)));return tr.mergeArray(r,s)}get element(){return this._def.type}min(t,n){return new Si({...this._def,minLength:{value:t,message:ke.toString(n)}})}max(t,n){return new Si({...this._def,maxLength:{value:t,message:ke.toString(n)}})}length(t,n){return new Si({...this._def,exactLength:{value:t,message:ke.toString(n)}})}nonempty(t){return this.min(1,t)}}Si.create=(e,t)=>new Si({type:e,minLength:null,maxLength:null,exactLength:null,typeName:He.ZodArray,...Xe(t)});function ns(e){if(e instanceof _n){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=$i.create(ns(r))}return new _n({...e._def,shape:()=>t})}else return e instanceof Si?new Si({...e._def,type:ns(e.element)}):e instanceof $i?$i.create(ns(e.unwrap())):e instanceof aa?aa.create(ns(e.unwrap())):e instanceof ra?ra.create(e.items.map(t=>ns(t))):e}class _n extends at{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=dt.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==_e.object){const h=this._getOrReturnCtx(t);return Se(h,{code:me.invalid_type,expected:_e.object,received:h.parsedType}),je}const{status:r,ctx:a}=this._processInputParams(t),{shape:s,keys:u}=this._getCached(),f=[];if(!(this._def.catchall instanceof ho&&this._def.unknownKeys==="strip"))for(const h in a.data)u.includes(h)||f.push(h);const d=[];for(const h of u){const g=s[h],y=a.data[h];d.push({key:{status:"valid",value:h},value:g._parse(new bi(a,y,a.path,h)),alwaysSet:h in a.data})}if(this._def.catchall instanceof ho){const h=this._def.unknownKeys;if(h==="passthrough")for(const g of f)d.push({key:{status:"valid",value:g},value:{status:"valid",value:a.data[g]}});else if(h==="strict")f.length>0&&(Se(a,{code:me.unrecognized_keys,keys:f}),r.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const g of f){const y=a.data[g];d.push({key:{status:"valid",value:g},value:h._parse(new bi(a,y,a.path,g)),alwaysSet:g in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const h=[];for(const g of d){const y=await g.key,b=await g.value;h.push({key:y,value:b,alwaysSet:g.alwaysSet})}return h}).then(h=>tr.mergeObjectSync(r,h)):tr.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(t){return ke.errToObj,new _n({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{const a=this._def.errorMap?.(n,r).message??r.defaultError;return n.code==="unrecognized_keys"?{message:ke.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new _n({...this._def,unknownKeys:"strip"})}passthrough(){return new _n({...this._def,unknownKeys:"passthrough"})}extend(t){return new _n({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new _n({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:He.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new _n({...this._def,catchall:t})}pick(t){const n={};for(const r of dt.objectKeys(t))t[r]&&this.shape[r]&&(n[r]=this.shape[r]);return new _n({...this._def,shape:()=>n})}omit(t){const n={};for(const r of dt.objectKeys(this.shape))t[r]||(n[r]=this.shape[r]);return new _n({...this._def,shape:()=>n})}deepPartial(){return ns(this)}partial(t){const n={};for(const r of dt.objectKeys(this.shape)){const a=this.shape[r];t&&!t[r]?n[r]=a:n[r]=a.optional()}return new _n({...this._def,shape:()=>n})}required(t){const n={};for(const r of dt.objectKeys(this.shape))if(t&&!t[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof $i;)s=s._def.innerType;n[r]=s}return new _n({...this._def,shape:()=>n})}keyof(){return bS(dt.objectKeys(this.shape))}}_n.create=(e,t)=>new _n({shape:()=>e,unknownKeys:"strip",catchall:ho.create(),typeName:He.ZodObject,...Xe(t)}),_n.strictCreate=(e,t)=>new _n({shape:()=>e,unknownKeys:"strict",catchall:ho.create(),typeName:He.ZodObject,...Xe(t)}),_n.lazycreate=(e,t)=>new _n({shape:e,unknownKeys:"strip",catchall:ho.create(),typeName:He.ZodObject,...Xe(t)});class Yc extends at{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function a(s){for(const f of s)if(f.result.status==="valid")return f.result;for(const f of s)if(f.result.status==="dirty")return n.common.issues.push(...f.ctx.common.issues),f.result;const u=s.map(f=>new Bi(f.ctx.common.issues));return Se(n,{code:me.invalid_union,unionErrors:u}),je}if(n.common.async)return Promise.all(r.map(async s=>{const u={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:u}),ctx:u}})).then(a);{let s;const u=[];for(const d of r){const h={...n,common:{...n.common,issues:[]},parent:null},g=d._parseSync({data:n.data,path:n.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!s&&(s={result:g,ctx:h}),h.common.issues.length&&u.push(h.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const f=u.map(d=>new Bi(d));return Se(n,{code:me.invalid_union,unionErrors:f}),je}}get options(){return this._def.options}}Yc.create=(e,t)=>new Yc({options:e,typeName:He.ZodUnion,...Xe(t)});const Li=e=>e instanceof jp?Li(e.schema):e instanceof oa?Li(e.innerType()):e instanceof Kc?[e.value]:e instanceof ia?e.options:e instanceof Wc?dt.objectValues(e.enum):e instanceof Jc?Li(e._def.innerType):e instanceof zp?[void 0]:e instanceof Lp?[null]:e instanceof $i?[void 0,...Li(e.unwrap())]:e instanceof aa?[null,...Li(e.unwrap())]:e instanceof xS||e instanceof tf?Li(e.unwrap()):e instanceof ef?Li(e._def.innerType):[];class Pp extends at{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==_e.object)return Se(n,{code:me.invalid_type,expected:_e.object,received:n.parsedType}),je;const r=this.discriminator,a=n.data[r],s=this.optionsMap.get(a);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(Se(n,{code:me.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),je)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const a=new Map;for(const s of n){const u=Li(s.shape[t]);if(!u.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const f of u){if(a.has(f))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(f)}`);a.set(f,s)}}return new Pp({typeName:He.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:a,...Xe(r)})}}function Up(e,t){const n=fo(e),r=fo(t);if(e===t)return{valid:!0,data:e};if(n===_e.object&&r===_e.object){const a=dt.objectKeys(t),s=dt.objectKeys(e).filter(f=>a.indexOf(f)!==-1),u={...e,...t};for(const f of s){const d=Up(e[f],t[f]);if(!d.valid)return{valid:!1};u[f]=d.data}return{valid:!0,data:u}}else if(n===_e.array&&r===_e.array){if(e.length!==t.length)return{valid:!1};const a=[];for(let s=0;s<e.length;s++){const u=e[s],f=t[s],d=Up(u,f);if(!d.valid)return{valid:!1};a.push(d.data)}return{valid:!0,data:a}}else return n===_e.date&&r===_e.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Xc extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=(s,u)=>{if(cS(s)||cS(u))return je;const f=Up(s.value,u.value);return f.valid?((fS(s)||fS(u))&&n.dirty(),{status:n.value,value:f.data}):(Se(r,{code:me.invalid_intersection_types}),je)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,u])=>a(s,u)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Xc.create=(e,t,n)=>new Xc({left:e,right:t,typeName:He.ZodIntersection,...Xe(n)});class ra extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.array)return Se(r,{code:me.invalid_type,expected:_e.array,received:r.parsedType}),je;if(r.data.length<this._def.items.length)return Se(r,{code:me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),je;!this._def.rest&&r.data.length>this._def.items.length&&(Se(r,{code:me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((u,f)=>{const d=this._def.items[f]||this._def.rest;return d?d._parse(new bi(r,u,r.path,f)):null}).filter(u=>!!u);return r.common.async?Promise.all(s).then(u=>tr.mergeArray(n,u)):tr.mergeArray(n,s)}get items(){return this._def.items}rest(t){return new ra({...this._def,rest:t})}}ra.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ra({items:e,typeName:He.ZodTuple,rest:null,...Xe(t)})};class Zc extends at{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.object)return Se(r,{code:me.invalid_type,expected:_e.object,received:r.parsedType}),je;const a=[],s=this._def.keyType,u=this._def.valueType;for(const f in r.data)a.push({key:s._parse(new bi(r,f,r.path,f)),value:u._parse(new bi(r,r.data[f],r.path,f)),alwaysSet:f in r.data});return r.common.async?tr.mergeObjectAsync(n,a):tr.mergeObjectSync(n,a)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof at?new Zc({keyType:t,valueType:n,typeName:He.ZodRecord,...Xe(r)}):new Zc({keyType:zi.create(),valueType:t,typeName:He.ZodRecord,...Xe(n)})}}class vS extends at{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.map)return Se(r,{code:me.invalid_type,expected:_e.map,received:r.parsedType}),je;const a=this._def.keyType,s=this._def.valueType,u=[...r.data.entries()].map(([f,d],h)=>({key:a._parse(new bi(r,f,r.path,[h,"key"])),value:s._parse(new bi(r,d,r.path,[h,"value"]))}));if(r.common.async){const f=new Map;return Promise.resolve().then(async()=>{for(const d of u){const h=await d.key,g=await d.value;if(h.status==="aborted"||g.status==="aborted")return je;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),f.set(h.value,g.value)}return{status:n.value,value:f}})}else{const f=new Map;for(const d of u){const h=d.key,g=d.value;if(h.status==="aborted"||g.status==="aborted")return je;(h.status==="dirty"||g.status==="dirty")&&n.dirty(),f.set(h.value,g.value)}return{status:n.value,value:f}}}}vS.create=(e,t,n)=>new vS({valueType:t,keyType:e,typeName:He.ZodMap,...Xe(n)});class Bl extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==_e.set)return Se(r,{code:me.invalid_type,expected:_e.set,received:r.parsedType}),je;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(Se(r,{code:me.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),n.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(Se(r,{code:me.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),n.dirty());const s=this._def.valueType;function u(d){const h=new Set;for(const g of d){if(g.status==="aborted")return je;g.status==="dirty"&&n.dirty(),h.add(g.value)}return{status:n.value,value:h}}const f=[...r.data.values()].map((d,h)=>s._parse(new bi(r,d,r.path,h)));return r.common.async?Promise.all(f).then(d=>u(d)):u(f)}min(t,n){return new Bl({...this._def,minSize:{value:t,message:ke.toString(n)}})}max(t,n){return new Bl({...this._def,maxSize:{value:t,message:ke.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Bl.create=(e,t)=>new Bl({valueType:e,minSize:null,maxSize:null,typeName:He.ZodSet,...Xe(t)});class jp extends at{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}jp.create=(e,t)=>new jp({getter:e,typeName:He.ZodLazy,...Xe(t)});class Kc extends at{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Se(n,{received:n.data,code:me.invalid_literal,expected:this._def.value}),je}return{status:"valid",value:t.data}}get value(){return this._def.value}}Kc.create=(e,t)=>new Kc({value:e,typeName:He.ZodLiteral,...Xe(t)});function bS(e,t){return new ia({values:e,typeName:He.ZodEnum,...Xe(t)})}class ia extends at{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Se(n,{expected:dt.joinValues(r),received:n.parsedType,code:me.invalid_type}),je}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Se(n,{received:n.data,code:me.invalid_enum_value,options:r}),je}return zr(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return ia.create(t,{...this._def,...n})}exclude(t,n=this._def){return ia.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}ia.create=bS;class Wc extends at{_parse(t){const n=dt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==_e.string&&r.parsedType!==_e.number){const a=dt.objectValues(n);return Se(r,{expected:dt.joinValues(a),received:r.parsedType,code:me.invalid_type}),je}if(this._cache||(this._cache=new Set(dt.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=dt.objectValues(n);return Se(r,{received:r.data,code:me.invalid_enum_value,options:a}),je}return zr(t.data)}get enum(){return this._def.values}}Wc.create=(e,t)=>new Wc({values:e,typeName:He.ZodNativeEnum,...Xe(t)});class Qc extends at{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==_e.promise&&n.common.async===!1)return Se(n,{code:me.invalid_type,expected:_e.promise,received:n.parsedType}),je;const r=n.parsedType===_e.promise?n.data:Promise.resolve(n.data);return zr(r.then(a=>this._def.type.parseAsync(a,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Qc.create=(e,t)=>new Qc({type:e,typeName:He.ZodPromise,...Xe(t)});class oa extends at{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===He.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),a=this._def.effect||null,s={addIssue:u=>{Se(r,u),u.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),a.type==="preprocess"){const u=a.transform(r.data,s);if(r.common.async)return Promise.resolve(u).then(async f=>{if(n.value==="aborted")return je;const d=await this._def.schema._parseAsync({data:f,path:r.path,parent:r});return d.status==="aborted"?je:d.status==="dirty"||n.value==="dirty"?Ml(d.value):d});{if(n.value==="aborted")return je;const f=this._def.schema._parseSync({data:u,path:r.path,parent:r});return f.status==="aborted"?je:f.status==="dirty"||n.value==="dirty"?Ml(f.value):f}}if(a.type==="refinement"){const u=f=>{const d=a.refinement(f,s);if(r.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f};if(r.common.async===!1){const f=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return f.status==="aborted"?je:(f.status==="dirty"&&n.dirty(),u(f.value),{status:n.value,value:f.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(f=>f.status==="aborted"?je:(f.status==="dirty"&&n.dirty(),u(f.value).then(()=>({status:n.value,value:f.value}))))}if(a.type==="transform")if(r.common.async===!1){const u=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!es(u))return je;const f=a.transform(u.value,s);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:f}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(u=>es(u)?Promise.resolve(a.transform(u.value,s)).then(f=>({status:n.value,value:f})):je);dt.assertNever(a)}}oa.create=(e,t,n)=>new oa({schema:e,typeName:He.ZodEffects,effect:t,...Xe(n)}),oa.createWithPreprocess=(e,t,n)=>new oa({schema:t,effect:{type:"preprocess",transform:e},typeName:He.ZodEffects,...Xe(n)});class $i extends at{_parse(t){return this._getType(t)===_e.undefined?zr(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}$i.create=(e,t)=>new $i({innerType:e,typeName:He.ZodOptional,...Xe(t)});class aa extends at{_parse(t){return this._getType(t)===_e.null?zr(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}aa.create=(e,t)=>new aa({innerType:e,typeName:He.ZodNullable,...Xe(t)});class Jc extends at{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===_e.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Jc.create=(e,t)=>new Jc({innerType:e,typeName:He.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Xe(t)});class ef extends at{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Gc(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Bi(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Bi(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ef.create=(e,t)=>new ef({innerType:e,typeName:He.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Xe(t)});class SS extends at{_parse(t){if(this._getType(t)!==_e.nan){const r=this._getOrReturnCtx(t);return Se(r,{code:me.invalid_type,expected:_e.nan,received:r.parsedType}),je}return{status:"valid",value:t.data}}}SS.create=e=>new SS({typeName:He.ZodNaN,...Xe(e)});class xS extends at{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Hp extends at{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?je:s.status==="dirty"?(n.dirty(),Ml(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?je:a.status==="dirty"?(n.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(t,n){return new Hp({in:t,out:n,typeName:He.ZodPipeline})}}class tf extends at{_parse(t){const n=this._def.innerType._parse(t),r=a=>(es(a)&&(a.value=Object.freeze(a.value)),a);return Gc(n)?n.then(a=>r(a)):r(n)}unwrap(){return this._def.innerType}}tf.create=(e,t)=>new tf({innerType:e,typeName:He.ZodReadonly,...Xe(t)});var He;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(He||(He={}));const de=zi.create,xM=ts.create,Vp=Bp.create,nr=$p.create;ho.create;const po=Si.create,Wt=_n.create,Fp=Yc.create,nf=Pp.create;Xc.create,ra.create;const ES=Zc.create,Oe=Kc.create,_S=ia.create,EM=Wc.create;Qc.create,$i.create,aa.create;var _M=Wt({name:de(),arguments:de()}),wM=Wt({id:de(),type:Oe("function"),function:_M}),rf=Wt({id:de(),role:de(),content:de().optional(),name:de().optional()}),CM=Wt({type:Oe("text"),text:de()}),wS=Wt({type:Oe("binary"),mimeType:de(),id:de().optional(),url:de().optional(),data:de().optional(),filename:de().optional()}),CS=(e,t)=>{!e.id&&!e.url&&!e.data&&t.addIssue({code:me.custom,message:"BinaryInputContent requires at least one of id, url, or data.",path:["id"]})};wS.superRefine((e,t)=>{CS(e,t)});var TM=nf("type",[CM,wS]),AM=TM.superRefine((e,t)=>{e.type==="binary"&&CS(e,t)}),kM=rf.extend({role:Oe("developer"),content:de()}),RM=rf.extend({role:Oe("system"),content:de()}),OM=rf.extend({role:Oe("assistant"),content:de().optional(),toolCalls:po(wM).optional()}),NM=rf.extend({role:Oe("user"),content:Fp([de(),po(AM)])}),IM=Wt({id:de(),content:de(),role:Oe("tool"),toolCallId:de(),error:de().optional()}),MM=Wt({id:de(),role:Oe("activity"),activityType:de(),content:ES(nr())}),TS=nf("role",[kM,RM,OM,NM,IM,MM]);Fp([Oe("developer"),Oe("system"),Oe("assistant"),Oe("user"),Oe("tool"),Oe("activity")]);var DM=Wt({description:de(),value:de()}),BM=Wt({name:de(),description:de(),parameters:nr()}),zM=Wt({threadId:de(),runId:de(),parentRunId:de().optional(),state:nr(),messages:po(TS),tools:po(BM),context:po(DM),forwardedProps:nr()}),LM=nr(),cn=class extends Error{constructor(e){super(e)}},AS=class extends cn{constructor(){super("Connect not implemented. This method is not supported by the current agent.")}},kS=Fp([Oe("developer"),Oe("system"),Oe("assistant"),Oe("user")]),fe=(e=>(e.TEXT_MESSAGE_START="TEXT_MESSAGE_START",e.TEXT_MESSAGE_CONTENT="TEXT_MESSAGE_CONTENT",e.TEXT_MESSAGE_END="TEXT_MESSAGE_END",e.TEXT_MESSAGE_CHUNK="TEXT_MESSAGE_CHUNK",e.THINKING_TEXT_MESSAGE_START="THINKING_TEXT_MESSAGE_START",e.THINKING_TEXT_MESSAGE_CONTENT="THINKING_TEXT_MESSAGE_CONTENT",e.THINKING_TEXT_MESSAGE_END="THINKING_TEXT_MESSAGE_END",e.TOOL_CALL_START="TOOL_CALL_START",e.TOOL_CALL_ARGS="TOOL_CALL_ARGS",e.TOOL_CALL_END="TOOL_CALL_END",e.TOOL_CALL_CHUNK="TOOL_CALL_CHUNK",e.TOOL_CALL_RESULT="TOOL_CALL_RESULT",e.THINKING_START="THINKING_START",e.THINKING_END="THINKING_END",e.STATE_SNAPSHOT="STATE_SNAPSHOT",e.STATE_DELTA="STATE_DELTA",e.MESSAGES_SNAPSHOT="MESSAGES_SNAPSHOT",e.ACTIVITY_SNAPSHOT="ACTIVITY_SNAPSHOT",e.ACTIVITY_DELTA="ACTIVITY_DELTA",e.RAW="RAW",e.CUSTOM="CUSTOM",e.RUN_STARTED="RUN_STARTED",e.RUN_FINISHED="RUN_FINISHED",e.RUN_ERROR="RUN_ERROR",e.STEP_STARTED="STEP_STARTED",e.STEP_FINISHED="STEP_FINISHED",e))(fe||{}),Yt=Wt({type:EM(fe),timestamp:xM().optional(),rawEvent:nr().optional()}).passthrough(),$M=Yt.extend({type:Oe("TEXT_MESSAGE_START"),messageId:de(),role:kS.default("assistant")}),RS=Yt.extend({type:Oe("TEXT_MESSAGE_CONTENT"),messageId:de(),delta:de().refine(e=>e.length>0,"Delta must not be an empty string")}),PM=Yt.extend({type:Oe("TEXT_MESSAGE_END"),messageId:de()}),UM=Yt.extend({type:Oe("TEXT_MESSAGE_CHUNK"),messageId:de().optional(),role:kS.optional(),delta:de().optional()}),jM=Yt.extend({type:Oe("THINKING_TEXT_MESSAGE_START")}),HM=RS.omit({messageId:!0,type:!0}).extend({type:Oe("THINKING_TEXT_MESSAGE_CONTENT")}),VM=Yt.extend({type:Oe("THINKING_TEXT_MESSAGE_END")}),FM=Yt.extend({type:Oe("TOOL_CALL_START"),toolCallId:de(),toolCallName:de(),parentMessageId:de().optional()}),GM=Yt.extend({type:Oe("TOOL_CALL_ARGS"),toolCallId:de(),delta:de()}),qM=Yt.extend({type:Oe("TOOL_CALL_END"),toolCallId:de()}),YM=Yt.extend({messageId:de(),type:Oe("TOOL_CALL_RESULT"),toolCallId:de(),content:de(),role:Oe("tool").optional()}),XM=Yt.extend({type:Oe("TOOL_CALL_CHUNK"),toolCallId:de().optional(),toolCallName:de().optional(),parentMessageId:de().optional(),delta:de().optional()}),ZM=Yt.extend({type:Oe("THINKING_START"),title:de().optional()}),KM=Yt.extend({type:Oe("THINKING_END")}),WM=Yt.extend({type:Oe("STATE_SNAPSHOT"),snapshot:LM}),QM=Yt.extend({type:Oe("STATE_DELTA"),delta:po(nr())}),JM=Yt.extend({type:Oe("MESSAGES_SNAPSHOT"),messages:po(TS)}),e4=Yt.extend({type:Oe("ACTIVITY_SNAPSHOT"),messageId:de(),activityType:de(),content:ES(nr()),replace:Vp().optional().default(!0)}),t4=Yt.extend({type:Oe("ACTIVITY_DELTA"),messageId:de(),activityType:de(),patch:po(nr())}),n4=Yt.extend({type:Oe("RAW"),event:nr(),source:de().optional()}),r4=Yt.extend({type:Oe("CUSTOM"),name:de(),value:nr()}),i4=Yt.extend({type:Oe("RUN_STARTED"),threadId:de(),runId:de(),parentRunId:de().optional(),input:zM.optional()}),o4=Yt.extend({type:Oe("RUN_FINISHED"),threadId:de(),runId:de(),result:nr().optional()}),a4=Yt.extend({type:Oe("RUN_ERROR"),message:de(),code:de().optional()}),s4=Yt.extend({type:Oe("STEP_STARTED"),stepName:de()}),l4=Yt.extend({type:Oe("STEP_FINISHED"),stepName:de()}),OS=nf("type",[$M,RS,PM,UM,ZM,KM,jM,HM,VM,FM,GM,qM,XM,YM,WM,QM,JM,e4,t4,n4,r4,i4,o4,a4,s4,l4]);function fn(e){return typeof e=="function"}function u4(e){return fn(e?.lift)}function xi(e){return function(t){if(u4(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}var Gp=function(e,t){return Gp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},Gp(e,t)};function rs(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Gp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function c4(e,t,n,r){function a(s){return s instanceof n?s:new n(function(u){u(s)})}return new(n||(n=Promise))(function(s,u){function f(g){try{h(r.next(g))}catch(y){u(y)}}function d(g){try{h(r.throw(g))}catch(y){u(y)}}function h(g){g.done?s(g.value):a(g.value).then(f,d)}h((r=r.apply(e,t||[])).next())})}function NS(e,t){var n={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,a,s,u=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return u.next=f(0),u.throw=f(1),u.return=f(2),typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function f(h){return function(g){return d([h,g])}}function d(h){if(r)throw new TypeError("Generator is already executing.");for(;u&&(u=0,h[0]&&(n=0)),n;)try{if(r=1,a&&(s=h[0]&2?a.return:h[0]?a.throw||((s=a.return)&&s.call(a),0):a.next)&&!(s=s.call(a,h[1])).done)return s;switch(a=0,s&&(h=[h[0]&2,s.value]),h[0]){case 0:case 1:s=h;break;case 4:return n.label++,{value:h[1],done:!1};case 5:n.label++,a=h[1],h=[0];continue;case 7:h=n.ops.pop(),n.trys.pop();continue;default:if(s=n.trys,!(s=s.length>0&&s[s.length-1])&&(h[0]===6||h[0]===2)){n=0;continue}if(h[0]===3&&(!s||h[1]>s[0]&&h[1]<s[3])){n.label=h[1];break}if(h[0]===6&&n.label<s[1]){n.label=s[1],s=h;break}if(s&&n.label<s[2]){n.label=s[2],n.ops.push(h);break}s[2]&&n.ops.pop(),n.trys.pop();continue}h=t.call(e,n)}catch(g){h=[6,g],a=0}finally{r=s=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}}function is(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function qp(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),a,s=[],u;try{for(;(t===void 0||t-- >0)&&!(a=r.next()).done;)s.push(a.value)}catch(f){u={error:f}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(u)throw u.error}}return s}function Yp(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,s;r<a;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}function os(e){return this instanceof os?(this.v=e,this):new os(e)}function f4(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),a,s=[];return a=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),f("next"),f("throw"),f("return",u),a[Symbol.asyncIterator]=function(){return this},a;function u(v){return function(x){return Promise.resolve(x).then(v,y)}}function f(v,x){r[v]&&(a[v]=function(E){return new Promise(function(_,w){s.push([v,E,_,w])>1||d(v,E)})},x&&(a[v]=x(a[v])))}function d(v,x){try{h(r[v](x))}catch(E){b(s[0][3],E)}}function h(v){v.value instanceof os?Promise.resolve(v.value.v).then(g,y):b(s[0][2],v)}function g(v){d("next",v)}function y(v){d("throw",v)}function b(v,x){v(x),s.shift(),s.length&&d(s[0][0],s[0][1])}}function d4(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof is=="function"?is(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(s){n[s]=e[s]&&function(u){return new Promise(function(f,d){u=e[s](u),a(f,d,u.done,u.value)})}}function a(s,u,f,d){Promise.resolve(d).then(function(h){s({value:h,done:f})},u)}}typeof SuppressedError=="function"&&SuppressedError;var IS=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"});function MS(e){return fn(e?.then)}function Xp(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Zp=Xp(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
147
147
|
`+n.map(function(r,a){return a+1+") "+r.toString()}).join(`
|
|
148
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function Kp(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var of=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,a,s;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var f=rs(u),d=f.next();!d.done;d=f.next()){var h=d.value;h.remove(this)}}catch(E){t={error:E}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}else u.remove(this);var g=this.initialTeardown;if(fn(g))try{g()}catch(E){s=E instanceof Zp?E.errors:[E]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var b=rs(y),v=b.next();!v.done;v=b.next()){var x=v.value;try{zS(x)}catch(E){s=s??[],E instanceof Zp?s=Yp(Yp([],qp(s)),qp(E.errors)):s.push(E)}}}catch(E){r={error:E}}finally{try{v&&!v.done&&(a=b.return)&&a.call(b)}finally{if(r)throw r.error}}}if(s)throw new Zp(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)zS(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Kp(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Kp(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),DS=of.EMPTY;function BS(e){return e instanceof of||e&&"closed"in e&&fn(e.remove)&&fn(e.add)&&fn(e.unsubscribe)}function zS(e){fn(e)?e():e.unsubscribe()}var h4={Promise:void 0},p4={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Yp([e,t],qp(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function LS(e){p4.setTimeout(function(){throw e})}function Wp(){}function af(e){e()}var Qp=(function(e){ns(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,BS(n)&&n.add(r)):r.destination=y4,r}return t.create=function(n,r,a){return new Jp(n,r,a)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(of),m4=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){sf(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){sf(r)}else sf(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){sf(n)}},e})(),Jp=(function(e){ns(t,e);function t(n,r,a){var s=e.call(this)||this,u;return fn(n)||!n?u={next:n??void 0,error:r??void 0,complete:a??void 0}:u=n,s.destination=new m4(u),s}return t})(Qp);function sf(e){LS(e)}function g4(e){throw e}var y4={closed:!0,next:Wp,error:g4,complete:Wp},em=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function tm(e){return e}function $S(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return PS(e)}function PS(e){return e.length===0?tm:e.length===1?e[0]:function(n){return e.reduce(function(r,a){return a(r)},n)}}var rr=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var a=this,s=b4(t)?t:new Jp(t,n,r);return af(function(){var u=a,f=u.operator,d=u.source;s.add(f?f.call(s,d):d?a._subscribe(s):a._trySubscribe(s))}),s},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=US(n),new n(function(a,s){var u=new Jp({next:function(f){try{t(f)}catch(d){s(d),u.unsubscribe()}},error:s,complete:a});r.subscribe(u)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[em]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return PS(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=US(t),new t(function(r,a){var s;n.subscribe(function(u){return s=u},function(u){return a(u)},function(){return r(s)})})},e.create=function(t){return new e(t)},e})();function US(e){var t;return(t=e??h4.Promise)!==null&&t!==void 0?t:Promise}function v4(e){return e&&fn(e.next)&&fn(e.error)&&fn(e.complete)}function b4(e){return e&&e instanceof Qp||v4(e)&&BS(e)}function jS(e){return fn(e[em])}function HS(e){return Symbol.asyncIterator&&fn(e?.[Symbol.asyncIterator])}function VS(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function S4(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var FS=S4();function GS(e){return fn(e?.[FS])}function qS(e){return f4(this,arguments,function(){var n,r,a,s;return NS(this,function(u){switch(u.label){case 0:n=e.getReader(),u.label=1;case 1:u.trys.push([1,,9,10]),u.label=2;case 2:return[4,is(n.read())];case 3:return r=u.sent(),a=r.value,s=r.done,s?[4,is(void 0)]:[3,5];case 4:return[2,u.sent()];case 5:return[4,is(a)];case 6:return[4,u.sent()];case 7:return u.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function YS(e){return fn(e?.getReader)}function Pi(e){if(e instanceof rr)return e;if(e!=null){if(jS(e))return x4(e);if(IS(e))return E4(e);if(MS(e))return _4(e);if(HS(e))return XS(e);if(GS(e))return w4(e);if(YS(e))return C4(e)}throw VS(e)}function x4(e){return new rr(function(t){var n=e[em]();if(fn(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function E4(e){return new rr(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function _4(e){return new rr(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,LS)})}function w4(e){return new rr(function(t){var n,r;try{for(var a=rs(e),s=a.next();!s.done;s=a.next()){var u=s.value;if(t.next(u),t.closed)return}}catch(f){n={error:f}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}t.complete()})}function XS(e){return new rr(function(t){T4(e,t).catch(function(n){return t.error(n)})})}function C4(e){return XS(qS(e))}function T4(e,t){var n,r,a,s;return c4(this,void 0,void 0,function(){var u,f;return NS(this,function(d){switch(d.label){case 0:d.trys.push([0,5,6,11]),n=d4(e),d.label=1;case 1:return[4,n.next()];case 2:if(r=d.sent(),!!r.done)return[3,4];if(u=r.value,t.next(u),t.closed)return[2];d.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return f=d.sent(),a={error:f},[3,11];case 6:return d.trys.push([6,,9,10]),r&&!r.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:d.sent(),d.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Ei(e,t,n,r,a){return new A4(e,t,n,r,a)}var A4=(function(e){ns(t,e);function t(n,r,a,s,u,f){var d=e.call(this,n)||this;return d.onFinalize=u,d.shouldUnsubscribe=f,d._next=r?function(h){try{r(h)}catch(g){n.error(g)}}:e.prototype._next,d._error=s?function(h){try{s(h)}catch(g){n.error(g)}finally{this.unsubscribe()}}:e.prototype._error,d._complete=a?function(){try{a()}catch(h){n.error(h)}finally{this.unsubscribe()}}:e.prototype._complete,d}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t})(Qp),ZS={now:function(){return(ZS.delegate||Date).now()},delegate:void 0};function k4(e){return e&&fn(e.schedule)}function R4(e){return e[e.length-1]}function O4(e){return k4(R4(e))?e.pop():void 0}function sa(e,t,n,r,a){r===void 0&&(r=0),a===void 0&&(a=!1);var s=t.schedule(function(){n(),a?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(s),!a)return s}function zl(e){return xi(function(t,n){var r=null,a=!1,s;r=t.subscribe(Ei(n,void 0,void 0,function(u){s=Pi(e(u,zl(e)(t))),r?(r.unsubscribe(),r=null,s.subscribe(n)):a=!0})),a&&(r.unsubscribe(),r=null,s.subscribe(n))})}function KS(e,t){return t===void 0&&(t=0),xi(function(n,r){n.subscribe(Ei(r,function(a){return sa(r,e,function(){return r.next(a)},t)},function(){return sa(r,e,function(){return r.complete()},t)},function(a){return sa(r,e,function(){return r.error(a)},t)}))})}function WS(e,t){return t===void 0&&(t=0),xi(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function N4(e,t){return Pi(e).pipe(WS(t),KS(t))}function I4(e,t){return Pi(e).pipe(WS(t),KS(t))}function M4(e,t){return new rr(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function D4(e,t){return new rr(function(n){var r;return sa(n,t,function(){r=e[FS](),sa(n,t,function(){var a,s,u;try{a=r.next(),s=a.value,u=a.done}catch(f){n.error(f);return}u?n.complete():n.next(s)},0,!0)}),function(){return fn(r?.return)&&r.return()}})}function QS(e,t){if(!e)throw new Error("Iterable cannot be null");return new rr(function(n){sa(n,t,function(){var r=e[Symbol.asyncIterator]();sa(n,t,function(){r.next().then(function(a){a.done?n.complete():n.next(a.value)})},0,!0)})})}function B4(e,t){return QS(qS(e),t)}function z4(e,t){if(e!=null){if(jS(e))return N4(e,t);if(IS(e))return M4(e,t);if(MS(e))return I4(e,t);if(HS(e))return QS(e,t);if(GS(e))return D4(e,t);if(YS(e))return B4(e,t)}throw VS(e)}function Ll(e,t){return t?z4(e,t):Pi(e)}function nm(e,t){return xi(function(n,r){var a=0;n.subscribe(Ei(r,function(s){r.next(e.call(t,s,a++))}))})}function L4(e,t,n,r,a,s,u,f){var d=[],h=0,g=0,y=!1,b=function(){y&&!d.length&&!h&&t.complete()},v=function(E){return h<r?x(E):d.push(E)},x=function(E){h++;var _=!1;Pi(n(E,g++)).subscribe(Ei(t,function(w){t.next(w)},function(){_=!0},void 0,function(){if(_)try{h--;for(var w=function(){var O=d.shift();u||x(O)};d.length&&h<r;)w();b()}catch(O){t.error(O)}}))};return e.subscribe(Ei(t,v,function(){y=!0,b()})),function(){}}function mo(e,t,n){return n===void 0&&(n=1/0),fn(t)?mo(function(r,a){return nm(function(s,u){return t(r,s,a,u)})(Pi(e(r,a)))},n):(typeof t=="number"&&(n=t),xi(function(r,a){return L4(r,a,e,n)}))}function $4(e){return e===void 0&&(e=1/0),mo(tm,e)}function JS(e,t){return fn(t)?mo(e,t,1):mo(e,1)}var P4=Xp(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),la=(function(e){ns(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new e1(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new P4},t.prototype.next=function(n){var r=this;af(function(){var a,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var u=rs(r.currentObservers),f=u.next();!f.done;f=u.next()){var d=f.value;d.next(n)}}catch(h){a={error:h}}finally{try{f&&!f.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}}})},t.prototype.error=function(n){var r=this;af(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var a=r.observers;a.length;)a.shift().error(n)}})},t.prototype.complete=function(){var n=this;af(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,a=this,s=a.hasError,u=a.isStopped,f=a.observers;return s||u?DS:(this.currentObservers=null,f.push(n),new of(function(){r.currentObservers=null,Kp(f,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,a=r.hasError,s=r.thrownError,u=r.isStopped;a?n.error(s):u&&n.complete()},t.prototype.asObservable=function(){var n=new rr;return n.source=this,n},t.create=function(n,r){return new e1(n,r)},t})(rr),e1=(function(e){ns(t,e);function t(n,r){var a=e.call(this)||this;return a.destination=n,a.source=r,a}return t.prototype.next=function(n){var r,a;(a=(r=this.destination)===null||r===void 0?void 0:r.next)===null||a===void 0||a.call(r,n)},t.prototype.error=function(n){var r,a;(a=(r=this.destination)===null||r===void 0?void 0:r.error)===null||a===void 0||a.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,a;return(a=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&a!==void 0?a:DS},t})(la);function U4(e){return xi(function(t,n){var r=!1;t.subscribe(Ei(n,function(a){r=!0,n.next(a)},function(){r||n.next(e),n.complete()}))})}var t1=new rr(function(e){return e.complete()});function yn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=O4(e);return Ll(e,n)}function Qt(e,t){var n=fn(e)?e:function(){return e},r=function(a){return a.error(n())};return new rr(r)}var j4=Xp(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function rm(e){return xi(function(t,n){try{t.subscribe(n)}finally{n.add(e)}})}var n1=(function(e){ns(t,e);function t(n,r,a){n===void 0&&(n=1/0),r===void 0&&(r=1/0),a===void 0&&(a=ZS);var s=e.call(this)||this;return s._bufferSize=n,s._windowTime=r,s._timestampProvider=a,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=r===1/0,s._bufferSize=Math.max(1,n),s._windowTime=Math.max(1,r),s}return t.prototype.next=function(n){var r=this,a=r.isStopped,s=r._buffer,u=r._infiniteTimeWindow,f=r._timestampProvider,d=r._windowTime;a||(s.push(n),!u&&s.push(f.now()+d)),this._trimBuffer(),e.prototype.next.call(this,n)},t.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),a=this,s=a._infiniteTimeWindow,u=a._buffer,f=u.slice(),d=0;d<f.length&&!n.closed;d+=s?1:2)n.next(f[d]);return this._checkFinalizedStatuses(n),r},t.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,a=n._timestampProvider,s=n._buffer,u=n._infiniteTimeWindow,f=(u?1:2)*r;if(r<1/0&&f<s.length&&s.splice(0,s.length-f),!u){for(var d=a.now(),h=0,g=1;g<s.length&&s[g]<=d;g+=2)h=g;h&&s.splice(0,h+1)}},t})(la);function r1(e,t){return xi(function(n,r){var a=null,s=0,u=!1,f=function(){return u&&!a&&r.complete()};n.subscribe(Ei(r,function(d){a?.unsubscribe();var h=0,g=s++;Pi(e(d,g)).subscribe(a=Ei(r,function(y){return r.next(t?t(d,y,g,h++):y)},function(){a=null,f()}))},function(){u=!0,f()}))})}function i1(e){return xi(function(t,n){Pi(e).subscribe(Ei(n,function(){return n.complete()},Wp)),!n.closed&&t.subscribe(n)})}function H4(e,t,n){var r=fn(e)||t||n?{next:e,error:t,complete:n}:e;return r?xi(function(a,s){var u;(u=r.subscribe)===null||u===void 0||u.call(r);var f=!0;a.subscribe(Ei(s,function(d){var h;(h=r.next)===null||h===void 0||h.call(r,d),s.next(d)},function(){var d;f=!1,(d=r.complete)===null||d===void 0||d.call(r),s.complete()},function(d){var h;f=!1,(h=r.error)===null||h===void 0||h.call(r,d),s.error(d)},function(){var d,h;f&&((d=r.unsubscribe)===null||d===void 0||d.call(r)),(h=r.finalize)===null||h===void 0||h.call(r)}))}):tm}function o1(e,t){return new Promise(function(n,r){var a=!1,s;e.subscribe({next:function(u){s=u,a=!0},error:r,complete:function(){a?n(s):r(new j4)}})})}function a1(e){return new rr(function(t){Pi(e()).subscribe(t)})}const Un=[];for(let e=0;e<256;++e)Un.push((e+256).toString(16).slice(1));function V4(e,t=0){return(Un[e[t+0]]+Un[e[t+1]]+Un[e[t+2]]+Un[e[t+3]]+"-"+Un[e[t+4]]+Un[e[t+5]]+"-"+Un[e[t+6]]+Un[e[t+7]]+"-"+Un[e[t+8]]+Un[e[t+9]]+"-"+Un[e[t+10]]+Un[e[t+11]]+Un[e[t+12]]+Un[e[t+13]]+Un[e[t+14]]+Un[e[t+15]]).toLowerCase()}let im;const F4=new Uint8Array(16);function G4(){if(!im){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");im=crypto.getRandomValues.bind(crypto)}return im(F4)}const s1={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function $l(e,t,n){if(s1.randomUUID&&!e)return s1.randomUUID();e=e||{};const r=e.random??e.rng?.()??G4();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,V4(r)}var q4=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var s in a)a.hasOwnProperty(s)&&(r[s]=a[s])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Y4=Object.prototype.hasOwnProperty;function om(e,t){return Y4.call(e,t)}function am(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var r=[];for(var a in e)om(e,a)&&r.push(a);return r}function br(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function sm(e){for(var t=0,n=e.length,r;t<n;){if(r=e.charCodeAt(t),r>=48&&r<=57){t++;continue}return!1}return!0}function ua(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l1(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function lm(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t<n;t++)if(lm(e[t]))return!0}else if(typeof e=="object"){for(var r=am(e),a=r.length,s=0;s<a;s++)if(lm(e[r[s]]))return!0}}return!1}function u1(e,t){var n=[e];for(var r in t){var a=typeof t[r]=="object"?JSON.stringify(t[r],null,2):t[r];typeof a<"u"&&n.push(r+": "+a)}return n.join(`
|
|
149
|
-
`)}var c1=(function(e){q4(t,e);function t(n,r,a,s,u){var f=this.constructor,d=e.call(this,u1(n,{name:r,index:a,operation:s,tree:u}))||this;return d.name=r,d.index=a,d.operation=s,d.tree=u,Object.setPrototypeOf(d,f.prototype),d.message=u1(n,{name:r,index:a,operation:s,tree:u}),d}return t})(Error),dn=c1,X4=br,
|
|
150
|
-
`.indexOf(e)>=0}function h1(e){for(var t=["topLevel"],n=0,r,a,s,u=function(O){return t.push(O)},f=function(O){return t[t.length-1]=O},d=function(O){r==null&&(r=n,a=t.length,s=O)},h=function(O){O===s&&(r=void 0,a=void 0,s=void 0)},g=function(){return t.pop()},y=function(){return n--},b=function(O){if("0"<=O&&O<="9"){u("number");return}switch(O){case'"':u("string");return;case"-":u("numberNeedsDigit");return;case"t":u("true");return;case"f":u("false");return;case"n":u("null");return;case"[":u("arrayNeedsValue");return;case"{":u("objectNeedsKey");return}},v=e.length;n<v;n++){var x=e[n];switch(t[t.length-1]){case"topLevel":b(x);break;case"string":switch(x){case'"':g();break;case"\\":d("stringEscape"),u("stringEscaped");break}break;case"stringEscaped":x==="u"?u("stringUnicode"):(h("stringEscape"),g());break;case"stringUnicode":n-e.lastIndexOf("u",n)===4&&(h("stringEscape"),g());break;case"number":x==="."?f("numberNeedsDigit"):x==="e"||x==="E"?f("numberNeedsExponent"):(x<"0"||x>"9")&&(y(),g());break;case"numberNeedsDigit":f("number");break;case"numberNeedsExponent":f(x==="+"||x==="-"?"numberNeedsDigit":"number");break;case"true":case"false":case"null":(x<"a"||x>"z")&&(y(),g());break;case"arrayNeedsValue":x==="]"?g():d1(x)||(h("collectionItem"),f("arrayNeedsComma"),b(x));break;case"arrayNeedsComma":x==="]"?g():x===","&&(d("collectionItem"),f("arrayNeedsValue"));break;case"objectNeedsKey":x==="}"?g():x==='"'&&(d("collectionItem"),f("objectNeedsColon"),u("string"));break;case"objectNeedsColon":x===":"&&f("objectNeedsValue");break;case"objectNeedsValue":d1(x)||(h("collectionItem"),f("objectNeedsComma"),b(x));break;case"objectNeedsComma":x==="}"?g():x===","&&(d("collectionItem"),f("objectNeedsKey"));break}}a!=null&&(t.length=a);for(var E=[r!=null?e.slice(0,r):e],_=function(O){return E.push(O.slice(e.length-e.lastIndexOf(O[0])))},w=t.length-1;w>=0;w--)switch(t[w]){case"string":E.push('"');break;case"numberNeedsDigit":case"numberNeedsExponent":E.push("0");break;case"true":_("true");break;case"false":_("false");break;case"null":_("null");break;case"arrayNeedsValue":case"arrayNeedsComma":E.push("]");break;case"objectNeedsKey":case"objectNeedsColon":case"objectNeedsValue":case"objectNeedsComma":E.push("}");break}return E.join("")}function a5(){let e=0,t=0;for(let r=0;r<28;r+=7){let a=this.buf[this.pos++];if(e|=(a&127)<<r,(a&128)==0)return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(n&15)<<28,t=(n&112)>>4,(n&128)==0)return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let a=this.buf[this.pos++];if(t|=(a&127)<<r,(a&128)==0)return this.assertBounds(),[e,t]}throw new Error("invalid varint")}function dm(e,t,n){for(let s=0;s<28;s=s+7){const u=e>>>s,f=!(!(u>>>7)&&t==0),d=(f?u|128:u)&255;if(n.push(d),!f)return}const r=e>>>28&15|(t&7)<<4,a=t>>3!=0;if(n.push((a?r|128:r)&255),!!a){for(let s=3;s<31;s=s+7){const u=t>>>s,f=!!(u>>>7),d=(f?u|128:u)&255;if(n.push(d),!f)return}n.push(t>>>31&1)}}const cf=4294967296;function p1(e){const t=e[0]==="-";t&&(e=e.slice(1));const n=1e6;let r=0,a=0;function s(u,f){const d=Number(e.slice(u,f));a*=n,r=r*n+d,r>=cf&&(a=a+(r/cf|0),r=r%cf)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),t?g1(r,a):hm(r,a)}function s5(e,t){let n=hm(e,t);const r=n.hi&2147483648;r&&(n=g1(n.lo,n.hi));const a=m1(n.lo,n.hi);return r?"-"+a:a}function m1(e,t){if({lo:e,hi:t}=l5(e,t),t<=2097151)return String(cf*t+e);const n=e&16777215,r=(e>>>24|t<<8)&16777215,a=t>>16&65535;let s=n+r*6777216+a*6710656,u=r+a*8147497,f=a*2;const d=1e7;return s>=d&&(u+=Math.floor(s/d),s%=d),u>=d&&(f+=Math.floor(u/d),u%=d),f.toString()+y1(u)+y1(s)}function l5(e,t){return{lo:e>>>0,hi:t>>>0}}function hm(e,t){return{lo:e|0,hi:t|0}}function g1(e,t){return t=~t,e?e=~e+1:t+=1,hm(e,t)}const y1=e=>{const t=String(e);return"0000000".slice(t.length)+t};function v1(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function u5(){let e=this.buf[this.pos++],t=e&127;if((e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,(e&128)==0)return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;(e&128)!==0&&n<10;n++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),t>>>0}const _i=c5();function c5(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(!!globalThis.Deno||typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const n=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),a=BigInt("0"),s=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(u){const f=typeof u=="bigint"?u:BigInt(u);if(f>r||f<n)throw new Error(`invalid int64: ${u}`);return f},uParse(u){const f=typeof u=="bigint"?u:BigInt(u);if(f>s||f<a)throw new Error(`invalid uint64: ${u}`);return f},enc(u){return e.setBigInt64(0,this.parse(u),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(u){return e.setBigInt64(0,this.uParse(u),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(u,f){return e.setInt32(0,u,!0),e.setInt32(4,f,!0),e.getBigInt64(0,!0)},uDec(u,f){return e.setInt32(0,u,!0),e.setInt32(4,f,!0),e.getBigUint64(0,!0)}}}return{zero:"0",supported:!1,parse(n){return typeof n!="string"&&(n=n.toString()),b1(n),n},uParse(n){return typeof n!="string"&&(n=n.toString()),S1(n),n},enc(n){return typeof n!="string"&&(n=n.toString()),b1(n),p1(n)},uEnc(n){return typeof n!="string"&&(n=n.toString()),S1(n),p1(n)},dec(n,r){return s5(n,r)},uDec(n,r){return m1(n,r)}}}function b1(e){if(!/^-?[0-9]+$/.test(e))throw new Error("invalid int64: "+e)}function S1(e){if(!/^[0-9]+$/.test(e))throw new Error("invalid uint64: "+e)}const pm=Symbol.for("@bufbuild/protobuf/text-encoding");function x1(){if(globalThis[pm]==null){const e=new globalThis.TextEncoder,t=new globalThis.TextDecoder;globalThis[pm]={encodeUtf8(n){return e.encode(n)},decodeUtf8(n){return t.decode(n)},checkUtf8(n){try{return encodeURIComponent(n),!0}catch{return!1}}}}return globalThis[pm]}var go;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(go||(go={}));const f5=34028234663852886e22,d5=-34028234663852886e22,h5=4294967295,p5=2147483647,m5=-2147483648;class Lt{constructor(t=x1().encodeUtf8){this.encodeUtf8=t,this.stack=[],this.chunks=[],this.buf=[]}finish(){this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]);let t=0;for(let a=0;a<this.chunks.length;a++)t+=this.chunks[a].length;let n=new Uint8Array(t),r=0;for(let a=0;a<this.chunks.length;a++)n.set(this.chunks[a],r),r+=this.chunks[a].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let t=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(t.byteLength),this.raw(t)}tag(t,n){return this.uint32((t<<3|n)>>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(E1(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return mm(t),v1(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.encodeUtf8(t);return this.uint32(n.byteLength),this.raw(n)}float(t){g5(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){E1(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){mm(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return mm(t),t=(t<<1^t>>31)>>>0,v1(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),a=_i.enc(t);return r.setInt32(0,a.lo,!0),r.setInt32(4,a.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),a=_i.uEnc(t);return r.setInt32(0,a.lo,!0),r.setInt32(4,a.hi,!0),this.raw(n)}int64(t){let n=_i.enc(t);return dm(n.lo,n.hi,this.buf),this}sint64(t){const n=_i.enc(t),r=n.hi>>31,a=n.lo<<1^r,s=(n.hi<<1|n.lo>>>31)^r;return dm(a,s,this.buf),this}uint64(t){const n=_i.uEnc(t);return dm(n.lo,n.hi,this.buf),this}}class Ne{constructor(t,n=x1().decodeUtf8){this.decodeUtf8=n,this.varint64=a5,this.uint32=u5,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength)}tag(){let t=this.uint32(),n=t>>>3,r=t&7;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]}skip(t,n){let r=this.pos;switch(t){case go.Varint:for(;this.buf[this.pos++]&128;);break;case go.Bit64:this.pos+=4;case go.Bit32:this.pos+=4;break;case go.LengthDelimited:let a=this.uint32();this.pos+=a;break;case go.StartGroup:for(;;){const[s,u]=this.tag();if(u===go.EndGroup){if(n!==void 0&&s!==n)throw new Error("invalid end group tag");break}this.skip(u,s)}break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return _i.dec(...this.varint64())}uint64(){return _i.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,_i.dec(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return _i.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return _i.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.decodeUtf8(this.bytes())}}function mm(e){if(typeof e=="string")e=Number(e);else if(typeof e!="number")throw new Error("invalid int32: "+typeof e);if(!Number.isInteger(e)||e>p5||e<m5)throw new Error("invalid int32: "+e)}function E1(e){if(typeof e=="string")e=Number(e);else if(typeof e!="number")throw new Error("invalid uint32: "+typeof e);if(!Number.isInteger(e)||e>h5||e<0)throw new Error("invalid uint32: "+e)}function g5(e){if(typeof e=="string"){const t=e;if(e=Number(e),Number.isNaN(e)&&t!=="NaN")throw new Error("invalid float32: "+t)}else if(typeof e!="number")throw new Error("invalid float32: "+typeof e);if(Number.isFinite(e)&&(e>f5||e<d5))throw new Error("invalid float32: "+e)}function gm(){return{fields:{}}}var Ul={encode(e,t=new Lt){return Object.entries(e.fields).forEach(([n,r])=>{r!==void 0&&ym.encode({key:n,value:r},t.uint32(10).fork()).join()}),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=gm();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;const u=ym.decode(n,n.uint32());u.value!==void 0&&(a.fields[u.key]=u.value);continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Ul.fromPartial(e??{})},fromPartial(e){var t;const n=gm();return n.fields=Object.entries((t=e.fields)!=null?t:{}).reduce((r,[a,s])=>(s!==void 0&&(r[a]=s),r),{}),n},wrap(e){const t=gm();if(e!==void 0)for(const n of Object.keys(e))t.fields[n]=e[n];return t},unwrap(e){const t={};if(e.fields)for(const n of Object.keys(e.fields))t[n]=e.fields[n];return t}};function _1(){return{key:"",value:void 0}}var ym={encode(e,t=new Lt){return e.key!==""&&t.uint32(10).string(e.key),e.value!==void 0&&ht.encode(ht.wrap(e.value),t.uint32(18).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=_1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.key=n.string();continue}case 2:{if(s!==18)break;a.value=ht.unwrap(ht.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return ym.fromPartial(e??{})},fromPartial(e){var t,n;const r=_1();return r.key=(t=e.key)!=null?t:"",r.value=(n=e.value)!=null?n:void 0,r}};function vm(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var ht={encode(e,t=new Lt){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&t.uint32(17).double(e.numberValue),e.stringValue!==void 0&&t.uint32(26).string(e.stringValue),e.boolValue!==void 0&&t.uint32(32).bool(e.boolValue),e.structValue!==void 0&&Ul.encode(Ul.wrap(e.structValue),t.uint32(42).fork()).join(),e.listValue!==void 0&&jl.encode(jl.wrap(e.listValue),t.uint32(50).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=vm();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==8)break;a.nullValue=n.int32();continue}case 2:{if(s!==17)break;a.numberValue=n.double();continue}case 3:{if(s!==26)break;a.stringValue=n.string();continue}case 4:{if(s!==32)break;a.boolValue=n.bool();continue}case 5:{if(s!==42)break;a.structValue=Ul.unwrap(Ul.decode(n,n.uint32()));continue}case 6:{if(s!==50)break;a.listValue=jl.unwrap(jl.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return ht.fromPartial(e??{})},fromPartial(e){var t,n,r,a,s,u;const f=vm();return f.nullValue=(t=e.nullValue)!=null?t:void 0,f.numberValue=(n=e.numberValue)!=null?n:void 0,f.stringValue=(r=e.stringValue)!=null?r:void 0,f.boolValue=(a=e.boolValue)!=null?a:void 0,f.structValue=(s=e.structValue)!=null?s:void 0,f.listValue=(u=e.listValue)!=null?u:void 0,f},wrap(e){const t=vm();if(e===null)t.nullValue=0;else if(typeof e=="boolean")t.boolValue=e;else if(typeof e=="number")t.numberValue=e;else if(typeof e=="string")t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if(typeof e=="object")t.structValue=e;else if(typeof e<"u")throw new globalThis.Error("Unsupported any value type: "+typeof e);return t},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function bm(){return{values:[]}}var jl={encode(e,t=new Lt){for(const n of e.values)ht.encode(ht.wrap(n),t.uint32(10).fork()).join();return t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=bm();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.values.push(ht.unwrap(ht.decode(n,n.uint32())));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return jl.fromPartial(e??{})},fromPartial(e){var t;const n=bm();return n.values=((t=e.values)==null?void 0:t.map(r=>r))||[],n},wrap(e){const t=bm();return t.values=e??[],t},unwrap(e){return e?.hasOwnProperty("values")&&globalThis.Array.isArray(e.values)?e.values:e}},w1=(e=>(e[e.ADD=0]="ADD",e[e.REMOVE=1]="REMOVE",e[e.REPLACE=2]="REPLACE",e[e.MOVE=3]="MOVE",e[e.COPY=4]="COPY",e[e.TEST=5]="TEST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e))(w1||{});function C1(){return{op:0,path:"",from:void 0,value:void 0}}var ff={encode(e,t=new Lt){return e.op!==0&&t.uint32(8).int32(e.op),e.path!==""&&t.uint32(18).string(e.path),e.from!==void 0&&t.uint32(26).string(e.from),e.value!==void 0&&ht.encode(ht.wrap(e.value),t.uint32(34).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=C1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==8)break;a.op=n.int32();continue}case 2:{if(s!==18)break;a.path=n.string();continue}case 3:{if(s!==26)break;a.from=n.string();continue}case 4:{if(s!==34)break;a.value=ht.unwrap(ht.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return ff.fromPartial(e??{})},fromPartial(e){var t,n,r,a;const s=C1();return s.op=(t=e.op)!=null?t:0,s.path=(n=e.path)!=null?n:"",s.from=(r=e.from)!=null?r:void 0,s.value=(a=e.value)!=null?a:void 0,s}};function T1(){return{id:"",type:"",function:void 0}}var df={encode(e,t=new Lt){return e.id!==""&&t.uint32(10).string(e.id),e.type!==""&&t.uint32(18).string(e.type),e.function!==void 0&&hf.encode(e.function,t.uint32(26).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=T1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.id=n.string();continue}case 2:{if(s!==18)break;a.type=n.string();continue}case 3:{if(s!==26)break;a.function=hf.decode(n,n.uint32());continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return df.fromPartial(e??{})},fromPartial(e){var t,n;const r=T1();return r.id=(t=e.id)!=null?t:"",r.type=(n=e.type)!=null?n:"",r.function=e.function!==void 0&&e.function!==null?hf.fromPartial(e.function):void 0,r}};function A1(){return{name:"",arguments:""}}var hf={encode(e,t=new Lt){return e.name!==""&&t.uint32(10).string(e.name),e.arguments!==""&&t.uint32(18).string(e.arguments),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=A1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.name=n.string();continue}case 2:{if(s!==18)break;a.arguments=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return hf.fromPartial(e??{})},fromPartial(e){var t,n;const r=A1();return r.name=(t=e.name)!=null?t:"",r.arguments=(n=e.arguments)!=null?n:"",r}};function k1(){return{id:"",role:"",content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0}}var pf={encode(e,t=new Lt){e.id!==""&&t.uint32(10).string(e.id),e.role!==""&&t.uint32(18).string(e.role),e.content!==void 0&&t.uint32(26).string(e.content),e.name!==void 0&&t.uint32(34).string(e.name);for(const n of e.toolCalls)df.encode(n,t.uint32(42).fork()).join();return e.toolCallId!==void 0&&t.uint32(50).string(e.toolCallId),e.error!==void 0&&t.uint32(58).string(e.error),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=k1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.id=n.string();continue}case 2:{if(s!==18)break;a.role=n.string();continue}case 3:{if(s!==26)break;a.content=n.string();continue}case 4:{if(s!==34)break;a.name=n.string();continue}case 5:{if(s!==42)break;a.toolCalls.push(df.decode(n,n.uint32()));continue}case 6:{if(s!==50)break;a.toolCallId=n.string();continue}case 7:{if(s!==58)break;a.error=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return pf.fromPartial(e??{})},fromPartial(e){var t,n,r,a,s,u,f;const d=k1();return d.id=(t=e.id)!=null?t:"",d.role=(n=e.role)!=null?n:"",d.content=(r=e.content)!=null?r:void 0,d.name=(a=e.name)!=null?a:void 0,d.toolCalls=((s=e.toolCalls)==null?void 0:s.map(h=>df.fromPartial(h)))||[],d.toolCallId=(u=e.toolCallId)!=null?u:void 0,d.error=(f=e.error)!=null?f:void 0,d}},R1=(e=>(e[e.TEXT_MESSAGE_START=0]="TEXT_MESSAGE_START",e[e.TEXT_MESSAGE_CONTENT=1]="TEXT_MESSAGE_CONTENT",e[e.TEXT_MESSAGE_END=2]="TEXT_MESSAGE_END",e[e.TOOL_CALL_START=3]="TOOL_CALL_START",e[e.TOOL_CALL_ARGS=4]="TOOL_CALL_ARGS",e[e.TOOL_CALL_END=5]="TOOL_CALL_END",e[e.STATE_SNAPSHOT=6]="STATE_SNAPSHOT",e[e.STATE_DELTA=7]="STATE_DELTA",e[e.MESSAGES_SNAPSHOT=8]="MESSAGES_SNAPSHOT",e[e.RAW=9]="RAW",e[e.CUSTOM=10]="CUSTOM",e[e.RUN_STARTED=11]="RUN_STARTED",e[e.RUN_FINISHED=12]="RUN_FINISHED",e[e.RUN_ERROR=13]="RUN_ERROR",e[e.STEP_STARTED=14]="STEP_STARTED",e[e.STEP_FINISHED=15]="STEP_FINISHED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e))(R1||{});function O1(){return{type:0,timestamp:void 0,rawEvent:void 0}}var De={encode(e,t=new Lt){return e.type!==0&&t.uint32(8).int32(e.type),e.timestamp!==void 0&&t.uint32(16).int64(e.timestamp),e.rawEvent!==void 0&&ht.encode(ht.wrap(e.rawEvent),t.uint32(26).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=O1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==8)break;a.type=n.int32();continue}case 2:{if(s!==16)break;a.timestamp=y5(n.int64());continue}case 3:{if(s!==26)break;a.rawEvent=ht.unwrap(ht.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return De.fromPartial(e??{})},fromPartial(e){var t,n,r;const a=O1();return a.type=(t=e.type)!=null?t:0,a.timestamp=(n=e.timestamp)!=null?n:void 0,a.rawEvent=(r=e.rawEvent)!=null?r:void 0,a}};function N1(){return{baseEvent:void 0,messageId:"",role:void 0}}var mf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==""&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=N1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messageId=n.string();continue}case 3:{if(s!==26)break;a.role=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return mf.fromPartial(e??{})},fromPartial(e){var t,n;const r=N1();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,r.messageId=(t=e.messageId)!=null?t:"",r.role=(n=e.role)!=null?n:void 0,r}};function I1(){return{baseEvent:void 0,messageId:"",delta:""}}var gf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==""&&t.uint32(18).string(e.messageId),e.delta!==""&&t.uint32(26).string(e.delta),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=I1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messageId=n.string();continue}case 3:{if(s!==26)break;a.delta=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return gf.fromPartial(e??{})},fromPartial(e){var t,n;const r=I1();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,r.messageId=(t=e.messageId)!=null?t:"",r.delta=(n=e.delta)!=null?n:"",r}};function M1(){return{baseEvent:void 0,messageId:""}}var yf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==""&&t.uint32(18).string(e.messageId),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=M1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messageId=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return yf.fromPartial(e??{})},fromPartial(e){var t;const n=M1();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,n.messageId=(t=e.messageId)!=null?t:"",n}};function D1(){return{baseEvent:void 0,toolCallId:"",toolCallName:"",parentMessageId:void 0}}var vf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==""&&t.uint32(18).string(e.toolCallId),e.toolCallName!==""&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=D1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.toolCallId=n.string();continue}case 3:{if(s!==26)break;a.toolCallName=n.string();continue}case 4:{if(s!==34)break;a.parentMessageId=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return vf.fromPartial(e??{})},fromPartial(e){var t,n,r;const a=D1();return a.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,a.toolCallId=(t=e.toolCallId)!=null?t:"",a.toolCallName=(n=e.toolCallName)!=null?n:"",a.parentMessageId=(r=e.parentMessageId)!=null?r:void 0,a}};function B1(){return{baseEvent:void 0,toolCallId:"",delta:""}}var bf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==""&&t.uint32(18).string(e.toolCallId),e.delta!==""&&t.uint32(26).string(e.delta),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=B1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.toolCallId=n.string();continue}case 3:{if(s!==26)break;a.delta=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return bf.fromPartial(e??{})},fromPartial(e){var t,n;const r=B1();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,r.toolCallId=(t=e.toolCallId)!=null?t:"",r.delta=(n=e.delta)!=null?n:"",r}};function z1(){return{baseEvent:void 0,toolCallId:""}}var Sf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==""&&t.uint32(18).string(e.toolCallId),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=z1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.toolCallId=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Sf.fromPartial(e??{})},fromPartial(e){var t;const n=z1();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,n.toolCallId=(t=e.toolCallId)!=null?t:"",n}};function L1(){return{baseEvent:void 0,snapshot:void 0}}var xf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.snapshot!==void 0&&ht.encode(ht.wrap(e.snapshot),t.uint32(18).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=L1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.snapshot=ht.unwrap(ht.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return xf.fromPartial(e??{})},fromPartial(e){var t;const n=L1();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,n.snapshot=(t=e.snapshot)!=null?t:void 0,n}};function $1(){return{baseEvent:void 0,delta:[]}}var Ef={encode(e,t=new Lt){e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join();for(const n of e.delta)ff.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=$1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.delta.push(ff.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Ef.fromPartial(e??{})},fromPartial(e){var t;const n=$1();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,n.delta=((t=e.delta)==null?void 0:t.map(r=>ff.fromPartial(r)))||[],n}};function P1(){return{baseEvent:void 0,messages:[]}}var _f={encode(e,t=new Lt){e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join();for(const n of e.messages)pf.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=P1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messages.push(pf.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return _f.fromPartial(e??{})},fromPartial(e){var t;const n=P1();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,n.messages=((t=e.messages)==null?void 0:t.map(r=>pf.fromPartial(r)))||[],n}};function U1(){return{baseEvent:void 0,event:void 0,source:void 0}}var wf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.event!==void 0&&ht.encode(ht.wrap(e.event),t.uint32(18).fork()).join(),e.source!==void 0&&t.uint32(26).string(e.source),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=U1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.event=ht.unwrap(ht.decode(n,n.uint32()));continue}case 3:{if(s!==26)break;a.source=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return wf.fromPartial(e??{})},fromPartial(e){var t,n;const r=U1();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,r.event=(t=e.event)!=null?t:void 0,r.source=(n=e.source)!=null?n:void 0,r}};function j1(){return{baseEvent:void 0,name:"",value:void 0}}var Cf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.name!==""&&t.uint32(18).string(e.name),e.value!==void 0&&ht.encode(ht.wrap(e.value),t.uint32(26).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=j1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.name=n.string();continue}case 3:{if(s!==26)break;a.value=ht.unwrap(ht.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Cf.fromPartial(e??{})},fromPartial(e){var t,n;const r=j1();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,r.name=(t=e.name)!=null?t:"",r.value=(n=e.value)!=null?n:void 0,r}};function H1(){return{baseEvent:void 0,threadId:"",runId:""}}var Tf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==""&&t.uint32(18).string(e.threadId),e.runId!==""&&t.uint32(26).string(e.runId),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=H1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.threadId=n.string();continue}case 3:{if(s!==26)break;a.runId=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Tf.fromPartial(e??{})},fromPartial(e){var t,n;const r=H1();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,r.threadId=(t=e.threadId)!=null?t:"",r.runId=(n=e.runId)!=null?n:"",r}};function V1(){return{baseEvent:void 0,threadId:"",runId:"",result:void 0}}var Af={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==""&&t.uint32(18).string(e.threadId),e.runId!==""&&t.uint32(26).string(e.runId),e.result!==void 0&&ht.encode(ht.wrap(e.result),t.uint32(34).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=V1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.threadId=n.string();continue}case 3:{if(s!==26)break;a.runId=n.string();continue}case 4:{if(s!==34)break;a.result=ht.unwrap(ht.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Af.fromPartial(e??{})},fromPartial(e){var t,n,r;const a=V1();return a.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,a.threadId=(t=e.threadId)!=null?t:"",a.runId=(n=e.runId)!=null?n:"",a.result=(r=e.result)!=null?r:void 0,a}};function F1(){return{baseEvent:void 0,code:void 0,message:""}}var kf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.code!==void 0&&t.uint32(18).string(e.code),e.message!==""&&t.uint32(26).string(e.message),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=F1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.code=n.string();continue}case 3:{if(s!==26)break;a.message=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return kf.fromPartial(e??{})},fromPartial(e){var t,n;const r=F1();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,r.code=(t=e.code)!=null?t:void 0,r.message=(n=e.message)!=null?n:"",r}};function G1(){return{baseEvent:void 0,stepName:""}}var Rf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==""&&t.uint32(18).string(e.stepName),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=G1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.stepName=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Rf.fromPartial(e??{})},fromPartial(e){var t;const n=G1();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,n.stepName=(t=e.stepName)!=null?t:"",n}};function q1(){return{baseEvent:void 0,stepName:""}}var Of={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==""&&t.uint32(18).string(e.stepName),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=q1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.stepName=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Of.fromPartial(e??{})},fromPartial(e){var t;const n=q1();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,n.stepName=(t=e.stepName)!=null?t:"",n}};function Y1(){return{baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0}}var Nf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==void 0&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.delta!==void 0&&t.uint32(34).string(e.delta),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=Y1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messageId=n.string();continue}case 3:{if(s!==26)break;a.role=n.string();continue}case 4:{if(s!==34)break;a.delta=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Nf.fromPartial(e??{})},fromPartial(e){var t,n,r;const a=Y1();return a.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,a.messageId=(t=e.messageId)!=null?t:void 0,a.role=(n=e.role)!=null?n:void 0,a.delta=(r=e.delta)!=null?r:void 0,a}};function X1(){return{baseEvent:void 0,toolCallId:void 0,toolCallName:void 0,parentMessageId:void 0,delta:void 0}}var If={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==void 0&&t.uint32(18).string(e.toolCallId),e.toolCallName!==void 0&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.delta!==void 0&&t.uint32(42).string(e.delta),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=X1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.toolCallId=n.string();continue}case 3:{if(s!==26)break;a.toolCallName=n.string();continue}case 4:{if(s!==34)break;a.parentMessageId=n.string();continue}case 5:{if(s!==42)break;a.delta=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return If.fromPartial(e??{})},fromPartial(e){var t,n,r,a;const s=X1();return s.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,s.toolCallId=(t=e.toolCallId)!=null?t:void 0,s.toolCallName=(n=e.toolCallName)!=null?n:void 0,s.parentMessageId=(r=e.parentMessageId)!=null?r:void 0,s.delta=(a=e.delta)!=null?a:void 0,s}};function Z1(){return{textMessageStart:void 0,textMessageContent:void 0,textMessageEnd:void 0,toolCallStart:void 0,toolCallArgs:void 0,toolCallEnd:void 0,stateSnapshot:void 0,stateDelta:void 0,messagesSnapshot:void 0,raw:void 0,custom:void 0,runStarted:void 0,runFinished:void 0,runError:void 0,stepStarted:void 0,stepFinished:void 0,textMessageChunk:void 0,toolCallChunk:void 0}}var K1={encode(e,t=new Lt){return e.textMessageStart!==void 0&&mf.encode(e.textMessageStart,t.uint32(10).fork()).join(),e.textMessageContent!==void 0&&gf.encode(e.textMessageContent,t.uint32(18).fork()).join(),e.textMessageEnd!==void 0&&yf.encode(e.textMessageEnd,t.uint32(26).fork()).join(),e.toolCallStart!==void 0&&vf.encode(e.toolCallStart,t.uint32(34).fork()).join(),e.toolCallArgs!==void 0&&bf.encode(e.toolCallArgs,t.uint32(42).fork()).join(),e.toolCallEnd!==void 0&&Sf.encode(e.toolCallEnd,t.uint32(50).fork()).join(),e.stateSnapshot!==void 0&&xf.encode(e.stateSnapshot,t.uint32(58).fork()).join(),e.stateDelta!==void 0&&Ef.encode(e.stateDelta,t.uint32(66).fork()).join(),e.messagesSnapshot!==void 0&&_f.encode(e.messagesSnapshot,t.uint32(74).fork()).join(),e.raw!==void 0&&wf.encode(e.raw,t.uint32(82).fork()).join(),e.custom!==void 0&&Cf.encode(e.custom,t.uint32(90).fork()).join(),e.runStarted!==void 0&&Tf.encode(e.runStarted,t.uint32(98).fork()).join(),e.runFinished!==void 0&&Af.encode(e.runFinished,t.uint32(106).fork()).join(),e.runError!==void 0&&kf.encode(e.runError,t.uint32(114).fork()).join(),e.stepStarted!==void 0&&Rf.encode(e.stepStarted,t.uint32(122).fork()).join(),e.stepFinished!==void 0&&Of.encode(e.stepFinished,t.uint32(130).fork()).join(),e.textMessageChunk!==void 0&&Nf.encode(e.textMessageChunk,t.uint32(138).fork()).join(),e.toolCallChunk!==void 0&&If.encode(e.toolCallChunk,t.uint32(146).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=Z1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.textMessageStart=mf.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.textMessageContent=gf.decode(n,n.uint32());continue}case 3:{if(s!==26)break;a.textMessageEnd=yf.decode(n,n.uint32());continue}case 4:{if(s!==34)break;a.toolCallStart=vf.decode(n,n.uint32());continue}case 5:{if(s!==42)break;a.toolCallArgs=bf.decode(n,n.uint32());continue}case 6:{if(s!==50)break;a.toolCallEnd=Sf.decode(n,n.uint32());continue}case 7:{if(s!==58)break;a.stateSnapshot=xf.decode(n,n.uint32());continue}case 8:{if(s!==66)break;a.stateDelta=Ef.decode(n,n.uint32());continue}case 9:{if(s!==74)break;a.messagesSnapshot=_f.decode(n,n.uint32());continue}case 10:{if(s!==82)break;a.raw=wf.decode(n,n.uint32());continue}case 11:{if(s!==90)break;a.custom=Cf.decode(n,n.uint32());continue}case 12:{if(s!==98)break;a.runStarted=Tf.decode(n,n.uint32());continue}case 13:{if(s!==106)break;a.runFinished=Af.decode(n,n.uint32());continue}case 14:{if(s!==114)break;a.runError=kf.decode(n,n.uint32());continue}case 15:{if(s!==122)break;a.stepStarted=Rf.decode(n,n.uint32());continue}case 16:{if(s!==130)break;a.stepFinished=Of.decode(n,n.uint32());continue}case 17:{if(s!==138)break;a.textMessageChunk=Nf.decode(n,n.uint32());continue}case 18:{if(s!==146)break;a.toolCallChunk=If.decode(n,n.uint32());continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return K1.fromPartial(e??{})},fromPartial(e){const t=Z1();return t.textMessageStart=e.textMessageStart!==void 0&&e.textMessageStart!==null?mf.fromPartial(e.textMessageStart):void 0,t.textMessageContent=e.textMessageContent!==void 0&&e.textMessageContent!==null?gf.fromPartial(e.textMessageContent):void 0,t.textMessageEnd=e.textMessageEnd!==void 0&&e.textMessageEnd!==null?yf.fromPartial(e.textMessageEnd):void 0,t.toolCallStart=e.toolCallStart!==void 0&&e.toolCallStart!==null?vf.fromPartial(e.toolCallStart):void 0,t.toolCallArgs=e.toolCallArgs!==void 0&&e.toolCallArgs!==null?bf.fromPartial(e.toolCallArgs):void 0,t.toolCallEnd=e.toolCallEnd!==void 0&&e.toolCallEnd!==null?Sf.fromPartial(e.toolCallEnd):void 0,t.stateSnapshot=e.stateSnapshot!==void 0&&e.stateSnapshot!==null?xf.fromPartial(e.stateSnapshot):void 0,t.stateDelta=e.stateDelta!==void 0&&e.stateDelta!==null?Ef.fromPartial(e.stateDelta):void 0,t.messagesSnapshot=e.messagesSnapshot!==void 0&&e.messagesSnapshot!==null?_f.fromPartial(e.messagesSnapshot):void 0,t.raw=e.raw!==void 0&&e.raw!==null?wf.fromPartial(e.raw):void 0,t.custom=e.custom!==void 0&&e.custom!==null?Cf.fromPartial(e.custom):void 0,t.runStarted=e.runStarted!==void 0&&e.runStarted!==null?Tf.fromPartial(e.runStarted):void 0,t.runFinished=e.runFinished!==void 0&&e.runFinished!==null?Af.fromPartial(e.runFinished):void 0,t.runError=e.runError!==void 0&&e.runError!==null?kf.fromPartial(e.runError):void 0,t.stepStarted=e.stepStarted!==void 0&&e.stepStarted!==null?Rf.fromPartial(e.stepStarted):void 0,t.stepFinished=e.stepFinished!==void 0&&e.stepFinished!==null?Of.fromPartial(e.stepFinished):void 0,t.textMessageChunk=e.textMessageChunk!==void 0&&e.textMessageChunk!==null?Nf.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=e.toolCallChunk!==void 0&&e.toolCallChunk!==null?If.fromPartial(e.toolCallChunk):void 0,t}};function y5(e){const t=globalThis.Number(e.toString());if(t>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");if(t<globalThis.Number.MIN_SAFE_INTEGER)throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");return t}function v5(e){var t;const n=K1.decode(e),r=Object.values(n).find(a=>a!==void 0);if(!r)throw new Error("Invalid event");if(r.type=R1[r.baseEvent.type],r.timestamp=r.baseEvent.timestamp,r.rawEvent=r.baseEvent.rawEvent,r.type===fe.MESSAGES_SNAPSHOT)for(const a of r.messages){const s=a;((t=s.toolCalls)==null?void 0:t.length)===0&&(s.toolCalls=void 0)}if(r.type===fe.STATE_DELTA)for(const a of r.delta)a.op=w1[a.op].toLowerCase(),Object.keys(a).forEach(s=>{a[s]===void 0&&delete a[s]});return Object.keys(r).forEach(a=>{r[a]===void 0&&delete r[a]}),OS.parse(r)}var b5="application/vnd.ag-ui.event+proto";const S5=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,W1=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(S5);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Q1=e=>e==="*"||e==="x"||e==="X",J1=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},x5=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],E5=(e,t)=>{if(Q1(e)||Q1(t))return 0;const[n,r]=x5(J1(e),J1(t));return n>r?1:n<r?-1:0},ex=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=E5(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0},_5=(e,t)=>{const n=W1(e),r=W1(t),a=n.pop(),s=r.pop(),u=ex(n,r);return u!==0?u:a&&s?ex(a.split("."),s.split(".")):a||s?a?-1:1:0};var w5=Object.defineProperty,C5=Object.defineProperties,T5=Object.getOwnPropertyDescriptors,Mf=Object.getOwnPropertySymbols,tx=Object.prototype.hasOwnProperty,nx=Object.prototype.propertyIsEnumerable,rx=(e,t,n)=>t in e?w5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zn=(e,t)=>{for(var n in t||(t={}))tx.call(t,n)&&rx(e,n,t[n]);if(Mf)for(var n of Mf(t))nx.call(t,n)&&rx(e,n,t[n]);return e},yo=(e,t)=>C5(e,T5(t)),A5=(e,t)=>{var n={};for(var r in e)tx.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Mf)for(var r of Mf(e))t.indexOf(r)<0&&nx.call(e,r)&&(n[r]=e[r]);return n},$t=e=>{if(typeof structuredClone=="function")return structuredClone(e);try{return JSON.parse(JSON.stringify(e))}catch{return Zn({},e)}};async function tn(e,t,n,r){let a=t,s=n,u;for(let f of e)try{let d=await r(f,$t(a),$t(s));if(d===void 0)continue;if(d.messages!==void 0&&(a=d.messages),d.state!==void 0&&(s=d.state),u=d.stopPropagation,u===!0)break}catch(d){process.env.JEST_WORKER_ID!==void 0||console.error("Subscriber error:",d);continue}return Zn(Zn(Zn({},JSON.stringify(a)!==JSON.stringify(t)?{messages:a}:{}),JSON.stringify(s)!==JSON.stringify(n)?{state:s}:{}),u!==void 0?{stopPropagation:u}:{})}var ix=(e,t,n,r)=>{let a=$t(n.messages),s=$t(e.state),u={},f=h=>{h.messages!==void 0&&(a=h.messages,u.messages=h.messages),h.state!==void 0&&(s=h.state,u.state=h.state)},d=()=>{let h=$t(u);return u={},h.messages!==void 0||h.state!==void 0?yn(h):t1};return t.pipe(JS(async h=>{var g,y,b,v;let x=await tn(r,a,s,(E,_,w)=>{var O;return(O=E.onEvent)==null?void 0:O.call(E,{event:h,agent:n,input:e,messages:_,state:w})});if(f(x),x.stopPropagation===!0)return d();switch(h.type){case fe.TEXT_MESSAGE_START:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onTextMessageStartEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});if(f(E),E.stopPropagation!==!0){let{messageId:_,role:w="assistant"}=h,O={id:_,role:w,content:""};a.push(O),f({messages:a})}return d()}case fe.TEXT_MESSAGE_CONTENT:{let{messageId:E,delta:_}=h,w=a.find(T=>T.id===E);if(!w)return console.warn(`TEXT_MESSAGE_CONTENT: No message found with ID '${E}'`),d();let O=await tn(r,a,s,(T,A,M)=>{var R;return(R=T.onTextMessageContentEvent)==null?void 0:R.call(T,{event:h,messages:A,state:M,agent:n,input:e,textMessageBuffer:typeof w.content=="string"?w.content:""})});if(f(O),O.stopPropagation!==!0){let T=typeof w.content=="string"?w.content:"";w.content=`${T}${_}`,f({messages:a})}return d()}case fe.TEXT_MESSAGE_END:{let{messageId:E}=h,_=a.find(O=>O.id===E);if(!_)return console.warn(`TEXT_MESSAGE_END: No message found with ID '${E}'`),d();let w=await tn(r,a,s,(O,T,A)=>{var M;return(M=O.onTextMessageEndEvent)==null?void 0:M.call(O,{event:h,messages:T,state:A,agent:n,input:e,textMessageBuffer:typeof _.content=="string"?_.content:""})});return f(w),await Promise.all(r.map(O=>{var T;(T=O.onNewMessage)==null||T.call(O,{message:_,messages:a,state:s,agent:n,input:e})})),d()}case fe.TOOL_CALL_START:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onToolCallStartEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});if(f(E),E.stopPropagation!==!0){let{toolCallId:_,toolCallName:w,parentMessageId:O}=h,T;O&&a.length>0&&a[a.length-1].id===O?T=a[a.length-1]:(T={id:O||_,role:"assistant",toolCalls:[]},a.push(T)),T.toolCalls!=null||(T.toolCalls=[]),T.toolCalls.push({id:_,type:"function",function:{name:w,arguments:""}}),f({messages:a})}return d()}case fe.TOOL_CALL_ARGS:{let{toolCallId:E,delta:_}=h,w=a.find(A=>{var M;return(M=A.toolCalls)==null?void 0:M.some(R=>R.id===E)});if(!w)return console.warn(`TOOL_CALL_ARGS: No message found containing tool call with ID '${E}'`),d();let O=w.toolCalls.find(A=>A.id===E);if(!O)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${E}'`),d();let T=await tn(r,a,s,(A,M,R)=>{var $;let H=O.function.arguments,V=O.function.name,K={};try{K=h1(H)}catch{}return($=A.onToolCallArgsEvent)==null?void 0:$.call(A,{event:h,messages:M,state:R,agent:n,input:e,toolCallBuffer:H,toolCallName:V,partialToolCallArgs:K})});return f(T),T.stopPropagation!==!0&&(O.function.arguments+=_,f({messages:a})),d()}case fe.TOOL_CALL_END:{let{toolCallId:E}=h,_=a.find(T=>{var A;return(A=T.toolCalls)==null?void 0:A.some(M=>M.id===E)});if(!_)return console.warn(`TOOL_CALL_END: No message found containing tool call with ID '${E}'`),d();let w=_.toolCalls.find(T=>T.id===E);if(!w)return console.warn(`TOOL_CALL_END: No tool call found with ID '${E}'`),d();let O=await tn(r,a,s,(T,A,M)=>{var R;let $=w.function.arguments,H=w.function.name,V={};try{V=JSON.parse($)}catch{}return(R=T.onToolCallEndEvent)==null?void 0:R.call(T,{event:h,messages:A,state:M,agent:n,input:e,toolCallName:H,toolCallArgs:V})});return f(O),await Promise.all(r.map(T=>{var A;(A=T.onNewToolCall)==null||A.call(T,{toolCall:w,messages:a,state:s,agent:n,input:e})})),d()}case fe.TOOL_CALL_RESULT:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onToolCallResultEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});if(f(E),E.stopPropagation!==!0){let{messageId:_,toolCallId:w,content:O,role:T}=h,A={id:_,toolCallId:w,role:T||"tool",content:O};a.push(A),await Promise.all(r.map(M=>{var R;(R=M.onNewMessage)==null||R.call(M,{message:A,messages:a,state:s,agent:n,input:e})})),f({messages:a})}return d()}case fe.STATE_SNAPSHOT:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onStateSnapshotEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});if(f(E),E.stopPropagation!==!0){let{snapshot:_}=h;s=_,f({state:s})}return d()}case fe.STATE_DELTA:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onStateDeltaEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});if(f(E),E.stopPropagation!==!0){let{delta:_}=h;try{s=as(s,_,!0,!1).newDocument,f({state:s})}catch(w){let O=w instanceof Error?w.message:String(w);console.warn(`Failed to apply state patch:
|
|
148
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function Kp(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var of=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,a,s;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var f=is(u),d=f.next();!d.done;d=f.next()){var h=d.value;h.remove(this)}}catch(E){t={error:E}}finally{try{d&&!d.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}else u.remove(this);var g=this.initialTeardown;if(fn(g))try{g()}catch(E){s=E instanceof Zp?E.errors:[E]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var b=is(y),v=b.next();!v.done;v=b.next()){var x=v.value;try{zS(x)}catch(E){s=s??[],E instanceof Zp?s=Yp(Yp([],qp(s)),qp(E.errors)):s.push(E)}}}catch(E){r={error:E}}finally{try{v&&!v.done&&(a=b.return)&&a.call(b)}finally{if(r)throw r.error}}}if(s)throw new Zp(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)zS(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Kp(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Kp(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),DS=of.EMPTY;function BS(e){return e instanceof of||e&&"closed"in e&&fn(e.remove)&&fn(e.add)&&fn(e.unsubscribe)}function zS(e){fn(e)?e():e.unsubscribe()}var h4={Promise:void 0},p4={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Yp([e,t],qp(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function LS(e){p4.setTimeout(function(){throw e})}function Wp(){}function af(e){e()}var Qp=(function(e){rs(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,BS(n)&&n.add(r)):r.destination=y4,r}return t.create=function(n,r,a){return new Jp(n,r,a)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(of),m4=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){sf(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){sf(r)}else sf(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){sf(n)}},e})(),Jp=(function(e){rs(t,e);function t(n,r,a){var s=e.call(this)||this,u;return fn(n)||!n?u={next:n??void 0,error:r??void 0,complete:a??void 0}:u=n,s.destination=new m4(u),s}return t})(Qp);function sf(e){LS(e)}function g4(e){throw e}var y4={closed:!0,next:Wp,error:g4,complete:Wp},em=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function tm(e){return e}function $S(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return PS(e)}function PS(e){return e.length===0?tm:e.length===1?e[0]:function(n){return e.reduce(function(r,a){return a(r)},n)}}var rr=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var a=this,s=b4(t)?t:new Jp(t,n,r);return af(function(){var u=a,f=u.operator,d=u.source;s.add(f?f.call(s,d):d?a._subscribe(s):a._trySubscribe(s))}),s},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=US(n),new n(function(a,s){var u=new Jp({next:function(f){try{t(f)}catch(d){s(d),u.unsubscribe()}},error:s,complete:a});r.subscribe(u)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[em]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return PS(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=US(t),new t(function(r,a){var s;n.subscribe(function(u){return s=u},function(u){return a(u)},function(){return r(s)})})},e.create=function(t){return new e(t)},e})();function US(e){var t;return(t=e??h4.Promise)!==null&&t!==void 0?t:Promise}function v4(e){return e&&fn(e.next)&&fn(e.error)&&fn(e.complete)}function b4(e){return e&&e instanceof Qp||v4(e)&&BS(e)}function jS(e){return fn(e[em])}function HS(e){return Symbol.asyncIterator&&fn(e?.[Symbol.asyncIterator])}function VS(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function S4(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var FS=S4();function GS(e){return fn(e?.[FS])}function qS(e){return f4(this,arguments,function(){var n,r,a,s;return NS(this,function(u){switch(u.label){case 0:n=e.getReader(),u.label=1;case 1:u.trys.push([1,,9,10]),u.label=2;case 2:return[4,os(n.read())];case 3:return r=u.sent(),a=r.value,s=r.done,s?[4,os(void 0)]:[3,5];case 4:return[2,u.sent()];case 5:return[4,os(a)];case 6:return[4,u.sent()];case 7:return u.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function YS(e){return fn(e?.getReader)}function Pi(e){if(e instanceof rr)return e;if(e!=null){if(jS(e))return x4(e);if(IS(e))return E4(e);if(MS(e))return _4(e);if(HS(e))return XS(e);if(GS(e))return w4(e);if(YS(e))return C4(e)}throw VS(e)}function x4(e){return new rr(function(t){var n=e[em]();if(fn(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function E4(e){return new rr(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function _4(e){return new rr(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,LS)})}function w4(e){return new rr(function(t){var n,r;try{for(var a=is(e),s=a.next();!s.done;s=a.next()){var u=s.value;if(t.next(u),t.closed)return}}catch(f){n={error:f}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}t.complete()})}function XS(e){return new rr(function(t){T4(e,t).catch(function(n){return t.error(n)})})}function C4(e){return XS(qS(e))}function T4(e,t){var n,r,a,s;return c4(this,void 0,void 0,function(){var u,f;return NS(this,function(d){switch(d.label){case 0:d.trys.push([0,5,6,11]),n=d4(e),d.label=1;case 1:return[4,n.next()];case 2:if(r=d.sent(),!!r.done)return[3,4];if(u=r.value,t.next(u),t.closed)return[2];d.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return f=d.sent(),a={error:f},[3,11];case 6:return d.trys.push([6,,9,10]),r&&!r.done&&(s=n.return)?[4,s.call(n)]:[3,8];case 7:d.sent(),d.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function Ei(e,t,n,r,a){return new A4(e,t,n,r,a)}var A4=(function(e){rs(t,e);function t(n,r,a,s,u,f){var d=e.call(this,n)||this;return d.onFinalize=u,d.shouldUnsubscribe=f,d._next=r?function(h){try{r(h)}catch(g){n.error(g)}}:e.prototype._next,d._error=s?function(h){try{s(h)}catch(g){n.error(g)}finally{this.unsubscribe()}}:e.prototype._error,d._complete=a?function(){try{a()}catch(h){n.error(h)}finally{this.unsubscribe()}}:e.prototype._complete,d}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t})(Qp),ZS={now:function(){return(ZS.delegate||Date).now()},delegate:void 0};function k4(e){return e&&fn(e.schedule)}function R4(e){return e[e.length-1]}function O4(e){return k4(R4(e))?e.pop():void 0}function sa(e,t,n,r,a){r===void 0&&(r=0),a===void 0&&(a=!1);var s=t.schedule(function(){n(),a?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(s),!a)return s}function zl(e){return xi(function(t,n){var r=null,a=!1,s;r=t.subscribe(Ei(n,void 0,void 0,function(u){s=Pi(e(u,zl(e)(t))),r?(r.unsubscribe(),r=null,s.subscribe(n)):a=!0})),a&&(r.unsubscribe(),r=null,s.subscribe(n))})}function KS(e,t){return t===void 0&&(t=0),xi(function(n,r){n.subscribe(Ei(r,function(a){return sa(r,e,function(){return r.next(a)},t)},function(){return sa(r,e,function(){return r.complete()},t)},function(a){return sa(r,e,function(){return r.error(a)},t)}))})}function WS(e,t){return t===void 0&&(t=0),xi(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function N4(e,t){return Pi(e).pipe(WS(t),KS(t))}function I4(e,t){return Pi(e).pipe(WS(t),KS(t))}function M4(e,t){return new rr(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function D4(e,t){return new rr(function(n){var r;return sa(n,t,function(){r=e[FS](),sa(n,t,function(){var a,s,u;try{a=r.next(),s=a.value,u=a.done}catch(f){n.error(f);return}u?n.complete():n.next(s)},0,!0)}),function(){return fn(r?.return)&&r.return()}})}function QS(e,t){if(!e)throw new Error("Iterable cannot be null");return new rr(function(n){sa(n,t,function(){var r=e[Symbol.asyncIterator]();sa(n,t,function(){r.next().then(function(a){a.done?n.complete():n.next(a.value)})},0,!0)})})}function B4(e,t){return QS(qS(e),t)}function z4(e,t){if(e!=null){if(jS(e))return N4(e,t);if(IS(e))return M4(e,t);if(MS(e))return I4(e,t);if(HS(e))return QS(e,t);if(GS(e))return D4(e,t);if(YS(e))return B4(e,t)}throw VS(e)}function Ll(e,t){return t?z4(e,t):Pi(e)}function nm(e,t){return xi(function(n,r){var a=0;n.subscribe(Ei(r,function(s){r.next(e.call(t,s,a++))}))})}function L4(e,t,n,r,a,s,u,f){var d=[],h=0,g=0,y=!1,b=function(){y&&!d.length&&!h&&t.complete()},v=function(E){return h<r?x(E):d.push(E)},x=function(E){h++;var _=!1;Pi(n(E,g++)).subscribe(Ei(t,function(w){t.next(w)},function(){_=!0},void 0,function(){if(_)try{h--;for(var w=function(){var O=d.shift();u||x(O)};d.length&&h<r;)w();b()}catch(O){t.error(O)}}))};return e.subscribe(Ei(t,v,function(){y=!0,b()})),function(){}}function mo(e,t,n){return n===void 0&&(n=1/0),fn(t)?mo(function(r,a){return nm(function(s,u){return t(r,s,a,u)})(Pi(e(r,a)))},n):(typeof t=="number"&&(n=t),xi(function(r,a){return L4(r,a,e,n)}))}function $4(e){return e===void 0&&(e=1/0),mo(tm,e)}function JS(e,t){return fn(t)?mo(e,t,1):mo(e,1)}var P4=Xp(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),la=(function(e){rs(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new e1(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new P4},t.prototype.next=function(n){var r=this;af(function(){var a,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var u=is(r.currentObservers),f=u.next();!f.done;f=u.next()){var d=f.value;d.next(n)}}catch(h){a={error:h}}finally{try{f&&!f.done&&(s=u.return)&&s.call(u)}finally{if(a)throw a.error}}}})},t.prototype.error=function(n){var r=this;af(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var a=r.observers;a.length;)a.shift().error(n)}})},t.prototype.complete=function(){var n=this;af(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,a=this,s=a.hasError,u=a.isStopped,f=a.observers;return s||u?DS:(this.currentObservers=null,f.push(n),new of(function(){r.currentObservers=null,Kp(f,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,a=r.hasError,s=r.thrownError,u=r.isStopped;a?n.error(s):u&&n.complete()},t.prototype.asObservable=function(){var n=new rr;return n.source=this,n},t.create=function(n,r){return new e1(n,r)},t})(rr),e1=(function(e){rs(t,e);function t(n,r){var a=e.call(this)||this;return a.destination=n,a.source=r,a}return t.prototype.next=function(n){var r,a;(a=(r=this.destination)===null||r===void 0?void 0:r.next)===null||a===void 0||a.call(r,n)},t.prototype.error=function(n){var r,a;(a=(r=this.destination)===null||r===void 0?void 0:r.error)===null||a===void 0||a.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,a;return(a=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&a!==void 0?a:DS},t})(la);function U4(e){return xi(function(t,n){var r=!1;t.subscribe(Ei(n,function(a){r=!0,n.next(a)},function(){r||n.next(e),n.complete()}))})}var t1=new rr(function(e){return e.complete()});function vn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=O4(e);return Ll(e,n)}function Qt(e,t){var n=fn(e)?e:function(){return e},r=function(a){return a.error(n())};return new rr(r)}var j4=Xp(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function rm(e){return xi(function(t,n){try{t.subscribe(n)}finally{n.add(e)}})}var n1=(function(e){rs(t,e);function t(n,r,a){n===void 0&&(n=1/0),r===void 0&&(r=1/0),a===void 0&&(a=ZS);var s=e.call(this)||this;return s._bufferSize=n,s._windowTime=r,s._timestampProvider=a,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=r===1/0,s._bufferSize=Math.max(1,n),s._windowTime=Math.max(1,r),s}return t.prototype.next=function(n){var r=this,a=r.isStopped,s=r._buffer,u=r._infiniteTimeWindow,f=r._timestampProvider,d=r._windowTime;a||(s.push(n),!u&&s.push(f.now()+d)),this._trimBuffer(),e.prototype.next.call(this,n)},t.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),a=this,s=a._infiniteTimeWindow,u=a._buffer,f=u.slice(),d=0;d<f.length&&!n.closed;d+=s?1:2)n.next(f[d]);return this._checkFinalizedStatuses(n),r},t.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,a=n._timestampProvider,s=n._buffer,u=n._infiniteTimeWindow,f=(u?1:2)*r;if(r<1/0&&f<s.length&&s.splice(0,s.length-f),!u){for(var d=a.now(),h=0,g=1;g<s.length&&s[g]<=d;g+=2)h=g;h&&s.splice(0,h+1)}},t})(la);function r1(e,t){return xi(function(n,r){var a=null,s=0,u=!1,f=function(){return u&&!a&&r.complete()};n.subscribe(Ei(r,function(d){a?.unsubscribe();var h=0,g=s++;Pi(e(d,g)).subscribe(a=Ei(r,function(y){return r.next(t?t(d,y,g,h++):y)},function(){a=null,f()}))},function(){u=!0,f()}))})}function i1(e){return xi(function(t,n){Pi(e).subscribe(Ei(n,function(){return n.complete()},Wp)),!n.closed&&t.subscribe(n)})}function H4(e,t,n){var r=fn(e)||t||n?{next:e,error:t,complete:n}:e;return r?xi(function(a,s){var u;(u=r.subscribe)===null||u===void 0||u.call(r);var f=!0;a.subscribe(Ei(s,function(d){var h;(h=r.next)===null||h===void 0||h.call(r,d),s.next(d)},function(){var d;f=!1,(d=r.complete)===null||d===void 0||d.call(r),s.complete()},function(d){var h;f=!1,(h=r.error)===null||h===void 0||h.call(r,d),s.error(d)},function(){var d,h;f&&((d=r.unsubscribe)===null||d===void 0||d.call(r)),(h=r.finalize)===null||h===void 0||h.call(r)}))}):tm}function o1(e,t){return new Promise(function(n,r){var a=!1,s;e.subscribe({next:function(u){s=u,a=!0},error:r,complete:function(){a?n(s):r(new j4)}})})}function a1(e){return new rr(function(t){Pi(e()).subscribe(t)})}const Un=[];for(let e=0;e<256;++e)Un.push((e+256).toString(16).slice(1));function V4(e,t=0){return(Un[e[t+0]]+Un[e[t+1]]+Un[e[t+2]]+Un[e[t+3]]+"-"+Un[e[t+4]]+Un[e[t+5]]+"-"+Un[e[t+6]]+Un[e[t+7]]+"-"+Un[e[t+8]]+Un[e[t+9]]+"-"+Un[e[t+10]]+Un[e[t+11]]+Un[e[t+12]]+Un[e[t+13]]+Un[e[t+14]]+Un[e[t+15]]).toLowerCase()}let im;const F4=new Uint8Array(16);function G4(){if(!im){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");im=crypto.getRandomValues.bind(crypto)}return im(F4)}const s1={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function $l(e,t,n){if(s1.randomUUID&&!e)return s1.randomUUID();e=e||{};const r=e.random??e.rng?.()??G4();if(r.length<16)throw new Error("Random bytes length must be >= 16");return r[6]=r[6]&15|64,r[8]=r[8]&63|128,V4(r)}var q4=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,a){r.__proto__=a}||function(r,a){for(var s in a)a.hasOwnProperty(s)&&(r[s]=a[s])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),Y4=Object.prototype.hasOwnProperty;function om(e,t){return Y4.call(e,t)}function am(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);var r=[];for(var a in e)om(e,a)&&r.push(a);return r}function br(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function sm(e){for(var t=0,n=e.length,r;t<n;){if(r=e.charCodeAt(t),r>=48&&r<=57){t++;continue}return!1}return!0}function ua(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l1(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function lm(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;t<n;t++)if(lm(e[t]))return!0}else if(typeof e=="object"){for(var r=am(e),a=r.length,s=0;s<a;s++)if(lm(e[r[s]]))return!0}}return!1}function u1(e,t){var n=[e];for(var r in t){var a=typeof t[r]=="object"?JSON.stringify(t[r],null,2):t[r];typeof a<"u"&&n.push(r+": "+a)}return n.join(`
|
|
149
|
+
`)}var c1=(function(e){q4(t,e);function t(n,r,a,s,u){var f=this.constructor,d=e.call(this,u1(n,{name:r,index:a,operation:s,tree:u}))||this;return d.name=r,d.index=a,d.operation=s,d.tree=u,Object.setPrototypeOf(d,f.prototype),d.message=u1(n,{name:r,index:a,operation:s,tree:u}),d}return t})(Error),dn=c1,X4=br,as={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=lf(n,this.path);r&&(r=br(r));var a=ca(n,{op:"remove",path:this.from}).removed;return ca(n,{op:"add",path:this.path,value:a}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=lf(n,this.from);return ca(n,{op:"add",path:this.path,value:br(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:Pl(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},Z4={add:function(e,t,n){return sm(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){var r=e.splice(t,1);return{newDocument:n,removed:r[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:as.move,copy:as.copy,test:as.test,_get:as._get};function lf(e,t){if(t=="")return e;var n={op:"_get",path:t};return ca(e,n),n.value}function ca(e,t,n,r,a,s){if(n===void 0&&(n=!1),r===void 0&&(r=!0),a===void 0&&(a=!0),s===void 0&&(s=0),n&&(typeof n=="function"?n(t,0,e,t.path):uf(t,0)),t.path===""){var u={newDocument:e};if(t.op==="add")return u.newDocument=t.value,u;if(t.op==="replace")return u.newDocument=t.value,u.removed=e,u;if(t.op==="move"||t.op==="copy")return u.newDocument=lf(e,t.from),t.op==="move"&&(u.removed=e),u;if(t.op==="test"){if(u.test=Pl(e,t.value),u.test===!1)throw new dn("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return u.newDocument=e,u}else{if(t.op==="remove")return u.removed=e,u.newDocument=null,u;if(t.op==="_get")return t.value=e,u;if(n)throw new dn("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",s,t,e);return u}}else{r||(e=br(e));var f=t.path||"",d=f.split("/"),h=e,g=1,y=d.length,b=void 0,v=void 0,x=void 0;for(typeof n=="function"?x=n:x=uf;;){if(v=d[g],v&&v.indexOf("~")!=-1&&(v=l1(v)),a&&(v=="__proto__"||v=="prototype"&&g>0&&d[g-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&b===void 0&&(h[v]===void 0?b=d.slice(0,g).join("/"):g==y-1&&(b=t.path),b!==void 0&&x(t,0,e,b)),g++,Array.isArray(h)){if(v==="-")v=h.length;else{if(n&&!sm(v))throw new dn("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s,t,e);sm(v)&&(v=~~v)}if(g>=y){if(n&&t.op==="add"&&v>h.length)throw new dn("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s,t,e);var u=Z4[t.op].call(t,h,v,e);if(u.test===!1)throw new dn("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return u}}else if(g>=y){var u=as[t.op].call(t,h,v,e);if(u.test===!1)throw new dn("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return u}if(h=h[v],n&&g<y&&(!h||typeof h!="object"))throw new dn("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",s,t,e)}}}function ss(e,t,n,r,a){if(r===void 0&&(r=!0),a===void 0&&(a=!0),n&&!Array.isArray(t))throw new dn("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=br(e));for(var s=new Array(t.length),u=0,f=t.length;u<f;u++)s[u]=ca(e,t[u],n,!0,a,u),e=s[u].newDocument;return s.newDocument=e,s}function K4(e,t,n){var r=ca(e,t);if(r.test===!1)throw new dn("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function uf(e,t,n,r){if(typeof e!="object"||e===null||Array.isArray(e))throw new dn("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(as[e.op]){if(typeof e.path!="string")throw new dn("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(e.path.indexOf("/")!==0&&e.path.length>0)throw new dn('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new dn("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new dn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if((e.op==="add"||e.op==="replace"||e.op==="test")&&lm(e.value))throw new dn("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n){if(e.op=="add"){var a=e.path.split("/").length,s=r.split("/").length;if(a!==s+1&&a!==s)throw new dn("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==r)throw new dn("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if(e.op==="move"||e.op==="copy"){var u={op:"_get",path:e.from,value:void 0},f=f1([u],n);if(f&&f.name==="OPERATION_PATH_UNRESOLVABLE")throw new dn("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}}else throw new dn("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n)}function f1(e,t,n){try{if(!Array.isArray(e))throw new dn("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)ss(br(t),br(e),n||!0);else{n=n||uf;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(a){if(a instanceof dn)return a;throw a}}function Pl(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var n=Array.isArray(e),r=Array.isArray(t),a,s,u;if(n&&r){if(s=e.length,s!=t.length)return!1;for(a=s;a--!==0;)if(!Pl(e[a],t[a]))return!1;return!0}if(n!=r)return!1;var f=Object.keys(e);if(s=f.length,s!==Object.keys(t).length)return!1;for(a=s;a--!==0;)if(!t.hasOwnProperty(f[a]))return!1;for(a=s;a--!==0;)if(u=f[a],!Pl(e[u],t[u]))return!1;return!0}return e!==e&&t!==t}const W4=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:dn,_areEquals:Pl,applyOperation:ca,applyPatch:ss,applyReducer:K4,deepClone:X4,getValueByPointer:lf,validate:f1,validator:uf},Symbol.toStringTag,{value:"Module"}));var um=new WeakMap,Q4=(function(){function e(t){this.observers=new Map,this.obj=t}return e})(),J4=(function(){function e(t,n){this.callback=t,this.observer=n}return e})();function e5(e){return um.get(e)}function t5(e,t){return e.observers.get(t)}function n5(e,t){e.observers.delete(t.callback)}function r5(e,t){t.unobserve()}function i5(e,t){var n=[],r,a=e5(e);if(!a)a=new Q4(e),um.set(e,a);else{var s=t5(a,t);r=s&&s.observer}if(r)return r;if(r={},a.value=br(e),t){r.callback=t,r.next=null;var u=function(){cm(r)},f=function(){clearTimeout(r.next),r.next=setTimeout(u)};typeof window<"u"&&(window.addEventListener("mouseup",f),window.addEventListener("keyup",f),window.addEventListener("mousedown",f),window.addEventListener("keydown",f),window.addEventListener("change",f))}return r.patches=n,r.object=e,r.unobserve=function(){cm(r),clearTimeout(r.next),n5(a,r),typeof window<"u"&&(window.removeEventListener("mouseup",f),window.removeEventListener("keyup",f),window.removeEventListener("mousedown",f),window.removeEventListener("keydown",f),window.removeEventListener("change",f))},a.observers.set(t,new J4(t,r)),r}function cm(e,t){t===void 0&&(t=!1);var n=um.get(e.object);fm(n.value,e.object,e.patches,"",t),e.patches.length&&ss(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function fm(e,t,n,r,a){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var s=am(t),u=am(e),f=!1,d=u.length-1;d>=0;d--){var h=u[d],g=e[h];if(om(t,h)&&!(t[h]===void 0&&g!==void 0&&Array.isArray(t)===!1)){var y=t[h];typeof g=="object"&&g!=null&&typeof y=="object"&&y!=null&&Array.isArray(g)===Array.isArray(y)?fm(g,y,n,r+"/"+ua(h),a):g!==y&&(a&&n.push({op:"test",path:r+"/"+ua(h),value:br(g)}),n.push({op:"replace",path:r+"/"+ua(h),value:br(y)}))}else Array.isArray(e)===Array.isArray(t)?(a&&n.push({op:"test",path:r+"/"+ua(h),value:br(g)}),n.push({op:"remove",path:r+"/"+ua(h)}),f=!0):(a&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}))}if(!(!f&&s.length==u.length))for(var d=0;d<s.length;d++){var h=s[d];!om(e,h)&&t[h]!==void 0&&n.push({op:"add",path:r+"/"+ua(h),value:br(t[h])})}}}function o5(e,t,n){n===void 0&&(n=!1);var r=[];return fm(e,t,r,"",n),r}Object.assign({},W4,Object.freeze(Object.defineProperty({__proto__:null,compare:o5,generate:cm,observe:i5,unobserve:r5},Symbol.toStringTag,{value:"Module"})),{JsonPatchError:c1,deepClone:br,escapePathComponent:ua,unescapePathComponent:l1});function d1(e){return` \r
|
|
150
|
+
`.indexOf(e)>=0}function h1(e){for(var t=["topLevel"],n=0,r,a,s,u=function(O){return t.push(O)},f=function(O){return t[t.length-1]=O},d=function(O){r==null&&(r=n,a=t.length,s=O)},h=function(O){O===s&&(r=void 0,a=void 0,s=void 0)},g=function(){return t.pop()},y=function(){return n--},b=function(O){if("0"<=O&&O<="9"){u("number");return}switch(O){case'"':u("string");return;case"-":u("numberNeedsDigit");return;case"t":u("true");return;case"f":u("false");return;case"n":u("null");return;case"[":u("arrayNeedsValue");return;case"{":u("objectNeedsKey");return}},v=e.length;n<v;n++){var x=e[n];switch(t[t.length-1]){case"topLevel":b(x);break;case"string":switch(x){case'"':g();break;case"\\":d("stringEscape"),u("stringEscaped");break}break;case"stringEscaped":x==="u"?u("stringUnicode"):(h("stringEscape"),g());break;case"stringUnicode":n-e.lastIndexOf("u",n)===4&&(h("stringEscape"),g());break;case"number":x==="."?f("numberNeedsDigit"):x==="e"||x==="E"?f("numberNeedsExponent"):(x<"0"||x>"9")&&(y(),g());break;case"numberNeedsDigit":f("number");break;case"numberNeedsExponent":f(x==="+"||x==="-"?"numberNeedsDigit":"number");break;case"true":case"false":case"null":(x<"a"||x>"z")&&(y(),g());break;case"arrayNeedsValue":x==="]"?g():d1(x)||(h("collectionItem"),f("arrayNeedsComma"),b(x));break;case"arrayNeedsComma":x==="]"?g():x===","&&(d("collectionItem"),f("arrayNeedsValue"));break;case"objectNeedsKey":x==="}"?g():x==='"'&&(d("collectionItem"),f("objectNeedsColon"),u("string"));break;case"objectNeedsColon":x===":"&&f("objectNeedsValue");break;case"objectNeedsValue":d1(x)||(h("collectionItem"),f("objectNeedsComma"),b(x));break;case"objectNeedsComma":x==="}"?g():x===","&&(d("collectionItem"),f("objectNeedsKey"));break}}a!=null&&(t.length=a);for(var E=[r!=null?e.slice(0,r):e],_=function(O){return E.push(O.slice(e.length-e.lastIndexOf(O[0])))},w=t.length-1;w>=0;w--)switch(t[w]){case"string":E.push('"');break;case"numberNeedsDigit":case"numberNeedsExponent":E.push("0");break;case"true":_("true");break;case"false":_("false");break;case"null":_("null");break;case"arrayNeedsValue":case"arrayNeedsComma":E.push("]");break;case"objectNeedsKey":case"objectNeedsColon":case"objectNeedsValue":case"objectNeedsComma":E.push("}");break}return E.join("")}function a5(){let e=0,t=0;for(let r=0;r<28;r+=7){let a=this.buf[this.pos++];if(e|=(a&127)<<r,(a&128)==0)return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(n&15)<<28,t=(n&112)>>4,(n&128)==0)return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let a=this.buf[this.pos++];if(t|=(a&127)<<r,(a&128)==0)return this.assertBounds(),[e,t]}throw new Error("invalid varint")}function dm(e,t,n){for(let s=0;s<28;s=s+7){const u=e>>>s,f=!(!(u>>>7)&&t==0),d=(f?u|128:u)&255;if(n.push(d),!f)return}const r=e>>>28&15|(t&7)<<4,a=t>>3!=0;if(n.push((a?r|128:r)&255),!!a){for(let s=3;s<31;s=s+7){const u=t>>>s,f=!!(u>>>7),d=(f?u|128:u)&255;if(n.push(d),!f)return}n.push(t>>>31&1)}}const cf=4294967296;function p1(e){const t=e[0]==="-";t&&(e=e.slice(1));const n=1e6;let r=0,a=0;function s(u,f){const d=Number(e.slice(u,f));a*=n,r=r*n+d,r>=cf&&(a=a+(r/cf|0),r=r%cf)}return s(-24,-18),s(-18,-12),s(-12,-6),s(-6),t?g1(r,a):hm(r,a)}function s5(e,t){let n=hm(e,t);const r=n.hi&2147483648;r&&(n=g1(n.lo,n.hi));const a=m1(n.lo,n.hi);return r?"-"+a:a}function m1(e,t){if({lo:e,hi:t}=l5(e,t),t<=2097151)return String(cf*t+e);const n=e&16777215,r=(e>>>24|t<<8)&16777215,a=t>>16&65535;let s=n+r*6777216+a*6710656,u=r+a*8147497,f=a*2;const d=1e7;return s>=d&&(u+=Math.floor(s/d),s%=d),u>=d&&(f+=Math.floor(u/d),u%=d),f.toString()+y1(u)+y1(s)}function l5(e,t){return{lo:e>>>0,hi:t>>>0}}function hm(e,t){return{lo:e|0,hi:t|0}}function g1(e,t){return t=~t,e?e=~e+1:t+=1,hm(e,t)}const y1=e=>{const t=String(e);return"0000000".slice(t.length)+t};function v1(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e=e>>>7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e=e>>7;t.push(1)}}function u5(){let e=this.buf[this.pos++],t=e&127;if((e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<7,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<14,(e&128)==0)return this.assertBounds(),t;if(e=this.buf[this.pos++],t|=(e&127)<<21,(e&128)==0)return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let n=5;(e&128)!==0&&n<10;n++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),t>>>0}const _i=c5();function c5(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(!!globalThis.Deno||typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const n=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),a=BigInt("0"),s=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(u){const f=typeof u=="bigint"?u:BigInt(u);if(f>r||f<n)throw new Error(`invalid int64: ${u}`);return f},uParse(u){const f=typeof u=="bigint"?u:BigInt(u);if(f>s||f<a)throw new Error(`invalid uint64: ${u}`);return f},enc(u){return e.setBigInt64(0,this.parse(u),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(u){return e.setBigInt64(0,this.uParse(u),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(u,f){return e.setInt32(0,u,!0),e.setInt32(4,f,!0),e.getBigInt64(0,!0)},uDec(u,f){return e.setInt32(0,u,!0),e.setInt32(4,f,!0),e.getBigUint64(0,!0)}}}return{zero:"0",supported:!1,parse(n){return typeof n!="string"&&(n=n.toString()),b1(n),n},uParse(n){return typeof n!="string"&&(n=n.toString()),S1(n),n},enc(n){return typeof n!="string"&&(n=n.toString()),b1(n),p1(n)},uEnc(n){return typeof n!="string"&&(n=n.toString()),S1(n),p1(n)},dec(n,r){return s5(n,r)},uDec(n,r){return m1(n,r)}}}function b1(e){if(!/^-?[0-9]+$/.test(e))throw new Error("invalid int64: "+e)}function S1(e){if(!/^[0-9]+$/.test(e))throw new Error("invalid uint64: "+e)}const pm=Symbol.for("@bufbuild/protobuf/text-encoding");function x1(){if(globalThis[pm]==null){const e=new globalThis.TextEncoder,t=new globalThis.TextDecoder;globalThis[pm]={encodeUtf8(n){return e.encode(n)},decodeUtf8(n){return t.decode(n)},checkUtf8(n){try{return encodeURIComponent(n),!0}catch{return!1}}}}return globalThis[pm]}var go;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(go||(go={}));const f5=34028234663852886e22,d5=-34028234663852886e22,h5=4294967295,p5=2147483647,m5=-2147483648;class Lt{constructor(t=x1().encodeUtf8){this.encodeUtf8=t,this.stack=[],this.chunks=[],this.buf=[]}finish(){this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]);let t=0;for(let a=0;a<this.chunks.length;a++)t+=this.chunks[a].length;let n=new Uint8Array(t),r=0;for(let a=0;a<this.chunks.length;a++)n.set(this.chunks[a],r),r+=this.chunks[a].length;return this.chunks=[],n}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let t=this.finish(),n=this.stack.pop();if(!n)throw new Error("invalid state, fork stack empty");return this.chunks=n.chunks,this.buf=n.buf,this.uint32(t.byteLength),this.raw(t)}tag(t,n){return this.uint32((t<<3|n)>>>0)}raw(t){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(t),this}uint32(t){for(E1(t);t>127;)this.buf.push(t&127|128),t=t>>>7;return this.buf.push(t),this}int32(t){return mm(t),v1(t,this.buf),this}bool(t){return this.buf.push(t?1:0),this}bytes(t){return this.uint32(t.byteLength),this.raw(t)}string(t){let n=this.encodeUtf8(t);return this.uint32(n.byteLength),this.raw(n)}float(t){g5(t);let n=new Uint8Array(4);return new DataView(n.buffer).setFloat32(0,t,!0),this.raw(n)}double(t){let n=new Uint8Array(8);return new DataView(n.buffer).setFloat64(0,t,!0),this.raw(n)}fixed32(t){E1(t);let n=new Uint8Array(4);return new DataView(n.buffer).setUint32(0,t,!0),this.raw(n)}sfixed32(t){mm(t);let n=new Uint8Array(4);return new DataView(n.buffer).setInt32(0,t,!0),this.raw(n)}sint32(t){return mm(t),t=(t<<1^t>>31)>>>0,v1(t,this.buf),this}sfixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),a=_i.enc(t);return r.setInt32(0,a.lo,!0),r.setInt32(4,a.hi,!0),this.raw(n)}fixed64(t){let n=new Uint8Array(8),r=new DataView(n.buffer),a=_i.uEnc(t);return r.setInt32(0,a.lo,!0),r.setInt32(4,a.hi,!0),this.raw(n)}int64(t){let n=_i.enc(t);return dm(n.lo,n.hi,this.buf),this}sint64(t){const n=_i.enc(t),r=n.hi>>31,a=n.lo<<1^r,s=(n.hi<<1|n.lo>>>31)^r;return dm(a,s,this.buf),this}uint64(t){const n=_i.uEnc(t);return dm(n.lo,n.hi,this.buf),this}}class Ne{constructor(t,n=x1().decodeUtf8){this.decodeUtf8=n,this.varint64=a5,this.uint32=u5,this.buf=t,this.len=t.length,this.pos=0,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength)}tag(){let t=this.uint32(),n=t>>>3,r=t&7;if(n<=0||r<0||r>5)throw new Error("illegal tag: field no "+n+" wire type "+r);return[n,r]}skip(t,n){let r=this.pos;switch(t){case go.Varint:for(;this.buf[this.pos++]&128;);break;case go.Bit64:this.pos+=4;case go.Bit32:this.pos+=4;break;case go.LengthDelimited:let a=this.uint32();this.pos+=a;break;case go.StartGroup:for(;;){const[s,u]=this.tag();if(u===go.EndGroup){if(n!==void 0&&s!==n)throw new Error("invalid end group tag");break}this.skip(u,s)}break;default:throw new Error("cant skip wire type "+t)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let t=this.uint32();return t>>>1^-(t&1)}int64(){return _i.dec(...this.varint64())}uint64(){return _i.uDec(...this.varint64())}sint64(){let[t,n]=this.varint64(),r=-(t&1);return t=(t>>>1|(n&1)<<31)^r,n=n>>>1^r,_i.dec(t,n)}bool(){let[t,n]=this.varint64();return t!==0||n!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return _i.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return _i.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let t=this.uint32(),n=this.pos;return this.pos+=t,this.assertBounds(),this.buf.subarray(n,n+t)}string(){return this.decodeUtf8(this.bytes())}}function mm(e){if(typeof e=="string")e=Number(e);else if(typeof e!="number")throw new Error("invalid int32: "+typeof e);if(!Number.isInteger(e)||e>p5||e<m5)throw new Error("invalid int32: "+e)}function E1(e){if(typeof e=="string")e=Number(e);else if(typeof e!="number")throw new Error("invalid uint32: "+typeof e);if(!Number.isInteger(e)||e>h5||e<0)throw new Error("invalid uint32: "+e)}function g5(e){if(typeof e=="string"){const t=e;if(e=Number(e),Number.isNaN(e)&&t!=="NaN")throw new Error("invalid float32: "+t)}else if(typeof e!="number")throw new Error("invalid float32: "+typeof e);if(Number.isFinite(e)&&(e>f5||e<d5))throw new Error("invalid float32: "+e)}function gm(){return{fields:{}}}var Ul={encode(e,t=new Lt){return Object.entries(e.fields).forEach(([n,r])=>{r!==void 0&&ym.encode({key:n,value:r},t.uint32(10).fork()).join()}),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=gm();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;const u=ym.decode(n,n.uint32());u.value!==void 0&&(a.fields[u.key]=u.value);continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Ul.fromPartial(e??{})},fromPartial(e){var t;const n=gm();return n.fields=Object.entries((t=e.fields)!=null?t:{}).reduce((r,[a,s])=>(s!==void 0&&(r[a]=s),r),{}),n},wrap(e){const t=gm();if(e!==void 0)for(const n of Object.keys(e))t.fields[n]=e[n];return t},unwrap(e){const t={};if(e.fields)for(const n of Object.keys(e.fields))t[n]=e.fields[n];return t}};function _1(){return{key:"",value:void 0}}var ym={encode(e,t=new Lt){return e.key!==""&&t.uint32(10).string(e.key),e.value!==void 0&&ht.encode(ht.wrap(e.value),t.uint32(18).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=_1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.key=n.string();continue}case 2:{if(s!==18)break;a.value=ht.unwrap(ht.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return ym.fromPartial(e??{})},fromPartial(e){var t,n;const r=_1();return r.key=(t=e.key)!=null?t:"",r.value=(n=e.value)!=null?n:void 0,r}};function vm(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var ht={encode(e,t=new Lt){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&t.uint32(17).double(e.numberValue),e.stringValue!==void 0&&t.uint32(26).string(e.stringValue),e.boolValue!==void 0&&t.uint32(32).bool(e.boolValue),e.structValue!==void 0&&Ul.encode(Ul.wrap(e.structValue),t.uint32(42).fork()).join(),e.listValue!==void 0&&jl.encode(jl.wrap(e.listValue),t.uint32(50).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=vm();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==8)break;a.nullValue=n.int32();continue}case 2:{if(s!==17)break;a.numberValue=n.double();continue}case 3:{if(s!==26)break;a.stringValue=n.string();continue}case 4:{if(s!==32)break;a.boolValue=n.bool();continue}case 5:{if(s!==42)break;a.structValue=Ul.unwrap(Ul.decode(n,n.uint32()));continue}case 6:{if(s!==50)break;a.listValue=jl.unwrap(jl.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return ht.fromPartial(e??{})},fromPartial(e){var t,n,r,a,s,u;const f=vm();return f.nullValue=(t=e.nullValue)!=null?t:void 0,f.numberValue=(n=e.numberValue)!=null?n:void 0,f.stringValue=(r=e.stringValue)!=null?r:void 0,f.boolValue=(a=e.boolValue)!=null?a:void 0,f.structValue=(s=e.structValue)!=null?s:void 0,f.listValue=(u=e.listValue)!=null?u:void 0,f},wrap(e){const t=vm();if(e===null)t.nullValue=0;else if(typeof e=="boolean")t.boolValue=e;else if(typeof e=="number")t.numberValue=e;else if(typeof e=="string")t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if(typeof e=="object")t.structValue=e;else if(typeof e<"u")throw new globalThis.Error("Unsupported any value type: "+typeof e);return t},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function bm(){return{values:[]}}var jl={encode(e,t=new Lt){for(const n of e.values)ht.encode(ht.wrap(n),t.uint32(10).fork()).join();return t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=bm();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.values.push(ht.unwrap(ht.decode(n,n.uint32())));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return jl.fromPartial(e??{})},fromPartial(e){var t;const n=bm();return n.values=((t=e.values)==null?void 0:t.map(r=>r))||[],n},wrap(e){const t=bm();return t.values=e??[],t},unwrap(e){return e?.hasOwnProperty("values")&&globalThis.Array.isArray(e.values)?e.values:e}},w1=(e=>(e[e.ADD=0]="ADD",e[e.REMOVE=1]="REMOVE",e[e.REPLACE=2]="REPLACE",e[e.MOVE=3]="MOVE",e[e.COPY=4]="COPY",e[e.TEST=5]="TEST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e))(w1||{});function C1(){return{op:0,path:"",from:void 0,value:void 0}}var ff={encode(e,t=new Lt){return e.op!==0&&t.uint32(8).int32(e.op),e.path!==""&&t.uint32(18).string(e.path),e.from!==void 0&&t.uint32(26).string(e.from),e.value!==void 0&&ht.encode(ht.wrap(e.value),t.uint32(34).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=C1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==8)break;a.op=n.int32();continue}case 2:{if(s!==18)break;a.path=n.string();continue}case 3:{if(s!==26)break;a.from=n.string();continue}case 4:{if(s!==34)break;a.value=ht.unwrap(ht.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return ff.fromPartial(e??{})},fromPartial(e){var t,n,r,a;const s=C1();return s.op=(t=e.op)!=null?t:0,s.path=(n=e.path)!=null?n:"",s.from=(r=e.from)!=null?r:void 0,s.value=(a=e.value)!=null?a:void 0,s}};function T1(){return{id:"",type:"",function:void 0}}var df={encode(e,t=new Lt){return e.id!==""&&t.uint32(10).string(e.id),e.type!==""&&t.uint32(18).string(e.type),e.function!==void 0&&hf.encode(e.function,t.uint32(26).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=T1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.id=n.string();continue}case 2:{if(s!==18)break;a.type=n.string();continue}case 3:{if(s!==26)break;a.function=hf.decode(n,n.uint32());continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return df.fromPartial(e??{})},fromPartial(e){var t,n;const r=T1();return r.id=(t=e.id)!=null?t:"",r.type=(n=e.type)!=null?n:"",r.function=e.function!==void 0&&e.function!==null?hf.fromPartial(e.function):void 0,r}};function A1(){return{name:"",arguments:""}}var hf={encode(e,t=new Lt){return e.name!==""&&t.uint32(10).string(e.name),e.arguments!==""&&t.uint32(18).string(e.arguments),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=A1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.name=n.string();continue}case 2:{if(s!==18)break;a.arguments=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return hf.fromPartial(e??{})},fromPartial(e){var t,n;const r=A1();return r.name=(t=e.name)!=null?t:"",r.arguments=(n=e.arguments)!=null?n:"",r}};function k1(){return{id:"",role:"",content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0}}var pf={encode(e,t=new Lt){e.id!==""&&t.uint32(10).string(e.id),e.role!==""&&t.uint32(18).string(e.role),e.content!==void 0&&t.uint32(26).string(e.content),e.name!==void 0&&t.uint32(34).string(e.name);for(const n of e.toolCalls)df.encode(n,t.uint32(42).fork()).join();return e.toolCallId!==void 0&&t.uint32(50).string(e.toolCallId),e.error!==void 0&&t.uint32(58).string(e.error),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=k1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.id=n.string();continue}case 2:{if(s!==18)break;a.role=n.string();continue}case 3:{if(s!==26)break;a.content=n.string();continue}case 4:{if(s!==34)break;a.name=n.string();continue}case 5:{if(s!==42)break;a.toolCalls.push(df.decode(n,n.uint32()));continue}case 6:{if(s!==50)break;a.toolCallId=n.string();continue}case 7:{if(s!==58)break;a.error=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return pf.fromPartial(e??{})},fromPartial(e){var t,n,r,a,s,u,f;const d=k1();return d.id=(t=e.id)!=null?t:"",d.role=(n=e.role)!=null?n:"",d.content=(r=e.content)!=null?r:void 0,d.name=(a=e.name)!=null?a:void 0,d.toolCalls=((s=e.toolCalls)==null?void 0:s.map(h=>df.fromPartial(h)))||[],d.toolCallId=(u=e.toolCallId)!=null?u:void 0,d.error=(f=e.error)!=null?f:void 0,d}},R1=(e=>(e[e.TEXT_MESSAGE_START=0]="TEXT_MESSAGE_START",e[e.TEXT_MESSAGE_CONTENT=1]="TEXT_MESSAGE_CONTENT",e[e.TEXT_MESSAGE_END=2]="TEXT_MESSAGE_END",e[e.TOOL_CALL_START=3]="TOOL_CALL_START",e[e.TOOL_CALL_ARGS=4]="TOOL_CALL_ARGS",e[e.TOOL_CALL_END=5]="TOOL_CALL_END",e[e.STATE_SNAPSHOT=6]="STATE_SNAPSHOT",e[e.STATE_DELTA=7]="STATE_DELTA",e[e.MESSAGES_SNAPSHOT=8]="MESSAGES_SNAPSHOT",e[e.RAW=9]="RAW",e[e.CUSTOM=10]="CUSTOM",e[e.RUN_STARTED=11]="RUN_STARTED",e[e.RUN_FINISHED=12]="RUN_FINISHED",e[e.RUN_ERROR=13]="RUN_ERROR",e[e.STEP_STARTED=14]="STEP_STARTED",e[e.STEP_FINISHED=15]="STEP_FINISHED",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e))(R1||{});function O1(){return{type:0,timestamp:void 0,rawEvent:void 0}}var De={encode(e,t=new Lt){return e.type!==0&&t.uint32(8).int32(e.type),e.timestamp!==void 0&&t.uint32(16).int64(e.timestamp),e.rawEvent!==void 0&&ht.encode(ht.wrap(e.rawEvent),t.uint32(26).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=O1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==8)break;a.type=n.int32();continue}case 2:{if(s!==16)break;a.timestamp=y5(n.int64());continue}case 3:{if(s!==26)break;a.rawEvent=ht.unwrap(ht.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return De.fromPartial(e??{})},fromPartial(e){var t,n,r;const a=O1();return a.type=(t=e.type)!=null?t:0,a.timestamp=(n=e.timestamp)!=null?n:void 0,a.rawEvent=(r=e.rawEvent)!=null?r:void 0,a}};function N1(){return{baseEvent:void 0,messageId:"",role:void 0}}var mf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==""&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=N1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messageId=n.string();continue}case 3:{if(s!==26)break;a.role=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return mf.fromPartial(e??{})},fromPartial(e){var t,n;const r=N1();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,r.messageId=(t=e.messageId)!=null?t:"",r.role=(n=e.role)!=null?n:void 0,r}};function I1(){return{baseEvent:void 0,messageId:"",delta:""}}var gf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==""&&t.uint32(18).string(e.messageId),e.delta!==""&&t.uint32(26).string(e.delta),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=I1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messageId=n.string();continue}case 3:{if(s!==26)break;a.delta=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return gf.fromPartial(e??{})},fromPartial(e){var t,n;const r=I1();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,r.messageId=(t=e.messageId)!=null?t:"",r.delta=(n=e.delta)!=null?n:"",r}};function M1(){return{baseEvent:void 0,messageId:""}}var yf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==""&&t.uint32(18).string(e.messageId),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=M1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messageId=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return yf.fromPartial(e??{})},fromPartial(e){var t;const n=M1();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,n.messageId=(t=e.messageId)!=null?t:"",n}};function D1(){return{baseEvent:void 0,toolCallId:"",toolCallName:"",parentMessageId:void 0}}var vf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==""&&t.uint32(18).string(e.toolCallId),e.toolCallName!==""&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=D1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.toolCallId=n.string();continue}case 3:{if(s!==26)break;a.toolCallName=n.string();continue}case 4:{if(s!==34)break;a.parentMessageId=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return vf.fromPartial(e??{})},fromPartial(e){var t,n,r;const a=D1();return a.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,a.toolCallId=(t=e.toolCallId)!=null?t:"",a.toolCallName=(n=e.toolCallName)!=null?n:"",a.parentMessageId=(r=e.parentMessageId)!=null?r:void 0,a}};function B1(){return{baseEvent:void 0,toolCallId:"",delta:""}}var bf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==""&&t.uint32(18).string(e.toolCallId),e.delta!==""&&t.uint32(26).string(e.delta),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=B1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.toolCallId=n.string();continue}case 3:{if(s!==26)break;a.delta=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return bf.fromPartial(e??{})},fromPartial(e){var t,n;const r=B1();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,r.toolCallId=(t=e.toolCallId)!=null?t:"",r.delta=(n=e.delta)!=null?n:"",r}};function z1(){return{baseEvent:void 0,toolCallId:""}}var Sf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==""&&t.uint32(18).string(e.toolCallId),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=z1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.toolCallId=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Sf.fromPartial(e??{})},fromPartial(e){var t;const n=z1();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,n.toolCallId=(t=e.toolCallId)!=null?t:"",n}};function L1(){return{baseEvent:void 0,snapshot:void 0}}var xf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.snapshot!==void 0&&ht.encode(ht.wrap(e.snapshot),t.uint32(18).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=L1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.snapshot=ht.unwrap(ht.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return xf.fromPartial(e??{})},fromPartial(e){var t;const n=L1();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,n.snapshot=(t=e.snapshot)!=null?t:void 0,n}};function $1(){return{baseEvent:void 0,delta:[]}}var Ef={encode(e,t=new Lt){e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join();for(const n of e.delta)ff.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=$1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.delta.push(ff.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Ef.fromPartial(e??{})},fromPartial(e){var t;const n=$1();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,n.delta=((t=e.delta)==null?void 0:t.map(r=>ff.fromPartial(r)))||[],n}};function P1(){return{baseEvent:void 0,messages:[]}}var _f={encode(e,t=new Lt){e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join();for(const n of e.messages)pf.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=P1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messages.push(pf.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return _f.fromPartial(e??{})},fromPartial(e){var t;const n=P1();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,n.messages=((t=e.messages)==null?void 0:t.map(r=>pf.fromPartial(r)))||[],n}};function U1(){return{baseEvent:void 0,event:void 0,source:void 0}}var wf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.event!==void 0&&ht.encode(ht.wrap(e.event),t.uint32(18).fork()).join(),e.source!==void 0&&t.uint32(26).string(e.source),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=U1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.event=ht.unwrap(ht.decode(n,n.uint32()));continue}case 3:{if(s!==26)break;a.source=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return wf.fromPartial(e??{})},fromPartial(e){var t,n;const r=U1();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,r.event=(t=e.event)!=null?t:void 0,r.source=(n=e.source)!=null?n:void 0,r}};function j1(){return{baseEvent:void 0,name:"",value:void 0}}var Cf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.name!==""&&t.uint32(18).string(e.name),e.value!==void 0&&ht.encode(ht.wrap(e.value),t.uint32(26).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=j1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.name=n.string();continue}case 3:{if(s!==26)break;a.value=ht.unwrap(ht.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Cf.fromPartial(e??{})},fromPartial(e){var t,n;const r=j1();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,r.name=(t=e.name)!=null?t:"",r.value=(n=e.value)!=null?n:void 0,r}};function H1(){return{baseEvent:void 0,threadId:"",runId:""}}var Tf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==""&&t.uint32(18).string(e.threadId),e.runId!==""&&t.uint32(26).string(e.runId),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=H1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.threadId=n.string();continue}case 3:{if(s!==26)break;a.runId=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Tf.fromPartial(e??{})},fromPartial(e){var t,n;const r=H1();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,r.threadId=(t=e.threadId)!=null?t:"",r.runId=(n=e.runId)!=null?n:"",r}};function V1(){return{baseEvent:void 0,threadId:"",runId:"",result:void 0}}var Af={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==""&&t.uint32(18).string(e.threadId),e.runId!==""&&t.uint32(26).string(e.runId),e.result!==void 0&&ht.encode(ht.wrap(e.result),t.uint32(34).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=V1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.threadId=n.string();continue}case 3:{if(s!==26)break;a.runId=n.string();continue}case 4:{if(s!==34)break;a.result=ht.unwrap(ht.decode(n,n.uint32()));continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Af.fromPartial(e??{})},fromPartial(e){var t,n,r;const a=V1();return a.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,a.threadId=(t=e.threadId)!=null?t:"",a.runId=(n=e.runId)!=null?n:"",a.result=(r=e.result)!=null?r:void 0,a}};function F1(){return{baseEvent:void 0,code:void 0,message:""}}var kf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.code!==void 0&&t.uint32(18).string(e.code),e.message!==""&&t.uint32(26).string(e.message),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=F1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.code=n.string();continue}case 3:{if(s!==26)break;a.message=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return kf.fromPartial(e??{})},fromPartial(e){var t,n;const r=F1();return r.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,r.code=(t=e.code)!=null?t:void 0,r.message=(n=e.message)!=null?n:"",r}};function G1(){return{baseEvent:void 0,stepName:""}}var Rf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==""&&t.uint32(18).string(e.stepName),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=G1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.stepName=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Rf.fromPartial(e??{})},fromPartial(e){var t;const n=G1();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,n.stepName=(t=e.stepName)!=null?t:"",n}};function q1(){return{baseEvent:void 0,stepName:""}}var Of={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==""&&t.uint32(18).string(e.stepName),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=q1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.stepName=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Of.fromPartial(e??{})},fromPartial(e){var t;const n=q1();return n.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,n.stepName=(t=e.stepName)!=null?t:"",n}};function Y1(){return{baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0}}var Nf={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==void 0&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.delta!==void 0&&t.uint32(34).string(e.delta),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=Y1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.messageId=n.string();continue}case 3:{if(s!==26)break;a.role=n.string();continue}case 4:{if(s!==34)break;a.delta=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return Nf.fromPartial(e??{})},fromPartial(e){var t,n,r;const a=Y1();return a.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,a.messageId=(t=e.messageId)!=null?t:void 0,a.role=(n=e.role)!=null?n:void 0,a.delta=(r=e.delta)!=null?r:void 0,a}};function X1(){return{baseEvent:void 0,toolCallId:void 0,toolCallName:void 0,parentMessageId:void 0,delta:void 0}}var If={encode(e,t=new Lt){return e.baseEvent!==void 0&&De.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==void 0&&t.uint32(18).string(e.toolCallId),e.toolCallName!==void 0&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.delta!==void 0&&t.uint32(42).string(e.delta),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=X1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.baseEvent=De.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.toolCallId=n.string();continue}case 3:{if(s!==26)break;a.toolCallName=n.string();continue}case 4:{if(s!==34)break;a.parentMessageId=n.string();continue}case 5:{if(s!==42)break;a.delta=n.string();continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return If.fromPartial(e??{})},fromPartial(e){var t,n,r,a;const s=X1();return s.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?De.fromPartial(e.baseEvent):void 0,s.toolCallId=(t=e.toolCallId)!=null?t:void 0,s.toolCallName=(n=e.toolCallName)!=null?n:void 0,s.parentMessageId=(r=e.parentMessageId)!=null?r:void 0,s.delta=(a=e.delta)!=null?a:void 0,s}};function Z1(){return{textMessageStart:void 0,textMessageContent:void 0,textMessageEnd:void 0,toolCallStart:void 0,toolCallArgs:void 0,toolCallEnd:void 0,stateSnapshot:void 0,stateDelta:void 0,messagesSnapshot:void 0,raw:void 0,custom:void 0,runStarted:void 0,runFinished:void 0,runError:void 0,stepStarted:void 0,stepFinished:void 0,textMessageChunk:void 0,toolCallChunk:void 0}}var K1={encode(e,t=new Lt){return e.textMessageStart!==void 0&&mf.encode(e.textMessageStart,t.uint32(10).fork()).join(),e.textMessageContent!==void 0&&gf.encode(e.textMessageContent,t.uint32(18).fork()).join(),e.textMessageEnd!==void 0&&yf.encode(e.textMessageEnd,t.uint32(26).fork()).join(),e.toolCallStart!==void 0&&vf.encode(e.toolCallStart,t.uint32(34).fork()).join(),e.toolCallArgs!==void 0&&bf.encode(e.toolCallArgs,t.uint32(42).fork()).join(),e.toolCallEnd!==void 0&&Sf.encode(e.toolCallEnd,t.uint32(50).fork()).join(),e.stateSnapshot!==void 0&&xf.encode(e.stateSnapshot,t.uint32(58).fork()).join(),e.stateDelta!==void 0&&Ef.encode(e.stateDelta,t.uint32(66).fork()).join(),e.messagesSnapshot!==void 0&&_f.encode(e.messagesSnapshot,t.uint32(74).fork()).join(),e.raw!==void 0&&wf.encode(e.raw,t.uint32(82).fork()).join(),e.custom!==void 0&&Cf.encode(e.custom,t.uint32(90).fork()).join(),e.runStarted!==void 0&&Tf.encode(e.runStarted,t.uint32(98).fork()).join(),e.runFinished!==void 0&&Af.encode(e.runFinished,t.uint32(106).fork()).join(),e.runError!==void 0&&kf.encode(e.runError,t.uint32(114).fork()).join(),e.stepStarted!==void 0&&Rf.encode(e.stepStarted,t.uint32(122).fork()).join(),e.stepFinished!==void 0&&Of.encode(e.stepFinished,t.uint32(130).fork()).join(),e.textMessageChunk!==void 0&&Nf.encode(e.textMessageChunk,t.uint32(138).fork()).join(),e.toolCallChunk!==void 0&&If.encode(e.toolCallChunk,t.uint32(146).fork()).join(),t},decode(e,t){const n=e instanceof Ne?e:new Ne(e),r=t===void 0?n.len:n.pos+t,a=Z1();for(;n.pos<r;){const s=n.uint32();switch(s>>>3){case 1:{if(s!==10)break;a.textMessageStart=mf.decode(n,n.uint32());continue}case 2:{if(s!==18)break;a.textMessageContent=gf.decode(n,n.uint32());continue}case 3:{if(s!==26)break;a.textMessageEnd=yf.decode(n,n.uint32());continue}case 4:{if(s!==34)break;a.toolCallStart=vf.decode(n,n.uint32());continue}case 5:{if(s!==42)break;a.toolCallArgs=bf.decode(n,n.uint32());continue}case 6:{if(s!==50)break;a.toolCallEnd=Sf.decode(n,n.uint32());continue}case 7:{if(s!==58)break;a.stateSnapshot=xf.decode(n,n.uint32());continue}case 8:{if(s!==66)break;a.stateDelta=Ef.decode(n,n.uint32());continue}case 9:{if(s!==74)break;a.messagesSnapshot=_f.decode(n,n.uint32());continue}case 10:{if(s!==82)break;a.raw=wf.decode(n,n.uint32());continue}case 11:{if(s!==90)break;a.custom=Cf.decode(n,n.uint32());continue}case 12:{if(s!==98)break;a.runStarted=Tf.decode(n,n.uint32());continue}case 13:{if(s!==106)break;a.runFinished=Af.decode(n,n.uint32());continue}case 14:{if(s!==114)break;a.runError=kf.decode(n,n.uint32());continue}case 15:{if(s!==122)break;a.stepStarted=Rf.decode(n,n.uint32());continue}case 16:{if(s!==130)break;a.stepFinished=Of.decode(n,n.uint32());continue}case 17:{if(s!==138)break;a.textMessageChunk=Nf.decode(n,n.uint32());continue}case 18:{if(s!==146)break;a.toolCallChunk=If.decode(n,n.uint32());continue}}if((s&7)===4||s===0)break;n.skip(s&7)}return a},create(e){return K1.fromPartial(e??{})},fromPartial(e){const t=Z1();return t.textMessageStart=e.textMessageStart!==void 0&&e.textMessageStart!==null?mf.fromPartial(e.textMessageStart):void 0,t.textMessageContent=e.textMessageContent!==void 0&&e.textMessageContent!==null?gf.fromPartial(e.textMessageContent):void 0,t.textMessageEnd=e.textMessageEnd!==void 0&&e.textMessageEnd!==null?yf.fromPartial(e.textMessageEnd):void 0,t.toolCallStart=e.toolCallStart!==void 0&&e.toolCallStart!==null?vf.fromPartial(e.toolCallStart):void 0,t.toolCallArgs=e.toolCallArgs!==void 0&&e.toolCallArgs!==null?bf.fromPartial(e.toolCallArgs):void 0,t.toolCallEnd=e.toolCallEnd!==void 0&&e.toolCallEnd!==null?Sf.fromPartial(e.toolCallEnd):void 0,t.stateSnapshot=e.stateSnapshot!==void 0&&e.stateSnapshot!==null?xf.fromPartial(e.stateSnapshot):void 0,t.stateDelta=e.stateDelta!==void 0&&e.stateDelta!==null?Ef.fromPartial(e.stateDelta):void 0,t.messagesSnapshot=e.messagesSnapshot!==void 0&&e.messagesSnapshot!==null?_f.fromPartial(e.messagesSnapshot):void 0,t.raw=e.raw!==void 0&&e.raw!==null?wf.fromPartial(e.raw):void 0,t.custom=e.custom!==void 0&&e.custom!==null?Cf.fromPartial(e.custom):void 0,t.runStarted=e.runStarted!==void 0&&e.runStarted!==null?Tf.fromPartial(e.runStarted):void 0,t.runFinished=e.runFinished!==void 0&&e.runFinished!==null?Af.fromPartial(e.runFinished):void 0,t.runError=e.runError!==void 0&&e.runError!==null?kf.fromPartial(e.runError):void 0,t.stepStarted=e.stepStarted!==void 0&&e.stepStarted!==null?Rf.fromPartial(e.stepStarted):void 0,t.stepFinished=e.stepFinished!==void 0&&e.stepFinished!==null?Of.fromPartial(e.stepFinished):void 0,t.textMessageChunk=e.textMessageChunk!==void 0&&e.textMessageChunk!==null?Nf.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=e.toolCallChunk!==void 0&&e.toolCallChunk!==null?If.fromPartial(e.toolCallChunk):void 0,t}};function y5(e){const t=globalThis.Number(e.toString());if(t>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");if(t<globalThis.Number.MIN_SAFE_INTEGER)throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");return t}function v5(e){var t;const n=K1.decode(e),r=Object.values(n).find(a=>a!==void 0);if(!r)throw new Error("Invalid event");if(r.type=R1[r.baseEvent.type],r.timestamp=r.baseEvent.timestamp,r.rawEvent=r.baseEvent.rawEvent,r.type===fe.MESSAGES_SNAPSHOT)for(const a of r.messages){const s=a;((t=s.toolCalls)==null?void 0:t.length)===0&&(s.toolCalls=void 0)}if(r.type===fe.STATE_DELTA)for(const a of r.delta)a.op=w1[a.op].toLowerCase(),Object.keys(a).forEach(s=>{a[s]===void 0&&delete a[s]});return Object.keys(r).forEach(a=>{r[a]===void 0&&delete r[a]}),OS.parse(r)}var b5="application/vnd.ag-ui.event+proto";const S5=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,W1=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(S5);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Q1=e=>e==="*"||e==="x"||e==="X",J1=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},x5=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],E5=(e,t)=>{if(Q1(e)||Q1(t))return 0;const[n,r]=x5(J1(e),J1(t));return n>r?1:n<r?-1:0},ex=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=E5(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0},_5=(e,t)=>{const n=W1(e),r=W1(t),a=n.pop(),s=r.pop(),u=ex(n,r);return u!==0?u:a&&s?ex(a.split("."),s.split(".")):a||s?a?-1:1:0};var w5=Object.defineProperty,C5=Object.defineProperties,T5=Object.getOwnPropertyDescriptors,Mf=Object.getOwnPropertySymbols,tx=Object.prototype.hasOwnProperty,nx=Object.prototype.propertyIsEnumerable,rx=(e,t,n)=>t in e?w5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zn=(e,t)=>{for(var n in t||(t={}))tx.call(t,n)&&rx(e,n,t[n]);if(Mf)for(var n of Mf(t))nx.call(t,n)&&rx(e,n,t[n]);return e},yo=(e,t)=>C5(e,T5(t)),A5=(e,t)=>{var n={};for(var r in e)tx.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Mf)for(var r of Mf(e))t.indexOf(r)<0&&nx.call(e,r)&&(n[r]=e[r]);return n},$t=e=>{if(typeof structuredClone=="function")return structuredClone(e);try{return JSON.parse(JSON.stringify(e))}catch{return Zn({},e)}};async function tn(e,t,n,r){let a=t,s=n,u;for(let f of e)try{let d=await r(f,$t(a),$t(s));if(d===void 0)continue;if(d.messages!==void 0&&(a=d.messages),d.state!==void 0&&(s=d.state),u=d.stopPropagation,u===!0)break}catch(d){process.env.JEST_WORKER_ID!==void 0||console.error("Subscriber error:",d);continue}return Zn(Zn(Zn({},JSON.stringify(a)!==JSON.stringify(t)?{messages:a}:{}),JSON.stringify(s)!==JSON.stringify(n)?{state:s}:{}),u!==void 0?{stopPropagation:u}:{})}var ix=(e,t,n,r)=>{let a=$t(n.messages),s=$t(e.state),u={},f=h=>{h.messages!==void 0&&(a=h.messages,u.messages=h.messages),h.state!==void 0&&(s=h.state,u.state=h.state)},d=()=>{let h=$t(u);return u={},h.messages!==void 0||h.state!==void 0?vn(h):t1};return t.pipe(JS(async h=>{var g,y,b,v;let x=await tn(r,a,s,(E,_,w)=>{var O;return(O=E.onEvent)==null?void 0:O.call(E,{event:h,agent:n,input:e,messages:_,state:w})});if(f(x),x.stopPropagation===!0)return d();switch(h.type){case fe.TEXT_MESSAGE_START:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onTextMessageStartEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});if(f(E),E.stopPropagation!==!0){let{messageId:_,role:w="assistant"}=h,O={id:_,role:w,content:""};a.push(O),f({messages:a})}return d()}case fe.TEXT_MESSAGE_CONTENT:{let{messageId:E,delta:_}=h,w=a.find(T=>T.id===E);if(!w)return console.warn(`TEXT_MESSAGE_CONTENT: No message found with ID '${E}'`),d();let O=await tn(r,a,s,(T,A,M)=>{var R;return(R=T.onTextMessageContentEvent)==null?void 0:R.call(T,{event:h,messages:A,state:M,agent:n,input:e,textMessageBuffer:typeof w.content=="string"?w.content:""})});if(f(O),O.stopPropagation!==!0){let T=typeof w.content=="string"?w.content:"";w.content=`${T}${_}`,f({messages:a})}return d()}case fe.TEXT_MESSAGE_END:{let{messageId:E}=h,_=a.find(O=>O.id===E);if(!_)return console.warn(`TEXT_MESSAGE_END: No message found with ID '${E}'`),d();let w=await tn(r,a,s,(O,T,A)=>{var M;return(M=O.onTextMessageEndEvent)==null?void 0:M.call(O,{event:h,messages:T,state:A,agent:n,input:e,textMessageBuffer:typeof _.content=="string"?_.content:""})});return f(w),await Promise.all(r.map(O=>{var T;(T=O.onNewMessage)==null||T.call(O,{message:_,messages:a,state:s,agent:n,input:e})})),d()}case fe.TOOL_CALL_START:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onToolCallStartEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});if(f(E),E.stopPropagation!==!0){let{toolCallId:_,toolCallName:w,parentMessageId:O}=h,T;O&&a.length>0&&a[a.length-1].id===O?T=a[a.length-1]:(T={id:O||_,role:"assistant",toolCalls:[]},a.push(T)),T.toolCalls!=null||(T.toolCalls=[]),T.toolCalls.push({id:_,type:"function",function:{name:w,arguments:""}}),f({messages:a})}return d()}case fe.TOOL_CALL_ARGS:{let{toolCallId:E,delta:_}=h,w=a.find(A=>{var M;return(M=A.toolCalls)==null?void 0:M.some(R=>R.id===E)});if(!w)return console.warn(`TOOL_CALL_ARGS: No message found containing tool call with ID '${E}'`),d();let O=w.toolCalls.find(A=>A.id===E);if(!O)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${E}'`),d();let T=await tn(r,a,s,(A,M,R)=>{var $;let H=O.function.arguments,V=O.function.name,K={};try{K=h1(H)}catch{}return($=A.onToolCallArgsEvent)==null?void 0:$.call(A,{event:h,messages:M,state:R,agent:n,input:e,toolCallBuffer:H,toolCallName:V,partialToolCallArgs:K})});return f(T),T.stopPropagation!==!0&&(O.function.arguments+=_,f({messages:a})),d()}case fe.TOOL_CALL_END:{let{toolCallId:E}=h,_=a.find(T=>{var A;return(A=T.toolCalls)==null?void 0:A.some(M=>M.id===E)});if(!_)return console.warn(`TOOL_CALL_END: No message found containing tool call with ID '${E}'`),d();let w=_.toolCalls.find(T=>T.id===E);if(!w)return console.warn(`TOOL_CALL_END: No tool call found with ID '${E}'`),d();let O=await tn(r,a,s,(T,A,M)=>{var R;let $=w.function.arguments,H=w.function.name,V={};try{V=JSON.parse($)}catch{}return(R=T.onToolCallEndEvent)==null?void 0:R.call(T,{event:h,messages:A,state:M,agent:n,input:e,toolCallName:H,toolCallArgs:V})});return f(O),await Promise.all(r.map(T=>{var A;(A=T.onNewToolCall)==null||A.call(T,{toolCall:w,messages:a,state:s,agent:n,input:e})})),d()}case fe.TOOL_CALL_RESULT:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onToolCallResultEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});if(f(E),E.stopPropagation!==!0){let{messageId:_,toolCallId:w,content:O,role:T}=h,A={id:_,toolCallId:w,role:T||"tool",content:O};a.push(A),await Promise.all(r.map(M=>{var R;(R=M.onNewMessage)==null||R.call(M,{message:A,messages:a,state:s,agent:n,input:e})})),f({messages:a})}return d()}case fe.STATE_SNAPSHOT:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onStateSnapshotEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});if(f(E),E.stopPropagation!==!0){let{snapshot:_}=h;s=_,f({state:s})}return d()}case fe.STATE_DELTA:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onStateDeltaEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});if(f(E),E.stopPropagation!==!0){let{delta:_}=h;try{s=ss(s,_,!0,!1).newDocument,f({state:s})}catch(w){let O=w instanceof Error?w.message:String(w);console.warn(`Failed to apply state patch:
|
|
151
151
|
Current state: ${JSON.stringify(s,null,2)}
|
|
152
152
|
Patch operations: ${JSON.stringify(_,null,2)}
|
|
153
|
-
Error: ${O}`)}}return d()}case fe.MESSAGES_SNAPSHOT:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onMessagesSnapshotEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});if(f(E),E.stopPropagation!==!0){let{messages:_}=h;a=_,f({messages:a})}return d()}case fe.ACTIVITY_SNAPSHOT:{let E=h,_=a.findIndex(M=>M.id===E.messageId),w=_>=0?a[_]:void 0,O=w?.role==="activity"?w:void 0,T=(g=E.replace)!=null?g:!0,A=await tn(r,a,s,(M,R,$)=>{var H;return(H=M.onActivitySnapshotEvent)==null?void 0:H.call(M,{event:E,messages:R,state:$,agent:n,input:e,activityMessage:O,existingMessage:w})});if(f(A),A.stopPropagation!==!0){let M={id:E.messageId,role:"activity",activityType:E.activityType,content:$t(E.content)},R;_===-1?(a.push(M),R=M):O?T&&(a[_]=yo(Zn({},O),{activityType:E.activityType,content:$t(E.content)})):T&&(a[_]=M,R=M),f({messages:a}),R&&await Promise.all(r.map($=>{var H;return(H=$.onNewMessage)==null?void 0:H.call($,{message:R,messages:a,state:s,agent:n,input:e})}))}return d()}case fe.ACTIVITY_DELTA:{let E=h,_=a.findIndex(A=>A.id===E.messageId);if(_===-1)return console.warn(`ACTIVITY_DELTA: No message found with ID '${E.messageId}' to apply patch`),d();let w=a[_];if(w.role!=="activity")return console.warn(`ACTIVITY_DELTA: Message '${E.messageId}' is not an activity message`),d();let O=w,T=await tn(r,a,s,(A,M,R)=>{var $;return($=A.onActivityDeltaEvent)==null?void 0:$.call(A,{event:E,messages:M,state:R,agent:n,input:e,activityMessage:O})});if(f(T),T.stopPropagation!==!0)try{let A=$t((y=O.content)!=null?y:{}),M=
|
|
153
|
+
Error: ${O}`)}}return d()}case fe.MESSAGES_SNAPSHOT:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onMessagesSnapshotEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});if(f(E),E.stopPropagation!==!0){let{messages:_}=h;a=_,f({messages:a})}return d()}case fe.ACTIVITY_SNAPSHOT:{let E=h,_=a.findIndex(M=>M.id===E.messageId),w=_>=0?a[_]:void 0,O=w?.role==="activity"?w:void 0,T=(g=E.replace)!=null?g:!0,A=await tn(r,a,s,(M,R,$)=>{var H;return(H=M.onActivitySnapshotEvent)==null?void 0:H.call(M,{event:E,messages:R,state:$,agent:n,input:e,activityMessage:O,existingMessage:w})});if(f(A),A.stopPropagation!==!0){let M={id:E.messageId,role:"activity",activityType:E.activityType,content:$t(E.content)},R;_===-1?(a.push(M),R=M):O?T&&(a[_]=yo(Zn({},O),{activityType:E.activityType,content:$t(E.content)})):T&&(a[_]=M,R=M),f({messages:a}),R&&await Promise.all(r.map($=>{var H;return(H=$.onNewMessage)==null?void 0:H.call($,{message:R,messages:a,state:s,agent:n,input:e})}))}return d()}case fe.ACTIVITY_DELTA:{let E=h,_=a.findIndex(A=>A.id===E.messageId);if(_===-1)return console.warn(`ACTIVITY_DELTA: No message found with ID '${E.messageId}' to apply patch`),d();let w=a[_];if(w.role!=="activity")return console.warn(`ACTIVITY_DELTA: Message '${E.messageId}' is not an activity message`),d();let O=w,T=await tn(r,a,s,(A,M,R)=>{var $;return($=A.onActivityDeltaEvent)==null?void 0:$.call(A,{event:E,messages:M,state:R,agent:n,input:e,activityMessage:O})});if(f(T),T.stopPropagation!==!0)try{let A=$t((y=O.content)!=null?y:{}),M=ss(A,(b=E.patch)!=null?b:[],!0,!1).newDocument;a[_]=yo(Zn({},O),{content:$t(M),activityType:E.activityType}),f({messages:a})}catch(A){let M=A instanceof Error?A.message:String(A);console.warn(`Failed to apply activity patch for '${E.messageId}': ${M}`)}return d()}case fe.RAW:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onRawEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});return f(E),d()}case fe.CUSTOM:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onCustomEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});return f(E),d()}case fe.RUN_STARTED:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onRunStartedEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});if(f(E),E.stopPropagation!==!0){let _=h;if((v=_.input)!=null&&v.messages){for(let w of _.input.messages)a.find(O=>O.id===w.id)||a.push(w);f({messages:a})}}return d()}case fe.RUN_FINISHED:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onRunFinishedEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e,result:h.result})});return f(E),d()}case fe.RUN_ERROR:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onRunErrorEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});return f(E),d()}case fe.STEP_STARTED:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onStepStartedEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});return f(E),d()}case fe.STEP_FINISHED:{let E=await tn(r,a,s,(_,w,O)=>{var T;return(T=_.onStepFinishedEvent)==null?void 0:T.call(_,{event:h,messages:w,state:O,agent:n,input:e})});return f(E),d()}case fe.TEXT_MESSAGE_CHUNK:throw new Error("TEXT_MESSAGE_CHUNK must be tranformed before being applied");case fe.TOOL_CALL_CHUNK:throw new Error("TOOL_CALL_CHUNK must be tranformed before being applied");case fe.THINKING_START:return d();case fe.THINKING_END:return d();case fe.THINKING_TEXT_MESSAGE_START:return d();case fe.THINKING_TEXT_MESSAGE_CONTENT:return d();case fe.THINKING_TEXT_MESSAGE_END:return d()}return h.type,d()}),$4(),r.length>0?U4({}):h=>h)},Sm=e=>t=>{let n=new Map,r=new Map,a=!1,s=!1,u=!1,f=new Map,d=!1,h=!1,g=!1,y=()=>{n.clear(),r.clear(),f.clear(),d=!1,h=!1,a=!1,s=!1,g=!0};return t.pipe(mo(b=>{let v=b.type;if(e&&console.debug("[VERIFY]:",JSON.stringify(b)),s)return Qt(()=>new cn(`Cannot send event type '${v}': The run has already errored with 'RUN_ERROR'. No further events can be sent.`));if(a&&v!==fe.RUN_ERROR&&v!==fe.RUN_STARTED)return Qt(()=>new cn(`Cannot send event type '${v}': The run has already finished with 'RUN_FINISHED'. Start a new run with 'RUN_STARTED'.`));if(u){if(v===fe.RUN_STARTED){if(g&&!a)return Qt(()=>new cn("Cannot send 'RUN_STARTED' while a run is still active. The previous run must be finished with 'RUN_FINISHED' before starting a new run."));a&&y()}}else if(u=!0,v!==fe.RUN_STARTED&&v!==fe.RUN_ERROR)return Qt(()=>new cn("First event must be 'RUN_STARTED'"));switch(v){case fe.TEXT_MESSAGE_START:{let x=b.messageId;return n.has(x)?Qt(()=>new cn(`Cannot send 'TEXT_MESSAGE_START' event: A text message with ID '${x}' is already in progress. Complete it with 'TEXT_MESSAGE_END' first.`)):(n.set(x,!0),vn(b))}case fe.TEXT_MESSAGE_CONTENT:{let x=b.messageId;return n.has(x)?vn(b):Qt(()=>new cn(`Cannot send 'TEXT_MESSAGE_CONTENT' event: No active text message found with ID '${x}'. Start a text message with 'TEXT_MESSAGE_START' first.`))}case fe.TEXT_MESSAGE_END:{let x=b.messageId;return n.has(x)?(n.delete(x),vn(b)):Qt(()=>new cn(`Cannot send 'TEXT_MESSAGE_END' event: No active text message found with ID '${x}'. A 'TEXT_MESSAGE_START' event must be sent first.`))}case fe.TOOL_CALL_START:{let x=b.toolCallId;return r.has(x)?Qt(()=>new cn(`Cannot send 'TOOL_CALL_START' event: A tool call with ID '${x}' is already in progress. Complete it with 'TOOL_CALL_END' first.`)):(r.set(x,!0),vn(b))}case fe.TOOL_CALL_ARGS:{let x=b.toolCallId;return r.has(x)?vn(b):Qt(()=>new cn(`Cannot send 'TOOL_CALL_ARGS' event: No active tool call found with ID '${x}'. Start a tool call with 'TOOL_CALL_START' first.`))}case fe.TOOL_CALL_END:{let x=b.toolCallId;return r.has(x)?(r.delete(x),vn(b)):Qt(()=>new cn(`Cannot send 'TOOL_CALL_END' event: No active tool call found with ID '${x}'. A 'TOOL_CALL_START' event must be sent first.`))}case fe.STEP_STARTED:{let x=b.stepName;return f.has(x)?Qt(()=>new cn(`Step "${x}" is already active for 'STEP_STARTED'`)):(f.set(x,!0),vn(b))}case fe.STEP_FINISHED:{let x=b.stepName;return f.has(x)?(f.delete(x),vn(b)):Qt(()=>new cn(`Cannot send 'STEP_FINISHED' for step "${x}" that was not started`))}case fe.RUN_STARTED:return g=!0,vn(b);case fe.RUN_FINISHED:{if(f.size>0){let x=Array.from(f.keys()).join(", ");return Qt(()=>new cn(`Cannot send 'RUN_FINISHED' while steps are still active: ${x}`))}if(n.size>0){let x=Array.from(n.keys()).join(", ");return Qt(()=>new cn(`Cannot send 'RUN_FINISHED' while text messages are still active: ${x}`))}if(r.size>0){let x=Array.from(r.keys()).join(", ");return Qt(()=>new cn(`Cannot send 'RUN_FINISHED' while tool calls are still active: ${x}`))}return a=!0,vn(b)}case fe.RUN_ERROR:return s=!0,vn(b);case fe.CUSTOM:return vn(b);case fe.THINKING_TEXT_MESSAGE_START:return d?h?Qt(()=>new cn("Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking message is already in progress. Complete it with 'THINKING_TEXT_MESSAGE_END' first.")):(h=!0,vn(b)):Qt(()=>new cn("Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking step is not in progress. Create one with 'THINKING_START' first."));case fe.THINKING_TEXT_MESSAGE_CONTENT:return h?vn(b):Qt(()=>new cn("Cannot send 'THINKING_TEXT_MESSAGE_CONTENT' event: No active thinking message found. Start a message with 'THINKING_TEXT_MESSAGE_START' first."));case fe.THINKING_TEXT_MESSAGE_END:return h?(h=!1,vn(b)):Qt(()=>new cn("Cannot send 'THINKING_TEXT_MESSAGE_END' event: No active thinking message found. A 'THINKING_TEXT_MESSAGE_START' event must be sent first."));case fe.THINKING_START:return d?Qt(()=>new cn("Cannot send 'THINKING_START' event: A thinking step is already in progress. End it with 'THINKING_END' first.")):(d=!0,vn(b));case fe.THINKING_END:return d?(d=!1,vn(b)):Qt(()=>new cn("Cannot send 'THINKING_END' event: No active thinking step found. A 'THINKING_START' event must be sent first."));default:return vn(b)}}))},k5=(e,t)=>a1(()=>Ll(fetch(e,t))).pipe(r1(n=>{var r;if(!n.ok){let u=n.headers.get("content-type")||"";return Ll(n.text()).pipe(mo(f=>{let d=f;if(u.includes("application/json"))try{d=JSON.parse(f)}catch{}let h=new Error(`HTTP ${n.status}: ${typeof d=="string"?d:JSON.stringify(d)}`);return h.status=n.status,h.payload=d,Qt(()=>h)}))}let a={type:"headers",status:n.status,headers:n.headers},s=(r=n.body)==null?void 0:r.getReader();return s?new rr(u=>(u.next(a),(async()=>{try{for(;;){let{done:f,value:d}=await s.read();if(f)break;let h={type:"data",data:d};u.next(h)}u.complete()}catch(f){u.error(f)}})(),()=>{s.cancel().catch(f=>{if(f?.name!=="AbortError")throw f})})):Qt(()=>new Error("Failed to getReader() from response"))})),R5=e=>{let t=new la,n=new TextDecoder("utf-8",{fatal:!1}),r="";e.subscribe({next:s=>{if(s.type!=="headers"&&s.type==="data"&&s.data){let u=n.decode(s.data,{stream:!0});r+=u;let f=r.split(/\n\n/);r=f.pop()||"";for(let d of f)a(d)}},error:s=>t.error(s),complete:()=>{r&&(r+=n.decode(),a(r)),t.complete()}});function a(s){let u=s.split(`
|
|
154
154
|
`),f=[];for(let d of u)d.startsWith("data:")&&f.push(d.slice(5).replace(/^ /,""));if(f.length>0)try{let d=f.join(`
|
|
155
155
|
`),h=JSON.parse(d);t.next(h)}catch(d){t.error(d)}}return t.asObservable()},O5=e=>{let t=new la,n=new Uint8Array(0);e.subscribe({next:a=>{if(a.type!=="headers"&&a.type==="data"&&a.data){let s=new Uint8Array(n.length+a.data.length);s.set(n,0),s.set(a.data,n.length),n=s,r()}},error:a=>t.error(a),complete:()=>{if(n.length>0)try{r()}catch{console.warn("Incomplete or invalid protocol buffer data at stream end")}t.complete()}});function r(){for(;n.length>=4;){let a=4+new DataView(n.buffer,n.byteOffset,4).getUint32(0,!1);if(n.length<a)break;try{let s=n.slice(4,a),u=v5(s);t.next(u),n=n.slice(a)}catch(s){let u=s instanceof Error?s.message:String(s);t.error(new Error(`Failed to decode protocol buffer message: ${u}`));return}}}return t.asObservable()},N5=e=>{let t=new la,n=new n1,r=!1;return e.subscribe({next:a=>{n.next(a),a.type==="headers"&&!r?(r=!0,a.headers.get("content-type")===b5?O5(n).subscribe({next:s=>t.next(s),error:s=>t.error(s),complete:()=>t.complete()}):R5(n).subscribe({next:s=>{try{let u=OS.parse(s);t.next(u)}catch(u){t.error(u)}},error:s=>{if(s?.name==="AbortError"){t.next({type:fe.RUN_ERROR,message:s.message||"Request aborted",code:"abort",rawEvent:s}),t.complete();return}return t.error(s)},complete:()=>t.complete()})):r||t.error(new Error("No headers event received before data events"))},error:a=>{n.error(a),t.error(a)},complete:()=>{n.complete()}}),t.asObservable()},Ft=_S(["TextMessageStart","TextMessageContent","TextMessageEnd","ActionExecutionStart","ActionExecutionArgs","ActionExecutionEnd","ActionExecutionResult","AgentStateMessage","MetaEvent","RunStarted","RunFinished","RunError","NodeStarted","NodeFinished"]),I5=_S(["LangGraphInterruptEvent","PredictState","Exit"]),M5=Wt({type:Oe(Ft.enum.TextMessageStart),messageId:de(),parentMessageId:de().optional(),role:de().optional()}),D5=Wt({type:Oe(Ft.enum.TextMessageContent),messageId:de(),content:de()}),B5=Wt({type:Oe(Ft.enum.TextMessageEnd),messageId:de()}),z5=Wt({type:Oe(Ft.enum.ActionExecutionStart),actionExecutionId:de(),actionName:de(),parentMessageId:de().optional()}),L5=Wt({type:Oe(Ft.enum.ActionExecutionArgs),actionExecutionId:de(),args:de()}),$5=Wt({type:Oe(Ft.enum.ActionExecutionEnd),actionExecutionId:de()}),P5=Wt({type:Oe(Ft.enum.ActionExecutionResult),actionName:de(),actionExecutionId:de(),result:de()}),U5=Wt({type:Oe(Ft.enum.AgentStateMessage),threadId:de(),agentName:de(),nodeName:de(),runId:de(),active:Vp(),role:de(),state:de(),running:Vp()}),j5=Wt({type:Oe(Ft.enum.MetaEvent),name:I5,value:nr()}),H5=Wt({type:Oe(Ft.enum.RunError),message:de(),code:de().optional()});nf("type",[M5,D5,B5,z5,L5,$5,P5,U5,j5,H5]),Wt({id:de(),role:de(),content:de(),parentMessageId:de().optional()}),Wt({id:de(),name:de(),arguments:nr(),parentMessageId:de().optional()}),Wt({id:de(),result:nr(),actionExecutionId:de(),actionName:de()});var V5=e=>{if(typeof e=="string")return e;if(!Array.isArray(e))return;let t=e.filter(n=>n.type==="text").map(n=>n.text).filter(n=>n.length>0);if(t.length!==0)return t.join(`
|
|
156
|
-
`)},F5=(e,t,n)=>r=>{let a={},s=!0,u=!0,f="",d=null,h=null,g=[],y={},b=v=>{typeof v=="object"&&v!==null&&("messages"in v&&delete v.messages,a=v)};return r.pipe(mo(v=>{switch(v.type){case fe.TEXT_MESSAGE_START:{let x=v;return[{type:Ft.enum.TextMessageStart,messageId:x.messageId,role:x.role}]}case fe.TEXT_MESSAGE_CONTENT:{let x=v;return[{type:Ft.enum.TextMessageContent,messageId:x.messageId,content:x.delta}]}case fe.TEXT_MESSAGE_END:{let x=v;return[{type:Ft.enum.TextMessageEnd,messageId:x.messageId}]}case fe.TOOL_CALL_START:{let x=v;return g.push({id:x.toolCallId,type:"function",function:{name:x.toolCallName,arguments:""}}),u=!0,y[x.toolCallId]=x.toolCallName,[{type:Ft.enum.ActionExecutionStart,actionExecutionId:x.toolCallId,actionName:x.toolCallName,parentMessageId:x.parentMessageId}]}case fe.TOOL_CALL_ARGS:{let x=v,E=g.find(w=>w.id===x.toolCallId);if(!E)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${x.toolCallId}'`),[];E.function.arguments+=x.delta;let _=!1;if(h){let w=h.find(O=>O.tool==E.function.name);if(w)try{let O=JSON.parse(h1(E.function.arguments));w.tool_argument&&w.tool_argument in O?(b(yo(Zn({},a),{[w.state_key]:O[w.tool_argument]})),_=!0):w.tool_argument||(b(yo(Zn({},a),{[w.state_key]:O})),_=!0)}catch{}}return[{type:Ft.enum.ActionExecutionArgs,actionExecutionId:x.toolCallId,args:x.delta},..._?[{type:Ft.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:u}]:[]]}case fe.TOOL_CALL_END:{let x=v;return[{type:Ft.enum.ActionExecutionEnd,actionExecutionId:x.toolCallId}]}case fe.TOOL_CALL_RESULT:{let x=v;return[{type:Ft.enum.ActionExecutionResult,actionExecutionId:x.toolCallId,result:x.content,actionName:y[x.toolCallId]||"unknown"}]}case fe.RAW:return[];case fe.CUSTOM:{let x=v;switch(x.name){case"Exit":s=!1;break;case"PredictState":h=x.value;break}return[{type:Ft.enum.MetaEvent,name:x.name,value:x.value}]}case fe.STATE_SNAPSHOT:return b(v.snapshot),[{type:Ft.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:u}];case fe.STATE_DELTA:{let x=as(a,v.delta,!0,!1);return x?(b(x.newDocument),[{type:Ft.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:u}]):[]}case fe.MESSAGES_SNAPSHOT:return d=v.messages,[{type:Ft.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(Zn(Zn({},a),d?{messages:d}:{})),active:!0}];case fe.RUN_STARTED:return[];case fe.RUN_FINISHED:return d&&(a.messages=d),Object.keys(a).length===0?[]:[{type:Ft.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(Zn(Zn({},a),d?{messages:G5(d)}:{})),active:!1}];case fe.RUN_ERROR:{let x=v;return[{type:Ft.enum.RunError,message:x.message,code:x.code}]}case fe.STEP_STARTED:return f=v.stepName,g=[],h=null,[{type:Ft.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:!0}];case fe.STEP_FINISHED:return g=[],h=null,[{type:Ft.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:!1}];default:return[]}}))};function G5(e){var t;let n=[];for(let r of e)if(r.role==="assistant"||r.role==="user"||r.role==="system"){let a=V5(r.content);if(a){let s={id:r.id,role:r.role,content:a};n.push(s)}if(r.role==="assistant"&&r.toolCalls&&r.toolCalls.length>0)for(let s of r.toolCalls){let u={id:s.id,name:s.function.name,arguments:JSON.parse(s.function.arguments),parentMessageId:r.id};n.push(u)}}else if(r.role==="tool"){let a="unknown";for(let u of e)if(u.role==="assistant"&&(t=u.toolCalls)!=null&&t.length){for(let f of u.toolCalls)if(f.id===r.toolCallId){a=f.function.name;break}}let s={id:r.id,result:r.content,actionExecutionId:r.toolCallId,actionName:a};n.push(s)}return n}var Df=e=>t=>{let n,r,a,s=()=>{if(!n||a!=="text")throw new Error("No text message to close");let d={type:fe.TEXT_MESSAGE_END,messageId:n.messageId};return a=void 0,n=void 0,e&&console.debug("[TRANSFORM]: TEXT_MESSAGE_END",JSON.stringify(d)),d},u=()=>{if(!r||a!=="tool")throw new Error("No tool call to close");let d={type:fe.TOOL_CALL_END,toolCallId:r.toolCallId};return a=void 0,r=void 0,e&&console.debug("[TRANSFORM]: TOOL_CALL_END",JSON.stringify(d)),d},f=()=>a==="text"?[s()]:a==="tool"?[u()]:[];return t.pipe(mo(d=>{switch(d.type){case fe.TEXT_MESSAGE_START:case fe.TEXT_MESSAGE_CONTENT:case fe.TEXT_MESSAGE_END:case fe.TOOL_CALL_START:case fe.TOOL_CALL_ARGS:case fe.TOOL_CALL_END:case fe.TOOL_CALL_RESULT:case fe.STATE_SNAPSHOT:case fe.STATE_DELTA:case fe.MESSAGES_SNAPSHOT:case fe.CUSTOM:case fe.RUN_STARTED:case fe.RUN_FINISHED:case fe.RUN_ERROR:case fe.STEP_STARTED:case fe.STEP_FINISHED:case fe.THINKING_START:case fe.THINKING_END:case fe.THINKING_TEXT_MESSAGE_START:case fe.THINKING_TEXT_MESSAGE_CONTENT:case fe.THINKING_TEXT_MESSAGE_END:return[...f(),d];case fe.RAW:case fe.ACTIVITY_SNAPSHOT:case fe.ACTIVITY_DELTA:return[d];case fe.TEXT_MESSAGE_CHUNK:let h=d,g=[];if((a!=="text"||h.messageId!==void 0&&h.messageId!==n?.messageId)&&g.push(...f()),a!=="text"){if(h.messageId===void 0)throw new Error("First TEXT_MESSAGE_CHUNK must have a messageId");n={messageId:h.messageId},a="text";let v={type:fe.TEXT_MESSAGE_START,messageId:h.messageId,role:h.role||"assistant"};g.push(v),e&&console.debug("[TRANSFORM]: TEXT_MESSAGE_START",JSON.stringify(v))}if(h.delta!==void 0){let v={type:fe.TEXT_MESSAGE_CONTENT,messageId:n.messageId,delta:h.delta};g.push(v),e&&console.debug("[TRANSFORM]: TEXT_MESSAGE_CONTENT",JSON.stringify(v))}return g;case fe.TOOL_CALL_CHUNK:let y=d,b=[];if((a!=="tool"||y.toolCallId!==void 0&&y.toolCallId!==r?.toolCallId)&&b.push(...f()),a!=="tool"){if(y.toolCallId===void 0)throw new Error("First TOOL_CALL_CHUNK must have a toolCallId");if(y.toolCallName===void 0)throw new Error("First TOOL_CALL_CHUNK must have a toolCallName");r={toolCallId:y.toolCallId,toolCallName:y.toolCallName,parentMessageId:y.parentMessageId},a="tool";let v={type:fe.TOOL_CALL_START,toolCallId:y.toolCallId,toolCallName:y.toolCallName,parentMessageId:y.parentMessageId};b.push(v),e&&console.debug("[TRANSFORM]: TOOL_CALL_START",JSON.stringify(v))}if(y.delta!==void 0){let v={type:fe.TOOL_CALL_ARGS,toolCallId:r.toolCallId,delta:y.delta};b.push(v),e&&console.debug("[TRANSFORM]: TOOL_CALL_ARGS",JSON.stringify(v))}return b}return d.type,[]}),rm(()=>{f()}))},ox=class{runNext(e,t){return t.run(e).pipe(Df(!1))}runNextWithState(e,t){let n=$t(e.messages||[]),r=$t(e.state||{}),a=new n1;return ix(e,a,t,[]).subscribe(s=>{s.messages!==void 0&&(n=s.messages),s.state!==void 0&&(r=s.state)}),this.runNext(e,t).pipe(JS(async s=>(a.next(s),await new Promise(u=>setTimeout(u,0)),{event:s,messages:$t(n),state:$t(r)})))}},q5=class extends ox{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function Y5(e){let t=e.content;if(Array.isArray(t)){let n=t.filter(r=>typeof r=="object"&&r!==null&&"type"in r&&r.type==="text"&&typeof r.text=="string").map(r=>r.text).join("");return yo(Zn({},e),{content:n})}return typeof t=="string"?e:yo(Zn({},e),{content:""})}var X5=class extends ox{run(e,t){let n=e,{parentRunId:r}=n,a=A5(n,["parentRunId"]),s=yo(Zn({},a),{messages:a.messages.map(Y5)});return this.runNext(s,t)}},Z5={version:"0.0.43"},K5=class{constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:a,debug:s}={}){this.debug=!1,this.subscribers=[],this.isRunning=!1,this.middlewares=[],this.agentId=e,this.description=t??"",this.threadId=n??$l(),this.messages=$t(r??[]),this.state=$t(a??{}),this.debug=s??!1,_5(this.maxVersion,"0.0.39")<=0&&this.middlewares.unshift(new X5)}get maxVersion(){return Z5.version}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e)}}}use(...e){let t=e.map(n=>typeof n=="function"?new q5(n):n);return this.middlewares.push(...t),this}async runAgent(e,t){var n;try{this.isRunning=!0,this.agentId=(n=this.agentId)!=null?n:$l();let r=this.prepareRunAgentInput(e),a,s=new Set(this.messages.map(g=>g.id)),u=[{onRunFinishedEvent:g=>{a=g.result}},...this.subscribers,t??{}];await this.onInitialize(r,u),this.activeRunDetach$=new la;let f;this.activeRunCompletionPromise=new Promise(g=>{f=g});let d=$S(()=>this.middlewares.length===0?this.run(r):this.middlewares.reduceRight((g,y)=>({run:b=>y.run(b,g)}),this).run(r),Df(this.debug),Sm(this.debug),g=>g.pipe(i1(this.activeRunDetach$)),g=>this.apply(r,g,u),g=>this.processApplyEvents(r,g,u),zl(g=>(this.isRunning=!1,this.onError(r,g,u))),rm(()=>{this.isRunning=!1,this.onFinalize(r,u),f?.(),f=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}));await o1(d(yn(null)));let h=$t(this.messages).filter(g=>!s.has(g.id));return{result:a,newMessages:h}}finally{this.isRunning=!1}}connect(e){throw new AS}async connectAgent(e,t){var n;try{this.isRunning=!0,this.agentId=(n=this.agentId)!=null?n:$l();let r=this.prepareRunAgentInput(e),a,s=new Set(this.messages.map(g=>g.id)),u=[{onRunFinishedEvent:g=>{a=g.result}},...this.subscribers,t??{}];await this.onInitialize(r,u),this.activeRunDetach$=new la;let f;this.activeRunCompletionPromise=new Promise(g=>{f=g});let d=$S(()=>this.connect(r),Df(this.debug),Sm(this.debug),g=>g.pipe(i1(this.activeRunDetach$)),g=>this.apply(r,g,u),g=>this.processApplyEvents(r,g,u),zl(g=>(this.isRunning=!1,g instanceof AS?t1:this.onError(r,g,u))),rm(()=>{this.isRunning=!1,this.onFinalize(r,u),f?.(),f=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}));await o1(d(yn(null)));let h=$t(this.messages).filter(g=>!s.has(g.id));return{result:a,newMessages:h}}finally{this.isRunning=!1}}abortRun(){}async detachActiveRun(){var e,t;if(!this.activeRunDetach$)return;let n=(e=this.activeRunCompletionPromise)!=null?e:Promise.resolve();this.activeRunDetach$.next(),(t=this.activeRunDetach$)==null||t.complete(),await n}apply(e,t,n){return ix(e,t,this,n)}processApplyEvents(e,t,n){return t.pipe(H4(r=>{r.messages&&(this.messages=r.messages,n.forEach(a=>{var s;(s=a.onMessagesChanged)==null||s.call(a,{messages:this.messages,state:this.state,agent:this,input:e})})),r.state&&(this.state=r.state,n.forEach(a=>{var s;(s=a.onStateChanged)==null||s.call(a,{state:this.state,messages:this.messages,agent:this,input:e})}))}))}prepareRunAgentInput(e){var t,n,r;let a=$t(this.messages).filter(s=>s.role!=="activity");return{threadId:this.threadId,runId:e?.runId||$l(),tools:$t((t=e?.tools)!=null?t:[]),context:$t((n=e?.context)!=null?n:[]),forwardedProps:$t((r=e?.forwardedProps)!=null?r:{}),state:$t(this.state),messages:a}}async onInitialize(e,t){let n=await tn(t,this.messages,this.state,(r,a,s)=>{var u;return(u=r.onRunInitialized)==null?void 0:u.call(r,{messages:a,state:s,agent:this,input:e})});(n.messages!==void 0||n.state!==void 0)&&(n.messages&&(this.messages=n.messages,e.messages=n.messages,t.forEach(r=>{var a;(a=r.onMessagesChanged)==null||a.call(r,{messages:this.messages,state:this.state,agent:this,input:e})})),n.state&&(this.state=n.state,e.state=n.state,t.forEach(r=>{var a;(a=r.onStateChanged)==null||a.call(r,{state:this.state,messages:this.messages,agent:this,input:e})})))}onError(e,t,n){return Ll(tn(n,this.messages,this.state,(r,a,s)=>{var u;return(u=r.onRunFailed)==null?void 0:u.call(r,{error:t,messages:a,state:s,agent:this,input:e})})).pipe(nm(r=>{let a=r;if((a.messages!==void 0||a.state!==void 0)&&(a.messages!==void 0&&(this.messages=a.messages,n.forEach(s=>{var u;(u=s.onMessagesChanged)==null||u.call(s,{messages:this.messages,state:this.state,agent:this,input:e})})),a.state!==void 0&&(this.state=a.state,n.forEach(s=>{var u;(u=s.onStateChanged)==null||u.call(s,{state:this.state,messages:this.messages,agent:this,input:e})}))),a.stopPropagation!==!0)throw console.error("Agent execution failed:",t),t;return{}}))}async onFinalize(e,t){let n=await tn(t,this.messages,this.state,(r,a,s)=>{var u;return(u=r.onRunFinalized)==null?void 0:u.call(r,{messages:a,state:s,agent:this,input:e})});(n.messages!==void 0||n.state!==void 0)&&(n.messages!==void 0&&(this.messages=n.messages,t.forEach(r=>{var a;(a=r.onMessagesChanged)==null||a.call(r,{messages:this.messages,state:this.state,agent:this,input:e})})),n.state!==void 0&&(this.state=n.state,t.forEach(r=>{var a;(a=r.onStateChanged)==null||a.call(r,{state:this.state,messages:this.messages,agent:this,input:e})})))}clone(){let e=Object.create(Object.getPrototypeOf(this));return e.agentId=this.agentId,e.description=this.description,e.threadId=this.threadId,e.messages=$t(this.messages),e.state=$t(this.state),e.debug=this.debug,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e}addMessage(e){this.messages.push(e),(async()=>{var t,n,r;for(let a of this.subscribers)await((t=a.onNewMessage)==null?void 0:t.call(a,{message:e,messages:this.messages,state:this.state,agent:this}));if(e.role==="assistant"&&e.toolCalls)for(let a of e.toolCalls)for(let s of this.subscribers)await((n=s.onNewToolCall)==null?void 0:n.call(s,{toolCall:a,messages:this.messages,state:this.state,agent:this}));for(let a of this.subscribers)await((r=a.onMessagesChanged)==null?void 0:r.call(a,{messages:this.messages,state:this.state,agent:this}))})()}addMessages(e){this.messages.push(...e),(async()=>{var t,n,r;for(let a of e){for(let s of this.subscribers)await((t=s.onNewMessage)==null?void 0:t.call(s,{message:a,messages:this.messages,state:this.state,agent:this}));if(a.role==="assistant"&&a.toolCalls)for(let s of a.toolCalls)for(let u of this.subscribers)await((n=u.onNewToolCall)==null?void 0:n.call(u,{toolCall:s,messages:this.messages,state:this.state,agent:this}))}for(let a of this.subscribers)await((r=a.onMessagesChanged)==null?void 0:r.call(a,{messages:this.messages,state:this.state,agent:this}))})()}setMessages(e){this.messages=$t(e),(async()=>{var t;for(let n of this.subscribers)await((t=n.onMessagesChanged)==null?void 0:t.call(n,{messages:this.messages,state:this.state,agent:this}))})()}setState(e){this.state=$t(e),(async()=>{var t;for(let n of this.subscribers)await((t=n.onStateChanged)==null?void 0:t.call(n,{messages:this.messages,state:this.state,agent:this}))})()}legacy_to_be_removed_runAgentBridged(e){var t;this.agentId=(t=this.agentId)!=null?t:$l();let n=this.prepareRunAgentInput(e);return(this.middlewares.length===0?this.run(n):this.middlewares.reduceRight((r,a)=>({run:s=>a.run(s,r)}),this).run(n)).pipe(Df(this.debug),Sm(this.debug),F5(this.threadId,n.runId,this.agentId),r=>r.pipe(nm(a=>(this.debug&&console.debug("[LEGACY]:",JSON.stringify(a)),a))))}},W5=class extends K5{constructor(e){var t;super(e),this.abortController=new AbortController,this.url=e.url,this.headers=$t((t=e.headers)!=null?t:{})}requestInit(e){return{method:"POST",headers:yo(Zn({},this.headers),{"Content-Type":"application/json",Accept:"text/event-stream"}),body:JSON.stringify(e),signal:this.abortController.signal}}runAgent(e,t){var n;return this.abortController=(n=e?.abortController)!=null?n:new AbortController,super.runAgent(e,t)}abortRun(){this.abortController.abort(),super.abortRun()}run(e){let t=k5(this.url,this.requestInit(e));return N5(t)}clone(){var e;let t=super.clone();t.url=this.url,t.headers=$t((e=this.headers)!=null?e:{});let n=new AbortController,r=this.abortController.signal;return r.aborted&&n.abort(r.reason),t.abortController=n,t}};const Q5=2e3,Hl="/api/chat",J5="/api/chat-session",ax="/api/conversation/verification",sx=e=>{let t;const n=new Set,r=(h,g)=>{const y=typeof h=="function"?h(t):h;if(!Object.is(y,t)){const b=t;t=g??(typeof y!="object"||y===null)?y:Object.assign({},t,y),n.forEach(v=>v(t,b))}},a=()=>t,f={setState:r,getState:a,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(r,a,f);return f},e6=(e=>e?sx(e):sx),t6=e=>e;function n6(e,t=t6){const n=Jn.useSyncExternalStore(e.subscribe,Jn.useCallback(()=>t(e.getState()),[e,t]),Jn.useCallback(()=>t(e.getInitialState()),[e,t]));return Jn.useDebugValue(n),n}const lx=e=>{const t=e6(e),n=r=>n6(t,r);return Object.assign(n,t),n},Bf=(e=>e?lx(e):lx)((e,t)=>({items:[],push:n=>{const r=crypto.randomUUID?crypto.randomUUID():String(Date.now()),a={id:r,ttl:5e3,...n};e(s=>({items:[...s.items,a]})),setTimeout(()=>{t().remove(r)},a.ttl)},remove:n=>e(r=>({items:r.items.filter(a=>a.id!==n)})),clear:()=>e({items:[]})}));let ux=null;function r6(e){ux=e}function vo(){return ux}let zf=null;async function Lf(){const e=vo();return zf||(zf=fetch(`${e?.apiBaseUrl}${J5}/${e?.clientId}/authorize`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(async t=>{if(!t.ok)throw new Error("refresh failed");return t.json()}).then(t=>(e&&(e.sessionToken=t),t)).finally(()=>{zf=null})),zf}async function i6(){const t=vo()?.sessionToken;return t||Lf()}async function o6(e){const t=await e.clone().json().catch(()=>null);Bf.getState().push({type:"error",message:t?.message??"Request failed",status:e.status})}async function fa(e,t={}){let n=await i6();const r=s=>{const u=new Headers(t.headers);return u.set("Authorization",`Bearer ${s}`),u};let a=await fetch(e,{...t,headers:r(n)});return a.status===401&&(n=await Lf(),a=await fetch(e,{...t,headers:r(n)})),a.ok||await o6(a),a}const cx={UIDirectiveEvent:"UI_DIRECTIVE"};function a6(){const e=window.innerWidth;return e<=767?"Mobile":e<=1024?"Tablet":"Desktop"}function fx(e){return e?.status??e?.response?.status??e?.cause?.status??e?.cause?.response?.status}function s6(e){return fx(e)===401}function l6(e){const t=fx(e);return typeof t=="number"&&t==400}function u6(e){if(s6(e))return!0;const n=String(e?.message??"");return n.includes("401")||n.toLowerCase().includes("unauthorized")}const dx=(e,t)=>{const n={...e.headers??{}};t?n.Authorization=`Bearer ${t}`:delete n.Authorization,e.headers=n};function c6(e,t){let n=null;const r=()=>(n||(n=t.refreshAccessToken().finally(()=>n=null)),n);return(a,s)=>{let u=!1;return a1(()=>(dx(e,t.getAccessToken()),s.run(a).pipe(zl(f=>u||!u6(f)?Qt(()=>f):(u=!0,Ll(r()).pipe(r1(d=>(dx(e,d),s.run(a)))))))))}}const f6=(e,t)=>t.run(e).pipe(zl(n=>{if(l6(n)){const r=n.payload;Bf.getState().push({type:"error",message:r.message,status:r.statusCode})}return t.run(e)}));async function d6(e){const t=new W5({url:e.url,threadId:e.conversationId||void 0,headers:{"X-Device-Type":a6(),...e.clientId?{"X-Client-Id":e.clientId}:{},...e.conversationId?{"X-Conversation-Id":e.conversationId}:{},...e.message.id?{"X-Message-Id":e.message.id}:{}}});let n=[];const r={onRunStartedEvent:({event:s})=>{e.onRunStarted(s.threadId)},onTextMessageContentEvent:({event:s})=>{if(s.type===fe.TEXT_MESSAGE_CONTENT){const u={id:s.messageId,text:s.delta,role:s.role||"assistant"};e.onDelta(u)}},onRunFinishedEvent:({result:s})=>{},onRunErrorEvent:({event:s})=>{},onToolCallStartEvent:({event:s})=>{const u=s;n.some(d=>d.toolCallId==u.toolCallId)||n.push({toolCallId:u.toolCallId,toolCallName:u.toolCallName,delta:u.delta??""})},onToolCallArgsEvent:({event:s})=>{const u=s;n.map(f=>(f.toolCallId==u.toolCallId&&(f.delta+=u.delta),f))},onToolCallResultEvent:({event:s})=>{},onToolCallEndEvent:({event:s})=>{const u=s;n.map(f=>(f.toolCallId==u.toolCallId&&(f.delta=JSON.parse(f.delta)),f)),e.onAgentToolEvent&&e.onAgentToolEvent(n)},onCustomEvent({event:s}){if(s.name===cx.UIDirectiveEvent){const f=JSON.parse(s.value),d={type:"CUSTOM",name:cx.UIDirectiveEvent,value:f};e.onAgentCustomEvent&&e.onAgentCustomEvent(d)}}};e.message.role=="tool"&&(e.toolCallHistory?.map(s=>{t.messages.push({id:crypto.randomUUID(),role:"assistant",toolCalls:[{id:s.toolCallId,type:"function",function:{name:s.toolCallName,arguments:JSON.stringify(s.delta)}}]})}),e.onAgentToolEvent&&e.onAgentToolEvent([])),e.message&&(t.messages=[...t.messages,e.message]);const a=c6(t,{getAccessToken:()=>e.token||null,refreshAccessToken:async()=>await Lf()});t.use(a,f6),await t.runAgent({tools:[]},r)}const xm="chat_session_v1",h6=1440*60*1e3;function p6(){try{const e=localStorage.getItem(xm);return e?JSON.parse(e):null}catch{return null}}function hx(e){localStorage.setItem(xm,JSON.stringify(e))}function da(){const e=Date.now(),t=p6();if(!t)return null;if(e-t.lastActivityAt>h6)return g6(),null;const r={...t,lastActivityAt:e};return hx(r),r.conversationId}function m6(e){const t={conversationId:e,lastActivityAt:Date.now()};hx(t)}function g6(){localStorage.removeItem(xm)}const y6=Xn(L.jsx("path",{d:"M20 4v12H5.17L4 17.17V4zm0-2H4c-1.1 0-2 .9-2 2v15.59c0 .89 1.08 1.34 1.71.71L6 18h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2"}));function v6(){if(typeof document>"u"||document.querySelector('meta[name="viewport"]'))return;const t=document.createElement("meta");t.name="viewport",t.content="width=device-width, initial-scale=1",document.head.appendChild(t)}function b6(){N.useEffect(()=>{const e=()=>{const t=window.innerHeight*.01;document.documentElement.style.setProperty("--vh",`${t}px`)};return e(),window.addEventListener("resize",e),window.addEventListener("orientationchange",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}},[])}const S6=e=>e==="AI"?"Răspunde automat mesajelor":e==="Human"?"In conversatie cu un operator":e==="Disconnected"?"Conexiune pierduta. Reincarcati pagina!":e==="Ended"?"Conversație închisă":"Conversație nouă",Em=Xn(L.jsx("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3M7.5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S9.83 13 9 13s-1.5-.67-1.5-1.5M15 17H9c-.55 0-1-.45-1-1s.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1m0-4c-.83 0-1.5-.67-1.5-1.5S14.17 10 15 10s1.5.67 1.5 1.5S15.83 13 15 13"})),px=Xn(L.jsx("path",{d:"M19 6.41 17.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"}));function x6({isMobile:e,conversationMode:t,setOpen:n}){return L.jsxs(En,{sx:{px:1.75,py:1.25,display:"flex",alignItems:"center",gap:1,borderBottom:"1px solid",borderColor:"divider",background:"linear-gradient(135deg, rgba(25,118,210,.18), rgba(156,39,176,.14))",backdropFilter:e?"none":"blur(10px)"},children:[L.jsx(YN,{overlap:"circular",variant:"dot",color:t!="Disconnected"?"success":"error",sx:{"& .MuiBadge-badge":{width:10,height:10,borderRadius:999,border:"2px solid",borderColor:"background.paper"}},children:L.jsx(Pc,{sx:{bgcolor:"primary.main"},children:L.jsx(Em,{})})}),L.jsxs(En,{sx:{flex:1,minWidth:0},children:[L.jsx(ti,{variant:"subtitle1",sx:{fontWeight:700,lineHeight:1.1},children:"Asistent"}),L.jsx(ti,{variant:"caption",sx:{color:"text.secondary"},children:S6(t)})]}),L.jsx(Cl,{size:"small",onClick:()=>n(!1),sx:{bgcolor:"rgba(255,255,255,.55)",border:"1px solid",borderColor:"divider","&:hover":{bgcolor:"rgba(255,255,255,.75)"}},children:L.jsx(px,{fontSize:"small"})})]})}function E6(e){const{error:t,onClose:n}=e;return t?L.jsx(En,{sx:{px:2,pt:1},children:L.jsx(iN,{severity:"error",variant:"filled",action:L.jsx(Cl,{size:"small",onClick:n,"aria-label":"Close error banner",children:L.jsx(px,{fontSize:"small"})}),children:t})}):null}const _6=Xn(L.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v1c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-1c0-2.66-5.33-4-8-4"})),w6=Xn(L.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 11h7V4z"})),C6=Xn(L.jsx("path",{d:"m3.4 20.4 17.45-7.48c.81-.35.81-1.49 0-1.84L3.4 3.6c-.66-.29-1.39.2-1.39.91L2 9.12c0 .5.37.93.87.99L17 12 2.87 13.88c-.5.07-.87.5-.87 1l.01 4.61c0 .71.73 1.2 1.39.91"})),T6=Xn(L.jsx("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3m-2 10H6V7h12zm-9-6c-.83 0-1.5-.67-1.5-1.5S8.17 10 9 10s1.5.67 1.5 1.5S9.83 13 9 13m7.5-1.5c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5 1.5.67 1.5 1.5M8 15h8v2H8z"})),A6=Xn([L.jsx("path",{d:"M21 12.22C21 6.73 16.74 3 12 3c-4.69 0-9 3.65-9 9.28-.6.34-1 .98-1 1.72v2c0 1.1.9 2 2 2h1v-6.1c0-3.87 3.13-7 7-7s7 3.13 7 7V19h-8v2h8c1.1 0 2-.9 2-2v-1.22c.59-.31 1-.92 1-1.64v-2.3c0-.7-.41-1.31-1-1.62"},"0"),L.jsx("circle",{cx:"9",cy:"13",r:"1"},"1"),L.jsx("circle",{cx:"15",cy:"13",r:"1"},"2"),L.jsx("path",{d:"M18 11.03C17.52 8.18 15.04 6 12.05 6c-3.03 0-6.29 2.51-6.03 6.45 2.47-1.01 4.33-3.21 4.86-5.89 1.31 2.63 4 4.44 7.12 4.47"},"3")]);function oj(){}function aj(){}function k6(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const R6=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,O6=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,N6={};function mx(e,t){return(N6.jsx?O6:R6).test(e)}const I6=/[ \t\n\f\r]/g;function M6(e){return typeof e=="object"?e.type==="text"?gx(e.value):!1:gx(e)}function gx(e){return e.replace(I6,"")===""}class Vl{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Vl.prototype.normal={},Vl.prototype.property={},Vl.prototype.space=void 0;function yx(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Vl(n,r,t)}function _m(e){return e.toLowerCase()}class sr{constructor(t,n){this.attribute=n,this.property=t}}sr.prototype.attribute="",sr.prototype.booleanish=!1,sr.prototype.boolean=!1,sr.prototype.commaOrSpaceSeparated=!1,sr.prototype.commaSeparated=!1,sr.prototype.defined=!1,sr.prototype.mustUseProperty=!1,sr.prototype.number=!1,sr.prototype.overloadedBoolean=!1,sr.prototype.property="",sr.prototype.spaceSeparated=!1,sr.prototype.space=void 0;let D6=0;const Ze=ha(),wn=ha(),wm=ha(),ge=ha(),Gt=ha(),ss=ha(),Sr=ha();function ha(){return 2**++D6}const Cm=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ze,booleanish:wn,commaOrSpaceSeparated:Sr,commaSeparated:ss,number:ge,overloadedBoolean:wm,spaceSeparated:Gt},Symbol.toStringTag,{value:"Module"})),Tm=Object.keys(Cm);class Am extends sr{constructor(t,n,r,a){let s=-1;if(super(t,n),vx(this,"space",a),typeof r=="number")for(;++s<Tm.length;){const u=Tm[s];vx(this,Tm[s],(r&Cm[u])===Cm[u])}}}Am.prototype.defined=!0;function vx(e,t,n){n&&(e[t]=n)}function ls(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const s=new Am(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[_m(r)]=r,n[_m(s.attribute)]=r}return new Vl(t,n,e.space)}const bx=ls({properties:{ariaActiveDescendant:null,ariaAtomic:wn,ariaAutoComplete:null,ariaBusy:wn,ariaChecked:wn,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:Gt,ariaCurrent:null,ariaDescribedBy:Gt,ariaDetails:null,ariaDisabled:wn,ariaDropEffect:Gt,ariaErrorMessage:null,ariaExpanded:wn,ariaFlowTo:Gt,ariaGrabbed:wn,ariaHasPopup:null,ariaHidden:wn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Gt,ariaLevel:ge,ariaLive:null,ariaModal:wn,ariaMultiLine:wn,ariaMultiSelectable:wn,ariaOrientation:null,ariaOwns:Gt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:wn,ariaReadOnly:wn,ariaRelevant:null,ariaRequired:wn,ariaRoleDescription:Gt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:wn,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Sx(e,t){return t in e?e[t]:t}function xx(e,t){return Sx(e,t.toLowerCase())}const B6=ls({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ss,acceptCharset:Gt,accessKey:Gt,action:null,allow:null,allowFullScreen:Ze,allowPaymentRequest:Ze,allowUserMedia:Ze,alt:null,as:null,async:Ze,autoCapitalize:null,autoComplete:Gt,autoFocus:Ze,autoPlay:Ze,blocking:Gt,capture:null,charSet:null,checked:Ze,cite:null,className:Gt,cols:ge,colSpan:null,content:null,contentEditable:wn,controls:Ze,controlsList:Gt,coords:ge|ss,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ze,defer:Ze,dir:null,dirName:null,disabled:Ze,download:wm,draggable:wn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ze,formTarget:null,headers:Gt,height:ge,hidden:wm,high:ge,href:null,hrefLang:null,htmlFor:Gt,httpEquiv:Gt,id:null,imageSizes:null,imageSrcSet:null,inert:Ze,inputMode:null,integrity:null,is:null,isMap:Ze,itemId:null,itemProp:Gt,itemRef:Gt,itemScope:Ze,itemType:Gt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ze,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Ze,muted:Ze,name:null,nonce:null,noModule:Ze,noValidate:Ze,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ze,optimum:ge,pattern:null,ping:Gt,placeholder:null,playsInline:Ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ze,referrerPolicy:null,rel:Gt,required:Ze,reversed:Ze,rows:ge,rowSpan:ge,sandbox:Gt,scope:null,scoped:Ze,seamless:Ze,selected:Ze,shadowRootClonable:Ze,shadowRootDelegatesFocus:Ze,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:wn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:Ze,useMap:null,value:wn,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Gt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ze,declare:Ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Ze,noHref:Ze,noShade:Ze,noWrap:Ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:wn,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ze,disableRemotePlayback:Ze,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:xx}),z6=ls({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Sr,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:Gt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ss,g2:ss,glyphName:ss,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Sr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ge,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Gt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sr,rev:Sr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sr,requiredFeatures:Sr,requiredFonts:Sr,requiredFormats:Sr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Sr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sr,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Sr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sx}),Ex=ls({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),_x=ls({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:xx}),wx=ls({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),L6={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},$6=/[A-Z]/g,Cx=/-[a-z]/g,P6=/^data[-\w.:]+$/i;function U6(e,t){const n=_m(t);let r=t,a=sr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&P6.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Cx,H6);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Cx.test(s)){let u=s.replace($6,j6);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}a=Am}return new a(r,t)}function j6(e){return"-"+e.toLowerCase()}function H6(e){return e.charAt(1).toUpperCase()}const V6=yx([bx,B6,Ex,_x,wx],"html"),km=yx([bx,z6,Ex,_x,wx],"svg");function F6(e){return e.join(" ").trim()}var us={},Rm,Tx;function G6(){if(Tx)return Rm;Tx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
|
|
157
|
-
`,h="/",g="*",y="",b="comment",v="declaration";function x(_,w){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];w=w||{};var O=1,T=1;function A(U){var P=U.match(t);P&&(O+=P.length);var D=U.lastIndexOf(d);T=~D?U.length-D:T+U.length}function M(){var U={line:O,column:T};return function(P){return P.position=new R(U),V(),P}}function R(U){this.start=U,this.end={line:O,column:T},this.source=w.source}R.prototype.content=_;function $(U){var P=new Error(w.source+":"+O+":"+T+": "+U);if(P.reason=U,P.filename=w.source,P.line=O,P.column=T,P.source=_,!w.silent)throw P}function H(U){var P=U.exec(_);if(P){var D=P[0];return A(D),_=_.slice(D.length),P}}function V(){H(n)}function K(U){var P;for(U=U||[];P=G();)P!==!1&&U.push(P);return U}function G(){var U=M();if(!(h!=_.charAt(0)||g!=_.charAt(1))){for(var P=2;y!=_.charAt(P)&&(g!=_.charAt(P)||h!=_.charAt(P+1));)++P;if(P+=2,y===_.charAt(P-1))return $("End of comment missing");var D=_.slice(2,P-2);return T+=2,A(D),_=_.slice(P),T+=2,U({type:b,comment:D})}}function C(){var U=M(),P=H(r);if(P){if(G(),!H(a))return $("property missing ':'");var D=H(s),Z=U({type:v,property:E(P[0].replace(e,y)),value:D?E(D[0].replace(e,y)):y});return H(u),Z}}function q(){var U=[];K(U);for(var P;P=C();)P!==!1&&(U.push(P),K(U));return U}return V(),q()}function E(_){return _?_.replace(f,y):y}return Rm=x,Rm}var Ax;function q6(){if(Ax)return us;Ax=1;var e=us&&us.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(us,"__esModule",{value:!0}),us.default=n;const t=e(G6());function n(r,a){let s=null;if(!r||typeof r!="string")return s;const u=(0,t.default)(r),f=typeof a=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:g}=d;f?a(h,g,d):g&&(s=s||{},s[h]=g)}),s}return us}var Fl={},kx;function Y6(){if(kx)return Fl;kx=1,Object.defineProperty(Fl,"__esModule",{value:!0}),Fl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(h){return!h||n.test(h)||e.test(h)},u=function(h,g){return g.toUpperCase()},f=function(h,g){return"".concat(g,"-")},d=function(h,g){return g===void 0&&(g={}),s(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(a,f):h=h.replace(r,f),h.replace(t,u))};return Fl.camelCase=d,Fl}var Gl,Rx;function X6(){if(Rx)return Gl;Rx=1;var e=Gl&&Gl.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(q6()),n=Y6();function r(a,s){var u={};return!a||typeof a!="string"||(0,t.default)(a,function(f,d){f&&d&&(u[(0,n.camelCase)(f,s)]=d)}),u}return r.default=r,Gl=r,Gl}var Z6=X6();const K6=Ku(Z6),Ox=Nx("end"),Om=Nx("start");function Nx(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function W6(e){const t=Om(e),n=Ox(e);if(t&&n)return{start:t,end:n}}function ql(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ix(e.position):"start"in e||"end"in e?Ix(e):"line"in e||"column"in e?Nm(e):""}function Nm(e){return Mx(e&&e.line)+":"+Mx(e&&e.column)}function Ix(e){return Nm(e&&e.start)+"-"+Nm(e&&e.end)}function Mx(e){return e&&typeof e=="number"?e:1}class Kn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",s={},u=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?a=t:!s.cause&&t&&(u=!0,a=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?s.ruleId=r:(s.source=r.slice(0,d),s.ruleId=r.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=f?f.line:void 0,this.name=ql(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=u&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Kn.prototype.file="",Kn.prototype.name="",Kn.prototype.reason="",Kn.prototype.message="",Kn.prototype.stack="",Kn.prototype.column=void 0,Kn.prototype.line=void 0,Kn.prototype.ancestors=void 0,Kn.prototype.cause=void 0,Kn.prototype.fatal=void 0,Kn.prototype.place=void 0,Kn.prototype.ruleId=void 0,Kn.prototype.source=void 0;const Im={}.hasOwnProperty,Q6=new Map,J6=/[A-Z]/g,eD=new Set(["table","tbody","thead","tfoot","tr"]),tD=new Set(["td","th"]),Dx="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function nD(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=cD(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=uD(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?km:V6,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Bx(a,e,void 0);return s&&typeof s!="string"?s:a.create(e,a.Fragment,{children:s||void 0},void 0)}function Bx(e,t,n){if(t.type==="element")return rD(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return iD(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return aD(e,t,n);if(t.type==="mdxjsEsm")return oD(e,t);if(t.type==="root")return sD(e,t,n);if(t.type==="text")return lD(e,t)}function rD(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=km,e.schema=a),e.ancestors.push(t);const s=Lx(e,t.tagName,!1),u=fD(e,t);let f=Dm(e,t);return eD.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!M6(d):!0})),zx(e,u,s,t),Mm(u,f),e.ancestors.pop(),e.schema=r,e.create(t,s,u,n)}function iD(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Yl(e,t.position)}function oD(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Yl(e,t.position)}function aD(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=km,e.schema=a),e.ancestors.push(t);const s=t.name===null?e.Fragment:Lx(e,t.name,!0),u=dD(e,t),f=Dm(e,t);return zx(e,u,s,t),Mm(u,f),e.ancestors.pop(),e.schema=r,e.create(t,s,u,n)}function sD(e,t,n){const r={};return Mm(r,Dm(e,t)),e.create(t,e.Fragment,r,n)}function lD(e,t){return t.value}function zx(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Mm(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function uD(e,t,n){return r;function r(a,s,u,f){const h=Array.isArray(u.children)?n:t;return f?h(s,u,f):h(s,u)}}function cD(e,t){return n;function n(r,a,s,u){const f=Array.isArray(s.children),d=Om(r);return t(a,s,u,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function fD(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Im.call(t.properties,a)){const s=hD(e,a,t.properties[a]);if(s){const[u,f]=s;e.tableCellAlignToStyle&&u==="align"&&typeof f=="string"&&tD.has(t.tagName)?r=f:n[u]=f}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function dD(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const u=s.expression;u.type;const f=u.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else Yl(e,t.position);else{const a=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const f=r.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else Yl(e,t.position);else s=r.value===null?!0:r.value;n[a]=s}return n}function Dm(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Q6;for(;++r<t.children.length;){const s=t.children[r];let u;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const h=a.get(d)||0;u=d+"-"+h,a.set(d,h+1)}}const f=Bx(e,s,u);f!==void 0&&n.push(f)}return n}function hD(e,t,n){const r=U6(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?k6(n):F6(n)),r.property==="style"){let a=typeof n=="object"?n:pD(e,String(n));return e.stylePropertyNameCase==="css"&&(a=mD(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?L6[r.property]||r.property:r.attribute,n]}}function pD(e,t){try{return K6(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new Kn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Dx+"#cannot-parse-style-attribute",a}}function Lx(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let s=-1,u;for(;++s<a.length;){const f=mx(a[s])?{type:"Identifier",name:a[s]}:{type:"Literal",value:a[s]};u=u?{type:"MemberExpression",object:u,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}r=u}else r=mx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Im.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);Yl(e)}function Yl(e,t){const n=new Kn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Dx+"#cannot-handle-mdx-estrees-without-createevaluater",n}function mD(e){const t={};let n;for(n in e)Im.call(e,n)&&(t[gD(n)]=e[n]);return t}function gD(e){let t=e.replace(J6,yD);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function yD(e){return"-"+e.toLowerCase()}const Bm={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},vD={};function bD(e,t){const n=vD,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return $x(e,r,a)}function $x(e,t,n){if(SD(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Px(e.children,t,n)}return Array.isArray(e)?Px(e,t,n):""}function Px(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=$x(e[a],t,n);return r.join("")}function SD(e){return!!(e&&typeof e=="object")}const Ux=document.createElement("i");function zm(e){const t="&"+e+";";Ux.innerHTML=t;const n=Ux.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function wi(e,t,n,r){const a=e.length;let s=0,u;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);s<r.length;)u=r.slice(s,s+1e4),u.unshift(t,0),e.splice(...u),s+=1e4,t+=1e4}function Lr(e,t){return e.length>0?(wi(e,e.length,0,t),e):t}const jx={}.hasOwnProperty;function xD(e){const t={};let n=-1;for(;++n<e.length;)ED(t,e[n]);return t}function ED(e,t){let n;for(n in t){const a=(jx.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let u;if(s)for(u in s){jx.call(a,u)||(a[u]=[]);const f=s[u];_D(a[u],Array.isArray(f)?f:f?[f]:[])}}}function _D(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);wi(e,0,0,r)}function Hx(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function cs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ci=bo(/[A-Za-z]/),xr=bo(/[\dA-Za-z]/),wD=bo(/[#-'*+\--9=?A-Z^-~]/);function Lm(e){return e!==null&&(e<32||e===127)}const $m=bo(/\d/),CD=bo(/[\dA-Fa-f]/),TD=bo(/[!-/:-@[-`{-~]/);function Ve(e){return e!==null&&e<-2}function lr(e){return e!==null&&(e<0||e===32)}function bt(e){return e===-2||e===-1||e===32}const AD=bo(new RegExp("\\p{P}|\\p{S}","u")),kD=bo(/\s/);function bo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function fs(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const s=e.charCodeAt(n);let u="";if(s===37&&xr(e.charCodeAt(n+1))&&xr(e.charCodeAt(n+2)))a=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(u=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(n+1);s<56320&&f>56319&&f<57344?(u=String.fromCharCode(s,f),a=1):u="�"}else u=String.fromCharCode(s);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+a+1,u=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function qt(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let s=0;return u;function u(d){return bt(d)?(e.enter(n),f(d)):t(d)}function f(d){return bt(d)&&s++<a?(e.consume(d),f):(e.exit(n),t(d))}}const RD={tokenize:OD};function OD(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),qt(e,t,"linePrefix")}function a(f){return e.enter("paragraph"),s(f)}function s(f){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(f)}function u(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ve(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),u)}}const ND={tokenize:ID},Vx={tokenize:MD};function ID(e){const t=this,n=[];let r=0,a,s,u;return f;function f(T){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,d,h)(T)}return h(T)}function d(T){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&O();const A=t.events.length;let M=A,R;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){R=t.events[M][1].end;break}w(r);let $=A;for(;$<t.events.length;)t.events[$][1].end={...R},$++;return wi(t.events,M+1,0,t.events.slice(A)),t.events.length=$,h(T)}return f(T)}function h(T){if(r===n.length){if(!a)return b(T);if(a.currentConstruct&&a.currentConstruct.concrete)return x(T);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Vx,g,y)(T)}function g(T){return a&&O(),w(r),b(T)}function y(T){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(T)}function b(T){return t.containerState={},e.attempt(Vx,v,x)(T)}function v(T){return r++,n.push([t.currentConstruct,t.containerState]),b(T)}function x(T){if(T===null){a&&O(),w(0),e.consume(T);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:s}),E(T)}function E(T){if(T===null){_(e.exit("chunkFlow"),!0),w(0),e.consume(T);return}return Ve(T)?(e.consume(T),_(e.exit("chunkFlow")),r=0,t.interrupt=void 0,f):(e.consume(T),E)}function _(T,A){const M=t.sliceStream(T);if(A&&M.push(null),T.previous=s,s&&(s.next=T),s=T,a.defineSkip(T.start),a.write(M),t.parser.lazy[T.start.line]){let R=a.events.length;for(;R--;)if(a.events[R][1].start.offset<u&&(!a.events[R][1].end||a.events[R][1].end.offset>u))return;const $=t.events.length;let H=$,V,K;for(;H--;)if(t.events[H][0]==="exit"&&t.events[H][1].type==="chunkFlow"){if(V){K=t.events[H][1].end;break}V=!0}for(w(r),R=$;R<t.events.length;)t.events[R][1].end={...K},R++;wi(t.events,H+1,0,t.events.slice($)),t.events.length=R}}function w(T){let A=n.length;for(;A-- >T;){const M=n[A];t.containerState=M[1],M[0].exit.call(t,e)}n.length=T}function O(){a.write([null]),s=void 0,a=void 0,t.containerState._closeFlow=void 0}}function MD(e,t,n){return qt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fx(e){if(e===null||lr(e)||kD(e))return 1;if(AD(e))return 2}function Pm(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const s=e[a].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Um={name:"attention",resolveAll:DD,tokenize:BD};function DD(e,t){let n=-1,r,a,s,u,f,d,h,g;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const y={...e[r][1].end},b={...e[n][1].start};Gx(y,-d),Gx(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:y,end:{...e[r][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},s={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:d>1?"strong":"emphasis",start:{...u.start},end:{...f.end}},e[r][1].end={...u.start},e[n][1].start={...f.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Lr(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Lr(h,[["enter",a,t],["enter",u,t],["exit",u,t],["enter",s,t]]),h=Lr(h,Pm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Lr(h,[["exit",s,t],["enter",f,t],["exit",f,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,h=Lr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,wi(e,r-1,n-r+3,h),n=r+h.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function BD(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Fx(r);let s;return u;function u(d){return s=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===s)return e.consume(d),f;const h=e.exit("attentionSequence"),g=Fx(d),y=!g||g===2&&a||n.includes(d),b=!a||a===2&&g||n.includes(r);return h._open=!!(s===42?y:y&&(a||!b)),h._close=!!(s===42?b:b&&(g||!y)),t(d)}}function Gx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const zD={name:"autolink",tokenize:LD};function LD(e,t,n){let r=0;return a;function a(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(v){return Ci(v)?(e.consume(v),u):v===64?n(v):h(v)}function u(v){return v===43||v===45||v===46||xr(v)?(r=1,f(v)):h(v)}function f(v){return v===58?(e.consume(v),r=0,d):(v===43||v===45||v===46||xr(v))&&r++<32?(e.consume(v),f):(r=0,h(v))}function d(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Lm(v)?n(v):(e.consume(v),d)}function h(v){return v===64?(e.consume(v),g):wD(v)?(e.consume(v),h):n(v)}function g(v){return xr(v)?y(v):n(v)}function y(v){return v===46?(e.consume(v),r=0,g):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):b(v)}function b(v){if((v===45||xr(v))&&r++<63){const x=v===45?b:y;return e.consume(v),x}return n(v)}}const $f={partial:!0,tokenize:$D};function $D(e,t,n){return r;function r(s){return bt(s)?qt(e,a,"linePrefix")(s):a(s)}function a(s){return s===null||Ve(s)?t(s):n(s)}}const qx={continuation:{tokenize:UD},exit:jD,name:"blockQuote",tokenize:PD};function PD(e,t,n){const r=this;return a;function a(u){if(u===62){const f=r.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),s}return n(u)}function s(u){return bt(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function UD(e,t,n){const r=this;return a;function a(u){return bt(u)?qt(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):s(u)}function s(u){return e.attempt(qx,t,n)(u)}}function jD(e){e.exit("blockQuote")}const Yx={name:"characterEscape",tokenize:HD};function HD(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),a}function a(s){return TD(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Xx={name:"characterReference",tokenize:VD};function VD(e,t,n){const r=this;let a=0,s,u;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),d}function d(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,u=xr,g(y))}function h(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,u=CD,g):(e.enter("characterReferenceValue"),s=7,u=$m,g(y))}function g(y){if(y===59&&a){const b=e.exit("characterReferenceValue");return u===xr&&!zm(r.sliceSerialize(b))?n(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(y)&&a++<s?(e.consume(y),g):n(y)}}const Zx={partial:!0,tokenize:GD},Kx={concrete:!0,name:"codeFenced",tokenize:FD};function FD(e,t,n){const r=this,a={partial:!0,tokenize:M};let s=0,u=0,f;return d;function d(R){return h(R)}function h(R){const $=r.events[r.events.length-1];return s=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,f=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(R)}function g(R){return R===f?(u++,e.consume(R),g):u<3?n(R):(e.exit("codeFencedFenceSequence"),bt(R)?qt(e,y,"whitespace")(R):y(R))}function y(R){return R===null||Ve(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(Zx,E,A)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(R))}function b(R){return R===null||Ve(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(R)):bt(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),qt(e,v,"whitespace")(R)):R===96&&R===f?n(R):(e.consume(R),b)}function v(R){return R===null||Ve(R)?y(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(R))}function x(R){return R===null||Ve(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(R)):R===96&&R===f?n(R):(e.consume(R),x)}function E(R){return e.attempt(a,A,_)(R)}function _(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),w}function w(R){return s>0&&bt(R)?qt(e,O,"linePrefix",s+1)(R):O(R)}function O(R){return R===null||Ve(R)?e.check(Zx,E,A)(R):(e.enter("codeFlowValue"),T(R))}function T(R){return R===null||Ve(R)?(e.exit("codeFlowValue"),O(R)):(e.consume(R),T)}function A(R){return e.exit("codeFenced"),t(R)}function M(R,$,H){let V=0;return K;function K(P){return R.enter("lineEnding"),R.consume(P),R.exit("lineEnding"),G}function G(P){return R.enter("codeFencedFence"),bt(P)?qt(R,C,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):C(P)}function C(P){return P===f?(R.enter("codeFencedFenceSequence"),q(P)):H(P)}function q(P){return P===f?(V++,R.consume(P),q):V>=u?(R.exit("codeFencedFenceSequence"),bt(P)?qt(R,U,"whitespace")(P):U(P)):H(P)}function U(P){return P===null||Ve(P)?(R.exit("codeFencedFence"),$(P)):H(P)}}}function GD(e,t,n){const r=this;return a;function a(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s)}function s(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const jm={name:"codeIndented",tokenize:YD},qD={partial:!0,tokenize:XD};function YD(e,t,n){const r=this;return a;function a(h){return e.enter("codeIndented"),qt(e,s,"linePrefix",5)(h)}function s(h){const g=r.events[r.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?d(h):Ve(h)?e.attempt(qD,u,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Ve(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),t(h)}}function XD(e,t,n){const r=this;return a;function a(u){return r.parser.lazy[r.now().line]?n(u):Ve(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):qt(e,s,"linePrefix",5)(u)}function s(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):Ve(u)?a(u):n(u)}}const ZD={name:"codeText",previous:WD,resolve:KD,tokenize:QD};function KD(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function WD(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function QD(e,t,n){let r=0,a,s;return u;function u(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),r++,f):(e.exit("codeTextSequence"),d(y))}function d(y){return y===null?n(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),d):y===96?(s=e.enter("codeTextSequence"),a=0,g(y)):Ve(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||Ve(y)?(e.exit("codeTextData"),d(y)):(e.consume(y),h)}function g(y){return y===96?(e.consume(y),a++,g):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(s.type="codeTextData",h(y))}}class JD{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&Xl(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Xl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Xl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Xl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Xl(this.left,n.reverse())}}}function Xl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Wx(e){const t={};let n=-1,r,a,s,u,f,d,h;const g=new JD(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(r=g.get(n),n&&r[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,eB(g,n)),n=t[n],h=!0);else if(r[1]._container){for(s=n,a=void 0;s--;)if(u=g.get(s),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(a&&(g.get(a)[1].type="lineEndingBlank"),u[1].type="lineEnding",a=s);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;a&&(r[1].end={...g.get(a)[1].start},f=g.slice(a,n),f.unshift(r),g.splice(a,n-a+1,f))}}return wi(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function eB(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const s=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const f=u.events,d=[],h={};let g,y,b=-1,v=n,x=0,E=0;const _=[E];for(;v;){for(;e.get(++a)[1]!==v;);s.push(a),v._tokenizer||(g=r.sliceStream(v),v.next||g.push(null),y&&u.defineSkip(v.start),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(g),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),y=v,v=v.next}for(v=n;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(E=b+1,_.push(E),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(u.events=[],v?(v._tokenizer=void 0,v.previous=void 0):_.pop(),b=_.length;b--;){const w=f.slice(_[b],_[b+1]),O=s.pop();d.push([O,O+w.length-1]),e.splice(O,2,w)}for(d.reverse(),b=-1;++b<d.length;)h[x+d[b][0]]=x+d[b][1],x+=d[b][1]-d[b][0]-1;return h}const tB={resolve:rB,tokenize:iB},nB={partial:!0,tokenize:oB};function rB(e){return Wx(e),e}function iB(e,t){let n;return r;function r(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(f)}function a(f){return f===null?s(f):Ve(f)?e.check(nB,u,s)(f):(e.consume(f),a)}function s(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function u(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function oB(e,t,n){const r=this;return a;function a(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),qt(e,s,"linePrefix")}function s(u){if(u===null||Ve(u))return n(u);const f=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function Qx(e,t,n,r,a,s,u,f,d){const h=d||Number.POSITIVE_INFINITY;let g=0;return y;function y(w){return w===60?(e.enter(r),e.enter(a),e.enter(s),e.consume(w),e.exit(s),b):w===null||w===32||w===41||Lm(w)?n(w):(e.enter(r),e.enter(u),e.enter(f),e.enter("chunkString",{contentType:"string"}),E(w))}function b(w){return w===62?(e.enter(s),e.consume(w),e.exit(s),e.exit(a),e.exit(r),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(w))}function v(w){return w===62?(e.exit("chunkString"),e.exit(f),b(w)):w===null||w===60||Ve(w)?n(w):(e.consume(w),w===92?x:v)}function x(w){return w===60||w===62||w===92?(e.consume(w),v):v(w)}function E(w){return!g&&(w===null||w===41||lr(w))?(e.exit("chunkString"),e.exit(f),e.exit(u),e.exit(r),t(w)):g<h&&w===40?(e.consume(w),g++,E):w===41?(e.consume(w),g--,E):w===null||w===32||w===40||Lm(w)?n(w):(e.consume(w),w===92?_:E)}function _(w){return w===40||w===41||w===92?(e.consume(w),E):E(w)}}function Jx(e,t,n,r,a,s){const u=this;let f=0,d;return h;function h(v){return e.enter(r),e.enter(a),e.consume(v),e.exit(a),e.enter(s),g}function g(v){return f>999||v===null||v===91||v===93&&!d||v===94&&!f&&"_hiddenFootnoteSupport"in u.parser.constructs?n(v):v===93?(e.exit(s),e.enter(a),e.consume(v),e.exit(a),e.exit(r),t):Ve(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||Ve(v)||f++>999?(e.exit("chunkString"),g(v)):(e.consume(v),d||(d=!bt(v)),v===92?b:y)}function b(v){return v===91||v===92||v===93?(e.consume(v),f++,y):y(v)}}function eE(e,t,n,r,a,s){let u;return f;function f(b){return b===34||b===39||b===40?(e.enter(r),e.enter(a),e.consume(b),e.exit(a),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(a),e.consume(b),e.exit(a),e.exit(r),t):(e.enter(s),h(b))}function h(b){return b===u?(e.exit(s),d(u)):b===null?n(b):Ve(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),qt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===u||b===null||Ve(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?y:g)}function y(b){return b===u||b===92?(e.consume(b),g):g(b)}}function Zl(e,t){let n;return r;function r(a){return Ve(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):bt(a)?qt(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const aB={name:"definition",tokenize:lB},sB={partial:!0,tokenize:uB};function lB(e,t,n){const r=this;let a;return s;function s(v){return e.enter("definition"),u(v)}function u(v){return Jx.call(r,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return a=cs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):n(v)}function d(v){return lr(v)?Zl(e,h)(v):h(v)}function h(v){return Qx(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return e.attempt(sB,y,y)(v)}function y(v){return bt(v)?qt(e,b,"whitespace")(v):b(v)}function b(v){return v===null||Ve(v)?(e.exit("definition"),r.parser.defined.push(a),t(v)):n(v)}}function uB(e,t,n){return r;function r(f){return lr(f)?Zl(e,a)(f):n(f)}function a(f){return eE(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return bt(f)?qt(e,u,"whitespace")(f):u(f)}function u(f){return f===null||Ve(f)?t(f):n(f)}}const cB={name:"hardBreakEscape",tokenize:fB};function fB(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),a}function a(s){return Ve(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const dB={name:"headingAtx",resolve:hB,tokenize:pB};function hB(e,t){let n=e.length-2,r=3,a,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},wi(e,r,n-r+1,[["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t]])),e}function pB(e,t,n){let r=0;return a;function a(g){return e.enter("atxHeading"),s(g)}function s(g){return e.enter("atxHeadingSequence"),u(g)}function u(g){return g===35&&r++<6?(e.consume(g),u):g===null||lr(g)?(e.exit("atxHeadingSequence"),f(g)):n(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||Ve(g)?(e.exit("atxHeading"),t(g)):bt(g)?qt(e,f,"whitespace")(g):(e.enter("atxHeadingText"),h(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),f(g))}function h(g){return g===null||g===35||lr(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),h)}}const mB=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],tE=["pre","script","style","textarea"],gB={concrete:!0,name:"htmlFlow",resolveTo:bB,tokenize:SB},yB={partial:!0,tokenize:EB},vB={partial:!0,tokenize:xB};function bB(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function SB(e,t,n){const r=this;let a,s,u,f,d;return h;function h(I){return g(I)}function g(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),y}function y(I){return I===33?(e.consume(I),b):I===47?(e.consume(I),s=!0,E):I===63?(e.consume(I),a=3,r.interrupt?t:B):Ci(I)?(e.consume(I),u=String.fromCharCode(I),_):n(I)}function b(I){return I===45?(e.consume(I),a=2,v):I===91?(e.consume(I),a=5,f=0,x):Ci(I)?(e.consume(I),a=4,r.interrupt?t:B):n(I)}function v(I){return I===45?(e.consume(I),r.interrupt?t:B):n(I)}function x(I){const pe="CDATA[";return I===pe.charCodeAt(f++)?(e.consume(I),f===pe.length?r.interrupt?t:C:x):n(I)}function E(I){return Ci(I)?(e.consume(I),u=String.fromCharCode(I),_):n(I)}function _(I){if(I===null||I===47||I===62||lr(I)){const pe=I===47,ve=u.toLowerCase();return!pe&&!s&&tE.includes(ve)?(a=1,r.interrupt?t(I):C(I)):mB.includes(u.toLowerCase())?(a=6,pe?(e.consume(I),w):r.interrupt?t(I):C(I)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):s?O(I):T(I))}return I===45||xr(I)?(e.consume(I),u+=String.fromCharCode(I),_):n(I)}function w(I){return I===62?(e.consume(I),r.interrupt?t:C):n(I)}function O(I){return bt(I)?(e.consume(I),O):K(I)}function T(I){return I===47?(e.consume(I),K):I===58||I===95||Ci(I)?(e.consume(I),A):bt(I)?(e.consume(I),T):K(I)}function A(I){return I===45||I===46||I===58||I===95||xr(I)?(e.consume(I),A):M(I)}function M(I){return I===61?(e.consume(I),R):bt(I)?(e.consume(I),M):T(I)}function R(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,$):bt(I)?(e.consume(I),R):H(I)}function $(I){return I===d?(e.consume(I),d=null,V):I===null||Ve(I)?n(I):(e.consume(I),$)}function H(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||lr(I)?M(I):(e.consume(I),H)}function V(I){return I===47||I===62||bt(I)?T(I):n(I)}function K(I){return I===62?(e.consume(I),G):n(I)}function G(I){return I===null||Ve(I)?C(I):bt(I)?(e.consume(I),G):n(I)}function C(I){return I===45&&a===2?(e.consume(I),D):I===60&&a===1?(e.consume(I),Z):I===62&&a===4?(e.consume(I),z):I===63&&a===3?(e.consume(I),B):I===93&&a===5?(e.consume(I),ue):Ve(I)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(yB,W,q)(I)):I===null||Ve(I)?(e.exit("htmlFlowData"),q(I)):(e.consume(I),C)}function q(I){return e.check(vB,U,W)(I)}function U(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),P}function P(I){return I===null||Ve(I)?q(I):(e.enter("htmlFlowData"),C(I))}function D(I){return I===45?(e.consume(I),B):C(I)}function Z(I){return I===47?(e.consume(I),u="",se):C(I)}function se(I){if(I===62){const pe=u.toLowerCase();return tE.includes(pe)?(e.consume(I),z):C(I)}return Ci(I)&&u.length<8?(e.consume(I),u+=String.fromCharCode(I),se):C(I)}function ue(I){return I===93?(e.consume(I),B):C(I)}function B(I){return I===62?(e.consume(I),z):I===45&&a===2?(e.consume(I),B):C(I)}function z(I){return I===null||Ve(I)?(e.exit("htmlFlowData"),W(I)):(e.consume(I),z)}function W(I){return e.exit("htmlFlow"),t(I)}}function xB(e,t,n){const r=this;return a;function a(u){return Ve(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):n(u)}function s(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function EB(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt($f,t,n)}}const _B={name:"htmlText",tokenize:wB};function wB(e,t,n){const r=this;let a,s,u;return f;function f(B){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(B),d}function d(B){return B===33?(e.consume(B),h):B===47?(e.consume(B),M):B===63?(e.consume(B),T):Ci(B)?(e.consume(B),H):n(B)}function h(B){return B===45?(e.consume(B),g):B===91?(e.consume(B),s=0,x):Ci(B)?(e.consume(B),O):n(B)}function g(B){return B===45?(e.consume(B),v):n(B)}function y(B){return B===null?n(B):B===45?(e.consume(B),b):Ve(B)?(u=y,Z(B)):(e.consume(B),y)}function b(B){return B===45?(e.consume(B),v):y(B)}function v(B){return B===62?D(B):B===45?b(B):y(B)}function x(B){const z="CDATA[";return B===z.charCodeAt(s++)?(e.consume(B),s===z.length?E:x):n(B)}function E(B){return B===null?n(B):B===93?(e.consume(B),_):Ve(B)?(u=E,Z(B)):(e.consume(B),E)}function _(B){return B===93?(e.consume(B),w):E(B)}function w(B){return B===62?D(B):B===93?(e.consume(B),w):E(B)}function O(B){return B===null||B===62?D(B):Ve(B)?(u=O,Z(B)):(e.consume(B),O)}function T(B){return B===null?n(B):B===63?(e.consume(B),A):Ve(B)?(u=T,Z(B)):(e.consume(B),T)}function A(B){return B===62?D(B):T(B)}function M(B){return Ci(B)?(e.consume(B),R):n(B)}function R(B){return B===45||xr(B)?(e.consume(B),R):$(B)}function $(B){return Ve(B)?(u=$,Z(B)):bt(B)?(e.consume(B),$):D(B)}function H(B){return B===45||xr(B)?(e.consume(B),H):B===47||B===62||lr(B)?V(B):n(B)}function V(B){return B===47?(e.consume(B),D):B===58||B===95||Ci(B)?(e.consume(B),K):Ve(B)?(u=V,Z(B)):bt(B)?(e.consume(B),V):D(B)}function K(B){return B===45||B===46||B===58||B===95||xr(B)?(e.consume(B),K):G(B)}function G(B){return B===61?(e.consume(B),C):Ve(B)?(u=G,Z(B)):bt(B)?(e.consume(B),G):V(B)}function C(B){return B===null||B===60||B===61||B===62||B===96?n(B):B===34||B===39?(e.consume(B),a=B,q):Ve(B)?(u=C,Z(B)):bt(B)?(e.consume(B),C):(e.consume(B),U)}function q(B){return B===a?(e.consume(B),a=void 0,P):B===null?n(B):Ve(B)?(u=q,Z(B)):(e.consume(B),q)}function U(B){return B===null||B===34||B===39||B===60||B===61||B===96?n(B):B===47||B===62||lr(B)?V(B):(e.consume(B),U)}function P(B){return B===47||B===62||lr(B)?V(B):n(B)}function D(B){return B===62?(e.consume(B),e.exit("htmlTextData"),e.exit("htmlText"),t):n(B)}function Z(B){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),se}function se(B){return bt(B)?qt(e,ue,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):ue(B)}function ue(B){return e.enter("htmlTextData"),u(B)}}const Hm={name:"labelEnd",resolveAll:kB,resolveTo:RB,tokenize:OB},CB={tokenize:NB},TB={tokenize:IB},AB={tokenize:MB};function kB(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&wi(e,0,e.length,n),e}function RB(e,t){let n=e.length,r=0,a,s,u,f;for(;n--;)if(a=e[n][1],s){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(s=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(u=n);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[s][1].start},end:{...e[u][1].end}},g={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[u-2][1].start}};return f=[["enter",d,t],["enter",h,t]],f=Lr(f,e.slice(s+1,s+r+3)),f=Lr(f,[["enter",g,t]]),f=Lr(f,Pm(t.parser.constructs.insideSpan.null,e.slice(s+r+4,u-3),t)),f=Lr(f,[["exit",g,t],e[u-2],e[u-1],["exit",h,t]]),f=Lr(f,e.slice(u+1)),f=Lr(f,[["exit",d,t]]),wi(e,s,e.length,f),e}function OB(e,t,n){const r=this;let a=r.events.length,s,u;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){s=r.events[a][1];break}return f;function f(b){return s?s._inactive?y(b):(u=r.parser.defined.includes(cs(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(CB,g,u?g:y)(b):b===91?e.attempt(TB,g,u?h:y)(b):u?g(b):y(b)}function h(b){return e.attempt(AB,g,y)(b)}function g(b){return t(b)}function y(b){return s._balanced=!0,n(b)}}function NB(e,t,n){return r;function r(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),a}function a(y){return lr(y)?Zl(e,s)(y):s(y)}function s(y){return y===41?g(y):Qx(e,u,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function u(y){return lr(y)?Zl(e,d)(y):g(y)}function f(y){return n(y)}function d(y){return y===34||y===39||y===40?eE(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function h(y){return lr(y)?Zl(e,g)(y):g(y)}function g(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):n(y)}}function IB(e,t,n){const r=this;return a;function a(f){return Jx.call(r,e,s,u,"reference","referenceMarker","referenceString")(f)}function s(f){return r.parser.defined.includes(cs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function u(f){return n(f)}}function MB(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),a}function a(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const DB={name:"labelStartImage",resolveAll:Hm.resolveAll,tokenize:BB};function BB(e,t,n){const r=this;return a;function a(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),u):n(f)}function u(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(f):t(f)}}const zB={name:"labelStartLink",resolveAll:Hm.resolveAll,tokenize:LB};function LB(e,t,n){const r=this;return a;function a(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),s}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Vm={name:"lineEnding",tokenize:$B};function $B(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),qt(e,t,"linePrefix")}}const Pf={name:"thematicBreak",tokenize:PB};function PB(e,t,n){let r=0,a;return s;function s(h){return e.enter("thematicBreak"),u(h)}function u(h){return a=h,f(h)}function f(h){return h===a?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Ve(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===a?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),bt(h)?qt(e,f,"whitespace")(h):f(h))}}const ur={continuation:{tokenize:VB},exit:GB,name:"list",tokenize:HB},UB={partial:!0,tokenize:qB},jB={partial:!0,tokenize:FB};function HB(e,t,n){const r=this,a=r.events[r.events.length-1];let s=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,u=0;return f;function f(v){const x=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:$m(v)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Pf,n,h)(v):h(v);if(!r.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return n(v)}function d(v){return $m(v)&&++u<10?(e.consume(v),d):(!r.interrupt||u<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):n(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,e.check($f,r.interrupt?n:g,e.attempt(UB,b,y))}function g(v){return r.containerState.initialBlankLine=!0,s++,b(v)}function y(v){return bt(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),b):n(v)}function b(v){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function VB(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check($f,a,s);function a(f){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,qt(e,t,"listItemIndent",r.containerState.size+1)(f)}function s(f){return r.containerState.furtherBlankLines||!bt(f)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(f)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(jB,t,u)(f))}function u(f){return r.containerState._closeFlow=!0,r.interrupt=void 0,qt(e,e.attempt(ur,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function FB(e,t,n){const r=this;return qt(e,a,"listItemIndent",r.containerState.size+1);function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(s):n(s)}}function GB(e){e.exit(this.containerState.type)}function qB(e,t,n){const r=this;return qt(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(s){const u=r.events[r.events.length-1];return!bt(s)&&u&&u[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const nE={name:"setextUnderline",resolveTo:YB,tokenize:XB};function YB(e,t){let n=e.length,r,a,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const u={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",s?(e.splice(a,0,["enter",u,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=u,e.push(["exit",u,t]),e}function XB(e,t,n){const r=this;let a;return s;function s(h){let g=r.events.length,y;for(;g--;)if(r.events[g][1].type!=="lineEnding"&&r.events[g][1].type!=="linePrefix"&&r.events[g][1].type!=="content"){y=r.events[g][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||y)?(e.enter("setextHeadingLine"),a=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===a?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),bt(h)?qt(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Ve(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const ZB={tokenize:KB};function KB(e){const t=this,n=e.attempt($f,r,e.attempt(this.parser.constructs.flowInitial,a,qt(e,e.attempt(this.parser.constructs.flow,a,e.attempt(tB,a)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const WB={resolveAll:iE()},QB=rE("string"),JB=rE("text");function rE(e){return{resolveAll:iE(e==="text"?ez:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],s=n.attempt(a,u,f);return u;function u(g){return h(g)?s(g):f(g)}function f(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),d}function d(g){return h(g)?(n.exit("data"),s(g)):(n.consume(g),d)}function h(g){if(g===null)return!0;const y=a[g];let b=-1;if(y)for(;++b<y.length;){const v=y[b];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function iE(e){return t;function t(n,r){let a=-1,s;for(;++a<=n.length;)s===void 0?n[a]&&n[a][1].type==="data"&&(s=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==s+2&&(n[s][1].end=n[a-1][1].end,n.splice(s+2,a-s-2),a=s+2),s=void 0);return e?e(n,r):n}}function ez(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let s=a.length,u=-1,f=0,d;for(;s--;){const h=a[s];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)f++,u--;if(u)break;u=-1}else if(h===-2)d=!0,f++;else if(h!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const h={type:n===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?u:r.start._bufferIndex+u,_index:r.start._index+s,line:r.end.line,column:r.end.column-f,offset:r.end.offset-f},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const tz=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:aB},disable:{null:[]},document:{42:ur,43:ur,45:ur,48:ur,49:ur,50:ur,51:ur,52:ur,53:ur,54:ur,55:ur,56:ur,57:ur,62:qx},flow:{35:dB,42:Pf,45:[nE,Pf],60:gB,61:nE,95:Pf,96:Kx,126:Kx},flowInitial:{[-2]:jm,[-1]:jm,32:jm},insideSpan:{null:[Um,WB]},string:{38:Xx,92:Yx},text:{[-5]:Vm,[-4]:Vm,[-3]:Vm,33:DB,38:Xx,42:Um,60:[zD,_B],91:zB,92:[cB,Yx],93:Hm,95:Um,96:ZD}},Symbol.toStringTag,{value:"Module"}));function nz(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},s=[];let u=[],f=[];const d={attempt:$(M),check:$(R),consume:O,enter:T,exit:A,interrupt:$(R,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:x,parser:e,previous:null,sliceSerialize:b,sliceStream:v,write:y};let g=t.tokenize.call(h,d);return t.resolveAll&&s.push(t),h;function y(G){return u=Lr(u,G),_(),u[u.length-1]!==null?[]:(H(t,0),h.events=Pm(s,h.events,h),h.events)}function b(G,C){return iz(v(G),C)}function v(G){return rz(u,G)}function x(){const{_bufferIndex:G,_index:C,line:q,column:U,offset:P}=r;return{_bufferIndex:G,_index:C,line:q,column:U,offset:P}}function E(G){a[G.line]=G.column,K()}function _(){let G;for(;r._index<u.length;){const C=u[r._index];if(typeof C=="string")for(G=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===G&&r._bufferIndex<C.length;)w(C.charCodeAt(r._bufferIndex));else w(C)}}function w(G){g=g(G)}function O(G){Ve(G)?(r.line++,r.column=1,r.offset+=G===-3?2:1,K()):G!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=G}function T(G,C){const q=C||{};return q.type=G,q.start=x(),h.events.push(["enter",q,h]),f.push(q),q}function A(G){const C=f.pop();return C.end=x(),h.events.push(["exit",C,h]),C}function M(G,C){H(G,C.from)}function R(G,C){C.restore()}function $(G,C){return q;function q(U,P,D){let Z,se,ue,B;return Array.isArray(U)?W(U):"tokenize"in U?W([U]):z(U);function z(he){return xe;function xe(Ke){const Ie=Ke!==null&&he[Ke],Me=Ke!==null&&he.null,Fe=[...Array.isArray(Ie)?Ie:Ie?[Ie]:[],...Array.isArray(Me)?Me:Me?[Me]:[]];return W(Fe)(Ke)}}function W(he){return Z=he,se=0,he.length===0?D:I(he[se])}function I(he){return xe;function xe(Ke){return B=V(),ue=he,he.partial||(h.currentConstruct=he),he.name&&h.parser.constructs.disable.null.includes(he.name)?ve():he.tokenize.call(C?Object.assign(Object.create(h),C):h,d,pe,ve)(Ke)}}function pe(he){return G(ue,B),P}function ve(he){return B.restore(),++se<Z.length?I(Z[se]):D}}}function H(G,C){G.resolveAll&&!s.includes(G)&&s.push(G),G.resolve&&wi(h.events,C,h.events.length-C,G.resolve(h.events.slice(C),h)),G.resolveTo&&(h.events=G.resolveTo(h.events,h))}function V(){const G=x(),C=h.previous,q=h.currentConstruct,U=h.events.length,P=Array.from(f);return{from:U,restore:D};function D(){r=G,h.previous=C,h.currentConstruct=q,h.events.length=U,f=P,K()}}function K(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function rz(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,s=t.end._bufferIndex;let u;if(n===a)u=[e[n].slice(r,s)];else{if(u=e.slice(n,a),r>-1){const f=u[0];typeof f=="string"?u[0]=f.slice(r):u.shift()}s>0&&u.push(e[a].slice(0,s))}return u}function iz(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const s=e[n];let u;if(typeof s=="string")u=s;else switch(s){case-5:{u="\r";break}case-4:{u=`
|
|
156
|
+
`)},F5=(e,t,n)=>r=>{let a={},s=!0,u=!0,f="",d=null,h=null,g=[],y={},b=v=>{typeof v=="object"&&v!==null&&("messages"in v&&delete v.messages,a=v)};return r.pipe(mo(v=>{switch(v.type){case fe.TEXT_MESSAGE_START:{let x=v;return[{type:Ft.enum.TextMessageStart,messageId:x.messageId,role:x.role}]}case fe.TEXT_MESSAGE_CONTENT:{let x=v;return[{type:Ft.enum.TextMessageContent,messageId:x.messageId,content:x.delta}]}case fe.TEXT_MESSAGE_END:{let x=v;return[{type:Ft.enum.TextMessageEnd,messageId:x.messageId}]}case fe.TOOL_CALL_START:{let x=v;return g.push({id:x.toolCallId,type:"function",function:{name:x.toolCallName,arguments:""}}),u=!0,y[x.toolCallId]=x.toolCallName,[{type:Ft.enum.ActionExecutionStart,actionExecutionId:x.toolCallId,actionName:x.toolCallName,parentMessageId:x.parentMessageId}]}case fe.TOOL_CALL_ARGS:{let x=v,E=g.find(w=>w.id===x.toolCallId);if(!E)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${x.toolCallId}'`),[];E.function.arguments+=x.delta;let _=!1;if(h){let w=h.find(O=>O.tool==E.function.name);if(w)try{let O=JSON.parse(h1(E.function.arguments));w.tool_argument&&w.tool_argument in O?(b(yo(Zn({},a),{[w.state_key]:O[w.tool_argument]})),_=!0):w.tool_argument||(b(yo(Zn({},a),{[w.state_key]:O})),_=!0)}catch{}}return[{type:Ft.enum.ActionExecutionArgs,actionExecutionId:x.toolCallId,args:x.delta},..._?[{type:Ft.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:u}]:[]]}case fe.TOOL_CALL_END:{let x=v;return[{type:Ft.enum.ActionExecutionEnd,actionExecutionId:x.toolCallId}]}case fe.TOOL_CALL_RESULT:{let x=v;return[{type:Ft.enum.ActionExecutionResult,actionExecutionId:x.toolCallId,result:x.content,actionName:y[x.toolCallId]||"unknown"}]}case fe.RAW:return[];case fe.CUSTOM:{let x=v;switch(x.name){case"Exit":s=!1;break;case"PredictState":h=x.value;break}return[{type:Ft.enum.MetaEvent,name:x.name,value:x.value}]}case fe.STATE_SNAPSHOT:return b(v.snapshot),[{type:Ft.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:u}];case fe.STATE_DELTA:{let x=ss(a,v.delta,!0,!1);return x?(b(x.newDocument),[{type:Ft.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:u}]):[]}case fe.MESSAGES_SNAPSHOT:return d=v.messages,[{type:Ft.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(Zn(Zn({},a),d?{messages:d}:{})),active:!0}];case fe.RUN_STARTED:return[];case fe.RUN_FINISHED:return d&&(a.messages=d),Object.keys(a).length===0?[]:[{type:Ft.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(Zn(Zn({},a),d?{messages:G5(d)}:{})),active:!1}];case fe.RUN_ERROR:{let x=v;return[{type:Ft.enum.RunError,message:x.message,code:x.code}]}case fe.STEP_STARTED:return f=v.stepName,g=[],h=null,[{type:Ft.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:!0}];case fe.STEP_FINISHED:return g=[],h=null,[{type:Ft.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:f,runId:t,running:s,role:"assistant",state:JSON.stringify(a),active:!1}];default:return[]}}))};function G5(e){var t;let n=[];for(let r of e)if(r.role==="assistant"||r.role==="user"||r.role==="system"){let a=V5(r.content);if(a){let s={id:r.id,role:r.role,content:a};n.push(s)}if(r.role==="assistant"&&r.toolCalls&&r.toolCalls.length>0)for(let s of r.toolCalls){let u={id:s.id,name:s.function.name,arguments:JSON.parse(s.function.arguments),parentMessageId:r.id};n.push(u)}}else if(r.role==="tool"){let a="unknown";for(let u of e)if(u.role==="assistant"&&(t=u.toolCalls)!=null&&t.length){for(let f of u.toolCalls)if(f.id===r.toolCallId){a=f.function.name;break}}let s={id:r.id,result:r.content,actionExecutionId:r.toolCallId,actionName:a};n.push(s)}return n}var Df=e=>t=>{let n,r,a,s=()=>{if(!n||a!=="text")throw new Error("No text message to close");let d={type:fe.TEXT_MESSAGE_END,messageId:n.messageId};return a=void 0,n=void 0,e&&console.debug("[TRANSFORM]: TEXT_MESSAGE_END",JSON.stringify(d)),d},u=()=>{if(!r||a!=="tool")throw new Error("No tool call to close");let d={type:fe.TOOL_CALL_END,toolCallId:r.toolCallId};return a=void 0,r=void 0,e&&console.debug("[TRANSFORM]: TOOL_CALL_END",JSON.stringify(d)),d},f=()=>a==="text"?[s()]:a==="tool"?[u()]:[];return t.pipe(mo(d=>{switch(d.type){case fe.TEXT_MESSAGE_START:case fe.TEXT_MESSAGE_CONTENT:case fe.TEXT_MESSAGE_END:case fe.TOOL_CALL_START:case fe.TOOL_CALL_ARGS:case fe.TOOL_CALL_END:case fe.TOOL_CALL_RESULT:case fe.STATE_SNAPSHOT:case fe.STATE_DELTA:case fe.MESSAGES_SNAPSHOT:case fe.CUSTOM:case fe.RUN_STARTED:case fe.RUN_FINISHED:case fe.RUN_ERROR:case fe.STEP_STARTED:case fe.STEP_FINISHED:case fe.THINKING_START:case fe.THINKING_END:case fe.THINKING_TEXT_MESSAGE_START:case fe.THINKING_TEXT_MESSAGE_CONTENT:case fe.THINKING_TEXT_MESSAGE_END:return[...f(),d];case fe.RAW:case fe.ACTIVITY_SNAPSHOT:case fe.ACTIVITY_DELTA:return[d];case fe.TEXT_MESSAGE_CHUNK:let h=d,g=[];if((a!=="text"||h.messageId!==void 0&&h.messageId!==n?.messageId)&&g.push(...f()),a!=="text"){if(h.messageId===void 0)throw new Error("First TEXT_MESSAGE_CHUNK must have a messageId");n={messageId:h.messageId},a="text";let v={type:fe.TEXT_MESSAGE_START,messageId:h.messageId,role:h.role||"assistant"};g.push(v),e&&console.debug("[TRANSFORM]: TEXT_MESSAGE_START",JSON.stringify(v))}if(h.delta!==void 0){let v={type:fe.TEXT_MESSAGE_CONTENT,messageId:n.messageId,delta:h.delta};g.push(v),e&&console.debug("[TRANSFORM]: TEXT_MESSAGE_CONTENT",JSON.stringify(v))}return g;case fe.TOOL_CALL_CHUNK:let y=d,b=[];if((a!=="tool"||y.toolCallId!==void 0&&y.toolCallId!==r?.toolCallId)&&b.push(...f()),a!=="tool"){if(y.toolCallId===void 0)throw new Error("First TOOL_CALL_CHUNK must have a toolCallId");if(y.toolCallName===void 0)throw new Error("First TOOL_CALL_CHUNK must have a toolCallName");r={toolCallId:y.toolCallId,toolCallName:y.toolCallName,parentMessageId:y.parentMessageId},a="tool";let v={type:fe.TOOL_CALL_START,toolCallId:y.toolCallId,toolCallName:y.toolCallName,parentMessageId:y.parentMessageId};b.push(v),e&&console.debug("[TRANSFORM]: TOOL_CALL_START",JSON.stringify(v))}if(y.delta!==void 0){let v={type:fe.TOOL_CALL_ARGS,toolCallId:r.toolCallId,delta:y.delta};b.push(v),e&&console.debug("[TRANSFORM]: TOOL_CALL_ARGS",JSON.stringify(v))}return b}return d.type,[]}),rm(()=>{f()}))},ox=class{runNext(e,t){return t.run(e).pipe(Df(!1))}runNextWithState(e,t){let n=$t(e.messages||[]),r=$t(e.state||{}),a=new n1;return ix(e,a,t,[]).subscribe(s=>{s.messages!==void 0&&(n=s.messages),s.state!==void 0&&(r=s.state)}),this.runNext(e,t).pipe(JS(async s=>(a.next(s),await new Promise(u=>setTimeout(u,0)),{event:s,messages:$t(n),state:$t(r)})))}},q5=class extends ox{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function Y5(e){let t=e.content;if(Array.isArray(t)){let n=t.filter(r=>typeof r=="object"&&r!==null&&"type"in r&&r.type==="text"&&typeof r.text=="string").map(r=>r.text).join("");return yo(Zn({},e),{content:n})}return typeof t=="string"?e:yo(Zn({},e),{content:""})}var X5=class extends ox{run(e,t){let n=e,{parentRunId:r}=n,a=A5(n,["parentRunId"]),s=yo(Zn({},a),{messages:a.messages.map(Y5)});return this.runNext(s,t)}},Z5={version:"0.0.43"},K5=class{constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:a,debug:s}={}){this.debug=!1,this.subscribers=[],this.isRunning=!1,this.middlewares=[],this.agentId=e,this.description=t??"",this.threadId=n??$l(),this.messages=$t(r??[]),this.state=$t(a??{}),this.debug=s??!1,_5(this.maxVersion,"0.0.39")<=0&&this.middlewares.unshift(new X5)}get maxVersion(){return Z5.version}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e)}}}use(...e){let t=e.map(n=>typeof n=="function"?new q5(n):n);return this.middlewares.push(...t),this}async runAgent(e,t){var n;try{this.isRunning=!0,this.agentId=(n=this.agentId)!=null?n:$l();let r=this.prepareRunAgentInput(e),a,s=new Set(this.messages.map(g=>g.id)),u=[{onRunFinishedEvent:g=>{a=g.result}},...this.subscribers,t??{}];await this.onInitialize(r,u),this.activeRunDetach$=new la;let f;this.activeRunCompletionPromise=new Promise(g=>{f=g});let d=$S(()=>this.middlewares.length===0?this.run(r):this.middlewares.reduceRight((g,y)=>({run:b=>y.run(b,g)}),this).run(r),Df(this.debug),Sm(this.debug),g=>g.pipe(i1(this.activeRunDetach$)),g=>this.apply(r,g,u),g=>this.processApplyEvents(r,g,u),zl(g=>(this.isRunning=!1,this.onError(r,g,u))),rm(()=>{this.isRunning=!1,this.onFinalize(r,u),f?.(),f=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}));await o1(d(vn(null)));let h=$t(this.messages).filter(g=>!s.has(g.id));return{result:a,newMessages:h}}finally{this.isRunning=!1}}connect(e){throw new AS}async connectAgent(e,t){var n;try{this.isRunning=!0,this.agentId=(n=this.agentId)!=null?n:$l();let r=this.prepareRunAgentInput(e),a,s=new Set(this.messages.map(g=>g.id)),u=[{onRunFinishedEvent:g=>{a=g.result}},...this.subscribers,t??{}];await this.onInitialize(r,u),this.activeRunDetach$=new la;let f;this.activeRunCompletionPromise=new Promise(g=>{f=g});let d=$S(()=>this.connect(r),Df(this.debug),Sm(this.debug),g=>g.pipe(i1(this.activeRunDetach$)),g=>this.apply(r,g,u),g=>this.processApplyEvents(r,g,u),zl(g=>(this.isRunning=!1,g instanceof AS?t1:this.onError(r,g,u))),rm(()=>{this.isRunning=!1,this.onFinalize(r,u),f?.(),f=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}));await o1(d(vn(null)));let h=$t(this.messages).filter(g=>!s.has(g.id));return{result:a,newMessages:h}}finally{this.isRunning=!1}}abortRun(){}async detachActiveRun(){var e,t;if(!this.activeRunDetach$)return;let n=(e=this.activeRunCompletionPromise)!=null?e:Promise.resolve();this.activeRunDetach$.next(),(t=this.activeRunDetach$)==null||t.complete(),await n}apply(e,t,n){return ix(e,t,this,n)}processApplyEvents(e,t,n){return t.pipe(H4(r=>{r.messages&&(this.messages=r.messages,n.forEach(a=>{var s;(s=a.onMessagesChanged)==null||s.call(a,{messages:this.messages,state:this.state,agent:this,input:e})})),r.state&&(this.state=r.state,n.forEach(a=>{var s;(s=a.onStateChanged)==null||s.call(a,{state:this.state,messages:this.messages,agent:this,input:e})}))}))}prepareRunAgentInput(e){var t,n,r;let a=$t(this.messages).filter(s=>s.role!=="activity");return{threadId:this.threadId,runId:e?.runId||$l(),tools:$t((t=e?.tools)!=null?t:[]),context:$t((n=e?.context)!=null?n:[]),forwardedProps:$t((r=e?.forwardedProps)!=null?r:{}),state:$t(this.state),messages:a}}async onInitialize(e,t){let n=await tn(t,this.messages,this.state,(r,a,s)=>{var u;return(u=r.onRunInitialized)==null?void 0:u.call(r,{messages:a,state:s,agent:this,input:e})});(n.messages!==void 0||n.state!==void 0)&&(n.messages&&(this.messages=n.messages,e.messages=n.messages,t.forEach(r=>{var a;(a=r.onMessagesChanged)==null||a.call(r,{messages:this.messages,state:this.state,agent:this,input:e})})),n.state&&(this.state=n.state,e.state=n.state,t.forEach(r=>{var a;(a=r.onStateChanged)==null||a.call(r,{state:this.state,messages:this.messages,agent:this,input:e})})))}onError(e,t,n){return Ll(tn(n,this.messages,this.state,(r,a,s)=>{var u;return(u=r.onRunFailed)==null?void 0:u.call(r,{error:t,messages:a,state:s,agent:this,input:e})})).pipe(nm(r=>{let a=r;if((a.messages!==void 0||a.state!==void 0)&&(a.messages!==void 0&&(this.messages=a.messages,n.forEach(s=>{var u;(u=s.onMessagesChanged)==null||u.call(s,{messages:this.messages,state:this.state,agent:this,input:e})})),a.state!==void 0&&(this.state=a.state,n.forEach(s=>{var u;(u=s.onStateChanged)==null||u.call(s,{state:this.state,messages:this.messages,agent:this,input:e})}))),a.stopPropagation!==!0)throw console.error("Agent execution failed:",t),t;return{}}))}async onFinalize(e,t){let n=await tn(t,this.messages,this.state,(r,a,s)=>{var u;return(u=r.onRunFinalized)==null?void 0:u.call(r,{messages:a,state:s,agent:this,input:e})});(n.messages!==void 0||n.state!==void 0)&&(n.messages!==void 0&&(this.messages=n.messages,t.forEach(r=>{var a;(a=r.onMessagesChanged)==null||a.call(r,{messages:this.messages,state:this.state,agent:this,input:e})})),n.state!==void 0&&(this.state=n.state,t.forEach(r=>{var a;(a=r.onStateChanged)==null||a.call(r,{state:this.state,messages:this.messages,agent:this,input:e})})))}clone(){let e=Object.create(Object.getPrototypeOf(this));return e.agentId=this.agentId,e.description=this.description,e.threadId=this.threadId,e.messages=$t(this.messages),e.state=$t(this.state),e.debug=this.debug,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e}addMessage(e){this.messages.push(e),(async()=>{var t,n,r;for(let a of this.subscribers)await((t=a.onNewMessage)==null?void 0:t.call(a,{message:e,messages:this.messages,state:this.state,agent:this}));if(e.role==="assistant"&&e.toolCalls)for(let a of e.toolCalls)for(let s of this.subscribers)await((n=s.onNewToolCall)==null?void 0:n.call(s,{toolCall:a,messages:this.messages,state:this.state,agent:this}));for(let a of this.subscribers)await((r=a.onMessagesChanged)==null?void 0:r.call(a,{messages:this.messages,state:this.state,agent:this}))})()}addMessages(e){this.messages.push(...e),(async()=>{var t,n,r;for(let a of e){for(let s of this.subscribers)await((t=s.onNewMessage)==null?void 0:t.call(s,{message:a,messages:this.messages,state:this.state,agent:this}));if(a.role==="assistant"&&a.toolCalls)for(let s of a.toolCalls)for(let u of this.subscribers)await((n=u.onNewToolCall)==null?void 0:n.call(u,{toolCall:s,messages:this.messages,state:this.state,agent:this}))}for(let a of this.subscribers)await((r=a.onMessagesChanged)==null?void 0:r.call(a,{messages:this.messages,state:this.state,agent:this}))})()}setMessages(e){this.messages=$t(e),(async()=>{var t;for(let n of this.subscribers)await((t=n.onMessagesChanged)==null?void 0:t.call(n,{messages:this.messages,state:this.state,agent:this}))})()}setState(e){this.state=$t(e),(async()=>{var t;for(let n of this.subscribers)await((t=n.onStateChanged)==null?void 0:t.call(n,{messages:this.messages,state:this.state,agent:this}))})()}legacy_to_be_removed_runAgentBridged(e){var t;this.agentId=(t=this.agentId)!=null?t:$l();let n=this.prepareRunAgentInput(e);return(this.middlewares.length===0?this.run(n):this.middlewares.reduceRight((r,a)=>({run:s=>a.run(s,r)}),this).run(n)).pipe(Df(this.debug),Sm(this.debug),F5(this.threadId,n.runId,this.agentId),r=>r.pipe(nm(a=>(this.debug&&console.debug("[LEGACY]:",JSON.stringify(a)),a))))}},W5=class extends K5{constructor(e){var t;super(e),this.abortController=new AbortController,this.url=e.url,this.headers=$t((t=e.headers)!=null?t:{})}requestInit(e){return{method:"POST",headers:yo(Zn({},this.headers),{"Content-Type":"application/json",Accept:"text/event-stream"}),body:JSON.stringify(e),signal:this.abortController.signal}}runAgent(e,t){var n;return this.abortController=(n=e?.abortController)!=null?n:new AbortController,super.runAgent(e,t)}abortRun(){this.abortController.abort(),super.abortRun()}run(e){let t=k5(this.url,this.requestInit(e));return N5(t)}clone(){var e;let t=super.clone();t.url=this.url,t.headers=$t((e=this.headers)!=null?e:{});let n=new AbortController,r=this.abortController.signal;return r.aborted&&n.abort(r.reason),t.abortController=n,t}};const Q5=2e3,Hl="/api/chat",J5="/api/chat-session",ax="/api/conversation/verification",sx=e=>{let t;const n=new Set,r=(h,g)=>{const y=typeof h=="function"?h(t):h;if(!Object.is(y,t)){const b=t;t=g??(typeof y!="object"||y===null)?y:Object.assign({},t,y),n.forEach(v=>v(t,b))}},a=()=>t,f={setState:r,getState:a,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(r,a,f);return f},e6=(e=>e?sx(e):sx),t6=e=>e;function n6(e,t=t6){const n=Jn.useSyncExternalStore(e.subscribe,Jn.useCallback(()=>t(e.getState()),[e,t]),Jn.useCallback(()=>t(e.getInitialState()),[e,t]));return Jn.useDebugValue(n),n}const lx=e=>{const t=e6(e),n=r=>n6(t,r);return Object.assign(n,t),n},Bf=(e=>e?lx(e):lx)((e,t)=>({items:[],push:n=>{const r=crypto.randomUUID?crypto.randomUUID():String(Date.now()),a={id:r,ttl:5e3,...n};e(s=>({items:[...s.items,a]})),setTimeout(()=>{t().remove(r)},a.ttl)},remove:n=>e(r=>({items:r.items.filter(a=>a.id!==n)})),clear:()=>e({items:[]})}));let ux=null;function r6(e){ux=e}function vo(){return ux}let zf=null;async function Lf(){const e=vo();return zf||(zf=fetch(`${e?.apiBaseUrl}${J5}/${e?.clientId}/authorize`,{method:"POST",headers:{"Content-Type":"application/json"}}).then(async t=>{if(!t.ok)throw new Error("refresh failed");return t.json()}).then(t=>(e&&(e.sessionToken=t),t)).finally(()=>{zf=null})),zf}async function i6(){const t=vo()?.sessionToken;return t||Lf()}async function o6(e){const t=await e.clone().json().catch(()=>null);Bf.getState().push({type:"error",message:t?.message??"Request failed",status:e.status})}async function fa(e,t={}){let n=await i6();const r=s=>{const u=new Headers(t.headers);return u.set("Authorization",`Bearer ${s}`),u};let a=await fetch(e,{...t,headers:r(n)});return a.status===401&&(n=await Lf(),a=await fetch(e,{...t,headers:r(n)})),a.ok||await o6(a),a}const cx={UIDirectiveEvent:"UI_DIRECTIVE"};function a6(){const e=window.innerWidth;return e<=767?"Mobile":e<=1024?"Tablet":"Desktop"}function fx(e){return e?.status??e?.response?.status??e?.cause?.status??e?.cause?.response?.status}function s6(e){return fx(e)===401}function l6(e){const t=fx(e);return typeof t=="number"&&t==400}function u6(e){if(s6(e))return!0;const n=String(e?.message??"");return n.includes("401")||n.toLowerCase().includes("unauthorized")}const dx=(e,t)=>{const n={...e.headers??{}};t?n.Authorization=`Bearer ${t}`:delete n.Authorization,e.headers=n};function c6(e,t){let n=null;const r=()=>(n||(n=t.refreshAccessToken().finally(()=>n=null)),n);return(a,s)=>{let u=!1;return a1(()=>(dx(e,t.getAccessToken()),s.run(a).pipe(zl(f=>u||!u6(f)?Qt(()=>f):(u=!0,Ll(r()).pipe(r1(d=>(dx(e,d),s.run(a)))))))))}}const f6=(e,t)=>t.run(e).pipe(zl(n=>{if(l6(n)){const r=n.payload;Bf.getState().push({type:"error",message:r.message,status:r.statusCode})}return t.run(e)}));async function d6(e){const t=new W5({url:e.url,threadId:e.conversationId||void 0,headers:{"X-Device-Type":a6(),...e.clientId?{"X-Client-Id":e.clientId}:{},...e.conversationId?{"X-Conversation-Id":e.conversationId}:{},...e.message.id?{"X-Message-Id":e.message.id}:{}}});let n=[];const r={onRunStartedEvent:({event:s})=>{e.onRunStarted(s.threadId)},onTextMessageContentEvent:({event:s})=>{if(s.type===fe.TEXT_MESSAGE_CONTENT){const u={id:s.messageId,text:s.delta,role:s.role||"assistant"};e.onDelta(u)}},onRunFinishedEvent:({result:s})=>{},onRunErrorEvent:({event:s})=>{},onToolCallStartEvent:({event:s})=>{const u=s;n.some(d=>d.toolCallId==u.toolCallId)||n.push({toolCallId:u.toolCallId,toolCallName:u.toolCallName,delta:u.delta??""})},onToolCallArgsEvent:({event:s})=>{const u=s;n.map(f=>(f.toolCallId==u.toolCallId&&(f.delta+=u.delta),f))},onToolCallResultEvent:({event:s})=>{},onToolCallEndEvent:({event:s})=>{const u=s;n.map(f=>(f.toolCallId==u.toolCallId&&(f.delta=JSON.parse(f.delta)),f)),e.onAgentToolEvent&&e.onAgentToolEvent(n)},onCustomEvent({event:s}){if(s.name===cx.UIDirectiveEvent){const f=JSON.parse(s.value),d={type:"CUSTOM",name:cx.UIDirectiveEvent,value:f};e.onAgentCustomEvent&&e.onAgentCustomEvent(d)}}};e.message.role=="tool"&&(e.toolCallHistory?.map(s=>{t.messages.push({id:crypto.randomUUID(),role:"assistant",toolCalls:[{id:s.toolCallId,type:"function",function:{name:s.toolCallName,arguments:JSON.stringify(s.delta)}}]})}),e.onAgentToolEvent&&e.onAgentToolEvent([])),e.message&&(t.messages=[...t.messages,e.message]);const a=c6(t,{getAccessToken:()=>e.token||null,refreshAccessToken:async()=>await Lf()});t.use(a,f6),await t.runAgent({tools:[]},r)}const xm="chat_session_v1",h6=1440*60*1e3;function p6(){try{const e=localStorage.getItem(xm);return e?JSON.parse(e):null}catch{return null}}function hx(e){localStorage.setItem(xm,JSON.stringify(e))}function da(){const e=Date.now(),t=p6();if(!t)return null;if(e-t.lastActivityAt>h6)return g6(),null;const r={...t,lastActivityAt:e};return hx(r),r.conversationId}function m6(e){const t={conversationId:e,lastActivityAt:Date.now()};hx(t)}function g6(){localStorage.removeItem(xm)}const y6=Xn(L.jsx("path",{d:"M20 4v12H5.17L4 17.17V4zm0-2H4c-1.1 0-2 .9-2 2v15.59c0 .89 1.08 1.34 1.71.71L6 18h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2"}));function v6(){if(typeof document>"u"||document.querySelector('meta[name="viewport"]'))return;const t=document.createElement("meta");t.name="viewport",t.content="width=device-width, initial-scale=1",document.head.appendChild(t)}function b6(){N.useEffect(()=>{const e=()=>{const t=window.innerHeight*.01;document.documentElement.style.setProperty("--vh",`${t}px`)};return e(),window.addEventListener("resize",e),window.addEventListener("orientationchange",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}},[])}const S6=e=>e==="AI"?"Răspunde automat mesajelor":e==="Human"?"In conversatie cu un operator":e==="Disconnected"?"Conexiune pierduta. Reincarcati pagina!":e==="Ended"?"Conversație închisă":"Conversație nouă",Em=Xn(L.jsx("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3M7.5 11.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5S9.83 13 9 13s-1.5-.67-1.5-1.5M15 17H9c-.55 0-1-.45-1-1s.45-1 1-1h6c.55 0 1 .45 1 1s-.45 1-1 1m0-4c-.83 0-1.5-.67-1.5-1.5S14.17 10 15 10s1.5.67 1.5 1.5S15.83 13 15 13"})),px=Xn(L.jsx("path",{d:"M19 6.41 17.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"}));function x6({isMobile:e,conversationMode:t,setOpen:n}){return L.jsxs(yn,{sx:{px:1.75,py:1.25,display:"flex",alignItems:"center",gap:1,borderBottom:"1px solid",borderColor:"divider",background:"linear-gradient(135deg, rgba(25,118,210,.18), rgba(156,39,176,.14))",backdropFilter:e?"none":"blur(10px)"},children:[L.jsx(YN,{overlap:"circular",variant:"dot",color:t!="Disconnected"?"success":"error",sx:{"& .MuiBadge-badge":{width:10,height:10,borderRadius:999,border:"2px solid",borderColor:"background.paper"}},children:L.jsx(Pc,{sx:{bgcolor:"primary.main"},children:L.jsx(Em,{})})}),L.jsxs(yn,{sx:{flex:1,minWidth:0},children:[L.jsx(ti,{variant:"subtitle1",sx:{fontWeight:700,lineHeight:1.1},children:"Asistent"}),L.jsx(ti,{variant:"caption",sx:{color:"text.secondary"},children:S6(t)})]}),L.jsx(Cl,{size:"small",onClick:()=>n(!1),sx:{bgcolor:"rgba(255,255,255,.55)",border:"1px solid",borderColor:"divider","&:hover":{bgcolor:"rgba(255,255,255,.75)"}},children:L.jsx(px,{fontSize:"small"})})]})}function E6(e){const{error:t,onClose:n}=e;return t?L.jsx(yn,{sx:{px:2,pt:1},children:L.jsx(iN,{severity:"error",variant:"filled",action:L.jsx(Cl,{size:"small",onClick:n,"aria-label":"Close error banner",children:L.jsx(px,{fontSize:"small"})}),children:t})}):null}const _6=Xn(L.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v1c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-1c0-2.66-5.33-4-8-4"})),w6=Xn(L.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 11h7V4z"})),C6=Xn(L.jsx("path",{d:"m3.4 20.4 17.45-7.48c.81-.35.81-1.49 0-1.84L3.4 3.6c-.66-.29-1.39.2-1.39.91L2 9.12c0 .5.37.93.87.99L17 12 2.87 13.88c-.5.07-.87.5-.87 1l.01 4.61c0 .71.73 1.2 1.39.91"})),T6=Xn(L.jsx("path",{d:"M20 9V7c0-1.1-.9-2-2-2h-3c0-1.66-1.34-3-3-3S9 3.34 9 5H6c-1.1 0-2 .9-2 2v2c-1.66 0-3 1.34-3 3s1.34 3 3 3v4c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-4c1.66 0 3-1.34 3-3s-1.34-3-3-3m-2 10H6V7h12zm-9-6c-.83 0-1.5-.67-1.5-1.5S8.17 10 9 10s1.5.67 1.5 1.5S9.83 13 9 13m7.5-1.5c0 .83-.67 1.5-1.5 1.5s-1.5-.67-1.5-1.5.67-1.5 1.5-1.5 1.5.67 1.5 1.5M8 15h8v2H8z"})),A6=Xn([L.jsx("path",{d:"M21 12.22C21 6.73 16.74 3 12 3c-4.69 0-9 3.65-9 9.28-.6.34-1 .98-1 1.72v2c0 1.1.9 2 2 2h1v-6.1c0-3.87 3.13-7 7-7s7 3.13 7 7V19h-8v2h8c1.1 0 2-.9 2-2v-1.22c.59-.31 1-.92 1-1.64v-2.3c0-.7-.41-1.31-1-1.62"},"0"),L.jsx("circle",{cx:"9",cy:"13",r:"1"},"1"),L.jsx("circle",{cx:"15",cy:"13",r:"1"},"2"),L.jsx("path",{d:"M18 11.03C17.52 8.18 15.04 6 12.05 6c-3.03 0-6.29 2.51-6.03 6.45 2.47-1.01 4.33-3.21 4.86-5.89 1.31 2.63 4 4.44 7.12 4.47"},"3")]);function oj(){}function aj(){}function k6(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const R6=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,O6=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,N6={};function mx(e,t){return(N6.jsx?O6:R6).test(e)}const I6=/[ \t\n\f\r]/g;function M6(e){return typeof e=="object"?e.type==="text"?gx(e.value):!1:gx(e)}function gx(e){return e.replace(I6,"")===""}class Vl{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Vl.prototype.normal={},Vl.prototype.property={},Vl.prototype.space=void 0;function yx(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Vl(n,r,t)}function _m(e){return e.toLowerCase()}class sr{constructor(t,n){this.attribute=n,this.property=t}}sr.prototype.attribute="",sr.prototype.booleanish=!1,sr.prototype.boolean=!1,sr.prototype.commaOrSpaceSeparated=!1,sr.prototype.commaSeparated=!1,sr.prototype.defined=!1,sr.prototype.mustUseProperty=!1,sr.prototype.number=!1,sr.prototype.overloadedBoolean=!1,sr.prototype.property="",sr.prototype.spaceSeparated=!1,sr.prototype.space=void 0;let D6=0;const Ze=ha(),wn=ha(),wm=ha(),ge=ha(),Gt=ha(),ls=ha(),Sr=ha();function ha(){return 2**++D6}const Cm=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ze,booleanish:wn,commaOrSpaceSeparated:Sr,commaSeparated:ls,number:ge,overloadedBoolean:wm,spaceSeparated:Gt},Symbol.toStringTag,{value:"Module"})),Tm=Object.keys(Cm);class Am extends sr{constructor(t,n,r,a){let s=-1;if(super(t,n),vx(this,"space",a),typeof r=="number")for(;++s<Tm.length;){const u=Tm[s];vx(this,Tm[s],(r&Cm[u])===Cm[u])}}}Am.prototype.defined=!0;function vx(e,t,n){n&&(e[t]=n)}function us(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const s=new Am(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[_m(r)]=r,n[_m(s.attribute)]=r}return new Vl(t,n,e.space)}const bx=us({properties:{ariaActiveDescendant:null,ariaAtomic:wn,ariaAutoComplete:null,ariaBusy:wn,ariaChecked:wn,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:Gt,ariaCurrent:null,ariaDescribedBy:Gt,ariaDetails:null,ariaDisabled:wn,ariaDropEffect:Gt,ariaErrorMessage:null,ariaExpanded:wn,ariaFlowTo:Gt,ariaGrabbed:wn,ariaHasPopup:null,ariaHidden:wn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Gt,ariaLevel:ge,ariaLive:null,ariaModal:wn,ariaMultiLine:wn,ariaMultiSelectable:wn,ariaOrientation:null,ariaOwns:Gt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:wn,ariaReadOnly:wn,ariaRelevant:null,ariaRequired:wn,ariaRoleDescription:Gt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:wn,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Sx(e,t){return t in e?e[t]:t}function xx(e,t){return Sx(e,t.toLowerCase())}const B6=us({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ls,acceptCharset:Gt,accessKey:Gt,action:null,allow:null,allowFullScreen:Ze,allowPaymentRequest:Ze,allowUserMedia:Ze,alt:null,as:null,async:Ze,autoCapitalize:null,autoComplete:Gt,autoFocus:Ze,autoPlay:Ze,blocking:Gt,capture:null,charSet:null,checked:Ze,cite:null,className:Gt,cols:ge,colSpan:null,content:null,contentEditable:wn,controls:Ze,controlsList:Gt,coords:ge|ls,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ze,defer:Ze,dir:null,dirName:null,disabled:Ze,download:wm,draggable:wn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ze,formTarget:null,headers:Gt,height:ge,hidden:wm,high:ge,href:null,hrefLang:null,htmlFor:Gt,httpEquiv:Gt,id:null,imageSizes:null,imageSrcSet:null,inert:Ze,inputMode:null,integrity:null,is:null,isMap:Ze,itemId:null,itemProp:Gt,itemRef:Gt,itemScope:Ze,itemType:Gt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ze,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:Ze,muted:Ze,name:null,nonce:null,noModule:Ze,noValidate:Ze,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ze,optimum:ge,pattern:null,ping:Gt,placeholder:null,playsInline:Ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ze,referrerPolicy:null,rel:Gt,required:Ze,reversed:Ze,rows:ge,rowSpan:ge,sandbox:Gt,scope:null,scoped:Ze,seamless:Ze,selected:Ze,shadowRootClonable:Ze,shadowRootDelegatesFocus:Ze,shadowRootMode:null,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:wn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:Ze,useMap:null,value:wn,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Gt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ze,declare:Ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:Ze,noHref:Ze,noShade:Ze,noWrap:Ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:wn,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ze,disableRemotePlayback:Ze,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:xx}),z6=us({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Sr,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:Gt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:Ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ls,g2:ls,glyphName:ls,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Sr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ge,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Gt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Sr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Sr,rev:Sr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Sr,requiredFeatures:Sr,requiredFonts:Sr,requiredFormats:Sr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Sr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sr,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Sr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Sx}),Ex=us({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),_x=us({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:xx}),wx=us({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),L6={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},$6=/[A-Z]/g,Cx=/-[a-z]/g,P6=/^data[-\w.:]+$/i;function U6(e,t){const n=_m(t);let r=t,a=sr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&P6.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(Cx,H6);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!Cx.test(s)){let u=s.replace($6,j6);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}a=Am}return new a(r,t)}function j6(e){return"-"+e.toLowerCase()}function H6(e){return e.charAt(1).toUpperCase()}const V6=yx([bx,B6,Ex,_x,wx],"html"),km=yx([bx,z6,Ex,_x,wx],"svg");function F6(e){return e.join(" ").trim()}var cs={},Rm,Tx;function G6(){if(Tx)return Rm;Tx=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
|
|
157
|
+
`,h="/",g="*",y="",b="comment",v="declaration";function x(_,w){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];w=w||{};var O=1,T=1;function A(U){var P=U.match(t);P&&(O+=P.length);var D=U.lastIndexOf(d);T=~D?U.length-D:T+U.length}function M(){var U={line:O,column:T};return function(P){return P.position=new R(U),V(),P}}function R(U){this.start=U,this.end={line:O,column:T},this.source=w.source}R.prototype.content=_;function $(U){var P=new Error(w.source+":"+O+":"+T+": "+U);if(P.reason=U,P.filename=w.source,P.line=O,P.column=T,P.source=_,!w.silent)throw P}function H(U){var P=U.exec(_);if(P){var D=P[0];return A(D),_=_.slice(D.length),P}}function V(){H(n)}function K(U){var P;for(U=U||[];P=G();)P!==!1&&U.push(P);return U}function G(){var U=M();if(!(h!=_.charAt(0)||g!=_.charAt(1))){for(var P=2;y!=_.charAt(P)&&(g!=_.charAt(P)||h!=_.charAt(P+1));)++P;if(P+=2,y===_.charAt(P-1))return $("End of comment missing");var D=_.slice(2,P-2);return T+=2,A(D),_=_.slice(P),T+=2,U({type:b,comment:D})}}function C(){var U=M(),P=H(r);if(P){if(G(),!H(a))return $("property missing ':'");var D=H(s),Z=U({type:v,property:E(P[0].replace(e,y)),value:D?E(D[0].replace(e,y)):y});return H(u),Z}}function q(){var U=[];K(U);for(var P;P=C();)P!==!1&&(U.push(P),K(U));return U}return V(),q()}function E(_){return _?_.replace(f,y):y}return Rm=x,Rm}var Ax;function q6(){if(Ax)return cs;Ax=1;var e=cs&&cs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=n;const t=e(G6());function n(r,a){let s=null;if(!r||typeof r!="string")return s;const u=(0,t.default)(r),f=typeof a=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:g}=d;f?a(h,g,d):g&&(s=s||{},s[h]=g)}),s}return cs}var Fl={},kx;function Y6(){if(kx)return Fl;kx=1,Object.defineProperty(Fl,"__esModule",{value:!0}),Fl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,s=function(h){return!h||n.test(h)||e.test(h)},u=function(h,g){return g.toUpperCase()},f=function(h,g){return"".concat(g,"-")},d=function(h,g){return g===void 0&&(g={}),s(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(a,f):h=h.replace(r,f),h.replace(t,u))};return Fl.camelCase=d,Fl}var Gl,Rx;function X6(){if(Rx)return Gl;Rx=1;var e=Gl&&Gl.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(q6()),n=Y6();function r(a,s){var u={};return!a||typeof a!="string"||(0,t.default)(a,function(f,d){f&&d&&(u[(0,n.camelCase)(f,s)]=d)}),u}return r.default=r,Gl=r,Gl}var Z6=X6();const K6=Ku(Z6),Ox=Nx("end"),Om=Nx("start");function Nx(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function W6(e){const t=Om(e),n=Ox(e);if(t&&n)return{start:t,end:n}}function ql(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ix(e.position):"start"in e||"end"in e?Ix(e):"line"in e||"column"in e?Nm(e):""}function Nm(e){return Mx(e&&e.line)+":"+Mx(e&&e.column)}function Ix(e){return Nm(e&&e.start)+"-"+Nm(e&&e.end)}function Mx(e){return e&&typeof e=="number"?e:1}class Kn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",s={},u=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?a=t:!s.cause&&t&&(u=!0,a=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?s.ruleId=r:(s.source=r.slice(0,d),s.ruleId=r.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=f?f.line:void 0,this.name=ql(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=u&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Kn.prototype.file="",Kn.prototype.name="",Kn.prototype.reason="",Kn.prototype.message="",Kn.prototype.stack="",Kn.prototype.column=void 0,Kn.prototype.line=void 0,Kn.prototype.ancestors=void 0,Kn.prototype.cause=void 0,Kn.prototype.fatal=void 0,Kn.prototype.place=void 0,Kn.prototype.ruleId=void 0,Kn.prototype.source=void 0;const Im={}.hasOwnProperty,Q6=new Map,J6=/[A-Z]/g,eD=new Set(["table","tbody","thead","tfoot","tr"]),tD=new Set(["td","th"]),Dx="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function nD(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=cD(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=uD(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?km:V6,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=Bx(a,e,void 0);return s&&typeof s!="string"?s:a.create(e,a.Fragment,{children:s||void 0},void 0)}function Bx(e,t,n){if(t.type==="element")return rD(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return iD(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return aD(e,t,n);if(t.type==="mdxjsEsm")return oD(e,t);if(t.type==="root")return sD(e,t,n);if(t.type==="text")return lD(e,t)}function rD(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=km,e.schema=a),e.ancestors.push(t);const s=Lx(e,t.tagName,!1),u=fD(e,t);let f=Dm(e,t);return eD.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!M6(d):!0})),zx(e,u,s,t),Mm(u,f),e.ancestors.pop(),e.schema=r,e.create(t,s,u,n)}function iD(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Yl(e,t.position)}function oD(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Yl(e,t.position)}function aD(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=km,e.schema=a),e.ancestors.push(t);const s=t.name===null?e.Fragment:Lx(e,t.name,!0),u=dD(e,t),f=Dm(e,t);return zx(e,u,s,t),Mm(u,f),e.ancestors.pop(),e.schema=r,e.create(t,s,u,n)}function sD(e,t,n){const r={};return Mm(r,Dm(e,t)),e.create(t,e.Fragment,r,n)}function lD(e,t){return t.value}function zx(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Mm(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function uD(e,t,n){return r;function r(a,s,u,f){const h=Array.isArray(u.children)?n:t;return f?h(s,u,f):h(s,u)}}function cD(e,t){return n;function n(r,a,s,u){const f=Array.isArray(s.children),d=Om(r);return t(a,s,u,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function fD(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&Im.call(t.properties,a)){const s=hD(e,a,t.properties[a]);if(s){const[u,f]=s;e.tableCellAlignToStyle&&u==="align"&&typeof f=="string"&&tD.has(t.tagName)?r=f:n[u]=f}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function dD(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const u=s.expression;u.type;const f=u.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else Yl(e,t.position);else{const a=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const f=r.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else Yl(e,t.position);else s=r.value===null?!0:r.value;n[a]=s}return n}function Dm(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:Q6;for(;++r<t.children.length;){const s=t.children[r];let u;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const h=a.get(d)||0;u=d+"-"+h,a.set(d,h+1)}}const f=Bx(e,s,u);f!==void 0&&n.push(f)}return n}function hD(e,t,n){const r=U6(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?k6(n):F6(n)),r.property==="style"){let a=typeof n=="object"?n:pD(e,String(n));return e.stylePropertyNameCase==="css"&&(a=mD(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?L6[r.property]||r.property:r.attribute,n]}}function pD(e,t){try{return K6(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new Kn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Dx+"#cannot-parse-style-attribute",a}}function Lx(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let s=-1,u;for(;++s<a.length;){const f=mx(a[s])?{type:"Identifier",name:a[s]}:{type:"Literal",value:a[s]};u=u?{type:"MemberExpression",object:u,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}r=u}else r=mx(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return Im.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);Yl(e)}function Yl(e,t){const n=new Kn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Dx+"#cannot-handle-mdx-estrees-without-createevaluater",n}function mD(e){const t={};let n;for(n in e)Im.call(e,n)&&(t[gD(n)]=e[n]);return t}function gD(e){let t=e.replace(J6,yD);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function yD(e){return"-"+e.toLowerCase()}const Bm={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},vD={};function bD(e,t){const n=vD,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return $x(e,r,a)}function $x(e,t,n){if(SD(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Px(e.children,t,n)}return Array.isArray(e)?Px(e,t,n):""}function Px(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=$x(e[a],t,n);return r.join("")}function SD(e){return!!(e&&typeof e=="object")}const Ux=document.createElement("i");function zm(e){const t="&"+e+";";Ux.innerHTML=t;const n=Ux.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function wi(e,t,n,r){const a=e.length;let s=0,u;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);s<r.length;)u=r.slice(s,s+1e4),u.unshift(t,0),e.splice(...u),s+=1e4,t+=1e4}function Lr(e,t){return e.length>0?(wi(e,e.length,0,t),e):t}const jx={}.hasOwnProperty;function xD(e){const t={};let n=-1;for(;++n<e.length;)ED(t,e[n]);return t}function ED(e,t){let n;for(n in t){const a=(jx.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let u;if(s)for(u in s){jx.call(a,u)||(a[u]=[]);const f=s[u];_D(a[u],Array.isArray(f)?f:f?[f]:[])}}}function _D(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);wi(e,0,0,r)}function Hx(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function fs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ci=bo(/[A-Za-z]/),xr=bo(/[\dA-Za-z]/),wD=bo(/[#-'*+\--9=?A-Z^-~]/);function Lm(e){return e!==null&&(e<32||e===127)}const $m=bo(/\d/),CD=bo(/[\dA-Fa-f]/),TD=bo(/[!-/:-@[-`{-~]/);function Ve(e){return e!==null&&e<-2}function lr(e){return e!==null&&(e<0||e===32)}function bt(e){return e===-2||e===-1||e===32}const AD=bo(new RegExp("\\p{P}|\\p{S}","u")),kD=bo(/\s/);function bo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ds(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const s=e.charCodeAt(n);let u="";if(s===37&&xr(e.charCodeAt(n+1))&&xr(e.charCodeAt(n+2)))a=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(u=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(n+1);s<56320&&f>56319&&f<57344?(u=String.fromCharCode(s,f),a=1):u="�"}else u=String.fromCharCode(s);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+a+1,u=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function qt(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let s=0;return u;function u(d){return bt(d)?(e.enter(n),f(d)):t(d)}function f(d){return bt(d)&&s++<a?(e.consume(d),f):(e.exit(n),t(d))}}const RD={tokenize:OD};function OD(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),qt(e,t,"linePrefix")}function a(f){return e.enter("paragraph"),s(f)}function s(f){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(f)}function u(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ve(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),u)}}const ND={tokenize:ID},Vx={tokenize:MD};function ID(e){const t=this,n=[];let r=0,a,s,u;return f;function f(T){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,d,h)(T)}return h(T)}function d(T){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&O();const A=t.events.length;let M=A,R;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){R=t.events[M][1].end;break}w(r);let $=A;for(;$<t.events.length;)t.events[$][1].end={...R},$++;return wi(t.events,M+1,0,t.events.slice(A)),t.events.length=$,h(T)}return f(T)}function h(T){if(r===n.length){if(!a)return b(T);if(a.currentConstruct&&a.currentConstruct.concrete)return x(T);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Vx,g,y)(T)}function g(T){return a&&O(),w(r),b(T)}function y(T){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,x(T)}function b(T){return t.containerState={},e.attempt(Vx,v,x)(T)}function v(T){return r++,n.push([t.currentConstruct,t.containerState]),b(T)}function x(T){if(T===null){a&&O(),w(0),e.consume(T);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:s}),E(T)}function E(T){if(T===null){_(e.exit("chunkFlow"),!0),w(0),e.consume(T);return}return Ve(T)?(e.consume(T),_(e.exit("chunkFlow")),r=0,t.interrupt=void 0,f):(e.consume(T),E)}function _(T,A){const M=t.sliceStream(T);if(A&&M.push(null),T.previous=s,s&&(s.next=T),s=T,a.defineSkip(T.start),a.write(M),t.parser.lazy[T.start.line]){let R=a.events.length;for(;R--;)if(a.events[R][1].start.offset<u&&(!a.events[R][1].end||a.events[R][1].end.offset>u))return;const $=t.events.length;let H=$,V,K;for(;H--;)if(t.events[H][0]==="exit"&&t.events[H][1].type==="chunkFlow"){if(V){K=t.events[H][1].end;break}V=!0}for(w(r),R=$;R<t.events.length;)t.events[R][1].end={...K},R++;wi(t.events,H+1,0,t.events.slice($)),t.events.length=R}}function w(T){let A=n.length;for(;A-- >T;){const M=n[A];t.containerState=M[1],M[0].exit.call(t,e)}n.length=T}function O(){a.write([null]),s=void 0,a=void 0,t.containerState._closeFlow=void 0}}function MD(e,t,n){return qt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Fx(e){if(e===null||lr(e)||kD(e))return 1;if(AD(e))return 2}function Pm(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const s=e[a].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const Um={name:"attention",resolveAll:DD,tokenize:BD};function DD(e,t){let n=-1,r,a,s,u,f,d,h,g;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const y={...e[r][1].end},b={...e[n][1].start};Gx(y,-d),Gx(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:y,end:{...e[r][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},s={type:d>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:d>1?"strong":"emphasis",start:{...u.start},end:{...f.end}},e[r][1].end={...u.start},e[n][1].start={...f.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=Lr(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=Lr(h,[["enter",a,t],["enter",u,t],["exit",u,t],["enter",s,t]]),h=Lr(h,Pm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=Lr(h,[["exit",s,t],["enter",f,t],["exit",f,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(g=2,h=Lr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):g=0,wi(e,r-1,n-r+3,h),n=r+h.length-g-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function BD(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=Fx(r);let s;return u;function u(d){return s=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===s)return e.consume(d),f;const h=e.exit("attentionSequence"),g=Fx(d),y=!g||g===2&&a||n.includes(d),b=!a||a===2&&g||n.includes(r);return h._open=!!(s===42?y:y&&(a||!b)),h._close=!!(s===42?b:b&&(g||!y)),t(d)}}function Gx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const zD={name:"autolink",tokenize:LD};function LD(e,t,n){let r=0;return a;function a(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(v){return Ci(v)?(e.consume(v),u):v===64?n(v):h(v)}function u(v){return v===43||v===45||v===46||xr(v)?(r=1,f(v)):h(v)}function f(v){return v===58?(e.consume(v),r=0,d):(v===43||v===45||v===46||xr(v))&&r++<32?(e.consume(v),f):(r=0,h(v))}function d(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Lm(v)?n(v):(e.consume(v),d)}function h(v){return v===64?(e.consume(v),g):wD(v)?(e.consume(v),h):n(v)}function g(v){return xr(v)?y(v):n(v)}function y(v){return v===46?(e.consume(v),r=0,g):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):b(v)}function b(v){if((v===45||xr(v))&&r++<63){const x=v===45?b:y;return e.consume(v),x}return n(v)}}const $f={partial:!0,tokenize:$D};function $D(e,t,n){return r;function r(s){return bt(s)?qt(e,a,"linePrefix")(s):a(s)}function a(s){return s===null||Ve(s)?t(s):n(s)}}const qx={continuation:{tokenize:UD},exit:jD,name:"blockQuote",tokenize:PD};function PD(e,t,n){const r=this;return a;function a(u){if(u===62){const f=r.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),s}return n(u)}function s(u){return bt(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function UD(e,t,n){const r=this;return a;function a(u){return bt(u)?qt(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):s(u)}function s(u){return e.attempt(qx,t,n)(u)}}function jD(e){e.exit("blockQuote")}const Yx={name:"characterEscape",tokenize:HD};function HD(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),a}function a(s){return TD(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Xx={name:"characterReference",tokenize:VD};function VD(e,t,n){const r=this;let a=0,s,u;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),d}function d(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,u=xr,g(y))}function h(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,u=CD,g):(e.enter("characterReferenceValue"),s=7,u=$m,g(y))}function g(y){if(y===59&&a){const b=e.exit("characterReferenceValue");return u===xr&&!zm(r.sliceSerialize(b))?n(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(y)&&a++<s?(e.consume(y),g):n(y)}}const Zx={partial:!0,tokenize:GD},Kx={concrete:!0,name:"codeFenced",tokenize:FD};function FD(e,t,n){const r=this,a={partial:!0,tokenize:M};let s=0,u=0,f;return d;function d(R){return h(R)}function h(R){const $=r.events[r.events.length-1];return s=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,f=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(R)}function g(R){return R===f?(u++,e.consume(R),g):u<3?n(R):(e.exit("codeFencedFenceSequence"),bt(R)?qt(e,y,"whitespace")(R):y(R))}function y(R){return R===null||Ve(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(Zx,E,A)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(R))}function b(R){return R===null||Ve(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(R)):bt(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),qt(e,v,"whitespace")(R)):R===96&&R===f?n(R):(e.consume(R),b)}function v(R){return R===null||Ve(R)?y(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(R))}function x(R){return R===null||Ve(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(R)):R===96&&R===f?n(R):(e.consume(R),x)}function E(R){return e.attempt(a,A,_)(R)}function _(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),w}function w(R){return s>0&&bt(R)?qt(e,O,"linePrefix",s+1)(R):O(R)}function O(R){return R===null||Ve(R)?e.check(Zx,E,A)(R):(e.enter("codeFlowValue"),T(R))}function T(R){return R===null||Ve(R)?(e.exit("codeFlowValue"),O(R)):(e.consume(R),T)}function A(R){return e.exit("codeFenced"),t(R)}function M(R,$,H){let V=0;return K;function K(P){return R.enter("lineEnding"),R.consume(P),R.exit("lineEnding"),G}function G(P){return R.enter("codeFencedFence"),bt(P)?qt(R,C,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):C(P)}function C(P){return P===f?(R.enter("codeFencedFenceSequence"),q(P)):H(P)}function q(P){return P===f?(V++,R.consume(P),q):V>=u?(R.exit("codeFencedFenceSequence"),bt(P)?qt(R,U,"whitespace")(P):U(P)):H(P)}function U(P){return P===null||Ve(P)?(R.exit("codeFencedFence"),$(P)):H(P)}}}function GD(e,t,n){const r=this;return a;function a(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s)}function s(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const jm={name:"codeIndented",tokenize:YD},qD={partial:!0,tokenize:XD};function YD(e,t,n){const r=this;return a;function a(h){return e.enter("codeIndented"),qt(e,s,"linePrefix",5)(h)}function s(h){const g=r.events[r.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?d(h):Ve(h)?e.attempt(qD,u,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Ve(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),t(h)}}function XD(e,t,n){const r=this;return a;function a(u){return r.parser.lazy[r.now().line]?n(u):Ve(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):qt(e,s,"linePrefix",5)(u)}function s(u){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):Ve(u)?a(u):n(u)}}const ZD={name:"codeText",previous:WD,resolve:KD,tokenize:QD};function KD(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function WD(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function QD(e,t,n){let r=0,a,s;return u;function u(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),r++,f):(e.exit("codeTextSequence"),d(y))}function d(y){return y===null?n(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),d):y===96?(s=e.enter("codeTextSequence"),a=0,g(y)):Ve(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||Ve(y)?(e.exit("codeTextData"),d(y)):(e.consume(y),h)}function g(y){return y===96?(e.consume(y),a++,g):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(y)):(s.type="codeTextData",h(y))}}class JD{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&Xl(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Xl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Xl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Xl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Xl(this.left,n.reverse())}}}function Xl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Wx(e){const t={};let n=-1,r,a,s,u,f,d,h;const g=new JD(e);for(;++n<g.length;){for(;n in t;)n=t[n];if(r=g.get(n),n&&r[1].type==="chunkFlow"&&g.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,eB(g,n)),n=t[n],h=!0);else if(r[1]._container){for(s=n,a=void 0;s--;)if(u=g.get(s),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(a&&(g.get(a)[1].type="lineEndingBlank"),u[1].type="lineEnding",a=s);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;a&&(r[1].end={...g.get(a)[1].start},f=g.slice(a,n),f.unshift(r),g.splice(a,n-a+1,f))}}return wi(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function eB(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const s=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const f=u.events,d=[],h={};let g,y,b=-1,v=n,x=0,E=0;const _=[E];for(;v;){for(;e.get(++a)[1]!==v;);s.push(a),v._tokenizer||(g=r.sliceStream(v),v.next||g.push(null),y&&u.defineSkip(v.start),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(g),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),y=v,v=v.next}for(v=n;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(E=b+1,_.push(E),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(u.events=[],v?(v._tokenizer=void 0,v.previous=void 0):_.pop(),b=_.length;b--;){const w=f.slice(_[b],_[b+1]),O=s.pop();d.push([O,O+w.length-1]),e.splice(O,2,w)}for(d.reverse(),b=-1;++b<d.length;)h[x+d[b][0]]=x+d[b][1],x+=d[b][1]-d[b][0]-1;return h}const tB={resolve:rB,tokenize:iB},nB={partial:!0,tokenize:oB};function rB(e){return Wx(e),e}function iB(e,t){let n;return r;function r(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(f)}function a(f){return f===null?s(f):Ve(f)?e.check(nB,u,s)(f):(e.consume(f),a)}function s(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function u(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function oB(e,t,n){const r=this;return a;function a(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),qt(e,s,"linePrefix")}function s(u){if(u===null||Ve(u))return n(u);const f=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function Qx(e,t,n,r,a,s,u,f,d){const h=d||Number.POSITIVE_INFINITY;let g=0;return y;function y(w){return w===60?(e.enter(r),e.enter(a),e.enter(s),e.consume(w),e.exit(s),b):w===null||w===32||w===41||Lm(w)?n(w):(e.enter(r),e.enter(u),e.enter(f),e.enter("chunkString",{contentType:"string"}),E(w))}function b(w){return w===62?(e.enter(s),e.consume(w),e.exit(s),e.exit(a),e.exit(r),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(w))}function v(w){return w===62?(e.exit("chunkString"),e.exit(f),b(w)):w===null||w===60||Ve(w)?n(w):(e.consume(w),w===92?x:v)}function x(w){return w===60||w===62||w===92?(e.consume(w),v):v(w)}function E(w){return!g&&(w===null||w===41||lr(w))?(e.exit("chunkString"),e.exit(f),e.exit(u),e.exit(r),t(w)):g<h&&w===40?(e.consume(w),g++,E):w===41?(e.consume(w),g--,E):w===null||w===32||w===40||Lm(w)?n(w):(e.consume(w),w===92?_:E)}function _(w){return w===40||w===41||w===92?(e.consume(w),E):E(w)}}function Jx(e,t,n,r,a,s){const u=this;let f=0,d;return h;function h(v){return e.enter(r),e.enter(a),e.consume(v),e.exit(a),e.enter(s),g}function g(v){return f>999||v===null||v===91||v===93&&!d||v===94&&!f&&"_hiddenFootnoteSupport"in u.parser.constructs?n(v):v===93?(e.exit(s),e.enter(a),e.consume(v),e.exit(a),e.exit(r),t):Ve(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||Ve(v)||f++>999?(e.exit("chunkString"),g(v)):(e.consume(v),d||(d=!bt(v)),v===92?b:y)}function b(v){return v===91||v===92||v===93?(e.consume(v),f++,y):y(v)}}function eE(e,t,n,r,a,s){let u;return f;function f(b){return b===34||b===39||b===40?(e.enter(r),e.enter(a),e.consume(b),e.exit(a),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(a),e.consume(b),e.exit(a),e.exit(r),t):(e.enter(s),h(b))}function h(b){return b===u?(e.exit(s),d(u)):b===null?n(b):Ve(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),qt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===u||b===null||Ve(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?y:g)}function y(b){return b===u||b===92?(e.consume(b),g):g(b)}}function Zl(e,t){let n;return r;function r(a){return Ve(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):bt(a)?qt(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const aB={name:"definition",tokenize:lB},sB={partial:!0,tokenize:uB};function lB(e,t,n){const r=this;let a;return s;function s(v){return e.enter("definition"),u(v)}function u(v){return Jx.call(r,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return a=fs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):n(v)}function d(v){return lr(v)?Zl(e,h)(v):h(v)}function h(v){return Qx(e,g,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return e.attempt(sB,y,y)(v)}function y(v){return bt(v)?qt(e,b,"whitespace")(v):b(v)}function b(v){return v===null||Ve(v)?(e.exit("definition"),r.parser.defined.push(a),t(v)):n(v)}}function uB(e,t,n){return r;function r(f){return lr(f)?Zl(e,a)(f):n(f)}function a(f){return eE(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return bt(f)?qt(e,u,"whitespace")(f):u(f)}function u(f){return f===null||Ve(f)?t(f):n(f)}}const cB={name:"hardBreakEscape",tokenize:fB};function fB(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),a}function a(s){return Ve(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const dB={name:"headingAtx",resolve:hB,tokenize:pB};function hB(e,t){let n=e.length-2,r=3,a,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},wi(e,r,n-r+1,[["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t]])),e}function pB(e,t,n){let r=0;return a;function a(g){return e.enter("atxHeading"),s(g)}function s(g){return e.enter("atxHeadingSequence"),u(g)}function u(g){return g===35&&r++<6?(e.consume(g),u):g===null||lr(g)?(e.exit("atxHeadingSequence"),f(g)):n(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||Ve(g)?(e.exit("atxHeading"),t(g)):bt(g)?qt(e,f,"whitespace")(g):(e.enter("atxHeadingText"),h(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),f(g))}function h(g){return g===null||g===35||lr(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),h)}}const mB=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],tE=["pre","script","style","textarea"],gB={concrete:!0,name:"htmlFlow",resolveTo:bB,tokenize:SB},yB={partial:!0,tokenize:EB},vB={partial:!0,tokenize:xB};function bB(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function SB(e,t,n){const r=this;let a,s,u,f,d;return h;function h(I){return g(I)}function g(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),y}function y(I){return I===33?(e.consume(I),b):I===47?(e.consume(I),s=!0,E):I===63?(e.consume(I),a=3,r.interrupt?t:B):Ci(I)?(e.consume(I),u=String.fromCharCode(I),_):n(I)}function b(I){return I===45?(e.consume(I),a=2,v):I===91?(e.consume(I),a=5,f=0,x):Ci(I)?(e.consume(I),a=4,r.interrupt?t:B):n(I)}function v(I){return I===45?(e.consume(I),r.interrupt?t:B):n(I)}function x(I){const pe="CDATA[";return I===pe.charCodeAt(f++)?(e.consume(I),f===pe.length?r.interrupt?t:C:x):n(I)}function E(I){return Ci(I)?(e.consume(I),u=String.fromCharCode(I),_):n(I)}function _(I){if(I===null||I===47||I===62||lr(I)){const pe=I===47,ve=u.toLowerCase();return!pe&&!s&&tE.includes(ve)?(a=1,r.interrupt?t(I):C(I)):mB.includes(u.toLowerCase())?(a=6,pe?(e.consume(I),w):r.interrupt?t(I):C(I)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):s?O(I):T(I))}return I===45||xr(I)?(e.consume(I),u+=String.fromCharCode(I),_):n(I)}function w(I){return I===62?(e.consume(I),r.interrupt?t:C):n(I)}function O(I){return bt(I)?(e.consume(I),O):K(I)}function T(I){return I===47?(e.consume(I),K):I===58||I===95||Ci(I)?(e.consume(I),A):bt(I)?(e.consume(I),T):K(I)}function A(I){return I===45||I===46||I===58||I===95||xr(I)?(e.consume(I),A):M(I)}function M(I){return I===61?(e.consume(I),R):bt(I)?(e.consume(I),M):T(I)}function R(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,$):bt(I)?(e.consume(I),R):H(I)}function $(I){return I===d?(e.consume(I),d=null,V):I===null||Ve(I)?n(I):(e.consume(I),$)}function H(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||lr(I)?M(I):(e.consume(I),H)}function V(I){return I===47||I===62||bt(I)?T(I):n(I)}function K(I){return I===62?(e.consume(I),G):n(I)}function G(I){return I===null||Ve(I)?C(I):bt(I)?(e.consume(I),G):n(I)}function C(I){return I===45&&a===2?(e.consume(I),D):I===60&&a===1?(e.consume(I),Z):I===62&&a===4?(e.consume(I),z):I===63&&a===3?(e.consume(I),B):I===93&&a===5?(e.consume(I),ue):Ve(I)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(yB,W,q)(I)):I===null||Ve(I)?(e.exit("htmlFlowData"),q(I)):(e.consume(I),C)}function q(I){return e.check(vB,U,W)(I)}function U(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),P}function P(I){return I===null||Ve(I)?q(I):(e.enter("htmlFlowData"),C(I))}function D(I){return I===45?(e.consume(I),B):C(I)}function Z(I){return I===47?(e.consume(I),u="",se):C(I)}function se(I){if(I===62){const pe=u.toLowerCase();return tE.includes(pe)?(e.consume(I),z):C(I)}return Ci(I)&&u.length<8?(e.consume(I),u+=String.fromCharCode(I),se):C(I)}function ue(I){return I===93?(e.consume(I),B):C(I)}function B(I){return I===62?(e.consume(I),z):I===45&&a===2?(e.consume(I),B):C(I)}function z(I){return I===null||Ve(I)?(e.exit("htmlFlowData"),W(I)):(e.consume(I),z)}function W(I){return e.exit("htmlFlow"),t(I)}}function xB(e,t,n){const r=this;return a;function a(u){return Ve(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):n(u)}function s(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function EB(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt($f,t,n)}}const _B={name:"htmlText",tokenize:wB};function wB(e,t,n){const r=this;let a,s,u;return f;function f(B){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(B),d}function d(B){return B===33?(e.consume(B),h):B===47?(e.consume(B),M):B===63?(e.consume(B),T):Ci(B)?(e.consume(B),H):n(B)}function h(B){return B===45?(e.consume(B),g):B===91?(e.consume(B),s=0,x):Ci(B)?(e.consume(B),O):n(B)}function g(B){return B===45?(e.consume(B),v):n(B)}function y(B){return B===null?n(B):B===45?(e.consume(B),b):Ve(B)?(u=y,Z(B)):(e.consume(B),y)}function b(B){return B===45?(e.consume(B),v):y(B)}function v(B){return B===62?D(B):B===45?b(B):y(B)}function x(B){const z="CDATA[";return B===z.charCodeAt(s++)?(e.consume(B),s===z.length?E:x):n(B)}function E(B){return B===null?n(B):B===93?(e.consume(B),_):Ve(B)?(u=E,Z(B)):(e.consume(B),E)}function _(B){return B===93?(e.consume(B),w):E(B)}function w(B){return B===62?D(B):B===93?(e.consume(B),w):E(B)}function O(B){return B===null||B===62?D(B):Ve(B)?(u=O,Z(B)):(e.consume(B),O)}function T(B){return B===null?n(B):B===63?(e.consume(B),A):Ve(B)?(u=T,Z(B)):(e.consume(B),T)}function A(B){return B===62?D(B):T(B)}function M(B){return Ci(B)?(e.consume(B),R):n(B)}function R(B){return B===45||xr(B)?(e.consume(B),R):$(B)}function $(B){return Ve(B)?(u=$,Z(B)):bt(B)?(e.consume(B),$):D(B)}function H(B){return B===45||xr(B)?(e.consume(B),H):B===47||B===62||lr(B)?V(B):n(B)}function V(B){return B===47?(e.consume(B),D):B===58||B===95||Ci(B)?(e.consume(B),K):Ve(B)?(u=V,Z(B)):bt(B)?(e.consume(B),V):D(B)}function K(B){return B===45||B===46||B===58||B===95||xr(B)?(e.consume(B),K):G(B)}function G(B){return B===61?(e.consume(B),C):Ve(B)?(u=G,Z(B)):bt(B)?(e.consume(B),G):V(B)}function C(B){return B===null||B===60||B===61||B===62||B===96?n(B):B===34||B===39?(e.consume(B),a=B,q):Ve(B)?(u=C,Z(B)):bt(B)?(e.consume(B),C):(e.consume(B),U)}function q(B){return B===a?(e.consume(B),a=void 0,P):B===null?n(B):Ve(B)?(u=q,Z(B)):(e.consume(B),q)}function U(B){return B===null||B===34||B===39||B===60||B===61||B===96?n(B):B===47||B===62||lr(B)?V(B):(e.consume(B),U)}function P(B){return B===47||B===62||lr(B)?V(B):n(B)}function D(B){return B===62?(e.consume(B),e.exit("htmlTextData"),e.exit("htmlText"),t):n(B)}function Z(B){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),se}function se(B){return bt(B)?qt(e,ue,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):ue(B)}function ue(B){return e.enter("htmlTextData"),u(B)}}const Hm={name:"labelEnd",resolveAll:kB,resolveTo:RB,tokenize:OB},CB={tokenize:NB},TB={tokenize:IB},AB={tokenize:MB};function kB(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&wi(e,0,e.length,n),e}function RB(e,t){let n=e.length,r=0,a,s,u,f;for(;n--;)if(a=e[n][1],s){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(s=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(u=n);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[s][1].start},end:{...e[u][1].end}},g={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[u-2][1].start}};return f=[["enter",d,t],["enter",h,t]],f=Lr(f,e.slice(s+1,s+r+3)),f=Lr(f,[["enter",g,t]]),f=Lr(f,Pm(t.parser.constructs.insideSpan.null,e.slice(s+r+4,u-3),t)),f=Lr(f,[["exit",g,t],e[u-2],e[u-1],["exit",h,t]]),f=Lr(f,e.slice(u+1)),f=Lr(f,[["exit",d,t]]),wi(e,s,e.length,f),e}function OB(e,t,n){const r=this;let a=r.events.length,s,u;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){s=r.events[a][1];break}return f;function f(b){return s?s._inactive?y(b):(u=r.parser.defined.includes(fs(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(CB,g,u?g:y)(b):b===91?e.attempt(TB,g,u?h:y)(b):u?g(b):y(b)}function h(b){return e.attempt(AB,g,y)(b)}function g(b){return t(b)}function y(b){return s._balanced=!0,n(b)}}function NB(e,t,n){return r;function r(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),a}function a(y){return lr(y)?Zl(e,s)(y):s(y)}function s(y){return y===41?g(y):Qx(e,u,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function u(y){return lr(y)?Zl(e,d)(y):g(y)}function f(y){return n(y)}function d(y){return y===34||y===39||y===40?eE(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function h(y){return lr(y)?Zl(e,g)(y):g(y)}function g(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),t):n(y)}}function IB(e,t,n){const r=this;return a;function a(f){return Jx.call(r,e,s,u,"reference","referenceMarker","referenceString")(f)}function s(f){return r.parser.defined.includes(fs(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function u(f){return n(f)}}function MB(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),a}function a(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const DB={name:"labelStartImage",resolveAll:Hm.resolveAll,tokenize:BB};function BB(e,t,n){const r=this;return a;function a(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),u):n(f)}function u(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(f):t(f)}}const zB={name:"labelStartLink",resolveAll:Hm.resolveAll,tokenize:LB};function LB(e,t,n){const r=this;return a;function a(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),s}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const Vm={name:"lineEnding",tokenize:$B};function $B(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),qt(e,t,"linePrefix")}}const Pf={name:"thematicBreak",tokenize:PB};function PB(e,t,n){let r=0,a;return s;function s(h){return e.enter("thematicBreak"),u(h)}function u(h){return a=h,f(h)}function f(h){return h===a?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Ve(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===a?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),bt(h)?qt(e,f,"whitespace")(h):f(h))}}const ur={continuation:{tokenize:VB},exit:GB,name:"list",tokenize:HB},UB={partial:!0,tokenize:qB},jB={partial:!0,tokenize:FB};function HB(e,t,n){const r=this,a=r.events[r.events.length-1];let s=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,u=0;return f;function f(v){const x=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:$m(v)){if(r.containerState.type||(r.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(Pf,n,h)(v):h(v);if(!r.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return n(v)}function d(v){return $m(v)&&++u<10?(e.consume(v),d):(!r.interrupt||u<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):n(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,e.check($f,r.interrupt?n:g,e.attempt(UB,b,y))}function g(v){return r.containerState.initialBlankLine=!0,s++,b(v)}function y(v){return bt(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),b):n(v)}function b(v){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function VB(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check($f,a,s);function a(f){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,qt(e,t,"listItemIndent",r.containerState.size+1)(f)}function s(f){return r.containerState.furtherBlankLines||!bt(f)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(f)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(jB,t,u)(f))}function u(f){return r.containerState._closeFlow=!0,r.interrupt=void 0,qt(e,e.attempt(ur,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function FB(e,t,n){const r=this;return qt(e,a,"listItemIndent",r.containerState.size+1);function a(s){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(s):n(s)}}function GB(e){e.exit(this.containerState.type)}function qB(e,t,n){const r=this;return qt(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(s){const u=r.events[r.events.length-1];return!bt(s)&&u&&u[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const nE={name:"setextUnderline",resolveTo:YB,tokenize:XB};function YB(e,t){let n=e.length,r,a,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const u={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",s?(e.splice(a,0,["enter",u,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=u,e.push(["exit",u,t]),e}function XB(e,t,n){const r=this;let a;return s;function s(h){let g=r.events.length,y;for(;g--;)if(r.events[g][1].type!=="lineEnding"&&r.events[g][1].type!=="linePrefix"&&r.events[g][1].type!=="content"){y=r.events[g][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||y)?(e.enter("setextHeadingLine"),a=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===a?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),bt(h)?qt(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Ve(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const ZB={tokenize:KB};function KB(e){const t=this,n=e.attempt($f,r,e.attempt(this.parser.constructs.flowInitial,a,qt(e,e.attempt(this.parser.constructs.flow,a,e.attempt(tB,a)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const WB={resolveAll:iE()},QB=rE("string"),JB=rE("text");function rE(e){return{resolveAll:iE(e==="text"?ez:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],s=n.attempt(a,u,f);return u;function u(g){return h(g)?s(g):f(g)}function f(g){if(g===null){n.consume(g);return}return n.enter("data"),n.consume(g),d}function d(g){return h(g)?(n.exit("data"),s(g)):(n.consume(g),d)}function h(g){if(g===null)return!0;const y=a[g];let b=-1;if(y)for(;++b<y.length;){const v=y[b];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function iE(e){return t;function t(n,r){let a=-1,s;for(;++a<=n.length;)s===void 0?n[a]&&n[a][1].type==="data"&&(s=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==s+2&&(n[s][1].end=n[a-1][1].end,n.splice(s+2,a-s-2),a=s+2),s=void 0);return e?e(n,r):n}}function ez(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let s=a.length,u=-1,f=0,d;for(;s--;){const h=a[s];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)f++,u--;if(u)break;u=-1}else if(h===-2)d=!0,f++;else if(h!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const h={type:n===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?u:r.start._bufferIndex+u,_index:r.start._index+s,line:r.end.line,column:r.end.column-f,offset:r.end.offset-f},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const tz=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:aB},disable:{null:[]},document:{42:ur,43:ur,45:ur,48:ur,49:ur,50:ur,51:ur,52:ur,53:ur,54:ur,55:ur,56:ur,57:ur,62:qx},flow:{35:dB,42:Pf,45:[nE,Pf],60:gB,61:nE,95:Pf,96:Kx,126:Kx},flowInitial:{[-2]:jm,[-1]:jm,32:jm},insideSpan:{null:[Um,WB]},string:{38:Xx,92:Yx},text:{[-5]:Vm,[-4]:Vm,[-3]:Vm,33:DB,38:Xx,42:Um,60:[zD,_B],91:zB,92:[cB,Yx],93:Hm,95:Um,96:ZD}},Symbol.toStringTag,{value:"Module"}));function nz(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},s=[];let u=[],f=[];const d={attempt:$(M),check:$(R),consume:O,enter:T,exit:A,interrupt:$(R,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:x,parser:e,previous:null,sliceSerialize:b,sliceStream:v,write:y};let g=t.tokenize.call(h,d);return t.resolveAll&&s.push(t),h;function y(G){return u=Lr(u,G),_(),u[u.length-1]!==null?[]:(H(t,0),h.events=Pm(s,h.events,h),h.events)}function b(G,C){return iz(v(G),C)}function v(G){return rz(u,G)}function x(){const{_bufferIndex:G,_index:C,line:q,column:U,offset:P}=r;return{_bufferIndex:G,_index:C,line:q,column:U,offset:P}}function E(G){a[G.line]=G.column,K()}function _(){let G;for(;r._index<u.length;){const C=u[r._index];if(typeof C=="string")for(G=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===G&&r._bufferIndex<C.length;)w(C.charCodeAt(r._bufferIndex));else w(C)}}function w(G){g=g(G)}function O(G){Ve(G)?(r.line++,r.column=1,r.offset+=G===-3?2:1,K()):G!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=G}function T(G,C){const q=C||{};return q.type=G,q.start=x(),h.events.push(["enter",q,h]),f.push(q),q}function A(G){const C=f.pop();return C.end=x(),h.events.push(["exit",C,h]),C}function M(G,C){H(G,C.from)}function R(G,C){C.restore()}function $(G,C){return q;function q(U,P,D){let Z,se,ue,B;return Array.isArray(U)?W(U):"tokenize"in U?W([U]):z(U);function z(he){return xe;function xe(Ke){const Ie=Ke!==null&&he[Ke],Me=Ke!==null&&he.null,Fe=[...Array.isArray(Ie)?Ie:Ie?[Ie]:[],...Array.isArray(Me)?Me:Me?[Me]:[]];return W(Fe)(Ke)}}function W(he){return Z=he,se=0,he.length===0?D:I(he[se])}function I(he){return xe;function xe(Ke){return B=V(),ue=he,he.partial||(h.currentConstruct=he),he.name&&h.parser.constructs.disable.null.includes(he.name)?ve():he.tokenize.call(C?Object.assign(Object.create(h),C):h,d,pe,ve)(Ke)}}function pe(he){return G(ue,B),P}function ve(he){return B.restore(),++se<Z.length?I(Z[se]):D}}}function H(G,C){G.resolveAll&&!s.includes(G)&&s.push(G),G.resolve&&wi(h.events,C,h.events.length-C,G.resolve(h.events.slice(C),h)),G.resolveTo&&(h.events=G.resolveTo(h.events,h))}function V(){const G=x(),C=h.previous,q=h.currentConstruct,U=h.events.length,P=Array.from(f);return{from:U,restore:D};function D(){r=G,h.previous=C,h.currentConstruct=q,h.events.length=U,f=P,K()}}function K(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function rz(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,s=t.end._bufferIndex;let u;if(n===a)u=[e[n].slice(r,s)];else{if(u=e.slice(n,a),r>-1){const f=u[0];typeof f=="string"?u[0]=f.slice(r):u.shift()}s>0&&u.push(e[a].slice(0,s))}return u}function iz(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const s=e[n];let u;if(typeof s=="string")u=s;else switch(s){case-5:{u="\r";break}case-4:{u=`
|
|
158
158
|
`;break}case-3:{u=`\r
|
|
159
|
-
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&a)continue;u=" ";break}default:u=String.fromCharCode(s)}a=s===-2,r.push(u)}return r.join("")}function oz(e){const r={constructs:xD([tz,...(e||{}).extensions||[]]),content:a(RD),defined:[],document:a(ND),flow:a(ZB),lazy:{},string:a(QB),text:a(JB)};return r;function a(s){return u;function u(f){return nz(r,s,f)}}}function az(e){for(;!Wx(e););return e}const oE=/[\0\t\n\r]/g;function sz(){let e=1,t="",n=!0,r;return a;function a(s,u,f){const d=[];let h,g,y,b,v;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(u||void 0).decode(s)),y=0,t="",n&&(s.charCodeAt(0)===65279&&y++,n=void 0);y<s.length;){if(oE.lastIndex=y,h=oE.exec(s),b=h&&h.index!==void 0?h.index:s.length,v=s.charCodeAt(b),!h){t=s.slice(y);break}if(v===10&&y===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),y<b&&(d.push(s.slice(y,b)),e+=b-y),v){case 0:{d.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,d.push(-2);e++<g;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}y=b+1}return f&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const lz=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uz(e){return e.replace(lz,cz)}function cz(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),s=a===120||a===88;return Hx(n.slice(s?2:1),s?16:10)}return zm(n)||e}const aE={}.hasOwnProperty;function fz(e,t,n){return typeof t!="string"&&(n=t,t=void 0),dz(n)(az(oz(n).document().write(sz()(e,t,!0))))}function dz(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Tt),autolinkProtocol:V,autolinkEmail:V,atxHeading:s(Je),blockQuote:s(Me),characterEscape:V,characterReference:V,codeFenced:s(Fe),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(Fe,u),codeText:s(ft,u),codeTextData:V,data:V,codeFlowValue:V,definition:s(Tn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s($e),hardBreakEscape:s(Jt),hardBreakTrailing:s(Jt),htmlFlow:s(on,u),htmlFlowData:V,htmlText:s(on,u),htmlTextData:V,image:s(Ht),label:u,link:s(Tt),listItem:s(It),listItemValue:b,listOrdered:s(an,y),listUnordered:s(an),paragraph:s(Re),reference:I,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:s(Je),strong:s(Cr),thematicBreak:s(oi)},exit:{atxHeading:d(),atxHeadingSequence:M,autolink:d(),autolinkEmail:Ie,autolinkProtocol:Ke,blockQuote:d(),characterEscapeValue:K,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:he,characterReference:xe,codeFenced:d(_),codeFencedFence:E,codeFencedFenceInfo:v,codeFencedFenceMeta:x,codeFlowValue:K,codeIndented:d(w),codeText:d(P),codeTextData:K,data:K,definition:d(),definitionDestinationString:A,definitionLabelString:O,definitionTitleString:T,emphasis:d(),hardBreakEscape:d(C),hardBreakTrailing:d(C),htmlFlow:d(q),htmlFlowData:K,htmlText:d(U),htmlTextData:K,image:d(Z),label:ue,labelText:se,lineEnding:G,link:d(D),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:pe,resourceDestinationString:B,resourceTitleString:z,resource:W,setextHeading:d(H),setextHeadingLineSequence:$,setextHeadingText:R,strong:d(),thematicBreak:d()}};sE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(te){let ce={type:"root",children:[]};const we={stack:[ce],tokenStack:[],config:t,enter:f,exit:h,buffer:u,resume:g,data:n},ze=[];let We=-1;for(;++We<te.length;)if(te[We][1].type==="listOrdered"||te[We][1].type==="listUnordered")if(te[We][0]==="enter")ze.push(We);else{const et=ze.pop();We=a(te,et,We)}for(We=-1;++We<te.length;){const et=t[te[We][0]];aE.call(et,te[We][1].type)&&et[te[We][1].type].call(Object.assign({sliceSerialize:te[We][2].sliceSerialize},we),te[We][1])}if(we.tokenStack.length>0){const et=we.tokenStack[we.tokenStack.length-1];(et[1]||lE).call(we,void 0,et[0])}for(ce.position={start:So(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:So(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},We=-1;++We<t.transforms.length;)ce=t.transforms[We](ce)||ce;return ce}function a(te,ce,we){let ze=ce-1,We=-1,et=!1,In,hn,sn,Qn;for(;++ze<=we;){const At=te[ze];switch(At[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{At[0]==="enter"?We++:We--,Qn=void 0;break}case"lineEndingBlank":{At[0]==="enter"&&(In&&!Qn&&!We&&!sn&&(sn=ze),Qn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qn=void 0}if(!We&&At[0]==="enter"&&At[1].type==="listItemPrefix"||We===-1&&At[0]==="exit"&&(At[1].type==="listUnordered"||At[1].type==="listOrdered")){if(In){let Te=ze;for(hn=void 0;Te--;){const rt=te[Te];if(rt[1].type==="lineEnding"||rt[1].type==="lineEndingBlank"){if(rt[0]==="exit")continue;hn&&(te[hn][1].type="lineEndingBlank",et=!0),rt[1].type="lineEnding",hn=Te}else if(!(rt[1].type==="linePrefix"||rt[1].type==="blockQuotePrefix"||rt[1].type==="blockQuotePrefixWhitespace"||rt[1].type==="blockQuoteMarker"||rt[1].type==="listItemIndent"))break}sn&&(!hn||sn<hn)&&(In._spread=!0),In.end=Object.assign({},hn?te[hn][1].start:At[1].end),te.splice(hn||ze,0,["exit",In,At[2]]),ze++,we++}if(At[1].type==="listItemPrefix"){const Te={type:"listItem",_spread:!1,start:Object.assign({},At[1].start),end:void 0};In=Te,te.splice(ze,0,["enter",Te,At[2]]),ze++,we++,sn=void 0,Qn=!0}}}return te[ce][1]._spread=et,we}function s(te,ce){return we;function we(ze){f.call(this,te(ze),ze),ce&&ce.call(this,ze)}}function u(){this.stack.push({type:"fragment",children:[]})}function f(te,ce,we){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([ce,we||void 0]),te.position={start:So(ce.start),end:void 0}}function d(te){return ce;function ce(we){te&&te.call(this,we),h.call(this,we)}}function h(te,ce){const we=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==te.type&&(ce?ce.call(this,te,ze[0]):(ze[1]||lE).call(this,te,ze[0]));else throw new Error("Cannot close `"+te.type+"` ("+ql({start:te.start,end:te.end})+"): it’s not open");we.position.end=So(te.end)}function g(){return bD(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function b(te){if(this.data.expectingFirstListItemValue){const ce=this.stack[this.stack.length-2];ce.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function v(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.lang=te}function x(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.meta=te}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.value=te.replace(/(\r?\n|\r)$/g,"")}function O(te){const ce=this.resume(),we=this.stack[this.stack.length-1];we.label=ce,we.identifier=cs(this.sliceSerialize(te)).toLowerCase()}function T(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.title=te}function A(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.url=te}function M(te){const ce=this.stack[this.stack.length-1];if(!ce.depth){const we=this.sliceSerialize(te).length;ce.depth=we}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function $(te){const ce=this.stack[this.stack.length-1];ce.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function V(te){const we=this.stack[this.stack.length-1].children;let ze=we[we.length-1];(!ze||ze.type!=="text")&&(ze=tt(),ze.position={start:So(te.start),end:void 0},we.push(ze)),this.stack.push(ze)}function K(te){const ce=this.stack.pop();ce.value+=this.sliceSerialize(te),ce.position.end=So(te.end)}function G(te){const ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=ce.children[ce.children.length-1];we.position.end=So(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ce.type)&&(V.call(this,te),K.call(this,te))}function C(){this.data.atHardBreak=!0}function q(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.value=te}function U(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.value=te}function P(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.value=te}function D(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=ce,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function Z(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=ce,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function se(te){const ce=this.sliceSerialize(te),we=this.stack[this.stack.length-2];we.label=uz(ce),we.identifier=cs(ce).toLowerCase()}function ue(){const te=this.stack[this.stack.length-1],ce=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const ze=te.children;we.children=ze}else we.alt=ce}function B(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.url=te}function z(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.title=te}function W(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function pe(te){const ce=this.resume(),we=this.stack[this.stack.length-1];we.label=ce,we.identifier=cs(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function ve(te){this.data.characterReferenceType=te.type}function he(te){const ce=this.sliceSerialize(te),we=this.data.characterReferenceType;let ze;we?(ze=Hx(ce,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=zm(ce);const We=this.stack[this.stack.length-1];We.value+=ze}function xe(te){const ce=this.stack.pop();ce.position.end=So(te.end)}function Ke(te){K.call(this,te);const ce=this.stack[this.stack.length-1];ce.url=this.sliceSerialize(te)}function Ie(te){K.call(this,te);const ce=this.stack[this.stack.length-1];ce.url="mailto:"+this.sliceSerialize(te)}function Me(){return{type:"blockquote",children:[]}}function Fe(){return{type:"code",lang:null,meta:null,value:""}}function ft(){return{type:"inlineCode",value:""}}function Tn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function $e(){return{type:"emphasis",children:[]}}function Je(){return{type:"heading",depth:0,children:[]}}function Jt(){return{type:"break"}}function on(){return{type:"html",value:""}}function Ht(){return{type:"image",title:null,url:"",alt:null}}function Tt(){return{type:"link",title:null,url:"",children:[]}}function an(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function It(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function Re(){return{type:"paragraph",children:[]}}function Cr(){return{type:"strong",children:[]}}function tt(){return{type:"text",value:""}}function oi(){return{type:"thematicBreak"}}}function So(e){return{line:e.line,column:e.column,offset:e.offset}}function sE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?sE(e,r):hz(e,r)}}function hz(e,t){let n;for(n in t)if(aE.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function lE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ql({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ql({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ql({start:t.start,end:t.end})+") is still open")}function pz(e){const t=this;t.parser=n;function n(r){return fz(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function mz(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function gz(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
159
|
+
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&a)continue;u=" ";break}default:u=String.fromCharCode(s)}a=s===-2,r.push(u)}return r.join("")}function oz(e){const r={constructs:xD([tz,...(e||{}).extensions||[]]),content:a(RD),defined:[],document:a(ND),flow:a(ZB),lazy:{},string:a(QB),text:a(JB)};return r;function a(s){return u;function u(f){return nz(r,s,f)}}}function az(e){for(;!Wx(e););return e}const oE=/[\0\t\n\r]/g;function sz(){let e=1,t="",n=!0,r;return a;function a(s,u,f){const d=[];let h,g,y,b,v;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(u||void 0).decode(s)),y=0,t="",n&&(s.charCodeAt(0)===65279&&y++,n=void 0);y<s.length;){if(oE.lastIndex=y,h=oE.exec(s),b=h&&h.index!==void 0?h.index:s.length,v=s.charCodeAt(b),!h){t=s.slice(y);break}if(v===10&&y===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),y<b&&(d.push(s.slice(y,b)),e+=b-y),v){case 0:{d.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,d.push(-2);e++<g;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}y=b+1}return f&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const lz=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uz(e){return e.replace(lz,cz)}function cz(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),s=a===120||a===88;return Hx(n.slice(s?2:1),s?16:10)}return zm(n)||e}const aE={}.hasOwnProperty;function fz(e,t,n){return typeof t!="string"&&(n=t,t=void 0),dz(n)(az(oz(n).document().write(sz()(e,t,!0))))}function dz(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Tt),autolinkProtocol:V,autolinkEmail:V,atxHeading:s(Je),blockQuote:s(Me),characterEscape:V,characterReference:V,codeFenced:s(Fe),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(Fe,u),codeText:s(ft,u),codeTextData:V,data:V,codeFlowValue:V,definition:s(Tn),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s($e),hardBreakEscape:s(Jt),hardBreakTrailing:s(Jt),htmlFlow:s(on,u),htmlFlowData:V,htmlText:s(on,u),htmlTextData:V,image:s(Ht),label:u,link:s(Tt),listItem:s(It),listItemValue:b,listOrdered:s(an,y),listUnordered:s(an),paragraph:s(Re),reference:I,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:s(Je),strong:s(Cr),thematicBreak:s(oi)},exit:{atxHeading:d(),atxHeadingSequence:M,autolink:d(),autolinkEmail:Ie,autolinkProtocol:Ke,blockQuote:d(),characterEscapeValue:K,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:he,characterReference:xe,codeFenced:d(_),codeFencedFence:E,codeFencedFenceInfo:v,codeFencedFenceMeta:x,codeFlowValue:K,codeIndented:d(w),codeText:d(P),codeTextData:K,data:K,definition:d(),definitionDestinationString:A,definitionLabelString:O,definitionTitleString:T,emphasis:d(),hardBreakEscape:d(C),hardBreakTrailing:d(C),htmlFlow:d(q),htmlFlowData:K,htmlText:d(U),htmlTextData:K,image:d(Z),label:ue,labelText:se,lineEnding:G,link:d(D),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:pe,resourceDestinationString:B,resourceTitleString:z,resource:W,setextHeading:d(H),setextHeadingLineSequence:$,setextHeadingText:R,strong:d(),thematicBreak:d()}};sE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(te){let ce={type:"root",children:[]};const we={stack:[ce],tokenStack:[],config:t,enter:f,exit:h,buffer:u,resume:g,data:n},ze=[];let We=-1;for(;++We<te.length;)if(te[We][1].type==="listOrdered"||te[We][1].type==="listUnordered")if(te[We][0]==="enter")ze.push(We);else{const et=ze.pop();We=a(te,et,We)}for(We=-1;++We<te.length;){const et=t[te[We][0]];aE.call(et,te[We][1].type)&&et[te[We][1].type].call(Object.assign({sliceSerialize:te[We][2].sliceSerialize},we),te[We][1])}if(we.tokenStack.length>0){const et=we.tokenStack[we.tokenStack.length-1];(et[1]||lE).call(we,void 0,et[0])}for(ce.position={start:So(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:So(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},We=-1;++We<t.transforms.length;)ce=t.transforms[We](ce)||ce;return ce}function a(te,ce,we){let ze=ce-1,We=-1,et=!1,In,hn,sn,Qn;for(;++ze<=we;){const At=te[ze];switch(At[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{At[0]==="enter"?We++:We--,Qn=void 0;break}case"lineEndingBlank":{At[0]==="enter"&&(In&&!Qn&&!We&&!sn&&(sn=ze),Qn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qn=void 0}if(!We&&At[0]==="enter"&&At[1].type==="listItemPrefix"||We===-1&&At[0]==="exit"&&(At[1].type==="listUnordered"||At[1].type==="listOrdered")){if(In){let Te=ze;for(hn=void 0;Te--;){const rt=te[Te];if(rt[1].type==="lineEnding"||rt[1].type==="lineEndingBlank"){if(rt[0]==="exit")continue;hn&&(te[hn][1].type="lineEndingBlank",et=!0),rt[1].type="lineEnding",hn=Te}else if(!(rt[1].type==="linePrefix"||rt[1].type==="blockQuotePrefix"||rt[1].type==="blockQuotePrefixWhitespace"||rt[1].type==="blockQuoteMarker"||rt[1].type==="listItemIndent"))break}sn&&(!hn||sn<hn)&&(In._spread=!0),In.end=Object.assign({},hn?te[hn][1].start:At[1].end),te.splice(hn||ze,0,["exit",In,At[2]]),ze++,we++}if(At[1].type==="listItemPrefix"){const Te={type:"listItem",_spread:!1,start:Object.assign({},At[1].start),end:void 0};In=Te,te.splice(ze,0,["enter",Te,At[2]]),ze++,we++,sn=void 0,Qn=!0}}}return te[ce][1]._spread=et,we}function s(te,ce){return we;function we(ze){f.call(this,te(ze),ze),ce&&ce.call(this,ze)}}function u(){this.stack.push({type:"fragment",children:[]})}function f(te,ce,we){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([ce,we||void 0]),te.position={start:So(ce.start),end:void 0}}function d(te){return ce;function ce(we){te&&te.call(this,we),h.call(this,we)}}function h(te,ce){const we=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==te.type&&(ce?ce.call(this,te,ze[0]):(ze[1]||lE).call(this,te,ze[0]));else throw new Error("Cannot close `"+te.type+"` ("+ql({start:te.start,end:te.end})+"): it’s not open");we.position.end=So(te.end)}function g(){return bD(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function b(te){if(this.data.expectingFirstListItemValue){const ce=this.stack[this.stack.length-2];ce.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function v(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.lang=te}function x(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.meta=te}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.value=te.replace(/(\r?\n|\r)$/g,"")}function O(te){const ce=this.resume(),we=this.stack[this.stack.length-1];we.label=ce,we.identifier=fs(this.sliceSerialize(te)).toLowerCase()}function T(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.title=te}function A(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.url=te}function M(te){const ce=this.stack[this.stack.length-1];if(!ce.depth){const we=this.sliceSerialize(te).length;ce.depth=we}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function $(te){const ce=this.stack[this.stack.length-1];ce.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function V(te){const we=this.stack[this.stack.length-1].children;let ze=we[we.length-1];(!ze||ze.type!=="text")&&(ze=tt(),ze.position={start:So(te.start),end:void 0},we.push(ze)),this.stack.push(ze)}function K(te){const ce=this.stack.pop();ce.value+=this.sliceSerialize(te),ce.position.end=So(te.end)}function G(te){const ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=ce.children[ce.children.length-1];we.position.end=So(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ce.type)&&(V.call(this,te),K.call(this,te))}function C(){this.data.atHardBreak=!0}function q(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.value=te}function U(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.value=te}function P(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.value=te}function D(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=ce,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function Z(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=ce,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function se(te){const ce=this.sliceSerialize(te),we=this.stack[this.stack.length-2];we.label=uz(ce),we.identifier=fs(ce).toLowerCase()}function ue(){const te=this.stack[this.stack.length-1],ce=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const ze=te.children;we.children=ze}else we.alt=ce}function B(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.url=te}function z(){const te=this.resume(),ce=this.stack[this.stack.length-1];ce.title=te}function W(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function pe(te){const ce=this.resume(),we=this.stack[this.stack.length-1];we.label=ce,we.identifier=fs(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function ve(te){this.data.characterReferenceType=te.type}function he(te){const ce=this.sliceSerialize(te),we=this.data.characterReferenceType;let ze;we?(ze=Hx(ce,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=zm(ce);const We=this.stack[this.stack.length-1];We.value+=ze}function xe(te){const ce=this.stack.pop();ce.position.end=So(te.end)}function Ke(te){K.call(this,te);const ce=this.stack[this.stack.length-1];ce.url=this.sliceSerialize(te)}function Ie(te){K.call(this,te);const ce=this.stack[this.stack.length-1];ce.url="mailto:"+this.sliceSerialize(te)}function Me(){return{type:"blockquote",children:[]}}function Fe(){return{type:"code",lang:null,meta:null,value:""}}function ft(){return{type:"inlineCode",value:""}}function Tn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function $e(){return{type:"emphasis",children:[]}}function Je(){return{type:"heading",depth:0,children:[]}}function Jt(){return{type:"break"}}function on(){return{type:"html",value:""}}function Ht(){return{type:"image",title:null,url:"",alt:null}}function Tt(){return{type:"link",title:null,url:"",children:[]}}function an(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function It(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function Re(){return{type:"paragraph",children:[]}}function Cr(){return{type:"strong",children:[]}}function tt(){return{type:"text",value:""}}function oi(){return{type:"thematicBreak"}}}function So(e){return{line:e.line,column:e.column,offset:e.offset}}function sE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?sE(e,r):hz(e,r)}}function hz(e,t){let n;for(n in t)if(aE.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function lE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ql({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ql({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ql({start:t.start,end:t.end})+") is still open")}function pz(e){const t=this;t.parser=n;function n(r){return fz(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function mz(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function gz(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
160
160
|
`}]}function yz(e,t){const n=t.value?t.value+`
|
|
161
|
-
`:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function vz(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bz(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sz(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=
|
|
161
|
+
`:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function vz(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bz(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Sz(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=ds(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let u,f=e.footnoteCounts.get(r);f===void 0?(f=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=s+1,f+=1,e.footnoteCounts.set(r,f);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function xz(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ez(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function uE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),s=a[0];s&&s.type==="text"?s.value="["+s.value:a.unshift({type:"text",value:"["});const u=a[a.length-1];return u&&u.type==="text"?u.value+=r:a.push({type:"text",value:r}),a}function _z(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uE(e,t);const a={src:ds(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const s={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,s),e.applyData(t,s)}function wz(e,t){const n={src:ds(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Cz(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Tz(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uE(e,t);const a={href:ds(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const s={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Az(e,t){const n={href:ds(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function kz(e,t,n){const r=e.all(t),a=n?Rz(n):cE(t),s={},u=[];if(typeof t.checked=="boolean"){const g=r[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},r.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<r.length;){const g=r[f];(a||f!==0||g.type!=="element"||g.tagName!=="p")&&u.push({type:"text",value:`
|
|
162
162
|
`}),g.type==="element"&&g.tagName==="p"&&!a?u.push(...g.children):u.push(g)}const d=r[r.length-1];d&&(a||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
|
|
163
|
-
`});const h={type:"element",tagName:"li",properties:s,children:u};return e.patch(t,h),e.applyData(t,h)}function Rz(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=cE(n[r])}return t}function cE(e){const t=e.spread;return t??e.children.length>1}function Oz(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const u=r[a];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function Nz(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Iz(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Mz(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Dz(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),a.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=Om(t.children[1]),d=Ox(t.children[t.children.length-1]);f&&d&&(u.position={start:f,end:d}),a.push(u)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)}function Bz(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,f=u?u.length:t.children.length;let d=-1;const h=[];for(;++d<f;){const y=t.children[d],b={},v=u?u[d]:void 0;v&&(b.align=v);let x={type:"element",tagName:s,properties:b,children:[]};y&&(x.children=e.all(y),e.patch(y,x),x=e.applyData(y,x)),h.push(x)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,g),e.applyData(t,g)}function zz(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const fE=9,dE=32;function Lz(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const s=[];for(;r;)s.push(hE(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return s.push(hE(t.slice(a),a>0,!1)),s.join("")}function hE(e,t,n){let r=0,a=e.length;if(t){let s=e.codePointAt(r);for(;s===fE||s===dE;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(a-1);for(;s===fE||s===dE;)a--,s=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function $z(e,t){const n={type:"text",value:Lz(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Pz(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Uz={blockquote:mz,break:gz,code:yz,delete:vz,emphasis:bz,footnoteReference:Sz,heading:xz,html:Ez,imageReference:_z,image:wz,inlineCode:Cz,linkReference:Tz,link:Az,listItem:kz,list:Oz,paragraph:Nz,root:Iz,strong:Mz,table:Dz,tableCell:zz,tableRow:Bz,text:$z,thematicBreak:Pz,toml:Uf,yaml:Uf,definition:Uf,footnoteDefinition:Uf};function Uf(){}const pE=-1,jf=0,Kl=1,Hf=2,Fm=3,Gm=4,qm=5,Ym=6,mE=7,gE=8,yE=typeof self=="object"?self:globalThis,jz=(e,t)=>{const n=(a,s)=>(e.set(s,a),a),r=a=>{if(e.has(a))return e.get(a);const[s,u]=t[a];switch(s){case jf:case pE:return n(u,a);case Kl:{const f=n([],a);for(const d of u)f.push(r(d));return f}case Hf:{const f=n({},a);for(const[d,h]of u)f[r(d)]=r(h);return f}case Fm:return n(new Date(u),a);case Gm:{const{source:f,flags:d}=u;return n(new RegExp(f,d),a)}case qm:{const f=n(new Map,a);for(const[d,h]of u)f.set(r(d),r(h));return f}case Ym:{const f=n(new Set,a);for(const d of u)f.add(r(d));return f}case mE:{const{name:f,message:d}=u;return n(new yE[f](d),a)}case gE:return n(BigInt(u),a);case"BigInt":return n(Object(BigInt(u)),a);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:f}=new Uint8Array(u);return n(new DataView(f),u)}}return n(new yE[s](u),a)};return r},vE=e=>jz(new Map,e)(0),
|
|
163
|
+
`});const h={type:"element",tagName:"li",properties:s,children:u};return e.patch(t,h),e.applyData(t,h)}function Rz(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=cE(n[r])}return t}function cE(e){const t=e.spread;return t??e.children.length>1}function Oz(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const u=r[a];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function Nz(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Iz(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Mz(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Dz(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),a.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=Om(t.children[1]),d=Ox(t.children[t.children.length-1]);f&&d&&(u.position={start:f,end:d}),a.push(u)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,s),e.applyData(t,s)}function Bz(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,f=u?u.length:t.children.length;let d=-1;const h=[];for(;++d<f;){const y=t.children[d],b={},v=u?u[d]:void 0;v&&(b.align=v);let x={type:"element",tagName:s,properties:b,children:[]};y&&(x.children=e.all(y),e.patch(y,x),x=e.applyData(y,x)),h.push(x)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,g),e.applyData(t,g)}function zz(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const fE=9,dE=32;function Lz(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const s=[];for(;r;)s.push(hE(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return s.push(hE(t.slice(a),a>0,!1)),s.join("")}function hE(e,t,n){let r=0,a=e.length;if(t){let s=e.codePointAt(r);for(;s===fE||s===dE;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(a-1);for(;s===fE||s===dE;)a--,s=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function $z(e,t){const n={type:"text",value:Lz(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Pz(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Uz={blockquote:mz,break:gz,code:yz,delete:vz,emphasis:bz,footnoteReference:Sz,heading:xz,html:Ez,imageReference:_z,image:wz,inlineCode:Cz,linkReference:Tz,link:Az,listItem:kz,list:Oz,paragraph:Nz,root:Iz,strong:Mz,table:Dz,tableCell:zz,tableRow:Bz,text:$z,thematicBreak:Pz,toml:Uf,yaml:Uf,definition:Uf,footnoteDefinition:Uf};function Uf(){}const pE=-1,jf=0,Kl=1,Hf=2,Fm=3,Gm=4,qm=5,Ym=6,mE=7,gE=8,yE=typeof self=="object"?self:globalThis,jz=(e,t)=>{const n=(a,s)=>(e.set(s,a),a),r=a=>{if(e.has(a))return e.get(a);const[s,u]=t[a];switch(s){case jf:case pE:return n(u,a);case Kl:{const f=n([],a);for(const d of u)f.push(r(d));return f}case Hf:{const f=n({},a);for(const[d,h]of u)f[r(d)]=r(h);return f}case Fm:return n(new Date(u),a);case Gm:{const{source:f,flags:d}=u;return n(new RegExp(f,d),a)}case qm:{const f=n(new Map,a);for(const[d,h]of u)f.set(r(d),r(h));return f}case Ym:{const f=n(new Set,a);for(const d of u)f.add(r(d));return f}case mE:{const{name:f,message:d}=u;return n(new yE[f](d),a)}case gE:return n(BigInt(u),a);case"BigInt":return n(Object(BigInt(u)),a);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:f}=new Uint8Array(u);return n(new DataView(f),u)}}return n(new yE[s](u),a)};return r},vE=e=>jz(new Map,e)(0),hs="",{toString:Hz}={},{keys:Vz}=Object,Wl=e=>{const t=typeof e;if(t!=="object"||!e)return[jf,t];const n=Hz.call(e).slice(8,-1);switch(n){case"Array":return[Kl,hs];case"Object":return[Hf,hs];case"Date":return[Fm,hs];case"RegExp":return[Gm,hs];case"Map":return[qm,hs];case"Set":return[Ym,hs];case"DataView":return[Kl,n]}return n.includes("Array")?[Kl,n]:n.includes("Error")?[mE,n]:[Hf,n]},Vf=([e,t])=>e===jf&&(t==="function"||t==="symbol"),Fz=(e,t,n,r)=>{const a=(u,f)=>{const d=r.push(u)-1;return n.set(f,d),d},s=u=>{if(n.has(u))return n.get(u);let[f,d]=Wl(u);switch(f){case jf:{let g=u;switch(d){case"bigint":f=gE,g=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return a([pE],u)}return a([f,g],u)}case Kl:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),a([d,[...b]],u)}const g=[],y=a([f,g],u);for(const b of u)g.push(s(b));return y}case Hf:{if(d)switch(d){case"BigInt":return a([d,u.toString()],u);case"Boolean":case"Number":case"String":return a([d,u.valueOf()],u)}if(t&&"toJSON"in u)return s(u.toJSON());const g=[],y=a([f,g],u);for(const b of Vz(u))(e||!Vf(Wl(u[b])))&&g.push([s(b),s(u[b])]);return y}case Fm:return a([f,u.toISOString()],u);case Gm:{const{source:g,flags:y}=u;return a([f,{source:g,flags:y}],u)}case qm:{const g=[],y=a([f,g],u);for(const[b,v]of u)(e||!(Vf(Wl(b))||Vf(Wl(v))))&&g.push([s(b),s(v)]);return y}case Ym:{const g=[],y=a([f,g],u);for(const b of u)(e||!Vf(Wl(b)))&&g.push(s(b));return y}}const{message:h}=u;return a([f,{name:d,message:h}],u)};return s},bE=(e,{json:t,lossy:n}={})=>{const r=[];return Fz(!(t||n),!!t,new Map,r)(e),r},Ff=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?vE(bE(e,t)):structuredClone(e):(e,t)=>vE(bE(e,t));function Gz(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function qz(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Yz(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Gz,r=e.options.footnoteBackLabel||qz,a=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const g=e.all(h),y=String(h.identifier).toUpperCase(),b=ds(y.toLowerCase());let v=0;const x=[],E=e.footnoteCounts.get(y);for(;E!==void 0&&++v<=E;){x.length>0&&x.push({type:"text",value:" "});let O=typeof n=="string"?n:n(d,v);typeof O=="string"&&(O={type:"text",value:O}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,v),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const _=g[g.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const O=_.children[_.children.length-1];O&&O.type==="text"?O.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...x)}else g.push(...x);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(g,!0)};e.patch(h,w),f.push(w)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Ff(u),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
164
164
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
165
165
|
`}]}}const SE=(function(e){if(e==null)return Wz;if(typeof e=="function")return Gf(e);if(typeof e=="object")return Array.isArray(e)?Xz(e):Zz(e);if(typeof e=="string")return Kz(e);throw new Error("Expected function, string, or object as test")});function Xz(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=SE(e[n]);return Gf(r);function r(...a){let s=-1;for(;++s<t.length;)if(t[s].apply(this,a))return!0;return!1}}function Zz(e){const t=e;return Gf(n);function n(r){const a=r;let s;for(s in e)if(a[s]!==t[s])return!1;return!0}}function Kz(e){return Gf(t);function t(n){return n&&n.type===e}}function Gf(e){return t;function t(n,r,a){return!!(Qz(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function Wz(){return!0}function Qz(e){return e!==null&&typeof e=="object"&&"type"in e}function gj(e){return e}const xE=[],Jz=!0,EE=!1,eL="skip";function tL(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const s=SE(a),u=r?-1:1;f(e,void 0,[])();function f(d,h,g){const y=d&&typeof d=="object"?d:{};if(typeof y.type=="string"){const v=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(v?"<"+v+">":""))+")"})}return b;function b(){let v=xE,x,E,_;if((!t||s(d,h,g[g.length-1]||void 0))&&(v=nL(n(d,g)),v[0]===EE))return v;if("children"in d&&d.children){const w=d;if(w.children&&v[0]!==eL)for(E=(r?w.children.length:-1)+u,_=g.concat(w);E>-1&&E<w.children.length;){const O=w.children[E];if(x=f(O,E,_)(),x[0]===EE)return x;E=typeof x[1]=="number"?x[1]:E+u}}return v}}}function nL(e){return Array.isArray(e)?e:typeof e=="number"?[Jz,e]:e==null?xE:[e]}function _E(e,t,n,r){let a,s,u;typeof t=="function"&&typeof n!="function"?(s=void 0,u=t,a=n):(s=t,u=n,a=r),tL(e,s,f,a);function f(d,h){const g=h[h.length-1],y=g?g.children.indexOf(d):void 0;return u(d,y,g)}}const Xm={}.hasOwnProperty,rL={};function iL(e,t){const n=t||rL,r=new Map,a=new Map,s=new Map,u={...Uz,...n.handlers},f={all:h,applyData:aL,definitionById:r,footnoteById:a,footnoteCounts:s,footnoteOrder:[],handlers:u,one:d,options:n,patch:oL,wrap:lL};return _E(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?r:a,b=String(g.identifier).toUpperCase();y.has(b)||y.set(b,g)}}),f;function d(g,y){const b=g.type,v=f.handlers[b];if(Xm.call(f.handlers,b)&&v)return v(f,g,y);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in g){const{children:E,..._}=g,w=Ff(_);return w.children=f.all(g),w}return Ff(g)}return(f.options.unknownHandler||sL)(f,g,y)}function h(g){const y=[];if("children"in g){const b=g.children;let v=-1;for(;++v<b.length;){const x=f.one(b[v],g);if(x){if(v&&b[v-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=wE(x.value)),!Array.isArray(x)&&x.type==="element")){const E=x.children[0];E&&E.type==="text"&&(E.value=wE(E.value))}Array.isArray(x)?y.push(...x):y.push(x)}}}return y}}function oL(e,t){e.position&&(t.position=W6(e))}function aL(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const u="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:u}}n.type==="element"&&s&&Object.assign(n.properties,Ff(s)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function sL(e,t){const n=t.data||{},r="value"in t&&!(Xm.call(n,"hProperties")||Xm.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function lL(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
166
166
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
167
167
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
168
168
|
`}),n}function wE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function CE(e,t){const n=iL(e,t),r=n.one(e,void 0),a=Yz(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&s.children.push({type:"text",value:`
|
|
169
|
-
`},a),s}function uL(e,t){return e&&"run"in e?async function(n,r){const a=CE(n,{file:r,...t});await e.run(a,r)}:function(n,r){return CE(n,{file:r,...e||t})}}function TE(e){if(e)throw e}var Zm,AE;function cL(){if(AE)return Zm;AE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},s=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var g=e.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!y)return!1;var b;for(b in h);return typeof b>"u"||e.call(h,b)},u=function(h,g){n&&g.name==="__proto__"?n(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},f=function(h,g){if(g==="__proto__")if(e.call(h,g)){if(r)return r(h,g).value}else return;return h[g]};return Zm=function d(){var h,g,y,b,v,x,E=arguments[0],_=1,w=arguments.length,O=!1;for(typeof E=="boolean"&&(O=E,E=arguments[1]||{},_=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});_<w;++_)if(h=arguments[_],h!=null)for(g in h)y=f(E,g),b=f(h,g),E!==b&&(O&&b&&(s(b)||(v=a(b)))?(v?(v=!1,x=y&&a(y)?y:[]):x=y&&s(y)?y:{},u(E,{name:g,newValue:d(O,x,b)})):typeof b<"u"&&u(E,{name:g,newValue:b}));return E},Zm}var fL=cL();const Km=Ku(fL);function Wm(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dL(){const e=[],t={run:n,use:r};return t;function n(...a){let s=-1;const u=a.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);f(null,...a);function f(d,...h){const g=e[++s];let y=-1;if(d){u(d);return}for(;++y<a.length;)(h[y]===null||h[y]===void 0)&&(h[y]=a[y]);a=h,g?hL(g,f)(...h):u(null,...h)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function hL(e,t){let n;return r;function r(...u){const f=e.length>u.length;let d;f&&u.push(a);try{d=e.apply(this,u)}catch(h){const g=h;if(f&&n)throw g;return a(g)}f||(d&&d.then&&typeof d.then=="function"?d.then(s,a):d instanceof Error?a(d):s(d))}function a(u,...f){n||(n=!0,t(u,...f))}function s(u){a(null,u)}}const Ti={basename:pL,dirname:mL,extname:gL,join:yL,sep:"/"};function pL(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ql(e);let n=0,r=-1,a=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(s){n=a+1;break}}else r<0&&(s=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,f=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(s){n=a+1;break}}else u<0&&(s=!0,u=a+1),f>-1&&(e.codePointAt(a)===t.codePointAt(f--)?f<0&&(r=a):(f=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function mL(e){if(Ql(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gL(e){Ql(e);let t=e.length,n=-1,r=0,a=-1,s=0,u;for(;t--;){const f=e.codePointAt(t);if(f===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),f===46?a<0?a=t:s!==1&&(s=1):a>-1&&(s=-1)}return a<0||n<0||s===0||s===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function yL(...e){let t=-1,n;for(;++t<e.length;)Ql(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":vL(n)}function vL(e){Ql(e);const t=e.codePointAt(0)===47;let n=bL(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function bL(e,t){let n="",r=0,a=-1,s=0,u=-1,f,d;for(;++u<=e.length;){if(u<e.length)f=e.codePointAt(u);else{if(f===47)break;f=47}if(f===47){if(!(a===u-1||s===1))if(a!==u-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),a=u,s=0;continue}}else if(n.length>0){n="",r=0,a=u,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,u):n=e.slice(a+1,u),r=u-a-1;a=u,s=0}else f===46&&s>-1?s++:s=-1}return n}function Ql(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const SL={cwd:xL};function xL(){return"/"}function Qm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function EL(e){if(typeof e=="string")e=new URL(e);else if(!Qm(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return _L(e)}function _L(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const Jm=["history","path","basename","stem","extname","dirname"];class kE{constructor(t){let n;t?Qm(t)?n={path:t}:typeof t=="string"||wL(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":SL.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Jm.length;){const s=Jm[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let a;for(a in n)Jm.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Ti.basename(this.path):void 0}set basename(t){tg(t,"basename"),eg(t,"basename"),this.path=Ti.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ti.dirname(this.path):void 0}set dirname(t){RE(this.basename,"dirname"),this.path=Ti.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ti.extname(this.path):void 0}set extname(t){if(eg(t,"extname"),RE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ti.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qm(t)&&(t=EL(t)),tg(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ti.basename(this.path,this.extname):void 0}set stem(t){tg(t,"stem"),eg(t,"stem"),this.path=Ti.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new Kn(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function eg(e,t){if(e&&e.includes(Ti.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ti.sep+"`")}function tg(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function RE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function wL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const CL=(function(e){const r=this.constructor.prototype,a=r[e],s=function(){return a.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),TL={}.hasOwnProperty;class ng extends CL{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=dL()}copy(){const t=new ng;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Km(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(og("data",this.frozen),this.namespace[t]=n,this):TL.call(this.namespace,t)&&this.namespace[t]||void 0:t?(og("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=qf(t),r=this.parser||this.Parser;return rg("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),rg("process",this.parser||this.Parser),ig("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(s,u){const f=qf(t),d=r.parse(f);r.run(d,f,function(g,y,b){if(g||!y||!b)return h(g);const v=y,x=r.stringify(v,b);RL(x)?b.value=x:b.result=x,h(g,b)});function h(g,y){g||!y?u(g):s?s(y):n(void 0,y)}}}processSync(t){let n=!1,r;return this.freeze(),rg("processSync",this.parser||this.Parser),ig("processSync",this.compiler||this.Compiler),this.process(t,a),NE("processSync","process",n),r;function a(s,u){n=!0,TE(s),r=u}}run(t,n,r){OE(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(u,f){const d=qf(n);a.run(t,d,h);function h(g,y,b){const v=y||t;g?f(g):u?u(v):r(void 0,v,b)}}}runSync(t,n){let r=!1,a;return this.run(t,n,s),NE("runSync","run",r),a;function s(u,f){TE(u),a=f,r=!0}}stringify(t,n){this.freeze();const r=qf(n),a=this.compiler||this.Compiler;return ig("stringify",a),OE(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(og("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...y]=h;d(g,y)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(a.settings=Km(!0,a.settings,h.settings))}function f(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const y=h[g];s(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,g){let y=-1,b=-1;for(;++y<r.length;)if(r[y][0]===h){b=y;break}if(b===-1)r.push([h,...g]);else if(g.length>0){let[v,...x]=g;const E=r[b][1];Wm(E)&&Wm(v)&&(v=Km(!0,E,v)),r[b]=[h,v,...x]}}}}const AL=new ng().freeze();function rg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ig(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function og(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function OE(e){if(!Wm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function NE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function qf(e){return kL(e)?e:new kE(e)}function kL(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function RL(e){return typeof e=="string"||OL(e)}function OL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NL="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",IE=[],ME={allowDangerousHtml:!0},IL=/^(https?|ircs?|mailto|xmpp)$/i,ML=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function DL(e){const t=BL(e),n=zL(e);return LL(t.runSync(t.parse(n),n),e)}function BL(e){const t=e.rehypePlugins||IE,n=e.remarkPlugins||IE,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ME}:ME;return AL().use(pz).use(n).use(uL,r).use(t)}function zL(e){const t=e.children||"",n=new kE;return typeof t=="string"&&(n.value=t),n}function LL(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,s=t.disallowedElements,u=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||$L;for(const g of ML)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+NL+g.id,void 0);return _E(e,h),nD(e,{Fragment:L.Fragment,components:a,ignoreInvalidStyle:!0,jsx:L.jsx,jsxs:L.jsxs,passKeys:!0,passNode:!0});function h(g,y,b){if(g.type==="raw"&&b&&typeof y=="number")return u?b.children.splice(y,1):b.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let v;for(v in Bm)if(Object.hasOwn(Bm,v)&&Object.hasOwn(g.properties,v)){const x=g.properties[v],E=Bm[v];(E===null||E.includes(g.tagName))&&(g.properties[v]=d(String(x||""),v,g))}}if(g.type==="element"){let v=n?!n.includes(g.tagName):s?s.includes(g.tagName):!1;if(!v&&r&&typeof y=="number"&&(v=!r(g,y,b)),v&&b&&typeof y=="number")return f&&g.children?b.children.splice(y,1,...g.children):b.children.splice(y,1),y}}}function $L(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||IL.test(e.slice(0,t))?e:""}function PL({msg:e,isMe:t,showSeenIndicator:n,isSeen:r,send:a}){return L.jsxs(En,{sx:{maxWidth:"78%"},children:[L.jsx(En,{sx:{wordBreak:"break-word",position:"relative",px:1.4,py:1.05,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:t?"primary.main":"background.paper",color:t?"primary.contrastText":"text.primary",boxShadow:t?"0 10px 30px rgba(25,118,210,.22)":"0 10px 30px rgba(0,0,0,.10)",whiteSpace:"normal","&:before":{content:'""',position:"absolute",top:14,width:10,height:10,transform:"rotate(45deg)",bgcolor:t?"primary.main":"background.paper",borderLeft:t?"none":"0px solid",borderTop:t?"none":"0px solid",borderColor:"divider",right:t?-5:"auto",left:t?"auto":-5},"& p":{margin:0,lineHeight:1.35},"& p + p":{marginTop:"6px"},"& ol, & ul":{margin:"6px 0",paddingLeft:"20px"},"& li":{margin:"2px 0"},"& li > p":{margin:0},"& a":{color:"inherit",textDecoration:"underline"},"& code":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:"0.9em",padding:"2px 6px",borderRadius:8,backgroundColor:t?"rgba(255,255,255,.14)":"rgba(0,0,0,.06)"},"& pre":{margin:0,marginTop:8,padding:12,overflow:"auto",borderRadius:12,backgroundColor:t?"rgba(255,255,255,.12)":"rgba(0,0,0,.05)"}},children:L.jsx(DL,{children:e.text},"message"+e.id)}),n?L.jsx(ti,{sx:{mt:.35,fontSize:12,textAlign:"right",color:r?"text.secondary":"text.disabled"},children:r?"Seen":"Sent"}):null,e.status==="failed"?L.jsxs(En,{sx:{mt:.1,display:"flex",gap:1,alignItems:"center"},children:[L.jsx(ti,{variant:"caption",color:"error",children:e.errorText}),L.jsx(Cl,{sx:{p:0},size:"small",color:"primary",onClick:()=>a({id:e.id,role:"user",content:e.text}),children:L.jsx(w6,{sx:{fontSize:18}})})]}):null]},"container"+e.id)}function UL({msg:e,isMe:t}){return L.jsxs(En,{children:[L.jsx(Pc,{sx:{width:30,height:30,mt:.25,bgcolor:"primary.main"},children:L.jsx(Em,{sx:{fontSize:18}})}),e.sentAt&&L.jsx(En,{sx:{display:"flex",justifyContent:t?"flex-end":"flex-start",mt:.5},children:L.jsx(ti,{variant:"caption",sx:{color:"text.secondary",fontSize:11},children:e.sentAt})})]},"asistent"+e.id)}function jL({msg:e,isMe:t}){return L.jsxs(En,{children:[L.jsx(Pc,{sx:{width:30,height:30,mt:.25,bgcolor:"grey.900"},children:L.jsx(_6,{sx:{fontSize:18}})}),e.sentAt&&L.jsx(En,{sx:{display:"flex",justifyContent:t?"flex-end":"flex-start",mt:.5},children:L.jsx(ti,{variant:"caption",sx:{color:"text.secondary",fontSize:11},children:e.sentAt})})]},"sentAt"+e.id)}const HL=Jn.memo(function({msgs:t,isMessageSeen:n,endRef:r,reSend:a}){return L.jsxs(L.Fragment,{children:[t.map((s,u)=>{const f=s.role==="User",{showSeenIndicator:d,isSeen:h}=n(u,f,t,s);return L.jsxs(En,{sx:{display:"flex",justifyContent:f?"flex-end":"flex-start",gap:1,mb:1.2,overflowAnchor:"none"},children:[!f&&L.jsx(UL,{msg:s,isMe:f}),L.jsx(PL,{msg:s,isMe:f,showSeenIndicator:d,isSeen:h,send:a}),f&&L.jsx(jL,{msg:s,isMe:f})]},s.id)}),L.jsx("div",{ref:r})]})});function VL(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function FL(e){return/^[0-9]{6}$/.test(e)}const GL=async e=>{const t=da(),n=vo();if(n==null)throw new Error("Missing config");if(t==null)throw new Error("Conversation id is missing");const r=await fa(n.apiBaseUrl+ax+`/${n.clientId}/start`,{method:"POST",headers:{"Content-Type":"application/json","X-Conversation-Id":t},body:JSON.stringify(e)});if(!r.ok)throw new Error("Somethig happend on the request");return await r.json()},qL=async e=>{const t=da(),n=vo();if(n==null)throw new Error("Missing config");if(t==null)throw new Error("Conversation id is missing");const r=await fa(n.apiBaseUrl+ax+`/${n.clientId}/confirm`,{method:"POST",headers:{"Content-Type":"application/json","X-Conversation-Id":t},body:JSON.stringify(e)});if(!r.ok)throw new Error("Somethig happend on the request");return await r.json()},YL=({request:e,onValidationSuccess:t})=>{const[n,r]=N.useState(""),[a,s]=N.useState(""),[u,f]=N.useState(!0),d=g=>{if(!FL(n)){f(!1);return}qL({requestId:e?.requestId||"",code:n}).then(y=>{if(y.verified){t();return}s(y.failureReason)})},h=()=>a||null;return L.jsxs(Fc,{spacing:1,sx:{position:"relative",p:2,bgcolor:"background.paper",borderRadius:2,boxShadow:"0 4px 12px rgba(0,0,0,.1)",maxWidth:380,mb:2,display:"flex",flexDirection:"column",alignItems:"center"},children:[L.jsxs(ti,{variant:"body1",align:"center",gutterBottom:!0,sx:{wordBreak:"break-word"},children:["Introdu codul primit la ",e?.contact]}),L.jsx(Ip,{focused:!0,fullWidth:!0,size:"small",value:n,onChange:g=>{r(g.target.value),f(!0)},error:h()!=null,helperText:h()}),L.jsx(Uc,{variant:"outlined",color:"primary",onClick:d,children:"Trimite codul"})]})},XL=({setRequest:e,setDisplayOtpForm:t})=>{const[n,r]=N.useState(""),[a,s]=N.useState(!0),u=async f=>{if(!VL(n)){s(!1);return}GL({channel:"email",value:n}).then(d=>{e(d),t(!0)})};return L.jsxs(Fc,{spacing:1,sx:{position:"relative",p:2,bgcolor:"background.paper",borderRadius:2,boxShadow:"0 4px 12px rgba(0,0,0,.1)",maxWidth:380,mb:2,display:"flex",flexDirection:"column",alignItems:"center"},children:[L.jsx(ti,{variant:"h6",gutterBottom:!0,children:"Introdu adresa de email"}),L.jsx(Ip,{focused:!0,fullWidth:!0,size:"small",value:n,onChange:f=>{r(f.target.value),s(!0)},error:!a,helperText:a?void 0:"Adresa de email nu este validă"}),L.jsx(Uc,{variant:"outlined",color:"primary",onClick:u,children:"Trimite"}),L.jsx(ti,{variant:"body2",color:"text.secondary",children:"Vom trimite un cod de verificare la aceasta."})]})},ZL=({verificationRequest:e,send:t,setToolCallEvents:n})=>{const[r,a]=N.useState(!1),[s,u]=N.useState(),f=N.useCallback(()=>{const d=e.delta;t({role:"tool",toolCallId:e.toolCallId,content:JSON.stringify({approval_id:d.request.approval_id,approved:!0}),id:""})},[]);return L.jsx(L.Fragment,{children:r?L.jsx(YL,{request:s,onValidationSuccess:f}):L.jsx(XL,{setDisplayOtpForm:a,setRequest:u})})},KL="request_verification",WL=({toolCallEvents:e,setToolCallEvents:t,send:n})=>{const[r,a]=N.useState("email");if(!e)return null;const s=e.filter(u=>u.toolCallName==KL)[0];return s&&r==="email"?L.jsx(ZL,{verificationRequest:s,send:n,setToolCallEvents:t}):null},QL=()=>L.jsxs(En,{sx:{display:"flex",alignItems:"flex-end",gap:1,mb:1.2},children:[L.jsx(Pc,{sx:{width:30,height:30,bgcolor:"primary.main"},children:L.jsx(Em,{sx:{fontSize:18}})}),L.jsxs(En,{sx:{px:1.4,py:1.1,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",boxShadow:"0 10px 30px rgba(0,0,0,.10)",display:"flex",alignItems:"center",gap:.6},children:[L.jsx(En,{sx:{width:6,height:6,borderRadius:999,bgcolor:"text.secondary",animation:"dot 1.1s infinite ease-in-out","@keyframes dot":{"0%, 80%, 100%":{transform:"scale(0.6)",opacity:.4},"40%":{transform:"scale(1)",opacity:1}}}}),L.jsx(En,{sx:{width:6,height:6,borderRadius:999,bgcolor:"text.secondary",animation:"dot 1.1s infinite ease-in-out",animationDelay:"0.15s","@keyframes dot":{"0%, 80%, 100%":{transform:"scale(0.6)",opacity:.4},"40%":{transform:"scale(1)",opacity:1}}}}),L.jsx(En,{sx:{width:6,height:6,borderRadius:999,bgcolor:"text.secondary",animation:"dot 1.1s infinite ease-in-out",animationDelay:"0.3s","@keyframes dot":{"0%, 80%, 100%":{transform:"scale(0.6)",opacity:.4},"40%":{transform:"scale(1)",opacity:1}}}})]})]}),JL={display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"auto",px:1.5,pt:1.5,backgroundImage:"radial-gradient(circle at 20% 10%, rgba(25,118,210,.10), transparent 45%),radial-gradient(circle at 80% 20%, rgba(156,39,176,.10), transparent 50%),radial-gradient(circle at 40% 90%, rgba(0,200,83,.08), transparent 45%)","&::-webkit-scrollbar":{width:10},"&::-webkit-scrollbar-thumb":{backgroundColor:"rgba(0,0,0,.18)",borderRadius:999,border:"3px solid transparent",backgroundClip:"content-box"}};function e$({msgs:e,isMessageSeen:t,send:n,sending:r,items:a,endRef:s,toolCallEvents:u,setToolCallEvents:f}){return L.jsxs(En,{sx:JL,children:[L.jsx(HL,{msgs:e,isMessageSeen:t,reSend:n}),L.jsx("div",{style:{paddingBottom:2},children:r&&L.jsx(QL,{})}),a.map(d=>L.jsx(E6,{error:d.message,onClose:()=>Bf.getState().remove(d.id)},d.id)),L.jsx(WL,{toolCallEvents:u,setToolCallEvents:f,send:n}),L.jsx(iI,{ref:s,href:"https://x-bot.ro",target:"_blank",rel:"noreferrer",underline:"none",sx:{pb:1,marginTop:"auto",alignSelf:"center",fontSize:12,color:"text.secondary",opacity:.75,"&:hover":{opacity:1,color:"text.primary"},justifyContent:"center"},children:"Chat oferit de X-bot.ro"})]})}function t$({inputRef:e,input:t,sending:n,setInput:r,send:a}){return L.jsx(En,{sx:{p:1.25,borderTop:"1px solid",borderColor:"divider",display:"flex",gap:1,bgcolor:"background.paper",flexShrink:0},children:L.jsx(Ip,{inputRef:e,focused:!0,size:"small",fullWidth:!0,value:t,disabled:n||t.length>=Q5,onChange:s=>r(s.target.value),onKeyDown:s=>{s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),a())},placeholder:"Scrie un mesaj",multiline:!0,maxRows:4,sx:{"& .MuiOutlinedInput-root":{borderRadius:3,pr:.75,backgroundColor:"rgba(0,0,0,.02)"}},InputProps:{endAdornment:L.jsx(Cl,{size:"small",onClick:()=>a(),disabled:n||!t.trim(),sx:{ml:.5,borderRadius:999},children:L.jsx(C6,{})})}})})}const n$=async e=>{const t=da(),n=vo();if(n==null)throw new Error("Missing config");if(t==null)throw new Error("Conversation id is missing");await fa(n.apiBaseUrl+Hl+`/${n.clientId}/conversation-status`,{method:"POST",headers:{"Content-Type":"application/json","X-Conversation-Id":t},body:JSON.stringify(e)})};function r$({open:e,setOpen:t,msgs:n,input:r,setInput:a,sending:s,send:u,anchorSx:f,conversationMode:d,setConversationStatus:h,toolCallEvents:g,setToolCallEvents:y}){const b=Bf(O=>O.items),v=N.useRef(null),x=N.useRef(null),E=_l(),_=ZI(E.breakpoints.down("md"));b6(),N.useEffect(()=>{x.current?.scrollIntoView({behavior:"smooth",block:"end"}),requestAnimationFrame(()=>v.current?.focus())},[n.length,s]),N.useEffect(()=>{e&&x.current?.scrollIntoView({behavior:"auto",block:"end"})},[e]),N.useEffect(()=>{if(!(e&&_))return;const O=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${O}px`,document.body.style.left="0",document.body.style.right="0",document.body.style.width="100%",()=>{document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.width="",window.scrollTo(0,O)}},[e,_]);const w=N.useCallback((O,T,A,M)=>{const R=O===A.length-1,$=A[A.length-1],H=R&&T&&$?.seen,V=H&&$?.id===M.id;return{showSeenIndicator:H,isSeen:V}},[]);return L.jsxs(En,{sx:f,children:[!e&&L.jsx(Uc,{variant:"contained",onClick:()=>t(!0),startIcon:L.jsx(y6,{}),sx:{borderRadius:999,px:2,py:1,textTransform:"none",boxShadow:"0 10px 30px rgba(0,0,0,.18)"},children:"Chat"}),e&&L.jsx(Rc,{elevation:_?0:10,sx:{width:_?"100vw":380,height:_?"calc(var(--vh, 1vh) * 100)":560,"@supports (height: 100dvh)":{height:_?"100dvh":560},maxWidth:"100vw",maxHeight:"100dvh",borderRadius:_?0:4,position:_?"fixed":"relative",inset:_?0:"auto",overflow:"hidden",border:_?"none":"1px solid",borderColor:"divider",boxShadow:_?"none":"0 18px 60px rgba(0,0,0,.28)"},children:L.jsxs(En,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[L.jsx(x6,{isMobile:_,conversationMode:d,setOpen:t}),L.jsx(e$,{msgs:n,isMessageSeen:w,send:u,sending:s,items:b,endRef:x,toolCallEvents:g,setToolCallEvents:y}),d==="Human"&&L.jsx(i$,{conversationMode:d,setConversationStatus:h}),L.jsx(t$,{inputRef:v,input:r,sending:s,setInput:a,send:u})]})})]})}const i$=({conversationMode:e,setConversationStatus:t})=>L.jsx(Rc,{elevation:0,sx:{mx:2,mt:1.5,mb:1,px:2,py:1.5,border:"1px solid",borderColor:"divider",borderRadius:3,bgcolor:"background.paper",boxShadow:"0 6px 18px rgba(15, 23, 42, 0.04)"},children:L.jsxs(Fc,{direction:{xs:"column",sm:"row"},spacing:1.5,alignItems:{xs:"center",sm:"flex-start"},justifyContent:"space-between",children:[L.jsxs(Fc,{direction:"row",spacing:1,alignItems:"center",flexWrap:"wrap",children:[L.jsx(vN,{size:"small",icon:e==="Human"?L.jsx(A6,{}):L.jsx(T6,{}),label:e==="Human"?"Operator activ":"Asistent activ",color:e==="Human"?"warning":"success",variant:"outlined",sx:{height:28,borderRadius:2,"& .MuiChip-label":{px:1.25,fontWeight:600}}}),L.jsx(ti,{variant:"body2",color:"text.secondary",children:e==="Human"?"Puteți reveni oricând la asistentul virtual.":"Asistentul răspunde automat mesajelor."})]}),e==="Human"&&L.jsx(Uc,{variant:"contained",size:"small",onClick:async()=>{await n$("Bot"),t({mode:"Bot",state:"AI_ACTIVE"})},sx:{px:2.5,py:1.1,borderRadius:2.5,textTransform:"none",fontWeight:700,boxShadow:"0 8px 24px rgba(25, 118, 210, 0.18)","&:hover":{boxShadow:"0 10px 28px rgba(25, 118, 210, 0.24)"}},children:"Revino la asistentul virtual"})]})});class pa extends Error{constructor(t,n){const r=new.target.prototype;super(`${t}: Status code '${n}'`),this.statusCode=n,this.__proto__=r}}class ag extends Error{constructor(t="A timeout occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class ni extends Error{constructor(t="An abort occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class o$ extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=r}}class a$ extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=r}}class s$ extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=r}}class DE extends Error{constructor(t){const n=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class l$ extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.innerErrors=n,this.__proto__=r}}class BE{constructor(t,n,r){this.statusCode=t,this.statusText=n,this.content=r}}class Yf{get(t,n){return this.send({...n,method:"GET",url:t})}post(t,n){return this.send({...n,method:"POST",url:t})}delete(t,n){return this.send({...n,method:"DELETE",url:t})}getCookieString(t){return""}}var ae;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(ae||(ae={}));class Jl{constructor(){}log(t,n){}}Jl.instance=new Jl;const u$="10.0.0";class Cn{static isRequired(t,n){if(t==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(t,n){if(!t||t.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(t,n,r){if(!(t in n))throw new Error(`Unknown ${r} value: ${t}.`)}}class nn{static get isBrowser(){return!nn.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!nn.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!nn.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function eu(e,t){let n="";return ma(e)?(n=`Binary data of length ${e.byteLength}`,t&&(n+=`. Content: '${c$(e)}'`)):typeof e=="string"&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function c$(e){const t=new Uint8Array(e);let n="";return t.forEach(r=>{const a=r<16?"0":"";n+=`0x${a}${r.toString(16)} `}),n.substring(0,n.length-1)}function ma(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function zE(e,t,n,r,a,s){const u={},[f,d]=hs();u[f]=d,e.log(ae.Trace,`(${t} transport) sending data. ${eu(a,s.logMessageContent)}.`);const h=ma(a)?"arraybuffer":"text",g=await n.post(r,{content:a,headers:{...u,...s.headers},responseType:h,timeout:s.timeout,withCredentials:s.withCredentials});e.log(ae.Trace,`(${t} transport) request complete. Response status: ${g.statusCode}.`)}function f$(e){return e===void 0?new Xf(ae.Information):e===null?Jl.instance:e.log!==void 0?e:new Xf(e)}class d${constructor(t,n){this._subject=t,this._observer=n}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class Xf{constructor(t){this._minLevel=t,this.out=console}log(t,n){if(t>=this._minLevel){const r=`[${new Date().toISOString()}] ${ae[t]}: ${n}`;switch(t){case ae.Critical:case ae.Error:this.out.error(r);break;case ae.Warning:this.out.warn(r);break;case ae.Information:this.out.info(r);break;default:this.out.log(r);break}}}}function hs(){let e="X-SignalR-User-Agent";return nn.isNode&&(e="User-Agent"),[e,h$(u$,p$(),g$(),m$())]}function h$(e,t,n,r){let a="Microsoft SignalR/";const s=e.split(".");return a+=`${s[0]}.${s[1]}`,a+=` (${e}; `,t&&t!==""?a+=`${t}; `:a+="Unknown OS; ",a+=`${n}`,r?a+=`; ${r}`:a+="; Unknown Runtime Version",a+=")",a}function p$(){if(nn.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function m$(){if(nn.isNode)return process.versions.node}function g$(){return nn.isNode?"NodeJS":"Browser"}function sg(e){return e.stack?e.stack:e.message?e.message:`${e}`}function y$(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class v$ extends Yf{constructor(t){if(super(),this._logger=t,typeof fetch>"u"||nn.isNode){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=n("node-fetch"):this._fetchType=fetch,this._fetchType=n("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(y$());if(typeof AbortController>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=n("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new ni;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const n=new this._abortControllerType;let r;t.abortSignal&&(t.abortSignal.onabort=()=>{n.abort(),r=new ni});let a=null;if(t.timeout){const d=t.timeout;a=setTimeout(()=>{n.abort(),this._logger.log(ae.Warning,"Timeout from HTTP request."),r=new ag},d)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},ma(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");let s;try{s=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(d){throw r||(this._logger.log(ae.Warning,`Error from HTTP request. ${d}.`),d)}finally{a&&clearTimeout(a),t.abortSignal&&(t.abortSignal.onabort=null)}if(!s.ok){const d=await LE(s,"text");throw new pa(d||s.statusText,s.status)}const f=await LE(s,t.responseType);return new BE(s.status,s.statusText,f)}getCookieString(t){let n="";return nn.isNode&&this._jar&&this._jar.getCookies(t,(r,a)=>n=a.join("; ")),n}}function LE(e,t){let n;switch(t){case"arraybuffer":n=e.arrayBuffer();break;case"text":n=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`);default:n=e.text();break}return n}class b$ extends Yf{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new ni):t.method?t.url?new Promise((n,r)=>{const a=new XMLHttpRequest;a.open(t.method,t.url,!0),a.withCredentials=t.withCredentials===void 0?!0:t.withCredentials,a.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(ma(t.content)?a.setRequestHeader("Content-Type","application/octet-stream"):a.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const s=t.headers;s&&Object.keys(s).forEach(u=>{a.setRequestHeader(u,s[u])}),t.responseType&&(a.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{a.abort(),r(new ni)}),t.timeout&&(a.timeout=t.timeout),a.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),a.status>=200&&a.status<300?n(new BE(a.status,a.statusText,a.response||a.responseText)):r(new pa(a.response||a.responseText||a.statusText,a.status))},a.onerror=()=>{this._logger.log(ae.Warning,`Error from HTTP request. ${a.status}: ${a.statusText}.`),r(new pa(a.statusText,a.status))},a.ontimeout=()=>{this._logger.log(ae.Warning,"Timeout from HTTP request."),r(new ag)},a.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class S$ extends Yf{constructor(t){if(super(),typeof fetch<"u"||nn.isNode)this._httpClient=new v$(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new b$(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new ni):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class Er{static write(t){return`${t}${Er.RecordSeparator}`}static parse(t){if(t[t.length-1]!==Er.RecordSeparator)throw new Error("Message is incomplete.");const n=t.split(Er.RecordSeparator);return n.pop(),n}}Er.RecordSeparatorCode=30,Er.RecordSeparator=String.fromCharCode(Er.RecordSeparatorCode);class x${writeHandshakeRequest(t){return Er.write(JSON.stringify(t))}parseHandshakeResponse(t){let n,r;if(ma(t)){const f=new Uint8Array(t),d=f.indexOf(Er.RecordSeparatorCode);if(d===-1)throw new Error("Message is incomplete.");const h=d+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(f.slice(0,h))),r=f.byteLength>h?f.slice(h).buffer:null}else{const f=t,d=f.indexOf(Er.RecordSeparator);if(d===-1)throw new Error("Message is incomplete.");const h=d+1;n=f.substring(0,h),r=f.length>h?f.substring(h):null}const a=Er.parse(n),s=JSON.parse(a[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[r,s]}}var qe;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"})(qe||(qe={}));class E${constructor(){this.observers=[]}next(t){for(const n of this.observers)n.next(t)}error(t){for(const n of this.observers)n.error&&n.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new d$(this,t)}}class _${constructor(t,n,r){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=t,this._connection=n,this._bufferSize=r}async _send(t){const n=this._protocol.writeMessage(t);let r=Promise.resolve();if(this._isInvocationMessage(t)){this._totalMessageCount++;let a=()=>{},s=()=>{};ma(n)?this._bufferedByteCount+=n.byteLength:this._bufferedByteCount+=n.length,this._bufferedByteCount>=this._bufferSize&&(r=new Promise((u,f)=>{a=u,s=f})),this._messages.push(new w$(n,this._totalMessageCount,a,s))}try{this._reconnectInProgress||await this._connection.send(n)}catch{this._disconnected()}await r}_ack(t){let n=-1;for(let r=0;r<this._messages.length;r++){const a=this._messages[r];if(a._id<=t.sequenceId)n=r,ma(a._message)?this._bufferedByteCount-=a._message.byteLength:this._bufferedByteCount-=a._message.length,a._resolver();else if(this._bufferedByteCount<this._bufferSize)a._resolver();else break}n!==-1&&(this._messages=this._messages.slice(n+1))}_shouldProcessMessage(t){if(this._waitForSequenceMessage)return t.type!==qe.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(t))return!0;const n=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,n<=this._latestReceivedSequenceId?(n===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=n,this._ackTimer(),!0)}_resetSequence(t){if(t.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=t.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const t=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:qe.Sequence,sequenceId:t}));const n=this._messages;for(const r of n)await this._connection.send(r._message);this._reconnectInProgress=!1}_dispose(t){t??(t=new Error("Unable to reconnect to server."));for(const n of this._messages)n._rejector(t)}_isInvocationMessage(t){switch(t.type){case qe.Invocation:case qe.StreamItem:case qe.Completion:case qe.StreamInvocation:case qe.CancelInvocation:return!0;case qe.Close:case qe.Sequence:case qe.Ping:case qe.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:qe.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class w${constructor(t,n,r,a){this._message=t,this._id=n,this._resolver=r,this._rejector=a}}const C$=30*1e3,T$=15*1e3,A$=1e5;var Nt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(Nt||(Nt={}));class lg{static create(t,n,r,a,s,u,f){return new lg(t,n,r,a,s,u,f)}constructor(t,n,r,a,s,u,f){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(ae.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Cn.isRequired(t,"connection"),Cn.isRequired(n,"logger"),Cn.isRequired(r,"protocol"),this.serverTimeoutInMilliseconds=s??C$,this.keepAliveIntervalInMilliseconds=u??T$,this._statefulReconnectBufferSize=f??A$,this._logger=n,this._protocol=r,this.connection=t,this._reconnectPolicy=a,this._handshakeProtocol=new x$,this.connection.onreceive=d=>this._processIncomingData(d),this.connection.onclose=d=>this._connectionClosed(d),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Nt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:qe.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==Nt.Disconnected&&this._connectionState!==Nt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Nt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Nt.Connecting,this._logger.log(ae.Debug,"Starting HubConnection.");try{await this._startInternal(),nn.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Nt.Connected,this._connectionStarted=!0,this._logger.log(ae.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=Nt.Disconnected,this._logger.log(ae.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((n,r)=>{this._handshakeResolver=n,this._handshakeRejecter=r});await this.connection.start(this._protocol.transferFormat);try{let n=this._protocol.version;this.connection.features.reconnect||(n=1);const r={protocol:this._protocol.name,version:n};if(this._logger.log(ae.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(r)),this._logger.log(ae.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.reconnect&&(this._messageBuffer=new _$(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(ae.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const t=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){if(this._connectionState===Nt.Disconnected)return this._logger.log(ae.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===Nt.Disconnecting)return this._logger.log(ae.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const n=this._connectionState;return this._connectionState=Nt.Disconnecting,this._logger.log(ae.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(ae.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(n===Nt.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new ni("The connection was stopped before the hub handshake could complete."),this.connection.stop(t))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(t,...n){const[r,a]=this._replaceStreamingParams(n),s=this._createStreamInvocation(t,n,a);let u;const f=new E$;return f.cancelCallback=()=>{const d=this._createCancelInvocation(s.invocationId);return delete this._callbacks[s.invocationId],u.then(()=>this._sendWithProtocol(d))},this._callbacks[s.invocationId]=(d,h)=>{if(h){f.error(h);return}else d&&(d.type===qe.Completion?d.error?f.error(new Error(d.error)):f.complete():f.next(d.item))},u=this._sendWithProtocol(s).catch(d=>{f.error(d),delete this._callbacks[s.invocationId]}),this._launchStreams(r,u),f}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._messageBuffer?this._messageBuffer._send(t):this._sendMessage(this._protocol.writeMessage(t))}send(t,...n){const[r,a]=this._replaceStreamingParams(n),s=this._sendWithProtocol(this._createInvocation(t,n,!0,a));return this._launchStreams(r,s),s}invoke(t,...n){const[r,a]=this._replaceStreamingParams(n),s=this._createInvocation(t,n,!1,a);return new Promise((f,d)=>{this._callbacks[s.invocationId]=(g,y)=>{if(y){d(y);return}else g&&(g.type===qe.Completion?g.error?d(new Error(g.error)):f(g.result):d(new Error(`Unexpected message type: ${g.type}`)))};const h=this._sendWithProtocol(s).catch(g=>{d(g),delete this._callbacks[s.invocationId]});this._launchStreams(r,h)})}on(t,n){!t||!n||(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(n)===-1&&this._methods[t].push(n))}off(t,n){if(!t)return;t=t.toLowerCase();const r=this._methods[t];if(r)if(n){const a=r.indexOf(n);a!==-1&&(r.splice(a,1),r.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const n=this._protocol.parseMessages(t,this._logger);for(const r of n)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(r)))switch(r.type){case qe.Invocation:this._invokeClientMethod(r).catch(a=>{this._logger.log(ae.Error,`Invoke client method threw error: ${sg(a)}`)});break;case qe.StreamItem:case qe.Completion:{const a=this._callbacks[r.invocationId];if(a){r.type===qe.Completion&&delete this._callbacks[r.invocationId];try{a(r)}catch(s){this._logger.log(ae.Error,`Stream callback threw error: ${sg(s)}`)}}break}case qe.Ping:break;case qe.Close:{this._logger.log(ae.Information,"Close message received from server.");const a=r.error?new Error("Server returned an error on close: "+r.error):void 0;r.allowReconnect===!0?this.connection.stop(a):this._stopPromise=this._stopInternal(a);break}case qe.Ack:this._messageBuffer&&this._messageBuffer._ack(r);break;case qe.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(r);break;default:this._logger.log(ae.Warning,`Invalid message type: ${r.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let n,r;try{[r,n]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(a){const s="Error parsing handshake response: "+a;this._logger.log(ae.Error,s);const u=new Error(s);throw this._handshakeRejecter(u),u}if(n.error){const a="Server returned handshake error: "+n.error;this._logger.log(ae.Error,a);const s=new Error(a);throw this._handshakeRejecter(s),s}else this._logger.log(ae.Debug,"Server handshake complete.");return this._handshakeResolver(),r}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let t=this._nextKeepAlive-new Date().getTime();if(t<0){this._connectionState===Nt.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===Nt.Connected&&await this._trySendPingMessage()},t))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const n=t.target.toLowerCase(),r=this._methods[n];if(!r){this._logger.log(ae.Warning,`No client method with the name '${n}' found.`),t.invocationId&&(this._logger.log(ae.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)));return}const a=r.slice(),s=!!t.invocationId;let u,f,d;for(const h of a)try{const g=u;u=await h.apply(this,t.arguments),s&&u&&g&&(this._logger.log(ae.Error,`Multiple results provided for '${n}'. Sending error to server.`),d=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),f=void 0}catch(g){f=g,this._logger.log(ae.Error,`A callback for the method '${n}' threw error '${g}'.`)}d?await this._sendWithProtocol(d):s?(f?d=this._createCompletionMessage(t.invocationId,`${f}`,null):u!==void 0?d=this._createCompletionMessage(t.invocationId,null,u):(this._logger.log(ae.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),d=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(d)):u&&this._logger.log(ae.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(ae.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new ni("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Nt.Disconnecting?this._completeClose(t):this._connectionState===Nt.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===Nt.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=Nt.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(t??new Error("Connection closed.")),this._messageBuffer=void 0),nn.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[t]))}catch(n){this._logger.log(ae.Error,`An onclose callback called with error '${t}' threw error '${n}'.`)}}}async _reconnect(t){const n=Date.now();let r=0,a=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),s=this._getNextRetryDelay(r,0,a);if(s===null){this._logger.log(ae.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=Nt.Reconnecting,t?this._logger.log(ae.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(ae.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(u=>u.apply(this,[t]))}catch(u){this._logger.log(ae.Error,`An onreconnecting callback called with error '${t}' threw error '${u}'.`)}if(this._connectionState!==Nt.Reconnecting){this._logger.log(ae.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(ae.Information,`Reconnect attempt number ${r+1} will start in ${s} ms.`),await new Promise(u=>{this._reconnectDelayHandle=setTimeout(u,s)}),this._reconnectDelayHandle=void 0,this._connectionState!==Nt.Reconnecting){this._logger.log(ae.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=Nt.Connected,this._logger.log(ae.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(u=>u.apply(this,[this.connection.connectionId]))}catch(u){this._logger.log(ae.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${u}'.`)}return}catch(u){if(this._logger.log(ae.Information,`Reconnect attempt failed because of error '${u}'.`),this._connectionState!==Nt.Reconnecting){this._logger.log(ae.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===Nt.Disconnecting&&this._completeClose();return}r++,a=u instanceof Error?u:new Error(u.toString()),s=this._getNextRetryDelay(r,Date.now()-n,a)}}this._logger.log(ae.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${r} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,n,r){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:t,retryReason:r})}catch(a){return this._logger.log(ae.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${n}) threw error '${a}'.`),null}}_cancelCallbacksWithError(t){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(r=>{const a=n[r];try{a(null,t)}catch(s){this._logger.log(ae.Error,`Stream 'error' callback called with '${t}' threw error: ${sg(s)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,n,r,a){if(r)return a.length!==0?{target:t,arguments:n,streamIds:a,type:qe.Invocation}:{target:t,arguments:n,type:qe.Invocation};{const s=this._invocationId;return this._invocationId++,a.length!==0?{target:t,arguments:n,invocationId:s.toString(),streamIds:a,type:qe.Invocation}:{target:t,arguments:n,invocationId:s.toString(),type:qe.Invocation}}}_launchStreams(t,n){if(t.length!==0){n||(n=Promise.resolve());for(const r in t)t[r].subscribe({complete:()=>{n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r)))},error:a=>{let s;a instanceof Error?s=a.message:a&&a.toString?s=a.toString():s="Unknown error",n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r,s)))},next:a=>{n=n.then(()=>this._sendWithProtocol(this._createStreamItemMessage(r,a)))}})}}_replaceStreamingParams(t){const n=[],r=[];for(let a=0;a<t.length;a++){const s=t[a];if(this._isObservable(s)){const u=this._invocationId;this._invocationId++,n[u]=s,r.push(u.toString()),t.splice(a,1)}}return[n,r]}_isObservable(t){return t&&t.subscribe&&typeof t.subscribe=="function"}_createStreamInvocation(t,n,r){const a=this._invocationId;return this._invocationId++,r.length!==0?{target:t,arguments:n,invocationId:a.toString(),streamIds:r,type:qe.StreamInvocation}:{target:t,arguments:n,invocationId:a.toString(),type:qe.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:qe.CancelInvocation}}_createStreamItemMessage(t,n){return{invocationId:t,item:n,type:qe.StreamItem}}_createCompletionMessage(t,n,r){return n?{error:n,invocationId:t,type:qe.Completion}:{invocationId:t,result:r,type:qe.Completion}}_createCloseMessage(){return{type:qe.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const k$=[0,2e3,1e4,3e4,null];class $E{constructor(t){this._retryDelays=t!==void 0?[...t,null]:k$}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class ga{}ga.Authorization="Authorization",ga.Cookie="Cookie";class R$ extends Yf{constructor(t,n){super(),this._innerClient=t,this._accessTokenFactory=n}async send(t){let n=!0;this._accessTokenFactory&&(!this._accessToken||t.url&&t.url.indexOf("/negotiate?")>0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const r=await this._innerClient.send(t);return n&&r.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):r}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[ga.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[ga.Authorization]&&delete t.headers[ga.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Nn;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Nn||(Nn={}));var Wn;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(Wn||(Wn={}));let O$=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class PE{get pollAborted(){return this._pollAbort.aborted}constructor(t,n,r){this._httpClient=t,this._logger=n,this._pollAbort=new O$,this._options=r,this._running=!1,this.onreceive=null,this.onclose=null}async connect(t,n){if(Cn.isRequired(t,"url"),Cn.isRequired(n,"transferFormat"),Cn.isIn(n,Wn,"transferFormat"),this._url=t,this._logger.log(ae.Trace,"(LongPolling transport) Connecting."),n===Wn.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[r,a]=hs(),s={[r]:a,...this._options.headers},u={abortSignal:this._pollAbort.signal,headers:s,timeout:1e5,withCredentials:this._options.withCredentials};n===Wn.Binary&&(u.responseType="arraybuffer");const f=`${t}&_=${Date.now()}`;this._logger.log(ae.Trace,`(LongPolling transport) polling: ${f}.`);const d=await this._httpClient.get(f,u);d.statusCode!==200?(this._logger.log(ae.Error,`(LongPolling transport) Unexpected response code: ${d.statusCode}.`),this._closeError=new pa(d.statusText||"",d.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,u)}async _poll(t,n){try{for(;this._running;)try{const r=`${t}&_=${Date.now()}`;this._logger.log(ae.Trace,`(LongPolling transport) polling: ${r}.`);const a=await this._httpClient.get(r,n);a.statusCode===204?(this._logger.log(ae.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):a.statusCode!==200?(this._logger.log(ae.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new pa(a.statusText||"",a.statusCode),this._running=!1):a.content?(this._logger.log(ae.Trace,`(LongPolling transport) data received. ${eu(a.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(a.content)):this._logger.log(ae.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(r){this._running?r instanceof ag?this._logger.log(ae.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=r,this._running=!1):this._logger.log(ae.Trace,`(LongPolling transport) Poll errored after shutdown: ${r.message}`)}}finally{this._logger.log(ae.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?zE(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(ae.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(ae.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[n,r]=hs();t[n]=r;const a={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let s;try{await this._httpClient.delete(this._url,a)}catch(u){s=u}s?s instanceof pa&&(s.statusCode===404?this._logger.log(ae.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(ae.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(ae.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(ae.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(ae.Trace,t),this.onclose(this._closeError)}}}class N${constructor(t,n,r,a){this._httpClient=t,this._accessToken=n,this._logger=r,this._options=a,this.onreceive=null,this.onclose=null}async connect(t,n){return Cn.isRequired(t,"url"),Cn.isRequired(n,"transferFormat"),Cn.isIn(n,Wn,"transferFormat"),this._logger.log(ae.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((r,a)=>{let s=!1;if(n!==Wn.Text){a(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let u;if(nn.isBrowser||nn.isWebWorker)u=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const f=this._httpClient.getCookieString(t),d={};d.Cookie=f;const[h,g]=hs();d[h]=g,u=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...d,...this._options.headers}})}try{u.onmessage=f=>{if(this.onreceive)try{this._logger.log(ae.Trace,`(SSE transport) data received. ${eu(f.data,this._options.logMessageContent)}.`),this.onreceive(f.data)}catch(d){this._close(d);return}},u.onerror=f=>{s?this._close():a(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},u.onopen=()=>{this._logger.log(ae.Information,`SSE connected to ${this._url}`),this._eventSource=u,s=!0,r()}}catch(f){a(f);return}})}async send(t){return this._eventSource?zE(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class I${constructor(t,n,r,a,s,u){this._logger=r,this._accessTokenFactory=n,this._logMessageContent=a,this._webSocketConstructor=s,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=u}async connect(t,n){Cn.isRequired(t,"url"),Cn.isRequired(n,"transferFormat"),Cn.isIn(n,Wn,"transferFormat"),this._logger.log(ae.Trace,"(WebSockets transport) Connecting.");let r;return this._accessTokenFactory&&(r=await this._accessTokenFactory()),new Promise((a,s)=>{t=t.replace(/^http/,"ws");let u;const f=this._httpClient.getCookieString(t);let d=!1;if(nn.isNode||nn.isReactNative){const h={},[g,y]=hs();h[g]=y,r&&(h[ga.Authorization]=`Bearer ${r}`),f&&(h[ga.Cookie]=f),u=new this._webSocketConstructor(t,void 0,{headers:{...h,...this._headers}})}else r&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(r)}`);u||(u=new this._webSocketConstructor(t)),n===Wn.Binary&&(u.binaryType="arraybuffer"),u.onopen=h=>{this._logger.log(ae.Information,`WebSocket connected to ${t}.`),this._webSocket=u,d=!0,a()},u.onerror=h=>{let g=null;typeof ErrorEvent<"u"&&h instanceof ErrorEvent?g=h.error:g="There was an error with the transport",this._logger.log(ae.Information,`(WebSockets transport) ${g}.`)},u.onmessage=h=>{if(this._logger.log(ae.Trace,`(WebSockets transport) data received. ${eu(h.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(h.data)}catch(g){this._close(g);return}},u.onclose=h=>{if(d)this._close(h);else{let g=null;typeof ErrorEvent<"u"&&h instanceof ErrorEvent?g=h.error:g="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",s(new Error(g))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(ae.Trace,`(WebSockets transport) sending data. ${eu(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(ae.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(t)&&(t.wasClean===!1||t.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)):t instanceof Error?this.onclose(t):this.onclose())}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}const UE=100;class M${constructor(t,n={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Cn.isRequired(t,"url"),this._logger=f$(n.logger),this.baseUrl=this._resolveUrl(t),n=n||{},n.logMessageContent=n.logMessageContent===void 0?!1:n.logMessageContent,typeof n.withCredentials=="boolean"||n.withCredentials===void 0)n.withCredentials=n.withCredentials===void 0?!0:n.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");n.timeout=n.timeout===void 0?100*1e3:n.timeout;let r=null,a=null;if(nn.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=s("ws"),a=s("eventsource")}!nn.isNode&&typeof WebSocket<"u"&&!n.WebSocket?n.WebSocket=WebSocket:nn.isNode&&!n.WebSocket&&r&&(n.WebSocket=r),!nn.isNode&&typeof EventSource<"u"&&!n.EventSource?n.EventSource=EventSource:nn.isNode&&!n.EventSource&&typeof a<"u"&&(n.EventSource=a),this._httpClient=new R$(n.httpClient||new S$(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(t){if(t=t||Wn.Binary,Cn.isIn(t,Wn,"transferFormat"),this._logger.log(ae.Debug,`Starting connection with transfer format '${Wn[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(ae.Error,n),await this._stopPromise,Promise.reject(new ni(n))}else if(this._connectionState!=="Connected"){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(ae.Error,n),Promise.reject(new ni(n))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new ug(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(ae.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(ae.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(n=>{this._stopPromiseResolver=n}),await this._stopInternal(t),await this._stopPromise}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(ae.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(ae.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===Nn.WebSockets)this.transport=this._constructTransport(Nn.WebSockets),await this._startTransport(n,t);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let r=null,a=0;do{if(r=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new ni("The connection was stopped during negotiation.");if(r.error)throw new Error(r.error);if(r.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(r.url&&(n=r.url),r.accessToken){const s=r.accessToken;this._accessTokenFactory=()=>s,this._httpClient._accessToken=s,this._httpClient._accessTokenFactory=void 0}a++}while(r.url&&a<UE);if(a===UE&&r.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(n,this._options.transport,r,t)}this.transport instanceof PE&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(ae.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(r){return this._logger.log(ae.Error,"Failed to start the connection: "+r),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(r)}}async _getNegotiationResponse(t){const n={},[r,a]=hs();n[r]=a;const s=this._resolveNegotiateUrl(t);this._logger.log(ae.Debug,`Sending negotiation request: ${s}.`);try{const u=await this._httpClient.post(s,{content:"",headers:{...n,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(u.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${u.statusCode}'`));const f=JSON.parse(u.content);return(!f.negotiateVersion||f.negotiateVersion<1)&&(f.connectionToken=f.connectionId),f.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new DE("Client didn't negotiate Stateful Reconnect but the server did.")):f}catch(u){let f="Failed to complete negotiation with the server: "+u;return u instanceof pa&&u.statusCode===404&&(f=f+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(ae.Error,f),Promise.reject(new DE(f))}}_createConnectUrl(t,n){return n?t+(t.indexOf("?")===-1?"?":"&")+`id=${n}`:t}async _createTransport(t,n,r,a){let s=this._createConnectUrl(t,r.connectionToken);if(this._isITransport(n)){this._logger.log(ae.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=n,await this._startTransport(s,a),this.connectionId=r.connectionId;return}const u=[],f=r.availableTransports||[];let d=r;for(const h of f){const g=this._resolveTransportOrError(h,n,a,d?.useStatefulReconnect===!0);if(g instanceof Error)u.push(`${h.transport} failed:`),u.push(g);else if(this._isITransport(g)){if(this.transport=g,!d){try{d=await this._getNegotiationResponse(t)}catch(y){return Promise.reject(y)}s=this._createConnectUrl(t,d.connectionToken)}try{await this._startTransport(s,a),this.connectionId=d.connectionId;return}catch(y){if(this._logger.log(ae.Error,`Failed to start the transport '${h.transport}': ${y}`),d=void 0,u.push(new s$(`${h.transport} failed: ${y}`,Nn[h.transport])),this._connectionState!=="Connecting"){const b="Failed to select transport before stop() was called.";return this._logger.log(ae.Debug,b),Promise.reject(new ni(b))}}}}return u.length>0?Promise.reject(new l$(`Unable to connect to the server with any of the available transports. ${u.join(" ")}`,u)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case Nn.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new I$(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Nn.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new N$(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Nn.LongPolling:return new PE(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,n){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async r=>{let a=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(t,n),await this.features.resend()}catch{a=!0}else{this._stopConnection(r);return}a&&this._stopConnection(r)}:this.transport.onclose=r=>this._stopConnection(r),this.transport.connect(t,n)}_resolveTransportOrError(t,n,r,a){const s=Nn[t.transport];if(s==null)return this._logger.log(ae.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(D$(n,s))if(t.transferFormats.map(f=>Wn[f]).indexOf(r)>=0){if(s===Nn.WebSockets&&!this._options.WebSocket||s===Nn.ServerSentEvents&&!this._options.EventSource)return this._logger.log(ae.Debug,`Skipping transport '${Nn[s]}' because it is not supported in your environment.'`),new o$(`'${Nn[s]}' is not supported in your environment.`,s);this._logger.log(ae.Debug,`Selecting transport '${Nn[s]}'.`);try{return this.features.reconnect=s===Nn.WebSockets?a:void 0,this._constructTransport(s)}catch(f){return f}}else return this._logger.log(ae.Debug,`Skipping transport '${Nn[s]}' because it does not support the requested transfer format '${Wn[r]}'.`),new Error(`'${Nn[s]}' does not support ${Wn[r]}.`);else return this._logger.log(ae.Debug,`Skipping transport '${Nn[s]}' because it was disabled by the client.`),new a$(`'${Nn[s]}' is disabled by the client.`,s)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(ae.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(ae.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(ae.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(ae.Error,`Connection disconnected with error '${t}'.`):this._logger.log(ae.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(ae.Error,`TransportSendQueue.stop() threw error '${n}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(n){this._logger.log(ae.Error,`HttpConnection.onclose(${t}) threw error '${n}'.`)}}}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!nn.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const n=window.document.createElement("a");return n.href=t,this._logger.log(ae.Information,`Normalizing '${t}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(t){const n=new URL(t);n.pathname.endsWith("/")?n.pathname+="negotiate":n.pathname+="/negotiate";const r=new URLSearchParams(n.searchParams);return r.has("negotiateVersion")||r.append("negotiateVersion",this._negotiateVersion.toString()),r.has("useStatefulReconnect")?r.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&r.append("useStatefulReconnect","true"),n.search=r.toString(),n.toString()}}function D$(e,t){return!e||(t&e)!==0}class ug{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new Zf,this._transportResult=new Zf,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new Zf),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new Zf;const t=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):ug._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),t.resolve()}catch(r){t.reject(r)}}}static _concatBuffers(t){const n=t.map(s=>s.byteLength).reduce((s,u)=>s+u),r=new Uint8Array(n);let a=0;for(const s of t)r.set(new Uint8Array(s),a),a+=s.byteLength;return r.buffer}}class Zf{constructor(){this.promise=new Promise((t,n)=>[this._resolver,this._rejecter]=[t,n])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const B$="json";class z${constructor(){this.name=B$,this.version=2,this.transferFormat=Wn.Text}parseMessages(t,n){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];n===null&&(n=Jl.instance);const r=Er.parse(t),a=[];for(const s of r){const u=JSON.parse(s);if(typeof u.type!="number")throw new Error("Invalid payload.");switch(u.type){case qe.Invocation:this._isInvocationMessage(u);break;case qe.StreamItem:this._isStreamItemMessage(u);break;case qe.Completion:this._isCompletionMessage(u);break;case qe.Ping:break;case qe.Close:break;case qe.Ack:this._isAckMessage(u);break;case qe.Sequence:this._isSequenceMessage(u);break;default:n.log(ae.Information,"Unknown message type '"+u.type+"' ignored.");continue}a.push(u)}return a}writeMessage(t){return Er.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_isAckMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(t,n){if(typeof t!="string"||t==="")throw new Error(n)}}const L$={trace:ae.Trace,debug:ae.Debug,info:ae.Information,information:ae.Information,warn:ae.Warning,warning:ae.Warning,error:ae.Error,critical:ae.Critical,none:ae.None};function $$(e){const t=L$[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class P${configureLogging(t){if(Cn.isRequired(t,"logging"),U$(t))this.logger=t;else if(typeof t=="string"){const n=$$(t);this.logger=new Xf(n)}else this.logger=new Xf(t);return this}withUrl(t,n){return Cn.isRequired(t,"url"),Cn.isNotEmpty(t,"url"),this.url=t,typeof n=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...n}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:n},this}withHubProtocol(t){return Cn.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new $E(t):this.reconnectPolicy=t:this.reconnectPolicy=new $E,this}withServerTimeout(t){return Cn.isRequired(t,"milliseconds"),this._serverTimeoutInMilliseconds=t,this}withKeepAliveInterval(t){return Cn.isRequired(t,"milliseconds"),this._keepAliveIntervalInMilliseconds=t,this}withStatefulReconnect(t){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=t?.bufferSize,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new M$(this.url,t);return lg.create(n,this.logger||Jl.instance,this.protocol||new z$,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function U$(e){return e.log!==void 0}function j$({url:e,accessToken:t,autoStart:n=!0}){const r=N.useRef(null),a=N.useRef(new Map),s=N.useRef(null),u=N.useRef(0),f=N.useRef(!1),[d,h]=N.useState("disconnected"),[g,y]=N.useState(null),b=N.useCallback(()=>{s.current&&(clearTimeout(s.current),s.current=null)},[]),v=N.useCallback(()=>{if(f.current||s.current)return;u.current+=1;const R=u.current,$=Math.min(3e4,1e3*Math.pow(2,R-1)),H=Math.floor(Math.random()*500),V=$+H;s.current=setTimeout(()=>{s.current=null,w()},V)},[b]),x=N.useCallback(R=>{a.current.forEach(($,H)=>{R.off(H),$.forEach(V=>{R.on(H,V)})})},[]),E=N.useCallback(async()=>Lf(),[]),_=N.useCallback(()=>{const R=new P$().withUrl(e,{accessTokenFactory:async()=>{const $=vo()?.sessionToken;return $||await E()}}).withAutomaticReconnect({nextRetryDelayInMilliseconds:$=>$.elapsedMilliseconds<6e4?Math.random()*1e4:null}).build();return R.onreconnecting(()=>{b(),h("reconnecting")}),R.onreconnected(()=>{b(),u.current=0,h("connected"),x(R)}),R.onclose($=>{h("disconnected"),$&&y($),f.current||v()}),R},[e,E,x,b,v]),w=N.useCallback(async()=>{f.current=!1,b(),r.current||(r.current=_());const R=r.current;if(R.state===Nt.Connected){h("connected");return}if(R.state===Nt.Connecting){h("connecting");return}if(R.state===Nt.Reconnecting){h("reconnecting");return}h("connecting");try{await R.start(),x(R),u.current=0,h("connected"),y(null)}catch($){y($),h("disconnected"),v()}},[x,_,b,v]),O=N.useCallback(async()=>{f.current=!0,b(),u.current=0;const R=r.current;if(r.current=null,!R){h("disconnected");return}try{await R.stop()}finally{h("disconnected")}},[b]),T=N.useCallback((R,$)=>{let H=a.current.get(R);H||(H=new Set,a.current.set(R,H)),H.add($);const V=r.current;V&&V.on(R,$)},[]),A=N.useCallback((R,$)=>{const H=a.current.get(R);if(!H)return;H.delete($),H.size===0&&a.current.delete(R);const V=r.current;V&&V.off(R,$)},[]),M=N.useCallback(async(R,...$)=>{const H=r.current;if(!H||H.state!==Nt.Connected)throw new Error("SignalR not connected");return H.invoke(R,...$)},[]);return N.useEffect(()=>(n&&w(),()=>{O()}),[n,w,O]),{status:d,connected:d==="connected",error:g,start:w,stop:O,on:T,off:A,invoke:M}}const H$=(()=>{const e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype),Symbol.toStringTag).get;return t=>e.call(t)})();function Kf(e){return H$(e)==="Uint8Array"}function V$(e){return typeof e=="object"&&e!=null&&Symbol.toStringTag in e&&(e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer")}function F$(e){return e instanceof RegExp||Object.prototype.toString.call(e)==="[object RegExp]"}function jE(e){return typeof e=="object"&&e!=null&&Symbol.toStringTag in e&&e[Symbol.toStringTag]==="Map"}function G$(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function _r(e,t){return JSON.stringify(e,(n,r)=>typeof r=="bigint"?{$numberLong:`${r}`}:jE(r)?Object.fromEntries(r):r)}function q$(e){if(e!=null&&typeof e=="object"&&"stylize"in e&&typeof e.stylize=="function")return e.stylize}const cg=7,HE=Symbol.for("@@mdb.bson.version"),fg=2147483647,dg=-2147483648,VE=Math.pow(2,63)-1,FE=-Math.pow(2,63),Y$=Math.pow(2,53),X$=-Math.pow(2,53),GE=4;class be extends Error{get bsonError(){return!0}get name(){return"BSONError"}constructor(t,n){super(t,n)}static isBSONError(t){return t!=null&&typeof t=="object"&&"bsonError"in t&&t.bsonError===!0&&"name"in t&&"message"in t&&"stack"in t}}class Z$ extends be{get name(){return"BSONVersionError"}constructor(){super(`Unsupported BSON version, bson types must be from bson ${cg}.x.x`)}}class qE extends be{get name(){return"BSONRuntimeError"}constructor(t){super(t)}}class xo extends be{get name(){return"BSONOffsetError"}offset;constructor(t,n,r){super(`${t}. offset: ${n}`,r),this.offset=n}}let YE,XE;function ZE(e,t,n,r){if(r){YE??=new TextDecoder("utf8",{fatal:!0});try{return YE.decode(e.subarray(t,n))}catch(a){throw new be("Invalid UTF-8 string in BSON document",{cause:a})}}return XE??=new TextDecoder("utf8",{fatal:!1}),XE.decode(e.subarray(t,n))}function KE(e,t,n){if(e.length===0)return"";const r=n-t;if(r===0)return"";if(r>20)return null;if(r===1&&e[t]<128)return String.fromCharCode(e[t]);if(r===2&&e[t]<128&&e[t+1]<128)return String.fromCharCode(e[t])+String.fromCharCode(e[t+1]);if(r===3&&e[t]<128&&e[t+1]<128&&e[t+2]<128)return String.fromCharCode(e[t])+String.fromCharCode(e[t+1])+String.fromCharCode(e[t+2]);const a=[];for(let s=t;s<n;s++){const u=e[s];if(u>127)return null;a.push(u)}return String.fromCharCode(...a)}function K$(e,t,n){if(t.length===0)return 0;if(t.length>25||e.length-n<t.length)return null;for(let r=0,a=n;r<t.length;r++,a++){const s=t.charCodeAt(r);if(s>127)return null;e[a]=s}return t.length}function W$(e){return ri.fromNumberArray(Array.from({length:e},()=>Math.floor(Math.random()*256)))}function Q$(e){return crypto.getRandomValues(ri.allocate(e))}const J$=(()=>{const{crypto:e}=globalThis;return e!=null&&typeof e.getRandomValues=="function"?Q$:W$})(),ri={isUint8Array:Kf,toLocalBufferType(e){if(Buffer.isBuffer(e))return e;if(ArrayBuffer.isView(e))return Buffer.from(e.buffer,e.byteOffset,e.byteLength);const t=e?.[Symbol.toStringTag]??Object.prototype.toString.call(e);if(t==="ArrayBuffer"||t==="SharedArrayBuffer"||t==="[object ArrayBuffer]"||t==="[object SharedArrayBuffer]")return Buffer.from(e);throw new be("Cannot create Buffer from the passed potentialBuffer.")},allocate(e){return Buffer.alloc(e)},allocateUnsafe(e){return Buffer.allocUnsafe(e)},compare(e,t){return ri.toLocalBufferType(e).compare(t)},concat(e){return Buffer.concat(e)},equals(e,t){return ri.toLocalBufferType(e).equals(t)},fromNumberArray(e){return Buffer.from(e)},fromBase64(e){return Buffer.from(e,"base64")},fromUTF8(e){return Buffer.from(e,"utf8")},toBase64(e){return ri.toLocalBufferType(e).toString("base64")},fromISO88591(e){return Buffer.from(e,"binary")},toISO88591(e){return ri.toLocalBufferType(e).toString("binary")},fromHex(e){return Buffer.from(e,"hex")},toHex(e){return ri.toLocalBufferType(e).toString("hex")},toUTF8(e,t,n,r){const a=n-t<=20?KE(e,t,n):null;if(a!=null)return a;const s=ri.toLocalBufferType(e).toString("utf8",t,n);if(r){for(let u=0;u<s.length;u++)if(s.charCodeAt(u)===65533){ZE(e,t,n,!0);break}}return s},utf8ByteLength(e){return Buffer.byteLength(e,"utf8")},encodeUTF8Into(e,t,n){const r=K$(e,t,n);return r??ri.toLocalBufferType(e).write(t,n,void 0,"utf8")},randomBytes:J$,swap32(e){return ri.toLocalBufferType(e).swap32()}};function eP(){const{navigator:e}=globalThis;return typeof e=="object"&&e.product==="ReactNative"}function tP(e){if(e<0)throw new RangeError(`The argument 'byteLength' is invalid. Received ${e}`);return ya.fromNumberArray(Array.from({length:e},()=>Math.floor(Math.random()*256)))}const nP=(()=>{const{crypto:e}=globalThis;if(e!=null&&typeof e.getRandomValues=="function")return t=>e.getRandomValues(ya.allocate(t));if(eP()){const{console:t}=globalThis;t?.warn?.("BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.")}return tP})(),WE=/(\d|[a-f])/i,ya={isUint8Array:Kf,toLocalBufferType(e){const t=e?.[Symbol.toStringTag]??Object.prototype.toString.call(e);if(t==="Uint8Array")return e;if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));if(t==="ArrayBuffer"||t==="SharedArrayBuffer"||t==="[object ArrayBuffer]"||t==="[object SharedArrayBuffer]")return new Uint8Array(e);throw new be("Cannot make a Uint8Array from passed potentialBuffer.")},allocate(e){if(typeof e!="number")throw new TypeError(`The "size" argument must be of type number. Received ${String(e)}`);return new Uint8Array(e)},allocateUnsafe(e){return ya.allocate(e)},compare(e,t){if(e===t)return 0;const n=Math.min(e.length,t.length);for(let r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return e.length<t.length?-1:e.length>t.length?1:0},concat(e){if(e.length===0)return ya.allocate(0);let t=0;for(const a of e)t+=a.length;const n=ya.allocate(t);let r=0;for(const a of e)n.set(a,r),r+=a.length;return n},equals(e,t){if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0},fromNumberArray(e){return Uint8Array.from(e)},fromBase64(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))},fromUTF8(e){return new TextEncoder().encode(e)},toBase64(e){return btoa(ya.toISO88591(e))},fromISO88591(e){return Uint8Array.from(e,t=>t.charCodeAt(0)&255)},toISO88591(e){return Array.from(Uint16Array.from(e),t=>String.fromCharCode(t)).join("")},fromHex(e){const t=e.length%2===0?e:e.slice(0,e.length-1),n=[];for(let r=0;r<t.length;r+=2){const a=t[r],s=t[r+1];if(!WE.test(a)||!WE.test(s))break;const u=Number.parseInt(`${a}${s}`,16);n.push(u)}return Uint8Array.from(n)},toHex(e){return Array.from(e,t=>t.toString(16).padStart(2,"0")).join("")},toUTF8(e,t,n,r){const a=n-t<=20?KE(e,t,n):null;return a??ZE(e,t,n,r)},utf8ByteLength(e){return new TextEncoder().encode(e).byteLength},encodeUTF8Into(e,t,n){const r=new TextEncoder().encode(t);return e.set(r,n),r.byteLength},randomBytes:nP,swap32(e){if(e.length%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e.length;t+=4){const n=e[t],r=e[t+1],a=e[t+2],s=e[t+3];e[t]=s,e[t+1]=a,e[t+2]=r,e[t+3]=n}return e}},Be=typeof Buffer=="function"&&Buffer.prototype?._isBuffer!==!0?ri:ya,QE=Symbol.for("@@mdb.bson.type");class $r{get[QE](){return this._bsontype}get[HE](){return cg}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return this.inspect(t,n,r)}}const ps=new Float64Array(1),pt=new Uint8Array(ps.buffer,0,8);ps[0]=-1;const hg=pt[7]===0,va={isBigEndian:hg,getNonnegativeInt32LE(e,t){if(e[t+3]>127)throw new RangeError(`Size cannot be negative at offset: ${t}`);return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},getInt32LE(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},getUint32LE(e,t){return e[t]+e[t+1]*256+e[t+2]*65536+e[t+3]*16777216},getUint32BE(e,t){return e[t+3]+e[t+2]*256+e[t+1]*65536+e[t]*16777216},getBigInt64LE(e,t){const n=BigInt(e[t+4]+e[t+5]*256+e[t+6]*65536+(e[t+7]<<24)),r=BigInt(e[t]+e[t+1]*256+e[t+2]*65536+e[t+3]*16777216);return(n<<32n)+r},getFloat64LE:hg?(e,t)=>(pt[7]=e[t],pt[6]=e[t+1],pt[5]=e[t+2],pt[4]=e[t+3],pt[3]=e[t+4],pt[2]=e[t+5],pt[1]=e[t+6],pt[0]=e[t+7],ps[0]):(e,t)=>(pt[0]=e[t],pt[1]=e[t+1],pt[2]=e[t+2],pt[3]=e[t+3],pt[4]=e[t+4],pt[5]=e[t+5],pt[6]=e[t+6],pt[7]=e[t+7],ps[0]),setInt32BE(e,t,n){return e[t+3]=n,n>>>=8,e[t+2]=n,n>>>=8,e[t+1]=n,n>>>=8,e[t]=n,4},setInt32LE(e,t,n){return e[t]=n,n>>>=8,e[t+1]=n,n>>>=8,e[t+2]=n,n>>>=8,e[t+3]=n,4},setBigInt64LE(e,t,n){const r=0xffffffffn;let a=Number(n&r);e[t]=a,a>>=8,e[t+1]=a,a>>=8,e[t+2]=a,a>>=8,e[t+3]=a;let s=Number(n>>32n&r);return e[t+4]=s,s>>=8,e[t+5]=s,s>>=8,e[t+6]=s,s>>=8,e[t+7]=s,8},setFloat64LE:hg?(e,t,n)=>(ps[0]=n,e[t]=pt[7],e[t+1]=pt[6],e[t+2]=pt[5],e[t+3]=pt[4],e[t+4]=pt[3],e[t+5]=pt[2],e[t+6]=pt[1],e[t+7]=pt[0],8):(e,t,n)=>(ps[0]=n,e[t]=pt[0],e[t+1]=pt[1],e[t+2]=pt[2],e[t+3]=pt[3],e[t+4]=pt[4],e[t+5]=pt[5],e[t+6]=pt[6],e[t+7]=pt[7],8)};class ut extends $r{get _bsontype(){return"Binary"}static BSON_BINARY_SUBTYPE_DEFAULT=0;static BUFFER_SIZE=256;static SUBTYPE_DEFAULT=0;static SUBTYPE_FUNCTION=1;static SUBTYPE_BYTE_ARRAY=2;static SUBTYPE_UUID_OLD=3;static SUBTYPE_UUID=4;static SUBTYPE_MD5=5;static SUBTYPE_ENCRYPTED=6;static SUBTYPE_COLUMN=7;static SUBTYPE_SENSITIVE=8;static SUBTYPE_VECTOR=9;static SUBTYPE_USER_DEFINED=128;static VECTOR_TYPE=Object.freeze({Int8:3,Float32:39,PackedBit:16});buffer;sub_type;position;constructor(t,n){if(super(),t!=null&&typeof t=="string"&&!ArrayBuffer.isView(t)&&!V$(t)&&!Array.isArray(t))throw new be("Binary can only be constructed from Uint8Array or number[]");this.sub_type=n??ut.BSON_BINARY_SUBTYPE_DEFAULT,t==null?(this.buffer=Be.allocate(ut.BUFFER_SIZE),this.position=0):(this.buffer=Array.isArray(t)?Be.fromNumberArray(t):Be.toLocalBufferType(t),this.position=this.buffer.byteLength)}put(t){if(typeof t=="string"&&t.length!==1)throw new be("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new be("only accepts single character Uint8Array or Array");let n;if(typeof t=="string"?n=t.charCodeAt(0):typeof t=="number"?n=t:n=t[0],n<0||n>255)throw new be("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.byteLength>this.position)this.buffer[this.position++]=n;else{const r=Be.allocate(ut.BUFFER_SIZE+this.buffer.length);r.set(this.buffer,0),this.buffer=r,this.buffer[this.position++]=n}}write(t,n){if(n=typeof n=="number"?n:this.position,this.buffer.byteLength<n+t.length){const r=Be.allocate(this.buffer.byteLength+t.length);r.set(this.buffer,0),this.buffer=r}if(ArrayBuffer.isView(t))this.buffer.set(Be.toLocalBufferType(t),n),this.position=n+t.byteLength>this.position?n+t.length:this.position;else if(typeof t=="string")throw new be("input cannot be string")}read(t,n){n=n&&n>0?n:this.position;const r=t+n;return this.buffer.subarray(t,r>this.position?this.position:r)}value(){return this.buffer.length===this.position?this.buffer:this.buffer.subarray(0,this.position)}length(){return this.position}toJSON(){return Be.toBase64(this.buffer.subarray(0,this.position))}toString(t){return t==="hex"?Be.toHex(this.buffer.subarray(0,this.position)):t==="base64"?Be.toBase64(this.buffer.subarray(0,this.position)):t==="utf8"||t==="utf-8"?Be.toUTF8(this.buffer,0,this.position,!1):Be.toUTF8(this.buffer,0,this.position,!1)}toExtendedJSON(t){t=t||{},this.sub_type===ut.SUBTYPE_VECTOR&&Eo(this);const n=Be.toBase64(this.buffer),r=Number(this.sub_type).toString(16);return t.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}}toUUID(){if(this.sub_type===ut.SUBTYPE_UUID)return new ir(this.buffer.subarray(0,this.position));throw new be(`Binary sub_type "${this.sub_type}" is not supported for converting to UUID. Only "${ut.SUBTYPE_UUID}" is currently supported.`)}static createFromHexString(t,n){return new ut(Be.fromHex(t),n)}static createFromBase64(t,n){return new ut(Be.fromBase64(t),n)}static fromExtendedJSON(t,n){n=n||{};let r,a;if("$binary"in t?n.legacy&&typeof t.$binary=="string"&&"$type"in t?(a=t.$type?parseInt(t.$type,16):0,r=Be.fromBase64(t.$binary)):typeof t.$binary!="string"&&(a=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=Be.fromBase64(t.$binary.base64)):"$uuid"in t&&(a=4,r=ir.bytesFromString(t.$uuid)),!r)throw new be(`Unexpected Binary Extended JSON format ${JSON.stringify(t)}`);return a===GE?new ir(r):new ut(r,a)}inspect(t,n,r){r??=_r;const a=Be.toBase64(this.buffer.subarray(0,this.position)),s=r(a,n),u=r(this.sub_type,n);return`Binary.createFromBase64(${s}, ${u})`}toInt8Array(){if(this.sub_type!==ut.SUBTYPE_VECTOR)throw new be("Binary sub_type is not Vector");if(this.buffer[0]!==ut.VECTOR_TYPE.Int8)throw new be("Binary datatype field is not Int8");return Eo(this),new Int8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}toFloat32Array(){if(this.sub_type!==ut.SUBTYPE_VECTOR)throw new be("Binary sub_type is not Vector");if(this.buffer[0]!==ut.VECTOR_TYPE.Float32)throw new be("Binary datatype field is not Float32");Eo(this);const t=new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position));return va.isBigEndian&&Be.swap32(t),new Float32Array(t.buffer)}toPackedBits(){if(this.sub_type!==ut.SUBTYPE_VECTOR)throw new be("Binary sub_type is not Vector");if(this.buffer[0]!==ut.VECTOR_TYPE.PackedBit)throw new be("Binary datatype field is not packed bit");return Eo(this),new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}toBits(){if(this.sub_type!==ut.SUBTYPE_VECTOR)throw new be("Binary sub_type is not Vector");if(this.buffer[0]!==ut.VECTOR_TYPE.PackedBit)throw new be("Binary datatype field is not packed bit");Eo(this);const n=(this.length()-2)*8-this.buffer[1],r=new Int8Array(n);for(let a=0;a<r.length;a++){const s=a/8|0,u=this.buffer[s+2],f=7-a%8,d=u>>f&1;r[a]=d}return r}static fromInt8Array(t){const n=Be.allocate(t.byteLength+2);n[0]=ut.VECTOR_TYPE.Int8,n[1]=0;const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);n.set(r,2);const a=new this(n,this.SUBTYPE_VECTOR);return Eo(a),a}static fromFloat32Array(t){const n=Be.allocate(t.byteLength+2);n[0]=ut.VECTOR_TYPE.Float32,n[1]=0;const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);n.set(r,2),va.isBigEndian&&Be.swap32(new Uint8Array(n.buffer,2));const a=new this(n,this.SUBTYPE_VECTOR);return Eo(a),a}static fromPackedBits(t,n=0){const r=Be.allocate(t.byteLength+2);r[0]=ut.VECTOR_TYPE.PackedBit,r[1]=n,r.set(t,2);const a=new this(r,this.SUBTYPE_VECTOR);return Eo(a),a}static fromBits(t){const n=t.length+7>>>3,r=new Uint8Array(n+2);r[0]=ut.VECTOR_TYPE.PackedBit;const a=t.length%8;r[1]=a===0?0:8-a;for(let s=0;s<t.length;s++){const u=s>>>3,f=t[s];if(f!==0&&f!==1)throw new be(`Invalid bit value at ${s}: must be 0 or 1, found ${t[s]}`);if(f===0)continue;const d=7-s%8;r[u+2]|=f<<d}return new this(r,ut.SUBTYPE_VECTOR)}}function Eo(e){if(e.sub_type!==ut.SUBTYPE_VECTOR)return;const t=e.position,n=e.buffer[0],r=e.buffer[1];if((n===ut.VECTOR_TYPE.Float32||n===ut.VECTOR_TYPE.Int8)&&r!==0)throw new be("Invalid Vector: padding must be zero for int8 and float32 vectors");if(n===ut.VECTOR_TYPE.Float32&&t!==0&&t-2!==0&&(t-2)%4!==0)throw new be("Invalid Vector: Float32 vector must contain a multiple of 4 bytes");if(n===ut.VECTOR_TYPE.PackedBit&&r!==0&&t===2)throw new be("Invalid Vector: padding must be zero for packed bit vectors that are empty");if(n===ut.VECTOR_TYPE.PackedBit&&r>7)throw new be(`Invalid Vector: padding must be a value between 0 and 7. found: ${r}`)}const pg=16,rP=/^[0-9A-F]{32}$/i,iP=/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;class ir extends ut{constructor(t){let n;if(t==null)n=ir.generate();else if(t instanceof ir)n=Be.toLocalBufferType(new Uint8Array(t.buffer));else if(ArrayBuffer.isView(t)&&t.byteLength===pg)n=Be.toLocalBufferType(t);else if(typeof t=="string")n=ir.bytesFromString(t);else throw new be("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");super(n,GE)}get id(){return this.buffer}set id(t){this.buffer=t}toHexString(t=!0){return t?[Be.toHex(this.buffer.subarray(0,4)),Be.toHex(this.buffer.subarray(4,6)),Be.toHex(this.buffer.subarray(6,8)),Be.toHex(this.buffer.subarray(8,10)),Be.toHex(this.buffer.subarray(10,16))].join("-"):Be.toHex(this.buffer)}toString(t){return t==="hex"?Be.toHex(this.id):t==="base64"?Be.toBase64(this.id):this.toHexString()}toJSON(){return this.toHexString()}equals(t){if(!t)return!1;if(t instanceof ir)return Be.equals(t.id,this.id);try{return Be.equals(new ir(t).id,this.id)}catch{return!1}}toBinary(){return new ut(this.id,ut.SUBTYPE_UUID)}static generate(){const t=Be.randomBytes(pg);return t[6]=t[6]&15|64,t[8]=t[8]&63|128,t}static isValid(t){return t?typeof t=="string"?ir.isValidUUIDString(t):Kf(t)?t.byteLength===pg:t._bsontype==="Binary"&&t.sub_type===this.SUBTYPE_UUID&&t.buffer.byteLength===16:!1}static createFromHexString(t){const n=ir.bytesFromString(t);return new ir(n)}static createFromBase64(t){return new ir(Be.fromBase64(t))}static bytesFromString(t){if(!ir.isValidUUIDString(t))throw new be("UUID string representation must be 32 hex digits or canonical hyphenated representation");return Be.fromHex(t.replace(/-/g,""))}static isValidUUIDString(t){return rP.test(t)||iP.test(t)}inspect(t,n,r){return r??=_r,`new UUID(${r(this.toHexString(),n)})`}}class tu extends $r{get _bsontype(){return"Code"}code;scope;constructor(t,n){super(),this.code=t.toString(),this.scope=n??null}toJSON(){return this.scope!=null?{code:this.code,scope:this.scope}:{code:this.code}}toExtendedJSON(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}}static fromExtendedJSON(t){return new tu(t.$code,t.$scope)}inspect(t,n,r){r??=_r;let a=r(this.code,n);const s=a.includes(`
|
|
169
|
+
`},a),s}function uL(e,t){return e&&"run"in e?async function(n,r){const a=CE(n,{file:r,...t});await e.run(a,r)}:function(n,r){return CE(n,{file:r,...e||t})}}function TE(e){if(e)throw e}var Zm,AE;function cL(){if(AE)return Zm;AE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,a=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},s=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var g=e.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!y)return!1;var b;for(b in h);return typeof b>"u"||e.call(h,b)},u=function(h,g){n&&g.name==="__proto__"?n(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},f=function(h,g){if(g==="__proto__")if(e.call(h,g)){if(r)return r(h,g).value}else return;return h[g]};return Zm=function d(){var h,g,y,b,v,x,E=arguments[0],_=1,w=arguments.length,O=!1;for(typeof E=="boolean"&&(O=E,E=arguments[1]||{},_=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});_<w;++_)if(h=arguments[_],h!=null)for(g in h)y=f(E,g),b=f(h,g),E!==b&&(O&&b&&(s(b)||(v=a(b)))?(v?(v=!1,x=y&&a(y)?y:[]):x=y&&s(y)?y:{},u(E,{name:g,newValue:d(O,x,b)})):typeof b<"u"&&u(E,{name:g,newValue:b}));return E},Zm}var fL=cL();const Km=Ku(fL);function Wm(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dL(){const e=[],t={run:n,use:r};return t;function n(...a){let s=-1;const u=a.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);f(null,...a);function f(d,...h){const g=e[++s];let y=-1;if(d){u(d);return}for(;++y<a.length;)(h[y]===null||h[y]===void 0)&&(h[y]=a[y]);a=h,g?hL(g,f)(...h):u(null,...h)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function hL(e,t){let n;return r;function r(...u){const f=e.length>u.length;let d;f&&u.push(a);try{d=e.apply(this,u)}catch(h){const g=h;if(f&&n)throw g;return a(g)}f||(d&&d.then&&typeof d.then=="function"?d.then(s,a):d instanceof Error?a(d):s(d))}function a(u,...f){n||(n=!0,t(u,...f))}function s(u){a(null,u)}}const Ti={basename:pL,dirname:mL,extname:gL,join:yL,sep:"/"};function pL(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ql(e);let n=0,r=-1,a=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(s){n=a+1;break}}else r<0&&(s=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,f=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(s){n=a+1;break}}else u<0&&(s=!0,u=a+1),f>-1&&(e.codePointAt(a)===t.codePointAt(f--)?f<0&&(r=a):(f=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function mL(e){if(Ql(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gL(e){Ql(e);let t=e.length,n=-1,r=0,a=-1,s=0,u;for(;t--;){const f=e.codePointAt(t);if(f===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),f===46?a<0?a=t:s!==1&&(s=1):a>-1&&(s=-1)}return a<0||n<0||s===0||s===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function yL(...e){let t=-1,n;for(;++t<e.length;)Ql(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":vL(n)}function vL(e){Ql(e);const t=e.codePointAt(0)===47;let n=bL(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function bL(e,t){let n="",r=0,a=-1,s=0,u=-1,f,d;for(;++u<=e.length;){if(u<e.length)f=e.codePointAt(u);else{if(f===47)break;f=47}if(f===47){if(!(a===u-1||s===1))if(a!==u-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),a=u,s=0;continue}}else if(n.length>0){n="",r=0,a=u,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,u):n=e.slice(a+1,u),r=u-a-1;a=u,s=0}else f===46&&s>-1?s++:s=-1}return n}function Ql(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const SL={cwd:xL};function xL(){return"/"}function Qm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function EL(e){if(typeof e=="string")e=new URL(e);else if(!Qm(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return _L(e)}function _L(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const Jm=["history","path","basename","stem","extname","dirname"];class kE{constructor(t){let n;t?Qm(t)?n={path:t}:typeof t=="string"||wL(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":SL.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Jm.length;){const s=Jm[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let a;for(a in n)Jm.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Ti.basename(this.path):void 0}set basename(t){tg(t,"basename"),eg(t,"basename"),this.path=Ti.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ti.dirname(this.path):void 0}set dirname(t){RE(this.basename,"dirname"),this.path=Ti.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ti.extname(this.path):void 0}set extname(t){if(eg(t,"extname"),RE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ti.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qm(t)&&(t=EL(t)),tg(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ti.basename(this.path,this.extname):void 0}set stem(t){tg(t,"stem"),eg(t,"stem"),this.path=Ti.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new Kn(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function eg(e,t){if(e&&e.includes(Ti.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ti.sep+"`")}function tg(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function RE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function wL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const CL=(function(e){const r=this.constructor.prototype,a=r[e],s=function(){return a.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),TL={}.hasOwnProperty;class ng extends CL{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=dL()}copy(){const t=new ng;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Km(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(og("data",this.frozen),this.namespace[t]=n,this):TL.call(this.namespace,t)&&this.namespace[t]||void 0:t?(og("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=qf(t),r=this.parser||this.Parser;return rg("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),rg("process",this.parser||this.Parser),ig("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(s,u){const f=qf(t),d=r.parse(f);r.run(d,f,function(g,y,b){if(g||!y||!b)return h(g);const v=y,x=r.stringify(v,b);RL(x)?b.value=x:b.result=x,h(g,b)});function h(g,y){g||!y?u(g):s?s(y):n(void 0,y)}}}processSync(t){let n=!1,r;return this.freeze(),rg("processSync",this.parser||this.Parser),ig("processSync",this.compiler||this.Compiler),this.process(t,a),NE("processSync","process",n),r;function a(s,u){n=!0,TE(s),r=u}}run(t,n,r){OE(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(u,f){const d=qf(n);a.run(t,d,h);function h(g,y,b){const v=y||t;g?f(g):u?u(v):r(void 0,v,b)}}}runSync(t,n){let r=!1,a;return this.run(t,n,s),NE("runSync","run",r),a;function s(u,f){TE(u),a=f,r=!0}}stringify(t,n){this.freeze();const r=qf(n),a=this.compiler||this.Compiler;return ig("stringify",a),OE(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(og("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...y]=h;d(g,y)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(h.plugins),h.settings&&(a.settings=Km(!0,a.settings,h.settings))}function f(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const y=h[g];s(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,g){let y=-1,b=-1;for(;++y<r.length;)if(r[y][0]===h){b=y;break}if(b===-1)r.push([h,...g]);else if(g.length>0){let[v,...x]=g;const E=r[b][1];Wm(E)&&Wm(v)&&(v=Km(!0,E,v)),r[b]=[h,v,...x]}}}}const AL=new ng().freeze();function rg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ig(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function og(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function OE(e){if(!Wm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function NE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function qf(e){return kL(e)?e:new kE(e)}function kL(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function RL(e){return typeof e=="string"||OL(e)}function OL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NL="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",IE=[],ME={allowDangerousHtml:!0},IL=/^(https?|ircs?|mailto|xmpp)$/i,ML=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function DL(e){const t=BL(e),n=zL(e);return LL(t.runSync(t.parse(n),n),e)}function BL(e){const t=e.rehypePlugins||IE,n=e.remarkPlugins||IE,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ME}:ME;return AL().use(pz).use(n).use(uL,r).use(t)}function zL(e){const t=e.children||"",n=new kE;return typeof t=="string"&&(n.value=t),n}function LL(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,s=t.disallowedElements,u=t.skipHtml,f=t.unwrapDisallowed,d=t.urlTransform||$L;for(const g of ML)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+NL+g.id,void 0);return _E(e,h),nD(e,{Fragment:L.Fragment,components:a,ignoreInvalidStyle:!0,jsx:L.jsx,jsxs:L.jsxs,passKeys:!0,passNode:!0});function h(g,y,b){if(g.type==="raw"&&b&&typeof y=="number")return u?b.children.splice(y,1):b.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let v;for(v in Bm)if(Object.hasOwn(Bm,v)&&Object.hasOwn(g.properties,v)){const x=g.properties[v],E=Bm[v];(E===null||E.includes(g.tagName))&&(g.properties[v]=d(String(x||""),v,g))}}if(g.type==="element"){let v=n?!n.includes(g.tagName):s?s.includes(g.tagName):!1;if(!v&&r&&typeof y=="number"&&(v=!r(g,y,b)),v&&b&&typeof y=="number")return f&&g.children?b.children.splice(y,1,...g.children):b.children.splice(y,1),y}}}function $L(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||IL.test(e.slice(0,t))?e:""}function PL({msg:e,isMe:t,showSeenIndicator:n,isSeen:r,send:a}){const s=Xa(),u=t?s.palette.primary.main:s.palette.background.paper,f=t?s.palette.primary.contrastText:s.palette.text.primary;return L.jsxs(yn,{sx:{maxWidth:"78%"},children:[L.jsxs(yn,{sx:{wordBreak:"break-word",position:"relative",px:1.4,py:1.05,borderRadius:3,border:"1px solid",borderColor:s.palette.divider,backgroundColor:u,color:f,boxShadow:t?"0 10px 30px rgba(25,118,210,.22)":"0 10px 30px rgba(0,0,0,.10)",whiteSpace:"normal",overflow:"visible","& p":{margin:0,lineHeight:1.35},"& p + p":{marginTop:"6px"},"& ol, & ul":{margin:"6px 0",paddingLeft:"20px"},"& li":{margin:"2px 0"},"& li > p":{margin:0},"& a":{color:"inherit",textDecoration:"underline"},"& code":{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:"0.9em",padding:"2px 6px",borderRadius:8,backgroundColor:t?"rgba(255,255,255,.14)":"rgba(0,0,0,.06)"},"& pre":{margin:0,marginTop:8,padding:12,overflow:"auto",borderRadius:12,backgroundColor:t?"rgba(255,255,255,.12)":"rgba(0,0,0,.05)"}},children:[L.jsx(yn,{sx:{position:"absolute",top:14,width:10,height:10,transform:"rotate(45deg)",backgroundColor:u,right:t?-5:"auto",left:t?"auto":-5,zIndex:1,pointerEvents:"none"}}),L.jsx(DL,{children:e.text})]}),n?L.jsx(ti,{sx:{mt:.35,fontSize:12,textAlign:"right",color:r?"text.secondary":"text.disabled"},children:r?"Seen":"Sent"}):null,e.status==="failed"?L.jsxs(yn,{sx:{mt:.1,display:"flex",gap:1,alignItems:"center"},children:[L.jsx(ti,{variant:"caption",color:"error",children:e.errorText}),L.jsx(Cl,{sx:{p:0},size:"small",color:"primary",onClick:()=>a({id:e.id,role:"user",content:e.text}),children:L.jsx(w6,{sx:{fontSize:18}})})]}):null]},"container"+e.id)}function UL({msg:e,isMe:t}){return L.jsxs(yn,{children:[L.jsx(Pc,{sx:{width:30,height:30,mt:.25,bgcolor:"primary.main"},children:L.jsx(Em,{sx:{fontSize:18}})}),e.sentAt&&L.jsx(yn,{sx:{display:"flex",justifyContent:t?"flex-end":"flex-start",mt:.5},children:L.jsx(ti,{variant:"caption",sx:{color:"text.secondary",fontSize:11},children:e.sentAt})})]},"asistent"+e.id)}function jL({msg:e,isMe:t}){return L.jsxs(yn,{children:[L.jsx(Pc,{sx:{width:30,height:30,mt:.25,bgcolor:"grey.900"},children:L.jsx(_6,{sx:{fontSize:18}})}),e.sentAt&&L.jsx(yn,{sx:{display:"flex",justifyContent:t?"flex-end":"flex-start",mt:.5},children:L.jsx(ti,{variant:"caption",sx:{color:"text.secondary",fontSize:11},children:e.sentAt})})]},"sentAt"+e.id)}const HL=Jn.memo(function({msgs:t,isMessageSeen:n,endRef:r,reSend:a}){return L.jsxs(L.Fragment,{children:[t.map((s,u)=>{const f=s.role==="User",{showSeenIndicator:d,isSeen:h}=n(u,f,t,s);return L.jsxs(yn,{sx:{display:"flex",justifyContent:f?"flex-end":"flex-start",gap:1,mb:1.2,overflowAnchor:"none"},children:[!f&&L.jsx(UL,{msg:s,isMe:f}),L.jsx(PL,{msg:s,isMe:f,showSeenIndicator:d,isSeen:h,send:a}),f&&L.jsx(jL,{msg:s,isMe:f})]},s.id)}),L.jsx("div",{ref:r})]})});function VL(e){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}function FL(e){return/^[0-9]{6}$/.test(e)}const GL=async e=>{const t=da(),n=vo();if(n==null)throw new Error("Missing config");if(t==null)throw new Error("Conversation id is missing");const r=await fa(n.apiBaseUrl+ax+`/${n.clientId}/start`,{method:"POST",headers:{"Content-Type":"application/json","X-Conversation-Id":t},body:JSON.stringify(e)});if(!r.ok)throw new Error("Somethig happend on the request");return await r.json()},qL=async e=>{const t=da(),n=vo();if(n==null)throw new Error("Missing config");if(t==null)throw new Error("Conversation id is missing");const r=await fa(n.apiBaseUrl+ax+`/${n.clientId}/confirm`,{method:"POST",headers:{"Content-Type":"application/json","X-Conversation-Id":t},body:JSON.stringify(e)});if(!r.ok)throw new Error("Somethig happend on the request");return await r.json()},YL=({request:e,onValidationSuccess:t})=>{const[n,r]=N.useState(""),[a,s]=N.useState(""),[u,f]=N.useState(!0),d=g=>{if(!FL(n)){f(!1);return}qL({requestId:e?.requestId||"",code:n}).then(y=>{if(y.verified){t();return}s(y.failureReason)})},h=()=>a||null;return L.jsxs(Fc,{spacing:1,sx:{position:"relative",p:2,bgcolor:"background.paper",borderRadius:2,boxShadow:"0 4px 12px rgba(0,0,0,.1)",maxWidth:380,mb:2,display:"flex",flexDirection:"column",alignItems:"center"},children:[L.jsxs(ti,{variant:"body1",align:"center",gutterBottom:!0,sx:{wordBreak:"break-word"},children:["Introdu codul primit la ",e?.contact]}),L.jsx(Ip,{focused:!0,fullWidth:!0,size:"small",value:n,onChange:g=>{r(g.target.value),f(!0)},error:h()!=null,helperText:h()}),L.jsx(Uc,{variant:"outlined",color:"primary",onClick:d,children:"Trimite codul"})]})},XL=({setRequest:e,setDisplayOtpForm:t})=>{const[n,r]=N.useState(""),[a,s]=N.useState(!0),u=async f=>{if(!VL(n)){s(!1);return}GL({channel:"email",value:n}).then(d=>{e(d),t(!0)})};return L.jsxs(Fc,{spacing:1,sx:{position:"relative",p:2,bgcolor:"background.paper",borderRadius:2,boxShadow:"0 4px 12px rgba(0,0,0,.1)",maxWidth:380,mb:2,display:"flex",flexDirection:"column",alignItems:"center"},children:[L.jsx(ti,{variant:"h6",gutterBottom:!0,children:"Introdu adresa de email"}),L.jsx(Ip,{focused:!0,fullWidth:!0,size:"small",value:n,onChange:f=>{r(f.target.value),s(!0)},error:!a,helperText:a?void 0:"Adresa de email nu este validă"}),L.jsx(Uc,{variant:"outlined",color:"primary",onClick:u,children:"Trimite"}),L.jsx(ti,{variant:"body2",color:"text.secondary",children:"Vom trimite un cod de verificare la aceasta."})]})},ZL=({verificationRequest:e,send:t,setToolCallEvents:n})=>{const[r,a]=N.useState(!1),[s,u]=N.useState(),f=N.useCallback(()=>{const d=e.delta;t({role:"tool",toolCallId:e.toolCallId,content:JSON.stringify({approval_id:d.request.approval_id,approved:!0}),id:""})},[]);return L.jsx(L.Fragment,{children:r?L.jsx(YL,{request:s,onValidationSuccess:f}):L.jsx(XL,{setDisplayOtpForm:a,setRequest:u})})},KL="request_verification",WL=({toolCallEvents:e,setToolCallEvents:t,send:n})=>{const[r,a]=N.useState("email");if(!e)return null;const s=e.filter(u=>u.toolCallName==KL)[0];return s&&r==="email"?L.jsx(ZL,{verificationRequest:s,send:n,setToolCallEvents:t}):null},QL=()=>L.jsxs(yn,{sx:{display:"flex",alignItems:"flex-end",gap:1,mb:1.2},children:[L.jsx(Pc,{sx:{width:30,height:30,bgcolor:"primary.main"},children:L.jsx(Em,{sx:{fontSize:18}})}),L.jsxs(yn,{sx:{px:1.4,py:1.1,borderRadius:3,border:"1px solid",borderColor:"divider",bgcolor:"background.paper",boxShadow:"0 10px 30px rgba(0,0,0,.10)",display:"flex",alignItems:"center",gap:.6},children:[L.jsx(yn,{sx:{width:6,height:6,borderRadius:999,bgcolor:"text.secondary",animation:"dot 1.1s infinite ease-in-out","@keyframes dot":{"0%, 80%, 100%":{transform:"scale(0.6)",opacity:.4},"40%":{transform:"scale(1)",opacity:1}}}}),L.jsx(yn,{sx:{width:6,height:6,borderRadius:999,bgcolor:"text.secondary",animation:"dot 1.1s infinite ease-in-out",animationDelay:"0.15s","@keyframes dot":{"0%, 80%, 100%":{transform:"scale(0.6)",opacity:.4},"40%":{transform:"scale(1)",opacity:1}}}}),L.jsx(yn,{sx:{width:6,height:6,borderRadius:999,bgcolor:"text.secondary",animation:"dot 1.1s infinite ease-in-out",animationDelay:"0.3s","@keyframes dot":{"0%, 80%, 100%":{transform:"scale(0.6)",opacity:.4},"40%":{transform:"scale(1)",opacity:1}}}})]})]}),JL={display:"flex",flexDirection:"column",flex:1,minHeight:0,overflow:"auto",px:1.5,pt:1.5,backgroundImage:"radial-gradient(circle at 20% 10%, rgba(25,118,210,.10), transparent 45%),radial-gradient(circle at 80% 20%, rgba(156,39,176,.10), transparent 50%),radial-gradient(circle at 40% 90%, rgba(0,200,83,.08), transparent 45%)","&::-webkit-scrollbar":{width:10},"&::-webkit-scrollbar-thumb":{backgroundColor:"rgba(0,0,0,.18)",borderRadius:999,border:"3px solid transparent",backgroundClip:"content-box"}};function e$({msgs:e,isMessageSeen:t,send:n,sending:r,items:a,endRef:s,toolCallEvents:u,setToolCallEvents:f}){return L.jsxs(yn,{sx:JL,children:[L.jsx(HL,{msgs:e,isMessageSeen:t,reSend:n}),L.jsx("div",{style:{paddingBottom:2},children:r&&L.jsx(QL,{})}),a.map(d=>L.jsx(E6,{error:d.message,onClose:()=>Bf.getState().remove(d.id)},d.id)),L.jsx(WL,{toolCallEvents:u,setToolCallEvents:f,send:n}),L.jsx(iI,{ref:s,href:"https://x-bot.ro",target:"_blank",rel:"noreferrer",underline:"none",sx:{pb:1,marginTop:"auto",alignSelf:"center",fontSize:12,color:"text.secondary",opacity:.75,"&:hover":{opacity:1,color:"text.primary"},justifyContent:"center"},children:"Chat oferit de X-bot.ro"})]})}function t$({inputRef:e,input:t,sending:n,setInput:r,send:a}){return L.jsx(yn,{sx:{p:1.25,borderTop:"1px solid",borderColor:"divider",display:"flex",gap:1,bgcolor:"background.paper",flexShrink:0},children:L.jsx(Ip,{inputRef:e,focused:!0,size:"small",fullWidth:!0,value:t,disabled:n||t.length>=Q5,onChange:s=>r(s.target.value),onKeyDown:s=>{s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),a())},placeholder:"Scrie un mesaj",multiline:!0,maxRows:4,sx:{"& .MuiOutlinedInput-root":{borderRadius:3,pr:.75,backgroundColor:"rgba(0,0,0,.02)"}},InputProps:{endAdornment:L.jsx(Cl,{size:"small",onClick:()=>a(),disabled:n||!t.trim(),sx:{ml:.5,borderRadius:999},children:L.jsx(C6,{})})}})})}const n$=async e=>{const t=da(),n=vo();if(n==null)throw new Error("Missing config");if(t==null)throw new Error("Conversation id is missing");await fa(n.apiBaseUrl+Hl+`/${n.clientId}/conversation-status`,{method:"POST",headers:{"Content-Type":"application/json","X-Conversation-Id":t},body:JSON.stringify(e)})};function r$({open:e,setOpen:t,msgs:n,input:r,setInput:a,sending:s,send:u,anchorSx:f,conversationMode:d,setConversationStatus:h,toolCallEvents:g,setToolCallEvents:y}){const b=Bf(O=>O.items),v=N.useRef(null),x=N.useRef(null),E=Xa(),_=ZI(E.breakpoints.down("md"));b6(),N.useEffect(()=>{x.current?.scrollIntoView({behavior:"smooth",block:"end"}),requestAnimationFrame(()=>v.current?.focus())},[n.length,s]),N.useEffect(()=>{e&&x.current?.scrollIntoView({behavior:"auto",block:"end"})},[e]),N.useEffect(()=>{if(!(e&&_))return;const O=window.scrollY;return document.body.style.position="fixed",document.body.style.top=`-${O}px`,document.body.style.left="0",document.body.style.right="0",document.body.style.width="100%",()=>{document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.width="",window.scrollTo(0,O)}},[e,_]);const w=N.useCallback((O,T,A,M)=>{const R=O===A.length-1,$=A[A.length-1],H=R&&T&&$?.seen,V=H&&$?.id===M.id;return{showSeenIndicator:H,isSeen:V}},[]);return L.jsxs(yn,{sx:f,children:[!e&&L.jsx(Uc,{variant:"contained",onClick:()=>t(!0),startIcon:L.jsx(y6,{}),sx:{borderRadius:999,px:2,py:1,textTransform:"none",boxShadow:"0 10px 30px rgba(0,0,0,.18)"},children:"Chat"}),e&&L.jsx(Rc,{elevation:_?0:10,sx:{width:_?"100vw":380,height:_?"calc(var(--vh, 1vh) * 100)":560,"@supports (height: 100dvh)":{height:_?"100dvh":560},maxWidth:"100vw",maxHeight:"100dvh",borderRadius:_?0:4,position:_?"fixed":"relative",inset:_?0:"auto",overflow:"hidden",border:_?"none":"1px solid",borderColor:"divider",boxShadow:_?"none":"0 18px 60px rgba(0,0,0,.28)"},children:L.jsxs(yn,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[L.jsx(x6,{isMobile:_,conversationMode:d,setOpen:t}),L.jsx(e$,{msgs:n,isMessageSeen:w,send:u,sending:s,items:b,endRef:x,toolCallEvents:g,setToolCallEvents:y}),d==="Human"&&L.jsx(i$,{conversationMode:d,setConversationStatus:h}),L.jsx(t$,{inputRef:v,input:r,sending:s,setInput:a,send:u})]})})]})}const i$=({conversationMode:e,setConversationStatus:t})=>L.jsx(Rc,{elevation:0,sx:{mx:2,mt:1.5,mb:1,px:2,py:1.5,border:"1px solid",borderColor:"divider",borderRadius:3,bgcolor:"background.paper",boxShadow:"0 6px 18px rgba(15, 23, 42, 0.04)"},children:L.jsxs(Fc,{direction:{xs:"column",sm:"row"},spacing:1.5,alignItems:{xs:"center",sm:"flex-start"},justifyContent:"space-between",children:[L.jsxs(Fc,{direction:"row",spacing:1,alignItems:"center",flexWrap:"wrap",children:[L.jsx(vN,{size:"small",icon:e==="Human"?L.jsx(A6,{}):L.jsx(T6,{}),label:e==="Human"?"Operator activ":"Asistent activ",color:e==="Human"?"warning":"success",variant:"outlined",sx:{height:28,borderRadius:2,"& .MuiChip-label":{px:1.25,fontWeight:600}}}),L.jsx(ti,{variant:"body2",color:"text.secondary",children:e==="Human"?"Puteți reveni oricând la asistentul virtual.":"Asistentul răspunde automat mesajelor."})]}),e==="Human"&&L.jsx(Uc,{variant:"contained",size:"small",onClick:async()=>{await n$("Bot"),t({mode:"Bot",state:"AI_ACTIVE"})},sx:{px:2.5,py:1.1,borderRadius:2.5,textTransform:"none",fontWeight:700,boxShadow:"0 8px 24px rgba(25, 118, 210, 0.18)","&:hover":{boxShadow:"0 10px 28px rgba(25, 118, 210, 0.24)"}},children:"Revino la asistentul virtual"})]})});class pa extends Error{constructor(t,n){const r=new.target.prototype;super(`${t}: Status code '${n}'`),this.statusCode=n,this.__proto__=r}}class ag extends Error{constructor(t="A timeout occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class ni extends Error{constructor(t="An abort occurred."){const n=new.target.prototype;super(t),this.__proto__=n}}class o$ extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=r}}class a$ extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=r}}class s$ extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=r}}class DE extends Error{constructor(t){const n=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class l$ extends Error{constructor(t,n){const r=new.target.prototype;super(t),this.innerErrors=n,this.__proto__=r}}class BE{constructor(t,n,r){this.statusCode=t,this.statusText=n,this.content=r}}class Yf{get(t,n){return this.send({...n,method:"GET",url:t})}post(t,n){return this.send({...n,method:"POST",url:t})}delete(t,n){return this.send({...n,method:"DELETE",url:t})}getCookieString(t){return""}}var ae;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(ae||(ae={}));class Jl{constructor(){}log(t,n){}}Jl.instance=new Jl;const u$="10.0.0";class Cn{static isRequired(t,n){if(t==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(t,n){if(!t||t.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(t,n,r){if(!(t in n))throw new Error(`Unknown ${r} value: ${t}.`)}}class nn{static get isBrowser(){return!nn.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!nn.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!nn.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function eu(e,t){let n="";return ma(e)?(n=`Binary data of length ${e.byteLength}`,t&&(n+=`. Content: '${c$(e)}'`)):typeof e=="string"&&(n=`String data of length ${e.length}`,t&&(n+=`. Content: '${e}'`)),n}function c$(e){const t=new Uint8Array(e);let n="";return t.forEach(r=>{const a=r<16?"0":"";n+=`0x${a}${r.toString(16)} `}),n.substring(0,n.length-1)}function ma(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function zE(e,t,n,r,a,s){const u={},[f,d]=ps();u[f]=d,e.log(ae.Trace,`(${t} transport) sending data. ${eu(a,s.logMessageContent)}.`);const h=ma(a)?"arraybuffer":"text",g=await n.post(r,{content:a,headers:{...u,...s.headers},responseType:h,timeout:s.timeout,withCredentials:s.withCredentials});e.log(ae.Trace,`(${t} transport) request complete. Response status: ${g.statusCode}.`)}function f$(e){return e===void 0?new Xf(ae.Information):e===null?Jl.instance:e.log!==void 0?e:new Xf(e)}class d${constructor(t,n){this._subject=t,this._observer=n}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class Xf{constructor(t){this._minLevel=t,this.out=console}log(t,n){if(t>=this._minLevel){const r=`[${new Date().toISOString()}] ${ae[t]}: ${n}`;switch(t){case ae.Critical:case ae.Error:this.out.error(r);break;case ae.Warning:this.out.warn(r);break;case ae.Information:this.out.info(r);break;default:this.out.log(r);break}}}}function ps(){let e="X-SignalR-User-Agent";return nn.isNode&&(e="User-Agent"),[e,h$(u$,p$(),g$(),m$())]}function h$(e,t,n,r){let a="Microsoft SignalR/";const s=e.split(".");return a+=`${s[0]}.${s[1]}`,a+=` (${e}; `,t&&t!==""?a+=`${t}; `:a+="Unknown OS; ",a+=`${n}`,r?a+=`; ${r}`:a+="; Unknown Runtime Version",a+=")",a}function p$(){if(nn.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function m$(){if(nn.isNode)return process.versions.node}function g$(){return nn.isNode?"NodeJS":"Browser"}function sg(e){return e.stack?e.stack:e.message?e.message:`${e}`}function y$(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class v$ extends Yf{constructor(t){if(super(),this._logger=t,typeof fetch>"u"||nn.isNode){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=n("node-fetch"):this._fetchType=fetch,this._fetchType=n("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(y$());if(typeof AbortController>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=n("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new ni;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const n=new this._abortControllerType;let r;t.abortSignal&&(t.abortSignal.onabort=()=>{n.abort(),r=new ni});let a=null;if(t.timeout){const d=t.timeout;a=setTimeout(()=>{n.abort(),this._logger.log(ae.Warning,"Timeout from HTTP request."),r=new ag},d)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},ma(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");let s;try{s=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(d){throw r||(this._logger.log(ae.Warning,`Error from HTTP request. ${d}.`),d)}finally{a&&clearTimeout(a),t.abortSignal&&(t.abortSignal.onabort=null)}if(!s.ok){const d=await LE(s,"text");throw new pa(d||s.statusText,s.status)}const f=await LE(s,t.responseType);return new BE(s.status,s.statusText,f)}getCookieString(t){let n="";return nn.isNode&&this._jar&&this._jar.getCookies(t,(r,a)=>n=a.join("; ")),n}}function LE(e,t){let n;switch(t){case"arraybuffer":n=e.arrayBuffer();break;case"text":n=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`);default:n=e.text();break}return n}class b$ extends Yf{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new ni):t.method?t.url?new Promise((n,r)=>{const a=new XMLHttpRequest;a.open(t.method,t.url,!0),a.withCredentials=t.withCredentials===void 0?!0:t.withCredentials,a.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(ma(t.content)?a.setRequestHeader("Content-Type","application/octet-stream"):a.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const s=t.headers;s&&Object.keys(s).forEach(u=>{a.setRequestHeader(u,s[u])}),t.responseType&&(a.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{a.abort(),r(new ni)}),t.timeout&&(a.timeout=t.timeout),a.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),a.status>=200&&a.status<300?n(new BE(a.status,a.statusText,a.response||a.responseText)):r(new pa(a.response||a.responseText||a.statusText,a.status))},a.onerror=()=>{this._logger.log(ae.Warning,`Error from HTTP request. ${a.status}: ${a.statusText}.`),r(new pa(a.statusText,a.status))},a.ontimeout=()=>{this._logger.log(ae.Warning,"Timeout from HTTP request."),r(new ag)},a.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class S$ extends Yf{constructor(t){if(super(),typeof fetch<"u"||nn.isNode)this._httpClient=new v$(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new b$(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new ni):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class Er{static write(t){return`${t}${Er.RecordSeparator}`}static parse(t){if(t[t.length-1]!==Er.RecordSeparator)throw new Error("Message is incomplete.");const n=t.split(Er.RecordSeparator);return n.pop(),n}}Er.RecordSeparatorCode=30,Er.RecordSeparator=String.fromCharCode(Er.RecordSeparatorCode);class x${writeHandshakeRequest(t){return Er.write(JSON.stringify(t))}parseHandshakeResponse(t){let n,r;if(ma(t)){const f=new Uint8Array(t),d=f.indexOf(Er.RecordSeparatorCode);if(d===-1)throw new Error("Message is incomplete.");const h=d+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(f.slice(0,h))),r=f.byteLength>h?f.slice(h).buffer:null}else{const f=t,d=f.indexOf(Er.RecordSeparator);if(d===-1)throw new Error("Message is incomplete.");const h=d+1;n=f.substring(0,h),r=f.length>h?f.substring(h):null}const a=Er.parse(n),s=JSON.parse(a[0]);if(s.type)throw new Error("Expected a handshake response from the server.");return[r,s]}}var qe;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close",e[e.Ack=8]="Ack",e[e.Sequence=9]="Sequence"})(qe||(qe={}));class E${constructor(){this.observers=[]}next(t){for(const n of this.observers)n.next(t)}error(t){for(const n of this.observers)n.error&&n.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new d$(this,t)}}class _${constructor(t,n,r){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=t,this._connection=n,this._bufferSize=r}async _send(t){const n=this._protocol.writeMessage(t);let r=Promise.resolve();if(this._isInvocationMessage(t)){this._totalMessageCount++;let a=()=>{},s=()=>{};ma(n)?this._bufferedByteCount+=n.byteLength:this._bufferedByteCount+=n.length,this._bufferedByteCount>=this._bufferSize&&(r=new Promise((u,f)=>{a=u,s=f})),this._messages.push(new w$(n,this._totalMessageCount,a,s))}try{this._reconnectInProgress||await this._connection.send(n)}catch{this._disconnected()}await r}_ack(t){let n=-1;for(let r=0;r<this._messages.length;r++){const a=this._messages[r];if(a._id<=t.sequenceId)n=r,ma(a._message)?this._bufferedByteCount-=a._message.byteLength:this._bufferedByteCount-=a._message.length,a._resolver();else if(this._bufferedByteCount<this._bufferSize)a._resolver();else break}n!==-1&&(this._messages=this._messages.slice(n+1))}_shouldProcessMessage(t){if(this._waitForSequenceMessage)return t.type!==qe.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(t))return!0;const n=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,n<=this._latestReceivedSequenceId?(n===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=n,this._ackTimer(),!0)}_resetSequence(t){if(t.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=t.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const t=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:qe.Sequence,sequenceId:t}));const n=this._messages;for(const r of n)await this._connection.send(r._message);this._reconnectInProgress=!1}_dispose(t){t??(t=new Error("Unable to reconnect to server."));for(const n of this._messages)n._rejector(t)}_isInvocationMessage(t){switch(t.type){case qe.Invocation:case qe.StreamItem:case qe.Completion:case qe.StreamInvocation:case qe.CancelInvocation:return!0;case qe.Close:case qe.Sequence:case qe.Ping:case qe.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:qe.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class w${constructor(t,n,r,a){this._message=t,this._id=n,this._resolver=r,this._rejector=a}}const C$=30*1e3,T$=15*1e3,A$=1e5;var Nt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(Nt||(Nt={}));class lg{static create(t,n,r,a,s,u,f){return new lg(t,n,r,a,s,u,f)}constructor(t,n,r,a,s,u,f){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(ae.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Cn.isRequired(t,"connection"),Cn.isRequired(n,"logger"),Cn.isRequired(r,"protocol"),this.serverTimeoutInMilliseconds=s??C$,this.keepAliveIntervalInMilliseconds=u??T$,this._statefulReconnectBufferSize=f??A$,this._logger=n,this._protocol=r,this.connection=t,this._reconnectPolicy=a,this._handshakeProtocol=new x$,this.connection.onreceive=d=>this._processIncomingData(d),this.connection.onclose=d=>this._connectionClosed(d),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Nt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:qe.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==Nt.Disconnected&&this._connectionState!==Nt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Nt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Nt.Connecting,this._logger.log(ae.Debug,"Starting HubConnection.");try{await this._startInternal(),nn.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Nt.Connected,this._connectionStarted=!0,this._logger.log(ae.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=Nt.Disconnected,this._logger.log(ae.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((n,r)=>{this._handshakeResolver=n,this._handshakeRejecter=r});await this.connection.start(this._protocol.transferFormat);try{let n=this._protocol.version;this.connection.features.reconnect||(n=1);const r={protocol:this._protocol.name,version:n};if(this._logger.log(ae.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(r)),this._logger.log(ae.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.reconnect&&(this._messageBuffer=new _$(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(ae.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const t=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){if(this._connectionState===Nt.Disconnected)return this._logger.log(ae.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===Nt.Disconnecting)return this._logger.log(ae.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const n=this._connectionState;return this._connectionState=Nt.Disconnecting,this._logger.log(ae.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(ae.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(n===Nt.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new ni("The connection was stopped before the hub handshake could complete."),this.connection.stop(t))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(t,...n){const[r,a]=this._replaceStreamingParams(n),s=this._createStreamInvocation(t,n,a);let u;const f=new E$;return f.cancelCallback=()=>{const d=this._createCancelInvocation(s.invocationId);return delete this._callbacks[s.invocationId],u.then(()=>this._sendWithProtocol(d))},this._callbacks[s.invocationId]=(d,h)=>{if(h){f.error(h);return}else d&&(d.type===qe.Completion?d.error?f.error(new Error(d.error)):f.complete():f.next(d.item))},u=this._sendWithProtocol(s).catch(d=>{f.error(d),delete this._callbacks[s.invocationId]}),this._launchStreams(r,u),f}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._messageBuffer?this._messageBuffer._send(t):this._sendMessage(this._protocol.writeMessage(t))}send(t,...n){const[r,a]=this._replaceStreamingParams(n),s=this._sendWithProtocol(this._createInvocation(t,n,!0,a));return this._launchStreams(r,s),s}invoke(t,...n){const[r,a]=this._replaceStreamingParams(n),s=this._createInvocation(t,n,!1,a);return new Promise((f,d)=>{this._callbacks[s.invocationId]=(g,y)=>{if(y){d(y);return}else g&&(g.type===qe.Completion?g.error?d(new Error(g.error)):f(g.result):d(new Error(`Unexpected message type: ${g.type}`)))};const h=this._sendWithProtocol(s).catch(g=>{d(g),delete this._callbacks[s.invocationId]});this._launchStreams(r,h)})}on(t,n){!t||!n||(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(n)===-1&&this._methods[t].push(n))}off(t,n){if(!t)return;t=t.toLowerCase();const r=this._methods[t];if(r)if(n){const a=r.indexOf(n);a!==-1&&(r.splice(a,1),r.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const n=this._protocol.parseMessages(t,this._logger);for(const r of n)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(r)))switch(r.type){case qe.Invocation:this._invokeClientMethod(r).catch(a=>{this._logger.log(ae.Error,`Invoke client method threw error: ${sg(a)}`)});break;case qe.StreamItem:case qe.Completion:{const a=this._callbacks[r.invocationId];if(a){r.type===qe.Completion&&delete this._callbacks[r.invocationId];try{a(r)}catch(s){this._logger.log(ae.Error,`Stream callback threw error: ${sg(s)}`)}}break}case qe.Ping:break;case qe.Close:{this._logger.log(ae.Information,"Close message received from server.");const a=r.error?new Error("Server returned an error on close: "+r.error):void 0;r.allowReconnect===!0?this.connection.stop(a):this._stopPromise=this._stopInternal(a);break}case qe.Ack:this._messageBuffer&&this._messageBuffer._ack(r);break;case qe.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(r);break;default:this._logger.log(ae.Warning,`Invalid message type: ${r.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let n,r;try{[r,n]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(a){const s="Error parsing handshake response: "+a;this._logger.log(ae.Error,s);const u=new Error(s);throw this._handshakeRejecter(u),u}if(n.error){const a="Server returned handshake error: "+n.error;this._logger.log(ae.Error,a);const s=new Error(a);throw this._handshakeRejecter(s),s}else this._logger.log(ae.Debug,"Server handshake complete.");return this._handshakeResolver(),r}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let t=this._nextKeepAlive-new Date().getTime();if(t<0){this._connectionState===Nt.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===Nt.Connected&&await this._trySendPingMessage()},t))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const n=t.target.toLowerCase(),r=this._methods[n];if(!r){this._logger.log(ae.Warning,`No client method with the name '${n}' found.`),t.invocationId&&(this._logger.log(ae.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)));return}const a=r.slice(),s=!!t.invocationId;let u,f,d;for(const h of a)try{const g=u;u=await h.apply(this,t.arguments),s&&u&&g&&(this._logger.log(ae.Error,`Multiple results provided for '${n}'. Sending error to server.`),d=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),f=void 0}catch(g){f=g,this._logger.log(ae.Error,`A callback for the method '${n}' threw error '${g}'.`)}d?await this._sendWithProtocol(d):s?(f?d=this._createCompletionMessage(t.invocationId,`${f}`,null):u!==void 0?d=this._createCompletionMessage(t.invocationId,null,u):(this._logger.log(ae.Warning,`No result given for '${n}' method and invocation ID '${t.invocationId}'.`),d=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(d)):u&&this._logger.log(ae.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(ae.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new ni("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Nt.Disconnecting?this._completeClose(t):this._connectionState===Nt.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===Nt.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=Nt.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(t??new Error("Connection closed.")),this._messageBuffer=void 0),nn.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[t]))}catch(n){this._logger.log(ae.Error,`An onclose callback called with error '${t}' threw error '${n}'.`)}}}async _reconnect(t){const n=Date.now();let r=0,a=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),s=this._getNextRetryDelay(r,0,a);if(s===null){this._logger.log(ae.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=Nt.Reconnecting,t?this._logger.log(ae.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(ae.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(u=>u.apply(this,[t]))}catch(u){this._logger.log(ae.Error,`An onreconnecting callback called with error '${t}' threw error '${u}'.`)}if(this._connectionState!==Nt.Reconnecting){this._logger.log(ae.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;s!==null;){if(this._logger.log(ae.Information,`Reconnect attempt number ${r+1} will start in ${s} ms.`),await new Promise(u=>{this._reconnectDelayHandle=setTimeout(u,s)}),this._reconnectDelayHandle=void 0,this._connectionState!==Nt.Reconnecting){this._logger.log(ae.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=Nt.Connected,this._logger.log(ae.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(u=>u.apply(this,[this.connection.connectionId]))}catch(u){this._logger.log(ae.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${u}'.`)}return}catch(u){if(this._logger.log(ae.Information,`Reconnect attempt failed because of error '${u}'.`),this._connectionState!==Nt.Reconnecting){this._logger.log(ae.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===Nt.Disconnecting&&this._completeClose();return}r++,a=u instanceof Error?u:new Error(u.toString()),s=this._getNextRetryDelay(r,Date.now()-n,a)}}this._logger.log(ae.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${r} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,n,r){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:t,retryReason:r})}catch(a){return this._logger.log(ae.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${n}) threw error '${a}'.`),null}}_cancelCallbacksWithError(t){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(r=>{const a=n[r];try{a(null,t)}catch(s){this._logger.log(ae.Error,`Stream 'error' callback called with '${t}' threw error: ${sg(s)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,n,r,a){if(r)return a.length!==0?{target:t,arguments:n,streamIds:a,type:qe.Invocation}:{target:t,arguments:n,type:qe.Invocation};{const s=this._invocationId;return this._invocationId++,a.length!==0?{target:t,arguments:n,invocationId:s.toString(),streamIds:a,type:qe.Invocation}:{target:t,arguments:n,invocationId:s.toString(),type:qe.Invocation}}}_launchStreams(t,n){if(t.length!==0){n||(n=Promise.resolve());for(const r in t)t[r].subscribe({complete:()=>{n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r)))},error:a=>{let s;a instanceof Error?s=a.message:a&&a.toString?s=a.toString():s="Unknown error",n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r,s)))},next:a=>{n=n.then(()=>this._sendWithProtocol(this._createStreamItemMessage(r,a)))}})}}_replaceStreamingParams(t){const n=[],r=[];for(let a=0;a<t.length;a++){const s=t[a];if(this._isObservable(s)){const u=this._invocationId;this._invocationId++,n[u]=s,r.push(u.toString()),t.splice(a,1)}}return[n,r]}_isObservable(t){return t&&t.subscribe&&typeof t.subscribe=="function"}_createStreamInvocation(t,n,r){const a=this._invocationId;return this._invocationId++,r.length!==0?{target:t,arguments:n,invocationId:a.toString(),streamIds:r,type:qe.StreamInvocation}:{target:t,arguments:n,invocationId:a.toString(),type:qe.StreamInvocation}}_createCancelInvocation(t){return{invocationId:t,type:qe.CancelInvocation}}_createStreamItemMessage(t,n){return{invocationId:t,item:n,type:qe.StreamItem}}_createCompletionMessage(t,n,r){return n?{error:n,invocationId:t,type:qe.Completion}:{invocationId:t,result:r,type:qe.Completion}}_createCloseMessage(){return{type:qe.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const k$=[0,2e3,1e4,3e4,null];class $E{constructor(t){this._retryDelays=t!==void 0?[...t,null]:k$}nextRetryDelayInMilliseconds(t){return this._retryDelays[t.previousRetryCount]}}class ga{}ga.Authorization="Authorization",ga.Cookie="Cookie";class R$ extends Yf{constructor(t,n){super(),this._innerClient=t,this._accessTokenFactory=n}async send(t){let n=!0;this._accessTokenFactory&&(!this._accessToken||t.url&&t.url.indexOf("/negotiate?")>0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const r=await this._innerClient.send(t);return n&&r.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):r}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[ga.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[ga.Authorization]&&delete t.headers[ga.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Nn;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Nn||(Nn={}));var Wn;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(Wn||(Wn={}));let O$=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class PE{get pollAborted(){return this._pollAbort.aborted}constructor(t,n,r){this._httpClient=t,this._logger=n,this._pollAbort=new O$,this._options=r,this._running=!1,this.onreceive=null,this.onclose=null}async connect(t,n){if(Cn.isRequired(t,"url"),Cn.isRequired(n,"transferFormat"),Cn.isIn(n,Wn,"transferFormat"),this._url=t,this._logger.log(ae.Trace,"(LongPolling transport) Connecting."),n===Wn.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[r,a]=ps(),s={[r]:a,...this._options.headers},u={abortSignal:this._pollAbort.signal,headers:s,timeout:1e5,withCredentials:this._options.withCredentials};n===Wn.Binary&&(u.responseType="arraybuffer");const f=`${t}&_=${Date.now()}`;this._logger.log(ae.Trace,`(LongPolling transport) polling: ${f}.`);const d=await this._httpClient.get(f,u);d.statusCode!==200?(this._logger.log(ae.Error,`(LongPolling transport) Unexpected response code: ${d.statusCode}.`),this._closeError=new pa(d.statusText||"",d.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,u)}async _poll(t,n){try{for(;this._running;)try{const r=`${t}&_=${Date.now()}`;this._logger.log(ae.Trace,`(LongPolling transport) polling: ${r}.`);const a=await this._httpClient.get(r,n);a.statusCode===204?(this._logger.log(ae.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):a.statusCode!==200?(this._logger.log(ae.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new pa(a.statusText||"",a.statusCode),this._running=!1):a.content?(this._logger.log(ae.Trace,`(LongPolling transport) data received. ${eu(a.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(a.content)):this._logger.log(ae.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(r){this._running?r instanceof ag?this._logger.log(ae.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=r,this._running=!1):this._logger.log(ae.Trace,`(LongPolling transport) Poll errored after shutdown: ${r.message}`)}}finally{this._logger.log(ae.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?zE(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(ae.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(ae.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[n,r]=ps();t[n]=r;const a={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let s;try{await this._httpClient.delete(this._url,a)}catch(u){s=u}s?s instanceof pa&&(s.statusCode===404?this._logger.log(ae.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(ae.Trace,`(LongPolling transport) Error sending a DELETE request: ${s}`)):this._logger.log(ae.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(ae.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(ae.Trace,t),this.onclose(this._closeError)}}}class N${constructor(t,n,r,a){this._httpClient=t,this._accessToken=n,this._logger=r,this._options=a,this.onreceive=null,this.onclose=null}async connect(t,n){return Cn.isRequired(t,"url"),Cn.isRequired(n,"transferFormat"),Cn.isIn(n,Wn,"transferFormat"),this._logger.log(ae.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((r,a)=>{let s=!1;if(n!==Wn.Text){a(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let u;if(nn.isBrowser||nn.isWebWorker)u=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const f=this._httpClient.getCookieString(t),d={};d.Cookie=f;const[h,g]=ps();d[h]=g,u=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...d,...this._options.headers}})}try{u.onmessage=f=>{if(this.onreceive)try{this._logger.log(ae.Trace,`(SSE transport) data received. ${eu(f.data,this._options.logMessageContent)}.`),this.onreceive(f.data)}catch(d){this._close(d);return}},u.onerror=f=>{s?this._close():a(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},u.onopen=()=>{this._logger.log(ae.Information,`SSE connected to ${this._url}`),this._eventSource=u,s=!0,r()}}catch(f){a(f);return}})}async send(t){return this._eventSource?zE(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class I${constructor(t,n,r,a,s,u){this._logger=r,this._accessTokenFactory=n,this._logMessageContent=a,this._webSocketConstructor=s,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=u}async connect(t,n){Cn.isRequired(t,"url"),Cn.isRequired(n,"transferFormat"),Cn.isIn(n,Wn,"transferFormat"),this._logger.log(ae.Trace,"(WebSockets transport) Connecting.");let r;return this._accessTokenFactory&&(r=await this._accessTokenFactory()),new Promise((a,s)=>{t=t.replace(/^http/,"ws");let u;const f=this._httpClient.getCookieString(t);let d=!1;if(nn.isNode||nn.isReactNative){const h={},[g,y]=ps();h[g]=y,r&&(h[ga.Authorization]=`Bearer ${r}`),f&&(h[ga.Cookie]=f),u=new this._webSocketConstructor(t,void 0,{headers:{...h,...this._headers}})}else r&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(r)}`);u||(u=new this._webSocketConstructor(t)),n===Wn.Binary&&(u.binaryType="arraybuffer"),u.onopen=h=>{this._logger.log(ae.Information,`WebSocket connected to ${t}.`),this._webSocket=u,d=!0,a()},u.onerror=h=>{let g=null;typeof ErrorEvent<"u"&&h instanceof ErrorEvent?g=h.error:g="There was an error with the transport",this._logger.log(ae.Information,`(WebSockets transport) ${g}.`)},u.onmessage=h=>{if(this._logger.log(ae.Trace,`(WebSockets transport) data received. ${eu(h.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(h.data)}catch(g){this._close(g);return}},u.onclose=h=>{if(d)this._close(h);else{let g=null;typeof ErrorEvent<"u"&&h instanceof ErrorEvent?g=h.error:g="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",s(new Error(g))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(ae.Trace,`(WebSockets transport) sending data. ${eu(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(ae.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(t)&&(t.wasClean===!1||t.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)):t instanceof Error?this.onclose(t):this.onclose())}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}const UE=100;class M${constructor(t,n={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Cn.isRequired(t,"url"),this._logger=f$(n.logger),this.baseUrl=this._resolveUrl(t),n=n||{},n.logMessageContent=n.logMessageContent===void 0?!1:n.logMessageContent,typeof n.withCredentials=="boolean"||n.withCredentials===void 0)n.withCredentials=n.withCredentials===void 0?!0:n.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");n.timeout=n.timeout===void 0?100*1e3:n.timeout;let r=null,a=null;if(nn.isNode&&typeof require<"u"){const s=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=s("ws"),a=s("eventsource")}!nn.isNode&&typeof WebSocket<"u"&&!n.WebSocket?n.WebSocket=WebSocket:nn.isNode&&!n.WebSocket&&r&&(n.WebSocket=r),!nn.isNode&&typeof EventSource<"u"&&!n.EventSource?n.EventSource=EventSource:nn.isNode&&!n.EventSource&&typeof a<"u"&&(n.EventSource=a),this._httpClient=new R$(n.httpClient||new S$(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(t){if(t=t||Wn.Binary,Cn.isIn(t,Wn,"transferFormat"),this._logger.log(ae.Debug,`Starting connection with transfer format '${Wn[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(ae.Error,n),await this._stopPromise,Promise.reject(new ni(n))}else if(this._connectionState!=="Connected"){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(ae.Error,n),Promise.reject(new ni(n))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new ug(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(ae.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(ae.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(n=>{this._stopPromiseResolver=n}),await this._stopInternal(t),await this._stopPromise}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(ae.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(ae.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===Nn.WebSockets)this.transport=this._constructTransport(Nn.WebSockets),await this._startTransport(n,t);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let r=null,a=0;do{if(r=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new ni("The connection was stopped during negotiation.");if(r.error)throw new Error(r.error);if(r.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(r.url&&(n=r.url),r.accessToken){const s=r.accessToken;this._accessTokenFactory=()=>s,this._httpClient._accessToken=s,this._httpClient._accessTokenFactory=void 0}a++}while(r.url&&a<UE);if(a===UE&&r.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(n,this._options.transport,r,t)}this.transport instanceof PE&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(ae.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(r){return this._logger.log(ae.Error,"Failed to start the connection: "+r),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(r)}}async _getNegotiationResponse(t){const n={},[r,a]=ps();n[r]=a;const s=this._resolveNegotiateUrl(t);this._logger.log(ae.Debug,`Sending negotiation request: ${s}.`);try{const u=await this._httpClient.post(s,{content:"",headers:{...n,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(u.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${u.statusCode}'`));const f=JSON.parse(u.content);return(!f.negotiateVersion||f.negotiateVersion<1)&&(f.connectionToken=f.connectionId),f.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new DE("Client didn't negotiate Stateful Reconnect but the server did.")):f}catch(u){let f="Failed to complete negotiation with the server: "+u;return u instanceof pa&&u.statusCode===404&&(f=f+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(ae.Error,f),Promise.reject(new DE(f))}}_createConnectUrl(t,n){return n?t+(t.indexOf("?")===-1?"?":"&")+`id=${n}`:t}async _createTransport(t,n,r,a){let s=this._createConnectUrl(t,r.connectionToken);if(this._isITransport(n)){this._logger.log(ae.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=n,await this._startTransport(s,a),this.connectionId=r.connectionId;return}const u=[],f=r.availableTransports||[];let d=r;for(const h of f){const g=this._resolveTransportOrError(h,n,a,d?.useStatefulReconnect===!0);if(g instanceof Error)u.push(`${h.transport} failed:`),u.push(g);else if(this._isITransport(g)){if(this.transport=g,!d){try{d=await this._getNegotiationResponse(t)}catch(y){return Promise.reject(y)}s=this._createConnectUrl(t,d.connectionToken)}try{await this._startTransport(s,a),this.connectionId=d.connectionId;return}catch(y){if(this._logger.log(ae.Error,`Failed to start the transport '${h.transport}': ${y}`),d=void 0,u.push(new s$(`${h.transport} failed: ${y}`,Nn[h.transport])),this._connectionState!=="Connecting"){const b="Failed to select transport before stop() was called.";return this._logger.log(ae.Debug,b),Promise.reject(new ni(b))}}}}return u.length>0?Promise.reject(new l$(`Unable to connect to the server with any of the available transports. ${u.join(" ")}`,u)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case Nn.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new I$(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Nn.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new N$(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Nn.LongPolling:return new PE(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,n){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async r=>{let a=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(t,n),await this.features.resend()}catch{a=!0}else{this._stopConnection(r);return}a&&this._stopConnection(r)}:this.transport.onclose=r=>this._stopConnection(r),this.transport.connect(t,n)}_resolveTransportOrError(t,n,r,a){const s=Nn[t.transport];if(s==null)return this._logger.log(ae.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(D$(n,s))if(t.transferFormats.map(f=>Wn[f]).indexOf(r)>=0){if(s===Nn.WebSockets&&!this._options.WebSocket||s===Nn.ServerSentEvents&&!this._options.EventSource)return this._logger.log(ae.Debug,`Skipping transport '${Nn[s]}' because it is not supported in your environment.'`),new o$(`'${Nn[s]}' is not supported in your environment.`,s);this._logger.log(ae.Debug,`Selecting transport '${Nn[s]}'.`);try{return this.features.reconnect=s===Nn.WebSockets?a:void 0,this._constructTransport(s)}catch(f){return f}}else return this._logger.log(ae.Debug,`Skipping transport '${Nn[s]}' because it does not support the requested transfer format '${Wn[r]}'.`),new Error(`'${Nn[s]}' does not support ${Wn[r]}.`);else return this._logger.log(ae.Debug,`Skipping transport '${Nn[s]}' because it was disabled by the client.`),new a$(`'${Nn[s]}' is disabled by the client.`,s)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(ae.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(ae.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(ae.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(ae.Error,`Connection disconnected with error '${t}'.`):this._logger.log(ae.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(ae.Error,`TransportSendQueue.stop() threw error '${n}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(n){this._logger.log(ae.Error,`HttpConnection.onclose(${t}) threw error '${n}'.`)}}}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!nn.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const n=window.document.createElement("a");return n.href=t,this._logger.log(ae.Information,`Normalizing '${t}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(t){const n=new URL(t);n.pathname.endsWith("/")?n.pathname+="negotiate":n.pathname+="/negotiate";const r=new URLSearchParams(n.searchParams);return r.has("negotiateVersion")||r.append("negotiateVersion",this._negotiateVersion.toString()),r.has("useStatefulReconnect")?r.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&r.append("useStatefulReconnect","true"),n.search=r.toString(),n.toString()}}function D$(e,t){return!e||(t&e)!==0}class ug{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new Zf,this._transportResult=new Zf,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new Zf),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new Zf;const t=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):ug._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),t.resolve()}catch(r){t.reject(r)}}}static _concatBuffers(t){const n=t.map(s=>s.byteLength).reduce((s,u)=>s+u),r=new Uint8Array(n);let a=0;for(const s of t)r.set(new Uint8Array(s),a),a+=s.byteLength;return r.buffer}}class Zf{constructor(){this.promise=new Promise((t,n)=>[this._resolver,this._rejecter]=[t,n])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const B$="json";class z${constructor(){this.name=B$,this.version=2,this.transferFormat=Wn.Text}parseMessages(t,n){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];n===null&&(n=Jl.instance);const r=Er.parse(t),a=[];for(const s of r){const u=JSON.parse(s);if(typeof u.type!="number")throw new Error("Invalid payload.");switch(u.type){case qe.Invocation:this._isInvocationMessage(u);break;case qe.StreamItem:this._isStreamItemMessage(u);break;case qe.Completion:this._isCompletionMessage(u);break;case qe.Ping:break;case qe.Close:break;case qe.Ack:this._isAckMessage(u);break;case qe.Sequence:this._isSequenceMessage(u);break;default:n.log(ae.Information,"Unknown message type '"+u.type+"' ignored.");continue}a.push(u)}return a}writeMessage(t){return Er.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_isAckMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(t){if(typeof t.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(t,n){if(typeof t!="string"||t==="")throw new Error(n)}}const L$={trace:ae.Trace,debug:ae.Debug,info:ae.Information,information:ae.Information,warn:ae.Warning,warning:ae.Warning,error:ae.Error,critical:ae.Critical,none:ae.None};function $$(e){const t=L$[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class P${configureLogging(t){if(Cn.isRequired(t,"logging"),U$(t))this.logger=t;else if(typeof t=="string"){const n=$$(t);this.logger=new Xf(n)}else this.logger=new Xf(t);return this}withUrl(t,n){return Cn.isRequired(t,"url"),Cn.isNotEmpty(t,"url"),this.url=t,typeof n=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...n}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:n},this}withHubProtocol(t){return Cn.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new $E(t):this.reconnectPolicy=t:this.reconnectPolicy=new $E,this}withServerTimeout(t){return Cn.isRequired(t,"milliseconds"),this._serverTimeoutInMilliseconds=t,this}withKeepAliveInterval(t){return Cn.isRequired(t,"milliseconds"),this._keepAliveIntervalInMilliseconds=t,this}withStatefulReconnect(t){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=t?.bufferSize,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new M$(this.url,t);return lg.create(n,this.logger||Jl.instance,this.protocol||new z$,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function U$(e){return e.log!==void 0}function j$({url:e,accessToken:t,autoStart:n=!0}){const r=N.useRef(null),a=N.useRef(new Map),s=N.useRef(null),u=N.useRef(0),f=N.useRef(!1),[d,h]=N.useState("disconnected"),[g,y]=N.useState(null),b=N.useCallback(()=>{s.current&&(clearTimeout(s.current),s.current=null)},[]),v=N.useCallback(()=>{if(f.current||s.current)return;u.current+=1;const R=u.current,$=Math.min(3e4,1e3*Math.pow(2,R-1)),H=Math.floor(Math.random()*500),V=$+H;s.current=setTimeout(()=>{s.current=null,w()},V)},[b]),x=N.useCallback(R=>{a.current.forEach(($,H)=>{R.off(H),$.forEach(V=>{R.on(H,V)})})},[]),E=N.useCallback(async()=>Lf(),[]),_=N.useCallback(()=>{const R=new P$().withUrl(e,{accessTokenFactory:async()=>{const $=vo()?.sessionToken;return $||await E()}}).withAutomaticReconnect({nextRetryDelayInMilliseconds:$=>$.elapsedMilliseconds<6e4?Math.random()*1e4:null}).build();return R.onreconnecting(()=>{b(),h("reconnecting")}),R.onreconnected(()=>{b(),u.current=0,h("connected"),x(R)}),R.onclose($=>{h("disconnected"),$&&y($),f.current||v()}),R},[e,E,x,b,v]),w=N.useCallback(async()=>{f.current=!1,b(),r.current||(r.current=_());const R=r.current;if(R.state===Nt.Connected){h("connected");return}if(R.state===Nt.Connecting){h("connecting");return}if(R.state===Nt.Reconnecting){h("reconnecting");return}h("connecting");try{await R.start(),x(R),u.current=0,h("connected"),y(null)}catch($){y($),h("disconnected"),v()}},[x,_,b,v]),O=N.useCallback(async()=>{f.current=!0,b(),u.current=0;const R=r.current;if(r.current=null,!R){h("disconnected");return}try{await R.stop()}finally{h("disconnected")}},[b]),T=N.useCallback((R,$)=>{let H=a.current.get(R);H||(H=new Set,a.current.set(R,H)),H.add($);const V=r.current;V&&V.on(R,$)},[]),A=N.useCallback((R,$)=>{const H=a.current.get(R);if(!H)return;H.delete($),H.size===0&&a.current.delete(R);const V=r.current;V&&V.off(R,$)},[]),M=N.useCallback(async(R,...$)=>{const H=r.current;if(!H||H.state!==Nt.Connected)throw new Error("SignalR not connected");return H.invoke(R,...$)},[]);return N.useEffect(()=>(n&&w(),()=>{O()}),[n,w,O]),{status:d,connected:d==="connected",error:g,start:w,stop:O,on:T,off:A,invoke:M}}const H$=(()=>{const e=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype),Symbol.toStringTag).get;return t=>e.call(t)})();function Kf(e){return H$(e)==="Uint8Array"}function V$(e){return typeof e=="object"&&e!=null&&Symbol.toStringTag in e&&(e[Symbol.toStringTag]==="ArrayBuffer"||e[Symbol.toStringTag]==="SharedArrayBuffer")}function F$(e){return e instanceof RegExp||Object.prototype.toString.call(e)==="[object RegExp]"}function jE(e){return typeof e=="object"&&e!=null&&Symbol.toStringTag in e&&e[Symbol.toStringTag]==="Map"}function G$(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function _r(e,t){return JSON.stringify(e,(n,r)=>typeof r=="bigint"?{$numberLong:`${r}`}:jE(r)?Object.fromEntries(r):r)}function q$(e){if(e!=null&&typeof e=="object"&&"stylize"in e&&typeof e.stylize=="function")return e.stylize}const cg=7,HE=Symbol.for("@@mdb.bson.version"),fg=2147483647,dg=-2147483648,VE=Math.pow(2,63)-1,FE=-Math.pow(2,63),Y$=Math.pow(2,53),X$=-Math.pow(2,53),GE=4;class be extends Error{get bsonError(){return!0}get name(){return"BSONError"}constructor(t,n){super(t,n)}static isBSONError(t){return t!=null&&typeof t=="object"&&"bsonError"in t&&t.bsonError===!0&&"name"in t&&"message"in t&&"stack"in t}}class Z$ extends be{get name(){return"BSONVersionError"}constructor(){super(`Unsupported BSON version, bson types must be from bson ${cg}.x.x`)}}class qE extends be{get name(){return"BSONRuntimeError"}constructor(t){super(t)}}class xo extends be{get name(){return"BSONOffsetError"}offset;constructor(t,n,r){super(`${t}. offset: ${n}`,r),this.offset=n}}let YE,XE;function ZE(e,t,n,r){if(r){YE??=new TextDecoder("utf8",{fatal:!0});try{return YE.decode(e.subarray(t,n))}catch(a){throw new be("Invalid UTF-8 string in BSON document",{cause:a})}}return XE??=new TextDecoder("utf8",{fatal:!1}),XE.decode(e.subarray(t,n))}function KE(e,t,n){if(e.length===0)return"";const r=n-t;if(r===0)return"";if(r>20)return null;if(r===1&&e[t]<128)return String.fromCharCode(e[t]);if(r===2&&e[t]<128&&e[t+1]<128)return String.fromCharCode(e[t])+String.fromCharCode(e[t+1]);if(r===3&&e[t]<128&&e[t+1]<128&&e[t+2]<128)return String.fromCharCode(e[t])+String.fromCharCode(e[t+1])+String.fromCharCode(e[t+2]);const a=[];for(let s=t;s<n;s++){const u=e[s];if(u>127)return null;a.push(u)}return String.fromCharCode(...a)}function K$(e,t,n){if(t.length===0)return 0;if(t.length>25||e.length-n<t.length)return null;for(let r=0,a=n;r<t.length;r++,a++){const s=t.charCodeAt(r);if(s>127)return null;e[a]=s}return t.length}function W$(e){return ri.fromNumberArray(Array.from({length:e},()=>Math.floor(Math.random()*256)))}function Q$(e){return crypto.getRandomValues(ri.allocate(e))}const J$=(()=>{const{crypto:e}=globalThis;return e!=null&&typeof e.getRandomValues=="function"?Q$:W$})(),ri={isUint8Array:Kf,toLocalBufferType(e){if(Buffer.isBuffer(e))return e;if(ArrayBuffer.isView(e))return Buffer.from(e.buffer,e.byteOffset,e.byteLength);const t=e?.[Symbol.toStringTag]??Object.prototype.toString.call(e);if(t==="ArrayBuffer"||t==="SharedArrayBuffer"||t==="[object ArrayBuffer]"||t==="[object SharedArrayBuffer]")return Buffer.from(e);throw new be("Cannot create Buffer from the passed potentialBuffer.")},allocate(e){return Buffer.alloc(e)},allocateUnsafe(e){return Buffer.allocUnsafe(e)},compare(e,t){return ri.toLocalBufferType(e).compare(t)},concat(e){return Buffer.concat(e)},equals(e,t){return ri.toLocalBufferType(e).equals(t)},fromNumberArray(e){return Buffer.from(e)},fromBase64(e){return Buffer.from(e,"base64")},fromUTF8(e){return Buffer.from(e,"utf8")},toBase64(e){return ri.toLocalBufferType(e).toString("base64")},fromISO88591(e){return Buffer.from(e,"binary")},toISO88591(e){return ri.toLocalBufferType(e).toString("binary")},fromHex(e){return Buffer.from(e,"hex")},toHex(e){return ri.toLocalBufferType(e).toString("hex")},toUTF8(e,t,n,r){const a=n-t<=20?KE(e,t,n):null;if(a!=null)return a;const s=ri.toLocalBufferType(e).toString("utf8",t,n);if(r){for(let u=0;u<s.length;u++)if(s.charCodeAt(u)===65533){ZE(e,t,n,!0);break}}return s},utf8ByteLength(e){return Buffer.byteLength(e,"utf8")},encodeUTF8Into(e,t,n){const r=K$(e,t,n);return r??ri.toLocalBufferType(e).write(t,n,void 0,"utf8")},randomBytes:J$,swap32(e){return ri.toLocalBufferType(e).swap32()}};function eP(){const{navigator:e}=globalThis;return typeof e=="object"&&e.product==="ReactNative"}function tP(e){if(e<0)throw new RangeError(`The argument 'byteLength' is invalid. Received ${e}`);return ya.fromNumberArray(Array.from({length:e},()=>Math.floor(Math.random()*256)))}const nP=(()=>{const{crypto:e}=globalThis;if(e!=null&&typeof e.getRandomValues=="function")return t=>e.getRandomValues(ya.allocate(t));if(eP()){const{console:t}=globalThis;t?.warn?.("BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.")}return tP})(),WE=/(\d|[a-f])/i,ya={isUint8Array:Kf,toLocalBufferType(e){const t=e?.[Symbol.toStringTag]??Object.prototype.toString.call(e);if(t==="Uint8Array")return e;if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength));if(t==="ArrayBuffer"||t==="SharedArrayBuffer"||t==="[object ArrayBuffer]"||t==="[object SharedArrayBuffer]")return new Uint8Array(e);throw new be("Cannot make a Uint8Array from passed potentialBuffer.")},allocate(e){if(typeof e!="number")throw new TypeError(`The "size" argument must be of type number. Received ${String(e)}`);return new Uint8Array(e)},allocateUnsafe(e){return ya.allocate(e)},compare(e,t){if(e===t)return 0;const n=Math.min(e.length,t.length);for(let r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return e.length<t.length?-1:e.length>t.length?1:0},concat(e){if(e.length===0)return ya.allocate(0);let t=0;for(const a of e)t+=a.length;const n=ya.allocate(t);let r=0;for(const a of e)n.set(a,r),r+=a.length;return n},equals(e,t){if(e.byteLength!==t.byteLength)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0},fromNumberArray(e){return Uint8Array.from(e)},fromBase64(e){return Uint8Array.from(atob(e),t=>t.charCodeAt(0))},fromUTF8(e){return new TextEncoder().encode(e)},toBase64(e){return btoa(ya.toISO88591(e))},fromISO88591(e){return Uint8Array.from(e,t=>t.charCodeAt(0)&255)},toISO88591(e){return Array.from(Uint16Array.from(e),t=>String.fromCharCode(t)).join("")},fromHex(e){const t=e.length%2===0?e:e.slice(0,e.length-1),n=[];for(let r=0;r<t.length;r+=2){const a=t[r],s=t[r+1];if(!WE.test(a)||!WE.test(s))break;const u=Number.parseInt(`${a}${s}`,16);n.push(u)}return Uint8Array.from(n)},toHex(e){return Array.from(e,t=>t.toString(16).padStart(2,"0")).join("")},toUTF8(e,t,n,r){const a=n-t<=20?KE(e,t,n):null;return a??ZE(e,t,n,r)},utf8ByteLength(e){return new TextEncoder().encode(e).byteLength},encodeUTF8Into(e,t,n){const r=new TextEncoder().encode(t);return e.set(r,n),r.byteLength},randomBytes:nP,swap32(e){if(e.length%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e.length;t+=4){const n=e[t],r=e[t+1],a=e[t+2],s=e[t+3];e[t]=s,e[t+1]=a,e[t+2]=r,e[t+3]=n}return e}},Be=typeof Buffer=="function"&&Buffer.prototype?._isBuffer!==!0?ri:ya,QE=Symbol.for("@@mdb.bson.type");class $r{get[QE](){return this._bsontype}get[HE](){return cg}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return this.inspect(t,n,r)}}const ms=new Float64Array(1),pt=new Uint8Array(ms.buffer,0,8);ms[0]=-1;const hg=pt[7]===0,va={isBigEndian:hg,getNonnegativeInt32LE(e,t){if(e[t+3]>127)throw new RangeError(`Size cannot be negative at offset: ${t}`);return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},getInt32LE(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},getUint32LE(e,t){return e[t]+e[t+1]*256+e[t+2]*65536+e[t+3]*16777216},getUint32BE(e,t){return e[t+3]+e[t+2]*256+e[t+1]*65536+e[t]*16777216},getBigInt64LE(e,t){const n=BigInt(e[t+4]+e[t+5]*256+e[t+6]*65536+(e[t+7]<<24)),r=BigInt(e[t]+e[t+1]*256+e[t+2]*65536+e[t+3]*16777216);return(n<<32n)+r},getFloat64LE:hg?(e,t)=>(pt[7]=e[t],pt[6]=e[t+1],pt[5]=e[t+2],pt[4]=e[t+3],pt[3]=e[t+4],pt[2]=e[t+5],pt[1]=e[t+6],pt[0]=e[t+7],ms[0]):(e,t)=>(pt[0]=e[t],pt[1]=e[t+1],pt[2]=e[t+2],pt[3]=e[t+3],pt[4]=e[t+4],pt[5]=e[t+5],pt[6]=e[t+6],pt[7]=e[t+7],ms[0]),setInt32BE(e,t,n){return e[t+3]=n,n>>>=8,e[t+2]=n,n>>>=8,e[t+1]=n,n>>>=8,e[t]=n,4},setInt32LE(e,t,n){return e[t]=n,n>>>=8,e[t+1]=n,n>>>=8,e[t+2]=n,n>>>=8,e[t+3]=n,4},setBigInt64LE(e,t,n){const r=0xffffffffn;let a=Number(n&r);e[t]=a,a>>=8,e[t+1]=a,a>>=8,e[t+2]=a,a>>=8,e[t+3]=a;let s=Number(n>>32n&r);return e[t+4]=s,s>>=8,e[t+5]=s,s>>=8,e[t+6]=s,s>>=8,e[t+7]=s,8},setFloat64LE:hg?(e,t,n)=>(ms[0]=n,e[t]=pt[7],e[t+1]=pt[6],e[t+2]=pt[5],e[t+3]=pt[4],e[t+4]=pt[3],e[t+5]=pt[2],e[t+6]=pt[1],e[t+7]=pt[0],8):(e,t,n)=>(ms[0]=n,e[t]=pt[0],e[t+1]=pt[1],e[t+2]=pt[2],e[t+3]=pt[3],e[t+4]=pt[4],e[t+5]=pt[5],e[t+6]=pt[6],e[t+7]=pt[7],8)};class ut extends $r{get _bsontype(){return"Binary"}static BSON_BINARY_SUBTYPE_DEFAULT=0;static BUFFER_SIZE=256;static SUBTYPE_DEFAULT=0;static SUBTYPE_FUNCTION=1;static SUBTYPE_BYTE_ARRAY=2;static SUBTYPE_UUID_OLD=3;static SUBTYPE_UUID=4;static SUBTYPE_MD5=5;static SUBTYPE_ENCRYPTED=6;static SUBTYPE_COLUMN=7;static SUBTYPE_SENSITIVE=8;static SUBTYPE_VECTOR=9;static SUBTYPE_USER_DEFINED=128;static VECTOR_TYPE=Object.freeze({Int8:3,Float32:39,PackedBit:16});buffer;sub_type;position;constructor(t,n){if(super(),t!=null&&typeof t=="string"&&!ArrayBuffer.isView(t)&&!V$(t)&&!Array.isArray(t))throw new be("Binary can only be constructed from Uint8Array or number[]");this.sub_type=n??ut.BSON_BINARY_SUBTYPE_DEFAULT,t==null?(this.buffer=Be.allocate(ut.BUFFER_SIZE),this.position=0):(this.buffer=Array.isArray(t)?Be.fromNumberArray(t):Be.toLocalBufferType(t),this.position=this.buffer.byteLength)}put(t){if(typeof t=="string"&&t.length!==1)throw new be("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new be("only accepts single character Uint8Array or Array");let n;if(typeof t=="string"?n=t.charCodeAt(0):typeof t=="number"?n=t:n=t[0],n<0||n>255)throw new be("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.byteLength>this.position)this.buffer[this.position++]=n;else{const r=Be.allocate(ut.BUFFER_SIZE+this.buffer.length);r.set(this.buffer,0),this.buffer=r,this.buffer[this.position++]=n}}write(t,n){if(n=typeof n=="number"?n:this.position,this.buffer.byteLength<n+t.length){const r=Be.allocate(this.buffer.byteLength+t.length);r.set(this.buffer,0),this.buffer=r}if(ArrayBuffer.isView(t))this.buffer.set(Be.toLocalBufferType(t),n),this.position=n+t.byteLength>this.position?n+t.length:this.position;else if(typeof t=="string")throw new be("input cannot be string")}read(t,n){n=n&&n>0?n:this.position;const r=t+n;return this.buffer.subarray(t,r>this.position?this.position:r)}value(){return this.buffer.length===this.position?this.buffer:this.buffer.subarray(0,this.position)}length(){return this.position}toJSON(){return Be.toBase64(this.buffer.subarray(0,this.position))}toString(t){return t==="hex"?Be.toHex(this.buffer.subarray(0,this.position)):t==="base64"?Be.toBase64(this.buffer.subarray(0,this.position)):t==="utf8"||t==="utf-8"?Be.toUTF8(this.buffer,0,this.position,!1):Be.toUTF8(this.buffer,0,this.position,!1)}toExtendedJSON(t){t=t||{},this.sub_type===ut.SUBTYPE_VECTOR&&Eo(this);const n=Be.toBase64(this.buffer),r=Number(this.sub_type).toString(16);return t.legacy?{$binary:n,$type:r.length===1?"0"+r:r}:{$binary:{base64:n,subType:r.length===1?"0"+r:r}}}toUUID(){if(this.sub_type===ut.SUBTYPE_UUID)return new ir(this.buffer.subarray(0,this.position));throw new be(`Binary sub_type "${this.sub_type}" is not supported for converting to UUID. Only "${ut.SUBTYPE_UUID}" is currently supported.`)}static createFromHexString(t,n){return new ut(Be.fromHex(t),n)}static createFromBase64(t,n){return new ut(Be.fromBase64(t),n)}static fromExtendedJSON(t,n){n=n||{};let r,a;if("$binary"in t?n.legacy&&typeof t.$binary=="string"&&"$type"in t?(a=t.$type?parseInt(t.$type,16):0,r=Be.fromBase64(t.$binary)):typeof t.$binary!="string"&&(a=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=Be.fromBase64(t.$binary.base64)):"$uuid"in t&&(a=4,r=ir.bytesFromString(t.$uuid)),!r)throw new be(`Unexpected Binary Extended JSON format ${JSON.stringify(t)}`);return a===GE?new ir(r):new ut(r,a)}inspect(t,n,r){r??=_r;const a=Be.toBase64(this.buffer.subarray(0,this.position)),s=r(a,n),u=r(this.sub_type,n);return`Binary.createFromBase64(${s}, ${u})`}toInt8Array(){if(this.sub_type!==ut.SUBTYPE_VECTOR)throw new be("Binary sub_type is not Vector");if(this.buffer[0]!==ut.VECTOR_TYPE.Int8)throw new be("Binary datatype field is not Int8");return Eo(this),new Int8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}toFloat32Array(){if(this.sub_type!==ut.SUBTYPE_VECTOR)throw new be("Binary sub_type is not Vector");if(this.buffer[0]!==ut.VECTOR_TYPE.Float32)throw new be("Binary datatype field is not Float32");Eo(this);const t=new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position));return va.isBigEndian&&Be.swap32(t),new Float32Array(t.buffer)}toPackedBits(){if(this.sub_type!==ut.SUBTYPE_VECTOR)throw new be("Binary sub_type is not Vector");if(this.buffer[0]!==ut.VECTOR_TYPE.PackedBit)throw new be("Binary datatype field is not packed bit");return Eo(this),new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}toBits(){if(this.sub_type!==ut.SUBTYPE_VECTOR)throw new be("Binary sub_type is not Vector");if(this.buffer[0]!==ut.VECTOR_TYPE.PackedBit)throw new be("Binary datatype field is not packed bit");Eo(this);const n=(this.length()-2)*8-this.buffer[1],r=new Int8Array(n);for(let a=0;a<r.length;a++){const s=a/8|0,u=this.buffer[s+2],f=7-a%8,d=u>>f&1;r[a]=d}return r}static fromInt8Array(t){const n=Be.allocate(t.byteLength+2);n[0]=ut.VECTOR_TYPE.Int8,n[1]=0;const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);n.set(r,2);const a=new this(n,this.SUBTYPE_VECTOR);return Eo(a),a}static fromFloat32Array(t){const n=Be.allocate(t.byteLength+2);n[0]=ut.VECTOR_TYPE.Float32,n[1]=0;const r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);n.set(r,2),va.isBigEndian&&Be.swap32(new Uint8Array(n.buffer,2));const a=new this(n,this.SUBTYPE_VECTOR);return Eo(a),a}static fromPackedBits(t,n=0){const r=Be.allocate(t.byteLength+2);r[0]=ut.VECTOR_TYPE.PackedBit,r[1]=n,r.set(t,2);const a=new this(r,this.SUBTYPE_VECTOR);return Eo(a),a}static fromBits(t){const n=t.length+7>>>3,r=new Uint8Array(n+2);r[0]=ut.VECTOR_TYPE.PackedBit;const a=t.length%8;r[1]=a===0?0:8-a;for(let s=0;s<t.length;s++){const u=s>>>3,f=t[s];if(f!==0&&f!==1)throw new be(`Invalid bit value at ${s}: must be 0 or 1, found ${t[s]}`);if(f===0)continue;const d=7-s%8;r[u+2]|=f<<d}return new this(r,ut.SUBTYPE_VECTOR)}}function Eo(e){if(e.sub_type!==ut.SUBTYPE_VECTOR)return;const t=e.position,n=e.buffer[0],r=e.buffer[1];if((n===ut.VECTOR_TYPE.Float32||n===ut.VECTOR_TYPE.Int8)&&r!==0)throw new be("Invalid Vector: padding must be zero for int8 and float32 vectors");if(n===ut.VECTOR_TYPE.Float32&&t!==0&&t-2!==0&&(t-2)%4!==0)throw new be("Invalid Vector: Float32 vector must contain a multiple of 4 bytes");if(n===ut.VECTOR_TYPE.PackedBit&&r!==0&&t===2)throw new be("Invalid Vector: padding must be zero for packed bit vectors that are empty");if(n===ut.VECTOR_TYPE.PackedBit&&r>7)throw new be(`Invalid Vector: padding must be a value between 0 and 7. found: ${r}`)}const pg=16,rP=/^[0-9A-F]{32}$/i,iP=/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;class ir extends ut{constructor(t){let n;if(t==null)n=ir.generate();else if(t instanceof ir)n=Be.toLocalBufferType(new Uint8Array(t.buffer));else if(ArrayBuffer.isView(t)&&t.byteLength===pg)n=Be.toLocalBufferType(t);else if(typeof t=="string")n=ir.bytesFromString(t);else throw new be("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");super(n,GE)}get id(){return this.buffer}set id(t){this.buffer=t}toHexString(t=!0){return t?[Be.toHex(this.buffer.subarray(0,4)),Be.toHex(this.buffer.subarray(4,6)),Be.toHex(this.buffer.subarray(6,8)),Be.toHex(this.buffer.subarray(8,10)),Be.toHex(this.buffer.subarray(10,16))].join("-"):Be.toHex(this.buffer)}toString(t){return t==="hex"?Be.toHex(this.id):t==="base64"?Be.toBase64(this.id):this.toHexString()}toJSON(){return this.toHexString()}equals(t){if(!t)return!1;if(t instanceof ir)return Be.equals(t.id,this.id);try{return Be.equals(new ir(t).id,this.id)}catch{return!1}}toBinary(){return new ut(this.id,ut.SUBTYPE_UUID)}static generate(){const t=Be.randomBytes(pg);return t[6]=t[6]&15|64,t[8]=t[8]&63|128,t}static isValid(t){return t?typeof t=="string"?ir.isValidUUIDString(t):Kf(t)?t.byteLength===pg:t._bsontype==="Binary"&&t.sub_type===this.SUBTYPE_UUID&&t.buffer.byteLength===16:!1}static createFromHexString(t){const n=ir.bytesFromString(t);return new ir(n)}static createFromBase64(t){return new ir(Be.fromBase64(t))}static bytesFromString(t){if(!ir.isValidUUIDString(t))throw new be("UUID string representation must be 32 hex digits or canonical hyphenated representation");return Be.fromHex(t.replace(/-/g,""))}static isValidUUIDString(t){return rP.test(t)||iP.test(t)}inspect(t,n,r){return r??=_r,`new UUID(${r(this.toHexString(),n)})`}}class tu extends $r{get _bsontype(){return"Code"}code;scope;constructor(t,n){super(),this.code=t.toString(),this.scope=n??null}toJSON(){return this.scope!=null?{code:this.code,scope:this.scope}:{code:this.code}}toExtendedJSON(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}}static fromExtendedJSON(t){return new tu(t.$code,t.$scope)}inspect(t,n,r){r??=_r;let a=r(this.code,n);const s=a.includes(`
|
|
170
170
|
`);this.scope!=null&&(a+=`,${s?`
|
|
171
171
|
`:" "}${r(this.scope,n)}`);const u=s&&this.scope===null;return`new Code(${s?`
|
|
172
172
|
`:""}${a}${u?`
|
|
173
|
-
`:""})`}}function oP(e){return e!=null&&typeof e=="object"&&"$id"in e&&e.$id!=null&&"$ref"in e&&typeof e.$ref=="string"&&(!("$db"in e)||"$db"in e&&typeof e.$db=="string")}class ms extends $r{get _bsontype(){return"DBRef"}collection;oid;db;fields;constructor(t,n,r,a){super();const s=t.split(".");s.length===2&&(r=s.shift(),t=s.shift()),this.collection=t,this.oid=n,this.db=r,this.fields=a||{}}get namespace(){return this.collection}set namespace(t){this.collection=t}toJSON(){const t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(t.$db=this.db),t}toExtendedJSON(t){t=t||{};let n={$ref:this.collection,$id:this.oid};return t.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n}static fromExtendedJSON(t){const n=Object.assign({},t);return delete n.$ref,delete n.$id,delete n.$db,new ms(t.$ref,t.$id,t.$db,n)}inspect(t,n,r){r??=_r;const a=[r(this.namespace,n),r(this.oid,n),...this.db?[r(this.db,n)]:[],...Object.keys(this.fields).length>0?[r(this.fields,n)]:[]];return a[1]=r===_r?`new ObjectId(${a[1]})`:a[1],`new DBRef(${a.join(", ")})`}}function JE(e){if(e==="")return e;let t=0;const n=e[t]==="-",r=e[t]==="+";(r||n)&&(t+=1);let a=!1;for(;t<e.length&&e[t]==="0";++t)a=!0;return a?`${n?"-":""}${e.length===t?"0":e.slice(t)}`:r?e.slice(1):e}function aP(e,t){t=t??10;const n="0123456789abcdefghijklmnopqrstuvwxyz".slice(0,t);return new RegExp(`[^-+${n}]`,"i").test(e)?!1:e}let Pr;try{Pr=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}const e_=65536,sP=1<<24,gs=e_*e_,t_=gs*gs,n_=t_/2,r_={},i_={},lP=20,uP=/^(\+?0|(\+|-)?[1-9][0-9]*)$/;class X extends $r{get _bsontype(){return"Long"}get __isLong__(){return!0}high;low;unsigned;constructor(t=0,n,r){super();const a=typeof n=="boolean"?n:!!r,s=typeof n=="number"?n:0,u=typeof t=="string"?X.fromString(t,a):typeof t=="bigint"?X.fromBigInt(t,a):{low:t|0,high:s|0,unsigned:a};this.low=u.low,this.high=u.high,this.unsigned=u.unsigned}static TWO_PWR_24=X.fromInt(sP);static MAX_UNSIGNED_VALUE=X.fromBits(-1,-1,!0);static ZERO=X.fromInt(0);static UZERO=X.fromInt(0,!0);static ONE=X.fromInt(1);static UONE=X.fromInt(1,!0);static NEG_ONE=X.fromInt(-1);static MAX_VALUE=X.fromBits(-1,2147483647,!1);static MIN_VALUE=X.fromBits(0,-2147483648,!1);static fromBits(t,n,r){return new X(t,n,r)}static fromInt(t,n){let r,a,s;return n?(t>>>=0,(s=0<=t&&t<256)&&(a=i_[t],a)?a:(r=X.fromBits(t,(t|0)<0?-1:0,!0),s&&(i_[t]=r),r)):(t|=0,(s=-128<=t&&t<128)&&(a=r_[t],a)?a:(r=X.fromBits(t,t<0?-1:0,!1),s&&(r_[t]=r),r))}static fromNumber(t,n){if(isNaN(t))return n?X.UZERO:X.ZERO;if(n){if(t<0)return X.UZERO;if(t>=t_)return X.MAX_UNSIGNED_VALUE}else{if(t<=-n_)return X.MIN_VALUE;if(t+1>=n_)return X.MAX_VALUE}return t<0?X.fromNumber(-t,n).neg():X.fromBits(t%gs|0,t/gs|0,n)}static fromBigInt(t,n){const r=0xffffffffn,a=32n;return new X(Number(t&r),Number(t>>a&r),n)}static _fromString(t,n,r){if(t.length===0)throw new be("empty string");if(r<2||36<r)throw new be("radix");let a;if((a=t.indexOf("-"))>0)throw new be("interior hyphen");if(a===0)return X._fromString(t.substring(1),n,r).neg();const s=X.fromNumber(Math.pow(r,8));let u=X.ZERO;for(let f=0;f<t.length;f+=8){const d=Math.min(8,t.length-f),h=parseInt(t.substring(f,f+d),r);if(d<8){const g=X.fromNumber(Math.pow(r,d));u=u.mul(g).add(X.fromNumber(h))}else u=u.mul(s),u=u.add(X.fromNumber(h))}return u.unsigned=n,u}static fromStringStrict(t,n,r){let a=!1;if(typeof n=="number"?(r=n,n=!1):a=!!n,r??=10,t.trim()!==t)throw new be(`Input: '${t}' contains leading and/or trailing whitespace`);if(!aP(t,r))throw new be(`Input: '${t}' contains invalid characters for radix: ${r}`);const s=JE(t),u=X._fromString(s,a,r);if(u.toString(r).toLowerCase()!==s.toLowerCase())throw new be(`Input: ${t} is not representable as ${u.unsigned?"an unsigned":"a signed"} 64-bit Long ${r!=null?`with radix: ${r}`:""}`);return u}static fromString(t,n,r){let a=!1;return typeof n=="number"?(r=n,n=!1):a=!!n,r??=10,t==="NaN"&&r<24||(t==="Infinity"||t==="+Infinity"||t==="-Infinity")&&r<35?X.ZERO:X._fromString(t,a,r)}static fromBytes(t,n,r){return r?X.fromBytesLE(t,n):X.fromBytesBE(t,n)}static fromBytesLE(t,n){return new X(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)}static fromBytesBE(t,n){return new X(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)}static isLong(t){return t!=null&&typeof t=="object"&&"__isLong__"in t&&t.__isLong__===!0}static fromValue(t,n){return typeof t=="number"?X.fromNumber(t,n):typeof t=="string"?X.fromString(t,n):X.fromBits(t.low,t.high,typeof n=="boolean"?n:t.unsigned)}add(t){X.isLong(t)||(t=X.fromValue(t));const n=this.high>>>16,r=this.high&65535,a=this.low>>>16,s=this.low&65535,u=t.high>>>16,f=t.high&65535,d=t.low>>>16,h=t.low&65535;let g=0,y=0,b=0,v=0;return v+=s+h,b+=v>>>16,v&=65535,b+=a+d,y+=b>>>16,b&=65535,y+=r+f,g+=y>>>16,y&=65535,g+=n+u,g&=65535,X.fromBits(b<<16|v,g<<16|y,this.unsigned)}and(t){return X.isLong(t)||(t=X.fromValue(t)),X.fromBits(this.low&t.low,this.high&t.high,this.unsigned)}compare(t){if(X.isLong(t)||(t=X.fromValue(t)),this.eq(t))return 0;const n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1}comp(t){return this.compare(t)}divide(t){if(X.isLong(t)||(t=X.fromValue(t)),t.isZero())throw new be("division by zero");if(Pr){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;const s=(this.unsigned?Pr.div_u:Pr.div_s)(this.low,this.high,t.low,t.high);return X.fromBits(s,Pr.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?X.UZERO:X.ZERO;let n,r,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return X.UZERO;if(t.gt(this.shru(1)))return X.UONE;a=X.UZERO}else{if(this.eq(X.MIN_VALUE))return t.eq(X.ONE)||t.eq(X.NEG_ONE)?X.MIN_VALUE:t.eq(X.MIN_VALUE)?X.ONE:(n=this.shr(1).div(t).shl(1),n.eq(X.ZERO)?t.isNegative()?X.ONE:X.NEG_ONE:(r=this.sub(t.mul(n)),a=n.add(r.div(t)),a));if(t.eq(X.MIN_VALUE))return this.unsigned?X.UZERO:X.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();a=X.ZERO}for(r=this;r.gte(t);){n=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));const s=Math.ceil(Math.log(n)/Math.LN2),u=s<=48?1:Math.pow(2,s-48);let f=X.fromNumber(n),d=f.mul(t);for(;d.isNegative()||d.gt(r);)n-=u,f=X.fromNumber(n,this.unsigned),d=f.mul(t);f.isZero()&&(f=X.ONE),a=a.add(f),r=r.sub(d)}return a}div(t){return this.divide(t)}equals(t){return X.isLong(t)||(t=X.fromValue(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low}eq(t){return this.equals(t)}getHighBits(){return this.high}getHighBitsUnsigned(){return this.high>>>0}getLowBits(){return this.low}getLowBitsUnsigned(){return this.low>>>0}getNumBitsAbs(){if(this.isNegative())return this.eq(X.MIN_VALUE)?64:this.neg().getNumBitsAbs();const t=this.high!==0?this.high:this.low;let n;for(n=31;n>0&&(t&1<<n)===0;n--);return this.high!==0?n+33:n+1}greaterThan(t){return this.comp(t)>0}gt(t){return this.greaterThan(t)}greaterThanOrEqual(t){return this.comp(t)>=0}gte(t){return this.greaterThanOrEqual(t)}ge(t){return this.greaterThanOrEqual(t)}isEven(){return(this.low&1)===0}isNegative(){return!this.unsigned&&this.high<0}isOdd(){return(this.low&1)===1}isPositive(){return this.unsigned||this.high>=0}isZero(){return this.high===0&&this.low===0}lessThan(t){return this.comp(t)<0}lt(t){return this.lessThan(t)}lessThanOrEqual(t){return this.comp(t)<=0}lte(t){return this.lessThanOrEqual(t)}modulo(t){if(X.isLong(t)||(t=X.fromValue(t)),Pr){const n=(this.unsigned?Pr.rem_u:Pr.rem_s)(this.low,this.high,t.low,t.high);return X.fromBits(n,Pr.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))}mod(t){return this.modulo(t)}rem(t){return this.modulo(t)}multiply(t){if(this.isZero())return X.ZERO;if(X.isLong(t)||(t=X.fromValue(t)),Pr){const x=Pr.mul(this.low,this.high,t.low,t.high);return X.fromBits(x,Pr.get_high(),this.unsigned)}if(t.isZero())return X.ZERO;if(this.eq(X.MIN_VALUE))return t.isOdd()?X.MIN_VALUE:X.ZERO;if(t.eq(X.MIN_VALUE))return this.isOdd()?X.MIN_VALUE:X.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(X.TWO_PWR_24)&&t.lt(X.TWO_PWR_24))return X.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);const n=this.high>>>16,r=this.high&65535,a=this.low>>>16,s=this.low&65535,u=t.high>>>16,f=t.high&65535,d=t.low>>>16,h=t.low&65535;let g=0,y=0,b=0,v=0;return v+=s*h,b+=v>>>16,v&=65535,b+=a*h,y+=b>>>16,b&=65535,b+=s*d,y+=b>>>16,b&=65535,y+=r*h,g+=y>>>16,y&=65535,y+=a*d,g+=y>>>16,y&=65535,y+=s*f,g+=y>>>16,y&=65535,g+=n*h+r*d+a*f+s*u,g&=65535,X.fromBits(b<<16|v,g<<16|y,this.unsigned)}mul(t){return this.multiply(t)}negate(){return!this.unsigned&&this.eq(X.MIN_VALUE)?X.MIN_VALUE:this.not().add(X.ONE)}neg(){return this.negate()}not(){return X.fromBits(~this.low,~this.high,this.unsigned)}notEquals(t){return!this.equals(t)}neq(t){return this.notEquals(t)}ne(t){return this.notEquals(t)}or(t){return X.isLong(t)||(t=X.fromValue(t)),X.fromBits(this.low|t.low,this.high|t.high,this.unsigned)}shiftLeft(t){return X.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?X.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):X.fromBits(0,this.low<<t-32,this.unsigned)}shl(t){return this.shiftLeft(t)}shiftRight(t){return X.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?X.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):X.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)}shr(t){return this.shiftRight(t)}shiftRightUnsigned(t){if(X.isLong(t)&&(t=t.toInt()),t&=63,t===0)return this;{const n=this.high;if(t<32){const r=this.low;return X.fromBits(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?X.fromBits(n,0,this.unsigned):X.fromBits(n>>>t-32,0,this.unsigned)}}shr_u(t){return this.shiftRightUnsigned(t)}shru(t){return this.shiftRightUnsigned(t)}subtract(t){return X.isLong(t)||(t=X.fromValue(t)),this.add(t.neg())}sub(t){return this.subtract(t)}toInt(){return this.unsigned?this.low>>>0:this.low}toNumber(){return this.unsigned?(this.high>>>0)*gs+(this.low>>>0):this.high*gs+(this.low>>>0)}toBigInt(){return BigInt(this.toString())}toBytes(t){return t?this.toBytesLE():this.toBytesBE()}toBytesLE(){const t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]}toBytesBE(){const t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]}toSigned(){return this.unsigned?X.fromBits(this.low,this.high,!1):this}toString(t){if(t=t||10,t<2||36<t)throw new be("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(X.MIN_VALUE)){const s=X.fromNumber(t),u=this.div(s),f=u.mul(s).sub(this);return u.toString(t)+f.toInt().toString(t)}else return"-"+this.neg().toString(t);const n=X.fromNumber(Math.pow(t,6),this.unsigned);let r=this,a="";for(;;){const s=r.div(n);let f=(r.sub(s.mul(n)).toInt()>>>0).toString(t);if(r=s,r.isZero())return f+a;for(;f.length<6;)f="0"+f;a=""+f+a}}toUnsigned(){return this.unsigned?this:X.fromBits(this.low,this.high,!0)}xor(t){return X.isLong(t)||(t=X.fromValue(t)),X.fromBits(this.low^t.low,this.high^t.high,this.unsigned)}eqz(){return this.isZero()}le(t){return this.lessThanOrEqual(t)}toExtendedJSON(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}}static fromExtendedJSON(t,n){const{useBigInt64:r=!1,relaxed:a=!0}={...n};if(t.$numberLong.length>lP)throw new be("$numberLong string is too long");if(!uP.test(t.$numberLong))throw new be(`$numberLong string "${t.$numberLong}" is in an invalid format`);if(r){const u=BigInt(t.$numberLong);return BigInt.asIntN(64,u)}const s=X.fromString(t.$numberLong);return a?s.toNumber():s}inspect(t,n,r){r??=_r;const a=r(this.toString(),n),s=this.unsigned?`, ${r(this.unsigned,n)}`:"";return`new Long(${a}${s})`}}const cP=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,fP=/^(\+|-)?(Infinity|inf)$/i,dP=/^(\+|-)?NaN$/i,ys=6111,nu=-6176,o_=6176,a_=34,mg=Be.fromNumberArray([124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),s_=Be.fromNumberArray([248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),l_=Be.fromNumberArray([120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),hP=/^([-+])?(\d+)?$/,pP=31,u_=16383,mP=30,gP=31;function c_(e){return!isNaN(parseInt(e,10))}function yP(e){const t=X.fromNumber(1e9);let n=X.fromNumber(0);if(!e.parts[0]&&!e.parts[1]&&!e.parts[2]&&!e.parts[3])return{quotient:e,rem:n};for(let r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new X(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function vP(e,t){if(!e&&!t)return{high:X.fromNumber(0),low:X.fromNumber(0)};const n=e.shiftRightUnsigned(32),r=new X(e.getLowBits(),0),a=t.shiftRightUnsigned(32),s=new X(t.getLowBits(),0);let u=n.multiply(a),f=n.multiply(s);const d=r.multiply(a);let h=r.multiply(s);return u=u.add(f.shiftRightUnsigned(32)),f=new X(f.getLowBits(),0).add(d).add(h.shiftRightUnsigned(32)),u=u.add(f.shiftRightUnsigned(32)),h=f.shiftLeft(32).add(new X(h.getLowBits(),0)),{high:u,low:h}}function bP(e,t){const n=e.high>>>0,r=t.high>>>0;if(n<r)return!0;if(n===r){const a=e.low>>>0,s=t.low>>>0;if(a<s)return!0}return!1}function ii(e,t){throw new be(`"${e}" is not a valid Decimal128 string - ${t}`)}class wr extends $r{get _bsontype(){return"Decimal128"}bytes;constructor(t){if(super(),typeof t=="string")this.bytes=wr.fromString(t).bytes;else if(t instanceof Uint8Array||Kf(t)){if(t.byteLength!==16)throw new be("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new be("Decimal128 must take a Buffer or string")}static fromString(t){return wr._fromString(t,{allowRounding:!1})}static fromStringWithRounding(t){return wr._fromString(t,{allowRounding:!0})}static _fromString(t,n){let r=!1,a=!1,s=!1,u=!1,f=0,d=0,h=0,g=0,y=0;const b=[0];let v=0,x=0,E=0,_=0,w=new X(0,0),O=new X(0,0),T=0,A=0;if(t.length>=7e3)throw new be(""+t+" not a valid Decimal128 string");const M=t.match(cP),R=t.match(fP),$=t.match(dP);if(!M&&!R&&!$||t.length===0)throw new be(""+t+" not a valid Decimal128 string");if(M){const G=M[2],C=M[4],q=M[5],U=M[6];C&&U===void 0&&ii(t,"missing exponent power"),C&&G===void 0&&ii(t,"missing exponent base"),C===void 0&&(q||U)&&ii(t,"missing e before exponent")}if((t[A]==="+"||t[A]==="-")&&(a=!0,r=t[A++]==="-"),!c_(t[A])&&t[A]!=="."){if(t[A]==="i"||t[A]==="I")return new wr(r?s_:l_);if(t[A]==="N")return new wr(mg)}for(;c_(t[A])||t[A]===".";){if(t[A]==="."){s&&ii(t,"contains multiple periods"),s=!0,A=A+1;continue}v<a_&&(t[A]!=="0"||u)&&(u||(y=d),u=!0,b[x++]=parseInt(t[A],10),v=v+1),u&&(h=h+1),s&&(g=g+1),d=d+1,A=A+1}if(s&&!d)throw new be(""+t+" not a valid Decimal128 string");if(t[A]==="e"||t[A]==="E"){const G=t.substr(++A).match(hP);if(!G||!G[2])return new wr(mg);_=parseInt(G[0],10),A=A+G[0].length}if(t[A])return new wr(mg);if(!v)b[0]=0,h=1,v=1,f=0;else if(E=v-1,f=h,f!==1)for(;t[y+f-1+Number(a)+Number(s)]==="0";)f=f-1;for(_<=g&&g>_+16384?_=nu:_=_-g;_>ys;){if(E=E+1,E>=a_){if(f===0){_=ys;break}ii(t,"overflow")}_=_-1}if(n.allowRounding){for(;_<nu||v<h;){if(E===0&&f<v){_=nu,f=0;break}if(v<h?h=h-1:E=E-1,_<ys)_=_+1;else{if(b.join("").match(/^0+$/)){_=ys;break}ii(t,"overflow")}}if(E+1<f){let G=d;s&&(y=y+1,G=G+1),a&&(y=y+1,G=G+1);const C=parseInt(t[y+E+1],10);let q=0;if(C>=5&&(q=1,C===5)){q=b[E]%2===1?1:0;for(let U=y+E+2;U<G;U++)if(parseInt(t[U],10)){q=1;break}}if(q){let U=E;for(;U>=0&&++b[U]>9;U--)if(b[U]=0,U===0)if(_<ys)_=_+1,b[U]=1;else return new wr(r?s_:l_)}}}else{for(;_<nu||v<h;){if(E===0){if(f===0){_=nu;break}ii(t,"exponent underflow")}v<h?(t[h-1+Number(a)+Number(s)]!=="0"&&f!==0&&ii(t,"inexact rounding"),h=h-1):(b[E]!==0&&ii(t,"inexact rounding"),E=E-1),_<ys?_=_+1:ii(t,"overflow")}E+1<f&&(s&&(y=y+1),a&&(y=y+1),parseInt(t[y+E+1],10)!==0&&ii(t,"inexact rounding"))}if(w=X.fromNumber(0),O=X.fromNumber(0),f===0)w=X.fromNumber(0),O=X.fromNumber(0);else if(E<17){let G=0;for(O=X.fromNumber(b[G++]),w=new X(0,0);G<=E;G++)O=O.multiply(X.fromNumber(10)),O=O.add(X.fromNumber(b[G]))}else{let G=0;for(w=X.fromNumber(b[G++]);G<=E-17;G++)w=w.multiply(X.fromNumber(10)),w=w.add(X.fromNumber(b[G]));for(O=X.fromNumber(b[G++]);G<=E;G++)O=O.multiply(X.fromNumber(10)),O=O.add(X.fromNumber(b[G]))}const H=vP(w,X.fromString("100000000000000000"));H.low=H.low.add(O),bP(H.low,O)&&(H.high=H.high.add(X.fromNumber(1))),T=_+o_;const V={low:X.fromNumber(0),high:X.fromNumber(0)};H.high.shiftRightUnsigned(49).and(X.fromNumber(1)).equals(X.fromNumber(1))?(V.high=V.high.or(X.fromNumber(3).shiftLeft(61)),V.high=V.high.or(X.fromNumber(T).and(X.fromNumber(16383).shiftLeft(47))),V.high=V.high.or(H.high.and(X.fromNumber(0x7fffffffffff)))):(V.high=V.high.or(X.fromNumber(T&16383).shiftLeft(49)),V.high=V.high.or(H.high.and(X.fromNumber(562949953421311)))),V.low=H.low,r&&(V.high=V.high.or(X.fromString("9223372036854775808")));const K=Be.allocateUnsafe(16);return A=0,K[A++]=V.low.low&255,K[A++]=V.low.low>>8&255,K[A++]=V.low.low>>16&255,K[A++]=V.low.low>>24&255,K[A++]=V.low.high&255,K[A++]=V.low.high>>8&255,K[A++]=V.low.high>>16&255,K[A++]=V.low.high>>24&255,K[A++]=V.high.low&255,K[A++]=V.high.low>>8&255,K[A++]=V.high.low>>16&255,K[A++]=V.high.low>>24&255,K[A++]=V.high.high&255,K[A++]=V.high.high>>8&255,K[A++]=V.high.high>>16&255,K[A++]=V.high.high>>24&255,new wr(K)}toString(){let t,n=0;const r=new Array(36);for(let A=0;A<r.length;A++)r[A]=0;let a=0,s=!1,u,f={parts:[0,0,0,0]},d,h;const g=[];a=0;const y=this.bytes,b=y[a++]|y[a++]<<8|y[a++]<<16|y[a++]<<24,v=y[a++]|y[a++]<<8|y[a++]<<16|y[a++]<<24,x=y[a++]|y[a++]<<8|y[a++]<<16|y[a++]<<24,E=y[a++]|y[a++]<<8|y[a++]<<16|y[a++]<<24;a=0,{low:new X(b,v),high:new X(x,E)}.high.lessThan(X.ZERO)&&g.push("-");const w=E>>26&pP;if(w>>3===3){if(w===mP)return g.join("")+"Infinity";if(w===gP)return"NaN";t=E>>15&u_,u=8+(E>>14&1)}else u=E>>14&7,t=E>>17&u_;const O=t-o_;if(f.parts[0]=(E&16383)+((u&15)<<14),f.parts[1]=x,f.parts[2]=v,f.parts[3]=b,f.parts[0]===0&&f.parts[1]===0&&f.parts[2]===0&&f.parts[3]===0)s=!0;else for(h=3;h>=0;h--){let A=0;const M=yP(f);if(f=M.quotient,A=M.rem.low,!!A)for(d=8;d>=0;d--)r[h*9+d]=A%10,A=Math.floor(A/10)}if(s)n=1,r[a]=0;else for(n=36;!r[a];)n=n-1,a=a+1;const T=n-1+O;if(T>=34||T<=-7||O>0){if(n>34)return g.push("0"),O>0?g.push(`E+${O}`):O<0&&g.push(`E${O}`),g.join("");g.push(`${r[a++]}`),n=n-1,n&&g.push(".");for(let A=0;A<n;A++)g.push(`${r[a++]}`);g.push("E"),T>0?g.push(`+${T}`):g.push(`${T}`)}else if(O>=0)for(let A=0;A<n;A++)g.push(`${r[a++]}`);else{let A=n+O;if(A>0)for(let M=0;M<A;M++)g.push(`${r[a++]}`);else g.push("0");for(g.push(".");A++<0;)g.push("0");for(let M=0;M<n-Math.max(A-1,0);M++)g.push(`${r[a++]}`)}return g.join("")}toJSON(){return{$numberDecimal:this.toString()}}toExtendedJSON(){return{$numberDecimal:this.toString()}}static fromExtendedJSON(t){return wr.fromString(t.$numberDecimal)}inspect(t,n,r){return r??=_r,`new Decimal128(${r(this.toString(),n)})`}}class Ui extends $r{get _bsontype(){return"Double"}value;constructor(t){super(),t instanceof Number&&(t=t.valueOf()),this.value=+t}static fromString(t){const n=Number(t);if(t==="NaN")return new Ui(NaN);if(t==="Infinity")return new Ui(1/0);if(t==="-Infinity")return new Ui(-1/0);if(!Number.isFinite(n))throw new be(`Input: ${t} is not representable as a Double`);if(t.trim()!==t)throw new be(`Input: '${t}' contains whitespace`);if(t==="")throw new be("Input is an empty string");if(/[^-0-9.+eE]/.test(t))throw new be(`Input: '${t}' is not in decimal or exponential notation`);return new Ui(n)}valueOf(){return this.value}toJSON(){return this.value}toString(t){return this.value.toString(t)}toExtendedJSON(t){return t&&(t.legacy||t.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-0.0"}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}}static fromExtendedJSON(t,n){const r=parseFloat(t.$numberDouble);return n&&n.relaxed?r:new Ui(r)}inspect(t,n,r){return r??=_r,`new Double(${r(this.value,n)})`}}class vs extends $r{get _bsontype(){return"Int32"}value;constructor(t){super(),t instanceof Number&&(t=t.valueOf()),this.value=+t|0}static fromString(t){const n=JE(t),r=Number(t);if(fg<r)throw new be(`Input: '${t}' is larger than the maximum value for Int32`);if(dg>r)throw new be(`Input: '${t}' is smaller than the minimum value for Int32`);if(Number.isSafeInteger(r)){if(r.toString()!==n)throw new be(`Input: '${t}' is not a valid Int32 string`)}else throw new be(`Input: '${t}' is not a safe integer`);return new vs(r)}valueOf(){return this.value}toString(t){return this.value.toString(t)}toJSON(){return this.value}toExtendedJSON(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}}static fromExtendedJSON(t,n){return n&&n.relaxed?parseInt(t.$numberInt,10):new vs(t.$numberInt)}inspect(t,n,r){return r??=_r,`new Int32(${r(this.value,n)})`}}class Wf extends $r{get _bsontype(){return"MaxKey"}toExtendedJSON(){return{$maxKey:1}}static fromExtendedJSON(){return new Wf}inspect(){return"new MaxKey()"}}class Qf extends $r{get _bsontype(){return"MinKey"}toExtendedJSON(){return{$minKey:1}}static fromExtendedJSON(){return new Qf}inspect(){return"new MinKey()"}}let ba=null;const ru=new WeakMap;class vn extends $r{get _bsontype(){return"ObjectId"}static index=Math.floor(Math.random()*16777215);static cacheHexString;buffer;constructor(t){super();let n;if(typeof t=="object"&&t&&"id"in t){if(typeof t.id!="string"&&!ArrayBuffer.isView(t.id))throw new be("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?n=Be.fromHex(t.toHexString()):n=t.id}else n=t;if(n==null)this.buffer=vn.generate();else if(ArrayBuffer.isView(n)&&n.byteLength===12)this.buffer=Be.toLocalBufferType(n);else if(typeof n=="string")if(vn.validateHexString(n))this.buffer=Be.fromHex(n),vn.cacheHexString&&ru.set(this,n);else throw new be("input must be a 24 character hex string, 12 byte Uint8Array, or an integer");else throw new be("Argument passed in does not match the accepted types")}get id(){return this.buffer}set id(t){this.buffer=t,vn.cacheHexString&&ru.set(this,Be.toHex(t))}static validateHexString(t){if(t?.length!==24)return!1;for(let n=0;n<24;n++){const r=t.charCodeAt(n);if(!(r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70))return!1}return!0}toHexString(){if(vn.cacheHexString){const n=ru.get(this);if(n)return n}const t=Be.toHex(this.id);return vn.cacheHexString&&ru.set(this,t),t}static getInc(){return vn.index=(vn.index+1)%16777215}static generate(t){typeof t!="number"&&(t=Math.floor(Date.now()/1e3));const n=vn.getInc(),r=Be.allocateUnsafe(12);return va.setInt32BE(r,0,t),ba===null&&(ba=Be.randomBytes(5)),r[4]=ba[0],r[5]=ba[1],r[6]=ba[2],r[7]=ba[3],r[8]=ba[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r}toString(t){return t==="base64"?Be.toBase64(this.id):t==="hex"?this.toHexString():this.toHexString()}toJSON(){return this.toHexString()}static is(t){return t!=null&&typeof t=="object"&&"_bsontype"in t&&t._bsontype==="ObjectId"}equals(t){if(t==null)return!1;if(vn.is(t))return this.buffer[11]===t.buffer[11]&&Be.equals(this.buffer,t.buffer);if(typeof t=="string")return t.toLowerCase()===this.toHexString();if(typeof t=="object"&&typeof t.toHexString=="function"){const n=t.toHexString(),r=this.toHexString();return typeof n=="string"&&n.toLowerCase()===r}return!1}getTimestamp(){const t=new Date,n=va.getUint32BE(this.buffer,0);return t.setTime(Math.floor(n)*1e3),t}static createPk(){return new vn}serializeInto(t,n){return t[n]=this.buffer[0],t[n+1]=this.buffer[1],t[n+2]=this.buffer[2],t[n+3]=this.buffer[3],t[n+4]=this.buffer[4],t[n+5]=this.buffer[5],t[n+6]=this.buffer[6],t[n+7]=this.buffer[7],t[n+8]=this.buffer[8],t[n+9]=this.buffer[9],t[n+10]=this.buffer[10],t[n+11]=this.buffer[11],12}static createFromTime(t){const n=Be.allocate(12);for(let r=11;r>=4;r--)n[r]=0;return va.setInt32BE(n,0,t),new vn(n)}static createFromHexString(t){if(t?.length!==24)throw new be("hex string must be 24 characters");return new vn(Be.fromHex(t))}static createFromBase64(t){if(t?.length!==16)throw new be("base64 string must be 16 characters");return new vn(Be.fromBase64(t))}static isValid(t){if(t==null)return!1;if(typeof t=="string")return vn.validateHexString(t);try{return new vn(t),!0}catch{return!1}}toExtendedJSON(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}}static fromExtendedJSON(t){return new vn(t.$oid)}isCached(){return vn.cacheHexString&&ru.has(this)}inspect(t,n,r){return r??=_r,`new ObjectId(${r(this.toHexString(),n)})`}}function SP(e){return e.split("").sort().join("")}class ji extends $r{get _bsontype(){return"BSONRegExp"}pattern;options;constructor(t,n){if(super(),this.pattern=t,this.options=SP(n??""),this.pattern.indexOf("\0")!==-1)throw new be(`BSON Regex patterns cannot contain null bytes, found: ${JSON.stringify(this.pattern)}`);if(this.options.indexOf("\0")!==-1)throw new be(`BSON Regex options cannot contain null bytes, found: ${JSON.stringify(this.options)}`);for(let r=0;r<this.options.length;r++)if(!(this.options[r]==="i"||this.options[r]==="m"||this.options[r]==="x"||this.options[r]==="l"||this.options[r]==="s"||this.options[r]==="u"))throw new be(`The regular expression option [${this.options[r]}] is not supported`)}static parseOptions(t){return t?t.split("").sort().join(""):""}toExtendedJSON(t){return t=t||{},t.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}}static fromExtendedJSON(t){if("$regex"in t)if(typeof t.$regex!="string"){if(t.$regex._bsontype==="BSONRegExp")return t}else return new ji(t.$regex,ji.parseOptions(t.$options));if("$regularExpression"in t)return new ji(t.$regularExpression.pattern,ji.parseOptions(t.$regularExpression.options));throw new be(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(t)}`)}inspect(t,n,r){const a=q$(n)??(f=>f);r??=_r;const s=a(r(this.pattern),"regexp"),u=a(r(this.options),"regexp");return`new BSONRegExp(${s}, ${u})`}}class Jf extends $r{get _bsontype(){return"BSONSymbol"}value;constructor(t){super(),this.value=t}valueOf(){return this.value}toString(){return this.value}toJSON(){return this.value}toExtendedJSON(){return{$symbol:this.value}}static fromExtendedJSON(t){return new Jf(t.$symbol)}inspect(t,n,r){return r??=_r,`new BSONSymbol(${r(this.value,n)})`}}const xP=X;class _o extends xP{get _bsontype(){return"Timestamp"}get[QE](){return"Timestamp"}static MAX_VALUE=X.MAX_UNSIGNED_VALUE;get i(){return this.low>>>0}get t(){return this.high>>>0}constructor(t){if(t==null)super(0,0,!0);else if(typeof t=="bigint")super(t,!0);else if(X.isLong(t))super(t.low,t.high,!0);else if(typeof t=="object"&&"t"in t&&"i"in t){if(typeof t.t!="number"&&(typeof t.t!="object"||t.t._bsontype!=="Int32"))throw new be("Timestamp constructed from { t, i } must provide t as a number");if(typeof t.i!="number"&&(typeof t.i!="object"||t.i._bsontype!=="Int32"))throw new be("Timestamp constructed from { t, i } must provide i as a number");const n=Number(t.t),r=Number(t.i);if(n<0||Number.isNaN(n))throw new be("Timestamp constructed from { t, i } must provide a positive t");if(r<0||Number.isNaN(r))throw new be("Timestamp constructed from { t, i } must provide a positive i");if(n>4294967295)throw new be("Timestamp constructed from { t, i } must provide t equal or less than uint32 max");if(r>4294967295)throw new be("Timestamp constructed from { t, i } must provide i equal or less than uint32 max");super(r,n,!0)}else throw new be("A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }")}toJSON(){return{$timestamp:this.toString()}}static fromInt(t){return new _o(X.fromInt(t,!0))}static fromNumber(t){return new _o(X.fromNumber(t,!0))}static fromBits(t,n){return new _o({i:t,t:n})}static fromString(t,n){return new _o(X.fromString(t,!0,n))}toExtendedJSON(){return{$timestamp:{t:this.t,i:this.i}}}static fromExtendedJSON(t){const n=X.isLong(t.$timestamp.i)?t.$timestamp.i.getLowBitsUnsigned():t.$timestamp.i,r=X.isLong(t.$timestamp.t)?t.$timestamp.t.getLowBitsUnsigned():t.$timestamp.t;return new _o({t:r,i:n})}inspect(t,n,r){r??=_r;const a=r(this.t,n),s=r(this.i,n);return`new Timestamp({ t: ${a}, i: ${s} })`}}X.fromNumber(Y$),X.fromNumber(X$);function EP(e){return e!=null&&typeof e=="object"&&"_bsontype"in e&&typeof e._bsontype=="string"}const _P={$oid:vn,$binary:ut,$uuid:ut,$symbol:Jf,$numberInt:vs,$numberDecimal:wr,$numberDouble:Ui,$numberLong:X,$minKey:Qf,$maxKey:Wf,$regex:ji,$regularExpression:ji,$timestamp:_o};function f_(e,t={}){if(typeof e=="number"){const r=e<=fg&&e>=dg,a=e<=VE&&e>=FE;if(t.relaxed||t.legacy)return e;if(Number.isInteger(e)&&!Object.is(e,-0)){if(r)return new vs(e);if(a)return t.useBigInt64?BigInt(e):X.fromNumber(e)}return new Ui(e)}if(e==null||typeof e!="object")return e;if(e.$undefined)return null;const n=Object.keys(e).filter(r=>r.startsWith("$")&&e[r]!=null);for(let r=0;r<n.length;r++){const a=_P[n[r]];if(a)return a.fromExtendedJSON(e,t)}if(e.$date!=null){const r=e.$date,a=new Date;if(t.legacy)if(typeof r=="number")a.setTime(r);else if(typeof r=="string")a.setTime(Date.parse(r));else if(typeof r=="bigint")a.setTime(Number(r));else throw new qE(`Unrecognized type for EJSON date: ${typeof r}`);else if(typeof r=="string")a.setTime(Date.parse(r));else if(X.isLong(r))a.setTime(r.toNumber());else if(typeof r=="number"&&t.relaxed)a.setTime(r);else if(typeof r=="bigint")a.setTime(Number(r));else throw new qE(`Unrecognized type for EJSON date: ${typeof r}`);return a}if(e.$code!=null){const r=Object.assign({},e);return e.$scope&&(r.$scope=f_(e.$scope)),tu.fromExtendedJSON(e)}if(oP(e)||e.$dbPointer){const r=e.$ref?e:e.$dbPointer;if(r instanceof ms)return r;const a=Object.keys(r).filter(u=>u.startsWith("$"));let s=!0;if(a.forEach(u=>{["$ref","$id","$db"].indexOf(u)===-1&&(s=!1)}),s)return ms.fromExtendedJSON(r)}return e}function wP(e,t){return e.map((n,r)=>{t.seenObjects.push({propertyName:`index ${r}`,obj:null});try{return Hi(n,t)}finally{t.seenObjects.pop()}})}function d_(e){const t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function Hi(e,t){if(e instanceof Map||jE(e)){const n=Object.create(null);for(const[r,a]of e){if(typeof r!="string")throw new be("Can only serialize maps with string keys");n[r]=a}return Hi(n,t)}if((typeof e=="object"||typeof e=="function")&&e!==null){const n=t.seenObjects.findIndex(r=>r.obj===e);if(n!==-1){const r=t.seenObjects.map(g=>g.propertyName),a=r.slice(0,n).map(g=>`${g} -> `).join(""),s=r[n],u=" -> "+r.slice(n+1,r.length-1).map(g=>`${g} -> `).join(""),f=r[r.length-1],d=" ".repeat(a.length+s.length/2),h="-".repeat(u.length+(s.length+f.length)/2-1);throw new be(`Converting circular structure to EJSON:
|
|
173
|
+
`:""})`}}function oP(e){return e!=null&&typeof e=="object"&&"$id"in e&&e.$id!=null&&"$ref"in e&&typeof e.$ref=="string"&&(!("$db"in e)||"$db"in e&&typeof e.$db=="string")}class gs extends $r{get _bsontype(){return"DBRef"}collection;oid;db;fields;constructor(t,n,r,a){super();const s=t.split(".");s.length===2&&(r=s.shift(),t=s.shift()),this.collection=t,this.oid=n,this.db=r,this.fields=a||{}}get namespace(){return this.collection}set namespace(t){this.collection=t}toJSON(){const t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(t.$db=this.db),t}toExtendedJSON(t){t=t||{};let n={$ref:this.collection,$id:this.oid};return t.legacy||(this.db&&(n.$db=this.db),n=Object.assign(n,this.fields)),n}static fromExtendedJSON(t){const n=Object.assign({},t);return delete n.$ref,delete n.$id,delete n.$db,new gs(t.$ref,t.$id,t.$db,n)}inspect(t,n,r){r??=_r;const a=[r(this.namespace,n),r(this.oid,n),...this.db?[r(this.db,n)]:[],...Object.keys(this.fields).length>0?[r(this.fields,n)]:[]];return a[1]=r===_r?`new ObjectId(${a[1]})`:a[1],`new DBRef(${a.join(", ")})`}}function JE(e){if(e==="")return e;let t=0;const n=e[t]==="-",r=e[t]==="+";(r||n)&&(t+=1);let a=!1;for(;t<e.length&&e[t]==="0";++t)a=!0;return a?`${n?"-":""}${e.length===t?"0":e.slice(t)}`:r?e.slice(1):e}function aP(e,t){t=t??10;const n="0123456789abcdefghijklmnopqrstuvwxyz".slice(0,t);return new RegExp(`[^-+${n}]`,"i").test(e)?!1:e}let Pr;try{Pr=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}const e_=65536,sP=1<<24,ys=e_*e_,t_=ys*ys,n_=t_/2,r_={},i_={},lP=20,uP=/^(\+?0|(\+|-)?[1-9][0-9]*)$/;class X extends $r{get _bsontype(){return"Long"}get __isLong__(){return!0}high;low;unsigned;constructor(t=0,n,r){super();const a=typeof n=="boolean"?n:!!r,s=typeof n=="number"?n:0,u=typeof t=="string"?X.fromString(t,a):typeof t=="bigint"?X.fromBigInt(t,a):{low:t|0,high:s|0,unsigned:a};this.low=u.low,this.high=u.high,this.unsigned=u.unsigned}static TWO_PWR_24=X.fromInt(sP);static MAX_UNSIGNED_VALUE=X.fromBits(-1,-1,!0);static ZERO=X.fromInt(0);static UZERO=X.fromInt(0,!0);static ONE=X.fromInt(1);static UONE=X.fromInt(1,!0);static NEG_ONE=X.fromInt(-1);static MAX_VALUE=X.fromBits(-1,2147483647,!1);static MIN_VALUE=X.fromBits(0,-2147483648,!1);static fromBits(t,n,r){return new X(t,n,r)}static fromInt(t,n){let r,a,s;return n?(t>>>=0,(s=0<=t&&t<256)&&(a=i_[t],a)?a:(r=X.fromBits(t,(t|0)<0?-1:0,!0),s&&(i_[t]=r),r)):(t|=0,(s=-128<=t&&t<128)&&(a=r_[t],a)?a:(r=X.fromBits(t,t<0?-1:0,!1),s&&(r_[t]=r),r))}static fromNumber(t,n){if(isNaN(t))return n?X.UZERO:X.ZERO;if(n){if(t<0)return X.UZERO;if(t>=t_)return X.MAX_UNSIGNED_VALUE}else{if(t<=-n_)return X.MIN_VALUE;if(t+1>=n_)return X.MAX_VALUE}return t<0?X.fromNumber(-t,n).neg():X.fromBits(t%ys|0,t/ys|0,n)}static fromBigInt(t,n){const r=0xffffffffn,a=32n;return new X(Number(t&r),Number(t>>a&r),n)}static _fromString(t,n,r){if(t.length===0)throw new be("empty string");if(r<2||36<r)throw new be("radix");let a;if((a=t.indexOf("-"))>0)throw new be("interior hyphen");if(a===0)return X._fromString(t.substring(1),n,r).neg();const s=X.fromNumber(Math.pow(r,8));let u=X.ZERO;for(let f=0;f<t.length;f+=8){const d=Math.min(8,t.length-f),h=parseInt(t.substring(f,f+d),r);if(d<8){const g=X.fromNumber(Math.pow(r,d));u=u.mul(g).add(X.fromNumber(h))}else u=u.mul(s),u=u.add(X.fromNumber(h))}return u.unsigned=n,u}static fromStringStrict(t,n,r){let a=!1;if(typeof n=="number"?(r=n,n=!1):a=!!n,r??=10,t.trim()!==t)throw new be(`Input: '${t}' contains leading and/or trailing whitespace`);if(!aP(t,r))throw new be(`Input: '${t}' contains invalid characters for radix: ${r}`);const s=JE(t),u=X._fromString(s,a,r);if(u.toString(r).toLowerCase()!==s.toLowerCase())throw new be(`Input: ${t} is not representable as ${u.unsigned?"an unsigned":"a signed"} 64-bit Long ${r!=null?`with radix: ${r}`:""}`);return u}static fromString(t,n,r){let a=!1;return typeof n=="number"?(r=n,n=!1):a=!!n,r??=10,t==="NaN"&&r<24||(t==="Infinity"||t==="+Infinity"||t==="-Infinity")&&r<35?X.ZERO:X._fromString(t,a,r)}static fromBytes(t,n,r){return r?X.fromBytesLE(t,n):X.fromBytesBE(t,n)}static fromBytesLE(t,n){return new X(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)}static fromBytesBE(t,n){return new X(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)}static isLong(t){return t!=null&&typeof t=="object"&&"__isLong__"in t&&t.__isLong__===!0}static fromValue(t,n){return typeof t=="number"?X.fromNumber(t,n):typeof t=="string"?X.fromString(t,n):X.fromBits(t.low,t.high,typeof n=="boolean"?n:t.unsigned)}add(t){X.isLong(t)||(t=X.fromValue(t));const n=this.high>>>16,r=this.high&65535,a=this.low>>>16,s=this.low&65535,u=t.high>>>16,f=t.high&65535,d=t.low>>>16,h=t.low&65535;let g=0,y=0,b=0,v=0;return v+=s+h,b+=v>>>16,v&=65535,b+=a+d,y+=b>>>16,b&=65535,y+=r+f,g+=y>>>16,y&=65535,g+=n+u,g&=65535,X.fromBits(b<<16|v,g<<16|y,this.unsigned)}and(t){return X.isLong(t)||(t=X.fromValue(t)),X.fromBits(this.low&t.low,this.high&t.high,this.unsigned)}compare(t){if(X.isLong(t)||(t=X.fromValue(t)),this.eq(t))return 0;const n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1}comp(t){return this.compare(t)}divide(t){if(X.isLong(t)||(t=X.fromValue(t)),t.isZero())throw new be("division by zero");if(Pr){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;const s=(this.unsigned?Pr.div_u:Pr.div_s)(this.low,this.high,t.low,t.high);return X.fromBits(s,Pr.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?X.UZERO:X.ZERO;let n,r,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return X.UZERO;if(t.gt(this.shru(1)))return X.UONE;a=X.UZERO}else{if(this.eq(X.MIN_VALUE))return t.eq(X.ONE)||t.eq(X.NEG_ONE)?X.MIN_VALUE:t.eq(X.MIN_VALUE)?X.ONE:(n=this.shr(1).div(t).shl(1),n.eq(X.ZERO)?t.isNegative()?X.ONE:X.NEG_ONE:(r=this.sub(t.mul(n)),a=n.add(r.div(t)),a));if(t.eq(X.MIN_VALUE))return this.unsigned?X.UZERO:X.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();a=X.ZERO}for(r=this;r.gte(t);){n=Math.max(1,Math.floor(r.toNumber()/t.toNumber()));const s=Math.ceil(Math.log(n)/Math.LN2),u=s<=48?1:Math.pow(2,s-48);let f=X.fromNumber(n),d=f.mul(t);for(;d.isNegative()||d.gt(r);)n-=u,f=X.fromNumber(n,this.unsigned),d=f.mul(t);f.isZero()&&(f=X.ONE),a=a.add(f),r=r.sub(d)}return a}div(t){return this.divide(t)}equals(t){return X.isLong(t)||(t=X.fromValue(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low}eq(t){return this.equals(t)}getHighBits(){return this.high}getHighBitsUnsigned(){return this.high>>>0}getLowBits(){return this.low}getLowBitsUnsigned(){return this.low>>>0}getNumBitsAbs(){if(this.isNegative())return this.eq(X.MIN_VALUE)?64:this.neg().getNumBitsAbs();const t=this.high!==0?this.high:this.low;let n;for(n=31;n>0&&(t&1<<n)===0;n--);return this.high!==0?n+33:n+1}greaterThan(t){return this.comp(t)>0}gt(t){return this.greaterThan(t)}greaterThanOrEqual(t){return this.comp(t)>=0}gte(t){return this.greaterThanOrEqual(t)}ge(t){return this.greaterThanOrEqual(t)}isEven(){return(this.low&1)===0}isNegative(){return!this.unsigned&&this.high<0}isOdd(){return(this.low&1)===1}isPositive(){return this.unsigned||this.high>=0}isZero(){return this.high===0&&this.low===0}lessThan(t){return this.comp(t)<0}lt(t){return this.lessThan(t)}lessThanOrEqual(t){return this.comp(t)<=0}lte(t){return this.lessThanOrEqual(t)}modulo(t){if(X.isLong(t)||(t=X.fromValue(t)),Pr){const n=(this.unsigned?Pr.rem_u:Pr.rem_s)(this.low,this.high,t.low,t.high);return X.fromBits(n,Pr.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))}mod(t){return this.modulo(t)}rem(t){return this.modulo(t)}multiply(t){if(this.isZero())return X.ZERO;if(X.isLong(t)||(t=X.fromValue(t)),Pr){const x=Pr.mul(this.low,this.high,t.low,t.high);return X.fromBits(x,Pr.get_high(),this.unsigned)}if(t.isZero())return X.ZERO;if(this.eq(X.MIN_VALUE))return t.isOdd()?X.MIN_VALUE:X.ZERO;if(t.eq(X.MIN_VALUE))return this.isOdd()?X.MIN_VALUE:X.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(X.TWO_PWR_24)&&t.lt(X.TWO_PWR_24))return X.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);const n=this.high>>>16,r=this.high&65535,a=this.low>>>16,s=this.low&65535,u=t.high>>>16,f=t.high&65535,d=t.low>>>16,h=t.low&65535;let g=0,y=0,b=0,v=0;return v+=s*h,b+=v>>>16,v&=65535,b+=a*h,y+=b>>>16,b&=65535,b+=s*d,y+=b>>>16,b&=65535,y+=r*h,g+=y>>>16,y&=65535,y+=a*d,g+=y>>>16,y&=65535,y+=s*f,g+=y>>>16,y&=65535,g+=n*h+r*d+a*f+s*u,g&=65535,X.fromBits(b<<16|v,g<<16|y,this.unsigned)}mul(t){return this.multiply(t)}negate(){return!this.unsigned&&this.eq(X.MIN_VALUE)?X.MIN_VALUE:this.not().add(X.ONE)}neg(){return this.negate()}not(){return X.fromBits(~this.low,~this.high,this.unsigned)}notEquals(t){return!this.equals(t)}neq(t){return this.notEquals(t)}ne(t){return this.notEquals(t)}or(t){return X.isLong(t)||(t=X.fromValue(t)),X.fromBits(this.low|t.low,this.high|t.high,this.unsigned)}shiftLeft(t){return X.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?X.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):X.fromBits(0,this.low<<t-32,this.unsigned)}shl(t){return this.shiftLeft(t)}shiftRight(t){return X.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?X.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):X.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)}shr(t){return this.shiftRight(t)}shiftRightUnsigned(t){if(X.isLong(t)&&(t=t.toInt()),t&=63,t===0)return this;{const n=this.high;if(t<32){const r=this.low;return X.fromBits(r>>>t|n<<32-t,n>>>t,this.unsigned)}else return t===32?X.fromBits(n,0,this.unsigned):X.fromBits(n>>>t-32,0,this.unsigned)}}shr_u(t){return this.shiftRightUnsigned(t)}shru(t){return this.shiftRightUnsigned(t)}subtract(t){return X.isLong(t)||(t=X.fromValue(t)),this.add(t.neg())}sub(t){return this.subtract(t)}toInt(){return this.unsigned?this.low>>>0:this.low}toNumber(){return this.unsigned?(this.high>>>0)*ys+(this.low>>>0):this.high*ys+(this.low>>>0)}toBigInt(){return BigInt(this.toString())}toBytes(t){return t?this.toBytesLE():this.toBytesBE()}toBytesLE(){const t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]}toBytesBE(){const t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]}toSigned(){return this.unsigned?X.fromBits(this.low,this.high,!1):this}toString(t){if(t=t||10,t<2||36<t)throw new be("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(X.MIN_VALUE)){const s=X.fromNumber(t),u=this.div(s),f=u.mul(s).sub(this);return u.toString(t)+f.toInt().toString(t)}else return"-"+this.neg().toString(t);const n=X.fromNumber(Math.pow(t,6),this.unsigned);let r=this,a="";for(;;){const s=r.div(n);let f=(r.sub(s.mul(n)).toInt()>>>0).toString(t);if(r=s,r.isZero())return f+a;for(;f.length<6;)f="0"+f;a=""+f+a}}toUnsigned(){return this.unsigned?this:X.fromBits(this.low,this.high,!0)}xor(t){return X.isLong(t)||(t=X.fromValue(t)),X.fromBits(this.low^t.low,this.high^t.high,this.unsigned)}eqz(){return this.isZero()}le(t){return this.lessThanOrEqual(t)}toExtendedJSON(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}}static fromExtendedJSON(t,n){const{useBigInt64:r=!1,relaxed:a=!0}={...n};if(t.$numberLong.length>lP)throw new be("$numberLong string is too long");if(!uP.test(t.$numberLong))throw new be(`$numberLong string "${t.$numberLong}" is in an invalid format`);if(r){const u=BigInt(t.$numberLong);return BigInt.asIntN(64,u)}const s=X.fromString(t.$numberLong);return a?s.toNumber():s}inspect(t,n,r){r??=_r;const a=r(this.toString(),n),s=this.unsigned?`, ${r(this.unsigned,n)}`:"";return`new Long(${a}${s})`}}const cP=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,fP=/^(\+|-)?(Infinity|inf)$/i,dP=/^(\+|-)?NaN$/i,vs=6111,nu=-6176,o_=6176,a_=34,mg=Be.fromNumberArray([124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),s_=Be.fromNumberArray([248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),l_=Be.fromNumberArray([120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),hP=/^([-+])?(\d+)?$/,pP=31,u_=16383,mP=30,gP=31;function c_(e){return!isNaN(parseInt(e,10))}function yP(e){const t=X.fromNumber(1e9);let n=X.fromNumber(0);if(!e.parts[0]&&!e.parts[1]&&!e.parts[2]&&!e.parts[3])return{quotient:e,rem:n};for(let r=0;r<=3;r++)n=n.shiftLeft(32),n=n.add(new X(e.parts[r],0)),e.parts[r]=n.div(t).low,n=n.modulo(t);return{quotient:e,rem:n}}function vP(e,t){if(!e&&!t)return{high:X.fromNumber(0),low:X.fromNumber(0)};const n=e.shiftRightUnsigned(32),r=new X(e.getLowBits(),0),a=t.shiftRightUnsigned(32),s=new X(t.getLowBits(),0);let u=n.multiply(a),f=n.multiply(s);const d=r.multiply(a);let h=r.multiply(s);return u=u.add(f.shiftRightUnsigned(32)),f=new X(f.getLowBits(),0).add(d).add(h.shiftRightUnsigned(32)),u=u.add(f.shiftRightUnsigned(32)),h=f.shiftLeft(32).add(new X(h.getLowBits(),0)),{high:u,low:h}}function bP(e,t){const n=e.high>>>0,r=t.high>>>0;if(n<r)return!0;if(n===r){const a=e.low>>>0,s=t.low>>>0;if(a<s)return!0}return!1}function ii(e,t){throw new be(`"${e}" is not a valid Decimal128 string - ${t}`)}class wr extends $r{get _bsontype(){return"Decimal128"}bytes;constructor(t){if(super(),typeof t=="string")this.bytes=wr.fromString(t).bytes;else if(t instanceof Uint8Array||Kf(t)){if(t.byteLength!==16)throw new be("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new be("Decimal128 must take a Buffer or string")}static fromString(t){return wr._fromString(t,{allowRounding:!1})}static fromStringWithRounding(t){return wr._fromString(t,{allowRounding:!0})}static _fromString(t,n){let r=!1,a=!1,s=!1,u=!1,f=0,d=0,h=0,g=0,y=0;const b=[0];let v=0,x=0,E=0,_=0,w=new X(0,0),O=new X(0,0),T=0,A=0;if(t.length>=7e3)throw new be(""+t+" not a valid Decimal128 string");const M=t.match(cP),R=t.match(fP),$=t.match(dP);if(!M&&!R&&!$||t.length===0)throw new be(""+t+" not a valid Decimal128 string");if(M){const G=M[2],C=M[4],q=M[5],U=M[6];C&&U===void 0&&ii(t,"missing exponent power"),C&&G===void 0&&ii(t,"missing exponent base"),C===void 0&&(q||U)&&ii(t,"missing e before exponent")}if((t[A]==="+"||t[A]==="-")&&(a=!0,r=t[A++]==="-"),!c_(t[A])&&t[A]!=="."){if(t[A]==="i"||t[A]==="I")return new wr(r?s_:l_);if(t[A]==="N")return new wr(mg)}for(;c_(t[A])||t[A]===".";){if(t[A]==="."){s&&ii(t,"contains multiple periods"),s=!0,A=A+1;continue}v<a_&&(t[A]!=="0"||u)&&(u||(y=d),u=!0,b[x++]=parseInt(t[A],10),v=v+1),u&&(h=h+1),s&&(g=g+1),d=d+1,A=A+1}if(s&&!d)throw new be(""+t+" not a valid Decimal128 string");if(t[A]==="e"||t[A]==="E"){const G=t.substr(++A).match(hP);if(!G||!G[2])return new wr(mg);_=parseInt(G[0],10),A=A+G[0].length}if(t[A])return new wr(mg);if(!v)b[0]=0,h=1,v=1,f=0;else if(E=v-1,f=h,f!==1)for(;t[y+f-1+Number(a)+Number(s)]==="0";)f=f-1;for(_<=g&&g>_+16384?_=nu:_=_-g;_>vs;){if(E=E+1,E>=a_){if(f===0){_=vs;break}ii(t,"overflow")}_=_-1}if(n.allowRounding){for(;_<nu||v<h;){if(E===0&&f<v){_=nu,f=0;break}if(v<h?h=h-1:E=E-1,_<vs)_=_+1;else{if(b.join("").match(/^0+$/)){_=vs;break}ii(t,"overflow")}}if(E+1<f){let G=d;s&&(y=y+1,G=G+1),a&&(y=y+1,G=G+1);const C=parseInt(t[y+E+1],10);let q=0;if(C>=5&&(q=1,C===5)){q=b[E]%2===1?1:0;for(let U=y+E+2;U<G;U++)if(parseInt(t[U],10)){q=1;break}}if(q){let U=E;for(;U>=0&&++b[U]>9;U--)if(b[U]=0,U===0)if(_<vs)_=_+1,b[U]=1;else return new wr(r?s_:l_)}}}else{for(;_<nu||v<h;){if(E===0){if(f===0){_=nu;break}ii(t,"exponent underflow")}v<h?(t[h-1+Number(a)+Number(s)]!=="0"&&f!==0&&ii(t,"inexact rounding"),h=h-1):(b[E]!==0&&ii(t,"inexact rounding"),E=E-1),_<vs?_=_+1:ii(t,"overflow")}E+1<f&&(s&&(y=y+1),a&&(y=y+1),parseInt(t[y+E+1],10)!==0&&ii(t,"inexact rounding"))}if(w=X.fromNumber(0),O=X.fromNumber(0),f===0)w=X.fromNumber(0),O=X.fromNumber(0);else if(E<17){let G=0;for(O=X.fromNumber(b[G++]),w=new X(0,0);G<=E;G++)O=O.multiply(X.fromNumber(10)),O=O.add(X.fromNumber(b[G]))}else{let G=0;for(w=X.fromNumber(b[G++]);G<=E-17;G++)w=w.multiply(X.fromNumber(10)),w=w.add(X.fromNumber(b[G]));for(O=X.fromNumber(b[G++]);G<=E;G++)O=O.multiply(X.fromNumber(10)),O=O.add(X.fromNumber(b[G]))}const H=vP(w,X.fromString("100000000000000000"));H.low=H.low.add(O),bP(H.low,O)&&(H.high=H.high.add(X.fromNumber(1))),T=_+o_;const V={low:X.fromNumber(0),high:X.fromNumber(0)};H.high.shiftRightUnsigned(49).and(X.fromNumber(1)).equals(X.fromNumber(1))?(V.high=V.high.or(X.fromNumber(3).shiftLeft(61)),V.high=V.high.or(X.fromNumber(T).and(X.fromNumber(16383).shiftLeft(47))),V.high=V.high.or(H.high.and(X.fromNumber(0x7fffffffffff)))):(V.high=V.high.or(X.fromNumber(T&16383).shiftLeft(49)),V.high=V.high.or(H.high.and(X.fromNumber(562949953421311)))),V.low=H.low,r&&(V.high=V.high.or(X.fromString("9223372036854775808")));const K=Be.allocateUnsafe(16);return A=0,K[A++]=V.low.low&255,K[A++]=V.low.low>>8&255,K[A++]=V.low.low>>16&255,K[A++]=V.low.low>>24&255,K[A++]=V.low.high&255,K[A++]=V.low.high>>8&255,K[A++]=V.low.high>>16&255,K[A++]=V.low.high>>24&255,K[A++]=V.high.low&255,K[A++]=V.high.low>>8&255,K[A++]=V.high.low>>16&255,K[A++]=V.high.low>>24&255,K[A++]=V.high.high&255,K[A++]=V.high.high>>8&255,K[A++]=V.high.high>>16&255,K[A++]=V.high.high>>24&255,new wr(K)}toString(){let t,n=0;const r=new Array(36);for(let A=0;A<r.length;A++)r[A]=0;let a=0,s=!1,u,f={parts:[0,0,0,0]},d,h;const g=[];a=0;const y=this.bytes,b=y[a++]|y[a++]<<8|y[a++]<<16|y[a++]<<24,v=y[a++]|y[a++]<<8|y[a++]<<16|y[a++]<<24,x=y[a++]|y[a++]<<8|y[a++]<<16|y[a++]<<24,E=y[a++]|y[a++]<<8|y[a++]<<16|y[a++]<<24;a=0,{low:new X(b,v),high:new X(x,E)}.high.lessThan(X.ZERO)&&g.push("-");const w=E>>26&pP;if(w>>3===3){if(w===mP)return g.join("")+"Infinity";if(w===gP)return"NaN";t=E>>15&u_,u=8+(E>>14&1)}else u=E>>14&7,t=E>>17&u_;const O=t-o_;if(f.parts[0]=(E&16383)+((u&15)<<14),f.parts[1]=x,f.parts[2]=v,f.parts[3]=b,f.parts[0]===0&&f.parts[1]===0&&f.parts[2]===0&&f.parts[3]===0)s=!0;else for(h=3;h>=0;h--){let A=0;const M=yP(f);if(f=M.quotient,A=M.rem.low,!!A)for(d=8;d>=0;d--)r[h*9+d]=A%10,A=Math.floor(A/10)}if(s)n=1,r[a]=0;else for(n=36;!r[a];)n=n-1,a=a+1;const T=n-1+O;if(T>=34||T<=-7||O>0){if(n>34)return g.push("0"),O>0?g.push(`E+${O}`):O<0&&g.push(`E${O}`),g.join("");g.push(`${r[a++]}`),n=n-1,n&&g.push(".");for(let A=0;A<n;A++)g.push(`${r[a++]}`);g.push("E"),T>0?g.push(`+${T}`):g.push(`${T}`)}else if(O>=0)for(let A=0;A<n;A++)g.push(`${r[a++]}`);else{let A=n+O;if(A>0)for(let M=0;M<A;M++)g.push(`${r[a++]}`);else g.push("0");for(g.push(".");A++<0;)g.push("0");for(let M=0;M<n-Math.max(A-1,0);M++)g.push(`${r[a++]}`)}return g.join("")}toJSON(){return{$numberDecimal:this.toString()}}toExtendedJSON(){return{$numberDecimal:this.toString()}}static fromExtendedJSON(t){return wr.fromString(t.$numberDecimal)}inspect(t,n,r){return r??=_r,`new Decimal128(${r(this.toString(),n)})`}}class Ui extends $r{get _bsontype(){return"Double"}value;constructor(t){super(),t instanceof Number&&(t=t.valueOf()),this.value=+t}static fromString(t){const n=Number(t);if(t==="NaN")return new Ui(NaN);if(t==="Infinity")return new Ui(1/0);if(t==="-Infinity")return new Ui(-1/0);if(!Number.isFinite(n))throw new be(`Input: ${t} is not representable as a Double`);if(t.trim()!==t)throw new be(`Input: '${t}' contains whitespace`);if(t==="")throw new be("Input is an empty string");if(/[^-0-9.+eE]/.test(t))throw new be(`Input: '${t}' is not in decimal or exponential notation`);return new Ui(n)}valueOf(){return this.value}toJSON(){return this.value}toString(t){return this.value.toString(t)}toExtendedJSON(t){return t&&(t.legacy||t.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-0.0"}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}}static fromExtendedJSON(t,n){const r=parseFloat(t.$numberDouble);return n&&n.relaxed?r:new Ui(r)}inspect(t,n,r){return r??=_r,`new Double(${r(this.value,n)})`}}class bs extends $r{get _bsontype(){return"Int32"}value;constructor(t){super(),t instanceof Number&&(t=t.valueOf()),this.value=+t|0}static fromString(t){const n=JE(t),r=Number(t);if(fg<r)throw new be(`Input: '${t}' is larger than the maximum value for Int32`);if(dg>r)throw new be(`Input: '${t}' is smaller than the minimum value for Int32`);if(Number.isSafeInteger(r)){if(r.toString()!==n)throw new be(`Input: '${t}' is not a valid Int32 string`)}else throw new be(`Input: '${t}' is not a safe integer`);return new bs(r)}valueOf(){return this.value}toString(t){return this.value.toString(t)}toJSON(){return this.value}toExtendedJSON(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}}static fromExtendedJSON(t,n){return n&&n.relaxed?parseInt(t.$numberInt,10):new bs(t.$numberInt)}inspect(t,n,r){return r??=_r,`new Int32(${r(this.value,n)})`}}class Wf extends $r{get _bsontype(){return"MaxKey"}toExtendedJSON(){return{$maxKey:1}}static fromExtendedJSON(){return new Wf}inspect(){return"new MaxKey()"}}class Qf extends $r{get _bsontype(){return"MinKey"}toExtendedJSON(){return{$minKey:1}}static fromExtendedJSON(){return new Qf}inspect(){return"new MinKey()"}}let ba=null;const ru=new WeakMap;class bn extends $r{get _bsontype(){return"ObjectId"}static index=Math.floor(Math.random()*16777215);static cacheHexString;buffer;constructor(t){super();let n;if(typeof t=="object"&&t&&"id"in t){if(typeof t.id!="string"&&!ArrayBuffer.isView(t.id))throw new be("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?n=Be.fromHex(t.toHexString()):n=t.id}else n=t;if(n==null)this.buffer=bn.generate();else if(ArrayBuffer.isView(n)&&n.byteLength===12)this.buffer=Be.toLocalBufferType(n);else if(typeof n=="string")if(bn.validateHexString(n))this.buffer=Be.fromHex(n),bn.cacheHexString&&ru.set(this,n);else throw new be("input must be a 24 character hex string, 12 byte Uint8Array, or an integer");else throw new be("Argument passed in does not match the accepted types")}get id(){return this.buffer}set id(t){this.buffer=t,bn.cacheHexString&&ru.set(this,Be.toHex(t))}static validateHexString(t){if(t?.length!==24)return!1;for(let n=0;n<24;n++){const r=t.charCodeAt(n);if(!(r>=48&&r<=57||r>=97&&r<=102||r>=65&&r<=70))return!1}return!0}toHexString(){if(bn.cacheHexString){const n=ru.get(this);if(n)return n}const t=Be.toHex(this.id);return bn.cacheHexString&&ru.set(this,t),t}static getInc(){return bn.index=(bn.index+1)%16777215}static generate(t){typeof t!="number"&&(t=Math.floor(Date.now()/1e3));const n=bn.getInc(),r=Be.allocateUnsafe(12);return va.setInt32BE(r,0,t),ba===null&&(ba=Be.randomBytes(5)),r[4]=ba[0],r[5]=ba[1],r[6]=ba[2],r[7]=ba[3],r[8]=ba[4],r[11]=n&255,r[10]=n>>8&255,r[9]=n>>16&255,r}toString(t){return t==="base64"?Be.toBase64(this.id):t==="hex"?this.toHexString():this.toHexString()}toJSON(){return this.toHexString()}static is(t){return t!=null&&typeof t=="object"&&"_bsontype"in t&&t._bsontype==="ObjectId"}equals(t){if(t==null)return!1;if(bn.is(t))return this.buffer[11]===t.buffer[11]&&Be.equals(this.buffer,t.buffer);if(typeof t=="string")return t.toLowerCase()===this.toHexString();if(typeof t=="object"&&typeof t.toHexString=="function"){const n=t.toHexString(),r=this.toHexString();return typeof n=="string"&&n.toLowerCase()===r}return!1}getTimestamp(){const t=new Date,n=va.getUint32BE(this.buffer,0);return t.setTime(Math.floor(n)*1e3),t}static createPk(){return new bn}serializeInto(t,n){return t[n]=this.buffer[0],t[n+1]=this.buffer[1],t[n+2]=this.buffer[2],t[n+3]=this.buffer[3],t[n+4]=this.buffer[4],t[n+5]=this.buffer[5],t[n+6]=this.buffer[6],t[n+7]=this.buffer[7],t[n+8]=this.buffer[8],t[n+9]=this.buffer[9],t[n+10]=this.buffer[10],t[n+11]=this.buffer[11],12}static createFromTime(t){const n=Be.allocate(12);for(let r=11;r>=4;r--)n[r]=0;return va.setInt32BE(n,0,t),new bn(n)}static createFromHexString(t){if(t?.length!==24)throw new be("hex string must be 24 characters");return new bn(Be.fromHex(t))}static createFromBase64(t){if(t?.length!==16)throw new be("base64 string must be 16 characters");return new bn(Be.fromBase64(t))}static isValid(t){if(t==null)return!1;if(typeof t=="string")return bn.validateHexString(t);try{return new bn(t),!0}catch{return!1}}toExtendedJSON(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}}static fromExtendedJSON(t){return new bn(t.$oid)}isCached(){return bn.cacheHexString&&ru.has(this)}inspect(t,n,r){return r??=_r,`new ObjectId(${r(this.toHexString(),n)})`}}function SP(e){return e.split("").sort().join("")}class ji extends $r{get _bsontype(){return"BSONRegExp"}pattern;options;constructor(t,n){if(super(),this.pattern=t,this.options=SP(n??""),this.pattern.indexOf("\0")!==-1)throw new be(`BSON Regex patterns cannot contain null bytes, found: ${JSON.stringify(this.pattern)}`);if(this.options.indexOf("\0")!==-1)throw new be(`BSON Regex options cannot contain null bytes, found: ${JSON.stringify(this.options)}`);for(let r=0;r<this.options.length;r++)if(!(this.options[r]==="i"||this.options[r]==="m"||this.options[r]==="x"||this.options[r]==="l"||this.options[r]==="s"||this.options[r]==="u"))throw new be(`The regular expression option [${this.options[r]}] is not supported`)}static parseOptions(t){return t?t.split("").sort().join(""):""}toExtendedJSON(t){return t=t||{},t.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}}static fromExtendedJSON(t){if("$regex"in t)if(typeof t.$regex!="string"){if(t.$regex._bsontype==="BSONRegExp")return t}else return new ji(t.$regex,ji.parseOptions(t.$options));if("$regularExpression"in t)return new ji(t.$regularExpression.pattern,ji.parseOptions(t.$regularExpression.options));throw new be(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(t)}`)}inspect(t,n,r){const a=q$(n)??(f=>f);r??=_r;const s=a(r(this.pattern),"regexp"),u=a(r(this.options),"regexp");return`new BSONRegExp(${s}, ${u})`}}class Jf extends $r{get _bsontype(){return"BSONSymbol"}value;constructor(t){super(),this.value=t}valueOf(){return this.value}toString(){return this.value}toJSON(){return this.value}toExtendedJSON(){return{$symbol:this.value}}static fromExtendedJSON(t){return new Jf(t.$symbol)}inspect(t,n,r){return r??=_r,`new BSONSymbol(${r(this.value,n)})`}}const xP=X;class _o extends xP{get _bsontype(){return"Timestamp"}get[QE](){return"Timestamp"}static MAX_VALUE=X.MAX_UNSIGNED_VALUE;get i(){return this.low>>>0}get t(){return this.high>>>0}constructor(t){if(t==null)super(0,0,!0);else if(typeof t=="bigint")super(t,!0);else if(X.isLong(t))super(t.low,t.high,!0);else if(typeof t=="object"&&"t"in t&&"i"in t){if(typeof t.t!="number"&&(typeof t.t!="object"||t.t._bsontype!=="Int32"))throw new be("Timestamp constructed from { t, i } must provide t as a number");if(typeof t.i!="number"&&(typeof t.i!="object"||t.i._bsontype!=="Int32"))throw new be("Timestamp constructed from { t, i } must provide i as a number");const n=Number(t.t),r=Number(t.i);if(n<0||Number.isNaN(n))throw new be("Timestamp constructed from { t, i } must provide a positive t");if(r<0||Number.isNaN(r))throw new be("Timestamp constructed from { t, i } must provide a positive i");if(n>4294967295)throw new be("Timestamp constructed from { t, i } must provide t equal or less than uint32 max");if(r>4294967295)throw new be("Timestamp constructed from { t, i } must provide i equal or less than uint32 max");super(r,n,!0)}else throw new be("A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }")}toJSON(){return{$timestamp:this.toString()}}static fromInt(t){return new _o(X.fromInt(t,!0))}static fromNumber(t){return new _o(X.fromNumber(t,!0))}static fromBits(t,n){return new _o({i:t,t:n})}static fromString(t,n){return new _o(X.fromString(t,!0,n))}toExtendedJSON(){return{$timestamp:{t:this.t,i:this.i}}}static fromExtendedJSON(t){const n=X.isLong(t.$timestamp.i)?t.$timestamp.i.getLowBitsUnsigned():t.$timestamp.i,r=X.isLong(t.$timestamp.t)?t.$timestamp.t.getLowBitsUnsigned():t.$timestamp.t;return new _o({t:r,i:n})}inspect(t,n,r){r??=_r;const a=r(this.t,n),s=r(this.i,n);return`new Timestamp({ t: ${a}, i: ${s} })`}}X.fromNumber(Y$),X.fromNumber(X$);function EP(e){return e!=null&&typeof e=="object"&&"_bsontype"in e&&typeof e._bsontype=="string"}const _P={$oid:bn,$binary:ut,$uuid:ut,$symbol:Jf,$numberInt:bs,$numberDecimal:wr,$numberDouble:Ui,$numberLong:X,$minKey:Qf,$maxKey:Wf,$regex:ji,$regularExpression:ji,$timestamp:_o};function f_(e,t={}){if(typeof e=="number"){const r=e<=fg&&e>=dg,a=e<=VE&&e>=FE;if(t.relaxed||t.legacy)return e;if(Number.isInteger(e)&&!Object.is(e,-0)){if(r)return new bs(e);if(a)return t.useBigInt64?BigInt(e):X.fromNumber(e)}return new Ui(e)}if(e==null||typeof e!="object")return e;if(e.$undefined)return null;const n=Object.keys(e).filter(r=>r.startsWith("$")&&e[r]!=null);for(let r=0;r<n.length;r++){const a=_P[n[r]];if(a)return a.fromExtendedJSON(e,t)}if(e.$date!=null){const r=e.$date,a=new Date;if(t.legacy)if(typeof r=="number")a.setTime(r);else if(typeof r=="string")a.setTime(Date.parse(r));else if(typeof r=="bigint")a.setTime(Number(r));else throw new qE(`Unrecognized type for EJSON date: ${typeof r}`);else if(typeof r=="string")a.setTime(Date.parse(r));else if(X.isLong(r))a.setTime(r.toNumber());else if(typeof r=="number"&&t.relaxed)a.setTime(r);else if(typeof r=="bigint")a.setTime(Number(r));else throw new qE(`Unrecognized type for EJSON date: ${typeof r}`);return a}if(e.$code!=null){const r=Object.assign({},e);return e.$scope&&(r.$scope=f_(e.$scope)),tu.fromExtendedJSON(e)}if(oP(e)||e.$dbPointer){const r=e.$ref?e:e.$dbPointer;if(r instanceof gs)return r;const a=Object.keys(r).filter(u=>u.startsWith("$"));let s=!0;if(a.forEach(u=>{["$ref","$id","$db"].indexOf(u)===-1&&(s=!1)}),s)return gs.fromExtendedJSON(r)}return e}function wP(e,t){return e.map((n,r)=>{t.seenObjects.push({propertyName:`index ${r}`,obj:null});try{return Hi(n,t)}finally{t.seenObjects.pop()}})}function d_(e){const t=e.toISOString();return e.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function Hi(e,t){if(e instanceof Map||jE(e)){const n=Object.create(null);for(const[r,a]of e){if(typeof r!="string")throw new be("Can only serialize maps with string keys");n[r]=a}return Hi(n,t)}if((typeof e=="object"||typeof e=="function")&&e!==null){const n=t.seenObjects.findIndex(r=>r.obj===e);if(n!==-1){const r=t.seenObjects.map(g=>g.propertyName),a=r.slice(0,n).map(g=>`${g} -> `).join(""),s=r[n],u=" -> "+r.slice(n+1,r.length-1).map(g=>`${g} -> `).join(""),f=r[r.length-1],d=" ".repeat(a.length+s.length/2),h="-".repeat(u.length+(s.length+f.length)/2-1);throw new be(`Converting circular structure to EJSON:
|
|
174
174
|
${a}${s}${u}${f}
|
|
175
|
-
${d}\\${h}/`)}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return wP(e,t);if(e===void 0)return null;if(e instanceof Date||G$(e)){const n=e.getTime(),r=n>-1&&n<2534023188e5;return t.legacy?t.relaxed&&r?{$date:e.getTime()}:{$date:d_(e)}:t.relaxed&&r?{$date:d_(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Number.isInteger(e)&&!Object.is(e,-0)){if(e>=dg&&e<=fg)return{$numberInt:e.toString()};if(e>=FE&&e<=VE)return{$numberLong:e.toString()}}return{$numberDouble:Object.is(e,-0)?"-0.0":e.toString()}}if(typeof e=="bigint")return t.relaxed?Number(BigInt.asIntN(64,e)):{$numberLong:BigInt.asIntN(64,e).toString()};if(e instanceof RegExp||F$(e)){let n=e.flags;if(n===void 0){const a=e.toString().match(/[gimuy]*$/);a&&(n=a[0])}return new ji(e.source,n).toExtendedJSON(t)}return e!=null&&typeof e=="object"?TP(e,t):e}const CP={Binary:e=>new ut(e.value(),e.sub_type),Code:e=>new tu(e.code,e.scope),DBRef:e=>new
|
|
175
|
+
${d}\\${h}/`)}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return wP(e,t);if(e===void 0)return null;if(e instanceof Date||G$(e)){const n=e.getTime(),r=n>-1&&n<2534023188e5;return t.legacy?t.relaxed&&r?{$date:e.getTime()}:{$date:d_(e)}:t.relaxed&&r?{$date:d_(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(typeof e=="number"&&(!t.relaxed||!isFinite(e))){if(Number.isInteger(e)&&!Object.is(e,-0)){if(e>=dg&&e<=fg)return{$numberInt:e.toString()};if(e>=FE&&e<=VE)return{$numberLong:e.toString()}}return{$numberDouble:Object.is(e,-0)?"-0.0":e.toString()}}if(typeof e=="bigint")return t.relaxed?Number(BigInt.asIntN(64,e)):{$numberLong:BigInt.asIntN(64,e).toString()};if(e instanceof RegExp||F$(e)){let n=e.flags;if(n===void 0){const a=e.toString().match(/[gimuy]*$/);a&&(n=a[0])}return new ji(e.source,n).toExtendedJSON(t)}return e!=null&&typeof e=="object"?TP(e,t):e}const CP={Binary:e=>new ut(e.value(),e.sub_type),Code:e=>new tu(e.code,e.scope),DBRef:e=>new gs(e.collection||e.namespace,e.oid,e.db,e.fields),Decimal128:e=>new wr(e.bytes),Double:e=>new Ui(e.value),Int32:e=>new bs(e.value),Long:e=>X.fromBits(e.low!=null?e.low:e.low_,e.low!=null?e.high:e.high_,e.low!=null?e.unsigned:e.unsigned_),MaxKey:()=>new Wf,MinKey:()=>new Qf,ObjectId:e=>new bn(e),BSONRegExp:e=>new ji(e.pattern,e.options),BSONSymbol:e=>new Jf(e.value),Timestamp:e=>_o.fromBits(e.low,e.high)};function TP(e,t){if(e==null||typeof e!="object")throw new be("not an object instance");const n=e._bsontype;if(typeof n>"u"){const r={};for(const a of Object.keys(e)){t.seenObjects.push({propertyName:a,obj:null});try{const s=Hi(e[a],t);a==="__proto__"?Object.defineProperty(r,a,{value:s,writable:!0,enumerable:!0,configurable:!0}):r[a]=s}finally{t.seenObjects.pop()}}return r}else{if(e!=null&&typeof e=="object"&&typeof e._bsontype=="string"&&e[HE]!==cg)throw new Z$;if(EP(e)){let r=e;if(typeof r.toExtendedJSON!="function"){const a=CP[e._bsontype];if(!a)throw new be("Unrecognized or invalid _bsontype: "+e._bsontype);r=a(r)}return n==="Code"&&r.scope?r=new tu(r.code,Hi(r.scope,t)):n==="DBRef"&&r.oid&&(r=new gs(Hi(r.collection,t),Hi(r.oid,t),Hi(r.db,t),Hi(r.fields,t))),r.toExtendedJSON(t)}else throw new be("_bsontype must be a string, but was: "+typeof n)}}function h_(e,t){const n={useBigInt64:t?.useBigInt64??!1,relaxed:t?.relaxed??!0,legacy:t?.legacy??!1};return JSON.parse(e,(r,a)=>{if(r.indexOf("\0")!==-1)throw new be(`BSON Document field names cannot contain null bytes, found: ${JSON.stringify(r)}`);return f_(a,n)})}function p_(e,t,n,r){n!=null&&typeof n=="object"&&(r=n,n=0),t!=null&&typeof t=="object"&&!Array.isArray(t)&&(r=t,t=void 0,n=0);const a=Object.assign({relaxed:!0,legacy:!1},r,{seenObjects:[{propertyName:"(root)",obj:null}]}),s=Hi(e,a);return JSON.stringify(s,t,n)}function AP(e,t){return t=t||{},JSON.parse(p_(e,t))}function kP(e,t){return t=t||{},h_(JSON.stringify(e),t)}const iu=Object.create(null);iu.parse=h_,iu.stringify=p_,iu.serialize=AP,iu.deserialize=kP,Object.freeze(iu);const rn={double:1,string:2,object:3,array:4,binData:5,undefined:6,objectId:7,bool:8,date:9,null:10,regex:11,dbPointer:12,javascript:13,symbol:14,javascriptWithScope:15,int:16,timestamp:17,long:18,decimal:19,minKey:255,maxKey:127};function gg(e,t){try{return va.getNonnegativeInt32LE(e,t)}catch(n){throw new xo("BSON size cannot be negative",t,{cause:n})}}function yg(e,t){let n=t;for(;e[n]!==0;n++);if(n===e.length-1)throw new xo("Null terminator not found",t);return n}function RP(e,t=0){if(t??=0,e.length<5)throw new xo(`Input must be at least 5 bytes, got ${e.length} bytes`,t);const n=gg(e,t);if(n>e.length-t)throw new xo(`Parsed documentSize (${n} bytes) does not match input length (${e.length} bytes)`,t);if(e[t+n-1]!==0)throw new xo("BSON documents must end in 0x00",t+n);const r=[];let a=t+4;for(;a<=n+t;){const s=e[a];if(a+=1,s===0){if(a-t!==n)throw new xo("Invalid 0x00 type byte",a);break}const u=a,f=yg(e,a)-u;a+=f+1;let d;if(s===rn.double||s===rn.long||s===rn.date||s===rn.timestamp)d=8;else if(s===rn.int)d=4;else if(s===rn.objectId)d=12;else if(s===rn.decimal)d=16;else if(s===rn.bool)d=1;else if(s===rn.null||s===rn.undefined||s===rn.maxKey||s===rn.minKey)d=0;else if(s===rn.regex)d=yg(e,yg(e,a)+1)+1-a;else if(s===rn.object||s===rn.array||s===rn.javascriptWithScope)d=gg(e,a);else if(s===rn.string||s===rn.binData||s===rn.dbPointer||s===rn.javascript||s===rn.symbol)d=gg(e,a)+4,s===rn.binData&&(d+=1),s===rn.dbPointer&&(d+=12);else throw new xo(`Invalid 0x${s.toString(16).padStart(2,"0")} type byte`,a);if(d>n)throw new xo("value reports length larger than document",a);r.push([s,u,f,a,d]),a+=d}return r}const ed=Object.create(null);ed.parseToElements=RP,ed.ByteUtils=Be,ed.NumberUtils=va,Object.freeze(ed);const OP=1024*1024*17;Be.allocate(OP);async function NP(e,t,n){fa(e.apiBaseUrl+Hl+"/"+e.clientId+"/messages/",{method:"GET",headers:{"Content-Type":"application/json","X-Conversation-Id":t}}).then(r=>{if(!r.ok)throw new Error("Request failed");return r.json()}).then(r=>{n(r.map(a=>a))}).catch(r=>{console.error(r)})}async function IP(e,t){const n=await fa(e.apiBaseUrl+Hl+"/"+e.clientId+"/conversation-status/",{method:"GET",headers:{"Content-Type":"application/json","X-Conversation-Id":t}});if(!n.ok)throw new Error("Could not get coversation status!");return await n.json()}async function MP(e){return(await fa(e.apiBaseUrl+"/api/health/"+e.clientId,{method:"GET",headers:{"Content-Type":"application/json"}})).ok}async function DP(e,t){const n=await fa(e.apiBaseUrl+Hl+"/"+e.clientId+"/client-activity-status",{method:"GET",headers:{"Content-Type":"application/json",...t?{"X-Conversation-Id":t}:{}}});return n.ok?n.body?await n.json():{isActive:!1,hideForUrls:[]}:{isActive:!1,hideForUrls:[]}}function vg(e){return e?new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):""}function BP({config:e}){const{connected:t,start:n,on:r,off:a}=j$({url:e.apiBaseUrl+`/ws?sessionId=${da()}&clientId=${e.clientId}`,autoStart:!1}),[s,u]=N.useState(!1),[f,d]=N.useState(""),[h,g]=N.useState(da()),[y,b]=N.useState(),[v,x]=N.useState([]),[E,_]=N.useState(!1),[w,O]=N.useState(!1),[T,A]=N.useState(null),M=N.useMemo(()=>({position:"fixed",right:16,bottom:16,zIndex:2147483647,fontFamily:"system-ui"}),[]);N.useEffect(()=>{const q=window.location.pathname;e.hideChatForUrls?.some(U=>q.startsWith(U))?O(!0):O(!1)}),N.useEffect(()=>{s&&v.length==0&&NP(e,da()||e.conversationId||"",q=>{const U=q.map(P=>({id:P.id,role:P.role,text:P.text,sentAt:vg(P.sentAt),seen:P.seen}));x(P=>[...U])}),s&&h&&(async()=>{const U=await IP(e,h);b(U)})()},[s]);function R(q){x(U=>{const P=U[U.length-1];if(!P||P.role!=="assistant"||P.id!==q.id)return[...U,{id:q.id,role:q.role,text:q.text,sentAt:vg(new Date().toISOString()),seen:!1}];const D=U.slice();return D[D.length-1]={...P,text:P.text+q.text},D})}const $=(q,U,P,D)=>{if(q)return U.find(se=>se.id===q);const Z=P.trim();if(!(!Z||D))return{id:new ir().toString(),role:"User",text:Z,seen:!1,sentAt:vg(new Date().toISOString()),status:"sending",errorText:void 0}};async function H(q){_(!0);const U=q?.id,P=$(U,v,f,E);!U&&P!=null&&(d(""),x(Z=>[...Z.map(ue=>({...ue,status:ue.status==="failed"?"ignored":ue.status})),P]));let D;try{await d6({url:e.apiBaseUrl+Hl+"/"+e.clientId+"/send-message/",token:e.sessionToken,clientId:e.clientId,conversationId:h,message:q||{id:P?.id||"",role:"user",content:P?.text||""},toolCallHistory:T,onDelta:Z=>{R(Z)},onRunStarted:Z=>{g(Z),m6(Z)},onAgentToolEvent:Z=>A(Z)}),D="sent"}catch{D="failed"}finally{T==null&&x(Z=>Z.map(se=>se.id===P.id?{...se,status:D,errorText:"Eroare la trimitere."}:se)),_(!1)}}const V=N.useCallback((q,U)=>{R({id:U.messageId,role:"assistant",text:U.text})},[]),K=N.useCallback(q=>{x(U=>U.map(P=>P.id===q?{...P,seen:!0}:P))},[]),G=N.useCallback(q=>{b(q)},[]);N.useEffect(()=>{h==""||h==null||n()},[h]),N.useEffect(()=>(r("ReceivedOperatorMessage",V),r("ReceivedSeenAtByOperator",K),r("RecievedConversationModeChanged",G),()=>{a("ReceivedOperatorMessage",V),a("ReceivedSeenAtByOperator",K),a("RecievedConversationModeChanged",G)}),[r,t,a]);const C=N.useCallback(q=>h?t?q?.mode=="Bot"?"AI":q?.mode=="Human"?"Human":"AI":"Disconnected":"New",[h,t]);return w?L.jsx(L.Fragment,{}):L.jsx(r$,{anchorSx:M,open:s,setOpen:u,msgs:v,input:f,setInput:d,send:H,sending:E,conversationMode:C(y),setConversationStatus:b,toolCallEvents:T,setToolCallEvents:A})}class zP extends HTMLElement{connectedCallback(){const t=vo();if(!t)return;const n=this.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=`
|
|
176
176
|
:host { all: initial; }
|
|
177
177
|
`,n.appendChild(r),this.mountEl=document.createElement("div"),n.appendChild(this.mountEl),v6();const a=J0({key:"chatbot",container:n}),s=_c();this.root=E2.createRoot(this.mountEl),this.root.render(L.jsx(sA,{value:a,children:L.jsxs(QR,{theme:s,children:[L.jsx(l3,{}),L.jsx(BP,{config:t})]})}))}disconnectedCallback(){this.root?.unmount(),this.root=void 0}}function LP(){const e=document.currentScript;if(e)return e;const n=Array.from(document.getElementsByTagName("script")).filter(r=>(r.src||"").startsWith("http://localhost:5173/src/main.ts")||(r.src||"").includes("https://cdn.jsdelivr.net/npm/ss-support-widget"));return n.length?n[n.length-1]:null}const m_=LP(),g_=m_?.getAttribute("data-client-id")||"",$P=m_?.getAttribute("data-api-base-url")||"https://localhost:7352",td=`chat-bot-${g_}`;customElements.get(td)||customElements.define(td,zP),(async function(){var t=vo();if(t||(t={clientId:g_,apiBaseUrl:$P,conversationId:void 0,userId:void 0,hideChatForUrls:void 0,sessionToken:null},r6(t)),document.querySelector(td))return;var n=await MP(t);if(!n)return;var r=await DP(t,da());if(!r.isActive)return;t.hideChatForUrls=r.hideForUrls;const a=document.createElement(td);document.body.appendChild(a)})()})();
|