ruby_reactor 0.6.0 → 0.7.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.
- checksums.yaml +4 -4
- data/.release-please-manifest.json +1 -1
- data/.specify/feature.json +1 -1
- data/CHANGELOG.md +114 -1
- data/CLAUDE.md +5 -0
- data/README.md +131 -16
- data/lib/ruby_reactor/adapters/active_job/router.rb +21 -6
- data/lib/ruby_reactor/adapters/active_job/step_worker.rb +20 -0
- data/lib/ruby_reactor/adapters/active_job/worker.rb +6 -1
- data/lib/ruby_reactor/adapters/sidekiq/router.rb +21 -6
- data/lib/ruby_reactor/adapters/sidekiq/step_worker.rb +17 -0
- data/lib/ruby_reactor/adapters/sidekiq/worker.rb +5 -2
- data/lib/ruby_reactor/async_waiter.rb +113 -0
- data/lib/ruby_reactor/configuration.rb +30 -1
- data/lib/ruby_reactor/context.rb +21 -0
- data/lib/ruby_reactor/context_serializer.rb +2 -0
- data/lib/ruby_reactor/dsl/async_macros.rb +176 -0
- data/lib/ruby_reactor/dsl/async_reactor_builder.rb +66 -0
- data/lib/ruby_reactor/dsl/compose_builder.rb +23 -4
- data/lib/ruby_reactor/dsl/interrupt_builder.rb +3 -2
- data/lib/ruby_reactor/dsl/interrupt_step_config.rb +7 -1
- data/lib/ruby_reactor/dsl/lockable.rb +1 -1
- data/lib/ruby_reactor/dsl/map_builder.rb +1 -2
- data/lib/ruby_reactor/dsl/reactor.rb +29 -10
- data/lib/ruby_reactor/dsl/step_builder.rb +30 -11
- data/lib/ruby_reactor/error/async_result_pending.rb +21 -0
- data/lib/ruby_reactor/error/async_wait_timeout_error.rb +10 -0
- data/lib/ruby_reactor/error/deprecated_dsl_error.rb +11 -0
- data/lib/ruby_reactor/executor/async_step_dispatch.rb +110 -0
- data/lib/ruby_reactor/executor/ordered_lock_support.rb +2 -2
- data/lib/ruby_reactor/executor/result_handler.rb +12 -1
- data/lib/ruby_reactor/executor/retry_manager.rb +9 -5
- data/lib/ruby_reactor/executor/step_executor.rb +58 -11
- data/lib/ruby_reactor/executor.rb +162 -8
- data/lib/ruby_reactor/lock.rb +19 -0
- data/lib/ruby_reactor/map/element_executor.rb +6 -1
- data/lib/ruby_reactor/map/helpers.rb +1 -1
- data/lib/ruby_reactor/map/result_enumerator.rb +5 -1
- data/lib/ruby_reactor/map/result_summary.rb +63 -0
- data/lib/ruby_reactor/open_telemetry.rb +1 -1
- data/lib/ruby_reactor/reactor.rb +25 -2
- data/lib/ruby_reactor/rspec/sidekiq_helpers.rb +2 -1
- data/lib/ruby_reactor/rspec/step_executor_patch.rb +2 -2
- data/lib/ruby_reactor/rspec/test_subject.rb +66 -11
- data/lib/ruby_reactor/semaphore.rb +10 -0
- data/lib/ruby_reactor/step/async_reactor_step.rb +207 -0
- data/lib/ruby_reactor/step/compose_step.rb +1 -1
- data/lib/ruby_reactor/step/map_step.rb +1 -1
- data/lib/ruby_reactor/step_sweeper.rb +72 -0
- data/lib/ruby_reactor/step_worker.rb +260 -0
- data/lib/ruby_reactor/storage/adapter.rb +22 -1
- data/lib/ruby_reactor/storage/redis_adapter.rb +17 -13
- data/lib/ruby_reactor/storage/redis_locking.rb +7 -0
- data/lib/ruby_reactor/storage/redis_pub_sub.rb +31 -0
- data/lib/ruby_reactor/storage/redis_step_results.rb +49 -0
- data/lib/ruby_reactor/sweeper.rb +7 -1
- data/lib/ruby_reactor/sweeper_job.rb +1 -0
- data/lib/ruby_reactor/template/result.rb +151 -5
- data/lib/ruby_reactor/version.rb +1 -1
- data/lib/ruby_reactor/web/api.rb +94 -16
- data/lib/ruby_reactor/web/public/assets/index-B46p-M6K.css +1 -0
- data/lib/ruby_reactor/web/public/assets/index-DPmP4yXT.js +22 -0
- data/lib/ruby_reactor/web/public/index.html +2 -2
- data/lib/ruby_reactor/worker.rb +53 -3
- data/lib/ruby_reactor.rb +24 -3
- data/specs/001-background-async-steps/checklists/requirements.md +39 -0
- data/specs/001-background-async-steps/contracts/public-dsl.md +154 -0
- data/specs/001-background-async-steps/data-model.md +117 -0
- data/specs/001-background-async-steps/plan.md +168 -0
- data/specs/001-background-async-steps/quickstart.md +102 -0
- data/specs/001-background-async-steps/research.md +150 -0
- data/specs/001-background-async-steps/spec.md +146 -0
- data/specs/001-background-async-steps/tasks.md +271 -0
- data/specs/active_job.md +1 -1
- metadata +27 -3
- data/lib/ruby_reactor/web/public/assets/index-CCnNVQy5.css +0 -1
- data/lib/ruby_reactor/web/public/assets/index-D7IBZvos.js +0 -21
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function i(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(o){if(o.ep)return;o.ep=!0;const u=i(o);fetch(o.href,u)}})();function ch(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nd={exports:{}},rr={};var pp;function eS(){if(pp)return rr;pp=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,o,u){var f=null;if(u!==void 0&&(f=""+u),o.key!==void 0&&(f=""+o.key),"key"in o){u={};for(var m in o)m!=="key"&&(u[m]=o[m])}else u=o;return o=u.ref,{$$typeof:t,type:r,key:f,ref:o!==void 0?o:null,props:u}}return rr.Fragment=l,rr.jsx=i,rr.jsxs=i,rr}var yp;function tS(){return yp||(yp=1,nd.exports=eS()),nd.exports}var p=tS(),ad={exports:{}},Le={};var xp;function nS(){if(xp)return Le;xp=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),v=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=v&&O[v]||O["@@iterator"],typeof O=="function"?O:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,A={};function C(O,H,Q){this.props=O,this.context=H,this.refs=A,this.updater=Q||S}C.prototype.isReactComponent={},C.prototype.setState=function(O,H){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,H,"setState")},C.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function T(){}T.prototype=C.prototype;function E(O,H,Q){this.props=O,this.context=H,this.refs=A,this.updater=Q||S}var R=E.prototype=new T;R.constructor=E,_(R,C.prototype),R.isPureReactComponent=!0;var L=Array.isArray;function D(){}var B={H:null,A:null,T:null,S:null},Y=Object.prototype.hasOwnProperty;function X(O,H,Q){var J=Q.ref;return{$$typeof:t,type:O,key:H,ref:J!==void 0?J:null,props:Q}}function ie(O,H){return X(O.type,H,O.props)}function Z(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function K(O){var H={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(Q){return H[Q]})}var ae=/\/+/g;function k(O,H){return typeof O=="object"&&O!==null&&O.key!=null?K(""+O.key):H.toString(36)}function I(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(H){O.status==="pending"&&(O.status="fulfilled",O.value=H)},function(H){O.status==="pending"&&(O.status="rejected",O.reason=H)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function M(O,H,Q,J,ce){var he=typeof O;(he==="undefined"||he==="boolean")&&(O=null);var re=!1;if(O===null)re=!0;else switch(he){case"bigint":case"string":case"number":re=!0;break;case"object":switch(O.$$typeof){case t:case l:re=!0;break;case y:return re=O._init,M(re(O._payload),H,Q,J,ce)}}if(re)return ce=ce(O),re=J===""?"."+k(O,0):J,L(ce)?(Q="",re!=null&&(Q=re.replace(ae,"$&/")+"/"),M(ce,H,Q,"",function(Ce){return Ce})):ce!=null&&(Z(ce)&&(ce=ie(ce,Q+(ce.key==null||O&&O.key===ce.key?"":(""+ce.key).replace(ae,"$&/")+"/")+re)),H.push(ce)),1;re=0;var fe=J===""?".":J+":";if(L(O))for(var me=0;me<O.length;me++)J=O[me],he=fe+k(J,me),re+=M(J,H,Q,he,ce);else if(me=w(O),typeof me=="function")for(O=me.call(O),me=0;!(J=O.next()).done;)J=J.value,he=fe+k(J,me++),re+=M(J,H,Q,he,ce);else if(he==="object"){if(typeof O.then=="function")return M(I(O),H,Q,J,ce);throw H=String(O),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return re}function U(O,H,Q){if(O==null)return O;var J=[],ce=0;return M(O,J,"","",function(he){return H.call(Q,he,ce++)}),J}function j(O){if(O._status===-1){var H=O._result;H=H(),H.then(function(Q){(O._status===0||O._status===-1)&&(O._status=1,O._result=Q)},function(Q){(O._status===0||O._status===-1)&&(O._status=2,O._result=Q)}),O._status===-1&&(O._status=0,O._result=H)}if(O._status===1)return O._result.default;throw O._result}var q=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=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(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},te={map:U,forEach:function(O,H,Q){U(O,function(){H.apply(this,arguments)},Q)},count:function(O){var H=0;return U(O,function(){H++}),H},toArray:function(O){return U(O,function(H){return H})||[]},only:function(O){if(!Z(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Le.Activity=x,Le.Children=te,Le.Component=C,Le.Fragment=i,Le.Profiler=o,Le.PureComponent=E,Le.StrictMode=r,Le.Suspense=g,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,Le.__COMPILER_RUNTIME={__proto__:null,c:function(O){return B.H.useMemoCache(O)}},Le.cache=function(O){return function(){return O.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(O,H,Q){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var J=_({},O.props),ce=O.key;if(H!=null)for(he in H.key!==void 0&&(ce=""+H.key),H)!Y.call(H,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&H.ref===void 0||(J[he]=H[he]);var he=arguments.length-2;if(he===1)J.children=Q;else if(1<he){for(var re=Array(he),fe=0;fe<he;fe++)re[fe]=arguments[fe+2];J.children=re}return X(O.type,ce,J)},Le.createContext=function(O){return O={$$typeof:f,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:u,_context:O},O},Le.createElement=function(O,H,Q){var J,ce={},he=null;if(H!=null)for(J in H.key!==void 0&&(he=""+H.key),H)Y.call(H,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(ce[J]=H[J]);var re=arguments.length-2;if(re===1)ce.children=Q;else if(1<re){for(var fe=Array(re),me=0;me<re;me++)fe[me]=arguments[me+2];ce.children=fe}if(O&&O.defaultProps)for(J in re=O.defaultProps,re)ce[J]===void 0&&(ce[J]=re[J]);return X(O,he,ce)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(O){return{$$typeof:m,render:O}},Le.isValidElement=Z,Le.lazy=function(O){return{$$typeof:y,_payload:{_status:-1,_result:O},_init:j}},Le.memo=function(O,H){return{$$typeof:h,type:O,compare:H===void 0?null:H}},Le.startTransition=function(O){var H=B.T,Q={};B.T=Q;try{var J=O(),ce=B.S;ce!==null&&ce(Q,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(D,q)}catch(he){q(he)}finally{H!==null&&Q.types!==null&&(H.types=Q.types),B.T=H}},Le.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},Le.use=function(O){return B.H.use(O)},Le.useActionState=function(O,H,Q){return B.H.useActionState(O,H,Q)},Le.useCallback=function(O,H){return B.H.useCallback(O,H)},Le.useContext=function(O){return B.H.useContext(O)},Le.useDebugValue=function(){},Le.useDeferredValue=function(O,H){return B.H.useDeferredValue(O,H)},Le.useEffect=function(O,H){return B.H.useEffect(O,H)},Le.useEffectEvent=function(O){return B.H.useEffectEvent(O)},Le.useId=function(){return B.H.useId()},Le.useImperativeHandle=function(O,H,Q){return B.H.useImperativeHandle(O,H,Q)},Le.useInsertionEffect=function(O,H){return B.H.useInsertionEffect(O,H)},Le.useLayoutEffect=function(O,H){return B.H.useLayoutEffect(O,H)},Le.useMemo=function(O,H){return B.H.useMemo(O,H)},Le.useOptimistic=function(O,H){return B.H.useOptimistic(O,H)},Le.useReducer=function(O,H,Q){return B.H.useReducer(O,H,Q)},Le.useRef=function(O){return B.H.useRef(O)},Le.useState=function(O){return B.H.useState(O)},Le.useSyncExternalStore=function(O,H,Q){return B.H.useSyncExternalStore(O,H,Q)},Le.useTransition=function(){return B.H.useTransition()},Le.version="19.2.3",Le}var vp;function Or(){return vp||(vp=1,ad.exports=nS()),ad.exports}var z=Or();const Bc=ch(z);var ld={exports:{}},or={},id={exports:{}},sd={};var bp;function aS(){return bp||(bp=1,(function(t){function l(M,U){var j=M.length;M.push(U);e:for(;0<j;){var q=j-1>>>1,te=M[q];if(0<o(te,U))M[q]=U,M[j]=te,j=q;else break e}}function i(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var U=M[0],j=M.pop();if(j!==U){M[0]=j;e:for(var q=0,te=M.length,O=te>>>1;q<O;){var H=2*(q+1)-1,Q=M[H],J=H+1,ce=M[J];if(0>o(Q,j))J<te&&0>o(ce,Q)?(M[q]=ce,M[J]=j,q=J):(M[q]=Q,M[H]=j,q=H);else if(J<te&&0>o(ce,j))M[q]=ce,M[J]=j,q=J;else break e}}return U}function o(M,U){var j=M.sortIndex-U.sortIndex;return j!==0?j:M.id-U.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 f=Date,m=f.now();t.unstable_now=function(){return f.now()-m}}var g=[],h=[],y=1,x=null,v=3,w=!1,S=!1,_=!1,A=!1,C=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function R(M){for(var U=i(h);U!==null;){if(U.callback===null)r(h);else if(U.startTime<=M)r(h),U.sortIndex=U.expirationTime,l(g,U);else break;U=i(h)}}function L(M){if(_=!1,R(M),!S)if(i(g)!==null)S=!0,D||(D=!0,K());else{var U=i(h);U!==null&&I(L,U.startTime-M)}}var D=!1,B=-1,Y=5,X=-1;function ie(){return A?!0:!(t.unstable_now()-X<Y)}function Z(){if(A=!1,D){var M=t.unstable_now();X=M;var U=!0;try{e:{S=!1,_&&(_=!1,T(B),B=-1),w=!0;var j=v;try{t:{for(R(M),x=i(g);x!==null&&!(x.expirationTime>M&&ie());){var q=x.callback;if(typeof q=="function"){x.callback=null,v=x.priorityLevel;var te=q(x.expirationTime<=M);if(M=t.unstable_now(),typeof te=="function"){x.callback=te,R(M),U=!0;break t}x===i(g)&&r(g),R(M)}else r(g);x=i(g)}if(x!==null)U=!0;else{var O=i(h);O!==null&&I(L,O.startTime-M),U=!1}}break e}finally{x=null,v=j,w=!1}U=void 0}}finally{U?K():D=!1}}}var K;if(typeof E=="function")K=function(){E(Z)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,k=ae.port2;ae.port1.onmessage=Z,K=function(){k.postMessage(null)}}else K=function(){C(Z,0)};function I(M,U){B=C(function(){M(t.unstable_now())},U)}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(M){M.callback=null},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(M){switch(v){case 1:case 2:case 3:var U=3;break;default:U=v}var j=v;v=U;try{return M()}finally{v=j}},t.unstable_requestPaint=function(){A=!0},t.unstable_runWithPriority=function(M,U){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var j=v;v=M;try{return U()}finally{v=j}},t.unstable_scheduleCallback=function(M,U,j){var q=t.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?q+j:q):j=q,M){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=j+te,M={id:y++,callback:U,priorityLevel:M,startTime:j,expirationTime:te,sortIndex:-1},j>q?(M.sortIndex=j,l(h,M),i(g)===null&&M===i(h)&&(_?(T(B),B=-1):_=!0,I(L,j-q))):(M.sortIndex=te,l(g,M),S||w||(S=!0,D||(D=!0,K()))),M},t.unstable_shouldYield=ie,t.unstable_wrapCallback=function(M){var U=v;return function(){var j=v;v=U;try{return M.apply(this,arguments)}finally{v=j}}}})(sd)),sd}var Ep;function lS(){return Ep||(Ep=1,id.exports=aS()),id.exports}var rd={exports:{}},cn={};var Sp;function iS(){if(Sp)return cn;Sp=1;var t=Or();function l(g){var h="https://react.dev/errors/"+g;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)h+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(g,h,y){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:x==null?null:""+x,children:g,containerInfo:h,implementation:y}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,h){if(g==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return cn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,cn.createPortal=function(g,h){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(l(299));return u(g,h,null,y)},cn.flushSync=function(g){var h=f.T,y=r.p;try{if(f.T=null,r.p=2,g)return g()}finally{f.T=h,r.p=y,r.d.f()}},cn.preconnect=function(g,h){typeof g=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(g,h))},cn.prefetchDNS=function(g){typeof g=="string"&&r.d.D(g)},cn.preinit=function(g,h){if(typeof g=="string"&&h&&typeof h.as=="string"){var y=h.as,x=m(y,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;y==="style"?r.d.S(g,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:x,integrity:v,fetchPriority:w}):y==="script"&&r.d.X(g,{crossOrigin:x,integrity:v,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},cn.preinitModule=function(g,h){if(typeof g=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var y=m(h.as,h.crossOrigin);r.d.M(g,{crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(g)},cn.preload=function(g,h){if(typeof g=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var y=h.as,x=m(y,h.crossOrigin);r.d.L(g,y,{crossOrigin:x,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})}},cn.preloadModule=function(g,h){if(typeof g=="string")if(h){var y=m(h.as,h.crossOrigin);r.d.m(g,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:y,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(g)},cn.requestFormReset=function(g){r.d.r(g)},cn.unstable_batchedUpdates=function(g,h){return g(h)},cn.useFormState=function(g,h,y){return f.H.useFormState(g,h,y)},cn.useFormStatus=function(){return f.H.useHostTransitionStatus()},cn.version="19.2.3",cn}var wp;function lx(){if(wp)return rd.exports;wp=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),rd.exports=iS(),rd.exports}var _p;function sS(){if(_p)return or;_p=1;var t=lS(),l=Or(),i=lx();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function f(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 m(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 g(e){if(u(e)!==e)throw Error(r(188))}function h(e){var n=e.alternate;if(!n){if(n=u(e),n===null)throw Error(r(188));return n!==e?null:e}for(var a=e,s=n;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(s=c.return,s!==null){a=s;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return g(c),e;if(d===s)return g(c),n;d=d.sibling}throw Error(r(188))}if(a.return!==s.return)a=c,s=d;else{for(var b=!1,N=c.child;N;){if(N===a){b=!0,a=c,s=d;break}if(N===s){b=!0,s=c,a=d;break}N=N.sibling}if(!b){for(N=d.child;N;){if(N===a){b=!0,a=d,s=c;break}if(N===s){b=!0,s=d,a=c;break}N=N.sibling}if(!b)throw Error(r(189))}}if(a.alternate!==s)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:n}function y(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=y(e),n!==null)return n;e=e.sibling}return null}var x=Object.assign,v=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),E=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=Z&&e[Z]||e["@@iterator"],typeof e=="function"?e:null)}var ae=Symbol.for("react.client.reference");function k(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case _:return"Fragment";case C:return"Profiler";case A:return"StrictMode";case L:return"Suspense";case D:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case E:return e.displayName||"Context";case T:return(e._context.displayName||"Context")+".Consumer";case R:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return n=e.displayName||null,n!==null?n:k(e.type)||"Memo";case Y:n=e._payload,e=e._init;try{return k(e(n))}catch{}}return null}var I=Array.isArray,M=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j={pending:!1,data:null,method:null,action:null},q=[],te=-1;function O(e){return{current:e}}function H(e){0>te||(e.current=q[te],q[te]=null,te--)}function Q(e,n){te++,q[te]=e.current,e.current=n}var J=O(null),ce=O(null),he=O(null),re=O(null);function fe(e,n){switch(Q(he,n),Q(ce,e),Q(J,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Ug(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Ug(n),e=$g(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(J),Q(J,e)}function me(){H(J),H(ce),H(he)}function Ce(e){e.memoizedState!==null&&Q(re,e);var n=J.current,a=$g(n,e.type);n!==a&&(Q(ce,e),Q(J,a))}function xe(e){ce.current===e&&(H(J),H(ce)),re.current===e&&(H(re),ar._currentValue=j)}var ve,_e;function He(e){if(ve===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);ve=n&&n[1]||"",_e=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+ve+e+_e}var lt=!1;function Re(e,n){if(!e||lt)return"";lt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(n){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(ne){var ee=ne}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(ne){ee=ne}e.call(ue.prototype)}}else{try{throw Error()}catch(ne){ee=ne}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(ne){if(ne&&ee&&typeof ne.stack=="string")return[ne.stack,ee.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=s.DetermineComponentFrameRoot(),b=d[0],N=d[1];if(b&&N){var $=b.split(`
|
|
4
|
+
`),W=N.split(`
|
|
5
|
+
`);for(c=s=0;s<$.length&&!$[s].includes("DetermineComponentFrameRoot");)s++;for(;c<W.length&&!W[c].includes("DetermineComponentFrameRoot");)c++;if(s===$.length||c===W.length)for(s=$.length-1,c=W.length-1;1<=s&&0<=c&&$[s]!==W[c];)c--;for(;1<=s&&0<=c;s--,c--)if($[s]!==W[c]){if(s!==1||c!==1)do if(s--,c--,0>c||$[s]!==W[c]){var le=`
|
|
6
|
+
`+$[s].replace(" at new "," at ");return e.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",e.displayName)),le}while(1<=s&&0<=c);break}}}finally{lt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?He(a):""}function Be(e,n){switch(e.tag){case 26:case 27:case 5:return He(e.type);case 16:return He("Lazy");case 13:return e.child!==n&&n!==null?He("Suspense Fallback"):He("Suspense");case 19:return He("SuspenseList");case 0:case 15:return Re(e.type,!1);case 11:return Re(e.type.render,!1);case 1:return Re(e.type,!0);case 31:return He("Activity");default:return""}}function Pe(e){try{var n="",a=null;do n+=Be(e,a),a=e,e=e.return;while(e);return n}catch(s){return`
|
|
7
|
+
Error generating stack: `+s.message+`
|
|
8
|
+
`+s.stack}}var Ge=Object.prototype.hasOwnProperty,xt=t.unstable_scheduleCallback,It=t.unstable_cancelCallback,gt=t.unstable_shouldYield,vt=t.unstable_requestPaint,Fe=t.unstable_now,zn=t.unstable_getCurrentPriorityLevel,Gt=t.unstable_ImmediatePriority,ln=t.unstable_UserBlockingPriority,At=t.unstable_NormalPriority,fn=t.unstable_LowPriority,jn=t.unstable_IdlePriority,$l=t.log,ya=t.unstable_setDisableYieldValue,xa=null,Qt=null;function Dn(e){if(typeof $l=="function"&&ya(e),Qt&&typeof Qt.setStrictMode=="function")try{Qt.setStrictMode(xa,e)}catch{}}var Pt=Math.clz32?Math.clz32:xi,ps=Math.log,Vl=Math.LN2;function xi(e){return e>>>=0,e===0?32:31-(ps(e)/Vl|0)|0}var va=256,nl=262144,ba=4194304;function sn(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 V(e,n,a){var s=e.pendingLanes;if(s===0)return 0;var c=0,d=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var N=s&134217727;return N!==0?(s=N&~d,s!==0?c=sn(s):(b&=N,b!==0?c=sn(b):a||(a=N&~e,a!==0&&(c=sn(a))))):(N=s&~d,N!==0?c=sn(N):b!==0?c=sn(b):a||(a=s&~e,a!==0&&(c=sn(a)))),c===0?0:n!==0&&n!==c&&(n&d)===0&&(d=c&-c,a=n&-n,d>=a||d===32&&(a&4194048)!==0)?n:c}function se(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function pe(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 ke(){var e=ba;return ba<<=1,(ba&62914560)===0&&(ba=4194304),e}function pt(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function rt(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ee(e,n,a,s,c,d){var b=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var N=e.entanglements,$=e.expirationTimes,W=e.hiddenUpdates;for(a=b&~a;0<a;){var le=31-Pt(a),ue=1<<le;N[le]=0,$[le]=-1;var ee=W[le];if(ee!==null)for(W[le]=null,le=0;le<ee.length;le++){var ne=ee[le];ne!==null&&(ne.lane&=-536870913)}a&=~ue}s!==0&&ye(e,s,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(b&~n))}function ye(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var s=31-Pt(n);e.entangledLanes|=n,e.entanglements[s]=e.entanglements[s]|1073741824|a&261930}function ze(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var s=31-Pt(a),c=1<<s;c&n|e[s]&n&&(e[s]|=n),a&=~c}}function Ct(e,n){var a=n&-n;return a=(a&42)!==0?1:bt(a),(a&(e.suspendedLanes|n))!==0?0:a}function bt(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 Zn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function al(){var e=U.p;return e!==0?e:(e=window.event,e===void 0?32:cp(e.type))}function ll(e,n){var a=U.p;try{return U.p=e,n()}finally{U.p=a}}var kn=Math.random().toString(36).slice(2),Mt="__reactFiber$"+kn,Kt="__reactProps$"+kn,In="__reactContainer$"+kn,il="__reactEvents$"+kn,Yl="__reactListeners$"+kn,sl="__reactHandles$"+kn,vi="__reactResources$"+kn,Ea="__reactMarker$"+kn;function ql(e){delete e[Mt],delete e[Kt],delete e[il],delete e[Yl],delete e[sl]}function Wt(e){var n=e[Mt];if(n)return n;for(var a=e.parentNode;a;){if(n=a[In]||a[Mt]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=Ig(e);e!==null;){if(a=e[Mt])return a;e=Ig(e)}return n}e=a,a=e.parentNode}return null}function Qn(e){if(e=e[Mt]||e[In]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Kn(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function sa(e){var n=e[vi];return n||(n=e[vi]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function zt(e){e[Ea]=!0}var bi=new Set,Sa={};function Fn(e,n){de(e,n),de(e+"Capture",n)}function de(e,n){for(Sa[e]=n,e=0;e<n.length;e++)bi.add(n[e])}var Me=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]*$"),Ve={},it={};function Tt(e){return Ge.call(it,e)?!0:Ge.call(Ve,e)?!1:Me.test(e)?it[e]=!0:(Ve[e]=!0,!1)}function Ft(e,n,a){if(Tt(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function dn(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function rn(e,n,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+s)}}function ft(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hn(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ei(e,n,a){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,d=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(b){a=""+b,d.call(this,b)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function wa(e){if(!e._valueTracker){var n=hn(e)?"checked":"value";e._valueTracker=Ei(e,n,""+e[n])}}function Gl(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),s="";return e&&(s=hn(e)?e.checked?"true":"false":e.value),e=s,e!==a?(n.setValue(e),!0):!1}function _a(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 ys=/[\n"\\]/g;function on(e){return e.replace(ys,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Na(e,n,a,s,c,d,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=""+ft(n)):e.value!==""+ft(n)&&(e.value=""+ft(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?rl(e,b,ft(n)):a!=null?rl(e,b,ft(a)):s!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?e.name=""+ft(N):e.removeAttribute("name")}function Aa(e,n,a,s,c,d,b,N){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){wa(e);return}a=a!=null?""+ft(a):"",n=n!=null?""+ft(n):a,N||n===e.value||(e.value=n),e.defaultValue=n}s=s??c,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=N?e.checked:!!s,e.defaultChecked=!!s,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),wa(e)}function rl(e,n,a){n==="number"&&_a(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Ht(e,n,a,s){if(e=e.options,n){n={};for(var c=0;c<a.length;c++)n["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=n.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&s&&(e[a].defaultSelected=!0)}else{for(a=""+ft(a),n=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,s&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function qr(e,n,a){if(n!=null&&(n=""+ft(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+ft(a):""}function Si(e,n,a,s){if(n==null){if(s!=null){if(a!=null)throw Error(r(92));if(I(s)){if(1<s.length)throw Error(r(93));s=s[0]}a=s}a==null&&(a=""),n=a}a=ft(n),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s),wa(e)}function De(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var Gr=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 Bt(e,n,a){var s=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?s?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":s?e.setProperty(n,a):typeof a!="number"||a===0||Gr.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function ot(e,n,a){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,a!=null){for(var s in a)!a.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var c in n)s=n[c],n.hasOwnProperty(c)&&a[c]!==s&&Bt(e,c,s)}else for(var d in n)n.hasOwnProperty(d)&&Bt(e,d,n[d])}function ol(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 Ca=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"]]),xs=/^[\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 cl(e){return xs.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ge(){}var Ne=null;function Ue(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ie=null,Rt=null;function Ln(e){var n=Qn(e);if(n&&(e=n.stateNode)){var a=e[Kt]||null;e:switch(e=n.stateNode,n.type){case"input":if(Na(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+on(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var s=a[n];if(s!==e&&s.form===e.form){var c=s[Kt]||null;if(!c)throw Error(r(90));Na(s,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(n=0;n<a.length;n++)s=a[n],s.form===e.form&&Gl(s)}break e;case"textarea":qr(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Ht(e,!!a.multiple,n,!1)}}}var vs=!1;function Xr(e,n,a){if(vs)return e(n,a);vs=!0;try{var s=e(n);return s}finally{if(vs=!1,(Ie!==null||Rt!==null)&&(jo(),Ie&&(n=Ie,e=Rt,Rt=Ie=null,Ln(n),e)))for(n=0;n<e.length;n++)Ln(e[n])}}function bs(e,n){var a=e.stateNode;if(a===null)return null;var s=a[Kt]||null;if(s===null)return null;a=s[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,n,typeof a));return a}var Ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),tu=!1;if(Ma)try{var Es={};Object.defineProperty(Es,"passive",{get:function(){tu=!0}}),window.addEventListener("test",Es,Es),window.removeEventListener("test",Es,Es)}catch{tu=!1}var ul=null,nu=null,Zr=null;function $h(){if(Zr)return Zr;var e,n=nu,a=n.length,s,c="value"in ul?ul.value:ul.textContent,d=c.length;for(e=0;e<a&&n[e]===c[e];e++);var b=a-e;for(s=1;s<=b&&n[a-s]===c[d-s];s++);return Zr=c.slice(e,1<s?1-s:void 0)}function Ir(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 Qr(){return!0}function Vh(){return!1}function gn(e){function n(a,s,c,d,b){this._reactName=a,this._targetInst=c,this.type=s,this.nativeEvent=d,this.target=b,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(a=e[N],this[N]=a?a(d):d[N]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Qr:Vh,this.isPropagationStopped=Vh,this}return x(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Qr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Qr)},persist:function(){},isPersistent:Qr}),n}var Xl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Kr=gn(Xl),Ss=x({},Xl,{view:0,detail:0}),Pb=gn(Ss),au,lu,ws,Fr=x({},Ss,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:su,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!==ws&&(ws&&e.type==="mousemove"?(au=e.screenX-ws.screenX,lu=e.screenY-ws.screenY):lu=au=0,ws=e),au)},movementY:function(e){return"movementY"in e?e.movementY:lu}}),Yh=gn(Fr),Wb=x({},Fr,{dataTransfer:0}),e1=gn(Wb),t1=x({},Ss,{relatedTarget:0}),iu=gn(t1),n1=x({},Xl,{animationName:0,elapsedTime:0,pseudoElement:0}),a1=gn(n1),l1=x({},Xl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),i1=gn(l1),s1=x({},Xl,{data:0}),qh=gn(s1),r1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},o1={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"},c1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function u1(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=c1[e])?!!n[e]:!1}function su(){return u1}var f1=x({},Ss,{key:function(e){if(e.key){var n=r1[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ir(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?o1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:su,charCode:function(e){return e.type==="keypress"?Ir(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ir(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),d1=gn(f1),h1=x({},Fr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Gh=gn(h1),m1=x({},Ss,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:su}),g1=gn(m1),p1=x({},Xl,{propertyName:0,elapsedTime:0,pseudoElement:0}),y1=gn(p1),x1=x({},Fr,{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}),v1=gn(x1),b1=x({},Xl,{newState:0,oldState:0}),E1=gn(b1),S1=[9,13,27,32],ru=Ma&&"CompositionEvent"in window,_s=null;Ma&&"documentMode"in document&&(_s=document.documentMode);var w1=Ma&&"TextEvent"in window&&!_s,Xh=Ma&&(!ru||_s&&8<_s&&11>=_s),Zh=" ",Ih=!1;function Qh(e,n){switch(e){case"keyup":return S1.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wi=!1;function _1(e,n){switch(e){case"compositionend":return Kh(n);case"keypress":return n.which!==32?null:(Ih=!0,Zh);case"textInput":return e=n.data,e===Zh&&Ih?null:e;default:return null}}function N1(e,n){if(wi)return e==="compositionend"||!ru&&Qh(e,n)?(e=$h(),Zr=nu=ul=null,wi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Xh&&n.locale!=="ko"?null:n.data;default:return null}}var A1={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 Fh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!A1[e.type]:n==="textarea"}function Jh(e,n,a,s){Ie?Rt?Rt.push(s):Rt=[s]:Ie=s,n=$o(n,"onChange"),0<n.length&&(a=new Kr("onChange","change",null,a,s),e.push({event:a,listeners:n}))}var Ns=null,As=null;function C1(e){jg(e,0)}function Jr(e){var n=Kn(e);if(Gl(n))return e}function Ph(e,n){if(e==="change")return n}var Wh=!1;if(Ma){var ou;if(Ma){var cu="oninput"in document;if(!cu){var em=document.createElement("div");em.setAttribute("oninput","return;"),cu=typeof em.oninput=="function"}ou=cu}else ou=!1;Wh=ou&&(!document.documentMode||9<document.documentMode)}function tm(){Ns&&(Ns.detachEvent("onpropertychange",nm),As=Ns=null)}function nm(e){if(e.propertyName==="value"&&Jr(As)){var n=[];Jh(n,As,e,Ue(e)),Xr(C1,n)}}function M1(e,n,a){e==="focusin"?(tm(),Ns=n,As=a,Ns.attachEvent("onpropertychange",nm)):e==="focusout"&&tm()}function T1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Jr(As)}function R1(e,n){if(e==="click")return Jr(n)}function O1(e,n){if(e==="input"||e==="change")return Jr(n)}function z1(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Sn=typeof Object.is=="function"?Object.is:z1;function Cs(e,n){if(Sn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),s=Object.keys(n);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var c=a[s];if(!Ge.call(n,c)||!Sn(e[c],n[c]))return!1}return!0}function am(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lm(e,n){var a=am(e);e=0;for(var s;a;){if(a.nodeType===3){if(s=e+a.textContent.length,e<=n&&s>=n)return{node:a,offset:n-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=am(a)}}function im(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?im(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function sm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=_a(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=_a(e.document)}return n}function uu(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 j1=Ma&&"documentMode"in document&&11>=document.documentMode,_i=null,fu=null,Ms=null,du=!1;function rm(e,n,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;du||_i==null||_i!==_a(s)||(s=_i,"selectionStart"in s&&uu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Ms&&Cs(Ms,s)||(Ms=s,s=$o(fu,"onSelect"),0<s.length&&(n=new Kr("onSelect","select",null,n,a),e.push({event:n,listeners:s}),n.target=_i)))}function Zl(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var Ni={animationend:Zl("Animation","AnimationEnd"),animationiteration:Zl("Animation","AnimationIteration"),animationstart:Zl("Animation","AnimationStart"),transitionrun:Zl("Transition","TransitionRun"),transitionstart:Zl("Transition","TransitionStart"),transitioncancel:Zl("Transition","TransitionCancel"),transitionend:Zl("Transition","TransitionEnd")},hu={},om={};Ma&&(om=document.createElement("div").style,"AnimationEvent"in window||(delete Ni.animationend.animation,delete Ni.animationiteration.animation,delete Ni.animationstart.animation),"TransitionEvent"in window||delete Ni.transitionend.transition);function Il(e){if(hu[e])return hu[e];if(!Ni[e])return e;var n=Ni[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in om)return hu[e]=n[a];return e}var cm=Il("animationend"),um=Il("animationiteration"),fm=Il("animationstart"),D1=Il("transitionrun"),k1=Il("transitionstart"),L1=Il("transitioncancel"),dm=Il("transitionend"),hm=new Map,mu="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(" ");mu.push("scrollEnd");function Jn(e,n){hm.set(e,n),Fn(n,[e])}var Pr=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)},Hn=[],Ai=0,gu=0;function Wr(){for(var e=Ai,n=gu=Ai=0;n<e;){var a=Hn[n];Hn[n++]=null;var s=Hn[n];Hn[n++]=null;var c=Hn[n];Hn[n++]=null;var d=Hn[n];if(Hn[n++]=null,s!==null&&c!==null){var b=s.pending;b===null?c.next=c:(c.next=b.next,b.next=c),s.pending=c}d!==0&&mm(a,c,d)}}function eo(e,n,a,s){Hn[Ai++]=e,Hn[Ai++]=n,Hn[Ai++]=a,Hn[Ai++]=s,gu|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function pu(e,n,a,s){return eo(e,n,a,s),to(e)}function Ql(e,n){return eo(e,null,null,n),to(e)}function mm(e,n,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,s=d.alternate,s!==null&&(s.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&n!==null&&(c=31-Pt(a),e=d.hiddenUpdates,s=e[c],s===null?e[c]=[n]:s.push(n),n.lane=a|536870912),d):null}function to(e){if(50<Fs)throw Fs=0,Af=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Ci={};function H1(e,n,a,s){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function wn(e,n,a,s){return new H1(e,n,a,s)}function yu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ta(e,n){var a=e.alternate;return a===null?(a=wn(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function gm(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function no(e,n,a,s,c,d){var b=0;if(s=e,typeof e=="function")yu(e)&&(b=1);else if(typeof e=="string")b=YE(e,a,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=wn(31,a,n,c),e.elementType=X,e.lanes=d,e;case _:return Kl(a.children,c,d,n);case A:b=8,c|=24;break;case C:return e=wn(12,a,n,c|2),e.elementType=C,e.lanes=d,e;case L:return e=wn(13,a,n,c),e.elementType=L,e.lanes=d,e;case D:return e=wn(19,a,n,c),e.elementType=D,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case E:b=10;break e;case T:b=9;break e;case R:b=11;break e;case B:b=14;break e;case Y:b=16,s=null;break e}b=29,a=Error(r(130,e===null?"null":typeof e,"")),s=null}return n=wn(b,a,n,c),n.elementType=e,n.type=s,n.lanes=d,n}function Kl(e,n,a,s){return e=wn(7,e,s,n),e.lanes=a,e}function xu(e,n,a){return e=wn(6,e,null,n),e.lanes=a,e}function pm(e){var n=wn(18,null,null,0);return n.stateNode=e,n}function vu(e,n,a){return n=wn(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var ym=new WeakMap;function Bn(e,n){if(typeof e=="object"&&e!==null){var a=ym.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Pe(n)},ym.set(e,n),n)}return{value:e,source:n,stack:Pe(n)}}var Mi=[],Ti=0,ao=null,Ts=0,Un=[],$n=0,fl=null,ra=1,oa="";function Ra(e,n){Mi[Ti++]=Ts,Mi[Ti++]=ao,ao=e,Ts=n}function xm(e,n,a){Un[$n++]=ra,Un[$n++]=oa,Un[$n++]=fl,fl=e;var s=ra;e=oa;var c=32-Pt(s)-1;s&=~(1<<c),a+=1;var d=32-Pt(n)+c;if(30<d){var b=c-c%5;d=(s&(1<<b)-1).toString(32),s>>=b,c-=b,ra=1<<32-Pt(n)+c|a<<c|s,oa=d+e}else ra=1<<d|a<<c|s,oa=e}function bu(e){e.return!==null&&(Ra(e,1),xm(e,1,0))}function Eu(e){for(;e===ao;)ao=Mi[--Ti],Mi[Ti]=null,Ts=Mi[--Ti],Mi[Ti]=null;for(;e===fl;)fl=Un[--$n],Un[$n]=null,oa=Un[--$n],Un[$n]=null,ra=Un[--$n],Un[$n]=null}function vm(e,n){Un[$n++]=ra,Un[$n++]=oa,Un[$n++]=fl,ra=n.id,oa=n.overflow,fl=e}var en=null,Et=null,Je=!1,dl=null,Vn=!1,Su=Error(r(519));function hl(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Rs(Bn(n,e)),Su}function bm(e){var n=e.stateNode,a=e.type,s=e.memoizedProps;switch(n[Mt]=e,n[Kt]=s,a){case"dialog":Ze("cancel",n),Ze("close",n);break;case"iframe":case"object":case"embed":Ze("load",n);break;case"video":case"audio":for(a=0;a<Ps.length;a++)Ze(Ps[a],n);break;case"source":Ze("error",n);break;case"img":case"image":case"link":Ze("error",n),Ze("load",n);break;case"details":Ze("toggle",n);break;case"input":Ze("invalid",n),Aa(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ze("invalid",n);break;case"textarea":Ze("invalid",n),Si(n,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||s.suppressHydrationWarning===!0||Hg(n.textContent,a)?(s.popover!=null&&(Ze("beforetoggle",n),Ze("toggle",n)),s.onScroll!=null&&Ze("scroll",n),s.onScrollEnd!=null&&Ze("scrollend",n),s.onClick!=null&&(n.onclick=ge),n=!0):n=!1,n||hl(e,!0)}function Em(e){for(en=e.return;en;)switch(en.tag){case 5:case 31:case 13:Vn=!1;return;case 27:case 3:Vn=!0;return;default:en=en.return}}function Ri(e){if(e!==en)return!1;if(!Je)return Em(e),Je=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Vf(e.type,e.memoizedProps)),a=!a),a&&Et&&hl(e),Em(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Et=Zg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Et=Zg(e)}else n===27?(n=Et,Cl(e.type)?(e=Zf,Zf=null,Et=e):Et=n):Et=en?qn(e.stateNode.nextSibling):null;return!0}function Fl(){Et=en=null,Je=!1}function wu(){var e=dl;return e!==null&&(vn===null?vn=e:vn.push.apply(vn,e),dl=null),e}function Rs(e){dl===null?dl=[e]:dl.push(e)}var _u=O(null),Jl=null,Oa=null;function ml(e,n,a){Q(_u,n._currentValue),n._currentValue=a}function za(e){e._currentValue=_u.current,H(_u)}function Nu(e,n,a){for(;e!==null;){var s=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),e===a)break;e=e.return}}function Au(e,n,a,s){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var b=c.child;d=d.firstContext;e:for(;d!==null;){var N=d;d=c;for(var $=0;$<n.length;$++)if(N.context===n[$]){d.lanes|=a,N=d.alternate,N!==null&&(N.lanes|=a),Nu(d.return,a,e),s||(b=null);break e}d=N.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(r(341));b.lanes|=a,d=b.alternate,d!==null&&(d.lanes|=a),Nu(b,a,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function Oi(e,n,a,s){e=null;for(var c=n,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(r(387));if(b=b.memoizedProps,b!==null){var N=c.type;Sn(c.pendingProps.value,b.value)||(e!==null?e.push(N):e=[N])}}else if(c===re.current){if(b=c.alternate,b===null)throw Error(r(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(ar):e=[ar])}c=c.return}e!==null&&Au(n,e,a,s),n.flags|=262144}function lo(e){for(e=e.firstContext;e!==null;){if(!Sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Pl(e){Jl=e,Oa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function tn(e){return Sm(Jl,e)}function io(e,n){return Jl===null&&Pl(e),Sm(e,n)}function Sm(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Oa===null){if(e===null)throw Error(r(308));Oa=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Oa=Oa.next=n;return a}var B1=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,s){e.push(s)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},U1=t.unstable_scheduleCallback,$1=t.unstable_NormalPriority,Ut={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cu(){return{controller:new B1,data:new Map,refCount:0}}function Os(e){e.refCount--,e.refCount===0&&U1($1,function(){e.controller.abort()})}var zs=null,Mu=0,zi=0,ji=null;function V1(e,n){if(zs===null){var a=zs=[];Mu=0,zi=zf(),ji={status:"pending",value:void 0,then:function(s){a.push(s)}}}return Mu++,n.then(wm,wm),n}function wm(){if(--Mu===0&&zs!==null){ji!==null&&(ji.status="fulfilled");var e=zs;zs=null,zi=0,ji=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Y1(e,n){var a=[],s={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){s.status="fulfilled",s.value=n;for(var c=0;c<a.length;c++)(0,a[c])(n)},function(c){for(s.status="rejected",s.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),s}var _m=M.S;M.S=function(e,n){rg=Fe(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&V1(e,n),_m!==null&&_m(e,n)};var Wl=O(null);function Tu(){var e=Wl.current;return e!==null?e:yt.pooledCache}function so(e,n){n===null?Q(Wl,Wl.current):Q(Wl,n.pool)}function Nm(){var e=Tu();return e===null?null:{parent:Ut._currentValue,pool:e}}var Di=Error(r(460)),Ru=Error(r(474)),ro=Error(r(542)),oo={then:function(){}};function Am(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Cm(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(ge,ge),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Tm(e),e;default:if(typeof n.status=="string")n.then(ge,ge);else{if(e=yt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(s){if(n.status==="pending"){var c=n;c.status="fulfilled",c.value=s}},function(s){if(n.status==="pending"){var c=n;c.status="rejected",c.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Tm(e),e}throw ti=n,Di}}function ei(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ti=a,Di):a}}var ti=null;function Mm(){if(ti===null)throw Error(r(459));var e=ti;return ti=null,e}function Tm(e){if(e===Di||e===ro)throw Error(r(483))}var ki=null,js=0;function co(e){var n=js;return js+=1,ki===null&&(ki=[]),Cm(ki,e,n)}function Ds(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function uo(e,n){throw n.$$typeof===v?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Rm(e){function n(F,G){if(e){var P=F.deletions;P===null?(F.deletions=[G],F.flags|=16):P.push(G)}}function a(F,G){if(!e)return null;for(;G!==null;)n(F,G),G=G.sibling;return null}function s(F){for(var G=new Map;F!==null;)F.key!==null?G.set(F.key,F):G.set(F.index,F),F=F.sibling;return G}function c(F,G){return F=Ta(F,G),F.index=0,F.sibling=null,F}function d(F,G,P){return F.index=P,e?(P=F.alternate,P!==null?(P=P.index,P<G?(F.flags|=67108866,G):P):(F.flags|=67108866,G)):(F.flags|=1048576,G)}function b(F){return e&&F.alternate===null&&(F.flags|=67108866),F}function N(F,G,P,oe){return G===null||G.tag!==6?(G=xu(P,F.mode,oe),G.return=F,G):(G=c(G,P),G.return=F,G)}function $(F,G,P,oe){var Oe=P.type;return Oe===_?le(F,G,P.props.children,oe,P.key):G!==null&&(G.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===Y&&ei(Oe)===G.type)?(G=c(G,P.props),Ds(G,P),G.return=F,G):(G=no(P.type,P.key,P.props,null,F.mode,oe),Ds(G,P),G.return=F,G)}function W(F,G,P,oe){return G===null||G.tag!==4||G.stateNode.containerInfo!==P.containerInfo||G.stateNode.implementation!==P.implementation?(G=vu(P,F.mode,oe),G.return=F,G):(G=c(G,P.children||[]),G.return=F,G)}function le(F,G,P,oe,Oe){return G===null||G.tag!==7?(G=Kl(P,F.mode,oe,Oe),G.return=F,G):(G=c(G,P),G.return=F,G)}function ue(F,G,P){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=xu(""+G,F.mode,P),G.return=F,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case w:return P=no(G.type,G.key,G.props,null,F.mode,P),Ds(P,G),P.return=F,P;case S:return G=vu(G,F.mode,P),G.return=F,G;case Y:return G=ei(G),ue(F,G,P)}if(I(G)||K(G))return G=Kl(G,F.mode,P,null),G.return=F,G;if(typeof G.then=="function")return ue(F,co(G),P);if(G.$$typeof===E)return ue(F,io(F,G),P);uo(F,G)}return null}function ee(F,G,P,oe){var Oe=G!==null?G.key:null;if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return Oe!==null?null:N(F,G,""+P,oe);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case w:return P.key===Oe?$(F,G,P,oe):null;case S:return P.key===Oe?W(F,G,P,oe):null;case Y:return P=ei(P),ee(F,G,P,oe)}if(I(P)||K(P))return Oe!==null?null:le(F,G,P,oe,null);if(typeof P.then=="function")return ee(F,G,co(P),oe);if(P.$$typeof===E)return ee(F,G,io(F,P),oe);uo(F,P)}return null}function ne(F,G,P,oe,Oe){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return F=F.get(P)||null,N(G,F,""+oe,Oe);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case w:return F=F.get(oe.key===null?P:oe.key)||null,$(G,F,oe,Oe);case S:return F=F.get(oe.key===null?P:oe.key)||null,W(G,F,oe,Oe);case Y:return oe=ei(oe),ne(F,G,P,oe,Oe)}if(I(oe)||K(oe))return F=F.get(P)||null,le(G,F,oe,Oe,null);if(typeof oe.then=="function")return ne(F,G,P,co(oe),Oe);if(oe.$$typeof===E)return ne(F,G,P,io(G,oe),Oe);uo(G,oe)}return null}function be(F,G,P,oe){for(var Oe=null,tt=null,Ae=G,Ye=G=0,Ke=null;Ae!==null&&Ye<P.length;Ye++){Ae.index>Ye?(Ke=Ae,Ae=null):Ke=Ae.sibling;var nt=ee(F,Ae,P[Ye],oe);if(nt===null){Ae===null&&(Ae=Ke);break}e&&Ae&&nt.alternate===null&&n(F,Ae),G=d(nt,G,Ye),tt===null?Oe=nt:tt.sibling=nt,tt=nt,Ae=Ke}if(Ye===P.length)return a(F,Ae),Je&&Ra(F,Ye),Oe;if(Ae===null){for(;Ye<P.length;Ye++)Ae=ue(F,P[Ye],oe),Ae!==null&&(G=d(Ae,G,Ye),tt===null?Oe=Ae:tt.sibling=Ae,tt=Ae);return Je&&Ra(F,Ye),Oe}for(Ae=s(Ae);Ye<P.length;Ye++)Ke=ne(Ae,F,Ye,P[Ye],oe),Ke!==null&&(e&&Ke.alternate!==null&&Ae.delete(Ke.key===null?Ye:Ke.key),G=d(Ke,G,Ye),tt===null?Oe=Ke:tt.sibling=Ke,tt=Ke);return e&&Ae.forEach(function(zl){return n(F,zl)}),Je&&Ra(F,Ye),Oe}function je(F,G,P,oe){if(P==null)throw Error(r(151));for(var Oe=null,tt=null,Ae=G,Ye=G=0,Ke=null,nt=P.next();Ae!==null&&!nt.done;Ye++,nt=P.next()){Ae.index>Ye?(Ke=Ae,Ae=null):Ke=Ae.sibling;var zl=ee(F,Ae,nt.value,oe);if(zl===null){Ae===null&&(Ae=Ke);break}e&&Ae&&zl.alternate===null&&n(F,Ae),G=d(zl,G,Ye),tt===null?Oe=zl:tt.sibling=zl,tt=zl,Ae=Ke}if(nt.done)return a(F,Ae),Je&&Ra(F,Ye),Oe;if(Ae===null){for(;!nt.done;Ye++,nt=P.next())nt=ue(F,nt.value,oe),nt!==null&&(G=d(nt,G,Ye),tt===null?Oe=nt:tt.sibling=nt,tt=nt);return Je&&Ra(F,Ye),Oe}for(Ae=s(Ae);!nt.done;Ye++,nt=P.next())nt=ne(Ae,F,Ye,nt.value,oe),nt!==null&&(e&&nt.alternate!==null&&Ae.delete(nt.key===null?Ye:nt.key),G=d(nt,G,Ye),tt===null?Oe=nt:tt.sibling=nt,tt=nt);return e&&Ae.forEach(function(WE){return n(F,WE)}),Je&&Ra(F,Ye),Oe}function mt(F,G,P,oe){if(typeof P=="object"&&P!==null&&P.type===_&&P.key===null&&(P=P.props.children),typeof P=="object"&&P!==null){switch(P.$$typeof){case w:e:{for(var Oe=P.key;G!==null;){if(G.key===Oe){if(Oe=P.type,Oe===_){if(G.tag===7){a(F,G.sibling),oe=c(G,P.props.children),oe.return=F,F=oe;break e}}else if(G.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===Y&&ei(Oe)===G.type){a(F,G.sibling),oe=c(G,P.props),Ds(oe,P),oe.return=F,F=oe;break e}a(F,G);break}else n(F,G);G=G.sibling}P.type===_?(oe=Kl(P.props.children,F.mode,oe,P.key),oe.return=F,F=oe):(oe=no(P.type,P.key,P.props,null,F.mode,oe),Ds(oe,P),oe.return=F,F=oe)}return b(F);case S:e:{for(Oe=P.key;G!==null;){if(G.key===Oe)if(G.tag===4&&G.stateNode.containerInfo===P.containerInfo&&G.stateNode.implementation===P.implementation){a(F,G.sibling),oe=c(G,P.children||[]),oe.return=F,F=oe;break e}else{a(F,G);break}else n(F,G);G=G.sibling}oe=vu(P,F.mode,oe),oe.return=F,F=oe}return b(F);case Y:return P=ei(P),mt(F,G,P,oe)}if(I(P))return be(F,G,P,oe);if(K(P)){if(Oe=K(P),typeof Oe!="function")throw Error(r(150));return P=Oe.call(P),je(F,G,P,oe)}if(typeof P.then=="function")return mt(F,G,co(P),oe);if(P.$$typeof===E)return mt(F,G,io(F,P),oe);uo(F,P)}return typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint"?(P=""+P,G!==null&&G.tag===6?(a(F,G.sibling),oe=c(G,P),oe.return=F,F=oe):(a(F,G),oe=xu(P,F.mode,oe),oe.return=F,F=oe),b(F)):a(F,G)}return function(F,G,P,oe){try{js=0;var Oe=mt(F,G,P,oe);return ki=null,Oe}catch(Ae){if(Ae===Di||Ae===ro)throw Ae;var tt=wn(29,Ae,null,F.mode);return tt.lanes=oe,tt.return=F,tt}}}var ni=Rm(!0),Om=Rm(!1),gl=!1;function Ou(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zu(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 pl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yl(e,n,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(st&2)!==0){var c=s.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),s.pending=n,n=to(e),mm(e,null,a),n}return eo(e,s,n,a),to(e)}function ks(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var s=n.lanes;s&=e.pendingLanes,a|=s,n.lanes=a,ze(e,a)}}function ju(e,n){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=b:d=d.next=b,a=a.next}while(a!==null);d===null?c=d=n:d=d.next=n}else c=d=n;a={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:s.shared,callbacks:s.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Du=!1;function Ls(){if(Du){var e=ji;if(e!==null)throw e}}function Hs(e,n,a,s){Du=!1;var c=e.updateQueue;gl=!1;var d=c.firstBaseUpdate,b=c.lastBaseUpdate,N=c.shared.pending;if(N!==null){c.shared.pending=null;var $=N,W=$.next;$.next=null,b===null?d=W:b.next=W,b=$;var le=e.alternate;le!==null&&(le=le.updateQueue,N=le.lastBaseUpdate,N!==b&&(N===null?le.firstBaseUpdate=W:N.next=W,le.lastBaseUpdate=$))}if(d!==null){var ue=c.baseState;b=0,le=W=$=null,N=d;do{var ee=N.lane&-536870913,ne=ee!==N.lane;if(ne?(Qe&ee)===ee:(s&ee)===ee){ee!==0&&ee===zi&&(Du=!0),le!==null&&(le=le.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var be=e,je=N;ee=n;var mt=a;switch(je.tag){case 1:if(be=je.payload,typeof be=="function"){ue=be.call(mt,ue,ee);break e}ue=be;break e;case 3:be.flags=be.flags&-65537|128;case 0:if(be=je.payload,ee=typeof be=="function"?be.call(mt,ue,ee):be,ee==null)break e;ue=x({},ue,ee);break e;case 2:gl=!0}}ee=N.callback,ee!==null&&(e.flags|=64,ne&&(e.flags|=8192),ne=c.callbacks,ne===null?c.callbacks=[ee]:ne.push(ee))}else ne={lane:ee,tag:N.tag,payload:N.payload,callback:N.callback,next:null},le===null?(W=le=ne,$=ue):le=le.next=ne,b|=ee;if(N=N.next,N===null){if(N=c.shared.pending,N===null)break;ne=N,N=ne.next,ne.next=null,c.lastBaseUpdate=ne,c.shared.pending=null}}while(!0);le===null&&($=ue),c.baseState=$,c.firstBaseUpdate=W,c.lastBaseUpdate=le,d===null&&(c.shared.lanes=0),Sl|=b,e.lanes=b,e.memoizedState=ue}}function zm(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function jm(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)zm(a[e],n)}var Li=O(null),fo=O(0);function Dm(e,n){e=Va,Q(fo,e),Q(Li,n),Va=e|n.baseLanes}function ku(){Q(fo,Va),Q(Li,Li.current)}function Lu(){Va=fo.current,H(Li),H(fo)}var _n=O(null),Yn=null;function xl(e){var n=e.alternate;Q(kt,kt.current&1),Q(_n,e),Yn===null&&(n===null||Li.current!==null||n.memoizedState!==null)&&(Yn=e)}function Hu(e){Q(kt,kt.current),Q(_n,e),Yn===null&&(Yn=e)}function km(e){e.tag===22?(Q(kt,kt.current),Q(_n,e),Yn===null&&(Yn=e)):vl()}function vl(){Q(kt,kt.current),Q(_n,_n.current)}function Nn(e){H(_n),Yn===e&&(Yn=null),H(kt)}var kt=O(0);function ho(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Gf(a)||Xf(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var ja=0,$e=null,dt=null,$t=null,mo=!1,Hi=!1,ai=!1,go=0,Bs=0,Bi=null,q1=0;function jt(){throw Error(r(321))}function Bu(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!Sn(e[a],n[a]))return!1;return!0}function Uu(e,n,a,s,c,d){return ja=d,$e=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,M.H=e===null||e.memoizedState===null?x0:ef,ai=!1,d=a(s,c),ai=!1,Hi&&(d=Hm(n,a,s,c)),Lm(e),d}function Lm(e){M.H=Vs;var n=dt!==null&&dt.next!==null;if(ja=0,$t=dt=$e=null,mo=!1,Bs=0,Bi=null,n)throw Error(r(300));e===null||Vt||(e=e.dependencies,e!==null&&lo(e)&&(Vt=!0))}function Hm(e,n,a,s){$e=e;var c=0;do{if(Hi&&(Bi=null),Bs=0,Hi=!1,25<=c)throw Error(r(301));if(c+=1,$t=dt=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}M.H=v0,d=n(a,s)}while(Hi);return d}function G1(){var e=M.H,n=e.useState()[0];return n=typeof n.then=="function"?Us(n):n,e=e.useState()[0],(dt!==null?dt.memoizedState:null)!==e&&($e.flags|=1024),n}function $u(){var e=go!==0;return go=0,e}function Vu(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Yu(e){if(mo){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}mo=!1}ja=0,$t=dt=$e=null,Hi=!1,Bs=go=0,Bi=null}function mn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?$e.memoizedState=$t=e:$t=$t.next=e,$t}function Lt(){if(dt===null){var e=$e.alternate;e=e!==null?e.memoizedState:null}else e=dt.next;var n=$t===null?$e.memoizedState:$t.next;if(n!==null)$t=n,dt=e;else{if(e===null)throw $e.alternate===null?Error(r(467)):Error(r(310));dt=e,e={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},$t===null?$e.memoizedState=$t=e:$t=$t.next=e}return $t}function po(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Us(e){var n=Bs;return Bs+=1,Bi===null&&(Bi=[]),e=Cm(Bi,e,n),n=$e,($t===null?n.memoizedState:$t.next)===null&&(n=n.alternate,M.H=n===null||n.memoizedState===null?x0:ef),e}function yo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Us(e);if(e.$$typeof===E)return tn(e)}throw Error(r(438,String(e)))}function qu(e){var n=null,a=$e.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var s=$e.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(c){return c.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=po(),$e.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),s=0;s<e;s++)a[s]=ie;return n.index++,a}function Da(e,n){return typeof n=="function"?n(e):n}function xo(e){var n=Lt();return Gu(n,dt,e)}function Gu(e,n,a){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=a;var c=e.baseQueue,d=s.pending;if(d!==null){if(c!==null){var b=c.next;c.next=d.next,d.next=b}n.baseQueue=c=d,s.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{n=c.next;var N=b=null,$=null,W=n,le=!1;do{var ue=W.lane&-536870913;if(ue!==W.lane?(Qe&ue)===ue:(ja&ue)===ue){var ee=W.revertLane;if(ee===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),ue===zi&&(le=!0);else if((ja&ee)===ee){W=W.next,ee===zi&&(le=!0);continue}else ue={lane:0,revertLane:W.revertLane,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},$===null?(N=$=ue,b=d):$=$.next=ue,$e.lanes|=ee,Sl|=ee;ue=W.action,ai&&a(d,ue),d=W.hasEagerState?W.eagerState:a(d,ue)}else ee={lane:ue,revertLane:W.revertLane,gesture:W.gesture,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},$===null?(N=$=ee,b=d):$=$.next=ee,$e.lanes|=ue,Sl|=ue;W=W.next}while(W!==null&&W!==n);if($===null?b=d:$.next=N,!Sn(d,e.memoizedState)&&(Vt=!0,le&&(a=ji,a!==null)))throw a;e.memoizedState=d,e.baseState=b,e.baseQueue=$,s.lastRenderedState=d}return c===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Xu(e){var n=Lt(),a=n.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var s=a.dispatch,c=a.pending,d=n.memoizedState;if(c!==null){a.pending=null;var b=c=c.next;do d=e(d,b.action),b=b.next;while(b!==c);Sn(d,n.memoizedState)||(Vt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),a.lastRenderedState=d}return[d,s]}function Bm(e,n,a){var s=$e,c=Lt(),d=Je;if(d){if(a===void 0)throw Error(r(407));a=a()}else a=n();var b=!Sn((dt||c).memoizedState,a);if(b&&(c.memoizedState=a,Vt=!0),c=c.queue,Qu(Vm.bind(null,s,c,e),[e]),c.getSnapshot!==n||b||$t!==null&&$t.memoizedState.tag&1){if(s.flags|=2048,Ui(9,{destroy:void 0},$m.bind(null,s,c,a,n),null),yt===null)throw Error(r(349));d||(ja&127)!==0||Um(s,n,a)}return a}function Um(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=$e.updateQueue,n===null?(n=po(),$e.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function $m(e,n,a,s){n.value=a,n.getSnapshot=s,Ym(n)&&qm(e)}function Vm(e,n,a){return a(function(){Ym(n)&&qm(e)})}function Ym(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!Sn(e,a)}catch{return!0}}function qm(e){var n=Ql(e,2);n!==null&&bn(n,e,2)}function Zu(e){var n=mn();if(typeof e=="function"){var a=e;if(e=a(),ai){Dn(!0);try{a()}finally{Dn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:e},n}function Gm(e,n,a,s){return e.baseState=a,Gu(e,dt,typeof s=="function"?s:Da)}function X1(e,n,a,s,c){if(Eo(e))throw Error(r(485));if(e=n.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){d.listeners.push(b)}};M.T!==null?a(!0):d.isTransition=!1,s(d),a=n.pending,a===null?(d.next=n.pending=d,Xm(n,d)):(d.next=a.next,n.pending=a.next=d)}}function Xm(e,n){var a=n.action,s=n.payload,c=e.state;if(n.isTransition){var d=M.T,b={};M.T=b;try{var N=a(c,s),$=M.S;$!==null&&$(b,N),Zm(e,n,N)}catch(W){Iu(e,n,W)}finally{d!==null&&b.types!==null&&(d.types=b.types),M.T=d}}else try{d=a(c,s),Zm(e,n,d)}catch(W){Iu(e,n,W)}}function Zm(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(s){Im(e,n,s)},function(s){return Iu(e,n,s)}):Im(e,n,a)}function Im(e,n,a){n.status="fulfilled",n.value=a,Qm(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,Xm(e,a)))}function Iu(e,n,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=a,Qm(n),n=n.next;while(n!==s)}e.action=null}function Qm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Km(e,n){return n}function Fm(e,n){if(Je){var a=yt.formState;if(a!==null){e:{var s=$e;if(Je){if(Et){t:{for(var c=Et,d=Vn;c.nodeType!==8;){if(!d){c=null;break t}if(c=qn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){Et=qn(c.nextSibling),s=c.data==="F!";break e}}hl(s)}s=!1}s&&(n=a[0])}}return a=mn(),a.memoizedState=a.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Km,lastRenderedState:n},a.queue=s,a=g0.bind(null,$e,s),s.dispatch=a,s=Zu(!1),d=Wu.bind(null,$e,!1,s.queue),s=mn(),c={state:n,dispatch:null,action:e,pending:null},s.queue=c,a=X1.bind(null,$e,c,d,a),c.dispatch=a,s.memoizedState=e,[n,a,!1]}function Jm(e){var n=Lt();return Pm(n,dt,e)}function Pm(e,n,a){if(n=Gu(e,n,Km)[0],e=xo(Da)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=Us(n)}catch(b){throw b===Di?ro:b}else s=n;n=Lt();var c=n.queue,d=c.dispatch;return a!==n.memoizedState&&($e.flags|=2048,Ui(9,{destroy:void 0},Z1.bind(null,c,a),null)),[s,d,e]}function Z1(e,n){e.action=n}function Wm(e){var n=Lt(),a=dt;if(a!==null)return Pm(n,a,e);Lt(),n=n.memoizedState,a=Lt();var s=a.queue.dispatch;return a.memoizedState=e,[n,s,!1]}function Ui(e,n,a,s){return e={tag:e,create:a,deps:s,inst:n,next:null},n=$e.updateQueue,n===null&&(n=po(),$e.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(s=a.next,a.next=e,e.next=s,n.lastEffect=e),e}function e0(){return Lt().memoizedState}function vo(e,n,a,s){var c=mn();$e.flags|=e,c.memoizedState=Ui(1|n,{destroy:void 0},a,s===void 0?null:s)}function bo(e,n,a,s){var c=Lt();s=s===void 0?null:s;var d=c.memoizedState.inst;dt!==null&&s!==null&&Bu(s,dt.memoizedState.deps)?c.memoizedState=Ui(n,d,a,s):($e.flags|=e,c.memoizedState=Ui(1|n,d,a,s))}function t0(e,n){vo(8390656,8,e,n)}function Qu(e,n){bo(2048,8,e,n)}function I1(e){$e.flags|=4;var n=$e.updateQueue;if(n===null)n=po(),$e.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function n0(e){var n=Lt().memoizedState;return I1({ref:n,nextImpl:e}),function(){if((st&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function a0(e,n){return bo(4,2,e,n)}function l0(e,n){return bo(4,4,e,n)}function i0(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function s0(e,n,a){a=a!=null?a.concat([e]):null,bo(4,4,i0.bind(null,n,e),a)}function Ku(){}function r0(e,n){var a=Lt();n=n===void 0?null:n;var s=a.memoizedState;return n!==null&&Bu(n,s[1])?s[0]:(a.memoizedState=[e,n],e)}function o0(e,n){var a=Lt();n=n===void 0?null:n;var s=a.memoizedState;if(n!==null&&Bu(n,s[1]))return s[0];if(s=e(),ai){Dn(!0);try{e()}finally{Dn(!1)}}return a.memoizedState=[s,n],s}function Fu(e,n,a){return a===void 0||(ja&1073741824)!==0&&(Qe&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=cg(),$e.lanes|=e,Sl|=e,a)}function c0(e,n,a,s){return Sn(a,n)?a:Li.current!==null?(e=Fu(e,a,s),Sn(e,n)||(Vt=!0),e):(ja&42)===0||(ja&1073741824)!==0&&(Qe&261930)===0?(Vt=!0,e.memoizedState=a):(e=cg(),$e.lanes|=e,Sl|=e,n)}function u0(e,n,a,s,c){var d=U.p;U.p=d!==0&&8>d?d:8;var b=M.T,N={};M.T=N,Wu(e,!1,n,a);try{var $=c(),W=M.S;if(W!==null&&W(N,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var le=Y1($,s);$s(e,n,le,Mn(e))}else $s(e,n,s,Mn(e))}catch(ue){$s(e,n,{then:function(){},status:"rejected",reason:ue},Mn())}finally{U.p=d,b!==null&&N.types!==null&&(b.types=N.types),M.T=b}}function Q1(){}function Ju(e,n,a,s){if(e.tag!==5)throw Error(r(476));var c=f0(e).queue;u0(e,c,n,j,a===null?Q1:function(){return d0(e),a(s)})}function f0(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:j,baseState:j,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:j},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Da,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function d0(e){var n=f0(e);n.next===null&&(n=e.alternate.memoizedState),$s(e,n.next.queue,{},Mn())}function Pu(){return tn(ar)}function h0(){return Lt().memoizedState}function m0(){return Lt().memoizedState}function K1(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=Mn();e=pl(a);var s=yl(n,e,a);s!==null&&(bn(s,n,a),ks(s,n,a)),n={cache:Cu()},e.payload=n;return}n=n.return}}function F1(e,n,a){var s=Mn();a={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Eo(e)?p0(n,a):(a=pu(e,n,a,s),a!==null&&(bn(a,e,s),y0(a,n,s)))}function g0(e,n,a){var s=Mn();$s(e,n,a,s)}function $s(e,n,a,s){var c={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Eo(e))p0(n,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var b=n.lastRenderedState,N=d(b,a);if(c.hasEagerState=!0,c.eagerState=N,Sn(N,b))return eo(e,n,c,0),yt===null&&Wr(),!1}catch{}if(a=pu(e,n,c,s),a!==null)return bn(a,e,s),y0(a,n,s),!0}return!1}function Wu(e,n,a,s){if(s={lane:2,revertLane:zf(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Eo(e)){if(n)throw Error(r(479))}else n=pu(e,a,s,2),n!==null&&bn(n,e,2)}function Eo(e){var n=e.alternate;return e===$e||n!==null&&n===$e}function p0(e,n){Hi=mo=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function y0(e,n,a){if((a&4194048)!==0){var s=n.lanes;s&=e.pendingLanes,a|=s,n.lanes=a,ze(e,a)}}var Vs={readContext:tn,use:yo,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt,useHostTransitionStatus:jt,useFormState:jt,useActionState:jt,useOptimistic:jt,useMemoCache:jt,useCacheRefresh:jt};Vs.useEffectEvent=jt;var x0={readContext:tn,use:yo,useCallback:function(e,n){return mn().memoizedState=[e,n===void 0?null:n],e},useContext:tn,useEffect:t0,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,vo(4194308,4,i0.bind(null,n,e),a)},useLayoutEffect:function(e,n){return vo(4194308,4,e,n)},useInsertionEffect:function(e,n){vo(4,2,e,n)},useMemo:function(e,n){var a=mn();n=n===void 0?null:n;var s=e();if(ai){Dn(!0);try{e()}finally{Dn(!1)}}return a.memoizedState=[s,n],s},useReducer:function(e,n,a){var s=mn();if(a!==void 0){var c=a(n);if(ai){Dn(!0);try{a(n)}finally{Dn(!1)}}}else c=n;return s.memoizedState=s.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},s.queue=e,e=e.dispatch=F1.bind(null,$e,e),[s.memoizedState,e]},useRef:function(e){var n=mn();return e={current:e},n.memoizedState=e},useState:function(e){e=Zu(e);var n=e.queue,a=g0.bind(null,$e,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Ku,useDeferredValue:function(e,n){var a=mn();return Fu(a,e,n)},useTransition:function(){var e=Zu(!1);return e=u0.bind(null,$e,e.queue,!0,!1),mn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var s=$e,c=mn();if(Je){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),yt===null)throw Error(r(349));(Qe&127)!==0||Um(s,n,a)}c.memoizedState=a;var d={value:a,getSnapshot:n};return c.queue=d,t0(Vm.bind(null,s,d,e),[e]),s.flags|=2048,Ui(9,{destroy:void 0},$m.bind(null,s,d,a,n),null),a},useId:function(){var e=mn(),n=yt.identifierPrefix;if(Je){var a=oa,s=ra;a=(s&~(1<<32-Pt(s)-1)).toString(32)+a,n="_"+n+"R_"+a,a=go++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=q1++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Pu,useFormState:Fm,useActionState:Fm,useOptimistic:function(e){var n=mn();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Wu.bind(null,$e,!0,a),a.dispatch=n,[e,n]},useMemoCache:qu,useCacheRefresh:function(){return mn().memoizedState=K1.bind(null,$e)},useEffectEvent:function(e){var n=mn(),a={impl:e};return n.memoizedState=a,function(){if((st&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},ef={readContext:tn,use:yo,useCallback:r0,useContext:tn,useEffect:Qu,useImperativeHandle:s0,useInsertionEffect:a0,useLayoutEffect:l0,useMemo:o0,useReducer:xo,useRef:e0,useState:function(){return xo(Da)},useDebugValue:Ku,useDeferredValue:function(e,n){var a=Lt();return c0(a,dt.memoizedState,e,n)},useTransition:function(){var e=xo(Da)[0],n=Lt().memoizedState;return[typeof e=="boolean"?e:Us(e),n]},useSyncExternalStore:Bm,useId:h0,useHostTransitionStatus:Pu,useFormState:Jm,useActionState:Jm,useOptimistic:function(e,n){var a=Lt();return Gm(a,dt,e,n)},useMemoCache:qu,useCacheRefresh:m0};ef.useEffectEvent=n0;var v0={readContext:tn,use:yo,useCallback:r0,useContext:tn,useEffect:Qu,useImperativeHandle:s0,useInsertionEffect:a0,useLayoutEffect:l0,useMemo:o0,useReducer:Xu,useRef:e0,useState:function(){return Xu(Da)},useDebugValue:Ku,useDeferredValue:function(e,n){var a=Lt();return dt===null?Fu(a,e,n):c0(a,dt.memoizedState,e,n)},useTransition:function(){var e=Xu(Da)[0],n=Lt().memoizedState;return[typeof e=="boolean"?e:Us(e),n]},useSyncExternalStore:Bm,useId:h0,useHostTransitionStatus:Pu,useFormState:Wm,useActionState:Wm,useOptimistic:function(e,n){var a=Lt();return dt!==null?Gm(a,dt,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:qu,useCacheRefresh:m0};v0.useEffectEvent=n0;function tf(e,n,a,s){n=e.memoizedState,a=a(s,n),a=a==null?n:x({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var nf={enqueueSetState:function(e,n,a){e=e._reactInternals;var s=Mn(),c=pl(s);c.payload=n,a!=null&&(c.callback=a),n=yl(e,c,s),n!==null&&(bn(n,e,s),ks(n,e,s))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var s=Mn(),c=pl(s);c.tag=1,c.payload=n,a!=null&&(c.callback=a),n=yl(e,c,s),n!==null&&(bn(n,e,s),ks(n,e,s))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=Mn(),s=pl(a);s.tag=2,n!=null&&(s.callback=n),n=yl(e,s,a),n!==null&&(bn(n,e,a),ks(n,e,a))}};function b0(e,n,a,s,c,d,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,d,b):n.prototype&&n.prototype.isPureReactComponent?!Cs(a,s)||!Cs(c,d):!0}function E0(e,n,a,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,s),n.state!==e&&nf.enqueueReplaceState(n,n.state,null)}function li(e,n){var a=n;if("ref"in n){a={};for(var s in n)s!=="ref"&&(a[s]=n[s])}if(e=e.defaultProps){a===n&&(a=x({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function S0(e){Pr(e)}function w0(e){console.error(e)}function _0(e){Pr(e)}function So(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function N0(e,n,a){try{var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function af(e,n,a){return a=pl(a),a.tag=3,a.payload={element:null},a.callback=function(){So(e,n)},a}function A0(e){return e=pl(e),e.tag=3,e}function C0(e,n,a,s){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=s.value;e.payload=function(){return c(d)},e.callback=function(){N0(n,a,s)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){N0(n,a,s),typeof c!="function"&&(wl===null?wl=new Set([this]):wl.add(this));var N=s.stack;this.componentDidCatch(s.value,{componentStack:N!==null?N:""})})}function J1(e,n,a,s,c){if(a.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=a.alternate,n!==null&&Oi(n,a,c,!0),a=_n.current,a!==null){switch(a.tag){case 31:case 13:return Yn===null?Do():a.alternate===null&&Dt===0&&(Dt=3),a.flags&=-257,a.flags|=65536,a.lanes=c,s===oo?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([s]):n.add(s),Tf(e,s,c)),!1;case 22:return a.flags|=65536,s===oo?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([s]):a.add(s)),Tf(e,s,c)),!1}throw Error(r(435,a.tag))}return Tf(e,s,c),Do(),!1}if(Je)return n=_n.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=c,s!==Su&&(e=Error(r(422),{cause:s}),Rs(Bn(e,a)))):(s!==Su&&(n=Error(r(423),{cause:s}),Rs(Bn(n,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,s=Bn(s,a),c=af(e.stateNode,s,c),ju(e,c),Dt!==4&&(Dt=2)),!1;var d=Error(r(520),{cause:s});if(d=Bn(d,a),Ks===null?Ks=[d]:Ks.push(d),Dt!==4&&(Dt=2),n===null)return!0;s=Bn(s,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=af(a.stateNode,s,e),ju(a,e),!1;case 1:if(n=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(wl===null||!wl.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=A0(c),C0(c,e,a,s),ju(a,c),!1}a=a.return}while(a!==null);return!1}var lf=Error(r(461)),Vt=!1;function nn(e,n,a,s){n.child=e===null?Om(n,null,a,s):ni(n,e.child,a,s)}function M0(e,n,a,s,c){a=a.render;var d=n.ref;if("ref"in s){var b={};for(var N in s)N!=="ref"&&(b[N]=s[N])}else b=s;return Pl(n),s=Uu(e,n,a,b,d,c),N=$u(),e!==null&&!Vt?(Vu(e,n,c),ka(e,n,c)):(Je&&N&&bu(n),n.flags|=1,nn(e,n,s,c),n.child)}function T0(e,n,a,s,c){if(e===null){var d=a.type;return typeof d=="function"&&!yu(d)&&d.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=d,R0(e,n,d,s,c)):(e=no(a.type,null,s,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!hf(e,c)){var b=d.memoizedProps;if(a=a.compare,a=a!==null?a:Cs,a(b,s)&&e.ref===n.ref)return ka(e,n,c)}return n.flags|=1,e=Ta(d,s),e.ref=n.ref,e.return=n,n.child=e}function R0(e,n,a,s,c){if(e!==null){var d=e.memoizedProps;if(Cs(d,s)&&e.ref===n.ref)if(Vt=!1,n.pendingProps=s=d,hf(e,c))(e.flags&131072)!==0&&(Vt=!0);else return n.lanes=e.lanes,ka(e,n,c)}return sf(e,n,a,s,c)}function O0(e,n,a,s){var c=s.children,d=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(s=n.child=e.child,c=0;s!==null;)c=c|s.lanes|s.childLanes,s=s.sibling;s=c&~d}else s=0,n.child=null;return z0(e,n,d,a,s)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&so(n,d!==null?d.cachePool:null),d!==null?Dm(n,d):ku(),km(n);else return s=n.lanes=536870912,z0(e,n,d!==null?d.baseLanes|a:a,a,s)}else d!==null?(so(n,d.cachePool),Dm(n,d),vl(),n.memoizedState=null):(e!==null&&so(n,null),ku(),vl());return nn(e,n,c,a),n.child}function Ys(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function z0(e,n,a,s,c){var d=Tu();return d=d===null?null:{parent:Ut._currentValue,pool:d},n.memoizedState={baseLanes:a,cachePool:d},e!==null&&so(n,null),ku(),km(n),e!==null&&Oi(e,n,s,!0),n.childLanes=c,null}function wo(e,n){return n=No({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function j0(e,n,a){return ni(n,e.child,null,a),e=wo(n,n.pendingProps),e.flags|=2,Nn(n),n.memoizedState=null,e}function P1(e,n,a){var s=n.pendingProps,c=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Je){if(s.mode==="hidden")return e=wo(n,s),n.lanes=536870912,Ys(null,e);if(Hu(n),(e=Et)?(e=Xg(e,Vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:fl!==null?{id:ra,overflow:oa}:null,retryLane:536870912,hydrationErrors:null},a=pm(e),a.return=n,n.child=a,en=n,Et=null)):e=null,e===null)throw hl(n);return n.lanes=536870912,null}return wo(n,s)}var d=e.memoizedState;if(d!==null){var b=d.dehydrated;if(Hu(n),c)if(n.flags&256)n.flags&=-257,n=j0(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(Vt||Oi(e,n,a,!1),c=(a&e.childLanes)!==0,Vt||c){if(s=yt,s!==null&&(b=Ct(s,a),b!==0&&b!==d.retryLane))throw d.retryLane=b,Ql(e,b),bn(s,e,b),lf;Do(),n=j0(e,n,a)}else e=d.treeContext,Et=qn(b.nextSibling),en=n,Je=!0,dl=null,Vn=!1,e!==null&&vm(n,e),n=wo(n,s),n.flags|=4096;return n}return e=Ta(e.child,{mode:s.mode,children:s.children}),e.ref=n.ref,n.child=e,e.return=n,e}function _o(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function sf(e,n,a,s,c){return Pl(n),a=Uu(e,n,a,s,void 0,c),s=$u(),e!==null&&!Vt?(Vu(e,n,c),ka(e,n,c)):(Je&&s&&bu(n),n.flags|=1,nn(e,n,a,c),n.child)}function D0(e,n,a,s,c,d){return Pl(n),n.updateQueue=null,a=Hm(n,s,a,c),Lm(e),s=$u(),e!==null&&!Vt?(Vu(e,n,d),ka(e,n,d)):(Je&&s&&bu(n),n.flags|=1,nn(e,n,a,d),n.child)}function k0(e,n,a,s,c){if(Pl(n),n.stateNode===null){var d=Ci,b=a.contextType;typeof b=="object"&&b!==null&&(d=tn(b)),d=new a(s,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=nf,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=s,d.state=n.memoizedState,d.refs={},Ou(n),b=a.contextType,d.context=typeof b=="object"&&b!==null?tn(b):Ci,d.state=n.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(tf(n,a,b,s),d.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(b=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),b!==d.state&&nf.enqueueReplaceState(d,d.state,null),Hs(n,s,d,c),Ls(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(e===null){d=n.stateNode;var N=n.memoizedProps,$=li(a,N);d.props=$;var W=d.context,le=a.contextType;b=Ci,typeof le=="object"&&le!==null&&(b=tn(le));var ue=a.getDerivedStateFromProps;le=typeof ue=="function"||typeof d.getSnapshotBeforeUpdate=="function",N=n.pendingProps!==N,le||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(N||W!==b)&&E0(n,d,s,b),gl=!1;var ee=n.memoizedState;d.state=ee,Hs(n,s,d,c),Ls(),W=n.memoizedState,N||ee!==W||gl?(typeof ue=="function"&&(tf(n,a,ue,s),W=n.memoizedState),($=gl||b0(n,a,$,s,ee,W,b))?(le||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=W),d.props=s,d.state=W,d.context=b,s=$):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{d=n.stateNode,zu(e,n),b=n.memoizedProps,le=li(a,b),d.props=le,ue=n.pendingProps,ee=d.context,W=a.contextType,$=Ci,typeof W=="object"&&W!==null&&($=tn(W)),N=a.getDerivedStateFromProps,(W=typeof N=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b!==ue||ee!==$)&&E0(n,d,s,$),gl=!1,ee=n.memoizedState,d.state=ee,Hs(n,s,d,c),Ls();var ne=n.memoizedState;b!==ue||ee!==ne||gl||e!==null&&e.dependencies!==null&&lo(e.dependencies)?(typeof N=="function"&&(tf(n,a,N,s),ne=n.memoizedState),(le=gl||b0(n,a,le,s,ee,ne,$)||e!==null&&e.dependencies!==null&&lo(e.dependencies))?(W||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(s,ne,$),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(s,ne,$)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&ee===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&ee===e.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=ne),d.props=s,d.state=ne,d.context=$,s=le):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&ee===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&ee===e.memoizedState||(n.flags|=1024),s=!1)}return d=s,_o(e,n),s=(n.flags&128)!==0,d||s?(d=n.stateNode,a=s&&typeof a.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&s?(n.child=ni(n,e.child,null,c),n.child=ni(n,null,a,c)):nn(e,n,a,c),n.memoizedState=d.state,e=n.child):e=ka(e,n,c),e}function L0(e,n,a,s){return Fl(),n.flags|=256,nn(e,n,a,s),n.child}var rf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function of(e){return{baseLanes:e,cachePool:Nm()}}function cf(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=Cn),e}function H0(e,n,a){var s=n.pendingProps,c=!1,d=(n.flags&128)!==0,b;if((b=d)||(b=e!==null&&e.memoizedState===null?!1:(kt.current&2)!==0),b&&(c=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if(Je){if(c?xl(n):vl(),(e=Et)?(e=Xg(e,Vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:fl!==null?{id:ra,overflow:oa}:null,retryLane:536870912,hydrationErrors:null},a=pm(e),a.return=n,n.child=a,en=n,Et=null)):e=null,e===null)throw hl(n);return Xf(e)?n.lanes=32:n.lanes=536870912,null}var N=s.children;return s=s.fallback,c?(vl(),c=n.mode,N=No({mode:"hidden",children:N},c),s=Kl(s,c,a,null),N.return=n,s.return=n,N.sibling=s,n.child=N,s=n.child,s.memoizedState=of(a),s.childLanes=cf(e,b,a),n.memoizedState=rf,Ys(null,s)):(xl(n),uf(n,N))}var $=e.memoizedState;if($!==null&&(N=$.dehydrated,N!==null)){if(d)n.flags&256?(xl(n),n.flags&=-257,n=ff(e,n,a)):n.memoizedState!==null?(vl(),n.child=e.child,n.flags|=128,n=null):(vl(),N=s.fallback,c=n.mode,s=No({mode:"visible",children:s.children},c),N=Kl(N,c,a,null),N.flags|=2,s.return=n,N.return=n,s.sibling=N,n.child=s,ni(n,e.child,null,a),s=n.child,s.memoizedState=of(a),s.childLanes=cf(e,b,a),n.memoizedState=rf,n=Ys(null,s));else if(xl(n),Xf(N)){if(b=N.nextSibling&&N.nextSibling.dataset,b)var W=b.dgst;b=W,s=Error(r(419)),s.stack="",s.digest=b,Rs({value:s,source:null,stack:null}),n=ff(e,n,a)}else if(Vt||Oi(e,n,a,!1),b=(a&e.childLanes)!==0,Vt||b){if(b=yt,b!==null&&(s=Ct(b,a),s!==0&&s!==$.retryLane))throw $.retryLane=s,Ql(e,s),bn(b,e,s),lf;Gf(N)||Do(),n=ff(e,n,a)}else Gf(N)?(n.flags|=192,n.child=e.child,n=null):(e=$.treeContext,Et=qn(N.nextSibling),en=n,Je=!0,dl=null,Vn=!1,e!==null&&vm(n,e),n=uf(n,s.children),n.flags|=4096);return n}return c?(vl(),N=s.fallback,c=n.mode,$=e.child,W=$.sibling,s=Ta($,{mode:"hidden",children:s.children}),s.subtreeFlags=$.subtreeFlags&65011712,W!==null?N=Ta(W,N):(N=Kl(N,c,a,null),N.flags|=2),N.return=n,s.return=n,s.sibling=N,n.child=s,Ys(null,s),s=n.child,N=e.child.memoizedState,N===null?N=of(a):(c=N.cachePool,c!==null?($=Ut._currentValue,c=c.parent!==$?{parent:$,pool:$}:c):c=Nm(),N={baseLanes:N.baseLanes|a,cachePool:c}),s.memoizedState=N,s.childLanes=cf(e,b,a),n.memoizedState=rf,Ys(e.child,s)):(xl(n),a=e.child,e=a.sibling,a=Ta(a,{mode:"visible",children:s.children}),a.return=n,a.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=a,n.memoizedState=null,a)}function uf(e,n){return n=No({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function No(e,n){return e=wn(22,e,null,n),e.lanes=0,e}function ff(e,n,a){return ni(n,e.child,null,a),e=uf(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function B0(e,n,a){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),Nu(e.return,n,a)}function df(e,n,a,s,c,d){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:c,treeForkCount:d}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=s,b.tail=a,b.tailMode=c,b.treeForkCount=d)}function U0(e,n,a){var s=n.pendingProps,c=s.revealOrder,d=s.tail;s=s.children;var b=kt.current,N=(b&2)!==0;if(N?(b=b&1|2,n.flags|=128):b&=1,Q(kt,b),nn(e,n,s,a),s=Je?Ts:0,!N&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&B0(e,a,n);else if(e.tag===19)B0(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=n.child,c=null;a!==null;)e=a.alternate,e!==null&&ho(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=n.child,n.child=null):(c=a.sibling,a.sibling=null),df(n,!1,c,a,d,s);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&ho(e)===null){n.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}df(n,!0,a,null,d,s);break;case"together":df(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function ka(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),Sl|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(Oi(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,a=Ta(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=Ta(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function hf(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&lo(e)))}function W1(e,n,a){switch(n.tag){case 3:fe(n,n.stateNode.containerInfo),ml(n,Ut,e.memoizedState.cache),Fl();break;case 27:case 5:Ce(n);break;case 4:fe(n,n.stateNode.containerInfo);break;case 10:ml(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Hu(n),null;break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?(xl(n),n.flags|=128,null):(a&n.child.childLanes)!==0?H0(e,n,a):(xl(n),e=ka(e,n,a),e!==null?e.sibling:null);xl(n);break;case 19:var c=(e.flags&128)!==0;if(s=(a&n.childLanes)!==0,s||(Oi(e,n,a,!1),s=(a&n.childLanes)!==0),c){if(s)return U0(e,n,a);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Q(kt,kt.current),s)break;return null;case 22:return n.lanes=0,O0(e,n,a,n.pendingProps);case 24:ml(n,Ut,e.memoizedState.cache)}return ka(e,n,a)}function $0(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)Vt=!0;else{if(!hf(e,a)&&(n.flags&128)===0)return Vt=!1,W1(e,n,a);Vt=(e.flags&131072)!==0}else Vt=!1,Je&&(n.flags&1048576)!==0&&xm(n,Ts,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(e=ei(n.elementType),n.type=e,typeof e=="function")yu(e)?(s=li(e,s),n.tag=1,n=k0(null,n,e,s,a)):(n.tag=0,n=sf(null,n,e,s,a));else{if(e!=null){var c=e.$$typeof;if(c===R){n.tag=11,n=M0(null,n,e,s,a);break e}else if(c===B){n.tag=14,n=T0(null,n,e,s,a);break e}}throw n=k(e)||e,Error(r(306,n,""))}}return n;case 0:return sf(e,n,n.type,n.pendingProps,a);case 1:return s=n.type,c=li(s,n.pendingProps),k0(e,n,s,c,a);case 3:e:{if(fe(n,n.stateNode.containerInfo),e===null)throw Error(r(387));s=n.pendingProps;var d=n.memoizedState;c=d.element,zu(e,n),Hs(n,s,null,a);var b=n.memoizedState;if(s=b.cache,ml(n,Ut,s),s!==d.cache&&Au(n,[Ut],a,!0),Ls(),s=b.element,d.isDehydrated)if(d={element:s,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=L0(e,n,s,a);break e}else if(s!==c){c=Bn(Error(r(424)),n),Rs(c),n=L0(e,n,s,a);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Et=qn(e.firstChild),en=n,Je=!0,dl=null,Vn=!0,a=Om(n,null,s,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Fl(),s===c){n=ka(e,n,a);break e}nn(e,n,s,a)}n=n.child}return n;case 26:return _o(e,n),e===null?(a=Jg(n.type,null,n.pendingProps,null))?n.memoizedState=a:Je||(a=n.type,e=n.pendingProps,s=Vo(he.current).createElement(a),s[Mt]=n,s[Kt]=e,an(s,a,e),zt(s),n.stateNode=s):n.memoizedState=Jg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Ce(n),e===null&&Je&&(s=n.stateNode=Qg(n.type,n.pendingProps,he.current),en=n,Vn=!0,c=Et,Cl(n.type)?(Zf=c,Et=qn(s.firstChild)):Et=c),nn(e,n,n.pendingProps.children,a),_o(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Je&&((c=s=Et)&&(s=TE(s,n.type,n.pendingProps,Vn),s!==null?(n.stateNode=s,en=n,Et=qn(s.firstChild),Vn=!1,c=!0):c=!1),c||hl(n)),Ce(n),c=n.type,d=n.pendingProps,b=e!==null?e.memoizedProps:null,s=d.children,Vf(c,d)?s=null:b!==null&&Vf(c,b)&&(n.flags|=32),n.memoizedState!==null&&(c=Uu(e,n,G1,null,null,a),ar._currentValue=c),_o(e,n),nn(e,n,s,a),n.child;case 6:return e===null&&Je&&((e=a=Et)&&(a=RE(a,n.pendingProps,Vn),a!==null?(n.stateNode=a,en=n,Et=null,e=!0):e=!1),e||hl(n)),null;case 13:return H0(e,n,a);case 4:return fe(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=ni(n,null,s,a):nn(e,n,s,a),n.child;case 11:return M0(e,n,n.type,n.pendingProps,a);case 7:return nn(e,n,n.pendingProps,a),n.child;case 8:return nn(e,n,n.pendingProps.children,a),n.child;case 12:return nn(e,n,n.pendingProps.children,a),n.child;case 10:return s=n.pendingProps,ml(n,n.type,s.value),nn(e,n,s.children,a),n.child;case 9:return c=n.type._context,s=n.pendingProps.children,Pl(n),c=tn(c),s=s(c),n.flags|=1,nn(e,n,s,a),n.child;case 14:return T0(e,n,n.type,n.pendingProps,a);case 15:return R0(e,n,n.type,n.pendingProps,a);case 19:return U0(e,n,a);case 31:return P1(e,n,a);case 22:return O0(e,n,a,n.pendingProps);case 24:return Pl(n),s=tn(Ut),e===null?(c=Tu(),c===null&&(c=yt,d=Cu(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),n.memoizedState={parent:s,cache:c},Ou(n),ml(n,Ut,c)):((e.lanes&a)!==0&&(zu(e,n),Hs(n,null,null,a),Ls()),c=e.memoizedState,d=n.memoizedState,c.parent!==s?(c={parent:s,cache:s},n.memoizedState=c,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=c),ml(n,Ut,s)):(s=d.cache,ml(n,Ut,s),s!==c.cache&&Au(n,[Ut],a,!0))),nn(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function La(e){e.flags|=4}function mf(e,n,a,s,c){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(hg())e.flags|=8192;else throw ti=oo,Ru}else e.flags&=-16777217}function V0(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!np(n))if(hg())e.flags|=8192;else throw ti=oo,Ru}function Ao(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?ke():536870912,e.lanes|=n,qi|=n)}function qs(e,n){if(!Je)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function St(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,s=0;if(n)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,s|=c.subtreeFlags&65011712,s|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,s|=c.subtreeFlags,s|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=s,e.childLanes=a,n}function eE(e,n,a){var s=n.pendingProps;switch(Eu(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(n),null;case 1:return St(n),null;case 3:return a=n.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),za(Ut),me(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ri(n)?La(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,wu())),St(n),null;case 26:var c=n.type,d=n.memoizedState;return e===null?(La(n),d!==null?(St(n),V0(n,d)):(St(n),mf(n,c,null,s,a))):d?d!==e.memoizedState?(La(n),St(n),V0(n,d)):(St(n),n.flags&=-16777217):(e=e.memoizedProps,e!==s&&La(n),St(n),mf(n,c,e,s,a)),null;case 27:if(xe(n),a=he.current,c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&La(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return St(n),null}e=J.current,Ri(n)?bm(n):(e=Qg(c,s,a),n.stateNode=e,La(n))}return St(n),null;case 5:if(xe(n),c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&La(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return St(n),null}if(d=J.current,Ri(n))bm(n);else{var b=Vo(he.current);switch(d){case 1:d=b.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=b.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=b.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof s.is=="string"?b.createElement("select",{is:s.is}):b.createElement("select"),s.multiple?d.multiple=!0:s.size&&(d.size=s.size);break;default:d=typeof s.is=="string"?b.createElement(c,{is:s.is}):b.createElement(c)}}d[Mt]=n,d[Kt]=s;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)d.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 e;for(;b.sibling===null;){if(b.return===null||b.return===n)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=d;e:switch(an(d,c,s),c){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&La(n)}}return St(n),mf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==s&&La(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(r(166));if(e=he.current,Ri(n)){if(e=n.stateNode,a=n.memoizedProps,s=null,c=en,c!==null)switch(c.tag){case 27:case 5:s=c.memoizedProps}e[Mt]=n,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||Hg(e.nodeValue,a)),e||hl(n,!0)}else e=Vo(e).createTextNode(s),e[Mt]=n,n.stateNode=e}return St(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(s=Ri(n),a!==null){if(e===null){if(!s)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Mt]=n}else Fl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;St(n),e=!1}else a=wu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(Nn(n),n):(Nn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return St(n),null;case 13:if(s=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Ri(n),s!==null&&s.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=n.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[Mt]=n}else Fl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;St(n),c=!1}else c=wu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return n.flags&256?(Nn(n),n):(Nn(n),null)}return Nn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=s!==null,e=e!==null&&e.memoizedState!==null,a&&(s=n.child,c=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(c=s.alternate.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==c&&(s.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),Ao(n,n.updateQueue),St(n),null);case 4:return me(),e===null&&Lf(n.stateNode.containerInfo),St(n),null;case 10:return za(n.type),St(n),null;case 19:if(H(kt),s=n.memoizedState,s===null)return St(n),null;if(c=(n.flags&128)!==0,d=s.rendering,d===null)if(c)qs(s,!1);else{if(Dt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=ho(e),d!==null){for(n.flags|=128,qs(s,!1),e=d.updateQueue,n.updateQueue=e,Ao(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)gm(a,e),a=a.sibling;return Q(kt,kt.current&1|2),Je&&Ra(n,s.treeForkCount),n.child}e=e.sibling}s.tail!==null&&Fe()>Oo&&(n.flags|=128,c=!0,qs(s,!1),n.lanes=4194304)}else{if(!c)if(e=ho(d),e!==null){if(n.flags|=128,c=!0,e=e.updateQueue,n.updateQueue=e,Ao(n,e),qs(s,!0),s.tail===null&&s.tailMode==="hidden"&&!d.alternate&&!Je)return St(n),null}else 2*Fe()-s.renderingStartTime>Oo&&a!==536870912&&(n.flags|=128,c=!0,qs(s,!1),n.lanes=4194304);s.isBackwards?(d.sibling=n.child,n.child=d):(e=s.last,e!==null?e.sibling=d:n.child=d,s.last=d)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Fe(),e.sibling=null,a=kt.current,Q(kt,c?a&1|2:a&1),Je&&Ra(n,s.treeForkCount),e):(St(n),null);case 22:case 23:return Nn(n),Lu(),s=n.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(a&536870912)!==0&&(n.flags&128)===0&&(St(n),n.subtreeFlags&6&&(n.flags|=8192)):St(n),a=n.updateQueue,a!==null&&Ao(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==a&&(n.flags|=2048),e!==null&&H(Wl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),za(Ut),St(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function tE(e,n){switch(Eu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return za(Ut),me(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return xe(n),null;case 31:if(n.memoizedState!==null){if(Nn(n),n.alternate===null)throw Error(r(340));Fl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Nn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Fl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return H(kt),null;case 4:return me(),null;case 10:return za(n.type),null;case 22:case 23:return Nn(n),Lu(),e!==null&&H(Wl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return za(Ut),null;case 25:return null;default:return null}}function Y0(e,n){switch(Eu(n),n.tag){case 3:za(Ut),me();break;case 26:case 27:case 5:xe(n);break;case 4:me();break;case 31:n.memoizedState!==null&&Nn(n);break;case 13:Nn(n);break;case 19:H(kt);break;case 10:za(n.type);break;case 22:case 23:Nn(n),Lu(),e!==null&&H(Wl);break;case 24:za(Ut)}}function Gs(e,n){try{var a=n.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var c=s.next;a=c;do{if((a.tag&e)===e){s=void 0;var d=a.create,b=a.inst;s=d(),b.destroy=s}a=a.next}while(a!==c)}}catch(N){ut(n,n.return,N)}}function bl(e,n,a){try{var s=n.updateQueue,c=s!==null?s.lastEffect:null;if(c!==null){var d=c.next;s=d;do{if((s.tag&e)===e){var b=s.inst,N=b.destroy;if(N!==void 0){b.destroy=void 0,c=n;var $=a,W=N;try{W()}catch(le){ut(c,$,le)}}}s=s.next}while(s!==d)}}catch(le){ut(n,n.return,le)}}function q0(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{jm(n,a)}catch(s){ut(e,e.return,s)}}}function G0(e,n,a){a.props=li(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(s){ut(e,n,s)}}function Xs(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof a=="function"?e.refCleanup=a(s):a.current=s}}catch(c){ut(e,n,c)}}function ca(e,n){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{s()}catch(c){ut(e,n,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){ut(e,n,c)}else a.current=null}function X0(e){var n=e.type,a=e.memoizedProps,s=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&s.focus();break e;case"img":a.src?s.src=a.src:a.srcSet&&(s.srcset=a.srcSet)}}catch(c){ut(e,e.return,c)}}function gf(e,n,a){try{var s=e.stateNode;wE(s,e.type,a,n),s[Kt]=n}catch(c){ut(e,e.return,c)}}function Z0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Cl(e.type)||e.tag===4}function pf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Z0(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&&Cl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function yf(e,n,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=ge));else if(s!==4&&(s===27&&Cl(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(yf(e,n,a),e=e.sibling;e!==null;)yf(e,n,a),e=e.sibling}function Co(e,n,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(s!==4&&(s===27&&Cl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Co(e,n,a),e=e.sibling;e!==null;)Co(e,n,a),e=e.sibling}function I0(e){var n=e.stateNode,a=e.memoizedProps;try{for(var s=e.type,c=n.attributes;c.length;)n.removeAttributeNode(c[0]);an(n,s,a),n[Mt]=e,n[Kt]=a}catch(d){ut(e,e.return,d)}}var Ha=!1,Yt=!1,xf=!1,Q0=typeof WeakSet=="function"?WeakSet:Set,Jt=null;function nE(e,n){if(e=e.containerInfo,Uf=Qo,e=sm(e),uu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var c=s.anchorOffset,d=s.focusNode;s=s.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var b=0,N=-1,$=-1,W=0,le=0,ue=e,ee=null;t:for(;;){for(var ne;ue!==a||c!==0&&ue.nodeType!==3||(N=b+c),ue!==d||s!==0&&ue.nodeType!==3||($=b+s),ue.nodeType===3&&(b+=ue.nodeValue.length),(ne=ue.firstChild)!==null;)ee=ue,ue=ne;for(;;){if(ue===e)break t;if(ee===a&&++W===c&&(N=b),ee===d&&++le===s&&($=b),(ne=ue.nextSibling)!==null)break;ue=ee,ee=ue.parentNode}ue=ne}a=N===-1||$===-1?null:{start:N,end:$}}else a=null}a=a||{start:0,end:0}}else a=null;for($f={focusedElem:e,selectionRange:a},Qo=!1,Jt=n;Jt!==null;)if(n=Jt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Jt=e;else for(;Jt!==null;){switch(n=Jt,d=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=n,c=d.memoizedProps,d=d.memoizedState,s=a.stateNode;try{var be=li(a.type,c);e=s.getSnapshotBeforeUpdate(be,d),s.__reactInternalSnapshotBeforeUpdate=e}catch(je){ut(a,a.return,je)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)qf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":qf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=n.sibling,e!==null){e.return=n.return,Jt=e;break}Jt=n.return}}function K0(e,n,a){var s=a.flags;switch(a.tag){case 0:case 11:case 15:Ua(e,a),s&4&&Gs(5,a);break;case 1:if(Ua(e,a),s&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(b){ut(a,a.return,b)}else{var c=li(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(c,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){ut(a,a.return,b)}}s&64&&q0(a),s&512&&Xs(a,a.return);break;case 3:if(Ua(e,a),s&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{jm(e,n)}catch(b){ut(a,a.return,b)}}break;case 27:n===null&&s&4&&I0(a);case 26:case 5:Ua(e,a),n===null&&s&4&&X0(a),s&512&&Xs(a,a.return);break;case 12:Ua(e,a);break;case 31:Ua(e,a),s&4&&P0(e,a);break;case 13:Ua(e,a),s&4&&W0(e,a),s&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=fE.bind(null,a),OE(e,a))));break;case 22:if(s=a.memoizedState!==null||Ha,!s){n=n!==null&&n.memoizedState!==null||Yt,c=Ha;var d=Yt;Ha=s,(Yt=n)&&!d?$a(e,a,(a.subtreeFlags&8772)!==0):Ua(e,a),Ha=c,Yt=d}break;case 30:break;default:Ua(e,a)}}function F0(e){var n=e.alternate;n!==null&&(e.alternate=null,F0(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&ql(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 wt=null,pn=!1;function Ba(e,n,a){for(a=a.child;a!==null;)J0(e,n,a),a=a.sibling}function J0(e,n,a){if(Qt&&typeof Qt.onCommitFiberUnmount=="function")try{Qt.onCommitFiberUnmount(xa,a)}catch{}switch(a.tag){case 26:Yt||ca(a,n),Ba(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Yt||ca(a,n);var s=wt,c=pn;Cl(a.type)&&(wt=a.stateNode,pn=!1),Ba(e,n,a),er(a.stateNode),wt=s,pn=c;break;case 5:Yt||ca(a,n);case 6:if(s=wt,c=pn,wt=null,Ba(e,n,a),wt=s,pn=c,wt!==null)if(pn)try{(wt.nodeType===9?wt.body:wt.nodeName==="HTML"?wt.ownerDocument.body:wt).removeChild(a.stateNode)}catch(d){ut(a,n,d)}else try{wt.removeChild(a.stateNode)}catch(d){ut(a,n,d)}break;case 18:wt!==null&&(pn?(e=wt,qg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ji(e)):qg(wt,a.stateNode));break;case 4:s=wt,c=pn,wt=a.stateNode.containerInfo,pn=!0,Ba(e,n,a),wt=s,pn=c;break;case 0:case 11:case 14:case 15:bl(2,a,n),Yt||bl(4,a,n),Ba(e,n,a);break;case 1:Yt||(ca(a,n),s=a.stateNode,typeof s.componentWillUnmount=="function"&&G0(a,n,s)),Ba(e,n,a);break;case 21:Ba(e,n,a);break;case 22:Yt=(s=Yt)||a.memoizedState!==null,Ba(e,n,a),Yt=s;break;default:Ba(e,n,a)}}function P0(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ji(e)}catch(a){ut(n,n.return,a)}}}function W0(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ji(e)}catch(a){ut(n,n.return,a)}}function aE(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Q0),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Q0),n;default:throw Error(r(435,e.tag))}}function Mo(e,n){var a=aE(e);n.forEach(function(s){if(!a.has(s)){a.add(s);var c=dE.bind(null,e,s);s.then(c,c)}})}function yn(e,n){var a=n.deletions;if(a!==null)for(var s=0;s<a.length;s++){var c=a[s],d=e,b=n,N=b;e:for(;N!==null;){switch(N.tag){case 27:if(Cl(N.type)){wt=N.stateNode,pn=!1;break e}break;case 5:wt=N.stateNode,pn=!1;break e;case 3:case 4:wt=N.stateNode.containerInfo,pn=!0;break e}N=N.return}if(wt===null)throw Error(r(160));J0(d,b,c),wt=null,pn=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)eg(n,e),n=n.sibling}var Pn=null;function eg(e,n){var a=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:yn(n,e),xn(e),s&4&&(bl(3,e,e.return),Gs(3,e),bl(5,e,e.return));break;case 1:yn(n,e),xn(e),s&512&&(Yt||a===null||ca(a,a.return)),s&64&&Ha&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?s:a.concat(s))));break;case 26:var c=Pn;if(yn(n,e),xn(e),s&512&&(Yt||a===null||ca(a,a.return)),s&4){var d=a!==null?a.memoizedState:null;if(s=e.memoizedState,a===null)if(s===null)if(e.stateNode===null){e:{s=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(s){case"title":d=c.getElementsByTagName("title")[0],(!d||d[Ea]||d[Mt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(s),c.head.insertBefore(d,c.querySelector("head > title"))),an(d,s,a),d[Mt]=e,zt(d),s=d;break e;case"link":var b=ep("link","href",c).get(s+(a.href||""));if(b){for(var N=0;N<b.length;N++)if(d=b[N],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(N,1);break t}}d=c.createElement(s),an(d,s,a),c.head.appendChild(d);break;case"meta":if(b=ep("meta","content",c).get(s+(a.content||""))){for(N=0;N<b.length;N++)if(d=b[N],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(N,1);break t}}d=c.createElement(s),an(d,s,a),c.head.appendChild(d);break;default:throw Error(r(468,s))}d[Mt]=e,zt(d),s=d}e.stateNode=s}else tp(c,e.type,e.stateNode);else e.stateNode=Wg(c,s,e.memoizedProps);else d!==s?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,s===null?tp(c,e.type,e.stateNode):Wg(c,s,e.memoizedProps)):s===null&&e.stateNode!==null&&gf(e,e.memoizedProps,a.memoizedProps)}break;case 27:yn(n,e),xn(e),s&512&&(Yt||a===null||ca(a,a.return)),a!==null&&s&4&&gf(e,e.memoizedProps,a.memoizedProps);break;case 5:if(yn(n,e),xn(e),s&512&&(Yt||a===null||ca(a,a.return)),e.flags&32){c=e.stateNode;try{De(c,"")}catch(be){ut(e,e.return,be)}}s&4&&e.stateNode!=null&&(c=e.memoizedProps,gf(e,c,a!==null?a.memoizedProps:c)),s&1024&&(xf=!0);break;case 6:if(yn(n,e),xn(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,a=e.stateNode;try{a.nodeValue=s}catch(be){ut(e,e.return,be)}}break;case 3:if(Go=null,c=Pn,Pn=Yo(n.containerInfo),yn(n,e),Pn=c,xn(e),s&4&&a!==null&&a.memoizedState.isDehydrated)try{Ji(n.containerInfo)}catch(be){ut(e,e.return,be)}xf&&(xf=!1,tg(e));break;case 4:s=Pn,Pn=Yo(e.stateNode.containerInfo),yn(n,e),xn(e),Pn=s;break;case 12:yn(n,e),xn(e);break;case 31:yn(n,e),xn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Mo(e,s)));break;case 13:yn(n,e),xn(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Ro=Fe()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Mo(e,s)));break;case 22:c=e.memoizedState!==null;var $=a!==null&&a.memoizedState!==null,W=Ha,le=Yt;if(Ha=W||c,Yt=le||$,yn(n,e),Yt=le,Ha=W,xn(e),s&8192)e:for(n=e.stateNode,n._visibility=c?n._visibility&-2:n._visibility|1,c&&(a===null||$||Ha||Yt||ii(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){$=a=n;try{if(d=$.stateNode,c)b=d.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{N=$.stateNode;var ue=$.memoizedProps.style,ee=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;N.style.display=ee==null||typeof ee=="boolean"?"":(""+ee).trim()}}catch(be){ut($,$.return,be)}}}else if(n.tag===6){if(a===null){$=n;try{$.stateNode.nodeValue=c?"":$.memoizedProps}catch(be){ut($,$.return,be)}}}else if(n.tag===18){if(a===null){$=n;try{var ne=$.stateNode;c?Gg(ne,!0):Gg($.stateNode,!1)}catch(be){ut($,$.return,be)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}s&4&&(s=e.updateQueue,s!==null&&(a=s.retryQueue,a!==null&&(s.retryQueue=null,Mo(e,a))));break;case 19:yn(n,e),xn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Mo(e,s)));break;case 30:break;case 21:break;default:yn(n,e),xn(e)}}function xn(e){var n=e.flags;if(n&2){try{for(var a,s=e.return;s!==null;){if(Z0(s)){a=s;break}s=s.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var c=a.stateNode,d=pf(e);Co(e,d,c);break;case 5:var b=a.stateNode;a.flags&32&&(De(b,""),a.flags&=-33);var N=pf(e);Co(e,N,b);break;case 3:case 4:var $=a.stateNode.containerInfo,W=pf(e);yf(e,W,$);break;default:throw Error(r(161))}}catch(le){ut(e,e.return,le)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function tg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;tg(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Ua(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)K0(e,n.alternate,n),n=n.sibling}function ii(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:bl(4,n,n.return),ii(n);break;case 1:ca(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&G0(n,n.return,a),ii(n);break;case 27:er(n.stateNode);case 26:case 5:ca(n,n.return),ii(n);break;case 22:n.memoizedState===null&&ii(n);break;case 30:ii(n);break;default:ii(n)}e=e.sibling}}function $a(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var s=n.alternate,c=e,d=n,b=d.flags;switch(d.tag){case 0:case 11:case 15:$a(c,d,a),Gs(4,d);break;case 1:if($a(c,d,a),s=d,c=s.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(W){ut(s,s.return,W)}if(s=d,c=s.updateQueue,c!==null){var N=s.stateNode;try{var $=c.shared.hiddenCallbacks;if($!==null)for(c.shared.hiddenCallbacks=null,c=0;c<$.length;c++)zm($[c],N)}catch(W){ut(s,s.return,W)}}a&&b&64&&q0(d),Xs(d,d.return);break;case 27:I0(d);case 26:case 5:$a(c,d,a),a&&s===null&&b&4&&X0(d),Xs(d,d.return);break;case 12:$a(c,d,a);break;case 31:$a(c,d,a),a&&b&4&&P0(c,d);break;case 13:$a(c,d,a),a&&b&4&&W0(c,d);break;case 22:d.memoizedState===null&&$a(c,d,a),Xs(d,d.return);break;case 30:break;default:$a(c,d,a)}n=n.sibling}}function vf(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Os(a))}function bf(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Os(e))}function Wn(e,n,a,s){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)ng(e,n,a,s),n=n.sibling}function ng(e,n,a,s){var c=n.flags;switch(n.tag){case 0:case 11:case 15:Wn(e,n,a,s),c&2048&&Gs(9,n);break;case 1:Wn(e,n,a,s);break;case 3:Wn(e,n,a,s),c&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Os(e)));break;case 12:if(c&2048){Wn(e,n,a,s),e=n.stateNode;try{var d=n.memoizedProps,b=d.id,N=d.onPostCommit;typeof N=="function"&&N(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch($){ut(n,n.return,$)}}else Wn(e,n,a,s);break;case 31:Wn(e,n,a,s);break;case 13:Wn(e,n,a,s);break;case 23:break;case 22:d=n.stateNode,b=n.alternate,n.memoizedState!==null?d._visibility&2?Wn(e,n,a,s):Zs(e,n):d._visibility&2?Wn(e,n,a,s):(d._visibility|=2,$i(e,n,a,s,(n.subtreeFlags&10256)!==0||!1)),c&2048&&vf(b,n);break;case 24:Wn(e,n,a,s),c&2048&&bf(n.alternate,n);break;default:Wn(e,n,a,s)}}function $i(e,n,a,s,c){for(c=c&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,b=n,N=a,$=s,W=b.flags;switch(b.tag){case 0:case 11:case 15:$i(d,b,N,$,c),Gs(8,b);break;case 23:break;case 22:var le=b.stateNode;b.memoizedState!==null?le._visibility&2?$i(d,b,N,$,c):Zs(d,b):(le._visibility|=2,$i(d,b,N,$,c)),c&&W&2048&&vf(b.alternate,b);break;case 24:$i(d,b,N,$,c),c&&W&2048&&bf(b.alternate,b);break;default:$i(d,b,N,$,c)}n=n.sibling}}function Zs(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,s=n,c=s.flags;switch(s.tag){case 22:Zs(a,s),c&2048&&vf(s.alternate,s);break;case 24:Zs(a,s),c&2048&&bf(s.alternate,s);break;default:Zs(a,s)}n=n.sibling}}var Is=8192;function Vi(e,n,a){if(e.subtreeFlags&Is)for(e=e.child;e!==null;)ag(e,n,a),e=e.sibling}function ag(e,n,a){switch(e.tag){case 26:Vi(e,n,a),e.flags&Is&&e.memoizedState!==null&&qE(a,Pn,e.memoizedState,e.memoizedProps);break;case 5:Vi(e,n,a);break;case 3:case 4:var s=Pn;Pn=Yo(e.stateNode.containerInfo),Vi(e,n,a),Pn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Is,Is=16777216,Vi(e,n,a),Is=s):Vi(e,n,a));break;default:Vi(e,n,a)}}function lg(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 Qs(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var s=n[a];Jt=s,sg(s,e)}lg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ig(e),e=e.sibling}function ig(e){switch(e.tag){case 0:case 11:case 15:Qs(e),e.flags&2048&&bl(9,e,e.return);break;case 3:Qs(e);break;case 12:Qs(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,To(e)):Qs(e);break;default:Qs(e)}}function To(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var s=n[a];Jt=s,sg(s,e)}lg(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:bl(8,n,n.return),To(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,To(n));break;default:To(n)}e=e.sibling}}function sg(e,n){for(;Jt!==null;){var a=Jt;switch(a.tag){case 0:case 11:case 15:bl(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var s=a.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Os(a.memoizedState.cache)}if(s=a.child,s!==null)s.return=a,Jt=s;else e:for(a=e;Jt!==null;){s=Jt;var c=s.sibling,d=s.return;if(F0(s),s===a){Jt=null;break e}if(c!==null){c.return=d,Jt=c;break e}Jt=d}}}var lE={getCacheForType:function(e){var n=tn(Ut),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return tn(Ut).controller.signal}},iE=typeof WeakMap=="function"?WeakMap:Map,st=0,yt=null,Xe=null,Qe=0,ct=0,An=null,El=!1,Yi=!1,Ef=!1,Va=0,Dt=0,Sl=0,si=0,Sf=0,Cn=0,qi=0,Ks=null,vn=null,wf=!1,Ro=0,rg=0,Oo=1/0,zo=null,wl=null,Xt=0,_l=null,Gi=null,Ya=0,_f=0,Nf=null,og=null,Fs=0,Af=null;function Mn(){return(st&2)!==0&&Qe!==0?Qe&-Qe:M.T!==null?zf():al()}function cg(){if(Cn===0)if((Qe&536870912)===0||Je){var e=nl;nl<<=1,(nl&3932160)===0&&(nl=262144),Cn=e}else Cn=536870912;return e=_n.current,e!==null&&(e.flags|=32),Cn}function bn(e,n,a){(e===yt&&(ct===2||ct===9)||e.cancelPendingCommit!==null)&&(Xi(e,0),Nl(e,Qe,Cn,!1)),rt(e,a),((st&2)===0||e!==yt)&&(e===yt&&((st&2)===0&&(si|=a),Dt===4&&Nl(e,Qe,Cn,!1)),ua(e))}function ug(e,n,a){if((st&6)!==0)throw Error(r(327));var s=!a&&(n&127)===0&&(n&e.expiredLanes)===0||se(e,n),c=s?oE(e,n):Mf(e,n,!0),d=s;do{if(c===0){Yi&&!s&&Nl(e,n,0,!1);break}else{if(a=e.current.alternate,d&&!sE(a)){c=Mf(e,n,!1),d=!1;continue}if(c===2){if(d=n,e.errorRecoveryDisabledLanes&d)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;e:{var N=e;c=Ks;var $=N.current.memoizedState.isDehydrated;if($&&(Xi(N,b).flags|=256),b=Mf(N,b,!1),b!==2){if(Ef&&!$){N.errorRecoveryDisabledLanes|=d,si|=d,c=4;break e}d=vn,vn=c,d!==null&&(vn===null?vn=d:vn.push.apply(vn,d))}c=b}if(d=!1,c!==2)continue}}if(c===1){Xi(e,0),Nl(e,n,0,!0);break}e:{switch(s=e,d=c,d){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:Nl(s,n,Cn,!El);break e;case 2:vn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(c=Ro+300-Fe(),10<c)){if(Nl(s,n,Cn,!El),V(s,0,!0)!==0)break e;Ya=n,s.timeoutHandle=Vg(fg.bind(null,s,a,vn,zo,wf,n,Cn,si,qi,El,d,"Throttled",-0,0),c);break e}fg(s,a,vn,zo,wf,n,Cn,si,qi,El,d,null,-0,0)}}break}while(!0);ua(e)}function fg(e,n,a,s,c,d,b,N,$,W,le,ue,ee,ne){if(e.timeoutHandle=-1,ue=n.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ge},ag(n,d,ue);var be=(d&62914560)===d?Ro-Fe():(d&4194048)===d?rg-Fe():0;if(be=GE(ue,be),be!==null){Ya=d,e.cancelPendingCommit=be(vg.bind(null,e,n,d,a,s,c,b,N,$,le,ue,null,ee,ne)),Nl(e,d,b,!W);return}}vg(e,n,d,a,s,c,b,N,$)}function sE(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var c=a[s],d=c.getSnapshot;c=c.value;try{if(!Sn(d(),c))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Nl(e,n,a,s){n&=~Sf,n&=~si,e.suspendedLanes|=n,e.pingedLanes&=~n,s&&(e.warmLanes|=n),s=e.expirationTimes;for(var c=n;0<c;){var d=31-Pt(c),b=1<<d;s[d]=-1,c&=~b}a!==0&&ye(e,a,n)}function jo(){return(st&6)===0?(Js(0),!1):!0}function Cf(){if(Xe!==null){if(ct===0)var e=Xe.return;else e=Xe,Oa=Jl=null,Yu(e),ki=null,js=0,e=Xe;for(;e!==null;)Y0(e.alternate,e),e=e.return;Xe=null}}function Xi(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,AE(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Ya=0,Cf(),yt=e,Xe=a=Ta(e.current,null),Qe=n,ct=0,An=null,El=!1,Yi=se(e,n),Ef=!1,qi=Cn=Sf=si=Sl=Dt=0,vn=Ks=null,wf=!1,(n&8)!==0&&(n|=n&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=n;0<s;){var c=31-Pt(s),d=1<<c;n|=e[c],s&=~d}return Va=n,Wr(),a}function dg(e,n){$e=null,M.H=Vs,n===Di||n===ro?(n=Mm(),ct=3):n===Ru?(n=Mm(),ct=4):ct=n===lf?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,An=n,Xe===null&&(Dt=1,So(e,Bn(n,e.current)))}function hg(){var e=_n.current;return e===null?!0:(Qe&4194048)===Qe?Yn===null:(Qe&62914560)===Qe||(Qe&536870912)!==0?e===Yn:!1}function mg(){var e=M.H;return M.H=Vs,e===null?Vs:e}function gg(){var e=M.A;return M.A=lE,e}function Do(){Dt=4,El||(Qe&4194048)!==Qe&&_n.current!==null||(Yi=!0),(Sl&134217727)===0&&(si&134217727)===0||yt===null||Nl(yt,Qe,Cn,!1)}function Mf(e,n,a){var s=st;st|=2;var c=mg(),d=gg();(yt!==e||Qe!==n)&&(zo=null,Xi(e,n)),n=!1;var b=Dt;e:do try{if(ct!==0&&Xe!==null){var N=Xe,$=An;switch(ct){case 8:Cf(),b=6;break e;case 3:case 2:case 9:case 6:_n.current===null&&(n=!0);var W=ct;if(ct=0,An=null,Zi(e,N,$,W),a&&Yi){b=0;break e}break;default:W=ct,ct=0,An=null,Zi(e,N,$,W)}}rE(),b=Dt;break}catch(le){dg(e,le)}while(!0);return n&&e.shellSuspendCounter++,Oa=Jl=null,st=s,M.H=c,M.A=d,Xe===null&&(yt=null,Qe=0,Wr()),b}function rE(){for(;Xe!==null;)pg(Xe)}function oE(e,n){var a=st;st|=2;var s=mg(),c=gg();yt!==e||Qe!==n?(zo=null,Oo=Fe()+500,Xi(e,n)):Yi=se(e,n);e:do try{if(ct!==0&&Xe!==null){n=Xe;var d=An;t:switch(ct){case 1:ct=0,An=null,Zi(e,n,d,1);break;case 2:case 9:if(Am(d)){ct=0,An=null,yg(n);break}n=function(){ct!==2&&ct!==9||yt!==e||(ct=7),ua(e)},d.then(n,n);break e;case 3:ct=7;break e;case 4:ct=5;break e;case 7:Am(d)?(ct=0,An=null,yg(n)):(ct=0,An=null,Zi(e,n,d,7));break;case 5:var b=null;switch(Xe.tag){case 26:b=Xe.memoizedState;case 5:case 27:var N=Xe;if(b?np(b):N.stateNode.complete){ct=0,An=null;var $=N.sibling;if($!==null)Xe=$;else{var W=N.return;W!==null?(Xe=W,ko(W)):Xe=null}break t}}ct=0,An=null,Zi(e,n,d,5);break;case 6:ct=0,An=null,Zi(e,n,d,6);break;case 8:Cf(),Dt=6;break e;default:throw Error(r(462))}}cE();break}catch(le){dg(e,le)}while(!0);return Oa=Jl=null,M.H=s,M.A=c,st=a,Xe!==null?0:(yt=null,Qe=0,Wr(),Dt)}function cE(){for(;Xe!==null&&!gt();)pg(Xe)}function pg(e){var n=$0(e.alternate,e,Va);e.memoizedProps=e.pendingProps,n===null?ko(e):Xe=n}function yg(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=D0(a,n,n.pendingProps,n.type,void 0,Qe);break;case 11:n=D0(a,n,n.pendingProps,n.type.render,n.ref,Qe);break;case 5:Yu(n);default:Y0(a,n),n=Xe=gm(n,Va),n=$0(a,n,Va)}e.memoizedProps=e.pendingProps,n===null?ko(e):Xe=n}function Zi(e,n,a,s){Oa=Jl=null,Yu(n),ki=null,js=0;var c=n.return;try{if(J1(e,c,n,a,Qe)){Dt=1,So(e,Bn(a,e.current)),Xe=null;return}}catch(d){if(c!==null)throw Xe=c,d;Dt=1,So(e,Bn(a,e.current)),Xe=null;return}n.flags&32768?(Je||s===1?e=!0:Yi||(Qe&536870912)!==0?e=!1:(El=e=!0,(s===2||s===9||s===3||s===6)&&(s=_n.current,s!==null&&s.tag===13&&(s.flags|=16384))),xg(n,e)):ko(n)}function ko(e){var n=e;do{if((n.flags&32768)!==0){xg(n,El);return}e=n.return;var a=eE(n.alternate,n,Va);if(a!==null){Xe=a;return}if(n=n.sibling,n!==null){Xe=n;return}Xe=n=e}while(n!==null);Dt===0&&(Dt=5)}function xg(e,n){do{var a=tE(e.alternate,e);if(a!==null){a.flags&=32767,Xe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){Xe=e;return}Xe=e=a}while(e!==null);Dt=6,Xe=null}function vg(e,n,a,s,c,d,b,N,$){e.cancelPendingCommit=null;do Lo();while(Xt!==0);if((st&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(d=n.lanes|n.childLanes,d|=gu,Ee(e,a,d,b,N,$),e===yt&&(Xe=yt=null,Qe=0),Gi=n,_l=e,Ya=a,_f=d,Nf=c,og=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,hE(At,function(){return _g(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=M.T,M.T=null,c=U.p,U.p=2,b=st,st|=4;try{nE(e,n,a)}finally{st=b,U.p=c,M.T=s}}Xt=1,bg(),Eg(),Sg()}}function bg(){if(Xt===1){Xt=0;var e=_l,n=Gi,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var s=U.p;U.p=2;var c=st;st|=4;try{eg(n,e);var d=$f,b=sm(e.containerInfo),N=d.focusedElem,$=d.selectionRange;if(b!==N&&N&&N.ownerDocument&&im(N.ownerDocument.documentElement,N)){if($!==null&&uu(N)){var W=$.start,le=$.end;if(le===void 0&&(le=W),"selectionStart"in N)N.selectionStart=W,N.selectionEnd=Math.min(le,N.value.length);else{var ue=N.ownerDocument||document,ee=ue&&ue.defaultView||window;if(ee.getSelection){var ne=ee.getSelection(),be=N.textContent.length,je=Math.min($.start,be),mt=$.end===void 0?je:Math.min($.end,be);!ne.extend&&je>mt&&(b=mt,mt=je,je=b);var F=lm(N,je),G=lm(N,mt);if(F&&G&&(ne.rangeCount!==1||ne.anchorNode!==F.node||ne.anchorOffset!==F.offset||ne.focusNode!==G.node||ne.focusOffset!==G.offset)){var P=ue.createRange();P.setStart(F.node,F.offset),ne.removeAllRanges(),je>mt?(ne.addRange(P),ne.extend(G.node,G.offset)):(P.setEnd(G.node,G.offset),ne.addRange(P))}}}}for(ue=[],ne=N;ne=ne.parentNode;)ne.nodeType===1&&ue.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<ue.length;N++){var oe=ue[N];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}Qo=!!Uf,$f=Uf=null}finally{st=c,U.p=s,M.T=a}}e.current=n,Xt=2}}function Eg(){if(Xt===2){Xt=0;var e=_l,n=Gi,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var s=U.p;U.p=2;var c=st;st|=4;try{K0(e,n.alternate,n)}finally{st=c,U.p=s,M.T=a}}Xt=3}}function Sg(){if(Xt===4||Xt===3){Xt=0,vt();var e=_l,n=Gi,a=Ya,s=og;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Xt=5:(Xt=0,Gi=_l=null,wg(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(wl=null),Zn(a),n=n.stateNode,Qt&&typeof Qt.onCommitFiberRoot=="function")try{Qt.onCommitFiberRoot(xa,n,void 0,(n.current.flags&128)===128)}catch{}if(s!==null){n=M.T,c=U.p,U.p=2,M.T=null;try{for(var d=e.onRecoverableError,b=0;b<s.length;b++){var N=s[b];d(N.value,{componentStack:N.stack})}}finally{M.T=n,U.p=c}}(Ya&3)!==0&&Lo(),ua(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Af?Fs++:(Fs=0,Af=e):Fs=0,Js(0)}}function wg(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Os(n)))}function Lo(){return bg(),Eg(),Sg(),_g()}function _g(){if(Xt!==5)return!1;var e=_l,n=_f;_f=0;var a=Zn(Ya),s=M.T,c=U.p;try{U.p=32>a?32:a,M.T=null,a=Nf,Nf=null;var d=_l,b=Ya;if(Xt=0,Gi=_l=null,Ya=0,(st&6)!==0)throw Error(r(331));var N=st;if(st|=4,ig(d.current),ng(d,d.current,b,a),st=N,Js(0,!1),Qt&&typeof Qt.onPostCommitFiberRoot=="function")try{Qt.onPostCommitFiberRoot(xa,d)}catch{}return!0}finally{U.p=c,M.T=s,wg(e,n)}}function Ng(e,n,a){n=Bn(a,n),n=af(e.stateNode,n,2),e=yl(e,n,2),e!==null&&(rt(e,2),ua(e))}function ut(e,n,a){if(e.tag===3)Ng(e,e,a);else for(;n!==null;){if(n.tag===3){Ng(n,e,a);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(wl===null||!wl.has(s))){e=Bn(a,e),a=A0(2),s=yl(n,a,2),s!==null&&(C0(a,s,n,e),rt(s,2),ua(s));break}}n=n.return}}function Tf(e,n,a){var s=e.pingCache;if(s===null){s=e.pingCache=new iE;var c=new Set;s.set(n,c)}else c=s.get(n),c===void 0&&(c=new Set,s.set(n,c));c.has(a)||(Ef=!0,c.add(a),e=uE.bind(null,e,n,a),n.then(e,e))}function uE(e,n,a){var s=e.pingCache;s!==null&&s.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,yt===e&&(Qe&a)===a&&(Dt===4||Dt===3&&(Qe&62914560)===Qe&&300>Fe()-Ro?(st&2)===0&&Xi(e,0):Sf|=a,qi===Qe&&(qi=0)),ua(e)}function Ag(e,n){n===0&&(n=ke()),e=Ql(e,n),e!==null&&(rt(e,n),ua(e))}function fE(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Ag(e,a)}function dE(e,n){var a=0;switch(e.tag){case 31:case 13:var s=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(n),Ag(e,a)}function hE(e,n){return xt(e,n)}var Ho=null,Ii=null,Rf=!1,Bo=!1,Of=!1,Al=0;function ua(e){e!==Ii&&e.next===null&&(Ii===null?Ho=Ii=e:Ii=Ii.next=e),Bo=!0,Rf||(Rf=!0,gE())}function Js(e,n){if(!Of&&Bo){Of=!0;do for(var a=!1,s=Ho;s!==null;){if(e!==0){var c=s.pendingLanes;if(c===0)var d=0;else{var b=s.suspendedLanes,N=s.pingedLanes;d=(1<<31-Pt(42|e)+1)-1,d&=c&~(b&~N),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,Rg(s,d))}else d=Qe,d=V(s,s===yt?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(d&3)===0||se(s,d)||(a=!0,Rg(s,d));s=s.next}while(a);Of=!1}}function mE(){Cg()}function Cg(){Bo=Rf=!1;var e=0;Al!==0&&NE()&&(e=Al);for(var n=Fe(),a=null,s=Ho;s!==null;){var c=s.next,d=Mg(s,n);d===0?(s.next=null,a===null?Ho=c:a.next=c,c===null&&(Ii=a)):(a=s,(e!==0||(d&3)!==0)&&(Bo=!0)),s=c}Xt!==0&&Xt!==5||Js(e),Al!==0&&(Al=0)}function Mg(e,n){for(var a=e.suspendedLanes,s=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var b=31-Pt(d),N=1<<b,$=c[b];$===-1?((N&a)===0||(N&s)!==0)&&(c[b]=pe(N,n)):$<=n&&(e.expiredLanes|=N),d&=~N}if(n=yt,a=Qe,a=V(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,a===0||e===n&&(ct===2||ct===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&It(s),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||se(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(s!==null&&It(s),Zn(a)){case 2:case 8:a=ln;break;case 32:a=At;break;case 268435456:a=jn;break;default:a=At}return s=Tg.bind(null,e),a=xt(a,s),e.callbackPriority=n,e.callbackNode=a,n}return s!==null&&s!==null&&It(s),e.callbackPriority=2,e.callbackNode=null,2}function Tg(e,n){if(Xt!==0&&Xt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Lo()&&e.callbackNode!==a)return null;var s=Qe;return s=V(e,e===yt?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(ug(e,s,n),Mg(e,Fe()),e.callbackNode!=null&&e.callbackNode===a?Tg.bind(null,e):null)}function Rg(e,n){if(Lo())return null;ug(e,n,!0)}function gE(){CE(function(){(st&6)!==0?xt(Gt,mE):Cg()})}function zf(){if(Al===0){var e=zi;e===0&&(e=va,va<<=1,(va&261888)===0&&(va=256)),Al=e}return Al}function Og(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:cl(""+e)}function zg(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function pE(e,n,a,s,c){if(n==="submit"&&a&&a.stateNode===c){var d=Og((c[Kt]||null).action),b=s.submitter;b&&(n=(n=b[Kt]||null)?Og(n.formAction):b.getAttribute("formAction"),n!==null&&(d=n,b=null));var N=new Kr("action","action",null,s,c);e.push({event:N,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Al!==0){var $=b?zg(c,b):new FormData(c);Ju(a,{pending:!0,data:$,method:c.method,action:d},null,$)}}else typeof d=="function"&&(N.preventDefault(),$=b?zg(c,b):new FormData(c),Ju(a,{pending:!0,data:$,method:c.method,action:d},d,$))},currentTarget:c}]})}}for(var jf=0;jf<mu.length;jf++){var Df=mu[jf],yE=Df.toLowerCase(),xE=Df[0].toUpperCase()+Df.slice(1);Jn(yE,"on"+xE)}Jn(cm,"onAnimationEnd"),Jn(um,"onAnimationIteration"),Jn(fm,"onAnimationStart"),Jn("dblclick","onDoubleClick"),Jn("focusin","onFocus"),Jn("focusout","onBlur"),Jn(D1,"onTransitionRun"),Jn(k1,"onTransitionStart"),Jn(L1,"onTransitionCancel"),Jn(dm,"onTransitionEnd"),de("onMouseEnter",["mouseout","mouseover"]),de("onMouseLeave",["mouseout","mouseover"]),de("onPointerEnter",["pointerout","pointerover"]),de("onPointerLeave",["pointerout","pointerover"]),Fn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ps="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(" "),vE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ps));function jg(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var s=e[a],c=s.event;s=s.listeners;e:{var d=void 0;if(n)for(var b=s.length-1;0<=b;b--){var N=s[b],$=N.instance,W=N.currentTarget;if(N=N.listener,$!==d&&c.isPropagationStopped())break e;d=N,c.currentTarget=W;try{d(c)}catch(le){Pr(le)}c.currentTarget=null,d=$}else for(b=0;b<s.length;b++){if(N=s[b],$=N.instance,W=N.currentTarget,N=N.listener,$!==d&&c.isPropagationStopped())break e;d=N,c.currentTarget=W;try{d(c)}catch(le){Pr(le)}c.currentTarget=null,d=$}}}}function Ze(e,n){var a=n[il];a===void 0&&(a=n[il]=new Set);var s=e+"__bubble";a.has(s)||(Dg(n,e,2,!1),a.add(s))}function kf(e,n,a){var s=0;n&&(s|=4),Dg(a,e,s,n)}var Uo="_reactListening"+Math.random().toString(36).slice(2);function Lf(e){if(!e[Uo]){e[Uo]=!0,bi.forEach(function(a){a!=="selectionchange"&&(vE.has(a)||kf(a,!1,e),kf(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Uo]||(n[Uo]=!0,kf("selectionchange",!1,n))}}function Dg(e,n,a,s){switch(cp(n)){case 2:var c=IE;break;case 8:c=QE;break;default:c=Jf}a=c.bind(null,n,a,e),c=void 0,!tu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),s?c!==void 0?e.addEventListener(n,a,{capture:!0,passive:c}):e.addEventListener(n,a,!0):c!==void 0?e.addEventListener(n,a,{passive:c}):e.addEventListener(n,a,!1)}function Hf(e,n,a,s,c){var d=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var b=s.tag;if(b===3||b===4){var N=s.stateNode.containerInfo;if(N===c)break;if(b===4)for(b=s.return;b!==null;){var $=b.tag;if(($===3||$===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;N!==null;){if(b=Wt(N),b===null)return;if($=b.tag,$===5||$===6||$===26||$===27){s=d=b;continue e}N=N.parentNode}}s=s.return}Xr(function(){var W=d,le=Ue(a),ue=[];e:{var ee=hm.get(e);if(ee!==void 0){var ne=Kr,be=e;switch(e){case"keypress":if(Ir(a)===0)break e;case"keydown":case"keyup":ne=d1;break;case"focusin":be="focus",ne=iu;break;case"focusout":be="blur",ne=iu;break;case"beforeblur":case"afterblur":ne=iu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=Yh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=e1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=g1;break;case cm:case um:case fm:ne=a1;break;case dm:ne=y1;break;case"scroll":case"scrollend":ne=Pb;break;case"wheel":ne=v1;break;case"copy":case"cut":case"paste":ne=i1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Gh;break;case"toggle":case"beforetoggle":ne=E1}var je=(n&4)!==0,mt=!je&&(e==="scroll"||e==="scrollend"),F=je?ee!==null?ee+"Capture":null:ee;je=[];for(var G=W,P;G!==null;){var oe=G;if(P=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||P===null||F===null||(oe=bs(G,F),oe!=null&&je.push(Ws(G,oe,P))),mt)break;G=G.return}0<je.length&&(ee=new ne(ee,be,null,a,le),ue.push({event:ee,listeners:je}))}}if((n&7)===0){e:{if(ee=e==="mouseover"||e==="pointerover",ne=e==="mouseout"||e==="pointerout",ee&&a!==Ne&&(be=a.relatedTarget||a.fromElement)&&(Wt(be)||be[In]))break e;if((ne||ee)&&(ee=le.window===le?le:(ee=le.ownerDocument)?ee.defaultView||ee.parentWindow:window,ne?(be=a.relatedTarget||a.toElement,ne=W,be=be?Wt(be):null,be!==null&&(mt=u(be),je=be.tag,be!==mt||je!==5&&je!==27&&je!==6)&&(be=null)):(ne=null,be=W),ne!==be)){if(je=Yh,oe="onMouseLeave",F="onMouseEnter",G="mouse",(e==="pointerout"||e==="pointerover")&&(je=Gh,oe="onPointerLeave",F="onPointerEnter",G="pointer"),mt=ne==null?ee:Kn(ne),P=be==null?ee:Kn(be),ee=new je(oe,G+"leave",ne,a,le),ee.target=mt,ee.relatedTarget=P,oe=null,Wt(le)===W&&(je=new je(F,G+"enter",be,a,le),je.target=P,je.relatedTarget=mt,oe=je),mt=oe,ne&&be)t:{for(je=bE,F=ne,G=be,P=0,oe=F;oe;oe=je(oe))P++;oe=0;for(var Oe=G;Oe;Oe=je(Oe))oe++;for(;0<P-oe;)F=je(F),P--;for(;0<oe-P;)G=je(G),oe--;for(;P--;){if(F===G||G!==null&&F===G.alternate){je=F;break t}F=je(F),G=je(G)}je=null}else je=null;ne!==null&&kg(ue,ee,ne,je,!1),be!==null&&mt!==null&&kg(ue,mt,be,je,!0)}}e:{if(ee=W?Kn(W):window,ne=ee.nodeName&&ee.nodeName.toLowerCase(),ne==="select"||ne==="input"&&ee.type==="file")var tt=Ph;else if(Fh(ee))if(Wh)tt=O1;else{tt=T1;var Ae=M1}else ne=ee.nodeName,!ne||ne.toLowerCase()!=="input"||ee.type!=="checkbox"&&ee.type!=="radio"?W&&ol(W.elementType)&&(tt=Ph):tt=R1;if(tt&&(tt=tt(e,W))){Jh(ue,tt,a,le);break e}Ae&&Ae(e,ee,W),e==="focusout"&&W&&ee.type==="number"&&W.memoizedProps.value!=null&&rl(ee,"number",ee.value)}switch(Ae=W?Kn(W):window,e){case"focusin":(Fh(Ae)||Ae.contentEditable==="true")&&(_i=Ae,fu=W,Ms=null);break;case"focusout":Ms=fu=_i=null;break;case"mousedown":du=!0;break;case"contextmenu":case"mouseup":case"dragend":du=!1,rm(ue,a,le);break;case"selectionchange":if(j1)break;case"keydown":case"keyup":rm(ue,a,le)}var Ye;if(ru)e:{switch(e){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else wi?Qh(e,a)&&(Ke="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ke="onCompositionStart");Ke&&(Xh&&a.locale!=="ko"&&(wi||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&wi&&(Ye=$h()):(ul=le,nu="value"in ul?ul.value:ul.textContent,wi=!0)),Ae=$o(W,Ke),0<Ae.length&&(Ke=new qh(Ke,e,null,a,le),ue.push({event:Ke,listeners:Ae}),Ye?Ke.data=Ye:(Ye=Kh(a),Ye!==null&&(Ke.data=Ye)))),(Ye=w1?_1(e,a):N1(e,a))&&(Ke=$o(W,"onBeforeInput"),0<Ke.length&&(Ae=new qh("onBeforeInput","beforeinput",null,a,le),ue.push({event:Ae,listeners:Ke}),Ae.data=Ye)),pE(ue,e,W,a,le)}jg(ue,n)})}function Ws(e,n,a){return{instance:e,listener:n,currentTarget:a}}function $o(e,n){for(var a=n+"Capture",s=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=bs(e,a),c!=null&&s.unshift(Ws(e,c,d)),c=bs(e,n),c!=null&&s.push(Ws(e,c,d))),e.tag===3)return s;e=e.return}return[]}function bE(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kg(e,n,a,s,c){for(var d=n._reactName,b=[];a!==null&&a!==s;){var N=a,$=N.alternate,W=N.stateNode;if(N=N.tag,$!==null&&$===s)break;N!==5&&N!==26&&N!==27||W===null||($=W,c?(W=bs(a,d),W!=null&&b.unshift(Ws(a,W,$))):c||(W=bs(a,d),W!=null&&b.push(Ws(a,W,$)))),a=a.return}b.length!==0&&e.push({event:n,listeners:b})}var EE=/\r\n?/g,SE=/\u0000|\uFFFD/g;function Lg(e){return(typeof e=="string"?e:""+e).replace(EE,`
|
|
9
|
+
`).replace(SE,"")}function Hg(e,n){return n=Lg(n),Lg(e)===n}function ht(e,n,a,s,c,d){switch(a){case"children":typeof s=="string"?n==="body"||n==="textarea"&&s===""||De(e,s):(typeof s=="number"||typeof s=="bigint")&&n!=="body"&&De(e,""+s);break;case"className":dn(e,"class",s);break;case"tabIndex":dn(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":dn(e,a,s);break;case"style":ot(e,s,d);break;case"data":if(n!=="object"){dn(e,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=cl(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(n!=="input"&&ht(e,n,"name",c.name,c,null),ht(e,n,"formEncType",c.formEncType,c,null),ht(e,n,"formMethod",c.formMethod,c,null),ht(e,n,"formTarget",c.formTarget,c,null)):(ht(e,n,"encType",c.encType,c,null),ht(e,n,"method",c.method,c,null),ht(e,n,"target",c.target,c,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}s=cl(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(e.onclick=ge);break;case"onScroll":s!=null&&Ze("scroll",e);break;case"onScrollEnd":s!=null&&Ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}a=cl(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""+s):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,s):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(a,s):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):e.setAttribute(a,s);break;case"popover":Ze("beforetoggle",e),Ze("toggle",e),Ft(e,"popover",s);break;case"xlinkActuate":rn(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":rn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":rn(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":rn(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":rn(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":rn(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":rn(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":rn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":rn(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Ft(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Ca.get(a)||a,Ft(e,a,s))}}function Bf(e,n,a,s,c,d){switch(a){case"style":ot(e,s,d);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(a=s.__html,a!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof s=="string"?De(e,s):(typeof s=="number"||typeof s=="bigint")&&De(e,""+s);break;case"onScroll":s!=null&&Ze("scroll",e);break;case"onScrollEnd":s!=null&&Ze("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ge);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Sa.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),n=a.slice(2,c?a.length-7:void 0),d=e[Kt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(n,d,c),typeof s=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,s,c);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):Ft(e,a,s)}}}function an(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",e),Ze("load",e);var s=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var b=a[d];if(b!=null)switch(d){case"src":s=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ht(e,n,d,b,a,null)}}c&&ht(e,n,"srcSet",a.srcSet,a,null),s&&ht(e,n,"src",a.src,a,null);return;case"input":Ze("invalid",e);var N=d=b=c=null,$=null,W=null;for(s in a)if(a.hasOwnProperty(s)){var le=a[s];if(le!=null)switch(s){case"name":c=le;break;case"type":b=le;break;case"checked":$=le;break;case"defaultChecked":W=le;break;case"value":d=le;break;case"defaultValue":N=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(r(137,n));break;default:ht(e,n,s,le,a,null)}}Aa(e,d,N,$,W,b,c,!1);return;case"select":Ze("invalid",e),s=b=d=null;for(c in a)if(a.hasOwnProperty(c)&&(N=a[c],N!=null))switch(c){case"value":d=N;break;case"defaultValue":b=N;break;case"multiple":s=N;default:ht(e,n,c,N,a,null)}n=d,a=b,e.multiple=!!s,n!=null?Ht(e,!!s,n,!1):a!=null&&Ht(e,!!s,a,!0);return;case"textarea":Ze("invalid",e),d=c=s=null;for(b in a)if(a.hasOwnProperty(b)&&(N=a[b],N!=null))switch(b){case"value":s=N;break;case"defaultValue":c=N;break;case"children":d=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(r(91));break;default:ht(e,n,b,N,a,null)}Si(e,s,c,d);return;case"option":for($ in a)if(a.hasOwnProperty($)&&(s=a[$],s!=null))switch($){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:ht(e,n,$,s,a,null)}return;case"dialog":Ze("beforetoggle",e),Ze("toggle",e),Ze("cancel",e),Ze("close",e);break;case"iframe":case"object":Ze("load",e);break;case"video":case"audio":for(s=0;s<Ps.length;s++)Ze(Ps[s],e);break;case"image":Ze("error",e),Ze("load",e);break;case"details":Ze("toggle",e);break;case"embed":case"source":case"link":Ze("error",e),Ze("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(W in a)if(a.hasOwnProperty(W)&&(s=a[W],s!=null))switch(W){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ht(e,n,W,s,a,null)}return;default:if(ol(n)){for(le in a)a.hasOwnProperty(le)&&(s=a[le],s!==void 0&&Bf(e,n,le,s,a,void 0));return}}for(N in a)a.hasOwnProperty(N)&&(s=a[N],s!=null&&ht(e,n,N,s,a,null))}function wE(e,n,a,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,b=null,N=null,$=null,W=null,le=null;for(ne in a){var ue=a[ne];if(a.hasOwnProperty(ne)&&ue!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":$=ue;default:s.hasOwnProperty(ne)||ht(e,n,ne,null,s,ue)}}for(var ee in s){var ne=s[ee];if(ue=a[ee],s.hasOwnProperty(ee)&&(ne!=null||ue!=null))switch(ee){case"type":d=ne;break;case"name":c=ne;break;case"checked":W=ne;break;case"defaultChecked":le=ne;break;case"value":b=ne;break;case"defaultValue":N=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,n));break;default:ne!==ue&&ht(e,n,ee,ne,s,ue)}}Na(e,b,N,$,W,le,d,c);return;case"select":ne=b=N=ee=null;for(d in a)if($=a[d],a.hasOwnProperty(d)&&$!=null)switch(d){case"value":break;case"multiple":ne=$;default:s.hasOwnProperty(d)||ht(e,n,d,null,s,$)}for(c in s)if(d=s[c],$=a[c],s.hasOwnProperty(c)&&(d!=null||$!=null))switch(c){case"value":ee=d;break;case"defaultValue":N=d;break;case"multiple":b=d;default:d!==$&&ht(e,n,c,d,s,$)}n=N,a=b,s=ne,ee!=null?Ht(e,!!a,ee,!1):!!s!=!!a&&(n!=null?Ht(e,!!a,n,!0):Ht(e,!!a,a?[]:"",!1));return;case"textarea":ne=ee=null;for(N in a)if(c=a[N],a.hasOwnProperty(N)&&c!=null&&!s.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:ht(e,n,N,null,s,c)}for(b in s)if(c=s[b],d=a[b],s.hasOwnProperty(b)&&(c!=null||d!=null))switch(b){case"value":ee=c;break;case"defaultValue":ne=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==d&&ht(e,n,b,c,s,d)}qr(e,ee,ne);return;case"option":for(var be in a)if(ee=a[be],a.hasOwnProperty(be)&&ee!=null&&!s.hasOwnProperty(be))switch(be){case"selected":e.selected=!1;break;default:ht(e,n,be,null,s,ee)}for($ in s)if(ee=s[$],ne=a[$],s.hasOwnProperty($)&&ee!==ne&&(ee!=null||ne!=null))switch($){case"selected":e.selected=ee&&typeof ee!="function"&&typeof ee!="symbol";break;default:ht(e,n,$,ee,s,ne)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var je in a)ee=a[je],a.hasOwnProperty(je)&&ee!=null&&!s.hasOwnProperty(je)&&ht(e,n,je,null,s,ee);for(W in s)if(ee=s[W],ne=a[W],s.hasOwnProperty(W)&&ee!==ne&&(ee!=null||ne!=null))switch(W){case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(r(137,n));break;default:ht(e,n,W,ee,s,ne)}return;default:if(ol(n)){for(var mt in a)ee=a[mt],a.hasOwnProperty(mt)&&ee!==void 0&&!s.hasOwnProperty(mt)&&Bf(e,n,mt,void 0,s,ee);for(le in s)ee=s[le],ne=a[le],!s.hasOwnProperty(le)||ee===ne||ee===void 0&&ne===void 0||Bf(e,n,le,ee,s,ne);return}}for(var F in a)ee=a[F],a.hasOwnProperty(F)&&ee!=null&&!s.hasOwnProperty(F)&&ht(e,n,F,null,s,ee);for(ue in s)ee=s[ue],ne=a[ue],!s.hasOwnProperty(ue)||ee===ne||ee==null&&ne==null||ht(e,n,ue,ee,s,ne)}function Bg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function _E(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var c=a[s],d=c.transferSize,b=c.initiatorType,N=c.duration;if(d&&N&&Bg(b)){for(b=0,N=c.responseEnd,s+=1;s<a.length;s++){var $=a[s],W=$.startTime;if(W>N)break;var le=$.transferSize,ue=$.initiatorType;le&&Bg(ue)&&($=$.responseEnd,b+=le*($<N?1:(N-W)/($-W)))}if(--s,n+=8*(d+b)/(c.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 Uf=null,$f=null;function Vo(e){return e.nodeType===9?e:e.ownerDocument}function Ug(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 $g(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 Vf(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 Yf=null;function NE(){var e=window.event;return e&&e.type==="popstate"?e===Yf?!1:(Yf=e,!0):(Yf=null,!1)}var Vg=typeof setTimeout=="function"?setTimeout:void 0,AE=typeof clearTimeout=="function"?clearTimeout:void 0,Yg=typeof Promise=="function"?Promise:void 0,CE=typeof queueMicrotask=="function"?queueMicrotask:typeof Yg<"u"?function(e){return Yg.resolve(null).then(e).catch(ME)}:Vg;function ME(e){setTimeout(function(){throw e})}function Cl(e){return e==="head"}function qg(e,n){var a=n,s=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(s===0){e.removeChild(c),Ji(n);return}s--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")s++;else if(a==="html")er(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,er(a);for(var d=a.firstChild;d;){var b=d.nextSibling,N=d.nodeName;d[Ea]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=b}}else a==="body"&&er(e.ownerDocument.body);a=c}while(a);Ji(n)}function Gg(e,n){var a=e;e=0;do{var s=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=s}while(a)}function qf(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":qf(a),ql(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function TE(e,n,a,s){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Ea])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=qn(e.nextSibling),e===null)break}return null}function RE(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=qn(e.nextSibling),e===null))return null;return e}function Xg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=qn(e.nextSibling),e===null))return null;return e}function Gf(e){return e.data==="$?"||e.data==="$~"}function Xf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function OE(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var s=function(){n(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function qn(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 Zf=null;function Zg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return qn(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function Ig(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function Qg(e,n,a){switch(n=Vo(a),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function er(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);ql(e)}var Gn=new Map,Kg=new Set;function Yo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var qa=U.d;U.d={f:zE,r:jE,D:DE,C:kE,L:LE,m:HE,X:UE,S:BE,M:$E};function zE(){var e=qa.f(),n=jo();return e||n}function jE(e){var n=Qn(e);n!==null&&n.tag===5&&n.type==="form"?d0(n):qa.r(e)}var Qi=typeof document>"u"?null:document;function Fg(e,n,a){var s=Qi;if(s&&typeof n=="string"&&n){var c=on(n);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Kg.has(c)||(Kg.add(c),e={rel:e,crossOrigin:a,href:n},s.querySelector(c)===null&&(n=s.createElement("link"),an(n,"link",e),zt(n),s.head.appendChild(n)))}}function DE(e){qa.D(e),Fg("dns-prefetch",e,null)}function kE(e,n){qa.C(e,n),Fg("preconnect",e,n)}function LE(e,n,a){qa.L(e,n,a);var s=Qi;if(s&&e&&n){var c='link[rel="preload"][as="'+on(n)+'"]';n==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+on(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+on(a.imageSizes)+'"]')):c+='[href="'+on(e)+'"]';var d=c;switch(n){case"style":d=Ki(e);break;case"script":d=Fi(e)}Gn.has(d)||(e=x({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),Gn.set(d,e),s.querySelector(c)!==null||n==="style"&&s.querySelector(tr(d))||n==="script"&&s.querySelector(nr(d))||(n=s.createElement("link"),an(n,"link",e),zt(n),s.head.appendChild(n)))}}function HE(e,n){qa.m(e,n);var a=Qi;if(a&&e){var s=n&&typeof n.as=="string"?n.as:"script",c='link[rel="modulepreload"][as="'+on(s)+'"][href="'+on(e)+'"]',d=c;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Fi(e)}if(!Gn.has(d)&&(e=x({rel:"modulepreload",href:e},n),Gn.set(d,e),a.querySelector(c)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(nr(d)))return}s=a.createElement("link"),an(s,"link",e),zt(s),a.head.appendChild(s)}}}function BE(e,n,a){qa.S(e,n,a);var s=Qi;if(s&&e){var c=sa(s).hoistableStyles,d=Ki(e);n=n||"default";var b=c.get(d);if(!b){var N={loading:0,preload:null};if(b=s.querySelector(tr(d)))N.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":n},a),(a=Gn.get(d))&&If(e,a);var $=b=s.createElement("link");zt($),an($,"link",e),$._p=new Promise(function(W,le){$.onload=W,$.onerror=le}),$.addEventListener("load",function(){N.loading|=1}),$.addEventListener("error",function(){N.loading|=2}),N.loading|=4,qo(b,n,s)}b={type:"stylesheet",instance:b,count:1,state:N},c.set(d,b)}}}function UE(e,n){qa.X(e,n);var a=Qi;if(a&&e){var s=sa(a).hoistableScripts,c=Fi(e),d=s.get(c);d||(d=a.querySelector(nr(c)),d||(e=x({src:e,async:!0},n),(n=Gn.get(c))&&Qf(e,n),d=a.createElement("script"),zt(d),an(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(c,d))}}function $E(e,n){qa.M(e,n);var a=Qi;if(a&&e){var s=sa(a).hoistableScripts,c=Fi(e),d=s.get(c);d||(d=a.querySelector(nr(c)),d||(e=x({src:e,async:!0,type:"module"},n),(n=Gn.get(c))&&Qf(e,n),d=a.createElement("script"),zt(d),an(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(c,d))}}function Jg(e,n,a,s){var c=(c=he.current)?Yo(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=Ki(a.href),a=sa(c).hoistableStyles,s=a.get(n),s||(s={type:"style",instance:null,count:0,state:null},a.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ki(a.href);var d=sa(c).hoistableStyles,b=d.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,b),(d=c.querySelector(tr(e)))&&!d._p&&(b.instance=d,b.state.loading=5),Gn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Gn.set(e,a),d||VE(c,e,a,b.state))),n&&s===null)throw Error(r(528,""));return b}if(n&&s!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Fi(a),a=sa(c).hoistableScripts,s=a.get(n),s||(s={type:"script",instance:null,count:0,state:null},a.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ki(e){return'href="'+on(e)+'"'}function tr(e){return'link[rel="stylesheet"]['+e+"]"}function Pg(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function VE(e,n,a,s){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?s.loading=1:(n=e.createElement("link"),s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2}),an(n,"link",a),zt(n),e.head.appendChild(n))}function Fi(e){return'[src="'+on(e)+'"]'}function nr(e){return"script[async]"+e}function Wg(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var s=e.querySelector('style[data-href~="'+on(a.href)+'"]');if(s)return n.instance=s,zt(s),s;var c=x({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),zt(s),an(s,"style",c),qo(s,a.precedence,e),n.instance=s;case"stylesheet":c=Ki(a.href);var d=e.querySelector(tr(c));if(d)return n.state.loading|=4,n.instance=d,zt(d),d;s=Pg(a),(c=Gn.get(c))&&If(s,c),d=(e.ownerDocument||e).createElement("link"),zt(d);var b=d;return b._p=new Promise(function(N,$){b.onload=N,b.onerror=$}),an(d,"link",s),n.state.loading|=4,qo(d,a.precedence,e),n.instance=d;case"script":return d=Fi(a.src),(c=e.querySelector(nr(d)))?(n.instance=c,zt(c),c):(s=a,(c=Gn.get(d))&&(s=x({},a),Qf(s,c)),e=e.ownerDocument||e,c=e.createElement("script"),zt(c),an(c,"link",s),e.head.appendChild(c),n.instance=c);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,qo(s,a.precedence,e));return n.instance}function qo(e,n,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=s.length?s[s.length-1]:null,d=c,b=0;b<s.length;b++){var N=s[b];if(N.dataset.precedence===n)d=N;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function If(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 Go=null;function ep(e,n,a){if(Go===null){var s=new Map,c=Go=new Map;c.set(a,s)}else c=Go,s=c.get(a),s||(s=new Map,c.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[Ea]||d[Mt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var b=d.getAttribute(n)||"";b=e+b;var N=s.get(b);N?N.push(d):s.set(b,[d])}}return s}function tp(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function YE(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!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 np(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function qE(e,n,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=Ki(s.href),d=n.querySelector(tr(c));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Xo.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=d,zt(d);return}d=n.ownerDocument||n,s=Pg(s),(c=Gn.get(c))&&If(s,c),d=d.createElement("link"),zt(d);var b=d;b._p=new Promise(function(N,$){b.onload=N,b.onerror=$}),an(d,"link",s),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Xo.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var Kf=0;function GE(e,n){return e.stylesheets&&e.count===0&&Io(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var s=setTimeout(function(){if(e.stylesheets&&Io(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&Kf===0&&(Kf=62500*_E());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Io(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Kf?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(c)}}:null}function Xo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Io(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zo=null;function Io(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zo=new Map,n.forEach(XE,e),Zo=null,Xo.call(e))}function XE(e,n){if(!(n.state.loading&4)){var a=Zo.get(e);if(a)var s=a.get(null);else{a=new Map,Zo.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var b=c[d];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),s=b)}s&&a.set(null,s)}c=n.instance,b=c.getAttribute("data-precedence"),d=a.get(b)||s,d===s&&a.set(null,c),a.set(b,c),this.count++,s=Xo.bind(this),c.addEventListener("load",s),c.addEventListener("error",s),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),n.state.loading|=4}}var ar={$$typeof:E,Provider:null,Consumer:null,_currentValue:j,_currentValue2:j,_threadCount:0};function ZE(e,n,a,s,c,d,b,N,$){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=pt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pt(0),this.hiddenUpdates=pt(null),this.identifierPrefix=s,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function ap(e,n,a,s,c,d,b,N,$,W,le,ue){return e=new ZE(e,n,a,b,$,W,le,ue,N),n=1,d===!0&&(n|=24),d=wn(3,null,null,n),e.current=d,d.stateNode=e,n=Cu(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:s,isDehydrated:a,cache:n},Ou(d),e}function lp(e){return e?(e=Ci,e):Ci}function ip(e,n,a,s,c,d){c=lp(c),s.context===null?s.context=c:s.pendingContext=c,s=pl(n),s.payload={element:a},d=d===void 0?null:d,d!==null&&(s.callback=d),a=yl(e,s,n),a!==null&&(bn(a,e,n),ks(a,e,n))}function sp(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Ff(e,n){sp(e,n),(e=e.alternate)&&sp(e,n)}function rp(e){if(e.tag===13||e.tag===31){var n=Ql(e,67108864);n!==null&&bn(n,e,67108864),Ff(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var n=Mn();n=bt(n);var a=Ql(e,n);a!==null&&bn(a,e,n),Ff(e,n)}}var Qo=!0;function IE(e,n,a,s){var c=M.T;M.T=null;var d=U.p;try{U.p=2,Jf(e,n,a,s)}finally{U.p=d,M.T=c}}function QE(e,n,a,s){var c=M.T;M.T=null;var d=U.p;try{U.p=8,Jf(e,n,a,s)}finally{U.p=d,M.T=c}}function Jf(e,n,a,s){if(Qo){var c=Pf(s);if(c===null)Hf(e,n,s,Ko,a),up(e,s);else if(FE(c,e,n,a,s))s.stopPropagation();else if(up(e,s),n&4&&-1<KE.indexOf(e)){for(;c!==null;){var d=Qn(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var b=sn(d.pendingLanes);if(b!==0){var N=d;for(N.pendingLanes|=2,N.entangledLanes|=2;b;){var $=1<<31-Pt(b);N.entanglements[1]|=$,b&=~$}ua(d),(st&6)===0&&(Oo=Fe()+500,Js(0))}}break;case 31:case 13:N=Ql(d,2),N!==null&&bn(N,d,2),jo(),Ff(d,2)}if(d=Pf(s),d===null&&Hf(e,n,s,Ko,a),d===c)break;c=d}c!==null&&s.stopPropagation()}else Hf(e,n,s,null,a)}}function Pf(e){return e=Ue(e),Wf(e)}var Ko=null;function Wf(e){if(Ko=null,e=Wt(e),e!==null){var n=u(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=f(n),e!==null)return e;e=null}else if(a===31){if(e=m(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Ko=e,null}function cp(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(zn()){case Gt:return 2;case ln:return 8;case At:case fn:return 32;case jn:return 268435456;default:return 32}default:return 32}}var ed=!1,Ml=null,Tl=null,Rl=null,lr=new Map,ir=new Map,Ol=[],KE="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 up(e,n){switch(e){case"focusin":case"focusout":Ml=null;break;case"dragenter":case"dragleave":Tl=null;break;case"mouseover":case"mouseout":Rl=null;break;case"pointerover":case"pointerout":lr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":ir.delete(n.pointerId)}}function sr(e,n,a,s,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:a,eventSystemFlags:s,nativeEvent:d,targetContainers:[c]},n!==null&&(n=Qn(n),n!==null&&rp(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function FE(e,n,a,s,c){switch(n){case"focusin":return Ml=sr(Ml,e,n,a,s,c),!0;case"dragenter":return Tl=sr(Tl,e,n,a,s,c),!0;case"mouseover":return Rl=sr(Rl,e,n,a,s,c),!0;case"pointerover":var d=c.pointerId;return lr.set(d,sr(lr.get(d)||null,e,n,a,s,c)),!0;case"gotpointercapture":return d=c.pointerId,ir.set(d,sr(ir.get(d)||null,e,n,a,s,c)),!0}return!1}function fp(e){var n=Wt(e.target);if(n!==null){var a=u(n);if(a!==null){if(n=a.tag,n===13){if(n=f(a),n!==null){e.blockedOn=n,ll(e.priority,function(){op(a)});return}}else if(n===31){if(n=m(a),n!==null){e.blockedOn=n,ll(e.priority,function(){op(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Fo(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Pf(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a);Ne=s,a.target.dispatchEvent(s),Ne=null}else return n=Qn(a),n!==null&&rp(n),e.blockedOn=a,!1;n.shift()}return!0}function dp(e,n,a){Fo(e)&&a.delete(n)}function JE(){ed=!1,Ml!==null&&Fo(Ml)&&(Ml=null),Tl!==null&&Fo(Tl)&&(Tl=null),Rl!==null&&Fo(Rl)&&(Rl=null),lr.forEach(dp),ir.forEach(dp)}function Jo(e,n){e.blockedOn===n&&(e.blockedOn=null,ed||(ed=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,JE)))}var Po=null;function hp(e){Po!==e&&(Po=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Po===e&&(Po=null);for(var n=0;n<e.length;n+=3){var a=e[n],s=e[n+1],c=e[n+2];if(typeof s!="function"){if(Wf(s||a)===null)continue;break}var d=Qn(a);d!==null&&(e.splice(n,3),n-=3,Ju(d,{pending:!0,data:c,method:a.method,action:s},s,c))}}))}function Ji(e){function n($){return Jo($,e)}Ml!==null&&Jo(Ml,e),Tl!==null&&Jo(Tl,e),Rl!==null&&Jo(Rl,e),lr.forEach(n),ir.forEach(n);for(var a=0;a<Ol.length;a++){var s=Ol[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Ol.length&&(a=Ol[0],a.blockedOn===null);)fp(a),a.blockedOn===null&&Ol.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var c=a[s],d=a[s+1],b=c[Kt]||null;if(typeof d=="function")b||hp(a);else if(b){var N=null;if(d&&d.hasAttribute("formAction")){if(c=d,b=d[Kt]||null)N=b.formAction;else if(Wf(c)!==null)continue}else N=b.action;typeof N=="function"?a[s+1]=N:(a.splice(s,3),s-=3),hp(a)}}}function mp(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(b){return c=b})},focusReset:"manual",scroll:"manual"})}function n(){c!==null&&(c(),c=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),c!==null&&(c(),c=null)}}}function td(e){this._internalRoot=e}Wo.prototype.render=td.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,s=Mn();ip(a,s,e,n,null,null)},Wo.prototype.unmount=td.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;ip(e.current,2,null,e,null,null),jo(),n[In]=null}};function Wo(e){this._internalRoot=e}Wo.prototype.unstable_scheduleHydration=function(e){if(e){var n=al();e={blockedOn:null,target:e,priority:n};for(var a=0;a<Ol.length&&n!==0&&n<Ol[a].priority;a++);Ol.splice(a,0,e),a===0&&fp(e)}};var gp=l.version;if(gp!=="19.2.3")throw Error(r(527,gp,"19.2.3"));U.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=h(n),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var PE={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ec=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ec.isDisabled&&ec.supportsFiber)try{xa=ec.inject(PE),Qt=ec}catch{}}return or.createRoot=function(e,n){if(!o(e))throw Error(r(299));var a=!1,s="",c=S0,d=w0,b=_0;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=ap(e,1,!1,null,null,a,s,null,c,d,b,mp),e[In]=n.current,Lf(e),new td(n)},or.hydrateRoot=function(e,n,a){if(!o(e))throw Error(r(299));var s=!1,c="",d=S0,b=w0,N=_0,$=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(N=a.onRecoverableError),a.formState!==void 0&&($=a.formState)),n=ap(e,1,!0,n,a??null,s,c,$,d,b,N,mp),n.context=lp(null),a=n.current,s=Mn(),s=bt(s),c=pl(s),c.callback=null,yl(a,c,s),a=s,n.current.lanes=a,rt(n,a),ua(n),e[In]=n.current,Lf(e),new Wo(n)},or.version="19.2.3",or}var Np;function rS(){if(Np)return ld.exports;Np=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),ld.exports=sS(),ld.exports}var oS=rS();var Ap="popstate";function cS(t={}){function l(r,o){let{pathname:u,search:f,hash:m}=r.location;return jd("",{pathname:u,search:f,hash:m},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function i(r,o){return typeof o=="string"?o:vr(o)}return fS(l,i,null,t)}function Ot(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function Xn(t,l){if(!t){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function uS(){return Math.random().toString(36).substring(2,10)}function Cp(t,l){return{usr:t.state,key:t.key,idx:l}}function jd(t,l,i=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof l=="string"?ds(l):l,state:i,key:l&&l.key||r||uS()}}function vr({pathname:t="/",search:l="",hash:i=""}){return l&&l!=="?"&&(t+=l.charAt(0)==="?"?l:"?"+l),i&&i!=="#"&&(t+=i.charAt(0)==="#"?i:"#"+i),t}function ds(t){let l={};if(t){let i=t.indexOf("#");i>=0&&(l.hash=t.substring(i),t=t.substring(0,i));let r=t.indexOf("?");r>=0&&(l.search=t.substring(r),t=t.substring(0,r)),t&&(l.pathname=t)}return l}function fS(t,l,i,r={}){let{window:o=document.defaultView,v5Compat:u=!1}=r,f=o.history,m="POP",g=null,h=y();h==null&&(h=0,f.replaceState({...f.state,idx:h},""));function y(){return(f.state||{idx:null}).idx}function x(){m="POP";let A=y(),C=A==null?null:A-h;h=A,g&&g({action:m,location:_.location,delta:C})}function v(A,C){m="PUSH";let T=jd(_.location,A,C);h=y()+1;let E=Cp(T,h),R=_.createHref(T);try{f.pushState(E,"",R)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;o.location.assign(R)}u&&g&&g({action:m,location:_.location,delta:1})}function w(A,C){m="REPLACE";let T=jd(_.location,A,C);h=y();let E=Cp(T,h),R=_.createHref(T);f.replaceState(E,"",R),u&&g&&g({action:m,location:_.location,delta:0})}function S(A){return dS(A)}let _={get action(){return m},get location(){return t(o,f)},listen(A){if(g)throw new Error("A history only accepts one active listener");return o.addEventListener(Ap,x),g=A,()=>{o.removeEventListener(Ap,x),g=null}},createHref(A){return l(o,A)},createURL:S,encodeLocation(A){let C=S(A);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:v,replace:w,go(A){return f.go(A)}};return _}function dS(t,l=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),Ot(i,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:vr(t);return r=r.replace(/ $/,"%20"),!l&&r.startsWith("//")&&(r=i+r),new URL(r,i)}function ix(t,l,i="/"){return hS(t,l,i,!1)}function hS(t,l,i,r){let o=typeof l=="string"?ds(l):l,u=Ja(o.pathname||"/",i);if(u==null)return null;let f=sx(t);mS(f);let m=null;for(let g=0;m==null&&g<f.length;++g){let h=NS(u);m=wS(f[g],h,r)}return m}function sx(t,l=[],i=[],r="",o=!1){let u=(f,m,g=o,h)=>{let y={relativePath:h===void 0?f.path||"":h,caseSensitive:f.caseSensitive===!0,childrenIndex:m,route:f};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(r)&&g)return;Ot(y.relativePath.startsWith(r),`Absolute route path "${y.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(r.length)}let x=Fa([r,y.relativePath]),v=i.concat(y);f.children&&f.children.length>0&&(Ot(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),sx(f.children,l,v,x,g)),!(f.path==null&&!f.index)&&l.push({path:x,score:ES(x,f.index),routesMeta:v})};return t.forEach((f,m)=>{if(f.path===""||!f.path?.includes("?"))u(f,m);else for(let g of rx(f.path))u(f,m,!0,g)}),l}function rx(t){let l=t.split("/");if(l.length===0)return[];let[i,...r]=l,o=i.endsWith("?"),u=i.replace(/\?$/,"");if(r.length===0)return o?[u,""]:[u];let f=rx(r.join("/")),m=[];return m.push(...f.map(g=>g===""?u:[u,g].join("/"))),o&&m.push(...f),m.map(g=>t.startsWith("/")&&g===""?"/":g)}function mS(t){t.sort((l,i)=>l.score!==i.score?i.score-l.score:SS(l.routesMeta.map(r=>r.childrenIndex),i.routesMeta.map(r=>r.childrenIndex)))}var gS=/^:[\w-]+$/,pS=3,yS=2,xS=1,vS=10,bS=-2,Mp=t=>t==="*";function ES(t,l){let i=t.split("/"),r=i.length;return i.some(Mp)&&(r+=bS),l&&(r+=yS),i.filter(o=>!Mp(o)).reduce((o,u)=>o+(gS.test(u)?pS:u===""?xS:vS),r)}function SS(t,l){return t.length===l.length&&t.slice(0,-1).every((r,o)=>r===l[o])?t[t.length-1]-l[l.length-1]:0}function wS(t,l,i=!1){let{routesMeta:r}=t,o={},u="/",f=[];for(let m=0;m<r.length;++m){let g=r[m],h=m===r.length-1,y=u==="/"?l:l.slice(u.length)||"/",x=_c({path:g.relativePath,caseSensitive:g.caseSensitive,end:h},y),v=g.route;if(!x&&h&&i&&!r[r.length-1].route.index&&(x=_c({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},y)),!x)return null;Object.assign(o,x.params),f.push({params:o,pathname:Fa([u,x.pathname]),pathnameBase:RS(Fa([u,x.pathnameBase])),route:v}),x.pathnameBase!=="/"&&(u=Fa([u,x.pathnameBase]))}return f}function _c(t,l){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[i,r]=_S(t.path,t.caseSensitive,t.end),o=l.match(i);if(!o)return null;let u=o[0],f=u.replace(/(.)\/+$/,"$1"),m=o.slice(1);return{params:r.reduce((h,{paramName:y,isOptional:x},v)=>{if(y==="*"){let S=m[v]||"";f=u.slice(0,u.length-S.length).replace(/(.)\/+$/,"$1")}const w=m[v];return x&&!w?h[y]=void 0:h[y]=(w||"").replace(/%2F/g,"/"),h},{}),pathname:u,pathnameBase:f,pattern:t}}function _S(t,l=!1,i=!0){Xn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,m,g)=>(r.push({paramName:m,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,l?void 0:"i"),r]}function NS(t){try{return t.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Xn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),t}}function Ja(t,l){if(l==="/")return t;if(!t.toLowerCase().startsWith(l.toLowerCase()))return null;let i=l.endsWith("/")?l.length-1:l.length,r=t.charAt(i);return r&&r!=="/"?null:t.slice(i)||"/"}var AS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,CS=t=>AS.test(t);function MS(t,l="/"){let{pathname:i,search:r="",hash:o=""}=typeof t=="string"?ds(t):t,u;if(i)if(CS(i))u=i;else{if(i.includes("//")){let f=i;i=i.replace(/\/\/+/g,"/"),Xn(!1,`Pathnames cannot have embedded double slashes - normalizing ${f} -> ${i}`)}i.startsWith("/")?u=Tp(i.substring(1),"/"):u=Tp(i,l)}else u=l;return{pathname:u,search:OS(r),hash:zS(o)}}function Tp(t,l){let i=l.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?i.length>1&&i.pop():o!=="."&&i.push(o)}),i.length>1?i.join("/"):"/"}function od(t,l,i,r){return`Cannot include a '${t}' character in a manually specified \`to.${l}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function TS(t){return t.filter((l,i)=>i===0||l.route.path&&l.route.path.length>0)}function ox(t){let l=TS(t);return l.map((i,r)=>r===l.length-1?i.pathname:i.pathnameBase)}function cx(t,l,i,r=!1){let o;typeof t=="string"?o=ds(t):(o={...t},Ot(!o.pathname||!o.pathname.includes("?"),od("?","pathname","search",o)),Ot(!o.pathname||!o.pathname.includes("#"),od("#","pathname","hash",o)),Ot(!o.search||!o.search.includes("#"),od("#","search","hash",o)));let u=t===""||o.pathname==="",f=u?"/":o.pathname,m;if(f==null)m=i;else{let x=l.length-1;if(!r&&f.startsWith("..")){let v=f.split("/");for(;v[0]==="..";)v.shift(),x-=1;o.pathname=v.join("/")}m=x>=0?l[x]:"/"}let g=MS(o,m),h=f&&f!=="/"&&f.endsWith("/"),y=(u||f===".")&&i.endsWith("/");return!g.pathname.endsWith("/")&&(h||y)&&(g.pathname+="/"),g}var Fa=t=>t.join("/").replace(/\/\/+/g,"/"),RS=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),OS=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,zS=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function jS(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function DS(t){return t.map(l=>l.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var ux=["POST","PUT","PATCH","DELETE"];new Set(ux);var kS=["GET",...ux];new Set(kS);var hs=z.createContext(null);hs.displayName="DataRouter";var Uc=z.createContext(null);Uc.displayName="DataRouterState";z.createContext(!1);var fx=z.createContext({isTransitioning:!1});fx.displayName="ViewTransition";var LS=z.createContext(new Map);LS.displayName="Fetchers";var HS=z.createContext(null);HS.displayName="Await";var la=z.createContext(null);la.displayName="Navigation";var zr=z.createContext(null);zr.displayName="Location";var ga=z.createContext({outlet:null,matches:[],isDataRoute:!1});ga.displayName="Route";var uh=z.createContext(null);uh.displayName="RouteError";function BS(t,{relative:l}={}){Ot(jr(),"useHref() may be used only in the context of a <Router> component.");let{basename:i,navigator:r}=z.useContext(la),{hash:o,pathname:u,search:f}=Dr(t,{relative:l}),m=u;return i!=="/"&&(m=u==="/"?i:Fa([i,u])),r.createHref({pathname:m,search:f,hash:o})}function jr(){return z.useContext(zr)!=null}function el(){return Ot(jr(),"useLocation() may be used only in the context of a <Router> component."),z.useContext(zr).location}var dx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function hx(t){z.useContext(la).static||z.useLayoutEffect(t)}function fh(){let{isDataRoute:t}=z.useContext(ga);return t?JS():US()}function US(){Ot(jr(),"useNavigate() may be used only in the context of a <Router> component.");let t=z.useContext(hs),{basename:l,navigator:i}=z.useContext(la),{matches:r}=z.useContext(ga),{pathname:o}=el(),u=JSON.stringify(ox(r)),f=z.useRef(!1);return hx(()=>{f.current=!0}),z.useCallback((g,h={})=>{if(Xn(f.current,dx),!f.current)return;if(typeof g=="number"){i.go(g);return}let y=cx(g,JSON.parse(u),o,h.relative==="path");t==null&&l!=="/"&&(y.pathname=y.pathname==="/"?l:Fa([l,y.pathname])),(h.replace?i.replace:i.push)(y,h.state,h)},[l,i,u,o,t])}z.createContext(null);function mx(){let{matches:t}=z.useContext(ga),l=t[t.length-1];return l?l.params:{}}function Dr(t,{relative:l}={}){let{matches:i}=z.useContext(ga),{pathname:r}=el(),o=JSON.stringify(ox(i));return z.useMemo(()=>cx(t,JSON.parse(o),r,l==="path"),[t,o,r,l])}function $S(t,l){return gx(t,l)}function gx(t,l,i,r,o){Ot(jr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=z.useContext(la),{matches:f}=z.useContext(ga),m=f[f.length-1],g=m?m.params:{},h=m?m.pathname:"/",y=m?m.pathnameBase:"/",x=m&&m.route;{let T=x&&x.path||"";px(h,!x||T.endsWith("*")||T.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${T}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
10
|
+
|
|
11
|
+
Please change the parent <Route path="${T}"> to <Route path="${T==="/"?"*":`${T}/*`}">.`)}let v=el(),w;if(l){let T=typeof l=="string"?ds(l):l;Ot(y==="/"||T.pathname?.startsWith(y),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${y}" but pathname "${T.pathname}" was given in the \`location\` prop.`),w=T}else w=v;let S=w.pathname||"/",_=S;if(y!=="/"){let T=y.replace(/^\//,"").split("/");_="/"+S.replace(/^\//,"").split("/").slice(T.length).join("/")}let A=ix(t,{pathname:_});Xn(x||A!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),Xn(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=XS(A&&A.map(T=>Object.assign({},T,{params:Object.assign({},g,T.params),pathname:Fa([y,u.encodeLocation?u.encodeLocation(T.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathname]),pathnameBase:T.pathnameBase==="/"?y:Fa([y,u.encodeLocation?u.encodeLocation(T.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:T.pathnameBase])})),f,i,r,o);return l&&C?z.createElement(zr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},C):C}function VS(){let t=FS(),l=jS(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),i=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},u={padding:"2px 4px",backgroundColor:r},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=z.createElement(z.Fragment,null,z.createElement("p",null,"💿 Hey developer 👋"),z.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",z.createElement("code",{style:u},"ErrorBoundary")," or"," ",z.createElement("code",{style:u},"errorElement")," prop on your route.")),z.createElement(z.Fragment,null,z.createElement("h2",null,"Unexpected Application Error!"),z.createElement("h3",{style:{fontStyle:"italic"}},l),i?z.createElement("pre",{style:o},i):null,f)}var YS=z.createElement(VS,null),qS=class extends z.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,l){return l.location!==t.location||l.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:l.error,location:l.location,revalidation:t.revalidation||l.revalidation}}componentDidCatch(t,l){this.props.onError?this.props.onError(t,l):console.error("React Router caught the following error during render",t)}render(){return this.state.error!==void 0?z.createElement(ga.Provider,{value:this.props.routeContext},z.createElement(uh.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function GS({routeContext:t,match:l,children:i}){let r=z.useContext(hs);return r&&r.static&&r.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=l.route.id),z.createElement(ga.Provider,{value:t},i)}function XS(t,l=[],i=null,r=null,o=null){if(t==null){if(!i)return null;if(i.errors)t=i.matches;else if(l.length===0&&!i.initialized&&i.matches.length>0)t=i.matches;else return null}let u=t,f=i?.errors;if(f!=null){let y=u.findIndex(x=>x.route.id&&f?.[x.route.id]!==void 0);Ot(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),u=u.slice(0,Math.min(u.length,y+1))}let m=!1,g=-1;if(i)for(let y=0;y<u.length;y++){let x=u[y];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(g=y),x.route.id){let{loaderData:v,errors:w}=i,S=x.route.loader&&!v.hasOwnProperty(x.route.id)&&(!w||w[x.route.id]===void 0);if(x.route.lazy||S){m=!0,g>=0?u=u.slice(0,g+1):u=[u[0]];break}}}let h=i&&r?(y,x)=>{r(y,{location:i.location,params:i.matches?.[0]?.params??{},unstable_pattern:DS(i.matches),errorInfo:x})}:void 0;return u.reduceRight((y,x,v)=>{let w,S=!1,_=null,A=null;i&&(w=f&&x.route.id?f[x.route.id]:void 0,_=x.route.errorElement||YS,m&&(g<0&&v===0?(px("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),S=!0,A=null):g===v&&(S=!0,A=x.route.hydrateFallbackElement||null)));let C=l.concat(u.slice(0,v+1)),T=()=>{let E;return w?E=_:S?E=A:x.route.Component?E=z.createElement(x.route.Component,null):x.route.element?E=x.route.element:E=y,z.createElement(GS,{match:x,routeContext:{outlet:y,matches:C,isDataRoute:i!=null},children:E})};return i&&(x.route.ErrorBoundary||x.route.errorElement||v===0)?z.createElement(qS,{location:i.location,revalidation:i.revalidation,component:_,error:w,children:T(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:h}):T()},null)}function dh(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ZS(t){let l=z.useContext(hs);return Ot(l,dh(t)),l}function IS(t){let l=z.useContext(Uc);return Ot(l,dh(t)),l}function QS(t){let l=z.useContext(ga);return Ot(l,dh(t)),l}function hh(t){let l=QS(t),i=l.matches[l.matches.length-1];return Ot(i.route.id,`${t} can only be used on routes that contain a unique "id"`),i.route.id}function KS(){return hh("useRouteId")}function FS(){let t=z.useContext(uh),l=IS("useRouteError"),i=hh("useRouteError");return t!==void 0?t:l.errors?.[i]}function JS(){let{router:t}=ZS("useNavigate"),l=hh("useNavigate"),i=z.useRef(!1);return hx(()=>{i.current=!0}),z.useCallback(async(o,u={})=>{Xn(i.current,dx),i.current&&(typeof o=="number"?await t.navigate(o):await t.navigate(o,{fromRouteId:l,...u}))},[t,l])}var Rp={};function px(t,l,i){!l&&!Rp[t]&&(Rp[t]=!0,Xn(!1,i))}z.memo(PS);function PS({routes:t,future:l,state:i,unstable_onError:r}){return gx(t,void 0,i,r,l)}function hr(t){Ot(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function WS({basename:t="/",children:l=null,location:i,navigationType:r="POP",navigator:o,static:u=!1,unstable_useTransitions:f}){Ot(!jr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=t.replace(/^\/*/,"/"),g=z.useMemo(()=>({basename:m,navigator:o,static:u,unstable_useTransitions:f,future:{}}),[m,o,u,f]);typeof i=="string"&&(i=ds(i));let{pathname:h="/",search:y="",hash:x="",state:v=null,key:w="default"}=i,S=z.useMemo(()=>{let _=Ja(h,m);return _==null?null:{location:{pathname:_,search:y,hash:x,state:v,key:w},navigationType:r}},[m,h,y,x,v,w,r]);return Xn(S!=null,`<Router basename="${m}"> is not able to match the URL "${h}${y}${x}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:z.createElement(la.Provider,{value:g},z.createElement(zr.Provider,{children:l,value:S}))}function ew({children:t,location:l}){return $S(Dd(t),l)}function Dd(t,l=[]){let i=[];return z.Children.forEach(t,(r,o)=>{if(!z.isValidElement(r))return;let u=[...l,o];if(r.type===z.Fragment){i.push.apply(i,Dd(r.props.children,u));return}Ot(r.type===hr,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ot(!r.props.index||!r.props.children,"An index route cannot have child routes.");let f={id:r.props.id||u.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,middleware:r.props.middleware,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(f.children=Dd(r.props.children,u)),i.push(f)}),i}var yc="get",xc="application/x-www-form-urlencoded";function $c(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function tw(t){return $c(t)&&t.tagName.toLowerCase()==="button"}function nw(t){return $c(t)&&t.tagName.toLowerCase()==="form"}function aw(t){return $c(t)&&t.tagName.toLowerCase()==="input"}function lw(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function iw(t,l){return t.button===0&&(!l||l==="_self")&&!lw(t)}function kd(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((l,i)=>{let r=t[i];return l.concat(Array.isArray(r)?r.map(o=>[i,o]):[[i,r]])},[]))}function sw(t,l){let i=kd(t);return l&&l.forEach((r,o)=>{i.has(o)||l.getAll(o).forEach(u=>{i.append(o,u)})}),i}var tc=null;function rw(){if(tc===null)try{new FormData(document.createElement("form"),0),tc=!1}catch{tc=!0}return tc}var ow=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function cd(t){return t!=null&&!ow.has(t)?(Xn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${xc}"`),null):t}function cw(t,l){let i,r,o,u,f;if(nw(t)){let m=t.getAttribute("action");r=m?Ja(m,l):null,i=t.getAttribute("method")||yc,o=cd(t.getAttribute("enctype"))||xc,u=new FormData(t)}else if(tw(t)||aw(t)&&(t.type==="submit"||t.type==="image")){let m=t.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=t.getAttribute("formaction")||m.getAttribute("action");if(r=g?Ja(g,l):null,i=t.getAttribute("formmethod")||m.getAttribute("method")||yc,o=cd(t.getAttribute("formenctype"))||cd(m.getAttribute("enctype"))||xc,u=new FormData(m,t),!rw()){let{name:h,type:y,value:x}=t;if(y==="image"){let v=h?`${h}.`:"";u.append(`${v}x`,"0"),u.append(`${v}y`,"0")}else h&&u.append(h,x)}}else{if($c(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');i=yc,r=null,o=xc,f=t}return u&&o==="text/plain"&&(f=u,u=void 0),{action:r,method:i.toLowerCase(),encType:o,formData:u,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function mh(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function uw(t,l,i){let r=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return r.pathname==="/"?r.pathname=`_root.${i}`:l&&Ja(r.pathname,l)==="/"?r.pathname=`${l.replace(/\/$/,"")}/_root.${i}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${i}`,r}async function fw(t,l){if(t.id in l)return l[t.id];try{let i=await import(t.module);return l[t.id]=i,i}catch(i){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function dw(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function hw(t,l,i){let r=await Promise.all(t.map(async o=>{let u=l.routes[o.route.id];if(u){let f=await fw(u,i);return f.links?f.links():[]}return[]}));return yw(r.flat(1).filter(dw).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Op(t,l,i,r,o,u){let f=(g,h)=>i[h]?g.route.id!==i[h].route.id:!0,m=(g,h)=>i[h].pathname!==g.pathname||i[h].route.path?.endsWith("*")&&i[h].params["*"]!==g.params["*"];return u==="assets"?l.filter((g,h)=>f(g,h)||m(g,h)):u==="data"?l.filter((g,h)=>{let y=r.routes[g.route.id];if(!y||!y.hasLoader)return!1;if(f(g,h)||m(g,h))return!0;if(g.route.shouldRevalidate){let x=g.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:i[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function mw(t,l,{includeHydrateFallback:i}={}){return gw(t.map(r=>{let o=l.routes[r.route.id];if(!o)return[];let u=[o.module];return o.clientActionModule&&(u=u.concat(o.clientActionModule)),o.clientLoaderModule&&(u=u.concat(o.clientLoaderModule)),i&&o.hydrateFallbackModule&&(u=u.concat(o.hydrateFallbackModule)),o.imports&&(u=u.concat(o.imports)),u}).flat(1))}function gw(t){return[...new Set(t)]}function pw(t){let l={},i=Object.keys(t).sort();for(let r of i)l[r]=t[r];return l}function yw(t,l){let i=new Set;return new Set(l),t.reduce((r,o)=>{let u=JSON.stringify(pw(o));return i.has(u)||(i.add(u),r.push({key:u,link:o})),r},[])}function yx(){let t=z.useContext(hs);return mh(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function xw(){let t=z.useContext(Uc);return mh(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var gh=z.createContext(void 0);gh.displayName="FrameworkContext";function xx(){let t=z.useContext(gh);return mh(t,"You must render this element inside a <HydratedRouter> element"),t}function vw(t,l){let i=z.useContext(gh),[r,o]=z.useState(!1),[u,f]=z.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:h,onMouseLeave:y,onTouchStart:x}=l,v=z.useRef(null);z.useEffect(()=>{if(t==="render"&&f(!0),t==="viewport"){let _=C=>{C.forEach(T=>{f(T.isIntersecting)})},A=new IntersectionObserver(_,{threshold:.5});return v.current&&A.observe(v.current),()=>{A.disconnect()}}},[t]),z.useEffect(()=>{if(r){let _=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(_)}}},[r]);let w=()=>{o(!0)},S=()=>{o(!1),f(!1)};return i?t!=="intent"?[u,v,{}]:[u,v,{onFocus:cr(m,w),onBlur:cr(g,S),onMouseEnter:cr(h,w),onMouseLeave:cr(y,S),onTouchStart:cr(x,w)}]:[!1,v,{}]}function cr(t,l){return i=>{t&&t(i),i.defaultPrevented||l(i)}}function bw({page:t,...l}){let{router:i}=yx(),r=z.useMemo(()=>ix(i.routes,t,i.basename),[i.routes,t,i.basename]);return r?z.createElement(Sw,{page:t,matches:r,...l}):null}function Ew(t){let{manifest:l,routeModules:i}=xx(),[r,o]=z.useState([]);return z.useEffect(()=>{let u=!1;return hw(t,l,i).then(f=>{u||o(f)}),()=>{u=!0}},[t,l,i]),r}function Sw({page:t,matches:l,...i}){let r=el(),{manifest:o,routeModules:u}=xx(),{basename:f}=yx(),{loaderData:m,matches:g}=xw(),h=z.useMemo(()=>Op(t,l,g,o,r,"data"),[t,l,g,o,r]),y=z.useMemo(()=>Op(t,l,g,o,r,"assets"),[t,l,g,o,r]),x=z.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let S=new Set,_=!1;if(l.forEach(C=>{let T=o.routes[C.route.id];!T||!T.hasLoader||(!h.some(E=>E.route.id===C.route.id)&&C.route.id in m&&u[C.route.id]?.shouldRevalidate||T.hasClientLoader?_=!0:S.add(C.route.id))}),S.size===0)return[];let A=uw(t,f,"data");return _&&S.size>0&&A.searchParams.set("_routes",l.filter(C=>S.has(C.route.id)).map(C=>C.route.id).join(",")),[A.pathname+A.search]},[f,m,r,o,h,l,t,u]),v=z.useMemo(()=>mw(y,o),[y,o]),w=Ew(y);return z.createElement(z.Fragment,null,x.map(S=>z.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...i})),v.map(S=>z.createElement("link",{key:S,rel:"modulepreload",href:S,...i})),w.map(({key:S,link:_})=>z.createElement("link",{key:S,nonce:i.nonce,..._})))}function ww(...t){return l=>{t.forEach(i=>{typeof i=="function"?i(l):i!=null&&(i.current=l)})}}var vx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{vx&&(window.__reactRouterVersion="7.10.1")}catch{}function _w({basename:t,children:l,unstable_useTransitions:i,window:r}){let o=z.useRef();o.current==null&&(o.current=cS({window:r,v5Compat:!0}));let u=o.current,[f,m]=z.useState({action:u.action,location:u.location}),g=z.useCallback(h=>{i===!1?m(h):z.startTransition(()=>m(h))},[i]);return z.useLayoutEffect(()=>u.listen(g),[u,g]),z.createElement(WS,{basename:t,children:l,location:f.location,navigationType:f.action,navigator:u,unstable_useTransitions:i===!0})}var bx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Rn=z.forwardRef(function({onClick:l,discover:i="render",prefetch:r="none",relative:o,reloadDocument:u,replace:f,state:m,target:g,to:h,preventScrollReset:y,viewTransition:x,...v},w){let{basename:S,unstable_useTransitions:_}=z.useContext(la),A=typeof h=="string"&&bx.test(h),C,T=!1;if(typeof h=="string"&&A&&(C=h,vx))try{let ie=new URL(window.location.href),Z=h.startsWith("//")?new URL(ie.protocol+h):new URL(h),K=Ja(Z.pathname,S);Z.origin===ie.origin&&K!=null?h=K+Z.search+Z.hash:T=!0}catch{Xn(!1,`<Link to="${h}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let E=BS(h,{relative:o}),[R,L,D]=vw(r,v),B=Mw(h,{replace:f,state:m,target:g,preventScrollReset:y,relative:o,viewTransition:x,unstable_useTransitions:_});function Y(ie){l&&l(ie),ie.defaultPrevented||B(ie)}let X=z.createElement("a",{...v,...D,href:C||E,onClick:T||u?l:Y,ref:ww(w,L),target:g,"data-discover":!A&&i==="render"?"true":void 0});return R&&!A?z.createElement(z.Fragment,null,X,z.createElement(bw,{page:E})):X});Rn.displayName="Link";var Nw=z.forwardRef(function({"aria-current":l="page",caseSensitive:i=!1,className:r="",end:o=!1,style:u,to:f,viewTransition:m,children:g,...h},y){let x=Dr(f,{relative:h.relative}),v=el(),w=z.useContext(Uc),{navigator:S,basename:_}=z.useContext(la),A=w!=null&&jw(x)&&m===!0,C=S.encodeLocation?S.encodeLocation(x).pathname:x.pathname,T=v.pathname,E=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;i||(T=T.toLowerCase(),E=E?E.toLowerCase():null,C=C.toLowerCase()),E&&_&&(E=Ja(E,_)||E);const R=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let L=T===C||!o&&T.startsWith(C)&&T.charAt(R)==="/",D=E!=null&&(E===C||!o&&E.startsWith(C)&&E.charAt(C.length)==="/"),B={isActive:L,isPending:D,isTransitioning:A},Y=L?l:void 0,X;typeof r=="function"?X=r(B):X=[r,L?"active":null,D?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let ie=typeof u=="function"?u(B):u;return z.createElement(Rn,{...h,"aria-current":Y,className:X,ref:y,style:ie,to:f,viewTransition:m},typeof g=="function"?g(B):g)});Nw.displayName="NavLink";var Aw=z.forwardRef(({discover:t="render",fetcherKey:l,navigate:i,reloadDocument:r,replace:o,state:u,method:f=yc,action:m,onSubmit:g,relative:h,preventScrollReset:y,viewTransition:x,...v},w)=>{let{unstable_useTransitions:S}=z.useContext(la),_=Ow(),A=zw(m,{relative:h}),C=f.toLowerCase()==="get"?"get":"post",T=typeof m=="string"&&bx.test(m),E=R=>{if(g&&g(R),R.defaultPrevented)return;R.preventDefault();let L=R.nativeEvent.submitter,D=L?.getAttribute("formmethod")||f,B=()=>_(L||R.currentTarget,{fetcherKey:l,method:D,navigate:i,replace:o,state:u,relative:h,preventScrollReset:y,viewTransition:x});S&&i!==!1?z.startTransition(()=>B()):B()};return z.createElement("form",{ref:w,method:C,action:A,onSubmit:r?g:E,...v,"data-discover":!T&&t==="render"?"true":void 0})});Aw.displayName="Form";function Cw(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ex(t){let l=z.useContext(hs);return Ot(l,Cw(t)),l}function Mw(t,{target:l,replace:i,state:r,preventScrollReset:o,relative:u,viewTransition:f,unstable_useTransitions:m}={}){let g=fh(),h=el(),y=Dr(t,{relative:u});return z.useCallback(x=>{if(iw(x,l)){x.preventDefault();let v=i!==void 0?i:vr(h)===vr(y),w=()=>g(t,{replace:v,state:r,preventScrollReset:o,relative:u,viewTransition:f});m?z.startTransition(()=>w()):w()}},[h,g,y,i,r,l,t,o,u,f,m])}function Sx(t){Xn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let l=z.useRef(kd(t)),i=z.useRef(!1),r=el(),o=z.useMemo(()=>sw(r.search,i.current?null:l.current),[r.search]),u=fh(),f=z.useCallback((m,g)=>{const h=kd(typeof m=="function"?m(new URLSearchParams(o)):m);i.current=!0,u("?"+h,g)},[u,o]);return[o,f]}var Tw=0,Rw=()=>`__${String(++Tw)}__`;function Ow(){let{router:t}=Ex("useSubmit"),{basename:l}=z.useContext(la),i=KS(),r=t.fetch,o=t.navigate;return z.useCallback(async(u,f={})=>{let{action:m,method:g,encType:h,formData:y,body:x}=cw(u,l);if(f.navigate===!1){let v=f.fetcherKey||Rw();await r(v,i,f.action||m,{preventScrollReset:f.preventScrollReset,formData:y,body:x,formMethod:f.method||g,formEncType:f.encType||h,flushSync:f.flushSync})}else await o(f.action||m,{preventScrollReset:f.preventScrollReset,formData:y,body:x,formMethod:f.method||g,formEncType:f.encType||h,replace:f.replace,state:f.state,fromRouteId:i,flushSync:f.flushSync,viewTransition:f.viewTransition})},[r,o,l,i])}function zw(t,{relative:l}={}){let{basename:i}=z.useContext(la),r=z.useContext(ga);Ot(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),u={...Dr(t||".",{relative:l})},f=el();if(t==null){u.search=f.search;let m=new URLSearchParams(u.search),g=m.getAll("index");if(g.some(y=>y==="")){m.delete("index"),g.filter(x=>x).forEach(x=>m.append("index",x));let y=m.toString();u.search=y?`?${y}`:""}}return(!t||t===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),i!=="/"&&(u.pathname=u.pathname==="/"?i:Fa([i,u.pathname])),vr(u)}function jw(t,{relative:l}={}){let i=z.useContext(fx);Ot(i!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ex("useViewTransitionState"),o=Dr(t,{relative:l});if(!i.isTransitioning)return!1;let u=Ja(i.currentLocation.pathname,r)||i.currentLocation.pathname,f=Ja(i.nextLocation.pathname,r)||i.nextLocation.pathname;return _c(o.pathname,f)!=null||_c(o.pathname,u)!=null}lx();const Dw=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),kw=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(l,i,r)=>r?r.toUpperCase():i.toLowerCase()),zp=t=>{const l=kw(t);return l.charAt(0).toUpperCase()+l.slice(1)},wx=(...t)=>t.filter((l,i,r)=>!!l&&l.trim()!==""&&r.indexOf(l)===i).join(" ").trim(),Lw=t=>{for(const l in t)if(l.startsWith("aria-")||l==="role"||l==="title")return!0};var Hw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Bw=z.forwardRef(({color:t="currentColor",size:l=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:o="",children:u,iconNode:f,...m},g)=>z.createElement("svg",{ref:g,...Hw,width:l,height:l,stroke:t,strokeWidth:r?Number(i)*24/Number(l):i,className:wx("lucide",o),...!u&&!Lw(m)&&{"aria-hidden":"true"},...m},[...f.map(([h,y])=>z.createElement(h,y)),...Array.isArray(u)?u:[u]]));const at=(t,l)=>{const i=z.forwardRef(({className:r,...o},u)=>z.createElement(Bw,{ref:u,iconNode:l,className:wx(`lucide-${Dw(zp(t))}`,`lucide-${t}`,r),...o}));return i.displayName=zp(t),i};const Uw=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],kr=at("activity",Uw);const $w=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Vw=at("arrow-right",$w);const Yw=[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],qw=at("ban",Yw);const Gw=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],jp=at("box",Gw);const Xw=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Zw=at("calendar",Xw);const Iw=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_x=at("chevron-down",Iw);const Qw=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ph=at("chevron-left",Qw);const Kw=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Fw=at("chevron-right",Kw);const Jw=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Nx=at("chevron-up",Jw);const Pw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Pa=at("circle-alert",Pw);const Ww=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m12 16 4-4-4-4",key:"1i9zcv"}],["path",{d:"M8 12h8",key:"1wcyev"}]],e_=at("circle-arrow-right",Ww);const t_=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],n_=at("circle-check-big",t_);const a_=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ax=at("circle-check",a_);const l_=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Nc=at("clock",l_);const i_=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],s_=at("code",i_);const r_=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Cx=at("external-link",r_);const o_=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],Mx=at("funnel",o_);const c_=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],u_=at("gauge",c_);const f_=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],d_=at("history",f_);const h_=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],m_=at("layout-dashboard",h_);const g_=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],p_=at("lock",g_);const y_=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],x_=at("octagon-x",y_);const v_=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Tx=at("play",v_);const b_=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],E_=at("radio",b_);const S_=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],Dp=at("rotate-ccw",S_);const w_=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],yh=at("search",w_);const __=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Ld=at("send",__);const N_=[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]],A_=at("skip-forward",N_);const C_=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],M_=at("terminal",C_);const T_=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],R_=at("timer",T_);const O_=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],Hd=at("workflow",O_);const z_=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],j_=at("zap",z_);var ud={exports:{}},fd={};var kp;function D_(){if(kp)return fd;kp=1;var t=Or();function l(x,v){return x===v&&(x!==0||1/x===1/v)||x!==x&&v!==v}var i=typeof Object.is=="function"?Object.is:l,r=t.useState,o=t.useEffect,u=t.useLayoutEffect,f=t.useDebugValue;function m(x,v){var w=v(),S=r({inst:{value:w,getSnapshot:v}}),_=S[0].inst,A=S[1];return u(function(){_.value=w,_.getSnapshot=v,g(_)&&A({inst:_})},[x,w,v]),o(function(){return g(_)&&A({inst:_}),x(function(){g(_)&&A({inst:_})})},[x]),f(w),w}function g(x){var v=x.getSnapshot;x=x.value;try{var w=v();return!i(x,w)}catch{return!0}}function h(x,v){return v()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:m;return fd.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,fd}var Lp;function Rx(){return Lp||(Lp=1,ud.exports=D_()),ud.exports}var Hp=Rx();const Ox=0,zx=1,jx=2,Bp=3;var Up=Object.prototype.hasOwnProperty;function Bd(t,l){var i,r;if(t===l)return!0;if(t&&l&&(i=t.constructor)===l.constructor){if(i===Date)return t.getTime()===l.getTime();if(i===RegExp)return t.toString()===l.toString();if(i===Array){if((r=t.length)===l.length)for(;r--&&Bd(t[r],l[r]););return r===-1}if(!i||typeof t=="object"){r=0;for(i in t)if(Up.call(t,i)&&++r&&!Up.call(l,i)||!(i in l)||!Bd(t[i],l[i]))return!1;return Object.keys(l).length===r}}return t!==t&&l!==l}const Za=new WeakMap,Qa=()=>{},un=Qa(),Ud=Object,et=t=>t===un,da=t=>typeof t=="function",Bl=(t,l)=>({...t,...l}),Dx=t=>da(t.then),dd={},nc={},xh="undefined",Lr=typeof window!=xh,$d=typeof document!=xh,k_=Lr&&"Deno"in window,L_=()=>Lr&&typeof window.requestAnimationFrame!=xh,kx=(t,l)=>{const i=Za.get(t);return[()=>!et(l)&&t.get(l)||dd,r=>{if(!et(l)){const o=t.get(l);l in nc||(nc[l]=o),i[5](l,Bl(o,r),o||dd)}},i[6],()=>!et(l)&&l in nc?nc[l]:!et(l)&&t.get(l)||dd]};let Vd=!0;const H_=()=>Vd,[Yd,qd]=Lr&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Qa,Qa],B_=()=>{const t=$d&&document.visibilityState;return et(t)||t!=="hidden"},U_=t=>($d&&document.addEventListener("visibilitychange",t),Yd("focus",t),()=>{$d&&document.removeEventListener("visibilitychange",t),qd("focus",t)}),$_=t=>{const l=()=>{Vd=!0,t()},i=()=>{Vd=!1};return Yd("online",l),Yd("offline",i),()=>{qd("online",l),qd("offline",i)}},V_={isOnline:H_,isVisible:B_},Y_={initFocus:U_,initReconnect:$_},$p=!Bc.useId,ns=!Lr||k_,q_=t=>L_()?window.requestAnimationFrame(t):setTimeout(t,1),hd=ns?z.useEffect:z.useLayoutEffect,md=typeof navigator<"u"&&navigator.connection,Vp=!ns&&md&&(["slow-2g","2g"].includes(md.effectiveType)||md.saveData),ac=new WeakMap,G_=t=>Ud.prototype.toString.call(t),gd=(t,l)=>t===`[object ${l}]`;let X_=0;const Gd=t=>{const l=typeof t,i=G_(t),r=gd(i,"Date"),o=gd(i,"RegExp"),u=gd(i,"Object");let f,m;if(Ud(t)===t&&!r&&!o){if(f=ac.get(t),f)return f;if(f=++X_+"~",ac.set(t,f),Array.isArray(t)){for(f="@",m=0;m<t.length;m++)f+=Gd(t[m])+",";ac.set(t,f)}if(u){f="#";const g=Ud.keys(t).sort();for(;!et(m=g.pop());)et(t[m])||(f+=m+":"+Gd(t[m])+",");ac.set(t,f)}}else f=r?t.toJSON():l=="symbol"?t.toString():l=="string"?JSON.stringify(t):""+t;return f},vh=t=>{if(da(t))try{t=t()}catch{t=""}const l=t;return t=typeof t=="string"?t:(Array.isArray(t)?t.length:t)?Gd(t):"",[t,l]};let Z_=0;const Xd=()=>++Z_;async function Lx(...t){const[l,i,r,o]=t,u=Bl({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let f=u.populateCache;const m=u.rollbackOnError;let g=u.optimisticData;const h=v=>typeof m=="function"?m(v):m!==!1,y=u.throwOnError;if(da(i)){const v=i,w=[],S=l.keys();for(const _ of S)!/^\$(inf|sub)\$/.test(_)&&v(l.get(_)._k)&&w.push(_);return Promise.all(w.map(x))}return x(i);async function x(v){const[w]=vh(v);if(!w)return;const[S,_]=kx(l,w),[A,C,T,E]=Za.get(l),R=()=>{const k=A[w];return(da(u.revalidate)?u.revalidate(S().data,v):u.revalidate!==!1)&&(delete T[w],delete E[w],k&&k[0])?k[0](jx).then(()=>S().data):S().data};if(t.length<3)return R();let L=r,D,B=!1;const Y=Xd();C[w]=[Y,0];const X=!et(g),ie=S(),Z=ie.data,K=ie._c,ae=et(K)?Z:K;if(X&&(g=da(g)?g(ae,Z):g,_({data:g,_c:ae})),da(L))try{L=L(ae)}catch(k){D=k,B=!0}if(L&&Dx(L))if(L=await L.catch(k=>{D=k,B=!0}),Y!==C[w][0]){if(B)throw D;return L}else B&&X&&h(D)&&(f=!0,_({data:ae,_c:un}));if(f&&!B)if(da(f)){const k=f(L,ae);_({data:k,error:un,_c:un})}else _({data:L,error:un,_c:un});if(C[w][1]=Xd(),Promise.resolve(R()).then(()=>{_({_c:un})}),B){if(y)throw D;return}return L}}const Yp=(t,l)=>{for(const i in t)t[i][0]&&t[i][0](l)},I_=(t,l)=>{if(!Za.has(t)){const i=Bl(Y_,l),r=Object.create(null),o=Lx.bind(un,t);let u=Qa;const f=Object.create(null),m=(y,x)=>{const v=f[y]||[];return f[y]=v,v.push(x),()=>v.splice(v.indexOf(x),1)},g=(y,x,v)=>{t.set(y,x);const w=f[y];if(w)for(const S of w)S(x,v)},h=()=>{if(!Za.has(t)&&(Za.set(t,[r,Object.create(null),Object.create(null),Object.create(null),o,g,m]),!ns)){const y=i.initFocus(setTimeout.bind(un,Yp.bind(un,r,Ox))),x=i.initReconnect(setTimeout.bind(un,Yp.bind(un,r,zx)));u=()=>{y&&y(),x&&x(),Za.delete(t)}}};return h(),[t,o,h,u]}return[t,Za.get(t)[4]]},Q_=(t,l,i,r,o)=>{const u=i.errorRetryCount,f=o.retryCount,m=~~((Math.random()+.5)*(1<<(f<8?f:8)))*i.errorRetryInterval;!et(u)&&f>u||setTimeout(r,m,o)},K_=Bd,[Hx,Zd]=I_(new Map),F_=Bl({onLoadingSlow:Qa,onSuccess:Qa,onError:Qa,onErrorRetry:Q_,onDiscarded:Qa,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:Vp?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:Vp?5e3:3e3,compare:K_,isPaused:()=>!1,cache:Hx,mutate:Zd,fallback:{}},V_),J_=(t,l)=>{const i=Bl(t,l);if(l){const{use:r,fallback:o}=t,{use:u,fallback:f}=l;r&&u&&(i.use=r.concat(u)),o&&f&&(i.fallback=Bl(o,f))}return i},P_=z.createContext({}),W_="$inf$",Bx=Lr&&window.__SWR_DEVTOOLS_USE__,eN=Bx?window.__SWR_DEVTOOLS_USE__:[],tN=()=>{Bx&&(window.__SWR_DEVTOOLS_REACT__=Bc)},nN=t=>da(t[1])?[t[0],t[1],t[2]||{}]:[t[0],null,(t[1]===null?t[2]:t[1])||{}],aN=()=>{const t=z.useContext(P_);return z.useMemo(()=>Bl(F_,t),[t])},lN=t=>(l,i,r)=>t(l,i&&((...u)=>{const[f]=vh(l),[,,,m]=Za.get(Hx);if(f.startsWith(W_))return i(...u);const g=m[f];return et(g)?i(...u):(delete m[f],g)}),r),iN=eN.concat(lN),sN=t=>function(...i){const r=aN(),[o,u,f]=nN(i),m=J_(r,f);let g=t;const{use:h}=m,y=(h||[]).concat(iN);for(let x=y.length;x--;)g=y[x](g);return g(o,u||m.fetcher||null,m)},rN=(t,l,i)=>{const r=l[t]||(l[t]=[]);return r.push(i),()=>{const o=r.indexOf(i);o>=0&&(r[o]=r[r.length-1],r.pop())}};tN();const pd=Bc.use||(t=>{switch(t.status){case"pending":throw t;case"fulfilled":return t.value;case"rejected":throw t.reason;default:throw t.status="pending",t.then(l=>{t.status="fulfilled",t.value=l},l=>{t.status="rejected",t.reason=l}),t}}),yd={dedupe:!0},qp=Promise.resolve(un),oN=(t,l,i)=>{const{cache:r,compare:o,suspense:u,fallbackData:f,revalidateOnMount:m,revalidateIfStale:g,refreshInterval:h,refreshWhenHidden:y,refreshWhenOffline:x,keepPreviousData:v,strictServerPrefetchWarning:w}=i,[S,_,A,C]=Za.get(r),[T,E]=vh(t),R=z.useRef(!1),L=z.useRef(!1),D=z.useRef(T),B=z.useRef(l),Y=z.useRef(i),X=()=>Y.current,ie=()=>X().isVisible()&&X().isOnline(),[Z,K,ae,k]=kx(r,T),I=z.useRef({}).current,M=et(f)?et(i.fallback)?un:i.fallback[T]:f,U=(Re,Be)=>{for(const Pe in I){const Ge=Pe;if(Ge==="data"){if(!o(Re[Ge],Be[Ge])&&(!et(Re[Ge])||!o(he,Be[Ge])))return!1}else if(Be[Ge]!==Re[Ge])return!1}return!0},j=z.useMemo(()=>{const Re=!T||!l?!1:et(m)?X().isPaused()||u?!1:g!==!1:m,Be=vt=>{const Fe=Bl(vt);return delete Fe._k,Re?{isValidating:!0,isLoading:!0,...Fe}:Fe},Pe=Z(),Ge=k(),xt=Be(Pe),It=Pe===Ge?xt:Be(Ge);let gt=xt;return[()=>{const vt=Be(Z());return U(vt,gt)?(gt.data=vt.data,gt.isLoading=vt.isLoading,gt.isValidating=vt.isValidating,gt.error=vt.error,gt):(gt=vt,vt)},()=>It]},[r,T]),q=Hp.useSyncExternalStore(z.useCallback(Re=>ae(T,(Be,Pe)=>{U(Pe,Be)||Re()}),[r,T]),j[0],j[1]),te=!R.current,O=S[T]&&S[T].length>0,H=q.data,Q=et(H)?M&&Dx(M)?pd(M):M:H,J=q.error,ce=z.useRef(Q),he=v?et(H)?et(ce.current)?Q:ce.current:H:Q,re=T&&et(Q),fe=!ns&&Hp.useSyncExternalStore(()=>Qa,()=>!1,()=>!0);w&&fe&&!u&&re&&console.warn(`Missing pre-initiated data for serialized key "${T}" during server-side rendering. Data fethcing should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);const me=O&&!et(J)?!1:te&&!et(m)?m:X().isPaused()?!1:u?et(Q)?!1:g:et(Q)||g,Ce=!!(T&&l&&te&&me),xe=et(q.isValidating)?Ce:q.isValidating,ve=et(q.isLoading)?Ce:q.isLoading,_e=z.useCallback(async Re=>{const Be=B.current;if(!T||!Be||L.current||X().isPaused())return!1;let Pe,Ge,xt=!0;const It=Re||{},gt=!A[T]||!It.dedupe,vt=()=>$p?!L.current&&T===D.current&&R.current:T===D.current,Fe={isValidating:!1,isLoading:!1},zn=()=>{K(Fe)},Gt=()=>{const At=A[T];At&&At[1]===Ge&&delete A[T]},ln={isValidating:!0};et(Z().data)&&(ln.isLoading=!0);try{if(gt&&(K(ln),i.loadingTimeout&&et(Z().data)&&setTimeout(()=>{xt&&vt()&&X().onLoadingSlow(T,i)},i.loadingTimeout),A[T]=[Be(E),Xd()]),[Pe,Ge]=A[T],Pe=await Pe,gt&&setTimeout(Gt,i.dedupingInterval),!A[T]||A[T][1]!==Ge)return gt&&vt()&&X().onDiscarded(T),!1;Fe.error=un;const At=_[T];if(!et(At)&&(Ge<=At[0]||Ge<=At[1]||At[1]===0))return zn(),gt&&vt()&&X().onDiscarded(T),!1;const fn=Z().data;Fe.data=o(fn,Pe)?fn:Pe,gt&&vt()&&X().onSuccess(Pe,T,i)}catch(At){Gt();const fn=X(),{shouldRetryOnError:jn}=fn;fn.isPaused()||(Fe.error=At,gt&&vt()&&(fn.onError(At,T,fn),(jn===!0||da(jn)&&jn(At))&&(!X().revalidateOnFocus||!X().revalidateOnReconnect||ie())&&fn.onErrorRetry(At,T,fn,$l=>{const ya=S[T];ya&&ya[0]&&ya[0](Bp,$l)},{retryCount:(It.retryCount||0)+1,dedupe:!0})))}return xt=!1,zn(),!0},[T,r]),He=z.useCallback((...Re)=>Lx(r,D.current,...Re),[]);if(hd(()=>{B.current=l,Y.current=i,et(H)||(ce.current=H)}),hd(()=>{if(!T)return;const Re=_e.bind(un,yd);let Be=0;X().revalidateOnFocus&&(Be=Date.now()+X().focusThrottleInterval);const Ge=rN(T,S,(xt,It={})=>{if(xt==Ox){const gt=Date.now();X().revalidateOnFocus&>>Be&&ie()&&(Be=gt+X().focusThrottleInterval,Re())}else if(xt==zx)X().revalidateOnReconnect&&ie()&&Re();else{if(xt==jx)return _e();if(xt==Bp)return _e(It)}});return L.current=!1,D.current=T,R.current=!0,K({_k:E}),me&&(A[T]||(et(Q)||ns?Re():q_(Re))),()=>{L.current=!0,Ge()}},[T]),hd(()=>{let Re;function Be(){const Ge=da(h)?h(Z().data):h;Ge&&Re!==-1&&(Re=setTimeout(Pe,Ge))}function Pe(){!Z().error&&(y||X().isVisible())&&(x||X().isOnline())?_e(yd).then(Be):Be()}return Be(),()=>{Re&&(clearTimeout(Re),Re=-1)}},[h,y,x,T]),z.useDebugValue(he),u){if(!$p&&ns&&re)throw new Error("Fallback data is required when using Suspense in SSR.");re&&(B.current=l,Y.current=i,L.current=!1);const Re=C[T],Be=!et(Re)&&re?He(Re):qp;if(pd(Be),!et(J)&&re)throw J;const Pe=re?_e(yd):qp;!et(he)&&re&&(Pe.status="fulfilled",Pe.value=!0),pd(Pe)}return{mutate:He,get data(){return I.data=!0,he},get error(){return I.error=!0,J},get isValidating(){return I.isValidating=!0,xe},get isLoading(){return I.isLoading=!0,ve}}},Vc=sN(oN);function Ux(t){var l,i,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(l=0;l<o;l++)t[l]&&(i=Ux(t[l]))&&(r&&(r+=" "),r+=i)}else for(i in t)t[i]&&(r&&(r+=" "),r+=i);return r}function cN(){for(var t,l,i=0,r="",o=arguments.length;i<o;i++)(t=arguments[i])&&(l=Ux(t))&&(r&&(r+=" "),r+=l);return r}const uN=(t,l)=>{const i=new Array(t.length+l.length);for(let r=0;r<t.length;r++)i[r]=t[r];for(let r=0;r<l.length;r++)i[t.length+r]=l[r];return i},fN=(t,l)=>({classGroupId:t,validator:l}),$x=(t=new Map,l=null,i)=>({nextPart:t,validators:l,classGroupId:i}),Ac="-",Gp=[],dN="arbitrary..",hN=t=>{const l=gN(t),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return mN(f);const m=f.split(Ac),g=m[0]===""&&m.length>1?1:0;return Vx(m,g,l)},getConflictingClassGroupIds:(f,m)=>{if(m){const g=r[f],h=i[f];return g?h?uN(h,g):g:h||Gp}return i[f]||Gp}}},Vx=(t,l,i)=>{if(t.length-l===0)return i.classGroupId;const o=t[l],u=i.nextPart.get(o);if(u){const h=Vx(t,l+1,u);if(h)return h}const f=i.validators;if(f===null)return;const m=l===0?t.join(Ac):t.slice(l).join(Ac),g=f.length;for(let h=0;h<g;h++){const y=f[h];if(y.validator(m))return y.classGroupId}},mN=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=t.slice(1,-1),i=l.indexOf(":"),r=l.slice(0,i);return r?dN+r:void 0})(),gN=t=>{const{theme:l,classGroups:i}=t;return pN(i,l)},pN=(t,l)=>{const i=$x();for(const r in t){const o=t[r];bh(o,i,r,l)}return i},bh=(t,l,i,r)=>{const o=t.length;for(let u=0;u<o;u++){const f=t[u];yN(f,l,i,r)}},yN=(t,l,i,r)=>{if(typeof t=="string"){xN(t,l,i);return}if(typeof t=="function"){vN(t,l,i,r);return}bN(t,l,i,r)},xN=(t,l,i)=>{const r=t===""?l:Yx(l,t);r.classGroupId=i},vN=(t,l,i,r)=>{if(EN(t)){bh(t(r),l,i,r);return}l.validators===null&&(l.validators=[]),l.validators.push(fN(i,t))},bN=(t,l,i,r)=>{const o=Object.entries(t),u=o.length;for(let f=0;f<u;f++){const[m,g]=o[f];bh(g,Yx(l,m),i,r)}},Yx=(t,l)=>{let i=t;const r=l.split(Ac),o=r.length;for(let u=0;u<o;u++){const f=r[u];let m=i.nextPart.get(f);m||(m=$x(),i.nextPart.set(f,m)),i=m}return i},EN=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,SN=t=>{if(t<1)return{get:()=>{},set:()=>{}};let l=0,i=Object.create(null),r=Object.create(null);const o=(u,f)=>{i[u]=f,l++,l>t&&(l=0,r=i,i=Object.create(null))};return{get(u){let f=i[u];if(f!==void 0)return f;if((f=r[u])!==void 0)return o(u,f),f},set(u,f){u in i?i[u]=f:o(u,f)}}},Id="!",Xp=":",wN=[],Zp=(t,l,i,r,o)=>({modifiers:t,hasImportantModifier:l,baseClassName:i,maybePostfixModifierPosition:r,isExternal:o}),_N=t=>{const{prefix:l,experimentalParseClassName:i}=t;let r=o=>{const u=[];let f=0,m=0,g=0,h;const y=o.length;for(let _=0;_<y;_++){const A=o[_];if(f===0&&m===0){if(A===Xp){u.push(o.slice(g,_)),g=_+1;continue}if(A==="/"){h=_;continue}}A==="["?f++:A==="]"?f--:A==="("?m++:A===")"&&m--}const x=u.length===0?o:o.slice(g);let v=x,w=!1;x.endsWith(Id)?(v=x.slice(0,-1),w=!0):x.startsWith(Id)&&(v=x.slice(1),w=!0);const S=h&&h>g?h-g:void 0;return Zp(u,w,v,S)};if(l){const o=l+Xp,u=r;r=f=>f.startsWith(o)?u(f.slice(o.length)):Zp(wN,!1,f,void 0,!0)}if(i){const o=r;r=u=>i({className:u,parseClassName:o})}return r},NN=t=>{const l=new Map;return t.orderSensitiveModifiers.forEach((i,r)=>{l.set(i,1e6+r)}),i=>{const r=[];let o=[];for(let u=0;u<i.length;u++){const f=i[u],m=f[0]==="[",g=l.has(f);m||g?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(f)):o.push(f)}return o.length>0&&(o.sort(),r.push(...o)),r}},AN=t=>({cache:SN(t.cacheSize),parseClassName:_N(t),sortModifiers:NN(t),...hN(t)}),CN=/\s+/,MN=(t,l)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:u}=l,f=[],m=t.trim().split(CN);let g="";for(let h=m.length-1;h>=0;h-=1){const y=m[h],{isExternal:x,modifiers:v,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:_}=i(y);if(x){g=y+(g.length>0?" "+g:g);continue}let A=!!_,C=r(A?S.substring(0,_):S);if(!C){if(!A){g=y+(g.length>0?" "+g:g);continue}if(C=r(S),!C){g=y+(g.length>0?" "+g:g);continue}A=!1}const T=v.length===0?"":v.length===1?v[0]:u(v).join(":"),E=w?T+Id:T,R=E+C;if(f.indexOf(R)>-1)continue;f.push(R);const L=o(C,A);for(let D=0;D<L.length;++D){const B=L[D];f.push(E+B)}g=y+(g.length>0?" "+g:g)}return g},TN=(...t)=>{let l=0,i,r,o="";for(;l<t.length;)(i=t[l++])&&(r=qx(i))&&(o&&(o+=" "),o+=r);return o},qx=t=>{if(typeof t=="string")return t;let l,i="";for(let r=0;r<t.length;r++)t[r]&&(l=qx(t[r]))&&(i&&(i+=" "),i+=l);return i},RN=(t,...l)=>{let i,r,o,u;const f=g=>{const h=l.reduce((y,x)=>x(y),t());return i=AN(h),r=i.cache.get,o=i.cache.set,u=m,m(g)},m=g=>{const h=r(g);if(h)return h;const y=MN(g,i);return o(g,y),y};return u=f,(...g)=>u(TN(...g))},ON=[],Zt=t=>{const l=i=>i[t]||ON;return l.isThemeGetter=!0,l},Gx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,zN=/^\d+\/\d+$/,jN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,DN=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,kN=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,LN=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pi=t=>zN.test(t),qe=t=>!!t&&!Number.isNaN(Number(t)),jl=t=>!!t&&Number.isInteger(Number(t)),xd=t=>t.endsWith("%")&&qe(t.slice(0,-1)),Ga=t=>jN.test(t),BN=()=>!0,UN=t=>DN.test(t)&&!kN.test(t),Zx=()=>!1,$N=t=>LN.test(t),VN=t=>HN.test(t),YN=t=>!Se(t)&&!we(t),qN=t=>ms(t,Kx,Zx),Se=t=>Gx.test(t),ri=t=>ms(t,Fx,UN),vd=t=>ms(t,QN,qe),Ip=t=>ms(t,Ix,Zx),GN=t=>ms(t,Qx,VN),lc=t=>ms(t,Jx,$N),we=t=>Xx.test(t),ur=t=>gs(t,Fx),XN=t=>gs(t,KN),Qp=t=>gs(t,Ix),ZN=t=>gs(t,Kx),IN=t=>gs(t,Qx),ic=t=>gs(t,Jx,!0),ms=(t,l,i)=>{const r=Gx.exec(t);return r?r[1]?l(r[1]):i(r[2]):!1},gs=(t,l,i=!1)=>{const r=Xx.exec(t);return r?r[1]?l(r[1]):i:!1},Ix=t=>t==="position"||t==="percentage",Qx=t=>t==="image"||t==="url",Kx=t=>t==="length"||t==="size"||t==="bg-size",Fx=t=>t==="length",QN=t=>t==="number",KN=t=>t==="family-name",Jx=t=>t==="shadow",FN=()=>{const t=Zt("color"),l=Zt("font"),i=Zt("text"),r=Zt("font-weight"),o=Zt("tracking"),u=Zt("leading"),f=Zt("breakpoint"),m=Zt("container"),g=Zt("spacing"),h=Zt("radius"),y=Zt("shadow"),x=Zt("inset-shadow"),v=Zt("text-shadow"),w=Zt("drop-shadow"),S=Zt("blur"),_=Zt("perspective"),A=Zt("aspect"),C=Zt("ease"),T=Zt("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...R(),we,Se],D=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],Y=()=>[we,Se,g],X=()=>[Pi,"full","auto",...Y()],ie=()=>[jl,"none","subgrid",we,Se],Z=()=>["auto",{span:["full",jl,we,Se]},jl,we,Se],K=()=>[jl,"auto",we,Se],ae=()=>["auto","min","max","fr",we,Se],k=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...Y()],U=()=>[Pi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...Y()],j=()=>[t,we,Se],q=()=>[...R(),Qp,Ip,{position:[we,Se]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],O=()=>["auto","cover","contain",ZN,qN,{size:[we,Se]}],H=()=>[xd,ur,ri],Q=()=>["","none","full",h,we,Se],J=()=>["",qe,ur,ri],ce=()=>["solid","dashed","dotted","double"],he=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],re=()=>[qe,xd,Qp,Ip],fe=()=>["","none",S,we,Se],me=()=>["none",qe,we,Se],Ce=()=>["none",qe,we,Se],xe=()=>[qe,we,Se],ve=()=>[Pi,"full",...Y()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ga],breakpoint:[Ga],color:[BN],container:[Ga],"drop-shadow":[Ga],ease:["in","out","in-out"],font:[YN],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ga],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ga],shadow:[Ga],spacing:["px",qe],text:[Ga],"text-shadow":[Ga],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pi,Se,we,A]}],container:["container"],columns:[{columns:[qe,Se,we,m]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:X()}],"inset-x":[{"inset-x":X()}],"inset-y":[{"inset-y":X()}],start:[{start:X()}],end:[{end:X()}],top:[{top:X()}],right:[{right:X()}],bottom:[{bottom:X()}],left:[{left:X()}],visibility:["visible","invisible","collapse"],z:[{z:[jl,"auto",we,Se]}],basis:[{basis:[Pi,"full","auto",m,...Y()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[qe,Pi,"auto","initial","none",Se]}],grow:[{grow:["",qe,we,Se]}],shrink:[{shrink:["",qe,we,Se]}],order:[{order:[jl,"first","last","none",we,Se]}],"grid-cols":[{"grid-cols":ie()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":ie()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ae()}],"auto-rows":[{"auto-rows":ae()}],gap:[{gap:Y()}],"gap-x":[{"gap-x":Y()}],"gap-y":[{"gap-y":Y()}],"justify-content":[{justify:[...k(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...k()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:Y()}],px:[{px:Y()}],py:[{py:Y()}],ps:[{ps:Y()}],pe:[{pe:Y()}],pt:[{pt:Y()}],pr:[{pr:Y()}],pb:[{pb:Y()}],pl:[{pl:Y()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":Y()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":Y()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[m,"screen",...U()]}],"min-w":[{"min-w":[m,"screen","none",...U()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[f]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",i,ur,ri]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,we,vd]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xd,Se]}],"font-family":[{font:[XN,Se,l]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,we,Se]}],"line-clamp":[{"line-clamp":[qe,"none",we,vd]}],leading:[{leading:[u,...Y()]}],"list-image":[{"list-image":["none",we,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",we,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[qe,"from-font","auto",we,ri]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[qe,"auto",we,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",we,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",we,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:O()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},jl,we,Se],radial:["",we,Se],conic:[jl,we,Se]},IN,GN]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:H()}],"gradient-via-pos":[{via:H()}],"gradient-to-pos":[{to:H()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:Q()}],"rounded-s":[{"rounded-s":Q()}],"rounded-e":[{"rounded-e":Q()}],"rounded-t":[{"rounded-t":Q()}],"rounded-r":[{"rounded-r":Q()}],"rounded-b":[{"rounded-b":Q()}],"rounded-l":[{"rounded-l":Q()}],"rounded-ss":[{"rounded-ss":Q()}],"rounded-se":[{"rounded-se":Q()}],"rounded-ee":[{"rounded-ee":Q()}],"rounded-es":[{"rounded-es":Q()}],"rounded-tl":[{"rounded-tl":Q()}],"rounded-tr":[{"rounded-tr":Q()}],"rounded-br":[{"rounded-br":Q()}],"rounded-bl":[{"rounded-bl":Q()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ce(),"hidden","none"]}],"divide-style":[{divide:[...ce(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[qe,we,Se]}],"outline-w":[{outline:["",qe,ur,ri]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",y,ic,lc]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",x,ic,lc]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[qe,ri]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",v,ic,lc]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[qe,we,Se]}],"mix-blend":[{"mix-blend":[...he(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":he()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[qe]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[we,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[qe]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:O()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",we,Se]}],filter:[{filter:["","none",we,Se]}],blur:[{blur:fe()}],brightness:[{brightness:[qe,we,Se]}],contrast:[{contrast:[qe,we,Se]}],"drop-shadow":[{"drop-shadow":["","none",w,ic,lc]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",qe,we,Se]}],"hue-rotate":[{"hue-rotate":[qe,we,Se]}],invert:[{invert:["",qe,we,Se]}],saturate:[{saturate:[qe,we,Se]}],sepia:[{sepia:["",qe,we,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",we,Se]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[qe,we,Se]}],"backdrop-contrast":[{"backdrop-contrast":[qe,we,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",qe,we,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[qe,we,Se]}],"backdrop-invert":[{"backdrop-invert":["",qe,we,Se]}],"backdrop-opacity":[{"backdrop-opacity":[qe,we,Se]}],"backdrop-saturate":[{"backdrop-saturate":[qe,we,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",qe,we,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":Y()}],"border-spacing-x":[{"border-spacing-x":Y()}],"border-spacing-y":[{"border-spacing-y":Y()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",we,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[qe,"initial",we,Se]}],ease:[{ease:["linear","initial",C,we,Se]}],delay:[{delay:[qe,we,Se]}],animate:[{animate:["none",T,we,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,we,Se]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:me()}],"rotate-x":[{"rotate-x":me()}],"rotate-y":[{"rotate-y":me()}],"rotate-z":[{"rotate-z":me()}],scale:[{scale:Ce()}],"scale-x":[{"scale-x":Ce()}],"scale-y":[{"scale-y":Ce()}],"scale-z":[{"scale-z":Ce()}],"scale-3d":["scale-3d"],skew:[{skew:xe()}],"skew-x":[{"skew-x":xe()}],"skew-y":[{"skew-y":xe()}],transform:[{transform:[we,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ve()}],"translate-x":[{"translate-x":ve()}],"translate-y":[{"translate-y":ve()}],"translate-z":[{"translate-z":ve()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",we,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",we,Se]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[qe,ur,ri,vd]}],stroke:[{stroke:["none",...j()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},JN=RN(FN);function di(...t){return JN(cN(t))}function Ia(t){const l=window.RUBY_REACTOR_BASE||"/",i=l.endsWith("/")?l.slice(0,-1):l,r=t.startsWith("/")?t:`/${t}`;return`${i}${r}`}const PN={success:["completed","skipped"],running:["running","paused"],errors:["failed","cancelled"]};function pr(t,l){if(l==="all")return!0;const i=PN[l];return i?i.includes(t):t===l}function WN(t){const l=new Map;for(const i of t){let r=l.get(i.class);r||(r={className:i.class,runs:0,success:0,running:0,errors:0},l.set(i.class,r)),r.runs+=1,pr(i.status,"success")?r.success+=1:pr(i.status,"running")?r.running+=1:pr(i.status,"errors")&&(r.errors+=1)}return Array.from(l.values()).sort((i,r)=>i.className.localeCompare(r.className))}function Qd(t,l="all"){const i=`/reactors/by-class/${encodeURIComponent(t)}`;return l==="all"?i:`${i}?status=${l}`}function hi(t){return`/reactors/${t}`}const e2=t=>fetch(t).then(l=>l.json());function t2(){const{data:t,error:l,isLoading:i}=Vc(Ia("/api/reactors"),e2,{refreshInterval:2e3}),[r,o]=z.useState(""),[u,f]=z.useState("all"),m=z.useMemo(()=>WN(t??[]).filter(y=>y.className.toLowerCase().includes(r.toLowerCase())),[t,r]),g=z.useMemo(()=>m.reduce((y,x)=>({runs:y.runs+x.runs,success:y.success+x.success,running:y.running+x.running,errors:y.errors+x.errors}),{runs:0,success:0,running:0,errors:0}),[m]),h=z.useMemo(()=>u==="all"?m:m.filter(y=>y[u]>0),[m,u]);return l?p.jsxs("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/20 text-red-400 flex items-center gap-2",children:[p.jsx(Pa,{className:"w-5 h-5"}),"Failed to load reactors"]}):p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold text-white tracking-tight",children:"Dashboard"}),p.jsx("p",{className:"text-slate-400 text-sm mt-1",children:"Reactor classes grouped with execution counts."})]}),p.jsxs("div",{className:"relative",children:[p.jsx(yh,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),p.jsx("input",{type:"text",placeholder:"Search class name...",value:r,onChange:y=>o(y.target.value),className:"bg-slate-900/50 border border-slate-800 text-sm rounded-lg pl-9 pr-4 py-2 text-slate-200 placeholder:text-slate-600 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 w-full sm:w-64 transition-all"})]})]}),p.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[p.jsx(sc,{label:"Total Runs",value:g.runs,selected:u==="all",onSelect:()=>f("all")}),p.jsx(sc,{label:"Success",value:g.success,tone:"success",selected:u==="success",onSelect:()=>f("success")}),p.jsx(sc,{label:"Running",value:g.running,tone:"running",selected:u==="running",onSelect:()=>f("running")}),p.jsx(sc,{label:"Errors",value:g.errors,tone:"error",selected:u==="errors",onSelect:()=>f("errors")})]}),p.jsx("div",{className:"bg-slate-900/50 backdrop-blur-sm rounded-xl border border-slate-800 overflow-hidden shadow-xl shadow-black/20",children:i?p.jsx("div",{className:"p-12 flex items-center justify-center text-slate-500 animate-pulse",children:"Loading reactor data..."}):p.jsx("div",{className:"overflow-x-auto",children:p.jsxs("table",{className:"w-full text-left text-sm",children:[p.jsx("thead",{className:"bg-slate-900/80 border-b border-slate-800 text-slate-400 font-medium",children:p.jsxs("tr",{children:[p.jsx("th",{className:"px-6 py-4 font-medium",children:"Class Name"}),p.jsx("th",{className:"px-6 py-4 font-medium text-right tabular-nums",children:"Runs"}),p.jsx("th",{className:"px-6 py-4 font-medium text-right tabular-nums",children:"Success"}),p.jsx("th",{className:"px-6 py-4 font-medium text-right tabular-nums",children:"Running"}),p.jsx("th",{className:"px-6 py-4 font-medium text-right tabular-nums",children:"Errors"}),p.jsx("th",{className:"px-6 py-4 w-10"})]})}),p.jsxs("tbody",{className:"divide-y divide-slate-800/50",children:[h.map(y=>p.jsxs("tr",{className:"group hover:bg-slate-800/30 transition-colors",children:[p.jsx("td",{className:"px-6 py-4",children:p.jsxs(Rn,{to:Qd(y.className,u),className:"relative flex items-center gap-2 text-slate-200 font-medium group-hover:text-indigo-400 transition-colors",children:[p.jsx("span",{className:"absolute -left-2 w-1 h-0 group-hover:h-4 bg-indigo-500 rounded-full transition-all duration-300 opacity-0 group-hover:opacity-100"}),y.className]})}),p.jsx("td",{className:"px-6 py-4 text-right text-slate-300 tabular-nums",children:y.runs}),p.jsx("td",{className:"px-6 py-4 text-right text-teal-400 tabular-nums",children:y.success}),p.jsx("td",{className:"px-6 py-4 text-right text-indigo-400 tabular-nums",children:y.running}),p.jsx("td",{className:"px-6 py-4 text-right text-rose-400 tabular-nums",children:y.errors}),p.jsx("td",{className:"px-6 py-4 text-slate-600 group-hover:text-indigo-400 transition-colors",children:p.jsx(Rn,{to:Qd(y.className,u),"aria-label":`View ${y.className} instances`,children:p.jsx(Fw,{className:"w-4 h-4"})})})]},y.className)),h.length===0&&p.jsx("tr",{children:p.jsx("td",{colSpan:6,className:"px-6 py-24 text-center",children:p.jsxs("div",{className:"flex flex-col items-center gap-3 text-slate-500",children:[p.jsx("div",{className:"p-4 bg-slate-900 rounded-full border border-slate-800",children:p.jsx(kr,{className:"w-6 h-6 text-slate-600"})}),p.jsx("p",{children:"No reactor classes found matching your search."})]})})})]})]})})})]})}function sc({label:t,value:l,tone:i,selected:r,onSelect:o}){const u=i==="success"?"text-teal-400":i==="running"?"text-indigo-400":i==="error"?"text-rose-400":"text-white",f=r?i==="success"?"border-teal-500/60 bg-teal-500/10 ring-1 ring-teal-500/30":i==="running"?"border-indigo-500/60 bg-indigo-500/10 ring-1 ring-indigo-500/30":i==="error"?"border-rose-500/60 bg-rose-500/10 ring-1 ring-rose-500/30":"border-slate-500 bg-slate-800/60 ring-1 ring-slate-500/40":"border-slate-800 hover:border-slate-600 hover:bg-slate-800/40";return p.jsxs("button",{type:"button",onClick:o,"aria-pressed":r,"aria-label":i?`Filter reactors by ${t.toLowerCase()}`:"Clear status filter",className:`text-left bg-slate-900/50 border rounded-xl px-4 py-3 transition-colors focus:outline-none focus:ring-2 focus:ring-indigo-500/50 ${f}`,children:[p.jsx("p",{className:"text-xs text-slate-500 uppercase tracking-wide",children:t}),p.jsx("p",{className:`text-2xl font-bold tabular-nums mt-1 ${u}`,children:l})]})}function Px({status:t}){const l={running:"bg-indigo-500/10 text-indigo-400 border-indigo-500/20 shadow-[0_0_10px_rgba(99,102,241,0.15)]",completed:"bg-teal-500/10 text-teal-400 border-teal-500/20 shadow-[0_0_10px_rgba(20,184,166,0.15)]",skipped:"bg-sky-500/10 text-sky-400 border-sky-500/20 shadow-[0_0_10px_rgba(14,165,233,0.15)]",failed:"bg-rose-500/10 text-rose-400 border-rose-500/20 shadow-[0_0_10px_rgba(244,63,94,0.15)]",cancelled:"bg-slate-800 text-slate-400 border-slate-700",paused:"bg-amber-500/10 text-amber-400 border-amber-500/20"}[t]||"bg-slate-800 text-slate-400 border-slate-700",i={running:p.jsx(kr,{className:"w-3 h-3 animate-pulse"}),completed:p.jsx(Ax,{className:"w-3 h-3"}),skipped:p.jsx(A_,{className:"w-3 h-3"}),failed:p.jsx(Pa,{className:"w-3 h-3"}),cancelled:p.jsx(Nc,{className:"w-3 h-3"}),paused:p.jsx(Nc,{className:"w-3 h-3"})}[t];return p.jsxs("span",{className:di("inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium border backdrop-blur-md transition-all",l),children:[i,p.jsx("span",{className:"capitalize tracking-wide",children:t})]})}const n2=t=>fetch(t).then(l=>l.json());function a2(){const{data:t,error:l,isLoading:i}=Vc(Ia("/api/reactors"),n2,{refreshInterval:2e3}),[r,o]=z.useState(""),[u,f]=Sx(),m=u.get("status")||"all",g=t?.filter(h=>(h.id.toLowerCase().includes(r.toLowerCase())||h.class.toLowerCase().includes(r.toLowerCase()))&&pr(h.status,m));return l?p.jsxs("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/20 text-red-400 flex items-center gap-2",children:[p.jsx(Pa,{className:"w-5 h-5"}),"Failed to load reactors"]}):p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold text-white tracking-tight",children:"Live Executions"}),p.jsx("p",{className:"text-slate-400 text-sm mt-1",children:"Real-time view of all reactor runs."})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("div",{className:"relative",children:[p.jsx(yh,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),p.jsx("input",{type:"text",placeholder:"Search ID or Class...",value:r,onChange:h=>o(h.target.value),className:"bg-slate-900/50 border border-slate-800 text-sm rounded-lg pl-9 pr-4 py-2 text-slate-200 placeholder:text-slate-600 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 w-full sm:w-64 transition-all"})]}),p.jsxs("div",{className:"relative",children:[p.jsx(Mx,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-slate-500 pointer-events-none"}),p.jsxs("select",{value:m,onChange:h=>{const y=h.target.value;f(y==="all"?{}:{status:y})},className:"appearance-none bg-slate-900/50 border border-slate-800 text-slate-300 rounded-lg pl-9 pr-8 py-2 hover:bg-slate-800 hover:text-white transition-colors text-sm font-medium focus:outline-none focus:ring-2 focus:ring-indigo-500/50 cursor-pointer",children:[p.jsx("option",{value:"all",children:"All Status"}),p.jsx("option",{value:"success",children:"Success"}),p.jsx("option",{value:"running",children:"Running"}),p.jsx("option",{value:"errors",children:"Errors"}),p.jsx("option",{value:"completed",children:"Completed"}),p.jsx("option",{value:"skipped",children:"Skipped"}),p.jsx("option",{value:"paused",children:"Paused"}),p.jsx("option",{value:"failed",children:"Failed"}),p.jsx("option",{value:"cancelled",children:"Cancelled"})]})]})]})]}),p.jsx("div",{className:"bg-slate-900/50 backdrop-blur-sm rounded-xl border border-slate-800 overflow-hidden shadow-xl shadow-black/20",children:i?p.jsx("div",{className:"p-12 flex items-center justify-center text-slate-500 animate-pulse",children:"Loading reactor data..."}):p.jsx("div",{className:"overflow-x-auto",children:p.jsxs("table",{className:"w-full text-left text-sm",children:[p.jsx("thead",{className:"bg-slate-900/80 border-b border-slate-800 text-slate-400 font-medium pb-4",children:p.jsxs("tr",{children:[p.jsx("th",{className:"px-6 py-4 font-medium",children:"Reactor ID"}),p.jsx("th",{className:"px-6 py-4 font-medium",children:"Class Name"}),p.jsx("th",{className:"px-6 py-4 font-medium",children:"Status"}),p.jsx("th",{className:"px-6 py-4 font-medium",children:"Failure"}),p.jsx("th",{className:"px-6 py-4 font-medium",children:"Started"}),p.jsx("th",{className:"px-6 py-4 text-right font-medium",children:"Actions"})]})}),p.jsxs("tbody",{className:"divide-y divide-slate-800/50",children:[g?.map(h=>p.jsxs("tr",{className:"group hover:bg-slate-800/30 transition-colors",children:[p.jsx("td",{className:"px-6 py-4 font-mono text-slate-500 group-hover:text-indigo-400 transition-colors",children:p.jsxs(Rn,{to:hi(h.id),className:"block relative",children:[p.jsx("span",{className:"absolute -left-2 top-1/2 -translate-y-1/2 w-1 h-0 group-hover:h-4 bg-indigo-500 rounded-full transition-all duration-300 opacity-0 group-hover:opacity-100"}),h.id.substring(0,8),"..."]})}),p.jsx("td",{className:"px-6 py-4 text-slate-200 font-medium",children:h.class}),p.jsx("td",{className:"px-6 py-4",children:p.jsx(Px,{status:h.status})}),p.jsx("td",{className:"px-6 py-4 text-slate-400 font-mono text-xs",children:h.status==="failed"&&h.failure&&p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-rose-400 font-medium",children:h.failure.step_name}),p.jsx("span",{className:"text-slate-500 text-[10px] leading-tight opacity-70",children:h.failure.exception_class})]})}),p.jsx("td",{className:"px-6 py-4 text-slate-500 tabular-nums",children:new Date(h.created_at).toLocaleString()}),p.jsx("td",{className:"px-6 py-4 text-right",children:p.jsxs(Rn,{to:hi(h.id),className:"inline-flex items-center gap-1.5 text-xs font-medium text-slate-500 hover:text-indigo-400 transition-colors px-3 py-1.5 rounded-md hover:bg-indigo-500/10",children:["Inspect",p.jsx("span",{className:"sr-only",children:h.id})]})})]},h.id)),g?.length===0&&p.jsx("tr",{children:p.jsx("td",{colSpan:6,className:"px-6 py-24 text-center",children:p.jsxs("div",{className:"flex flex-col items-center gap-3 text-slate-500",children:[p.jsx("div",{className:"p-4 bg-slate-900 rounded-full border border-slate-800",children:p.jsx(kr,{className:"w-6 h-6 text-slate-600"})}),p.jsx("p",{children:"No active reactors found matching your filters."})]})})})]})]})})})]})}const l2=t=>fetch(t).then(l=>l.json());function i2(){const{className:t}=mx(),l=t?decodeURIComponent(t):"",{data:i,error:r,isLoading:o}=Vc(Ia("/api/reactors"),l2,{refreshInterval:2e3}),[u,f]=z.useState(""),[m,g]=Sx(),h=m.get("status")||"all",y=i?.filter(v=>v.class===l),x=y?.filter(v=>v.id.toLowerCase().includes(u.toLowerCase())&&pr(v.status,h));return r?p.jsxs("div",{className:"p-4 rounded-lg bg-red-500/10 border border-red-500/20 text-red-400 flex items-center gap-2",children:[p.jsx(Pa,{className:"w-5 h-5"}),"Failed to load reactors"]}):p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[p.jsxs("div",{className:"flex items-start gap-4",children:[p.jsx(Rn,{to:"/",className:"p-2 hover:bg-white/5 rounded-full text-slate-400 hover:text-white transition-colors mt-0.5",children:p.jsx(ph,{className:"w-5 h-5"})}),p.jsxs("div",{children:[p.jsx("h1",{className:"text-2xl font-bold text-white tracking-tight",children:l}),p.jsxs("p",{className:"text-slate-400 text-sm mt-1",children:[y?.length??0," execution",y?.length===1?"":"s"]})]})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs("div",{className:"relative",children:[p.jsx(yh,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),p.jsx("input",{type:"text",placeholder:"Search ID...",value:u,onChange:v=>f(v.target.value),className:"bg-slate-900/50 border border-slate-800 text-sm rounded-lg pl-9 pr-4 py-2 text-slate-200 placeholder:text-slate-600 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 w-full sm:w-64 transition-all"})]}),p.jsxs("div",{className:"relative",children:[p.jsx(Mx,{className:"w-4 h-4 absolute left-3 top-1/2 -translate-y-1/2 text-slate-500 pointer-events-none"}),p.jsxs("select",{value:h,onChange:v=>{const w=v.target.value;g(w==="all"?{}:{status:w})},className:"appearance-none bg-slate-900/50 border border-slate-800 text-slate-300 rounded-lg pl-9 pr-8 py-2 hover:bg-slate-800 hover:text-white transition-colors text-sm font-medium focus:outline-none focus:ring-2 focus:ring-indigo-500/50 cursor-pointer",children:[p.jsx("option",{value:"all",children:"All Status"}),p.jsx("option",{value:"success",children:"Success"}),p.jsx("option",{value:"running",children:"Running"}),p.jsx("option",{value:"errors",children:"Errors"}),p.jsx("option",{value:"completed",children:"Completed"}),p.jsx("option",{value:"skipped",children:"Skipped"}),p.jsx("option",{value:"paused",children:"Paused"}),p.jsx("option",{value:"failed",children:"Failed"}),p.jsx("option",{value:"cancelled",children:"Cancelled"})]})]})]})]}),p.jsx("div",{className:"bg-slate-900/50 backdrop-blur-sm rounded-xl border border-slate-800 overflow-hidden shadow-xl shadow-black/20",children:o?p.jsx("div",{className:"p-12 flex items-center justify-center text-slate-500 animate-pulse",children:"Loading reactor data..."}):p.jsx("div",{className:"overflow-x-auto",children:p.jsxs("table",{className:"w-full text-left text-sm",children:[p.jsx("thead",{className:"bg-slate-900/80 border-b border-slate-800 text-slate-400 font-medium pb-4",children:p.jsxs("tr",{children:[p.jsx("th",{className:"px-6 py-4 font-medium",children:"Reactor ID"}),p.jsx("th",{className:"px-6 py-4 font-medium",children:"Status"}),p.jsx("th",{className:"px-6 py-4 font-medium",children:"Failure"}),p.jsx("th",{className:"px-6 py-4 font-medium",children:"Started"}),p.jsx("th",{className:"px-6 py-4 text-right font-medium",children:"Actions"})]})}),p.jsxs("tbody",{className:"divide-y divide-slate-800/50",children:[x?.map(v=>p.jsxs("tr",{className:"group hover:bg-slate-800/30 transition-colors cursor-pointer",children:[p.jsx("td",{className:"px-6 py-4 font-mono text-slate-500 group-hover:text-indigo-400 transition-colors",children:p.jsxs(Rn,{to:hi(v.id),className:"block relative",children:[p.jsx("span",{className:"absolute -left-2 top-1/2 -translate-y-1/2 w-1 h-0 group-hover:h-4 bg-indigo-500 rounded-full transition-all duration-300 opacity-0 group-hover:opacity-100"}),v.id.substring(0,8),"..."]})}),p.jsx("td",{className:"px-6 py-4",children:p.jsx(Px,{status:v.status})}),p.jsx("td",{className:"px-6 py-4 text-slate-400 font-mono text-xs",children:v.status==="failed"&&v.failure&&p.jsxs("div",{className:"flex flex-col",children:[p.jsx("span",{className:"text-rose-400 font-medium",children:v.failure.step_name}),p.jsx("span",{className:"text-slate-500 text-[10px] leading-tight opacity-70",children:v.failure.exception_class})]})}),p.jsx("td",{className:"px-6 py-4 text-slate-500 tabular-nums",children:new Date(v.created_at).toLocaleString()}),p.jsx("td",{className:"px-6 py-4 text-right",children:p.jsxs(Rn,{to:hi(v.id),className:"inline-flex items-center gap-1.5 text-xs font-medium text-slate-500 hover:text-indigo-400 transition-colors px-3 py-1.5 rounded-md hover:bg-indigo-500/10",children:["Inspect",p.jsx("span",{className:"sr-only",children:v.id})]})})]},v.id)),x?.length===0&&p.jsx("tr",{children:p.jsx("td",{colSpan:5,className:"px-6 py-24 text-center",children:p.jsxs("div",{className:"flex flex-col items-center gap-3 text-slate-500",children:[p.jsx("div",{className:"p-4 bg-slate-900 rounded-full border border-slate-800",children:p.jsx(kr,{className:"w-6 h-6 text-slate-600"})}),p.jsx("p",{children:"No executions found for this reactor class."})]})})})]})]})})})]})}function qt(t){if(typeof t=="string"||typeof t=="number")return""+t;let l="";if(Array.isArray(t))for(let i=0,r;i<t.length;i++)(r=qt(t[i]))!==""&&(l+=(l&&" ")+r);else for(let i in t)t[i]&&(l+=(l&&" ")+i);return l}var s2={value:()=>{}};function Yc(){for(var t=0,l=arguments.length,i={},r;t<l;++t){if(!(r=arguments[t]+"")||r in i||/[\s.]/.test(r))throw new Error("illegal type: "+r);i[r]=[]}return new vc(i)}function vc(t){this._=t}function r2(t,l){return t.trim().split(/^|\s+/).map(function(i){var r="",o=i.indexOf(".");if(o>=0&&(r=i.slice(o+1),i=i.slice(0,o)),i&&!l.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:r}})}vc.prototype=Yc.prototype={constructor:vc,on:function(t,l){var i=this._,r=r2(t+"",i),o,u=-1,f=r.length;if(arguments.length<2){for(;++u<f;)if((o=(t=r[u]).type)&&(o=o2(i[o],t.name)))return o;return}if(l!=null&&typeof l!="function")throw new Error("invalid callback: "+l);for(;++u<f;)if(o=(t=r[u]).type)i[o]=Kp(i[o],t.name,l);else if(l==null)for(o in i)i[o]=Kp(i[o],t.name,null);return this},copy:function(){var t={},l=this._;for(var i in l)t[i]=l[i].slice();return new vc(t)},call:function(t,l){if((o=arguments.length-2)>0)for(var i=new Array(o),r=0,o,u;r<o;++r)i[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(u=this._[t],r=0,o=u.length;r<o;++r)u[r].value.apply(l,i)},apply:function(t,l,i){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,u=r.length;o<u;++o)r[o].value.apply(l,i)}};function o2(t,l){for(var i=0,r=t.length,o;i<r;++i)if((o=t[i]).name===l)return o.value}function Kp(t,l,i){for(var r=0,o=t.length;r<o;++r)if(t[r].name===l){t[r]=s2,t=t.slice(0,r).concat(t.slice(r+1));break}return i!=null&&t.push({name:l,value:i}),t}var Kd="http://www.w3.org/1999/xhtml";const Fp={svg:"http://www.w3.org/2000/svg",xhtml:Kd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function qc(t){var l=t+="",i=l.indexOf(":");return i>=0&&(l=t.slice(0,i))!=="xmlns"&&(t=t.slice(i+1)),Fp.hasOwnProperty(l)?{space:Fp[l],local:t}:t}function c2(t){return function(){var l=this.ownerDocument,i=this.namespaceURI;return i===Kd&&l.documentElement.namespaceURI===Kd?l.createElement(t):l.createElementNS(i,t)}}function u2(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Wx(t){var l=qc(t);return(l.local?u2:c2)(l)}function f2(){}function Eh(t){return t==null?f2:function(){return this.querySelector(t)}}function d2(t){typeof t!="function"&&(t=Eh(t));for(var l=this._groups,i=l.length,r=new Array(i),o=0;o<i;++o)for(var u=l[o],f=u.length,m=r[o]=new Array(f),g,h,y=0;y<f;++y)(g=u[y])&&(h=t.call(g,g.__data__,y,u))&&("__data__"in g&&(h.__data__=g.__data__),m[y]=h);return new On(r,this._parents)}function h2(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function m2(){return[]}function ev(t){return t==null?m2:function(){return this.querySelectorAll(t)}}function g2(t){return function(){return h2(t.apply(this,arguments))}}function p2(t){typeof t=="function"?t=g2(t):t=ev(t);for(var l=this._groups,i=l.length,r=[],o=[],u=0;u<i;++u)for(var f=l[u],m=f.length,g,h=0;h<m;++h)(g=f[h])&&(r.push(t.call(g,g.__data__,h,f)),o.push(g));return new On(r,o)}function tv(t){return function(){return this.matches(t)}}function nv(t){return function(l){return l.matches(t)}}var y2=Array.prototype.find;function x2(t){return function(){return y2.call(this.children,t)}}function v2(){return this.firstElementChild}function b2(t){return this.select(t==null?v2:x2(typeof t=="function"?t:nv(t)))}var E2=Array.prototype.filter;function S2(){return Array.from(this.children)}function w2(t){return function(){return E2.call(this.children,t)}}function _2(t){return this.selectAll(t==null?S2:w2(typeof t=="function"?t:nv(t)))}function N2(t){typeof t!="function"&&(t=tv(t));for(var l=this._groups,i=l.length,r=new Array(i),o=0;o<i;++o)for(var u=l[o],f=u.length,m=r[o]=[],g,h=0;h<f;++h)(g=u[h])&&t.call(g,g.__data__,h,u)&&m.push(g);return new On(r,this._parents)}function av(t){return new Array(t.length)}function A2(){return new On(this._enter||this._groups.map(av),this._parents)}function Cc(t,l){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=l}Cc.prototype={constructor:Cc,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,l){return this._parent.insertBefore(t,l)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function C2(t){return function(){return t}}function M2(t,l,i,r,o,u){for(var f=0,m,g=l.length,h=u.length;f<h;++f)(m=l[f])?(m.__data__=u[f],r[f]=m):i[f]=new Cc(t,u[f]);for(;f<g;++f)(m=l[f])&&(o[f]=m)}function T2(t,l,i,r,o,u,f){var m,g,h=new Map,y=l.length,x=u.length,v=new Array(y),w;for(m=0;m<y;++m)(g=l[m])&&(v[m]=w=f.call(g,g.__data__,m,l)+"",h.has(w)?o[m]=g:h.set(w,g));for(m=0;m<x;++m)w=f.call(t,u[m],m,u)+"",(g=h.get(w))?(r[m]=g,g.__data__=u[m],h.delete(w)):i[m]=new Cc(t,u[m]);for(m=0;m<y;++m)(g=l[m])&&h.get(v[m])===g&&(o[m]=g)}function R2(t){return t.__data__}function O2(t,l){if(!arguments.length)return Array.from(this,R2);var i=l?T2:M2,r=this._parents,o=this._groups;typeof t!="function"&&(t=C2(t));for(var u=o.length,f=new Array(u),m=new Array(u),g=new Array(u),h=0;h<u;++h){var y=r[h],x=o[h],v=x.length,w=z2(t.call(y,y&&y.__data__,h,r)),S=w.length,_=m[h]=new Array(S),A=f[h]=new Array(S),C=g[h]=new Array(v);i(y,x,_,A,C,w,l);for(var T=0,E=0,R,L;T<S;++T)if(R=_[T]){for(T>=E&&(E=T+1);!(L=A[E])&&++E<S;);R._next=L||null}}return f=new On(f,r),f._enter=m,f._exit=g,f}function z2(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function j2(){return new On(this._exit||this._groups.map(av),this._parents)}function D2(t,l,i){var r=this.enter(),o=this,u=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),l!=null&&(o=l(o),o&&(o=o.selection())),i==null?u.remove():i(u),r&&o?r.merge(o).order():o}function k2(t){for(var l=t.selection?t.selection():t,i=this._groups,r=l._groups,o=i.length,u=r.length,f=Math.min(o,u),m=new Array(o),g=0;g<f;++g)for(var h=i[g],y=r[g],x=h.length,v=m[g]=new Array(x),w,S=0;S<x;++S)(w=h[S]||y[S])&&(v[S]=w);for(;g<o;++g)m[g]=i[g];return new On(m,this._parents)}function L2(){for(var t=this._groups,l=-1,i=t.length;++l<i;)for(var r=t[l],o=r.length-1,u=r[o],f;--o>=0;)(f=r[o])&&(u&&f.compareDocumentPosition(u)^4&&u.parentNode.insertBefore(f,u),u=f);return this}function H2(t){t||(t=B2);function l(x,v){return x&&v?t(x.__data__,v.__data__):!x-!v}for(var i=this._groups,r=i.length,o=new Array(r),u=0;u<r;++u){for(var f=i[u],m=f.length,g=o[u]=new Array(m),h,y=0;y<m;++y)(h=f[y])&&(g[y]=h);g.sort(l)}return new On(o,this._parents).order()}function B2(t,l){return t<l?-1:t>l?1:t>=l?0:NaN}function U2(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function $2(){return Array.from(this)}function V2(){for(var t=this._groups,l=0,i=t.length;l<i;++l)for(var r=t[l],o=0,u=r.length;o<u;++o){var f=r[o];if(f)return f}return null}function Y2(){let t=0;for(const l of this)++t;return t}function q2(){return!this.node()}function G2(t){for(var l=this._groups,i=0,r=l.length;i<r;++i)for(var o=l[i],u=0,f=o.length,m;u<f;++u)(m=o[u])&&t.call(m,m.__data__,u,o);return this}function X2(t){return function(){this.removeAttribute(t)}}function Z2(t){return function(){this.removeAttributeNS(t.space,t.local)}}function I2(t,l){return function(){this.setAttribute(t,l)}}function Q2(t,l){return function(){this.setAttributeNS(t.space,t.local,l)}}function K2(t,l){return function(){var i=l.apply(this,arguments);i==null?this.removeAttribute(t):this.setAttribute(t,i)}}function F2(t,l){return function(){var i=l.apply(this,arguments);i==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function J2(t,l){var i=qc(t);if(arguments.length<2){var r=this.node();return i.local?r.getAttributeNS(i.space,i.local):r.getAttribute(i)}return this.each((l==null?i.local?Z2:X2:typeof l=="function"?i.local?F2:K2:i.local?Q2:I2)(i,l))}function lv(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function P2(t){return function(){this.style.removeProperty(t)}}function W2(t,l,i){return function(){this.style.setProperty(t,l,i)}}function eA(t,l,i){return function(){var r=l.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,i)}}function tA(t,l,i){return arguments.length>1?this.each((l==null?P2:typeof l=="function"?eA:W2)(t,l,i??"")):is(this.node(),t)}function is(t,l){return t.style.getPropertyValue(l)||lv(t).getComputedStyle(t,null).getPropertyValue(l)}function nA(t){return function(){delete this[t]}}function aA(t,l){return function(){this[t]=l}}function lA(t,l){return function(){var i=l.apply(this,arguments);i==null?delete this[t]:this[t]=i}}function iA(t,l){return arguments.length>1?this.each((l==null?nA:typeof l=="function"?lA:aA)(t,l)):this.node()[t]}function iv(t){return t.trim().split(/^|\s+/)}function Sh(t){return t.classList||new sv(t)}function sv(t){this._node=t,this._names=iv(t.getAttribute("class")||"")}sv.prototype={add:function(t){var l=this._names.indexOf(t);l<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var l=this._names.indexOf(t);l>=0&&(this._names.splice(l,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function rv(t,l){for(var i=Sh(t),r=-1,o=l.length;++r<o;)i.add(l[r])}function ov(t,l){for(var i=Sh(t),r=-1,o=l.length;++r<o;)i.remove(l[r])}function sA(t){return function(){rv(this,t)}}function rA(t){return function(){ov(this,t)}}function oA(t,l){return function(){(l.apply(this,arguments)?rv:ov)(this,t)}}function cA(t,l){var i=iv(t+"");if(arguments.length<2){for(var r=Sh(this.node()),o=-1,u=i.length;++o<u;)if(!r.contains(i[o]))return!1;return!0}return this.each((typeof l=="function"?oA:l?sA:rA)(i,l))}function uA(){this.textContent=""}function fA(t){return function(){this.textContent=t}}function dA(t){return function(){var l=t.apply(this,arguments);this.textContent=l??""}}function hA(t){return arguments.length?this.each(t==null?uA:(typeof t=="function"?dA:fA)(t)):this.node().textContent}function mA(){this.innerHTML=""}function gA(t){return function(){this.innerHTML=t}}function pA(t){return function(){var l=t.apply(this,arguments);this.innerHTML=l??""}}function yA(t){return arguments.length?this.each(t==null?mA:(typeof t=="function"?pA:gA)(t)):this.node().innerHTML}function xA(){this.nextSibling&&this.parentNode.appendChild(this)}function vA(){return this.each(xA)}function bA(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function EA(){return this.each(bA)}function SA(t){var l=typeof t=="function"?t:Wx(t);return this.select(function(){return this.appendChild(l.apply(this,arguments))})}function wA(){return null}function _A(t,l){var i=typeof t=="function"?t:Wx(t),r=l==null?wA:typeof l=="function"?l:Eh(l);return this.select(function(){return this.insertBefore(i.apply(this,arguments),r.apply(this,arguments)||null)})}function NA(){var t=this.parentNode;t&&t.removeChild(this)}function AA(){return this.each(NA)}function CA(){var t=this.cloneNode(!1),l=this.parentNode;return l?l.insertBefore(t,this.nextSibling):t}function MA(){var t=this.cloneNode(!0),l=this.parentNode;return l?l.insertBefore(t,this.nextSibling):t}function TA(t){return this.select(t?MA:CA)}function RA(t){return arguments.length?this.property("__data__",t):this.node().__data__}function OA(t){return function(l){t.call(this,l,this.__data__)}}function zA(t){return t.trim().split(/^|\s+/).map(function(l){var i="",r=l.indexOf(".");return r>=0&&(i=l.slice(r+1),l=l.slice(0,r)),{type:l,name:i}})}function jA(t){return function(){var l=this.__on;if(l){for(var i=0,r=-1,o=l.length,u;i<o;++i)u=l[i],(!t.type||u.type===t.type)&&u.name===t.name?this.removeEventListener(u.type,u.listener,u.options):l[++r]=u;++r?l.length=r:delete this.__on}}}function DA(t,l,i){return function(){var r=this.__on,o,u=OA(l);if(r){for(var f=0,m=r.length;f<m;++f)if((o=r[f]).type===t.type&&o.name===t.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=u,o.options=i),o.value=l;return}}this.addEventListener(t.type,u,i),o={type:t.type,name:t.name,value:l,listener:u,options:i},r?r.push(o):this.__on=[o]}}function kA(t,l,i){var r=zA(t+""),o,u=r.length,f;if(arguments.length<2){var m=this.node().__on;if(m){for(var g=0,h=m.length,y;g<h;++g)for(o=0,y=m[g];o<u;++o)if((f=r[o]).type===y.type&&f.name===y.name)return y.value}return}for(m=l?DA:jA,o=0;o<u;++o)this.each(m(r[o],l,i));return this}function cv(t,l,i){var r=lv(t),o=r.CustomEvent;typeof o=="function"?o=new o(l,i):(o=r.document.createEvent("Event"),i?(o.initEvent(l,i.bubbles,i.cancelable),o.detail=i.detail):o.initEvent(l,!1,!1)),t.dispatchEvent(o)}function LA(t,l){return function(){return cv(this,t,l)}}function HA(t,l){return function(){return cv(this,t,l.apply(this,arguments))}}function BA(t,l){return this.each((typeof l=="function"?HA:LA)(t,l))}function*UA(){for(var t=this._groups,l=0,i=t.length;l<i;++l)for(var r=t[l],o=0,u=r.length,f;o<u;++o)(f=r[o])&&(yield f)}var uv=[null];function On(t,l){this._groups=t,this._parents=l}function Hr(){return new On([[document.documentElement]],uv)}function $A(){return this}On.prototype=Hr.prototype={constructor:On,select:d2,selectAll:p2,selectChild:b2,selectChildren:_2,filter:N2,data:O2,enter:A2,exit:j2,join:D2,merge:k2,selection:$A,order:L2,sort:H2,call:U2,nodes:$2,node:V2,size:Y2,empty:q2,each:G2,attr:J2,style:tA,property:iA,classed:cA,text:hA,html:yA,raise:vA,lower:EA,append:SA,insert:_A,remove:AA,clone:TA,datum:RA,on:kA,dispatch:BA,[Symbol.iterator]:UA};function Tn(t){return typeof t=="string"?new On([[document.querySelector(t)]],[document.documentElement]):new On([[t]],uv)}function VA(t){let l;for(;l=t.sourceEvent;)t=l;return t}function ea(t,l){if(t=VA(t),l===void 0&&(l=t.currentTarget),l){var i=l.ownerSVGElement||l;if(i.createSVGPoint){var r=i.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(l.getScreenCTM().inverse()),[r.x,r.y]}if(l.getBoundingClientRect){var o=l.getBoundingClientRect();return[t.clientX-o.left-l.clientLeft,t.clientY-o.top-l.clientTop]}}return[t.pageX,t.pageY]}const YA={passive:!1},br={capture:!0,passive:!1};function bd(t){t.stopImmediatePropagation()}function as(t){t.preventDefault(),t.stopImmediatePropagation()}function fv(t){var l=t.document.documentElement,i=Tn(t).on("dragstart.drag",as,br);"onselectstart"in l?i.on("selectstart.drag",as,br):(l.__noselect=l.style.MozUserSelect,l.style.MozUserSelect="none")}function dv(t,l){var i=t.document.documentElement,r=Tn(t).on("dragstart.drag",null);l&&(r.on("click.drag",as,br),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in i?r.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const rc=t=>()=>t;function Fd(t,{sourceEvent:l,subject:i,target:r,identifier:o,active:u,x:f,y:m,dx:g,dy:h,dispatch:y}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:l,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:u,enumerable:!0,configurable:!0},x:{value:f,enumerable:!0,configurable:!0},y:{value:m,enumerable:!0,configurable:!0},dx:{value:g,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:y}})}Fd.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function qA(t){return!t.ctrlKey&&!t.button}function GA(){return this.parentNode}function XA(t,l){return l??{x:t.x,y:t.y}}function ZA(){return navigator.maxTouchPoints||"ontouchstart"in this}function hv(){var t=qA,l=GA,i=XA,r=ZA,o={},u=Yc("start","drag","end"),f=0,m,g,h,y,x=0;function v(R){R.on("mousedown.drag",w).filter(r).on("touchstart.drag",A).on("touchmove.drag",C,YA).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(R,L){if(!(y||!t.call(this,R,L))){var D=E(this,l.call(this,R,L),R,L,"mouse");D&&(Tn(R.view).on("mousemove.drag",S,br).on("mouseup.drag",_,br),fv(R.view),bd(R),h=!1,m=R.clientX,g=R.clientY,D("start",R))}}function S(R){if(as(R),!h){var L=R.clientX-m,D=R.clientY-g;h=L*L+D*D>x}o.mouse("drag",R)}function _(R){Tn(R.view).on("mousemove.drag mouseup.drag",null),dv(R.view,h),as(R),o.mouse("end",R)}function A(R,L){if(t.call(this,R,L)){var D=R.changedTouches,B=l.call(this,R,L),Y=D.length,X,ie;for(X=0;X<Y;++X)(ie=E(this,B,R,L,D[X].identifier,D[X]))&&(bd(R),ie("start",R,D[X]))}}function C(R){var L=R.changedTouches,D=L.length,B,Y;for(B=0;B<D;++B)(Y=o[L[B].identifier])&&(as(R),Y("drag",R,L[B]))}function T(R){var L=R.changedTouches,D=L.length,B,Y;for(y&&clearTimeout(y),y=setTimeout(function(){y=null},500),B=0;B<D;++B)(Y=o[L[B].identifier])&&(bd(R),Y("end",R,L[B]))}function E(R,L,D,B,Y,X){var ie=u.copy(),Z=ea(X||D,L),K,ae,k;if((k=i.call(R,new Fd("beforestart",{sourceEvent:D,target:v,identifier:Y,active:f,x:Z[0],y:Z[1],dx:0,dy:0,dispatch:ie}),B))!=null)return K=k.x-Z[0]||0,ae=k.y-Z[1]||0,function I(M,U,j){var q=Z,te;switch(M){case"start":o[Y]=I,te=f++;break;case"end":delete o[Y],--f;case"drag":Z=ea(j||U,L),te=f;break}ie.call(M,R,new Fd(M,{sourceEvent:U,subject:k,target:v,identifier:Y,active:te,x:Z[0]+K,y:Z[1]+ae,dx:Z[0]-q[0],dy:Z[1]-q[1],dispatch:ie}),B)}}return v.filter=function(R){return arguments.length?(t=typeof R=="function"?R:rc(!!R),v):t},v.container=function(R){return arguments.length?(l=typeof R=="function"?R:rc(R),v):l},v.subject=function(R){return arguments.length?(i=typeof R=="function"?R:rc(R),v):i},v.touchable=function(R){return arguments.length?(r=typeof R=="function"?R:rc(!!R),v):r},v.on=function(){var R=u.on.apply(u,arguments);return R===u?v:R},v.clickDistance=function(R){return arguments.length?(x=(R=+R)*R,v):Math.sqrt(x)},v}function wh(t,l,i){t.prototype=l.prototype=i,i.constructor=t}function mv(t,l){var i=Object.create(t.prototype);for(var r in l)i[r]=l[r];return i}function Br(){}var Er=.7,Mc=1/Er,ls="\\s*([+-]?\\d+)\\s*",Sr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ha="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",IA=/^#([0-9a-f]{3,8})$/,QA=new RegExp(`^rgb\\(${ls},${ls},${ls}\\)$`),KA=new RegExp(`^rgb\\(${ha},${ha},${ha}\\)$`),FA=new RegExp(`^rgba\\(${ls},${ls},${ls},${Sr}\\)$`),JA=new RegExp(`^rgba\\(${ha},${ha},${ha},${Sr}\\)$`),PA=new RegExp(`^hsl\\(${Sr},${ha},${ha}\\)$`),WA=new RegExp(`^hsla\\(${Sr},${ha},${ha},${Sr}\\)$`),Jp={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};wh(Br,mi,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Pp,formatHex:Pp,formatHex8:eC,formatHsl:tC,formatRgb:Wp,toString:Wp});function Pp(){return this.rgb().formatHex()}function eC(){return this.rgb().formatHex8()}function tC(){return gv(this).formatHsl()}function Wp(){return this.rgb().formatRgb()}function mi(t){var l,i;return t=(t+"").trim().toLowerCase(),(l=IA.exec(t))?(i=l[1].length,l=parseInt(l[1],16),i===6?ey(l):i===3?new En(l>>8&15|l>>4&240,l>>4&15|l&240,(l&15)<<4|l&15,1):i===8?oc(l>>24&255,l>>16&255,l>>8&255,(l&255)/255):i===4?oc(l>>12&15|l>>8&240,l>>8&15|l>>4&240,l>>4&15|l&240,((l&15)<<4|l&15)/255):null):(l=QA.exec(t))?new En(l[1],l[2],l[3],1):(l=KA.exec(t))?new En(l[1]*255/100,l[2]*255/100,l[3]*255/100,1):(l=FA.exec(t))?oc(l[1],l[2],l[3],l[4]):(l=JA.exec(t))?oc(l[1]*255/100,l[2]*255/100,l[3]*255/100,l[4]):(l=PA.exec(t))?ay(l[1],l[2]/100,l[3]/100,1):(l=WA.exec(t))?ay(l[1],l[2]/100,l[3]/100,l[4]):Jp.hasOwnProperty(t)?ey(Jp[t]):t==="transparent"?new En(NaN,NaN,NaN,0):null}function ey(t){return new En(t>>16&255,t>>8&255,t&255,1)}function oc(t,l,i,r){return r<=0&&(t=l=i=NaN),new En(t,l,i,r)}function nC(t){return t instanceof Br||(t=mi(t)),t?(t=t.rgb(),new En(t.r,t.g,t.b,t.opacity)):new En}function Jd(t,l,i,r){return arguments.length===1?nC(t):new En(t,l,i,r??1)}function En(t,l,i,r){this.r=+t,this.g=+l,this.b=+i,this.opacity=+r}wh(En,Jd,mv(Br,{brighter(t){return t=t==null?Mc:Math.pow(Mc,t),new En(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Er:Math.pow(Er,t),new En(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new En(ui(this.r),ui(this.g),ui(this.b),Tc(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:ty,formatHex:ty,formatHex8:aC,formatRgb:ny,toString:ny}));function ty(){return`#${ci(this.r)}${ci(this.g)}${ci(this.b)}`}function aC(){return`#${ci(this.r)}${ci(this.g)}${ci(this.b)}${ci((isNaN(this.opacity)?1:this.opacity)*255)}`}function ny(){const t=Tc(this.opacity);return`${t===1?"rgb(":"rgba("}${ui(this.r)}, ${ui(this.g)}, ${ui(this.b)}${t===1?")":`, ${t})`}`}function Tc(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ui(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ci(t){return t=ui(t),(t<16?"0":"")+t.toString(16)}function ay(t,l,i,r){return r<=0?t=l=i=NaN:i<=0||i>=1?t=l=NaN:l<=0&&(t=NaN),new ta(t,l,i,r)}function gv(t){if(t instanceof ta)return new ta(t.h,t.s,t.l,t.opacity);if(t instanceof Br||(t=mi(t)),!t)return new ta;if(t instanceof ta)return t;t=t.rgb();var l=t.r/255,i=t.g/255,r=t.b/255,o=Math.min(l,i,r),u=Math.max(l,i,r),f=NaN,m=u-o,g=(u+o)/2;return m?(l===u?f=(i-r)/m+(i<r)*6:i===u?f=(r-l)/m+2:f=(l-i)/m+4,m/=g<.5?u+o:2-u-o,f*=60):m=g>0&&g<1?0:f,new ta(f,m,g,t.opacity)}function lC(t,l,i,r){return arguments.length===1?gv(t):new ta(t,l,i,r??1)}function ta(t,l,i,r){this.h=+t,this.s=+l,this.l=+i,this.opacity=+r}wh(ta,lC,mv(Br,{brighter(t){return t=t==null?Mc:Math.pow(Mc,t),new ta(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Er:Math.pow(Er,t),new ta(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,l=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,r=i+(i<.5?i:1-i)*l,o=2*i-r;return new En(Ed(t>=240?t-240:t+120,o,r),Ed(t,o,r),Ed(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new ta(ly(this.h),cc(this.s),cc(this.l),Tc(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=Tc(this.opacity);return`${t===1?"hsl(":"hsla("}${ly(this.h)}, ${cc(this.s)*100}%, ${cc(this.l)*100}%${t===1?")":`, ${t})`}`}}));function ly(t){return t=(t||0)%360,t<0?t+360:t}function cc(t){return Math.max(0,Math.min(1,t||0))}function Ed(t,l,i){return(t<60?l+(i-l)*t/60:t<180?i:t<240?l+(i-l)*(240-t)/60:l)*255}const _h=t=>()=>t;function iC(t,l){return function(i){return t+i*l}}function sC(t,l,i){return t=Math.pow(t,i),l=Math.pow(l,i)-t,i=1/i,function(r){return Math.pow(t+r*l,i)}}function rC(t){return(t=+t)==1?pv:function(l,i){return i-l?sC(l,i,t):_h(isNaN(l)?i:l)}}function pv(t,l){var i=l-t;return i?iC(t,i):_h(isNaN(t)?l:t)}const Rc=(function t(l){var i=rC(l);function r(o,u){var f=i((o=Jd(o)).r,(u=Jd(u)).r),m=i(o.g,u.g),g=i(o.b,u.b),h=pv(o.opacity,u.opacity);return function(y){return o.r=f(y),o.g=m(y),o.b=g(y),o.opacity=h(y),o+""}}return r.gamma=t,r})(1);function oC(t,l){l||(l=[]);var i=t?Math.min(l.length,t.length):0,r=l.slice(),o;return function(u){for(o=0;o<i;++o)r[o]=t[o]*(1-u)+l[o]*u;return r}}function cC(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function uC(t,l){var i=l?l.length:0,r=t?Math.min(i,t.length):0,o=new Array(r),u=new Array(i),f;for(f=0;f<r;++f)o[f]=yr(t[f],l[f]);for(;f<i;++f)u[f]=l[f];return function(m){for(f=0;f<r;++f)u[f]=o[f](m);return u}}function fC(t,l){var i=new Date;return t=+t,l=+l,function(r){return i.setTime(t*(1-r)+l*r),i}}function fa(t,l){return t=+t,l=+l,function(i){return t*(1-i)+l*i}}function dC(t,l){var i={},r={},o;(t===null||typeof t!="object")&&(t={}),(l===null||typeof l!="object")&&(l={});for(o in l)o in t?i[o]=yr(t[o],l[o]):r[o]=l[o];return function(u){for(o in i)r[o]=i[o](u);return r}}var Pd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Sd=new RegExp(Pd.source,"g");function hC(t){return function(){return t}}function mC(t){return function(l){return t(l)+""}}function yv(t,l){var i=Pd.lastIndex=Sd.lastIndex=0,r,o,u,f=-1,m=[],g=[];for(t=t+"",l=l+"";(r=Pd.exec(t))&&(o=Sd.exec(l));)(u=o.index)>i&&(u=l.slice(i,u),m[f]?m[f]+=u:m[++f]=u),(r=r[0])===(o=o[0])?m[f]?m[f]+=o:m[++f]=o:(m[++f]=null,g.push({i:f,x:fa(r,o)})),i=Sd.lastIndex;return i<l.length&&(u=l.slice(i),m[f]?m[f]+=u:m[++f]=u),m.length<2?g[0]?mC(g[0].x):hC(l):(l=g.length,function(h){for(var y=0,x;y<l;++y)m[(x=g[y]).i]=x.x(h);return m.join("")})}function yr(t,l){var i=typeof l,r;return l==null||i==="boolean"?_h(l):(i==="number"?fa:i==="string"?(r=mi(l))?(l=r,Rc):yv:l instanceof mi?Rc:l instanceof Date?fC:cC(l)?oC:Array.isArray(l)?uC:typeof l.valueOf!="function"&&typeof l.toString!="function"||isNaN(l)?dC:fa)(t,l)}var iy=180/Math.PI,Wd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function xv(t,l,i,r,o,u){var f,m,g;return(f=Math.sqrt(t*t+l*l))&&(t/=f,l/=f),(g=t*i+l*r)&&(i-=t*g,r-=l*g),(m=Math.sqrt(i*i+r*r))&&(i/=m,r/=m,g/=m),t*r<l*i&&(t=-t,l=-l,g=-g,f=-f),{translateX:o,translateY:u,rotate:Math.atan2(l,t)*iy,skewX:Math.atan(g)*iy,scaleX:f,scaleY:m}}var uc;function gC(t){const l=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return l.isIdentity?Wd:xv(l.a,l.b,l.c,l.d,l.e,l.f)}function pC(t){return t==null||(uc||(uc=document.createElementNS("http://www.w3.org/2000/svg","g")),uc.setAttribute("transform",t),!(t=uc.transform.baseVal.consolidate()))?Wd:(t=t.matrix,xv(t.a,t.b,t.c,t.d,t.e,t.f))}function vv(t,l,i,r){function o(h){return h.length?h.pop()+" ":""}function u(h,y,x,v,w,S){if(h!==x||y!==v){var _=w.push("translate(",null,l,null,i);S.push({i:_-4,x:fa(h,x)},{i:_-2,x:fa(y,v)})}else(x||v)&&w.push("translate("+x+l+v+i)}function f(h,y,x,v){h!==y?(h-y>180?y+=360:y-h>180&&(h+=360),v.push({i:x.push(o(x)+"rotate(",null,r)-2,x:fa(h,y)})):y&&x.push(o(x)+"rotate("+y+r)}function m(h,y,x,v){h!==y?v.push({i:x.push(o(x)+"skewX(",null,r)-2,x:fa(h,y)}):y&&x.push(o(x)+"skewX("+y+r)}function g(h,y,x,v,w,S){if(h!==x||y!==v){var _=w.push(o(w)+"scale(",null,",",null,")");S.push({i:_-4,x:fa(h,x)},{i:_-2,x:fa(y,v)})}else(x!==1||v!==1)&&w.push(o(w)+"scale("+x+","+v+")")}return function(h,y){var x=[],v=[];return h=t(h),y=t(y),u(h.translateX,h.translateY,y.translateX,y.translateY,x,v),f(h.rotate,y.rotate,x,v),m(h.skewX,y.skewX,x,v),g(h.scaleX,h.scaleY,y.scaleX,y.scaleY,x,v),h=y=null,function(w){for(var S=-1,_=v.length,A;++S<_;)x[(A=v[S]).i]=A.x(w);return x.join("")}}}var yC=vv(gC,"px, ","px)","deg)"),xC=vv(pC,", ",")",")"),vC=1e-12;function sy(t){return((t=Math.exp(t))+1/t)/2}function bC(t){return((t=Math.exp(t))-1/t)/2}function EC(t){return((t=Math.exp(2*t))-1)/(t+1)}const bc=(function t(l,i,r){function o(u,f){var m=u[0],g=u[1],h=u[2],y=f[0],x=f[1],v=f[2],w=y-m,S=x-g,_=w*w+S*S,A,C;if(_<vC)C=Math.log(v/h)/l,A=function(B){return[m+B*w,g+B*S,h*Math.exp(l*B*C)]};else{var T=Math.sqrt(_),E=(v*v-h*h+r*_)/(2*h*i*T),R=(v*v-h*h-r*_)/(2*v*i*T),L=Math.log(Math.sqrt(E*E+1)-E),D=Math.log(Math.sqrt(R*R+1)-R);C=(D-L)/l,A=function(B){var Y=B*C,X=sy(L),ie=h/(i*T)*(X*EC(l*Y+L)-bC(L));return[m+ie*w,g+ie*S,h*X/sy(l*Y+L)]}}return A.duration=C*1e3*l/Math.SQRT2,A}return o.rho=function(u){var f=Math.max(.001,+u),m=f*f,g=m*m;return t(f,m,g)},o})(Math.SQRT2,2,4);var ss=0,mr=0,fr=0,bv=1e3,Oc,gr,zc=0,gi=0,Gc=0,wr=typeof performance=="object"&&performance.now?performance:Date,Ev=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Nh(){return gi||(Ev(SC),gi=wr.now()+Gc)}function SC(){gi=0}function jc(){this._call=this._time=this._next=null}jc.prototype=Sv.prototype={constructor:jc,restart:function(t,l,i){if(typeof t!="function")throw new TypeError("callback is not a function");i=(i==null?Nh():+i)+(l==null?0:+l),!this._next&&gr!==this&&(gr?gr._next=this:Oc=this,gr=this),this._call=t,this._time=i,eh()},stop:function(){this._call&&(this._call=null,this._time=1/0,eh())}};function Sv(t,l,i){var r=new jc;return r.restart(t,l,i),r}function wC(){Nh(),++ss;for(var t=Oc,l;t;)(l=gi-t._time)>=0&&t._call.call(void 0,l),t=t._next;--ss}function ry(){gi=(zc=wr.now())+Gc,ss=mr=0;try{wC()}finally{ss=0,NC(),gi=0}}function _C(){var t=wr.now(),l=t-zc;l>bv&&(Gc-=l,zc=t)}function NC(){for(var t,l=Oc,i,r=1/0;l;)l._call?(r>l._time&&(r=l._time),t=l,l=l._next):(i=l._next,l._next=null,l=t?t._next=i:Oc=i);gr=t,eh(r)}function eh(t){if(!ss){mr&&(mr=clearTimeout(mr));var l=t-gi;l>24?(t<1/0&&(mr=setTimeout(ry,t-wr.now()-Gc)),fr&&(fr=clearInterval(fr))):(fr||(zc=wr.now(),fr=setInterval(_C,bv)),ss=1,Ev(ry))}}function oy(t,l,i){var r=new jc;return l=l==null?0:+l,r.restart(o=>{r.stop(),t(o+l)},l,i),r}var AC=Yc("start","end","cancel","interrupt"),CC=[],wv=0,cy=1,th=2,Ec=3,uy=4,nh=5,Sc=6;function Xc(t,l,i,r,o,u){var f=t.__transition;if(!f)t.__transition={};else if(i in f)return;MC(t,i,{name:l,index:r,group:o,on:AC,tween:CC,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:wv})}function Ah(t,l){var i=ia(t,l);if(i.state>wv)throw new Error("too late; already scheduled");return i}function pa(t,l){var i=ia(t,l);if(i.state>Ec)throw new Error("too late; already running");return i}function ia(t,l){var i=t.__transition;if(!i||!(i=i[l]))throw new Error("transition not found");return i}function MC(t,l,i){var r=t.__transition,o;r[l]=i,i.timer=Sv(u,0,i.time);function u(h){i.state=cy,i.timer.restart(f,i.delay,i.time),i.delay<=h&&f(h-i.delay)}function f(h){var y,x,v,w;if(i.state!==cy)return g();for(y in r)if(w=r[y],w.name===i.name){if(w.state===Ec)return oy(f);w.state===uy?(w.state=Sc,w.timer.stop(),w.on.call("interrupt",t,t.__data__,w.index,w.group),delete r[y]):+y<l&&(w.state=Sc,w.timer.stop(),w.on.call("cancel",t,t.__data__,w.index,w.group),delete r[y])}if(oy(function(){i.state===Ec&&(i.state=uy,i.timer.restart(m,i.delay,i.time),m(h))}),i.state=th,i.on.call("start",t,t.__data__,i.index,i.group),i.state===th){for(i.state=Ec,o=new Array(v=i.tween.length),y=0,x=-1;y<v;++y)(w=i.tween[y].value.call(t,t.__data__,i.index,i.group))&&(o[++x]=w);o.length=x+1}}function m(h){for(var y=h<i.duration?i.ease.call(null,h/i.duration):(i.timer.restart(g),i.state=nh,1),x=-1,v=o.length;++x<v;)o[x].call(t,y);i.state===nh&&(i.on.call("end",t,t.__data__,i.index,i.group),g())}function g(){i.state=Sc,i.timer.stop(),delete r[l];for(var h in r)return;delete t.__transition}}function wc(t,l){var i=t.__transition,r,o,u=!0,f;if(i){l=l==null?null:l+"";for(f in i){if((r=i[f]).name!==l){u=!1;continue}o=r.state>th&&r.state<nh,r.state=Sc,r.timer.stop(),r.on.call(o?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete i[f]}u&&delete t.__transition}}function TC(t){return this.each(function(){wc(this,t)})}function RC(t,l){var i,r;return function(){var o=pa(this,t),u=o.tween;if(u!==i){r=i=u;for(var f=0,m=r.length;f<m;++f)if(r[f].name===l){r=r.slice(),r.splice(f,1);break}}o.tween=r}}function OC(t,l,i){var r,o;if(typeof i!="function")throw new Error;return function(){var u=pa(this,t),f=u.tween;if(f!==r){o=(r=f).slice();for(var m={name:l,value:i},g=0,h=o.length;g<h;++g)if(o[g].name===l){o[g]=m;break}g===h&&o.push(m)}u.tween=o}}function zC(t,l){var i=this._id;if(t+="",arguments.length<2){for(var r=ia(this.node(),i).tween,o=0,u=r.length,f;o<u;++o)if((f=r[o]).name===t)return f.value;return null}return this.each((l==null?RC:OC)(i,t,l))}function Ch(t,l,i){var r=t._id;return t.each(function(){var o=pa(this,r);(o.value||(o.value={}))[l]=i.apply(this,arguments)}),function(o){return ia(o,r).value[l]}}function _v(t,l){var i;return(typeof l=="number"?fa:l instanceof mi?Rc:(i=mi(l))?(l=i,Rc):yv)(t,l)}function jC(t){return function(){this.removeAttribute(t)}}function DC(t){return function(){this.removeAttributeNS(t.space,t.local)}}function kC(t,l,i){var r,o=i+"",u;return function(){var f=this.getAttribute(t);return f===o?null:f===r?u:u=l(r=f,i)}}function LC(t,l,i){var r,o=i+"",u;return function(){var f=this.getAttributeNS(t.space,t.local);return f===o?null:f===r?u:u=l(r=f,i)}}function HC(t,l,i){var r,o,u;return function(){var f,m=i(this),g;return m==null?void this.removeAttribute(t):(f=this.getAttribute(t),g=m+"",f===g?null:f===r&&g===o?u:(o=g,u=l(r=f,m)))}}function BC(t,l,i){var r,o,u;return function(){var f,m=i(this),g;return m==null?void this.removeAttributeNS(t.space,t.local):(f=this.getAttributeNS(t.space,t.local),g=m+"",f===g?null:f===r&&g===o?u:(o=g,u=l(r=f,m)))}}function UC(t,l){var i=qc(t),r=i==="transform"?xC:_v;return this.attrTween(t,typeof l=="function"?(i.local?BC:HC)(i,r,Ch(this,"attr."+t,l)):l==null?(i.local?DC:jC)(i):(i.local?LC:kC)(i,r,l))}function $C(t,l){return function(i){this.setAttribute(t,l.call(this,i))}}function VC(t,l){return function(i){this.setAttributeNS(t.space,t.local,l.call(this,i))}}function YC(t,l){var i,r;function o(){var u=l.apply(this,arguments);return u!==r&&(i=(r=u)&&VC(t,u)),i}return o._value=l,o}function qC(t,l){var i,r;function o(){var u=l.apply(this,arguments);return u!==r&&(i=(r=u)&&$C(t,u)),i}return o._value=l,o}function GC(t,l){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(l==null)return this.tween(i,null);if(typeof l!="function")throw new Error;var r=qc(t);return this.tween(i,(r.local?YC:qC)(r,l))}function XC(t,l){return function(){Ah(this,t).delay=+l.apply(this,arguments)}}function ZC(t,l){return l=+l,function(){Ah(this,t).delay=l}}function IC(t){var l=this._id;return arguments.length?this.each((typeof t=="function"?XC:ZC)(l,t)):ia(this.node(),l).delay}function QC(t,l){return function(){pa(this,t).duration=+l.apply(this,arguments)}}function KC(t,l){return l=+l,function(){pa(this,t).duration=l}}function FC(t){var l=this._id;return arguments.length?this.each((typeof t=="function"?QC:KC)(l,t)):ia(this.node(),l).duration}function JC(t,l){if(typeof l!="function")throw new Error;return function(){pa(this,t).ease=l}}function PC(t){var l=this._id;return arguments.length?this.each(JC(l,t)):ia(this.node(),l).ease}function WC(t,l){return function(){var i=l.apply(this,arguments);if(typeof i!="function")throw new Error;pa(this,t).ease=i}}function eM(t){if(typeof t!="function")throw new Error;return this.each(WC(this._id,t))}function tM(t){typeof t!="function"&&(t=tv(t));for(var l=this._groups,i=l.length,r=new Array(i),o=0;o<i;++o)for(var u=l[o],f=u.length,m=r[o]=[],g,h=0;h<f;++h)(g=u[h])&&t.call(g,g.__data__,h,u)&&m.push(g);return new Wa(r,this._parents,this._name,this._id)}function nM(t){if(t._id!==this._id)throw new Error;for(var l=this._groups,i=t._groups,r=l.length,o=i.length,u=Math.min(r,o),f=new Array(r),m=0;m<u;++m)for(var g=l[m],h=i[m],y=g.length,x=f[m]=new Array(y),v,w=0;w<y;++w)(v=g[w]||h[w])&&(x[w]=v);for(;m<r;++m)f[m]=l[m];return new Wa(f,this._parents,this._name,this._id)}function aM(t){return(t+"").trim().split(/^|\s+/).every(function(l){var i=l.indexOf(".");return i>=0&&(l=l.slice(0,i)),!l||l==="start"})}function lM(t,l,i){var r,o,u=aM(l)?Ah:pa;return function(){var f=u(this,t),m=f.on;m!==r&&(o=(r=m).copy()).on(l,i),f.on=o}}function iM(t,l){var i=this._id;return arguments.length<2?ia(this.node(),i).on.on(t):this.each(lM(i,t,l))}function sM(t){return function(){var l=this.parentNode;for(var i in this.__transition)if(+i!==t)return;l&&l.removeChild(this)}}function rM(){return this.on("end.remove",sM(this._id))}function oM(t){var l=this._name,i=this._id;typeof t!="function"&&(t=Eh(t));for(var r=this._groups,o=r.length,u=new Array(o),f=0;f<o;++f)for(var m=r[f],g=m.length,h=u[f]=new Array(g),y,x,v=0;v<g;++v)(y=m[v])&&(x=t.call(y,y.__data__,v,m))&&("__data__"in y&&(x.__data__=y.__data__),h[v]=x,Xc(h[v],l,i,v,h,ia(y,i)));return new Wa(u,this._parents,l,i)}function cM(t){var l=this._name,i=this._id;typeof t!="function"&&(t=ev(t));for(var r=this._groups,o=r.length,u=[],f=[],m=0;m<o;++m)for(var g=r[m],h=g.length,y,x=0;x<h;++x)if(y=g[x]){for(var v=t.call(y,y.__data__,x,g),w,S=ia(y,i),_=0,A=v.length;_<A;++_)(w=v[_])&&Xc(w,l,i,_,v,S);u.push(v),f.push(y)}return new Wa(u,f,l,i)}var uM=Hr.prototype.constructor;function fM(){return new uM(this._groups,this._parents)}function dM(t,l){var i,r,o;return function(){var u=is(this,t),f=(this.style.removeProperty(t),is(this,t));return u===f?null:u===i&&f===r?o:o=l(i=u,r=f)}}function Nv(t){return function(){this.style.removeProperty(t)}}function hM(t,l,i){var r,o=i+"",u;return function(){var f=is(this,t);return f===o?null:f===r?u:u=l(r=f,i)}}function mM(t,l,i){var r,o,u;return function(){var f=is(this,t),m=i(this),g=m+"";return m==null&&(g=m=(this.style.removeProperty(t),is(this,t))),f===g?null:f===r&&g===o?u:(o=g,u=l(r=f,m))}}function gM(t,l){var i,r,o,u="style."+l,f="end."+u,m;return function(){var g=pa(this,t),h=g.on,y=g.value[u]==null?m||(m=Nv(l)):void 0;(h!==i||o!==y)&&(r=(i=h).copy()).on(f,o=y),g.on=r}}function pM(t,l,i){var r=(t+="")=="transform"?yC:_v;return l==null?this.styleTween(t,dM(t,r)).on("end.style."+t,Nv(t)):typeof l=="function"?this.styleTween(t,mM(t,r,Ch(this,"style."+t,l))).each(gM(this._id,t)):this.styleTween(t,hM(t,r,l),i).on("end.style."+t,null)}function yM(t,l,i){return function(r){this.style.setProperty(t,l.call(this,r),i)}}function xM(t,l,i){var r,o;function u(){var f=l.apply(this,arguments);return f!==o&&(r=(o=f)&&yM(t,f,i)),r}return u._value=l,u}function vM(t,l,i){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(l==null)return this.tween(r,null);if(typeof l!="function")throw new Error;return this.tween(r,xM(t,l,i??""))}function bM(t){return function(){this.textContent=t}}function EM(t){return function(){var l=t(this);this.textContent=l??""}}function SM(t){return this.tween("text",typeof t=="function"?EM(Ch(this,"text",t)):bM(t==null?"":t+""))}function wM(t){return function(l){this.textContent=t.call(this,l)}}function _M(t){var l,i;function r(){var o=t.apply(this,arguments);return o!==i&&(l=(i=o)&&wM(o)),l}return r._value=t,r}function NM(t){var l="text";if(arguments.length<1)return(l=this.tween(l))&&l._value;if(t==null)return this.tween(l,null);if(typeof t!="function")throw new Error;return this.tween(l,_M(t))}function AM(){for(var t=this._name,l=this._id,i=Av(),r=this._groups,o=r.length,u=0;u<o;++u)for(var f=r[u],m=f.length,g,h=0;h<m;++h)if(g=f[h]){var y=ia(g,l);Xc(g,t,i,h,f,{time:y.time+y.delay+y.duration,delay:0,duration:y.duration,ease:y.ease})}return new Wa(r,this._parents,t,i)}function CM(){var t,l,i=this,r=i._id,o=i.size();return new Promise(function(u,f){var m={value:f},g={value:function(){--o===0&&u()}};i.each(function(){var h=pa(this,r),y=h.on;y!==t&&(l=(t=y).copy(),l._.cancel.push(m),l._.interrupt.push(m),l._.end.push(g)),h.on=l}),o===0&&u()})}var MM=0;function Wa(t,l,i,r){this._groups=t,this._parents=l,this._name=i,this._id=r}function Av(){return++MM}var Xa=Hr.prototype;Wa.prototype={constructor:Wa,select:oM,selectAll:cM,selectChild:Xa.selectChild,selectChildren:Xa.selectChildren,filter:tM,merge:nM,selection:fM,transition:AM,call:Xa.call,nodes:Xa.nodes,node:Xa.node,size:Xa.size,empty:Xa.empty,each:Xa.each,on:iM,attr:UC,attrTween:GC,style:pM,styleTween:vM,text:SM,textTween:NM,remove:rM,tween:zC,delay:IC,duration:FC,ease:PC,easeVarying:eM,end:CM,[Symbol.iterator]:Xa[Symbol.iterator]};function TM(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var RM={time:null,delay:0,duration:250,ease:TM};function OM(t,l){for(var i;!(i=t.__transition)||!(i=i[l]);)if(!(t=t.parentNode))throw new Error(`transition ${l} not found`);return i}function zM(t){var l,i;t instanceof Wa?(l=t._id,t=t._name):(l=Av(),(i=RM).time=Nh(),t=t==null?null:t+"");for(var r=this._groups,o=r.length,u=0;u<o;++u)for(var f=r[u],m=f.length,g,h=0;h<m;++h)(g=f[h])&&Xc(g,t,l,h,f,i||OM(g,l));return new Wa(r,this._parents,t,l)}Hr.prototype.interrupt=TC;Hr.prototype.transition=zM;const fc=t=>()=>t;function jM(t,{sourceEvent:l,target:i,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:l,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Ka(t,l,i){this.k=t,this.x=l,this.y=i}Ka.prototype={constructor:Ka,scale:function(t){return t===1?this:new Ka(this.k*t,this.x,this.y)},translate:function(t,l){return t===0&l===0?this:new Ka(this.k,this.x+this.k*t,this.y+this.k*l)},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 Zc=new Ka(1,0,0);Cv.prototype=Ka.prototype;function Cv(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Zc;return t.__zoom}function wd(t){t.stopImmediatePropagation()}function dr(t){t.preventDefault(),t.stopImmediatePropagation()}function DM(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function kM(){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 fy(){return this.__zoom||Zc}function LM(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function HM(){return navigator.maxTouchPoints||"ontouchstart"in this}function BM(t,l,i){var r=t.invertX(l[0][0])-i[0][0],o=t.invertX(l[1][0])-i[1][0],u=t.invertY(l[0][1])-i[0][1],f=t.invertY(l[1][1])-i[1][1];return t.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),f>u?(u+f)/2:Math.min(0,u)||Math.max(0,f))}function Mv(){var t=DM,l=kM,i=BM,r=LM,o=HM,u=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],m=250,g=bc,h=Yc("start","zoom","end"),y,x,v,w=500,S=150,_=0,A=10;function C(k){k.property("__zoom",fy).on("wheel.zoom",Y,{passive:!1}).on("mousedown.zoom",X).on("dblclick.zoom",ie).filter(o).on("touchstart.zoom",Z).on("touchmove.zoom",K).on("touchend.zoom touchcancel.zoom",ae).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}C.transform=function(k,I,M,U){var j=k.selection?k.selection():k;j.property("__zoom",fy),k!==j?L(k,I,M,U):j.interrupt().each(function(){D(this,arguments).event(U).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},C.scaleBy=function(k,I,M,U){C.scaleTo(k,function(){var j=this.__zoom.k,q=typeof I=="function"?I.apply(this,arguments):I;return j*q},M,U)},C.scaleTo=function(k,I,M,U){C.transform(k,function(){var j=l.apply(this,arguments),q=this.__zoom,te=M==null?R(j):typeof M=="function"?M.apply(this,arguments):M,O=q.invert(te),H=typeof I=="function"?I.apply(this,arguments):I;return i(E(T(q,H),te,O),j,f)},M,U)},C.translateBy=function(k,I,M,U){C.transform(k,function(){return i(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof M=="function"?M.apply(this,arguments):M),l.apply(this,arguments),f)},null,U)},C.translateTo=function(k,I,M,U,j){C.transform(k,function(){var q=l.apply(this,arguments),te=this.__zoom,O=U==null?R(q):typeof U=="function"?U.apply(this,arguments):U;return i(Zc.translate(O[0],O[1]).scale(te.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof M=="function"?-M.apply(this,arguments):-M),q,f)},U,j)};function T(k,I){return I=Math.max(u[0],Math.min(u[1],I)),I===k.k?k:new Ka(I,k.x,k.y)}function E(k,I,M){var U=I[0]-M[0]*k.k,j=I[1]-M[1]*k.k;return U===k.x&&j===k.y?k:new Ka(k.k,U,j)}function R(k){return[(+k[0][0]+ +k[1][0])/2,(+k[0][1]+ +k[1][1])/2]}function L(k,I,M,U){k.on("start.zoom",function(){D(this,arguments).event(U).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(U).end()}).tween("zoom",function(){var j=this,q=arguments,te=D(j,q).event(U),O=l.apply(j,q),H=M==null?R(O):typeof M=="function"?M.apply(j,q):M,Q=Math.max(O[1][0]-O[0][0],O[1][1]-O[0][1]),J=j.__zoom,ce=typeof I=="function"?I.apply(j,q):I,he=g(J.invert(H).concat(Q/J.k),ce.invert(H).concat(Q/ce.k));return function(re){if(re===1)re=ce;else{var fe=he(re),me=Q/fe[2];re=new Ka(me,H[0]-fe[0]*me,H[1]-fe[1]*me)}te.zoom(null,re)}})}function D(k,I,M){return!M&&k.__zooming||new B(k,I)}function B(k,I){this.that=k,this.args=I,this.active=0,this.sourceEvent=null,this.extent=l.apply(k,I),this.taps=0}B.prototype={event:function(k){return k&&(this.sourceEvent=k),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(k,I){return this.mouse&&k!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&k!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&k!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(k){var I=Tn(this.that).datum();h.call(k,this.that,new jM(k,{sourceEvent:this.sourceEvent,target:C,transform:this.that.__zoom,dispatch:h}),I)}};function Y(k,...I){if(!t.apply(this,arguments))return;var M=D(this,I).event(k),U=this.__zoom,j=Math.max(u[0],Math.min(u[1],U.k*Math.pow(2,r.apply(this,arguments)))),q=ea(k);if(M.wheel)(M.mouse[0][0]!==q[0]||M.mouse[0][1]!==q[1])&&(M.mouse[1]=U.invert(M.mouse[0]=q)),clearTimeout(M.wheel);else{if(U.k===j)return;M.mouse=[q,U.invert(q)],wc(this),M.start()}dr(k),M.wheel=setTimeout(te,S),M.zoom("mouse",i(E(T(U,j),M.mouse[0],M.mouse[1]),M.extent,f));function te(){M.wheel=null,M.end()}}function X(k,...I){if(v||!t.apply(this,arguments))return;var M=k.currentTarget,U=D(this,I,!0).event(k),j=Tn(k.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",Q,!0),q=ea(k,M),te=k.clientX,O=k.clientY;fv(k.view),wd(k),U.mouse=[q,this.__zoom.invert(q)],wc(this),U.start();function H(J){if(dr(J),!U.moved){var ce=J.clientX-te,he=J.clientY-O;U.moved=ce*ce+he*he>_}U.event(J).zoom("mouse",i(E(U.that.__zoom,U.mouse[0]=ea(J,M),U.mouse[1]),U.extent,f))}function Q(J){j.on("mousemove.zoom mouseup.zoom",null),dv(J.view,U.moved),dr(J),U.event(J).end()}}function ie(k,...I){if(t.apply(this,arguments)){var M=this.__zoom,U=ea(k.changedTouches?k.changedTouches[0]:k,this),j=M.invert(U),q=M.k*(k.shiftKey?.5:2),te=i(E(T(M,q),U,j),l.apply(this,I),f);dr(k),m>0?Tn(this).transition().duration(m).call(L,te,U,k):Tn(this).call(C.transform,te,U,k)}}function Z(k,...I){if(t.apply(this,arguments)){var M=k.touches,U=M.length,j=D(this,I,k.changedTouches.length===U).event(k),q,te,O,H;for(wd(k),te=0;te<U;++te)O=M[te],H=ea(O,this),H=[H,this.__zoom.invert(H),O.identifier],j.touch0?!j.touch1&&j.touch0[2]!==H[2]&&(j.touch1=H,j.taps=0):(j.touch0=H,q=!0,j.taps=1+!!y);y&&(y=clearTimeout(y)),q&&(j.taps<2&&(x=H[0],y=setTimeout(function(){y=null},w)),wc(this),j.start())}}function K(k,...I){if(this.__zooming){var M=D(this,I).event(k),U=k.changedTouches,j=U.length,q,te,O,H;for(dr(k),q=0;q<j;++q)te=U[q],O=ea(te,this),M.touch0&&M.touch0[2]===te.identifier?M.touch0[0]=O:M.touch1&&M.touch1[2]===te.identifier&&(M.touch1[0]=O);if(te=M.that.__zoom,M.touch1){var Q=M.touch0[0],J=M.touch0[1],ce=M.touch1[0],he=M.touch1[1],re=(re=ce[0]-Q[0])*re+(re=ce[1]-Q[1])*re,fe=(fe=he[0]-J[0])*fe+(fe=he[1]-J[1])*fe;te=T(te,Math.sqrt(re/fe)),O=[(Q[0]+ce[0])/2,(Q[1]+ce[1])/2],H=[(J[0]+he[0])/2,(J[1]+he[1])/2]}else if(M.touch0)O=M.touch0[0],H=M.touch0[1];else return;M.zoom("touch",i(E(te,O,H),M.extent,f))}}function ae(k,...I){if(this.__zooming){var M=D(this,I).event(k),U=k.changedTouches,j=U.length,q,te;for(wd(k),v&&clearTimeout(v),v=setTimeout(function(){v=null},w),q=0;q<j;++q)te=U[q],M.touch0&&M.touch0[2]===te.identifier?delete M.touch0:M.touch1&&M.touch1[2]===te.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(te=ea(te,this),Math.hypot(x[0]-te[0],x[1]-te[1])<A)){var O=Tn(this).on("dblclick.zoom");O&&O.apply(this,arguments)}}}return C.wheelDelta=function(k){return arguments.length?(r=typeof k=="function"?k:fc(+k),C):r},C.filter=function(k){return arguments.length?(t=typeof k=="function"?k:fc(!!k),C):t},C.touchable=function(k){return arguments.length?(o=typeof k=="function"?k:fc(!!k),C):o},C.extent=function(k){return arguments.length?(l=typeof k=="function"?k:fc([[+k[0][0],+k[0][1]],[+k[1][0],+k[1][1]]]),C):l},C.scaleExtent=function(k){return arguments.length?(u[0]=+k[0],u[1]=+k[1],C):[u[0],u[1]]},C.translateExtent=function(k){return arguments.length?(f[0][0]=+k[0][0],f[1][0]=+k[1][0],f[0][1]=+k[0][1],f[1][1]=+k[1][1],C):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},C.constrain=function(k){return arguments.length?(i=k,C):i},C.duration=function(k){return arguments.length?(m=+k,C):m},C.interpolate=function(k){return arguments.length?(g=k,C):g},C.on=function(){var k=h.on.apply(h,arguments);return k===h?C:k},C.clickDistance=function(k){return arguments.length?(_=(k=+k)*k,C):Math.sqrt(_)},C.tapDistance=function(k){return arguments.length?(A=+k,C):A},C}const ma={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:l,sourceHandle:i,targetHandle:r})=>`Couldn't create edge for ${t} handle id: "${t==="source"?i:r}", edge id: ${l}.`,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."},_r=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Tv=["Enter"," ","Escape"],Rv={"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:l,y:i})=>`Moved selected node ${t}. New position, x: ${l}, y: ${i}`,"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 rs;(function(t){t.Strict="strict",t.Loose="loose"})(rs||(rs={}));var fi;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(fi||(fi={}));var Nr;(function(t){t.Partial="partial",t.Full="full"})(Nr||(Nr={}));const Ov={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Ll;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Ll||(Ll={}));var Ar;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(Ar||(Ar={}));var Te;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(Te||(Te={}));const dy={[Te.Left]:Te.Right,[Te.Right]:Te.Left,[Te.Top]:Te.Bottom,[Te.Bottom]:Te.Top};function zv(t){return t===null?null:t?"valid":"invalid"}const jv=t=>"id"in t&&"source"in t&&"target"in t,UM=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),Mh=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),Ur=(t,l=[0,0])=>{const{width:i,height:r}=tl(t),o=t.origin??l,u=i*o[0],f=r*o[1];return{x:t.position.x-u,y:t.position.y-f}},$M=(t,l={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const i=t.reduce((r,o)=>{const u=typeof o=="string";let f=!l.nodeLookup&&!u?o:void 0;l.nodeLookup&&(f=u?l.nodeLookup.get(o):Mh(o)?o:l.nodeLookup.get(o.id));const m=f?Dc(f,l.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ic(r,m)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Qc(i)},$r=(t,l={})=>{let i={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return t.forEach(o=>{(l.filter===void 0||l.filter(o))&&(i=Ic(i,Dc(o)),r=!0)}),r?Qc(i):{x:0,y:0,width:0,height:0}},Th=(t,l,[i,r,o]=[0,0,1],u=!1,f=!1)=>{const m={...Yr(l,[i,r,o]),width:l.width/o,height:l.height/o},g=[];for(const h of t.values()){const{measured:y,selectable:x=!0,hidden:v=!1}=h;if(f&&!x||v)continue;const w=y.width??h.width??h.initialWidth??null,S=y.height??h.height??h.initialHeight??null,_=Cr(m,cs(h)),A=(w??0)*(S??0),C=u&&_>0;(!h.internals.handleBounds||C||_>=A||h.dragging)&&g.push(h)}return g},VM=(t,l)=>{const i=new Set;return t.forEach(r=>{i.add(r.id)}),l.filter(r=>i.has(r.source)||i.has(r.target))};function YM(t,l){const i=new Map,r=l?.nodes?new Set(l.nodes.map(o=>o.id)):null;return t.forEach(o=>{o.measured.width&&o.measured.height&&(l?.includeHiddenNodes||!o.hidden)&&(!r||r.has(o.id))&&i.set(o.id,o)}),i}async function qM({nodes:t,width:l,height:i,panZoom:r,minZoom:o,maxZoom:u},f){if(t.size===0)return Promise.resolve(!0);const m=YM(t,f),g=$r(m),h=Rh(g,l,i,f?.minZoom??o,f?.maxZoom??u,f?.padding??.1);return await r.setViewport(h,{duration:f?.duration,ease:f?.ease,interpolate:f?.interpolate}),Promise.resolve(!0)}function Dv({nodeId:t,nextPosition:l,nodeLookup:i,nodeOrigin:r=[0,0],nodeExtent:o,onError:u}){const f=i.get(t),m=f.parentId?i.get(f.parentId):void 0,{x:g,y:h}=m?m.internals.positionAbsolute:{x:0,y:0},y=f.origin??r;let x=f.extent||o;if(f.extent==="parent"&&!f.expandParent)if(!m)u?.("005",ma.error005());else{const w=m.measured.width,S=m.measured.height;w&&S&&(x=[[g,h],[g+w,h+S]])}else m&&us(f.extent)&&(x=[[f.extent[0][0]+g,f.extent[0][1]+h],[f.extent[1][0]+g,f.extent[1][1]+h]]);const v=us(x)?pi(l,x,f.measured):l;return(f.measured.width===void 0||f.measured.height===void 0)&&u?.("015",ma.error015()),{position:{x:v.x-g+(f.measured.width??0)*y[0],y:v.y-h+(f.measured.height??0)*y[1]},positionAbsolute:v}}async function GM({nodesToRemove:t=[],edgesToRemove:l=[],nodes:i,edges:r,onBeforeDelete:o}){const u=new Set(t.map(v=>v.id)),f=[];for(const v of i){if(v.deletable===!1)continue;const w=u.has(v.id),S=!w&&v.parentId&&f.find(_=>_.id===v.parentId);(w||S)&&f.push(v)}const m=new Set(l.map(v=>v.id)),g=r.filter(v=>v.deletable!==!1),y=VM(f,g);for(const v of g)m.has(v.id)&&!y.find(S=>S.id===v.id)&&y.push(v);if(!o)return{edges:y,nodes:f};const x=await o({nodes:f,edges:y});return typeof x=="boolean"?x?{edges:y,nodes:f}:{edges:[],nodes:[]}:x}const os=(t,l=0,i=1)=>Math.min(Math.max(t,l),i),pi=(t={x:0,y:0},l,i)=>({x:os(t.x,l[0][0],l[1][0]-(i?.width??0)),y:os(t.y,l[0][1],l[1][1]-(i?.height??0))});function kv(t,l,i){const{width:r,height:o}=tl(i),{x:u,y:f}=i.internals.positionAbsolute;return pi(t,[[u,f],[u+r,f+o]],l)}const hy=(t,l,i)=>t<l?os(Math.abs(t-l),1,l)/l:t>i?-os(Math.abs(t-i),1,l)/l:0,Lv=(t,l,i=15,r=40)=>{const o=hy(t.x,r,l.width-r)*i,u=hy(t.y,r,l.height-r)*i;return[o,u]},Ic=(t,l)=>({x:Math.min(t.x,l.x),y:Math.min(t.y,l.y),x2:Math.max(t.x2,l.x2),y2:Math.max(t.y2,l.y2)}),ah=({x:t,y:l,width:i,height:r})=>({x:t,y:l,x2:t+i,y2:l+r}),Qc=({x:t,y:l,x2:i,y2:r})=>({x:t,y:l,width:i-t,height:r-l}),cs=(t,l=[0,0])=>{const{x:i,y:r}=Mh(t)?t.internals.positionAbsolute:Ur(t,l);return{x:i,y:r,width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}},Dc=(t,l=[0,0])=>{const{x:i,y:r}=Mh(t)?t.internals.positionAbsolute:Ur(t,l);return{x:i,y:r,x2:i+(t.measured?.width??t.width??t.initialWidth??0),y2:r+(t.measured?.height??t.height??t.initialHeight??0)}},Hv=(t,l)=>Qc(Ic(ah(t),ah(l))),Cr=(t,l)=>{const i=Math.max(0,Math.min(t.x+t.width,l.x+l.width)-Math.max(t.x,l.x)),r=Math.max(0,Math.min(t.y+t.height,l.y+l.height)-Math.max(t.y,l.y));return Math.ceil(i*r)},my=t=>na(t.width)&&na(t.height)&&na(t.x)&&na(t.y),na=t=>!isNaN(t)&&isFinite(t),XM=(t,l)=>{},Vr=(t,l=[1,1])=>({x:l[0]*Math.round(t.x/l[0]),y:l[1]*Math.round(t.y/l[1])}),Yr=({x:t,y:l},[i,r,o],u=!1,f=[1,1])=>{const m={x:(t-i)/o,y:(l-r)/o};return u?Vr(m,f):m},kc=({x:t,y:l},[i,r,o])=>({x:t*o+i,y:l*o+r});function Wi(t,l){if(typeof t=="number")return Math.floor((l-l/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const i=parseFloat(t);if(!Number.isNaN(i))return Math.floor(i)}if(typeof t=="string"&&t.endsWith("%")){const i=parseFloat(t);if(!Number.isNaN(i))return Math.floor(l*i*.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 ZM(t,l,i){if(typeof t=="string"||typeof t=="number"){const r=Wi(t,i),o=Wi(t,l);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof t=="object"){const r=Wi(t.top??t.y??0,i),o=Wi(t.bottom??t.y??0,i),u=Wi(t.left??t.x??0,l),f=Wi(t.right??t.x??0,l);return{top:r,right:f,bottom:o,left:u,x:u+f,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function IM(t,l,i,r,o,u){const{x:f,y:m}=kc(t,[l,i,r]),{x:g,y:h}=kc({x:t.x+t.width,y:t.y+t.height},[l,i,r]),y=o-g,x=u-h;return{left:Math.floor(f),top:Math.floor(m),right:Math.floor(y),bottom:Math.floor(x)}}const Rh=(t,l,i,r,o,u)=>{const f=ZM(u,l,i),m=(l-f.x)/t.width,g=(i-f.y)/t.height,h=Math.min(m,g),y=os(h,r,o),x=t.x+t.width/2,v=t.y+t.height/2,w=l/2-x*y,S=i/2-v*y,_=IM(t,w,S,y,l,i),A={left:Math.min(_.left-f.left,0),top:Math.min(_.top-f.top,0),right:Math.min(_.right-f.right,0),bottom:Math.min(_.bottom-f.bottom,0)};return{x:w-A.left+A.right,y:S-A.top+A.bottom,zoom:y}},Mr=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function us(t){return t!=null&&t!=="parent"}function tl(t){return{width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}}function Bv(t){return(t.measured?.width??t.width??t.initialWidth)!==void 0&&(t.measured?.height??t.height??t.initialHeight)!==void 0}function Uv(t,l={width:0,height:0},i,r,o){const u={...t},f=r.get(i);if(f){const m=f.origin||o;u.x+=f.internals.positionAbsolute.x-(l.width??0)*m[0],u.y+=f.internals.positionAbsolute.y-(l.height??0)*m[1]}return u}function gy(t,l){if(t.size!==l.size)return!1;for(const i of t)if(!l.has(i))return!1;return!0}function QM(){let t,l;return{promise:new Promise((r,o)=>{t=r,l=o}),resolve:t,reject:l}}function KM(t){return{...Rv,...t||{}}}function xr(t,{snapGrid:l=[0,0],snapToGrid:i=!1,transform:r,containerBounds:o}){const{x:u,y:f}=aa(t),m=Yr({x:u-(o?.left??0),y:f-(o?.top??0)},r),{x:g,y:h}=i?Vr(m,l):m;return{xSnapped:g,ySnapped:h,...m}}const Oh=t=>({width:t.offsetWidth,height:t.offsetHeight}),$v=t=>t?.getRootNode?.()||window?.document,FM=["INPUT","SELECT","TEXTAREA"];function Vv(t){const l=t.composedPath?.()?.[0]||t.target;return l?.nodeType!==1?!1:FM.includes(l.nodeName)||l.hasAttribute("contenteditable")||!!l.closest(".nokey")}const Yv=t=>"clientX"in t,aa=(t,l)=>{const i=Yv(t),r=i?t.clientX:t.touches?.[0].clientX,o=i?t.clientY:t.touches?.[0].clientY;return{x:r-(l?.left??0),y:o-(l?.top??0)}},py=(t,l,i,r,o)=>{const u=l.querySelectorAll(`.${t}`);return!u||!u.length?null:Array.from(u).map(f=>{const m=f.getBoundingClientRect();return{id:f.getAttribute("data-handleid"),type:t,nodeId:o,position:f.getAttribute("data-handlepos"),x:(m.left-i.left)/r,y:(m.top-i.top)/r,...Oh(f)}})};function qv({sourceX:t,sourceY:l,targetX:i,targetY:r,sourceControlX:o,sourceControlY:u,targetControlX:f,targetControlY:m}){const g=t*.125+o*.375+f*.375+i*.125,h=l*.125+u*.375+m*.375+r*.125,y=Math.abs(g-t),x=Math.abs(h-l);return[g,h,y,x]}function dc(t,l){return t>=0?.5*t:l*25*Math.sqrt(-t)}function yy({pos:t,x1:l,y1:i,x2:r,y2:o,c:u}){switch(t){case Te.Left:return[l-dc(l-r,u),i];case Te.Right:return[l+dc(r-l,u),i];case Te.Top:return[l,i-dc(i-o,u)];case Te.Bottom:return[l,i+dc(o-i,u)]}}function Gv({sourceX:t,sourceY:l,sourcePosition:i=Te.Bottom,targetX:r,targetY:o,targetPosition:u=Te.Top,curvature:f=.25}){const[m,g]=yy({pos:i,x1:t,y1:l,x2:r,y2:o,c:f}),[h,y]=yy({pos:u,x1:r,y1:o,x2:t,y2:l,c:f}),[x,v,w,S]=qv({sourceX:t,sourceY:l,targetX:r,targetY:o,sourceControlX:m,sourceControlY:g,targetControlX:h,targetControlY:y});return[`M${t},${l} C${m},${g} ${h},${y} ${r},${o}`,x,v,w,S]}function Xv({sourceX:t,sourceY:l,targetX:i,targetY:r}){const o=Math.abs(i-t)/2,u=i<t?i+o:i-o,f=Math.abs(r-l)/2,m=r<l?r+f:r-f;return[u,m,o,f]}function JM({sourceNode:t,targetNode:l,selected:i=!1,zIndex:r=0,elevateOnSelect:o=!1,zIndexMode:u="basic"}){if(u==="manual")return r;const f=o&&i?r+1e3:r,m=Math.max(t.parentId||o&&t.selected?t.internals.z:0,l.parentId||o&&l.selected?l.internals.z:0);return f+m}function PM({sourceNode:t,targetNode:l,width:i,height:r,transform:o}){const u=Ic(Dc(t),Dc(l));u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const f={x:-o[0]/o[2],y:-o[1]/o[2],width:i/o[2],height:r/o[2]};return Cr(f,Qc(u))>0}const WM=({source:t,sourceHandle:l,target:i,targetHandle:r})=>`xy-edge__${t}${l||""}-${i}${r||""}`,eT=(t,l)=>l.some(i=>i.source===t.source&&i.target===t.target&&(i.sourceHandle===t.sourceHandle||!i.sourceHandle&&!t.sourceHandle)&&(i.targetHandle===t.targetHandle||!i.targetHandle&&!t.targetHandle)),tT=(t,l,i={})=>{if(!t.source||!t.target)return l;const r=i.getEdgeId||WM;let o;return jv(t)?o={...t}:o={...t,id:r(t)},eT(o,l)?l:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,l.concat(o))};function Zv({sourceX:t,sourceY:l,targetX:i,targetY:r}){const[o,u,f,m]=Xv({sourceX:t,sourceY:l,targetX:i,targetY:r});return[`M ${t},${l}L ${i},${r}`,o,u,f,m]}const xy={[Te.Left]:{x:-1,y:0},[Te.Right]:{x:1,y:0},[Te.Top]:{x:0,y:-1},[Te.Bottom]:{x:0,y:1}},nT=({source:t,sourcePosition:l=Te.Bottom,target:i})=>l===Te.Left||l===Te.Right?t.x<i.x?{x:1,y:0}:{x:-1,y:0}:t.y<i.y?{x:0,y:1}:{x:0,y:-1},vy=(t,l)=>Math.sqrt(Math.pow(l.x-t.x,2)+Math.pow(l.y-t.y,2));function aT({source:t,sourcePosition:l=Te.Bottom,target:i,targetPosition:r=Te.Top,center:o,offset:u,stepPosition:f}){const m=xy[l],g=xy[r],h={x:t.x+m.x*u,y:t.y+m.y*u},y={x:i.x+g.x*u,y:i.y+g.y*u},x=nT({source:h,sourcePosition:l,target:y}),v=x.x!==0?"x":"y",w=x[v];let S=[],_,A;const C={x:0,y:0},T={x:0,y:0},[,,E,R]=Xv({sourceX:t.x,sourceY:t.y,targetX:i.x,targetY:i.y});if(m[v]*g[v]===-1){v==="x"?(_=o.x??h.x+(y.x-h.x)*f,A=o.y??(h.y+y.y)/2):(_=o.x??(h.x+y.x)/2,A=o.y??h.y+(y.y-h.y)*f);const D=[{x:_,y:h.y},{x:_,y:y.y}],B=[{x:h.x,y:A},{x:y.x,y:A}];m[v]===w?S=v==="x"?D:B:S=v==="x"?B:D}else{const D=[{x:h.x,y:y.y}],B=[{x:y.x,y:h.y}];if(v==="x"?S=m.x===w?B:D:S=m.y===w?D:B,l===r){const K=Math.abs(t[v]-i[v]);if(K<=u){const ae=Math.min(u-1,u-K);m[v]===w?C[v]=(h[v]>t[v]?-1:1)*ae:T[v]=(y[v]>i[v]?-1:1)*ae}}if(l!==r){const K=v==="x"?"y":"x",ae=m[v]===g[K],k=h[K]>y[K],I=h[K]<y[K];(m[v]===1&&(!ae&&k||ae&&I)||m[v]!==1&&(!ae&&I||ae&&k))&&(S=v==="x"?D:B)}const Y={x:h.x+C.x,y:h.y+C.y},X={x:y.x+T.x,y:y.y+T.y},ie=Math.max(Math.abs(Y.x-S[0].x),Math.abs(X.x-S[0].x)),Z=Math.max(Math.abs(Y.y-S[0].y),Math.abs(X.y-S[0].y));ie>=Z?(_=(Y.x+X.x)/2,A=S[0].y):(_=S[0].x,A=(Y.y+X.y)/2)}return[[t,{x:h.x+C.x,y:h.y+C.y},...S,{x:y.x+T.x,y:y.y+T.y},i],_,A,E,R]}function lT(t,l,i,r){const o=Math.min(vy(t,l)/2,vy(l,i)/2,r),{x:u,y:f}=l;if(t.x===u&&u===i.x||t.y===f&&f===i.y)return`L${u} ${f}`;if(t.y===f){const h=t.x<i.x?-1:1,y=t.y<i.y?1:-1;return`L ${u+o*h},${f}Q ${u},${f} ${u},${f+o*y}`}const m=t.x<i.x?1:-1,g=t.y<i.y?-1:1;return`L ${u},${f+o*g}Q ${u},${f} ${u+o*m},${f}`}function lh({sourceX:t,sourceY:l,sourcePosition:i=Te.Bottom,targetX:r,targetY:o,targetPosition:u=Te.Top,borderRadius:f=5,centerX:m,centerY:g,offset:h=20,stepPosition:y=.5}){const[x,v,w,S,_]=aT({source:{x:t,y:l},sourcePosition:i,target:{x:r,y:o},targetPosition:u,center:{x:m,y:g},offset:h,stepPosition:y});return[x.reduce((C,T,E)=>{let R="";return E>0&&E<x.length-1?R=lT(x[E-1],T,x[E+1],f):R=`${E===0?"M":"L"}${T.x} ${T.y}`,C+=R,C},""),v,w,S,_]}function by(t){return t&&!!(t.internals.handleBounds||t.handles?.length)&&!!(t.measured.width||t.width||t.initialWidth)}function iT(t){const{sourceNode:l,targetNode:i}=t;if(!by(l)||!by(i))return null;const r=l.internals.handleBounds||Ey(l.handles),o=i.internals.handleBounds||Ey(i.handles),u=Sy(r?.source??[],t.sourceHandle),f=Sy(t.connectionMode===rs.Strict?o?.target??[]:(o?.target??[]).concat(o?.source??[]),t.targetHandle);if(!u||!f)return t.onError?.("008",ma.error008(u?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const m=u?.position||Te.Bottom,g=f?.position||Te.Top,h=yi(l,u,m),y=yi(i,f,g);return{sourceX:h.x,sourceY:h.y,targetX:y.x,targetY:y.y,sourcePosition:m,targetPosition:g}}function Ey(t){if(!t)return null;const l=[],i=[];for(const r of t)r.width=r.width??1,r.height=r.height??1,r.type==="source"?l.push(r):r.type==="target"&&i.push(r);return{source:l,target:i}}function yi(t,l,i=Te.Left,r=!1){const o=(l?.x??0)+t.internals.positionAbsolute.x,u=(l?.y??0)+t.internals.positionAbsolute.y,{width:f,height:m}=l??tl(t);if(r)return{x:o+f/2,y:u+m/2};switch(l?.position??i){case Te.Top:return{x:o+f/2,y:u};case Te.Right:return{x:o+f,y:u+m/2};case Te.Bottom:return{x:o+f/2,y:u+m};case Te.Left:return{x:o,y:u+m/2}}}function Sy(t,l){return t&&(l?t.find(i=>i.id===l):t[0])||null}function ih(t,l){return t?typeof t=="string"?t:`${l?`${l}__`:""}${Object.keys(t).sort().map(r=>`${r}=${t[r]}`).join("&")}`:""}function sT(t,{id:l,defaultColor:i,defaultMarkerStart:r,defaultMarkerEnd:o}){const u=new Set;return t.reduce((f,m)=>([m.markerStart||r,m.markerEnd||o].forEach(g=>{if(g&&typeof g=="object"){const h=ih(g,l);u.has(h)||(f.push({id:h,color:g.color||i,...g}),u.add(h))}}),f),[]).sort((f,m)=>f.id.localeCompare(m.id))}const Iv=1e3,rT=10,zh={nodeOrigin:[0,0],nodeExtent:_r,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},oT={...zh,checkEquality:!0};function jh(t,l){const i={...t};for(const r in l)l[r]!==void 0&&(i[r]=l[r]);return i}function cT(t,l,i){const r=jh(zh,i);for(const o of t.values())if(o.parentId)kh(o,t,l,r);else{const u=Ur(o,r.nodeOrigin),f=us(o.extent)?o.extent:r.nodeExtent,m=pi(u,f,tl(o));o.internals.positionAbsolute=m}}function uT(t,l){if(!t.handles)return t.measured?l?.internals.handleBounds:void 0;const i=[],r=[];for(const o of t.handles){const u={id:o.id,width:o.width??1,height:o.height??1,nodeId:t.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?i.push(u):o.type==="target"&&r.push(u)}return{source:i,target:r}}function Dh(t){return t==="manual"}function sh(t,l,i,r={}){const o=jh(oT,r),u={i:0},f=new Map(l),m=o?.elevateNodesOnSelect&&!Dh(o.zIndexMode)?Iv:0;let g=t.length>0;l.clear(),i.clear();for(const h of t){let y=f.get(h.id);if(o.checkEquality&&h===y?.internals.userNode)l.set(h.id,y);else{const x=Ur(h,o.nodeOrigin),v=us(h.extent)?h.extent:o.nodeExtent,w=pi(x,v,tl(h));y={...o.defaults,...h,measured:{width:h.measured?.width,height:h.measured?.height},internals:{positionAbsolute:w,handleBounds:uT(h,y),z:Qv(h,m,o.zIndexMode),userNode:h}},l.set(h.id,y)}(y.measured===void 0||y.measured.width===void 0||y.measured.height===void 0)&&!y.hidden&&(g=!1),h.parentId&&kh(y,l,i,r,u)}return g}function fT(t,l){if(!t.parentId)return;const i=l.get(t.parentId);i?i.set(t.id,t):l.set(t.parentId,new Map([[t.id,t]]))}function kh(t,l,i,r,o){const{elevateNodesOnSelect:u,nodeOrigin:f,nodeExtent:m,zIndexMode:g}=jh(zh,r),h=t.parentId,y=l.get(h);if(!y){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}fT(t,i),o&&!y.parentId&&y.internals.rootParentIndex===void 0&&g==="auto"&&(y.internals.rootParentIndex=++o.i,y.internals.z=y.internals.z+o.i*rT),o&&y.internals.rootParentIndex!==void 0&&(o.i=y.internals.rootParentIndex);const x=u&&!Dh(g)?Iv:0,{x:v,y:w,z:S}=dT(t,y,f,m,x,g),{positionAbsolute:_}=t.internals,A=v!==_.x||w!==_.y;(A||S!==t.internals.z)&&l.set(t.id,{...t,internals:{...t.internals,positionAbsolute:A?{x:v,y:w}:_,z:S}})}function Qv(t,l,i){const r=na(t.zIndex)?t.zIndex:0;return Dh(i)?r:r+(t.selected?l:0)}function dT(t,l,i,r,o,u){const{x:f,y:m}=l.internals.positionAbsolute,g=tl(t),h=Ur(t,i),y=us(t.extent)?pi(h,t.extent,g):h;let x=pi({x:f+y.x,y:m+y.y},r,g);t.extent==="parent"&&(x=kv(x,g,l));const v=Qv(t,o,u),w=l.internals.z??0;return{x:x.x,y:x.y,z:w>=v?w+1:v}}function Lh(t,l,i,r=[0,0]){const o=[],u=new Map;for(const f of t){const m=l.get(f.parentId);if(!m)continue;const g=u.get(f.parentId)?.expandedRect??cs(m),h=Hv(g,f.rect);u.set(f.parentId,{expandedRect:h,parent:m})}return u.size>0&&u.forEach(({expandedRect:f,parent:m},g)=>{const h=m.internals.positionAbsolute,y=tl(m),x=m.origin??r,v=f.x<h.x?Math.round(Math.abs(h.x-f.x)):0,w=f.y<h.y?Math.round(Math.abs(h.y-f.y)):0,S=Math.max(y.width,Math.round(f.width)),_=Math.max(y.height,Math.round(f.height)),A=(S-y.width)*x[0],C=(_-y.height)*x[1];(v>0||w>0||A||C)&&(o.push({id:g,type:"position",position:{x:m.position.x-v+A,y:m.position.y-w+C}}),i.get(g)?.forEach(T=>{t.some(E=>E.id===T.id)||o.push({id:T.id,type:"position",position:{x:T.position.x+v,y:T.position.y+w}})})),(y.width<f.width||y.height<f.height||v||w)&&o.push({id:g,type:"dimensions",setAttributes:!0,dimensions:{width:S+(v?x[0]*v-A:0),height:_+(w?x[1]*w-C:0)}})}),o}function hT(t,l,i,r,o,u,f){const m=r?.querySelector(".xyflow__viewport");let g=!1;if(!m)return{changes:[],updatedInternals:g};const h=[],y=window.getComputedStyle(m),{m22:x}=new window.DOMMatrixReadOnly(y.transform),v=[];for(const w of t.values()){const S=l.get(w.id);if(!S)continue;if(S.hidden){l.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),g=!0;continue}const _=Oh(w.nodeElement),A=S.measured.width!==_.width||S.measured.height!==_.height;if(!!(_.width&&_.height&&(A||!S.internals.handleBounds||w.force))){const T=w.nodeElement.getBoundingClientRect(),E=us(S.extent)?S.extent:u;let{positionAbsolute:R}=S.internals;S.parentId&&S.extent==="parent"?R=kv(R,_,l.get(S.parentId)):E&&(R=pi(R,E,_));const L={...S,measured:_,internals:{...S.internals,positionAbsolute:R,handleBounds:{source:py("source",w.nodeElement,T,x,S.id),target:py("target",w.nodeElement,T,x,S.id)}}};l.set(S.id,L),S.parentId&&kh(L,l,i,{nodeOrigin:o,zIndexMode:f}),g=!0,A&&(h.push({id:S.id,type:"dimensions",dimensions:_}),S.expandParent&&S.parentId&&v.push({id:S.id,parentId:S.parentId,rect:cs(L,o)}))}}if(v.length>0){const w=Lh(v,l,i,o);h.push(...w)}return{changes:h,updatedInternals:g}}async function mT({delta:t,panZoom:l,transform:i,translateExtent:r,width:o,height:u}){if(!l||!t.x&&!t.y)return Promise.resolve(!1);const f=await l.setViewportConstrained({x:i[0]+t.x,y:i[1]+t.y,zoom:i[2]},[[0,0],[o,u]],r),m=!!f&&(f.x!==i[0]||f.y!==i[1]||f.k!==i[2]);return Promise.resolve(m)}function wy(t,l,i,r,o,u){let f=o;const m=r.get(f)||new Map;r.set(f,m.set(i,l)),f=`${o}-${t}`;const g=r.get(f)||new Map;if(r.set(f,g.set(i,l)),u){f=`${o}-${t}-${u}`;const h=r.get(f)||new Map;r.set(f,h.set(i,l))}}function Kv(t,l,i){t.clear(),l.clear();for(const r of i){const{source:o,target:u,sourceHandle:f=null,targetHandle:m=null}=r,g={edgeId:r.id,source:o,target:u,sourceHandle:f,targetHandle:m},h=`${o}-${f}--${u}-${m}`,y=`${u}-${m}--${o}-${f}`;wy("source",g,y,t,o,f),wy("target",g,h,t,u,m),l.set(r.id,r)}}function Fv(t,l){if(!t.parentId)return!1;const i=l.get(t.parentId);return i?i.selected?!0:Fv(i,l):!1}function _y(t,l,i){let r=t;do{if(r?.matches?.(l))return!0;if(r===i)return!1;r=r?.parentElement}while(r);return!1}function gT(t,l,i,r){const o=new Map;for(const[u,f]of t)if((f.selected||f.id===r)&&(!f.parentId||!Fv(f,t))&&(f.draggable||l&&typeof f.draggable>"u")){const m=t.get(u);m&&o.set(u,{id:u,position:m.position||{x:0,y:0},distance:{x:i.x-m.internals.positionAbsolute.x,y:i.y-m.internals.positionAbsolute.y},extent:m.extent,parentId:m.parentId,origin:m.origin,expandParent:m.expandParent,internals:{positionAbsolute:m.internals.positionAbsolute||{x:0,y:0}},measured:{width:m.measured.width??0,height:m.measured.height??0}})}return o}function _d({nodeId:t,dragItems:l,nodeLookup:i,dragging:r=!0}){const o=[];for(const[f,m]of l){const g=i.get(f)?.internals.userNode;g&&o.push({...g,position:m.position,dragging:r})}if(!t)return[o[0],o];const u=i.get(t)?.internals.userNode;return[u?{...u,position:l.get(t)?.position||u.position,dragging:r}:o[0],o]}function pT({dragItems:t,snapGrid:l,x:i,y:r}){const o=t.values().next().value;if(!o)return null;const u={x:i-o.distance.x,y:r-o.distance.y},f=Vr(u,l);return{x:f.x-u.x,y:f.y-u.y}}function yT({onNodeMouseDown:t,getStoreItems:l,onDragStart:i,onDrag:r,onDragStop:o}){let u={x:null,y:null},f=0,m=new Map,g=!1,h={x:0,y:0},y=null,x=!1,v=null,w=!1,S=!1,_=null;function A({noDragClassName:T,handleSelector:E,domNode:R,isSelectable:L,nodeId:D,nodeClickDistance:B=0}){v=Tn(R);function Y({x:K,y:ae}){const{nodeLookup:k,nodeExtent:I,snapGrid:M,snapToGrid:U,nodeOrigin:j,onNodeDrag:q,onSelectionDrag:te,onError:O,updateNodePositions:H}=l();u={x:K,y:ae};let Q=!1;const J=m.size>1,ce=J&&I?ah($r(m)):null,he=J&&U?pT({dragItems:m,snapGrid:M,x:K,y:ae}):null;for(const[re,fe]of m){if(!k.has(re))continue;let me={x:K-fe.distance.x,y:ae-fe.distance.y};U&&(me=he?{x:Math.round(me.x+he.x),y:Math.round(me.y+he.y)}:Vr(me,M));let Ce=null;if(J&&I&&!fe.extent&&ce){const{positionAbsolute:_e}=fe.internals,He=_e.x-ce.x+I[0][0],lt=_e.x+fe.measured.width-ce.x2+I[1][0],Re=_e.y-ce.y+I[0][1],Be=_e.y+fe.measured.height-ce.y2+I[1][1];Ce=[[He,Re],[lt,Be]]}const{position:xe,positionAbsolute:ve}=Dv({nodeId:re,nextPosition:me,nodeLookup:k,nodeExtent:Ce||I,nodeOrigin:j,onError:O});Q=Q||fe.position.x!==xe.x||fe.position.y!==xe.y,fe.position=xe,fe.internals.positionAbsolute=ve}if(S=S||Q,!!Q&&(H(m,!0),_&&(r||q||!D&&te))){const[re,fe]=_d({nodeId:D,dragItems:m,nodeLookup:k});r?.(_,m,re,fe),q?.(_,re,fe),D||te?.(_,fe)}}async function X(){if(!y)return;const{transform:K,panBy:ae,autoPanSpeed:k,autoPanOnNodeDrag:I}=l();if(!I){g=!1,cancelAnimationFrame(f);return}const[M,U]=Lv(h,y,k);(M!==0||U!==0)&&(u.x=(u.x??0)-M/K[2],u.y=(u.y??0)-U/K[2],await ae({x:M,y:U})&&Y(u)),f=requestAnimationFrame(X)}function ie(K){const{nodeLookup:ae,multiSelectionActive:k,nodesDraggable:I,transform:M,snapGrid:U,snapToGrid:j,selectNodesOnDrag:q,onNodeDragStart:te,onSelectionDragStart:O,unselectNodesAndEdges:H}=l();x=!0,(!q||!L)&&!k&&D&&(ae.get(D)?.selected||H()),L&&q&&D&&t?.(D);const Q=xr(K.sourceEvent,{transform:M,snapGrid:U,snapToGrid:j,containerBounds:y});if(u=Q,m=gT(ae,I,Q,D),m.size>0&&(i||te||!D&&O)){const[J,ce]=_d({nodeId:D,dragItems:m,nodeLookup:ae});i?.(K.sourceEvent,m,J,ce),te?.(K.sourceEvent,J,ce),D||O?.(K.sourceEvent,ce)}}const Z=hv().clickDistance(B).on("start",K=>{const{domNode:ae,nodeDragThreshold:k,transform:I,snapGrid:M,snapToGrid:U}=l();y=ae?.getBoundingClientRect()||null,w=!1,S=!1,_=K.sourceEvent,k===0&&ie(K),u=xr(K.sourceEvent,{transform:I,snapGrid:M,snapToGrid:U,containerBounds:y}),h=aa(K.sourceEvent,y)}).on("drag",K=>{const{autoPanOnNodeDrag:ae,transform:k,snapGrid:I,snapToGrid:M,nodeDragThreshold:U,nodeLookup:j}=l(),q=xr(K.sourceEvent,{transform:k,snapGrid:I,snapToGrid:M,containerBounds:y});if(_=K.sourceEvent,(K.sourceEvent.type==="touchmove"&&K.sourceEvent.touches.length>1||D&&!j.has(D))&&(w=!0),!w){if(!g&&ae&&x&&(g=!0,X()),!x){const te=aa(K.sourceEvent,y),O=te.x-h.x,H=te.y-h.y;Math.sqrt(O*O+H*H)>U&&ie(K)}(u.x!==q.xSnapped||u.y!==q.ySnapped)&&m&&x&&(h=aa(K.sourceEvent,y),Y(q))}}).on("end",K=>{if(!(!x||w)&&(g=!1,x=!1,cancelAnimationFrame(f),m.size>0)){const{nodeLookup:ae,updateNodePositions:k,onNodeDragStop:I,onSelectionDragStop:M}=l();if(S&&(k(m,!1),S=!1),o||I||!D&&M){const[U,j]=_d({nodeId:D,dragItems:m,nodeLookup:ae,dragging:!1});o?.(K.sourceEvent,m,U,j),I?.(K.sourceEvent,U,j),D||M?.(K.sourceEvent,j)}}}).filter(K=>{const ae=K.target;return!K.button&&(!T||!_y(ae,`.${T}`,R))&&(!E||_y(ae,E,R))});v.call(Z)}function C(){v?.on(".drag",null)}return{update:A,destroy:C}}function xT(t,l,i){const r=[],o={x:t.x-i,y:t.y-i,width:i*2,height:i*2};for(const u of l.values())Cr(o,cs(u))>0&&r.push(u);return r}const vT=250;function bT(t,l,i,r){let o=[],u=1/0;const f=xT(t,i,l+vT);for(const m of f){const g=[...m.internals.handleBounds?.source??[],...m.internals.handleBounds?.target??[]];for(const h of g){if(r.nodeId===h.nodeId&&r.type===h.type&&r.id===h.id)continue;const{x:y,y:x}=yi(m,h,h.position,!0),v=Math.sqrt(Math.pow(y-t.x,2)+Math.pow(x-t.y,2));v>l||(v<u?(o=[{...h,x:y,y:x}],u=v):v===u&&o.push({...h,x:y,y:x}))}}if(!o.length)return null;if(o.length>1){const m=r.type==="source"?"target":"source";return o.find(g=>g.type===m)??o[0]}return o[0]}function Jv(t,l,i,r,o,u=!1){const f=r.get(t);if(!f)return null;const m=o==="strict"?f.internals.handleBounds?.[l]:[...f.internals.handleBounds?.source??[],...f.internals.handleBounds?.target??[]],g=(i?m?.find(h=>h.id===i):m?.[0])??null;return g&&u?{...g,...yi(f,g,g.position,!0)}:g}function Pv(t,l){return t||(l?.classList.contains("target")?"target":l?.classList.contains("source")?"source":null)}function ET(t,l){let i=null;return l?i=!0:t&&!l&&(i=!1),i}const Wv=()=>!0;function ST(t,{connectionMode:l,connectionRadius:i,handleId:r,nodeId:o,edgeUpdaterType:u,isTarget:f,domNode:m,nodeLookup:g,lib:h,autoPanOnConnect:y,flowId:x,panBy:v,cancelConnection:w,onConnectStart:S,onConnect:_,onConnectEnd:A,isValidConnection:C=Wv,onReconnectEnd:T,updateConnection:E,getTransform:R,getFromHandle:L,autoPanSpeed:D,dragThreshold:B=1,handleDomNode:Y}){const X=$v(t.target);let ie=0,Z;const{x:K,y:ae}=aa(t),k=Pv(u,Y),I=m?.getBoundingClientRect();let M=!1;if(!I||!k)return;const U=Jv(o,k,r,g,l);if(!U)return;let j=aa(t,I),q=!1,te=null,O=!1,H=null;function Q(){if(!y||!I)return;const[xe,ve]=Lv(j,I,D);v({x:xe,y:ve}),ie=requestAnimationFrame(Q)}const J={...U,nodeId:o,type:k,position:U.position},ce=g.get(o);let re={inProgress:!0,isValid:null,from:yi(ce,J,Te.Left,!0),fromHandle:J,fromPosition:J.position,fromNode:ce,to:j,toHandle:null,toPosition:dy[J.position],toNode:null,pointer:j};function fe(){M=!0,E(re),S?.(t,{nodeId:o,handleId:r,handleType:k})}B===0&&fe();function me(xe){if(!M){const{x:Be,y:Pe}=aa(xe),Ge=Be-K,xt=Pe-ae;if(!(Ge*Ge+xt*xt>B*B))return;fe()}if(!L()||!J){Ce(xe);return}const ve=R();j=aa(xe,I),Z=bT(Yr(j,ve,!1,[1,1]),i,g,J),q||(Q(),q=!0);const _e=eb(xe,{handle:Z,connectionMode:l,fromNodeId:o,fromHandleId:r,fromType:f?"target":"source",isValidConnection:C,doc:X,lib:h,flowId:x,nodeLookup:g});H=_e.handleDomNode,te=_e.connection,O=ET(!!Z,_e.isValid);const He=g.get(o),lt=He?yi(He,J,Te.Left,!0):re.from,Re={...re,from:lt,isValid:O,to:_e.toHandle&&O?kc({x:_e.toHandle.x,y:_e.toHandle.y},ve):j,toHandle:_e.toHandle,toPosition:O&&_e.toHandle?_e.toHandle.position:dy[J.position],toNode:_e.toHandle?g.get(_e.toHandle.nodeId):null,pointer:j};E(Re),re=Re}function Ce(xe){if(!("touches"in xe&&xe.touches.length>0)){if(M){(Z||H)&&te&&O&&_?.(te);const{inProgress:ve,..._e}=re,He={..._e,toPosition:re.toHandle?re.toPosition:null};A?.(xe,He),u&&T?.(xe,He)}w(),cancelAnimationFrame(ie),q=!1,O=!1,te=null,H=null,X.removeEventListener("mousemove",me),X.removeEventListener("mouseup",Ce),X.removeEventListener("touchmove",me),X.removeEventListener("touchend",Ce)}}X.addEventListener("mousemove",me),X.addEventListener("mouseup",Ce),X.addEventListener("touchmove",me),X.addEventListener("touchend",Ce)}function eb(t,{handle:l,connectionMode:i,fromNodeId:r,fromHandleId:o,fromType:u,doc:f,lib:m,flowId:g,isValidConnection:h=Wv,nodeLookup:y}){const x=u==="target",v=l?f.querySelector(`.${m}-flow__handle[data-id="${g}-${l?.nodeId}-${l?.id}-${l?.type}"]`):null,{x:w,y:S}=aa(t),_=f.elementFromPoint(w,S),A=_?.classList.contains(`${m}-flow__handle`)?_:v,C={handleDomNode:A,isValid:!1,connection:null,toHandle:null};if(A){const T=Pv(void 0,A),E=A.getAttribute("data-nodeid"),R=A.getAttribute("data-handleid"),L=A.classList.contains("connectable"),D=A.classList.contains("connectableend");if(!E||!T)return C;const B={source:x?E:r,sourceHandle:x?R:o,target:x?r:E,targetHandle:x?o:R};C.connection=B;const X=L&&D&&(i===rs.Strict?x&&T==="source"||!x&&T==="target":E!==r||R!==o);C.isValid=X&&h(B),C.toHandle=Jv(E,T,R,y,i,!0)}return C}const rh={onPointerDown:ST,isValid:eb};function wT({domNode:t,panZoom:l,getTransform:i,getViewScale:r}){const o=Tn(t);function u({translateExtent:m,width:g,height:h,zoomStep:y=1,pannable:x=!0,zoomable:v=!0,inversePan:w=!1}){const S=E=>{if(E.sourceEvent.type!=="wheel"||!l)return;const R=i(),L=E.sourceEvent.ctrlKey&&Mr()?10:1,D=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*y,B=R[2]*Math.pow(2,D*L);l.scaleTo(B)};let _=[0,0];const A=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(_=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},C=E=>{const R=i();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!l)return;const L=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],D=[L[0]-_[0],L[1]-_[1]];_=L;const B=r()*Math.max(R[2],Math.log(R[2]))*(w?-1:1),Y={x:R[0]-D[0]*B,y:R[1]-D[1]*B},X=[[0,0],[g,h]];l.setViewportConstrained({x:Y.x,y:Y.y,zoom:R[2]},X,m)},T=Mv().on("start",A).on("zoom",x?C:null).on("zoom.wheel",v?S:null);o.call(T,{})}function f(){o.on("zoom",null)}return{update:u,destroy:f,pointer:ea}}const Kc=t=>({x:t.x,y:t.y,zoom:t.k}),Nd=({x:t,y:l,zoom:i})=>Zc.translate(t,l).scale(i),es=(t,l)=>t.target.closest(`.${l}`),tb=(t,l)=>l===2&&Array.isArray(t)&&t.includes(2),_T=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,Ad=(t,l=0,i=_T,r=()=>{})=>{const o=typeof l=="number"&&l>0;return o||r(),o?t.transition().duration(l).ease(i).on("end",r):t},nb=t=>{const l=t.ctrlKey&&Mr()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*l};function NT({zoomPanValues:t,noWheelClassName:l,d3Selection:i,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:u,zoomOnPinch:f,onPanZoomStart:m,onPanZoom:g,onPanZoomEnd:h}){return y=>{if(es(y,l))return y.ctrlKey&&y.preventDefault(),!1;y.preventDefault(),y.stopImmediatePropagation();const x=i.property("__zoom").k||1;if(y.ctrlKey&&f){const A=ea(y),C=nb(y),T=x*Math.pow(2,C);r.scaleTo(i,T,A,y);return}const v=y.deltaMode===1?20:1;let w=o===fi.Vertical?0:y.deltaX*v,S=o===fi.Horizontal?0:y.deltaY*v;!Mr()&&y.shiftKey&&o!==fi.Vertical&&(w=y.deltaY*v,S=0),r.translateBy(i,-(w/x)*u,-(S/x)*u,{internal:!0});const _=Kc(i.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(g?.(y,_),t.panScrollTimeout=setTimeout(()=>{h?.(y,_),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,m?.(y,_))}}function AT({noWheelClassName:t,preventScrolling:l,d3ZoomHandler:i}){return function(r,o){const u=r.type==="wheel",f=!l&&u&&!r.ctrlKey,m=es(r,t);if(r.ctrlKey&&u&&m&&r.preventDefault(),f||m)return null;r.preventDefault(),i.call(this,r,o)}}function CT({zoomPanValues:t,onDraggingChange:l,onPanZoomStart:i}){return r=>{if(r.sourceEvent?.internal)return;const o=Kc(r.transform);t.mouseButton=r.sourceEvent?.button||0,t.isZoomingOrPanning=!0,t.prevViewport=o,r.sourceEvent?.type==="mousedown"&&l(!0),i&&i?.(r.sourceEvent,o)}}function MT({zoomPanValues:t,panOnDrag:l,onPaneContextMenu:i,onTransformChange:r,onPanZoom:o}){return u=>{t.usedRightMouseButton=!!(i&&tb(l,t.mouseButton??0)),u.sourceEvent?.sync||r([u.transform.x,u.transform.y,u.transform.k]),o&&!u.sourceEvent?.internal&&o?.(u.sourceEvent,Kc(u.transform))}}function TT({zoomPanValues:t,panOnDrag:l,panOnScroll:i,onDraggingChange:r,onPanZoomEnd:o,onPaneContextMenu:u}){return f=>{if(!f.sourceEvent?.internal&&(t.isZoomingOrPanning=!1,u&&tb(l,t.mouseButton??0)&&!t.usedRightMouseButton&&f.sourceEvent&&u(f.sourceEvent),t.usedRightMouseButton=!1,r(!1),o)){const m=Kc(f.transform);t.prevViewport=m,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{o?.(f.sourceEvent,m)},i?150:0)}}}function RT({zoomActivationKeyPressed:t,zoomOnScroll:l,zoomOnPinch:i,panOnDrag:r,panOnScroll:o,zoomOnDoubleClick:u,userSelectionActive:f,noWheelClassName:m,noPanClassName:g,lib:h,connectionInProgress:y}){return x=>{const v=t||l,w=i&&x.ctrlKey,S=x.type==="wheel";if(x.button===1&&x.type==="mousedown"&&(es(x,`${h}-flow__node`)||es(x,`${h}-flow__edge`)))return!0;if(!r&&!v&&!o&&!u&&!i||f||y&&!S||es(x,m)&&S||es(x,g)&&(!S||o&&S&&!t)||!i&&x.ctrlKey&&S)return!1;if(!i&&x.type==="touchstart"&&x.touches?.length>1)return x.preventDefault(),!1;if(!v&&!o&&!w&&S||!r&&(x.type==="mousedown"||x.type==="touchstart")||Array.isArray(r)&&!r.includes(x.button)&&x.type==="mousedown")return!1;const _=Array.isArray(r)&&r.includes(x.button)||!x.button||x.button<=1;return(!x.ctrlKey||S)&&_}}function OT({domNode:t,minZoom:l,maxZoom:i,translateExtent:r,viewport:o,onPanZoom:u,onPanZoomStart:f,onPanZoomEnd:m,onDraggingChange:g}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},y=t.getBoundingClientRect(),x=Mv().scaleExtent([l,i]).translateExtent(r),v=Tn(t).call(x);T({x:o.x,y:o.y,zoom:os(o.zoom,l,i)},[[0,0],[y.width,y.height]],r);const w=v.on("wheel.zoom"),S=v.on("dblclick.zoom");x.wheelDelta(nb);function _(Z,K){return v?new Promise(ae=>{x?.interpolate(K?.interpolate==="linear"?yr:bc).transform(Ad(v,K?.duration,K?.ease,()=>ae(!0)),Z)}):Promise.resolve(!1)}function A({noWheelClassName:Z,noPanClassName:K,onPaneContextMenu:ae,userSelectionActive:k,panOnScroll:I,panOnDrag:M,panOnScrollMode:U,panOnScrollSpeed:j,preventScrolling:q,zoomOnPinch:te,zoomOnScroll:O,zoomOnDoubleClick:H,zoomActivationKeyPressed:Q,lib:J,onTransformChange:ce,connectionInProgress:he,paneClickDistance:re,selectionOnDrag:fe}){k&&!h.isZoomingOrPanning&&C();const me=I&&!Q&&!k;x.clickDistance(fe?1/0:!na(re)||re<0?0:re);const Ce=me?NT({zoomPanValues:h,noWheelClassName:Z,d3Selection:v,d3Zoom:x,panOnScrollMode:U,panOnScrollSpeed:j,zoomOnPinch:te,onPanZoomStart:f,onPanZoom:u,onPanZoomEnd:m}):AT({noWheelClassName:Z,preventScrolling:q,d3ZoomHandler:w});if(v.on("wheel.zoom",Ce,{passive:!1}),!k){const ve=CT({zoomPanValues:h,onDraggingChange:g,onPanZoomStart:f});x.on("start",ve);const _e=MT({zoomPanValues:h,panOnDrag:M,onPaneContextMenu:!!ae,onPanZoom:u,onTransformChange:ce});x.on("zoom",_e);const He=TT({zoomPanValues:h,panOnDrag:M,panOnScroll:I,onPaneContextMenu:ae,onPanZoomEnd:m,onDraggingChange:g});x.on("end",He)}const xe=RT({zoomActivationKeyPressed:Q,panOnDrag:M,zoomOnScroll:O,panOnScroll:I,zoomOnDoubleClick:H,zoomOnPinch:te,userSelectionActive:k,noPanClassName:K,noWheelClassName:Z,lib:J,connectionInProgress:he});x.filter(xe),H?v.on("dblclick.zoom",S):v.on("dblclick.zoom",null)}function C(){x.on("zoom",null)}async function T(Z,K,ae){const k=Nd(Z),I=x?.constrain()(k,K,ae);return I&&await _(I),new Promise(M=>M(I))}async function E(Z,K){const ae=Nd(Z);return await _(ae,K),new Promise(k=>k(ae))}function R(Z){if(v){const K=Nd(Z),ae=v.property("__zoom");(ae.k!==Z.zoom||ae.x!==Z.x||ae.y!==Z.y)&&x?.transform(v,K,null,{sync:!0})}}function L(){const Z=v?Cv(v.node()):{x:0,y:0,k:1};return{x:Z.x,y:Z.y,zoom:Z.k}}function D(Z,K){return v?new Promise(ae=>{x?.interpolate(K?.interpolate==="linear"?yr:bc).scaleTo(Ad(v,K?.duration,K?.ease,()=>ae(!0)),Z)}):Promise.resolve(!1)}function B(Z,K){return v?new Promise(ae=>{x?.interpolate(K?.interpolate==="linear"?yr:bc).scaleBy(Ad(v,K?.duration,K?.ease,()=>ae(!0)),Z)}):Promise.resolve(!1)}function Y(Z){x?.scaleExtent(Z)}function X(Z){x?.translateExtent(Z)}function ie(Z){const K=!na(Z)||Z<0?0:Z;x?.clickDistance(K)}return{update:A,destroy:C,setViewport:E,setViewportConstrained:T,getViewport:L,scaleTo:D,scaleBy:B,setScaleExtent:Y,setTranslateExtent:X,syncViewport:R,setClickDistance:ie}}var fs;(function(t){t.Line="line",t.Handle="handle"})(fs||(fs={}));function zT({width:t,prevWidth:l,height:i,prevHeight:r,affectsX:o,affectsY:u}){const f=t-l,m=i-r,g=[f>0?1:f<0?-1:0,m>0?1:m<0?-1:0];return f&&o&&(g[0]=g[0]*-1),m&&u&&(g[1]=g[1]*-1),g}function Ny(t){const l=t.includes("right")||t.includes("left"),i=t.includes("bottom")||t.includes("top"),r=t.includes("left"),o=t.includes("top");return{isHorizontal:l,isVertical:i,affectsX:r,affectsY:o}}function Dl(t,l){return Math.max(0,l-t)}function kl(t,l){return Math.max(0,t-l)}function hc(t,l,i){return Math.max(0,l-t,t-i)}function Ay(t,l){return t?!l:l}function jT(t,l,i,r,o,u,f,m){let{affectsX:g,affectsY:h}=l;const{isHorizontal:y,isVertical:x}=l,v=y&&x,{xSnapped:w,ySnapped:S}=i,{minWidth:_,maxWidth:A,minHeight:C,maxHeight:T}=r,{x:E,y:R,width:L,height:D,aspectRatio:B}=t;let Y=Math.floor(y?w-t.pointerX:0),X=Math.floor(x?S-t.pointerY:0);const ie=L+(g?-Y:Y),Z=D+(h?-X:X),K=-u[0]*L,ae=-u[1]*D;let k=hc(ie,_,A),I=hc(Z,C,T);if(f){let j=0,q=0;g&&Y<0?j=Dl(E+Y+K,f[0][0]):!g&&Y>0&&(j=kl(E+ie+K,f[1][0])),h&&X<0?q=Dl(R+X+ae,f[0][1]):!h&&X>0&&(q=kl(R+Z+ae,f[1][1])),k=Math.max(k,j),I=Math.max(I,q)}if(m){let j=0,q=0;g&&Y>0?j=kl(E+Y,m[0][0]):!g&&Y<0&&(j=Dl(E+ie,m[1][0])),h&&X>0?q=kl(R+X,m[0][1]):!h&&X<0&&(q=Dl(R+Z,m[1][1])),k=Math.max(k,j),I=Math.max(I,q)}if(o){if(y){const j=hc(ie/B,C,T)*B;if(k=Math.max(k,j),f){let q=0;!g&&!h||g&&!h&&v?q=kl(R+ae+ie/B,f[1][1])*B:q=Dl(R+ae+(g?Y:-Y)/B,f[0][1])*B,k=Math.max(k,q)}if(m){let q=0;!g&&!h||g&&!h&&v?q=Dl(R+ie/B,m[1][1])*B:q=kl(R+(g?Y:-Y)/B,m[0][1])*B,k=Math.max(k,q)}}if(x){const j=hc(Z*B,_,A)/B;if(I=Math.max(I,j),f){let q=0;!g&&!h||h&&!g&&v?q=kl(E+Z*B+K,f[1][0])/B:q=Dl(E+(h?X:-X)*B+K,f[0][0])/B,I=Math.max(I,q)}if(m){let q=0;!g&&!h||h&&!g&&v?q=Dl(E+Z*B,m[1][0])/B:q=kl(E+(h?X:-X)*B,m[0][0])/B,I=Math.max(I,q)}}}X=X+(X<0?I:-I),Y=Y+(Y<0?k:-k),o&&(v?ie>Z*B?X=(Ay(g,h)?-Y:Y)/B:Y=(Ay(g,h)?-X:X)*B:y?(X=Y/B,h=g):(Y=X*B,g=h));const M=g?E+Y:E,U=h?R+X:R;return{width:L+(g?-Y:Y),height:D+(h?-X:X),x:u[0]*Y*(g?-1:1)+M,y:u[1]*X*(h?-1:1)+U}}const ab={width:0,height:0,x:0,y:0},DT={...ab,pointerX:0,pointerY:0,aspectRatio:1};function kT(t){return[[0,0],[t.measured.width,t.measured.height]]}function LT(t,l,i){const r=l.position.x+t.position.x,o=l.position.y+t.position.y,u=t.measured.width??0,f=t.measured.height??0,m=i[0]*u,g=i[1]*f;return[[r-m,o-g],[r+u-m,o+f-g]]}function HT({domNode:t,nodeId:l,getStoreItems:i,onChange:r,onEnd:o}){const u=Tn(t);let f={controlDirection:Ny("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function m({controlPosition:h,boundaries:y,keepAspectRatio:x,resizeDirection:v,onResizeStart:w,onResize:S,onResizeEnd:_,shouldResize:A}){let C={...ab},T={...DT};f={boundaries:y,resizeDirection:v,keepAspectRatio:x,controlDirection:Ny(h)};let E,R=null,L=[],D,B,Y,X=!1;const ie=hv().on("start",Z=>{const{nodeLookup:K,transform:ae,snapGrid:k,snapToGrid:I,nodeOrigin:M,paneDomNode:U}=i();if(E=K.get(l),!E)return;R=U?.getBoundingClientRect()??null;const{xSnapped:j,ySnapped:q}=xr(Z.sourceEvent,{transform:ae,snapGrid:k,snapToGrid:I,containerBounds:R});C={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},T={...C,pointerX:j,pointerY:q,aspectRatio:C.width/C.height},D=void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(D=K.get(E.parentId),B=D&&E.extent==="parent"?kT(D):void 0),L=[],Y=void 0;for(const[te,O]of K)if(O.parentId===l&&(L.push({id:te,position:{...O.position},extent:O.extent}),O.extent==="parent"||O.expandParent)){const H=LT(O,E,O.origin??M);Y?Y=[[Math.min(H[0][0],Y[0][0]),Math.min(H[0][1],Y[0][1])],[Math.max(H[1][0],Y[1][0]),Math.max(H[1][1],Y[1][1])]]:Y=H}w?.(Z,{...C})}).on("drag",Z=>{const{transform:K,snapGrid:ae,snapToGrid:k,nodeOrigin:I}=i(),M=xr(Z.sourceEvent,{transform:K,snapGrid:ae,snapToGrid:k,containerBounds:R}),U=[];if(!E)return;const{x:j,y:q,width:te,height:O}=C,H={},Q=E.origin??I,{width:J,height:ce,x:he,y:re}=jT(T,f.controlDirection,M,f.boundaries,f.keepAspectRatio,Q,B,Y),fe=J!==te,me=ce!==O,Ce=he!==j&&fe,xe=re!==q&&me;if(!Ce&&!xe&&!fe&&!me)return;if((Ce||xe||Q[0]===1||Q[1]===1)&&(H.x=Ce?he:C.x,H.y=xe?re:C.y,C.x=H.x,C.y=H.y,L.length>0)){const lt=he-j,Re=re-q;for(const Be of L)Be.position={x:Be.position.x-lt+Q[0]*(J-te),y:Be.position.y-Re+Q[1]*(ce-O)},U.push(Be)}if((fe||me)&&(H.width=fe&&(!f.resizeDirection||f.resizeDirection==="horizontal")?J:C.width,H.height=me&&(!f.resizeDirection||f.resizeDirection==="vertical")?ce:C.height,C.width=H.width,C.height=H.height),D&&E.expandParent){const lt=Q[0]*(H.width??0);H.x&&H.x<lt&&(C.x=lt,T.x=T.x-(H.x-lt));const Re=Q[1]*(H.height??0);H.y&&H.y<Re&&(C.y=Re,T.y=T.y-(H.y-Re))}const ve=zT({width:C.width,prevWidth:te,height:C.height,prevHeight:O,affectsX:f.controlDirection.affectsX,affectsY:f.controlDirection.affectsY}),_e={...C,direction:ve};A?.(Z,_e)!==!1&&(X=!0,S?.(Z,_e),r(H,U))}).on("end",Z=>{X&&(_?.(Z,{...C}),o?.({...C}),X=!1)});u.call(ie)}function g(){u.on(".drag",null)}return{update:m,destroy:g}}var Cd={exports:{}},Md={};var Cy;function BT(){if(Cy)return Md;Cy=1;var t=Or(),l=Rx();function i(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}var r=typeof Object.is=="function"?Object.is:i,o=l.useSyncExternalStore,u=t.useRef,f=t.useEffect,m=t.useMemo,g=t.useDebugValue;return Md.useSyncExternalStoreWithSelector=function(h,y,x,v,w){var S=u(null);if(S.current===null){var _={hasValue:!1,value:null};S.current=_}else _=S.current;S=m(function(){function C(D){if(!T){if(T=!0,E=D,D=v(D),w!==void 0&&_.hasValue){var B=_.value;if(w(B,D))return R=B}return R=D}if(B=R,r(E,D))return B;var Y=v(D);return w!==void 0&&w(B,Y)?(E=D,B):(E=D,R=Y)}var T=!1,E,R,L=x===void 0?null:x;return[function(){return C(y())},L===null?void 0:function(){return C(L())}]},[y,x,v,w]);var A=o(h,S[0],S[1]);return f(function(){_.hasValue=!0,_.value=A},[A]),g(A),A},Md}var My;function UT(){return My||(My=1,Cd.exports=BT()),Cd.exports}var $T=UT();const VT=ch($T),YT={},Ty=t=>{let l;const i=new Set,r=(y,x)=>{const v=typeof y=="function"?y(l):y;if(!Object.is(v,l)){const w=l;l=x??(typeof v!="object"||v===null)?v:Object.assign({},l,v),i.forEach(S=>S(l,w))}},o=()=>l,g={setState:r,getState:o,getInitialState:()=>h,subscribe:y=>(i.add(y),()=>i.delete(y)),destroy:()=>{(YT?"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."),i.clear()}},h=l=t(r,o,g);return g},qT=t=>t?Ty(t):Ty,{useDebugValue:GT}=Bc,{useSyncExternalStoreWithSelector:XT}=VT,ZT=t=>t;function lb(t,l=ZT,i){const r=XT(t.subscribe,t.getState,t.getServerState||t.getInitialState,l,i);return GT(r),r}const Ry=(t,l)=>{const i=qT(t),r=(o,u=l)=>lb(i,o,u);return Object.assign(r,i),r},IT=(t,l)=>t?Ry(t,l):Ry;function _t(t,l){if(Object.is(t,l))return!0;if(typeof t!="object"||t===null||typeof l!="object"||l===null)return!1;if(t instanceof Map&&l instanceof Map){if(t.size!==l.size)return!1;for(const[r,o]of t)if(!Object.is(o,l.get(r)))return!1;return!0}if(t instanceof Set&&l instanceof Set){if(t.size!==l.size)return!1;for(const r of t)if(!l.has(r))return!1;return!0}const i=Object.keys(t);if(i.length!==Object.keys(l).length)return!1;for(const r of i)if(!Object.prototype.hasOwnProperty.call(l,r)||!Object.is(t[r],l[r]))return!1;return!0}const Fc=z.createContext(null),QT=Fc.Provider,ib=ma.error001();function We(t,l){const i=z.useContext(Fc);if(i===null)throw new Error(ib);return lb(i,t,l)}function Nt(){const t=z.useContext(Fc);if(t===null)throw new Error(ib);return z.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const Oy={display:"none"},KT={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},sb="react-flow__node-desc",rb="react-flow__edge-desc",FT="react-flow__aria-live",JT=t=>t.ariaLiveMessage,PT=t=>t.ariaLabelConfig;function WT({rfId:t}){const l=We(JT);return p.jsx("div",{id:`${FT}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:KT,children:l})}function e3({rfId:t,disableKeyboardA11y:l}){const i=We(PT);return p.jsxs(p.Fragment,{children:[p.jsx("div",{id:`${sb}-${t}`,style:Oy,children:l?i["node.a11yDescription.default"]:i["node.a11yDescription.keyboardDisabled"]}),p.jsx("div",{id:`${rb}-${t}`,style:Oy,children:i["edge.a11yDescription.default"]}),!l&&p.jsx(WT,{rfId:t})]})}const Jc=z.forwardRef(({position:t="top-left",children:l,className:i,style:r,...o},u)=>{const f=`${t}`.split("-");return p.jsx("div",{className:qt(["react-flow__panel",i,...f]),style:r,ref:u,...o,children:l})});Jc.displayName="Panel";function t3({proOptions:t,position:l="bottom-right"}){return t?.hideAttribution?null:p.jsx(Jc,{position:l,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:p.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const n3=t=>{const l=[],i=[];for(const[,r]of t.nodeLookup)r.selected&&l.push(r.internals.userNode);for(const[,r]of t.edgeLookup)r.selected&&i.push(r);return{selectedNodes:l,selectedEdges:i}},mc=t=>t.id;function a3(t,l){return _t(t.selectedNodes.map(mc),l.selectedNodes.map(mc))&&_t(t.selectedEdges.map(mc),l.selectedEdges.map(mc))}function l3({onSelectionChange:t}){const l=Nt(),{selectedNodes:i,selectedEdges:r}=We(n3,a3);return z.useEffect(()=>{const o={nodes:i,edges:r};t?.(o),l.getState().onSelectionChangeHandlers.forEach(u=>u(o))},[i,r,t]),null}const i3=t=>!!t.onSelectionChangeHandlers;function s3({onSelectionChange:t}){const l=We(i3);return t||l?p.jsx(l3,{onSelectionChange:t}):null}const ob=[0,0],r3={x:0,y:0,zoom:1},o3=["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"],zy=[...o3,"rfId"],c3=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}),jy={translateExtent:_r,nodeOrigin:ob,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function u3(t){const{setNodes:l,setEdges:i,setMinZoom:r,setMaxZoom:o,setTranslateExtent:u,setNodeExtent:f,reset:m,setDefaultNodesAndEdges:g}=We(c3,_t),h=Nt();z.useEffect(()=>(g(t.defaultNodes,t.defaultEdges),()=>{y.current=jy,m()}),[]);const y=z.useRef(jy);return z.useEffect(()=>{for(const x of zy){const v=t[x],w=y.current[x];v!==w&&(typeof t[x]>"u"||(x==="nodes"?l(v):x==="edges"?i(v):x==="minZoom"?r(v):x==="maxZoom"?o(v):x==="translateExtent"?u(v):x==="nodeExtent"?f(v):x==="ariaLabelConfig"?h.setState({ariaLabelConfig:KM(v)}):x==="fitView"?h.setState({fitViewQueued:v}):x==="fitViewOptions"?h.setState({fitViewOptions:v}):h.setState({[x]:v})))}y.current=t},zy.map(x=>t[x])),null}function Dy(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function f3(t){const[l,i]=z.useState(t==="system"?null:t);return z.useEffect(()=>{if(t!=="system"){i(t);return}const r=Dy(),o=()=>i(r?.matches?"dark":"light");return o(),r?.addEventListener("change",o),()=>{r?.removeEventListener("change",o)}},[t]),l!==null?l:Dy()?.matches?"dark":"light"}const ky=typeof document<"u"?document:null;function Tr(t=null,l={target:ky,actInsideInputWithModifier:!0}){const[i,r]=z.useState(!1),o=z.useRef(!1),u=z.useRef(new Set([])),[f,m]=z.useMemo(()=>{if(t!==null){const h=(Array.isArray(t)?t:[t]).filter(x=>typeof x=="string").map(x=>x.replace("+",`
|
|
12
|
+
`).replace(`
|
|
13
|
+
|
|
14
|
+
`,`
|
|
15
|
+
+`).split(`
|
|
16
|
+
`)),y=h.reduce((x,v)=>x.concat(...v),[]);return[h,y]}return[[],[]]},[t]);return z.useEffect(()=>{const g=l?.target??ky,h=l?.actInsideInputWithModifier??!0;if(t!==null){const y=w=>{if(o.current=w.ctrlKey||w.metaKey||w.shiftKey||w.altKey,(!o.current||o.current&&!h)&&Vv(w))return!1;const _=Hy(w.code,m);if(u.current.add(w[_]),Ly(f,u.current,!1)){const A=w.composedPath?.()?.[0]||w.target,C=A?.nodeName==="BUTTON"||A?.nodeName==="A";l.preventDefault!==!1&&(o.current||!C)&&w.preventDefault(),r(!0)}},x=w=>{const S=Hy(w.code,m);Ly(f,u.current,!0)?(r(!1),u.current.clear()):u.current.delete(w[S]),w.key==="Meta"&&u.current.clear(),o.current=!1},v=()=>{u.current.clear(),r(!1)};return g?.addEventListener("keydown",y),g?.addEventListener("keyup",x),window.addEventListener("blur",v),window.addEventListener("contextmenu",v),()=>{g?.removeEventListener("keydown",y),g?.removeEventListener("keyup",x),window.removeEventListener("blur",v),window.removeEventListener("contextmenu",v)}}},[t,r]),i}function Ly(t,l,i){return t.filter(r=>i||r.length===l.size).some(r=>r.every(o=>l.has(o)))}function Hy(t,l){return l.includes(t)?"code":"key"}const d3=()=>{const t=Nt();return z.useMemo(()=>({zoomIn:l=>{const{panZoom:i}=t.getState();return i?i.scaleBy(1.2,{duration:l?.duration}):Promise.resolve(!1)},zoomOut:l=>{const{panZoom:i}=t.getState();return i?i.scaleBy(1/1.2,{duration:l?.duration}):Promise.resolve(!1)},zoomTo:(l,i)=>{const{panZoom:r}=t.getState();return r?r.scaleTo(l,{duration:i?.duration}):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(l,i)=>{const{transform:[r,o,u],panZoom:f}=t.getState();return f?(await f.setViewport({x:l.x??r,y:l.y??o,zoom:l.zoom??u},i),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[l,i,r]=t.getState().transform;return{x:l,y:i,zoom:r}},setCenter:async(l,i,r)=>t.getState().setCenter(l,i,r),fitBounds:async(l,i)=>{const{width:r,height:o,minZoom:u,maxZoom:f,panZoom:m}=t.getState(),g=Rh(l,r,o,u,f,i?.padding??.1);return m?(await m.setViewport(g,{duration:i?.duration,ease:i?.ease,interpolate:i?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(l,i={})=>{const{transform:r,snapGrid:o,snapToGrid:u,domNode:f}=t.getState();if(!f)return l;const{x:m,y:g}=f.getBoundingClientRect(),h={x:l.x-m,y:l.y-g},y=i.snapGrid??o,x=i.snapToGrid??u;return Yr(h,r,x,y)},flowToScreenPosition:l=>{const{transform:i,domNode:r}=t.getState();if(!r)return l;const{x:o,y:u}=r.getBoundingClientRect(),f=kc(l,i);return{x:f.x+o,y:f.y+u}}}),[])};function cb(t,l){const i=[],r=new Map,o=[];for(const u of t)if(u.type==="add"){o.push(u);continue}else if(u.type==="remove"||u.type==="replace")r.set(u.id,[u]);else{const f=r.get(u.id);f?f.push(u):r.set(u.id,[u])}for(const u of l){const f=r.get(u.id);if(!f){i.push(u);continue}if(f[0].type==="remove")continue;if(f[0].type==="replace"){i.push({...f[0].item});continue}const m={...u};for(const g of f)h3(g,m);i.push(m)}return o.length&&o.forEach(u=>{u.index!==void 0?i.splice(u.index,0,{...u.item}):i.push({...u.item})}),i}function h3(t,l){switch(t.type){case"select":{l.selected=t.selected;break}case"position":{typeof t.position<"u"&&(l.position=t.position),typeof t.dragging<"u"&&(l.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(l.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(l.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(l.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(l.resizing=t.resizing);break}}}function ub(t,l){return cb(t,l)}function fb(t,l){return cb(t,l)}function oi(t,l){return{id:t,type:"select",selected:l}}function ts(t,l=new Set,i=!1){const r=[];for(const[o,u]of t){const f=l.has(o);!(u.selected===void 0&&!f)&&u.selected!==f&&(i&&(u.selected=f),r.push(oi(u.id,f)))}return r}function By({items:t=[],lookup:l}){const i=[],r=new Map(t.map(o=>[o.id,o]));for(const[o,u]of t.entries()){const f=l.get(u.id),m=f?.internals?.userNode??f;m!==void 0&&m!==u&&i.push({id:u.id,item:u,type:"replace"}),m===void 0&&i.push({item:u,type:"add",index:o})}for(const[o]of l)r.get(o)===void 0&&i.push({id:o,type:"remove"});return i}function Uy(t){return{id:t.id,type:"remove"}}const $y=t=>UM(t),m3=t=>jv(t);function db(t){return z.forwardRef(t)}const g3=typeof window<"u"?z.useLayoutEffect:z.useEffect;function Vy(t){const[l,i]=z.useState(BigInt(0)),[r]=z.useState(()=>p3(()=>i(o=>o+BigInt(1))));return g3(()=>{const o=r.get();o.length&&(t(o),r.reset())},[l]),r}function p3(t){let l=[];return{get:()=>l,reset:()=>{l=[]},push:i=>{l.push(i),t()}}}const hb=z.createContext(null);function y3({children:t}){const l=Nt(),i=z.useCallback(m=>{const{nodes:g=[],setNodes:h,hasDefaultNodes:y,onNodesChange:x,nodeLookup:v,fitViewQueued:w,onNodesChangeMiddlewareMap:S}=l.getState();let _=g;for(const C of m)_=typeof C=="function"?C(_):C;let A=By({items:_,lookup:v});for(const C of S.values())A=C(A);y&&h(_),A.length>0?x?.(A):w&&window.requestAnimationFrame(()=>{const{fitViewQueued:C,nodes:T,setNodes:E}=l.getState();C&&E(T)})},[]),r=Vy(i),o=z.useCallback(m=>{const{edges:g=[],setEdges:h,hasDefaultEdges:y,onEdgesChange:x,edgeLookup:v}=l.getState();let w=g;for(const S of m)w=typeof S=="function"?S(w):S;y?h(w):x&&x(By({items:w,lookup:v}))},[]),u=Vy(o),f=z.useMemo(()=>({nodeQueue:r,edgeQueue:u}),[]);return p.jsx(hb.Provider,{value:f,children:t})}function x3(){const t=z.useContext(hb);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const v3=t=>!!t.panZoom;function Hh(){const t=d3(),l=Nt(),i=x3(),r=We(v3),o=z.useMemo(()=>{const u=x=>l.getState().nodeLookup.get(x),f=x=>{i.nodeQueue.push(x)},m=x=>{i.edgeQueue.push(x)},g=x=>{const{nodeLookup:v,nodeOrigin:w}=l.getState(),S=$y(x)?x:v.get(x.id),_=S.parentId?Uv(S.position,S.measured,S.parentId,v,w):S.position,A={...S,position:_,width:S.measured?.width??S.width,height:S.measured?.height??S.height};return cs(A)},h=(x,v,w={replace:!1})=>{f(S=>S.map(_=>{if(_.id===x){const A=typeof v=="function"?v(_):v;return w.replace&&$y(A)?A:{..._,...A}}return _}))},y=(x,v,w={replace:!1})=>{m(S=>S.map(_=>{if(_.id===x){const A=typeof v=="function"?v(_):v;return w.replace&&m3(A)?A:{..._,...A}}return _}))};return{getNodes:()=>l.getState().nodes.map(x=>({...x})),getNode:x=>u(x)?.internals.userNode,getInternalNode:u,getEdges:()=>{const{edges:x=[]}=l.getState();return x.map(v=>({...v}))},getEdge:x=>l.getState().edgeLookup.get(x),setNodes:f,setEdges:m,addNodes:x=>{const v=Array.isArray(x)?x:[x];i.nodeQueue.push(w=>[...w,...v])},addEdges:x=>{const v=Array.isArray(x)?x:[x];i.edgeQueue.push(w=>[...w,...v])},toObject:()=>{const{nodes:x=[],edges:v=[],transform:w}=l.getState(),[S,_,A]=w;return{nodes:x.map(C=>({...C})),edges:v.map(C=>({...C})),viewport:{x:S,y:_,zoom:A}}},deleteElements:async({nodes:x=[],edges:v=[]})=>{const{nodes:w,edges:S,onNodesDelete:_,onEdgesDelete:A,triggerNodeChanges:C,triggerEdgeChanges:T,onDelete:E,onBeforeDelete:R}=l.getState(),{nodes:L,edges:D}=await GM({nodesToRemove:x,edgesToRemove:v,nodes:w,edges:S,onBeforeDelete:R}),B=D.length>0,Y=L.length>0;if(B){const X=D.map(Uy);A?.(D),T(X)}if(Y){const X=L.map(Uy);_?.(L),C(X)}return(Y||B)&&E?.({nodes:L,edges:D}),{deletedNodes:L,deletedEdges:D}},getIntersectingNodes:(x,v=!0,w)=>{const S=my(x),_=S?x:g(x),A=w!==void 0;return _?(w||l.getState().nodes).filter(C=>{const T=l.getState().nodeLookup.get(C.id);if(T&&!S&&(C.id===x.id||!T.internals.positionAbsolute))return!1;const E=cs(A?C:T),R=Cr(E,_);return v&&R>0||R>=E.width*E.height||R>=_.width*_.height}):[]},isNodeIntersecting:(x,v,w=!0)=>{const _=my(x)?x:g(x);if(!_)return!1;const A=Cr(_,v);return w&&A>0||A>=v.width*v.height||A>=_.width*_.height},updateNode:h,updateNodeData:(x,v,w={replace:!1})=>{h(x,S=>{const _=typeof v=="function"?v(S):v;return w.replace?{...S,data:_}:{...S,data:{...S.data,..._}}},w)},updateEdge:y,updateEdgeData:(x,v,w={replace:!1})=>{y(x,S=>{const _=typeof v=="function"?v(S):v;return w.replace?{...S,data:_}:{...S,data:{...S.data,..._}}},w)},getNodesBounds:x=>{const{nodeLookup:v,nodeOrigin:w}=l.getState();return $M(x,{nodeLookup:v,nodeOrigin:w})},getHandleConnections:({type:x,id:v,nodeId:w})=>Array.from(l.getState().connectionLookup.get(`${w}-${x}${v?`-${v}`:""}`)?.values()??[]),getNodeConnections:({type:x,handleId:v,nodeId:w})=>Array.from(l.getState().connectionLookup.get(`${w}${x?v?`-${x}-${v}`:`-${x}`:""}`)?.values()??[]),fitView:async x=>{const v=l.getState().fitViewResolver??QM();return l.setState({fitViewQueued:!0,fitViewOptions:x,fitViewResolver:v}),i.nodeQueue.push(w=>[...w]),v.promise}}},[]);return z.useMemo(()=>({...o,...t,viewportInitialized:r}),[r])}const Yy=t=>t.selected,b3=typeof window<"u"?window:void 0;function E3({deleteKeyCode:t,multiSelectionKeyCode:l}){const i=Nt(),{deleteElements:r}=Hh(),o=Tr(t,{actInsideInputWithModifier:!1}),u=Tr(l,{target:b3});z.useEffect(()=>{if(o){const{edges:f,nodes:m}=i.getState();r({nodes:m.filter(Yy),edges:f.filter(Yy)}),i.setState({nodesSelectionActive:!1})}},[o]),z.useEffect(()=>{i.setState({multiSelectionActive:u})},[u])}function S3(t){const l=Nt();z.useEffect(()=>{const i=()=>{if(!t.current||!(t.current.checkVisibility?.()??!0))return!1;const r=Oh(t.current);(r.height===0||r.width===0)&&l.getState().onError?.("004",ma.error004()),l.setState({width:r.width||500,height:r.height||500})};if(t.current){i(),window.addEventListener("resize",i);const r=new ResizeObserver(()=>i());return r.observe(t.current),()=>{window.removeEventListener("resize",i),r&&t.current&&r.unobserve(t.current)}}},[])}const Pc={position:"absolute",width:"100%",height:"100%",top:0,left:0},w3=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function _3({onPaneContextMenu:t,zoomOnScroll:l=!0,zoomOnPinch:i=!0,panOnScroll:r=!1,panOnScrollSpeed:o=.5,panOnScrollMode:u=fi.Free,zoomOnDoubleClick:f=!0,panOnDrag:m=!0,defaultViewport:g,translateExtent:h,minZoom:y,maxZoom:x,zoomActivationKeyCode:v,preventScrolling:w=!0,children:S,noWheelClassName:_,noPanClassName:A,onViewportChange:C,isControlledViewport:T,paneClickDistance:E,selectionOnDrag:R}){const L=Nt(),D=z.useRef(null),{userSelectionActive:B,lib:Y,connectionInProgress:X}=We(w3,_t),ie=Tr(v),Z=z.useRef();S3(D);const K=z.useCallback(ae=>{C?.({x:ae[0],y:ae[1],zoom:ae[2]}),T||L.setState({transform:ae})},[C,T]);return z.useEffect(()=>{if(D.current){Z.current=OT({domNode:D.current,minZoom:y,maxZoom:x,translateExtent:h,viewport:g,onDraggingChange:M=>L.setState({paneDragging:M}),onPanZoomStart:(M,U)=>{const{onViewportChangeStart:j,onMoveStart:q}=L.getState();q?.(M,U),j?.(U)},onPanZoom:(M,U)=>{const{onViewportChange:j,onMove:q}=L.getState();q?.(M,U),j?.(U)},onPanZoomEnd:(M,U)=>{const{onViewportChangeEnd:j,onMoveEnd:q}=L.getState();q?.(M,U),j?.(U)}});const{x:ae,y:k,zoom:I}=Z.current.getViewport();return L.setState({panZoom:Z.current,transform:[ae,k,I],domNode:D.current.closest(".react-flow")}),()=>{Z.current?.destroy()}}},[]),z.useEffect(()=>{Z.current?.update({onPaneContextMenu:t,zoomOnScroll:l,zoomOnPinch:i,panOnScroll:r,panOnScrollSpeed:o,panOnScrollMode:u,zoomOnDoubleClick:f,panOnDrag:m,zoomActivationKeyPressed:ie,preventScrolling:w,noPanClassName:A,userSelectionActive:B,noWheelClassName:_,lib:Y,onTransformChange:K,connectionInProgress:X,selectionOnDrag:R,paneClickDistance:E})},[t,l,i,r,o,u,f,m,ie,w,A,B,_,Y,K,X,R,E]),p.jsx("div",{className:"react-flow__renderer",ref:D,style:Pc,children:S})}const N3=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function A3(){const{userSelectionActive:t,userSelectionRect:l}=We(N3,_t);return t&&l?p.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:l.width,height:l.height,transform:`translate(${l.x}px, ${l.y}px)`}}):null}const Td=(t,l)=>i=>{i.target===l.current&&t?.(i)},C3=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function M3({isSelecting:t,selectionKeyPressed:l,selectionMode:i=Nr.Full,panOnDrag:r,paneClickDistance:o,selectionOnDrag:u,onSelectionStart:f,onSelectionEnd:m,onPaneClick:g,onPaneContextMenu:h,onPaneScroll:y,onPaneMouseEnter:x,onPaneMouseMove:v,onPaneMouseLeave:w,children:S}){const _=Nt(),{userSelectionActive:A,elementsSelectable:C,dragging:T,connectionInProgress:E}=We(C3,_t),R=C&&(t||A),L=z.useRef(null),D=z.useRef(),B=z.useRef(new Set),Y=z.useRef(new Set),X=z.useRef(!1),ie=j=>{if(X.current||E){X.current=!1;return}g?.(j),_.getState().resetSelectedElements(),_.setState({nodesSelectionActive:!1})},Z=j=>{if(Array.isArray(r)&&r?.includes(2)){j.preventDefault();return}h?.(j)},K=y?j=>y(j):void 0,ae=j=>{X.current&&(j.stopPropagation(),X.current=!1)},k=j=>{const{domNode:q}=_.getState();if(D.current=q?.getBoundingClientRect(),!D.current)return;const te=j.target===L.current;if(!te&&!!j.target.closest(".nokey")||!t||!(u&&te||l)||j.button!==0||!j.isPrimary)return;j.target?.setPointerCapture?.(j.pointerId),X.current=!1;const{x:Q,y:J}=aa(j.nativeEvent,D.current);_.setState({userSelectionRect:{width:0,height:0,startX:Q,startY:J,x:Q,y:J}}),te||(j.stopPropagation(),j.preventDefault())},I=j=>{const{userSelectionRect:q,transform:te,nodeLookup:O,edgeLookup:H,connectionLookup:Q,triggerNodeChanges:J,triggerEdgeChanges:ce,defaultEdgeOptions:he,resetSelectedElements:re}=_.getState();if(!D.current||!q)return;const{x:fe,y:me}=aa(j.nativeEvent,D.current),{startX:Ce,startY:xe}=q;if(!X.current){const Re=l?0:o;if(Math.hypot(fe-Ce,me-xe)<=Re)return;re(),f?.(j)}X.current=!0;const ve={startX:Ce,startY:xe,x:fe<Ce?fe:Ce,y:me<xe?me:xe,width:Math.abs(fe-Ce),height:Math.abs(me-xe)},_e=B.current,He=Y.current;B.current=new Set(Th(O,ve,te,i===Nr.Partial,!0).map(Re=>Re.id)),Y.current=new Set;const lt=he?.selectable??!0;for(const Re of B.current){const Be=Q.get(Re);if(Be)for(const{edgeId:Pe}of Be.values()){const Ge=H.get(Pe);Ge&&(Ge.selectable??lt)&&Y.current.add(Pe)}}if(!gy(_e,B.current)){const Re=ts(O,B.current,!0);J(Re)}if(!gy(He,Y.current)){const Re=ts(H,Y.current);ce(Re)}_.setState({userSelectionRect:ve,userSelectionActive:!0,nodesSelectionActive:!1})},M=j=>{j.button===0&&(j.target?.releasePointerCapture?.(j.pointerId),!A&&j.target===L.current&&_.getState().userSelectionRect&&ie?.(j),_.setState({userSelectionActive:!1,userSelectionRect:null}),X.current&&(m?.(j),_.setState({nodesSelectionActive:B.current.size>0})))},U=r===!0||Array.isArray(r)&&r.includes(0);return p.jsxs("div",{className:qt(["react-flow__pane",{draggable:U,dragging:T,selection:t}]),onClick:R?void 0:Td(ie,L),onContextMenu:Td(Z,L),onWheel:Td(K,L),onPointerEnter:R?void 0:x,onPointerMove:R?I:v,onPointerUp:R?M:void 0,onPointerDownCapture:R?k:void 0,onClickCapture:R?ae:void 0,onPointerLeave:w,ref:L,style:Pc,children:[S,p.jsx(A3,{})]})}function oh({id:t,store:l,unselect:i=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:u,multiSelectionActive:f,nodeLookup:m,onError:g}=l.getState(),h=m.get(t);if(!h){g?.("012",ma.error012(t));return}l.setState({nodesSelectionActive:!1}),h.selected?(i||h.selected&&f)&&(u({nodes:[h],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):o([t])}function mb({nodeRef:t,disabled:l=!1,noDragClassName:i,handleSelector:r,nodeId:o,isSelectable:u,nodeClickDistance:f}){const m=Nt(),[g,h]=z.useState(!1),y=z.useRef();return z.useEffect(()=>{y.current=yT({getStoreItems:()=>m.getState(),onNodeMouseDown:x=>{oh({id:x,store:m,nodeRef:t})},onDragStart:()=>{h(!0)},onDragStop:()=>{h(!1)}})},[]),z.useEffect(()=>{if(l)y.current?.destroy();else if(t.current)return y.current?.update({noDragClassName:i,handleSelector:r,domNode:t.current,isSelectable:u,nodeId:o,nodeClickDistance:f}),()=>{y.current?.destroy()}},[i,r,l,u,t,o]),g}const T3=t=>l=>l.selected&&(l.draggable||t&&typeof l.draggable>"u");function gb(){const t=Nt();return z.useCallback(i=>{const{nodeExtent:r,snapToGrid:o,snapGrid:u,nodesDraggable:f,onError:m,updateNodePositions:g,nodeLookup:h,nodeOrigin:y}=t.getState(),x=new Map,v=T3(f),w=o?u[0]:5,S=o?u[1]:5,_=i.direction.x*w*i.factor,A=i.direction.y*S*i.factor;for(const[,C]of h){if(!v(C))continue;let T={x:C.internals.positionAbsolute.x+_,y:C.internals.positionAbsolute.y+A};o&&(T=Vr(T,u));const{position:E,positionAbsolute:R}=Dv({nodeId:C.id,nextPosition:T,nodeLookup:h,nodeExtent:r,nodeOrigin:y,onError:m});C.position=E,C.internals.positionAbsolute=R,x.set(C.id,C)}g(x)},[])}const Bh=z.createContext(null),R3=Bh.Provider;Bh.Consumer;const pb=()=>z.useContext(Bh),O3=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),z3=(t,l,i)=>r=>{const{connectionClickStartHandle:o,connectionMode:u,connection:f}=r,{fromHandle:m,toHandle:g,isValid:h}=f,y=g?.nodeId===t&&g?.id===l&&g?.type===i;return{connectingFrom:m?.nodeId===t&&m?.id===l&&m?.type===i,connectingTo:y,clickConnecting:o?.nodeId===t&&o?.id===l&&o?.type===i,isPossibleEndHandle:u===rs.Strict?m?.type!==i:t!==m?.nodeId||l!==m?.id,connectionInProcess:!!m,clickConnectionInProcess:!!o,valid:y&&h}};function j3({type:t="source",position:l=Te.Top,isValidConnection:i,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:u=!0,id:f,onConnect:m,children:g,className:h,onMouseDown:y,onTouchStart:x,...v},w){const S=f||null,_=t==="target",A=Nt(),C=pb(),{connectOnClick:T,noPanClassName:E,rfId:R}=We(O3,_t),{connectingFrom:L,connectingTo:D,clickConnecting:B,isPossibleEndHandle:Y,connectionInProcess:X,clickConnectionInProcess:ie,valid:Z}=We(z3(C,S,t),_t);C||A.getState().onError?.("010",ma.error010());const K=I=>{const{defaultEdgeOptions:M,onConnect:U,hasDefaultEdges:j}=A.getState(),q={...M,...I};if(j){const{edges:te,setEdges:O}=A.getState();O(tT(q,te))}U?.(q),m?.(q)},ae=I=>{if(!C)return;const M=Yv(I.nativeEvent);if(o&&(M&&I.button===0||!M)){const U=A.getState();rh.onPointerDown(I.nativeEvent,{handleDomNode:I.currentTarget,autoPanOnConnect:U.autoPanOnConnect,connectionMode:U.connectionMode,connectionRadius:U.connectionRadius,domNode:U.domNode,nodeLookup:U.nodeLookup,lib:U.lib,isTarget:_,handleId:S,nodeId:C,flowId:U.rfId,panBy:U.panBy,cancelConnection:U.cancelConnection,onConnectStart:U.onConnectStart,onConnectEnd:U.onConnectEnd,updateConnection:U.updateConnection,onConnect:K,isValidConnection:i||U.isValidConnection,getTransform:()=>A.getState().transform,getFromHandle:()=>A.getState().connection.fromHandle,autoPanSpeed:U.autoPanSpeed,dragThreshold:U.connectionDragThreshold})}M?y?.(I):x?.(I)},k=I=>{const{onClickConnectStart:M,onClickConnectEnd:U,connectionClickStartHandle:j,connectionMode:q,isValidConnection:te,lib:O,rfId:H,nodeLookup:Q,connection:J}=A.getState();if(!C||!j&&!o)return;if(!j){M?.(I.nativeEvent,{nodeId:C,handleId:S,handleType:t}),A.setState({connectionClickStartHandle:{nodeId:C,type:t,id:S}});return}const ce=$v(I.target),he=i||te,{connection:re,isValid:fe}=rh.isValid(I.nativeEvent,{handle:{nodeId:C,id:S,type:t},connectionMode:q,fromNodeId:j.nodeId,fromHandleId:j.id||null,fromType:j.type,isValidConnection:he,flowId:H,doc:ce,lib:O,nodeLookup:Q});fe&&re&&K(re);const me=structuredClone(J);delete me.inProgress,me.toPosition=me.toHandle?me.toHandle.position:null,U?.(I,me),A.setState({connectionClickStartHandle:null})};return p.jsx("div",{"data-handleid":S,"data-nodeid":C,"data-handlepos":l,"data-id":`${R}-${C}-${S}-${t}`,className:qt(["react-flow__handle",`react-flow__handle-${l}`,"nodrag",E,h,{source:!_,target:_,connectable:r,connectablestart:o,connectableend:u,clickconnecting:B,connectingfrom:L,connectingto:D,valid:Z,connectionindicator:r&&(!X||Y)&&(X||ie?u:o)}]),onMouseDown:ae,onTouchStart:ae,onClick:T?k:void 0,ref:w,...v,children:g})}const Ul=z.memo(db(j3));function D3({data:t,isConnectable:l,sourcePosition:i=Te.Bottom}){return p.jsxs(p.Fragment,{children:[t?.label,p.jsx(Ul,{type:"source",position:i,isConnectable:l})]})}function k3({data:t,isConnectable:l,targetPosition:i=Te.Top,sourcePosition:r=Te.Bottom}){return p.jsxs(p.Fragment,{children:[p.jsx(Ul,{type:"target",position:i,isConnectable:l}),t?.label,p.jsx(Ul,{type:"source",position:r,isConnectable:l})]})}function L3(){return null}function H3({data:t,isConnectable:l,targetPosition:i=Te.Top}){return p.jsxs(p.Fragment,{children:[p.jsx(Ul,{type:"target",position:i,isConnectable:l}),t?.label]})}const Lc={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},qy={input:D3,default:k3,output:H3,group:L3};function B3(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 U3=t=>{const{width:l,height:i,x:r,y:o}=$r(t.nodeLookup,{filter:u=>!!u.selected});return{width:na(l)?l:null,height:na(i)?i:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${r}px,${o}px)`}};function $3({onSelectionContextMenu:t,noPanClassName:l,disableKeyboardA11y:i}){const r=Nt(),{width:o,height:u,transformString:f,userSelectionActive:m}=We(U3,_t),g=gb(),h=z.useRef(null);if(z.useEffect(()=>{i||h.current?.focus({preventScroll:!0})},[i]),mb({nodeRef:h}),m||!o||!u)return null;const y=t?v=>{const w=r.getState().nodes.filter(S=>S.selected);t(v,w)}:void 0,x=v=>{Object.prototype.hasOwnProperty.call(Lc,v.key)&&(v.preventDefault(),g({direction:Lc[v.key],factor:v.shiftKey?4:1}))};return p.jsx("div",{className:qt(["react-flow__nodesselection","react-flow__container",l]),style:{transform:f},children:p.jsx("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:y,tabIndex:i?void 0:-1,onKeyDown:i?void 0:x,style:{width:o,height:u}})})}const Gy=typeof window<"u"?window:void 0,V3=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function yb({children:t,onPaneClick:l,onPaneMouseEnter:i,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:u,onPaneScroll:f,paneClickDistance:m,deleteKeyCode:g,selectionKeyCode:h,selectionOnDrag:y,selectionMode:x,onSelectionStart:v,onSelectionEnd:w,multiSelectionKeyCode:S,panActivationKeyCode:_,zoomActivationKeyCode:A,elementsSelectable:C,zoomOnScroll:T,zoomOnPinch:E,panOnScroll:R,panOnScrollSpeed:L,panOnScrollMode:D,zoomOnDoubleClick:B,panOnDrag:Y,defaultViewport:X,translateExtent:ie,minZoom:Z,maxZoom:K,preventScrolling:ae,onSelectionContextMenu:k,noWheelClassName:I,noPanClassName:M,disableKeyboardA11y:U,onViewportChange:j,isControlledViewport:q}){const{nodesSelectionActive:te,userSelectionActive:O}=We(V3,_t),H=Tr(h,{target:Gy}),Q=Tr(_,{target:Gy}),J=Q||Y,ce=Q||R,he=y&&J!==!0,re=H||O||he;return E3({deleteKeyCode:g,multiSelectionKeyCode:S}),p.jsx(_3,{onPaneContextMenu:u,elementsSelectable:C,zoomOnScroll:T,zoomOnPinch:E,panOnScroll:ce,panOnScrollSpeed:L,panOnScrollMode:D,zoomOnDoubleClick:B,panOnDrag:!H&&J,defaultViewport:X,translateExtent:ie,minZoom:Z,maxZoom:K,zoomActivationKeyCode:A,preventScrolling:ae,noWheelClassName:I,noPanClassName:M,onViewportChange:j,isControlledViewport:q,paneClickDistance:m,selectionOnDrag:he,children:p.jsxs(M3,{onSelectionStart:v,onSelectionEnd:w,onPaneClick:l,onPaneMouseEnter:i,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:u,onPaneScroll:f,panOnDrag:J,isSelecting:!!re,selectionMode:x,selectionKeyPressed:H,paneClickDistance:m,selectionOnDrag:he,children:[t,te&&p.jsx($3,{onSelectionContextMenu:k,noPanClassName:M,disableKeyboardA11y:U})]})})}yb.displayName="FlowRenderer";const Y3=z.memo(yb),q3=t=>l=>t?Th(l.nodeLookup,{x:0,y:0,width:l.width,height:l.height},l.transform,!0).map(i=>i.id):Array.from(l.nodeLookup.keys());function G3(t){return We(z.useCallback(q3(t),[t]),_t)}const X3=t=>t.updateNodeInternals;function Z3(){const t=We(X3),[l]=z.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(i=>{const r=new Map;i.forEach(o=>{const u=o.target.getAttribute("data-id");r.set(u,{id:u,nodeElement:o.target,force:!0})}),t(r)}));return z.useEffect(()=>()=>{l?.disconnect()},[l]),l}function I3({node:t,nodeType:l,hasDimensions:i,resizeObserver:r}){const o=Nt(),u=z.useRef(null),f=z.useRef(null),m=z.useRef(t.sourcePosition),g=z.useRef(t.targetPosition),h=z.useRef(l),y=i&&!!t.internals.handleBounds;return z.useEffect(()=>{u.current&&!t.hidden&&(!y||f.current!==u.current)&&(f.current&&r?.unobserve(f.current),r?.observe(u.current),f.current=u.current)},[y,t.hidden]),z.useEffect(()=>()=>{f.current&&(r?.unobserve(f.current),f.current=null)},[]),z.useEffect(()=>{if(u.current){const x=h.current!==l,v=m.current!==t.sourcePosition,w=g.current!==t.targetPosition;(x||v||w)&&(h.current=l,m.current=t.sourcePosition,g.current=t.targetPosition,o.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:u.current,force:!0}]])))}},[t.id,l,t.sourcePosition,t.targetPosition]),u}function Q3({id:t,onClick:l,onMouseEnter:i,onMouseMove:r,onMouseLeave:o,onContextMenu:u,onDoubleClick:f,nodesDraggable:m,elementsSelectable:g,nodesConnectable:h,nodesFocusable:y,resizeObserver:x,noDragClassName:v,noPanClassName:w,disableKeyboardA11y:S,rfId:_,nodeTypes:A,nodeClickDistance:C,onError:T}){const{node:E,internals:R,isParent:L}=We(fe=>{const me=fe.nodeLookup.get(t),Ce=fe.parentLookup.has(t);return{node:me,internals:me.internals,isParent:Ce}},_t);let D=E.type||"default",B=A?.[D]||qy[D];B===void 0&&(T?.("003",ma.error003(D)),D="default",B=A?.default||qy.default);const Y=!!(E.draggable||m&&typeof E.draggable>"u"),X=!!(E.selectable||g&&typeof E.selectable>"u"),ie=!!(E.connectable||h&&typeof E.connectable>"u"),Z=!!(E.focusable||y&&typeof E.focusable>"u"),K=Nt(),ae=Bv(E),k=I3({node:E,nodeType:D,hasDimensions:ae,resizeObserver:x}),I=mb({nodeRef:k,disabled:E.hidden||!Y,noDragClassName:v,handleSelector:E.dragHandle,nodeId:t,isSelectable:X,nodeClickDistance:C}),M=gb();if(E.hidden)return null;const U=tl(E),j=B3(E),q=X||Y||l||i||r||o,te=i?fe=>i(fe,{...R.userNode}):void 0,O=r?fe=>r(fe,{...R.userNode}):void 0,H=o?fe=>o(fe,{...R.userNode}):void 0,Q=u?fe=>u(fe,{...R.userNode}):void 0,J=f?fe=>f(fe,{...R.userNode}):void 0,ce=fe=>{const{selectNodesOnDrag:me,nodeDragThreshold:Ce}=K.getState();X&&(!me||!Y||Ce>0)&&oh({id:t,store:K,nodeRef:k}),l&&l(fe,{...R.userNode})},he=fe=>{if(!(Vv(fe.nativeEvent)||S)){if(Tv.includes(fe.key)&&X){const me=fe.key==="Escape";oh({id:t,store:K,unselect:me,nodeRef:k})}else if(Y&&E.selected&&Object.prototype.hasOwnProperty.call(Lc,fe.key)){fe.preventDefault();const{ariaLabelConfig:me}=K.getState();K.setState({ariaLiveMessage:me["node.a11yDescription.ariaLiveMessage"]({direction:fe.key.replace("Arrow","").toLowerCase(),x:~~R.positionAbsolute.x,y:~~R.positionAbsolute.y})}),M({direction:Lc[fe.key],factor:fe.shiftKey?4:1})}}},re=()=>{if(S||!k.current?.matches(":focus-visible"))return;const{transform:fe,width:me,height:Ce,autoPanOnNodeFocus:xe,setCenter:ve}=K.getState();if(!xe)return;Th(new Map([[t,E]]),{x:0,y:0,width:me,height:Ce},fe,!0).length>0||ve(E.position.x+U.width/2,E.position.y+U.height/2,{zoom:fe[2]})};return p.jsx("div",{className:qt(["react-flow__node",`react-flow__node-${D}`,{[w]:Y},E.className,{selected:E.selected,selectable:X,parent:L,draggable:Y,dragging:I}]),ref:k,style:{zIndex:R.z,transform:`translate(${R.positionAbsolute.x}px,${R.positionAbsolute.y}px)`,pointerEvents:q?"all":"none",visibility:ae?"visible":"hidden",...E.style,...j},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:te,onMouseMove:O,onMouseLeave:H,onContextMenu:Q,onClick:ce,onDoubleClick:J,onKeyDown:Z?he:void 0,tabIndex:Z?0:void 0,onFocus:Z?re:void 0,role:E.ariaRole??(Z?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${sb}-${_}`,"aria-label":E.ariaLabel,...E.domAttributes,children:p.jsx(R3,{value:t,children:p.jsx(B,{id:t,data:E.data,type:D,positionAbsoluteX:R.positionAbsolute.x,positionAbsoluteY:R.positionAbsolute.y,selected:E.selected??!1,selectable:X,draggable:Y,deletable:E.deletable??!0,isConnectable:ie,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:I,dragHandle:E.dragHandle,zIndex:R.z,parentId:E.parentId,...U})})})}var K3=z.memo(Q3);const F3=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function xb(t){const{nodesDraggable:l,nodesConnectable:i,nodesFocusable:r,elementsSelectable:o,onError:u}=We(F3,_t),f=G3(t.onlyRenderVisibleElements),m=Z3();return p.jsx("div",{className:"react-flow__nodes",style:Pc,children:f.map(g=>p.jsx(K3,{id:g,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:m,nodesDraggable:l,nodesConnectable:i,nodesFocusable:r,elementsSelectable:o,nodeClickDistance:t.nodeClickDistance,onError:u},g))})}xb.displayName="NodeRenderer";const J3=z.memo(xb);function P3(t){return We(z.useCallback(i=>{if(!t)return i.edges.map(o=>o.id);const r=[];if(i.width&&i.height)for(const o of i.edges){const u=i.nodeLookup.get(o.source),f=i.nodeLookup.get(o.target);u&&f&&PM({sourceNode:u,targetNode:f,width:i.width,height:i.height,transform:i.transform})&&r.push(o.id)}return r},[t]),_t)}const W3=({color:t="none",strokeWidth:l=1})=>{const i={strokeWidth:l,...t&&{stroke:t}};return p.jsx("polyline",{className:"arrow",style:i,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},e4=({color:t="none",strokeWidth:l=1})=>{const i={strokeWidth:l,...t&&{stroke:t,fill:t}};return p.jsx("polyline",{className:"arrowclosed",style:i,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Xy={[Ar.Arrow]:W3,[Ar.ArrowClosed]:e4};function t4(t){const l=Nt();return z.useMemo(()=>Object.prototype.hasOwnProperty.call(Xy,t)?Xy[t]:(l.getState().onError?.("009",ma.error009(t)),null),[t])}const n4=({id:t,type:l,color:i,width:r=12.5,height:o=12.5,markerUnits:u="strokeWidth",strokeWidth:f,orient:m="auto-start-reverse"})=>{const g=t4(l);return g?p.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:u,orient:m,refX:"0",refY:"0",children:p.jsx(g,{color:i,strokeWidth:f})}):null},vb=({defaultColor:t,rfId:l})=>{const i=We(u=>u.edges),r=We(u=>u.defaultEdgeOptions),o=z.useMemo(()=>sT(i,{id:l,defaultColor:t,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[i,r,l,t]);return o.length?p.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:p.jsx("defs",{children:o.map(u=>p.jsx(n4,{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};vb.displayName="MarkerDefinitions";var a4=z.memo(vb);function bb({x:t,y:l,label:i,labelStyle:r,labelShowBg:o=!0,labelBgStyle:u,labelBgPadding:f=[2,4],labelBgBorderRadius:m=2,children:g,className:h,...y}){const[x,v]=z.useState({x:1,y:0,width:0,height:0}),w=qt(["react-flow__edge-textwrapper",h]),S=z.useRef(null);return z.useEffect(()=>{if(S.current){const _=S.current.getBBox();v({x:_.x,y:_.y,width:_.width,height:_.height})}},[i]),i?p.jsxs("g",{transform:`translate(${t-x.width/2} ${l-x.height/2})`,className:w,visibility:x.width?"visible":"hidden",...y,children:[o&&p.jsx("rect",{width:x.width+2*f[0],x:-f[0],y:-f[1],height:x.height+2*f[1],className:"react-flow__edge-textbg",style:u,rx:m,ry:m}),p.jsx("text",{className:"react-flow__edge-text",y:x.height/2,dy:"0.3em",ref:S,style:r,children:i}),g]}):null}bb.displayName="EdgeText";const l4=z.memo(bb);function Wc({path:t,labelX:l,labelY:i,label:r,labelStyle:o,labelShowBg:u,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g,interactionWidth:h=20,...y}){return p.jsxs(p.Fragment,{children:[p.jsx("path",{...y,d:t,fill:"none",className:qt(["react-flow__edge-path",y.className])}),h?p.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}):null,r&&na(l)&&na(i)?p.jsx(l4,{x:l,y:i,label:r,labelStyle:o,labelShowBg:u,labelBgStyle:f,labelBgPadding:m,labelBgBorderRadius:g}):null]})}function Zy({pos:t,x1:l,y1:i,x2:r,y2:o}){return t===Te.Left||t===Te.Right?[.5*(l+r),i]:[l,.5*(i+o)]}function Eb({sourceX:t,sourceY:l,sourcePosition:i=Te.Bottom,targetX:r,targetY:o,targetPosition:u=Te.Top}){const[f,m]=Zy({pos:i,x1:t,y1:l,x2:r,y2:o}),[g,h]=Zy({pos:u,x1:r,y1:o,x2:t,y2:l}),[y,x,v,w]=qv({sourceX:t,sourceY:l,targetX:r,targetY:o,sourceControlX:f,sourceControlY:m,targetControlX:g,targetControlY:h});return[`M${t},${l} C${f},${m} ${g},${h} ${r},${o}`,y,x,v,w]}function Sb(t){return z.memo(({id:l,sourceX:i,sourceY:r,targetX:o,targetY:u,sourcePosition:f,targetPosition:m,label:g,labelStyle:h,labelShowBg:y,labelBgStyle:x,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:_,markerStart:A,interactionWidth:C})=>{const[T,E,R]=Eb({sourceX:i,sourceY:r,sourcePosition:f,targetX:o,targetY:u,targetPosition:m}),L=t.isInternal?void 0:l;return p.jsx(Wc,{id:L,path:T,labelX:E,labelY:R,label:g,labelStyle:h,labelShowBg:y,labelBgStyle:x,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:_,markerStart:A,interactionWidth:C})})}const i4=Sb({isInternal:!1}),wb=Sb({isInternal:!0});i4.displayName="SimpleBezierEdge";wb.displayName="SimpleBezierEdgeInternal";function _b(t){return z.memo(({id:l,sourceX:i,sourceY:r,targetX:o,targetY:u,label:f,labelStyle:m,labelShowBg:g,labelBgStyle:h,labelBgPadding:y,labelBgBorderRadius:x,style:v,sourcePosition:w=Te.Bottom,targetPosition:S=Te.Top,markerEnd:_,markerStart:A,pathOptions:C,interactionWidth:T})=>{const[E,R,L]=lh({sourceX:i,sourceY:r,sourcePosition:w,targetX:o,targetY:u,targetPosition:S,borderRadius:C?.borderRadius,offset:C?.offset,stepPosition:C?.stepPosition}),D=t.isInternal?void 0:l;return p.jsx(Wc,{id:D,path:E,labelX:R,labelY:L,label:f,labelStyle:m,labelShowBg:g,labelBgStyle:h,labelBgPadding:y,labelBgBorderRadius:x,style:v,markerEnd:_,markerStart:A,interactionWidth:T})})}const Nb=_b({isInternal:!1}),Ab=_b({isInternal:!0});Nb.displayName="SmoothStepEdge";Ab.displayName="SmoothStepEdgeInternal";function Cb(t){return z.memo(({id:l,...i})=>{const r=t.isInternal?void 0:l;return p.jsx(Nb,{...i,id:r,pathOptions:z.useMemo(()=>({borderRadius:0,offset:i.pathOptions?.offset}),[i.pathOptions?.offset])})})}const s4=Cb({isInternal:!1}),Mb=Cb({isInternal:!0});s4.displayName="StepEdge";Mb.displayName="StepEdgeInternal";function Tb(t){return z.memo(({id:l,sourceX:i,sourceY:r,targetX:o,targetY:u,label:f,labelStyle:m,labelShowBg:g,labelBgStyle:h,labelBgPadding:y,labelBgBorderRadius:x,style:v,markerEnd:w,markerStart:S,interactionWidth:_})=>{const[A,C,T]=Zv({sourceX:i,sourceY:r,targetX:o,targetY:u}),E=t.isInternal?void 0:l;return p.jsx(Wc,{id:E,path:A,labelX:C,labelY:T,label:f,labelStyle:m,labelShowBg:g,labelBgStyle:h,labelBgPadding:y,labelBgBorderRadius:x,style:v,markerEnd:w,markerStart:S,interactionWidth:_})})}const r4=Tb({isInternal:!1}),Rb=Tb({isInternal:!0});r4.displayName="StraightEdge";Rb.displayName="StraightEdgeInternal";function Ob(t){return z.memo(({id:l,sourceX:i,sourceY:r,targetX:o,targetY:u,sourcePosition:f=Te.Bottom,targetPosition:m=Te.Top,label:g,labelStyle:h,labelShowBg:y,labelBgStyle:x,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:_,markerStart:A,pathOptions:C,interactionWidth:T})=>{const[E,R,L]=Gv({sourceX:i,sourceY:r,sourcePosition:f,targetX:o,targetY:u,targetPosition:m,curvature:C?.curvature}),D=t.isInternal?void 0:l;return p.jsx(Wc,{id:D,path:E,labelX:R,labelY:L,label:g,labelStyle:h,labelShowBg:y,labelBgStyle:x,labelBgPadding:v,labelBgBorderRadius:w,style:S,markerEnd:_,markerStart:A,interactionWidth:T})})}const o4=Ob({isInternal:!1}),zb=Ob({isInternal:!0});o4.displayName="BezierEdge";zb.displayName="BezierEdgeInternal";const Iy={default:zb,straight:Rb,step:Mb,smoothstep:Ab,simplebezier:wb},Qy={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},c4=(t,l,i)=>i===Te.Left?t-l:i===Te.Right?t+l:t,u4=(t,l,i)=>i===Te.Top?t-l:i===Te.Bottom?t+l:t,Ky="react-flow__edgeupdater";function Fy({position:t,centerX:l,centerY:i,radius:r=10,onMouseDown:o,onMouseEnter:u,onMouseOut:f,type:m}){return p.jsx("circle",{onMouseDown:o,onMouseEnter:u,onMouseOut:f,className:qt([Ky,`${Ky}-${m}`]),cx:c4(l,r,t),cy:u4(i,r,t),r,stroke:"transparent",fill:"transparent"})}function f4({isReconnectable:t,reconnectRadius:l,edge:i,sourceX:r,sourceY:o,targetX:u,targetY:f,sourcePosition:m,targetPosition:g,onReconnect:h,onReconnectStart:y,onReconnectEnd:x,setReconnecting:v,setUpdateHover:w}){const S=Nt(),_=(R,L)=>{if(R.button!==0)return;const{autoPanOnConnect:D,domNode:B,isValidConnection:Y,connectionMode:X,connectionRadius:ie,lib:Z,onConnectStart:K,onConnectEnd:ae,cancelConnection:k,nodeLookup:I,rfId:M,panBy:U,updateConnection:j}=S.getState(),q=L.type==="target",te=(Q,J)=>{v(!1),x?.(Q,i,L.type,J)},O=Q=>h?.(i,Q),H=(Q,J)=>{v(!0),y?.(R,i,L.type),K?.(Q,J)};rh.onPointerDown(R.nativeEvent,{autoPanOnConnect:D,connectionMode:X,connectionRadius:ie,domNode:B,handleId:L.id,nodeId:L.nodeId,nodeLookup:I,isTarget:q,edgeUpdaterType:L.type,lib:Z,flowId:M,cancelConnection:k,panBy:U,isValidConnection:Y,onConnect:O,onConnectStart:H,onConnectEnd:ae,onReconnectEnd:te,updateConnection:j,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:R.currentTarget})},A=R=>_(R,{nodeId:i.target,id:i.targetHandle??null,type:"target"}),C=R=>_(R,{nodeId:i.source,id:i.sourceHandle??null,type:"source"}),T=()=>w(!0),E=()=>w(!1);return p.jsxs(p.Fragment,{children:[(t===!0||t==="source")&&p.jsx(Fy,{position:m,centerX:r,centerY:o,radius:l,onMouseDown:A,onMouseEnter:T,onMouseOut:E,type:"source"}),(t===!0||t==="target")&&p.jsx(Fy,{position:g,centerX:u,centerY:f,radius:l,onMouseDown:C,onMouseEnter:T,onMouseOut:E,type:"target"})]})}function d4({id:t,edgesFocusable:l,edgesReconnectable:i,elementsSelectable:r,onClick:o,onDoubleClick:u,onContextMenu:f,onMouseEnter:m,onMouseMove:g,onMouseLeave:h,reconnectRadius:y,onReconnect:x,onReconnectStart:v,onReconnectEnd:w,rfId:S,edgeTypes:_,noPanClassName:A,onError:C,disableKeyboardA11y:T}){let E=We(ve=>ve.edgeLookup.get(t));const R=We(ve=>ve.defaultEdgeOptions);E=R?{...R,...E}:E;let L=E.type||"default",D=_?.[L]||Iy[L];D===void 0&&(C?.("011",ma.error011(L)),L="default",D=_?.default||Iy.default);const B=!!(E.focusable||l&&typeof E.focusable>"u"),Y=typeof x<"u"&&(E.reconnectable||i&&typeof E.reconnectable>"u"),X=!!(E.selectable||r&&typeof E.selectable>"u"),ie=z.useRef(null),[Z,K]=z.useState(!1),[ae,k]=z.useState(!1),I=Nt(),{zIndex:M,sourceX:U,sourceY:j,targetX:q,targetY:te,sourcePosition:O,targetPosition:H}=We(z.useCallback(ve=>{const _e=ve.nodeLookup.get(E.source),He=ve.nodeLookup.get(E.target);if(!_e||!He)return{zIndex:E.zIndex,...Qy};const lt=iT({id:t,sourceNode:_e,targetNode:He,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:ve.connectionMode,onError:C});return{zIndex:JM({selected:E.selected,zIndex:E.zIndex,sourceNode:_e,targetNode:He,elevateOnSelect:ve.elevateEdgesOnSelect,zIndexMode:ve.zIndexMode}),...lt||Qy}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),_t),Q=z.useMemo(()=>E.markerStart?`url('#${ih(E.markerStart,S)}')`:void 0,[E.markerStart,S]),J=z.useMemo(()=>E.markerEnd?`url('#${ih(E.markerEnd,S)}')`:void 0,[E.markerEnd,S]);if(E.hidden||U===null||j===null||q===null||te===null)return null;const ce=ve=>{const{addSelectedEdges:_e,unselectNodesAndEdges:He,multiSelectionActive:lt}=I.getState();X&&(I.setState({nodesSelectionActive:!1}),E.selected&<?(He({nodes:[],edges:[E]}),ie.current?.blur()):_e([t])),o&&o(ve,E)},he=u?ve=>{u(ve,{...E})}:void 0,re=f?ve=>{f(ve,{...E})}:void 0,fe=m?ve=>{m(ve,{...E})}:void 0,me=g?ve=>{g(ve,{...E})}:void 0,Ce=h?ve=>{h(ve,{...E})}:void 0,xe=ve=>{if(!T&&Tv.includes(ve.key)&&X){const{unselectNodesAndEdges:_e,addSelectedEdges:He}=I.getState();ve.key==="Escape"?(ie.current?.blur(),_e({edges:[E]})):He([t])}};return p.jsx("svg",{style:{zIndex:M},children:p.jsxs("g",{className:qt(["react-flow__edge",`react-flow__edge-${L}`,E.className,A,{selected:E.selected,animated:E.animated,inactive:!X&&!o,updating:Z,selectable:X}]),onClick:ce,onDoubleClick:he,onContextMenu:re,onMouseEnter:fe,onMouseMove:me,onMouseLeave:Ce,onKeyDown:B?xe:void 0,tabIndex:B?0:void 0,role:E.ariaRole??(B?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":B?`${rb}-${S}`:void 0,ref:ie,...E.domAttributes,children:[!ae&&p.jsx(D,{id:t,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:X,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:U,sourceY:j,targetX:q,targetY:te,sourcePosition:O,targetPosition:H,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:Q,markerEnd:J,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),Y&&p.jsx(f4,{edge:E,isReconnectable:Y,reconnectRadius:y,onReconnect:x,onReconnectStart:v,onReconnectEnd:w,sourceX:U,sourceY:j,targetX:q,targetY:te,sourcePosition:O,targetPosition:H,setUpdateHover:K,setReconnecting:k})]})})}var h4=z.memo(d4);const m4=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function jb({defaultMarkerColor:t,onlyRenderVisibleElements:l,rfId:i,edgeTypes:r,noPanClassName:o,onReconnect:u,onEdgeContextMenu:f,onEdgeMouseEnter:m,onEdgeMouseMove:g,onEdgeMouseLeave:h,onEdgeClick:y,reconnectRadius:x,onEdgeDoubleClick:v,onReconnectStart:w,onReconnectEnd:S,disableKeyboardA11y:_}){const{edgesFocusable:A,edgesReconnectable:C,elementsSelectable:T,onError:E}=We(m4,_t),R=P3(l);return p.jsxs("div",{className:"react-flow__edges",children:[p.jsx(a4,{defaultColor:t,rfId:i}),R.map(L=>p.jsx(h4,{id:L,edgesFocusable:A,edgesReconnectable:C,elementsSelectable:T,noPanClassName:o,onReconnect:u,onContextMenu:f,onMouseEnter:m,onMouseMove:g,onMouseLeave:h,onClick:y,reconnectRadius:x,onDoubleClick:v,onReconnectStart:w,onReconnectEnd:S,rfId:i,onError:E,edgeTypes:r,disableKeyboardA11y:_},L))]})}jb.displayName="EdgeRenderer";const g4=z.memo(jb),p4=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function y4({children:t}){const l=We(p4);return p.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:l},children:t})}function x4(t){const l=Hh(),i=z.useRef(!1);z.useEffect(()=>{!i.current&&l.viewportInitialized&&t&&(setTimeout(()=>t(l),1),i.current=!0)},[t,l.viewportInitialized])}const v4=t=>t.panZoom?.syncViewport;function b4(t){const l=We(v4),i=Nt();return z.useEffect(()=>{t&&(l?.(t),i.setState({transform:[t.x,t.y,t.zoom]}))},[t,l]),null}function E4(t){return t.connection.inProgress?{...t.connection,to:Yr(t.connection.to,t.transform)}:{...t.connection}}function S4(t){return E4}function w4(t){const l=S4();return We(l,_t)}const _4=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function N4({containerStyle:t,style:l,type:i,component:r}){const{nodesConnectable:o,width:u,height:f,isValid:m,inProgress:g}=We(_4,_t);return!(u&&o&&g)?null:p.jsx("svg",{style:t,width:u,height:f,className:"react-flow__connectionline react-flow__container",children:p.jsx("g",{className:qt(["react-flow__connection",zv(m)]),children:p.jsx(Db,{style:l,type:i,CustomComponent:r,isValid:m})})})}const Db=({style:t,type:l=Ll.Bezier,CustomComponent:i,isValid:r})=>{const{inProgress:o,from:u,fromNode:f,fromHandle:m,fromPosition:g,to:h,toNode:y,toHandle:x,toPosition:v,pointer:w}=w4();if(!o)return;if(i)return p.jsx(i,{connectionLineType:l,connectionLineStyle:t,fromNode:f,fromHandle:m,fromX:u.x,fromY:u.y,toX:h.x,toY:h.y,fromPosition:g,toPosition:v,connectionStatus:zv(r),toNode:y,toHandle:x,pointer:w});let S="";const _={sourceX:u.x,sourceY:u.y,sourcePosition:g,targetX:h.x,targetY:h.y,targetPosition:v};switch(l){case Ll.Bezier:[S]=Gv(_);break;case Ll.SimpleBezier:[S]=Eb(_);break;case Ll.Step:[S]=lh({..._,borderRadius:0});break;case Ll.SmoothStep:[S]=lh(_);break;default:[S]=Zv(_)}return p.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:t})};Db.displayName="ConnectionLine";const A4={};function Jy(t=A4){z.useRef(t),Nt(),z.useEffect(()=>{},[t])}function C4(){Nt(),z.useRef(!1),z.useEffect(()=>{},[])}function kb({nodeTypes:t,edgeTypes:l,onInit:i,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:u,onEdgeDoubleClick:f,onNodeMouseEnter:m,onNodeMouseMove:g,onNodeMouseLeave:h,onNodeContextMenu:y,onSelectionContextMenu:x,onSelectionStart:v,onSelectionEnd:w,connectionLineType:S,connectionLineStyle:_,connectionLineComponent:A,connectionLineContainerStyle:C,selectionKeyCode:T,selectionOnDrag:E,selectionMode:R,multiSelectionKeyCode:L,panActivationKeyCode:D,zoomActivationKeyCode:B,deleteKeyCode:Y,onlyRenderVisibleElements:X,elementsSelectable:ie,defaultViewport:Z,translateExtent:K,minZoom:ae,maxZoom:k,preventScrolling:I,defaultMarkerColor:M,zoomOnScroll:U,zoomOnPinch:j,panOnScroll:q,panOnScrollSpeed:te,panOnScrollMode:O,zoomOnDoubleClick:H,panOnDrag:Q,onPaneClick:J,onPaneMouseEnter:ce,onPaneMouseMove:he,onPaneMouseLeave:re,onPaneScroll:fe,onPaneContextMenu:me,paneClickDistance:Ce,nodeClickDistance:xe,onEdgeContextMenu:ve,onEdgeMouseEnter:_e,onEdgeMouseMove:He,onEdgeMouseLeave:lt,reconnectRadius:Re,onReconnect:Be,onReconnectStart:Pe,onReconnectEnd:Ge,noDragClassName:xt,noWheelClassName:It,noPanClassName:gt,disableKeyboardA11y:vt,nodeExtent:Fe,rfId:zn,viewport:Gt,onViewportChange:ln}){return Jy(t),Jy(l),C4(),x4(i),b4(Gt),p.jsx(Y3,{onPaneClick:J,onPaneMouseEnter:ce,onPaneMouseMove:he,onPaneMouseLeave:re,onPaneContextMenu:me,onPaneScroll:fe,paneClickDistance:Ce,deleteKeyCode:Y,selectionKeyCode:T,selectionOnDrag:E,selectionMode:R,onSelectionStart:v,onSelectionEnd:w,multiSelectionKeyCode:L,panActivationKeyCode:D,zoomActivationKeyCode:B,elementsSelectable:ie,zoomOnScroll:U,zoomOnPinch:j,zoomOnDoubleClick:H,panOnScroll:q,panOnScrollSpeed:te,panOnScrollMode:O,panOnDrag:Q,defaultViewport:Z,translateExtent:K,minZoom:ae,maxZoom:k,onSelectionContextMenu:x,preventScrolling:I,noDragClassName:xt,noWheelClassName:It,noPanClassName:gt,disableKeyboardA11y:vt,onViewportChange:ln,isControlledViewport:!!Gt,children:p.jsxs(y4,{children:[p.jsx(g4,{edgeTypes:l,onEdgeClick:o,onEdgeDoubleClick:f,onReconnect:Be,onReconnectStart:Pe,onReconnectEnd:Ge,onlyRenderVisibleElements:X,onEdgeContextMenu:ve,onEdgeMouseEnter:_e,onEdgeMouseMove:He,onEdgeMouseLeave:lt,reconnectRadius:Re,defaultMarkerColor:M,noPanClassName:gt,disableKeyboardA11y:vt,rfId:zn}),p.jsx(N4,{style:_,type:S,component:A,containerStyle:C}),p.jsx("div",{className:"react-flow__edgelabel-renderer"}),p.jsx(J3,{nodeTypes:t,onNodeClick:r,onNodeDoubleClick:u,onNodeMouseEnter:m,onNodeMouseMove:g,onNodeMouseLeave:h,onNodeContextMenu:y,nodeClickDistance:xe,onlyRenderVisibleElements:X,noPanClassName:gt,noDragClassName:xt,disableKeyboardA11y:vt,nodeExtent:Fe,rfId:zn}),p.jsx("div",{className:"react-flow__viewport-portal"})]})})}kb.displayName="GraphView";const M4=z.memo(kb),Py=({nodes:t,edges:l,defaultNodes:i,defaultEdges:r,width:o,height:u,fitView:f,fitViewOptions:m,minZoom:g=.5,maxZoom:h=2,nodeOrigin:y,nodeExtent:x,zIndexMode:v="basic"}={})=>{const w=new Map,S=new Map,_=new Map,A=new Map,C=r??l??[],T=i??t??[],E=y??[0,0],R=x??_r;Kv(_,A,C);const L=sh(T,w,S,{nodeOrigin:E,nodeExtent:R,zIndexMode:v});let D=[0,0,1];if(f&&o&&u){const B=$r(w,{filter:Z=>!!((Z.width||Z.initialWidth)&&(Z.height||Z.initialHeight))}),{x:Y,y:X,zoom:ie}=Rh(B,o,u,g,h,m?.padding??.1);D=[Y,X,ie]}return{rfId:"1",width:o??0,height:u??0,transform:D,nodes:T,nodesInitialized:L,nodeLookup:w,parentLookup:S,edges:C,edgeLookup:A,connectionLookup:_,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:i!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:g,maxZoom:h,translateExtent:_r,nodeExtent:R,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:rs.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:E,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:f??!1,fitViewOptions:m,fitViewResolver:null,connection:{...Ov},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:XM,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Rv,zIndexMode:v,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},T4=({nodes:t,edges:l,defaultNodes:i,defaultEdges:r,width:o,height:u,fitView:f,fitViewOptions:m,minZoom:g,maxZoom:h,nodeOrigin:y,nodeExtent:x,zIndexMode:v})=>IT((w,S)=>{async function _(){const{nodeLookup:A,panZoom:C,fitViewOptions:T,fitViewResolver:E,width:R,height:L,minZoom:D,maxZoom:B}=S();C&&(await qM({nodes:A,width:R,height:L,panZoom:C,minZoom:D,maxZoom:B},T),E?.resolve(!0),w({fitViewResolver:null}))}return{...Py({nodes:t,edges:l,width:o,height:u,fitView:f,fitViewOptions:m,minZoom:g,maxZoom:h,nodeOrigin:y,nodeExtent:x,defaultNodes:i,defaultEdges:r,zIndexMode:v}),setNodes:A=>{const{nodeLookup:C,parentLookup:T,nodeOrigin:E,elevateNodesOnSelect:R,fitViewQueued:L,zIndexMode:D}=S(),B=sh(A,C,T,{nodeOrigin:E,nodeExtent:x,elevateNodesOnSelect:R,checkEquality:!0,zIndexMode:D});L&&B?(_(),w({nodes:A,nodesInitialized:B,fitViewQueued:!1,fitViewOptions:void 0})):w({nodes:A,nodesInitialized:B})},setEdges:A=>{const{connectionLookup:C,edgeLookup:T}=S();Kv(C,T,A),w({edges:A})},setDefaultNodesAndEdges:(A,C)=>{if(A){const{setNodes:T}=S();T(A),w({hasDefaultNodes:!0})}if(C){const{setEdges:T}=S();T(C),w({hasDefaultEdges:!0})}},updateNodeInternals:A=>{const{triggerNodeChanges:C,nodeLookup:T,parentLookup:E,domNode:R,nodeOrigin:L,nodeExtent:D,debug:B,fitViewQueued:Y,zIndexMode:X}=S(),{changes:ie,updatedInternals:Z}=hT(A,T,E,R,L,D,X);Z&&(cT(T,E,{nodeOrigin:L,nodeExtent:D,zIndexMode:X}),Y?(_(),w({fitViewQueued:!1,fitViewOptions:void 0})):w({}),ie?.length>0&&(B&&console.log("React Flow: trigger node changes",ie),C?.(ie)))},updateNodePositions:(A,C=!1)=>{const T=[];let E=[];const{nodeLookup:R,triggerNodeChanges:L,connection:D,updateConnection:B,onNodesChangeMiddlewareMap:Y}=S();for(const[X,ie]of A){const Z=R.get(X),K=!!(Z?.expandParent&&Z?.parentId&&ie?.position),ae={id:X,type:"position",position:K?{x:Math.max(0,ie.position.x),y:Math.max(0,ie.position.y)}:ie.position,dragging:C};if(Z&&D.inProgress&&D.fromNode.id===Z.id){const k=yi(Z,D.fromHandle,Te.Left,!0);B({...D,from:k})}K&&Z.parentId&&T.push({id:X,parentId:Z.parentId,rect:{...ie.internals.positionAbsolute,width:ie.measured.width??0,height:ie.measured.height??0}}),E.push(ae)}if(T.length>0){const{parentLookup:X,nodeOrigin:ie}=S(),Z=Lh(T,R,X,ie);E.push(...Z)}for(const X of Y.values())E=X(E);L(E)},triggerNodeChanges:A=>{const{onNodesChange:C,setNodes:T,nodes:E,hasDefaultNodes:R,debug:L}=S();if(A?.length){if(R){const D=ub(A,E);T(D)}L&&console.log("React Flow: trigger node changes",A),C?.(A)}},triggerEdgeChanges:A=>{const{onEdgesChange:C,setEdges:T,edges:E,hasDefaultEdges:R,debug:L}=S();if(A?.length){if(R){const D=fb(A,E);T(D)}L&&console.log("React Flow: trigger edge changes",A),C?.(A)}},addSelectedNodes:A=>{const{multiSelectionActive:C,edgeLookup:T,nodeLookup:E,triggerNodeChanges:R,triggerEdgeChanges:L}=S();if(C){const D=A.map(B=>oi(B,!0));R(D);return}R(ts(E,new Set([...A]),!0)),L(ts(T))},addSelectedEdges:A=>{const{multiSelectionActive:C,edgeLookup:T,nodeLookup:E,triggerNodeChanges:R,triggerEdgeChanges:L}=S();if(C){const D=A.map(B=>oi(B,!0));L(D);return}L(ts(T,new Set([...A]))),R(ts(E,new Set,!0))},unselectNodesAndEdges:({nodes:A,edges:C}={})=>{const{edges:T,nodes:E,nodeLookup:R,triggerNodeChanges:L,triggerEdgeChanges:D}=S(),B=A||E,Y=C||T,X=B.map(Z=>{const K=R.get(Z.id);return K&&(K.selected=!1),oi(Z.id,!1)}),ie=Y.map(Z=>oi(Z.id,!1));L(X),D(ie)},setMinZoom:A=>{const{panZoom:C,maxZoom:T}=S();C?.setScaleExtent([A,T]),w({minZoom:A})},setMaxZoom:A=>{const{panZoom:C,minZoom:T}=S();C?.setScaleExtent([T,A]),w({maxZoom:A})},setTranslateExtent:A=>{S().panZoom?.setTranslateExtent(A),w({translateExtent:A})},resetSelectedElements:()=>{const{edges:A,nodes:C,triggerNodeChanges:T,triggerEdgeChanges:E,elementsSelectable:R}=S();if(!R)return;const L=C.reduce((B,Y)=>Y.selected?[...B,oi(Y.id,!1)]:B,[]),D=A.reduce((B,Y)=>Y.selected?[...B,oi(Y.id,!1)]:B,[]);T(L),E(D)},setNodeExtent:A=>{const{nodes:C,nodeLookup:T,parentLookup:E,nodeOrigin:R,elevateNodesOnSelect:L,nodeExtent:D,zIndexMode:B}=S();A[0][0]===D[0][0]&&A[0][1]===D[0][1]&&A[1][0]===D[1][0]&&A[1][1]===D[1][1]||(sh(C,T,E,{nodeOrigin:R,nodeExtent:A,elevateNodesOnSelect:L,checkEquality:!1,zIndexMode:B}),w({nodeExtent:A}))},panBy:A=>{const{transform:C,width:T,height:E,panZoom:R,translateExtent:L}=S();return mT({delta:A,panZoom:R,transform:C,translateExtent:L,width:T,height:E})},setCenter:async(A,C,T)=>{const{width:E,height:R,maxZoom:L,panZoom:D}=S();if(!D)return Promise.resolve(!1);const B=typeof T?.zoom<"u"?T.zoom:L;return await D.setViewport({x:E/2-A*B,y:R/2-C*B,zoom:B},{duration:T?.duration,ease:T?.ease,interpolate:T?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{w({connection:{...Ov}})},updateConnection:A=>{w({connection:A})},reset:()=>w({...Py()})}},Object.is);function R4({initialNodes:t,initialEdges:l,defaultNodes:i,defaultEdges:r,initialWidth:o,initialHeight:u,initialMinZoom:f,initialMaxZoom:m,initialFitViewOptions:g,fitView:h,nodeOrigin:y,nodeExtent:x,zIndexMode:v,children:w}){const[S]=z.useState(()=>T4({nodes:t,edges:l,defaultNodes:i,defaultEdges:r,width:o,height:u,fitView:h,minZoom:f,maxZoom:m,fitViewOptions:g,nodeOrigin:y,nodeExtent:x,zIndexMode:v}));return p.jsx(QT,{value:S,children:p.jsx(y3,{children:w})})}function O4({children:t,nodes:l,edges:i,defaultNodes:r,defaultEdges:o,width:u,height:f,fitView:m,fitViewOptions:g,minZoom:h,maxZoom:y,nodeOrigin:x,nodeExtent:v,zIndexMode:w}){return z.useContext(Fc)?p.jsx(p.Fragment,{children:t}):p.jsx(R4,{initialNodes:l,initialEdges:i,defaultNodes:r,defaultEdges:o,initialWidth:u,initialHeight:f,fitView:m,initialFitViewOptions:g,initialMinZoom:h,initialMaxZoom:y,nodeOrigin:x,nodeExtent:v,zIndexMode:w,children:t})}const z4={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function j4({nodes:t,edges:l,defaultNodes:i,defaultEdges:r,className:o,nodeTypes:u,edgeTypes:f,onNodeClick:m,onEdgeClick:g,onInit:h,onMove:y,onMoveStart:x,onMoveEnd:v,onConnect:w,onConnectStart:S,onConnectEnd:_,onClickConnectStart:A,onClickConnectEnd:C,onNodeMouseEnter:T,onNodeMouseMove:E,onNodeMouseLeave:R,onNodeContextMenu:L,onNodeDoubleClick:D,onNodeDragStart:B,onNodeDrag:Y,onNodeDragStop:X,onNodesDelete:ie,onEdgesDelete:Z,onDelete:K,onSelectionChange:ae,onSelectionDragStart:k,onSelectionDrag:I,onSelectionDragStop:M,onSelectionContextMenu:U,onSelectionStart:j,onSelectionEnd:q,onBeforeDelete:te,connectionMode:O,connectionLineType:H=Ll.Bezier,connectionLineStyle:Q,connectionLineComponent:J,connectionLineContainerStyle:ce,deleteKeyCode:he="Backspace",selectionKeyCode:re="Shift",selectionOnDrag:fe=!1,selectionMode:me=Nr.Full,panActivationKeyCode:Ce="Space",multiSelectionKeyCode:xe=Mr()?"Meta":"Control",zoomActivationKeyCode:ve=Mr()?"Meta":"Control",snapToGrid:_e,snapGrid:He,onlyRenderVisibleElements:lt=!1,selectNodesOnDrag:Re,nodesDraggable:Be,autoPanOnNodeFocus:Pe,nodesConnectable:Ge,nodesFocusable:xt,nodeOrigin:It=ob,edgesFocusable:gt,edgesReconnectable:vt,elementsSelectable:Fe=!0,defaultViewport:zn=r3,minZoom:Gt=.5,maxZoom:ln=2,translateExtent:At=_r,preventScrolling:fn=!0,nodeExtent:jn,defaultMarkerColor:$l="#b1b1b7",zoomOnScroll:ya=!0,zoomOnPinch:xa=!0,panOnScroll:Qt=!1,panOnScrollSpeed:Dn=.5,panOnScrollMode:Pt=fi.Free,zoomOnDoubleClick:ps=!0,panOnDrag:Vl=!0,onPaneClick:xi,onPaneMouseEnter:va,onPaneMouseMove:nl,onPaneMouseLeave:ba,onPaneScroll:sn,onPaneContextMenu:V,paneClickDistance:se=1,nodeClickDistance:pe=0,children:ke,onReconnect:pt,onReconnectStart:rt,onReconnectEnd:Ee,onEdgeContextMenu:ye,onEdgeDoubleClick:ze,onEdgeMouseEnter:Ct,onEdgeMouseMove:bt,onEdgeMouseLeave:Zn,reconnectRadius:al=10,onNodesChange:ll,onEdgesChange:kn,noDragClassName:Mt="nodrag",noWheelClassName:Kt="nowheel",noPanClassName:In="nopan",fitView:il,fitViewOptions:Yl,connectOnClick:sl,attributionPosition:vi,proOptions:Ea,defaultEdgeOptions:ql,elevateNodesOnSelect:Wt=!0,elevateEdgesOnSelect:Qn=!1,disableKeyboardA11y:Kn=!1,autoPanOnConnect:sa,autoPanOnNodeDrag:zt,autoPanSpeed:bi,connectionRadius:Sa,isValidConnection:Fn,onError:de,style:Me,id:Ve,nodeDragThreshold:it,connectionDragThreshold:Tt,viewport:Ft,onViewportChange:dn,width:rn,height:ft,colorMode:hn="light",debug:Ei,onScroll:wa,ariaLabelConfig:Gl,zIndexMode:_a="basic",...ys},on){const Na=Ve||"1",Aa=f3(hn),rl=z.useCallback(Ht=>{Ht.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),wa?.(Ht)},[wa]);return p.jsx("div",{"data-testid":"rf__wrapper",...ys,onScroll:rl,style:{...Me,...z4},ref:on,className:qt(["react-flow",o,Aa]),id:Ve,role:"application",children:p.jsxs(O4,{nodes:t,edges:l,width:rn,height:ft,fitView:il,fitViewOptions:Yl,minZoom:Gt,maxZoom:ln,nodeOrigin:It,nodeExtent:jn,zIndexMode:_a,children:[p.jsx(M4,{onInit:h,onNodeClick:m,onEdgeClick:g,onNodeMouseEnter:T,onNodeMouseMove:E,onNodeMouseLeave:R,onNodeContextMenu:L,onNodeDoubleClick:D,nodeTypes:u,edgeTypes:f,connectionLineType:H,connectionLineStyle:Q,connectionLineComponent:J,connectionLineContainerStyle:ce,selectionKeyCode:re,selectionOnDrag:fe,selectionMode:me,deleteKeyCode:he,multiSelectionKeyCode:xe,panActivationKeyCode:Ce,zoomActivationKeyCode:ve,onlyRenderVisibleElements:lt,defaultViewport:zn,translateExtent:At,minZoom:Gt,maxZoom:ln,preventScrolling:fn,zoomOnScroll:ya,zoomOnPinch:xa,zoomOnDoubleClick:ps,panOnScroll:Qt,panOnScrollSpeed:Dn,panOnScrollMode:Pt,panOnDrag:Vl,onPaneClick:xi,onPaneMouseEnter:va,onPaneMouseMove:nl,onPaneMouseLeave:ba,onPaneScroll:sn,onPaneContextMenu:V,paneClickDistance:se,nodeClickDistance:pe,onSelectionContextMenu:U,onSelectionStart:j,onSelectionEnd:q,onReconnect:pt,onReconnectStart:rt,onReconnectEnd:Ee,onEdgeContextMenu:ye,onEdgeDoubleClick:ze,onEdgeMouseEnter:Ct,onEdgeMouseMove:bt,onEdgeMouseLeave:Zn,reconnectRadius:al,defaultMarkerColor:$l,noDragClassName:Mt,noWheelClassName:Kt,noPanClassName:In,rfId:Na,disableKeyboardA11y:Kn,nodeExtent:jn,viewport:Ft,onViewportChange:dn}),p.jsx(u3,{nodes:t,edges:l,defaultNodes:i,defaultEdges:r,onConnect:w,onConnectStart:S,onConnectEnd:_,onClickConnectStart:A,onClickConnectEnd:C,nodesDraggable:Be,autoPanOnNodeFocus:Pe,nodesConnectable:Ge,nodesFocusable:xt,edgesFocusable:gt,edgesReconnectable:vt,elementsSelectable:Fe,elevateNodesOnSelect:Wt,elevateEdgesOnSelect:Qn,minZoom:Gt,maxZoom:ln,nodeExtent:jn,onNodesChange:ll,onEdgesChange:kn,snapToGrid:_e,snapGrid:He,connectionMode:O,translateExtent:At,connectOnClick:sl,defaultEdgeOptions:ql,fitView:il,fitViewOptions:Yl,onNodesDelete:ie,onEdgesDelete:Z,onDelete:K,onNodeDragStart:B,onNodeDrag:Y,onNodeDragStop:X,onSelectionDrag:I,onSelectionDragStart:k,onSelectionDragStop:M,onMove:y,onMoveStart:x,onMoveEnd:v,noPanClassName:In,nodeOrigin:It,rfId:Na,autoPanOnConnect:sa,autoPanOnNodeDrag:zt,autoPanSpeed:bi,onError:de,connectionRadius:Sa,isValidConnection:Fn,selectNodesOnDrag:Re,nodeDragThreshold:it,connectionDragThreshold:Tt,onBeforeDelete:te,debug:Ei,ariaLabelConfig:Gl,zIndexMode:_a}),p.jsx(s3,{onSelectionChange:ae}),ke,p.jsx(t3,{proOptions:Ea,position:vi}),p.jsx(e3,{rfId:Na,disableKeyboardA11y:Kn})]})})}var D4=db(j4);function k4(t){const[l,i]=z.useState(t),r=z.useCallback(o=>i(u=>ub(o,u)),[]);return[l,i,r]}function L4(t){const[l,i]=z.useState(t),r=z.useCallback(o=>i(u=>fb(o,u)),[]);return[l,i,r]}function H4({dimensions:t,lineWidth:l,variant:i,className:r}){return p.jsx("path",{strokeWidth:l,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:qt(["react-flow__background-pattern",i,r])})}function B4({radius:t,className:l}){return p.jsx("circle",{cx:t,cy:t,r:t,className:qt(["react-flow__background-pattern","dots",l])})}var Hl;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(Hl||(Hl={}));const U4={[Hl.Dots]:1,[Hl.Lines]:1,[Hl.Cross]:6},$4=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function Lb({id:t,variant:l=Hl.Dots,gap:i=20,size:r,lineWidth:o=1,offset:u=0,color:f,bgColor:m,style:g,className:h,patternClassName:y}){const x=z.useRef(null),{transform:v,patternId:w}=We($4,_t),S=r||U4[l],_=l===Hl.Dots,A=l===Hl.Cross,C=Array.isArray(i)?i:[i,i],T=[C[0]*v[2]||1,C[1]*v[2]||1],E=S*v[2],R=Array.isArray(u)?u:[u,u],L=A?[E,E]:T,D=[R[0]*v[2]||1+L[0]/2,R[1]*v[2]||1+L[1]/2],B=`${w}${t||""}`;return p.jsxs("svg",{className:qt(["react-flow__background",h]),style:{...g,...Pc,"--xy-background-color-props":m,"--xy-background-pattern-color-props":f},ref:x,"data-testid":"rf__background",children:[p.jsx("pattern",{id:B,x:v[0]%T[0],y:v[1]%T[1],width:T[0],height:T[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${D[0]},-${D[1]})`,children:_?p.jsx(B4,{radius:E/2,className:y}):p.jsx(H4,{dimensions:L,lineWidth:o,variant:l,className:y})}),p.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${B})`})]})}Lb.displayName="Background";const V4=z.memo(Lb);function Y4(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:p.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function q4(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:p.jsx("path",{d:"M0 0h32v4.2H0z"})})}function G4(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:p.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 X4(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:p.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 Z4(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:p.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 gc({children:t,className:l,...i}){return p.jsx("button",{type:"button",className:qt(["react-flow__controls-button",l]),...i,children:t})}const I4=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function Hb({style:t,showZoom:l=!0,showFitView:i=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:u,onZoomOut:f,onFitView:m,onInteractiveChange:g,className:h,children:y,position:x="bottom-left",orientation:v="vertical","aria-label":w}){const S=Nt(),{isInteractive:_,minZoomReached:A,maxZoomReached:C,ariaLabelConfig:T}=We(I4,_t),{zoomIn:E,zoomOut:R,fitView:L}=Hh(),D=()=>{E(),u?.()},B=()=>{R(),f?.()},Y=()=>{L(o),m?.()},X=()=>{S.setState({nodesDraggable:!_,nodesConnectable:!_,elementsSelectable:!_}),g?.(!_)},ie=v==="horizontal"?"horizontal":"vertical";return p.jsxs(Jc,{className:qt(["react-flow__controls",ie,h]),position:x,style:t,"data-testid":"rf__controls","aria-label":w??T["controls.ariaLabel"],children:[l&&p.jsxs(p.Fragment,{children:[p.jsx(gc,{onClick:D,className:"react-flow__controls-zoomin",title:T["controls.zoomIn.ariaLabel"],"aria-label":T["controls.zoomIn.ariaLabel"],disabled:C,children:p.jsx(Y4,{})}),p.jsx(gc,{onClick:B,className:"react-flow__controls-zoomout",title:T["controls.zoomOut.ariaLabel"],"aria-label":T["controls.zoomOut.ariaLabel"],disabled:A,children:p.jsx(q4,{})})]}),i&&p.jsx(gc,{className:"react-flow__controls-fitview",onClick:Y,title:T["controls.fitView.ariaLabel"],"aria-label":T["controls.fitView.ariaLabel"],children:p.jsx(G4,{})}),r&&p.jsx(gc,{className:"react-flow__controls-interactive",onClick:X,title:T["controls.interactive.ariaLabel"],"aria-label":T["controls.interactive.ariaLabel"],children:_?p.jsx(Z4,{}):p.jsx(X4,{})}),y]})}Hb.displayName="Controls";const Q4=z.memo(Hb);function K4({id:t,x:l,y:i,width:r,height:o,style:u,color:f,strokeColor:m,strokeWidth:g,className:h,borderRadius:y,shapeRendering:x,selected:v,onClick:w}){const{background:S,backgroundColor:_}=u||{},A=f||S||_;return p.jsx("rect",{className:qt(["react-flow__minimap-node",{selected:v},h]),x:l,y:i,rx:y,ry:y,width:r,height:o,style:{fill:A,stroke:m,strokeWidth:g},shapeRendering:x,onClick:w?C=>w(C,t):void 0})}const F4=z.memo(K4),J4=t=>t.nodes.map(l=>l.id),Rd=t=>t instanceof Function?t:()=>t;function P4({nodeStrokeColor:t,nodeColor:l,nodeClassName:i="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:u=F4,onClick:f}){const m=We(J4,_t),g=Rd(l),h=Rd(t),y=Rd(i),x=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return p.jsx(p.Fragment,{children:m.map(v=>p.jsx(eR,{id:v,nodeColorFunc:g,nodeStrokeColorFunc:h,nodeClassNameFunc:y,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:u,onClick:f,shapeRendering:x},v))})}function W4({id:t,nodeColorFunc:l,nodeStrokeColorFunc:i,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:u,shapeRendering:f,NodeComponent:m,onClick:g}){const{node:h,x:y,y:x,width:v,height:w}=We(S=>{const{internals:_}=S.nodeLookup.get(t),A=_.userNode,{x:C,y:T}=_.positionAbsolute,{width:E,height:R}=tl(A);return{node:A,x:C,y:T,width:E,height:R}},_t);return!h||h.hidden||!Bv(h)?null:p.jsx(m,{x:y,y:x,width:v,height:w,style:h.style,selected:!!h.selected,className:r(h),color:l(h),borderRadius:o,strokeColor:i(h),strokeWidth:u,shapeRendering:f,onClick:g,id:h.id})}const eR=z.memo(W4);var tR=z.memo(P4);const nR=200,aR=150,lR=t=>!t.hidden,iR=t=>{const l={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:l,boundingRect:t.nodeLookup.size>0?Hv($r(t.nodeLookup,{filter:lR}),l):l,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},sR="react-flow__minimap-desc";function Bb({style:t,className:l,nodeStrokeColor:i,nodeColor:r,nodeClassName:o="",nodeBorderRadius:u=5,nodeStrokeWidth:f,nodeComponent:m,bgColor:g,maskColor:h,maskStrokeColor:y,maskStrokeWidth:x,position:v="bottom-right",onClick:w,onNodeClick:S,pannable:_=!1,zoomable:A=!1,ariaLabel:C,inversePan:T,zoomStep:E=1,offsetScale:R=5}){const L=Nt(),D=z.useRef(null),{boundingRect:B,viewBB:Y,rfId:X,panZoom:ie,translateExtent:Z,flowWidth:K,flowHeight:ae,ariaLabelConfig:k}=We(iR,_t),I=t?.width??nR,M=t?.height??aR,U=B.width/I,j=B.height/M,q=Math.max(U,j),te=q*I,O=q*M,H=R*q,Q=B.x-(te-B.width)/2-H,J=B.y-(O-B.height)/2-H,ce=te+H*2,he=O+H*2,re=`${sR}-${X}`,fe=z.useRef(0),me=z.useRef();fe.current=q,z.useEffect(()=>{if(D.current&&ie)return me.current=wT({domNode:D.current,panZoom:ie,getTransform:()=>L.getState().transform,getViewScale:()=>fe.current}),()=>{me.current?.destroy()}},[ie]),z.useEffect(()=>{me.current?.update({translateExtent:Z,width:K,height:ae,inversePan:T,pannable:_,zoomStep:E,zoomable:A})},[_,A,T,E,Z,K,ae]);const Ce=w?_e=>{const[He,lt]=me.current?.pointer(_e)||[0,0];w(_e,{x:He,y:lt})}:void 0,xe=S?z.useCallback((_e,He)=>{const lt=L.getState().nodeLookup.get(He).internals.userNode;S(_e,lt)},[]):void 0,ve=C??k["minimap.ariaLabel"];return p.jsx(Jc,{position:v,style:{...t,"--xy-minimap-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-color-props":typeof y=="string"?y:void 0,"--xy-minimap-mask-stroke-width-props":typeof x=="number"?x*q:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-width-props":typeof f=="number"?f:void 0},className:qt(["react-flow__minimap",l]),"data-testid":"rf__minimap",children:p.jsxs("svg",{width:I,height:M,viewBox:`${Q} ${J} ${ce} ${he}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":re,ref:D,onClick:Ce,children:[ve&&p.jsx("title",{id:re,children:ve}),p.jsx(tR,{onClick:xe,nodeColor:r,nodeStrokeColor:i,nodeBorderRadius:u,nodeClassName:o,nodeStrokeWidth:f,nodeComponent:m}),p.jsx("path",{className:"react-flow__minimap-mask",d:`M${Q-H},${J-H}h${ce+H*2}v${he+H*2}h${-ce-H*2}z
|
|
17
|
+
M${Y.x},${Y.y}h${Y.width}v${Y.height}h${-Y.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Bb.displayName="MiniMap";z.memo(Bb);const rR=t=>l=>t?`${Math.max(1/l.transform[2],1)}`:void 0,oR={[fs.Line]:"right",[fs.Handle]:"bottom-right"};function cR({nodeId:t,position:l,variant:i=fs.Handle,className:r,style:o=void 0,children:u,color:f,minWidth:m=10,minHeight:g=10,maxWidth:h=Number.MAX_VALUE,maxHeight:y=Number.MAX_VALUE,keepAspectRatio:x=!1,resizeDirection:v,autoScale:w=!0,shouldResize:S,onResizeStart:_,onResize:A,onResizeEnd:C}){const T=pb(),E=typeof t=="string"?t:T,R=Nt(),L=z.useRef(null),D=i===fs.Handle,B=We(z.useCallback(rR(D&&w),[D,w]),_t),Y=z.useRef(null),X=l??oR[i];z.useEffect(()=>{if(!(!L.current||!E))return Y.current||(Y.current=HT({domNode:L.current,nodeId:E,getStoreItems:()=>{const{nodeLookup:Z,transform:K,snapGrid:ae,snapToGrid:k,nodeOrigin:I,domNode:M}=R.getState();return{nodeLookup:Z,transform:K,snapGrid:ae,snapToGrid:k,nodeOrigin:I,paneDomNode:M}},onChange:(Z,K)=>{const{triggerNodeChanges:ae,nodeLookup:k,parentLookup:I,nodeOrigin:M}=R.getState(),U=[],j={x:Z.x,y:Z.y},q=k.get(E);if(q&&q.expandParent&&q.parentId){const te=q.origin??M,O=Z.width??q.measured.width??0,H=Z.height??q.measured.height??0,Q={id:q.id,parentId:q.parentId,rect:{width:O,height:H,...Uv({x:Z.x??q.position.x,y:Z.y??q.position.y},{width:O,height:H},q.parentId,k,te)}},J=Lh([Q],k,I,M);U.push(...J),j.x=Z.x?Math.max(te[0]*O,Z.x):void 0,j.y=Z.y?Math.max(te[1]*H,Z.y):void 0}if(j.x!==void 0&&j.y!==void 0){const te={id:E,type:"position",position:{...j}};U.push(te)}if(Z.width!==void 0&&Z.height!==void 0){const O={id:E,type:"dimensions",resizing:!0,setAttributes:v?v==="horizontal"?"width":"height":!0,dimensions:{width:Z.width,height:Z.height}};U.push(O)}for(const te of K){const O={...te,type:"position"};U.push(O)}ae(U)},onEnd:({width:Z,height:K})=>{const ae={id:E,type:"dimensions",resizing:!1,dimensions:{width:Z,height:K}};R.getState().triggerNodeChanges([ae])}})),Y.current.update({controlPosition:X,boundaries:{minWidth:m,minHeight:g,maxWidth:h,maxHeight:y},keepAspectRatio:x,resizeDirection:v,onResizeStart:_,onResize:A,onResizeEnd:C,shouldResize:S}),()=>{Y.current?.destroy()}},[X,m,g,h,y,x,_,A,C,S]);const ie=X.split("-");return p.jsx("div",{className:qt(["react-flow__resize-control","nodrag",...ie,i,r]),ref:L,style:{...o,scale:B,...f&&{[D?"backgroundColor":"borderColor"]:f}},children:u})}z.memo(cR);const uR=["async_step","async_reactor"],fR={async_step:Ld,async_reactor:Hd},dR=({data:t})=>{const l=t.selected,i=t.status,r=uR.includes(t.type),o=fR[t.type],u={pending:"border-slate-700 bg-slate-900 text-slate-500",running:"border-indigo-500 bg-indigo-500/10 text-indigo-400 ring-2 ring-indigo-500/20",completed:"border-teal-500 bg-teal-500/10 text-teal-400",failed:"border-rose-500 bg-rose-500/10 text-rose-400 shadow-[0_0_15px_rgba(244,63,94,0.2)]",cancelled:"border-amber-500/50 bg-amber-500/10 text-amber-500"},f={pending:Nc,running:kr,completed:Ax,failed:Pa,cancelled:qw}[i]||Nc;return p.jsxs("div",{className:di("px-4 py-3 rounded-lg border shadow-lg transition-all min-w-[150px]",u[i]||u.pending,r&&"border-dashed",l&&"ring-2 ring-white/20 scale-105"),children:[p.jsx(Ul,{type:"target",position:Te.Top,className:"!bg-slate-500 !w-2 !h-2"}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(f,{className:di("w-4 h-4",i==="running"&&"animate-pulse")}),p.jsxs("div",{children:[p.jsxs("div",{className:"font-medium text-sm flex items-center gap-1.5",children:[t.label,o&&p.jsx(o,{className:"w-3 h-3 opacity-70"})]}),p.jsx("div",{className:"text-[10px] opacity-70 uppercase tracking-wider",children:i==="cancelled"?"CANCELLED":t.type}),t.childExecutionId&&p.jsxs("a",{href:hi(t.childExecutionId),onClick:m=>m.stopPropagation(),className:"mt-1 inline-flex items-center gap-1 text-[10px] underline opacity-70 hover:opacity-100",children:["open child ",p.jsx(Cx,{className:"w-2.5 h-2.5"})]})]})]}),p.jsx(Ul,{type:"source",position:Te.Bottom,className:"!bg-slate-500 !w-2 !h-2"})]})},hR=({data:t})=>{const l=t.selected,i=t.status,r={pending:"border-slate-700",running:"border-indigo-500",completed:"border-teal-500",failed:"border-rose-500",cancelled:"border-amber-500/50"};return p.jsxs("div",{className:di("px-4 py-8 rounded-xl border-2 border-dashed transition-all relative","bg-slate-900/50 backdrop-blur-sm",r[i]||r.pending,l&&"ring-2 ring-white/20 text-white"),style:{width:"100%",height:"100%"},children:[p.jsxs("div",{className:"absolute top-0 left-0 bg-slate-800 px-3 py-1 rounded-br-lg text-xs font-bold text-slate-300 border-b border-r border-slate-700",children:[t.label," (",t.type,")"]}),p.jsx(Ul,{type:"target",position:Te.Top,className:"!bg-slate-500 !w-2 !h-2",style:{top:-10}}),p.jsx(Ul,{type:"source",position:Te.Bottom,className:"!bg-slate-500 !w-2 !h-2",style:{bottom:-10}})]})},mR={step:dR,group:hR},Wy=200,gR=80,pc=40,pR=100,Od=50,Ub=(t,l=null,i,r="",o={})=>{if(!t||Object.keys(t).length===0)return{nodes:[],edges:[],width:0,height:0};const u=[],f=[],m=[];Object.entries(t).forEach(([S,_])=>{const A=r?`${r}.${S}`:S;let C=null,T=Wy,E=gR;_.nested_structure&&(C=Ub(_.nested_structure,A,i,A,o),T=C.width+pc*2,E=C.height+pc*2+30,f.push(...C.edges)),m.push({key:S,fullId:A,config:_,width:T,height:E,childLayout:C})});const g={},h=(S,_=new Set)=>{if(_.has(S))return 0;if(g[S]!==void 0)return g[S];_.add(S);const A=t[S];if(!A||!A.depends_on||A.depends_on.length===0)return g[S]=0,0;const C=A.depends_on.filter(R=>t[R]);if(C.length===0)return g[S]=0,0;const T=C.map(R=>h(R,new Set(_))),E=Math.max(...T)+1;return g[S]=E,E};m.forEach(S=>h(S.key));const y={};m.forEach(S=>{const _=g[S.key];y[_]||(y[_]=[]),y[_].push(S)});let x=0,v=0;return Object.keys(y).map(Number).sort((S,_)=>S-_).forEach(S=>{const _=y[S],A=_.reduce((E,R)=>E+R.width+Od,0)-Od;v=Math.max(v,A);let C=-A/2;const T=Math.max(..._.map(E=>E.height));_.forEach(E=>{const R=!!E.childLayout,L=R?"group":"step",D={id:E.fullId,type:L,data:{label:E.key,type:E.config.type,status:i[E.fullId]||"pending",childExecutionId:o[E.fullId],selected:!1},position:{x:C+E.width/2-(R?E.width/2:Wy/2),y:x},style:R?{width:E.width,height:E.height}:void 0,parentId:l||void 0,extent:l?"parent":void 0};if(E.childLayout){const B=Math.min(...E.childLayout.nodes.map(Z=>Z.position.x)),Y=Math.min(...E.childLayout.nodes.map(Z=>Z.position.y)),X=-B+pc,ie=-Y+pc+30;E.childLayout.nodes.forEach(Z=>{Z.position.x+=X,Z.position.y+=ie})}u.push(D),E.childLayout&&u.push(...E.childLayout.nodes),C+=E.width+Od}),x+=T+pR}),Object.entries(t).forEach(([S,_])=>{const A=r?`${r}.${S}`:S;_.depends_on&&_.depends_on.forEach(C=>{if(t[C]){const T=r?`${r}.${C}`:C;f.push({id:`${T}-${A}`,source:T,target:A,type:"smoothstep",animated:!0,style:{stroke:"#475569"},markerEnd:{type:Ar.ArrowClosed,color:"#475569"}})}})}),{nodes:u,edges:f,width:v,height:x}};function yR({structure:t,steps:l,onStepSelect:i,selectedStep:r,reactorStatus:o,error:u,results:f,composedContexts:m}){const g=z.useMemo(()=>{const E={},R=(L,D,B,Y,X,ie)=>{Object.keys(L||{}).forEach(Z=>{const K=Y?`${Y}.${Z}`:Z,ae=X?.status||ie||o;E[K]="pending",D&&D[Z]!==void 0?E[K]="completed":B&&B.some(I=>I.step===Z)&&ae==="running"&&(E[K]="running"),X?.failure_reason?.step_name===Z&&(E[K]="failed");const k=D?.[Z];if(k?._type==="map_results"&&k.failed>0&&(E[K]="failed"),E[K]==="pending"&&(ae==="failed"||ae==="cancelled")&&(E[K]="cancelled"),L[Z].nested_structure){const I=X?.composed_contexts?.[Z],M=I?.context?.value||I?.context,U=L[Z].type==="map"&&(!M||E[K]==="completed")?E[K]:M?.status;R(L[Z].nested_structure,M?.intermediate_results||{},M?.execution_trace||[],K,M,U)}})};return R(t,f,l,"",{composed_contexts:m,failure_reason:u,status:o}),(o==="failed"||o==="cancelled")&&Object.keys(E).forEach(L=>{E[L]==="pending"&&(E[L]="cancelled")}),E},[t,l,o,u,f,m]),h=z.useMemo(()=>{const E={};return Object.entries(m||{}).forEach(([R,L])=>{const D=L,B=D?.execution_id||D?.context?.context_id;D?.type==="async_reactor_ref"&&B&&(E[R]=B)}),E},[m]),{nodes:y,edges:x}=z.useMemo(()=>{if(!t)return{nodes:[],edges:[]};const E=Ub(t,null,g,"",h);return{nodes:E.nodes.map(L=>({...L,data:{...L.data,selected:r===L.id}})),edges:E.edges}},[t,g,h,r]),[v,w,S]=k4([]),[_,A,C]=L4([]);z.useMemo(()=>{w(y),A(x)},[y,x,w,A]);const T=z.useCallback((E,R)=>{i(R.id)},[i]);return p.jsx("div",{className:"w-full h-full min-h-[500px] bg-slate-950 rounded-xl overflow-hidden",children:p.jsxs(D4,{nodes:v,edges:_,onNodesChange:S,onEdgesChange:C,nodeTypes:mR,onNodeClick:T,fitView:!0,className:"bg-slate-900/50",children:[p.jsx(V4,{color:"#1e293b",gap:16}),p.jsx(Q4,{className:"bg-slate-800 border-slate-700 fill-slate-400 text-slate-400"})]})})}var zd,ex;function xR(){if(ex)return zd;ex=1;function t(V){return V instanceof Map?V.clear=V.delete=V.set=function(){throw new Error("map is read-only")}:V instanceof Set&&(V.add=V.clear=V.delete=function(){throw new Error("set is read-only")}),Object.freeze(V),Object.getOwnPropertyNames(V).forEach(se=>{const pe=V[se],ke=typeof pe;(ke==="object"||ke==="function")&&!Object.isFrozen(pe)&&t(pe)}),V}class l{constructor(se){se.data===void 0&&(se.data={}),this.data=se.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function i(V){return V.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(V,...se){const pe=Object.create(null);for(const ke in V)pe[ke]=V[ke];return se.forEach(function(ke){for(const pt in ke)pe[pt]=ke[pt]}),pe}const o="</span>",u=V=>!!V.scope,f=(V,{prefix:se})=>{if(V.startsWith("language:"))return V.replace("language:","language-");if(V.includes(".")){const pe=V.split(".");return[`${se}${pe.shift()}`,...pe.map((ke,pt)=>`${ke}${"_".repeat(pt+1)}`)].join(" ")}return`${se}${V}`};class m{constructor(se,pe){this.buffer="",this.classPrefix=pe.classPrefix,se.walk(this)}addText(se){this.buffer+=i(se)}openNode(se){if(!u(se))return;const pe=f(se.scope,{prefix:this.classPrefix});this.span(pe)}closeNode(se){u(se)&&(this.buffer+=o)}value(){return this.buffer}span(se){this.buffer+=`<span class="${se}">`}}const g=(V={})=>{const se={children:[]};return Object.assign(se,V),se};class h{constructor(){this.rootNode=g(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(se){this.top.children.push(se)}openNode(se){const pe=g({scope:se});this.add(pe),this.stack.push(pe)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(se){return this.constructor._walk(se,this.rootNode)}static _walk(se,pe){return typeof pe=="string"?se.addText(pe):pe.children&&(se.openNode(pe),pe.children.forEach(ke=>this._walk(se,ke)),se.closeNode(pe)),se}static _collapse(se){typeof se!="string"&&se.children&&(se.children.every(pe=>typeof pe=="string")?se.children=[se.children.join("")]:se.children.forEach(pe=>{h._collapse(pe)}))}}class y extends h{constructor(se){super(),this.options=se}addText(se){se!==""&&this.add(se)}startScope(se){this.openNode(se)}endScope(){this.closeNode()}__addSublanguage(se,pe){const ke=se.root;pe&&(ke.scope=`language:${pe}`),this.add(ke)}toHTML(){return new m(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function x(V){return V?typeof V=="string"?V:V.source:null}function v(V){return _("(?=",V,")")}function w(V){return _("(?:",V,")*")}function S(V){return _("(?:",V,")?")}function _(...V){return V.map(pe=>x(pe)).join("")}function A(V){const se=V[V.length-1];return typeof se=="object"&&se.constructor===Object?(V.splice(V.length-1,1),se):{}}function C(...V){return"("+(A(V).capture?"":"?:")+V.map(ke=>x(ke)).join("|")+")"}function T(V){return new RegExp(V.toString()+"|").exec("").length-1}function E(V,se){const pe=V&&V.exec(se);return pe&&pe.index===0}const R=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function L(V,{joinWith:se}){let pe=0;return V.map(ke=>{pe+=1;const pt=pe;let rt=x(ke),Ee="";for(;rt.length>0;){const ye=R.exec(rt);if(!ye){Ee+=rt;break}Ee+=rt.substring(0,ye.index),rt=rt.substring(ye.index+ye[0].length),ye[0][0]==="\\"&&ye[1]?Ee+="\\"+String(Number(ye[1])+pt):(Ee+=ye[0],ye[0]==="("&&pe++)}return Ee}).map(ke=>`(${ke})`).join(se)}const D=/\b\B/,B="[a-zA-Z]\\w*",Y="[a-zA-Z_]\\w*",X="\\b\\d+(\\.\\d+)?",ie="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Z="\\b(0b[01]+)",K="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ae=(V={})=>{const se=/^#![ ]*\//;return V.binary&&(V.begin=_(se,/.*\b/,V.binary,/\b.*/)),r({scope:"meta",begin:se,end:/$/,relevance:0,"on:begin":(pe,ke)=>{pe.index!==0&&ke.ignoreMatch()}},V)},k={begin:"\\\\[\\s\\S]",relevance:0},I={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[k]},M={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[k]},U={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},j=function(V,se,pe={}){const ke=r({scope:"comment",begin:V,end:se,contains:[]},pe);ke.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const pt=C("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return ke.contains.push({begin:_(/[ ]+/,"(",pt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),ke},q=j("//","$"),te=j("/\\*","\\*/"),O=j("#","$"),H={scope:"number",begin:X,relevance:0},Q={scope:"number",begin:ie,relevance:0},J={scope:"number",begin:Z,relevance:0},ce={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[k,{begin:/\[/,end:/\]/,relevance:0,contains:[k]}]},he={scope:"title",begin:B,relevance:0},re={scope:"title",begin:Y,relevance:0},fe={begin:"\\.\\s*"+Y,relevance:0};var Ce=Object.freeze({__proto__:null,APOS_STRING_MODE:I,BACKSLASH_ESCAPE:k,BINARY_NUMBER_MODE:J,BINARY_NUMBER_RE:Z,COMMENT:j,C_BLOCK_COMMENT_MODE:te,C_LINE_COMMENT_MODE:q,C_NUMBER_MODE:Q,C_NUMBER_RE:ie,END_SAME_AS_BEGIN:function(V){return Object.assign(V,{"on:begin":(se,pe)=>{pe.data._beginMatch=se[1]},"on:end":(se,pe)=>{pe.data._beginMatch!==se[1]&&pe.ignoreMatch()}})},HASH_COMMENT_MODE:O,IDENT_RE:B,MATCH_NOTHING_RE:D,METHOD_GUARD:fe,NUMBER_MODE:H,NUMBER_RE:X,PHRASAL_WORDS_MODE:U,QUOTE_STRING_MODE:M,REGEXP_MODE:ce,RE_STARTERS_RE:K,SHEBANG:ae,TITLE_MODE:he,UNDERSCORE_IDENT_RE:Y,UNDERSCORE_TITLE_MODE:re});function xe(V,se){V.input[V.index-1]==="."&&se.ignoreMatch()}function ve(V,se){V.className!==void 0&&(V.scope=V.className,delete V.className)}function _e(V,se){se&&V.beginKeywords&&(V.begin="\\b("+V.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",V.__beforeBegin=xe,V.keywords=V.keywords||V.beginKeywords,delete V.beginKeywords,V.relevance===void 0&&(V.relevance=0))}function He(V,se){Array.isArray(V.illegal)&&(V.illegal=C(...V.illegal))}function lt(V,se){if(V.match){if(V.begin||V.end)throw new Error("begin & end are not supported with match");V.begin=V.match,delete V.match}}function Re(V,se){V.relevance===void 0&&(V.relevance=1)}const Be=(V,se)=>{if(!V.beforeMatch)return;if(V.starts)throw new Error("beforeMatch cannot be used with starts");const pe=Object.assign({},V);Object.keys(V).forEach(ke=>{delete V[ke]}),V.keywords=pe.keywords,V.begin=_(pe.beforeMatch,v(pe.begin)),V.starts={relevance:0,contains:[Object.assign(pe,{endsParent:!0})]},V.relevance=0,delete pe.beforeMatch},Pe=["of","and","for","in","not","or","if","then","parent","list","value"],Ge="keyword";function xt(V,se,pe=Ge){const ke=Object.create(null);return typeof V=="string"?pt(pe,V.split(" ")):Array.isArray(V)?pt(pe,V):Object.keys(V).forEach(function(rt){Object.assign(ke,xt(V[rt],se,rt))}),ke;function pt(rt,Ee){se&&(Ee=Ee.map(ye=>ye.toLowerCase())),Ee.forEach(function(ye){const ze=ye.split("|");ke[ze[0]]=[rt,It(ze[0],ze[1])]})}}function It(V,se){return se?Number(se):gt(V)?0:1}function gt(V){return Pe.includes(V.toLowerCase())}const vt={},Fe=V=>{console.error(V)},zn=(V,...se)=>{console.log(`WARN: ${V}`,...se)},Gt=(V,se)=>{vt[`${V}/${se}`]||(console.log(`Deprecated as of ${V}. ${se}`),vt[`${V}/${se}`]=!0)},ln=new Error;function At(V,se,{key:pe}){let ke=0;const pt=V[pe],rt={},Ee={};for(let ye=1;ye<=se.length;ye++)Ee[ye+ke]=pt[ye],rt[ye+ke]=!0,ke+=T(se[ye-1]);V[pe]=Ee,V[pe]._emit=rt,V[pe]._multi=!0}function fn(V){if(Array.isArray(V.begin)){if(V.skip||V.excludeBegin||V.returnBegin)throw Fe("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ln;if(typeof V.beginScope!="object"||V.beginScope===null)throw Fe("beginScope must be object"),ln;At(V,V.begin,{key:"beginScope"}),V.begin=L(V.begin,{joinWith:""})}}function jn(V){if(Array.isArray(V.end)){if(V.skip||V.excludeEnd||V.returnEnd)throw Fe("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ln;if(typeof V.endScope!="object"||V.endScope===null)throw Fe("endScope must be object"),ln;At(V,V.end,{key:"endScope"}),V.end=L(V.end,{joinWith:""})}}function $l(V){V.scope&&typeof V.scope=="object"&&V.scope!==null&&(V.beginScope=V.scope,delete V.scope)}function ya(V){$l(V),typeof V.beginScope=="string"&&(V.beginScope={_wrap:V.beginScope}),typeof V.endScope=="string"&&(V.endScope={_wrap:V.endScope}),fn(V),jn(V)}function xa(V){function se(Ee,ye){return new RegExp(x(Ee),"m"+(V.case_insensitive?"i":"")+(V.unicodeRegex?"u":"")+(ye?"g":""))}class pe{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ye,ze){ze.position=this.position++,this.matchIndexes[this.matchAt]=ze,this.regexes.push([ze,ye]),this.matchAt+=T(ye)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ye=this.regexes.map(ze=>ze[1]);this.matcherRe=se(L(ye,{joinWith:"|"}),!0),this.lastIndex=0}exec(ye){this.matcherRe.lastIndex=this.lastIndex;const ze=this.matcherRe.exec(ye);if(!ze)return null;const Ct=ze.findIndex((Zn,al)=>al>0&&Zn!==void 0),bt=this.matchIndexes[Ct];return ze.splice(0,Ct),Object.assign(ze,bt)}}class ke{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ye){if(this.multiRegexes[ye])return this.multiRegexes[ye];const ze=new pe;return this.rules.slice(ye).forEach(([Ct,bt])=>ze.addRule(Ct,bt)),ze.compile(),this.multiRegexes[ye]=ze,ze}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ye,ze){this.rules.push([ye,ze]),ze.type==="begin"&&this.count++}exec(ye){const ze=this.getMatcher(this.regexIndex);ze.lastIndex=this.lastIndex;let Ct=ze.exec(ye);if(this.resumingScanAtSamePosition()&&!(Ct&&Ct.index===this.lastIndex)){const bt=this.getMatcher(0);bt.lastIndex=this.lastIndex+1,Ct=bt.exec(ye)}return Ct&&(this.regexIndex+=Ct.position+1,this.regexIndex===this.count&&this.considerAll()),Ct}}function pt(Ee){const ye=new ke;return Ee.contains.forEach(ze=>ye.addRule(ze.begin,{rule:ze,type:"begin"})),Ee.terminatorEnd&&ye.addRule(Ee.terminatorEnd,{type:"end"}),Ee.illegal&&ye.addRule(Ee.illegal,{type:"illegal"}),ye}function rt(Ee,ye){const ze=Ee;if(Ee.isCompiled)return ze;[ve,lt,ya,Be].forEach(bt=>bt(Ee,ye)),V.compilerExtensions.forEach(bt=>bt(Ee,ye)),Ee.__beforeBegin=null,[_e,He,Re].forEach(bt=>bt(Ee,ye)),Ee.isCompiled=!0;let Ct=null;return typeof Ee.keywords=="object"&&Ee.keywords.$pattern&&(Ee.keywords=Object.assign({},Ee.keywords),Ct=Ee.keywords.$pattern,delete Ee.keywords.$pattern),Ct=Ct||/\w+/,Ee.keywords&&(Ee.keywords=xt(Ee.keywords,V.case_insensitive)),ze.keywordPatternRe=se(Ct,!0),ye&&(Ee.begin||(Ee.begin=/\B|\b/),ze.beginRe=se(ze.begin),!Ee.end&&!Ee.endsWithParent&&(Ee.end=/\B|\b/),Ee.end&&(ze.endRe=se(ze.end)),ze.terminatorEnd=x(ze.end)||"",Ee.endsWithParent&&ye.terminatorEnd&&(ze.terminatorEnd+=(Ee.end?"|":"")+ye.terminatorEnd)),Ee.illegal&&(ze.illegalRe=se(Ee.illegal)),Ee.contains||(Ee.contains=[]),Ee.contains=[].concat(...Ee.contains.map(function(bt){return Dn(bt==="self"?Ee:bt)})),Ee.contains.forEach(function(bt){rt(bt,ze)}),Ee.starts&&rt(Ee.starts,ye),ze.matcher=pt(ze),ze}if(V.compilerExtensions||(V.compilerExtensions=[]),V.contains&&V.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return V.classNameAliases=r(V.classNameAliases||{}),rt(V)}function Qt(V){return V?V.endsWithParent||Qt(V.starts):!1}function Dn(V){return V.variants&&!V.cachedVariants&&(V.cachedVariants=V.variants.map(function(se){return r(V,{variants:null},se)})),V.cachedVariants?V.cachedVariants:Qt(V)?r(V,{starts:V.starts?r(V.starts):null}):Object.isFrozen(V)?r(V):V}var Pt="11.11.1";class ps extends Error{constructor(se,pe){super(se),this.name="HTMLInjectionError",this.html=pe}}const Vl=i,xi=r,va=Symbol("nomatch"),nl=7,ba=function(V){const se=Object.create(null),pe=Object.create(null),ke=[];let pt=!0;const rt="Could not find the language '{}', did you forget to load/include a language module?",Ee={disableAutodetect:!0,name:"Plain text",contains:[]};let ye={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:y};function ze(de){return ye.noHighlightRe.test(de)}function Ct(de){let Me=de.className+" ";Me+=de.parentNode?de.parentNode.className:"";const Ve=ye.languageDetectRe.exec(Me);if(Ve){const it=Wt(Ve[1]);return it||(zn(rt.replace("{}",Ve[1])),zn("Falling back to no-highlight mode for this block.",de)),it?Ve[1]:"no-highlight"}return Me.split(/\s+/).find(it=>ze(it)||Wt(it))}function bt(de,Me,Ve){let it="",Tt="";typeof Me=="object"?(it=de,Ve=Me.ignoreIllegals,Tt=Me.language):(Gt("10.7.0","highlight(lang, code, ...args) has been deprecated."),Gt("10.7.0",`Please use highlight(code, options) instead.
|
|
18
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Tt=de,it=Me),Ve===void 0&&(Ve=!0);const Ft={code:it,language:Tt};Sa("before:highlight",Ft);const dn=Ft.result?Ft.result:Zn(Ft.language,Ft.code,Ve);return dn.code=Ft.code,Sa("after:highlight",dn),dn}function Zn(de,Me,Ve,it){const Tt=Object.create(null);function Ft(ge,Ne){return ge.keywords[Ne]}function dn(){if(!De.keywords){Bt.addText(ot);return}let ge=0;De.keywordPatternRe.lastIndex=0;let Ne=De.keywordPatternRe.exec(ot),Ue="";for(;Ne;){Ue+=ot.substring(ge,Ne.index);const Ie=Ht.case_insensitive?Ne[0].toLowerCase():Ne[0],Rt=Ft(De,Ie);if(Rt){const[Ln,vs]=Rt;if(Bt.addText(Ue),Ue="",Tt[Ie]=(Tt[Ie]||0)+1,Tt[Ie]<=nl&&(ol+=vs),Ln.startsWith("_"))Ue+=Ne[0];else{const Xr=Ht.classNameAliases[Ln]||Ln;hn(Ne[0],Xr)}}else Ue+=Ne[0];ge=De.keywordPatternRe.lastIndex,Ne=De.keywordPatternRe.exec(ot)}Ue+=ot.substring(ge),Bt.addText(Ue)}function rn(){if(ot==="")return;let ge=null;if(typeof De.subLanguage=="string"){if(!se[De.subLanguage]){Bt.addText(ot);return}ge=Zn(De.subLanguage,ot,!0,Gr[De.subLanguage]),Gr[De.subLanguage]=ge._top}else ge=ll(ot,De.subLanguage.length?De.subLanguage:null);De.relevance>0&&(ol+=ge.relevance),Bt.__addSublanguage(ge._emitter,ge.language)}function ft(){De.subLanguage!=null?rn():dn(),ot=""}function hn(ge,Ne){ge!==""&&(Bt.startScope(Ne),Bt.addText(ge),Bt.endScope())}function Ei(ge,Ne){let Ue=1;const Ie=Ne.length-1;for(;Ue<=Ie;){if(!ge._emit[Ue]){Ue++;continue}const Rt=Ht.classNameAliases[ge[Ue]]||ge[Ue],Ln=Ne[Ue];Rt?hn(Ln,Rt):(ot=Ln,dn(),ot=""),Ue++}}function wa(ge,Ne){return ge.scope&&typeof ge.scope=="string"&&Bt.openNode(Ht.classNameAliases[ge.scope]||ge.scope),ge.beginScope&&(ge.beginScope._wrap?(hn(ot,Ht.classNameAliases[ge.beginScope._wrap]||ge.beginScope._wrap),ot=""):ge.beginScope._multi&&(Ei(ge.beginScope,Ne),ot="")),De=Object.create(ge,{parent:{value:De}}),De}function Gl(ge,Ne,Ue){let Ie=E(ge.endRe,Ue);if(Ie){if(ge["on:end"]){const Rt=new l(ge);ge["on:end"](Ne,Rt),Rt.isMatchIgnored&&(Ie=!1)}if(Ie){for(;ge.endsParent&&ge.parent;)ge=ge.parent;return ge}}if(ge.endsWithParent)return Gl(ge.parent,Ne,Ue)}function _a(ge){return De.matcher.regexIndex===0?(ot+=ge[0],1):(cl=!0,0)}function ys(ge){const Ne=ge[0],Ue=ge.rule,Ie=new l(Ue),Rt=[Ue.__beforeBegin,Ue["on:begin"]];for(const Ln of Rt)if(Ln&&(Ln(ge,Ie),Ie.isMatchIgnored))return _a(Ne);return Ue.skip?ot+=Ne:(Ue.excludeBegin&&(ot+=Ne),ft(),!Ue.returnBegin&&!Ue.excludeBegin&&(ot=Ne)),wa(Ue,ge),Ue.returnBegin?0:Ne.length}function on(ge){const Ne=ge[0],Ue=Me.substring(ge.index),Ie=Gl(De,ge,Ue);if(!Ie)return va;const Rt=De;De.endScope&&De.endScope._wrap?(ft(),hn(Ne,De.endScope._wrap)):De.endScope&&De.endScope._multi?(ft(),Ei(De.endScope,ge)):Rt.skip?ot+=Ne:(Rt.returnEnd||Rt.excludeEnd||(ot+=Ne),ft(),Rt.excludeEnd&&(ot=Ne));do De.scope&&Bt.closeNode(),!De.skip&&!De.subLanguage&&(ol+=De.relevance),De=De.parent;while(De!==Ie.parent);return Ie.starts&&wa(Ie.starts,ge),Rt.returnEnd?0:Ne.length}function Na(){const ge=[];for(let Ne=De;Ne!==Ht;Ne=Ne.parent)Ne.scope&&ge.unshift(Ne.scope);ge.forEach(Ne=>Bt.openNode(Ne))}let Aa={};function rl(ge,Ne){const Ue=Ne&&Ne[0];if(ot+=ge,Ue==null)return ft(),0;if(Aa.type==="begin"&&Ne.type==="end"&&Aa.index===Ne.index&&Ue===""){if(ot+=Me.slice(Ne.index,Ne.index+1),!pt){const Ie=new Error(`0 width match regex (${de})`);throw Ie.languageName=de,Ie.badRule=Aa.rule,Ie}return 1}if(Aa=Ne,Ne.type==="begin")return ys(Ne);if(Ne.type==="illegal"&&!Ve){const Ie=new Error('Illegal lexeme "'+Ue+'" for mode "'+(De.scope||"<unnamed>")+'"');throw Ie.mode=De,Ie}else if(Ne.type==="end"){const Ie=on(Ne);if(Ie!==va)return Ie}if(Ne.type==="illegal"&&Ue==="")return ot+=`
|
|
19
|
+
`,1;if(xs>1e5&&xs>Ne.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ot+=Ue,Ue.length}const Ht=Wt(de);if(!Ht)throw Fe(rt.replace("{}",de)),new Error('Unknown language: "'+de+'"');const qr=xa(Ht);let Si="",De=it||qr;const Gr={},Bt=new ye.__emitter(ye);Na();let ot="",ol=0,Ca=0,xs=0,cl=!1;try{if(Ht.__emitTokens)Ht.__emitTokens(Me,Bt);else{for(De.matcher.considerAll();;){xs++,cl?cl=!1:De.matcher.considerAll(),De.matcher.lastIndex=Ca;const ge=De.matcher.exec(Me);if(!ge)break;const Ne=Me.substring(Ca,ge.index),Ue=rl(Ne,ge);Ca=ge.index+Ue}rl(Me.substring(Ca))}return Bt.finalize(),Si=Bt.toHTML(),{language:de,value:Si,relevance:ol,illegal:!1,_emitter:Bt,_top:De}}catch(ge){if(ge.message&&ge.message.includes("Illegal"))return{language:de,value:Vl(Me),illegal:!0,relevance:0,_illegalBy:{message:ge.message,index:Ca,context:Me.slice(Ca-100,Ca+100),mode:ge.mode,resultSoFar:Si},_emitter:Bt};if(pt)return{language:de,value:Vl(Me),illegal:!1,relevance:0,errorRaised:ge,_emitter:Bt,_top:De};throw ge}}function al(de){const Me={value:Vl(de),illegal:!1,relevance:0,_top:Ee,_emitter:new ye.__emitter(ye)};return Me._emitter.addText(de),Me}function ll(de,Me){Me=Me||ye.languages||Object.keys(se);const Ve=al(de),it=Me.filter(Wt).filter(Kn).map(ft=>Zn(ft,de,!1));it.unshift(Ve);const Tt=it.sort((ft,hn)=>{if(ft.relevance!==hn.relevance)return hn.relevance-ft.relevance;if(ft.language&&hn.language){if(Wt(ft.language).supersetOf===hn.language)return 1;if(Wt(hn.language).supersetOf===ft.language)return-1}return 0}),[Ft,dn]=Tt,rn=Ft;return rn.secondBest=dn,rn}function kn(de,Me,Ve){const it=Me&&pe[Me]||Ve;de.classList.add("hljs"),de.classList.add(`language-${it}`)}function Mt(de){let Me=null;const Ve=Ct(de);if(ze(Ve))return;if(Sa("before:highlightElement",{el:de,language:Ve}),de.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",de);return}if(de.children.length>0&&(ye.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(de)),ye.throwUnescapedHTML))throw new ps("One of your code blocks includes unescaped HTML.",de.innerHTML);Me=de;const it=Me.textContent,Tt=Ve?bt(it,{language:Ve,ignoreIllegals:!0}):ll(it);de.innerHTML=Tt.value,de.dataset.highlighted="yes",kn(de,Ve,Tt.language),de.result={language:Tt.language,re:Tt.relevance,relevance:Tt.relevance},Tt.secondBest&&(de.secondBest={language:Tt.secondBest.language,relevance:Tt.secondBest.relevance}),Sa("after:highlightElement",{el:de,result:Tt,text:it})}function Kt(de){ye=xi(ye,de)}const In=()=>{sl(),Gt("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function il(){sl(),Gt("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Yl=!1;function sl(){function de(){sl()}if(document.readyState==="loading"){Yl||window.addEventListener("DOMContentLoaded",de,!1),Yl=!0;return}document.querySelectorAll(ye.cssSelector).forEach(Mt)}function vi(de,Me){let Ve=null;try{Ve=Me(V)}catch(it){if(Fe("Language definition for '{}' could not be registered.".replace("{}",de)),pt)Fe(it);else throw it;Ve=Ee}Ve.name||(Ve.name=de),se[de]=Ve,Ve.rawDefinition=Me.bind(null,V),Ve.aliases&&Qn(Ve.aliases,{languageName:de})}function Ea(de){delete se[de];for(const Me of Object.keys(pe))pe[Me]===de&&delete pe[Me]}function ql(){return Object.keys(se)}function Wt(de){return de=(de||"").toLowerCase(),se[de]||se[pe[de]]}function Qn(de,{languageName:Me}){typeof de=="string"&&(de=[de]),de.forEach(Ve=>{pe[Ve.toLowerCase()]=Me})}function Kn(de){const Me=Wt(de);return Me&&!Me.disableAutodetect}function sa(de){de["before:highlightBlock"]&&!de["before:highlightElement"]&&(de["before:highlightElement"]=Me=>{de["before:highlightBlock"](Object.assign({block:Me.el},Me))}),de["after:highlightBlock"]&&!de["after:highlightElement"]&&(de["after:highlightElement"]=Me=>{de["after:highlightBlock"](Object.assign({block:Me.el},Me))})}function zt(de){sa(de),ke.push(de)}function bi(de){const Me=ke.indexOf(de);Me!==-1&&ke.splice(Me,1)}function Sa(de,Me){const Ve=de;ke.forEach(function(it){it[Ve]&&it[Ve](Me)})}function Fn(de){return Gt("10.7.0","highlightBlock will be removed entirely in v12.0"),Gt("10.7.0","Please use highlightElement now."),Mt(de)}Object.assign(V,{highlight:bt,highlightAuto:ll,highlightAll:sl,highlightElement:Mt,highlightBlock:Fn,configure:Kt,initHighlighting:In,initHighlightingOnLoad:il,registerLanguage:vi,unregisterLanguage:Ea,listLanguages:ql,getLanguage:Wt,registerAliases:Qn,autoDetection:Kn,inherit:xi,addPlugin:zt,removePlugin:bi}),V.debugMode=function(){pt=!1},V.safeMode=function(){pt=!0},V.versionString=Pt,V.regex={concat:_,lookahead:v,either:C,optional:S,anyNumberOfTimes:w};for(const de in Ce)typeof Ce[de]=="object"&&t(Ce[de]);return Object.assign(V,Ce),V},sn=ba({});return sn.newInstance=()=>ba({}),zd=sn,sn.HighlightJS=sn,sn.default=sn,zd}var vR=xR();const Rr=ch(vR),tx="[A-Za-z$_][0-9A-Za-z$_]*",bR=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],ER=["true","false","null","undefined","NaN","Infinity"],$b=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Vb=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Yb=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],SR=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],wR=[].concat(Yb,$b,Vb);function _R(t){const l=t.regex,i=(j,{after:q})=>{const te="</"+j[0].slice(1);return j.input.indexOf(te,q)!==-1},r=tx,o={begin:"<>",end:"</>"},u=/<[A-Za-z0-9\\._:-]+\s*\/>/,f={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(j,q)=>{const te=j[0].length+j.index,O=j.input[te];if(O==="<"||O===","){q.ignoreMatch();return}O===">"&&(i(j,{after:te})||q.ignoreMatch());let H;const Q=j.input.substring(te);if(H=Q.match(/^\s*=/)){q.ignoreMatch();return}if((H=Q.match(/^\s+extends\s+/))&&H.index===0){q.ignoreMatch();return}}},m={$pattern:tx,keyword:bR,literal:ER,built_in:wR,"variable.language":SR},g="[0-9](_?[0-9])*",h=`\\.(${g})`,y="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",x={className:"number",variants:[{begin:`(\\b(${y})((${h})|\\.)?|(${h}))[eE][+-]?(${g})\\b`},{begin:`\\b(${y})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},v={className:"subst",begin:"\\$\\{",end:"\\}",keywords:m,contains:[]},w={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,v],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,v],subLanguage:"css"}},_={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,v],subLanguage:"graphql"}},A={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,v]},T={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},E=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,w,S,_,A,{match:/\$\d+/},x];v.contains=E.concat({begin:/\{/,end:/\}/,keywords:m,contains:["self"].concat(E)});const R=[].concat(T,v.contains),L=R.concat([{begin:/(\s*)\(/,end:/\)/,keywords:m,contains:["self"].concat(R)}]),D={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:L},B={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,l.concat(r,"(",l.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},Y={relevance:0,match:l.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...$b,...Vb]}},X={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ie={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[D],illegal:/%/},Z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function K(j){return l.concat("(?!",j.join("|"),")")}const ae={match:l.concat(/\b/,K([...Yb,"super","import"].map(j=>`${j}\\s*\\(`)),r,l.lookahead(/\s*\(/)),className:"title.function",relevance:0},k={begin:l.concat(/\./,l.lookahead(l.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},I={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},D]},M="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",U={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(M)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[D]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:m,exports:{PARAMS_CONTAINS:L,CLASS_REFERENCE:Y},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),X,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,w,S,_,A,T,{match:/\$\d+/},x,Y,{scope:"attr",match:r+l.lookahead(":"),relevance:0},U,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,t.REGEXP_MODE,{className:"function",begin:M,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:L}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:u},{begin:f.begin,"on:begin":f.isTrulyOpeningTag,end:f.end}],subLanguage:"xml",contains:[{begin:f.begin,end:f.end,skip:!0,contains:["self"]}]}]},ie,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[D,t.inherit(t.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},k,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[D]},ae,Z,B,I,{match:/\$[(.]/}]}}function NR(t){const l=t.regex,i="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=l.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),o=l.concat(r,/(::\w+)*/),f={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},m={className:"doctag",begin:"@[A-Za-z]+"},g={begin:"#<",end:">"},h=[t.COMMENT("#","$",{contains:[m]}),t.COMMENT("^=begin","^=end",{contains:[m],relevance:10}),t.COMMENT("^__END__",t.MATCH_NOTHING_RE)],y={className:"subst",begin:/#\{/,end:/\}/,keywords:f},x={className:"string",contains:[t.BACKSLASH_ESCAPE,y],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:l.concat(/<<[-~]?'?/,l.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[t.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[t.BACKSLASH_ESCAPE,y]})]}]},v="[1-9](_?[0-9])*|0",w="[0-9](_?[0-9])*",S={className:"number",relevance:0,variants:[{begin:`\\b(${v})(\\.(${w}))?([eE][+-]?(${w})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},_={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:f}]},D=[x,{variants:[{match:[/class\s+/,o,/\s+<\s+/,o]},{match:[/\b(class|module)\s+/,o]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:f},{match:[/(include|extend)\s+/,o],scope:{2:"title.class"},keywords:f},{relevance:0,match:[o,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,i],scope:{1:"keyword",3:"title.function"},contains:[_]},{begin:t.IDENT_RE+"::"},{className:"symbol",begin:t.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[x,{begin:i}],relevance:0},S,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:f},{begin:"("+t.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[t.BACKSLASH_ESCAPE,y],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(g,h),relevance:0}].concat(g,h);y.contains=D,_.contains=D;const ie=[{begin:/^\s*=>/,starts:{end:"$",contains:D}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:f,contains:D}}];return h.unshift(g),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:f,illegal:/\/\*/,contains:[t.SHEBANG({binary:"ruby"})].concat(ie).concat(h).concat(D)}}const Hc="[A-Za-z$_][0-9A-Za-z$_]*",qb=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Gb=["true","false","null","undefined","NaN","Infinity"],Xb=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Zb=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Ib=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Qb=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Kb=[].concat(Ib,Xb,Zb);function AR(t){const l=t.regex,i=(j,{after:q})=>{const te="</"+j[0].slice(1);return j.input.indexOf(te,q)!==-1},r=Hc,o={begin:"<>",end:"</>"},u=/<[A-Za-z0-9\\._:-]+\s*\/>/,f={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(j,q)=>{const te=j[0].length+j.index,O=j.input[te];if(O==="<"||O===","){q.ignoreMatch();return}O===">"&&(i(j,{after:te})||q.ignoreMatch());let H;const Q=j.input.substring(te);if(H=Q.match(/^\s*=/)){q.ignoreMatch();return}if((H=Q.match(/^\s+extends\s+/))&&H.index===0){q.ignoreMatch();return}}},m={$pattern:Hc,keyword:qb,literal:Gb,built_in:Kb,"variable.language":Qb},g="[0-9](_?[0-9])*",h=`\\.(${g})`,y="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",x={className:"number",variants:[{begin:`(\\b(${y})((${h})|\\.)?|(${h}))[eE][+-]?(${g})\\b`},{begin:`\\b(${y})\\b((${h})\\b|\\.)?|(${h})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},v={className:"subst",begin:"\\$\\{",end:"\\}",keywords:m,contains:[]},w={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,v],subLanguage:"xml"}},S={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,v],subLanguage:"css"}},_={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[t.BACKSLASH_ESCAPE,v],subLanguage:"graphql"}},A={className:"string",begin:"`",end:"`",contains:[t.BACKSLASH_ESCAPE,v]},T={className:"comment",variants:[t.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),t.C_BLOCK_COMMENT_MODE,t.C_LINE_COMMENT_MODE]},E=[t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,w,S,_,A,{match:/\$\d+/},x];v.contains=E.concat({begin:/\{/,end:/\}/,keywords:m,contains:["self"].concat(E)});const R=[].concat(T,v.contains),L=R.concat([{begin:/(\s*)\(/,end:/\)/,keywords:m,contains:["self"].concat(R)}]),D={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:L},B={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,l.concat(r,"(",l.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},Y={relevance:0,match:l.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Xb,...Zb]}},X={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},ie={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[D],illegal:/%/},Z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function K(j){return l.concat("(?!",j.join("|"),")")}const ae={match:l.concat(/\b/,K([...Ib,"super","import"].map(j=>`${j}\\s*\\(`)),r,l.lookahead(/\s*\(/)),className:"title.function",relevance:0},k={begin:l.concat(/\./,l.lookahead(l.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},I={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},D]},M="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+t.UNDERSCORE_IDENT_RE+")\\s*=>",U={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(M)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[D]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:m,exports:{PARAMS_CONTAINS:L,CLASS_REFERENCE:Y},illegal:/#(?![$_A-z])/,contains:[t.SHEBANG({label:"shebang",binary:"node",relevance:5}),X,t.APOS_STRING_MODE,t.QUOTE_STRING_MODE,w,S,_,A,T,{match:/\$\d+/},x,Y,{scope:"attr",match:r+l.lookahead(":"),relevance:0},U,{begin:"("+t.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,t.REGEXP_MODE,{className:"function",begin:M,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:m,contains:L}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:o.begin,end:o.end},{match:u},{begin:f.begin,"on:begin":f.isTrulyOpeningTag,end:f.end}],subLanguage:"xml",contains:[{begin:f.begin,end:f.end,skip:!0,contains:["self"]}]}]},ie,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[D,t.inherit(t.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},k,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[D]},ae,Z,B,I,{match:/\$[(.]/}]}}function CR(t){const l=t.regex,i=AR(t),r=Hc,o=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],u={begin:[/namespace/,/\s+/,t.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},f={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:o},contains:[i.exports.CLASS_REFERENCE]},m={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},g=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:Hc,keyword:qb.concat(g),literal:Gb,built_in:Kb.concat(o),"variable.language":Qb},y={className:"meta",begin:"@"+r},x=(_,A,C)=>{const T=_.contains.findIndex(E=>E.label===A);if(T===-1)throw new Error("can not find mode to replace");_.contains.splice(T,1,C)};Object.assign(i.keywords,h),i.exports.PARAMS_CONTAINS.push(y);const v=i.contains.find(_=>_.scope==="attr"),w=Object.assign({},v,{match:l.concat(r,l.lookahead(/\s*\?:/))});i.exports.PARAMS_CONTAINS.push([i.exports.CLASS_REFERENCE,v,w]),i.contains=i.contains.concat([y,u,f,w]),x(i,"shebang",t.SHEBANG()),x(i,"use_strict",m);const S=i.contains.find(_=>_.label==="func.def");return S.relevance=0,Object.assign(i,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),i}function Fb(t){if(!t||typeof t!="object")return;const l=t,{_type:i,...r}=l;return{...r,message:l.message||l.error,code_snippet:l.code_snippet}}Rr.registerLanguage("javascript",_R);Rr.registerLanguage("ruby",NR);Rr.registerLanguage("typescript",CR);function MR(t){return!t||t.endsWith(".rb")||t.endsWith(".rake")?"ruby":t.endsWith(".ts")||t.endsWith(".tsx")?"typescript":t.endsWith(".js")||t.endsWith(".jsx")?"javascript":"ruby"}function TR(t,l){if(!t)return" ";try{return Rr.highlight(t,{language:l}).value}catch{return Rr.highlight(t,{language:"plaintext"}).value}}function Jb({snippet:t,filePath:l,lineNumber:i}){const r=z.useMemo(()=>MR(l),[l]),o=l?.split("/").pop();return p.jsxs("div",{children:[p.jsxs("h3",{className:"text-sm font-medium text-slate-400 mb-3 flex items-center gap-2",children:[p.jsx(s_,{className:"w-4 h-4"}),"Source Code"]}),p.jsxs("div",{className:"bg-slate-950 rounded-lg border border-slate-800 overflow-hidden",children:[(l||i)&&p.jsxs("div",{className:"px-4 py-2 border-b border-slate-800 bg-slate-900/80 flex items-center justify-between gap-2",children:[p.jsx("span",{className:"text-[10px] uppercase font-bold tracking-widest text-slate-500",children:"Location"}),p.jsxs("span",{className:"text-xs font-mono text-slate-400 truncate",title:l,children:[o,i?`:${i}`:""]})]}),p.jsx("pre",{className:"overflow-x-auto m-0 p-4 text-xs leading-6 bg-transparent",children:p.jsx("code",{className:`hljs language-${r} !bg-transparent !p-0 block`,children:t.map((u,f)=>p.jsxs("span",{className:`flex ${u.target?"bg-red-500/15 -mx-4 px-4 border-l-2 border-red-400":""}`,children:[p.jsx("span",{className:`select-none w-6 shrink-0 text-right pr-2 ${u.target?"text-red-400 font-bold":"text-slate-600"}`,"aria-hidden":"true",children:u.target?">":" "}),p.jsx("span",{className:`select-none w-10 shrink-0 text-right pr-4 ${u.target?"text-red-400/70":"text-slate-600"}`,children:u.line_number}),p.jsx("span",{className:"flex-1 pr-4 whitespace-pre",dangerouslySetInnerHTML:{__html:TR(u.content,r)}})]},`${u.line_number}-${f}`))})})]})]})}function nx(t){return!!t&&typeof t=="object"&&t._type==="map_results"}function RR({summary:t}){const[l,i]=z.useState(null);return p.jsxs("div",{className:"space-y-3",children:[p.jsx("div",{className:"grid grid-cols-3 gap-2",children:[{label:"elements",value:t.total,tone:"text-slate-300"},{label:"succeeded",value:t.succeeded,tone:"text-teal-400"},{label:"failed",value:t.failed,tone:t.failed>0?"text-rose-400":"text-slate-500"}].map(r=>p.jsxs("div",{className:"bg-slate-950 rounded-lg border border-slate-800 p-3",children:[p.jsx("div",{className:`text-xl font-bold font-mono ${r.tone}`,children:r.value}),p.jsx("div",{className:"text-[10px] uppercase tracking-wider text-slate-500",children:r.label})]},r.label))}),t.failed>0&&p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx("span",{className:"text-[10px] uppercase font-bold tracking-widest text-rose-400/70",children:"Failed elements"}),t.failures_truncated&&p.jsxs("span",{className:"text-[10px] text-slate-500 italic",children:["showing ",t.failures.length," of ",t.failed]})]}),t.failures.map((r,o)=>{const u=Fb(r),f=l===o;return p.jsxs("div",{className:"bg-rose-500/5 border border-rose-500/20 rounded-lg overflow-hidden",children:[p.jsxs("button",{onClick:()=>i(f?null:o),className:"w-full text-left px-3 py-2 flex items-start gap-2 hover:bg-rose-500/10 transition-colors",children:[f?p.jsx(Nx,{className:"w-3 h-3 mt-1 shrink-0 text-rose-400"}):p.jsx(_x,{className:"w-3 h-3 mt-1 shrink-0 text-rose-400"}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.index!==void 0&&p.jsxs("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded bg-slate-800 text-slate-400",children:["#",r.index]}),u?.step_name&&p.jsx("span",{className:"text-[10px] font-mono text-rose-400/80",children:u.step_name}),u?.exception_class&&p.jsx("span",{className:"text-[10px] font-mono text-slate-500",children:u.exception_class})]}),p.jsx("div",{className:"text-xs text-rose-300 font-mono mt-1 break-words",children:u?.message})]})]}),f&&p.jsxs("div",{className:"px-3 pb-3 space-y-3 border-t border-rose-500/10 pt-3",children:[u?.code_snippet&&u.code_snippet.length>0&&p.jsx(Jb,{snippet:u.code_snippet,filePath:u.file_path,lineNumber:u.line_number}),r.inputs&&Object.keys(r.inputs).length>0&&p.jsxs("div",{children:[p.jsx("span",{className:"text-[10px] uppercase font-bold tracking-widest text-slate-500",children:"Element inputs"}),p.jsx("pre",{className:"mt-1 bg-slate-950 rounded p-2 text-xs text-slate-300 overflow-x-auto",children:JSON.stringify(r.inputs,null,2)})]}),u?.backtrace&&u.backtrace.length>0&&p.jsxs("div",{children:[p.jsx("span",{className:"text-[10px] uppercase font-bold tracking-widest text-slate-500",children:"Stack trace"}),p.jsx("div",{className:"mt-1 bg-slate-950 rounded p-2 text-xs text-rose-400/70 font-mono whitespace-pre-wrap max-h-48 overflow-y-auto",children:u.backtrace.join(`
|
|
20
|
+
`)})]})]})]},o)})]})]})}function OR({stepName:t,structure:l,results:i,trace:r,error:o,undoStack:u=[],stepAttempts:f={},composedContexts:m={},onClose:g,reactorId:h,reactorStatus:y,onAction:x}){const[v,w]=z.useState(!1),[S,_]=z.useState(""),[A,C]=z.useState(null),[T,E]=z.useState(!1),R=async()=>{if(!(!h||!t)){E(!0),C(null);try{let H={};if(S.trim())try{H=JSON.parse(S)}catch{C("Invalid JSON payload"),E(!1);return}const Q=await fetch(Ia(`/api/reactors/${h}/continue`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({payload:H,step_name:t.split(".").pop()})}),J=await Q.json();Q.ok?(_(""),x&&x(),g&&g()):C(J.error||"Failed to resume")}catch(H){console.error("Failed to resume",H),C("An unexpected error occurred")}finally{E(!1)}}},L=z.useMemo(()=>{if(!t)return null;const H=t.split("."),Q=(ce,he,re)=>{const fe=ce[0],me=ce.length===1,Ce=he?.[fe];if(me){const xe=re?.intermediate_results||{},ve=re?.execution_trace||[],_e=re?.retry_context?.step_attempts||{};return{stepConfig:Ce,result:xe[fe],attempts:_e[fe]||0,trace:ve.filter(He=>He.step===fe),asyncRef:re?.composed_contexts?.[fe],context:re}}else{const xe=re?.composed_contexts?.[fe],ve=xe?.context?.value||xe?.context;return Q(ce.slice(1),Ce?.nested_structure,ve)}},J={composed_contexts:m,failure_reason:o,intermediate_results:i,execution_trace:r,retry_context:{step_attempts:f}};try{return Q(H,l,J)}catch(ce){return console.error("Error resolving step data:",ce),null}},[t,l,i,r,f,m,o]),D=L?.stepConfig,B=L?.result,Y=L?.context?.failure_reason?.step_name===t?.split(".").pop(),X=L?.attempts||0,ie=X>1?X-1:0,Z=D?.type==="async_step"||D?.type==="async_reactor",K=L?.asyncRef,ae=K?.record,k=K?.context?.value||K?.context,I=ae?.status||k?.status||"dispatched",M=L?.trace||[],j=M[M.length-1]?.arguments||(Y?L?.context?.failure_reason?.step_arguments:{}),q=Fb(L?.context?.failure_reason),te=q?.code_snippet,O=z.useMemo(()=>{const H=[],Q=(J,ce,he,re)=>{const fe=J.filter(xe=>xe.type==="undo"||xe.type==="compensate").map(xe=>({step_name:xe.step,result:xe.result,status:"executed",timestamp:xe.timestamp?._type==="Time"?xe.timestamp.value:null,type:xe.type})),me=(ce||[]).map(xe=>({step_name:xe.step_name,result:null,status:"pending",timestamp:null,type:"undo"})),Ce=[...fe,...me.reverse()];Ce.length>0&&H.push({reactorName:re,items:Ce}),Object.entries(he||{}).forEach(([xe,ve])=>{const _e=ve?.context?.value||ve?.context;_e&&Q(_e.execution_trace||[],_e.undo_stack||[],_e.composed_contexts||{},xe)})};return Q(r,u,m,"Root Reactor"),H},[r,u,m]);return t?p.jsxs("div",{className:"h-full flex flex-col bg-slate-900/50 backdrop-blur-sm rounded-xl border border-slate-800 overflow-hidden",children:[p.jsx("div",{className:"px-6 py-4 border-b border-slate-800 bg-slate-900/80",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-3",children:[g&&p.jsx("button",{onClick:g,className:"p-1 hover:bg-white/10 rounded-full text-slate-400 hover:text-white transition-colors",children:p.jsx(ph,{className:"w-5 h-5"})}),p.jsx("div",{className:"p-2 bg-indigo-500/10 rounded-lg",children:p.jsx(jp,{className:"w-5 h-5 text-indigo-400"})}),p.jsxs("div",{children:[p.jsx("h2",{className:"font-bold text-white text-lg",children:t?.split(".").pop()}),p.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500 font-mono mt-0.5",children:[p.jsx("span",{className:"uppercase tracking-wider text-indigo-400",children:D?.type||"UNKNOWN"}),Z&&p.jsxs("span",{className:"bg-slate-800 px-1.5 py-0.5 rounded text-slate-400 flex items-center gap-1",children:[D?.type==="async_reactor"?p.jsx(Hd,{className:"w-3 h-3"}):p.jsx(Ld,{className:"w-3 h-3"}),"DISPATCHED"]})]})]})]}),ie>0&&p.jsx("div",{className:"flex items-center gap-1.5 px-2.5 py-1 bg-amber-500/10 border border-amber-500/20 rounded-md",children:p.jsxs("span",{className:"text-xs font-medium text-amber-500",children:["Retries: ",ie]})})]})}),p.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-8",children:[Z&&p.jsxs("div",{className:"bg-slate-800/40 rounded-lg border border-slate-700 border-dashed p-4",children:[p.jsxs("h3",{className:"text-sm font-medium text-slate-200 mb-2 flex items-center gap-2",children:[D?.type==="async_reactor"?p.jsx(Hd,{className:"w-4 h-4"}):p.jsx(Ld,{className:"w-4 h-4"}),"Dispatched independently"]}),p.jsx("p",{className:"text-xs text-slate-400 mb-3",children:D?.type==="async_reactor"?"This child reactor runs on its own and is not part of this reactor's compensation graph. Its failure only affects this reactor if a later step reads its result and decides to fail.":"This step's work runs in its own job. This reactor kept executing other ready steps, and a failure here compensates nothing unless a later step reads the result and returns Failure."}),p.jsxs("dl",{className:"text-xs font-mono space-y-1",children:[p.jsxs("div",{className:"flex gap-2",children:[p.jsx("dt",{className:"text-slate-500 w-28",children:"status"}),p.jsx("dd",{className:"text-slate-300",children:I})]}),K?.dispatched_at&&p.jsxs("div",{className:"flex gap-2",children:[p.jsx("dt",{className:"text-slate-500 w-28",children:"dispatched_at"}),p.jsx("dd",{className:"text-slate-300",children:K.dispatched_at?.value||String(K.dispatched_at)})]}),K?.execution_id&&p.jsxs("div",{className:"flex gap-2",children:[p.jsx("dt",{className:"text-slate-500 w-28",children:"execution_id"}),p.jsx("dd",{className:"text-slate-300 break-all",children:K.execution_id})]}),ae&&"success"in ae&&p.jsxs("div",{className:"flex gap-2",children:[p.jsx("dt",{className:"text-slate-500 w-28",children:"outcome"}),p.jsx("dd",{className:ae.success?"text-teal-400":"text-rose-400",children:ae.success?"Success":"Failure"})]})]}),ae?.result!==void 0&&p.jsx("pre",{className:"mt-3 bg-slate-950 rounded p-3 text-xs text-slate-300 overflow-x-auto",children:JSON.stringify(ae.result,null,2)}),K?.execution_id&&p.jsxs(Rn,{to:hi(K.execution_id),className:"mt-3 inline-flex items-center gap-1.5 text-xs text-indigo-400 hover:text-indigo-300 underline",children:["Open the linked execution ",p.jsx(Cx,{className:"w-3 h-3"})]})]}),y==="paused"&&D?.type==="interrupt"&&p.jsxs("div",{className:"bg-emerald-500/5 rounded-lg border border-emerald-500/20 p-4",children:[p.jsxs("h3",{className:"text-sm font-medium text-emerald-400 mb-2 flex items-center gap-2",children:[p.jsx(Tx,{className:"w-4 h-4"}),"Resume Execution"]}),p.jsx("p",{className:"text-xs text-slate-400 mb-3",children:"This step is an interrupt point. You can provide a payload and resume execution from here."}),p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{children:[p.jsx("label",{className:"text-xs font-mono text-slate-500 mb-1.5 block",children:"Payload (JSON)"}),p.jsx("textarea",{value:S,onChange:H=>_(H.target.value),placeholder:'{"key": "value"}',className:"w-full h-24 bg-slate-950 border border-slate-800 rounded-lg p-3 text-sm font-mono text-slate-200 focus:outline-none focus:border-emerald-500/50 focus:ring-1 focus:ring-emerald-500/50 font-mono placeholder-slate-700"})]}),A&&p.jsxs("div",{className:"text-xs text-red-400 flex items-center gap-1.5 bg-red-500/10 p-2 rounded border border-red-500/20",children:[p.jsx(Pa,{className:"w-3 h-3"}),A]}),p.jsx("button",{onClick:R,disabled:T,className:"w-full py-2 bg-emerald-600 hover:bg-emerald-500 text-white rounded-lg text-sm font-medium shadow-lg shadow-emerald-500/20 transition-all hover:-translate-y-0.5 disabled:opacity-50 disabled:cursor-not-allowed",children:T?"Resuming...":"Resume Reactor"})]})]}),Y&&q&&!nx(B)&&p.jsxs("div",{className:"space-y-4",children:[p.jsxs("h3",{className:"text-sm font-medium text-red-500 mb-3 flex items-center gap-2",children:[p.jsx(Pa,{className:"w-4 h-4"}),"Failure Details"]}),p.jsxs("div",{className:"bg-red-500/10 rounded-lg p-4 font-mono text-xs border border-red-500/20 text-red-300 overflow-x-auto space-y-2",children:[p.jsxs("div",{className:"flex flex-col gap-1",children:[q.exception_class&&p.jsx("span",{className:"text-[10px] uppercase font-bold tracking-wider text-red-400 opacity-70",children:q.exception_class}),p.jsx("div",{className:"font-bold text-sm leading-relaxed",children:q.message||q.error})]}),q.validation_errors&&p.jsxs("div",{className:"pt-3 mt-3 border-t border-red-500/10",children:[p.jsx("span",{className:"text-[10px] uppercase font-bold tracking-widest text-red-400/50 mb-2 block",children:"Validation Errors"}),p.jsx("div",{className:"space-y-2 bg-red-950/20 rounded p-2",children:Object.entries(q.validation_errors).map(([H,Q])=>p.jsxs("div",{className:"flex flex-col",children:[p.jsxs("span",{className:"font-bold text-red-400 text-xs",children:[H,":"]}),p.jsx("div",{className:"pl-2",children:Array.isArray(Q)?Q.map((J,ce)=>p.jsxs("div",{className:"text-red-300/90",children:["- ",J]},ce)):p.jsxs("div",{className:"text-red-300/90",children:["- ",String(Q)]})})]},H))})]})]}),te&&te.length>0&&p.jsx(Jb,{snippet:te,filePath:q.file_path,lineNumber:q.line_number}),q.backtrace&&p.jsxs("div",{className:"bg-red-500/10 rounded-lg p-4 font-mono text-xs border border-red-500/20 text-red-300 overflow-x-auto",children:[p.jsxs("div",{className:"flex items-center justify-between mb-2",children:[p.jsx("span",{className:"text-[10px] uppercase font-bold tracking-widest text-red-400/50",children:"Stack Trace"}),p.jsx("button",{onClick:()=>w(!v),className:"flex items-center gap-1 text-[10px] font-bold text-red-400/70 hover:text-red-400 transition-colors uppercase tracking-wider",children:v?p.jsxs(p.Fragment,{children:[p.jsx(Nx,{className:"w-3 h-3"})," Show Less"]}):p.jsxs(p.Fragment,{children:[p.jsx(_x,{className:"w-3 h-3"})," Show More (",q.backtrace.length," lines)"]})})]}),p.jsxs("div",{className:"text-red-400/70 whitespace-pre-wrap leading-relaxed max-h-[300px] overflow-y-auto custom-scrollbar",children:[v?q.backtrace.join(`
|
|
21
|
+
`):q.backtrace.slice(0,5).join(`
|
|
22
|
+
`),!v&&q.backtrace.length>5&&p.jsxs("div",{className:"mt-1 text-red-400/30 italic",children:["... and ",q.backtrace.length-5," more lines"]})]})]})]}),D?.depends_on?.length>0&&p.jsxs("div",{children:[p.jsxs("h3",{className:"text-sm font-medium text-slate-400 mb-3 flex items-center gap-2",children:[p.jsx(e_,{className:"w-4 h-4"}),"Dependencies"]}),p.jsx("div",{className:"flex flex-wrap gap-2",children:D.depends_on.map(H=>p.jsx("span",{className:"px-2 py-1 bg-slate-800 border border-slate-700 rounded text-xs text-slate-300 font-mono",children:H},H))})]}),p.jsxs("div",{children:[p.jsxs("h3",{className:"text-sm font-medium text-slate-400 mb-3 flex items-center gap-2",children:[p.jsx(Vw,{className:"w-4 h-4"}),"Arguments"]}),p.jsx("div",{className:"bg-slate-950 rounded-lg p-4 font-mono text-xs border border-slate-800 overflow-x-auto",children:p.jsx("pre",{className:"text-slate-300",children:JSON.stringify(j,null,2)})})]}),p.jsxs("div",{children:[p.jsxs("h3",{className:"text-sm font-medium text-slate-400 mb-3 flex items-center gap-2",children:[p.jsx(M_,{className:"w-4 h-4"}),"Result"]}),nx(B)?p.jsx(RR,{summary:B}):B!==void 0?p.jsx("div",{className:"bg-slate-950 rounded-lg p-4 font-mono text-xs border border-slate-800 overflow-x-auto",children:p.jsx("pre",{className:"text-emerald-400",children:JSON.stringify(B,null,2)})}):p.jsx("div",{className:"bg-slate-950/50 rounded-lg p-4 font-mono text-xs border border-slate-800/50 text-slate-600 italic",children:Y?p.jsx("span",{className:"text-red-400",children:"Step Failed"}):"No result (Pending or Failed)"})]})]})]}):p.jsxs("div",{className:"h-full flex flex-col bg-slate-900/50 backdrop-blur-sm rounded-xl border border-slate-800 overflow-hidden",children:[p.jsx("div",{className:"px-6 py-4 border-b border-slate-800 bg-slate-900/80",children:p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("div",{className:"p-2 bg-slate-800 rounded-lg",children:p.jsx(d_,{className:"w-5 h-5 text-slate-400"})}),p.jsxs("div",{children:[p.jsx("h2",{className:"font-bold text-white text-lg",children:"Execution Overview"}),p.jsx("div",{className:"text-xs text-slate-500 font-mono mt-0.5",children:"Global State"})]})]})}),p.jsx("div",{className:"flex-1 overflow-y-auto p-6 space-y-8",children:O.length>0?p.jsxs("div",{children:[p.jsxs("h3",{className:"text-sm font-medium text-slate-400 mb-3 flex items-center gap-2",children:[p.jsx(Dp,{className:"w-4 h-4"}),"Compensation History"]}),p.jsx("div",{className:"space-y-6",children:O.map((H,Q)=>p.jsxs("div",{className:"space-y-3",children:[p.jsxs("div",{className:"flex items-center gap-2 px-2",children:[p.jsx("div",{className:"h-px flex-1 bg-slate-800"}),p.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-slate-500 bg-slate-900/50 px-2 py-0.5 rounded border border-slate-800",children:H.reactorName}),p.jsx("div",{className:"h-px flex-1 bg-slate-800"})]}),p.jsx("div",{className:"space-y-2",children:H.items.map((J,ce)=>p.jsxs("div",{className:`rounded-lg p-3 border flex items-start gap-3 ${J.status==="executed"?"bg-slate-950/50 border-slate-800":"bg-slate-900/30 border-slate-800/50 border-dashed opacity-75"}`,children:[p.jsx("div",{className:`p-1.5 rounded mt-0.5 ${J.status==="executed"?"bg-emerald-500/10 text-emerald-400":"bg-slate-700/50 text-slate-500"}`,children:J.status==="executed"?p.jsx(n_,{className:"w-3 h-3"}):p.jsx(jp,{className:"w-3 h-3"})}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("span",{className:`font-medium text-sm block ${J.status==="executed"?"text-slate-300":"text-slate-500"}`,children:J.step_name}),p.jsxs("span",{className:"text-[10px] uppercase font-mono tracking-wider px-1.5 py-0.5 rounded bg-slate-800 text-slate-500 inline-flex items-center gap-1.5 mt-1",children:[J.type&&p.jsx("span",{className:`font-bold ${J.type==="compensate"?"text-amber-400":"text-indigo-400"}`,children:J.type}),p.jsx("span",{className:"opacity-50",children:"|"}),J.status]}),J.status==="executed"&&J.result&&p.jsx("div",{className:"mt-2 bg-black/30 rounded border border-white/5 p-2 font-mono text-xs text-slate-400 overflow-x-auto",children:JSON.stringify(J.result,null,2)})]})]},ce))})]},Q))})]}):p.jsxs("div",{className:"h-40 flex flex-col items-center justify-center text-slate-500 border border-slate-800/50 border-dashed rounded-xl bg-slate-900/30",children:[p.jsx(Dp,{className:"w-6 h-6 mb-2 opacity-50"}),p.jsx("p",{className:"text-center font-medium text-sm",children:"Undo History Empty"}),p.jsx("p",{className:"text-center text-xs mt-1 text-slate-600",children:"No compensations executed or pending."})]})})]})}function Uh(t){return t==null||t<0?"—":t===0?"expiring":t>=3600?`${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`:t>=60?`${Math.floor(t/60)}m ${t%60}s`:`${t}s`}function eu({keyValue:t,keyError:l}){return l?p.jsxs("span",{className:"text-xs text-amber-400/80 flex items-center gap-1",children:[p.jsx(Pa,{className:"w-3 h-3 shrink-0"}),l]}):p.jsx("span",{className:"font-mono text-xs text-slate-300 truncate",title:t??void 0,children:t??"—"})}function zR({lock:t}){const{state:l}=t,i=l?.held?l.owned_by_this_context?"Held (this run)":"Held (other)":"Free",r=l?.held?l.owned_by_this_context?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20":"bg-slate-800 text-slate-400 border-slate-700";return p.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-900/60 p-3 space-y-2 min-w-0",children:[p.jsxs("div",{className:"flex items-center justify-between gap-2",children:[p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p.jsx(p_,{className:"w-4 h-4 text-indigo-400 shrink-0"}),p.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Lock"})]}),p.jsx("span",{className:di("text-[10px] font-medium px-2 py-0.5 rounded-full border shrink-0",r),children:i})]}),p.jsx(eu,{keyValue:t.key,keyError:t.key_error}),p.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-[11px] text-slate-500",children:[p.jsxs("span",{children:["TTL config: ",t.configured.ttl,"s"]}),t.configured.auto_extend&&p.jsx("span",{children:"Auto-extend"}),l?.held&&l.reentrant_count!==void 0&&l.reentrant_count>1&&p.jsxs("span",{children:["Reentrant: ",l.reentrant_count]}),l?.held&&l.ttl!==void 0&&l.ttl>=0&&p.jsxs("span",{children:["Expires: ",Uh(l.ttl)]}),l?.held&&l.owner&&!l.owned_by_this_context&&p.jsxs("span",{className:"font-mono truncate max-w-full",title:l.owner,children:["Owner: ",l.owner.substring(0,8),"…"]})]})]})}function jR({semaphore:t}){const{state:l,configured:i}=t,r=l?.held??0,o=l?.limit||i.limit||1,u=o>0?Math.min(100,r/o*100):0;return p.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-900/60 p-3 space-y-2 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(u_,{className:"w-4 h-4 text-violet-400 shrink-0"}),p.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Semaphore"})]}),p.jsx(eu,{keyValue:t.key,keyError:t.key_error}),l&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-center justify-between text-xs text-slate-400",children:[p.jsxs("span",{children:[r," / ",o," held"]}),p.jsxs("span",{children:[l.available," available"]})]}),p.jsx("div",{className:"h-1.5 rounded-full bg-slate-800 overflow-hidden",children:p.jsx("div",{className:"h-full bg-violet-500/70 rounded-full transition-all",style:{width:`${u}%`}})})]})]})}function DR({rateLimit:t}){return p.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-900/60 p-3 space-y-2 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(R_,{className:"w-4 h-4 text-cyan-400 shrink-0"}),p.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Rate Limit"})]}),p.jsx(eu,{keyValue:t.key,keyError:t.key_error}),t.state&&t.state.length>0&&p.jsx("div",{className:"space-y-1.5",children:t.state.map(l=>{const i=l.count>=l.limit;return p.jsxs("div",{className:"flex items-center justify-between text-xs gap-2",children:[p.jsx("span",{className:"text-slate-500 capitalize",children:l.name}),p.jsxs("span",{className:di("font-mono",i?"text-amber-400":"text-slate-300"),children:[l.count,"/",l.limit]}),p.jsx("span",{className:"text-slate-600 text-[10px]",children:Uh(l.ttl)})]},l.name)})})]})}function kR({period:t}){const l=t.state?.marked??!1;return p.jsxs("div",{className:"rounded-lg border border-slate-800 bg-slate-900/60 p-3 space-y-2 min-w-0",children:[p.jsxs("div",{className:"flex items-center justify-between gap-2",children:[p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p.jsx(Zw,{className:"w-4 h-4 text-orange-400 shrink-0"}),p.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-slate-400",children:"Period"})]}),p.jsx("span",{className:di("text-[10px] font-medium px-2 py-0.5 rounded-full border shrink-0",l?"bg-orange-500/10 text-orange-400 border-orange-500/20":"bg-slate-800 text-slate-400 border-slate-700"),children:l?"Bucket marked":"Bucket open"})]}),p.jsx(eu,{keyValue:t.key,keyError:t.key_error}),t.bucket_key&&p.jsx("p",{className:"text-[10px] font-mono text-slate-600 truncate",title:t.bucket_key,children:t.bucket_key}),p.jsxs("div",{className:"text-[11px] text-slate-500",children:[p.jsxs("span",{children:["Every: ",t.configured.every]}),l&&t.state?.ttl!==void 0&&t.state.ttl>=0&&p.jsxs("span",{className:"ml-3",children:["TTL: ",Uh(t.state.ttl)]})]})]})}function LR({coordination:t}){return!t||Object.keys(t).length===0?null:p.jsx("div",{className:"px-2 shrink-0",children:p.jsxs("div",{className:"rounded-xl border border-slate-800 bg-slate-900/40 p-4",children:[p.jsx("h2",{className:"text-xs font-semibold uppercase tracking-widest text-slate-500 mb-3",children:"Coordination"}),p.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:[t.lock&&p.jsx(zR,{lock:t.lock}),t.semaphore&&p.jsx(jR,{semaphore:t.semaphore}),t.rate_limit&&p.jsx(DR,{rateLimit:t.rate_limit}),t.period&&p.jsx(kR,{period:t.period})]})]})})}const HR=t=>fetch(t).then(l=>l.json());function BR(){const{id:t}=mx(),l=fh(),{data:i,error:r,isLoading:o}=Vc(t?Ia(`/api/reactors/${t}`):null,HR,{refreshInterval:1e3}),[u,f]=z.useState(null),[m,g]=z.useState(!1),[h,y]=z.useState(null),x=async w=>{if(t)try{await fetch(Ia(`/api/reactors/${t}/${w}`),{method:"POST"}),Zd(Ia(`/api/reactors/${t}`))}catch(S){console.error(`Failed to ${w}`,S)}},v=async()=>{if(!(!t||i?.status!=="failed"||m)){g(!0),y(null);try{const w=await fetch(Ia(`/api/reactors/${t}/retry`),{method:"POST"}),S=await w.json().catch(()=>({}));if(!w.ok||!S.id){y(S.error||"Failed to retry execution");return}l(hi(S.id))}catch(w){y("Failed to retry execution"),console.error("Failed to retry",w)}finally{g(!1)}}};return r?p.jsx("div",{className:"p-4 text-red-500 bg-red-500/10 border border-red-500/20 rounded-lg",children:"Failed to load reactor"}):o?p.jsx("div",{className:"p-4 text-slate-500 animate-pulse",children:"Loading reactor details..."}):p.jsxs("div",{className:"space-y-6 h-[calc(100vh-8rem)] flex flex-col relative",children:[p.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 border-b border-slate-800 pb-6 shrink-0",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsx(Rn,{to:i.class?Qd(i.class):"/",className:"p-2 hover:bg-white/5 rounded-full text-slate-400 hover:text-white transition-colors",children:p.jsx(ph,{className:"w-5 h-5"})}),p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx("h1",{className:"text-2xl font-bold text-white tracking-tight",children:i.class}),p.jsxs("span",{className:"px-2 py-0.5 rounded text-xs font-mono bg-slate-800 text-slate-400 border border-slate-700",children:["#",t]})]}),p.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[p.jsxs("span",{className:"text-sm text-slate-400",children:["Status: ",p.jsx("span",{className:`font-medium ${i.status==="failed"?"text-red-400":i.status==="completed"?"text-emerald-400":i.status==="paused"?"text-amber-400":i.status==="skipped"?"text-sky-400":i.status==="pending"?"text-slate-400":"text-slate-200"}`,children:i.status})]}),i.retry_count>0&&p.jsxs("span",{className:"text-sm text-slate-400 ml-3 pl-3 border-l border-slate-700",children:["Retries: ",p.jsx("span",{className:"font-medium text-amber-400",children:i.retry_count})]})]})]})]}),p.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[h&&p.jsx("span",{className:"text-xs text-red-400 max-w-xs truncate",title:h,children:h}),p.jsxs("button",{onClick:v,className:"flex items-center gap-2 px-4 py-2 bg-indigo-600 hover:bg-indigo-500 text-white rounded-lg shadow-lg shadow-indigo-500/20 text-sm font-medium transition-all hover:-translate-y-0.5 cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",disabled:i.status!=="failed"||m,children:[p.jsx(Tx,{className:"w-4 h-4"}),"Retry Execution"]}),p.jsxs("button",{onClick:()=>x("cancel"),className:"flex items-center gap-2 px-4 py-2 bg-slate-900 border border-slate-700 text-slate-300 rounded-lg hover:bg-slate-800 hover:text-white text-sm font-medium transition-colors cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",disabled:i.status!=="running"&&i.status!=="paused",children:[p.jsx(x_,{className:"w-4 h-4"}),"Cancel"]})]})]}),p.jsx(LR,{coordination:i.coordination}),i.status==="failed"&&i.error&&p.jsx("div",{className:"px-2",children:p.jsxs("div",{className:"px-4 py-3 bg-red-500/10 border border-red-500/20 rounded-lg flex items-start gap-3",children:[p.jsx(Pa,{className:"w-5 h-5 text-red-500 shrink-0 mt-0.5"}),p.jsxs("div",{className:"space-y-1 overflow-hidden",children:[p.jsxs("h3",{className:"text-sm font-medium text-red-500",children:[i.error.snooze_attempts!=null?`Coordination contention — ${i.error.snooze_attempts} snooze attempts exhausted`:"Workflow Failed",i.error.step_name&&p.jsxs("span",{className:"text-red-400",children:[" at step ",p.jsx("span",{className:"font-mono bg-red-500/10 px-1 rounded",children:i.error.step_name})]})]}),p.jsx("p",{className:"text-xs text-red-400/80 font-mono truncate",children:i.error.message||i.error.error})]})]})}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 flex-1 min-h-0",children:[p.jsx("div",{className:"lg:col-span-2 h-full",children:p.jsx(yR,{structure:i.structure,steps:i.steps,selectedStep:u,onStepSelect:f,reactorStatus:i.status,error:i.error,results:i.intermediate_results,composedContexts:i.composed_contexts})}),p.jsx("div",{className:"h-full",children:p.jsx(OR,{stepName:u,structure:i.structure,results:i.intermediate_results,inputs:i.inputs,trace:i.steps,error:i.error,undoStack:i.undo_stack,stepAttempts:i.step_attempts,composedContexts:i.composed_contexts,onClose:()=>f(null),reactorId:t,reactorStatus:i.status,onAction:()=>Zd(Ia(`/api/reactors/${t}`))})})]})]})}const UR=window.RUBY_REACTOR_BASE||"/";function $R(){return p.jsx(_w,{basename:UR,children:p.jsxs("div",{className:"min-h-screen bg-slate-950 text-slate-50 font-sans selection:bg-indigo-500/30",children:[p.jsx("header",{className:"border-b border-slate-800/60 bg-slate-900/50 backdrop-blur-xl sticky top-0 z-50",children:p.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between",children:[p.jsxs(Rn,{to:"/",className:"flex items-center gap-3 group",children:[p.jsx("div",{className:"p-2 bg-indigo-500/10 rounded-lg group-hover:bg-indigo-500/20 transition-colors",children:p.jsx(j_,{className:"w-5 h-5 text-indigo-400 group-hover:text-indigo-300 transition-colors"})}),p.jsxs("span",{className:"font-bold text-lg tracking-tight text-white",children:["Ruby",p.jsx("span",{className:"text-indigo-400",children:"Reactor"})]})]}),p.jsxs("nav",{className:"flex items-center gap-1",children:[p.jsx(ax,{to:"/",icon:p.jsx(m_,{className:"w-4 h-4"}),children:"Dashboard"}),p.jsx(ax,{to:"/live",icon:p.jsx(E_,{className:"w-4 h-4"}),children:"Live"})]})]})}),p.jsx("main",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8",children:p.jsxs(ew,{children:[p.jsx(hr,{path:"/",element:p.jsx(t2,{})}),p.jsx(hr,{path:"/live",element:p.jsx(a2,{})}),p.jsx(hr,{path:"/reactors/by-class/:className",element:p.jsx(i2,{})}),p.jsx(hr,{path:"/reactors/:id",element:p.jsx(BR,{})})]})})]})})}function ax({to:t,icon:l,children:i}){const r=el(),o=r.pathname===t||t!=="/"&&r.pathname.startsWith(t);return p.jsxs(Rn,{to:t,className:`flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-md transition-all ${o?"text-white bg-white/10":"text-slate-400 hover:text-white hover:bg-white/5"}`,children:[l,i]})}class VR extends z.Component{state={hasError:!1,error:null,errorInfo:null};static getDerivedStateFromError(l){return{hasError:!0,error:l,errorInfo:null}}componentDidCatch(l,i){console.error("Uncaught error:",l,i),this.setState({error:l,errorInfo:i})}render(){return this.state.hasError?p.jsxs("div",{className:"p-8 bg-slate-950 min-h-screen text-red-500",children:[p.jsx("h1",{className:"text-2xl font-bold mb-4",children:"Something went wrong."}),p.jsx("pre",{className:"bg-slate-900 p-4 rounded overflow-auto text-sm mb-4",children:this.state.error&&this.state.error.toString()}),p.jsx("pre",{className:"bg-slate-900 p-4 rounded overflow-auto text-xs text-slate-500",children:this.state.errorInfo&&this.state.errorInfo.componentStack})]}):this.props.children}}oS.createRoot(document.getElementById("root")).render(p.jsx(z.StrictMode,{children:p.jsx(VR,{children:p.jsx($R,{})})}));
|