@exaudeus/workrail 3.11.1 → 3.12.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 (37) hide show
  1. package/dist/console/assets/index-CRgjJiMS.js +28 -0
  2. package/dist/console/assets/index-DW78t31j.css +1 -0
  3. package/dist/console/index.html +2 -2
  4. package/dist/manifest.json +67 -59
  5. package/dist/mcp/handlers/shared/request-workflow-reader.d.ts +10 -2
  6. package/dist/mcp/handlers/shared/request-workflow-reader.js +27 -10
  7. package/dist/mcp/handlers/shared/workflow-source-visibility.d.ts +3 -1
  8. package/dist/mcp/handlers/shared/workflow-source-visibility.js +7 -3
  9. package/dist/mcp/handlers/v2-execution/replay.js +25 -1
  10. package/dist/mcp/handlers/v2-execution/start.js +23 -17
  11. package/dist/mcp/handlers/v2-workflow.js +123 -8
  12. package/dist/mcp/output-schemas.d.ts +393 -0
  13. package/dist/mcp/output-schemas.js +49 -1
  14. package/dist/mcp/tools.js +5 -5
  15. package/dist/mcp/v2/tools.d.ts +3 -0
  16. package/dist/mcp/v2/tools.js +3 -2
  17. package/dist/v2/durable-core/constants.d.ts +1 -0
  18. package/dist/v2/durable-core/constants.js +2 -1
  19. package/dist/v2/durable-core/domain/observation-builder.d.ts +4 -1
  20. package/dist/v2/durable-core/domain/observation-builder.js +9 -0
  21. package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +76 -16
  22. package/dist/v2/durable-core/schemas/session/events.d.ts +26 -5
  23. package/dist/v2/durable-core/schemas/session/events.js +2 -1
  24. package/dist/v2/infra/local/session-summary-provider/index.js +2 -0
  25. package/dist/v2/infra/local/workspace-anchor/index.js +1 -0
  26. package/dist/v2/ports/workspace-anchor.port.d.ts +3 -0
  27. package/dist/v2/projections/resume-ranking.d.ts +1 -0
  28. package/dist/v2/usecases/console-routes.js +26 -0
  29. package/dist/v2/usecases/console-service.js +25 -6
  30. package/dist/v2/usecases/console-types.d.ts +22 -1
  31. package/dist/v2/usecases/worktree-service.d.ts +10 -0
  32. package/dist/v2/usecases/worktree-service.js +136 -0
  33. package/package.json +1 -1
  34. package/workflows/architecture-scalability-audit.json +317 -0
  35. package/workflows/routines/tension-driven-design.json +5 -5
  36. package/dist/console/assets/index-C5C4nDs4.css +0 -1
  37. package/dist/console/assets/index-CSUqsoQl.js +0 -28
@@ -0,0 +1,28 @@
1
+ (function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function r(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function a(s){if(s.ep)return;s.ep=!0;const u=r(s);fetch(s.href,u)}})();function yu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ff={exports:{}},Aa={};var Ey;function ww(){if(Ey)return Aa;Ey=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(a,s,u){var c=null;if(u!==void 0&&(c=""+u),s.key!==void 0&&(c=""+s.key),"key"in s){u={};for(var d in s)d!=="key"&&(u[d]=s[d])}else u=s;return s=u.ref,{$$typeof:t,type:a,key:c,ref:s!==void 0?s:null,props:u}}return Aa.Fragment=i,Aa.jsx=r,Aa.jsxs=r,Aa}var Cy;function Ew(){return Cy||(Cy=1,Ff.exports=ww()),Ff.exports}var E=Ew(),Kf={exports:{}},Nt={};var _y;function Cw(){if(_y)return Nt;_y=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.iterator;function v(O){return O===null||typeof O!="object"?null:(O=x&&O[x]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,M={};function C(O,V,T){this.props=O,this.context=V,this.refs=M,this.updater=T||S}C.prototype.isReactComponent={},C.prototype.setState=function(O,V){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,V,"setState")},C.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function j(){}j.prototype=C.prototype;function w(O,V,T){this.props=O,this.context=V,this.refs=M,this.updater=T||S}var k=w.prototype=new j;k.constructor=w,_(k,C.prototype),k.isPureReactComponent=!0;var I=Array.isArray;function D(){}var H={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function Z(O,V,T){var nt=T.ref;return{$$typeof:t,type:O,key:V,ref:nt!==void 0?nt:null,props:T}}function lt(O,V){return Z(O.type,V,O.props)}function L(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function Q(O){var V={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(T){return V[T]})}var et=/\/+/g;function R(O,V){return typeof O=="object"&&O!==null&&O.key!=null?Q(""+O.key):V.toString(36)}function U(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(D,D):(O.status="pending",O.then(function(V){O.status==="pending"&&(O.status="fulfilled",O.value=V)},function(V){O.status==="pending"&&(O.status="rejected",O.reason=V)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function z(O,V,T,nt,ut){var ct=typeof O;(ct==="undefined"||ct==="boolean")&&(O=null);var dt=!1;if(O===null)dt=!0;else switch(ct){case"bigint":case"string":case"number":dt=!0;break;case"object":switch(O.$$typeof){case t:case i:dt=!0;break;case g:return dt=O._init,z(dt(O._payload),V,T,nt,ut)}}if(dt)return ut=ut(O),dt=nt===""?"."+R(O,0):nt,I(ut)?(T="",dt!=null&&(T=dt.replace(et,"$&/")+"/"),z(ut,V,T,"",function(wt){return wt})):ut!=null&&(L(ut)&&(ut=lt(ut,T+(ut.key==null||O&&O.key===ut.key?"":(""+ut.key).replace(et,"$&/")+"/")+dt)),V.push(ut)),1;dt=0;var st=nt===""?".":nt+":";if(I(O))for(var pt=0;pt<O.length;pt++)nt=O[pt],ct=st+R(nt,pt),dt+=z(nt,V,T,ct,ut);else if(pt=v(O),typeof pt=="function")for(O=pt.call(O),pt=0;!(nt=O.next()).done;)nt=nt.value,ct=st+R(nt,pt++),dt+=z(nt,V,T,ct,ut);else if(ct==="object"){if(typeof O.then=="function")return z(U(O),V,T,nt,ut);throw V=String(O),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return dt}function B(O,V,T){if(O==null)return O;var nt=[],ut=0;return z(O,nt,"","",function(ct){return V.call(T,ct,ut++)}),nt}function Y(O){if(O._status===-1){var V=O._result;V=V(),V.then(function(T){(O._status===0||O._status===-1)&&(O._status=1,O._result=T)},function(T){(O._status===0||O._status===-1)&&(O._status=2,O._result=T)}),O._status===-1&&(O._status=0,O._result=V)}if(O._status===1)return O._result.default;throw O._result}var K=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=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(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},A={map:B,forEach:function(O,V,T){B(O,function(){V.apply(this,arguments)},T)},count:function(O){var V=0;return B(O,function(){V++}),V},toArray:function(O){return B(O,function(V){return V})||[]},only:function(O){if(!L(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Nt.Activity=y,Nt.Children=A,Nt.Component=C,Nt.Fragment=r,Nt.Profiler=s,Nt.PureComponent=w,Nt.StrictMode=a,Nt.Suspense=m,Nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,Nt.__COMPILER_RUNTIME={__proto__:null,c:function(O){return H.H.useMemoCache(O)}},Nt.cache=function(O){return function(){return O.apply(null,arguments)}},Nt.cacheSignal=function(){return null},Nt.cloneElement=function(O,V,T){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var nt=_({},O.props),ut=O.key;if(V!=null)for(ct in V.key!==void 0&&(ut=""+V.key),V)!G.call(V,ct)||ct==="key"||ct==="__self"||ct==="__source"||ct==="ref"&&V.ref===void 0||(nt[ct]=V[ct]);var ct=arguments.length-2;if(ct===1)nt.children=T;else if(1<ct){for(var dt=Array(ct),st=0;st<ct;st++)dt[st]=arguments[st+2];nt.children=dt}return Z(O.type,ut,nt)},Nt.createContext=function(O){return O={$$typeof:c,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:u,_context:O},O},Nt.createElement=function(O,V,T){var nt,ut={},ct=null;if(V!=null)for(nt in V.key!==void 0&&(ct=""+V.key),V)G.call(V,nt)&&nt!=="key"&&nt!=="__self"&&nt!=="__source"&&(ut[nt]=V[nt]);var dt=arguments.length-2;if(dt===1)ut.children=T;else if(1<dt){for(var st=Array(dt),pt=0;pt<dt;pt++)st[pt]=arguments[pt+2];ut.children=st}if(O&&O.defaultProps)for(nt in dt=O.defaultProps,dt)ut[nt]===void 0&&(ut[nt]=dt[nt]);return Z(O,ct,ut)},Nt.createRef=function(){return{current:null}},Nt.forwardRef=function(O){return{$$typeof:d,render:O}},Nt.isValidElement=L,Nt.lazy=function(O){return{$$typeof:g,_payload:{_status:-1,_result:O},_init:Y}},Nt.memo=function(O,V){return{$$typeof:h,type:O,compare:V===void 0?null:V}},Nt.startTransition=function(O){var V=H.T,T={};H.T=T;try{var nt=O(),ut=H.S;ut!==null&&ut(T,nt),typeof nt=="object"&&nt!==null&&typeof nt.then=="function"&&nt.then(D,K)}catch(ct){K(ct)}finally{V!==null&&T.types!==null&&(V.types=T.types),H.T=V}},Nt.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},Nt.use=function(O){return H.H.use(O)},Nt.useActionState=function(O,V,T){return H.H.useActionState(O,V,T)},Nt.useCallback=function(O,V){return H.H.useCallback(O,V)},Nt.useContext=function(O){return H.H.useContext(O)},Nt.useDebugValue=function(){},Nt.useDeferredValue=function(O,V){return H.H.useDeferredValue(O,V)},Nt.useEffect=function(O,V){return H.H.useEffect(O,V)},Nt.useEffectEvent=function(O){return H.H.useEffectEvent(O)},Nt.useId=function(){return H.H.useId()},Nt.useImperativeHandle=function(O,V,T){return H.H.useImperativeHandle(O,V,T)},Nt.useInsertionEffect=function(O,V){return H.H.useInsertionEffect(O,V)},Nt.useLayoutEffect=function(O,V){return H.H.useLayoutEffect(O,V)},Nt.useMemo=function(O,V){return H.H.useMemo(O,V)},Nt.useOptimistic=function(O,V){return H.H.useOptimistic(O,V)},Nt.useReducer=function(O,V,T){return H.H.useReducer(O,V,T)},Nt.useRef=function(O){return H.H.useRef(O)},Nt.useState=function(O){return H.H.useState(O)},Nt.useSyncExternalStore=function(O,V,T){return H.H.useSyncExternalStore(O,V,T)},Nt.useTransition=function(){return H.H.useTransition()},Nt.version="19.2.4",Nt}var Ny;function eo(){return Ny||(Ny=1,Kf.exports=Cw()),Kf.exports}var J=eo();const _w=yu(J);var $f={exports:{}},Ma={},Pf={exports:{}},Jf={};var Ty;function Nw(){return Ty||(Ty=1,(function(t){function i(z,B){var Y=z.length;z.push(B);t:for(;0<Y;){var K=Y-1>>>1,A=z[K];if(0<s(A,B))z[K]=B,z[Y]=A,Y=K;else break t}}function r(z){return z.length===0?null:z[0]}function a(z){if(z.length===0)return null;var B=z[0],Y=z.pop();if(Y!==B){z[0]=Y;t:for(var K=0,A=z.length,O=A>>>1;K<O;){var V=2*(K+1)-1,T=z[V],nt=V+1,ut=z[nt];if(0>s(T,Y))nt<A&&0>s(ut,T)?(z[K]=ut,z[nt]=Y,K=nt):(z[K]=T,z[V]=Y,K=V);else if(nt<A&&0>s(ut,Y))z[K]=ut,z[nt]=Y,K=nt;else break t}}return B}function s(z,B){var Y=z.sortIndex-B.sortIndex;return Y!==0?Y:z.id-B.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var m=[],h=[],g=1,y=null,x=3,v=!1,S=!1,_=!1,M=!1,C=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function k(z){for(var B=r(h);B!==null;){if(B.callback===null)a(h);else if(B.startTime<=z)a(h),B.sortIndex=B.expirationTime,i(m,B);else break;B=r(h)}}function I(z){if(_=!1,k(z),!S)if(r(m)!==null)S=!0,D||(D=!0,Q());else{var B=r(h);B!==null&&U(I,B.startTime-z)}}var D=!1,H=-1,G=5,Z=-1;function lt(){return M?!0:!(t.unstable_now()-Z<G)}function L(){if(M=!1,D){var z=t.unstable_now();Z=z;var B=!0;try{t:{S=!1,_&&(_=!1,j(H),H=-1),v=!0;var Y=x;try{e:{for(k(z),y=r(m);y!==null&&!(y.expirationTime>z&&lt());){var K=y.callback;if(typeof K=="function"){y.callback=null,x=y.priorityLevel;var A=K(y.expirationTime<=z);if(z=t.unstable_now(),typeof A=="function"){y.callback=A,k(z),B=!0;break e}y===r(m)&&a(m),k(z)}else a(m);y=r(m)}if(y!==null)B=!0;else{var O=r(h);O!==null&&U(I,O.startTime-z),B=!1}}break t}finally{y=null,x=Y,v=!1}B=void 0}}finally{B?Q():D=!1}}}var Q;if(typeof w=="function")Q=function(){w(L)};else if(typeof MessageChannel<"u"){var et=new MessageChannel,R=et.port2;et.port1.onmessage=L,Q=function(){R.postMessage(null)}}else Q=function(){C(L,0)};function U(z,B){H=C(function(){z(t.unstable_now())},B)}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(z){z.callback=null},t.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<z?Math.floor(1e3/z):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(z){switch(x){case 1:case 2:case 3:var B=3;break;default:B=x}var Y=x;x=B;try{return z()}finally{x=Y}},t.unstable_requestPaint=function(){M=!0},t.unstable_runWithPriority=function(z,B){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var Y=x;x=z;try{return B()}finally{x=Y}},t.unstable_scheduleCallback=function(z,B,Y){var K=t.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?K+Y:K):Y=K,z){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=Y+A,z={id:g++,callback:B,priorityLevel:z,startTime:Y,expirationTime:A,sortIndex:-1},Y>K?(z.sortIndex=Y,i(h,z),r(m)===null&&z===r(h)&&(_?(j(H),H=-1):_=!0,U(I,Y-K))):(z.sortIndex=A,i(m,z),S||v||(S=!0,D||(D=!0,Q()))),z},t.unstable_shouldYield=lt,t.unstable_wrapCallback=function(z){var B=x;return function(){var Y=x;x=B;try{return z.apply(this,arguments)}finally{x=Y}}}})(Jf)),Jf}var Ay;function Tw(){return Ay||(Ay=1,Pf.exports=Nw()),Pf.exports}var Wf={exports:{}},Oe={};var My;function Aw(){if(My)return Oe;My=1;var t=eo();function i(m){var h="https://react.dev/errors/"+m;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var a={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(m,h,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:m,containerInfo:h,implementation:g}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Oe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Oe.createPortal=function(m,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(i(299));return u(m,h,null,g)},Oe.flushSync=function(m){var h=c.T,g=a.p;try{if(c.T=null,a.p=2,m)return m()}finally{c.T=h,a.p=g,a.d.f()}},Oe.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(m,h))},Oe.prefetchDNS=function(m){typeof m=="string"&&a.d.D(m)},Oe.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var g=h.as,y=d(g,h.crossOrigin),x=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?a.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:v}):g==="script"&&a.d.X(m,{crossOrigin:y,integrity:x,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Oe.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=d(h.as,h.crossOrigin);a.d.M(m,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(m)},Oe.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,y=d(g,h.crossOrigin);a.d.L(m,g,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Oe.preloadModule=function(m,h){if(typeof m=="string")if(h){var g=d(h.as,h.crossOrigin);a.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(m)},Oe.requestFormReset=function(m){a.d.r(m)},Oe.unstable_batchedUpdates=function(m,h){return m(h)},Oe.useFormState=function(m,h,g){return c.H.useFormState(m,h,g)},Oe.useFormStatus=function(){return c.H.useHostTransitionStatus()},Oe.version="19.2.4",Oe}var zy;function Bx(){if(zy)return Wf.exports;zy=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(i){console.error(i)}}return t(),Wf.exports=Aw(),Wf.exports}var Oy;function Mw(){if(Oy)return Ma;Oy=1;var t=Tw(),i=eo(),r=Bx();function a(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}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 s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l: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 m(e){if(u(e)!==e)throw Error(a(188))}function h(e){var n=e.alternate;if(!n){if(n=u(e),n===null)throw Error(a(188));return n!==e?null:e}for(var l=e,o=n;;){var f=l.return;if(f===null)break;var p=f.alternate;if(p===null){if(o=f.return,o!==null){l=o;continue}break}if(f.child===p.child){for(p=f.child;p;){if(p===l)return m(f),e;if(p===o)return m(f),n;p=p.sibling}throw Error(a(188))}if(l.return!==o.return)l=f,o=p;else{for(var b=!1,N=f.child;N;){if(N===l){b=!0,l=f,o=p;break}if(N===o){b=!0,o=f,l=p;break}N=N.sibling}if(!b){for(N=p.child;N;){if(N===l){b=!0,l=p,o=f;break}if(N===o){b=!0,o=p,l=f;break}N=N.sibling}if(!b)throw Error(a(189))}}if(l.alternate!==o)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?e:n}function g(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=g(e),n!==null)return n;e=e.sibling}return null}var y=Object.assign,x=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),w=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),Z=Symbol.for("react.activity"),lt=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function Q(e){return e===null||typeof e!="object"?null:(e=L&&e[L]||e["@@iterator"],typeof e=="function"?e:null)}var et=Symbol.for("react.client.reference");function R(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===et?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case C:return"Profiler";case M:return"StrictMode";case I:return"Suspense";case D:return"SuspenseList";case Z:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case w:return e.displayName||"Context";case j:return(e._context.displayName||"Context")+".Consumer";case k:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return n=e.displayName||null,n!==null?n:R(e.type)||"Memo";case G:n=e._payload,e=e._init;try{return R(e(n))}catch{}}return null}var U=Array.isArray,z=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y={pending:!1,data:null,method:null,action:null},K=[],A=-1;function O(e){return{current:e}}function V(e){0>A||(e.current=K[A],K[A]=null,A--)}function T(e,n){A++,K[A]=e.current,e.current=n}var nt=O(null),ut=O(null),ct=O(null),dt=O(null);function st(e,n){switch(T(ct,n),T(ut,e),T(nt,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Gg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Gg(n),e=Zg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(nt),T(nt,e)}function pt(){V(nt),V(ut),V(ct)}function wt(e){e.memoizedState!==null&&T(dt,e);var n=nt.current,l=Zg(n,e.type);n!==l&&(T(ut,e),T(nt,l))}function Ct(e){ut.current===e&&(V(nt),V(ut)),dt.current===e&&(V(dt),Ca._currentValue=Y)}var xt,Et;function Ot(e){if(xt===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);xt=n&&n[1]||"",Et=-1<l.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+xt+e+Et}var It=!1;function Ut(e,n){if(!e||It)return"";It=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var ot=function(){throw Error()};if(Object.defineProperty(ot.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ot,[])}catch(tt){var W=tt}Reflect.construct(e,[],ot)}else{try{ot.call()}catch(tt){W=tt}e.call(ot.prototype)}}else{try{throw Error()}catch(tt){W=tt}(ot=e())&&typeof ot.catch=="function"&&ot.catch(function(){})}}catch(tt){if(tt&&W&&typeof tt.stack=="string")return[tt.stack,W.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=o.DetermineComponentFrameRoot(),b=p[0],N=p[1];if(b&&N){var q=b.split(`
4
+ `),P=N.split(`
5
+ `);for(f=o=0;o<q.length&&!q[o].includes("DetermineComponentFrameRoot");)o++;for(;f<P.length&&!P[f].includes("DetermineComponentFrameRoot");)f++;if(o===q.length||f===P.length)for(o=q.length-1,f=P.length-1;1<=o&&0<=f&&q[o]!==P[f];)f--;for(;1<=o&&0<=f;o--,f--)if(q[o]!==P[f]){if(o!==1||f!==1)do if(o--,f--,0>f||q[o]!==P[f]){var rt=`
6
+ `+q[o].replace(" at new "," at ");return e.displayName&&rt.includes("<anonymous>")&&(rt=rt.replace("<anonymous>",e.displayName)),rt}while(1<=o&&0<=f);break}}}finally{It=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ot(l):""}function oe(e,n){switch(e.tag){case 26:case 27:case 5:return Ot(e.type);case 16:return Ot("Lazy");case 13:return e.child!==n&&n!==null?Ot("Suspense Fallback"):Ot("Suspense");case 19:return Ot("SuspenseList");case 0:case 15:return Ut(e.type,!1);case 11:return Ut(e.type.render,!1);case 1:return Ut(e.type,!0);case 31:return Ot("Activity");default:return""}}function Ke(e){try{var n="",l=null;do n+=oe(e,l),l=e,e=e.return;while(e);return n}catch(o){return`
7
+ Error generating stack: `+o.message+`
8
+ `+o.stack}}var Ae=Object.prototype.hasOwnProperty,je=t.unstable_scheduleCallback,vn=t.unstable_cancelCallback,Yn=t.unstable_shouldYield,Qn=t.unstable_requestPaint,xe=t.unstable_now,gi=t.unstable_getCurrentPriorityLevel,it=t.unstable_ImmediatePriority,ht=t.unstable_UserBlockingPriority,bt=t.unstable_NormalPriority,zt=t.unstable_LowPriority,Lt=t.unstable_IdlePriority,ke=t.log,bn=t.unstable_setDisableYieldValue,we=null,se=null;function Me(e){if(typeof ke=="function"&&bn(e),se&&typeof se.setStrictMode=="function")try{se.setStrictMode(we,e)}catch{}}var Xt=Math.clz32?Math.clz32:ju,zn=Math.log,$e=Math.LN2;function ju(e){return e>>>=0,e===0?32:31-(zn(e)/$e|0)|0}var zr=256,Or=262144,Dr=4194304;function Xn(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 kr(e,n,l){var o=e.pendingLanes;if(o===0)return 0;var f=0,p=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var N=o&134217727;return N!==0?(o=N&~p,o!==0?f=Xn(o):(b&=N,b!==0?f=Xn(b):l||(l=N&~e,l!==0&&(f=Xn(l))))):(N=o&~p,N!==0?f=Xn(N):b!==0?f=Xn(b):l||(l=o&~e,l!==0&&(f=Xn(l)))),f===0?0:n!==0&&n!==f&&(n&p)===0&&(p=f&-f,l=n&-n,p>=l||p===32&&(l&4194048)!==0)?n:f}function Ji(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Hu(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 fo(){var e=Dr;return Dr<<=1,(Dr&62914560)===0&&(Dr=4194304),e}function jl(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function Wi(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Lu(e,n,l,o,f,p){var b=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var N=e.entanglements,q=e.expirationTimes,P=e.hiddenUpdates;for(l=b&~l;0<l;){var rt=31-Xt(l),ot=1<<rt;N[rt]=0,q[rt]=-1;var W=P[rt];if(W!==null)for(P[rt]=null,rt=0;rt<W.length;rt++){var tt=W[rt];tt!==null&&(tt.lane&=-536870913)}l&=~ot}o!==0&&ho(e,o,0),p!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=p&~(b&~n))}function ho(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-Xt(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|l&261930}function po(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var o=31-Xt(l),f=1<<o;f&n|e[o]&n&&(e[o]|=n),l&=~f}}function mo(e,n){var l=n&-n;return l=(l&42)!==0?1:Hl(l),(l&(e.suspendedLanes|n))!==0?0:l}function Hl(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 Ll(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function go(){var e=B.p;return e!==0?e:(e=window.event,e===void 0?32:gy(e.type))}function yo(e,n){var l=B.p;try{return B.p=e,n()}finally{B.p=l}}var On=Math.random().toString(36).slice(2),ve="__reactFiber$"+On,ze="__reactProps$"+On,Gn="__reactContainer$"+On,Rr="__reactEvents$"+On,xo="__reactListeners$"+On,Bu="__reactHandles$"+On,vo="__reactResources$"+On,tr="__reactMarker$"+On;function Bl(e){delete e[ve],delete e[ze],delete e[Rr],delete e[xo],delete e[Bu]}function yi(e){var n=e[ve];if(n)return n;for(var l=e.parentNode;l;){if(n=l[Gn]||l[ve]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=ty(e);e!==null;){if(l=e[ve])return l;e=ty(e)}return n}e=l,l=e.parentNode}return null}function xi(e){if(e=e[ve]||e[Gn]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function vi(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(a(33))}function bi(e){var n=e[vo];return n||(n=e[vo]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function fe(e){e[tr]=!0}var bo=new Set,So={};function Zn(e,n){Si(e,n),Si(e+"Capture",n)}function Si(e,n){for(So[e]=n,e=0;e<n.length;e++)bo.add(n[e])}var Uu=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]*$"),Ul={},wo={};function qu(e){return Ae.call(wo,e)?!0:Ae.call(Ul,e)?!1:Uu.test(e)?wo[e]=!0:(Ul[e]=!0,!1)}function jr(e,n,l){if(qu(n))if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+l)}}function Hr(e,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+l)}}function Sn(e,n,l,o){if(o===null)e.removeAttribute(l);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(n,l,""+o)}}function He(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Eo(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Vu(e,n,l){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,p=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(b){l=""+b,p.call(this,b)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(b){l=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Lr(e){if(!e._valueTracker){var n=Eo(e)?"checked":"value";e._valueTracker=Vu(e,n,""+e[n])}}function Co(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),o="";return e&&(o=Eo(e)?e.checked?"true":"false":e.value),e=o,e!==l?(n.setValue(e),!0):!1}function er(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 Iu=/[\n"\\]/g;function Le(e){return e.replace(Iu,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function nr(e,n,l,o,f,p,b,N){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),n!=null?b==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+He(n)):e.value!==""+He(n)&&(e.value=""+He(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?ql(e,b,He(n)):l!=null?ql(e,b,He(l)):o!=null&&e.removeAttribute("value"),f==null&&p!=null&&(e.defaultChecked=!!p),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?e.name=""+He(N):e.removeAttribute("name")}function _o(e,n,l,o,f,p,b,N){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),n!=null||l!=null){if(!(p!=="submit"&&p!=="reset"||n!=null)){Lr(e);return}l=l!=null?""+He(l):"",n=n!=null?""+He(n):l,N||n===e.value||(e.value=n),e.defaultValue=n}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=N?e.checked:!!o,e.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),Lr(e)}function ql(e,n,l){n==="number"&&er(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Fn(e,n,l,o){if(e=e.options,n){n={};for(var f=0;f<l.length;f++)n["$"+l[f]]=!0;for(l=0;l<e.length;l++)f=n.hasOwnProperty("$"+e[l].value),e[l].selected!==f&&(e[l].selected=f),f&&o&&(e[l].defaultSelected=!0)}else{for(l=""+He(l),n=null,f=0;f<e.length;f++){if(e[f].value===l){e[f].selected=!0,o&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function Vh(e,n,l){if(n!=null&&(n=""+He(n),n!==e.value&&(e.value=n),l==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=l!=null?""+He(l):""}function Ih(e,n,l,o){if(n==null){if(o!=null){if(l!=null)throw Error(a(92));if(U(o)){if(1<o.length)throw Error(a(93));o=o[0]}l=o}l==null&&(l=""),n=l}l=He(n),e.defaultValue=l,o=e.textContent,o===l&&o!==""&&o!==null&&(e.value=o),Lr(e)}function Br(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var yb=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 Yh(e,n,l){var o=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,l):typeof l!="number"||l===0||yb.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function Qh(e,n,l){if(n!=null&&typeof n!="object")throw Error(a(62));if(e=e.style,l!=null){for(var o in l)!l.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var f in n)o=n[f],n.hasOwnProperty(f)&&l[f]!==o&&Yh(e,f,o)}else for(var p in n)n.hasOwnProperty(p)&&Yh(e,p,n[p])}function Yu(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 xb=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"]]),vb=/^[\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 No(e){return vb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Kn(){}var Qu=null;function Xu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ur=null,qr=null;function Xh(e){var n=xi(e);if(n&&(e=n.stateNode)){var l=e[ze]||null;t:switch(e=n.stateNode,n.type){case"input":if(nr(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Le(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var o=l[n];if(o!==e&&o.form===e.form){var f=o[ze]||null;if(!f)throw Error(a(90));nr(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<l.length;n++)o=l[n],o.form===e.form&&Co(o)}break t;case"textarea":Vh(e,l.value,l.defaultValue);break t;case"select":n=l.value,n!=null&&Fn(e,!!l.multiple,n,!1)}}}var Gu=!1;function Gh(e,n,l){if(Gu)return e(n,l);Gu=!0;try{var o=e(n);return o}finally{if(Gu=!1,(Ur!==null||qr!==null)&&(hs(),Ur&&(n=Ur,e=qr,qr=Ur=null,Xh(n),e)))for(n=0;n<e.length;n++)Xh(e[n])}}function Vl(e,n){var l=e.stateNode;if(l===null)return null;var o=l[ze]||null;if(o===null)return null;l=o[n];t:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break t;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(a(231,n,typeof l));return l}var $n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zu=!1;if($n)try{var Il={};Object.defineProperty(Il,"passive",{get:function(){Zu=!0}}),window.addEventListener("test",Il,Il),window.removeEventListener("test",Il,Il)}catch{Zu=!1}var wi=null,Fu=null,To=null;function Zh(){if(To)return To;var e,n=Fu,l=n.length,o,f="value"in wi?wi.value:wi.textContent,p=f.length;for(e=0;e<l&&n[e]===f[e];e++);var b=l-e;for(o=1;o<=b&&n[l-o]===f[p-o];o++);return To=f.slice(e,1<o?1-o:void 0)}function Ao(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 Mo(){return!0}function Fh(){return!1}function Be(e){function n(l,o,f,p,b){this._reactName=l,this._targetInst=f,this.type=o,this.nativeEvent=p,this.target=b,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(l=e[N],this[N]=l?l(p):p[N]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Mo:Fh,this.isPropagationStopped=Fh,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Mo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Mo)},persist:function(){},isPersistent:Mo}),n}var ir={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zo=Be(ir),Yl=y({},ir,{view:0,detail:0}),bb=Be(Yl),Ku,$u,Ql,Oo=y({},Yl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ju,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!==Ql&&(Ql&&e.type==="mousemove"?(Ku=e.screenX-Ql.screenX,$u=e.screenY-Ql.screenY):$u=Ku=0,Ql=e),Ku)},movementY:function(e){return"movementY"in e?e.movementY:$u}}),Kh=Be(Oo),Sb=y({},Oo,{dataTransfer:0}),wb=Be(Sb),Eb=y({},Yl,{relatedTarget:0}),Pu=Be(Eb),Cb=y({},ir,{animationName:0,elapsedTime:0,pseudoElement:0}),_b=Be(Cb),Nb=y({},ir,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Tb=Be(Nb),Ab=y({},ir,{data:0}),$h=Be(Ab),Mb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zb={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"},Ob={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Db(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Ob[e])?!!n[e]:!1}function Ju(){return Db}var kb=y({},Yl,{key:function(e){if(e.key){var n=Mb[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?zb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ju,charCode:function(e){return e.type==="keypress"?Ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Rb=Be(kb),jb=y({},Oo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ph=Be(jb),Hb=y({},Yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ju}),Lb=Be(Hb),Bb=y({},ir,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ub=Be(Bb),qb=y({},Oo,{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}),Vb=Be(qb),Ib=y({},ir,{newState:0,oldState:0}),Yb=Be(Ib),Qb=[9,13,27,32],Wu=$n&&"CompositionEvent"in window,Xl=null;$n&&"documentMode"in document&&(Xl=document.documentMode);var Xb=$n&&"TextEvent"in window&&!Xl,Jh=$n&&(!Wu||Xl&&8<Xl&&11>=Xl),Wh=" ",tp=!1;function ep(e,n){switch(e){case"keyup":return Qb.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function np(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vr=!1;function Gb(e,n){switch(e){case"compositionend":return np(n);case"keypress":return n.which!==32?null:(tp=!0,Wh);case"textInput":return e=n.data,e===Wh&&tp?null:e;default:return null}}function Zb(e,n){if(Vr)return e==="compositionend"||!Wu&&ep(e,n)?(e=Zh(),To=Fu=wi=null,Vr=!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 Jh&&n.locale!=="ko"?null:n.data;default:return null}}var Fb={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 ip(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Fb[e.type]:n==="textarea"}function rp(e,n,l,o){Ur?qr?qr.push(o):qr=[o]:Ur=o,n=bs(n,"onChange"),0<n.length&&(l=new zo("onChange","change",null,l,o),e.push({event:l,listeners:n}))}var Gl=null,Zl=null;function Kb(e){qg(e,0)}function Do(e){var n=vi(e);if(Co(n))return e}function lp(e,n){if(e==="change")return n}var ap=!1;if($n){var tc;if($n){var ec="oninput"in document;if(!ec){var op=document.createElement("div");op.setAttribute("oninput","return;"),ec=typeof op.oninput=="function"}tc=ec}else tc=!1;ap=tc&&(!document.documentMode||9<document.documentMode)}function sp(){Gl&&(Gl.detachEvent("onpropertychange",up),Zl=Gl=null)}function up(e){if(e.propertyName==="value"&&Do(Zl)){var n=[];rp(n,Zl,e,Xu(e)),Gh(Kb,n)}}function $b(e,n,l){e==="focusin"?(sp(),Gl=n,Zl=l,Gl.attachEvent("onpropertychange",up)):e==="focusout"&&sp()}function Pb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Do(Zl)}function Jb(e,n){if(e==="click")return Do(n)}function Wb(e,n){if(e==="input"||e==="change")return Do(n)}function tS(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Pe=typeof Object.is=="function"?Object.is:tS;function Fl(e,n){if(Pe(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),o=Object.keys(n);if(l.length!==o.length)return!1;for(o=0;o<l.length;o++){var f=l[o];if(!Ae.call(n,f)||!Pe(e[f],n[f]))return!1}return!0}function cp(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function fp(e,n){var l=cp(e);e=0;for(var o;l;){if(l.nodeType===3){if(o=e+l.textContent.length,e<=n&&o>=n)return{node:l,offset:n-e};e=o}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=cp(l)}}function dp(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?dp(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function hp(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=er(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=er(e.document)}return n}function nc(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 eS=$n&&"documentMode"in document&&11>=document.documentMode,Ir=null,ic=null,Kl=null,rc=!1;function pp(e,n,l){var o=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;rc||Ir==null||Ir!==er(o)||(o=Ir,"selectionStart"in o&&nc(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Kl&&Fl(Kl,o)||(Kl=o,o=bs(ic,"onSelect"),0<o.length&&(n=new zo("onSelect","select",null,n,l),e.push({event:n,listeners:o}),n.target=Ir)))}function rr(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var Yr={animationend:rr("Animation","AnimationEnd"),animationiteration:rr("Animation","AnimationIteration"),animationstart:rr("Animation","AnimationStart"),transitionrun:rr("Transition","TransitionRun"),transitionstart:rr("Transition","TransitionStart"),transitioncancel:rr("Transition","TransitionCancel"),transitionend:rr("Transition","TransitionEnd")},lc={},mp={};$n&&(mp=document.createElement("div").style,"AnimationEvent"in window||(delete Yr.animationend.animation,delete Yr.animationiteration.animation,delete Yr.animationstart.animation),"TransitionEvent"in window||delete Yr.transitionend.transition);function lr(e){if(lc[e])return lc[e];if(!Yr[e])return e;var n=Yr[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in mp)return lc[e]=n[l];return e}var gp=lr("animationend"),yp=lr("animationiteration"),xp=lr("animationstart"),nS=lr("transitionrun"),iS=lr("transitionstart"),rS=lr("transitioncancel"),vp=lr("transitionend"),bp=new Map,ac="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(" ");ac.push("scrollEnd");function wn(e,n){bp.set(e,n),Zn(n,[e])}var ko=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)},un=[],Qr=0,oc=0;function Ro(){for(var e=Qr,n=oc=Qr=0;n<e;){var l=un[n];un[n++]=null;var o=un[n];un[n++]=null;var f=un[n];un[n++]=null;var p=un[n];if(un[n++]=null,o!==null&&f!==null){var b=o.pending;b===null?f.next=f:(f.next=b.next,b.next=f),o.pending=f}p!==0&&Sp(l,f,p)}}function jo(e,n,l,o){un[Qr++]=e,un[Qr++]=n,un[Qr++]=l,un[Qr++]=o,oc|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function sc(e,n,l,o){return jo(e,n,l,o),Ho(e)}function ar(e,n){return jo(e,null,null,n),Ho(e)}function Sp(e,n,l){e.lanes|=l;var o=e.alternate;o!==null&&(o.lanes|=l);for(var f=!1,p=e.return;p!==null;)p.childLanes|=l,o=p.alternate,o!==null&&(o.childLanes|=l),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(f=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,f&&n!==null&&(f=31-Xt(l),e=p.hiddenUpdates,o=e[f],o===null?e[f]=[n]:o.push(n),n.lane=l|536870912),p):null}function Ho(e){if(50<ya)throw ya=0,xf=null,Error(a(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Xr={};function lS(e,n,l,o){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Je(e,n,l,o){return new lS(e,n,l,o)}function uc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pn(e,n){var l=e.alternate;return l===null?(l=Je(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function wp(e,n){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,n=l.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Lo(e,n,l,o,f,p){var b=0;if(o=e,typeof e=="function")uc(e)&&(b=1);else if(typeof e=="string")b=cw(e,l,nt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case Z:return e=Je(31,l,n,f),e.elementType=Z,e.lanes=p,e;case _:return or(l.children,f,p,n);case M:b=8,f|=24;break;case C:return e=Je(12,l,n,f|2),e.elementType=C,e.lanes=p,e;case I:return e=Je(13,l,n,f),e.elementType=I,e.lanes=p,e;case D:return e=Je(19,l,n,f),e.elementType=D,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case w:b=10;break t;case j:b=9;break t;case k:b=11;break t;case H:b=14;break t;case G:b=16,o=null;break t}b=29,l=Error(a(130,e===null?"null":typeof e,"")),o=null}return n=Je(b,l,n,f),n.elementType=e,n.type=o,n.lanes=p,n}function or(e,n,l,o){return e=Je(7,e,o,n),e.lanes=l,e}function cc(e,n,l){return e=Je(6,e,null,n),e.lanes=l,e}function Ep(e){var n=Je(18,null,null,0);return n.stateNode=e,n}function fc(e,n,l){return n=Je(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Cp=new WeakMap;function cn(e,n){if(typeof e=="object"&&e!==null){var l=Cp.get(e);return l!==void 0?l:(n={value:e,source:n,stack:Ke(n)},Cp.set(e,n),n)}return{value:e,source:n,stack:Ke(n)}}var Gr=[],Zr=0,Bo=null,$l=0,fn=[],dn=0,Ei=null,Dn=1,kn="";function Jn(e,n){Gr[Zr++]=$l,Gr[Zr++]=Bo,Bo=e,$l=n}function _p(e,n,l){fn[dn++]=Dn,fn[dn++]=kn,fn[dn++]=Ei,Ei=e;var o=Dn;e=kn;var f=32-Xt(o)-1;o&=~(1<<f),l+=1;var p=32-Xt(n)+f;if(30<p){var b=f-f%5;p=(o&(1<<b)-1).toString(32),o>>=b,f-=b,Dn=1<<32-Xt(n)+f|l<<f|o,kn=p+e}else Dn=1<<p|l<<f|o,kn=e}function dc(e){e.return!==null&&(Jn(e,1),_p(e,1,0))}function hc(e){for(;e===Bo;)Bo=Gr[--Zr],Gr[Zr]=null,$l=Gr[--Zr],Gr[Zr]=null;for(;e===Ei;)Ei=fn[--dn],fn[dn]=null,kn=fn[--dn],fn[dn]=null,Dn=fn[--dn],fn[dn]=null}function Np(e,n){fn[dn++]=Dn,fn[dn++]=kn,fn[dn++]=Ei,Dn=n.id,kn=n.overflow,Ei=e}var Ee=null,te=null,Ht=!1,Ci=null,hn=!1,pc=Error(a(519));function _i(e){var n=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Pl(cn(n,e)),pc}function Tp(e){var n=e.stateNode,l=e.type,o=e.memoizedProps;switch(n[ve]=e,n[ze]=o,l){case"dialog":kt("cancel",n),kt("close",n);break;case"iframe":case"object":case"embed":kt("load",n);break;case"video":case"audio":for(l=0;l<va.length;l++)kt(va[l],n);break;case"source":kt("error",n);break;case"img":case"image":case"link":kt("error",n),kt("load",n);break;case"details":kt("toggle",n);break;case"input":kt("invalid",n),_o(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":kt("invalid",n);break;case"textarea":kt("invalid",n),Ih(n,o.value,o.defaultValue,o.children)}l=o.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||o.suppressHydrationWarning===!0||Qg(n.textContent,l)?(o.popover!=null&&(kt("beforetoggle",n),kt("toggle",n)),o.onScroll!=null&&kt("scroll",n),o.onScrollEnd!=null&&kt("scrollend",n),o.onClick!=null&&(n.onclick=Kn),n=!0):n=!1,n||_i(e,!0)}function Ap(e){for(Ee=e.return;Ee;)switch(Ee.tag){case 5:case 31:case 13:hn=!1;return;case 27:case 3:hn=!0;return;default:Ee=Ee.return}}function Fr(e){if(e!==Ee)return!1;if(!Ht)return Ap(e),Ht=!0,!1;var n=e.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||kf(e.type,e.memoizedProps)),l=!l),l&&te&&_i(e),Ap(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));te=Wg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));te=Wg(e)}else n===27?(n=te,Ui(e.type)?(e=Bf,Bf=null,te=e):te=n):te=Ee?mn(e.stateNode.nextSibling):null;return!0}function sr(){te=Ee=null,Ht=!1}function mc(){var e=Ci;return e!==null&&(Ie===null?Ie=e:Ie.push.apply(Ie,e),Ci=null),e}function Pl(e){Ci===null?Ci=[e]:Ci.push(e)}var gc=O(null),ur=null,Wn=null;function Ni(e,n,l){T(gc,n._currentValue),n._currentValue=l}function ti(e){e._currentValue=gc.current,V(gc)}function yc(e,n,l){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===l)break;e=e.return}}function xc(e,n,l,o){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var p=f.dependencies;if(p!==null){var b=f.child;p=p.firstContext;t:for(;p!==null;){var N=p;p=f;for(var q=0;q<n.length;q++)if(N.context===n[q]){p.lanes|=l,N=p.alternate,N!==null&&(N.lanes|=l),yc(p.return,l,e),o||(b=null);break t}p=N.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(a(341));b.lanes|=l,p=b.alternate,p!==null&&(p.lanes|=l),yc(b,l,e),b=null}else b=f.child;if(b!==null)b.return=f;else for(b=f;b!==null;){if(b===e){b=null;break}if(f=b.sibling,f!==null){f.return=b.return,b=f;break}b=b.return}f=b}}function Kr(e,n,l,o){e=null;for(var f=n,p=!1;f!==null;){if(!p){if((f.flags&524288)!==0)p=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var b=f.alternate;if(b===null)throw Error(a(387));if(b=b.memoizedProps,b!==null){var N=f.type;Pe(f.pendingProps.value,b.value)||(e!==null?e.push(N):e=[N])}}else if(f===dt.current){if(b=f.alternate,b===null)throw Error(a(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Ca):e=[Ca])}f=f.return}e!==null&&xc(n,e,l,o),n.flags|=262144}function Uo(e){for(e=e.firstContext;e!==null;){if(!Pe(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function cr(e){ur=e,Wn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ce(e){return Mp(ur,e)}function qo(e,n){return ur===null&&cr(e),Mp(e,n)}function Mp(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},Wn===null){if(e===null)throw Error(a(308));Wn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Wn=Wn.next=n;return l}var aS=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(l,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(l){return l()})}},oS=t.unstable_scheduleCallback,sS=t.unstable_NormalPriority,de={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vc(){return{controller:new aS,data:new Map,refCount:0}}function Jl(e){e.refCount--,e.refCount===0&&oS(sS,function(){e.controller.abort()})}var Wl=null,bc=0,$r=0,Pr=null;function uS(e,n){if(Wl===null){var l=Wl=[];bc=0,$r=Cf(),Pr={status:"pending",value:void 0,then:function(o){l.push(o)}}}return bc++,n.then(zp,zp),n}function zp(){if(--bc===0&&Wl!==null){Pr!==null&&(Pr.status="fulfilled");var e=Wl;Wl=null,$r=0,Pr=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function cS(e,n){var l=[],o={status:"pending",value:null,reason:null,then:function(f){l.push(f)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var f=0;f<l.length;f++)(0,l[f])(n)},function(f){for(o.status="rejected",o.reason=f,f=0;f<l.length;f++)(0,l[f])(void 0)}),o}var Op=z.S;z.S=function(e,n){pg=xe(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&uS(e,n),Op!==null&&Op(e,n)};var fr=O(null);function Sc(){var e=fr.current;return e!==null?e:Pt.pooledCache}function Vo(e,n){n===null?T(fr,fr.current):T(fr,n.pool)}function Dp(){var e=Sc();return e===null?null:{parent:de._currentValue,pool:e}}var Jr=Error(a(460)),wc=Error(a(474)),Io=Error(a(542)),Yo={then:function(){}};function kp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Rp(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then(Kn,Kn),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Hp(e),e;default:if(typeof n.status=="string")n.then(Kn,Kn);else{if(e=Pt,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=o}},function(o){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Hp(e),e}throw hr=n,Jr}}function dr(e){try{var n=e._init;return n(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(hr=l,Jr):l}}var hr=null;function jp(){if(hr===null)throw Error(a(459));var e=hr;return hr=null,e}function Hp(e){if(e===Jr||e===Io)throw Error(a(483))}var Wr=null,ta=0;function Qo(e){var n=ta;return ta+=1,Wr===null&&(Wr=[]),Rp(Wr,e,n)}function ea(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Xo(e,n){throw n.$$typeof===x?Error(a(525)):(e=Object.prototype.toString.call(n),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Lp(e){function n(F,X){if(e){var $=F.deletions;$===null?(F.deletions=[X],F.flags|=16):$.push(X)}}function l(F,X){if(!e)return null;for(;X!==null;)n(F,X),X=X.sibling;return null}function o(F){for(var X=new Map;F!==null;)F.key!==null?X.set(F.key,F):X.set(F.index,F),F=F.sibling;return X}function f(F,X){return F=Pn(F,X),F.index=0,F.sibling=null,F}function p(F,X,$){return F.index=$,e?($=F.alternate,$!==null?($=$.index,$<X?(F.flags|=67108866,X):$):(F.flags|=67108866,X)):(F.flags|=1048576,X)}function b(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function N(F,X,$,at){return X===null||X.tag!==6?(X=cc($,F.mode,at),X.return=F,X):(X=f(X,$),X.return=F,X)}function q(F,X,$,at){var yt=$.type;return yt===_?rt(F,X,$.props.children,at,$.key):X!==null&&(X.elementType===yt||typeof yt=="object"&&yt!==null&&yt.$$typeof===G&&dr(yt)===X.type)?(X=f(X,$.props),ea(X,$),X.return=F,X):(X=Lo($.type,$.key,$.props,null,F.mode,at),ea(X,$),X.return=F,X)}function P(F,X,$,at){return X===null||X.tag!==4||X.stateNode.containerInfo!==$.containerInfo||X.stateNode.implementation!==$.implementation?(X=fc($,F.mode,at),X.return=F,X):(X=f(X,$.children||[]),X.return=F,X)}function rt(F,X,$,at,yt){return X===null||X.tag!==7?(X=or($,F.mode,at,yt),X.return=F,X):(X=f(X,$),X.return=F,X)}function ot(F,X,$){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=cc(""+X,F.mode,$),X.return=F,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case v:return $=Lo(X.type,X.key,X.props,null,F.mode,$),ea($,X),$.return=F,$;case S:return X=fc(X,F.mode,$),X.return=F,X;case G:return X=dr(X),ot(F,X,$)}if(U(X)||Q(X))return X=or(X,F.mode,$,null),X.return=F,X;if(typeof X.then=="function")return ot(F,Qo(X),$);if(X.$$typeof===w)return ot(F,qo(F,X),$);Xo(F,X)}return null}function W(F,X,$,at){var yt=X!==null?X.key:null;if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return yt!==null?null:N(F,X,""+$,at);if(typeof $=="object"&&$!==null){switch($.$$typeof){case v:return $.key===yt?q(F,X,$,at):null;case S:return $.key===yt?P(F,X,$,at):null;case G:return $=dr($),W(F,X,$,at)}if(U($)||Q($))return yt!==null?null:rt(F,X,$,at,null);if(typeof $.then=="function")return W(F,X,Qo($),at);if($.$$typeof===w)return W(F,X,qo(F,$),at);Xo(F,$)}return null}function tt(F,X,$,at,yt){if(typeof at=="string"&&at!==""||typeof at=="number"||typeof at=="bigint")return F=F.get($)||null,N(X,F,""+at,yt);if(typeof at=="object"&&at!==null){switch(at.$$typeof){case v:return F=F.get(at.key===null?$:at.key)||null,q(X,F,at,yt);case S:return F=F.get(at.key===null?$:at.key)||null,P(X,F,at,yt);case G:return at=dr(at),tt(F,X,$,at,yt)}if(U(at)||Q(at))return F=F.get($)||null,rt(X,F,at,yt,null);if(typeof at.then=="function")return tt(F,X,$,Qo(at),yt);if(at.$$typeof===w)return tt(F,X,$,qo(X,at),yt);Xo(X,at)}return null}function mt(F,X,$,at){for(var yt=null,qt=null,gt=X,At=X=0,jt=null;gt!==null&&At<$.length;At++){gt.index>At?(jt=gt,gt=null):jt=gt.sibling;var Vt=W(F,gt,$[At],at);if(Vt===null){gt===null&&(gt=jt);break}e&&gt&&Vt.alternate===null&&n(F,gt),X=p(Vt,X,At),qt===null?yt=Vt:qt.sibling=Vt,qt=Vt,gt=jt}if(At===$.length)return l(F,gt),Ht&&Jn(F,At),yt;if(gt===null){for(;At<$.length;At++)gt=ot(F,$[At],at),gt!==null&&(X=p(gt,X,At),qt===null?yt=gt:qt.sibling=gt,qt=gt);return Ht&&Jn(F,At),yt}for(gt=o(gt);At<$.length;At++)jt=tt(gt,F,At,$[At],at),jt!==null&&(e&&jt.alternate!==null&&gt.delete(jt.key===null?At:jt.key),X=p(jt,X,At),qt===null?yt=jt:qt.sibling=jt,qt=jt);return e&&gt.forEach(function(Qi){return n(F,Qi)}),Ht&&Jn(F,At),yt}function St(F,X,$,at){if($==null)throw Error(a(151));for(var yt=null,qt=null,gt=X,At=X=0,jt=null,Vt=$.next();gt!==null&&!Vt.done;At++,Vt=$.next()){gt.index>At?(jt=gt,gt=null):jt=gt.sibling;var Qi=W(F,gt,Vt.value,at);if(Qi===null){gt===null&&(gt=jt);break}e&&gt&&Qi.alternate===null&&n(F,gt),X=p(Qi,X,At),qt===null?yt=Qi:qt.sibling=Qi,qt=Qi,gt=jt}if(Vt.done)return l(F,gt),Ht&&Jn(F,At),yt;if(gt===null){for(;!Vt.done;At++,Vt=$.next())Vt=ot(F,Vt.value,at),Vt!==null&&(X=p(Vt,X,At),qt===null?yt=Vt:qt.sibling=Vt,qt=Vt);return Ht&&Jn(F,At),yt}for(gt=o(gt);!Vt.done;At++,Vt=$.next())Vt=tt(gt,F,At,Vt.value,at),Vt!==null&&(e&&Vt.alternate!==null&&gt.delete(Vt.key===null?At:Vt.key),X=p(Vt,X,At),qt===null?yt=Vt:qt.sibling=Vt,qt=Vt);return e&&gt.forEach(function(Sw){return n(F,Sw)}),Ht&&Jn(F,At),yt}function $t(F,X,$,at){if(typeof $=="object"&&$!==null&&$.type===_&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case v:t:{for(var yt=$.key;X!==null;){if(X.key===yt){if(yt=$.type,yt===_){if(X.tag===7){l(F,X.sibling),at=f(X,$.props.children),at.return=F,F=at;break t}}else if(X.elementType===yt||typeof yt=="object"&&yt!==null&&yt.$$typeof===G&&dr(yt)===X.type){l(F,X.sibling),at=f(X,$.props),ea(at,$),at.return=F,F=at;break t}l(F,X);break}else n(F,X);X=X.sibling}$.type===_?(at=or($.props.children,F.mode,at,$.key),at.return=F,F=at):(at=Lo($.type,$.key,$.props,null,F.mode,at),ea(at,$),at.return=F,F=at)}return b(F);case S:t:{for(yt=$.key;X!==null;){if(X.key===yt)if(X.tag===4&&X.stateNode.containerInfo===$.containerInfo&&X.stateNode.implementation===$.implementation){l(F,X.sibling),at=f(X,$.children||[]),at.return=F,F=at;break t}else{l(F,X);break}else n(F,X);X=X.sibling}at=fc($,F.mode,at),at.return=F,F=at}return b(F);case G:return $=dr($),$t(F,X,$,at)}if(U($))return mt(F,X,$,at);if(Q($)){if(yt=Q($),typeof yt!="function")throw Error(a(150));return $=yt.call($),St(F,X,$,at)}if(typeof $.then=="function")return $t(F,X,Qo($),at);if($.$$typeof===w)return $t(F,X,qo(F,$),at);Xo(F,$)}return typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint"?($=""+$,X!==null&&X.tag===6?(l(F,X.sibling),at=f(X,$),at.return=F,F=at):(l(F,X),at=cc($,F.mode,at),at.return=F,F=at),b(F)):l(F,X)}return function(F,X,$,at){try{ta=0;var yt=$t(F,X,$,at);return Wr=null,yt}catch(gt){if(gt===Jr||gt===Io)throw gt;var qt=Je(29,gt,null,F.mode);return qt.lanes=at,qt.return=F,qt}}}var pr=Lp(!0),Bp=Lp(!1),Ti=!1;function Ec(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Cc(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 Ai(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Mi(e,n,l){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Yt&2)!==0){var f=o.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),o.pending=n,n=Ho(e),Sp(e,null,l),n}return jo(e,o,n,l),Ho(e)}function na(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,l|=o,n.lanes=l,po(e,l)}}function _c(e,n){var l=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,l===o)){var f=null,p=null;if(l=l.firstBaseUpdate,l!==null){do{var b={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};p===null?f=p=b:p=p.next=b,l=l.next}while(l!==null);p===null?f=p=n:p=p.next=n}else f=p=n;l={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:o.shared,callbacks:o.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var Nc=!1;function ia(){if(Nc){var e=Pr;if(e!==null)throw e}}function ra(e,n,l,o){Nc=!1;var f=e.updateQueue;Ti=!1;var p=f.firstBaseUpdate,b=f.lastBaseUpdate,N=f.shared.pending;if(N!==null){f.shared.pending=null;var q=N,P=q.next;q.next=null,b===null?p=P:b.next=P,b=q;var rt=e.alternate;rt!==null&&(rt=rt.updateQueue,N=rt.lastBaseUpdate,N!==b&&(N===null?rt.firstBaseUpdate=P:N.next=P,rt.lastBaseUpdate=q))}if(p!==null){var ot=f.baseState;b=0,rt=P=q=null,N=p;do{var W=N.lane&-536870913,tt=W!==N.lane;if(tt?(Rt&W)===W:(o&W)===W){W!==0&&W===$r&&(Nc=!0),rt!==null&&(rt=rt.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});t:{var mt=e,St=N;W=n;var $t=l;switch(St.tag){case 1:if(mt=St.payload,typeof mt=="function"){ot=mt.call($t,ot,W);break t}ot=mt;break t;case 3:mt.flags=mt.flags&-65537|128;case 0:if(mt=St.payload,W=typeof mt=="function"?mt.call($t,ot,W):mt,W==null)break t;ot=y({},ot,W);break t;case 2:Ti=!0}}W=N.callback,W!==null&&(e.flags|=64,tt&&(e.flags|=8192),tt=f.callbacks,tt===null?f.callbacks=[W]:tt.push(W))}else tt={lane:W,tag:N.tag,payload:N.payload,callback:N.callback,next:null},rt===null?(P=rt=tt,q=ot):rt=rt.next=tt,b|=W;if(N=N.next,N===null){if(N=f.shared.pending,N===null)break;tt=N,N=tt.next,tt.next=null,f.lastBaseUpdate=tt,f.shared.pending=null}}while(!0);rt===null&&(q=ot),f.baseState=q,f.firstBaseUpdate=P,f.lastBaseUpdate=rt,p===null&&(f.shared.lanes=0),Ri|=b,e.lanes=b,e.memoizedState=ot}}function Up(e,n){if(typeof e!="function")throw Error(a(191,e));e.call(n)}function qp(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Up(l[e],n)}var tl=O(null),Go=O(0);function Vp(e,n){e=ui,T(Go,e),T(tl,n),ui=e|n.baseLanes}function Tc(){T(Go,ui),T(tl,tl.current)}function Ac(){ui=Go.current,V(tl),V(Go)}var We=O(null),pn=null;function zi(e){var n=e.alternate;T(ue,ue.current&1),T(We,e),pn===null&&(n===null||tl.current!==null||n.memoizedState!==null)&&(pn=e)}function Mc(e){T(ue,ue.current),T(We,e),pn===null&&(pn=e)}function Ip(e){e.tag===22?(T(ue,ue.current),T(We,e),pn===null&&(pn=e)):Oi()}function Oi(){T(ue,ue.current),T(We,We.current)}function tn(e){V(We),pn===e&&(pn=null),V(ue)}var ue=O(0);function Zo(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Hf(l)||Lf(l)))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 ei=0,Tt=null,Ft=null,he=null,Fo=!1,el=!1,mr=!1,Ko=0,la=0,nl=null,fS=0;function le(){throw Error(a(321))}function zc(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!Pe(e[l],n[l]))return!1;return!0}function Oc(e,n,l,o,f,p){return ei=p,Tt=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,z.H=e===null||e.memoizedState===null?_m:Gc,mr=!1,p=l(o,f),mr=!1,el&&(p=Qp(n,l,o,f)),Yp(e),p}function Yp(e){z.H=sa;var n=Ft!==null&&Ft.next!==null;if(ei=0,he=Ft=Tt=null,Fo=!1,la=0,nl=null,n)throw Error(a(300));e===null||pe||(e=e.dependencies,e!==null&&Uo(e)&&(pe=!0))}function Qp(e,n,l,o){Tt=e;var f=0;do{if(el&&(nl=null),la=0,el=!1,25<=f)throw Error(a(301));if(f+=1,he=Ft=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}z.H=Nm,p=n(l,o)}while(el);return p}function dS(){var e=z.H,n=e.useState()[0];return n=typeof n.then=="function"?aa(n):n,e=e.useState()[0],(Ft!==null?Ft.memoizedState:null)!==e&&(Tt.flags|=1024),n}function Dc(){var e=Ko!==0;return Ko=0,e}function kc(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function Rc(e){if(Fo){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Fo=!1}ei=0,he=Ft=Tt=null,el=!1,la=Ko=0,nl=null}function Re(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return he===null?Tt.memoizedState=he=e:he=he.next=e,he}function ce(){if(Ft===null){var e=Tt.alternate;e=e!==null?e.memoizedState:null}else e=Ft.next;var n=he===null?Tt.memoizedState:he.next;if(n!==null)he=n,Ft=e;else{if(e===null)throw Tt.alternate===null?Error(a(467)):Error(a(310));Ft=e,e={memoizedState:Ft.memoizedState,baseState:Ft.baseState,baseQueue:Ft.baseQueue,queue:Ft.queue,next:null},he===null?Tt.memoizedState=he=e:he=he.next=e}return he}function $o(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function aa(e){var n=la;return la+=1,nl===null&&(nl=[]),e=Rp(nl,e,n),n=Tt,(he===null?n.memoizedState:he.next)===null&&(n=n.alternate,z.H=n===null||n.memoizedState===null?_m:Gc),e}function Po(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return aa(e);if(e.$$typeof===w)return Ce(e)}throw Error(a(438,String(e)))}function jc(e){var n=null,l=Tt.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var o=Tt.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=$o(),Tt.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(e),o=0;o<e;o++)l[o]=lt;return n.index++,l}function ni(e,n){return typeof n=="function"?n(e):n}function Jo(e){var n=ce();return Hc(n,Ft,e)}function Hc(e,n,l){var o=e.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=l;var f=e.baseQueue,p=o.pending;if(p!==null){if(f!==null){var b=f.next;f.next=p.next,p.next=b}n.baseQueue=f=p,o.pending=null}if(p=e.baseState,f===null)e.memoizedState=p;else{n=f.next;var N=b=null,q=null,P=n,rt=!1;do{var ot=P.lane&-536870913;if(ot!==P.lane?(Rt&ot)===ot:(ei&ot)===ot){var W=P.revertLane;if(W===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),ot===$r&&(rt=!0);else if((ei&W)===W){P=P.next,W===$r&&(rt=!0);continue}else ot={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},q===null?(N=q=ot,b=p):q=q.next=ot,Tt.lanes|=W,Ri|=W;ot=P.action,mr&&l(p,ot),p=P.hasEagerState?P.eagerState:l(p,ot)}else W={lane:ot,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},q===null?(N=q=W,b=p):q=q.next=W,Tt.lanes|=ot,Ri|=ot;P=P.next}while(P!==null&&P!==n);if(q===null?b=p:q.next=N,!Pe(p,e.memoizedState)&&(pe=!0,rt&&(l=Pr,l!==null)))throw l;e.memoizedState=p,e.baseState=b,e.baseQueue=q,o.lastRenderedState=p}return f===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Lc(e){var n=ce(),l=n.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=e;var o=l.dispatch,f=l.pending,p=n.memoizedState;if(f!==null){l.pending=null;var b=f=f.next;do p=e(p,b.action),b=b.next;while(b!==f);Pe(p,n.memoizedState)||(pe=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),l.lastRenderedState=p}return[p,o]}function Xp(e,n,l){var o=Tt,f=ce(),p=Ht;if(p){if(l===void 0)throw Error(a(407));l=l()}else l=n();var b=!Pe((Ft||f).memoizedState,l);if(b&&(f.memoizedState=l,pe=!0),f=f.queue,qc(Fp.bind(null,o,f,e),[e]),f.getSnapshot!==n||b||he!==null&&he.memoizedState.tag&1){if(o.flags|=2048,il(9,{destroy:void 0},Zp.bind(null,o,f,l,n),null),Pt===null)throw Error(a(349));p||(ei&127)!==0||Gp(o,n,l)}return l}function Gp(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=Tt.updateQueue,n===null?(n=$o(),Tt.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function Zp(e,n,l,o){n.value=l,n.getSnapshot=o,Kp(n)&&$p(e)}function Fp(e,n,l){return l(function(){Kp(n)&&$p(e)})}function Kp(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!Pe(e,l)}catch{return!0}}function $p(e){var n=ar(e,2);n!==null&&Ye(n,e,2)}function Bc(e){var n=Re();if(typeof e=="function"){var l=e;if(e=l(),mr){Me(!0);try{l()}finally{Me(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ni,lastRenderedState:e},n}function Pp(e,n,l,o){return e.baseState=l,Hc(e,Ft,typeof o=="function"?o:ni)}function hS(e,n,l,o,f){if(es(e))throw Error(a(485));if(e=n.action,e!==null){var p={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){p.listeners.push(b)}};z.T!==null?l(!0):p.isTransition=!1,o(p),l=n.pending,l===null?(p.next=n.pending=p,Jp(n,p)):(p.next=l.next,n.pending=l.next=p)}}function Jp(e,n){var l=n.action,o=n.payload,f=e.state;if(n.isTransition){var p=z.T,b={};z.T=b;try{var N=l(f,o),q=z.S;q!==null&&q(b,N),Wp(e,n,N)}catch(P){Uc(e,n,P)}finally{p!==null&&b.types!==null&&(p.types=b.types),z.T=p}}else try{p=l(f,o),Wp(e,n,p)}catch(P){Uc(e,n,P)}}function Wp(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(o){tm(e,n,o)},function(o){return Uc(e,n,o)}):tm(e,n,l)}function tm(e,n,l){n.status="fulfilled",n.value=l,em(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,Jp(e,l)))}function Uc(e,n,l){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=l,em(n),n=n.next;while(n!==o)}e.action=null}function em(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function nm(e,n){return n}function im(e,n){if(Ht){var l=Pt.formState;if(l!==null){t:{var o=Tt;if(Ht){if(te){e:{for(var f=te,p=hn;f.nodeType!==8;){if(!p){f=null;break e}if(f=mn(f.nextSibling),f===null){f=null;break e}}p=f.data,f=p==="F!"||p==="F"?f:null}if(f){te=mn(f.nextSibling),o=f.data==="F!";break t}}_i(o)}o=!1}o&&(n=l[0])}}return l=Re(),l.memoizedState=l.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nm,lastRenderedState:n},l.queue=o,l=wm.bind(null,Tt,o),o.dispatch=l,o=Bc(!1),p=Xc.bind(null,Tt,!1,o.queue),o=Re(),f={state:n,dispatch:null,action:e,pending:null},o.queue=f,l=hS.bind(null,Tt,f,p,l),f.dispatch=l,o.memoizedState=e,[n,l,!1]}function rm(e){var n=ce();return lm(n,Ft,e)}function lm(e,n,l){if(n=Hc(e,n,nm)[0],e=Jo(ni)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=aa(n)}catch(b){throw b===Jr?Io:b}else o=n;n=ce();var f=n.queue,p=f.dispatch;return l!==n.memoizedState&&(Tt.flags|=2048,il(9,{destroy:void 0},pS.bind(null,f,l),null)),[o,p,e]}function pS(e,n){e.action=n}function am(e){var n=ce(),l=Ft;if(l!==null)return lm(n,l,e);ce(),n=n.memoizedState,l=ce();var o=l.queue.dispatch;return l.memoizedState=e,[n,o,!1]}function il(e,n,l,o){return e={tag:e,create:l,deps:o,inst:n,next:null},n=Tt.updateQueue,n===null&&(n=$o(),Tt.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=e.next=e:(o=l.next,l.next=e,e.next=o,n.lastEffect=e),e}function om(){return ce().memoizedState}function Wo(e,n,l,o){var f=Re();Tt.flags|=e,f.memoizedState=il(1|n,{destroy:void 0},l,o===void 0?null:o)}function ts(e,n,l,o){var f=ce();o=o===void 0?null:o;var p=f.memoizedState.inst;Ft!==null&&o!==null&&zc(o,Ft.memoizedState.deps)?f.memoizedState=il(n,p,l,o):(Tt.flags|=e,f.memoizedState=il(1|n,p,l,o))}function sm(e,n){Wo(8390656,8,e,n)}function qc(e,n){ts(2048,8,e,n)}function mS(e){Tt.flags|=4;var n=Tt.updateQueue;if(n===null)n=$o(),Tt.updateQueue=n,n.events=[e];else{var l=n.events;l===null?n.events=[e]:l.push(e)}}function um(e){var n=ce().memoizedState;return mS({ref:n,nextImpl:e}),function(){if((Yt&2)!==0)throw Error(a(440));return n.impl.apply(void 0,arguments)}}function cm(e,n){return ts(4,2,e,n)}function fm(e,n){return ts(4,4,e,n)}function dm(e,n){if(typeof n=="function"){e=e();var l=n(e);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function hm(e,n,l){l=l!=null?l.concat([e]):null,ts(4,4,dm.bind(null,n,e),l)}function Vc(){}function pm(e,n){var l=ce();n=n===void 0?null:n;var o=l.memoizedState;return n!==null&&zc(n,o[1])?o[0]:(l.memoizedState=[e,n],e)}function mm(e,n){var l=ce();n=n===void 0?null:n;var o=l.memoizedState;if(n!==null&&zc(n,o[1]))return o[0];if(o=e(),mr){Me(!0);try{e()}finally{Me(!1)}}return l.memoizedState=[o,n],o}function Ic(e,n,l){return l===void 0||(ei&1073741824)!==0&&(Rt&261930)===0?e.memoizedState=n:(e.memoizedState=l,e=gg(),Tt.lanes|=e,Ri|=e,l)}function gm(e,n,l,o){return Pe(l,n)?l:tl.current!==null?(e=Ic(e,l,o),Pe(e,n)||(pe=!0),e):(ei&42)===0||(ei&1073741824)!==0&&(Rt&261930)===0?(pe=!0,e.memoizedState=l):(e=gg(),Tt.lanes|=e,Ri|=e,n)}function ym(e,n,l,o,f){var p=B.p;B.p=p!==0&&8>p?p:8;var b=z.T,N={};z.T=N,Xc(e,!1,n,l);try{var q=f(),P=z.S;if(P!==null&&P(N,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var rt=cS(q,o);oa(e,n,rt,rn(e))}else oa(e,n,o,rn(e))}catch(ot){oa(e,n,{then:function(){},status:"rejected",reason:ot},rn())}finally{B.p=p,b!==null&&N.types!==null&&(b.types=N.types),z.T=b}}function gS(){}function Yc(e,n,l,o){if(e.tag!==5)throw Error(a(476));var f=xm(e).queue;ym(e,f,n,Y,l===null?gS:function(){return vm(e),l(o)})}function xm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:Y,baseState:Y,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ni,lastRenderedState:Y},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ni,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function vm(e){var n=xm(e);n.next===null&&(n=e.alternate.memoizedState),oa(e,n.next.queue,{},rn())}function Qc(){return Ce(Ca)}function bm(){return ce().memoizedState}function Sm(){return ce().memoizedState}function yS(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=rn();e=Ai(l);var o=Mi(n,e,l);o!==null&&(Ye(o,n,l),na(o,n,l)),n={cache:vc()},e.payload=n;return}n=n.return}}function xS(e,n,l){var o=rn();l={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},es(e)?Em(n,l):(l=sc(e,n,l,o),l!==null&&(Ye(l,e,o),Cm(l,n,o)))}function wm(e,n,l){var o=rn();oa(e,n,l,o)}function oa(e,n,l,o){var f={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(es(e))Em(n,f);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var b=n.lastRenderedState,N=p(b,l);if(f.hasEagerState=!0,f.eagerState=N,Pe(N,b))return jo(e,n,f,0),Pt===null&&Ro(),!1}catch{}if(l=sc(e,n,f,o),l!==null)return Ye(l,e,o),Cm(l,n,o),!0}return!1}function Xc(e,n,l,o){if(o={lane:2,revertLane:Cf(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},es(e)){if(n)throw Error(a(479))}else n=sc(e,l,o,2),n!==null&&Ye(n,e,2)}function es(e){var n=e.alternate;return e===Tt||n!==null&&n===Tt}function Em(e,n){el=Fo=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function Cm(e,n,l){if((l&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,l|=o,n.lanes=l,po(e,l)}}var sa={readContext:Ce,use:Po,useCallback:le,useContext:le,useEffect:le,useImperativeHandle:le,useLayoutEffect:le,useInsertionEffect:le,useMemo:le,useReducer:le,useRef:le,useState:le,useDebugValue:le,useDeferredValue:le,useTransition:le,useSyncExternalStore:le,useId:le,useHostTransitionStatus:le,useFormState:le,useActionState:le,useOptimistic:le,useMemoCache:le,useCacheRefresh:le};sa.useEffectEvent=le;var _m={readContext:Ce,use:Po,useCallback:function(e,n){return Re().memoizedState=[e,n===void 0?null:n],e},useContext:Ce,useEffect:sm,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,Wo(4194308,4,dm.bind(null,n,e),l)},useLayoutEffect:function(e,n){return Wo(4194308,4,e,n)},useInsertionEffect:function(e,n){Wo(4,2,e,n)},useMemo:function(e,n){var l=Re();n=n===void 0?null:n;var o=e();if(mr){Me(!0);try{e()}finally{Me(!1)}}return l.memoizedState=[o,n],o},useReducer:function(e,n,l){var o=Re();if(l!==void 0){var f=l(n);if(mr){Me(!0);try{l(n)}finally{Me(!1)}}}else f=n;return o.memoizedState=o.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},o.queue=e,e=e.dispatch=xS.bind(null,Tt,e),[o.memoizedState,e]},useRef:function(e){var n=Re();return e={current:e},n.memoizedState=e},useState:function(e){e=Bc(e);var n=e.queue,l=wm.bind(null,Tt,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:Vc,useDeferredValue:function(e,n){var l=Re();return Ic(l,e,n)},useTransition:function(){var e=Bc(!1);return e=ym.bind(null,Tt,e.queue,!0,!1),Re().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var o=Tt,f=Re();if(Ht){if(l===void 0)throw Error(a(407));l=l()}else{if(l=n(),Pt===null)throw Error(a(349));(Rt&127)!==0||Gp(o,n,l)}f.memoizedState=l;var p={value:l,getSnapshot:n};return f.queue=p,sm(Fp.bind(null,o,p,e),[e]),o.flags|=2048,il(9,{destroy:void 0},Zp.bind(null,o,p,l,n),null),l},useId:function(){var e=Re(),n=Pt.identifierPrefix;if(Ht){var l=kn,o=Dn;l=(o&~(1<<32-Xt(o)-1)).toString(32)+l,n="_"+n+"R_"+l,l=Ko++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=fS++,n="_"+n+"r_"+l.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Qc,useFormState:im,useActionState:im,useOptimistic:function(e){var n=Re();n.memoizedState=n.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=Xc.bind(null,Tt,!0,l),l.dispatch=n,[e,n]},useMemoCache:jc,useCacheRefresh:function(){return Re().memoizedState=yS.bind(null,Tt)},useEffectEvent:function(e){var n=Re(),l={impl:e};return n.memoizedState=l,function(){if((Yt&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},Gc={readContext:Ce,use:Po,useCallback:pm,useContext:Ce,useEffect:qc,useImperativeHandle:hm,useInsertionEffect:cm,useLayoutEffect:fm,useMemo:mm,useReducer:Jo,useRef:om,useState:function(){return Jo(ni)},useDebugValue:Vc,useDeferredValue:function(e,n){var l=ce();return gm(l,Ft.memoizedState,e,n)},useTransition:function(){var e=Jo(ni)[0],n=ce().memoizedState;return[typeof e=="boolean"?e:aa(e),n]},useSyncExternalStore:Xp,useId:bm,useHostTransitionStatus:Qc,useFormState:rm,useActionState:rm,useOptimistic:function(e,n){var l=ce();return Pp(l,Ft,e,n)},useMemoCache:jc,useCacheRefresh:Sm};Gc.useEffectEvent=um;var Nm={readContext:Ce,use:Po,useCallback:pm,useContext:Ce,useEffect:qc,useImperativeHandle:hm,useInsertionEffect:cm,useLayoutEffect:fm,useMemo:mm,useReducer:Lc,useRef:om,useState:function(){return Lc(ni)},useDebugValue:Vc,useDeferredValue:function(e,n){var l=ce();return Ft===null?Ic(l,e,n):gm(l,Ft.memoizedState,e,n)},useTransition:function(){var e=Lc(ni)[0],n=ce().memoizedState;return[typeof e=="boolean"?e:aa(e),n]},useSyncExternalStore:Xp,useId:bm,useHostTransitionStatus:Qc,useFormState:am,useActionState:am,useOptimistic:function(e,n){var l=ce();return Ft!==null?Pp(l,Ft,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:jc,useCacheRefresh:Sm};Nm.useEffectEvent=um;function Zc(e,n,l,o){n=e.memoizedState,l=l(o,n),l=l==null?n:y({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Fc={enqueueSetState:function(e,n,l){e=e._reactInternals;var o=rn(),f=Ai(o);f.payload=n,l!=null&&(f.callback=l),n=Mi(e,f,o),n!==null&&(Ye(n,e,o),na(n,e,o))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var o=rn(),f=Ai(o);f.tag=1,f.payload=n,l!=null&&(f.callback=l),n=Mi(e,f,o),n!==null&&(Ye(n,e,o),na(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=rn(),o=Ai(l);o.tag=2,n!=null&&(o.callback=n),n=Mi(e,o,l),n!==null&&(Ye(n,e,l),na(n,e,l))}};function Tm(e,n,l,o,f,p,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,p,b):n.prototype&&n.prototype.isPureReactComponent?!Fl(l,o)||!Fl(f,p):!0}function Am(e,n,l,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,o),n.state!==e&&Fc.enqueueReplaceState(n,n.state,null)}function gr(e,n){var l=n;if("ref"in n){l={};for(var o in n)o!=="ref"&&(l[o]=n[o])}if(e=e.defaultProps){l===n&&(l=y({},l));for(var f in e)l[f]===void 0&&(l[f]=e[f])}return l}function Mm(e){ko(e)}function zm(e){console.error(e)}function Om(e){ko(e)}function ns(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function Dm(e,n,l){try{var o=e.onCaughtError;o(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Kc(e,n,l){return l=Ai(l),l.tag=3,l.payload={element:null},l.callback=function(){ns(e,n)},l}function km(e){return e=Ai(e),e.tag=3,e}function Rm(e,n,l,o){var f=l.type.getDerivedStateFromError;if(typeof f=="function"){var p=o.value;e.payload=function(){return f(p)},e.callback=function(){Dm(n,l,o)}}var b=l.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){Dm(n,l,o),typeof f!="function"&&(ji===null?ji=new Set([this]):ji.add(this));var N=o.stack;this.componentDidCatch(o.value,{componentStack:N!==null?N:""})})}function vS(e,n,l,o,f){if(l.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=l.alternate,n!==null&&Kr(n,l,f,!0),l=We.current,l!==null){switch(l.tag){case 31:case 13:return pn===null?ps():l.alternate===null&&ae===0&&(ae=3),l.flags&=-257,l.flags|=65536,l.lanes=f,o===Yo?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([o]):n.add(o),Sf(e,o,f)),!1;case 22:return l.flags|=65536,o===Yo?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([o]):l.add(o)),Sf(e,o,f)),!1}throw Error(a(435,l.tag))}return Sf(e,o,f),ps(),!1}if(Ht)return n=We.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,o!==pc&&(e=Error(a(422),{cause:o}),Pl(cn(e,l)))):(o!==pc&&(n=Error(a(423),{cause:o}),Pl(cn(n,l))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,o=cn(o,l),f=Kc(e.stateNode,o,f),_c(e,f),ae!==4&&(ae=2)),!1;var p=Error(a(520),{cause:o});if(p=cn(p,l),ga===null?ga=[p]:ga.push(p),ae!==4&&(ae=2),n===null)return!0;o=cn(o,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=f&-f,l.lanes|=e,e=Kc(l.stateNode,o,e),_c(l,e),!1;case 1:if(n=l.type,p=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(ji===null||!ji.has(p))))return l.flags|=65536,f&=-f,l.lanes|=f,f=km(f),Rm(f,e,l,o),_c(l,f),!1}l=l.return}while(l!==null);return!1}var $c=Error(a(461)),pe=!1;function _e(e,n,l,o){n.child=e===null?Bp(n,null,l,o):pr(n,e.child,l,o)}function jm(e,n,l,o,f){l=l.render;var p=n.ref;if("ref"in o){var b={};for(var N in o)N!=="ref"&&(b[N]=o[N])}else b=o;return cr(n),o=Oc(e,n,l,b,p,f),N=Dc(),e!==null&&!pe?(kc(e,n,f),ii(e,n,f)):(Ht&&N&&dc(n),n.flags|=1,_e(e,n,o,f),n.child)}function Hm(e,n,l,o,f){if(e===null){var p=l.type;return typeof p=="function"&&!uc(p)&&p.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=p,Lm(e,n,p,o,f)):(e=Lo(l.type,null,o,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(p=e.child,!lf(e,f)){var b=p.memoizedProps;if(l=l.compare,l=l!==null?l:Fl,l(b,o)&&e.ref===n.ref)return ii(e,n,f)}return n.flags|=1,e=Pn(p,o),e.ref=n.ref,e.return=n,n.child=e}function Lm(e,n,l,o,f){if(e!==null){var p=e.memoizedProps;if(Fl(p,o)&&e.ref===n.ref)if(pe=!1,n.pendingProps=o=p,lf(e,f))(e.flags&131072)!==0&&(pe=!0);else return n.lanes=e.lanes,ii(e,n,f)}return Pc(e,n,l,o,f)}function Bm(e,n,l,o){var f=o.children,p=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(p=p!==null?p.baseLanes|l:l,e!==null){for(o=n.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~p}else o=0,n.child=null;return Um(e,n,p,l,o)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Vo(n,p!==null?p.cachePool:null),p!==null?Vp(n,p):Tc(),Ip(n);else return o=n.lanes=536870912,Um(e,n,p!==null?p.baseLanes|l:l,l,o)}else p!==null?(Vo(n,p.cachePool),Vp(n,p),Oi(),n.memoizedState=null):(e!==null&&Vo(n,null),Tc(),Oi());return _e(e,n,f,l),n.child}function ua(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Um(e,n,l,o,f){var p=Sc();return p=p===null?null:{parent:de._currentValue,pool:p},n.memoizedState={baseLanes:l,cachePool:p},e!==null&&Vo(n,null),Tc(),Ip(n),e!==null&&Kr(e,n,o,!0),n.childLanes=f,null}function is(e,n){return n=ls({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function qm(e,n,l){return pr(n,e.child,null,l),e=is(n,n.pendingProps),e.flags|=2,tn(n),n.memoizedState=null,e}function bS(e,n,l){var o=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ht){if(o.mode==="hidden")return e=is(n,o),n.lanes=536870912,ua(null,e);if(Mc(n),(e=te)?(e=Jg(e,hn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ei!==null?{id:Dn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},l=Ep(e),l.return=n,n.child=l,Ee=n,te=null)):e=null,e===null)throw _i(n);return n.lanes=536870912,null}return is(n,o)}var p=e.memoizedState;if(p!==null){var b=p.dehydrated;if(Mc(n),f)if(n.flags&256)n.flags&=-257,n=qm(e,n,l);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(a(558));else if(pe||Kr(e,n,l,!1),f=(l&e.childLanes)!==0,pe||f){if(o=Pt,o!==null&&(b=mo(o,l),b!==0&&b!==p.retryLane))throw p.retryLane=b,ar(e,b),Ye(o,e,b),$c;ps(),n=qm(e,n,l)}else e=p.treeContext,te=mn(b.nextSibling),Ee=n,Ht=!0,Ci=null,hn=!1,e!==null&&Np(n,e),n=is(n,o),n.flags|=4096;return n}return e=Pn(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function rs(e,n){var l=n.ref;if(l===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(e===null||e.ref!==l)&&(n.flags|=4194816)}}function Pc(e,n,l,o,f){return cr(n),l=Oc(e,n,l,o,void 0,f),o=Dc(),e!==null&&!pe?(kc(e,n,f),ii(e,n,f)):(Ht&&o&&dc(n),n.flags|=1,_e(e,n,l,f),n.child)}function Vm(e,n,l,o,f,p){return cr(n),n.updateQueue=null,l=Qp(n,o,l,f),Yp(e),o=Dc(),e!==null&&!pe?(kc(e,n,p),ii(e,n,p)):(Ht&&o&&dc(n),n.flags|=1,_e(e,n,l,p),n.child)}function Im(e,n,l,o,f){if(cr(n),n.stateNode===null){var p=Xr,b=l.contextType;typeof b=="object"&&b!==null&&(p=Ce(b)),p=new l(o,p),n.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Fc,n.stateNode=p,p._reactInternals=n,p=n.stateNode,p.props=o,p.state=n.memoizedState,p.refs={},Ec(n),b=l.contextType,p.context=typeof b=="object"&&b!==null?Ce(b):Xr,p.state=n.memoizedState,b=l.getDerivedStateFromProps,typeof b=="function"&&(Zc(n,l,b,o),p.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(b=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),b!==p.state&&Fc.enqueueReplaceState(p,p.state,null),ra(n,o,p,f),ia(),p.state=n.memoizedState),typeof p.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){p=n.stateNode;var N=n.memoizedProps,q=gr(l,N);p.props=q;var P=p.context,rt=l.contextType;b=Xr,typeof rt=="object"&&rt!==null&&(b=Ce(rt));var ot=l.getDerivedStateFromProps;rt=typeof ot=="function"||typeof p.getSnapshotBeforeUpdate=="function",N=n.pendingProps!==N,rt||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(N||P!==b)&&Am(n,p,o,b),Ti=!1;var W=n.memoizedState;p.state=W,ra(n,o,p,f),ia(),P=n.memoizedState,N||W!==P||Ti?(typeof ot=="function"&&(Zc(n,l,ot,o),P=n.memoizedState),(q=Ti||Tm(n,l,q,o,W,P,b))?(rt||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(n.flags|=4194308)):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=P),p.props=o,p.state=P,p.context=b,o=q):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{p=n.stateNode,Cc(e,n),b=n.memoizedProps,rt=gr(l,b),p.props=rt,ot=n.pendingProps,W=p.context,P=l.contextType,q=Xr,typeof P=="object"&&P!==null&&(q=Ce(P)),N=l.getDerivedStateFromProps,(P=typeof N=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(b!==ot||W!==q)&&Am(n,p,o,q),Ti=!1,W=n.memoizedState,p.state=W,ra(n,o,p,f),ia();var tt=n.memoizedState;b!==ot||W!==tt||Ti||e!==null&&e.dependencies!==null&&Uo(e.dependencies)?(typeof N=="function"&&(Zc(n,l,N,o),tt=n.memoizedState),(rt=Ti||Tm(n,l,rt,o,W,tt,q)||e!==null&&e.dependencies!==null&&Uo(e.dependencies))?(P||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(o,tt,q),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(o,tt,q)),typeof p.componentDidUpdate=="function"&&(n.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof p.componentDidUpdate!="function"||b===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&W===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=tt),p.props=o,p.state=tt,p.context=q,o=rt):(typeof p.componentDidUpdate!="function"||b===e.memoizedProps&&W===e.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&W===e.memoizedState||(n.flags|=1024),o=!1)}return p=o,rs(e,n),o=(n.flags&128)!==0,p||o?(p=n.stateNode,l=o&&typeof l.getDerivedStateFromError!="function"?null:p.render(),n.flags|=1,e!==null&&o?(n.child=pr(n,e.child,null,f),n.child=pr(n,null,l,f)):_e(e,n,l,f),n.memoizedState=p.state,e=n.child):e=ii(e,n,f),e}function Ym(e,n,l,o){return sr(),n.flags|=256,_e(e,n,l,o),n.child}var Jc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Wc(e){return{baseLanes:e,cachePool:Dp()}}function tf(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=nn),e}function Qm(e,n,l){var o=n.pendingProps,f=!1,p=(n.flags&128)!==0,b;if((b=p)||(b=e!==null&&e.memoizedState===null?!1:(ue.current&2)!==0),b&&(f=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ht){if(f?zi(n):Oi(),(e=te)?(e=Jg(e,hn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ei!==null?{id:Dn,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},l=Ep(e),l.return=n,n.child=l,Ee=n,te=null)):e=null,e===null)throw _i(n);return Lf(e)?n.lanes=32:n.lanes=536870912,null}var N=o.children;return o=o.fallback,f?(Oi(),f=n.mode,N=ls({mode:"hidden",children:N},f),o=or(o,f,l,null),N.return=n,o.return=n,N.sibling=o,n.child=N,o=n.child,o.memoizedState=Wc(l),o.childLanes=tf(e,b,l),n.memoizedState=Jc,ua(null,o)):(zi(n),ef(n,N))}var q=e.memoizedState;if(q!==null&&(N=q.dehydrated,N!==null)){if(p)n.flags&256?(zi(n),n.flags&=-257,n=nf(e,n,l)):n.memoizedState!==null?(Oi(),n.child=e.child,n.flags|=128,n=null):(Oi(),N=o.fallback,f=n.mode,o=ls({mode:"visible",children:o.children},f),N=or(N,f,l,null),N.flags|=2,o.return=n,N.return=n,o.sibling=N,n.child=o,pr(n,e.child,null,l),o=n.child,o.memoizedState=Wc(l),o.childLanes=tf(e,b,l),n.memoizedState=Jc,n=ua(null,o));else if(zi(n),Lf(N)){if(b=N.nextSibling&&N.nextSibling.dataset,b)var P=b.dgst;b=P,o=Error(a(419)),o.stack="",o.digest=b,Pl({value:o,source:null,stack:null}),n=nf(e,n,l)}else if(pe||Kr(e,n,l,!1),b=(l&e.childLanes)!==0,pe||b){if(b=Pt,b!==null&&(o=mo(b,l),o!==0&&o!==q.retryLane))throw q.retryLane=o,ar(e,o),Ye(b,e,o),$c;Hf(N)||ps(),n=nf(e,n,l)}else Hf(N)?(n.flags|=192,n.child=e.child,n=null):(e=q.treeContext,te=mn(N.nextSibling),Ee=n,Ht=!0,Ci=null,hn=!1,e!==null&&Np(n,e),n=ef(n,o.children),n.flags|=4096);return n}return f?(Oi(),N=o.fallback,f=n.mode,q=e.child,P=q.sibling,o=Pn(q,{mode:"hidden",children:o.children}),o.subtreeFlags=q.subtreeFlags&65011712,P!==null?N=Pn(P,N):(N=or(N,f,l,null),N.flags|=2),N.return=n,o.return=n,o.sibling=N,n.child=o,ua(null,o),o=n.child,N=e.child.memoizedState,N===null?N=Wc(l):(f=N.cachePool,f!==null?(q=de._currentValue,f=f.parent!==q?{parent:q,pool:q}:f):f=Dp(),N={baseLanes:N.baseLanes|l,cachePool:f}),o.memoizedState=N,o.childLanes=tf(e,b,l),n.memoizedState=Jc,ua(e.child,o)):(zi(n),l=e.child,e=l.sibling,l=Pn(l,{mode:"visible",children:o.children}),l.return=n,l.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=l,n.memoizedState=null,l)}function ef(e,n){return n=ls({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function ls(e,n){return e=Je(22,e,null,n),e.lanes=0,e}function nf(e,n,l){return pr(n,e.child,null,l),e=ef(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Xm(e,n,l){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),yc(e.return,n,l)}function rf(e,n,l,o,f,p){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:l,tailMode:f,treeForkCount:p}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=o,b.tail=l,b.tailMode=f,b.treeForkCount=p)}function Gm(e,n,l){var o=n.pendingProps,f=o.revealOrder,p=o.tail;o=o.children;var b=ue.current,N=(b&2)!==0;if(N?(b=b&1|2,n.flags|=128):b&=1,T(ue,b),_e(e,n,o,l),o=Ht?$l:0,!N&&e!==null&&(e.flags&128)!==0)t:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xm(e,l,n);else if(e.tag===19)Xm(e,l,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break t;for(;e.sibling===null;){if(e.return===null||e.return===n)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(l=n.child,f=null;l!==null;)e=l.alternate,e!==null&&Zo(e)===null&&(f=l),l=l.sibling;l=f,l===null?(f=n.child,n.child=null):(f=l.sibling,l.sibling=null),rf(n,!1,f,l,p,o);break;case"backwards":case"unstable_legacy-backwards":for(l=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&Zo(e)===null){n.child=f;break}e=f.sibling,f.sibling=l,l=f,f=e}rf(n,!0,l,null,p,o);break;case"together":rf(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function ii(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),Ri|=n.lanes,(l&n.childLanes)===0)if(e!==null){if(Kr(e,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(a(153));if(n.child!==null){for(e=n.child,l=Pn(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=Pn(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function lf(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Uo(e)))}function SS(e,n,l){switch(n.tag){case 3:st(n,n.stateNode.containerInfo),Ni(n,de,e.memoizedState.cache),sr();break;case 27:case 5:wt(n);break;case 4:st(n,n.stateNode.containerInfo);break;case 10:Ni(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Mc(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(zi(n),n.flags|=128,null):(l&n.child.childLanes)!==0?Qm(e,n,l):(zi(n),e=ii(e,n,l),e!==null?e.sibling:null);zi(n);break;case 19:var f=(e.flags&128)!==0;if(o=(l&n.childLanes)!==0,o||(Kr(e,n,l,!1),o=(l&n.childLanes)!==0),f){if(o)return Gm(e,n,l);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),T(ue,ue.current),o)break;return null;case 22:return n.lanes=0,Bm(e,n,l,n.pendingProps);case 24:Ni(n,de,e.memoizedState.cache)}return ii(e,n,l)}function Zm(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)pe=!0;else{if(!lf(e,l)&&(n.flags&128)===0)return pe=!1,SS(e,n,l);pe=(e.flags&131072)!==0}else pe=!1,Ht&&(n.flags&1048576)!==0&&_p(n,$l,n.index);switch(n.lanes=0,n.tag){case 16:t:{var o=n.pendingProps;if(e=dr(n.elementType),n.type=e,typeof e=="function")uc(e)?(o=gr(e,o),n.tag=1,n=Im(null,n,e,o,l)):(n.tag=0,n=Pc(null,n,e,o,l));else{if(e!=null){var f=e.$$typeof;if(f===k){n.tag=11,n=jm(null,n,e,o,l);break t}else if(f===H){n.tag=14,n=Hm(null,n,e,o,l);break t}}throw n=R(e)||e,Error(a(306,n,""))}}return n;case 0:return Pc(e,n,n.type,n.pendingProps,l);case 1:return o=n.type,f=gr(o,n.pendingProps),Im(e,n,o,f,l);case 3:t:{if(st(n,n.stateNode.containerInfo),e===null)throw Error(a(387));o=n.pendingProps;var p=n.memoizedState;f=p.element,Cc(e,n),ra(n,o,null,l);var b=n.memoizedState;if(o=b.cache,Ni(n,de,o),o!==p.cache&&xc(n,[de],l,!0),ia(),o=b.element,p.isDehydrated)if(p={element:o,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){n=Ym(e,n,o,l);break t}else if(o!==f){f=cn(Error(a(424)),n),Pl(f),n=Ym(e,n,o,l);break t}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,te=mn(e.firstChild),Ee=n,Ht=!0,Ci=null,hn=!0,l=Bp(n,null,o,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(sr(),o===f){n=ii(e,n,l);break t}_e(e,n,o,l)}n=n.child}return n;case 26:return rs(e,n),e===null?(l=ry(n.type,null,n.pendingProps,null))?n.memoizedState=l:Ht||(l=n.type,e=n.pendingProps,o=Ss(ct.current).createElement(l),o[ve]=n,o[ze]=e,Ne(o,l,e),fe(o),n.stateNode=o):n.memoizedState=ry(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return wt(n),e===null&&Ht&&(o=n.stateNode=ey(n.type,n.pendingProps,ct.current),Ee=n,hn=!0,f=te,Ui(n.type)?(Bf=f,te=mn(o.firstChild)):te=f),_e(e,n,n.pendingProps.children,l),rs(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ht&&((f=o=te)&&(o=PS(o,n.type,n.pendingProps,hn),o!==null?(n.stateNode=o,Ee=n,te=mn(o.firstChild),hn=!1,f=!0):f=!1),f||_i(n)),wt(n),f=n.type,p=n.pendingProps,b=e!==null?e.memoizedProps:null,o=p.children,kf(f,p)?o=null:b!==null&&kf(f,b)&&(n.flags|=32),n.memoizedState!==null&&(f=Oc(e,n,dS,null,null,l),Ca._currentValue=f),rs(e,n),_e(e,n,o,l),n.child;case 6:return e===null&&Ht&&((e=l=te)&&(l=JS(l,n.pendingProps,hn),l!==null?(n.stateNode=l,Ee=n,te=null,e=!0):e=!1),e||_i(n)),null;case 13:return Qm(e,n,l);case 4:return st(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=pr(n,null,o,l):_e(e,n,o,l),n.child;case 11:return jm(e,n,n.type,n.pendingProps,l);case 7:return _e(e,n,n.pendingProps,l),n.child;case 8:return _e(e,n,n.pendingProps.children,l),n.child;case 12:return _e(e,n,n.pendingProps.children,l),n.child;case 10:return o=n.pendingProps,Ni(n,n.type,o.value),_e(e,n,o.children,l),n.child;case 9:return f=n.type._context,o=n.pendingProps.children,cr(n),f=Ce(f),o=o(f),n.flags|=1,_e(e,n,o,l),n.child;case 14:return Hm(e,n,n.type,n.pendingProps,l);case 15:return Lm(e,n,n.type,n.pendingProps,l);case 19:return Gm(e,n,l);case 31:return bS(e,n,l);case 22:return Bm(e,n,l,n.pendingProps);case 24:return cr(n),o=Ce(de),e===null?(f=Sc(),f===null&&(f=Pt,p=vc(),f.pooledCache=p,p.refCount++,p!==null&&(f.pooledCacheLanes|=l),f=p),n.memoizedState={parent:o,cache:f},Ec(n),Ni(n,de,f)):((e.lanes&l)!==0&&(Cc(e,n),ra(n,null,null,l),ia()),f=e.memoizedState,p=n.memoizedState,f.parent!==o?(f={parent:o,cache:o},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),Ni(n,de,o)):(o=p.cache,Ni(n,de,o),o!==f.cache&&xc(n,[de],l,!0))),_e(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function ri(e){e.flags|=4}function af(e,n,l,o,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(bg())e.flags|=8192;else throw hr=Yo,wc}else e.flags&=-16777217}function Fm(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!uy(n))if(bg())e.flags|=8192;else throw hr=Yo,wc}function as(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?fo():536870912,e.lanes|=n,ol|=n)}function ca(e,n){if(!Ht)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var o=null;l!==null;)l.alternate!==null&&(o=l),l=l.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function ee(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,o=0;if(n)for(var f=e.child;f!==null;)l|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)l|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=o,e.childLanes=l,n}function wS(e,n,l){var o=n.pendingProps;switch(hc(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ee(n),null;case 1:return ee(n),null;case 3:return l=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),ti(de),pt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Fr(n)?ri(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,mc())),ee(n),null;case 26:var f=n.type,p=n.memoizedState;return e===null?(ri(n),p!==null?(ee(n),Fm(n,p)):(ee(n),af(n,f,null,o,l))):p?p!==e.memoizedState?(ri(n),ee(n),Fm(n,p)):(ee(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&ri(n),ee(n),af(n,f,e,o,l)),null;case 27:if(Ct(n),l=ct.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&ri(n);else{if(!o){if(n.stateNode===null)throw Error(a(166));return ee(n),null}e=nt.current,Fr(n)?Tp(n):(e=ey(f,o,l),n.stateNode=e,ri(n))}return ee(n),null;case 5:if(Ct(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&ri(n);else{if(!o){if(n.stateNode===null)throw Error(a(166));return ee(n),null}if(p=nt.current,Fr(n))Tp(n);else{var b=Ss(ct.current);switch(p){case 1:p=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:p=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":p=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":p=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":p=b.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof o.is=="string"?b.createElement("select",{is:o.is}):b.createElement("select"),o.multiple?p.multiple=!0:o.size&&(p.size=o.size);break;default:p=typeof o.is=="string"?b.createElement(f,{is:o.is}):b.createElement(f)}}p[ve]=n,p[ze]=o;t:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)p.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break t;for(;b.sibling===null;){if(b.return===null||b.return===n)break t;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=p;t:switch(Ne(p,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break t;case"img":o=!0;break t;default:o=!1}o&&ri(n)}}return ee(n),af(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&ri(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(a(166));if(e=ct.current,Fr(n)){if(e=n.stateNode,l=n.memoizedProps,o=null,f=Ee,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[ve]=n,e=!!(e.nodeValue===l||o!==null&&o.suppressHydrationWarning===!0||Qg(e.nodeValue,l)),e||_i(n,!0)}else e=Ss(e).createTextNode(o),e[ve]=n,n.stateNode=e}return ee(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(o=Fr(n),l!==null){if(e===null){if(!o)throw Error(a(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(557));e[ve]=n}else sr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ee(n),e=!1}else l=mc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return n.flags&256?(tn(n),n):(tn(n),null);if((n.flags&128)!==0)throw Error(a(558))}return ee(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Fr(n),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(a(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[ve]=n}else sr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ee(n),f=!1}else f=mc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(tn(n),n):(tn(n),null)}return tn(n),(n.flags&128)!==0?(n.lanes=l,n):(l=o!==null,e=e!==null&&e.memoizedState!==null,l&&(o=n.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==f&&(o.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),as(n,n.updateQueue),ee(n),null);case 4:return pt(),e===null&&Af(n.stateNode.containerInfo),ee(n),null;case 10:return ti(n.type),ee(n),null;case 19:if(V(ue),o=n.memoizedState,o===null)return ee(n),null;if(f=(n.flags&128)!==0,p=o.rendering,p===null)if(f)ca(o,!1);else{if(ae!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(p=Zo(e),p!==null){for(n.flags|=128,ca(o,!1),e=p.updateQueue,n.updateQueue=e,as(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)wp(l,e),l=l.sibling;return T(ue,ue.current&1|2),Ht&&Jn(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&xe()>fs&&(n.flags|=128,f=!0,ca(o,!1),n.lanes=4194304)}else{if(!f)if(e=Zo(p),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,as(n,e),ca(o,!0),o.tail===null&&o.tailMode==="hidden"&&!p.alternate&&!Ht)return ee(n),null}else 2*xe()-o.renderingStartTime>fs&&l!==536870912&&(n.flags|=128,f=!0,ca(o,!1),n.lanes=4194304);o.isBackwards?(p.sibling=n.child,n.child=p):(e=o.last,e!==null?e.sibling=p:n.child=p,o.last=p)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=xe(),e.sibling=null,l=ue.current,T(ue,f?l&1|2:l&1),Ht&&Jn(n,o.treeForkCount),e):(ee(n),null);case 22:case 23:return tn(n),Ac(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(l&536870912)!==0&&(n.flags&128)===0&&(ee(n),n.subtreeFlags&6&&(n.flags|=8192)):ee(n),l=n.updateQueue,l!==null&&as(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==l&&(n.flags|=2048),e!==null&&V(fr),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),ti(de),ee(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function ES(e,n){switch(hc(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ti(de),pt(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ct(n),null;case 31:if(n.memoizedState!==null){if(tn(n),n.alternate===null)throw Error(a(340));sr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(tn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(a(340));sr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return V(ue),null;case 4:return pt(),null;case 10:return ti(n.type),null;case 22:case 23:return tn(n),Ac(),e!==null&&V(fr),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ti(de),null;case 25:return null;default:return null}}function Km(e,n){switch(hc(n),n.tag){case 3:ti(de),pt();break;case 26:case 27:case 5:Ct(n);break;case 4:pt();break;case 31:n.memoizedState!==null&&tn(n);break;case 13:tn(n);break;case 19:V(ue);break;case 10:ti(n.type);break;case 22:case 23:tn(n),Ac(),e!==null&&V(fr);break;case 24:ti(de)}}function fa(e,n){try{var l=n.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var f=o.next;l=f;do{if((l.tag&e)===e){o=void 0;var p=l.create,b=l.inst;o=p(),b.destroy=o}l=l.next}while(l!==f)}}catch(N){Zt(n,n.return,N)}}function Di(e,n,l){try{var o=n.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var p=f.next;o=p;do{if((o.tag&e)===e){var b=o.inst,N=b.destroy;if(N!==void 0){b.destroy=void 0,f=n;var q=l,P=N;try{P()}catch(rt){Zt(f,q,rt)}}}o=o.next}while(o!==p)}}catch(rt){Zt(n,n.return,rt)}}function $m(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{qp(n,l)}catch(o){Zt(e,e.return,o)}}}function Pm(e,n,l){l.props=gr(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(o){Zt(e,n,o)}}function da(e,n){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof l=="function"?e.refCleanup=l(o):l.current=o}}catch(f){Zt(e,n,f)}}function Rn(e,n){var l=e.ref,o=e.refCleanup;if(l!==null)if(typeof o=="function")try{o()}catch(f){Zt(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(f){Zt(e,n,f)}else l.current=null}function Jm(e){var n=e.type,l=e.memoizedProps,o=e.stateNode;try{t:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break t;case"img":l.src?o.src=l.src:l.srcSet&&(o.srcset=l.srcSet)}}catch(f){Zt(e,e.return,f)}}function of(e,n,l){try{var o=e.stateNode;XS(o,e.type,l,n),o[ze]=n}catch(f){Zt(e,e.return,f)}}function Wm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ui(e.type)||e.tag===4}function sf(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||Wm(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&&Ui(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function uf(e,n,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Kn));else if(o!==4&&(o===27&&Ui(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(uf(e,n,l),e=e.sibling;e!==null;)uf(e,n,l),e=e.sibling}function os(e,n,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(o!==4&&(o===27&&Ui(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(os(e,n,l),e=e.sibling;e!==null;)os(e,n,l),e=e.sibling}function tg(e){var n=e.stateNode,l=e.memoizedProps;try{for(var o=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Ne(n,o,l),n[ve]=e,n[ze]=l}catch(p){Zt(e,e.return,p)}}var li=!1,me=!1,cf=!1,eg=typeof WeakSet=="function"?WeakSet:Set,Se=null;function CS(e,n){if(e=e.containerInfo,Of=As,e=hp(e),nc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else t:{l=(l=e.ownerDocument)&&l.defaultView||window;var o=l.getSelection&&l.getSelection();if(o&&o.rangeCount!==0){l=o.anchorNode;var f=o.anchorOffset,p=o.focusNode;o=o.focusOffset;try{l.nodeType,p.nodeType}catch{l=null;break t}var b=0,N=-1,q=-1,P=0,rt=0,ot=e,W=null;e:for(;;){for(var tt;ot!==l||f!==0&&ot.nodeType!==3||(N=b+f),ot!==p||o!==0&&ot.nodeType!==3||(q=b+o),ot.nodeType===3&&(b+=ot.nodeValue.length),(tt=ot.firstChild)!==null;)W=ot,ot=tt;for(;;){if(ot===e)break e;if(W===l&&++P===f&&(N=b),W===p&&++rt===o&&(q=b),(tt=ot.nextSibling)!==null)break;ot=W,W=ot.parentNode}ot=tt}l=N===-1||q===-1?null:{start:N,end:q}}else l=null}l=l||{start:0,end:0}}else l=null;for(Df={focusedElem:e,selectionRange:l},As=!1,Se=n;Se!==null;)if(n=Se,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Se=e;else for(;Se!==null;){switch(n=Se,p=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(l=0;l<e.length;l++)f=e[l],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&p!==null){e=void 0,l=n,f=p.memoizedProps,p=p.memoizedState,o=l.stateNode;try{var mt=gr(l.type,f);e=o.getSnapshotBeforeUpdate(mt,p),o.__reactInternalSnapshotBeforeUpdate=e}catch(St){Zt(l,l.return,St)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)jf(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":jf(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(a(163))}if(e=n.sibling,e!==null){e.return=n.return,Se=e;break}Se=n.return}}function ng(e,n,l){var o=l.flags;switch(l.tag){case 0:case 11:case 15:oi(e,l),o&4&&fa(5,l);break;case 1:if(oi(e,l),o&4)if(e=l.stateNode,n===null)try{e.componentDidMount()}catch(b){Zt(l,l.return,b)}else{var f=gr(l.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Zt(l,l.return,b)}}o&64&&$m(l),o&512&&da(l,l.return);break;case 3:if(oi(e,l),o&64&&(e=l.updateQueue,e!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{qp(e,n)}catch(b){Zt(l,l.return,b)}}break;case 27:n===null&&o&4&&tg(l);case 26:case 5:oi(e,l),n===null&&o&4&&Jm(l),o&512&&da(l,l.return);break;case 12:oi(e,l);break;case 31:oi(e,l),o&4&&lg(e,l);break;case 13:oi(e,l),o&4&&ag(e,l),o&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=kS.bind(null,l),WS(e,l))));break;case 22:if(o=l.memoizedState!==null||li,!o){n=n!==null&&n.memoizedState!==null||me,f=li;var p=me;li=o,(me=n)&&!p?si(e,l,(l.subtreeFlags&8772)!==0):oi(e,l),li=f,me=p}break;case 30:break;default:oi(e,l)}}function ig(e){var n=e.alternate;n!==null&&(e.alternate=null,ig(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Bl(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 ne=null,Ue=!1;function ai(e,n,l){for(l=l.child;l!==null;)rg(e,n,l),l=l.sibling}function rg(e,n,l){if(se&&typeof se.onCommitFiberUnmount=="function")try{se.onCommitFiberUnmount(we,l)}catch{}switch(l.tag){case 26:me||Rn(l,n),ai(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:me||Rn(l,n);var o=ne,f=Ue;Ui(l.type)&&(ne=l.stateNode,Ue=!1),ai(e,n,l),Sa(l.stateNode),ne=o,Ue=f;break;case 5:me||Rn(l,n);case 6:if(o=ne,f=Ue,ne=null,ai(e,n,l),ne=o,Ue=f,ne!==null)if(Ue)try{(ne.nodeType===9?ne.body:ne.nodeName==="HTML"?ne.ownerDocument.body:ne).removeChild(l.stateNode)}catch(p){Zt(l,n,p)}else try{ne.removeChild(l.stateNode)}catch(p){Zt(l,n,p)}break;case 18:ne!==null&&(Ue?(e=ne,$g(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ml(e)):$g(ne,l.stateNode));break;case 4:o=ne,f=Ue,ne=l.stateNode.containerInfo,Ue=!0,ai(e,n,l),ne=o,Ue=f;break;case 0:case 11:case 14:case 15:Di(2,l,n),me||Di(4,l,n),ai(e,n,l);break;case 1:me||(Rn(l,n),o=l.stateNode,typeof o.componentWillUnmount=="function"&&Pm(l,n,o)),ai(e,n,l);break;case 21:ai(e,n,l);break;case 22:me=(o=me)||l.memoizedState!==null,ai(e,n,l),me=o;break;default:ai(e,n,l)}}function lg(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ml(e)}catch(l){Zt(n,n.return,l)}}}function ag(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ml(e)}catch(l){Zt(n,n.return,l)}}function _S(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new eg),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new eg),n;default:throw Error(a(435,e.tag))}}function ss(e,n){var l=_S(e);n.forEach(function(o){if(!l.has(o)){l.add(o);var f=RS.bind(null,e,o);o.then(f,f)}})}function qe(e,n){var l=n.deletions;if(l!==null)for(var o=0;o<l.length;o++){var f=l[o],p=e,b=n,N=b;t:for(;N!==null;){switch(N.tag){case 27:if(Ui(N.type)){ne=N.stateNode,Ue=!1;break t}break;case 5:ne=N.stateNode,Ue=!1;break t;case 3:case 4:ne=N.stateNode.containerInfo,Ue=!0;break t}N=N.return}if(ne===null)throw Error(a(160));rg(p,b,f),ne=null,Ue=!1,p=f.alternate,p!==null&&(p.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)og(n,e),n=n.sibling}var En=null;function og(e,n){var l=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:qe(n,e),Ve(e),o&4&&(Di(3,e,e.return),fa(3,e),Di(5,e,e.return));break;case 1:qe(n,e),Ve(e),o&512&&(me||l===null||Rn(l,l.return)),o&64&&li&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?o:l.concat(o))));break;case 26:var f=En;if(qe(n,e),Ve(e),o&512&&(me||l===null||Rn(l,l.return)),o&4){var p=l!==null?l.memoizedState:null;if(o=e.memoizedState,l===null)if(o===null)if(e.stateNode===null){t:{o=e.type,l=e.memoizedProps,f=f.ownerDocument||f;e:switch(o){case"title":p=f.getElementsByTagName("title")[0],(!p||p[tr]||p[ve]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=f.createElement(o),f.head.insertBefore(p,f.querySelector("head > title"))),Ne(p,o,l),p[ve]=e,fe(p),o=p;break t;case"link":var b=oy("link","href",f).get(o+(l.href||""));if(b){for(var N=0;N<b.length;N++)if(p=b[N],p.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&p.getAttribute("rel")===(l.rel==null?null:l.rel)&&p.getAttribute("title")===(l.title==null?null:l.title)&&p.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){b.splice(N,1);break e}}p=f.createElement(o),Ne(p,o,l),f.head.appendChild(p);break;case"meta":if(b=oy("meta","content",f).get(o+(l.content||""))){for(N=0;N<b.length;N++)if(p=b[N],p.getAttribute("content")===(l.content==null?null:""+l.content)&&p.getAttribute("name")===(l.name==null?null:l.name)&&p.getAttribute("property")===(l.property==null?null:l.property)&&p.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&p.getAttribute("charset")===(l.charSet==null?null:l.charSet)){b.splice(N,1);break e}}p=f.createElement(o),Ne(p,o,l),f.head.appendChild(p);break;default:throw Error(a(468,o))}p[ve]=e,fe(p),o=p}e.stateNode=o}else sy(f,e.type,e.stateNode);else e.stateNode=ay(f,o,e.memoizedProps);else p!==o?(p===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):p.count--,o===null?sy(f,e.type,e.stateNode):ay(f,o,e.memoizedProps)):o===null&&e.stateNode!==null&&of(e,e.memoizedProps,l.memoizedProps)}break;case 27:qe(n,e),Ve(e),o&512&&(me||l===null||Rn(l,l.return)),l!==null&&o&4&&of(e,e.memoizedProps,l.memoizedProps);break;case 5:if(qe(n,e),Ve(e),o&512&&(me||l===null||Rn(l,l.return)),e.flags&32){f=e.stateNode;try{Br(f,"")}catch(mt){Zt(e,e.return,mt)}}o&4&&e.stateNode!=null&&(f=e.memoizedProps,of(e,f,l!==null?l.memoizedProps:f)),o&1024&&(cf=!0);break;case 6:if(qe(n,e),Ve(e),o&4){if(e.stateNode===null)throw Error(a(162));o=e.memoizedProps,l=e.stateNode;try{l.nodeValue=o}catch(mt){Zt(e,e.return,mt)}}break;case 3:if(Cs=null,f=En,En=ws(n.containerInfo),qe(n,e),En=f,Ve(e),o&4&&l!==null&&l.memoizedState.isDehydrated)try{ml(n.containerInfo)}catch(mt){Zt(e,e.return,mt)}cf&&(cf=!1,sg(e));break;case 4:o=En,En=ws(e.stateNode.containerInfo),qe(n,e),Ve(e),En=o;break;case 12:qe(n,e),Ve(e);break;case 31:qe(n,e),Ve(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,ss(e,o)));break;case 13:qe(n,e),Ve(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(cs=xe()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,ss(e,o)));break;case 22:f=e.memoizedState!==null;var q=l!==null&&l.memoizedState!==null,P=li,rt=me;if(li=P||f,me=rt||q,qe(n,e),me=rt,li=P,Ve(e),o&8192)t:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(l===null||q||li||me||yr(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){q=l=n;try{if(p=q.stateNode,f)b=p.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{N=q.stateNode;var ot=q.memoizedProps.style,W=ot!=null&&ot.hasOwnProperty("display")?ot.display:null;N.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(mt){Zt(q,q.return,mt)}}}else if(n.tag===6){if(l===null){q=n;try{q.stateNode.nodeValue=f?"":q.memoizedProps}catch(mt){Zt(q,q.return,mt)}}}else if(n.tag===18){if(l===null){q=n;try{var tt=q.stateNode;f?Pg(tt,!0):Pg(q.stateNode,!1)}catch(mt){Zt(q,q.return,mt)}}}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 t;for(;n.sibling===null;){if(n.return===null||n.return===e)break t;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(l=o.retryQueue,l!==null&&(o.retryQueue=null,ss(e,l))));break;case 19:qe(n,e),Ve(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,ss(e,o)));break;case 30:break;case 21:break;default:qe(n,e),Ve(e)}}function Ve(e){var n=e.flags;if(n&2){try{for(var l,o=e.return;o!==null;){if(Wm(o)){l=o;break}o=o.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var f=l.stateNode,p=sf(e);os(e,p,f);break;case 5:var b=l.stateNode;l.flags&32&&(Br(b,""),l.flags&=-33);var N=sf(e);os(e,N,b);break;case 3:case 4:var q=l.stateNode.containerInfo,P=sf(e);uf(e,P,q);break;default:throw Error(a(161))}}catch(rt){Zt(e,e.return,rt)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function sg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;sg(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function oi(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)ng(e,n.alternate,n),n=n.sibling}function yr(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Di(4,n,n.return),yr(n);break;case 1:Rn(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&Pm(n,n.return,l),yr(n);break;case 27:Sa(n.stateNode);case 26:case 5:Rn(n,n.return),yr(n);break;case 22:n.memoizedState===null&&yr(n);break;case 30:yr(n);break;default:yr(n)}e=e.sibling}}function si(e,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,f=e,p=n,b=p.flags;switch(p.tag){case 0:case 11:case 15:si(f,p,l),fa(4,p);break;case 1:if(si(f,p,l),o=p,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(P){Zt(o,o.return,P)}if(o=p,f=o.updateQueue,f!==null){var N=o.stateNode;try{var q=f.shared.hiddenCallbacks;if(q!==null)for(f.shared.hiddenCallbacks=null,f=0;f<q.length;f++)Up(q[f],N)}catch(P){Zt(o,o.return,P)}}l&&b&64&&$m(p),da(p,p.return);break;case 27:tg(p);case 26:case 5:si(f,p,l),l&&o===null&&b&4&&Jm(p),da(p,p.return);break;case 12:si(f,p,l);break;case 31:si(f,p,l),l&&b&4&&lg(f,p);break;case 13:si(f,p,l),l&&b&4&&ag(f,p);break;case 22:p.memoizedState===null&&si(f,p,l),da(p,p.return);break;case 30:break;default:si(f,p,l)}n=n.sibling}}function ff(e,n){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Jl(l))}function df(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Jl(e))}function Cn(e,n,l,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)ug(e,n,l,o),n=n.sibling}function ug(e,n,l,o){var f=n.flags;switch(n.tag){case 0:case 11:case 15:Cn(e,n,l,o),f&2048&&fa(9,n);break;case 1:Cn(e,n,l,o);break;case 3:Cn(e,n,l,o),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Jl(e)));break;case 12:if(f&2048){Cn(e,n,l,o),e=n.stateNode;try{var p=n.memoizedProps,b=p.id,N=p.onPostCommit;typeof N=="function"&&N(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(q){Zt(n,n.return,q)}}else Cn(e,n,l,o);break;case 31:Cn(e,n,l,o);break;case 13:Cn(e,n,l,o);break;case 23:break;case 22:p=n.stateNode,b=n.alternate,n.memoizedState!==null?p._visibility&2?Cn(e,n,l,o):ha(e,n):p._visibility&2?Cn(e,n,l,o):(p._visibility|=2,rl(e,n,l,o,(n.subtreeFlags&10256)!==0||!1)),f&2048&&ff(b,n);break;case 24:Cn(e,n,l,o),f&2048&&df(n.alternate,n);break;default:Cn(e,n,l,o)}}function rl(e,n,l,o,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var p=e,b=n,N=l,q=o,P=b.flags;switch(b.tag){case 0:case 11:case 15:rl(p,b,N,q,f),fa(8,b);break;case 23:break;case 22:var rt=b.stateNode;b.memoizedState!==null?rt._visibility&2?rl(p,b,N,q,f):ha(p,b):(rt._visibility|=2,rl(p,b,N,q,f)),f&&P&2048&&ff(b.alternate,b);break;case 24:rl(p,b,N,q,f),f&&P&2048&&df(b.alternate,b);break;default:rl(p,b,N,q,f)}n=n.sibling}}function ha(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=e,o=n,f=o.flags;switch(o.tag){case 22:ha(l,o),f&2048&&ff(o.alternate,o);break;case 24:ha(l,o),f&2048&&df(o.alternate,o);break;default:ha(l,o)}n=n.sibling}}var pa=8192;function ll(e,n,l){if(e.subtreeFlags&pa)for(e=e.child;e!==null;)cg(e,n,l),e=e.sibling}function cg(e,n,l){switch(e.tag){case 26:ll(e,n,l),e.flags&pa&&e.memoizedState!==null&&fw(l,En,e.memoizedState,e.memoizedProps);break;case 5:ll(e,n,l);break;case 3:case 4:var o=En;En=ws(e.stateNode.containerInfo),ll(e,n,l),En=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=pa,pa=16777216,ll(e,n,l),pa=o):ll(e,n,l));break;default:ll(e,n,l)}}function fg(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 ma(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var o=n[l];Se=o,hg(o,e)}fg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)dg(e),e=e.sibling}function dg(e){switch(e.tag){case 0:case 11:case 15:ma(e),e.flags&2048&&Di(9,e,e.return);break;case 3:ma(e);break;case 12:ma(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,us(e)):ma(e);break;default:ma(e)}}function us(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var o=n[l];Se=o,hg(o,e)}fg(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Di(8,n,n.return),us(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,us(n));break;default:us(n)}e=e.sibling}}function hg(e,n){for(;Se!==null;){var l=Se;switch(l.tag){case 0:case 11:case 15:Di(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var o=l.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Jl(l.memoizedState.cache)}if(o=l.child,o!==null)o.return=l,Se=o;else t:for(l=e;Se!==null;){o=Se;var f=o.sibling,p=o.return;if(ig(o),o===l){Se=null;break t}if(f!==null){f.return=p,Se=f;break t}Se=p}}}var NS={getCacheForType:function(e){var n=Ce(de),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l},cacheSignal:function(){return Ce(de).controller.signal}},TS=typeof WeakMap=="function"?WeakMap:Map,Yt=0,Pt=null,Dt=null,Rt=0,Gt=0,en=null,ki=!1,al=!1,hf=!1,ui=0,ae=0,Ri=0,xr=0,pf=0,nn=0,ol=0,ga=null,Ie=null,mf=!1,cs=0,pg=0,fs=1/0,ds=null,ji=null,be=0,Hi=null,sl=null,ci=0,gf=0,yf=null,mg=null,ya=0,xf=null;function rn(){return(Yt&2)!==0&&Rt!==0?Rt&-Rt:z.T!==null?Cf():go()}function gg(){if(nn===0)if((Rt&536870912)===0||Ht){var e=Or;Or<<=1,(Or&3932160)===0&&(Or=262144),nn=e}else nn=536870912;return e=We.current,e!==null&&(e.flags|=32),nn}function Ye(e,n,l){(e===Pt&&(Gt===2||Gt===9)||e.cancelPendingCommit!==null)&&(ul(e,0),Li(e,Rt,nn,!1)),Wi(e,l),((Yt&2)===0||e!==Pt)&&(e===Pt&&((Yt&2)===0&&(xr|=l),ae===4&&Li(e,Rt,nn,!1)),jn(e))}function yg(e,n,l){if((Yt&6)!==0)throw Error(a(327));var o=!l&&(n&127)===0&&(n&e.expiredLanes)===0||Ji(e,n),f=o?zS(e,n):bf(e,n,!0),p=o;do{if(f===0){al&&!o&&Li(e,n,0,!1);break}else{if(l=e.current.alternate,p&&!AS(l)){f=bf(e,n,!1),p=!1;continue}if(f===2){if(p=n,e.errorRecoveryDisabledLanes&p)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;t:{var N=e;f=ga;var q=N.current.memoizedState.isDehydrated;if(q&&(ul(N,b).flags|=256),b=bf(N,b,!1),b!==2){if(hf&&!q){N.errorRecoveryDisabledLanes|=p,xr|=p,f=4;break t}p=Ie,Ie=f,p!==null&&(Ie===null?Ie=p:Ie.push.apply(Ie,p))}f=b}if(p=!1,f!==2)continue}}if(f===1){ul(e,0),Li(e,n,0,!0);break}t:{switch(o=e,p=f,p){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:Li(o,n,nn,!ki);break t;case 2:Ie=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(f=cs+300-xe(),10<f)){if(Li(o,n,nn,!ki),kr(o,0,!0)!==0)break t;ci=n,o.timeoutHandle=Fg(xg.bind(null,o,l,Ie,ds,mf,n,nn,xr,ol,ki,p,"Throttled",-0,0),f);break t}xg(o,l,Ie,ds,mf,n,nn,xr,ol,ki,p,null,-0,0)}}break}while(!0);jn(e)}function xg(e,n,l,o,f,p,b,N,q,P,rt,ot,W,tt){if(e.timeoutHandle=-1,ot=n.subtreeFlags,ot&8192||(ot&16785408)===16785408){ot={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kn},cg(n,p,ot);var mt=(p&62914560)===p?cs-xe():(p&4194048)===p?pg-xe():0;if(mt=dw(ot,mt),mt!==null){ci=p,e.cancelPendingCommit=mt(Ng.bind(null,e,n,p,l,o,f,b,N,q,rt,ot,null,W,tt)),Li(e,p,b,!P);return}}Ng(e,n,p,l,o,f,b,N,q)}function AS(e){for(var n=e;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var o=0;o<l.length;o++){var f=l[o],p=f.getSnapshot;f=f.value;try{if(!Pe(p(),f))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;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 Li(e,n,l,o){n&=~pf,n&=~xr,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var f=n;0<f;){var p=31-Xt(f),b=1<<p;o[p]=-1,f&=~b}l!==0&&ho(e,l,n)}function hs(){return(Yt&6)===0?(xa(0),!1):!0}function vf(){if(Dt!==null){if(Gt===0)var e=Dt.return;else e=Dt,Wn=ur=null,Rc(e),Wr=null,ta=0,e=Dt;for(;e!==null;)Km(e.alternate,e),e=e.return;Dt=null}}function ul(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,FS(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ci=0,vf(),Pt=e,Dt=l=Pn(e.current,null),Rt=n,Gt=0,en=null,ki=!1,al=Ji(e,n),hf=!1,ol=nn=pf=xr=Ri=ae=0,Ie=ga=null,mf=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var f=31-Xt(o),p=1<<f;n|=e[f],o&=~p}return ui=n,Ro(),l}function vg(e,n){Tt=null,z.H=sa,n===Jr||n===Io?(n=jp(),Gt=3):n===wc?(n=jp(),Gt=4):Gt=n===$c?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,en=n,Dt===null&&(ae=1,ns(e,cn(n,e.current)))}function bg(){var e=We.current;return e===null?!0:(Rt&4194048)===Rt?pn===null:(Rt&62914560)===Rt||(Rt&536870912)!==0?e===pn:!1}function Sg(){var e=z.H;return z.H=sa,e===null?sa:e}function wg(){var e=z.A;return z.A=NS,e}function ps(){ae=4,ki||(Rt&4194048)!==Rt&&We.current!==null||(al=!0),(Ri&134217727)===0&&(xr&134217727)===0||Pt===null||Li(Pt,Rt,nn,!1)}function bf(e,n,l){var o=Yt;Yt|=2;var f=Sg(),p=wg();(Pt!==e||Rt!==n)&&(ds=null,ul(e,n)),n=!1;var b=ae;t:do try{if(Gt!==0&&Dt!==null){var N=Dt,q=en;switch(Gt){case 8:vf(),b=6;break t;case 3:case 2:case 9:case 6:We.current===null&&(n=!0);var P=Gt;if(Gt=0,en=null,cl(e,N,q,P),l&&al){b=0;break t}break;default:P=Gt,Gt=0,en=null,cl(e,N,q,P)}}MS(),b=ae;break}catch(rt){vg(e,rt)}while(!0);return n&&e.shellSuspendCounter++,Wn=ur=null,Yt=o,z.H=f,z.A=p,Dt===null&&(Pt=null,Rt=0,Ro()),b}function MS(){for(;Dt!==null;)Eg(Dt)}function zS(e,n){var l=Yt;Yt|=2;var o=Sg(),f=wg();Pt!==e||Rt!==n?(ds=null,fs=xe()+500,ul(e,n)):al=Ji(e,n);t:do try{if(Gt!==0&&Dt!==null){n=Dt;var p=en;e:switch(Gt){case 1:Gt=0,en=null,cl(e,n,p,1);break;case 2:case 9:if(kp(p)){Gt=0,en=null,Cg(n);break}n=function(){Gt!==2&&Gt!==9||Pt!==e||(Gt=7),jn(e)},p.then(n,n);break t;case 3:Gt=7;break t;case 4:Gt=5;break t;case 7:kp(p)?(Gt=0,en=null,Cg(n)):(Gt=0,en=null,cl(e,n,p,7));break;case 5:var b=null;switch(Dt.tag){case 26:b=Dt.memoizedState;case 5:case 27:var N=Dt;if(b?uy(b):N.stateNode.complete){Gt=0,en=null;var q=N.sibling;if(q!==null)Dt=q;else{var P=N.return;P!==null?(Dt=P,ms(P)):Dt=null}break e}}Gt=0,en=null,cl(e,n,p,5);break;case 6:Gt=0,en=null,cl(e,n,p,6);break;case 8:vf(),ae=6;break t;default:throw Error(a(462))}}OS();break}catch(rt){vg(e,rt)}while(!0);return Wn=ur=null,z.H=o,z.A=f,Yt=l,Dt!==null?0:(Pt=null,Rt=0,Ro(),ae)}function OS(){for(;Dt!==null&&!Yn();)Eg(Dt)}function Eg(e){var n=Zm(e.alternate,e,ui);e.memoizedProps=e.pendingProps,n===null?ms(e):Dt=n}function Cg(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=Vm(l,n,n.pendingProps,n.type,void 0,Rt);break;case 11:n=Vm(l,n,n.pendingProps,n.type.render,n.ref,Rt);break;case 5:Rc(n);default:Km(l,n),n=Dt=wp(n,ui),n=Zm(l,n,ui)}e.memoizedProps=e.pendingProps,n===null?ms(e):Dt=n}function cl(e,n,l,o){Wn=ur=null,Rc(n),Wr=null,ta=0;var f=n.return;try{if(vS(e,f,n,l,Rt)){ae=1,ns(e,cn(l,e.current)),Dt=null;return}}catch(p){if(f!==null)throw Dt=f,p;ae=1,ns(e,cn(l,e.current)),Dt=null;return}n.flags&32768?(Ht||o===1?e=!0:al||(Rt&536870912)!==0?e=!1:(ki=e=!0,(o===2||o===9||o===3||o===6)&&(o=We.current,o!==null&&o.tag===13&&(o.flags|=16384))),_g(n,e)):ms(n)}function ms(e){var n=e;do{if((n.flags&32768)!==0){_g(n,ki);return}e=n.return;var l=wS(n.alternate,n,ui);if(l!==null){Dt=l;return}if(n=n.sibling,n!==null){Dt=n;return}Dt=n=e}while(n!==null);ae===0&&(ae=5)}function _g(e,n){do{var l=ES(e.alternate,e);if(l!==null){l.flags&=32767,Dt=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){Dt=e;return}Dt=e=l}while(e!==null);ae=6,Dt=null}function Ng(e,n,l,o,f,p,b,N,q){e.cancelPendingCommit=null;do gs();while(be!==0);if((Yt&6)!==0)throw Error(a(327));if(n!==null){if(n===e.current)throw Error(a(177));if(p=n.lanes|n.childLanes,p|=oc,Lu(e,l,p,b,N,q),e===Pt&&(Dt=Pt=null,Rt=0),sl=n,Hi=e,ci=l,gf=p,yf=f,mg=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,jS(bt,function(){return Og(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=z.T,z.T=null,f=B.p,B.p=2,b=Yt,Yt|=4;try{CS(e,n,l)}finally{Yt=b,B.p=f,z.T=o}}be=1,Tg(),Ag(),Mg()}}function Tg(){if(be===1){be=0;var e=Hi,n=sl,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=z.T,z.T=null;var o=B.p;B.p=2;var f=Yt;Yt|=4;try{og(n,e);var p=Df,b=hp(e.containerInfo),N=p.focusedElem,q=p.selectionRange;if(b!==N&&N&&N.ownerDocument&&dp(N.ownerDocument.documentElement,N)){if(q!==null&&nc(N)){var P=q.start,rt=q.end;if(rt===void 0&&(rt=P),"selectionStart"in N)N.selectionStart=P,N.selectionEnd=Math.min(rt,N.value.length);else{var ot=N.ownerDocument||document,W=ot&&ot.defaultView||window;if(W.getSelection){var tt=W.getSelection(),mt=N.textContent.length,St=Math.min(q.start,mt),$t=q.end===void 0?St:Math.min(q.end,mt);!tt.extend&&St>$t&&(b=$t,$t=St,St=b);var F=fp(N,St),X=fp(N,$t);if(F&&X&&(tt.rangeCount!==1||tt.anchorNode!==F.node||tt.anchorOffset!==F.offset||tt.focusNode!==X.node||tt.focusOffset!==X.offset)){var $=ot.createRange();$.setStart(F.node,F.offset),tt.removeAllRanges(),St>$t?(tt.addRange($),tt.extend(X.node,X.offset)):($.setEnd(X.node,X.offset),tt.addRange($))}}}}for(ot=[],tt=N;tt=tt.parentNode;)tt.nodeType===1&&ot.push({element:tt,left:tt.scrollLeft,top:tt.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ot.length;N++){var at=ot[N];at.element.scrollLeft=at.left,at.element.scrollTop=at.top}}As=!!Of,Df=Of=null}finally{Yt=f,B.p=o,z.T=l}}e.current=n,be=2}}function Ag(){if(be===2){be=0;var e=Hi,n=sl,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=z.T,z.T=null;var o=B.p;B.p=2;var f=Yt;Yt|=4;try{ng(e,n.alternate,n)}finally{Yt=f,B.p=o,z.T=l}}be=3}}function Mg(){if(be===4||be===3){be=0,Qn();var e=Hi,n=sl,l=ci,o=mg;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?be=5:(be=0,sl=Hi=null,zg(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(ji=null),Ll(l),n=n.stateNode,se&&typeof se.onCommitFiberRoot=="function")try{se.onCommitFiberRoot(we,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=z.T,f=B.p,B.p=2,z.T=null;try{for(var p=e.onRecoverableError,b=0;b<o.length;b++){var N=o[b];p(N.value,{componentStack:N.stack})}}finally{z.T=n,B.p=f}}(ci&3)!==0&&gs(),jn(e),f=e.pendingLanes,(l&261930)!==0&&(f&42)!==0?e===xf?ya++:(ya=0,xf=e):ya=0,xa(0)}}function zg(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Jl(n)))}function gs(){return Tg(),Ag(),Mg(),Og()}function Og(){if(be!==5)return!1;var e=Hi,n=gf;gf=0;var l=Ll(ci),o=z.T,f=B.p;try{B.p=32>l?32:l,z.T=null,l=yf,yf=null;var p=Hi,b=ci;if(be=0,sl=Hi=null,ci=0,(Yt&6)!==0)throw Error(a(331));var N=Yt;if(Yt|=4,dg(p.current),ug(p,p.current,b,l),Yt=N,xa(0,!1),se&&typeof se.onPostCommitFiberRoot=="function")try{se.onPostCommitFiberRoot(we,p)}catch{}return!0}finally{B.p=f,z.T=o,zg(e,n)}}function Dg(e,n,l){n=cn(l,n),n=Kc(e.stateNode,n,2),e=Mi(e,n,2),e!==null&&(Wi(e,2),jn(e))}function Zt(e,n,l){if(e.tag===3)Dg(e,e,l);else for(;n!==null;){if(n.tag===3){Dg(n,e,l);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(ji===null||!ji.has(o))){e=cn(l,e),l=km(2),o=Mi(n,l,2),o!==null&&(Rm(l,o,n,e),Wi(o,2),jn(o));break}}n=n.return}}function Sf(e,n,l){var o=e.pingCache;if(o===null){o=e.pingCache=new TS;var f=new Set;o.set(n,f)}else f=o.get(n),f===void 0&&(f=new Set,o.set(n,f));f.has(l)||(hf=!0,f.add(l),e=DS.bind(null,e,n,l),n.then(e,e))}function DS(e,n,l){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Pt===e&&(Rt&l)===l&&(ae===4||ae===3&&(Rt&62914560)===Rt&&300>xe()-cs?(Yt&2)===0&&ul(e,0):pf|=l,ol===Rt&&(ol=0)),jn(e)}function kg(e,n){n===0&&(n=fo()),e=ar(e,n),e!==null&&(Wi(e,n),jn(e))}function kS(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),kg(e,l)}function RS(e,n){var l=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(l=f.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(n),kg(e,l)}function jS(e,n){return je(e,n)}var ys=null,fl=null,wf=!1,xs=!1,Ef=!1,Bi=0;function jn(e){e!==fl&&e.next===null&&(fl===null?ys=fl=e:fl=fl.next=e),xs=!0,wf||(wf=!0,LS())}function xa(e,n){if(!Ef&&xs){Ef=!0;do for(var l=!1,o=ys;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var p=0;else{var b=o.suspendedLanes,N=o.pingedLanes;p=(1<<31-Xt(42|e)+1)-1,p&=f&~(b&~N),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(l=!0,Lg(o,p))}else p=Rt,p=kr(o,o===Pt?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(p&3)===0||Ji(o,p)||(l=!0,Lg(o,p));o=o.next}while(l);Ef=!1}}function HS(){Rg()}function Rg(){xs=wf=!1;var e=0;Bi!==0&&ZS()&&(e=Bi);for(var n=xe(),l=null,o=ys;o!==null;){var f=o.next,p=jg(o,n);p===0?(o.next=null,l===null?ys=f:l.next=f,f===null&&(fl=l)):(l=o,(e!==0||(p&3)!==0)&&(xs=!0)),o=f}be!==0&&be!==5||xa(e),Bi!==0&&(Bi=0)}function jg(e,n){for(var l=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var b=31-Xt(p),N=1<<b,q=f[b];q===-1?((N&l)===0||(N&o)!==0)&&(f[b]=Hu(N,n)):q<=n&&(e.expiredLanes|=N),p&=~N}if(n=Pt,l=Rt,l=kr(e,e===n?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,l===0||e===n&&(Gt===2||Gt===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&vn(o),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Ji(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(o!==null&&vn(o),Ll(l)){case 2:case 8:l=ht;break;case 32:l=bt;break;case 268435456:l=Lt;break;default:l=bt}return o=Hg.bind(null,e),l=je(l,o),e.callbackPriority=n,e.callbackNode=l,n}return o!==null&&o!==null&&vn(o),e.callbackPriority=2,e.callbackNode=null,2}function Hg(e,n){if(be!==0&&be!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(gs()&&e.callbackNode!==l)return null;var o=Rt;return o=kr(e,e===Pt?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(yg(e,o,n),jg(e,xe()),e.callbackNode!=null&&e.callbackNode===l?Hg.bind(null,e):null)}function Lg(e,n){if(gs())return null;yg(e,n,!0)}function LS(){KS(function(){(Yt&6)!==0?je(it,HS):Rg()})}function Cf(){if(Bi===0){var e=$r;e===0&&(e=zr,zr<<=1,(zr&261888)===0&&(zr=256)),Bi=e}return Bi}function Bg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:No(""+e)}function Ug(e,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,e.id&&l.setAttribute("form",e.id),n.parentNode.insertBefore(l,n),e=new FormData(e),l.parentNode.removeChild(l),e}function BS(e,n,l,o,f){if(n==="submit"&&l&&l.stateNode===f){var p=Bg((f[ze]||null).action),b=o.submitter;b&&(n=(n=b[ze]||null)?Bg(n.formAction):b.getAttribute("formAction"),n!==null&&(p=n,b=null));var N=new zo("action","action",null,o,f);e.push({event:N,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Bi!==0){var q=b?Ug(f,b):new FormData(f);Yc(l,{pending:!0,data:q,method:f.method,action:p},null,q)}}else typeof p=="function"&&(N.preventDefault(),q=b?Ug(f,b):new FormData(f),Yc(l,{pending:!0,data:q,method:f.method,action:p},p,q))},currentTarget:f}]})}}for(var _f=0;_f<ac.length;_f++){var Nf=ac[_f],US=Nf.toLowerCase(),qS=Nf[0].toUpperCase()+Nf.slice(1);wn(US,"on"+qS)}wn(gp,"onAnimationEnd"),wn(yp,"onAnimationIteration"),wn(xp,"onAnimationStart"),wn("dblclick","onDoubleClick"),wn("focusin","onFocus"),wn("focusout","onBlur"),wn(nS,"onTransitionRun"),wn(iS,"onTransitionStart"),wn(rS,"onTransitionCancel"),wn(vp,"onTransitionEnd"),Si("onMouseEnter",["mouseout","mouseover"]),Si("onMouseLeave",["mouseout","mouseover"]),Si("onPointerEnter",["pointerout","pointerover"]),Si("onPointerLeave",["pointerout","pointerover"]),Zn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Zn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Zn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Zn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Zn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Zn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var va="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(" "),VS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(va));function qg(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var o=e[l],f=o.event;o=o.listeners;t:{var p=void 0;if(n)for(var b=o.length-1;0<=b;b--){var N=o[b],q=N.instance,P=N.currentTarget;if(N=N.listener,q!==p&&f.isPropagationStopped())break t;p=N,f.currentTarget=P;try{p(f)}catch(rt){ko(rt)}f.currentTarget=null,p=q}else for(b=0;b<o.length;b++){if(N=o[b],q=N.instance,P=N.currentTarget,N=N.listener,q!==p&&f.isPropagationStopped())break t;p=N,f.currentTarget=P;try{p(f)}catch(rt){ko(rt)}f.currentTarget=null,p=q}}}}function kt(e,n){var l=n[Rr];l===void 0&&(l=n[Rr]=new Set);var o=e+"__bubble";l.has(o)||(Vg(n,e,2,!1),l.add(o))}function Tf(e,n,l){var o=0;n&&(o|=4),Vg(l,e,o,n)}var vs="_reactListening"+Math.random().toString(36).slice(2);function Af(e){if(!e[vs]){e[vs]=!0,bo.forEach(function(l){l!=="selectionchange"&&(VS.has(l)||Tf(l,!1,e),Tf(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[vs]||(n[vs]=!0,Tf("selectionchange",!1,n))}}function Vg(e,n,l,o){switch(gy(n)){case 2:var f=mw;break;case 8:f=gw;break;default:f=Yf}l=f.bind(null,n,l,e),f=void 0,!Zu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),o?f!==void 0?e.addEventListener(n,l,{capture:!0,passive:f}):e.addEventListener(n,l,!0):f!==void 0?e.addEventListener(n,l,{passive:f}):e.addEventListener(n,l,!1)}function Mf(e,n,l,o,f){var p=o;if((n&1)===0&&(n&2)===0&&o!==null)t:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var N=o.stateNode.containerInfo;if(N===f)break;if(b===4)for(b=o.return;b!==null;){var q=b.tag;if((q===3||q===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;N!==null;){if(b=yi(N),b===null)return;if(q=b.tag,q===5||q===6||q===26||q===27){o=p=b;continue t}N=N.parentNode}}o=o.return}Gh(function(){var P=p,rt=Xu(l),ot=[];t:{var W=bp.get(e);if(W!==void 0){var tt=zo,mt=e;switch(e){case"keypress":if(Ao(l)===0)break t;case"keydown":case"keyup":tt=Rb;break;case"focusin":mt="focus",tt=Pu;break;case"focusout":mt="blur",tt=Pu;break;case"beforeblur":case"afterblur":tt=Pu;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":tt=Kh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":tt=wb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":tt=Lb;break;case gp:case yp:case xp:tt=_b;break;case vp:tt=Ub;break;case"scroll":case"scrollend":tt=bb;break;case"wheel":tt=Vb;break;case"copy":case"cut":case"paste":tt=Tb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":tt=Ph;break;case"toggle":case"beforetoggle":tt=Yb}var St=(n&4)!==0,$t=!St&&(e==="scroll"||e==="scrollend"),F=St?W!==null?W+"Capture":null:W;St=[];for(var X=P,$;X!==null;){var at=X;if($=at.stateNode,at=at.tag,at!==5&&at!==26&&at!==27||$===null||F===null||(at=Vl(X,F),at!=null&&St.push(ba(X,at,$))),$t)break;X=X.return}0<St.length&&(W=new tt(W,mt,null,l,rt),ot.push({event:W,listeners:St}))}}if((n&7)===0){t:{if(W=e==="mouseover"||e==="pointerover",tt=e==="mouseout"||e==="pointerout",W&&l!==Qu&&(mt=l.relatedTarget||l.fromElement)&&(yi(mt)||mt[Gn]))break t;if((tt||W)&&(W=rt.window===rt?rt:(W=rt.ownerDocument)?W.defaultView||W.parentWindow:window,tt?(mt=l.relatedTarget||l.toElement,tt=P,mt=mt?yi(mt):null,mt!==null&&($t=u(mt),St=mt.tag,mt!==$t||St!==5&&St!==27&&St!==6)&&(mt=null)):(tt=null,mt=P),tt!==mt)){if(St=Kh,at="onMouseLeave",F="onMouseEnter",X="mouse",(e==="pointerout"||e==="pointerover")&&(St=Ph,at="onPointerLeave",F="onPointerEnter",X="pointer"),$t=tt==null?W:vi(tt),$=mt==null?W:vi(mt),W=new St(at,X+"leave",tt,l,rt),W.target=$t,W.relatedTarget=$,at=null,yi(rt)===P&&(St=new St(F,X+"enter",mt,l,rt),St.target=$,St.relatedTarget=$t,at=St),$t=at,tt&&mt)e:{for(St=IS,F=tt,X=mt,$=0,at=F;at;at=St(at))$++;at=0;for(var yt=X;yt;yt=St(yt))at++;for(;0<$-at;)F=St(F),$--;for(;0<at-$;)X=St(X),at--;for(;$--;){if(F===X||X!==null&&F===X.alternate){St=F;break e}F=St(F),X=St(X)}St=null}else St=null;tt!==null&&Ig(ot,W,tt,St,!1),mt!==null&&$t!==null&&Ig(ot,$t,mt,St,!0)}}t:{if(W=P?vi(P):window,tt=W.nodeName&&W.nodeName.toLowerCase(),tt==="select"||tt==="input"&&W.type==="file")var qt=lp;else if(ip(W))if(ap)qt=Wb;else{qt=Pb;var gt=$b}else tt=W.nodeName,!tt||tt.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?P&&Yu(P.elementType)&&(qt=lp):qt=Jb;if(qt&&(qt=qt(e,P))){rp(ot,qt,l,rt);break t}gt&&gt(e,W,P),e==="focusout"&&P&&W.type==="number"&&P.memoizedProps.value!=null&&ql(W,"number",W.value)}switch(gt=P?vi(P):window,e){case"focusin":(ip(gt)||gt.contentEditable==="true")&&(Ir=gt,ic=P,Kl=null);break;case"focusout":Kl=ic=Ir=null;break;case"mousedown":rc=!0;break;case"contextmenu":case"mouseup":case"dragend":rc=!1,pp(ot,l,rt);break;case"selectionchange":if(eS)break;case"keydown":case"keyup":pp(ot,l,rt)}var At;if(Wu)t:{switch(e){case"compositionstart":var jt="onCompositionStart";break t;case"compositionend":jt="onCompositionEnd";break t;case"compositionupdate":jt="onCompositionUpdate";break t}jt=void 0}else Vr?ep(e,l)&&(jt="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(jt="onCompositionStart");jt&&(Jh&&l.locale!=="ko"&&(Vr||jt!=="onCompositionStart"?jt==="onCompositionEnd"&&Vr&&(At=Zh()):(wi=rt,Fu="value"in wi?wi.value:wi.textContent,Vr=!0)),gt=bs(P,jt),0<gt.length&&(jt=new $h(jt,e,null,l,rt),ot.push({event:jt,listeners:gt}),At?jt.data=At:(At=np(l),At!==null&&(jt.data=At)))),(At=Xb?Gb(e,l):Zb(e,l))&&(jt=bs(P,"onBeforeInput"),0<jt.length&&(gt=new $h("onBeforeInput","beforeinput",null,l,rt),ot.push({event:gt,listeners:jt}),gt.data=At)),BS(ot,e,P,l,rt)}qg(ot,n)})}function ba(e,n,l){return{instance:e,listener:n,currentTarget:l}}function bs(e,n){for(var l=n+"Capture",o=[];e!==null;){var f=e,p=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||p===null||(f=Vl(e,l),f!=null&&o.unshift(ba(e,f,p)),f=Vl(e,n),f!=null&&o.push(ba(e,f,p))),e.tag===3)return o;e=e.return}return[]}function IS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ig(e,n,l,o,f){for(var p=n._reactName,b=[];l!==null&&l!==o;){var N=l,q=N.alternate,P=N.stateNode;if(N=N.tag,q!==null&&q===o)break;N!==5&&N!==26&&N!==27||P===null||(q=P,f?(P=Vl(l,p),P!=null&&b.unshift(ba(l,P,q))):f||(P=Vl(l,p),P!=null&&b.push(ba(l,P,q)))),l=l.return}b.length!==0&&e.push({event:n,listeners:b})}var YS=/\r\n?/g,QS=/\u0000|\uFFFD/g;function Yg(e){return(typeof e=="string"?e:""+e).replace(YS,`
9
+ `).replace(QS,"")}function Qg(e,n){return n=Yg(n),Yg(e)===n}function Kt(e,n,l,o,f,p){switch(l){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||Br(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&Br(e,""+o);break;case"className":Hr(e,"class",o);break;case"tabIndex":Hr(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Hr(e,l,o);break;case"style":Qh(e,o,p);break;case"data":if(n!=="object"){Hr(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||l!=="href")){e.removeAttribute(l);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=No(""+o),e.setAttribute(l,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(l==="formAction"?(n!=="input"&&Kt(e,n,"name",f.name,f,null),Kt(e,n,"formEncType",f.formEncType,f,null),Kt(e,n,"formMethod",f.formMethod,f,null),Kt(e,n,"formTarget",f.formTarget,f,null)):(Kt(e,n,"encType",f.encType,f,null),Kt(e,n,"method",f.method,f,null),Kt(e,n,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=No(""+o),e.setAttribute(l,o);break;case"onClick":o!=null&&(e.onclick=Kn);break;case"onScroll":o!=null&&kt("scroll",e);break;case"onScrollEnd":o!=null&&kt("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(l=o.__html,l!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=l}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}l=No(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,""+o):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":o===!0?e.setAttribute(l,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,o):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(l,o):e.removeAttribute(l);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(l):e.setAttribute(l,o);break;case"popover":kt("beforetoggle",e),kt("toggle",e),jr(e,"popover",o);break;case"xlinkActuate":Sn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Sn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Sn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Sn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Sn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Sn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":jr(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=xb.get(l)||l,jr(e,l,o))}}function zf(e,n,l,o,f,p){switch(l){case"style":Qh(e,o,p);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(l=o.__html,l!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=l}}break;case"children":typeof o=="string"?Br(e,o):(typeof o=="number"||typeof o=="bigint")&&Br(e,""+o);break;case"onScroll":o!=null&&kt("scroll",e);break;case"onScrollEnd":o!=null&&kt("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Kn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!So.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(f=l.endsWith("Capture"),n=l.slice(2,f?l.length-7:void 0),p=e[ze]||null,p=p!=null?p[l]:null,typeof p=="function"&&e.removeEventListener(n,p,f),typeof o=="function")){typeof p!="function"&&p!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(n,o,f);break t}l in e?e[l]=o:o===!0?e.setAttribute(l,""):jr(e,l,o)}}}function Ne(e,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":kt("error",e),kt("load",e);var o=!1,f=!1,p;for(p in l)if(l.hasOwnProperty(p)){var b=l[p];if(b!=null)switch(p){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:Kt(e,n,p,b,l,null)}}f&&Kt(e,n,"srcSet",l.srcSet,l,null),o&&Kt(e,n,"src",l.src,l,null);return;case"input":kt("invalid",e);var N=p=b=f=null,q=null,P=null;for(o in l)if(l.hasOwnProperty(o)){var rt=l[o];if(rt!=null)switch(o){case"name":f=rt;break;case"type":b=rt;break;case"checked":q=rt;break;case"defaultChecked":P=rt;break;case"value":p=rt;break;case"defaultValue":N=rt;break;case"children":case"dangerouslySetInnerHTML":if(rt!=null)throw Error(a(137,n));break;default:Kt(e,n,o,rt,l,null)}}_o(e,p,N,q,P,b,f,!1);return;case"select":kt("invalid",e),o=b=p=null;for(f in l)if(l.hasOwnProperty(f)&&(N=l[f],N!=null))switch(f){case"value":p=N;break;case"defaultValue":b=N;break;case"multiple":o=N;default:Kt(e,n,f,N,l,null)}n=p,l=b,e.multiple=!!o,n!=null?Fn(e,!!o,n,!1):l!=null&&Fn(e,!!o,l,!0);return;case"textarea":kt("invalid",e),p=f=o=null;for(b in l)if(l.hasOwnProperty(b)&&(N=l[b],N!=null))switch(b){case"value":o=N;break;case"defaultValue":f=N;break;case"children":p=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(a(91));break;default:Kt(e,n,b,N,l,null)}Ih(e,o,f,p);return;case"option":for(q in l)l.hasOwnProperty(q)&&(o=l[q],o!=null)&&(q==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Kt(e,n,q,o,l,null));return;case"dialog":kt("beforetoggle",e),kt("toggle",e),kt("cancel",e),kt("close",e);break;case"iframe":case"object":kt("load",e);break;case"video":case"audio":for(o=0;o<va.length;o++)kt(va[o],e);break;case"image":kt("error",e),kt("load",e);break;case"details":kt("toggle",e);break;case"embed":case"source":case"link":kt("error",e),kt("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(P in l)if(l.hasOwnProperty(P)&&(o=l[P],o!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:Kt(e,n,P,o,l,null)}return;default:if(Yu(n)){for(rt in l)l.hasOwnProperty(rt)&&(o=l[rt],o!==void 0&&zf(e,n,rt,o,l,void 0));return}}for(N in l)l.hasOwnProperty(N)&&(o=l[N],o!=null&&Kt(e,n,N,o,l,null))}function XS(e,n,l,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,p=null,b=null,N=null,q=null,P=null,rt=null;for(tt in l){var ot=l[tt];if(l.hasOwnProperty(tt)&&ot!=null)switch(tt){case"checked":break;case"value":break;case"defaultValue":q=ot;default:o.hasOwnProperty(tt)||Kt(e,n,tt,null,o,ot)}}for(var W in o){var tt=o[W];if(ot=l[W],o.hasOwnProperty(W)&&(tt!=null||ot!=null))switch(W){case"type":p=tt;break;case"name":f=tt;break;case"checked":P=tt;break;case"defaultChecked":rt=tt;break;case"value":b=tt;break;case"defaultValue":N=tt;break;case"children":case"dangerouslySetInnerHTML":if(tt!=null)throw Error(a(137,n));break;default:tt!==ot&&Kt(e,n,W,tt,o,ot)}}nr(e,b,N,q,P,rt,p,f);return;case"select":tt=b=N=W=null;for(p in l)if(q=l[p],l.hasOwnProperty(p)&&q!=null)switch(p){case"value":break;case"multiple":tt=q;default:o.hasOwnProperty(p)||Kt(e,n,p,null,o,q)}for(f in o)if(p=o[f],q=l[f],o.hasOwnProperty(f)&&(p!=null||q!=null))switch(f){case"value":W=p;break;case"defaultValue":N=p;break;case"multiple":b=p;default:p!==q&&Kt(e,n,f,p,o,q)}n=N,l=b,o=tt,W!=null?Fn(e,!!l,W,!1):!!o!=!!l&&(n!=null?Fn(e,!!l,n,!0):Fn(e,!!l,l?[]:"",!1));return;case"textarea":tt=W=null;for(N in l)if(f=l[N],l.hasOwnProperty(N)&&f!=null&&!o.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:Kt(e,n,N,null,o,f)}for(b in o)if(f=o[b],p=l[b],o.hasOwnProperty(b)&&(f!=null||p!=null))switch(b){case"value":W=f;break;case"defaultValue":tt=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(a(91));break;default:f!==p&&Kt(e,n,b,f,o,p)}Vh(e,W,tt);return;case"option":for(var mt in l)W=l[mt],l.hasOwnProperty(mt)&&W!=null&&!o.hasOwnProperty(mt)&&(mt==="selected"?e.selected=!1:Kt(e,n,mt,null,o,W));for(q in o)W=o[q],tt=l[q],o.hasOwnProperty(q)&&W!==tt&&(W!=null||tt!=null)&&(q==="selected"?e.selected=W&&typeof W!="function"&&typeof W!="symbol":Kt(e,n,q,W,o,tt));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 St in l)W=l[St],l.hasOwnProperty(St)&&W!=null&&!o.hasOwnProperty(St)&&Kt(e,n,St,null,o,W);for(P in o)if(W=o[P],tt=l[P],o.hasOwnProperty(P)&&W!==tt&&(W!=null||tt!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,n));break;default:Kt(e,n,P,W,o,tt)}return;default:if(Yu(n)){for(var $t in l)W=l[$t],l.hasOwnProperty($t)&&W!==void 0&&!o.hasOwnProperty($t)&&zf(e,n,$t,void 0,o,W);for(rt in o)W=o[rt],tt=l[rt],!o.hasOwnProperty(rt)||W===tt||W===void 0&&tt===void 0||zf(e,n,rt,W,o,tt);return}}for(var F in l)W=l[F],l.hasOwnProperty(F)&&W!=null&&!o.hasOwnProperty(F)&&Kt(e,n,F,null,o,W);for(ot in o)W=o[ot],tt=l[ot],!o.hasOwnProperty(ot)||W===tt||W==null&&tt==null||Kt(e,n,ot,W,o,tt)}function Xg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function GS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,l=performance.getEntriesByType("resource"),o=0;o<l.length;o++){var f=l[o],p=f.transferSize,b=f.initiatorType,N=f.duration;if(p&&N&&Xg(b)){for(b=0,N=f.responseEnd,o+=1;o<l.length;o++){var q=l[o],P=q.startTime;if(P>N)break;var rt=q.transferSize,ot=q.initiatorType;rt&&Xg(ot)&&(q=q.responseEnd,b+=rt*(q<N?1:(N-P)/(q-P)))}if(--o,n+=8*(p+b)/(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 Of=null,Df=null;function Ss(e){return e.nodeType===9?e:e.ownerDocument}function Gg(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 Zg(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 kf(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 Rf=null;function ZS(){var e=window.event;return e&&e.type==="popstate"?e===Rf?!1:(Rf=e,!0):(Rf=null,!1)}var Fg=typeof setTimeout=="function"?setTimeout:void 0,FS=typeof clearTimeout=="function"?clearTimeout:void 0,Kg=typeof Promise=="function"?Promise:void 0,KS=typeof queueMicrotask=="function"?queueMicrotask:typeof Kg<"u"?function(e){return Kg.resolve(null).then(e).catch($S)}:Fg;function $S(e){setTimeout(function(){throw e})}function Ui(e){return e==="head"}function $g(e,n){var l=n,o=0;do{var f=l.nextSibling;if(e.removeChild(l),f&&f.nodeType===8)if(l=f.data,l==="/$"||l==="/&"){if(o===0){e.removeChild(f),ml(n);return}o--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")o++;else if(l==="html")Sa(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Sa(l);for(var p=l.firstChild;p;){var b=p.nextSibling,N=p.nodeName;p[tr]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&p.rel.toLowerCase()==="stylesheet"||l.removeChild(p),p=b}}else l==="body"&&Sa(e.ownerDocument.body);l=f}while(l);ml(n)}function Pg(e,n){var l=e;e=0;do{var o=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),o&&o.nodeType===8)if(l=o.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=o}while(l)}function jf(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":jf(l),Bl(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function PS(e,n,l,o){for(;e.nodeType===1;){var f=l;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[tr])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==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(p=e.getAttribute("src"),(p!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var p=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=mn(e.nextSibling),e===null)break}return null}function JS(e,n,l){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=mn(e.nextSibling),e===null))return null;return e}function Jg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=mn(e.nextSibling),e===null))return null;return e}function Hf(e){return e.data==="$?"||e.data==="$~"}function Lf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function WS(e,n){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||l.readyState!=="loading")n();else{var o=function(){n(),l.removeEventListener("DOMContentLoaded",o)};l.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function mn(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 Bf=null;function Wg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(n===0)return mn(e.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}e=e.nextSibling}return null}function ty(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return e;n--}else l!=="/$"&&l!=="/&"||n++}e=e.previousSibling}return null}function ey(e,n,l){switch(n=Ss(l),e){case"html":if(e=n.documentElement,!e)throw Error(a(452));return e;case"head":if(e=n.head,!e)throw Error(a(453));return e;case"body":if(e=n.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Sa(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Bl(e)}var gn=new Map,ny=new Set;function ws(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fi=B.d;B.d={f:tw,r:ew,D:nw,C:iw,L:rw,m:lw,X:ow,S:aw,M:sw};function tw(){var e=fi.f(),n=hs();return e||n}function ew(e){var n=xi(e);n!==null&&n.tag===5&&n.type==="form"?vm(n):fi.r(e)}var dl=typeof document>"u"?null:document;function iy(e,n,l){var o=dl;if(o&&typeof n=="string"&&n){var f=Le(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),ny.has(f)||(ny.add(f),e={rel:e,crossOrigin:l,href:n},o.querySelector(f)===null&&(n=o.createElement("link"),Ne(n,"link",e),fe(n),o.head.appendChild(n)))}}function nw(e){fi.D(e),iy("dns-prefetch",e,null)}function iw(e,n){fi.C(e,n),iy("preconnect",e,n)}function rw(e,n,l){fi.L(e,n,l);var o=dl;if(o&&e&&n){var f='link[rel="preload"][as="'+Le(n)+'"]';n==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+Le(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+Le(l.imageSizes)+'"]')):f+='[href="'+Le(e)+'"]';var p=f;switch(n){case"style":p=hl(e);break;case"script":p=pl(e)}gn.has(p)||(e=y({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),gn.set(p,e),o.querySelector(f)!==null||n==="style"&&o.querySelector(wa(p))||n==="script"&&o.querySelector(Ea(p))||(n=o.createElement("link"),Ne(n,"link",e),fe(n),o.head.appendChild(n)))}}function lw(e,n){fi.m(e,n);var l=dl;if(l&&e){var o=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+Le(o)+'"][href="'+Le(e)+'"]',p=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=pl(e)}if(!gn.has(p)&&(e=y({rel:"modulepreload",href:e},n),gn.set(p,e),l.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ea(p)))return}o=l.createElement("link"),Ne(o,"link",e),fe(o),l.head.appendChild(o)}}}function aw(e,n,l){fi.S(e,n,l);var o=dl;if(o&&e){var f=bi(o).hoistableStyles,p=hl(e);n=n||"default";var b=f.get(p);if(!b){var N={loading:0,preload:null};if(b=o.querySelector(wa(p)))N.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},l),(l=gn.get(p))&&Uf(e,l);var q=b=o.createElement("link");fe(q),Ne(q,"link",e),q._p=new Promise(function(P,rt){q.onload=P,q.onerror=rt}),q.addEventListener("load",function(){N.loading|=1}),q.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Es(b,n,o)}b={type:"stylesheet",instance:b,count:1,state:N},f.set(p,b)}}}function ow(e,n){fi.X(e,n);var l=dl;if(l&&e){var o=bi(l).hoistableScripts,f=pl(e),p=o.get(f);p||(p=l.querySelector(Ea(f)),p||(e=y({src:e,async:!0},n),(n=gn.get(f))&&qf(e,n),p=l.createElement("script"),fe(p),Ne(p,"link",e),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(f,p))}}function sw(e,n){fi.M(e,n);var l=dl;if(l&&e){var o=bi(l).hoistableScripts,f=pl(e),p=o.get(f);p||(p=l.querySelector(Ea(f)),p||(e=y({src:e,async:!0,type:"module"},n),(n=gn.get(f))&&qf(e,n),p=l.createElement("script"),fe(p),Ne(p,"link",e),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(f,p))}}function ry(e,n,l,o){var f=(f=ct.current)?ws(f):null;if(!f)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=hl(l.href),l=bi(f).hoistableStyles,o=l.get(n),o||(o={type:"style",instance:null,count:0,state:null},l.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=hl(l.href);var p=bi(f).hoistableStyles,b=p.get(e);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,b),(p=f.querySelector(wa(e)))&&!p._p&&(b.instance=p,b.state.loading=5),gn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},gn.set(e,l),p||uw(f,e,l,b.state))),n&&o===null)throw Error(a(528,""));return b}if(n&&o!==null)throw Error(a(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=pl(l),l=bi(f).hoistableScripts,o=l.get(n),o||(o={type:"script",instance:null,count:0,state:null},l.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function hl(e){return'href="'+Le(e)+'"'}function wa(e){return'link[rel="stylesheet"]['+e+"]"}function ly(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function uw(e,n,l,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),Ne(n,"link",l),fe(n),e.head.appendChild(n))}function pl(e){return'[src="'+Le(e)+'"]'}function Ea(e){return"script[async]"+e}function ay(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+Le(l.href)+'"]');if(o)return n.instance=o,fe(o),o;var f=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),fe(o),Ne(o,"style",f),Es(o,l.precedence,e),n.instance=o;case"stylesheet":f=hl(l.href);var p=e.querySelector(wa(f));if(p)return n.state.loading|=4,n.instance=p,fe(p),p;o=ly(l),(f=gn.get(f))&&Uf(o,f),p=(e.ownerDocument||e).createElement("link"),fe(p);var b=p;return b._p=new Promise(function(N,q){b.onload=N,b.onerror=q}),Ne(p,"link",o),n.state.loading|=4,Es(p,l.precedence,e),n.instance=p;case"script":return p=pl(l.src),(f=e.querySelector(Ea(p)))?(n.instance=f,fe(f),f):(o=l,(f=gn.get(p))&&(o=y({},l),qf(o,f)),e=e.ownerDocument||e,f=e.createElement("script"),fe(f),Ne(f,"link",o),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,Es(o,l.precedence,e));return n.instance}function Es(e,n,l){for(var o=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,p=f,b=0;b<o.length;b++){var N=o[b];if(N.dataset.precedence===n)p=N;else if(p!==f)break}p?p.parentNode.insertBefore(e,p.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(e,n.firstChild))}function Uf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function qf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Cs=null;function oy(e,n,l){if(Cs===null){var o=new Map,f=Cs=new Map;f.set(l,o)}else f=Cs,o=f.get(l),o||(o=new Map,f.set(l,o));if(o.has(e))return o;for(o.set(e,null),l=l.getElementsByTagName(e),f=0;f<l.length;f++){var p=l[f];if(!(p[tr]||p[ve]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var b=p.getAttribute(n)||"";b=e+b;var N=o.get(b);N?N.push(p):o.set(b,[p])}}return o}function sy(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function cw(e,n,l){if(l===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 uy(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function fw(e,n,l,o){if(l.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var f=hl(o.href),p=n.querySelector(wa(f));if(p){n=p._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=_s.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=p,fe(p);return}p=n.ownerDocument||n,o=ly(o),(f=gn.get(f))&&Uf(o,f),p=p.createElement("link"),fe(p);var b=p;b._p=new Promise(function(N,q){b.onload=N,b.onerror=q}),Ne(p,"link",o),l.instance=p}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=_s.bind(e),n.addEventListener("load",l),n.addEventListener("error",l))}}var Vf=0;function dw(e,n){return e.stylesheets&&e.count===0&&Ts(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var o=setTimeout(function(){if(e.stylesheets&&Ts(e,e.stylesheets),e.unsuspend){var p=e.unsuspend;e.unsuspend=null,p()}},6e4+n);0<e.imgBytes&&Vf===0&&(Vf=62500*GS());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ts(e,e.stylesheets),e.unsuspend)){var p=e.unsuspend;e.unsuspend=null,p()}},(e.imgBytes>Vf?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function _s(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ts(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ns=null;function Ts(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ns=new Map,n.forEach(hw,e),Ns=null,_s.call(e))}function hw(e,n){if(!(n.state.loading&4)){var l=Ns.get(e);if(l)var o=l.get(null);else{l=new Map,Ns.set(e,l);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<f.length;p++){var b=f[p];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(l.set(b.dataset.precedence,b),o=b)}o&&l.set(null,o)}f=n.instance,b=f.getAttribute("data-precedence"),p=l.get(b)||o,p===o&&l.set(null,f),l.set(b,f),this.count++,o=_s.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),p?p.parentNode.insertBefore(f,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Ca={$$typeof:w,Provider:null,Consumer:null,_currentValue:Y,_currentValue2:Y,_threadCount:0};function pw(e,n,l,o,f,p,b,N,q){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=jl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jl(0),this.hiddenUpdates=jl(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=p,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function cy(e,n,l,o,f,p,b,N,q,P,rt,ot){return e=new pw(e,n,l,b,q,P,rt,ot,N),n=1,p===!0&&(n|=24),p=Je(3,null,null,n),e.current=p,p.stateNode=e,n=vc(),n.refCount++,e.pooledCache=n,n.refCount++,p.memoizedState={element:o,isDehydrated:l,cache:n},Ec(p),e}function fy(e){return e?(e=Xr,e):Xr}function dy(e,n,l,o,f,p){f=fy(f),o.context===null?o.context=f:o.pendingContext=f,o=Ai(n),o.payload={element:l},p=p===void 0?null:p,p!==null&&(o.callback=p),l=Mi(e,o,n),l!==null&&(Ye(l,e,n),na(l,e,n))}function hy(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function If(e,n){hy(e,n),(e=e.alternate)&&hy(e,n)}function py(e){if(e.tag===13||e.tag===31){var n=ar(e,67108864);n!==null&&Ye(n,e,67108864),If(e,67108864)}}function my(e){if(e.tag===13||e.tag===31){var n=rn();n=Hl(n);var l=ar(e,n);l!==null&&Ye(l,e,n),If(e,n)}}var As=!0;function mw(e,n,l,o){var f=z.T;z.T=null;var p=B.p;try{B.p=2,Yf(e,n,l,o)}finally{B.p=p,z.T=f}}function gw(e,n,l,o){var f=z.T;z.T=null;var p=B.p;try{B.p=8,Yf(e,n,l,o)}finally{B.p=p,z.T=f}}function Yf(e,n,l,o){if(As){var f=Qf(o);if(f===null)Mf(e,n,o,Ms,l),yy(e,o);else if(xw(f,e,n,l,o))o.stopPropagation();else if(yy(e,o),n&4&&-1<yw.indexOf(e)){for(;f!==null;){var p=xi(f);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var b=Xn(p.pendingLanes);if(b!==0){var N=p;for(N.pendingLanes|=2,N.entangledLanes|=2;b;){var q=1<<31-Xt(b);N.entanglements[1]|=q,b&=~q}jn(p),(Yt&6)===0&&(fs=xe()+500,xa(0))}}break;case 31:case 13:N=ar(p,2),N!==null&&Ye(N,p,2),hs(),If(p,2)}if(p=Qf(o),p===null&&Mf(e,n,o,Ms,l),p===f)break;f=p}f!==null&&o.stopPropagation()}else Mf(e,n,o,null,l)}}function Qf(e){return e=Xu(e),Xf(e)}var Ms=null;function Xf(e){if(Ms=null,e=yi(e),e!==null){var n=u(e);if(n===null)e=null;else{var l=n.tag;if(l===13){if(e=c(n),e!==null)return e;e=null}else if(l===31){if(e=d(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Ms=e,null}function gy(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(gi()){case it:return 2;case ht:return 8;case bt:case zt:return 32;case Lt:return 268435456;default:return 32}default:return 32}}var Gf=!1,qi=null,Vi=null,Ii=null,_a=new Map,Na=new Map,Yi=[],yw="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 yy(e,n){switch(e){case"focusin":case"focusout":qi=null;break;case"dragenter":case"dragleave":Vi=null;break;case"mouseover":case"mouseout":Ii=null;break;case"pointerover":case"pointerout":_a.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Na.delete(n.pointerId)}}function Ta(e,n,l,o,f,p){return e===null||e.nativeEvent!==p?(e={blockedOn:n,domEventName:l,eventSystemFlags:o,nativeEvent:p,targetContainers:[f]},n!==null&&(n=xi(n),n!==null&&py(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function xw(e,n,l,o,f){switch(n){case"focusin":return qi=Ta(qi,e,n,l,o,f),!0;case"dragenter":return Vi=Ta(Vi,e,n,l,o,f),!0;case"mouseover":return Ii=Ta(Ii,e,n,l,o,f),!0;case"pointerover":var p=f.pointerId;return _a.set(p,Ta(_a.get(p)||null,e,n,l,o,f)),!0;case"gotpointercapture":return p=f.pointerId,Na.set(p,Ta(Na.get(p)||null,e,n,l,o,f)),!0}return!1}function xy(e){var n=yi(e.target);if(n!==null){var l=u(n);if(l!==null){if(n=l.tag,n===13){if(n=c(l),n!==null){e.blockedOn=n,yo(e.priority,function(){my(l)});return}}else if(n===31){if(n=d(l),n!==null){e.blockedOn=n,yo(e.priority,function(){my(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zs(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=Qf(e.nativeEvent);if(l===null){l=e.nativeEvent;var o=new l.constructor(l.type,l);Qu=o,l.target.dispatchEvent(o),Qu=null}else return n=xi(l),n!==null&&py(n),e.blockedOn=l,!1;n.shift()}return!0}function vy(e,n,l){zs(e)&&l.delete(n)}function vw(){Gf=!1,qi!==null&&zs(qi)&&(qi=null),Vi!==null&&zs(Vi)&&(Vi=null),Ii!==null&&zs(Ii)&&(Ii=null),_a.forEach(vy),Na.forEach(vy)}function Os(e,n){e.blockedOn===n&&(e.blockedOn=null,Gf||(Gf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,vw)))}var Ds=null;function by(e){Ds!==e&&(Ds=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ds===e&&(Ds=null);for(var n=0;n<e.length;n+=3){var l=e[n],o=e[n+1],f=e[n+2];if(typeof o!="function"){if(Xf(o||l)===null)continue;break}var p=xi(l);p!==null&&(e.splice(n,3),n-=3,Yc(p,{pending:!0,data:f,method:l.method,action:o},o,f))}}))}function ml(e){function n(q){return Os(q,e)}qi!==null&&Os(qi,e),Vi!==null&&Os(Vi,e),Ii!==null&&Os(Ii,e),_a.forEach(n),Na.forEach(n);for(var l=0;l<Yi.length;l++){var o=Yi[l];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Yi.length&&(l=Yi[0],l.blockedOn===null);)xy(l),l.blockedOn===null&&Yi.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(o=0;o<l.length;o+=3){var f=l[o],p=l[o+1],b=f[ze]||null;if(typeof p=="function")b||by(l);else if(b){var N=null;if(p&&p.hasAttribute("formAction")){if(f=p,b=p[ze]||null)N=b.formAction;else if(Xf(f)!==null)continue}else N=b.action;typeof N=="function"?l[o+1]=N:(l.splice(o,3),o-=3),by(l)}}}function Sy(){function e(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),o||setTimeout(l,20)}function l(){if(!o&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function Zf(e){this._internalRoot=e}ks.prototype.render=Zf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(a(409));var l=n.current,o=rn();dy(l,o,e,n,null,null)},ks.prototype.unmount=Zf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;dy(e.current,2,null,e,null,null),hs(),n[Gn]=null}};function ks(e){this._internalRoot=e}ks.prototype.unstable_scheduleHydration=function(e){if(e){var n=go();e={blockedOn:null,target:e,priority:n};for(var l=0;l<Yi.length&&n!==0&&n<Yi[l].priority;l++);Yi.splice(l,0,e),l===0&&xy(e)}};var wy=i.version;if(wy!=="19.2.4")throw Error(a(527,wy,"19.2.4"));B.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=h(n),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var bw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Rs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rs.isDisabled&&Rs.supportsFiber)try{we=Rs.inject(bw),se=Rs}catch{}}return Ma.createRoot=function(e,n){if(!s(e))throw Error(a(299));var l=!1,o="",f=Mm,p=zm,b=Om;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=cy(e,1,!1,null,null,l,o,null,f,p,b,Sy),e[Gn]=n.current,Af(e),new Zf(n)},Ma.hydrateRoot=function(e,n,l){if(!s(e))throw Error(a(299));var o=!1,f="",p=Mm,b=zm,N=Om,q=null;return l!=null&&(l.unstable_strictMode===!0&&(o=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(p=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(N=l.onRecoverableError),l.formState!==void 0&&(q=l.formState)),n=cy(e,1,!0,n,l??null,o,f,q,p,b,N,Sy),n.context=fy(null),l=n.current,o=rn(),o=Hl(o),f=Ai(o),f.callback=null,Mi(l,f,o),l=o,n.current.lanes=l,Wi(n,l),jn(n),e[Gn]=n.current,Af(e),new ks(n)},Ma.version="19.2.4",Ma}var Dy;function zw(){if(Dy)return $f.exports;Dy=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(i){console.error(i)}}return t(),$f.exports=Mw(),$f.exports}var Ow=zw(),no=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Dw={setTimeout:(t,i)=>setTimeout(t,i),clearTimeout:t=>clearTimeout(t),setInterval:(t,i)=>setInterval(t,i),clearInterval:t=>clearInterval(t)},kw=class{#t=Dw;#e=!1;setTimeoutProvider(t){this.#t=t}setTimeout(t,i){return this.#t.setTimeout(t,i)}clearTimeout(t){this.#t.clearTimeout(t)}setInterval(t,i){return this.#t.setInterval(t,i)}clearInterval(t){this.#t.clearInterval(t)}},br=new kw;function Rw(t){setTimeout(t,0)}var Cr=typeof window>"u"||"Deno"in globalThis;function Xe(){}function jw(t,i){return typeof t=="function"?t(i):t}function Ad(t){return typeof t=="number"&&t>=0&&t!==1/0}function Ux(t,i){return Math.max(t+(i||0)-Date.now(),0)}function Ki(t,i){return typeof t=="function"?t(i):t}function yn(t,i){return typeof t=="function"?t(i):t}function ky(t,i){const{type:r="all",exact:a,fetchStatus:s,predicate:u,queryKey:c,stale:d}=t;if(c){if(a){if(i.queryHash!==lh(c,i.options))return!1}else if(!Qa(i.queryKey,c))return!1}if(r!=="all"){const m=i.isActive();if(r==="active"&&!m||r==="inactive"&&m)return!1}return!(typeof d=="boolean"&&i.isStale()!==d||s&&s!==i.state.fetchStatus||u&&!u(i))}function Ry(t,i){const{exact:r,status:a,predicate:s,mutationKey:u}=t;if(u){if(!i.options.mutationKey)return!1;if(r){if(Ya(i.options.mutationKey)!==Ya(u))return!1}else if(!Qa(i.options.mutationKey,u))return!1}return!(a&&i.state.status!==a||s&&!s(i))}function lh(t,i){return(i?.queryKeyHashFn||Ya)(t)}function Ya(t){return JSON.stringify(t,(i,r)=>zd(r)?Object.keys(r).sort().reduce((a,s)=>(a[s]=r[s],a),{}):r)}function Qa(t,i){return t===i?!0:typeof t!=typeof i?!1:t&&i&&typeof t=="object"&&typeof i=="object"?Object.keys(i).every(r=>Qa(t[r],i[r])):!1}var Hw=Object.prototype.hasOwnProperty;function qx(t,i,r=0){if(t===i)return t;if(r>500)return i;const a=jy(t)&&jy(i);if(!a&&!(zd(t)&&zd(i)))return i;const u=(a?t:Object.keys(t)).length,c=a?i:Object.keys(i),d=c.length,m=a?new Array(d):{};let h=0;for(let g=0;g<d;g++){const y=a?g:c[g],x=t[y],v=i[y];if(x===v){m[y]=x,(a?g<u:Hw.call(t,y))&&h++;continue}if(x===null||v===null||typeof x!="object"||typeof v!="object"){m[y]=v;continue}const S=qx(x,v,r+1);m[y]=S,S===x&&h++}return u===d&&h===u?t:m}function Md(t,i){if(!i||Object.keys(t).length!==Object.keys(i).length)return!1;for(const r in t)if(t[r]!==i[r])return!1;return!0}function jy(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function zd(t){if(!Hy(t))return!1;const i=t.constructor;if(i===void 0)return!0;const r=i.prototype;return!(!Hy(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Hy(t){return Object.prototype.toString.call(t)==="[object Object]"}function Lw(t){return new Promise(i=>{br.setTimeout(i,t)})}function Od(t,i,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,i):r.structuralSharing!==!1?qx(t,i):i}function Bw(t,i,r=0){const a=[...t,i];return r&&a.length>r?a.slice(1):a}function Uw(t,i,r=0){const a=[i,...t];return r&&a.length>r?a.slice(0,-1):a}var ah=Symbol();function Vx(t,i){return!t.queryFn&&i?.initialPromise?()=>i.initialPromise:!t.queryFn||t.queryFn===ah?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Ix(t,i){return typeof t=="function"?t(...i):!!t}function qw(t,i,r){let a=!1,s;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(s??=i(),a||(a=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),t}var Vw=class extends no{#t;#e;#n;constructor(){super(),this.#n=t=>{if(!Cr&&window.addEventListener){const i=()=>t();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#n=t,this.#e?.(),this.#e=t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(t){this.#t!==t&&(this.#t=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(i=>{i(t)})}isFocused(){return typeof this.#t=="boolean"?this.#t:globalThis.document?.visibilityState!=="hidden"}},oh=new Vw;function Dd(){let t,i;const r=new Promise((s,u)=>{t=s,i=u});r.status="pending",r.catch(()=>{});function a(s){Object.assign(r,s),delete r.resolve,delete r.reject}return r.resolve=s=>{a({status:"fulfilled",value:s}),t(s)},r.reject=s=>{a({status:"rejected",reason:s}),i(s)},r}var Iw=Rw;function Yw(){let t=[],i=0,r=d=>{d()},a=d=>{d()},s=Iw;const u=d=>{i?t.push(d):s(()=>{r(d)})},c=()=>{const d=t;t=[],d.length&&s(()=>{a(()=>{d.forEach(m=>{r(m)})})})};return{batch:d=>{let m;i++;try{m=d()}finally{i--,i||c()}return m},batchCalls:d=>(...m)=>{u(()=>{d(...m)})},schedule:u,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{s=d}}}var Te=Yw(),Qw=class extends no{#t=!0;#e;#n;constructor(){super(),this.#n=t=>{if(!Cr&&window.addEventListener){const i=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#e||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#e?.(),this.#e=void 0)}setEventListener(t){this.#n=t,this.#e?.(),this.#e=t(this.setOnline.bind(this))}setOnline(t){this.#t!==t&&(this.#t=t,this.listeners.forEach(r=>{r(t)}))}isOnline(){return this.#t}},nu=new Qw;function Xw(t){return Math.min(1e3*2**t,3e4)}function Yx(t){return(t??"online")==="online"?nu.isOnline():!0}var kd=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Qx(t){let i=!1,r=0,a;const s=Dd(),u=()=>s.status!=="pending",c=_=>{if(!u()){const M=new kd(_);x(M),t.onCancel?.(M)}},d=()=>{i=!0},m=()=>{i=!1},h=()=>oh.isFocused()&&(t.networkMode==="always"||nu.isOnline())&&t.canRun(),g=()=>Yx(t.networkMode)&&t.canRun(),y=_=>{u()||(a?.(),s.resolve(_))},x=_=>{u()||(a?.(),s.reject(_))},v=()=>new Promise(_=>{a=M=>{(u()||h())&&_(M)},t.onPause?.()}).then(()=>{a=void 0,u()||t.onContinue?.()}),S=()=>{if(u())return;let _;const M=r===0?t.initialPromise:void 0;try{_=M??t.fn()}catch(C){_=Promise.reject(C)}Promise.resolve(_).then(y).catch(C=>{if(u())return;const j=t.retry??(Cr?0:3),w=t.retryDelay??Xw,k=typeof w=="function"?w(r,C):w,I=j===!0||typeof j=="number"&&r<j||typeof j=="function"&&j(r,C);if(i||!I){x(C);return}r++,t.onFail?.(r,C),Lw(k).then(()=>h()?void 0:v()).then(()=>{i?x(C):S()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(a?.(),s),cancelRetry:d,continueRetry:m,canStart:g,start:()=>(g()?S():v().then(S),s)}}var Xx=class{#t;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ad(this.gcTime)&&(this.#t=br.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Cr?1/0:300*1e3))}clearGcTimeout(){this.#t&&(br.clearTimeout(this.#t),this.#t=void 0)}},Gw=class extends Xx{#t;#e;#n;#r;#i;#o;#a;constructor(t){super(),this.#a=!1,this.#o=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#n=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=By(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(t){if(this.options={...this.#o,...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=By(this.options);i.data!==void 0&&(this.setState(Ly(i.data,i.dataUpdatedAt)),this.#t=i)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(t,i){const r=Od(this.state.data,t,this.options);return this.#l({data:r,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),r}setState(t,i){this.#l({type:"setState",state:t,setStateOptions:i})}cancel(t){const i=this.#i?.promise;return this.#i?.cancel(t),i?i.then(Xe).catch(Xe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>yn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ah||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ki(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Ux(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(i=>i.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(i=>i.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(i=>i!==t),this.observers.length||(this.#i&&(this.#a?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,i){if(this.state.fetchStatus!=="idle"&&this.#i?.status()!=="rejected"){if(this.state.data!==void 0&&i?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(m=>m.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,a=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(this.#a=!0,r.signal)})},s=()=>{const d=Vx(this.options,i),h=(()=>{const g={client:this.#r,queryKey:this.queryKey,meta:this.meta};return a(g),g})();return this.#a=!1,this.options.persister?this.options.persister(d,h,this):d(h)},c=(()=>{const d={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:s};return a(d),d})();this.options.behavior?.onFetch(c,this),this.#e=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==c.fetchOptions?.meta)&&this.#l({type:"fetch",meta:c.fetchOptions?.meta}),this.#i=Qx({initialPromise:i?.initialPromise,fn:c.fetchFn,onCancel:d=>{d instanceof kd&&d.revert&&this.setState({...this.#e,fetchStatus:"idle"}),r.abort()},onFail:(d,m)=>{this.#l({type:"failed",failureCount:d,error:m})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0});try{const d=await this.#i.start();if(d===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(d),this.#n.config.onSuccess?.(d,this),this.#n.config.onSettled?.(d,this.state.error,this),d}catch(d){if(d instanceof kd){if(d.silent)return this.#i.promise;if(d.revert){if(this.state.data===void 0)throw d;return this.state.data}}throw this.#l({type:"error",error:d}),this.#n.config.onError?.(d,this),this.#n.config.onSettled?.(this.state.data,d,this),d}finally{this.scheduleGc()}}#l(t){const i=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Gx(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...Ly(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=t.manual?a:void 0,a;case"error":const s=t.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=i(this.state),Te.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:t})})}};function Gx(t,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Yx(i.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Ly(t,i){return{data:t,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function By(t){const i=typeof t.initialData=="function"?t.initialData():t.initialData,r=i!==void 0,a=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:r?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Zw=class extends no{constructor(t,i){super(),this.options=i,this.#t=t,this.#l=null,this.#a=Dd(),this.bindMethods(),this.setOptions(i)}#t;#e=void 0;#n=void 0;#r=void 0;#i;#o;#a;#l;#m;#d;#h;#u;#c;#s;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#e.addObserver(this),Uy(this.#e,this.options)?this.#f():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Rd(this.#e,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Rd(this.#e,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#S(),this.#e.removeObserver(this)}setOptions(t){const i=this.options,r=this.#e;if(this.options=this.#t.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yn(this.options.enabled,this.#e)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#e.setOptions(this.options),i._defaulted&&!Md(this.options,i)&&this.#t.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#e,observer:this});const a=this.hasListeners();a&&qy(this.#e,r,this.options,i)&&this.#f(),this.updateResult(),a&&(this.#e!==r||yn(this.options.enabled,this.#e)!==yn(i.enabled,this.#e)||Ki(this.options.staleTime,this.#e)!==Ki(i.staleTime,this.#e))&&this.#g();const s=this.#y();a&&(this.#e!==r||yn(this.options.enabled,this.#e)!==yn(i.enabled,this.#e)||s!==this.#s)&&this.#x(s)}getOptimisticResult(t){const i=this.#t.getQueryCache().build(this.#t,t),r=this.createResult(i,t);return Kw(this,r)&&(this.#r=r,this.#o=this.options,this.#i=this.#e.state),r}getCurrentResult(){return this.#r}trackResult(t,i){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),i?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#a.status==="pending"&&this.#a.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#e}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const i=this.#t.defaultQueryOptions(t),r=this.#t.getQueryCache().build(this.#t,i);return r.fetch().then(()=>this.createResult(r,i))}fetch(t){return this.#f({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#f(t){this.#w();let i=this.#e.fetch(this.options,t);return t?.throwOnError||(i=i.catch(Xe)),i}#g(){this.#b();const t=Ki(this.options.staleTime,this.#e);if(Cr||this.#r.isStale||!Ad(t))return;const r=Ux(this.#r.dataUpdatedAt,t)+1;this.#u=br.setTimeout(()=>{this.#r.isStale||this.updateResult()},r)}#y(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#e):this.options.refetchInterval)??!1}#x(t){this.#S(),this.#s=t,!(Cr||yn(this.options.enabled,this.#e)===!1||!Ad(this.#s)||this.#s===0)&&(this.#c=br.setInterval(()=>{(this.options.refetchIntervalInBackground||oh.isFocused())&&this.#f()},this.#s))}#v(){this.#g(),this.#x(this.#y())}#b(){this.#u&&(br.clearTimeout(this.#u),this.#u=void 0)}#S(){this.#c&&(br.clearInterval(this.#c),this.#c=void 0)}createResult(t,i){const r=this.#e,a=this.options,s=this.#r,u=this.#i,c=this.#o,m=t!==r?t.state:this.#n,{state:h}=t;let g={...h},y=!1,x;if(i._optimisticResults){const G=this.hasListeners(),Z=!G&&Uy(t,i),lt=G&&qy(t,r,i,a);(Z||lt)&&(g={...g,...Gx(h.data,t.options)}),i._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:v,errorUpdatedAt:S,status:_}=g;x=g.data;let M=!1;if(i.placeholderData!==void 0&&x===void 0&&_==="pending"){let G;s?.isPlaceholderData&&i.placeholderData===c?.placeholderData?(G=s.data,M=!0):G=typeof i.placeholderData=="function"?i.placeholderData(this.#h?.state.data,this.#h):i.placeholderData,G!==void 0&&(_="success",x=Od(s?.data,G,i),y=!0)}if(i.select&&x!==void 0&&!M)if(s&&x===u?.data&&i.select===this.#m)x=this.#d;else try{this.#m=i.select,x=i.select(x),x=Od(s?.data,x,i),this.#d=x,this.#l=null}catch(G){this.#l=G}this.#l&&(v=this.#l,x=this.#d,S=Date.now(),_="error");const C=g.fetchStatus==="fetching",j=_==="pending",w=_==="error",k=j&&C,I=x!==void 0,H={status:_,fetchStatus:g.fetchStatus,isPending:j,isSuccess:_==="success",isError:w,isInitialLoading:k,isLoading:k,data:x,dataUpdatedAt:g.dataUpdatedAt,error:v,errorUpdatedAt:S,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:g.dataUpdateCount>0||g.errorUpdateCount>0,isFetchedAfterMount:g.dataUpdateCount>m.dataUpdateCount||g.errorUpdateCount>m.errorUpdateCount,isFetching:C,isRefetching:C&&!j,isLoadingError:w&&!I,isPaused:g.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:w&&I,isStale:sh(t,i),refetch:this.refetch,promise:this.#a,isEnabled:yn(i.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const G=H.data!==void 0,Z=H.status==="error"&&!G,lt=et=>{Z?et.reject(H.error):G&&et.resolve(H.data)},L=()=>{const et=this.#a=H.promise=Dd();lt(et)},Q=this.#a;switch(Q.status){case"pending":t.queryHash===r.queryHash&&lt(Q);break;case"fulfilled":(Z||H.data!==Q.value)&&L();break;case"rejected":(!Z||H.error!==Q.reason)&&L();break}}return H}updateResult(){const t=this.#r,i=this.createResult(this.#e,this.options);if(this.#i=this.#e.state,this.#o=this.options,this.#i.data!==void 0&&(this.#h=this.#e),Md(i,t))return;this.#r=i;const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!this.#p.size)return!0;const u=new Set(s??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#r).some(c=>{const d=c;return this.#r[d]!==t[d]&&u.has(d)})};this.#E({listeners:r()})}#w(){const t=this.#t.getQueryCache().build(this.#t,this.options);if(t===this.#e)return;const i=this.#e;this.#e=t,this.#n=t.state,this.hasListeners()&&(i?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#E(t){Te.batch(()=>{t.listeners&&this.listeners.forEach(i=>{i(this.#r)}),this.#t.getQueryCache().notify({query:this.#e,type:"observerResultsUpdated"})})}};function Fw(t,i){return yn(i.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&i.retryOnMount===!1)}function Uy(t,i){return Fw(t,i)||t.state.data!==void 0&&Rd(t,i,i.refetchOnMount)}function Rd(t,i,r){if(yn(i.enabled,t)!==!1&&Ki(i.staleTime,t)!=="static"){const a=typeof r=="function"?r(t):r;return a==="always"||a!==!1&&sh(t,i)}return!1}function qy(t,i,r,a){return(t!==i||yn(a.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&sh(t,r)}function sh(t,i){return yn(i.enabled,t)!==!1&&t.isStaleByTime(Ki(i.staleTime,t))}function Kw(t,i){return!Md(t.getCurrentResult(),i)}function Vy(t){return{onFetch:(i,r)=>{const a=i.options,s=i.fetchOptions?.meta?.fetchMore?.direction,u=i.state.data?.pages||[],c=i.state.data?.pageParams||[];let d={pages:[],pageParams:[]},m=0;const h=async()=>{let g=!1;const y=S=>{qw(S,()=>i.signal,()=>g=!0)},x=Vx(i.options,i.fetchOptions),v=async(S,_,M)=>{if(g)return Promise.reject();if(_==null&&S.pages.length)return Promise.resolve(S);const j=(()=>{const D={client:i.client,queryKey:i.queryKey,pageParam:_,direction:M?"backward":"forward",meta:i.options.meta};return y(D),D})(),w=await x(j),{maxPages:k}=i.options,I=M?Uw:Bw;return{pages:I(S.pages,w,k),pageParams:I(S.pageParams,_,k)}};if(s&&u.length){const S=s==="backward",_=S?$w:Iy,M={pages:u,pageParams:c},C=_(a,M);d=await v(M,C,S)}else{const S=t??u.length;do{const _=m===0?c[0]??a.initialPageParam:Iy(a,d);if(m>0&&_==null)break;d=await v(d,_),m++}while(m<S)}return d};i.options.persister?i.fetchFn=()=>i.options.persister?.(h,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},r):i.fetchFn=h}}}function Iy(t,{pages:i,pageParams:r}){const a=i.length-1;return i.length>0?t.getNextPageParam(i[a],i,r[a],r):void 0}function $w(t,{pages:i,pageParams:r}){return i.length>0?t.getPreviousPageParam?.(i[0],i,r[0],r):void 0}var Pw=class extends Xx{#t;#e;#n;#r;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#e=[],this.state=t.state||Jw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(i=>i!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(t){const i=()=>{this.#i({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Qx({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(u,c)=>{this.#i({type:"failed",failureCount:u,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",s=!this.#r.canStart();try{if(a)i();else{this.#i({type:"pending",variables:t,isPaused:s}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,r);const c=await this.options.onMutate?.(t,r);c!==this.state.context&&this.#i({type:"pending",context:c,variables:t,isPaused:s})}const u=await this.#r.start();return await this.#n.config.onSuccess?.(u,t,this.state.context,this,r),await this.options.onSuccess?.(u,t,this.state.context,r),await this.#n.config.onSettled?.(u,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(u,null,t,this.state.context,r),this.#i({type:"success",data:u}),u}catch(u){try{await this.#n.config.onError?.(u,t,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onError?.(u,t,this.state.context,r)}catch(c){Promise.reject(c)}try{await this.#n.config.onSettled?.(void 0,u,this.state.variables,this.state.context,this,r)}catch(c){Promise.reject(c)}try{await this.options.onSettled?.(void 0,u,t,this.state.context,r)}catch(c){Promise.reject(c)}throw this.#i({type:"error",error:u}),u}finally{this.#n.runNext(this)}}#i(t){const i=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=i(this.state),Te.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Jw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ww=class extends no{constructor(t={}){super(),this.config=t,this.#t=new Set,this.#e=new Map,this.#n=0}#t;#e;#n;build(t,i,r){const a=new Pw({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(i),state:r});return this.add(a),a}add(t){this.#t.add(t);const i=js(t);if(typeof i=="string"){const r=this.#e.get(i);r?r.push(t):this.#e.set(i,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#t.delete(t)){const i=js(t);if(typeof i=="string"){const r=this.#e.get(i);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&this.#e.delete(i)}}this.notify({type:"removed",mutation:t})}canRun(t){const i=js(t);if(typeof i=="string"){const a=this.#e.get(i)?.find(s=>s.state.status==="pending");return!a||a===t}else return!0}runNext(t){const i=js(t);return typeof i=="string"?this.#e.get(i)?.find(a=>a!==t&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Te.batch(()=>{this.#t.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#t.clear(),this.#e.clear()})}getAll(){return Array.from(this.#t)}find(t){const i={exact:!0,...t};return this.getAll().find(r=>Ry(i,r))}findAll(t={}){return this.getAll().filter(i=>Ry(t,i))}notify(t){Te.batch(()=>{this.listeners.forEach(i=>{i(t)})})}resumePausedMutations(){const t=this.getAll().filter(i=>i.state.isPaused);return Te.batch(()=>Promise.all(t.map(i=>i.continue().catch(Xe))))}};function js(t){return t.options.scope?.id}var tE=class extends no{constructor(t={}){super(),this.config=t,this.#t=new Map}#t;build(t,i,r){const a=i.queryKey,s=i.queryHash??lh(a,i);let u=this.get(s);return u||(u=new Gw({client:t,queryKey:a,queryHash:s,options:t.defaultQueryOptions(i),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(u)),u}add(t){this.#t.has(t.queryHash)||(this.#t.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const i=this.#t.get(t.queryHash);i&&(t.destroy(),i===t&&this.#t.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Te.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#t.get(t)}getAll(){return[...this.#t.values()]}find(t){const i={exact:!0,...t};return this.getAll().find(r=>ky(i,r))}findAll(t={}){const i=this.getAll();return Object.keys(t).length>0?i.filter(r=>ky(t,r)):i}notify(t){Te.batch(()=>{this.listeners.forEach(i=>{i(t)})})}onFocus(){Te.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Te.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},eE=class{#t;#e;#n;#r;#i;#o;#a;#l;constructor(t={}){this.#t=t.queryCache||new tE,this.#e=t.mutationCache||new Ww,this.#n=t.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#a=oh.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onFocus())}),this.#l=nu.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#t.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#a?.(),this.#a=void 0,this.#l?.(),this.#l=void 0)}isFetching(t){return this.#t.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#e.findAll({...t,status:"pending"}).length}getQueryData(t){const i=this.defaultQueryOptions({queryKey:t});return this.#t.get(i.queryHash)?.state.data}ensureQueryData(t){const i=this.defaultQueryOptions(t),r=this.#t.build(this,i),a=r.state.data;return a===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(Ki(i.staleTime,r))&&this.prefetchQuery(i),Promise.resolve(a))}getQueriesData(t){return this.#t.findAll(t).map(({queryKey:i,state:r})=>{const a=r.data;return[i,a]})}setQueryData(t,i,r){const a=this.defaultQueryOptions({queryKey:t}),u=this.#t.get(a.queryHash)?.state.data,c=jw(i,u);if(c!==void 0)return this.#t.build(this,a).setData(c,{...r,manual:!0})}setQueriesData(t,i,r){return Te.batch(()=>this.#t.findAll(t).map(({queryKey:a})=>[a,this.setQueryData(a,i,r)]))}getQueryState(t){const i=this.defaultQueryOptions({queryKey:t});return this.#t.get(i.queryHash)?.state}removeQueries(t){const i=this.#t;Te.batch(()=>{i.findAll(t).forEach(r=>{i.remove(r)})})}resetQueries(t,i){const r=this.#t;return Te.batch(()=>(r.findAll(t).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...t},i)))}cancelQueries(t,i={}){const r={revert:!0,...i},a=Te.batch(()=>this.#t.findAll(t).map(s=>s.cancel(r)));return Promise.all(a).then(Xe).catch(Xe)}invalidateQueries(t,i={}){return Te.batch(()=>(this.#t.findAll(t).forEach(r=>{r.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},i)))}refetchQueries(t,i={}){const r={...i,cancelRefetch:i.cancelRefetch??!0},a=Te.batch(()=>this.#t.findAll(t).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let u=s.fetch(void 0,r);return r.throwOnError||(u=u.catch(Xe)),s.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(a).then(Xe)}fetchQuery(t){const i=this.defaultQueryOptions(t);i.retry===void 0&&(i.retry=!1);const r=this.#t.build(this,i);return r.isStaleByTime(Ki(i.staleTime,r))?r.fetch(i):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Xe).catch(Xe)}fetchInfiniteQuery(t){return t.behavior=Vy(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Xe).catch(Xe)}ensureInfiniteQueryData(t){return t.behavior=Vy(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return nu.isOnline()?this.#e.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#t}getMutationCache(){return this.#e}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,i){this.#r.set(Ya(t),{queryKey:t,defaultOptions:i})}getQueryDefaults(t){const i=[...this.#r.values()],r={};return i.forEach(a=>{Qa(t,a.queryKey)&&Object.assign(r,a.defaultOptions)}),r}setMutationDefaults(t,i){this.#i.set(Ya(t),{mutationKey:t,defaultOptions:i})}getMutationDefaults(t){const i=[...this.#i.values()],r={};return i.forEach(a=>{Qa(t,a.mutationKey)&&Object.assign(r,a.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const i={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return i.queryHash||(i.queryHash=lh(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===ah&&(i.enabled=!1),i}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#t.clear(),this.#e.clear()}},Zx=J.createContext(void 0),nE=t=>{const i=J.useContext(Zx);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},iE=({client:t,children:i})=>(J.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),E.jsx(Zx.Provider,{value:t,children:i})),Fx=J.createContext(!1),rE=()=>J.useContext(Fx);Fx.Provider;function lE(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var aE=J.createContext(lE()),oE=()=>J.useContext(aE),sE=(t,i,r)=>{const a=r?.state.error&&typeof t.throwOnError=="function"?Ix(t.throwOnError,[r.state.error,r]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||a)&&(i.isReset()||(t.retryOnMount=!1))},uE=t=>{J.useEffect(()=>{t.clearReset()},[t])},cE=({result:t,errorResetBoundary:i,throwOnError:r,query:a,suspense:s})=>t.isError&&!i.isReset()&&!t.isFetching&&a&&(s&&t.data===void 0||Ix(r,[t.error,a])),fE=t=>{if(t.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),a=t.staleTime;t.staleTime=typeof a=="function"?(...s)=>r(a(...s)):r(a),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},dE=(t,i)=>t.isLoading&&t.isFetching&&!i,hE=(t,i)=>t?.suspense&&i.isPending,Yy=(t,i,r)=>i.fetchOptimistic(t).catch(()=>{r.clearReset()});function pE(t,i,r){const a=rE(),s=oE(),u=nE(),c=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(c);const d=u.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",fE(c),sE(c,s,d),uE(s);const m=!u.getQueryCache().get(c.queryHash),[h]=J.useState(()=>new i(u,c)),g=h.getOptimisticResult(c),y=!a&&t.subscribed!==!1;if(J.useSyncExternalStore(J.useCallback(x=>{const v=y?h.subscribe(Te.batchCalls(x)):Xe;return h.updateResult(),v},[h,y]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),J.useEffect(()=>{h.setOptions(c)},[c,h]),hE(c,g))throw Yy(c,h,s);if(cE({result:g,errorResetBoundary:s,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw g.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(c,g),c.experimental_prefetchInRender&&!Cr&&dE(g,a)&&(m?Yy(c,h,s):d?.promise)?.catch(Xe).finally(()=>{h.updateResult()}),c.notifyOnChangeProps?g:h.trackResult(g)}function xu(t,i){return pE(t,Zw)}async function vu(t){const i=await fetch(t);if(!i.ok)throw new Error(`HTTP ${i.status}: ${i.statusText}`);const r=await i.json();if(!r.success||!r.data)throw new Error(r.error??"Unknown error");return r.data}function mE(){return xu({queryKey:["sessions"],queryFn:()=>vu("/api/v2/sessions")})}function gE(t){return xu({queryKey:["session",t],queryFn:()=>vu(`/api/v2/sessions/${t}`),enabled:!!t})}function yE(t,i){return xu({queryKey:["node",t,i],queryFn:()=>vu(`/api/v2/sessions/${t}/nodes/${i}`),enabled:!!i})}function xE(){return xu({queryKey:["worktrees"],queryFn:()=>vu("/api/v2/worktrees"),refetchInterval:3e4,staleTime:2e4})}const vE={in_progress:{label:"In Progress",color:"var(--accent)"},dormant:{label:"Dormant",color:"var(--text-secondary)"},complete:{label:"Complete",color:"var(--success)"},complete_with_gaps:{label:"Gaps",color:"var(--warning)"},blocked:{label:"Blocked",color:"var(--blocked)"}};function Kx({status:t}){const i=vE[t];return E.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium",style:{backgroundColor:`color-mix(in srgb, ${i.color} 12%, transparent)`,color:i.color},children:i.label})}function $x({health:t}){return t==="healthy"?null:E.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium",style:{backgroundColor:"var(--error)20",color:"var(--error)"},children:"Corrupt"})}const bE=[{value:"recent",label:"Recent"},{value:"status",label:"Status"},{value:"workflow",label:"Workflow"},{value:"nodes",label:"Node count"}],SE=[{value:"none",label:"No grouping"},{value:"workflow",label:"Workflow"},{value:"status",label:"Status"},{value:"branch",label:"Branch"}],wE=[{value:"all",label:"All"},{value:"in_progress",label:"In Progress"},{value:"dormant",label:"Dormant"},{value:"complete",label:"Complete"},{value:"complete_with_gaps",label:"Gaps"},{value:"blocked",label:"Blocked"}],td=25,Qy={in_progress:0,blocked:1,dormant:2,complete_with_gaps:3,complete:4};function EE(t,i,r,a){let s=[...t];if(r!=="all"&&(s=s.filter(u=>u.status===r)),a!==null&&(s=s.filter(u=>u.repoRoot===a||u.repoRoot===null)),i.trim()){const u=i.toLowerCase();s=s.filter(c=>(c.sessionTitle??"").toLowerCase().includes(u)||(c.workflowName??"").toLowerCase().includes(u)||(c.workflowId??"").toLowerCase().includes(u)||c.sessionId.toLowerCase().includes(u)||(c.gitBranch??"").toLowerCase().includes(u))}return s}function CE(t,i){const r=[...t];switch(i){case"recent":r.sort((a,s)=>s.lastModifiedMs-a.lastModifiedMs);break;case"status":r.sort((a,s)=>Qy[a.status]-Qy[s.status]||s.lastModifiedMs-a.lastModifiedMs);break;case"workflow":r.sort((a,s)=>(a.workflowName??a.workflowId??"").localeCompare(s.workflowName??s.workflowId??"")||s.lastModifiedMs-a.lastModifiedMs);break;case"nodes":r.sort((a,s)=>s.nodeCount-a.nodeCount||s.lastModifiedMs-a.lastModifiedMs);break}return r}function _E(t,i){if(i==="none")return[{label:"",sessions:t}];const r=new Map;for(const a of t){let s;switch(i){case"workflow":s=a.workflowName??a.workflowId??"Unknown workflow";break;case"status":s=a.status;break;case"branch":s=a.gitBranch??"No branch";break}const u=r.get(s)??[];u.push(a),r.set(s,u)}return Array.from(r.entries()).sort(([a],[s])=>a.localeCompare(s)).map(([a,s])=>({label:a,sessions:s}))}function NE(t){const i=Date.now()-t;if(i<0)return"just now";const r=Math.floor(i/1e3);if(r<60)return"just now";const a=Math.floor(r/60);if(a<60)return`${a}m ago`;const s=Math.floor(a/60);if(s<24)return`${s}h ago`;const u=Math.floor(s/24);return u<30?`${u}d ago`:`${Math.floor(u/30)}mo ago`}function TE({onSelectSession:t,initialSearch:i="",initialRepoRoot:r=null}){const{data:a,isLoading:s,error:u}=mE(),[c,d]=J.useState(i),[m]=J.useState(r),[h,g]=J.useState("recent"),[y,x]=J.useState("none"),[v,S]=J.useState("all"),[_,M]=J.useState(0),C=J.useCallback(L=>{d(L),M(0)},[]),j=J.useCallback(L=>{g(L),M(0)},[]),w=J.useCallback(L=>{x(L),M(0)},[]),k=J.useCallback(L=>{S(L),M(0)},[]),I=J.useMemo(()=>{if(!a)return{groups:[],total:0,filtered:0};const L=EE(a.sessions,c,v,m),Q=CE(L,h);return{groups:_E(Q,y),total:a.sessions.length,filtered:L.length}},[a,c,v,m,h,y]),D=J.useMemo(()=>{if(!a)return{};const L={all:a.sessions.length};for(const Q of a.sessions)L[Q.status]=(L[Q.status]??0)+1;return L},[a]);if(s)return E.jsx("div",{className:"flex items-center justify-center py-20",children:E.jsx("div",{className:"text-[var(--text-secondary)] text-sm",children:"Loading sessions..."})});if(u)return E.jsxs("div",{className:"text-[var(--error)] bg-[var(--bg-card)] rounded-lg p-4",children:["Failed to load sessions: ",u.message]});if(!a||a.sessions.length===0)return E.jsxs("div",{className:"text-center py-16",children:[E.jsx("p",{className:"text-[var(--text-secondary)] text-lg",children:"No v2 sessions found"}),E.jsx("p",{className:"text-[var(--text-muted)] text-sm mt-2",children:"Sessions will appear here when workflows are executed with v2 tools enabled."})]});const H=y!=="none",G=_*td,Z=G+td,lt=Math.ceil(I.filtered/td);return E.jsxs("div",{className:"space-y-4",children:[E.jsx("div",{className:"flex items-center justify-between",children:E.jsxs("h2",{className:"text-lg font-medium text-[var(--text-primary)]",children:["Sessions",E.jsx("span",{className:"text-[var(--text-muted)] font-normal ml-2 text-sm",children:I.filtered===I.total?I.total:`${I.filtered} / ${I.total}`})]})}),E.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[E.jsxs("div",{className:"relative flex-1 min-w-[200px] max-w-[360px]",children:[E.jsx("input",{type:"text",value:c,onChange:L=>C(L.target.value),placeholder:"Search sessions...",className:"w-full bg-[var(--bg-secondary)] border border-[var(--border)] rounded-md px-3 py-1.5 text-sm text-[var(--text-primary)] placeholder-[var(--text-muted)] focus:outline-none focus:border-[var(--accent)] transition-colors"}),c&&E.jsx("button",{onClick:()=>C(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-[var(--text-muted)] hover:text-[var(--text-primary)] text-xs",children:"clear"})]}),E.jsx(Xy,{label:"Sort",value:h,options:bE,onChange:j}),E.jsx(Xy,{label:"Group",value:y,options:SE,onChange:w})]}),E.jsx("div",{className:"flex flex-wrap gap-1.5",children:wE.map(L=>{const Q=D[L.value]??0;if(L.value!=="all"&&Q===0)return null;const et=v===L.value;return E.jsxs("button",{onClick:()=>k(L.value),className:`px-2.5 py-1 rounded-full text-xs font-medium transition-colors cursor-pointer ${et?"bg-[var(--accent)] text-white":"bg-[var(--bg-secondary)] text-[var(--text-secondary)] hover:bg-[var(--bg-card)] hover:text-[var(--text-primary)]"}`,children:[L.label,E.jsx("span",{className:"ml-1 opacity-70",children:Q})]},L.value)})}),I.filtered===0?E.jsx("div",{className:"text-center py-12 text-[var(--text-muted)] text-sm",children:"No sessions match the current filters"}):H?E.jsx("div",{className:"space-y-6",children:I.groups.map(L=>E.jsx(AE,{label:L.label,sessions:L.sessions,onSelectSession:t},L.label))}):E.jsxs(E.Fragment,{children:[E.jsx("div",{className:"space-y-2",children:I.groups[0]?.sessions.slice(G,Z).map(L=>E.jsx(Px,{session:L,onClick:()=>t(L.sessionId)},L.sessionId))}),lt>1&&E.jsx(ME,{page:_,totalPages:lt,onPageChange:M})]})]})}function Xy({label:t,value:i,options:r,onChange:a}){return E.jsxs("label",{className:"flex items-center gap-1.5 text-xs text-[var(--text-muted)]",children:[t,E.jsx("select",{value:i,onChange:s=>a(s.target.value),className:"bg-[var(--bg-secondary)] border border-[var(--border)] rounded-md px-2 py-1.5 text-xs text-[var(--text-primary)] focus:outline-none focus:border-[var(--accent)] cursor-pointer",children:r.map(s=>E.jsx("option",{value:s.value,children:s.label},s.value))})]})}function AE({label:t,sessions:i,onSelectSession:r}){const[a,s]=J.useState(!1);return E.jsxs("div",{children:[E.jsxs("button",{onClick:()=>s(!a),className:"flex items-center gap-2 mb-2 cursor-pointer group",children:[E.jsx("span",{className:"text-[var(--text-muted)] text-xs transition-transform duration-150",style:{transform:a?"rotate(-90deg)":"rotate(0deg)"},children:"▼"}),E.jsx("span",{className:"text-sm font-medium text-[var(--text-secondary)] group-hover:text-[var(--text-primary)] transition-colors",children:t}),E.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["(",i.length,")"]})]}),!a&&E.jsx("div",{className:"space-y-2 ml-4",children:i.map(u=>E.jsx(Px,{session:u,onClick:()=>r(u.sessionId)},u.sessionId))})]})}function ME({page:t,totalPages:i,onPageChange:r}){return E.jsxs("div",{className:"flex items-center justify-center gap-2 pt-2",children:[E.jsx("button",{onClick:()=>r(t-1),disabled:t===0,className:"px-3 py-1.5 text-xs rounded-md bg-[var(--bg-secondary)] border border-[var(--border)] text-[var(--text-secondary)] disabled:opacity-30 disabled:cursor-not-allowed hover:bg-[var(--bg-card)] transition-colors cursor-pointer",children:"Prev"}),E.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:[t+1," / ",i]}),E.jsx("button",{onClick:()=>r(t+1),disabled:t>=i-1,className:"px-3 py-1.5 text-xs rounded-md bg-[var(--bg-secondary)] border border-[var(--border)] text-[var(--text-secondary)] disabled:opacity-30 disabled:cursor-not-allowed hover:bg-[var(--bg-card)] transition-colors cursor-pointer",children:"Next"})]})}function Px({session:t,onClick:i}){const r=t.sessionTitle,a=t.workflowName??t.workflowId,s=NE(t.lastModifiedMs);return E.jsxs("button",{onClick:i,className:"w-full text-left bg-[var(--bg-card)] border border-[var(--border)] rounded-lg px-4 py-3 hover:border-[var(--accent)] transition-colors cursor-pointer group",children:[E.jsxs("div",{className:"flex items-start justify-between gap-3",children:[E.jsx("div",{className:"min-w-0 flex-1",children:E.jsx("div",{className:"text-sm font-medium text-[var(--text-primary)] line-clamp-1 group-hover:text-[var(--accent)] transition-colors",children:r??a??"Unnamed session"})}),E.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[E.jsx("span",{className:"text-[10px] text-[var(--text-muted)] tabular-nums",children:s}),E.jsx($x,{health:t.health}),E.jsx(Kx,{status:t.status})]})]}),E.jsxs("div",{className:"flex items-center gap-2 mt-1.5 flex-wrap",children:[r&&a&&E.jsx(Hs,{children:a}),t.gitBranch&&E.jsx(Hs,{icon:"branch",children:t.gitBranch}),E.jsxs(Hs,{icon:"graph",children:[t.nodeCount,"N / ",t.edgeCount,"E"]}),t.tipCount>1&&E.jsxs(Hs,{icon:"fork",children:[t.tipCount," tips"]}),t.hasUnresolvedGaps&&E.jsx("span",{className:"inline-flex items-center gap-1 text-[10px] text-[var(--warning)]",children:"⚠ gaps"})]}),E.jsx("div",{className:"mt-1.5 font-mono text-[10px] text-[var(--text-muted)] opacity-60 group-hover:opacity-100 transition-opacity truncate",children:t.sessionId})]})}const zE={branch:E.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",className:"shrink-0",children:E.jsx("path",{d:"M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.5 2.5 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Z"})}),graph:E.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",className:"shrink-0",children:E.jsx("path",{d:"M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.5 2.5 0 0 1 2 11.5Z"})}),fork:E.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",className:"shrink-0",children:E.jsx("path",{d:"M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm2.122-.75a2.25 2.25 0 1 0-3.244 0A2.5 2.5 0 0 0 2 5v5.5A2.5 2.5 0 0 0 4.5 13h3.25a.75.75 0 0 0 0-1.5H4.5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v5.5a1 1 0 0 1-1 1H8.75Z"})})};function Hs({children:t,icon:i}){return E.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded bg-[var(--bg-secondary)] text-[10px] text-[var(--text-muted)] max-w-[200px] truncate",children:[i&&zE[i],t]})}function ye(t){if(typeof t=="string"||typeof t=="number")return""+t;let i="";if(Array.isArray(t))for(let r=0,a;r<t.length;r++)(a=ye(t[r]))!==""&&(i+=(i&&" ")+a);else for(let r in t)t[r]&&(i+=(i&&" ")+r);return i}var OE={value:()=>{}};function bu(){for(var t=0,i=arguments.length,r={},a;t<i;++t){if(!(a=arguments[t]+"")||a in r||/[\s.]/.test(a))throw new Error("illegal type: "+a);r[a]=[]}return new $s(r)}function $s(t){this._=t}function DE(t,i){return t.trim().split(/^|\s+/).map(function(r){var a="",s=r.indexOf(".");if(s>=0&&(a=r.slice(s+1),r=r.slice(0,s)),r&&!i.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:a}})}$s.prototype=bu.prototype={constructor:$s,on:function(t,i){var r=this._,a=DE(t+"",r),s,u=-1,c=a.length;if(arguments.length<2){for(;++u<c;)if((s=(t=a[u]).type)&&(s=kE(r[s],t.name)))return s;return}if(i!=null&&typeof i!="function")throw new Error("invalid callback: "+i);for(;++u<c;)if(s=(t=a[u]).type)r[s]=Gy(r[s],t.name,i);else if(i==null)for(s in r)r[s]=Gy(r[s],t.name,null);return this},copy:function(){var t={},i=this._;for(var r in i)t[r]=i[r].slice();return new $s(t)},call:function(t,i){if((s=arguments.length-2)>0)for(var r=new Array(s),a=0,s,u;a<s;++a)r[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(u=this._[t],a=0,s=u.length;a<s;++a)u[a].value.apply(i,r)},apply:function(t,i,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var a=this._[t],s=0,u=a.length;s<u;++s)a[s].value.apply(i,r)}};function kE(t,i){for(var r=0,a=t.length,s;r<a;++r)if((s=t[r]).name===i)return s.value}function Gy(t,i,r){for(var a=0,s=t.length;a<s;++a)if(t[a].name===i){t[a]=OE,t=t.slice(0,a).concat(t.slice(a+1));break}return r!=null&&t.push({name:i,value:r}),t}var jd="http://www.w3.org/1999/xhtml";const Zy={svg:"http://www.w3.org/2000/svg",xhtml:jd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Su(t){var i=t+="",r=i.indexOf(":");return r>=0&&(i=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Zy.hasOwnProperty(i)?{space:Zy[i],local:t}:t}function RE(t){return function(){var i=this.ownerDocument,r=this.namespaceURI;return r===jd&&i.documentElement.namespaceURI===jd?i.createElement(t):i.createElementNS(r,t)}}function jE(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Jx(t){var i=Su(t);return(i.local?jE:RE)(i)}function HE(){}function uh(t){return t==null?HE:function(){return this.querySelector(t)}}function LE(t){typeof t!="function"&&(t=uh(t));for(var i=this._groups,r=i.length,a=new Array(r),s=0;s<r;++s)for(var u=i[s],c=u.length,d=a[s]=new Array(c),m,h,g=0;g<c;++g)(m=u[g])&&(h=t.call(m,m.__data__,g,u))&&("__data__"in m&&(h.__data__=m.__data__),d[g]=h);return new sn(a,this._parents)}function BE(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function UE(){return[]}function Wx(t){return t==null?UE:function(){return this.querySelectorAll(t)}}function qE(t){return function(){return BE(t.apply(this,arguments))}}function VE(t){typeof t=="function"?t=qE(t):t=Wx(t);for(var i=this._groups,r=i.length,a=[],s=[],u=0;u<r;++u)for(var c=i[u],d=c.length,m,h=0;h<d;++h)(m=c[h])&&(a.push(t.call(m,m.__data__,h,c)),s.push(m));return new sn(a,s)}function tv(t){return function(){return this.matches(t)}}function ev(t){return function(i){return i.matches(t)}}var IE=Array.prototype.find;function YE(t){return function(){return IE.call(this.children,t)}}function QE(){return this.firstElementChild}function XE(t){return this.select(t==null?QE:YE(typeof t=="function"?t:ev(t)))}var GE=Array.prototype.filter;function ZE(){return Array.from(this.children)}function FE(t){return function(){return GE.call(this.children,t)}}function KE(t){return this.selectAll(t==null?ZE:FE(typeof t=="function"?t:ev(t)))}function $E(t){typeof t!="function"&&(t=tv(t));for(var i=this._groups,r=i.length,a=new Array(r),s=0;s<r;++s)for(var u=i[s],c=u.length,d=a[s]=[],m,h=0;h<c;++h)(m=u[h])&&t.call(m,m.__data__,h,u)&&d.push(m);return new sn(a,this._parents)}function nv(t){return new Array(t.length)}function PE(){return new sn(this._enter||this._groups.map(nv),this._parents)}function iu(t,i){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=i}iu.prototype={constructor:iu,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,i){return this._parent.insertBefore(t,i)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function JE(t){return function(){return t}}function WE(t,i,r,a,s,u){for(var c=0,d,m=i.length,h=u.length;c<h;++c)(d=i[c])?(d.__data__=u[c],a[c]=d):r[c]=new iu(t,u[c]);for(;c<m;++c)(d=i[c])&&(s[c]=d)}function t2(t,i,r,a,s,u,c){var d,m,h=new Map,g=i.length,y=u.length,x=new Array(g),v;for(d=0;d<g;++d)(m=i[d])&&(x[d]=v=c.call(m,m.__data__,d,i)+"",h.has(v)?s[d]=m:h.set(v,m));for(d=0;d<y;++d)v=c.call(t,u[d],d,u)+"",(m=h.get(v))?(a[d]=m,m.__data__=u[d],h.delete(v)):r[d]=new iu(t,u[d]);for(d=0;d<g;++d)(m=i[d])&&h.get(x[d])===m&&(s[d]=m)}function e2(t){return t.__data__}function n2(t,i){if(!arguments.length)return Array.from(this,e2);var r=i?t2:WE,a=this._parents,s=this._groups;typeof t!="function"&&(t=JE(t));for(var u=s.length,c=new Array(u),d=new Array(u),m=new Array(u),h=0;h<u;++h){var g=a[h],y=s[h],x=y.length,v=i2(t.call(g,g&&g.__data__,h,a)),S=v.length,_=d[h]=new Array(S),M=c[h]=new Array(S),C=m[h]=new Array(x);r(g,y,_,M,C,v,i);for(var j=0,w=0,k,I;j<S;++j)if(k=_[j]){for(j>=w&&(w=j+1);!(I=M[w])&&++w<S;);k._next=I||null}}return c=new sn(c,a),c._enter=d,c._exit=m,c}function i2(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function r2(){return new sn(this._exit||this._groups.map(nv),this._parents)}function l2(t,i,r){var a=this.enter(),s=this,u=this.exit();return typeof t=="function"?(a=t(a),a&&(a=a.selection())):a=a.append(t+""),i!=null&&(s=i(s),s&&(s=s.selection())),r==null?u.remove():r(u),a&&s?a.merge(s).order():s}function a2(t){for(var i=t.selection?t.selection():t,r=this._groups,a=i._groups,s=r.length,u=a.length,c=Math.min(s,u),d=new Array(s),m=0;m<c;++m)for(var h=r[m],g=a[m],y=h.length,x=d[m]=new Array(y),v,S=0;S<y;++S)(v=h[S]||g[S])&&(x[S]=v);for(;m<s;++m)d[m]=r[m];return new sn(d,this._parents)}function o2(){for(var t=this._groups,i=-1,r=t.length;++i<r;)for(var a=t[i],s=a.length-1,u=a[s],c;--s>=0;)(c=a[s])&&(u&&c.compareDocumentPosition(u)^4&&u.parentNode.insertBefore(c,u),u=c);return this}function s2(t){t||(t=u2);function i(y,x){return y&&x?t(y.__data__,x.__data__):!y-!x}for(var r=this._groups,a=r.length,s=new Array(a),u=0;u<a;++u){for(var c=r[u],d=c.length,m=s[u]=new Array(d),h,g=0;g<d;++g)(h=c[g])&&(m[g]=h);m.sort(i)}return new sn(s,this._parents).order()}function u2(t,i){return t<i?-1:t>i?1:t>=i?0:NaN}function c2(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function f2(){return Array.from(this)}function d2(){for(var t=this._groups,i=0,r=t.length;i<r;++i)for(var a=t[i],s=0,u=a.length;s<u;++s){var c=a[s];if(c)return c}return null}function h2(){let t=0;for(const i of this)++t;return t}function p2(){return!this.node()}function m2(t){for(var i=this._groups,r=0,a=i.length;r<a;++r)for(var s=i[r],u=0,c=s.length,d;u<c;++u)(d=s[u])&&t.call(d,d.__data__,u,s);return this}function g2(t){return function(){this.removeAttribute(t)}}function y2(t){return function(){this.removeAttributeNS(t.space,t.local)}}function x2(t,i){return function(){this.setAttribute(t,i)}}function v2(t,i){return function(){this.setAttributeNS(t.space,t.local,i)}}function b2(t,i){return function(){var r=i.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function S2(t,i){return function(){var r=i.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function w2(t,i){var r=Su(t);if(arguments.length<2){var a=this.node();return r.local?a.getAttributeNS(r.space,r.local):a.getAttribute(r)}return this.each((i==null?r.local?y2:g2:typeof i=="function"?r.local?S2:b2:r.local?v2:x2)(r,i))}function iv(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function E2(t){return function(){this.style.removeProperty(t)}}function C2(t,i,r){return function(){this.style.setProperty(t,i,r)}}function _2(t,i,r){return function(){var a=i.apply(this,arguments);a==null?this.style.removeProperty(t):this.style.setProperty(t,a,r)}}function N2(t,i,r){return arguments.length>1?this.each((i==null?E2:typeof i=="function"?_2:C2)(t,i,r??"")):_l(this.node(),t)}function _l(t,i){return t.style.getPropertyValue(i)||iv(t).getComputedStyle(t,null).getPropertyValue(i)}function T2(t){return function(){delete this[t]}}function A2(t,i){return function(){this[t]=i}}function M2(t,i){return function(){var r=i.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function z2(t,i){return arguments.length>1?this.each((i==null?T2:typeof i=="function"?M2:A2)(t,i)):this.node()[t]}function rv(t){return t.trim().split(/^|\s+/)}function ch(t){return t.classList||new lv(t)}function lv(t){this._node=t,this._names=rv(t.getAttribute("class")||"")}lv.prototype={add:function(t){var i=this._names.indexOf(t);i<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var i=this._names.indexOf(t);i>=0&&(this._names.splice(i,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function av(t,i){for(var r=ch(t),a=-1,s=i.length;++a<s;)r.add(i[a])}function ov(t,i){for(var r=ch(t),a=-1,s=i.length;++a<s;)r.remove(i[a])}function O2(t){return function(){av(this,t)}}function D2(t){return function(){ov(this,t)}}function k2(t,i){return function(){(i.apply(this,arguments)?av:ov)(this,t)}}function R2(t,i){var r=rv(t+"");if(arguments.length<2){for(var a=ch(this.node()),s=-1,u=r.length;++s<u;)if(!a.contains(r[s]))return!1;return!0}return this.each((typeof i=="function"?k2:i?O2:D2)(r,i))}function j2(){this.textContent=""}function H2(t){return function(){this.textContent=t}}function L2(t){return function(){var i=t.apply(this,arguments);this.textContent=i??""}}function B2(t){return arguments.length?this.each(t==null?j2:(typeof t=="function"?L2:H2)(t)):this.node().textContent}function U2(){this.innerHTML=""}function q2(t){return function(){this.innerHTML=t}}function V2(t){return function(){var i=t.apply(this,arguments);this.innerHTML=i??""}}function I2(t){return arguments.length?this.each(t==null?U2:(typeof t=="function"?V2:q2)(t)):this.node().innerHTML}function Y2(){this.nextSibling&&this.parentNode.appendChild(this)}function Q2(){return this.each(Y2)}function X2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function G2(){return this.each(X2)}function Z2(t){var i=typeof t=="function"?t:Jx(t);return this.select(function(){return this.appendChild(i.apply(this,arguments))})}function F2(){return null}function K2(t,i){var r=typeof t=="function"?t:Jx(t),a=i==null?F2:typeof i=="function"?i:uh(i);return this.select(function(){return this.insertBefore(r.apply(this,arguments),a.apply(this,arguments)||null)})}function $2(){var t=this.parentNode;t&&t.removeChild(this)}function P2(){return this.each($2)}function J2(){var t=this.cloneNode(!1),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function W2(){var t=this.cloneNode(!0),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function tC(t){return this.select(t?W2:J2)}function eC(t){return arguments.length?this.property("__data__",t):this.node().__data__}function nC(t){return function(i){t.call(this,i,this.__data__)}}function iC(t){return t.trim().split(/^|\s+/).map(function(i){var r="",a=i.indexOf(".");return a>=0&&(r=i.slice(a+1),i=i.slice(0,a)),{type:i,name:r}})}function rC(t){return function(){var i=this.__on;if(i){for(var r=0,a=-1,s=i.length,u;r<s;++r)u=i[r],(!t.type||u.type===t.type)&&u.name===t.name?this.removeEventListener(u.type,u.listener,u.options):i[++a]=u;++a?i.length=a:delete this.__on}}}function lC(t,i,r){return function(){var a=this.__on,s,u=nC(i);if(a){for(var c=0,d=a.length;c<d;++c)if((s=a[c]).type===t.type&&s.name===t.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=u,s.options=r),s.value=i;return}}this.addEventListener(t.type,u,r),s={type:t.type,name:t.name,value:i,listener:u,options:r},a?a.push(s):this.__on=[s]}}function aC(t,i,r){var a=iC(t+""),s,u=a.length,c;if(arguments.length<2){var d=this.node().__on;if(d){for(var m=0,h=d.length,g;m<h;++m)for(s=0,g=d[m];s<u;++s)if((c=a[s]).type===g.type&&c.name===g.name)return g.value}return}for(d=i?lC:rC,s=0;s<u;++s)this.each(d(a[s],i,r));return this}function sv(t,i,r){var a=iv(t),s=a.CustomEvent;typeof s=="function"?s=new s(i,r):(s=a.document.createEvent("Event"),r?(s.initEvent(i,r.bubbles,r.cancelable),s.detail=r.detail):s.initEvent(i,!1,!1)),t.dispatchEvent(s)}function oC(t,i){return function(){return sv(this,t,i)}}function sC(t,i){return function(){return sv(this,t,i.apply(this,arguments))}}function uC(t,i){return this.each((typeof i=="function"?sC:oC)(t,i))}function*cC(){for(var t=this._groups,i=0,r=t.length;i<r;++i)for(var a=t[i],s=0,u=a.length,c;s<u;++s)(c=a[s])&&(yield c)}var uv=[null];function sn(t,i){this._groups=t,this._parents=i}function io(){return new sn([[document.documentElement]],uv)}function fC(){return this}sn.prototype=io.prototype={constructor:sn,select:LE,selectAll:VE,selectChild:XE,selectChildren:KE,filter:$E,data:n2,enter:PE,exit:r2,join:l2,merge:a2,selection:fC,order:o2,sort:s2,call:c2,nodes:f2,node:d2,size:h2,empty:p2,each:m2,attr:w2,style:N2,property:z2,classed:R2,text:B2,html:I2,raise:Q2,lower:G2,append:Z2,insert:K2,remove:P2,clone:tC,datum:eC,on:aC,dispatch:uC,[Symbol.iterator]:cC};function an(t){return typeof t=="string"?new sn([[document.querySelector(t)]],[document.documentElement]):new sn([[t]],uv)}function dC(t){let i;for(;i=t.sourceEvent;)t=i;return t}function _n(t,i){if(t=dC(t),i===void 0&&(i=t.currentTarget),i){var r=i.ownerSVGElement||i;if(r.createSVGPoint){var a=r.createSVGPoint();return a.x=t.clientX,a.y=t.clientY,a=a.matrixTransform(i.getScreenCTM().inverse()),[a.x,a.y]}if(i.getBoundingClientRect){var s=i.getBoundingClientRect();return[t.clientX-s.left-i.clientLeft,t.clientY-s.top-i.clientTop]}}return[t.pageX,t.pageY]}const hC={passive:!1},Xa={capture:!0,passive:!1};function ed(t){t.stopImmediatePropagation()}function Sl(t){t.preventDefault(),t.stopImmediatePropagation()}function cv(t){var i=t.document.documentElement,r=an(t).on("dragstart.drag",Sl,Xa);"onselectstart"in i?r.on("selectstart.drag",Sl,Xa):(i.__noselect=i.style.MozUserSelect,i.style.MozUserSelect="none")}function fv(t,i){var r=t.document.documentElement,a=an(t).on("dragstart.drag",null);i&&(a.on("click.drag",Sl,Xa),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in r?a.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Ls=t=>()=>t;function Hd(t,{sourceEvent:i,subject:r,target:a,identifier:s,active:u,x:c,y:d,dx:m,dy:h,dispatch:g}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:u,enumerable:!0,configurable:!0},x:{value:c,enumerable:!0,configurable:!0},y:{value:d,enumerable:!0,configurable:!0},dx:{value:m,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:g}})}Hd.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function pC(t){return!t.ctrlKey&&!t.button}function mC(){return this.parentNode}function gC(t,i){return i??{x:t.x,y:t.y}}function yC(){return navigator.maxTouchPoints||"ontouchstart"in this}function dv(){var t=pC,i=mC,r=gC,a=yC,s={},u=bu("start","drag","end"),c=0,d,m,h,g,y=0;function x(k){k.on("mousedown.drag",v).filter(a).on("touchstart.drag",M).on("touchmove.drag",C,hC).on("touchend.drag touchcancel.drag",j).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(k,I){if(!(g||!t.call(this,k,I))){var D=w(this,i.call(this,k,I),k,I,"mouse");D&&(an(k.view).on("mousemove.drag",S,Xa).on("mouseup.drag",_,Xa),cv(k.view),ed(k),h=!1,d=k.clientX,m=k.clientY,D("start",k))}}function S(k){if(Sl(k),!h){var I=k.clientX-d,D=k.clientY-m;h=I*I+D*D>y}s.mouse("drag",k)}function _(k){an(k.view).on("mousemove.drag mouseup.drag",null),fv(k.view,h),Sl(k),s.mouse("end",k)}function M(k,I){if(t.call(this,k,I)){var D=k.changedTouches,H=i.call(this,k,I),G=D.length,Z,lt;for(Z=0;Z<G;++Z)(lt=w(this,H,k,I,D[Z].identifier,D[Z]))&&(ed(k),lt("start",k,D[Z]))}}function C(k){var I=k.changedTouches,D=I.length,H,G;for(H=0;H<D;++H)(G=s[I[H].identifier])&&(Sl(k),G("drag",k,I[H]))}function j(k){var I=k.changedTouches,D=I.length,H,G;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),H=0;H<D;++H)(G=s[I[H].identifier])&&(ed(k),G("end",k,I[H]))}function w(k,I,D,H,G,Z){var lt=u.copy(),L=_n(Z||D,I),Q,et,R;if((R=r.call(k,new Hd("beforestart",{sourceEvent:D,target:x,identifier:G,active:c,x:L[0],y:L[1],dx:0,dy:0,dispatch:lt}),H))!=null)return Q=R.x-L[0]||0,et=R.y-L[1]||0,function U(z,B,Y){var K=L,A;switch(z){case"start":s[G]=U,A=c++;break;case"end":delete s[G],--c;case"drag":L=_n(Y||B,I),A=c;break}lt.call(z,k,new Hd(z,{sourceEvent:B,subject:R,target:x,identifier:G,active:A,x:L[0]+Q,y:L[1]+et,dx:L[0]-K[0],dy:L[1]-K[1],dispatch:lt}),H)}}return x.filter=function(k){return arguments.length?(t=typeof k=="function"?k:Ls(!!k),x):t},x.container=function(k){return arguments.length?(i=typeof k=="function"?k:Ls(k),x):i},x.subject=function(k){return arguments.length?(r=typeof k=="function"?k:Ls(k),x):r},x.touchable=function(k){return arguments.length?(a=typeof k=="function"?k:Ls(!!k),x):a},x.on=function(){var k=u.on.apply(u,arguments);return k===u?x:k},x.clickDistance=function(k){return arguments.length?(y=(k=+k)*k,x):Math.sqrt(y)},x}function fh(t,i,r){t.prototype=i.prototype=r,r.constructor=t}function hv(t,i){var r=Object.create(t.prototype);for(var a in i)r[a]=i[a];return r}function ro(){}var Ga=.7,ru=1/Ga,wl="\\s*([+-]?\\d+)\\s*",Za="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Un="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xC=/^#([0-9a-f]{3,8})$/,vC=new RegExp(`^rgb\\(${wl},${wl},${wl}\\)$`),bC=new RegExp(`^rgb\\(${Un},${Un},${Un}\\)$`),SC=new RegExp(`^rgba\\(${wl},${wl},${wl},${Za}\\)$`),wC=new RegExp(`^rgba\\(${Un},${Un},${Un},${Za}\\)$`),EC=new RegExp(`^hsl\\(${Za},${Un},${Un}\\)$`),CC=new RegExp(`^hsla\\(${Za},${Un},${Un},${Za}\\)$`),Fy={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};fh(ro,_r,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ky,formatHex:Ky,formatHex8:_C,formatHsl:NC,formatRgb:$y,toString:$y});function Ky(){return this.rgb().formatHex()}function _C(){return this.rgb().formatHex8()}function NC(){return pv(this).formatHsl()}function $y(){return this.rgb().formatRgb()}function _r(t){var i,r;return t=(t+"").trim().toLowerCase(),(i=xC.exec(t))?(r=i[1].length,i=parseInt(i[1],16),r===6?Py(i):r===3?new Ge(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):r===8?Bs(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):r===4?Bs(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|i&240,((i&15)<<4|i&15)/255):null):(i=vC.exec(t))?new Ge(i[1],i[2],i[3],1):(i=bC.exec(t))?new Ge(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=SC.exec(t))?Bs(i[1],i[2],i[3],i[4]):(i=wC.exec(t))?Bs(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=EC.exec(t))?t0(i[1],i[2]/100,i[3]/100,1):(i=CC.exec(t))?t0(i[1],i[2]/100,i[3]/100,i[4]):Fy.hasOwnProperty(t)?Py(Fy[t]):t==="transparent"?new Ge(NaN,NaN,NaN,0):null}function Py(t){return new Ge(t>>16&255,t>>8&255,t&255,1)}function Bs(t,i,r,a){return a<=0&&(t=i=r=NaN),new Ge(t,i,r,a)}function TC(t){return t instanceof ro||(t=_r(t)),t?(t=t.rgb(),new Ge(t.r,t.g,t.b,t.opacity)):new Ge}function Ld(t,i,r,a){return arguments.length===1?TC(t):new Ge(t,i,r,a??1)}function Ge(t,i,r,a){this.r=+t,this.g=+i,this.b=+r,this.opacity=+a}fh(Ge,Ld,hv(ro,{brighter(t){return t=t==null?ru:Math.pow(ru,t),new Ge(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ga:Math.pow(Ga,t),new Ge(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ge(wr(this.r),wr(this.g),wr(this.b),lu(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Jy,formatHex:Jy,formatHex8:AC,formatRgb:Wy,toString:Wy}));function Jy(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}`}function AC(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}${Sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Wy(){const t=lu(this.opacity);return`${t===1?"rgb(":"rgba("}${wr(this.r)}, ${wr(this.g)}, ${wr(this.b)}${t===1?")":`, ${t})`}`}function lu(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function wr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Sr(t){return t=wr(t),(t<16?"0":"")+t.toString(16)}function t0(t,i,r,a){return a<=0?t=i=r=NaN:r<=0||r>=1?t=i=NaN:i<=0&&(t=NaN),new Nn(t,i,r,a)}function pv(t){if(t instanceof Nn)return new Nn(t.h,t.s,t.l,t.opacity);if(t instanceof ro||(t=_r(t)),!t)return new Nn;if(t instanceof Nn)return t;t=t.rgb();var i=t.r/255,r=t.g/255,a=t.b/255,s=Math.min(i,r,a),u=Math.max(i,r,a),c=NaN,d=u-s,m=(u+s)/2;return d?(i===u?c=(r-a)/d+(r<a)*6:r===u?c=(a-i)/d+2:c=(i-r)/d+4,d/=m<.5?u+s:2-u-s,c*=60):d=m>0&&m<1?0:c,new Nn(c,d,m,t.opacity)}function MC(t,i,r,a){return arguments.length===1?pv(t):new Nn(t,i,r,a??1)}function Nn(t,i,r,a){this.h=+t,this.s=+i,this.l=+r,this.opacity=+a}fh(Nn,MC,hv(ro,{brighter(t){return t=t==null?ru:Math.pow(ru,t),new Nn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ga:Math.pow(Ga,t),new Nn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,i=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,a=r+(r<.5?r:1-r)*i,s=2*r-a;return new Ge(nd(t>=240?t-240:t+120,s,a),nd(t,s,a),nd(t<120?t+240:t-120,s,a),this.opacity)},clamp(){return new Nn(e0(this.h),Us(this.s),Us(this.l),lu(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=lu(this.opacity);return`${t===1?"hsl(":"hsla("}${e0(this.h)}, ${Us(this.s)*100}%, ${Us(this.l)*100}%${t===1?")":`, ${t})`}`}}));function e0(t){return t=(t||0)%360,t<0?t+360:t}function Us(t){return Math.max(0,Math.min(1,t||0))}function nd(t,i,r){return(t<60?i+(r-i)*t/60:t<180?r:t<240?i+(r-i)*(240-t)/60:i)*255}const dh=t=>()=>t;function zC(t,i){return function(r){return t+r*i}}function OC(t,i,r){return t=Math.pow(t,r),i=Math.pow(i,r)-t,r=1/r,function(a){return Math.pow(t+a*i,r)}}function DC(t){return(t=+t)==1?mv:function(i,r){return r-i?OC(i,r,t):dh(isNaN(i)?r:i)}}function mv(t,i){var r=i-t;return r?zC(t,r):dh(isNaN(t)?i:t)}const au=(function t(i){var r=DC(i);function a(s,u){var c=r((s=Ld(s)).r,(u=Ld(u)).r),d=r(s.g,u.g),m=r(s.b,u.b),h=mv(s.opacity,u.opacity);return function(g){return s.r=c(g),s.g=d(g),s.b=m(g),s.opacity=h(g),s+""}}return a.gamma=t,a})(1);function kC(t,i){i||(i=[]);var r=t?Math.min(i.length,t.length):0,a=i.slice(),s;return function(u){for(s=0;s<r;++s)a[s]=t[s]*(1-u)+i[s]*u;return a}}function RC(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function jC(t,i){var r=i?i.length:0,a=t?Math.min(r,t.length):0,s=new Array(a),u=new Array(r),c;for(c=0;c<a;++c)s[c]=Ba(t[c],i[c]);for(;c<r;++c)u[c]=i[c];return function(d){for(c=0;c<a;++c)u[c]=s[c](d);return u}}function HC(t,i){var r=new Date;return t=+t,i=+i,function(a){return r.setTime(t*(1-a)+i*a),r}}function Ln(t,i){return t=+t,i=+i,function(r){return t*(1-r)+i*r}}function LC(t,i){var r={},a={},s;(t===null||typeof t!="object")&&(t={}),(i===null||typeof i!="object")&&(i={});for(s in i)s in t?r[s]=Ba(t[s],i[s]):a[s]=i[s];return function(u){for(s in r)a[s]=r[s](u);return a}}var Bd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,id=new RegExp(Bd.source,"g");function BC(t){return function(){return t}}function UC(t){return function(i){return t(i)+""}}function gv(t,i){var r=Bd.lastIndex=id.lastIndex=0,a,s,u,c=-1,d=[],m=[];for(t=t+"",i=i+"";(a=Bd.exec(t))&&(s=id.exec(i));)(u=s.index)>r&&(u=i.slice(r,u),d[c]?d[c]+=u:d[++c]=u),(a=a[0])===(s=s[0])?d[c]?d[c]+=s:d[++c]=s:(d[++c]=null,m.push({i:c,x:Ln(a,s)})),r=id.lastIndex;return r<i.length&&(u=i.slice(r),d[c]?d[c]+=u:d[++c]=u),d.length<2?m[0]?UC(m[0].x):BC(i):(i=m.length,function(h){for(var g=0,y;g<i;++g)d[(y=m[g]).i]=y.x(h);return d.join("")})}function Ba(t,i){var r=typeof i,a;return i==null||r==="boolean"?dh(i):(r==="number"?Ln:r==="string"?(a=_r(i))?(i=a,au):gv:i instanceof _r?au:i instanceof Date?HC:RC(i)?kC:Array.isArray(i)?jC:typeof i.valueOf!="function"&&typeof i.toString!="function"||isNaN(i)?LC:Ln)(t,i)}var n0=180/Math.PI,Ud={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function yv(t,i,r,a,s,u){var c,d,m;return(c=Math.sqrt(t*t+i*i))&&(t/=c,i/=c),(m=t*r+i*a)&&(r-=t*m,a-=i*m),(d=Math.sqrt(r*r+a*a))&&(r/=d,a/=d,m/=d),t*a<i*r&&(t=-t,i=-i,m=-m,c=-c),{translateX:s,translateY:u,rotate:Math.atan2(i,t)*n0,skewX:Math.atan(m)*n0,scaleX:c,scaleY:d}}var qs;function qC(t){const i=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return i.isIdentity?Ud:yv(i.a,i.b,i.c,i.d,i.e,i.f)}function VC(t){return t==null||(qs||(qs=document.createElementNS("http://www.w3.org/2000/svg","g")),qs.setAttribute("transform",t),!(t=qs.transform.baseVal.consolidate()))?Ud:(t=t.matrix,yv(t.a,t.b,t.c,t.d,t.e,t.f))}function xv(t,i,r,a){function s(h){return h.length?h.pop()+" ":""}function u(h,g,y,x,v,S){if(h!==y||g!==x){var _=v.push("translate(",null,i,null,r);S.push({i:_-4,x:Ln(h,y)},{i:_-2,x:Ln(g,x)})}else(y||x)&&v.push("translate("+y+i+x+r)}function c(h,g,y,x){h!==g?(h-g>180?g+=360:g-h>180&&(h+=360),x.push({i:y.push(s(y)+"rotate(",null,a)-2,x:Ln(h,g)})):g&&y.push(s(y)+"rotate("+g+a)}function d(h,g,y,x){h!==g?x.push({i:y.push(s(y)+"skewX(",null,a)-2,x:Ln(h,g)}):g&&y.push(s(y)+"skewX("+g+a)}function m(h,g,y,x,v,S){if(h!==y||g!==x){var _=v.push(s(v)+"scale(",null,",",null,")");S.push({i:_-4,x:Ln(h,y)},{i:_-2,x:Ln(g,x)})}else(y!==1||x!==1)&&v.push(s(v)+"scale("+y+","+x+")")}return function(h,g){var y=[],x=[];return h=t(h),g=t(g),u(h.translateX,h.translateY,g.translateX,g.translateY,y,x),c(h.rotate,g.rotate,y,x),d(h.skewX,g.skewX,y,x),m(h.scaleX,h.scaleY,g.scaleX,g.scaleY,y,x),h=g=null,function(v){for(var S=-1,_=x.length,M;++S<_;)y[(M=x[S]).i]=M.x(v);return y.join("")}}}var IC=xv(qC,"px, ","px)","deg)"),YC=xv(VC,", ",")",")"),QC=1e-12;function i0(t){return((t=Math.exp(t))+1/t)/2}function XC(t){return((t=Math.exp(t))-1/t)/2}function GC(t){return((t=Math.exp(2*t))-1)/(t+1)}const Ps=(function t(i,r,a){function s(u,c){var d=u[0],m=u[1],h=u[2],g=c[0],y=c[1],x=c[2],v=g-d,S=y-m,_=v*v+S*S,M,C;if(_<QC)C=Math.log(x/h)/i,M=function(H){return[d+H*v,m+H*S,h*Math.exp(i*H*C)]};else{var j=Math.sqrt(_),w=(x*x-h*h+a*_)/(2*h*r*j),k=(x*x-h*h-a*_)/(2*x*r*j),I=Math.log(Math.sqrt(w*w+1)-w),D=Math.log(Math.sqrt(k*k+1)-k);C=(D-I)/i,M=function(H){var G=H*C,Z=i0(I),lt=h/(r*j)*(Z*GC(i*G+I)-XC(I));return[d+lt*v,m+lt*S,h*Z/i0(i*G+I)]}}return M.duration=C*1e3*i/Math.SQRT2,M}return s.rho=function(u){var c=Math.max(.001,+u),d=c*c,m=d*d;return t(c,d,m)},s})(Math.SQRT2,2,4);var Nl=0,Ha=0,za=0,vv=1e3,ou,La,su=0,Nr=0,wu=0,Fa=typeof performance=="object"&&performance.now?performance:Date,bv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function hh(){return Nr||(bv(ZC),Nr=Fa.now()+wu)}function ZC(){Nr=0}function uu(){this._call=this._time=this._next=null}uu.prototype=Sv.prototype={constructor:uu,restart:function(t,i,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?hh():+r)+(i==null?0:+i),!this._next&&La!==this&&(La?La._next=this:ou=this,La=this),this._call=t,this._time=r,qd()},stop:function(){this._call&&(this._call=null,this._time=1/0,qd())}};function Sv(t,i,r){var a=new uu;return a.restart(t,i,r),a}function FC(){hh(),++Nl;for(var t=ou,i;t;)(i=Nr-t._time)>=0&&t._call.call(void 0,i),t=t._next;--Nl}function r0(){Nr=(su=Fa.now())+wu,Nl=Ha=0;try{FC()}finally{Nl=0,$C(),Nr=0}}function KC(){var t=Fa.now(),i=t-su;i>vv&&(wu-=i,su=t)}function $C(){for(var t,i=ou,r,a=1/0;i;)i._call?(a>i._time&&(a=i._time),t=i,i=i._next):(r=i._next,i._next=null,i=t?t._next=r:ou=r);La=t,qd(a)}function qd(t){if(!Nl){Ha&&(Ha=clearTimeout(Ha));var i=t-Nr;i>24?(t<1/0&&(Ha=setTimeout(r0,t-Fa.now()-wu)),za&&(za=clearInterval(za))):(za||(su=Fa.now(),za=setInterval(KC,vv)),Nl=1,bv(r0))}}function l0(t,i,r){var a=new uu;return i=i==null?0:+i,a.restart(s=>{a.stop(),t(s+i)},i,r),a}var PC=bu("start","end","cancel","interrupt"),JC=[],wv=0,a0=1,Vd=2,Js=3,o0=4,Id=5,Ws=6;function Eu(t,i,r,a,s,u){var c=t.__transition;if(!c)t.__transition={};else if(r in c)return;WC(t,r,{name:i,index:a,group:s,on:PC,tween:JC,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:wv})}function ph(t,i){var r=Mn(t,i);if(r.state>wv)throw new Error("too late; already scheduled");return r}function In(t,i){var r=Mn(t,i);if(r.state>Js)throw new Error("too late; already running");return r}function Mn(t,i){var r=t.__transition;if(!r||!(r=r[i]))throw new Error("transition not found");return r}function WC(t,i,r){var a=t.__transition,s;a[i]=r,r.timer=Sv(u,0,r.time);function u(h){r.state=a0,r.timer.restart(c,r.delay,r.time),r.delay<=h&&c(h-r.delay)}function c(h){var g,y,x,v;if(r.state!==a0)return m();for(g in a)if(v=a[g],v.name===r.name){if(v.state===Js)return l0(c);v.state===o0?(v.state=Ws,v.timer.stop(),v.on.call("interrupt",t,t.__data__,v.index,v.group),delete a[g]):+g<i&&(v.state=Ws,v.timer.stop(),v.on.call("cancel",t,t.__data__,v.index,v.group),delete a[g])}if(l0(function(){r.state===Js&&(r.state=o0,r.timer.restart(d,r.delay,r.time),d(h))}),r.state=Vd,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Vd){for(r.state=Js,s=new Array(x=r.tween.length),g=0,y=-1;g<x;++g)(v=r.tween[g].value.call(t,t.__data__,r.index,r.group))&&(s[++y]=v);s.length=y+1}}function d(h){for(var g=h<r.duration?r.ease.call(null,h/r.duration):(r.timer.restart(m),r.state=Id,1),y=-1,x=s.length;++y<x;)s[y].call(t,g);r.state===Id&&(r.on.call("end",t,t.__data__,r.index,r.group),m())}function m(){r.state=Ws,r.timer.stop(),delete a[i];for(var h in a)return;delete t.__transition}}function tu(t,i){var r=t.__transition,a,s,u=!0,c;if(r){i=i==null?null:i+"";for(c in r){if((a=r[c]).name!==i){u=!1;continue}s=a.state>Vd&&a.state<Id,a.state=Ws,a.timer.stop(),a.on.call(s?"interrupt":"cancel",t,t.__data__,a.index,a.group),delete r[c]}u&&delete t.__transition}}function t_(t){return this.each(function(){tu(this,t)})}function e_(t,i){var r,a;return function(){var s=In(this,t),u=s.tween;if(u!==r){a=r=u;for(var c=0,d=a.length;c<d;++c)if(a[c].name===i){a=a.slice(),a.splice(c,1);break}}s.tween=a}}function n_(t,i,r){var a,s;if(typeof r!="function")throw new Error;return function(){var u=In(this,t),c=u.tween;if(c!==a){s=(a=c).slice();for(var d={name:i,value:r},m=0,h=s.length;m<h;++m)if(s[m].name===i){s[m]=d;break}m===h&&s.push(d)}u.tween=s}}function i_(t,i){var r=this._id;if(t+="",arguments.length<2){for(var a=Mn(this.node(),r).tween,s=0,u=a.length,c;s<u;++s)if((c=a[s]).name===t)return c.value;return null}return this.each((i==null?e_:n_)(r,t,i))}function mh(t,i,r){var a=t._id;return t.each(function(){var s=In(this,a);(s.value||(s.value={}))[i]=r.apply(this,arguments)}),function(s){return Mn(s,a).value[i]}}function Ev(t,i){var r;return(typeof i=="number"?Ln:i instanceof _r?au:(r=_r(i))?(i=r,au):gv)(t,i)}function r_(t){return function(){this.removeAttribute(t)}}function l_(t){return function(){this.removeAttributeNS(t.space,t.local)}}function a_(t,i,r){var a,s=r+"",u;return function(){var c=this.getAttribute(t);return c===s?null:c===a?u:u=i(a=c,r)}}function o_(t,i,r){var a,s=r+"",u;return function(){var c=this.getAttributeNS(t.space,t.local);return c===s?null:c===a?u:u=i(a=c,r)}}function s_(t,i,r){var a,s,u;return function(){var c,d=r(this),m;return d==null?void this.removeAttribute(t):(c=this.getAttribute(t),m=d+"",c===m?null:c===a&&m===s?u:(s=m,u=i(a=c,d)))}}function u_(t,i,r){var a,s,u;return function(){var c,d=r(this),m;return d==null?void this.removeAttributeNS(t.space,t.local):(c=this.getAttributeNS(t.space,t.local),m=d+"",c===m?null:c===a&&m===s?u:(s=m,u=i(a=c,d)))}}function c_(t,i){var r=Su(t),a=r==="transform"?YC:Ev;return this.attrTween(t,typeof i=="function"?(r.local?u_:s_)(r,a,mh(this,"attr."+t,i)):i==null?(r.local?l_:r_)(r):(r.local?o_:a_)(r,a,i))}function f_(t,i){return function(r){this.setAttribute(t,i.call(this,r))}}function d_(t,i){return function(r){this.setAttributeNS(t.space,t.local,i.call(this,r))}}function h_(t,i){var r,a;function s(){var u=i.apply(this,arguments);return u!==a&&(r=(a=u)&&d_(t,u)),r}return s._value=i,s}function p_(t,i){var r,a;function s(){var u=i.apply(this,arguments);return u!==a&&(r=(a=u)&&f_(t,u)),r}return s._value=i,s}function m_(t,i){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(i==null)return this.tween(r,null);if(typeof i!="function")throw new Error;var a=Su(t);return this.tween(r,(a.local?h_:p_)(a,i))}function g_(t,i){return function(){ph(this,t).delay=+i.apply(this,arguments)}}function y_(t,i){return i=+i,function(){ph(this,t).delay=i}}function x_(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?g_:y_)(i,t)):Mn(this.node(),i).delay}function v_(t,i){return function(){In(this,t).duration=+i.apply(this,arguments)}}function b_(t,i){return i=+i,function(){In(this,t).duration=i}}function S_(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?v_:b_)(i,t)):Mn(this.node(),i).duration}function w_(t,i){if(typeof i!="function")throw new Error;return function(){In(this,t).ease=i}}function E_(t){var i=this._id;return arguments.length?this.each(w_(i,t)):Mn(this.node(),i).ease}function C_(t,i){return function(){var r=i.apply(this,arguments);if(typeof r!="function")throw new Error;In(this,t).ease=r}}function __(t){if(typeof t!="function")throw new Error;return this.each(C_(this._id,t))}function N_(t){typeof t!="function"&&(t=tv(t));for(var i=this._groups,r=i.length,a=new Array(r),s=0;s<r;++s)for(var u=i[s],c=u.length,d=a[s]=[],m,h=0;h<c;++h)(m=u[h])&&t.call(m,m.__data__,h,u)&&d.push(m);return new pi(a,this._parents,this._name,this._id)}function T_(t){if(t._id!==this._id)throw new Error;for(var i=this._groups,r=t._groups,a=i.length,s=r.length,u=Math.min(a,s),c=new Array(a),d=0;d<u;++d)for(var m=i[d],h=r[d],g=m.length,y=c[d]=new Array(g),x,v=0;v<g;++v)(x=m[v]||h[v])&&(y[v]=x);for(;d<a;++d)c[d]=i[d];return new pi(c,this._parents,this._name,this._id)}function A_(t){return(t+"").trim().split(/^|\s+/).every(function(i){var r=i.indexOf(".");return r>=0&&(i=i.slice(0,r)),!i||i==="start"})}function M_(t,i,r){var a,s,u=A_(i)?ph:In;return function(){var c=u(this,t),d=c.on;d!==a&&(s=(a=d).copy()).on(i,r),c.on=s}}function z_(t,i){var r=this._id;return arguments.length<2?Mn(this.node(),r).on.on(t):this.each(M_(r,t,i))}function O_(t){return function(){var i=this.parentNode;for(var r in this.__transition)if(+r!==t)return;i&&i.removeChild(this)}}function D_(){return this.on("end.remove",O_(this._id))}function k_(t){var i=this._name,r=this._id;typeof t!="function"&&(t=uh(t));for(var a=this._groups,s=a.length,u=new Array(s),c=0;c<s;++c)for(var d=a[c],m=d.length,h=u[c]=new Array(m),g,y,x=0;x<m;++x)(g=d[x])&&(y=t.call(g,g.__data__,x,d))&&("__data__"in g&&(y.__data__=g.__data__),h[x]=y,Eu(h[x],i,r,x,h,Mn(g,r)));return new pi(u,this._parents,i,r)}function R_(t){var i=this._name,r=this._id;typeof t!="function"&&(t=Wx(t));for(var a=this._groups,s=a.length,u=[],c=[],d=0;d<s;++d)for(var m=a[d],h=m.length,g,y=0;y<h;++y)if(g=m[y]){for(var x=t.call(g,g.__data__,y,m),v,S=Mn(g,r),_=0,M=x.length;_<M;++_)(v=x[_])&&Eu(v,i,r,_,x,S);u.push(x),c.push(g)}return new pi(u,c,i,r)}var j_=io.prototype.constructor;function H_(){return new j_(this._groups,this._parents)}function L_(t,i){var r,a,s;return function(){var u=_l(this,t),c=(this.style.removeProperty(t),_l(this,t));return u===c?null:u===r&&c===a?s:s=i(r=u,a=c)}}function Cv(t){return function(){this.style.removeProperty(t)}}function B_(t,i,r){var a,s=r+"",u;return function(){var c=_l(this,t);return c===s?null:c===a?u:u=i(a=c,r)}}function U_(t,i,r){var a,s,u;return function(){var c=_l(this,t),d=r(this),m=d+"";return d==null&&(m=d=(this.style.removeProperty(t),_l(this,t))),c===m?null:c===a&&m===s?u:(s=m,u=i(a=c,d))}}function q_(t,i){var r,a,s,u="style."+i,c="end."+u,d;return function(){var m=In(this,t),h=m.on,g=m.value[u]==null?d||(d=Cv(i)):void 0;(h!==r||s!==g)&&(a=(r=h).copy()).on(c,s=g),m.on=a}}function V_(t,i,r){var a=(t+="")=="transform"?IC:Ev;return i==null?this.styleTween(t,L_(t,a)).on("end.style."+t,Cv(t)):typeof i=="function"?this.styleTween(t,U_(t,a,mh(this,"style."+t,i))).each(q_(this._id,t)):this.styleTween(t,B_(t,a,i),r).on("end.style."+t,null)}function I_(t,i,r){return function(a){this.style.setProperty(t,i.call(this,a),r)}}function Y_(t,i,r){var a,s;function u(){var c=i.apply(this,arguments);return c!==s&&(a=(s=c)&&I_(t,c,r)),a}return u._value=i,u}function Q_(t,i,r){var a="style."+(t+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(i==null)return this.tween(a,null);if(typeof i!="function")throw new Error;return this.tween(a,Y_(t,i,r??""))}function X_(t){return function(){this.textContent=t}}function G_(t){return function(){var i=t(this);this.textContent=i??""}}function Z_(t){return this.tween("text",typeof t=="function"?G_(mh(this,"text",t)):X_(t==null?"":t+""))}function F_(t){return function(i){this.textContent=t.call(this,i)}}function K_(t){var i,r;function a(){var s=t.apply(this,arguments);return s!==r&&(i=(r=s)&&F_(s)),i}return a._value=t,a}function $_(t){var i="text";if(arguments.length<1)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,K_(t))}function P_(){for(var t=this._name,i=this._id,r=_v(),a=this._groups,s=a.length,u=0;u<s;++u)for(var c=a[u],d=c.length,m,h=0;h<d;++h)if(m=c[h]){var g=Mn(m,i);Eu(m,t,r,h,c,{time:g.time+g.delay+g.duration,delay:0,duration:g.duration,ease:g.ease})}return new pi(a,this._parents,t,r)}function J_(){var t,i,r=this,a=r._id,s=r.size();return new Promise(function(u,c){var d={value:c},m={value:function(){--s===0&&u()}};r.each(function(){var h=In(this,a),g=h.on;g!==t&&(i=(t=g).copy(),i._.cancel.push(d),i._.interrupt.push(d),i._.end.push(m)),h.on=i}),s===0&&u()})}var W_=0;function pi(t,i,r,a){this._groups=t,this._parents=i,this._name=r,this._id=a}function _v(){return++W_}var di=io.prototype;pi.prototype={constructor:pi,select:k_,selectAll:R_,selectChild:di.selectChild,selectChildren:di.selectChildren,filter:N_,merge:T_,selection:H_,transition:P_,call:di.call,nodes:di.nodes,node:di.node,size:di.size,empty:di.empty,each:di.each,on:z_,attr:c_,attrTween:m_,style:V_,styleTween:Q_,text:Z_,textTween:$_,remove:D_,tween:i_,delay:x_,duration:S_,ease:E_,easeVarying:__,end:J_,[Symbol.iterator]:di[Symbol.iterator]};function tN(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var eN={time:null,delay:0,duration:250,ease:tN};function nN(t,i){for(var r;!(r=t.__transition)||!(r=r[i]);)if(!(t=t.parentNode))throw new Error(`transition ${i} not found`);return r}function iN(t){var i,r;t instanceof pi?(i=t._id,t=t._name):(i=_v(),(r=eN).time=hh(),t=t==null?null:t+"");for(var a=this._groups,s=a.length,u=0;u<s;++u)for(var c=a[u],d=c.length,m,h=0;h<d;++h)(m=c[h])&&Eu(m,t,i,h,c,r||nN(m,i));return new pi(a,this._parents,t,i)}io.prototype.interrupt=t_;io.prototype.transition=iN;const Vs=t=>()=>t;function rN(t,{sourceEvent:i,target:r,transform:a,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:s}})}function hi(t,i,r){this.k=t,this.x=i,this.y=r}hi.prototype={constructor:hi,scale:function(t){return t===1?this:new hi(this.k*t,this.x,this.y)},translate:function(t,i){return t===0&i===0?this:new hi(this.k,this.x+this.k*t,this.y+this.k*i)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Cu=new hi(1,0,0);Nv.prototype=hi.prototype;function Nv(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Cu;return t.__zoom}function rd(t){t.stopImmediatePropagation()}function Oa(t){t.preventDefault(),t.stopImmediatePropagation()}function lN(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function aN(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function s0(){return this.__zoom||Cu}function oN(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function sN(){return navigator.maxTouchPoints||"ontouchstart"in this}function uN(t,i,r){var a=t.invertX(i[0][0])-r[0][0],s=t.invertX(i[1][0])-r[1][0],u=t.invertY(i[0][1])-r[0][1],c=t.invertY(i[1][1])-r[1][1];return t.translate(s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s),c>u?(u+c)/2:Math.min(0,u)||Math.max(0,c))}function Tv(){var t=lN,i=aN,r=uN,a=oN,s=sN,u=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],d=250,m=Ps,h=bu("start","zoom","end"),g,y,x,v=500,S=150,_=0,M=10;function C(R){R.property("__zoom",s0).on("wheel.zoom",G,{passive:!1}).on("mousedown.zoom",Z).on("dblclick.zoom",lt).filter(s).on("touchstart.zoom",L).on("touchmove.zoom",Q).on("touchend.zoom touchcancel.zoom",et).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}C.transform=function(R,U,z,B){var Y=R.selection?R.selection():R;Y.property("__zoom",s0),R!==Y?I(R,U,z,B):Y.interrupt().each(function(){D(this,arguments).event(B).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},C.scaleBy=function(R,U,z,B){C.scaleTo(R,function(){var Y=this.__zoom.k,K=typeof U=="function"?U.apply(this,arguments):U;return Y*K},z,B)},C.scaleTo=function(R,U,z,B){C.transform(R,function(){var Y=i.apply(this,arguments),K=this.__zoom,A=z==null?k(Y):typeof z=="function"?z.apply(this,arguments):z,O=K.invert(A),V=typeof U=="function"?U.apply(this,arguments):U;return r(w(j(K,V),A,O),Y,c)},z,B)},C.translateBy=function(R,U,z,B){C.transform(R,function(){return r(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof z=="function"?z.apply(this,arguments):z),i.apply(this,arguments),c)},null,B)},C.translateTo=function(R,U,z,B,Y){C.transform(R,function(){var K=i.apply(this,arguments),A=this.__zoom,O=B==null?k(K):typeof B=="function"?B.apply(this,arguments):B;return r(Cu.translate(O[0],O[1]).scale(A.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof z=="function"?-z.apply(this,arguments):-z),K,c)},B,Y)};function j(R,U){return U=Math.max(u[0],Math.min(u[1],U)),U===R.k?R:new hi(U,R.x,R.y)}function w(R,U,z){var B=U[0]-z[0]*R.k,Y=U[1]-z[1]*R.k;return B===R.x&&Y===R.y?R:new hi(R.k,B,Y)}function k(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function I(R,U,z,B){R.on("start.zoom",function(){D(this,arguments).event(B).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(B).end()}).tween("zoom",function(){var Y=this,K=arguments,A=D(Y,K).event(B),O=i.apply(Y,K),V=z==null?k(O):typeof z=="function"?z.apply(Y,K):z,T=Math.max(O[1][0]-O[0][0],O[1][1]-O[0][1]),nt=Y.__zoom,ut=typeof U=="function"?U.apply(Y,K):U,ct=m(nt.invert(V).concat(T/nt.k),ut.invert(V).concat(T/ut.k));return function(dt){if(dt===1)dt=ut;else{var st=ct(dt),pt=T/st[2];dt=new hi(pt,V[0]-st[0]*pt,V[1]-st[1]*pt)}A.zoom(null,dt)}})}function D(R,U,z){return!z&&R.__zooming||new H(R,U)}function H(R,U){this.that=R,this.args=U,this.active=0,this.sourceEvent=null,this.extent=i.apply(R,U),this.taps=0}H.prototype={event:function(R){return R&&(this.sourceEvent=R),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(R,U){return this.mouse&&R!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(R){var U=an(this.that).datum();h.call(R,this.that,new rN(R,{sourceEvent:this.sourceEvent,target:C,transform:this.that.__zoom,dispatch:h}),U)}};function G(R,...U){if(!t.apply(this,arguments))return;var z=D(this,U).event(R),B=this.__zoom,Y=Math.max(u[0],Math.min(u[1],B.k*Math.pow(2,a.apply(this,arguments)))),K=_n(R);if(z.wheel)(z.mouse[0][0]!==K[0]||z.mouse[0][1]!==K[1])&&(z.mouse[1]=B.invert(z.mouse[0]=K)),clearTimeout(z.wheel);else{if(B.k===Y)return;z.mouse=[K,B.invert(K)],tu(this),z.start()}Oa(R),z.wheel=setTimeout(A,S),z.zoom("mouse",r(w(j(B,Y),z.mouse[0],z.mouse[1]),z.extent,c));function A(){z.wheel=null,z.end()}}function Z(R,...U){if(x||!t.apply(this,arguments))return;var z=R.currentTarget,B=D(this,U,!0).event(R),Y=an(R.view).on("mousemove.zoom",V,!0).on("mouseup.zoom",T,!0),K=_n(R,z),A=R.clientX,O=R.clientY;cv(R.view),rd(R),B.mouse=[K,this.__zoom.invert(K)],tu(this),B.start();function V(nt){if(Oa(nt),!B.moved){var ut=nt.clientX-A,ct=nt.clientY-O;B.moved=ut*ut+ct*ct>_}B.event(nt).zoom("mouse",r(w(B.that.__zoom,B.mouse[0]=_n(nt,z),B.mouse[1]),B.extent,c))}function T(nt){Y.on("mousemove.zoom mouseup.zoom",null),fv(nt.view,B.moved),Oa(nt),B.event(nt).end()}}function lt(R,...U){if(t.apply(this,arguments)){var z=this.__zoom,B=_n(R.changedTouches?R.changedTouches[0]:R,this),Y=z.invert(B),K=z.k*(R.shiftKey?.5:2),A=r(w(j(z,K),B,Y),i.apply(this,U),c);Oa(R),d>0?an(this).transition().duration(d).call(I,A,B,R):an(this).call(C.transform,A,B,R)}}function L(R,...U){if(t.apply(this,arguments)){var z=R.touches,B=z.length,Y=D(this,U,R.changedTouches.length===B).event(R),K,A,O,V;for(rd(R),A=0;A<B;++A)O=z[A],V=_n(O,this),V=[V,this.__zoom.invert(V),O.identifier],Y.touch0?!Y.touch1&&Y.touch0[2]!==V[2]&&(Y.touch1=V,Y.taps=0):(Y.touch0=V,K=!0,Y.taps=1+!!g);g&&(g=clearTimeout(g)),K&&(Y.taps<2&&(y=V[0],g=setTimeout(function(){g=null},v)),tu(this),Y.start())}}function Q(R,...U){if(this.__zooming){var z=D(this,U).event(R),B=R.changedTouches,Y=B.length,K,A,O,V;for(Oa(R),K=0;K<Y;++K)A=B[K],O=_n(A,this),z.touch0&&z.touch0[2]===A.identifier?z.touch0[0]=O:z.touch1&&z.touch1[2]===A.identifier&&(z.touch1[0]=O);if(A=z.that.__zoom,z.touch1){var T=z.touch0[0],nt=z.touch0[1],ut=z.touch1[0],ct=z.touch1[1],dt=(dt=ut[0]-T[0])*dt+(dt=ut[1]-T[1])*dt,st=(st=ct[0]-nt[0])*st+(st=ct[1]-nt[1])*st;A=j(A,Math.sqrt(dt/st)),O=[(T[0]+ut[0])/2,(T[1]+ut[1])/2],V=[(nt[0]+ct[0])/2,(nt[1]+ct[1])/2]}else if(z.touch0)O=z.touch0[0],V=z.touch0[1];else return;z.zoom("touch",r(w(A,O,V),z.extent,c))}}function et(R,...U){if(this.__zooming){var z=D(this,U).event(R),B=R.changedTouches,Y=B.length,K,A;for(rd(R),x&&clearTimeout(x),x=setTimeout(function(){x=null},v),K=0;K<Y;++K)A=B[K],z.touch0&&z.touch0[2]===A.identifier?delete z.touch0:z.touch1&&z.touch1[2]===A.identifier&&delete z.touch1;if(z.touch1&&!z.touch0&&(z.touch0=z.touch1,delete z.touch1),z.touch0)z.touch0[1]=this.__zoom.invert(z.touch0[0]);else if(z.end(),z.taps===2&&(A=_n(A,this),Math.hypot(y[0]-A[0],y[1]-A[1])<M)){var O=an(this).on("dblclick.zoom");O&&O.apply(this,arguments)}}}return C.wheelDelta=function(R){return arguments.length?(a=typeof R=="function"?R:Vs(+R),C):a},C.filter=function(R){return arguments.length?(t=typeof R=="function"?R:Vs(!!R),C):t},C.touchable=function(R){return arguments.length?(s=typeof R=="function"?R:Vs(!!R),C):s},C.extent=function(R){return arguments.length?(i=typeof R=="function"?R:Vs([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),C):i},C.scaleExtent=function(R){return arguments.length?(u[0]=+R[0],u[1]=+R[1],C):[u[0],u[1]]},C.translateExtent=function(R){return arguments.length?(c[0][0]=+R[0][0],c[1][0]=+R[1][0],c[0][1]=+R[0][1],c[1][1]=+R[1][1],C):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},C.constrain=function(R){return arguments.length?(r=R,C):r},C.duration=function(R){return arguments.length?(d=+R,C):d},C.interpolate=function(R){return arguments.length?(m=R,C):m},C.on=function(){var R=h.on.apply(h,arguments);return R===h?C:R},C.clickDistance=function(R){return arguments.length?(_=(R=+R)*R,C):Math.sqrt(_)},C.tapDistance=function(R){return arguments.length?(M=+R,C):M},C}const qn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:i,sourceHandle:r,targetHandle:a})=>`Couldn't create edge for ${t} handle id: "${t==="source"?r:a}", edge id: ${i}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Ka=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Av=["Enter"," ","Escape"],Mv={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:t,x:i,y:r})=>`Moved selected node ${t}. New position, x: ${i}, y: ${r}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Tl;(function(t){t.Strict="strict",t.Loose="loose"})(Tl||(Tl={}));var Er;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(Er||(Er={}));var $a;(function(t){t.Partial="partial",t.Full="full"})($a||($a={}));const zv={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Fi;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Fi||(Fi={}));var cu;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(cu||(cu={}));var vt;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(vt||(vt={}));const u0={[vt.Left]:vt.Right,[vt.Right]:vt.Left,[vt.Top]:vt.Bottom,[vt.Bottom]:vt.Top};function Ov(t){return t===null?null:t?"valid":"invalid"}const Dv=t=>"id"in t&&"source"in t&&"target"in t,cN=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),gh=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),lo=(t,i=[0,0])=>{const{width:r,height:a}=mi(t),s=t.origin??i,u=r*s[0],c=a*s[1];return{x:t.position.x-u,y:t.position.y-c}},fN=(t,i={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const r=t.reduce((a,s)=>{const u=typeof s=="string";let c=!i.nodeLookup&&!u?s:void 0;i.nodeLookup&&(c=u?i.nodeLookup.get(s):gh(s)?s:i.nodeLookup.get(s.id));const d=c?fu(c,i.nodeOrigin):{x:0,y:0,x2:0,y2:0};return _u(a,d)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Nu(r)},ao=(t,i={})=>{let r={x:1/0,y:1/0,x2:-1/0,y2:-1/0},a=!1;return t.forEach(s=>{(i.filter===void 0||i.filter(s))&&(r=_u(r,fu(s)),a=!0)}),a?Nu(r):{x:0,y:0,width:0,height:0}},yh=(t,i,[r,a,s]=[0,0,1],u=!1,c=!1)=>{const d={...so(i,[r,a,s]),width:i.width/s,height:i.height/s},m=[];for(const h of t.values()){const{measured:g,selectable:y=!0,hidden:x=!1}=h;if(c&&!y||x)continue;const v=g.width??h.width??h.initialWidth??null,S=g.height??h.height??h.initialHeight??null,_=Pa(d,Ml(h)),M=(v??0)*(S??0),C=u&&_>0;(!h.internals.handleBounds||C||_>=M||h.dragging)&&m.push(h)}return m},dN=(t,i)=>{const r=new Set;return t.forEach(a=>{r.add(a.id)}),i.filter(a=>r.has(a.source)||r.has(a.target))};function hN(t,i){const r=new Map,a=i?.nodes?new Set(i.nodes.map(s=>s.id)):null;return t.forEach(s=>{s.measured.width&&s.measured.height&&(i?.includeHiddenNodes||!s.hidden)&&(!a||a.has(s.id))&&r.set(s.id,s)}),r}async function pN({nodes:t,width:i,height:r,panZoom:a,minZoom:s,maxZoom:u},c){if(t.size===0)return Promise.resolve(!0);const d=hN(t,c),m=ao(d),h=xh(m,i,r,c?.minZoom??s,c?.maxZoom??u,c?.padding??.1);return await a.setViewport(h,{duration:c?.duration,ease:c?.ease,interpolate:c?.interpolate}),Promise.resolve(!0)}function kv({nodeId:t,nextPosition:i,nodeLookup:r,nodeOrigin:a=[0,0],nodeExtent:s,onError:u}){const c=r.get(t),d=c.parentId?r.get(c.parentId):void 0,{x:m,y:h}=d?d.internals.positionAbsolute:{x:0,y:0},g=c.origin??a;let y=c.extent||s;if(c.extent==="parent"&&!c.expandParent)if(!d)u?.("005",qn.error005());else{const v=d.measured.width,S=d.measured.height;v&&S&&(y=[[m,h],[m+v,h+S]])}else d&&zl(c.extent)&&(y=[[c.extent[0][0]+m,c.extent[0][1]+h],[c.extent[1][0]+m,c.extent[1][1]+h]]);const x=zl(y)?Tr(i,y,c.measured):i;return(c.measured.width===void 0||c.measured.height===void 0)&&u?.("015",qn.error015()),{position:{x:x.x-m+(c.measured.width??0)*g[0],y:x.y-h+(c.measured.height??0)*g[1]},positionAbsolute:x}}async function mN({nodesToRemove:t=[],edgesToRemove:i=[],nodes:r,edges:a,onBeforeDelete:s}){const u=new Set(t.map(x=>x.id)),c=[];for(const x of r){if(x.deletable===!1)continue;const v=u.has(x.id),S=!v&&x.parentId&&c.find(_=>_.id===x.parentId);(v||S)&&c.push(x)}const d=new Set(i.map(x=>x.id)),m=a.filter(x=>x.deletable!==!1),g=dN(c,m);for(const x of m)d.has(x.id)&&!g.find(S=>S.id===x.id)&&g.push(x);if(!s)return{edges:g,nodes:c};const y=await s({nodes:c,edges:g});return typeof y=="boolean"?y?{edges:g,nodes:c}:{edges:[],nodes:[]}:y}const Al=(t,i=0,r=1)=>Math.min(Math.max(t,i),r),Tr=(t={x:0,y:0},i,r)=>({x:Al(t.x,i[0][0],i[1][0]-(r?.width??0)),y:Al(t.y,i[0][1],i[1][1]-(r?.height??0))});function Rv(t,i,r){const{width:a,height:s}=mi(r),{x:u,y:c}=r.internals.positionAbsolute;return Tr(t,[[u,c],[u+a,c+s]],i)}const c0=(t,i,r)=>t<i?Al(Math.abs(t-i),1,i)/i:t>r?-Al(Math.abs(t-r),1,i)/i:0,jv=(t,i,r=15,a=40)=>{const s=c0(t.x,a,i.width-a)*r,u=c0(t.y,a,i.height-a)*r;return[s,u]},_u=(t,i)=>({x:Math.min(t.x,i.x),y:Math.min(t.y,i.y),x2:Math.max(t.x2,i.x2),y2:Math.max(t.y2,i.y2)}),Yd=({x:t,y:i,width:r,height:a})=>({x:t,y:i,x2:t+r,y2:i+a}),Nu=({x:t,y:i,x2:r,y2:a})=>({x:t,y:i,width:r-t,height:a-i}),Ml=(t,i=[0,0])=>{const{x:r,y:a}=gh(t)?t.internals.positionAbsolute:lo(t,i);return{x:r,y:a,width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}},fu=(t,i=[0,0])=>{const{x:r,y:a}=gh(t)?t.internals.positionAbsolute:lo(t,i);return{x:r,y:a,x2:r+(t.measured?.width??t.width??t.initialWidth??0),y2:a+(t.measured?.height??t.height??t.initialHeight??0)}},Hv=(t,i)=>Nu(_u(Yd(t),Yd(i))),Pa=(t,i)=>{const r=Math.max(0,Math.min(t.x+t.width,i.x+i.width)-Math.max(t.x,i.x)),a=Math.max(0,Math.min(t.y+t.height,i.y+i.height)-Math.max(t.y,i.y));return Math.ceil(r*a)},f0=t=>Tn(t.width)&&Tn(t.height)&&Tn(t.x)&&Tn(t.y),Tn=t=>!isNaN(t)&&isFinite(t),gN=(t,i)=>{},oo=(t,i=[1,1])=>({x:i[0]*Math.round(t.x/i[0]),y:i[1]*Math.round(t.y/i[1])}),so=({x:t,y:i},[r,a,s],u=!1,c=[1,1])=>{const d={x:(t-r)/s,y:(i-a)/s};return u?oo(d,c):d},du=({x:t,y:i},[r,a,s])=>({x:t*s+r,y:i*s+a});function gl(t,i){if(typeof t=="number")return Math.floor((i-i/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const r=parseFloat(t);if(!Number.isNaN(r))return Math.floor(r)}if(typeof t=="string"&&t.endsWith("%")){const r=parseFloat(t);if(!Number.isNaN(r))return Math.floor(i*r*.01)}return console.error(`[React Flow] The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function yN(t,i,r){if(typeof t=="string"||typeof t=="number"){const a=gl(t,r),s=gl(t,i);return{top:a,right:s,bottom:a,left:s,x:s*2,y:a*2}}if(typeof t=="object"){const a=gl(t.top??t.y??0,r),s=gl(t.bottom??t.y??0,r),u=gl(t.left??t.x??0,i),c=gl(t.right??t.x??0,i);return{top:a,right:c,bottom:s,left:u,x:u+c,y:a+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function xN(t,i,r,a,s,u){const{x:c,y:d}=du(t,[i,r,a]),{x:m,y:h}=du({x:t.x+t.width,y:t.y+t.height},[i,r,a]),g=s-m,y=u-h;return{left:Math.floor(c),top:Math.floor(d),right:Math.floor(g),bottom:Math.floor(y)}}const xh=(t,i,r,a,s,u)=>{const c=yN(u,i,r),d=(i-c.x)/t.width,m=(r-c.y)/t.height,h=Math.min(d,m),g=Al(h,a,s),y=t.x+t.width/2,x=t.y+t.height/2,v=i/2-y*g,S=r/2-x*g,_=xN(t,v,S,g,i,r),M={left:Math.min(_.left-c.left,0),top:Math.min(_.top-c.top,0),right:Math.min(_.right-c.right,0),bottom:Math.min(_.bottom-c.bottom,0)};return{x:v-M.left+M.right,y:S-M.top+M.bottom,zoom:g}},Ja=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function zl(t){return t!=null&&t!=="parent"}function mi(t){return{width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}}function Lv(t){return(t.measured?.width??t.width??t.initialWidth)!==void 0&&(t.measured?.height??t.height??t.initialHeight)!==void 0}function Bv(t,i={width:0,height:0},r,a,s){const u={...t},c=a.get(r);if(c){const d=c.origin||s;u.x+=c.internals.positionAbsolute.x-(i.width??0)*d[0],u.y+=c.internals.positionAbsolute.y-(i.height??0)*d[1]}return u}function d0(t,i){if(t.size!==i.size)return!1;for(const r of t)if(!i.has(r))return!1;return!0}function vN(){let t,i;return{promise:new Promise((a,s)=>{t=a,i=s}),resolve:t,reject:i}}function bN(t){return{...Mv,...t||{}}}function Ua(t,{snapGrid:i=[0,0],snapToGrid:r=!1,transform:a,containerBounds:s}){const{x:u,y:c}=An(t),d=so({x:u-(s?.left??0),y:c-(s?.top??0)},a),{x:m,y:h}=r?oo(d,i):d;return{xSnapped:m,ySnapped:h,...d}}const vh=t=>({width:t.offsetWidth,height:t.offsetHeight}),Uv=t=>t?.getRootNode?.()||window?.document,SN=["INPUT","SELECT","TEXTAREA"];function qv(t){const i=t.composedPath?.()?.[0]||t.target;return i?.nodeType!==1?!1:SN.includes(i.nodeName)||i.hasAttribute("contenteditable")||!!i.closest(".nokey")}const Vv=t=>"clientX"in t,An=(t,i)=>{const r=Vv(t),a=r?t.clientX:t.touches?.[0].clientX,s=r?t.clientY:t.touches?.[0].clientY;return{x:a-(i?.left??0),y:s-(i?.top??0)}},h0=(t,i,r,a,s)=>{const u=i.querySelectorAll(`.${t}`);return!u||!u.length?null:Array.from(u).map(c=>{const d=c.getBoundingClientRect();return{id:c.getAttribute("data-handleid"),type:t,nodeId:s,position:c.getAttribute("data-handlepos"),x:(d.left-r.left)/a,y:(d.top-r.top)/a,...vh(c)}})};function Iv({sourceX:t,sourceY:i,targetX:r,targetY:a,sourceControlX:s,sourceControlY:u,targetControlX:c,targetControlY:d}){const m=t*.125+s*.375+c*.375+r*.125,h=i*.125+u*.375+d*.375+a*.125,g=Math.abs(m-t),y=Math.abs(h-i);return[m,h,g,y]}function Is(t,i){return t>=0?.5*t:i*25*Math.sqrt(-t)}function p0({pos:t,x1:i,y1:r,x2:a,y2:s,c:u}){switch(t){case vt.Left:return[i-Is(i-a,u),r];case vt.Right:return[i+Is(a-i,u),r];case vt.Top:return[i,r-Is(r-s,u)];case vt.Bottom:return[i,r+Is(s-r,u)]}}function Yv({sourceX:t,sourceY:i,sourcePosition:r=vt.Bottom,targetX:a,targetY:s,targetPosition:u=vt.Top,curvature:c=.25}){const[d,m]=p0({pos:r,x1:t,y1:i,x2:a,y2:s,c}),[h,g]=p0({pos:u,x1:a,y1:s,x2:t,y2:i,c}),[y,x,v,S]=Iv({sourceX:t,sourceY:i,targetX:a,targetY:s,sourceControlX:d,sourceControlY:m,targetControlX:h,targetControlY:g});return[`M${t},${i} C${d},${m} ${h},${g} ${a},${s}`,y,x,v,S]}function Qv({sourceX:t,sourceY:i,targetX:r,targetY:a}){const s=Math.abs(r-t)/2,u=r<t?r+s:r-s,c=Math.abs(a-i)/2,d=a<i?a+c:a-c;return[u,d,s,c]}function wN({sourceNode:t,targetNode:i,selected:r=!1,zIndex:a=0,elevateOnSelect:s=!1,zIndexMode:u="basic"}){if(u==="manual")return a;const c=s&&r?a+1e3:a,d=Math.max(t.parentId||s&&t.selected?t.internals.z:0,i.parentId||s&&i.selected?i.internals.z:0);return c+d}function EN({sourceNode:t,targetNode:i,width:r,height:a,transform:s}){const u=_u(fu(t),fu(i));u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c={x:-s[0]/s[2],y:-s[1]/s[2],width:r/s[2],height:a/s[2]};return Pa(c,Nu(u))>0}const CN=({source:t,sourceHandle:i,target:r,targetHandle:a})=>`xy-edge__${t}${i||""}-${r}${a||""}`,_N=(t,i)=>i.some(r=>r.source===t.source&&r.target===t.target&&(r.sourceHandle===t.sourceHandle||!r.sourceHandle&&!t.sourceHandle)&&(r.targetHandle===t.targetHandle||!r.targetHandle&&!t.targetHandle)),NN=(t,i,r={})=>{if(!t.source||!t.target)return i;const a=r.getEdgeId||CN;let s;return Dv(t)?s={...t}:s={...t,id:a(t)},_N(s,i)?i:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,i.concat(s))};function Xv({sourceX:t,sourceY:i,targetX:r,targetY:a}){const[s,u,c,d]=Qv({sourceX:t,sourceY:i,targetX:r,targetY:a});return[`M ${t},${i}L ${r},${a}`,s,u,c,d]}const m0={[vt.Left]:{x:-1,y:0},[vt.Right]:{x:1,y:0},[vt.Top]:{x:0,y:-1},[vt.Bottom]:{x:0,y:1}},TN=({source:t,sourcePosition:i=vt.Bottom,target:r})=>i===vt.Left||i===vt.Right?t.x<r.x?{x:1,y:0}:{x:-1,y:0}:t.y<r.y?{x:0,y:1}:{x:0,y:-1},g0=(t,i)=>Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2));function AN({source:t,sourcePosition:i=vt.Bottom,target:r,targetPosition:a=vt.Top,center:s,offset:u,stepPosition:c}){const d=m0[i],m=m0[a],h={x:t.x+d.x*u,y:t.y+d.y*u},g={x:r.x+m.x*u,y:r.y+m.y*u},y=TN({source:h,sourcePosition:i,target:g}),x=y.x!==0?"x":"y",v=y[x];let S=[],_,M;const C={x:0,y:0},j={x:0,y:0},[,,w,k]=Qv({sourceX:t.x,sourceY:t.y,targetX:r.x,targetY:r.y});if(d[x]*m[x]===-1){x==="x"?(_=s.x??h.x+(g.x-h.x)*c,M=s.y??(h.y+g.y)/2):(_=s.x??(h.x+g.x)/2,M=s.y??h.y+(g.y-h.y)*c);const D=[{x:_,y:h.y},{x:_,y:g.y}],H=[{x:h.x,y:M},{x:g.x,y:M}];d[x]===v?S=x==="x"?D:H:S=x==="x"?H:D}else{const D=[{x:h.x,y:g.y}],H=[{x:g.x,y:h.y}];if(x==="x"?S=d.x===v?H:D:S=d.y===v?D:H,i===a){const Q=Math.abs(t[x]-r[x]);if(Q<=u){const et=Math.min(u-1,u-Q);d[x]===v?C[x]=(h[x]>t[x]?-1:1)*et:j[x]=(g[x]>r[x]?-1:1)*et}}if(i!==a){const Q=x==="x"?"y":"x",et=d[x]===m[Q],R=h[Q]>g[Q],U=h[Q]<g[Q];(d[x]===1&&(!et&&R||et&&U)||d[x]!==1&&(!et&&U||et&&R))&&(S=x==="x"?D:H)}const G={x:h.x+C.x,y:h.y+C.y},Z={x:g.x+j.x,y:g.y+j.y},lt=Math.max(Math.abs(G.x-S[0].x),Math.abs(Z.x-S[0].x)),L=Math.max(Math.abs(G.y-S[0].y),Math.abs(Z.y-S[0].y));lt>=L?(_=(G.x+Z.x)/2,M=S[0].y):(_=S[0].x,M=(G.y+Z.y)/2)}return[[t,{x:h.x+C.x,y:h.y+C.y},...S,{x:g.x+j.x,y:g.y+j.y},r],_,M,w,k]}function MN(t,i,r,a){const s=Math.min(g0(t,i)/2,g0(i,r)/2,a),{x:u,y:c}=i;if(t.x===u&&u===r.x||t.y===c&&c===r.y)return`L${u} ${c}`;if(t.y===c){const h=t.x<r.x?-1:1,g=t.y<r.y?1:-1;return`L ${u+s*h},${c}Q ${u},${c} ${u},${c+s*g}`}const d=t.x<r.x?1:-1,m=t.y<r.y?-1:1;return`L ${u},${c+s*m}Q ${u},${c} ${u+s*d},${c}`}function Qd({sourceX:t,sourceY:i,sourcePosition:r=vt.Bottom,targetX:a,targetY:s,targetPosition:u=vt.Top,borderRadius:c=5,centerX:d,centerY:m,offset:h=20,stepPosition:g=.5}){const[y,x,v,S,_]=AN({source:{x:t,y:i},sourcePosition:r,target:{x:a,y:s},targetPosition:u,center:{x:d,y:m},offset:h,stepPosition:g});return[y.reduce((C,j,w)=>{let k="";return w>0&&w<y.length-1?k=MN(y[w-1],j,y[w+1],c):k=`${w===0?"M":"L"}${j.x} ${j.y}`,C+=k,C},""),x,v,S,_]}function y0(t){return t&&!!(t.internals.handleBounds||t.handles?.length)&&!!(t.measured.width||t.width||t.initialWidth)}function zN(t){const{sourceNode:i,targetNode:r}=t;if(!y0(i)||!y0(r))return null;const a=i.internals.handleBounds||x0(i.handles),s=r.internals.handleBounds||x0(r.handles),u=v0(a?.source??[],t.sourceHandle),c=v0(t.connectionMode===Tl.Strict?s?.target??[]:(s?.target??[]).concat(s?.source??[]),t.targetHandle);if(!u||!c)return t.onError?.("008",qn.error008(u?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const d=u?.position||vt.Bottom,m=c?.position||vt.Top,h=Ar(i,u,d),g=Ar(r,c,m);return{sourceX:h.x,sourceY:h.y,targetX:g.x,targetY:g.y,sourcePosition:d,targetPosition:m}}function x0(t){if(!t)return null;const i=[],r=[];for(const a of t)a.width=a.width??1,a.height=a.height??1,a.type==="source"?i.push(a):a.type==="target"&&r.push(a);return{source:i,target:r}}function Ar(t,i,r=vt.Left,a=!1){const s=(i?.x??0)+t.internals.positionAbsolute.x,u=(i?.y??0)+t.internals.positionAbsolute.y,{width:c,height:d}=i??mi(t);if(a)return{x:s+c/2,y:u+d/2};switch(i?.position??r){case vt.Top:return{x:s+c/2,y:u};case vt.Right:return{x:s+c,y:u+d/2};case vt.Bottom:return{x:s+c/2,y:u+d};case vt.Left:return{x:s,y:u+d/2}}}function v0(t,i){return t&&(i?t.find(r=>r.id===i):t[0])||null}function Xd(t,i){return t?typeof t=="string"?t:`${i?`${i}__`:""}${Object.keys(t).sort().map(a=>`${a}=${t[a]}`).join("&")}`:""}function ON(t,{id:i,defaultColor:r,defaultMarkerStart:a,defaultMarkerEnd:s}){const u=new Set;return t.reduce((c,d)=>([d.markerStart||a,d.markerEnd||s].forEach(m=>{if(m&&typeof m=="object"){const h=Xd(m,i);u.has(h)||(c.push({id:h,color:m.color||r,...m}),u.add(h))}}),c),[]).sort((c,d)=>c.id.localeCompare(d.id))}const Gv=1e3,DN=10,bh={nodeOrigin:[0,0],nodeExtent:Ka,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},kN={...bh,checkEquality:!0};function Sh(t,i){const r={...t};for(const a in i)i[a]!==void 0&&(r[a]=i[a]);return r}function RN(t,i,r){const a=Sh(bh,r);for(const s of t.values())if(s.parentId)Eh(s,t,i,a);else{const u=lo(s,a.nodeOrigin),c=zl(s.extent)?s.extent:a.nodeExtent,d=Tr(u,c,mi(s));s.internals.positionAbsolute=d}}function jN(t,i){if(!t.handles)return t.measured?i?.internals.handleBounds:void 0;const r=[],a=[];for(const s of t.handles){const u={id:s.id,width:s.width??1,height:s.height??1,nodeId:t.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?r.push(u):s.type==="target"&&a.push(u)}return{source:r,target:a}}function wh(t){return t==="manual"}function Gd(t,i,r,a={}){const s=Sh(kN,a),u={i:0},c=new Map(i),d=s?.elevateNodesOnSelect&&!wh(s.zIndexMode)?Gv:0;let m=t.length>0;i.clear(),r.clear();for(const h of t){let g=c.get(h.id);if(s.checkEquality&&h===g?.internals.userNode)i.set(h.id,g);else{const y=lo(h,s.nodeOrigin),x=zl(h.extent)?h.extent:s.nodeExtent,v=Tr(y,x,mi(h));g={...s.defaults,...h,measured:{width:h.measured?.width,height:h.measured?.height},internals:{positionAbsolute:v,handleBounds:jN(h,g),z:Zv(h,d,s.zIndexMode),userNode:h}},i.set(h.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(m=!1),h.parentId&&Eh(g,i,r,a,u)}return m}function HN(t,i){if(!t.parentId)return;const r=i.get(t.parentId);r?r.set(t.id,t):i.set(t.parentId,new Map([[t.id,t]]))}function Eh(t,i,r,a,s){const{elevateNodesOnSelect:u,nodeOrigin:c,nodeExtent:d,zIndexMode:m}=Sh(bh,a),h=t.parentId,g=i.get(h);if(!g){console.warn(`Parent node ${h} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}HN(t,r),s&&!g.parentId&&g.internals.rootParentIndex===void 0&&m==="auto"&&(g.internals.rootParentIndex=++s.i,g.internals.z=g.internals.z+s.i*DN),s&&g.internals.rootParentIndex!==void 0&&(s.i=g.internals.rootParentIndex);const y=u&&!wh(m)?Gv:0,{x,y:v,z:S}=LN(t,g,c,d,y,m),{positionAbsolute:_}=t.internals,M=x!==_.x||v!==_.y;(M||S!==t.internals.z)&&i.set(t.id,{...t,internals:{...t.internals,positionAbsolute:M?{x,y:v}:_,z:S}})}function Zv(t,i,r){const a=Tn(t.zIndex)?t.zIndex:0;return wh(r)?a:a+(t.selected?i:0)}function LN(t,i,r,a,s,u){const{x:c,y:d}=i.internals.positionAbsolute,m=mi(t),h=lo(t,r),g=zl(t.extent)?Tr(h,t.extent,m):h;let y=Tr({x:c+g.x,y:d+g.y},a,m);t.extent==="parent"&&(y=Rv(y,m,i));const x=Zv(t,s,u),v=i.internals.z??0;return{x:y.x,y:y.y,z:v>=x?v+1:x}}function Ch(t,i,r,a=[0,0]){const s=[],u=new Map;for(const c of t){const d=i.get(c.parentId);if(!d)continue;const m=u.get(c.parentId)?.expandedRect??Ml(d),h=Hv(m,c.rect);u.set(c.parentId,{expandedRect:h,parent:d})}return u.size>0&&u.forEach(({expandedRect:c,parent:d},m)=>{const h=d.internals.positionAbsolute,g=mi(d),y=d.origin??a,x=c.x<h.x?Math.round(Math.abs(h.x-c.x)):0,v=c.y<h.y?Math.round(Math.abs(h.y-c.y)):0,S=Math.max(g.width,Math.round(c.width)),_=Math.max(g.height,Math.round(c.height)),M=(S-g.width)*y[0],C=(_-g.height)*y[1];(x>0||v>0||M||C)&&(s.push({id:m,type:"position",position:{x:d.position.x-x+M,y:d.position.y-v+C}}),r.get(m)?.forEach(j=>{t.some(w=>w.id===j.id)||s.push({id:j.id,type:"position",position:{x:j.position.x+x,y:j.position.y+v}})})),(g.width<c.width||g.height<c.height||x||v)&&s.push({id:m,type:"dimensions",setAttributes:!0,dimensions:{width:S+(x?y[0]*x-M:0),height:_+(v?y[1]*v-C:0)}})}),s}function BN(t,i,r,a,s,u,c){const d=a?.querySelector(".xyflow__viewport");let m=!1;if(!d)return{changes:[],updatedInternals:m};const h=[],g=window.getComputedStyle(d),{m22:y}=new window.DOMMatrixReadOnly(g.transform),x=[];for(const v of t.values()){const S=i.get(v.id);if(!S)continue;if(S.hidden){i.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),m=!0;continue}const _=vh(v.nodeElement),M=S.measured.width!==_.width||S.measured.height!==_.height;if(!!(_.width&&_.height&&(M||!S.internals.handleBounds||v.force))){const j=v.nodeElement.getBoundingClientRect(),w=zl(S.extent)?S.extent:u;let{positionAbsolute:k}=S.internals;S.parentId&&S.extent==="parent"?k=Rv(k,_,i.get(S.parentId)):w&&(k=Tr(k,w,_));const I={...S,measured:_,internals:{...S.internals,positionAbsolute:k,handleBounds:{source:h0("source",v.nodeElement,j,y,S.id),target:h0("target",v.nodeElement,j,y,S.id)}}};i.set(S.id,I),S.parentId&&Eh(I,i,r,{nodeOrigin:s,zIndexMode:c}),m=!0,M&&(h.push({id:S.id,type:"dimensions",dimensions:_}),S.expandParent&&S.parentId&&x.push({id:S.id,parentId:S.parentId,rect:Ml(I,s)}))}}if(x.length>0){const v=Ch(x,i,r,s);h.push(...v)}return{changes:h,updatedInternals:m}}async function UN({delta:t,panZoom:i,transform:r,translateExtent:a,width:s,height:u}){if(!i||!t.x&&!t.y)return Promise.resolve(!1);const c=await i.setViewportConstrained({x:r[0]+t.x,y:r[1]+t.y,zoom:r[2]},[[0,0],[s,u]],a),d=!!c&&(c.x!==r[0]||c.y!==r[1]||c.k!==r[2]);return Promise.resolve(d)}function b0(t,i,r,a,s,u){let c=s;const d=a.get(c)||new Map;a.set(c,d.set(r,i)),c=`${s}-${t}`;const m=a.get(c)||new Map;if(a.set(c,m.set(r,i)),u){c=`${s}-${t}-${u}`;const h=a.get(c)||new Map;a.set(c,h.set(r,i))}}function Fv(t,i,r){t.clear(),i.clear();for(const a of r){const{source:s,target:u,sourceHandle:c=null,targetHandle:d=null}=a,m={edgeId:a.id,source:s,target:u,sourceHandle:c,targetHandle:d},h=`${s}-${c}--${u}-${d}`,g=`${u}-${d}--${s}-${c}`;b0("source",m,g,t,s,c),b0("target",m,h,t,u,d),i.set(a.id,a)}}function Kv(t,i){if(!t.parentId)return!1;const r=i.get(t.parentId);return r?r.selected?!0:Kv(r,i):!1}function S0(t,i,r){let a=t;do{if(a?.matches?.(i))return!0;if(a===r)return!1;a=a?.parentElement}while(a);return!1}function qN(t,i,r,a){const s=new Map;for(const[u,c]of t)if((c.selected||c.id===a)&&(!c.parentId||!Kv(c,t))&&(c.draggable||i&&typeof c.draggable>"u")){const d=t.get(u);d&&s.set(u,{id:u,position:d.position||{x:0,y:0},distance:{x:r.x-d.internals.positionAbsolute.x,y:r.y-d.internals.positionAbsolute.y},extent:d.extent,parentId:d.parentId,origin:d.origin,expandParent:d.expandParent,internals:{positionAbsolute:d.internals.positionAbsolute||{x:0,y:0}},measured:{width:d.measured.width??0,height:d.measured.height??0}})}return s}function ld({nodeId:t,dragItems:i,nodeLookup:r,dragging:a=!0}){const s=[];for(const[c,d]of i){const m=r.get(c)?.internals.userNode;m&&s.push({...m,position:d.position,dragging:a})}if(!t)return[s[0],s];const u=r.get(t)?.internals.userNode;return[u?{...u,position:i.get(t)?.position||u.position,dragging:a}:s[0],s]}function VN({dragItems:t,snapGrid:i,x:r,y:a}){const s=t.values().next().value;if(!s)return null;const u={x:r-s.distance.x,y:a-s.distance.y},c=oo(u,i);return{x:c.x-u.x,y:c.y-u.y}}function IN({onNodeMouseDown:t,getStoreItems:i,onDragStart:r,onDrag:a,onDragStop:s}){let u={x:null,y:null},c=0,d=new Map,m=!1,h={x:0,y:0},g=null,y=!1,x=null,v=!1,S=!1,_=null;function M({noDragClassName:j,handleSelector:w,domNode:k,isSelectable:I,nodeId:D,nodeClickDistance:H=0}){x=an(k);function G({x:Q,y:et}){const{nodeLookup:R,nodeExtent:U,snapGrid:z,snapToGrid:B,nodeOrigin:Y,onNodeDrag:K,onSelectionDrag:A,onError:O,updateNodePositions:V}=i();u={x:Q,y:et};let T=!1;const nt=d.size>1,ut=nt&&U?Yd(ao(d)):null,ct=nt&&B?VN({dragItems:d,snapGrid:z,x:Q,y:et}):null;for(const[dt,st]of d){if(!R.has(dt))continue;let pt={x:Q-st.distance.x,y:et-st.distance.y};B&&(pt=ct?{x:Math.round(pt.x+ct.x),y:Math.round(pt.y+ct.y)}:oo(pt,z));let wt=null;if(nt&&U&&!st.extent&&ut){const{positionAbsolute:Et}=st.internals,Ot=Et.x-ut.x+U[0][0],It=Et.x+st.measured.width-ut.x2+U[1][0],Ut=Et.y-ut.y+U[0][1],oe=Et.y+st.measured.height-ut.y2+U[1][1];wt=[[Ot,Ut],[It,oe]]}const{position:Ct,positionAbsolute:xt}=kv({nodeId:dt,nextPosition:pt,nodeLookup:R,nodeExtent:wt||U,nodeOrigin:Y,onError:O});T=T||st.position.x!==Ct.x||st.position.y!==Ct.y,st.position=Ct,st.internals.positionAbsolute=xt}if(S=S||T,!!T&&(V(d,!0),_&&(a||K||!D&&A))){const[dt,st]=ld({nodeId:D,dragItems:d,nodeLookup:R});a?.(_,d,dt,st),K?.(_,dt,st),D||A?.(_,st)}}async function Z(){if(!g)return;const{transform:Q,panBy:et,autoPanSpeed:R,autoPanOnNodeDrag:U}=i();if(!U){m=!1,cancelAnimationFrame(c);return}const[z,B]=jv(h,g,R);(z!==0||B!==0)&&(u.x=(u.x??0)-z/Q[2],u.y=(u.y??0)-B/Q[2],await et({x:z,y:B})&&G(u)),c=requestAnimationFrame(Z)}function lt(Q){const{nodeLookup:et,multiSelectionActive:R,nodesDraggable:U,transform:z,snapGrid:B,snapToGrid:Y,selectNodesOnDrag:K,onNodeDragStart:A,onSelectionDragStart:O,unselectNodesAndEdges:V}=i();y=!0,(!K||!I)&&!R&&D&&(et.get(D)?.selected||V()),I&&K&&D&&t?.(D);const T=Ua(Q.sourceEvent,{transform:z,snapGrid:B,snapToGrid:Y,containerBounds:g});if(u=T,d=qN(et,U,T,D),d.size>0&&(r||A||!D&&O)){const[nt,ut]=ld({nodeId:D,dragItems:d,nodeLookup:et});r?.(Q.sourceEvent,d,nt,ut),A?.(Q.sourceEvent,nt,ut),D||O?.(Q.sourceEvent,ut)}}const L=dv().clickDistance(H).on("start",Q=>{const{domNode:et,nodeDragThreshold:R,transform:U,snapGrid:z,snapToGrid:B}=i();g=et?.getBoundingClientRect()||null,v=!1,S=!1,_=Q.sourceEvent,R===0&&lt(Q),u=Ua(Q.sourceEvent,{transform:U,snapGrid:z,snapToGrid:B,containerBounds:g}),h=An(Q.sourceEvent,g)}).on("drag",Q=>{const{autoPanOnNodeDrag:et,transform:R,snapGrid:U,snapToGrid:z,nodeDragThreshold:B,nodeLookup:Y}=i(),K=Ua(Q.sourceEvent,{transform:R,snapGrid:U,snapToGrid:z,containerBounds:g});if(_=Q.sourceEvent,(Q.sourceEvent.type==="touchmove"&&Q.sourceEvent.touches.length>1||D&&!Y.has(D))&&(v=!0),!v){if(!m&&et&&y&&(m=!0,Z()),!y){const A=An(Q.sourceEvent,g),O=A.x-h.x,V=A.y-h.y;Math.sqrt(O*O+V*V)>B&&lt(Q)}(u.x!==K.xSnapped||u.y!==K.ySnapped)&&d&&y&&(h=An(Q.sourceEvent,g),G(K))}}).on("end",Q=>{if(!(!y||v)&&(m=!1,y=!1,cancelAnimationFrame(c),d.size>0)){const{nodeLookup:et,updateNodePositions:R,onNodeDragStop:U,onSelectionDragStop:z}=i();if(S&&(R(d,!1),S=!1),s||U||!D&&z){const[B,Y]=ld({nodeId:D,dragItems:d,nodeLookup:et,dragging:!1});s?.(Q.sourceEvent,d,B,Y),U?.(Q.sourceEvent,B,Y),D||z?.(Q.sourceEvent,Y)}}}).filter(Q=>{const et=Q.target;return!Q.button&&(!j||!S0(et,`.${j}`,k))&&(!w||S0(et,w,k))});x.call(L)}function C(){x?.on(".drag",null)}return{update:M,destroy:C}}function YN(t,i,r){const a=[],s={x:t.x-r,y:t.y-r,width:r*2,height:r*2};for(const u of i.values())Pa(s,Ml(u))>0&&a.push(u);return a}const QN=250;function XN(t,i,r,a){let s=[],u=1/0;const c=YN(t,r,i+QN);for(const d of c){const m=[...d.internals.handleBounds?.source??[],...d.internals.handleBounds?.target??[]];for(const h of m){if(a.nodeId===h.nodeId&&a.type===h.type&&a.id===h.id)continue;const{x:g,y}=Ar(d,h,h.position,!0),x=Math.sqrt(Math.pow(g-t.x,2)+Math.pow(y-t.y,2));x>i||(x<u?(s=[{...h,x:g,y}],u=x):x===u&&s.push({...h,x:g,y}))}}if(!s.length)return null;if(s.length>1){const d=a.type==="source"?"target":"source";return s.find(m=>m.type===d)??s[0]}return s[0]}function $v(t,i,r,a,s,u=!1){const c=a.get(t);if(!c)return null;const d=s==="strict"?c.internals.handleBounds?.[i]:[...c.internals.handleBounds?.source??[],...c.internals.handleBounds?.target??[]],m=(r?d?.find(h=>h.id===r):d?.[0])??null;return m&&u?{...m,...Ar(c,m,m.position,!0)}:m}function Pv(t,i){return t||(i?.classList.contains("target")?"target":i?.classList.contains("source")?"source":null)}function GN(t,i){let r=null;return i?r=!0:t&&!i&&(r=!1),r}const Jv=()=>!0;function ZN(t,{connectionMode:i,connectionRadius:r,handleId:a,nodeId:s,edgeUpdaterType:u,isTarget:c,domNode:d,nodeLookup:m,lib:h,autoPanOnConnect:g,flowId:y,panBy:x,cancelConnection:v,onConnectStart:S,onConnect:_,onConnectEnd:M,isValidConnection:C=Jv,onReconnectEnd:j,updateConnection:w,getTransform:k,getFromHandle:I,autoPanSpeed:D,dragThreshold:H=1,handleDomNode:G}){const Z=Uv(t.target);let lt=0,L;const{x:Q,y:et}=An(t),R=Pv(u,G),U=d?.getBoundingClientRect();let z=!1;if(!U||!R)return;const B=$v(s,R,a,m,i);if(!B)return;let Y=An(t,U),K=!1,A=null,O=!1,V=null;function T(){if(!g||!U)return;const[Ct,xt]=jv(Y,U,D);x({x:Ct,y:xt}),lt=requestAnimationFrame(T)}const nt={...B,nodeId:s,type:R,position:B.position},ut=m.get(s);let dt={inProgress:!0,isValid:null,from:Ar(ut,nt,vt.Left,!0),fromHandle:nt,fromPosition:nt.position,fromNode:ut,to:Y,toHandle:null,toPosition:u0[nt.position],toNode:null,pointer:Y};function st(){z=!0,w(dt),S?.(t,{nodeId:s,handleId:a,handleType:R})}H===0&&st();function pt(Ct){if(!z){const{x:oe,y:Ke}=An(Ct),Ae=oe-Q,je=Ke-et;if(!(Ae*Ae+je*je>H*H))return;st()}if(!I()||!nt){wt(Ct);return}const xt=k();Y=An(Ct,U),L=XN(so(Y,xt,!1,[1,1]),r,m,nt),K||(T(),K=!0);const Et=Wv(Ct,{handle:L,connectionMode:i,fromNodeId:s,fromHandleId:a,fromType:c?"target":"source",isValidConnection:C,doc:Z,lib:h,flowId:y,nodeLookup:m});V=Et.handleDomNode,A=Et.connection,O=GN(!!L,Et.isValid);const Ot=m.get(s),It=Ot?Ar(Ot,nt,vt.Left,!0):dt.from,Ut={...dt,from:It,isValid:O,to:Et.toHandle&&O?du({x:Et.toHandle.x,y:Et.toHandle.y},xt):Y,toHandle:Et.toHandle,toPosition:O&&Et.toHandle?Et.toHandle.position:u0[nt.position],toNode:Et.toHandle?m.get(Et.toHandle.nodeId):null,pointer:Y};w(Ut),dt=Ut}function wt(Ct){if(!("touches"in Ct&&Ct.touches.length>0)){if(z){(L||V)&&A&&O&&_?.(A);const{inProgress:xt,...Et}=dt,Ot={...Et,toPosition:dt.toHandle?dt.toPosition:null};M?.(Ct,Ot),u&&j?.(Ct,Ot)}v(),cancelAnimationFrame(lt),K=!1,O=!1,A=null,V=null,Z.removeEventListener("mousemove",pt),Z.removeEventListener("mouseup",wt),Z.removeEventListener("touchmove",pt),Z.removeEventListener("touchend",wt)}}Z.addEventListener("mousemove",pt),Z.addEventListener("mouseup",wt),Z.addEventListener("touchmove",pt),Z.addEventListener("touchend",wt)}function Wv(t,{handle:i,connectionMode:r,fromNodeId:a,fromHandleId:s,fromType:u,doc:c,lib:d,flowId:m,isValidConnection:h=Jv,nodeLookup:g}){const y=u==="target",x=i?c.querySelector(`.${d}-flow__handle[data-id="${m}-${i?.nodeId}-${i?.id}-${i?.type}"]`):null,{x:v,y:S}=An(t),_=c.elementFromPoint(v,S),M=_?.classList.contains(`${d}-flow__handle`)?_:x,C={handleDomNode:M,isValid:!1,connection:null,toHandle:null};if(M){const j=Pv(void 0,M),w=M.getAttribute("data-nodeid"),k=M.getAttribute("data-handleid"),I=M.classList.contains("connectable"),D=M.classList.contains("connectableend");if(!w||!j)return C;const H={source:y?w:a,sourceHandle:y?k:s,target:y?a:w,targetHandle:y?s:k};C.connection=H;const Z=I&&D&&(r===Tl.Strict?y&&j==="source"||!y&&j==="target":w!==a||k!==s);C.isValid=Z&&h(H),C.toHandle=$v(w,j,k,g,r,!0)}return C}const Zd={onPointerDown:ZN,isValid:Wv};function FN({domNode:t,panZoom:i,getTransform:r,getViewScale:a}){const s=an(t);function u({translateExtent:d,width:m,height:h,zoomStep:g=1,pannable:y=!0,zoomable:x=!0,inversePan:v=!1}){const S=w=>{if(w.sourceEvent.type!=="wheel"||!i)return;const k=r(),I=w.sourceEvent.ctrlKey&&Ja()?10:1,D=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*g,H=k[2]*Math.pow(2,D*I);i.scaleTo(H)};let _=[0,0];const M=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(_=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},C=w=>{const k=r();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!i)return;const I=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],D=[I[0]-_[0],I[1]-_[1]];_=I;const H=a()*Math.max(k[2],Math.log(k[2]))*(v?-1:1),G={x:k[0]-D[0]*H,y:k[1]-D[1]*H},Z=[[0,0],[m,h]];i.setViewportConstrained({x:G.x,y:G.y,zoom:k[2]},Z,d)},j=Tv().on("start",M).on("zoom",y?C:null).on("zoom.wheel",x?S:null);s.call(j,{})}function c(){s.on("zoom",null)}return{update:u,destroy:c,pointer:_n}}const Tu=t=>({x:t.x,y:t.y,zoom:t.k}),ad=({x:t,y:i,zoom:r})=>Cu.translate(t,i).scale(r),vl=(t,i)=>t.target.closest(`.${i}`),t1=(t,i)=>i===2&&Array.isArray(t)&&t.includes(2),KN=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,od=(t,i=0,r=KN,a=()=>{})=>{const s=typeof i=="number"&&i>0;return s||a(),s?t.transition().duration(i).ease(r).on("end",a):t},e1=t=>{const i=t.ctrlKey&&Ja()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*i};function $N({zoomPanValues:t,noWheelClassName:i,d3Selection:r,d3Zoom:a,panOnScrollMode:s,panOnScrollSpeed:u,zoomOnPinch:c,onPanZoomStart:d,onPanZoom:m,onPanZoomEnd:h}){return g=>{if(vl(g,i))return g.ctrlKey&&g.preventDefault(),!1;g.preventDefault(),g.stopImmediatePropagation();const y=r.property("__zoom").k||1;if(g.ctrlKey&&c){const M=_n(g),C=e1(g),j=y*Math.pow(2,C);a.scaleTo(r,j,M,g);return}const x=g.deltaMode===1?20:1;let v=s===Er.Vertical?0:g.deltaX*x,S=s===Er.Horizontal?0:g.deltaY*x;!Ja()&&g.shiftKey&&s!==Er.Vertical&&(v=g.deltaY*x,S=0),a.translateBy(r,-(v/y)*u,-(S/y)*u,{internal:!0});const _=Tu(r.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(m?.(g,_),t.panScrollTimeout=setTimeout(()=>{h?.(g,_),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,d?.(g,_))}}function PN({noWheelClassName:t,preventScrolling:i,d3ZoomHandler:r}){return function(a,s){const u=a.type==="wheel",c=!i&&u&&!a.ctrlKey,d=vl(a,t);if(a.ctrlKey&&u&&d&&a.preventDefault(),c||d)return null;a.preventDefault(),r.call(this,a,s)}}function JN({zoomPanValues:t,onDraggingChange:i,onPanZoomStart:r}){return a=>{if(a.sourceEvent?.internal)return;const s=Tu(a.transform);t.mouseButton=a.sourceEvent?.button||0,t.isZoomingOrPanning=!0,t.prevViewport=s,a.sourceEvent?.type==="mousedown"&&i(!0),r&&r?.(a.sourceEvent,s)}}function WN({zoomPanValues:t,panOnDrag:i,onPaneContextMenu:r,onTransformChange:a,onPanZoom:s}){return u=>{t.usedRightMouseButton=!!(r&&t1(i,t.mouseButton??0)),u.sourceEvent?.sync||a([u.transform.x,u.transform.y,u.transform.k]),s&&!u.sourceEvent?.internal&&s?.(u.sourceEvent,Tu(u.transform))}}function tT({zoomPanValues:t,panOnDrag:i,panOnScroll:r,onDraggingChange:a,onPanZoomEnd:s,onPaneContextMenu:u}){return c=>{if(!c.sourceEvent?.internal&&(t.isZoomingOrPanning=!1,u&&t1(i,t.mouseButton??0)&&!t.usedRightMouseButton&&c.sourceEvent&&u(c.sourceEvent),t.usedRightMouseButton=!1,a(!1),s)){const d=Tu(c.transform);t.prevViewport=d,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{s?.(c.sourceEvent,d)},r?150:0)}}}function eT({zoomActivationKeyPressed:t,zoomOnScroll:i,zoomOnPinch:r,panOnDrag:a,panOnScroll:s,zoomOnDoubleClick:u,userSelectionActive:c,noWheelClassName:d,noPanClassName:m,lib:h,connectionInProgress:g}){return y=>{const x=t||i,v=r&&y.ctrlKey,S=y.type==="wheel";if(y.button===1&&y.type==="mousedown"&&(vl(y,`${h}-flow__node`)||vl(y,`${h}-flow__edge`)))return!0;if(!a&&!x&&!s&&!u&&!r||c||g&&!S||vl(y,d)&&S||vl(y,m)&&(!S||s&&S&&!t)||!r&&y.ctrlKey&&S)return!1;if(!r&&y.type==="touchstart"&&y.touches?.length>1)return y.preventDefault(),!1;if(!x&&!s&&!v&&S||!a&&(y.type==="mousedown"||y.type==="touchstart")||Array.isArray(a)&&!a.includes(y.button)&&y.type==="mousedown")return!1;const _=Array.isArray(a)&&a.includes(y.button)||!y.button||y.button<=1;return(!y.ctrlKey||S)&&_}}function nT({domNode:t,minZoom:i,maxZoom:r,translateExtent:a,viewport:s,onPanZoom:u,onPanZoomStart:c,onPanZoomEnd:d,onDraggingChange:m}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},g=t.getBoundingClientRect(),y=Tv().scaleExtent([i,r]).translateExtent(a),x=an(t).call(y);j({x:s.x,y:s.y,zoom:Al(s.zoom,i,r)},[[0,0],[g.width,g.height]],a);const v=x.on("wheel.zoom"),S=x.on("dblclick.zoom");y.wheelDelta(e1);function _(L,Q){return x?new Promise(et=>{y?.interpolate(Q?.interpolate==="linear"?Ba:Ps).transform(od(x,Q?.duration,Q?.ease,()=>et(!0)),L)}):Promise.resolve(!1)}function M({noWheelClassName:L,noPanClassName:Q,onPaneContextMenu:et,userSelectionActive:R,panOnScroll:U,panOnDrag:z,panOnScrollMode:B,panOnScrollSpeed:Y,preventScrolling:K,zoomOnPinch:A,zoomOnScroll:O,zoomOnDoubleClick:V,zoomActivationKeyPressed:T,lib:nt,onTransformChange:ut,connectionInProgress:ct,paneClickDistance:dt,selectionOnDrag:st}){R&&!h.isZoomingOrPanning&&C();const pt=U&&!T&&!R;y.clickDistance(st?1/0:!Tn(dt)||dt<0?0:dt);const wt=pt?$N({zoomPanValues:h,noWheelClassName:L,d3Selection:x,d3Zoom:y,panOnScrollMode:B,panOnScrollSpeed:Y,zoomOnPinch:A,onPanZoomStart:c,onPanZoom:u,onPanZoomEnd:d}):PN({noWheelClassName:L,preventScrolling:K,d3ZoomHandler:v});if(x.on("wheel.zoom",wt,{passive:!1}),!R){const xt=JN({zoomPanValues:h,onDraggingChange:m,onPanZoomStart:c});y.on("start",xt);const Et=WN({zoomPanValues:h,panOnDrag:z,onPaneContextMenu:!!et,onPanZoom:u,onTransformChange:ut});y.on("zoom",Et);const Ot=tT({zoomPanValues:h,panOnDrag:z,panOnScroll:U,onPaneContextMenu:et,onPanZoomEnd:d,onDraggingChange:m});y.on("end",Ot)}const Ct=eT({zoomActivationKeyPressed:T,panOnDrag:z,zoomOnScroll:O,panOnScroll:U,zoomOnDoubleClick:V,zoomOnPinch:A,userSelectionActive:R,noPanClassName:Q,noWheelClassName:L,lib:nt,connectionInProgress:ct});y.filter(Ct),V?x.on("dblclick.zoom",S):x.on("dblclick.zoom",null)}function C(){y.on("zoom",null)}async function j(L,Q,et){const R=ad(L),U=y?.constrain()(R,Q,et);return U&&await _(U),new Promise(z=>z(U))}async function w(L,Q){const et=ad(L);return await _(et,Q),new Promise(R=>R(et))}function k(L){if(x){const Q=ad(L),et=x.property("__zoom");(et.k!==L.zoom||et.x!==L.x||et.y!==L.y)&&y?.transform(x,Q,null,{sync:!0})}}function I(){const L=x?Nv(x.node()):{x:0,y:0,k:1};return{x:L.x,y:L.y,zoom:L.k}}function D(L,Q){return x?new Promise(et=>{y?.interpolate(Q?.interpolate==="linear"?Ba:Ps).scaleTo(od(x,Q?.duration,Q?.ease,()=>et(!0)),L)}):Promise.resolve(!1)}function H(L,Q){return x?new Promise(et=>{y?.interpolate(Q?.interpolate==="linear"?Ba:Ps).scaleBy(od(x,Q?.duration,Q?.ease,()=>et(!0)),L)}):Promise.resolve(!1)}function G(L){y?.scaleExtent(L)}function Z(L){y?.translateExtent(L)}function lt(L){const Q=!Tn(L)||L<0?0:L;y?.clickDistance(Q)}return{update:M,destroy:C,setViewport:w,setViewportConstrained:j,getViewport:I,scaleTo:D,scaleBy:H,setScaleExtent:G,setTranslateExtent:Z,syncViewport:k,setClickDistance:lt}}var Ol;(function(t){t.Line="line",t.Handle="handle"})(Ol||(Ol={}));function iT({width:t,prevWidth:i,height:r,prevHeight:a,affectsX:s,affectsY:u}){const c=t-i,d=r-a,m=[c>0?1:c<0?-1:0,d>0?1:d<0?-1:0];return c&&s&&(m[0]=m[0]*-1),d&&u&&(m[1]=m[1]*-1),m}function w0(t){const i=t.includes("right")||t.includes("left"),r=t.includes("bottom")||t.includes("top"),a=t.includes("left"),s=t.includes("top");return{isHorizontal:i,isVertical:r,affectsX:a,affectsY:s}}function Xi(t,i){return Math.max(0,i-t)}function Gi(t,i){return Math.max(0,t-i)}function Ys(t,i,r){return Math.max(0,i-t,t-r)}function E0(t,i){return t?!i:i}function rT(t,i,r,a,s,u,c,d){let{affectsX:m,affectsY:h}=i;const{isHorizontal:g,isVertical:y}=i,x=g&&y,{xSnapped:v,ySnapped:S}=r,{minWidth:_,maxWidth:M,minHeight:C,maxHeight:j}=a,{x:w,y:k,width:I,height:D,aspectRatio:H}=t;let G=Math.floor(g?v-t.pointerX:0),Z=Math.floor(y?S-t.pointerY:0);const lt=I+(m?-G:G),L=D+(h?-Z:Z),Q=-u[0]*I,et=-u[1]*D;let R=Ys(lt,_,M),U=Ys(L,C,j);if(c){let Y=0,K=0;m&&G<0?Y=Xi(w+G+Q,c[0][0]):!m&&G>0&&(Y=Gi(w+lt+Q,c[1][0])),h&&Z<0?K=Xi(k+Z+et,c[0][1]):!h&&Z>0&&(K=Gi(k+L+et,c[1][1])),R=Math.max(R,Y),U=Math.max(U,K)}if(d){let Y=0,K=0;m&&G>0?Y=Gi(w+G,d[0][0]):!m&&G<0&&(Y=Xi(w+lt,d[1][0])),h&&Z>0?K=Gi(k+Z,d[0][1]):!h&&Z<0&&(K=Xi(k+L,d[1][1])),R=Math.max(R,Y),U=Math.max(U,K)}if(s){if(g){const Y=Ys(lt/H,C,j)*H;if(R=Math.max(R,Y),c){let K=0;!m&&!h||m&&!h&&x?K=Gi(k+et+lt/H,c[1][1])*H:K=Xi(k+et+(m?G:-G)/H,c[0][1])*H,R=Math.max(R,K)}if(d){let K=0;!m&&!h||m&&!h&&x?K=Xi(k+lt/H,d[1][1])*H:K=Gi(k+(m?G:-G)/H,d[0][1])*H,R=Math.max(R,K)}}if(y){const Y=Ys(L*H,_,M)/H;if(U=Math.max(U,Y),c){let K=0;!m&&!h||h&&!m&&x?K=Gi(w+L*H+Q,c[1][0])/H:K=Xi(w+(h?Z:-Z)*H+Q,c[0][0])/H,U=Math.max(U,K)}if(d){let K=0;!m&&!h||h&&!m&&x?K=Xi(w+L*H,d[1][0])/H:K=Gi(w+(h?Z:-Z)*H,d[0][0])/H,U=Math.max(U,K)}}}Z=Z+(Z<0?U:-U),G=G+(G<0?R:-R),s&&(x?lt>L*H?Z=(E0(m,h)?-G:G)/H:G=(E0(m,h)?-Z:Z)*H:g?(Z=G/H,h=m):(G=Z*H,m=h));const z=m?w+G:w,B=h?k+Z:k;return{width:I+(m?-G:G),height:D+(h?-Z:Z),x:u[0]*G*(m?-1:1)+z,y:u[1]*Z*(h?-1:1)+B}}const n1={width:0,height:0,x:0,y:0},lT={...n1,pointerX:0,pointerY:0,aspectRatio:1};function aT(t){return[[0,0],[t.measured.width,t.measured.height]]}function oT(t,i,r){const a=i.position.x+t.position.x,s=i.position.y+t.position.y,u=t.measured.width??0,c=t.measured.height??0,d=r[0]*u,m=r[1]*c;return[[a-d,s-m],[a+u-d,s+c-m]]}function sT({domNode:t,nodeId:i,getStoreItems:r,onChange:a,onEnd:s}){const u=an(t);let c={controlDirection:w0("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function d({controlPosition:h,boundaries:g,keepAspectRatio:y,resizeDirection:x,onResizeStart:v,onResize:S,onResizeEnd:_,shouldResize:M}){let C={...n1},j={...lT};c={boundaries:g,resizeDirection:x,keepAspectRatio:y,controlDirection:w0(h)};let w,k=null,I=[],D,H,G,Z=!1;const lt=dv().on("start",L=>{const{nodeLookup:Q,transform:et,snapGrid:R,snapToGrid:U,nodeOrigin:z,paneDomNode:B}=r();if(w=Q.get(i),!w)return;k=B?.getBoundingClientRect()??null;const{xSnapped:Y,ySnapped:K}=Ua(L.sourceEvent,{transform:et,snapGrid:R,snapToGrid:U,containerBounds:k});C={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},j={...C,pointerX:Y,pointerY:K,aspectRatio:C.width/C.height},D=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(D=Q.get(w.parentId),H=D&&w.extent==="parent"?aT(D):void 0),I=[],G=void 0;for(const[A,O]of Q)if(O.parentId===i&&(I.push({id:A,position:{...O.position},extent:O.extent}),O.extent==="parent"||O.expandParent)){const V=oT(O,w,O.origin??z);G?G=[[Math.min(V[0][0],G[0][0]),Math.min(V[0][1],G[0][1])],[Math.max(V[1][0],G[1][0]),Math.max(V[1][1],G[1][1])]]:G=V}v?.(L,{...C})}).on("drag",L=>{const{transform:Q,snapGrid:et,snapToGrid:R,nodeOrigin:U}=r(),z=Ua(L.sourceEvent,{transform:Q,snapGrid:et,snapToGrid:R,containerBounds:k}),B=[];if(!w)return;const{x:Y,y:K,width:A,height:O}=C,V={},T=w.origin??U,{width:nt,height:ut,x:ct,y:dt}=rT(j,c.controlDirection,z,c.boundaries,c.keepAspectRatio,T,H,G),st=nt!==A,pt=ut!==O,wt=ct!==Y&&st,Ct=dt!==K&&pt;if(!wt&&!Ct&&!st&&!pt)return;if((wt||Ct||T[0]===1||T[1]===1)&&(V.x=wt?ct:C.x,V.y=Ct?dt:C.y,C.x=V.x,C.y=V.y,I.length>0)){const It=ct-Y,Ut=dt-K;for(const oe of I)oe.position={x:oe.position.x-It+T[0]*(nt-A),y:oe.position.y-Ut+T[1]*(ut-O)},B.push(oe)}if((st||pt)&&(V.width=st&&(!c.resizeDirection||c.resizeDirection==="horizontal")?nt:C.width,V.height=pt&&(!c.resizeDirection||c.resizeDirection==="vertical")?ut:C.height,C.width=V.width,C.height=V.height),D&&w.expandParent){const It=T[0]*(V.width??0);V.x&&V.x<It&&(C.x=It,j.x=j.x-(V.x-It));const Ut=T[1]*(V.height??0);V.y&&V.y<Ut&&(C.y=Ut,j.y=j.y-(V.y-Ut))}const xt=iT({width:C.width,prevWidth:A,height:C.height,prevHeight:O,affectsX:c.controlDirection.affectsX,affectsY:c.controlDirection.affectsY}),Et={...C,direction:xt};M?.(L,Et)!==!1&&(Z=!0,S?.(L,Et),a(V,B))}).on("end",L=>{Z&&(_?.(L,{...C}),s?.({...C}),Z=!1)});u.call(lt)}function m(){u.on(".drag",null)}return{update:d,destroy:m}}var sd={exports:{}},ud={},cd={exports:{}},fd={};var C0;function uT(){if(C0)return fd;C0=1;var t=eo();function i(y,x){return y===x&&(y!==0||1/y===1/x)||y!==y&&x!==x}var r=typeof Object.is=="function"?Object.is:i,a=t.useState,s=t.useEffect,u=t.useLayoutEffect,c=t.useDebugValue;function d(y,x){var v=x(),S=a({inst:{value:v,getSnapshot:x}}),_=S[0].inst,M=S[1];return u(function(){_.value=v,_.getSnapshot=x,m(_)&&M({inst:_})},[y,v,x]),s(function(){return m(_)&&M({inst:_}),y(function(){m(_)&&M({inst:_})})},[y]),c(v),v}function m(y){var x=y.getSnapshot;y=y.value;try{var v=x();return!r(y,v)}catch{return!0}}function h(y,x){return x()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:d;return fd.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:g,fd}var _0;function cT(){return _0||(_0=1,cd.exports=uT()),cd.exports}var N0;function fT(){if(N0)return ud;N0=1;var t=eo(),i=cT();function r(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var a=typeof Object.is=="function"?Object.is:r,s=i.useSyncExternalStore,u=t.useRef,c=t.useEffect,d=t.useMemo,m=t.useDebugValue;return ud.useSyncExternalStoreWithSelector=function(h,g,y,x,v){var S=u(null);if(S.current===null){var _={hasValue:!1,value:null};S.current=_}else _=S.current;S=d(function(){function C(D){if(!j){if(j=!0,w=D,D=x(D),v!==void 0&&_.hasValue){var H=_.value;if(v(H,D))return k=H}return k=D}if(H=k,a(w,D))return H;var G=x(D);return v!==void 0&&v(H,G)?(w=D,H):(w=D,k=G)}var j=!1,w,k,I=y===void 0?null:y;return[function(){return C(g())},I===null?void 0:function(){return C(I())}]},[g,y,x,v]);var M=s(h,S[0],S[1]);return c(function(){_.hasValue=!0,_.value=M},[M]),m(M),M},ud}var T0;function dT(){return T0||(T0=1,sd.exports=fT()),sd.exports}var hT=dT();const pT=yu(hT),mT={},A0=t=>{let i;const r=new Set,a=(g,y)=>{const x=typeof g=="function"?g(i):g;if(!Object.is(x,i)){const v=i;i=y??(typeof x!="object"||x===null)?x:Object.assign({},i,x),r.forEach(S=>S(i,v))}},s=()=>i,m={setState:a,getState:s,getInitialState:()=>h,subscribe:g=>(r.add(g),()=>r.delete(g)),destroy:()=>{(mT?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},h=i=t(a,s,m);return m},gT=t=>t?A0(t):A0,{useDebugValue:yT}=_w,{useSyncExternalStoreWithSelector:xT}=pT,vT=t=>t;function i1(t,i=vT,r){const a=xT(t.subscribe,t.getState,t.getServerState||t.getInitialState,i,r);return yT(a),a}const M0=(t,i)=>{const r=gT(t),a=(s,u=i)=>i1(r,s,u);return Object.assign(a,r),a},bT=(t,i)=>t?M0(t,i):M0;function ie(t,i){if(Object.is(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;if(t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;for(const[a,s]of t)if(!Object.is(s,i.get(a)))return!1;return!0}if(t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;for(const a of t)if(!i.has(a))return!1;return!0}const r=Object.keys(t);if(r.length!==Object.keys(i).length)return!1;for(const a of r)if(!Object.prototype.hasOwnProperty.call(i,a)||!Object.is(t[a],i[a]))return!1;return!0}Bx();const Au=J.createContext(null),ST=Au.Provider,r1=qn.error001();function Bt(t,i){const r=J.useContext(Au);if(r===null)throw new Error(r1);return i1(r,t,i)}function re(){const t=J.useContext(Au);if(t===null)throw new Error(r1);return J.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const z0={display:"none"},wT={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},l1="react-flow__node-desc",a1="react-flow__edge-desc",ET="react-flow__aria-live",CT=t=>t.ariaLiveMessage,_T=t=>t.ariaLabelConfig;function NT({rfId:t}){const i=Bt(CT);return E.jsx("div",{id:`${ET}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:wT,children:i})}function TT({rfId:t,disableKeyboardA11y:i}){const r=Bt(_T);return E.jsxs(E.Fragment,{children:[E.jsx("div",{id:`${l1}-${t}`,style:z0,children:i?r["node.a11yDescription.default"]:r["node.a11yDescription.keyboardDisabled"]}),E.jsx("div",{id:`${a1}-${t}`,style:z0,children:r["edge.a11yDescription.default"]}),!i&&E.jsx(NT,{rfId:t})]})}const Mu=J.forwardRef(({position:t="top-left",children:i,className:r,style:a,...s},u)=>{const c=`${t}`.split("-");return E.jsx("div",{className:ye(["react-flow__panel",r,...c]),style:a,ref:u,...s,children:i})});Mu.displayName="Panel";function AT({proOptions:t,position:i="bottom-right"}){return t?.hideAttribution?null:E.jsx(Mu,{position:i,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:E.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const MT=t=>{const i=[],r=[];for(const[,a]of t.nodeLookup)a.selected&&i.push(a.internals.userNode);for(const[,a]of t.edgeLookup)a.selected&&r.push(a);return{selectedNodes:i,selectedEdges:r}},Qs=t=>t.id;function zT(t,i){return ie(t.selectedNodes.map(Qs),i.selectedNodes.map(Qs))&&ie(t.selectedEdges.map(Qs),i.selectedEdges.map(Qs))}function OT({onSelectionChange:t}){const i=re(),{selectedNodes:r,selectedEdges:a}=Bt(MT,zT);return J.useEffect(()=>{const s={nodes:r,edges:a};t?.(s),i.getState().onSelectionChangeHandlers.forEach(u=>u(s))},[r,a,t]),null}const DT=t=>!!t.onSelectionChangeHandlers;function kT({onSelectionChange:t}){const i=Bt(DT);return t||i?E.jsx(OT,{onSelectionChange:t}):null}const o1=[0,0],RT={x:0,y:0,zoom:1},jT=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],O0=[...jT,"rfId"],HT=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),D0={translateExtent:Ka,nodeOrigin:o1,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function LT(t){const{setNodes:i,setEdges:r,setMinZoom:a,setMaxZoom:s,setTranslateExtent:u,setNodeExtent:c,reset:d,setDefaultNodesAndEdges:m}=Bt(HT,ie),h=re();J.useEffect(()=>(m(t.defaultNodes,t.defaultEdges),()=>{g.current=D0,d()}),[]);const g=J.useRef(D0);return J.useEffect(()=>{for(const y of O0){const x=t[y],v=g.current[y];x!==v&&(typeof t[y]>"u"||(y==="nodes"?i(x):y==="edges"?r(x):y==="minZoom"?a(x):y==="maxZoom"?s(x):y==="translateExtent"?u(x):y==="nodeExtent"?c(x):y==="ariaLabelConfig"?h.setState({ariaLabelConfig:bN(x)}):y==="fitView"?h.setState({fitViewQueued:x}):y==="fitViewOptions"?h.setState({fitViewOptions:x}):h.setState({[y]:x})))}g.current=t},O0.map(y=>t[y])),null}function k0(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function BT(t){const[i,r]=J.useState(t==="system"?null:t);return J.useEffect(()=>{if(t!=="system"){r(t);return}const a=k0(),s=()=>r(a?.matches?"dark":"light");return s(),a?.addEventListener("change",s),()=>{a?.removeEventListener("change",s)}},[t]),i!==null?i:k0()?.matches?"dark":"light"}const R0=typeof document<"u"?document:null;function Wa(t=null,i={target:R0,actInsideInputWithModifier:!0}){const[r,a]=J.useState(!1),s=J.useRef(!1),u=J.useRef(new Set([])),[c,d]=J.useMemo(()=>{if(t!==null){const h=(Array.isArray(t)?t:[t]).filter(y=>typeof y=="string").map(y=>y.replace("+",`
10
+ `).replace(`
11
+
12
+ `,`
13
+ +`).split(`
14
+ `)),g=h.reduce((y,x)=>y.concat(...x),[]);return[h,g]}return[[],[]]},[t]);return J.useEffect(()=>{const m=i?.target??R0,h=i?.actInsideInputWithModifier??!0;if(t!==null){const g=v=>{if(s.current=v.ctrlKey||v.metaKey||v.shiftKey||v.altKey,(!s.current||s.current&&!h)&&qv(v))return!1;const _=H0(v.code,d);if(u.current.add(v[_]),j0(c,u.current,!1)){const M=v.composedPath?.()?.[0]||v.target,C=M?.nodeName==="BUTTON"||M?.nodeName==="A";i.preventDefault!==!1&&(s.current||!C)&&v.preventDefault(),a(!0)}},y=v=>{const S=H0(v.code,d);j0(c,u.current,!0)?(a(!1),u.current.clear()):u.current.delete(v[S]),v.key==="Meta"&&u.current.clear(),s.current=!1},x=()=>{u.current.clear(),a(!1)};return m?.addEventListener("keydown",g),m?.addEventListener("keyup",y),window.addEventListener("blur",x),window.addEventListener("contextmenu",x),()=>{m?.removeEventListener("keydown",g),m?.removeEventListener("keyup",y),window.removeEventListener("blur",x),window.removeEventListener("contextmenu",x)}}},[t,a]),r}function j0(t,i,r){return t.filter(a=>r||a.length===i.size).some(a=>a.every(s=>i.has(s)))}function H0(t,i){return i.includes(t)?"code":"key"}const UT=()=>{const t=re();return J.useMemo(()=>({zoomIn:i=>{const{panZoom:r}=t.getState();return r?r.scaleBy(1.2,{duration:i?.duration}):Promise.resolve(!1)},zoomOut:i=>{const{panZoom:r}=t.getState();return r?r.scaleBy(1/1.2,{duration:i?.duration}):Promise.resolve(!1)},zoomTo:(i,r)=>{const{panZoom:a}=t.getState();return a?a.scaleTo(i,{duration:r?.duration}):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(i,r)=>{const{transform:[a,s,u],panZoom:c}=t.getState();return c?(await c.setViewport({x:i.x??a,y:i.y??s,zoom:i.zoom??u},r),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[i,r,a]=t.getState().transform;return{x:i,y:r,zoom:a}},setCenter:async(i,r,a)=>t.getState().setCenter(i,r,a),fitBounds:async(i,r)=>{const{width:a,height:s,minZoom:u,maxZoom:c,panZoom:d}=t.getState(),m=xh(i,a,s,u,c,r?.padding??.1);return d?(await d.setViewport(m,{duration:r?.duration,ease:r?.ease,interpolate:r?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(i,r={})=>{const{transform:a,snapGrid:s,snapToGrid:u,domNode:c}=t.getState();if(!c)return i;const{x:d,y:m}=c.getBoundingClientRect(),h={x:i.x-d,y:i.y-m},g=r.snapGrid??s,y=r.snapToGrid??u;return so(h,a,y,g)},flowToScreenPosition:i=>{const{transform:r,domNode:a}=t.getState();if(!a)return i;const{x:s,y:u}=a.getBoundingClientRect(),c=du(i,r);return{x:c.x+s,y:c.y+u}}}),[])};function s1(t,i){const r=[],a=new Map,s=[];for(const u of t)if(u.type==="add"){s.push(u);continue}else if(u.type==="remove"||u.type==="replace")a.set(u.id,[u]);else{const c=a.get(u.id);c?c.push(u):a.set(u.id,[u])}for(const u of i){const c=a.get(u.id);if(!c){r.push(u);continue}if(c[0].type==="remove")continue;if(c[0].type==="replace"){r.push({...c[0].item});continue}const d={...u};for(const m of c)qT(m,d);r.push(d)}return s.length&&s.forEach(u=>{u.index!==void 0?r.splice(u.index,0,{...u.item}):r.push({...u.item})}),r}function qT(t,i){switch(t.type){case"select":{i.selected=t.selected;break}case"position":{typeof t.position<"u"&&(i.position=t.position),typeof t.dragging<"u"&&(i.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(i.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(i.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(i.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(i.resizing=t.resizing);break}}}function VT(t,i){return s1(t,i)}function IT(t,i){return s1(t,i)}function vr(t,i){return{id:t,type:"select",selected:i}}function bl(t,i=new Set,r=!1){const a=[];for(const[s,u]of t){const c=i.has(s);!(u.selected===void 0&&!c)&&u.selected!==c&&(r&&(u.selected=c),a.push(vr(u.id,c)))}return a}function L0({items:t=[],lookup:i}){const r=[],a=new Map(t.map(s=>[s.id,s]));for(const[s,u]of t.entries()){const c=i.get(u.id),d=c?.internals?.userNode??c;d!==void 0&&d!==u&&r.push({id:u.id,item:u,type:"replace"}),d===void 0&&r.push({item:u,type:"add",index:s})}for(const[s]of i)a.get(s)===void 0&&r.push({id:s,type:"remove"});return r}function B0(t){return{id:t.id,type:"remove"}}const U0=t=>cN(t),YT=t=>Dv(t);function u1(t){return J.forwardRef(t)}const QT=typeof window<"u"?J.useLayoutEffect:J.useEffect;function q0(t){const[i,r]=J.useState(BigInt(0)),[a]=J.useState(()=>XT(()=>r(s=>s+BigInt(1))));return QT(()=>{const s=a.get();s.length&&(t(s),a.reset())},[i]),a}function XT(t){let i=[];return{get:()=>i,reset:()=>{i=[]},push:r=>{i.push(r),t()}}}const c1=J.createContext(null);function GT({children:t}){const i=re(),r=J.useCallback(d=>{const{nodes:m=[],setNodes:h,hasDefaultNodes:g,onNodesChange:y,nodeLookup:x,fitViewQueued:v,onNodesChangeMiddlewareMap:S}=i.getState();let _=m;for(const C of d)_=typeof C=="function"?C(_):C;let M=L0({items:_,lookup:x});for(const C of S.values())M=C(M);g&&h(_),M.length>0?y?.(M):v&&window.requestAnimationFrame(()=>{const{fitViewQueued:C,nodes:j,setNodes:w}=i.getState();C&&w(j)})},[]),a=q0(r),s=J.useCallback(d=>{const{edges:m=[],setEdges:h,hasDefaultEdges:g,onEdgesChange:y,edgeLookup:x}=i.getState();let v=m;for(const S of d)v=typeof S=="function"?S(v):S;g?h(v):y&&y(L0({items:v,lookup:x}))},[]),u=q0(s),c=J.useMemo(()=>({nodeQueue:a,edgeQueue:u}),[]);return E.jsx(c1.Provider,{value:c,children:t})}function ZT(){const t=J.useContext(c1);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const FT=t=>!!t.panZoom;function _h(){const t=UT(),i=re(),r=ZT(),a=Bt(FT),s=J.useMemo(()=>{const u=y=>i.getState().nodeLookup.get(y),c=y=>{r.nodeQueue.push(y)},d=y=>{r.edgeQueue.push(y)},m=y=>{const{nodeLookup:x,nodeOrigin:v}=i.getState(),S=U0(y)?y:x.get(y.id),_=S.parentId?Bv(S.position,S.measured,S.parentId,x,v):S.position,M={...S,position:_,width:S.measured?.width??S.width,height:S.measured?.height??S.height};return Ml(M)},h=(y,x,v={replace:!1})=>{c(S=>S.map(_=>{if(_.id===y){const M=typeof x=="function"?x(_):x;return v.replace&&U0(M)?M:{..._,...M}}return _}))},g=(y,x,v={replace:!1})=>{d(S=>S.map(_=>{if(_.id===y){const M=typeof x=="function"?x(_):x;return v.replace&&YT(M)?M:{..._,...M}}return _}))};return{getNodes:()=>i.getState().nodes.map(y=>({...y})),getNode:y=>u(y)?.internals.userNode,getInternalNode:u,getEdges:()=>{const{edges:y=[]}=i.getState();return y.map(x=>({...x}))},getEdge:y=>i.getState().edgeLookup.get(y),setNodes:c,setEdges:d,addNodes:y=>{const x=Array.isArray(y)?y:[y];r.nodeQueue.push(v=>[...v,...x])},addEdges:y=>{const x=Array.isArray(y)?y:[y];r.edgeQueue.push(v=>[...v,...x])},toObject:()=>{const{nodes:y=[],edges:x=[],transform:v}=i.getState(),[S,_,M]=v;return{nodes:y.map(C=>({...C})),edges:x.map(C=>({...C})),viewport:{x:S,y:_,zoom:M}}},deleteElements:async({nodes:y=[],edges:x=[]})=>{const{nodes:v,edges:S,onNodesDelete:_,onEdgesDelete:M,triggerNodeChanges:C,triggerEdgeChanges:j,onDelete:w,onBeforeDelete:k}=i.getState(),{nodes:I,edges:D}=await mN({nodesToRemove:y,edgesToRemove:x,nodes:v,edges:S,onBeforeDelete:k}),H=D.length>0,G=I.length>0;if(H){const Z=D.map(B0);M?.(D),j(Z)}if(G){const Z=I.map(B0);_?.(I),C(Z)}return(G||H)&&w?.({nodes:I,edges:D}),{deletedNodes:I,deletedEdges:D}},getIntersectingNodes:(y,x=!0,v)=>{const S=f0(y),_=S?y:m(y),M=v!==void 0;return _?(v||i.getState().nodes).filter(C=>{const j=i.getState().nodeLookup.get(C.id);if(j&&!S&&(C.id===y.id||!j.internals.positionAbsolute))return!1;const w=Ml(M?C:j),k=Pa(w,_);return x&&k>0||k>=w.width*w.height||k>=_.width*_.height}):[]},isNodeIntersecting:(y,x,v=!0)=>{const _=f0(y)?y:m(y);if(!_)return!1;const M=Pa(_,x);return v&&M>0||M>=x.width*x.height||M>=_.width*_.height},updateNode:h,updateNodeData:(y,x,v={replace:!1})=>{h(y,S=>{const _=typeof x=="function"?x(S):x;return v.replace?{...S,data:_}:{...S,data:{...S.data,..._}}},v)},updateEdge:g,updateEdgeData:(y,x,v={replace:!1})=>{g(y,S=>{const _=typeof x=="function"?x(S):x;return v.replace?{...S,data:_}:{...S,data:{...S.data,..._}}},v)},getNodesBounds:y=>{const{nodeLookup:x,nodeOrigin:v}=i.getState();return fN(y,{nodeLookup:x,nodeOrigin:v})},getHandleConnections:({type:y,id:x,nodeId:v})=>Array.from(i.getState().connectionLookup.get(`${v}-${y}${x?`-${x}`:""}`)?.values()??[]),getNodeConnections:({type:y,handleId:x,nodeId:v})=>Array.from(i.getState().connectionLookup.get(`${v}${y?x?`-${y}-${x}`:`-${y}`:""}`)?.values()??[]),fitView:async y=>{const x=i.getState().fitViewResolver??vN();return i.setState({fitViewQueued:!0,fitViewOptions:y,fitViewResolver:x}),r.nodeQueue.push(v=>[...v]),x.promise}}},[]);return J.useMemo(()=>({...s,...t,viewportInitialized:a}),[a])}const V0=t=>t.selected,KT=typeof window<"u"?window:void 0;function $T({deleteKeyCode:t,multiSelectionKeyCode:i}){const r=re(),{deleteElements:a}=_h(),s=Wa(t,{actInsideInputWithModifier:!1}),u=Wa(i,{target:KT});J.useEffect(()=>{if(s){const{edges:c,nodes:d}=r.getState();a({nodes:d.filter(V0),edges:c.filter(V0)}),r.setState({nodesSelectionActive:!1})}},[s]),J.useEffect(()=>{r.setState({multiSelectionActive:u})},[u])}function PT(t){const i=re();J.useEffect(()=>{const r=()=>{if(!t.current||!(t.current.checkVisibility?.()??!0))return!1;const a=vh(t.current);(a.height===0||a.width===0)&&i.getState().onError?.("004",qn.error004()),i.setState({width:a.width||500,height:a.height||500})};if(t.current){r(),window.addEventListener("resize",r);const a=new ResizeObserver(()=>r());return a.observe(t.current),()=>{window.removeEventListener("resize",r),a&&t.current&&a.unobserve(t.current)}}},[])}const zu={position:"absolute",width:"100%",height:"100%",top:0,left:0},JT=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function WT({onPaneContextMenu:t,zoomOnScroll:i=!0,zoomOnPinch:r=!0,panOnScroll:a=!1,panOnScrollSpeed:s=.5,panOnScrollMode:u=Er.Free,zoomOnDoubleClick:c=!0,panOnDrag:d=!0,defaultViewport:m,translateExtent:h,minZoom:g,maxZoom:y,zoomActivationKeyCode:x,preventScrolling:v=!0,children:S,noWheelClassName:_,noPanClassName:M,onViewportChange:C,isControlledViewport:j,paneClickDistance:w,selectionOnDrag:k}){const I=re(),D=J.useRef(null),{userSelectionActive:H,lib:G,connectionInProgress:Z}=Bt(JT,ie),lt=Wa(x),L=J.useRef();PT(D);const Q=J.useCallback(et=>{C?.({x:et[0],y:et[1],zoom:et[2]}),j||I.setState({transform:et})},[C,j]);return J.useEffect(()=>{if(D.current){L.current=nT({domNode:D.current,minZoom:g,maxZoom:y,translateExtent:h,viewport:m,onDraggingChange:z=>I.setState(B=>B.paneDragging===z?B:{paneDragging:z}),onPanZoomStart:(z,B)=>{const{onViewportChangeStart:Y,onMoveStart:K}=I.getState();K?.(z,B),Y?.(B)},onPanZoom:(z,B)=>{const{onViewportChange:Y,onMove:K}=I.getState();K?.(z,B),Y?.(B)},onPanZoomEnd:(z,B)=>{const{onViewportChangeEnd:Y,onMoveEnd:K}=I.getState();K?.(z,B),Y?.(B)}});const{x:et,y:R,zoom:U}=L.current.getViewport();return I.setState({panZoom:L.current,transform:[et,R,U],domNode:D.current.closest(".react-flow")}),()=>{L.current?.destroy()}}},[]),J.useEffect(()=>{L.current?.update({onPaneContextMenu:t,zoomOnScroll:i,zoomOnPinch:r,panOnScroll:a,panOnScrollSpeed:s,panOnScrollMode:u,zoomOnDoubleClick:c,panOnDrag:d,zoomActivationKeyPressed:lt,preventScrolling:v,noPanClassName:M,userSelectionActive:H,noWheelClassName:_,lib:G,onTransformChange:Q,connectionInProgress:Z,selectionOnDrag:k,paneClickDistance:w})},[t,i,r,a,s,u,c,d,lt,v,M,H,_,G,Q,Z,k,w]),E.jsx("div",{className:"react-flow__renderer",ref:D,style:zu,children:S})}const tA=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function eA(){const{userSelectionActive:t,userSelectionRect:i}=Bt(tA,ie);return t&&i?E.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:i.width,height:i.height,transform:`translate(${i.x}px, ${i.y}px)`}}):null}const dd=(t,i)=>r=>{r.target===i.current&&t?.(r)},nA=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function iA({isSelecting:t,selectionKeyPressed:i,selectionMode:r=$a.Full,panOnDrag:a,paneClickDistance:s,selectionOnDrag:u,onSelectionStart:c,onSelectionEnd:d,onPaneClick:m,onPaneContextMenu:h,onPaneScroll:g,onPaneMouseEnter:y,onPaneMouseMove:x,onPaneMouseLeave:v,children:S}){const _=re(),{userSelectionActive:M,elementsSelectable:C,dragging:j,connectionInProgress:w}=Bt(nA,ie),k=C&&(t||M),I=J.useRef(null),D=J.useRef(),H=J.useRef(new Set),G=J.useRef(new Set),Z=J.useRef(!1),lt=Y=>{if(Z.current||w){Z.current=!1;return}m?.(Y),_.getState().resetSelectedElements(),_.setState({nodesSelectionActive:!1})},L=Y=>{if(Array.isArray(a)&&a?.includes(2)){Y.preventDefault();return}h?.(Y)},Q=g?Y=>g(Y):void 0,et=Y=>{Z.current&&(Y.stopPropagation(),Z.current=!1)},R=Y=>{const{domNode:K}=_.getState();if(D.current=K?.getBoundingClientRect(),!D.current)return;const A=Y.target===I.current;if(!A&&!!Y.target.closest(".nokey")||!t||!(u&&A||i)||Y.button!==0||!Y.isPrimary)return;Y.target?.setPointerCapture?.(Y.pointerId),Z.current=!1;const{x:T,y:nt}=An(Y.nativeEvent,D.current);_.setState({userSelectionRect:{width:0,height:0,startX:T,startY:nt,x:T,y:nt}}),A||(Y.stopPropagation(),Y.preventDefault())},U=Y=>{const{userSelectionRect:K,transform:A,nodeLookup:O,edgeLookup:V,connectionLookup:T,triggerNodeChanges:nt,triggerEdgeChanges:ut,defaultEdgeOptions:ct,resetSelectedElements:dt}=_.getState();if(!D.current||!K)return;const{x:st,y:pt}=An(Y.nativeEvent,D.current),{startX:wt,startY:Ct}=K;if(!Z.current){const Ut=i?0:s;if(Math.hypot(st-wt,pt-Ct)<=Ut)return;dt(),c?.(Y)}Z.current=!0;const xt={startX:wt,startY:Ct,x:st<wt?st:wt,y:pt<Ct?pt:Ct,width:Math.abs(st-wt),height:Math.abs(pt-Ct)},Et=H.current,Ot=G.current;H.current=new Set(yh(O,xt,A,r===$a.Partial,!0).map(Ut=>Ut.id)),G.current=new Set;const It=ct?.selectable??!0;for(const Ut of H.current){const oe=T.get(Ut);if(oe)for(const{edgeId:Ke}of oe.values()){const Ae=V.get(Ke);Ae&&(Ae.selectable??It)&&G.current.add(Ke)}}if(!d0(Et,H.current)){const Ut=bl(O,H.current,!0);nt(Ut)}if(!d0(Ot,G.current)){const Ut=bl(V,G.current);ut(Ut)}_.setState({userSelectionRect:xt,userSelectionActive:!0,nodesSelectionActive:!1})},z=Y=>{Y.button===0&&(Y.target?.releasePointerCapture?.(Y.pointerId),!M&&Y.target===I.current&&_.getState().userSelectionRect&&lt?.(Y),_.setState({userSelectionActive:!1,userSelectionRect:null}),Z.current&&(d?.(Y),_.setState({nodesSelectionActive:H.current.size>0})))},B=a===!0||Array.isArray(a)&&a.includes(0);return E.jsxs("div",{className:ye(["react-flow__pane",{draggable:B,dragging:j,selection:t}]),onClick:k?void 0:dd(lt,I),onContextMenu:dd(L,I),onWheel:dd(Q,I),onPointerEnter:k?void 0:y,onPointerMove:k?U:x,onPointerUp:k?z:void 0,onPointerDownCapture:k?R:void 0,onClickCapture:k?et:void 0,onPointerLeave:v,ref:I,style:zu,children:[S,E.jsx(eA,{})]})}function Fd({id:t,store:i,unselect:r=!1,nodeRef:a}){const{addSelectedNodes:s,unselectNodesAndEdges:u,multiSelectionActive:c,nodeLookup:d,onError:m}=i.getState(),h=d.get(t);if(!h){m?.("012",qn.error012(t));return}i.setState({nodesSelectionActive:!1}),h.selected?(r||h.selected&&c)&&(u({nodes:[h],edges:[]}),requestAnimationFrame(()=>a?.current?.blur())):s([t])}function f1({nodeRef:t,disabled:i=!1,noDragClassName:r,handleSelector:a,nodeId:s,isSelectable:u,nodeClickDistance:c}){const d=re(),[m,h]=J.useState(!1),g=J.useRef();return J.useEffect(()=>{g.current=IN({getStoreItems:()=>d.getState(),onNodeMouseDown:y=>{Fd({id:y,store:d,nodeRef:t})},onDragStart:()=>{h(!0)},onDragStop:()=>{h(!1)}})},[]),J.useEffect(()=>{if(!(i||!t.current||!g.current))return g.current.update({noDragClassName:r,handleSelector:a,domNode:t.current,isSelectable:u,nodeId:s,nodeClickDistance:c}),()=>{g.current?.destroy()}},[r,a,i,u,t,s,c]),m}const rA=t=>i=>i.selected&&(i.draggable||t&&typeof i.draggable>"u");function d1(){const t=re();return J.useCallback(r=>{const{nodeExtent:a,snapToGrid:s,snapGrid:u,nodesDraggable:c,onError:d,updateNodePositions:m,nodeLookup:h,nodeOrigin:g}=t.getState(),y=new Map,x=rA(c),v=s?u[0]:5,S=s?u[1]:5,_=r.direction.x*v*r.factor,M=r.direction.y*S*r.factor;for(const[,C]of h){if(!x(C))continue;let j={x:C.internals.positionAbsolute.x+_,y:C.internals.positionAbsolute.y+M};s&&(j=oo(j,u));const{position:w,positionAbsolute:k}=kv({nodeId:C.id,nextPosition:j,nodeLookup:h,nodeExtent:a,nodeOrigin:g,onError:d});C.position=w,C.internals.positionAbsolute=k,y.set(C.id,C)}m(y)},[])}const Nh=J.createContext(null),lA=Nh.Provider;Nh.Consumer;const h1=()=>J.useContext(Nh),aA=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),oA=(t,i,r)=>a=>{const{connectionClickStartHandle:s,connectionMode:u,connection:c}=a,{fromHandle:d,toHandle:m,isValid:h}=c,g=m?.nodeId===t&&m?.id===i&&m?.type===r;return{connectingFrom:d?.nodeId===t&&d?.id===i&&d?.type===r,connectingTo:g,clickConnecting:s?.nodeId===t&&s?.id===i&&s?.type===r,isPossibleEndHandle:u===Tl.Strict?d?.type!==r:t!==d?.nodeId||i!==d?.id,connectionInProcess:!!d,clickConnectionInProcess:!!s,valid:g&&h}};function sA({type:t="source",position:i=vt.Top,isValidConnection:r,isConnectable:a=!0,isConnectableStart:s=!0,isConnectableEnd:u=!0,id:c,onConnect:d,children:m,className:h,onMouseDown:g,onTouchStart:y,...x},v){const S=c||null,_=t==="target",M=re(),C=h1(),{connectOnClick:j,noPanClassName:w,rfId:k}=Bt(aA,ie),{connectingFrom:I,connectingTo:D,clickConnecting:H,isPossibleEndHandle:G,connectionInProcess:Z,clickConnectionInProcess:lt,valid:L}=Bt(oA(C,S,t),ie);C||M.getState().onError?.("010",qn.error010());const Q=U=>{const{defaultEdgeOptions:z,onConnect:B,hasDefaultEdges:Y}=M.getState(),K={...z,...U};if(Y){const{edges:A,setEdges:O}=M.getState();O(NN(K,A))}B?.(K),d?.(K)},et=U=>{if(!C)return;const z=Vv(U.nativeEvent);if(s&&(z&&U.button===0||!z)){const B=M.getState();Zd.onPointerDown(U.nativeEvent,{handleDomNode:U.currentTarget,autoPanOnConnect:B.autoPanOnConnect,connectionMode:B.connectionMode,connectionRadius:B.connectionRadius,domNode:B.domNode,nodeLookup:B.nodeLookup,lib:B.lib,isTarget:_,handleId:S,nodeId:C,flowId:B.rfId,panBy:B.panBy,cancelConnection:B.cancelConnection,onConnectStart:B.onConnectStart,onConnectEnd:(...Y)=>M.getState().onConnectEnd?.(...Y),updateConnection:B.updateConnection,onConnect:Q,isValidConnection:r||((...Y)=>M.getState().isValidConnection?.(...Y)??!0),getTransform:()=>M.getState().transform,getFromHandle:()=>M.getState().connection.fromHandle,autoPanSpeed:B.autoPanSpeed,dragThreshold:B.connectionDragThreshold})}z?g?.(U):y?.(U)},R=U=>{const{onClickConnectStart:z,onClickConnectEnd:B,connectionClickStartHandle:Y,connectionMode:K,isValidConnection:A,lib:O,rfId:V,nodeLookup:T,connection:nt}=M.getState();if(!C||!Y&&!s)return;if(!Y){z?.(U.nativeEvent,{nodeId:C,handleId:S,handleType:t}),M.setState({connectionClickStartHandle:{nodeId:C,type:t,id:S}});return}const ut=Uv(U.target),ct=r||A,{connection:dt,isValid:st}=Zd.isValid(U.nativeEvent,{handle:{nodeId:C,id:S,type:t},connectionMode:K,fromNodeId:Y.nodeId,fromHandleId:Y.id||null,fromType:Y.type,isValidConnection:ct,flowId:V,doc:ut,lib:O,nodeLookup:T});st&&dt&&Q(dt);const pt=structuredClone(nt);delete pt.inProgress,pt.toPosition=pt.toHandle?pt.toHandle.position:null,B?.(U,pt),M.setState({connectionClickStartHandle:null})};return E.jsx("div",{"data-handleid":S,"data-nodeid":C,"data-handlepos":i,"data-id":`${k}-${C}-${S}-${t}`,className:ye(["react-flow__handle",`react-flow__handle-${i}`,"nodrag",w,h,{source:!_,target:_,connectable:a,connectablestart:s,connectableend:u,clickconnecting:H,connectingfrom:I,connectingto:D,valid:L,connectionindicator:a&&(!Z||G)&&(Z||lt?u:s)}]),onMouseDown:et,onTouchStart:et,onClick:j?R:void 0,ref:v,...x,children:m})}const hu=J.memo(u1(sA));function uA({data:t,isConnectable:i,sourcePosition:r=vt.Bottom}){return E.jsxs(E.Fragment,{children:[t?.label,E.jsx(hu,{type:"source",position:r,isConnectable:i})]})}function cA({data:t,isConnectable:i,targetPosition:r=vt.Top,sourcePosition:a=vt.Bottom}){return E.jsxs(E.Fragment,{children:[E.jsx(hu,{type:"target",position:r,isConnectable:i}),t?.label,E.jsx(hu,{type:"source",position:a,isConnectable:i})]})}function fA(){return null}function dA({data:t,isConnectable:i,targetPosition:r=vt.Top}){return E.jsxs(E.Fragment,{children:[E.jsx(hu,{type:"target",position:r,isConnectable:i}),t?.label]})}const pu={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},I0={input:uA,default:cA,output:dA,group:fA};function hA(t){return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??t.style?.width,height:t.height??t.initialHeight??t.style?.height}:{width:t.width??t.style?.width,height:t.height??t.style?.height}}const pA=t=>{const{width:i,height:r,x:a,y:s}=ao(t.nodeLookup,{filter:u=>!!u.selected});return{width:Tn(i)?i:null,height:Tn(r)?r:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${a}px,${s}px)`}};function mA({onSelectionContextMenu:t,noPanClassName:i,disableKeyboardA11y:r}){const a=re(),{width:s,height:u,transformString:c,userSelectionActive:d}=Bt(pA,ie),m=d1(),h=J.useRef(null);J.useEffect(()=>{r||h.current?.focus({preventScroll:!0})},[r]);const g=!d&&s!==null&&u!==null;if(f1({nodeRef:h,disabled:!g}),!g)return null;const y=t?v=>{const S=a.getState().nodes.filter(_=>_.selected);t(v,S)}:void 0,x=v=>{Object.prototype.hasOwnProperty.call(pu,v.key)&&(v.preventDefault(),m({direction:pu[v.key],factor:v.shiftKey?4:1}))};return E.jsx("div",{className:ye(["react-flow__nodesselection","react-flow__container",i]),style:{transform:c},children:E.jsx("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:y,tabIndex:r?void 0:-1,onKeyDown:r?void 0:x,style:{width:s,height:u}})})}const Y0=typeof window<"u"?window:void 0,gA=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function p1({children:t,onPaneClick:i,onPaneMouseEnter:r,onPaneMouseMove:a,onPaneMouseLeave:s,onPaneContextMenu:u,onPaneScroll:c,paneClickDistance:d,deleteKeyCode:m,selectionKeyCode:h,selectionOnDrag:g,selectionMode:y,onSelectionStart:x,onSelectionEnd:v,multiSelectionKeyCode:S,panActivationKeyCode:_,zoomActivationKeyCode:M,elementsSelectable:C,zoomOnScroll:j,zoomOnPinch:w,panOnScroll:k,panOnScrollSpeed:I,panOnScrollMode:D,zoomOnDoubleClick:H,panOnDrag:G,defaultViewport:Z,translateExtent:lt,minZoom:L,maxZoom:Q,preventScrolling:et,onSelectionContextMenu:R,noWheelClassName:U,noPanClassName:z,disableKeyboardA11y:B,onViewportChange:Y,isControlledViewport:K}){const{nodesSelectionActive:A,userSelectionActive:O}=Bt(gA,ie),V=Wa(h,{target:Y0}),T=Wa(_,{target:Y0}),nt=T||G,ut=T||k,ct=g&&nt!==!0,dt=V||O||ct;return $T({deleteKeyCode:m,multiSelectionKeyCode:S}),E.jsx(WT,{onPaneContextMenu:u,elementsSelectable:C,zoomOnScroll:j,zoomOnPinch:w,panOnScroll:ut,panOnScrollSpeed:I,panOnScrollMode:D,zoomOnDoubleClick:H,panOnDrag:!V&&nt,defaultViewport:Z,translateExtent:lt,minZoom:L,maxZoom:Q,zoomActivationKeyCode:M,preventScrolling:et,noWheelClassName:U,noPanClassName:z,onViewportChange:Y,isControlledViewport:K,paneClickDistance:d,selectionOnDrag:ct,children:E.jsxs(iA,{onSelectionStart:x,onSelectionEnd:v,onPaneClick:i,onPaneMouseEnter:r,onPaneMouseMove:a,onPaneMouseLeave:s,onPaneContextMenu:u,onPaneScroll:c,panOnDrag:nt,isSelecting:!!dt,selectionMode:y,selectionKeyPressed:V,paneClickDistance:d,selectionOnDrag:ct,children:[t,A&&E.jsx(mA,{onSelectionContextMenu:R,noPanClassName:z,disableKeyboardA11y:B})]})})}p1.displayName="FlowRenderer";const yA=J.memo(p1),xA=t=>i=>t?yh(i.nodeLookup,{x:0,y:0,width:i.width,height:i.height},i.transform,!0).map(r=>r.id):Array.from(i.nodeLookup.keys());function vA(t){return Bt(J.useCallback(xA(t),[t]),ie)}const bA=t=>t.updateNodeInternals;function SA(){const t=Bt(bA),[i]=J.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(r=>{const a=new Map;r.forEach(s=>{const u=s.target.getAttribute("data-id");a.set(u,{id:u,nodeElement:s.target,force:!0})}),t(a)}));return J.useEffect(()=>()=>{i?.disconnect()},[i]),i}function wA({node:t,nodeType:i,hasDimensions:r,resizeObserver:a}){const s=re(),u=J.useRef(null),c=J.useRef(null),d=J.useRef(t.sourcePosition),m=J.useRef(t.targetPosition),h=J.useRef(i),g=r&&!!t.internals.handleBounds;return J.useEffect(()=>{u.current&&!t.hidden&&(!g||c.current!==u.current)&&(c.current&&a?.unobserve(c.current),a?.observe(u.current),c.current=u.current)},[g,t.hidden]),J.useEffect(()=>()=>{c.current&&(a?.unobserve(c.current),c.current=null)},[]),J.useEffect(()=>{if(u.current){const y=h.current!==i,x=d.current!==t.sourcePosition,v=m.current!==t.targetPosition;(y||x||v)&&(h.current=i,d.current=t.sourcePosition,m.current=t.targetPosition,s.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:u.current,force:!0}]])))}},[t.id,i,t.sourcePosition,t.targetPosition]),u}function EA({id:t,onClick:i,onMouseEnter:r,onMouseMove:a,onMouseLeave:s,onContextMenu:u,onDoubleClick:c,nodesDraggable:d,elementsSelectable:m,nodesConnectable:h,nodesFocusable:g,resizeObserver:y,noDragClassName:x,noPanClassName:v,disableKeyboardA11y:S,rfId:_,nodeTypes:M,nodeClickDistance:C,onError:j}){const{node:w,internals:k,isParent:I}=Bt(st=>{const pt=st.nodeLookup.get(t),wt=st.parentLookup.has(t);return{node:pt,internals:pt.internals,isParent:wt}},ie);let D=w.type||"default",H=M?.[D]||I0[D];H===void 0&&(j?.("003",qn.error003(D)),D="default",H=M?.default||I0.default);const G=!!(w.draggable||d&&typeof w.draggable>"u"),Z=!!(w.selectable||m&&typeof w.selectable>"u"),lt=!!(w.connectable||h&&typeof w.connectable>"u"),L=!!(w.focusable||g&&typeof w.focusable>"u"),Q=re(),et=Lv(w),R=wA({node:w,nodeType:D,hasDimensions:et,resizeObserver:y}),U=f1({nodeRef:R,disabled:w.hidden||!G,noDragClassName:x,handleSelector:w.dragHandle,nodeId:t,isSelectable:Z,nodeClickDistance:C}),z=d1();if(w.hidden)return null;const B=mi(w),Y=hA(w),K=Z||G||i||r||a||s,A=r?st=>r(st,{...k.userNode}):void 0,O=a?st=>a(st,{...k.userNode}):void 0,V=s?st=>s(st,{...k.userNode}):void 0,T=u?st=>u(st,{...k.userNode}):void 0,nt=c?st=>c(st,{...k.userNode}):void 0,ut=st=>{const{selectNodesOnDrag:pt,nodeDragThreshold:wt}=Q.getState();Z&&(!pt||!G||wt>0)&&Fd({id:t,store:Q,nodeRef:R}),i&&i(st,{...k.userNode})},ct=st=>{if(!(qv(st.nativeEvent)||S)){if(Av.includes(st.key)&&Z){const pt=st.key==="Escape";Fd({id:t,store:Q,unselect:pt,nodeRef:R})}else if(G&&w.selected&&Object.prototype.hasOwnProperty.call(pu,st.key)){st.preventDefault();const{ariaLabelConfig:pt}=Q.getState();Q.setState({ariaLiveMessage:pt["node.a11yDescription.ariaLiveMessage"]({direction:st.key.replace("Arrow","").toLowerCase(),x:~~k.positionAbsolute.x,y:~~k.positionAbsolute.y})}),z({direction:pu[st.key],factor:st.shiftKey?4:1})}}},dt=()=>{if(S||!R.current?.matches(":focus-visible"))return;const{transform:st,width:pt,height:wt,autoPanOnNodeFocus:Ct,setCenter:xt}=Q.getState();if(!Ct)return;yh(new Map([[t,w]]),{x:0,y:0,width:pt,height:wt},st,!0).length>0||xt(w.position.x+B.width/2,w.position.y+B.height/2,{zoom:st[2]})};return E.jsx("div",{className:ye(["react-flow__node",`react-flow__node-${D}`,{[v]:G},w.className,{selected:w.selected,selectable:Z,parent:I,draggable:G,dragging:U}]),ref:R,style:{zIndex:k.z,transform:`translate(${k.positionAbsolute.x}px,${k.positionAbsolute.y}px)`,pointerEvents:K?"all":"none",visibility:et?"visible":"hidden",...w.style,...Y},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:A,onMouseMove:O,onMouseLeave:V,onContextMenu:T,onClick:ut,onDoubleClick:nt,onKeyDown:L?ct:void 0,tabIndex:L?0:void 0,onFocus:L?dt:void 0,role:w.ariaRole??(L?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${l1}-${_}`,"aria-label":w.ariaLabel,...w.domAttributes,children:E.jsx(lA,{value:t,children:E.jsx(H,{id:t,data:w.data,type:D,positionAbsoluteX:k.positionAbsolute.x,positionAbsoluteY:k.positionAbsolute.y,selected:w.selected??!1,selectable:Z,draggable:G,deletable:w.deletable??!0,isConnectable:lt,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:U,dragHandle:w.dragHandle,zIndex:k.z,parentId:w.parentId,...B})})})}var CA=J.memo(EA);const _A=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function m1(t){const{nodesDraggable:i,nodesConnectable:r,nodesFocusable:a,elementsSelectable:s,onError:u}=Bt(_A,ie),c=vA(t.onlyRenderVisibleElements),d=SA();return E.jsx("div",{className:"react-flow__nodes",style:zu,children:c.map(m=>E.jsx(CA,{id:m,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:d,nodesDraggable:i,nodesConnectable:r,nodesFocusable:a,elementsSelectable:s,nodeClickDistance:t.nodeClickDistance,onError:u},m))})}m1.displayName="NodeRenderer";const NA=J.memo(m1);function TA(t){return Bt(J.useCallback(r=>{if(!t)return r.edges.map(s=>s.id);const a=[];if(r.width&&r.height)for(const s of r.edges){const u=r.nodeLookup.get(s.source),c=r.nodeLookup.get(s.target);u&&c&&EN({sourceNode:u,targetNode:c,width:r.width,height:r.height,transform:r.transform})&&a.push(s.id)}return a},[t]),ie)}const AA=({color:t="none",strokeWidth:i=1})=>{const r={strokeWidth:i,...t&&{stroke:t}};return E.jsx("polyline",{className:"arrow",style:r,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},MA=({color:t="none",strokeWidth:i=1})=>{const r={strokeWidth:i,...t&&{stroke:t,fill:t}};return E.jsx("polyline",{className:"arrowclosed",style:r,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Q0={[cu.Arrow]:AA,[cu.ArrowClosed]:MA};function zA(t){const i=re();return J.useMemo(()=>Object.prototype.hasOwnProperty.call(Q0,t)?Q0[t]:(i.getState().onError?.("009",qn.error009(t)),null),[t])}const OA=({id:t,type:i,color:r,width:a=12.5,height:s=12.5,markerUnits:u="strokeWidth",strokeWidth:c,orient:d="auto-start-reverse"})=>{const m=zA(i);return m?E.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${a}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:u,orient:d,refX:"0",refY:"0",children:E.jsx(m,{color:r,strokeWidth:c})}):null},g1=({defaultColor:t,rfId:i})=>{const r=Bt(u=>u.edges),a=Bt(u=>u.defaultEdgeOptions),s=J.useMemo(()=>ON(r,{id:i,defaultColor:t,defaultMarkerStart:a?.markerStart,defaultMarkerEnd:a?.markerEnd}),[r,a,i,t]);return s.length?E.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:E.jsx("defs",{children:s.map(u=>E.jsx(OA,{id:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,strokeWidth:u.strokeWidth,orient:u.orient},u.id))})}):null};g1.displayName="MarkerDefinitions";var DA=J.memo(g1);function y1({x:t,y:i,label:r,labelStyle:a,labelShowBg:s=!0,labelBgStyle:u,labelBgPadding:c=[2,4],labelBgBorderRadius:d=2,children:m,className:h,...g}){const[y,x]=J.useState({x:1,y:0,width:0,height:0}),v=ye(["react-flow__edge-textwrapper",h]),S=J.useRef(null);return J.useEffect(()=>{if(S.current){const _=S.current.getBBox();x({x:_.x,y:_.y,width:_.width,height:_.height})}},[r]),r?E.jsxs("g",{transform:`translate(${t-y.width/2} ${i-y.height/2})`,className:v,visibility:y.width?"visible":"hidden",...g,children:[s&&E.jsx("rect",{width:y.width+2*c[0],x:-c[0],y:-c[1],height:y.height+2*c[1],className:"react-flow__edge-textbg",style:u,rx:d,ry:d}),E.jsx("text",{className:"react-flow__edge-text",y:y.height/2,dy:"0.3em",ref:S,style:a,children:r}),m]}):null}y1.displayName="EdgeText";const kA=J.memo(y1);function Ou({path:t,labelX:i,labelY:r,label:a,labelStyle:s,labelShowBg:u,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:m,interactionWidth:h=20,...g}){return E.jsxs(E.Fragment,{children:[E.jsx("path",{...g,d:t,fill:"none",className:ye(["react-flow__edge-path",g.className])}),h?E.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}):null,a&&Tn(i)&&Tn(r)?E.jsx(kA,{x:i,y:r,label:a,labelStyle:s,labelShowBg:u,labelBgStyle:c,labelBgPadding:d,labelBgBorderRadius:m}):null]})}function X0({pos:t,x1:i,y1:r,x2:a,y2:s}){return t===vt.Left||t===vt.Right?[.5*(i+a),r]:[i,.5*(r+s)]}function x1({sourceX:t,sourceY:i,sourcePosition:r=vt.Bottom,targetX:a,targetY:s,targetPosition:u=vt.Top}){const[c,d]=X0({pos:r,x1:t,y1:i,x2:a,y2:s}),[m,h]=X0({pos:u,x1:a,y1:s,x2:t,y2:i}),[g,y,x,v]=Iv({sourceX:t,sourceY:i,targetX:a,targetY:s,sourceControlX:c,sourceControlY:d,targetControlX:m,targetControlY:h});return[`M${t},${i} C${c},${d} ${m},${h} ${a},${s}`,g,y,x,v]}function v1(t){return J.memo(({id:i,sourceX:r,sourceY:a,targetX:s,targetY:u,sourcePosition:c,targetPosition:d,label:m,labelStyle:h,labelShowBg:g,labelBgStyle:y,labelBgPadding:x,labelBgBorderRadius:v,style:S,markerEnd:_,markerStart:M,interactionWidth:C})=>{const[j,w,k]=x1({sourceX:r,sourceY:a,sourcePosition:c,targetX:s,targetY:u,targetPosition:d}),I=t.isInternal?void 0:i;return E.jsx(Ou,{id:I,path:j,labelX:w,labelY:k,label:m,labelStyle:h,labelShowBg:g,labelBgStyle:y,labelBgPadding:x,labelBgBorderRadius:v,style:S,markerEnd:_,markerStart:M,interactionWidth:C})})}const RA=v1({isInternal:!1}),b1=v1({isInternal:!0});RA.displayName="SimpleBezierEdge";b1.displayName="SimpleBezierEdgeInternal";function S1(t){return J.memo(({id:i,sourceX:r,sourceY:a,targetX:s,targetY:u,label:c,labelStyle:d,labelShowBg:m,labelBgStyle:h,labelBgPadding:g,labelBgBorderRadius:y,style:x,sourcePosition:v=vt.Bottom,targetPosition:S=vt.Top,markerEnd:_,markerStart:M,pathOptions:C,interactionWidth:j})=>{const[w,k,I]=Qd({sourceX:r,sourceY:a,sourcePosition:v,targetX:s,targetY:u,targetPosition:S,borderRadius:C?.borderRadius,offset:C?.offset,stepPosition:C?.stepPosition}),D=t.isInternal?void 0:i;return E.jsx(Ou,{id:D,path:w,labelX:k,labelY:I,label:c,labelStyle:d,labelShowBg:m,labelBgStyle:h,labelBgPadding:g,labelBgBorderRadius:y,style:x,markerEnd:_,markerStart:M,interactionWidth:j})})}const w1=S1({isInternal:!1}),E1=S1({isInternal:!0});w1.displayName="SmoothStepEdge";E1.displayName="SmoothStepEdgeInternal";function C1(t){return J.memo(({id:i,...r})=>{const a=t.isInternal?void 0:i;return E.jsx(w1,{...r,id:a,pathOptions:J.useMemo(()=>({borderRadius:0,offset:r.pathOptions?.offset}),[r.pathOptions?.offset])})})}const jA=C1({isInternal:!1}),_1=C1({isInternal:!0});jA.displayName="StepEdge";_1.displayName="StepEdgeInternal";function N1(t){return J.memo(({id:i,sourceX:r,sourceY:a,targetX:s,targetY:u,label:c,labelStyle:d,labelShowBg:m,labelBgStyle:h,labelBgPadding:g,labelBgBorderRadius:y,style:x,markerEnd:v,markerStart:S,interactionWidth:_})=>{const[M,C,j]=Xv({sourceX:r,sourceY:a,targetX:s,targetY:u}),w=t.isInternal?void 0:i;return E.jsx(Ou,{id:w,path:M,labelX:C,labelY:j,label:c,labelStyle:d,labelShowBg:m,labelBgStyle:h,labelBgPadding:g,labelBgBorderRadius:y,style:x,markerEnd:v,markerStart:S,interactionWidth:_})})}const HA=N1({isInternal:!1}),T1=N1({isInternal:!0});HA.displayName="StraightEdge";T1.displayName="StraightEdgeInternal";function A1(t){return J.memo(({id:i,sourceX:r,sourceY:a,targetX:s,targetY:u,sourcePosition:c=vt.Bottom,targetPosition:d=vt.Top,label:m,labelStyle:h,labelShowBg:g,labelBgStyle:y,labelBgPadding:x,labelBgBorderRadius:v,style:S,markerEnd:_,markerStart:M,pathOptions:C,interactionWidth:j})=>{const[w,k,I]=Yv({sourceX:r,sourceY:a,sourcePosition:c,targetX:s,targetY:u,targetPosition:d,curvature:C?.curvature}),D=t.isInternal?void 0:i;return E.jsx(Ou,{id:D,path:w,labelX:k,labelY:I,label:m,labelStyle:h,labelShowBg:g,labelBgStyle:y,labelBgPadding:x,labelBgBorderRadius:v,style:S,markerEnd:_,markerStart:M,interactionWidth:j})})}const LA=A1({isInternal:!1}),M1=A1({isInternal:!0});LA.displayName="BezierEdge";M1.displayName="BezierEdgeInternal";const G0={default:M1,straight:T1,step:_1,smoothstep:E1,simplebezier:b1},Z0={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},BA=(t,i,r)=>r===vt.Left?t-i:r===vt.Right?t+i:t,UA=(t,i,r)=>r===vt.Top?t-i:r===vt.Bottom?t+i:t,F0="react-flow__edgeupdater";function K0({position:t,centerX:i,centerY:r,radius:a=10,onMouseDown:s,onMouseEnter:u,onMouseOut:c,type:d}){return E.jsx("circle",{onMouseDown:s,onMouseEnter:u,onMouseOut:c,className:ye([F0,`${F0}-${d}`]),cx:BA(i,a,t),cy:UA(r,a,t),r:a,stroke:"transparent",fill:"transparent"})}function qA({isReconnectable:t,reconnectRadius:i,edge:r,sourceX:a,sourceY:s,targetX:u,targetY:c,sourcePosition:d,targetPosition:m,onReconnect:h,onReconnectStart:g,onReconnectEnd:y,setReconnecting:x,setUpdateHover:v}){const S=re(),_=(k,I)=>{if(k.button!==0)return;const{autoPanOnConnect:D,domNode:H,connectionMode:G,connectionRadius:Z,lib:lt,onConnectStart:L,cancelConnection:Q,nodeLookup:et,rfId:R,panBy:U,updateConnection:z}=S.getState(),B=I.type==="target",Y=(O,V)=>{x(!1),y?.(O,r,I.type,V)},K=O=>h?.(r,O),A=(O,V)=>{x(!0),g?.(k,r,I.type),L?.(O,V)};Zd.onPointerDown(k.nativeEvent,{autoPanOnConnect:D,connectionMode:G,connectionRadius:Z,domNode:H,handleId:I.id,nodeId:I.nodeId,nodeLookup:et,isTarget:B,edgeUpdaterType:I.type,lib:lt,flowId:R,cancelConnection:Q,panBy:U,isValidConnection:(...O)=>S.getState().isValidConnection?.(...O)??!0,onConnect:K,onConnectStart:A,onConnectEnd:(...O)=>S.getState().onConnectEnd?.(...O),onReconnectEnd:Y,updateConnection:z,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:k.currentTarget})},M=k=>_(k,{nodeId:r.target,id:r.targetHandle??null,type:"target"}),C=k=>_(k,{nodeId:r.source,id:r.sourceHandle??null,type:"source"}),j=()=>v(!0),w=()=>v(!1);return E.jsxs(E.Fragment,{children:[(t===!0||t==="source")&&E.jsx(K0,{position:d,centerX:a,centerY:s,radius:i,onMouseDown:M,onMouseEnter:j,onMouseOut:w,type:"source"}),(t===!0||t==="target")&&E.jsx(K0,{position:m,centerX:u,centerY:c,radius:i,onMouseDown:C,onMouseEnter:j,onMouseOut:w,type:"target"})]})}function VA({id:t,edgesFocusable:i,edgesReconnectable:r,elementsSelectable:a,onClick:s,onDoubleClick:u,onContextMenu:c,onMouseEnter:d,onMouseMove:m,onMouseLeave:h,reconnectRadius:g,onReconnect:y,onReconnectStart:x,onReconnectEnd:v,rfId:S,edgeTypes:_,noPanClassName:M,onError:C,disableKeyboardA11y:j}){let w=Bt(xt=>xt.edgeLookup.get(t));const k=Bt(xt=>xt.defaultEdgeOptions);w=k?{...k,...w}:w;let I=w.type||"default",D=_?.[I]||G0[I];D===void 0&&(C?.("011",qn.error011(I)),I="default",D=_?.default||G0.default);const H=!!(w.focusable||i&&typeof w.focusable>"u"),G=typeof y<"u"&&(w.reconnectable||r&&typeof w.reconnectable>"u"),Z=!!(w.selectable||a&&typeof w.selectable>"u"),lt=J.useRef(null),[L,Q]=J.useState(!1),[et,R]=J.useState(!1),U=re(),{zIndex:z,sourceX:B,sourceY:Y,targetX:K,targetY:A,sourcePosition:O,targetPosition:V}=Bt(J.useCallback(xt=>{const Et=xt.nodeLookup.get(w.source),Ot=xt.nodeLookup.get(w.target);if(!Et||!Ot)return{zIndex:w.zIndex,...Z0};const It=zN({id:t,sourceNode:Et,targetNode:Ot,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:xt.connectionMode,onError:C});return{zIndex:wN({selected:w.selected,zIndex:w.zIndex,sourceNode:Et,targetNode:Ot,elevateOnSelect:xt.elevateEdgesOnSelect,zIndexMode:xt.zIndexMode}),...It||Z0}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),ie),T=J.useMemo(()=>w.markerStart?`url('#${Xd(w.markerStart,S)}')`:void 0,[w.markerStart,S]),nt=J.useMemo(()=>w.markerEnd?`url('#${Xd(w.markerEnd,S)}')`:void 0,[w.markerEnd,S]);if(w.hidden||B===null||Y===null||K===null||A===null)return null;const ut=xt=>{const{addSelectedEdges:Et,unselectNodesAndEdges:Ot,multiSelectionActive:It}=U.getState();Z&&(U.setState({nodesSelectionActive:!1}),w.selected&&It?(Ot({nodes:[],edges:[w]}),lt.current?.blur()):Et([t])),s&&s(xt,w)},ct=u?xt=>{u(xt,{...w})}:void 0,dt=c?xt=>{c(xt,{...w})}:void 0,st=d?xt=>{d(xt,{...w})}:void 0,pt=m?xt=>{m(xt,{...w})}:void 0,wt=h?xt=>{h(xt,{...w})}:void 0,Ct=xt=>{if(!j&&Av.includes(xt.key)&&Z){const{unselectNodesAndEdges:Et,addSelectedEdges:Ot}=U.getState();xt.key==="Escape"?(lt.current?.blur(),Et({edges:[w]})):Ot([t])}};return E.jsx("svg",{style:{zIndex:z},children:E.jsxs("g",{className:ye(["react-flow__edge",`react-flow__edge-${I}`,w.className,M,{selected:w.selected,animated:w.animated,inactive:!Z&&!s,updating:L,selectable:Z}]),onClick:ut,onDoubleClick:ct,onContextMenu:dt,onMouseEnter:st,onMouseMove:pt,onMouseLeave:wt,onKeyDown:H?Ct:void 0,tabIndex:H?0:void 0,role:w.ariaRole??(H?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":H?`${a1}-${S}`:void 0,ref:lt,...w.domAttributes,children:[!et&&E.jsx(D,{id:t,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:Z,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:B,sourceY:Y,targetX:K,targetY:A,sourcePosition:O,targetPosition:V,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:T,markerEnd:nt,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),G&&E.jsx(qA,{edge:w,isReconnectable:G,reconnectRadius:g,onReconnect:y,onReconnectStart:x,onReconnectEnd:v,sourceX:B,sourceY:Y,targetX:K,targetY:A,sourcePosition:O,targetPosition:V,setUpdateHover:Q,setReconnecting:R})]})})}var IA=J.memo(VA);const YA=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function z1({defaultMarkerColor:t,onlyRenderVisibleElements:i,rfId:r,edgeTypes:a,noPanClassName:s,onReconnect:u,onEdgeContextMenu:c,onEdgeMouseEnter:d,onEdgeMouseMove:m,onEdgeMouseLeave:h,onEdgeClick:g,reconnectRadius:y,onEdgeDoubleClick:x,onReconnectStart:v,onReconnectEnd:S,disableKeyboardA11y:_}){const{edgesFocusable:M,edgesReconnectable:C,elementsSelectable:j,onError:w}=Bt(YA,ie),k=TA(i);return E.jsxs("div",{className:"react-flow__edges",children:[E.jsx(DA,{defaultColor:t,rfId:r}),k.map(I=>E.jsx(IA,{id:I,edgesFocusable:M,edgesReconnectable:C,elementsSelectable:j,noPanClassName:s,onReconnect:u,onContextMenu:c,onMouseEnter:d,onMouseMove:m,onMouseLeave:h,onClick:g,reconnectRadius:y,onDoubleClick:x,onReconnectStart:v,onReconnectEnd:S,rfId:r,onError:w,edgeTypes:a,disableKeyboardA11y:_},I))]})}z1.displayName="EdgeRenderer";const QA=J.memo(z1),XA=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function GA({children:t}){const i=Bt(XA);return E.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:i},children:t})}function ZA(t){const i=_h(),r=J.useRef(!1);J.useEffect(()=>{!r.current&&i.viewportInitialized&&t&&(setTimeout(()=>t(i),1),r.current=!0)},[t,i.viewportInitialized])}const FA=t=>t.panZoom?.syncViewport;function KA(t){const i=Bt(FA),r=re();return J.useEffect(()=>{t&&(i?.(t),r.setState({transform:[t.x,t.y,t.zoom]}))},[t,i]),null}function $A(t){return t.connection.inProgress?{...t.connection,to:so(t.connection.to,t.transform)}:{...t.connection}}function PA(t){return $A}function JA(t){const i=PA();return Bt(i,ie)}const WA=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function tM({containerStyle:t,style:i,type:r,component:a}){const{nodesConnectable:s,width:u,height:c,isValid:d,inProgress:m}=Bt(WA,ie);return!(u&&s&&m)?null:E.jsx("svg",{style:t,width:u,height:c,className:"react-flow__connectionline react-flow__container",children:E.jsx("g",{className:ye(["react-flow__connection",Ov(d)]),children:E.jsx(O1,{style:i,type:r,CustomComponent:a,isValid:d})})})}const O1=({style:t,type:i=Fi.Bezier,CustomComponent:r,isValid:a})=>{const{inProgress:s,from:u,fromNode:c,fromHandle:d,fromPosition:m,to:h,toNode:g,toHandle:y,toPosition:x,pointer:v}=JA();if(!s)return;if(r)return E.jsx(r,{connectionLineType:i,connectionLineStyle:t,fromNode:c,fromHandle:d,fromX:u.x,fromY:u.y,toX:h.x,toY:h.y,fromPosition:m,toPosition:x,connectionStatus:Ov(a),toNode:g,toHandle:y,pointer:v});let S="";const _={sourceX:u.x,sourceY:u.y,sourcePosition:m,targetX:h.x,targetY:h.y,targetPosition:x};switch(i){case Fi.Bezier:[S]=Yv(_);break;case Fi.SimpleBezier:[S]=x1(_);break;case Fi.Step:[S]=Qd({..._,borderRadius:0});break;case Fi.SmoothStep:[S]=Qd(_);break;default:[S]=Xv(_)}return E.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:t})};O1.displayName="ConnectionLine";const eM={};function $0(t=eM){J.useRef(t),re(),J.useEffect(()=>{},[t])}function nM(){re(),J.useRef(!1),J.useEffect(()=>{},[])}function D1({nodeTypes:t,edgeTypes:i,onInit:r,onNodeClick:a,onEdgeClick:s,onNodeDoubleClick:u,onEdgeDoubleClick:c,onNodeMouseEnter:d,onNodeMouseMove:m,onNodeMouseLeave:h,onNodeContextMenu:g,onSelectionContextMenu:y,onSelectionStart:x,onSelectionEnd:v,connectionLineType:S,connectionLineStyle:_,connectionLineComponent:M,connectionLineContainerStyle:C,selectionKeyCode:j,selectionOnDrag:w,selectionMode:k,multiSelectionKeyCode:I,panActivationKeyCode:D,zoomActivationKeyCode:H,deleteKeyCode:G,onlyRenderVisibleElements:Z,elementsSelectable:lt,defaultViewport:L,translateExtent:Q,minZoom:et,maxZoom:R,preventScrolling:U,defaultMarkerColor:z,zoomOnScroll:B,zoomOnPinch:Y,panOnScroll:K,panOnScrollSpeed:A,panOnScrollMode:O,zoomOnDoubleClick:V,panOnDrag:T,onPaneClick:nt,onPaneMouseEnter:ut,onPaneMouseMove:ct,onPaneMouseLeave:dt,onPaneScroll:st,onPaneContextMenu:pt,paneClickDistance:wt,nodeClickDistance:Ct,onEdgeContextMenu:xt,onEdgeMouseEnter:Et,onEdgeMouseMove:Ot,onEdgeMouseLeave:It,reconnectRadius:Ut,onReconnect:oe,onReconnectStart:Ke,onReconnectEnd:Ae,noDragClassName:je,noWheelClassName:vn,noPanClassName:Yn,disableKeyboardA11y:Qn,nodeExtent:xe,rfId:gi,viewport:it,onViewportChange:ht}){return $0(t),$0(i),nM(),ZA(r),KA(it),E.jsx(yA,{onPaneClick:nt,onPaneMouseEnter:ut,onPaneMouseMove:ct,onPaneMouseLeave:dt,onPaneContextMenu:pt,onPaneScroll:st,paneClickDistance:wt,deleteKeyCode:G,selectionKeyCode:j,selectionOnDrag:w,selectionMode:k,onSelectionStart:x,onSelectionEnd:v,multiSelectionKeyCode:I,panActivationKeyCode:D,zoomActivationKeyCode:H,elementsSelectable:lt,zoomOnScroll:B,zoomOnPinch:Y,zoomOnDoubleClick:V,panOnScroll:K,panOnScrollSpeed:A,panOnScrollMode:O,panOnDrag:T,defaultViewport:L,translateExtent:Q,minZoom:et,maxZoom:R,onSelectionContextMenu:y,preventScrolling:U,noDragClassName:je,noWheelClassName:vn,noPanClassName:Yn,disableKeyboardA11y:Qn,onViewportChange:ht,isControlledViewport:!!it,children:E.jsxs(GA,{children:[E.jsx(QA,{edgeTypes:i,onEdgeClick:s,onEdgeDoubleClick:c,onReconnect:oe,onReconnectStart:Ke,onReconnectEnd:Ae,onlyRenderVisibleElements:Z,onEdgeContextMenu:xt,onEdgeMouseEnter:Et,onEdgeMouseMove:Ot,onEdgeMouseLeave:It,reconnectRadius:Ut,defaultMarkerColor:z,noPanClassName:Yn,disableKeyboardA11y:Qn,rfId:gi}),E.jsx(tM,{style:_,type:S,component:M,containerStyle:C}),E.jsx("div",{className:"react-flow__edgelabel-renderer"}),E.jsx(NA,{nodeTypes:t,onNodeClick:a,onNodeDoubleClick:u,onNodeMouseEnter:d,onNodeMouseMove:m,onNodeMouseLeave:h,onNodeContextMenu:g,nodeClickDistance:Ct,onlyRenderVisibleElements:Z,noPanClassName:Yn,noDragClassName:je,disableKeyboardA11y:Qn,nodeExtent:xe,rfId:gi}),E.jsx("div",{className:"react-flow__viewport-portal"})]})})}D1.displayName="GraphView";const iM=J.memo(D1),P0=({nodes:t,edges:i,defaultNodes:r,defaultEdges:a,width:s,height:u,fitView:c,fitViewOptions:d,minZoom:m=.5,maxZoom:h=2,nodeOrigin:g,nodeExtent:y,zIndexMode:x="basic"}={})=>{const v=new Map,S=new Map,_=new Map,M=new Map,C=a??i??[],j=r??t??[],w=g??[0,0],k=y??Ka;Fv(_,M,C);const I=Gd(j,v,S,{nodeOrigin:w,nodeExtent:k,zIndexMode:x});let D=[0,0,1];if(c&&s&&u){const H=ao(v,{filter:L=>!!((L.width||L.initialWidth)&&(L.height||L.initialHeight))}),{x:G,y:Z,zoom:lt}=xh(H,s,u,m,h,d?.padding??.1);D=[G,Z,lt]}return{rfId:"1",width:s??0,height:u??0,transform:D,nodes:j,nodesInitialized:I,nodeLookup:v,parentLookup:S,edges:C,edgeLookup:M,connectionLookup:_,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:r!==void 0,hasDefaultEdges:a!==void 0,panZoom:null,minZoom:m,maxZoom:h,translateExtent:Ka,nodeExtent:k,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Tl.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:c??!1,fitViewOptions:d,fitViewResolver:null,connection:{...zv},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:gN,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Mv,zIndexMode:x,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},rM=({nodes:t,edges:i,defaultNodes:r,defaultEdges:a,width:s,height:u,fitView:c,fitViewOptions:d,minZoom:m,maxZoom:h,nodeOrigin:g,nodeExtent:y,zIndexMode:x})=>bT((v,S)=>{async function _(){const{nodeLookup:M,panZoom:C,fitViewOptions:j,fitViewResolver:w,width:k,height:I,minZoom:D,maxZoom:H}=S();C&&(await pN({nodes:M,width:k,height:I,panZoom:C,minZoom:D,maxZoom:H},j),w?.resolve(!0),v({fitViewResolver:null}))}return{...P0({nodes:t,edges:i,width:s,height:u,fitView:c,fitViewOptions:d,minZoom:m,maxZoom:h,nodeOrigin:g,nodeExtent:y,defaultNodes:r,defaultEdges:a,zIndexMode:x}),setNodes:M=>{const{nodeLookup:C,parentLookup:j,nodeOrigin:w,elevateNodesOnSelect:k,fitViewQueued:I,zIndexMode:D}=S(),H=Gd(M,C,j,{nodeOrigin:w,nodeExtent:y,elevateNodesOnSelect:k,checkEquality:!0,zIndexMode:D});I&&H?(_(),v({nodes:M,nodesInitialized:H,fitViewQueued:!1,fitViewOptions:void 0})):v({nodes:M,nodesInitialized:H})},setEdges:M=>{const{connectionLookup:C,edgeLookup:j}=S();Fv(C,j,M),v({edges:M})},setDefaultNodesAndEdges:(M,C)=>{if(M){const{setNodes:j}=S();j(M),v({hasDefaultNodes:!0})}if(C){const{setEdges:j}=S();j(C),v({hasDefaultEdges:!0})}},updateNodeInternals:M=>{const{triggerNodeChanges:C,nodeLookup:j,parentLookup:w,domNode:k,nodeOrigin:I,nodeExtent:D,debug:H,fitViewQueued:G,zIndexMode:Z}=S(),{changes:lt,updatedInternals:L}=BN(M,j,w,k,I,D,Z);L&&(RN(j,w,{nodeOrigin:I,nodeExtent:D,zIndexMode:Z}),G?(_(),v({fitViewQueued:!1,fitViewOptions:void 0})):v({}),lt?.length>0&&(H&&console.log("React Flow: trigger node changes",lt),C?.(lt)))},updateNodePositions:(M,C=!1)=>{const j=[];let w=[];const{nodeLookup:k,triggerNodeChanges:I,connection:D,updateConnection:H,onNodesChangeMiddlewareMap:G}=S();for(const[Z,lt]of M){const L=k.get(Z),Q=!!(L?.expandParent&&L?.parentId&&lt?.position),et={id:Z,type:"position",position:Q?{x:Math.max(0,lt.position.x),y:Math.max(0,lt.position.y)}:lt.position,dragging:C};if(L&&D.inProgress&&D.fromNode.id===L.id){const R=Ar(L,D.fromHandle,vt.Left,!0);H({...D,from:R})}Q&&L.parentId&&j.push({id:Z,parentId:L.parentId,rect:{...lt.internals.positionAbsolute,width:lt.measured.width??0,height:lt.measured.height??0}}),w.push(et)}if(j.length>0){const{parentLookup:Z,nodeOrigin:lt}=S(),L=Ch(j,k,Z,lt);w.push(...L)}for(const Z of G.values())w=Z(w);I(w)},triggerNodeChanges:M=>{const{onNodesChange:C,setNodes:j,nodes:w,hasDefaultNodes:k,debug:I}=S();if(M?.length){if(k){const D=VT(M,w);j(D)}I&&console.log("React Flow: trigger node changes",M),C?.(M)}},triggerEdgeChanges:M=>{const{onEdgesChange:C,setEdges:j,edges:w,hasDefaultEdges:k,debug:I}=S();if(M?.length){if(k){const D=IT(M,w);j(D)}I&&console.log("React Flow: trigger edge changes",M),C?.(M)}},addSelectedNodes:M=>{const{multiSelectionActive:C,edgeLookup:j,nodeLookup:w,triggerNodeChanges:k,triggerEdgeChanges:I}=S();if(C){const D=M.map(H=>vr(H,!0));k(D);return}k(bl(w,new Set([...M]),!0)),I(bl(j))},addSelectedEdges:M=>{const{multiSelectionActive:C,edgeLookup:j,nodeLookup:w,triggerNodeChanges:k,triggerEdgeChanges:I}=S();if(C){const D=M.map(H=>vr(H,!0));I(D);return}I(bl(j,new Set([...M]))),k(bl(w,new Set,!0))},unselectNodesAndEdges:({nodes:M,edges:C}={})=>{const{edges:j,nodes:w,nodeLookup:k,triggerNodeChanges:I,triggerEdgeChanges:D}=S(),H=M||w,G=C||j,Z=[];for(const L of H){if(!L.selected)continue;const Q=k.get(L.id);Q&&(Q.selected=!1),Z.push(vr(L.id,!1))}const lt=[];for(const L of G)L.selected&&lt.push(vr(L.id,!1));I(Z),D(lt)},setMinZoom:M=>{const{panZoom:C,maxZoom:j}=S();C?.setScaleExtent([M,j]),v({minZoom:M})},setMaxZoom:M=>{const{panZoom:C,minZoom:j}=S();C?.setScaleExtent([j,M]),v({maxZoom:M})},setTranslateExtent:M=>{S().panZoom?.setTranslateExtent(M),v({translateExtent:M})},resetSelectedElements:()=>{const{edges:M,nodes:C,triggerNodeChanges:j,triggerEdgeChanges:w,elementsSelectable:k}=S();if(!k)return;const I=C.reduce((H,G)=>G.selected?[...H,vr(G.id,!1)]:H,[]),D=M.reduce((H,G)=>G.selected?[...H,vr(G.id,!1)]:H,[]);j(I),w(D)},setNodeExtent:M=>{const{nodes:C,nodeLookup:j,parentLookup:w,nodeOrigin:k,elevateNodesOnSelect:I,nodeExtent:D,zIndexMode:H}=S();M[0][0]===D[0][0]&&M[0][1]===D[0][1]&&M[1][0]===D[1][0]&&M[1][1]===D[1][1]||(Gd(C,j,w,{nodeOrigin:k,nodeExtent:M,elevateNodesOnSelect:I,checkEquality:!1,zIndexMode:H}),v({nodeExtent:M}))},panBy:M=>{const{transform:C,width:j,height:w,panZoom:k,translateExtent:I}=S();return UN({delta:M,panZoom:k,transform:C,translateExtent:I,width:j,height:w})},setCenter:async(M,C,j)=>{const{width:w,height:k,maxZoom:I,panZoom:D}=S();if(!D)return Promise.resolve(!1);const H=typeof j?.zoom<"u"?j.zoom:I;return await D.setViewport({x:w/2-M*H,y:k/2-C*H,zoom:H},{duration:j?.duration,ease:j?.ease,interpolate:j?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{v({connection:{...zv}})},updateConnection:M=>{v({connection:M})},reset:()=>v({...P0()})}},Object.is);function lM({initialNodes:t,initialEdges:i,defaultNodes:r,defaultEdges:a,initialWidth:s,initialHeight:u,initialMinZoom:c,initialMaxZoom:d,initialFitViewOptions:m,fitView:h,nodeOrigin:g,nodeExtent:y,zIndexMode:x,children:v}){const[S]=J.useState(()=>rM({nodes:t,edges:i,defaultNodes:r,defaultEdges:a,width:s,height:u,fitView:h,minZoom:c,maxZoom:d,fitViewOptions:m,nodeOrigin:g,nodeExtent:y,zIndexMode:x}));return E.jsx(ST,{value:S,children:E.jsx(GT,{children:v})})}function aM({children:t,nodes:i,edges:r,defaultNodes:a,defaultEdges:s,width:u,height:c,fitView:d,fitViewOptions:m,minZoom:h,maxZoom:g,nodeOrigin:y,nodeExtent:x,zIndexMode:v}){return J.useContext(Au)?E.jsx(E.Fragment,{children:t}):E.jsx(lM,{initialNodes:i,initialEdges:r,defaultNodes:a,defaultEdges:s,initialWidth:u,initialHeight:c,fitView:d,initialFitViewOptions:m,initialMinZoom:h,initialMaxZoom:g,nodeOrigin:y,nodeExtent:x,zIndexMode:v,children:t})}const oM={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function sM({nodes:t,edges:i,defaultNodes:r,defaultEdges:a,className:s,nodeTypes:u,edgeTypes:c,onNodeClick:d,onEdgeClick:m,onInit:h,onMove:g,onMoveStart:y,onMoveEnd:x,onConnect:v,onConnectStart:S,onConnectEnd:_,onClickConnectStart:M,onClickConnectEnd:C,onNodeMouseEnter:j,onNodeMouseMove:w,onNodeMouseLeave:k,onNodeContextMenu:I,onNodeDoubleClick:D,onNodeDragStart:H,onNodeDrag:G,onNodeDragStop:Z,onNodesDelete:lt,onEdgesDelete:L,onDelete:Q,onSelectionChange:et,onSelectionDragStart:R,onSelectionDrag:U,onSelectionDragStop:z,onSelectionContextMenu:B,onSelectionStart:Y,onSelectionEnd:K,onBeforeDelete:A,connectionMode:O,connectionLineType:V=Fi.Bezier,connectionLineStyle:T,connectionLineComponent:nt,connectionLineContainerStyle:ut,deleteKeyCode:ct="Backspace",selectionKeyCode:dt="Shift",selectionOnDrag:st=!1,selectionMode:pt=$a.Full,panActivationKeyCode:wt="Space",multiSelectionKeyCode:Ct=Ja()?"Meta":"Control",zoomActivationKeyCode:xt=Ja()?"Meta":"Control",snapToGrid:Et,snapGrid:Ot,onlyRenderVisibleElements:It=!1,selectNodesOnDrag:Ut,nodesDraggable:oe,autoPanOnNodeFocus:Ke,nodesConnectable:Ae,nodesFocusable:je,nodeOrigin:vn=o1,edgesFocusable:Yn,edgesReconnectable:Qn,elementsSelectable:xe=!0,defaultViewport:gi=RT,minZoom:it=.5,maxZoom:ht=2,translateExtent:bt=Ka,preventScrolling:zt=!0,nodeExtent:Lt,defaultMarkerColor:ke="#b1b1b7",zoomOnScroll:bn=!0,zoomOnPinch:we=!0,panOnScroll:se=!1,panOnScrollSpeed:Me=.5,panOnScrollMode:Xt=Er.Free,zoomOnDoubleClick:zn=!0,panOnDrag:$e=!0,onPaneClick:ju,onPaneMouseEnter:zr,onPaneMouseMove:Or,onPaneMouseLeave:Dr,onPaneScroll:Xn,onPaneContextMenu:kr,paneClickDistance:Ji=1,nodeClickDistance:Hu=0,children:fo,onReconnect:jl,onReconnectStart:Wi,onReconnectEnd:Lu,onEdgeContextMenu:ho,onEdgeDoubleClick:po,onEdgeMouseEnter:mo,onEdgeMouseMove:Hl,onEdgeMouseLeave:Ll,reconnectRadius:go=10,onNodesChange:yo,onEdgesChange:On,noDragClassName:ve="nodrag",noWheelClassName:ze="nowheel",noPanClassName:Gn="nopan",fitView:Rr,fitViewOptions:xo,connectOnClick:Bu,attributionPosition:vo,proOptions:tr,defaultEdgeOptions:Bl,elevateNodesOnSelect:yi=!0,elevateEdgesOnSelect:xi=!1,disableKeyboardA11y:vi=!1,autoPanOnConnect:bi,autoPanOnNodeDrag:fe,autoPanSpeed:bo,connectionRadius:So,isValidConnection:Zn,onError:Si,style:Uu,id:Ul,nodeDragThreshold:wo,connectionDragThreshold:qu,viewport:jr,onViewportChange:Hr,width:Sn,height:He,colorMode:Eo="light",debug:Vu,onScroll:Lr,ariaLabelConfig:Co,zIndexMode:er="basic",...Iu},Le){const nr=Ul||"1",_o=BT(Eo),ql=J.useCallback(Fn=>{Fn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Lr?.(Fn)},[Lr]);return E.jsx("div",{"data-testid":"rf__wrapper",...Iu,onScroll:ql,style:{...Uu,...oM},ref:Le,className:ye(["react-flow",s,_o]),id:Ul,role:"application",children:E.jsxs(aM,{nodes:t,edges:i,width:Sn,height:He,fitView:Rr,fitViewOptions:xo,minZoom:it,maxZoom:ht,nodeOrigin:vn,nodeExtent:Lt,zIndexMode:er,children:[E.jsx(iM,{onInit:h,onNodeClick:d,onEdgeClick:m,onNodeMouseEnter:j,onNodeMouseMove:w,onNodeMouseLeave:k,onNodeContextMenu:I,onNodeDoubleClick:D,nodeTypes:u,edgeTypes:c,connectionLineType:V,connectionLineStyle:T,connectionLineComponent:nt,connectionLineContainerStyle:ut,selectionKeyCode:dt,selectionOnDrag:st,selectionMode:pt,deleteKeyCode:ct,multiSelectionKeyCode:Ct,panActivationKeyCode:wt,zoomActivationKeyCode:xt,onlyRenderVisibleElements:It,defaultViewport:gi,translateExtent:bt,minZoom:it,maxZoom:ht,preventScrolling:zt,zoomOnScroll:bn,zoomOnPinch:we,zoomOnDoubleClick:zn,panOnScroll:se,panOnScrollSpeed:Me,panOnScrollMode:Xt,panOnDrag:$e,onPaneClick:ju,onPaneMouseEnter:zr,onPaneMouseMove:Or,onPaneMouseLeave:Dr,onPaneScroll:Xn,onPaneContextMenu:kr,paneClickDistance:Ji,nodeClickDistance:Hu,onSelectionContextMenu:B,onSelectionStart:Y,onSelectionEnd:K,onReconnect:jl,onReconnectStart:Wi,onReconnectEnd:Lu,onEdgeContextMenu:ho,onEdgeDoubleClick:po,onEdgeMouseEnter:mo,onEdgeMouseMove:Hl,onEdgeMouseLeave:Ll,reconnectRadius:go,defaultMarkerColor:ke,noDragClassName:ve,noWheelClassName:ze,noPanClassName:Gn,rfId:nr,disableKeyboardA11y:vi,nodeExtent:Lt,viewport:jr,onViewportChange:Hr}),E.jsx(LT,{nodes:t,edges:i,defaultNodes:r,defaultEdges:a,onConnect:v,onConnectStart:S,onConnectEnd:_,onClickConnectStart:M,onClickConnectEnd:C,nodesDraggable:oe,autoPanOnNodeFocus:Ke,nodesConnectable:Ae,nodesFocusable:je,edgesFocusable:Yn,edgesReconnectable:Qn,elementsSelectable:xe,elevateNodesOnSelect:yi,elevateEdgesOnSelect:xi,minZoom:it,maxZoom:ht,nodeExtent:Lt,onNodesChange:yo,onEdgesChange:On,snapToGrid:Et,snapGrid:Ot,connectionMode:O,translateExtent:bt,connectOnClick:Bu,defaultEdgeOptions:Bl,fitView:Rr,fitViewOptions:xo,onNodesDelete:lt,onEdgesDelete:L,onDelete:Q,onNodeDragStart:H,onNodeDrag:G,onNodeDragStop:Z,onSelectionDrag:U,onSelectionDragStart:R,onSelectionDragStop:z,onMove:g,onMoveStart:y,onMoveEnd:x,noPanClassName:Gn,nodeOrigin:vn,rfId:nr,autoPanOnConnect:bi,autoPanOnNodeDrag:fe,autoPanSpeed:bo,onError:Si,connectionRadius:So,isValidConnection:Zn,selectNodesOnDrag:Ut,nodeDragThreshold:wo,connectionDragThreshold:qu,onBeforeDelete:A,debug:Vu,ariaLabelConfig:Co,zIndexMode:er}),E.jsx(kT,{onSelectionChange:et}),fo,E.jsx(AT,{proOptions:tr,position:vo}),E.jsx(TT,{rfId:nr,disableKeyboardA11y:vi})]})})}var uM=u1(sM);function cM({dimensions:t,lineWidth:i,variant:r,className:a}){return E.jsx("path",{strokeWidth:i,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:ye(["react-flow__background-pattern",r,a])})}function fM({radius:t,className:i}){return E.jsx("circle",{cx:t,cy:t,r:t,className:ye(["react-flow__background-pattern","dots",i])})}var $i;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})($i||($i={}));const dM={[$i.Dots]:1,[$i.Lines]:1,[$i.Cross]:6},hM=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function k1({id:t,variant:i=$i.Dots,gap:r=20,size:a,lineWidth:s=1,offset:u=0,color:c,bgColor:d,style:m,className:h,patternClassName:g}){const y=J.useRef(null),{transform:x,patternId:v}=Bt(hM,ie),S=a||dM[i],_=i===$i.Dots,M=i===$i.Cross,C=Array.isArray(r)?r:[r,r],j=[C[0]*x[2]||1,C[1]*x[2]||1],w=S*x[2],k=Array.isArray(u)?u:[u,u],I=M?[w,w]:j,D=[k[0]*x[2]||1+I[0]/2,k[1]*x[2]||1+I[1]/2],H=`${v}${t||""}`;return E.jsxs("svg",{className:ye(["react-flow__background",h]),style:{...m,...zu,"--xy-background-color-props":d,"--xy-background-pattern-color-props":c},ref:y,"data-testid":"rf__background",children:[E.jsx("pattern",{id:H,x:x[0]%j[0],y:x[1]%j[1],width:j[0],height:j[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${D[0]},-${D[1]})`,children:_?E.jsx(fM,{radius:w/2,className:g}):E.jsx(cM,{dimensions:I,lineWidth:s,variant:i,className:g})}),E.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${H})`})]})}k1.displayName="Background";const pM=J.memo(k1);function mM(){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:E.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function gM(){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:E.jsx("path",{d:"M0 0h32v4.2H0z"})})}function yM(){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:E.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function xM(){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:E.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function vM(){return E.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:E.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Xs({children:t,className:i,...r}){return E.jsx("button",{type:"button",className:ye(["react-flow__controls-button",i]),...r,children:t})}const bM=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function R1({style:t,showZoom:i=!0,showFitView:r=!0,showInteractive:a=!0,fitViewOptions:s,onZoomIn:u,onZoomOut:c,onFitView:d,onInteractiveChange:m,className:h,children:g,position:y="bottom-left",orientation:x="vertical","aria-label":v}){const S=re(),{isInteractive:_,minZoomReached:M,maxZoomReached:C,ariaLabelConfig:j}=Bt(bM,ie),{zoomIn:w,zoomOut:k,fitView:I}=_h(),D=()=>{w(),u?.()},H=()=>{k(),c?.()},G=()=>{I(s),d?.()},Z=()=>{S.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),m?.(!_)},lt=x==="horizontal"?"horizontal":"vertical";return E.jsxs(Mu,{className:ye(["react-flow__controls",lt,h]),position:y,style:t,"data-testid":"rf__controls","aria-label":v??j["controls.ariaLabel"],children:[i&&E.jsxs(E.Fragment,{children:[E.jsx(Xs,{onClick:D,className:"react-flow__controls-zoomin",title:j["controls.zoomIn.ariaLabel"],"aria-label":j["controls.zoomIn.ariaLabel"],disabled:C,children:E.jsx(mM,{})}),E.jsx(Xs,{onClick:H,className:"react-flow__controls-zoomout",title:j["controls.zoomOut.ariaLabel"],"aria-label":j["controls.zoomOut.ariaLabel"],disabled:M,children:E.jsx(gM,{})})]}),r&&E.jsx(Xs,{className:"react-flow__controls-fitview",onClick:G,title:j["controls.fitView.ariaLabel"],"aria-label":j["controls.fitView.ariaLabel"],children:E.jsx(yM,{})}),a&&E.jsx(Xs,{className:"react-flow__controls-interactive",onClick:Z,title:j["controls.interactive.ariaLabel"],"aria-label":j["controls.interactive.ariaLabel"],children:_?E.jsx(vM,{}):E.jsx(xM,{})}),g]})}R1.displayName="Controls";const SM=J.memo(R1);function wM({id:t,x:i,y:r,width:a,height:s,style:u,color:c,strokeColor:d,strokeWidth:m,className:h,borderRadius:g,shapeRendering:y,selected:x,onClick:v}){const{background:S,backgroundColor:_}=u||{},M=c||S||_;return E.jsx("rect",{className:ye(["react-flow__minimap-node",{selected:x},h]),x:i,y:r,rx:g,ry:g,width:a,height:s,style:{fill:M,stroke:d,strokeWidth:m},shapeRendering:y,onClick:v?C=>v(C,t):void 0})}const EM=J.memo(wM),CM=t=>t.nodes.map(i=>i.id),hd=t=>t instanceof Function?t:()=>t;function _M({nodeStrokeColor:t,nodeColor:i,nodeClassName:r="",nodeBorderRadius:a=5,nodeStrokeWidth:s,nodeComponent:u=EM,onClick:c}){const d=Bt(CM,ie),m=hd(i),h=hd(t),g=hd(r),y=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return E.jsx(E.Fragment,{children:d.map(x=>E.jsx(TM,{id:x,nodeColorFunc:m,nodeStrokeColorFunc:h,nodeClassNameFunc:g,nodeBorderRadius:a,nodeStrokeWidth:s,NodeComponent:u,onClick:c,shapeRendering:y},x))})}function NM({id:t,nodeColorFunc:i,nodeStrokeColorFunc:r,nodeClassNameFunc:a,nodeBorderRadius:s,nodeStrokeWidth:u,shapeRendering:c,NodeComponent:d,onClick:m}){const{node:h,x:g,y,width:x,height:v}=Bt(S=>{const _=S.nodeLookup.get(t);if(!_)return{node:void 0,x:0,y:0,width:0,height:0};const M=_.internals.userNode,{x:C,y:j}=_.internals.positionAbsolute,{width:w,height:k}=mi(M);return{node:M,x:C,y:j,width:w,height:k}},ie);return!h||h.hidden||!Lv(h)?null:E.jsx(d,{x:g,y,width:x,height:v,style:h.style,selected:!!h.selected,className:a(h),color:i(h),borderRadius:s,strokeColor:r(h),strokeWidth:u,shapeRendering:c,onClick:m,id:h.id})}const TM=J.memo(NM);var AM=J.memo(_M);const MM=200,zM=150,OM=t=>!t.hidden,DM=t=>{const i={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};return{viewBB:i,boundingRect:t.nodeLookup.size>0?Hv(ao(t.nodeLookup,{filter:OM}),i):i,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},kM="react-flow__minimap-desc";function j1({style:t,className:i,nodeStrokeColor:r,nodeColor:a,nodeClassName:s="",nodeBorderRadius:u=5,nodeStrokeWidth:c,nodeComponent:d,bgColor:m,maskColor:h,maskStrokeColor:g,maskStrokeWidth:y,position:x="bottom-right",onClick:v,onNodeClick:S,pannable:_=!1,zoomable:M=!1,ariaLabel:C,inversePan:j,zoomStep:w=1,offsetScale:k=5}){const I=re(),D=J.useRef(null),{boundingRect:H,viewBB:G,rfId:Z,panZoom:lt,translateExtent:L,flowWidth:Q,flowHeight:et,ariaLabelConfig:R}=Bt(DM,ie),U=t?.width??MM,z=t?.height??zM,B=H.width/U,Y=H.height/z,K=Math.max(B,Y),A=K*U,O=K*z,V=k*K,T=H.x-(A-H.width)/2-V,nt=H.y-(O-H.height)/2-V,ut=A+V*2,ct=O+V*2,dt=`${kM}-${Z}`,st=J.useRef(0),pt=J.useRef();st.current=K,J.useEffect(()=>{if(D.current&&lt)return pt.current=FN({domNode:D.current,panZoom:lt,getTransform:()=>I.getState().transform,getViewScale:()=>st.current}),()=>{pt.current?.destroy()}},[lt]),J.useEffect(()=>{pt.current?.update({translateExtent:L,width:Q,height:et,inversePan:j,pannable:_,zoomStep:w,zoomable:M})},[_,M,j,w,L,Q,et]);const wt=v?Et=>{const[Ot,It]=pt.current?.pointer(Et)||[0,0];v(Et,{x:Ot,y:It})}:void 0,Ct=S?J.useCallback((Et,Ot)=>{const It=I.getState().nodeLookup.get(Ot).internals.userNode;S(Et,It)},[]):void 0,xt=C??R["minimap.ariaLabel"];return E.jsx(Mu,{position:x,style:{...t,"--xy-minimap-background-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-stroke-width-props":typeof y=="number"?y*K:void 0,"--xy-minimap-node-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-node-stroke-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-width-props":typeof c=="number"?c:void 0},className:ye(["react-flow__minimap",i]),"data-testid":"rf__minimap",children:E.jsxs("svg",{width:U,height:z,viewBox:`${T} ${nt} ${ut} ${ct}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":dt,ref:D,onClick:wt,children:[xt&&E.jsx("title",{id:dt,children:xt}),E.jsx(AM,{onClick:Ct,nodeColor:a,nodeStrokeColor:r,nodeBorderRadius:u,nodeClassName:s,nodeStrokeWidth:c,nodeComponent:d}),E.jsx("path",{className:"react-flow__minimap-mask",d:`M${T-V},${nt-V}h${ut+V*2}v${ct+V*2}h${-ut-V*2}z
15
+ M${G.x},${G.y}h${G.width}v${G.height}h${-G.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}j1.displayName="MiniMap";J.memo(j1);const RM=t=>i=>t?`${Math.max(1/i.transform[2],1)}`:void 0,jM={[Ol.Line]:"right",[Ol.Handle]:"bottom-right"};function HM({nodeId:t,position:i,variant:r=Ol.Handle,className:a,style:s=void 0,children:u,color:c,minWidth:d=10,minHeight:m=10,maxWidth:h=Number.MAX_VALUE,maxHeight:g=Number.MAX_VALUE,keepAspectRatio:y=!1,resizeDirection:x,autoScale:v=!0,shouldResize:S,onResizeStart:_,onResize:M,onResizeEnd:C}){const j=h1(),w=typeof t=="string"?t:j,k=re(),I=J.useRef(null),D=r===Ol.Handle,H=Bt(J.useCallback(RM(D&&v),[D,v]),ie),G=J.useRef(null),Z=i??jM[r];J.useEffect(()=>{if(!(!I.current||!w))return G.current||(G.current=sT({domNode:I.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:L,transform:Q,snapGrid:et,snapToGrid:R,nodeOrigin:U,domNode:z}=k.getState();return{nodeLookup:L,transform:Q,snapGrid:et,snapToGrid:R,nodeOrigin:U,paneDomNode:z}},onChange:(L,Q)=>{const{triggerNodeChanges:et,nodeLookup:R,parentLookup:U,nodeOrigin:z}=k.getState(),B=[],Y={x:L.x,y:L.y},K=R.get(w);if(K&&K.expandParent&&K.parentId){const A=K.origin??z,O=L.width??K.measured.width??0,V=L.height??K.measured.height??0,T={id:K.id,parentId:K.parentId,rect:{width:O,height:V,...Bv({x:L.x??K.position.x,y:L.y??K.position.y},{width:O,height:V},K.parentId,R,A)}},nt=Ch([T],R,U,z);B.push(...nt),Y.x=L.x?Math.max(A[0]*O,L.x):void 0,Y.y=L.y?Math.max(A[1]*V,L.y):void 0}if(Y.x!==void 0&&Y.y!==void 0){const A={id:w,type:"position",position:{...Y}};B.push(A)}if(L.width!==void 0&&L.height!==void 0){const O={id:w,type:"dimensions",resizing:!0,setAttributes:x?x==="horizontal"?"width":"height":!0,dimensions:{width:L.width,height:L.height}};B.push(O)}for(const A of Q){const O={...A,type:"position"};B.push(O)}et(B)},onEnd:({width:L,height:Q})=>{const et={id:w,type:"dimensions",resizing:!1,dimensions:{width:L,height:Q}};k.getState().triggerNodeChanges([et])}})),G.current.update({controlPosition:Z,boundaries:{minWidth:d,minHeight:m,maxWidth:h,maxHeight:g},keepAspectRatio:y,resizeDirection:x,onResizeStart:_,onResize:M,onResizeEnd:C,shouldResize:S}),()=>{G.current?.destroy()}},[Z,d,m,h,g,y,_,M,C,S]);const lt=Z.split("-");return E.jsx("div",{className:ye(["react-flow__resize-control","nodrag",...lt,r,a]),ref:I,style:{...s,scale:H,...c&&{[D?"backgroundColor":"borderColor"]:c}},children:u})}J.memo(HM);const J0=200,LM=60,W0=40,BM=40;function UM(t,i){if(t.length===0)return{};const r={},a={};for(const g of t)a[g.nodeId]=g,r[g.nodeId]||(r[g.nodeId]=[]);for(const g of t)g.parentNodeId&&r[g.parentNodeId]&&r[g.parentNodeId].push(g.nodeId);const s=t.filter(g=>!g.parentNodeId||!a[g.parentNodeId]),u={},c=[];for(const g of s)u[g.nodeId]=0,c.push(g.nodeId);for(;c.length>0;){const g=c.shift(),y=r[g]??[];for(const x of y)x in u||(u[x]=u[g]+1,c.push(x))}for(const g of t)g.nodeId in u||(u[g.nodeId]=0);const d={};let m=0;for(const[g,y]of Object.entries(u))d[y]||(d[y]=[]),d[y].push(g),y>m&&(m=y);for(const g of Object.keys(d))d[Number(g)].sort((y,x)=>{const v=a[y],S=a[x];return(v?.createdAtEventIndex??0)-(S?.createdAtEventIndex??0)});const h={};for(let g=0;g<=m;g++){const y=d[g]??[],v=-(y.length*J0+(y.length-1)*W0)/2;for(let S=0;S<y.length;S++)h[y[S]]={x:v+S*(J0+W0),y:g*(LM+BM)}}return h}const qM={step:{bg:"#1e3a5f",border:"#3b82f6"},checkpoint:{bg:"#1a3d2e",border:"#22c55e"},blocked_attempt:{bg:"#3d1a1a",border:"#ef4444"}};function VM({run:t,onNodeClick:i}){const{nodes:r,edges:a}=J.useMemo(()=>{const u=UM(t.nodes,t.edges),c=t.nodes.map(m=>{const h=qM[m.nodeKind],g=u[m.nodeId]??{x:0,y:0},y=!!m.stepLabel;return{id:m.nodeId,position:g,data:{label:IM(m)},style:{background:h.bg,border:`2px solid ${m.isPreferredTip?"#fbbf24":h.border}`,borderRadius:m.nodeKind==="checkpoint"?"50%":"8px",color:"#fafafa",padding:y?"6px 10px":"8px 12px",fontSize:y?"10px":"11px",fontFamily:y?"system-ui, sans-serif":"monospace",width:m.nodeKind==="checkpoint"?40:void 0,maxWidth:y?180:void 0,height:m.nodeKind==="checkpoint"?40:void 0,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center",boxShadow:m.isPreferredTip?"0 0 12px rgba(251, 191, 36, 0.4)":"none",cursor:"pointer",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"normal",lineHeight:"1.3",wordBreak:"break-word"}}}),d=t.edges.map((m,h)=>({id:`e-${h}`,source:m.fromNodeId,target:m.toNodeId,style:{stroke:m.edgeKind==="checkpoint"?"#22c55e":"#3b82f6",strokeWidth:2},animated:m.edgeKind==="acked_step"}));return{nodes:c,edges:d}},[t]),s=J.useCallback((u,c)=>i?.(c.id),[i]);return E.jsxs(uM,{nodes:r,edges:a,fitView:!0,proOptions:{hideAttribution:!0},nodesDraggable:!1,nodesConnectable:!1,colorMode:"dark",onNodeClick:s,children:[E.jsx(pM,{color:"#333",gap:20}),E.jsx(SM,{})]})}function IM(t){const i=t.stepLabel??t.nodeId.slice(-8);return t.isPreferredTip?`* ${i}`:t.isTip?`> ${i}`:i}function YM(t,i){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const QM=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,XM=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,GM={};function tx(t,i){return(GM.jsx?XM:QM).test(t)}const ZM=/[ \t\n\f\r]/g;function FM(t){return typeof t=="object"?t.type==="text"?ex(t.value):!1:ex(t)}function ex(t){return t.replace(ZM,"")===""}class uo{constructor(i,r,a){this.normal=r,this.property=i,a&&(this.space=a)}}uo.prototype.normal={};uo.prototype.property={};uo.prototype.space=void 0;function H1(t,i){const r={},a={};for(const s of t)Object.assign(r,s.property),Object.assign(a,s.normal);return new uo(r,a,i)}function Kd(t){return t.toLowerCase()}class Fe{constructor(i,r){this.attribute=r,this.property=i}}Fe.prototype.attribute="";Fe.prototype.booleanish=!1;Fe.prototype.boolean=!1;Fe.prototype.commaOrSpaceSeparated=!1;Fe.prototype.commaSeparated=!1;Fe.prototype.defined=!1;Fe.prototype.mustUseProperty=!1;Fe.prototype.number=!1;Fe.prototype.overloadedBoolean=!1;Fe.prototype.property="";Fe.prototype.spaceSeparated=!1;Fe.prototype.space=void 0;let KM=0;const Mt=Mr(),ge=Mr(),$d=Mr(),ft=Mr(),Jt=Mr(),El=Mr(),ln=Mr();function Mr(){return 2**++KM}const Pd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Mt,booleanish:ge,commaOrSpaceSeparated:ln,commaSeparated:El,number:ft,overloadedBoolean:$d,spaceSeparated:Jt},Symbol.toStringTag,{value:"Module"})),pd=Object.keys(Pd);class Th extends Fe{constructor(i,r,a,s){let u=-1;if(super(i,r),nx(this,"space",s),typeof a=="number")for(;++u<pd.length;){const c=pd[u];nx(this,pd[u],(a&Pd[c])===Pd[c])}}}Th.prototype.defined=!0;function nx(t,i,r){r&&(t[i]=r)}function Dl(t){const i={},r={};for(const[a,s]of Object.entries(t.properties)){const u=new Th(a,t.transform(t.attributes||{},a),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(a)&&(u.mustUseProperty=!0),i[a]=u,r[Kd(a)]=a,r[Kd(u.attribute)]=a}return new uo(i,r,t.space)}const L1=Dl({properties:{ariaActiveDescendant:null,ariaAtomic:ge,ariaAutoComplete:null,ariaBusy:ge,ariaChecked:ge,ariaColCount:ft,ariaColIndex:ft,ariaColSpan:ft,ariaControls:Jt,ariaCurrent:null,ariaDescribedBy:Jt,ariaDetails:null,ariaDisabled:ge,ariaDropEffect:Jt,ariaErrorMessage:null,ariaExpanded:ge,ariaFlowTo:Jt,ariaGrabbed:ge,ariaHasPopup:null,ariaHidden:ge,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Jt,ariaLevel:ft,ariaLive:null,ariaModal:ge,ariaMultiLine:ge,ariaMultiSelectable:ge,ariaOrientation:null,ariaOwns:Jt,ariaPlaceholder:null,ariaPosInSet:ft,ariaPressed:ge,ariaReadOnly:ge,ariaRelevant:null,ariaRequired:ge,ariaRoleDescription:Jt,ariaRowCount:ft,ariaRowIndex:ft,ariaRowSpan:ft,ariaSelected:ge,ariaSetSize:ft,ariaSort:null,ariaValueMax:ft,ariaValueMin:ft,ariaValueNow:ft,ariaValueText:null,role:null},transform(t,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function B1(t,i){return i in t?t[i]:i}function U1(t,i){return B1(t,i.toLowerCase())}const $M=Dl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:El,acceptCharset:Jt,accessKey:Jt,action:null,allow:null,allowFullScreen:Mt,allowPaymentRequest:Mt,allowUserMedia:Mt,alt:null,as:null,async:Mt,autoCapitalize:null,autoComplete:Jt,autoFocus:Mt,autoPlay:Mt,blocking:Jt,capture:null,charSet:null,checked:Mt,cite:null,className:Jt,cols:ft,colSpan:null,content:null,contentEditable:ge,controls:Mt,controlsList:Jt,coords:ft|El,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Mt,defer:Mt,dir:null,dirName:null,disabled:Mt,download:$d,draggable:ge,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Mt,formTarget:null,headers:Jt,height:ft,hidden:$d,high:ft,href:null,hrefLang:null,htmlFor:Jt,httpEquiv:Jt,id:null,imageSizes:null,imageSrcSet:null,inert:Mt,inputMode:null,integrity:null,is:null,isMap:Mt,itemId:null,itemProp:Jt,itemRef:Jt,itemScope:Mt,itemType:Jt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Mt,low:ft,manifest:null,max:null,maxLength:ft,media:null,method:null,min:null,minLength:ft,multiple:Mt,muted:Mt,name:null,nonce:null,noModule:Mt,noValidate:Mt,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:Mt,optimum:ft,pattern:null,ping:Jt,placeholder:null,playsInline:Mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Mt,referrerPolicy:null,rel:Jt,required:Mt,reversed:Mt,rows:ft,rowSpan:ft,sandbox:Jt,scope:null,scoped:Mt,seamless:Mt,selected:Mt,shadowRootClonable:Mt,shadowRootDelegatesFocus:Mt,shadowRootMode:null,shape:null,size:ft,sizes:null,slot:null,span:ft,spellCheck:ge,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ft,step:null,style:null,tabIndex:ft,target:null,title:null,translate:null,type:null,typeMustMatch:Mt,useMap:null,value:ge,width:ft,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Jt,axis:null,background:null,bgColor:null,border:ft,borderColor:null,bottomMargin:ft,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Mt,declare:Mt,event:null,face:null,frame:null,frameBorder:null,hSpace:ft,leftMargin:ft,link:null,longDesc:null,lowSrc:null,marginHeight:ft,marginWidth:ft,noResize:Mt,noHref:Mt,noShade:Mt,noWrap:Mt,object:null,profile:null,prompt:null,rev:null,rightMargin:ft,rules:null,scheme:null,scrolling:ge,standby:null,summary:null,text:null,topMargin:ft,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ft,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Mt,disableRemotePlayback:Mt,prefix:null,property:null,results:ft,security:null,unselectable:null},space:"html",transform:U1}),PM=Dl({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:ln,accentHeight:ft,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ft,amplitude:ft,arabicForm:null,ascent:ft,attributeName:null,attributeType:null,azimuth:ft,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ft,by:null,calcMode:null,capHeight:ft,className:Jt,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:ft,diffuseConstant:ft,direction:null,display:null,dur:null,divisor:ft,dominantBaseline:null,download:Mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:ft,enableBackground:null,end:null,event:null,exponent:ft,externalResourcesRequired:null,fill:null,fillOpacity:ft,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:El,g2:El,glyphName:El,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ft,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ft,horizOriginX:ft,horizOriginY:ft,id:null,ideographic:ft,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ft,k:ft,k1:ft,k2:ft,k3:ft,k4:ft,kernelMatrix:ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ft,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:ft,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:ft,overlineThickness:ft,paintOrder:null,panose1:null,path:null,pathLength:ft,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Jt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ft,pointsAtY:ft,pointsAtZ:ft,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ln,rev:ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ln,requiredFeatures:ln,requiredFonts:ln,requiredFormats:ln,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:ft,specularExponent:ft,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ft,strikethroughThickness:ft,string:null,stroke:null,strokeDashArray:ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ft,strokeOpacity:ft,strokeWidth:null,style:null,surfaceScale:ft,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ln,tabIndex:ft,tableValues:null,target:null,targetX:ft,targetY:ft,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ft,underlineThickness:ft,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ft,values:null,vAlphabetic:ft,vMathematical:ft,vectorEffect:null,vHanging:ft,vIdeographic:ft,version:null,vertAdvY:ft,vertOriginX:ft,vertOriginY:ft,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ft,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:B1}),q1=Dl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,i){return"xlink:"+i.slice(5).toLowerCase()}}),V1=Dl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:U1}),I1=Dl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,i){return"xml:"+i.slice(3).toLowerCase()}}),JM={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"},WM=/[A-Z]/g,ix=/-[a-z]/g,t3=/^data[-\w.:]+$/i;function e3(t,i){const r=Kd(i);let a=i,s=Fe;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&t3.test(i)){if(i.charAt(4)==="-"){const u=i.slice(5).replace(ix,i3);a="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=i.slice(4);if(!ix.test(u)){let c=u.replace(WM,n3);c.charAt(0)!=="-"&&(c="-"+c),i="data"+c}}s=Th}return new s(a,i)}function n3(t){return"-"+t.toLowerCase()}function i3(t){return t.charAt(1).toUpperCase()}const r3=H1([L1,$M,q1,V1,I1],"html"),Ah=H1([L1,PM,q1,V1,I1],"svg");function l3(t){return t.join(" ").trim()}var yl={},md,rx;function a3(){if(rx)return md;rx=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,m=`
16
+ `,h="/",g="*",y="",x="comment",v="declaration";function S(M,C){if(typeof M!="string")throw new TypeError("First argument must be a string");if(!M)return[];C=C||{};var j=1,w=1;function k(R){var U=R.match(i);U&&(j+=U.length);var z=R.lastIndexOf(m);w=~z?R.length-z:w+R.length}function I(){var R={line:j,column:w};return function(U){return U.position=new D(R),Z(),U}}function D(R){this.start=R,this.end={line:j,column:w},this.source=C.source}D.prototype.content=M;function H(R){var U=new Error(C.source+":"+j+":"+w+": "+R);if(U.reason=R,U.filename=C.source,U.line=j,U.column=w,U.source=M,!C.silent)throw U}function G(R){var U=R.exec(M);if(U){var z=U[0];return k(z),M=M.slice(z.length),U}}function Z(){G(r)}function lt(R){var U;for(R=R||[];U=L();)U!==!1&&R.push(U);return R}function L(){var R=I();if(!(h!=M.charAt(0)||g!=M.charAt(1))){for(var U=2;y!=M.charAt(U)&&(g!=M.charAt(U)||h!=M.charAt(U+1));)++U;if(U+=2,y===M.charAt(U-1))return H("End of comment missing");var z=M.slice(2,U-2);return w+=2,k(z),M=M.slice(U),w+=2,R({type:x,comment:z})}}function Q(){var R=I(),U=G(a);if(U){if(L(),!G(s))return H("property missing ':'");var z=G(u),B=R({type:v,property:_(U[0].replace(t,y)),value:z?_(z[0].replace(t,y)):y});return G(c),B}}function et(){var R=[];lt(R);for(var U;U=Q();)U!==!1&&(R.push(U),lt(R));return R}return Z(),et()}function _(M){return M?M.replace(d,y):y}return md=S,md}var lx;function o3(){if(lx)return yl;lx=1;var t=yl&&yl.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(yl,"__esModule",{value:!0}),yl.default=r;const i=t(a3());function r(a,s){let u=null;if(!a||typeof a!="string")return u;const c=(0,i.default)(a),d=typeof s=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:h,value:g}=m;d?s(h,g,m):g&&(u=u||{},u[h]=g)}),u}return yl}var Da={},ax;function s3(){if(ax)return Da;ax=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,u=function(h){return!h||r.test(h)||t.test(h)},c=function(h,g){return g.toUpperCase()},d=function(h,g){return"".concat(g,"-")},m=function(h,g){return g===void 0&&(g={}),u(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(s,d):h=h.replace(a,d),h.replace(i,c))};return Da.camelCase=m,Da}var ka,ox;function u3(){if(ox)return ka;ox=1;var t=ka&&ka.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},i=t(o3()),r=s3();function a(s,u){var c={};return!s||typeof s!="string"||(0,i.default)(s,function(d,m){d&&m&&(c[(0,r.camelCase)(d,u)]=m)}),c}return a.default=a,ka=a,ka}var c3=u3();const f3=yu(c3),Y1=Q1("end"),Mh=Q1("start");function Q1(t){return i;function i(r){const a=r&&r.position&&r.position[t]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function d3(t){const i=Mh(t),r=Y1(t);if(i&&r)return{start:i,end:r}}function qa(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?sx(t.position):"start"in t||"end"in t?sx(t):"line"in t||"column"in t?Jd(t):""}function Jd(t){return ux(t&&t.line)+":"+ux(t&&t.column)}function sx(t){return Jd(t&&t.start)+"-"+Jd(t&&t.end)}function ux(t){return t&&typeof t=="number"?t:1}class De extends Error{constructor(i,r,a){super(),typeof r=="string"&&(a=r,r=void 0);let s="",u={},c=!1;if(r&&("line"in r&&"column"in r?u={place:r}:"start"in r&&"end"in r?u={place:r}:"type"in r?u={ancestors:[r],place:r.position}:u={...r}),typeof i=="string"?s=i:!u.cause&&i&&(c=!0,s=i.message,u.cause=i),!u.ruleId&&!u.source&&typeof a=="string"){const m=a.indexOf(":");m===-1?u.ruleId=a:(u.source=a.slice(0,m),u.ruleId=a.slice(m+1))}if(!u.place&&u.ancestors&&u.ancestors){const m=u.ancestors[u.ancestors.length-1];m&&(u.place=m.position)}const d=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=qa(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}De.prototype.file="";De.prototype.name="";De.prototype.reason="";De.prototype.message="";De.prototype.stack="";De.prototype.column=void 0;De.prototype.line=void 0;De.prototype.ancestors=void 0;De.prototype.cause=void 0;De.prototype.fatal=void 0;De.prototype.place=void 0;De.prototype.ruleId=void 0;De.prototype.source=void 0;const zh={}.hasOwnProperty,h3=new Map,p3=/[A-Z]/g,m3=new Set(["table","tbody","thead","tfoot","tr"]),g3=new Set(["td","th"]),X1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function y3(t,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=i.filePath||void 0;let a;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=_3(r,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=C3(r,i.jsx,i.jsxs)}const s={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:a,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?Ah:r3,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},u=G1(s,t,void 0);return u&&typeof u!="string"?u:s.create(t,s.Fragment,{children:u||void 0},void 0)}function G1(t,i,r){if(i.type==="element")return x3(t,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return v3(t,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return S3(t,i,r);if(i.type==="mdxjsEsm")return b3(t,i);if(i.type==="root")return w3(t,i,r);if(i.type==="text")return E3(t,i)}function x3(t,i,r){const a=t.schema;let s=a;i.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=Ah,t.schema=s),t.ancestors.push(i);const u=F1(t,i.tagName,!1),c=N3(t,i);let d=Dh(t,i);return m3.has(i.tagName)&&(d=d.filter(function(m){return typeof m=="string"?!FM(m):!0})),Z1(t,c,u,i),Oh(c,d),t.ancestors.pop(),t.schema=a,t.create(i,u,c,r)}function v3(t,i){if(i.data&&i.data.estree&&t.evaluater){const a=i.data.estree.body[0];return a.type,t.evaluater.evaluateExpression(a.expression)}to(t,i.position)}function b3(t,i){if(i.data&&i.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(i.data.estree);to(t,i.position)}function S3(t,i,r){const a=t.schema;let s=a;i.name==="svg"&&a.space==="html"&&(s=Ah,t.schema=s),t.ancestors.push(i);const u=i.name===null?t.Fragment:F1(t,i.name,!0),c=T3(t,i),d=Dh(t,i);return Z1(t,c,u,i),Oh(c,d),t.ancestors.pop(),t.schema=a,t.create(i,u,c,r)}function w3(t,i,r){const a={};return Oh(a,Dh(t,i)),t.create(i,t.Fragment,a,r)}function E3(t,i){return i.value}function Z1(t,i,r,a){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(i.node=a)}function Oh(t,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(t.children=r)}}function C3(t,i,r){return a;function a(s,u,c,d){const h=Array.isArray(c.children)?r:i;return d?h(u,c,d):h(u,c)}}function _3(t,i){return r;function r(a,s,u,c){const d=Array.isArray(u.children),m=Mh(a);return i(s,u,c,d,{columnNumber:m?m.column-1:void 0,fileName:t,lineNumber:m?m.line:void 0},void 0)}}function N3(t,i){const r={};let a,s;for(s in i.properties)if(s!=="children"&&zh.call(i.properties,s)){const u=A3(t,s,i.properties[s]);if(u){const[c,d]=u;t.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&g3.has(i.tagName)?a=d:r[c]=d}}if(a){const u=r.style||(r.style={});u[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return r}function T3(t,i){const r={};for(const a of i.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&t.evaluater){const u=a.data.estree.body[0];u.type;const c=u.expression;c.type;const d=c.properties[0];d.type,Object.assign(r,t.evaluater.evaluateExpression(d.argument))}else to(t,i.position);else{const s=a.name;let u;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&t.evaluater){const d=a.value.data.estree.body[0];d.type,u=t.evaluater.evaluateExpression(d.expression)}else to(t,i.position);else u=a.value===null?!0:a.value;r[s]=u}return r}function Dh(t,i){const r=[];let a=-1;const s=t.passKeys?new Map:h3;for(;++a<i.children.length;){const u=i.children[a];let c;if(t.passKeys){const m=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(m){const h=s.get(m)||0;c=m+"-"+h,s.set(m,h+1)}}const d=G1(t,u,c);d!==void 0&&r.push(d)}return r}function A3(t,i,r){const a=e3(t.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=a.commaSeparated?YM(r):l3(r)),a.property==="style"){let s=typeof r=="object"?r:M3(t,String(r));return t.stylePropertyNameCase==="css"&&(s=z3(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&a.space?JM[a.property]||a.property:a.attribute,r]}}function M3(t,i){try{return f3(i,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const a=r,s=new De("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=X1+"#cannot-parse-style-attribute",s}}function F1(t,i,r){let a;if(!r)a={type:"Literal",value:i};else if(i.includes(".")){const s=i.split(".");let u=-1,c;for(;++u<s.length;){const d=tx(s[u])?{type:"Identifier",name:s[u]}:{type:"Literal",value:s[u]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(u&&d.type==="Literal"),optional:!1}:d}a=c}else a=tx(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(a.type==="Literal"){const s=a.value;return zh.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(a);to(t)}function to(t,i){const r=new De("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=X1+"#cannot-handle-mdx-estrees-without-createevaluater",r}function z3(t){const i={};let r;for(r in t)zh.call(t,r)&&(i[O3(r)]=t[r]);return i}function O3(t){let i=t.replace(p3,D3);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function D3(t){return"-"+t.toLowerCase()}const gd={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"]},k3={};function R3(t,i){const r=k3,a=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,s=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return K1(t,a,s)}function K1(t,i,r){if(j3(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(i&&"alt"in t&&t.alt)return t.alt;if("children"in t)return cx(t.children,i,r)}return Array.isArray(t)?cx(t,i,r):""}function cx(t,i,r){const a=[];let s=-1;for(;++s<t.length;)a[s]=K1(t[s],i,r);return a.join("")}function j3(t){return!!(t&&typeof t=="object")}const fx=document.createElement("i");function kh(t){const i="&"+t+";";fx.innerHTML=i;const r=fx.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===i?!1:r}function Vn(t,i,r,a){const s=t.length;let u=0,c;if(i<0?i=-i>s?0:s+i:i=i>s?s:i,r=r>0?r:0,a.length<1e4)c=Array.from(a),c.unshift(i,r),t.splice(...c);else for(r&&t.splice(i,r);u<a.length;)c=a.slice(u,u+1e4),c.unshift(i,0),t.splice(...c),u+=1e4,i+=1e4}function xn(t,i){return t.length>0?(Vn(t,t.length,0,i),t):i}const dx={}.hasOwnProperty;function H3(t){const i={};let r=-1;for(;++r<t.length;)L3(i,t[r]);return i}function L3(t,i){let r;for(r in i){const s=(dx.call(t,r)?t[r]:void 0)||(t[r]={}),u=i[r];let c;if(u)for(c in u){dx.call(s,c)||(s[c]=[]);const d=u[c];B3(s[c],Array.isArray(d)?d:d?[d]:[])}}}function B3(t,i){let r=-1;const a=[];for(;++r<i.length;)(i[r].add==="after"?t:a).push(i[r]);Vn(t,0,0,a)}function $1(t,i){const r=Number.parseInt(t,i);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Cl(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Bn=Pi(/[A-Za-z]/),on=Pi(/[\dA-Za-z]/),U3=Pi(/[#-'*+\--9=?A-Z^-~]/);function Wd(t){return t!==null&&(t<32||t===127)}const th=Pi(/\d/),q3=Pi(/[\dA-Fa-f]/),V3=Pi(/[!-/:-@[-`{-~]/);function _t(t){return t!==null&&t<-2}function Ze(t){return t!==null&&(t<0||t===32)}function Qt(t){return t===-2||t===-1||t===32}const I3=Pi(new RegExp("\\p{P}|\\p{S}","u")),Y3=Pi(/\s/);function Pi(t){return i;function i(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function kl(t){const i=[];let r=-1,a=0,s=0;for(;++r<t.length;){const u=t.charCodeAt(r);let c="";if(u===37&&on(t.charCodeAt(r+1))&&on(t.charCodeAt(r+2)))s=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const d=t.charCodeAt(r+1);u<56320&&d>56319&&d<57344?(c=String.fromCharCode(u,d),s=1):c="�"}else c=String.fromCharCode(u);c&&(i.push(t.slice(a,r),encodeURIComponent(c)),a=r+s+1,c=""),s&&(r+=s,s=0)}return i.join("")+t.slice(a)}function Wt(t,i,r,a){const s=a?a-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(m){return Qt(m)?(t.enter(r),d(m)):i(m)}function d(m){return Qt(m)&&u++<s?(t.consume(m),d):(t.exit(r),i(m))}}const Q3={tokenize:X3};function X3(t){const i=t.attempt(this.parser.constructs.contentInitial,a,s);let r;return i;function a(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Wt(t,i,"linePrefix")}function s(d){return t.enter("paragraph"),u(d)}function u(d){const m=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=m),r=m,c(d)}function c(d){if(d===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(d);return}return _t(d)?(t.consume(d),t.exit("chunkText"),u):(t.consume(d),c)}}const G3={tokenize:Z3},hx={tokenize:F3};function Z3(t){const i=this,r=[];let a=0,s,u,c;return d;function d(w){if(a<r.length){const k=r[a];return i.containerState=k[1],t.attempt(k[0].continuation,m,h)(w)}return h(w)}function m(w){if(a++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,s&&j();const k=i.events.length;let I=k,D;for(;I--;)if(i.events[I][0]==="exit"&&i.events[I][1].type==="chunkFlow"){D=i.events[I][1].end;break}C(a);let H=k;for(;H<i.events.length;)i.events[H][1].end={...D},H++;return Vn(i.events,I+1,0,i.events.slice(k)),i.events.length=H,h(w)}return d(w)}function h(w){if(a===r.length){if(!s)return x(w);if(s.currentConstruct&&s.currentConstruct.concrete)return S(w);i.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return i.containerState={},t.check(hx,g,y)(w)}function g(w){return s&&j(),C(a),x(w)}function y(w){return i.parser.lazy[i.now().line]=a!==r.length,c=i.now().offset,S(w)}function x(w){return i.containerState={},t.attempt(hx,v,S)(w)}function v(w){return a++,r.push([i.currentConstruct,i.containerState]),x(w)}function S(w){if(w===null){s&&j(),C(0),t.consume(w);return}return s=s||i.parser.flow(i.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:u}),_(w)}function _(w){if(w===null){M(t.exit("chunkFlow"),!0),C(0),t.consume(w);return}return _t(w)?(t.consume(w),M(t.exit("chunkFlow")),a=0,i.interrupt=void 0,d):(t.consume(w),_)}function M(w,k){const I=i.sliceStream(w);if(k&&I.push(null),w.previous=u,u&&(u.next=w),u=w,s.defineSkip(w.start),s.write(I),i.parser.lazy[w.start.line]){let D=s.events.length;for(;D--;)if(s.events[D][1].start.offset<c&&(!s.events[D][1].end||s.events[D][1].end.offset>c))return;const H=i.events.length;let G=H,Z,lt;for(;G--;)if(i.events[G][0]==="exit"&&i.events[G][1].type==="chunkFlow"){if(Z){lt=i.events[G][1].end;break}Z=!0}for(C(a),D=H;D<i.events.length;)i.events[D][1].end={...lt},D++;Vn(i.events,G+1,0,i.events.slice(H)),i.events.length=D}}function C(w){let k=r.length;for(;k-- >w;){const I=r[k];i.containerState=I[1],I[0].exit.call(i,t)}r.length=w}function j(){s.write([null]),u=void 0,s=void 0,i.containerState._closeFlow=void 0}}function F3(t,i,r){return Wt(t,t.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function px(t){if(t===null||Ze(t)||Y3(t))return 1;if(I3(t))return 2}function Rh(t,i,r){const a=[];let s=-1;for(;++s<t.length;){const u=t[s].resolveAll;u&&!a.includes(u)&&(i=u(i,r),a.push(u))}return i}const eh={name:"attention",resolveAll:K3,tokenize:$3};function K3(t,i){let r=-1,a,s,u,c,d,m,h,g;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(a=r;a--;)if(t[a][0]==="exit"&&t[a][1].type==="attentionSequence"&&t[a][1]._open&&i.sliceSerialize(t[a][1]).charCodeAt(0)===i.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[a][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[a][1].end.offset-t[a][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;m=t[a][1].end.offset-t[a][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const y={...t[a][1].end},x={...t[r][1].start};mx(y,-m),mx(x,m),c={type:m>1?"strongSequence":"emphasisSequence",start:y,end:{...t[a][1].end}},d={type:m>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:x},u={type:m>1?"strongText":"emphasisText",start:{...t[a][1].end},end:{...t[r][1].start}},s={type:m>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},t[a][1].end={...c.start},t[r][1].start={...d.end},h=[],t[a][1].end.offset-t[a][1].start.offset&&(h=xn(h,[["enter",t[a][1],i],["exit",t[a][1],i]])),h=xn(h,[["enter",s,i],["enter",c,i],["exit",c,i],["enter",u,i]]),h=xn(h,Rh(i.parser.constructs.insideSpan.null,t.slice(a+1,r),i)),h=xn(h,[["exit",u,i],["enter",d,i],["exit",d,i],["exit",s,i]]),t[r][1].end.offset-t[r][1].start.offset?(g=2,h=xn(h,[["enter",t[r][1],i],["exit",t[r][1],i]])):g=0,Vn(t,a-1,r-a+3,h),r=a+h.length-g-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function $3(t,i){const r=this.parser.constructs.attentionMarkers.null,a=this.previous,s=px(a);let u;return c;function c(m){return u=m,t.enter("attentionSequence"),d(m)}function d(m){if(m===u)return t.consume(m),d;const h=t.exit("attentionSequence"),g=px(m),y=!g||g===2&&s||r.includes(m),x=!s||s===2&&g||r.includes(a);return h._open=!!(u===42?y:y&&(s||!x)),h._close=!!(u===42?x:x&&(g||!y)),i(m)}}function mx(t,i){t.column+=i,t.offset+=i,t._bufferIndex+=i}const P3={name:"autolink",tokenize:J3};function J3(t,i,r){let a=0;return s;function s(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),u}function u(v){return Bn(v)?(t.consume(v),c):v===64?r(v):h(v)}function c(v){return v===43||v===45||v===46||on(v)?(a=1,d(v)):h(v)}function d(v){return v===58?(t.consume(v),a=0,m):(v===43||v===45||v===46||on(v))&&a++<32?(t.consume(v),d):(a=0,h(v))}function m(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),i):v===null||v===32||v===60||Wd(v)?r(v):(t.consume(v),m)}function h(v){return v===64?(t.consume(v),g):U3(v)?(t.consume(v),h):r(v)}function g(v){return on(v)?y(v):r(v)}function y(v){return v===46?(t.consume(v),a=0,g):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),i):x(v)}function x(v){if((v===45||on(v))&&a++<63){const S=v===45?x:y;return t.consume(v),S}return r(v)}}const Du={partial:!0,tokenize:W3};function W3(t,i,r){return a;function a(u){return Qt(u)?Wt(t,s,"linePrefix")(u):s(u)}function s(u){return u===null||_t(u)?i(u):r(u)}}const P1={continuation:{tokenize:ez},exit:nz,name:"blockQuote",tokenize:tz};function tz(t,i,r){const a=this;return s;function s(c){if(c===62){const d=a.containerState;return d.open||(t.enter("blockQuote",{_container:!0}),d.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),u}return r(c)}function u(c){return Qt(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),i):(t.exit("blockQuotePrefix"),i(c))}}function ez(t,i,r){const a=this;return s;function s(c){return Qt(c)?Wt(t,u,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return t.attempt(P1,i,r)(c)}}function nz(t){t.exit("blockQuote")}const J1={name:"characterEscape",tokenize:iz};function iz(t,i,r){return a;function a(u){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(u),t.exit("escapeMarker"),s}function s(u){return V3(u)?(t.enter("characterEscapeValue"),t.consume(u),t.exit("characterEscapeValue"),t.exit("characterEscape"),i):r(u)}}const W1={name:"characterReference",tokenize:rz};function rz(t,i,r){const a=this;let s=0,u,c;return d;function d(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),m}function m(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),h):(t.enter("characterReferenceValue"),u=31,c=on,g(y))}function h(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),u=6,c=q3,g):(t.enter("characterReferenceValue"),u=7,c=th,g(y))}function g(y){if(y===59&&s){const x=t.exit("characterReferenceValue");return c===on&&!kh(a.sliceSerialize(x))?r(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),i)}return c(y)&&s++<u?(t.consume(y),g):r(y)}}const gx={partial:!0,tokenize:az},yx={concrete:!0,name:"codeFenced",tokenize:lz};function lz(t,i,r){const a=this,s={partial:!0,tokenize:I};let u=0,c=0,d;return m;function m(D){return h(D)}function h(D){const H=a.events[a.events.length-1];return u=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,d=D,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),g(D)}function g(D){return D===d?(c++,t.consume(D),g):c<3?r(D):(t.exit("codeFencedFenceSequence"),Qt(D)?Wt(t,y,"whitespace")(D):y(D))}function y(D){return D===null||_t(D)?(t.exit("codeFencedFence"),a.interrupt?i(D):t.check(gx,_,k)(D)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),x(D))}function x(D){return D===null||_t(D)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(D)):Qt(D)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Wt(t,v,"whitespace")(D)):D===96&&D===d?r(D):(t.consume(D),x)}function v(D){return D===null||_t(D)?y(D):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),S(D))}function S(D){return D===null||_t(D)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(D)):D===96&&D===d?r(D):(t.consume(D),S)}function _(D){return t.attempt(s,k,M)(D)}function M(D){return t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),C}function C(D){return u>0&&Qt(D)?Wt(t,j,"linePrefix",u+1)(D):j(D)}function j(D){return D===null||_t(D)?t.check(gx,_,k)(D):(t.enter("codeFlowValue"),w(D))}function w(D){return D===null||_t(D)?(t.exit("codeFlowValue"),j(D)):(t.consume(D),w)}function k(D){return t.exit("codeFenced"),i(D)}function I(D,H,G){let Z=0;return lt;function lt(U){return D.enter("lineEnding"),D.consume(U),D.exit("lineEnding"),L}function L(U){return D.enter("codeFencedFence"),Qt(U)?Wt(D,Q,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):Q(U)}function Q(U){return U===d?(D.enter("codeFencedFenceSequence"),et(U)):G(U)}function et(U){return U===d?(Z++,D.consume(U),et):Z>=c?(D.exit("codeFencedFenceSequence"),Qt(U)?Wt(D,R,"whitespace")(U):R(U)):G(U)}function R(U){return U===null||_t(U)?(D.exit("codeFencedFence"),H(U)):G(U)}}}function az(t,i,r){const a=this;return s;function s(c){return c===null?r(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u)}function u(c){return a.parser.lazy[a.now().line]?r(c):i(c)}}const yd={name:"codeIndented",tokenize:sz},oz={partial:!0,tokenize:uz};function sz(t,i,r){const a=this;return s;function s(h){return t.enter("codeIndented"),Wt(t,u,"linePrefix",5)(h)}function u(h){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(h):r(h)}function c(h){return h===null?m(h):_t(h)?t.attempt(oz,c,m)(h):(t.enter("codeFlowValue"),d(h))}function d(h){return h===null||_t(h)?(t.exit("codeFlowValue"),c(h)):(t.consume(h),d)}function m(h){return t.exit("codeIndented"),i(h)}}function uz(t,i,r){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?r(c):_t(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):Wt(t,u,"linePrefix",5)(c)}function u(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(c):_t(c)?s(c):r(c)}}const cz={name:"codeText",previous:dz,resolve:fz,tokenize:hz};function fz(t){let i=t.length-4,r=3,a,s;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[i][1].type==="lineEnding"||t[i][1].type==="space")){for(a=r;++a<i;)if(t[a][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[i][1].type="codeTextPadding",r+=2,i-=2;break}}for(a=r-1,i++;++a<=i;)s===void 0?a!==i&&t[a][1].type!=="lineEnding"&&(s=a):(a===i||t[a][1].type==="lineEnding")&&(t[s][1].type="codeTextData",a!==s+2&&(t[s][1].end=t[a-1][1].end,t.splice(s+2,a-s-2),i-=a-s-2,a=s+2),s=void 0);return t}function dz(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function hz(t,i,r){let a=0,s,u;return c;function c(y){return t.enter("codeText"),t.enter("codeTextSequence"),d(y)}function d(y){return y===96?(t.consume(y),a++,d):(t.exit("codeTextSequence"),m(y))}function m(y){return y===null?r(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),m):y===96?(u=t.enter("codeTextSequence"),s=0,g(y)):_t(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),m):(t.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||_t(y)?(t.exit("codeTextData"),m(y)):(t.consume(y),h)}function g(y){return y===96?(t.consume(y),s++,g):s===a?(t.exit("codeTextSequence"),t.exit("codeText"),i(y)):(u.type="codeTextData",h(y))}}class pz{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,r){const a=r??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(i,a):i>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(i,r,a){const s=r||0;this.setCursor(Math.trunc(i));const u=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&Ra(this.left,a),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),Ra(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),Ra(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const r=this.left.splice(i,Number.POSITIVE_INFINITY);Ra(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);Ra(this.left,r.reverse())}}}function Ra(t,i){let r=0;if(i.length<1e4)t.push(...i);else for(;r<i.length;)t.push(...i.slice(r,r+1e4)),r+=1e4}function tb(t){const i={};let r=-1,a,s,u,c,d,m,h;const g=new pz(t);for(;++r<g.length;){for(;r in i;)r=i[r];if(a=g.get(r),r&&a[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(m=a[1]._tokenizer.events,u=0,u<m.length&&m[u][1].type==="lineEndingBlank"&&(u+=2),u<m.length&&m[u][1].type==="content"))for(;++u<m.length&&m[u][1].type!=="content";)m[u][1].type==="chunkText"&&(m[u][1]._isInFirstContentOfListItem=!0,u++);if(a[0]==="enter")a[1].contentType&&(Object.assign(i,mz(g,r)),r=i[r],h=!0);else if(a[1]._container){for(u=r,s=void 0;u--;)if(c=g.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(g.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...g.get(s)[1].start},d=g.slice(s,r),d.unshift(a),g.splice(s,r-s+1,d))}}return Vn(t,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function mz(t,i){const r=t.get(i)[1],a=t.get(i)[2];let s=i-1;const u=[];let c=r._tokenizer;c||(c=a.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,m=[],h={};let g,y,x=-1,v=r,S=0,_=0;const M=[_];for(;v;){for(;t.get(++s)[1]!==v;);u.push(s),v._tokenizer||(g=a.sliceStream(v),v.next||g.push(null),y&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=v,v=v.next}for(v=r;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(_=x+1,M.push(_),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):M.pop(),x=M.length;x--;){const C=d.slice(M[x],M[x+1]),j=u.pop();m.push([j,j+C.length-1]),t.splice(j,2,C)}for(m.reverse(),x=-1;++x<m.length;)h[S+m[x][0]]=S+m[x][1],S+=m[x][1]-m[x][0]-1;return h}const gz={resolve:xz,tokenize:vz},yz={partial:!0,tokenize:bz};function xz(t){return tb(t),t}function vz(t,i){let r;return a;function a(d){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?u(d):_t(d)?t.check(yz,c,u)(d):(t.consume(d),s)}function u(d){return t.exit("chunkContent"),t.exit("content"),i(d)}function c(d){return t.consume(d),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,s}}function bz(t,i,r){const a=this;return s;function s(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Wt(t,u,"linePrefix")}function u(c){if(c===null||_t(c))return r(c);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(c):t.interrupt(a.parser.constructs.flow,r,i)(c)}}function eb(t,i,r,a,s,u,c,d,m){const h=m||Number.POSITIVE_INFINITY;let g=0;return y;function y(C){return C===60?(t.enter(a),t.enter(s),t.enter(u),t.consume(C),t.exit(u),x):C===null||C===32||C===41||Wd(C)?r(C):(t.enter(a),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),_(C))}function x(C){return C===62?(t.enter(u),t.consume(C),t.exit(u),t.exit(s),t.exit(a),i):(t.enter(d),t.enter("chunkString",{contentType:"string"}),v(C))}function v(C){return C===62?(t.exit("chunkString"),t.exit(d),x(C)):C===null||C===60||_t(C)?r(C):(t.consume(C),C===92?S:v)}function S(C){return C===60||C===62||C===92?(t.consume(C),v):v(C)}function _(C){return!g&&(C===null||C===41||Ze(C))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(a),i(C)):g<h&&C===40?(t.consume(C),g++,_):C===41?(t.consume(C),g--,_):C===null||C===32||C===40||Wd(C)?r(C):(t.consume(C),C===92?M:_)}function M(C){return C===40||C===41||C===92?(t.consume(C),_):_(C)}}function nb(t,i,r,a,s,u){const c=this;let d=0,m;return h;function h(v){return t.enter(a),t.enter(s),t.consume(v),t.exit(s),t.enter(u),g}function g(v){return d>999||v===null||v===91||v===93&&!m||v===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?r(v):v===93?(t.exit(u),t.enter(s),t.consume(v),t.exit(s),t.exit(a),i):_t(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),g):(t.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||_t(v)||d++>999?(t.exit("chunkString"),g(v)):(t.consume(v),m||(m=!Qt(v)),v===92?x:y)}function x(v){return v===91||v===92||v===93?(t.consume(v),d++,y):y(v)}}function ib(t,i,r,a,s,u){let c;return d;function d(x){return x===34||x===39||x===40?(t.enter(a),t.enter(s),t.consume(x),t.exit(s),c=x===40?41:x,m):r(x)}function m(x){return x===c?(t.enter(s),t.consume(x),t.exit(s),t.exit(a),i):(t.enter(u),h(x))}function h(x){return x===c?(t.exit(u),m(c)):x===null?r(x):_t(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),Wt(t,h,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===c||x===null||_t(x)?(t.exit("chunkString"),h(x)):(t.consume(x),x===92?y:g)}function y(x){return x===c||x===92?(t.consume(x),g):g(x)}}function Va(t,i){let r;return a;function a(s){return _t(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),r=!0,a):Qt(s)?Wt(t,a,r?"linePrefix":"lineSuffix")(s):i(s)}}const Sz={name:"definition",tokenize:Ez},wz={partial:!0,tokenize:Cz};function Ez(t,i,r){const a=this;let s;return u;function u(v){return t.enter("definition"),c(v)}function c(v){return nb.call(a,t,d,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function d(v){return s=Cl(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),m):r(v)}function m(v){return Ze(v)?Va(t,h)(v):h(v)}function h(v){return eb(t,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return t.attempt(wz,y,y)(v)}function y(v){return Qt(v)?Wt(t,x,"whitespace")(v):x(v)}function x(v){return v===null||_t(v)?(t.exit("definition"),a.parser.defined.push(s),i(v)):r(v)}}function Cz(t,i,r){return a;function a(d){return Ze(d)?Va(t,s)(d):r(d)}function s(d){return ib(t,u,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function u(d){return Qt(d)?Wt(t,c,"whitespace")(d):c(d)}function c(d){return d===null||_t(d)?i(d):r(d)}}const _z={name:"hardBreakEscape",tokenize:Nz};function Nz(t,i,r){return a;function a(u){return t.enter("hardBreakEscape"),t.consume(u),s}function s(u){return _t(u)?(t.exit("hardBreakEscape"),i(u)):r(u)}}const Tz={name:"headingAtx",resolve:Az,tokenize:Mz};function Az(t,i){let r=t.length-2,a=3,s,u;return t[a][1].type==="whitespace"&&(a+=2),r-2>a&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(a===r-1||r-4>a&&t[r-2][1].type==="whitespace")&&(r-=a+1===r?2:4),r>a&&(s={type:"atxHeadingText",start:t[a][1].start,end:t[r][1].end},u={type:"chunkText",start:t[a][1].start,end:t[r][1].end,contentType:"text"},Vn(t,a,r-a+1,[["enter",s,i],["enter",u,i],["exit",u,i],["exit",s,i]])),t}function Mz(t,i,r){let a=0;return s;function s(g){return t.enter("atxHeading"),u(g)}function u(g){return t.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(t.consume(g),c):g===null||Ze(g)?(t.exit("atxHeadingSequence"),d(g)):r(g)}function d(g){return g===35?(t.enter("atxHeadingSequence"),m(g)):g===null||_t(g)?(t.exit("atxHeading"),i(g)):Qt(g)?Wt(t,d,"whitespace")(g):(t.enter("atxHeadingText"),h(g))}function m(g){return g===35?(t.consume(g),m):(t.exit("atxHeadingSequence"),d(g))}function h(g){return g===null||g===35||Ze(g)?(t.exit("atxHeadingText"),d(g)):(t.consume(g),h)}}const zz=["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"],xx=["pre","script","style","textarea"],Oz={concrete:!0,name:"htmlFlow",resolveTo:Rz,tokenize:jz},Dz={partial:!0,tokenize:Lz},kz={partial:!0,tokenize:Hz};function Rz(t){let i=t.length;for(;i--&&!(t[i][0]==="enter"&&t[i][1].type==="htmlFlow"););return i>1&&t[i-2][1].type==="linePrefix"&&(t[i][1].start=t[i-2][1].start,t[i+1][1].start=t[i-2][1].start,t.splice(i-2,2)),t}function jz(t,i,r){const a=this;let s,u,c,d,m;return h;function h(T){return g(T)}function g(T){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(T),y}function y(T){return T===33?(t.consume(T),x):T===47?(t.consume(T),u=!0,_):T===63?(t.consume(T),s=3,a.interrupt?i:A):Bn(T)?(t.consume(T),c=String.fromCharCode(T),M):r(T)}function x(T){return T===45?(t.consume(T),s=2,v):T===91?(t.consume(T),s=5,d=0,S):Bn(T)?(t.consume(T),s=4,a.interrupt?i:A):r(T)}function v(T){return T===45?(t.consume(T),a.interrupt?i:A):r(T)}function S(T){const nt="CDATA[";return T===nt.charCodeAt(d++)?(t.consume(T),d===nt.length?a.interrupt?i:Q:S):r(T)}function _(T){return Bn(T)?(t.consume(T),c=String.fromCharCode(T),M):r(T)}function M(T){if(T===null||T===47||T===62||Ze(T)){const nt=T===47,ut=c.toLowerCase();return!nt&&!u&&xx.includes(ut)?(s=1,a.interrupt?i(T):Q(T)):zz.includes(c.toLowerCase())?(s=6,nt?(t.consume(T),C):a.interrupt?i(T):Q(T)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?r(T):u?j(T):w(T))}return T===45||on(T)?(t.consume(T),c+=String.fromCharCode(T),M):r(T)}function C(T){return T===62?(t.consume(T),a.interrupt?i:Q):r(T)}function j(T){return Qt(T)?(t.consume(T),j):lt(T)}function w(T){return T===47?(t.consume(T),lt):T===58||T===95||Bn(T)?(t.consume(T),k):Qt(T)?(t.consume(T),w):lt(T)}function k(T){return T===45||T===46||T===58||T===95||on(T)?(t.consume(T),k):I(T)}function I(T){return T===61?(t.consume(T),D):Qt(T)?(t.consume(T),I):w(T)}function D(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(t.consume(T),m=T,H):Qt(T)?(t.consume(T),D):G(T)}function H(T){return T===m?(t.consume(T),m=null,Z):T===null||_t(T)?r(T):(t.consume(T),H)}function G(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Ze(T)?I(T):(t.consume(T),G)}function Z(T){return T===47||T===62||Qt(T)?w(T):r(T)}function lt(T){return T===62?(t.consume(T),L):r(T)}function L(T){return T===null||_t(T)?Q(T):Qt(T)?(t.consume(T),L):r(T)}function Q(T){return T===45&&s===2?(t.consume(T),z):T===60&&s===1?(t.consume(T),B):T===62&&s===4?(t.consume(T),O):T===63&&s===3?(t.consume(T),A):T===93&&s===5?(t.consume(T),K):_t(T)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(Dz,V,et)(T)):T===null||_t(T)?(t.exit("htmlFlowData"),et(T)):(t.consume(T),Q)}function et(T){return t.check(kz,R,V)(T)}function R(T){return t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),U}function U(T){return T===null||_t(T)?et(T):(t.enter("htmlFlowData"),Q(T))}function z(T){return T===45?(t.consume(T),A):Q(T)}function B(T){return T===47?(t.consume(T),c="",Y):Q(T)}function Y(T){if(T===62){const nt=c.toLowerCase();return xx.includes(nt)?(t.consume(T),O):Q(T)}return Bn(T)&&c.length<8?(t.consume(T),c+=String.fromCharCode(T),Y):Q(T)}function K(T){return T===93?(t.consume(T),A):Q(T)}function A(T){return T===62?(t.consume(T),O):T===45&&s===2?(t.consume(T),A):Q(T)}function O(T){return T===null||_t(T)?(t.exit("htmlFlowData"),V(T)):(t.consume(T),O)}function V(T){return t.exit("htmlFlow"),i(T)}}function Hz(t,i,r){const a=this;return s;function s(c){return _t(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u):r(c)}function u(c){return a.parser.lazy[a.now().line]?r(c):i(c)}}function Lz(t,i,r){return a;function a(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(Du,i,r)}}const Bz={name:"htmlText",tokenize:Uz};function Uz(t,i,r){const a=this;let s,u,c;return d;function d(A){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(A),m}function m(A){return A===33?(t.consume(A),h):A===47?(t.consume(A),I):A===63?(t.consume(A),w):Bn(A)?(t.consume(A),G):r(A)}function h(A){return A===45?(t.consume(A),g):A===91?(t.consume(A),u=0,S):Bn(A)?(t.consume(A),j):r(A)}function g(A){return A===45?(t.consume(A),v):r(A)}function y(A){return A===null?r(A):A===45?(t.consume(A),x):_t(A)?(c=y,B(A)):(t.consume(A),y)}function x(A){return A===45?(t.consume(A),v):y(A)}function v(A){return A===62?z(A):A===45?x(A):y(A)}function S(A){const O="CDATA[";return A===O.charCodeAt(u++)?(t.consume(A),u===O.length?_:S):r(A)}function _(A){return A===null?r(A):A===93?(t.consume(A),M):_t(A)?(c=_,B(A)):(t.consume(A),_)}function M(A){return A===93?(t.consume(A),C):_(A)}function C(A){return A===62?z(A):A===93?(t.consume(A),C):_(A)}function j(A){return A===null||A===62?z(A):_t(A)?(c=j,B(A)):(t.consume(A),j)}function w(A){return A===null?r(A):A===63?(t.consume(A),k):_t(A)?(c=w,B(A)):(t.consume(A),w)}function k(A){return A===62?z(A):w(A)}function I(A){return Bn(A)?(t.consume(A),D):r(A)}function D(A){return A===45||on(A)?(t.consume(A),D):H(A)}function H(A){return _t(A)?(c=H,B(A)):Qt(A)?(t.consume(A),H):z(A)}function G(A){return A===45||on(A)?(t.consume(A),G):A===47||A===62||Ze(A)?Z(A):r(A)}function Z(A){return A===47?(t.consume(A),z):A===58||A===95||Bn(A)?(t.consume(A),lt):_t(A)?(c=Z,B(A)):Qt(A)?(t.consume(A),Z):z(A)}function lt(A){return A===45||A===46||A===58||A===95||on(A)?(t.consume(A),lt):L(A)}function L(A){return A===61?(t.consume(A),Q):_t(A)?(c=L,B(A)):Qt(A)?(t.consume(A),L):Z(A)}function Q(A){return A===null||A===60||A===61||A===62||A===96?r(A):A===34||A===39?(t.consume(A),s=A,et):_t(A)?(c=Q,B(A)):Qt(A)?(t.consume(A),Q):(t.consume(A),R)}function et(A){return A===s?(t.consume(A),s=void 0,U):A===null?r(A):_t(A)?(c=et,B(A)):(t.consume(A),et)}function R(A){return A===null||A===34||A===39||A===60||A===61||A===96?r(A):A===47||A===62||Ze(A)?Z(A):(t.consume(A),R)}function U(A){return A===47||A===62||Ze(A)?Z(A):r(A)}function z(A){return A===62?(t.consume(A),t.exit("htmlTextData"),t.exit("htmlText"),i):r(A)}function B(A){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),Y}function Y(A){return Qt(A)?Wt(t,K,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):K(A)}function K(A){return t.enter("htmlTextData"),c(A)}}const jh={name:"labelEnd",resolveAll:Yz,resolveTo:Qz,tokenize:Xz},qz={tokenize:Gz},Vz={tokenize:Zz},Iz={tokenize:Fz};function Yz(t){let i=-1;const r=[];for(;++i<t.length;){const a=t[i][1];if(r.push(t[i]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",i+=s}}return t.length!==r.length&&Vn(t,0,t.length,r),t}function Qz(t,i){let r=t.length,a=0,s,u,c,d;for(;r--;)if(s=t[r][1],u){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[r][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(t[r][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(u=r,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=r);const m={type:t[u][1].type==="labelLink"?"link":"image",start:{...t[u][1].start},end:{...t[t.length-1][1].end}},h={type:"label",start:{...t[u][1].start},end:{...t[c][1].end}},g={type:"labelText",start:{...t[u+a+2][1].end},end:{...t[c-2][1].start}};return d=[["enter",m,i],["enter",h,i]],d=xn(d,t.slice(u+1,u+a+3)),d=xn(d,[["enter",g,i]]),d=xn(d,Rh(i.parser.constructs.insideSpan.null,t.slice(u+a+4,c-3),i)),d=xn(d,[["exit",g,i],t[c-2],t[c-1],["exit",h,i]]),d=xn(d,t.slice(c+1)),d=xn(d,[["exit",m,i]]),Vn(t,u,t.length,d),t}function Xz(t,i,r){const a=this;let s=a.events.length,u,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){u=a.events[s][1];break}return d;function d(x){return u?u._inactive?y(x):(c=a.parser.defined.includes(Cl(a.sliceSerialize({start:u.end,end:a.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(x),t.exit("labelMarker"),t.exit("labelEnd"),m):r(x)}function m(x){return x===40?t.attempt(qz,g,c?g:y)(x):x===91?t.attempt(Vz,g,c?h:y)(x):c?g(x):y(x)}function h(x){return t.attempt(Iz,g,y)(x)}function g(x){return i(x)}function y(x){return u._balanced=!0,r(x)}}function Gz(t,i,r){return a;function a(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),s}function s(y){return Ze(y)?Va(t,u)(y):u(y)}function u(y){return y===41?g(y):eb(t,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return Ze(y)?Va(t,m)(y):g(y)}function d(y){return r(y)}function m(y){return y===34||y===39||y===40?ib(t,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):g(y)}function h(y){return Ze(y)?Va(t,g)(y):g(y)}function g(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),i):r(y)}}function Zz(t,i,r){const a=this;return s;function s(d){return nb.call(a,t,u,c,"reference","referenceMarker","referenceString")(d)}function u(d){return a.parser.defined.includes(Cl(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?i(d):r(d)}function c(d){return r(d)}}function Fz(t,i,r){return a;function a(u){return t.enter("reference"),t.enter("referenceMarker"),t.consume(u),t.exit("referenceMarker"),s}function s(u){return u===93?(t.enter("referenceMarker"),t.consume(u),t.exit("referenceMarker"),t.exit("reference"),i):r(u)}}const Kz={name:"labelStartImage",resolveAll:jh.resolveAll,tokenize:$z};function $z(t,i,r){const a=this;return s;function s(d){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(d),t.exit("labelImageMarker"),u}function u(d){return d===91?(t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelImage"),c):r(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(d):i(d)}}const Pz={name:"labelStartLink",resolveAll:jh.resolveAll,tokenize:Jz};function Jz(t,i,r){const a=this;return s;function s(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(c):i(c)}}const xd={name:"lineEnding",tokenize:Wz};function Wz(t,i){return r;function r(a){return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),Wt(t,i,"linePrefix")}}const eu={name:"thematicBreak",tokenize:tO};function tO(t,i,r){let a=0,s;return u;function u(h){return t.enter("thematicBreak"),c(h)}function c(h){return s=h,d(h)}function d(h){return h===s?(t.enter("thematicBreakSequence"),m(h)):a>=3&&(h===null||_t(h))?(t.exit("thematicBreak"),i(h)):r(h)}function m(h){return h===s?(t.consume(h),a++,m):(t.exit("thematicBreakSequence"),Qt(h)?Wt(t,d,"whitespace")(h):d(h))}}const Qe={continuation:{tokenize:rO},exit:aO,name:"list",tokenize:iO},eO={partial:!0,tokenize:oO},nO={partial:!0,tokenize:lO};function iO(t,i,r){const a=this,s=a.events[a.events.length-1];let u=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return d;function d(v){const S=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:th(v)){if(a.containerState.type||(a.containerState.type=S,t.enter(S,{_container:!0})),S==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(eu,r,h)(v):h(v);if(!a.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),m(v)}return r(v)}function m(v){return th(v)&&++c<10?(t.consume(v),m):(!a.interrupt||c<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),h(v)):r(v)}function h(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,t.check(Du,a.interrupt?r:g,t.attempt(eO,x,y))}function g(v){return a.containerState.initialBlankLine=!0,u++,x(v)}function y(v){return Qt(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),x):r(v)}function x(v){return a.containerState.size=u+a.sliceSerialize(t.exit("listItemPrefix"),!0).length,i(v)}}function rO(t,i,r){const a=this;return a.containerState._closeFlow=void 0,t.check(Du,s,u);function s(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Wt(t,i,"listItemIndent",a.containerState.size+1)(d)}function u(d){return a.containerState.furtherBlankLines||!Qt(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,t.attempt(nO,i,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,Wt(t,t.attempt(Qe,i,r),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function lO(t,i,r){const a=this;return Wt(t,s,"listItemIndent",a.containerState.size+1);function s(u){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?i(u):r(u)}}function aO(t){t.exit(this.containerState.type)}function oO(t,i,r){const a=this;return Wt(t,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(u){const c=a.events[a.events.length-1];return!Qt(u)&&c&&c[1].type==="listItemPrefixWhitespace"?i(u):r(u)}}const vx={name:"setextUnderline",resolveTo:sO,tokenize:uO};function sO(t,i){let r=t.length,a,s,u;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){a=r;break}t[r][1].type==="paragraph"&&(s=r)}else t[r][1].type==="content"&&t.splice(r,1),!u&&t[r][1].type==="definition"&&(u=r);const c={type:"setextHeading",start:{...t[a][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",u?(t.splice(s,0,["enter",c,i]),t.splice(u+1,0,["exit",t[a][1],i]),t[a][1].end={...t[u][1].end}):t[a][1]=c,t.push(["exit",c,i]),t}function uO(t,i,r){const a=this;let s;return u;function u(h){let g=a.events.length,y;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){y=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||y)?(t.enter("setextHeadingLine"),s=h,c(h)):r(h)}function c(h){return t.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===s?(t.consume(h),d):(t.exit("setextHeadingLineSequence"),Qt(h)?Wt(t,m,"lineSuffix")(h):m(h))}function m(h){return h===null||_t(h)?(t.exit("setextHeadingLine"),i(h)):r(h)}}const cO={tokenize:fO};function fO(t){const i=this,r=t.attempt(Du,a,t.attempt(this.parser.constructs.flowInitial,s,Wt(t,t.attempt(this.parser.constructs.flow,s,t.attempt(gz,s)),"linePrefix")));return r;function a(u){if(u===null){t.consume(u);return}return t.enter("lineEndingBlank"),t.consume(u),t.exit("lineEndingBlank"),i.currentConstruct=void 0,r}function s(u){if(u===null){t.consume(u);return}return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),i.currentConstruct=void 0,r}}const dO={resolveAll:lb()},hO=rb("string"),pO=rb("text");function rb(t){return{resolveAll:lb(t==="text"?mO:void 0),tokenize:i};function i(r){const a=this,s=this.parser.constructs[t],u=r.attempt(s,c,d);return c;function c(g){return h(g)?u(g):d(g)}function d(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),m}function m(g){return h(g)?(r.exit("data"),u(g)):(r.consume(g),m)}function h(g){if(g===null)return!0;const y=s[g];let x=-1;if(y)for(;++x<y.length;){const v=y[x];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function lb(t){return i;function i(r,a){let s=-1,u;for(;++s<=r.length;)u===void 0?r[s]&&r[s][1].type==="data"&&(u=s,s++):(!r[s]||r[s][1].type!=="data")&&(s!==u+2&&(r[u][1].end=r[s-1][1].end,r.splice(u+2,s-u-2),s=u+2),u=void 0);return t?t(r,a):r}}function mO(t,i){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const a=t[r-1][1],s=i.sliceStream(a);let u=s.length,c=-1,d=0,m;for(;u--;){const h=s[u];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(h===-2)m=!0,d++;else if(h!==-1){u++;break}}if(i._contentTypeTextTrailing&&r===t.length&&(d=0),d){const h={type:r===t.length||m||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:a.start._bufferIndex+c,_index:a.start._index+u,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(t.splice(r,0,["enter",h,i],["exit",h,i]),r+=2)}r++}return t}const gO={42:Qe,43:Qe,45:Qe,48:Qe,49:Qe,50:Qe,51:Qe,52:Qe,53:Qe,54:Qe,55:Qe,56:Qe,57:Qe,62:P1},yO={91:Sz},xO={[-2]:yd,[-1]:yd,32:yd},vO={35:Tz,42:eu,45:[vx,eu],60:Oz,61:vx,95:eu,96:yx,126:yx},bO={38:W1,92:J1},SO={[-5]:xd,[-4]:xd,[-3]:xd,33:Kz,38:W1,42:eh,60:[P3,Bz],91:Pz,92:[_z,J1],93:jh,95:eh,96:cz},wO={null:[eh,dO]},EO={null:[42,95]},CO={null:[]},_O=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:EO,contentInitial:yO,disable:CO,document:gO,flow:vO,flowInitial:xO,insideSpan:wO,string:bO,text:SO},Symbol.toStringTag,{value:"Module"}));function NO(t,i,r){let a={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const s={},u=[];let c=[],d=[];const m={attempt:H(I),check:H(D),consume:j,enter:w,exit:k,interrupt:H(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:_,events:[],now:S,parser:t,previous:null,sliceSerialize:x,sliceStream:v,write:y};let g=i.tokenize.call(h,m);return i.resolveAll&&u.push(i),h;function y(L){return c=xn(c,L),M(),c[c.length-1]!==null?[]:(G(i,0),h.events=Rh(u,h.events,h),h.events)}function x(L,Q){return AO(v(L),Q)}function v(L){return TO(c,L)}function S(){const{_bufferIndex:L,_index:Q,line:et,column:R,offset:U}=a;return{_bufferIndex:L,_index:Q,line:et,column:R,offset:U}}function _(L){s[L.line]=L.column,lt()}function M(){let L;for(;a._index<c.length;){const Q=c[a._index];if(typeof Q=="string")for(L=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===L&&a._bufferIndex<Q.length;)C(Q.charCodeAt(a._bufferIndex));else C(Q)}}function C(L){g=g(L)}function j(L){_t(L)?(a.line++,a.column=1,a.offset+=L===-3?2:1,lt()):L!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=L}function w(L,Q){const et=Q||{};return et.type=L,et.start=S(),h.events.push(["enter",et,h]),d.push(et),et}function k(L){const Q=d.pop();return Q.end=S(),h.events.push(["exit",Q,h]),Q}function I(L,Q){G(L,Q.from)}function D(L,Q){Q.restore()}function H(L,Q){return et;function et(R,U,z){let B,Y,K,A;return Array.isArray(R)?V(R):"tokenize"in R?V([R]):O(R);function O(ct){return dt;function dt(st){const pt=st!==null&&ct[st],wt=st!==null&&ct.null,Ct=[...Array.isArray(pt)?pt:pt?[pt]:[],...Array.isArray(wt)?wt:wt?[wt]:[]];return V(Ct)(st)}}function V(ct){return B=ct,Y=0,ct.length===0?z:T(ct[Y])}function T(ct){return dt;function dt(st){return A=Z(),K=ct,ct.partial||(h.currentConstruct=ct),ct.name&&h.parser.constructs.disable.null.includes(ct.name)?ut():ct.tokenize.call(Q?Object.assign(Object.create(h),Q):h,m,nt,ut)(st)}}function nt(ct){return L(K,A),U}function ut(ct){return A.restore(),++Y<B.length?T(B[Y]):z}}}function G(L,Q){L.resolveAll&&!u.includes(L)&&u.push(L),L.resolve&&Vn(h.events,Q,h.events.length-Q,L.resolve(h.events.slice(Q),h)),L.resolveTo&&(h.events=L.resolveTo(h.events,h))}function Z(){const L=S(),Q=h.previous,et=h.currentConstruct,R=h.events.length,U=Array.from(d);return{from:R,restore:z};function z(){a=L,h.previous=Q,h.currentConstruct=et,h.events.length=R,d=U,lt()}}function lt(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function TO(t,i){const r=i.start._index,a=i.start._bufferIndex,s=i.end._index,u=i.end._bufferIndex;let c;if(r===s)c=[t[r].slice(a,u)];else{if(c=t.slice(r,s),a>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}u>0&&c.push(t[s].slice(0,u))}return c}function AO(t,i){let r=-1;const a=[];let s;for(;++r<t.length;){const u=t[r];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
17
+ `;break}case-3:{c=`\r
18
+ `;break}case-2:{c=i?" ":" ";break}case-1:{if(!i&&s)continue;c=" ";break}default:c=String.fromCharCode(u)}s=u===-2,a.push(c)}return a.join("")}function MO(t){const a={constructs:H3([_O,...(t||{}).extensions||[]]),content:s(Q3),defined:[],document:s(G3),flow:s(cO),lazy:{},string:s(hO),text:s(pO)};return a;function s(u){return c;function c(d){return NO(a,u,d)}}}function zO(t){for(;!tb(t););return t}const bx=/[\0\t\n\r]/g;function OO(){let t=1,i="",r=!0,a;return s;function s(u,c,d){const m=[];let h,g,y,x,v;for(u=i+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),y=0,i="",r&&(u.charCodeAt(0)===65279&&y++,r=void 0);y<u.length;){if(bx.lastIndex=y,h=bx.exec(u),x=h&&h.index!==void 0?h.index:u.length,v=u.charCodeAt(x),!h){i=u.slice(y);break}if(v===10&&y===x&&a)m.push(-3),a=void 0;else switch(a&&(m.push(-5),a=void 0),y<x&&(m.push(u.slice(y,x)),t+=x-y),v){case 0:{m.push(65533),t++;break}case 9:{for(g=Math.ceil(t/4)*4,m.push(-2);t++<g;)m.push(-1);break}case 10:{m.push(-4),t=1;break}default:a=!0,t=1}y=x+1}return d&&(a&&m.push(-5),i&&m.push(i),m.push(null)),m}}const DO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function kO(t){return t.replace(DO,RO)}function RO(t,i,r){if(i)return i;if(r.charCodeAt(0)===35){const s=r.charCodeAt(1),u=s===120||s===88;return $1(r.slice(u?2:1),u?16:10)}return kh(r)||t}const ab={}.hasOwnProperty;function jO(t,i,r){return typeof i!="string"&&(r=i,i=void 0),HO(r)(zO(MO(r).document().write(OO()(t,i,!0))))}function HO(t){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Ae),autolinkProtocol:Z,autolinkEmail:Z,atxHeading:u(It),blockQuote:u(wt),characterEscape:Z,characterReference:Z,codeFenced:u(Ct),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Ct,c),codeText:u(xt,c),codeTextData:Z,data:Z,codeFlowValue:Z,definition:u(Et),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(Ot),hardBreakEscape:u(Ut),hardBreakTrailing:u(Ut),htmlFlow:u(oe,c),htmlFlowData:Z,htmlText:u(oe,c),htmlTextData:Z,image:u(Ke),label:c,link:u(Ae),listItem:u(vn),listItemValue:x,listOrdered:u(je,y),listUnordered:u(je),paragraph:u(Yn),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(It),strong:u(Qn),thematicBreak:u(gi)},exit:{atxHeading:m(),atxHeadingSequence:I,autolink:m(),autolinkEmail:pt,autolinkProtocol:st,blockQuote:m(),characterEscapeValue:lt,characterReferenceMarkerHexadecimal:ut,characterReferenceMarkerNumeric:ut,characterReferenceValue:ct,characterReference:dt,codeFenced:m(M),codeFencedFence:_,codeFencedFenceInfo:v,codeFencedFenceMeta:S,codeFlowValue:lt,codeIndented:m(C),codeText:m(U),codeTextData:lt,data:lt,definition:m(),definitionDestinationString:k,definitionLabelString:j,definitionTitleString:w,emphasis:m(),hardBreakEscape:m(Q),hardBreakTrailing:m(Q),htmlFlow:m(et),htmlFlowData:lt,htmlText:m(R),htmlTextData:lt,image:m(B),label:K,labelText:Y,lineEnding:L,link:m(z),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:nt,resourceDestinationString:A,resourceTitleString:O,resource:V,setextHeading:m(G),setextHeadingLineSequence:H,setextHeadingText:D,strong:m(),thematicBreak:m()}};ob(i,(t||{}).mdastExtensions||[]);const r={};return a;function a(it){let ht={type:"root",children:[]};const bt={stack:[ht],tokenStack:[],config:i,enter:d,exit:h,buffer:c,resume:g,data:r},zt=[];let Lt=-1;for(;++Lt<it.length;)if(it[Lt][1].type==="listOrdered"||it[Lt][1].type==="listUnordered")if(it[Lt][0]==="enter")zt.push(Lt);else{const ke=zt.pop();Lt=s(it,ke,Lt)}for(Lt=-1;++Lt<it.length;){const ke=i[it[Lt][0]];ab.call(ke,it[Lt][1].type)&&ke[it[Lt][1].type].call(Object.assign({sliceSerialize:it[Lt][2].sliceSerialize},bt),it[Lt][1])}if(bt.tokenStack.length>0){const ke=bt.tokenStack[bt.tokenStack.length-1];(ke[1]||Sx).call(bt,void 0,ke[0])}for(ht.position={start:Zi(it.length>0?it[0][1].start:{line:1,column:1,offset:0}),end:Zi(it.length>0?it[it.length-2][1].end:{line:1,column:1,offset:0})},Lt=-1;++Lt<i.transforms.length;)ht=i.transforms[Lt](ht)||ht;return ht}function s(it,ht,bt){let zt=ht-1,Lt=-1,ke=!1,bn,we,se,Me;for(;++zt<=bt;){const Xt=it[zt];switch(Xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xt[0]==="enter"?Lt++:Lt--,Me=void 0;break}case"lineEndingBlank":{Xt[0]==="enter"&&(bn&&!Me&&!Lt&&!se&&(se=zt),Me=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Me=void 0}if(!Lt&&Xt[0]==="enter"&&Xt[1].type==="listItemPrefix"||Lt===-1&&Xt[0]==="exit"&&(Xt[1].type==="listUnordered"||Xt[1].type==="listOrdered")){if(bn){let zn=zt;for(we=void 0;zn--;){const $e=it[zn];if($e[1].type==="lineEnding"||$e[1].type==="lineEndingBlank"){if($e[0]==="exit")continue;we&&(it[we][1].type="lineEndingBlank",ke=!0),$e[1].type="lineEnding",we=zn}else if(!($e[1].type==="linePrefix"||$e[1].type==="blockQuotePrefix"||$e[1].type==="blockQuotePrefixWhitespace"||$e[1].type==="blockQuoteMarker"||$e[1].type==="listItemIndent"))break}se&&(!we||se<we)&&(bn._spread=!0),bn.end=Object.assign({},we?it[we][1].start:Xt[1].end),it.splice(we||zt,0,["exit",bn,Xt[2]]),zt++,bt++}if(Xt[1].type==="listItemPrefix"){const zn={type:"listItem",_spread:!1,start:Object.assign({},Xt[1].start),end:void 0};bn=zn,it.splice(zt,0,["enter",zn,Xt[2]]),zt++,bt++,se=void 0,Me=!0}}}return it[ht][1]._spread=ke,bt}function u(it,ht){return bt;function bt(zt){d.call(this,it(zt),zt),ht&&ht.call(this,zt)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(it,ht,bt){this.stack[this.stack.length-1].children.push(it),this.stack.push(it),this.tokenStack.push([ht,bt||void 0]),it.position={start:Zi(ht.start),end:void 0}}function m(it){return ht;function ht(bt){it&&it.call(this,bt),h.call(this,bt)}}function h(it,ht){const bt=this.stack.pop(),zt=this.tokenStack.pop();if(zt)zt[0].type!==it.type&&(ht?ht.call(this,it,zt[0]):(zt[1]||Sx).call(this,it,zt[0]));else throw new Error("Cannot close `"+it.type+"` ("+qa({start:it.start,end:it.end})+"): it’s not open");bt.position.end=Zi(it.end)}function g(){return R3(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function x(it){if(this.data.expectingFirstListItemValue){const ht=this.stack[this.stack.length-2];ht.start=Number.parseInt(this.sliceSerialize(it),10),this.data.expectingFirstListItemValue=void 0}}function v(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.lang=it}function S(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.meta=it}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function M(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.value=it.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.value=it.replace(/(\r?\n|\r)$/g,"")}function j(it){const ht=this.resume(),bt=this.stack[this.stack.length-1];bt.label=ht,bt.identifier=Cl(this.sliceSerialize(it)).toLowerCase()}function w(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.title=it}function k(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.url=it}function I(it){const ht=this.stack[this.stack.length-1];if(!ht.depth){const bt=this.sliceSerialize(it).length;ht.depth=bt}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function H(it){const ht=this.stack[this.stack.length-1];ht.depth=this.sliceSerialize(it).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function Z(it){const bt=this.stack[this.stack.length-1].children;let zt=bt[bt.length-1];(!zt||zt.type!=="text")&&(zt=xe(),zt.position={start:Zi(it.start),end:void 0},bt.push(zt)),this.stack.push(zt)}function lt(it){const ht=this.stack.pop();ht.value+=this.sliceSerialize(it),ht.position.end=Zi(it.end)}function L(it){const ht=this.stack[this.stack.length-1];if(this.data.atHardBreak){const bt=ht.children[ht.children.length-1];bt.position.end=Zi(it.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(ht.type)&&(Z.call(this,it),lt.call(this,it))}function Q(){this.data.atHardBreak=!0}function et(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.value=it}function R(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.value=it}function U(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.value=it}function z(){const it=this.stack[this.stack.length-1];if(this.data.inReference){const ht=this.data.referenceType||"shortcut";it.type+="Reference",it.referenceType=ht,delete it.url,delete it.title}else delete it.identifier,delete it.label;this.data.referenceType=void 0}function B(){const it=this.stack[this.stack.length-1];if(this.data.inReference){const ht=this.data.referenceType||"shortcut";it.type+="Reference",it.referenceType=ht,delete it.url,delete it.title}else delete it.identifier,delete it.label;this.data.referenceType=void 0}function Y(it){const ht=this.sliceSerialize(it),bt=this.stack[this.stack.length-2];bt.label=kO(ht),bt.identifier=Cl(ht).toLowerCase()}function K(){const it=this.stack[this.stack.length-1],ht=this.resume(),bt=this.stack[this.stack.length-1];if(this.data.inReference=!0,bt.type==="link"){const zt=it.children;bt.children=zt}else bt.alt=ht}function A(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.url=it}function O(){const it=this.resume(),ht=this.stack[this.stack.length-1];ht.title=it}function V(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function nt(it){const ht=this.resume(),bt=this.stack[this.stack.length-1];bt.label=ht,bt.identifier=Cl(this.sliceSerialize(it)).toLowerCase(),this.data.referenceType="full"}function ut(it){this.data.characterReferenceType=it.type}function ct(it){const ht=this.sliceSerialize(it),bt=this.data.characterReferenceType;let zt;bt?(zt=$1(ht,bt==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):zt=kh(ht);const Lt=this.stack[this.stack.length-1];Lt.value+=zt}function dt(it){const ht=this.stack.pop();ht.position.end=Zi(it.end)}function st(it){lt.call(this,it);const ht=this.stack[this.stack.length-1];ht.url=this.sliceSerialize(it)}function pt(it){lt.call(this,it);const ht=this.stack[this.stack.length-1];ht.url="mailto:"+this.sliceSerialize(it)}function wt(){return{type:"blockquote",children:[]}}function Ct(){return{type:"code",lang:null,meta:null,value:""}}function xt(){return{type:"inlineCode",value:""}}function Et(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ot(){return{type:"emphasis",children:[]}}function It(){return{type:"heading",depth:0,children:[]}}function Ut(){return{type:"break"}}function oe(){return{type:"html",value:""}}function Ke(){return{type:"image",title:null,url:"",alt:null}}function Ae(){return{type:"link",title:null,url:"",children:[]}}function je(it){return{type:"list",ordered:it.type==="listOrdered",start:null,spread:it._spread,children:[]}}function vn(it){return{type:"listItem",spread:it._spread,checked:null,children:[]}}function Yn(){return{type:"paragraph",children:[]}}function Qn(){return{type:"strong",children:[]}}function xe(){return{type:"text",value:""}}function gi(){return{type:"thematicBreak"}}}function Zi(t){return{line:t.line,column:t.column,offset:t.offset}}function ob(t,i){let r=-1;for(;++r<i.length;){const a=i[r];Array.isArray(a)?ob(t,a):LO(t,a)}}function LO(t,i){let r;for(r in i)if(ab.call(i,r))switch(r){case"canContainEols":{const a=i[r];a&&t[r].push(...a);break}case"transforms":{const a=i[r];a&&t[r].push(...a);break}case"enter":case"exit":{const a=i[r];a&&Object.assign(t[r],a);break}}}function Sx(t,i){throw t?new Error("Cannot close `"+t.type+"` ("+qa({start:t.start,end:t.end})+"): a different token (`"+i.type+"`, "+qa({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+qa({start:i.start,end:i.end})+") is still open")}function BO(t){const i=this;i.parser=r;function r(a){return jO(a,{...i.data("settings"),...t,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function UO(t,i){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(i),!0)};return t.patch(i,r),t.applyData(i,r)}function qO(t,i){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(i,r),[t.applyData(i,r),{type:"text",value:`
19
+ `}]}function VO(t,i){const r=i.value?i.value+`
20
+ `:"",a={},s=i.lang?i.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let u={type:"element",tagName:"code",properties:a,children:[{type:"text",value:r}]};return i.meta&&(u.data={meta:i.meta}),t.patch(i,u),u=t.applyData(i,u),u={type:"element",tagName:"pre",properties:{},children:[u]},t.patch(i,u),u}function IO(t,i){const r={type:"element",tagName:"del",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function YO(t,i){const r={type:"element",tagName:"em",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function QO(t,i){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",a=String(i.identifier).toUpperCase(),s=kl(a.toLowerCase()),u=t.footnoteOrder.indexOf(a);let c,d=t.footnoteCounts.get(a);d===void 0?(d=0,t.footnoteOrder.push(a),c=t.footnoteOrder.length):c=u+1,d+=1,t.footnoteCounts.set(a,d);const m={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+s,id:r+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(i,m);const h={type:"element",tagName:"sup",properties:{},children:[m]};return t.patch(i,h),t.applyData(i,h)}function XO(t,i){const r={type:"element",tagName:"h"+i.depth,properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function GO(t,i){if(t.options.allowDangerousHtml){const r={type:"raw",value:i.value};return t.patch(i,r),t.applyData(i,r)}}function sb(t,i){const r=i.referenceType;let a="]";if(r==="collapsed"?a+="[]":r==="full"&&(a+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+a}];const s=t.all(i),u=s[0];u&&u.type==="text"?u.value="["+u.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=a:s.push({type:"text",value:a}),s}function ZO(t,i){const r=String(i.identifier).toUpperCase(),a=t.definitionById.get(r);if(!a)return sb(t,i);const s={src:kl(a.url||""),alt:i.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const u={type:"element",tagName:"img",properties:s,children:[]};return t.patch(i,u),t.applyData(i,u)}function FO(t,i){const r={src:kl(i.url)};i.alt!==null&&i.alt!==void 0&&(r.alt=i.alt),i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"img",properties:r,children:[]};return t.patch(i,a),t.applyData(i,a)}function KO(t,i){const r={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};t.patch(i,r);const a={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(i,a),t.applyData(i,a)}function $O(t,i){const r=String(i.identifier).toUpperCase(),a=t.definitionById.get(r);if(!a)return sb(t,i);const s={href:kl(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const u={type:"element",tagName:"a",properties:s,children:t.all(i)};return t.patch(i,u),t.applyData(i,u)}function PO(t,i){const r={href:kl(i.url)};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"a",properties:r,children:t.all(i)};return t.patch(i,a),t.applyData(i,a)}function JO(t,i,r){const a=t.all(i),s=r?WO(r):ub(i),u={},c=[];if(typeof i.checked=="boolean"){const g=a[0];let y;g&&g.type==="element"&&g.tagName==="p"?y=g:(y={type:"element",tagName:"p",properties:{},children:[]},a.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const g=a[d];(s||d!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
21
+ `}),g.type==="element"&&g.tagName==="p"&&!s?c.push(...g.children):c.push(g)}const m=a[a.length-1];m&&(s||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
22
+ `});const h={type:"element",tagName:"li",properties:u,children:c};return t.patch(i,h),t.applyData(i,h)}function WO(t){let i=!1;if(t.type==="list"){i=t.spread||!1;const r=t.children;let a=-1;for(;!i&&++a<r.length;)i=ub(r[a])}return i}function ub(t){const i=t.spread;return i??t.children.length>1}function tD(t,i){const r={},a=t.all(i);let s=-1;for(typeof i.start=="number"&&i.start!==1&&(r.start=i.start);++s<a.length;){const c=a[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const u={type:"element",tagName:i.ordered?"ol":"ul",properties:r,children:t.wrap(a,!0)};return t.patch(i,u),t.applyData(i,u)}function eD(t,i){const r={type:"element",tagName:"p",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function nD(t,i){const r={type:"root",children:t.wrap(t.all(i))};return t.patch(i,r),t.applyData(i,r)}function iD(t,i){const r={type:"element",tagName:"strong",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function rD(t,i){const r=t.all(i),a=r.shift(),s=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([a],!0)};t.patch(i.children[0],c),s.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},d=Mh(i.children[1]),m=Y1(i.children[i.children.length-1]);d&&m&&(c.position={start:d,end:m}),s.push(c)}const u={type:"element",tagName:"table",properties:{},children:t.wrap(s,!0)};return t.patch(i,u),t.applyData(i,u)}function lD(t,i,r){const a=r?r.children:void 0,u=(a?a.indexOf(i):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,d=c?c.length:i.children.length;let m=-1;const h=[];for(;++m<d;){const y=i.children[m],x={},v=c?c[m]:void 0;v&&(x.align=v);let S={type:"element",tagName:u,properties:x,children:[]};y&&(S.children=t.all(y),t.patch(y,S),S=t.applyData(y,S)),h.push(S)}const g={type:"element",tagName:"tr",properties:{},children:t.wrap(h,!0)};return t.patch(i,g),t.applyData(i,g)}function aD(t,i){const r={type:"element",tagName:"td",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}const wx=9,Ex=32;function oD(t){const i=String(t),r=/\r?\n|\r/g;let a=r.exec(i),s=0;const u=[];for(;a;)u.push(Cx(i.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=r.exec(i);return u.push(Cx(i.slice(s),s>0,!1)),u.join("")}function Cx(t,i,r){let a=0,s=t.length;if(i){let u=t.codePointAt(a);for(;u===wx||u===Ex;)a++,u=t.codePointAt(a)}if(r){let u=t.codePointAt(s-1);for(;u===wx||u===Ex;)s--,u=t.codePointAt(s-1)}return s>a?t.slice(a,s):""}function sD(t,i){const r={type:"text",value:oD(String(i.value))};return t.patch(i,r),t.applyData(i,r)}function uD(t,i){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(i,r),t.applyData(i,r)}const cD={blockquote:UO,break:qO,code:VO,delete:IO,emphasis:YO,footnoteReference:QO,heading:XO,html:GO,imageReference:ZO,image:FO,inlineCode:KO,linkReference:$O,link:PO,listItem:JO,list:tD,paragraph:eD,root:nD,strong:iD,table:rD,tableCell:aD,tableRow:lD,text:sD,thematicBreak:uD,toml:Gs,yaml:Gs,definition:Gs,footnoteDefinition:Gs};function Gs(){}const cb=-1,ku=0,Ia=1,mu=2,Hh=3,Lh=4,Bh=5,Uh=6,fb=7,db=8,_x=typeof self=="object"?self:globalThis,fD=(t,i)=>{const r=(s,u)=>(t.set(u,s),s),a=s=>{if(t.has(s))return t.get(s);const[u,c]=i[s];switch(u){case ku:case cb:return r(c,s);case Ia:{const d=r([],s);for(const m of c)d.push(a(m));return d}case mu:{const d=r({},s);for(const[m,h]of c)d[a(m)]=a(h);return d}case Hh:return r(new Date(c),s);case Lh:{const{source:d,flags:m}=c;return r(new RegExp(d,m),s)}case Bh:{const d=r(new Map,s);for(const[m,h]of c)d.set(a(m),a(h));return d}case Uh:{const d=r(new Set,s);for(const m of c)d.add(a(m));return d}case fb:{const{name:d,message:m}=c;return r(new _x[d](m),s)}case db:return r(BigInt(c),s);case"BigInt":return r(Object(BigInt(c)),s);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return r(new DataView(d),c)}}return r(new _x[u](c),s)};return a},Nx=t=>fD(new Map,t)(0),xl="",{toString:dD}={},{keys:hD}=Object,ja=t=>{const i=typeof t;if(i!=="object"||!t)return[ku,i];const r=dD.call(t).slice(8,-1);switch(r){case"Array":return[Ia,xl];case"Object":return[mu,xl];case"Date":return[Hh,xl];case"RegExp":return[Lh,xl];case"Map":return[Bh,xl];case"Set":return[Uh,xl];case"DataView":return[Ia,r]}return r.includes("Array")?[Ia,r]:r.includes("Error")?[fb,r]:[mu,r]},Zs=([t,i])=>t===ku&&(i==="function"||i==="symbol"),pD=(t,i,r,a)=>{const s=(c,d)=>{const m=a.push(c)-1;return r.set(d,m),m},u=c=>{if(r.has(c))return r.get(c);let[d,m]=ja(c);switch(d){case ku:{let g=c;switch(m){case"bigint":d=db,g=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+m);g=null;break;case"undefined":return s([cb],c)}return s([d,g],c)}case Ia:{if(m){let x=c;return m==="DataView"?x=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(x=new Uint8Array(c)),s([m,[...x]],c)}const g=[],y=s([d,g],c);for(const x of c)g.push(u(x));return y}case mu:{if(m)switch(m){case"BigInt":return s([m,c.toString()],c);case"Boolean":case"Number":case"String":return s([m,c.valueOf()],c)}if(i&&"toJSON"in c)return u(c.toJSON());const g=[],y=s([d,g],c);for(const x of hD(c))(t||!Zs(ja(c[x])))&&g.push([u(x),u(c[x])]);return y}case Hh:return s([d,c.toISOString()],c);case Lh:{const{source:g,flags:y}=c;return s([d,{source:g,flags:y}],c)}case Bh:{const g=[],y=s([d,g],c);for(const[x,v]of c)(t||!(Zs(ja(x))||Zs(ja(v))))&&g.push([u(x),u(v)]);return y}case Uh:{const g=[],y=s([d,g],c);for(const x of c)(t||!Zs(ja(x)))&&g.push(u(x));return y}}const{message:h}=c;return s([d,{name:m,message:h}],c)};return u},Tx=(t,{json:i,lossy:r}={})=>{const a=[];return pD(!(i||r),!!i,new Map,a)(t),a},gu=typeof structuredClone=="function"?(t,i)=>i&&("json"in i||"lossy"in i)?Nx(Tx(t,i)):structuredClone(t):(t,i)=>Nx(Tx(t,i));function mD(t,i){const r=[{type:"text",value:"↩"}];return i>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),r}function gD(t,i){return"Back to reference "+(t+1)+(i>1?"-"+i:"")}function yD(t){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||mD,a=t.options.footnoteBackLabel||gD,s=t.options.footnoteLabel||"Footnotes",u=t.options.footnoteLabelTagName||"h2",c=t.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let m=-1;for(;++m<t.footnoteOrder.length;){const h=t.footnoteById.get(t.footnoteOrder[m]);if(!h)continue;const g=t.all(h),y=String(h.identifier).toUpperCase(),x=kl(y.toLowerCase());let v=0;const S=[],_=t.footnoteCounts.get(y);for(;_!==void 0&&++v<=_;){S.length>0&&S.push({type:"text",value:" "});let j=typeof r=="string"?r:r(m,v);typeof j=="string"&&(j={type:"text",value:j}),S.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+x+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(m,v),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const M=g[g.length-1];if(M&&M.type==="element"&&M.tagName==="p"){const j=M.children[M.children.length-1];j&&j.type==="text"?j.value+=" ":M.children.push({type:"text",value:" "}),M.children.push(...S)}else g.push(...S);const C={type:"element",tagName:"li",properties:{id:i+"fn-"+x},children:t.wrap(g,!0)};t.patch(h,C),d.push(C)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...gu(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
23
+ `},{type:"element",tagName:"ol",properties:{},children:t.wrap(d,!0)},{type:"text",value:`
24
+ `}]}}const hb=(function(t){if(t==null)return SD;if(typeof t=="function")return Ru(t);if(typeof t=="object")return Array.isArray(t)?xD(t):vD(t);if(typeof t=="string")return bD(t);throw new Error("Expected function, string, or object as test")});function xD(t){const i=[];let r=-1;for(;++r<t.length;)i[r]=hb(t[r]);return Ru(a);function a(...s){let u=-1;for(;++u<i.length;)if(i[u].apply(this,s))return!0;return!1}}function vD(t){const i=t;return Ru(r);function r(a){const s=a;let u;for(u in t)if(s[u]!==i[u])return!1;return!0}}function bD(t){return Ru(i);function i(r){return r&&r.type===t}}function Ru(t){return i;function i(r,a,s){return!!(wD(r)&&t.call(this,r,typeof a=="number"?a:void 0,s||void 0))}}function SD(){return!0}function wD(t){return t!==null&&typeof t=="object"&&"type"in t}const pb=[],ED=!0,Ax=!1,CD="skip";function _D(t,i,r,a){let s;typeof i=="function"&&typeof r!="function"?(a=r,r=i):s=i;const u=hb(s),c=a?-1:1;d(t,void 0,[])();function d(m,h,g){const y=m&&typeof m=="object"?m:{};if(typeof y.type=="string"){const v=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(m.type+(v?"<"+v+">":""))+")"})}return x;function x(){let v=pb,S,_,M;if((!i||u(m,h,g[g.length-1]||void 0))&&(v=ND(r(m,g)),v[0]===Ax))return v;if("children"in m&&m.children){const C=m;if(C.children&&v[0]!==CD)for(_=(a?C.children.length:-1)+c,M=g.concat(C);_>-1&&_<C.children.length;){const j=C.children[_];if(S=d(j,_,M)(),S[0]===Ax)return S;_=typeof S[1]=="number"?S[1]:_+c}}return v}}}function ND(t){return Array.isArray(t)?t:typeof t=="number"?[ED,t]:t==null?pb:[t]}function mb(t,i,r,a){let s,u,c;typeof i=="function"&&typeof r!="function"?(u=void 0,c=i,s=r):(u=i,c=r,s=a),_D(t,u,d,s);function d(m,h){const g=h[h.length-1],y=g?g.children.indexOf(m):void 0;return c(m,y,g)}}const nh={}.hasOwnProperty,TD={};function AD(t,i){const r=i||TD,a=new Map,s=new Map,u=new Map,c={...cD,...r.handlers},d={all:h,applyData:zD,definitionById:a,footnoteById:s,footnoteCounts:u,footnoteOrder:[],handlers:c,one:m,options:r,patch:MD,wrap:DD};return mb(t,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const y=g.type==="definition"?a:s,x=String(g.identifier).toUpperCase();y.has(x)||y.set(x,g)}}),d;function m(g,y){const x=g.type,v=d.handlers[x];if(nh.call(d.handlers,x)&&v)return v(d,g,y);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in g){const{children:_,...M}=g,C=gu(M);return C.children=d.all(g),C}return gu(g)}return(d.options.unknownHandler||OD)(d,g,y)}function h(g){const y=[];if("children"in g){const x=g.children;let v=-1;for(;++v<x.length;){const S=d.one(x[v],g);if(S){if(v&&x[v-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=Mx(S.value)),!Array.isArray(S)&&S.type==="element")){const _=S.children[0];_&&_.type==="text"&&(_.value=Mx(_.value))}Array.isArray(S)?y.push(...S):y.push(S)}}}return y}}function MD(t,i){t.position&&(i.position=d3(t))}function zD(t,i){let r=i;if(t&&t.data){const a=t.data.hName,s=t.data.hChildren,u=t.data.hProperties;if(typeof a=="string")if(r.type==="element")r.tagName=a;else{const c="children"in r?r.children:[r];r={type:"element",tagName:a,properties:{},children:c}}r.type==="element"&&u&&Object.assign(r.properties,gu(u)),"children"in r&&r.children&&s!==null&&s!==void 0&&(r.children=s)}return r}function OD(t,i){const r=i.data||{},a="value"in i&&!(nh.call(r,"hProperties")||nh.call(r,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:t.all(i)};return t.patch(i,a),t.applyData(i,a)}function DD(t,i){const r=[];let a=-1;for(i&&r.push({type:"text",value:`
25
+ `});++a<t.length;)a&&r.push({type:"text",value:`
26
+ `}),r.push(t[a]);return i&&t.length>0&&r.push({type:"text",value:`
27
+ `}),r}function Mx(t){let i=0,r=t.charCodeAt(i);for(;r===9||r===32;)i++,r=t.charCodeAt(i);return t.slice(i)}function zx(t,i){const r=AD(t,i),a=r.one(t,void 0),s=yD(r),u=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&u.children.push({type:"text",value:`
28
+ `},s),u}function kD(t,i){return t&&"run"in t?async function(r,a){const s=zx(r,{file:a,...i});await t.run(s,a)}:function(r,a){return zx(r,{file:a,...t||i})}}function Ox(t){if(t)throw t}var vd,Dx;function RD(){if(Dx)return vd;Dx=1;var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):i.call(h)==="[object Array]"},u=function(h){if(!h||i.call(h)!=="[object Object]")return!1;var g=t.call(h,"constructor"),y=h.constructor&&h.constructor.prototype&&t.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!y)return!1;var x;for(x in h);return typeof x>"u"||t.call(h,x)},c=function(h,g){r&&g.name==="__proto__"?r(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},d=function(h,g){if(g==="__proto__")if(t.call(h,g)){if(a)return a(h,g).value}else return;return h[g]};return vd=function m(){var h,g,y,x,v,S,_=arguments[0],M=1,C=arguments.length,j=!1;for(typeof _=="boolean"&&(j=_,_=arguments[1]||{},M=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});M<C;++M)if(h=arguments[M],h!=null)for(g in h)y=d(_,g),x=d(h,g),_!==x&&(j&&x&&(u(x)||(v=s(x)))?(v?(v=!1,S=y&&s(y)?y:[]):S=y&&u(y)?y:{},c(_,{name:g,newValue:m(j,S,x)})):typeof x<"u"&&c(_,{name:g,newValue:x}));return _},vd}var jD=RD();const bd=yu(jD);function ih(t){if(typeof t!="object"||t===null)return!1;const i=Object.getPrototypeOf(t);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function HD(){const t=[],i={run:r,use:a};return i;function r(...s){let u=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...s);function d(m,...h){const g=t[++u];let y=-1;if(m){c(m);return}for(;++y<s.length;)(h[y]===null||h[y]===void 0)&&(h[y]=s[y]);s=h,g?LD(g,d)(...h):c(null,...h)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),i}}function LD(t,i){let r;return a;function a(...c){const d=t.length>c.length;let m;d&&c.push(s);try{m=t.apply(this,c)}catch(h){const g=h;if(d&&r)throw g;return s(g)}d||(m&&m.then&&typeof m.then=="function"?m.then(u,s):m instanceof Error?s(m):u(m))}function s(c,...d){r||(r=!0,i(c,...d))}function u(c){s(null,c)}}const Hn={basename:BD,dirname:UD,extname:qD,join:VD,sep:"/"};function BD(t,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');co(t);let r=0,a=-1,s=t.length,u;if(i===void 0||i.length===0||i.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(u){r=s+1;break}}else a<0&&(u=!0,a=s+1);return a<0?"":t.slice(r,a)}if(i===t)return"";let c=-1,d=i.length-1;for(;s--;)if(t.codePointAt(s)===47){if(u){r=s+1;break}}else c<0&&(u=!0,c=s+1),d>-1&&(t.codePointAt(s)===i.codePointAt(d--)?d<0&&(a=s):(d=-1,a=c));return r===a?a=c:a<0&&(a=t.length),t.slice(r,a)}function UD(t){if(co(t),t.length===0)return".";let i=-1,r=t.length,a;for(;--r;)if(t.codePointAt(r)===47){if(a){i=r;break}}else a||(a=!0);return i<0?t.codePointAt(0)===47?"/":".":i===1&&t.codePointAt(0)===47?"//":t.slice(0,i)}function qD(t){co(t);let i=t.length,r=-1,a=0,s=-1,u=0,c;for(;i--;){const d=t.codePointAt(i);if(d===47){if(c){a=i+1;break}continue}r<0&&(c=!0,r=i+1),d===46?s<0?s=i:u!==1&&(u=1):s>-1&&(u=-1)}return s<0||r<0||u===0||u===1&&s===r-1&&s===a+1?"":t.slice(s,r)}function VD(...t){let i=-1,r;for(;++i<t.length;)co(t[i]),t[i]&&(r=r===void 0?t[i]:r+"/"+t[i]);return r===void 0?".":ID(r)}function ID(t){co(t);const i=t.codePointAt(0)===47;let r=YD(t,!i);return r.length===0&&!i&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),i?"/"+r:r}function YD(t,i){let r="",a=0,s=-1,u=0,c=-1,d,m;for(;++c<=t.length;){if(c<t.length)d=t.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(s===c-1||u===1))if(s!==c-1&&u===2){if(r.length<2||a!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(m=r.lastIndexOf("/"),m!==r.length-1){m<0?(r="",a=0):(r=r.slice(0,m),a=r.length-1-r.lastIndexOf("/")),s=c,u=0;continue}}else if(r.length>0){r="",a=0,s=c,u=0;continue}}i&&(r=r.length>0?r+"/..":"..",a=2)}else r.length>0?r+="/"+t.slice(s+1,c):r=t.slice(s+1,c),a=c-s-1;s=c,u=0}else d===46&&u>-1?u++:u=-1}return r}function co(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const QD={cwd:XD};function XD(){return"/"}function rh(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function GD(t){if(typeof t=="string")t=new URL(t);else if(!rh(t)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(t.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return ZD(t)}function ZD(t){if(t.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const i=t.pathname;let r=-1;for(;++r<i.length;)if(i.codePointAt(r)===37&&i.codePointAt(r+1)===50){const a=i.codePointAt(r+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(i)}const Sd=["history","path","basename","stem","extname","dirname"];class gb{constructor(i){let r;i?rh(i)?r={path:i}:typeof i=="string"||FD(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":QD.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Sd.length;){const u=Sd[a];u in r&&r[u]!==void 0&&r[u]!==null&&(this[u]=u==="history"?[...r[u]]:r[u])}let s;for(s in r)Sd.includes(s)||(this[s]=r[s])}get basename(){return typeof this.path=="string"?Hn.basename(this.path):void 0}set basename(i){Ed(i,"basename"),wd(i,"basename"),this.path=Hn.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?Hn.dirname(this.path):void 0}set dirname(i){kx(this.basename,"dirname"),this.path=Hn.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?Hn.extname(this.path):void 0}set extname(i){if(wd(i,"extname"),kx(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Hn.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){rh(i)&&(i=GD(i)),Ed(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?Hn.basename(this.path,this.extname):void 0}set stem(i){Ed(i,"stem"),wd(i,"stem"),this.path=Hn.join(this.dirname||"",i+(this.extname||""))}fail(i,r,a){const s=this.message(i,r,a);throw s.fatal=!0,s}info(i,r,a){const s=this.message(i,r,a);return s.fatal=void 0,s}message(i,r,a){const s=new De(i,r,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function wd(t,i){if(t&&t.includes(Hn.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+Hn.sep+"`")}function Ed(t,i){if(!t)throw new Error("`"+i+"` cannot be empty")}function kx(t,i){if(!t)throw new Error("Setting `"+i+"` requires `path` to be set too")}function FD(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const KD=(function(t){const a=this.constructor.prototype,s=a[t],u=function(){return s.apply(u,arguments)};return Object.setPrototypeOf(u,a),u}),$D={}.hasOwnProperty;class qh extends KD{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=HD()}copy(){const i=new qh;let r=-1;for(;++r<this.attachers.length;){const a=this.attachers[r];i.use(...a)}return i.data(bd(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(Nd("data",this.frozen),this.namespace[i]=r,this):$D.call(this.namespace,i)&&this.namespace[i]||void 0:i?(Nd("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=r.call(i,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=Fs(i),a=this.parser||this.Parser;return Cd("parse",a),a(String(r),r)}process(i,r){const a=this;return this.freeze(),Cd("process",this.parser||this.Parser),_d("process",this.compiler||this.Compiler),r?s(void 0,r):new Promise(s);function s(u,c){const d=Fs(i),m=a.parse(d);a.run(m,d,function(g,y,x){if(g||!y||!x)return h(g);const v=y,S=a.stringify(v,x);WD(S)?x.value=S:x.result=S,h(g,x)});function h(g,y){g||!y?c(g):u?u(y):r(void 0,y)}}}processSync(i){let r=!1,a;return this.freeze(),Cd("processSync",this.parser||this.Parser),_d("processSync",this.compiler||this.Compiler),this.process(i,s),jx("processSync","process",r),a;function s(u,c){r=!0,Ox(u),a=c}}run(i,r,a){Rx(i),this.freeze();const s=this.transformers;return!a&&typeof r=="function"&&(a=r,r=void 0),a?u(void 0,a):new Promise(u);function u(c,d){const m=Fs(r);s.run(i,m,h);function h(g,y,x){const v=y||i;g?d(g):c?c(v):a(void 0,v,x)}}}runSync(i,r){let a=!1,s;return this.run(i,r,u),jx("runSync","run",a),s;function u(c,d){Ox(c),s=d,a=!0}}stringify(i,r){this.freeze();const a=Fs(r),s=this.compiler||this.Compiler;return _d("stringify",s),Rx(i),s(i,a)}use(i,...r){const a=this.attachers,s=this.namespace;if(Nd("use",this.frozen),i!=null)if(typeof i=="function")m(i,r);else if(typeof i=="object")Array.isArray(i)?d(i):c(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function u(h){if(typeof h=="function")m(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...y]=h;m(g,y)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(h.plugins),h.settings&&(s.settings=bd(!0,s.settings,h.settings))}function d(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const y=h[g];u(y)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function m(h,g){let y=-1,x=-1;for(;++y<a.length;)if(a[y][0]===h){x=y;break}if(x===-1)a.push([h,...g]);else if(g.length>0){let[v,...S]=g;const _=a[x][1];ih(_)&&ih(v)&&(v=bd(!0,_,v)),a[x]=[h,v,...S]}}}}const PD=new qh().freeze();function Cd(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function _d(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Nd(t,i){if(i)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Rx(t){if(!ih(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function jx(t,i,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+i+"` instead")}function Fs(t){return JD(t)?t:new gb(t)}function JD(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function WD(t){return typeof t=="string"||t4(t)}function t4(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const e4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Hx=[],Lx={allowDangerousHtml:!0},n4=/^(https?|ircs?|mailto|xmpp)$/i,i4=[{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 r4(t){const i=l4(t),r=a4(t);return o4(i.runSync(i.parse(r),r),t)}function l4(t){const i=t.rehypePlugins||Hx,r=t.remarkPlugins||Hx,a=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Lx}:Lx;return PD().use(BO).use(r).use(kD,a).use(i)}function a4(t){const i=t.children||"",r=new gb;return typeof i=="string"&&(r.value=i),r}function o4(t,i){const r=i.allowedElements,a=i.allowElement,s=i.components,u=i.disallowedElements,c=i.skipHtml,d=i.unwrapDisallowed,m=i.urlTransform||s4;for(const g of i4)Object.hasOwn(i,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+e4+g.id,void 0);return mb(t,h),y3(t,{Fragment:E.Fragment,components:s,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function h(g,y,x){if(g.type==="raw"&&x&&typeof y=="number")return c?x.children.splice(y,1):x.children[y]={type:"text",value:g.value},y;if(g.type==="element"){let v;for(v in gd)if(Object.hasOwn(gd,v)&&Object.hasOwn(g.properties,v)){const S=g.properties[v],_=gd[v];(_===null||_.includes(g.tagName))&&(g.properties[v]=m(String(S||""),v,g))}}if(g.type==="element"){let v=r?!r.includes(g.tagName):u?u.includes(g.tagName):!1;if(!v&&a&&typeof y=="number"&&(v=!a(g,y,x)),v&&x&&typeof y=="number")return d&&g.children?x.children.splice(y,1,...g.children):x.children.splice(y,1),y}}}function s4(t){const i=t.indexOf(":"),r=t.indexOf("?"),a=t.indexOf("#"),s=t.indexOf("/");return i===-1||s!==-1&&i>s||r!==-1&&i>r||a!==-1&&i>a||n4.test(t.slice(0,i))?t:""}function u4({children:t,className:i}){return E.jsx("div",{className:`markdown-view ${i??""}`,children:E.jsx(r4,{children:t})})}function c4({sessionId:t,nodeId:i,onClose:r}){const{data:a,isLoading:s,error:u}=yE(t,i);return E.jsxs("div",{className:"fixed inset-y-0 right-0 w-[420px] bg-[var(--bg-secondary)] border-l border-[var(--border)] flex flex-col z-50",children:[E.jsx(f4,{stepLabel:a?.stepLabel??null,nodeId:i,onClose:r}),E.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:[s&&E.jsx("div",{className:"text-[var(--text-secondary)] text-sm",children:"Loading..."}),u&&E.jsx("div",{className:"text-[var(--error)] text-sm bg-[var(--bg-card)] rounded p-3",children:u.message}),a&&E.jsx(d4,{detail:a})]})]})}function f4({stepLabel:t,nodeId:i,onClose:r}){return E.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)] shrink-0 gap-2",children:[E.jsxs("div",{className:"min-w-0",children:[t&&E.jsx("div",{className:"text-sm font-medium text-[var(--text-primary)] truncate",children:t}),E.jsx("div",{className:"font-mono text-xs text-[var(--text-muted)] truncate",children:i})]}),E.jsx("button",{onClick:r,className:"shrink-0 text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors text-lg leading-none cursor-pointer",children:"✕"})]})}function d4({detail:t}){return E.jsxs(E.Fragment,{children:[E.jsx(h4,{detail:t}),t.recapMarkdown&&E.jsx(p4,{markdown:t.recapMarkdown}),t.advanceOutcome&&E.jsx(m4,{outcome:t.advanceOutcome}),t.validations.length>0&&E.jsx(g4,{validations:t.validations}),t.gaps.length>0&&E.jsx(x4,{gaps:t.gaps}),t.artifacts.length>0&&E.jsx(v4,{artifacts:t.artifacts})]})}function h4({detail:t}){return E.jsx(Rl,{title:"Node",children:E.jsxs("dl",{className:"grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 text-xs",children:[E.jsx(Ks,{label:"Kind",value:E.jsx(S4,{kind:t.nodeKind})}),E.jsx(Ks,{label:"Event Index",value:String(t.createdAtEventIndex)}),t.parentNodeId&&E.jsx(Ks,{label:"Parent",value:t.parentNodeId,mono:!0}),t.isTip&&E.jsx(Ks,{label:"Tip",value:t.isPreferredTip?"Preferred tip":"Tip"})]})})}function p4({markdown:t}){return E.jsx(Rl,{title:"Recap",children:E.jsx(u4,{children:t})})}function m4({outcome:t}){const i=t.kind==="advanced";return E.jsx(Rl,{title:"Advance Outcome",children:E.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[E.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded font-medium",style:{backgroundColor:i?"var(--success)20":"var(--blocked)20",color:i?"var(--success)":"var(--blocked)"},children:i?"Advanced":"Blocked"}),E.jsxs("span",{className:"text-[var(--text-muted)]",children:["attempt ",t.attemptId.slice(-8)," at event #",t.recordedAtEventIndex]})]})})}function g4({validations:t}){return E.jsx(Rl,{title:`Validations (${t.length})`,children:E.jsx("div",{className:"space-y-2",children:t.map(i=>E.jsx(y4,{validation:i},i.validationId))})})}function y4({validation:t}){const i=t.outcome==="pass";return E.jsxs("div",{className:"bg-[var(--bg-primary)] rounded p-3 text-xs space-y-2",children:[E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded font-medium",style:{backgroundColor:i?"var(--success)20":"var(--error)20",color:i?"var(--success)":"var(--error)"},children:i?"Pass":"Fail"}),E.jsx("span",{className:"text-[var(--text-muted)] font-mono",children:t.contractRef})]}),t.issues.length>0&&E.jsxs("div",{children:[E.jsx("div",{className:"text-[var(--text-muted)] mb-1",children:"Issues:"}),E.jsx("ul",{className:"list-disc list-inside text-[var(--error)] space-y-0.5",children:t.issues.map((r,a)=>E.jsx("li",{children:r},a))})]}),t.suggestions.length>0&&E.jsxs("div",{children:[E.jsx("div",{className:"text-[var(--text-muted)] mb-1",children:"Suggestions:"}),E.jsx("ul",{className:"list-disc list-inside text-[var(--text-secondary)] space-y-0.5",children:t.suggestions.map((r,a)=>E.jsx("li",{children:r},a))})]})]})}function x4({gaps:t}){return E.jsx(Rl,{title:`Gaps (${t.length})`,children:E.jsx("div",{className:"space-y-1.5",children:t.map(i=>E.jsxs("div",{className:"flex items-start gap-2 text-xs bg-[var(--bg-primary)] rounded p-2",children:[E.jsx("span",{className:"shrink-0 mt-0.5 inline-flex items-center px-1.5 py-0.5 rounded font-medium",style:{backgroundColor:i.isResolved?"var(--success)20":i.severity==="critical"?"var(--error)20":"var(--warning)20",color:i.isResolved?"var(--success)":i.severity==="critical"?"var(--error)":"var(--warning)"},children:i.isResolved?"Resolved":i.severity==="critical"?"Critical":"Non-critical"}),E.jsx("span",{className:"text-[var(--text-secondary)]",children:i.summary})]},i.gapId))})})}function v4({artifacts:t}){return E.jsx(Rl,{title:`Artifacts (${t.length})`,children:E.jsx("div",{className:"space-y-2",children:t.map(i=>E.jsxs("div",{className:"bg-[var(--bg-primary)] rounded p-3 text-xs space-y-1",children:[E.jsxs("div",{className:"flex items-center gap-2 text-[var(--text-muted)]",children:[E.jsx("span",{children:i.contentType}),E.jsx("span",{children:"·"}),E.jsx("span",{children:w4(i.byteLength)})]}),E.jsx("pre",{className:"text-[var(--text-secondary)] whitespace-pre-wrap break-words font-mono max-h-48 overflow-y-auto",children:typeof i.content=="string"?i.content:JSON.stringify(i.content,null,2)})]},i.sha256))})})}function Rl({title:t,children:i}){return E.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border)] rounded-lg overflow-hidden",children:[E.jsx("div",{className:"px-3 py-2 border-b border-[var(--border)]",children:E.jsx("h3",{className:"text-xs font-medium text-[var(--text-muted)] uppercase tracking-wide",children:t})}),E.jsx("div",{className:"p-3",children:i})]})}function Ks({label:t,value:i,mono:r}){return E.jsxs(E.Fragment,{children:[E.jsx("dt",{className:"text-[var(--text-muted)]",children:t}),E.jsx("dd",{className:r?"font-mono text-[var(--text-secondary)] truncate":"text-[var(--text-primary)]",children:i})]})}const b4={step:{label:"Step",color:"var(--accent)"},checkpoint:{label:"Checkpoint",color:"var(--success)"},blocked_attempt:{label:"Blocked",color:"var(--error)"}};function S4({kind:t}){const i=b4[t];return E.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded font-medium",style:{backgroundColor:`${i.color}20`,color:i.color},children:i.label})}function w4(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}function E4({sessionId:t}){const{data:i,isLoading:r,error:a}=gE(t),[s,u]=J.useState(null),c=J.useCallback(m=>{u(h=>h===m?null:m)},[]),d=J.useCallback(()=>u(null),[]);return r?E.jsx("div",{className:"text-[var(--text-secondary)]",children:"Loading session..."}):a?E.jsxs("div",{className:"text-[var(--error)] bg-[var(--bg-card)] rounded-lg p-4",children:["Failed to load session: ",a.message]}):i?E.jsxs("div",{className:s?"mr-[420px] transition-[margin] duration-200":"transition-[margin] duration-200",children:[i.sessionTitle&&E.jsx("h2",{className:"text-base font-medium text-[var(--text-primary)] mb-2",children:i.sessionTitle}),E.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[E.jsx($x,{health:i.health}),E.jsxs("span",{className:"text-sm text-[var(--text-muted)]",children:[i.runs.length," run",i.runs.length!==1?"s":""]})]}),i.runs.length===0?E.jsx("div",{className:"text-center py-16 text-[var(--text-secondary)]",children:"No runs in this session"}):E.jsx("div",{className:"space-y-6",children:i.runs.map(m=>E.jsxs("div",{className:"bg-[var(--bg-card)] border border-[var(--border)] rounded-lg overflow-hidden",children:[E.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsx("span",{className:"text-sm font-medium text-[var(--text-primary)]",children:m.workflowName??m.workflowId??"Run"}),E.jsx("span",{className:"font-mono text-xs text-[var(--text-muted)]",children:m.runId})]}),E.jsxs("div",{className:"flex items-center gap-2",children:[m.hasUnresolvedCriticalGaps&&E.jsx("span",{className:"text-xs text-[var(--warning)]",children:"Critical gaps"}),E.jsx(Kx,{status:m.status})]})]}),E.jsx("div",{className:"h-[500px]",children:E.jsx(VM,{run:m,onNodeClick:c})})]},m.runId))}),s&&E.jsx(c4,{sessionId:t,nodeId:s,onClose:d})]}):null}function C4(t){if(!t)return"unknown";const i=Date.now()-t,r=Math.floor(i/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const a=Math.floor(r/60);if(a<24)return`${a}h ago`;const s=Math.floor(a/24);return s<30?`${s}d ago`:`${Math.floor(s/30)}mo ago`}function _4(t){return t?new Date(t).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}):""}function Td({wt:t,repoRoot:i,onSelectBranch:r}){const a=t.branch===null,s=t.changedCount===0,u=t.aheadCount===0,c=t.activeSessionCount>0,d=c?"border-[var(--status-in-progress)]":a?"border-yellow-500/40":"border-[var(--border)]",m=a?"Detached HEAD — not on any branch. Check out a branch to enable session filtering.":`View sessions for ${t.branch}`;return E.jsxs("button",{type:"button",disabled:a,onClick:a?void 0:()=>r(t.branch,i),title:m,className:`w-full text-left rounded-lg border ${d} bg-[var(--bg-secondary)] p-4 flex flex-col gap-2 transition-colors ${a?"cursor-default opacity-80":"cursor-pointer hover:border-[var(--accent)]"}`,children:[E.jsxs("div",{className:"flex items-start justify-between gap-3",children:[E.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[a?E.jsxs("span",{className:"text-yellow-400 font-mono text-sm font-medium truncate",children:["detached · ",t.headHash]}):E.jsx("span",{className:"text-[var(--text-primary)] font-mono text-sm font-medium truncate",children:t.branch}),E.jsx("span",{className:"text-[var(--text-muted)] text-xs font-mono truncate",children:t.name})]}),c&&E.jsxs("span",{className:"shrink-0 text-xs font-medium px-2 py-0.5 rounded-full bg-[var(--status-in-progress)]/20 text-[var(--status-in-progress)] border border-[var(--status-in-progress)]/30",children:[t.activeSessionCount," active"]})]}),E.jsx("p",{className:"text-[var(--text-secondary)] text-sm leading-snug line-clamp-2",children:t.headMessage||E.jsx("span",{className:"text-[var(--text-muted)] italic",children:"no commit message"})}),E.jsxs("div",{className:"flex items-center gap-2 flex-wrap pt-1",children:[s?E.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-400 border border-green-500/20",children:"clean"}):E.jsxs("span",{className:"text-xs px-1.5 py-0.5 rounded bg-orange-500/10 text-orange-400 border border-orange-500/20",children:[t.changedCount," changed"]}),!u&&E.jsxs("span",{className:"text-xs px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-400 border border-blue-500/20",children:[t.aheadCount," ahead"]}),E.jsx("span",{className:"text-xs text-[var(--text-muted)] ml-auto",children:C4(t.headTimestampMs)})]})]})}function N4({worktrees:t,repoRoot:i,onSelectBranch:r}){const[a,s]=J.useState(!1),u=J.useMemo(()=>({activeSessions:t.filter(h=>h.activeSessionCount>0),dirty:t.filter(h=>h.activeSessionCount===0&&h.changedCount>0),clean:t.filter(h=>h.activeSessionCount===0&&h.changedCount===0)}),[t]),{activeSessions:c,dirty:d,clean:m}=u;return E.jsxs("div",{className:"flex flex-col gap-4",children:[c.length>0&&E.jsxs("section",{className:"flex flex-col gap-2",children:[E.jsx("h4",{className:"text-xs font-medium text-[var(--text-muted)] uppercase tracking-wider",children:"Active sessions"}),E.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:c.map(h=>E.jsx(Td,{wt:h,repoRoot:i,onSelectBranch:r},h.path))})]}),d.length>0&&E.jsxs("section",{className:"flex flex-col gap-2",children:[E.jsx("h4",{className:"text-xs font-medium text-[var(--text-muted)] uppercase tracking-wider",children:"In progress (dirty)"}),E.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:d.map(h=>E.jsx(Td,{wt:h,repoRoot:i,onSelectBranch:r},h.path))})]}),m.length>0&&E.jsxs("section",{className:"flex flex-col gap-1",children:[E.jsxs("button",{type:"button",onClick:()=>s(h=>!h),className:"flex items-center gap-2 text-left group",children:[E.jsx("span",{className:`text-[var(--text-muted)] text-[10px] transition-transform duration-150 ${a?"rotate-90":""}`,children:"▶"}),E.jsx("h4",{className:"text-xs font-medium text-[var(--text-muted)] uppercase tracking-wider group-hover:text-[var(--text-secondary)] transition-colors",children:"Clean"}),E.jsxs("span",{className:"text-xs text-[var(--text-muted)]",children:["(",m.length,")"]})]}),a&&E.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 mt-1",children:m.map(h=>E.jsx(Td,{wt:h,repoRoot:i,onSelectBranch:r},h.path))})]})]})}function T4({repo:t,onSelectBranch:i}){const r=t.worktrees.filter(s=>s.activeSessionCount>0).length,a=t.worktrees.filter(s=>s.activeSessionCount===0&&s.changedCount>0).length;return E.jsxs("section",{className:"flex flex-col gap-3",children:[E.jsxs("div",{className:"flex items-center gap-2 border-b border-[var(--border)] pb-2",children:[E.jsx("h3",{className:"text-sm font-semibold text-[var(--text-primary)] font-mono",children:t.repoName}),E.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:t.worktrees.length}),r>0&&E.jsxs("span",{className:"text-xs font-medium text-[var(--status-in-progress)]",children:["· ",r," active"]}),a>0&&E.jsxs("span",{className:"text-xs font-medium text-orange-400",children:["· ",a," dirty"]}),E.jsx("span",{className:"text-xs text-[var(--text-muted)] ml-auto font-mono truncate max-w-[240px]",title:t.repoRoot,children:t.repoRoot})]}),E.jsx(N4,{worktrees:t.worktrees,repoRoot:t.repoRoot,onSelectBranch:i})]})}function A4({onSelectBranch:t}){const{data:i,isLoading:r,error:a,dataUpdatedAt:s,isFetching:u}=xE();if(r)return E.jsx("div",{className:"text-[var(--text-muted)] text-sm py-12 text-center",children:"Loading worktrees…"});if(a)return E.jsx("div",{className:"text-red-400 text-sm py-12 text-center",children:a instanceof Error?a.message:"Failed to load worktrees"});if(!i||i.repos.length===0)return E.jsxs("div",{className:"text-[var(--text-muted)] text-sm py-12 text-center",children:["No worktrees found. Run"," ",E.jsx("code",{className:"font-mono bg-[var(--bg-tertiary)] px-1 rounded",children:"git worktree list"})," ","to verify."]});const c=i.repos.reduce((h,g)=>h+g.worktrees.length,0),d=i.repos.reduce((h,g)=>h+g.worktrees.filter(y=>y.activeSessionCount>0).length,0),m=i.repos.reduce((h,g)=>h+g.worktrees.filter(y=>y.activeSessionCount===0&&y.changedCount>0).length,0);return E.jsxs("div",{className:"flex flex-col gap-6",children:[E.jsxs("div",{className:"flex items-center justify-between",children:[E.jsxs("h2",{className:"text-[var(--text-primary)] font-semibold flex items-center gap-2 flex-wrap",children:["Worktrees",E.jsx("span",{className:"text-[var(--text-muted)] font-normal text-sm",children:c}),d>0&&E.jsxs("span",{className:"text-xs font-medium text-[var(--status-in-progress)]",children:["· ",d," active"]}),m>0&&E.jsxs("span",{className:"text-xs font-medium text-orange-400",children:["· ",m," dirty"]})]}),E.jsx("span",{className:"text-xs text-[var(--text-muted)]",children:u?"refreshing…":s?`updated ${_4(s)}`:""})]}),i.repos.map(h=>E.jsx(T4,{repo:h,onSelectBranch:t},h.repoRoot))]})}function M4(){const[t,i]=J.useState("sessions"),[r,a]=J.useState(null),[s,u]=J.useState(""),[c,d]=J.useState(null),[m,h]=J.useState(0),g=S=>{a(S)},y=()=>{a(null)},x=S=>{i(S),a(null),S==="sessions"&&(u(""),d(null))},v=(S,_)=>{u(S),d(_),h(M=>M+1),i("sessions"),a(null)};return E.jsxs("div",{className:"min-h-screen bg-[var(--bg-primary)]",children:[E.jsx("header",{className:"border-b border-[var(--border)] px-6 py-4",children:E.jsxs("div",{className:"flex items-center gap-4",children:[r&&E.jsx("button",{onClick:y,className:"text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors",children:"← Back"}),E.jsx("h1",{className:"text-lg font-semibold text-[var(--text-primary)]",children:"WorkRail Console"}),r&&E.jsx("span",{className:"text-sm text-[var(--text-muted)] font-mono",children:r}),!r&&E.jsx("nav",{className:"ml-4 flex gap-1",children:["sessions","worktrees"].map(S=>E.jsx("button",{onClick:()=>x(S),className:`px-3 py-1 rounded text-sm font-medium transition-colors capitalize ${t===S?"bg-[var(--bg-tertiary)] text-[var(--text-primary)]":"text-[var(--text-muted)] hover:text-[var(--text-secondary)]"}`,children:S},S))})]})}),E.jsx("main",{className:"p-6",children:r?E.jsx(E4,{sessionId:r}):t==="worktrees"?E.jsx(A4,{onSelectBranch:v}):E.jsx(TE,{onSelectSession:g,initialSearch:s,initialRepoRoot:c},m)})]})}const z4=new eE({defaultOptions:{queries:{refetchInterval:5e3,staleTime:2e3}}});Ow.createRoot(document.getElementById("root")).render(E.jsx(J.StrictMode,{children:E.jsx(iE,{client:z4,children:E.jsx(M4,{})})}));