@electric-agent/studio 1.1.1 → 1.3.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 (73) hide show
  1. package/dist/bridge/claude-code-docker.d.ts +11 -0
  2. package/dist/bridge/claude-code-docker.d.ts.map +1 -1
  3. package/dist/bridge/claude-code-docker.js +103 -22
  4. package/dist/bridge/claude-code-docker.js.map +1 -1
  5. package/dist/bridge/claude-code-sprites.d.ts +10 -1
  6. package/dist/bridge/claude-code-sprites.d.ts.map +1 -1
  7. package/dist/bridge/claude-code-sprites.js +120 -44
  8. package/dist/bridge/claude-code-sprites.js.map +1 -1
  9. package/dist/bridge/claude-md-generator.d.ts +1 -0
  10. package/dist/bridge/claude-md-generator.d.ts.map +1 -1
  11. package/dist/bridge/claude-md-generator.js +64 -11
  12. package/dist/bridge/claude-md-generator.js.map +1 -1
  13. package/dist/bridge/codex-docker.d.ts +65 -0
  14. package/dist/bridge/codex-docker.d.ts.map +1 -0
  15. package/dist/bridge/codex-docker.js +242 -0
  16. package/dist/bridge/codex-docker.js.map +1 -0
  17. package/dist/bridge/codex-json-parser.d.ts +31 -0
  18. package/dist/bridge/codex-json-parser.d.ts.map +1 -0
  19. package/dist/bridge/codex-json-parser.js +274 -0
  20. package/dist/bridge/codex-json-parser.js.map +1 -0
  21. package/dist/bridge/codex-md-generator.d.ts +14 -0
  22. package/dist/bridge/codex-md-generator.d.ts.map +1 -0
  23. package/dist/bridge/codex-md-generator.js +45 -0
  24. package/dist/bridge/codex-md-generator.js.map +1 -0
  25. package/dist/bridge/codex-sprites.d.ts +59 -0
  26. package/dist/bridge/codex-sprites.d.ts.map +1 -0
  27. package/dist/bridge/codex-sprites.js +237 -0
  28. package/dist/bridge/codex-sprites.js.map +1 -0
  29. package/dist/bridge/create-app-skill.d.ts +11 -0
  30. package/dist/bridge/create-app-skill.d.ts.map +1 -0
  31. package/dist/bridge/create-app-skill.js +39 -0
  32. package/dist/bridge/create-app-skill.js.map +1 -0
  33. package/dist/bridge/index.d.ts +0 -3
  34. package/dist/bridge/index.d.ts.map +1 -1
  35. package/dist/bridge/index.js +0 -3
  36. package/dist/bridge/index.js.map +1 -1
  37. package/dist/bridge/stream-json-parser.d.ts +0 -2
  38. package/dist/bridge/stream-json-parser.d.ts.map +1 -1
  39. package/dist/bridge/stream-json-parser.js +0 -18
  40. package/dist/bridge/stream-json-parser.js.map +1 -1
  41. package/dist/client/assets/index-Bq9zwhHj.css +1 -0
  42. package/dist/client/assets/index-Dgpqg5fv.js +234 -0
  43. package/dist/client/index.html +2 -2
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +1 -0
  47. package/dist/index.js.map +1 -1
  48. package/dist/sandbox/daytona.js +4 -4
  49. package/dist/sandbox/daytona.js.map +1 -1
  50. package/dist/sandbox/docker.d.ts +0 -1
  51. package/dist/sandbox/docker.d.ts.map +1 -1
  52. package/dist/sandbox/docker.js +10 -42
  53. package/dist/sandbox/docker.js.map +1 -1
  54. package/dist/sandbox/sprites.d.ts +0 -6
  55. package/dist/sandbox/sprites.d.ts.map +1 -1
  56. package/dist/sandbox/sprites.js +4 -36
  57. package/dist/sandbox/sprites.js.map +1 -1
  58. package/dist/sandbox/types.d.ts +0 -8
  59. package/dist/sandbox/types.d.ts.map +1 -1
  60. package/dist/server.d.ts +2 -5
  61. package/dist/server.d.ts.map +1 -1
  62. package/dist/server.js +187 -161
  63. package/dist/server.js.map +1 -1
  64. package/dist/session-auth.d.ts +3 -0
  65. package/dist/session-auth.d.ts.map +1 -0
  66. package/dist/session-auth.js +11 -0
  67. package/dist/session-auth.js.map +1 -0
  68. package/dist/sessions.d.ts +0 -2
  69. package/dist/sessions.d.ts.map +1 -1
  70. package/dist/sessions.js.map +1 -1
  71. package/package.json +2 -2
  72. package/dist/client/assets/index-BeZ6CTGd.css +0 -1
  73. package/dist/client/assets/index-DRLXdDNp.js +0 -241
@@ -1,241 +0,0 @@
1
- function Fx(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 vd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var hf={exports:{}},Ar={};var Fg;function Gx(){if(Fg)return Ar;Fg=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 Ar.Fragment=l,Ar.jsx=i,Ar.jsxs=i,Ar}var Gg;function Vx(){return Gg||(Gg=1,hf.exports=Gx()),hf.exports}var v=Vx(),mf={exports:{}},Oe={};var Vg;function Ix(){if(Vg)return Oe;Vg=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(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,z={};function T(O,F,C){this.props=O,this.context=F,this.refs=z,this.updater=C||k}T.prototype.isReactComponent={},T.prototype.setState=function(O,F){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,F,"setState")},T.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function N(){}N.prototype=T.prototype;function R(O,F,C){this.props=O,this.context=F,this.refs=z,this.updater=C||k}var P=R.prototype=new N;P.constructor=R,j(P,T.prototype),P.isPureReactComponent=!0;var W=Array.isArray;function H(){}var _={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function ce(O,F,C){var ue=C.ref;return{$$typeof:t,type:O,key:F,ref:ue!==void 0?ue:null,props:C}}function U(O,F){return ce(O.type,F,O.props)}function X(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function K(O){var F={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(C){return F[C]})}var I=/\/+/g;function te(O,F){return typeof O=="object"&&O!==null&&O.key!=null?K(""+O.key):F.toString(36)}function Q(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(H,H):(O.status="pending",O.then(function(F){O.status==="pending"&&(O.status="fulfilled",O.value=F)},function(F){O.status==="pending"&&(O.status="rejected",O.reason=F)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function D(O,F,C,ue,be){var xe=typeof O;(xe==="undefined"||xe==="boolean")&&(O=null);var De=!1;if(O===null)De=!0;else switch(xe){case"bigint":case"string":case"number":De=!0;break;case"object":switch(O.$$typeof){case t:case l:De=!0;break;case y:return De=O._init,D(De(O._payload),F,C,ue,be)}}if(De)return be=be(O),De=ue===""?"."+te(O,0):ue,W(be)?(C="",De!=null&&(C=De.replace(I,"$&/")+"/"),D(be,F,C,"",function(Nt){return Nt})):be!=null&&(X(be)&&(be=U(be,C+(be.key==null||O&&O.key===be.key?"":(""+be.key).replace(I,"$&/")+"/")+De)),F.push(be)),1;De=0;var pe=ue===""?".":ue+":";if(W(O))for(var ze=0;ze<O.length;ze++)ue=O[ze],xe=pe+te(ue,ze),De+=D(ue,F,C,xe,be);else if(ze=S(O),typeof ze=="function")for(O=ze.call(O),ze=0;!(ue=O.next()).done;)ue=ue.value,xe=pe+te(ue,ze++),De+=D(ue,F,C,xe,be);else if(xe==="object"){if(typeof O.then=="function")return D(Q(O),F,C,ue,be);throw F=String(O),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return De}function ee(O,F,C){if(O==null)return O;var ue=[],be=0;return D(O,ue,"","",function(xe){return F.call(C,xe,be++)}),ue}function se(O){if(O._status===-1){var F=O._result;F=F(),F.then(function(C){(O._status===0||O._status===-1)&&(O._status=1,O._result=C)},function(C){(O._status===0||O._status===-1)&&(O._status=2,O._result=C)}),O._status===-1&&(O._status=0,O._result=F)}if(O._status===1)return O._result.default;throw O._result}var ve=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},A={map:ee,forEach:function(O,F,C){ee(O,function(){F.apply(this,arguments)},C)},count:function(O){var F=0;return ee(O,function(){F++}),F},toArray:function(O){return ee(O,function(F){return F})||[]},only:function(O){if(!X(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Oe.Activity=g,Oe.Children=A,Oe.Component=T,Oe.Fragment=i,Oe.Profiler=o,Oe.PureComponent=R,Oe.StrictMode=r,Oe.Suspense=p,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(O){return _.H.useMemoCache(O)}},Oe.cache=function(O){return function(){return O.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(O,F,C){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var ue=j({},O.props),be=O.key;if(F!=null)for(xe in F.key!==void 0&&(be=""+F.key),F)!ae.call(F,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&F.ref===void 0||(ue[xe]=F[xe]);var xe=arguments.length-2;if(xe===1)ue.children=C;else if(1<xe){for(var De=Array(xe),pe=0;pe<xe;pe++)De[pe]=arguments[pe+2];ue.children=De}return ce(O.type,be,ue)},Oe.createContext=function(O){return O={$$typeof:c,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:s,_context:O},O},Oe.createElement=function(O,F,C){var ue,be={},xe=null;if(F!=null)for(ue in F.key!==void 0&&(xe=""+F.key),F)ae.call(F,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(be[ue]=F[ue]);var De=arguments.length-2;if(De===1)be.children=C;else if(1<De){for(var pe=Array(De),ze=0;ze<De;ze++)pe[ze]=arguments[ze+2];be.children=pe}if(O&&O.defaultProps)for(ue in De=O.defaultProps,De)be[ue]===void 0&&(be[ue]=De[ue]);return ce(O,xe,be)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(O){return{$$typeof:d,render:O}},Oe.isValidElement=X,Oe.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:se}},Oe.memo=function(O,F){return{$$typeof:m,type:O,compare:F===void 0?null:F}},Oe.startTransition=function(O){var F=_.T,C={};_.T=C;try{var ue=O(),be=_.S;be!==null&&be(C,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(H,ve)}catch(xe){ve(xe)}finally{F!==null&&C.types!==null&&(F.types=C.types),_.T=F}},Oe.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},Oe.use=function(O){return _.H.use(O)},Oe.useActionState=function(O,F,C){return _.H.useActionState(O,F,C)},Oe.useCallback=function(O,F){return _.H.useCallback(O,F)},Oe.useContext=function(O){return _.H.useContext(O)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(O,F){return _.H.useDeferredValue(O,F)},Oe.useEffect=function(O,F){return _.H.useEffect(O,F)},Oe.useEffectEvent=function(O){return _.H.useEffectEvent(O)},Oe.useId=function(){return _.H.useId()},Oe.useImperativeHandle=function(O,F,C){return _.H.useImperativeHandle(O,F,C)},Oe.useInsertionEffect=function(O,F){return _.H.useInsertionEffect(O,F)},Oe.useLayoutEffect=function(O,F){return _.H.useLayoutEffect(O,F)},Oe.useMemo=function(O,F){return _.H.useMemo(O,F)},Oe.useOptimistic=function(O,F){return _.H.useOptimistic(O,F)},Oe.useReducer=function(O,F,C){return _.H.useReducer(O,F,C)},Oe.useRef=function(O){return _.H.useRef(O)},Oe.useState=function(O){return _.H.useState(O)},Oe.useSyncExternalStore=function(O,F,C){return _.H.useSyncExternalStore(O,F,C)},Oe.useTransition=function(){return _.H.useTransition()},Oe.version="19.2.4",Oe}var Ig;function bd(){return Ig||(Ig=1,mf.exports=Ix()),mf.exports}var w=bd();const Xx=vd(w),Qx=Fx({__proto__:null,default:Xx},[w]);var pf={exports:{}},_r={},gf={exports:{}},yf={};var Xg;function $x(){return Xg||(Xg=1,(function(t){function l(D,ee){var se=D.length;D.push(ee);e:for(;0<se;){var ve=se-1>>>1,A=D[ve];if(0<o(A,ee))D[ve]=ee,D[se]=A,se=ve;else break e}}function i(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var ee=D[0],se=D.pop();if(se!==ee){D[0]=se;e:for(var ve=0,A=D.length,O=A>>>1;ve<O;){var F=2*(ve+1)-1,C=D[F],ue=F+1,be=D[ue];if(0>o(C,se))ue<A&&0>o(be,C)?(D[ve]=be,D[ue]=se,ve=ue):(D[ve]=C,D[F]=se,ve=F);else if(ue<A&&0>o(be,se))D[ve]=be,D[ue]=se,ve=ue;else break e}}return ee}function o(D,ee){var se=D.sortIndex-ee.sortIndex;return se!==0?se:D.id-ee.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,k=!1,j=!1,z=!1,T=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function P(D){for(var ee=i(m);ee!==null;){if(ee.callback===null)r(m);else if(ee.startTime<=D)r(m),ee.sortIndex=ee.expirationTime,l(p,ee);else break;ee=i(m)}}function W(D){if(j=!1,P(D),!k)if(i(p)!==null)k=!0,H||(H=!0,K());else{var ee=i(m);ee!==null&&Q(W,ee.startTime-D)}}var H=!1,_=-1,ae=5,ce=-1;function U(){return z?!0:!(t.unstable_now()-ce<ae)}function X(){if(z=!1,H){var D=t.unstable_now();ce=D;var ee=!0;try{e:{k=!1,j&&(j=!1,N(_),_=-1),S=!0;var se=b;try{t:{for(P(D),g=i(p);g!==null&&!(g.expirationTime>D&&U());){var ve=g.callback;if(typeof ve=="function"){g.callback=null,b=g.priorityLevel;var A=ve(g.expirationTime<=D);if(D=t.unstable_now(),typeof A=="function"){g.callback=A,P(D),ee=!0;break t}g===i(p)&&r(p),P(D)}else r(p);g=i(p)}if(g!==null)ee=!0;else{var O=i(m);O!==null&&Q(W,O.startTime-D),ee=!1}}break e}finally{g=null,b=se,S=!1}ee=void 0}}finally{ee?K():H=!1}}}var K;if(typeof R=="function")K=function(){R(X)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,te=I.port2;I.port1.onmessage=X,K=function(){te.postMessage(null)}}else K=function(){T(X,0)};function Q(D,ee){_=T(function(){D(t.unstable_now())},ee)}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(D){D.callback=null},t.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<D?Math.floor(1e3/D):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(D){switch(b){case 1:case 2:case 3:var ee=3;break;default:ee=b}var se=b;b=ee;try{return D()}finally{b=se}},t.unstable_requestPaint=function(){z=!0},t.unstable_runWithPriority=function(D,ee){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var se=b;b=D;try{return ee()}finally{b=se}},t.unstable_scheduleCallback=function(D,ee,se){var ve=t.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?ve+se:ve):se=ve,D){case 1:var A=-1;break;case 2:A=250;break;case 5:A=1073741823;break;case 4:A=1e4;break;default:A=5e3}return A=se+A,D={id:y++,callback:ee,priorityLevel:D,startTime:se,expirationTime:A,sortIndex:-1},se>ve?(D.sortIndex=se,l(m,D),i(p)===null&&D===i(m)&&(j?(N(_),_=-1):j=!0,Q(W,se-ve))):(D.sortIndex=A,l(p,D),k||S||(k=!0,H||(H=!0,K()))),D},t.unstable_shouldYield=U,t.unstable_wrapCallback=function(D){var ee=b;return function(){var se=b;b=ee;try{return D.apply(this,arguments)}finally{b=se}}}})(yf)),yf}var Qg;function Zx(){return Qg||(Qg=1,gf.exports=$x()),gf.exports}var vf={exports:{}},Vt={};var $g;function Kx(){if($g)return Vt;$g=1;var t=bd();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 Zg;function kv(){if(Zg)return vf.exports;Zg=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(),vf.exports=Kx(),vf.exports}var Kg;function Px(){if(Kg)return _r;Kg=1;var t=Zx(),l=bd(),i=kv();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,E=f.child;E;){if(E===a){x=!0,a=f,u=h;break}if(E===u){x=!0,u=f,a=h;break}E=E.sibling}if(!x){for(E=h.child;E;){if(E===a){x=!0,a=h,u=f;break}if(E===u){x=!0,u=h,a=f;break}E=E.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"),k=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),R=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),ce=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=X&&e[X]||e["@@iterator"],typeof e=="function"?e:null)}var I=Symbol.for("react.client.reference");function te(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===I?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case T:return"Profiler";case z:return"StrictMode";case W:return"Suspense";case H:return"SuspenseList";case ce:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case k:return"Portal";case R:return e.displayName||"Context";case N:return(e._context.displayName||"Context")+".Consumer";case P:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _:return n=e.displayName||null,n!==null?n:te(e.type)||"Memo";case ae:n=e._payload,e=e._init;try{return te(e(n))}catch{}}return null}var Q=Array.isArray,D=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},ve=[],A=-1;function O(e){return{current:e}}function F(e){0>A||(e.current=ve[A],ve[A]=null,A--)}function C(e,n){A++,ve[A]=e.current,e.current=n}var ue=O(null),be=O(null),xe=O(null),De=O(null);function pe(e,n){switch(C(xe,n),C(be,e),C(ue,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?fg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=fg(n),e=dg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}F(ue),C(ue,e)}function ze(){F(ue),F(be),F(xe)}function Nt(e){e.memoizedState!==null&&C(De,e);var n=ue.current,a=dg(n,e.type);n!==a&&(C(be,e),C(ue,a))}function Ln(e){be.current===e&&(F(ue),F(be)),De.current===e&&(F(De),kr._currentValue=se)}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 zl=!1;function Pt(e,n){if(!e||zl)return"";zl=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch(J){var $=J}Reflect.construct(e,[],re)}else{try{re.call()}catch(J){$=J}e.call(re.prototype)}}else{try{throw Error()}catch(J){$=J}(re=e())&&typeof re.catch=="function"&&re.catch(function(){})}}catch(J){if(J&&$&&typeof J.stack=="string")return[J.stack,$.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],E=h[1];if(x&&E){var L=x.split(`
4
- `),V=E.split(`
5
- `);for(f=u=0;u<L.length&&!L[u].includes("DetermineComponentFrameRoot");)u++;for(;f<V.length&&!V[f].includes("DetermineComponentFrameRoot");)f++;if(u===L.length||f===V.length)for(u=L.length-1,f=V.length-1;1<=u&&0<=f&&L[u]!==V[f];)f--;for(;1<=u&&0<=f;u--,f--)if(L[u]!==V[f]){if(u!==1||f!==1)do if(u--,f--,0>f||L[u]!==V[f]){var ne=`
6
- `+L[u].replace(" at new "," at ");return e.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",e.displayName)),ne}while(1<=u&&0<=f);break}}}finally{zl=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Sn(a):""}function Ga(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 Va(e){try{var n="",a=null;do n+=Ga(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,Nl=t.unstable_scheduleCallback,ma=t.unstable_cancelCallback,Bi=t.unstable_shouldYield,Hi=t.unstable_requestPaint,pt=t.unstable_now,al=t.unstable_getCurrentPriorityLevel,le=t.unstable_ImmediatePriority,de=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,Re=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:iu,Bn=Math.log,sn=Math.LN2;function iu(e){return e>>>=0,e===0?32:31-(Bn(e)/sn|0)|0}var il=256,pa=262144,Rl=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 ga(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 E=u&134217727;return E!==0?(u=E&~h,u!==0?f=rl(u):(x&=E,x!==0?f=rl(x):a||(a=E&~e,a!==0&&(f=rl(a))))):(E=u&~h,E!==0?f=rl(E):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 ya(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function ru(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 va(){var e=Rl;return Rl<<=1,(Rl&62914560)===0&&(Rl=4194304),e}function Dl(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Ol(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function is(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 E=e.entanglements,L=e.expirationTimes,V=e.hiddenUpdates;for(a=x&~a;0<a;){var ne=31-tt(a),re=1<<ne;E[ne]=0,L[ne]=-1;var $=V[ne];if($!==null)for(V[ne]=null,ne=0;ne<$.length;ne++){var J=$[ne];J!==null&&(J.lane&=-536870913)}a&=~re}u!==0&&uu(e,u,0),h!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=h&~(x&~n))}function uu(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 M(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 Y(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 oe(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function he(){var e=ee.p;return e!==0?e:(e=window.event,e===void 0?32:Mg(e.type))}function ke(e,n){var a=ee.p;try{return ee.p=e,n()}finally{ee.p=a}}var ge=Math.random().toString(36).slice(2),me="__reactFiber$"+ge,ye="__reactProps$"+ge,we="__reactContainer$"+ge,Ae="__reactEvents$"+ge,Te="__reactListeners$"+ge,Ze="__reactHandles$"+ge,Ve="__reactResources$"+ge,gt="__reactMarker$"+ge;function vt(e){delete e[me],delete e[ye],delete e[Ae],delete e[Te],delete e[Ze]}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=bg(e);e!==null;){if(a=e[me])return a;e=bg(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 Ot(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]*$"),ba={},xa={};function Xe(e){return ll.call(xa,e)?!0:ll.call(ba,e)?!1:ul.test(e)?xa[e]=!0:(ba[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 Sa(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ou(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 qi(e){if(!e._valueTracker){var n=Sa(e)?"checked":"value";e._valueTracker=ou(e,n,""+e[n])}}function ah(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),u="";return e&&(u=Sa(e)?e.checked?"true":"false":e.value),e=u,e!==a?(n.setValue(e),!0):!1}function su(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 rs(e,n,a,u,f,h,x,E){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?us(e,x,Qe(n)):a!=null?us(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"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Qe(E):e.removeAttribute("name")}function ih(e,n,a,u,f,h,x,E){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)){qi(e);return}a=a!=null?""+Qe(a):"",n=n!=null?""+Qe(n):a,E||n===e.value||(e.value=n),e.defaultValue=n}u=u??f,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=E?e.checked:!!u,e.defaultChecked=!!u,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),qi(e)}function us(e,n,a){n==="number"&&su(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Ia(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 rh(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 uh(e,n,a,u){if(n==null){if(u!=null){if(a!=null)throw Error(r(92));if(Q(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),qi(e)}function Xa(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 oh(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 sh(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&&oh(e,f,u)}else for(var h in n)n.hasOwnProperty(h)&&oh(e,h,n[h])}function os(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 cu(e){return H0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ol(){}var ss=null;function cs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Qa=null,$a=null;function ch(e){var n=Ie(e);if(n&&(e=n.stateNode)){var a=e[ye]||null;e:switch(e=n.stateNode,n.type){case"input":if(rs(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[ye]||null;if(!f)throw Error(r(90));rs(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&&ah(u)}break e;case"textarea":rh(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Ia(e,!!a.multiple,n,!1)}}}var fs=!1;function fh(e,n,a){if(fs)return e(n,a);fs=!0;try{var u=e(n);return u}finally{if(fs=!1,(Qa!==null||$a!==null)&&(Pu(),Qa&&(n=Qa,e=$a,$a=Qa=null,ch(n),e)))for(n=0;n<e.length;n++)ch(e[n])}}function Yi(e,n){var a=e.stateNode;if(a===null)return null;var u=a[ye]||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"),ds=!1;if(sl)try{var Fi={};Object.defineProperty(Fi,"passive",{get:function(){ds=!0}}),window.addEventListener("test",Fi,Fi),window.removeEventListener("test",Fi,Fi)}catch{ds=!1}var Ml=null,hs=null,fu=null;function dh(){if(fu)return fu;var e,n=hs,a=n.length,u,f="value"in Ml?Ml.value:Ml.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 fu=f.slice(e,1<u?1-u:void 0)}function du(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 hu(){return!0}function hh(){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 E in e)e.hasOwnProperty(E)&&(a=e[E],this[E]=a?a(h):h[E]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?hu:hh,this.isPropagationStopped=hh,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=hu)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=hu)},persist:function(){},isPersistent:hu}),n}var Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mu=Wt(Ea),Gi=g({},Ea,{view:0,detail:0}),q0=Wt(Gi),ms,ps,Vi,pu=g({},Gi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ys,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!==Vi&&(Vi&&e.type==="mousemove"?(ms=e.screenX-Vi.screenX,ps=e.screenY-Vi.screenY):ps=ms=0,Vi=e),ms)},movementY:function(e){return"movementY"in e?e.movementY:ps}}),mh=Wt(pu),Y0=g({},pu,{dataTransfer:0}),F0=Wt(Y0),G0=g({},Gi,{relatedTarget:0}),gs=Wt(G0),V0=g({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),I0=Wt(V0),X0=g({},Ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Q0=Wt(X0),$0=g({},Ea,{data:0}),ph=Wt($0),Z0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},K0={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 ys(){return J0}var W0=g({},Gi,{key:function(e){if(e.key){var n=Z0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=du(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?K0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ys,charCode:function(e){return e.type==="keypress"?du(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?du(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),e1=Wt(W0),t1=g({},pu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gh=Wt(t1),n1=g({},Gi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ys}),l1=Wt(n1),a1=g({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),i1=Wt(a1),r1=g({},pu,{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({},Ea,{newState:0,oldState:0}),s1=Wt(o1),c1=[9,13,27,32],vs=sl&&"CompositionEvent"in window,Ii=null;sl&&"documentMode"in document&&(Ii=document.documentMode);var f1=sl&&"TextEvent"in window&&!Ii,yh=sl&&(!vs||Ii&&8<Ii&&11>=Ii),vh=" ",bh=!1;function xh(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 Sh(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 Sh(n);case"keypress":return n.which!==32?null:(bh=!0,vh);case"textInput":return e=n.data,e===vh&&bh?null:e;default:return null}}function h1(e,n){if(Za)return e==="compositionend"||!vs&&xh(e,n)?(e=dh(),fu=hs=Ml=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 yh&&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 Eh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!m1[e.type]:n==="textarea"}function wh(e,n,a,u){Qa?$a?$a.push(u):$a=[u]:Qa=u,n=ao(n,"onChange"),0<n.length&&(a=new mu("onChange","change",null,a,u),e.push({event:a,listeners:n}))}var Xi=null,Qi=null;function p1(e){ig(e,0)}function gu(e){var n=Ot(e);if(ah(n))return e}function kh(e,n){if(e==="change")return n}var Ch=!1;if(sl){var bs;if(sl){var xs="oninput"in document;if(!xs){var Th=document.createElement("div");Th.setAttribute("oninput","return;"),xs=typeof Th.oninput=="function"}bs=xs}else bs=!1;Ch=bs&&(!document.documentMode||9<document.documentMode)}function jh(){Xi&&(Xi.detachEvent("onpropertychange",Ah),Qi=Xi=null)}function Ah(e){if(e.propertyName==="value"&&gu(Qi)){var n=[];wh(n,Qi,e,cs(e)),fh(p1,n)}}function g1(e,n,a){e==="focusin"?(jh(),Xi=n,Qi=a,Xi.attachEvent("onpropertychange",Ah)):e==="focusout"&&jh()}function y1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gu(Qi)}function v1(e,n){if(e==="click")return gu(n)}function b1(e,n){if(e==="input"||e==="change")return gu(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 $i(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 _h(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zh(e,n){var a=_h(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=_h(a)}}function Nh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Nh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Rh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=su(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=su(e.document)}return n}function Ss(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,Ka=null,Es=null,Zi=null,ws=!1;function Dh(e,n,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;ws||Ka==null||Ka!==su(u)||(u=Ka,"selectionStart"in u&&Ss(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}),Zi&&$i(Zi,u)||(Zi=u,u=ao(Es,"onSelect"),0<u.length&&(n=new mu("onSelect","select",null,n,a),e.push({event:n,listeners:u}),n.target=Ka)))}function wa(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var Pa={animationend:wa("Animation","AnimationEnd"),animationiteration:wa("Animation","AnimationIteration"),animationstart:wa("Animation","AnimationStart"),transitionrun:wa("Transition","TransitionRun"),transitionstart:wa("Transition","TransitionStart"),transitioncancel:wa("Transition","TransitionCancel"),transitionend:wa("Transition","TransitionEnd")},ks={},Oh={};sl&&(Oh=document.createElement("div").style,"AnimationEvent"in window||(delete Pa.animationend.animation,delete Pa.animationiteration.animation,delete Pa.animationstart.animation),"TransitionEvent"in window||delete Pa.transitionend.transition);function ka(e){if(ks[e])return ks[e];if(!Pa[e])return e;var n=Pa[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in Oh)return ks[e]=n[a];return e}var Mh=ka("animationend"),Lh=ka("animationiteration"),Uh=ka("animationstart"),E1=ka("transitionrun"),w1=ka("transitionstart"),k1=ka("transitioncancel"),Bh=ka("transitionend"),Hh=new Map,Cs="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(" ");Cs.push("scrollEnd");function Fn(e,n){Hh.set(e,n),qn(n,[e])}var yu=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=[],Ja=0,Ts=0;function vu(){for(var e=Ja,n=Ts=Ja=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&&qh(a,f,h)}}function bu(e,n,a,u){kn[Ja++]=e,kn[Ja++]=n,kn[Ja++]=a,kn[Ja++]=u,Ts|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function js(e,n,a,u){return bu(e,n,a,u),xu(e)}function Ca(e,n){return bu(e,null,null,n),xu(e)}function qh(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 xu(e){if(50<yr)throw yr=0,Lc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Wa={};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 As(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 Yh(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 Su(e,n,a,u,f,h){var x=0;if(u=e,typeof e=="function")As(e)&&(x=1);else if(typeof e=="string")x=zx(e,a,ue.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ce:return e=dn(31,a,n,f),e.elementType=ce,e.lanes=h,e;case j:return Ta(a.children,f,h,n);case z:x=8,f|=24;break;case T:return e=dn(12,a,n,f|2),e.elementType=T,e.lanes=h,e;case W:return e=dn(13,a,n,f),e.elementType=W,e.lanes=h,e;case H:return e=dn(19,a,n,f),e.elementType=H,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:x=10;break e;case N:x=9;break e;case P:x=11;break e;case _:x=14;break e;case ae: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 Ta(e,n,a,u){return e=dn(7,e,u,n),e.lanes=a,e}function _s(e,n,a){return e=dn(6,e,null,n),e.lanes=a,e}function Fh(e){var n=dn(18,null,null,0);return n.stateNode=e,n}function zs(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 Gh=new WeakMap;function Cn(e,n){if(typeof e=="object"&&e!==null){var a=Gh.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Va(n)},Gh.set(e,n),n)}return{value:e,source:n,stack:Va(n)}}var ei=[],ti=0,Eu=null,Ki=0,Tn=[],jn=0,Ll=null,Qn=1,$n="";function fl(e,n){ei[ti++]=Ki,ei[ti++]=Eu,Eu=e,Ki=n}function Vh(e,n,a){Tn[jn++]=Qn,Tn[jn++]=$n,Tn[jn++]=Ll,Ll=e;var u=Qn;e=$n;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,Qn=1<<32-tt(n)+f|a<<f|u,$n=h+e}else Qn=1<<h|a<<f|u,$n=e}function Ns(e){e.return!==null&&(fl(e,1),Vh(e,1,0))}function Rs(e){for(;e===Eu;)Eu=ei[--ti],ei[ti]=null,Ki=ei[--ti],ei[ti]=null;for(;e===Ll;)Ll=Tn[--jn],Tn[jn]=null,$n=Tn[--jn],Tn[jn]=null,Qn=Tn[--jn],Tn[jn]=null}function Ih(e,n){Tn[jn++]=Qn,Tn[jn++]=$n,Tn[jn++]=Ll,Qn=n.id,$n=n.overflow,Ll=e}var Ht=null,ft=null,$e=!1,Ul=null,An=!1,Ds=Error(r(519));function Bl(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Pi(Cn(n,e)),Ds}function Xh(e){var n=e.stateNode,a=e.type,u=e.memoizedProps;switch(n[me]=e,n[ye]=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<br.length;a++)qe(br[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),ih(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),uh(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||sg(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||Bl(e,!0)}function Qh(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 ni(e){if(e!==Ht)return!1;if(!$e)return Qh(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")||Pc(e.type,e.memoizedProps)),a=!a),a&&ft&&Bl(e),Qh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ft=vg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ft=vg(e)}else n===27?(n=ft,Jl(e.type)?(e=nf,nf=null,ft=e):ft=n):ft=Ht?zn(e.stateNode.nextSibling):null;return!0}function ja(){ft=Ht=null,$e=!1}function Os(){var e=Ul;return e!==null&&(ln===null?ln=e:ln.push.apply(ln,e),Ul=null),e}function Pi(e){Ul===null?Ul=[e]:Ul.push(e)}var Ms=O(null),Aa=null,dl=null;function Hl(e,n,a){C(Ms,n._currentValue),n._currentValue=a}function hl(e){e._currentValue=Ms.current,F(Ms)}function Ls(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 Us(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 E=h;h=f;for(var L=0;L<n.length;L++)if(E.context===n[L]){h.lanes|=a,E=h.alternate,E!==null&&(E.lanes|=a),Ls(h.return,a,e),u||(x=null);break e}h=E.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),Ls(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 li(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 E=f.type;fn(f.pendingProps.value,x.value)||(e!==null?e.push(E):e=[E])}}else if(f===De.current){if(x=f.alternate,x===null)throw Error(r(387));x.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(kr):e=[kr])}f=f.return}e!==null&&Us(n,e,a,u),n.flags|=262144}function wu(e){for(e=e.firstContext;e!==null;){if(!fn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function _a(e){Aa=e,dl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qt(e){return $h(Aa,e)}function ku(e,n){return Aa===null&&_a(e),$h(e,n)}function $h(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,Ct={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bs(){return{controller:new T1,data:new Map,refCount:0}}function Ji(e){e.refCount--,e.refCount===0&&j1(A1,function(){e.controller.abort()})}var Wi=null,Hs=0,ai=0,ii=null;function _1(e,n){if(Wi===null){var a=Wi=[];Hs=0,ai=Fc(),ii={status:"pending",value:void 0,then:function(u){a.push(u)}}}return Hs++,n.then(Zh,Zh),n}function Zh(){if(--Hs===0&&Wi!==null){ii!==null&&(ii.status="fulfilled");var e=Wi;Wi=null,ai=0,ii=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function z1(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 Kh=D.S;D.S=function(e,n){Dp=pt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&_1(e,n),Kh!==null&&Kh(e,n)};var za=O(null);function qs(){var e=za.current;return e!==null?e:ot.pooledCache}function Cu(e,n){n===null?C(za,za.current):C(za,n.pool)}function Ph(){var e=qs();return e===null?null:{parent:Ct._currentValue,pool:e}}var ri=Error(r(460)),Ys=Error(r(474)),Tu=Error(r(542)),ju={then:function(){}};function Jh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Wh(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,tm(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,tm(e),e}throw Ra=n,ri}}function Na(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ra=a,ri):a}}var Ra=null;function em(){if(Ra===null)throw Error(r(459));var e=Ra;return Ra=null,e}function tm(e){if(e===ri||e===Tu)throw Error(r(483))}var ui=null,er=0;function Au(e){var n=er;return er+=1,ui===null&&(ui=[]),Wh(ui,e,n)}function tr(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function _u(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 nm(e){function n(q,B){if(e){var G=q.deletions;G===null?(q.deletions=[B],q.flags|=16):G.push(B)}}function a(q,B){if(!e)return null;for(;B!==null;)n(q,B),B=B.sibling;return null}function u(q){for(var B=new Map;q!==null;)q.key!==null?B.set(q.key,q):B.set(q.index,q),q=q.sibling;return B}function f(q,B){return q=cl(q,B),q.index=0,q.sibling=null,q}function h(q,B,G){return q.index=G,e?(G=q.alternate,G!==null?(G=G.index,G<B?(q.flags|=67108866,B):G):(q.flags|=67108866,B)):(q.flags|=1048576,B)}function x(q){return e&&q.alternate===null&&(q.flags|=67108866),q}function E(q,B,G,ie){return B===null||B.tag!==6?(B=_s(G,q.mode,ie),B.return=q,B):(B=f(B,G),B.return=q,B)}function L(q,B,G,ie){var je=G.type;return je===j?ne(q,B,G.props.children,ie,G.key):B!==null&&(B.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===ae&&Na(je)===B.type)?(B=f(B,G.props),tr(B,G),B.return=q,B):(B=Su(G.type,G.key,G.props,null,q.mode,ie),tr(B,G),B.return=q,B)}function V(q,B,G,ie){return B===null||B.tag!==4||B.stateNode.containerInfo!==G.containerInfo||B.stateNode.implementation!==G.implementation?(B=zs(G,q.mode,ie),B.return=q,B):(B=f(B,G.children||[]),B.return=q,B)}function ne(q,B,G,ie,je){return B===null||B.tag!==7?(B=Ta(G,q.mode,ie,je),B.return=q,B):(B=f(B,G),B.return=q,B)}function re(q,B,G){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return B=_s(""+B,q.mode,G),B.return=q,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case S:return G=Su(B.type,B.key,B.props,null,q.mode,G),tr(G,B),G.return=q,G;case k:return B=zs(B,q.mode,G),B.return=q,B;case ae:return B=Na(B),re(q,B,G)}if(Q(B)||K(B))return B=Ta(B,q.mode,G,null),B.return=q,B;if(typeof B.then=="function")return re(q,Au(B),G);if(B.$$typeof===R)return re(q,ku(q,B),G);_u(q,B)}return null}function $(q,B,G,ie){var je=B!==null?B.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return je!==null?null:E(q,B,""+G,ie);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case S:return G.key===je?L(q,B,G,ie):null;case k:return G.key===je?V(q,B,G,ie):null;case ae:return G=Na(G),$(q,B,G,ie)}if(Q(G)||K(G))return je!==null?null:ne(q,B,G,ie,null);if(typeof G.then=="function")return $(q,B,Au(G),ie);if(G.$$typeof===R)return $(q,B,ku(q,G),ie);_u(q,G)}return null}function J(q,B,G,ie,je){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return q=q.get(G)||null,E(B,q,""+ie,je);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case S:return q=q.get(ie.key===null?G:ie.key)||null,L(B,q,ie,je);case k:return q=q.get(ie.key===null?G:ie.key)||null,V(B,q,ie,je);case ae:return ie=Na(ie),J(q,B,G,ie,je)}if(Q(ie)||K(ie))return q=q.get(G)||null,ne(B,q,ie,je,null);if(typeof ie.then=="function")return J(q,B,G,Au(ie),je);if(ie.$$typeof===R)return J(q,B,G,ku(B,ie),je);_u(B,ie)}return null}function Se(q,B,G,ie){for(var je=null,Je=null,Ee=B,Le=B=0,Ge=null;Ee!==null&&Le<G.length;Le++){Ee.index>Le?(Ge=Ee,Ee=null):Ge=Ee.sibling;var We=$(q,Ee,G[Le],ie);if(We===null){Ee===null&&(Ee=Ge);break}e&&Ee&&We.alternate===null&&n(q,Ee),B=h(We,B,Le),Je===null?je=We:Je.sibling=We,Je=We,Ee=Ge}if(Le===G.length)return a(q,Ee),$e&&fl(q,Le),je;if(Ee===null){for(;Le<G.length;Le++)Ee=re(q,G[Le],ie),Ee!==null&&(B=h(Ee,B,Le),Je===null?je=Ee:Je.sibling=Ee,Je=Ee);return $e&&fl(q,Le),je}for(Ee=u(Ee);Le<G.length;Le++)Ge=J(Ee,q,Le,G[Le],ie),Ge!==null&&(e&&Ge.alternate!==null&&Ee.delete(Ge.key===null?Le:Ge.key),B=h(Ge,B,Le),Je===null?je=Ge:Je.sibling=Ge,Je=Ge);return e&&Ee.forEach(function(la){return n(q,la)}),$e&&fl(q,Le),je}function Ne(q,B,G,ie){if(G==null)throw Error(r(151));for(var je=null,Je=null,Ee=B,Le=B=0,Ge=null,We=G.next();Ee!==null&&!We.done;Le++,We=G.next()){Ee.index>Le?(Ge=Ee,Ee=null):Ge=Ee.sibling;var la=$(q,Ee,We.value,ie);if(la===null){Ee===null&&(Ee=Ge);break}e&&Ee&&la.alternate===null&&n(q,Ee),B=h(la,B,Le),Je===null?je=la:Je.sibling=la,Je=la,Ee=Ge}if(We.done)return a(q,Ee),$e&&fl(q,Le),je;if(Ee===null){for(;!We.done;Le++,We=G.next())We=re(q,We.value,ie),We!==null&&(B=h(We,B,Le),Je===null?je=We:Je.sibling=We,Je=We);return $e&&fl(q,Le),je}for(Ee=u(Ee);!We.done;Le++,We=G.next())We=J(Ee,q,Le,We.value,ie),We!==null&&(e&&We.alternate!==null&&Ee.delete(We.key===null?Le:We.key),B=h(We,B,Le),Je===null?je=We:Je.sibling=We,Je=We);return e&&Ee.forEach(function(Yx){return n(q,Yx)}),$e&&fl(q,Le),je}function ut(q,B,G,ie){if(typeof G=="object"&&G!==null&&G.type===j&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case S:e:{for(var je=G.key;B!==null;){if(B.key===je){if(je=G.type,je===j){if(B.tag===7){a(q,B.sibling),ie=f(B,G.props.children),ie.return=q,q=ie;break e}}else if(B.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===ae&&Na(je)===B.type){a(q,B.sibling),ie=f(B,G.props),tr(ie,G),ie.return=q,q=ie;break e}a(q,B);break}else n(q,B);B=B.sibling}G.type===j?(ie=Ta(G.props.children,q.mode,ie,G.key),ie.return=q,q=ie):(ie=Su(G.type,G.key,G.props,null,q.mode,ie),tr(ie,G),ie.return=q,q=ie)}return x(q);case k:e:{for(je=G.key;B!==null;){if(B.key===je)if(B.tag===4&&B.stateNode.containerInfo===G.containerInfo&&B.stateNode.implementation===G.implementation){a(q,B.sibling),ie=f(B,G.children||[]),ie.return=q,q=ie;break e}else{a(q,B);break}else n(q,B);B=B.sibling}ie=zs(G,q.mode,ie),ie.return=q,q=ie}return x(q);case ae:return G=Na(G),ut(q,B,G,ie)}if(Q(G))return Se(q,B,G,ie);if(K(G)){if(je=K(G),typeof je!="function")throw Error(r(150));return G=je.call(G),Ne(q,B,G,ie)}if(typeof G.then=="function")return ut(q,B,Au(G),ie);if(G.$$typeof===R)return ut(q,B,ku(q,G),ie);_u(q,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,B!==null&&B.tag===6?(a(q,B.sibling),ie=f(B,G),ie.return=q,q=ie):(a(q,B),ie=_s(G,q.mode,ie),ie.return=q,q=ie),x(q)):a(q,B)}return function(q,B,G,ie){try{er=0;var je=ut(q,B,G,ie);return ui=null,je}catch(Ee){if(Ee===ri||Ee===Tu)throw Ee;var Je=dn(29,Ee,null,q.mode);return Je.lanes=ie,Je.return=q,Je}}}var Da=nm(!0),lm=nm(!1),ql=!1;function Fs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gs(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 Yl(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=xu(e),qh(e,null,a),n}return bu(e,u,n,a),xu(e)}function nr(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,M(e,a)}}function Vs(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 Is=!1;function lr(){if(Is){var e=ii;if(e!==null)throw e}}function ar(e,n,a,u){Is=!1;var f=e.updateQueue;ql=!1;var h=f.firstBaseUpdate,x=f.lastBaseUpdate,E=f.shared.pending;if(E!==null){f.shared.pending=null;var L=E,V=L.next;L.next=null,x===null?h=V:x.next=V,x=L;var ne=e.alternate;ne!==null&&(ne=ne.updateQueue,E=ne.lastBaseUpdate,E!==x&&(E===null?ne.firstBaseUpdate=V:E.next=V,ne.lastBaseUpdate=L))}if(h!==null){var re=f.baseState;x=0,ne=V=L=null,E=h;do{var $=E.lane&-536870913,J=$!==E.lane;if(J?(Fe&$)===$:(u&$)===$){$!==0&&$===ai&&(Is=!0),ne!==null&&(ne=ne.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var Se=e,Ne=E;$=n;var ut=a;switch(Ne.tag){case 1:if(Se=Ne.payload,typeof Se=="function"){re=Se.call(ut,re,$);break e}re=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ne.payload,$=typeof Se=="function"?Se.call(ut,re,$):Se,$==null)break e;re=g({},re,$);break e;case 2:ql=!0}}$=E.callback,$!==null&&(e.flags|=64,J&&(e.flags|=8192),J=f.callbacks,J===null?f.callbacks=[$]:J.push($))}else J={lane:$,tag:E.tag,payload:E.payload,callback:E.callback,next:null},ne===null?(V=ne=J,L=re):ne=ne.next=J,x|=$;if(E=E.next,E===null){if(E=f.shared.pending,E===null)break;J=E,E=J.next,J.next=null,f.lastBaseUpdate=J,f.shared.pending=null}}while(!0);ne===null&&(L=re),f.baseState=L,f.firstBaseUpdate=V,f.lastBaseUpdate=ne,h===null&&(f.shared.lanes=0),Ql|=x,e.lanes=x,e.memoizedState=re}}function am(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function im(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)am(a[e],n)}var oi=O(null),zu=O(0);function rm(e,n){e=El,C(zu,e),C(oi,n),El=e|n.baseLanes}function Xs(){C(zu,El),C(oi,oi.current)}function Qs(){El=zu.current,F(oi),F(zu)}var hn=O(null),_n=null;function Gl(e){var n=e.alternate;C(wt,wt.current&1),C(hn,e),_n===null&&(n===null||oi.current!==null||n.memoizedState!==null)&&(_n=e)}function $s(e){C(wt,wt.current),C(hn,e),_n===null&&(_n=e)}function um(e){e.tag===22?(C(wt,wt.current),C(hn,e),_n===null&&(_n=e)):Vl()}function Vl(){C(wt,wt.current),C(hn,hn.current)}function mn(e){F(hn),_n===e&&(_n=null),F(wt)}var wt=O(0);function Nu(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||ef(a)||tf(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,Tt=null,Ru=!1,si=!1,Oa=!1,Du=0,ir=0,ci=null,N1=0;function xt(){throw Error(r(321))}function Zs(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 Ks(e,n,a,u,f,h){return ml=h,Me=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,D.H=e===null||e.memoizedState===null?Vm:fc,Oa=!1,h=a(u,f),Oa=!1,si&&(h=sm(n,a,u,f)),om(e),h}function om(e){D.H=or;var n=it!==null&&it.next!==null;if(ml=0,Tt=it=Me=null,Ru=!1,ir=0,ci=null,n)throw Error(r(300));e===null||jt||(e=e.dependencies,e!==null&&wu(e)&&(jt=!0))}function sm(e,n,a,u){Me=e;var f=0;do{if(si&&(ci=null),ir=0,si=!1,25<=f)throw Error(r(301));if(f+=1,Tt=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)}D.H=Im,h=n(a,u)}while(si);return h}function R1(){var e=D.H,n=e.useState()[0];return n=typeof n.then=="function"?rr(n):n,e=e.useState()[0],(it!==null?it.memoizedState:null)!==e&&(Me.flags|=1024),n}function Ps(){var e=Du!==0;return Du=0,e}function Js(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Ws(e){if(Ru){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Ru=!1}ml=0,Tt=it=Me=null,si=!1,ir=Du=0,ci=null}function Zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?Me.memoizedState=Tt=e:Tt=Tt.next=e,Tt}function kt(){if(it===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=it.next;var n=Tt===null?Me.memoizedState:Tt.next;if(n!==null)Tt=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},Tt===null?Me.memoizedState=Tt=e:Tt=Tt.next=e}return Tt}function Ou(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function rr(e){var n=ir;return ir+=1,ci===null&&(ci=[]),e=Wh(ci,e,n),n=Me,(Tt===null?n.memoizedState:Tt.next)===null&&(n=n.alternate,D.H=n===null||n.memoizedState===null?Vm:fc),e}function Mu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return rr(e);if(e.$$typeof===R)return qt(e)}throw Error(r(438,String(e)))}function ec(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=Ou(),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]=U;return n.index++,a}function pl(e,n){return typeof n=="function"?n(e):n}function Lu(e){var n=kt();return tc(n,it,e)}function tc(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 E=x=null,L=null,V=n,ne=!1;do{var re=V.lane&-536870913;if(re!==V.lane?(Fe&re)===re:(ml&re)===re){var $=V.revertLane;if($===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),re===ai&&(ne=!0);else if((ml&$)===$){V=V.next,$===ai&&(ne=!0);continue}else re={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},L===null?(E=L=re,x=h):L=L.next=re,Me.lanes|=$,Ql|=$;re=V.action,Oa&&a(h,re),h=V.hasEagerState?V.eagerState:a(h,re)}else $={lane:re,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},L===null?(E=L=$,x=h):L=L.next=$,Me.lanes|=re,Ql|=re;V=V.next}while(V!==null&&V!==n);if(L===null?x=h:L.next=E,!fn(h,e.memoizedState)&&(jt=!0,ne&&(a=ii,a!==null)))throw a;e.memoizedState=h,e.baseState=x,e.baseQueue=L,u.lastRenderedState=h}return f===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function nc(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)||(jt=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),a.lastRenderedState=h}return[h,u]}function cm(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,jt=!0),f=f.queue,ic(hm.bind(null,u,f,e),[e]),f.getSnapshot!==n||x||Tt!==null&&Tt.memoizedState.tag&1){if(u.flags|=2048,fi(9,{destroy:void 0},dm.bind(null,u,f,a,n),null),ot===null)throw Error(r(349));h||(ml&127)!==0||fm(u,n,a)}return a}function fm(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=Me.updateQueue,n===null?(n=Ou(),Me.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function dm(e,n,a,u){n.value=a,n.getSnapshot=u,mm(n)&&pm(e)}function hm(e,n,a){return a(function(){mm(n)&&pm(e)})}function mm(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!fn(e,a)}catch{return!0}}function pm(e){var n=Ca(e,2);n!==null&&an(n,e,2)}function lc(e){var n=Zt();if(typeof e=="function"){var a=e;if(e=a(),Oa){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 gm(e,n,a,u){return e.baseState=a,tc(e,it,typeof u=="function"?u:pl)}function D1(e,n,a,u,f){if(Hu(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)}};D.T!==null?a(!0):h.isTransition=!1,u(h),a=n.pending,a===null?(h.next=n.pending=h,ym(n,h)):(h.next=a.next,n.pending=a.next=h)}}function ym(e,n){var a=n.action,u=n.payload,f=e.state;if(n.isTransition){var h=D.T,x={};D.T=x;try{var E=a(f,u),L=D.S;L!==null&&L(x,E),vm(e,n,E)}catch(V){ac(e,n,V)}finally{h!==null&&x.types!==null&&(h.types=x.types),D.T=h}}else try{h=a(f,u),vm(e,n,h)}catch(V){ac(e,n,V)}}function vm(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(u){bm(e,n,u)},function(u){return ac(e,n,u)}):bm(e,n,a)}function bm(e,n,a){n.status="fulfilled",n.value=a,xm(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,ym(e,a)))}function ac(e,n,a){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=a,xm(n),n=n.next;while(n!==u)}e.action=null}function xm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Sm(e,n){return n}function Em(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=zn(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){ft=zn(f.nextSibling),u=f.data==="F!";break e}}Bl(u)}u=!1}u&&(n=a[0])}}return a=Zt(),a.memoizedState=a.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sm,lastRenderedState:n},a.queue=u,a=Ym.bind(null,Me,u),u.dispatch=a,u=lc(!1),h=cc.bind(null,Me,!1,u.queue),u=Zt(),f={state:n,dispatch:null,action:e,pending:null},u.queue=f,a=D1.bind(null,Me,f,h,a),f.dispatch=a,u.memoizedState=e,[n,a,!1]}function wm(e){var n=kt();return km(n,it,e)}function km(e,n,a){if(n=tc(e,n,Sm)[0],e=Lu(pl)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=rr(n)}catch(x){throw x===ri?Tu:x}else u=n;n=kt();var f=n.queue,h=f.dispatch;return a!==n.memoizedState&&(Me.flags|=2048,fi(9,{destroy:void 0},O1.bind(null,f,a),null)),[u,h,e]}function O1(e,n){e.action=n}function Cm(e){var n=kt(),a=it;if(a!==null)return km(n,a,e);kt(),n=n.memoizedState,a=kt();var u=a.queue.dispatch;return a.memoizedState=e,[n,u,!1]}function fi(e,n,a,u){return e={tag:e,create:a,deps:u,inst:n,next:null},n=Me.updateQueue,n===null&&(n=Ou(),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 Tm(){return kt().memoizedState}function Uu(e,n,a,u){var f=Zt();Me.flags|=e,f.memoizedState=fi(1|n,{destroy:void 0},a,u===void 0?null:u)}function Bu(e,n,a,u){var f=kt();u=u===void 0?null:u;var h=f.memoizedState.inst;it!==null&&u!==null&&Zs(u,it.memoizedState.deps)?f.memoizedState=fi(n,h,a,u):(Me.flags|=e,f.memoizedState=fi(1|n,h,a,u))}function jm(e,n){Uu(8390656,8,e,n)}function ic(e,n){Bu(2048,8,e,n)}function M1(e){Me.flags|=4;var n=Me.updateQueue;if(n===null)n=Ou(),Me.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function Am(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 _m(e,n){return Bu(4,2,e,n)}function zm(e,n){return Bu(4,4,e,n)}function Nm(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 Rm(e,n,a){a=a!=null?a.concat([e]):null,Bu(4,4,Nm.bind(null,n,e),a)}function rc(){}function Dm(e,n){var a=kt();n=n===void 0?null:n;var u=a.memoizedState;return n!==null&&Zs(n,u[1])?u[0]:(a.memoizedState=[e,n],e)}function Om(e,n){var a=kt();n=n===void 0?null:n;var u=a.memoizedState;if(n!==null&&Zs(n,u[1]))return u[0];if(u=e(),Oa){Ut(!0);try{e()}finally{Ut(!1)}}return a.memoizedState=[u,n],u}function uc(e,n,a){return a===void 0||(ml&1073741824)!==0&&(Fe&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=Mp(),Me.lanes|=e,Ql|=e,a)}function Mm(e,n,a,u){return fn(a,n)?a:oi.current!==null?(e=uc(e,a,u),fn(e,n)||(jt=!0),e):(ml&42)===0||(ml&1073741824)!==0&&(Fe&261930)===0?(jt=!0,e.memoizedState=a):(e=Mp(),Me.lanes|=e,Ql|=e,n)}function Lm(e,n,a,u,f){var h=ee.p;ee.p=h!==0&&8>h?h:8;var x=D.T,E={};D.T=E,cc(e,!1,n,a);try{var L=f(),V=D.S;if(V!==null&&V(E,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var ne=z1(L,u);ur(e,n,ne,yn(e))}else ur(e,n,u,yn(e))}catch(re){ur(e,n,{then:function(){},status:"rejected",reason:re},yn())}finally{ee.p=h,x!==null&&E.types!==null&&(x.types=E.types),D.T=x}}function L1(){}function oc(e,n,a,u){if(e.tag!==5)throw Error(r(476));var f=Um(e).queue;Lm(e,f,n,se,a===null?L1:function(){return Bm(e),a(u)})}function Um(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:se},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 Bm(e){var n=Um(e);n.next===null&&(n=e.alternate.memoizedState),ur(e,n.next.queue,{},yn())}function sc(){return qt(kr)}function Hm(){return kt().memoizedState}function qm(){return kt().memoizedState}function U1(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=yn();e=Yl(a);var u=Fl(n,e,a);u!==null&&(an(u,n,a),nr(u,n,a)),n={cache:Bs()},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},Hu(e)?Fm(n,a):(a=js(e,n,a,u),a!==null&&(an(a,e,u),Gm(a,n,u)))}function Ym(e,n,a){var u=yn();ur(e,n,a,u)}function ur(e,n,a,u){var f={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Hu(e))Fm(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,E=h(x,a);if(f.hasEagerState=!0,f.eagerState=E,fn(E,x))return bu(e,n,f,0),ot===null&&vu(),!1}catch{}if(a=js(e,n,f,u),a!==null)return an(a,e,u),Gm(a,n,u),!0}return!1}function cc(e,n,a,u){if(u={lane:2,revertLane:Fc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Hu(e)){if(n)throw Error(r(479))}else n=js(e,a,u,2),n!==null&&an(n,e,2)}function Hu(e){var n=e.alternate;return e===Me||n!==null&&n===Me}function Fm(e,n){si=Ru=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function Gm(e,n,a){if((a&4194048)!==0){var u=n.lanes;u&=e.pendingLanes,a|=u,n.lanes=a,M(e,a)}}var or={readContext:qt,use:Mu,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};or.useEffectEvent=xt;var Vm={readContext:qt,use:Mu,useCallback:function(e,n){return Zt().memoizedState=[e,n===void 0?null:n],e},useContext:qt,useEffect:jm,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,Uu(4194308,4,Nm.bind(null,n,e),a)},useLayoutEffect:function(e,n){return Uu(4194308,4,e,n)},useInsertionEffect:function(e,n){Uu(4,2,e,n)},useMemo:function(e,n){var a=Zt();n=n===void 0?null:n;var u=e();if(Oa){Ut(!0);try{e()}finally{Ut(!1)}}return a.memoizedState=[u,n],u},useReducer:function(e,n,a){var u=Zt();if(a!==void 0){var f=a(n);if(Oa){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=Zt();return e={current:e},n.memoizedState=e},useState:function(e){e=lc(e);var n=e.queue,a=Ym.bind(null,Me,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:rc,useDeferredValue:function(e,n){var a=Zt();return uc(a,e,n)},useTransition:function(){var e=lc(!1);return e=Lm.bind(null,Me,e.queue,!0,!1),Zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var u=Me,f=Zt();if($e){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),ot===null)throw Error(r(349));(Fe&127)!==0||fm(u,n,a)}f.memoizedState=a;var h={value:a,getSnapshot:n};return f.queue=h,jm(hm.bind(null,u,h,e),[e]),u.flags|=2048,fi(9,{destroy:void 0},dm.bind(null,u,h,a,n),null),a},useId:function(){var e=Zt(),n=ot.identifierPrefix;if($e){var a=$n,u=Qn;a=(u&~(1<<32-tt(u)-1)).toString(32)+a,n="_"+n+"R_"+a,a=Du++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=N1++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:sc,useFormState:Em,useActionState:Em,useOptimistic:function(e){var n=Zt();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=cc.bind(null,Me,!0,a),a.dispatch=n,[e,n]},useMemoCache:ec,useCacheRefresh:function(){return Zt().memoizedState=U1.bind(null,Me)},useEffectEvent:function(e){var n=Zt(),a={impl:e};return n.memoizedState=a,function(){if((et&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},fc={readContext:qt,use:Mu,useCallback:Dm,useContext:qt,useEffect:ic,useImperativeHandle:Rm,useInsertionEffect:_m,useLayoutEffect:zm,useMemo:Om,useReducer:Lu,useRef:Tm,useState:function(){return Lu(pl)},useDebugValue:rc,useDeferredValue:function(e,n){var a=kt();return Mm(a,it.memoizedState,e,n)},useTransition:function(){var e=Lu(pl)[0],n=kt().memoizedState;return[typeof e=="boolean"?e:rr(e),n]},useSyncExternalStore:cm,useId:Hm,useHostTransitionStatus:sc,useFormState:wm,useActionState:wm,useOptimistic:function(e,n){var a=kt();return gm(a,it,e,n)},useMemoCache:ec,useCacheRefresh:qm};fc.useEffectEvent=Am;var Im={readContext:qt,use:Mu,useCallback:Dm,useContext:qt,useEffect:ic,useImperativeHandle:Rm,useInsertionEffect:_m,useLayoutEffect:zm,useMemo:Om,useReducer:nc,useRef:Tm,useState:function(){return nc(pl)},useDebugValue:rc,useDeferredValue:function(e,n){var a=kt();return it===null?uc(a,e,n):Mm(a,it.memoizedState,e,n)},useTransition:function(){var e=nc(pl)[0],n=kt().memoizedState;return[typeof e=="boolean"?e:rr(e),n]},useSyncExternalStore:cm,useId:Hm,useHostTransitionStatus:sc,useFormState:Cm,useActionState:Cm,useOptimistic:function(e,n){var a=kt();return it!==null?gm(a,it,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:ec,useCacheRefresh:qm};Im.useEffectEvent=Am;function dc(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 hc={enqueueSetState:function(e,n,a){e=e._reactInternals;var u=yn(),f=Yl(u);f.payload=n,a!=null&&(f.callback=a),n=Fl(e,f,u),n!==null&&(an(n,e,u),nr(n,e,u))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var u=yn(),f=Yl(u);f.tag=1,f.payload=n,a!=null&&(f.callback=a),n=Fl(e,f,u),n!==null&&(an(n,e,u),nr(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=yn(),u=Yl(a);u.tag=2,n!=null&&(u.callback=n),n=Fl(e,u,a),n!==null&&(an(n,e,a),nr(n,e,a))}};function Xm(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?!$i(a,u)||!$i(f,h):!0}function Qm(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&&hc.enqueueReplaceState(n,n.state,null)}function Ma(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 $m(e){yu(e)}function Zm(e){console.error(e)}function Km(e){yu(e)}function qu(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function Pm(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 mc(e,n,a){return a=Yl(a),a.tag=3,a.payload={element:null},a.callback=function(){qu(e,n)},a}function Jm(e){return e=Yl(e),e.tag=3,e}function Wm(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(){Pm(n,a,u)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Pm(n,a,u),typeof f!="function"&&($l===null?$l=new Set([this]):$l.add(this));var E=u.stack;this.componentDidCatch(u.value,{componentStack:E!==null?E:""})})}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&&li(n,a,f,!0),a=hn.current,a!==null){switch(a.tag){case 31:case 13:return _n===null?Ju():a.alternate===null&&St===0&&(St=3),a.flags&=-257,a.flags|=65536,a.lanes=f,u===ju?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([u]):n.add(u),Hc(e,u,f)),!1;case 22:return a.flags|=65536,u===ju?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)),Hc(e,u,f)),!1}throw Error(r(435,a.tag))}return Hc(e,u,f),Ju(),!1}if($e)return n=hn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,u!==Ds&&(e=Error(r(422),{cause:u}),Pi(Cn(e,a)))):(u!==Ds&&(n=Error(r(423),{cause:u}),Pi(Cn(n,a))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,u=Cn(u,a),f=mc(e.stateNode,u,f),Vs(e,f),St!==4&&(St=2)),!1;var h=Error(r(520),{cause:u});if(h=Cn(h,a),gr===null?gr=[h]:gr.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=mc(a.stateNode,u,e),Vs(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"&&($l===null||!$l.has(h))))return a.flags|=65536,f&=-f,a.lanes|=f,f=Jm(f),Wm(f,e,a,u),Vs(a,f),!1}a=a.return}while(a!==null);return!1}var pc=Error(r(461)),jt=!1;function Yt(e,n,a,u){n.child=e===null?lm(n,null,a,u):Da(n,e.child,a,u)}function ep(e,n,a,u,f){a=a.render;var h=n.ref;if("ref"in u){var x={};for(var E in u)E!=="ref"&&(x[E]=u[E])}else x=u;return _a(n),u=Ks(e,n,a,x,h,f),E=Ps(),e!==null&&!jt?(Js(e,n,f),gl(e,n,f)):($e&&E&&Ns(n),n.flags|=1,Yt(e,n,u,f),n.child)}function tp(e,n,a,u,f){if(e===null){var h=a.type;return typeof h=="function"&&!As(h)&&h.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=h,np(e,n,h,u,f)):(e=Su(a.type,null,u,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,!wc(e,f)){var x=h.memoizedProps;if(a=a.compare,a=a!==null?a:$i,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 np(e,n,a,u,f){if(e!==null){var h=e.memoizedProps;if($i(h,u)&&e.ref===n.ref)if(jt=!1,n.pendingProps=u=h,wc(e,f))(e.flags&131072)!==0&&(jt=!0);else return n.lanes=e.lanes,gl(e,n,f)}return gc(e,n,a,u,f)}function lp(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 ap(e,n,h,a,u)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Cu(n,h!==null?h.cachePool:null),h!==null?rm(n,h):Xs(),um(n);else return u=n.lanes=536870912,ap(e,n,h!==null?h.baseLanes|a:a,a,u)}else h!==null?(Cu(n,h.cachePool),rm(n,h),Vl(),n.memoizedState=null):(e!==null&&Cu(n,null),Xs(),Vl());return Yt(e,n,f,a),n.child}function sr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function ap(e,n,a,u,f){var h=qs();return h=h===null?null:{parent:Ct._currentValue,pool:h},n.memoizedState={baseLanes:a,cachePool:h},e!==null&&Cu(n,null),Xs(),um(n),e!==null&&li(e,n,u,!0),n.childLanes=f,null}function Yu(e,n){return n=Gu({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function ip(e,n,a){return Da(n,e.child,null,a),e=Yu(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=Yu(n,u),n.lanes=536870912,sr(null,e);if($s(n),(e=ft)?(e=yg(e,An),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ll!==null?{id:Qn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},a=Fh(e),a.return=n,n.child=a,Ht=n,ft=null)):e=null,e===null)throw Bl(n);return n.lanes=536870912,null}return Yu(n,u)}var h=e.memoizedState;if(h!==null){var x=h.dehydrated;if($s(n),f)if(n.flags&256)n.flags&=-257,n=ip(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(jt||li(e,n,a,!1),f=(a&e.childLanes)!==0,jt||f){if(u=ot,u!==null&&(x=Y(u,a),x!==0&&x!==h.retryLane))throw h.retryLane=x,Ca(e,x),an(u,e,x),pc;Ju(),n=ip(e,n,a)}else e=h.treeContext,ft=zn(x.nextSibling),Ht=n,$e=!0,Ul=null,An=!1,e!==null&&Ih(n,e),n=Yu(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 Fu(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 gc(e,n,a,u,f){return _a(n),a=Ks(e,n,a,u,void 0,f),u=Ps(),e!==null&&!jt?(Js(e,n,f),gl(e,n,f)):($e&&u&&Ns(n),n.flags|=1,Yt(e,n,a,f),n.child)}function rp(e,n,a,u,f,h){return _a(n),n.updateQueue=null,a=sm(n,u,a,f),om(e),u=Ps(),e!==null&&!jt?(Js(e,n,h),gl(e,n,h)):($e&&u&&Ns(n),n.flags|=1,Yt(e,n,a,h),n.child)}function up(e,n,a,u,f){if(_a(n),n.stateNode===null){var h=Wa,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=hc,n.stateNode=h,h._reactInternals=n,h=n.stateNode,h.props=u,h.state=n.memoizedState,h.refs={},Fs(n),x=a.contextType,h.context=typeof x=="object"&&x!==null?qt(x):Wa,h.state=n.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(dc(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&&hc.enqueueReplaceState(h,h.state,null),ar(n,u,h,f),lr(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(e===null){h=n.stateNode;var E=n.memoizedProps,L=Ma(a,E);h.props=L;var V=h.context,ne=a.contextType;x=Wa,typeof ne=="object"&&ne!==null&&(x=qt(ne));var re=a.getDerivedStateFromProps;ne=typeof re=="function"||typeof h.getSnapshotBeforeUpdate=="function",E=n.pendingProps!==E,ne||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(E||V!==x)&&Qm(n,h,u,x),ql=!1;var $=n.memoizedState;h.state=$,ar(n,u,h,f),lr(),V=n.memoizedState,E||$!==V||ql?(typeof re=="function"&&(dc(n,a,re,u),V=n.memoizedState),(L=ql||Xm(n,a,L,u,$,V,x))?(ne||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=V),h.props=u,h.state=V,h.context=x,u=L):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{h=n.stateNode,Gs(e,n),x=n.memoizedProps,ne=Ma(a,x),h.props=ne,re=n.pendingProps,$=h.context,V=a.contextType,L=Wa,typeof V=="object"&&V!==null&&(L=qt(V)),E=a.getDerivedStateFromProps,(V=typeof E=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(x!==re||$!==L)&&Qm(n,h,u,L),ql=!1,$=n.memoizedState,h.state=$,ar(n,u,h,f),lr();var J=n.memoizedState;x!==re||$!==J||ql||e!==null&&e.dependencies!==null&&wu(e.dependencies)?(typeof E=="function"&&(dc(n,a,E,u),J=n.memoizedState),(ne=ql||Xm(n,a,ne,u,$,J,L)||e!==null&&e.dependencies!==null&&wu(e.dependencies))?(V||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(u,J,L),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(u,J,L)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||x===e.memoizedProps&&$===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&$===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=J),h.props=u,h.state=J,h.context=L,u=ne):(typeof h.componentDidUpdate!="function"||x===e.memoizedProps&&$===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&$===e.memoizedState||(n.flags|=1024),u=!1)}return h=u,Fu(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=Da(n,e.child,null,f),n.child=Da(n,null,a,f)):Yt(e,n,a,f),n.memoizedState=h.state,e=n.child):e=gl(e,n,f),e}function op(e,n,a,u){return ja(),n.flags|=256,Yt(e,n,a,u),n.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:Ph()}}function bc(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=gn),e}function sp(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?Gl(n):Vl(),(e=ft)?(e=yg(e,An),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ll!==null?{id:Qn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},a=Fh(e),a.return=n,n.child=a,Ht=n,ft=null)):e=null,e===null)throw Bl(n);return tf(e)?n.lanes=32:n.lanes=536870912,null}var E=u.children;return u=u.fallback,f?(Vl(),f=n.mode,E=Gu({mode:"hidden",children:E},f),u=Ta(u,f,a,null),E.return=n,u.return=n,E.sibling=u,n.child=E,u=n.child,u.memoizedState=vc(a),u.childLanes=bc(e,x,a),n.memoizedState=yc,sr(null,u)):(Gl(n),xc(n,E))}var L=e.memoizedState;if(L!==null&&(E=L.dehydrated,E!==null)){if(h)n.flags&256?(Gl(n),n.flags&=-257,n=Sc(e,n,a)):n.memoizedState!==null?(Vl(),n.child=e.child,n.flags|=128,n=null):(Vl(),E=u.fallback,f=n.mode,u=Gu({mode:"visible",children:u.children},f),E=Ta(E,f,a,null),E.flags|=2,u.return=n,E.return=n,u.sibling=E,n.child=u,Da(n,e.child,null,a),u=n.child,u.memoizedState=vc(a),u.childLanes=bc(e,x,a),n.memoizedState=yc,n=sr(null,u));else if(Gl(n),tf(E)){if(x=E.nextSibling&&E.nextSibling.dataset,x)var V=x.dgst;x=V,u=Error(r(419)),u.stack="",u.digest=x,Pi({value:u,source:null,stack:null}),n=Sc(e,n,a)}else if(jt||li(e,n,a,!1),x=(a&e.childLanes)!==0,jt||x){if(x=ot,x!==null&&(u=Y(x,a),u!==0&&u!==L.retryLane))throw L.retryLane=u,Ca(e,u),an(x,e,u),pc;ef(E)||Ju(),n=Sc(e,n,a)}else ef(E)?(n.flags|=192,n.child=e.child,n=null):(e=L.treeContext,ft=zn(E.nextSibling),Ht=n,$e=!0,Ul=null,An=!1,e!==null&&Ih(n,e),n=xc(n,u.children),n.flags|=4096);return n}return f?(Vl(),E=u.fallback,f=n.mode,L=e.child,V=L.sibling,u=cl(L,{mode:"hidden",children:u.children}),u.subtreeFlags=L.subtreeFlags&65011712,V!==null?E=cl(V,E):(E=Ta(E,f,a,null),E.flags|=2),E.return=n,u.return=n,u.sibling=E,n.child=u,sr(null,u),u=n.child,E=e.child.memoizedState,E===null?E=vc(a):(f=E.cachePool,f!==null?(L=Ct._currentValue,f=f.parent!==L?{parent:L,pool:L}:f):f=Ph(),E={baseLanes:E.baseLanes|a,cachePool:f}),u.memoizedState=E,u.childLanes=bc(e,x,a),n.memoizedState=yc,sr(e.child,u)):(Gl(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 xc(e,n){return n=Gu({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Gu(e,n){return e=dn(22,e,null,n),e.lanes=0,e}function Sc(e,n,a){return Da(n,e.child,null,a),e=xc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function cp(e,n,a){e.lanes|=n;var u=e.alternate;u!==null&&(u.lanes|=n),Ls(e.return,n,a)}function Ec(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 fp(e,n,a){var u=n.pendingProps,f=u.revealOrder,h=u.tail;u=u.children;var x=wt.current,E=(x&2)!==0;if(E?(x=x&1|2,n.flags|=128):x&=1,C(wt,x),Yt(e,n,u,a),u=$e?Ki:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cp(e,a,n);else if(e.tag===19)cp(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&&Nu(e)===null&&(f=a),a=a.sibling;a=f,a===null?(f=n.child,n.child=null):(f=a.sibling,a.sibling=null),Ec(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&&Nu(e)===null){n.child=f;break}e=f.sibling,f.sibling=a,a=f,f=e}Ec(n,!0,a,null,h,u);break;case"together":Ec(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),Ql|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(li(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 wc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&wu(e)))}function Y1(e,n,a){switch(n.tag){case 3:pe(n,n.stateNode.containerInfo),Hl(n,Ct,e.memoizedState.cache),ja();break;case 27:case 5:Nt(n);break;case 4:pe(n,n.stateNode.containerInfo);break;case 10:Hl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,$s(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(Gl(n),n.flags|=128,null):(a&n.child.childLanes)!==0?sp(e,n,a):(Gl(n),e=gl(e,n,a),e!==null?e.sibling:null);Gl(n);break;case 19:var f=(e.flags&128)!==0;if(u=(a&n.childLanes)!==0,u||(li(e,n,a,!1),u=(a&n.childLanes)!==0),f){if(u)return fp(e,n,a);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),C(wt,wt.current),u)break;return null;case 22:return n.lanes=0,lp(e,n,a,n.pendingProps);case 24:Hl(n,Ct,e.memoizedState.cache)}return gl(e,n,a)}function dp(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)jt=!0;else{if(!wc(e,a)&&(n.flags&128)===0)return jt=!1,Y1(e,n,a);jt=(e.flags&131072)!==0}else jt=!1,$e&&(n.flags&1048576)!==0&&Vh(n,Ki,n.index);switch(n.lanes=0,n.tag){case 16:e:{var u=n.pendingProps;if(e=Na(n.elementType),n.type=e,typeof e=="function")As(e)?(u=Ma(e,u),n.tag=1,n=up(null,n,e,u,a)):(n.tag=0,n=gc(null,n,e,u,a));else{if(e!=null){var f=e.$$typeof;if(f===P){n.tag=11,n=ep(null,n,e,u,a);break e}else if(f===_){n.tag=14,n=tp(null,n,e,u,a);break e}}throw n=te(e)||e,Error(r(306,n,""))}}return n;case 0:return gc(e,n,n.type,n.pendingProps,a);case 1:return u=n.type,f=Ma(u,n.pendingProps),up(e,n,u,f,a);case 3:e:{if(pe(n,n.stateNode.containerInfo),e===null)throw Error(r(387));u=n.pendingProps;var h=n.memoizedState;f=h.element,Gs(e,n),ar(n,u,null,a);var x=n.memoizedState;if(u=x.cache,Hl(n,Ct,u),u!==h.cache&&Us(n,[Ct],a,!0),lr(),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=op(e,n,u,a);break e}else if(u!==f){f=Cn(Error(r(424)),n),Pi(f),n=op(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=zn(e.firstChild),Ht=n,$e=!0,Ul=null,An=!0,a=lm(n,null,u,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ja(),u===f){n=gl(e,n,a);break e}Yt(e,n,u,a)}n=n.child}return n;case 26:return Fu(e,n),e===null?(a=wg(n.type,null,n.pendingProps,null))?n.memoizedState=a:$e||(a=n.type,e=n.pendingProps,u=io(xe.current).createElement(a),u[me]=n,u[ye]=e,Ft(u,a,e),ht(u),n.stateNode=u):n.memoizedState=wg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Nt(n),e===null&&$e&&(u=n.stateNode=xg(n.type,n.pendingProps,xe.current),Ht=n,An=!0,f=ft,Jl(n.type)?(nf=f,ft=zn(u.firstChild)):ft=f),Yt(e,n,n.pendingProps.children,a),Fu(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=zn(u.firstChild),An=!1,f=!0):f=!1),f||Bl(n)),Nt(n),f=n.type,h=n.pendingProps,x=e!==null?e.memoizedProps:null,u=h.children,Pc(f,h)?u=null:x!==null&&Pc(f,x)&&(n.flags|=32),n.memoizedState!==null&&(f=Ks(e,n,R1,null,null,a),kr._currentValue=f),Fu(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||Bl(n)),null;case 13:return sp(e,n,a);case 4:return pe(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=Da(n,null,u,a):Yt(e,n,u,a),n.child;case 11:return ep(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,Hl(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 tp(e,n,n.type,n.pendingProps,a);case 15:return np(e,n,n.type,n.pendingProps,a);case 19:return fp(e,n,a);case 31:return q1(e,n,a);case 22:return lp(e,n,a,n.pendingProps);case 24:return _a(n),u=qt(Ct),e===null?(f=qs(),f===null&&(f=ot,h=Bs(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=a),f=h),n.memoizedState={parent:u,cache:f},Fs(n),Hl(n,Ct,f)):((e.lanes&a)!==0&&(Gs(e,n),ar(n,null,null,a),lr()),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),Hl(n,Ct,u)):(u=h.cache,Hl(n,Ct,u),u!==f.cache&&Us(n,[Ct],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 kc(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(Hp())e.flags|=8192;else throw Ra=ju,Ys}else e.flags&=-16777217}function hp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ag(n))if(Hp())e.flags|=8192;else throw Ra=ju,Ys}function Vu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?va():536870912,e.lanes|=n,pi|=n)}function cr(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 F1(e,n,a){var u=n.pendingProps;switch(Rs(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(Ct),ze(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(ni(n)?yl(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Os())),dt(n),null;case 26:var f=n.type,h=n.memoizedState;return e===null?(yl(n),h!==null?(dt(n),hp(n,h)):(dt(n),kc(n,f,null,u,a))):h?h!==e.memoizedState?(yl(n),dt(n),hp(n,h)):(dt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==u&&yl(n),dt(n),kc(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=ue.current,ni(n)?Xh(n):(e=xg(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=ue.current,ni(n))Xh(n);else{var x=io(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[ye]=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(Ft(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),kc(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,ni(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||sg(e.nodeValue,a)),e||Bl(n,!0)}else e=io(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=ni(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 ja(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),e=!1}else a=Os(),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=ni(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 ja(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),f=!1}else f=Os(),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),Vu(n,n.updateQueue),dt(n),null);case 4:return ze(),e===null&&Xc(n.stateNode.containerInfo),dt(n),null;case 10:return hl(n.type),dt(n),null;case 19:if(F(wt),u=n.memoizedState,u===null)return dt(n),null;if(f=(n.flags&128)!==0,h=u.rendering,h===null)if(f)cr(u,!1);else{if(St!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=Nu(e),h!==null){for(n.flags|=128,cr(u,!1),e=h.updateQueue,n.updateQueue=e,Vu(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Yh(a,e),a=a.sibling;return C(wt,wt.current&1|2),$e&&fl(n,u.treeForkCount),n.child}e=e.sibling}u.tail!==null&&pt()>Zu&&(n.flags|=128,f=!0,cr(u,!1),n.lanes=4194304)}else{if(!f)if(e=Nu(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,Vu(n,e),cr(u,!0),u.tail===null&&u.tailMode==="hidden"&&!h.alternate&&!$e)return dt(n),null}else 2*pt()-u.renderingStartTime>Zu&&a!==536870912&&(n.flags|=128,f=!0,cr(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,C(wt,f?a&1|2:a&1),$e&&fl(n,u.treeForkCount),e):(dt(n),null);case 22:case 23:return mn(n),Qs(),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&&Vu(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&&F(za),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),hl(Ct),dt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function G1(e,n){switch(Rs(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return hl(Ct),ze(),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));ja()}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));ja()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return F(wt),null;case 4:return ze(),null;case 10:return hl(n.type),null;case 22:case 23:return mn(n),Qs(),e!==null&&F(za),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return hl(Ct),null;case 25:return null;default:return null}}function mp(e,n){switch(Rs(n),n.tag){case 3:hl(Ct),ze();break;case 26:case 27:case 5:Ln(n);break;case 4:ze();break;case 31:n.memoizedState!==null&&mn(n);break;case 13:mn(n);break;case 19:F(wt);break;case 10:hl(n.type);break;case 22:case 23:mn(n),Qs(),e!==null&&F(za);break;case 24:hl(Ct)}}function fr(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(E){at(n,n.return,E)}}function Il(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,E=x.destroy;if(E!==void 0){x.destroy=void 0,f=n;var L=a,V=E;try{V()}catch(ne){at(f,L,ne)}}}u=u.next}while(u!==h)}}catch(ne){at(n,n.return,ne)}}function pp(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{im(n,a)}catch(u){at(e,e.return,u)}}}function gp(e,n,a){a.props=Ma(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(u){at(e,n,u)}}function dr(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 yp(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 Cc(e,n,a){try{var u=e.stateNode;fx(u,e.type,a,n),u[ye]=n}catch(f){at(e,e.return,f)}}function vp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Jl(e.type)||e.tag===4}function Tc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vp(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&&Jl(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 jc(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&&Jl(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(jc(e,n,a),e=e.sibling;e!==null;)jc(e,n,a),e=e.sibling}function Iu(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&&Jl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Iu(e,n,a),e=e.sibling;e!==null;)Iu(e,n,a),e=e.sibling}function bp(e){var n=e.stateNode,a=e.memoizedProps;try{for(var u=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Ft(n,u,a),n[me]=e,n[ye]=a}catch(h){at(e,e.return,h)}}var vl=!1,At=!1,Ac=!1,xp=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function V1(e,n){if(e=e.containerInfo,Zc=ho,e=Rh(e),Ss(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,E=-1,L=-1,V=0,ne=0,re=e,$=null;t:for(;;){for(var J;re!==a||f!==0&&re.nodeType!==3||(E=x+f),re!==h||u!==0&&re.nodeType!==3||(L=x+u),re.nodeType===3&&(x+=re.nodeValue.length),(J=re.firstChild)!==null;)$=re,re=J;for(;;){if(re===e)break t;if($===a&&++V===f&&(E=x),$===h&&++ne===u&&(L=x),(J=re.nextSibling)!==null)break;re=$,$=re.parentNode}re=J}a=E===-1||L===-1?null:{start:E,end:L}}else a=null}a=a||{start:0,end:0}}else a=null;for(Kc={focusedElem:e,selectionRange:a},ho=!1,Mt=n;Mt!==null;)if(n=Mt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Mt=e;else for(;Mt!==null;){switch(n=Mt,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=Ma(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)Wc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Wc(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,Mt=e;break}Mt=n.return}}function Sp(e,n,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:xl(e,a),u&4&&fr(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=Ma(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(x){at(a,a.return,x)}}u&64&&pp(a),u&512&&dr(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{im(e,n)}catch(x){at(a,a.return,x)}}break;case 27:n===null&&u&4&&bp(a);case 26:case 5:xl(e,a),n===null&&u&4&&yp(a),u&512&&dr(a,a.return);break;case 12:xl(e,a);break;case 31:xl(e,a),u&4&&kp(e,a);break;case 13:xl(e,a),u&4&&Cp(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||At,f=vl;var h=At;vl=u,(At=n)&&!h?Sl(e,a,(a.subtreeFlags&8772)!==0):xl(e,a),vl=f,At=h}break;case 30:break;default:xl(e,a)}}function Ep(e){var n=e.alternate;n!==null&&(e.alternate=null,Ep(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;)wp(e,n,a),a=a.sibling}function wp(e,n,a){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Lt,a)}catch{}switch(a.tag){case 26:At||Zn(a,n),bl(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:At||Zn(a,n);var u=mt,f=en;Jl(a.type)&&(mt=a.stateNode,en=!1),bl(e,n,a),Sr(a.stateNode),mt=u,en=f;break;case 5:At||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,pg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),wi(e)):pg(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:Il(2,a,n),At||Il(4,a,n),bl(e,n,a);break;case 1:At||(Zn(a,n),u=a.stateNode,typeof u.componentWillUnmount=="function"&&gp(a,n,u)),bl(e,n,a);break;case 21:bl(e,n,a);break;case 22:At=(u=At)||a.memoizedState!==null,bl(e,n,a),At=u;break;default:bl(e,n,a)}}function kp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wi(e)}catch(a){at(n,n.return,a)}}}function Cp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wi(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 xp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new xp),n;default:throw Error(r(435,e.tag))}}function Xu(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,E=x;e:for(;E!==null;){switch(E.tag){case 27:if(Jl(E.type)){mt=E.stateNode,en=!1;break e}break;case 5:mt=E.stateNode,en=!1;break e;case 3:case 4:mt=E.stateNode.containerInfo,en=!0;break e}E=E.return}if(mt===null)throw Error(r(160));wp(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;)Tp(n,e),n=n.sibling}var Gn=null;function Tp(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&&(Il(3,e,e.return),fr(3,e),Il(5,e,e.return));break;case 1:tn(n,e),nn(e),u&512&&(At||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=Gn;if(tn(n,e),nn(e),u&512&&(At||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"))),Ft(h,u,a),h[me]=e,ht(h),u=h;break e;case"link":var x=Tg("link","href",f).get(u+(a.href||""));if(x){for(var E=0;E<x.length;E++)if(h=x[E],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(E,1);break t}}h=f.createElement(u),Ft(h,u,a),f.head.appendChild(h);break;case"meta":if(x=Tg("meta","content",f).get(u+(a.content||""))){for(E=0;E<x.length;E++)if(h=x[E],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(E,1);break t}}h=f.createElement(u),Ft(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 jg(f,e.type,e.stateNode);else e.stateNode=Cg(f,u,e.memoizedProps);else h!==u?(h===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):h.count--,u===null?jg(f,e.type,e.stateNode):Cg(f,u,e.memoizedProps)):u===null&&e.stateNode!==null&&Cc(e,e.memoizedProps,a.memoizedProps)}break;case 27:tn(n,e),nn(e),u&512&&(At||a===null||Zn(a,a.return)),a!==null&&u&4&&Cc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(tn(n,e),nn(e),u&512&&(At||a===null||Zn(a,a.return)),e.flags&32){f=e.stateNode;try{Xa(f,"")}catch(Se){at(e,e.return,Se)}}u&4&&e.stateNode!=null&&(f=e.memoizedProps,Cc(e,f,a!==null?a.memoizedProps:f)),u&1024&&(Ac=!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(oo=null,f=Gn,Gn=ro(n.containerInfo),tn(n,e),Gn=f,nn(e),u&4&&a!==null&&a.memoizedState.isDehydrated)try{wi(n.containerInfo)}catch(Se){at(e,e.return,Se)}Ac&&(Ac=!1,jp(e));break;case 4:u=Gn,Gn=ro(e.stateNode.containerInfo),tn(n,e),nn(e),Gn=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,Xu(e,u)));break;case 13:tn(n,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&($u=pt()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Xu(e,u)));break;case 22:f=e.memoizedState!==null;var L=a!==null&&a.memoizedState!==null,V=vl,ne=At;if(vl=V||f,At=ne||L,tn(n,e),At=ne,vl=V,nn(e),u&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(a===null||L||vl||At||La(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){L=a=n;try{if(h=L.stateNode,f)x=h.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{E=L.stateNode;var re=L.memoizedProps.style,$=re!=null&&re.hasOwnProperty("display")?re.display:null;E.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(Se){at(L,L.return,Se)}}}else if(n.tag===6){if(a===null){L=n;try{L.stateNode.nodeValue=f?"":L.memoizedProps}catch(Se){at(L,L.return,Se)}}}else if(n.tag===18){if(a===null){L=n;try{var J=L.stateNode;f?gg(J,!0):gg(L.stateNode,!1)}catch(Se){at(L,L.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,Xu(e,a))));break;case 19:tn(n,e),nn(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Xu(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(vp(u)){a=u;break}u=u.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var f=a.stateNode,h=Tc(e);Iu(e,h,f);break;case 5:var x=a.stateNode;a.flags&32&&(Xa(x,""),a.flags&=-33);var E=Tc(e);Iu(e,E,x);break;case 3:case 4:var L=a.stateNode.containerInfo,V=Tc(e);jc(e,V,L);break;default:throw Error(r(161))}}catch(ne){at(e,e.return,ne)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function jp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;jp(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;)Sp(e,n.alternate,n),n=n.sibling}function La(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Il(4,n,n.return),La(n);break;case 1:Zn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&gp(n,n.return,a),La(n);break;case 27:Sr(n.stateNode);case 26:case 5:Zn(n,n.return),La(n);break;case 22:n.memoizedState===null&&La(n);break;case 30:La(n);break;default:La(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),fr(4,h);break;case 1:if(Sl(f,h,a),u=h,f=u.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(V){at(u,u.return,V)}if(u=h,f=u.updateQueue,f!==null){var E=u.stateNode;try{var L=f.shared.hiddenCallbacks;if(L!==null)for(f.shared.hiddenCallbacks=null,f=0;f<L.length;f++)am(L[f],E)}catch(V){at(u,u.return,V)}}a&&x&64&&pp(h),dr(h,h.return);break;case 27:bp(h);case 26:case 5:Sl(f,h,a),a&&u===null&&x&4&&yp(h),dr(h,h.return);break;case 12:Sl(f,h,a);break;case 31:Sl(f,h,a),a&&x&4&&kp(f,h);break;case 13:Sl(f,h,a),a&&x&4&&Cp(f,h);break;case 22:h.memoizedState===null&&Sl(f,h,a),dr(h,h.return);break;case 30:break;default:Sl(f,h,a)}n=n.sibling}}function _c(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&&Ji(a))}function zc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ji(e))}function Vn(e,n,a,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Ap(e,n,a,u),n=n.sibling}function Ap(e,n,a,u){var f=n.flags;switch(n.tag){case 0:case 11:case 15:Vn(e,n,a,u),f&2048&&fr(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&&Ji(e)));break;case 12:if(f&2048){Vn(e,n,a,u),e=n.stateNode;try{var h=n.memoizedProps,x=h.id,E=h.onPostCommit;typeof E=="function"&&E(x,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(L){at(n,n.return,L)}}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):hr(e,n):h._visibility&2?Vn(e,n,a,u):(h._visibility|=2,di(e,n,a,u,(n.subtreeFlags&10256)!==0||!1)),f&2048&&_c(x,n);break;case 24:Vn(e,n,a,u),f&2048&&zc(n.alternate,n);break;default:Vn(e,n,a,u)}}function di(e,n,a,u,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var h=e,x=n,E=a,L=u,V=x.flags;switch(x.tag){case 0:case 11:case 15:di(h,x,E,L,f),fr(8,x);break;case 23:break;case 22:var ne=x.stateNode;x.memoizedState!==null?ne._visibility&2?di(h,x,E,L,f):hr(h,x):(ne._visibility|=2,di(h,x,E,L,f)),f&&V&2048&&_c(x.alternate,x);break;case 24:di(h,x,E,L,f),f&&V&2048&&zc(x.alternate,x);break;default:di(h,x,E,L,f)}n=n.sibling}}function hr(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:hr(a,u),f&2048&&_c(u.alternate,u);break;case 24:hr(a,u),f&2048&&zc(u.alternate,u);break;default:hr(a,u)}n=n.sibling}}var mr=8192;function hi(e,n,a){if(e.subtreeFlags&mr)for(e=e.child;e!==null;)_p(e,n,a),e=e.sibling}function _p(e,n,a){switch(e.tag){case 26:hi(e,n,a),e.flags&mr&&e.memoizedState!==null&&Nx(a,Gn,e.memoizedState,e.memoizedProps);break;case 5:hi(e,n,a);break;case 3:case 4:var u=Gn;Gn=ro(e.stateNode.containerInfo),hi(e,n,a),Gn=u;break;case 22:e.memoizedState===null&&(u=e.alternate,u!==null&&u.memoizedState!==null?(u=mr,mr=16777216,hi(e,n,a),mr=u):hi(e,n,a));break;default:hi(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 pr(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];Mt=u,Rp(u,e)}zp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Np(e),e=e.sibling}function Np(e){switch(e.tag){case 0:case 11:case 15:pr(e),e.flags&2048&&Il(9,e,e.return);break;case 3:pr(e);break;case 12:pr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Qu(e)):pr(e);break;default:pr(e)}}function Qu(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];Mt=u,Rp(u,e)}zp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Il(8,n,n.return),Qu(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,Qu(n));break;default:Qu(n)}e=e.sibling}}function Rp(e,n){for(;Mt!==null;){var a=Mt;switch(a.tag){case 0:case 11:case 15:Il(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:Ji(a.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,Mt=u;else e:for(a=e;Mt!==null;){u=Mt;var f=u.sibling,h=u.return;if(Ep(u),u===a){Mt=null;break e}if(f!==null){f.return=h,Mt=f;break e}Mt=h}}}var X1={getCacheForType:function(e){var n=qt(Ct),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return qt(Ct).controller.signal}},Q1=typeof WeakMap=="function"?WeakMap:Map,et=0,ot=null,He=null,Fe=0,lt=0,pn=null,Xl=!1,mi=!1,Nc=!1,El=0,St=0,Ql=0,Ua=0,Rc=0,gn=0,pi=0,gr=null,ln=null,Dc=!1,$u=0,Dp=0,Zu=1/0,Ku=null,$l=null,Rt=0,Zl=null,gi=null,wl=0,Oc=0,Mc=null,Op=null,yr=0,Lc=null;function yn(){return(et&2)!==0&&Fe!==0?Fe&-Fe:D.T!==null?Fc():he()}function Mp(){if(gn===0)if((Fe&536870912)===0||$e){var e=pa;pa<<=1,(pa&3932160)===0&&(pa=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)&&(yi(e,0),Kl(e,Fe,gn,!1)),Ol(e,a),((et&2)===0||e!==ot)&&(e===ot&&((et&2)===0&&(Ua|=a),St===4&&Kl(e,Fe,gn,!1)),Kn(e))}function Lp(e,n,a){if((et&6)!==0)throw Error(r(327));var u=!a&&(n&127)===0&&(n&e.expiredLanes)===0||ya(e,n),f=u?K1(e,n):Bc(e,n,!0),h=u;do{if(f===0){mi&&!u&&Kl(e,n,0,!1);break}else{if(a=e.current.alternate,h&&!$1(a)){f=Bc(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 E=e;f=gr;var L=E.current.memoizedState.isDehydrated;if(L&&(yi(E,x).flags|=256),x=Bc(E,x,!1),x!==2){if(Nc&&!L){E.errorRecoveryDisabledLanes|=h,Ua|=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){yi(e,0),Kl(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:Kl(u,n,gn,!Xl);break e;case 2:ln=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=$u+300-pt(),10<f)){if(Kl(u,n,gn,!Xl),ga(u,0,!0)!==0)break e;wl=n,u.timeoutHandle=hg(Up.bind(null,u,a,ln,Ku,Dc,n,gn,Ua,pi,Xl,h,"Throttled",-0,0),f);break e}Up(u,a,ln,Ku,Dc,n,gn,Ua,pi,Xl,h,null,-0,0)}}break}while(!0);Kn(e)}function Up(e,n,a,u,f,h,x,E,L,V,ne,re,$,J){if(e.timeoutHandle=-1,re=n.subtreeFlags,re&8192||(re&16785408)===16785408){re={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ol},_p(n,h,re);var Se=(h&62914560)===h?$u-pt():(h&4194048)===h?Dp-pt():0;if(Se=Rx(re,Se),Se!==null){wl=h,e.cancelPendingCommit=Se(Ip.bind(null,e,n,h,a,u,f,x,E,L,ne,re,null,$,J)),Kl(e,h,x,!V);return}}Ip(e,n,h,a,u,f,x,E,L)}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 Kl(e,n,a,u){n&=~Rc,n&=~Ua,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&&uu(e,a,n)}function Pu(){return(et&6)===0?(vr(0),!1):!0}function Uc(){if(He!==null){if(lt===0)var e=He.return;else e=He,dl=Aa=null,Ws(e),ui=null,er=0,e=He;for(;e!==null;)mp(e.alternate,e),e=e.return;He=null}}function yi(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,mx(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),wl=0,Uc(),ot=e,He=a=cl(e.current,null),Fe=n,lt=0,pn=null,Xl=!1,mi=ya(e,n),Nc=!1,pi=gn=Rc=Ua=Ql=St=0,ln=gr=null,Dc=!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,vu(),a}function Bp(e,n){Me=null,D.H=or,n===ri||n===Tu?(n=em(),lt=3):n===Ys?(n=em(),lt=4):lt=n===pc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,pn=n,He===null&&(St=1,qu(e,Cn(n,e.current)))}function Hp(){var e=hn.current;return e===null?!0:(Fe&4194048)===Fe?_n===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?e===_n:!1}function qp(){var e=D.H;return D.H=or,e===null?or:e}function Yp(){var e=D.A;return D.A=X1,e}function Ju(){St=4,Xl||(Fe&4194048)!==Fe&&hn.current!==null||(mi=!0),(Ql&134217727)===0&&(Ua&134217727)===0||ot===null||Kl(ot,Fe,gn,!1)}function Bc(e,n,a){var u=et;et|=2;var f=qp(),h=Yp();(ot!==e||Fe!==n)&&(Ku=null,yi(e,n)),n=!1;var x=St;e:do try{if(lt!==0&&He!==null){var E=He,L=pn;switch(lt){case 8:Uc(),x=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(n=!0);var V=lt;if(lt=0,pn=null,vi(e,E,L,V),a&&mi){x=0;break e}break;default:V=lt,lt=0,pn=null,vi(e,E,L,V)}}Z1(),x=St;break}catch(ne){Bp(e,ne)}while(!0);return n&&e.shellSuspendCounter++,dl=Aa=null,et=u,D.H=f,D.A=h,He===null&&(ot=null,Fe=0,vu()),x}function Z1(){for(;He!==null;)Fp(He)}function K1(e,n){var a=et;et|=2;var u=qp(),f=Yp();ot!==e||Fe!==n?(Ku=null,Zu=pt()+500,yi(e,n)):mi=ya(e,n);e:do try{if(lt!==0&&He!==null){n=He;var h=pn;t:switch(lt){case 1:lt=0,pn=null,vi(e,n,h,1);break;case 2:case 9:if(Jh(h)){lt=0,pn=null,Gp(n);break}n=function(){lt!==2&&lt!==9||ot!==e||(lt=7),Kn(e)},h.then(n,n);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:Jh(h)?(lt=0,pn=null,Gp(n)):(lt=0,pn=null,vi(e,n,h,7));break;case 5:var x=null;switch(He.tag){case 26:x=He.memoizedState;case 5:case 27:var E=He;if(x?Ag(x):E.stateNode.complete){lt=0,pn=null;var L=E.sibling;if(L!==null)He=L;else{var V=E.return;V!==null?(He=V,Wu(V)):He=null}break t}}lt=0,pn=null,vi(e,n,h,5);break;case 6:lt=0,pn=null,vi(e,n,h,6);break;case 8:Uc(),St=6;break e;default:throw Error(r(462))}}P1();break}catch(ne){Bp(e,ne)}while(!0);return dl=Aa=null,D.H=u,D.A=f,et=a,He!==null?0:(ot=null,Fe=0,vu(),St)}function P1(){for(;He!==null&&!Bi();)Fp(He)}function Fp(e){var n=dp(e.alternate,e,El);e.memoizedProps=e.pendingProps,n===null?Wu(e):He=n}function Gp(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=rp(a,n,n.pendingProps,n.type,void 0,Fe);break;case 11:n=rp(a,n,n.pendingProps,n.type.render,n.ref,Fe);break;case 5:Ws(n);default:mp(a,n),n=He=Yh(n,El),n=dp(a,n,El)}e.memoizedProps=e.pendingProps,n===null?Wu(e):He=n}function vi(e,n,a,u){dl=Aa=null,Ws(n),ui=null,er=0;var f=n.return;try{if(H1(e,f,n,a,Fe)){St=1,qu(e,Cn(a,e.current)),He=null;return}}catch(h){if(f!==null)throw He=f,h;St=1,qu(e,Cn(a,e.current)),He=null;return}n.flags&32768?($e||u===1?e=!0:mi||(Fe&536870912)!==0?e=!1:(Xl=e=!0,(u===2||u===9||u===3||u===6)&&(u=hn.current,u!==null&&u.tag===13&&(u.flags|=16384))),Vp(n,e)):Wu(n)}function Wu(e){var n=e;do{if((n.flags&32768)!==0){Vp(n,Xl);return}e=n.return;var a=F1(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 Vp(e,n){do{var a=G1(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 Ip(e,n,a,u,f,h,x,E,L){e.cancelPendingCommit=null;do eo();while(Rt!==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|=Ts,is(e,a,h,x,E,L),e===ot&&(He=ot=null,Fe=0),gi=n,Zl=e,wl=a,Oc=h,Mc=f,Op=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,tx(Ce,function(){return Kp(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=D.T,D.T=null,f=ee.p,ee.p=2,x=et,et|=4;try{V1(e,n,a)}finally{et=x,ee.p=f,D.T=u}}Rt=1,Xp(),Qp(),$p()}}function Xp(){if(Rt===1){Rt=0;var e=Zl,n=gi,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=D.T,D.T=null;var u=ee.p;ee.p=2;var f=et;et|=4;try{Tp(n,e);var h=Kc,x=Rh(e.containerInfo),E=h.focusedElem,L=h.selectionRange;if(x!==E&&E&&E.ownerDocument&&Nh(E.ownerDocument.documentElement,E)){if(L!==null&&Ss(E)){var V=L.start,ne=L.end;if(ne===void 0&&(ne=V),"selectionStart"in E)E.selectionStart=V,E.selectionEnd=Math.min(ne,E.value.length);else{var re=E.ownerDocument||document,$=re&&re.defaultView||window;if($.getSelection){var J=$.getSelection(),Se=E.textContent.length,Ne=Math.min(L.start,Se),ut=L.end===void 0?Ne:Math.min(L.end,Se);!J.extend&&Ne>ut&&(x=ut,ut=Ne,Ne=x);var q=zh(E,Ne),B=zh(E,ut);if(q&&B&&(J.rangeCount!==1||J.anchorNode!==q.node||J.anchorOffset!==q.offset||J.focusNode!==B.node||J.focusOffset!==B.offset)){var G=re.createRange();G.setStart(q.node,q.offset),J.removeAllRanges(),Ne>ut?(J.addRange(G),J.extend(B.node,B.offset)):(G.setEnd(B.node,B.offset),J.addRange(G))}}}}for(re=[],J=E;J=J.parentNode;)J.nodeType===1&&re.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<re.length;E++){var ie=re[E];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}ho=!!Zc,Kc=Zc=null}finally{et=f,ee.p=u,D.T=a}}e.current=n,Rt=2}}function Qp(){if(Rt===2){Rt=0;var e=Zl,n=gi,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=D.T,D.T=null;var u=ee.p;ee.p=2;var f=et;et|=4;try{Sp(e,n.alternate,n)}finally{et=f,ee.p=u,D.T=a}}Rt=3}}function $p(){if(Rt===4||Rt===3){Rt=0,Hi();var e=Zl,n=gi,a=wl,u=Op;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Rt=5:(Rt=0,gi=Zl=null,Zp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&($l=null),oe(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=D.T,f=ee.p,ee.p=2,D.T=null;try{for(var h=e.onRecoverableError,x=0;x<u.length;x++){var E=u[x];h(E.value,{componentStack:E.stack})}}finally{D.T=n,ee.p=f}}(wl&3)!==0&&eo(),Kn(e),f=e.pendingLanes,(a&261930)!==0&&(f&42)!==0?e===Lc?yr++:(yr=0,Lc=e):yr=0,vr(0)}}function Zp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Ji(n)))}function eo(){return Xp(),Qp(),$p(),Kp()}function Kp(){if(Rt!==5)return!1;var e=Zl,n=Oc;Oc=0;var a=oe(wl),u=D.T,f=ee.p;try{ee.p=32>a?32:a,D.T=null,a=Mc,Mc=null;var h=Zl,x=wl;if(Rt=0,gi=Zl=null,wl=0,(et&6)!==0)throw Error(r(331));var E=et;if(et|=4,Np(h.current),Ap(h,h.current,x,a),et=E,vr(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(Lt,h)}catch{}return!0}finally{ee.p=f,D.T=u,Zp(e,n)}}function Pp(e,n,a){n=Cn(a,n),n=mc(e.stateNode,n,2),e=Fl(e,n,2),e!==null&&(Ol(e,2),Kn(e))}function at(e,n,a){if(e.tag===3)Pp(e,e,a);else for(;n!==null;){if(n.tag===3){Pp(n,e,a);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&($l===null||!$l.has(u))){e=Cn(a,e),a=Jm(2),u=Fl(n,a,2),u!==null&&(Wm(a,u,n,e),Ol(u,2),Kn(u));break}}n=n.return}}function Hc(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)||(Nc=!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&&(Fe&a)===a&&(St===4||St===3&&(Fe&62914560)===Fe&&300>pt()-$u?(et&2)===0&&yi(e,0):Rc|=a,pi===Fe&&(pi=0)),Kn(e)}function Jp(e,n){n===0&&(n=va()),e=Ca(e,n),e!==null&&(Ol(e,n),Kn(e))}function W1(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Jp(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),Jp(e,a)}function tx(e,n){return Nl(e,n)}var to=null,bi=null,qc=!1,no=!1,Yc=!1,Pl=0;function Kn(e){e!==bi&&e.next===null&&(bi===null?to=bi=e:bi=bi.next=e),no=!0,qc||(qc=!0,lx())}function vr(e,n){if(!Yc&&no){Yc=!0;do for(var a=!1,u=to;u!==null;){if(e!==0){var f=u.pendingLanes;if(f===0)var h=0;else{var x=u.suspendedLanes,E=u.pingedLanes;h=(1<<31-tt(42|e)+1)-1,h&=f&~(x&~E),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(a=!0,ng(u,h))}else h=Fe,h=ga(u,u===ot?h:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(h&3)===0||ya(u,h)||(a=!0,ng(u,h));u=u.next}while(a);Yc=!1}}function nx(){Wp()}function Wp(){no=qc=!1;var e=0;Pl!==0&&hx()&&(e=Pl);for(var n=pt(),a=null,u=to;u!==null;){var f=u.next,h=eg(u,n);h===0?(u.next=null,a===null?to=f:a.next=f,f===null&&(bi=a)):(a=u,(e!==0||(h&3)!==0)&&(no=!0)),u=f}Rt!==0&&Rt!==5||vr(e),Pl!==0&&(Pl=0)}function eg(e,n){for(var a=e.suspendedLanes,u=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var x=31-tt(h),E=1<<x,L=f[x];L===-1?((E&a)===0||(E&u)!==0)&&(f[x]=ru(E,n)):L<=n&&(e.expiredLanes|=E),h&=~E}if(n=ot,a=Fe,a=ga(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&&ma(u),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ya(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(u!==null&&ma(u),oe(a)){case 2:case 8:a=de;break;case 32:a=Ce;break;case 268435456:a=Pe;break;default:a=Ce}return u=tg.bind(null,e),a=Nl(a,u),e.callbackPriority=n,e.callbackNode=a,n}return u!==null&&u!==null&&ma(u),e.callbackPriority=2,e.callbackNode=null,2}function tg(e,n){if(Rt!==0&&Rt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(eo()&&e.callbackNode!==a)return null;var u=Fe;return u=ga(e,e===ot?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u===0?null:(Lp(e,u,n),eg(e,pt()),e.callbackNode!=null&&e.callbackNode===a?tg.bind(null,e):null)}function ng(e,n){if(eo())return null;Lp(e,n,!0)}function lx(){px(function(){(et&6)!==0?Nl(le,nx):Wp()})}function Fc(){if(Pl===0){var e=ai;e===0&&(e=il,il<<=1,(il&261888)===0&&(il=256)),Pl=e}return Pl}function lg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:cu(""+e)}function ag(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=lg((f[ye]||null).action),x=u.submitter;x&&(n=(n=x[ye]||null)?lg(n.formAction):x.getAttribute("formAction"),n!==null&&(h=n,x=null));var E=new mu("action","action",null,u,f);e.push({event:E,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Pl!==0){var L=x?ag(f,x):new FormData(f);oc(a,{pending:!0,data:L,method:f.method,action:h},null,L)}}else typeof h=="function"&&(E.preventDefault(),L=x?ag(f,x):new FormData(f),oc(a,{pending:!0,data:L,method:f.method,action:h},h,L))},currentTarget:f}]})}}for(var Gc=0;Gc<Cs.length;Gc++){var Vc=Cs[Gc],ix=Vc.toLowerCase(),rx=Vc[0].toUpperCase()+Vc.slice(1);Fn(ix,"on"+rx)}Fn(Mh,"onAnimationEnd"),Fn(Lh,"onAnimationIteration"),Fn(Uh,"onAnimationStart"),Fn("dblclick","onDoubleClick"),Fn("focusin","onFocus"),Fn("focusout","onBlur"),Fn(E1,"onTransitionRun"),Fn(w1,"onTransitionStart"),Fn(k1,"onTransitionCancel"),Fn(Bh,"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 br="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(br));function ig(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 E=u[x],L=E.instance,V=E.currentTarget;if(E=E.listener,L!==h&&f.isPropagationStopped())break e;h=E,f.currentTarget=V;try{h(f)}catch(ne){yu(ne)}f.currentTarget=null,h=L}else for(x=0;x<u.length;x++){if(E=u[x],L=E.instance,V=E.currentTarget,E=E.listener,L!==h&&f.isPropagationStopped())break e;h=E,f.currentTarget=V;try{h(f)}catch(ne){yu(ne)}f.currentTarget=null,h=L}}}}function qe(e,n){var a=n[Ae];a===void 0&&(a=n[Ae]=new Set);var u=e+"__bubble";a.has(u)||(rg(n,e,2,!1),a.add(u))}function Ic(e,n,a){var u=0;n&&(u|=4),rg(a,e,u,n)}var lo="_reactListening"+Math.random().toString(36).slice(2);function Xc(e){if(!e[lo]){e[lo]=!0,Hn.forEach(function(a){a!=="selectionchange"&&(ux.has(a)||Ic(a,!1,e),Ic(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[lo]||(n[lo]=!0,Ic("selectionchange",!1,n))}}function rg(e,n,a,u){switch(Mg(n)){case 2:var f=Mx;break;case 8:f=Lx;break;default:f=of}a=f.bind(null,n,a,e),f=void 0,!ds||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 Qc(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 E=u.stateNode.containerInfo;if(E===f)break;if(x===4)for(x=u.return;x!==null;){var L=x.tag;if((L===3||L===4)&&x.stateNode.containerInfo===f)return;x=x.return}for(;E!==null;){if(x=bt(E),x===null)return;if(L=x.tag,L===5||L===6||L===26||L===27){u=h=x;continue e}E=E.parentNode}}u=u.return}fh(function(){var V=h,ne=cs(a),re=[];e:{var $=Hh.get(e);if($!==void 0){var J=mu,Se=e;switch(e){case"keypress":if(du(a)===0)break e;case"keydown":case"keyup":J=e1;break;case"focusin":Se="focus",J=gs;break;case"focusout":Se="blur",J=gs;break;case"beforeblur":case"afterblur":J=gs;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=mh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=F0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=l1;break;case Mh:case Lh:case Uh:J=I0;break;case Bh: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=gh;break;case"toggle":case"beforetoggle":J=s1}var Ne=(n&4)!==0,ut=!Ne&&(e==="scroll"||e==="scrollend"),q=Ne?$!==null?$+"Capture":null:$;Ne=[];for(var B=V,G;B!==null;){var ie=B;if(G=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||G===null||q===null||(ie=Yi(B,q),ie!=null&&Ne.push(xr(B,ie,G))),ut)break;B=B.return}0<Ne.length&&($=new J($,Se,null,a,ne),re.push({event:$,listeners:Ne}))}}if((n&7)===0){e:{if($=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",$&&a!==ss&&(Se=a.relatedTarget||a.fromElement)&&(bt(Se)||Se[we]))break e;if((J||$)&&($=ne.window===ne?ne:($=ne.ownerDocument)?$.defaultView||$.parentWindow:window,J?(Se=a.relatedTarget||a.toElement,J=V,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=V),J!==Se)){if(Ne=mh,ie="onMouseLeave",q="onMouseEnter",B="mouse",(e==="pointerout"||e==="pointerover")&&(Ne=gh,ie="onPointerLeave",q="onPointerEnter",B="pointer"),ut=J==null?$:Ot(J),G=Se==null?$:Ot(Se),$=new Ne(ie,B+"leave",J,a,ne),$.target=ut,$.relatedTarget=G,ie=null,bt(ne)===V&&(Ne=new Ne(q,B+"enter",Se,a,ne),Ne.target=G,Ne.relatedTarget=ut,ie=Ne),ut=ie,J&&Se)t:{for(Ne=ox,q=J,B=Se,G=0,ie=q;ie;ie=Ne(ie))G++;ie=0;for(var je=B;je;je=Ne(je))ie++;for(;0<G-ie;)q=Ne(q),G--;for(;0<ie-G;)B=Ne(B),ie--;for(;G--;){if(q===B||B!==null&&q===B.alternate){Ne=q;break t}q=Ne(q),B=Ne(B)}Ne=null}else Ne=null;J!==null&&ug(re,$,J,Ne,!1),Se!==null&&ut!==null&&ug(re,ut,Se,Ne,!0)}}e:{if($=V?Ot(V):window,J=$.nodeName&&$.nodeName.toLowerCase(),J==="select"||J==="input"&&$.type==="file")var Je=kh;else if(Eh($))if(Ch)Je=b1;else{Je=y1;var Ee=g1}else J=$.nodeName,!J||J.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?V&&os(V.elementType)&&(Je=kh):Je=v1;if(Je&&(Je=Je(e,V))){wh(re,Je,a,ne);break e}Ee&&Ee(e,$,V),e==="focusout"&&V&&$.type==="number"&&V.memoizedProps.value!=null&&us($,"number",$.value)}switch(Ee=V?Ot(V):window,e){case"focusin":(Eh(Ee)||Ee.contentEditable==="true")&&(Ka=Ee,Es=V,Zi=null);break;case"focusout":Zi=Es=Ka=null;break;case"mousedown":ws=!0;break;case"contextmenu":case"mouseup":case"dragend":ws=!1,Dh(re,a,ne);break;case"selectionchange":if(S1)break;case"keydown":case"keyup":Dh(re,a,ne)}var Le;if(vs)e:{switch(e){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else Za?xh(e,a)&&(Ge="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ge="onCompositionStart");Ge&&(yh&&a.locale!=="ko"&&(Za||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&Za&&(Le=dh()):(Ml=ne,hs="value"in Ml?Ml.value:Ml.textContent,Za=!0)),Ee=ao(V,Ge),0<Ee.length&&(Ge=new ph(Ge,e,null,a,ne),re.push({event:Ge,listeners:Ee}),Le?Ge.data=Le:(Le=Sh(a),Le!==null&&(Ge.data=Le)))),(Le=f1?d1(e,a):h1(e,a))&&(Ge=ao(V,"onBeforeInput"),0<Ge.length&&(Ee=new ph("onBeforeInput","beforeinput",null,a,ne),re.push({event:Ee,listeners:Ge}),Ee.data=Le)),ax(re,e,V,a,ne)}ig(re,n)})}function xr(e,n,a){return{instance:e,listener:n,currentTarget:a}}function ao(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=Yi(e,a),f!=null&&u.unshift(xr(e,f,h)),f=Yi(e,n),f!=null&&u.push(xr(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 ug(e,n,a,u,f){for(var h=n._reactName,x=[];a!==null&&a!==u;){var E=a,L=E.alternate,V=E.stateNode;if(E=E.tag,L!==null&&L===u)break;E!==5&&E!==26&&E!==27||V===null||(L=V,f?(V=Yi(a,h),V!=null&&x.unshift(xr(a,V,L))):f||(V=Yi(a,h),V!=null&&x.push(xr(a,V,L)))),a=a.return}x.length!==0&&e.push({event:n,listeners:x})}var sx=/\r\n?/g,cx=/\u0000|\uFFFD/g;function og(e){return(typeof e=="string"?e:""+e).replace(sx,`
9
- `).replace(cx,"")}function sg(e,n){return n=og(n),og(e)===n}function rt(e,n,a,u,f,h){switch(a){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||Xa(e,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&Xa(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":sh(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=cu(""+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=cu(""+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=cu(""+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 $c(e,n,a,u,f,h){switch(a){case"style":sh(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"?Xa(e,u):(typeof u=="number"||typeof u=="bigint")&&Xa(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[ye]||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 Ft(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 E=h=x=f=null,L=null,V=null;for(u in a)if(a.hasOwnProperty(u)){var ne=a[u];if(ne!=null)switch(u){case"name":f=ne;break;case"type":x=ne;break;case"checked":L=ne;break;case"defaultChecked":V=ne;break;case"value":h=ne;break;case"defaultValue":E=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,n));break;default:rt(e,n,u,ne,a,null)}}ih(e,h,E,L,V,x,f,!1);return;case"select":qe("invalid",e),u=x=h=null;for(f in a)if(a.hasOwnProperty(f)&&(E=a[f],E!=null))switch(f){case"value":h=E;break;case"defaultValue":x=E;break;case"multiple":u=E;default:rt(e,n,f,E,a,null)}n=h,a=x,e.multiple=!!u,n!=null?Ia(e,!!u,n,!1):a!=null&&Ia(e,!!u,a,!0);return;case"textarea":qe("invalid",e),h=f=u=null;for(x in a)if(a.hasOwnProperty(x)&&(E=a[x],E!=null))switch(x){case"value":u=E;break;case"defaultValue":f=E;break;case"children":h=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(r(91));break;default:rt(e,n,x,E,a,null)}uh(e,u,f,h);return;case"option":for(L in a)a.hasOwnProperty(L)&&(u=a[L],u!=null)&&(L==="selected"?e.selected=u&&typeof u!="function"&&typeof u!="symbol":rt(e,n,L,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<br.length;u++)qe(br[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(V in a)if(a.hasOwnProperty(V)&&(u=a[V],u!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:rt(e,n,V,u,a,null)}return;default:if(os(n)){for(ne in a)a.hasOwnProperty(ne)&&(u=a[ne],u!==void 0&&$c(e,n,ne,u,a,void 0));return}}for(E in a)a.hasOwnProperty(E)&&(u=a[E],u!=null&&rt(e,n,E,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,E=null,L=null,V=null,ne=null;for(J in a){var re=a[J];if(a.hasOwnProperty(J)&&re!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":L=re;default:u.hasOwnProperty(J)||rt(e,n,J,null,u,re)}}for(var $ in u){var J=u[$];if(re=a[$],u.hasOwnProperty($)&&(J!=null||re!=null))switch($){case"type":h=J;break;case"name":f=J;break;case"checked":V=J;break;case"defaultChecked":ne=J;break;case"value":x=J;break;case"defaultValue":E=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,n));break;default:J!==re&&rt(e,n,$,J,u,re)}}rs(e,x,E,L,V,ne,h,f);return;case"select":J=x=E=$=null;for(h in a)if(L=a[h],a.hasOwnProperty(h)&&L!=null)switch(h){case"value":break;case"multiple":J=L;default:u.hasOwnProperty(h)||rt(e,n,h,null,u,L)}for(f in u)if(h=u[f],L=a[f],u.hasOwnProperty(f)&&(h!=null||L!=null))switch(f){case"value":$=h;break;case"defaultValue":E=h;break;case"multiple":x=h;default:h!==L&&rt(e,n,f,h,u,L)}n=E,a=x,u=J,$!=null?Ia(e,!!a,$,!1):!!u!=!!a&&(n!=null?Ia(e,!!a,n,!0):Ia(e,!!a,a?[]:"",!1));return;case"textarea":J=$=null;for(E in a)if(f=a[E],a.hasOwnProperty(E)&&f!=null&&!u.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:rt(e,n,E,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":$=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)}rh(e,$,J);return;case"option":for(var Se in a)$=a[Se],a.hasOwnProperty(Se)&&$!=null&&!u.hasOwnProperty(Se)&&(Se==="selected"?e.selected=!1:rt(e,n,Se,null,u,$));for(L in u)$=u[L],J=a[L],u.hasOwnProperty(L)&&$!==J&&($!=null||J!=null)&&(L==="selected"?e.selected=$&&typeof $!="function"&&typeof $!="symbol":rt(e,n,L,$,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)$=a[Ne],a.hasOwnProperty(Ne)&&$!=null&&!u.hasOwnProperty(Ne)&&rt(e,n,Ne,null,u,$);for(V in u)if($=u[V],J=a[V],u.hasOwnProperty(V)&&$!==J&&($!=null||J!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(r(137,n));break;default:rt(e,n,V,$,u,J)}return;default:if(os(n)){for(var ut in a)$=a[ut],a.hasOwnProperty(ut)&&$!==void 0&&!u.hasOwnProperty(ut)&&$c(e,n,ut,void 0,u,$);for(ne in u)$=u[ne],J=a[ne],!u.hasOwnProperty(ne)||$===J||$===void 0&&J===void 0||$c(e,n,ne,$,u,J);return}}for(var q in a)$=a[q],a.hasOwnProperty(q)&&$!=null&&!u.hasOwnProperty(q)&&rt(e,n,q,null,u,$);for(re in u)$=u[re],J=a[re],!u.hasOwnProperty(re)||$===J||$==null&&J==null||rt(e,n,re,$,u,J)}function cg(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,E=f.duration;if(h&&E&&cg(x)){for(x=0,E=f.responseEnd,u+=1;u<a.length;u++){var L=a[u],V=L.startTime;if(V>E)break;var ne=L.transferSize,re=L.initiatorType;ne&&cg(re)&&(L=L.responseEnd,x+=ne*(L<E?1:(E-V)/(L-V)))}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 Zc=null,Kc=null;function io(e){return e.nodeType===9?e:e.ownerDocument}function fg(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 dg(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 Pc(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 Jc=null;function hx(){var e=window.event;return e&&e.type==="popstate"?e===Jc?!1:(Jc=e,!0):(Jc=null,!1)}var hg=typeof setTimeout=="function"?setTimeout:void 0,mx=typeof clearTimeout=="function"?clearTimeout:void 0,mg=typeof Promise=="function"?Promise:void 0,px=typeof queueMicrotask=="function"?queueMicrotask:typeof mg<"u"?function(e){return mg.resolve(null).then(e).catch(gx)}:hg;function gx(e){setTimeout(function(){throw e})}function Jl(e){return e==="head"}function pg(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),wi(n);return}u--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")u++;else if(a==="html")Sr(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Sr(a);for(var h=a.firstChild;h;){var x=h.nextSibling,E=h.nodeName;h[gt]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&h.rel.toLowerCase()==="stylesheet"||a.removeChild(h),h=x}}else a==="body"&&Sr(e.ownerDocument.body);a=f}while(a);wi(n)}function gg(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 Wc(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":Wc(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=zn(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=zn(e.nextSibling),e===null))return null;return e}function yg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=zn(e.nextSibling),e===null))return null;return e}function ef(e){return e.data==="$?"||e.data==="$~"}function tf(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 zn(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 nf=null;function vg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return zn(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function bg(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 xg(e,n,a){switch(n=io(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 Sr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);vt(e)}var Nn=new Map,Sg=new Set;function ro(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kl=ee.d;ee.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=Pu();return e||n}function Sx(e){var n=Ie(e);n!==null&&n.tag===5&&n.type==="form"?Bm(n):kl.r(e)}var xi=typeof document>"u"?null:document;function Eg(e,n,a){var u=xi;if(u&&typeof n=="string"&&n){var f=wn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof a=="string"&&(f+='[crossorigin="'+a+'"]'),Sg.has(f)||(Sg.add(f),e={rel:e,crossOrigin:a,href:n},u.querySelector(f)===null&&(n=u.createElement("link"),Ft(n,"link",e),ht(n),u.head.appendChild(n)))}}function Ex(e){kl.D(e),Eg("dns-prefetch",e,null)}function wx(e,n){kl.C(e,n),Eg("preconnect",e,n)}function kx(e,n,a){kl.L(e,n,a);var u=xi;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=Si(e);break;case"script":h=Ei(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(Er(h))||n==="script"&&u.querySelector(wr(h))||(n=u.createElement("link"),Ft(n,"link",e),ht(n),u.head.appendChild(n)))}}function Cx(e,n){kl.m(e,n);var a=xi;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=Ei(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(wr(h)))return}u=a.createElement("link"),Ft(u,"link",e),ht(u),a.head.appendChild(u)}}}function Tx(e,n,a){kl.S(e,n,a);var u=xi;if(u&&e){var f=Jt(u).hoistableStyles,h=Si(e);n=n||"default";var x=f.get(h);if(!x){var E={loading:0,preload:null};if(x=u.querySelector(Er(h)))E.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":n},a),(a=Nn.get(h))&&lf(e,a);var L=x=u.createElement("link");ht(L),Ft(L,"link",e),L._p=new Promise(function(V,ne){L.onload=V,L.onerror=ne}),L.addEventListener("load",function(){E.loading|=1}),L.addEventListener("error",function(){E.loading|=2}),E.loading|=4,uo(x,n,u)}x={type:"stylesheet",instance:x,count:1,state:E},f.set(h,x)}}}function jx(e,n){kl.X(e,n);var a=xi;if(a&&e){var u=Jt(a).hoistableScripts,f=Ei(e),h=u.get(f);h||(h=a.querySelector(wr(f)),h||(e=g({src:e,async:!0},n),(n=Nn.get(f))&&af(e,n),h=a.createElement("script"),ht(h),Ft(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=xi;if(a&&e){var u=Jt(a).hoistableScripts,f=Ei(e),h=u.get(f);h||(h=a.querySelector(wr(f)),h||(e=g({src:e,async:!0,type:"module"},n),(n=Nn.get(f))&&af(e,n),h=a.createElement("script"),ht(h),Ft(h,"link",e),a.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},u.set(f,h))}}function wg(e,n,a,u){var f=(f=xe.current)?ro(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=Si(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=Si(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(Er(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||_x(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=Ei(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 Si(e){return'href="'+wn(e)+'"'}function Er(e){return'link[rel="stylesheet"]['+e+"]"}function kg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function _x(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}),Ft(n,"link",a),ht(n),e.head.appendChild(n))}function Ei(e){return'[src="'+wn(e)+'"]'}function wr(e){return"script[async]"+e}function Cg(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),Ft(u,"style",f),uo(u,a.precedence,e),n.instance=u;case"stylesheet":f=Si(a.href);var h=e.querySelector(Er(f));if(h)return n.state.loading|=4,n.instance=h,ht(h),h;u=kg(a),(f=Nn.get(f))&&lf(u,f),h=(e.ownerDocument||e).createElement("link"),ht(h);var x=h;return x._p=new Promise(function(E,L){x.onload=E,x.onerror=L}),Ft(h,"link",u),n.state.loading|=4,uo(h,a.precedence,e),n.instance=h;case"script":return h=Ei(a.src),(f=e.querySelector(wr(h)))?(n.instance=f,ht(f),f):(u=a,(f=Nn.get(h))&&(u=g({},a),af(u,f)),e=e.ownerDocument||e,f=e.createElement("script"),ht(f),Ft(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,uo(u,a.precedence,e));return n.instance}function uo(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 E=u[x];if(E.dataset.precedence===n)h=E;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 lf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function af(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var oo=null;function Tg(e,n,a){if(oo===null){var u=new Map,f=oo=new Map;f.set(a,u)}else f=oo,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 E=u.get(x);E?E.push(h):u.set(x,[h])}}return u}function jg(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function zx(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 Ag(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=Si(u.href),h=n.querySelector(Er(f));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=so.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=h,ht(h);return}h=n.ownerDocument||n,u=kg(u),(f=Nn.get(f))&&lf(u,f),h=h.createElement("link"),ht(h);var x=h;x._p=new Promise(function(E,L){x.onload=E,x.onerror=L}),Ft(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=so.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var rf=0;function Rx(e,n){return e.stylesheets&&e.count===0&&fo(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var u=setTimeout(function(){if(e.stylesheets&&fo(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+n);0<e.imgBytes&&rf===0&&(rf=62500*dx());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&fo(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>rf?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(u),clearTimeout(f)}}:null}function so(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var co=null;function fo(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,co=new Map,n.forEach(Dx,e),co=null,so.call(e))}function Dx(e,n){if(!(n.state.loading&4)){var a=co.get(e);if(a)var u=a.get(null);else{a=new Map,co.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=so.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 kr={$$typeof:R,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function Ox(e,n,a,u,f,h,x,E,L){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=Dl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dl(0),this.hiddenUpdates=Dl(null),this.identifierPrefix=u,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function _g(e,n,a,u,f,h,x,E,L,V,ne,re){return e=new Ox(e,n,a,x,L,V,ne,re,E),n=1,h===!0&&(n|=24),h=dn(3,null,null,n),e.current=h,h.stateNode=e,n=Bs(),n.refCount++,e.pooledCache=n,n.refCount++,h.memoizedState={element:u,isDehydrated:a,cache:n},Fs(h),e}function zg(e){return e?(e=Wa,e):Wa}function Ng(e,n,a,u,f,h){f=zg(f),u.context===null?u.context=f:u.pendingContext=f,u=Yl(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),nr(a,e,n))}function Rg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function uf(e,n){Rg(e,n),(e=e.alternate)&&Rg(e,n)}function Dg(e){if(e.tag===13||e.tag===31){var n=Ca(e,67108864);n!==null&&an(n,e,67108864),uf(e,67108864)}}function Og(e){if(e.tag===13||e.tag===31){var n=yn();n=Z(n);var a=Ca(e,n);a!==null&&an(a,e,n),uf(e,n)}}var ho=!0;function Mx(e,n,a,u){var f=D.T;D.T=null;var h=ee.p;try{ee.p=2,of(e,n,a,u)}finally{ee.p=h,D.T=f}}function Lx(e,n,a,u){var f=D.T;D.T=null;var h=ee.p;try{ee.p=8,of(e,n,a,u)}finally{ee.p=h,D.T=f}}function of(e,n,a,u){if(ho){var f=sf(u);if(f===null)Qc(e,n,u,mo,a),Lg(e,u);else if(Bx(f,e,n,a,u))u.stopPropagation();else if(Lg(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 E=h;for(E.pendingLanes|=2,E.entangledLanes|=2;x;){var L=1<<31-tt(x);E.entanglements[1]|=L,x&=~L}Kn(h),(et&6)===0&&(Zu=pt()+500,vr(0))}}break;case 31:case 13:E=Ca(h,2),E!==null&&an(E,h,2),Pu(),uf(h,2)}if(h=sf(u),h===null&&Qc(e,n,u,mo,a),h===f)break;f=h}f!==null&&u.stopPropagation()}else Qc(e,n,u,null,a)}}function sf(e){return e=cs(e),cf(e)}var mo=null;function cf(e){if(mo=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 mo=e,null}function Mg(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 le:return 2;case de:return 8;case Ce:case Re:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var ff=!1,Wl=null,ea=null,ta=null,Cr=new Map,Tr=new Map,na=[],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 Lg(e,n){switch(e){case"focusin":case"focusout":Wl=null;break;case"dragenter":case"dragleave":ea=null;break;case"mouseover":case"mouseout":ta=null;break;case"pointerover":case"pointerout":Cr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tr.delete(n.pointerId)}}function jr(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&&Dg(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 Wl=jr(Wl,e,n,a,u,f),!0;case"dragenter":return ea=jr(ea,e,n,a,u,f),!0;case"mouseover":return ta=jr(ta,e,n,a,u,f),!0;case"pointerover":var h=f.pointerId;return Cr.set(h,jr(Cr.get(h)||null,e,n,a,u,f)),!0;case"gotpointercapture":return h=f.pointerId,Tr.set(h,jr(Tr.get(h)||null,e,n,a,u,f)),!0}return!1}function Ug(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(){Og(a)});return}}else if(n===31){if(n=d(a),n!==null){e.blockedOn=n,ke(e.priority,function(){Og(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 po(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=sf(e.nativeEvent);if(a===null){a=e.nativeEvent;var u=new a.constructor(a.type,a);ss=u,a.target.dispatchEvent(u),ss=null}else return n=Ie(a),n!==null&&Dg(n),e.blockedOn=a,!1;n.shift()}return!0}function Bg(e,n,a){po(e)&&a.delete(n)}function Hx(){ff=!1,Wl!==null&&po(Wl)&&(Wl=null),ea!==null&&po(ea)&&(ea=null),ta!==null&&po(ta)&&(ta=null),Cr.forEach(Bg),Tr.forEach(Bg)}function go(e,n){e.blockedOn===n&&(e.blockedOn=null,ff||(ff=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hx)))}var yo=null;function Hg(e){yo!==e&&(yo=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){yo===e&&(yo=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(cf(u||a)===null)continue;break}var h=Ie(a);h!==null&&(e.splice(n,3),n-=3,oc(h,{pending:!0,data:f,method:a.method,action:u},u,f))}}))}function wi(e){function n(L){return go(L,e)}Wl!==null&&go(Wl,e),ea!==null&&go(ea,e),ta!==null&&go(ta,e),Cr.forEach(n),Tr.forEach(n);for(var a=0;a<na.length;a++){var u=na[a];u.blockedOn===e&&(u.blockedOn=null)}for(;0<na.length&&(a=na[0],a.blockedOn===null);)Ug(a),a.blockedOn===null&&na.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[ye]||null;if(typeof h=="function")x||Hg(a);else if(x){var E=null;if(h&&h.hasAttribute("formAction")){if(f=h,x=h[ye]||null)E=x.formAction;else if(cf(f)!==null)continue}else E=x.action;typeof E=="function"?a[u+1]=E:(a.splice(u,3),u-=3),Hg(a)}}}function qg(){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 df(e){this._internalRoot=e}vo.prototype.render=df.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,u=yn();Ng(a,u,e,n,null,null)},vo.prototype.unmount=df.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Ng(e.current,2,null,e,null,null),Pu(),n[we]=null}};function vo(e){this._internalRoot=e}vo.prototype.unstable_scheduleHydration=function(e){if(e){var n=he();e={blockedOn:null,target:e,priority:n};for(var a=0;a<na.length&&n!==0&&n<na[a].priority;a++);na.splice(a,0,e),a===0&&Ug(e)}};var Yg=l.version;if(Yg!=="19.2.4")throw Error(r(527,Yg,"19.2.4"));ee.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:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bo.isDisabled&&bo.supportsFiber)try{Lt=bo.inject(qx),nt=bo}catch{}}return _r.createRoot=function(e,n){if(!o(e))throw Error(r(299));var a=!1,u="",f=$m,h=Zm,x=Km;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=_g(e,1,!1,null,null,a,u,null,f,h,x,qg),e[we]=n.current,Xc(e),new df(n)},_r.hydrateRoot=function(e,n,a){if(!o(e))throw Error(r(299));var u=!1,f="",h=$m,x=Zm,E=Km,L=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&&(E=a.onRecoverableError),a.formState!==void 0&&(L=a.formState)),n=_g(e,1,!0,n,a??null,u,f,L,h,x,E,qg),n.context=zg(null),a=n.current,u=yn(),u=Z(u),f=Yl(u),f.callback=null,Fl(a,f,u),a=u,n.current.lanes=a,Ol(n,a),Kn(n),e[we]=n.current,Xc(e),new vo(n)},_r.version="19.2.4",_r}var Pg;function Jx(){if(Pg)return pf.exports;Pg=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(),pf.exports=Px(),pf.exports}var Wx=Jx();var Cv=t=>{throw TypeError(t)},eS=(t,l,i)=>l.has(t)||Cv("Cannot "+i),bf=(t,l,i)=>(eS(t,l,"read from private field"),i?i.call(t):l.get(t)),tS=(t,l,i)=>l.has(t)?Cv("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(t):l.set(t,i),Jg="popstate";function nS(t={}){function l(r,o){let{pathname:s,search:c,hash:d}=r.location;return Vr("",{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:el(o)}return aS(l,i,null,t)}function Be(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function zt(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 Wg(t,l){return{usr:t.state,key:t.key,idx:l}}function Vr(t,l,i=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof l=="string"?fa(l):l,state:i,key:l&&l.key||r||lS()}}function el({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 fa(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 z=y(),T=z==null?null:z-m;m=z,p&&p({action:d,location:j.location,delta:T})}function b(z,T){d="PUSH";let N=Vr(j.location,z,T);m=y()+1;let R=Wg(N,m),P=j.createHref(N);try{c.pushState(R,"",P)}catch(W){if(W instanceof DOMException&&W.name==="DataCloneError")throw W;o.location.assign(P)}s&&p&&p({action:d,location:j.location,delta:1})}function S(z,T){d="REPLACE";let N=Vr(j.location,z,T);m=y();let R=Wg(N,m),P=j.createHref(N);c.replaceState(R,"",P),s&&p&&p({action:d,location:j.location,delta:0})}function k(z){return Tv(z)}let j={get action(){return d},get location(){return t(o,c)},listen(z){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(Jg,g),p=z,()=>{o.removeEventListener(Jg,g),p=null}},createHref(z){return l(o,z)},createURL:k,encodeLocation(z){let T=k(z);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:b,replace:S,go(z){return c.go(z)}};return j}function Tv(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:el(t);return r=r.replace(/ $/,"%20"),!l&&r.startsWith("//")&&(r=i+r),new URL(r,i)}var Ur,ey=class{constructor(t){if(tS(this,Ur,new Map),t)for(let[l,i]of t)this.set(l,i)}get(t){if(bf(this,Ur).has(t))return bf(this,Ur).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,l){bf(this,Ur).set(t,l)}};Ur=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 Ir(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]=ty(m,l(m)),m}else{let m={...s,id:p,children:void 0};return r[p]=ty(m,l(m)),s.children&&(m.children=Ir(s.children,l,d,r,o)),m}})}function ty(t,l){return Object.assign(t,{...l,...typeof l.lazy=="object"&&l.lazy!=null?{lazy:{...t.lazy,...l.lazy}}:{}})}function ra(t,l,i="/"){return Br(t,l,i,!1)}function Br(t,l,i,r){let o=typeof l=="string"?fa(l):l,s=On(o.pathname||"/",i);if(s==null)return null;let c=jv(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 jv(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=Wn([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}".`),jv(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 Av(c.path))s(c,d,!0,p)}),l}function Av(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=Av(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,ny=t=>t==="*";function vS(t,l){let i=t.split("/"),r=i.length;return i.some(ny)&&(r+=yS),l&&(r+=mS),i.filter(o=>!ny(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=Uo({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},y),b=p.route;if(!g&&m&&i&&!r[r.length-1].route.index&&(g=Uo({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!g)return null;Object.assign(o,g.params),c.push({params:o,pathname:Wn([s,g.pathname]),pathnameBase:CS(Wn([s,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(s=Wn([s,g.pathnameBase]))}return c}function Uo(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 k=d[b]||"";c=s.slice(0,s.length-k.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){zt(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 zt(!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:Wn([t,l])}var _v=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xd=t=>_v.test(t);function kS(t,l="/"){let{pathname:i,search:r="",hash:o=""}=typeof t=="string"?fa(t):t,s;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?s=ly(i.substring(1),"/"):s=ly(i,l)):s=l,{pathname:s,search:TS(r),hash:jS(o)}}function ly(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 xf(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 zv(t){return t.filter((l,i)=>i===0||l.route.path&&l.route.path.length>0)}function Sd(t){let l=zv(t);return l.map((i,r)=>r===l.length-1?i.pathname:i.pathnameBase)}function Ed(t,l,i,r=!1){let o;typeof t=="string"?o=fa(t):(o={...t},Be(!o.pathname||!o.pathname.includes("?"),xf("?","pathname","search",o)),Be(!o.pathname||!o.pathname.includes("#"),xf("#","pathname","hash",o)),Be(!o.search||!o.search.includes("#"),xf("#","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 Wn=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,Zr=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 Xr(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function Kr(t){return t.map(l=>l.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Nv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Rv(t,l){let i=t;if(typeof i!="string"||!_v.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let r=i,o=!1;if(Nv)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{zt(!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 sa=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=Ai(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=Ai(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[sa]??s,d=Ai(i[o],c,(...p)=>ay(p[0]));d&&(o==="loader"&&c.hydrate===!0&&(d.hydrate=!0),d[sa]=c,r[o]=d)}}),l.middleware&&l.middleware.length>0&&i.middleware.length>0&&(r.middleware=l.middleware.map(o=>{let s=o[sa]??o,c=Ai(i.middleware,s,(...d)=>ay(d[0]));return c?(c[sa]=s,c):o})),r}function _S(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[sa]??t.navigate,o=Ai(i.navigate,r,(...s)=>{let[c,d]=s;return{to:typeof c=="number"||typeof c=="string"?c:c?el(c):".",...iy(t,d??{})}});o&&(o[sa]=r,t.navigate=o)}if(i.fetch.length>0){let r=t.fetch[sa]??t.fetch,o=Ai(i.fetch,r,(...s)=>{let[c,,d,p]=s;return{href:d??".",fetcherKey:c,...iy(t,p??{})}});o&&(o[sa]=r,t.fetch=o)}return t}function Ai(t,l,i){return t.length===0?null:async(...r)=>{let o=await Dv(t,i(...r),()=>l(...r),t.length-1);if(o.type==="error")throw o.value;return o.value}}async function Dv(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=Dv(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 ay(t){let{request:l,context:i,params:r,unstable_pattern:o}=t;return{request:zS(l),params:{...r},unstable_pattern:o,context:NS(i)}}function iy(t,l){return{currentUrl:el(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 zS(t){return{method:t.method,url:t.url,headers:{get:(...l)=>t.headers.get(...l)}}}function NS(t){if(DS(t)){let l={...t};return Object.freeze(l),l}else return{get:l=>t.get(l)}}var RS=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function DS(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")===RS}var Ov=["POST","PUT","PATCH","DELETE"],OS=new Set(Ov),MS=["GET",...Ov],LS=new Set(MS),Mv=new Set([301,302,303,307,308]),US=new Set([307,308]),Sf={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},zr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},HS=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),Lv="remix-router-transitions",Uv=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 M=t.unstable_instrumentations;s=Y=>({...o(Y),...AS(M.map(Z=>Z.route).filter(Boolean),Y)})}let c={},d=Ir(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,k=null,j=null,z=null,T=t.hydrationData!=null,N=ra(d,t.history.location,m),R=!1,P=null,W;if(N==null&&!t.patchRoutesOnNavigation){let M=Rn(404,{pathname:t.history.location.pathname}),{matches:Y,route:Z}=xo(d);W=!0,N=Y,P={[Z.id]:M}}else if(N&&!t.hydrationData&&va(N,d,t.history.location.pathname).active&&(N=null),N)if(N.some(M=>M.route.lazy))W=!1;else if(!N.some(M=>wd(M.route)))W=!0;else{let M=t.hydrationData?t.hydrationData.loaderData:null,Y=t.hydrationData?t.hydrationData.errors:null;if(Y){let Z=N.findIndex(oe=>Y[oe.route.id]!==void 0);W=N.slice(0,Z+1).every(oe=>!Qf(oe.route,M,Y))}else W=N.every(Z=>!Qf(Z.route,M,Y))}else{W=!1,N=[];let M=va(null,d,t.history.location.pathname);M.active&&M.matches&&(R=!0,N=M.matches)}let H,_={historyAction:t.history.action,location:t.history.location,matches:N,initialized:W,navigation:Sf,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||P,fetchers:new Map,blockers:new Map},ae="POP",ce=null,U=!1,X,K=!1,I=new Map,te=null,Q=!1,D=!1,ee=new Set,se=new Map,ve=0,A=-1,O=new Map,F=new Set,C=new Map,ue=new Map,be=new Set,xe=new Map,De,pe=null;function ze(){if(b=t.history.listen(({action:M,location:Y,delta:Z})=>{if(De){De(),De=void 0;return}zt(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 oe=pa({currentLocation:_.location,nextLocation:Y,historyAction:M});if(oe&&Z!=null){let he=new Promise(ke=>{De=ke});t.history.go(Z*-1),il(oe,{state:"blocked",location:Y,proceed(){il(oe,{state:"proceeding",proceed:void 0,reset:void 0,location:Y}),he.then(()=>t.history.go(Z))},reset(){let ke=new Map(_.blockers);ke.set(oe,zr),yt({blockers:ke})}}),ce?.resolve(),ce=null;return}return Pt(M,Y)}),i){sE(l,I);let M=()=>cE(l,I);l.addEventListener("pagehide",M),te=()=>l.removeEventListener("pagehide",M)}return _.initialized||Pt("POP",_.location,{initialHydration:!0}),H}function Nt(){b&&b(),te&&te(),S.clear(),X&&X.abort(),_.fetchers.forEach((M,Y)=>on(Y)),_.blockers.forEach((M,Y)=>iu(Y))}function Ln(M){return S.add(M),()=>S.delete(M)}function yt(M,Y={}){M.matches&&(M.matches=M.matches.map(he=>{let ke=c[he.route.id],ge=he.route;return ge.element!==ke.element||ge.errorElement!==ke.errorElement||ge.hydrateFallbackElement!==ke.hydrateFallbackElement?{...he,route:ke}:he})),_={..._,...M};let Z=[],oe=[];_.fetchers.forEach((he,ke)=>{he.state==="idle"&&(be.has(ke)?Z.push(ke):oe.push(ke))}),be.forEach(he=>{!_.fetchers.has(he)&&!se.has(he)&&Z.push(he)}),[...S].forEach(he=>he(_,{deletedFetchers:Z,newErrors:M.errors??null,viewTransitionOpts:Y.viewTransitionOpts,flushSync:Y.flushSync===!0})),Z.forEach(he=>on(he)),oe.forEach(he=>_.fetchers.delete(he))}function Un(M,Y,{flushSync:Z}={}){let oe=_.actionData!=null&&_.navigation.formMethod!=null&&It(_.navigation.formMethod)&&_.navigation.state==="loading"&&M.state?._isRedirect!==!0,he;Y.actionData?Object.keys(Y.actionData).length>0?he=Y.actionData:he=null:oe?he=_.actionData:he=null;let ke=Y.loaderData?py(_.loaderData,Y.loaderData,Y.matches||[],Y.errors):_.loaderData,ge=_.blockers;ge.size>0&&(ge=new Map(ge),ge.forEach((Ae,Te)=>ge.set(Te,zr)));let me=Q?!1:ru(M,Y.matches||_.matches),ye=U===!0||_.navigation.formMethod!=null&&It(_.navigation.formMethod)&&M.state?._isRedirect!==!0;p&&(d=p,p=void 0),Q||ae==="POP"||(ae==="PUSH"?t.history.push(M,M.state):ae==="REPLACE"&&t.history.replace(M,M.state));let we;if(ae==="POP"){let Ae=I.get(_.location.pathname);Ae&&Ae.has(M.pathname)?we={currentLocation:_.location,nextLocation:M}:I.has(M.pathname)&&(we={currentLocation:M,nextLocation:_.location})}else if(K){let Ae=I.get(_.location.pathname);Ae?Ae.add(M.pathname):(Ae=new Set([M.pathname]),I.set(_.location.pathname,Ae)),we={currentLocation:_.location,nextLocation:M}}yt({...Y,actionData:he,loaderData:ke,historyAction:ae,location:M,initialized:!0,navigation:Sf,revalidation:"idle",restoreScrollPosition:me,preventScrollReset:ye,blockers:ge},{viewTransitionOpts:we,flushSync:Z===!0}),ae="POP",U=!1,K=!1,Q=!1,D=!1,ce?.resolve(),ce=null,pe?.resolve(),pe=null}async function Sn(M,Y){if(ce?.resolve(),ce=null,typeof M=="number"){ce||(ce=by());let Ve=ce.promise;return t.history.go(M),Ve}let Z=Xf(_.location,_.matches,m,M,Y?.fromRouteId,Y?.relative),{path:oe,submission:he,error:ke}=ry(!1,Z,Y),ge=_.location,me=Vr(_.location,oe,Y&&Y.state);me={...me,...t.history.encodeLocation(me)};let ye=Y&&Y.replace!=null?Y.replace:void 0,we="PUSH";ye===!0?we="REPLACE":ye===!1||he!=null&&It(he.formMethod)&&he.formAction===_.location.pathname+_.location.search&&(we="REPLACE");let Ae=Y&&"preventScrollReset"in Y?Y.preventScrollReset===!0:void 0,Te=(Y&&Y.flushSync)===!0,Ze=pa({currentLocation:ge,nextLocation:me,historyAction:we});if(Ze){il(Ze,{state:"blocked",location:me,proceed(){il(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:me}),Sn(M,Y)},reset(){let Ve=new Map(_.blockers);Ve.set(Ze,zr),yt({blockers:Ve})}});return}await Pt(we,me,{submission:he,pendingError:ke,preventScrollReset:Ae,replace:Y&&Y.replace,enableViewTransition:Y&&Y.viewTransition,flushSync:Te,callSiteDefaultShouldRevalidate:Y&&Y.unstable_defaultShouldRevalidate})}function zl(){pe||(pe=by()),de(),yt({revalidation:"loading"});let M=pe.promise;return _.navigation.state==="submitting"?M:_.navigation.state==="idle"?(Pt(_.historyAction,_.location,{startUninterruptedRevalidation:!0}),M):(Pt(ae||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation,enableViewTransition:K===!0}),M)}async function Pt(M,Y,Z){X&&X.abort(),X=null,ae=M,Q=(Z&&Z.startUninterruptedRevalidation)===!0,ya(_.location,_.matches),U=(Z&&Z.preventScrollReset)===!0,K=(Z&&Z.enableViewTransition)===!0;let oe=p||d,he=Z&&Z.overrideNavigation,ke=Z?.initialHydration&&_.matches&&_.matches.length>0&&!R?_.matches:ra(oe,Y,m),ge=(Z&&Z.flushSync)===!0;if(ke&&_.initialized&&!D&&WS(_.location,Y)&&!(Z&&Z.submission&&It(Z.submission.formMethod))){Un(Y,{matches:ke},{flushSync:ge});return}let me=va(ke,oe,Y.pathname);if(me.active&&me.matches&&(ke=me.matches),!ke){let{error:vt,notFoundMatches:bt,route:Ie}=Rl(Y.pathname);Un(Y,{matches:bt,loaderData:{},errors:{[Ie.id]:vt}},{flushSync:ge});return}X=new AbortController;let ye=Ti(t.history,Y,X.signal,Z&&Z.submission),we=t.getContext?await t.getContext():new ey,Ae;if(Z&&Z.pendingError)Ae=[ua(ke).route.id,{type:"error",error:Z.pendingError}];else if(Z&&Z.submission&&It(Z.submission.formMethod)){let vt=await Ga(ye,Y,Z.submission,ke,we,me.active,Z&&Z.initialHydration===!0,{replace:Z.replace,flushSync:ge});if(vt.shortCircuited)return;if(vt.pendingActionResult){let[bt,Ie]=vt.pendingActionResult;if(bn(Ie)&&Xr(Ie.error)&&Ie.error.status===404){X=null,Un(Y,{matches:vt.matches,loaderData:{},errors:{[bt]:Ie.error}});return}}ke=vt.matches||ke,Ae=vt.pendingActionResult,he=Ef(Y,Z.submission),ge=!1,me.active=!1,ye=Ti(t.history,ye.url,ye.signal)}let{shortCircuited:Te,matches:Ze,loaderData:Ve,errors:gt}=await Va(ye,Y,ke,we,me.active,he,Z&&Z.submission,Z&&Z.fetcherSubmission,Z&&Z.replace,Z&&Z.initialHydration===!0,ge,Ae,Z&&Z.callSiteDefaultShouldRevalidate);Te||(X=null,Un(Y,{matches:Ze||ke,...gy(Ae),loaderData:Ve,errors:gt}))}async function Ga(M,Y,Z,oe,he,ke,ge,me={}){de();let ye=uE(Y,Z);if(yt({navigation:ye},{flushSync:me.flushSync===!0}),ke){let Te=await Dl(oe,Y.pathname,M.signal);if(Te.type==="aborted")return{shortCircuited:!0};if(Te.type==="error"){if(Te.partialMatches.length===0){let{matches:Ve,route:gt}=xo(d);return{matches:Ve,pendingActionResult:[gt.id,{type:"error",error:Te.error}]}}let Ze=ua(Te.partialMatches).route.id;return{matches:Te.partialMatches,pendingActionResult:[Ze,{type:"error",error:Te.error}]}}else if(Te.matches)oe=Te.matches;else{let{notFoundMatches:Ze,error:Ve,route:gt}=Rl(Y.pathname);return{matches:Ze,pendingActionResult:[gt.id,{type:"error",error:Ve}]}}}let we,Ae=No(oe,Y);if(!Ae.route.action&&!Ae.route.lazy)we={type:"error",error:Rn(405,{method:M.method,pathname:Y.pathname,routeId:Ae.route.id})};else{let Te=_i(s,c,M,oe,Ae,ge?[]:r,he),Ze=await al(M,Te,he,null);if(we=Ze[Ae.route.id],!we){for(let Ve of oe)if(Ze[Ve.route.id]){we=Ze[Ve.route.id];break}}if(M.signal.aborted)return{shortCircuited:!0}}if(Ha(we)){let Te;return me&&me.replace!=null?Te=me.replace:Te=dy(we.response.headers.get("Location"),new URL(M.url),m,t.history)===_.location.pathname+_.location.search,await pt(M,we,!0,{submission:Z,replace:Te}),{shortCircuited:!0}}if(bn(we)){let Te=ua(oe,Ae.route.id);return(me&&me.replace)!==!0&&(ae="PUSH"),{matches:oe,pendingActionResult:[Te.route.id,we,Ae.route.id]}}return{matches:oe,pendingActionResult:[Ae.route.id,we]}}async function Va(M,Y,Z,oe,he,ke,ge,me,ye,we,Ae,Te,Ze){let Ve=ke||Ef(Y,ge),gt=ge||me||vy(Ve),vt=!Q&&!we;if(he){if(vt){let Et=ll(Te);yt({navigation:Ve,...Et!==void 0?{actionData:Et}:{}},{flushSync:Ae})}let Xe=await Dl(Z,Y.pathname,M.signal);if(Xe.type==="aborted")return{shortCircuited:!0};if(Xe.type==="error"){if(Xe.partialMatches.length===0){let{matches:Yn,route:Bt}=xo(d);return{matches:Yn,loaderData:{},errors:{[Bt.id]:Xe.error}}}let Et=ua(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}=Rl(Y.pathname);return{matches:Yn,loaderData:{},errors:{[Bt.id]:Et}}}}let bt=p||d,{dsMatches:Ie,revalidatingFetchers:Ot}=uy(M,oe,s,c,t.history,_,Z,gt,Y,we?[]:r,we===!0,D,ee,be,C,F,bt,m,t.patchRoutesOnNavigation!=null,Te,Ze);if(A=++ve,!t.dataStrategy&&!Ie.some(Xe=>Xe.shouldLoad)&&!Ie.some(Xe=>Xe.route.middleware&&Xe.route.middleware.length>0)&&Ot.length===0){let Xe=tt();return Un(Y,{matches:Z,loaderData:{},errors:Te&&bn(Te[1])?{[Te[0]]:Te[1].error}:null,...gy(Te),...Xe?{fetchers:new Map(_.fetchers)}:{}},{flushSync:Ae}),{shortCircuited:!0}}if(vt){let Xe={};if(!he){Xe.navigation=Ve;let Et=ll(Te);Et!==void 0&&(Xe.actionData=Et)}Ot.length>0&&(Xe.fetchers=Nl(Ot)),yt(Xe,{flushSync:Ae})}Ot.forEach(Xe=>{nt(Xe.key),Xe.controller&&se.set(Xe.key,Xe.controller)});let Jt=()=>Ot.forEach(Xe=>nt(Xe.key));X&&X.signal.addEventListener("abort",Jt);let{loaderResults:ht,fetcherResults:Hn}=await le(Ie,Ot,M,oe);if(M.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",Jt),Ot.forEach(Xe=>se.delete(Xe.key));let cn=So(ht);if(cn)return await pt(M,cn.result,!0,{replace:ye}),{shortCircuited:!0};if(cn=So(Hn),cn)return F.add(cn.key),await pt(M,cn.result,!0,{replace:ye}),{shortCircuited:!0};let{loaderData:qn,errors:En}=my(_,Z,ht,Te,Ot,Hn);we&&_.errors&&(En={..._.errors,...En});let ul=tt(),ba=Bn(A),xa=ul||ba||Ot.length>0;return{matches:Z,loaderData:qn,errors:En,...xa?{fetchers:new Map(_.fetchers)}:{}}}function ll(M){if(M&&!bn(M[1]))return{[M[0]]:M[1].data};if(_.actionData)return Object.keys(_.actionData).length===0?null:_.actionData}function Nl(M){return M.forEach(Y=>{let Z=_.fetchers.get(Y.key),oe=Nr(void 0,Z?Z.data:void 0);_.fetchers.set(Y.key,oe)}),new Map(_.fetchers)}async function ma(M,Y,Z,oe){nt(M);let he=(oe&&oe.flushSync)===!0,ke=p||d,ge=Xf(_.location,_.matches,m,Z,Y,oe?.relative),me=ra(ke,ge,m),ye=va(me,ke,ge);if(ye.active&&ye.matches&&(me=ye.matches),!me){Re(M,Y,Rn(404,{pathname:ge}),{flushSync:he});return}let{path:we,submission:Ae,error:Te}=ry(!0,ge,oe);if(Te){Re(M,Y,Te,{flushSync:he});return}let Ze=t.getContext?await t.getContext():new ey,Ve=(oe&&oe.preventScrollReset)===!0;if(Ae&&It(Ae.formMethod)){await Bi(M,Y,we,me,Ze,ye.active,he,Ve,Ae,oe&&oe.unstable_defaultShouldRevalidate);return}C.set(M,{routeId:Y,path:we}),await Hi(M,Y,we,me,Ze,ye.active,he,Ve,Ae)}async function Bi(M,Y,Z,oe,he,ke,ge,me,ye,we){de(),C.delete(M);let Ae=_.fetchers.get(M);Ce(M,oE(ye,Ae),{flushSync:ge});let Te=new AbortController,Ze=Ti(t.history,Z,Te.signal,ye);if(ke){let Qe=await Dl(oe,new URL(Ze.url).pathname,Ze.signal,M);if(Qe.type==="aborted")return;if(Qe.type==="error"){Re(M,Y,Qe.error,{flushSync:ge});return}else if(Qe.matches)oe=Qe.matches;else{Re(M,Y,Rn(404,{pathname:Z}),{flushSync:ge});return}}let Ve=No(oe,Z);if(!Ve.route.action&&!Ve.route.lazy){let Qe=Rn(405,{method:ye.formMethod,pathname:Z,routeId:Y});Re(M,Y,Qe,{flushSync:ge});return}se.set(M,Te);let gt=ve,vt=_i(s,c,Ze,oe,Ve,r,he),bt=await al(Ze,vt,he,M),Ie=bt[Ve.route.id];if(!Ie){for(let Qe of vt)if(bt[Qe.route.id]){Ie=bt[Qe.route.id];break}}if(Ze.signal.aborted){se.get(M)===Te&&se.delete(M);return}if(be.has(M)){if(Ha(Ie)||bn(Ie)){Ce(M,jl(void 0));return}}else{if(Ha(Ie))if(se.delete(M),A>gt){Ce(M,jl(void 0));return}else return F.add(M),Ce(M,Nr(ye)),pt(Ze,Ie,!1,{fetcherSubmission:ye,preventScrollReset:me});if(bn(Ie)){Re(M,Y,Ie.error);return}}let Ot=_.navigation.location||_.location,Jt=Ti(t.history,Ot,Te.signal),ht=p||d,Hn=_.navigation.state!=="idle"?ra(ht,_.navigation.location,m):_.matches;Be(Hn,"Didn't find any matches after fetcher action");let cn=++ve;O.set(M,cn);let qn=Nr(ye,Ie.data);_.fetchers.set(M,qn);let{dsMatches:En,revalidatingFetchers:ul}=uy(Jt,he,s,c,t.history,_,Hn,ye,Ot,r,!1,D,ee,be,C,F,ht,m,t.patchRoutesOnNavigation!=null,[Ve.route.id,Ie],we);ul.filter(Qe=>Qe.key!==M).forEach(Qe=>{let Sa=Qe.key,ou=_.fetchers.get(Sa),qi=Nr(void 0,ou?ou.data:void 0);_.fetchers.set(Sa,qi),nt(Sa),Qe.controller&&se.set(Sa,Qe.controller)}),yt({fetchers:new Map(_.fetchers)});let ba=()=>ul.forEach(Qe=>nt(Qe.key));Te.signal.addEventListener("abort",ba);let{loaderResults:xa,fetcherResults:Xe}=await le(En,ul,Jt,he);if(Te.signal.aborted)return;if(Te.signal.removeEventListener("abort",ba),O.delete(M),se.delete(M),ul.forEach(Qe=>se.delete(Qe.key)),_.fetchers.has(M)){let Qe=jl(Ie.data);_.fetchers.set(M,Qe)}let Et=So(xa);if(Et)return pt(Jt,Et.result,!1,{preventScrollReset:me});if(Et=So(Xe),Et)return F.add(Et.key),pt(Jt,Et.result,!1,{preventScrollReset:me});let{loaderData:Yn,errors:Bt}=my(_,Hn,xa,void 0,ul,Xe);Bn(cn),_.navigation.state==="loading"&&cn>A?(Be(ae,"Expected pending action"),X&&X.abort(),Un(_.navigation.location,{matches:Hn,loaderData:Yn,errors:Bt,fetchers:new Map(_.fetchers)})):(yt({errors:Bt,loaderData:py(_.loaderData,Yn,Hn,Bt),fetchers:new Map(_.fetchers)}),D=!1)}async function Hi(M,Y,Z,oe,he,ke,ge,me,ye){let we=_.fetchers.get(M);Ce(M,Nr(ye,we?we.data:void 0),{flushSync:ge});let Ae=new AbortController,Te=Ti(t.history,Z,Ae.signal);if(ke){let Ie=await Dl(oe,new URL(Te.url).pathname,Te.signal,M);if(Ie.type==="aborted")return;if(Ie.type==="error"){Re(M,Y,Ie.error,{flushSync:ge});return}else if(Ie.matches)oe=Ie.matches;else{Re(M,Y,Rn(404,{pathname:Z}),{flushSync:ge});return}}let Ze=No(oe,Z);se.set(M,Ae);let Ve=ve,gt=_i(s,c,Te,oe,Ze,r,he),bt=(await al(Te,gt,he,M))[Ze.route.id];if(se.get(M)===Ae&&se.delete(M),!Te.signal.aborted){if(be.has(M)){Ce(M,jl(void 0));return}if(Ha(bt))if(A>Ve){Ce(M,jl(void 0));return}else{F.add(M),await pt(Te,bt,!1,{preventScrollReset:me});return}if(bn(bt)){Re(M,Y,bt.error);return}Ce(M,jl(bt.data))}}async function pt(M,Y,Z,{submission:oe,fetcherSubmission:he,preventScrollReset:ke,replace:ge}={}){Z||(ce?.resolve(),ce=null),Y.response.headers.has("X-Remix-Revalidate")&&(D=!0);let me=Y.response.headers.get("Location");Be(me,"Expected a Location header on the redirect Response"),me=dy(me,new URL(M.url),m,t.history);let ye=Vr(_.location,me,{_isRedirect:!0});if(i){let gt=!1;if(Y.response.headers.has("X-Remix-Reload-Document"))gt=!0;else if(xd(me)){const vt=Tv(me,!0);gt=vt.origin!==l.location.origin||On(vt.pathname,m)==null}if(gt){ge?l.location.replace(me):l.location.assign(me);return}}X=null;let we=ge===!0||Y.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ae,formAction:Te,formEncType:Ze}=_.navigation;!oe&&!he&&Ae&&Te&&Ze&&(oe=vy(_.navigation));let Ve=oe||he;if(US.has(Y.response.status)&&Ve&&It(Ve.formMethod))await Pt(we,ye,{submission:{...Ve,formAction:me},preventScrollReset:ke||U,enableViewTransition:Z?K:void 0});else{let gt=Ef(ye,oe);await Pt(we,ye,{overrideNavigation:gt,fetcherSubmission:he,preventScrollReset:ke||U,enableViewTransition:Z?K:void 0})}}async function al(M,Y,Z,oe){let he,ke={};try{he=await QS(y,M,Y,oe,Z,!1)}catch(ge){return Y.filter(me=>me.shouldLoad).forEach(me=>{ke[me.route.id]={type:"error",error:ge}}),ke}if(M.signal.aborted)return ke;if(!It(M.method))for(let ge of Y){if(he[ge.route.id]?.type==="error")break;!he.hasOwnProperty(ge.route.id)&&!_.loaderData.hasOwnProperty(ge.route.id)&&(!_.errors||!_.errors.hasOwnProperty(ge.route.id))&&ge.shouldCallHandler()&&(he[ge.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ge.route.id}`)})}for(let[ge,me]of Object.entries(he))if(lE(me)){let ye=me.result;ke[ge]={type:"redirect",response:PS(ye,M,ge,Y,m)}}else ke[ge]=await KS(me);return ke}async function le(M,Y,Z,oe){let he=al(Z,M,oe,null),ke=Promise.all(Y.map(async ye=>{if(ye.matches&&ye.match&&ye.request&&ye.controller){let Ae=(await al(ye.request,ye.matches,oe,ye.key))[ye.match.route.id];return{[ye.key]:Ae}}else return Promise.resolve({[ye.key]:{type:"error",error:Rn(404,{pathname:ye.path})}})})),ge=await he,me=(await ke).reduce((ye,we)=>Object.assign(ye,we),{});return{loaderResults:ge,fetcherResults:me}}function de(){D=!0,C.forEach((M,Y)=>{se.has(Y)&&ee.add(Y),nt(Y)})}function Ce(M,Y,Z={}){_.fetchers.set(M,Y),yt({fetchers:new Map(_.fetchers)},{flushSync:(Z&&Z.flushSync)===!0})}function Re(M,Y,Z,oe={}){let he=ua(_.matches,Y);on(M),yt({errors:{[he.route.id]:Z},fetchers:new Map(_.fetchers)},{flushSync:(oe&&oe.flushSync)===!0})}function Pe(M){return ue.set(M,(ue.get(M)||0)+1),be.has(M)&&be.delete(M),_.fetchers.get(M)||BS}function $t(M,Y){nt(M,Y?.reason),Ce(M,jl(null))}function on(M){let Y=_.fetchers.get(M);se.has(M)&&!(Y&&Y.state==="loading"&&O.has(M))&&nt(M),C.delete(M),O.delete(M),F.delete(M),be.delete(M),ee.delete(M),_.fetchers.delete(M)}function Lt(M){let Y=(ue.get(M)||0)-1;Y<=0?(ue.delete(M),be.add(M)):ue.set(M,Y),yt({fetchers:new Map(_.fetchers)})}function nt(M,Y){let Z=se.get(M);Z&&(Z.abort(Y),se.delete(M))}function Ut(M){for(let Y of M){let Z=Pe(Y),oe=jl(Z.data);_.fetchers.set(Y,oe)}}function tt(){let M=[],Y=!1;for(let Z of F){let oe=_.fetchers.get(Z);Be(oe,`Expected fetcher: ${Z}`),oe.state==="loading"&&(F.delete(Z),M.push(Z),Y=!0)}return Ut(M),Y}function Bn(M){let Y=[];for(let[Z,oe]of O)if(oe<M){let he=_.fetchers.get(Z);Be(he,`Expected fetcher: ${Z}`),he.state==="loading"&&(nt(Z),O.delete(Z),Y.push(Z))}return Ut(Y),Y.length>0}function sn(M,Y){let Z=_.blockers.get(M)||zr;return xe.get(M)!==Y&&xe.set(M,Y),Z}function iu(M){_.blockers.delete(M),xe.delete(M)}function il(M,Y){let Z=_.blockers.get(M)||zr;Be(Z.state==="unblocked"&&Y.state==="blocked"||Z.state==="blocked"&&Y.state==="blocked"||Z.state==="blocked"&&Y.state==="proceeding"||Z.state==="blocked"&&Y.state==="unblocked"||Z.state==="proceeding"&&Y.state==="unblocked",`Invalid blocker state transition: ${Z.state} -> ${Y.state}`);let oe=new Map(_.blockers);oe.set(M,Y),yt({blockers:oe})}function pa({currentLocation:M,nextLocation:Y,historyAction:Z}){if(xe.size===0)return;xe.size>1&&zt(!1,"A router only supports one blocker at a time");let oe=Array.from(xe.entries()),[he,ke]=oe[oe.length-1],ge=_.blockers.get(he);if(!(ge&&ge.state==="proceeding")&&ke({currentLocation:M,nextLocation:Y,historyAction:Z}))return he}function Rl(M){let Y=Rn(404,{pathname:M}),Z=p||d,{matches:oe,route:he}=xo(Z);return{notFoundMatches:oe,route:he,error:Y}}function rl(M,Y,Z){if(k=M,z=Y,j=Z||null,!T&&_.navigation===Sf){T=!0;let oe=ru(_.location,_.matches);oe!=null&&yt({restoreScrollPosition:oe})}return()=>{k=null,z=null,j=null}}function ga(M,Y){return j&&j(M,Y.map(oe=>cS(oe,_.loaderData)))||M.key}function ya(M,Y){if(k&&z){let Z=ga(M,Y);k[Z]=z()}}function ru(M,Y){if(k){let Z=ga(M,Y),oe=k[Z];if(typeof oe=="number")return oe}return null}function va(M,Y,Z){if(t.patchRoutesOnNavigation)if(M){if(Object.keys(M[0].params).length>0)return{active:!0,matches:Br(Y,Z,m,!0)}}else return{active:!0,matches:Br(Y,Z,m,!0)||[]};return{active:!1,matches:null}}async function Dl(M,Y,Z,oe){if(!t.patchRoutesOnNavigation)return{type:"success",matches:M};let he=M;for(;;){let ke=p==null,ge=p||d,me=c;try{await t.patchRoutesOnNavigation({signal:Z,path:Y,matches:he,fetcherKey:oe,patch:(Ae,Te)=>{Z.aborted||oy(Ae,Te,ge,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 ye=ra(ge,Y,m),we=null;if(ye){if(Object.keys(ye[0].params).length===0)return{type:"success",matches:ye};if(we=Br(ge,Y,m,!0),!(we&&he.length<we.length&&Ol(he,we.slice(0,he.length))))return{type:"success",matches:ye}}if(we||(we=Br(ge,Y,m,!0)),!we||Ol(he,we))return{type:"success",matches:null};he=we}}function Ol(M,Y){return M.length===Y.length&&M.every((Z,oe)=>Z.route.id===Y[oe].route.id)}function is(M){c={},p=Ir(M,s,void 0,c)}function uu(M,Y,Z=!1){let oe=p==null;oy(M,Y,p||d,c,s,Z),oe&&(d=[...d],yt({}))}return H={get basename(){return m},get future(){return g},get state(){return _},get routes(){return d},get window(){return l},initialize:ze,subscribe:Ln,enableScrollRestoration:rl,navigate:Sn,fetch:ma,revalidate:zl,createHref:M=>t.history.createHref(M),encodeLocation:M=>t.history.encodeLocation(M),getFetcher:Pe,resetFetcher:$t,deleteFetcher:Lt,dispose:Nt,getBlocker:sn,deleteBlocker:iu,patchRoutes:uu,_internalFetchControllers:se,_internalSetRoutes:is,_internalSetStateDoNotUseOrYouWillBreakYourApp(M){yt(M)}},t.unstable_instrumentations&&(H=_S(H,t.unstable_instrumentations.map(M=>M.router).filter(Boolean))),H}function YS(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Xf(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=Ed(r||".",Sd(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=Cd(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})),el(p)}function ry(t,l,i){if(!i||!YS(i))return{path:l};if(i.formMethod&&!rE(i.formMethod))return{path:l,error:Rn(405,{method:i.formMethod})};let r=()=>({path:l,error:Rn(400,{type:"invalid-body"})}),s=(i.formMethod||"get").toUpperCase(),c=Gv(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,k])=>`${b}${S}=${k}
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=Zf(i.formData),p=i.formData;else if(i.body instanceof FormData)d=Zf(i.body),p=i.body;else if(i.body instanceof URLSearchParams)d=i.body,p=hy(d);else if(i.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(i.body),p=hy(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=fa(l);return t&&y.search&&Cd(y.search)&&d.append("index",""),y.search=`?${d}`,{path:el(y),submission:m}}function uy(t,l,i,r,o,s,c,d,p,m,y,g,b,S,k,j,z,T,N,R,P){let W=R?bn(R[1])?R[1].error:R[1].data:void 0,H=o.createURL(s.location),_=o.createURL(p),ae;if(y&&s.errors){let Q=Object.keys(s.errors)[0];ae=c.findIndex(D=>D.route.id===Q)}else if(R&&bn(R[1])){let Q=R[0];ae=c.findIndex(D=>D.route.id===Q)-1}let ce=R?R[1].statusCode:void 0,U=ce&&ce>=400,X={currentUrl:H,currentParams:s.matches[0]?.params||{},nextUrl:_,nextParams:c[0].params,...d,actionResult:W,actionStatus:ce},K=Kr(c),I=c.map((Q,D)=>{let{route:ee}=Q,se=null;if(ae!=null&&D>ae?se=!1:ee.lazy?se=!0:wd(ee)?y?se=Qf(ee,s.loaderData,s.errors):FS(s.loaderData,s.matches[D],Q)&&(se=!0):se=!1,se!==null)return $f(i,r,t,K,Q,m,l,se);let ve=!1;typeof P=="boolean"?ve=P:U?ve=!1:(g||H.pathname+H.search===_.pathname+_.search||H.search!==_.search||GS(s.matches[D],Q))&&(ve=!0);let A={...X,defaultShouldRevalidate:ve},O=Hr(Q,A);return $f(i,r,t,K,Q,m,l,O,A,P)}),te=[];return k.forEach((Q,D)=>{if(y||!c.some(ue=>ue.route.id===Q.routeId)||S.has(D))return;let ee=s.fetchers.get(D),se=ee&&ee.state!=="idle"&&ee.data===void 0,ve=ra(z,Q.path,T);if(!ve){if(N&&se)return;te.push({key:D,routeId:Q.routeId,path:Q.path,matches:null,match:null,request:null,controller:null});return}if(j.has(D))return;let A=No(ve,Q.path),O=new AbortController,F=Ti(o,Q.path,O.signal),C=null;if(b.has(D))b.delete(D),C=_i(i,r,F,ve,A,m,l);else if(se)g&&(C=_i(i,r,F,ve,A,m,l));else{let ue;typeof P=="boolean"?ue=P:U?ue=!1:ue=g;let be={...X,defaultShouldRevalidate:ue};Hr(A,be)&&(C=_i(i,r,F,ve,A,m,l,be))}C&&te.push({key:D,routeId:Q.routeId,path:Q.path,matches:C,match:A,request:F,controller:O})}),{dsMatches:I,revalidatingFetchers:te}}function wd(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function Qf(t,l,i){if(t.lazy)return!0;if(!wd(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 FS(t,l,i){let r=!l||i.route.id!==l.route.id,o=!t.hasOwnProperty(i.route.id);return r||o}function GS(t,l){let i=t.route.path;return t.pathname!==l.pathname||i!=null&&i.endsWith("*")&&t.params["*"]!==l.params["*"]}function Hr(t,l){if(t.route.shouldRevalidate){let i=t.route.shouldRevalidate(l);if(typeof i=="boolean")return i}return l.defaultShouldRevalidate}function oy(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=>Bv(m,g));y?p.push({existingRoute:y,newRoute:m}):d.push(m)}),d.length>0){let m=Ir(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]=Ir([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 Bv(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=>Bv(i,o))):!1}var sy=new WeakMap,Hv=({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=sy.get(o);c||(c={},sy.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)zt(!m,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),c[t]=Promise.resolve();else if(g)zt(!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},cy=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=cy.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 k in b){let j=b[k];if(j===void 0)continue;let z=oS(k),N=s[k]!==void 0&&k!=="hasErrorBoundary";z?zt(!z,"Route property "+k+" is not a supported property to be returned from a lazy route function. This property will be ignored."):N?zt(!N,`Route "${s.id}" has a static property "${k}" defined but its lazy function is also returning a value for this property. The lazy route property "${k}" will be ignored.`):S[k]=j}Object.assign(s,S),Object.assign(s,{...r(s),lazy:void 0})})();return cy.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=Hv({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 fy(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)?qv(t,()=>fy(t)):fy(t)}function qv(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=ua(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 Yv({request:c,params:d,context:p,unstable_pattern:m},y,l,i,r,o)}async function Yv(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 Yv(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),k=S!=null?r(S):void 0;return o(k)?k:g?k??g.value:(g={value:await b()},g.value)}catch(S){return await s(S,m,g)}}function Fv(t,l,i,r,o){let s=Hv({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 $f(t,l,i,r,o,s,c,d,p=null,m){let y=!1,g=Fv(t,l,i,o,s);return{...o,_lazyPromises:g,shouldLoad:d,shouldRevalidateArgs:p,shouldCallHandler(b){return y=!0,p?typeof m=="boolean"?Hr(o,{...p,defaultShouldRevalidate:m}):typeof b=="boolean"?Hr(o,{...p,defaultShouldRevalidate:b}):Hr(o,p):d},resolve(b){let{lazy:S,loader:k,middleware:j}=o.route,z=y||d||b&&!It(i.method)&&(S||k),T=j&&j.length>0&&!k&&!S;return z&&(It(i.method)||!T)?$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:Fv(t,l,i,p,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:$f(t,l,i,Kr(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:Kr(i),params:i[0].params,context:o,matches:i},p=await t({...c,fetcherKey:r,runClientMiddleware:m=>{let y=c;return qv(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,k=new Promise((T,N)=>S=N);p=()=>S(),t.signal.addEventListener("abort",p);let j=T=>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},...T!==void 0?[T]:[]),z=(async()=>{try{return{type:"data",result:await(s?s(N=>j(N)):j())}}catch(T){return{type:"error",result:T}}})();return Promise.race([z,k])};try{let b=m?i.route.action:i.route.loader;if(r||o)if(b){let S,[k]=await Promise.all([g(b).catch(j=>{S=j}),r,o]);if(S!==void 0)throw S;d=k}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 k=new URL(t.url),j=k.pathname+k.search;throw Rn(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),k=S.pathname+S.search;throw Rn(404,{pathname:k})}}catch(b){return{type:"error",result:b}}finally{p&&t.signal.removeEventListener("abort",p)}return d}async function ZS(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 KS(t){let{result:l,type:i}=t;if(kd(l)){let r;try{r=await ZS(l)}catch(o){return{type:"error",error:o}}return i==="error"?{type:"error",error:new Zr(l.status,l.statusText,r),statusCode:l.status,headers:l.headers}:{type:"data",data:r,statusCode:l.status,headers:l.headers}}return i==="error"?yy(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:Xr(l)?l.status:void 0,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"error",error:l,statusCode:Xr(l)?l.status:void 0}:yy(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"),!xd(s)){let c=r.slice(0,r.findIndex(d=>d.route.id===i)+1);s=Xf(new URL(l.url),c,o,s),t.headers.set("Location",s)}return t}function dy(t,l,i,r){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(xd(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 Ti(t,l,i,r){let o=t.createURL(Gv(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=Zf(r.formData):s.body=r.formData}return new Request(o,s)}function Zf(t){let l=new URLSearchParams;for(let[i,r]of t.entries())l.append(i,typeof r=="string"?r:r.name);return l}function hy(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(!Ha(S),"Cannot handle redirect results in processLoaderData"),bn(S)){let k=S.error;if(y!==void 0&&(k=y,y=void 0),c=c||{},o)c[b]=k;else{let j=ua(t,b);c[j.route.id]==null&&(c[j.route.id]=k)}r||(s[b]=Uv),p||(p=!0,d=Xr(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 my(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=ua(t.matches,y?.route.id);d&&d[S.route.id]||(d={...d,[S.route.id]:b.error}),t.fetchers.delete(m)}else if(Ha(b))Be(!1,"Unhandled fetcher revalidation redirect");else{let S=jl(b.data);t.fetchers.set(m,S)}}),{loaderData:c,errors:d}}function py(t,l,i,r){let o=Object.entries(l).filter(([,s])=>s!==Uv).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 gy(t){return t?bn(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function ua(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 xo(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 Rn(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 Zr(t||500,c,new Error(d),!0)}function So(t){let l=Object.entries(t);for(let i=l.length-1;i>=0;i--){let[r,o]=l[i];if(Ha(o))return{key:r,result:o}}}function Gv(t){let l=typeof t=="string"?fa(t):t;return el({...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 Zr(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 kd(t.result)&&Mv.has(t.result.status)}function bn(t){return t.type==="error"}function Ha(t){return(t&&t.type)==="redirect"}function yy(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function kd(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function aE(t){return Mv.has(t)}function iE(t){return kd(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 Cd(t){return new URLSearchParams(t).getAll("index").some(l=>l==="")}function No(t,l){let i=typeof l=="string"?fa(l).search:l.search;if(t[t.length-1].route.index&&Cd(i||""))return t[t.length-1];let r=zv(t);return r[r.length-1]}function vy(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 Ef(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 Nr(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(Lv);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(Lv,JSON.stringify(i))}catch(r){zt(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function by(){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 Ya=w.createContext(null);Ya.displayName="DataRouter";var Pr=w.createContext(null);Pr.displayName="DataRouterState";var Vv=w.createContext(!1);function fE(){return w.useContext(Vv)}var Td=w.createContext({isTransitioning:!1});Td.displayName="ViewTransition";var Iv=w.createContext(new Map);Iv.displayName="Fetchers";var dE=w.createContext(null);dE.displayName="Await";var Mn=w.createContext(null);Mn.displayName="Navigation";var Xo=w.createContext(null);Xo.displayName="Location";var Xn=w.createContext({outlet:null,matches:[],isDataRoute:!1});Xn.displayName="Route";var jd=w.createContext(null);jd.displayName="RouteError";var Xv="REACT_ROUTER_ERROR",hE="REDIRECT",mE="ROUTE_ERROR_RESPONSE";function pE(t){if(t.startsWith(`${Xv}:${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(`${Xv}:${mE}:{`))try{let l=JSON.parse(t.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new Zr(l.status,l.statusText,l.data)}catch{}}function yE(t,{relative:l}={}){Be(Jr(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:r}=w.useContext(Mn),{hash:o,pathname:s,search:c}=Wr(t,{relative:l}),d=s;return i!=="/"&&(d=s==="/"?i:Wn([i,s])),r.createHref({pathname:d,search:c,hash:o})}function Jr(){return w.useContext(Xo)!=null}function tl(){return Be(Jr(),"useLocation() may be used only in the context of a <Router> component."),w.useContext(Xo).location}var Qv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function $v(t){w.useContext(Mn).static||w.useLayoutEffect(t)}function Oi(){let{isDataRoute:t}=w.useContext(Xn);return t?NE():vE()}function vE(){Be(Jr(),"useNavigate() may be used only in the context of a <Router> component.");let t=w.useContext(Ya),{basename:l,navigator:i}=w.useContext(Mn),{matches:r}=w.useContext(Xn),{pathname:o}=tl(),s=JSON.stringify(Sd(r)),c=w.useRef(!1);return $v(()=>{c.current=!0}),w.useCallback((p,m={})=>{if(zt(c.current,Qv),!c.current)return;if(typeof p=="number"){i.go(p);return}let y=Ed(p,JSON.parse(s),o,m.relative==="path");t==null&&l!=="/"&&(y.pathname=y.pathname==="/"?l:Wn([l,y.pathname])),(m.replace?i.replace:i.push)(y,m.state,m)},[l,i,s,o,t])}var Zv=w.createContext(null);function Kv(){return w.useContext(Zv)}function bE(t){let l=w.useContext(Xn).outlet;return w.useMemo(()=>l&&w.createElement(Zv.Provider,{value:t},l),[l,t])}function Pv(){let{matches:t}=w.useContext(Xn),l=t[t.length-1];return l?l.params:{}}function Wr(t,{relative:l}={}){let{matches:i}=w.useContext(Xn),{pathname:r}=tl(),o=JSON.stringify(Sd(i));return w.useMemo(()=>Ed(t,JSON.parse(o),r,l==="path"),[t,o,r,l])}function xE(t,l,i,r,o){Be(Jr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=w.useContext(Mn),{matches:c}=w.useContext(Xn),d=c[c.length-1],p=d?d.params:{},m=d?d.pathname:"/",y=d?d.pathnameBase:"/",g=d&&d.route;{let N=g&&g.path||"";Wv(m,!g||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${N}">) 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="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let b=tl(),S;S=b;let k=S.pathname||"/",j=k;if(y!=="/"){let N=y.replace(/^\//,"").split("/");j="/"+k.replace(/^\//,"").split("/").slice(N.length).join("/")}let z=ra(t,{pathname:j});return zt(g||z!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),zt(z==null||z[z.length-1].route.element!==void 0||z[z.length-1].route.Component!==void 0||z[z.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(z&&z.map(N=>Object.assign({},N,{params:Object.assign({},p,N.params),pathname:Wn([y,s.encodeLocation?s.encodeLocation(N.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?y:Wn([y,s.encodeLocation?s.encodeLocation(N.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),c,i,r,o)}function SE(){let t=zE(),l=Xr(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=w.createElement(w.Fragment,null,w.createElement("p",null,"💿 Hey developer 👋"),w.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",w.createElement("code",{style:s},"ErrorBoundary")," or"," ",w.createElement("code",{style:s},"errorElement")," prop on your route.")),w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},l),i?w.createElement("pre",{style:o},i):null,c)}var EE=w.createElement(SE,null),Jv=class extends w.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?w.createElement(Xn.Provider,{value:this.props.routeContext},w.createElement(jd.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?w.createElement(wE,{error:t},l):l}};Jv.contextType=Vv;var wf=new WeakMap;function wE({children:t,error:l}){let{basename:i}=w.useContext(Mn);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let r=pE(l.digest);if(r){let o=wf.get(l);if(o)throw o;let s=Rv(r.location,i);if(Nv&&!wf.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 wf.set(l,c),c}return w.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function kE({routeContext:t,match:l,children:i}){let r=w.useContext(Ya);return r&&r.static&&r.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=l.route.id),w.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,k=g.route.loader&&!b.hasOwnProperty(g.route.id)&&(!S||S[g.route.id]===void 0);if(g.route.lazy||k){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:Kr(i.matches),errorInfo:g})}:void 0;return s.reduceRight((y,g,b)=>{let S,k=!1,j=null,z=null;i&&(S=c&&g.route.id?c[g.route.id]:void 0,j=g.route.errorElement||EE,d&&(p<0&&b===0?(Wv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,z=null):p===b&&(k=!0,z=g.route.hydrateFallbackElement||null)));let T=l.concat(s.slice(0,b+1)),N=()=>{let R;return S?R=j:k?R=z:g.route.Component?R=w.createElement(g.route.Component,null):g.route.element?R=g.route.element:R=y,w.createElement(kE,{match:g,routeContext:{outlet:y,matches:T,isDataRoute:i!=null},children:R})};return i&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?w.createElement(Jv,{location:i.location,revalidation:i.revalidation,component:j,error:S,children:N(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:m}):N()},null)}function Ad(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=w.useContext(Ya);return Be(l,Ad(t)),l}function jE(t){let l=w.useContext(Pr);return Be(l,Ad(t)),l}function AE(t){let l=w.useContext(Xn);return Be(l,Ad(t)),l}function _d(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 _E(){return _d("useRouteId")}function zE(){let t=w.useContext(jd),l=jE("useRouteError"),i=_d("useRouteError");return t!==void 0?t:l.errors?.[i]}function NE(){let{router:t}=TE("useNavigate"),l=_d("useNavigate"),i=w.useRef(!1);return $v(()=>{i.current=!0}),w.useCallback(async(o,s={})=>{zt(i.current,Qv),i.current&&(typeof o=="number"?await t.navigate(o):await t.navigate(o,{fromRouteId:l,...s}))},[t,l])}var xy={};function Wv(t,l,i){!l&&!xy[t]&&(xy[t]=!0,zt(!1,i))}var Sy={};function Ey(t,l){!t&&!Sy[l]&&(Sy[l]=!0,console.warn(l))}var RE="useOptimistic",wy=Qx[RE],DE=()=>{};function OE(t){return wy?wy(t):[t,DE]}function ME(t){let l={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&zt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(l,{element:w.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&zt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(l,{hydrateFallbackElement:w.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&zt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(l,{errorElement:w.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]=w.useState(t.state),[d,p]=OE(s),[m,y]=w.useState(),[g,b]=w.useState({isTransitioning:!1}),[S,k]=w.useState(),[j,z]=w.useState(),[T,N]=w.useState(),R=w.useRef(new Map),P=w.useCallback((ae,{deletedFetchers:ce,newErrors:U,flushSync:X,viewTransitionOpts:K})=>{U&&i&&Object.values(U).forEach(te=>i(te,{location:ae.location,params:ae.matches[0]?.params??{},unstable_pattern:Kr(ae.matches)})),ae.fetchers.forEach((te,Q)=>{te.data!==void 0&&R.current.set(Q,te.data)}),ce.forEach(te=>R.current.delete(te)),Ey(X===!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 I=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(Ey(K==null||I,"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."),!K||!I){l&&X?l(()=>c(ae)):r===!1?c(ae):w.startTransition(()=>{r===!0&&p(te=>ky(te,ae)),c(ae)});return}if(l&&X){l(()=>{j&&(S?.resolve(),j.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:K.currentLocation,nextLocation:K.nextLocation})});let te=t.window.document.startViewTransition(()=>{l(()=>c(ae))});te.finished.finally(()=>{l(()=>{k(void 0),z(void 0),y(void 0),b({isTransitioning:!1})})}),l(()=>z(te));return}j?(S?.resolve(),j.skipTransition(),N({state:ae,currentLocation:K.currentLocation,nextLocation:K.nextLocation})):(y(ae),b({isTransitioning:!0,flushSync:!1,currentLocation:K.currentLocation,nextLocation:K.nextLocation}))},[t.window,l,j,S,r,p,i]);w.useLayoutEffect(()=>t.subscribe(P),[t,P]),w.useEffect(()=>{g.isTransitioning&&!g.flushSync&&k(new UE)},[g]),w.useEffect(()=>{if(S&&m&&t.window){let ae=m,ce=S.promise,U=t.window.document.startViewTransition(async()=>{r===!1?c(ae):w.startTransition(()=>{r===!0&&p(X=>ky(X,ae)),c(ae)}),await ce});U.finished.finally(()=>{k(void 0),z(void 0),y(void 0),b({isTransitioning:!1})}),z(U)}},[m,S,t.window,r,p]),w.useEffect(()=>{S&&m&&d.location.key===m.location.key&&S.resolve()},[S,j,d.location,m]),w.useEffect(()=>{!g.isTransitioning&&T&&(y(T.state),b({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}),N(void 0))},[g.isTransitioning,T]);let W=w.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:ae=>t.navigate(ae),push:(ae,ce,U)=>t.navigate(ae,{state:ce,preventScrollReset:U?.preventScrollReset}),replace:(ae,ce,U)=>t.navigate(ae,{replace:!0,state:ce,preventScrollReset:U?.preventScrollReset})}),[t]),H=t.basename||"/",_=w.useMemo(()=>({router:t,navigator:W,static:!1,basename:H,onError:i}),[t,W,H,i]);return w.createElement(w.Fragment,null,w.createElement(Ya.Provider,{value:_},w.createElement(Pr.Provider,{value:d},w.createElement(Iv.Provider,{value:R.current},w.createElement(Td.Provider,{value:g},w.createElement(FE,{basename:H,location:d.location,navigationType:d.historyAction,navigator:W,unstable_useTransitions:r},w.createElement(HE,{routes:t.routes,future:t.future,state:d,onError:i})))))),null)}function ky(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=w.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 FE({basename:t="/",children:l=null,location:i,navigationType:r="POP",navigator:o,static:s=!1,unstable_useTransitions:c}){Be(!Jr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),p=w.useMemo(()=>({basename:d,navigator:o,static:s,unstable_useTransitions:c,future:{}}),[d,o,s,c]);typeof i=="string"&&(i=fa(i));let{pathname:m="/",search:y="",hash:g="",state:b=null,key:S="default"}=i,k=w.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 zt(k!=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.`),k==null?null:w.createElement(Mn.Provider,{value:p},w.createElement(Xo.Provider,{children:l,value:k}))}var Ro="get",Do="application/x-www-form-urlencoded";function Qo(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function GE(t){return Qo(t)&&t.tagName.toLowerCase()==="button"}function VE(t){return Qo(t)&&t.tagName.toLowerCase()==="form"}function IE(t){return Qo(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)}var Eo=null;function $E(){if(Eo===null)try{new FormData(document.createElement("form"),0),Eo=!1}catch{Eo=!0}return Eo}var ZE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function kf(t){return t!=null&&!ZE.has(t)?(zt(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Do}"`),null):t}function KE(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=kf(t.getAttribute("enctype"))||Do,s=new FormData(t)}else if(GE(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=kf(t.getAttribute("formenctype"))||kf(d.getAttribute("enctype"))||Do,s=new FormData(d,t),!$E()){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(Qo(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=Ro,r=null,o=Do,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 zd(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function PE(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 JE(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 WE(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 ew(t,l,i){let r=await Promise.all(t.map(async o=>{let s=l.routes[o.route.id];if(s){let c=await JE(s,i);return c.links?c.links():[]}return[]}));return aw(r.flat(1).filter(WE).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Cy(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 tw(t,l,{includeHydrateFallback:i}={}){return nw(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 nw(t){return[...new Set(t)]}function lw(t){let l={},i=Object.keys(t).sort();for(let r of i)l[r]=t[r];return l}function aw(t,l){let i=new Set;return new Set(l),t.reduce((r,o)=>{let s=JSON.stringify(lw(o));return i.has(s)||(i.add(s),r.push({key:s,link:o})),r},[])}function eb(){let t=w.useContext(Ya);return zd(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function iw(){let t=w.useContext(Pr);return zd(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Nd=w.createContext(void 0);Nd.displayName="FrameworkContext";function tb(){let t=w.useContext(Nd);return zd(t,"You must render this element inside a <HydratedRouter> element"),t}function rw(t,l){let i=w.useContext(Nd),[r,o]=w.useState(!1),[s,c]=w.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:m,onMouseLeave:y,onTouchStart:g}=l,b=w.useRef(null);w.useEffect(()=>{if(t==="render"&&c(!0),t==="viewport"){let j=T=>{T.forEach(N=>{c(N.isIntersecting)})},z=new IntersectionObserver(j,{threshold:.5});return b.current&&z.observe(b.current),()=>{z.disconnect()}}},[t]),w.useEffect(()=>{if(r){let j=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(j)}}},[r]);let S=()=>{o(!0)},k=()=>{o(!1),c(!1)};return i?t!=="intent"?[s,b,{}]:[s,b,{onFocus:Rr(d,S),onBlur:Rr(p,k),onMouseEnter:Rr(m,S),onMouseLeave:Rr(y,k),onTouchStart:Rr(g,S)}]:[!1,b,{}]}function Rr(t,l){return i=>{t&&t(i),i.defaultPrevented||l(i)}}function uw({page:t,...l}){let{router:i}=eb(),r=w.useMemo(()=>ra(i.routes,t,i.basename),[i.routes,t,i.basename]);return r?w.createElement(sw,{page:t,matches:r,...l}):null}function ow(t){let{manifest:l,routeModules:i}=tb(),[r,o]=w.useState([]);return w.useEffect(()=>{let s=!1;return ew(t,l,i).then(c=>{s||o(c)}),()=>{s=!0}},[t,l,i]),r}function sw({page:t,matches:l,...i}){let r=tl(),{future:o,manifest:s,routeModules:c}=tb(),{basename:d}=eb(),{loaderData:p,matches:m}=iw(),y=w.useMemo(()=>Cy(t,l,m,s,r,"data"),[t,l,m,s,r]),g=w.useMemo(()=>Cy(t,l,m,s,r,"assets"),[t,l,m,s,r]),b=w.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let j=new Set,z=!1;if(l.forEach(N=>{let R=s.routes[N.route.id];!R||!R.hasLoader||(!y.some(P=>P.route.id===N.route.id)&&N.route.id in p&&c[N.route.id]?.shouldRevalidate||R.hasClientLoader?z=!0:j.add(N.route.id))}),j.size===0)return[];let T=PE(t,d,o.unstable_trailingSlashAwareDataRequests,"data");return z&&j.size>0&&T.searchParams.set("_routes",l.filter(N=>j.has(N.route.id)).map(N=>N.route.id).join(",")),[T.pathname+T.search]},[d,o.unstable_trailingSlashAwareDataRequests,p,r,s,y,l,t,c]),S=w.useMemo(()=>tw(g,s),[g,s]),k=ow(g);return w.createElement(w.Fragment,null,b.map(j=>w.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...i})),S.map(j=>w.createElement("link",{key:j,rel:"modulepreload",href:j,...i})),k.map(({key:j,link:z})=>w.createElement("link",{key:j,nonce:i.nonce,...z,crossOrigin:z.crossOrigin??i.crossOrigin})))}function cw(...t){return l=>{t.forEach(i=>{typeof i=="function"?i(l):i!=null&&(i.current=l)})}}var fw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{fw&&(window.__reactRouterVersion="7.13.0")}catch{}function dw(t,l){return qS({basename:l?.basename,getContext:l?.getContext,future:l?.future,history:nS({window:l?.window}),hydrationData:hw(),routes:t,mapRouteProperties:ME,hydrationRouteProperties:LE,dataStrategy:l?.dataStrategy,patchRoutesOnNavigation:l?.patchRoutesOnNavigation,window:l?.window,unstable_instrumentations:l?.unstable_instrumentations}).initialize()}function hw(){let t=window?.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:mw(t.errors)}),t}function mw(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 Zr(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 nb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,lb=w.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},k){let{basename:j,unstable_useTransitions:z}=w.useContext(Mn),T=typeof m=="string"&&nb.test(m),N=Rv(m,j);m=N.to;let R=yE(m,{relative:o}),[P,W,H]=rw(r,S),_=vw(m,{replace:c,state:d,target:p,preventScrollReset:y,relative:o,viewTransition:g,unstable_defaultShouldRevalidate:b,unstable_useTransitions:z});function ae(U){l&&l(U),U.defaultPrevented||_(U)}let ce=w.createElement("a",{...S,...H,href:N.absoluteURL||R,onClick:N.isExternal||s?l:ae,ref:cw(k,W),target:p,"data-discover":!T&&i==="render"?"true":void 0});return P&&!T?w.createElement(w.Fragment,null,ce,w.createElement(uw,{page:R})):ce});lb.displayName="Link";var pw=w.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=Wr(c,{relative:m.relative}),b=tl(),S=w.useContext(Pr),{navigator:k,basename:j}=w.useContext(Mn),z=S!=null&&ww(g)&&d===!0,T=k.encodeLocation?k.encodeLocation(g).pathname:g.pathname,N=b.pathname,R=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;i||(N=N.toLowerCase(),R=R?R.toLowerCase():null,T=T.toLowerCase()),R&&j&&(R=On(R,j)||R);const P=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let W=N===T||!o&&N.startsWith(T)&&N.charAt(P)==="/",H=R!=null&&(R===T||!o&&R.startsWith(T)&&R.charAt(T.length)==="/"),_={isActive:W,isPending:H,isTransitioning:z},ae=W?l:void 0,ce;typeof r=="function"?ce=r(_):ce=[r,W?"active":null,H?"pending":null,z?"transitioning":null].filter(Boolean).join(" ");let U=typeof s=="function"?s(_):s;return w.createElement(lb,{...m,"aria-current":ae,className:ce,ref:y,style:U,to:c,viewTransition:d},typeof p=="function"?p(_):p)});pw.displayName="NavLink";var gw=w.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},k)=>{let{unstable_useTransitions:j}=w.useContext(Mn),z=Sw(),T=Ew(d,{relative:m}),N=c.toLowerCase()==="get"?"get":"post",R=typeof d=="string"&&nb.test(d),P=W=>{if(p&&p(W),W.defaultPrevented)return;W.preventDefault();let H=W.nativeEvent.submitter,_=H?.getAttribute("formmethod")||c,ae=()=>z(H||W.currentTarget,{fetcherKey:l,method:_,navigate:i,replace:o,state:s,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b});j&&i!==!1?w.startTransition(()=>ae()):ae()};return w.createElement("form",{ref:k,method:N,action:T,onSubmit:r?p:P,...S,"data-discover":!R&&t==="render"?"true":void 0})});gw.displayName="Form";function yw(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ab(t){let l=w.useContext(Ya);return Be(l,yw(t)),l}function vw(t,{target:l,replace:i,state:r,preventScrollReset:o,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:d,unstable_useTransitions:p}={}){let m=Oi(),y=tl(),g=Wr(t,{relative:s});return w.useCallback(b=>{if(QE(b,l)){b.preventDefault();let S=i!==void 0?i:el(y)===el(g),k=()=>m(t,{replace:S,state:r,preventScrollReset:o,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:d});p?w.startTransition(()=>k()):k()}},[y,m,g,i,r,l,t,o,s,c,d,p])}var bw=0,xw=()=>`__${String(++bw)}__`;function Sw(){let{router:t}=ab("useSubmit"),{basename:l}=w.useContext(Mn),i=_E(),r=t.fetch,o=t.navigate;return w.useCallback(async(s,c={})=>{let{action:d,method:p,encType:m,formData:y,body:g}=KE(s,l);if(c.navigate===!1){let b=c.fetcherKey||xw();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 Ew(t,{relative:l}={}){let{basename:i}=w.useContext(Mn),r=w.useContext(Xn);Be(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),s={...Wr(t||".",{relative:l})},c=tl();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:Wn([i,s.pathname])),el(s)}function ww(t,{relative:l}={}){let i=w.useContext(Td);Be(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=ab("useViewTransitionState"),o=Wr(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 Uo(o.pathname,c)!=null||Uo(o.pathname,s)!=null}var $o=kv();function kw(t){return w.createElement(BE,{flushSync:$o.flushSync,...t})}const Rd="electric-agent:anthropic-api-key",Zo="electric-agent:oauth-token",Dd="electric-agent:oauth-manual",Od="electric-agent:gh-token";function ib(){return localStorage.getItem(Rd)}function Cw(t){localStorage.setItem(Rd,t)}function Tw(){localStorage.removeItem(Rd)}function jw(){return!!ib()}function Kf(){return localStorage.getItem(Zo)}function Aw(t){localStorage.setItem(Zo,t)}function _w(){localStorage.removeItem(Zo),localStorage.removeItem(Dd)}function zw(t){localStorage.setItem(Zo,t),localStorage.setItem(Dd,"1")}function Oo(){return localStorage.getItem(Dd)==="1"}function Md(){return localStorage.getItem(Od)}function Nw(t){localStorage.setItem(Od,t)}function Rw(){localStorage.removeItem(Od)}function Dw(){return!!Md()}const Pf="electric-agent:font-size";function rb(){const t=localStorage.getItem(Pf);return t==="large"||t==="larger"?t:"default"}function Ow(t){t==="default"?localStorage.removeItem(Pf):localStorage.setItem(Pf,t)}function ub(t){const l=t??rb();document.documentElement.setAttribute("data-font-size",l)}const Jf="electric-agent:agent-mode";function ob(){const t=localStorage.getItem(Jf);return t==="electric-agent"?t:"claude-code"}function Mw(t){t==="claude-code"?localStorage.removeItem(Jf):localStorage.setItem(Jf,t)}function eu(){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 Lw="/api";function sb(){const t={},l=ib(),i=Kf(),r=Md();return l?t.apiKey=l:i&&(t.oauthToken=i),r&&(t.ghToken=r),t}function cb(){const t=Md();return t?{"X-GH-Token":t}:{}}function Uw(){const t=eu();return{"X-Participant-Id":t.id,"X-Participant-Name":t.displayName}}async function Gt(t,l){const i={...Uw(),...l?.headers};l?.body&&(i["Content-Type"]="application/json");const r=await fetch(`${Lw}${t}`,{method:l?.method??"GET",headers:Object.keys(i).length>0?i:void 0,body:l?.body?JSON.stringify(l.body):void 0});if(!r.ok){const o=await r.json().catch(()=>({error:r.statusText}));throw new Error(o.error||r.statusText)}return r.json()}function Bw(t,l){return Gt("/sessions",{method:"POST",body:{description:t,name:l,agentMode:ob(),...sb()}})}function Hw(t,l){return Gt(`/sessions/${t}/iterate`,{method:"POST",body:{request:l}})}function Ni(t,l,i){return Gt(`/sessions/${t}/respond`,{method:"POST",body:{gate:l,...i}})}function qw(t){return Gt(`/sessions/${t}/cancel`,{method:"POST"})}function Yw(t){return Gt(`/sessions/${t}`,{method:"DELETE"})}function Fw(t){return Gt(`/sessions/${t}/app-status`)}function Gw(){return Gt("/provision-electric",{method:"POST"})}function Vw(){return Gt("/github/repos",{headers:cb()})}function Iw(t){return Gt(`/github/repos/${t}/branches`,{headers:cb()})}function Xw(){return Gt("/credentials/keychain")}function Qw(t,l){return Gt("/sessions/resume",{method:"POST",body:{repoUrl:t,branch:l,...sb()}})}function $w(t){const l=eu();return Gt("/shared-sessions",{method:"POST",body:{name:t,participant:l}})}function Zw(t){return Gt(`/shared-sessions/join/${t}`)}function Kw(t){const l=eu();return Gt(`/shared-sessions/${t}/join`,{method:"POST",body:{participant:l}})}function Pw(t){const l=eu();return Gt(`/shared-sessions/${t}/leave`,{method:"POST",body:{participantId:l.id}})}function Jw(t,l,i,r){const o=eu();return Gt(`/shared-sessions/${t}/sessions`,{method:"POST",body:{sessionId:l,sessionName:i,sessionDescription:r,linkedBy:o.displayName}})}function Ww(t,l){return Gt(`/shared-sessions/${t}/sessions/${l}`,{method:"DELETE"})}const Ld="electric-agent:joined-shared-sessions";function Bo(){try{const t=localStorage.getItem(Ld);return t?JSON.parse(t):[]}catch{return[]}}function ek(t){const i=Bo().filter(r=>r.code!==t.code);i.push(t),localStorage.setItem(Ld,JSON.stringify(i))}function fb(t){const i=Bo().filter(r=>r.code!==t);localStorage.setItem(Ld,JSON.stringify(i))}function Ud(t,l,i){w.useEffect(()=>{if(i?.disabled)return;function r(o){if(!i?.allowInInputs){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 Mi(t,l){w.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 Ty=[{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 tk(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 db(t){return Ty[tk(t)%Ty.length]}function nk(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 lk({projectName:t,onConfirm:l,onCancel:i}){return Mi(i),Ud("Enter",l),$o.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 ak({session:t,active:l,onClick:i,onDelete:r}){const[o,s]=w.useState(!1),d=`session-avatar ${`session-avatar-${t.status}`}`,p=db(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:nk(t.lastActiveAt)})})]}),v.jsx("button",{type:"button",className:"session-item-delete",onClick:g=>{g.stopPropagation(),s(!0)},title:"Delete session",children:"×"})]}),o&&v.jsx(lk,{projectName:t.projectName,onConfirm:()=>{s(!1),r()},onCancel:()=>s(!1)})]})}function ik({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 rk(){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 uk({collapsed:t,onToggle:l,mobileOpen:i,onMobileClose:r}){const{sessions:o,pendingProject:s,handleDeleteSession:c,joinedSharedSessions:d,refreshJoinedSharedSessions:p}=Wo(),m=Oi(),y=tl(),[g,b]=w.useState(!1),[S,k]=w.useState(""),[j,z]=w.useState(!1),[T,N]=w.useState("");w.useEffect(()=>{t&&(b(!1),k(""),z(!1),N(""))},[t]);const R=y.pathname.startsWith("/session/")?y.pathname.split("/session/")[1]:null,P=y.pathname.startsWith("/shared/")?y.pathname.split("/shared/")[1]:null,W=[...o].sort((U,X)=>new Date(X.lastActiveAt).getTime()-new Date(U.lastActiveAt).getTime()),H=U=>{m(U),r?.()},_=w.useCallback(()=>{const U=S.trim();U&&(m(`/shared/${U}`),k(""),b(!1),r?.())},[S,m,r]),ae=w.useCallback(U=>{fb(U),p()},[p]),ce=w.useCallback(async()=>{const U=T.trim();if(U)try{const{code:X}=await $w(U);N(""),z(!1),m(`/shared/${X}`),r?.()}catch(X){console.error("Failed to create shared session:",X)}},[T,m,r]);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:()=>H("/"),title:"New 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 App"})})]}),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..."})})]})]}),W.map(U=>v.jsx(ak,{session:U,active:U.id===R,onClick:()=>H(`/session/${U.id}`),onDelete:()=>c(U.id)},U.id)),v.jsx("div",{className:"sidebar-section-label",children:"Rooms"}),d.map(U=>{const X=db(U.id),K=U.name.split(/[-_ ]+/).slice(0,2).map(I=>I.charAt(0).toUpperCase()).join("");return v.jsxs("div",{className:`session-item ${P===U.code?"active":""}`,onClick:()=>H(`/shared/${U.code}`),title:U.name,children:[v.jsx("span",{className:"session-avatar session-avatar-shared",style:{background:X.bg,color:X.fg},children:K}),v.jsxs("div",{className:"session-item-details",children:[v.jsx("div",{className:"session-item-name",children:U.name}),v.jsx("div",{className:"session-item-meta",children:v.jsx("span",{children:U.code})})]}),v.jsx("button",{type:"button",className:"session-item-delete",onClick:I=>{I.stopPropagation(),ae(U.code)},title:"Remove",children:"×"})]},U.code)}),j&&!t?v.jsxs("div",{className:"sidebar-join-input",children:[v.jsx("input",{type:"text",placeholder:"Room name...",value:T,onChange:U=>N(U.target.value),onKeyDown:U=>{U.key==="Enter"&&ce(),U.key==="Escape"&&(z(!1),N(""))}}),v.jsx("button",{type:"button",className:"sidebar-join-go",onClick:ce,disabled:!T.trim(),children:"Go"})]}):v.jsxs("div",{className:"session-item",onClick:()=>{t&&l(),z(!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"})})]}),g&&!t?v.jsxs("div",{className:"sidebar-join-input",children:[v.jsx("input",{type:"text",placeholder:"Invite code...",value:S,onChange:U=>k(U.target.value),onKeyDown:U=>{U.key==="Enter"&&_(),U.key==="Escape"&&(b(!1),k(""))}}),v.jsx("button",{type:"button",className:"sidebar-join-go",onClick:_,disabled:!S.trim(),children:"Go"})]}):v.jsxs("div",{className:"session-item",onClick:()=>{t&&l(),b(!0)},title:"Join room",children:[v.jsx("span",{className:"session-avatar new-project-avatar",children:v.jsx(rk,{})}),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(ik,{collapsed:t}),v.jsx("span",{className:"sidebar-collapse-label",children:t?"Expand menu":"Collapse menu"})]})})]})}let ok={data:""},sk=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||ok},ck=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,fk=/\/\*[^]*?\*\/| +/g,jy=/\n+/g,oa=(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"?oa(c,s):s+"{"+oa(c,s[1]=="k"?"":l)+"}":typeof c=="object"?r+=oa(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+=oa.p?oa.p(s,c):s+":"+c+";")}return i+(l&&o?l+"{"+o+"}":o)+r},Cl={},hb=t=>{if(typeof t=="object"){let l="";for(let i in t)l+=i+hb(t[i]);return l}return t},dk=(t,l,i,r,o)=>{let s=hb(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=ck.exec(m.replace(fk,""));)y[4]?b.shift():y[3]?(g=y[3].replace(jy," ").trim(),b.unshift(b[0][g]=b[0][g]||{})):b[0][y[1]]=y[2].replace(jy," ").trim();return b[0]})(t);Cl[c]=oa(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},hk=(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?"":oa(d,""):d===!1?"":d}return r+o+(c??"")},"");function Ko(t){let l=this||{},i=t.call?t(l.p):t;return dk(i.unshift?i.raw?hk(i,[].slice.call(arguments,1),l.p):i.reduce((r,o)=>Object.assign(r,o&&o.call?o(l.p):o),{}):i,sk(l.target),l.g,l.o,l.k)}let mb,Wf,ed;Ko.bind({g:1});let Al=Ko.bind({k:1});function mk(t,l,i,r){oa.p=l,mb=t,Wf=i,ed=r}function da(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:Wf&&Wf()},d),i.o=/ *go\d+/.test(p),d.className=Ko.apply(i,r)+(p?" "+p:"");let m=t;return t[0]&&(m=d.as||t,delete d.as),ed&&m[0]&&ed(d),mb(m,d)}return o}}var pk=t=>typeof t=="function",Ho=(t,l)=>pk(t)?t(l):t,gk=(()=>{let t=0;return()=>(++t).toString()})(),pb=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let l=matchMedia("(prefers-reduced-motion: reduce)");t=!l||l.matches}return t}})(),yk=20,Bd="default",gb=(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 gb(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}))}}},Mo=[],yb={toasts:[],pausedAt:void 0,settings:{toastLimit:yk}},Jn={},vb=(t,l=Bd)=>{Jn[l]=gb(Jn[l]||yb,t),Mo.forEach(([i,r])=>{i===l&&r(Jn[l])})},bb=t=>Object.keys(Jn).forEach(l=>vb(t,l)),vk=t=>Object.keys(Jn).find(l=>Jn[l].toasts.some(i=>i.id===t)),Po=(t=Bd)=>l=>{vb(l,t)},bk={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},xk=(t={},l=Bd)=>{let[i,r]=w.useState(Jn[l]||yb),o=w.useRef(Jn[l]);w.useEffect(()=>(o.current!==Jn[l]&&r(Jn[l]),Mo.push([l,r]),()=>{let c=Mo.findIndex(([d])=>d===l);c>-1&&Mo.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||bk[c.type],style:{...t.style,...(m=t[c.type])==null?void 0:m.style,...c.style}}});return{...i,toasts:s}},Sk=(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||gk()}),tu=t=>(l,i)=>{let r=Sk(l,t,i);return Po(r.toasterId||vk(r.id))({type:2,toast:r}),r.id},Dt=(t,l)=>tu("blank")(t,l);Dt.error=tu("error");Dt.success=tu("success");Dt.loading=tu("loading");Dt.custom=tu("custom");Dt.dismiss=(t,l)=>{let i={type:3,toastId:t};l?Po(l)(i):bb(i)};Dt.dismissAll=t=>Dt.dismiss(void 0,t);Dt.remove=(t,l)=>{let i={type:4,toastId:t};l?Po(l)(i):bb(i)};Dt.removeAll=t=>Dt.remove(void 0,t);Dt.promise=(t,l,i)=>{let r=Dt.loading(l.loading,{...i,...i?.loading});return typeof t=="function"&&(t=t()),t.then(o=>{let s=l.success?Ho(l.success,o):void 0;return s?Dt.success(s,{id:r,...i,...i?.success}):Dt.dismiss(r),o}).catch(o=>{let s=l.error?Ho(l.error,o):void 0;s?Dt.error(s,{id:r,...i,...i?.error}):Dt.dismiss(r)}),t};var Ek=1e3,wk=(t,l="default")=>{let{toasts:i,pausedAt:r}=xk(t,l),o=w.useRef(new Map).current,s=w.useCallback((g,b=Ek)=>{if(o.has(g))return;let S=setTimeout(()=>{o.delete(g),c({type:4,toastId:g})},b);o.set(g,S)},[]);w.useEffect(()=>{if(r)return;let g=Date.now(),b=i.map(S=>{if(S.duration===1/0)return;let k=(S.duration||0)+S.pauseDuration-(g-S.createdAt);if(k<0){S.visible&&Dt.dismiss(S.id);return}return setTimeout(()=>Dt.dismiss(S.id,l),k)});return()=>{b.forEach(S=>S&&clearTimeout(S))}},[i,r,l]);let c=w.useCallback(Po(l),[l]),d=w.useCallback(()=>{c({type:5,time:Date.now()})},[c]),p=w.useCallback((g,b)=>{c({type:1,toast:{id:g,height:b}})},[c]),m=w.useCallback(()=>{r&&c({type:6,time:Date.now()})},[r,c]),y=w.useCallback((g,b)=>{let{reverseOrder:S=!1,gutter:k=8,defaultPosition:j}=b||{},z=i.filter(R=>(R.position||j)===(g.position||j)&&R.height),T=z.findIndex(R=>R.id===g.id),N=z.filter((R,P)=>P<T&&R.visible).length;return z.filter(R=>R.visible).slice(...S?[N+1]:[0,N]).reduce((R,P)=>R+(P.height||0)+k,0)},[i]);return w.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}}},kk=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
- }`,Ck=Al`
21
- from {
22
- transform: scale(0);
23
- opacity: 0;
24
- }
25
- to {
26
- transform: scale(1);
27
- opacity: 1;
28
- }`,Tk=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
- }`,jk=da("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: ${kk} 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: ${Ck} 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: ${Tk} 0.15s ease-out forwards;
66
- animation-delay: 180ms;
67
- transform: rotate(90deg);
68
- }
69
- `,Ak=Al`
70
- from {
71
- transform: rotate(0deg);
72
- }
73
- to {
74
- transform: rotate(360deg);
75
- }
76
- `,_k=da("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: ${Ak} 1s linear infinite;
85
- `,zk=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
- }`,Nk=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
- }`,Rk=da("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: ${zk} 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: ${Nk} 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
- `,Dk=da("div")`
135
- position: absolute;
136
- `,Ok=da("div")`
137
- position: relative;
138
- display: flex;
139
- justify-content: center;
140
- align-items: center;
141
- min-width: 20px;
142
- min-height: 20px;
143
- `,Mk=Al`
144
- from {
145
- transform: scale(0.6);
146
- opacity: 0.4;
147
- }
148
- to {
149
- transform: scale(1);
150
- opacity: 1;
151
- }`,Lk=da("div")`
152
- position: relative;
153
- transform: scale(0.6);
154
- opacity: 0.4;
155
- min-width: 20px;
156
- animation: ${Mk} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
157
- forwards;
158
- `,Uk=({toast:t})=>{let{icon:l,type:i,iconTheme:r}=t;return l!==void 0?typeof l=="string"?w.createElement(Lk,null,l):l:i==="blank"?null:w.createElement(Ok,null,w.createElement(_k,{...r}),i!=="loading"&&w.createElement(Dk,null,i==="error"?w.createElement(jk,{...r}):w.createElement(Rk,{...r})))},Bk=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
- `,Hk=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
- `,qk="0%{opacity:0;} 100%{opacity:1;}",Yk="0%{opacity:1;} 100%{opacity:0;}",Fk=da("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
- `,Gk=da("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
- `,Vk=(t,l)=>{let i=t.includes("top")?1:-1,[r,o]=pb()?[qk,Yk]:[Bk(i),Hk(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)`}},Ik=w.memo(({toast:t,position:l,style:i,children:r})=>{let o=t.height?Vk(t.position||l||"top-center",t.visible):{opacity:0},s=w.createElement(Uk,{toast:t}),c=w.createElement(Gk,{...t.ariaProps},Ho(t.message,t));return w.createElement(Fk,{className:t.className,style:{...o,...i,...t.style}},typeof r=="function"?r({icon:s,message:c}):w.createElement(w.Fragment,null,s,c))});mk(w.createElement);var Xk=({id:t,className:l,style:i,onHeightUpdate:r,children:o})=>{let s=w.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 w.createElement("div",{ref:s,className:l,style:i},o)},Qk=(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:pb()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${l*(i?1:-1)}px)`,...r,...o}},$k=Ko`
184
- z-index: 9999;
185
- > * {
186
- pointer-events: auto;
187
- }
188
- `,wo=16,Zk=({reverseOrder:t,position:l="top-center",toastOptions:i,gutter:r,children:o,toasterId:s,containerStyle:c,containerClassName:d})=>{let{toasts:p,handlers:m}=wk(i,s);return w.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:wo,left:wo,right:wo,bottom:wo,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=Qk(g,b);return w.createElement(Xk,{id:y.id,key:y.id,onHeightUpdate:m.updateHeight,className:y.visible?$k:"",style:S},y.type==="custom"?Ho(y.message,y):o?o(y):w.createElement(Ik,{toast:y,position:g}))}))},Ay=Dt;function Kk(){return v.jsx(Zk,{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 Jo="electric-agent:sessions";function Ri(){try{const t=localStorage.getItem(Jo);return t?JSON.parse(t):[]}catch{return[]}}function Pk(t){const i=Ri().filter(r=>r.id!==t.id);i.push(t),localStorage.setItem(Jo,JSON.stringify(i))}function Cf(t,l){const i=Ri(),r=i.find(o=>o.id===t);r&&(Object.assign(r,l,{lastActiveAt:new Date().toISOString()}),localStorage.setItem(Jo,JSON.stringify(i)))}function Jk(t){const i=Ri().filter(r=>r.id!==t);localStorage.setItem(Jo,JSON.stringify(i))}function _y(t){return Ri().find(l=>l.id===t)}const xb=w.createContext(null);function Wo(){const t=w.useContext(xb);if(!t)throw new Error("useAppContext must be used within AppShell");return t}function Wk(){const[t,l]=w.useState(()=>window.innerWidth<=768);return w.useEffect(()=>{const i=window.matchMedia("(max-width: 768px)"),r=o=>l(o.matches);return i.addEventListener("change",r),()=>i.removeEventListener("change",r)},[]),t}function eC(){const[t,l]=w.useState(()=>Ri()),[i,r]=w.useState(null),[o,s]=w.useState(null),[c,d]=w.useState(!1),[p]=w.useState(!1),[m,y]=w.useState(null),[g,b]=w.useState(()=>Bo()),[S,k]=w.useState(()=>localStorage.getItem("sidebarCollapsed")==="true"),[j,z]=w.useState(!1),T=Wk(),N=w.useCallback(()=>{k(te=>(localStorage.setItem("sidebarCollapsed",String(!te)),!te))},[]),R=w.useCallback(()=>z(!0),[]),P=w.useCallback(()=>z(!1),[]),W=Oi(),H=tl(),_=w.useCallback(()=>{b(Bo())},[]),ae=w.useCallback(()=>{l(Ri()),y(null)},[]),ce=w.useRef(H.pathname);w.useEffect(()=>{const te=ee=>ee.startsWith("/session/")||ee.startsWith("/shared/"),Q=te(ce.current),D=te(H.pathname);ce.current=H.pathname,z(!1),D&&!Q&&(k(!0),localStorage.setItem("sidebarCollapsed","true")),!D&&Q&&(k(!1),localStorage.setItem("sidebarCollapsed","false")),D||ae()},[H.pathname,ae]);const U=w.useCallback(async()=>{const te=Dw();if(s(te),jw()){r("api-key");return}if(Oo()&&Kf()){r("oauth");return}try{const{oauthToken:Q}=await Xw();if(Q){Aw(Q),r("keychain");return}}catch{if(Kf()){r("keychain");return}}r(null),d(!0)},[]);w.useEffect(()=>{U()},[U]);const X=w.useCallback(te=>{const Q=te.split(/\s+/).slice(0,3).join(" ");y({name:Q||"New project"}),W("/session/new",{state:{description:te}})},[W]),K=w.useCallback(async te=>{try{await Yw(te),Jk(te),ae(),H.pathname===`/session/${te}`&&W("/")}catch(Q){console.error("Failed to delete session:",Q)}},[H.pathname,W,ae]),I={sessions:t,pendingProject:m,authSource:i,hasGhToken:o,showSettings:c,setShowSettings:d,refreshSessions:ae,refreshSettings:U,handleNewProject:X,handleDeleteSession:K,loading:p,joinedSharedSessions:g,refreshJoinedSharedSessions:_};return v.jsxs(xb.Provider,{value:I,children:[v.jsxs("div",{className:`app-shell ${S?"sidebar-collapsed":""}`,children:[T&&j&&v.jsx("div",{className:"sidebar-backdrop",onClick:P,onKeyDown:te=>{te.key==="Escape"&&P()}}),v.jsx(uk,{collapsed:S,onToggle:N,mobileOpen:j,onMobileClose:P}),v.jsx("main",{className:"main-content",children:v.jsx(YE,{context:{openMobileDrawer:R}})}),v.jsx("button",{type:"button",className:"global-settings-btn",onClick:()=>d(te=>!te),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(Kk,{})]})}function Sb({onSubmit:t,placeholder:l,disabled:i,isRunning:r,onCancel:o}){const[s,c]=w.useState(""),d=w.useRef(null),p=w.useCallback(()=>{const b=s.trim();b&&(t(b),c(""),d.current&&(d.current.style.height="auto"))},[s,t]),m=w.useCallback(()=>{r&&o&&o()},[r,o]);Mi(m,!r);const y=w.useCallback(b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),p())},[p]),g=w.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 tC(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 nC({onSelect:t,onClose:l}){const[i,r]=w.useState([]),[o,s]=w.useState(!0),[c,d]=w.useState(null),[p,m]=w.useState(""),[y,g]=w.useState(null),[b,S]=w.useState([]),[k,j]=w.useState(!1),[z,T]=w.useState(""),[N,R]=w.useState(""),[P,W]=w.useState(!1);w.useEffect(()=>{Vw().then(I=>{r(I.repos),s(!1)}).catch(I=>{d(I instanceof Error?I.message:"Failed to load repos"),s(!1)})},[]);function H(I){g(I),j(!0),S([]),T(""),W(!1),R(""),Iw(I.nameWithOwner).then(te=>{S(te.branches),j(!1)}).catch(()=>{j(!1)})}function _(){g(null),S([]),T(""),W(!1)}function ae(I){y&&t(y.url,I)}const ce=w.useCallback(()=>{y?_():l()},[y,l]);Mi(ce);const U=p?i.filter(I=>I.nameWithOwner.toLowerCase().includes(p.toLowerCase())):i,K=[...z?b.filter(I=>I.name.toLowerCase().includes(z.toLowerCase())):b].sort((I,te)=>I.isDefault&&!te.isDefault?-1:!I.isDefault&&te.isDefault?1:I.name.localeCompare(te.name));return $o.createPortal(v.jsx("div",{className:"modal-overlay",onClick:l,children:v.jsx("div",{className:"modal-card",onClick:I=>I.stopPropagation(),style:{maxWidth:500},children:y?v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"modal-title",children:[v.jsx("button",{type:"button",onClick:_,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:z,onChange:I=>T(I.target.value),placeholder:"Filter branches..."})}),k&&v.jsx("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-subtle)"},children:"Loading branches..."}),!k&&v.jsxs("div",{className:"repo-picker-list",children:[K.map(I=>v.jsx("div",{className:"repo-picker-item",onClick:()=>ae(I.name),children:v.jsxs("span",{className:"repo-picker-item-name",children:[I.name,I.isDefault&&v.jsx("span",{style:{marginLeft:8,fontSize:11,color:"var(--text-subtle)",fontWeight:400},children:"default"})]})},I.name)),P?v.jsxs("div",{className:"repo-picker-new-branch",children:[v.jsx("input",{type:"text",value:N,onChange:I=>R(I.target.value),onKeyDown:I=>{I.key==="Enter"&&N.trim()&&ae(N.trim())},placeholder:"branch-name"}),v.jsx("button",{type:"button",className:"modal-btn modal-btn-primary",disabled:!N.trim(),onClick:()=>ae(N.trim()),children:"Create"})]}):v.jsx("div",{className:"repo-picker-item",style:{color:"var(--brand-1)"},onClick:()=>W(!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:_,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:I=>m(I.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:U.length===0?v.jsx("div",{style:{padding:16,textAlign:"center",color:"var(--text-subtle)",fontSize:13},children:p?"No matching repos":"No repos found"}):U.map(I=>v.jsxs("div",{className:"repo-picker-item",onClick:()=>H(I),children:[v.jsx("span",{className:"repo-picker-item-name",children:I.nameWithOwner}),v.jsx("span",{className:"repo-picker-item-date",children:tC(I.updatedAt)})]},I.nameWithOwner))}),v.jsx("div",{className:"modal-actions",children:v.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"})})]})})}),document.body)}function Eb({authSource:t,hasGhToken:l,onKeySaved:i,onClose:r,onCopyLog:o}){const s=w.useId(),c=w.useId(),d=w.useId(),[p,m]=w.useState(""),[y,g]=w.useState(""),[b,S]=w.useState(""),[k,j]=w.useState(!1),[z,T]=w.useState(rb),[N,R]=w.useState(ob),P=w.useCallback(D=>{T(D),Ow(D),ub(D)},[]),W=w.useCallback(D=>{R(D),Mw(D)},[]),H=w.useCallback(()=>{p.trim()&&(Cw(p.trim()),m(""),i())},[p,i]),_=w.useCallback(()=>{Tw(),i()},[i]),ae=w.useCallback(()=>{y.trim()&&(zw(y.trim()),g(""),i())},[y,i]),ce=w.useCallback(()=>{_w(),i()},[i]),U=w.useCallback(()=>{b.trim()&&(Nw(b.trim()),S(""),i())},[b,i]),X=w.useCallback(()=>{Rw(),i()},[i]),K=w.useCallback(D=>{D.key==="Enter"&&(D.preventDefault(),H())},[H]),I=w.useCallback(D=>{D.key==="Enter"&&(D.preventDefault(),ae())},[ae]),te=w.useCallback(D=>{D.key==="Enter"&&(D.preventDefault(),U())},[U]),Q=w.useCallback(()=>{o?.(),j(!0),setTimeout(()=>j(!1),2e3)},[o]);return Mi(r),$o.createPortal(v.jsx("div",{className:"modal-overlay",onClick:r,children:v.jsxs("div",{className:"modal-card",onClick:D=>D.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:"Anthropic API Key"}),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"})]}),v.jsxs("div",{className:"settings-input-row",children:[v.jsx("input",{id:s,type:"password",value:p,onChange:D=>m(D.target.value),onKeyDown:K,placeholder:t==="api-key"?"Enter new key to override...":"sk-ant-..."}),p.trim()?v.jsx("button",{type:"button",onClick:H,className:"primary",children:"Save"}):t==="api-key"&&v.jsx("button",{type:"button",onClick:_,className:"btn btn-danger",children:"Remove"})]})]}),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:"OAuth Token"}),Oo()&&v.jsx("span",{className:"settings-status active",children:"Manual override"})]}),v.jsxs("div",{className:"settings-input-row",children:[v.jsx("input",{id:c,type:"password",value:y,onChange:D=>g(D.target.value),onKeyDown:I,placeholder:Oo()?"Enter new token to override...":"Paste OAuth token..."}),y.trim()?v.jsx("button",{type:"button",onClick:ae,className:"primary",children:"Save"}):Oo()&&v.jsx("button",{type:"button",onClick:ce,className:"btn btn-danger",children:"Remove"})]}),v.jsx("div",{style:{fontSize:11,color:"var(--text-subtle)",marginTop:4},children:"Override the OAuth token used for Claude authentication. Takes priority over keychain."})]}),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:d,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:d,type:"password",value:b,onChange:D=>S(D.target.value),onKeyDown:te,placeholder:l?"Enter new token to override...":"ghp_..."}),b.trim()?v.jsx("button",{type:"button",onClick:U,className:"primary",children:"Save"}):l&&v.jsx("button",{type:"button",onClick:X,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"}),v.jsx("div",{className:"settings-section-label",children:"Agent"}),v.jsxs("div",{className:"settings-field",children:[v.jsx("label",{style:{margin:0,marginBottom:4},children:"Agent Mode"}),v.jsx("div",{style:{fontSize:11,color:"var(--text-subtle)",marginBottom:8},children:"Applies to new sessions only"}),v.jsx("div",{className:"font-size-options",children:["claude-code","electric-agent"].map(D=>v.jsx("button",{type:"button",className:`font-size-option${N===D?" active":""}`,onClick:()=>W(D),children:D==="claude-code"?"Claude Code":"Electric Agent"},D))})]}),v.jsx("div",{className:"settings-divider"}),v.jsx("div",{className:"settings-section-label",children:"Display"}),v.jsxs("div",{className:"settings-field",children:[v.jsx("label",{style:{margin:0,marginBottom:8},children:"Font Size"}),v.jsx("div",{className:"font-size-options",children:["default","large","larger"].map(D=>v.jsx("button",{type:"button",className:`font-size-option${z===D?" active":""}`,onClick:()=>P(D),children:D==="default"?"Default":D==="large"?"Large":"Extra Large"},D))})]}),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:Q,children:k?"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 lC(){const{authSource:t,hasGhToken:l,showSettings:i,setShowSettings:r,refreshSettings:o,refreshSessions:s,handleNewProject:c,loading:d}=Wo(),p=Oi(),{openMobileDrawer:m}=Kv(),[y,g]=w.useState(!1),[b,S]=w.useState(!1),k=w.useCallback(async(j,z)=>{g(!1),S(!0);try{const{sessionId:T}=await Qw(j,z);await s(),p(`/session/${T}`)}catch(T){console.error("Failed to resume from GitHub:",T)}finally{S(!1)}},[p,s]);return v.jsxs(v.Fragment,{children:[i&&v.jsx(Eb,{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:"Build Reactive apps on Sync"}),v.jsx("div",{className:"hero-prompt",children:v.jsx(Sb,{onSubmit:c,placeholder:t?"Describe the application 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:()=>g(!0),disabled:b,children:b?"Cloning...":"Resume from GitHub"})]}),y&&v.jsx(nC,{onSelect:k,onClose:()=>g(!1)})]})}function aC(t,l){const i={};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const iC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uC={};function zy(t,l){return(uC.jsx?rC:iC).test(t)}const oC=/[ \t\n\f\r]/g;function sC(t){return typeof t=="object"?t.type==="text"?Ny(t.value):!1:Ny(t)}function Ny(t){return t.replace(oC,"")===""}class nu{constructor(l,i,r){this.normal=i,this.property=l,r&&(this.space=r)}}nu.prototype.normal={};nu.prototype.property={};nu.prototype.space=void 0;function wb(t,l){const i={},r={};for(const o of t)Object.assign(i,o.property),Object.assign(r,o.normal);return new nu(i,r,l)}function td(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 cC=0;const Ue=Fa(),_t=Fa(),nd=Fa(),fe=Fa(),ct=Fa(),zi=Fa(),vn=Fa();function Fa(){return 2**++cC}const ld=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:_t,commaOrSpaceSeparated:vn,commaSeparated:zi,number:fe,overloadedBoolean:nd,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),Tf=Object.keys(ld);class Hd extends un{constructor(l,i,r,o){let s=-1;if(super(l,i),Ry(this,"space",o),typeof r=="number")for(;++s<Tf.length;){const c=Tf[s];Ry(this,Tf[s],(r&ld[c])===ld[c])}}}Hd.prototype.defined=!0;function Ry(t,l,i){i&&(t[l]=i)}function Li(t){const l={},i={};for(const[r,o]of Object.entries(t.properties)){const s=new Hd(r,t.transform(t.attributes||{},r),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),l[r]=s,i[td(r)]=r,i[td(s.attribute)]=r}return new nu(l,i,t.space)}const kb=Li({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 Cb(t,l){return l in t?t[l]:l}function Tb(t,l){return Cb(t,l.toLowerCase())}const fC=Li({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:zi,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|zi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:nd,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:nd,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:Tb}),dC=Li({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:zi,g2:zi,glyphName:zi,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:Cb}),jb=Li({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()}}),Ab=Li({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Tb}),_b=Li({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),hC={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"},mC=/[A-Z]/g,Dy=/-[a-z]/g,pC=/^data[-\w.:]+$/i;function gC(t,l){const i=td(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"&&pC.test(l)){if(l.charAt(4)==="-"){const s=l.slice(5).replace(Dy,vC);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=l.slice(4);if(!Dy.test(s)){let c=s.replace(mC,yC);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}o=Hd}return new o(r,l)}function yC(t){return"-"+t.toLowerCase()}function vC(t){return t.charAt(1).toUpperCase()}const bC=wb([kb,fC,jb,Ab,_b],"html"),qd=wb([kb,dC,jb,Ab,_b],"svg");function xC(t){return t.join(" ").trim()}var ki={},jf,Oy;function SC(){if(Oy)return jf;Oy=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 k(z,T){if(typeof z!="string")throw new TypeError("First argument must be a string");if(!z)return[];T=T||{};var N=1,R=1;function P(te){var Q=te.match(l);Q&&(N+=Q.length);var D=te.lastIndexOf(p);R=~D?te.length-D:R+te.length}function W(){var te={line:N,column:R};return function(Q){return Q.position=new H(te),ce(),Q}}function H(te){this.start=te,this.end={line:N,column:R},this.source=T.source}H.prototype.content=z;function _(te){var Q=new Error(T.source+":"+N+":"+R+": "+te);if(Q.reason=te,Q.filename=T.source,Q.line=N,Q.column=R,Q.source=z,!T.silent)throw Q}function ae(te){var Q=te.exec(z);if(Q){var D=Q[0];return P(D),z=z.slice(D.length),Q}}function ce(){ae(i)}function U(te){var Q;for(te=te||[];Q=X();)Q!==!1&&te.push(Q);return te}function X(){var te=W();if(!(m!=z.charAt(0)||y!=z.charAt(1))){for(var Q=2;g!=z.charAt(Q)&&(y!=z.charAt(Q)||m!=z.charAt(Q+1));)++Q;if(Q+=2,g===z.charAt(Q-1))return _("End of comment missing");var D=z.slice(2,Q-2);return R+=2,P(D),z=z.slice(Q),R+=2,te({type:b,comment:D})}}function K(){var te=W(),Q=ae(r);if(Q){if(X(),!ae(o))return _("property missing ':'");var D=ae(s),ee=te({type:S,property:j(Q[0].replace(t,g)),value:D?j(D[0].replace(t,g)):g});return ae(c),ee}}function I(){var te=[];U(te);for(var Q;Q=K();)Q!==!1&&(te.push(Q),U(te));return te}return ce(),I()}function j(z){return z?z.replace(d,g):g}return jf=k,jf}var My;function EC(){if(My)return ki;My=1;var t=ki&&ki.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ki,"__esModule",{value:!0}),ki.default=i;const l=t(SC());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 ki}var Dr={},Ly;function wC(){if(Ly)return Dr;Ly=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.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 Dr.camelCase=p,Dr}var Or,Uy;function kC(){if(Uy)return Or;Uy=1;var t=Or&&Or.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},l=t(EC()),i=wC();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,Or=r,Or}var CC=kC();const TC=vd(CC),zb=Nb("end"),Yd=Nb("start");function Nb(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 jC(t){const l=Yd(t),i=zb(t);if(l&&i)return{start:l,end:i}}function qr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?By(t.position):"start"in t||"end"in t?By(t):"line"in t||"column"in t?ad(t):""}function ad(t){return Hy(t&&t.line)+":"+Hy(t&&t.column)}function By(t){return ad(t&&t.start)+"-"+ad(t&&t.end)}function Hy(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=qr(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 Fd={}.hasOwnProperty,AC=new Map,_C=/[A-Z]/g,zC=new Set(["table","tbody","thead","tfoot","tr"]),NC=new Set(["td","th"]),Rb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function RC(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=qC(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=HC(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"?qd:bC,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},s=Db(o,t,void 0);return s&&typeof s!="string"?s:o.create(t,o.Fragment,{children:s||void 0},void 0)}function Db(t,l,i){if(l.type==="element")return DC(t,l,i);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return OC(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return LC(t,l,i);if(l.type==="mdxjsEsm")return MC(t,l);if(l.type==="root")return UC(t,l,i);if(l.type==="text")return BC(t,l)}function DC(t,l,i){const r=t.schema;let o=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=qd,t.schema=o),t.ancestors.push(l);const s=Mb(t,l.tagName,!1),c=YC(t,l);let d=Vd(t,l);return zC.has(l.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!sC(p):!0})),Ob(t,c,s,l),Gd(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,i)}function OC(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)}Qr(t,l.position)}function MC(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);Qr(t,l.position)}function LC(t,l,i){const r=t.schema;let o=r;l.name==="svg"&&r.space==="html"&&(o=qd,t.schema=o),t.ancestors.push(l);const s=l.name===null?t.Fragment:Mb(t,l.name,!0),c=FC(t,l),d=Vd(t,l);return Ob(t,c,s,l),Gd(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,i)}function UC(t,l,i){const r={};return Gd(r,Vd(t,l)),t.create(l,t.Fragment,r,i)}function BC(t,l){return l.value}function Ob(t,l,i,r){typeof i!="string"&&i!==t.Fragment&&t.passNode&&(l.node=r)}function Gd(t,l){if(l.length>0){const i=l.length>1?l:l[0];i&&(t.children=i)}}function HC(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 qC(t,l){return i;function i(r,o,s,c){const d=Array.isArray(s.children),p=Yd(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 YC(t,l){const i={};let r,o;for(o in l.properties)if(o!=="children"&&Fd.call(l.properties,o)){const s=GC(t,o,l.properties[o]);if(s){const[c,d]=s;t.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&NC.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 FC(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 Qr(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 Qr(t,l.position);else s=r.value===null?!0:r.value;i[o]=s}return i}function Vd(t,l){const i=[];let r=-1;const o=t.passKeys?new Map:AC;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=Db(t,s,c);d!==void 0&&i.push(d)}return i}function GC(t,l,i){const r=gC(t.schema,l);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?aC(i):xC(i)),r.property==="style"){let o=typeof i=="object"?i:VC(t,String(i));return t.stylePropertyNameCase==="css"&&(o=IC(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&r.space?hC[r.property]||r.property:r.attribute,i]}}function VC(t,l){try{return TC(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=Rb+"#cannot-parse-style-attribute",o}}function Mb(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=zy(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=zy(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const o=r.value;return Fd.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(r);Qr(t)}function Qr(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=Rb+"#cannot-handle-mdx-estrees-without-createevaluater",i}function IC(t){const l={};let i;for(i in t)Fd.call(t,i)&&(l[XC(i)]=t[i]);return l}function XC(t){let l=t.replace(_C,QC);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function QC(t){return"-"+t.toLowerCase()}const Af={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"]},$C={};function Id(t,l){const i=$C,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return Lb(t,r,o)}function Lb(t,l,i){if(ZC(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 qy(t.children,l,i)}return Array.isArray(t)?qy(t,l,i):""}function qy(t,l,i){const r=[];let o=-1;for(;++o<t.length;)r[o]=Lb(t[o],l,i);return r.join("")}function ZC(t){return!!(t&&typeof t=="object")}const Yy=document.createElement("i");function Xd(t){const l="&"+t+";";Yy.innerHTML=l;const i=Yy.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 Dn(t,l){return t.length>0?(xn(t,t.length,0,l),t):l}const Fy={}.hasOwnProperty;function Ub(t){const l={};let i=-1;for(;++i<t.length;)KC(l,t[i]);return l}function KC(t,l){let i;for(i in l){const o=(Fy.call(t,i)?t[i]:void 0)||(t[i]={}),s=l[i];let c;if(s)for(c in s){Fy.call(o,c)||(o[c]=[]);const d=s[c];PC(o[c],Array.isArray(d)?d:d?[d]:[])}}}function PC(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 Bb(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 Kt=ha(/[A-Za-z]/),Xt=ha(/[\dA-Za-z]/),JC=ha(/[#-'*+\--9=?A-Z^-~]/);function qo(t){return t!==null&&(t<32||t===127)}const id=ha(/\d/),WC=ha(/[\dA-Fa-f]/),e2=ha(/[!-/:-@[-`{-~]/);function _e(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 es=ha(new RegExp("\\p{P}|\\p{S}","u")),qa=ha(/\s/);function ha(t){return l;function l(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Ui(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 Ke(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 t2={tokenize:n2};function n2(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"),Ke(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 _e(d)?(t.consume(d),t.exit("chunkText"),s):(t.consume(d),c)}}const l2={tokenize:a2},Gy={tokenize:i2};function a2(t){const l=this,i=[];let r=0,o,s,c;return d;function d(R){if(r<i.length){const P=i[r];return l.containerState=P[1],t.attempt(P[0].continuation,p,m)(R)}return m(R)}function p(R){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,o&&N();const P=l.events.length;let W=P,H;for(;W--;)if(l.events[W][0]==="exit"&&l.events[W][1].type==="chunkFlow"){H=l.events[W][1].end;break}T(r);let _=P;for(;_<l.events.length;)l.events[_][1].end={...H},_++;return xn(l.events,W+1,0,l.events.slice(P)),l.events.length=_,m(R)}return d(R)}function m(R){if(r===i.length){if(!o)return b(R);if(o.currentConstruct&&o.currentConstruct.concrete)return k(R);l.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(Gy,y,g)(R)}function y(R){return o&&N(),T(r),b(R)}function g(R){return l.parser.lazy[l.now().line]=r!==i.length,c=l.now().offset,k(R)}function b(R){return l.containerState={},t.attempt(Gy,S,k)(R)}function S(R){return r++,i.push([l.currentConstruct,l.containerState]),b(R)}function k(R){if(R===null){o&&N(),T(0),t.consume(R);return}return o=o||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),j(R)}function j(R){if(R===null){z(t.exit("chunkFlow"),!0),T(0),t.consume(R);return}return _e(R)?(t.consume(R),z(t.exit("chunkFlow")),r=0,l.interrupt=void 0,d):(t.consume(R),j)}function z(R,P){const W=l.sliceStream(R);if(P&&W.push(null),R.previous=s,s&&(s.next=R),s=R,o.defineSkip(R.start),o.write(W),l.parser.lazy[R.start.line]){let H=o.events.length;for(;H--;)if(o.events[H][1].start.offset<c&&(!o.events[H][1].end||o.events[H][1].end.offset>c))return;const _=l.events.length;let ae=_,ce,U;for(;ae--;)if(l.events[ae][0]==="exit"&&l.events[ae][1].type==="chunkFlow"){if(ce){U=l.events[ae][1].end;break}ce=!0}for(T(r),H=_;H<l.events.length;)l.events[H][1].end={...U},H++;xn(l.events,ae+1,0,l.events.slice(_)),l.events.length=H}}function T(R){let P=i.length;for(;P-- >R;){const W=i[P];l.containerState=W[1],W[0].exit.call(l,t)}i.length=R}function N(){o.write([null]),s=void 0,o=void 0,l.containerState._closeFlow=void 0}}function i2(t,l,i){return Ke(t,t.attempt(this.parser.constructs.document,l,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Di(t){if(t===null||st(t)||qa(t))return 1;if(es(t))return 2}function ts(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 rd={name:"attention",resolveAll:r2,tokenize:u2};function r2(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};Vy(g,-p),Vy(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=Dn(m,[["enter",t[r][1],l],["exit",t[r][1],l]])),m=Dn(m,[["enter",o,l],["enter",c,l],["exit",c,l],["enter",s,l]]),m=Dn(m,ts(l.parser.constructs.insideSpan.null,t.slice(r+1,i),l)),m=Dn(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=Dn(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 u2(t,l){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Di(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=Di(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 Vy(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const o2={name:"autolink",tokenize:s2};function s2(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 Kt(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||qo(S)?i(S):(t.consume(S),p)}function m(S){return S===64?(t.consume(S),y):JC(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 k=S===45?b:g;return t.consume(S),k}return i(S)}}const lu={partial:!0,tokenize:c2};function c2(t,l,i){return r;function r(s){return Ye(s)?Ke(t,o,"linePrefix")(s):o(s)}function o(s){return s===null||_e(s)?l(s):i(s)}}const Hb={continuation:{tokenize:d2},exit:h2,name:"blockQuote",tokenize:f2};function f2(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 d2(t,l,i){const r=this;return o;function o(c){return Ye(c)?Ke(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return t.attempt(Hb,l,i)(c)}}function h2(t){t.exit("blockQuote")}const qb={name:"characterEscape",tokenize:m2};function m2(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 e2(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):i(s)}}const Yb={name:"characterReference",tokenize:p2};function p2(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=WC,y):(t.enter("characterReferenceValue"),s=7,c=id,y(g))}function y(g){if(g===59&&o){const b=t.exit("characterReferenceValue");return c===Xt&&!Xd(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 Iy={partial:!0,tokenize:y2},Xy={concrete:!0,name:"codeFenced",tokenize:g2};function g2(t,l,i){const r=this,o={partial:!0,tokenize:W};let s=0,c=0,d;return p;function p(H){return m(H)}function m(H){const _=r.events[r.events.length-1];return s=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,d=H,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(H)}function y(H){return H===d?(c++,t.consume(H),y):c<3?i(H):(t.exit("codeFencedFenceSequence"),Ye(H)?Ke(t,g,"whitespace")(H):g(H))}function g(H){return H===null||_e(H)?(t.exit("codeFencedFence"),r.interrupt?l(H):t.check(Iy,j,P)(H)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),b(H))}function b(H){return H===null||_e(H)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),g(H)):Ye(H)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ke(t,S,"whitespace")(H)):H===96&&H===d?i(H):(t.consume(H),b)}function S(H){return H===null||_e(H)?g(H):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),k(H))}function k(H){return H===null||_e(H)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),g(H)):H===96&&H===d?i(H):(t.consume(H),k)}function j(H){return t.attempt(o,P,z)(H)}function z(H){return t.enter("lineEnding"),t.consume(H),t.exit("lineEnding"),T}function T(H){return s>0&&Ye(H)?Ke(t,N,"linePrefix",s+1)(H):N(H)}function N(H){return H===null||_e(H)?t.check(Iy,j,P)(H):(t.enter("codeFlowValue"),R(H))}function R(H){return H===null||_e(H)?(t.exit("codeFlowValue"),N(H)):(t.consume(H),R)}function P(H){return t.exit("codeFenced"),l(H)}function W(H,_,ae){let ce=0;return U;function U(Q){return H.enter("lineEnding"),H.consume(Q),H.exit("lineEnding"),X}function X(Q){return H.enter("codeFencedFence"),Ye(Q)?Ke(H,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):K(Q)}function K(Q){return Q===d?(H.enter("codeFencedFenceSequence"),I(Q)):ae(Q)}function I(Q){return Q===d?(ce++,H.consume(Q),I):ce>=c?(H.exit("codeFencedFenceSequence"),Ye(Q)?Ke(H,te,"whitespace")(Q):te(Q)):ae(Q)}function te(Q){return Q===null||_e(Q)?(H.exit("codeFencedFence"),_(Q)):ae(Q)}}}function y2(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 _f={name:"codeIndented",tokenize:b2},v2={partial:!0,tokenize:x2};function b2(t,l,i){const r=this;return o;function o(m){return t.enter("codeIndented"),Ke(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):_e(m)?t.attempt(v2,c,p)(m):(t.enter("codeFlowValue"),d(m))}function d(m){return m===null||_e(m)?(t.exit("codeFlowValue"),c(m)):(t.consume(m),d)}function p(m){return t.exit("codeIndented"),l(m)}}function x2(t,l,i){const r=this;return o;function o(c){return r.parser.lazy[r.now().line]?i(c):_e(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o):Ke(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):_e(c)?o(c):i(c)}}const S2={name:"codeText",previous:w2,resolve:E2,tokenize:k2};function E2(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 w2(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function k2(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)):_e(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||_e(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 C2{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&&Mr(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),Mr(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),Mr(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);Mr(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);Mr(this.left,i.reverse())}}}function Mr(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 Fb(t){const l={};let i=-1,r,o,s,c,d,p,m;const y=new C2(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,T2(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 T2(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,k=0,j=0;const z=[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,z.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):z.pop(),b=z.length;b--;){const T=d.slice(z[b],z[b+1]),N=s.pop();p.push([N,N+T.length-1]),t.splice(N,2,T)}for(p.reverse(),b=-1;++b<p.length;)m[k+p[b][0]]=k+p[b][1],k+=p[b][1]-p[b][0]-1;return m}const j2={resolve:_2,tokenize:z2},A2={partial:!0,tokenize:N2};function _2(t){return Fb(t),t}function z2(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):_e(d)?t.check(A2,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 N2(t,l,i){const r=this;return o;function o(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Ke(t,s,"linePrefix")}function s(c){if(c===null||_e(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 Gb(t,l,i,r,o,s,c,d,p){const m=p||Number.POSITIVE_INFINITY;let y=0;return g;function g(T){return T===60?(t.enter(r),t.enter(o),t.enter(s),t.consume(T),t.exit(s),b):T===null||T===32||T===41||qo(T)?i(T):(t.enter(r),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),j(T))}function b(T){return T===62?(t.enter(s),t.consume(T),t.exit(s),t.exit(o),t.exit(r),l):(t.enter(d),t.enter("chunkString",{contentType:"string"}),S(T))}function S(T){return T===62?(t.exit("chunkString"),t.exit(d),b(T)):T===null||T===60||_e(T)?i(T):(t.consume(T),T===92?k:S)}function k(T){return T===60||T===62||T===92?(t.consume(T),S):S(T)}function j(T){return!y&&(T===null||T===41||st(T))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(r),l(T)):y<m&&T===40?(t.consume(T),y++,j):T===41?(t.consume(T),y--,j):T===null||T===32||T===40||qo(T)?i(T):(t.consume(T),T===92?z:j)}function z(T){return T===40||T===41||T===92?(t.consume(T),j):j(T)}}function Vb(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):_e(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||_e(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 Ib(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):_e(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),Ke(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===c||b===null||_e(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 Yr(t,l){let i;return r;function r(o){return _e(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i=!0,r):Ye(o)?Ke(t,r,i?"linePrefix":"lineSuffix")(o):l(o)}}const R2={name:"definition",tokenize:O2},D2={partial:!0,tokenize:M2};function O2(t,l,i){const r=this;let o;return s;function s(S){return t.enter("definition"),c(S)}function c(S){return Vb.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)?Yr(t,m)(S):m(S)}function m(S){return Gb(t,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function y(S){return t.attempt(D2,g,g)(S)}function g(S){return Ye(S)?Ke(t,b,"whitespace")(S):b(S)}function b(S){return S===null||_e(S)?(t.exit("definition"),r.parser.defined.push(o),l(S)):i(S)}}function M2(t,l,i){return r;function r(d){return st(d)?Yr(t,o)(d):i(d)}function o(d){return Ib(t,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return Ye(d)?Ke(t,c,"whitespace")(d):c(d)}function c(d){return d===null||_e(d)?l(d):i(d)}}const L2={name:"hardBreakEscape",tokenize:U2};function U2(t,l,i){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),o}function o(s){return _e(s)?(t.exit("hardBreakEscape"),l(s)):i(s)}}const B2={name:"headingAtx",resolve:H2,tokenize:q2};function H2(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 q2(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||_e(y)?(t.exit("atxHeading"),l(y)):Ye(y)?Ke(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 Y2=["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"],Qy=["pre","script","style","textarea"],F2={concrete:!0,name:"htmlFlow",resolveTo:I2,tokenize:X2},G2={partial:!0,tokenize:$2},V2={partial:!0,tokenize:Q2};function I2(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 X2(t,l,i){const r=this;let o,s,c,d,p;return m;function m(C){return y(C)}function y(C){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(C),g}function g(C){return C===33?(t.consume(C),b):C===47?(t.consume(C),s=!0,j):C===63?(t.consume(C),o=3,r.interrupt?l:A):Kt(C)?(t.consume(C),c=String.fromCharCode(C),z):i(C)}function b(C){return C===45?(t.consume(C),o=2,S):C===91?(t.consume(C),o=5,d=0,k):Kt(C)?(t.consume(C),o=4,r.interrupt?l:A):i(C)}function S(C){return C===45?(t.consume(C),r.interrupt?l:A):i(C)}function k(C){const ue="CDATA[";return C===ue.charCodeAt(d++)?(t.consume(C),d===ue.length?r.interrupt?l:K:k):i(C)}function j(C){return Kt(C)?(t.consume(C),c=String.fromCharCode(C),z):i(C)}function z(C){if(C===null||C===47||C===62||st(C)){const ue=C===47,be=c.toLowerCase();return!ue&&!s&&Qy.includes(be)?(o=1,r.interrupt?l(C):K(C)):Y2.includes(c.toLowerCase())?(o=6,ue?(t.consume(C),T):r.interrupt?l(C):K(C)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(C):s?N(C):R(C))}return C===45||Xt(C)?(t.consume(C),c+=String.fromCharCode(C),z):i(C)}function T(C){return C===62?(t.consume(C),r.interrupt?l:K):i(C)}function N(C){return Ye(C)?(t.consume(C),N):U(C)}function R(C){return C===47?(t.consume(C),U):C===58||C===95||Kt(C)?(t.consume(C),P):Ye(C)?(t.consume(C),R):U(C)}function P(C){return C===45||C===46||C===58||C===95||Xt(C)?(t.consume(C),P):W(C)}function W(C){return C===61?(t.consume(C),H):Ye(C)?(t.consume(C),W):R(C)}function H(C){return C===null||C===60||C===61||C===62||C===96?i(C):C===34||C===39?(t.consume(C),p=C,_):Ye(C)?(t.consume(C),H):ae(C)}function _(C){return C===p?(t.consume(C),p=null,ce):C===null||_e(C)?i(C):(t.consume(C),_)}function ae(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||st(C)?W(C):(t.consume(C),ae)}function ce(C){return C===47||C===62||Ye(C)?R(C):i(C)}function U(C){return C===62?(t.consume(C),X):i(C)}function X(C){return C===null||_e(C)?K(C):Ye(C)?(t.consume(C),X):i(C)}function K(C){return C===45&&o===2?(t.consume(C),D):C===60&&o===1?(t.consume(C),ee):C===62&&o===4?(t.consume(C),O):C===63&&o===3?(t.consume(C),A):C===93&&o===5?(t.consume(C),ve):_e(C)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(G2,F,I)(C)):C===null||_e(C)?(t.exit("htmlFlowData"),I(C)):(t.consume(C),K)}function I(C){return t.check(V2,te,F)(C)}function te(C){return t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),Q}function Q(C){return C===null||_e(C)?I(C):(t.enter("htmlFlowData"),K(C))}function D(C){return C===45?(t.consume(C),A):K(C)}function ee(C){return C===47?(t.consume(C),c="",se):K(C)}function se(C){if(C===62){const ue=c.toLowerCase();return Qy.includes(ue)?(t.consume(C),O):K(C)}return Kt(C)&&c.length<8?(t.consume(C),c+=String.fromCharCode(C),se):K(C)}function ve(C){return C===93?(t.consume(C),A):K(C)}function A(C){return C===62?(t.consume(C),O):C===45&&o===2?(t.consume(C),A):K(C)}function O(C){return C===null||_e(C)?(t.exit("htmlFlowData"),F(C)):(t.consume(C),O)}function F(C){return t.exit("htmlFlow"),l(C)}}function Q2(t,l,i){const r=this;return o;function o(c){return _e(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 $2(t,l,i){return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(lu,l,i)}}const Z2={name:"htmlText",tokenize:K2};function K2(t,l,i){const r=this;let o,s,c;return d;function d(A){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(A),p}function p(A){return A===33?(t.consume(A),m):A===47?(t.consume(A),W):A===63?(t.consume(A),R):Kt(A)?(t.consume(A),ae):i(A)}function m(A){return A===45?(t.consume(A),y):A===91?(t.consume(A),s=0,k):Kt(A)?(t.consume(A),N):i(A)}function y(A){return A===45?(t.consume(A),S):i(A)}function g(A){return A===null?i(A):A===45?(t.consume(A),b):_e(A)?(c=g,ee(A)):(t.consume(A),g)}function b(A){return A===45?(t.consume(A),S):g(A)}function S(A){return A===62?D(A):A===45?b(A):g(A)}function k(A){const O="CDATA[";return A===O.charCodeAt(s++)?(t.consume(A),s===O.length?j:k):i(A)}function j(A){return A===null?i(A):A===93?(t.consume(A),z):_e(A)?(c=j,ee(A)):(t.consume(A),j)}function z(A){return A===93?(t.consume(A),T):j(A)}function T(A){return A===62?D(A):A===93?(t.consume(A),T):j(A)}function N(A){return A===null||A===62?D(A):_e(A)?(c=N,ee(A)):(t.consume(A),N)}function R(A){return A===null?i(A):A===63?(t.consume(A),P):_e(A)?(c=R,ee(A)):(t.consume(A),R)}function P(A){return A===62?D(A):R(A)}function W(A){return Kt(A)?(t.consume(A),H):i(A)}function H(A){return A===45||Xt(A)?(t.consume(A),H):_(A)}function _(A){return _e(A)?(c=_,ee(A)):Ye(A)?(t.consume(A),_):D(A)}function ae(A){return A===45||Xt(A)?(t.consume(A),ae):A===47||A===62||st(A)?ce(A):i(A)}function ce(A){return A===47?(t.consume(A),D):A===58||A===95||Kt(A)?(t.consume(A),U):_e(A)?(c=ce,ee(A)):Ye(A)?(t.consume(A),ce):D(A)}function U(A){return A===45||A===46||A===58||A===95||Xt(A)?(t.consume(A),U):X(A)}function X(A){return A===61?(t.consume(A),K):_e(A)?(c=X,ee(A)):Ye(A)?(t.consume(A),X):ce(A)}function K(A){return A===null||A===60||A===61||A===62||A===96?i(A):A===34||A===39?(t.consume(A),o=A,I):_e(A)?(c=K,ee(A)):Ye(A)?(t.consume(A),K):(t.consume(A),te)}function I(A){return A===o?(t.consume(A),o=void 0,Q):A===null?i(A):_e(A)?(c=I,ee(A)):(t.consume(A),I)}function te(A){return A===null||A===34||A===39||A===60||A===61||A===96?i(A):A===47||A===62||st(A)?ce(A):(t.consume(A),te)}function Q(A){return A===47||A===62||st(A)?ce(A):i(A)}function D(A){return A===62?(t.consume(A),t.exit("htmlTextData"),t.exit("htmlText"),l):i(A)}function ee(A){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),se}function se(A){return Ye(A)?Ke(t,ve,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):ve(A)}function ve(A){return t.enter("htmlTextData"),c(A)}}const Qd={name:"labelEnd",resolveAll:eT,resolveTo:tT,tokenize:nT},P2={tokenize:lT},J2={tokenize:aT},W2={tokenize:iT};function eT(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 tT(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=Dn(d,t.slice(s+1,s+r+3)),d=Dn(d,[["enter",y,l]]),d=Dn(d,ts(l.parser.constructs.insideSpan.null,t.slice(s+r+4,c-3),l)),d=Dn(d,[["exit",y,l],t[c-2],t[c-1],["exit",m,l]]),d=Dn(d,t.slice(c+1)),d=Dn(d,[["exit",p,l]]),xn(t,s,t.length,d),t}function nT(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(P2,y,c?y:g)(b):b===91?t.attempt(J2,y,c?m:g)(b):c?y(b):g(b)}function m(b){return t.attempt(W2,y,g)(b)}function y(b){return l(b)}function g(b){return s._balanced=!0,i(b)}}function lT(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)?Yr(t,s)(g):s(g)}function s(g){return g===41?y(g):Gb(t,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return st(g)?Yr(t,p)(g):y(g)}function d(g){return i(g)}function p(g){return g===34||g===39||g===40?Ib(t,m,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function m(g){return st(g)?Yr(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 aT(t,l,i){const r=this;return o;function o(d){return Vb.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 iT(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 rT={name:"labelStartImage",resolveAll:Qd.resolveAll,tokenize:uT};function uT(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 oT={name:"labelStartLink",resolveAll:Qd.resolveAll,tokenize:sT};function sT(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 zf={name:"lineEnding",tokenize:cT};function cT(t,l){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Ke(t,l,"linePrefix")}}const Lo={name:"thematicBreak",tokenize:fT};function fT(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||_e(m))?(t.exit("thematicBreak"),l(m)):i(m)}function p(m){return m===o?(t.consume(m),r++,p):(t.exit("thematicBreakSequence"),Ye(m)?Ke(t,d,"whitespace")(m):d(m))}}const rn={continuation:{tokenize:pT},exit:yT,name:"list",tokenize:mT},dT={partial:!0,tokenize:vT},hT={partial:!0,tokenize:gT};function mT(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 k=r.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||S===r.containerState.marker:id(S)){if(r.containerState.type||(r.containerState.type=k,t.enter(k,{_container:!0})),k==="listUnordered")return t.enter("listItemPrefix"),S===42||S===45?t.check(Lo,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 id(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(lu,r.interrupt?i:y,t.attempt(dT,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 pT(t,l,i){const r=this;return r.containerState._closeFlow=void 0,t.check(lu,o,s);function o(d){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ke(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(hT,l,c)(d))}function c(d){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ke(t,t.attempt(rn,l,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function gT(t,l,i){const r=this;return Ke(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 yT(t){t.exit(this.containerState.type)}function vT(t,l,i){const r=this;return Ke(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 $y={name:"setextUnderline",resolveTo:bT,tokenize:xT};function bT(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 xT(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)?Ke(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||_e(m)?(t.exit("setextHeadingLine"),l(m)):i(m)}}const ST={tokenize:ET};function ET(t){const l=this,i=t.attempt(lu,r,t.attempt(this.parser.constructs.flowInitial,o,Ke(t,t.attempt(this.parser.constructs.flow,o,t.attempt(j2,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 wT={resolveAll:Qb()},kT=Xb("string"),CT=Xb("text");function Xb(t){return{resolveAll:Qb(t==="text"?TT: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 Qb(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 TT(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 jT={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:Hb},AT={91:R2},_T={[-2]:_f,[-1]:_f,32:_f},zT={35:B2,42:Lo,45:[$y,Lo],60:F2,61:$y,95:Lo,96:Xy,126:Xy},NT={38:Yb,92:qb},RT={[-5]:zf,[-4]:zf,[-3]:zf,33:rT,38:Yb,42:rd,60:[o2,Z2],91:oT,92:[L2,qb],93:Qd,95:rd,96:S2},DT={null:[rd,wT]},OT={null:[42,95]},MT={null:[]},LT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:OT,contentInitial:AT,disable:MT,document:jT,flow:zT,flowInitial:_T,insideSpan:DT,string:NT,text:RT},Symbol.toStringTag,{value:"Module"}));function UT(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:_(W),check:_(H),consume:N,enter:R,exit:P,interrupt:_(H,{interrupt:!0})},m={code:null,containerState:{},defineSkip:j,events:[],now:k,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(X){return c=Dn(c,X),z(),c[c.length-1]!==null?[]:(ae(l,0),m.events=ts(s,m.events,m),m.events)}function b(X,K){return HT(S(X),K)}function S(X){return BT(c,X)}function k(){const{_bufferIndex:X,_index:K,line:I,column:te,offset:Q}=r;return{_bufferIndex:X,_index:K,line:I,column:te,offset:Q}}function j(X){o[X.line]=X.column,U()}function z(){let X;for(;r._index<c.length;){const K=c[r._index];if(typeof K=="string")for(X=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===X&&r._bufferIndex<K.length;)T(K.charCodeAt(r._bufferIndex));else T(K)}}function T(X){y=y(X)}function N(X){_e(X)?(r.line++,r.column=1,r.offset+=X===-3?2:1,U()):X!==-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=X}function R(X,K){const I=K||{};return I.type=X,I.start=k(),m.events.push(["enter",I,m]),d.push(I),I}function P(X){const K=d.pop();return K.end=k(),m.events.push(["exit",K,m]),K}function W(X,K){ae(X,K.from)}function H(X,K){K.restore()}function _(X,K){return I;function I(te,Q,D){let ee,se,ve,A;return Array.isArray(te)?F(te):"tokenize"in te?F([te]):O(te);function O(xe){return De;function De(pe){const ze=pe!==null&&xe[pe],Nt=pe!==null&&xe.null,Ln=[...Array.isArray(ze)?ze:ze?[ze]:[],...Array.isArray(Nt)?Nt:Nt?[Nt]:[]];return F(Ln)(pe)}}function F(xe){return ee=xe,se=0,xe.length===0?D:C(xe[se])}function C(xe){return De;function De(pe){return A=ce(),ve=xe,xe.partial||(m.currentConstruct=xe),xe.name&&m.parser.constructs.disable.null.includes(xe.name)?be():xe.tokenize.call(K?Object.assign(Object.create(m),K):m,p,ue,be)(pe)}}function ue(xe){return X(ve,A),Q}function be(xe){return A.restore(),++se<ee.length?C(ee[se]):D}}}function ae(X,K){X.resolveAll&&!s.includes(X)&&s.push(X),X.resolve&&xn(m.events,K,m.events.length-K,X.resolve(m.events.slice(K),m)),X.resolveTo&&(m.events=X.resolveTo(m.events,m))}function ce(){const X=k(),K=m.previous,I=m.currentConstruct,te=m.events.length,Q=Array.from(d);return{from:te,restore:D};function D(){r=X,m.previous=K,m.currentConstruct=I,m.events.length=te,d=Q,U()}}function U(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function BT(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 HT(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 qT(t){const r={constructs:Ub([LT,...(t||{}).extensions||[]]),content:o(t2),defined:[],document:o(l2),flow:o(ST),lazy:{},string:o(kT),text:o(CT)};return r;function o(s){return c;function c(d){return UT(r,s,d)}}}function YT(t){for(;!Fb(t););return t}const Zy=/[\0\t\n\r]/g;function FT(){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(Zy.lastIndex=g,m=Zy.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 GT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function VT(t){return t.replace(GT,IT)}function IT(t,l,i){if(l)return l;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),s=o===120||o===88;return Bb(i.slice(s?2:1),s?16:10)}return Xd(i)||t}const $b={}.hasOwnProperty;function XT(t,l,i){return typeof l!="string"&&(i=l,l=void 0),QT(i)(YT(qT(i).document().write(FT()(t,l,!0))))}function QT(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ll),autolinkProtocol:ce,autolinkEmail:ce,atxHeading:s(zl),blockQuote:s(Nt),characterEscape:ce,characterReference:ce,codeFenced:s(Ln),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Ln,c),codeText:s(yt,c),codeTextData:ce,data:ce,codeFlowValue:ce,definition:s(Un),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Sn),hardBreakEscape:s(Pt),hardBreakTrailing:s(Pt),htmlFlow:s(Ga,c),htmlFlowData:ce,htmlText:s(Ga,c),htmlTextData:ce,image:s(Va),label:c,link:s(ll),listItem:s(ma),listItemValue:b,listOrdered:s(Nl,g),listUnordered:s(Nl),paragraph:s(Bi),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(zl),strong:s(Hi),thematicBreak:s(al)},exit:{atxHeading:p(),atxHeadingSequence:W,autolink:p(),autolinkEmail:ze,autolinkProtocol:pe,blockQuote:p(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:xe,characterReference:De,codeFenced:p(z),codeFencedFence:j,codeFencedFenceInfo:S,codeFencedFenceMeta:k,codeFlowValue:U,codeIndented:p(T),codeText:p(Q),codeTextData:U,data:U,definition:p(),definitionDestinationString:P,definitionLabelString:N,definitionTitleString:R,emphasis:p(),hardBreakEscape:p(K),hardBreakTrailing:p(K),htmlFlow:p(I),htmlFlowData:U,htmlText:p(te),htmlTextData:U,image:p(ee),label:ve,labelText:se,lineEnding:X,link:p(D),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ue,resourceDestinationString:A,resourceTitleString:O,resource:F,setextHeading:p(ae),setextHeadingLineSequence:_,setextHeadingText:H,strong:p(),thematicBreak:p()}};Zb(l,(t||{}).mdastExtensions||[]);const i={};return r;function r(le){let de={type:"root",children:[]};const Ce={stack:[de],tokenStack:[],config:l,enter:d,exit:m,buffer:c,resume:y,data:i},Re=[];let Pe=-1;for(;++Pe<le.length;)if(le[Pe][1].type==="listOrdered"||le[Pe][1].type==="listUnordered")if(le[Pe][0]==="enter")Re.push(Pe);else{const $t=Re.pop();Pe=o(le,$t,Pe)}for(Pe=-1;++Pe<le.length;){const $t=l[le[Pe][0]];$b.call($t,le[Pe][1].type)&&$t[le[Pe][1].type].call(Object.assign({sliceSerialize:le[Pe][2].sliceSerialize},Ce),le[Pe][1])}if(Ce.tokenStack.length>0){const $t=Ce.tokenStack[Ce.tokenStack.length-1];($t[1]||Ky).call(Ce,void 0,$t[0])}for(de.position={start:aa(le.length>0?le[0][1].start:{line:1,column:1,offset:0}),end:aa(le.length>0?le[le.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(le,de,Ce){let Re=de-1,Pe=-1,$t=!1,on,Lt,nt,Ut;for(;++Re<=Ce;){const tt=le[Re];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=Re),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=Re;for(Lt=void 0;Bn--;){const sn=le[Bn];if(sn[1].type==="lineEnding"||sn[1].type==="lineEndingBlank"){if(sn[0]==="exit")continue;Lt&&(le[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?le[Lt][1].start:tt[1].end),le.splice(Lt||Re,0,["exit",on,tt[2]]),Re++,Ce++}if(tt[1].type==="listItemPrefix"){const Bn={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};on=Bn,le.splice(Re,0,["enter",Bn,tt[2]]),Re++,Ce++,nt=void 0,Ut=!0}}}return le[de][1]._spread=$t,Ce}function s(le,de){return Ce;function Ce(Re){d.call(this,le(Re),Re),de&&de.call(this,Re)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(le,de,Ce){this.stack[this.stack.length-1].children.push(le),this.stack.push(le),this.tokenStack.push([de,Ce||void 0]),le.position={start:aa(de.start),end:void 0}}function p(le){return de;function de(Ce){le&&le.call(this,Ce),m.call(this,Ce)}}function m(le,de){const Ce=this.stack.pop(),Re=this.tokenStack.pop();if(Re)Re[0].type!==le.type&&(de?de.call(this,le,Re[0]):(Re[1]||Ky).call(this,le,Re[0]));else throw new Error("Cannot close `"+le.type+"` ("+qr({start:le.start,end:le.end})+"): it’s not open");Ce.position.end=aa(le.end)}function y(){return Id(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(le){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(le),10),this.data.expectingFirstListItemValue=void 0}}function S(){const le=this.resume(),de=this.stack[this.stack.length-1];de.lang=le}function k(){const le=this.resume(),de=this.stack[this.stack.length-1];de.meta=le}function j(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function z(){const le=this.resume(),de=this.stack[this.stack.length-1];de.value=le.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const le=this.resume(),de=this.stack[this.stack.length-1];de.value=le.replace(/(\r?\n|\r)$/g,"")}function N(le){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=In(this.sliceSerialize(le)).toLowerCase()}function R(){const le=this.resume(),de=this.stack[this.stack.length-1];de.title=le}function P(){const le=this.resume(),de=this.stack[this.stack.length-1];de.url=le}function W(le){const de=this.stack[this.stack.length-1];if(!de.depth){const Ce=this.sliceSerialize(le).length;de.depth=Ce}}function H(){this.data.setextHeadingSlurpLineEnding=!0}function _(le){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(le).codePointAt(0)===61?1:2}function ae(){this.data.setextHeadingSlurpLineEnding=void 0}function ce(le){const Ce=this.stack[this.stack.length-1].children;let Re=Ce[Ce.length-1];(!Re||Re.type!=="text")&&(Re=pt(),Re.position={start:aa(le.start),end:void 0},Ce.push(Re)),this.stack.push(Re)}function U(le){const de=this.stack.pop();de.value+=this.sliceSerialize(le),de.position.end=aa(le.end)}function X(le){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=de.children[de.children.length-1];Ce.position.end=aa(le.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(de.type)&&(ce.call(this,le),U.call(this,le))}function K(){this.data.atHardBreak=!0}function I(){const le=this.resume(),de=this.stack[this.stack.length-1];de.value=le}function te(){const le=this.resume(),de=this.stack[this.stack.length-1];de.value=le}function Q(){const le=this.resume(),de=this.stack[this.stack.length-1];de.value=le}function D(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=de,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function ee(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=de,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function se(le){const de=this.sliceSerialize(le),Ce=this.stack[this.stack.length-2];Ce.label=VT(de),Ce.identifier=In(de).toLowerCase()}function ve(){const le=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 Re=le.children;Ce.children=Re}else Ce.alt=de}function A(){const le=this.resume(),de=this.stack[this.stack.length-1];de.url=le}function O(){const le=this.resume(),de=this.stack[this.stack.length-1];de.title=le}function F(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function ue(le){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=In(this.sliceSerialize(le)).toLowerCase(),this.data.referenceType="full"}function be(le){this.data.characterReferenceType=le.type}function xe(le){const de=this.sliceSerialize(le),Ce=this.data.characterReferenceType;let Re;Ce?(Re=Bb(de,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Re=Xd(de);const Pe=this.stack[this.stack.length-1];Pe.value+=Re}function De(le){const de=this.stack.pop();de.position.end=aa(le.end)}function pe(le){U.call(this,le);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(le)}function ze(le){U.call(this,le);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(le)}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 zl(){return{type:"heading",depth:0,children:[]}}function Pt(){return{type:"break"}}function Ga(){return{type:"html",value:""}}function Va(){return{type:"image",title:null,url:"",alt:null}}function ll(){return{type:"link",title:null,url:"",children:[]}}function Nl(le){return{type:"list",ordered:le.type==="listOrdered",start:null,spread:le._spread,children:[]}}function ma(le){return{type:"listItem",spread:le._spread,checked:null,children:[]}}function Bi(){return{type:"paragraph",children:[]}}function Hi(){return{type:"strong",children:[]}}function pt(){return{type:"text",value:""}}function al(){return{type:"thematicBreak"}}}function aa(t){return{line:t.line,column:t.column,offset:t.offset}}function Zb(t,l){let i=-1;for(;++i<l.length;){const r=l[i];Array.isArray(r)?Zb(t,r):$T(t,r)}}function $T(t,l){let i;for(i in l)if($b.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 Ky(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+qr({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+qr({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+qr({start:l.start,end:l.end})+") is still open")}function ZT(t){const l=this;l.parser=i;function i(r){return XT(r,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function KT(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 PT(t,l){const i={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,i),[t.applyData(l,i),{type:"text",value:`
192
- `}]}function JT(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 WT(t,l){const i={type:"element",tagName:"del",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function ej(t,l){const i={type:"element",tagName:"em",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function tj(t,l){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(l.identifier).toUpperCase(),o=Ui(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 nj(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 lj(t,l){if(t.options.allowDangerousHtml){const i={type:"raw",value:l.value};return t.patch(l,i),t.applyData(l,i)}}function Kb(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 aj(t,l){const i=String(l.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return Kb(t,l);const o={src:Ui(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 ij(t,l){const i={src:Ui(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 rj(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 uj(t,l){const i=String(l.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return Kb(t,l);const o={href:Ui(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 oj(t,l){const i={href:Ui(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 sj(t,l,i){const r=t.all(l),o=i?cj(i):Pb(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 cj(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=Pb(i[r])}return l}function Pb(t){const l=t.spread;return l??t.children.length>1}function fj(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 dj(t,l){const i={type:"element",tagName:"p",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function hj(t,l){const i={type:"root",children:t.wrap(t.all(l))};return t.patch(l,i),t.applyData(l,i)}function mj(t,l){const i={type:"element",tagName:"strong",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function pj(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=Yd(l.children[1]),p=zb(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 gj(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 k={type:"element",tagName:s,properties:b,children:[]};g&&(k.children=t.all(g),t.patch(g,k),k=t.applyData(g,k)),m.push(k)}const y={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(l,y),t.applyData(l,y)}function yj(t,l){const i={type:"element",tagName:"td",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}const Py=9,Jy=32;function vj(t){const l=String(t),i=/\r?\n|\r/g;let r=i.exec(l),o=0;const s=[];for(;r;)s.push(Wy(l.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=i.exec(l);return s.push(Wy(l.slice(o),o>0,!1)),s.join("")}function Wy(t,l,i){let r=0,o=t.length;if(l){let s=t.codePointAt(r);for(;s===Py||s===Jy;)r++,s=t.codePointAt(r)}if(i){let s=t.codePointAt(o-1);for(;s===Py||s===Jy;)o--,s=t.codePointAt(o-1)}return o>r?t.slice(r,o):""}function bj(t,l){const i={type:"text",value:vj(String(l.value))};return t.patch(l,i),t.applyData(l,i)}function xj(t,l){const i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(l,i),t.applyData(l,i)}const Sj={blockquote:KT,break:PT,code:JT,delete:WT,emphasis:ej,footnoteReference:tj,heading:nj,html:lj,imageReference:aj,image:ij,inlineCode:rj,linkReference:uj,link:oj,listItem:sj,list:fj,paragraph:dj,root:hj,strong:mj,table:pj,tableCell:yj,tableRow:gj,text:bj,thematicBreak:xj,toml:ko,yaml:ko,definition:ko,footnoteDefinition:ko};function ko(){}const Jb=-1,ns=0,Fr=1,Yo=2,$d=3,Zd=4,Kd=5,Pd=6,Wb=7,e0=8,ev=typeof self=="object"?self:globalThis,Ej=(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 ns:case Jb:return i(c,o);case Fr:{const d=i([],o);for(const p of c)d.push(r(p));return d}case Yo:{const d=i({},o);for(const[p,m]of c)d[r(p)]=r(m);return d}case $d:return i(new Date(c),o);case Zd:{const{source:d,flags:p}=c;return i(new RegExp(d,p),o)}case Kd:{const d=i(new Map,o);for(const[p,m]of c)d.set(r(p),r(m));return d}case Pd:{const d=i(new Set,o);for(const p of c)d.add(r(p));return d}case Wb:{const{name:d,message:p}=c;return i(new ev[d](p),o)}case e0: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 ev[s](c),o)};return r},tv=t=>Ej(new Map,t)(0),Ci="",{toString:wj}={},{keys:kj}=Object,Lr=t=>{const l=typeof t;if(l!=="object"||!t)return[ns,l];const i=wj.call(t).slice(8,-1);switch(i){case"Array":return[Fr,Ci];case"Object":return[Yo,Ci];case"Date":return[$d,Ci];case"RegExp":return[Zd,Ci];case"Map":return[Kd,Ci];case"Set":return[Pd,Ci];case"DataView":return[Fr,i]}return i.includes("Array")?[Fr,i]:i.includes("Error")?[Wb,i]:[Yo,i]},Co=([t,l])=>t===ns&&(l==="function"||l==="symbol"),Cj=(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]=Lr(c);switch(d){case ns:{let y=c;switch(p){case"bigint":d=e0,y=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);y=null;break;case"undefined":return o([Jb],c)}return o([d,y],c)}case Fr:{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 Yo:{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 kj(c))(t||!Co(Lr(c[b])))&&y.push([s(b),s(c[b])]);return g}case $d:return o([d,c.toISOString()],c);case Zd:{const{source:y,flags:g}=c;return o([d,{source:y,flags:g}],c)}case Kd:{const y=[],g=o([d,y],c);for(const[b,S]of c)(t||!(Co(Lr(b))||Co(Lr(S))))&&y.push([s(b),s(S)]);return g}case Pd:{const y=[],g=o([d,y],c);for(const b of c)(t||!Co(Lr(b)))&&y.push(s(b));return g}}const{message:m}=c;return o([d,{name:p,message:m}],c)};return s},nv=(t,{json:l,lossy:i}={})=>{const r=[];return Cj(!(l||i),!!l,new Map,r)(t),r},Fo=typeof structuredClone=="function"?(t,l)=>l&&("json"in l||"lossy"in l)?tv(nv(t,l)):structuredClone(t):(t,l)=>tv(nv(t,l));function Tj(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 jj(t,l){return"Back to reference "+(t+1)+(l>1?"-"+l:"")}function Aj(t){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||Tj,r=t.options.footnoteBackLabel||jj,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=Ui(g.toLowerCase());let S=0;const k=[],j=t.footnoteCounts.get(g);for(;j!==void 0&&++S<=j;){k.length>0&&k.push({type:"text",value:" "});let N=typeof i=="string"?i:i(p,S);typeof N=="string"&&(N={type:"text",value:N}),k.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(N)?N:[N]})}const z=y[y.length-1];if(z&&z.type==="element"&&z.tagName==="p"){const N=z.children[z.children.length-1];N&&N.type==="text"?N.value+=" ":z.children.push({type:"text",value:" "}),z.children.push(...k)}else y.push(...k);const T={type:"element",tagName:"li",properties:{id:l+"fn-"+b},children:t.wrap(y,!0)};t.patch(m,T),d.push(T)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Fo(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 ls=(function(t){if(t==null)return Rj;if(typeof t=="function")return as(t);if(typeof t=="object")return Array.isArray(t)?_j(t):zj(t);if(typeof t=="string")return Nj(t);throw new Error("Expected function, string, or object as test")});function _j(t){const l=[];let i=-1;for(;++i<t.length;)l[i]=ls(t[i]);return as(r);function r(...o){let s=-1;for(;++s<l.length;)if(l[s].apply(this,o))return!0;return!1}}function zj(t){const l=t;return as(i);function i(r){const o=r;let s;for(s in t)if(o[s]!==l[s])return!1;return!0}}function Nj(t){return as(l);function l(i){return i&&i.type===t}}function as(t){return l;function l(i,r,o){return!!(Dj(i)&&t.call(this,i,typeof r=="number"?r:void 0,o||void 0))}}function Rj(){return!0}function Dj(t){return t!==null&&typeof t=="object"&&"type"in t}const t0=[],Oj=!0,ud=!1,Mj="skip";function n0(t,l,i,r){let o;typeof l=="function"&&typeof i!="function"?(r=i,i=l):o=l;const s=ls(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=t0,k,j,z;if((!l||s(p,m,y[y.length-1]||void 0))&&(S=Lj(i(p,y)),S[0]===ud))return S;if("children"in p&&p.children){const T=p;if(T.children&&S[0]!==Mj)for(j=(r?T.children.length:-1)+c,z=y.concat(T);j>-1&&j<T.children.length;){const N=T.children[j];if(k=d(N,j,z)(),k[0]===ud)return k;j=typeof k[1]=="number"?k[1]:j+c}}return S}}}function Lj(t){return Array.isArray(t)?t:typeof t=="number"?[Oj,t]:t==null?t0:[t]}function Jd(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),n0(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 od={}.hasOwnProperty,Uj={};function Bj(t,l){const i=l||Uj,r=new Map,o=new Map,s=new Map,c={...Sj,...i.handlers},d={all:m,applyData:qj,definitionById:r,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:p,options:i,patch:Hj,wrap:Fj};return Jd(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(od.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,...z}=y,T=Fo(z);return T.children=d.all(y),T}return Fo(y)}return(d.options.unknownHandler||Yj)(d,y,g)}function m(y){const g=[];if("children"in y){const b=y.children;let S=-1;for(;++S<b.length;){const k=d.one(b[S],y);if(k){if(S&&b[S-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=lv(k.value)),!Array.isArray(k)&&k.type==="element")){const j=k.children[0];j&&j.type==="text"&&(j.value=lv(j.value))}Array.isArray(k)?g.push(...k):g.push(k)}}}return g}}function Hj(t,l){t.position&&(l.position=jC(t))}function qj(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,Fo(s)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function Yj(t,l){const i=l.data||{},r="value"in l&&!(od.call(i,"hProperties")||od.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 Fj(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 lv(t){let l=0,i=t.charCodeAt(l);for(;i===9||i===32;)l++,i=t.charCodeAt(l);return t.slice(l)}function av(t,l){const i=Bj(t,l),r=i.one(t,void 0),o=Aj(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 Gj(t,l){return t&&"run"in t?async function(i,r){const o=av(i,{file:r,...l});await t.run(o,r)}:function(i,r){return av(i,{file:r,...t||l})}}function iv(t){if(t)throw t}var Nf,rv;function Vj(){if(rv)return Nf;rv=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 Nf=function p(){var m,y,g,b,S,k,j=arguments[0],z=1,T=arguments.length,N=!1;for(typeof j=="boolean"&&(N=j,j=arguments[1]||{},z=2),(j==null||typeof j!="object"&&typeof j!="function")&&(j={});z<T;++z)if(m=arguments[z],m!=null)for(y in m)g=d(j,y),b=d(m,y),j!==b&&(N&&b&&(s(b)||(S=o(b)))?(S?(S=!1,k=g&&o(g)?g:[]):k=g&&s(g)?g:{},c(j,{name:y,newValue:p(N,k,b)})):typeof b<"u"&&c(j,{name:y,newValue:b}));return j},Nf}var Ij=Vj();const Rf=vd(Ij);function sd(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 Xj(){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?Qj(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 Qj(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 Pn={basename:$j,dirname:Zj,extname:Kj,join:Pj,sep:"/"};function $j(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');au(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 Zj(t){if(au(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 Kj(t){au(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 Pj(...t){let l=-1,i;for(;++l<t.length;)au(t[l]),t[l]&&(i=i===void 0?t[l]:i+"/"+t[l]);return i===void 0?".":Jj(i)}function Jj(t){au(t);const l=t.codePointAt(0)===47;let i=Wj(t,!l);return i.length===0&&!l&&(i="."),i.length>0&&t.codePointAt(t.length-1)===47&&(i+="/"),l?"/"+i:i}function Wj(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 au(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const eA={cwd:tA};function tA(){return"/"}function cd(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function nA(t){if(typeof t=="string")t=new URL(t);else if(!cd(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 lA(t)}function lA(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 Df=["history","path","basename","stem","extname","dirname"];class l0{constructor(l){let i;l?cd(l)?i={path:l}:typeof l=="string"||aA(l)?i={value:l}:i=l:i={},this.cwd="cwd"in i?"":eA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Df.length;){const s=Df[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)Df.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?Pn.basename(this.path):void 0}set basename(l){Mf(l,"basename"),Of(l,"basename"),this.path=Pn.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Pn.dirname(this.path):void 0}set dirname(l){uv(this.basename,"dirname"),this.path=Pn.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Pn.extname(this.path):void 0}set extname(l){if(Of(l,"extname"),uv(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=Pn.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){cd(l)&&(l=nA(l)),Mf(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Pn.basename(this.path,this.extname):void 0}set stem(l){Mf(l,"stem"),Of(l,"stem"),this.path=Pn.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 Of(t,l){if(t&&t.includes(Pn.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Pn.sep+"`")}function Mf(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function uv(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function aA(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const iA=(function(t){const r=this.constructor.prototype,o=r[t],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),rA={}.hasOwnProperty;class Wd extends iA{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=Xj()}copy(){const l=new Wd;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];l.use(...r)}return l.data(Rf(!0,{},this.namespace)),l}data(l,i){return typeof l=="string"?arguments.length===2?(Bf("data",this.frozen),this.namespace[l]=i,this):rA.call(this.namespace,l)&&this.namespace[l]||void 0:l?(Bf("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=To(l),r=this.parser||this.Parser;return Lf("parse",r),r(String(i),i)}process(l,i){const r=this;return this.freeze(),Lf("process",this.parser||this.Parser),Uf("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(s,c){const d=To(l),p=r.parse(d);r.run(p,d,function(y,g,b){if(y||!g||!b)return m(y);const S=g,k=r.stringify(S,b);sA(k)?b.value=k:b.result=k,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(),Lf("processSync",this.parser||this.Parser),Uf("processSync",this.compiler||this.Compiler),this.process(l,o),sv("processSync","process",i),r;function o(s,c){i=!0,iv(s),r=c}}run(l,i,r){ov(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=To(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),sv("runSync","run",r),o;function s(c,d){iv(c),o=d,r=!0}}stringify(l,i){this.freeze();const r=To(i),o=this.compiler||this.Compiler;return Uf("stringify",o),ov(l),o(l,r)}use(l,...i){const r=this.attachers,o=this.namespace;if(Bf("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=Rf(!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,...k]=y;const j=r[b][1];sd(j)&&sd(S)&&(S=Rf(!0,j,S)),r[b]=[m,S,...k]}}}}const uA=new Wd().freeze();function Lf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Uf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Bf(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 ov(t){if(!sd(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function sv(t,l,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function To(t){return oA(t)?t:new l0(t)}function oA(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function sA(t){return typeof t=="string"||cA(t)}function cA(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const fA="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",cv=[],fv={allowDangerousHtml:!0},dA=/^(https?|ircs?|mailto|xmpp)$/i,hA=[{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 mA(t){const l=pA(t),i=gA(t);return yA(l.runSync(l.parse(i),i),t)}function pA(t){const l=t.rehypePlugins||cv,i=t.remarkPlugins||cv,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...fv}:fv;return uA().use(ZT).use(i).use(Gj,r).use(l)}function gA(t){const l=t.children||"",i=new l0;return typeof l=="string"&&(i.value=l),i}function yA(t,l){const i=l.allowedElements,r=l.allowElement,o=l.components,s=l.disallowedElements,c=l.skipHtml,d=l.unwrapDisallowed,p=l.urlTransform||vA;for(const y of hA)Object.hasOwn(l,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+fA+y.id,void 0);return Jd(t,m),RC(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 Af)if(Object.hasOwn(Af,S)&&Object.hasOwn(y.properties,S)){const k=y.properties[S],j=Af[S];(j===null||j.includes(y.tagName))&&(y.properties[S]=p(String(k||""),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 vA(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||dA.test(t.slice(0,l))?t:""}function dv(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 bA(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function xA(t,l,i){const o=ls((i||{}).ignore||[]),s=SA(l);let c=-1;for(;++c<s.length;)n0(t,"text",d);function d(m,y){let g=-1,b;for(;++g<y.length;){const S=y[g],k=b?b.children:void 0;if(o(S,k?k.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 k=0;const z=g.children.indexOf(m);let T=!1,N=[];b.lastIndex=0;let R=b.exec(m.value);for(;R;){const P=R.index,W={index:R.index,input:R.input,stack:[...y,m]};let H=S(...R,W);if(typeof H=="string"&&(H=H.length>0?{type:"text",value:H}:void 0),H===!1?b.lastIndex=P+1:(k!==P&&N.push({type:"text",value:m.value.slice(k,P)}),Array.isArray(H)?N.push(...H):H&&N.push(H),k=P+R[0].length,T=!0),!b.global)break;R=b.exec(m.value)}return T?(k<m.value.length&&N.push({type:"text",value:m.value.slice(k)}),g.children.splice(z,1,...N)):N=[m],z+N.length}}function SA(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([EA(o[0]),wA(o[1])])}return l}function EA(t){return typeof t=="string"?new RegExp(bA(t),"g"):t}function wA(t){return typeof t=="function"?t:function(){return t}}const Hf="phrasing",qf=["autolink","link","image","label"];function kA(){return{transforms:[NA],enter:{literalAutolink:TA,literalAutolinkEmail:Yf,literalAutolinkHttp:Yf,literalAutolinkWww:Yf},exit:{literalAutolink:zA,literalAutolinkEmail:_A,literalAutolinkHttp:jA,literalAutolinkWww:AA}}}function CA(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Hf,notInConstruct:qf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Hf,notInConstruct:qf},{character:":",before:"[ps]",after:"\\/",inConstruct:Hf,notInConstruct:qf}]}}function TA(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Yf(t){this.config.enter.autolinkProtocol.call(this,t)}function jA(t){this.config.exit.autolinkProtocol.call(this,t)}function AA(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 _A(t){this.config.exit.autolinkEmail.call(this,t)}function zA(t){this.exit(t)}function NA(t){xA(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,RA],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),DA]],{ignore:["link","linkReference"]})}function RA(t,l,i,r,o){let s="";if(!a0(o)||(/^w/i.test(l)&&(i=l+i,l="",s="http://"),!OA(i)))return!1;const c=MA(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 DA(t,l,i,r){return!a0(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+i,children:[{type:"text",value:l+"@"+i}]}}function OA(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 MA(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=dv(t,"(");let s=dv(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 a0(t,l){const i=t.input.charCodeAt(t.index-1);return(t.index===0||qa(i)||es(i))&&(!l||i!==47)}i0.peek=VA;function LA(){this.buffer()}function UA(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function BA(){this.buffer()}function HA(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function qA(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 YA(t){this.exit(t)}function FA(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 GA(t){this.exit(t)}function VA(){return"["}function i0(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 IA(){return{enter:{gfmFootnoteCallString:LA,gfmFootnoteCall:UA,gfmFootnoteDefinitionLabelString:BA,gfmFootnoteDefinition:HA},exit:{gfmFootnoteCallString:qA,gfmFootnoteCall:YA,gfmFootnoteDefinitionLabelString:FA,gfmFootnoteDefinition:GA}}}function XA(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:i,footnoteReference:i0},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?r0:QA))),m(),p}}function QA(t,l,i){return l===0?t:r0(t,l,i)}function r0(t,l,i){return(i?"":" ")+t}const $A=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];u0.peek=WA;function ZA(){return{canContainEols:["delete"],enter:{strikethrough:PA},exit:{strikethrough:JA}}}function KA(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$A}],handlers:{delete:u0}}}function PA(t){this.enter({type:"delete",children:[]},t)}function JA(t){this.exit(t)}function u0(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 WA(){return"~"}function e_(t){return t.length}function t_(t,l){const i=l||{},r=(i.align||[]).concat(),o=i.stringLength||e_,s=[],c=[],d=[],p=[];let m=0,y=-1;for(;++y<t.length;){const j=[],z=[];let T=-1;for(t[y].length>m&&(m=t[y].length);++T<t[y].length;){const N=n_(t[y][T]);if(i.alignDelimiters!==!1){const R=o(N);z[T]=R,(p[T]===void 0||R>p[T])&&(p[T]=R)}j.push(N)}c[y]=j,d[y]=z}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<m;)s[g]=hv(r[g]);else{const j=hv(r);for(;++g<m;)s[g]=j}g=-1;const b=[],S=[];for(;++g<m;){const j=s[g];let z="",T="";j===99?(z=":",T=":"):j===108?z=":":j===114&&(T=":");let N=i.alignDelimiters===!1?1:Math.max(1,p[g]-z.length-T.length);const R=z+"-".repeat(N)+T;i.alignDelimiters!==!1&&(N=z.length+N+T.length,N>p[g]&&(p[g]=N),S[g]=N),b[g]=R}c.splice(1,0,b),d.splice(1,0,S),y=-1;const k=[];for(;++y<c.length;){const j=c[y],z=d[y];g=-1;const T=[];for(;++g<m;){const N=j[g]||"";let R="",P="";if(i.alignDelimiters!==!1){const W=p[g]-(z[g]||0),H=s[g];H===114?R=" ".repeat(W):H===99?W%2?(R=" ".repeat(W/2+.5),P=" ".repeat(W/2-.5)):(R=" ".repeat(W/2),P=R):P=" ".repeat(W)}i.delimiterStart!==!1&&!g&&T.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&N==="")&&(i.delimiterStart!==!1||g)&&T.push(" "),i.alignDelimiters!==!1&&T.push(R),T.push(N),i.alignDelimiters!==!1&&T.push(P),i.padding!==!1&&T.push(" "),(i.delimiterEnd!==!1||g!==m-1)&&T.push("|")}k.push(i.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return k.join(`
203
- `)}function n_(t){return t==null?"":String(t)}function hv(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 l_(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()),a_);return o(),c}function a_(t,l,i){return">"+(i?"":" ")+t}function i_(t,l){return mv(t,l.inConstruct,!0)&&!mv(t,l.notInConstruct,!1)}function mv(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 pv(t,l,i,r){let o=-1;for(;++o<i.unsafe.length;)if(i.unsafe[o].character===`
204
- `&&i_(i.stack,i.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
205
- `}function r_(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 u_(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 o_(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 s_(t,l,i,r){const o=o_(i),s=t.value||"",c=o==="`"?"GraveAccent":"Tilde";if(u_(t,i)){const g=i.enter("codeIndented"),b=i.indentLines(s,c_);return g(),b}const d=i.createTracker(r),p=o.repeat(Math.max(r_(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 c_(t,l,i){return(i?"":" ")+t}function eh(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 f_(t,l,i,r){const o=eh(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 d_(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 $r(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Go(t,l,i){const r=Di(t),o=Di(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}}o0.peek=h_;function o0(t,l,i,r){const o=d_(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=Go(r.before.charCodeAt(r.before.length-1),m,o);y.inside&&(p=$r(m)+p.slice(1));const g=p.charCodeAt(p.length-1),b=Go(r.after.charCodeAt(0),g,o);b.inside&&(p=p.slice(0,-1)+$r(g));const S=c.move(o);return s(),i.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},d+p+S}function h_(t,l,i){return i.options.emphasis||"*"}function m_(t,l){let i=!1;return Jd(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return i=!0,ud}),!!((!t.depth||t.depth<3)&&Id(t)&&(l.options.setext||i))}function p_(t,l,i,r){const o=Math.max(Math.min(6,t.depth||1),1),s=i.createTracker(r);if(m_(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=$r(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,i.options.closeAtx&&(m+=" "+c),p(),d(),m}s0.peek=g_;function s0(t){return t.value||""}function g_(){return"<"}c0.peek=y_;function c0(t,l,i,r){const o=eh(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 y_(){return"!"}f0.peek=v_;function f0(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 v_(){return"!"}d0.peek=b_;function d0(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 b_(){return"`"}function h0(t,l){const i=Id(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))}m0.peek=x_;function m0(t,l,i,r){const o=eh(i),s=o==='"'?"Quote":"Apostrophe",c=i.createTracker(r);let d,p;if(h0(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 x_(t,l,i){return h0(t,i)?"<":"["}p0.peek=S_;function p0(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 S_(){return"["}function th(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 E_(t){const l=th(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 w_(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 g0(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 k_(t,l,i,r){const o=i.enter("list"),s=i.bulletCurrent;let c=t.ordered?w_(i):th(i);const d=t.ordered?c==="."?")":".":E_(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),g0(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 C_(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 T_(t,l,i,r){const o=C_(i);let s=i.bulletCurrent||th(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 j_(t,l,i,r){const o=i.enter("paragraph"),s=i.enter("phrasing"),c=i.containerPhrasing(t,r);return s(),o(),c}const A_=ls(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function __(t,l,i,r){return(t.children.some(function(c){return A_(c)})?i.containerPhrasing:i.containerFlow).call(i,t,r)}function z_(t){const l=t.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}y0.peek=N_;function y0(t,l,i,r){const o=z_(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=Go(r.before.charCodeAt(r.before.length-1),m,o);y.inside&&(p=$r(m)+p.slice(1));const g=p.charCodeAt(p.length-1),b=Go(r.after.charCodeAt(0),g,o);b.inside&&(p=p.slice(0,-1)+$r(g));const S=c.move(o+o);return s(),i.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},d+p+S}function N_(t,l,i){return i.options.strong||"*"}function R_(t,l,i,r){return i.safe(t.value,r)}function D_(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 O_(t,l,i){const r=(g0(i)+(i.options.ruleSpaces?" ":"")).repeat(D_(i));return i.options.ruleSpaces?r.slice(0,-1):r}const v0={blockquote:l_,break:pv,code:s_,definition:f_,emphasis:o0,hardBreak:pv,heading:p_,html:s0,image:c0,imageReference:f0,inlineCode:d0,link:m0,linkReference:p0,list:k_,listItem:T_,paragraph:j_,root:__,strong:y0,text:R_,thematicBreak:O_};function M_(){return{enter:{table:L_,tableData:gv,tableHeader:gv,tableRow:B_},exit:{codeText:H_,table:U_,tableData:Ff,tableHeader:Ff,tableRow:Ff}}}function L_(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 U_(t){this.exit(t),this.data.inTable=void 0}function B_(t){this.enter({type:"tableRow",children:[]},t)}function Ff(t){this.exit(t)}function gv(t){this.enter({type:"tableCell",children:[]},t)}function H_(t){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,q_));const i=this.stack[this.stack.length-1];i.type,i.value=l,this.exit(t)}function q_(t,l){return l==="|"?l:t}function Y_(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,k,j,z){return m(y(S,j,z),S.align)}function d(S,k,j,z){const T=g(S,j,z),N=m([T]);return N.slice(0,N.indexOf(`
216
- `))}function p(S,k,j,z){const T=j.enter("tableCell"),N=j.enter("phrasing"),R=j.containerPhrasing(S,{...z,before:s,after:s});return N(),T(),R}function m(S,k){return t_(S,{align:k,alignDelimiters:r,padding:i,stringLength:o})}function y(S,k,j){const z=S.children;let T=-1;const N=[],R=k.enter("table");for(;++T<z.length;)N[T]=g(z[T],k,j);return R(),N}function g(S,k,j){const z=S.children;let T=-1;const N=[],R=k.enter("tableRow");for(;++T<z.length;)N[T]=p(z[T],S,k,j);return R(),N}function b(S,k,j){let z=v0.inlineCode(S,k,j);return j.stack.includes("tableCell")&&(z=z.replace(/\|/g,"\\$&")),z}}function F_(){return{exit:{taskListCheckValueChecked:yv,taskListCheckValueUnchecked:yv,paragraph:V_}}}function G_(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:I_}}}function yv(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function V_(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 I_(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=v0.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 X_(){return[kA(),IA(),ZA(),M_(),F_()]}function Q_(t){return{extensions:[CA(),XA(t),KA(),Y_(t),G_()]}}const $_={tokenize:ez,partial:!0},b0={tokenize:tz,partial:!0},x0={tokenize:nz,partial:!0},S0={tokenize:lz,partial:!0},Z_={tokenize:az,partial:!0},E0={name:"wwwAutolink",tokenize:J_,previous:k0},w0={name:"protocolAutolink",tokenize:W_,previous:C0},_l={name:"emailAutolink",tokenize:P_,previous:T0},nl={};function K_(){return{text:nl}}let Ba=48;for(;Ba<123;)nl[Ba]=_l,Ba++,Ba===58?Ba=65:Ba===91&&(Ba=97);nl[43]=_l;nl[45]=_l;nl[46]=_l;nl[95]=_l;nl[72]=[_l,w0];nl[104]=[_l,w0];nl[87]=[_l,E0];nl[119]=[_l,E0];function P_(t,l,i){const r=this;let o,s;return c;function c(g){return!fd(g)||!T0.call(r,r.previous)||nh(r.events)?i(g):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),d(g))}function d(g){return fd(g)?(t.consume(g),d):g===64?(t.consume(g),p):i(g)}function p(g){return g===46?t.check(Z_,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&&Kt(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(g)):i(g)}}function J_(t,l,i){const r=this;return o;function o(c){return c!==87&&c!==119||!k0.call(r,r.previous)||nh(r.events)?i(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check($_,t.attempt(b0,t.attempt(x0,s),i),i)(c))}function s(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(c)}}function W_(t,l,i){const r=this;let o="",s=!1;return c;function c(g){return(g===72||g===104)&&C0.call(r,r.previous)&&!nh(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),t.consume(g),d):i(g)}function d(g){if(Kt(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||qo(g)||st(g)||qa(g)||es(g)?i(g):t.attempt(b0,t.attempt(x0,y),i)(g)}function y(g){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(g)}}function ez(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 tz(t,l,i){let r,o,s;return c;function c(m){return m===46||m===95?t.check(S0,p,d)(m):m===null||st(m)||qa(m)||m!==45&&es(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 nz(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(S0,l,s)(c):c===null||st(c)||qa(c)?l(c):(t.consume(c),o)}function s(c){return c===41&&r++,t.consume(c),o}}function lz(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)||qa(d)?l(d):i(d)}function o(d){return d===null||d===40||d===91||st(d)||qa(d)?l(d):r(d)}function s(d){return Kt(d)?c(d):i(d)}function c(d){return d===59?(t.consume(d),r):Kt(d)?(t.consume(d),c):i(d)}}function az(t,l,i){return r;function r(s){return t.consume(s),o}function o(s){return Xt(s)?i(s):l(s)}}function k0(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||st(t)}function C0(t){return!Kt(t)}function T0(t){return!(t===47||fd(t))}function fd(t){return t===43||t===45||t===46||t===95||Xt(t)}function nh(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 iz={tokenize:hz,partial:!0};function rz(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:cz,continuation:{tokenize:fz},exit:dz}},text:{91:{name:"gfmFootnoteCall",tokenize:sz},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:uz,resolveTo:oz}}}}function uz(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 oz(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 sz(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 cz(t,l,i){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,c=0,d;return p;function p(k){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(k){return k===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",y):i(k)}function y(k){if(c>999||k===93&&!d||k===null||k===91||st(k))return i(k);if(k===93){t.exit("chunkString");const j=t.exit("gfmFootnoteDefinitionLabelString");return s=In(r.sliceSerialize(j)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(k),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),b}return st(k)||(d=!0),c++,t.consume(k),k===92?g:y}function g(k){return k===91||k===92||k===93?(t.consume(k),c++,y):y(k)}function b(k){return k===58?(t.enter("definitionMarker"),t.consume(k),t.exit("definitionMarker"),o.includes(s)||o.push(s),Ke(t,S,"gfmFootnoteDefinitionWhitespace")):i(k)}function S(k){return l(k)}}function fz(t,l,i){return t.check(lu,l,t.attempt(iz,l,i))}function dz(t){t.exit("gfmFootnoteDefinition")}function hz(t,l,i){const r=this;return Ke(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 mz(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,ts(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(k){return m===126&&y[y.length-1][1].type!=="characterEscape"?p(k):(c.enter("strikethroughSequenceTemporary"),S(k))}function S(k){const j=Di(m);if(k===126)return g>1?p(k):(c.consume(k),g++,S);if(g<2&&!i)return p(k);const z=c.exit("strikethroughSequenceTemporary"),T=Di(k);return z._open=!T||T===2&&!!j,z._close=!j||j===2&&!!T,d(k)}}}class pz{constructor(){this.map=[]}add(l,i,r){gz(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 gz(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 yz(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 vz(){return{flow:{null:{name:"table",tokenize:bz,resolveAll:xz}}}}function bz(t,l,i){const r=this;let o=0,s=0,c;return d;function d(U){let X=r.events.length-1;for(;X>-1;){const te=r.events[X][1].type;if(te==="lineEnding"||te==="linePrefix")X--;else break}const K=X>-1?r.events[X][1].type:null,I=K==="tableHead"||K==="tableRow"?H:p;return I===H&&r.parser.lazy[r.now().line]?i(U):I(U)}function p(U){return t.enter("tableHead"),t.enter("tableRow"),m(U)}function m(U){return U===124||(c=!0,s+=1),y(U)}function y(U){return U===null?i(U):_e(U)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(U),t.exit("lineEnding"),S):i(U):Ye(U)?Ke(t,y,"whitespace")(U):(s+=1,c&&(c=!1,o+=1),U===124?(t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),c=!0,y):(t.enter("data"),g(U)))}function g(U){return U===null||U===124||st(U)?(t.exit("data"),y(U)):(t.consume(U),U===92?b:g)}function b(U){return U===92||U===124?(t.consume(U),g):g(U)}function S(U){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(U):(t.enter("tableDelimiterRow"),c=!1,Ye(U)?Ke(t,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):k(U))}function k(U){return U===45||U===58?z(U):U===124?(c=!0,t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),j):W(U)}function j(U){return Ye(U)?Ke(t,z,"whitespace")(U):z(U)}function z(U){return U===58?(s+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(U),t.exit("tableDelimiterMarker"),T):U===45?(s+=1,T(U)):U===null||_e(U)?P(U):W(U)}function T(U){return U===45?(t.enter("tableDelimiterFiller"),N(U)):W(U)}function N(U){return U===45?(t.consume(U),N):U===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(U),t.exit("tableDelimiterMarker"),R):(t.exit("tableDelimiterFiller"),R(U))}function R(U){return Ye(U)?Ke(t,P,"whitespace")(U):P(U)}function P(U){return U===124?k(U):U===null||_e(U)?!c||o!==s?W(U):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(U)):W(U)}function W(U){return i(U)}function H(U){return t.enter("tableRow"),_(U)}function _(U){return U===124?(t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),_):U===null||_e(U)?(t.exit("tableRow"),l(U)):Ye(U)?Ke(t,_,"whitespace")(U):(t.enter("data"),ae(U))}function ae(U){return U===null||U===124||st(U)?(t.exit("data"),_(U)):(t.consume(U),U===92?ce:ae)}function ce(U){return U===92||U===124?(t.consume(U),ae):ae(U)}}function xz(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 pz;for(;++i<t.length;){const S=t[i],k=S[1];S[0]==="enter"?k.type==="tableHead"?(d=!1,p!==0&&(vv(b,l,p,m,y),y=void 0,p=0),m={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(i,0,[["enter",m,l]])):k.type==="tableRow"||k.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({},k.start),end:Object.assign({},k.end)},b.add(i,0,[["enter",y,l]])),o=k.type==="tableDelimiterRow"?2:y?3:1):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],g=jo(b,l,s,o,void 0,g),s=[0,0,0,0]),c[2]=i)):k.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(c[0]=c[1],g=jo(b,l,s,o,void 0,g)),s=c,c=[s[1],i,0,0])):k.type==="tableHead"?(d=!0,p=i):k.type==="tableRow"||k.type==="tableDelimiterRow"?(p=i,s[1]!==0?(c[0]=c[1],g=jo(b,l,s,o,i,g)):c[1]!==0&&(g=jo(b,l,c,o,i,g)),o=0):o&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(c[3]=i)}for(p!==0&&vv(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=yz(l.events,i))}return t}function jo(t,l,i,r,o,s){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",d="tableContent";i[0]!==0&&(s.end=Object.assign({},ji(l.events,i[0])),t.add(i[0],0,[["exit",s,l]]));const p=ji(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=ji(l.events,i[2]),y=ji(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 k=i[2]+1,j=i[3]-i[2]-1;t.add(k,j,[])}}t.add(i[3]+1,0,[["exit",g,l]])}return o!==void 0&&(s.end=Object.assign({},ji(l.events,o)),t.add(o,0,[["exit",s,l]]),s=void 0),s}function vv(t,l,i,r,o){const s=[],c=ji(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 ji(t,l){const i=t[l],r=i[0]==="enter"?"start":"end";return i[1][r]}const Sz={name:"tasklistCheck",tokenize:wz};function Ez(){return{text:{91:Sz}}}function wz(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 _e(p)?l(p):Ye(p)?t.check({tokenize:kz},l,i)(p):i(p)}}function kz(t,l,i){return Ke(t,r,"whitespace");function r(o){return o===null?i(o):l(o)}}function Cz(t){return Ub([K_(),rz(),mz(t),vz(),Ez()])}const Tz={};function jz(t){const l=this,i=t||Tz,r=l.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(Cz(i)),s.push(X_()),c.push(Q_(i))}const dd=new Set(["<",">","{","}","[","]"]),Az=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"]),j0=new Set(["+","-","*","/","%","=","!","&","|","^","~","!","?",":",".",",",";","'",'"',".","(",")","[","]","#","@","\\",...dd]),_z={keywords:Az,onCommentStart:N0,onCommentEnd:Bz},lh=["identifier","keyword","string","class","property","entity","jsxliterals","sign","comment","break","space"],[Gf,zz,ia,Nz,Vf,Rz,Dz,Tl,bv,hd,xv]=lh.map((t,l)=>l);function Ao(t){return/^[^\S\r\n]+$/g.test(t)}function Oz(t){return j0.has(t)}function Mz(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function Vo(t){return/^[\w_]+$/.test(t)||A0(t)}function Lz(t){const l=t[0];return Vo(l)&&l===l.toUpperCase()||t==="null"}function A0(t){return/[^\u0000-\u007f]/.test(t)}function _0(t){return/^[a-zA-Z]$/.test(t)}function z0(t){return _0(t)||A0(t)}function _o(t){return z0(t[0])&&(t.length===1||Vo(t.slice(1)))}function md(t){return t==="`"}function pd(t){return t==='"'||t==="'"}function Uz(t){return pd(t)||md(t)}function N0(t,l){const i=t+l;return i==="/*"?2:i==="//"?1:0}function Bz(t,l){return t+l==="*/"?2:l===`
217
- `?1:0}function Hz(t){return t[0]==="/"&&!N0(t[0],t[1])}function qz(t,l){const{keywords:i,onCommentStart:r,onCommentEnd:o}={..._z,...l};let s="",c=-1,d=[-1,""],p=[-2,""];const m=[];let y=!1,g=0,b=!1,S=0;const k=()=>y&&!b&&!g,j=()=>g&&!k(),z=()=>!g&&k()&&!b&&S>0;let T=null,N=!1,R=0,P=0;const W=()=>T!==null,H=()=>N,_=()=>P>R,ae=()=>P>0&&P===R,ce=()=>W()||_();function U(K){const I=K===`
218
- `;if(j()){if(W())return ia;const[,Q]=d;if(_o(K)&&(Q==="<"||Q==="</"))return Rz}if(z())return Dz;if(W()||_())return ia;if(i.has(K))return d[1]==="."?Gf:zz;if(I)return hd;if(Ao(K))return xv;if(K.split("").every(Oz))return Tl;if(Lz(K))return j()?Gf:Nz;if(_o(K)){const Q=d[1]==="."&&_o(p[1]);if(!ce()&&!Q)return Gf;if(Q)return Vf}return ia}const X=(K,I)=>{if(I&&(s=I),s){c=K||U(s);const te=[c,s];c!==xv&&c!==hd&&(p=d,d=te),m.push(te)}s=""};for(let K=0;K<t.length;K++){const I=t[K],te=t[K-1],Q=t[K+1],D=te+I,ee=I+Q;if(pd(I)&&!z()&&!_()){X(),te!=="\\"&&(T&&I===T?T=null:T||(T=I)),X(ia,I);continue}if(!_()&&te!=="\\n"&&md(I)){X(),X(ia,I),P++;continue}if(_()){if(te!=="\\n"&&md(I)&&P>0){X(),P--,X(ia,I);continue}if(ee==="${"){R++,X(ia),X(Tl,ee),K++;continue}}if(ae()&&I==="}"){X(),R--,X(Tl,I);continue}if(k()&&I==="{"){X(),X(Tl,I),b=!0;continue}if(y){if(!g&&I==="<"){X(),Q==="/"?(g=2,s=ee,K++):(g=1,s=I),X(Tl);continue}if(g){if(I===">"&&!"/=".includes(te)){X(),g===1?(g=0,S++):(g=0,y=!1),X(Tl,I);continue}if(ee==="/>"||ee==="</"){s!=="<"&&s!=="/"&&X(),ee==="/>"?g=0:S--,S||(y=!1),s=ee,K++,X(Tl);continue}if(I==="<"){X(),s=I,X(Tl);continue}if(Q==="-"&&!ce()&&!z()&&s){X(Vf,s+I+Q),K++;continue}if(Q==="="&&!ce()&&!Ao(I)){Ao(s)&&X();const F=s+I;if(_o(F)){X(Vf,F);continue}}}}!g&&(I==="<"&&z0(Q)||ee==="</")&&(g=Q==="/"?2:1,I==="<"&&(Q==="/"||_0(Q))&&!ce()&&!z()&&!H()&&(y=!0));const se=Uz(I),ve=_(),A=!y&&Hz(ee),O=z();if(se||ve||pd(T))s+=I;else if(A){X();const[F,C]=d;if(A&&F!==-1&&!(F===Tl&&C!==")"||F===bv)){s=I,X();continue}N=!0;const ue=K++,be=()=>K>=t.length,xe=()=>be()||t[K]===`
219
- `;let De=!1;for(;!xe();K++)if(t[K]==="/"&&t[K-1]!=="\\"){for(De=!0;ue!==K&&/^[a-z]$/.test(t[K+1])&&!xe();)K++;break}N=!1,ue!==K&&De?(s=t.slice(ue,K+1),X(ia)):(s=I,X(),K=ue)}else if(r(I,Q)){X();const F=K,C=r(I,Q);if(C)for(;K<t.length&&o(t[K-1],t[K])!=C;K++);s=t.slice(F,K+1),X(bv)}else I===" "||I===`
220
- `?I===" "&&(Ao(s)||!s||O)?(s+=I,Q==="<"&&X()):(X(),s=I,X()):b&&I==="}"?(X(),s=I,X(),b=!1):O&&!dd.has(I)||_()||(Vo(I)===Vo(s[s.length-1])||k())&&!j0.has(I)?s+=I:(D==="</"&&(s=D),X(),D!=="</"&&(s=I),ee==="</"||ee==="/>"?(s=ee,X(),K++):dd.has(I)&&X())}return X(),m}function Yz(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=lh[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!==hd){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 Fz=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 Gz(t){return t.map(l=>{const{tagName:i}=l,r=l.children.map(o=>{const{tagName:s,children:c,properties:d}=o;return`<${s} ${Fz(d)}>${Mz(c[0].value)}</${s}>`}).join("");return`<${i} class="${l.properties.className}">${r}</${i}>`}).join(`
223
- `)}function R0(t,l){const i=qz(t,l),r=Yz(i);return Gz(r)}new Map(lh.map((t,l)=>[t,l]));function Vz({className:t,children:l}){const i=String(l).replace(/\n$/,"");if(!t)return v.jsx("code",{children:l});const o=R0(i);return v.jsx("code",{dangerouslySetInnerHTML:{__html:o}})}function Io({children:t,inline:l}){return v.jsx("div",{className:l?"markdown-inline":"markdown",children:v.jsx(mA,{remarkPlugins:[jz],components:{code:Vz},children:t})})}const Iz={plan:"[plan]",approve:"[approve]",task:"[task]",build:"[build]",fix:"[fix]",done:"[done]",error:"[error]",verbose:"[verbose]"};function ca({value:t}){return t?v.jsx("span",{className:"duration",children:t}):null}function Xz({entry:t,duration:l}){return v.jsxs("div",{className:"console-entry",children:[v.jsx("span",{className:`prefix ${t.level}`,children:Iz[t.level]}),v.jsx("span",{children:t.message}),v.jsx(ca,{value:l})]})}function Qz({entry:t}){return v.jsxs("div",{className:"console-entry user-message",children:[v.jsx("span",{className:"prefix",style:{color:"var(--orange)"},children:"[you]"}),v.jsx("span",{children:t.message})]})}function gd({entry:t,duration:l}){const i=t.agent||"agent";return v.jsxs("details",{className:"thinking-inline",children:[v.jsxs("summary",{children:[v.jsxs("span",{className:"thinking-label",children:["[",i,"] Thinking"]}),v.jsxs("span",{className:"thinking-preview",children:[t.text.slice(0,100),"..."]}),v.jsx(ca,{value:l})]}),v.jsx("div",{className:"thinking-body",children:v.jsx(Io,{inline:!0,children:t.text})})]})}const $z=300;function Zz({entry:t,duration:l}){const i=t.agent||"agent";return t.text.length<=$z?v.jsxs("div",{className:"console-entry",children:[v.jsxs("span",{className:"prefix task",children:["[",i,"]"]}),v.jsx("span",{children:v.jsx(Io,{inline:!0,children:t.text})}),v.jsx(ca,{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(ca,{value:l})]}),v.jsx("div",{className:"tool-inline-body",children:v.jsx(Io,{children:t.text})})]})}function Kz(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 Pz(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 If({text:t,maxLen:l}){const i=t.length>l,r=i?t.slice(0,l):t,o=R0(r)+(i?`
225
- ... (truncated)`:"");return v.jsx("pre",{dangerouslySetInnerHTML:{__html:o}})}function yd({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||"";return r?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(ca,{value:l})]}),v.jsx("div",{className:"tool-inline-body",children:t.tool_response!==null&&v.jsx(If,{text:t.tool_response,maxLen:5e3})})]}):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:Kz(t)}),i?v.jsx("span",{className:"spinner-inline"}):v.jsx(ca,{value:l})]}),v.jsxs("div",{className:"tool-inline-body",children:[v.jsx("div",{className:"section-label",children:"Input"}),v.jsx(If,{text:Pz(t.tool_input),maxLen:5e3}),t.tool_response!==null&&v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"section-label",children:"Output"}),v.jsx(If,{text:t.tool_response,maxLen:5e3})]})]})]})}function Jz(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(1)}s`;const o=Math.floor(r/60),s=r%60;return`${o}m ${s.toFixed(0)}s`}function Wz(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 eN({items:t}){const[l,i]=w.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=Jz(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:Wz(t)}),v.jsx("span",{className:"tool-group-chevron",children:l?"▼":"▶"}),o&&v.jsx(ca,{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(yd,{entry:d,duration:m},d.tool_use_id||`gi-${p}`):d.kind==="assistant_thinking"?v.jsx(gd,{entry:d,duration:m},`thinking-${p}`):null)}),!l&&s&&v.jsx("div",{className:"tool-group-tail",children:s.entry.kind==="tool_use"?v.jsx(yd,{entry:s.entry,duration:s.duration}):s.entry.kind==="assistant_thinking"?v.jsx(gd,{entry:s.entry,duration:s.duration}):null})]})}function tN({sessionId:t,event:l,onResolved:i,resolved:r}){const[o,s]=w.useState(l.questions.map(()=>"")),[c,d]=w.useState(""),[p,m]=w.useState(!1),y=p||!!r;async function g(){m(!0);const b=o.filter(k=>k.trim()),S=b.length>0?b.join("; "):"Answers provided";try{await Ni(t,"clarification",{answers:[...o,c],_summary:S}),i(S)}catch{m(!1)}}return v.jsxs("div",{className:"gate-prompt",children:[v.jsxs("h3",{children:["Need more details (confidence: ",l.confidence,"%)"]}),l.summary&&v.jsx("p",{className:"gate-summary",children:l.summary}),l.questions.map((b,S)=>v.jsxs("div",{className:"question",children:[v.jsxs("label",{children:[S+1,". ",b]}),v.jsx("input",{type:"text",value:o[S],onChange:k=>{const j=[...o];j[S]=k.target.value,s(j)},disabled:y})]},S)),!r&&v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Anything else you'd like to add?"}),v.jsx("textarea",{value:c,onChange:b=>d(b.target.value),disabled:y,rows:3,placeholder:"Optional: add any extra context, requirements, or preferences..."})]}),!r&&v.jsx("div",{className:"gate-actions",children:v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:g,disabled:y,children:p?"Submitting...":"Submit Answers"})})]})}function nN({sessionId:t,event:l,onResolved:i,resolved:r}){const[o,s]=w.useState(!1),c=w.useCallback(async m=>{s(!0);const g={approve:"Plan approved",revise:"Revision requested",cancel:"Cancelled"}[m];try{await Ni(t,"approval",{decision:m,_summary:g}),i(g)}catch{s(!1)}},[t,i]),d=w.useCallback(()=>c("approve"),[c]),p=w.useCallback(()=>c("cancel"),[c]);return Ud("Enter",d,{disabled:o||!!r}),Mi(p,o||!!r),v.jsxs("div",{className:"gate-plan",children:[v.jsx("div",{className:"gate-plan-body",children:v.jsx(Io,{children:l.plan})}),!r&&v.jsxs("div",{className:"gate-plan-actions",children:[v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:()=>c("approve"),disabled:o,children:"Approve"}),v.jsx("button",{className:"gate-btn",onClick:()=>c("revise"),disabled:o,children:"Revise"}),v.jsx("button",{className:"gate-btn gate-btn-danger",onClick:()=>c("cancel"),disabled:o,children:"Cancel"})]})]})}function lN({sessionId:t,reason:l,onResolved:i,resolved:r,resolvedSummary:o}){const[s,c]=w.useState(!1),d=w.useCallback(async g=>{c(!0);const b=g?"Continued":"Stopped";try{await Ni(t,"continue",{proceed:g,_summary:b}),i(b)}catch{c(!1)}},[t,i]),p=w.useCallback(()=>d(!0),[d]),m=w.useCallback(()=>d(!1),[d]);Ud("Enter",p,{disabled:s||!!r}),Mi(m,s||!!r);const y=l==="max_budget";return v.jsxs("div",{className:"gate-continue",children:[v.jsx("span",{className:"gate-continue-text",children:y?"Budget limit reached. Continue with additional budget?":"Turn limit reached. Continue?"}),r?v.jsx("span",{className:"gate-continue-decision",children:o||"Decided"}):v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:()=>d(!0),disabled:s,children:"Continue"}),v.jsx("button",{className:"gate-btn",onClick:()=>d(!1),disabled:s,children:"Stop"})]})]})}function aN({sessionId:t,event:l,onResolved:i,resolved:r,resolvedDetails:o}){const s=l.runtime==="docker",[c,d]=w.useState(s?"local":"claim"),[p,m]=w.useState(""),[y,g]=w.useState("https://api.electric-sql.cloud"),[b,S]=w.useState(""),[k,j]=w.useState(""),[z,T]=w.useState(""),[N,R]=w.useState(""),[P,W]=w.useState(!1),[H,_]=w.useState(!1),[ae,ce]=w.useState(!1),[U,X]=w.useState(null),K=l.ghAccounts.length>0,[I,te]=w.useState(l.ghAccounts[0]?.login??""),[Q,D]=w.useState(l.projectName),[ee,se]=w.useState("private"),[ve,A]=w.useState(!1);async function O(){_(!0),X(null);try{const pe=await Gw();m(pe.databaseUrl),g(pe.electricUrl),S(pe.sourceId),j(pe.secret),T(pe.claimId),R(pe.claimUrl),ce(!0)}catch(pe){X(pe instanceof Error?pe.message:"Provisioning failed")}finally{_(!1)}}async function F(){W(!0);const pe=[];try{const ze={};c==="claim"?(ze.mode="claim",ze.databaseUrl=p,ze.electricUrl=y,ze.sourceId=b,ze.secret=k,ze.claimId=z,pe.push(`Database: ${p}`),pe.push(`Source ID: ${b}`),N&&pe.push(`Claim: ${N}`)):c==="cloud"?(ze.mode="cloud",ze.databaseUrl=p,ze.electricUrl=y,ze.sourceId=b,ze.secret=k,pe.push(`Database: ${p}`),pe.push(`Source ID: ${b}`)):(ze.mode="local",pe.push("Local Docker")),ve&&I&&Q.trim()&&(ze.repoAccount=I,ze.repoName=Q,ze.repoVisibility=ee,pe.push(`${I}/${Q} (${ee})`)),ze._summary=pe.join(`
226
- `),await Ni(t,"infra_config",ze),i(pe.join(`
227
- `))}catch{W(!1)}}const C=P||!!r,ue=p.trim()&&b.trim()&&k.trim(),be=ae&&p.trim()&&b.trim()&&k.trim(),xe=!ve||I&&Q.trim(),De={claim:"Provisioned (Cloud)",local:"Local (Docker)",cloud:"Electric Cloud (BYO)"};if(r){const pe=o??{};return o||(pe.Infrastructure=De[c],(c==="cloud"||c==="claim")&&(p&&(pe["Connection string"]=p),b&&(pe["Source ID"]=b)),c==="claim"&&N&&(pe["Claim link"]=N),ve&&I&&Q.trim()&&(pe.Repository=`${I}/${Q}`,pe.Visibility=ee)),v.jsx("div",{className:"gate-prompt",children:v.jsx("div",{className:"gate-config-summary",children:Object.entries(pe).map(([ze,Nt])=>v.jsxs("div",{children:[v.jsxs("strong",{children:[ze,":"]})," ",Nt.startsWith("http")?v.jsx("a",{href:Nt,target:"_blank",rel:"noopener noreferrer",children:Nt}):Nt]},ze))})})}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:P,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:P,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:P,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:ae?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]})]}),N&&v.jsxs("p",{style:{margin:"8px 0 0"},children:["Claim into your account:"," ",v.jsx("a",{href:N,target:"_blank",rel:"noopener noreferrer",style:{wordBreak:"break-all"},children:N})]})]}):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:O,disabled:H||C,style:{marginBottom:8},children:H?"Provisioning...":"Provision Resources"}),H&&v.jsx("p",{style:{fontSize:"0.85em",opacity:.7},children:"This may take 30-60 seconds..."}),U&&v.jsx("p",{style:{color:"var(--color-error, #e55)",fontSize:"0.85em"},children:U})]})}),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:pe=>m(pe.target.value),disabled:C,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:pe=>g(pe.target.value),disabled:C,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:pe=>S(pe.target.value),disabled:C,placeholder:"Your Electric Cloud source ID"})]}),v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Secret"}),v.jsx("input",{type:"password",value:k,onChange:pe=>j(pe.target.value),disabled:C,placeholder:"Your Electric Cloud secret"})]})]}),K&&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 ${ve?"active":""}`,onClick:()=>A(!ve),disabled:C,children:v.jsx("span",{className:"gate-option-title",children:"Create a GitHub repo for this project"})})}),ve&&v.jsxs(v.Fragment,{children:[v.jsxs("div",{className:"question",children:[v.jsx("label",{children:"Account"}),l.ghAccounts.length>1?v.jsx("select",{value:I,onChange:pe=>te(pe.target.value),disabled:C,children:l.ghAccounts.map(pe=>v.jsxs("option",{value:pe.login,children:[pe.login," ",pe.type==="org"?"(org)":"(personal)"]},pe.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:Q,onChange:pe=>D(pe.target.value),disabled:C,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 ${ee==="private"?"active":""}`,onClick:()=>se("private"),disabled:C,children:v.jsx("span",{className:"gate-option-title",children:"Private"})}),v.jsx("button",{type:"button",className:`gate-option ${ee==="public"?"active":""}`,onClick:()=>se("public"),disabled:C,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:F,disabled:C||c==="cloud"&&!ue||c==="claim"&&!be||!xe,children:P?"Configuring...":"Start"})})]})}function iN({sessionId:t,event:l,onResolved:i,resolved:r,resolvedSummary:o}){const[s,c]=w.useState(""),[d,p]=w.useState(null),[m,y]=w.useState(!1),g=m||!!r,b=d||o||"";async function S(j){p(j),y(!0);try{await Ni(t,"ask_user_question",{toolUseId:l.tool_use_id,answer:j,_summary:j}),i(j)}catch{p(null),y(!1)}}async function k(){if(!s.trim())return;y(!0);const j=s.trim().slice(0,80);try{await Ni(t,"ask_user_question",{toolUseId:l.tool_use_id,answer:s.trim(),_summary:j}),i(j)}catch{y(!1)}}return v.jsxs("div",{className:"gate-prompt",children:[v.jsx("h3",{children:"Question"}),v.jsx("p",{className:"gate-summary",children:l.question}),l.options&&l.options.length>0?v.jsx("div",{className:"gate-option-group-vert",children:l.options.map(j=>{const z=r&&j.label===b;return v.jsxs("button",{type:"button",className:`gate-option ${z?"selected":""}`,onClick:()=>S(j.label),disabled:g,children:[v.jsx("span",{className:"gate-option-title",children:j.label}),j.description&&v.jsx("span",{className:"gate-option-desc",children:j.description})]},j.label)})}):r?v.jsx("div",{className:"gate-answer-summary",children:b}):v.jsx("div",{className:"question",children:v.jsx("textarea",{value:s,onChange:j=>c(j.target.value),disabled:g,rows:3,placeholder:"Type your answer..."})}),!r&&!l.options?.length&&v.jsx("div",{className:"gate-actions",children:v.jsx("button",{className:"gate-btn gate-btn-primary",onClick:k,disabled:g||!s.trim(),children:m?"Submitting...":"Submit"})})]})}function rN(t){switch(t){case"clarification_needed":return"Clarification answered";case"plan_ready":return"Plan reviewed";case"infra_config_prompt":return"Project configured";case"continue_needed":return"Decision made";case"ask_user_question":return"Question answered";default:return"Decision made"}}function uN({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"clarification_needed":p=v.jsx(tN,{sessionId:t,event:l.event,onResolved:s,resolved:c});break;case"plan_ready":p=v.jsx(nN,{sessionId:t,event:l.event,onResolved:s,resolved:c});break;case"continue_needed":p=v.jsx(lN,{sessionId:t,reason:l.event.reason,onResolved:s,resolved:c,resolvedSummary:d});break;case"infra_config_prompt":p=v.jsx(aN,{sessionId:t,event:l.event,onResolved:s,resolved:c,resolvedDetails:l.resolvedDetails});break;case"ask_user_question":p=v.jsx(iN,{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:rN(l.event.type)}),v.jsx(ca,{value:o})]}),p]}):p}const Sv={pending:"○",in_progress:"◉",completed:"✓"};function oN(t){switch(t){case"completed":return"todo-status-done";case"in_progress":return"todo-status-progress";default:return"todo-status-pending"}}function sN({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 ${oN(c.status)}`,children:Sv[c.status]||Sv.pending}),v.jsx("span",{className:"todo-content",children:c.content}),c.priority&&v.jsx("span",{className:"todo-priority",children:c.priority})]},c.id))})})]})}const cN=3;function Ev(t){return t.kind==="tool_use"||t.kind==="assistant_thinking"}function fN(t,l){const i=[];let r=0;for(;r<t.length;){const o=t[r];if(Ev(o)){const s=[];for(;r<t.length&&Ev(t[r]);)s.push({entry:t[r],index:r,duration:l[r]}),r++;if(s.length>=cN)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 dN(t){if(t.kind!=="user_prompt")return t.ts}function D0(t){if(t<1e3)return`${t}ms`;const l=t/1e3;if(l<60)return`${l.toFixed(1)}s`;const i=Math.floor(l/60),r=l%60;return`${i}m ${r.toFixed(0)}s`}function hN({sinceTs:t}){const[l,i]=w.useState("");return w.useEffect(()=>{const r=new Date(t).getTime(),o=()=>{const c=Date.now()-r;i(D0(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 O0({sessionId:t,entries:l,isLive:i,isComplete:r,onGateResolved:o}){const s=w.useRef(null),c=w.useRef(null),[d,p]=w.useState(!0),m=l.length,y=w.useCallback(()=>{c.current?.scrollIntoView({behavior:"smooth"})},[]),g=w.useCallback(()=>{const T=s.current;if(!T)return;const R=T.scrollHeight-T.scrollTop-T.clientHeight<80;p(R)},[]);w.useEffect(()=>{d&&c.current?.scrollIntoView({behavior:"smooth"})},[m,d]);const b=[];let S=null;for(const T of l){const N=dN(T);if(T.kind==="user_prompt"||!N)b.push(null);else if(S){const R=new Date(N).getTime()-new Date(S).getTime();b.push(R>=0?D0(R):null)}else b.push(null);N&&(S=N)}const k=w.useMemo(()=>fN(l,b),[l,b]);let j=!1,z="";if(i&&!r&&l.length>0){const T=l[l.length-1],N=T.kind==="tool_use"&&T.tool_response===null,R=T.kind==="gate"&&!T.resolved,P=T.kind==="assistant_message";!N&&!R&&!P&&(j=!0,z=S||new Date().toISOString())}return v.jsxs("div",{className:"console",ref:s,onScroll:g,children:[k.map(T=>{if(T.type==="group")return v.jsx(eN,{items:T.items},`group-${T.items[0].index}`);const{entry:N,index:R,duration:P}=T;switch(N.kind){case"log":return v.jsx(Xz,{entry:N,duration:P},`log-${R}`);case"user_prompt":return v.jsx(Qz,{entry:N},`user-${R}`);case"tool_use":return v.jsx(yd,{entry:N,duration:P},N.tool_use_id||`tool-${R}`);case"assistant_message":return v.jsx(Zz,{entry:N,duration:P},`text-${R}`);case"assistant_thinking":return v.jsx(gd,{entry:N,duration:P},`thinking-${R}`);case"todo_widget":return v.jsx(sN,{entry:N},`todo-${R}`);case"gate":return v.jsx(uN,{sessionId:t,entry:N,entryIndex:R,onResolved:o,duration:P},`gate-${R}`);default:return null}}),j&&v.jsx(hN,{sinceTs:z}),v.jsx("div",{ref:c}),!d&&v.jsx("button",{type:"button",className:"jump-to-bottom",onClick:y,children:"Jump to latest"})]})}function Gr({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 M0(t){const[l,i]=w.useState([]),[r,o]=w.useState(!1),[s,c]=w.useState(!1),[d,p]=w.useState(!1),[m,y]=w.useState(0),g=w.useRef(!1),b=w.useRef(!1),S=w.useCallback(j=>{i(z=>{switch(j.type){case"log":return[...z,{kind:"log",level:j.level,message:j.message,ts:j.ts}];case"user_prompt":return[...z,{kind:"user_prompt",message:j.message}];case"pre_tool_use":return[...z,{kind:"tool_use",tool_name:j.tool_name,tool_use_id:j.tool_use_id,tool_input:j.tool_input,tool_response:null,agent:j.agent,ts:j.ts}];case"post_tool_use":{const T=[...z];for(let N=T.length-1;N>=0;N--){const R=T[N];if(R.kind==="tool_use"&&R.tool_use_id===j.tool_use_id){T[N]={...R,tool_response:j.tool_response,agent:R.agent||j.agent};break}}return T}case"post_tool_use_failure":{const T=[...z];for(let N=T.length-1;N>=0;N--){const R=T[N];if(R.kind==="tool_use"&&R.tool_use_id===j.tool_use_id){T[N]={...R,tool_response:`Error: ${j.error}`,agent:R.agent||j.agent};break}}return T}case"assistant_message":return[...z,{kind:"assistant_message",text:j.text,agent:j.agent,ts:j.ts}];case"assistant_thinking":return[...z,{kind:"assistant_thinking",text:j.text,agent:j.agent,ts:j.ts}];case"todo_write":{const T=z.findIndex(R=>R.kind==="todo_widget"),N={kind:"todo_widget",tool_use_id:j.tool_use_id,todos:j.todos,ts:j.ts};if(T>=0){const R=[...z];return R[T]=N,R}return[...z,N]}case"ask_user_question":case"clarification_needed":case"plan_ready":case"continue_needed":case"infra_config_prompt":return[...z,{kind:"gate",event:j,resolved:!1,ts:j.ts}];case"gate_resolved":{const T=[...z];let N=!1;for(let R=T.length-1;R>=0;R--){const P=T[R];if(P.kind==="gate"&&!P.resolved){T[R]={...P,resolved:!0,resolvedSummary:j.summary||P.resolvedSummary,resolvedDetails:j.details},N=!0;break}}if(!N&&j.details)for(let R=T.length-1;R>=0;R--){const P=T[R];if(P.kind==="gate"&&P.resolved&&!P.resolvedDetails){T[R]={...P,resolvedDetails:j.details};break}}return T}case"cost_update":case"session_end":case"session_start":case"phase_complete":case"app_ready":return z;default:return z}}),j.type==="cost_update"&&y(z=>z+j.totalCostUsd),j.type==="app_ready"&&p(!0),j.type==="session_end"&&(c(!0),b.current&&!g.current&&(g.current=!0,j.success?Ay.success("Session completed successfully"):Ay.error("Session completed with errors")))},[]);w.useEffect(()=>{if(!t)return;i([]),o(!1),c(!1),p(!1),y(0),g.current=!1,b.current=!1;let j=!1,z=null,T=0;const N=10;function R(){if(!j){if(T>=N){console.warn(`[sse] Giving up on session ${t} after ${N} retries`),o(!1);return}z=new EventSource(`/api/sessions/${t}/events`),z.onopen=()=>{j||(T=0,o(!0),setTimeout(()=>{b.current=!0},500))},z.onmessage=P=>{if(!j)try{const W=JSON.parse(P.data);S(W)}catch{}},z.onerror=()=>{if(j)return;z?.close(),T++;const P=Math.min(1e3*2**(T-1),3e4);setTimeout(R,P)}}}return R(),()=>{j=!0,z&&(z.close(),z=null)}},[t,S]);const k=w.useCallback((j,z)=>{i(T=>{const N=[...T],R=N[j];return R?.kind==="gate"&&(N[j]={...R,resolved:!0,resolvedSummary:z}),N})},[]);return{entries:l,isLive:r,isComplete:s,appReady:d,totalCost:m,markGateResolved:k}}function mN(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}case"gate":i.event.type==="plan_ready"?l.push(`## Plan
234
-
235
- ${i.event.plan}
236
- `):i.event.type==="clarification_needed"&&l.push(`## Clarification Needed
237
-
238
- ${i.event.questions.join(`
239
- `)}
240
- `);break}return l.join(`
241
- `)}function pN(){const{id:t}=Pv(),l=tl(),i=Oi(),{openMobileDrawer:r}=Kv(),{showSettings:o,setShowSettings:s,authSource:c,hasGhToken:d,refreshSettings:p,refreshSessions:m}=Wo(),[y,g]=w.useState(!1);w.useEffect(()=>{if(!y)return;const F=()=>g(!1);return document.addEventListener("click",F),()=>document.removeEventListener("click",F)},[y]);const[b,S]=w.useState(t==="new"),[k,j]=w.useState(t==="new"?null:t??null),z=w.useRef(!1);w.useEffect(()=>{t&&t!=="new"&&(j(t),S(!1),z.current=!1)},[t]),w.useEffect(()=>{if(t!=="new"||z.current)return;const F=l.state;if(!F?.description){i("/",{replace:!0});return}z.current=!0,S(!0),Bw(F.description).then(({sessionId:C,session:ue})=>{Pk(ue),m(),j(C),S(!1),i(`/session/${C}`,{replace:!0})}).catch(C=>{console.error("Failed to create session:",C),i("/",{replace:!0})})},[t,l.state,i,m]);const T=k,{entries:N,isLive:R,isComplete:P,appReady:W,totalCost:H,markGateResolved:_}=M0(T),[ae,ce]=w.useState(()=>T?_y(T)??null:null),[U,X]=w.useState("hidden"),[K,I]=w.useState(()=>ae?.appPort),[te,Q]=w.useState(()=>ae?.previewUrl);w.useEffect(()=>{if(T){const F=_y(T);ce(F??null),F?.appPort&&I(F.appPort),F?.previewUrl&&Q(F.previewUrl)}},[T]),w.useEffect(()=>{T&&P&&(Cf(T,{status:"complete"}),m())},[T,P,m]);const D=P||W||ae?.status==="complete"||ae?.status==="error",ee=U==="running"&&!!te;w.useEffect(()=>{if(!T||!D||ee){D||X("hidden");return}const F=async()=>{try{const ue=await Fw(T);X(ue.running?"running":"stopped"),ue.port&&I(ue.port),ue.previewUrl&&Q(ue.previewUrl),(ue.port||ue.previewUrl)&&Cf(T,{...ue.port?{appPort:ue.port}:{},...ue.previewUrl?{previewUrl:ue.previewUrl}:{}})}catch{X("stopped")}};F();const C=setInterval(F,1e4);return()=>clearInterval(C)},[T,D,ee]);const se=w.useCallback(async F=>{if(T)try{await Hw(T,F)}catch(C){console.error("Failed to send iteration:",C)}},[T]),ve=w.useCallback(async()=>{if(T)try{await qw(T),Cf(T,{status:"cancelled"}),m()}catch(F){console.error("Failed to cancel:",F)}},[T,m]),A=w.useCallback(()=>{const F=mN(N);navigator.clipboard.writeText(F)},[N]);if(!t)return null;const O=ae?.status==="running"&&!P;return v.jsxs(v.Fragment,{children:[o&&v.jsx(Eb,{authSource:c,hasGhToken:d??!1,onKeySaved:p,onClose:()=>s(!1),onCopyLog:T?A: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...":ae?.projectName??"Loading..."}),O&&v.jsx("span",{className:"session-header-status",style:{color:"var(--green)"},children:"Live"}),P&&v.jsx("span",{className:"session-header-status",style:{color:"var(--text-subtle)"},children:"Complete"}),!b&&!R&&!P&&v.jsx("span",{className:"session-header-status",style:{color:"var(--yellow)"},children:"Connecting..."}),v.jsx("span",{className:"session-header-cost",children:H>0&&v.jsxs("span",{style:{color:"var(--text-subtle)",fontSize:12,marginLeft:4},children:["$",H.toFixed(4)]})}),v.jsx("span",{className:"session-header-actions-group",children:K&&(W||U==="running"||D)&&v.jsx("a",{href:te??`http://localhost:${K}`,target:"_blank",rel:"noopener noreferrer",className:"session-header-action primary",children:"Preview"})}),v.jsx("button",{type:"button",className:"session-header-overflow",onClick:F=>{F.stopPropagation(),g(C=>!C)},"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:[H>0&&v.jsxs("div",{className:"session-header-overflow-menu-item",children:["Cost: $",H.toFixed(4)]}),K&&(W||U==="running"||D)&&v.jsx("a",{href:te??`http://localhost:${K}`,target:"_blank",rel:"noopener noreferrer",className:"session-header-overflow-menu-item",onClick:()=>g(!1),children:"Preview App"}),v.jsx("button",{type:"button",className:"session-header-overflow-menu-item",onClick:()=>{g(!1),s(F=>!F)},children:"Settings"})]})]}),(te||K)&&D&&v.jsx("div",{className:"mobile-preview-bar",children:v.jsxs("a",{href:te??`http://localhost:${K}`,target:"_blank",rel:"noopener noreferrer",className:"mobile-preview-link",children:[v.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[v.jsx("title",{children:"Open preview"}),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"})]}),"Open Preview"]})}),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..."})]}):!R&&!P?v.jsxs("div",{style:{padding:16,flex:1},children:[v.jsx(Gr,{variant:"block"}),v.jsx(Gr,{variant:"line",width:"80%"}),v.jsx(Gr,{variant:"line",width:"60%"})]}):v.jsx(O0,{sessionId:T??"",entries:N,isLive:R,isComplete:P,onGateResolved:_}),v.jsx(Sb,{onSubmit:se,placeholder:O?"Send a follow-up message...":"Describe changes you want to make...",disabled:b,isRunning:O,onCancel:ve})]})]})}function gN({name:t,code:l,participants:i,revoked:r,isLive:o,onLeave:s,onLinkSession:c}){const[d,p]=w.useState(!1),m=w.useCallback(()=>{navigator.clipboard.writeText(l),p(!0),setTimeout(()=>p(!1),2e3)},[l]);return v.jsxs("div",{className:"shared-session-header",children:[v.jsx("span",{className:"shared-session-header-name",children:t}),o&&v.jsx("span",{className:"session-header-status",style:{color:"var(--green)"},children:"Live"}),v.jsx("span",{className:"shared-session-header-participants",children:i.map(y=>v.jsx("span",{className:"shared-session-participant",title:y.displayName,children:y.displayName.slice(0,2).toUpperCase()},y.id))}),v.jsx("span",{className:"invite-code-label",children:"Join code:"}),v.jsxs("button",{type:"button",className:"invite-code-btn",onClick:m,children:[d?"Copied!":l,r&&" (revoked)"]}),v.jsx("button",{type:"button",className:"session-header-action primary",onClick:c,children:"Link Session"}),v.jsx("button",{type:"button",className:"session-header-action",onClick:s,children:"Leave"})]})}const zo={name:"",code:"",participants:[],sessionIds:[],sessionNames:new Map,revoked:!1};function yN(t,l){switch(l.type){case"shared_session_created":return{...t,name:l.name,code:l.code};case"participant_joined":return t.participants.some(r=>r.id===l.participant.id)?t:{...t,participants:[...t.participants,l.participant]};case"participant_left":return{...t,participants:t.participants.filter(i=>i.id!==l.participantId)};case"session_linked":{if(t.sessionIds.includes(l.sessionId))return t;const i=new Map(t.sessionNames);return l.sessionName&&i.set(l.sessionId,l.sessionName),{...t,sessionIds:[...t.sessionIds,l.sessionId],sessionNames:i}}case"session_unlinked":{const i=new Map(t.sessionNames);return i.delete(l.sessionId),{...t,sessionIds:t.sessionIds.filter(r=>r!==l.sessionId),sessionNames:i}}case"code_revoked":return{...t,revoked:!0};default:return t}}function vN(t){const[l,i]=w.useState(zo),[r,o]=w.useState(!1),s=w.useRef(zo),c=w.useCallback(d=>{const p=yN(s.current,d);s.current=p,i(p)},[]);return w.useEffect(()=>{if(!t)return;i(zo),s.current=zo,o(!1);let d=!1,p=null,m=0;const y=10;function g(){if(!d){if(m>=y){o(!1);return}p=new EventSource(`/api/shared-sessions/${t}/events`),p.onopen=()=>{d||(m=0,o(!0))},p.onmessage=b=>{if(!d)try{const S=JSON.parse(b.data);c(S)}catch{}},p.onerror=()=>{if(d)return;p?.close(),m++;const b=Math.min(1e3*2**(m-1),3e4);setTimeout(g,b)}}}return g(),()=>{d=!0,p&&(p.close(),p=null)}},[t,c]),{...l,isLive:r}}function bN(){const{code:t}=Pv(),l=Oi(),{sessions:i,refreshJoinedSharedSessions:r}=Wo(),[o,s]=w.useState(null),[c,d]=w.useState(null),[p,m]=w.useState(!0),[y,g]=w.useState(!1),[b,S]=w.useState(new Set);w.useEffect(()=>{if(!t)return;let W=!1;async function H(){try{const _=await Zw(t);if(W)return;if(_.revoked){d("This invite code has been revoked."),m(!1);return}s(_.id),await Kw(_.id),m(!1)}catch(_){if(W)return;d(_ instanceof Error?_.message:"Failed to join shared session"),m(!1)}}return H(),()=>{W=!0}},[t]);const k=vN(o);w.useEffect(()=>{t&&k.name&&o&&(ek({id:o,code:t,name:k.name}),r())},[t,k.name,o,r]);const j=w.useRef(!1);w.useEffect(()=>{k.sessionIds.length>0&&!j.current&&(j.current=!0,S(new Set([k.sessionIds[0]])))},[k.sessionIds]);const z=w.useCallback(async()=>{if(o){try{await Pw(o)}catch{}t&&(fb(t),r()),l("/")}},[o,t,l,r]),T=w.useCallback(async W=>{if(!o)return;const H=i.find(_=>_.id===W);try{await Jw(o,W,H?.projectName||"",H?.description||""),g(!1),S(_=>new Set([..._,W]))}catch(_){console.error("Failed to link session:",_)}},[o,i]),N=w.useCallback(async W=>{if(o)try{await Ww(o,W),S(H=>{const _=new Set(H);return _.delete(W),_})}catch(H){console.error("Failed to unlink session:",H)}},[o]),R=w.useCallback(W=>{S(H=>{const _=new Set(H);return _.has(W)?_.delete(W):_.add(W),_})},[]);if(c)return v.jsxs("div",{className:"shared-session-error",children:[v.jsx("h2",{children:"Cannot join shared session"}),v.jsx("p",{children:c}),v.jsx("button",{type:"button",className:"btn",onClick:()=>l("/"),children:"Go Home"})]});if(p||!o)return v.jsxs("div",{style:{padding:16},children:[v.jsx(Gr,{variant:"block"}),v.jsx(Gr,{variant:"line",width:"60%"})]});const P=i.filter(W=>!k.sessionIds.includes(W.id));return v.jsxs(v.Fragment,{children:[v.jsx(gN,{name:k.name,code:k.code,participants:k.participants,revoked:k.revoked,isLive:k.isLive,onLeave:z,onLinkSession:()=>g(!0)}),v.jsxs("div",{className:"shared-session-content",children:[v.jsxs("div",{className:"shared-session-toolbar",children:[v.jsxs("span",{className:"shared-session-toolbar-label",children:[k.sessionIds.length," session",k.sessionIds.length!==1?"s":""," linked"]}),v.jsx("button",{type:"button",className:"shared-session-link-btn",onClick:()=>g(!0),children:"+ Link Session"})]}),k.sessionIds.length===0?v.jsx("div",{className:"shared-session-empty",children:v.jsx("p",{children:'No sessions linked yet. Click "Link Session" to add one.'})}):v.jsx("div",{className:"shared-session-panels",children:k.sessionIds.map(W=>v.jsx(SN,{sessionId:W,sessionName:k.sessionNames.get(W),expanded:b.has(W),onToggle:()=>R(W),onUnlink:N},W))})]}),y&&v.jsx("div",{className:"modal-overlay",onClick:()=>g(!1),children:v.jsxs("div",{className:"modal-card",onClick:W=>W.stopPropagation(),children:[v.jsx("div",{className:"modal-title",children:"Link Session"}),v.jsx("div",{className:"modal-body",children:"Select a session to link to this shared room."}),P.length===0?v.jsx("p",{style:{color:"var(--text-subtle)",fontSize:13},children:"No sessions available to link."}):v.jsx("div",{className:"link-session-list",children:P.map(W=>v.jsx("button",{type:"button",className:"link-session-item",onClick:()=>T(W.id),children:W.projectName||W.description.slice(0,60)||W.id.slice(0,8)},W.id))}),v.jsx("div",{className:"modal-actions",children:v.jsx("button",{type:"button",className:"modal-btn",onClick:()=>g(!1),children:"Cancel"})})]})})]})}function xN(){return v.jsxs("svg",{className:"shared-session-panel-chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-label":"Toggle panel",children:[v.jsx("title",{children:"Toggle panel"}),v.jsx("polyline",{points:"4 6 8 10 12 6"})]})}function SN({sessionId:t,sessionName:l,expanded:i,onToggle:r,onUnlink:o}){const{entries:s,isLive:c,isComplete:d,markGateResolved:p}=M0(t);return v.jsxs("div",{className:`shared-session-panel ${i?"expanded":"collapsed"}`,children:[v.jsxs("div",{className:"shared-session-panel-header",onClick:r,children:[v.jsx(xN,{}),v.jsx("span",{className:"shared-session-panel-id",children:l||t.slice(0,8)}),d?v.jsx("span",{className:"session-header-status",style:{color:"var(--text-subtle)",fontSize:11},children:"Offline"}):c?v.jsx("span",{className:"session-header-status",style:{color:"var(--green)",fontSize:11},children:"Live"}):null,v.jsx("button",{type:"button",className:"shared-session-unlink-btn",onClick:m=>{m.stopPropagation(),o(t)},title:"Unlink session",children:"Unlink"})]}),v.jsx("div",{className:"shared-session-panel-body",children:v.jsx(O0,{sessionId:t,entries:s,isLive:c,isComplete:d,onGateResolved:p})})]})}const EN=dw([{element:v.jsx(eC,{}),children:[{path:"/",element:v.jsx(lC,{})},{path:"/session/:id",element:v.jsx(pN,{})},{path:"/shared/:code",element:v.jsx(bN,{})}]}]);ub();const wv=document.getElementById("root");wv&&Wx.createRoot(wv).render(v.jsx(w.StrictMode,{children:v.jsx(kw,{router:EN})}));