@electric-agent/studio 1.13.1 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/active-sessions.d.ts +4 -13
  2. package/dist/active-sessions.d.ts.map +1 -1
  3. package/dist/active-sessions.js +5 -39
  4. package/dist/active-sessions.js.map +1 -1
  5. package/dist/bridge/claude-code-base.d.ts +0 -2
  6. package/dist/bridge/claude-code-base.d.ts.map +1 -1
  7. package/dist/bridge/claude-code-base.js +0 -2
  8. package/dist/bridge/claude-code-base.js.map +1 -1
  9. package/dist/bridge/claude-md-generator.d.ts +2 -12
  10. package/dist/bridge/claude-md-generator.d.ts.map +1 -1
  11. package/dist/bridge/claude-md-generator.js +94 -72
  12. package/dist/bridge/claude-md-generator.js.map +1 -1
  13. package/dist/bridge/role-skills.d.ts.map +1 -1
  14. package/dist/bridge/role-skills.js +0 -8
  15. package/dist/bridge/role-skills.js.map +1 -1
  16. package/dist/client/assets/index-BfvQSMwH.css +1 -0
  17. package/dist/client/assets/index-BtX82X61.js +234 -0
  18. package/dist/client/index.html +2 -2
  19. package/dist/room-router.d.ts.map +1 -1
  20. package/dist/room-router.js +5 -20
  21. package/dist/room-router.js.map +1 -1
  22. package/dist/sandbox/docker.d.ts +0 -10
  23. package/dist/sandbox/docker.d.ts.map +1 -1
  24. package/dist/sandbox/docker.js +1 -115
  25. package/dist/sandbox/docker.js.map +1 -1
  26. package/dist/sandbox/sprites.d.ts +0 -1
  27. package/dist/sandbox/sprites.d.ts.map +1 -1
  28. package/dist/sandbox/sprites.js +0 -51
  29. package/dist/sandbox/sprites.js.map +1 -1
  30. package/dist/sandbox/types.d.ts +0 -5
  31. package/dist/sandbox/types.d.ts.map +1 -1
  32. package/dist/server.d.ts +0 -12
  33. package/dist/server.d.ts.map +1 -1
  34. package/dist/server.js +187 -1097
  35. package/dist/server.js.map +1 -1
  36. package/dist/session-auth.d.ts +0 -3
  37. package/dist/session-auth.d.ts.map +1 -1
  38. package/dist/session-auth.js +0 -10
  39. package/dist/session-auth.js.map +1 -1
  40. package/dist/sessions.d.ts +0 -2
  41. package/dist/sessions.d.ts.map +1 -1
  42. package/dist/sessions.js.map +1 -1
  43. package/package.json +2 -2
  44. package/dist/api-schemas.d.ts +0 -244
  45. package/dist/api-schemas.d.ts.map +0 -1
  46. package/dist/api-schemas.js +0 -103
  47. package/dist/api-schemas.js.map +0 -1
  48. package/dist/bridge/codex-docker.d.ts +0 -70
  49. package/dist/bridge/codex-docker.d.ts.map +0 -1
  50. package/dist/bridge/codex-docker.js +0 -234
  51. package/dist/bridge/codex-docker.js.map +0 -1
  52. package/dist/bridge/codex-json-parser.d.ts +0 -31
  53. package/dist/bridge/codex-json-parser.d.ts.map +0 -1
  54. package/dist/bridge/codex-json-parser.js +0 -267
  55. package/dist/bridge/codex-json-parser.js.map +0 -1
  56. package/dist/bridge/codex-md-generator.d.ts +0 -14
  57. package/dist/bridge/codex-md-generator.d.ts.map +0 -1
  58. package/dist/bridge/codex-md-generator.js +0 -55
  59. package/dist/bridge/codex-md-generator.js.map +0 -1
  60. package/dist/bridge/codex-sprites.d.ts +0 -64
  61. package/dist/bridge/codex-sprites.d.ts.map +0 -1
  62. package/dist/bridge/codex-sprites.js +0 -227
  63. package/dist/bridge/codex-sprites.js.map +0 -1
  64. package/dist/bridge/daytona.d.ts +0 -35
  65. package/dist/bridge/daytona.d.ts.map +0 -1
  66. package/dist/bridge/daytona.js +0 -141
  67. package/dist/bridge/daytona.js.map +0 -1
  68. package/dist/bridge/docker-stdio.d.ts +0 -30
  69. package/dist/bridge/docker-stdio.d.ts.map +0 -1
  70. package/dist/bridge/docker-stdio.js +0 -135
  71. package/dist/bridge/docker-stdio.js.map +0 -1
  72. package/dist/bridge/sprites.d.ts +0 -32
  73. package/dist/bridge/sprites.d.ts.map +0 -1
  74. package/dist/bridge/sprites.js +0 -133
  75. package/dist/bridge/sprites.js.map +0 -1
  76. package/dist/client/assets/index-BXdgNRgB.js +0 -235
  77. package/dist/client/assets/index-IvCtVUfs.css +0 -1
  78. package/dist/github-app.d.ts +0 -14
  79. package/dist/github-app.d.ts.map +0 -1
  80. package/dist/github-app.js +0 -62
  81. package/dist/github-app.js.map +0 -1
  82. package/dist/github-app.test.d.ts +0 -2
  83. package/dist/github-app.test.d.ts.map +0 -1
  84. package/dist/github-app.test.js +0 -62
  85. package/dist/github-app.test.js.map +0 -1
  86. package/dist/validate.d.ts +0 -10
  87. package/dist/validate.d.ts.map +0 -1
  88. package/dist/validate.js +0 -24
  89. package/dist/validate.js.map +0 -1
@@ -0,0 +1,234 @@
1
+ function Gx(t,l){for(var i=0;i<l.length;i++){const r=l[i];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function i(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=i(o);fetch(o.href,s)}})();function md(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var of={exports:{}},Tr={};var Ig;function Fx(){if(Ig)return Tr;Ig=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,o,s){var c=null;if(s!==void 0&&(c=""+s),o.key!==void 0&&(c=""+o.key),"key"in o){s={};for(var d in o)d!=="key"&&(s[d]=o[d])}else s=o;return o=s.ref,{$$typeof:t,type:r,key:c,ref:o!==void 0?o:null,props:s}}return Tr.Fragment=l,Tr.jsx=i,Tr.jsxs=i,Tr}var Xg;function Vx(){return Xg||(Xg=1,of.exports=Fx()),of.exports}var v=Vx(),sf={exports:{}},Oe={};var Qg;function Ix(){if(Qg)return Oe;Qg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function S(L){return L===null||typeof L!="object"?null:(L=b&&L[b]||L["@@iterator"],typeof L=="function"?L:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,R={};function C(L,P,T){this.props=L,this.context=P,this.refs=R,this.updater=T||E}C.prototype.isReactComponent={},C.prototype.setState=function(L,P){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,P,"setState")},C.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function A(){}A.prototype=C.prototype;function D(L,P,T){this.props=L,this.context=P,this.refs=R,this.updater=T||E}var ee=D.prototype=new A;ee.constructor=D,j(ee,C.prototype),ee.isPureReactComponent=!0;var $=Array.isArray;function B(){}var z={H:null,A:null,T:null,S:null},le=Object.prototype.hasOwnProperty;function W(L,P,T){var ce=T.ref;return{$$typeof:t,type:L,key:P,ref:ce!==void 0?ce:null,props:T}}function _(L,P){return W(L.type,P,L.props)}function F(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function q(L){var P={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(T){return P[T]})}var V=/\/+/g;function ne(L,P){return typeof L=="object"&&L!==null&&L.key!=null?q(""+L.key):P.toString(36)}function K(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(B,B):(L.status="pending",L.then(function(P){L.status==="pending"&&(L.status="fulfilled",L.value=P)},function(P){L.status==="pending"&&(L.status="rejected",L.reason=P)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function H(L,P,T,ce,be){var xe=typeof L;(xe==="undefined"||xe==="boolean")&&(L=null);var ze=!1;if(L===null)ze=!0;else switch(xe){case"bigint":case"string":case"number":ze=!0;break;case"object":switch(L.$$typeof){case t:case l:ze=!0;break;case y:return ze=L._init,H(ze(L._payload),P,T,ce,be)}}if(ze)return be=be(L),ze=ce===""?"."+ne(L,0):ce,$(be)?(T="",ze!=null&&(T=ze.replace(V,"$&/")+"/"),H(be,P,T,"",function(Nt){return Nt})):be!=null&&(F(be)&&(be=_(be,T+(be.key==null||L&&L.key===be.key?"":(""+be.key).replace(V,"$&/")+"/")+ze)),P.push(be)),1;ze=0;var ge=ce===""?".":ce+":";if($(L))for(var _e=0;_e<L.length;_e++)ce=L[_e],xe=ge+ne(ce,_e),ze+=H(ce,P,T,xe,be);else if(_e=S(L),typeof _e=="function")for(L=_e.call(L),_e=0;!(ce=L.next()).done;)ce=ce.value,xe=ge+ne(ce,_e++),ze+=H(ce,P,T,xe,be);else if(xe==="object"){if(typeof L.then=="function")return H(K(L),P,T,ce,be);throw P=String(L),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.")}return ze}function te(L,P,T){if(L==null)return L;var ce=[],be=0;return H(L,ce,"","",function(xe){return P.call(T,xe,be++)}),ce}function ue(L){if(L._status===-1){var P=L._result;P=P(),P.then(function(T){(L._status===0||L._status===-1)&&(L._status=1,L._result=T)},function(T){(L._status===0||L._status===-1)&&(L._status=2,L._result=T)}),L._status===-1&&(L._status=0,L._result=P)}if(L._status===1)return L._result.default;throw L._result}var pe=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var P=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(P))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},N={map:te,forEach:function(L,P,T){te(L,function(){P.apply(this,arguments)},T)},count:function(L){var P=0;return te(L,function(){P++}),P},toArray:function(L){return te(L,function(P){return P})||[]},only:function(L){if(!F(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Oe.Activity=g,Oe.Children=N,Oe.Component=C,Oe.Fragment=i,Oe.Profiler=o,Oe.PureComponent=D,Oe.StrictMode=r,Oe.Suspense=p,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=z,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(L){return z.H.useMemoCache(L)}},Oe.cache=function(L){return function(){return L.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(L,P,T){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var ce=j({},L.props),be=L.key;if(P!=null)for(xe in P.key!==void 0&&(be=""+P.key),P)!le.call(P,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&P.ref===void 0||(ce[xe]=P[xe]);var xe=arguments.length-2;if(xe===1)ce.children=T;else if(1<xe){for(var ze=Array(xe),ge=0;ge<xe;ge++)ze[ge]=arguments[ge+2];ce.children=ze}return W(L.type,be,ce)},Oe.createContext=function(L){return L={$$typeof:c,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:s,_context:L},L},Oe.createElement=function(L,P,T){var ce,be={},xe=null;if(P!=null)for(ce in P.key!==void 0&&(xe=""+P.key),P)le.call(P,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(be[ce]=P[ce]);var ze=arguments.length-2;if(ze===1)be.children=T;else if(1<ze){for(var ge=Array(ze),_e=0;_e<ze;_e++)ge[_e]=arguments[_e+2];be.children=ge}if(L&&L.defaultProps)for(ce in ze=L.defaultProps,ze)be[ce]===void 0&&(be[ce]=ze[ce]);return W(L,xe,be)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(L){return{$$typeof:d,render:L}},Oe.isValidElement=F,Oe.lazy=function(L){return{$$typeof:y,_payload:{_status:-1,_result:L},_init:ue}},Oe.memo=function(L,P){return{$$typeof:m,type:L,compare:P===void 0?null:P}},Oe.startTransition=function(L){var P=z.T,T={};z.T=T;try{var ce=L(),be=z.S;be!==null&&be(T,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(B,pe)}catch(xe){pe(xe)}finally{P!==null&&T.types!==null&&(P.types=T.types),z.T=P}},Oe.unstable_useCacheRefresh=function(){return z.H.useCacheRefresh()},Oe.use=function(L){return z.H.use(L)},Oe.useActionState=function(L,P,T){return z.H.useActionState(L,P,T)},Oe.useCallback=function(L,P){return z.H.useCallback(L,P)},Oe.useContext=function(L){return z.H.useContext(L)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(L,P){return z.H.useDeferredValue(L,P)},Oe.useEffect=function(L,P){return z.H.useEffect(L,P)},Oe.useEffectEvent=function(L){return z.H.useEffectEvent(L)},Oe.useId=function(){return z.H.useId()},Oe.useImperativeHandle=function(L,P,T){return z.H.useImperativeHandle(L,P,T)},Oe.useInsertionEffect=function(L,P){return z.H.useInsertionEffect(L,P)},Oe.useLayoutEffect=function(L,P){return z.H.useLayoutEffect(L,P)},Oe.useMemo=function(L,P){return z.H.useMemo(L,P)},Oe.useOptimistic=function(L,P){return z.H.useOptimistic(L,P)},Oe.useReducer=function(L,P,T){return z.H.useReducer(L,P,T)},Oe.useRef=function(L){return z.H.useRef(L)},Oe.useState=function(L){return z.H.useState(L)},Oe.useSyncExternalStore=function(L,P,T){return z.H.useSyncExternalStore(L,P,T)},Oe.useTransition=function(){return z.H.useTransition()},Oe.version="19.2.4",Oe}var $g;function pd(){return $g||($g=1,sf.exports=Ix()),sf.exports}var k=pd();const Xx=md(k),Qx=Gx({__proto__:null,default:Xx},[k]);var cf={exports:{}},jr={},ff={exports:{}},df={};var Kg;function $x(){return Kg||(Kg=1,(function(t){function l(H,te){var ue=H.length;H.push(te);e:for(;0<ue;){var pe=ue-1>>>1,N=H[pe];if(0<o(N,te))H[pe]=te,H[ue]=N,ue=pe;else break e}}function i(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var te=H[0],ue=H.pop();if(ue!==te){H[0]=ue;e:for(var pe=0,N=H.length,L=N>>>1;pe<L;){var P=2*(pe+1)-1,T=H[P],ce=P+1,be=H[ce];if(0>o(T,ue))ce<N&&0>o(be,T)?(H[pe]=be,H[ce]=ue,pe=ce):(H[pe]=T,H[P]=ue,pe=P);else if(ce<N&&0>o(be,ue))H[pe]=be,H[ce]=ue,pe=ce;else break e}}return te}function o(H,te){var ue=H.sortIndex-te.sortIndex;return ue!==0?ue:H.id-te.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var p=[],m=[],y=1,g=null,b=3,S=!1,E=!1,j=!1,R=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function ee(H){for(var te=i(m);te!==null;){if(te.callback===null)r(m);else if(te.startTime<=H)r(m),te.sortIndex=te.expirationTime,l(p,te);else break;te=i(m)}}function $(H){if(j=!1,ee(H),!E)if(i(p)!==null)E=!0,B||(B=!0,q());else{var te=i(m);te!==null&&K($,te.startTime-H)}}var B=!1,z=-1,le=5,W=-1;function _(){return R?!0:!(t.unstable_now()-W<le)}function F(){if(R=!1,B){var H=t.unstable_now();W=H;var te=!0;try{e:{E=!1,j&&(j=!1,A(z),z=-1),S=!0;var ue=b;try{t:{for(ee(H),g=i(p);g!==null&&!(g.expirationTime>H&&_());){var pe=g.callback;if(typeof pe=="function"){g.callback=null,b=g.priorityLevel;var N=pe(g.expirationTime<=H);if(H=t.unstable_now(),typeof N=="function"){g.callback=N,ee(H),te=!0;break t}g===i(p)&&r(p),ee(H)}else r(p);g=i(p)}if(g!==null)te=!0;else{var L=i(m);L!==null&&K($,L.startTime-H),te=!1}}break e}finally{g=null,b=ue,S=!1}te=void 0}}finally{te?q():B=!1}}}var q;if(typeof D=="function")q=function(){D(F)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,ne=V.port2;V.port1.onmessage=F,q=function(){ne.postMessage(null)}}else q=function(){C(F,0)};function K(H,te){z=C(function(){H(t.unstable_now())},te)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(H){H.callback=null},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):le=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(H){switch(b){case 1:case 2:case 3:var te=3;break;default:te=b}var ue=b;b=te;try{return H()}finally{b=ue}},t.unstable_requestPaint=function(){R=!0},t.unstable_runWithPriority=function(H,te){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var ue=b;b=H;try{return te()}finally{b=ue}},t.unstable_scheduleCallback=function(H,te,ue){var pe=t.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?pe+ue:pe):ue=pe,H){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=ue+N,H={id:y++,callback:te,priorityLevel:H,startTime:ue,expirationTime:N,sortIndex:-1},ue>pe?(H.sortIndex=ue,l(m,H),i(p)===null&&H===i(m)&&(j?(A(z),z=-1):j=!0,K($,ue-pe))):(H.sortIndex=N,l(p,H),E||S||(E=!0,B||(B=!0,q()))),H},t.unstable_shouldYield=_,t.unstable_wrapCallback=function(H){var te=b;return function(){var ue=b;b=te;try{return H.apply(this,arguments)}finally{b=ue}}}})(df)),df}var Zg;function Kx(){return Zg||(Zg=1,ff.exports=$x()),ff.exports}var hf={exports:{}},Vt={};var Pg;function Zx(){if(Pg)return Vt;Pg=1;var t=pd();function l(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(p,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:m,implementation:y}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Vt.createPortal=function(p,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return s(p,m,null,y)},Vt.flushSync=function(p){var m=c.T,y=r.p;try{if(c.T=null,r.p=2,p)return p()}finally{c.T=m,r.p=y,r.d.f()}},Vt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},Vt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Vt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,S=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:S}):y==="script"&&r.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Vt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=d(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},Vt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin);r.d.L(p,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Vt.preloadModule=function(p,m){if(typeof p=="string")if(m){var y=d(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},Vt.requestFormReset=function(p){r.d.r(p)},Vt.unstable_batchedUpdates=function(p,m){return p(m)},Vt.useFormState=function(p,m,y){return c.H.useFormState(p,m,y)},Vt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Vt.version="19.2.4",Vt}var Jg;function Av(){if(Jg)return hf.exports;Jg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),hf.exports=Zx(),hf.exports}var Wg;function Px(){if(Wg)return jr;Wg=1;var t=Kx(),l=pd(),i=Av();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function c(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function d(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(s(e)!==e)throw Error(r(188))}function m(e){var n=e.alternate;if(!n){if(n=s(e),n===null)throw Error(r(188));return n!==e?null:e}for(var a=e,u=n;;){var f=a.return;if(f===null)break;var h=f.alternate;if(h===null){if(u=f.return,u!==null){a=u;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===a)return p(f),e;if(h===u)return p(f),n;h=h.sibling}throw Error(r(188))}if(a.return!==u.return)a=f,u=h;else{for(var x=!1,w=f.child;w;){if(w===a){x=!0,a=f,u=h;break}if(w===u){x=!0,u=f,a=h;break}w=w.sibling}if(!x){for(w=h.child;w;){if(w===a){x=!0,a=h,u=f;break}if(w===u){x=!0,u=h,a=f;break}w=w.sibling}if(!x)throw Error(r(189))}}if(a.alternate!==u)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:n}function y(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=y(e),n!==null)return n;e=e.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),D=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),le=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),_=Symbol.for("react.memo_cache_sentinel"),F=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=F&&e[F]||e["@@iterator"],typeof e=="function"?e:null)}var V=Symbol.for("react.client.reference");function ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===V?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case C:return"Profiler";case R:return"StrictMode";case $:return"Suspense";case B:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case D:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case ee:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z:return n=e.displayName||null,n!==null?n:ne(e.type)||"Memo";case le:n=e._payload,e=e._init;try{return ne(e(n))}catch{}}return null}var K=Array.isArray,H=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},pe=[],N=-1;function L(e){return{current:e}}function P(e){0>N||(e.current=pe[N],pe[N]=null,N--)}function T(e,n){N++,pe[N]=e.current,e.current=n}var ce=L(null),be=L(null),xe=L(null),ze=L(null);function ge(e,n){switch(T(xe,n),T(be,e),T(ce,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?mg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=mg(n),e=pg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}P(ce),T(ce,e)}function _e(){P(ce),P(be),P(xe)}function Nt(e){e.memoizedState!==null&&T(ze,e);var n=ce.current,a=pg(n,e.type);n!==a&&(T(be,e),T(ce,a))}function Ln(e){be.current===e&&(P(ce),P(be)),ze.current===e&&(P(ze),Er._currentValue=ue)}var yt,Un;function Sn(e){if(yt===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);yt=n&&n[1]||"",Un=-1<a.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+yt+e+Un}var Nl=!1;function Pt(e,n){if(!e||Nl)return"";Nl=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(J){var Q=J}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(J){Q=J}e.call(oe.prototype)}}else{try{throw Error()}catch(J){Q=J}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(J){if(J&&Q&&typeof J.stack=="string")return[J.stack,Q.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=u.DetermineComponentFrameRoot(),x=h[0],w=h[1];if(x&&w){var M=x.split(`
4
+ `),X=w.split(`
5
+ `);for(f=u=0;u<M.length&&!M[u].includes("DetermineComponentFrameRoot");)u++;for(;f<X.length&&!X[f].includes("DetermineComponentFrameRoot");)f++;if(u===M.length||f===X.length)for(u=M.length-1,f=X.length-1;1<=u&&0<=f&&M[u]!==X[f];)f--;for(;1<=u&&0<=f;u--,f--)if(M[u]!==X[f]){if(u!==1||f!==1)do if(u--,f--,0>f||M[u]!==X[f]){var ae=`
6
+ `+M[u].replace(" at new "," at ");return e.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",e.displayName)),ae}while(1<=u&&0<=f);break}}}finally{Nl=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Sn(a):""}function Va(e,n){switch(e.tag){case 26:case 27:case 5:return Sn(e.type);case 16:return Sn("Lazy");case 13:return e.child!==n&&n!==null?Sn("Suspense Fallback"):Sn("Suspense");case 19:return Sn("SuspenseList");case 0:case 15:return Pt(e.type,!1);case 11:return Pt(e.type.render,!1);case 1:return Pt(e.type,!0);case 31:return Sn("Activity");default:return""}}function Ia(e){try{var n="",a=null;do n+=Va(e,a),a=e,e=e.return;while(e);return n}catch(u){return`
7
+ Error generating stack: `+u.message+`
8
+ `+u.stack}}var ll=Object.prototype.hasOwnProperty,Dl=t.unstable_scheduleCallback,pa=t.unstable_cancelCallback,Li=t.unstable_shouldYield,Ui=t.unstable_requestPaint,pt=t.unstable_now,al=t.unstable_getCurrentPriorityLevel,ie=t.unstable_ImmediatePriority,de=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,De=t.unstable_LowPriority,Pe=t.unstable_IdlePriority,$t=t.log,on=t.unstable_setDisableYieldValue,Lt=null,nt=null;function Ut(e){if(typeof $t=="function"&&on(e),nt&&typeof nt.setStrictMode=="function")try{nt.setStrictMode(Lt,e)}catch{}}var tt=Math.clz32?Math.clz32:lu,Bn=Math.log,sn=Math.LN2;function lu(e){return e>>>=0,e===0?32:31-(Bn(e)/sn|0)|0}var il=256,ga=262144,zl=4194304;function rl(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ya(e,n,a){var u=e.pendingLanes;if(u===0)return 0;var f=0,h=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var w=u&134217727;return w!==0?(u=w&~h,u!==0?f=rl(u):(x&=w,x!==0?f=rl(x):a||(a=w&~e,a!==0&&(f=rl(a))))):(w=u&~h,w!==0?f=rl(w):x!==0?f=rl(x):a||(a=u&~e,a!==0&&(f=rl(a)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,a=n&-n,h>=a||h===32&&(a&4194048)!==0)?n:f}function va(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function au(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 ba(){var e=zl;return zl<<=1,(zl&62914560)===0&&(zl=4194304),e}function Ol(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Ml(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function es(e,n,a,u,f,h){var x=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var w=e.entanglements,M=e.expirationTimes,X=e.hiddenUpdates;for(a=x&~a;0<a;){var ae=31-tt(a),oe=1<<ae;w[ae]=0,M[ae]=-1;var Q=X[ae];if(Q!==null)for(X[ae]=null,ae=0;ae<Q.length;ae++){var J=Q[ae];J!==null&&(J.lane&=-536870913)}a&=~oe}u!==0&&iu(e,u,0),h!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=h&~(x&~n))}function iu(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var u=31-tt(n);e.entangledLanes|=n,e.entanglements[u]=e.entanglements[u]|1073741824|a&261930}function O(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var u=31-tt(a),f=1<<u;f&n|e[u]&n&&(e[u]|=n),a&=~f}}function G(e,n){var a=n&-n;return a=(a&42)!==0?1:Z(a),(a&(e.suspendedLanes|n))!==0?0:a}function Z(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function se(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function he(){var e=te.p;return e!==0?e:(e=window.event,e===void 0?32:Bg(e.type))}function ke(e,n){var a=te.p;try{return te.p=e,n()}finally{te.p=a}}var ye=Math.random().toString(36).slice(2),me="__reactFiber$"+ye,ve="__reactProps$"+ye,we="__reactContainer$"+ye,Ae="__reactEvents$"+ye,Te="__reactListeners$"+ye,Ke="__reactHandles$"+ye,Ve="__reactResources$"+ye,gt="__reactMarker$"+ye;function vt(e){delete e[me],delete e[ve],delete e[Ae],delete e[Te],delete e[Ke]}function bt(e){var n=e[me];if(n)return n;for(var a=e.parentNode;a;){if(n=a[we]||a[me]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=Eg(e);e!==null;){if(a=e[me])return a;e=Eg(e)}return n}e=a,a=e.parentNode}return null}function Ie(e){if(e=e[me]||e[we]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function zt(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function Jt(e){var n=e[Ve];return n||(n=e[Ve]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function ht(e){e[gt]=!0}var Hn=new Set,cn={};function qn(e,n){En(e,n),En(e+"Capture",n)}function En(e,n){for(cn[e]=n,e=0;e<n.length;e++)Hn.add(n[e])}var ul=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]*$"),xa={},Sa={};function Xe(e){return ll.call(Sa,e)?!0:ll.call(xa,e)?!1:ul.test(e)?Sa[e]=!0:(xa[e]=!0,!1)}function Et(e,n,a){if(Xe(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function Yn(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function Bt(e,n,a,u){if(u===null)e.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+u)}}function Qe(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ea(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ru(e,n,a){var u=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var f=u.get,h=u.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(x){a=""+x,h.call(this,x)}}),Object.defineProperty(e,n,{enumerable:u.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Bi(e){if(!e._valueTracker){var n=Ea(e)?"checked":"value";e._valueTracker=ru(e,n,""+e[n])}}function uh(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),u="";return e&&(u=Ea(e)?e.checked?"true":"false":e.value),e=u,e!==a?(n.setValue(e),!0):!1}function uu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var L0=/[\n"\\]/g;function wn(e){return e.replace(L0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function ts(e,n,a,u,f,h,x,w){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),n!=null?x==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Qe(n)):e.value!==""+Qe(n)&&(e.value=""+Qe(n)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),n!=null?ns(e,x,Qe(n)):a!=null?ns(e,x,Qe(a)):u!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+Qe(w):e.removeAttribute("name")}function oh(e,n,a,u,f,h,x,w){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||a!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){Bi(e);return}a=a!=null?""+Qe(a):"",n=n!=null?""+Qe(n):a,w||n===e.value||(e.value=n),e.defaultValue=n}u=u??f,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=w?e.checked:!!u,e.defaultChecked=!!u,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Bi(e)}function ns(e,n,a){n==="number"&&uu(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Xa(e,n,a,u){if(e=e.options,n){n={};for(var f=0;f<a.length;f++)n["$"+a[f]]=!0;for(a=0;a<e.length;a++)f=n.hasOwnProperty("$"+e[a].value),e[a].selected!==f&&(e[a].selected=f),f&&u&&(e[a].defaultSelected=!0)}else{for(a=""+Qe(a),n=null,f=0;f<e.length;f++){if(e[f].value===a){e[f].selected=!0,u&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function sh(e,n,a){if(n!=null&&(n=""+Qe(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+Qe(a):""}function ch(e,n,a,u){if(n==null){if(u!=null){if(a!=null)throw Error(r(92));if(K(u)){if(1<u.length)throw Error(r(93));u=u[0]}a=u}a==null&&(a=""),n=a}a=Qe(n),e.defaultValue=a,u=e.textContent,u===a&&u!==""&&u!==null&&(e.value=u),Bi(e)}function Qa(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var U0=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 fh(e,n,a){var u=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?u?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":u?e.setProperty(n,a):typeof a!="number"||a===0||U0.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function dh(e,n,a){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,a!=null){for(var u in a)!a.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?e.setProperty(u,""):u==="float"?e.cssFloat="":e[u]="");for(var f in n)u=n[f],n.hasOwnProperty(f)&&a[f]!==u&&fh(e,f,u)}else for(var h in n)n.hasOwnProperty(h)&&fh(e,h,n[h])}function ls(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var B0=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"]]),H0=/^[\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 ou(e){return H0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ol(){}var as=null;function is(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var $a=null,Ka=null;function hh(e){var n=Ie(e);if(n&&(e=n.stateNode)){var a=e[ve]||null;e:switch(e=n.stateNode,n.type){case"input":if(ts(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+wn(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var u=a[n];if(u!==e&&u.form===e.form){var f=u[ve]||null;if(!f)throw Error(r(90));ts(u,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<a.length;n++)u=a[n],u.form===e.form&&uh(u)}break e;case"textarea":sh(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Xa(e,!!a.multiple,n,!1)}}}var rs=!1;function mh(e,n,a){if(rs)return e(n,a);rs=!0;try{var u=e(n);return u}finally{if(rs=!1,($a!==null||Ka!==null)&&(Ku(),$a&&(n=$a,e=Ka,Ka=$a=null,hh(n),e)))for(n=0;n<e.length;n++)hh(e[n])}}function Hi(e,n){var a=e.stateNode;if(a===null)return null;var u=a[ve]||null;if(u===null)return null;a=u[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,n,typeof a));return a}var sl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),us=!1;if(sl)try{var qi={};Object.defineProperty(qi,"passive",{get:function(){us=!0}}),window.addEventListener("test",qi,qi),window.removeEventListener("test",qi,qi)}catch{us=!1}var Ll=null,os=null,su=null;function ph(){if(su)return su;var e,n=os,a=n.length,u,f="value"in Ll?Ll.value:Ll.textContent,h=f.length;for(e=0;e<a&&n[e]===f[e];e++);var x=a-e;for(u=1;u<=x&&n[a-u]===f[h-u];u++);return su=f.slice(e,1<u?1-u:void 0)}function cu(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function fu(){return!0}function gh(){return!1}function Wt(e){function n(a,u,f,h,x){this._reactName=a,this._targetInst=f,this.type=u,this.nativeEvent=h,this.target=x,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(a=e[w],this[w]=a?a(h):h[w]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?fu:gh,this.isPropagationStopped=gh,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=fu)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=fu)},persist:function(){},isPersistent:fu}),n}var wa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},du=Wt(wa),Yi=g({},wa,{view:0,detail:0}),q0=Wt(Yi),ss,cs,Gi,hu=g({},Yi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ds,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Gi&&(Gi&&e.type==="mousemove"?(ss=e.screenX-Gi.screenX,cs=e.screenY-Gi.screenY):cs=ss=0,Gi=e),ss)},movementY:function(e){return"movementY"in e?e.movementY:cs}}),yh=Wt(hu),Y0=g({},hu,{dataTransfer:0}),G0=Wt(Y0),F0=g({},Yi,{relatedTarget:0}),fs=Wt(F0),V0=g({},wa,{animationName:0,elapsedTime:0,pseudoElement:0}),I0=Wt(V0),X0=g({},wa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Q0=Wt(X0),$0=g({},wa,{data:0}),vh=Wt($0),K0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Z0={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"},P0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function J0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=P0[e])?!!n[e]:!1}function ds(){return J0}var W0=g({},Yi,{key:function(e){if(e.key){var n=K0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=cu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Z0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ds,charCode:function(e){return e.type==="keypress"?cu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),e1=Wt(W0),t1=g({},hu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bh=Wt(t1),n1=g({},Yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ds}),l1=Wt(n1),a1=g({},wa,{propertyName:0,elapsedTime:0,pseudoElement:0}),i1=Wt(a1),r1=g({},hu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),u1=Wt(r1),o1=g({},wa,{newState:0,oldState:0}),s1=Wt(o1),c1=[9,13,27,32],hs=sl&&"CompositionEvent"in window,Fi=null;sl&&"documentMode"in document&&(Fi=document.documentMode);var f1=sl&&"TextEvent"in window&&!Fi,xh=sl&&(!hs||Fi&&8<Fi&&11>=Fi),Sh=" ",Eh=!1;function wh(e,n){switch(e){case"keyup":return c1.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function kh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Za=!1;function d1(e,n){switch(e){case"compositionend":return kh(n);case"keypress":return n.which!==32?null:(Eh=!0,Sh);case"textInput":return e=n.data,e===Sh&&Eh?null:e;default:return null}}function h1(e,n){if(Za)return e==="compositionend"||!hs&&wh(e,n)?(e=ph(),su=os=Ll=null,Za=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return xh&&n.locale!=="ko"?null:n.data;default:return null}}var m1={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 Ch(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!m1[e.type]:n==="textarea"}function Th(e,n,a,u){$a?Ka?Ka.push(u):Ka=[u]:$a=u,n=no(n,"onChange"),0<n.length&&(a=new du("onChange","change",null,a,u),e.push({event:a,listeners:n}))}var Vi=null,Ii=null;function p1(e){og(e,0)}function mu(e){var n=zt(e);if(uh(n))return e}function jh(e,n){if(e==="change")return n}var Ah=!1;if(sl){var ms;if(sl){var ps="oninput"in document;if(!ps){var Rh=document.createElement("div");Rh.setAttribute("oninput","return;"),ps=typeof Rh.oninput=="function"}ms=ps}else ms=!1;Ah=ms&&(!document.documentMode||9<document.documentMode)}function _h(){Vi&&(Vi.detachEvent("onpropertychange",Nh),Ii=Vi=null)}function Nh(e){if(e.propertyName==="value"&&mu(Ii)){var n=[];Th(n,Ii,e,is(e)),mh(p1,n)}}function g1(e,n,a){e==="focusin"?(_h(),Vi=n,Ii=a,Vi.attachEvent("onpropertychange",Nh)):e==="focusout"&&_h()}function y1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return mu(Ii)}function v1(e,n){if(e==="click")return mu(n)}function b1(e,n){if(e==="input"||e==="change")return mu(n)}function x1(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var fn=typeof Object.is=="function"?Object.is:x1;function Xi(e,n){if(fn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),u=Object.keys(n);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var f=a[u];if(!ll.call(n,f)||!fn(e[f],n[f]))return!1}return!0}function Dh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zh(e,n){var a=Dh(e);e=0;for(var u;a;){if(a.nodeType===3){if(u=e+a.textContent.length,e<=n&&u>=n)return{node:a,offset:n-e};e=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Dh(a)}}function Oh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Oh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Mh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=uu(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=uu(e.document)}return n}function gs(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var S1=sl&&"documentMode"in document&&11>=document.documentMode,Pa=null,ys=null,Qi=null,vs=!1;function Lh(e,n,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;vs||Pa==null||Pa!==uu(u)||(u=Pa,"selectionStart"in u&&gs(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Qi&&Xi(Qi,u)||(Qi=u,u=no(ys,"onSelect"),0<u.length&&(n=new du("onSelect","select",null,n,a),e.push({event:n,listeners:u}),n.target=Pa)))}function ka(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var Ja={animationend:ka("Animation","AnimationEnd"),animationiteration:ka("Animation","AnimationIteration"),animationstart:ka("Animation","AnimationStart"),transitionrun:ka("Transition","TransitionRun"),transitionstart:ka("Transition","TransitionStart"),transitioncancel:ka("Transition","TransitionCancel"),transitionend:ka("Transition","TransitionEnd")},bs={},Uh={};sl&&(Uh=document.createElement("div").style,"AnimationEvent"in window||(delete Ja.animationend.animation,delete Ja.animationiteration.animation,delete Ja.animationstart.animation),"TransitionEvent"in window||delete Ja.transitionend.transition);function Ca(e){if(bs[e])return bs[e];if(!Ja[e])return e;var n=Ja[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in Uh)return bs[e]=n[a];return e}var Bh=Ca("animationend"),Hh=Ca("animationiteration"),qh=Ca("animationstart"),E1=Ca("transitionrun"),w1=Ca("transitionstart"),k1=Ca("transitioncancel"),Yh=Ca("transitionend"),Gh=new Map,xs="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");xs.push("scrollEnd");function Gn(e,n){Gh.set(e,n),qn(n,[e])}var pu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},kn=[],Wa=0,Ss=0;function gu(){for(var e=Wa,n=Ss=Wa=0;n<e;){var a=kn[n];kn[n++]=null;var u=kn[n];kn[n++]=null;var f=kn[n];kn[n++]=null;var h=kn[n];if(kn[n++]=null,u!==null&&f!==null){var x=u.pending;x===null?f.next=f:(f.next=x.next,x.next=f),u.pending=f}h!==0&&Fh(a,f,h)}}function yu(e,n,a,u){kn[Wa++]=e,kn[Wa++]=n,kn[Wa++]=a,kn[Wa++]=u,Ss|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function Es(e,n,a,u){return yu(e,n,a,u),vu(e)}function Ta(e,n){return yu(e,null,null,n),vu(e)}function Fh(e,n,a){e.lanes|=a;var u=e.alternate;u!==null&&(u.lanes|=a);for(var f=!1,h=e.return;h!==null;)h.childLanes|=a,u=h.alternate,u!==null&&(u.childLanes|=a),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(f=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,f&&n!==null&&(f=31-tt(a),e=h.hiddenUpdates,u=e[f],u===null?e[f]=[n]:u.push(n),n.lane=a|536870912),h):null}function vu(e){if(50<pr)throw pr=0,Nc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ei={};function C1(e,n,a,u){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dn(e,n,a,u){return new C1(e,n,a,u)}function ws(e){return e=e.prototype,!(!e||!e.isReactComponent)}function cl(e,n){var a=e.alternate;return a===null?(a=dn(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Vh(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function bu(e,n,a,u,f,h){var x=0;if(u=e,typeof e=="function")ws(e)&&(x=1);else if(typeof e=="string")x=_x(e,a,ce.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=dn(31,a,n,f),e.elementType=W,e.lanes=h,e;case j:return ja(a.children,f,h,n);case R:x=8,f|=24;break;case C:return e=dn(12,a,n,f|2),e.elementType=C,e.lanes=h,e;case $:return e=dn(13,a,n,f),e.elementType=$,e.lanes=h,e;case B:return e=dn(19,a,n,f),e.elementType=B,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D:x=10;break e;case A:x=9;break e;case ee:x=11;break e;case z:x=14;break e;case le:x=16,u=null;break e}x=29,a=Error(r(130,e===null?"null":typeof e,"")),u=null}return n=dn(x,a,n,f),n.elementType=e,n.type=u,n.lanes=h,n}function ja(e,n,a,u){return e=dn(7,e,u,n),e.lanes=a,e}function ks(e,n,a){return e=dn(6,e,null,n),e.lanes=a,e}function Ih(e){var n=dn(18,null,null,0);return n.stateNode=e,n}function Cs(e,n,a){return n=dn(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Xh=new WeakMap;function Cn(e,n){if(typeof e=="object"&&e!==null){var a=Xh.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Ia(n)},Xh.set(e,n),n)}return{value:e,source:n,stack:Ia(n)}}var ti=[],ni=0,xu=null,$i=0,Tn=[],jn=0,Ul=null,$n=1,Kn="";function fl(e,n){ti[ni++]=$i,ti[ni++]=xu,xu=e,$i=n}function Qh(e,n,a){Tn[jn++]=$n,Tn[jn++]=Kn,Tn[jn++]=Ul,Ul=e;var u=$n;e=Kn;var f=32-tt(u)-1;u&=~(1<<f),a+=1;var h=32-tt(n)+f;if(30<h){var x=f-f%5;h=(u&(1<<x)-1).toString(32),u>>=x,f-=x,$n=1<<32-tt(n)+f|a<<f|u,Kn=h+e}else $n=1<<h|a<<f|u,Kn=e}function Ts(e){e.return!==null&&(fl(e,1),Qh(e,1,0))}function js(e){for(;e===xu;)xu=ti[--ni],ti[ni]=null,$i=ti[--ni],ti[ni]=null;for(;e===Ul;)Ul=Tn[--jn],Tn[jn]=null,Kn=Tn[--jn],Tn[jn]=null,$n=Tn[--jn],Tn[jn]=null}function $h(e,n){Tn[jn++]=$n,Tn[jn++]=Kn,Tn[jn++]=Ul,$n=n.id,Kn=n.overflow,Ul=e}var Ht=null,ft=null,$e=!1,Bl=null,An=!1,As=Error(r(519));function Hl(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ki(Cn(n,e)),As}function Kh(e){var n=e.stateNode,a=e.type,u=e.memoizedProps;switch(n[me]=e,n[ve]=u,a){case"dialog":qe("cancel",n),qe("close",n);break;case"iframe":case"object":case"embed":qe("load",n);break;case"video":case"audio":for(a=0;a<yr.length;a++)qe(yr[a],n);break;case"source":qe("error",n);break;case"img":case"image":case"link":qe("error",n),qe("load",n);break;case"details":qe("toggle",n);break;case"input":qe("invalid",n),oh(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":qe("invalid",n);break;case"textarea":qe("invalid",n),ch(n,u.value,u.defaultValue,u.children)}a=u.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||u.suppressHydrationWarning===!0||dg(n.textContent,a)?(u.popover!=null&&(qe("beforetoggle",n),qe("toggle",n)),u.onScroll!=null&&qe("scroll",n),u.onScrollEnd!=null&&qe("scrollend",n),u.onClick!=null&&(n.onclick=ol),n=!0):n=!1,n||Hl(e,!0)}function Zh(e){for(Ht=e.return;Ht;)switch(Ht.tag){case 5:case 31:case 13:An=!1;return;case 27:case 3:An=!0;return;default:Ht=Ht.return}}function li(e){if(e!==Ht)return!1;if(!$e)return Zh(e),$e=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Xc(e.type,e.memoizedProps)),a=!a),a&&ft&&Hl(e),Zh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ft=Sg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ft=Sg(e)}else n===27?(n=ft,Wl(e.type)?(e=Pc,Pc=null,ft=e):ft=n):ft=Ht?_n(e.stateNode.nextSibling):null;return!0}function Aa(){ft=Ht=null,$e=!1}function Rs(){var e=Bl;return e!==null&&(ln===null?ln=e:ln.push.apply(ln,e),Bl=null),e}function Ki(e){Bl===null?Bl=[e]:Bl.push(e)}var _s=L(null),Ra=null,dl=null;function ql(e,n,a){T(_s,n._currentValue),n._currentValue=a}function hl(e){e._currentValue=_s.current,P(_s)}function Ns(e,n,a){for(;e!==null;){var u=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),e===a)break;e=e.return}}function Ds(e,n,a,u){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var h=f.dependencies;if(h!==null){var x=f.child;h=h.firstContext;e:for(;h!==null;){var w=h;h=f;for(var M=0;M<n.length;M++)if(w.context===n[M]){h.lanes|=a,w=h.alternate,w!==null&&(w.lanes|=a),Ns(h.return,a,e),u||(x=null);break e}h=w.next}}else if(f.tag===18){if(x=f.return,x===null)throw Error(r(341));x.lanes|=a,h=x.alternate,h!==null&&(h.lanes|=a),Ns(x,a,e),x=null}else x=f.child;if(x!==null)x.return=f;else for(x=f;x!==null;){if(x===e){x=null;break}if(f=x.sibling,f!==null){f.return=x.return,x=f;break}x=x.return}f=x}}function ai(e,n,a,u){e=null;for(var f=n,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var x=f.alternate;if(x===null)throw Error(r(387));if(x=x.memoizedProps,x!==null){var w=f.type;fn(f.pendingProps.value,x.value)||(e!==null?e.push(w):e=[w])}}else if(f===ze.current){if(x=f.alternate,x===null)throw Error(r(387));x.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Er):e=[Er])}f=f.return}e!==null&&Ds(n,e,a,u),n.flags|=262144}function Su(e){for(e=e.firstContext;e!==null;){if(!fn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function _a(e){Ra=e,dl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qt(e){return Ph(Ra,e)}function Eu(e,n){return Ra===null&&_a(e),Ph(e,n)}function Ph(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},dl===null){if(e===null)throw Error(r(308));dl=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else dl=dl.next=n;return a}var T1=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,u){e.push(u)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},j1=t.unstable_scheduleCallback,A1=t.unstable_NormalPriority,Tt={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zs(){return{controller:new T1,data:new Map,refCount:0}}function Zi(e){e.refCount--,e.refCount===0&&j1(A1,function(){e.controller.abort()})}var Pi=null,Os=0,ii=0,ri=null;function R1(e,n){if(Pi===null){var a=Pi=[];Os=0,ii=Uc(),ri={status:"pending",value:void 0,then:function(u){a.push(u)}}}return Os++,n.then(Jh,Jh),n}function Jh(){if(--Os===0&&Pi!==null){ri!==null&&(ri.status="fulfilled");var e=Pi;Pi=null,ii=0,ri=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function _1(e,n){var a=[],u={status:"pending",value:null,reason:null,then:function(f){a.push(f)}};return e.then(function(){u.status="fulfilled",u.value=n;for(var f=0;f<a.length;f++)(0,a[f])(n)},function(f){for(u.status="rejected",u.reason=f,f=0;f<a.length;f++)(0,a[f])(void 0)}),u}var Wh=H.S;H.S=function(e,n){Lp=pt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&R1(e,n),Wh!==null&&Wh(e,n)};var Na=L(null);function Ms(){var e=Na.current;return e!==null?e:ot.pooledCache}function wu(e,n){n===null?T(Na,Na.current):T(Na,n.pool)}function em(){var e=Ms();return e===null?null:{parent:Tt._currentValue,pool:e}}var ui=Error(r(460)),Ls=Error(r(474)),ku=Error(r(542)),Cu={then:function(){}};function tm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function nm(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(ol,ol),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,am(e),e;default:if(typeof n.status=="string")n.then(ol,ol);else{if(e=ot,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(u){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=u}},function(u){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,am(e),e}throw za=n,ui}}function Da(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(za=a,ui):a}}var za=null;function lm(){if(za===null)throw Error(r(459));var e=za;return za=null,e}function am(e){if(e===ui||e===ku)throw Error(r(483))}var oi=null,Ji=0;function Tu(e){var n=Ji;return Ji+=1,oi===null&&(oi=[]),nm(oi,e,n)}function Wi(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function ju(e,n){throw n.$$typeof===b?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function im(e){function n(Y,U){if(e){var I=Y.deletions;I===null?(Y.deletions=[U],Y.flags|=16):I.push(U)}}function a(Y,U){if(!e)return null;for(;U!==null;)n(Y,U),U=U.sibling;return null}function u(Y){for(var U=new Map;Y!==null;)Y.key!==null?U.set(Y.key,Y):U.set(Y.index,Y),Y=Y.sibling;return U}function f(Y,U){return Y=cl(Y,U),Y.index=0,Y.sibling=null,Y}function h(Y,U,I){return Y.index=I,e?(I=Y.alternate,I!==null?(I=I.index,I<U?(Y.flags|=67108866,U):I):(Y.flags|=67108866,U)):(Y.flags|=1048576,U)}function x(Y){return e&&Y.alternate===null&&(Y.flags|=67108866),Y}function w(Y,U,I,re){return U===null||U.tag!==6?(U=ks(I,Y.mode,re),U.return=Y,U):(U=f(U,I),U.return=Y,U)}function M(Y,U,I,re){var je=I.type;return je===j?ae(Y,U,I.props.children,re,I.key):U!==null&&(U.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===le&&Da(je)===U.type)?(U=f(U,I.props),Wi(U,I),U.return=Y,U):(U=bu(I.type,I.key,I.props,null,Y.mode,re),Wi(U,I),U.return=Y,U)}function X(Y,U,I,re){return U===null||U.tag!==4||U.stateNode.containerInfo!==I.containerInfo||U.stateNode.implementation!==I.implementation?(U=Cs(I,Y.mode,re),U.return=Y,U):(U=f(U,I.children||[]),U.return=Y,U)}function ae(Y,U,I,re,je){return U===null||U.tag!==7?(U=ja(I,Y.mode,re,je),U.return=Y,U):(U=f(U,I),U.return=Y,U)}function oe(Y,U,I){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=ks(""+U,Y.mode,I),U.return=Y,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case S:return I=bu(U.type,U.key,U.props,null,Y.mode,I),Wi(I,U),I.return=Y,I;case E:return U=Cs(U,Y.mode,I),U.return=Y,U;case le:return U=Da(U),oe(Y,U,I)}if(K(U)||q(U))return U=ja(U,Y.mode,I,null),U.return=Y,U;if(typeof U.then=="function")return oe(Y,Tu(U),I);if(U.$$typeof===D)return oe(Y,Eu(Y,U),I);ju(Y,U)}return null}function Q(Y,U,I,re){var je=U!==null?U.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return je!==null?null:w(Y,U,""+I,re);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case S:return I.key===je?M(Y,U,I,re):null;case E:return I.key===je?X(Y,U,I,re):null;case le:return I=Da(I),Q(Y,U,I,re)}if(K(I)||q(I))return je!==null?null:ae(Y,U,I,re,null);if(typeof I.then=="function")return Q(Y,U,Tu(I),re);if(I.$$typeof===D)return Q(Y,U,Eu(Y,I),re);ju(Y,I)}return null}function J(Y,U,I,re,je){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Y=Y.get(I)||null,w(U,Y,""+re,je);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case S:return Y=Y.get(re.key===null?I:re.key)||null,M(U,Y,re,je);case E:return Y=Y.get(re.key===null?I:re.key)||null,X(U,Y,re,je);case le:return re=Da(re),J(Y,U,I,re,je)}if(K(re)||q(re))return Y=Y.get(I)||null,ae(U,Y,re,je,null);if(typeof re.then=="function")return J(Y,U,I,Tu(re),je);if(re.$$typeof===D)return J(Y,U,I,Eu(U,re),je);ju(U,re)}return null}function Se(Y,U,I,re){for(var je=null,Je=null,Ee=U,Le=U=0,Fe=null;Ee!==null&&Le<I.length;Le++){Ee.index>Le?(Fe=Ee,Ee=null):Fe=Ee.sibling;var We=Q(Y,Ee,I[Le],re);if(We===null){Ee===null&&(Ee=Fe);break}e&&Ee&&We.alternate===null&&n(Y,Ee),U=h(We,U,Le),Je===null?je=We:Je.sibling=We,Je=We,Ee=Fe}if(Le===I.length)return a(Y,Ee),$e&&fl(Y,Le),je;if(Ee===null){for(;Le<I.length;Le++)Ee=oe(Y,I[Le],re),Ee!==null&&(U=h(Ee,U,Le),Je===null?je=Ee:Je.sibling=Ee,Je=Ee);return $e&&fl(Y,Le),je}for(Ee=u(Ee);Le<I.length;Le++)Fe=J(Ee,Y,Le,I[Le],re),Fe!==null&&(e&&Fe.alternate!==null&&Ee.delete(Fe.key===null?Le:Fe.key),U=h(Fe,U,Le),Je===null?je=Fe:Je.sibling=Fe,Je=Fe);return e&&Ee.forEach(function(aa){return n(Y,aa)}),$e&&fl(Y,Le),je}function Ne(Y,U,I,re){if(I==null)throw Error(r(151));for(var je=null,Je=null,Ee=U,Le=U=0,Fe=null,We=I.next();Ee!==null&&!We.done;Le++,We=I.next()){Ee.index>Le?(Fe=Ee,Ee=null):Fe=Ee.sibling;var aa=Q(Y,Ee,We.value,re);if(aa===null){Ee===null&&(Ee=Fe);break}e&&Ee&&aa.alternate===null&&n(Y,Ee),U=h(aa,U,Le),Je===null?je=aa:Je.sibling=aa,Je=aa,Ee=Fe}if(We.done)return a(Y,Ee),$e&&fl(Y,Le),je;if(Ee===null){for(;!We.done;Le++,We=I.next())We=oe(Y,We.value,re),We!==null&&(U=h(We,U,Le),Je===null?je=We:Je.sibling=We,Je=We);return $e&&fl(Y,Le),je}for(Ee=u(Ee);!We.done;Le++,We=I.next())We=J(Ee,Y,Le,We.value,re),We!==null&&(e&&We.alternate!==null&&Ee.delete(We.key===null?Le:We.key),U=h(We,U,Le),Je===null?je=We:Je.sibling=We,Je=We);return e&&Ee.forEach(function(Yx){return n(Y,Yx)}),$e&&fl(Y,Le),je}function ut(Y,U,I,re){if(typeof I=="object"&&I!==null&&I.type===j&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case S:e:{for(var je=I.key;U!==null;){if(U.key===je){if(je=I.type,je===j){if(U.tag===7){a(Y,U.sibling),re=f(U,I.props.children),re.return=Y,Y=re;break e}}else if(U.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===le&&Da(je)===U.type){a(Y,U.sibling),re=f(U,I.props),Wi(re,I),re.return=Y,Y=re;break e}a(Y,U);break}else n(Y,U);U=U.sibling}I.type===j?(re=ja(I.props.children,Y.mode,re,I.key),re.return=Y,Y=re):(re=bu(I.type,I.key,I.props,null,Y.mode,re),Wi(re,I),re.return=Y,Y=re)}return x(Y);case E:e:{for(je=I.key;U!==null;){if(U.key===je)if(U.tag===4&&U.stateNode.containerInfo===I.containerInfo&&U.stateNode.implementation===I.implementation){a(Y,U.sibling),re=f(U,I.children||[]),re.return=Y,Y=re;break e}else{a(Y,U);break}else n(Y,U);U=U.sibling}re=Cs(I,Y.mode,re),re.return=Y,Y=re}return x(Y);case le:return I=Da(I),ut(Y,U,I,re)}if(K(I))return Se(Y,U,I,re);if(q(I)){if(je=q(I),typeof je!="function")throw Error(r(150));return I=je.call(I),Ne(Y,U,I,re)}if(typeof I.then=="function")return ut(Y,U,Tu(I),re);if(I.$$typeof===D)return ut(Y,U,Eu(Y,I),re);ju(Y,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,U!==null&&U.tag===6?(a(Y,U.sibling),re=f(U,I),re.return=Y,Y=re):(a(Y,U),re=ks(I,Y.mode,re),re.return=Y,Y=re),x(Y)):a(Y,U)}return function(Y,U,I,re){try{Ji=0;var je=ut(Y,U,I,re);return oi=null,je}catch(Ee){if(Ee===ui||Ee===ku)throw Ee;var Je=dn(29,Ee,null,Y.mode);return Je.lanes=re,Je.return=Y,Je}}}var Oa=im(!0),rm=im(!1),Yl=!1;function Us(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bs(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Gl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fl(e,n,a){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(et&2)!==0){var f=u.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),u.pending=n,n=vu(e),Fh(e,null,a),n}return yu(e,u,n,a),vu(e)}function er(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var u=n.lanes;u&=e.pendingLanes,a|=u,n.lanes=a,O(e,a)}}function Hs(e,n){var a=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var f=null,h=null;if(a=a.firstBaseUpdate,a!==null){do{var x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};h===null?f=h=x:h=h.next=x,a=a.next}while(a!==null);h===null?f=h=n:h=h.next=n}else f=h=n;a={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:u.shared,callbacks:u.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var qs=!1;function tr(){if(qs){var e=ri;if(e!==null)throw e}}function nr(e,n,a,u){qs=!1;var f=e.updateQueue;Yl=!1;var h=f.firstBaseUpdate,x=f.lastBaseUpdate,w=f.shared.pending;if(w!==null){f.shared.pending=null;var M=w,X=M.next;M.next=null,x===null?h=X:x.next=X,x=M;var ae=e.alternate;ae!==null&&(ae=ae.updateQueue,w=ae.lastBaseUpdate,w!==x&&(w===null?ae.firstBaseUpdate=X:w.next=X,ae.lastBaseUpdate=M))}if(h!==null){var oe=f.baseState;x=0,ae=X=M=null,w=h;do{var Q=w.lane&-536870913,J=Q!==w.lane;if(J?(Ge&Q)===Q:(u&Q)===Q){Q!==0&&Q===ii&&(qs=!0),ae!==null&&(ae=ae.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var Se=e,Ne=w;Q=n;var ut=a;switch(Ne.tag){case 1:if(Se=Ne.payload,typeof Se=="function"){oe=Se.call(ut,oe,Q);break e}oe=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ne.payload,Q=typeof Se=="function"?Se.call(ut,oe,Q):Se,Q==null)break e;oe=g({},oe,Q);break e;case 2:Yl=!0}}Q=w.callback,Q!==null&&(e.flags|=64,J&&(e.flags|=8192),J=f.callbacks,J===null?f.callbacks=[Q]:J.push(Q))}else J={lane:Q,tag:w.tag,payload:w.payload,callback:w.callback,next:null},ae===null?(X=ae=J,M=oe):ae=ae.next=J,x|=Q;if(w=w.next,w===null){if(w=f.shared.pending,w===null)break;J=w,w=J.next,J.next=null,f.lastBaseUpdate=J,f.shared.pending=null}}while(!0);ae===null&&(M=oe),f.baseState=M,f.firstBaseUpdate=X,f.lastBaseUpdate=ae,h===null&&(f.shared.lanes=0),$l|=x,e.lanes=x,e.memoizedState=oe}}function um(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function om(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)um(a[e],n)}var si=L(null),Au=L(0);function sm(e,n){e=El,T(Au,e),T(si,n),El=e|n.baseLanes}function Ys(){T(Au,El),T(si,si.current)}function Gs(){El=Au.current,P(si),P(Au)}var hn=L(null),Rn=null;function Vl(e){var n=e.alternate;T(wt,wt.current&1),T(hn,e),Rn===null&&(n===null||si.current!==null||n.memoizedState!==null)&&(Rn=e)}function Fs(e){T(wt,wt.current),T(hn,e),Rn===null&&(Rn=e)}function cm(e){e.tag===22?(T(wt,wt.current),T(hn,e),Rn===null&&(Rn=e)):Il()}function Il(){T(wt,wt.current),T(hn,hn.current)}function mn(e){P(hn),Rn===e&&(Rn=null),P(wt)}var wt=L(0);function Ru(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Kc(a)||Zc(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var ml=0,Me=null,it=null,jt=null,_u=!1,ci=!1,Ma=!1,Nu=0,lr=0,fi=null,N1=0;function xt(){throw Error(r(321))}function Vs(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!fn(e[a],n[a]))return!1;return!0}function Is(e,n,a,u,f,h){return ml=h,Me=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,H.H=e===null||e.memoizedState===null?Qm:rc,Ma=!1,h=a(u,f),Ma=!1,ci&&(h=dm(n,a,u,f)),fm(e),h}function fm(e){H.H=rr;var n=it!==null&&it.next!==null;if(ml=0,jt=it=Me=null,_u=!1,lr=0,fi=null,n)throw Error(r(300));e===null||At||(e=e.dependencies,e!==null&&Su(e)&&(At=!0))}function dm(e,n,a,u){Me=e;var f=0;do{if(ci&&(fi=null),lr=0,ci=!1,25<=f)throw Error(r(301));if(f+=1,jt=it=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}H.H=$m,h=n(a,u)}while(ci);return h}function D1(){var e=H.H,n=e.useState()[0];return n=typeof n.then=="function"?ar(n):n,e=e.useState()[0],(it!==null?it.memoizedState:null)!==e&&(Me.flags|=1024),n}function Xs(){var e=Nu!==0;return Nu=0,e}function Qs(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function $s(e){if(_u){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}_u=!1}ml=0,jt=it=Me=null,ci=!1,lr=Nu=0,fi=null}function Kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Me.memoizedState=jt=e:jt=jt.next=e,jt}function kt(){if(it===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var n=jt===null?Me.memoizedState:jt.next;if(n!==null)jt=n,it=e;else{if(e===null)throw Me.alternate===null?Error(r(467)):Error(r(310));it=e,e={memoizedState:it.memoizedState,baseState:it.baseState,baseQueue:it.baseQueue,queue:it.queue,next:null},jt===null?Me.memoizedState=jt=e:jt=jt.next=e}return jt}function Du(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ar(e){var n=lr;return lr+=1,fi===null&&(fi=[]),e=nm(fi,e,n),n=Me,(jt===null?n.memoizedState:jt.next)===null&&(n=n.alternate,H.H=n===null||n.memoizedState===null?Qm:rc),e}function zu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ar(e);if(e.$$typeof===D)return qt(e)}throw Error(r(438,String(e)))}function Ks(e){var n=null,a=Me.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var u=Me.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=Du(),Me.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),u=0;u<e;u++)a[u]=_;return n.index++,a}function pl(e,n){return typeof n=="function"?n(e):n}function Ou(e){var n=kt();return Zs(n,it,e)}function Zs(e,n,a){var u=e.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var f=e.baseQueue,h=u.pending;if(h!==null){if(f!==null){var x=f.next;f.next=h.next,h.next=x}n.baseQueue=f=h,u.pending=null}if(h=e.baseState,f===null)e.memoizedState=h;else{n=f.next;var w=x=null,M=null,X=n,ae=!1;do{var oe=X.lane&-536870913;if(oe!==X.lane?(Ge&oe)===oe:(ml&oe)===oe){var Q=X.revertLane;if(Q===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),oe===ii&&(ae=!0);else if((ml&Q)===Q){X=X.next,Q===ii&&(ae=!0);continue}else oe={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},M===null?(w=M=oe,x=h):M=M.next=oe,Me.lanes|=Q,$l|=Q;oe=X.action,Ma&&a(h,oe),h=X.hasEagerState?X.eagerState:a(h,oe)}else Q={lane:oe,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},M===null?(w=M=Q,x=h):M=M.next=Q,Me.lanes|=oe,$l|=oe;X=X.next}while(X!==null&&X!==n);if(M===null?x=h:M.next=w,!fn(h,e.memoizedState)&&(At=!0,ae&&(a=ri,a!==null)))throw a;e.memoizedState=h,e.baseState=x,e.baseQueue=M,u.lastRenderedState=h}return f===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function Ps(e){var n=kt(),a=n.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var u=a.dispatch,f=a.pending,h=n.memoizedState;if(f!==null){a.pending=null;var x=f=f.next;do h=e(h,x.action),x=x.next;while(x!==f);fn(h,n.memoizedState)||(At=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),a.lastRenderedState=h}return[h,u]}function hm(e,n,a){var u=Me,f=kt(),h=$e;if(h){if(a===void 0)throw Error(r(407));a=a()}else a=n();var x=!fn((it||f).memoizedState,a);if(x&&(f.memoizedState=a,At=!0),f=f.queue,ec(gm.bind(null,u,f,e),[e]),f.getSnapshot!==n||x||jt!==null&&jt.memoizedState.tag&1){if(u.flags|=2048,di(9,{destroy:void 0},pm.bind(null,u,f,a,n),null),ot===null)throw Error(r(349));h||(ml&127)!==0||mm(u,n,a)}return a}function mm(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=Me.updateQueue,n===null?(n=Du(),Me.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function pm(e,n,a,u){n.value=a,n.getSnapshot=u,ym(n)&&vm(e)}function gm(e,n,a){return a(function(){ym(n)&&vm(e)})}function ym(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!fn(e,a)}catch{return!0}}function vm(e){var n=Ta(e,2);n!==null&&an(n,e,2)}function Js(e){var n=Kt();if(typeof e=="function"){var a=e;if(e=a(),Ma){Ut(!0);try{a()}finally{Ut(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:e},n}function bm(e,n,a,u){return e.baseState=a,Zs(e,it,typeof u=="function"?u:pl)}function z1(e,n,a,u,f){if(Uu(e))throw Error(r(485));if(e=n.action,e!==null){var h={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){h.listeners.push(x)}};H.T!==null?a(!0):h.isTransition=!1,u(h),a=n.pending,a===null?(h.next=n.pending=h,xm(n,h)):(h.next=a.next,n.pending=a.next=h)}}function xm(e,n){var a=n.action,u=n.payload,f=e.state;if(n.isTransition){var h=H.T,x={};H.T=x;try{var w=a(f,u),M=H.S;M!==null&&M(x,w),Sm(e,n,w)}catch(X){Ws(e,n,X)}finally{h!==null&&x.types!==null&&(h.types=x.types),H.T=h}}else try{h=a(f,u),Sm(e,n,h)}catch(X){Ws(e,n,X)}}function Sm(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(u){Em(e,n,u)},function(u){return Ws(e,n,u)}):Em(e,n,a)}function Em(e,n,a){n.status="fulfilled",n.value=a,wm(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,xm(e,a)))}function Ws(e,n,a){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=a,wm(n),n=n.next;while(n!==u)}e.action=null}function wm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function km(e,n){return n}function Cm(e,n){if($e){var a=ot.formState;if(a!==null){e:{var u=Me;if($e){if(ft){t:{for(var f=ft,h=An;f.nodeType!==8;){if(!h){f=null;break t}if(f=_n(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){ft=_n(f.nextSibling),u=f.data==="F!";break e}}Hl(u)}u=!1}u&&(n=a[0])}}return a=Kt(),a.memoizedState=a.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:km,lastRenderedState:n},a.queue=u,a=Vm.bind(null,Me,u),u.dispatch=a,u=Js(!1),h=ic.bind(null,Me,!1,u.queue),u=Kt(),f={state:n,dispatch:null,action:e,pending:null},u.queue=f,a=z1.bind(null,Me,f,h,a),f.dispatch=a,u.memoizedState=e,[n,a,!1]}function Tm(e){var n=kt();return jm(n,it,e)}function jm(e,n,a){if(n=Zs(e,n,km)[0],e=Ou(pl)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=ar(n)}catch(x){throw x===ui?ku:x}else u=n;n=kt();var f=n.queue,h=f.dispatch;return a!==n.memoizedState&&(Me.flags|=2048,di(9,{destroy:void 0},O1.bind(null,f,a),null)),[u,h,e]}function O1(e,n){e.action=n}function Am(e){var n=kt(),a=it;if(a!==null)return jm(n,a,e);kt(),n=n.memoizedState,a=kt();var u=a.queue.dispatch;return a.memoizedState=e,[n,u,!1]}function di(e,n,a,u){return e={tag:e,create:a,deps:u,inst:n,next:null},n=Me.updateQueue,n===null&&(n=Du(),Me.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(u=a.next,a.next=e,e.next=u,n.lastEffect=e),e}function Rm(){return kt().memoizedState}function Mu(e,n,a,u){var f=Kt();Me.flags|=e,f.memoizedState=di(1|n,{destroy:void 0},a,u===void 0?null:u)}function Lu(e,n,a,u){var f=kt();u=u===void 0?null:u;var h=f.memoizedState.inst;it!==null&&u!==null&&Vs(u,it.memoizedState.deps)?f.memoizedState=di(n,h,a,u):(Me.flags|=e,f.memoizedState=di(1|n,h,a,u))}function _m(e,n){Mu(8390656,8,e,n)}function ec(e,n){Lu(2048,8,e,n)}function M1(e){Me.flags|=4;var n=Me.updateQueue;if(n===null)n=Du(),Me.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function Nm(e){var n=kt().memoizedState;return M1({ref:n,nextImpl:e}),function(){if((et&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function Dm(e,n){return Lu(4,2,e,n)}function zm(e,n){return Lu(4,4,e,n)}function Om(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Mm(e,n,a){a=a!=null?a.concat([e]):null,Lu(4,4,Om.bind(null,n,e),a)}function tc(){}function Lm(e,n){var a=kt();n=n===void 0?null:n;var u=a.memoizedState;return n!==null&&Vs(n,u[1])?u[0]:(a.memoizedState=[e,n],e)}function Um(e,n){var a=kt();n=n===void 0?null:n;var u=a.memoizedState;if(n!==null&&Vs(n,u[1]))return u[0];if(u=e(),Ma){Ut(!0);try{e()}finally{Ut(!1)}}return a.memoizedState=[u,n],u}function nc(e,n,a){return a===void 0||(ml&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=Bp(),Me.lanes|=e,$l|=e,a)}function Bm(e,n,a,u){return fn(a,n)?a:si.current!==null?(e=nc(e,a,u),fn(e,n)||(At=!0),e):(ml&42)===0||(ml&1073741824)!==0&&(Ge&261930)===0?(At=!0,e.memoizedState=a):(e=Bp(),Me.lanes|=e,$l|=e,n)}function Hm(e,n,a,u,f){var h=te.p;te.p=h!==0&&8>h?h:8;var x=H.T,w={};H.T=w,ic(e,!1,n,a);try{var M=f(),X=H.S;if(X!==null&&X(w,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var ae=_1(M,u);ir(e,n,ae,yn(e))}else ir(e,n,u,yn(e))}catch(oe){ir(e,n,{then:function(){},status:"rejected",reason:oe},yn())}finally{te.p=h,x!==null&&w.types!==null&&(x.types=w.types),H.T=x}}function L1(){}function lc(e,n,a,u){if(e.tag!==5)throw Error(r(476));var f=qm(e).queue;Hm(e,f,n,ue,a===null?L1:function(){return Ym(e),a(u)})}function qm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:ue},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Ym(e){var n=qm(e);n.next===null&&(n=e.alternate.memoizedState),ir(e,n.next.queue,{},yn())}function ac(){return qt(Er)}function Gm(){return kt().memoizedState}function Fm(){return kt().memoizedState}function U1(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=yn();e=Gl(a);var u=Fl(n,e,a);u!==null&&(an(u,n,a),er(u,n,a)),n={cache:zs()},e.payload=n;return}n=n.return}}function B1(e,n,a){var u=yn();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Uu(e)?Im(n,a):(a=Es(e,n,a,u),a!==null&&(an(a,e,u),Xm(a,n,u)))}function Vm(e,n,a){var u=yn();ir(e,n,a,u)}function ir(e,n,a,u){var f={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Uu(e))Im(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var x=n.lastRenderedState,w=h(x,a);if(f.hasEagerState=!0,f.eagerState=w,fn(w,x))return yu(e,n,f,0),ot===null&&gu(),!1}catch{}if(a=Es(e,n,f,u),a!==null)return an(a,e,u),Xm(a,n,u),!0}return!1}function ic(e,n,a,u){if(u={lane:2,revertLane:Uc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Uu(e)){if(n)throw Error(r(479))}else n=Es(e,a,u,2),n!==null&&an(n,e,2)}function Uu(e){var n=e.alternate;return e===Me||n!==null&&n===Me}function Im(e,n){ci=_u=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function Xm(e,n,a){if((a&4194048)!==0){var u=n.lanes;u&=e.pendingLanes,a|=u,n.lanes=a,O(e,a)}}var rr={readContext:qt,use:zu,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt};rr.useEffectEvent=xt;var Qm={readContext:qt,use:zu,useCallback:function(e,n){return Kt().memoizedState=[e,n===void 0?null:n],e},useContext:qt,useEffect:_m,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,Mu(4194308,4,Om.bind(null,n,e),a)},useLayoutEffect:function(e,n){return Mu(4194308,4,e,n)},useInsertionEffect:function(e,n){Mu(4,2,e,n)},useMemo:function(e,n){var a=Kt();n=n===void 0?null:n;var u=e();if(Ma){Ut(!0);try{e()}finally{Ut(!1)}}return a.memoizedState=[u,n],u},useReducer:function(e,n,a){var u=Kt();if(a!==void 0){var f=a(n);if(Ma){Ut(!0);try{a(n)}finally{Ut(!1)}}}else f=n;return u.memoizedState=u.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},u.queue=e,e=e.dispatch=B1.bind(null,Me,e),[u.memoizedState,e]},useRef:function(e){var n=Kt();return e={current:e},n.memoizedState=e},useState:function(e){e=Js(e);var n=e.queue,a=Vm.bind(null,Me,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:tc,useDeferredValue:function(e,n){var a=Kt();return nc(a,e,n)},useTransition:function(){var e=Js(!1);return e=Hm.bind(null,Me,e.queue,!0,!1),Kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var u=Me,f=Kt();if($e){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),ot===null)throw Error(r(349));(Ge&127)!==0||mm(u,n,a)}f.memoizedState=a;var h={value:a,getSnapshot:n};return f.queue=h,_m(gm.bind(null,u,h,e),[e]),u.flags|=2048,di(9,{destroy:void 0},pm.bind(null,u,h,a,n),null),a},useId:function(){var e=Kt(),n=ot.identifierPrefix;if($e){var a=Kn,u=$n;a=(u&~(1<<32-tt(u)-1)).toString(32)+a,n="_"+n+"R_"+a,a=Nu++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=N1++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:ac,useFormState:Cm,useActionState:Cm,useOptimistic:function(e){var n=Kt();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=ic.bind(null,Me,!0,a),a.dispatch=n,[e,n]},useMemoCache:Ks,useCacheRefresh:function(){return Kt().memoizedState=U1.bind(null,Me)},useEffectEvent:function(e){var n=Kt(),a={impl:e};return n.memoizedState=a,function(){if((et&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},rc={readContext:qt,use:zu,useCallback:Lm,useContext:qt,useEffect:ec,useImperativeHandle:Mm,useInsertionEffect:Dm,useLayoutEffect:zm,useMemo:Um,useReducer:Ou,useRef:Rm,useState:function(){return Ou(pl)},useDebugValue:tc,useDeferredValue:function(e,n){var a=kt();return Bm(a,it.memoizedState,e,n)},useTransition:function(){var e=Ou(pl)[0],n=kt().memoizedState;return[typeof e=="boolean"?e:ar(e),n]},useSyncExternalStore:hm,useId:Gm,useHostTransitionStatus:ac,useFormState:Tm,useActionState:Tm,useOptimistic:function(e,n){var a=kt();return bm(a,it,e,n)},useMemoCache:Ks,useCacheRefresh:Fm};rc.useEffectEvent=Nm;var $m={readContext:qt,use:zu,useCallback:Lm,useContext:qt,useEffect:ec,useImperativeHandle:Mm,useInsertionEffect:Dm,useLayoutEffect:zm,useMemo:Um,useReducer:Ps,useRef:Rm,useState:function(){return Ps(pl)},useDebugValue:tc,useDeferredValue:function(e,n){var a=kt();return it===null?nc(a,e,n):Bm(a,it.memoizedState,e,n)},useTransition:function(){var e=Ps(pl)[0],n=kt().memoizedState;return[typeof e=="boolean"?e:ar(e),n]},useSyncExternalStore:hm,useId:Gm,useHostTransitionStatus:ac,useFormState:Am,useActionState:Am,useOptimistic:function(e,n){var a=kt();return it!==null?bm(a,it,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Ks,useCacheRefresh:Fm};$m.useEffectEvent=Nm;function uc(e,n,a,u){n=e.memoizedState,a=a(u,n),a=a==null?n:g({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var oc={enqueueSetState:function(e,n,a){e=e._reactInternals;var u=yn(),f=Gl(u);f.payload=n,a!=null&&(f.callback=a),n=Fl(e,f,u),n!==null&&(an(n,e,u),er(n,e,u))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var u=yn(),f=Gl(u);f.tag=1,f.payload=n,a!=null&&(f.callback=a),n=Fl(e,f,u),n!==null&&(an(n,e,u),er(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=yn(),u=Gl(a);u.tag=2,n!=null&&(u.callback=n),n=Fl(e,u,a),n!==null&&(an(n,e,a),er(n,e,a))}};function Km(e,n,a,u,f,h,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,h,x):n.prototype&&n.prototype.isPureReactComponent?!Xi(a,u)||!Xi(f,h):!0}function Zm(e,n,a,u){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,u),n.state!==e&&oc.enqueueReplaceState(n,n.state,null)}function La(e,n){var a=n;if("ref"in n){a={};for(var u in n)u!=="ref"&&(a[u]=n[u])}if(e=e.defaultProps){a===n&&(a=g({},a));for(var f in e)a[f]===void 0&&(a[f]=e[f])}return a}function Pm(e){pu(e)}function Jm(e){console.error(e)}function Wm(e){pu(e)}function Bu(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function ep(e,n,a){try{var u=e.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function sc(e,n,a){return a=Gl(a),a.tag=3,a.payload={element:null},a.callback=function(){Bu(e,n)},a}function tp(e){return e=Gl(e),e.tag=3,e}function np(e,n,a,u){var f=a.type.getDerivedStateFromError;if(typeof f=="function"){var h=u.value;e.payload=function(){return f(h)},e.callback=function(){ep(n,a,u)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){ep(n,a,u),typeof f!="function"&&(Kl===null?Kl=new Set([this]):Kl.add(this));var w=u.stack;this.componentDidCatch(u.value,{componentStack:w!==null?w:""})})}function H1(e,n,a,u,f){if(a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=a.alternate,n!==null&&ai(n,a,f,!0),a=hn.current,a!==null){switch(a.tag){case 31:case 13:return Rn===null?Zu():a.alternate===null&&St===0&&(St=3),a.flags&=-257,a.flags|=65536,a.lanes=f,u===Cu?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([u]):n.add(u),Oc(e,u,f)),!1;case 22:return a.flags|=65536,u===Cu?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([u]):a.add(u)),Oc(e,u,f)),!1}throw Error(r(435,a.tag))}return Oc(e,u,f),Zu(),!1}if($e)return n=hn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,u!==As&&(e=Error(r(422),{cause:u}),Ki(Cn(e,a)))):(u!==As&&(n=Error(r(423),{cause:u}),Ki(Cn(n,a))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,u=Cn(u,a),f=sc(e.stateNode,u,f),Hs(e,f),St!==4&&(St=2)),!1;var h=Error(r(520),{cause:u});if(h=Cn(h,a),mr===null?mr=[h]:mr.push(h),St!==4&&(St=2),n===null)return!0;u=Cn(u,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=f&-f,a.lanes|=e,e=sc(a.stateNode,u,e),Hs(a,e),!1;case 1:if(n=a.type,h=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Kl===null||!Kl.has(h))))return a.flags|=65536,f&=-f,a.lanes|=f,f=tp(f),np(f,e,a,u),Hs(a,f),!1}a=a.return}while(a!==null);return!1}var cc=Error(r(461)),At=!1;function Yt(e,n,a,u){n.child=e===null?rm(n,null,a,u):Oa(n,e.child,a,u)}function lp(e,n,a,u,f){a=a.render;var h=n.ref;if("ref"in u){var x={};for(var w in u)w!=="ref"&&(x[w]=u[w])}else x=u;return _a(n),u=Is(e,n,a,x,h,f),w=Xs(),e!==null&&!At?(Qs(e,n,f),gl(e,n,f)):($e&&w&&Ts(n),n.flags|=1,Yt(e,n,u,f),n.child)}function ap(e,n,a,u,f){if(e===null){var h=a.type;return typeof h=="function"&&!ws(h)&&h.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=h,ip(e,n,h,u,f)):(e=bu(a.type,null,u,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,!vc(e,f)){var x=h.memoizedProps;if(a=a.compare,a=a!==null?a:Xi,a(x,u)&&e.ref===n.ref)return gl(e,n,f)}return n.flags|=1,e=cl(h,u),e.ref=n.ref,e.return=n,n.child=e}function ip(e,n,a,u,f){if(e!==null){var h=e.memoizedProps;if(Xi(h,u)&&e.ref===n.ref)if(At=!1,n.pendingProps=u=h,vc(e,f))(e.flags&131072)!==0&&(At=!0);else return n.lanes=e.lanes,gl(e,n,f)}return fc(e,n,a,u,f)}function rp(e,n,a,u){var f=u.children,h=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((n.flags&128)!==0){if(h=h!==null?h.baseLanes|a:a,e!==null){for(u=n.child=e.child,f=0;u!==null;)f=f|u.lanes|u.childLanes,u=u.sibling;u=f&~h}else u=0,n.child=null;return up(e,n,h,a,u)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&wu(n,h!==null?h.cachePool:null),h!==null?sm(n,h):Ys(),cm(n);else return u=n.lanes=536870912,up(e,n,h!==null?h.baseLanes|a:a,a,u)}else h!==null?(wu(n,h.cachePool),sm(n,h),Il(),n.memoizedState=null):(e!==null&&wu(n,null),Ys(),Il());return Yt(e,n,f,a),n.child}function ur(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function up(e,n,a,u,f){var h=Ms();return h=h===null?null:{parent:Tt._currentValue,pool:h},n.memoizedState={baseLanes:a,cachePool:h},e!==null&&wu(n,null),Ys(),cm(n),e!==null&&ai(e,n,u,!0),n.childLanes=f,null}function Hu(e,n){return n=Yu({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function op(e,n,a){return Oa(n,e.child,null,a),e=Hu(n,n.pendingProps),e.flags|=2,mn(n),n.memoizedState=null,e}function q1(e,n,a){var u=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if($e){if(u.mode==="hidden")return e=Hu(n,u),n.lanes=536870912,ur(null,e);if(Fs(n),(e=ft)?(e=xg(e,An),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ul!==null?{id:$n,overflow:Kn}:null,retryLane:536870912,hydrationErrors:null},a=Ih(e),a.return=n,n.child=a,Ht=n,ft=null)):e=null,e===null)throw Hl(n);return n.lanes=536870912,null}return Hu(n,u)}var h=e.memoizedState;if(h!==null){var x=h.dehydrated;if(Fs(n),f)if(n.flags&256)n.flags&=-257,n=op(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(At||ai(e,n,a,!1),f=(a&e.childLanes)!==0,At||f){if(u=ot,u!==null&&(x=G(u,a),x!==0&&x!==h.retryLane))throw h.retryLane=x,Ta(e,x),an(u,e,x),cc;Zu(),n=op(e,n,a)}else e=h.treeContext,ft=_n(x.nextSibling),Ht=n,$e=!0,Bl=null,An=!1,e!==null&&$h(n,e),n=Hu(n,u),n.flags|=4096;return n}return e=cl(e.child,{mode:u.mode,children:u.children}),e.ref=n.ref,n.child=e,e.return=n,e}function qu(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function fc(e,n,a,u,f){return _a(n),a=Is(e,n,a,u,void 0,f),u=Xs(),e!==null&&!At?(Qs(e,n,f),gl(e,n,f)):($e&&u&&Ts(n),n.flags|=1,Yt(e,n,a,f),n.child)}function sp(e,n,a,u,f,h){return _a(n),n.updateQueue=null,a=dm(n,u,a,f),fm(e),u=Xs(),e!==null&&!At?(Qs(e,n,h),gl(e,n,h)):($e&&u&&Ts(n),n.flags|=1,Yt(e,n,a,h),n.child)}function cp(e,n,a,u,f){if(_a(n),n.stateNode===null){var h=ei,x=a.contextType;typeof x=="object"&&x!==null&&(h=qt(x)),h=new a(u,h),n.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=oc,n.stateNode=h,h._reactInternals=n,h=n.stateNode,h.props=u,h.state=n.memoizedState,h.refs={},Us(n),x=a.contextType,h.context=typeof x=="object"&&x!==null?qt(x):ei,h.state=n.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(uc(n,a,x,u),h.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(x=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),x!==h.state&&oc.enqueueReplaceState(h,h.state,null),nr(n,u,h,f),tr(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(e===null){h=n.stateNode;var w=n.memoizedProps,M=La(a,w);h.props=M;var X=h.context,ae=a.contextType;x=ei,typeof ae=="object"&&ae!==null&&(x=qt(ae));var oe=a.getDerivedStateFromProps;ae=typeof oe=="function"||typeof h.getSnapshotBeforeUpdate=="function",w=n.pendingProps!==w,ae||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(w||X!==x)&&Zm(n,h,u,x),Yl=!1;var Q=n.memoizedState;h.state=Q,nr(n,u,h,f),tr(),X=n.memoizedState,w||Q!==X||Yl?(typeof oe=="function"&&(uc(n,a,oe,u),X=n.memoizedState),(M=Yl||Km(n,a,M,u,Q,X,x))?(ae||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(n.flags|=4194308)):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=X),h.props=u,h.state=X,h.context=x,u=M):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{h=n.stateNode,Bs(e,n),x=n.memoizedProps,ae=La(a,x),h.props=ae,oe=n.pendingProps,Q=h.context,X=a.contextType,M=ei,typeof X=="object"&&X!==null&&(M=qt(X)),w=a.getDerivedStateFromProps,(X=typeof w=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(x!==oe||Q!==M)&&Zm(n,h,u,M),Yl=!1,Q=n.memoizedState,h.state=Q,nr(n,u,h,f),tr();var J=n.memoizedState;x!==oe||Q!==J||Yl||e!==null&&e.dependencies!==null&&Su(e.dependencies)?(typeof w=="function"&&(uc(n,a,w,u),J=n.memoizedState),(ae=Yl||Km(n,a,ae,u,Q,J,M)||e!==null&&e.dependencies!==null&&Su(e.dependencies))?(X||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(u,J,M),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(u,J,M)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||x===e.memoizedProps&&Q===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&Q===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=J),h.props=u,h.state=J,h.context=M,u=ae):(typeof h.componentDidUpdate!="function"||x===e.memoizedProps&&Q===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&Q===e.memoizedState||(n.flags|=1024),u=!1)}return h=u,qu(e,n),u=(n.flags&128)!==0,h||u?(h=n.stateNode,a=u&&typeof a.getDerivedStateFromError!="function"?null:h.render(),n.flags|=1,e!==null&&u?(n.child=Oa(n,e.child,null,f),n.child=Oa(n,null,a,f)):Yt(e,n,a,f),n.memoizedState=h.state,e=n.child):e=gl(e,n,f),e}function fp(e,n,a,u){return Aa(),n.flags|=256,Yt(e,n,a,u),n.child}var dc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hc(e){return{baseLanes:e,cachePool:em()}}function mc(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=gn),e}function dp(e,n,a){var u=n.pendingProps,f=!1,h=(n.flags&128)!==0,x;if((x=h)||(x=e!==null&&e.memoizedState===null?!1:(wt.current&2)!==0),x&&(f=!0,n.flags&=-129),x=(n.flags&32)!==0,n.flags&=-33,e===null){if($e){if(f?Vl(n):Il(),(e=ft)?(e=xg(e,An),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ul!==null?{id:$n,overflow:Kn}:null,retryLane:536870912,hydrationErrors:null},a=Ih(e),a.return=n,n.child=a,Ht=n,ft=null)):e=null,e===null)throw Hl(n);return Zc(e)?n.lanes=32:n.lanes=536870912,null}var w=u.children;return u=u.fallback,f?(Il(),f=n.mode,w=Yu({mode:"hidden",children:w},f),u=ja(u,f,a,null),w.return=n,u.return=n,w.sibling=u,n.child=w,u=n.child,u.memoizedState=hc(a),u.childLanes=mc(e,x,a),n.memoizedState=dc,ur(null,u)):(Vl(n),pc(n,w))}var M=e.memoizedState;if(M!==null&&(w=M.dehydrated,w!==null)){if(h)n.flags&256?(Vl(n),n.flags&=-257,n=gc(e,n,a)):n.memoizedState!==null?(Il(),n.child=e.child,n.flags|=128,n=null):(Il(),w=u.fallback,f=n.mode,u=Yu({mode:"visible",children:u.children},f),w=ja(w,f,a,null),w.flags|=2,u.return=n,w.return=n,u.sibling=w,n.child=u,Oa(n,e.child,null,a),u=n.child,u.memoizedState=hc(a),u.childLanes=mc(e,x,a),n.memoizedState=dc,n=ur(null,u));else if(Vl(n),Zc(w)){if(x=w.nextSibling&&w.nextSibling.dataset,x)var X=x.dgst;x=X,u=Error(r(419)),u.stack="",u.digest=x,Ki({value:u,source:null,stack:null}),n=gc(e,n,a)}else if(At||ai(e,n,a,!1),x=(a&e.childLanes)!==0,At||x){if(x=ot,x!==null&&(u=G(x,a),u!==0&&u!==M.retryLane))throw M.retryLane=u,Ta(e,u),an(x,e,u),cc;Kc(w)||Zu(),n=gc(e,n,a)}else Kc(w)?(n.flags|=192,n.child=e.child,n=null):(e=M.treeContext,ft=_n(w.nextSibling),Ht=n,$e=!0,Bl=null,An=!1,e!==null&&$h(n,e),n=pc(n,u.children),n.flags|=4096);return n}return f?(Il(),w=u.fallback,f=n.mode,M=e.child,X=M.sibling,u=cl(M,{mode:"hidden",children:u.children}),u.subtreeFlags=M.subtreeFlags&65011712,X!==null?w=cl(X,w):(w=ja(w,f,a,null),w.flags|=2),w.return=n,u.return=n,u.sibling=w,n.child=u,ur(null,u),u=n.child,w=e.child.memoizedState,w===null?w=hc(a):(f=w.cachePool,f!==null?(M=Tt._currentValue,f=f.parent!==M?{parent:M,pool:M}:f):f=em(),w={baseLanes:w.baseLanes|a,cachePool:f}),u.memoizedState=w,u.childLanes=mc(e,x,a),n.memoizedState=dc,ur(e.child,u)):(Vl(n),a=e.child,e=a.sibling,a=cl(a,{mode:"visible",children:u.children}),a.return=n,a.sibling=null,e!==null&&(x=n.deletions,x===null?(n.deletions=[e],n.flags|=16):x.push(e)),n.child=a,n.memoizedState=null,a)}function pc(e,n){return n=Yu({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Yu(e,n){return e=dn(22,e,null,n),e.lanes=0,e}function gc(e,n,a){return Oa(n,e.child,null,a),e=pc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function hp(e,n,a){e.lanes|=n;var u=e.alternate;u!==null&&(u.lanes|=n),Ns(e.return,n,a)}function yc(e,n,a,u,f,h){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:f,treeForkCount:h}:(x.isBackwards=n,x.rendering=null,x.renderingStartTime=0,x.last=u,x.tail=a,x.tailMode=f,x.treeForkCount=h)}function mp(e,n,a){var u=n.pendingProps,f=u.revealOrder,h=u.tail;u=u.children;var x=wt.current,w=(x&2)!==0;if(w?(x=x&1|2,n.flags|=128):x&=1,T(wt,x),Yt(e,n,u,a),u=$e?$i:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hp(e,a,n);else if(e.tag===19)hp(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(a=n.child,f=null;a!==null;)e=a.alternate,e!==null&&Ru(e)===null&&(f=a),a=a.sibling;a=f,a===null?(f=n.child,n.child=null):(f=a.sibling,a.sibling=null),yc(n,!1,f,a,h,u);break;case"backwards":case"unstable_legacy-backwards":for(a=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&Ru(e)===null){n.child=f;break}e=f.sibling,f.sibling=a,a=f,f=e}yc(n,!0,a,null,h,u);break;case"together":yc(n,!1,null,null,void 0,u);break;default:n.memoizedState=null}return n.child}function gl(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),$l|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(ai(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,a=cl(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=cl(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function vc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Su(e)))}function Y1(e,n,a){switch(n.tag){case 3:ge(n,n.stateNode.containerInfo),ql(n,Tt,e.memoizedState.cache),Aa();break;case 27:case 5:Nt(n);break;case 4:ge(n,n.stateNode.containerInfo);break;case 10:ql(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Fs(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(Vl(n),n.flags|=128,null):(a&n.child.childLanes)!==0?dp(e,n,a):(Vl(n),e=gl(e,n,a),e!==null?e.sibling:null);Vl(n);break;case 19:var f=(e.flags&128)!==0;if(u=(a&n.childLanes)!==0,u||(ai(e,n,a,!1),u=(a&n.childLanes)!==0),f){if(u)return mp(e,n,a);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),T(wt,wt.current),u)break;return null;case 22:return n.lanes=0,rp(e,n,a,n.pendingProps);case 24:ql(n,Tt,e.memoizedState.cache)}return gl(e,n,a)}function pp(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)At=!0;else{if(!vc(e,a)&&(n.flags&128)===0)return At=!1,Y1(e,n,a);At=(e.flags&131072)!==0}else At=!1,$e&&(n.flags&1048576)!==0&&Qh(n,$i,n.index);switch(n.lanes=0,n.tag){case 16:e:{var u=n.pendingProps;if(e=Da(n.elementType),n.type=e,typeof e=="function")ws(e)?(u=La(e,u),n.tag=1,n=cp(null,n,e,u,a)):(n.tag=0,n=fc(null,n,e,u,a));else{if(e!=null){var f=e.$$typeof;if(f===ee){n.tag=11,n=lp(null,n,e,u,a);break e}else if(f===z){n.tag=14,n=ap(null,n,e,u,a);break e}}throw n=ne(e)||e,Error(r(306,n,""))}}return n;case 0:return fc(e,n,n.type,n.pendingProps,a);case 1:return u=n.type,f=La(u,n.pendingProps),cp(e,n,u,f,a);case 3:e:{if(ge(n,n.stateNode.containerInfo),e===null)throw Error(r(387));u=n.pendingProps;var h=n.memoizedState;f=h.element,Bs(e,n),nr(n,u,null,a);var x=n.memoizedState;if(u=x.cache,ql(n,Tt,u),u!==h.cache&&Ds(n,[Tt],a,!0),tr(),u=x.element,h.isDehydrated)if(h={element:u,isDehydrated:!1,cache:x.cache},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){n=fp(e,n,u,a);break e}else if(u!==f){f=Cn(Error(r(424)),n),Ki(f),n=fp(e,n,u,a);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ft=_n(e.firstChild),Ht=n,$e=!0,Bl=null,An=!0,a=rm(n,null,u,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Aa(),u===f){n=gl(e,n,a);break e}Yt(e,n,u,a)}n=n.child}return n;case 26:return qu(e,n),e===null?(a=Tg(n.type,null,n.pendingProps,null))?n.memoizedState=a:$e||(a=n.type,e=n.pendingProps,u=lo(xe.current).createElement(a),u[me]=n,u[ve]=e,Gt(u,a,e),ht(u),n.stateNode=u):n.memoizedState=Tg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Nt(n),e===null&&$e&&(u=n.stateNode=wg(n.type,n.pendingProps,xe.current),Ht=n,An=!0,f=ft,Wl(n.type)?(Pc=f,ft=_n(u.firstChild)):ft=f),Yt(e,n,n.pendingProps.children,a),qu(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&$e&&((f=u=ft)&&(u=yx(u,n.type,n.pendingProps,An),u!==null?(n.stateNode=u,Ht=n,ft=_n(u.firstChild),An=!1,f=!0):f=!1),f||Hl(n)),Nt(n),f=n.type,h=n.pendingProps,x=e!==null?e.memoizedProps:null,u=h.children,Xc(f,h)?u=null:x!==null&&Xc(f,x)&&(n.flags|=32),n.memoizedState!==null&&(f=Is(e,n,D1,null,null,a),Er._currentValue=f),qu(e,n),Yt(e,n,u,a),n.child;case 6:return e===null&&$e&&((e=a=ft)&&(a=vx(a,n.pendingProps,An),a!==null?(n.stateNode=a,Ht=n,ft=null,e=!0):e=!1),e||Hl(n)),null;case 13:return dp(e,n,a);case 4:return ge(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=Oa(n,null,u,a):Yt(e,n,u,a),n.child;case 11:return lp(e,n,n.type,n.pendingProps,a);case 7:return Yt(e,n,n.pendingProps,a),n.child;case 8:return Yt(e,n,n.pendingProps.children,a),n.child;case 12:return Yt(e,n,n.pendingProps.children,a),n.child;case 10:return u=n.pendingProps,ql(n,n.type,u.value),Yt(e,n,u.children,a),n.child;case 9:return f=n.type._context,u=n.pendingProps.children,_a(n),f=qt(f),u=u(f),n.flags|=1,Yt(e,n,u,a),n.child;case 14:return ap(e,n,n.type,n.pendingProps,a);case 15:return ip(e,n,n.type,n.pendingProps,a);case 19:return mp(e,n,a);case 31:return q1(e,n,a);case 22:return rp(e,n,a,n.pendingProps);case 24:return _a(n),u=qt(Tt),e===null?(f=Ms(),f===null&&(f=ot,h=zs(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=a),f=h),n.memoizedState={parent:u,cache:f},Us(n),ql(n,Tt,f)):((e.lanes&a)!==0&&(Bs(e,n),nr(n,null,null,a),tr()),f=e.memoizedState,h=n.memoizedState,f.parent!==u?(f={parent:u,cache:u},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),ql(n,Tt,u)):(u=h.cache,ql(n,Tt,u),u!==f.cache&&Ds(n,[Tt],a,!0))),Yt(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function yl(e){e.flags|=4}function bc(e,n,a,u,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Gp())e.flags|=8192;else throw za=Cu,Ls}else e.flags&=-16777217}function gp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ng(n))if(Gp())e.flags|=8192;else throw za=Cu,Ls}function Gu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?ba():536870912,e.lanes|=n,gi|=n)}function or(e,n){if(!$e)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function dt(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,u=0;if(n)for(var f=e.child;f!==null;)a|=f.lanes|f.childLanes,u|=f.subtreeFlags&65011712,u|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)a|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=u,e.childLanes=a,n}function G1(e,n,a){var u=n.pendingProps;switch(js(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(n),null;case 1:return dt(n),null;case 3:return a=n.stateNode,u=null,e!==null&&(u=e.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),hl(Tt),_e(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(li(n)?yl(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Rs())),dt(n),null;case 26:var f=n.type,h=n.memoizedState;return e===null?(yl(n),h!==null?(dt(n),gp(n,h)):(dt(n),bc(n,f,null,u,a))):h?h!==e.memoizedState?(yl(n),dt(n),gp(n,h)):(dt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==u&&yl(n),dt(n),bc(n,f,e,u,a)),null;case 27:if(Ln(n),a=xe.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&yl(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return dt(n),null}e=ce.current,li(n)?Kh(n):(e=wg(f,u,a),n.stateNode=e,yl(n))}return dt(n),null;case 5:if(Ln(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&yl(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return dt(n),null}if(h=ce.current,li(n))Kh(n);else{var x=lo(xe.current);switch(h){case 1:h=x.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=x.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=x.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=x.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=x.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof u.is=="string"?x.createElement("select",{is:u.is}):x.createElement("select"),u.multiple?h.multiple=!0:u.size&&(h.size=u.size);break;default:h=typeof u.is=="string"?x.createElement(f,{is:u.is}):x.createElement(f)}}h[me]=n,h[ve]=u;e:for(x=n.child;x!==null;){if(x.tag===5||x.tag===6)h.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===n)break e;for(;x.sibling===null;){if(x.return===null||x.return===n)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}n.stateNode=h;e:switch(Gt(h,f,u),f){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&yl(n)}}return dt(n),bc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==u&&yl(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(r(166));if(e=xe.current,li(n)){if(e=n.stateNode,a=n.memoizedProps,u=null,f=Ht,f!==null)switch(f.tag){case 27:case 5:u=f.memoizedProps}e[me]=n,e=!!(e.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||dg(e.nodeValue,a)),e||Hl(n,!0)}else e=lo(e).createTextNode(u),e[me]=n,n.stateNode=e}return dt(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(u=li(n),a!==null){if(e===null){if(!u)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[me]=n}else Aa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),e=!1}else a=Rs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(mn(n),n):(mn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return dt(n),null;case 13:if(u=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=li(n),u!==null&&u.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[me]=n}else Aa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),f=!1}else f=Rs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(mn(n),n):(mn(n),null)}return mn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=u!==null,e=e!==null&&e.memoizedState!==null,a&&(u=n.child,f=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(f=u.alternate.memoizedState.cachePool.pool),h=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(h=u.memoizedState.cachePool.pool),h!==f&&(u.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),Gu(n,n.updateQueue),dt(n),null);case 4:return _e(),e===null&&Yc(n.stateNode.containerInfo),dt(n),null;case 10:return hl(n.type),dt(n),null;case 19:if(P(wt),u=n.memoizedState,u===null)return dt(n),null;if(f=(n.flags&128)!==0,h=u.rendering,h===null)if(f)or(u,!1);else{if(St!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=Ru(e),h!==null){for(n.flags|=128,or(u,!1),e=h.updateQueue,n.updateQueue=e,Gu(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Vh(a,e),a=a.sibling;return T(wt,wt.current&1|2),$e&&fl(n,u.treeForkCount),n.child}e=e.sibling}u.tail!==null&&pt()>Qu&&(n.flags|=128,f=!0,or(u,!1),n.lanes=4194304)}else{if(!f)if(e=Ru(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,Gu(n,e),or(u,!0),u.tail===null&&u.tailMode==="hidden"&&!h.alternate&&!$e)return dt(n),null}else 2*pt()-u.renderingStartTime>Qu&&a!==536870912&&(n.flags|=128,f=!0,or(u,!1),n.lanes=4194304);u.isBackwards?(h.sibling=n.child,n.child=h):(e=u.last,e!==null?e.sibling=h:n.child=h,u.last=h)}return u.tail!==null?(e=u.tail,u.rendering=e,u.tail=e.sibling,u.renderingStartTime=pt(),e.sibling=null,a=wt.current,T(wt,f?a&1|2:a&1),$e&&fl(n,u.treeForkCount),e):(dt(n),null);case 22:case 23:return mn(n),Gs(),u=n.memoizedState!==null,e!==null?e.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(a&536870912)!==0&&(n.flags&128)===0&&(dt(n),n.subtreeFlags&6&&(n.flags|=8192)):dt(n),a=n.updateQueue,a!==null&&Gu(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==a&&(n.flags|=2048),e!==null&&P(Na),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),hl(Tt),dt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function F1(e,n){switch(js(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return hl(Tt),_e(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ln(n),null;case 31:if(n.memoizedState!==null){if(mn(n),n.alternate===null)throw Error(r(340));Aa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(mn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Aa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return P(wt),null;case 4:return _e(),null;case 10:return hl(n.type),null;case 22:case 23:return mn(n),Gs(),e!==null&&P(Na),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return hl(Tt),null;case 25:return null;default:return null}}function yp(e,n){switch(js(n),n.tag){case 3:hl(Tt),_e();break;case 26:case 27:case 5:Ln(n);break;case 4:_e();break;case 31:n.memoizedState!==null&&mn(n);break;case 13:mn(n);break;case 19:P(wt);break;case 10:hl(n.type);break;case 22:case 23:mn(n),Gs(),e!==null&&P(Na);break;case 24:hl(Tt)}}function sr(e,n){try{var a=n.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var f=u.next;a=f;do{if((a.tag&e)===e){u=void 0;var h=a.create,x=a.inst;u=h(),x.destroy=u}a=a.next}while(a!==f)}}catch(w){at(n,n.return,w)}}function Xl(e,n,a){try{var u=n.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var h=f.next;u=h;do{if((u.tag&e)===e){var x=u.inst,w=x.destroy;if(w!==void 0){x.destroy=void 0,f=n;var M=a,X=w;try{X()}catch(ae){at(f,M,ae)}}}u=u.next}while(u!==h)}}catch(ae){at(n,n.return,ae)}}function vp(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{om(n,a)}catch(u){at(e,e.return,u)}}}function bp(e,n,a){a.props=La(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(u){at(e,n,u)}}function cr(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var u=e.stateNode;break;case 30:u=e.stateNode;break;default:u=e.stateNode}typeof a=="function"?e.refCleanup=a(u):a.current=u}}catch(f){at(e,n,f)}}function Zn(e,n){var a=e.ref,u=e.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(f){at(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(f){at(e,n,f)}else a.current=null}function xp(e){var n=e.type,a=e.memoizedProps,u=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(f){at(e,e.return,f)}}function xc(e,n,a){try{var u=e.stateNode;fx(u,e.type,a,n),u[ve]=n}catch(f){at(e,e.return,f)}}function Sp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Wl(e.type)||e.tag===4}function Sc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Wl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ec(e,n,a){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=ol));else if(u!==4&&(u===27&&Wl(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Ec(e,n,a),e=e.sibling;e!==null;)Ec(e,n,a),e=e.sibling}function Fu(e,n,a){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(u!==4&&(u===27&&Wl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Fu(e,n,a),e=e.sibling;e!==null;)Fu(e,n,a),e=e.sibling}function Ep(e){var n=e.stateNode,a=e.memoizedProps;try{for(var u=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Gt(n,u,a),n[me]=e,n[ve]=a}catch(h){at(e,e.return,h)}}var vl=!1,Rt=!1,wc=!1,wp=typeof WeakSet=="function"?WeakSet:Set,Ot=null;function V1(e,n){if(e=e.containerInfo,Vc=co,e=Mh(e),gs(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var f=u.anchorOffset,h=u.focusNode;u=u.focusOffset;try{a.nodeType,h.nodeType}catch{a=null;break e}var x=0,w=-1,M=-1,X=0,ae=0,oe=e,Q=null;t:for(;;){for(var J;oe!==a||f!==0&&oe.nodeType!==3||(w=x+f),oe!==h||u!==0&&oe.nodeType!==3||(M=x+u),oe.nodeType===3&&(x+=oe.nodeValue.length),(J=oe.firstChild)!==null;)Q=oe,oe=J;for(;;){if(oe===e)break t;if(Q===a&&++X===f&&(w=x),Q===h&&++ae===u&&(M=x),(J=oe.nextSibling)!==null)break;oe=Q,Q=oe.parentNode}oe=J}a=w===-1||M===-1?null:{start:w,end:M}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ic={focusedElem:e,selectionRange:a},co=!1,Ot=n;Ot!==null;)if(n=Ot,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Ot=e;else for(;Ot!==null;){switch(n=Ot,h=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)f=e[a],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,a=n,f=h.memoizedProps,h=h.memoizedState,u=a.stateNode;try{var Se=La(a.type,f);e=u.getSnapshotBeforeUpdate(Se,h),u.__reactInternalSnapshotBeforeUpdate=e}catch(Ne){at(a,a.return,Ne)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)$c(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":$c(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=n.sibling,e!==null){e.return=n.return,Ot=e;break}Ot=n.return}}function kp(e,n,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:xl(e,a),u&4&&sr(5,a);break;case 1:if(xl(e,a),u&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(x){at(a,a.return,x)}else{var f=La(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(x){at(a,a.return,x)}}u&64&&vp(a),u&512&&cr(a,a.return);break;case 3:if(xl(e,a),u&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{om(e,n)}catch(x){at(a,a.return,x)}}break;case 27:n===null&&u&4&&Ep(a);case 26:case 5:xl(e,a),n===null&&u&4&&xp(a),u&512&&cr(a,a.return);break;case 12:xl(e,a);break;case 31:xl(e,a),u&4&&jp(e,a);break;case 13:xl(e,a),u&4&&Ap(e,a),u&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=W1.bind(null,a),bx(e,a))));break;case 22:if(u=a.memoizedState!==null||vl,!u){n=n!==null&&n.memoizedState!==null||Rt,f=vl;var h=Rt;vl=u,(Rt=n)&&!h?Sl(e,a,(a.subtreeFlags&8772)!==0):xl(e,a),vl=f,Rt=h}break;case 30:break;default:xl(e,a)}}function Cp(e){var n=e.alternate;n!==null&&(e.alternate=null,Cp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&vt(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var mt=null,en=!1;function bl(e,n,a){for(a=a.child;a!==null;)Tp(e,n,a),a=a.sibling}function Tp(e,n,a){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Lt,a)}catch{}switch(a.tag){case 26:Rt||Zn(a,n),bl(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Rt||Zn(a,n);var u=mt,f=en;Wl(a.type)&&(mt=a.stateNode,en=!1),bl(e,n,a),br(a.stateNode),mt=u,en=f;break;case 5:Rt||Zn(a,n);case 6:if(u=mt,f=en,mt=null,bl(e,n,a),mt=u,en=f,mt!==null)if(en)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(a.stateNode)}catch(h){at(a,n,h)}else try{mt.removeChild(a.stateNode)}catch(h){at(a,n,h)}break;case 18:mt!==null&&(en?(e=mt,vg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),ki(e)):vg(mt,a.stateNode));break;case 4:u=mt,f=en,mt=a.stateNode.containerInfo,en=!0,bl(e,n,a),mt=u,en=f;break;case 0:case 11:case 14:case 15:Xl(2,a,n),Rt||Xl(4,a,n),bl(e,n,a);break;case 1:Rt||(Zn(a,n),u=a.stateNode,typeof u.componentWillUnmount=="function"&&bp(a,n,u)),bl(e,n,a);break;case 21:bl(e,n,a);break;case 22:Rt=(u=Rt)||a.memoizedState!==null,bl(e,n,a),Rt=u;break;default:bl(e,n,a)}}function jp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ki(e)}catch(a){at(n,n.return,a)}}}function Ap(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ki(e)}catch(a){at(n,n.return,a)}}function I1(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new wp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new wp),n;default:throw Error(r(435,e.tag))}}function Vu(e,n){var a=I1(e);n.forEach(function(u){if(!a.has(u)){a.add(u);var f=ex.bind(null,e,u);u.then(f,f)}})}function tn(e,n){var a=n.deletions;if(a!==null)for(var u=0;u<a.length;u++){var f=a[u],h=e,x=n,w=x;e:for(;w!==null;){switch(w.tag){case 27:if(Wl(w.type)){mt=w.stateNode,en=!1;break e}break;case 5:mt=w.stateNode,en=!1;break e;case 3:case 4:mt=w.stateNode.containerInfo,en=!0;break e}w=w.return}if(mt===null)throw Error(r(160));Tp(h,x,f),mt=null,en=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Rp(n,e),n=n.sibling}var Fn=null;function Rp(e,n){var a=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(n,e),nn(e),u&4&&(Xl(3,e,e.return),sr(3,e),Xl(5,e,e.return));break;case 1:tn(n,e),nn(e),u&512&&(Rt||a===null||Zn(a,a.return)),u&64&&vl&&(e=e.updateQueue,e!==null&&(u=e.callbacks,u!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?u:a.concat(u))));break;case 26:var f=Fn;if(tn(n,e),nn(e),u&512&&(Rt||a===null||Zn(a,a.return)),u&4){var h=a!==null?a.memoizedState:null;if(u=e.memoizedState,a===null)if(u===null)if(e.stateNode===null){e:{u=e.type,a=e.memoizedProps,f=f.ownerDocument||f;t:switch(u){case"title":h=f.getElementsByTagName("title")[0],(!h||h[gt]||h[me]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(u),f.head.insertBefore(h,f.querySelector("head > title"))),Gt(h,u,a),h[me]=e,ht(h),u=h;break e;case"link":var x=Rg("link","href",f).get(u+(a.href||""));if(x){for(var w=0;w<x.length;w++)if(h=x[w],h.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&h.getAttribute("rel")===(a.rel==null?null:a.rel)&&h.getAttribute("title")===(a.title==null?null:a.title)&&h.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){x.splice(w,1);break t}}h=f.createElement(u),Gt(h,u,a),f.head.appendChild(h);break;case"meta":if(x=Rg("meta","content",f).get(u+(a.content||""))){for(w=0;w<x.length;w++)if(h=x[w],h.getAttribute("content")===(a.content==null?null:""+a.content)&&h.getAttribute("name")===(a.name==null?null:a.name)&&h.getAttribute("property")===(a.property==null?null:a.property)&&h.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&h.getAttribute("charset")===(a.charSet==null?null:a.charSet)){x.splice(w,1);break t}}h=f.createElement(u),Gt(h,u,a),f.head.appendChild(h);break;default:throw Error(r(468,u))}h[me]=e,ht(h),u=h}e.stateNode=u}else _g(f,e.type,e.stateNode);else e.stateNode=Ag(f,u,e.memoizedProps);else h!==u?(h===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):h.count--,u===null?_g(f,e.type,e.stateNode):Ag(f,u,e.memoizedProps)):u===null&&e.stateNode!==null&&xc(e,e.memoizedProps,a.memoizedProps)}break;case 27:tn(n,e),nn(e),u&512&&(Rt||a===null||Zn(a,a.return)),a!==null&&u&4&&xc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(tn(n,e),nn(e),u&512&&(Rt||a===null||Zn(a,a.return)),e.flags&32){f=e.stateNode;try{Qa(f,"")}catch(Se){at(e,e.return,Se)}}u&4&&e.stateNode!=null&&(f=e.memoizedProps,xc(e,f,a!==null?a.memoizedProps:f)),u&1024&&(wc=!0);break;case 6:if(tn(n,e),nn(e),u&4){if(e.stateNode===null)throw Error(r(162));u=e.memoizedProps,a=e.stateNode;try{a.nodeValue=u}catch(Se){at(e,e.return,Se)}}break;case 3:if(ro=null,f=Fn,Fn=ao(n.containerInfo),tn(n,e),Fn=f,nn(e),u&4&&a!==null&&a.memoizedState.isDehydrated)try{ki(n.containerInfo)}catch(Se){at(e,e.return,Se)}wc&&(wc=!1,_p(e));break;case 4:u=Fn,Fn=ao(e.stateNode.containerInfo),tn(n,e),nn(e),Fn=u;break;case 12:tn(n,e),nn(e);break;case 31:tn(n,e),nn(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Vu(e,u)));break;case 13:tn(n,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Xu=pt()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Vu(e,u)));break;case 22:f=e.memoizedState!==null;var M=a!==null&&a.memoizedState!==null,X=vl,ae=Rt;if(vl=X||f,Rt=ae||M,tn(n,e),Rt=ae,vl=X,nn(e),u&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(a===null||M||vl||Rt||Ua(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){M=a=n;try{if(h=M.stateNode,f)x=h.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{w=M.stateNode;var oe=M.memoizedProps.style,Q=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;w.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(Se){at(M,M.return,Se)}}}else if(n.tag===6){if(a===null){M=n;try{M.stateNode.nodeValue=f?"":M.memoizedProps}catch(Se){at(M,M.return,Se)}}}else if(n.tag===18){if(a===null){M=n;try{var J=M.stateNode;f?bg(J,!0):bg(M.stateNode,!1)}catch(Se){at(M,M.return,Se)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=e.updateQueue,u!==null&&(a=u.retryQueue,a!==null&&(u.retryQueue=null,Vu(e,a))));break;case 19:tn(n,e),nn(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Vu(e,u)));break;case 30:break;case 21:break;default:tn(n,e),nn(e)}}function nn(e){var n=e.flags;if(n&2){try{for(var a,u=e.return;u!==null;){if(Sp(u)){a=u;break}u=u.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var f=a.stateNode,h=Sc(e);Fu(e,h,f);break;case 5:var x=a.stateNode;a.flags&32&&(Qa(x,""),a.flags&=-33);var w=Sc(e);Fu(e,w,x);break;case 3:case 4:var M=a.stateNode.containerInfo,X=Sc(e);Ec(e,X,M);break;default:throw Error(r(161))}}catch(ae){at(e,e.return,ae)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function _p(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;_p(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function xl(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)kp(e,n.alternate,n),n=n.sibling}function Ua(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Xl(4,n,n.return),Ua(n);break;case 1:Zn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&bp(n,n.return,a),Ua(n);break;case 27:br(n.stateNode);case 26:case 5:Zn(n,n.return),Ua(n);break;case 22:n.memoizedState===null&&Ua(n);break;case 30:Ua(n);break;default:Ua(n)}e=e.sibling}}function Sl(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,f=e,h=n,x=h.flags;switch(h.tag){case 0:case 11:case 15:Sl(f,h,a),sr(4,h);break;case 1:if(Sl(f,h,a),u=h,f=u.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(X){at(u,u.return,X)}if(u=h,f=u.updateQueue,f!==null){var w=u.stateNode;try{var M=f.shared.hiddenCallbacks;if(M!==null)for(f.shared.hiddenCallbacks=null,f=0;f<M.length;f++)um(M[f],w)}catch(X){at(u,u.return,X)}}a&&x&64&&vp(h),cr(h,h.return);break;case 27:Ep(h);case 26:case 5:Sl(f,h,a),a&&u===null&&x&4&&xp(h),cr(h,h.return);break;case 12:Sl(f,h,a);break;case 31:Sl(f,h,a),a&&x&4&&jp(f,h);break;case 13:Sl(f,h,a),a&&x&4&&Ap(f,h);break;case 22:h.memoizedState===null&&Sl(f,h,a),cr(h,h.return);break;case 30:break;default:Sl(f,h,a)}n=n.sibling}}function kc(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Zi(a))}function Cc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Zi(e))}function Vn(e,n,a,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Np(e,n,a,u),n=n.sibling}function Np(e,n,a,u){var f=n.flags;switch(n.tag){case 0:case 11:case 15:Vn(e,n,a,u),f&2048&&sr(9,n);break;case 1:Vn(e,n,a,u);break;case 3:Vn(e,n,a,u),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Zi(e)));break;case 12:if(f&2048){Vn(e,n,a,u),e=n.stateNode;try{var h=n.memoizedProps,x=h.id,w=h.onPostCommit;typeof w=="function"&&w(x,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(M){at(n,n.return,M)}}else Vn(e,n,a,u);break;case 31:Vn(e,n,a,u);break;case 13:Vn(e,n,a,u);break;case 23:break;case 22:h=n.stateNode,x=n.alternate,n.memoizedState!==null?h._visibility&2?Vn(e,n,a,u):fr(e,n):h._visibility&2?Vn(e,n,a,u):(h._visibility|=2,hi(e,n,a,u,(n.subtreeFlags&10256)!==0||!1)),f&2048&&kc(x,n);break;case 24:Vn(e,n,a,u),f&2048&&Cc(n.alternate,n);break;default:Vn(e,n,a,u)}}function hi(e,n,a,u,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var h=e,x=n,w=a,M=u,X=x.flags;switch(x.tag){case 0:case 11:case 15:hi(h,x,w,M,f),sr(8,x);break;case 23:break;case 22:var ae=x.stateNode;x.memoizedState!==null?ae._visibility&2?hi(h,x,w,M,f):fr(h,x):(ae._visibility|=2,hi(h,x,w,M,f)),f&&X&2048&&kc(x.alternate,x);break;case 24:hi(h,x,w,M,f),f&&X&2048&&Cc(x.alternate,x);break;default:hi(h,x,w,M,f)}n=n.sibling}}function fr(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,u=n,f=u.flags;switch(u.tag){case 22:fr(a,u),f&2048&&kc(u.alternate,u);break;case 24:fr(a,u),f&2048&&Cc(u.alternate,u);break;default:fr(a,u)}n=n.sibling}}var dr=8192;function mi(e,n,a){if(e.subtreeFlags&dr)for(e=e.child;e!==null;)Dp(e,n,a),e=e.sibling}function Dp(e,n,a){switch(e.tag){case 26:mi(e,n,a),e.flags&dr&&e.memoizedState!==null&&Nx(a,Fn,e.memoizedState,e.memoizedProps);break;case 5:mi(e,n,a);break;case 3:case 4:var u=Fn;Fn=ao(e.stateNode.containerInfo),mi(e,n,a),Fn=u;break;case 22:e.memoizedState===null&&(u=e.alternate,u!==null&&u.memoizedState!==null?(u=dr,dr=16777216,mi(e,n,a),dr=u):mi(e,n,a));break;default:mi(e,n,a)}}function zp(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function hr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];Ot=u,Mp(u,e)}zp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Op(e),e=e.sibling}function Op(e){switch(e.tag){case 0:case 11:case 15:hr(e),e.flags&2048&&Xl(9,e,e.return);break;case 3:hr(e);break;case 12:hr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Iu(e)):hr(e);break;default:hr(e)}}function Iu(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];Ot=u,Mp(u,e)}zp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Xl(8,n,n.return),Iu(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Iu(n));break;default:Iu(n)}e=e.sibling}}function Mp(e,n){for(;Ot!==null;){var a=Ot;switch(a.tag){case 0:case 11:case 15:Xl(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var u=a.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Zi(a.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,Ot=u;else e:for(a=e;Ot!==null;){u=Ot;var f=u.sibling,h=u.return;if(Cp(u),u===a){Ot=null;break e}if(f!==null){f.return=h,Ot=f;break e}Ot=h}}}var X1={getCacheForType:function(e){var n=qt(Tt),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return qt(Tt).controller.signal}},Q1=typeof WeakMap=="function"?WeakMap:Map,et=0,ot=null,He=null,Ge=0,lt=0,pn=null,Ql=!1,pi=!1,Tc=!1,El=0,St=0,$l=0,Ba=0,jc=0,gn=0,gi=0,mr=null,ln=null,Ac=!1,Xu=0,Lp=0,Qu=1/0,$u=null,Kl=null,Dt=0,Zl=null,yi=null,wl=0,Rc=0,_c=null,Up=null,pr=0,Nc=null;function yn(){return(et&2)!==0&&Ge!==0?Ge&-Ge:H.T!==null?Uc():he()}function Bp(){if(gn===0)if((Ge&536870912)===0||$e){var e=ga;ga<<=1,(ga&3932160)===0&&(ga=262144),gn=e}else gn=536870912;return e=hn.current,e!==null&&(e.flags|=32),gn}function an(e,n,a){(e===ot&&(lt===2||lt===9)||e.cancelPendingCommit!==null)&&(vi(e,0),Pl(e,Ge,gn,!1)),Ml(e,a),((et&2)===0||e!==ot)&&(e===ot&&((et&2)===0&&(Ba|=a),St===4&&Pl(e,Ge,gn,!1)),Pn(e))}function Hp(e,n,a){if((et&6)!==0)throw Error(r(327));var u=!a&&(n&127)===0&&(n&e.expiredLanes)===0||va(e,n),f=u?Z1(e,n):zc(e,n,!0),h=u;do{if(f===0){pi&&!u&&Pl(e,n,0,!1);break}else{if(a=e.current.alternate,h&&!$1(a)){f=zc(e,n,!1),h=!1;continue}if(f===2){if(h=n,e.errorRecoveryDisabledLanes&h)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){n=x;e:{var w=e;f=mr;var M=w.current.memoizedState.isDehydrated;if(M&&(vi(w,x).flags|=256),x=zc(w,x,!1),x!==2){if(Tc&&!M){w.errorRecoveryDisabledLanes|=h,Ba|=h,f=4;break e}h=ln,ln=f,h!==null&&(ln===null?ln=h:ln.push.apply(ln,h))}f=x}if(h=!1,f!==2)continue}}if(f===1){vi(e,0),Pl(e,n,0,!0);break}e:{switch(u=e,h=f,h){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:Pl(u,n,gn,!Ql);break e;case 2:ln=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=Xu+300-pt(),10<f)){if(Pl(u,n,gn,!Ql),ya(u,0,!0)!==0)break e;wl=n,u.timeoutHandle=gg(qp.bind(null,u,a,ln,$u,Ac,n,gn,Ba,gi,Ql,h,"Throttled",-0,0),f);break e}qp(u,a,ln,$u,Ac,n,gn,Ba,gi,Ql,h,null,-0,0)}}break}while(!0);Pn(e)}function qp(e,n,a,u,f,h,x,w,M,X,ae,oe,Q,J){if(e.timeoutHandle=-1,oe=n.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ol},Dp(n,h,oe);var Se=(h&62914560)===h?Xu-pt():(h&4194048)===h?Lp-pt():0;if(Se=Dx(oe,Se),Se!==null){wl=h,e.cancelPendingCommit=Se($p.bind(null,e,n,h,a,u,f,x,w,M,ae,oe,null,Q,J)),Pl(e,h,x,!X);return}}$p(e,n,h,a,u,f,x,w,M)}function $1(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var u=0;u<a.length;u++){var f=a[u],h=f.getSnapshot;f=f.value;try{if(!fn(h(),f))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Pl(e,n,a,u){n&=~jc,n&=~Ba,e.suspendedLanes|=n,e.pingedLanes&=~n,u&&(e.warmLanes|=n),u=e.expirationTimes;for(var f=n;0<f;){var h=31-tt(f),x=1<<h;u[h]=-1,f&=~x}a!==0&&iu(e,a,n)}function Ku(){return(et&6)===0?(gr(0),!1):!0}function Dc(){if(He!==null){if(lt===0)var e=He.return;else e=He,dl=Ra=null,$s(e),oi=null,Ji=0,e=He;for(;e!==null;)yp(e.alternate,e),e=e.return;He=null}}function vi(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,mx(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),wl=0,Dc(),ot=e,He=a=cl(e.current,null),Ge=n,lt=0,pn=null,Ql=!1,pi=va(e,n),Tc=!1,gi=gn=jc=Ba=$l=St=0,ln=mr=null,Ac=!1,(n&8)!==0&&(n|=n&32);var u=e.entangledLanes;if(u!==0)for(e=e.entanglements,u&=n;0<u;){var f=31-tt(u),h=1<<f;n|=e[f],u&=~h}return El=n,gu(),a}function Yp(e,n){Me=null,H.H=rr,n===ui||n===ku?(n=lm(),lt=3):n===Ls?(n=lm(),lt=4):lt=n===cc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,pn=n,He===null&&(St=1,Bu(e,Cn(n,e.current)))}function Gp(){var e=hn.current;return e===null?!0:(Ge&4194048)===Ge?Rn===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===Rn:!1}function Fp(){var e=H.H;return H.H=rr,e===null?rr:e}function Vp(){var e=H.A;return H.A=X1,e}function Zu(){St=4,Ql||(Ge&4194048)!==Ge&&hn.current!==null||(pi=!0),($l&134217727)===0&&(Ba&134217727)===0||ot===null||Pl(ot,Ge,gn,!1)}function zc(e,n,a){var u=et;et|=2;var f=Fp(),h=Vp();(ot!==e||Ge!==n)&&($u=null,vi(e,n)),n=!1;var x=St;e:do try{if(lt!==0&&He!==null){var w=He,M=pn;switch(lt){case 8:Dc(),x=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(n=!0);var X=lt;if(lt=0,pn=null,bi(e,w,M,X),a&&pi){x=0;break e}break;default:X=lt,lt=0,pn=null,bi(e,w,M,X)}}K1(),x=St;break}catch(ae){Yp(e,ae)}while(!0);return n&&e.shellSuspendCounter++,dl=Ra=null,et=u,H.H=f,H.A=h,He===null&&(ot=null,Ge=0,gu()),x}function K1(){for(;He!==null;)Ip(He)}function Z1(e,n){var a=et;et|=2;var u=Fp(),f=Vp();ot!==e||Ge!==n?($u=null,Qu=pt()+500,vi(e,n)):pi=va(e,n);e:do try{if(lt!==0&&He!==null){n=He;var h=pn;t:switch(lt){case 1:lt=0,pn=null,bi(e,n,h,1);break;case 2:case 9:if(tm(h)){lt=0,pn=null,Xp(n);break}n=function(){lt!==2&&lt!==9||ot!==e||(lt=7),Pn(e)},h.then(n,n);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:tm(h)?(lt=0,pn=null,Xp(n)):(lt=0,pn=null,bi(e,n,h,7));break;case 5:var x=null;switch(He.tag){case 26:x=He.memoizedState;case 5:case 27:var w=He;if(x?Ng(x):w.stateNode.complete){lt=0,pn=null;var M=w.sibling;if(M!==null)He=M;else{var X=w.return;X!==null?(He=X,Pu(X)):He=null}break t}}lt=0,pn=null,bi(e,n,h,5);break;case 6:lt=0,pn=null,bi(e,n,h,6);break;case 8:Dc(),St=6;break e;default:throw Error(r(462))}}P1();break}catch(ae){Yp(e,ae)}while(!0);return dl=Ra=null,H.H=u,H.A=f,et=a,He!==null?0:(ot=null,Ge=0,gu(),St)}function P1(){for(;He!==null&&!Li();)Ip(He)}function Ip(e){var n=pp(e.alternate,e,El);e.memoizedProps=e.pendingProps,n===null?Pu(e):He=n}function Xp(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=sp(a,n,n.pendingProps,n.type,void 0,Ge);break;case 11:n=sp(a,n,n.pendingProps,n.type.render,n.ref,Ge);break;case 5:$s(n);default:yp(a,n),n=He=Vh(n,El),n=pp(a,n,El)}e.memoizedProps=e.pendingProps,n===null?Pu(e):He=n}function bi(e,n,a,u){dl=Ra=null,$s(n),oi=null,Ji=0;var f=n.return;try{if(H1(e,f,n,a,Ge)){St=1,Bu(e,Cn(a,e.current)),He=null;return}}catch(h){if(f!==null)throw He=f,h;St=1,Bu(e,Cn(a,e.current)),He=null;return}n.flags&32768?($e||u===1?e=!0:pi||(Ge&536870912)!==0?e=!1:(Ql=e=!0,(u===2||u===9||u===3||u===6)&&(u=hn.current,u!==null&&u.tag===13&&(u.flags|=16384))),Qp(n,e)):Pu(n)}function Pu(e){var n=e;do{if((n.flags&32768)!==0){Qp(n,Ql);return}e=n.return;var a=G1(n.alternate,n,El);if(a!==null){He=a;return}if(n=n.sibling,n!==null){He=n;return}He=n=e}while(n!==null);St===0&&(St=5)}function Qp(e,n){do{var a=F1(e.alternate,e);if(a!==null){a.flags&=32767,He=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){He=e;return}He=e=a}while(e!==null);St=6,He=null}function $p(e,n,a,u,f,h,x,w,M){e.cancelPendingCommit=null;do Ju();while(Dt!==0);if((et&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(h=n.lanes|n.childLanes,h|=Ss,es(e,a,h,x,w,M),e===ot&&(He=ot=null,Ge=0),yi=n,Zl=e,wl=a,Rc=h,_c=f,Up=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,tx(Ce,function(){return Wp(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=H.T,H.T=null,f=te.p,te.p=2,x=et,et|=4;try{V1(e,n,a)}finally{et=x,te.p=f,H.T=u}}Dt=1,Kp(),Zp(),Pp()}}function Kp(){if(Dt===1){Dt=0;var e=Zl,n=yi,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=H.T,H.T=null;var u=te.p;te.p=2;var f=et;et|=4;try{Rp(n,e);var h=Ic,x=Mh(e.containerInfo),w=h.focusedElem,M=h.selectionRange;if(x!==w&&w&&w.ownerDocument&&Oh(w.ownerDocument.documentElement,w)){if(M!==null&&gs(w)){var X=M.start,ae=M.end;if(ae===void 0&&(ae=X),"selectionStart"in w)w.selectionStart=X,w.selectionEnd=Math.min(ae,w.value.length);else{var oe=w.ownerDocument||document,Q=oe&&oe.defaultView||window;if(Q.getSelection){var J=Q.getSelection(),Se=w.textContent.length,Ne=Math.min(M.start,Se),ut=M.end===void 0?Ne:Math.min(M.end,Se);!J.extend&&Ne>ut&&(x=ut,ut=Ne,Ne=x);var Y=zh(w,Ne),U=zh(w,ut);if(Y&&U&&(J.rangeCount!==1||J.anchorNode!==Y.node||J.anchorOffset!==Y.offset||J.focusNode!==U.node||J.focusOffset!==U.offset)){var I=oe.createRange();I.setStart(Y.node,Y.offset),J.removeAllRanges(),Ne>ut?(J.addRange(I),J.extend(U.node,U.offset)):(I.setEnd(U.node,U.offset),J.addRange(I))}}}}for(oe=[],J=w;J=J.parentNode;)J.nodeType===1&&oe.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<oe.length;w++){var re=oe[w];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}co=!!Vc,Ic=Vc=null}finally{et=f,te.p=u,H.T=a}}e.current=n,Dt=2}}function Zp(){if(Dt===2){Dt=0;var e=Zl,n=yi,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=H.T,H.T=null;var u=te.p;te.p=2;var f=et;et|=4;try{kp(e,n.alternate,n)}finally{et=f,te.p=u,H.T=a}}Dt=3}}function Pp(){if(Dt===4||Dt===3){Dt=0,Ui();var e=Zl,n=yi,a=wl,u=Up;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Dt=5:(Dt=0,yi=Zl=null,Jp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Kl=null),se(a),n=n.stateNode,nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(Lt,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=H.T,f=te.p,te.p=2,H.T=null;try{for(var h=e.onRecoverableError,x=0;x<u.length;x++){var w=u[x];h(w.value,{componentStack:w.stack})}}finally{H.T=n,te.p=f}}(wl&3)!==0&&Ju(),Pn(e),f=e.pendingLanes,(a&261930)!==0&&(f&42)!==0?e===Nc?pr++:(pr=0,Nc=e):pr=0,gr(0)}}function Jp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Zi(n)))}function Ju(){return Kp(),Zp(),Pp(),Wp()}function Wp(){if(Dt!==5)return!1;var e=Zl,n=Rc;Rc=0;var a=se(wl),u=H.T,f=te.p;try{te.p=32>a?32:a,H.T=null,a=_c,_c=null;var h=Zl,x=wl;if(Dt=0,yi=Zl=null,wl=0,(et&6)!==0)throw Error(r(331));var w=et;if(et|=4,Op(h.current),Np(h,h.current,x,a),et=w,gr(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(Lt,h)}catch{}return!0}finally{te.p=f,H.T=u,Jp(e,n)}}function eg(e,n,a){n=Cn(a,n),n=sc(e.stateNode,n,2),e=Fl(e,n,2),e!==null&&(Ml(e,2),Pn(e))}function at(e,n,a){if(e.tag===3)eg(e,e,a);else for(;n!==null;){if(n.tag===3){eg(n,e,a);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Kl===null||!Kl.has(u))){e=Cn(a,e),a=tp(2),u=Fl(n,a,2),u!==null&&(np(a,u,n,e),Ml(u,2),Pn(u));break}}n=n.return}}function Oc(e,n,a){var u=e.pingCache;if(u===null){u=e.pingCache=new Q1;var f=new Set;u.set(n,f)}else f=u.get(n),f===void 0&&(f=new Set,u.set(n,f));f.has(a)||(Tc=!0,f.add(a),e=J1.bind(null,e,n,a),n.then(e,e))}function J1(e,n,a){var u=e.pingCache;u!==null&&u.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,ot===e&&(Ge&a)===a&&(St===4||St===3&&(Ge&62914560)===Ge&&300>pt()-Xu?(et&2)===0&&vi(e,0):jc|=a,gi===Ge&&(gi=0)),Pn(e)}function tg(e,n){n===0&&(n=ba()),e=Ta(e,n),e!==null&&(Ml(e,n),Pn(e))}function W1(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),tg(e,a)}function ex(e,n){var a=0;switch(e.tag){case 31:case 13:var u=e.stateNode,f=e.memoizedState;f!==null&&(a=f.retryLane);break;case 19:u=e.stateNode;break;case 22:u=e.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(n),tg(e,a)}function tx(e,n){return Dl(e,n)}var Wu=null,xi=null,Mc=!1,eo=!1,Lc=!1,Jl=0;function Pn(e){e!==xi&&e.next===null&&(xi===null?Wu=xi=e:xi=xi.next=e),eo=!0,Mc||(Mc=!0,lx())}function gr(e,n){if(!Lc&&eo){Lc=!0;do for(var a=!1,u=Wu;u!==null;){if(e!==0){var f=u.pendingLanes;if(f===0)var h=0;else{var x=u.suspendedLanes,w=u.pingedLanes;h=(1<<31-tt(42|e)+1)-1,h&=f&~(x&~w),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,ig(u,h))}else h=Ge,h=ya(u,u===ot?h:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(h&3)===0||va(u,h)||(a=!0,ig(u,h));u=u.next}while(a);Lc=!1}}function nx(){ng()}function ng(){eo=Mc=!1;var e=0;Jl!==0&&hx()&&(e=Jl);for(var n=pt(),a=null,u=Wu;u!==null;){var f=u.next,h=lg(u,n);h===0?(u.next=null,a===null?Wu=f:a.next=f,f===null&&(xi=a)):(a=u,(e!==0||(h&3)!==0)&&(eo=!0)),u=f}Dt!==0&&Dt!==5||gr(e),Jl!==0&&(Jl=0)}function lg(e,n){for(var a=e.suspendedLanes,u=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var x=31-tt(h),w=1<<x,M=f[x];M===-1?((w&a)===0||(w&u)!==0)&&(f[x]=au(w,n)):M<=n&&(e.expiredLanes|=w),h&=~w}if(n=ot,a=Ge,a=ya(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u=e.callbackNode,a===0||e===n&&(lt===2||lt===9)||e.cancelPendingCommit!==null)return u!==null&&u!==null&&pa(u),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||va(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(u!==null&&pa(u),se(a)){case 2:case 8:a=de;break;case 32:a=Ce;break;case 268435456:a=Pe;break;default:a=Ce}return u=ag.bind(null,e),a=Dl(a,u),e.callbackPriority=n,e.callbackNode=a,n}return u!==null&&u!==null&&pa(u),e.callbackPriority=2,e.callbackNode=null,2}function ag(e,n){if(Dt!==0&&Dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ju()&&e.callbackNode!==a)return null;var u=Ge;return u=ya(e,e===ot?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u===0?null:(Hp(e,u,n),lg(e,pt()),e.callbackNode!=null&&e.callbackNode===a?ag.bind(null,e):null)}function ig(e,n){if(Ju())return null;Hp(e,n,!0)}function lx(){px(function(){(et&6)!==0?Dl(ie,nx):ng()})}function Uc(){if(Jl===0){var e=ii;e===0&&(e=il,il<<=1,(il&261888)===0&&(il=256)),Jl=e}return Jl}function rg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ou(""+e)}function ug(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function ax(e,n,a,u,f){if(n==="submit"&&a&&a.stateNode===f){var h=rg((f[ve]||null).action),x=u.submitter;x&&(n=(n=x[ve]||null)?rg(n.formAction):x.getAttribute("formAction"),n!==null&&(h=n,x=null));var w=new du("action","action",null,u,f);e.push({event:w,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Jl!==0){var M=x?ug(f,x):new FormData(f);lc(a,{pending:!0,data:M,method:f.method,action:h},null,M)}}else typeof h=="function"&&(w.preventDefault(),M=x?ug(f,x):new FormData(f),lc(a,{pending:!0,data:M,method:f.method,action:h},h,M))},currentTarget:f}]})}}for(var Bc=0;Bc<xs.length;Bc++){var Hc=xs[Bc],ix=Hc.toLowerCase(),rx=Hc[0].toUpperCase()+Hc.slice(1);Gn(ix,"on"+rx)}Gn(Bh,"onAnimationEnd"),Gn(Hh,"onAnimationIteration"),Gn(qh,"onAnimationStart"),Gn("dblclick","onDoubleClick"),Gn("focusin","onFocus"),Gn("focusout","onBlur"),Gn(E1,"onTransitionRun"),Gn(w1,"onTransitionStart"),Gn(k1,"onTransitionCancel"),Gn(Yh,"onTransitionEnd"),En("onMouseEnter",["mouseout","mouseover"]),En("onMouseLeave",["mouseout","mouseover"]),En("onPointerEnter",["pointerout","pointerover"]),En("onPointerLeave",["pointerout","pointerover"]),qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yr="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(" "),ux=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(yr));function og(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var u=e[a],f=u.event;u=u.listeners;e:{var h=void 0;if(n)for(var x=u.length-1;0<=x;x--){var w=u[x],M=w.instance,X=w.currentTarget;if(w=w.listener,M!==h&&f.isPropagationStopped())break e;h=w,f.currentTarget=X;try{h(f)}catch(ae){pu(ae)}f.currentTarget=null,h=M}else for(x=0;x<u.length;x++){if(w=u[x],M=w.instance,X=w.currentTarget,w=w.listener,M!==h&&f.isPropagationStopped())break e;h=w,f.currentTarget=X;try{h(f)}catch(ae){pu(ae)}f.currentTarget=null,h=M}}}}function qe(e,n){var a=n[Ae];a===void 0&&(a=n[Ae]=new Set);var u=e+"__bubble";a.has(u)||(sg(n,e,2,!1),a.add(u))}function qc(e,n,a){var u=0;n&&(u|=4),sg(a,e,u,n)}var to="_reactListening"+Math.random().toString(36).slice(2);function Yc(e){if(!e[to]){e[to]=!0,Hn.forEach(function(a){a!=="selectionchange"&&(ux.has(a)||qc(a,!1,e),qc(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[to]||(n[to]=!0,qc("selectionchange",!1,n))}}function sg(e,n,a,u){switch(Bg(n)){case 2:var f=Mx;break;case 8:f=Lx;break;default:f=nf}a=f.bind(null,n,a,e),f=void 0,!us||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),u?f!==void 0?e.addEventListener(n,a,{capture:!0,passive:f}):e.addEventListener(n,a,!0):f!==void 0?e.addEventListener(n,a,{passive:f}):e.addEventListener(n,a,!1)}function Gc(e,n,a,u,f){var h=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var x=u.tag;if(x===3||x===4){var w=u.stateNode.containerInfo;if(w===f)break;if(x===4)for(x=u.return;x!==null;){var M=x.tag;if((M===3||M===4)&&x.stateNode.containerInfo===f)return;x=x.return}for(;w!==null;){if(x=bt(w),x===null)return;if(M=x.tag,M===5||M===6||M===26||M===27){u=h=x;continue e}w=w.parentNode}}u=u.return}mh(function(){var X=h,ae=is(a),oe=[];e:{var Q=Gh.get(e);if(Q!==void 0){var J=du,Se=e;switch(e){case"keypress":if(cu(a)===0)break e;case"keydown":case"keyup":J=e1;break;case"focusin":Se="focus",J=fs;break;case"focusout":Se="blur",J=fs;break;case"beforeblur":case"afterblur":J=fs;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=yh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=G0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=l1;break;case Bh:case Hh:case qh:J=I0;break;case Yh:J=i1;break;case"scroll":case"scrollend":J=q0;break;case"wheel":J=u1;break;case"copy":case"cut":case"paste":J=Q0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=bh;break;case"toggle":case"beforetoggle":J=s1}var Ne=(n&4)!==0,ut=!Ne&&(e==="scroll"||e==="scrollend"),Y=Ne?Q!==null?Q+"Capture":null:Q;Ne=[];for(var U=X,I;U!==null;){var re=U;if(I=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||I===null||Y===null||(re=Hi(U,Y),re!=null&&Ne.push(vr(U,re,I))),ut)break;U=U.return}0<Ne.length&&(Q=new J(Q,Se,null,a,ae),oe.push({event:Q,listeners:Ne}))}}if((n&7)===0){e:{if(Q=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",Q&&a!==as&&(Se=a.relatedTarget||a.fromElement)&&(bt(Se)||Se[we]))break e;if((J||Q)&&(Q=ae.window===ae?ae:(Q=ae.ownerDocument)?Q.defaultView||Q.parentWindow:window,J?(Se=a.relatedTarget||a.toElement,J=X,Se=Se?bt(Se):null,Se!==null&&(ut=s(Se),Ne=Se.tag,Se!==ut||Ne!==5&&Ne!==27&&Ne!==6)&&(Se=null)):(J=null,Se=X),J!==Se)){if(Ne=yh,re="onMouseLeave",Y="onMouseEnter",U="mouse",(e==="pointerout"||e==="pointerover")&&(Ne=bh,re="onPointerLeave",Y="onPointerEnter",U="pointer"),ut=J==null?Q:zt(J),I=Se==null?Q:zt(Se),Q=new Ne(re,U+"leave",J,a,ae),Q.target=ut,Q.relatedTarget=I,re=null,bt(ae)===X&&(Ne=new Ne(Y,U+"enter",Se,a,ae),Ne.target=I,Ne.relatedTarget=ut,re=Ne),ut=re,J&&Se)t:{for(Ne=ox,Y=J,U=Se,I=0,re=Y;re;re=Ne(re))I++;re=0;for(var je=U;je;je=Ne(je))re++;for(;0<I-re;)Y=Ne(Y),I--;for(;0<re-I;)U=Ne(U),re--;for(;I--;){if(Y===U||U!==null&&Y===U.alternate){Ne=Y;break t}Y=Ne(Y),U=Ne(U)}Ne=null}else Ne=null;J!==null&&cg(oe,Q,J,Ne,!1),Se!==null&&ut!==null&&cg(oe,ut,Se,Ne,!0)}}e:{if(Q=X?zt(X):window,J=Q.nodeName&&Q.nodeName.toLowerCase(),J==="select"||J==="input"&&Q.type==="file")var Je=jh;else if(Ch(Q))if(Ah)Je=b1;else{Je=y1;var Ee=g1}else J=Q.nodeName,!J||J.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?X&&ls(X.elementType)&&(Je=jh):Je=v1;if(Je&&(Je=Je(e,X))){Th(oe,Je,a,ae);break e}Ee&&Ee(e,Q,X),e==="focusout"&&X&&Q.type==="number"&&X.memoizedProps.value!=null&&ns(Q,"number",Q.value)}switch(Ee=X?zt(X):window,e){case"focusin":(Ch(Ee)||Ee.contentEditable==="true")&&(Pa=Ee,ys=X,Qi=null);break;case"focusout":Qi=ys=Pa=null;break;case"mousedown":vs=!0;break;case"contextmenu":case"mouseup":case"dragend":vs=!1,Lh(oe,a,ae);break;case"selectionchange":if(S1)break;case"keydown":case"keyup":Lh(oe,a,ae)}var Le;if(hs)e:{switch(e){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else Za?wh(e,a)&&(Fe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Fe="onCompositionStart");Fe&&(xh&&a.locale!=="ko"&&(Za||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&Za&&(Le=ph()):(Ll=ae,os="value"in Ll?Ll.value:Ll.textContent,Za=!0)),Ee=no(X,Fe),0<Ee.length&&(Fe=new vh(Fe,e,null,a,ae),oe.push({event:Fe,listeners:Ee}),Le?Fe.data=Le:(Le=kh(a),Le!==null&&(Fe.data=Le)))),(Le=f1?d1(e,a):h1(e,a))&&(Fe=no(X,"onBeforeInput"),0<Fe.length&&(Ee=new vh("onBeforeInput","beforeinput",null,a,ae),oe.push({event:Ee,listeners:Fe}),Ee.data=Le)),ax(oe,e,X,a,ae)}og(oe,n)})}function vr(e,n,a){return{instance:e,listener:n,currentTarget:a}}function no(e,n){for(var a=n+"Capture",u=[];e!==null;){var f=e,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Hi(e,a),f!=null&&u.unshift(vr(e,f,h)),f=Hi(e,n),f!=null&&u.push(vr(e,f,h))),e.tag===3)return u;e=e.return}return[]}function ox(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function cg(e,n,a,u,f){for(var h=n._reactName,x=[];a!==null&&a!==u;){var w=a,M=w.alternate,X=w.stateNode;if(w=w.tag,M!==null&&M===u)break;w!==5&&w!==26&&w!==27||X===null||(M=X,f?(X=Hi(a,h),X!=null&&x.unshift(vr(a,X,M))):f||(X=Hi(a,h),X!=null&&x.push(vr(a,X,M)))),a=a.return}x.length!==0&&e.push({event:n,listeners:x})}var sx=/\r\n?/g,cx=/\u0000|\uFFFD/g;function fg(e){return(typeof e=="string"?e:""+e).replace(sx,`
9
+ `).replace(cx,"")}function dg(e,n){return n=fg(n),fg(e)===n}function rt(e,n,a,u,f,h){switch(a){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||Qa(e,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&Qa(e,""+u);break;case"className":Yn(e,"class",u);break;case"tabIndex":Yn(e,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Yn(e,a,u);break;case"style":dh(e,u,h);break;case"data":if(n!=="object"){Yn(e,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}u=ou(""+u),e.setAttribute(a,u);break;case"action":case"formAction":if(typeof u=="function"){e.setAttribute(a,"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 h=="function"&&(a==="formAction"?(n!=="input"&&rt(e,n,"name",f.name,f,null),rt(e,n,"formEncType",f.formEncType,f,null),rt(e,n,"formMethod",f.formMethod,f,null),rt(e,n,"formTarget",f.formTarget,f,null)):(rt(e,n,"encType",f.encType,f,null),rt(e,n,"method",f.method,f,null),rt(e,n,"target",f.target,f,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}u=ou(""+u),e.setAttribute(a,u);break;case"onClick":u!=null&&(e.onclick=ol);break;case"onScroll":u!=null&&qe("scroll",e);break;case"onScrollEnd":u!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(a=u.__html,a!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":e.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){e.removeAttribute("xlink:href");break}a=ou(""+u),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,""+u):e.removeAttribute(a);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":u&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":u===!0?e.setAttribute(a,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,u):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?e.setAttribute(a,u):e.removeAttribute(a);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?e.removeAttribute(a):e.setAttribute(a,u);break;case"popover":qe("beforetoggle",e),qe("toggle",e),Et(e,"popover",u);break;case"xlinkActuate":Bt(e,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Bt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Bt(e,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Bt(e,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Bt(e,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Bt(e,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Et(e,"is",u);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=B0.get(a)||a,Et(e,a,u))}}function Fc(e,n,a,u,f,h){switch(a){case"style":dh(e,u,h);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(a=u.__html,a!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof u=="string"?Qa(e,u):(typeof u=="number"||typeof u=="bigint")&&Qa(e,""+u);break;case"onScroll":u!=null&&qe("scroll",e);break;case"onScrollEnd":u!=null&&qe("scrollend",e);break;case"onClick":u!=null&&(e.onclick=ol);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!cn.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(f=a.endsWith("Capture"),n=a.slice(2,f?a.length-7:void 0),h=e[ve]||null,h=h!=null?h[a]:null,typeof h=="function"&&e.removeEventListener(n,h,f),typeof u=="function")){typeof h!="function"&&h!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,u,f);break e}a in e?e[a]=u:u===!0?e.setAttribute(a,""):Et(e,a,u)}}}function Gt(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var u=!1,f=!1,h;for(h in a)if(a.hasOwnProperty(h)){var x=a[h];if(x!=null)switch(h){case"src":u=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:rt(e,n,h,x,a,null)}}f&&rt(e,n,"srcSet",a.srcSet,a,null),u&&rt(e,n,"src",a.src,a,null);return;case"input":qe("invalid",e);var w=h=x=f=null,M=null,X=null;for(u in a)if(a.hasOwnProperty(u)){var ae=a[u];if(ae!=null)switch(u){case"name":f=ae;break;case"type":x=ae;break;case"checked":M=ae;break;case"defaultChecked":X=ae;break;case"value":h=ae;break;case"defaultValue":w=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(r(137,n));break;default:rt(e,n,u,ae,a,null)}}oh(e,h,w,M,X,x,f,!1);return;case"select":qe("invalid",e),u=x=h=null;for(f in a)if(a.hasOwnProperty(f)&&(w=a[f],w!=null))switch(f){case"value":h=w;break;case"defaultValue":x=w;break;case"multiple":u=w;default:rt(e,n,f,w,a,null)}n=h,a=x,e.multiple=!!u,n!=null?Xa(e,!!u,n,!1):a!=null&&Xa(e,!!u,a,!0);return;case"textarea":qe("invalid",e),h=f=u=null;for(x in a)if(a.hasOwnProperty(x)&&(w=a[x],w!=null))switch(x){case"value":u=w;break;case"defaultValue":f=w;break;case"children":h=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:rt(e,n,x,w,a,null)}ch(e,u,f,h);return;case"option":for(M in a)a.hasOwnProperty(M)&&(u=a[M],u!=null)&&(M==="selected"?e.selected=u&&typeof u!="function"&&typeof u!="symbol":rt(e,n,M,u,a,null));return;case"dialog":qe("beforetoggle",e),qe("toggle",e),qe("cancel",e),qe("close",e);break;case"iframe":case"object":qe("load",e);break;case"video":case"audio":for(u=0;u<yr.length;u++)qe(yr[u],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in a)if(a.hasOwnProperty(X)&&(u=a[X],u!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:rt(e,n,X,u,a,null)}return;default:if(ls(n)){for(ae in a)a.hasOwnProperty(ae)&&(u=a[ae],u!==void 0&&Fc(e,n,ae,u,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(u=a[w],u!=null&&rt(e,n,w,u,a,null))}function fx(e,n,a,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,x=null,w=null,M=null,X=null,ae=null;for(J in a){var oe=a[J];if(a.hasOwnProperty(J)&&oe!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":M=oe;default:u.hasOwnProperty(J)||rt(e,n,J,null,u,oe)}}for(var Q in u){var J=u[Q];if(oe=a[Q],u.hasOwnProperty(Q)&&(J!=null||oe!=null))switch(Q){case"type":h=J;break;case"name":f=J;break;case"checked":X=J;break;case"defaultChecked":ae=J;break;case"value":x=J;break;case"defaultValue":w=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,n));break;default:J!==oe&&rt(e,n,Q,J,u,oe)}}ts(e,x,w,M,X,ae,h,f);return;case"select":J=x=w=Q=null;for(h in a)if(M=a[h],a.hasOwnProperty(h)&&M!=null)switch(h){case"value":break;case"multiple":J=M;default:u.hasOwnProperty(h)||rt(e,n,h,null,u,M)}for(f in u)if(h=u[f],M=a[f],u.hasOwnProperty(f)&&(h!=null||M!=null))switch(f){case"value":Q=h;break;case"defaultValue":w=h;break;case"multiple":x=h;default:h!==M&&rt(e,n,f,h,u,M)}n=w,a=x,u=J,Q!=null?Xa(e,!!a,Q,!1):!!u!=!!a&&(n!=null?Xa(e,!!a,n,!0):Xa(e,!!a,a?[]:"",!1));return;case"textarea":J=Q=null;for(w in a)if(f=a[w],a.hasOwnProperty(w)&&f!=null&&!u.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:rt(e,n,w,null,u,f)}for(x in u)if(f=u[x],h=a[x],u.hasOwnProperty(x)&&(f!=null||h!=null))switch(x){case"value":Q=f;break;case"defaultValue":J=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==h&&rt(e,n,x,f,u,h)}sh(e,Q,J);return;case"option":for(var Se in a)Q=a[Se],a.hasOwnProperty(Se)&&Q!=null&&!u.hasOwnProperty(Se)&&(Se==="selected"?e.selected=!1:rt(e,n,Se,null,u,Q));for(M in u)Q=u[M],J=a[M],u.hasOwnProperty(M)&&Q!==J&&(Q!=null||J!=null)&&(M==="selected"?e.selected=Q&&typeof Q!="function"&&typeof Q!="symbol":rt(e,n,M,Q,u,J));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 Ne in a)Q=a[Ne],a.hasOwnProperty(Ne)&&Q!=null&&!u.hasOwnProperty(Ne)&&rt(e,n,Ne,null,u,Q);for(X in u)if(Q=u[X],J=a[X],u.hasOwnProperty(X)&&Q!==J&&(Q!=null||J!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(r(137,n));break;default:rt(e,n,X,Q,u,J)}return;default:if(ls(n)){for(var ut in a)Q=a[ut],a.hasOwnProperty(ut)&&Q!==void 0&&!u.hasOwnProperty(ut)&&Fc(e,n,ut,void 0,u,Q);for(ae in u)Q=u[ae],J=a[ae],!u.hasOwnProperty(ae)||Q===J||Q===void 0&&J===void 0||Fc(e,n,ae,Q,u,J);return}}for(var Y in a)Q=a[Y],a.hasOwnProperty(Y)&&Q!=null&&!u.hasOwnProperty(Y)&&rt(e,n,Y,null,u,Q);for(oe in u)Q=u[oe],J=a[oe],!u.hasOwnProperty(oe)||Q===J||Q==null&&J==null||rt(e,n,oe,Q,u,J)}function hg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function dx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),u=0;u<a.length;u++){var f=a[u],h=f.transferSize,x=f.initiatorType,w=f.duration;if(h&&w&&hg(x)){for(x=0,w=f.responseEnd,u+=1;u<a.length;u++){var M=a[u],X=M.startTime;if(X>w)break;var ae=M.transferSize,oe=M.initiatorType;ae&&hg(oe)&&(M=M.responseEnd,x+=ae*(M<w?1:(w-X)/(M-X)))}if(--u,n+=8*(h+x)/(f.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Vc=null,Ic=null;function lo(e){return e.nodeType===9?e:e.ownerDocument}function mg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function pg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Xc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Qc=null;function hx(){var e=window.event;return e&&e.type==="popstate"?e===Qc?!1:(Qc=e,!0):(Qc=null,!1)}var gg=typeof setTimeout=="function"?setTimeout:void 0,mx=typeof clearTimeout=="function"?clearTimeout:void 0,yg=typeof Promise=="function"?Promise:void 0,px=typeof queueMicrotask=="function"?queueMicrotask:typeof yg<"u"?function(e){return yg.resolve(null).then(e).catch(gx)}:gg;function gx(e){setTimeout(function(){throw e})}function Wl(e){return e==="head"}function vg(e,n){var a=n,u=0;do{var f=a.nextSibling;if(e.removeChild(a),f&&f.nodeType===8)if(a=f.data,a==="/$"||a==="/&"){if(u===0){e.removeChild(f),ki(n);return}u--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")u++;else if(a==="html")br(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,br(a);for(var h=a.firstChild;h;){var x=h.nextSibling,w=h.nodeName;h[gt]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&h.rel.toLowerCase()==="stylesheet"||a.removeChild(h),h=x}}else a==="body"&&br(e.ownerDocument.body);a=f}while(a);ki(n)}function bg(e,n){var a=e;e=0;do{var u=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=u}while(a)}function $c(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":$c(a),vt(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function yx(e,n,a,u){for(;e.nodeType===1;){var f=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(u){if(!e[gt])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=_n(e.nextSibling),e===null)break}return null}function vx(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=_n(e.nextSibling),e===null))return null;return e}function xg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=_n(e.nextSibling),e===null))return null;return e}function Kc(e){return e.data==="$?"||e.data==="$~"}function Zc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function bx(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var u=function(){n(),a.removeEventListener("DOMContentLoaded",u)};a.addEventListener("DOMContentLoaded",u),e._reactRetry=u}}function _n(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Pc=null;function Sg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return _n(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function Eg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function wg(e,n,a){switch(n=lo(a),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function br(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);vt(e)}var Nn=new Map,kg=new Set;function ao(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kl=te.d;te.d={f:xx,r:Sx,D:Ex,C:wx,L:kx,m:Cx,X:jx,S:Tx,M:Ax};function xx(){var e=kl.f(),n=Ku();return e||n}function Sx(e){var n=Ie(e);n!==null&&n.tag===5&&n.type==="form"?Ym(n):kl.r(e)}var Si=typeof document>"u"?null:document;function Cg(e,n,a){var u=Si;if(u&&typeof n=="string"&&n){var f=wn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),kg.has(f)||(kg.add(f),e={rel:e,crossOrigin:a,href:n},u.querySelector(f)===null&&(n=u.createElement("link"),Gt(n,"link",e),ht(n),u.head.appendChild(n)))}}function Ex(e){kl.D(e),Cg("dns-prefetch",e,null)}function wx(e,n){kl.C(e,n),Cg("preconnect",e,n)}function kx(e,n,a){kl.L(e,n,a);var u=Si;if(u&&e&&n){var f='link[rel="preload"][as="'+wn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(f+='[imagesrcset="'+wn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(f+='[imagesizes="'+wn(a.imageSizes)+'"]')):f+='[href="'+wn(e)+'"]';var h=f;switch(n){case"style":h=Ei(e);break;case"script":h=wi(e)}Nn.has(h)||(e=g({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),Nn.set(h,e),u.querySelector(f)!==null||n==="style"&&u.querySelector(xr(h))||n==="script"&&u.querySelector(Sr(h))||(n=u.createElement("link"),Gt(n,"link",e),ht(n),u.head.appendChild(n)))}}function Cx(e,n){kl.m(e,n);var a=Si;if(a&&e){var u=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+wn(u)+'"][href="'+wn(e)+'"]',h=f;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=wi(e)}if(!Nn.has(h)&&(e=g({rel:"modulepreload",href:e},n),Nn.set(h,e),a.querySelector(f)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Sr(h)))return}u=a.createElement("link"),Gt(u,"link",e),ht(u),a.head.appendChild(u)}}}function Tx(e,n,a){kl.S(e,n,a);var u=Si;if(u&&e){var f=Jt(u).hoistableStyles,h=Ei(e);n=n||"default";var x=f.get(h);if(!x){var w={loading:0,preload:null};if(x=u.querySelector(xr(h)))w.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":n},a),(a=Nn.get(h))&&Jc(e,a);var M=x=u.createElement("link");ht(M),Gt(M,"link",e),M._p=new Promise(function(X,ae){M.onload=X,M.onerror=ae}),M.addEventListener("load",function(){w.loading|=1}),M.addEventListener("error",function(){w.loading|=2}),w.loading|=4,io(x,n,u)}x={type:"stylesheet",instance:x,count:1,state:w},f.set(h,x)}}}function jx(e,n){kl.X(e,n);var a=Si;if(a&&e){var u=Jt(a).hoistableScripts,f=wi(e),h=u.get(f);h||(h=a.querySelector(Sr(f)),h||(e=g({src:e,async:!0},n),(n=Nn.get(f))&&Wc(e,n),h=a.createElement("script"),ht(h),Gt(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},u.set(f,h))}}function Ax(e,n){kl.M(e,n);var a=Si;if(a&&e){var u=Jt(a).hoistableScripts,f=wi(e),h=u.get(f);h||(h=a.querySelector(Sr(f)),h||(e=g({src:e,async:!0,type:"module"},n),(n=Nn.get(f))&&Wc(e,n),h=a.createElement("script"),ht(h),Gt(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},u.set(f,h))}}function Tg(e,n,a,u){var f=(f=xe.current)?ao(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=Ei(a.href),a=Jt(f).hoistableStyles,u=a.get(n),u||(u={type:"style",instance:null,count:0,state:null},a.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ei(a.href);var h=Jt(f).hoistableStyles,x=h.get(e);if(x||(f=f.ownerDocument||f,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,x),(h=f.querySelector(xr(e)))&&!h._p&&(x.instance=h,x.state.loading=5),Nn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Nn.set(e,a),h||Rx(f,e,a,x.state))),n&&u===null)throw Error(r(528,""));return x}if(n&&u!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=wi(a),a=Jt(f).hoistableScripts,u=a.get(n),u||(u={type:"script",instance:null,count:0,state:null},a.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ei(e){return'href="'+wn(e)+'"'}function xr(e){return'link[rel="stylesheet"]['+e+"]"}function jg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function Rx(e,n,a,u){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=e.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),Gt(n,"link",a),ht(n),e.head.appendChild(n))}function wi(e){return'[src="'+wn(e)+'"]'}function Sr(e){return"script[async]"+e}function Ag(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var u=e.querySelector('style[data-href~="'+wn(a.href)+'"]');if(u)return n.instance=u,ht(u),u;var f=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(e.ownerDocument||e).createElement("style"),ht(u),Gt(u,"style",f),io(u,a.precedence,e),n.instance=u;case"stylesheet":f=Ei(a.href);var h=e.querySelector(xr(f));if(h)return n.state.loading|=4,n.instance=h,ht(h),h;u=jg(a),(f=Nn.get(f))&&Jc(u,f),h=(e.ownerDocument||e).createElement("link"),ht(h);var x=h;return x._p=new Promise(function(w,M){x.onload=w,x.onerror=M}),Gt(h,"link",u),n.state.loading|=4,io(h,a.precedence,e),n.instance=h;case"script":return h=wi(a.src),(f=e.querySelector(Sr(h)))?(n.instance=f,ht(f),f):(u=a,(f=Nn.get(h))&&(u=g({},a),Wc(u,f)),e=e.ownerDocument||e,f=e.createElement("script"),ht(f),Gt(f,"link",u),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,io(u,a.precedence,e));return n.instance}function io(e,n,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=u.length?u[u.length-1]:null,h=f,x=0;x<u.length;x++){var w=u[x];if(w.dataset.precedence===n)h=w;else if(h!==f)break}h?h.parentNode.insertBefore(e,h.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function Jc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Wc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var ro=null;function Rg(e,n,a){if(ro===null){var u=new Map,f=ro=new Map;f.set(a,u)}else f=ro,u=f.get(a),u||(u=new Map,f.set(a,u));if(u.has(e))return u;for(u.set(e,null),a=a.getElementsByTagName(e),f=0;f<a.length;f++){var h=a[f];if(!(h[gt]||h[me]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var x=h.getAttribute(n)||"";x=e+x;var w=u.get(x);w?w.push(h):u.set(x,[h])}}return u}function _g(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function _x(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Ng(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Nx(e,n,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var f=Ei(u.href),h=n.querySelector(xr(f));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=uo.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=h,ht(h);return}h=n.ownerDocument||n,u=jg(u),(f=Nn.get(f))&&Jc(u,f),h=h.createElement("link"),ht(h);var x=h;x._p=new Promise(function(w,M){x.onload=w,x.onerror=M}),Gt(h,"link",u),a.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=uo.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var ef=0;function Dx(e,n){return e.stylesheets&&e.count===0&&so(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var u=setTimeout(function(){if(e.stylesheets&&so(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+n);0<e.imgBytes&&ef===0&&(ef=62500*dx());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&so(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>ef?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(u),clearTimeout(f)}}:null}function uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)so(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var oo=null;function so(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oo=new Map,n.forEach(zx,e),oo=null,uo.call(e))}function zx(e,n){if(!(n.state.loading&4)){var a=oo.get(e);if(a)var u=a.get(null);else{a=new Map,oo.set(e,a);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var x=f[h];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),u=x)}u&&a.set(null,u)}f=n.instance,x=f.getAttribute("data-precedence"),h=a.get(x)||u,h===u&&a.set(null,f),a.set(x,f),this.count++,u=uo.bind(this),f.addEventListener("load",u),f.addEventListener("error",u),h?h.parentNode.insertBefore(f,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Er={$$typeof:D,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function Ox(e,n,a,u,f,h,x,w,M){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ol(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ol(0),this.hiddenUpdates=Ol(null),this.identifierPrefix=u,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function Dg(e,n,a,u,f,h,x,w,M,X,ae,oe){return e=new Ox(e,n,a,x,M,X,ae,oe,w),n=1,h===!0&&(n|=24),h=dn(3,null,null,n),e.current=h,h.stateNode=e,n=zs(),n.refCount++,e.pooledCache=n,n.refCount++,h.memoizedState={element:u,isDehydrated:a,cache:n},Us(h),e}function zg(e){return e?(e=ei,e):ei}function Og(e,n,a,u,f,h){f=zg(f),u.context===null?u.context=f:u.pendingContext=f,u=Gl(n),u.payload={element:a},h=h===void 0?null:h,h!==null&&(u.callback=h),a=Fl(e,u,n),a!==null&&(an(a,e,n),er(a,e,n))}function Mg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function tf(e,n){Mg(e,n),(e=e.alternate)&&Mg(e,n)}function Lg(e){if(e.tag===13||e.tag===31){var n=Ta(e,67108864);n!==null&&an(n,e,67108864),tf(e,67108864)}}function Ug(e){if(e.tag===13||e.tag===31){var n=yn();n=Z(n);var a=Ta(e,n);a!==null&&an(a,e,n),tf(e,n)}}var co=!0;function Mx(e,n,a,u){var f=H.T;H.T=null;var h=te.p;try{te.p=2,nf(e,n,a,u)}finally{te.p=h,H.T=f}}function Lx(e,n,a,u){var f=H.T;H.T=null;var h=te.p;try{te.p=8,nf(e,n,a,u)}finally{te.p=h,H.T=f}}function nf(e,n,a,u){if(co){var f=lf(u);if(f===null)Gc(e,n,u,fo,a),Hg(e,u);else if(Bx(f,e,n,a,u))u.stopPropagation();else if(Hg(e,u),n&4&&-1<Ux.indexOf(e)){for(;f!==null;){var h=Ie(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var x=rl(h.pendingLanes);if(x!==0){var w=h;for(w.pendingLanes|=2,w.entangledLanes|=2;x;){var M=1<<31-tt(x);w.entanglements[1]|=M,x&=~M}Pn(h),(et&6)===0&&(Qu=pt()+500,gr(0))}}break;case 31:case 13:w=Ta(h,2),w!==null&&an(w,h,2),Ku(),tf(h,2)}if(h=lf(u),h===null&&Gc(e,n,u,fo,a),h===f)break;f=h}f!==null&&u.stopPropagation()}else Gc(e,n,u,null,a)}}function lf(e){return e=is(e),af(e)}var fo=null;function af(e){if(fo=null,e=bt(e),e!==null){var n=s(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=c(n),e!==null)return e;e=null}else if(a===31){if(e=d(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return fo=e,null}function Bg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(al()){case ie:return 2;case de:return 8;case Ce:case De:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var rf=!1,ea=null,ta=null,na=null,wr=new Map,kr=new Map,la=[],Ux="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 Hg(e,n){switch(e){case"focusin":case"focusout":ea=null;break;case"dragenter":case"dragleave":ta=null;break;case"mouseover":case"mouseout":na=null;break;case"pointerover":case"pointerout":wr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":kr.delete(n.pointerId)}}function Cr(e,n,a,u,f,h){return e===null||e.nativeEvent!==h?(e={blockedOn:n,domEventName:a,eventSystemFlags:u,nativeEvent:h,targetContainers:[f]},n!==null&&(n=Ie(n),n!==null&&Lg(n)),e):(e.eventSystemFlags|=u,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function Bx(e,n,a,u,f){switch(n){case"focusin":return ea=Cr(ea,e,n,a,u,f),!0;case"dragenter":return ta=Cr(ta,e,n,a,u,f),!0;case"mouseover":return na=Cr(na,e,n,a,u,f),!0;case"pointerover":var h=f.pointerId;return wr.set(h,Cr(wr.get(h)||null,e,n,a,u,f)),!0;case"gotpointercapture":return h=f.pointerId,kr.set(h,Cr(kr.get(h)||null,e,n,a,u,f)),!0}return!1}function qg(e){var n=bt(e.target);if(n!==null){var a=s(n);if(a!==null){if(n=a.tag,n===13){if(n=c(a),n!==null){e.blockedOn=n,ke(e.priority,function(){Ug(a)});return}}else if(n===31){if(n=d(a),n!==null){e.blockedOn=n,ke(e.priority,function(){Ug(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ho(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=lf(e.nativeEvent);if(a===null){a=e.nativeEvent;var u=new a.constructor(a.type,a);as=u,a.target.dispatchEvent(u),as=null}else return n=Ie(a),n!==null&&Lg(n),e.blockedOn=a,!1;n.shift()}return!0}function Yg(e,n,a){ho(e)&&a.delete(n)}function Hx(){rf=!1,ea!==null&&ho(ea)&&(ea=null),ta!==null&&ho(ta)&&(ta=null),na!==null&&ho(na)&&(na=null),wr.forEach(Yg),kr.forEach(Yg)}function mo(e,n){e.blockedOn===n&&(e.blockedOn=null,rf||(rf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hx)))}var po=null;function Gg(e){po!==e&&(po=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){po===e&&(po=null);for(var n=0;n<e.length;n+=3){var a=e[n],u=e[n+1],f=e[n+2];if(typeof u!="function"){if(af(u||a)===null)continue;break}var h=Ie(a);h!==null&&(e.splice(n,3),n-=3,lc(h,{pending:!0,data:f,method:a.method,action:u},u,f))}}))}function ki(e){function n(M){return mo(M,e)}ea!==null&&mo(ea,e),ta!==null&&mo(ta,e),na!==null&&mo(na,e),wr.forEach(n),kr.forEach(n);for(var a=0;a<la.length;a++){var u=la[a];u.blockedOn===e&&(u.blockedOn=null)}for(;0<la.length&&(a=la[0],a.blockedOn===null);)qg(a),a.blockedOn===null&&la.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(u=0;u<a.length;u+=3){var f=a[u],h=a[u+1],x=f[ve]||null;if(typeof h=="function")x||Gg(a);else if(x){var w=null;if(h&&h.hasAttribute("formAction")){if(f=h,x=h[ve]||null)w=x.formAction;else if(af(f)!==null)continue}else w=x.action;typeof w=="function"?a[u+1]=w:(a.splice(u,3),u-=3),Gg(a)}}}function Fg(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(x){return f=x})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),u||setTimeout(a,20)}function a(){if(!u&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){u=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function uf(e){this._internalRoot=e}go.prototype.render=uf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,u=yn();Og(a,u,e,n,null,null)},go.prototype.unmount=uf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Og(e.current,2,null,e,null,null),Ku(),n[we]=null}};function go(e){this._internalRoot=e}go.prototype.unstable_scheduleHydration=function(e){if(e){var n=he();e={blockedOn:null,target:e,priority:n};for(var a=0;a<la.length&&n!==0&&n<la[a].priority;a++);la.splice(a,0,e),a===0&&qg(e)}};var Vg=l.version;if(Vg!=="19.2.4")throw Error(r(527,Vg,"19.2.4"));te.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(n),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var qx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yo.isDisabled&&yo.supportsFiber)try{Lt=yo.inject(qx),nt=yo}catch{}}return jr.createRoot=function(e,n){if(!o(e))throw Error(r(299));var a=!1,u="",f=Pm,h=Jm,x=Wm;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(x=n.onRecoverableError)),n=Dg(e,1,!1,null,null,a,u,null,f,h,x,Fg),e[we]=n.current,Yc(e),new uf(n)},jr.hydrateRoot=function(e,n,a){if(!o(e))throw Error(r(299));var u=!1,f="",h=Pm,x=Jm,w=Wm,M=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(f=a.identifierPrefix),a.onUncaughtError!==void 0&&(h=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(M=a.formState)),n=Dg(e,1,!0,n,a??null,u,f,M,h,x,w,Fg),n.context=zg(null),a=n.current,u=yn(),u=Z(u),f=Gl(u),f.callback=null,Fl(a,f,u),a=u,n.current.lanes=a,Ml(n,a),Pn(n),e[we]=n.current,Yc(e),new go(n)},jr.version="19.2.4",jr}var ey;function Jx(){if(ey)return cf.exports;ey=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),cf.exports=Px(),cf.exports}var Wx=Jx();var Rv=t=>{throw TypeError(t)},eS=(t,l,i)=>l.has(t)||Rv("Cannot "+i),mf=(t,l,i)=>(eS(t,l,"read from private field"),i?i.call(t):l.get(t)),tS=(t,l,i)=>l.has(t)?Rv("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(t):l.set(t,i),ty="popstate";function nS(t={}){function l(r,o){let{pathname:s,search:c,hash:d}=r.location;return Yr("",{pathname:s,search:c,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function i(r,o){return typeof o=="string"?o:tl(o)}return aS(l,i,null,t)}function Be(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function Ct(t,l){if(!t){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function lS(){return Math.random().toString(36).substring(2,10)}function ny(t,l){return{usr:t.state,key:t.key,idx:l}}function Yr(t,l,i=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof l=="string"?da(l):l,state:i,key:l&&l.key||r||lS()}}function tl({pathname:t="/",search:l="",hash:i=""}){return l&&l!=="?"&&(t+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function da(t){let l={};if(t){let i=t.indexOf("#");i>=0&&(l.hash=t.substring(i),t=t.substring(0,i));let r=t.indexOf("?");r>=0&&(l.search=t.substring(r),t=t.substring(0,r)),t&&(l.pathname=t)}return l}function aS(t,l,i,r={}){let{window:o=document.defaultView,v5Compat:s=!1}=r,c=o.history,d="POP",p=null,m=y();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function y(){return(c.state||{idx:null}).idx}function g(){d="POP";let R=y(),C=R==null?null:R-m;m=R,p&&p({action:d,location:j.location,delta:C})}function b(R,C){d="PUSH";let A=Yr(j.location,R,C);m=y()+1;let D=ny(A,m),ee=j.createHref(A);try{c.pushState(D,"",ee)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;o.location.assign(ee)}s&&p&&p({action:d,location:j.location,delta:1})}function S(R,C){d="REPLACE";let A=Yr(j.location,R,C);m=y();let D=ny(A,m),ee=j.createHref(A);c.replaceState(D,"",ee),s&&p&&p({action:d,location:j.location,delta:0})}function E(R){return _v(R)}let j={get action(){return d},get location(){return t(o,c)},listen(R){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(ty,g),p=R,()=>{o.removeEventListener(ty,g),p=null}},createHref(R){return l(o,R)},createURL:E,encodeLocation(R){let C=E(R);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:b,replace:S,go(R){return c.go(R)}};return j}function _v(t,l=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Be(i,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:tl(t);return r=r.replace(/ $/,"%20"),!l&&r.startsWith("//")&&(r=i+r),new URL(r,i)}var Mr,ly=class{constructor(t){if(tS(this,Mr,new Map),t)for(let[l,i]of t)this.set(l,i)}get(t){if(mf(this,Mr).has(t))return mf(this,Mr).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,l){mf(this,Mr).set(t,l)}};Mr=new WeakMap;var iS=new Set(["lazy","caseSensitive","path","id","index","children"]);function rS(t){return iS.has(t)}var uS=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function oS(t){return uS.has(t)}function sS(t){return t.index===!0}function Gr(t,l,i=[],r={},o=!1){return t.map((s,c)=>{let d=[...i,String(c)],p=typeof s.id=="string"?s.id:d.join("-");if(Be(s.index!==!0||!s.children,"Cannot specify children on an index route"),Be(o||!r[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),sS(s)){let m={...s,id:p};return r[p]=ay(m,l(m)),m}else{let m={...s,id:p,children:void 0};return r[p]=ay(m,l(m)),s.children&&(m.children=Gr(s.children,l,d,r,o)),m}})}function ay(t,l){return Object.assign(t,{...l,...typeof l.lazy=="object"&&l.lazy!=null?{lazy:{...t.lazy,...l.lazy}}:{}})}function ua(t,l,i="/"){return Lr(t,l,i,!1)}function Lr(t,l,i,r){let o=typeof l=="string"?da(l):l,s=On(o.pathname||"/",i);if(s==null)return null;let c=Nv(t);fS(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let m=ES(s);d=xS(c[p],m,r)}return d}function cS(t,l){let{route:i,pathname:r,params:o}=t;return{id:i.id,pathname:r,params:o,data:l[i.id],loaderData:l[i.id],handle:i.handle}}function Nv(t,l=[],i=[],r="",o=!1){let s=(c,d,p=o,m)=>{let y={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(r)&&p)return;Be(y.relativePath.startsWith(r),`Absolute route path "${y.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(r.length)}let g=el([r,y.relativePath]),b=i.concat(y);c.children&&c.children.length>0&&(Be(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),Nv(c.children,l,b,g,p)),!(c.path==null&&!c.index)&&l.push({path:g,score:vS(g,c.index),routesMeta:b})};return t.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))s(c,d);else for(let p of Dv(c.path))s(c,d,!0,p)}),l}function Dv(t){let l=t.split("/");if(l.length===0)return[];let[i,...r]=l,o=i.endsWith("?"),s=i.replace(/\?$/,"");if(r.length===0)return o?[s,""]:[s];let c=Dv(r.join("/")),d=[];return d.push(...c.map(p=>p===""?s:[s,p].join("/"))),o&&d.push(...c),d.map(p=>t.startsWith("/")&&p===""?"/":p)}function fS(t){t.sort((l,i)=>l.score!==i.score?i.score-l.score:bS(l.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}var dS=/^:[\w-]+$/,hS=3,mS=2,pS=1,gS=10,yS=-2,iy=t=>t==="*";function vS(t,l){let i=t.split("/"),r=i.length;return i.some(iy)&&(r+=yS),l&&(r+=mS),i.filter(o=>!iy(o)).reduce((o,s)=>o+(dS.test(s)?hS:s===""?pS:gS),r)}function bS(t,l){return t.length===l.length&&t.slice(0,-1).every((r,o)=>r===l[o])?t[t.length-1]-l[l.length-1]:0}function xS(t,l,i=!1){let{routesMeta:r}=t,o={},s="/",c=[];for(let d=0;d<r.length;++d){let p=r[d],m=d===r.length-1,y=s==="/"?l:l.slice(s.length)||"/",g=Oo({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},y),b=p.route;if(!g&&m&&i&&!r[r.length-1].route.index&&(g=Oo({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!g)return null;Object.assign(o,g.params),c.push({params:o,pathname:el([s,g.pathname]),pathnameBase:CS(el([s,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(s=el([s,g.pathnameBase]))}return c}function Oo(t,l){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[i,r]=SS(t.path,t.caseSensitive,t.end),o=l.match(i);if(!o)return null;let s=o[0],c=s.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:r.reduce((m,{paramName:y,isOptional:g},b)=>{if(y==="*"){let E=d[b]||"";c=s.slice(0,s.length-E.length).replace(/(.)\/+$/,"$1")}const S=d[b];return g&&!S?m[y]=void 0:m[y]=(S||"").replace(/%2F/g,"/"),m},{}),pathname:s,pathnameBase:c,pattern:t}}function SS(t,l=!1,i=!0){Ct(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p)=>(r.push({paramName:d,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,l?void 0:"i"),r]}function ES(t){try{return t.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Ct(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),t}}function On(t,l){if(l==="/")return t;if(!t.toLowerCase().startsWith(l.toLowerCase()))return null;let i=l.endsWith("/")?l.length-1:l.length,r=t.charAt(i);return r&&r!=="/"?null:t.slice(i)||"/"}function wS({basename:t,pathname:l}){return l==="/"?t:el([t,l])}var zv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gd=t=>zv.test(t);function kS(t,l="/"){let{pathname:i,search:r="",hash:o=""}=typeof t=="string"?da(t):t,s;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?s=ry(i.substring(1),"/"):s=ry(i,l)):s=l,{pathname:s,search:TS(r),hash:jS(o)}}function ry(t,l){let i=l.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?i.length>1&&i.pop():o!=="."&&i.push(o)}),i.length>1?i.join("/"):"/"}function pf(t,l,i,r){return`Cannot include a '${t}' character in a manually specified \`to.${l}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Ov(t){return t.filter((l,i)=>i===0||l.route.path&&l.route.path.length>0)}function yd(t){let l=Ov(t);return l.map((i,r)=>r===l.length-1?i.pathname:i.pathnameBase)}function vd(t,l,i,r=!1){let o;typeof t=="string"?o=da(t):(o={...t},Be(!o.pathname||!o.pathname.includes("?"),pf("?","pathname","search",o)),Be(!o.pathname||!o.pathname.includes("#"),pf("#","pathname","hash",o)),Be(!o.search||!o.search.includes("#"),pf("#","search","hash",o)));let s=t===""||o.pathname==="",c=s?"/":o.pathname,d;if(c==null)d=i;else{let g=l.length-1;if(!r&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),g-=1;o.pathname=b.join("/")}d=g>=0?l[g]:"/"}let p=kS(o,d),m=c&&c!=="/"&&c.endsWith("/"),y=(s||c===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(m||y)&&(p.pathname+="/"),p}var el=t=>t.join("/").replace(/\/\/+/g,"/"),CS=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),TS=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,jS=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,Qr=class{constructor(t,l,i,r=!1){this.status=t,this.statusText=l||"",this.internal=r,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function Fr(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function $r(t){return t.map(l=>l.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Mv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Lv(t,l){let i=t;if(typeof i!="string"||!zv.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let r=i,o=!1;if(Mv)try{let s=new URL(window.location.href),c=i.startsWith("//")?new URL(s.protocol+i):new URL(i),d=On(c.pathname,l);c.origin===s.origin&&d!=null?i=d+c.search+c.hash:o=!0}catch{Ct(!1,`<Link to="${i}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:i}}var ca=Symbol("Uninstrumented");function AS(t,l){let i={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(o=>o({id:l.id,index:l.index,path:l.path,instrument(s){let c=Object.keys(i);for(let d of c)s[d]&&i[d].push(s[d])}}));let r={};if(typeof l.lazy=="function"&&i.lazy.length>0){let o=Ri(i.lazy,l.lazy,()=>{});o&&(r.lazy=o)}if(typeof l.lazy=="object"){let o=l.lazy;["middleware","loader","action"].forEach(s=>{let c=o[s],d=i[`lazy.${s}`];if(typeof c=="function"&&d.length>0){let p=Ri(d,c,()=>{});p&&(r.lazy=Object.assign(r.lazy||{},{[s]:p}))}})}return["loader","action"].forEach(o=>{let s=l[o];if(typeof s=="function"&&i[o].length>0){let c=s[ca]??s,d=Ri(i[o],c,(...p)=>uy(p[0]));d&&(o==="loader"&&c.hydrate===!0&&(d.hydrate=!0),d[ca]=c,r[o]=d)}}),l.middleware&&l.middleware.length>0&&i.middleware.length>0&&(r.middleware=l.middleware.map(o=>{let s=o[ca]??o,c=Ri(i.middleware,s,(...d)=>uy(d[0]));return c?(c[ca]=s,c):o})),r}function RS(t,l){let i={navigate:[],fetch:[]};if(l.forEach(r=>r({instrument(o){let s=Object.keys(o);for(let c of s)o[c]&&i[c].push(o[c])}})),i.navigate.length>0){let r=t.navigate[ca]??t.navigate,o=Ri(i.navigate,r,(...s)=>{let[c,d]=s;return{to:typeof c=="number"||typeof c=="string"?c:c?tl(c):".",...oy(t,d??{})}});o&&(o[ca]=r,t.navigate=o)}if(i.fetch.length>0){let r=t.fetch[ca]??t.fetch,o=Ri(i.fetch,r,(...s)=>{let[c,,d,p]=s;return{href:d??".",fetcherKey:c,...oy(t,p??{})}});o&&(o[ca]=r,t.fetch=o)}return t}function Ri(t,l,i){return t.length===0?null:async(...r)=>{let o=await Uv(t,i(...r),()=>l(...r),t.length-1);if(o.type==="error")throw o.value;return o.value}}async function Uv(t,l,i,r){let o=t[r],s;if(o){let c,d=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=Uv(t,l,i,r-1),s=await c,Be(s,"Expected a result"),s.type==="error"&&s.value instanceof Error?{status:"error",error:s.value}:{status:"success",error:void 0});try{await o(d,l)}catch(p){console.error("An instrumentation function threw an error:",p)}c||await d(),await c}else try{s={type:"success",value:await i()}}catch(c){s={type:"error",value:c}}return s||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function uy(t){let{request:l,context:i,params:r,unstable_pattern:o}=t;return{request:_S(l),params:{...r},unstable_pattern:o,context:NS(i)}}function oy(t,l){return{currentUrl:tl(t.state.location),..."formMethod"in l?{formMethod:l.formMethod}:{},..."formEncType"in l?{formEncType:l.formEncType}:{},..."formData"in l?{formData:l.formData}:{},..."body"in l?{body:l.body}:{}}}function _S(t){return{method:t.method,url:t.url,headers:{get:(...l)=>t.headers.get(...l)}}}function NS(t){if(zS(t)){let l={...t};return Object.freeze(l),l}else return{get:l=>t.get(l)}}var DS=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function zS(t){if(t===null||typeof t!="object")return!1;const l=Object.getPrototypeOf(t);return l===Object.prototype||l===null||Object.getOwnPropertyNames(l).sort().join("\0")===DS}var Bv=["POST","PUT","PATCH","DELETE"],OS=new Set(Bv),MS=["GET",...Bv],LS=new Set(MS),Hv=new Set([301,302,303,307,308]),US=new Set([307,308]),gf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},BS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ar={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},HS=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),qv="remix-router-transitions",Yv=Symbol("ResetLoaderData");function qS(t){const l=t.window?t.window:typeof window<"u"?window:void 0,i=typeof l<"u"&&typeof l.document<"u"&&typeof l.document.createElement<"u";Be(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=t.hydrationRouteProperties||[],o=t.mapRouteProperties||HS,s=o;if(t.unstable_instrumentations){let O=t.unstable_instrumentations;s=G=>({...o(G),...AS(O.map(Z=>Z.route).filter(Boolean),G)})}let c={},d=Gr(t.routes,s,void 0,c),p,m=t.basename||"/";m.startsWith("/")||(m=`/${m}`);let y=t.dataStrategy||IS,g={...t.future},b=null,S=new Set,E=null,j=null,R=null,C=t.hydrationData!=null,A=ua(d,t.history.location,m),D=!1,ee=null,$;if(A==null&&!t.patchRoutesOnNavigation){let O=Dn(404,{pathname:t.history.location.pathname}),{matches:G,route:Z}=vo(d);$=!0,A=G,ee={[Z.id]:O}}else if(A&&!t.hydrationData&&ba(A,d,t.history.location.pathname).active&&(A=null),A)if(A.some(O=>O.route.lazy))$=!1;else if(!A.some(O=>bd(O.route)))$=!0;else{let O=t.hydrationData?t.hydrationData.loaderData:null,G=t.hydrationData?t.hydrationData.errors:null;if(G){let Z=A.findIndex(se=>G[se.route.id]!==void 0);$=A.slice(0,Z+1).every(se=>!Gf(se.route,O,G))}else $=A.every(Z=>!Gf(Z.route,O,G))}else{$=!1,A=[];let O=ba(null,d,t.history.location.pathname);O.active&&O.matches&&(D=!0,A=O.matches)}let B,z={historyAction:t.history.action,location:t.history.location,matches:A,initialized:$,navigation:gf,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||ee,fetchers:new Map,blockers:new Map},le="POP",W=null,_=!1,F,q=!1,V=new Map,ne=null,K=!1,H=!1,te=new Set,ue=new Map,pe=0,N=-1,L=new Map,P=new Set,T=new Map,ce=new Map,be=new Set,xe=new Map,ze,ge=null;function _e(){if(b=t.history.listen(({action:O,location:G,delta:Z})=>{if(ze){ze(),ze=void 0;return}Ct(xe.size===0||Z!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let se=ga({currentLocation:z.location,nextLocation:G,historyAction:O});if(se&&Z!=null){let he=new Promise(ke=>{ze=ke});t.history.go(Z*-1),il(se,{state:"blocked",location:G,proceed(){il(se,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),he.then(()=>t.history.go(Z))},reset(){let ke=new Map(z.blockers);ke.set(se,Ar),yt({blockers:ke})}}),W?.resolve(),W=null;return}return Pt(O,G)}),i){sE(l,V);let O=()=>cE(l,V);l.addEventListener("pagehide",O),ne=()=>l.removeEventListener("pagehide",O)}return z.initialized||Pt("POP",z.location,{initialHydration:!0}),B}function Nt(){b&&b(),ne&&ne(),S.clear(),F&&F.abort(),z.fetchers.forEach((O,G)=>on(G)),z.blockers.forEach((O,G)=>lu(G))}function Ln(O){return S.add(O),()=>S.delete(O)}function yt(O,G={}){O.matches&&(O.matches=O.matches.map(he=>{let ke=c[he.route.id],ye=he.route;return ye.element!==ke.element||ye.errorElement!==ke.errorElement||ye.hydrateFallbackElement!==ke.hydrateFallbackElement?{...he,route:ke}:he})),z={...z,...O};let Z=[],se=[];z.fetchers.forEach((he,ke)=>{he.state==="idle"&&(be.has(ke)?Z.push(ke):se.push(ke))}),be.forEach(he=>{!z.fetchers.has(he)&&!ue.has(he)&&Z.push(he)}),[...S].forEach(he=>he(z,{deletedFetchers:Z,newErrors:O.errors??null,viewTransitionOpts:G.viewTransitionOpts,flushSync:G.flushSync===!0})),Z.forEach(he=>on(he)),se.forEach(he=>z.fetchers.delete(he))}function Un(O,G,{flushSync:Z}={}){let se=z.actionData!=null&&z.navigation.formMethod!=null&&It(z.navigation.formMethod)&&z.navigation.state==="loading"&&O.state?._isRedirect!==!0,he;G.actionData?Object.keys(G.actionData).length>0?he=G.actionData:he=null:se?he=z.actionData:he=null;let ke=G.loaderData?vy(z.loaderData,G.loaderData,G.matches||[],G.errors):z.loaderData,ye=z.blockers;ye.size>0&&(ye=new Map(ye),ye.forEach((Ae,Te)=>ye.set(Te,Ar)));let me=K?!1:au(O,G.matches||z.matches),ve=_===!0||z.navigation.formMethod!=null&&It(z.navigation.formMethod)&&O.state?._isRedirect!==!0;p&&(d=p,p=void 0),K||le==="POP"||(le==="PUSH"?t.history.push(O,O.state):le==="REPLACE"&&t.history.replace(O,O.state));let we;if(le==="POP"){let Ae=V.get(z.location.pathname);Ae&&Ae.has(O.pathname)?we={currentLocation:z.location,nextLocation:O}:V.has(O.pathname)&&(we={currentLocation:O,nextLocation:z.location})}else if(q){let Ae=V.get(z.location.pathname);Ae?Ae.add(O.pathname):(Ae=new Set([O.pathname]),V.set(z.location.pathname,Ae)),we={currentLocation:z.location,nextLocation:O}}yt({...G,actionData:he,loaderData:ke,historyAction:le,location:O,initialized:!0,navigation:gf,revalidation:"idle",restoreScrollPosition:me,preventScrollReset:ve,blockers:ye},{viewTransitionOpts:we,flushSync:Z===!0}),le="POP",_=!1,q=!1,K=!1,H=!1,W?.resolve(),W=null,ge?.resolve(),ge=null}async function Sn(O,G){if(W?.resolve(),W=null,typeof O=="number"){W||(W=Ey());let Ve=W.promise;return t.history.go(O),Ve}let Z=Yf(z.location,z.matches,m,O,G?.fromRouteId,G?.relative),{path:se,submission:he,error:ke}=sy(!1,Z,G),ye=z.location,me=Yr(z.location,se,G&&G.state);me={...me,...t.history.encodeLocation(me)};let ve=G&&G.replace!=null?G.replace:void 0,we="PUSH";ve===!0?we="REPLACE":ve===!1||he!=null&&It(he.formMethod)&&he.formAction===z.location.pathname+z.location.search&&(we="REPLACE");let Ae=G&&"preventScrollReset"in G?G.preventScrollReset===!0:void 0,Te=(G&&G.flushSync)===!0,Ke=ga({currentLocation:ye,nextLocation:me,historyAction:we});if(Ke){il(Ke,{state:"blocked",location:me,proceed(){il(Ke,{state:"proceeding",proceed:void 0,reset:void 0,location:me}),Sn(O,G)},reset(){let Ve=new Map(z.blockers);Ve.set(Ke,Ar),yt({blockers:Ve})}});return}await Pt(we,me,{submission:he,pendingError:ke,preventScrollReset:Ae,replace:G&&G.replace,enableViewTransition:G&&G.viewTransition,flushSync:Te,callSiteDefaultShouldRevalidate:G&&G.unstable_defaultShouldRevalidate})}function Nl(){ge||(ge=Ey()),de(),yt({revalidation:"loading"});let O=ge.promise;return z.navigation.state==="submitting"?O:z.navigation.state==="idle"?(Pt(z.historyAction,z.location,{startUninterruptedRevalidation:!0}),O):(Pt(le||z.historyAction,z.navigation.location,{overrideNavigation:z.navigation,enableViewTransition:q===!0}),O)}async function Pt(O,G,Z){F&&F.abort(),F=null,le=O,K=(Z&&Z.startUninterruptedRevalidation)===!0,va(z.location,z.matches),_=(Z&&Z.preventScrollReset)===!0,q=(Z&&Z.enableViewTransition)===!0;let se=p||d,he=Z&&Z.overrideNavigation,ke=Z?.initialHydration&&z.matches&&z.matches.length>0&&!D?z.matches:ua(se,G,m),ye=(Z&&Z.flushSync)===!0;if(ke&&z.initialized&&!H&&WS(z.location,G)&&!(Z&&Z.submission&&It(Z.submission.formMethod))){Un(G,{matches:ke},{flushSync:ye});return}let me=ba(ke,se,G.pathname);if(me.active&&me.matches&&(ke=me.matches),!ke){let{error:vt,notFoundMatches:bt,route:Ie}=zl(G.pathname);Un(G,{matches:bt,loaderData:{},errors:{[Ie.id]:vt}},{flushSync:ye});return}F=new AbortController;let ve=ji(t.history,G,F.signal,Z&&Z.submission),we=t.getContext?await t.getContext():new ly,Ae;if(Z&&Z.pendingError)Ae=[oa(ke).route.id,{type:"error",error:Z.pendingError}];else if(Z&&Z.submission&&It(Z.submission.formMethod)){let vt=await Va(ve,G,Z.submission,ke,we,me.active,Z&&Z.initialHydration===!0,{replace:Z.replace,flushSync:ye});if(vt.shortCircuited)return;if(vt.pendingActionResult){let[bt,Ie]=vt.pendingActionResult;if(bn(Ie)&&Fr(Ie.error)&&Ie.error.status===404){F=null,Un(G,{matches:vt.matches,loaderData:{},errors:{[bt]:Ie.error}});return}}ke=vt.matches||ke,Ae=vt.pendingActionResult,he=yf(G,Z.submission),ye=!1,me.active=!1,ve=ji(t.history,ve.url,ve.signal)}let{shortCircuited:Te,matches:Ke,loaderData:Ve,errors:gt}=await Ia(ve,G,ke,we,me.active,he,Z&&Z.submission,Z&&Z.fetcherSubmission,Z&&Z.replace,Z&&Z.initialHydration===!0,ye,Ae,Z&&Z.callSiteDefaultShouldRevalidate);Te||(F=null,Un(G,{matches:Ke||ke,...by(Ae),loaderData:Ve,errors:gt}))}async function Va(O,G,Z,se,he,ke,ye,me={}){de();let ve=uE(G,Z);if(yt({navigation:ve},{flushSync:me.flushSync===!0}),ke){let Te=await Ol(se,G.pathname,O.signal);if(Te.type==="aborted")return{shortCircuited:!0};if(Te.type==="error"){if(Te.partialMatches.length===0){let{matches:Ve,route:gt}=vo(d);return{matches:Ve,pendingActionResult:[gt.id,{type:"error",error:Te.error}]}}let Ke=oa(Te.partialMatches).route.id;return{matches:Te.partialMatches,pendingActionResult:[Ke,{type:"error",error:Te.error}]}}else if(Te.matches)se=Te.matches;else{let{notFoundMatches:Ke,error:Ve,route:gt}=zl(G.pathname);return{matches:Ke,pendingActionResult:[gt.id,{type:"error",error:Ve}]}}}let we,Ae=Ao(se,G);if(!Ae.route.action&&!Ae.route.lazy)we={type:"error",error:Dn(405,{method:O.method,pathname:G.pathname,routeId:Ae.route.id})};else{let Te=_i(s,c,O,se,Ae,ye?[]:r,he),Ke=await al(O,Te,he,null);if(we=Ke[Ae.route.id],!we){for(let Ve of se)if(Ke[Ve.route.id]){we=Ke[Ve.route.id];break}}if(O.signal.aborted)return{shortCircuited:!0}}if(qa(we)){let Te;return me&&me.replace!=null?Te=me.replace:Te=py(we.response.headers.get("Location"),new URL(O.url),m,t.history)===z.location.pathname+z.location.search,await pt(O,we,!0,{submission:Z,replace:Te}),{shortCircuited:!0}}if(bn(we)){let Te=oa(se,Ae.route.id);return(me&&me.replace)!==!0&&(le="PUSH"),{matches:se,pendingActionResult:[Te.route.id,we,Ae.route.id]}}return{matches:se,pendingActionResult:[Ae.route.id,we]}}async function Ia(O,G,Z,se,he,ke,ye,me,ve,we,Ae,Te,Ke){let Ve=ke||yf(G,ye),gt=ye||me||Sy(Ve),vt=!K&&!we;if(he){if(vt){let Et=ll(Te);yt({navigation:Ve,...Et!==void 0?{actionData:Et}:{}},{flushSync:Ae})}let Xe=await Ol(Z,G.pathname,O.signal);if(Xe.type==="aborted")return{shortCircuited:!0};if(Xe.type==="error"){if(Xe.partialMatches.length===0){let{matches:Yn,route:Bt}=vo(d);return{matches:Yn,loaderData:{},errors:{[Bt.id]:Xe.error}}}let Et=oa(Xe.partialMatches).route.id;return{matches:Xe.partialMatches,loaderData:{},errors:{[Et]:Xe.error}}}else if(Xe.matches)Z=Xe.matches;else{let{error:Et,notFoundMatches:Yn,route:Bt}=zl(G.pathname);return{matches:Yn,loaderData:{},errors:{[Bt.id]:Et}}}}let bt=p||d,{dsMatches:Ie,revalidatingFetchers:zt}=cy(O,se,s,c,t.history,z,Z,gt,G,we?[]:r,we===!0,H,te,be,T,P,bt,m,t.patchRoutesOnNavigation!=null,Te,Ke);if(N=++pe,!t.dataStrategy&&!Ie.some(Xe=>Xe.shouldLoad)&&!Ie.some(Xe=>Xe.route.middleware&&Xe.route.middleware.length>0)&&zt.length===0){let Xe=tt();return Un(G,{matches:Z,loaderData:{},errors:Te&&bn(Te[1])?{[Te[0]]:Te[1].error}:null,...by(Te),...Xe?{fetchers:new Map(z.fetchers)}:{}},{flushSync:Ae}),{shortCircuited:!0}}if(vt){let Xe={};if(!he){Xe.navigation=Ve;let Et=ll(Te);Et!==void 0&&(Xe.actionData=Et)}zt.length>0&&(Xe.fetchers=Dl(zt)),yt(Xe,{flushSync:Ae})}zt.forEach(Xe=>{nt(Xe.key),Xe.controller&&ue.set(Xe.key,Xe.controller)});let Jt=()=>zt.forEach(Xe=>nt(Xe.key));F&&F.signal.addEventListener("abort",Jt);let{loaderResults:ht,fetcherResults:Hn}=await ie(Ie,zt,O,se);if(O.signal.aborted)return{shortCircuited:!0};F&&F.signal.removeEventListener("abort",Jt),zt.forEach(Xe=>ue.delete(Xe.key));let cn=bo(ht);if(cn)return await pt(O,cn.result,!0,{replace:ve}),{shortCircuited:!0};if(cn=bo(Hn),cn)return P.add(cn.key),await pt(O,cn.result,!0,{replace:ve}),{shortCircuited:!0};let{loaderData:qn,errors:En}=yy(z,Z,ht,Te,zt,Hn);we&&z.errors&&(En={...z.errors,...En});let ul=tt(),xa=Bn(N),Sa=ul||xa||zt.length>0;return{matches:Z,loaderData:qn,errors:En,...Sa?{fetchers:new Map(z.fetchers)}:{}}}function ll(O){if(O&&!bn(O[1]))return{[O[0]]:O[1].data};if(z.actionData)return Object.keys(z.actionData).length===0?null:z.actionData}function Dl(O){return O.forEach(G=>{let Z=z.fetchers.get(G.key),se=Rr(void 0,Z?Z.data:void 0);z.fetchers.set(G.key,se)}),new Map(z.fetchers)}async function pa(O,G,Z,se){nt(O);let he=(se&&se.flushSync)===!0,ke=p||d,ye=Yf(z.location,z.matches,m,Z,G,se?.relative),me=ua(ke,ye,m),ve=ba(me,ke,ye);if(ve.active&&ve.matches&&(me=ve.matches),!me){De(O,G,Dn(404,{pathname:ye}),{flushSync:he});return}let{path:we,submission:Ae,error:Te}=sy(!0,ye,se);if(Te){De(O,G,Te,{flushSync:he});return}let Ke=t.getContext?await t.getContext():new ly,Ve=(se&&se.preventScrollReset)===!0;if(Ae&&It(Ae.formMethod)){await Li(O,G,we,me,Ke,ve.active,he,Ve,Ae,se&&se.unstable_defaultShouldRevalidate);return}T.set(O,{routeId:G,path:we}),await Ui(O,G,we,me,Ke,ve.active,he,Ve,Ae)}async function Li(O,G,Z,se,he,ke,ye,me,ve,we){de(),T.delete(O);let Ae=z.fetchers.get(O);Ce(O,oE(ve,Ae),{flushSync:ye});let Te=new AbortController,Ke=ji(t.history,Z,Te.signal,ve);if(ke){let Qe=await Ol(se,new URL(Ke.url).pathname,Ke.signal,O);if(Qe.type==="aborted")return;if(Qe.type==="error"){De(O,G,Qe.error,{flushSync:ye});return}else if(Qe.matches)se=Qe.matches;else{De(O,G,Dn(404,{pathname:Z}),{flushSync:ye});return}}let Ve=Ao(se,Z);if(!Ve.route.action&&!Ve.route.lazy){let Qe=Dn(405,{method:ve.formMethod,pathname:Z,routeId:G});De(O,G,Qe,{flushSync:ye});return}ue.set(O,Te);let gt=pe,vt=_i(s,c,Ke,se,Ve,r,he),bt=await al(Ke,vt,he,O),Ie=bt[Ve.route.id];if(!Ie){for(let Qe of vt)if(bt[Qe.route.id]){Ie=bt[Qe.route.id];break}}if(Ke.signal.aborted){ue.get(O)===Te&&ue.delete(O);return}if(be.has(O)){if(qa(Ie)||bn(Ie)){Ce(O,jl(void 0));return}}else{if(qa(Ie))if(ue.delete(O),N>gt){Ce(O,jl(void 0));return}else return P.add(O),Ce(O,Rr(ve)),pt(Ke,Ie,!1,{fetcherSubmission:ve,preventScrollReset:me});if(bn(Ie)){De(O,G,Ie.error);return}}let zt=z.navigation.location||z.location,Jt=ji(t.history,zt,Te.signal),ht=p||d,Hn=z.navigation.state!=="idle"?ua(ht,z.navigation.location,m):z.matches;Be(Hn,"Didn't find any matches after fetcher action");let cn=++pe;L.set(O,cn);let qn=Rr(ve,Ie.data);z.fetchers.set(O,qn);let{dsMatches:En,revalidatingFetchers:ul}=cy(Jt,he,s,c,t.history,z,Hn,ve,zt,r,!1,H,te,be,T,P,ht,m,t.patchRoutesOnNavigation!=null,[Ve.route.id,Ie],we);ul.filter(Qe=>Qe.key!==O).forEach(Qe=>{let Ea=Qe.key,ru=z.fetchers.get(Ea),Bi=Rr(void 0,ru?ru.data:void 0);z.fetchers.set(Ea,Bi),nt(Ea),Qe.controller&&ue.set(Ea,Qe.controller)}),yt({fetchers:new Map(z.fetchers)});let xa=()=>ul.forEach(Qe=>nt(Qe.key));Te.signal.addEventListener("abort",xa);let{loaderResults:Sa,fetcherResults:Xe}=await ie(En,ul,Jt,he);if(Te.signal.aborted)return;if(Te.signal.removeEventListener("abort",xa),L.delete(O),ue.delete(O),ul.forEach(Qe=>ue.delete(Qe.key)),z.fetchers.has(O)){let Qe=jl(Ie.data);z.fetchers.set(O,Qe)}let Et=bo(Sa);if(Et)return pt(Jt,Et.result,!1,{preventScrollReset:me});if(Et=bo(Xe),Et)return P.add(Et.key),pt(Jt,Et.result,!1,{preventScrollReset:me});let{loaderData:Yn,errors:Bt}=yy(z,Hn,Sa,void 0,ul,Xe);Bn(cn),z.navigation.state==="loading"&&cn>N?(Be(le,"Expected pending action"),F&&F.abort(),Un(z.navigation.location,{matches:Hn,loaderData:Yn,errors:Bt,fetchers:new Map(z.fetchers)})):(yt({errors:Bt,loaderData:vy(z.loaderData,Yn,Hn,Bt),fetchers:new Map(z.fetchers)}),H=!1)}async function Ui(O,G,Z,se,he,ke,ye,me,ve){let we=z.fetchers.get(O);Ce(O,Rr(ve,we?we.data:void 0),{flushSync:ye});let Ae=new AbortController,Te=ji(t.history,Z,Ae.signal);if(ke){let Ie=await Ol(se,new URL(Te.url).pathname,Te.signal,O);if(Ie.type==="aborted")return;if(Ie.type==="error"){De(O,G,Ie.error,{flushSync:ye});return}else if(Ie.matches)se=Ie.matches;else{De(O,G,Dn(404,{pathname:Z}),{flushSync:ye});return}}let Ke=Ao(se,Z);ue.set(O,Ae);let Ve=pe,gt=_i(s,c,Te,se,Ke,r,he),bt=(await al(Te,gt,he,O))[Ke.route.id];if(ue.get(O)===Ae&&ue.delete(O),!Te.signal.aborted){if(be.has(O)){Ce(O,jl(void 0));return}if(qa(bt))if(N>Ve){Ce(O,jl(void 0));return}else{P.add(O),await pt(Te,bt,!1,{preventScrollReset:me});return}if(bn(bt)){De(O,G,bt.error);return}Ce(O,jl(bt.data))}}async function pt(O,G,Z,{submission:se,fetcherSubmission:he,preventScrollReset:ke,replace:ye}={}){Z||(W?.resolve(),W=null),G.response.headers.has("X-Remix-Revalidate")&&(H=!0);let me=G.response.headers.get("Location");Be(me,"Expected a Location header on the redirect Response"),me=py(me,new URL(O.url),m,t.history);let ve=Yr(z.location,me,{_isRedirect:!0});if(i){let gt=!1;if(G.response.headers.has("X-Remix-Reload-Document"))gt=!0;else if(gd(me)){const vt=_v(me,!0);gt=vt.origin!==l.location.origin||On(vt.pathname,m)==null}if(gt){ye?l.location.replace(me):l.location.assign(me);return}}F=null;let we=ye===!0||G.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ae,formAction:Te,formEncType:Ke}=z.navigation;!se&&!he&&Ae&&Te&&Ke&&(se=Sy(z.navigation));let Ve=se||he;if(US.has(G.response.status)&&Ve&&It(Ve.formMethod))await Pt(we,ve,{submission:{...Ve,formAction:me},preventScrollReset:ke||_,enableViewTransition:Z?q:void 0});else{let gt=yf(ve,se);await Pt(we,ve,{overrideNavigation:gt,fetcherSubmission:he,preventScrollReset:ke||_,enableViewTransition:Z?q:void 0})}}async function al(O,G,Z,se){let he,ke={};try{he=await QS(y,O,G,se,Z,!1)}catch(ye){return G.filter(me=>me.shouldLoad).forEach(me=>{ke[me.route.id]={type:"error",error:ye}}),ke}if(O.signal.aborted)return ke;if(!It(O.method))for(let ye of G){if(he[ye.route.id]?.type==="error")break;!he.hasOwnProperty(ye.route.id)&&!z.loaderData.hasOwnProperty(ye.route.id)&&(!z.errors||!z.errors.hasOwnProperty(ye.route.id))&&ye.shouldCallHandler()&&(he[ye.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ye.route.id}`)})}for(let[ye,me]of Object.entries(he))if(lE(me)){let ve=me.result;ke[ye]={type:"redirect",response:PS(ve,O,ye,G,m)}}else ke[ye]=await ZS(me);return ke}async function ie(O,G,Z,se){let he=al(Z,O,se,null),ke=Promise.all(G.map(async ve=>{if(ve.matches&&ve.match&&ve.request&&ve.controller){let Ae=(await al(ve.request,ve.matches,se,ve.key))[ve.match.route.id];return{[ve.key]:Ae}}else return Promise.resolve({[ve.key]:{type:"error",error:Dn(404,{pathname:ve.path})}})})),ye=await he,me=(await ke).reduce((ve,we)=>Object.assign(ve,we),{});return{loaderResults:ye,fetcherResults:me}}function de(){H=!0,T.forEach((O,G)=>{ue.has(G)&&te.add(G),nt(G)})}function Ce(O,G,Z={}){z.fetchers.set(O,G),yt({fetchers:new Map(z.fetchers)},{flushSync:(Z&&Z.flushSync)===!0})}function De(O,G,Z,se={}){let he=oa(z.matches,G);on(O),yt({errors:{[he.route.id]:Z},fetchers:new Map(z.fetchers)},{flushSync:(se&&se.flushSync)===!0})}function Pe(O){return ce.set(O,(ce.get(O)||0)+1),be.has(O)&&be.delete(O),z.fetchers.get(O)||BS}function $t(O,G){nt(O,G?.reason),Ce(O,jl(null))}function on(O){let G=z.fetchers.get(O);ue.has(O)&&!(G&&G.state==="loading"&&L.has(O))&&nt(O),T.delete(O),L.delete(O),P.delete(O),be.delete(O),te.delete(O),z.fetchers.delete(O)}function Lt(O){let G=(ce.get(O)||0)-1;G<=0?(ce.delete(O),be.add(O)):ce.set(O,G),yt({fetchers:new Map(z.fetchers)})}function nt(O,G){let Z=ue.get(O);Z&&(Z.abort(G),ue.delete(O))}function Ut(O){for(let G of O){let Z=Pe(G),se=jl(Z.data);z.fetchers.set(G,se)}}function tt(){let O=[],G=!1;for(let Z of P){let se=z.fetchers.get(Z);Be(se,`Expected fetcher: ${Z}`),se.state==="loading"&&(P.delete(Z),O.push(Z),G=!0)}return Ut(O),G}function Bn(O){let G=[];for(let[Z,se]of L)if(se<O){let he=z.fetchers.get(Z);Be(he,`Expected fetcher: ${Z}`),he.state==="loading"&&(nt(Z),L.delete(Z),G.push(Z))}return Ut(G),G.length>0}function sn(O,G){let Z=z.blockers.get(O)||Ar;return xe.get(O)!==G&&xe.set(O,G),Z}function lu(O){z.blockers.delete(O),xe.delete(O)}function il(O,G){let Z=z.blockers.get(O)||Ar;Be(Z.state==="unblocked"&&G.state==="blocked"||Z.state==="blocked"&&G.state==="blocked"||Z.state==="blocked"&&G.state==="proceeding"||Z.state==="blocked"&&G.state==="unblocked"||Z.state==="proceeding"&&G.state==="unblocked",`Invalid blocker state transition: ${Z.state} -> ${G.state}`);let se=new Map(z.blockers);se.set(O,G),yt({blockers:se})}function ga({currentLocation:O,nextLocation:G,historyAction:Z}){if(xe.size===0)return;xe.size>1&&Ct(!1,"A router only supports one blocker at a time");let se=Array.from(xe.entries()),[he,ke]=se[se.length-1],ye=z.blockers.get(he);if(!(ye&&ye.state==="proceeding")&&ke({currentLocation:O,nextLocation:G,historyAction:Z}))return he}function zl(O){let G=Dn(404,{pathname:O}),Z=p||d,{matches:se,route:he}=vo(Z);return{notFoundMatches:se,route:he,error:G}}function rl(O,G,Z){if(E=O,R=G,j=Z||null,!C&&z.navigation===gf){C=!0;let se=au(z.location,z.matches);se!=null&&yt({restoreScrollPosition:se})}return()=>{E=null,R=null,j=null}}function ya(O,G){return j&&j(O,G.map(se=>cS(se,z.loaderData)))||O.key}function va(O,G){if(E&&R){let Z=ya(O,G);E[Z]=R()}}function au(O,G){if(E){let Z=ya(O,G),se=E[Z];if(typeof se=="number")return se}return null}function ba(O,G,Z){if(t.patchRoutesOnNavigation)if(O){if(Object.keys(O[0].params).length>0)return{active:!0,matches:Lr(G,Z,m,!0)}}else return{active:!0,matches:Lr(G,Z,m,!0)||[]};return{active:!1,matches:null}}async function Ol(O,G,Z,se){if(!t.patchRoutesOnNavigation)return{type:"success",matches:O};let he=O;for(;;){let ke=p==null,ye=p||d,me=c;try{await t.patchRoutesOnNavigation({signal:Z,path:G,matches:he,fetcherKey:se,patch:(Ae,Te)=>{Z.aborted||fy(Ae,Te,ye,me,s,!1)}})}catch(Ae){return{type:"error",error:Ae,partialMatches:he}}finally{ke&&!Z.aborted&&(d=[...d])}if(Z.aborted)return{type:"aborted"};let ve=ua(ye,G,m),we=null;if(ve){if(Object.keys(ve[0].params).length===0)return{type:"success",matches:ve};if(we=Lr(ye,G,m,!0),!(we&&he.length<we.length&&Ml(he,we.slice(0,he.length))))return{type:"success",matches:ve}}if(we||(we=Lr(ye,G,m,!0)),!we||Ml(he,we))return{type:"success",matches:null};he=we}}function Ml(O,G){return O.length===G.length&&O.every((Z,se)=>Z.route.id===G[se].route.id)}function es(O){c={},p=Gr(O,s,void 0,c)}function iu(O,G,Z=!1){let se=p==null;fy(O,G,p||d,c,s,Z),se&&(d=[...d],yt({}))}return B={get basename(){return m},get future(){return g},get state(){return z},get routes(){return d},get window(){return l},initialize:_e,subscribe:Ln,enableScrollRestoration:rl,navigate:Sn,fetch:pa,revalidate:Nl,createHref:O=>t.history.createHref(O),encodeLocation:O=>t.history.encodeLocation(O),getFetcher:Pe,resetFetcher:$t,deleteFetcher:Lt,dispose:Nt,getBlocker:sn,deleteBlocker:lu,patchRoutes:iu,_internalFetchControllers:ue,_internalSetRoutes:es,_internalSetStateDoNotUseOrYouWillBreakYourApp(O){yt(O)}},t.unstable_instrumentations&&(B=RS(B,t.unstable_instrumentations.map(O=>O.router).filter(Boolean))),B}function YS(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Yf(t,l,i,r,o,s){let c,d;if(o){c=[];for(let m of l)if(c.push(m),m.route.id===o){d=m;break}}else c=l,d=l[l.length-1];let p=vd(r||".",yd(c),On(t.pathname,i)||t.pathname,s==="path");if(r==null&&(p.search=t.search,p.hash=t.hash),(r==null||r===""||r===".")&&d){let m=Sd(p.search);if(d.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&m){let y=new URLSearchParams(p.search),g=y.getAll("index");y.delete("index"),g.filter(S=>S).forEach(S=>y.append("index",S));let b=y.toString();p.search=b?`?${b}`:""}}return i!=="/"&&(p.pathname=wS({basename:i,pathname:p.pathname})),tl(p)}function sy(t,l,i){if(!i||!YS(i))return{path:l};if(i.formMethod&&!rE(i.formMethod))return{path:l,error:Dn(405,{method:i.formMethod})};let r=()=>({path:l,error:Dn(400,{type:"invalid-body"})}),s=(i.formMethod||"get").toUpperCase(),c=Qv(l);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!It(s))return r();let g=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((b,[S,E])=>`${b}${S}=${E}
10
+ `,""):String(i.body);return{path:l,submission:{formMethod:s,formAction:c,formEncType:i.formEncType,formData:void 0,json:void 0,text:g}}}else if(i.formEncType==="application/json"){if(!It(s))return r();try{let g=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:l,submission:{formMethod:s,formAction:c,formEncType:i.formEncType,formData:void 0,json:g,text:void 0}}}catch{return r()}}}Be(typeof FormData=="function","FormData is not available in this environment");let d,p;if(i.formData)d=Vf(i.formData),p=i.formData;else if(i.body instanceof FormData)d=Vf(i.body),p=i.body;else if(i.body instanceof URLSearchParams)d=i.body,p=gy(d);else if(i.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(i.body),p=gy(d)}catch{return r()}let m={formMethod:s,formAction:c,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(It(m.formMethod))return{path:l,submission:m};let y=da(l);return t&&y.search&&Sd(y.search)&&d.append("index",""),y.search=`?${d}`,{path:tl(y),submission:m}}function cy(t,l,i,r,o,s,c,d,p,m,y,g,b,S,E,j,R,C,A,D,ee){let $=D?bn(D[1])?D[1].error:D[1].data:void 0,B=o.createURL(s.location),z=o.createURL(p),le;if(y&&s.errors){let K=Object.keys(s.errors)[0];le=c.findIndex(H=>H.route.id===K)}else if(D&&bn(D[1])){let K=D[0];le=c.findIndex(H=>H.route.id===K)-1}let W=D?D[1].statusCode:void 0,_=W&&W>=400,F={currentUrl:B,currentParams:s.matches[0]?.params||{},nextUrl:z,nextParams:c[0].params,...d,actionResult:$,actionStatus:W},q=$r(c),V=c.map((K,H)=>{let{route:te}=K,ue=null;if(le!=null&&H>le?ue=!1:te.lazy?ue=!0:bd(te)?y?ue=Gf(te,s.loaderData,s.errors):GS(s.loaderData,s.matches[H],K)&&(ue=!0):ue=!1,ue!==null)return Ff(i,r,t,q,K,m,l,ue);let pe=!1;typeof ee=="boolean"?pe=ee:_?pe=!1:(g||B.pathname+B.search===z.pathname+z.search||B.search!==z.search||FS(s.matches[H],K))&&(pe=!0);let N={...F,defaultShouldRevalidate:pe},L=Ur(K,N);return Ff(i,r,t,q,K,m,l,L,N,ee)}),ne=[];return E.forEach((K,H)=>{if(y||!c.some(ce=>ce.route.id===K.routeId)||S.has(H))return;let te=s.fetchers.get(H),ue=te&&te.state!=="idle"&&te.data===void 0,pe=ua(R,K.path,C);if(!pe){if(A&&ue)return;ne.push({key:H,routeId:K.routeId,path:K.path,matches:null,match:null,request:null,controller:null});return}if(j.has(H))return;let N=Ao(pe,K.path),L=new AbortController,P=ji(o,K.path,L.signal),T=null;if(b.has(H))b.delete(H),T=_i(i,r,P,pe,N,m,l);else if(ue)g&&(T=_i(i,r,P,pe,N,m,l));else{let ce;typeof ee=="boolean"?ce=ee:_?ce=!1:ce=g;let be={...F,defaultShouldRevalidate:ce};Ur(N,be)&&(T=_i(i,r,P,pe,N,m,l,be))}T&&ne.push({key:H,routeId:K.routeId,path:K.path,matches:T,match:N,request:P,controller:L})}),{dsMatches:V,revalidatingFetchers:ne}}function bd(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function Gf(t,l,i){if(t.lazy)return!0;if(!bd(t))return!1;let r=l!=null&&t.id in l,o=i!=null&&i[t.id]!==void 0;return!r&&o?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!r&&!o}function GS(t,l,i){let r=!l||i.route.id!==l.route.id,o=!t.hasOwnProperty(i.route.id);return r||o}function FS(t,l){let i=t.route.path;return t.pathname!==l.pathname||i!=null&&i.endsWith("*")&&t.params["*"]!==l.params["*"]}function Ur(t,l){if(t.route.shouldRevalidate){let i=t.route.shouldRevalidate(l);if(typeof i=="boolean")return i}return l.defaultShouldRevalidate}function fy(t,l,i,r,o,s){let c;if(t){let m=r[t];Be(m,`No route found to patch children into: routeId = ${t}`),m.children||(m.children=[]),c=m.children}else c=i;let d=[],p=[];if(l.forEach(m=>{let y=c.find(g=>Gv(m,g));y?p.push({existingRoute:y,newRoute:m}):d.push(m)}),d.length>0){let m=Gr(d,o,[t||"_","patch",String(c?.length||"0")],r);c.push(...m)}if(s&&p.length>0)for(let m=0;m<p.length;m++){let{existingRoute:y,newRoute:g}=p[m],b=y,[S]=Gr([g],o,[],{},!0);Object.assign(b,{element:S.element?S.element:b.element,errorElement:S.errorElement?S.errorElement:b.errorElement,hydrateFallbackElement:S.hydrateFallbackElement?S.hydrateFallbackElement:b.hydrateFallbackElement})}}function Gv(t,l){return"id"in t&&"id"in l&&t.id===l.id?!0:t.index===l.index&&t.path===l.path&&t.caseSensitive===l.caseSensitive?(!t.children||t.children.length===0)&&(!l.children||l.children.length===0)?!0:t.children.every((i,r)=>l.children?.some(o=>Gv(i,o))):!1}var dy=new WeakMap,Fv=({key:t,route:l,manifest:i,mapRouteProperties:r})=>{let o=i[l.id];if(Be(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let s=o.lazy[t];if(!s)return;let c=dy.get(o);c||(c={},dy.set(o,c));let d=c[t];if(d)return d;let p=(async()=>{let m=rS(t),g=o[t]!==void 0&&t!=="hasErrorBoundary";if(m)Ct(!m,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),c[t]=Promise.resolve();else if(g)Ct(!1,`Route "${o.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let b=await s();b!=null&&(Object.assign(o,{[t]:b}),Object.assign(o,r(o)))}typeof o.lazy=="object"&&(o.lazy[t]=void 0,Object.values(o.lazy).every(b=>b===void 0)&&(o.lazy=void 0))})();return c[t]=p,p},hy=new WeakMap;function VS(t,l,i,r,o){let s=i[t.id];if(Be(s,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let y=hy.get(s);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let g=(async()=>{Be(typeof t.lazy=="function","No lazy route function found");let b=await t.lazy(),S={};for(let E in b){let j=b[E];if(j===void 0)continue;let R=oS(E),A=s[E]!==void 0&&E!=="hasErrorBoundary";R?Ct(!R,"Route property "+E+" is not a supported property to be returned from a lazy route function. This property will be ignored."):A?Ct(!A,`Route "${s.id}" has a static property "${E}" defined but its lazy function is also returning a value for this property. The lazy route property "${E}" will be ignored.`):S[E]=j}Object.assign(s,S),Object.assign(s,{...r(s),lazy:void 0})})();return hy.set(s,g),g.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:g}}let c=Object.keys(t.lazy),d=[],p;for(let y of c){if(o&&o.includes(y))continue;let g=Fv({key:y,route:t,manifest:i,mapRouteProperties:r});g&&(d.push(g),y===l&&(p=g))}let m=d.length>0?Promise.all(d).then(()=>{}):void 0;return m?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function my(t){let l=t.matches.filter(o=>o.shouldLoad),i={};return(await Promise.all(l.map(o=>o.resolve()))).forEach((o,s)=>{i[l[s].route.id]=o}),i}async function IS(t){return t.matches.some(l=>l.route.middleware)?Vv(t,()=>my(t)):my(t)}function Vv(t,l){return XS(t,l,r=>{if(iE(r))throw r;return r},tE,i);function i(r,o,s){if(s)return Promise.resolve(Object.assign(s.value,{[o]:{type:"error",result:r}}));{let{matches:c}=t,d=Math.min(Math.max(c.findIndex(m=>m.route.id===o),0),Math.max(c.findIndex(m=>m.shouldCallHandler()),0)),p=oa(c,c[d].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:r}})}}}async function XS(t,l,i,r,o){let{matches:s,request:c,params:d,context:p,unstable_pattern:m}=t,y=s.flatMap(b=>b.route.middleware?b.route.middleware.map(S=>[b.route.id,S]):[]);return await Iv({request:c,params:d,context:p,unstable_pattern:m},y,l,i,r,o)}async function Iv(t,l,i,r,o,s,c=0){let{request:d}=t;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let p=l[c];if(!p)return await i();let[m,y]=p,g,b=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");try{return g={value:await Iv(t,l,i,r,o,s,c+1)},g.value}catch(S){return g={value:await s(S,m,g)},g.value}};try{let S=await y(t,b),E=S!=null?r(S):void 0;return o(E)?E:g?E??g.value:(g={value:await b()},g.value)}catch(S){return await s(S,m,g)}}function Xv(t,l,i,r,o){let s=Fv({key:"middleware",route:r.route,manifest:l,mapRouteProperties:t}),c=VS(r.route,It(i.method)?"action":"loader",l,t,o);return{middleware:s,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function Ff(t,l,i,r,o,s,c,d,p=null,m){let y=!1,g=Xv(t,l,i,o,s);return{...o,_lazyPromises:g,shouldLoad:d,shouldRevalidateArgs:p,shouldCallHandler(b){return y=!0,p?typeof m=="boolean"?Ur(o,{...p,defaultShouldRevalidate:m}):typeof b=="boolean"?Ur(o,{...p,defaultShouldRevalidate:b}):Ur(o,p):d},resolve(b){let{lazy:S,loader:E,middleware:j}=o.route,R=y||d||b&&!It(i.method)&&(S||E),C=j&&j.length>0&&!E&&!S;return R&&(It(i.method)||!C)?$S({request:i,unstable_pattern:r,match:o,lazyHandlerPromise:g?.handler,lazyRoutePromise:g?.route,handlerOverride:b,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function _i(t,l,i,r,o,s,c,d=null){return r.map(p=>p.route.id!==o.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:d,shouldCallHandler:()=>!1,_lazyPromises:Xv(t,l,i,p,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Ff(t,l,i,$r(r),p,s,c,!0,d))}async function QS(t,l,i,r,o,s){i.some(m=>m._lazyPromises?.middleware)&&await Promise.all(i.map(m=>m._lazyPromises?.middleware));let c={request:l,unstable_pattern:$r(i),params:i[0].params,context:o,matches:i},p=await t({...c,fetcherKey:r,runClientMiddleware:m=>{let y=c;return Vv(y,()=>m({...y,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(i.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return p}async function $S({request:t,unstable_pattern:l,match:i,lazyHandlerPromise:r,lazyRoutePromise:o,handlerOverride:s,scopedContext:c}){let d,p,m=It(t.method),y=m?"action":"loader",g=b=>{let S,E=new Promise((C,A)=>S=A);p=()=>S(),t.signal.addEventListener("abort",p);let j=C=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${y}" [routeId: ${i.route.id}]`)):b({request:t,unstable_pattern:l,params:i.params,context:c},...C!==void 0?[C]:[]),R=(async()=>{try{return{type:"data",result:await(s?s(A=>j(A)):j())}}catch(C){return{type:"error",result:C}}})();return Promise.race([R,E])};try{let b=m?i.route.action:i.route.loader;if(r||o)if(b){let S,[E]=await Promise.all([g(b).catch(j=>{S=j}),r,o]);if(S!==void 0)throw S;d=E}else{await r;let S=m?i.route.action:i.route.loader;if(S)[d]=await Promise.all([g(S),o]);else if(y==="action"){let E=new URL(t.url),j=E.pathname+E.search;throw Dn(405,{method:t.method,pathname:j,routeId:i.route.id})}else return{type:"data",result:void 0}}else if(b)d=await g(b);else{let S=new URL(t.url),E=S.pathname+S.search;throw Dn(404,{pathname:E})}}catch(b){return{type:"error",result:b}}finally{p&&t.signal.removeEventListener("abort",p)}return d}async function KS(t){let l=t.headers.get("Content-Type");return l&&/\bapplication\/json\b/.test(l)?t.body==null?null:t.json():t.text()}async function ZS(t){let{result:l,type:i}=t;if(xd(l)){let r;try{r=await KS(l)}catch(o){return{type:"error",error:o}}return i==="error"?{type:"error",error:new Qr(l.status,l.statusText,r),statusCode:l.status,headers:l.headers}:{type:"data",data:r,statusCode:l.status,headers:l.headers}}return i==="error"?xy(l)?l.data instanceof Error?{type:"error",error:l.data,statusCode:l.init?.status,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"error",error:eE(l),statusCode:Fr(l)?l.status:void 0,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"error",error:l,statusCode:Fr(l)?l.status:void 0}:xy(l)?{type:"data",data:l.data,statusCode:l.init?.status,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"data",data:l}}function PS(t,l,i,r,o){let s=t.headers.get("Location");if(Be(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!gd(s)){let c=r.slice(0,r.findIndex(d=>d.route.id===i)+1);s=Yf(new URL(l.url),c,o,s),t.headers.set("Location",s)}return t}function py(t,l,i,r){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(gd(t)){let s=t,c=s.startsWith("//")?new URL(l.protocol+s):new URL(s);if(o.includes(c.protocol))throw new Error("Invalid redirect location");let d=On(c.pathname,i)!=null;if(c.origin===l.origin&&d)return c.pathname+c.search+c.hash}try{let s=r.createURL(t);if(o.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return t}function ji(t,l,i,r){let o=t.createURL(Qv(l)).toString(),s={signal:i};if(r&&It(r.formMethod)){let{formMethod:c,formEncType:d}=r;s.method=c.toUpperCase(),d==="application/json"?(s.headers=new Headers({"Content-Type":d}),s.body=JSON.stringify(r.json)):d==="text/plain"?s.body=r.text:d==="application/x-www-form-urlencoded"&&r.formData?s.body=Vf(r.formData):s.body=r.formData}return new Request(o,s)}function Vf(t){let l=new URLSearchParams;for(let[i,r]of t.entries())l.append(i,typeof r=="string"?r:r.name);return l}function gy(t){let l=new FormData;for(let[i,r]of t.entries())l.append(i,r);return l}function JS(t,l,i,r=!1,o=!1){let s={},c=null,d,p=!1,m={},y=i&&bn(i[1])?i[1].error:void 0;return t.forEach(g=>{if(!(g.route.id in l))return;let b=g.route.id,S=l[b];if(Be(!qa(S),"Cannot handle redirect results in processLoaderData"),bn(S)){let E=S.error;if(y!==void 0&&(E=y,y=void 0),c=c||{},o)c[b]=E;else{let j=oa(t,b);c[j.route.id]==null&&(c[j.route.id]=E)}r||(s[b]=Yv),p||(p=!0,d=Fr(S.error)?S.error.status:500),S.headers&&(m[b]=S.headers)}else s[b]=S.data,S.statusCode&&S.statusCode!==200&&!p&&(d=S.statusCode),S.headers&&(m[b]=S.headers)}),y!==void 0&&i&&(c={[i[0]]:y},i[2]&&(s[i[2]]=void 0)),{loaderData:s,errors:c,statusCode:d||200,loaderHeaders:m}}function yy(t,l,i,r,o,s){let{loaderData:c,errors:d}=JS(l,i,r);return o.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:y,controller:g}=p;if(g&&g.signal.aborted)return;let b=s[m];if(Be(b,"Did not find corresponding fetcher result"),bn(b)){let S=oa(t.matches,y?.route.id);d&&d[S.route.id]||(d={...d,[S.route.id]:b.error}),t.fetchers.delete(m)}else if(qa(b))Be(!1,"Unhandled fetcher revalidation redirect");else{let S=jl(b.data);t.fetchers.set(m,S)}}),{loaderData:c,errors:d}}function vy(t,l,i,r){let o=Object.entries(l).filter(([,s])=>s!==Yv).reduce((s,[c,d])=>(s[c]=d,s),{});for(let s of i){let c=s.route.id;if(!l.hasOwnProperty(c)&&t.hasOwnProperty(c)&&s.route.loader&&(o[c]=t[c]),r&&r.hasOwnProperty(c))break}return o}function by(t){return t?bn(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function oa(t,l){return(l?t.slice(0,t.findIndex(r=>r.route.id===l)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function vo(t){let l=t.length===1?t[0]:t.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:l}],route:l}}function Dn(t,{pathname:l,routeId:i,method:r,type:o,message:s}={}){let c="Unknown Server Error",d="Unknown @remix-run/router error";return t===400?(c="Bad Request",r&&l&&i?d=`You made a ${r} request to "${l}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:o==="invalid-body"&&(d="Unable to encode submission body")):t===403?(c="Forbidden",d=`Route "${i}" does not match URL "${l}"`):t===404?(c="Not Found",d=`No route matches URL "${l}"`):t===405&&(c="Method Not Allowed",r&&l&&i?d=`You made a ${r.toUpperCase()} request to "${l}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:r&&(d=`Invalid request method "${r.toUpperCase()}"`)),new Qr(t||500,c,new Error(d),!0)}function bo(t){let l=Object.entries(t);for(let i=l.length-1;i>=0;i--){let[r,o]=l[i];if(qa(o))return{key:r,result:o}}}function Qv(t){let l=typeof t=="string"?da(t):t;return tl({...l,hash:""})}function WS(t,l){return t.pathname!==l.pathname||t.search!==l.search?!1:t.hash===""?l.hash!=="":t.hash===l.hash?!0:l.hash!==""}function eE(t){return new Qr(t.init?.status??500,t.init?.statusText??"Internal Server Error",t.data)}function tE(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([l,i])=>typeof l=="string"&&nE(i))}function nE(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function lE(t){return xd(t.result)&&Hv.has(t.result.status)}function bn(t){return t.type==="error"}function qa(t){return(t&&t.type)==="redirect"}function xy(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function xd(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function aE(t){return Hv.has(t)}function iE(t){return xd(t)&&aE(t.status)&&t.headers.has("Location")}function rE(t){return LS.has(t.toUpperCase())}function It(t){return OS.has(t.toUpperCase())}function Sd(t){return new URLSearchParams(t).getAll("index").some(l=>l==="")}function Ao(t,l){let i=typeof l=="string"?da(l).search:l.search;if(t[t.length-1].route.index&&Sd(i||""))return t[t.length-1];let r=Ov(t);return r[r.length-1]}function Sy(t){let{formMethod:l,formAction:i,formEncType:r,text:o,formData:s,json:c}=t;if(!(!l||!i||!r)){if(o!=null)return{formMethod:l,formAction:i,formEncType:r,formData:void 0,json:void 0,text:o};if(s!=null)return{formMethod:l,formAction:i,formEncType:r,formData:s,json:void 0,text:void 0};if(c!==void 0)return{formMethod:l,formAction:i,formEncType:r,formData:void 0,json:c,text:void 0}}}function yf(t,l){return l?{state:"loading",location:t,formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function uE(t,l){return{state:"submitting",location:t,formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text}}function Rr(t,l){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:l}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:l}}function oE(t,l){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:l?l.data:void 0}}function jl(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function sE(t,l){try{let i=t.sessionStorage.getItem(qv);if(i){let r=JSON.parse(i);for(let[o,s]of Object.entries(r||{}))s&&Array.isArray(s)&&l.set(o,new Set(s||[]))}}catch{}}function cE(t,l){if(l.size>0){let i={};for(let[r,o]of l)i[r]=[...o];try{t.sessionStorage.setItem(qv,JSON.stringify(i))}catch(r){Ct(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function Ey(){let t,l,i=new Promise((r,o)=>{t=async s=>{r(s);try{await i}catch{}},l=async s=>{o(s);try{await i}catch{}}});return{promise:i,resolve:t,reject:l}}var Ga=k.createContext(null);Ga.displayName="DataRouter";var Kr=k.createContext(null);Kr.displayName="DataRouterState";var $v=k.createContext(!1);function fE(){return k.useContext($v)}var Ed=k.createContext({isTransitioning:!1});Ed.displayName="ViewTransition";var Kv=k.createContext(new Map);Kv.displayName="Fetchers";var dE=k.createContext(null);dE.displayName="Await";var Mn=k.createContext(null);Mn.displayName="Navigation";var Yo=k.createContext(null);Yo.displayName="Location";var Xn=k.createContext({outlet:null,matches:[],isDataRoute:!1});Xn.displayName="Route";var wd=k.createContext(null);wd.displayName="RouteError";var Zv="REACT_ROUTER_ERROR",hE="REDIRECT",mE="ROUTE_ERROR_RESPONSE";function pE(t){if(t.startsWith(`${Zv}:${hE}:{`))try{let l=JSON.parse(t.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function gE(t){if(t.startsWith(`${Zv}:${mE}:{`))try{let l=JSON.parse(t.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new Qr(l.status,l.statusText,l.data)}catch{}}function yE(t,{relative:l}={}){Be(Zr(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:r}=k.useContext(Mn),{hash:o,pathname:s,search:c}=Pr(t,{relative:l}),d=s;return i!=="/"&&(d=s==="/"?i:el([i,s])),r.createHref({pathname:d,search:c,hash:o})}function Zr(){return k.useContext(Yo)!=null}function Qn(){return Be(Zr(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(Yo).location}var Pv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Jv(t){k.useContext(Mn).static||k.useLayoutEffect(t)}function Rl(){let{isDataRoute:t}=k.useContext(Xn);return t?NE():vE()}function vE(){Be(Zr(),"useNavigate() may be used only in the context of a <Router> component.");let t=k.useContext(Ga),{basename:l,navigator:i}=k.useContext(Mn),{matches:r}=k.useContext(Xn),{pathname:o}=Qn(),s=JSON.stringify(yd(r)),c=k.useRef(!1);return Jv(()=>{c.current=!0}),k.useCallback((p,m={})=>{if(Ct(c.current,Pv),!c.current)return;if(typeof p=="number"){i.go(p);return}let y=vd(p,JSON.parse(s),o,m.relative==="path");t==null&&l!=="/"&&(y.pathname=y.pathname==="/"?l:el([l,y.pathname])),(m.replace?i.replace:i.push)(y,m.state,m)},[l,i,s,o,t])}var Wv=k.createContext(null);function kd(){return k.useContext(Wv)}function bE(t){let l=k.useContext(Xn).outlet;return k.useMemo(()=>l&&k.createElement(Wv.Provider,{value:t},l),[l,t])}function eb(){let{matches:t}=k.useContext(Xn),l=t[t.length-1];return l?l.params:{}}function Pr(t,{relative:l}={}){let{matches:i}=k.useContext(Xn),{pathname:r}=Qn(),o=JSON.stringify(yd(i));return k.useMemo(()=>vd(t,JSON.parse(o),r,l==="path"),[t,o,r,l])}function xE(t,l,i,r,o){Be(Zr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=k.useContext(Mn),{matches:c}=k.useContext(Xn),d=c[c.length-1],p=d?d.params:{},m=d?d.pathname:"/",y=d?d.pathnameBase:"/",g=d&&d.route;{let A=g&&g.path||"";nb(m,!g||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
11
+
12
+ Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let b=Qn(),S;S=b;let E=S.pathname||"/",j=E;if(y!=="/"){let A=y.replace(/^\//,"").split("/");j="/"+E.replace(/^\//,"").split("/").slice(A.length).join("/")}let R=ua(t,{pathname:j});return Ct(g||R!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),Ct(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),CE(R&&R.map(A=>Object.assign({},A,{params:Object.assign({},p,A.params),pathname:el([y,s.encodeLocation?s.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?y:el([y,s.encodeLocation?s.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),c,i,r,o)}function SE(){let t=_E(),l=Fr(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),i=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",t),c=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:s},"ErrorBoundary")," or"," ",k.createElement("code",{style:s},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},l),i?k.createElement("pre",{style:o},i):null,c)}var EE=k.createElement(SE,null),tb=class extends k.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,l){return l.location!==t.location||l.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:l.error,location:l.location,revalidation:t.revalidation||l.revalidation}}componentDidCatch(t,l){this.props.onError?this.props.onError(t,l):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const i=gE(t.digest);i&&(t=i)}let l=t!==void 0?k.createElement(Xn.Provider,{value:this.props.routeContext},k.createElement(wd.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?k.createElement(wE,{error:t},l):l}};tb.contextType=$v;var vf=new WeakMap;function wE({children:t,error:l}){let{basename:i}=k.useContext(Mn);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let r=pE(l.digest);if(r){let o=vf.get(l);if(o)throw o;let s=Lv(r.location,i);if(Mv&&!vf.get(l))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw vf.set(l,c),c}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function kE({routeContext:t,match:l,children:i}){let r=k.useContext(Ga);return r&&r.static&&r.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=l.route.id),k.createElement(Xn.Provider,{value:t},i)}function CE(t,l=[],i=null,r=null,o=null){if(t==null){if(!i)return null;if(i.errors)t=i.matches;else if(l.length===0&&!i.initialized&&i.matches.length>0)t=i.matches;else return null}let s=t,c=i?.errors;if(c!=null){let y=s.findIndex(g=>g.route.id&&c?.[g.route.id]!==void 0);Be(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let d=!1,p=-1;if(i)for(let y=0;y<s.length;y++){let g=s[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(p=y),g.route.id){let{loaderData:b,errors:S}=i,E=g.route.loader&&!b.hasOwnProperty(g.route.id)&&(!S||S[g.route.id]===void 0);if(g.route.lazy||E){d=!0,p>=0?s=s.slice(0,p+1):s=[s[0]];break}}}let m=i&&r?(y,g)=>{r(y,{location:i.location,params:i.matches?.[0]?.params??{},unstable_pattern:$r(i.matches),errorInfo:g})}:void 0;return s.reduceRight((y,g,b)=>{let S,E=!1,j=null,R=null;i&&(S=c&&g.route.id?c[g.route.id]:void 0,j=g.route.errorElement||EE,d&&(p<0&&b===0?(nb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,R=null):p===b&&(E=!0,R=g.route.hydrateFallbackElement||null)));let C=l.concat(s.slice(0,b+1)),A=()=>{let D;return S?D=j:E?D=R:g.route.Component?D=k.createElement(g.route.Component,null):g.route.element?D=g.route.element:D=y,k.createElement(kE,{match:g,routeContext:{outlet:y,matches:C,isDataRoute:i!=null},children:D})};return i&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?k.createElement(tb,{location:i.location,revalidation:i.revalidation,component:j,error:S,children:A(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:m}):A()},null)}function Cd(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function TE(t){let l=k.useContext(Ga);return Be(l,Cd(t)),l}function jE(t){let l=k.useContext(Kr);return Be(l,Cd(t)),l}function AE(t){let l=k.useContext(Xn);return Be(l,Cd(t)),l}function Td(t){let l=AE(t),i=l.matches[l.matches.length-1];return Be(i.route.id,`${t} can only be used on routes that contain a unique "id"`),i.route.id}function RE(){return Td("useRouteId")}function _E(){let t=k.useContext(wd),l=jE("useRouteError"),i=Td("useRouteError");return t!==void 0?t:l.errors?.[i]}function NE(){let{router:t}=TE("useNavigate"),l=Td("useNavigate"),i=k.useRef(!1);return Jv(()=>{i.current=!0}),k.useCallback(async(o,s={})=>{Ct(i.current,Pv),i.current&&(typeof o=="number"?await t.navigate(o):await t.navigate(o,{fromRouteId:l,...s}))},[t,l])}var wy={};function nb(t,l,i){!l&&!wy[t]&&(wy[t]=!0,Ct(!1,i))}var ky={};function Cy(t,l){!t&&!ky[l]&&(ky[l]=!0,console.warn(l))}var DE="useOptimistic",Ty=Qx[DE],zE=()=>{};function OE(t){return Ty?Ty(t):[t,zE]}function ME(t){let l={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&Ct(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(l,{element:k.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&Ct(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(l,{hydrateFallbackElement:k.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&Ct(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(l,{errorElement:k.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),l}var LE=["HydrateFallback","hydrateFallbackElement"],UE=class{constructor(){this.status="pending",this.promise=new Promise((t,l)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",t(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",l(i))}})}};function BE({router:t,flushSync:l,onError:i,unstable_useTransitions:r}){r=fE()||r;let[s,c]=k.useState(t.state),[d,p]=OE(s),[m,y]=k.useState(),[g,b]=k.useState({isTransitioning:!1}),[S,E]=k.useState(),[j,R]=k.useState(),[C,A]=k.useState(),D=k.useRef(new Map),ee=k.useCallback((le,{deletedFetchers:W,newErrors:_,flushSync:F,viewTransitionOpts:q})=>{_&&i&&Object.values(_).forEach(ne=>i(ne,{location:le.location,params:le.matches[0]?.params??{},unstable_pattern:$r(le.matches)})),le.fetchers.forEach((ne,K)=>{ne.data!==void 0&&D.current.set(K,ne.data)}),W.forEach(ne=>D.current.delete(ne)),Cy(F===!1||l!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let V=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(Cy(q==null||V,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!q||!V){l&&F?l(()=>c(le)):r===!1?c(le):k.startTransition(()=>{r===!0&&p(ne=>jy(ne,le)),c(le)});return}if(l&&F){l(()=>{j&&(S?.resolve(),j.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:q.currentLocation,nextLocation:q.nextLocation})});let ne=t.window.document.startViewTransition(()=>{l(()=>c(le))});ne.finished.finally(()=>{l(()=>{E(void 0),R(void 0),y(void 0),b({isTransitioning:!1})})}),l(()=>R(ne));return}j?(S?.resolve(),j.skipTransition(),A({state:le,currentLocation:q.currentLocation,nextLocation:q.nextLocation})):(y(le),b({isTransitioning:!0,flushSync:!1,currentLocation:q.currentLocation,nextLocation:q.nextLocation}))},[t.window,l,j,S,r,p,i]);k.useLayoutEffect(()=>t.subscribe(ee),[t,ee]),k.useEffect(()=>{g.isTransitioning&&!g.flushSync&&E(new UE)},[g]),k.useEffect(()=>{if(S&&m&&t.window){let le=m,W=S.promise,_=t.window.document.startViewTransition(async()=>{r===!1?c(le):k.startTransition(()=>{r===!0&&p(F=>jy(F,le)),c(le)}),await W});_.finished.finally(()=>{E(void 0),R(void 0),y(void 0),b({isTransitioning:!1})}),R(_)}},[m,S,t.window,r,p]),k.useEffect(()=>{S&&m&&d.location.key===m.location.key&&S.resolve()},[S,j,d.location,m]),k.useEffect(()=>{!g.isTransitioning&&C&&(y(C.state),b({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),A(void 0))},[g.isTransitioning,C]);let $=k.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:le=>t.navigate(le),push:(le,W,_)=>t.navigate(le,{state:W,preventScrollReset:_?.preventScrollReset}),replace:(le,W,_)=>t.navigate(le,{replace:!0,state:W,preventScrollReset:_?.preventScrollReset})}),[t]),B=t.basename||"/",z=k.useMemo(()=>({router:t,navigator:$,static:!1,basename:B,onError:i}),[t,$,B,i]);return k.createElement(k.Fragment,null,k.createElement(Ga.Provider,{value:z},k.createElement(Kr.Provider,{value:d},k.createElement(Kv.Provider,{value:D.current},k.createElement(Ed.Provider,{value:g},k.createElement(GE,{basename:B,location:d.location,navigationType:d.historyAction,navigator:$,unstable_useTransitions:r},k.createElement(HE,{routes:t.routes,future:t.future,state:d,onError:i})))))),null)}function jy(t,l){return{...t,navigation:l.navigation.state!=="idle"?l.navigation:t.navigation,revalidation:l.revalidation!=="idle"?l.revalidation:t.revalidation,actionData:l.navigation.state!=="submitting"?l.actionData:t.actionData,fetchers:l.fetchers}}var HE=k.memo(qE);function qE({routes:t,future:l,state:i,onError:r}){return xE(t,void 0,i,r,l)}function YE(t){return bE(t.context)}function GE({basename:t="/",children:l=null,location:i,navigationType:r="POP",navigator:o,static:s=!1,unstable_useTransitions:c}){Be(!Zr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),p=k.useMemo(()=>({basename:d,navigator:o,static:s,unstable_useTransitions:c,future:{}}),[d,o,s,c]);typeof i=="string"&&(i=da(i));let{pathname:m="/",search:y="",hash:g="",state:b=null,key:S="default"}=i,E=k.useMemo(()=>{let j=On(m,d);return j==null?null:{location:{pathname:j,search:y,hash:g,state:b,key:S},navigationType:r}},[d,m,y,g,b,S,r]);return Ct(E!=null,`<Router basename="${d}"> is not able to match the URL "${m}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:k.createElement(Mn.Provider,{value:p},k.createElement(Yo.Provider,{children:l,value:E}))}var Ro="get",_o="application/x-www-form-urlencoded";function Go(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function FE(t){return Go(t)&&t.tagName.toLowerCase()==="button"}function VE(t){return Go(t)&&t.tagName.toLowerCase()==="form"}function IE(t){return Go(t)&&t.tagName.toLowerCase()==="input"}function XE(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function QE(t,l){return t.button===0&&(!l||l==="_self")&&!XE(t)}function If(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((l,i)=>{let r=t[i];return l.concat(Array.isArray(r)?r.map(o=>[i,o]):[[i,r]])},[]))}function $E(t,l){let i=If(t);return l&&l.forEach((r,o)=>{i.has(o)||l.getAll(o).forEach(s=>{i.append(o,s)})}),i}var xo=null;function KE(){if(xo===null)try{new FormData(document.createElement("form"),0),xo=!1}catch{xo=!0}return xo}var ZE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function bf(t){return t!=null&&!ZE.has(t)?(Ct(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${_o}"`),null):t}function PE(t,l){let i,r,o,s,c;if(VE(t)){let d=t.getAttribute("action");r=d?On(d,l):null,i=t.getAttribute("method")||Ro,o=bf(t.getAttribute("enctype"))||_o,s=new FormData(t)}else if(FE(t)||IE(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=t.getAttribute("formaction")||d.getAttribute("action");if(r=p?On(p,l):null,i=t.getAttribute("formmethod")||d.getAttribute("method")||Ro,o=bf(t.getAttribute("formenctype"))||bf(d.getAttribute("enctype"))||_o,s=new FormData(d,t),!KE()){let{name:m,type:y,value:g}=t;if(y==="image"){let b=m?`${m}.`:"";s.append(`${b}x`,"0"),s.append(`${b}y`,"0")}else m&&s.append(m,g)}}else{if(Go(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Ro,r=null,o=_o,c=t}return s&&o==="text/plain"&&(c=s,s=void 0),{action:r,method:i.toLowerCase(),encType:o,formData:s,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function jd(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function JE(t,l,i,r){let o=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return i?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:l&&On(o.pathname,l)==="/"?o.pathname=`${l.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function WE(t,l){if(t.id in l)return l[t.id];try{let i=await import(t.module);return l[t.id]=i,i}catch(i){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ew(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function tw(t,l,i){let r=await Promise.all(t.map(async o=>{let s=l.routes[o.route.id];if(s){let c=await WE(s,i);return c.links?c.links():[]}return[]}));return iw(r.flat(1).filter(ew).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Ay(t,l,i,r,o,s){let c=(p,m)=>i[m]?p.route.id!==i[m].route.id:!0,d=(p,m)=>i[m].pathname!==p.pathname||i[m].route.path?.endsWith("*")&&i[m].params["*"]!==p.params["*"];return s==="assets"?l.filter((p,m)=>c(p,m)||d(p,m)):s==="data"?l.filter((p,m)=>{let y=r.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(c(p,m)||d(p,m))return!0;if(p.route.shouldRevalidate){let g=p.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function nw(t,l,{includeHydrateFallback:i}={}){return lw(t.map(r=>{let o=l.routes[r.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),i&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}function lw(t){return[...new Set(t)]}function aw(t){let l={},i=Object.keys(t).sort();for(let r of i)l[r]=t[r];return l}function iw(t,l){let i=new Set;return new Set(l),t.reduce((r,o)=>{let s=JSON.stringify(aw(o));return i.has(s)||(i.add(s),r.push({key:s,link:o})),r},[])}function lb(){let t=k.useContext(Ga);return jd(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function rw(){let t=k.useContext(Kr);return jd(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Ad=k.createContext(void 0);Ad.displayName="FrameworkContext";function ab(){let t=k.useContext(Ad);return jd(t,"You must render this element inside a <HydratedRouter> element"),t}function uw(t,l){let i=k.useContext(Ad),[r,o]=k.useState(!1),[s,c]=k.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:m,onMouseLeave:y,onTouchStart:g}=l,b=k.useRef(null);k.useEffect(()=>{if(t==="render"&&c(!0),t==="viewport"){let j=C=>{C.forEach(A=>{c(A.isIntersecting)})},R=new IntersectionObserver(j,{threshold:.5});return b.current&&R.observe(b.current),()=>{R.disconnect()}}},[t]),k.useEffect(()=>{if(r){let j=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(j)}}},[r]);let S=()=>{o(!0)},E=()=>{o(!1),c(!1)};return i?t!=="intent"?[s,b,{}]:[s,b,{onFocus:_r(d,S),onBlur:_r(p,E),onMouseEnter:_r(m,S),onMouseLeave:_r(y,E),onTouchStart:_r(g,S)}]:[!1,b,{}]}function _r(t,l){return i=>{t&&t(i),i.defaultPrevented||l(i)}}function ow({page:t,...l}){let{router:i}=lb(),r=k.useMemo(()=>ua(i.routes,t,i.basename),[i.routes,t,i.basename]);return r?k.createElement(cw,{page:t,matches:r,...l}):null}function sw(t){let{manifest:l,routeModules:i}=ab(),[r,o]=k.useState([]);return k.useEffect(()=>{let s=!1;return tw(t,l,i).then(c=>{s||o(c)}),()=>{s=!0}},[t,l,i]),r}function cw({page:t,matches:l,...i}){let r=Qn(),{future:o,manifest:s,routeModules:c}=ab(),{basename:d}=lb(),{loaderData:p,matches:m}=rw(),y=k.useMemo(()=>Ay(t,l,m,s,r,"data"),[t,l,m,s,r]),g=k.useMemo(()=>Ay(t,l,m,s,r,"assets"),[t,l,m,s,r]),b=k.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let j=new Set,R=!1;if(l.forEach(A=>{let D=s.routes[A.route.id];!D||!D.hasLoader||(!y.some(ee=>ee.route.id===A.route.id)&&A.route.id in p&&c[A.route.id]?.shouldRevalidate||D.hasClientLoader?R=!0:j.add(A.route.id))}),j.size===0)return[];let C=JE(t,d,o.unstable_trailingSlashAwareDataRequests,"data");return R&&j.size>0&&C.searchParams.set("_routes",l.filter(A=>j.has(A.route.id)).map(A=>A.route.id).join(",")),[C.pathname+C.search]},[d,o.unstable_trailingSlashAwareDataRequests,p,r,s,y,l,t,c]),S=k.useMemo(()=>nw(g,s),[g,s]),E=sw(g);return k.createElement(k.Fragment,null,b.map(j=>k.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...i})),S.map(j=>k.createElement("link",{key:j,rel:"modulepreload",href:j,...i})),E.map(({key:j,link:R})=>k.createElement("link",{key:j,nonce:i.nonce,...R,crossOrigin:R.crossOrigin??i.crossOrigin})))}function fw(...t){return l=>{t.forEach(i=>{typeof i=="function"?i(l):i!=null&&(i.current=l)})}}var dw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{dw&&(window.__reactRouterVersion="7.13.0")}catch{}function hw(t,l){return qS({basename:l?.basename,getContext:l?.getContext,future:l?.future,history:nS({window:l?.window}),hydrationData:mw(),routes:t,mapRouteProperties:ME,hydrationRouteProperties:LE,dataStrategy:l?.dataStrategy,patchRoutesOnNavigation:l?.patchRoutesOnNavigation,window:l?.window,unstable_instrumentations:l?.unstable_instrumentations}).initialize()}function mw(){let t=window?.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:pw(t.errors)}),t}function pw(t){if(!t)return null;let l=Object.entries(t),i={};for(let[r,o]of l)if(o&&o.__type==="RouteErrorResponse")i[r]=new Qr(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let s=window[o.__subType];if(typeof s=="function")try{let c=new s(o.message);c.stack="",i[r]=c}catch{}}if(i[r]==null){let s=new Error(o.message);s.stack="",i[r]=s}}else i[r]=o;return i}var ib=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,rb=k.forwardRef(function({onClick:l,discover:i="render",prefetch:r="none",relative:o,reloadDocument:s,replace:c,state:d,target:p,to:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...S},E){let{basename:j,unstable_useTransitions:R}=k.useContext(Mn),C=typeof m=="string"&&ib.test(m),A=Lv(m,j);m=A.to;let D=yE(m,{relative:o}),[ee,$,B]=uw(r,S),z=bw(m,{replace:c,state:d,target:p,preventScrollReset:y,relative:o,viewTransition:g,unstable_defaultShouldRevalidate:b,unstable_useTransitions:R});function le(_){l&&l(_),_.defaultPrevented||z(_)}let W=k.createElement("a",{...S,...B,href:A.absoluteURL||D,onClick:A.isExternal||s?l:le,ref:fw(E,$),target:p,"data-discover":!C&&i==="render"?"true":void 0});return ee&&!C?k.createElement(k.Fragment,null,W,k.createElement(ow,{page:D})):W});rb.displayName="Link";var gw=k.forwardRef(function({"aria-current":l="page",caseSensitive:i=!1,className:r="",end:o=!1,style:s,to:c,viewTransition:d,children:p,...m},y){let g=Pr(c,{relative:m.relative}),b=Qn(),S=k.useContext(Kr),{navigator:E,basename:j}=k.useContext(Mn),R=S!=null&&Cw(g)&&d===!0,C=E.encodeLocation?E.encodeLocation(g).pathname:g.pathname,A=b.pathname,D=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;i||(A=A.toLowerCase(),D=D?D.toLowerCase():null,C=C.toLowerCase()),D&&j&&(D=On(D,j)||D);const ee=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let $=A===C||!o&&A.startsWith(C)&&A.charAt(ee)==="/",B=D!=null&&(D===C||!o&&D.startsWith(C)&&D.charAt(C.length)==="/"),z={isActive:$,isPending:B,isTransitioning:R},le=$?l:void 0,W;typeof r=="function"?W=r(z):W=[r,$?"active":null,B?"pending":null,R?"transitioning":null].filter(Boolean).join(" ");let _=typeof s=="function"?s(z):s;return k.createElement(rb,{...m,"aria-current":le,className:W,ref:y,style:_,to:c,viewTransition:d},typeof p=="function"?p(z):p)});gw.displayName="NavLink";var yw=k.forwardRef(({discover:t="render",fetcherKey:l,navigate:i,reloadDocument:r,replace:o,state:s,method:c=Ro,action:d,onSubmit:p,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...S},E)=>{let{unstable_useTransitions:j}=k.useContext(Mn),R=ww(),C=kw(d,{relative:m}),A=c.toLowerCase()==="get"?"get":"post",D=typeof d=="string"&&ib.test(d),ee=$=>{if(p&&p($),$.defaultPrevented)return;$.preventDefault();let B=$.nativeEvent.submitter,z=B?.getAttribute("formmethod")||c,le=()=>R(B||$.currentTarget,{fetcherKey:l,method:z,navigate:i,replace:o,state:s,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b});j&&i!==!1?k.startTransition(()=>le()):le()};return k.createElement("form",{ref:E,method:A,action:C,onSubmit:r?p:ee,...S,"data-discover":!D&&t==="render"?"true":void 0})});yw.displayName="Form";function vw(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ub(t){let l=k.useContext(Ga);return Be(l,vw(t)),l}function bw(t,{target:l,replace:i,state:r,preventScrollReset:o,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:d,unstable_useTransitions:p}={}){let m=Rl(),y=Qn(),g=Pr(t,{relative:s});return k.useCallback(b=>{if(QE(b,l)){b.preventDefault();let S=i!==void 0?i:tl(y)===tl(g),E=()=>m(t,{replace:S,state:r,preventScrollReset:o,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:d});p?k.startTransition(()=>E()):E()}},[y,m,g,i,r,l,t,o,s,c,d,p])}function xw(t){Ct(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let l=k.useRef(If(t)),i=k.useRef(!1),r=Qn(),o=k.useMemo(()=>$E(r.search,i.current?null:l.current),[r.search]),s=Rl(),c=k.useCallback((d,p)=>{const m=If(typeof d=="function"?d(new URLSearchParams(o)):d);i.current=!0,s("?"+m,p)},[s,o]);return[o,c]}var Sw=0,Ew=()=>`__${String(++Sw)}__`;function ww(){let{router:t}=ub("useSubmit"),{basename:l}=k.useContext(Mn),i=RE(),r=t.fetch,o=t.navigate;return k.useCallback(async(s,c={})=>{let{action:d,method:p,encType:m,formData:y,body:g}=PE(s,l);if(c.navigate===!1){let b=c.fetcherKey||Ew();await r(b,i,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||p,formEncType:c.encType||m,flushSync:c.flushSync})}else await o(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||p,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:i,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,o,l,i])}function kw(t,{relative:l}={}){let{basename:i}=k.useContext(Mn),r=k.useContext(Xn);Be(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),s={...Pr(t||".",{relative:l})},c=Qn();if(t==null){s.search=c.search;let d=new URLSearchParams(s.search),p=d.getAll("index");if(p.some(y=>y==="")){d.delete("index"),p.filter(g=>g).forEach(g=>d.append("index",g));let y=d.toString();s.search=y?`?${y}`:""}}return(!t||t===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(s.pathname=s.pathname==="/"?i:el([i,s.pathname])),tl(s)}function Cw(t,{relative:l}={}){let i=k.useContext(Ed);Be(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=ub("useViewTransitionState"),o=Pr(t,{relative:l});if(!i.isTransitioning)return!1;let s=On(i.currentLocation.pathname,r)||i.currentLocation.pathname,c=On(i.nextLocation.pathname,r)||i.nextLocation.pathname;return Oo(o.pathname,c)!=null||Oo(o.pathname,s)!=null}var Fo=Av();function Tw(t){return k.createElement(BE,{flushSync:Fo.flushSync,...t})}const Rd="electric-agent:rooms";function Vr(){try{const t=localStorage.getItem(Rd);return t?JSON.parse(t):[]}catch{return[]}}function Ry(t){const i=Vr().filter(r=>r.id!==t.id);i.push(t),localStorage.setItem(Rd,JSON.stringify(i))}function jw(t){const i=Vr().filter(r=>r.id!==t);localStorage.setItem(Rd,JSON.stringify(i))}const _d="electric-agent:anthropic-api-key",Vo="electric-agent:oauth-token",Nd="electric-agent:oauth-manual",Dd="electric-agent:gh-token";function ob(){return localStorage.getItem(_d)}function Aw(t){localStorage.setItem(_d,t)}function Rw(){localStorage.removeItem(_d)}function _w(){return!!ob()}function Xf(){return localStorage.getItem(Vo)}function Nw(t){localStorage.setItem(Vo,t)}function Dw(){localStorage.removeItem(Vo),localStorage.removeItem(Nd)}function zw(t){localStorage.setItem(Vo,t),localStorage.setItem(Nd,"1")}function No(){return localStorage.getItem(Nd)==="1"}function zd(){return localStorage.getItem(Dd)}function Ow(t){localStorage.setItem(Dd,t)}function Mw(){localStorage.removeItem(Dd)}function Lw(){return!!zd()}function sb(){let t=localStorage.getItem("participant-id"),l=localStorage.getItem("participant-name");return t||(t=crypto.randomUUID(),localStorage.setItem("participant-id",t)),l||(l=`User-${t.slice(0,4)}`,localStorage.setItem("participant-name",l)),{id:t,displayName:l}}const Io="electric-agent:sessions",Od="electric-agent:session-tokens";function Di(){try{const t=localStorage.getItem(Io);return t?JSON.parse(t):[]}catch{return[]}}function Md(t){const i=Di().filter(r=>r.id!==t.id);i.push(t),localStorage.setItem(Io,JSON.stringify(i))}function Qf(t,l){const i=Di(),r=i.find(o=>o.id===t);r&&(Object.assign(r,l,{lastActiveAt:new Date().toISOString()}),localStorage.setItem(Io,JSON.stringify(i)))}function Uw(t){const i=Di().filter(r=>r.id!==t);localStorage.setItem(Io,JSON.stringify(i)),Bw(t)}function _y(t){return Di().find(l=>l.id===t)}function Ld(){try{const t=localStorage.getItem(Od);return t?JSON.parse(t):{}}catch{return{}}}function Ud(t,l){const i=Ld();i[t]=l,localStorage.setItem(Od,JSON.stringify(i))}function Bd(t){return Ld()[t]}function Bw(t){const l=Ld();delete l[t],localStorage.setItem(Od,JSON.stringify(l))}const cb="electric-agent:room-tokens";function fb(){try{const t=localStorage.getItem(cb);return t?JSON.parse(t):{}}catch{return{}}}function db(t,l){const i=fb();i[t]=l,localStorage.setItem(cb,JSON.stringify(i))}function hb(t){return fb()[t]}const Hw="/api";function Hd(){const t={},l=ob(),i=Xf(),r=zd();return i?t.oauthToken=i:l&&(t.apiKey=l),r&&(t.ghToken=r),t}function mb(){const t=zd();return t?{"X-GH-Token":t}:{}}function qw(){const t=sb();return{"X-Participant-Id":t.id,"X-Participant-Name":t.displayName}}function Yw(t){return t.match(/^\/sessions\/([^/]+)/)?.[1]}function Gw(t){const l=t.match(/^\/rooms\/([^/]+)/);if(l&&l[1]!=="join")return l[1]}async function Ft(t,l){const i={...qw(),...l?.headers};l?.body&&(i["Content-Type"]="application/json");const r=Yw(t);if(r){const c=Bd(r);c&&(i.Authorization=`Bearer ${c}`)}const o=Gw(t);if(o){const c=hb(o);c&&(i["X-Room-Token"]=c)}const s=await fetch(`${Hw}${t}`,{method:l?.method??"GET",headers:Object.keys(i).length>0?i:void 0,body:l?.body?JSON.stringify(l.body):void 0});if(!s.ok){const c=await s.json().catch(()=>({error:s.statusText}));throw new Error(c.error||s.statusText)}return s.json()}async function Fw(t,l,i){const r=await Ft("/sessions",{method:"POST",body:{description:t,name:l,freeform:i,...Hd()}});return r.sessionToken&&Ud(r.sessionId,r.sessionToken),r}function Vw(t,l){return Ft(`/sessions/${t}/iterate`,{method:"POST",body:{request:l}})}function $f(t,l,i){return Ft(`/sessions/${t}/respond`,{method:"POST",body:{gate:l,...i}})}function Iw(t){return Ft(`/sessions/${t}/interrupt`,{method:"POST"})}function Xw(t){return Ft(`/sessions/${t}`,{method:"DELETE"})}function Qw(){return Ft("/provision-electric",{method:"POST"})}function $w(){return Ft("/github/repos",{headers:mb()})}function Kw(t){return Ft(`/github/repos/${t}/branches`,{headers:mb()})}function Zw(){return Ft("/credentials/keychain")}async function Pw(t,l){const i=await Ft("/sessions/resume",{method:"POST",body:{repoUrl:t,branch:l,...Hd()}});return i.sessionToken&&Ud(i.sessionId,i.sessionToken),i}async function Jw(t,l){const i=await Ft("/rooms",{method:"POST",body:{name:t,maxRounds:l}});return i.roomToken&&db(i.roomId,i.roomToken),i}async function Ww(t,l){const i=await Ft(`/rooms/join/${t}/${l}`);return i.roomToken&&db(i.id,i.roomToken),i}function Ny(t){return Ft(`/rooms/${t}`)}function ek(t,l){return Ft(`/rooms/${t}/agents`,{method:"POST",body:{...l,...Hd()}})}function tk(t,l){const i=Bd(l.sessionId);return Ft(`/rooms/${t}/sessions`,{method:"POST",body:l,headers:i?{Authorization:`Bearer ${i}`}:void 0})}function nk(t,l,i,r){return Ft(`/rooms/${t}/messages`,{method:"POST",body:{from:l,body:i,...r?{to:r}:{}}})}function lk(t){return Ft(`/rooms/${t}/close`,{method:"POST"})}function ak(t,l,i){k.useEffect(()=>{function r(o){{const s=o.target?.tagName;if(s==="INPUT"||s==="TEXTAREA"||s==="SELECT")return}o.key===t&&(o.preventDefault(),l())}return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[t,l,i?.disabled,i?.allowInInputs])}function Xo(t,l){k.useEffect(()=>{if(l)return;function i(r){r.key==="Escape"&&(r.preventDefault(),t())}return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[t,l])}const Dy=[{bg:"#4a3f6b",fg:"#d0bcff"},{bg:"#2d4a4a",fg:"#75fbfd"},{bg:"#3b4a2d",fg:"#a8e6a1"},{bg:"#4a3a2d",fg:"#ffb87a"},{bg:"#4a2d3b",fg:"#f8a4c8"},{bg:"#2d3b4a",fg:"#9ecbff"},{bg:"#4a4a2d",fg:"#e6e6a1"},{bg:"#3b2d4a",fg:"#c4a4f8"},{bg:"#2d4a3b",fg:"#75e6b8"},{bg:"#4a2d2d",fg:"#f8a4a4"},{bg:"#2d3a4a",fg:"#a4d4f8"},{bg:"#4a3b2d",fg:"#e6c4a1"}];function ik(t){let l=0;for(let i=0;i<t.length;i++)l=(l<<5)-l+t.charCodeAt(i)|0;return Math.abs(l)}function qd(t){return Dy[ik(t)%Dy.length]}function rk(t){const l=Date.now()-new Date(t).getTime(),i=Math.floor(l/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const r=Math.floor(i/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function uk({projectName:t,onConfirm:l,onCancel:i}){return Xo(i),ak("Enter",l),Fo.createPortal(v.jsx("div",{className:"modal-overlay",onClick:i,children:v.jsxs("div",{className:"modal-card",onClick:r=>r.stopPropagation(),children:[v.jsxs("div",{className:"modal-title",children:["Delete ",t,"?"]}),v.jsx("div",{className:"modal-body",children:"All containers, database state, and generated code will be permanently lost."}),v.jsxs("div",{className:"modal-actions",children:[v.jsx("button",{type:"button",className:"modal-btn",onClick:i,children:"Cancel"}),v.jsx("button",{type:"button",className:"modal-btn modal-btn-danger",onClick:l,children:"Delete"})]})]})}),document.body)}function ok({session:t,active:l,onClick:i,onDelete:r}){const[o,s]=k.useState(!1),d=`session-avatar ${`session-avatar-${t.status}`}`,p=qd(t.id),m={background:p.bg,color:p.fg},y=t.projectName.split(/[-_ ]+/).slice(0,2).map(g=>g.charAt(0).toUpperCase()).join("");return v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:`session-item ${l?"active":""}`,onClick:i,title:t.projectName,children:[v.jsx("span",{className:d,style:m,children:y}),v.jsxs("div",{className:"session-item-details",children:[v.jsx("div",{className:"session-item-name",children:t.projectName}),v.jsx("div",{className:"session-item-meta",children:v.jsx("span",{children:rk(t.lastActiveAt)})})]}),v.jsx("button",{type:"button",className:"session-item-delete",onClick:g=>{g.stopPropagation(),s(!0)},title:"Delete session",children:"×"})]}),o&&v.jsx(uk,{projectName:t.projectName,onConfirm:()=>{s(!1),r()},onCancel:()=>s(!1)})]})}function sk({collapsed:t}){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-label":t?"Expand menu":"Collapse menu",children:[v.jsx("title",{children:t?"Expand menu":"Collapse menu"}),v.jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"2"}),v.jsx("line",{x1:"6",y1:"2",x2:"6",y2:"14"}),t?v.jsx("polyline",{points:"9 6.5 11.5 8 9 9.5"}):v.jsx("polyline",{points:"11.5 6.5 9 8 11.5 9.5"})]})}function ck(){return v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[v.jsx("title",{children:"Join room"}),v.jsx("path",{d:"M6.5 9.5a3.5 3.5 0 0 0 5 0l2-2a3.5 3.5 0 0 0-5-5l-1 1"}),v.jsx("path",{d:"M9.5 6.5a3.5 3.5 0 0 0-5 0l-2 2a3.5 3.5 0 0 0 5 5l1-1"})]})}function fk({collapsed:t,onToggle:l,mobileOpen:i,onMobileClose:r}){const{sessions:o,pendingProject:s,handleDeleteSession:c,agentRooms:d,refreshAgentRooms:p}=Wr(),m=Rl(),y=Qn(),[g,b]=k.useState(!1),[S,E]=k.useState(""),[j,R]=k.useState(!1),[C,A]=k.useState("");k.useEffect(()=>{t&&(b(!1),E(""),R(!1),A(""))},[t]);const D=y.pathname.startsWith("/session/")?y.pathname.split("/session/")[1]:null,ee=y.pathname.startsWith("/room/")?y.pathname.split("/room/")[1]:null,$=[...o].sort((_,F)=>new Date(F.createdAt).getTime()-new Date(_.createdAt).getTime()),B=_=>{m(_),r?.()},z=k.useCallback(_=>{jw(_),p()},[p]),le=k.useCallback(async()=>{const _=S.trim();if(_)try{const{roomId:F,code:q}=await Jw(_);Ry({id:F,code:q,name:_,createdAt:new Date().toISOString()}),p(),E(""),b(!1),m(`/room/${F}`),r?.()}catch(F){console.error("Failed to create room:",F)}},[S,m,r,p]),W=k.useCallback(async()=>{const _=C.trim();if(!_)return;const F=_.indexOf(":");if(F===-1)return;const q=_.slice(0,F),V=_.slice(F+1);if(!(!q||!V))try{const{id:ne,code:K,name:H}=await Ww(q,V);Ry({id:ne,code:K,name:H,createdAt:new Date().toISOString()}),p(),A(""),R(!1),m(`/room/${ne}`),r?.()}catch(ne){console.error("Failed to join room:",ne)}},[C,m,r,p]);return v.jsxs("aside",{className:`sidebar ${i?"mobile-open":""}`,children:[v.jsxs("div",{className:"sidebar-header",children:[v.jsxs("svg",{className:"sidebar-icon",viewBox:"0 0 192 192","aria-label":"Electric",children:[v.jsx("title",{children:"Electric"}),v.jsx("path",{d:"M106.992 16.1244C107.711 15.4029 108.683 15 109.692 15H170L84.0082 101.089C83.2888 101.811 82.3171 102.213 81.3081 102.213H21L106.992 16.1244Z",fill:"var(--brand-1)"}),v.jsx("path",{d:"M96.4157 104.125C96.4157 103.066 97.2752 102.204 98.331 102.204H170L96.4157 176V104.125Z",fill:"var(--brand-1)"})]}),v.jsx("span",{className:"sidebar-brand",children:"Electric Agent"})]}),v.jsxs("div",{className:"sidebar-sessions",children:[v.jsx("div",{className:"sidebar-section-label",children:"Sessions"}),v.jsxs("div",{className:"session-item",onClick:()=>B("/"),title:"New Electric App",children:[v.jsx("span",{className:"session-avatar new-project-avatar",children:"+"}),v.jsx("div",{className:"session-item-details",children:v.jsx("div",{className:"session-item-name",children:"New Electric App"})})]}),v.jsxs("div",{className:"session-item",onClick:()=>B("/?mode=session"),title:"Claude Session",children:[v.jsx("span",{className:"session-avatar new-project-avatar",children:v.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[v.jsx("title",{children:"Claude Session"}),v.jsx("path",{d:"M13 2.5l-9.5 9.5-1 3 3-1 9.5-9.5-2-2z"}),v.jsx("path",{d:"M10.5 5l2 2"})]})}),v.jsx("div",{className:"session-item-details",children:v.jsx("div",{className:"session-item-name",children:"Claude Session"})})]}),s&&v.jsxs("div",{className:"session-item session-item-pending",title:s.name,children:[v.jsx("span",{className:"session-avatar session-avatar-pending"}),v.jsxs("div",{className:"session-item-details",children:[v.jsx("div",{className:"session-item-name",children:s.name}),v.jsx("div",{className:"session-item-meta",children:v.jsx("span",{children:"Setting up..."})})]})]}),$.map(_=>v.jsx(ok,{session:_,active:_.id===D,onClick:()=>B(`/session/${_.id}`),onDelete:()=>c(_.id)},_.id)),v.jsx("div",{className:"sidebar-section-label",children:"Rooms"}),d.map(_=>{const F=qd(_.id),q=_.name.split(/[-_ ]+/).slice(0,2).map(V=>V.charAt(0).toUpperCase()).join("");return v.jsxs("div",{className:`session-item ${ee===_.id?"active":""}`,onClick:()=>B(`/room/${_.id}`),title:_.name,children:[v.jsx("span",{className:"session-avatar session-avatar-shared",style:{background:F.bg,color:F.fg},children:q}),v.jsxs("div",{className:"session-item-details",children:[v.jsx("div",{className:"session-item-name",children:_.name}),v.jsx("div",{className:"session-item-meta",children:v.jsx("span",{children:_.code||_.id.slice(0,8)})})]}),v.jsx("button",{type:"button",className:"session-item-delete",onClick:V=>{V.stopPropagation(),z(_.id)},title:"Remove",children:"×"})]},_.id)}),g&&!t?v.jsxs("div",{className:"sidebar-join-input",children:[v.jsx("input",{type:"text",placeholder:"Room name...",value:S,onChange:_=>E(_.target.value),onKeyDown:_=>{_.key==="Enter"&&le(),_.key==="Escape"&&(b(!1),E(""))}}),v.jsx("button",{type:"button",className:"sidebar-join-go",onClick:le,disabled:!S.trim(),children:"Go"})]}):v.jsxs("div",{className:"session-item",onClick:()=>{t&&l(),b(!0)},title:"Create room",children:[v.jsx("span",{className:"session-avatar new-project-avatar",children:"+"}),v.jsx("div",{className:"session-item-details",children:v.jsx("div",{className:"session-item-name",children:"Create"})})]}),j&&!t?v.jsxs("div",{className:"sidebar-join-input",children:[v.jsx("input",{type:"text",placeholder:"Paste join token...",value:C,onChange:_=>A(_.target.value),onKeyDown:_=>{_.key==="Enter"&&W(),_.key==="Escape"&&(R(!1),A(""))}}),v.jsx("button",{type:"button",className:"sidebar-join-go",onClick:W,disabled:!C.trim(),children:"Go"})]}):v.jsxs("div",{className:"session-item",onClick:()=>{t&&l(),R(!0)},title:"Join room",children:[v.jsx("span",{className:"session-avatar new-project-avatar",children:v.jsx(ck,{})}),v.jsx("div",{className:"session-item-details",children:v.jsx("div",{className:"session-item-name",children:"Join"})})]})]}),v.jsx("div",{className:"sidebar-collapse",children:v.jsxs("button",{type:"button",className:"sidebar-collapse-btn",onClick:l,children:[v.jsx(sk,{collapsed:t}),v.jsx("span",{className:"sidebar-collapse-label",children:t?"Expand menu":"Collapse menu"})]})})]})}let dk={data:""},hk=t=>{if(typeof window=="object"){let l=(t?t.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return l.nonce=window.__nonce__,l.parentNode||(t||document.head).appendChild(l),l.firstChild}return t||dk},mk=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,pk=/\/\*[^]*?\*\/| +/g,zy=/\n+/g,sa=(t,l)=>{let i="",r="",o="";for(let s in t){let c=t[s];s[0]=="@"?s[1]=="i"?i=s+" "+c+";":r+=s[1]=="f"?sa(c,s):s+"{"+sa(c,s[1]=="k"?"":l)+"}":typeof c=="object"?r+=sa(c,l?l.replace(/([^,])+/g,d=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,p=>/&/.test(p)?p.replace(/&/g,d):d?d+" "+p:p)):s):c!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=sa.p?sa.p(s,c):s+":"+c+";")}return i+(l&&o?l+"{"+o+"}":o)+r},Cl={},pb=t=>{if(typeof t=="object"){let l="";for(let i in t)l+=i+pb(t[i]);return l}return t},gk=(t,l,i,r,o)=>{let s=pb(t),c=Cl[s]||(Cl[s]=(p=>{let m=0,y=11;for(;m<p.length;)y=101*y+p.charCodeAt(m++)>>>0;return"go"+y})(s));if(!Cl[c]){let p=s!==t?t:(m=>{let y,g,b=[{}];for(;y=mk.exec(m.replace(pk,""));)y[4]?b.shift():y[3]?(g=y[3].replace(zy," ").trim(),b.unshift(b[0][g]=b[0][g]||{})):b[0][y[1]]=y[2].replace(zy," ").trim();return b[0]})(t);Cl[c]=sa(o?{["@keyframes "+c]:p}:p,i?"":"."+c)}let d=i&&Cl.g?Cl.g:null;return i&&(Cl.g=Cl[c]),((p,m,y,g)=>{g?m.data=m.data.replace(g,p):m.data.indexOf(p)===-1&&(m.data=y?p+m.data:m.data+p)})(Cl[c],l,r,d),c},yk=(t,l,i)=>t.reduce((r,o,s)=>{let c=l[s];if(c&&c.call){let d=c(i),p=d&&d.props&&d.props.className||/^go/.test(d)&&d;c=p?"."+p:d&&typeof d=="object"?d.props?"":sa(d,""):d===!1?"":d}return r+o+(c??"")},"");function Qo(t){let l=this||{},i=t.call?t(l.p):t;return gk(i.unshift?i.raw?yk(i,[].slice.call(arguments,1),l.p):i.reduce((r,o)=>Object.assign(r,o&&o.call?o(l.p):o),{}):i,hk(l.target),l.g,l.o,l.k)}let gb,Kf,Zf;Qo.bind({g:1});let Al=Qo.bind({k:1});function vk(t,l,i,r){sa.p=l,gb=t,Kf=i,Zf=r}function ha(t,l){let i=this||{};return function(){let r=arguments;function o(s,c){let d=Object.assign({},s),p=d.className||o.className;i.p=Object.assign({theme:Kf&&Kf()},d),i.o=/ *go\d+/.test(p),d.className=Qo.apply(i,r)+(p?" "+p:"");let m=t;return t[0]&&(m=d.as||t,delete d.as),Zf&&m[0]&&Zf(d),gb(m,d)}return o}}var bk=t=>typeof t=="function",Mo=(t,l)=>bk(t)?t(l):t,xk=(()=>{let t=0;return()=>(++t).toString()})(),yb=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let l=matchMedia("(prefers-reduced-motion: reduce)");t=!l||l.matches}return t}})(),Sk=20,Yd="default",vb=(t,l)=>{let{toastLimit:i}=t.settings;switch(l.type){case 0:return{...t,toasts:[l.toast,...t.toasts].slice(0,i)};case 1:return{...t,toasts:t.toasts.map(c=>c.id===l.toast.id?{...c,...l.toast}:c)};case 2:let{toast:r}=l;return vb(t,{type:t.toasts.find(c=>c.id===r.id)?1:0,toast:r});case 3:let{toastId:o}=l;return{...t,toasts:t.toasts.map(c=>c.id===o||o===void 0?{...c,dismissed:!0,visible:!1}:c)};case 4:return l.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(c=>c.id!==l.toastId)};case 5:return{...t,pausedAt:l.time};case 6:let s=l.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(c=>({...c,pauseDuration:c.pauseDuration+s}))}}},Do=[],bb={toasts:[],pausedAt:void 0,settings:{toastLimit:Sk}},Wn={},xb=(t,l=Yd)=>{Wn[l]=vb(Wn[l]||bb,t),Do.forEach(([i,r])=>{i===l&&r(Wn[l])})},Sb=t=>Object.keys(Wn).forEach(l=>xb(t,l)),Ek=t=>Object.keys(Wn).find(l=>Wn[l].toasts.some(i=>i.id===t)),$o=(t=Yd)=>l=>{xb(l,t)},wk={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},kk=(t={},l=Yd)=>{let[i,r]=k.useState(Wn[l]||bb),o=k.useRef(Wn[l]);k.useEffect(()=>(o.current!==Wn[l]&&r(Wn[l]),Do.push([l,r]),()=>{let c=Do.findIndex(([d])=>d===l);c>-1&&Do.splice(c,1)}),[l]);let s=i.toasts.map(c=>{var d,p,m;return{...t,...t[c.type],...c,removeDelay:c.removeDelay||((d=t[c.type])==null?void 0:d.removeDelay)||t?.removeDelay,duration:c.duration||((p=t[c.type])==null?void 0:p.duration)||t?.duration||wk[c.type],style:{...t.style,...(m=t[c.type])==null?void 0:m.style,...c.style}}});return{...i,toasts:s}},Ck=(t,l="blank",i)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:l,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...i,id:i?.id||xk()}),Jr=t=>(l,i)=>{let r=Ck(l,t,i);return $o(r.toasterId||Ek(r.id))({type:2,toast:r}),r.id},Mt=(t,l)=>Jr("blank")(t,l);Mt.error=Jr("error");Mt.success=Jr("success");Mt.loading=Jr("loading");Mt.custom=Jr("custom");Mt.dismiss=(t,l)=>{let i={type:3,toastId:t};l?$o(l)(i):Sb(i)};Mt.dismissAll=t=>Mt.dismiss(void 0,t);Mt.remove=(t,l)=>{let i={type:4,toastId:t};l?$o(l)(i):Sb(i)};Mt.removeAll=t=>Mt.remove(void 0,t);Mt.promise=(t,l,i)=>{let r=Mt.loading(l.loading,{...i,...i?.loading});return typeof t=="function"&&(t=t()),t.then(o=>{let s=l.success?Mo(l.success,o):void 0;return s?Mt.success(s,{id:r,...i,...i?.success}):Mt.dismiss(r),o}).catch(o=>{let s=l.error?Mo(l.error,o):void 0;s?Mt.error(s,{id:r,...i,...i?.error}):Mt.dismiss(r)}),t};var Tk=1e3,jk=(t,l="default")=>{let{toasts:i,pausedAt:r}=kk(t,l),o=k.useRef(new Map).current,s=k.useCallback((g,b=Tk)=>{if(o.has(g))return;let S=setTimeout(()=>{o.delete(g),c({type:4,toastId:g})},b);o.set(g,S)},[]);k.useEffect(()=>{if(r)return;let g=Date.now(),b=i.map(S=>{if(S.duration===1/0)return;let E=(S.duration||0)+S.pauseDuration-(g-S.createdAt);if(E<0){S.visible&&Mt.dismiss(S.id);return}return setTimeout(()=>Mt.dismiss(S.id,l),E)});return()=>{b.forEach(S=>S&&clearTimeout(S))}},[i,r,l]);let c=k.useCallback($o(l),[l]),d=k.useCallback(()=>{c({type:5,time:Date.now()})},[c]),p=k.useCallback((g,b)=>{c({type:1,toast:{id:g,height:b}})},[c]),m=k.useCallback(()=>{r&&c({type:6,time:Date.now()})},[r,c]),y=k.useCallback((g,b)=>{let{reverseOrder:S=!1,gutter:E=8,defaultPosition:j}=b||{},R=i.filter(D=>(D.position||j)===(g.position||j)&&D.height),C=R.findIndex(D=>D.id===g.id),A=R.filter((D,ee)=>ee<C&&D.visible).length;return R.filter(D=>D.visible).slice(...S?[A+1]:[0,A]).reduce((D,ee)=>D+(ee.height||0)+E,0)},[i]);return k.useEffect(()=>{i.forEach(g=>{if(g.dismissed)s(g.id,g.removeDelay);else{let b=o.get(g.id);b&&(clearTimeout(b),o.delete(g.id))}})},[i,s]),{toasts:i,handlers:{updateHeight:p,startPause:d,endPause:m,calculateOffset:y}}},Ak=Al`
13
+ from {
14
+ transform: scale(0) rotate(45deg);
15
+ opacity: 0;
16
+ }
17
+ to {
18
+ transform: scale(1) rotate(45deg);
19
+ opacity: 1;
20
+ }`,Rk=Al`
21
+ from {
22
+ transform: scale(0);
23
+ opacity: 0;
24
+ }
25
+ to {
26
+ transform: scale(1);
27
+ opacity: 1;
28
+ }`,_k=Al`
29
+ from {
30
+ transform: scale(0) rotate(90deg);
31
+ opacity: 0;
32
+ }
33
+ to {
34
+ transform: scale(1) rotate(90deg);
35
+ opacity: 1;
36
+ }`,Nk=ha("div")`
37
+ width: 20px;
38
+ opacity: 0;
39
+ height: 20px;
40
+ border-radius: 10px;
41
+ background: ${t=>t.primary||"#ff4b4b"};
42
+ position: relative;
43
+ transform: rotate(45deg);
44
+
45
+ animation: ${Ak} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
46
+ forwards;
47
+ animation-delay: 100ms;
48
+
49
+ &:after,
50
+ &:before {
51
+ content: '';
52
+ animation: ${Rk} 0.15s ease-out forwards;
53
+ animation-delay: 150ms;
54
+ position: absolute;
55
+ border-radius: 3px;
56
+ opacity: 0;
57
+ background: ${t=>t.secondary||"#fff"};
58
+ bottom: 9px;
59
+ left: 4px;
60
+ height: 2px;
61
+ width: 12px;
62
+ }
63
+
64
+ &:before {
65
+ animation: ${_k} 0.15s ease-out forwards;
66
+ animation-delay: 180ms;
67
+ transform: rotate(90deg);
68
+ }
69
+ `,Dk=Al`
70
+ from {
71
+ transform: rotate(0deg);
72
+ }
73
+ to {
74
+ transform: rotate(360deg);
75
+ }
76
+ `,zk=ha("div")`
77
+ width: 12px;
78
+ height: 12px;
79
+ box-sizing: border-box;
80
+ border: 2px solid;
81
+ border-radius: 100%;
82
+ border-color: ${t=>t.secondary||"#e0e0e0"};
83
+ border-right-color: ${t=>t.primary||"#616161"};
84
+ animation: ${Dk} 1s linear infinite;
85
+ `,Ok=Al`
86
+ from {
87
+ transform: scale(0) rotate(45deg);
88
+ opacity: 0;
89
+ }
90
+ to {
91
+ transform: scale(1) rotate(45deg);
92
+ opacity: 1;
93
+ }`,Mk=Al`
94
+ 0% {
95
+ height: 0;
96
+ width: 0;
97
+ opacity: 0;
98
+ }
99
+ 40% {
100
+ height: 0;
101
+ width: 6px;
102
+ opacity: 1;
103
+ }
104
+ 100% {
105
+ opacity: 1;
106
+ height: 10px;
107
+ }`,Lk=ha("div")`
108
+ width: 20px;
109
+ opacity: 0;
110
+ height: 20px;
111
+ border-radius: 10px;
112
+ background: ${t=>t.primary||"#61d345"};
113
+ position: relative;
114
+ transform: rotate(45deg);
115
+
116
+ animation: ${Ok} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
117
+ forwards;
118
+ animation-delay: 100ms;
119
+ &:after {
120
+ content: '';
121
+ box-sizing: border-box;
122
+ animation: ${Mk} 0.2s ease-out forwards;
123
+ opacity: 0;
124
+ animation-delay: 200ms;
125
+ position: absolute;
126
+ border-right: 2px solid;
127
+ border-bottom: 2px solid;
128
+ border-color: ${t=>t.secondary||"#fff"};
129
+ bottom: 6px;
130
+ left: 6px;
131
+ height: 10px;
132
+ width: 6px;
133
+ }
134
+ `,Uk=ha("div")`
135
+ position: absolute;
136
+ `,Bk=ha("div")`
137
+ position: relative;
138
+ display: flex;
139
+ justify-content: center;
140
+ align-items: center;
141
+ min-width: 20px;
142
+ min-height: 20px;
143
+ `,Hk=Al`
144
+ from {
145
+ transform: scale(0.6);
146
+ opacity: 0.4;
147
+ }
148
+ to {
149
+ transform: scale(1);
150
+ opacity: 1;
151
+ }`,qk=ha("div")`
152
+ position: relative;
153
+ transform: scale(0.6);
154
+ opacity: 0.4;
155
+ min-width: 20px;
156
+ animation: ${Hk} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
157
+ forwards;
158
+ `,Yk=({toast:t})=>{let{icon:l,type:i,iconTheme:r}=t;return l!==void 0?typeof l=="string"?k.createElement(qk,null,l):l:i==="blank"?null:k.createElement(Bk,null,k.createElement(zk,{...r}),i!=="loading"&&k.createElement(Uk,null,i==="error"?k.createElement(Nk,{...r}):k.createElement(Lk,{...r})))},Gk=t=>`
159
+ 0% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;}
160
+ 100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
161
+ `,Fk=t=>`
162
+ 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
163
+ 100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;}
164
+ `,Vk="0%{opacity:0;} 100%{opacity:1;}",Ik="0%{opacity:1;} 100%{opacity:0;}",Xk=ha("div")`
165
+ display: flex;
166
+ align-items: center;
167
+ background: #fff;
168
+ color: #363636;
169
+ line-height: 1.3;
170
+ will-change: transform;
171
+ box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
172
+ max-width: 350px;
173
+ pointer-events: auto;
174
+ padding: 8px 10px;
175
+ border-radius: 8px;
176
+ `,Qk=ha("div")`
177
+ display: flex;
178
+ justify-content: center;
179
+ margin: 4px 10px;
180
+ color: inherit;
181
+ flex: 1 1 auto;
182
+ white-space: pre-line;
183
+ `,$k=(t,l)=>{let i=t.includes("top")?1:-1,[r,o]=yb()?[Vk,Ik]:[Gk(i),Fk(i)];return{animation:l?`${Al(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Al(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Kk=k.memo(({toast:t,position:l,style:i,children:r})=>{let o=t.height?$k(t.position||l||"top-center",t.visible):{opacity:0},s=k.createElement(Yk,{toast:t}),c=k.createElement(Qk,{...t.ariaProps},Mo(t.message,t));return k.createElement(Xk,{className:t.className,style:{...o,...i,...t.style}},typeof r=="function"?r({icon:s,message:c}):k.createElement(k.Fragment,null,s,c))});vk(k.createElement);var Zk=({id:t,className:l,style:i,onHeightUpdate:r,children:o})=>{let s=k.useCallback(c=>{if(c){let d=()=>{let p=c.getBoundingClientRect().height;r(t,p)};d(),new MutationObserver(d).observe(c,{subtree:!0,childList:!0,characterData:!0})}},[t,r]);return k.createElement("div",{ref:s,className:l,style:i},o)},Pk=(t,l)=>{let i=t.includes("top"),r=i?{top:0}:{bottom:0},o=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:yb()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${l*(i?1:-1)}px)`,...r,...o}},Jk=Qo`
184
+ z-index: 9999;
185
+ > * {
186
+ pointer-events: auto;
187
+ }
188
+ `,So=16,Wk=({reverseOrder:t,position:l="top-center",toastOptions:i,gutter:r,children:o,toasterId:s,containerStyle:c,containerClassName:d})=>{let{toasts:p,handlers:m}=jk(i,s);return k.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:So,left:So,right:So,bottom:So,pointerEvents:"none",...c},className:d,onMouseEnter:m.startPause,onMouseLeave:m.endPause},p.map(y=>{let g=y.position||l,b=m.calculateOffset(y,{reverseOrder:t,gutter:r,defaultPosition:l}),S=Pk(g,b);return k.createElement(Zk,{id:y.id,key:y.id,onHeightUpdate:m.updateHeight,className:y.visible?Jk:"",style:S},y.type==="custom"?Mo(y.message,y):o?o(y):k.createElement(Kk,{toast:y,position:g}))}))};function eC(){return v.jsx(Wk,{position:"bottom-right",toastOptions:{style:{background:"var(--bg-surface)",color:"var(--text)",border:"1px solid var(--border)",fontFamily:"var(--font-mono)",fontSize:"13px"},success:{iconTheme:{primary:"var(--green)",secondary:"var(--bg-surface)"}},error:{iconTheme:{primary:"var(--red)",secondary:"var(--bg-surface)"}}}})}const Eb=k.createContext(null);function Wr(){const t=k.useContext(Eb);if(!t)throw new Error("useAppContext must be used within AppShell");return t}function tC(){const[t,l]=k.useState(()=>window.innerWidth<=768);return k.useEffect(()=>{const i=window.matchMedia("(max-width: 768px)"),r=o=>l(o.matches);return i.addEventListener("change",r),()=>i.removeEventListener("change",r)},[]),t}function nC(){const[t,l]=k.useState(()=>Di()),[i,r]=k.useState(null),[o,s]=k.useState(null),[c,d]=k.useState(!1),[p]=k.useState(!1),[m,y]=k.useState(null),[g,b]=k.useState(()=>Vr()),[S,E]=k.useState(()=>localStorage.getItem("sidebarCollapsed")==="true"),[j,R]=k.useState(!1),C=tC(),A=k.useCallback(()=>{E(ne=>(localStorage.setItem("sidebarCollapsed",String(!ne)),!ne))},[]),D=k.useCallback(()=>R(!0),[]),ee=k.useCallback(()=>R(!1),[]),$=Rl(),B=Qn(),z=k.useCallback(()=>{b(Vr())},[]),le=k.useCallback(()=>{l(Di()),y(null)},[]),W=k.useRef(B.pathname);k.useEffect(()=>{const ne=te=>te.startsWith("/session/")||te.startsWith("/shared/")||te.startsWith("/room/"),K=ne(W.current),H=ne(B.pathname);W.current=B.pathname,R(!1),H&&!K&&(E(!0),localStorage.setItem("sidebarCollapsed","true")),!H&&K&&(E(!1),localStorage.setItem("sidebarCollapsed","false")),H||le()},[B.pathname,le]);const _=k.useCallback(async()=>{const ne=Lw();if(s(ne),No()&&Xf()){r("oauth");return}try{const{oauthToken:K}=await Zw();if(K){Nw(K),r("keychain");return}}catch{if(Xf()){r("keychain");return}}if(_w()){r("api-key");return}r(null),d(!0)},[]);k.useEffect(()=>{_()},[_]);const F=k.useCallback((ne,K)=>{const H=ne.split(/\s+/).slice(0,3).join(" ");y({name:H||"New project"}),$("/session/new",{state:{description:ne,freeform:K}})},[$]),q=k.useCallback(async ne=>{try{await Xw(ne)}catch{}Uw(ne),le(),B.pathname===`/session/${ne}`&&$("/")},[B.pathname,$,le]),V={sessions:t,pendingProject:m,authSource:i,hasGhToken:o,showSettings:c,setShowSettings:d,refreshSessions:le,refreshSettings:_,handleNewProject:F,handleDeleteSession:q,loading:p,agentRooms:g,refreshAgentRooms:z};return v.jsxs(Eb.Provider,{value:V,children:[v.jsxs("div",{className:`app-shell ${S?"sidebar-collapsed":""}`,children:[C&&j&&v.jsx("div",{className:"sidebar-backdrop",onClick:ee,onKeyDown:ne=>{ne.key==="Escape"&&ee()}}),v.jsx(fk,{collapsed:S,onToggle:A,mobileOpen:j,onMobileClose:ee}),v.jsx("main",{className:"main-content",children:v.jsx(YE,{context:{openMobileDrawer:D}})}),v.jsx("button",{type:"button",className:"global-settings-btn",onClick:()=>d(ne=>!ne),title:"Settings",children:v.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16","aria-label":"Settings",children:[v.jsx("title",{children:"Settings"}),v.jsx("path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}),v.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]}),v.jsx(eC,{})]})}function wb({onSubmit:t,placeholder:l,disabled:i,isRunning:r,onCancel:o}){const[s,c]=k.useState(""),d=k.useRef(null),p=k.useCallback(()=>{const b=s.trim();b&&(t(b),c(""),d.current&&(d.current.style.height="auto"))},[s,t]),m=k.useCallback(()=>{r&&o&&o()},[r,o]);Xo(m,!r);const y=k.useCallback(b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),p())},[p]),g=k.useCallback(()=>{const b=d.current;b&&(b.style.height="auto",b.style.height=`${Math.min(b.scrollHeight,200)}px`)},[]);return v.jsxs("div",{className:"prompt-bar",children:[v.jsx("textarea",{ref:d,value:s,onChange:b=>{c(b.target.value),g()},onKeyDown:y,placeholder:l??"Describe what you want to build...",disabled:i,rows:1}),v.jsx("button",{className:"primary",onClick:p,disabled:i||!s.trim(),children:"Send"}),r&&o&&v.jsx("button",{className:"danger",onClick:o,children:"Stop"})]})}function lC(t){const l=Date.now()-new Date(t).getTime(),i=Math.floor(l/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const r=Math.floor(i/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function aC({onSelect:t,onClose:l}){const[i,r]=k.useState([]),[o,s]=k.useState(!0),[c,d]=k.useState(null),[p,m]=k.useState(""),[y,g]=k.useState(null),[b,S]=k.useState([]),[E,j]=k.useState(!1),[R,C]=k.useState(""),[A,D]=k.useState(""),[ee,$]=k.useState(!1);k.useEffect(()=>{$w().then(V=>{r(V.repos),s(!1)}).catch(V=>{d(V instanceof Error?V.message:"Failed to load repos"),s(!1)})},[]);function B(V){g(V),j(!0),S([]),C(""),$(!1),D(""),Kw(V.nameWithOwner).then(ne=>{S(ne.branches),j(!1)}).catch(()=>{j(!1)})}function z(){g(null),S([]),C(""),$(!1)}function le(V){y&&t(y.url,V)}const W=k.useCallback(()=>{y?z():l()},[y,l]);Xo(W);const _=p?i.filter(V=>V.nameWithOwner.toLowerCase().includes(p.toLowerCase())):i,q=[...R?b.filter(V=>V.name.toLowerCase().includes(R.toLowerCase())):b].sort((V,ne)=>V.isDefault&&!ne.isDefault?-1:!V.isDefault&&ne.isDefault?1:V.name.localeCompare(ne.name));return Fo.createPortal(v.jsx("div",{className:"modal-overlay",onClick:l,children:v.jsx("div",{className:"modal-card",onClick:V=>V.stopPropagation(),style:{maxWidth:500},children:y?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"modal-title",children:[v.jsx("button",{type:"button",onClick:z,style:{background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:"0 8px 0 0",fontSize:14},children:"←"}),y.nameWithOwner]}),v.jsx("div",{className:"repo-picker-filter",children:v.jsx("input",{type:"text",value:R,onChange:V=>C(V.target.value),placeholder:"Filter branches..."})}),E&&v.jsx("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-subtle)"},children:"Loading branches..."}),!E&&v.jsxs("div",{className:"repo-picker-list",children:[q.map(V=>v.jsx("div",{className:"repo-picker-item",onClick:()=>le(V.name),children:v.jsxs("span",{className:"repo-picker-item-name",children:[V.name,V.isDefault&&v.jsx("span",{style:{marginLeft:8,fontSize:11,color:"var(--text-subtle)",fontWeight:400},children:"default"})]})},V.name)),ee?v.jsxs("div",{className:"repo-picker-new-branch",children:[v.jsx("input",{type:"text",value:A,onChange:V=>D(V.target.value),onKeyDown:V=>{V.key==="Enter"&&A.trim()&&le(A.trim())},placeholder:"branch-name"}),v.jsx("button",{type:"button",className:"modal-btn modal-btn-primary",disabled:!A.trim(),onClick:()=>le(A.trim()),children:"Create"})]}):v.jsx("div",{className:"repo-picker-item",style:{color:"var(--brand-1)"},onClick:()=>$(!0),children:v.jsx("span",{className:"repo-picker-item-name",children:"+ Create new branch"})})]}),v.jsxs("div",{className:"modal-actions",children:[v.jsx("button",{type:"button",className:"modal-btn",onClick:z,children:"Back"}),v.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"})]})]}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"modal-title",children:"Resume from GitHub"}),v.jsx("div",{className:"repo-picker-filter",children:v.jsx("input",{type:"text",value:p,onChange:V=>m(V.target.value),placeholder:"Filter repositories..."})}),o&&v.jsx("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-subtle)"},children:"Loading repositories..."}),c&&v.jsx("div",{style:{padding:"16px 0",color:"var(--red)",fontSize:13},children:c}),!o&&!c&&v.jsx("div",{className:"repo-picker-list",children:_.length===0?v.jsx("div",{style:{padding:16,textAlign:"center",color:"var(--text-subtle)",fontSize:13},children:p?"No matching repos":"No repos found"}):_.map(V=>v.jsxs("div",{className:"repo-picker-item",onClick:()=>B(V),children:[v.jsx("span",{className:"repo-picker-item-name",children:V.nameWithOwner}),v.jsx("span",{className:"repo-picker-item-date",children:lC(V.updatedAt)})]},V.nameWithOwner))}),v.jsx("div",{className:"modal-actions",children:v.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"})})]})})}),document.body)}function kb({authSource:t,hasGhToken:l,onKeySaved:i,onClose:r,onCopyLog:o}){const s=k.useId(),c=k.useId(),[d,p]=k.useState(No()||t==="oauth"?"oauth":"api-key"),[m,y]=k.useState(""),[g,b]=k.useState(""),[S,E]=k.useState(!1),j=d==="api-key"?t==="api-key":No(),R=k.useCallback(()=>{m.trim()&&(d==="api-key"?Aw(m.trim()):zw(m.trim()),y(""),i())},[m,d,i]),C=k.useCallback(()=>{d==="api-key"?Rw():Dw(),i()},[d,i]),A=k.useCallback(()=>{g.trim()&&(Ow(g.trim()),b(""),i())},[g,i]),D=k.useCallback(()=>{Mw(),i()},[i]),ee=k.useCallback(le=>{le.key==="Enter"&&(le.preventDefault(),R())},[R]),$=k.useCallback(le=>{le.key==="Enter"&&(le.preventDefault(),A())},[A]),B=k.useCallback(()=>{o?.(),E(!0),setTimeout(()=>E(!1),2e3)},[o]);Xo(r);const z=d==="api-key"?t==="api-key"?"Enter new key to override...":"sk-ant-...":No()?"Enter new token to override...":"Paste OAuth token...";return Fo.createPortal(v.jsx("div",{className:"modal-overlay",onClick:r,children:v.jsxs("div",{className:"modal-card",onClick:le=>le.stopPropagation(),children:[v.jsx("div",{className:"modal-title",children:"Settings"}),v.jsxs("div",{className:"settings-field",style:{marginTop:12},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[v.jsx("label",{htmlFor:s,style:{margin:0},children:"Claude Authentication"}),v.jsx("span",{className:`settings-status ${t?"active":"missing"}`,children:t==="keychain"?"Using Claude keychain":t==="oauth"?"OAuth token set":t==="api-key"?"API key set":"No credentials"})]}),t==="keychain"&&v.jsx("div",{style:{fontSize:11,color:"var(--text-subtle)",marginBottom:8},children:"Credentials detected from macOS Keychain. No manual key needed."}),!t&&v.jsx("div",{style:{fontSize:11,color:"var(--text-subtle)",marginBottom:8},children:"If you have Claude Code installed on macOS, credentials are automatically read from the Keychain. Otherwise, enter a key below."}),v.jsxs("div",{className:"settings-input-row",children:[v.jsxs("select",{value:d,onChange:le=>{p(le.target.value),y("")},className:"settings-key-type-select",children:[v.jsx("option",{value:"api-key",children:"API Key"}),v.jsx("option",{value:"oauth",children:"OAuth Token"})]}),v.jsx("input",{id:s,type:"password",value:m,onChange:le=>y(le.target.value),onKeyDown:ee,placeholder:z}),m.trim()?v.jsx("button",{type:"button",onClick:R,className:"primary",children:"Save"}):j&&v.jsx("button",{type:"button",onClick:C,className:"btn btn-danger",children:"Remove"})]})]}),v.jsx("div",{className:"settings-divider"}),v.jsx("div",{className:"settings-section-label",children:"GitHub"}),v.jsxs("div",{className:"settings-field",children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[v.jsx("label",{htmlFor:c,style:{margin:0},children:"Personal Access Token"}),v.jsx("span",{className:`settings-status ${l?"active":"missing"}`,children:l?"Connected":"Not connected"})]}),v.jsxs("div",{className:"settings-input-row",children:[v.jsx("input",{id:c,type:"password",value:g,onChange:le=>b(le.target.value),onKeyDown:$,placeholder:l?"Enter new token to override...":"ghp_..."}),g.trim()?v.jsx("button",{type:"button",onClick:A,className:"primary",children:"Save"}):l&&v.jsx("button",{type:"button",onClick:D,className:"btn btn-danger",children:"Remove"})]}),v.jsxs("div",{style:{fontSize:11,color:"var(--text-subtle)",marginTop:4},children:["Required scopes: ",v.jsx("code",{children:"repo"}),", ",v.jsx("code",{children:"read:user"}),". Create one at"," ",v.jsx("a",{href:"https://github.com/settings/tokens/new?scopes=repo,read:user",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--brand-1)"},children:"github.com/settings/tokens"})]})]}),v.jsx("div",{className:"settings-divider"}),o&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"settings-divider"}),v.jsx("div",{className:"settings-section-label",children:"Debug"}),v.jsx("button",{type:"button",className:"btn",onClick:B,children:S?"Copied!":"Copy session log"})]}),v.jsx("div",{className:"modal-actions",style:{marginTop:16},children:v.jsx("button",{type:"button",className:"modal-btn",onClick:r,children:"Close"})})]})}),document.body)}function iC(){const{authSource:t,hasGhToken:l,showSettings:i,setShowSettings:r,refreshSettings:o,refreshSessions:s,handleNewProject:c,loading:d}=Wr(),p=Rl(),{openMobileDrawer:m}=kd(),[y]=xw(),g=y.get("mode")==="session",[b,S]=k.useState(!1),[E,j]=k.useState(!1),R=k.useCallback(A=>{c(A,!0)},[c]),C=k.useCallback(async(A,D)=>{S(!1),j(!0);try{const{sessionId:ee,session:$}=await Pw(A,D);Md($),s(),p(`/session/${ee}`)}catch(ee){console.error("Failed to resume from GitHub:",ee)}finally{j(!1)}},[p,s]);return v.jsxs(v.Fragment,{children:[i&&v.jsx(kb,{authSource:t,hasGhToken:l??!1,onKeySaved:o,onClose:()=>r(!1)}),v.jsxs("div",{className:"mobile-home-topbar",children:[v.jsx("button",{type:"button",className:"mobile-hamburger",onClick:m,"aria-label":"Open menu",children:v.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[v.jsx("title",{children:"Menu"}),v.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),v.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),v.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),v.jsx("img",{src:"/img/brand/logo.svg",alt:"Electric",className:"mobile-topbar-logo"})]}),v.jsxs("div",{className:"hero",children:[v.jsx("img",{src:"/img/brand/logo.svg",alt:"Electric",className:"hero-logo"}),v.jsx("p",{className:"hero-subtitle",children:g?"Start a freeform session":"Build Reactive apps on Sync"}),v.jsx("div",{className:"hero-prompt",children:v.jsx(wb,{onSubmit:g?R:c,placeholder:t?g?"What do you want to work on?":"What do you want to build?":"Set an API key in Settings to get started...",disabled:d||!t})}),l&&v.jsx("button",{type:"button",className:"hero-resume-btn",onClick:()=>S(!0),disabled:E,children:E?"Cloning...":"Resume from GitHub"})]}),b&&v.jsx(aC,{onSelect:C,onClose:()=>S(!1)})]})}function rC(t){const[l,i]=k.useState([]),[r,o]=k.useState(!1),s=k.useRef("-1");k.useEffect(()=>{if(!t)return;i([]),o(!1),s.current="-1";let p=!1,m=null,y=0;const g=10;function b(){if(p)return;if(y>=g){o(!1);return}const S=new URLSearchParams,E=hb(t);E&&S.set("token",E),s.current!=="-1"&&S.set("offset",s.current);const j=S.toString(),R=`/api/rooms/${t}/events${j?`?${j}`:""}`;m=new EventSource(R),m.onopen=()=>{p||(y=0,o(!0))},m.onmessage=C=>{if(!p){C.lastEventId&&(s.current=C.lastEventId);try{const A=JSON.parse(C.data);i(D=>[...D,A])}catch{}}},m.onerror=()=>{if(p)return;m?.close(),y++;const C=Math.min(1e3*2**(y-1),3e4);setTimeout(b,C)}}return b(),()=>{p=!0,m&&(m.close(),m=null)}},[t]);const c=l.filter(p=>p.type==="agent_message"),d=l.some(p=>p.type==="room_closed");return{events:l,messages:c,isLive:r,isClosed:d}}function uC(){const{id:t}=eb(),l=Rl(),{openMobileDrawer:i}=kd(),{refreshSessions:r}=Wr(),[o,s]=k.useState(null),[c,d]=k.useState(null),[p,m]=k.useState(!1),[y,g]=k.useState(!1),b=k.useRef(!1),{events:S,isClosed:E}=rC(t??null),j=t?Vr().find(D=>D.id===t):void 0;k.useEffect(()=>{if(!t)return;let D=!1;b.current=!1;const ee=()=>{Ny(t).then(B=>{if(!D){b.current=!0,s(B),d(null);for(const z of B.participants)Qf(z.sessionId,{status:z.running?"running":"complete"});r()}}).catch(B=>{if(!D){const z=B instanceof Error?B.message:String(B);z.includes("not found")||z.includes("Not Found")?d(z):b.current||d(z)}})};ee();const $=setInterval(ee,5e3);return()=>{D=!0,clearInterval($)}},[t,r]);const R=k.useCallback(async()=>{if(t)try{await lk(t),s(D=>D&&{...D,state:"closed"})}catch(D){console.error("Failed to close room:",D)}},[t]);if(c)return v.jsxs("div",{className:"room-error",children:[v.jsx("h2",{children:"Cannot load room"}),v.jsx("p",{children:c}),v.jsx("button",{type:"button",className:"btn",onClick:()=>l("/"),children:"Go Home"})]});const C=E?"closed":o?.state,A=o?.participants??[];return v.jsxs(v.Fragment,{children:[v.jsx(oC,{roomId:t,roomName:j?.name,roomCode:j?.code,state:C,participants:A,onClose:R,onAddAgent:()=>m(!0),openMobileDrawer:i}),v.jsxs("div",{className:"session-content",children:[v.jsx("div",{className:"room-messages",children:v.jsx(cC,{events:S,participants:A})}),v.jsx(fC,{roomId:t??"",participants:A,disabled:C==="closed"||y,sending:y,setSending:g})]}),p&&t&&v.jsx(hC,{roomId:t,onClose:()=>m(!1),onAdded:()=>{m(!1),r(),Ny(t).then(s).catch(()=>{})}})]})}function oC({roomId:t,roomName:l,roomCode:i,state:r,participants:o,onClose:s,onAddAgent:c,openMobileDrawer:d}){const p=Rl(),[m,y]=k.useState(!1),g=k.useCallback(()=>{if(!t||!i)return;const b=`${t}:${i}`;navigator.clipboard.writeText(b),y(!0),setTimeout(()=>y(!1),2e3)},[t,i]);return v.jsxs("div",{className:"session-header",children:[v.jsx("button",{type:"button",className:"mobile-hamburger",onClick:d,"aria-label":"Open menu",children:v.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[v.jsx("title",{children:"Menu"}),v.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),v.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),v.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),v.jsx("span",{className:"session-header-name",children:l||`Room ${t?.slice(0,8)}`}),r==="active"&&v.jsx("span",{className:"session-header-status",style:{color:"var(--green)"},children:"Active"}),r==="closed"&&v.jsx("span",{className:"session-header-status",style:{color:"var(--text-subtle)"},children:"Closed"}),v.jsx("span",{className:"room-header-participants",children:o.map(b=>{const S=qd(b.sessionId),E=b.name.split(/[-_ ]+/).slice(0,2).map(j=>j.charAt(0).toUpperCase()).join("");return v.jsx("button",{type:"button",className:"room-header-avatar",style:{background:S.bg,color:S.fg},title:b.name,onClick:()=>p(`/session/${b.sessionId}`),children:E},b.sessionId)})}),i&&v.jsxs(v.Fragment,{children:[v.jsx("span",{className:"invite-code-label",children:"Join code:"}),v.jsx("button",{type:"button",className:"invite-code-btn",onClick:g,children:m?"Copied!":i})]}),v.jsxs("span",{className:"session-header-actions-group",children:[v.jsx("button",{type:"button",className:"session-header-action",onClick:c,disabled:r==="closed",children:"+ Agent"}),r==="active"&&v.jsx("button",{type:"button",className:"session-header-action",onClick:s,children:"Close Room"})]})]})}function sC({name:t,participants:l}){const i=Rl(),r=l.find(o=>o.name===t);return r?v.jsx("button",{type:"button",className:"room-message-from room-message-from-link",onClick:()=>i(`/session/${r.sessionId}`),title:`Go to ${t}'s session`,children:t}):v.jsx("span",{className:"room-message-from",children:t})}function cC({events:t,participants:l}){const i=k.useRef(null),r=l.filter(o=>o.running);return k.useEffect(()=>{i.current?.scrollIntoView({behavior:"smooth"})},[t.length,r.length]),t.length===0?v.jsx("div",{className:"room-empty",children:v.jsx("p",{children:"No messages yet. Add agents to start the conversation."})}):v.jsxs("div",{className:"room-event-list",children:[t.map((o,s)=>{const c=`${o.ts}-${s}`;switch(o.type){case"agent_message":return v.jsxs("div",{className:"room-event room-message",children:[v.jsxs("div",{className:"room-message-header",children:[v.jsx(sC,{name:o.from,participants:l}),o.to&&v.jsxs("span",{className:"room-message-to",children:["→ ",o.to]}),v.jsx("span",{className:"room-message-time",children:new Date(o.ts).toLocaleTimeString()})]}),v.jsx("div",{className:"room-message-body",children:o.body})]},c);case"participant_joined":return v.jsxs("div",{className:"room-event room-system-event",children:[v.jsxs("span",{children:[o.participant?.displayName??"Unknown"," joined the room"]}),v.jsx("span",{className:"room-message-time",children:new Date(o.ts).toLocaleTimeString()})]},c);case"participant_left":return v.jsx("div",{className:"room-event room-system-event",children:v.jsx("span",{children:"Participant left"})},c);case"room_closed":return v.jsxs("div",{className:"room-event room-system-event room-closed-event",children:[v.jsxs("span",{children:["Room closed by ",o.closedBy]}),o.summary&&v.jsxs("span",{children:[" — ",o.summary]})]},c);default:return null}}),r.length>0&&v.jsxs("div",{className:"room-working-indicator",children:[v.jsxs("span",{className:"room-working-dots",children:[v.jsx("span",{}),v.jsx("span",{}),v.jsx("span",{})]}),v.jsxs("span",{className:"room-working-text",children:[r.map(o=>o.name).join(", ")," ",r.length===1?"is":"are"," working"]})]}),v.jsx("div",{ref:i})]})}function fC({roomId:t,participants:l,disabled:i,sending:r,setSending:o}){const[s,c]=k.useState(""),[d,p]=k.useState("broadcast"),[m,y]=k.useState(null),g=k.useRef(null),b=k.useCallback(async()=>{const E=s.trim();if(!(!E||!t)){o(!0),y(null);try{const j=sb(),R=d==="broadcast"?void 0:d;await nk(t,j.displayName,E,R),c(""),g.current&&(g.current.style.height="auto")}catch(j){const R=j instanceof Error?j.message:"Failed to send message";y(R)}finally{o(!1)}}},[s,t,d,o]),S=k.useCallback(()=>{const E=g.current;E&&(E.style.height="auto",E.style.height=`${Math.min(E.scrollHeight,200)}px`)},[]);return v.jsxs("div",{className:"prompt-bar room-prompt-bar",children:[m&&v.jsxs("div",{className:"room-send-error",children:[m,v.jsx("button",{type:"button",onClick:()=>y(null),children:"×"})]}),v.jsxs("select",{className:"room-target-select",value:d,onChange:E=>p(E.target.value),disabled:i,children:[v.jsx("option",{value:"broadcast",children:"@room (broadcast)"}),l.map(E=>v.jsxs("option",{value:E.name,children:["@",E.name]},E.sessionId))]}),v.jsx("textarea",{ref:g,value:s,onChange:E=>{c(E.target.value),S()},onKeyDown:E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),b())},placeholder:i?"Room closed":"Send a message...",disabled:i,rows:1}),v.jsx("button",{type:"button",className:"primary",onClick:b,disabled:i||!s.trim()||r,children:r?"...":"Send"})]})}const dC=[{value:"coder",label:"Coder",description:"Writes code, creates PRs"},{value:"reviewer",label:"Reviewer",description:"Reviews PRs (read-only)"}];function hC({roomId:t,onClose:l,onAdded:i}){const{sessions:r}=Wr(),[o,s]=k.useState("new"),[c,d]=k.useState(""),[p,m]=k.useState(!1),[y,g]=k.useState(""),[b,S]=k.useState(""),[E,j]=k.useState(!1),[R,C]=k.useState(null),A=r.filter($=>$.status==="running"||$.status==="complete"),D=k.useCallback(async()=>{j(!0),C(null);try{if(o==="existing"){if(!b)return;const B=A.find(z=>z.id===b)?.projectName??b.slice(0,8);await tk(t,{sessionId:b,name:B,initialPrompt:y.trim()||void 0})}else{const $=await ek(t,{role:c.trim()||void 0,gated:p,initialPrompt:y.trim()||void 0});$.sessionToken&&Ud($.sessionId,$.sessionToken),Md({id:$.sessionId,projectName:$.participantName,sandboxProjectDir:"",description:c.trim()||`Agent in room ${t.slice(0,8)}`,createdAt:new Date().toISOString(),lastActiveAt:new Date().toISOString(),status:"running"})}i()}catch($){C($ instanceof Error?$.message:"Failed to add agent")}finally{j(!1)}},[t,o,c,p,y,b,A,i]),ee=o==="existing"?!!b:!0;return v.jsx("div",{className:"modal-overlay",onClick:l,children:v.jsxs("div",{className:"modal-card",onClick:$=>$.stopPropagation(),children:[v.jsx("div",{className:"modal-title",children:"Add Agent to Room"}),v.jsxs("div",{className:"modal-body",children:[v.jsxs("div",{className:"room-form-toggle",children:[v.jsx("button",{type:"button",className:`room-form-toggle-btn ${o==="new"?"active":""}`,onClick:()=>s("new"),children:"New Agent"}),v.jsx("button",{type:"button",className:`room-form-toggle-btn ${o==="existing"?"active":""}`,onClick:()=>s("existing"),children:"Existing Session"})]}),o==="existing"?v.jsxs("label",{className:"room-form-label",children:["Session *",v.jsxs("select",{value:b,onChange:$=>S($.target.value),children:[v.jsx("option",{value:"",children:"Select a session..."}),A.map($=>v.jsxs("option",{value:$.id,children:[$.projectName," (",$.id.slice(0,8),")"]},$.id))]})]}):v.jsxs(v.Fragment,{children:[v.jsxs("label",{className:"room-form-label",children:["Role",v.jsxs("select",{value:c,onChange:$=>d($.target.value),children:[v.jsx("option",{value:"",children:"No role (generic participant)"}),dC.map($=>v.jsxs("option",{value:$.value,children:[$.label," — ",$.description]},$.value))]})]}),v.jsxs("label",{className:"room-form-label",children:["Initial Prompt",v.jsx("textarea",{value:y,onChange:$=>g($.target.value),placeholder:"Optional message to send after agent joins",rows:3})]}),v.jsxs("label",{className:"room-form-checkbox",children:[v.jsx("input",{type:"checkbox",checked:p,onChange:$=>m($.target.checked)}),"Gated (require approval for outbound messages)"]})]}),R&&v.jsx("p",{className:"room-form-error",children:R})]}),v.jsxs("div",{className:"modal-actions",children:[v.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"}),v.jsx("button",{type:"button",className:"modal-btn primary",onClick:D,disabled:!ee||E,children:E?"Adding...":o==="existing"?"Join Room":"Add Agent"})]})]})})}function mC(t,l){const i={};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const pC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yC={};function Oy(t,l){return(yC.jsx?gC:pC).test(t)}const vC=/[ \t\n\f\r]/g;function bC(t){return typeof t=="object"?t.type==="text"?My(t.value):!1:My(t)}function My(t){return t.replace(vC,"")===""}class eu{constructor(l,i,r){this.normal=i,this.property=l,r&&(this.space=r)}}eu.prototype.normal={};eu.prototype.property={};eu.prototype.space=void 0;function Cb(t,l){const i={},r={};for(const o of t)Object.assign(i,o.property),Object.assign(r,o.normal);return new eu(i,r,l)}function Pf(t){return t.toLowerCase()}class un{constructor(l,i){this.attribute=i,this.property=l}}un.prototype.attribute="";un.prototype.booleanish=!1;un.prototype.boolean=!1;un.prototype.commaOrSpaceSeparated=!1;un.prototype.commaSeparated=!1;un.prototype.defined=!1;un.prototype.mustUseProperty=!1;un.prototype.number=!1;un.prototype.overloadedBoolean=!1;un.prototype.property="";un.prototype.spaceSeparated=!1;un.prototype.space=void 0;let xC=0;const Ue=Fa(),_t=Fa(),Jf=Fa(),fe=Fa(),ct=Fa(),Ni=Fa(),vn=Fa();function Fa(){return 2**++xC}const Wf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:_t,commaOrSpaceSeparated:vn,commaSeparated:Ni,number:fe,overloadedBoolean:Jf,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),xf=Object.keys(Wf);class Gd extends un{constructor(l,i,r,o){let s=-1;if(super(l,i),Ly(this,"space",o),typeof r=="number")for(;++s<xf.length;){const c=xf[s];Ly(this,xf[s],(r&Wf[c])===Wf[c])}}}Gd.prototype.defined=!0;function Ly(t,l,i){i&&(t[l]=i)}function Oi(t){const l={},i={};for(const[r,o]of Object.entries(t.properties)){const s=new Gd(r,t.transform(t.attributes||{},r),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),l[r]=s,i[Pf(r)]=r,i[Pf(s.attribute)]=r}return new eu(l,i,t.space)}const Tb=Oi({properties:{ariaActiveDescendant:null,ariaAtomic:_t,ariaAutoComplete:null,ariaBusy:_t,ariaChecked:_t,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:_t,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:_t,ariaFlowTo:ct,ariaGrabbed:_t,ariaHasPopup:null,ariaHidden:_t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:fe,ariaLive:null,ariaModal:_t,ariaMultiLine:_t,ariaMultiSelectable:_t,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:_t,ariaReadOnly:_t,ariaRelevant:null,ariaRequired:_t,ariaRoleDescription:ct,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:_t,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(t,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function jb(t,l){return l in t?t[l]:l}function Ab(t,l){return jb(t,l.toLowerCase())}const SC=Oi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ni,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:ct,autoFocus:Ue,autoPlay:Ue,blocking:ct,capture:null,charSet:null,checked:Ue,cite:null,className:ct,cols:fe,colSpan:null,content:null,contentEditable:_t,controls:Ue,controlsList:ct,coords:fe|Ni,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:Jf,draggable:_t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:ct,height:fe,hidden:Jf,high:fe,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:ct,itemRef:ct,itemScope:Ue,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,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:Ue,optimum:fe,pattern:null,ping:ct,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:ct,required:Ue,reversed:Ue,rows:fe,rowSpan:fe,sandbox:ct,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:_t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:_t,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:_t,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:Ab}),EC=Oi({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:vn,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:ct,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:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,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:Ni,g2:Ni,glyphName:Ni,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:vn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,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:fe,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:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vn,rev:vn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vn,requiredFeatures:vn,requiredFonts:vn,requiredFormats:vn,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:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:vn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vn,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:jb}),Rb=Oi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,l){return"xlink:"+l.slice(5).toLowerCase()}}),_b=Oi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Ab}),Nb=Oi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),wC={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"},kC=/[A-Z]/g,Uy=/-[a-z]/g,CC=/^data[-\w.:]+$/i;function TC(t,l){const i=Pf(l);let r=l,o=un;if(i in t.normal)return t.property[t.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&CC.test(l)){if(l.charAt(4)==="-"){const s=l.slice(5).replace(Uy,AC);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=l.slice(4);if(!Uy.test(s)){let c=s.replace(kC,jC);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}o=Gd}return new o(r,l)}function jC(t){return"-"+t.toLowerCase()}function AC(t){return t.charAt(1).toUpperCase()}const RC=Cb([Tb,SC,Rb,_b,Nb],"html"),Fd=Cb([Tb,EC,Rb,_b,Nb],"svg");function _C(t){return t.join(" ").trim()}var Ci={},Sf,By;function NC(){if(By)return Sf;By=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
189
+ `,m="/",y="*",g="",b="comment",S="declaration";function E(R,C){if(typeof R!="string")throw new TypeError("First argument must be a string");if(!R)return[];C=C||{};var A=1,D=1;function ee(ne){var K=ne.match(l);K&&(A+=K.length);var H=ne.lastIndexOf(p);D=~H?ne.length-H:D+ne.length}function $(){var ne={line:A,column:D};return function(K){return K.position=new B(ne),W(),K}}function B(ne){this.start=ne,this.end={line:A,column:D},this.source=C.source}B.prototype.content=R;function z(ne){var K=new Error(C.source+":"+A+":"+D+": "+ne);if(K.reason=ne,K.filename=C.source,K.line=A,K.column=D,K.source=R,!C.silent)throw K}function le(ne){var K=ne.exec(R);if(K){var H=K[0];return ee(H),R=R.slice(H.length),K}}function W(){le(i)}function _(ne){var K;for(ne=ne||[];K=F();)K!==!1&&ne.push(K);return ne}function F(){var ne=$();if(!(m!=R.charAt(0)||y!=R.charAt(1))){for(var K=2;g!=R.charAt(K)&&(y!=R.charAt(K)||m!=R.charAt(K+1));)++K;if(K+=2,g===R.charAt(K-1))return z("End of comment missing");var H=R.slice(2,K-2);return D+=2,ee(H),R=R.slice(K),D+=2,ne({type:b,comment:H})}}function q(){var ne=$(),K=le(r);if(K){if(F(),!le(o))return z("property missing ':'");var H=le(s),te=ne({type:S,property:j(K[0].replace(t,g)),value:H?j(H[0].replace(t,g)):g});return le(c),te}}function V(){var ne=[];_(ne);for(var K;K=q();)K!==!1&&(ne.push(K),_(ne));return ne}return W(),V()}function j(R){return R?R.replace(d,g):g}return Sf=E,Sf}var Hy;function DC(){if(Hy)return Ci;Hy=1;var t=Ci&&Ci.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.default=i;const l=t(NC());function i(r,o){let s=null;if(!r||typeof r!="string")return s;const c=(0,l.default)(r),d=typeof o=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:y}=p;d?o(m,y,p):y&&(s=s||{},s[m]=y)}),s}return Ci}var Nr={},qy;function zC(){if(qy)return Nr;qy=1,Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(m){return!m||i.test(m)||t.test(m)},c=function(m,y){return y.toUpperCase()},d=function(m,y){return"".concat(y,"-")},p=function(m,y){return y===void 0&&(y={}),s(m)?m:(m=m.toLowerCase(),y.reactCompat?m=m.replace(o,d):m=m.replace(r,d),m.replace(l,c))};return Nr.camelCase=p,Nr}var Dr,Yy;function OC(){if(Yy)return Dr;Yy=1;var t=Dr&&Dr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},l=t(DC()),i=zC();function r(o,s){var c={};return!o||typeof o!="string"||(0,l.default)(o,function(d,p){d&&p&&(c[(0,i.camelCase)(d,s)]=p)}),c}return r.default=r,Dr=r,Dr}var MC=OC();const LC=md(MC),Db=zb("end"),Vd=zb("start");function zb(t){return l;function l(i){const r=i&&i.position&&i.position[t]||{};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 UC(t){const l=Vd(t),i=Db(t);if(l&&i)return{start:l,end:i}}function Br(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Gy(t.position):"start"in t||"end"in t?Gy(t):"line"in t||"column"in t?ed(t):""}function ed(t){return Fy(t&&t.line)+":"+Fy(t&&t.column)}function Gy(t){return ed(t&&t.start)+"-"+ed(t&&t.end)}function Fy(t){return t&&typeof t=="number"?t:1}class Qt extends Error{constructor(l,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let o="",s={},c=!1;if(i&&("line"in i&&"column"in i?s={place:i}:"start"in i&&"end"in i?s={place:i}:"type"in i?s={ancestors:[i],place:i.position}:s={...i}),typeof l=="string"?o=l:!s.cause&&l&&(c=!0,o=l.message,s.cause=l),!s.ruleId&&!s.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?s.ruleId=r:(s.source=r.slice(0,p),s.ruleId=r.slice(p+1))}if(!s.place&&s.ancestors&&s.ancestors){const p=s.ancestors[s.ancestors.length-1];p&&(s.place=p.position)}const d=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=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=d?d.line:void 0,this.name=Br(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=c&&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}}Qt.prototype.file="";Qt.prototype.name="";Qt.prototype.reason="";Qt.prototype.message="";Qt.prototype.stack="";Qt.prototype.column=void 0;Qt.prototype.line=void 0;Qt.prototype.ancestors=void 0;Qt.prototype.cause=void 0;Qt.prototype.fatal=void 0;Qt.prototype.place=void 0;Qt.prototype.ruleId=void 0;Qt.prototype.source=void 0;const Id={}.hasOwnProperty,BC=new Map,HC=/[A-Z]/g,qC=new Set(["table","tbody","thead","tfoot","tr"]),YC=new Set(["td","th"]),Ob="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function GC(t,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=l.filePath||void 0;let r;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=ZC(i,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=KC(i,l.jsx,l.jsxs)}const o={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:r,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?Fd:RC,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},s=Mb(o,t,void 0);return s&&typeof s!="string"?s:o.create(t,o.Fragment,{children:s||void 0},void 0)}function Mb(t,l,i){if(l.type==="element")return FC(t,l,i);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return VC(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return XC(t,l,i);if(l.type==="mdxjsEsm")return IC(t,l);if(l.type==="root")return QC(t,l,i);if(l.type==="text")return $C(t,l)}function FC(t,l,i){const r=t.schema;let o=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Fd,t.schema=o),t.ancestors.push(l);const s=Ub(t,l.tagName,!1),c=PC(t,l);let d=Qd(t,l);return qC.has(l.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!bC(p):!0})),Lb(t,c,s,l),Xd(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,i)}function VC(t,l){if(l.data&&l.data.estree&&t.evaluater){const r=l.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}Ir(t,l.position)}function IC(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);Ir(t,l.position)}function XC(t,l,i){const r=t.schema;let o=r;l.name==="svg"&&r.space==="html"&&(o=Fd,t.schema=o),t.ancestors.push(l);const s=l.name===null?t.Fragment:Ub(t,l.name,!0),c=JC(t,l),d=Qd(t,l);return Lb(t,c,s,l),Xd(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,i)}function QC(t,l,i){const r={};return Xd(r,Qd(t,l)),t.create(l,t.Fragment,r,i)}function $C(t,l){return l.value}function Lb(t,l,i,r){typeof i!="string"&&i!==t.Fragment&&t.passNode&&(l.node=r)}function Xd(t,l){if(l.length>0){const i=l.length>1?l:l[0];i&&(t.children=i)}}function KC(t,l,i){return r;function r(o,s,c,d){const m=Array.isArray(c.children)?i:l;return d?m(s,c,d):m(s,c)}}function ZC(t,l){return i;function i(r,o,s,c){const d=Array.isArray(s.children),p=Vd(r);return l(o,s,c,d,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function PC(t,l){const i={};let r,o;for(o in l.properties)if(o!=="children"&&Id.call(l.properties,o)){const s=WC(t,o,l.properties[o]);if(s){const[c,d]=s;t.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&YC.has(l.tagName)?r=d:i[c]=d}}if(r){const s=i.style||(i.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return i}function JC(t,l){const i={};for(const r of l.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const s=r.data.estree.body[0];s.type;const c=s.expression;c.type;const d=c.properties[0];d.type,Object.assign(i,t.evaluater.evaluateExpression(d.argument))}else Ir(t,l.position);else{const o=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const d=r.value.data.estree.body[0];d.type,s=t.evaluater.evaluateExpression(d.expression)}else Ir(t,l.position);else s=r.value===null?!0:r.value;i[o]=s}return i}function Qd(t,l){const i=[];let r=-1;const o=t.passKeys?new Map:BC;for(;++r<l.children.length;){const s=l.children[r];let c;if(t.passKeys){const p=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(p){const m=o.get(p)||0;c=p+"-"+m,o.set(p,m+1)}}const d=Mb(t,s,c);d!==void 0&&i.push(d)}return i}function WC(t,l,i){const r=TC(t.schema,l);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?mC(i):_C(i)),r.property==="style"){let o=typeof i=="object"?i:e2(t,String(i));return t.stylePropertyNameCase==="css"&&(o=t2(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&r.space?wC[r.property]||r.property:r.attribute,i]}}function e2(t,l){try{return LC(l,{reactCompat:!0})}catch(i){if(t.ignoreInvalidStyle)return{};const r=i,o=new Qt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=t.filePath||void 0,o.url=Ob+"#cannot-parse-style-attribute",o}}function Ub(t,l,i){let r;if(!i)r={type:"Literal",value:l};else if(l.includes(".")){const o=l.split(".");let s=-1,c;for(;++s<o.length;){const d=Oy(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(s&&d.type==="Literal"),optional:!1}:d}r=c}else r=Oy(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const o=r.value;return Id.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(r);Ir(t)}function Ir(t,l){const i=new Qt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=Ob+"#cannot-handle-mdx-estrees-without-createevaluater",i}function t2(t){const l={};let i;for(i in t)Id.call(t,i)&&(l[n2(i)]=t[i]);return l}function n2(t){let l=t.replace(HC,l2);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function l2(t){return"-"+t.toLowerCase()}const Ef={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"]},a2={};function $d(t,l){const i=a2,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return Bb(t,r,o)}function Bb(t,l,i){if(i2(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(l&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Vy(t.children,l,i)}return Array.isArray(t)?Vy(t,l,i):""}function Vy(t,l,i){const r=[];let o=-1;for(;++o<t.length;)r[o]=Bb(t[o],l,i);return r.join("")}function i2(t){return!!(t&&typeof t=="object")}const Iy=document.createElement("i");function Kd(t){const l="&"+t+";";Iy.innerHTML=l;const i=Iy.textContent;return i.charCodeAt(i.length-1)===59&&t!=="semi"||i===l?!1:i}function xn(t,l,i,r){const o=t.length;let s=0,c;if(l<0?l=-l>o?0:o+l:l=l>o?o:l,i=i>0?i:0,r.length<1e4)c=Array.from(r),c.unshift(l,i),t.splice(...c);else for(i&&t.splice(l,i);s<r.length;)c=r.slice(s,s+1e4),c.unshift(l,0),t.splice(...c),s+=1e4,l+=1e4}function zn(t,l){return t.length>0?(xn(t,t.length,0,l),t):l}const Xy={}.hasOwnProperty;function Hb(t){const l={};let i=-1;for(;++i<t.length;)r2(l,t[i]);return l}function r2(t,l){let i;for(i in l){const o=(Xy.call(t,i)?t[i]:void 0)||(t[i]={}),s=l[i];let c;if(s)for(c in s){Xy.call(o,c)||(o[c]=[]);const d=s[c];u2(o[c],Array.isArray(d)?d:d?[d]:[])}}}function u2(t,l){let i=-1;const r=[];for(;++i<l.length;)(l[i].add==="after"?t:r).push(l[i]);xn(t,0,0,r)}function qb(t,l){const i=Number.parseInt(t,l);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function In(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Zt=ma(/[A-Za-z]/),Xt=ma(/[\dA-Za-z]/),o2=ma(/[#-'*+\--9=?A-Z^-~]/);function Lo(t){return t!==null&&(t<32||t===127)}const td=ma(/\d/),s2=ma(/[\dA-Fa-f]/),c2=ma(/[!-/:-@[-`{-~]/);function Re(t){return t!==null&&t<-2}function st(t){return t!==null&&(t<0||t===32)}function Ye(t){return t===-2||t===-1||t===32}const Ko=ma(new RegExp("\\p{P}|\\p{S}","u")),Ya=ma(/\s/);function ma(t){return l;function l(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Mi(t){const l=[];let i=-1,r=0,o=0;for(;++i<t.length;){const s=t.charCodeAt(i);let c="";if(s===37&&Xt(t.charCodeAt(i+1))&&Xt(t.charCodeAt(i+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const d=t.charCodeAt(i+1);s<56320&&d>56319&&d<57344?(c=String.fromCharCode(s,d),o=1):c="�"}else c=String.fromCharCode(s);c&&(l.push(t.slice(r,i),encodeURIComponent(c)),r=i+o+1,c=""),o&&(i+=o,o=0)}return l.join("")+t.slice(r)}function Ze(t,l,i,r){const o=r?r-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(p){return Ye(p)?(t.enter(i),d(p)):l(p)}function d(p){return Ye(p)&&s++<o?(t.consume(p),d):(t.exit(i),l(p))}}const f2={tokenize:d2};function d2(t){const l=t.attempt(this.parser.constructs.contentInitial,r,o);let i;return l;function r(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Ze(t,l,"linePrefix")}function o(d){return t.enter("paragraph"),s(d)}function s(d){const p=t.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=p),i=p,c(d)}function c(d){if(d===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(d);return}return Re(d)?(t.consume(d),t.exit("chunkText"),s):(t.consume(d),c)}}const h2={tokenize:m2},Qy={tokenize:p2};function m2(t){const l=this,i=[];let r=0,o,s,c;return d;function d(D){if(r<i.length){const ee=i[r];return l.containerState=ee[1],t.attempt(ee[0].continuation,p,m)(D)}return m(D)}function p(D){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,o&&A();const ee=l.events.length;let $=ee,B;for(;$--;)if(l.events[$][0]==="exit"&&l.events[$][1].type==="chunkFlow"){B=l.events[$][1].end;break}C(r);let z=ee;for(;z<l.events.length;)l.events[z][1].end={...B},z++;return xn(l.events,$+1,0,l.events.slice(ee)),l.events.length=z,m(D)}return d(D)}function m(D){if(r===i.length){if(!o)return b(D);if(o.currentConstruct&&o.currentConstruct.concrete)return E(D);l.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(Qy,y,g)(D)}function y(D){return o&&A(),C(r),b(D)}function g(D){return l.parser.lazy[l.now().line]=r!==i.length,c=l.now().offset,E(D)}function b(D){return l.containerState={},t.attempt(Qy,S,E)(D)}function S(D){return r++,i.push([l.currentConstruct,l.containerState]),b(D)}function E(D){if(D===null){o&&A(),C(0),t.consume(D);return}return o=o||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),j(D)}function j(D){if(D===null){R(t.exit("chunkFlow"),!0),C(0),t.consume(D);return}return Re(D)?(t.consume(D),R(t.exit("chunkFlow")),r=0,l.interrupt=void 0,d):(t.consume(D),j)}function R(D,ee){const $=l.sliceStream(D);if(ee&&$.push(null),D.previous=s,s&&(s.next=D),s=D,o.defineSkip(D.start),o.write($),l.parser.lazy[D.start.line]){let B=o.events.length;for(;B--;)if(o.events[B][1].start.offset<c&&(!o.events[B][1].end||o.events[B][1].end.offset>c))return;const z=l.events.length;let le=z,W,_;for(;le--;)if(l.events[le][0]==="exit"&&l.events[le][1].type==="chunkFlow"){if(W){_=l.events[le][1].end;break}W=!0}for(C(r),B=z;B<l.events.length;)l.events[B][1].end={..._},B++;xn(l.events,le+1,0,l.events.slice(z)),l.events.length=B}}function C(D){let ee=i.length;for(;ee-- >D;){const $=i[ee];l.containerState=$[1],$[0].exit.call(l,t)}i.length=D}function A(){o.write([null]),s=void 0,o=void 0,l.containerState._closeFlow=void 0}}function p2(t,l,i){return Ze(t,t.attempt(this.parser.constructs.document,l,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function zi(t){if(t===null||st(t)||Ya(t))return 1;if(Ko(t))return 2}function Zo(t,l,i){const r=[];let o=-1;for(;++o<t.length;){const s=t[o].resolveAll;s&&!r.includes(s)&&(l=s(l,i),r.push(s))}return l}const nd={name:"attention",resolveAll:g2,tokenize:y2};function g2(t,l){let i=-1,r,o,s,c,d,p,m,y;for(;++i<t.length;)if(t[i][0]==="enter"&&t[i][1].type==="attentionSequence"&&t[i][1]._close){for(r=i;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&l.sliceSerialize(t[r][1]).charCodeAt(0)===l.sliceSerialize(t[i][1]).charCodeAt(0)){if((t[r][1]._close||t[i][1]._open)&&(t[i][1].end.offset-t[i][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[i][1].end.offset-t[i][1].start.offset)%3))continue;p=t[r][1].end.offset-t[r][1].start.offset>1&&t[i][1].end.offset-t[i][1].start.offset>1?2:1;const g={...t[r][1].end},b={...t[i][1].start};$y(g,-p),$y(b,p),c={type:p>1?"strongSequence":"emphasisSequence",start:g,end:{...t[r][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...t[i][1].start},end:b},s={type:p>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[i][1].start}},o={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},t[r][1].end={...c.start},t[i][1].start={...d.end},m=[],t[r][1].end.offset-t[r][1].start.offset&&(m=zn(m,[["enter",t[r][1],l],["exit",t[r][1],l]])),m=zn(m,[["enter",o,l],["enter",c,l],["exit",c,l],["enter",s,l]]),m=zn(m,Zo(l.parser.constructs.insideSpan.null,t.slice(r+1,i),l)),m=zn(m,[["exit",s,l],["enter",d,l],["exit",d,l],["exit",o,l]]),t[i][1].end.offset-t[i][1].start.offset?(y=2,m=zn(m,[["enter",t[i][1],l],["exit",t[i][1],l]])):y=0,xn(t,r-1,i-r+3,m),i=r+m.length-y-2;break}}for(i=-1;++i<t.length;)t[i][1].type==="attentionSequence"&&(t[i][1].type="data");return t}function y2(t,l){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,o=zi(r);let s;return c;function c(p){return s=p,t.enter("attentionSequence"),d(p)}function d(p){if(p===s)return t.consume(p),d;const m=t.exit("attentionSequence"),y=zi(p),g=!y||y===2&&o||i.includes(p),b=!o||o===2&&y||i.includes(r);return m._open=!!(s===42?g:g&&(o||!b)),m._close=!!(s===42?b:b&&(y||!g)),l(p)}}function $y(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const v2={name:"autolink",tokenize:b2};function b2(t,l,i){let r=0;return o;function o(S){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(S){return Zt(S)?(t.consume(S),c):S===64?i(S):m(S)}function c(S){return S===43||S===45||S===46||Xt(S)?(r=1,d(S)):m(S)}function d(S){return S===58?(t.consume(S),r=0,p):(S===43||S===45||S===46||Xt(S))&&r++<32?(t.consume(S),d):(r=0,m(S))}function p(S){return S===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),l):S===null||S===32||S===60||Lo(S)?i(S):(t.consume(S),p)}function m(S){return S===64?(t.consume(S),y):o2(S)?(t.consume(S),m):i(S)}function y(S){return Xt(S)?g(S):i(S)}function g(S){return S===46?(t.consume(S),r=0,y):S===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),l):b(S)}function b(S){if((S===45||Xt(S))&&r++<63){const E=S===45?b:g;return t.consume(S),E}return i(S)}}const tu={partial:!0,tokenize:x2};function x2(t,l,i){return r;function r(s){return Ye(s)?Ze(t,o,"linePrefix")(s):o(s)}function o(s){return s===null||Re(s)?l(s):i(s)}}const Yb={continuation:{tokenize:E2},exit:w2,name:"blockQuote",tokenize:S2};function S2(t,l,i){const r=this;return o;function o(c){if(c===62){const d=r.containerState;return d.open||(t.enter("blockQuote",{_container:!0}),d.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),s}return i(c)}function s(c){return Ye(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),l):(t.exit("blockQuotePrefix"),l(c))}}function E2(t,l,i){const r=this;return o;function o(c){return Ye(c)?Ze(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return t.attempt(Yb,l,i)(c)}}function w2(t){t.exit("blockQuote")}const Gb={name:"characterEscape",tokenize:k2};function k2(t,l,i){return r;function r(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),o}function o(s){return c2(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):i(s)}}const Fb={name:"characterReference",tokenize:C2};function C2(t,l,i){const r=this;let o=0,s,c;return d;function d(g){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),p}function p(g){return g===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(g),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),s=31,c=Xt,y(g))}function m(g){return g===88||g===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(g),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,c=s2,y):(t.enter("characterReferenceValue"),s=7,c=td,y(g))}function y(g){if(g===59&&o){const b=t.exit("characterReferenceValue");return c===Xt&&!Kd(r.sliceSerialize(b))?i(g):(t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),t.exit("characterReference"),l)}return c(g)&&o++<s?(t.consume(g),y):i(g)}}const Ky={partial:!0,tokenize:j2},Zy={concrete:!0,name:"codeFenced",tokenize:T2};function T2(t,l,i){const r=this,o={partial:!0,tokenize:$};let s=0,c=0,d;return p;function p(B){return m(B)}function m(B){const z=r.events[r.events.length-1];return s=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,d=B,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(B)}function y(B){return B===d?(c++,t.consume(B),y):c<3?i(B):(t.exit("codeFencedFenceSequence"),Ye(B)?Ze(t,g,"whitespace")(B):g(B))}function g(B){return B===null||Re(B)?(t.exit("codeFencedFence"),r.interrupt?l(B):t.check(Ky,j,ee)(B)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),b(B))}function b(B){return B===null||Re(B)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),g(B)):Ye(B)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ze(t,S,"whitespace")(B)):B===96&&B===d?i(B):(t.consume(B),b)}function S(B){return B===null||Re(B)?g(B):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),E(B))}function E(B){return B===null||Re(B)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),g(B)):B===96&&B===d?i(B):(t.consume(B),E)}function j(B){return t.attempt(o,ee,R)(B)}function R(B){return t.enter("lineEnding"),t.consume(B),t.exit("lineEnding"),C}function C(B){return s>0&&Ye(B)?Ze(t,A,"linePrefix",s+1)(B):A(B)}function A(B){return B===null||Re(B)?t.check(Ky,j,ee)(B):(t.enter("codeFlowValue"),D(B))}function D(B){return B===null||Re(B)?(t.exit("codeFlowValue"),A(B)):(t.consume(B),D)}function ee(B){return t.exit("codeFenced"),l(B)}function $(B,z,le){let W=0;return _;function _(K){return B.enter("lineEnding"),B.consume(K),B.exit("lineEnding"),F}function F(K){return B.enter("codeFencedFence"),Ye(K)?Ze(B,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):q(K)}function q(K){return K===d?(B.enter("codeFencedFenceSequence"),V(K)):le(K)}function V(K){return K===d?(W++,B.consume(K),V):W>=c?(B.exit("codeFencedFenceSequence"),Ye(K)?Ze(B,ne,"whitespace")(K):ne(K)):le(K)}function ne(K){return K===null||Re(K)?(B.exit("codeFencedFence"),z(K)):le(K)}}}function j2(t,l,i){const r=this;return o;function o(c){return c===null?i(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s)}function s(c){return r.parser.lazy[r.now().line]?i(c):l(c)}}const wf={name:"codeIndented",tokenize:R2},A2={partial:!0,tokenize:_2};function R2(t,l,i){const r=this;return o;function o(m){return t.enter("codeIndented"),Ze(t,s,"linePrefix",5)(m)}function s(m){const y=r.events[r.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(m):i(m)}function c(m){return m===null?p(m):Re(m)?t.attempt(A2,c,p)(m):(t.enter("codeFlowValue"),d(m))}function d(m){return m===null||Re(m)?(t.exit("codeFlowValue"),c(m)):(t.consume(m),d)}function p(m){return t.exit("codeIndented"),l(m)}}function _2(t,l,i){const r=this;return o;function o(c){return r.parser.lazy[r.now().line]?i(c):Re(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o):Ze(t,s,"linePrefix",5)(c)}function s(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):Re(c)?o(c):i(c)}}const N2={name:"codeText",previous:z2,resolve:D2,tokenize:O2};function D2(t){let l=t.length-4,i=3,r,o;if((t[i][1].type==="lineEnding"||t[i][1].type==="space")&&(t[l][1].type==="lineEnding"||t[l][1].type==="space")){for(r=i;++r<l;)if(t[r][1].type==="codeTextData"){t[i][1].type="codeTextPadding",t[l][1].type="codeTextPadding",i+=2,l-=2;break}}for(r=i-1,l++;++r<=l;)o===void 0?r!==l&&t[r][1].type!=="lineEnding"&&(o=r):(r===l||t[r][1].type==="lineEnding")&&(t[o][1].type="codeTextData",r!==o+2&&(t[o][1].end=t[r-1][1].end,t.splice(o+2,r-o-2),l-=r-o-2,r=o+2),o=void 0);return t}function z2(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function O2(t,l,i){let r=0,o,s;return c;function c(g){return t.enter("codeText"),t.enter("codeTextSequence"),d(g)}function d(g){return g===96?(t.consume(g),r++,d):(t.exit("codeTextSequence"),p(g))}function p(g){return g===null?i(g):g===32?(t.enter("space"),t.consume(g),t.exit("space"),p):g===96?(s=t.enter("codeTextSequence"),o=0,y(g)):Re(g)?(t.enter("lineEnding"),t.consume(g),t.exit("lineEnding"),p):(t.enter("codeTextData"),m(g))}function m(g){return g===null||g===32||g===96||Re(g)?(t.exit("codeTextData"),p(g)):(t.consume(g),m)}function y(g){return g===96?(t.consume(g),o++,y):o===r?(t.exit("codeTextSequence"),t.exit("codeText"),l(g)):(s.type="codeTextData",m(g))}}class M2{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,i){const r=i??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(l,r):l>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(l,i,r){const o=i||0;this.setCursor(Math.trunc(l));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&zr(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),zr(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),zr(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const i=this.left.splice(l,Number.POSITIVE_INFINITY);zr(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);zr(this.left,i.reverse())}}}function zr(t,l){let i=0;if(l.length<1e4)t.push(...l);else for(;i<l.length;)t.push(...l.slice(i,i+1e4)),i+=1e4}function Vb(t){const l={};let i=-1,r,o,s,c,d,p,m;const y=new M2(t);for(;++i<y.length;){for(;i in l;)i=l[i];if(r=y.get(i),i&&r[1].type==="chunkFlow"&&y.get(i-1)[1].type==="listItemPrefix"&&(p=r[1]._tokenizer.events,s=0,s<p.length&&p[s][1].type==="lineEndingBlank"&&(s+=2),s<p.length&&p[s][1].type==="content"))for(;++s<p.length&&p[s][1].type!=="content";)p[s][1].type==="chunkText"&&(p[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(l,L2(y,i)),i=l[i],m=!0);else if(r[1]._container){for(s=i,o=void 0;s--;)if(c=y.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(y.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(r[1].end={...y.get(o)[1].start},d=y.slice(o,i),d.unshift(r),y.splice(o,i-o+1,d))}}return xn(t,0,Number.POSITIVE_INFINITY,y.slice(0)),!m}function L2(t,l){const i=t.get(l)[1],r=t.get(l)[2];let o=l-1;const s=[];let c=i._tokenizer;c||(c=r.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],m={};let y,g,b=-1,S=i,E=0,j=0;const R=[j];for(;S;){for(;t.get(++o)[1]!==S;);s.push(o),S._tokenizer||(y=r.sliceStream(S),S.next||y.push(null),g&&c.defineSkip(S.start),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=S,S=S.next}for(S=i;++b<d.length;)d[b][0]==="exit"&&d[b-1][0]==="enter"&&d[b][1].type===d[b-1][1].type&&d[b][1].start.line!==d[b][1].end.line&&(j=b+1,R.push(j),S._tokenizer=void 0,S.previous=void 0,S=S.next);for(c.events=[],S?(S._tokenizer=void 0,S.previous=void 0):R.pop(),b=R.length;b--;){const C=d.slice(R[b],R[b+1]),A=s.pop();p.push([A,A+C.length-1]),t.splice(A,2,C)}for(p.reverse(),b=-1;++b<p.length;)m[E+p[b][0]]=E+p[b][1],E+=p[b][1]-p[b][0]-1;return m}const U2={resolve:H2,tokenize:q2},B2={partial:!0,tokenize:Y2};function H2(t){return Vb(t),t}function q2(t,l){let i;return r;function r(d){return t.enter("content"),i=t.enter("chunkContent",{contentType:"content"}),o(d)}function o(d){return d===null?s(d):Re(d)?t.check(B2,c,s)(d):(t.consume(d),o)}function s(d){return t.exit("chunkContent"),t.exit("content"),l(d)}function c(d){return t.consume(d),t.exit("chunkContent"),i.next=t.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function Y2(t,l,i){const r=this;return o;function o(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Ze(t,s,"linePrefix")}function s(c){if(c===null||Re(c))return i(c);const d=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):t.interrupt(r.parser.constructs.flow,i,l)(c)}}function Ib(t,l,i,r,o,s,c,d,p){const m=p||Number.POSITIVE_INFINITY;let y=0;return g;function g(C){return C===60?(t.enter(r),t.enter(o),t.enter(s),t.consume(C),t.exit(s),b):C===null||C===32||C===41||Lo(C)?i(C):(t.enter(r),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),j(C))}function b(C){return C===62?(t.enter(s),t.consume(C),t.exit(s),t.exit(o),t.exit(r),l):(t.enter(d),t.enter("chunkString",{contentType:"string"}),S(C))}function S(C){return C===62?(t.exit("chunkString"),t.exit(d),b(C)):C===null||C===60||Re(C)?i(C):(t.consume(C),C===92?E:S)}function E(C){return C===60||C===62||C===92?(t.consume(C),S):S(C)}function j(C){return!y&&(C===null||C===41||st(C))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(r),l(C)):y<m&&C===40?(t.consume(C),y++,j):C===41?(t.consume(C),y--,j):C===null||C===32||C===40||Lo(C)?i(C):(t.consume(C),C===92?R:j)}function R(C){return C===40||C===41||C===92?(t.consume(C),j):j(C)}}function Xb(t,l,i,r,o,s){const c=this;let d=0,p;return m;function m(S){return t.enter(r),t.enter(o),t.consume(S),t.exit(o),t.enter(s),y}function y(S){return d>999||S===null||S===91||S===93&&!p||S===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?i(S):S===93?(t.exit(s),t.enter(o),t.consume(S),t.exit(o),t.exit(r),l):Re(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),y):(t.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===null||S===91||S===93||Re(S)||d++>999?(t.exit("chunkString"),y(S)):(t.consume(S),p||(p=!Ye(S)),S===92?b:g)}function b(S){return S===91||S===92||S===93?(t.consume(S),d++,g):g(S)}}function Qb(t,l,i,r,o,s){let c;return d;function d(b){return b===34||b===39||b===40?(t.enter(r),t.enter(o),t.consume(b),t.exit(o),c=b===40?41:b,p):i(b)}function p(b){return b===c?(t.enter(o),t.consume(b),t.exit(o),t.exit(r),l):(t.enter(s),m(b))}function m(b){return b===c?(t.exit(s),p(c)):b===null?i(b):Re(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),Ze(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===c||b===null||Re(b)?(t.exit("chunkString"),m(b)):(t.consume(b),b===92?g:y)}function g(b){return b===c||b===92?(t.consume(b),y):y(b)}}function Hr(t,l){let i;return r;function r(o){return Re(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i=!0,r):Ye(o)?Ze(t,r,i?"linePrefix":"lineSuffix")(o):l(o)}}const G2={name:"definition",tokenize:V2},F2={partial:!0,tokenize:I2};function V2(t,l,i){const r=this;let o;return s;function s(S){return t.enter("definition"),c(S)}function c(S){return Xb.call(r,t,d,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function d(S){return o=In(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),S===58?(t.enter("definitionMarker"),t.consume(S),t.exit("definitionMarker"),p):i(S)}function p(S){return st(S)?Hr(t,m)(S):m(S)}function m(S){return Ib(t,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function y(S){return t.attempt(F2,g,g)(S)}function g(S){return Ye(S)?Ze(t,b,"whitespace")(S):b(S)}function b(S){return S===null||Re(S)?(t.exit("definition"),r.parser.defined.push(o),l(S)):i(S)}}function I2(t,l,i){return r;function r(d){return st(d)?Hr(t,o)(d):i(d)}function o(d){return Qb(t,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return Ye(d)?Ze(t,c,"whitespace")(d):c(d)}function c(d){return d===null||Re(d)?l(d):i(d)}}const X2={name:"hardBreakEscape",tokenize:Q2};function Q2(t,l,i){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),o}function o(s){return Re(s)?(t.exit("hardBreakEscape"),l(s)):i(s)}}const $2={name:"headingAtx",resolve:K2,tokenize:Z2};function K2(t,l){let i=t.length-2,r=3,o,s;return t[r][1].type==="whitespace"&&(r+=2),i-2>r&&t[i][1].type==="whitespace"&&(i-=2),t[i][1].type==="atxHeadingSequence"&&(r===i-1||i-4>r&&t[i-2][1].type==="whitespace")&&(i-=r+1===i?2:4),i>r&&(o={type:"atxHeadingText",start:t[r][1].start,end:t[i][1].end},s={type:"chunkText",start:t[r][1].start,end:t[i][1].end,contentType:"text"},xn(t,r,i-r+1,[["enter",o,l],["enter",s,l],["exit",s,l],["exit",o,l]])),t}function Z2(t,l,i){let r=0;return o;function o(y){return t.enter("atxHeading"),s(y)}function s(y){return t.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&r++<6?(t.consume(y),c):y===null||st(y)?(t.exit("atxHeadingSequence"),d(y)):i(y)}function d(y){return y===35?(t.enter("atxHeadingSequence"),p(y)):y===null||Re(y)?(t.exit("atxHeading"),l(y)):Ye(y)?Ze(t,d,"whitespace")(y):(t.enter("atxHeadingText"),m(y))}function p(y){return y===35?(t.consume(y),p):(t.exit("atxHeadingSequence"),d(y))}function m(y){return y===null||y===35||st(y)?(t.exit("atxHeadingText"),d(y)):(t.consume(y),m)}}const P2=["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"],Py=["pre","script","style","textarea"],J2={concrete:!0,name:"htmlFlow",resolveTo:tT,tokenize:nT},W2={partial:!0,tokenize:aT},eT={partial:!0,tokenize:lT};function tT(t){let l=t.length;for(;l--&&!(t[l][0]==="enter"&&t[l][1].type==="htmlFlow"););return l>1&&t[l-2][1].type==="linePrefix"&&(t[l][1].start=t[l-2][1].start,t[l+1][1].start=t[l-2][1].start,t.splice(l-2,2)),t}function nT(t,l,i){const r=this;let o,s,c,d,p;return m;function m(T){return y(T)}function y(T){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(T),g}function g(T){return T===33?(t.consume(T),b):T===47?(t.consume(T),s=!0,j):T===63?(t.consume(T),o=3,r.interrupt?l:N):Zt(T)?(t.consume(T),c=String.fromCharCode(T),R):i(T)}function b(T){return T===45?(t.consume(T),o=2,S):T===91?(t.consume(T),o=5,d=0,E):Zt(T)?(t.consume(T),o=4,r.interrupt?l:N):i(T)}function S(T){return T===45?(t.consume(T),r.interrupt?l:N):i(T)}function E(T){const ce="CDATA[";return T===ce.charCodeAt(d++)?(t.consume(T),d===ce.length?r.interrupt?l:q:E):i(T)}function j(T){return Zt(T)?(t.consume(T),c=String.fromCharCode(T),R):i(T)}function R(T){if(T===null||T===47||T===62||st(T)){const ce=T===47,be=c.toLowerCase();return!ce&&!s&&Py.includes(be)?(o=1,r.interrupt?l(T):q(T)):P2.includes(c.toLowerCase())?(o=6,ce?(t.consume(T),C):r.interrupt?l(T):q(T)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(T):s?A(T):D(T))}return T===45||Xt(T)?(t.consume(T),c+=String.fromCharCode(T),R):i(T)}function C(T){return T===62?(t.consume(T),r.interrupt?l:q):i(T)}function A(T){return Ye(T)?(t.consume(T),A):_(T)}function D(T){return T===47?(t.consume(T),_):T===58||T===95||Zt(T)?(t.consume(T),ee):Ye(T)?(t.consume(T),D):_(T)}function ee(T){return T===45||T===46||T===58||T===95||Xt(T)?(t.consume(T),ee):$(T)}function $(T){return T===61?(t.consume(T),B):Ye(T)?(t.consume(T),$):D(T)}function B(T){return T===null||T===60||T===61||T===62||T===96?i(T):T===34||T===39?(t.consume(T),p=T,z):Ye(T)?(t.consume(T),B):le(T)}function z(T){return T===p?(t.consume(T),p=null,W):T===null||Re(T)?i(T):(t.consume(T),z)}function le(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||st(T)?$(T):(t.consume(T),le)}function W(T){return T===47||T===62||Ye(T)?D(T):i(T)}function _(T){return T===62?(t.consume(T),F):i(T)}function F(T){return T===null||Re(T)?q(T):Ye(T)?(t.consume(T),F):i(T)}function q(T){return T===45&&o===2?(t.consume(T),H):T===60&&o===1?(t.consume(T),te):T===62&&o===4?(t.consume(T),L):T===63&&o===3?(t.consume(T),N):T===93&&o===5?(t.consume(T),pe):Re(T)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(W2,P,V)(T)):T===null||Re(T)?(t.exit("htmlFlowData"),V(T)):(t.consume(T),q)}function V(T){return t.check(eT,ne,P)(T)}function ne(T){return t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),K}function K(T){return T===null||Re(T)?V(T):(t.enter("htmlFlowData"),q(T))}function H(T){return T===45?(t.consume(T),N):q(T)}function te(T){return T===47?(t.consume(T),c="",ue):q(T)}function ue(T){if(T===62){const ce=c.toLowerCase();return Py.includes(ce)?(t.consume(T),L):q(T)}return Zt(T)&&c.length<8?(t.consume(T),c+=String.fromCharCode(T),ue):q(T)}function pe(T){return T===93?(t.consume(T),N):q(T)}function N(T){return T===62?(t.consume(T),L):T===45&&o===2?(t.consume(T),N):q(T)}function L(T){return T===null||Re(T)?(t.exit("htmlFlowData"),P(T)):(t.consume(T),L)}function P(T){return t.exit("htmlFlow"),l(T)}}function lT(t,l,i){const r=this;return o;function o(c){return Re(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):i(c)}function s(c){return r.parser.lazy[r.now().line]?i(c):l(c)}}function aT(t,l,i){return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(tu,l,i)}}const iT={name:"htmlText",tokenize:rT};function rT(t,l,i){const r=this;let o,s,c;return d;function d(N){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(N),p}function p(N){return N===33?(t.consume(N),m):N===47?(t.consume(N),$):N===63?(t.consume(N),D):Zt(N)?(t.consume(N),le):i(N)}function m(N){return N===45?(t.consume(N),y):N===91?(t.consume(N),s=0,E):Zt(N)?(t.consume(N),A):i(N)}function y(N){return N===45?(t.consume(N),S):i(N)}function g(N){return N===null?i(N):N===45?(t.consume(N),b):Re(N)?(c=g,te(N)):(t.consume(N),g)}function b(N){return N===45?(t.consume(N),S):g(N)}function S(N){return N===62?H(N):N===45?b(N):g(N)}function E(N){const L="CDATA[";return N===L.charCodeAt(s++)?(t.consume(N),s===L.length?j:E):i(N)}function j(N){return N===null?i(N):N===93?(t.consume(N),R):Re(N)?(c=j,te(N)):(t.consume(N),j)}function R(N){return N===93?(t.consume(N),C):j(N)}function C(N){return N===62?H(N):N===93?(t.consume(N),C):j(N)}function A(N){return N===null||N===62?H(N):Re(N)?(c=A,te(N)):(t.consume(N),A)}function D(N){return N===null?i(N):N===63?(t.consume(N),ee):Re(N)?(c=D,te(N)):(t.consume(N),D)}function ee(N){return N===62?H(N):D(N)}function $(N){return Zt(N)?(t.consume(N),B):i(N)}function B(N){return N===45||Xt(N)?(t.consume(N),B):z(N)}function z(N){return Re(N)?(c=z,te(N)):Ye(N)?(t.consume(N),z):H(N)}function le(N){return N===45||Xt(N)?(t.consume(N),le):N===47||N===62||st(N)?W(N):i(N)}function W(N){return N===47?(t.consume(N),H):N===58||N===95||Zt(N)?(t.consume(N),_):Re(N)?(c=W,te(N)):Ye(N)?(t.consume(N),W):H(N)}function _(N){return N===45||N===46||N===58||N===95||Xt(N)?(t.consume(N),_):F(N)}function F(N){return N===61?(t.consume(N),q):Re(N)?(c=F,te(N)):Ye(N)?(t.consume(N),F):W(N)}function q(N){return N===null||N===60||N===61||N===62||N===96?i(N):N===34||N===39?(t.consume(N),o=N,V):Re(N)?(c=q,te(N)):Ye(N)?(t.consume(N),q):(t.consume(N),ne)}function V(N){return N===o?(t.consume(N),o=void 0,K):N===null?i(N):Re(N)?(c=V,te(N)):(t.consume(N),V)}function ne(N){return N===null||N===34||N===39||N===60||N===61||N===96?i(N):N===47||N===62||st(N)?W(N):(t.consume(N),ne)}function K(N){return N===47||N===62||st(N)?W(N):i(N)}function H(N){return N===62?(t.consume(N),t.exit("htmlTextData"),t.exit("htmlText"),l):i(N)}function te(N){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(N),t.exit("lineEnding"),ue}function ue(N){return Ye(N)?Ze(t,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):pe(N)}function pe(N){return t.enter("htmlTextData"),c(N)}}const Zd={name:"labelEnd",resolveAll:cT,resolveTo:fT,tokenize:dT},uT={tokenize:hT},oT={tokenize:mT},sT={tokenize:pT};function cT(t){let l=-1;const i=[];for(;++l<t.length;){const r=t[l][1];if(i.push(t[l]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",l+=o}}return t.length!==i.length&&xn(t,0,t.length,i),t}function fT(t,l){let i=t.length,r=0,o,s,c,d;for(;i--;)if(o=t[i][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(t[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=i,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(c=i);const p={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[s][1].start},end:{...t[c][1].end}},y={type:"labelText",start:{...t[s+r+2][1].end},end:{...t[c-2][1].start}};return d=[["enter",p,l],["enter",m,l]],d=zn(d,t.slice(s+1,s+r+3)),d=zn(d,[["enter",y,l]]),d=zn(d,Zo(l.parser.constructs.insideSpan.null,t.slice(s+r+4,c-3),l)),d=zn(d,[["exit",y,l],t[c-2],t[c-1],["exit",m,l]]),d=zn(d,t.slice(c+1)),d=zn(d,[["exit",p,l]]),xn(t,s,t.length,d),t}function dT(t,l,i){const r=this;let o=r.events.length,s,c;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){s=r.events[o][1];break}return d;function d(b){return s?s._inactive?g(b):(c=r.parser.defined.includes(In(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(b),t.exit("labelMarker"),t.exit("labelEnd"),p):i(b)}function p(b){return b===40?t.attempt(uT,y,c?y:g)(b):b===91?t.attempt(oT,y,c?m:g)(b):c?y(b):g(b)}function m(b){return t.attempt(sT,y,g)(b)}function y(b){return l(b)}function g(b){return s._balanced=!0,i(b)}}function hT(t,l,i){return r;function r(g){return t.enter("resource"),t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),o}function o(g){return st(g)?Hr(t,s)(g):s(g)}function s(g){return g===41?y(g):Ib(t,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return st(g)?Hr(t,p)(g):y(g)}function d(g){return i(g)}function p(g){return g===34||g===39||g===40?Qb(t,m,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function m(g){return st(g)?Hr(t,y)(g):y(g)}function y(g){return g===41?(t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),t.exit("resource"),l):i(g)}}function mT(t,l,i){const r=this;return o;function o(d){return Xb.call(r,t,s,c,"reference","referenceMarker","referenceString")(d)}function s(d){return r.parser.defined.includes(In(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?l(d):i(d)}function c(d){return i(d)}}function pT(t,l,i){return r;function r(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),o}function o(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),l):i(s)}}const gT={name:"labelStartImage",resolveAll:Zd.resolveAll,tokenize:yT};function yT(t,l,i){const r=this;return o;function o(d){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(d),t.exit("labelImageMarker"),s}function s(d){return d===91?(t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelImage"),c):i(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(d):l(d)}}const vT={name:"labelStartLink",resolveAll:Zd.resolveAll,tokenize:bT};function bT(t,l,i){const r=this;return o;function o(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(c):l(c)}}const kf={name:"lineEnding",tokenize:xT};function xT(t,l){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Ze(t,l,"linePrefix")}}const zo={name:"thematicBreak",tokenize:ST};function ST(t,l,i){let r=0,o;return s;function s(m){return t.enter("thematicBreak"),c(m)}function c(m){return o=m,d(m)}function d(m){return m===o?(t.enter("thematicBreakSequence"),p(m)):r>=3&&(m===null||Re(m))?(t.exit("thematicBreak"),l(m)):i(m)}function p(m){return m===o?(t.consume(m),r++,p):(t.exit("thematicBreakSequence"),Ye(m)?Ze(t,d,"whitespace")(m):d(m))}}const rn={continuation:{tokenize:CT},exit:jT,name:"list",tokenize:kT},ET={partial:!0,tokenize:AT},wT={partial:!0,tokenize:TT};function kT(t,l,i){const r=this,o=r.events[r.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return d;function d(S){const E=r.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||S===r.containerState.marker:td(S)){if(r.containerState.type||(r.containerState.type=E,t.enter(E,{_container:!0})),E==="listUnordered")return t.enter("listItemPrefix"),S===42||S===45?t.check(zo,i,m)(S):m(S);if(!r.interrupt||S===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(S)}return i(S)}function p(S){return td(S)&&++c<10?(t.consume(S),p):(!r.interrupt||c<2)&&(r.containerState.marker?S===r.containerState.marker:S===41||S===46)?(t.exit("listItemValue"),m(S)):i(S)}function m(S){return t.enter("listItemMarker"),t.consume(S),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||S,t.check(tu,r.interrupt?i:y,t.attempt(ET,b,g))}function y(S){return r.containerState.initialBlankLine=!0,s++,b(S)}function g(S){return Ye(S)?(t.enter("listItemPrefixWhitespace"),t.consume(S),t.exit("listItemPrefixWhitespace"),b):i(S)}function b(S){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,l(S)}}function CT(t,l,i){const r=this;return r.containerState._closeFlow=void 0,t.check(tu,o,s);function o(d){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ze(t,l,"listItemIndent",r.containerState.size+1)(d)}function s(d){return r.containerState.furtherBlankLines||!Ye(d)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,c(d)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(wT,l,c)(d))}function c(d){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ze(t,t.attempt(rn,l,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function TT(t,l,i){const r=this;return Ze(t,o,"listItemIndent",r.containerState.size+1);function o(s){const c=r.events[r.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===r.containerState.size?l(s):i(s)}}function jT(t){t.exit(this.containerState.type)}function AT(t,l,i){const r=this;return Ze(t,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const c=r.events[r.events.length-1];return!Ye(s)&&c&&c[1].type==="listItemPrefixWhitespace"?l(s):i(s)}}const Jy={name:"setextUnderline",resolveTo:RT,tokenize:_T};function RT(t,l){let i=t.length,r,o,s;for(;i--;)if(t[i][0]==="enter"){if(t[i][1].type==="content"){r=i;break}t[i][1].type==="paragraph"&&(o=i)}else t[i][1].type==="content"&&t.splice(i,1),!s&&t[i][1].type==="definition"&&(s=i);const c={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",s?(t.splice(o,0,["enter",c,l]),t.splice(s+1,0,["exit",t[r][1],l]),t[r][1].end={...t[s][1].end}):t[r][1]=c,t.push(["exit",c,l]),t}function _T(t,l,i){const r=this;let o;return s;function s(m){let y=r.events.length,g;for(;y--;)if(r.events[y][1].type!=="lineEnding"&&r.events[y][1].type!=="linePrefix"&&r.events[y][1].type!=="content"){g=r.events[y][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(t.enter("setextHeadingLine"),o=m,c(m)):i(m)}function c(m){return t.enter("setextHeadingLineSequence"),d(m)}function d(m){return m===o?(t.consume(m),d):(t.exit("setextHeadingLineSequence"),Ye(m)?Ze(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||Re(m)?(t.exit("setextHeadingLine"),l(m)):i(m)}}const NT={tokenize:DT};function DT(t){const l=this,i=t.attempt(tu,r,t.attempt(this.parser.constructs.flowInitial,o,Ze(t,t.attempt(this.parser.constructs.flow,o,t.attempt(U2,o)),"linePrefix")));return i;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),l.currentConstruct=void 0,i}function o(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),l.currentConstruct=void 0,i}}const zT={resolveAll:Kb()},OT=$b("string"),MT=$b("text");function $b(t){return{resolveAll:Kb(t==="text"?LT:void 0),tokenize:l};function l(i){const r=this,o=this.parser.constructs[t],s=i.attempt(o,c,d);return c;function c(y){return m(y)?s(y):d(y)}function d(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),p}function p(y){return m(y)?(i.exit("data"),s(y)):(i.consume(y),p)}function m(y){if(y===null)return!0;const g=o[y];let b=-1;if(g)for(;++b<g.length;){const S=g[b];if(!S.previous||S.previous.call(r,r.previous))return!0}return!1}}}function Kb(t){return l;function l(i,r){let o=-1,s;for(;++o<=i.length;)s===void 0?i[o]&&i[o][1].type==="data"&&(s=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==s+2&&(i[s][1].end=i[o-1][1].end,i.splice(s+2,o-s-2),o=s+2),s=void 0);return t?t(i,r):i}}function LT(t,l){let i=0;for(;++i<=t.length;)if((i===t.length||t[i][1].type==="lineEnding")&&t[i-1][1].type==="data"){const r=t[i-1][1],o=l.sliceStream(r);let s=o.length,c=-1,d=0,p;for(;s--;){const m=o[s];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(m===-2)p=!0,d++;else if(m!==-1){s++;break}}if(l._contentTypeTextTrailing&&i===t.length&&(d=0),d){const m={type:i===t.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:r.start._bufferIndex+c,_index:r.start._index+s,line:r.end.line,column:r.end.column-d,offset:r.end.offset-d},end:{...r.end}};r.end={...m.start},r.start.offset===r.end.offset?Object.assign(r,m):(t.splice(i,0,["enter",m,l],["exit",m,l]),i+=2)}i++}return t}const UT={42:rn,43:rn,45:rn,48:rn,49:rn,50:rn,51:rn,52:rn,53:rn,54:rn,55:rn,56:rn,57:rn,62:Yb},BT={91:G2},HT={[-2]:wf,[-1]:wf,32:wf},qT={35:$2,42:zo,45:[Jy,zo],60:J2,61:Jy,95:zo,96:Zy,126:Zy},YT={38:Fb,92:Gb},GT={[-5]:kf,[-4]:kf,[-3]:kf,33:gT,38:Fb,42:nd,60:[v2,iT],91:vT,92:[X2,Gb],93:Zd,95:nd,96:N2},FT={null:[nd,zT]},VT={null:[42,95]},IT={null:[]},XT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:VT,contentInitial:BT,disable:IT,document:UT,flow:qT,flowInitial:HT,insideSpan:FT,string:YT,text:GT},Symbol.toStringTag,{value:"Module"}));function QT(t,l,i){let r={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},s=[];let c=[],d=[];const p={attempt:z($),check:z(B),consume:A,enter:D,exit:ee,interrupt:z(B,{interrupt:!0})},m={code:null,containerState:{},defineSkip:j,events:[],now:E,parser:t,previous:null,sliceSerialize:b,sliceStream:S,write:g};let y=l.tokenize.call(m,p);return l.resolveAll&&s.push(l),m;function g(F){return c=zn(c,F),R(),c[c.length-1]!==null?[]:(le(l,0),m.events=Zo(s,m.events,m),m.events)}function b(F,q){return KT(S(F),q)}function S(F){return $T(c,F)}function E(){const{_bufferIndex:F,_index:q,line:V,column:ne,offset:K}=r;return{_bufferIndex:F,_index:q,line:V,column:ne,offset:K}}function j(F){o[F.line]=F.column,_()}function R(){let F;for(;r._index<c.length;){const q=c[r._index];if(typeof q=="string")for(F=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===F&&r._bufferIndex<q.length;)C(q.charCodeAt(r._bufferIndex));else C(q)}}function C(F){y=y(F)}function A(F){Re(F)?(r.line++,r.column=1,r.offset+=F===-3?2:1,_()):F!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===c[r._index].length&&(r._bufferIndex=-1,r._index++)),m.previous=F}function D(F,q){const V=q||{};return V.type=F,V.start=E(),m.events.push(["enter",V,m]),d.push(V),V}function ee(F){const q=d.pop();return q.end=E(),m.events.push(["exit",q,m]),q}function $(F,q){le(F,q.from)}function B(F,q){q.restore()}function z(F,q){return V;function V(ne,K,H){let te,ue,pe,N;return Array.isArray(ne)?P(ne):"tokenize"in ne?P([ne]):L(ne);function L(xe){return ze;function ze(ge){const _e=ge!==null&&xe[ge],Nt=ge!==null&&xe.null,Ln=[...Array.isArray(_e)?_e:_e?[_e]:[],...Array.isArray(Nt)?Nt:Nt?[Nt]:[]];return P(Ln)(ge)}}function P(xe){return te=xe,ue=0,xe.length===0?H:T(xe[ue])}function T(xe){return ze;function ze(ge){return N=W(),pe=xe,xe.partial||(m.currentConstruct=xe),xe.name&&m.parser.constructs.disable.null.includes(xe.name)?be():xe.tokenize.call(q?Object.assign(Object.create(m),q):m,p,ce,be)(ge)}}function ce(xe){return F(pe,N),K}function be(xe){return N.restore(),++ue<te.length?T(te[ue]):H}}}function le(F,q){F.resolveAll&&!s.includes(F)&&s.push(F),F.resolve&&xn(m.events,q,m.events.length-q,F.resolve(m.events.slice(q),m)),F.resolveTo&&(m.events=F.resolveTo(m.events,m))}function W(){const F=E(),q=m.previous,V=m.currentConstruct,ne=m.events.length,K=Array.from(d);return{from:ne,restore:H};function H(){r=F,m.previous=q,m.currentConstruct=V,m.events.length=ne,d=K,_()}}function _(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function $T(t,l){const i=l.start._index,r=l.start._bufferIndex,o=l.end._index,s=l.end._bufferIndex;let c;if(i===o)c=[t[i].slice(r,s)];else{if(c=t.slice(i,o),r>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(r):c.shift()}s>0&&c.push(t[o].slice(0,s))}return c}function KT(t,l){let i=-1;const r=[];let o;for(;++i<t.length;){const s=t[i];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
190
+ `;break}case-3:{c=`\r
191
+ `;break}case-2:{c=l?" ":" ";break}case-1:{if(!l&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,r.push(c)}return r.join("")}function ZT(t){const r={constructs:Hb([XT,...(t||{}).extensions||[]]),content:o(f2),defined:[],document:o(h2),flow:o(NT),lazy:{},string:o(OT),text:o(MT)};return r;function o(s){return c;function c(d){return QT(r,s,d)}}}function PT(t){for(;!Vb(t););return t}const Wy=/[\0\t\n\r]/g;function JT(){let t=1,l="",i=!0,r;return o;function o(s,c,d){const p=[];let m,y,g,b,S;for(s=l+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),g=0,l="",i&&(s.charCodeAt(0)===65279&&g++,i=void 0);g<s.length;){if(Wy.lastIndex=g,m=Wy.exec(s),b=m&&m.index!==void 0?m.index:s.length,S=s.charCodeAt(b),!m){l=s.slice(g);break}if(S===10&&g===b&&r)p.push(-3),r=void 0;else switch(r&&(p.push(-5),r=void 0),g<b&&(p.push(s.slice(g,b)),t+=b-g),S){case 0:{p.push(65533),t++;break}case 9:{for(y=Math.ceil(t/4)*4,p.push(-2);t++<y;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:r=!0,t=1}g=b+1}return d&&(r&&p.push(-5),l&&p.push(l),p.push(null)),p}}const WT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ej(t){return t.replace(WT,tj)}function tj(t,l,i){if(l)return l;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),s=o===120||o===88;return qb(i.slice(s?2:1),s?16:10)}return Kd(i)||t}const Zb={}.hasOwnProperty;function nj(t,l,i){return typeof l!="string"&&(i=l,l=void 0),lj(i)(PT(ZT(i).document().write(JT()(t,l,!0))))}function lj(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ll),autolinkProtocol:W,autolinkEmail:W,atxHeading:s(Nl),blockQuote:s(Nt),characterEscape:W,characterReference:W,codeFenced:s(Ln),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Ln,c),codeText:s(yt,c),codeTextData:W,data:W,codeFlowValue:W,definition:s(Un),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Sn),hardBreakEscape:s(Pt),hardBreakTrailing:s(Pt),htmlFlow:s(Va,c),htmlFlowData:W,htmlText:s(Va,c),htmlTextData:W,image:s(Ia),label:c,link:s(ll),listItem:s(pa),listItemValue:b,listOrdered:s(Dl,g),listUnordered:s(Dl),paragraph:s(Li),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(Nl),strong:s(Ui),thematicBreak:s(al)},exit:{atxHeading:p(),atxHeadingSequence:$,autolink:p(),autolinkEmail:_e,autolinkProtocol:ge,blockQuote:p(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:xe,characterReference:ze,codeFenced:p(R),codeFencedFence:j,codeFencedFenceInfo:S,codeFencedFenceMeta:E,codeFlowValue:_,codeIndented:p(C),codeText:p(K),codeTextData:_,data:_,definition:p(),definitionDestinationString:ee,definitionLabelString:A,definitionTitleString:D,emphasis:p(),hardBreakEscape:p(q),hardBreakTrailing:p(q),htmlFlow:p(V),htmlFlowData:_,htmlText:p(ne),htmlTextData:_,image:p(te),label:pe,labelText:ue,lineEnding:F,link:p(H),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ce,resourceDestinationString:N,resourceTitleString:L,resource:P,setextHeading:p(le),setextHeadingLineSequence:z,setextHeadingText:B,strong:p(),thematicBreak:p()}};Pb(l,(t||{}).mdastExtensions||[]);const i={};return r;function r(ie){let de={type:"root",children:[]};const Ce={stack:[de],tokenStack:[],config:l,enter:d,exit:m,buffer:c,resume:y,data:i},De=[];let Pe=-1;for(;++Pe<ie.length;)if(ie[Pe][1].type==="listOrdered"||ie[Pe][1].type==="listUnordered")if(ie[Pe][0]==="enter")De.push(Pe);else{const $t=De.pop();Pe=o(ie,$t,Pe)}for(Pe=-1;++Pe<ie.length;){const $t=l[ie[Pe][0]];Zb.call($t,ie[Pe][1].type)&&$t[ie[Pe][1].type].call(Object.assign({sliceSerialize:ie[Pe][2].sliceSerialize},Ce),ie[Pe][1])}if(Ce.tokenStack.length>0){const $t=Ce.tokenStack[Ce.tokenStack.length-1];($t[1]||ev).call(Ce,void 0,$t[0])}for(de.position={start:ia(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:ia(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Pe<l.transforms.length;)de=l.transforms[Pe](de)||de;return de}function o(ie,de,Ce){let De=de-1,Pe=-1,$t=!1,on,Lt,nt,Ut;for(;++De<=Ce;){const tt=ie[De];switch(tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tt[0]==="enter"?Pe++:Pe--,Ut=void 0;break}case"lineEndingBlank":{tt[0]==="enter"&&(on&&!Ut&&!Pe&&!nt&&(nt=De),Ut=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ut=void 0}if(!Pe&&tt[0]==="enter"&&tt[1].type==="listItemPrefix"||Pe===-1&&tt[0]==="exit"&&(tt[1].type==="listUnordered"||tt[1].type==="listOrdered")){if(on){let Bn=De;for(Lt=void 0;Bn--;){const sn=ie[Bn];if(sn[1].type==="lineEnding"||sn[1].type==="lineEndingBlank"){if(sn[0]==="exit")continue;Lt&&(ie[Lt][1].type="lineEndingBlank",$t=!0),sn[1].type="lineEnding",Lt=Bn}else if(!(sn[1].type==="linePrefix"||sn[1].type==="blockQuotePrefix"||sn[1].type==="blockQuotePrefixWhitespace"||sn[1].type==="blockQuoteMarker"||sn[1].type==="listItemIndent"))break}nt&&(!Lt||nt<Lt)&&(on._spread=!0),on.end=Object.assign({},Lt?ie[Lt][1].start:tt[1].end),ie.splice(Lt||De,0,["exit",on,tt[2]]),De++,Ce++}if(tt[1].type==="listItemPrefix"){const Bn={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};on=Bn,ie.splice(De,0,["enter",Bn,tt[2]]),De++,Ce++,nt=void 0,Ut=!0}}}return ie[de][1]._spread=$t,Ce}function s(ie,de){return Ce;function Ce(De){d.call(this,ie(De),De),de&&de.call(this,De)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(ie,de,Ce){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([de,Ce||void 0]),ie.position={start:ia(de.start),end:void 0}}function p(ie){return de;function de(Ce){ie&&ie.call(this,Ce),m.call(this,Ce)}}function m(ie,de){const Ce=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==ie.type&&(de?de.call(this,ie,De[0]):(De[1]||ev).call(this,ie,De[0]));else throw new Error("Cannot close `"+ie.type+"` ("+Br({start:ie.start,end:ie.end})+"): it’s not open");Ce.position.end=ia(ie.end)}function y(){return $d(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(ie){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function S(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.lang=ie}function E(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.meta=ie}function j(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function R(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie.replace(/(\r?\n|\r)$/g,"")}function A(ie){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=In(this.sliceSerialize(ie)).toLowerCase()}function D(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.title=ie}function ee(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.url=ie}function $(ie){const de=this.stack[this.stack.length-1];if(!de.depth){const Ce=this.sliceSerialize(ie).length;de.depth=Ce}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function z(ie){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function le(){this.data.setextHeadingSlurpLineEnding=void 0}function W(ie){const Ce=this.stack[this.stack.length-1].children;let De=Ce[Ce.length-1];(!De||De.type!=="text")&&(De=pt(),De.position={start:ia(ie.start),end:void 0},Ce.push(De)),this.stack.push(De)}function _(ie){const de=this.stack.pop();de.value+=this.sliceSerialize(ie),de.position.end=ia(ie.end)}function F(ie){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=de.children[de.children.length-1];Ce.position.end=ia(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(de.type)&&(W.call(this,ie),_.call(this,ie))}function q(){this.data.atHardBreak=!0}function V(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie}function ne(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie}function K(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.value=ie}function H(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=de,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function te(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=de,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function ue(ie){const de=this.sliceSerialize(ie),Ce=this.stack[this.stack.length-2];Ce.label=ej(de),Ce.identifier=In(de).toLowerCase()}function pe(){const ie=this.stack[this.stack.length-1],de=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const De=ie.children;Ce.children=De}else Ce.alt=de}function N(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.url=ie}function L(){const ie=this.resume(),de=this.stack[this.stack.length-1];de.title=ie}function P(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ce(ie){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=In(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function be(ie){this.data.characterReferenceType=ie.type}function xe(ie){const de=this.sliceSerialize(ie),Ce=this.data.characterReferenceType;let De;Ce?(De=qb(de,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=Kd(de);const Pe=this.stack[this.stack.length-1];Pe.value+=De}function ze(ie){const de=this.stack.pop();de.position.end=ia(ie.end)}function ge(ie){_.call(this,ie);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(ie)}function _e(ie){_.call(this,ie);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(ie)}function Nt(){return{type:"blockquote",children:[]}}function Ln(){return{type:"code",lang:null,meta:null,value:""}}function yt(){return{type:"inlineCode",value:""}}function Un(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Sn(){return{type:"emphasis",children:[]}}function Nl(){return{type:"heading",depth:0,children:[]}}function Pt(){return{type:"break"}}function Va(){return{type:"html",value:""}}function Ia(){return{type:"image",title:null,url:"",alt:null}}function ll(){return{type:"link",title:null,url:"",children:[]}}function Dl(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function pa(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function Li(){return{type:"paragraph",children:[]}}function Ui(){return{type:"strong",children:[]}}function pt(){return{type:"text",value:""}}function al(){return{type:"thematicBreak"}}}function ia(t){return{line:t.line,column:t.column,offset:t.offset}}function Pb(t,l){let i=-1;for(;++i<l.length;){const r=l[i];Array.isArray(r)?Pb(t,r):aj(t,r)}}function aj(t,l){let i;for(i in l)if(Zb.call(l,i))switch(i){case"canContainEols":{const r=l[i];r&&t[i].push(...r);break}case"transforms":{const r=l[i];r&&t[i].push(...r);break}case"enter":case"exit":{const r=l[i];r&&Object.assign(t[i],r);break}}}function ev(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+Br({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+Br({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+Br({start:l.start,end:l.end})+") is still open")}function ij(t){const l=this;l.parser=i;function i(r){return nj(r,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function rj(t,l){const i={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(l),!0)};return t.patch(l,i),t.applyData(l,i)}function uj(t,l){const i={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,i),[t.applyData(l,i),{type:"text",value:`
192
+ `}]}function oj(t,l){const i=l.value?l.value+`
193
+ `:"",r={},o=l.lang?l.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:i}]};return l.meta&&(s.data={meta:l.meta}),t.patch(l,s),s=t.applyData(l,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(l,s),s}function sj(t,l){const i={type:"element",tagName:"del",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function cj(t,l){const i={type:"element",tagName:"em",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function fj(t,l){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(l.identifier).toUpperCase(),o=Mi(r.toLowerCase()),s=t.footnoteOrder.indexOf(r);let c,d=t.footnoteCounts.get(r);d===void 0?(d=0,t.footnoteOrder.push(r),c=t.footnoteOrder.length):c=s+1,d+=1,t.footnoteCounts.set(r,d);const p={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(l,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return t.patch(l,m),t.applyData(l,m)}function dj(t,l){const i={type:"element",tagName:"h"+l.depth,properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function hj(t,l){if(t.options.allowDangerousHtml){const i={type:"raw",value:l.value};return t.patch(l,i),t.applyData(l,i)}}function Jb(t,l){const i=l.referenceType;let r="]";if(i==="collapsed"?r+="[]":i==="full"&&(r+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+r}];const o=t.all(l),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=r:o.push({type:"text",value:r}),o}function mj(t,l){const i=String(l.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return Jb(t,l);const o={src:Mi(r.url||""),alt:l.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const s={type:"element",tagName:"img",properties:o,children:[]};return t.patch(l,s),t.applyData(l,s)}function pj(t,l){const i={src:Mi(l.url)};l.alt!==null&&l.alt!==void 0&&(i.alt=l.alt),l.title!==null&&l.title!==void 0&&(i.title=l.title);const r={type:"element",tagName:"img",properties:i,children:[]};return t.patch(l,r),t.applyData(l,r)}function gj(t,l){const i={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};t.patch(l,i);const r={type:"element",tagName:"code",properties:{},children:[i]};return t.patch(l,r),t.applyData(l,r)}function yj(t,l){const i=String(l.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return Jb(t,l);const o={href:Mi(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const s={type:"element",tagName:"a",properties:o,children:t.all(l)};return t.patch(l,s),t.applyData(l,s)}function vj(t,l){const i={href:Mi(l.url)};l.title!==null&&l.title!==void 0&&(i.title=l.title);const r={type:"element",tagName:"a",properties:i,children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function bj(t,l,i){const r=t.all(l),o=i?xj(i):Wb(l),s={},c=[];if(typeof l.checked=="boolean"){const y=r[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},r.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:l.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let d=-1;for(;++d<r.length;){const y=r[d];(o||d!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
194
+ `}),y.type==="element"&&y.tagName==="p"&&!o?c.push(...y.children):c.push(y)}const p=r[r.length-1];p&&(o||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
195
+ `});const m={type:"element",tagName:"li",properties:s,children:c};return t.patch(l,m),t.applyData(l,m)}function xj(t){let l=!1;if(t.type==="list"){l=t.spread||!1;const i=t.children;let r=-1;for(;!l&&++r<i.length;)l=Wb(i[r])}return l}function Wb(t){const l=t.spread;return l??t.children.length>1}function Sj(t,l){const i={},r=t.all(l);let o=-1;for(typeof l.start=="number"&&l.start!==1&&(i.start=l.start);++o<r.length;){const c=r[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const s={type:"element",tagName:l.ordered?"ol":"ul",properties:i,children:t.wrap(r,!0)};return t.patch(l,s),t.applyData(l,s)}function Ej(t,l){const i={type:"element",tagName:"p",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function wj(t,l){const i={type:"root",children:t.wrap(t.all(l))};return t.patch(l,i),t.applyData(l,i)}function kj(t,l){const i={type:"element",tagName:"strong",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function Cj(t,l){const i=t.all(l),r=i.shift(),o=[];if(r){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(l.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(i,!0)},d=Vd(l.children[1]),p=Db(l.children[l.children.length-1]);d&&p&&(c.position={start:d,end:p}),o.push(c)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(o,!0)};return t.patch(l,s),t.applyData(l,s)}function Tj(t,l,i){const r=i?i.children:void 0,s=(r?r.indexOf(l):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,d=c?c.length:l.children.length;let p=-1;const m=[];for(;++p<d;){const g=l.children[p],b={},S=c?c[p]:void 0;S&&(b.align=S);let E={type:"element",tagName:s,properties:b,children:[]};g&&(E.children=t.all(g),t.patch(g,E),E=t.applyData(g,E)),m.push(E)}const y={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(l,y),t.applyData(l,y)}function jj(t,l){const i={type:"element",tagName:"td",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}const tv=9,nv=32;function Aj(t){const l=String(t),i=/\r?\n|\r/g;let r=i.exec(l),o=0;const s=[];for(;r;)s.push(lv(l.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=i.exec(l);return s.push(lv(l.slice(o),o>0,!1)),s.join("")}function lv(t,l,i){let r=0,o=t.length;if(l){let s=t.codePointAt(r);for(;s===tv||s===nv;)r++,s=t.codePointAt(r)}if(i){let s=t.codePointAt(o-1);for(;s===tv||s===nv;)o--,s=t.codePointAt(o-1)}return o>r?t.slice(r,o):""}function Rj(t,l){const i={type:"text",value:Aj(String(l.value))};return t.patch(l,i),t.applyData(l,i)}function _j(t,l){const i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(l,i),t.applyData(l,i)}const Nj={blockquote:rj,break:uj,code:oj,delete:sj,emphasis:cj,footnoteReference:fj,heading:dj,html:hj,imageReference:mj,image:pj,inlineCode:gj,linkReference:yj,link:vj,listItem:bj,list:Sj,paragraph:Ej,root:wj,strong:kj,table:Cj,tableCell:jj,tableRow:Tj,text:Rj,thematicBreak:_j,toml:Eo,yaml:Eo,definition:Eo,footnoteDefinition:Eo};function Eo(){}const e0=-1,Po=0,qr=1,Uo=2,Pd=3,Jd=4,Wd=5,eh=6,t0=7,n0=8,av=typeof self=="object"?self:globalThis,Dj=(t,l)=>{const i=(o,s)=>(t.set(s,o),o),r=o=>{if(t.has(o))return t.get(o);const[s,c]=l[o];switch(s){case Po:case e0:return i(c,o);case qr:{const d=i([],o);for(const p of c)d.push(r(p));return d}case Uo:{const d=i({},o);for(const[p,m]of c)d[r(p)]=r(m);return d}case Pd:return i(new Date(c),o);case Jd:{const{source:d,flags:p}=c;return i(new RegExp(d,p),o)}case Wd:{const d=i(new Map,o);for(const[p,m]of c)d.set(r(p),r(m));return d}case eh:{const d=i(new Set,o);for(const p of c)d.add(r(p));return d}case t0:{const{name:d,message:p}=c;return i(new av[d](p),o)}case n0:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return i(new DataView(d),c)}}return i(new av[s](c),o)};return r},iv=t=>Dj(new Map,t)(0),Ti="",{toString:zj}={},{keys:Oj}=Object,Or=t=>{const l=typeof t;if(l!=="object"||!t)return[Po,l];const i=zj.call(t).slice(8,-1);switch(i){case"Array":return[qr,Ti];case"Object":return[Uo,Ti];case"Date":return[Pd,Ti];case"RegExp":return[Jd,Ti];case"Map":return[Wd,Ti];case"Set":return[eh,Ti];case"DataView":return[qr,i]}return i.includes("Array")?[qr,i]:i.includes("Error")?[t0,i]:[Uo,i]},wo=([t,l])=>t===Po&&(l==="function"||l==="symbol"),Mj=(t,l,i,r)=>{const o=(c,d)=>{const p=r.push(c)-1;return i.set(d,p),p},s=c=>{if(i.has(c))return i.get(c);let[d,p]=Or(c);switch(d){case Po:{let y=c;switch(p){case"bigint":d=n0,y=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);y=null;break;case"undefined":return o([e0],c)}return o([d,y],c)}case qr:{if(p){let b=c;return p==="DataView"?b=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(b=new Uint8Array(c)),o([p,[...b]],c)}const y=[],g=o([d,y],c);for(const b of c)y.push(s(b));return g}case Uo:{if(p)switch(p){case"BigInt":return o([p,c.toString()],c);case"Boolean":case"Number":case"String":return o([p,c.valueOf()],c)}if(l&&"toJSON"in c)return s(c.toJSON());const y=[],g=o([d,y],c);for(const b of Oj(c))(t||!wo(Or(c[b])))&&y.push([s(b),s(c[b])]);return g}case Pd:return o([d,c.toISOString()],c);case Jd:{const{source:y,flags:g}=c;return o([d,{source:y,flags:g}],c)}case Wd:{const y=[],g=o([d,y],c);for(const[b,S]of c)(t||!(wo(Or(b))||wo(Or(S))))&&y.push([s(b),s(S)]);return g}case eh:{const y=[],g=o([d,y],c);for(const b of c)(t||!wo(Or(b)))&&y.push(s(b));return g}}const{message:m}=c;return o([d,{name:p,message:m}],c)};return s},rv=(t,{json:l,lossy:i}={})=>{const r=[];return Mj(!(l||i),!!l,new Map,r)(t),r},Bo=typeof structuredClone=="function"?(t,l)=>l&&("json"in l||"lossy"in l)?iv(rv(t,l)):structuredClone(t):(t,l)=>iv(rv(t,l));function Lj(t,l){const i=[{type:"text",value:"↩"}];return l>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),i}function Uj(t,l){return"Back to reference "+(t+1)+(l>1?"-"+l:"")}function Bj(t){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||Lj,r=t.options.footnoteBackLabel||Uj,o=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",c=t.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[p]);if(!m)continue;const y=t.all(m),g=String(m.identifier).toUpperCase(),b=Mi(g.toLowerCase());let S=0;const E=[],j=t.footnoteCounts.get(g);for(;j!==void 0&&++S<=j;){E.length>0&&E.push({type:"text",value:" "});let A=typeof i=="string"?i:i(p,S);typeof A=="string"&&(A={type:"text",value:A}),E.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+b+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,S),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const R=y[y.length-1];if(R&&R.type==="element"&&R.tagName==="p"){const A=R.children[R.children.length-1];A&&A.type==="text"?A.value+=" ":R.children.push({type:"text",value:" "}),R.children.push(...E)}else y.push(...E);const C={type:"element",tagName:"li",properties:{id:l+"fn-"+b},children:t.wrap(y,!0)};t.patch(m,C),d.push(C)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Bo(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
196
+ `},{type:"element",tagName:"ol",properties:{},children:t.wrap(d,!0)},{type:"text",value:`
197
+ `}]}}const Jo=(function(t){if(t==null)return Gj;if(typeof t=="function")return Wo(t);if(typeof t=="object")return Array.isArray(t)?Hj(t):qj(t);if(typeof t=="string")return Yj(t);throw new Error("Expected function, string, or object as test")});function Hj(t){const l=[];let i=-1;for(;++i<t.length;)l[i]=Jo(t[i]);return Wo(r);function r(...o){let s=-1;for(;++s<l.length;)if(l[s].apply(this,o))return!0;return!1}}function qj(t){const l=t;return Wo(i);function i(r){const o=r;let s;for(s in t)if(o[s]!==l[s])return!1;return!0}}function Yj(t){return Wo(l);function l(i){return i&&i.type===t}}function Wo(t){return l;function l(i,r,o){return!!(Fj(i)&&t.call(this,i,typeof r=="number"?r:void 0,o||void 0))}}function Gj(){return!0}function Fj(t){return t!==null&&typeof t=="object"&&"type"in t}const l0=[],Vj=!0,ld=!1,Ij="skip";function a0(t,l,i,r){let o;typeof l=="function"&&typeof i!="function"?(r=i,i=l):o=l;const s=Jo(o),c=r?-1:1;d(t,void 0,[])();function d(p,m,y){const g=p&&typeof p=="object"?p:{};if(typeof g.type=="string"){const S=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(p.type+(S?"<"+S+">":""))+")"})}return b;function b(){let S=l0,E,j,R;if((!l||s(p,m,y[y.length-1]||void 0))&&(S=Xj(i(p,y)),S[0]===ld))return S;if("children"in p&&p.children){const C=p;if(C.children&&S[0]!==Ij)for(j=(r?C.children.length:-1)+c,R=y.concat(C);j>-1&&j<C.children.length;){const A=C.children[j];if(E=d(A,j,R)(),E[0]===ld)return E;j=typeof E[1]=="number"?E[1]:j+c}}return S}}}function Xj(t){return Array.isArray(t)?t:typeof t=="number"?[Vj,t]:t==null?l0:[t]}function th(t,l,i,r){let o,s,c;typeof l=="function"&&typeof i!="function"?(s=void 0,c=l,o=i):(s=l,c=i,o=r),a0(t,s,d,o);function d(p,m){const y=m[m.length-1],g=y?y.children.indexOf(p):void 0;return c(p,g,y)}}const ad={}.hasOwnProperty,Qj={};function $j(t,l){const i=l||Qj,r=new Map,o=new Map,s=new Map,c={...Nj,...i.handlers},d={all:m,applyData:Zj,definitionById:r,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:p,options:i,patch:Kj,wrap:Jj};return th(t,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?r:o,b=String(y.identifier).toUpperCase();g.has(b)||g.set(b,y)}}),d;function p(y,g){const b=y.type,S=d.handlers[b];if(ad.call(d.handlers,b)&&S)return S(d,y,g);if(d.options.passThrough&&d.options.passThrough.includes(b)){if("children"in y){const{children:j,...R}=y,C=Bo(R);return C.children=d.all(y),C}return Bo(y)}return(d.options.unknownHandler||Pj)(d,y,g)}function m(y){const g=[];if("children"in y){const b=y.children;let S=-1;for(;++S<b.length;){const E=d.one(b[S],y);if(E){if(S&&b[S-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=uv(E.value)),!Array.isArray(E)&&E.type==="element")){const j=E.children[0];j&&j.type==="text"&&(j.value=uv(j.value))}Array.isArray(E)?g.push(...E):g.push(E)}}}return g}}function Kj(t,l){t.position&&(l.position=UC(t))}function Zj(t,l){let i=l;if(t&&t.data){const r=t.data.hName,o=t.data.hChildren,s=t.data.hProperties;if(typeof r=="string")if(i.type==="element")i.tagName=r;else{const c="children"in i?i.children:[i];i={type:"element",tagName:r,properties:{},children:c}}i.type==="element"&&s&&Object.assign(i.properties,Bo(s)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function Pj(t,l){const i=l.data||{},r="value"in l&&!(ad.call(i,"hProperties")||ad.call(i,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function Jj(t,l){const i=[];let r=-1;for(l&&i.push({type:"text",value:`
198
+ `});++r<t.length;)r&&i.push({type:"text",value:`
199
+ `}),i.push(t[r]);return l&&t.length>0&&i.push({type:"text",value:`
200
+ `}),i}function uv(t){let l=0,i=t.charCodeAt(l);for(;i===9||i===32;)l++,i=t.charCodeAt(l);return t.slice(l)}function ov(t,l){const i=$j(t,l),r=i.one(t,void 0),o=Bj(i),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
201
+ `},o),s}function Wj(t,l){return t&&"run"in t?async function(i,r){const o=ov(i,{file:r,...l});await t.run(o,r)}:function(i,r){return ov(i,{file:r,...t||l})}}function sv(t){if(t)throw t}var Cf,cv;function eA(){if(cv)return Cf;cv=1;var t=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(m){return typeof Array.isArray=="function"?Array.isArray(m):l.call(m)==="[object Array]"},s=function(m){if(!m||l.call(m)!=="[object Object]")return!1;var y=t.call(m,"constructor"),g=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!y&&!g)return!1;var b;for(b in m);return typeof b>"u"||t.call(m,b)},c=function(m,y){i&&y.name==="__proto__"?i(m,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):m[y.name]=y.newValue},d=function(m,y){if(y==="__proto__")if(t.call(m,y)){if(r)return r(m,y).value}else return;return m[y]};return Cf=function p(){var m,y,g,b,S,E,j=arguments[0],R=1,C=arguments.length,A=!1;for(typeof j=="boolean"&&(A=j,j=arguments[1]||{},R=2),(j==null||typeof j!="object"&&typeof j!="function")&&(j={});R<C;++R)if(m=arguments[R],m!=null)for(y in m)g=d(j,y),b=d(m,y),j!==b&&(A&&b&&(s(b)||(S=o(b)))?(S?(S=!1,E=g&&o(g)?g:[]):E=g&&s(g)?g:{},c(j,{name:y,newValue:p(A,E,b)})):typeof b<"u"&&c(j,{name:y,newValue:b}));return j},Cf}var tA=eA();const Tf=md(tA);function id(t){if(typeof t!="object"||t===null)return!1;const l=Object.getPrototypeOf(t);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function nA(){const t=[],l={run:i,use:r};return l;function i(...o){let s=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...o);function d(p,...m){const y=t[++s];let g=-1;if(p){c(p);return}for(;++g<o.length;)(m[g]===null||m[g]===void 0)&&(m[g]=o[g]);o=m,y?lA(y,d)(...m):c(null,...m)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),l}}function lA(t,l){let i;return r;function r(...c){const d=t.length>c.length;let p;d&&c.push(o);try{p=t.apply(this,c)}catch(m){const y=m;if(d&&i)throw y;return o(y)}d||(p&&p.then&&typeof p.then=="function"?p.then(s,o):p instanceof Error?o(p):s(p))}function o(c,...d){i||(i=!0,l(c,...d))}function s(c){o(null,c)}}const Jn={basename:aA,dirname:iA,extname:rA,join:uA,sep:"/"};function aA(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');nu(t);let i=0,r=-1,o=t.length,s;if(l===void 0||l.length===0||l.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(s){i=o+1;break}}else r<0&&(s=!0,r=o+1);return r<0?"":t.slice(i,r)}if(l===t)return"";let c=-1,d=l.length-1;for(;o--;)if(t.codePointAt(o)===47){if(s){i=o+1;break}}else c<0&&(s=!0,c=o+1),d>-1&&(t.codePointAt(o)===l.codePointAt(d--)?d<0&&(r=o):(d=-1,r=c));return i===r?r=c:r<0&&(r=t.length),t.slice(i,r)}function iA(t){if(nu(t),t.length===0)return".";let l=-1,i=t.length,r;for(;--i;)if(t.codePointAt(i)===47){if(r){l=i;break}}else r||(r=!0);return l<0?t.codePointAt(0)===47?"/":".":l===1&&t.codePointAt(0)===47?"//":t.slice(0,l)}function rA(t){nu(t);let l=t.length,i=-1,r=0,o=-1,s=0,c;for(;l--;){const d=t.codePointAt(l);if(d===47){if(c){r=l+1;break}continue}i<0&&(c=!0,i=l+1),d===46?o<0?o=l:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||i<0||s===0||s===1&&o===i-1&&o===r+1?"":t.slice(o,i)}function uA(...t){let l=-1,i;for(;++l<t.length;)nu(t[l]),t[l]&&(i=i===void 0?t[l]:i+"/"+t[l]);return i===void 0?".":oA(i)}function oA(t){nu(t);const l=t.codePointAt(0)===47;let i=sA(t,!l);return i.length===0&&!l&&(i="."),i.length>0&&t.codePointAt(t.length-1)===47&&(i+="/"),l?"/"+i:i}function sA(t,l){let i="",r=0,o=-1,s=0,c=-1,d,p;for(;++c<=t.length;){if(c<t.length)d=t.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(o===c-1||s===1))if(o!==c-1&&s===2){if(i.length<2||r!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(p=i.lastIndexOf("/"),p!==i.length-1){p<0?(i="",r=0):(i=i.slice(0,p),r=i.length-1-i.lastIndexOf("/")),o=c,s=0;continue}}else if(i.length>0){i="",r=0,o=c,s=0;continue}}l&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+t.slice(o+1,c):i=t.slice(o+1,c),r=c-o-1;o=c,s=0}else d===46&&s>-1?s++:s=-1}return i}function nu(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const cA={cwd:fA};function fA(){return"/"}function rd(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function dA(t){if(typeof t=="string")t=new URL(t);else if(!rd(t)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(t.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return hA(t)}function hA(t){if(t.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 l=t.pathname;let i=-1;for(;++i<l.length;)if(l.codePointAt(i)===37&&l.codePointAt(i+1)===50){const r=l.codePointAt(i+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(l)}const jf=["history","path","basename","stem","extname","dirname"];class i0{constructor(l){let i;l?rd(l)?i={path:l}:typeof l=="string"||mA(l)?i={value:l}:i=l:i={},this.cwd="cwd"in i?"":cA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<jf.length;){const s=jf[r];s in i&&i[s]!==void 0&&i[s]!==null&&(this[s]=s==="history"?[...i[s]]:i[s])}let o;for(o in i)jf.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?Jn.basename(this.path):void 0}set basename(l){Rf(l,"basename"),Af(l,"basename"),this.path=Jn.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Jn.dirname(this.path):void 0}set dirname(l){fv(this.basename,"dirname"),this.path=Jn.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Jn.extname(this.path):void 0}set extname(l){if(Af(l,"extname"),fv(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Jn.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){rd(l)&&(l=dA(l)),Rf(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Jn.basename(this.path,this.extname):void 0}set stem(l){Rf(l,"stem"),Af(l,"stem"),this.path=Jn.join(this.dirname||"",l+(this.extname||""))}fail(l,i,r){const o=this.message(l,i,r);throw o.fatal=!0,o}info(l,i,r){const o=this.message(l,i,r);return o.fatal=void 0,o}message(l,i,r){const o=new Qt(l,i,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function Af(t,l){if(t&&t.includes(Jn.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Jn.sep+"`")}function Rf(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function fv(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function mA(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const pA=(function(t){const r=this.constructor.prototype,o=r[t],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),gA={}.hasOwnProperty;class nh extends pA{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=nA()}copy(){const l=new nh;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];l.use(...r)}return l.data(Tf(!0,{},this.namespace)),l}data(l,i){return typeof l=="string"?arguments.length===2?(Df("data",this.frozen),this.namespace[l]=i,this):gA.call(this.namespace,l)&&this.namespace[l]||void 0:l?(Df("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=i.call(l,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const i=ko(l),r=this.parser||this.Parser;return _f("parse",r),r(String(i),i)}process(l,i){const r=this;return this.freeze(),_f("process",this.parser||this.Parser),Nf("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(s,c){const d=ko(l),p=r.parse(d);r.run(p,d,function(y,g,b){if(y||!g||!b)return m(y);const S=g,E=r.stringify(S,b);bA(E)?b.value=E:b.result=E,m(y,b)});function m(y,g){y||!g?c(y):s?s(g):i(void 0,g)}}}processSync(l){let i=!1,r;return this.freeze(),_f("processSync",this.parser||this.Parser),Nf("processSync",this.compiler||this.Compiler),this.process(l,o),hv("processSync","process",i),r;function o(s,c){i=!0,sv(s),r=c}}run(l,i,r){dv(l),this.freeze();const o=this.transformers;return!r&&typeof i=="function"&&(r=i,i=void 0),r?s(void 0,r):new Promise(s);function s(c,d){const p=ko(i);o.run(l,p,m);function m(y,g,b){const S=g||l;y?d(y):c?c(S):r(void 0,S,b)}}}runSync(l,i){let r=!1,o;return this.run(l,i,s),hv("runSync","run",r),o;function s(c,d){sv(c),o=d,r=!0}}stringify(l,i){this.freeze();const r=ko(i),o=this.compiler||this.Compiler;return Nf("stringify",o),dv(l),o(l,r)}use(l,...i){const r=this.attachers,o=this.namespace;if(Df("use",this.frozen),l!=null)if(typeof l=="function")p(l,i);else if(typeof l=="object")Array.isArray(l)?d(l):c(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function s(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[y,...g]=m;p(y,g)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))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");d(m.plugins),m.settings&&(o.settings=Tf(!0,o.settings,m.settings))}function d(m){let y=-1;if(m!=null)if(Array.isArray(m))for(;++y<m.length;){const g=m[y];s(g)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,y){let g=-1,b=-1;for(;++g<r.length;)if(r[g][0]===m){b=g;break}if(b===-1)r.push([m,...y]);else if(y.length>0){let[S,...E]=y;const j=r[b][1];id(j)&&id(S)&&(S=Tf(!0,j,S)),r[b]=[m,S,...E]}}}}const yA=new nh().freeze();function _f(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Nf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Df(t,l){if(l)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function dv(t){if(!id(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function hv(t,l,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function ko(t){return vA(t)?t:new i0(t)}function vA(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function bA(t){return typeof t=="string"||xA(t)}function xA(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const SA="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",mv=[],pv={allowDangerousHtml:!0},EA=/^(https?|ircs?|mailto|xmpp)$/i,wA=[{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 kA(t){const l=CA(t),i=TA(t);return jA(l.runSync(l.parse(i),i),t)}function CA(t){const l=t.rehypePlugins||mv,i=t.remarkPlugins||mv,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...pv}:pv;return yA().use(ij).use(i).use(Wj,r).use(l)}function TA(t){const l=t.children||"",i=new i0;return typeof l=="string"&&(i.value=l),i}function jA(t,l){const i=l.allowedElements,r=l.allowElement,o=l.components,s=l.disallowedElements,c=l.skipHtml,d=l.unwrapDisallowed,p=l.urlTransform||AA;for(const y of wA)Object.hasOwn(l,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+SA+y.id,void 0);return th(t,m),GC(t,{Fragment:v.Fragment,components:o,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function m(y,g,b){if(y.type==="raw"&&b&&typeof g=="number")return c?b.children.splice(g,1):b.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let S;for(S in Ef)if(Object.hasOwn(Ef,S)&&Object.hasOwn(y.properties,S)){const E=y.properties[S],j=Ef[S];(j===null||j.includes(y.tagName))&&(y.properties[S]=p(String(E||""),S,y))}}if(y.type==="element"){let S=i?!i.includes(y.tagName):s?s.includes(y.tagName):!1;if(!S&&r&&typeof g=="number"&&(S=!r(y,g,b)),S&&b&&typeof g=="number")return d&&y.children?b.children.splice(g,1,...y.children):b.children.splice(g,1),g}}}function AA(t){const l=t.indexOf(":"),i=t.indexOf("?"),r=t.indexOf("#"),o=t.indexOf("/");return l===-1||o!==-1&&l>o||i!==-1&&l>i||r!==-1&&l>r||EA.test(t.slice(0,l))?t:""}function gv(t,l){const i=String(t);if(typeof l!="string")throw new TypeError("Expected character");let r=0,o=i.indexOf(l);for(;o!==-1;)r++,o=i.indexOf(l,o+l.length);return r}function RA(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function _A(t,l,i){const o=Jo((i||{}).ignore||[]),s=NA(l);let c=-1;for(;++c<s.length;)a0(t,"text",d);function d(m,y){let g=-1,b;for(;++g<y.length;){const S=y[g],E=b?b.children:void 0;if(o(S,E?E.indexOf(S):void 0,b))return;b=S}if(b)return p(m,y)}function p(m,y){const g=y[y.length-1],b=s[c][0],S=s[c][1];let E=0;const R=g.children.indexOf(m);let C=!1,A=[];b.lastIndex=0;let D=b.exec(m.value);for(;D;){const ee=D.index,$={index:D.index,input:D.input,stack:[...y,m]};let B=S(...D,$);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?b.lastIndex=ee+1:(E!==ee&&A.push({type:"text",value:m.value.slice(E,ee)}),Array.isArray(B)?A.push(...B):B&&A.push(B),E=ee+D[0].length,C=!0),!b.global)break;D=b.exec(m.value)}return C?(E<m.value.length&&A.push({type:"text",value:m.value.slice(E)}),g.children.splice(R,1,...A)):A=[m],R+A.length}}function NA(t){const l=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<i.length;){const o=i[r];l.push([DA(o[0]),zA(o[1])])}return l}function DA(t){return typeof t=="string"?new RegExp(RA(t),"g"):t}function zA(t){return typeof t=="function"?t:function(){return t}}const zf="phrasing",Of=["autolink","link","image","label"];function OA(){return{transforms:[YA],enter:{literalAutolink:LA,literalAutolinkEmail:Mf,literalAutolinkHttp:Mf,literalAutolinkWww:Mf},exit:{literalAutolink:qA,literalAutolinkEmail:HA,literalAutolinkHttp:UA,literalAutolinkWww:BA}}}function MA(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zf,notInConstruct:Of},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zf,notInConstruct:Of},{character:":",before:"[ps]",after:"\\/",inConstruct:zf,notInConstruct:Of}]}}function LA(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Mf(t){this.config.enter.autolinkProtocol.call(this,t)}function UA(t){this.config.exit.autolinkProtocol.call(this,t)}function BA(t){this.config.exit.data.call(this,t);const l=this.stack[this.stack.length-1];l.type,l.url="http://"+this.sliceSerialize(t)}function HA(t){this.config.exit.autolinkEmail.call(this,t)}function qA(t){this.exit(t)}function YA(t){_A(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,GA],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),FA]],{ignore:["link","linkReference"]})}function GA(t,l,i,r,o){let s="";if(!r0(o)||(/^w/i.test(l)&&(i=l+i,l="",s="http://"),!VA(i)))return!1;const c=IA(i+r);if(!c[0])return!1;const d={type:"link",title:null,url:s+l+c[0],children:[{type:"text",value:l+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function FA(t,l,i,r){return!r0(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+i,children:[{type:"text",value:l+"@"+i}]}}function VA(t){const l=t.split(".");return!(l.length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))}function IA(t){const l=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!l)return[t,void 0];t=t.slice(0,l.index);let i=l[0],r=i.indexOf(")");const o=gv(t,"(");let s=gv(t,")");for(;r!==-1&&o>s;)t+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),s++;return[t,i]}function r0(t,l){const i=t.input.charCodeAt(t.index-1);return(t.index===0||Ya(i)||Ko(i))&&(!l||i!==47)}u0.peek=eR;function XA(){this.buffer()}function QA(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function $A(){this.buffer()}function KA(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function ZA(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=In(this.sliceSerialize(t)).toLowerCase(),i.label=l}function PA(t){this.exit(t)}function JA(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=In(this.sliceSerialize(t)).toLowerCase(),i.label=l}function WA(t){this.exit(t)}function eR(){return"["}function u0(t,l,i,r){const o=i.createTracker(r);let s=o.move("[^");const c=i.enter("footnoteReference"),d=i.enter("reference");return s+=o.move(i.safe(i.associationId(t),{after:"]",before:s})),d(),c(),s+=o.move("]"),s}function tR(){return{enter:{gfmFootnoteCallString:XA,gfmFootnoteCall:QA,gfmFootnoteDefinitionLabelString:$A,gfmFootnoteDefinition:KA},exit:{gfmFootnoteCallString:ZA,gfmFootnoteCall:PA,gfmFootnoteDefinitionLabelString:JA,gfmFootnoteDefinition:WA}}}function nR(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:i,footnoteReference:u0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,o,s,c){const d=s.createTracker(c);let p=d.move("[^");const m=s.enter("footnoteDefinition"),y=s.enter("label");return p+=d.move(s.safe(s.associationId(r),{before:p,after:"]"})),y(),p+=d.move("]:"),r.children&&r.children.length>0&&(d.shift(4),p+=d.move((l?`
202
+ `:" ")+s.indentLines(s.containerFlow(r,d.current()),l?o0:lR))),m(),p}}function lR(t,l,i){return l===0?t:o0(t,l,i)}function o0(t,l,i){return(i?"":" ")+t}const aR=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];s0.peek=sR;function iR(){return{canContainEols:["delete"],enter:{strikethrough:uR},exit:{strikethrough:oR}}}function rR(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:aR}],handlers:{delete:s0}}}function uR(t){this.enter({type:"delete",children:[]},t)}function oR(t){this.exit(t)}function s0(t,l,i,r){const o=i.createTracker(r),s=i.enter("strikethrough");let c=o.move("~~");return c+=i.containerPhrasing(t,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),s(),c}function sR(){return"~"}function cR(t){return t.length}function fR(t,l){const i=l||{},r=(i.align||[]).concat(),o=i.stringLength||cR,s=[],c=[],d=[],p=[];let m=0,y=-1;for(;++y<t.length;){const j=[],R=[];let C=-1;for(t[y].length>m&&(m=t[y].length);++C<t[y].length;){const A=dR(t[y][C]);if(i.alignDelimiters!==!1){const D=o(A);R[C]=D,(p[C]===void 0||D>p[C])&&(p[C]=D)}j.push(A)}c[y]=j,d[y]=R}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<m;)s[g]=yv(r[g]);else{const j=yv(r);for(;++g<m;)s[g]=j}g=-1;const b=[],S=[];for(;++g<m;){const j=s[g];let R="",C="";j===99?(R=":",C=":"):j===108?R=":":j===114&&(C=":");let A=i.alignDelimiters===!1?1:Math.max(1,p[g]-R.length-C.length);const D=R+"-".repeat(A)+C;i.alignDelimiters!==!1&&(A=R.length+A+C.length,A>p[g]&&(p[g]=A),S[g]=A),b[g]=D}c.splice(1,0,b),d.splice(1,0,S),y=-1;const E=[];for(;++y<c.length;){const j=c[y],R=d[y];g=-1;const C=[];for(;++g<m;){const A=j[g]||"";let D="",ee="";if(i.alignDelimiters!==!1){const $=p[g]-(R[g]||0),B=s[g];B===114?D=" ".repeat($):B===99?$%2?(D=" ".repeat($/2+.5),ee=" ".repeat($/2-.5)):(D=" ".repeat($/2),ee=D):ee=" ".repeat($)}i.delimiterStart!==!1&&!g&&C.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&A==="")&&(i.delimiterStart!==!1||g)&&C.push(" "),i.alignDelimiters!==!1&&C.push(D),C.push(A),i.alignDelimiters!==!1&&C.push(ee),i.padding!==!1&&C.push(" "),(i.delimiterEnd!==!1||g!==m-1)&&C.push("|")}E.push(i.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return E.join(`
203
+ `)}function dR(t){return t==null?"":String(t)}function yv(t){const l=typeof t=="string"?t.codePointAt(0):0;return l===67||l===99?99:l===76||l===108?108:l===82||l===114?114:0}function hR(t,l,i,r){const o=i.enter("blockquote"),s=i.createTracker(r);s.move("> "),s.shift(2);const c=i.indentLines(i.containerFlow(t,s.current()),mR);return o(),c}function mR(t,l,i){return">"+(i?"":" ")+t}function pR(t,l){return vv(t,l.inConstruct,!0)&&!vv(t,l.notInConstruct,!1)}function vv(t,l,i){if(typeof l=="string"&&(l=[l]),!l||l.length===0)return i;let r=-1;for(;++r<l.length;)if(t.includes(l[r]))return!0;return!1}function bv(t,l,i,r){let o=-1;for(;++o<i.unsafe.length;)if(i.unsafe[o].character===`
204
+ `&&pR(i.stack,i.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
205
+ `}function gR(t,l){const i=String(t);let r=i.indexOf(l),o=r,s=0,c=0;if(typeof l!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++s>c&&(c=s):s=1,o=r+l.length,r=i.indexOf(l,o);return c}function yR(t,l){return!!(l.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function vR(t){const l=t.options.fence||"`";if(l!=="`"&&l!=="~")throw new Error("Cannot serialize code with `"+l+"` for `options.fence`, expected `` ` `` or `~`");return l}function bR(t,l,i,r){const o=vR(i),s=t.value||"",c=o==="`"?"GraveAccent":"Tilde";if(yR(t,i)){const g=i.enter("codeIndented"),b=i.indentLines(s,xR);return g(),b}const d=i.createTracker(r),p=o.repeat(Math.max(gR(s,o)+1,3)),m=i.enter("codeFenced");let y=d.move(p);if(t.lang){const g=i.enter(`codeFencedLang${c}`);y+=d.move(i.safe(t.lang,{before:y,after:" ",encode:["`"],...d.current()})),g()}if(t.lang&&t.meta){const g=i.enter(`codeFencedMeta${c}`);y+=d.move(" "),y+=d.move(i.safe(t.meta,{before:y,after:`
206
+ `,encode:["`"],...d.current()})),g()}return y+=d.move(`
207
+ `),s&&(y+=d.move(s+`
208
+ `)),y+=d.move(p),m(),y}function xR(t,l,i){return(i?"":" ")+t}function lh(t){const l=t.options.quote||'"';if(l!=='"'&&l!=="'")throw new Error("Cannot serialize title with `"+l+"` for `options.quote`, expected `\"`, or `'`");return l}function SR(t,l,i,r){const o=lh(i),s=o==='"'?"Quote":"Apostrophe",c=i.enter("definition");let d=i.enter("label");const p=i.createTracker(r);let m=p.move("[");return m+=p.move(i.safe(i.associationId(t),{before:m,after:"]",...p.current()})),m+=p.move("]: "),d(),!t.url||/[\0- \u007F]/.test(t.url)?(d=i.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(i.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(d=i.enter("destinationRaw"),m+=p.move(i.safe(t.url,{before:m,after:t.title?" ":`
209
+ `,...p.current()}))),d(),t.title&&(d=i.enter(`title${s}`),m+=p.move(" "+o),m+=p.move(i.safe(t.title,{before:m,after:o,...p.current()})),m+=p.move(o),d()),c(),m}function ER(t){const l=t.options.emphasis||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize emphasis with `"+l+"` for `options.emphasis`, expected `*`, or `_`");return l}function Xr(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Ho(t,l,i){const r=zi(t),o=zi(l);return r===void 0?o===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}c0.peek=wR;function c0(t,l,i,r){const o=ER(i),s=i.enter("emphasis"),c=i.createTracker(r),d=c.move(o);let p=c.move(i.containerPhrasing(t,{after:o,before:d,...c.current()}));const m=p.charCodeAt(0),y=Ho(r.before.charCodeAt(r.before.length-1),m,o);y.inside&&(p=Xr(m)+p.slice(1));const g=p.charCodeAt(p.length-1),b=Ho(r.after.charCodeAt(0),g,o);b.inside&&(p=p.slice(0,-1)+Xr(g));const S=c.move(o);return s(),i.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},d+p+S}function wR(t,l,i){return i.options.emphasis||"*"}function kR(t,l){let i=!1;return th(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return i=!0,ld}),!!((!t.depth||t.depth<3)&&$d(t)&&(l.options.setext||i))}function CR(t,l,i,r){const o=Math.max(Math.min(6,t.depth||1),1),s=i.createTracker(r);if(kR(t,i)){const y=i.enter("headingSetext"),g=i.enter("phrasing"),b=i.containerPhrasing(t,{...s.current(),before:`
210
+ `,after:`
211
+ `});return g(),y(),b+`
212
+ `+(o===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
213
+ `))+1))}const c="#".repeat(o),d=i.enter("headingAtx"),p=i.enter("phrasing");s.move(c+" ");let m=i.containerPhrasing(t,{before:"# ",after:`
214
+ `,...s.current()});return/^[\t ]/.test(m)&&(m=Xr(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,i.options.closeAtx&&(m+=" "+c),p(),d(),m}f0.peek=TR;function f0(t){return t.value||""}function TR(){return"<"}d0.peek=jR;function d0(t,l,i,r){const o=lh(i),s=o==='"'?"Quote":"Apostrophe",c=i.enter("image");let d=i.enter("label");const p=i.createTracker(r);let m=p.move("![");return m+=p.move(i.safe(t.alt,{before:m,after:"]",...p.current()})),m+=p.move("]("),d(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(d=i.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(i.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(d=i.enter("destinationRaw"),m+=p.move(i.safe(t.url,{before:m,after:t.title?" ":")",...p.current()}))),d(),t.title&&(d=i.enter(`title${s}`),m+=p.move(" "+o),m+=p.move(i.safe(t.title,{before:m,after:o,...p.current()})),m+=p.move(o),d()),m+=p.move(")"),c(),m}function jR(){return"!"}h0.peek=AR;function h0(t,l,i,r){const o=t.referenceType,s=i.enter("imageReference");let c=i.enter("label");const d=i.createTracker(r);let p=d.move("![");const m=i.safe(t.alt,{before:p,after:"]",...d.current()});p+=d.move(m+"]["),c();const y=i.stack;i.stack=[],c=i.enter("reference");const g=i.safe(i.associationId(t),{before:p,after:"]",...d.current()});return c(),i.stack=y,s(),o==="full"||!m||m!==g?p+=d.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function AR(){return"!"}m0.peek=RR;function m0(t,l,i){let r=t.value||"",o="`",s=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<i.unsafe.length;){const c=i.unsafe[s],d=i.compilePattern(c);let p;if(c.atBreak)for(;p=d.exec(r);){let m=p.index;r.charCodeAt(m)===10&&r.charCodeAt(m-1)===13&&m--,r=r.slice(0,m)+" "+r.slice(p.index+1)}}return o+r+o}function RR(){return"`"}function p0(t,l){const i=$d(t);return!!(!l.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(i===t.url||"mailto:"+i===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}g0.peek=_R;function g0(t,l,i,r){const o=lh(i),s=o==='"'?"Quote":"Apostrophe",c=i.createTracker(r);let d,p;if(p0(t,i)){const y=i.stack;i.stack=[],d=i.enter("autolink");let g=c.move("<");return g+=c.move(i.containerPhrasing(t,{before:g,after:">",...c.current()})),g+=c.move(">"),d(),i.stack=y,g}d=i.enter("link"),p=i.enter("label");let m=c.move("[");return m+=c.move(i.containerPhrasing(t,{before:m,after:"](",...c.current()})),m+=c.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=i.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(i.safe(t.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(p=i.enter("destinationRaw"),m+=c.move(i.safe(t.url,{before:m,after:t.title?" ":")",...c.current()}))),p(),t.title&&(p=i.enter(`title${s}`),m+=c.move(" "+o),m+=c.move(i.safe(t.title,{before:m,after:o,...c.current()})),m+=c.move(o),p()),m+=c.move(")"),d(),m}function _R(t,l,i){return p0(t,i)?"<":"["}y0.peek=NR;function y0(t,l,i,r){const o=t.referenceType,s=i.enter("linkReference");let c=i.enter("label");const d=i.createTracker(r);let p=d.move("[");const m=i.containerPhrasing(t,{before:p,after:"]",...d.current()});p+=d.move(m+"]["),c();const y=i.stack;i.stack=[],c=i.enter("reference");const g=i.safe(i.associationId(t),{before:p,after:"]",...d.current()});return c(),i.stack=y,s(),o==="full"||!m||m!==g?p+=d.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function NR(){return"["}function ah(t){const l=t.options.bullet||"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bullet`, expected `*`, `+`, or `-`");return l}function DR(t){const l=ah(t),i=t.options.bulletOther;if(!i)return l==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===l)throw new Error("Expected `bullet` (`"+l+"`) and `bulletOther` (`"+i+"`) to be different");return i}function zR(t){const l=t.options.bulletOrdered||".";if(l!=="."&&l!==")")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOrdered`, expected `.` or `)`");return l}function v0(t){const l=t.options.rule||"*";if(l!=="*"&&l!=="-"&&l!=="_")throw new Error("Cannot serialize rules with `"+l+"` for `options.rule`, expected `*`, `-`, or `_`");return l}function OR(t,l,i,r){const o=i.enter("list"),s=i.bulletCurrent;let c=t.ordered?zR(i):ah(i);const d=t.ordered?c==="."?")":".":DR(i);let p=l&&i.bulletLastUsed?c===i.bulletLastUsed:!1;if(!t.ordered){const y=t.children?t.children[0]:void 0;if((c==="*"||c==="-")&&y&&(!y.children||!y.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(p=!0),v0(i)===c&&y){let g=-1;for(;++g<t.children.length;){const b=t.children[g];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(c=d),i.bulletCurrent=c;const m=i.containerFlow(t,r);return i.bulletLastUsed=c,i.bulletCurrent=s,o(),m}function MR(t){const l=t.options.listItemIndent||"one";if(l!=="tab"&&l!=="one"&&l!=="mixed")throw new Error("Cannot serialize items with `"+l+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return l}function LR(t,l,i,r){const o=MR(i);let s=i.bulletCurrent||ah(i);l&&l.type==="list"&&l.ordered&&(s=(typeof l.start=="number"&&l.start>-1?l.start:1)+(i.options.incrementListMarker===!1?0:l.children.indexOf(t))+s);let c=s.length+1;(o==="tab"||o==="mixed"&&(l&&l.type==="list"&&l.spread||t.spread))&&(c=Math.ceil(c/4)*4);const d=i.createTracker(r);d.move(s+" ".repeat(c-s.length)),d.shift(c);const p=i.enter("listItem"),m=i.indentLines(i.containerFlow(t,d.current()),y);return p(),m;function y(g,b,S){return b?(S?"":" ".repeat(c))+g:(S?s:s+" ".repeat(c-s.length))+g}}function UR(t,l,i,r){const o=i.enter("paragraph"),s=i.enter("phrasing"),c=i.containerPhrasing(t,r);return s(),o(),c}const BR=Jo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function HR(t,l,i,r){return(t.children.some(function(c){return BR(c)})?i.containerPhrasing:i.containerFlow).call(i,t,r)}function qR(t){const l=t.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}b0.peek=YR;function b0(t,l,i,r){const o=qR(i),s=i.enter("strong"),c=i.createTracker(r),d=c.move(o+o);let p=c.move(i.containerPhrasing(t,{after:o,before:d,...c.current()}));const m=p.charCodeAt(0),y=Ho(r.before.charCodeAt(r.before.length-1),m,o);y.inside&&(p=Xr(m)+p.slice(1));const g=p.charCodeAt(p.length-1),b=Ho(r.after.charCodeAt(0),g,o);b.inside&&(p=p.slice(0,-1)+Xr(g));const S=c.move(o+o);return s(),i.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},d+p+S}function YR(t,l,i){return i.options.strong||"*"}function GR(t,l,i,r){return i.safe(t.value,r)}function FR(t){const l=t.options.ruleRepetition||3;if(l<3)throw new Error("Cannot serialize rules with repetition `"+l+"` for `options.ruleRepetition`, expected `3` or more");return l}function VR(t,l,i){const r=(v0(i)+(i.options.ruleSpaces?" ":"")).repeat(FR(i));return i.options.ruleSpaces?r.slice(0,-1):r}const x0={blockquote:hR,break:bv,code:bR,definition:SR,emphasis:c0,hardBreak:bv,heading:CR,html:f0,image:d0,imageReference:h0,inlineCode:m0,link:g0,linkReference:y0,list:OR,listItem:LR,paragraph:UR,root:HR,strong:b0,text:GR,thematicBreak:VR};function IR(){return{enter:{table:XR,tableData:xv,tableHeader:xv,tableRow:$R},exit:{codeText:KR,table:QR,tableData:Lf,tableHeader:Lf,tableRow:Lf}}}function XR(t){const l=t._align;this.enter({type:"table",align:l.map(function(i){return i==="none"?null:i}),children:[]},t),this.data.inTable=!0}function QR(t){this.exit(t),this.data.inTable=void 0}function $R(t){this.enter({type:"tableRow",children:[]},t)}function Lf(t){this.exit(t)}function xv(t){this.enter({type:"tableCell",children:[]},t)}function KR(t){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,ZR));const i=this.stack[this.stack.length-1];i.type,i.value=l,this.exit(t)}function ZR(t,l){return l==="|"?l:t}function PR(t){const l=t||{},i=l.tableCellPadding,r=l.tablePipeAlign,o=l.stringLength,s=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
215
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:c,tableCell:p,tableRow:d}};function c(S,E,j,R){return m(y(S,j,R),S.align)}function d(S,E,j,R){const C=g(S,j,R),A=m([C]);return A.slice(0,A.indexOf(`
216
+ `))}function p(S,E,j,R){const C=j.enter("tableCell"),A=j.enter("phrasing"),D=j.containerPhrasing(S,{...R,before:s,after:s});return A(),C(),D}function m(S,E){return fR(S,{align:E,alignDelimiters:r,padding:i,stringLength:o})}function y(S,E,j){const R=S.children;let C=-1;const A=[],D=E.enter("table");for(;++C<R.length;)A[C]=g(R[C],E,j);return D(),A}function g(S,E,j){const R=S.children;let C=-1;const A=[],D=E.enter("tableRow");for(;++C<R.length;)A[C]=p(R[C],S,E,j);return D(),A}function b(S,E,j){let R=x0.inlineCode(S,E,j);return j.stack.includes("tableCell")&&(R=R.replace(/\|/g,"\\$&")),R}}function JR(){return{exit:{taskListCheckValueChecked:Sv,taskListCheckValueUnchecked:Sv,paragraph:e_}}}function WR(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:t_}}}function Sv(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function e_(t){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const r=i.children[0];if(r&&r.type==="text"){const o=l.children;let s=-1,c;for(;++s<o.length;){const d=o[s];if(d.type==="paragraph"){c=d;break}}c===i&&(r.value=r.value.slice(1),r.value.length===0?i.children.shift():i.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,i.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function t_(t,l,i,r){const o=t.children[0],s=typeof t.checked=="boolean"&&o&&o.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",d=i.createTracker(r);s&&d.move(c);let p=x0.listItem(t,l,i,{...r,...d.current()});return s&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(y){return y+c}}function n_(){return[OA(),tR(),iR(),IR(),JR()]}function l_(t){return{extensions:[MA(),nR(t),rR(),PR(t),WR()]}}const a_={tokenize:c_,partial:!0},S0={tokenize:f_,partial:!0},E0={tokenize:d_,partial:!0},w0={tokenize:h_,partial:!0},i_={tokenize:m_,partial:!0},k0={name:"wwwAutolink",tokenize:o_,previous:T0},C0={name:"protocolAutolink",tokenize:s_,previous:j0},_l={name:"emailAutolink",tokenize:u_,previous:A0},nl={};function r_(){return{text:nl}}let Ha=48;for(;Ha<123;)nl[Ha]=_l,Ha++,Ha===58?Ha=65:Ha===91&&(Ha=97);nl[43]=_l;nl[45]=_l;nl[46]=_l;nl[95]=_l;nl[72]=[_l,C0];nl[104]=[_l,C0];nl[87]=[_l,k0];nl[119]=[_l,k0];function u_(t,l,i){const r=this;let o,s;return c;function c(g){return!ud(g)||!A0.call(r,r.previous)||ih(r.events)?i(g):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),d(g))}function d(g){return ud(g)?(t.consume(g),d):g===64?(t.consume(g),p):i(g)}function p(g){return g===46?t.check(i_,y,m)(g):g===45||g===95||Xt(g)?(s=!0,t.consume(g),p):y(g)}function m(g){return t.consume(g),o=!0,p}function y(g){return s&&o&&Zt(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(g)):i(g)}}function o_(t,l,i){const r=this;return o;function o(c){return c!==87&&c!==119||!T0.call(r,r.previous)||ih(r.events)?i(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(a_,t.attempt(S0,t.attempt(E0,s),i),i)(c))}function s(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(c)}}function s_(t,l,i){const r=this;let o="",s=!1;return c;function c(g){return(g===72||g===104)&&j0.call(r,r.previous)&&!ih(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),t.consume(g),d):i(g)}function d(g){if(Zt(g)&&o.length<5)return o+=String.fromCodePoint(g),t.consume(g),d;if(g===58){const b=o.toLowerCase();if(b==="http"||b==="https")return t.consume(g),p}return i(g)}function p(g){return g===47?(t.consume(g),s?m:(s=!0,p)):i(g)}function m(g){return g===null||Lo(g)||st(g)||Ya(g)||Ko(g)?i(g):t.attempt(S0,t.attempt(E0,y),i)(g)}function y(g){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(g)}}function c_(t,l,i){let r=0;return o;function o(c){return(c===87||c===119)&&r<3?(r++,t.consume(c),o):c===46&&r===3?(t.consume(c),s):i(c)}function s(c){return c===null?i(c):l(c)}}function f_(t,l,i){let r,o,s;return c;function c(m){return m===46||m===95?t.check(w0,p,d)(m):m===null||st(m)||Ya(m)||m!==45&&Ko(m)?p(m):(s=!0,t.consume(m),c)}function d(m){return m===95?r=!0:(o=r,r=void 0),t.consume(m),c}function p(m){return o||r||!s?i(m):l(m)}}function d_(t,l){let i=0,r=0;return o;function o(c){return c===40?(i++,t.consume(c),o):c===41&&r<i?s(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?t.check(w0,l,s)(c):c===null||st(c)||Ya(c)?l(c):(t.consume(c),o)}function s(c){return c===41&&r++,t.consume(c),o}}function h_(t,l,i){return r;function r(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(t.consume(d),r):d===38?(t.consume(d),s):d===93?(t.consume(d),o):d===60||d===null||st(d)||Ya(d)?l(d):i(d)}function o(d){return d===null||d===40||d===91||st(d)||Ya(d)?l(d):r(d)}function s(d){return Zt(d)?c(d):i(d)}function c(d){return d===59?(t.consume(d),r):Zt(d)?(t.consume(d),c):i(d)}}function m_(t,l,i){return r;function r(s){return t.consume(s),o}function o(s){return Xt(s)?i(s):l(s)}}function T0(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||st(t)}function j0(t){return!Zt(t)}function A0(t){return!(t===47||ud(t))}function ud(t){return t===43||t===45||t===46||t===95||Xt(t)}function ih(t){let l=t.length,i=!1;for(;l--;){const r=t[l][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){i=!0;break}if(r._gfmAutolinkLiteralWalkedInto){i=!1;break}}return t.length>0&&!i&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const p_={tokenize:w_,partial:!0};function g_(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:x_,continuation:{tokenize:S_},exit:E_}},text:{91:{name:"gfmFootnoteCall",tokenize:b_},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:y_,resolveTo:v_}}}}function y_(t,l,i){const r=this;let o=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c;for(;o--;){const p=r.events[o][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return d;function d(p){if(!c||!c._balanced)return i(p);const m=In(r.sliceSerialize({start:c.end,end:r.now()}));return m.codePointAt(0)!==94||!s.includes(m.slice(1))?i(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),l(p))}}function v_(t,l){let i=t.length;for(;i--;)if(t[i][1].type==="labelImage"&&t[i][0]==="enter"){t[i][1];break}t[i+1][1].type="data",t[i+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[i+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[i+3][1].end),end:Object.assign({},t[i+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},d=[t[i+1],t[i+2],["enter",r,l],t[i+3],t[i+4],["enter",o,l],["exit",o,l],["enter",s,l],["enter",c,l],["exit",c,l],["exit",s,l],t[t.length-2],t[t.length-1],["exit",r,l]];return t.splice(i,t.length-i+1,...d),t}function b_(t,l,i){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,c;return d;function d(g){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),p}function p(g){return g!==94?i(g):(t.enter("gfmFootnoteCallMarker"),t.consume(g),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(g){if(s>999||g===93&&!c||g===null||g===91||st(g))return i(g);if(g===93){t.exit("chunkString");const b=t.exit("gfmFootnoteCallString");return o.includes(In(r.sliceSerialize(b)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),l):i(g)}return st(g)||(c=!0),s++,t.consume(g),g===92?y:m}function y(g){return g===91||g===92||g===93?(t.consume(g),s++,m):m(g)}}function x_(t,l,i){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,c=0,d;return p;function p(E){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(E){return E===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",y):i(E)}function y(E){if(c>999||E===93&&!d||E===null||E===91||st(E))return i(E);if(E===93){t.exit("chunkString");const j=t.exit("gfmFootnoteDefinitionLabelString");return s=In(r.sliceSerialize(j)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),b}return st(E)||(d=!0),c++,t.consume(E),E===92?g:y}function g(E){return E===91||E===92||E===93?(t.consume(E),c++,y):y(E)}function b(E){return E===58?(t.enter("definitionMarker"),t.consume(E),t.exit("definitionMarker"),o.includes(s)||o.push(s),Ze(t,S,"gfmFootnoteDefinitionWhitespace")):i(E)}function S(E){return l(E)}}function S_(t,l,i){return t.check(tu,l,t.attempt(p_,l,i))}function E_(t){t.exit("gfmFootnoteDefinition")}function w_(t,l,i){const r=this;return Ze(t,o,"gfmFootnoteDefinitionIndent",5);function o(s){const c=r.events[r.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?l(s):i(s)}}function k_(t){let i=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:o};return i==null&&(i=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(c,d){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let m=p;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[p][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[p][1].end)},g={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[p][1].start)},b=[["enter",y,d],["enter",c[m][1],d],["exit",c[m][1],d],["enter",g,d]],S=d.parser.constructs.insideSpan.null;S&&xn(b,b.length,0,Zo(S,c.slice(m+1,p),d)),xn(b,b.length,0,[["exit",g,d],["enter",c[p][1],d],["exit",c[p][1],d],["exit",y,d]]),xn(c,m-1,p-m+3,b),p=m+b.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function s(c,d,p){const m=this.previous,y=this.events;let g=0;return b;function b(E){return m===126&&y[y.length-1][1].type!=="characterEscape"?p(E):(c.enter("strikethroughSequenceTemporary"),S(E))}function S(E){const j=zi(m);if(E===126)return g>1?p(E):(c.consume(E),g++,S);if(g<2&&!i)return p(E);const R=c.exit("strikethroughSequenceTemporary"),C=zi(E);return R._open=!C||C===2&&!!j,R._close=!j||j===2&&!!C,d(E)}}}class C_{constructor(){this.map=[]}add(l,i,r){T_(this,l,i,r)}consume(l){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let i=this.map.length;const r=[];for(;i>0;)i-=1,r.push(l.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),l.length=this.map[i][0];r.push(l.slice()),l.length=0;let o=r.pop();for(;o;){for(const s of o)l.push(s);o=r.pop()}this.map.length=0}}function T_(t,l,i,r){let o=0;if(!(i===0&&r.length===0)){for(;o<t.map.length;){if(t.map[o][0]===l){t.map[o][1]+=i,t.map[o][2].push(...r);return}o+=1}t.map.push([l,i,r])}}function j_(t,l){let i=!1;const r=[];for(;l<t.length;){const o=t[l];if(i){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(t[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(t[l-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(i=!0);l+=1}return r}function A_(){return{flow:{null:{name:"table",tokenize:R_,resolveAll:__}}}}function R_(t,l,i){const r=this;let o=0,s=0,c;return d;function d(_){let F=r.events.length-1;for(;F>-1;){const ne=r.events[F][1].type;if(ne==="lineEnding"||ne==="linePrefix")F--;else break}const q=F>-1?r.events[F][1].type:null,V=q==="tableHead"||q==="tableRow"?B:p;return V===B&&r.parser.lazy[r.now().line]?i(_):V(_)}function p(_){return t.enter("tableHead"),t.enter("tableRow"),m(_)}function m(_){return _===124||(c=!0,s+=1),y(_)}function y(_){return _===null?i(_):Re(_)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),S):i(_):Ye(_)?Ze(t,y,"whitespace")(_):(s+=1,c&&(c=!1,o+=1),_===124?(t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),c=!0,y):(t.enter("data"),g(_)))}function g(_){return _===null||_===124||st(_)?(t.exit("data"),y(_)):(t.consume(_),_===92?b:g)}function b(_){return _===92||_===124?(t.consume(_),g):g(_)}function S(_){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(_):(t.enter("tableDelimiterRow"),c=!1,Ye(_)?Ze(t,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):E(_))}function E(_){return _===45||_===58?R(_):_===124?(c=!0,t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),j):$(_)}function j(_){return Ye(_)?Ze(t,R,"whitespace")(_):R(_)}function R(_){return _===58?(s+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(_),t.exit("tableDelimiterMarker"),C):_===45?(s+=1,C(_)):_===null||Re(_)?ee(_):$(_)}function C(_){return _===45?(t.enter("tableDelimiterFiller"),A(_)):$(_)}function A(_){return _===45?(t.consume(_),A):_===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(_),t.exit("tableDelimiterMarker"),D):(t.exit("tableDelimiterFiller"),D(_))}function D(_){return Ye(_)?Ze(t,ee,"whitespace")(_):ee(_)}function ee(_){return _===124?E(_):_===null||Re(_)?!c||o!==s?$(_):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(_)):$(_)}function $(_){return i(_)}function B(_){return t.enter("tableRow"),z(_)}function z(_){return _===124?(t.enter("tableCellDivider"),t.consume(_),t.exit("tableCellDivider"),z):_===null||Re(_)?(t.exit("tableRow"),l(_)):Ye(_)?Ze(t,z,"whitespace")(_):(t.enter("data"),le(_))}function le(_){return _===null||_===124||st(_)?(t.exit("data"),z(_)):(t.consume(_),_===92?W:le)}function W(_){return _===92||_===124?(t.consume(_),le):le(_)}}function __(t,l){let i=-1,r=!0,o=0,s=[0,0,0,0],c=[0,0,0,0],d=!1,p=0,m,y,g;const b=new C_;for(;++i<t.length;){const S=t[i],E=S[1];S[0]==="enter"?E.type==="tableHead"?(d=!1,p!==0&&(Ev(b,l,p,m,y),y=void 0,p=0),m={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(i,0,[["enter",m,l]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,g=void 0,s=[0,0,0,0],c=[0,i+1,0,0],d&&(d=!1,y={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(i,0,[["enter",y,l]])),o=E.type==="tableDelimiterRow"?2:y?3:1):o&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],g=Co(b,l,s,o,void 0,g),s=[0,0,0,0]),c[2]=i)):E.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(c[0]=c[1],g=Co(b,l,s,o,void 0,g)),s=c,c=[s[1],i,0,0])):E.type==="tableHead"?(d=!0,p=i):E.type==="tableRow"||E.type==="tableDelimiterRow"?(p=i,s[1]!==0?(c[0]=c[1],g=Co(b,l,s,o,i,g)):c[1]!==0&&(g=Co(b,l,c,o,i,g)),o=0):o&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=i)}for(p!==0&&Ev(b,l,p,m,y),b.consume(l.events),i=-1;++i<l.events.length;){const S=l.events[i];S[0]==="enter"&&S[1].type==="table"&&(S[1]._align=j_(l.events,i))}return t}function Co(t,l,i,r,o,s){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",d="tableContent";i[0]!==0&&(s.end=Object.assign({},Ai(l.events,i[0])),t.add(i[0],0,[["exit",s,l]]));const p=Ai(l.events,i[1]);if(s={type:c,start:Object.assign({},p),end:Object.assign({},p)},t.add(i[1],0,[["enter",s,l]]),i[2]!==0){const m=Ai(l.events,i[2]),y=Ai(l.events,i[3]),g={type:d,start:Object.assign({},m),end:Object.assign({},y)};if(t.add(i[2],0,[["enter",g,l]]),r!==2){const b=l.events[i[2]],S=l.events[i[3]];if(b[1].end=Object.assign({},S[1].end),b[1].type="chunkText",b[1].contentType="text",i[3]>i[2]+1){const E=i[2]+1,j=i[3]-i[2]-1;t.add(E,j,[])}}t.add(i[3]+1,0,[["exit",g,l]])}return o!==void 0&&(s.end=Object.assign({},Ai(l.events,o)),t.add(o,0,[["exit",s,l]]),s=void 0),s}function Ev(t,l,i,r,o){const s=[],c=Ai(l.events,i);o&&(o.end=Object.assign({},c),s.push(["exit",o,l])),r.end=Object.assign({},c),s.push(["exit",r,l]),t.add(i+1,0,s)}function Ai(t,l){const i=t[l],r=i[0]==="enter"?"start":"end";return i[1][r]}const N_={name:"tasklistCheck",tokenize:z_};function D_(){return{text:{91:N_}}}function z_(t,l,i){const r=this;return o;function o(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?i(p):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),s)}function s(p){return st(p)?(t.enter("taskListCheckValueUnchecked"),t.consume(p),t.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(t.enter("taskListCheckValueChecked"),t.consume(p),t.exit("taskListCheckValueChecked"),c):i(p)}function c(p){return p===93?(t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),d):i(p)}function d(p){return Re(p)?l(p):Ye(p)?t.check({tokenize:O_},l,i)(p):i(p)}}function O_(t,l,i){return Ze(t,r,"whitespace");function r(o){return o===null?i(o):l(o)}}function M_(t){return Hb([r_(),g_(),k_(t),A_(),D_()])}const L_={};function U_(t){const l=this,i=t||L_,r=l.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(M_(i)),s.push(n_()),c.push(l_(i))}const od=new Set(["<",">","{","}","[","]"]),B_=new Set(["for","do","while","if","else","return","function","var","let","const","true","false","undefined","this","new","delete","typeof","in","instanceof","void","break","continue","switch","case","default","throw","try","catch","finally","debugger","with","yield","async","await","class","extends","super","import","export","from","static"]),R0=new Set(["+","-","*","/","%","=","!","&","|","^","~","!","?",":",".",",",";","'",'"',".","(",")","[","]","#","@","\\",...od]),H_={keywords:B_,onCommentStart:z0,onCommentEnd:$_},rh=["identifier","keyword","string","class","property","entity","jsxliterals","sign","comment","break","space"],[Uf,q_,ra,Y_,Bf,G_,F_,Tl,wv,sd,kv]=rh.map((t,l)=>l);function To(t){return/^[^\S\r\n]+$/g.test(t)}function V_(t){return R0.has(t)}function I_(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function qo(t){return/^[\w_]+$/.test(t)||_0(t)}function X_(t){const l=t[0];return qo(l)&&l===l.toUpperCase()||t==="null"}function _0(t){return/[^\u0000-\u007f]/.test(t)}function N0(t){return/^[a-zA-Z]$/.test(t)}function D0(t){return N0(t)||_0(t)}function jo(t){return D0(t[0])&&(t.length===1||qo(t.slice(1)))}function cd(t){return t==="`"}function fd(t){return t==='"'||t==="'"}function Q_(t){return fd(t)||cd(t)}function z0(t,l){const i=t+l;return i==="/*"?2:i==="//"?1:0}function $_(t,l){return t+l==="*/"?2:l===`
217
+ `?1:0}function K_(t){return t[0]==="/"&&!z0(t[0],t[1])}function Z_(t,l){const{keywords:i,onCommentStart:r,onCommentEnd:o}={...H_,...l};let s="",c=-1,d=[-1,""],p=[-2,""];const m=[];let y=!1,g=0,b=!1,S=0;const E=()=>y&&!b&&!g,j=()=>g&&!E(),R=()=>!g&&E()&&!b&&S>0;let C=null,A=!1,D=0,ee=0;const $=()=>C!==null,B=()=>A,z=()=>ee>D,le=()=>ee>0&&ee===D,W=()=>$()||z();function _(q){const V=q===`
218
+ `;if(j()){if($())return ra;const[,K]=d;if(jo(q)&&(K==="<"||K==="</"))return G_}if(R())return F_;if($()||z())return ra;if(i.has(q))return d[1]==="."?Uf:q_;if(V)return sd;if(To(q))return kv;if(q.split("").every(V_))return Tl;if(X_(q))return j()?Uf:Y_;if(jo(q)){const K=d[1]==="."&&jo(p[1]);if(!W()&&!K)return Uf;if(K)return Bf}return ra}const F=(q,V)=>{if(V&&(s=V),s){c=q||_(s);const ne=[c,s];c!==kv&&c!==sd&&(p=d,d=ne),m.push(ne)}s=""};for(let q=0;q<t.length;q++){const V=t[q],ne=t[q-1],K=t[q+1],H=ne+V,te=V+K;if(fd(V)&&!R()&&!z()){F(),ne!=="\\"&&(C&&V===C?C=null:C||(C=V)),F(ra,V);continue}if(!z()&&ne!=="\\n"&&cd(V)){F(),F(ra,V),ee++;continue}if(z()){if(ne!=="\\n"&&cd(V)&&ee>0){F(),ee--,F(ra,V);continue}if(te==="${"){D++,F(ra),F(Tl,te),q++;continue}}if(le()&&V==="}"){F(),D--,F(Tl,V);continue}if(E()&&V==="{"){F(),F(Tl,V),b=!0;continue}if(y){if(!g&&V==="<"){F(),K==="/"?(g=2,s=te,q++):(g=1,s=V),F(Tl);continue}if(g){if(V===">"&&!"/=".includes(ne)){F(),g===1?(g=0,S++):(g=0,y=!1),F(Tl,V);continue}if(te==="/>"||te==="</"){s!=="<"&&s!=="/"&&F(),te==="/>"?g=0:S--,S||(y=!1),s=te,q++,F(Tl);continue}if(V==="<"){F(),s=V,F(Tl);continue}if(K==="-"&&!W()&&!R()&&s){F(Bf,s+V+K),q++;continue}if(K==="="&&!W()&&!To(V)){To(s)&&F();const P=s+V;if(jo(P)){F(Bf,P);continue}}}}!g&&(V==="<"&&D0(K)||te==="</")&&(g=K==="/"?2:1,V==="<"&&(K==="/"||N0(K))&&!W()&&!R()&&!B()&&(y=!0));const ue=Q_(V),pe=z(),N=!y&&K_(te),L=R();if(ue||pe||fd(C))s+=V;else if(N){F();const[P,T]=d;if(N&&P!==-1&&!(P===Tl&&T!==")"||P===wv)){s=V,F();continue}A=!0;const ce=q++,be=()=>q>=t.length,xe=()=>be()||t[q]===`
219
+ `;let ze=!1;for(;!xe();q++)if(t[q]==="/"&&t[q-1]!=="\\"){for(ze=!0;ce!==q&&/^[a-z]$/.test(t[q+1])&&!xe();)q++;break}A=!1,ce!==q&&ze?(s=t.slice(ce,q+1),F(ra)):(s=V,F(),q=ce)}else if(r(V,K)){F();const P=q,T=r(V,K);if(T)for(;q<t.length&&o(t[q-1],t[q])!=T;q++);s=t.slice(P,q+1),F(wv)}else V===" "||V===`
220
+ `?V===" "&&(To(s)||!s||L)?(s+=V,K==="<"&&F()):(F(),s=V,F()):b&&V==="}"?(F(),s=V,F(),b=!1):L&&!od.has(V)||z()||(qo(V)===qo(s[s.length-1])||E())&&!R0.has(V)?s+=V:(H==="</"&&(s=H),F(),H!=="</"&&(s=V),te==="</"||te==="/>"?(s=te,F(),q++):od.has(V)&&F())}return F(),m}function P_(t){const l=[],i=c=>({type:"element",tagName:"span",children:c,properties:{className:"sh__line"}});function r(c){const d=c.map(([p,m])=>{const y=rh[p];return{type:"element",tagName:"span",children:[{type:"text",value:m}],properties:{className:`sh__token--${y}`,style:{color:`var(--sh-${y})`}}}});l.push(i(d))}const o=[];let s=!1;for(let c=0;c<t.length;c++){const d=t[c],[p,m]=d,y=c===t.length-1;if(p!==sd){if(m.includes(`
221
+ `)){const g=m.split(`
222
+ `);for(let b=0;b<g.length;b++)o.push([p,g[b]]),b<g.length-1&&(r(o),o.length=0)}else o.push(d);s=!1}else s?r([]):(r(o),o.length=0),y&&r([]),s=!0}return o.length&&r(o),l}const J_=t=>{let l=`class="${t.className}"`;if(t.style){const i=Object.entries(t.style).map(([r,o])=>`${r}:${o}`).join(";");l+=` style="${i}"`}return l};function W_(t){return t.map(l=>{const{tagName:i}=l,r=l.children.map(o=>{const{tagName:s,children:c,properties:d}=o;return`<${s} ${J_(d)}>${I_(c[0].value)}</${s}>`}).join("");return`<${i} class="${l.properties.className}">${r}</${i}>`}).join(`
223
+ `)}function O0(t,l){const i=Z_(t,l),r=P_(i);return W_(r)}new Map(rh.map((t,l)=>[t,l]));function eN({className:t,children:l}){const i=String(l).replace(/\n$/,"");if(!t)return v.jsx("code",{children:l});const o=O0(i);return v.jsx("code",{dangerouslySetInnerHTML:{__html:o}})}function dd({children:t,inline:l}){return v.jsx("div",{className:l?"markdown-inline":"markdown",children:v.jsx(kA,{remarkPlugins:[U_],components:{code:eN},children:t})})}const tN={plan:"[plan]",approve:"[approve]",task:"[task]",build:"[build]",fix:"[fix]",done:"[done]",error:"[error]",verbose:"[verbose]"};function fa({value:t}){return t?v.jsx("span",{className:"duration",children:t}):null}function nN({entry:t,duration:l}){return v.jsxs("div",{className:"console-entry",children:[v.jsx("span",{className:`prefix ${t.level}`,children:tN[t.level]}),v.jsx("span",{children:t.message}),v.jsx(fa,{value:l})]})}function lN({entry:t}){const l=t.sender??"you";return v.jsxs("div",{className:"console-entry user-message",children:[v.jsxs("span",{className:"prefix",style:{color:"var(--orange)"},children:["[",l,"]"]}),v.jsx("span",{children:t.message})]})}const aN=300;function iN({entry:t,duration:l}){const i=t.agent||"agent";return t.text.length<=aN?v.jsxs("div",{className:"console-entry",children:[v.jsxs("span",{className:"prefix task",children:["[",i,"]"]}),v.jsx("span",{children:v.jsx(dd,{inline:!0,children:t.text})}),v.jsx(fa,{value:l})]}):v.jsxs("details",{className:"tool-inline",children:[v.jsxs("summary",{children:[v.jsx("span",{className:"tool-inline-name",children:i}),v.jsxs("span",{className:"tool-inline-summary",children:[t.text.slice(0,120),"..."]}),v.jsx(fa,{value:l})]}),v.jsx("div",{className:"tool-inline-body",children:v.jsx(dd,{children:t.text})})]})}function rN(t){const{tool_name:l,tool_input:i}=t;if(l==="Glob"){const r=i.pattern||"*",o=i.path;return o?`${r} in ${o}`:r}if(l==="Grep"){const o=[i.pattern||""];return i.path&&o.push(`in ${i.path}`),i.glob&&o.push(`(${i.glob})`),o.join(" ")}if(l==="Read"){const o=[i.file_path||"unknown file"];return i.offset&&o.push(`offset:${i.offset}`),i.limit&&o.push(`limit:${i.limit}`),o.join(" ")}return l==="Write"||l==="Edit"?i.file_path||"unknown file":l==="Bash"?(i.command||"").slice(0,80):l.includes("playbook")?i.name||"read":l.includes("build")?"pnpm build + check":l}function uN(t){return Object.entries(t).map(([i,r])=>{const o=typeof r=="string"?r:JSON.stringify(r,null,2);return o.length>500?`${i}: ${o.slice(0,500)}... (${o.length} chars)`:`${i}: ${o}`}).join(`
224
+ `)}function Hf({text:t,maxLen:l}){const i=t.length>l,r=i?t.slice(0,l):t,o=O0(r)+(i?`
225
+ ... (truncated)`:"");return v.jsx("pre",{dangerouslySetInnerHTML:{__html:o}})}function oN(t){return t.tool_name!=="Write"?!1:(t.tool_input.file_path||"").endsWith(".md")}function hd({entry:t,duration:l}){const i=t.tool_response===null,r=t.tool_name==="Bash"||t.tool_name==="bash",o=r&&t.tool_input.command||"";if(r)return v.jsxs("details",{className:"tool-inline",children:[v.jsxs("summary",{children:[t.agent&&v.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),v.jsx("span",{className:"tool-inline-name",children:"$"}),v.jsx("span",{className:"tool-inline-command",children:o}),i?v.jsx("span",{className:"spinner-inline"}):v.jsx(fa,{value:l})]}),v.jsx("div",{className:"tool-inline-body",children:t.tool_response!==null&&v.jsx(Hf,{text:t.tool_response,maxLen:5e3})})]});if(oN(t)){const s=t.tool_input.content||"",c=t.tool_input.file_path||"unknown file";return v.jsxs("details",{className:"tool-inline",open:!0,children:[v.jsxs("summary",{children:[t.agent&&v.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),v.jsx("span",{className:"tool-inline-name",children:t.tool_name}),v.jsx("span",{className:"tool-inline-summary",children:c}),i?v.jsx("span",{className:"spinner-inline"}):v.jsx(fa,{value:l})]}),v.jsx("div",{className:"tool-inline-body",children:v.jsx(dd,{children:s})})]})}return v.jsxs("details",{className:"tool-inline",children:[v.jsxs("summary",{children:[t.agent&&v.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),v.jsx("span",{className:"tool-inline-name",children:t.tool_name}),v.jsx("span",{className:"tool-inline-summary",children:rN(t)}),i?v.jsx("span",{className:"spinner-inline"}):v.jsx(fa,{value:l})]}),v.jsxs("div",{className:"tool-inline-body",children:[v.jsx("div",{className:"section-label",children:"Input"}),v.jsx(Hf,{text:uN(t.tool_input),maxLen:5e3}),t.tool_response!==null&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"section-label",children:"Output"}),v.jsx(Hf,{text:t.tool_response,maxLen:5e3})]})]})]})}function sN(t){let l=0,i=!1;for(const{duration:c}of t)if(c)if(i=!0,c.endsWith("ms"))l+=Number.parseInt(c,10);else if(c.includes("m ")){const[d,p]=c.split("m ");l+=Number.parseInt(d,10)*6e4+Number.parseFloat(p)*1e3}else c.endsWith("s")&&(l+=Number.parseFloat(c)*1e3);if(!i)return null;if(l<1e3)return`${l}ms`;const r=l/1e3;if(r<60)return`${r.toFixed(0)}s`;const o=Math.floor(r/60),s=r%60;return`${o}m ${s.toFixed(0)}s`}function cN(t){const l=t.filter(r=>r.entry.kind==="tool_use").length;return t.filter(r=>r.entry.kind==="tool_use").every(r=>r.entry.tool_response!==null)?`${l} action${l!==1?"s":""}`:`${l} action${l!==1?"s":""}...`}function fN({items:t}){const[l,i]=k.useState(!1),r=t.filter(d=>d.entry.kind==="tool_use"),o=r.every(d=>d.entry.tool_response!==null),s=r.length>0?r[r.length-1]:t[t.length-1],c=sN(t);return v.jsxs("div",{className:"tool-group",children:[v.jsxs("div",{className:"tool-group-header",onClick:()=>i(d=>!d),children:[!o&&v.jsx("span",{className:"spinner-inline"}),v.jsx("span",{className:"tool-group-label",children:cN(t)}),v.jsx("span",{className:"tool-group-chevron",children:l?"▼":"▶"}),o&&v.jsx(fa,{value:c})]}),l&&v.jsx("div",{className:"tool-group-items",children:t.map(({entry:d,index:p,duration:m})=>d.kind==="tool_use"?v.jsx(hd,{entry:d,duration:m},d.tool_use_id||`gi-${p}`):null)}),!l&&s&&v.jsx("div",{className:"tool-group-tail",children:s.entry.kind==="tool_use"?v.jsx(hd,{entry:s.entry,duration:s.duration}):null})]})}function dN({sessionId:t,event:l,onResolved:i,resolved:r,resolvedDetails:o}){const s=l.runtime==="docker",[c,d]=k.useState(s?"local":"claim"),[p,m]=k.useState(""),[y,g]=k.useState("https://api.electric-sql.cloud"),[b,S]=k.useState(""),[E,j]=k.useState(""),[R,C]=k.useState(""),[A,D]=k.useState(""),[ee,$]=k.useState(!1),[B,z]=k.useState(!1),[le,W]=k.useState(!1),[_,F]=k.useState(null),q=l.ghAccounts.length>0,[V,ne]=k.useState(l.ghAccounts[0]?.login??""),[K,H]=k.useState(l.projectName),[te,ue]=k.useState("private"),[pe,N]=k.useState(!1);async function L(){z(!0),F(null);try{const ge=await Qw();m(ge.databaseUrl),g(ge.electricUrl),S(ge.sourceId),j(ge.secret),C(ge.claimId),D(ge.claimUrl),W(!0)}catch(ge){F(ge instanceof Error?ge.message:"Provisioning failed")}finally{z(!1)}}async function P(){$(!0);const ge=[];try{const _e={};c==="claim"?(_e.mode="claim",_e.databaseUrl=p,_e.electricUrl=y,_e.sourceId=b,_e.secret=E,_e.claimId=R,ge.push(`Database: ${p}`),ge.push(`Source ID: ${b}`),A&&ge.push(`Claim: ${A}`)):c==="cloud"?(_e.mode="cloud",_e.databaseUrl=p,_e.electricUrl=y,_e.sourceId=b,_e.secret=E,ge.push(`Database: ${p}`),ge.push(`Source ID: ${b}`)):(_e.mode="local",ge.push("Local Docker")),pe&&V&&K.trim()&&(_e.repoAccount=V,_e.repoName=K,_e.repoVisibility=te,ge.push(`${V}/${K} (${te})`)),_e._summary=ge.join(`
226
+ `),await $f(t,"infra_config",_e),i(ge.join(`
227
+ `))}catch{$(!1)}}const T=ee||!!r,ce=p.trim()&&b.trim()&&E.trim(),be=le&&p.trim()&&b.trim()&&E.trim(),xe=!pe||V&&K.trim(),ze={claim:"Provisioned (Cloud)",local:"Local (Docker)",cloud:"Electric Cloud (BYO)"};if(r){const ge=o??{};return o||(ge.Infrastructure=ze[c],(c==="cloud"||c==="claim")&&(p&&(ge["Connection string"]=p),b&&(ge["Source ID"]=b)),c==="claim"&&A&&(ge["Claim link"]=A),pe&&V&&K.trim()&&(ge.Repository=`${V}/${K}`,ge.Visibility=te)),v.jsx("div",{className:"gate-prompt",children:v.jsx("div",{className:"gate-config-summary",children:Object.entries(ge).map(([_e,Nt])=>v.jsxs("div",{children:[v.jsxs("strong",{children:[_e,":"]})," ",Nt.startsWith("http")?v.jsx("a",{href:Nt,target:"_blank",rel:"noopener noreferrer",children:Nt}):Nt]},_e))})})}return v.jsxs("div",{className:"gate-prompt",children:[v.jsxs("h3",{children:["Setup ",l.projectName]}),v.jsx("p",{className:"gate-summary",children:"Infrastructure"}),v.jsxs("div",{className:"gate-option-group",children:[v.jsxs("button",{type:"button",className:`gate-option ${c==="claim"?"active":""}`,onClick:()=>d("claim"),disabled:ee,children:[v.jsx("span",{className:"gate-option-title",children:"Provision"}),v.jsx("span",{className:"gate-option-desc",children:"Auto-provision database & Electric Cloud (72h)"})]}),s&&v.jsxs("button",{type:"button",className:`gate-option ${c==="local"?"active":""}`,onClick:()=>d("local"),disabled:ee,children:[v.jsx("span",{className:"gate-option-title",children:"Local"}),v.jsx("span",{className:"gate-option-desc",children:"Run with Docker Compose on your machine"})]}),v.jsxs("button",{type:"button",className:`gate-option ${c==="cloud"?"active":""}`,onClick:()=>d("cloud"),disabled:ee,children:[v.jsx("span",{className:"gate-option-title",children:"Bring your own"}),v.jsx("span",{className:"gate-option-desc",children:"Provide your own database & Electric details"})]})]}),c==="claim"&&v.jsx("div",{className:"question",children:le?v.jsxs("div",{style:{fontSize:"0.85em"},children:[v.jsx("p",{style:{color:"var(--color-done, #4c4)",margin:"0 0 6px"},children:"Resources provisioned successfully (72h TTL)."}),v.jsxs("div",{style:{background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,padding:"8px 10px",margin:"6px 0",fontFamily:"monospace",fontSize:"0.9em",lineHeight:1.6,wordBreak:"break-all"},children:[v.jsxs("div",{children:[v.jsx("strong",{children:"Database URL:"})," ",p]}),v.jsxs("div",{children:[v.jsx("strong",{children:"Source ID:"})," ",b]}),v.jsxs("div",{children:[v.jsx("strong",{children:"Electric URL:"})," ",y]})]}),A&&v.jsxs("p",{style:{margin:"8px 0 0"},children:["Claim into your account:"," ",v.jsx("a",{href:A,target:"_blank",rel:"noopener noreferrer",style:{wordBreak:"break-all"},children:A})]})]}):v.jsxs(v.Fragment,{children:[v.jsx("p",{style:{fontSize:"0.85em",opacity:.7,margin:"0 0 8px"},children:"Automatically provision a Neon Postgres database and Electric Cloud source. Resources are available for 72 hours."}),v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:L,disabled:B||T,style:{marginBottom:8},children:B?"Provisioning...":"Provision Resources"}),B&&v.jsx("p",{style:{fontSize:"0.85em",opacity:.7},children:"This may take 30-60 seconds..."}),_&&v.jsx("p",{style:{color:"var(--color-error, #e55)",fontSize:"0.85em"},children:_})]})}),c==="cloud"&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Database URL"}),v.jsx("input",{type:"text",value:p,onChange:ge=>m(ge.target.value),disabled:T,placeholder:"postgresql://user:pass@host:5432/dbname"})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Electric URL"}),v.jsx("input",{type:"text",value:y,onChange:ge=>g(ge.target.value),disabled:T,placeholder:"https://api.electric-sql.cloud"})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Source ID"}),v.jsx("input",{type:"text",value:b,onChange:ge=>S(ge.target.value),disabled:T,placeholder:"Your Electric Cloud source ID"})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Secret"}),v.jsx("input",{type:"password",value:E,onChange:ge=>j(ge.target.value),disabled:T,placeholder:"Your Electric Cloud secret"})]})]}),q&&v.jsxs(v.Fragment,{children:[v.jsx("p",{className:"gate-summary",style:{marginTop:16},children:"GitHub Repository"}),v.jsx("div",{className:"gate-option-group",children:v.jsx("button",{type:"button",className:`gate-option ${pe?"active":""}`,onClick:()=>N(!pe),disabled:T,children:v.jsx("span",{className:"gate-option-title",children:"Create a GitHub repo for this project"})})}),pe&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Account"}),l.ghAccounts.length>1?v.jsx("select",{value:V,onChange:ge=>ne(ge.target.value),disabled:T,children:l.ghAccounts.map(ge=>v.jsxs("option",{value:ge.login,children:[ge.login," ",ge.type==="org"?"(org)":"(personal)"]},ge.login))}):v.jsx("input",{type:"text",value:l.ghAccounts[0].login,disabled:!0})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Repository name"}),v.jsx("input",{type:"text",value:K,onChange:ge=>H(ge.target.value),disabled:T,placeholder:"my-app"})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Visibility"}),v.jsxs("div",{className:"gate-option-group",children:[v.jsx("button",{type:"button",className:`gate-option ${te==="private"?"active":""}`,onClick:()=>ue("private"),disabled:T,children:v.jsx("span",{className:"gate-option-title",children:"Private"})}),v.jsx("button",{type:"button",className:`gate-option ${te==="public"?"active":""}`,onClick:()=>ue("public"),disabled:T,children:v.jsx("span",{className:"gate-option-title",children:"Public"})})]})]})]})]}),v.jsx("div",{className:"gate-actions",children:v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:P,disabled:T||c==="cloud"&&!ce||c==="claim"&&!be||!xe,children:ee?"Configuring...":"Start"})})]})}function hN({sessionId:t,event:l,onResolved:i,resolved:r,resolvedSummary:o}){const s=l.questions?.length?l.questions:[{question:l.question,options:l.options}],c=s.length>1,d=s.some(W=>W.multiSelect),p=c||d,[m,y]=k.useState({}),[g,b]=k.useState({}),[S,E]=k.useState({}),[j,R]=k.useState({}),[C,A]=k.useState(!1),D=C||!!r;function ee(){const W={};for(const _ of s)if(_.multiSelect){const F=g[_.question],q=j[_.question]?.trim(),V=F?[...F]:[];q&&V.push(q),W[_.question]=V.join(", ")}else W[_.question]=m[_.question]||j[_.question]?.trim()||"";return W}function $(W){const _=Object.entries(W).filter(([,F])=>F);return _.length===1?_[0][1].slice(0,80):_.map(([,F])=>F.slice(0,40)).join("; ").slice(0,120)}async function B(W,_){y(q=>({...q,[W]:_})),A(!0);const F={[W]:_};try{await $f(t,"ask_user_question",{toolUseId:l.tool_use_id,answers:F,_summary:_}),i(_)}catch{y(q=>({...q,[W]:""})),A(!1)}}async function z(){const W=ee(),_=$(W);A(!0);try{await $f(t,"ask_user_question",{toolUseId:l.tool_use_id,answers:W,_summary:_}),i(_)}catch{A(!1)}}function le(W,_){b(F=>{const q=new Set(F[W]??[]);return q.has(_)?q.delete(_):q.add(_),{...F,[W]:q}})}if(r){const W=o||"";return v.jsxs("div",{className:"gate-prompt",children:[v.jsx("h3",{children:"Question"}),s.map(_=>v.jsxs("div",{className:"gate-question-section",children:[_.header&&v.jsx("span",{className:"gate-question-header",children:_.header}),v.jsx("p",{className:"gate-summary",children:_.question})]},_.question)),v.jsx("div",{className:"gate-answer-summary",children:W})]})}return v.jsxs("div",{className:"gate-prompt",children:[v.jsx("h3",{children:"Question"}),s.map(W=>{const _=W.options&&W.options.length>0,F=S[W.question];return v.jsxs("div",{className:"gate-question-section",children:[W.header&&v.jsx("span",{className:"gate-question-header",children:W.header}),v.jsx("p",{className:"gate-summary",children:W.question}),_&&W.multiSelect&&v.jsxs("div",{className:"gate-option-group-vert",children:[W.options?.map(q=>{const V=g[W.question]?.has(q.label)??!1;return v.jsxs("button",{type:"button",className:`gate-option gate-option-checkbox ${V?"checked":""}`,onClick:()=>le(W.question,q.label),disabled:D,children:[v.jsx("span",{className:"gate-checkbox-indicator",children:V?"☑":"☐"}),v.jsx("span",{className:"gate-option-title",children:q.label}),q.description&&v.jsx("span",{className:"gate-option-desc",children:q.description})]},q.label)}),!F&&v.jsx("button",{type:"button",className:"gate-option gate-option-other",onClick:()=>E(q=>({...q,[W.question]:!0})),disabled:D,children:v.jsx("span",{className:"gate-option-title",children:"Other..."})}),F&&v.jsx("div",{className:"question",children:v.jsx("input",{type:"text",value:j[W.question]||"",onChange:q=>R(V=>({...V,[W.question]:q.target.value})),disabled:D,placeholder:"Type your answer..."})})]}),_&&!W.multiSelect&&v.jsxs("div",{className:"gate-option-group-vert",children:[W.options?.map(q=>{const V=m[W.question]===q.label;return v.jsxs("button",{type:"button",className:`gate-option ${V?"selected":""}`,onClick:()=>p?y(ne=>({...ne,[W.question]:q.label})):B(W.question,q.label),disabled:D,children:[v.jsx("span",{className:"gate-option-title",children:q.label}),q.description&&v.jsx("span",{className:"gate-option-desc",children:q.description})]},q.label)}),!F&&v.jsx("button",{type:"button",className:"gate-option gate-option-other",onClick:()=>E(q=>({...q,[W.question]:!0})),disabled:D,children:v.jsx("span",{className:"gate-option-title",children:"Other..."})}),F&&v.jsx("div",{className:"question",children:v.jsx("input",{type:"text",value:j[W.question]||"",onChange:q=>{const V=q.target.value;R(ne=>({...ne,[W.question]:V})),y(ne=>({...ne,[W.question]:""}))},disabled:D,placeholder:"Type your answer..."})})]}),!_&&v.jsx("div",{className:"question",children:v.jsx("textarea",{value:j[W.question]||"",onChange:q=>R(V=>({...V,[W.question]:q.target.value})),disabled:D,rows:3,placeholder:"Type your answer..."})})]},W.question)}),p&&v.jsx("div",{className:"gate-actions",children:v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:z,disabled:D,children:C?"Submitting...":"Submit"})}),!p&&!s[0]?.options?.length&&v.jsx("div",{className:"gate-actions",children:v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:z,disabled:D||!j[s[0]?.question]?.trim(),children:C?"Submitting...":"Submit"})}),!p&&s[0]?.options?.length&&S[s[0]?.question]&&v.jsx("div",{className:"gate-actions",children:v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:z,disabled:D||!j[s[0]?.question]?.trim(),children:C?"Submitting...":"Submit"})})]})}function mN(t){switch(t){case"infra_config_prompt":return"Project configured";case"ask_user_question":return"Question answered";default:return"Decision made"}}function pN({sessionId:t,entry:l,entryIndex:i,onResolved:r,duration:o}){const s=m=>r(i,m),{resolved:c,resolvedSummary:d}=l;let p=null;switch(l.event.type){case"infra_config_prompt":p=v.jsx(dN,{sessionId:t,event:l.event,onResolved:s,resolved:c,resolvedDetails:l.resolvedDetails});break;case"ask_user_question":p=v.jsx(hN,{sessionId:t,event:l.event,onResolved:s,resolved:c,resolvedSummary:d});break;default:return null}return c?v.jsxs("div",{className:"gate-answered",children:[v.jsxs("div",{className:"gate-answered-header",children:[v.jsx("span",{className:"prefix done",children:"[gate]"}),v.jsx("span",{className:"gate-resolved-label",children:mN(l.event.type)}),v.jsx(fa,{value:o})]}),p]}):p}const Cv={pending:"○",in_progress:"◉",completed:"✓"};function gN(t){switch(t){case"completed":return"todo-status-done";case"in_progress":return"todo-status-progress";default:return"todo-status-pending"}}function yN({entry:t}){const{todos:l}=t,i=l.filter(c=>c.status==="completed").length,r=l.filter(c=>c.status==="in_progress").length,o=l.length,s=[];return i>0&&s.push(`${i}/${o} done`),r>0&&s.push(`${r} in progress`),s.length===0&&s.push(`${o} pending`),v.jsxs("details",{className:"tool-inline",open:!0,children:[v.jsxs("summary",{children:[v.jsx("span",{className:"tool-inline-name",children:"TodoWrite"}),v.jsx("span",{className:"tool-inline-summary",children:s.join(", ")})]}),v.jsx("div",{className:"tool-inline-body",children:v.jsx("ul",{className:"todo-list",children:l.map(c=>v.jsxs("li",{className:"todo-item",children:[v.jsx("span",{className:`todo-status-icon ${gN(c.status)}`,children:Cv[c.status]||Cv.pending}),v.jsx("span",{className:"todo-content",children:c.content}),c.priority&&v.jsx("span",{className:"todo-priority",children:c.priority})]},c.id))})})]})}const vN=3;function Tv(t){return t.kind==="tool_use"}function bN(t,l){const i=[];let r=0;for(;r<t.length;){const o=t[r];if(Tv(o)){const s=[];for(;r<t.length&&Tv(t[r]);)s.push({entry:t[r],index:r,duration:l[r]}),r++;if(s.length>=vN)i.push({type:"group",items:s});else for(const c of s)i.push({type:"single",...c});continue}i.push({type:"single",entry:o,index:r,duration:l[r]}),r++}return i}function xN(t){if(t.kind!=="user_prompt")return t.ts}function M0(t){if(t<1e3)return`${t}ms`;const l=t/1e3;if(l<60)return`${l.toFixed(0)}s`;const i=Math.floor(l/60),r=l%60;return`${i}m ${r.toFixed(0)}s`}function SN({sinceTs:t}){const[l,i]=k.useState("");return k.useEffect(()=>{const r=new Date(t).getTime(),o=()=>{const c=Date.now()-r;i(M0(Math.max(0,c)))};o();const s=setInterval(o,1e3);return()=>clearInterval(s)},[t]),v.jsxs("div",{className:"console-entry waiting-indicator",children:[v.jsx("span",{className:"spinner-inline"}),v.jsx("span",{className:"waiting-label",children:"Waiting for response..."}),v.jsx("span",{className:"duration",children:l})]})}function EN({sessionId:t,entries:l,isLive:i,isComplete:r,onGateResolved:o}){const s=k.useRef(null),c=k.useRef(null),[d,p]=k.useState(!0),m=l.length,y=k.useCallback(()=>{c.current?.scrollIntoView({behavior:"smooth"})},[]),g=k.useCallback(()=>{const C=s.current;if(!C)return;const D=C.scrollHeight-C.scrollTop-C.clientHeight<80;p(D)},[]);k.useEffect(()=>{d&&c.current?.scrollIntoView({behavior:"smooth"})},[m,d]);const b=[];let S=null;for(const C of l){const A=xN(C);if(C.kind==="user_prompt"||!A)b.push(null);else if(S){const D=new Date(A).getTime()-new Date(S).getTime();b.push(D>=0?M0(D):null)}else b.push(null);A&&(S=A)}const E=k.useMemo(()=>bN(l,b),[l,b]);let j=!1,R="";if(i&&!r&&l.length>0){const C=l[l.length-1],A=C.kind==="tool_use"&&C.tool_response===null,D=C.kind==="gate"&&!C.resolved,ee=C.kind==="assistant_message";!A&&!D&&!ee&&(j=!0,R=S||new Date().toISOString())}return v.jsxs("div",{className:"console",ref:s,onScroll:g,children:[E.map(C=>{if(C.type==="group")return v.jsx(fN,{items:C.items},`group-${C.items[0].index}`);const{entry:A,index:D,duration:ee}=C;switch(A.kind){case"log":return v.jsx(nN,{entry:A,duration:ee},`log-${D}`);case"user_prompt":return v.jsx(lN,{entry:A},`user-${D}`);case"tool_use":return v.jsx(hd,{entry:A,duration:ee},A.tool_use_id||`tool-${D}`);case"assistant_message":return v.jsx(iN,{entry:A,duration:ee},`text-${D}`);case"todo_widget":return v.jsx(yN,{entry:A},`todo-${D}`);case"gate":return v.jsx(pN,{sessionId:t,entry:A,entryIndex:D,onResolved:o,duration:ee},`gate-${D}`);default:return null}}),j&&v.jsx(SN,{sinceTs:R}),v.jsx("div",{ref:c}),!d&&v.jsx("button",{type:"button",className:"jump-to-bottom",onClick:y,children:"Jump to latest"})]})}function qf({variant:t="line",width:l}){const i=t==="block"?"skeleton skeleton-block":"skeleton skeleton-line";return v.jsx("div",{className:i,style:l?{width:l}:void 0})}function wN(t){const[l,i]=k.useState([]),[r,o]=k.useState(!1),[s,c]=k.useState(!1),[d,p]=k.useState(null),[m,y]=k.useState({totalCostUsd:0,totalTurns:0,totalDurationMs:0}),g=k.useRef("-1"),b=k.useCallback(E=>{i(j=>{switch(E.type){case"log":return[...j,{kind:"log",level:E.level,message:E.message,ts:E.ts}];case"user_prompt":return[...j,{kind:"user_prompt",message:E.message,sender:E.sender}];case"pre_tool_use":return[...j,{kind:"tool_use",tool_name:E.tool_name,tool_use_id:E.tool_use_id,tool_input:E.tool_input,tool_response:null,agent:E.agent,ts:E.ts}];case"post_tool_use":{const R=[...j];for(let C=R.length-1;C>=0;C--){const A=R[C];if(A.kind==="tool_use"&&A.tool_use_id===E.tool_use_id){R[C]={...A,tool_response:E.tool_response,agent:A.agent||E.agent};break}}return R}case"post_tool_use_failure":{const R=[...j];for(let C=R.length-1;C>=0;C--){const A=R[C];if(A.kind==="tool_use"&&A.tool_use_id===E.tool_use_id){R[C]={...A,tool_response:`Error: ${E.error}`,agent:A.agent||E.agent};break}}return R}case"assistant_message":return[...j,{kind:"assistant_message",text:E.text,agent:E.agent,ts:E.ts}];case"todo_write":{const R=j.findIndex(A=>A.kind==="todo_widget"),C={kind:"todo_widget",tool_use_id:E.tool_use_id,todos:E.todos,ts:E.ts};if(R>=0){const A=[...j];return A[R]=C,A}return[...j,C]}case"ask_user_question":case"infra_config_prompt":return[...j,{kind:"gate",event:E,resolved:!1,ts:E.ts}];case"gate_resolved":{const R=[...j];let C=!1;for(let A=R.length-1;A>=0;A--){const D=R[A];if(D.kind==="gate"&&!D.resolved){R[A]={...D,resolved:!0,resolvedSummary:E.summary||D.resolvedSummary,resolvedDetails:E.details},C=!0;break}}if(!C&&E.details)for(let A=R.length-1;A>=0;A--){const D=R[A];if(D.kind==="gate"&&D.resolved&&!D.resolvedDetails){R[A]={...D,resolvedDetails:E.details};break}}return R}case"session_end":case"session_start":case"app_status":return j;default:return j}}),E.type==="app_status"&&p({status:E.status,port:E.port,previewUrl:E.previewUrl}),E.type==="session_end"&&(c(!0),(E.cost_usd!=null||E.num_turns!=null||E.duration_ms!=null)&&y(j=>({totalCostUsd:j.totalCostUsd+(E.cost_usd??0),totalTurns:j.totalTurns+(E.num_turns??0),totalDurationMs:j.totalDurationMs+(E.duration_ms??0)})))},[]);k.useEffect(()=>{if(!t)return;i([]),o(!1),c(!1),p(null),y({totalCostUsd:0,totalTurns:0,totalDurationMs:0}),g.current="-1";let E=!1,j=null,R=0;const C=10;function A(){if(E)return;if(R>=C){console.warn(`[sse] Giving up on session ${t} after ${C} retries`),o(!1);return}const D=Bd(t),ee=new URLSearchParams;D&&ee.set("token",D),g.current!=="-1"&&ee.set("offset",g.current);const $=ee.toString(),B=`/api/sessions/${t}/events${$?`?${$}`:""}`;j=new EventSource(B),j.onopen=()=>{E||(R=0,o(!0))},j.onmessage=z=>{if(!E){z.lastEventId&&(g.current=z.lastEventId);try{const le=JSON.parse(z.data);b(le)}catch{}}},j.onerror=()=>{if(E)return;j?.close(),R++;const z=Math.min(1e3*2**(R-1),3e4);setTimeout(A,z)}}return A(),()=>{E=!0,j&&(j.close(),j=null)}},[t,b]);const S=k.useCallback((E,j)=>{i(R=>{const C=[...R],A=C[E];return A?.kind==="gate"&&(C[E]={...A,resolved:!0,resolvedSummary:j}),C})},[]);return{entries:l,isLive:r,isComplete:s,appStatus:d,cost:m,markGateResolved:S}}function kN(t){const l=[];for(const i of t)switch(i.kind){case"user_prompt":l.push(`## User
228
+
229
+ ${i.message}
230
+ `);break;case"assistant_message":l.push(`## Assistant
231
+
232
+ ${i.text}
233
+ `);break;case"log":l.push(`[${i.level}] ${i.message}`);break;case"tool_use":{l.push(`### Tool: ${i.tool_name}`),l.push("**Input:**"),l.push("```json"),l.push(JSON.stringify(i.tool_input,null,2)),l.push("```"),i.tool_response!=null&&(l.push("**Output:**"),l.push("```"),l.push(i.tool_response),l.push("```")),l.push("");break}}return l.join(`
234
+ `)}function CN(){const{id:t}=eb(),l=Qn(),i=Rl(),{openMobileDrawer:r}=kd(),{showSettings:o,setShowSettings:s,authSource:c,hasGhToken:d,refreshSettings:p,refreshSessions:m}=Wr(),[y,g]=k.useState(!1);k.useEffect(()=>{if(!y)return;const ue=()=>g(!1);return document.addEventListener("click",ue),()=>document.removeEventListener("click",ue)},[y]);const[b,S]=k.useState(t==="new"),[E,j]=k.useState(t==="new"?null:t??null),R=k.useRef(!1);k.useEffect(()=>{t&&t!=="new"&&(j(t),S(!1),R.current=!1)},[t]),k.useEffect(()=>{if(t!=="new"||R.current)return;const ue=l.state;if(!ue?.description){i("/",{replace:!0});return}R.current=!0,S(!0),Fw(ue.description,void 0,ue.freeform).then(({sessionId:pe,session:N})=>{Md(N),m(),j(pe),S(!1),i(`/session/${pe}`,{replace:!0})}).catch(pe=>{console.error("Failed to create session:",pe),i("/",{replace:!0})})},[t,l.state,i,m]);const C=E,{entries:A,isLive:D,isComplete:ee,appStatus:$,cost:B,markGateResolved:z}=wN(C),[le,W]=k.useState(()=>C?_y(C)??null:null);k.useEffect(()=>{if(C){const ue=_y(C);W(ue??null)}},[C]),k.useEffect(()=>{C&&ee&&(Qf(C,{status:"complete"}),m())},[C,ee,m]);const _=$?.port,F=$?.previewUrl,[q,V]=k.useState(null),ne=k.useCallback(async ue=>{if(C){V(null);try{await Vw(C,ue)}catch(pe){const N=pe instanceof Error?pe.message:"Failed to send message";V(N)}}},[C]),K=k.useCallback(async()=>{if(C)try{await Iw(C),Qf(C,{status:"complete"}),W(ue=>ue?{...ue,status:"complete"}:null),m()}catch(ue){console.error("Failed to interrupt:",ue)}},[C,m]),H=k.useCallback(()=>{const ue=kN(A);navigator.clipboard.writeText(ue)},[A]);if(!t)return null;const te=le?.status==="running"&&!ee;return v.jsxs(v.Fragment,{children:[o&&v.jsx(kb,{authSource:c,hasGhToken:d??!1,onKeySaved:p,onClose:()=>s(!1),onCopyLog:C?H:void 0}),v.jsxs("div",{className:"session-header",children:[v.jsx("button",{type:"button",className:"mobile-hamburger",onClick:r,"aria-label":"Open menu",children:v.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[v.jsx("title",{children:"Menu"}),v.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),v.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),v.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),v.jsx("span",{className:"session-header-name",children:b?"Initializing...":le?.projectName??"Loading..."}),te&&v.jsx("span",{className:"session-header-status",style:{color:"var(--green)"},children:"Live"}),!b&&!D&&!ee&&v.jsx("span",{className:"session-header-status",style:{color:"var(--yellow)"},children:"Connecting..."}),B.totalCostUsd>0&&v.jsxs("span",{className:"session-header-cost",title:`${B.totalTurns} turns`,children:["$",B.totalCostUsd.toFixed(2)]}),$&&(F||_)&&v.jsx("a",{href:F??`http://localhost:${_}`,target:"_blank",rel:"noopener noreferrer",className:`mobile-open-app-icon ${$.status==="running"?"primary":""}`,"aria-label":"Open App",children:v.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("title",{children:"Open App"}),v.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),v.jsx("polyline",{points:"15 3 21 3 21 9"}),v.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})}),v.jsx("span",{className:"session-header-actions-group",children:$&&v.jsx("a",{href:F??(_?`http://localhost:${_}`:"#"),target:"_blank",rel:"noopener noreferrer",className:`session-header-action ${$.status==="running"?"primary":""}`,children:"Open App"})}),v.jsx("button",{type:"button",className:"session-header-overflow",onClick:ue=>{ue.stopPropagation(),g(pe=>!pe)},"aria-label":"More options",children:v.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[v.jsx("title",{children:"More"}),v.jsx("circle",{cx:"8",cy:"3",r:"1.5"}),v.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),v.jsx("circle",{cx:"8",cy:"13",r:"1.5"})]})}),y&&v.jsxs("div",{className:"session-header-overflow-menu",children:[B.totalCostUsd>0&&v.jsxs("span",{className:"session-header-overflow-menu-item session-header-overflow-cost",children:["Cost: $",B.totalCostUsd.toFixed(2)," (",B.totalTurns," turns)"]}),v.jsx("button",{type:"button",className:"session-header-overflow-menu-item",onClick:()=>{g(!1),s(ue=>!ue)},children:"Settings"})]})]}),v.jsxs("div",{className:"session-content",children:[b?v.jsxs("div",{className:"session-initializing",children:[v.jsx("div",{className:"session-initializing-spinner"}),v.jsx("span",{children:"Setting up your project..."})]}):!D&&!ee?v.jsxs("div",{className:"session-loading",children:[v.jsx(qf,{variant:"block"}),v.jsx(qf,{variant:"line",width:"80%"}),v.jsx(qf,{variant:"line",width:"60%"})]}):v.jsx(EN,{sessionId:C??"",entries:A,isLive:D,isComplete:ee,onGateResolved:z}),q&&v.jsxs("div",{className:"room-send-error",children:[q,v.jsx("button",{type:"button",onClick:()=>V(null),children:"×"})]}),v.jsx(wb,{onSubmit:ne,placeholder:te?"Message...":"Ask anything...",disabled:b,isRunning:te,onCancel:K})]})]})}const TN=hw([{element:v.jsx(nC,{}),children:[{path:"/",element:v.jsx(iC,{})},{path:"/session/:id",element:v.jsx(CN,{})},{path:"/room/:id",element:v.jsx(uC,{})}]}]),jv=document.getElementById("root");jv&&Wx.createRoot(jv).render(v.jsx(k.StrictMode,{children:v.jsx(Tw,{router:TN})}));