taskmeld 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +18 -0
- package/README.md +172 -0
- package/README.zh-CN.md +172 -0
- package/dist/src/app/app-context-env.js +51 -0
- package/dist/src/app/create-app-context.js +127 -0
- package/dist/src/app/data-dir.js +29 -0
- package/dist/src/app/pipeline-config.js +105 -0
- package/dist/src/app/pipeline-plugin-config.js +2 -0
- package/dist/src/app/pipeline-registry.js +502 -0
- package/dist/src/app/pipeline-runtime.js +202 -0
- package/dist/src/app/runtime-store.js +151 -0
- package/dist/src/app/user-config.js +37 -0
- package/dist/src/artifacts/artifact-cleanup.js +192 -0
- package/dist/src/artifacts/artifact-index.js +262 -0
- package/dist/src/artifacts/artifact-rebuilder.js +120 -0
- package/dist/src/artifacts/storage-service.js +371 -0
- package/dist/src/cli/bootstrap.js +226 -0
- package/dist/src/cli/commands/agent.js +126 -0
- package/dist/src/cli/commands/artifact.js +175 -0
- package/dist/src/cli/commands/init.js +150 -0
- package/dist/src/cli/commands/pipeline/errors.js +37 -0
- package/dist/src/cli/commands/pipeline/result.js +179 -0
- package/dist/src/cli/commands/pipeline/selector.js +51 -0
- package/dist/src/cli/commands/pipeline/types.js +2 -0
- package/dist/src/cli/commands/pipeline/watch.js +67 -0
- package/dist/src/cli/commands/pipeline.js +339 -0
- package/dist/src/cli/commands/scheduler.js +81 -0
- package/dist/src/cli/commands/server.js +70 -0
- package/dist/src/cli/commands/system.js +21 -0
- package/dist/src/cli/errors.js +71 -0
- package/dist/src/cli/help.js +184 -0
- package/dist/src/cli/index.js +65 -0
- package/dist/src/cli/output.js +19 -0
- package/dist/src/cli/renderers/engine/json.js +67 -0
- package/dist/src/cli/renderers/engine/markdown.js +95 -0
- package/dist/src/cli/renderers/engine/types.js +2 -0
- package/dist/src/cli/renderers/engine/utils.js +32 -0
- package/dist/src/cli/renderers/index.js +27 -0
- package/dist/src/cli/renderers/specs/agent.js +78 -0
- package/dist/src/cli/renderers/specs/artifact.js +32 -0
- package/dist/src/cli/renderers/specs/index.js +36 -0
- package/dist/src/cli/renderers/specs/init.js +25 -0
- package/dist/src/cli/renderers/specs/pipeline.js +561 -0
- package/dist/src/cli/renderers/specs/scheduler.js +46 -0
- package/dist/src/cli/renderers/specs/server.js +38 -0
- package/dist/src/cli/renderers/specs/system.js +36 -0
- package/dist/src/cli/router.js +199 -0
- package/dist/src/cli/server-runtime-client.js +780 -0
- package/dist/src/cli/types.js +2 -0
- package/dist/src/gateway/frame-sanitizer.js +78 -0
- package/dist/src/gateway/gateway-client.js +462 -0
- package/dist/src/gateway/index.js +18 -0
- package/dist/src/gateway/types.js +2 -0
- package/dist/src/index.js +123 -0
- package/dist/src/logs/run-log-reader.js +141 -0
- package/dist/src/logs/run-log-service.js +42 -0
- package/dist/src/logs/run-log-types.js +2 -0
- package/dist/src/pipeline/agent-activity.js +191 -0
- package/dist/src/pipeline/artifact-storage.js +208 -0
- package/dist/src/pipeline/diagnostics/dependency-diagnostic.js +105 -0
- package/dist/src/pipeline/diagnostics/index.js +6 -0
- package/dist/src/pipeline/dispatch/pipeline-inbound-queue.js +215 -0
- package/dist/src/pipeline/dispatch/pipeline-link-dispatcher.js +66 -0
- package/dist/src/pipeline/dispatch/pipeline-link-store.js +94 -0
- package/dist/src/pipeline/dispatch/pipeline-queue-drainer.js +71 -0
- package/dist/src/pipeline/execution/dependency-check.js +52 -0
- package/dist/src/pipeline/execution/execution-result.js +2 -0
- package/dist/src/pipeline/execution/group-item-executor.js +128 -0
- package/dist/src/pipeline/execution/index.js +5 -0
- package/dist/src/pipeline/execution/node-item-executor.js +58 -0
- package/dist/src/pipeline/execution/node-runner.js +159 -0
- package/dist/src/pipeline/execution/readiness-state.js +10 -0
- package/dist/src/pipeline/execution/reject-handler.js +94 -0
- package/dist/src/pipeline/execution/rejected-artifact-archiver.js +45 -0
- package/dist/src/pipeline/execution/route-item-manager.js +253 -0
- package/dist/src/pipeline/execution/run-abort-controller.js +66 -0
- package/dist/src/pipeline/execution/run-state-helpers.js +257 -0
- package/dist/src/pipeline/execution/service.js +165 -0
- package/dist/src/pipeline/execution/session-registry.js +96 -0
- package/dist/src/pipeline/execution/structured-node-runner.js +411 -0
- package/dist/src/pipeline/execution-status.js +96 -0
- package/dist/src/pipeline/execution-timeout.js +21 -0
- package/dist/src/pipeline/identity/index.js +32 -0
- package/dist/src/pipeline/identity/types.js +2 -0
- package/dist/src/pipeline/item-batch-controller.js +227 -0
- package/dist/src/pipeline/output/pipeline-output-resolver.js +91 -0
- package/dist/src/pipeline/output/pipeline-output-store.js +60 -0
- package/dist/src/pipeline/runtime-model.js +173 -0
- package/dist/src/pipeline/scheduler/dependency-state.js +144 -0
- package/dist/src/pipeline/scheduler-service.js +314 -0
- package/dist/src/pipeline/state/group-item-state.js +50 -0
- package/dist/src/pipeline/state/group-run-state.js +41 -0
- package/dist/src/pipeline/state/index.js +20 -0
- package/dist/src/pipeline/state/node-item-state.js +67 -0
- package/dist/src/pipeline/state/node-run-state.js +51 -0
- package/dist/src/pipeline/state/types.js +2 -0
- package/dist/src/pipeline/state-machine.js +101 -0
- package/dist/src/pipeline/structured-output/contract.js +133 -0
- package/dist/src/pipeline/structured-output/index.js +22 -0
- package/dist/src/pipeline/structured-output/parser.js +214 -0
- package/dist/src/pipeline/structured-output/prompt.js +290 -0
- package/dist/src/pipeline/structured-output/waiter.js +139 -0
- package/dist/src/pipeline/template.js +135 -0
- package/dist/src/pipeline/timeline-log-store.js +57 -0
- package/dist/src/pipeline/tool-activity.js +94 -0
- package/dist/src/pipeline/types/pipeline-link.js +7 -0
- package/dist/src/pipeline/types/pipeline-output.js +11 -0
- package/dist/src/pipeline/types/workflow.js +2 -0
- package/dist/src/pipeline/workflow/branch-rules.js +74 -0
- package/dist/src/pipeline/workflow/defaults.js +48 -0
- package/dist/src/pipeline/workflow/io.js +89 -0
- package/dist/src/pipeline/workflow/normalize.js +347 -0
- package/dist/src/pipeline/workflow/routes.js +16 -0
- package/dist/src/pipeline/workflow/template-mapper.js +113 -0
- package/dist/src/pipeline/workflow/validate.js +312 -0
- package/dist/src/pipeline/workflow-graph.js +165 -0
- package/dist/src/server/api-handler.js +163 -0
- package/dist/src/server/http-utils.js +34 -0
- package/dist/src/server/middleware.js +61 -0
- package/dist/src/server/router.js +105 -0
- package/dist/src/server/routes/agents.js +189 -0
- package/dist/src/server/routes/artifacts.js +163 -0
- package/dist/src/server/routes/gateway.js +18 -0
- package/dist/src/server/routes/health.js +16 -0
- package/dist/src/server/routes/logs.js +73 -0
- package/dist/src/server/routes/pipeline-batch.js +163 -0
- package/dist/src/server/routes/pipeline-diagnostics.js +33 -0
- package/dist/src/server/routes/pipeline-identity.js +24 -0
- package/dist/src/server/routes/pipeline-links.js +117 -0
- package/dist/src/server/routes/pipeline-outputs.js +27 -0
- package/dist/src/server/routes/pipeline-queue.js +62 -0
- package/dist/src/server/routes/pipeline-runtime.js +162 -0
- package/dist/src/server/routes/pipeline-scheduler.js +69 -0
- package/dist/src/server/routes/pipeline-workflow.js +180 -0
- package/dist/src/server/routes/pipelines.js +96 -0
- package/dist/src/server/routes/sessions.js +244 -0
- package/dist/src/server/routes/timeline.js +14 -0
- package/dist/src/server/serve-static.js +42 -0
- package/dist/src/server/types.js +2 -0
- package/dist/src/services/agent-service.js +79 -0
- package/dist/src/services/artifact-service.js +74 -0
- package/dist/src/services/gateway-read-helpers.js +10 -0
- package/dist/src/services/index.js +23 -0
- package/dist/src/services/pipeline-service.js +529 -0
- package/dist/src/services/pipeline-status.js +93 -0
- package/dist/src/services/read-services.js +60 -0
- package/dist/src/services/scheduler-service.js +37 -0
- package/dist/src/services/session-service.js +227 -0
- package/dist/src/services/system-service.js +26 -0
- package/dist/src/transport/ws-broker.js +48 -0
- package/dist/src/utils/array.js +17 -0
- package/dist/src/utils/guards.js +5 -0
- package/dist/src/utils/session.js +60 -0
- package/dist/src/version.js +5 -0
- package/package.json +61 -0
- package/web/dist/assets/index-CWnfhkn-.js +65 -0
- package/web/dist/assets/index-gZ0xOfSO.css +1 -0
- package/web/dist/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- package/web/dist/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
- package/web/dist/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-cyrillic-700-normal-BWTpRfYl.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-cyrillic-700-normal-CEoEElIJ.woff +0 -0
- package/web/dist/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- package/web/dist/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
- package/web/dist/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-greek-700-normal-C6CZE3T8.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-greek-700-normal-DEigVDxa.woff +0 -0
- package/web/dist/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/web/dist/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/web/dist/assets/jetbrains-mono-latin-700-normal-BYuf6tUa.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-latin-700-normal-D3wTyLJW.woff +0 -0
- package/web/dist/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- package/web/dist/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
- package/web/dist/assets/jetbrains-mono-latin-ext-700-normal-CZipNAKV.woff2 +0 -0
- package/web/dist/assets/jetbrains-mono-latin-ext-700-normal-CxPITLHs.woff +0 -0
- package/web/dist/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- package/web/dist/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
- package/web/dist/assets/jetbrains-mono-vietnamese-700-normal-BDLVIk2r.woff +0 -0
- package/web/dist/assets/space-grotesk-latin-400-normal-BnQMeOim.woff +0 -0
- package/web/dist/assets/space-grotesk-latin-400-normal-CJ-V5oYT.woff2 +0 -0
- package/web/dist/assets/space-grotesk-latin-500-normal-CNSSEhBt.woff +0 -0
- package/web/dist/assets/space-grotesk-latin-500-normal-lFbtlQH6.woff2 +0 -0
- package/web/dist/assets/space-grotesk-latin-700-normal-CwsQ-cCU.woff +0 -0
- package/web/dist/assets/space-grotesk-latin-700-normal-RjhwGPKo.woff2 +0 -0
- package/web/dist/assets/space-grotesk-latin-ext-400-normal-CfP_5XZW.woff2 +0 -0
- package/web/dist/assets/space-grotesk-latin-ext-400-normal-DRPE3kg4.woff +0 -0
- package/web/dist/assets/space-grotesk-latin-ext-500-normal-3dgZTiw9.woff +0 -0
- package/web/dist/assets/space-grotesk-latin-ext-500-normal-DUe3BAxM.woff2 +0 -0
- package/web/dist/assets/space-grotesk-latin-ext-700-normal-BQnZhY3m.woff2 +0 -0
- package/web/dist/assets/space-grotesk-latin-ext-700-normal-HVCqSBdx.woff +0 -0
- package/web/dist/assets/space-grotesk-vietnamese-400-normal-B7xT_GF5.woff2 +0 -0
- package/web/dist/assets/space-grotesk-vietnamese-400-normal-BIWiOVfw.woff +0 -0
- package/web/dist/assets/space-grotesk-vietnamese-500-normal-BTqKIpxg.woff +0 -0
- package/web/dist/assets/space-grotesk-vietnamese-500-normal-BmEvtly_.woff2 +0 -0
- package/web/dist/assets/space-grotesk-vietnamese-700-normal-DMty7AZE.woff2 +0 -0
- package/web/dist/assets/space-grotesk-vietnamese-700-normal-Duxec5Rn.woff +0 -0
- package/web/dist/favicon.svg +10 -0
- package/web/dist/index.html +14 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))a(u);new MutationObserver(u=>{for(const s of u)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function i(u){const s={};return u.integrity&&(s.integrity=u.integrity),u.referrerPolicy&&(s.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?s.credentials="include":u.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function a(u){if(u.ep)return;u.ep=!0;const s=i(u);fetch(u.href,s)}})();function Zu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Td={exports:{}},js={};var Dx;function Kv(){if(Dx)return js;Dx=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(a,u,s){var c=null;if(s!==void 0&&(c=""+s),u.key!==void 0&&(c=""+u.key),"key"in u){s={};for(var d in u)d!=="key"&&(s[d]=u[d])}else s=u;return u=s.ref,{$$typeof:t,type:a,key:c,ref:u!==void 0?u:null,props:s}}return js.Fragment=l,js.jsx=i,js.jsxs=i,js}var Tx;function Zv(){return Tx||(Tx=1,Td.exports=Kv()),Td.exports}var m=Zv(),Od={exports:{}},Pe={};var Ox;function Wv(){if(Ox)return Pe;Ox=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),y=Symbol.iterator;function v(O){return O===null||typeof O!="object"?null:(O=y&&O[y]||O["@@iterator"],typeof O=="function"?O:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,_={};function j(O,L,A){this.props=O,this.context=L,this.refs=_,this.updater=A||N}j.prototype.isReactComponent={},j.prototype.setState=function(O,L){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,L,"setState")},j.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function B(){}B.prototype=j.prototype;function $(O,L,A){this.props=O,this.context=L,this.refs=_,this.updater=A||N}var ne=$.prototype=new B;ne.constructor=$,k(ne,j.prototype),ne.isPureReactComponent=!0;var se=Array.isArray;function I(){}var T={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function Y(O,L,A){var xe=A.ref;return{$$typeof:t,type:O,key:L,ref:xe!==void 0?xe:null,props:A}}function D(O,L){return Y(O.type,L,O.props)}function X(O){return typeof O=="object"&&O!==null&&O.$$typeof===t}function K(O){var L={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(A){return L[A]})}var U=/\/+/g;function oe(O,L){return typeof O=="object"&&O!==null&&O.key!=null?K(""+O.key):L.toString(36)}function le(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(I,I):(O.status="pending",O.then(function(L){O.status==="pending"&&(O.status="fulfilled",O.value=L)},function(L){O.status==="pending"&&(O.status="rejected",O.reason=L)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function C(O,L,A,xe,Se){var Ee=typeof O;(Ee==="undefined"||Ee==="boolean")&&(O=null);var Fe=!1;if(O===null)Fe=!0;else switch(Ee){case"bigint":case"string":case"number":Fe=!0;break;case"object":switch(O.$$typeof){case t:case l:Fe=!0;break;case g:return Fe=O._init,C(Fe(O._payload),L,A,xe,Se)}}if(Fe)return Se=Se(O),Fe=xe===""?"."+oe(O,0):xe,se(Se)?(A="",Fe!=null&&(A=Fe.replace(U,"$&/")+"/"),C(Se,L,A,"",function(Lt){return Lt})):Se!=null&&(X(Se)&&(Se=D(Se,A+(Se.key==null||O&&O.key===Se.key?"":(""+Se.key).replace(U,"$&/")+"/")+Fe)),L.push(Se)),1;Fe=0;var tt=xe===""?".":xe+":";if(se(O))for(var Ve=0;Ve<O.length;Ve++)xe=O[Ve],Ee=tt+oe(xe,Ve),Fe+=C(xe,L,A,Ee,Se);else if(Ve=v(O),typeof Ve=="function")for(O=Ve.call(O),Ve=0;!(xe=O.next()).done;)xe=xe.value,Ee=tt+oe(xe,Ve++),Fe+=C(xe,L,A,Ee,Se);else if(Ee==="object"){if(typeof O.then=="function")return C(le(O),L,A,xe,Se);throw L=String(O),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return Fe}function R(O,L,A){if(O==null)return O;var xe=[],Se=0;return C(O,xe,"","",function(Ee){return L.call(A,Ee,Se++)}),xe}function V(O){if(O._status===-1){var L=O._result;L=L(),L.then(function(A){(O._status===0||O._status===-1)&&(O._status=1,O._result=A)},function(A){(O._status===0||O._status===-1)&&(O._status=2,O._result=A)}),O._status===-1&&(O._status=0,O._result=L)}if(O._status===1)return O._result.default;throw O._result}var ae=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=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(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},M={map:R,forEach:function(O,L,A){R(O,function(){L.apply(this,arguments)},A)},count:function(O){var L=0;return R(O,function(){L++}),L},toArray:function(O){return R(O,function(L){return L})||[]},only:function(O){if(!X(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Pe.Activity=b,Pe.Children=M,Pe.Component=j,Pe.Fragment=i,Pe.Profiler=u,Pe.PureComponent=$,Pe.StrictMode=a,Pe.Suspense=x,Pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,Pe.__COMPILER_RUNTIME={__proto__:null,c:function(O){return T.H.useMemoCache(O)}},Pe.cache=function(O){return function(){return O.apply(null,arguments)}},Pe.cacheSignal=function(){return null},Pe.cloneElement=function(O,L,A){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var xe=k({},O.props),Se=O.key;if(L!=null)for(Ee in L.key!==void 0&&(Se=""+L.key),L)!P.call(L,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&L.ref===void 0||(xe[Ee]=L[Ee]);var Ee=arguments.length-2;if(Ee===1)xe.children=A;else if(1<Ee){for(var Fe=Array(Ee),tt=0;tt<Ee;tt++)Fe[tt]=arguments[tt+2];xe.children=Fe}return Y(O.type,Se,xe)},Pe.createContext=function(O){return O={$$typeof:c,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:s,_context:O},O},Pe.createElement=function(O,L,A){var xe,Se={},Ee=null;if(L!=null)for(xe in L.key!==void 0&&(Ee=""+L.key),L)P.call(L,xe)&&xe!=="key"&&xe!=="__self"&&xe!=="__source"&&(Se[xe]=L[xe]);var Fe=arguments.length-2;if(Fe===1)Se.children=A;else if(1<Fe){for(var tt=Array(Fe),Ve=0;Ve<Fe;Ve++)tt[Ve]=arguments[Ve+2];Se.children=tt}if(O&&O.defaultProps)for(xe in Fe=O.defaultProps,Fe)Se[xe]===void 0&&(Se[xe]=Fe[xe]);return Y(O,Ee,Se)},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(O){return{$$typeof:d,render:O}},Pe.isValidElement=X,Pe.lazy=function(O){return{$$typeof:g,_payload:{_status:-1,_result:O},_init:V}},Pe.memo=function(O,L){return{$$typeof:h,type:O,compare:L===void 0?null:L}},Pe.startTransition=function(O){var L=T.T,A={};T.T=A;try{var xe=O(),Se=T.S;Se!==null&&Se(A,xe),typeof xe=="object"&&xe!==null&&typeof xe.then=="function"&&xe.then(I,ae)}catch(Ee){ae(Ee)}finally{L!==null&&A.types!==null&&(L.types=A.types),T.T=L}},Pe.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},Pe.use=function(O){return T.H.use(O)},Pe.useActionState=function(O,L,A){return T.H.useActionState(O,L,A)},Pe.useCallback=function(O,L){return T.H.useCallback(O,L)},Pe.useContext=function(O){return T.H.useContext(O)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(O,L){return T.H.useDeferredValue(O,L)},Pe.useEffect=function(O,L){return T.H.useEffect(O,L)},Pe.useEffectEvent=function(O){return T.H.useEffectEvent(O)},Pe.useId=function(){return T.H.useId()},Pe.useImperativeHandle=function(O,L,A){return T.H.useImperativeHandle(O,L,A)},Pe.useInsertionEffect=function(O,L){return T.H.useInsertionEffect(O,L)},Pe.useLayoutEffect=function(O,L){return T.H.useLayoutEffect(O,L)},Pe.useMemo=function(O,L){return T.H.useMemo(O,L)},Pe.useOptimistic=function(O,L){return T.H.useOptimistic(O,L)},Pe.useReducer=function(O,L,A){return T.H.useReducer(O,L,A)},Pe.useRef=function(O){return T.H.useRef(O)},Pe.useState=function(O){return T.H.useState(O)},Pe.useSyncExternalStore=function(O,L,A){return T.H.useSyncExternalStore(O,L,A)},Pe.useTransition=function(){return T.H.useTransition()},Pe.version="19.2.6",Pe}var Bx;function Hh(){return Bx||(Bx=1,Od.exports=Wv()),Od.exports}var w=Hh();const X1=Zu(w);var Bd={exports:{}},Ms={},_d={exports:{}},Fd={};var _x;function eS(){return _x||(_x=1,(function(t){function l(C,R){var V=C.length;C.push(R);e:for(;0<V;){var ae=V-1>>>1,M=C[ae];if(0<u(M,R))C[ae]=R,C[V]=M,V=ae;else break e}}function i(C){return C.length===0?null:C[0]}function a(C){if(C.length===0)return null;var R=C[0],V=C.pop();if(V!==R){C[0]=V;e:for(var ae=0,M=C.length,O=M>>>1;ae<O;){var L=2*(ae+1)-1,A=C[L],xe=L+1,Se=C[xe];if(0>u(A,V))xe<M&&0>u(Se,A)?(C[ae]=Se,C[xe]=V,ae=xe):(C[ae]=A,C[L]=V,ae=L);else if(xe<M&&0>u(Se,V))C[ae]=Se,C[xe]=V,ae=xe;else break e}}return R}function u(C,R){var V=C.sortIndex-R.sortIndex;return V!==0?V:C.id-R.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var x=[],h=[],g=1,b=null,y=3,v=!1,N=!1,k=!1,_=!1,j=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function ne(C){for(var R=i(h);R!==null;){if(R.callback===null)a(h);else if(R.startTime<=C)a(h),R.sortIndex=R.expirationTime,l(x,R);else break;R=i(h)}}function se(C){if(k=!1,ne(C),!N)if(i(x)!==null)N=!0,I||(I=!0,K());else{var R=i(h);R!==null&&le(se,R.startTime-C)}}var I=!1,T=-1,P=5,Y=-1;function D(){return _?!0:!(t.unstable_now()-Y<P)}function X(){if(_=!1,I){var C=t.unstable_now();Y=C;var R=!0;try{e:{N=!1,k&&(k=!1,B(T),T=-1),v=!0;var V=y;try{t:{for(ne(C),b=i(x);b!==null&&!(b.expirationTime>C&&D());){var ae=b.callback;if(typeof ae=="function"){b.callback=null,y=b.priorityLevel;var M=ae(b.expirationTime<=C);if(C=t.unstable_now(),typeof M=="function"){b.callback=M,ne(C),R=!0;break t}b===i(x)&&a(x),ne(C)}else a(x);b=i(x)}if(b!==null)R=!0;else{var O=i(h);O!==null&&le(se,O.startTime-C),R=!1}}break e}finally{b=null,y=V,v=!1}R=void 0}}finally{R?K():I=!1}}}var K;if(typeof $=="function")K=function(){$(X)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,oe=U.port2;U.port1.onmessage=X,K=function(){oe.postMessage(null)}}else K=function(){j(X,0)};function le(C,R){T=j(function(){C(t.unstable_now())},R)}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(C){C.callback=null},t.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<C?Math.floor(1e3/C):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(C){switch(y){case 1:case 2:case 3:var R=3;break;default:R=y}var V=y;y=R;try{return C()}finally{y=V}},t.unstable_requestPaint=function(){_=!0},t.unstable_runWithPriority=function(C,R){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var V=y;y=C;try{return R()}finally{y=V}},t.unstable_scheduleCallback=function(C,R,V){var ae=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?ae+V:ae):V=ae,C){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=V+M,C={id:g++,callback:R,priorityLevel:C,startTime:V,expirationTime:M,sortIndex:-1},V>ae?(C.sortIndex=V,l(h,C),i(x)===null&&C===i(h)&&(k?(B(T),T=-1):k=!0,le(se,V-ae))):(C.sortIndex=M,l(x,C),N||v||(N=!0,I||(I=!0,K()))),C},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(C){var R=y;return function(){var V=y;y=R;try{return C.apply(this,arguments)}finally{y=V}}}})(Fd)),Fd}var Fx;function tS(){return Fx||(Fx=1,_d.exports=eS()),_d.exports}var Rd={exports:{}},Nn={};var Rx;function nS(){if(Rx)return Nn;Rx=1;var t=Hh();function l(x){var h="https://react.dev/errors/"+x;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+x+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var a={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},u=Symbol.for("react.portal");function s(x,h,g){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:b==null?null:""+b,children:x,containerInfo:h,implementation:g}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(x,h){if(x==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Nn.createPortal=function(x,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(l(299));return s(x,h,null,g)},Nn.flushSync=function(x){var h=c.T,g=a.p;try{if(c.T=null,a.p=2,x)return x()}finally{c.T=h,a.p=g,a.d.f()}},Nn.preconnect=function(x,h){typeof x=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(x,h))},Nn.prefetchDNS=function(x){typeof x=="string"&&a.d.D(x)},Nn.preinit=function(x,h){if(typeof x=="string"&&h&&typeof h.as=="string"){var g=h.as,b=d(g,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?a.d.S(x,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:b,integrity:y,fetchPriority:v}):g==="script"&&a.d.X(x,{crossOrigin:b,integrity:y,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Nn.preinitModule=function(x,h){if(typeof x=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=d(h.as,h.crossOrigin);a.d.M(x,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(x)},Nn.preload=function(x,h){if(typeof x=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,b=d(g,h.crossOrigin);a.d.L(x,g,{crossOrigin:b,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})}},Nn.preloadModule=function(x,h){if(typeof x=="string")if(h){var g=d(h.as,h.crossOrigin);a.d.m(x,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(x)},Nn.requestFormReset=function(x){a.d.r(x)},Nn.unstable_batchedUpdates=function(x,h){return x(h)},Nn.useFormState=function(x,h,g){return c.H.useFormState(x,h,g)},Nn.useFormStatus=function(){return c.H.useHostTransitionStatus()},Nn.version="19.2.6",Nn}var Lx;function lS(){if(Lx)return Rd.exports;Lx=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=nS(),Rd.exports}var zx;function iS(){if(zx)return Ms;zx=1;var t=tS(),l=Hh(),i=lS();function a(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)n+="&args[]="+encodeURIComponent(arguments[r])}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 u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var n=e,r=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(r=n.return),e=n.return;while(e)}return n.tag===3?r:null}function c(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function d(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function x(e){if(s(e)!==e)throw Error(a(188))}function h(e){var n=e.alternate;if(!n){if(n=s(e),n===null)throw Error(a(188));return n!==e?null:e}for(var r=e,o=n;;){var f=r.return;if(f===null)break;var p=f.alternate;if(p===null){if(o=f.return,o!==null){r=o;continue}break}if(f.child===p.child){for(p=f.child;p;){if(p===r)return x(f),e;if(p===o)return x(f),n;p=p.sibling}throw Error(a(188))}if(r.return!==o.return)r=f,o=p;else{for(var S=!1,E=f.child;E;){if(E===r){S=!0,r=f,o=p;break}if(E===o){S=!0,o=f,r=p;break}E=E.sibling}if(!S){for(E=p.child;E;){if(E===r){S=!0,r=p,o=f;break}if(E===o){S=!0,o=p,r=f;break}E=E.sibling}if(!S)throw Error(a(189))}}if(r.alternate!==o)throw Error(a(190))}if(r.tag!==3)throw Error(a(188));return r.stateNode.current===r?e:n}function g(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=g(e),n!==null)return n;e=e.sibling}return null}var b=Object.assign,y=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),$=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),se=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),Y=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=X&&e[X]||e["@@iterator"],typeof e=="function"?e:null)}var U=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===U?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case k:return"Fragment";case j:return"Profiler";case _:return"StrictMode";case se:return"Suspense";case I:return"SuspenseList";case Y:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case $:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case ne:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case T:return n=e.displayName||null,n!==null?n:oe(e.type)||"Memo";case P:n=e._payload,e=e._init;try{return oe(e(n))}catch{}}return null}var le=Array.isArray,C=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},ae=[],M=-1;function O(e){return{current:e}}function L(e){0>M||(e.current=ae[M],ae[M]=null,M--)}function A(e,n){M++,ae[M]=e.current,e.current=n}var xe=O(null),Se=O(null),Ee=O(null),Fe=O(null);function tt(e,n){switch(A(Ee,n),A(Se,e),A(xe,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?W0(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=W0(n),e=ex(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(xe),A(xe,e)}function Ve(){L(xe),L(Se),L(Ee)}function Lt(e){e.memoizedState!==null&&A(Fe,e);var n=xe.current,r=ex(n,e.type);n!==r&&(A(Se,e),A(xe,r))}function Ut(e){Se.current===e&&(L(xe),L(Se)),Fe.current===e&&(L(Fe),Cs._currentValue=V)}var _t,he;function Ue(e){if(_t===void 0)try{throw Error()}catch(r){var n=r.stack.trim().match(/\n( *(at )?)/);_t=n&&n[1]||"",he=-1<r.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+_t+e+he}var Te=!1;function de(e,n){if(!e||Te)return"";Te=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(re){var te=re}Reflect.construct(e,[],fe)}else{try{fe.call()}catch(re){te=re}e.call(fe.prototype)}}else{try{throw Error()}catch(re){te=re}(fe=e())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(re){if(re&&te&&typeof re.stack=="string")return[re.stack,te.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=o.DetermineComponentFrameRoot(),S=p[0],E=p[1];if(S&&E){var z=S.split(`
|
|
4
|
+
`),W=E.split(`
|
|
5
|
+
`);for(f=o=0;o<z.length&&!z[o].includes("DetermineComponentFrameRoot");)o++;for(;f<W.length&&!W[f].includes("DetermineComponentFrameRoot");)f++;if(o===z.length||f===W.length)for(o=z.length-1,f=W.length-1;1<=o&&0<=f&&z[o]!==W[f];)f--;for(;1<=o&&0<=f;o--,f--)if(z[o]!==W[f]){if(o!==1||f!==1)do if(o--,f--,0>f||z[o]!==W[f]){var ue=`
|
|
6
|
+
`+z[o].replace(" at new "," at ");return e.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",e.displayName)),ue}while(1<=o&&0<=f);break}}}finally{Te=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?Ue(r):""}function Ae(e,n){switch(e.tag){case 26:case 27:case 5:return Ue(e.type);case 16:return Ue("Lazy");case 13:return e.child!==n&&n!==null?Ue("Suspense Fallback"):Ue("Suspense");case 19:return Ue("SuspenseList");case 0:case 15:return de(e.type,!1);case 11:return de(e.type.render,!1);case 1:return de(e.type,!0);case 31:return Ue("Activity");default:return""}}function Xe(e){try{var n="",r=null;do n+=Ae(e,r),r=e,e=e.return;while(e);return n}catch(o){return`
|
|
7
|
+
Error generating stack: `+o.message+`
|
|
8
|
+
`+o.stack}}var it=Object.prototype.hasOwnProperty,nt=t.unstable_scheduleCallback,pt=t.unstable_cancelCallback,H=t.unstable_shouldYield,ve=t.unstable_requestPaint,Oe=t.unstable_now,At=t.unstable_getCurrentPriorityLevel,ie=t.unstable_ImmediatePriority,pe=t.unstable_UserBlockingPriority,je=t.unstable_NormalPriority,Be=t.unstable_LowPriority,_e=t.unstable_IdlePriority,ze=t.log,Re=t.unstable_setDisableYieldValue,Le=null,et=null;function zt(e){if(typeof ze=="function"&&Re(e),et&&typeof et.setStrictMode=="function")try{et.setStrictMode(Le,e)}catch{}}var qe=Math.clz32?Math.clz32:on,kn=Math.log,Ft=Math.LN2;function on(e){return e>>>=0,e===0?32:31-(kn(e)/Ft|0)|0}var ge=256,Nl=262144,dn=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 fl(e,n,r){var o=e.pendingLanes;if(o===0)return 0;var f=0,p=e.suspendedLanes,S=e.pingedLanes;e=e.warmLanes;var E=o&134217727;return E!==0?(o=E&~p,o!==0?f=Sn(o):(S&=E,S!==0?f=Sn(S):r||(r=E&~e,r!==0&&(f=Sn(r))))):(E=o&~p,E!==0?f=Sn(E):S!==0?f=Sn(S):r||(r=o&~e,r!==0&&(f=Sn(r)))),f===0?0:n!==0&&n!==f&&(n&p)===0&&(p=f&-f,r=n&-n,p>=r||p===32&&(r&4194048)!==0)?n:f}function dl(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Ll(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 Ce(){var e=dn;return dn<<=1,(dn&62914560)===0&&(dn=4194304),e}function rt(e){for(var n=[],r=0;31>r;r++)n.push(e);return n}function gt(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Hn(e,n,r,o,f,p){var S=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var E=e.entanglements,z=e.expirationTimes,W=e.hiddenUpdates;for(r=S&~r;0<r;){var ue=31-qe(r),fe=1<<ue;E[ue]=0,z[ue]=-1;var te=W[ue];if(te!==null)for(W[ue]=null,ue=0;ue<te.length;ue++){var re=te[ue];re!==null&&(re.lane&=-536870913)}r&=~fe}o!==0&&Ge(e,o,0),p!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=p&~(S&~n))}function Ge(e,n,r){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-qe(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|r&261930}function jn(e,n){var r=e.entangledLanes|=n;for(e=e.entanglements;r;){var o=31-qe(r),f=1<<o;f&n|e[o]&n&&(e[o]|=n),r&=~f}}function ht(e,n){var r=n&-n;return r=(r&42)!==0?1:rn(r),(r&(e.suspendedLanes|n))!==0?0:r}function rn(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 hn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Yt(){var e=R.p;return e!==0?e:(e=window.event,e===void 0?32:wx(e.type))}function Tt(e,n){var r=R.p;try{return R.p=e,n()}finally{R.p=r}}var kt=Math.random().toString(36).slice(2),Nt="__reactFiber$"+kt,bt="__reactProps$"+kt,an="__reactContainer$"+kt,zl="__reactEvents$"+kt,uc="__reactListeners$"+kt,Zi="__reactHandles$"+kt,to="__reactResources$"+kt,hl="__reactMarker$"+kt;function _a(e){delete e[Nt],delete e[bt],delete e[zl],delete e[uc],delete e[Zi]}function Wn(e){var n=e[Nt];if(n)return n;for(var r=e.parentNode;r;){if(n=r[an]||r[Nt]){if(r=n.alternate,n.child!==null||r!==null&&r.child!==null)for(e=sx(e);e!==null;){if(r=e[Nt])return r;e=sx(e)}return n}e=r,r=e.parentNode}return null}function hi(e){if(e=e[Nt]||e[an]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function wl(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(a(33))}function mi(e){var n=e[to];return n||(n=e[to]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function qt(e){e[hl]=!0}var no=new Set,Br={};function $l(e,n){Cl(e,n),Cl(e+"Capture",n)}function Cl(e,n){for(Br[e]=n,e=0;e<n.length;e++)no.add(n[e])}var cc=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]*$"),_r={},lo={};function Fa(e){return it.call(lo,e)?!0:it.call(_r,e)?!1:cc.test(e)?lo[e]=!0:(_r[e]=!0,!1)}function Fr(e,n,r){if(Fa(n))if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+r)}}function pi(e,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+r)}}function ml(e,n,r,o){if(o===null)e.removeAttribute(r);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(n,r,""+o)}}function mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function io(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function fc(e,n,r){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,p=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(S){r=""+S,p.call(this,S)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return r},setValue:function(S){r=""+S},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Rr(e){if(!e._valueTracker){var n=io(e)?"checked":"value";e._valueTracker=fc(e,n,""+e[n])}}function Ra(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var r=n.getValue(),o="";return e&&(o=io(e)?e.checked?"true":"false":e.value),e=o,e!==r?(n.setValue(e),!0):!1}function Wi(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 ro=/[\n"\\]/g;function Mn(e){return e.replace(ro,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Lr(e,n,r,o,f,p,S,E){e.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.type=S:e.removeAttribute("type"),n!=null?S==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+mn(n)):e.value!==""+mn(n)&&(e.value=""+mn(n)):S!=="submit"&&S!=="reset"||e.removeAttribute("value"),n!=null?zr(e,S,mn(n)):r!=null?zr(e,S,mn(r)):o!=null&&e.removeAttribute("value"),f==null&&p!=null&&(e.defaultChecked=!!p),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+mn(E):e.removeAttribute("name")}function xi(e,n,r,o,f,p,S,E){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(e.type=p),n!=null||r!=null){if(!(p!=="submit"&&p!=="reset"||n!=null)){Rr(e);return}r=r!=null?""+mn(r):"",n=n!=null?""+mn(n):r,E||n===e.value||(e.value=n),e.defaultValue=n}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=E?e.checked:!!o,e.defaultChecked=!!o,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(e.name=S),Rr(e)}function zr(e,n,r){n==="number"&&Wi(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function Il(e,n,r,o){if(e=e.options,n){n={};for(var f=0;f<r.length;f++)n["$"+r[f]]=!0;for(r=0;r<e.length;r++)f=n.hasOwnProperty("$"+e[r].value),e[r].selected!==f&&(e[r].selected=f),f&&o&&(e[r].defaultSelected=!0)}else{for(r=""+mn(r),n=null,f=0;f<e.length;f++){if(e[f].value===r){e[f].selected=!0,o&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function La(e,n,r){if(n!=null&&(n=""+mn(n),n!==e.value&&(e.value=n),r==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=r!=null?""+mn(r):""}function za(e,n,r,o){if(n==null){if(o!=null){if(r!=null)throw Error(a(92));if(le(o)){if(1<o.length)throw Error(a(93));o=o[0]}r=o}r==null&&(r=""),n=r}r=mn(n),e.defaultValue=r,o=e.textContent,o===r&&o!==""&&o!==null&&(e.value=o),Rr(e)}function Hl(e,n){if(n){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=n;return}}e.textContent=n}var ao=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 er(e,n,r){var o=n.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,r):typeof r!="number"||r===0||ao.has(n)?n==="float"?e.cssFloat=r:e[n]=(""+r).trim():e[n]=r+"px"}function $a(e,n,r){if(n!=null&&typeof n!="object")throw Error(a(62));if(e=e.style,r!=null){for(var o in r)!r.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var f in n)o=n[f],n.hasOwnProperty(f)&&r[f]!==o&&er(e,f,o)}else for(var p in n)n.hasOwnProperty(p)&&er(e,p,n[p])}function $r(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 so=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"]]),oo=/^[\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 tr(e){return oo.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function el(){}var Ir=null;function Qt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gi=null,bi=null;function uo(e){var n=hi(e);if(n&&(e=n.stateNode)){var r=e[bt]||null;e:switch(e=n.stateNode,n.type){case"input":if(Lr(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),n=r.name,r.type==="radio"&&n!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+Mn(""+n)+'"][type="radio"]'),n=0;n<r.length;n++){var o=r[n];if(o!==e&&o.form===e.form){var f=o[bt]||null;if(!f)throw Error(a(90));Lr(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<r.length;n++)o=r[n],o.form===e.form&&Ra(o)}break e;case"textarea":La(e,r.value,r.defaultValue);break e;case"select":n=r.value,n!=null&&Il(e,!!r.multiple,n,!1)}}}var Ia=!1;function co(e,n,r){if(Ia)return e(n,r);Ia=!0;try{var o=e(n);return o}finally{if(Ia=!1,(gi!==null||bi!==null)&&(Zo(),gi&&(n=gi,e=bi,bi=gi=null,uo(n),e)))for(n=0;n<e.length;n++)uo(e[n])}}function yi(e,n){var r=e.stateNode;if(r===null)return null;var o=r[bt]||null;if(o===null)return null;r=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(a(231,n,typeof r));return r}var pl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ha=!1;if(pl)try{var nr={};Object.defineProperty(nr,"passive",{get:function(){Ha=!0}}),window.addEventListener("test",nr,nr),window.removeEventListener("test",nr,nr)}catch{Ha=!1}var El=null,Ul=null,Hr=null;function fo(){if(Hr)return Hr;var e,n=Ul,r=n.length,o,f="value"in El?El.value:El.textContent,p=f.length;for(e=0;e<r&&n[e]===f[e];e++);var S=r-e;for(o=1;o<=S&&n[r-o]===f[p-o];o++);return Hr=f.slice(e,1<o?1-o:void 0)}function lr(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 vi(){return!0}function ho(){return!1}function pn(e){function n(r,o,f,p,S){this._reactName=r,this._targetInst=f,this.type=o,this.nativeEvent=p,this.target=S,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(r=e[E],this[E]=r?r(p):p[E]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?vi:ho,this.isPropagationStopped=ho,this}return b(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=vi)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=vi)},persist:function(){},isPersistent:vi}),n}var ut={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Si=pn(ut),Gl=b({},ut,{view:0,detail:0}),dc=pn(Gl),Ua,Ga,ir,Ur=b({},Gl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Va,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!==ir&&(ir&&e.type==="mousemove"?(Ua=e.screenX-ir.screenX,Ga=e.screenY-ir.screenY):Ga=Ua=0,ir=e),Ua)},movementY:function(e){return"movementY"in e?e.movementY:Ga}}),mo=pn(Ur),hc=b({},Ur,{dataTransfer:0}),mc=pn(hc),pc=b({},Gl,{relatedTarget:0}),qa=pn(pc),xc=b({},ut,{animationName:0,elapsedTime:0,pseudoElement:0}),gc=pn(xc),bc=b({},ut,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),yc=pn(bc),vc=b({},ut,{data:0}),Pa=pn(vc),Sc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nc={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"},wc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cc(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=wc[e])?!!n[e]:!1}function Va(){return Cc}var Ec=b({},Gl,{key:function(e){if(e.key){var n=Sc[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=lr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Nc[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Va,charCode:function(e){return e.type==="keypress"?lr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?lr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ac=pn(Ec),kc=b({},Ur,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),po=pn(kc),jc=b({},Gl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Va}),Mc=pn(jc),Dc=b({},ut,{propertyName:0,elapsedTime:0,pseudoElement:0}),xo=pn(Dc),Ya=b({},Ur,{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}),Tc=pn(Ya),go=b({},ut,{newState:0,oldState:0}),Oc=pn(go),Bc=[9,13,27,32],rr=pl&&"CompositionEvent"in window,Gr=null;pl&&"documentMode"in document&&(Gr=document.documentMode);var xm=pl&&"TextEvent"in window&&!Gr,_c=pl&&(!rr||Gr&&8<Gr&&11>=Gr),Fc=" ",Rc=!1;function Lc(e,n){switch(e){case"keyup":return Bc.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ar=!1;function F(e,n){switch(e){case"compositionend":return zc(n);case"keypress":return n.which!==32?null:(Rc=!0,Fc);case"textInput":return e=n.data,e===Fc&&Rc?null:e;default:return null}}function q(e,n){if(ar)return e==="compositionend"||!rr&&Lc(e,n)?(e=fo(),Hr=Ul=El=null,ar=!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 _c&&n.locale!=="ko"?null:n.data;default:return null}}var J={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 me(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!J[e.type]:n==="textarea"}function ee(e,n,r,o){gi?bi?bi.push(o):bi=[o]:gi=o,n=ru(n,"onChange"),0<n.length&&(r=new Si("onChange","change",null,r,o),e.push({event:r,listeners:n}))}var Ne=null,Ye=null;function we(e){Y0(e,0)}function Ke(e){var n=wl(e);if(Ra(n))return e}function Me(e,n){if(e==="change")return n}var yt=!1;if(pl){var Qe;if(pl){var ye="oninput"in document;if(!ye){var Jt=document.createElement("div");Jt.setAttribute("oninput","return;"),ye=typeof Jt.oninput=="function"}Qe=ye}else Qe=!1;yt=Qe&&(!document.documentMode||9<document.documentMode)}function lt(){Ne&&(Ne.detachEvent("onpropertychange",Zt),Ye=Ne=null)}function Zt(e){if(e.propertyName==="value"&&Ke(Ye)){var n=[];ee(n,Ye,e,Qt(e)),co(we,n)}}function Dn(e,n,r){e==="focusin"?(lt(),Ne=n,Ye=r,Ne.attachEvent("onpropertychange",Zt)):e==="focusout"&<()}function sr(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ke(Ye)}function Al(e,n){if(e==="click")return Ke(n)}function jy(e,n){if(e==="input"||e==="change")return Ke(n)}function My(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Un=typeof Object.is=="function"?Object.is:My;function Qa(e,n){if(Un(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var r=Object.keys(e),o=Object.keys(n);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var f=r[o];if(!it.call(n,f)||!Un(e[f],n[f]))return!1}return!0}function gm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function bm(e,n){var r=gm(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=n&&o>=n)return{node:r,offset:n-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=gm(r)}}function ym(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?ym(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function vm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Wi(e.document);n instanceof e.HTMLIFrameElement;){try{var r=typeof n.contentWindow.location.href=="string"}catch{r=!1}if(r)e=n.contentWindow;else break;n=Wi(e.document)}return n}function $c(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 Dy=pl&&"documentMode"in document&&11>=document.documentMode,qr=null,Ic=null,Ja=null,Hc=!1;function Sm(e,n,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Hc||qr==null||qr!==Wi(o)||(o=qr,"selectionStart"in o&&$c(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Ja&&Qa(Ja,o)||(Ja=o,o=ru(Ic,"onSelect"),0<o.length&&(n=new Si("onSelect","select",null,n,r),e.push({event:n,listeners:o}),n.target=qr)))}function or(e,n){var r={};return r[e.toLowerCase()]=n.toLowerCase(),r["Webkit"+e]="webkit"+n,r["Moz"+e]="moz"+n,r}var Pr={animationend:or("Animation","AnimationEnd"),animationiteration:or("Animation","AnimationIteration"),animationstart:or("Animation","AnimationStart"),transitionrun:or("Transition","TransitionRun"),transitionstart:or("Transition","TransitionStart"),transitioncancel:or("Transition","TransitionCancel"),transitionend:or("Transition","TransitionEnd")},Uc={},Nm={};pl&&(Nm=document.createElement("div").style,"AnimationEvent"in window||(delete Pr.animationend.animation,delete Pr.animationiteration.animation,delete Pr.animationstart.animation),"TransitionEvent"in window||delete Pr.transitionend.transition);function ur(e){if(Uc[e])return Uc[e];if(!Pr[e])return e;var n=Pr[e],r;for(r in n)if(n.hasOwnProperty(r)&&r in Nm)return Uc[e]=n[r];return e}var wm=ur("animationend"),Cm=ur("animationiteration"),Em=ur("animationstart"),Ty=ur("transitionrun"),Oy=ur("transitionstart"),By=ur("transitioncancel"),Am=ur("transitionend"),km=new Map,Gc="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(" ");Gc.push("scrollEnd");function xl(e,n){km.set(e,n),$l(n,[e])}var bo=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)},tl=[],Vr=0,qc=0;function yo(){for(var e=Vr,n=qc=Vr=0;n<e;){var r=tl[n];tl[n++]=null;var o=tl[n];tl[n++]=null;var f=tl[n];tl[n++]=null;var p=tl[n];if(tl[n++]=null,o!==null&&f!==null){var S=o.pending;S===null?f.next=f:(f.next=S.next,S.next=f),o.pending=f}p!==0&&jm(r,f,p)}}function vo(e,n,r,o){tl[Vr++]=e,tl[Vr++]=n,tl[Vr++]=r,tl[Vr++]=o,qc|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Pc(e,n,r,o){return vo(e,n,r,o),So(e)}function cr(e,n){return vo(e,null,null,n),So(e)}function jm(e,n,r){e.lanes|=r;var o=e.alternate;o!==null&&(o.lanes|=r);for(var f=!1,p=e.return;p!==null;)p.childLanes|=r,o=p.alternate,o!==null&&(o.childLanes|=r),p.tag===22&&(e=p.stateNode,e===null||e._visibility&1||(f=!0)),e=p,p=p.return;return e.tag===3?(p=e.stateNode,f&&n!==null&&(f=31-qe(r),e=p.hiddenUpdates,o=e[f],o===null?e[f]=[n]:o.push(n),n.lane=r|536870912),p):null}function So(e){if(50<gs)throw gs=0,td=null,Error(a(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Yr={};function _y(e,n,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Gn(e,n,r,o){return new _y(e,n,r,o)}function Vc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ql(e,n){var r=e.alternate;return r===null?(r=Gn(e.tag,n,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=n,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,n=e.dependencies,r.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function Mm(e,n){e.flags&=65011714;var r=e.alternate;return r===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=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,n=r.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function No(e,n,r,o,f,p){var S=0;if(o=e,typeof e=="function")Vc(e)&&(S=1);else if(typeof e=="string")S=$v(e,r,xe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Y:return e=Gn(31,r,n,f),e.elementType=Y,e.lanes=p,e;case k:return fr(r.children,f,p,n);case _:S=8,f|=24;break;case j:return e=Gn(12,r,n,f|2),e.elementType=j,e.lanes=p,e;case se:return e=Gn(13,r,n,f),e.elementType=se,e.lanes=p,e;case I:return e=Gn(19,r,n,f),e.elementType=I,e.lanes=p,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $:S=10;break e;case B:S=9;break e;case ne:S=11;break e;case T:S=14;break e;case P:S=16,o=null;break e}S=29,r=Error(a(130,e===null?"null":typeof e,"")),o=null}return n=Gn(S,r,n,f),n.elementType=e,n.type=o,n.lanes=p,n}function fr(e,n,r,o){return e=Gn(7,e,o,n),e.lanes=r,e}function Yc(e,n,r){return e=Gn(6,e,null,n),e.lanes=r,e}function Dm(e){var n=Gn(18,null,null,0);return n.stateNode=e,n}function Qc(e,n,r){return n=Gn(4,e.children!==null?e.children:[],e.key,n),n.lanes=r,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Tm=new WeakMap;function nl(e,n){if(typeof e=="object"&&e!==null){var r=Tm.get(e);return r!==void 0?r:(n={value:e,source:n,stack:Xe(n)},Tm.set(e,n),n)}return{value:e,source:n,stack:Xe(n)}}var Qr=[],Jr=0,wo=null,Xa=0,ll=[],il=0,Ni=null,kl=1,jl="";function Pl(e,n){Qr[Jr++]=Xa,Qr[Jr++]=wo,wo=e,Xa=n}function Om(e,n,r){ll[il++]=kl,ll[il++]=jl,ll[il++]=Ni,Ni=e;var o=kl;e=jl;var f=32-qe(o)-1;o&=~(1<<f),r+=1;var p=32-qe(n)+f;if(30<p){var S=f-f%5;p=(o&(1<<S)-1).toString(32),o>>=S,f-=S,kl=1<<32-qe(n)+f|r<<f|o,jl=p+e}else kl=1<<p|r<<f|o,jl=e}function Jc(e){e.return!==null&&(Pl(e,1),Om(e,1,0))}function Xc(e){for(;e===wo;)wo=Qr[--Jr],Qr[Jr]=null,Xa=Qr[--Jr],Qr[Jr]=null;for(;e===Ni;)Ni=ll[--il],ll[il]=null,jl=ll[--il],ll[il]=null,kl=ll[--il],ll[il]=null}function Bm(e,n){ll[il++]=kl,ll[il++]=jl,ll[il++]=Ni,kl=n.id,jl=n.overflow,Ni=e}var xn=null,$t=null,mt=!1,wi=null,rl=!1,Kc=Error(a(519));function Ci(e){var n=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ka(nl(n,e)),Kc}function _m(e){var n=e.stateNode,r=e.type,o=e.memoizedProps;switch(n[Nt]=e,n[bt]=o,r){case"dialog":st("cancel",n),st("close",n);break;case"iframe":case"object":case"embed":st("load",n);break;case"video":case"audio":for(r=0;r<ys.length;r++)st(ys[r],n);break;case"source":st("error",n);break;case"img":case"image":case"link":st("error",n),st("load",n);break;case"details":st("toggle",n);break;case"input":st("invalid",n),xi(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":st("invalid",n);break;case"textarea":st("invalid",n),za(n,o.value,o.defaultValue,o.children)}r=o.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||n.textContent===""+r||o.suppressHydrationWarning===!0||K0(n.textContent,r)?(o.popover!=null&&(st("beforetoggle",n),st("toggle",n)),o.onScroll!=null&&st("scroll",n),o.onScrollEnd!=null&&st("scrollend",n),o.onClick!=null&&(n.onclick=el),n=!0):n=!1,n||Ci(e,!0)}function Fm(e){for(xn=e.return;xn;)switch(xn.tag){case 5:case 31:case 13:rl=!1;return;case 27:case 3:rl=!0;return;default:xn=xn.return}}function Xr(e){if(e!==xn)return!1;if(!mt)return Fm(e),mt=!0,!1;var n=e.tag,r;if((r=n!==3&&n!==27)&&((r=n===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||xd(e.type,e.memoizedProps)),r=!r),r&&$t&&Ci(e),Fm(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));$t=ax(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(317));$t=ax(e)}else n===27?(n=$t,zi(e.type)?(e=Sd,Sd=null,$t=e):$t=n):$t=xn?sl(e.stateNode.nextSibling):null;return!0}function dr(){$t=xn=null,mt=!1}function Zc(){var e=wi;return e!==null&&(Ln===null?Ln=e:Ln.push.apply(Ln,e),wi=null),e}function Ka(e){wi===null?wi=[e]:wi.push(e)}var Wc=O(null),hr=null,Vl=null;function Ei(e,n,r){A(Wc,n._currentValue),n._currentValue=r}function Yl(e){e._currentValue=Wc.current,L(Wc)}function ef(e,n,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===r)break;e=e.return}}function tf(e,n,r,o){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var p=f.dependencies;if(p!==null){var S=f.child;p=p.firstContext;e:for(;p!==null;){var E=p;p=f;for(var z=0;z<n.length;z++)if(E.context===n[z]){p.lanes|=r,E=p.alternate,E!==null&&(E.lanes|=r),ef(p.return,r,e),o||(S=null);break e}p=E.next}}else if(f.tag===18){if(S=f.return,S===null)throw Error(a(341));S.lanes|=r,p=S.alternate,p!==null&&(p.lanes|=r),ef(S,r,e),S=null}else S=f.child;if(S!==null)S.return=f;else for(S=f;S!==null;){if(S===e){S=null;break}if(f=S.sibling,f!==null){f.return=S.return,S=f;break}S=S.return}f=S}}function Kr(e,n,r,o){e=null;for(var f=n,p=!1;f!==null;){if(!p){if((f.flags&524288)!==0)p=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var S=f.alternate;if(S===null)throw Error(a(387));if(S=S.memoizedProps,S!==null){var E=f.type;Un(f.pendingProps.value,S.value)||(e!==null?e.push(E):e=[E])}}else if(f===Fe.current){if(S=f.alternate,S===null)throw Error(a(387));S.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Cs):e=[Cs])}f=f.return}e!==null&&tf(n,e,r,o),n.flags|=262144}function Co(e){for(e=e.firstContext;e!==null;){if(!Un(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function mr(e){hr=e,Vl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gn(e){return Rm(hr,e)}function Eo(e,n){return hr===null&&mr(e),Rm(e,n)}function Rm(e,n){var r=n._currentValue;if(n={context:n,memoizedValue:r,next:null},Vl===null){if(e===null)throw Error(a(308));Vl=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Vl=Vl.next=n;return r}var Fy=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(r,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(r){return r()})}},Ry=t.unstable_scheduleCallback,Ly=t.unstable_NormalPriority,Wt={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function nf(){return{controller:new Fy,data:new Map,refCount:0}}function Za(e){e.refCount--,e.refCount===0&&Ry(Ly,function(){e.controller.abort()})}var Wa=null,lf=0,Zr=0,Wr=null;function zy(e,n){if(Wa===null){var r=Wa=[];lf=0,Zr=sd(),Wr={status:"pending",value:void 0,then:function(o){r.push(o)}}}return lf++,n.then(Lm,Lm),n}function Lm(){if(--lf===0&&Wa!==null){Wr!==null&&(Wr.status="fulfilled");var e=Wa;Wa=null,Zr=0,Wr=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function $y(e,n){var r=[],o={status:"pending",value:null,reason:null,then:function(f){r.push(f)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var f=0;f<r.length;f++)(0,r[f])(n)},function(f){for(o.status="rejected",o.reason=f,f=0;f<r.length;f++)(0,r[f])(void 0)}),o}var zm=C.S;C.S=function(e,n){S0=Oe(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&zy(e,n),zm!==null&&zm(e,n)};var pr=O(null);function rf(){var e=pr.current;return e!==null?e:Ot.pooledCache}function Ao(e,n){n===null?A(pr,pr.current):A(pr,n.pool)}function $m(){var e=rf();return e===null?null:{parent:Wt._currentValue,pool:e}}var ea=Error(a(460)),af=Error(a(474)),ko=Error(a(542)),jo={then:function(){}};function Im(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Hm(e,n,r){switch(r=e[r],r===void 0?e.push(n):r!==n&&(n.then(el,el),n=r),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Gm(e),e;default:if(typeof n.status=="string")n.then(el,el);else{if(e=Ot,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=o}},function(o){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Gm(e),e}throw gr=n,ea}}function xr(e){try{var n=e._init;return n(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(gr=r,ea):r}}var gr=null;function Um(){if(gr===null)throw Error(a(459));var e=gr;return gr=null,e}function Gm(e){if(e===ea||e===ko)throw Error(a(483))}var ta=null,es=0;function Mo(e){var n=es;return es+=1,ta===null&&(ta=[]),Hm(ta,e,n)}function ts(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Do(e,n){throw n.$$typeof===y?Error(a(525)):(e=Object.prototype.toString.call(n),Error(a(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function qm(e){function n(Q,G){if(e){var Z=Q.deletions;Z===null?(Q.deletions=[G],Q.flags|=16):Z.push(G)}}function r(Q,G){if(!e)return null;for(;G!==null;)n(Q,G),G=G.sibling;return null}function o(Q){for(var G=new Map;Q!==null;)Q.key!==null?G.set(Q.key,Q):G.set(Q.index,Q),Q=Q.sibling;return G}function f(Q,G){return Q=ql(Q,G),Q.index=0,Q.sibling=null,Q}function p(Q,G,Z){return Q.index=Z,e?(Z=Q.alternate,Z!==null?(Z=Z.index,Z<G?(Q.flags|=67108866,G):Z):(Q.flags|=67108866,G)):(Q.flags|=1048576,G)}function S(Q){return e&&Q.alternate===null&&(Q.flags|=67108866),Q}function E(Q,G,Z,ce){return G===null||G.tag!==6?(G=Yc(Z,Q.mode,ce),G.return=Q,G):(G=f(G,Z),G.return=Q,G)}function z(Q,G,Z,ce){var $e=Z.type;return $e===k?ue(Q,G,Z.props.children,ce,Z.key):G!==null&&(G.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===P&&xr($e)===G.type)?(G=f(G,Z.props),ts(G,Z),G.return=Q,G):(G=No(Z.type,Z.key,Z.props,null,Q.mode,ce),ts(G,Z),G.return=Q,G)}function W(Q,G,Z,ce){return G===null||G.tag!==4||G.stateNode.containerInfo!==Z.containerInfo||G.stateNode.implementation!==Z.implementation?(G=Qc(Z,Q.mode,ce),G.return=Q,G):(G=f(G,Z.children||[]),G.return=Q,G)}function ue(Q,G,Z,ce,$e){return G===null||G.tag!==7?(G=fr(Z,Q.mode,ce,$e),G.return=Q,G):(G=f(G,Z),G.return=Q,G)}function fe(Q,G,Z){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return G=Yc(""+G,Q.mode,Z),G.return=Q,G;if(typeof G=="object"&&G!==null){switch(G.$$typeof){case v:return Z=No(G.type,G.key,G.props,null,Q.mode,Z),ts(Z,G),Z.return=Q,Z;case N:return G=Qc(G,Q.mode,Z),G.return=Q,G;case P:return G=xr(G),fe(Q,G,Z)}if(le(G)||K(G))return G=fr(G,Q.mode,Z,null),G.return=Q,G;if(typeof G.then=="function")return fe(Q,Mo(G),Z);if(G.$$typeof===$)return fe(Q,Eo(Q,G),Z);Do(Q,G)}return null}function te(Q,G,Z,ce){var $e=G!==null?G.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return $e!==null?null:E(Q,G,""+Z,ce);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case v:return Z.key===$e?z(Q,G,Z,ce):null;case N:return Z.key===$e?W(Q,G,Z,ce):null;case P:return Z=xr(Z),te(Q,G,Z,ce)}if(le(Z)||K(Z))return $e!==null?null:ue(Q,G,Z,ce,null);if(typeof Z.then=="function")return te(Q,G,Mo(Z),ce);if(Z.$$typeof===$)return te(Q,G,Eo(Q,Z),ce);Do(Q,Z)}return null}function re(Q,G,Z,ce,$e){if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Q=Q.get(Z)||null,E(G,Q,""+ce,$e);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case v:return Q=Q.get(ce.key===null?Z:ce.key)||null,z(G,Q,ce,$e);case N:return Q=Q.get(ce.key===null?Z:ce.key)||null,W(G,Q,ce,$e);case P:return ce=xr(ce),re(Q,G,Z,ce,$e)}if(le(ce)||K(ce))return Q=Q.get(Z)||null,ue(G,Q,ce,$e,null);if(typeof ce.then=="function")return re(Q,G,Z,Mo(ce),$e);if(ce.$$typeof===$)return re(Q,G,Z,Eo(G,ce),$e);Do(G,ce)}return null}function ke(Q,G,Z,ce){for(var $e=null,vt=null,De=G,Ze=G=0,ft=null;De!==null&&Ze<Z.length;Ze++){De.index>Ze?(ft=De,De=null):ft=De.sibling;var St=te(Q,De,Z[Ze],ce);if(St===null){De===null&&(De=ft);break}e&&De&&St.alternate===null&&n(Q,De),G=p(St,G,Ze),vt===null?$e=St:vt.sibling=St,vt=St,De=ft}if(Ze===Z.length)return r(Q,De),mt&&Pl(Q,Ze),$e;if(De===null){for(;Ze<Z.length;Ze++)De=fe(Q,Z[Ze],ce),De!==null&&(G=p(De,G,Ze),vt===null?$e=De:vt.sibling=De,vt=De);return mt&&Pl(Q,Ze),$e}for(De=o(De);Ze<Z.length;Ze++)ft=re(De,Q,Ze,Z[Ze],ce),ft!==null&&(e&&ft.alternate!==null&&De.delete(ft.key===null?Ze:ft.key),G=p(ft,G,Ze),vt===null?$e=ft:vt.sibling=ft,vt=ft);return e&&De.forEach(function(Gi){return n(Q,Gi)}),mt&&Pl(Q,Ze),$e}function He(Q,G,Z,ce){if(Z==null)throw Error(a(151));for(var $e=null,vt=null,De=G,Ze=G=0,ft=null,St=Z.next();De!==null&&!St.done;Ze++,St=Z.next()){De.index>Ze?(ft=De,De=null):ft=De.sibling;var Gi=te(Q,De,St.value,ce);if(Gi===null){De===null&&(De=ft);break}e&&De&&Gi.alternate===null&&n(Q,De),G=p(Gi,G,Ze),vt===null?$e=Gi:vt.sibling=Gi,vt=Gi,De=ft}if(St.done)return r(Q,De),mt&&Pl(Q,Ze),$e;if(De===null){for(;!St.done;Ze++,St=Z.next())St=fe(Q,St.value,ce),St!==null&&(G=p(St,G,Ze),vt===null?$e=St:vt.sibling=St,vt=St);return mt&&Pl(Q,Ze),$e}for(De=o(De);!St.done;Ze++,St=Z.next())St=re(De,Q,Ze,St.value,ce),St!==null&&(e&&St.alternate!==null&&De.delete(St.key===null?Ze:St.key),G=p(St,G,Ze),vt===null?$e=St:vt.sibling=St,vt=St);return e&&De.forEach(function(Xv){return n(Q,Xv)}),mt&&Pl(Q,Ze),$e}function Dt(Q,G,Z,ce){if(typeof Z=="object"&&Z!==null&&Z.type===k&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case v:e:{for(var $e=Z.key;G!==null;){if(G.key===$e){if($e=Z.type,$e===k){if(G.tag===7){r(Q,G.sibling),ce=f(G,Z.props.children),ce.return=Q,Q=ce;break e}}else if(G.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===P&&xr($e)===G.type){r(Q,G.sibling),ce=f(G,Z.props),ts(ce,Z),ce.return=Q,Q=ce;break e}r(Q,G);break}else n(Q,G);G=G.sibling}Z.type===k?(ce=fr(Z.props.children,Q.mode,ce,Z.key),ce.return=Q,Q=ce):(ce=No(Z.type,Z.key,Z.props,null,Q.mode,ce),ts(ce,Z),ce.return=Q,Q=ce)}return S(Q);case N:e:{for($e=Z.key;G!==null;){if(G.key===$e)if(G.tag===4&&G.stateNode.containerInfo===Z.containerInfo&&G.stateNode.implementation===Z.implementation){r(Q,G.sibling),ce=f(G,Z.children||[]),ce.return=Q,Q=ce;break e}else{r(Q,G);break}else n(Q,G);G=G.sibling}ce=Qc(Z,Q.mode,ce),ce.return=Q,Q=ce}return S(Q);case P:return Z=xr(Z),Dt(Q,G,Z,ce)}if(le(Z))return ke(Q,G,Z,ce);if(K(Z)){if($e=K(Z),typeof $e!="function")throw Error(a(150));return Z=$e.call(Z),He(Q,G,Z,ce)}if(typeof Z.then=="function")return Dt(Q,G,Mo(Z),ce);if(Z.$$typeof===$)return Dt(Q,G,Eo(Q,Z),ce);Do(Q,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,G!==null&&G.tag===6?(r(Q,G.sibling),ce=f(G,Z),ce.return=Q,Q=ce):(r(Q,G),ce=Yc(Z,Q.mode,ce),ce.return=Q,Q=ce),S(Q)):r(Q,G)}return function(Q,G,Z,ce){try{es=0;var $e=Dt(Q,G,Z,ce);return ta=null,$e}catch(De){if(De===ea||De===ko)throw De;var vt=Gn(29,De,null,Q.mode);return vt.lanes=ce,vt.return=Q,vt}}}var br=qm(!0),Pm=qm(!1),Ai=!1;function sf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function of(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 ki(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ji(e,n,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(wt&2)!==0){var f=o.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),o.pending=n,n=So(e),jm(e,null,r),n}return vo(e,o,n,r),So(e)}function ns(e,n,r){if(n=n.updateQueue,n!==null&&(n=n.shared,(r&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,r|=o,n.lanes=r,jn(e,r)}}function uf(e,n){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var f=null,p=null;if(r=r.firstBaseUpdate,r!==null){do{var S={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};p===null?f=p=S:p=p.next=S,r=r.next}while(r!==null);p===null?f=p=n:p=p.next=n}else f=p=n;r={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:o.shared,callbacks:o.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=n:e.next=n,r.lastBaseUpdate=n}var cf=!1;function ls(){if(cf){var e=Wr;if(e!==null)throw e}}function is(e,n,r,o){cf=!1;var f=e.updateQueue;Ai=!1;var p=f.firstBaseUpdate,S=f.lastBaseUpdate,E=f.shared.pending;if(E!==null){f.shared.pending=null;var z=E,W=z.next;z.next=null,S===null?p=W:S.next=W,S=z;var ue=e.alternate;ue!==null&&(ue=ue.updateQueue,E=ue.lastBaseUpdate,E!==S&&(E===null?ue.firstBaseUpdate=W:E.next=W,ue.lastBaseUpdate=z))}if(p!==null){var fe=f.baseState;S=0,ue=W=z=null,E=p;do{var te=E.lane&-536870913,re=te!==E.lane;if(re?(ct&te)===te:(o&te)===te){te!==0&&te===Zr&&(cf=!0),ue!==null&&(ue=ue.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var ke=e,He=E;te=n;var Dt=r;switch(He.tag){case 1:if(ke=He.payload,typeof ke=="function"){fe=ke.call(Dt,fe,te);break e}fe=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=He.payload,te=typeof ke=="function"?ke.call(Dt,fe,te):ke,te==null)break e;fe=b({},fe,te);break e;case 2:Ai=!0}}te=E.callback,te!==null&&(e.flags|=64,re&&(e.flags|=8192),re=f.callbacks,re===null?f.callbacks=[te]:re.push(te))}else re={lane:te,tag:E.tag,payload:E.payload,callback:E.callback,next:null},ue===null?(W=ue=re,z=fe):ue=ue.next=re,S|=te;if(E=E.next,E===null){if(E=f.shared.pending,E===null)break;re=E,E=re.next,re.next=null,f.lastBaseUpdate=re,f.shared.pending=null}}while(!0);ue===null&&(z=fe),f.baseState=z,f.firstBaseUpdate=W,f.lastBaseUpdate=ue,p===null&&(f.shared.lanes=0),Bi|=S,e.lanes=S,e.memoizedState=fe}}function Vm(e,n){if(typeof e!="function")throw Error(a(191,e));e.call(n)}function Ym(e,n){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Vm(r[e],n)}var na=O(null),To=O(0);function Qm(e,n){e=ni,A(To,e),A(na,n),ni=e|n.baseLanes}function ff(){A(To,ni),A(na,na.current)}function df(){ni=To.current,L(na),L(To)}var qn=O(null),al=null;function Mi(e){var n=e.alternate;A(Xt,Xt.current&1),A(qn,e),al===null&&(n===null||na.current!==null||n.memoizedState!==null)&&(al=e)}function hf(e){A(Xt,Xt.current),A(qn,e),al===null&&(al=e)}function Jm(e){e.tag===22?(A(Xt,Xt.current),A(qn,e),al===null&&(al=e)):Di()}function Di(){A(Xt,Xt.current),A(qn,qn.current)}function Pn(e){L(qn),al===e&&(al=null),L(Xt)}var Xt=O(0);function Oo(e){for(var n=e;n!==null;){if(n.tag===13){var r=n.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||yd(r)||vd(r)))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 Ql=0,Je=null,jt=null,en=null,Bo=!1,la=!1,yr=!1,_o=0,rs=0,ia=null,Iy=0;function Pt(){throw Error(a(321))}function mf(e,n){if(n===null)return!1;for(var r=0;r<n.length&&r<e.length;r++)if(!Un(e[r],n[r]))return!1;return!0}function pf(e,n,r,o,f,p){return Ql=p,Je=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,C.H=e===null||e.memoizedState===null?Op:Df,yr=!1,p=r(o,f),yr=!1,la&&(p=Km(n,r,o,f)),Xm(e),p}function Xm(e){C.H=os;var n=jt!==null&&jt.next!==null;if(Ql=0,en=jt=Je=null,Bo=!1,rs=0,ia=null,n)throw Error(a(300));e===null||tn||(e=e.dependencies,e!==null&&Co(e)&&(tn=!0))}function Km(e,n,r,o){Je=e;var f=0;do{if(la&&(ia=null),rs=0,la=!1,25<=f)throw Error(a(301));if(f+=1,en=jt=null,e.updateQueue!=null){var p=e.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}C.H=Bp,p=n(r,o)}while(la);return p}function Hy(){var e=C.H,n=e.useState()[0];return n=typeof n.then=="function"?as(n):n,e=e.useState()[0],(jt!==null?jt.memoizedState:null)!==e&&(Je.flags|=1024),n}function xf(){var e=_o!==0;return _o=0,e}function gf(e,n,r){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~r}function bf(e){if(Bo){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Bo=!1}Ql=0,en=jt=Je=null,la=!1,rs=_o=0,ia=null}function Tn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Je.memoizedState=en=e:en=en.next=e,en}function Kt(){if(jt===null){var e=Je.alternate;e=e!==null?e.memoizedState:null}else e=jt.next;var n=en===null?Je.memoizedState:en.next;if(n!==null)en=n,jt=e;else{if(e===null)throw Je.alternate===null?Error(a(467)):Error(a(310));jt=e,e={memoizedState:jt.memoizedState,baseState:jt.baseState,baseQueue:jt.baseQueue,queue:jt.queue,next:null},en===null?Je.memoizedState=en=e:en=en.next=e}return en}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function as(e){var n=rs;return rs+=1,ia===null&&(ia=[]),e=Hm(ia,e,n),n=Je,(en===null?n.memoizedState:en.next)===null&&(n=n.alternate,C.H=n===null||n.memoizedState===null?Op:Df),e}function Ro(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return as(e);if(e.$$typeof===$)return gn(e)}throw Error(a(438,String(e)))}function yf(e){var n=null,r=Je.updateQueue;if(r!==null&&(n=r.memoCache),n==null){var o=Je.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),r===null&&(r=Fo(),Je.updateQueue=r),r.memoCache=n,r=n.data[n.index],r===void 0)for(r=n.data[n.index]=Array(e),o=0;o<e;o++)r[o]=D;return n.index++,r}function Jl(e,n){return typeof n=="function"?n(e):n}function Lo(e){var n=Kt();return vf(n,jt,e)}function vf(e,n,r){var o=e.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=r;var f=e.baseQueue,p=o.pending;if(p!==null){if(f!==null){var S=f.next;f.next=p.next,p.next=S}n.baseQueue=f=p,o.pending=null}if(p=e.baseState,f===null)e.memoizedState=p;else{n=f.next;var E=S=null,z=null,W=n,ue=!1;do{var fe=W.lane&-536870913;if(fe!==W.lane?(ct&fe)===fe:(Ql&fe)===fe){var te=W.revertLane;if(te===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),fe===Zr&&(ue=!0);else if((Ql&te)===te){W=W.next,te===Zr&&(ue=!0);continue}else fe={lane:0,revertLane:W.revertLane,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},z===null?(E=z=fe,S=p):z=z.next=fe,Je.lanes|=te,Bi|=te;fe=W.action,yr&&r(p,fe),p=W.hasEagerState?W.eagerState:r(p,fe)}else te={lane:fe,revertLane:W.revertLane,gesture:W.gesture,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},z===null?(E=z=te,S=p):z=z.next=te,Je.lanes|=fe,Bi|=fe;W=W.next}while(W!==null&&W!==n);if(z===null?S=p:z.next=E,!Un(p,e.memoizedState)&&(tn=!0,ue&&(r=Wr,r!==null)))throw r;e.memoizedState=p,e.baseState=S,e.baseQueue=z,o.lastRenderedState=p}return f===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Sf(e){var n=Kt(),r=n.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=e;var o=r.dispatch,f=r.pending,p=n.memoizedState;if(f!==null){r.pending=null;var S=f=f.next;do p=e(p,S.action),S=S.next;while(S!==f);Un(p,n.memoizedState)||(tn=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),r.lastRenderedState=p}return[p,o]}function Zm(e,n,r){var o=Je,f=Kt(),p=mt;if(p){if(r===void 0)throw Error(a(407));r=r()}else r=n();var S=!Un((jt||f).memoizedState,r);if(S&&(f.memoizedState=r,tn=!0),f=f.queue,Cf(tp.bind(null,o,f,e),[e]),f.getSnapshot!==n||S||en!==null&&en.memoizedState.tag&1){if(o.flags|=2048,ra(9,{destroy:void 0},ep.bind(null,o,f,r,n),null),Ot===null)throw Error(a(349));p||(Ql&127)!==0||Wm(o,n,r)}return r}function Wm(e,n,r){e.flags|=16384,e={getSnapshot:n,value:r},n=Je.updateQueue,n===null?(n=Fo(),Je.updateQueue=n,n.stores=[e]):(r=n.stores,r===null?n.stores=[e]:r.push(e))}function ep(e,n,r,o){n.value=r,n.getSnapshot=o,np(n)&&lp(e)}function tp(e,n,r){return r(function(){np(n)&&lp(e)})}function np(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!Un(e,r)}catch{return!0}}function lp(e){var n=cr(e,2);n!==null&&zn(n,e,2)}function Nf(e){var n=Tn();if(typeof e=="function"){var r=e;if(e=r(),yr){zt(!0);try{r()}finally{zt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jl,lastRenderedState:e},n}function ip(e,n,r,o){return e.baseState=r,vf(e,jt,typeof o=="function"?o:Jl)}function Uy(e,n,r,o,f){if(Io(e))throw Error(a(485));if(e=n.action,e!==null){var p={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){p.listeners.push(S)}};C.T!==null?r(!0):p.isTransition=!1,o(p),r=n.pending,r===null?(p.next=n.pending=p,rp(n,p)):(p.next=r.next,n.pending=r.next=p)}}function rp(e,n){var r=n.action,o=n.payload,f=e.state;if(n.isTransition){var p=C.T,S={};C.T=S;try{var E=r(f,o),z=C.S;z!==null&&z(S,E),ap(e,n,E)}catch(W){wf(e,n,W)}finally{p!==null&&S.types!==null&&(p.types=S.types),C.T=p}}else try{p=r(f,o),ap(e,n,p)}catch(W){wf(e,n,W)}}function ap(e,n,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(o){sp(e,n,o)},function(o){return wf(e,n,o)}):sp(e,n,r)}function sp(e,n,r){n.status="fulfilled",n.value=r,op(n),e.state=r,n=e.pending,n!==null&&(r=n.next,r===n?e.pending=null:(r=r.next,n.next=r,rp(e,r)))}function wf(e,n,r){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=r,op(n),n=n.next;while(n!==o)}e.action=null}function op(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function up(e,n){return n}function cp(e,n){if(mt){var r=Ot.formState;if(r!==null){e:{var o=Je;if(mt){if($t){t:{for(var f=$t,p=rl;f.nodeType!==8;){if(!p){f=null;break t}if(f=sl(f.nextSibling),f===null){f=null;break t}}p=f.data,f=p==="F!"||p==="F"?f:null}if(f){$t=sl(f.nextSibling),o=f.data==="F!";break e}}Ci(o)}o=!1}o&&(n=r[0])}}return r=Tn(),r.memoizedState=r.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:up,lastRenderedState:n},r.queue=o,r=Mp.bind(null,Je,o),o.dispatch=r,o=Nf(!1),p=Mf.bind(null,Je,!1,o.queue),o=Tn(),f={state:n,dispatch:null,action:e,pending:null},o.queue=f,r=Uy.bind(null,Je,f,p,r),f.dispatch=r,o.memoizedState=e,[n,r,!1]}function fp(e){var n=Kt();return dp(n,jt,e)}function dp(e,n,r){if(n=vf(e,n,up)[0],e=Lo(Jl)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=as(n)}catch(S){throw S===ea?ko:S}else o=n;n=Kt();var f=n.queue,p=f.dispatch;return r!==n.memoizedState&&(Je.flags|=2048,ra(9,{destroy:void 0},Gy.bind(null,f,r),null)),[o,p,e]}function Gy(e,n){e.action=n}function hp(e){var n=Kt(),r=jt;if(r!==null)return dp(n,r,e);Kt(),n=n.memoizedState,r=Kt();var o=r.queue.dispatch;return r.memoizedState=e,[n,o,!1]}function ra(e,n,r,o){return e={tag:e,create:r,deps:o,inst:n,next:null},n=Je.updateQueue,n===null&&(n=Fo(),Je.updateQueue=n),r=n.lastEffect,r===null?n.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,n.lastEffect=e),e}function mp(){return Kt().memoizedState}function zo(e,n,r,o){var f=Tn();Je.flags|=e,f.memoizedState=ra(1|n,{destroy:void 0},r,o===void 0?null:o)}function $o(e,n,r,o){var f=Kt();o=o===void 0?null:o;var p=f.memoizedState.inst;jt!==null&&o!==null&&mf(o,jt.memoizedState.deps)?f.memoizedState=ra(n,p,r,o):(Je.flags|=e,f.memoizedState=ra(1|n,p,r,o))}function pp(e,n){zo(8390656,8,e,n)}function Cf(e,n){$o(2048,8,e,n)}function qy(e){Je.flags|=4;var n=Je.updateQueue;if(n===null)n=Fo(),Je.updateQueue=n,n.events=[e];else{var r=n.events;r===null?n.events=[e]:r.push(e)}}function xp(e){var n=Kt().memoizedState;return qy({ref:n,nextImpl:e}),function(){if((wt&2)!==0)throw Error(a(440));return n.impl.apply(void 0,arguments)}}function gp(e,n){return $o(4,2,e,n)}function bp(e,n){return $o(4,4,e,n)}function yp(e,n){if(typeof n=="function"){e=e();var r=n(e);return function(){typeof r=="function"?r():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function vp(e,n,r){r=r!=null?r.concat([e]):null,$o(4,4,yp.bind(null,n,e),r)}function Ef(){}function Sp(e,n){var r=Kt();n=n===void 0?null:n;var o=r.memoizedState;return n!==null&&mf(n,o[1])?o[0]:(r.memoizedState=[e,n],e)}function Np(e,n){var r=Kt();n=n===void 0?null:n;var o=r.memoizedState;if(n!==null&&mf(n,o[1]))return o[0];if(o=e(),yr){zt(!0);try{e()}finally{zt(!1)}}return r.memoizedState=[o,n],o}function Af(e,n,r){return r===void 0||(Ql&1073741824)!==0&&(ct&261930)===0?e.memoizedState=n:(e.memoizedState=r,e=w0(),Je.lanes|=e,Bi|=e,r)}function wp(e,n,r,o){return Un(r,n)?r:na.current!==null?(e=Af(e,r,o),Un(e,n)||(tn=!0),e):(Ql&42)===0||(Ql&1073741824)!==0&&(ct&261930)===0?(tn=!0,e.memoizedState=r):(e=w0(),Je.lanes|=e,Bi|=e,n)}function Cp(e,n,r,o,f){var p=R.p;R.p=p!==0&&8>p?p:8;var S=C.T,E={};C.T=E,Mf(e,!1,n,r);try{var z=f(),W=C.S;if(W!==null&&W(E,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var ue=$y(z,o);ss(e,n,ue,Qn(e))}else ss(e,n,o,Qn(e))}catch(fe){ss(e,n,{then:function(){},status:"rejected",reason:fe},Qn())}finally{R.p=p,S!==null&&E.types!==null&&(S.types=E.types),C.T=S}}function Py(){}function kf(e,n,r,o){if(e.tag!==5)throw Error(a(476));var f=Ep(e).queue;Cp(e,f,n,V,r===null?Py:function(){return Ap(e),r(o)})}function Ep(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jl,lastRenderedState:V},next:null};var r={};return n.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jl,lastRenderedState:r},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Ap(e){var n=Ep(e);n.next===null&&(n=e.alternate.memoizedState),ss(e,n.next.queue,{},Qn())}function jf(){return gn(Cs)}function kp(){return Kt().memoizedState}function jp(){return Kt().memoizedState}function Vy(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var r=Qn();e=ki(r);var o=ji(n,e,r);o!==null&&(zn(o,n,r),ns(o,n,r)),n={cache:nf()},e.payload=n;return}n=n.return}}function Yy(e,n,r){var o=Qn();r={lane:o,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Io(e)?Dp(n,r):(r=Pc(e,n,r,o),r!==null&&(zn(r,e,o),Tp(r,n,o)))}function Mp(e,n,r){var o=Qn();ss(e,n,r,o)}function ss(e,n,r,o){var f={lane:o,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(Io(e))Dp(n,f);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var S=n.lastRenderedState,E=p(S,r);if(f.hasEagerState=!0,f.eagerState=E,Un(E,S))return vo(e,n,f,0),Ot===null&&yo(),!1}catch{}if(r=Pc(e,n,f,o),r!==null)return zn(r,e,o),Tp(r,n,o),!0}return!1}function Mf(e,n,r,o){if(o={lane:2,revertLane:sd(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Io(e)){if(n)throw Error(a(479))}else n=Pc(e,r,o,2),n!==null&&zn(n,e,2)}function Io(e){var n=e.alternate;return e===Je||n!==null&&n===Je}function Dp(e,n){la=Bo=!0;var r=e.pending;r===null?n.next=n:(n.next=r.next,r.next=n),e.pending=n}function Tp(e,n,r){if((r&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,r|=o,n.lanes=r,jn(e,r)}}var os={readContext:gn,use:Ro,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useLayoutEffect:Pt,useInsertionEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useSyncExternalStore:Pt,useId:Pt,useHostTransitionStatus:Pt,useFormState:Pt,useActionState:Pt,useOptimistic:Pt,useMemoCache:Pt,useCacheRefresh:Pt};os.useEffectEvent=Pt;var Op={readContext:gn,use:Ro,useCallback:function(e,n){return Tn().memoizedState=[e,n===void 0?null:n],e},useContext:gn,useEffect:pp,useImperativeHandle:function(e,n,r){r=r!=null?r.concat([e]):null,zo(4194308,4,yp.bind(null,n,e),r)},useLayoutEffect:function(e,n){return zo(4194308,4,e,n)},useInsertionEffect:function(e,n){zo(4,2,e,n)},useMemo:function(e,n){var r=Tn();n=n===void 0?null:n;var o=e();if(yr){zt(!0);try{e()}finally{zt(!1)}}return r.memoizedState=[o,n],o},useReducer:function(e,n,r){var o=Tn();if(r!==void 0){var f=r(n);if(yr){zt(!0);try{r(n)}finally{zt(!1)}}}else f=n;return o.memoizedState=o.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},o.queue=e,e=e.dispatch=Yy.bind(null,Je,e),[o.memoizedState,e]},useRef:function(e){var n=Tn();return e={current:e},n.memoizedState=e},useState:function(e){e=Nf(e);var n=e.queue,r=Mp.bind(null,Je,n);return n.dispatch=r,[e.memoizedState,r]},useDebugValue:Ef,useDeferredValue:function(e,n){var r=Tn();return Af(r,e,n)},useTransition:function(){var e=Nf(!1);return e=Cp.bind(null,Je,e.queue,!0,!1),Tn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,r){var o=Je,f=Tn();if(mt){if(r===void 0)throw Error(a(407));r=r()}else{if(r=n(),Ot===null)throw Error(a(349));(ct&127)!==0||Wm(o,n,r)}f.memoizedState=r;var p={value:r,getSnapshot:n};return f.queue=p,pp(tp.bind(null,o,p,e),[e]),o.flags|=2048,ra(9,{destroy:void 0},ep.bind(null,o,p,r,n),null),r},useId:function(){var e=Tn(),n=Ot.identifierPrefix;if(mt){var r=jl,o=kl;r=(o&~(1<<32-qe(o)-1)).toString(32)+r,n="_"+n+"R_"+r,r=_o++,0<r&&(n+="H"+r.toString(32)),n+="_"}else r=Iy++,n="_"+n+"r_"+r.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:jf,useFormState:cp,useActionState:cp,useOptimistic:function(e){var n=Tn();n.memoizedState=n.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=r,n=Mf.bind(null,Je,!0,r),r.dispatch=n,[e,n]},useMemoCache:yf,useCacheRefresh:function(){return Tn().memoizedState=Vy.bind(null,Je)},useEffectEvent:function(e){var n=Tn(),r={impl:e};return n.memoizedState=r,function(){if((wt&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}},Df={readContext:gn,use:Ro,useCallback:Sp,useContext:gn,useEffect:Cf,useImperativeHandle:vp,useInsertionEffect:gp,useLayoutEffect:bp,useMemo:Np,useReducer:Lo,useRef:mp,useState:function(){return Lo(Jl)},useDebugValue:Ef,useDeferredValue:function(e,n){var r=Kt();return wp(r,jt.memoizedState,e,n)},useTransition:function(){var e=Lo(Jl)[0],n=Kt().memoizedState;return[typeof e=="boolean"?e:as(e),n]},useSyncExternalStore:Zm,useId:kp,useHostTransitionStatus:jf,useFormState:fp,useActionState:fp,useOptimistic:function(e,n){var r=Kt();return ip(r,jt,e,n)},useMemoCache:yf,useCacheRefresh:jp};Df.useEffectEvent=xp;var Bp={readContext:gn,use:Ro,useCallback:Sp,useContext:gn,useEffect:Cf,useImperativeHandle:vp,useInsertionEffect:gp,useLayoutEffect:bp,useMemo:Np,useReducer:Sf,useRef:mp,useState:function(){return Sf(Jl)},useDebugValue:Ef,useDeferredValue:function(e,n){var r=Kt();return jt===null?Af(r,e,n):wp(r,jt.memoizedState,e,n)},useTransition:function(){var e=Sf(Jl)[0],n=Kt().memoizedState;return[typeof e=="boolean"?e:as(e),n]},useSyncExternalStore:Zm,useId:kp,useHostTransitionStatus:jf,useFormState:hp,useActionState:hp,useOptimistic:function(e,n){var r=Kt();return jt!==null?ip(r,jt,e,n):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:yf,useCacheRefresh:jp};Bp.useEffectEvent=xp;function Tf(e,n,r,o){n=e.memoizedState,r=r(o,n),r=r==null?n:b({},n,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Of={enqueueSetState:function(e,n,r){e=e._reactInternals;var o=Qn(),f=ki(o);f.payload=n,r!=null&&(f.callback=r),n=ji(e,f,o),n!==null&&(zn(n,e,o),ns(n,e,o))},enqueueReplaceState:function(e,n,r){e=e._reactInternals;var o=Qn(),f=ki(o);f.tag=1,f.payload=n,r!=null&&(f.callback=r),n=ji(e,f,o),n!==null&&(zn(n,e,o),ns(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var r=Qn(),o=ki(r);o.tag=2,n!=null&&(o.callback=n),n=ji(e,o,r),n!==null&&(zn(n,e,r),ns(n,e,r))}};function _p(e,n,r,o,f,p,S){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,p,S):n.prototype&&n.prototype.isPureReactComponent?!Qa(r,o)||!Qa(f,p):!0}function Fp(e,n,r,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(r,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(r,o),n.state!==e&&Of.enqueueReplaceState(n,n.state,null)}function vr(e,n){var r=n;if("ref"in n){r={};for(var o in n)o!=="ref"&&(r[o]=n[o])}if(e=e.defaultProps){r===n&&(r=b({},r));for(var f in e)r[f]===void 0&&(r[f]=e[f])}return r}function Rp(e){bo(e)}function Lp(e){console.error(e)}function zp(e){bo(e)}function Ho(e,n){try{var r=e.onUncaughtError;r(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function $p(e,n,r){try{var o=e.onCaughtError;o(r.value,{componentStack:r.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Bf(e,n,r){return r=ki(r),r.tag=3,r.payload={element:null},r.callback=function(){Ho(e,n)},r}function Ip(e){return e=ki(e),e.tag=3,e}function Hp(e,n,r,o){var f=r.type.getDerivedStateFromError;if(typeof f=="function"){var p=o.value;e.payload=function(){return f(p)},e.callback=function(){$p(n,r,o)}}var S=r.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(e.callback=function(){$p(n,r,o),typeof f!="function"&&(_i===null?_i=new Set([this]):_i.add(this));var E=o.stack;this.componentDidCatch(o.value,{componentStack:E!==null?E:""})})}function Qy(e,n,r,o,f){if(r.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=r.alternate,n!==null&&Kr(n,r,f,!0),r=qn.current,r!==null){switch(r.tag){case 31:case 13:return al===null?Wo():r.alternate===null&&Vt===0&&(Vt=3),r.flags&=-257,r.flags|=65536,r.lanes=f,o===jo?r.flags|=16384:(n=r.updateQueue,n===null?r.updateQueue=new Set([o]):n.add(o),id(e,o,f)),!1;case 22:return r.flags|=65536,o===jo?r.flags|=16384:(n=r.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},r.updateQueue=n):(r=n.retryQueue,r===null?n.retryQueue=new Set([o]):r.add(o)),id(e,o,f)),!1}throw Error(a(435,r.tag))}return id(e,o,f),Wo(),!1}if(mt)return n=qn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,o!==Kc&&(e=Error(a(422),{cause:o}),Ka(nl(e,r)))):(o!==Kc&&(n=Error(a(423),{cause:o}),Ka(nl(n,r))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,o=nl(o,r),f=Bf(e.stateNode,o,f),uf(e,f),Vt!==4&&(Vt=2)),!1;var p=Error(a(520),{cause:o});if(p=nl(p,r),xs===null?xs=[p]:xs.push(p),Vt!==4&&(Vt=2),n===null)return!0;o=nl(o,r),r=n;do{switch(r.tag){case 3:return r.flags|=65536,e=f&-f,r.lanes|=e,e=Bf(r.stateNode,o,e),uf(r,e),!1;case 1:if(n=r.type,p=r.stateNode,(r.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(_i===null||!_i.has(p))))return r.flags|=65536,f&=-f,r.lanes|=f,f=Ip(f),Hp(f,e,r,o),uf(r,f),!1}r=r.return}while(r!==null);return!1}var _f=Error(a(461)),tn=!1;function bn(e,n,r,o){n.child=e===null?Pm(n,null,r,o):br(n,e.child,r,o)}function Up(e,n,r,o,f){r=r.render;var p=n.ref;if("ref"in o){var S={};for(var E in o)E!=="ref"&&(S[E]=o[E])}else S=o;return mr(n),o=pf(e,n,r,S,p,f),E=xf(),e!==null&&!tn?(gf(e,n,f),Xl(e,n,f)):(mt&&E&&Jc(n),n.flags|=1,bn(e,n,o,f),n.child)}function Gp(e,n,r,o,f){if(e===null){var p=r.type;return typeof p=="function"&&!Vc(p)&&p.defaultProps===void 0&&r.compare===null?(n.tag=15,n.type=p,qp(e,n,p,o,f)):(e=No(r.type,null,o,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(p=e.child,!Uf(e,f)){var S=p.memoizedProps;if(r=r.compare,r=r!==null?r:Qa,r(S,o)&&e.ref===n.ref)return Xl(e,n,f)}return n.flags|=1,e=ql(p,o),e.ref=n.ref,e.return=n,n.child=e}function qp(e,n,r,o,f){if(e!==null){var p=e.memoizedProps;if(Qa(p,o)&&e.ref===n.ref)if(tn=!1,n.pendingProps=o=p,Uf(e,f))(e.flags&131072)!==0&&(tn=!0);else return n.lanes=e.lanes,Xl(e,n,f)}return Ff(e,n,r,o,f)}function Pp(e,n,r,o){var f=o.children,p=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(p=p!==null?p.baseLanes|r:r,e!==null){for(o=n.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~p}else o=0,n.child=null;return Vp(e,n,p,r,o)}if((r&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ao(n,p!==null?p.cachePool:null),p!==null?Qm(n,p):ff(),Jm(n);else return o=n.lanes=536870912,Vp(e,n,p!==null?p.baseLanes|r:r,r,o)}else p!==null?(Ao(n,p.cachePool),Qm(n,p),Di(),n.memoizedState=null):(e!==null&&Ao(n,null),ff(),Di());return bn(e,n,f,r),n.child}function us(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Vp(e,n,r,o,f){var p=rf();return p=p===null?null:{parent:Wt._currentValue,pool:p},n.memoizedState={baseLanes:r,cachePool:p},e!==null&&Ao(n,null),ff(),Jm(n),e!==null&&Kr(e,n,o,!0),n.childLanes=f,null}function Uo(e,n){return n=qo({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Yp(e,n,r){return br(n,e.child,null,r),e=Uo(n,n.pendingProps),e.flags|=2,Pn(n),n.memoizedState=null,e}function Jy(e,n,r){var o=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(mt){if(o.mode==="hidden")return e=Uo(n,o),n.lanes=536870912,us(null,e);if(hf(n),(e=$t)?(e=rx(e,rl),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ni!==null?{id:kl,overflow:jl}:null,retryLane:536870912,hydrationErrors:null},r=Dm(e),r.return=n,n.child=r,xn=n,$t=null)):e=null,e===null)throw Ci(n);return n.lanes=536870912,null}return Uo(n,o)}var p=e.memoizedState;if(p!==null){var S=p.dehydrated;if(hf(n),f)if(n.flags&256)n.flags&=-257,n=Yp(e,n,r);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(a(558));else if(tn||Kr(e,n,r,!1),f=(r&e.childLanes)!==0,tn||f){if(o=Ot,o!==null&&(S=ht(o,r),S!==0&&S!==p.retryLane))throw p.retryLane=S,cr(e,S),zn(o,e,S),_f;Wo(),n=Yp(e,n,r)}else e=p.treeContext,$t=sl(S.nextSibling),xn=n,mt=!0,wi=null,rl=!1,e!==null&&Bm(n,e),n=Uo(n,o),n.flags|=4096;return n}return e=ql(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Go(e,n){var r=n.ref;if(r===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(a(284));(e===null||e.ref!==r)&&(n.flags|=4194816)}}function Ff(e,n,r,o,f){return mr(n),r=pf(e,n,r,o,void 0,f),o=xf(),e!==null&&!tn?(gf(e,n,f),Xl(e,n,f)):(mt&&o&&Jc(n),n.flags|=1,bn(e,n,r,f),n.child)}function Qp(e,n,r,o,f,p){return mr(n),n.updateQueue=null,r=Km(n,o,r,f),Xm(e),o=xf(),e!==null&&!tn?(gf(e,n,p),Xl(e,n,p)):(mt&&o&&Jc(n),n.flags|=1,bn(e,n,r,p),n.child)}function Jp(e,n,r,o,f){if(mr(n),n.stateNode===null){var p=Yr,S=r.contextType;typeof S=="object"&&S!==null&&(p=gn(S)),p=new r(o,p),n.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=Of,n.stateNode=p,p._reactInternals=n,p=n.stateNode,p.props=o,p.state=n.memoizedState,p.refs={},sf(n),S=r.contextType,p.context=typeof S=="object"&&S!==null?gn(S):Yr,p.state=n.memoizedState,S=r.getDerivedStateFromProps,typeof S=="function"&&(Tf(n,r,S,o),p.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(S=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),S!==p.state&&Of.enqueueReplaceState(p,p.state,null),is(n,o,p,f),ls(),p.state=n.memoizedState),typeof p.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){p=n.stateNode;var E=n.memoizedProps,z=vr(r,E);p.props=z;var W=p.context,ue=r.contextType;S=Yr,typeof ue=="object"&&ue!==null&&(S=gn(ue));var fe=r.getDerivedStateFromProps;ue=typeof fe=="function"||typeof p.getSnapshotBeforeUpdate=="function",E=n.pendingProps!==E,ue||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(E||W!==S)&&Fp(n,p,o,S),Ai=!1;var te=n.memoizedState;p.state=te,is(n,o,p,f),ls(),W=n.memoizedState,E||te!==W||Ai?(typeof fe=="function"&&(Tf(n,r,fe,o),W=n.memoizedState),(z=Ai||_p(n,r,z,o,te,W,S))?(ue||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(n.flags|=4194308)):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=W),p.props=o,p.state=W,p.context=S,o=z):(typeof p.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{p=n.stateNode,of(e,n),S=n.memoizedProps,ue=vr(r,S),p.props=ue,fe=n.pendingProps,te=p.context,W=r.contextType,z=Yr,typeof W=="object"&&W!==null&&(z=gn(W)),E=r.getDerivedStateFromProps,(W=typeof E=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(S!==fe||te!==z)&&Fp(n,p,o,z),Ai=!1,te=n.memoizedState,p.state=te,is(n,o,p,f),ls();var re=n.memoizedState;S!==fe||te!==re||Ai||e!==null&&e.dependencies!==null&&Co(e.dependencies)?(typeof E=="function"&&(Tf(n,r,E,o),re=n.memoizedState),(ue=Ai||_p(n,r,ue,o,te,re,z)||e!==null&&e.dependencies!==null&&Co(e.dependencies))?(W||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(o,re,z),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(o,re,z)),typeof p.componentDidUpdate=="function"&&(n.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof p.componentDidUpdate!="function"||S===e.memoizedProps&&te===e.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&te===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=re),p.props=o,p.state=re,p.context=z,o=ue):(typeof p.componentDidUpdate!="function"||S===e.memoizedProps&&te===e.memoizedState||(n.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||S===e.memoizedProps&&te===e.memoizedState||(n.flags|=1024),o=!1)}return p=o,Go(e,n),o=(n.flags&128)!==0,p||o?(p=n.stateNode,r=o&&typeof r.getDerivedStateFromError!="function"?null:p.render(),n.flags|=1,e!==null&&o?(n.child=br(n,e.child,null,f),n.child=br(n,null,r,f)):bn(e,n,r,f),n.memoizedState=p.state,e=n.child):e=Xl(e,n,f),e}function Xp(e,n,r,o){return dr(),n.flags|=256,bn(e,n,r,o),n.child}var Rf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lf(e){return{baseLanes:e,cachePool:$m()}}function zf(e,n,r){return e=e!==null?e.childLanes&~r:0,n&&(e|=Yn),e}function Kp(e,n,r){var o=n.pendingProps,f=!1,p=(n.flags&128)!==0,S;if((S=p)||(S=e!==null&&e.memoizedState===null?!1:(Xt.current&2)!==0),S&&(f=!0,n.flags&=-129),S=(n.flags&32)!==0,n.flags&=-33,e===null){if(mt){if(f?Mi(n):Di(),(e=$t)?(e=rx(e,rl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ni!==null?{id:kl,overflow:jl}:null,retryLane:536870912,hydrationErrors:null},r=Dm(e),r.return=n,n.child=r,xn=n,$t=null)):e=null,e===null)throw Ci(n);return vd(e)?n.lanes=32:n.lanes=536870912,null}var E=o.children;return o=o.fallback,f?(Di(),f=n.mode,E=qo({mode:"hidden",children:E},f),o=fr(o,f,r,null),E.return=n,o.return=n,E.sibling=o,n.child=E,o=n.child,o.memoizedState=Lf(r),o.childLanes=zf(e,S,r),n.memoizedState=Rf,us(null,o)):(Mi(n),$f(n,E))}var z=e.memoizedState;if(z!==null&&(E=z.dehydrated,E!==null)){if(p)n.flags&256?(Mi(n),n.flags&=-257,n=If(e,n,r)):n.memoizedState!==null?(Di(),n.child=e.child,n.flags|=128,n=null):(Di(),E=o.fallback,f=n.mode,o=qo({mode:"visible",children:o.children},f),E=fr(E,f,r,null),E.flags|=2,o.return=n,E.return=n,o.sibling=E,n.child=o,br(n,e.child,null,r),o=n.child,o.memoizedState=Lf(r),o.childLanes=zf(e,S,r),n.memoizedState=Rf,n=us(null,o));else if(Mi(n),vd(E)){if(S=E.nextSibling&&E.nextSibling.dataset,S)var W=S.dgst;S=W,o=Error(a(419)),o.stack="",o.digest=S,Ka({value:o,source:null,stack:null}),n=If(e,n,r)}else if(tn||Kr(e,n,r,!1),S=(r&e.childLanes)!==0,tn||S){if(S=Ot,S!==null&&(o=ht(S,r),o!==0&&o!==z.retryLane))throw z.retryLane=o,cr(e,o),zn(S,e,o),_f;yd(E)||Wo(),n=If(e,n,r)}else yd(E)?(n.flags|=192,n.child=e.child,n=null):(e=z.treeContext,$t=sl(E.nextSibling),xn=n,mt=!0,wi=null,rl=!1,e!==null&&Bm(n,e),n=$f(n,o.children),n.flags|=4096);return n}return f?(Di(),E=o.fallback,f=n.mode,z=e.child,W=z.sibling,o=ql(z,{mode:"hidden",children:o.children}),o.subtreeFlags=z.subtreeFlags&65011712,W!==null?E=ql(W,E):(E=fr(E,f,r,null),E.flags|=2),E.return=n,o.return=n,o.sibling=E,n.child=o,us(null,o),o=n.child,E=e.child.memoizedState,E===null?E=Lf(r):(f=E.cachePool,f!==null?(z=Wt._currentValue,f=f.parent!==z?{parent:z,pool:z}:f):f=$m(),E={baseLanes:E.baseLanes|r,cachePool:f}),o.memoizedState=E,o.childLanes=zf(e,S,r),n.memoizedState=Rf,us(e.child,o)):(Mi(n),r=e.child,e=r.sibling,r=ql(r,{mode:"visible",children:o.children}),r.return=n,r.sibling=null,e!==null&&(S=n.deletions,S===null?(n.deletions=[e],n.flags|=16):S.push(e)),n.child=r,n.memoizedState=null,r)}function $f(e,n){return n=qo({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function qo(e,n){return e=Gn(22,e,null,n),e.lanes=0,e}function If(e,n,r){return br(n,e.child,null,r),e=$f(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Zp(e,n,r){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),ef(e.return,n,r)}function Hf(e,n,r,o,f,p){var S=e.memoizedState;S===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:f,treeForkCount:p}:(S.isBackwards=n,S.rendering=null,S.renderingStartTime=0,S.last=o,S.tail=r,S.tailMode=f,S.treeForkCount=p)}function Wp(e,n,r){var o=n.pendingProps,f=o.revealOrder,p=o.tail;o=o.children;var S=Xt.current,E=(S&2)!==0;if(E?(S=S&1|2,n.flags|=128):S&=1,A(Xt,S),bn(e,n,o,r),o=mt?Xa:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Zp(e,r,n);else if(e.tag===19)Zp(e,r,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(f){case"forwards":for(r=n.child,f=null;r!==null;)e=r.alternate,e!==null&&Oo(e)===null&&(f=r),r=r.sibling;r=f,r===null?(f=n.child,n.child=null):(f=r.sibling,r.sibling=null),Hf(n,!1,f,r,p,o);break;case"backwards":case"unstable_legacy-backwards":for(r=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&Oo(e)===null){n.child=f;break}e=f.sibling,f.sibling=r,r=f,f=e}Hf(n,!0,r,null,p,o);break;case"together":Hf(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function Xl(e,n,r){if(e!==null&&(n.dependencies=e.dependencies),Bi|=n.lanes,(r&n.childLanes)===0)if(e!==null){if(Kr(e,n,r,!1),(r&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(a(153));if(n.child!==null){for(e=n.child,r=ql(e,e.pendingProps),n.child=r,r.return=n;e.sibling!==null;)e=e.sibling,r=r.sibling=ql(e,e.pendingProps),r.return=n;r.sibling=null}return n.child}function Uf(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Co(e)))}function Xy(e,n,r){switch(n.tag){case 3:tt(n,n.stateNode.containerInfo),Ei(n,Wt,e.memoizedState.cache),dr();break;case 27:case 5:Lt(n);break;case 4:tt(n,n.stateNode.containerInfo);break;case 10:Ei(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,hf(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(Mi(n),n.flags|=128,null):(r&n.child.childLanes)!==0?Kp(e,n,r):(Mi(n),e=Xl(e,n,r),e!==null?e.sibling:null);Mi(n);break;case 19:var f=(e.flags&128)!==0;if(o=(r&n.childLanes)!==0,o||(Kr(e,n,r,!1),o=(r&n.childLanes)!==0),f){if(o)return Wp(e,n,r);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),A(Xt,Xt.current),o)break;return null;case 22:return n.lanes=0,Pp(e,n,r,n.pendingProps);case 24:Ei(n,Wt,e.memoizedState.cache)}return Xl(e,n,r)}function e0(e,n,r){if(e!==null)if(e.memoizedProps!==n.pendingProps)tn=!0;else{if(!Uf(e,r)&&(n.flags&128)===0)return tn=!1,Xy(e,n,r);tn=(e.flags&131072)!==0}else tn=!1,mt&&(n.flags&1048576)!==0&&Om(n,Xa,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(e=xr(n.elementType),n.type=e,typeof e=="function")Vc(e)?(o=vr(e,o),n.tag=1,n=Jp(null,n,e,o,r)):(n.tag=0,n=Ff(null,n,e,o,r));else{if(e!=null){var f=e.$$typeof;if(f===ne){n.tag=11,n=Up(null,n,e,o,r);break e}else if(f===T){n.tag=14,n=Gp(null,n,e,o,r);break e}}throw n=oe(e)||e,Error(a(306,n,""))}}return n;case 0:return Ff(e,n,n.type,n.pendingProps,r);case 1:return o=n.type,f=vr(o,n.pendingProps),Jp(e,n,o,f,r);case 3:e:{if(tt(n,n.stateNode.containerInfo),e===null)throw Error(a(387));o=n.pendingProps;var p=n.memoizedState;f=p.element,of(e,n),is(n,o,null,r);var S=n.memoizedState;if(o=S.cache,Ei(n,Wt,o),o!==p.cache&&tf(n,[Wt],r,!0),ls(),o=S.element,p.isDehydrated)if(p={element:o,isDehydrated:!1,cache:S.cache},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){n=Xp(e,n,o,r);break e}else if(o!==f){f=nl(Error(a(424)),n),Ka(f),n=Xp(e,n,o,r);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,$t=sl(e.firstChild),xn=n,mt=!0,wi=null,rl=!0,r=Pm(n,null,o,r),n.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(dr(),o===f){n=Xl(e,n,r);break e}bn(e,n,o,r)}n=n.child}return n;case 26:return Go(e,n),e===null?(r=fx(n.type,null,n.pendingProps,null))?n.memoizedState=r:mt||(r=n.type,e=n.pendingProps,o=au(Ee.current).createElement(r),o[Nt]=n,o[bt]=e,yn(o,r,e),qt(o),n.stateNode=o):n.memoizedState=fx(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Lt(n),e===null&&mt&&(o=n.stateNode=ox(n.type,n.pendingProps,Ee.current),xn=n,rl=!0,f=$t,zi(n.type)?(Sd=f,$t=sl(o.firstChild)):$t=f),bn(e,n,n.pendingProps.children,r),Go(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&mt&&((f=o=$t)&&(o=Av(o,n.type,n.pendingProps,rl),o!==null?(n.stateNode=o,xn=n,$t=sl(o.firstChild),rl=!1,f=!0):f=!1),f||Ci(n)),Lt(n),f=n.type,p=n.pendingProps,S=e!==null?e.memoizedProps:null,o=p.children,xd(f,p)?o=null:S!==null&&xd(f,S)&&(n.flags|=32),n.memoizedState!==null&&(f=pf(e,n,Hy,null,null,r),Cs._currentValue=f),Go(e,n),bn(e,n,o,r),n.child;case 6:return e===null&&mt&&((e=r=$t)&&(r=kv(r,n.pendingProps,rl),r!==null?(n.stateNode=r,xn=n,$t=null,e=!0):e=!1),e||Ci(n)),null;case 13:return Kp(e,n,r);case 4:return tt(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=br(n,null,o,r):bn(e,n,o,r),n.child;case 11:return Up(e,n,n.type,n.pendingProps,r);case 7:return bn(e,n,n.pendingProps,r),n.child;case 8:return bn(e,n,n.pendingProps.children,r),n.child;case 12:return bn(e,n,n.pendingProps.children,r),n.child;case 10:return o=n.pendingProps,Ei(n,n.type,o.value),bn(e,n,o.children,r),n.child;case 9:return f=n.type._context,o=n.pendingProps.children,mr(n),f=gn(f),o=o(f),n.flags|=1,bn(e,n,o,r),n.child;case 14:return Gp(e,n,n.type,n.pendingProps,r);case 15:return qp(e,n,n.type,n.pendingProps,r);case 19:return Wp(e,n,r);case 31:return Jy(e,n,r);case 22:return Pp(e,n,r,n.pendingProps);case 24:return mr(n),o=gn(Wt),e===null?(f=rf(),f===null&&(f=Ot,p=nf(),f.pooledCache=p,p.refCount++,p!==null&&(f.pooledCacheLanes|=r),f=p),n.memoizedState={parent:o,cache:f},sf(n),Ei(n,Wt,f)):((e.lanes&r)!==0&&(of(e,n),is(n,null,null,r),ls()),f=e.memoizedState,p=n.memoizedState,f.parent!==o?(f={parent:o,cache:o},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),Ei(n,Wt,o)):(o=p.cache,Ei(n,Wt,o),o!==f.cache&&tf(n,[Wt],r,!0))),bn(e,n,n.pendingProps.children,r),n.child;case 29:throw n.pendingProps}throw Error(a(156,n.tag))}function Kl(e){e.flags|=4}function Gf(e,n,r,o,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(k0())e.flags|=8192;else throw gr=jo,af}else e.flags&=-16777217}function t0(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!xx(n))if(k0())e.flags|=8192;else throw gr=jo,af}function Po(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Ce():536870912,e.lanes|=n,ua|=n)}function cs(e,n){if(!mt)switch(e.tailMode){case"hidden":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function It(e){var n=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(n)for(var f=e.child;f!==null;)r|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)r|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=o,e.childLanes=r,n}function Ky(e,n,r){var o=n.pendingProps;switch(Xc(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return It(n),null;case 1:return It(n),null;case 3:return r=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Yl(Wt),Ve(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Xr(n)?Kl(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Zc())),It(n),null;case 26:var f=n.type,p=n.memoizedState;return e===null?(Kl(n),p!==null?(It(n),t0(n,p)):(It(n),Gf(n,f,null,o,r))):p?p!==e.memoizedState?(Kl(n),It(n),t0(n,p)):(It(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&Kl(n),It(n),Gf(n,f,e,o,r)),null;case 27:if(Ut(n),r=Ee.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&Kl(n);else{if(!o){if(n.stateNode===null)throw Error(a(166));return It(n),null}e=xe.current,Xr(n)?_m(n):(e=ox(f,o,r),n.stateNode=e,Kl(n))}return It(n),null;case 5:if(Ut(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&Kl(n);else{if(!o){if(n.stateNode===null)throw Error(a(166));return It(n),null}if(p=xe.current,Xr(n))_m(n);else{var S=au(Ee.current);switch(p){case 1:p=S.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:p=S.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":p=S.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":p=S.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":p=S.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof o.is=="string"?S.createElement("select",{is:o.is}):S.createElement("select"),o.multiple?p.multiple=!0:o.size&&(p.size=o.size);break;default:p=typeof o.is=="string"?S.createElement(f,{is:o.is}):S.createElement(f)}}p[Nt]=n,p[bt]=o;e:for(S=n.child;S!==null;){if(S.tag===5||S.tag===6)p.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===n)break e;for(;S.sibling===null;){if(S.return===null||S.return===n)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}n.stateNode=p;e:switch(yn(p,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&Kl(n)}}return It(n),Gf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,r),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&Kl(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(a(166));if(e=Ee.current,Xr(n)){if(e=n.stateNode,r=n.memoizedProps,o=null,f=xn,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[Nt]=n,e=!!(e.nodeValue===r||o!==null&&o.suppressHydrationWarning===!0||K0(e.nodeValue,r)),e||Ci(n,!0)}else e=au(e).createTextNode(o),e[Nt]=n,n.stateNode=e}return It(n),null;case 31:if(r=n.memoizedState,e===null||e.memoizedState!==null){if(o=Xr(n),r!==null){if(e===null){if(!o)throw Error(a(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(a(557));e[Nt]=n}else dr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;It(n),e=!1}else r=Zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return n.flags&256?(Pn(n),n):(Pn(n),null);if((n.flags&128)!==0)throw Error(a(558))}return It(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=Xr(n),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(a(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(a(317));f[Nt]=n}else dr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;It(n),f=!1}else f=Zc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(Pn(n),n):(Pn(n),null)}return Pn(n),(n.flags&128)!==0?(n.lanes=r,n):(r=o!==null,e=e!==null&&e.memoizedState!==null,r&&(o=n.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==f&&(o.flags|=2048)),r!==e&&r&&(n.child.flags|=8192),Po(n,n.updateQueue),It(n),null);case 4:return Ve(),e===null&&fd(n.stateNode.containerInfo),It(n),null;case 10:return Yl(n.type),It(n),null;case 19:if(L(Xt),o=n.memoizedState,o===null)return It(n),null;if(f=(n.flags&128)!==0,p=o.rendering,p===null)if(f)cs(o,!1);else{if(Vt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(p=Oo(e),p!==null){for(n.flags|=128,cs(o,!1),e=p.updateQueue,n.updateQueue=e,Po(n,e),n.subtreeFlags=0,e=r,r=n.child;r!==null;)Mm(r,e),r=r.sibling;return A(Xt,Xt.current&1|2),mt&&Pl(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&Oe()>Xo&&(n.flags|=128,f=!0,cs(o,!1),n.lanes=4194304)}else{if(!f)if(e=Oo(p),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,Po(n,e),cs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!p.alternate&&!mt)return It(n),null}else 2*Oe()-o.renderingStartTime>Xo&&r!==536870912&&(n.flags|=128,f=!0,cs(o,!1),n.lanes=4194304);o.isBackwards?(p.sibling=n.child,n.child=p):(e=o.last,e!==null?e.sibling=p:n.child=p,o.last=p)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Oe(),e.sibling=null,r=Xt.current,A(Xt,f?r&1|2:r&1),mt&&Pl(n,o.treeForkCount),e):(It(n),null);case 22:case 23:return Pn(n),df(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(r&536870912)!==0&&(n.flags&128)===0&&(It(n),n.subtreeFlags&6&&(n.flags|=8192)):It(n),r=n.updateQueue,r!==null&&Po(n,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==r&&(n.flags|=2048),e!==null&&L(pr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),Yl(Wt),It(n),null;case 25:return null;case 30:return null}throw Error(a(156,n.tag))}function Zy(e,n){switch(Xc(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Yl(Wt),Ve(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ut(n),null;case 31:if(n.memoizedState!==null){if(Pn(n),n.alternate===null)throw Error(a(340));dr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Pn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(a(340));dr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return L(Xt),null;case 4:return Ve(),null;case 10:return Yl(n.type),null;case 22:case 23:return Pn(n),df(),e!==null&&L(pr),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Yl(Wt),null;case 25:return null;default:return null}}function n0(e,n){switch(Xc(n),n.tag){case 3:Yl(Wt),Ve();break;case 26:case 27:case 5:Ut(n);break;case 4:Ve();break;case 31:n.memoizedState!==null&&Pn(n);break;case 13:Pn(n);break;case 19:L(Xt);break;case 10:Yl(n.type);break;case 22:case 23:Pn(n),df(),e!==null&&L(pr);break;case 24:Yl(Wt)}}function fs(e,n){try{var r=n.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var f=o.next;r=f;do{if((r.tag&e)===e){o=void 0;var p=r.create,S=r.inst;o=p(),S.destroy=o}r=r.next}while(r!==f)}}catch(E){Et(n,n.return,E)}}function Ti(e,n,r){try{var o=n.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var p=f.next;o=p;do{if((o.tag&e)===e){var S=o.inst,E=S.destroy;if(E!==void 0){S.destroy=void 0,f=n;var z=r,W=E;try{W()}catch(ue){Et(f,z,ue)}}}o=o.next}while(o!==p)}}catch(ue){Et(n,n.return,ue)}}function l0(e){var n=e.updateQueue;if(n!==null){var r=e.stateNode;try{Ym(n,r)}catch(o){Et(e,e.return,o)}}}function i0(e,n,r){r.props=vr(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(o){Et(e,n,o)}}function ds(e,n){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof r=="function"?e.refCleanup=r(o):r.current=o}}catch(f){Et(e,n,f)}}function Ml(e,n){var r=e.ref,o=e.refCleanup;if(r!==null)if(typeof o=="function")try{o()}catch(f){Et(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(f){Et(e,n,f)}else r.current=null}function r0(e){var n=e.type,r=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":r.autoFocus&&o.focus();break e;case"img":r.src?o.src=r.src:r.srcSet&&(o.srcset=r.srcSet)}}catch(f){Et(e,e.return,f)}}function qf(e,n,r){try{var o=e.stateNode;vv(o,e.type,r,n),o[bt]=n}catch(f){Et(e,e.return,f)}}function a0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zi(e.type)||e.tag===4}function Pf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||a0(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&&zi(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 Vf(e,n,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,n):(n=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,n.appendChild(e),r=r._reactRootContainer,r!=null||n.onclick!==null||(n.onclick=el));else if(o!==4&&(o===27&&zi(e.type)&&(r=e.stateNode,n=null),e=e.child,e!==null))for(Vf(e,n,r),e=e.sibling;e!==null;)Vf(e,n,r),e=e.sibling}function Vo(e,n,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?r.insertBefore(e,n):r.appendChild(e);else if(o!==4&&(o===27&&zi(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(Vo(e,n,r),e=e.sibling;e!==null;)Vo(e,n,r),e=e.sibling}function s0(e){var n=e.stateNode,r=e.memoizedProps;try{for(var o=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);yn(n,o,r),n[Nt]=e,n[bt]=r}catch(p){Et(e,e.return,p)}}var Zl=!1,nn=!1,Yf=!1,o0=typeof WeakSet=="function"?WeakSet:Set,un=null;function Wy(e,n){if(e=e.containerInfo,md=hu,e=vm(e),$c(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var f=o.anchorOffset,p=o.focusNode;o=o.focusOffset;try{r.nodeType,p.nodeType}catch{r=null;break e}var S=0,E=-1,z=-1,W=0,ue=0,fe=e,te=null;t:for(;;){for(var re;fe!==r||f!==0&&fe.nodeType!==3||(E=S+f),fe!==p||o!==0&&fe.nodeType!==3||(z=S+o),fe.nodeType===3&&(S+=fe.nodeValue.length),(re=fe.firstChild)!==null;)te=fe,fe=re;for(;;){if(fe===e)break t;if(te===r&&++W===f&&(E=S),te===p&&++ue===o&&(z=S),(re=fe.nextSibling)!==null)break;fe=te,te=fe.parentNode}fe=re}r=E===-1||z===-1?null:{start:E,end:z}}else r=null}r=r||{start:0,end:0}}else r=null;for(pd={focusedElem:e,selectionRange:r},hu=!1,un=n;un!==null;)if(n=un,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,un=e;else for(;un!==null;){switch(n=un,p=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)f=e[r],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&p!==null){e=void 0,r=n,f=p.memoizedProps,p=p.memoizedState,o=r.stateNode;try{var ke=vr(r.type,f);e=o.getSnapshotBeforeUpdate(ke,p),o.__reactInternalSnapshotBeforeUpdate=e}catch(He){Et(r,r.return,He)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,r=e.nodeType,r===9)bd(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":bd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(a(163))}if(e=n.sibling,e!==null){e.return=n.return,un=e;break}un=n.return}}function u0(e,n,r){var o=r.flags;switch(r.tag){case 0:case 11:case 15:ei(e,r),o&4&&fs(5,r);break;case 1:if(ei(e,r),o&4)if(e=r.stateNode,n===null)try{e.componentDidMount()}catch(S){Et(r,r.return,S)}else{var f=vr(r.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(S){Et(r,r.return,S)}}o&64&&l0(r),o&512&&ds(r,r.return);break;case 3:if(ei(e,r),o&64&&(e=r.updateQueue,e!==null)){if(n=null,r.child!==null)switch(r.child.tag){case 27:case 5:n=r.child.stateNode;break;case 1:n=r.child.stateNode}try{Ym(e,n)}catch(S){Et(r,r.return,S)}}break;case 27:n===null&&o&4&&s0(r);case 26:case 5:ei(e,r),n===null&&o&4&&r0(r),o&512&&ds(r,r.return);break;case 12:ei(e,r);break;case 31:ei(e,r),o&4&&d0(e,r);break;case 13:ei(e,r),o&4&&h0(e,r),o&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=ov.bind(null,r),jv(e,r))));break;case 22:if(o=r.memoizedState!==null||Zl,!o){n=n!==null&&n.memoizedState!==null||nn,f=Zl;var p=nn;Zl=o,(nn=n)&&!p?ti(e,r,(r.subtreeFlags&8772)!==0):ei(e,r),Zl=f,nn=p}break;case 30:break;default:ei(e,r)}}function c0(e){var n=e.alternate;n!==null&&(e.alternate=null,c0(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&_a(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 Ht=null,_n=!1;function Wl(e,n,r){for(r=r.child;r!==null;)f0(e,n,r),r=r.sibling}function f0(e,n,r){if(et&&typeof et.onCommitFiberUnmount=="function")try{et.onCommitFiberUnmount(Le,r)}catch{}switch(r.tag){case 26:nn||Ml(r,n),Wl(e,n,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:nn||Ml(r,n);var o=Ht,f=_n;zi(r.type)&&(Ht=r.stateNode,_n=!1),Wl(e,n,r),Ss(r.stateNode),Ht=o,_n=f;break;case 5:nn||Ml(r,n);case 6:if(o=Ht,f=_n,Ht=null,Wl(e,n,r),Ht=o,_n=f,Ht!==null)if(_n)try{(Ht.nodeType===9?Ht.body:Ht.nodeName==="HTML"?Ht.ownerDocument.body:Ht).removeChild(r.stateNode)}catch(p){Et(r,n,p)}else try{Ht.removeChild(r.stateNode)}catch(p){Et(r,n,p)}break;case 18:Ht!==null&&(_n?(e=Ht,lx(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),ga(e)):lx(Ht,r.stateNode));break;case 4:o=Ht,f=_n,Ht=r.stateNode.containerInfo,_n=!0,Wl(e,n,r),Ht=o,_n=f;break;case 0:case 11:case 14:case 15:Ti(2,r,n),nn||Ti(4,r,n),Wl(e,n,r);break;case 1:nn||(Ml(r,n),o=r.stateNode,typeof o.componentWillUnmount=="function"&&i0(r,n,o)),Wl(e,n,r);break;case 21:Wl(e,n,r);break;case 22:nn=(o=nn)||r.memoizedState!==null,Wl(e,n,r),nn=o;break;default:Wl(e,n,r)}}function d0(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ga(e)}catch(r){Et(n,n.return,r)}}}function h0(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ga(e)}catch(r){Et(n,n.return,r)}}function ev(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new o0),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new o0),n;default:throw Error(a(435,e.tag))}}function Yo(e,n){var r=ev(e);n.forEach(function(o){if(!r.has(o)){r.add(o);var f=uv.bind(null,e,o);o.then(f,f)}})}function Fn(e,n){var r=n.deletions;if(r!==null)for(var o=0;o<r.length;o++){var f=r[o],p=e,S=n,E=S;e:for(;E!==null;){switch(E.tag){case 27:if(zi(E.type)){Ht=E.stateNode,_n=!1;break e}break;case 5:Ht=E.stateNode,_n=!1;break e;case 3:case 4:Ht=E.stateNode.containerInfo,_n=!0;break e}E=E.return}if(Ht===null)throw Error(a(160));f0(p,S,f),Ht=null,_n=!1,p=f.alternate,p!==null&&(p.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)m0(n,e),n=n.sibling}var gl=null;function m0(e,n){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Fn(n,e),Rn(e),o&4&&(Ti(3,e,e.return),fs(3,e),Ti(5,e,e.return));break;case 1:Fn(n,e),Rn(e),o&512&&(nn||r===null||Ml(r,r.return)),o&64&&Zl&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?o:r.concat(o))));break;case 26:var f=gl;if(Fn(n,e),Rn(e),o&512&&(nn||r===null||Ml(r,r.return)),o&4){var p=r!==null?r.memoizedState:null;if(o=e.memoizedState,r===null)if(o===null)if(e.stateNode===null){e:{o=e.type,r=e.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":p=f.getElementsByTagName("title")[0],(!p||p[hl]||p[Nt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=f.createElement(o),f.head.insertBefore(p,f.querySelector("head > title"))),yn(p,o,r),p[Nt]=e,qt(p),o=p;break e;case"link":var S=mx("link","href",f).get(o+(r.href||""));if(S){for(var E=0;E<S.length;E++)if(p=S[E],p.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&p.getAttribute("rel")===(r.rel==null?null:r.rel)&&p.getAttribute("title")===(r.title==null?null:r.title)&&p.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){S.splice(E,1);break t}}p=f.createElement(o),yn(p,o,r),f.head.appendChild(p);break;case"meta":if(S=mx("meta","content",f).get(o+(r.content||""))){for(E=0;E<S.length;E++)if(p=S[E],p.getAttribute("content")===(r.content==null?null:""+r.content)&&p.getAttribute("name")===(r.name==null?null:r.name)&&p.getAttribute("property")===(r.property==null?null:r.property)&&p.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&p.getAttribute("charset")===(r.charSet==null?null:r.charSet)){S.splice(E,1);break t}}p=f.createElement(o),yn(p,o,r),f.head.appendChild(p);break;default:throw Error(a(468,o))}p[Nt]=e,qt(p),o=p}e.stateNode=o}else px(f,e.type,e.stateNode);else e.stateNode=hx(f,o,e.memoizedProps);else p!==o?(p===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):p.count--,o===null?px(f,e.type,e.stateNode):hx(f,o,e.memoizedProps)):o===null&&e.stateNode!==null&&qf(e,e.memoizedProps,r.memoizedProps)}break;case 27:Fn(n,e),Rn(e),o&512&&(nn||r===null||Ml(r,r.return)),r!==null&&o&4&&qf(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Fn(n,e),Rn(e),o&512&&(nn||r===null||Ml(r,r.return)),e.flags&32){f=e.stateNode;try{Hl(f,"")}catch(ke){Et(e,e.return,ke)}}o&4&&e.stateNode!=null&&(f=e.memoizedProps,qf(e,f,r!==null?r.memoizedProps:f)),o&1024&&(Yf=!0);break;case 6:if(Fn(n,e),Rn(e),o&4){if(e.stateNode===null)throw Error(a(162));o=e.memoizedProps,r=e.stateNode;try{r.nodeValue=o}catch(ke){Et(e,e.return,ke)}}break;case 3:if(uu=null,f=gl,gl=su(n.containerInfo),Fn(n,e),gl=f,Rn(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{ga(n.containerInfo)}catch(ke){Et(e,e.return,ke)}Yf&&(Yf=!1,p0(e));break;case 4:o=gl,gl=su(e.stateNode.containerInfo),Fn(n,e),Rn(e),gl=o;break;case 12:Fn(n,e),Rn(e);break;case 31:Fn(n,e),Rn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Yo(e,o)));break;case 13:Fn(n,e),Rn(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Jo=Oe()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Yo(e,o)));break;case 22:f=e.memoizedState!==null;var z=r!==null&&r.memoizedState!==null,W=Zl,ue=nn;if(Zl=W||f,nn=ue||z,Fn(n,e),nn=ue,Zl=W,Rn(e),o&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(r===null||z||Zl||nn||Sr(e)),r=null,n=e;;){if(n.tag===5||n.tag===26){if(r===null){z=r=n;try{if(p=z.stateNode,f)S=p.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{E=z.stateNode;var fe=z.memoizedProps.style,te=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;E.style.display=te==null||typeof te=="boolean"?"":(""+te).trim()}}catch(ke){Et(z,z.return,ke)}}}else if(n.tag===6){if(r===null){z=n;try{z.stateNode.nodeValue=f?"":z.memoizedProps}catch(ke){Et(z,z.return,ke)}}}else if(n.tag===18){if(r===null){z=n;try{var re=z.stateNode;f?ix(re,!0):ix(z.stateNode,!1)}catch(ke){Et(z,z.return,ke)}}}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;r===n&&(r=null),n=n.return}r===n&&(r=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(r=o.retryQueue,r!==null&&(o.retryQueue=null,Yo(e,r))));break;case 19:Fn(n,e),Rn(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Yo(e,o)));break;case 30:break;case 21:break;default:Fn(n,e),Rn(e)}}function Rn(e){var n=e.flags;if(n&2){try{for(var r,o=e.return;o!==null;){if(a0(o)){r=o;break}o=o.return}if(r==null)throw Error(a(160));switch(r.tag){case 27:var f=r.stateNode,p=Pf(e);Vo(e,p,f);break;case 5:var S=r.stateNode;r.flags&32&&(Hl(S,""),r.flags&=-33);var E=Pf(e);Vo(e,E,S);break;case 3:case 4:var z=r.stateNode.containerInfo,W=Pf(e);Vf(e,W,z);break;default:throw Error(a(161))}}catch(ue){Et(e,e.return,ue)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function p0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;p0(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function ei(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)u0(e,n.alternate,n),n=n.sibling}function Sr(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Ti(4,n,n.return),Sr(n);break;case 1:Ml(n,n.return);var r=n.stateNode;typeof r.componentWillUnmount=="function"&&i0(n,n.return,r),Sr(n);break;case 27:Ss(n.stateNode);case 26:case 5:Ml(n,n.return),Sr(n);break;case 22:n.memoizedState===null&&Sr(n);break;case 30:Sr(n);break;default:Sr(n)}e=e.sibling}}function ti(e,n,r){for(r=r&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,f=e,p=n,S=p.flags;switch(p.tag){case 0:case 11:case 15:ti(f,p,r),fs(4,p);break;case 1:if(ti(f,p,r),o=p,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(W){Et(o,o.return,W)}if(o=p,f=o.updateQueue,f!==null){var E=o.stateNode;try{var z=f.shared.hiddenCallbacks;if(z!==null)for(f.shared.hiddenCallbacks=null,f=0;f<z.length;f++)Vm(z[f],E)}catch(W){Et(o,o.return,W)}}r&&S&64&&l0(p),ds(p,p.return);break;case 27:s0(p);case 26:case 5:ti(f,p,r),r&&o===null&&S&4&&r0(p),ds(p,p.return);break;case 12:ti(f,p,r);break;case 31:ti(f,p,r),r&&S&4&&d0(f,p);break;case 13:ti(f,p,r),r&&S&4&&h0(f,p);break;case 22:p.memoizedState===null&&ti(f,p,r),ds(p,p.return);break;case 30:break;default:ti(f,p,r)}n=n.sibling}}function Qf(e,n){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&Za(r))}function Jf(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Za(e))}function bl(e,n,r,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)x0(e,n,r,o),n=n.sibling}function x0(e,n,r,o){var f=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n,r,o),f&2048&&fs(9,n);break;case 1:bl(e,n,r,o);break;case 3:bl(e,n,r,o),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Za(e)));break;case 12:if(f&2048){bl(e,n,r,o),e=n.stateNode;try{var p=n.memoizedProps,S=p.id,E=p.onPostCommit;typeof E=="function"&&E(S,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(z){Et(n,n.return,z)}}else bl(e,n,r,o);break;case 31:bl(e,n,r,o);break;case 13:bl(e,n,r,o);break;case 23:break;case 22:p=n.stateNode,S=n.alternate,n.memoizedState!==null?p._visibility&2?bl(e,n,r,o):hs(e,n):p._visibility&2?bl(e,n,r,o):(p._visibility|=2,aa(e,n,r,o,(n.subtreeFlags&10256)!==0||!1)),f&2048&&Qf(S,n);break;case 24:bl(e,n,r,o),f&2048&&Jf(n.alternate,n);break;default:bl(e,n,r,o)}}function aa(e,n,r,o,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var p=e,S=n,E=r,z=o,W=S.flags;switch(S.tag){case 0:case 11:case 15:aa(p,S,E,z,f),fs(8,S);break;case 23:break;case 22:var ue=S.stateNode;S.memoizedState!==null?ue._visibility&2?aa(p,S,E,z,f):hs(p,S):(ue._visibility|=2,aa(p,S,E,z,f)),f&&W&2048&&Qf(S.alternate,S);break;case 24:aa(p,S,E,z,f),f&&W&2048&&Jf(S.alternate,S);break;default:aa(p,S,E,z,f)}n=n.sibling}}function hs(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var r=e,o=n,f=o.flags;switch(o.tag){case 22:hs(r,o),f&2048&&Qf(o.alternate,o);break;case 24:hs(r,o),f&2048&&Jf(o.alternate,o);break;default:hs(r,o)}n=n.sibling}}var ms=8192;function sa(e,n,r){if(e.subtreeFlags&ms)for(e=e.child;e!==null;)g0(e,n,r),e=e.sibling}function g0(e,n,r){switch(e.tag){case 26:sa(e,n,r),e.flags&ms&&e.memoizedState!==null&&Iv(r,gl,e.memoizedState,e.memoizedProps);break;case 5:sa(e,n,r);break;case 3:case 4:var o=gl;gl=su(e.stateNode.containerInfo),sa(e,n,r),gl=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=ms,ms=16777216,sa(e,n,r),ms=o):sa(e,n,r));break;default:sa(e,n,r)}}function b0(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 ps(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];un=o,v0(o,e)}b0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)y0(e),e=e.sibling}function y0(e){switch(e.tag){case 0:case 11:case 15:ps(e),e.flags&2048&&Ti(9,e,e.return);break;case 3:ps(e);break;case 12:ps(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Qo(e)):ps(e);break;default:ps(e)}}function Qo(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];un=o,v0(o,e)}b0(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Ti(8,n,n.return),Qo(n);break;case 22:r=n.stateNode,r._visibility&2&&(r._visibility&=-3,Qo(n));break;default:Qo(n)}e=e.sibling}}function v0(e,n){for(;un!==null;){var r=un;switch(r.tag){case 0:case 11:case 15:Ti(8,r,n);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var o=r.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Za(r.memoizedState.cache)}if(o=r.child,o!==null)o.return=r,un=o;else e:for(r=e;un!==null;){o=un;var f=o.sibling,p=o.return;if(c0(o),o===r){un=null;break e}if(f!==null){f.return=p,un=f;break e}un=p}}}var tv={getCacheForType:function(e){var n=gn(Wt),r=n.data.get(e);return r===void 0&&(r=e(),n.data.set(e,r)),r},cacheSignal:function(){return gn(Wt).controller.signal}},nv=typeof WeakMap=="function"?WeakMap:Map,wt=0,Ot=null,at=null,ct=0,Ct=0,Vn=null,Oi=!1,oa=!1,Xf=!1,ni=0,Vt=0,Bi=0,Nr=0,Kf=0,Yn=0,ua=0,xs=null,Ln=null,Zf=!1,Jo=0,S0=0,Xo=1/0,Ko=null,_i=null,sn=0,Fi=null,ca=null,li=0,Wf=0,ed=null,N0=null,gs=0,td=null;function Qn(){return(wt&2)!==0&&ct!==0?ct&-ct:C.T!==null?sd():Yt()}function w0(){if(Yn===0)if((ct&536870912)===0||mt){var e=Nl;Nl<<=1,(Nl&3932160)===0&&(Nl=262144),Yn=e}else Yn=536870912;return e=qn.current,e!==null&&(e.flags|=32),Yn}function zn(e,n,r){(e===Ot&&(Ct===2||Ct===9)||e.cancelPendingCommit!==null)&&(fa(e,0),Ri(e,ct,Yn,!1)),gt(e,r),((wt&2)===0||e!==Ot)&&(e===Ot&&((wt&2)===0&&(Nr|=r),Vt===4&&Ri(e,ct,Yn,!1)),Dl(e))}function C0(e,n,r){if((wt&6)!==0)throw Error(a(327));var o=!r&&(n&127)===0&&(n&e.expiredLanes)===0||dl(e,n),f=o?rv(e,n):ld(e,n,!0),p=o;do{if(f===0){oa&&!o&&Ri(e,n,0,!1);break}else{if(r=e.current.alternate,p&&!lv(r)){f=ld(e,n,!1),p=!1;continue}if(f===2){if(p=n,e.errorRecoveryDisabledLanes&p)var S=0;else S=e.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){n=S;e:{var E=e;f=xs;var z=E.current.memoizedState.isDehydrated;if(z&&(fa(E,S).flags|=256),S=ld(E,S,!1),S!==2){if(Xf&&!z){E.errorRecoveryDisabledLanes|=p,Nr|=p,f=4;break e}p=Ln,Ln=f,p!==null&&(Ln===null?Ln=p:Ln.push.apply(Ln,p))}f=S}if(p=!1,f!==2)continue}}if(f===1){fa(e,0),Ri(e,n,0,!0);break}e:{switch(o=e,p=f,p){case 0:case 1:throw Error(a(345));case 4:if((n&4194048)!==n)break;case 6:Ri(o,n,Yn,!Oi);break e;case 2:Ln=null;break;case 3:case 5:break;default:throw Error(a(329))}if((n&62914560)===n&&(f=Jo+300-Oe(),10<f)){if(Ri(o,n,Yn,!Oi),fl(o,0,!0)!==0)break e;li=n,o.timeoutHandle=tx(E0.bind(null,o,r,Ln,Ko,Zf,n,Yn,Nr,ua,Oi,p,"Throttled",-0,0),f);break e}E0(o,r,Ln,Ko,Zf,n,Yn,Nr,ua,Oi,p,null,-0,0)}}break}while(!0);Dl(e)}function E0(e,n,r,o,f,p,S,E,z,W,ue,fe,te,re){if(e.timeoutHandle=-1,fe=n.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:el},g0(n,p,fe);var ke=(p&62914560)===p?Jo-Oe():(p&4194048)===p?S0-Oe():0;if(ke=Hv(fe,ke),ke!==null){li=p,e.cancelPendingCommit=ke(B0.bind(null,e,n,p,r,o,f,S,E,z,ue,fe,null,te,re)),Ri(e,p,S,!W);return}}B0(e,n,p,r,o,f,S,E,z)}function lv(e){for(var n=e;;){var r=n.tag;if((r===0||r===11||r===15)&&n.flags&16384&&(r=n.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var o=0;o<r.length;o++){var f=r[o],p=f.getSnapshot;f=f.value;try{if(!Un(p(),f))return!1}catch{return!1}}if(r=n.child,n.subtreeFlags&16384&&r!==null)r.return=n,n=r;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 Ri(e,n,r,o){n&=~Kf,n&=~Nr,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var f=n;0<f;){var p=31-qe(f),S=1<<p;o[p]=-1,f&=~S}r!==0&&Ge(e,r,n)}function Zo(){return(wt&6)===0?(bs(0),!1):!0}function nd(){if(at!==null){if(Ct===0)var e=at.return;else e=at,Vl=hr=null,bf(e),ta=null,es=0,e=at;for(;e!==null;)n0(e.alternate,e),e=e.return;at=null}}function fa(e,n){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,wv(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),li=0,nd(),Ot=e,at=r=ql(e.current,null),ct=n,Ct=0,Vn=null,Oi=!1,oa=dl(e,n),Xf=!1,ua=Yn=Kf=Nr=Bi=Vt=0,Ln=xs=null,Zf=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var f=31-qe(o),p=1<<f;n|=e[f],o&=~p}return ni=n,yo(),r}function A0(e,n){Je=null,C.H=os,n===ea||n===ko?(n=Um(),Ct=3):n===af?(n=Um(),Ct=4):Ct=n===_f?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Vn=n,at===null&&(Vt=1,Ho(e,nl(n,e.current)))}function k0(){var e=qn.current;return e===null?!0:(ct&4194048)===ct?al===null:(ct&62914560)===ct||(ct&536870912)!==0?e===al:!1}function j0(){var e=C.H;return C.H=os,e===null?os:e}function M0(){var e=C.A;return C.A=tv,e}function Wo(){Vt=4,Oi||(ct&4194048)!==ct&&qn.current!==null||(oa=!0),(Bi&134217727)===0&&(Nr&134217727)===0||Ot===null||Ri(Ot,ct,Yn,!1)}function ld(e,n,r){var o=wt;wt|=2;var f=j0(),p=M0();(Ot!==e||ct!==n)&&(Ko=null,fa(e,n)),n=!1;var S=Vt;e:do try{if(Ct!==0&&at!==null){var E=at,z=Vn;switch(Ct){case 8:nd(),S=6;break e;case 3:case 2:case 9:case 6:qn.current===null&&(n=!0);var W=Ct;if(Ct=0,Vn=null,da(e,E,z,W),r&&oa){S=0;break e}break;default:W=Ct,Ct=0,Vn=null,da(e,E,z,W)}}iv(),S=Vt;break}catch(ue){A0(e,ue)}while(!0);return n&&e.shellSuspendCounter++,Vl=hr=null,wt=o,C.H=f,C.A=p,at===null&&(Ot=null,ct=0,yo()),S}function iv(){for(;at!==null;)D0(at)}function rv(e,n){var r=wt;wt|=2;var o=j0(),f=M0();Ot!==e||ct!==n?(Ko=null,Xo=Oe()+500,fa(e,n)):oa=dl(e,n);e:do try{if(Ct!==0&&at!==null){n=at;var p=Vn;t:switch(Ct){case 1:Ct=0,Vn=null,da(e,n,p,1);break;case 2:case 9:if(Im(p)){Ct=0,Vn=null,T0(n);break}n=function(){Ct!==2&&Ct!==9||Ot!==e||(Ct=7),Dl(e)},p.then(n,n);break e;case 3:Ct=7;break e;case 4:Ct=5;break e;case 7:Im(p)?(Ct=0,Vn=null,T0(n)):(Ct=0,Vn=null,da(e,n,p,7));break;case 5:var S=null;switch(at.tag){case 26:S=at.memoizedState;case 5:case 27:var E=at;if(S?xx(S):E.stateNode.complete){Ct=0,Vn=null;var z=E.sibling;if(z!==null)at=z;else{var W=E.return;W!==null?(at=W,eu(W)):at=null}break t}}Ct=0,Vn=null,da(e,n,p,5);break;case 6:Ct=0,Vn=null,da(e,n,p,6);break;case 8:nd(),Vt=6;break e;default:throw Error(a(462))}}av();break}catch(ue){A0(e,ue)}while(!0);return Vl=hr=null,C.H=o,C.A=f,wt=r,at!==null?0:(Ot=null,ct=0,yo(),Vt)}function av(){for(;at!==null&&!H();)D0(at)}function D0(e){var n=e0(e.alternate,e,ni);e.memoizedProps=e.pendingProps,n===null?eu(e):at=n}function T0(e){var n=e,r=n.alternate;switch(n.tag){case 15:case 0:n=Qp(r,n,n.pendingProps,n.type,void 0,ct);break;case 11:n=Qp(r,n,n.pendingProps,n.type.render,n.ref,ct);break;case 5:bf(n);default:n0(r,n),n=at=Mm(n,ni),n=e0(r,n,ni)}e.memoizedProps=e.pendingProps,n===null?eu(e):at=n}function da(e,n,r,o){Vl=hr=null,bf(n),ta=null,es=0;var f=n.return;try{if(Qy(e,f,n,r,ct)){Vt=1,Ho(e,nl(r,e.current)),at=null;return}}catch(p){if(f!==null)throw at=f,p;Vt=1,Ho(e,nl(r,e.current)),at=null;return}n.flags&32768?(mt||o===1?e=!0:oa||(ct&536870912)!==0?e=!1:(Oi=e=!0,(o===2||o===9||o===3||o===6)&&(o=qn.current,o!==null&&o.tag===13&&(o.flags|=16384))),O0(n,e)):eu(n)}function eu(e){var n=e;do{if((n.flags&32768)!==0){O0(n,Oi);return}e=n.return;var r=Ky(n.alternate,n,ni);if(r!==null){at=r;return}if(n=n.sibling,n!==null){at=n;return}at=n=e}while(n!==null);Vt===0&&(Vt=5)}function O0(e,n){do{var r=Zy(e.alternate,e);if(r!==null){r.flags&=32767,at=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!n&&(e=e.sibling,e!==null)){at=e;return}at=e=r}while(e!==null);Vt=6,at=null}function B0(e,n,r,o,f,p,S,E,z){e.cancelPendingCommit=null;do tu();while(sn!==0);if((wt&6)!==0)throw Error(a(327));if(n!==null){if(n===e.current)throw Error(a(177));if(p=n.lanes|n.childLanes,p|=qc,Hn(e,r,p,S,E,z),e===Ot&&(at=Ot=null,ct=0),ca=n,Fi=e,li=r,Wf=p,ed=f,N0=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,cv(je,function(){return z0(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=C.T,C.T=null,f=R.p,R.p=2,S=wt,wt|=4;try{Wy(e,n,r)}finally{wt=S,R.p=f,C.T=o}}sn=1,_0(),F0(),R0()}}function _0(){if(sn===1){sn=0;var e=Fi,n=ca,r=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||r){r=C.T,C.T=null;var o=R.p;R.p=2;var f=wt;wt|=4;try{m0(n,e);var p=pd,S=vm(e.containerInfo),E=p.focusedElem,z=p.selectionRange;if(S!==E&&E&&E.ownerDocument&&ym(E.ownerDocument.documentElement,E)){if(z!==null&&$c(E)){var W=z.start,ue=z.end;if(ue===void 0&&(ue=W),"selectionStart"in E)E.selectionStart=W,E.selectionEnd=Math.min(ue,E.value.length);else{var fe=E.ownerDocument||document,te=fe&&fe.defaultView||window;if(te.getSelection){var re=te.getSelection(),ke=E.textContent.length,He=Math.min(z.start,ke),Dt=z.end===void 0?He:Math.min(z.end,ke);!re.extend&&He>Dt&&(S=Dt,Dt=He,He=S);var Q=bm(E,He),G=bm(E,Dt);if(Q&&G&&(re.rangeCount!==1||re.anchorNode!==Q.node||re.anchorOffset!==Q.offset||re.focusNode!==G.node||re.focusOffset!==G.offset)){var Z=fe.createRange();Z.setStart(Q.node,Q.offset),re.removeAllRanges(),He>Dt?(re.addRange(Z),re.extend(G.node,G.offset)):(Z.setEnd(G.node,G.offset),re.addRange(Z))}}}}for(fe=[],re=E;re=re.parentNode;)re.nodeType===1&&fe.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<fe.length;E++){var ce=fe[E];ce.element.scrollLeft=ce.left,ce.element.scrollTop=ce.top}}hu=!!md,pd=md=null}finally{wt=f,R.p=o,C.T=r}}e.current=n,sn=2}}function F0(){if(sn===2){sn=0;var e=Fi,n=ca,r=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||r){r=C.T,C.T=null;var o=R.p;R.p=2;var f=wt;wt|=4;try{u0(e,n.alternate,n)}finally{wt=f,R.p=o,C.T=r}}sn=3}}function R0(){if(sn===4||sn===3){sn=0,ve();var e=Fi,n=ca,r=li,o=N0;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?sn=5:(sn=0,ca=Fi=null,L0(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(_i=null),hn(r),n=n.stateNode,et&&typeof et.onCommitFiberRoot=="function")try{et.onCommitFiberRoot(Le,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=C.T,f=R.p,R.p=2,C.T=null;try{for(var p=e.onRecoverableError,S=0;S<o.length;S++){var E=o[S];p(E.value,{componentStack:E.stack})}}finally{C.T=n,R.p=f}}(li&3)!==0&&tu(),Dl(e),f=e.pendingLanes,(r&261930)!==0&&(f&42)!==0?e===td?gs++:(gs=0,td=e):gs=0,bs(0)}}function L0(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Za(n)))}function tu(){return _0(),F0(),R0(),z0()}function z0(){if(sn!==5)return!1;var e=Fi,n=Wf;Wf=0;var r=hn(li),o=C.T,f=R.p;try{R.p=32>r?32:r,C.T=null,r=ed,ed=null;var p=Fi,S=li;if(sn=0,ca=Fi=null,li=0,(wt&6)!==0)throw Error(a(331));var E=wt;if(wt|=4,y0(p.current),x0(p,p.current,S,r),wt=E,bs(0,!1),et&&typeof et.onPostCommitFiberRoot=="function")try{et.onPostCommitFiberRoot(Le,p)}catch{}return!0}finally{R.p=f,C.T=o,L0(e,n)}}function $0(e,n,r){n=nl(r,n),n=Bf(e.stateNode,n,2),e=ji(e,n,2),e!==null&&(gt(e,2),Dl(e))}function Et(e,n,r){if(e.tag===3)$0(e,e,r);else for(;n!==null;){if(n.tag===3){$0(n,e,r);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(_i===null||!_i.has(o))){e=nl(r,e),r=Ip(2),o=ji(n,r,2),o!==null&&(Hp(r,o,n,e),gt(o,2),Dl(o));break}}n=n.return}}function id(e,n,r){var o=e.pingCache;if(o===null){o=e.pingCache=new nv;var f=new Set;o.set(n,f)}else f=o.get(n),f===void 0&&(f=new Set,o.set(n,f));f.has(r)||(Xf=!0,f.add(r),e=sv.bind(null,e,n,r),n.then(e,e))}function sv(e,n,r){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,Ot===e&&(ct&r)===r&&(Vt===4||Vt===3&&(ct&62914560)===ct&&300>Oe()-Jo?(wt&2)===0&&fa(e,0):Kf|=r,ua===ct&&(ua=0)),Dl(e)}function I0(e,n){n===0&&(n=Ce()),e=cr(e,n),e!==null&&(gt(e,n),Dl(e))}function ov(e){var n=e.memoizedState,r=0;n!==null&&(r=n.retryLane),I0(e,r)}function uv(e,n){var r=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(r=f.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(a(314))}o!==null&&o.delete(n),I0(e,r)}function cv(e,n){return nt(e,n)}var nu=null,ha=null,rd=!1,lu=!1,ad=!1,Li=0;function Dl(e){e!==ha&&e.next===null&&(ha===null?nu=ha=e:ha=ha.next=e),lu=!0,rd||(rd=!0,dv())}function bs(e,n){if(!ad&&lu){ad=!0;do for(var r=!1,o=nu;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var p=0;else{var S=o.suspendedLanes,E=o.pingedLanes;p=(1<<31-qe(42|e)+1)-1,p&=f&~(S&~E),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(r=!0,q0(o,p))}else p=ct,p=fl(o,o===Ot?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(p&3)===0||dl(o,p)||(r=!0,q0(o,p));o=o.next}while(r);ad=!1}}function fv(){H0()}function H0(){lu=rd=!1;var e=0;Li!==0&&Nv()&&(e=Li);for(var n=Oe(),r=null,o=nu;o!==null;){var f=o.next,p=U0(o,n);p===0?(o.next=null,r===null?nu=f:r.next=f,f===null&&(ha=r)):(r=o,(e!==0||(p&3)!==0)&&(lu=!0)),o=f}sn!==0&&sn!==5||bs(e),Li!==0&&(Li=0)}function U0(e,n){for(var r=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,p=e.pendingLanes&-62914561;0<p;){var S=31-qe(p),E=1<<S,z=f[S];z===-1?((E&r)===0||(E&o)!==0)&&(f[S]=Ll(E,n)):z<=n&&(e.expiredLanes|=E),p&=~E}if(n=Ot,r=ct,r=fl(e,e===n?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,r===0||e===n&&(Ct===2||Ct===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&pt(o),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||dl(e,r)){if(n=r&-r,n===e.callbackPriority)return n;switch(o!==null&&pt(o),hn(r)){case 2:case 8:r=pe;break;case 32:r=je;break;case 268435456:r=_e;break;default:r=je}return o=G0.bind(null,e),r=nt(r,o),e.callbackPriority=n,e.callbackNode=r,n}return o!==null&&o!==null&&pt(o),e.callbackPriority=2,e.callbackNode=null,2}function G0(e,n){if(sn!==0&&sn!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(tu()&&e.callbackNode!==r)return null;var o=ct;return o=fl(e,e===Ot?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(C0(e,o,n),U0(e,Oe()),e.callbackNode!=null&&e.callbackNode===r?G0.bind(null,e):null)}function q0(e,n){if(tu())return null;C0(e,n,!0)}function dv(){Cv(function(){(wt&6)!==0?nt(ie,fv):H0()})}function sd(){if(Li===0){var e=Zr;e===0&&(e=ge,ge<<=1,(ge&261888)===0&&(ge=256)),Li=e}return Li}function P0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:tr(""+e)}function V0(e,n){var r=n.ownerDocument.createElement("input");return r.name=n.name,r.value=n.value,e.id&&r.setAttribute("form",e.id),n.parentNode.insertBefore(r,n),e=new FormData(e),r.parentNode.removeChild(r),e}function hv(e,n,r,o,f){if(n==="submit"&&r&&r.stateNode===f){var p=P0((f[bt]||null).action),S=o.submitter;S&&(n=(n=S[bt]||null)?P0(n.formAction):S.getAttribute("formAction"),n!==null&&(p=n,S=null));var E=new Si("action","action",null,o,f);e.push({event:E,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Li!==0){var z=S?V0(f,S):new FormData(f);kf(r,{pending:!0,data:z,method:f.method,action:p},null,z)}}else typeof p=="function"&&(E.preventDefault(),z=S?V0(f,S):new FormData(f),kf(r,{pending:!0,data:z,method:f.method,action:p},p,z))},currentTarget:f}]})}}for(var od=0;od<Gc.length;od++){var ud=Gc[od],mv=ud.toLowerCase(),pv=ud[0].toUpperCase()+ud.slice(1);xl(mv,"on"+pv)}xl(wm,"onAnimationEnd"),xl(Cm,"onAnimationIteration"),xl(Em,"onAnimationStart"),xl("dblclick","onDoubleClick"),xl("focusin","onFocus"),xl("focusout","onBlur"),xl(Ty,"onTransitionRun"),xl(Oy,"onTransitionStart"),xl(By,"onTransitionCancel"),xl(Am,"onTransitionEnd"),Cl("onMouseEnter",["mouseout","mouseover"]),Cl("onMouseLeave",["mouseout","mouseover"]),Cl("onPointerEnter",["pointerout","pointerover"]),Cl("onPointerLeave",["pointerout","pointerover"]),$l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$l("onBeforeInput",["compositionend","keypress","textInput","paste"]),$l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ys="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(" "),xv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ys));function Y0(e,n){n=(n&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],f=o.event;o=o.listeners;e:{var p=void 0;if(n)for(var S=o.length-1;0<=S;S--){var E=o[S],z=E.instance,W=E.currentTarget;if(E=E.listener,z!==p&&f.isPropagationStopped())break e;p=E,f.currentTarget=W;try{p(f)}catch(ue){bo(ue)}f.currentTarget=null,p=z}else for(S=0;S<o.length;S++){if(E=o[S],z=E.instance,W=E.currentTarget,E=E.listener,z!==p&&f.isPropagationStopped())break e;p=E,f.currentTarget=W;try{p(f)}catch(ue){bo(ue)}f.currentTarget=null,p=z}}}}function st(e,n){var r=n[zl];r===void 0&&(r=n[zl]=new Set);var o=e+"__bubble";r.has(o)||(Q0(n,e,2,!1),r.add(o))}function cd(e,n,r){var o=0;n&&(o|=4),Q0(r,e,o,n)}var iu="_reactListening"+Math.random().toString(36).slice(2);function fd(e){if(!e[iu]){e[iu]=!0,no.forEach(function(r){r!=="selectionchange"&&(xv.has(r)||cd(r,!1,e),cd(r,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[iu]||(n[iu]=!0,cd("selectionchange",!1,n))}}function Q0(e,n,r,o){switch(wx(n)){case 2:var f=qv;break;case 8:f=Pv;break;default:f=Ad}r=f.bind(null,n,r,e),f=void 0,!Ha||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),o?f!==void 0?e.addEventListener(n,r,{capture:!0,passive:f}):e.addEventListener(n,r,!0):f!==void 0?e.addEventListener(n,r,{passive:f}):e.addEventListener(n,r,!1)}function dd(e,n,r,o,f){var p=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var S=o.tag;if(S===3||S===4){var E=o.stateNode.containerInfo;if(E===f)break;if(S===4)for(S=o.return;S!==null;){var z=S.tag;if((z===3||z===4)&&S.stateNode.containerInfo===f)return;S=S.return}for(;E!==null;){if(S=Wn(E),S===null)return;if(z=S.tag,z===5||z===6||z===26||z===27){o=p=S;continue e}E=E.parentNode}}o=o.return}co(function(){var W=p,ue=Qt(r),fe=[];e:{var te=km.get(e);if(te!==void 0){var re=Si,ke=e;switch(e){case"keypress":if(lr(r)===0)break e;case"keydown":case"keyup":re=Ac;break;case"focusin":ke="focus",re=qa;break;case"focusout":ke="blur",re=qa;break;case"beforeblur":case"afterblur":re=qa;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=mo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=mc;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=Mc;break;case wm:case Cm:case Em:re=gc;break;case Am:re=xo;break;case"scroll":case"scrollend":re=dc;break;case"wheel":re=Tc;break;case"copy":case"cut":case"paste":re=yc;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=po;break;case"toggle":case"beforetoggle":re=Oc}var He=(n&4)!==0,Dt=!He&&(e==="scroll"||e==="scrollend"),Q=He?te!==null?te+"Capture":null:te;He=[];for(var G=W,Z;G!==null;){var ce=G;if(Z=ce.stateNode,ce=ce.tag,ce!==5&&ce!==26&&ce!==27||Z===null||Q===null||(ce=yi(G,Q),ce!=null&&He.push(vs(G,ce,Z))),Dt)break;G=G.return}0<He.length&&(te=new re(te,ke,null,r,ue),fe.push({event:te,listeners:He}))}}if((n&7)===0){e:{if(te=e==="mouseover"||e==="pointerover",re=e==="mouseout"||e==="pointerout",te&&r!==Ir&&(ke=r.relatedTarget||r.fromElement)&&(Wn(ke)||ke[an]))break e;if((re||te)&&(te=ue.window===ue?ue:(te=ue.ownerDocument)?te.defaultView||te.parentWindow:window,re?(ke=r.relatedTarget||r.toElement,re=W,ke=ke?Wn(ke):null,ke!==null&&(Dt=s(ke),He=ke.tag,ke!==Dt||He!==5&&He!==27&&He!==6)&&(ke=null)):(re=null,ke=W),re!==ke)){if(He=mo,ce="onMouseLeave",Q="onMouseEnter",G="mouse",(e==="pointerout"||e==="pointerover")&&(He=po,ce="onPointerLeave",Q="onPointerEnter",G="pointer"),Dt=re==null?te:wl(re),Z=ke==null?te:wl(ke),te=new He(ce,G+"leave",re,r,ue),te.target=Dt,te.relatedTarget=Z,ce=null,Wn(ue)===W&&(He=new He(Q,G+"enter",ke,r,ue),He.target=Z,He.relatedTarget=Dt,ce=He),Dt=ce,re&&ke)t:{for(He=gv,Q=re,G=ke,Z=0,ce=Q;ce;ce=He(ce))Z++;ce=0;for(var $e=G;$e;$e=He($e))ce++;for(;0<Z-ce;)Q=He(Q),Z--;for(;0<ce-Z;)G=He(G),ce--;for(;Z--;){if(Q===G||G!==null&&Q===G.alternate){He=Q;break t}Q=He(Q),G=He(G)}He=null}else He=null;re!==null&&J0(fe,te,re,He,!1),ke!==null&&Dt!==null&&J0(fe,Dt,ke,He,!0)}}e:{if(te=W?wl(W):window,re=te.nodeName&&te.nodeName.toLowerCase(),re==="select"||re==="input"&&te.type==="file")var vt=Me;else if(me(te))if(yt)vt=jy;else{vt=sr;var De=Dn}else re=te.nodeName,!re||re.toLowerCase()!=="input"||te.type!=="checkbox"&&te.type!=="radio"?W&&$r(W.elementType)&&(vt=Me):vt=Al;if(vt&&(vt=vt(e,W))){ee(fe,vt,r,ue);break e}De&&De(e,te,W),e==="focusout"&&W&&te.type==="number"&&W.memoizedProps.value!=null&&zr(te,"number",te.value)}switch(De=W?wl(W):window,e){case"focusin":(me(De)||De.contentEditable==="true")&&(qr=De,Ic=W,Ja=null);break;case"focusout":Ja=Ic=qr=null;break;case"mousedown":Hc=!0;break;case"contextmenu":case"mouseup":case"dragend":Hc=!1,Sm(fe,r,ue);break;case"selectionchange":if(Dy)break;case"keydown":case"keyup":Sm(fe,r,ue)}var Ze;if(rr)e:{switch(e){case"compositionstart":var ft="onCompositionStart";break e;case"compositionend":ft="onCompositionEnd";break e;case"compositionupdate":ft="onCompositionUpdate";break e}ft=void 0}else ar?Lc(e,r)&&(ft="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(ft="onCompositionStart");ft&&(_c&&r.locale!=="ko"&&(ar||ft!=="onCompositionStart"?ft==="onCompositionEnd"&&ar&&(Ze=fo()):(El=ue,Ul="value"in El?El.value:El.textContent,ar=!0)),De=ru(W,ft),0<De.length&&(ft=new Pa(ft,e,null,r,ue),fe.push({event:ft,listeners:De}),Ze?ft.data=Ze:(Ze=zc(r),Ze!==null&&(ft.data=Ze)))),(Ze=xm?F(e,r):q(e,r))&&(ft=ru(W,"onBeforeInput"),0<ft.length&&(De=new Pa("onBeforeInput","beforeinput",null,r,ue),fe.push({event:De,listeners:ft}),De.data=Ze)),hv(fe,e,W,r,ue)}Y0(fe,n)})}function vs(e,n,r){return{instance:e,listener:n,currentTarget:r}}function ru(e,n){for(var r=n+"Capture",o=[];e!==null;){var f=e,p=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||p===null||(f=yi(e,r),f!=null&&o.unshift(vs(e,f,p)),f=yi(e,n),f!=null&&o.push(vs(e,f,p))),e.tag===3)return o;e=e.return}return[]}function gv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function J0(e,n,r,o,f){for(var p=n._reactName,S=[];r!==null&&r!==o;){var E=r,z=E.alternate,W=E.stateNode;if(E=E.tag,z!==null&&z===o)break;E!==5&&E!==26&&E!==27||W===null||(z=W,f?(W=yi(r,p),W!=null&&S.unshift(vs(r,W,z))):f||(W=yi(r,p),W!=null&&S.push(vs(r,W,z)))),r=r.return}S.length!==0&&e.push({event:n,listeners:S})}var bv=/\r\n?/g,yv=/\u0000|\uFFFD/g;function X0(e){return(typeof e=="string"?e:""+e).replace(bv,`
|
|
9
|
+
`).replace(yv,"")}function K0(e,n){return n=X0(n),X0(e)===n}function Mt(e,n,r,o,f,p){switch(r){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||Hl(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&Hl(e,""+o);break;case"className":pi(e,"class",o);break;case"tabIndex":pi(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":pi(e,r,o);break;case"style":$a(e,o,p);break;case"data":if(n!=="object"){pi(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||r!=="href")){e.removeAttribute(r);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=tr(""+o),e.setAttribute(r,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(r==="formAction"?(n!=="input"&&Mt(e,n,"name",f.name,f,null),Mt(e,n,"formEncType",f.formEncType,f,null),Mt(e,n,"formMethod",f.formMethod,f,null),Mt(e,n,"formTarget",f.formTarget,f,null)):(Mt(e,n,"encType",f.encType,f,null),Mt(e,n,"method",f.method,f,null),Mt(e,n,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(r);break}o=tr(""+o),e.setAttribute(r,o);break;case"onClick":o!=null&&(e.onclick=el);break;case"onScroll":o!=null&&st("scroll",e);break;case"onScrollEnd":o!=null&&st("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(r=o.__html,r!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=r}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}r=tr(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""+o):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":o===!0?e.setAttribute(r,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(r,o):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(r,o):e.removeAttribute(r);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(r):e.setAttribute(r,o);break;case"popover":st("beforetoggle",e),st("toggle",e),Fr(e,"popover",o);break;case"xlinkActuate":ml(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":ml(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":ml(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":ml(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":ml(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":ml(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":ml(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":ml(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":ml(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Fr(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=so.get(r)||r,Fr(e,r,o))}}function hd(e,n,r,o,f,p){switch(r){case"style":$a(e,o,p);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(a(61));if(r=o.__html,r!=null){if(f.children!=null)throw Error(a(60));e.innerHTML=r}}break;case"children":typeof o=="string"?Hl(e,o):(typeof o=="number"||typeof o=="bigint")&&Hl(e,""+o);break;case"onScroll":o!=null&&st("scroll",e);break;case"onScrollEnd":o!=null&&st("scrollend",e);break;case"onClick":o!=null&&(e.onclick=el);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Br.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(f=r.endsWith("Capture"),n=r.slice(2,f?r.length-7:void 0),p=e[bt]||null,p=p!=null?p[r]:null,typeof p=="function"&&e.removeEventListener(n,p,f),typeof o=="function")){typeof p!="function"&&p!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(n,o,f);break e}r in e?e[r]=o:o===!0?e.setAttribute(r,""):Fr(e,r,o)}}}function yn(e,n,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":st("error",e),st("load",e);var o=!1,f=!1,p;for(p in r)if(r.hasOwnProperty(p)){var S=r[p];if(S!=null)switch(p){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:Mt(e,n,p,S,r,null)}}f&&Mt(e,n,"srcSet",r.srcSet,r,null),o&&Mt(e,n,"src",r.src,r,null);return;case"input":st("invalid",e);var E=p=S=f=null,z=null,W=null;for(o in r)if(r.hasOwnProperty(o)){var ue=r[o];if(ue!=null)switch(o){case"name":f=ue;break;case"type":S=ue;break;case"checked":z=ue;break;case"defaultChecked":W=ue;break;case"value":p=ue;break;case"defaultValue":E=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(a(137,n));break;default:Mt(e,n,o,ue,r,null)}}xi(e,p,E,z,W,S,f,!1);return;case"select":st("invalid",e),o=S=p=null;for(f in r)if(r.hasOwnProperty(f)&&(E=r[f],E!=null))switch(f){case"value":p=E;break;case"defaultValue":S=E;break;case"multiple":o=E;default:Mt(e,n,f,E,r,null)}n=p,r=S,e.multiple=!!o,n!=null?Il(e,!!o,n,!1):r!=null&&Il(e,!!o,r,!0);return;case"textarea":st("invalid",e),p=f=o=null;for(S in r)if(r.hasOwnProperty(S)&&(E=r[S],E!=null))switch(S){case"value":o=E;break;case"defaultValue":f=E;break;case"children":p=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(a(91));break;default:Mt(e,n,S,E,r,null)}za(e,o,f,p);return;case"option":for(z in r)r.hasOwnProperty(z)&&(o=r[z],o!=null)&&(z==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Mt(e,n,z,o,r,null));return;case"dialog":st("beforetoggle",e),st("toggle",e),st("cancel",e),st("close",e);break;case"iframe":case"object":st("load",e);break;case"video":case"audio":for(o=0;o<ys.length;o++)st(ys[o],e);break;case"image":st("error",e),st("load",e);break;case"details":st("toggle",e);break;case"embed":case"source":case"link":st("error",e),st("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 r)if(r.hasOwnProperty(W)&&(o=r[W],o!=null))switch(W){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,n));default:Mt(e,n,W,o,r,null)}return;default:if($r(n)){for(ue in r)r.hasOwnProperty(ue)&&(o=r[ue],o!==void 0&&hd(e,n,ue,o,r,void 0));return}}for(E in r)r.hasOwnProperty(E)&&(o=r[E],o!=null&&Mt(e,n,E,o,r,null))}function vv(e,n,r,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,p=null,S=null,E=null,z=null,W=null,ue=null;for(re in r){var fe=r[re];if(r.hasOwnProperty(re)&&fe!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":z=fe;default:o.hasOwnProperty(re)||Mt(e,n,re,null,o,fe)}}for(var te in o){var re=o[te];if(fe=r[te],o.hasOwnProperty(te)&&(re!=null||fe!=null))switch(te){case"type":p=re;break;case"name":f=re;break;case"checked":W=re;break;case"defaultChecked":ue=re;break;case"value":S=re;break;case"defaultValue":E=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(a(137,n));break;default:re!==fe&&Mt(e,n,te,re,o,fe)}}Lr(e,S,E,z,W,ue,p,f);return;case"select":re=S=E=te=null;for(p in r)if(z=r[p],r.hasOwnProperty(p)&&z!=null)switch(p){case"value":break;case"multiple":re=z;default:o.hasOwnProperty(p)||Mt(e,n,p,null,o,z)}for(f in o)if(p=o[f],z=r[f],o.hasOwnProperty(f)&&(p!=null||z!=null))switch(f){case"value":te=p;break;case"defaultValue":E=p;break;case"multiple":S=p;default:p!==z&&Mt(e,n,f,p,o,z)}n=E,r=S,o=re,te!=null?Il(e,!!r,te,!1):!!o!=!!r&&(n!=null?Il(e,!!r,n,!0):Il(e,!!r,r?[]:"",!1));return;case"textarea":re=te=null;for(E in r)if(f=r[E],r.hasOwnProperty(E)&&f!=null&&!o.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Mt(e,n,E,null,o,f)}for(S in o)if(f=o[S],p=r[S],o.hasOwnProperty(S)&&(f!=null||p!=null))switch(S){case"value":te=f;break;case"defaultValue":re=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(a(91));break;default:f!==p&&Mt(e,n,S,f,o,p)}La(e,te,re);return;case"option":for(var ke in r)te=r[ke],r.hasOwnProperty(ke)&&te!=null&&!o.hasOwnProperty(ke)&&(ke==="selected"?e.selected=!1:Mt(e,n,ke,null,o,te));for(z in o)te=o[z],re=r[z],o.hasOwnProperty(z)&&te!==re&&(te!=null||re!=null)&&(z==="selected"?e.selected=te&&typeof te!="function"&&typeof te!="symbol":Mt(e,n,z,te,o,re));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 He in r)te=r[He],r.hasOwnProperty(He)&&te!=null&&!o.hasOwnProperty(He)&&Mt(e,n,He,null,o,te);for(W in o)if(te=o[W],re=r[W],o.hasOwnProperty(W)&&te!==re&&(te!=null||re!=null))switch(W){case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(a(137,n));break;default:Mt(e,n,W,te,o,re)}return;default:if($r(n)){for(var Dt in r)te=r[Dt],r.hasOwnProperty(Dt)&&te!==void 0&&!o.hasOwnProperty(Dt)&&hd(e,n,Dt,void 0,o,te);for(ue in o)te=o[ue],re=r[ue],!o.hasOwnProperty(ue)||te===re||te===void 0&&re===void 0||hd(e,n,ue,te,o,re);return}}for(var Q in r)te=r[Q],r.hasOwnProperty(Q)&&te!=null&&!o.hasOwnProperty(Q)&&Mt(e,n,Q,null,o,te);for(fe in o)te=o[fe],re=r[fe],!o.hasOwnProperty(fe)||te===re||te==null&&re==null||Mt(e,n,fe,te,o,re)}function Z0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Sv(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,r=performance.getEntriesByType("resource"),o=0;o<r.length;o++){var f=r[o],p=f.transferSize,S=f.initiatorType,E=f.duration;if(p&&E&&Z0(S)){for(S=0,E=f.responseEnd,o+=1;o<r.length;o++){var z=r[o],W=z.startTime;if(W>E)break;var ue=z.transferSize,fe=z.initiatorType;ue&&Z0(fe)&&(z=z.responseEnd,S+=ue*(z<E?1:(E-W)/(z-W)))}if(--o,n+=8*(p+S)/(f.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var md=null,pd=null;function au(e){return e.nodeType===9?e:e.ownerDocument}function W0(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 ex(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 xd(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 gd=null;function Nv(){var e=window.event;return e&&e.type==="popstate"?e===gd?!1:(gd=e,!0):(gd=null,!1)}var tx=typeof setTimeout=="function"?setTimeout:void 0,wv=typeof clearTimeout=="function"?clearTimeout:void 0,nx=typeof Promise=="function"?Promise:void 0,Cv=typeof queueMicrotask=="function"?queueMicrotask:typeof nx<"u"?function(e){return nx.resolve(null).then(e).catch(Ev)}:tx;function Ev(e){setTimeout(function(){throw e})}function zi(e){return e==="head"}function lx(e,n){var r=n,o=0;do{var f=r.nextSibling;if(e.removeChild(r),f&&f.nodeType===8)if(r=f.data,r==="/$"||r==="/&"){if(o===0){e.removeChild(f),ga(n);return}o--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")o++;else if(r==="html")Ss(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,Ss(r);for(var p=r.firstChild;p;){var S=p.nextSibling,E=p.nodeName;p[hl]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&p.rel.toLowerCase()==="stylesheet"||r.removeChild(p),p=S}}else r==="body"&&Ss(e.ownerDocument.body);r=f}while(r);ga(n)}function ix(e,n){var r=e;e=0;do{var o=r.nextSibling;if(r.nodeType===1?n?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(n?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),o&&o.nodeType===8)if(r=o.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=o}while(r)}function bd(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var r=n;switch(n=n.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":bd(r),_a(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function Av(e,n,r,o){for(;e.nodeType===1;){var f=r;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[hl])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(p=e.getAttribute("rel"),p==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(p!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(p=e.getAttribute("src"),(p!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&p&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var p=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===p)return e}else return e;if(e=sl(e.nextSibling),e===null)break}return null}function kv(e,n,r){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=sl(e.nextSibling),e===null))return null;return e}function rx(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=sl(e.nextSibling),e===null))return null;return e}function yd(e){return e.data==="$?"||e.data==="$~"}function vd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function jv(e,n){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||r.readyState!=="loading")n();else{var o=function(){n(),r.removeEventListener("DOMContentLoaded",o)};r.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function sl(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 Sd=null;function ax(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(n===0)return sl(e.nextSibling);n--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||n++}e=e.nextSibling}return null}function sx(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(n===0)return e;n--}else r!=="/$"&&r!=="/&"||n++}e=e.previousSibling}return null}function ox(e,n,r){switch(n=au(r),e){case"html":if(e=n.documentElement,!e)throw Error(a(452));return e;case"head":if(e=n.head,!e)throw Error(a(453));return e;case"body":if(e=n.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function Ss(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);_a(e)}var ol=new Map,ux=new Set;function su(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ii=R.d;R.d={f:Mv,r:Dv,D:Tv,C:Ov,L:Bv,m:_v,X:Rv,S:Fv,M:Lv};function Mv(){var e=ii.f(),n=Zo();return e||n}function Dv(e){var n=hi(e);n!==null&&n.tag===5&&n.type==="form"?Ap(n):ii.r(e)}var ma=typeof document>"u"?null:document;function cx(e,n,r){var o=ma;if(o&&typeof n=="string"&&n){var f=Mn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof r=="string"&&(f+='[crossorigin="'+r+'"]'),ux.has(f)||(ux.add(f),e={rel:e,crossOrigin:r,href:n},o.querySelector(f)===null&&(n=o.createElement("link"),yn(n,"link",e),qt(n),o.head.appendChild(n)))}}function Tv(e){ii.D(e),cx("dns-prefetch",e,null)}function Ov(e,n){ii.C(e,n),cx("preconnect",e,n)}function Bv(e,n,r){ii.L(e,n,r);var o=ma;if(o&&e&&n){var f='link[rel="preload"][as="'+Mn(n)+'"]';n==="image"&&r&&r.imageSrcSet?(f+='[imagesrcset="'+Mn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(f+='[imagesizes="'+Mn(r.imageSizes)+'"]')):f+='[href="'+Mn(e)+'"]';var p=f;switch(n){case"style":p=pa(e);break;case"script":p=xa(e)}ol.has(p)||(e=b({rel:"preload",href:n==="image"&&r&&r.imageSrcSet?void 0:e,as:n},r),ol.set(p,e),o.querySelector(f)!==null||n==="style"&&o.querySelector(Ns(p))||n==="script"&&o.querySelector(ws(p))||(n=o.createElement("link"),yn(n,"link",e),qt(n),o.head.appendChild(n)))}}function _v(e,n){ii.m(e,n);var r=ma;if(r&&e){var o=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+Mn(o)+'"][href="'+Mn(e)+'"]',p=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=xa(e)}if(!ol.has(p)&&(e=b({rel:"modulepreload",href:e},n),ol.set(p,e),r.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(ws(p)))return}o=r.createElement("link"),yn(o,"link",e),qt(o),r.head.appendChild(o)}}}function Fv(e,n,r){ii.S(e,n,r);var o=ma;if(o&&e){var f=mi(o).hoistableStyles,p=pa(e);n=n||"default";var S=f.get(p);if(!S){var E={loading:0,preload:null};if(S=o.querySelector(Ns(p)))E.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":n},r),(r=ol.get(p))&&Nd(e,r);var z=S=o.createElement("link");qt(z),yn(z,"link",e),z._p=new Promise(function(W,ue){z.onload=W,z.onerror=ue}),z.addEventListener("load",function(){E.loading|=1}),z.addEventListener("error",function(){E.loading|=2}),E.loading|=4,ou(S,n,o)}S={type:"stylesheet",instance:S,count:1,state:E},f.set(p,S)}}}function Rv(e,n){ii.X(e,n);var r=ma;if(r&&e){var o=mi(r).hoistableScripts,f=xa(e),p=o.get(f);p||(p=r.querySelector(ws(f)),p||(e=b({src:e,async:!0},n),(n=ol.get(f))&&wd(e,n),p=r.createElement("script"),qt(p),yn(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(f,p))}}function Lv(e,n){ii.M(e,n);var r=ma;if(r&&e){var o=mi(r).hoistableScripts,f=xa(e),p=o.get(f);p||(p=r.querySelector(ws(f)),p||(e=b({src:e,async:!0,type:"module"},n),(n=ol.get(f))&&wd(e,n),p=r.createElement("script"),qt(p),yn(p,"link",e),r.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},o.set(f,p))}}function fx(e,n,r,o){var f=(f=Ee.current)?su(f):null;if(!f)throw Error(a(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(n=pa(r.href),r=mi(f).hoistableStyles,o=r.get(n),o||(o={type:"style",instance:null,count:0,state:null},r.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=pa(r.href);var p=mi(f).hoistableStyles,S=p.get(e);if(S||(f=f.ownerDocument||f,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(e,S),(p=f.querySelector(Ns(e)))&&!p._p&&(S.instance=p,S.state.loading=5),ol.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},ol.set(e,r),p||zv(f,e,r,S.state))),n&&o===null)throw Error(a(528,""));return S}if(n&&o!==null)throw Error(a(529,""));return null;case"script":return n=r.async,r=r.src,typeof r=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=xa(r),r=mi(f).hoistableScripts,o=r.get(n),o||(o={type:"script",instance:null,count:0,state:null},r.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,e))}}function pa(e){return'href="'+Mn(e)+'"'}function Ns(e){return'link[rel="stylesheet"]['+e+"]"}function dx(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function zv(e,n,r,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),yn(n,"link",r),qt(n),e.head.appendChild(n))}function xa(e){return'[src="'+Mn(e)+'"]'}function ws(e){return"script[async]"+e}function hx(e,n,r){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+Mn(r.href)+'"]');if(o)return n.instance=o,qt(o),o;var f=b({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),qt(o),yn(o,"style",f),ou(o,r.precedence,e),n.instance=o;case"stylesheet":f=pa(r.href);var p=e.querySelector(Ns(f));if(p)return n.state.loading|=4,n.instance=p,qt(p),p;o=dx(r),(f=ol.get(f))&&Nd(o,f),p=(e.ownerDocument||e).createElement("link"),qt(p);var S=p;return S._p=new Promise(function(E,z){S.onload=E,S.onerror=z}),yn(p,"link",o),n.state.loading|=4,ou(p,r.precedence,e),n.instance=p;case"script":return p=xa(r.src),(f=e.querySelector(ws(p)))?(n.instance=f,qt(f),f):(o=r,(f=ol.get(p))&&(o=b({},r),wd(o,f)),e=e.ownerDocument||e,f=e.createElement("script"),qt(f),yn(f,"link",o),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(a(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,ou(o,r.precedence,e));return n.instance}function ou(e,n,r){for(var o=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,p=f,S=0;S<o.length;S++){var E=o[S];if(E.dataset.precedence===n)p=E;else if(p!==f)break}p?p.parentNode.insertBefore(e,p.nextSibling):(n=r.nodeType===9?r.head:r,n.insertBefore(e,n.firstChild))}function Nd(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function wd(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var uu=null;function mx(e,n,r){if(uu===null){var o=new Map,f=uu=new Map;f.set(r,o)}else f=uu,o=f.get(r),o||(o=new Map,f.set(r,o));if(o.has(e))return o;for(o.set(e,null),r=r.getElementsByTagName(e),f=0;f<r.length;f++){var p=r[f];if(!(p[hl]||p[Nt]||e==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var S=p.getAttribute(n)||"";S=e+S;var E=o.get(S);E?E.push(p):o.set(S,[p])}}return o}function px(e,n,r){e=e.ownerDocument||e,e.head.insertBefore(r,n==="title"?e.querySelector("head > title"):null)}function $v(e,n,r){if(r===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function xx(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Iv(e,n,r,o){if(r.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var f=pa(o.href),p=n.querySelector(Ns(f));if(p){n=p._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=cu.bind(e),n.then(e,e)),r.state.loading|=4,r.instance=p,qt(p);return}p=n.ownerDocument||n,o=dx(o),(f=ol.get(f))&&Nd(o,f),p=p.createElement("link"),qt(p);var S=p;S._p=new Promise(function(E,z){S.onload=E,S.onerror=z}),yn(p,"link",o),r.instance=p}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,n),(n=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=cu.bind(e),n.addEventListener("load",r),n.addEventListener("error",r))}}var Cd=0;function Hv(e,n){return e.stylesheets&&e.count===0&&du(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var o=setTimeout(function(){if(e.stylesheets&&du(e,e.stylesheets),e.unsuspend){var p=e.unsuspend;e.unsuspend=null,p()}},6e4+n);0<e.imgBytes&&Cd===0&&(Cd=62500*Sv());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&du(e,e.stylesheets),e.unsuspend)){var p=e.unsuspend;e.unsuspend=null,p()}},(e.imgBytes>Cd?50:800)+n);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function cu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)du(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var fu=null;function du(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,fu=new Map,n.forEach(Uv,e),fu=null,cu.call(e))}function Uv(e,n){if(!(n.state.loading&4)){var r=fu.get(e);if(r)var o=r.get(null);else{r=new Map,fu.set(e,r);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<f.length;p++){var S=f[p];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(r.set(S.dataset.precedence,S),o=S)}o&&r.set(null,o)}f=n.instance,S=f.getAttribute("data-precedence"),p=r.get(S)||o,p===o&&r.set(null,f),r.set(S,f),this.count++,o=cu.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),p?p.parentNode.insertBefore(f,p.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Cs={$$typeof:$,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function Gv(e,n,r,o,f,p,S,E,z){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=rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rt(0),this.hiddenUpdates=rt(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=p,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function gx(e,n,r,o,f,p,S,E,z,W,ue,fe){return e=new Gv(e,n,r,S,z,W,ue,fe,E),n=1,p===!0&&(n|=24),p=Gn(3,null,null,n),e.current=p,p.stateNode=e,n=nf(),n.refCount++,e.pooledCache=n,n.refCount++,p.memoizedState={element:o,isDehydrated:r,cache:n},sf(p),e}function bx(e){return e?(e=Yr,e):Yr}function yx(e,n,r,o,f,p){f=bx(f),o.context===null?o.context=f:o.pendingContext=f,o=ki(n),o.payload={element:r},p=p===void 0?null:p,p!==null&&(o.callback=p),r=ji(e,o,n),r!==null&&(zn(r,e,n),ns(r,e,n))}function vx(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<n?r:n}}function Ed(e,n){vx(e,n),(e=e.alternate)&&vx(e,n)}function Sx(e){if(e.tag===13||e.tag===31){var n=cr(e,67108864);n!==null&&zn(n,e,67108864),Ed(e,67108864)}}function Nx(e){if(e.tag===13||e.tag===31){var n=Qn();n=rn(n);var r=cr(e,n);r!==null&&zn(r,e,n),Ed(e,n)}}var hu=!0;function qv(e,n,r,o){var f=C.T;C.T=null;var p=R.p;try{R.p=2,Ad(e,n,r,o)}finally{R.p=p,C.T=f}}function Pv(e,n,r,o){var f=C.T;C.T=null;var p=R.p;try{R.p=8,Ad(e,n,r,o)}finally{R.p=p,C.T=f}}function Ad(e,n,r,o){if(hu){var f=kd(o);if(f===null)dd(e,n,o,mu,r),Cx(e,o);else if(Yv(f,e,n,r,o))o.stopPropagation();else if(Cx(e,o),n&4&&-1<Vv.indexOf(e)){for(;f!==null;){var p=hi(f);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var S=Sn(p.pendingLanes);if(S!==0){var E=p;for(E.pendingLanes|=2,E.entangledLanes|=2;S;){var z=1<<31-qe(S);E.entanglements[1]|=z,S&=~z}Dl(p),(wt&6)===0&&(Xo=Oe()+500,bs(0))}}break;case 31:case 13:E=cr(p,2),E!==null&&zn(E,p,2),Zo(),Ed(p,2)}if(p=kd(o),p===null&&dd(e,n,o,mu,r),p===f)break;f=p}f!==null&&o.stopPropagation()}else dd(e,n,o,null,r)}}function kd(e){return e=Qt(e),jd(e)}var mu=null;function jd(e){if(mu=null,e=Wn(e),e!==null){var n=s(e);if(n===null)e=null;else{var r=n.tag;if(r===13){if(e=c(n),e!==null)return e;e=null}else if(r===31){if(e=d(n),e!==null)return e;e=null}else if(r===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return mu=e,null}function wx(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(At()){case ie:return 2;case pe:return 8;case je:case Be:return 32;case _e:return 268435456;default:return 32}default:return 32}}var Md=!1,$i=null,Ii=null,Hi=null,Es=new Map,As=new Map,Ui=[],Vv="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 Cx(e,n){switch(e){case"focusin":case"focusout":$i=null;break;case"dragenter":case"dragleave":Ii=null;break;case"mouseover":case"mouseout":Hi=null;break;case"pointerover":case"pointerout":Es.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":As.delete(n.pointerId)}}function ks(e,n,r,o,f,p){return e===null||e.nativeEvent!==p?(e={blockedOn:n,domEventName:r,eventSystemFlags:o,nativeEvent:p,targetContainers:[f]},n!==null&&(n=hi(n),n!==null&&Sx(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function Yv(e,n,r,o,f){switch(n){case"focusin":return $i=ks($i,e,n,r,o,f),!0;case"dragenter":return Ii=ks(Ii,e,n,r,o,f),!0;case"mouseover":return Hi=ks(Hi,e,n,r,o,f),!0;case"pointerover":var p=f.pointerId;return Es.set(p,ks(Es.get(p)||null,e,n,r,o,f)),!0;case"gotpointercapture":return p=f.pointerId,As.set(p,ks(As.get(p)||null,e,n,r,o,f)),!0}return!1}function Ex(e){var n=Wn(e.target);if(n!==null){var r=s(n);if(r!==null){if(n=r.tag,n===13){if(n=c(r),n!==null){e.blockedOn=n,Tt(e.priority,function(){Nx(r)});return}}else if(n===31){if(n=d(r),n!==null){e.blockedOn=n,Tt(e.priority,function(){Nx(r)});return}}else if(n===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function pu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var r=kd(e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);Ir=o,r.target.dispatchEvent(o),Ir=null}else return n=hi(r),n!==null&&Sx(n),e.blockedOn=r,!1;n.shift()}return!0}function Ax(e,n,r){pu(e)&&r.delete(n)}function Qv(){Md=!1,$i!==null&&pu($i)&&($i=null),Ii!==null&&pu(Ii)&&(Ii=null),Hi!==null&&pu(Hi)&&(Hi=null),Es.forEach(Ax),As.forEach(Ax)}function xu(e,n){e.blockedOn===n&&(e.blockedOn=null,Md||(Md=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Qv)))}var gu=null;function kx(e){gu!==e&&(gu=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){gu===e&&(gu=null);for(var n=0;n<e.length;n+=3){var r=e[n],o=e[n+1],f=e[n+2];if(typeof o!="function"){if(jd(o||r)===null)continue;break}var p=hi(r);p!==null&&(e.splice(n,3),n-=3,kf(p,{pending:!0,data:f,method:r.method,action:o},o,f))}}))}function ga(e){function n(z){return xu(z,e)}$i!==null&&xu($i,e),Ii!==null&&xu(Ii,e),Hi!==null&&xu(Hi,e),Es.forEach(n),As.forEach(n);for(var r=0;r<Ui.length;r++){var o=Ui[r];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Ui.length&&(r=Ui[0],r.blockedOn===null);)Ex(r),r.blockedOn===null&&Ui.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(o=0;o<r.length;o+=3){var f=r[o],p=r[o+1],S=f[bt]||null;if(typeof p=="function")S||kx(r);else if(S){var E=null;if(p&&p.hasAttribute("formAction")){if(f=p,S=p[bt]||null)E=S.formAction;else if(jd(f)!==null)continue}else E=S.action;typeof E=="function"?r[o+1]=E:(r.splice(o,3),o-=3),kx(r)}}}function jx(){function e(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(S){return f=S})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),o||setTimeout(r,20)}function r(){if(!o&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(r,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function Dd(e){this._internalRoot=e}bu.prototype.render=Dd.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(a(409));var r=n.current,o=Qn();yx(r,o,e,n,null,null)},bu.prototype.unmount=Dd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;yx(e.current,2,null,e,null,null),Zo(),n[an]=null}};function bu(e){this._internalRoot=e}bu.prototype.unstable_scheduleHydration=function(e){if(e){var n=Yt();e={blockedOn:null,target:e,priority:n};for(var r=0;r<Ui.length&&n!==0&&n<Ui[r].priority;r++);Ui.splice(r,0,e),r===0&&Ex(e)}};var Mx=l.version;if(Mx!=="19.2.6")throw Error(a(527,Mx,"19.2.6"));R.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(a(188)):(e=Object.keys(e).join(","),Error(a(268,e)));return e=h(n),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var Jv={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:C,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yu.isDisabled&&yu.supportsFiber)try{Le=yu.inject(Jv),et=yu}catch{}}return Ms.createRoot=function(e,n){if(!u(e))throw Error(a(299));var r=!1,o="",f=Rp,p=Lp,S=zp;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(p=n.onCaughtError),n.onRecoverableError!==void 0&&(S=n.onRecoverableError)),n=gx(e,1,!1,null,null,r,o,null,f,p,S,jx),e[an]=n.current,fd(e),new Dd(n)},Ms.hydrateRoot=function(e,n,r){if(!u(e))throw Error(a(299));var o=!1,f="",p=Rp,S=Lp,E=zp,z=null;return r!=null&&(r.unstable_strictMode===!0&&(o=!0),r.identifierPrefix!==void 0&&(f=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(S=r.onCaughtError),r.onRecoverableError!==void 0&&(E=r.onRecoverableError),r.formState!==void 0&&(z=r.formState)),n=gx(e,1,!0,n,r??null,o,f,z,p,S,E,jx),n.context=bx(null),r=n.current,o=Qn(),o=rn(o),f=ki(o),f.callback=null,ji(r,f,o),r=o,n.current.lanes=r,gt(n,r),Dl(n),e[an]=n.current,fd(e),new bu(n)},Ms.version="19.2.6",Ms}var $x;function rS(){if($x)return Bd.exports;$x=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(),Bd.exports=iS(),Bd.exports}var aS=rS();const sS=Zu(aS),oS=/\sid="(\S+)"/g,Ix=new Map;function uS(t){t=t.replace(/[0-9]+$/,"")||"a";const l=Ix.get(t)||0;return Ix.set(t,l+1),l?`${t}${l}`:t}function cS(t){const l=[];let i;for(;i=oS.exec(t);)l.push(i[1]);if(!l.length)return t;const a="suffix"+(Math.random()*16777216|Date.now()).toString(16);return l.forEach(u=>{const s=uS(u),c=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+s+a+"$3")}),t=t.replace(new RegExp(a,"g"),""),t}const fS=Object.freeze({left:0,top:0,width:16,height:16}),zu=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),K1=Object.freeze({...fS,...zu}),dS=Object.freeze({...K1,body:"",hidden:!1}),hS=/(-?[0-9.]*[0-9]+[0-9.]*)/g,mS=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function $u(t,l,i){if(l===1)return t;if(i=i||100,typeof t=="number")return Math.ceil(t*l*i)/i;if(typeof t!="string")return t;const a=t.split(hS);if(a===null||!a.length)return t;const u=[];let s=a.shift(),c=mS.test(s);for(;;){if(c){const d=parseFloat(s);isNaN(d)?u.push(s):u.push(Math.ceil(d*l*i)/i)}else u.push(s);if(s=a.shift(),s===void 0)return u.join("");c=!c}}const pS=Object.freeze({width:null,height:null}),xS=Object.freeze({...pS,...zu});function gS(t,l="defs"){let i="";const a=t.indexOf("<"+l);for(;a>=0;){const u=t.indexOf(">",a),s=t.indexOf("</"+l);if(u===-1||s===-1)break;const c=t.indexOf(">",s);if(c===-1)break;i+=t.slice(u+1,s).trim(),t=t.slice(0,a).trim()+t.slice(c+1)}return{defs:i,content:t}}function bS(t,l){return t?"<defs>"+t+"</defs>"+l:l}function yS(t,l,i){const a=gS(t);return bS(a.defs,l+a.content+i)}const vS=t=>t==="unset"||t==="undefined"||t==="none";function SS(t,l){const i={...K1,...t},a={...xS,...l},u={left:i.left,top:i.top,width:i.width,height:i.height};let s=i.body;[i,a].forEach(k=>{const _=[],j=k.hFlip,B=k.vFlip;let $=k.rotate;j?B?$+=2:(_.push("translate("+(u.width+u.left).toString()+" "+(0-u.top).toString()+")"),_.push("scale(-1 1)"),u.top=u.left=0):B&&(_.push("translate("+(0-u.left).toString()+" "+(u.height+u.top).toString()+")"),_.push("scale(1 -1)"),u.top=u.left=0);let ne;switch($<0&&($-=Math.floor($/4)*4),$=$%4,$){case 1:ne=u.height/2+u.top,_.unshift("rotate(90 "+ne.toString()+" "+ne.toString()+")");break;case 2:_.unshift("rotate(180 "+(u.width/2+u.left).toString()+" "+(u.height/2+u.top).toString()+")");break;case 3:ne=u.width/2+u.left,_.unshift("rotate(-90 "+ne.toString()+" "+ne.toString()+")");break}$%2===1&&(u.left!==u.top&&(ne=u.left,u.left=u.top,u.top=ne),u.width!==u.height&&(ne=u.width,u.width=u.height,u.height=ne)),_.length&&(s=yS(s,'<g transform="'+_.join(" ")+'">',"</g>"))});const c=a.width,d=a.height,x=u.width,h=u.height;let g,b;c===null?(b=d===null?"1em":d==="auto"?h:d,g=$u(b,x/h)):(g=c==="auto"?x:c,b=d===null?$u(g,h/x):d==="auto"?h:d);const y={},v=(k,_)=>{vS(_)||(y[k]=_.toString())};v("width",g),v("height",b);const N=[u.left,u.top,x,h];return y.viewBox=N.join(" "),{attributes:y,viewBox:N,body:s}}function Hx(t){return cS(typeof t=="string"?t:SS(t).body)}let $s;function NS(){try{$s=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{$s=null}}function wS(t){return $s===void 0&&NS(),$s?$s.createHTML(t):t}function CS(t){return`${t.left??0} ${t.top??0} ${t.width} ${t.height}`}function ES(t,l,i){const a=typeof i=="object"?CS(i):void 0,u=typeof i=="number"?i:i.width/i.height;return t&&l?{width:t,height:l,viewBox:a}:l?{width:$u(l,u),height:l,viewBox:a}:t?{width:t,height:$u(t,1/u),viewBox:a}:{viewBox:a}}const Nh=Object.create(null),AS=Object.create(null);function kS(t,l){Nh[t]=l}function jS(t,l){return t?Nh[t]:AS[l]||Nh[""]}const Ld=new Set;let zd=!1;function Ux(t){try{const l=t();l instanceof Promise&&l.catch(i=>{console.error(i)})}catch(l){console.error(l)}}function Z1(t,l=!1){if(l){Ux(t);return}Ld.add(t),zd||(zd=!0,setTimeout(()=>{zd=!1;const i=Array.from(Ld);Ld.clear(),i.forEach(Ux)}))}function MS(){const t=new Set;let l=!1;const i=Object.create(null),a=new Set,u=new Set,s=[];function c(d,x){if(u.delete(d),x){if(i[d]===x)return;i[d]=x,a.delete(d)}else{if(a.has(d))return;delete i[d],a.add(d)}t.add(d),l||(l=!0,setTimeout(()=>{l=!1,s.forEach(h=>{for(const g of h.names)if(g==="*"||t.has(g)){Z1(h.callback);return}}),t.clear()}))}return{icons:i,missing:a,pending:u,subscribers:s,update:c}}const Gx=Object.create(null);function Uh(t,l){const i=Gx[t]||(Gx[t]=Object.create(null));return i[l]||(i[l]=MS())}function DS(t,l){const i={};!t.hFlip!=!l.hFlip&&(i.hFlip=!0),!t.vFlip!=!l.vFlip&&(i.vFlip=!0);const a=((t.rotate||0)+(l.rotate||0))%4;return a&&(i.rotate=a),i}function qx(t,l){const i=DS(t,l);for(const a in dS)a in zu?a in t&&!(a in i)&&(i[a]=zu[a]):a in l?i[a]=l[a]:a in t&&(i[a]=t[a]);return i}function TS(t,l){const i=t.icons,a=t.aliases||Object.create(null),u=Object.create(null);function s(c){if(i[c])return u[c]=[];if(!(c in u)){u[c]=null;const d=a[c]&&a[c].parent,x=d&&s(d);x&&(u[c]=[d].concat(x))}return u[c]}return Object.keys(i).concat(Object.keys(a)).forEach(s),u}function OS(t,l,i){const a=t.icons,u=t.aliases||Object.create(null);let s={};function c(d){s=qx(a[d]||u[d],s)}return c(l),i.forEach(c),qx(t,s)}function BS(t,l){const i=[];if(typeof t!="object"||typeof t.icons!="object")return i;t.not_found instanceof Array&&t.not_found.forEach(u=>{l(u,null),i.push(u)});const a=TS(t);for(const u in a){const s=a[u];s&&(l(u,OS(t,u,s)),i.push(u))}return i}function _S(t,l=""){const i=new Set,a=Uh(l,t.prefix);return BS(t,(u,s)=>{a.update(u,s),i.add(u)}),i}const W1=/^[a-z0-9]+(-[a-z0-9]+)*$/,eb=(t,l,i,a="")=>{const u=t.split(":");if(t.slice(0,1)==="@"){if(u.length<2||u.length>3)return null;a=u.shift().slice(1)}if(u.length>3||!u.length)return null;if(u.length>1){const d=u.pop(),x=u.pop();return{provider:u.length>0?u[0]:a,prefix:x,name:d}}const c=u[0].split("-");return c.length>1?{provider:a,prefix:c.shift(),name:c.join("-")}:null},Px=new Map,FS=750;let RS=fetch;function LS(t,l,i,a){const u=t.join(","),s=Px.get(u)||0,c=t.length;a=a||new AbortController,i=i||{},i.signal=a.signal;const d=[];for(let x=0;x<c;x++){const h=x,g=(s+h)%c,b=`${t[g]}${l}`,y=async()=>{for(let k=0;k<h;k++)if(await new Promise(_=>setTimeout(_,FS)),a.signal.aborted)throw new Error("Fetch aborted");const v=await RS(b,i);if(!v.ok)throw new Error(`HTTP error! status: ${v.status}`);const N=await v.json();return Px.set(u,g),a.abort(),N};d.push(y())}return Promise.any(d)}function zS(t,l,i=!0){const a=Array.isArray(t)?t:[t],u=i&&(typeof window>"u"||!window.document);return{maxCount:32,maxLength:480,validateNames:!0,hosts:a,loadIcons:async(s,c)=>u||!W1.test(c)?{prefix:c,icons:Object.create(null),not_found:s}:await LS(a,`/${c}.json?icons=${s.join(",")}`,l)}}function $S(t,l){for(const i in l){const a=l[i],u=t[i]||(t[i]=Object.create(null));for(const s in a){const c=a[s];u[s]?.length?u[s]=Array.from(new Set([...c,...u[s]])):u[s]=c.slice(0)}}}function IS(t,l){const i=Object.create(null);for(const a of t){const u=typeof a=="string"?eb(a):a;if(u){const s=i[u.provider]||(i[u.provider]=Object.create(null)),c=s[u.prefix]||(s[u.prefix]=[]);c.includes(u.name)||c.push(u.name)}}return i}function HS(t,l){const{maxCount:i,maxLength:a}=l;t.sort((d,x)=>d.localeCompare(x));const u=[];let s=[],c=0;for(const d of t){const x=d.length+1;c&&(a&&c+x>a||i&&s.length>=i)&&(u.push(s),s=[],c=0),c+=x,s.push(d)}return s.length>0&&u.push(s),u}let wh=Object.create(null);function US(){const t=wh;wh=Object.create(null);for(const l in t){const i=t[l];for(const a in i){const u=i[a];if(u.length){const s=Uh(l,a),c=jS(l,a),d=c?.allowReload??!1,x=c?.validateNames??!0,h=[];if(u.forEach(g=>{if(!s.pending.has(g)&&!((s.icons[g]||s.missing.has(g))&&!d)){if(!c||x&&!W1.test(g)){s.update(g,null);return}h.push(g),s.pending.add(g)}}),c&&h.length){const g=[];if("loadIcon"in c)for(const b of h)g.push(new Promise(y=>{c.loadIcon(b,l,a).then(v=>{s.update(b,v),y()}).catch(()=>{s.update(b,null),y()})}));else{const b=HS(h,c);for(const y of b){const v=N=>{const k=N?_S(N,l):new Set;for(const _ of y)k.has(_)||s.update(_,null)};g.push(new Promise(N=>{c.loadIcons(y,a,l).then(k=>{v(k),N()}).catch(()=>{v(),N()})}))}}Promise.all(g).catch(console.error)}}}}}function GS(t,l=!1){const i=Array.isArray(t)?IS(t):t;$S(wh,i),Z1(US,l)}function Ch(t,l){const i=t.subscribers.findIndex(a=>a.key===l);i!==-1&&t.subscribers.splice(i,1)}function qS(t,l,i,a){a&&Ch(t,a),a=a||Symbol();const u={key:a,names:new Set(l),callback:i};return t.subscribers.push(u),a}function PS(t,l){const i=Symbol();let a=!1,u=!1,s=null,c=null,d;const x=()=>{if(!c||!s){d!==null&&(d=null,u&&l(null));return}const g=s.name,b=c.icons[g]||(c.missing.has(g)?null:void 0);b===void 0&&!c.pending.has(g)&&GS({[s.provider]:{[s.prefix]:[g]}}),d!==b&&(d=b,u&&l(d))},h=g=>{if(a)return;c&&Ch(c,i);const b=typeof g=="string"?eb(g):{...g};if(b&&"body"in b){s=null,d=b,c=null;return}s=b,s?(c=Uh(s.provider,s.prefix),qS(c,[s.name],x),x()):(c=null,x())};return h(t),u=!0,{unsubscribe:()=>{a=!0,c&&Ch(c,i)},change:h,data:d}}function VS(){try{return window.CSS.supports('d: path("M0 0")')}catch{return!0}}const YS=VS();kS("",zS(["https://api.iconify.design","https://api.simplesvg.com","https://api.unisvg.com"]));function Gt({content:t,fallback:l,width:i,height:a,viewBox:u,...s}){const[c,d]=w.useState(null),[x,h]=w.useState(null),g=w.useMemo(()=>Hx(t||""),[t]),b=w.useMemo(()=>YS&&t?"":l||"",[t,l]);w.useEffect(()=>{const k=PS(b,d);return d(k.data),h(k),k.unsubscribe},[]),w.useEffect(()=>{x?.change(b)},[b]);const y=w.useMemo(()=>c?Hx(c):"",[c]),v=w.useMemo(()=>ES(i,a,u),[i,a,u]),N=w.useMemo(()=>({__html:wS(y||g)}),[y,g]);return w.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",...v,...s,dangerouslySetInnerHTML:N})}const QS={width:24,height:24};function JS({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:QS,content:'<g class="nrj6p8qat"><rect class="gufd03s5p"/><rect class="y2ls4efbx"/><rect class="td4pmbm2c"/><rect class="velahuttd"/></g>',fallback:"lucide:layout-grid"})}const XS={width:24,height:24};function KS({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:XS,content:'<path class="e07hgxwrx"/>',fallback:"lucide:list"})}const On="block w-full min-w-0 max-w-full overflow-auto border border-[#29414f] bg-[rgba(18,31,38,0.9)] px-2 py-2 text-[var(--text)] shadow-[inset_0_1px_0_rgba(255,255,255,0.03)] outline-none transition-[border-color,background-color,box-shadow] focus-visible:border-[#3b5868] focus-visible:bg-[rgba(24,39,47,0.92)] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[var(--live)] focus-visible:outline-offset-1",fn="block w-full min-w-0 max-w-full overflow-auto border border-[#29414f] bg-[rgba(18,31,38,0.9)] px-2 py-2 text-[var(--text)] font-[JetBrains_Mono,monospace] shadow-[inset_0_1px_0_rgba(255,255,255,0.03)] outline-none transition-[border-color,background-color,box-shadow] focus-visible:border-[#3b5868] focus-visible:bg-[rgba(24,39,47,0.92)] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[var(--live)] focus-visible:outline-offset-1",Ls="block w-full min-w-0 max-w-full overflow-auto border border-[#29414f] bg-[rgba(12,21,27,0.96)] px-2 py-2 text-[var(--text)] font-[JetBrains_Mono,monospace] shadow-[inset_0_1px_0_rgba(255,255,255,0.025)] outline-none transition-[border-color,background-color,box-shadow] focus-visible:border-[#3b5868] focus-visible:bg-[rgba(16,27,34,0.98)] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[var(--live)] focus-visible:outline-offset-1",$d="block w-full min-w-0 max-w-full overflow-hidden border border-[#29414f] bg-[rgba(18,31,38,0.9)] px-2 py-2 text-ellipsis whitespace-nowrap text-[var(--text)] shadow-[inset_0_1px_0_rgba(255,255,255,0.03)] outline-none transition-[border-color,background-color,box-shadow] focus-visible:border-[#3b5868] focus-visible:bg-[rgba(24,39,47,0.92)] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[var(--live)] focus-visible:outline-offset-1",Eh="block w-full min-w-0 max-w-full overflow-hidden border border-[#29414f] bg-[rgba(18,31,38,0.9)] px-2 py-2 text-ellipsis whitespace-nowrap text-[var(--text)] font-[JetBrains_Mono,monospace] shadow-[inset_0_1px_0_rgba(255,255,255,0.03)] outline-none transition-[border-color,background-color,box-shadow] focus-visible:border-[#3b5868] focus-visible:bg-[rgba(24,39,47,0.92)] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[var(--live)] focus-visible:outline-offset-1",Iu="block w-full min-w-full max-w-full resize-y overflow-auto overflow-wrap-anywhere break-words border border-[#29414f] bg-[rgba(18,31,38,0.9)] px-2 py-2 text-[var(--text)] font-[JetBrains_Mono,monospace] shadow-[inset_0_1px_0_rgba(255,255,255,0.03)] outline-none transition-[border-color,background-color,box-shadow] focus-visible:border-[#3b5868] focus-visible:bg-[rgba(24,39,47,0.92)] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[var(--live)] focus-visible:outline-offset-1",Is="fixed inset-0 z-[var(--z-modal-mask)] bg-[rgba(5,10,14,0.62)] transition-opacity duration-200",Hs="pointer-events-auto opacity-100",Bu="pointer-events-none opacity-0",Us="fixed inset-0 z-[var(--z-modal)] grid place-items-center transition-opacity duration-200",Gs="pointer-events-auto opacity-100",_u="pointer-events-none opacity-0",Wu="overflow-auto border border-[var(--line)] bg-[linear-gradient(180deg,var(--panel)_0%,var(--panel-2)_100%)] ",Xn="inline-flex h-8 w-8 appearance-none items-center justify-center rounded-none border-0 bg-transparent p-0 text-[var(--text)] shadow-none outline-none transition-[background-color,color] hover:bg-[rgba(142,163,179,0.08)] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[var(--live)] focus-visible:outline-offset-1",Ol="m-0 mx-3 mb-[10px] text-xs text-[var(--muted)]",ZS=t=>t.trim().toLowerCase();function WS(t,l){const i=ZS(l);return i?t.filter(a=>[a.id,a.role,a.outputPreview,a.eventPreview].join(" ").toLowerCase().includes(i)):t}const ri="font-[JetBrains_Mono,monospace]",Vx="inline-flex w-fit items-center rounded-none px-2 py-[2px] text-[12px] uppercase",Yx={busy:"bg-[rgba(255,184,77,0.16)] text-[var(--warn)]",idle:"bg-[rgba(50,215,186,0.15)] text-[var(--live)]"},Qx="mt-0 inline-flex h-8 items-center justify-center border border-(--line) bg-[rgba(15,23,29,0.6)] px-3 text-xs text-(--text) hover:bg-[rgba(19,34,43,0.82)]",Jx="mt-0 inline-flex h-8 items-center justify-center border border-(--live-25) bg-[rgba(50,215,186,0.1)] px-3 text-xs font-semibold text-(--live) hover:bg-[rgba(50,215,186,0.18)]",eN="mt-0 inline-flex h-8 w-8 items-center justify-center border border-(--line) bg-[rgba(15,23,29,0.6)] text-(--text) hover:bg-[rgba(19,34,43,0.82)]",tN="inline-flex h-8 items-stretch overflow-hidden border border-(--line) bg-[rgba(15,23,29,0.6)]",Id="mt-0 inline-flex h-full appearance-none items-center justify-center border-0 border-r border-(--line) bg-transparent px-3 text-xs text-(--text) last:border-r-0 hover:bg-[rgba(19,34,43,0.82)]",Hd="!bg-[rgba(50,215,186,0.2)] !text-(--live) font-semibold shadow-[inset_0_0_0_1px_rgba(50,215,186,0.45)]",vu="bg-[rgba(9,15,21,0.1)] [background-image:repeating-linear-gradient(-45deg,rgba(150,170,190,0.07)_0,rgba(150,170,190,0.07)_2px,transparent_2px,transparent_8px)]";function nN({agents:t,onOpenAgentSession:l,onOpenAgentOutput:i}){const[a,u]=w.useState(""),[s,c]=w.useState("all"),[d,x]=w.useState("card"),h=w.useMemo(()=>{const g=WS(t,a);return s==="all"?g:g.filter(b=>b.workStatus===s)},[t,a,s]);return m.jsxs("section",{"data-center-card":!0,"data-agent-card":!0,className:"grid min-h-0 min-w-0 flex-1 grid-rows-[auto_minmax(0,1fr)] overflow-hidden",children:[m.jsx("div",{className:`flex h-[66px] items-center border-b border-(--line) ${vu}`,children:m.jsxs("div",{className:"flex w-full items-center gap-0 overflow-hidden px-8",children:[m.jsx("input",{className:`${On} m-0 h-8 min-w-[260px] flex-[1_1_420px] py-0 leading-none`,value:a,onChange:g=>u(g.target.value),placeholder:"搜索智能体(ID/角色/输出/事件)","aria-label":"搜索智能体"}),m.jsx("span",{className:`${vu} h-8 w-4 shrink-0`,"aria-hidden":"true"}),m.jsxs("div",{className:tN,role:"group","aria-label":"智能体状态筛选",children:[m.jsx("button",{type:"button",className:`${Id} ${s==="all"?Hd:""}`,onClick:()=>c("all"),children:"全部"}),m.jsx("button",{type:"button",className:`${Id} ${s==="busy"?Hd:""}`,onClick:()=>c("busy"),children:"忙碌"}),m.jsx("button",{type:"button",className:`${Id} ${s==="idle"?Hd:""}`,onClick:()=>c("idle"),children:"空闲"})]}),m.jsx("span",{className:`${vu} h-8 w-4 shrink-0`,"aria-hidden":"true"}),m.jsx("button",{type:"button",className:eN,onClick:()=>x(g=>g==="card"?"list":"card"),"aria-label":d==="card"?"切换为列表视图":"切换为卡片视图",title:d==="card"?"切换为列表视图":"切换为卡片视图",children:d==="card"?m.jsx(KS,{className:"h-4 w-4"}):m.jsx(JS,{className:"h-4 w-4"})}),m.jsx("span",{className:`${vu} h-8 w-4 shrink-0`,"aria-hidden":"true"}),m.jsxs("span",{className:`${ri} ml-auto text-xs text-(--muted)`,children:[h.length,"/",t.length]})]})}),m.jsx("div",{className:"min-h-0 overflow-y-auto",children:h.length&&d==="card"?m.jsx("ul",{className:"m-0 grid list-none grid-cols-[repeat(auto-fill,minmax(310px,1fr))] gap-3 p-3",children:h.map(g=>m.jsx("li",{className:"m-0 min-w-0",children:m.jsxs("div",{className:"grid min-h-[238px] grid-rows-[auto_auto_1fr_auto] gap-2 border border-[#29414f] bg-[linear-gradient(180deg,rgba(18,31,38,0.92)_0%,rgba(14,24,30,0.92)_100%)] p-3 text-left text-(--text)",role:"button",tabIndex:0,onClick:()=>l(g.id),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),l(g.id))},children:[m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsx("strong",{className:"truncate text-sm",children:g.id}),m.jsx("span",{className:`${Vx} ${Yx[g.workStatus==="busy"?"busy":"idle"]}`,children:g.workStatus==="busy"?"忙碌":"空闲"})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[m.jsxs("div",{className:"border border-(--line) bg-[rgba(10,18,24,0.65)] px-2 py-1.5",children:[m.jsx("p",{className:"m-0 text-[10px] text-(--muted)",children:"角色"}),m.jsx("p",{className:`${ri} m-0 mt-0.5 truncate text-xs text-(--text)`,children:g.role})]}),m.jsxs("div",{className:"border border-(--line) bg-[rgba(10,18,24,0.65)] px-2 py-1.5",children:[m.jsx("p",{className:"m-0 text-[10px] text-(--muted)",children:"最近节点"}),m.jsx("p",{className:`${ri} m-0 mt-0.5 truncate text-xs text-(--text)`,children:g.lastExecution?.nodeId??"-"})]})]}),m.jsxs("div",{className:"grid content-start gap-1 border border-(--line) bg-[rgba(10,18,24,0.65)] p-2",children:[m.jsx("small",{className:`${ri} text-xs text-(--muted)`,children:"成功输出"}),m.jsx("p",{className:"m-0 min-h-[calc(1.35em*2)] overflow-hidden text-xs leading-[1.35] text-[var(--muted)] [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2] break-words",children:g.outputPreview||"暂无输出内容"}),m.jsx("small",{className:`${ri} text-xs text-(--muted)`,children:"事件"}),m.jsx("p",{className:"m-0 min-h-[calc(1.35em*2)] overflow-hidden text-xs leading-[1.35] text-[var(--muted)] [display:-webkit-box] [-webkit-box-orient:vertical] [-webkit-line-clamp:2] break-words",children:g.eventPreview||"暂无相关事件"})]}),m.jsxs("div",{className:"mt-auto grid gap-2 border-t border-(--line) pt-2",children:[m.jsx("small",{className:`${ri} self-end text-xs leading-[1.2] text-[var(--muted)]`,children:g.lastActiveAt?new Date(g.lastActiveAt).toLocaleString("zh-CN",{hour12:!1}):"-"}),m.jsxs("div",{className:"flex items-center justify-end gap-2",children:[m.jsx("button",{className:Qx,type:"button",onClick:b=>{b.stopPropagation(),i(g.id)},children:"查看输出"}),m.jsx("button",{className:Jx,type:"button",onClick:b=>{b.stopPropagation(),l(g.id)},children:"打开会话"})]})]})]})},g.id))}):h.length&&d==="list"?m.jsx("div",{className:"px-0 py-0",children:m.jsx("ul",{className:"m-0 list-none p-0",children:h.map(g=>m.jsxs("li",{className:"grid cursor-pointer grid-cols-[minmax(140px,220px)_96px_minmax(160px,1fr)_minmax(120px,1fr)_170px_auto] items-center gap-2 border-b border-(--line) px-2.5 py-2 text-sm text-(--text) transition-colors hover:bg-[rgba(19,34,43,0.55)] last:border-b-0",role:"button",tabIndex:0,onClick:()=>l(g.id),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),l(g.id))},children:[m.jsxs("div",{className:"min-w-0",children:[m.jsx("p",{className:"m-0 truncate font-semibold",children:g.id}),m.jsx("p",{className:`${ri} m-0 mt-0.5 truncate text-xs text-(--muted)`,children:g.role})]}),m.jsx("span",{className:`${Vx} ${Yx[g.workStatus==="busy"?"busy":"idle"]}`,children:g.workStatus==="busy"?"忙碌":"空闲"}),m.jsx("p",{className:"m-0 truncate text-xs text-(--muted)",children:g.outputPreview||"暂无输出内容"}),m.jsx("p",{className:"m-0 truncate text-xs text-(--muted)",children:g.eventPreview||"暂无相关事件"}),m.jsx("p",{className:`${ri} m-0 text-xs text-(--muted)`,children:g.lastActiveAt?new Date(g.lastActiveAt).toLocaleString("zh-CN",{hour12:!1}):"-"}),m.jsxs("div",{className:"flex items-center justify-end gap-2",children:[m.jsx("button",{className:Qx,type:"button",onClick:b=>{b.stopPropagation(),i(g.id)},children:"查看输出"}),m.jsx("button",{className:Jx,type:"button",onClick:b=>{b.stopPropagation(),l(g.id)},children:"打开会话"})]})]},g.id))})}):m.jsx("p",{className:`${ri} m-0 px-3 pt-3 pb-2 text-[var(--muted)]`,children:"未匹配到智能体"})})]})}function lN(t,l){const i={};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const iN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,aN={};function Xx(t,l){return(aN.jsx?rN:iN).test(t)}const sN=/[ \t\n\f\r]/g;function oN(t){return typeof t=="object"?t.type==="text"?Kx(t.value):!1:Kx(t)}function Kx(t){return t.replace(sN,"")===""}class Ks{constructor(l,i,a){this.normal=i,this.property=l,a&&(this.space=a)}}Ks.prototype.normal={};Ks.prototype.property={};Ks.prototype.space=void 0;function tb(t,l){const i={},a={};for(const u of t)Object.assign(i,u.property),Object.assign(a,u.normal);return new Ks(i,a,l)}function Ah(t){return t.toLowerCase()}class In{constructor(l,i){this.attribute=i,this.property=l}}In.prototype.attribute="";In.prototype.booleanish=!1;In.prototype.boolean=!1;In.prototype.commaOrSpaceSeparated=!1;In.prototype.commaSeparated=!1;In.prototype.defined=!1;In.prototype.mustUseProperty=!1;In.prototype.number=!1;In.prototype.overloadedBoolean=!1;In.prototype.property="";In.prototype.spaceSeparated=!1;In.prototype.space=void 0;let uN=0;const We=Or(),ln=Or(),kh=Or(),be=Or(),Rt=Or(),Da=Or(),Jn=Or();function Or(){return 2**++uN}const jh=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:ln,commaOrSpaceSeparated:Jn,commaSeparated:Da,number:be,overloadedBoolean:kh,spaceSeparated:Rt},Symbol.toStringTag,{value:"Module"})),Ud=Object.keys(jh);class Gh extends In{constructor(l,i,a,u){let s=-1;if(super(l,i),Zx(this,"space",u),typeof a=="number")for(;++s<Ud.length;){const c=Ud[s];Zx(this,Ud[s],(a&jh[c])===jh[c])}}}Gh.prototype.defined=!0;function Zx(t,l,i){i&&(t[l]=i)}function Oa(t){const l={},i={};for(const[a,u]of Object.entries(t.properties)){const s=new Gh(a,t.transform(t.attributes||{},a),u,t.space);t.mustUseProperty&&t.mustUseProperty.includes(a)&&(s.mustUseProperty=!0),l[a]=s,i[Ah(a)]=a,i[Ah(s.attribute)]=a}return new Ks(l,i,t.space)}const nb=Oa({properties:{ariaActiveDescendant:null,ariaAtomic:ln,ariaAutoComplete:null,ariaBusy:ln,ariaChecked:ln,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:Rt,ariaCurrent:null,ariaDescribedBy:Rt,ariaDetails:null,ariaDisabled:ln,ariaDropEffect:Rt,ariaErrorMessage:null,ariaExpanded:ln,ariaFlowTo:Rt,ariaGrabbed:ln,ariaHasPopup:null,ariaHidden:ln,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Rt,ariaLevel:be,ariaLive:null,ariaModal:ln,ariaMultiLine:ln,ariaMultiSelectable:ln,ariaOrientation:null,ariaOwns:Rt,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:ln,ariaReadOnly:ln,ariaRelevant:null,ariaRequired:ln,ariaRoleDescription:Rt,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:ln,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(t,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function lb(t,l){return l in t?t[l]:l}function ib(t,l){return lb(t,l.toLowerCase())}const cN=Oa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Da,acceptCharset:Rt,accessKey:Rt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:Rt,autoFocus:We,autoPlay:We,blocking:Rt,capture:null,charSet:null,checked:We,cite:null,className:Rt,cols:be,colSpan:null,content:null,contentEditable:ln,controls:We,controlsList:Rt,coords:be|Da,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:kh,draggable:ln,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:Rt,height:be,hidden:kh,high:be,href:null,hrefLang:null,htmlFor:Rt,httpEquiv:Rt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:Rt,itemRef:Rt,itemScope:We,itemType:Rt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:We,optimum:be,pattern:null,ping:Rt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:Rt,required:We,reversed:We,rows:be,rowSpan:be,sandbox:Rt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:ln,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:ln,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Rt,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:ln,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:We,disableRemotePlayback:We,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:ib}),fN=Oa({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Jn,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:Rt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Da,g2:Da,glyphName:Da,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:Jn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:be,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Rt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Jn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Jn,rev:Jn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Jn,requiredFeatures:Jn,requiredFonts:Jn,requiredFormats:Jn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:Jn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Jn,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Jn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:lb}),rb=Oa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,l){return"xlink:"+l.slice(5).toLowerCase()}}),ab=Oa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ib}),sb=Oa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),dN={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},hN=/[A-Z]/g,Wx=/-[a-z]/g,mN=/^data[-\w.:]+$/i;function pN(t,l){const i=Ah(l);let a=l,u=In;if(i in t.normal)return t.property[t.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&mN.test(l)){if(l.charAt(4)==="-"){const s=l.slice(5).replace(Wx,gN);a="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=l.slice(4);if(!Wx.test(s)){let c=s.replace(hN,xN);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}u=Gh}return new u(a,l)}function xN(t){return"-"+t.toLowerCase()}function gN(t){return t.charAt(1).toUpperCase()}const bN=tb([nb,cN,rb,ab,sb],"html"),qh=tb([nb,fN,rb,ab,sb],"svg");function yN(t){return t.join(" ").trim()}var ba={},Gd,eg;function vN(){if(eg)return Gd;eg=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,u=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,x=`
|
|
10
|
+
`,h="/",g="*",b="",y="comment",v="declaration";function N(_,j){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];j=j||{};var B=1,$=1;function ne(oe){var le=oe.match(l);le&&(B+=le.length);var C=oe.lastIndexOf(x);$=~C?oe.length-C:$+oe.length}function se(){var oe={line:B,column:$};return function(le){return le.position=new I(oe),Y(),le}}function I(oe){this.start=oe,this.end={line:B,column:$},this.source=j.source}I.prototype.content=_;function T(oe){var le=new Error(j.source+":"+B+":"+$+": "+oe);if(le.reason=oe,le.filename=j.source,le.line=B,le.column=$,le.source=_,!j.silent)throw le}function P(oe){var le=oe.exec(_);if(le){var C=le[0];return ne(C),_=_.slice(C.length),le}}function Y(){P(i)}function D(oe){var le;for(oe=oe||[];le=X();)le!==!1&&oe.push(le);return oe}function X(){var oe=se();if(!(h!=_.charAt(0)||g!=_.charAt(1))){for(var le=2;b!=_.charAt(le)&&(g!=_.charAt(le)||h!=_.charAt(le+1));)++le;if(le+=2,b===_.charAt(le-1))return T("End of comment missing");var C=_.slice(2,le-2);return $+=2,ne(C),_=_.slice(le),$+=2,oe({type:y,comment:C})}}function K(){var oe=se(),le=P(a);if(le){if(X(),!P(u))return T("property missing ':'");var C=P(s),R=oe({type:v,property:k(le[0].replace(t,b)),value:C?k(C[0].replace(t,b)):b});return P(c),R}}function U(){var oe=[];D(oe);for(var le;le=K();)le!==!1&&(oe.push(le),D(oe));return oe}return Y(),U()}function k(_){return _?_.replace(d,b):b}return Gd=N,Gd}var tg;function SN(){if(tg)return ba;tg=1;var t=ba&&ba.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(ba,"__esModule",{value:!0}),ba.default=i;const l=t(vN());function i(a,u){let s=null;if(!a||typeof a!="string")return s;const c=(0,l.default)(a),d=typeof u=="function";return c.forEach(x=>{if(x.type!=="declaration")return;const{property:h,value:g}=x;d?u(h,g,x):g&&(s=s||{},s[h]=g)}),s}return ba}var Ds={},ng;function NN(){if(ng)return Ds;ng=1,Object.defineProperty(Ds,"__esModule",{value:!0}),Ds.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,u=/^-(ms)-/,s=function(h){return!h||i.test(h)||t.test(h)},c=function(h,g){return g.toUpperCase()},d=function(h,g){return"".concat(g,"-")},x=function(h,g){return g===void 0&&(g={}),s(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(u,d):h=h.replace(a,d),h.replace(l,c))};return Ds.camelCase=x,Ds}var Ts,lg;function wN(){if(lg)return Ts;lg=1;var t=Ts&&Ts.__importDefault||function(u){return u&&u.__esModule?u:{default:u}},l=t(SN()),i=NN();function a(u,s){var c={};return!u||typeof u!="string"||(0,l.default)(u,function(d,x){d&&x&&(c[(0,i.camelCase)(d,s)]=x)}),c}return a.default=a,Ts=a,Ts}var CN=wN();const EN=Zu(CN),ob=ub("end"),Ph=ub("start");function ub(t){return l;function l(i){const a=i&&i.position&&i.position[t]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function cb(t){const l=Ph(t),i=ob(t);if(l&&i)return{start:l,end:i}}function qs(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?ig(t.position):"start"in t||"end"in t?ig(t):"line"in t||"column"in t?Mh(t):""}function Mh(t){return rg(t&&t.line)+":"+rg(t&&t.column)}function ig(t){return Mh(t&&t.start)+"-"+Mh(t&&t.end)}function rg(t){return t&&typeof t=="number"?t:1}class An extends Error{constructor(l,i,a){super(),typeof i=="string"&&(a=i,i=void 0);let u="",s={},c=!1;if(i&&("line"in i&&"column"in i?s={place:i}:"start"in i&&"end"in i?s={place:i}:"type"in i?s={ancestors:[i],place:i.position}:s={...i}),typeof l=="string"?u=l:!s.cause&&l&&(c=!0,u=l.message,s.cause=l),!s.ruleId&&!s.source&&typeof a=="string"){const x=a.indexOf(":");x===-1?s.ruleId=a:(s.source=a.slice(0,x),s.ruleId=a.slice(x+1))}if(!s.place&&s.ancestors&&s.ancestors){const x=s.ancestors[s.ancestors.length-1];x&&(s.place=x.position)}const d=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=u,this.line=d?d.line:void 0,this.name=qs(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}An.prototype.file="";An.prototype.name="";An.prototype.reason="";An.prototype.message="";An.prototype.stack="";An.prototype.column=void 0;An.prototype.line=void 0;An.prototype.ancestors=void 0;An.prototype.cause=void 0;An.prototype.fatal=void 0;An.prototype.place=void 0;An.prototype.ruleId=void 0;An.prototype.source=void 0;const Vh={}.hasOwnProperty,AN=new Map,kN=/[A-Z]/g,jN=new Set(["table","tbody","thead","tfoot","tr"]),MN=new Set(["td","th"]),fb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function DN(t,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=l.filePath||void 0;let a;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=zN(i,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=LN(i,l.jsx,l.jsxs)}const u={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:a,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?qh:bN,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},s=db(u,t,void 0);return s&&typeof s!="string"?s:u.create(t,u.Fragment,{children:s||void 0},void 0)}function db(t,l,i){if(l.type==="element")return TN(t,l,i);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return ON(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return _N(t,l,i);if(l.type==="mdxjsEsm")return BN(t,l);if(l.type==="root")return FN(t,l,i);if(l.type==="text")return RN(t,l)}function TN(t,l,i){const a=t.schema;let u=a;l.tagName.toLowerCase()==="svg"&&a.space==="html"&&(u=qh,t.schema=u),t.ancestors.push(l);const s=mb(t,l.tagName,!1),c=$N(t,l);let d=Qh(t,l);return jN.has(l.tagName)&&(d=d.filter(function(x){return typeof x=="string"?!oN(x):!0})),hb(t,c,s,l),Yh(c,d),t.ancestors.pop(),t.schema=a,t.create(l,s,c,i)}function ON(t,l){if(l.data&&l.data.estree&&t.evaluater){const a=l.data.estree.body[0];return a.type,t.evaluater.evaluateExpression(a.expression)}Qs(t,l.position)}function BN(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);Qs(t,l.position)}function _N(t,l,i){const a=t.schema;let u=a;l.name==="svg"&&a.space==="html"&&(u=qh,t.schema=u),t.ancestors.push(l);const s=l.name===null?t.Fragment:mb(t,l.name,!0),c=IN(t,l),d=Qh(t,l);return hb(t,c,s,l),Yh(c,d),t.ancestors.pop(),t.schema=a,t.create(l,s,c,i)}function FN(t,l,i){const a={};return Yh(a,Qh(t,l)),t.create(l,t.Fragment,a,i)}function RN(t,l){return l.value}function hb(t,l,i,a){typeof i!="string"&&i!==t.Fragment&&t.passNode&&(l.node=a)}function Yh(t,l){if(l.length>0){const i=l.length>1?l:l[0];i&&(t.children=i)}}function LN(t,l,i){return a;function a(u,s,c,d){const h=Array.isArray(c.children)?i:l;return d?h(s,c,d):h(s,c)}}function zN(t,l){return i;function i(a,u,s,c){const d=Array.isArray(s.children),x=Ph(a);return l(u,s,c,d,{columnNumber:x?x.column-1:void 0,fileName:t,lineNumber:x?x.line:void 0},void 0)}}function $N(t,l){const i={};let a,u;for(u in l.properties)if(u!=="children"&&Vh.call(l.properties,u)){const s=HN(t,u,l.properties[u]);if(s){const[c,d]=s;t.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&MN.has(l.tagName)?a=d:i[c]=d}}if(a){const s=i.style||(i.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return i}function IN(t,l){const i={};for(const a of l.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&t.evaluater){const s=a.data.estree.body[0];s.type;const c=s.expression;c.type;const d=c.properties[0];d.type,Object.assign(i,t.evaluater.evaluateExpression(d.argument))}else Qs(t,l.position);else{const u=a.name;let s;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&t.evaluater){const d=a.value.data.estree.body[0];d.type,s=t.evaluater.evaluateExpression(d.expression)}else Qs(t,l.position);else s=a.value===null?!0:a.value;i[u]=s}return i}function Qh(t,l){const i=[];let a=-1;const u=t.passKeys?new Map:AN;for(;++a<l.children.length;){const s=l.children[a];let c;if(t.passKeys){const x=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(x){const h=u.get(x)||0;c=x+"-"+h,u.set(x,h+1)}}const d=db(t,s,c);d!==void 0&&i.push(d)}return i}function HN(t,l,i){const a=pN(t.schema,l);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=a.commaSeparated?lN(i):yN(i)),a.property==="style"){let u=typeof i=="object"?i:UN(t,String(i));return t.stylePropertyNameCase==="css"&&(u=GN(u)),["style",u]}return[t.elementAttributeNameCase==="react"&&a.space?dN[a.property]||a.property:a.attribute,i]}}function UN(t,l){try{return EN(l,{reactCompat:!0})}catch(i){if(t.ignoreInvalidStyle)return{};const a=i,u=new An("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw u.file=t.filePath||void 0,u.url=fb+"#cannot-parse-style-attribute",u}}function mb(t,l,i){let a;if(!i)a={type:"Literal",value:l};else if(l.includes(".")){const u=l.split(".");let s=-1,c;for(;++s<u.length;){const d=Xx(u[s])?{type:"Identifier",name:u[s]}:{type:"Literal",value:u[s]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(s&&d.type==="Literal"),optional:!1}:d}a=c}else a=Xx(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(a.type==="Literal"){const u=a.value;return Vh.call(t.components,u)?t.components[u]:u}if(t.evaluater)return t.evaluater.evaluateExpression(a);Qs(t)}function Qs(t,l){const i=new An("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=fb+"#cannot-handle-mdx-estrees-without-createevaluater",i}function GN(t){const l={};let i;for(i in t)Vh.call(t,i)&&(l[qN(i)]=t[i]);return l}function qN(t){let l=t.replace(kN,PN);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function PN(t){return"-"+t.toLowerCase()}const qd={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},VN={};function Jh(t,l){const i=VN,a=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,u=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return pb(t,a,u)}function pb(t,l,i){if(YN(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(l&&"alt"in t&&t.alt)return t.alt;if("children"in t)return ag(t.children,l,i)}return Array.isArray(t)?ag(t,l,i):""}function ag(t,l,i){const a=[];let u=-1;for(;++u<t.length;)a[u]=pb(t[u],l,i);return a.join("")}function YN(t){return!!(t&&typeof t=="object")}const sg=document.createElement("i");function Xh(t){const l="&"+t+";";sg.innerHTML=l;const i=sg.textContent;return i.charCodeAt(i.length-1)===59&&t!=="semi"||i===l?!1:i}function Zn(t,l,i,a){const u=t.length;let s=0,c;if(l<0?l=-l>u?0:u+l:l=l>u?u:l,i=i>0?i:0,a.length<1e4)c=Array.from(a),c.unshift(l,i),t.splice(...c);else for(i&&t.splice(l,i);s<a.length;)c=a.slice(s,s+1e4),c.unshift(l,0),t.splice(...c),s+=1e4,l+=1e4}function ul(t,l){return t.length>0?(Zn(t,t.length,0,l),t):l}const og={}.hasOwnProperty;function xb(t){const l={};let i=-1;for(;++i<t.length;)QN(l,t[i]);return l}function QN(t,l){let i;for(i in l){const u=(og.call(t,i)?t[i]:void 0)||(t[i]={}),s=l[i];let c;if(s)for(c in s){og.call(u,c)||(u[c]=[]);const d=s[c];JN(u[c],Array.isArray(d)?d:d?[d]:[])}}}function JN(t,l){let i=-1;const a=[];for(;++i<l.length;)(l[i].add==="after"?t:a).push(l[i]);Zn(t,0,0,a)}function gb(t,l){const i=Number.parseInt(t,l);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function Sl(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Bn=Ki(/[A-Za-z]/),En=Ki(/[\dA-Za-z]/),XN=Ki(/[#-'*+\--9=?A-Z^-~]/);function Hu(t){return t!==null&&(t<32||t===127)}const Dh=Ki(/\d/),KN=Ki(/[\dA-Fa-f]/),ZN=Ki(/[!-/:-@[-`{-~]/);function Ie(t){return t!==null&&t<-2}function Bt(t){return t!==null&&(t<0||t===32)}function ot(t){return t===-2||t===-1||t===32}const ec=Ki(new RegExp("\\p{P}|\\p{S}","u")),Dr=Ki(/\s/);function Ki(t){return l;function l(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Ba(t){const l=[];let i=-1,a=0,u=0;for(;++i<t.length;){const s=t.charCodeAt(i);let c="";if(s===37&&En(t.charCodeAt(i+1))&&En(t.charCodeAt(i+2)))u=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const d=t.charCodeAt(i+1);s<56320&&d>56319&&d<57344?(c=String.fromCharCode(s,d),u=1):c="�"}else c=String.fromCharCode(s);c&&(l.push(t.slice(a,i),encodeURIComponent(c)),a=i+u+1,c=""),u&&(i+=u,u=0)}return l.join("")+t.slice(a)}function xt(t,l,i,a){const u=a?a-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(x){return ot(x)?(t.enter(i),d(x)):l(x)}function d(x){return ot(x)&&s++<u?(t.consume(x),d):(t.exit(i),l(x))}}const WN={tokenize:e2};function e2(t){const l=t.attempt(this.parser.constructs.contentInitial,a,u);let i;return l;function a(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),xt(t,l,"linePrefix")}function u(d){return t.enter("paragraph"),s(d)}function s(d){const x=t.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=x),i=x,c(d)}function c(d){if(d===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(d);return}return Ie(d)?(t.consume(d),t.exit("chunkText"),s):(t.consume(d),c)}}const t2={tokenize:n2},ug={tokenize:l2};function n2(t){const l=this,i=[];let a=0,u,s,c;return d;function d($){if(a<i.length){const ne=i[a];return l.containerState=ne[1],t.attempt(ne[0].continuation,x,h)($)}return h($)}function x($){if(a++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,u&&B();const ne=l.events.length;let se=ne,I;for(;se--;)if(l.events[se][0]==="exit"&&l.events[se][1].type==="chunkFlow"){I=l.events[se][1].end;break}j(a);let T=ne;for(;T<l.events.length;)l.events[T][1].end={...I},T++;return Zn(l.events,se+1,0,l.events.slice(ne)),l.events.length=T,h($)}return d($)}function h($){if(a===i.length){if(!u)return y($);if(u.currentConstruct&&u.currentConstruct.concrete)return N($);l.interrupt=!!(u.currentConstruct&&!u._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(ug,g,b)($)}function g($){return u&&B(),j(a),y($)}function b($){return l.parser.lazy[l.now().line]=a!==i.length,c=l.now().offset,N($)}function y($){return l.containerState={},t.attempt(ug,v,N)($)}function v($){return a++,i.push([l.currentConstruct,l.containerState]),y($)}function N($){if($===null){u&&B(),j(0),t.consume($);return}return u=u||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:u,contentType:"flow",previous:s}),k($)}function k($){if($===null){_(t.exit("chunkFlow"),!0),j(0),t.consume($);return}return Ie($)?(t.consume($),_(t.exit("chunkFlow")),a=0,l.interrupt=void 0,d):(t.consume($),k)}function _($,ne){const se=l.sliceStream($);if(ne&&se.push(null),$.previous=s,s&&(s.next=$),s=$,u.defineSkip($.start),u.write(se),l.parser.lazy[$.start.line]){let I=u.events.length;for(;I--;)if(u.events[I][1].start.offset<c&&(!u.events[I][1].end||u.events[I][1].end.offset>c))return;const T=l.events.length;let P=T,Y,D;for(;P--;)if(l.events[P][0]==="exit"&&l.events[P][1].type==="chunkFlow"){if(Y){D=l.events[P][1].end;break}Y=!0}for(j(a),I=T;I<l.events.length;)l.events[I][1].end={...D},I++;Zn(l.events,P+1,0,l.events.slice(T)),l.events.length=I}}function j($){let ne=i.length;for(;ne-- >$;){const se=i[ne];l.containerState=se[1],se[0].exit.call(l,t)}i.length=$}function B(){u.write([null]),s=void 0,u=void 0,l.containerState._closeFlow=void 0}}function l2(t,l,i){return xt(t,t.attempt(this.parser.constructs.document,l,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ta(t){if(t===null||Bt(t)||Dr(t))return 1;if(ec(t))return 2}function tc(t,l,i){const a=[];let u=-1;for(;++u<t.length;){const s=t[u].resolveAll;s&&!a.includes(s)&&(l=s(l,i),a.push(s))}return l}const Th={name:"attention",resolveAll:i2,tokenize:r2};function i2(t,l){let i=-1,a,u,s,c,d,x,h,g;for(;++i<t.length;)if(t[i][0]==="enter"&&t[i][1].type==="attentionSequence"&&t[i][1]._close){for(a=i;a--;)if(t[a][0]==="exit"&&t[a][1].type==="attentionSequence"&&t[a][1]._open&&l.sliceSerialize(t[a][1]).charCodeAt(0)===l.sliceSerialize(t[i][1]).charCodeAt(0)){if((t[a][1]._close||t[i][1]._open)&&(t[i][1].end.offset-t[i][1].start.offset)%3&&!((t[a][1].end.offset-t[a][1].start.offset+t[i][1].end.offset-t[i][1].start.offset)%3))continue;x=t[a][1].end.offset-t[a][1].start.offset>1&&t[i][1].end.offset-t[i][1].start.offset>1?2:1;const b={...t[a][1].end},y={...t[i][1].start};cg(b,-x),cg(y,x),c={type:x>1?"strongSequence":"emphasisSequence",start:b,end:{...t[a][1].end}},d={type:x>1?"strongSequence":"emphasisSequence",start:{...t[i][1].start},end:y},s={type:x>1?"strongText":"emphasisText",start:{...t[a][1].end},end:{...t[i][1].start}},u={type:x>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},t[a][1].end={...c.start},t[i][1].start={...d.end},h=[],t[a][1].end.offset-t[a][1].start.offset&&(h=ul(h,[["enter",t[a][1],l],["exit",t[a][1],l]])),h=ul(h,[["enter",u,l],["enter",c,l],["exit",c,l],["enter",s,l]]),h=ul(h,tc(l.parser.constructs.insideSpan.null,t.slice(a+1,i),l)),h=ul(h,[["exit",s,l],["enter",d,l],["exit",d,l],["exit",u,l]]),t[i][1].end.offset-t[i][1].start.offset?(g=2,h=ul(h,[["enter",t[i][1],l],["exit",t[i][1],l]])):g=0,Zn(t,a-1,i-a+3,h),i=a+h.length-g-2;break}}for(i=-1;++i<t.length;)t[i][1].type==="attentionSequence"&&(t[i][1].type="data");return t}function r2(t,l){const i=this.parser.constructs.attentionMarkers.null,a=this.previous,u=Ta(a);let s;return c;function c(x){return s=x,t.enter("attentionSequence"),d(x)}function d(x){if(x===s)return t.consume(x),d;const h=t.exit("attentionSequence"),g=Ta(x),b=!g||g===2&&u||i.includes(x),y=!u||u===2&&g||i.includes(a);return h._open=!!(s===42?b:b&&(u||!y)),h._close=!!(s===42?y:y&&(g||!b)),l(x)}}function cg(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const a2={name:"autolink",tokenize:s2};function s2(t,l,i){let a=0;return u;function u(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(v){return Bn(v)?(t.consume(v),c):v===64?i(v):h(v)}function c(v){return v===43||v===45||v===46||En(v)?(a=1,d(v)):h(v)}function d(v){return v===58?(t.consume(v),a=0,x):(v===43||v===45||v===46||En(v))&&a++<32?(t.consume(v),d):(a=0,h(v))}function x(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),l):v===null||v===32||v===60||Hu(v)?i(v):(t.consume(v),x)}function h(v){return v===64?(t.consume(v),g):XN(v)?(t.consume(v),h):i(v)}function g(v){return En(v)?b(v):i(v)}function b(v){return v===46?(t.consume(v),a=0,g):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),l):y(v)}function y(v){if((v===45||En(v))&&a++<63){const N=v===45?y:b;return t.consume(v),N}return i(v)}}const Zs={partial:!0,tokenize:o2};function o2(t,l,i){return a;function a(s){return ot(s)?xt(t,u,"linePrefix")(s):u(s)}function u(s){return s===null||Ie(s)?l(s):i(s)}}const bb={continuation:{tokenize:c2},exit:f2,name:"blockQuote",tokenize:u2};function u2(t,l,i){const a=this;return u;function u(c){if(c===62){const d=a.containerState;return d.open||(t.enter("blockQuote",{_container:!0}),d.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),s}return i(c)}function s(c){return ot(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),l):(t.exit("blockQuotePrefix"),l(c))}}function c2(t,l,i){const a=this;return u;function u(c){return ot(c)?xt(t,s,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return t.attempt(bb,l,i)(c)}}function f2(t){t.exit("blockQuote")}const yb={name:"characterEscape",tokenize:d2};function d2(t,l,i){return a;function a(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),u}function u(s){return ZN(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):i(s)}}const vb={name:"characterReference",tokenize:h2};function h2(t,l,i){const a=this;let u=0,s,c;return d;function d(b){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(b),t.exit("characterReferenceMarker"),x}function x(b){return b===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(b),t.exit("characterReferenceMarkerNumeric"),h):(t.enter("characterReferenceValue"),s=31,c=En,g(b))}function h(b){return b===88||b===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(b),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,c=KN,g):(t.enter("characterReferenceValue"),s=7,c=Dh,g(b))}function g(b){if(b===59&&u){const y=t.exit("characterReferenceValue");return c===En&&!Xh(a.sliceSerialize(y))?i(b):(t.enter("characterReferenceMarker"),t.consume(b),t.exit("characterReferenceMarker"),t.exit("characterReference"),l)}return c(b)&&u++<s?(t.consume(b),g):i(b)}}const fg={partial:!0,tokenize:p2},dg={concrete:!0,name:"codeFenced",tokenize:m2};function m2(t,l,i){const a=this,u={partial:!0,tokenize:se};let s=0,c=0,d;return x;function x(I){return h(I)}function h(I){const T=a.events[a.events.length-1];return s=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,d=I,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),g(I)}function g(I){return I===d?(c++,t.consume(I),g):c<3?i(I):(t.exit("codeFencedFenceSequence"),ot(I)?xt(t,b,"whitespace")(I):b(I))}function b(I){return I===null||Ie(I)?(t.exit("codeFencedFence"),a.interrupt?l(I):t.check(fg,k,ne)(I)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),y(I))}function y(I){return I===null||Ie(I)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),b(I)):ot(I)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),xt(t,v,"whitespace")(I)):I===96&&I===d?i(I):(t.consume(I),y)}function v(I){return I===null||Ie(I)?b(I):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),N(I))}function N(I){return I===null||Ie(I)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),b(I)):I===96&&I===d?i(I):(t.consume(I),N)}function k(I){return t.attempt(u,ne,_)(I)}function _(I){return t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),j}function j(I){return s>0&&ot(I)?xt(t,B,"linePrefix",s+1)(I):B(I)}function B(I){return I===null||Ie(I)?t.check(fg,k,ne)(I):(t.enter("codeFlowValue"),$(I))}function $(I){return I===null||Ie(I)?(t.exit("codeFlowValue"),B(I)):(t.consume(I),$)}function ne(I){return t.exit("codeFenced"),l(I)}function se(I,T,P){let Y=0;return D;function D(le){return I.enter("lineEnding"),I.consume(le),I.exit("lineEnding"),X}function X(le){return I.enter("codeFencedFence"),ot(le)?xt(I,K,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(le):K(le)}function K(le){return le===d?(I.enter("codeFencedFenceSequence"),U(le)):P(le)}function U(le){return le===d?(Y++,I.consume(le),U):Y>=c?(I.exit("codeFencedFenceSequence"),ot(le)?xt(I,oe,"whitespace")(le):oe(le)):P(le)}function oe(le){return le===null||Ie(le)?(I.exit("codeFencedFence"),T(le)):P(le)}}}function p2(t,l,i){const a=this;return u;function u(c){return c===null?i(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s)}function s(c){return a.parser.lazy[a.now().line]?i(c):l(c)}}const Pd={name:"codeIndented",tokenize:g2},x2={partial:!0,tokenize:b2};function g2(t,l,i){const a=this;return u;function u(h){return t.enter("codeIndented"),xt(t,s,"linePrefix",5)(h)}function s(h){const g=a.events[a.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(h):i(h)}function c(h){return h===null?x(h):Ie(h)?t.attempt(x2,c,x)(h):(t.enter("codeFlowValue"),d(h))}function d(h){return h===null||Ie(h)?(t.exit("codeFlowValue"),c(h)):(t.consume(h),d)}function x(h){return t.exit("codeIndented"),l(h)}}function b2(t,l,i){const a=this;return u;function u(c){return a.parser.lazy[a.now().line]?i(c):Ie(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u):xt(t,s,"linePrefix",5)(c)}function s(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):Ie(c)?u(c):i(c)}}const y2={name:"codeText",previous:S2,resolve:v2,tokenize:N2};function v2(t){let l=t.length-4,i=3,a,u;if((t[i][1].type==="lineEnding"||t[i][1].type==="space")&&(t[l][1].type==="lineEnding"||t[l][1].type==="space")){for(a=i;++a<l;)if(t[a][1].type==="codeTextData"){t[i][1].type="codeTextPadding",t[l][1].type="codeTextPadding",i+=2,l-=2;break}}for(a=i-1,l++;++a<=l;)u===void 0?a!==l&&t[a][1].type!=="lineEnding"&&(u=a):(a===l||t[a][1].type==="lineEnding")&&(t[u][1].type="codeTextData",a!==u+2&&(t[u][1].end=t[a-1][1].end,t.splice(u+2,a-u-2),l-=a-u-2,a=u+2),u=void 0);return t}function S2(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function N2(t,l,i){let a=0,u,s;return c;function c(b){return t.enter("codeText"),t.enter("codeTextSequence"),d(b)}function d(b){return b===96?(t.consume(b),a++,d):(t.exit("codeTextSequence"),x(b))}function x(b){return b===null?i(b):b===32?(t.enter("space"),t.consume(b),t.exit("space"),x):b===96?(s=t.enter("codeTextSequence"),u=0,g(b)):Ie(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),x):(t.enter("codeTextData"),h(b))}function h(b){return b===null||b===32||b===96||Ie(b)?(t.exit("codeTextData"),x(b)):(t.consume(b),h)}function g(b){return b===96?(t.consume(b),u++,g):u===a?(t.exit("codeTextSequence"),t.exit("codeText"),l(b)):(s.type="codeTextData",h(b))}}class w2{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,i){const a=i??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(l,a):l>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(l,i,a){const u=i||0;this.setCursor(Math.trunc(l));const s=this.right.splice(this.right.length-u,Number.POSITIVE_INFINITY);return a&&Os(this.left,a),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),Os(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),Os(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const i=this.left.splice(l,Number.POSITIVE_INFINITY);Os(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);Os(this.left,i.reverse())}}}function Os(t,l){let i=0;if(l.length<1e4)t.push(...l);else for(;i<l.length;)t.push(...l.slice(i,i+1e4)),i+=1e4}function Sb(t){const l={};let i=-1,a,u,s,c,d,x,h;const g=new w2(t);for(;++i<g.length;){for(;i in l;)i=l[i];if(a=g.get(i),i&&a[1].type==="chunkFlow"&&g.get(i-1)[1].type==="listItemPrefix"&&(x=a[1]._tokenizer.events,s=0,s<x.length&&x[s][1].type==="lineEndingBlank"&&(s+=2),s<x.length&&x[s][1].type==="content"))for(;++s<x.length&&x[s][1].type!=="content";)x[s][1].type==="chunkText"&&(x[s][1]._isInFirstContentOfListItem=!0,s++);if(a[0]==="enter")a[1].contentType&&(Object.assign(l,C2(g,i)),i=l[i],h=!0);else if(a[1]._container){for(s=i,u=void 0;s--;)if(c=g.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(u&&(g.get(u)[1].type="lineEndingBlank"),c[1].type="lineEnding",u=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;u&&(a[1].end={...g.get(u)[1].start},d=g.slice(u,i),d.unshift(a),g.splice(u,i-u+1,d))}}return Zn(t,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function C2(t,l){const i=t.get(l)[1],a=t.get(l)[2];let u=l-1;const s=[];let c=i._tokenizer;c||(c=a.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,x=[],h={};let g,b,y=-1,v=i,N=0,k=0;const _=[k];for(;v;){for(;t.get(++u)[1]!==v;);s.push(u),v._tokenizer||(g=a.sliceStream(v),v.next||g.push(null),b&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),b=v,v=v.next}for(v=i;++y<d.length;)d[y][0]==="exit"&&d[y-1][0]==="enter"&&d[y][1].type===d[y-1][1].type&&d[y][1].start.line!==d[y][1].end.line&&(k=y+1,_.push(k),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):_.pop(),y=_.length;y--;){const j=d.slice(_[y],_[y+1]),B=s.pop();x.push([B,B+j.length-1]),t.splice(B,2,j)}for(x.reverse(),y=-1;++y<x.length;)h[N+x[y][0]]=N+x[y][1],N+=x[y][1]-x[y][0]-1;return h}const E2={resolve:k2,tokenize:j2},A2={partial:!0,tokenize:M2};function k2(t){return Sb(t),t}function j2(t,l){let i;return a;function a(d){return t.enter("content"),i=t.enter("chunkContent",{contentType:"content"}),u(d)}function u(d){return d===null?s(d):Ie(d)?t.check(A2,c,s)(d):(t.consume(d),u)}function s(d){return t.exit("chunkContent"),t.exit("content"),l(d)}function c(d){return t.consume(d),t.exit("chunkContent"),i.next=t.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,u}}function M2(t,l,i){const a=this;return u;function u(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),xt(t,s,"linePrefix")}function s(c){if(c===null||Ie(c))return i(c);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):t.interrupt(a.parser.constructs.flow,i,l)(c)}}function Nb(t,l,i,a,u,s,c,d,x){const h=x||Number.POSITIVE_INFINITY;let g=0;return b;function b(j){return j===60?(t.enter(a),t.enter(u),t.enter(s),t.consume(j),t.exit(s),y):j===null||j===32||j===41||Hu(j)?i(j):(t.enter(a),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),k(j))}function y(j){return j===62?(t.enter(s),t.consume(j),t.exit(s),t.exit(u),t.exit(a),l):(t.enter(d),t.enter("chunkString",{contentType:"string"}),v(j))}function v(j){return j===62?(t.exit("chunkString"),t.exit(d),y(j)):j===null||j===60||Ie(j)?i(j):(t.consume(j),j===92?N:v)}function N(j){return j===60||j===62||j===92?(t.consume(j),v):v(j)}function k(j){return!g&&(j===null||j===41||Bt(j))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(a),l(j)):g<h&&j===40?(t.consume(j),g++,k):j===41?(t.consume(j),g--,k):j===null||j===32||j===40||Hu(j)?i(j):(t.consume(j),j===92?_:k)}function _(j){return j===40||j===41||j===92?(t.consume(j),k):k(j)}}function wb(t,l,i,a,u,s){const c=this;let d=0,x;return h;function h(v){return t.enter(a),t.enter(u),t.consume(v),t.exit(u),t.enter(s),g}function g(v){return d>999||v===null||v===91||v===93&&!x||v===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?i(v):v===93?(t.exit(s),t.enter(u),t.consume(v),t.exit(u),t.exit(a),l):Ie(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),g):(t.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===null||v===91||v===93||Ie(v)||d++>999?(t.exit("chunkString"),g(v)):(t.consume(v),x||(x=!ot(v)),v===92?y:b)}function y(v){return v===91||v===92||v===93?(t.consume(v),d++,b):b(v)}}function Cb(t,l,i,a,u,s){let c;return d;function d(y){return y===34||y===39||y===40?(t.enter(a),t.enter(u),t.consume(y),t.exit(u),c=y===40?41:y,x):i(y)}function x(y){return y===c?(t.enter(u),t.consume(y),t.exit(u),t.exit(a),l):(t.enter(s),h(y))}function h(y){return y===c?(t.exit(s),x(c)):y===null?i(y):Ie(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),xt(t,h,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),g(y))}function g(y){return y===c||y===null||Ie(y)?(t.exit("chunkString"),h(y)):(t.consume(y),y===92?b:g)}function b(y){return y===c||y===92?(t.consume(y),g):g(y)}}function Ps(t,l){let i;return a;function a(u){return Ie(u)?(t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),i=!0,a):ot(u)?xt(t,a,i?"linePrefix":"lineSuffix")(u):l(u)}}const D2={name:"definition",tokenize:O2},T2={partial:!0,tokenize:B2};function O2(t,l,i){const a=this;let u;return s;function s(v){return t.enter("definition"),c(v)}function c(v){return wb.call(a,t,d,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function d(v){return u=Sl(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),x):i(v)}function x(v){return Bt(v)?Ps(t,h)(v):h(v)}function h(v){return Nb(t,g,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function g(v){return t.attempt(T2,b,b)(v)}function b(v){return ot(v)?xt(t,y,"whitespace")(v):y(v)}function y(v){return v===null||Ie(v)?(t.exit("definition"),a.parser.defined.push(u),l(v)):i(v)}}function B2(t,l,i){return a;function a(d){return Bt(d)?Ps(t,u)(d):i(d)}function u(d){return Cb(t,s,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return ot(d)?xt(t,c,"whitespace")(d):c(d)}function c(d){return d===null||Ie(d)?l(d):i(d)}}const _2={name:"hardBreakEscape",tokenize:F2};function F2(t,l,i){return a;function a(s){return t.enter("hardBreakEscape"),t.consume(s),u}function u(s){return Ie(s)?(t.exit("hardBreakEscape"),l(s)):i(s)}}const R2={name:"headingAtx",resolve:L2,tokenize:z2};function L2(t,l){let i=t.length-2,a=3,u,s;return t[a][1].type==="whitespace"&&(a+=2),i-2>a&&t[i][1].type==="whitespace"&&(i-=2),t[i][1].type==="atxHeadingSequence"&&(a===i-1||i-4>a&&t[i-2][1].type==="whitespace")&&(i-=a+1===i?2:4),i>a&&(u={type:"atxHeadingText",start:t[a][1].start,end:t[i][1].end},s={type:"chunkText",start:t[a][1].start,end:t[i][1].end,contentType:"text"},Zn(t,a,i-a+1,[["enter",u,l],["enter",s,l],["exit",s,l],["exit",u,l]])),t}function z2(t,l,i){let a=0;return u;function u(g){return t.enter("atxHeading"),s(g)}function s(g){return t.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&a++<6?(t.consume(g),c):g===null||Bt(g)?(t.exit("atxHeadingSequence"),d(g)):i(g)}function d(g){return g===35?(t.enter("atxHeadingSequence"),x(g)):g===null||Ie(g)?(t.exit("atxHeading"),l(g)):ot(g)?xt(t,d,"whitespace")(g):(t.enter("atxHeadingText"),h(g))}function x(g){return g===35?(t.consume(g),x):(t.exit("atxHeadingSequence"),d(g))}function h(g){return g===null||g===35||Bt(g)?(t.exit("atxHeadingText"),d(g)):(t.consume(g),h)}}const $2=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],hg=["pre","script","style","textarea"],I2={concrete:!0,name:"htmlFlow",resolveTo:G2,tokenize:q2},H2={partial:!0,tokenize:V2},U2={partial:!0,tokenize:P2};function G2(t){let l=t.length;for(;l--&&!(t[l][0]==="enter"&&t[l][1].type==="htmlFlow"););return l>1&&t[l-2][1].type==="linePrefix"&&(t[l][1].start=t[l-2][1].start,t[l+1][1].start=t[l-2][1].start,t.splice(l-2,2)),t}function q2(t,l,i){const a=this;let u,s,c,d,x;return h;function h(A){return g(A)}function g(A){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(A),b}function b(A){return A===33?(t.consume(A),y):A===47?(t.consume(A),s=!0,k):A===63?(t.consume(A),u=3,a.interrupt?l:M):Bn(A)?(t.consume(A),c=String.fromCharCode(A),_):i(A)}function y(A){return A===45?(t.consume(A),u=2,v):A===91?(t.consume(A),u=5,d=0,N):Bn(A)?(t.consume(A),u=4,a.interrupt?l:M):i(A)}function v(A){return A===45?(t.consume(A),a.interrupt?l:M):i(A)}function N(A){const xe="CDATA[";return A===xe.charCodeAt(d++)?(t.consume(A),d===xe.length?a.interrupt?l:K:N):i(A)}function k(A){return Bn(A)?(t.consume(A),c=String.fromCharCode(A),_):i(A)}function _(A){if(A===null||A===47||A===62||Bt(A)){const xe=A===47,Se=c.toLowerCase();return!xe&&!s&&hg.includes(Se)?(u=1,a.interrupt?l(A):K(A)):$2.includes(c.toLowerCase())?(u=6,xe?(t.consume(A),j):a.interrupt?l(A):K(A)):(u=7,a.interrupt&&!a.parser.lazy[a.now().line]?i(A):s?B(A):$(A))}return A===45||En(A)?(t.consume(A),c+=String.fromCharCode(A),_):i(A)}function j(A){return A===62?(t.consume(A),a.interrupt?l:K):i(A)}function B(A){return ot(A)?(t.consume(A),B):D(A)}function $(A){return A===47?(t.consume(A),D):A===58||A===95||Bn(A)?(t.consume(A),ne):ot(A)?(t.consume(A),$):D(A)}function ne(A){return A===45||A===46||A===58||A===95||En(A)?(t.consume(A),ne):se(A)}function se(A){return A===61?(t.consume(A),I):ot(A)?(t.consume(A),se):$(A)}function I(A){return A===null||A===60||A===61||A===62||A===96?i(A):A===34||A===39?(t.consume(A),x=A,T):ot(A)?(t.consume(A),I):P(A)}function T(A){return A===x?(t.consume(A),x=null,Y):A===null||Ie(A)?i(A):(t.consume(A),T)}function P(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Bt(A)?se(A):(t.consume(A),P)}function Y(A){return A===47||A===62||ot(A)?$(A):i(A)}function D(A){return A===62?(t.consume(A),X):i(A)}function X(A){return A===null||Ie(A)?K(A):ot(A)?(t.consume(A),X):i(A)}function K(A){return A===45&&u===2?(t.consume(A),C):A===60&&u===1?(t.consume(A),R):A===62&&u===4?(t.consume(A),O):A===63&&u===3?(t.consume(A),M):A===93&&u===5?(t.consume(A),ae):Ie(A)&&(u===6||u===7)?(t.exit("htmlFlowData"),t.check(H2,L,U)(A)):A===null||Ie(A)?(t.exit("htmlFlowData"),U(A)):(t.consume(A),K)}function U(A){return t.check(U2,oe,L)(A)}function oe(A){return t.enter("lineEnding"),t.consume(A),t.exit("lineEnding"),le}function le(A){return A===null||Ie(A)?U(A):(t.enter("htmlFlowData"),K(A))}function C(A){return A===45?(t.consume(A),M):K(A)}function R(A){return A===47?(t.consume(A),c="",V):K(A)}function V(A){if(A===62){const xe=c.toLowerCase();return hg.includes(xe)?(t.consume(A),O):K(A)}return Bn(A)&&c.length<8?(t.consume(A),c+=String.fromCharCode(A),V):K(A)}function ae(A){return A===93?(t.consume(A),M):K(A)}function M(A){return A===62?(t.consume(A),O):A===45&&u===2?(t.consume(A),M):K(A)}function O(A){return A===null||Ie(A)?(t.exit("htmlFlowData"),L(A)):(t.consume(A),O)}function L(A){return t.exit("htmlFlow"),l(A)}}function P2(t,l,i){const a=this;return u;function u(c){return Ie(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):i(c)}function s(c){return a.parser.lazy[a.now().line]?i(c):l(c)}}function V2(t,l,i){return a;function a(u){return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),t.attempt(Zs,l,i)}}const Y2={name:"htmlText",tokenize:Q2};function Q2(t,l,i){const a=this;let u,s,c;return d;function d(M){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(M),x}function x(M){return M===33?(t.consume(M),h):M===47?(t.consume(M),se):M===63?(t.consume(M),$):Bn(M)?(t.consume(M),P):i(M)}function h(M){return M===45?(t.consume(M),g):M===91?(t.consume(M),s=0,N):Bn(M)?(t.consume(M),B):i(M)}function g(M){return M===45?(t.consume(M),v):i(M)}function b(M){return M===null?i(M):M===45?(t.consume(M),y):Ie(M)?(c=b,R(M)):(t.consume(M),b)}function y(M){return M===45?(t.consume(M),v):b(M)}function v(M){return M===62?C(M):M===45?y(M):b(M)}function N(M){const O="CDATA[";return M===O.charCodeAt(s++)?(t.consume(M),s===O.length?k:N):i(M)}function k(M){return M===null?i(M):M===93?(t.consume(M),_):Ie(M)?(c=k,R(M)):(t.consume(M),k)}function _(M){return M===93?(t.consume(M),j):k(M)}function j(M){return M===62?C(M):M===93?(t.consume(M),j):k(M)}function B(M){return M===null||M===62?C(M):Ie(M)?(c=B,R(M)):(t.consume(M),B)}function $(M){return M===null?i(M):M===63?(t.consume(M),ne):Ie(M)?(c=$,R(M)):(t.consume(M),$)}function ne(M){return M===62?C(M):$(M)}function se(M){return Bn(M)?(t.consume(M),I):i(M)}function I(M){return M===45||En(M)?(t.consume(M),I):T(M)}function T(M){return Ie(M)?(c=T,R(M)):ot(M)?(t.consume(M),T):C(M)}function P(M){return M===45||En(M)?(t.consume(M),P):M===47||M===62||Bt(M)?Y(M):i(M)}function Y(M){return M===47?(t.consume(M),C):M===58||M===95||Bn(M)?(t.consume(M),D):Ie(M)?(c=Y,R(M)):ot(M)?(t.consume(M),Y):C(M)}function D(M){return M===45||M===46||M===58||M===95||En(M)?(t.consume(M),D):X(M)}function X(M){return M===61?(t.consume(M),K):Ie(M)?(c=X,R(M)):ot(M)?(t.consume(M),X):Y(M)}function K(M){return M===null||M===60||M===61||M===62||M===96?i(M):M===34||M===39?(t.consume(M),u=M,U):Ie(M)?(c=K,R(M)):ot(M)?(t.consume(M),K):(t.consume(M),oe)}function U(M){return M===u?(t.consume(M),u=void 0,le):M===null?i(M):Ie(M)?(c=U,R(M)):(t.consume(M),U)}function oe(M){return M===null||M===34||M===39||M===60||M===61||M===96?i(M):M===47||M===62||Bt(M)?Y(M):(t.consume(M),oe)}function le(M){return M===47||M===62||Bt(M)?Y(M):i(M)}function C(M){return M===62?(t.consume(M),t.exit("htmlTextData"),t.exit("htmlText"),l):i(M)}function R(M){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(M),t.exit("lineEnding"),V}function V(M){return ot(M)?xt(t,ae,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):ae(M)}function ae(M){return t.enter("htmlTextData"),c(M)}}const Kh={name:"labelEnd",resolveAll:Z2,resolveTo:W2,tokenize:ew},J2={tokenize:tw},X2={tokenize:nw},K2={tokenize:lw};function Z2(t){let l=-1;const i=[];for(;++l<t.length;){const a=t[l][1];if(i.push(t[l]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const u=a.type==="labelImage"?4:2;a.type="data",l+=u}}return t.length!==i.length&&Zn(t,0,t.length,i),t}function W2(t,l){let i=t.length,a=0,u,s,c,d;for(;i--;)if(u=t[i][1],s){if(u.type==="link"||u.type==="labelLink"&&u._inactive)break;t[i][0]==="enter"&&u.type==="labelLink"&&(u._inactive=!0)}else if(c){if(t[i][0]==="enter"&&(u.type==="labelImage"||u.type==="labelLink")&&!u._balanced&&(s=i,u.type!=="labelLink")){a=2;break}}else u.type==="labelEnd"&&(c=i);const x={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},h={type:"label",start:{...t[s][1].start},end:{...t[c][1].end}},g={type:"labelText",start:{...t[s+a+2][1].end},end:{...t[c-2][1].start}};return d=[["enter",x,l],["enter",h,l]],d=ul(d,t.slice(s+1,s+a+3)),d=ul(d,[["enter",g,l]]),d=ul(d,tc(l.parser.constructs.insideSpan.null,t.slice(s+a+4,c-3),l)),d=ul(d,[["exit",g,l],t[c-2],t[c-1],["exit",h,l]]),d=ul(d,t.slice(c+1)),d=ul(d,[["exit",x,l]]),Zn(t,s,t.length,d),t}function ew(t,l,i){const a=this;let u=a.events.length,s,c;for(;u--;)if((a.events[u][1].type==="labelImage"||a.events[u][1].type==="labelLink")&&!a.events[u][1]._balanced){s=a.events[u][1];break}return d;function d(y){return s?s._inactive?b(y):(c=a.parser.defined.includes(Sl(a.sliceSerialize({start:s.end,end:a.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(y),t.exit("labelMarker"),t.exit("labelEnd"),x):i(y)}function x(y){return y===40?t.attempt(J2,g,c?g:b)(y):y===91?t.attempt(X2,g,c?h:b)(y):c?g(y):b(y)}function h(y){return t.attempt(K2,g,b)(y)}function g(y){return l(y)}function b(y){return s._balanced=!0,i(y)}}function tw(t,l,i){return a;function a(b){return t.enter("resource"),t.enter("resourceMarker"),t.consume(b),t.exit("resourceMarker"),u}function u(b){return Bt(b)?Ps(t,s)(b):s(b)}function s(b){return b===41?g(b):Nb(t,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(b)}function c(b){return Bt(b)?Ps(t,x)(b):g(b)}function d(b){return i(b)}function x(b){return b===34||b===39||b===40?Cb(t,h,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(b):g(b)}function h(b){return Bt(b)?Ps(t,g)(b):g(b)}function g(b){return b===41?(t.enter("resourceMarker"),t.consume(b),t.exit("resourceMarker"),t.exit("resource"),l):i(b)}}function nw(t,l,i){const a=this;return u;function u(d){return wb.call(a,t,s,c,"reference","referenceMarker","referenceString")(d)}function s(d){return a.parser.defined.includes(Sl(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?l(d):i(d)}function c(d){return i(d)}}function lw(t,l,i){return a;function a(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),u}function u(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),l):i(s)}}const iw={name:"labelStartImage",resolveAll:Kh.resolveAll,tokenize:rw};function rw(t,l,i){const a=this;return u;function u(d){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(d),t.exit("labelImageMarker"),s}function s(d){return d===91?(t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelImage"),c):i(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(d):l(d)}}const aw={name:"labelStartLink",resolveAll:Kh.resolveAll,tokenize:sw};function sw(t,l,i){const a=this;return u;function u(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?i(c):l(c)}}const Vd={name:"lineEnding",tokenize:ow};function ow(t,l){return i;function i(a){return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),xt(t,l,"linePrefix")}}const Fu={name:"thematicBreak",tokenize:uw};function uw(t,l,i){let a=0,u;return s;function s(h){return t.enter("thematicBreak"),c(h)}function c(h){return u=h,d(h)}function d(h){return h===u?(t.enter("thematicBreakSequence"),x(h)):a>=3&&(h===null||Ie(h))?(t.exit("thematicBreak"),l(h)):i(h)}function x(h){return h===u?(t.consume(h),a++,x):(t.exit("thematicBreakSequence"),ot(h)?xt(t,d,"whitespace")(h):d(h))}}const $n={continuation:{tokenize:hw},exit:pw,name:"list",tokenize:dw},cw={partial:!0,tokenize:xw},fw={partial:!0,tokenize:mw};function dw(t,l,i){const a=this,u=a.events[a.events.length-1];let s=u&&u[1].type==="linePrefix"?u[2].sliceSerialize(u[1],!0).length:0,c=0;return d;function d(v){const N=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:Dh(v)){if(a.containerState.type||(a.containerState.type=N,t.enter(N,{_container:!0})),N==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(Fu,i,h)(v):h(v);if(!a.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),x(v)}return i(v)}function x(v){return Dh(v)&&++c<10?(t.consume(v),x):(!a.interrupt||c<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),h(v)):i(v)}function h(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,t.check(Zs,a.interrupt?i:g,t.attempt(cw,y,b))}function g(v){return a.containerState.initialBlankLine=!0,s++,y(v)}function b(v){return ot(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),y):i(v)}function y(v){return a.containerState.size=s+a.sliceSerialize(t.exit("listItemPrefix"),!0).length,l(v)}}function hw(t,l,i){const a=this;return a.containerState._closeFlow=void 0,t.check(Zs,u,s);function u(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,xt(t,l,"listItemIndent",a.containerState.size+1)(d)}function s(d){return a.containerState.furtherBlankLines||!ot(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,t.attempt(fw,l,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,xt(t,t.attempt($n,l,i),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function mw(t,l,i){const a=this;return xt(t,u,"listItemIndent",a.containerState.size+1);function u(s){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?l(s):i(s)}}function pw(t){t.exit(this.containerState.type)}function xw(t,l,i){const a=this;return xt(t,u,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function u(s){const c=a.events[a.events.length-1];return!ot(s)&&c&&c[1].type==="listItemPrefixWhitespace"?l(s):i(s)}}const mg={name:"setextUnderline",resolveTo:gw,tokenize:bw};function gw(t,l){let i=t.length,a,u,s;for(;i--;)if(t[i][0]==="enter"){if(t[i][1].type==="content"){a=i;break}t[i][1].type==="paragraph"&&(u=i)}else t[i][1].type==="content"&&t.splice(i,1),!s&&t[i][1].type==="definition"&&(s=i);const c={type:"setextHeading",start:{...t[a][1].start},end:{...t[t.length-1][1].end}};return t[u][1].type="setextHeadingText",s?(t.splice(u,0,["enter",c,l]),t.splice(s+1,0,["exit",t[a][1],l]),t[a][1].end={...t[s][1].end}):t[a][1]=c,t.push(["exit",c,l]),t}function bw(t,l,i){const a=this;let u;return s;function s(h){let g=a.events.length,b;for(;g--;)if(a.events[g][1].type!=="lineEnding"&&a.events[g][1].type!=="linePrefix"&&a.events[g][1].type!=="content"){b=a.events[g][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||b)?(t.enter("setextHeadingLine"),u=h,c(h)):i(h)}function c(h){return t.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===u?(t.consume(h),d):(t.exit("setextHeadingLineSequence"),ot(h)?xt(t,x,"lineSuffix")(h):x(h))}function x(h){return h===null||Ie(h)?(t.exit("setextHeadingLine"),l(h)):i(h)}}const yw={tokenize:vw};function vw(t){const l=this,i=t.attempt(Zs,a,t.attempt(this.parser.constructs.flowInitial,u,xt(t,t.attempt(this.parser.constructs.flow,u,t.attempt(E2,u)),"linePrefix")));return i;function a(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),l.currentConstruct=void 0,i}function u(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),l.currentConstruct=void 0,i}}const Sw={resolveAll:Ab()},Nw=Eb("string"),ww=Eb("text");function Eb(t){return{resolveAll:Ab(t==="text"?Cw:void 0),tokenize:l};function l(i){const a=this,u=this.parser.constructs[t],s=i.attempt(u,c,d);return c;function c(g){return h(g)?s(g):d(g)}function d(g){if(g===null){i.consume(g);return}return i.enter("data"),i.consume(g),x}function x(g){return h(g)?(i.exit("data"),s(g)):(i.consume(g),x)}function h(g){if(g===null)return!0;const b=u[g];let y=-1;if(b)for(;++y<b.length;){const v=b[y];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function Ab(t){return l;function l(i,a){let u=-1,s;for(;++u<=i.length;)s===void 0?i[u]&&i[u][1].type==="data"&&(s=u,u++):(!i[u]||i[u][1].type!=="data")&&(u!==s+2&&(i[s][1].end=i[u-1][1].end,i.splice(s+2,u-s-2),u=s+2),s=void 0);return t?t(i,a):i}}function Cw(t,l){let i=0;for(;++i<=t.length;)if((i===t.length||t[i][1].type==="lineEnding")&&t[i-1][1].type==="data"){const a=t[i-1][1],u=l.sliceStream(a);let s=u.length,c=-1,d=0,x;for(;s--;){const h=u[s];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(h===-2)x=!0,d++;else if(h!==-1){s++;break}}if(l._contentTypeTextTrailing&&i===t.length&&(d=0),d){const h={type:i===t.length||x||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:a.start._bufferIndex+c,_index:a.start._index+s,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(t.splice(i,0,["enter",h,l],["exit",h,l]),i+=2)}i++}return t}const Ew={42:$n,43:$n,45:$n,48:$n,49:$n,50:$n,51:$n,52:$n,53:$n,54:$n,55:$n,56:$n,57:$n,62:bb},Aw={91:D2},kw={[-2]:Pd,[-1]:Pd,32:Pd},jw={35:R2,42:Fu,45:[mg,Fu],60:I2,61:mg,95:Fu,96:dg,126:dg},Mw={38:vb,92:yb},Dw={[-5]:Vd,[-4]:Vd,[-3]:Vd,33:iw,38:vb,42:Th,60:[a2,Y2],91:aw,92:[_2,yb],93:Kh,95:Th,96:y2},Tw={null:[Th,Sw]},Ow={null:[42,95]},Bw={null:[]},_w=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Ow,contentInitial:Aw,disable:Bw,document:Ew,flow:jw,flowInitial:kw,insideSpan:Tw,string:Mw,text:Dw},Symbol.toStringTag,{value:"Module"}));function Fw(t,l,i){let a={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const u={},s=[];let c=[],d=[];const x={attempt:T(se),check:T(I),consume:B,enter:$,exit:ne,interrupt:T(I,{interrupt:!0})},h={code:null,containerState:{},defineSkip:k,events:[],now:N,parser:t,previous:null,sliceSerialize:y,sliceStream:v,write:b};let g=l.tokenize.call(h,x);return l.resolveAll&&s.push(l),h;function b(X){return c=ul(c,X),_(),c[c.length-1]!==null?[]:(P(l,0),h.events=tc(s,h.events,h),h.events)}function y(X,K){return Lw(v(X),K)}function v(X){return Rw(c,X)}function N(){const{_bufferIndex:X,_index:K,line:U,column:oe,offset:le}=a;return{_bufferIndex:X,_index:K,line:U,column:oe,offset:le}}function k(X){u[X.line]=X.column,D()}function _(){let X;for(;a._index<c.length;){const K=c[a._index];if(typeof K=="string")for(X=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===X&&a._bufferIndex<K.length;)j(K.charCodeAt(a._bufferIndex));else j(K)}}function j(X){g=g(X)}function B(X){Ie(X)?(a.line++,a.column=1,a.offset+=X===-3?2:1,D()):X!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=X}function $(X,K){const U=K||{};return U.type=X,U.start=N(),h.events.push(["enter",U,h]),d.push(U),U}function ne(X){const K=d.pop();return K.end=N(),h.events.push(["exit",K,h]),K}function se(X,K){P(X,K.from)}function I(X,K){K.restore()}function T(X,K){return U;function U(oe,le,C){let R,V,ae,M;return Array.isArray(oe)?L(oe):"tokenize"in oe?L([oe]):O(oe);function O(Ee){return Fe;function Fe(tt){const Ve=tt!==null&&Ee[tt],Lt=tt!==null&&Ee.null,Ut=[...Array.isArray(Ve)?Ve:Ve?[Ve]:[],...Array.isArray(Lt)?Lt:Lt?[Lt]:[]];return L(Ut)(tt)}}function L(Ee){return R=Ee,V=0,Ee.length===0?C:A(Ee[V])}function A(Ee){return Fe;function Fe(tt){return M=Y(),ae=Ee,Ee.partial||(h.currentConstruct=Ee),Ee.name&&h.parser.constructs.disable.null.includes(Ee.name)?Se():Ee.tokenize.call(K?Object.assign(Object.create(h),K):h,x,xe,Se)(tt)}}function xe(Ee){return X(ae,M),le}function Se(Ee){return M.restore(),++V<R.length?A(R[V]):C}}}function P(X,K){X.resolveAll&&!s.includes(X)&&s.push(X),X.resolve&&Zn(h.events,K,h.events.length-K,X.resolve(h.events.slice(K),h)),X.resolveTo&&(h.events=X.resolveTo(h.events,h))}function Y(){const X=N(),K=h.previous,U=h.currentConstruct,oe=h.events.length,le=Array.from(d);return{from:oe,restore:C};function C(){a=X,h.previous=K,h.currentConstruct=U,h.events.length=oe,d=le,D()}}function D(){a.line in u&&a.column<2&&(a.column=u[a.line],a.offset+=u[a.line]-1)}}function Rw(t,l){const i=l.start._index,a=l.start._bufferIndex,u=l.end._index,s=l.end._bufferIndex;let c;if(i===u)c=[t[i].slice(a,s)];else{if(c=t.slice(i,u),a>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}s>0&&c.push(t[u].slice(0,s))}return c}function Lw(t,l){let i=-1;const a=[];let u;for(;++i<t.length;){const s=t[i];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
|
|
11
|
+
`;break}case-3:{c=`\r
|
|
12
|
+
`;break}case-2:{c=l?" ":" ";break}case-1:{if(!l&&u)continue;c=" ";break}default:c=String.fromCharCode(s)}u=s===-2,a.push(c)}return a.join("")}function zw(t){const a={constructs:xb([_w,...(t||{}).extensions||[]]),content:u(WN),defined:[],document:u(t2),flow:u(yw),lazy:{},string:u(Nw),text:u(ww)};return a;function u(s){return c;function c(d){return Fw(a,s,d)}}}function $w(t){for(;!Sb(t););return t}const pg=/[\0\t\n\r]/g;function Iw(){let t=1,l="",i=!0,a;return u;function u(s,c,d){const x=[];let h,g,b,y,v;for(s=l+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),b=0,l="",i&&(s.charCodeAt(0)===65279&&b++,i=void 0);b<s.length;){if(pg.lastIndex=b,h=pg.exec(s),y=h&&h.index!==void 0?h.index:s.length,v=s.charCodeAt(y),!h){l=s.slice(b);break}if(v===10&&b===y&&a)x.push(-3),a=void 0;else switch(a&&(x.push(-5),a=void 0),b<y&&(x.push(s.slice(b,y)),t+=y-b),v){case 0:{x.push(65533),t++;break}case 9:{for(g=Math.ceil(t/4)*4,x.push(-2);t++<g;)x.push(-1);break}case 10:{x.push(-4),t=1;break}default:a=!0,t=1}b=y+1}return d&&(a&&x.push(-5),l&&x.push(l),x.push(null)),x}}const Hw=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Uw(t){return t.replace(Hw,Gw)}function Gw(t,l,i){if(l)return l;if(i.charCodeAt(0)===35){const u=i.charCodeAt(1),s=u===120||u===88;return gb(i.slice(s?2:1),s?16:10)}return Xh(i)||t}const kb={}.hasOwnProperty;function qw(t,l,i){return l&&typeof l=="object"&&(i=l,l=void 0),Pw(i)($w(zw(i).document().write(Iw()(t,l,!0))))}function Pw(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(it),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:s(Te),blockQuote:s(Lt),characterEscape:Y,characterReference:Y,codeFenced:s(Ut),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Ut,c),codeText:s(_t,c),codeTextData:Y,data:Y,codeFlowValue:Y,definition:s(he),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Ue),hardBreakEscape:s(de),hardBreakTrailing:s(de),htmlFlow:s(Ae,c),htmlFlowData:Y,htmlText:s(Ae,c),htmlTextData:Y,image:s(Xe),label:c,link:s(it),listItem:s(pt),listItemValue:y,listOrdered:s(nt,b),listUnordered:s(nt),paragraph:s(H),reference:A,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(Te),strong:s(ve),thematicBreak:s(At)},exit:{atxHeading:x(),atxHeadingSequence:se,autolink:x(),autolinkEmail:Ve,autolinkProtocol:tt,blockQuote:x(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:Ee,characterReference:Fe,codeFenced:x(_),codeFencedFence:k,codeFencedFenceInfo:v,codeFencedFenceMeta:N,codeFlowValue:D,codeIndented:x(j),codeText:x(le),codeTextData:D,data:D,definition:x(),definitionDestinationString:ne,definitionLabelString:B,definitionTitleString:$,emphasis:x(),hardBreakEscape:x(K),hardBreakTrailing:x(K),htmlFlow:x(U),htmlFlowData:D,htmlText:x(oe),htmlTextData:D,image:x(R),label:ae,labelText:V,lineEnding:X,link:x(C),listItem:x(),listOrdered:x(),listUnordered:x(),paragraph:x(),referenceString:xe,resourceDestinationString:M,resourceTitleString:O,resource:L,setextHeading:x(P),setextHeadingLineSequence:T,setextHeadingText:I,strong:x(),thematicBreak:x()}};jb(l,(t||{}).mdastExtensions||[]);const i={};return a;function a(ie){let pe={type:"root",children:[]};const je={stack:[pe],tokenStack:[],config:l,enter:d,exit:h,buffer:c,resume:g,data:i},Be=[];let _e=-1;for(;++_e<ie.length;)if(ie[_e][1].type==="listOrdered"||ie[_e][1].type==="listUnordered")if(ie[_e][0]==="enter")Be.push(_e);else{const ze=Be.pop();_e=u(ie,ze,_e)}for(_e=-1;++_e<ie.length;){const ze=l[ie[_e][0]];kb.call(ze,ie[_e][1].type)&&ze[ie[_e][1].type].call(Object.assign({sliceSerialize:ie[_e][2].sliceSerialize},je),ie[_e][1])}if(je.tokenStack.length>0){const ze=je.tokenStack[je.tokenStack.length-1];(ze[1]||xg).call(je,void 0,ze[0])}for(pe.position={start:qi(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:qi(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},_e=-1;++_e<l.transforms.length;)pe=l.transforms[_e](pe)||pe;return pe}function u(ie,pe,je){let Be=pe-1,_e=-1,ze=!1,Re,Le,et,zt;for(;++Be<=je;){const qe=ie[Be];switch(qe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{qe[0]==="enter"?_e++:_e--,zt=void 0;break}case"lineEndingBlank":{qe[0]==="enter"&&(Re&&!zt&&!_e&&!et&&(et=Be),zt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:zt=void 0}if(!_e&&qe[0]==="enter"&&qe[1].type==="listItemPrefix"||_e===-1&&qe[0]==="exit"&&(qe[1].type==="listUnordered"||qe[1].type==="listOrdered")){if(Re){let kn=Be;for(Le=void 0;kn--;){const Ft=ie[kn];if(Ft[1].type==="lineEnding"||Ft[1].type==="lineEndingBlank"){if(Ft[0]==="exit")continue;Le&&(ie[Le][1].type="lineEndingBlank",ze=!0),Ft[1].type="lineEnding",Le=kn}else if(!(Ft[1].type==="linePrefix"||Ft[1].type==="blockQuotePrefix"||Ft[1].type==="blockQuotePrefixWhitespace"||Ft[1].type==="blockQuoteMarker"||Ft[1].type==="listItemIndent"))break}et&&(!Le||et<Le)&&(Re._spread=!0),Re.end=Object.assign({},Le?ie[Le][1].start:qe[1].end),ie.splice(Le||Be,0,["exit",Re,qe[2]]),Be++,je++}if(qe[1].type==="listItemPrefix"){const kn={type:"listItem",_spread:!1,start:Object.assign({},qe[1].start),end:void 0};Re=kn,ie.splice(Be,0,["enter",kn,qe[2]]),Be++,je++,et=void 0,zt=!0}}}return ie[pe][1]._spread=ze,je}function s(ie,pe){return je;function je(Be){d.call(this,ie(Be),Be),pe&&pe.call(this,Be)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(ie,pe,je){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([pe,je||void 0]),ie.position={start:qi(pe.start),end:void 0}}function x(ie){return pe;function pe(je){ie&&ie.call(this,je),h.call(this,je)}}function h(ie,pe){const je=this.stack.pop(),Be=this.tokenStack.pop();if(Be)Be[0].type!==ie.type&&(pe?pe.call(this,ie,Be[0]):(Be[1]||xg).call(this,ie,Be[0]));else throw new Error("Cannot close `"+ie.type+"` ("+qs({start:ie.start,end:ie.end})+"): it’s not open");je.position.end=qi(ie.end)}function g(){return Jh(this.stack.pop())}function b(){this.data.expectingFirstListItemValue=!0}function y(ie){if(this.data.expectingFirstListItemValue){const pe=this.stack[this.stack.length-2];pe.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ie=this.resume(),pe=this.stack[this.stack.length-1];pe.lang=ie}function N(){const ie=this.resume(),pe=this.stack[this.stack.length-1];pe.meta=ie}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const ie=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const ie=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ie.replace(/(\r?\n|\r)$/g,"")}function B(ie){const pe=this.resume(),je=this.stack[this.stack.length-1];je.label=pe,je.identifier=Sl(this.sliceSerialize(ie)).toLowerCase()}function $(){const ie=this.resume(),pe=this.stack[this.stack.length-1];pe.title=ie}function ne(){const ie=this.resume(),pe=this.stack[this.stack.length-1];pe.url=ie}function se(ie){const pe=this.stack[this.stack.length-1];if(!pe.depth){const je=this.sliceSerialize(ie).length;pe.depth=je}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function T(ie){const pe=this.stack[this.stack.length-1];pe.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function Y(ie){const je=this.stack[this.stack.length-1].children;let Be=je[je.length-1];(!Be||Be.type!=="text")&&(Be=Oe(),Be.position={start:qi(ie.start),end:void 0},je.push(Be)),this.stack.push(Be)}function D(ie){const pe=this.stack.pop();pe.value+=this.sliceSerialize(ie),pe.position.end=qi(ie.end)}function X(ie){const pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const je=pe.children[pe.children.length-1];je.position.end=qi(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(pe.type)&&(Y.call(this,ie),D.call(this,ie))}function K(){this.data.atHardBreak=!0}function U(){const ie=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ie}function oe(){const ie=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ie}function le(){const ie=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ie}function C(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=pe,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function R(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=pe,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function V(ie){const pe=this.sliceSerialize(ie),je=this.stack[this.stack.length-2];je.label=Uw(pe),je.identifier=Sl(pe).toLowerCase()}function ae(){const ie=this.stack[this.stack.length-1],pe=this.resume(),je=this.stack[this.stack.length-1];if(this.data.inReference=!0,je.type==="link"){const Be=ie.children;je.children=Be}else je.alt=pe}function M(){const ie=this.resume(),pe=this.stack[this.stack.length-1];pe.url=ie}function O(){const ie=this.resume(),pe=this.stack[this.stack.length-1];pe.title=ie}function L(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function xe(ie){const pe=this.resume(),je=this.stack[this.stack.length-1];je.label=pe,je.identifier=Sl(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function Se(ie){this.data.characterReferenceType=ie.type}function Ee(ie){const pe=this.sliceSerialize(ie),je=this.data.characterReferenceType;let Be;je?(Be=gb(pe,je==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Be=Xh(pe);const _e=this.stack[this.stack.length-1];_e.value+=Be}function Fe(ie){const pe=this.stack.pop();pe.position.end=qi(ie.end)}function tt(ie){D.call(this,ie);const pe=this.stack[this.stack.length-1];pe.url=this.sliceSerialize(ie)}function Ve(ie){D.call(this,ie);const pe=this.stack[this.stack.length-1];pe.url="mailto:"+this.sliceSerialize(ie)}function Lt(){return{type:"blockquote",children:[]}}function Ut(){return{type:"code",lang:null,meta:null,value:""}}function _t(){return{type:"inlineCode",value:""}}function he(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ue(){return{type:"emphasis",children:[]}}function Te(){return{type:"heading",depth:0,children:[]}}function de(){return{type:"break"}}function Ae(){return{type:"html",value:""}}function Xe(){return{type:"image",title:null,url:"",alt:null}}function it(){return{type:"link",title:null,url:"",children:[]}}function nt(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function pt(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function H(){return{type:"paragraph",children:[]}}function ve(){return{type:"strong",children:[]}}function Oe(){return{type:"text",value:""}}function At(){return{type:"thematicBreak"}}}function qi(t){return{line:t.line,column:t.column,offset:t.offset}}function jb(t,l){let i=-1;for(;++i<l.length;){const a=l[i];Array.isArray(a)?jb(t,a):Vw(t,a)}}function Vw(t,l){let i;for(i in l)if(kb.call(l,i))switch(i){case"canContainEols":{const a=l[i];a&&t[i].push(...a);break}case"transforms":{const a=l[i];a&&t[i].push(...a);break}case"enter":case"exit":{const a=l[i];a&&Object.assign(t[i],a);break}}}function xg(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+qs({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+qs({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+qs({start:l.start,end:l.end})+") is still open")}function Yw(t){const l=this;l.parser=i;function i(a){return qw(a,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function Qw(t,l){const i={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(l),!0)};return t.patch(l,i),t.applyData(l,i)}function Jw(t,l){const i={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,i),[t.applyData(l,i),{type:"text",value:`
|
|
13
|
+
`}]}function Xw(t,l){const i=l.value?l.value+`
|
|
14
|
+
`:"",a={},u=l.lang?l.lang.split(/\s+/):[];u.length>0&&(a.className=["language-"+u[0]]);let s={type:"element",tagName:"code",properties:a,children:[{type:"text",value:i}]};return l.meta&&(s.data={meta:l.meta}),t.patch(l,s),s=t.applyData(l,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(l,s),s}function Kw(t,l){const i={type:"element",tagName:"del",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function Zw(t,l){const i={type:"element",tagName:"em",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function Ww(t,l){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",a=String(l.identifier).toUpperCase(),u=Ba(a.toLowerCase()),s=t.footnoteOrder.indexOf(a);let c,d=t.footnoteCounts.get(a);d===void 0?(d=0,t.footnoteOrder.push(a),c=t.footnoteOrder.length):c=s+1,d+=1,t.footnoteCounts.set(a,d);const x={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+u,id:i+"fnref-"+u+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(l,x);const h={type:"element",tagName:"sup",properties:{},children:[x]};return t.patch(l,h),t.applyData(l,h)}function eC(t,l){const i={type:"element",tagName:"h"+l.depth,properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function tC(t,l){if(t.options.allowDangerousHtml){const i={type:"raw",value:l.value};return t.patch(l,i),t.applyData(l,i)}}function Mb(t,l){const i=l.referenceType;let a="]";if(i==="collapsed"?a+="[]":i==="full"&&(a+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+a}];const u=t.all(l),s=u[0];s&&s.type==="text"?s.value="["+s.value:u.unshift({type:"text",value:"["});const c=u[u.length-1];return c&&c.type==="text"?c.value+=a:u.push({type:"text",value:a}),u}function nC(t,l){const i=String(l.identifier).toUpperCase(),a=t.definitionById.get(i);if(!a)return Mb(t,l);const u={src:Ba(a.url||""),alt:l.alt};a.title!==null&&a.title!==void 0&&(u.title=a.title);const s={type:"element",tagName:"img",properties:u,children:[]};return t.patch(l,s),t.applyData(l,s)}function lC(t,l){const i={src:Ba(l.url)};l.alt!==null&&l.alt!==void 0&&(i.alt=l.alt),l.title!==null&&l.title!==void 0&&(i.title=l.title);const a={type:"element",tagName:"img",properties:i,children:[]};return t.patch(l,a),t.applyData(l,a)}function iC(t,l){const i={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};t.patch(l,i);const a={type:"element",tagName:"code",properties:{},children:[i]};return t.patch(l,a),t.applyData(l,a)}function rC(t,l){const i=String(l.identifier).toUpperCase(),a=t.definitionById.get(i);if(!a)return Mb(t,l);const u={href:Ba(a.url||"")};a.title!==null&&a.title!==void 0&&(u.title=a.title);const s={type:"element",tagName:"a",properties:u,children:t.all(l)};return t.patch(l,s),t.applyData(l,s)}function aC(t,l){const i={href:Ba(l.url)};l.title!==null&&l.title!==void 0&&(i.title=l.title);const a={type:"element",tagName:"a",properties:i,children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function sC(t,l,i){const a=t.all(l),u=i?oC(i):Db(l),s={},c=[];if(typeof l.checked=="boolean"){const g=a[0];let b;g&&g.type==="element"&&g.tagName==="p"?b=g:(b={type:"element",tagName:"p",properties:{},children:[]},a.unshift(b)),b.children.length>0&&b.children.unshift({type:"text",value:" "}),b.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:l.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let d=-1;for(;++d<a.length;){const g=a[d];(u||d!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
|
|
15
|
+
`}),g.type==="element"&&g.tagName==="p"&&!u?c.push(...g.children):c.push(g)}const x=a[a.length-1];x&&(u||x.type!=="element"||x.tagName!=="p")&&c.push({type:"text",value:`
|
|
16
|
+
`});const h={type:"element",tagName:"li",properties:s,children:c};return t.patch(l,h),t.applyData(l,h)}function oC(t){let l=!1;if(t.type==="list"){l=t.spread||!1;const i=t.children;let a=-1;for(;!l&&++a<i.length;)l=Db(i[a])}return l}function Db(t){const l=t.spread;return l??t.children.length>1}function uC(t,l){const i={},a=t.all(l);let u=-1;for(typeof l.start=="number"&&l.start!==1&&(i.start=l.start);++u<a.length;){const c=a[u];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const s={type:"element",tagName:l.ordered?"ol":"ul",properties:i,children:t.wrap(a,!0)};return t.patch(l,s),t.applyData(l,s)}function cC(t,l){const i={type:"element",tagName:"p",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function fC(t,l){const i={type:"root",children:t.wrap(t.all(l))};return t.patch(l,i),t.applyData(l,i)}function dC(t,l){const i={type:"element",tagName:"strong",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function hC(t,l){const i=t.all(l),a=i.shift(),u=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([a],!0)};t.patch(l.children[0],c),u.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(i,!0)},d=Ph(l.children[1]),x=ob(l.children[l.children.length-1]);d&&x&&(c.position={start:d,end:x}),u.push(c)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(u,!0)};return t.patch(l,s),t.applyData(l,s)}function mC(t,l,i){const a=i?i.children:void 0,s=(a?a.indexOf(l):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,d=c?c.length:l.children.length;let x=-1;const h=[];for(;++x<d;){const b=l.children[x],y={},v=c?c[x]:void 0;v&&(y.align=v);let N={type:"element",tagName:s,properties:y,children:[]};b&&(N.children=t.all(b),t.patch(b,N),N=t.applyData(b,N)),h.push(N)}const g={type:"element",tagName:"tr",properties:{},children:t.wrap(h,!0)};return t.patch(l,g),t.applyData(l,g)}function pC(t,l){const i={type:"element",tagName:"td",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}const gg=9,bg=32;function xC(t){const l=String(t),i=/\r?\n|\r/g;let a=i.exec(l),u=0;const s=[];for(;a;)s.push(yg(l.slice(u,a.index),u>0,!0),a[0]),u=a.index+a[0].length,a=i.exec(l);return s.push(yg(l.slice(u),u>0,!1)),s.join("")}function yg(t,l,i){let a=0,u=t.length;if(l){let s=t.codePointAt(a);for(;s===gg||s===bg;)a++,s=t.codePointAt(a)}if(i){let s=t.codePointAt(u-1);for(;s===gg||s===bg;)u--,s=t.codePointAt(u-1)}return u>a?t.slice(a,u):""}function gC(t,l){const i={type:"text",value:xC(String(l.value))};return t.patch(l,i),t.applyData(l,i)}function bC(t,l){const i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(l,i),t.applyData(l,i)}const yC={blockquote:Qw,break:Jw,code:Xw,delete:Kw,emphasis:Zw,footnoteReference:Ww,heading:eC,html:tC,imageReference:nC,image:lC,inlineCode:iC,linkReference:rC,link:aC,listItem:sC,list:uC,paragraph:cC,root:fC,strong:dC,table:hC,tableCell:pC,tableRow:mC,text:gC,thematicBreak:bC,toml:Su,yaml:Su,definition:Su,footnoteDefinition:Su};function Su(){}const Tb=-1,nc=0,Vs=1,Uu=2,Zh=3,Wh=4,em=5,tm=6,Ob=7,Bb=8,vC=typeof self=="object"?self:globalThis,vg=(t,l)=>{switch(t){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+t)}return new vC[t](l)},SC=(t,l)=>{const i=(u,s)=>(t.set(s,u),u),a=u=>{if(t.has(u))return t.get(u);const[s,c]=l[u];switch(s){case nc:case Tb:return i(c,u);case Vs:{const d=i([],u);for(const x of c)d.push(a(x));return d}case Uu:{const d=i({},u);for(const[x,h]of c)d[a(x)]=a(h);return d}case Zh:return i(new Date(c),u);case Wh:{const{source:d,flags:x}=c;return i(new RegExp(d,x),u)}case em:{const d=i(new Map,u);for(const[x,h]of c)d.set(a(x),a(h));return d}case tm:{const d=i(new Set,u);for(const x of c)d.add(a(x));return d}case Ob:{const{name:d,message:x}=c;return i(vg(d,x),u)}case Bb:return i(BigInt(c),u);case"BigInt":return i(Object(BigInt(c)),u);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return i(new DataView(d),c)}}return i(vg(s,c),u)};return a},Sg=t=>SC(new Map,t)(0),ya="",{toString:NC}={},{keys:wC}=Object,Bs=t=>{const l=typeof t;if(l!=="object"||!t)return[nc,l];const i=NC.call(t).slice(8,-1);switch(i){case"Array":return[Vs,ya];case"Object":return[Uu,ya];case"Date":return[Zh,ya];case"RegExp":return[Wh,ya];case"Map":return[em,ya];case"Set":return[tm,ya];case"DataView":return[Vs,i]}return i.includes("Array")?[Vs,i]:i.includes("Error")?[Ob,i]:[Uu,i]},Nu=([t,l])=>t===nc&&(l==="function"||l==="symbol"),CC=(t,l,i,a)=>{const u=(c,d)=>{const x=a.push(c)-1;return i.set(d,x),x},s=c=>{if(i.has(c))return i.get(c);let[d,x]=Bs(c);switch(d){case nc:{let g=c;switch(x){case"bigint":d=Bb,g=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+x);g=null;break;case"undefined":return u([Tb],c)}return u([d,g],c)}case Vs:{if(x){let y=c;return x==="DataView"?y=new Uint8Array(c.buffer):x==="ArrayBuffer"&&(y=new Uint8Array(c)),u([x,[...y]],c)}const g=[],b=u([d,g],c);for(const y of c)g.push(s(y));return b}case Uu:{if(x)switch(x){case"BigInt":return u([x,c.toString()],c);case"Boolean":case"Number":case"String":return u([x,c.valueOf()],c)}if(l&&"toJSON"in c)return s(c.toJSON());const g=[],b=u([d,g],c);for(const y of wC(c))(t||!Nu(Bs(c[y])))&&g.push([s(y),s(c[y])]);return b}case Zh:return u([d,c.toISOString()],c);case Wh:{const{source:g,flags:b}=c;return u([d,{source:g,flags:b}],c)}case em:{const g=[],b=u([d,g],c);for(const[y,v]of c)(t||!(Nu(Bs(y))||Nu(Bs(v))))&&g.push([s(y),s(v)]);return b}case tm:{const g=[],b=u([d,g],c);for(const y of c)(t||!Nu(Bs(y)))&&g.push(s(y));return b}}const{message:h}=c;return u([d,{name:x,message:h}],c)};return s},Ng=(t,{json:l,lossy:i}={})=>{const a=[];return CC(!(l||i),!!l,new Map,a)(t),a},Js=typeof structuredClone=="function"?(t,l)=>l&&("json"in l||"lossy"in l)?Sg(Ng(t,l)):structuredClone(t):(t,l)=>Sg(Ng(t,l));function EC(t,l){const i=[{type:"text",value:"↩"}];return l>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),i}function AC(t,l){return"Back to reference "+(t+1)+(l>1?"-"+l:"")}function kC(t){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||EC,a=t.options.footnoteBackLabel||AC,u=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",c=t.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let x=-1;for(;++x<t.footnoteOrder.length;){const h=t.footnoteById.get(t.footnoteOrder[x]);if(!h)continue;const g=t.all(h),b=String(h.identifier).toUpperCase(),y=Ba(b.toLowerCase());let v=0;const N=[],k=t.footnoteCounts.get(b);for(;k!==void 0&&++v<=k;){N.length>0&&N.push({type:"text",value:" "});let B=typeof i=="string"?i:i(x,v);typeof B=="string"&&(B={type:"text",value:B}),N.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+y+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(x,v),className:["data-footnote-backref"]},children:Array.isArray(B)?B:[B]})}const _=g[g.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const B=_.children[_.children.length-1];B&&B.type==="text"?B.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...N)}else g.push(...N);const j={type:"element",tagName:"li",properties:{id:l+"fn-"+y},children:t.wrap(g,!0)};t.patch(h,j),d.push(j)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Js(c),id:"footnote-label"},children:[{type:"text",value:u}]},{type:"text",value:`
|
|
17
|
+
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(d,!0)},{type:"text",value:`
|
|
18
|
+
`}]}}const lc=(function(t){if(t==null)return TC;if(typeof t=="function")return ic(t);if(typeof t=="object")return Array.isArray(t)?jC(t):MC(t);if(typeof t=="string")return DC(t);throw new Error("Expected function, string, or object as test")});function jC(t){const l=[];let i=-1;for(;++i<t.length;)l[i]=lc(t[i]);return ic(a);function a(...u){let s=-1;for(;++s<l.length;)if(l[s].apply(this,u))return!0;return!1}}function MC(t){const l=t;return ic(i);function i(a){const u=a;let s;for(s in t)if(u[s]!==l[s])return!1;return!0}}function DC(t){return ic(l);function l(i){return i&&i.type===t}}function ic(t){return l;function l(i,a,u){return!!(OC(i)&&t.call(this,i,typeof a=="number"?a:void 0,u||void 0))}}function TC(){return!0}function OC(t){return t!==null&&typeof t=="object"&&"type"in t}const _b=[],BC=!0,Oh=!1,_C="skip";function Fb(t,l,i,a){let u;typeof l=="function"&&typeof i!="function"?(a=i,i=l):u=l;const s=lc(u),c=a?-1:1;d(t,void 0,[])();function d(x,h,g){const b=x&&typeof x=="object"?x:{};if(typeof b.type=="string"){const v=typeof b.tagName=="string"?b.tagName:typeof b.name=="string"?b.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(x.type+(v?"<"+v+">":""))+")"})}return y;function y(){let v=_b,N,k,_;if((!l||s(x,h,g[g.length-1]||void 0))&&(v=FC(i(x,g)),v[0]===Oh))return v;if("children"in x&&x.children){const j=x;if(j.children&&v[0]!==_C)for(k=(a?j.children.length:-1)+c,_=g.concat(j);k>-1&&k<j.children.length;){const B=j.children[k];if(N=d(B,k,_)(),N[0]===Oh)return N;k=typeof N[1]=="number"?N[1]:k+c}}return v}}}function FC(t){return Array.isArray(t)?t:typeof t=="number"?[BC,t]:t==null?_b:[t]}function nm(t,l,i,a){let u,s,c;typeof l=="function"&&typeof i!="function"?(s=void 0,c=l,u=i):(s=l,c=i,u=a),Fb(t,s,d,u);function d(x,h){const g=h[h.length-1],b=g?g.children.indexOf(x):void 0;return c(x,b,g)}}const Bh={}.hasOwnProperty,RC={};function LC(t,l){const i=l||RC,a=new Map,u=new Map,s=new Map,c={...yC,...i.handlers},d={all:h,applyData:$C,definitionById:a,footnoteById:u,footnoteCounts:s,footnoteOrder:[],handlers:c,one:x,options:i,patch:zC,wrap:HC};return nm(t,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const b=g.type==="definition"?a:u,y=String(g.identifier).toUpperCase();b.has(y)||b.set(y,g)}}),d;function x(g,b){const y=g.type,v=d.handlers[y];if(Bh.call(d.handlers,y)&&v)return v(d,g,b);if(d.options.passThrough&&d.options.passThrough.includes(y)){if("children"in g){const{children:k,..._}=g,j=Js(_);return j.children=d.all(g),j}return Js(g)}return(d.options.unknownHandler||IC)(d,g,b)}function h(g){const b=[];if("children"in g){const y=g.children;let v=-1;for(;++v<y.length;){const N=d.one(y[v],g);if(N){if(v&&y[v-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=wg(N.value)),!Array.isArray(N)&&N.type==="element")){const k=N.children[0];k&&k.type==="text"&&(k.value=wg(k.value))}Array.isArray(N)?b.push(...N):b.push(N)}}}return b}}function zC(t,l){t.position&&(l.position=cb(t))}function $C(t,l){let i=l;if(t&&t.data){const a=t.data.hName,u=t.data.hChildren,s=t.data.hProperties;if(typeof a=="string")if(i.type==="element")i.tagName=a;else{const c="children"in i?i.children:[i];i={type:"element",tagName:a,properties:{},children:c}}i.type==="element"&&s&&Object.assign(i.properties,Js(s)),"children"in i&&i.children&&u!==null&&u!==void 0&&(i.children=u)}return i}function IC(t,l){const i=l.data||{},a="value"in l&&!(Bh.call(i,"hProperties")||Bh.call(i,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function HC(t,l){const i=[];let a=-1;for(l&&i.push({type:"text",value:`
|
|
19
|
+
`});++a<t.length;)a&&i.push({type:"text",value:`
|
|
20
|
+
`}),i.push(t[a]);return l&&t.length>0&&i.push({type:"text",value:`
|
|
21
|
+
`}),i}function wg(t){let l=0,i=t.charCodeAt(l);for(;i===9||i===32;)l++,i=t.charCodeAt(l);return t.slice(l)}function Cg(t,l){const i=LC(t,l),a=i.one(t,void 0),u=kC(i),s=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return u&&s.children.push({type:"text",value:`
|
|
22
|
+
`},u),s}function UC(t,l){return t&&"run"in t?async function(i,a){const u=Cg(i,{file:a,...l});await t.run(u,a)}:function(i,a){return Cg(i,{file:a,...t||l})}}function Eg(t){if(t)throw t}var Yd,Ag;function GC(){if(Ag)return Yd;Ag=1;var t=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,u=function(h){return typeof Array.isArray=="function"?Array.isArray(h):l.call(h)==="[object Array]"},s=function(h){if(!h||l.call(h)!=="[object Object]")return!1;var g=t.call(h,"constructor"),b=h.constructor&&h.constructor.prototype&&t.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!b)return!1;var y;for(y in h);return typeof y>"u"||t.call(h,y)},c=function(h,g){i&&g.name==="__proto__"?i(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},d=function(h,g){if(g==="__proto__")if(t.call(h,g)){if(a)return a(h,g).value}else return;return h[g]};return Yd=function x(){var h,g,b,y,v,N,k=arguments[0],_=1,j=arguments.length,B=!1;for(typeof k=="boolean"&&(B=k,k=arguments[1]||{},_=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});_<j;++_)if(h=arguments[_],h!=null)for(g in h)b=d(k,g),y=d(h,g),k!==y&&(B&&y&&(s(y)||(v=u(y)))?(v?(v=!1,N=b&&u(b)?b:[]):N=b&&s(b)?b:{},c(k,{name:g,newValue:x(B,N,y)})):typeof y<"u"&&c(k,{name:g,newValue:y}));return k},Yd}var qC=GC();const Qd=Zu(qC);function _h(t){if(typeof t!="object"||t===null)return!1;const l=Object.getPrototypeOf(t);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function PC(){const t=[],l={run:i,use:a};return l;function i(...u){let s=-1;const c=u.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...u);function d(x,...h){const g=t[++s];let b=-1;if(x){c(x);return}for(;++b<u.length;)(h[b]===null||h[b]===void 0)&&(h[b]=u[b]);u=h,g?VC(g,d)(...h):c(null,...h)}}function a(u){if(typeof u!="function")throw new TypeError("Expected `middelware` to be a function, not "+u);return t.push(u),l}}function VC(t,l){let i;return a;function a(...c){const d=t.length>c.length;let x;d&&c.push(u);try{x=t.apply(this,c)}catch(h){const g=h;if(d&&i)throw g;return u(g)}d||(x&&x.then&&typeof x.then=="function"?x.then(s,u):x instanceof Error?u(x):s(x))}function u(c,...d){i||(i=!0,l(c,...d))}function s(c){u(null,c)}}const Bl={basename:YC,dirname:QC,extname:JC,join:XC,sep:"/"};function YC(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');Ws(t);let i=0,a=-1,u=t.length,s;if(l===void 0||l.length===0||l.length>t.length){for(;u--;)if(t.codePointAt(u)===47){if(s){i=u+1;break}}else a<0&&(s=!0,a=u+1);return a<0?"":t.slice(i,a)}if(l===t)return"";let c=-1,d=l.length-1;for(;u--;)if(t.codePointAt(u)===47){if(s){i=u+1;break}}else c<0&&(s=!0,c=u+1),d>-1&&(t.codePointAt(u)===l.codePointAt(d--)?d<0&&(a=u):(d=-1,a=c));return i===a?a=c:a<0&&(a=t.length),t.slice(i,a)}function QC(t){if(Ws(t),t.length===0)return".";let l=-1,i=t.length,a;for(;--i;)if(t.codePointAt(i)===47){if(a){l=i;break}}else a||(a=!0);return l<0?t.codePointAt(0)===47?"/":".":l===1&&t.codePointAt(0)===47?"//":t.slice(0,l)}function JC(t){Ws(t);let l=t.length,i=-1,a=0,u=-1,s=0,c;for(;l--;){const d=t.codePointAt(l);if(d===47){if(c){a=l+1;break}continue}i<0&&(c=!0,i=l+1),d===46?u<0?u=l:s!==1&&(s=1):u>-1&&(s=-1)}return u<0||i<0||s===0||s===1&&u===i-1&&u===a+1?"":t.slice(u,i)}function XC(...t){let l=-1,i;for(;++l<t.length;)Ws(t[l]),t[l]&&(i=i===void 0?t[l]:i+"/"+t[l]);return i===void 0?".":KC(i)}function KC(t){Ws(t);const l=t.codePointAt(0)===47;let i=ZC(t,!l);return i.length===0&&!l&&(i="."),i.length>0&&t.codePointAt(t.length-1)===47&&(i+="/"),l?"/"+i:i}function ZC(t,l){let i="",a=0,u=-1,s=0,c=-1,d,x;for(;++c<=t.length;){if(c<t.length)d=t.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(u===c-1||s===1))if(u!==c-1&&s===2){if(i.length<2||a!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(x=i.lastIndexOf("/"),x!==i.length-1){x<0?(i="",a=0):(i=i.slice(0,x),a=i.length-1-i.lastIndexOf("/")),u=c,s=0;continue}}else if(i.length>0){i="",a=0,u=c,s=0;continue}}l&&(i=i.length>0?i+"/..":"..",a=2)}else i.length>0?i+="/"+t.slice(u+1,c):i=t.slice(u+1,c),a=c-u-1;u=c,s=0}else d===46&&s>-1?s++:s=-1}return i}function Ws(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const WC={cwd:eE};function eE(){return"/"}function Fh(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function tE(t){if(typeof t=="string")t=new URL(t);else if(!Fh(t)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(t.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return nE(t)}function nE(t){if(t.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const l=t.pathname;let i=-1;for(;++i<l.length;)if(l.codePointAt(i)===37&&l.codePointAt(i+1)===50){const a=l.codePointAt(i+2);if(a===70||a===102){const u=new TypeError("File URL path must not include encoded / characters");throw u.code="ERR_INVALID_FILE_URL_PATH",u}}return decodeURIComponent(l)}const Jd=["history","path","basename","stem","extname","dirname"];class Rb{constructor(l){let i;l?Fh(l)?i={path:l}:typeof l=="string"||lE(l)?i={value:l}:i=l:i={},this.cwd="cwd"in i?"":WC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Jd.length;){const s=Jd[a];s in i&&i[s]!==void 0&&i[s]!==null&&(this[s]=s==="history"?[...i[s]]:i[s])}let u;for(u in i)Jd.includes(u)||(this[u]=i[u])}get basename(){return typeof this.path=="string"?Bl.basename(this.path):void 0}set basename(l){Kd(l,"basename"),Xd(l,"basename"),this.path=Bl.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Bl.dirname(this.path):void 0}set dirname(l){kg(this.basename,"dirname"),this.path=Bl.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Bl.extname(this.path):void 0}set extname(l){if(Xd(l,"extname"),kg(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Bl.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Fh(l)&&(l=tE(l)),Kd(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Bl.basename(this.path,this.extname):void 0}set stem(l){Kd(l,"stem"),Xd(l,"stem"),this.path=Bl.join(this.dirname||"",l+(this.extname||""))}fail(l,i,a){const u=this.message(l,i,a);throw u.fatal=!0,u}info(l,i,a){const u=this.message(l,i,a);return u.fatal=void 0,u}message(l,i,a){const u=new An(l,i,a);return this.path&&(u.name=this.path+":"+u.name,u.file=this.path),u.fatal=!1,this.messages.push(u),u}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function Xd(t,l){if(t&&t.includes(Bl.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Bl.sep+"`")}function Kd(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function kg(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function lE(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const iE=(function(t){const a=this.constructor.prototype,u=a[t],s=function(){return u.apply(s,arguments)};return Object.setPrototypeOf(s,a),s}),rE={}.hasOwnProperty;class lm extends iE{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=PC()}copy(){const l=new lm;let i=-1;for(;++i<this.attachers.length;){const a=this.attachers[i];l.use(...a)}return l.data(Qd(!0,{},this.namespace)),l}data(l,i){return typeof l=="string"?arguments.length===2?(eh("data",this.frozen),this.namespace[l]=i,this):rE.call(this.namespace,l)&&this.namespace[l]||void 0:l?(eh("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const u=i.call(l,...a);typeof u=="function"&&this.transformers.use(u)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const i=wu(l),a=this.parser||this.Parser;return Zd("parse",a),a(String(i),i)}process(l,i){const a=this;return this.freeze(),Zd("process",this.parser||this.Parser),Wd("process",this.compiler||this.Compiler),i?u(void 0,i):new Promise(u);function u(s,c){const d=wu(l),x=a.parse(d);a.run(x,d,function(g,b,y){if(g||!b||!y)return h(g);const v=b,N=a.stringify(v,y);oE(N)?y.value=N:y.result=N,h(g,y)});function h(g,b){g||!b?c(g):s?s(b):i(void 0,b)}}}processSync(l){let i=!1,a;return this.freeze(),Zd("processSync",this.parser||this.Parser),Wd("processSync",this.compiler||this.Compiler),this.process(l,u),Mg("processSync","process",i),a;function u(s,c){i=!0,Eg(s),a=c}}run(l,i,a){jg(l),this.freeze();const u=this.transformers;return!a&&typeof i=="function"&&(a=i,i=void 0),a?s(void 0,a):new Promise(s);function s(c,d){const x=wu(i);u.run(l,x,h);function h(g,b,y){const v=b||l;g?d(g):c?c(v):a(void 0,v,y)}}}runSync(l,i){let a=!1,u;return this.run(l,i,s),Mg("runSync","run",a),u;function s(c,d){Eg(c),u=d,a=!0}}stringify(l,i){this.freeze();const a=wu(i),u=this.compiler||this.Compiler;return Wd("stringify",u),jg(l),u(l,a)}use(l,...i){const a=this.attachers,u=this.namespace;if(eh("use",this.frozen),l!=null)if(typeof l=="function")x(l,i);else if(typeof l=="object")Array.isArray(l)?d(l):c(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function s(h){if(typeof h=="function")x(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...b]=h;x(g,b)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(h.plugins),h.settings&&(u.settings=Qd(!0,u.settings,h.settings))}function d(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const b=h[g];s(b)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function x(h,g){let b=-1,y=-1;for(;++b<a.length;)if(a[b][0]===h){y=b;break}if(y===-1)a.push([h,...g]);else if(g.length>0){let[v,...N]=g;const k=a[y][1];_h(k)&&_h(v)&&(v=Qd(!0,k,v)),a[y]=[h,v,...N]}}}}const aE=new lm().freeze();function Zd(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Wd(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function eh(t,l){if(l)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function jg(t){if(!_h(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Mg(t,l,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function wu(t){return sE(t)?t:new Rb(t)}function sE(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function oE(t){return typeof t=="string"||uE(t)}function uE(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const cE="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Dg=[],Tg={allowDangerousHtml:!0},fE=/^(https?|ircs?|mailto|xmpp)$/i,dE=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function hE(t){const l=mE(t),i=pE(t);return xE(l.runSync(l.parse(i),i),t)}function mE(t){const l=t.rehypePlugins||Dg,i=t.remarkPlugins||Dg,a=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Tg}:Tg;return aE().use(Yw).use(i).use(UC,a).use(l)}function pE(t){const l=t.children||"",i=new Rb;return typeof l=="string"&&(i.value=l),i}function xE(t,l){const i=l.allowedElements,a=l.allowElement,u=l.components,s=l.disallowedElements,c=l.skipHtml,d=l.unwrapDisallowed,x=l.urlTransform||gE;for(const g of dE)Object.hasOwn(l,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+cE+g.id,void 0);return nm(t,h),DN(t,{Fragment:m.Fragment,components:u,ignoreInvalidStyle:!0,jsx:m.jsx,jsxs:m.jsxs,passKeys:!0,passNode:!0});function h(g,b,y){if(g.type==="raw"&&y&&typeof b=="number")return c?y.children.splice(b,1):y.children[b]={type:"text",value:g.value},b;if(g.type==="element"){let v;for(v in qd)if(Object.hasOwn(qd,v)&&Object.hasOwn(g.properties,v)){const N=g.properties[v],k=qd[v];(k===null||k.includes(g.tagName))&&(g.properties[v]=x(String(N||""),v,g))}}if(g.type==="element"){let v=i?!i.includes(g.tagName):s?s.includes(g.tagName):!1;if(!v&&a&&typeof b=="number"&&(v=!a(g,b,y)),v&&y&&typeof b=="number")return d&&g.children?y.children.splice(b,1,...g.children):y.children.splice(b,1),b}}}function gE(t){const l=t.indexOf(":"),i=t.indexOf("?"),a=t.indexOf("#"),u=t.indexOf("/");return l===-1||u!==-1&&l>u||i!==-1&&l>i||a!==-1&&l>a||fE.test(t.slice(0,l))?t:""}const wr=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Og={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...wr,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...wr],h2:[["className","sr-only"]],img:[...wr,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...wr,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...wr],table:[...wr],ul:[...wr,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Qi={}.hasOwnProperty;function bE(t,l){let i={type:"root",children:[]};const a={schema:l?{...Og,...l}:Og,stack:[]},u=Lb(a,t);return u&&(Array.isArray(u)?u.length===1?i=u[0]:i.children=u:i=u),i}function Lb(t,l){if(l&&typeof l=="object"){const i=l;switch(typeof i.type=="string"?i.type:""){case"comment":return yE(t,i);case"doctype":return vE(t,i);case"element":return SE(t,i);case"root":return NE(t,i);case"text":return wE(t,i)}}}function yE(t,l){if(t.schema.allowComments){const i=typeof l.value=="string"?l.value:"",a=i.indexOf("-->"),s={type:"comment",value:a<0?i:i.slice(0,a)};return eo(s,l),s}}function vE(t,l){if(t.schema.allowDoctypes){const i={type:"doctype"};return eo(i,l),i}}function SE(t,l){const i=typeof l.tagName=="string"?l.tagName:"";t.stack.push(i);const a=zb(t,l.children),u=CE(t,l.properties);t.stack.pop();let s=!1;if(i&&i!=="*"&&(!t.schema.tagNames||t.schema.tagNames.includes(i))&&(s=!0,t.schema.ancestors&&Qi.call(t.schema.ancestors,i))){const d=t.schema.ancestors[i];let x=-1;for(s=!1;++x<d.length;)t.stack.includes(d[x])&&(s=!0)}if(!s)return t.schema.strip&&!t.schema.strip.includes(i)?a:void 0;const c={type:"element",tagName:i,properties:u,children:a};return eo(c,l),c}function NE(t,l){const a={type:"root",children:zb(t,l.children)};return eo(a,l),a}function wE(t,l){const a={type:"text",value:typeof l.value=="string"?l.value:""};return eo(a,l),a}function zb(t,l){const i=[];if(Array.isArray(l)){const a=l;let u=-1;for(;++u<a.length;){const s=Lb(t,a[u]);s&&(Array.isArray(s)?i.push(...s):i.push(s))}}return i}function CE(t,l){const i=t.stack[t.stack.length-1],a=t.schema.attributes,u=t.schema.required,s=a&&Qi.call(a,i)?a[i]:void 0,c=a&&Qi.call(a,"*")?a["*"]:void 0,d=l&&typeof l=="object"?l:{},x={};let h;for(h in d)if(Qi.call(d,h)){const g=d[h];let b=Bg(t,_g(s,h),h,g);b==null&&(b=Bg(t,_g(c,h),h,g)),b!=null&&(x[h]=b)}if(u&&Qi.call(u,i)){const g=u[i];for(h in g)Qi.call(g,h)&&!Qi.call(x,h)&&(x[h]=g[h])}return x}function Bg(t,l,i,a){return l?Array.isArray(a)?EE(t,l,i,a):$b(t,l,i,a):void 0}function EE(t,l,i,a){let u=-1;const s=[];for(;++u<a.length;){const c=$b(t,l,i,a[u]);(typeof c=="number"||typeof c=="string")&&s.push(c)}return s}function $b(t,l,i,a){if(!(typeof a!="boolean"&&typeof a!="number"&&typeof a!="string")&&AE(t,i,a)){if(typeof l=="object"&&l.length>1){let u=!1,s=0;for(;++s<l.length;){const c=l[s];if(c&&typeof c=="object"&&"flags"in c){if(c.test(String(a))){u=!0;break}}else if(c===a){u=!0;break}}if(!u)return}return t.schema.clobber&&t.schema.clobberPrefix&&t.schema.clobber.includes(i)?t.schema.clobberPrefix+a:a}}function AE(t,l,i){const a=t.schema.protocols&&Qi.call(t.schema.protocols,l)?t.schema.protocols[l]:void 0;if(!a||a.length===0)return!0;const u=String(i),s=u.indexOf(":"),c=u.indexOf("?"),d=u.indexOf("#"),x=u.indexOf("/");if(s<0||x>-1&&s>x||c>-1&&s>c||d>-1&&s>d)return!0;let h=-1;for(;++h<a.length;){const g=a[h];if(s===g.length&&u.slice(0,g.length)===g)return!0}return!1}function eo(t,l){const i=cb(l);l.data&&(t.data=Js(l.data)),i&&(t.position=i)}function _g(t,l){let i,a=-1;if(t)for(;++a<t.length;){const u=t[a],s=typeof u=="string"?u:u[0];if(s===l)return u;s==="data*"&&(i=u)}if(l.length>4&&l.slice(0,4).toLowerCase()==="data")return i}function kE(t){return function(l){return bE(l,t)}}function Fg(t,l){const i=String(t);if(typeof l!="string")throw new TypeError("Expected character");let a=0,u=i.indexOf(l);for(;u!==-1;)a++,u=i.indexOf(l,u+l.length);return a}function jE(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function ME(t,l,i){const u=lc((i||{}).ignore||[]),s=DE(l);let c=-1;for(;++c<s.length;)Fb(t,"text",d);function d(h,g){let b=-1,y;for(;++b<g.length;){const v=g[b],N=y?y.children:void 0;if(u(v,N?N.indexOf(v):void 0,y))return;y=v}if(y)return x(h,g)}function x(h,g){const b=g[g.length-1],y=s[c][0],v=s[c][1];let N=0;const _=b.children.indexOf(h);let j=!1,B=[];y.lastIndex=0;let $=y.exec(h.value);for(;$;){const ne=$.index,se={index:$.index,input:$.input,stack:[...g,h]};let I=v(...$,se);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I===!1?y.lastIndex=ne+1:(N!==ne&&B.push({type:"text",value:h.value.slice(N,ne)}),Array.isArray(I)?B.push(...I):I&&B.push(I),N=ne+$[0].length,j=!0),!y.global)break;$=y.exec(h.value)}return j?(N<h.value.length&&B.push({type:"text",value:h.value.slice(N)}),b.children.splice(_,1,...B)):B=[h],_+B.length}}function DE(t){const l=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!t[0]||Array.isArray(t[0])?t:[t];let a=-1;for(;++a<i.length;){const u=i[a];l.push([TE(u[0]),OE(u[1])])}return l}function TE(t){return typeof t=="string"?new RegExp(jE(t),"g"):t}function OE(t){return typeof t=="function"?t:function(){return t}}const th="phrasing",nh=["autolink","link","image","label"];function BE(){return{transforms:[IE],enter:{literalAutolink:FE,literalAutolinkEmail:lh,literalAutolinkHttp:lh,literalAutolinkWww:lh},exit:{literalAutolink:$E,literalAutolinkEmail:zE,literalAutolinkHttp:RE,literalAutolinkWww:LE}}}function _E(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:th,notInConstruct:nh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:th,notInConstruct:nh},{character:":",before:"[ps]",after:"\\/",inConstruct:th,notInConstruct:nh}]}}function FE(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function lh(t){this.config.enter.autolinkProtocol.call(this,t)}function RE(t){this.config.exit.autolinkProtocol.call(this,t)}function LE(t){this.config.exit.data.call(this,t);const l=this.stack[this.stack.length-1];l.type,l.url="http://"+this.sliceSerialize(t)}function zE(t){this.config.exit.autolinkEmail.call(this,t)}function $E(t){this.exit(t)}function IE(t){ME(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,HE],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),UE]],{ignore:["link","linkReference"]})}function HE(t,l,i,a,u){let s="";if(!Ib(u)||(/^w/i.test(l)&&(i=l+i,l="",s="http://"),!GE(i)))return!1;const c=qE(i+a);if(!c[0])return!1;const d={type:"link",title:null,url:s+l+c[0],children:[{type:"text",value:l+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function UE(t,l,i,a){return!Ib(a,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+i,children:[{type:"text",value:l+"@"+i}]}}function GE(t){const l=t.split(".");return!(l.length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))}function qE(t){const l=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!l)return[t,void 0];t=t.slice(0,l.index);let i=l[0],a=i.indexOf(")");const u=Fg(t,"(");let s=Fg(t,")");for(;a!==-1&&u>s;)t+=i.slice(0,a+1),i=i.slice(a+1),a=i.indexOf(")"),s++;return[t,i]}function Ib(t,l){const i=t.input.charCodeAt(t.index-1);return(t.index===0||Dr(i)||ec(i))&&(!l||i!==47)}Hb.peek=WE;function PE(){this.buffer()}function VE(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function YE(){this.buffer()}function QE(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function JE(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Sl(this.sliceSerialize(t)).toLowerCase(),i.label=l}function XE(t){this.exit(t)}function KE(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Sl(this.sliceSerialize(t)).toLowerCase(),i.label=l}function ZE(t){this.exit(t)}function WE(){return"["}function Hb(t,l,i,a){const u=i.createTracker(a);let s=u.move("[^");const c=i.enter("footnoteReference"),d=i.enter("reference");return s+=u.move(i.safe(i.associationId(t),{after:"]",before:s})),d(),c(),s+=u.move("]"),s}function eA(){return{enter:{gfmFootnoteCallString:PE,gfmFootnoteCall:VE,gfmFootnoteDefinitionLabelString:YE,gfmFootnoteDefinition:QE},exit:{gfmFootnoteCallString:JE,gfmFootnoteCall:XE,gfmFootnoteDefinitionLabelString:KE,gfmFootnoteDefinition:ZE}}}function tA(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:i,footnoteReference:Hb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(a,u,s,c){const d=s.createTracker(c);let x=d.move("[^");const h=s.enter("footnoteDefinition"),g=s.enter("label");return x+=d.move(s.safe(s.associationId(a),{before:x,after:"]"})),g(),x+=d.move("]:"),a.children&&a.children.length>0&&(d.shift(4),x+=d.move((l?`
|
|
23
|
+
`:" ")+s.indentLines(s.containerFlow(a,d.current()),l?Ub:nA))),h(),x}}function nA(t,l,i){return l===0?t:Ub(t,l,i)}function Ub(t,l,i){return(i?"":" ")+t}const lA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Gb.peek=oA;function iA(){return{canContainEols:["delete"],enter:{strikethrough:aA},exit:{strikethrough:sA}}}function rA(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lA}],handlers:{delete:Gb}}}function aA(t){this.enter({type:"delete",children:[]},t)}function sA(t){this.exit(t)}function Gb(t,l,i,a){const u=i.createTracker(a),s=i.enter("strikethrough");let c=u.move("~~");return c+=i.containerPhrasing(t,{...u.current(),before:c,after:"~"}),c+=u.move("~~"),s(),c}function oA(){return"~"}function uA(t){return t.length}function cA(t,l){const i=l||{},a=(i.align||[]).concat(),u=i.stringLength||uA,s=[],c=[],d=[],x=[];let h=0,g=-1;for(;++g<t.length;){const k=[],_=[];let j=-1;for(t[g].length>h&&(h=t[g].length);++j<t[g].length;){const B=fA(t[g][j]);if(i.alignDelimiters!==!1){const $=u(B);_[j]=$,(x[j]===void 0||$>x[j])&&(x[j]=$)}k.push(B)}c[g]=k,d[g]=_}let b=-1;if(typeof a=="object"&&"length"in a)for(;++b<h;)s[b]=Rg(a[b]);else{const k=Rg(a);for(;++b<h;)s[b]=k}b=-1;const y=[],v=[];for(;++b<h;){const k=s[b];let _="",j="";k===99?(_=":",j=":"):k===108?_=":":k===114&&(j=":");let B=i.alignDelimiters===!1?1:Math.max(1,x[b]-_.length-j.length);const $=_+"-".repeat(B)+j;i.alignDelimiters!==!1&&(B=_.length+B+j.length,B>x[b]&&(x[b]=B),v[b]=B),y[b]=$}c.splice(1,0,y),d.splice(1,0,v),g=-1;const N=[];for(;++g<c.length;){const k=c[g],_=d[g];b=-1;const j=[];for(;++b<h;){const B=k[b]||"";let $="",ne="";if(i.alignDelimiters!==!1){const se=x[b]-(_[b]||0),I=s[b];I===114?$=" ".repeat(se):I===99?se%2?($=" ".repeat(se/2+.5),ne=" ".repeat(se/2-.5)):($=" ".repeat(se/2),ne=$):ne=" ".repeat(se)}i.delimiterStart!==!1&&!b&&j.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&B==="")&&(i.delimiterStart!==!1||b)&&j.push(" "),i.alignDelimiters!==!1&&j.push($),j.push(B),i.alignDelimiters!==!1&&j.push(ne),i.padding!==!1&&j.push(" "),(i.delimiterEnd!==!1||b!==h-1)&&j.push("|")}N.push(i.delimiterEnd===!1?j.join("").replace(/ +$/,""):j.join(""))}return N.join(`
|
|
24
|
+
`)}function fA(t){return t==null?"":String(t)}function Rg(t){const l=typeof t=="string"?t.codePointAt(0):0;return l===67||l===99?99:l===76||l===108?108:l===82||l===114?114:0}function dA(t,l,i,a){const u=i.enter("blockquote"),s=i.createTracker(a);s.move("> "),s.shift(2);const c=i.indentLines(i.containerFlow(t,s.current()),hA);return u(),c}function hA(t,l,i){return">"+(i?"":" ")+t}function mA(t,l){return Lg(t,l.inConstruct,!0)&&!Lg(t,l.notInConstruct,!1)}function Lg(t,l,i){if(typeof l=="string"&&(l=[l]),!l||l.length===0)return i;let a=-1;for(;++a<l.length;)if(t.includes(l[a]))return!0;return!1}function zg(t,l,i,a){let u=-1;for(;++u<i.unsafe.length;)if(i.unsafe[u].character===`
|
|
25
|
+
`&&mA(i.stack,i.unsafe[u]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
26
|
+
`}function pA(t,l){const i=String(t);let a=i.indexOf(l),u=a,s=0,c=0;if(typeof l!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===u?++s>c&&(c=s):s=1,u=a+l.length,a=i.indexOf(l,u);return c}function xA(t,l){return!!(l.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function gA(t){const l=t.options.fence||"`";if(l!=="`"&&l!=="~")throw new Error("Cannot serialize code with `"+l+"` for `options.fence`, expected `` ` `` or `~`");return l}function bA(t,l,i,a){const u=gA(i),s=t.value||"",c=u==="`"?"GraveAccent":"Tilde";if(xA(t,i)){const b=i.enter("codeIndented"),y=i.indentLines(s,yA);return b(),y}const d=i.createTracker(a),x=u.repeat(Math.max(pA(s,u)+1,3)),h=i.enter("codeFenced");let g=d.move(x);if(t.lang){const b=i.enter(`codeFencedLang${c}`);g+=d.move(i.safe(t.lang,{before:g,after:" ",encode:["`"],...d.current()})),b()}if(t.lang&&t.meta){const b=i.enter(`codeFencedMeta${c}`);g+=d.move(" "),g+=d.move(i.safe(t.meta,{before:g,after:`
|
|
27
|
+
`,encode:["`"],...d.current()})),b()}return g+=d.move(`
|
|
28
|
+
`),s&&(g+=d.move(s+`
|
|
29
|
+
`)),g+=d.move(x),h(),g}function yA(t,l,i){return(i?"":" ")+t}function im(t){const l=t.options.quote||'"';if(l!=='"'&&l!=="'")throw new Error("Cannot serialize title with `"+l+"` for `options.quote`, expected `\"`, or `'`");return l}function vA(t,l,i,a){const u=im(i),s=u==='"'?"Quote":"Apostrophe",c=i.enter("definition");let d=i.enter("label");const x=i.createTracker(a);let h=x.move("[");return h+=x.move(i.safe(i.associationId(t),{before:h,after:"]",...x.current()})),h+=x.move("]: "),d(),!t.url||/[\0- \u007F]/.test(t.url)?(d=i.enter("destinationLiteral"),h+=x.move("<"),h+=x.move(i.safe(t.url,{before:h,after:">",...x.current()})),h+=x.move(">")):(d=i.enter("destinationRaw"),h+=x.move(i.safe(t.url,{before:h,after:t.title?" ":`
|
|
30
|
+
`,...x.current()}))),d(),t.title&&(d=i.enter(`title${s}`),h+=x.move(" "+u),h+=x.move(i.safe(t.title,{before:h,after:u,...x.current()})),h+=x.move(u),d()),c(),h}function SA(t){const l=t.options.emphasis||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize emphasis with `"+l+"` for `options.emphasis`, expected `*`, or `_`");return l}function Xs(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Gu(t,l,i){const a=Ta(t),u=Ta(l);return a===void 0?u===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:u===void 0?{inside:!1,outside:!1}:u===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}qb.peek=NA;function qb(t,l,i,a){const u=SA(i),s=i.enter("emphasis"),c=i.createTracker(a),d=c.move(u);let x=c.move(i.containerPhrasing(t,{after:u,before:d,...c.current()}));const h=x.charCodeAt(0),g=Gu(a.before.charCodeAt(a.before.length-1),h,u);g.inside&&(x=Xs(h)+x.slice(1));const b=x.charCodeAt(x.length-1),y=Gu(a.after.charCodeAt(0),b,u);y.inside&&(x=x.slice(0,-1)+Xs(b));const v=c.move(u);return s(),i.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},d+x+v}function NA(t,l,i){return i.options.emphasis||"*"}function wA(t,l){let i=!1;return nm(t,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return i=!0,Oh}),!!((!t.depth||t.depth<3)&&Jh(t)&&(l.options.setext||i))}function CA(t,l,i,a){const u=Math.max(Math.min(6,t.depth||1),1),s=i.createTracker(a);if(wA(t,i)){const g=i.enter("headingSetext"),b=i.enter("phrasing"),y=i.containerPhrasing(t,{...s.current(),before:`
|
|
31
|
+
`,after:`
|
|
32
|
+
`});return b(),g(),y+`
|
|
33
|
+
`+(u===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
34
|
+
`))+1))}const c="#".repeat(u),d=i.enter("headingAtx"),x=i.enter("phrasing");s.move(c+" ");let h=i.containerPhrasing(t,{before:"# ",after:`
|
|
35
|
+
`,...s.current()});return/^[\t ]/.test(h)&&(h=Xs(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,i.options.closeAtx&&(h+=" "+c),x(),d(),h}Pb.peek=EA;function Pb(t){return t.value||""}function EA(){return"<"}Vb.peek=AA;function Vb(t,l,i,a){const u=im(i),s=u==='"'?"Quote":"Apostrophe",c=i.enter("image");let d=i.enter("label");const x=i.createTracker(a);let h=x.move("![");return h+=x.move(i.safe(t.alt,{before:h,after:"]",...x.current()})),h+=x.move("]("),d(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(d=i.enter("destinationLiteral"),h+=x.move("<"),h+=x.move(i.safe(t.url,{before:h,after:">",...x.current()})),h+=x.move(">")):(d=i.enter("destinationRaw"),h+=x.move(i.safe(t.url,{before:h,after:t.title?" ":")",...x.current()}))),d(),t.title&&(d=i.enter(`title${s}`),h+=x.move(" "+u),h+=x.move(i.safe(t.title,{before:h,after:u,...x.current()})),h+=x.move(u),d()),h+=x.move(")"),c(),h}function AA(){return"!"}Yb.peek=kA;function Yb(t,l,i,a){const u=t.referenceType,s=i.enter("imageReference");let c=i.enter("label");const d=i.createTracker(a);let x=d.move("![");const h=i.safe(t.alt,{before:x,after:"]",...d.current()});x+=d.move(h+"]["),c();const g=i.stack;i.stack=[],c=i.enter("reference");const b=i.safe(i.associationId(t),{before:x,after:"]",...d.current()});return c(),i.stack=g,s(),u==="full"||!h||h!==b?x+=d.move(b+"]"):u==="shortcut"?x=x.slice(0,-1):x+=d.move("]"),x}function kA(){return"!"}Qb.peek=jA;function Qb(t,l,i){let a=t.value||"",u="`",s=-1;for(;new RegExp("(^|[^`])"+u+"([^`]|$)").test(a);)u+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++s<i.unsafe.length;){const c=i.unsafe[s],d=i.compilePattern(c);let x;if(c.atBreak)for(;x=d.exec(a);){let h=x.index;a.charCodeAt(h)===10&&a.charCodeAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(x.index+1)}}return u+a+u}function jA(){return"`"}function Jb(t,l){const i=Jh(t);return!!(!l.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(i===t.url||"mailto:"+i===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}Xb.peek=MA;function Xb(t,l,i,a){const u=im(i),s=u==='"'?"Quote":"Apostrophe",c=i.createTracker(a);let d,x;if(Jb(t,i)){const g=i.stack;i.stack=[],d=i.enter("autolink");let b=c.move("<");return b+=c.move(i.containerPhrasing(t,{before:b,after:">",...c.current()})),b+=c.move(">"),d(),i.stack=g,b}d=i.enter("link"),x=i.enter("label");let h=c.move("[");return h+=c.move(i.containerPhrasing(t,{before:h,after:"](",...c.current()})),h+=c.move("]("),x(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(x=i.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(i.safe(t.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(x=i.enter("destinationRaw"),h+=c.move(i.safe(t.url,{before:h,after:t.title?" ":")",...c.current()}))),x(),t.title&&(x=i.enter(`title${s}`),h+=c.move(" "+u),h+=c.move(i.safe(t.title,{before:h,after:u,...c.current()})),h+=c.move(u),x()),h+=c.move(")"),d(),h}function MA(t,l,i){return Jb(t,i)?"<":"["}Kb.peek=DA;function Kb(t,l,i,a){const u=t.referenceType,s=i.enter("linkReference");let c=i.enter("label");const d=i.createTracker(a);let x=d.move("[");const h=i.containerPhrasing(t,{before:x,after:"]",...d.current()});x+=d.move(h+"]["),c();const g=i.stack;i.stack=[],c=i.enter("reference");const b=i.safe(i.associationId(t),{before:x,after:"]",...d.current()});return c(),i.stack=g,s(),u==="full"||!h||h!==b?x+=d.move(b+"]"):u==="shortcut"?x=x.slice(0,-1):x+=d.move("]"),x}function DA(){return"["}function rm(t){const l=t.options.bullet||"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bullet`, expected `*`, `+`, or `-`");return l}function TA(t){const l=rm(t),i=t.options.bulletOther;if(!i)return l==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===l)throw new Error("Expected `bullet` (`"+l+"`) and `bulletOther` (`"+i+"`) to be different");return i}function OA(t){const l=t.options.bulletOrdered||".";if(l!=="."&&l!==")")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOrdered`, expected `.` or `)`");return l}function Zb(t){const l=t.options.rule||"*";if(l!=="*"&&l!=="-"&&l!=="_")throw new Error("Cannot serialize rules with `"+l+"` for `options.rule`, expected `*`, `-`, or `_`");return l}function BA(t,l,i,a){const u=i.enter("list"),s=i.bulletCurrent;let c=t.ordered?OA(i):rm(i);const d=t.ordered?c==="."?")":".":TA(i);let x=l&&i.bulletLastUsed?c===i.bulletLastUsed:!1;if(!t.ordered){const g=t.children?t.children[0]:void 0;if((c==="*"||c==="-")&&g&&(!g.children||!g.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(x=!0),Zb(i)===c&&g){let b=-1;for(;++b<t.children.length;){const y=t.children[b];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){x=!0;break}}}}x&&(c=d),i.bulletCurrent=c;const h=i.containerFlow(t,a);return i.bulletLastUsed=c,i.bulletCurrent=s,u(),h}function _A(t){const l=t.options.listItemIndent||"one";if(l!=="tab"&&l!=="one"&&l!=="mixed")throw new Error("Cannot serialize items with `"+l+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return l}function FA(t,l,i,a){const u=_A(i);let s=i.bulletCurrent||rm(i);l&&l.type==="list"&&l.ordered&&(s=(typeof l.start=="number"&&l.start>-1?l.start:1)+(i.options.incrementListMarker===!1?0:l.children.indexOf(t))+s);let c=s.length+1;(u==="tab"||u==="mixed"&&(l&&l.type==="list"&&l.spread||t.spread))&&(c=Math.ceil(c/4)*4);const d=i.createTracker(a);d.move(s+" ".repeat(c-s.length)),d.shift(c);const x=i.enter("listItem"),h=i.indentLines(i.containerFlow(t,d.current()),g);return x(),h;function g(b,y,v){return y?(v?"":" ".repeat(c))+b:(v?s:s+" ".repeat(c-s.length))+b}}function RA(t,l,i,a){const u=i.enter("paragraph"),s=i.enter("phrasing"),c=i.containerPhrasing(t,a);return s(),u(),c}const LA=lc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function zA(t,l,i,a){return(t.children.some(function(c){return LA(c)})?i.containerPhrasing:i.containerFlow).call(i,t,a)}function $A(t){const l=t.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}Wb.peek=IA;function Wb(t,l,i,a){const u=$A(i),s=i.enter("strong"),c=i.createTracker(a),d=c.move(u+u);let x=c.move(i.containerPhrasing(t,{after:u,before:d,...c.current()}));const h=x.charCodeAt(0),g=Gu(a.before.charCodeAt(a.before.length-1),h,u);g.inside&&(x=Xs(h)+x.slice(1));const b=x.charCodeAt(x.length-1),y=Gu(a.after.charCodeAt(0),b,u);y.inside&&(x=x.slice(0,-1)+Xs(b));const v=c.move(u+u);return s(),i.attentionEncodeSurroundingInfo={after:y.outside,before:g.outside},d+x+v}function IA(t,l,i){return i.options.strong||"*"}function HA(t,l,i,a){return i.safe(t.value,a)}function UA(t){const l=t.options.ruleRepetition||3;if(l<3)throw new Error("Cannot serialize rules with repetition `"+l+"` for `options.ruleRepetition`, expected `3` or more");return l}function GA(t,l,i){const a=(Zb(i)+(i.options.ruleSpaces?" ":"")).repeat(UA(i));return i.options.ruleSpaces?a.slice(0,-1):a}const ey={blockquote:dA,break:zg,code:bA,definition:vA,emphasis:qb,hardBreak:zg,heading:CA,html:Pb,image:Vb,imageReference:Yb,inlineCode:Qb,link:Xb,linkReference:Kb,list:BA,listItem:FA,paragraph:RA,root:zA,strong:Wb,text:HA,thematicBreak:GA};function qA(){return{enter:{table:PA,tableData:$g,tableHeader:$g,tableRow:YA},exit:{codeText:QA,table:VA,tableData:ih,tableHeader:ih,tableRow:ih}}}function PA(t){const l=t._align;this.enter({type:"table",align:l.map(function(i){return i==="none"?null:i}),children:[]},t),this.data.inTable=!0}function VA(t){this.exit(t),this.data.inTable=void 0}function YA(t){this.enter({type:"tableRow",children:[]},t)}function ih(t){this.exit(t)}function $g(t){this.enter({type:"tableCell",children:[]},t)}function QA(t){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,JA));const i=this.stack[this.stack.length-1];i.type,i.value=l,this.exit(t)}function JA(t,l){return l==="|"?l:t}function XA(t){const l=t||{},i=l.tableCellPadding,a=l.tablePipeAlign,u=l.stringLength,s=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
36
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:c,tableCell:x,tableRow:d}};function c(v,N,k,_){return h(g(v,k,_),v.align)}function d(v,N,k,_){const j=b(v,k,_),B=h([j]);return B.slice(0,B.indexOf(`
|
|
37
|
+
`))}function x(v,N,k,_){const j=k.enter("tableCell"),B=k.enter("phrasing"),$=k.containerPhrasing(v,{..._,before:s,after:s});return B(),j(),$}function h(v,N){return cA(v,{align:N,alignDelimiters:a,padding:i,stringLength:u})}function g(v,N,k){const _=v.children;let j=-1;const B=[],$=N.enter("table");for(;++j<_.length;)B[j]=b(_[j],N,k);return $(),B}function b(v,N,k){const _=v.children;let j=-1;const B=[],$=N.enter("tableRow");for(;++j<_.length;)B[j]=x(_[j],v,N,k);return $(),B}function y(v,N,k){let _=ey.inlineCode(v,N,k);return k.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function KA(){return{exit:{taskListCheckValueChecked:Ig,taskListCheckValueUnchecked:Ig,paragraph:WA}}}function ZA(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ek}}}function Ig(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function WA(t){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const a=i.children[0];if(a&&a.type==="text"){const u=l.children;let s=-1,c;for(;++s<u.length;){const d=u[s];if(d.type==="paragraph"){c=d;break}}c===i&&(a.value=a.value.slice(1),a.value.length===0?i.children.shift():i.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,i.position.start=Object.assign({},a.position.start)))}}this.exit(t)}function ek(t,l,i,a){const u=t.children[0],s=typeof t.checked=="boolean"&&u&&u.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",d=i.createTracker(a);s&&d.move(c);let x=ey.listItem(t,l,i,{...a,...d.current()});return s&&(x=x.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),x;function h(g){return g+c}}function tk(){return[BE(),eA(),iA(),qA(),KA()]}function nk(t){return{extensions:[_E(),tA(t),rA(),XA(t),ZA()]}}const lk={tokenize:uk,partial:!0},ty={tokenize:ck,partial:!0},ny={tokenize:fk,partial:!0},ly={tokenize:dk,partial:!0},ik={tokenize:hk,partial:!0},iy={name:"wwwAutolink",tokenize:sk,previous:ay},ry={name:"protocolAutolink",tokenize:ok,previous:sy},di={name:"emailAutolink",tokenize:ak,previous:oy},Rl={};function rk(){return{text:Rl}}let Cr=48;for(;Cr<123;)Rl[Cr]=di,Cr++,Cr===58?Cr=65:Cr===91&&(Cr=97);Rl[43]=di;Rl[45]=di;Rl[46]=di;Rl[95]=di;Rl[72]=[di,ry];Rl[104]=[di,ry];Rl[87]=[di,iy];Rl[119]=[di,iy];function ak(t,l,i){const a=this;let u,s;return c;function c(b){return!Rh(b)||!oy.call(a,a.previous)||am(a.events)?i(b):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),d(b))}function d(b){return Rh(b)?(t.consume(b),d):b===64?(t.consume(b),x):i(b)}function x(b){return b===46?t.check(ik,g,h)(b):b===45||b===95||En(b)?(s=!0,t.consume(b),x):g(b)}function h(b){return t.consume(b),u=!0,x}function g(b){return s&&u&&Bn(a.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(b)):i(b)}}function sk(t,l,i){const a=this;return u;function u(c){return c!==87&&c!==119||!ay.call(a,a.previous)||am(a.events)?i(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(lk,t.attempt(ty,t.attempt(ny,s),i),i)(c))}function s(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(c)}}function ok(t,l,i){const a=this;let u="",s=!1;return c;function c(b){return(b===72||b===104)&&sy.call(a,a.previous)&&!am(a.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),u+=String.fromCodePoint(b),t.consume(b),d):i(b)}function d(b){if(Bn(b)&&u.length<5)return u+=String.fromCodePoint(b),t.consume(b),d;if(b===58){const y=u.toLowerCase();if(y==="http"||y==="https")return t.consume(b),x}return i(b)}function x(b){return b===47?(t.consume(b),s?h:(s=!0,x)):i(b)}function h(b){return b===null||Hu(b)||Bt(b)||Dr(b)||ec(b)?i(b):t.attempt(ty,t.attempt(ny,g),i)(b)}function g(b){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(b)}}function uk(t,l,i){let a=0;return u;function u(c){return(c===87||c===119)&&a<3?(a++,t.consume(c),u):c===46&&a===3?(t.consume(c),s):i(c)}function s(c){return c===null?i(c):l(c)}}function ck(t,l,i){let a,u,s;return c;function c(h){return h===46||h===95?t.check(ly,x,d)(h):h===null||Bt(h)||Dr(h)||h!==45&&ec(h)?x(h):(s=!0,t.consume(h),c)}function d(h){return h===95?a=!0:(u=a,a=void 0),t.consume(h),c}function x(h){return u||a||!s?i(h):l(h)}}function fk(t,l){let i=0,a=0;return u;function u(c){return c===40?(i++,t.consume(c),u):c===41&&a<i?s(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?t.check(ly,l,s)(c):c===null||Bt(c)||Dr(c)?l(c):(t.consume(c),u)}function s(c){return c===41&&a++,t.consume(c),u}}function dk(t,l,i){return a;function a(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(t.consume(d),a):d===38?(t.consume(d),s):d===93?(t.consume(d),u):d===60||d===null||Bt(d)||Dr(d)?l(d):i(d)}function u(d){return d===null||d===40||d===91||Bt(d)||Dr(d)?l(d):a(d)}function s(d){return Bn(d)?c(d):i(d)}function c(d){return d===59?(t.consume(d),a):Bn(d)?(t.consume(d),c):i(d)}}function hk(t,l,i){return a;function a(s){return t.consume(s),u}function u(s){return En(s)?i(s):l(s)}}function ay(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Bt(t)}function sy(t){return!Bn(t)}function oy(t){return!(t===47||Rh(t))}function Rh(t){return t===43||t===45||t===46||t===95||En(t)}function am(t){let l=t.length,i=!1;for(;l--;){const a=t[l][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){i=!0;break}if(a._gfmAutolinkLiteralWalkedInto){i=!1;break}}return t.length>0&&!i&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const mk={tokenize:Nk,partial:!0};function pk(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:yk,continuation:{tokenize:vk},exit:Sk}},text:{91:{name:"gfmFootnoteCall",tokenize:bk},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:xk,resolveTo:gk}}}}function xk(t,l,i){const a=this;let u=a.events.length;const s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;u--;){const x=a.events[u][1];if(x.type==="labelImage"){c=x;break}if(x.type==="gfmFootnoteCall"||x.type==="labelLink"||x.type==="label"||x.type==="image"||x.type==="link")break}return d;function d(x){if(!c||!c._balanced)return i(x);const h=Sl(a.sliceSerialize({start:c.end,end:a.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?i(x):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(x),t.exit("gfmFootnoteCallLabelMarker"),l(x))}}function gk(t,l){let i=t.length;for(;i--;)if(t[i][1].type==="labelImage"&&t[i][0]==="enter"){t[i][1];break}t[i+1][1].type="data",t[i+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},t[i+3][1].start),end:Object.assign({},t[t.length-1][1].end)},u={type:"gfmFootnoteCallMarker",start:Object.assign({},t[i+3][1].end),end:Object.assign({},t[i+3][1].end)};u.end.column++,u.end.offset++,u.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},u.end),end:Object.assign({},t[t.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},d=[t[i+1],t[i+2],["enter",a,l],t[i+3],t[i+4],["enter",u,l],["exit",u,l],["enter",s,l],["enter",c,l],["exit",c,l],["exit",s,l],t[t.length-2],t[t.length-1],["exit",a,l]];return t.splice(i,t.length-i+1,...d),t}function bk(t,l,i){const a=this,u=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let s=0,c;return d;function d(b){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(b),t.exit("gfmFootnoteCallLabelMarker"),x}function x(b){return b!==94?i(b):(t.enter("gfmFootnoteCallMarker"),t.consume(b),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",h)}function h(b){if(s>999||b===93&&!c||b===null||b===91||Bt(b))return i(b);if(b===93){t.exit("chunkString");const y=t.exit("gfmFootnoteCallString");return u.includes(Sl(a.sliceSerialize(y)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(b),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),l):i(b)}return Bt(b)||(c=!0),s++,t.consume(b),b===92?g:h}function g(b){return b===91||b===92||b===93?(t.consume(b),s++,h):h(b)}}function yk(t,l,i){const a=this,u=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let s,c=0,d;return x;function x(N){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(N){return N===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",g):i(N)}function g(N){if(c>999||N===93&&!d||N===null||N===91||Bt(N))return i(N);if(N===93){t.exit("chunkString");const k=t.exit("gfmFootnoteDefinitionLabelString");return s=Sl(a.sliceSerialize(k)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),y}return Bt(N)||(d=!0),c++,t.consume(N),N===92?b:g}function b(N){return N===91||N===92||N===93?(t.consume(N),c++,g):g(N)}function y(N){return N===58?(t.enter("definitionMarker"),t.consume(N),t.exit("definitionMarker"),u.includes(s)||u.push(s),xt(t,v,"gfmFootnoteDefinitionWhitespace")):i(N)}function v(N){return l(N)}}function vk(t,l,i){return t.check(Zs,l,t.attempt(mk,l,i))}function Sk(t){t.exit("gfmFootnoteDefinition")}function Nk(t,l,i){const a=this;return xt(t,u,"gfmFootnoteDefinitionIndent",5);function u(s){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?l(s):i(s)}}function wk(t){let i=(t||{}).singleTilde;const a={name:"strikethrough",tokenize:s,resolveAll:u};return i==null&&(i=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function u(c,d){let x=-1;for(;++x<c.length;)if(c[x][0]==="enter"&&c[x][1].type==="strikethroughSequenceTemporary"&&c[x][1]._close){let h=x;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[x][1].end.offset-c[x][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[x][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[x][1].end)},b={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[x][1].start)},y=[["enter",g,d],["enter",c[h][1],d],["exit",c[h][1],d],["enter",b,d]],v=d.parser.constructs.insideSpan.null;v&&Zn(y,y.length,0,tc(v,c.slice(h+1,x),d)),Zn(y,y.length,0,[["exit",b,d],["enter",c[x][1],d],["exit",c[x][1],d],["exit",g,d]]),Zn(c,h-1,x-h+3,y),x=h+y.length-2;break}}for(x=-1;++x<c.length;)c[x][1].type==="strikethroughSequenceTemporary"&&(c[x][1].type="data");return c}function s(c,d,x){const h=this.previous,g=this.events;let b=0;return y;function y(N){return h===126&&g[g.length-1][1].type!=="characterEscape"?x(N):(c.enter("strikethroughSequenceTemporary"),v(N))}function v(N){const k=Ta(h);if(N===126)return b>1?x(N):(c.consume(N),b++,v);if(b<2&&!i)return x(N);const _=c.exit("strikethroughSequenceTemporary"),j=Ta(N);return _._open=!j||j===2&&!!k,_._close=!k||k===2&&!!j,d(N)}}}class Ck{constructor(){this.map=[]}add(l,i,a){Ek(this,l,i,a)}consume(l){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let i=this.map.length;const a=[];for(;i>0;)i-=1,a.push(l.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),l.length=this.map[i][0];a.push(l.slice()),l.length=0;let u=a.pop();for(;u;){for(const s of u)l.push(s);u=a.pop()}this.map.length=0}}function Ek(t,l,i,a){let u=0;if(!(i===0&&a.length===0)){for(;u<t.map.length;){if(t.map[u][0]===l){t.map[u][1]+=i,t.map[u][2].push(...a);return}u+=1}t.map.push([l,i,a])}}function Ak(t,l){let i=!1;const a=[];for(;l<t.length;){const u=t[l];if(i){if(u[0]==="enter")u[1].type==="tableContent"&&a.push(t[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(u[1].type==="tableContent"){if(t[l-1][1].type==="tableDelimiterMarker"){const s=a.length-1;a[s]=a[s]==="left"?"center":"right"}}else if(u[1].type==="tableDelimiterRow")break}else u[0]==="enter"&&u[1].type==="tableDelimiterRow"&&(i=!0);l+=1}return a}function kk(){return{flow:{null:{name:"table",tokenize:jk,resolveAll:Mk}}}}function jk(t,l,i){const a=this;let u=0,s=0,c;return d;function d(D){let X=a.events.length-1;for(;X>-1;){const oe=a.events[X][1].type;if(oe==="lineEnding"||oe==="linePrefix")X--;else break}const K=X>-1?a.events[X][1].type:null,U=K==="tableHead"||K==="tableRow"?I:x;return U===I&&a.parser.lazy[a.now().line]?i(D):U(D)}function x(D){return t.enter("tableHead"),t.enter("tableRow"),h(D)}function h(D){return D===124||(c=!0,s+=1),g(D)}function g(D){return D===null?i(D):Ie(D)?s>1?(s=0,a.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(D),t.exit("lineEnding"),v):i(D):ot(D)?xt(t,g,"whitespace")(D):(s+=1,c&&(c=!1,u+=1),D===124?(t.enter("tableCellDivider"),t.consume(D),t.exit("tableCellDivider"),c=!0,g):(t.enter("data"),b(D)))}function b(D){return D===null||D===124||Bt(D)?(t.exit("data"),g(D)):(t.consume(D),D===92?y:b)}function y(D){return D===92||D===124?(t.consume(D),b):b(D)}function v(D){return a.interrupt=!1,a.parser.lazy[a.now().line]?i(D):(t.enter("tableDelimiterRow"),c=!1,ot(D)?xt(t,N,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):N(D))}function N(D){return D===45||D===58?_(D):D===124?(c=!0,t.enter("tableCellDivider"),t.consume(D),t.exit("tableCellDivider"),k):se(D)}function k(D){return ot(D)?xt(t,_,"whitespace")(D):_(D)}function _(D){return D===58?(s+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(D),t.exit("tableDelimiterMarker"),j):D===45?(s+=1,j(D)):D===null||Ie(D)?ne(D):se(D)}function j(D){return D===45?(t.enter("tableDelimiterFiller"),B(D)):se(D)}function B(D){return D===45?(t.consume(D),B):D===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(D),t.exit("tableDelimiterMarker"),$):(t.exit("tableDelimiterFiller"),$(D))}function $(D){return ot(D)?xt(t,ne,"whitespace")(D):ne(D)}function ne(D){return D===124?N(D):D===null||Ie(D)?!c||u!==s?se(D):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(D)):se(D)}function se(D){return i(D)}function I(D){return t.enter("tableRow"),T(D)}function T(D){return D===124?(t.enter("tableCellDivider"),t.consume(D),t.exit("tableCellDivider"),T):D===null||Ie(D)?(t.exit("tableRow"),l(D)):ot(D)?xt(t,T,"whitespace")(D):(t.enter("data"),P(D))}function P(D){return D===null||D===124||Bt(D)?(t.exit("data"),T(D)):(t.consume(D),D===92?Y:P)}function Y(D){return D===92||D===124?(t.consume(D),P):P(D)}}function Mk(t,l){let i=-1,a=!0,u=0,s=[0,0,0,0],c=[0,0,0,0],d=!1,x=0,h,g,b;const y=new Ck;for(;++i<t.length;){const v=t[i],N=v[1];v[0]==="enter"?N.type==="tableHead"?(d=!1,x!==0&&(Hg(y,l,x,h,g),g=void 0,x=0),h={type:"table",start:Object.assign({},N.start),end:Object.assign({},N.end)},y.add(i,0,[["enter",h,l]])):N.type==="tableRow"||N.type==="tableDelimiterRow"?(a=!0,b=void 0,s=[0,0,0,0],c=[0,i+1,0,0],d&&(d=!1,g={type:"tableBody",start:Object.assign({},N.start),end:Object.assign({},N.end)},y.add(i,0,[["enter",g,l]])),u=N.type==="tableDelimiterRow"?2:g?3:1):u&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],b=Cu(y,l,s,u,void 0,b),s=[0,0,0,0]),c[2]=i)):N.type==="tableCellDivider"&&(a?a=!1:(s[1]!==0&&(c[0]=c[1],b=Cu(y,l,s,u,void 0,b)),s=c,c=[s[1],i,0,0])):N.type==="tableHead"?(d=!0,x=i):N.type==="tableRow"||N.type==="tableDelimiterRow"?(x=i,s[1]!==0?(c[0]=c[1],b=Cu(y,l,s,u,i,b)):c[1]!==0&&(b=Cu(y,l,c,u,i,b)),u=0):u&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")&&(c[3]=i)}for(x!==0&&Hg(y,l,x,h,g),y.consume(l.events),i=-1;++i<l.events.length;){const v=l.events[i];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=Ak(l.events,i))}return t}function Cu(t,l,i,a,u,s){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",d="tableContent";i[0]!==0&&(s.end=Object.assign({},ka(l.events,i[0])),t.add(i[0],0,[["exit",s,l]]));const x=ka(l.events,i[1]);if(s={type:c,start:Object.assign({},x),end:Object.assign({},x)},t.add(i[1],0,[["enter",s,l]]),i[2]!==0){const h=ka(l.events,i[2]),g=ka(l.events,i[3]),b={type:d,start:Object.assign({},h),end:Object.assign({},g)};if(t.add(i[2],0,[["enter",b,l]]),a!==2){const y=l.events[i[2]],v=l.events[i[3]];if(y[1].end=Object.assign({},v[1].end),y[1].type="chunkText",y[1].contentType="text",i[3]>i[2]+1){const N=i[2]+1,k=i[3]-i[2]-1;t.add(N,k,[])}}t.add(i[3]+1,0,[["exit",b,l]])}return u!==void 0&&(s.end=Object.assign({},ka(l.events,u)),t.add(u,0,[["exit",s,l]]),s=void 0),s}function Hg(t,l,i,a,u){const s=[],c=ka(l.events,i);u&&(u.end=Object.assign({},c),s.push(["exit",u,l])),a.end=Object.assign({},c),s.push(["exit",a,l]),t.add(i+1,0,s)}function ka(t,l){const i=t[l],a=i[0]==="enter"?"start":"end";return i[1][a]}const Dk={name:"tasklistCheck",tokenize:Ok};function Tk(){return{text:{91:Dk}}}function Ok(t,l,i){const a=this;return u;function u(x){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?i(x):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(x),t.exit("taskListCheckMarker"),s)}function s(x){return Bt(x)?(t.enter("taskListCheckValueUnchecked"),t.consume(x),t.exit("taskListCheckValueUnchecked"),c):x===88||x===120?(t.enter("taskListCheckValueChecked"),t.consume(x),t.exit("taskListCheckValueChecked"),c):i(x)}function c(x){return x===93?(t.enter("taskListCheckMarker"),t.consume(x),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),d):i(x)}function d(x){return Ie(x)?l(x):ot(x)?t.check({tokenize:Bk},l,i)(x):i(x)}}function Bk(t,l,i){return xt(t,a,"whitespace");function a(u){return u===null?i(u):l(u)}}function _k(t){return xb([rk(),pk(),wk(t),kk(),Tk()])}const Fk={};function Rk(t){const l=this,i=t||Fk,a=l.data(),u=a.micromarkExtensions||(a.micromarkExtensions=[]),s=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);u.push(_k(i)),s.push(tk()),c.push(nk(i))}const Lk="block min-w-0 max-w-full text-[13px] leading-[1.45] text-[var(--text)] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_h1]:mt-3 [&_h1]:mb-1 [&_h1]:text-[1.6em] [&_h1]:font-semibold [&_h2]:mt-3 [&_h2]:mb-1 [&_h2]:text-[1.35em] [&_h2]:font-semibold [&_h3]:mt-3 [&_h3]:mb-1 [&_h3]:text-[1.18em] [&_h3]:font-semibold [&_h4]:mt-3 [&_h4]:mb-1 [&_h4]:font-semibold [&_h5]:mt-3 [&_h5]:mb-1 [&_h5]:font-semibold [&_h6]:mt-3 [&_h6]:mb-1 [&_h6]:font-semibold [&_p]:my-2 [&_ul]:my-2 [&_ul]:pl-5 [&_ul]:list-disc [&_ol]:my-2 [&_ol]:pl-5 [&_ol]:list-decimal [&_blockquote]:my-2 [&_blockquote]:border-l-2 [&_blockquote]:border-[var(--line)] [&_blockquote]:bg-[rgba(255,255,255,0.02)] [&_blockquote]:px-3 [&_blockquote]:py-2 [&_a]:text-[var(--live)] [&_a]:underline [&_table]:w-full [&_table]:border-collapse [&_table]:overflow-hidden [&_table]:text-sm [&_th]:border [&_th]:border-[rgba(142,163,179,0.18)] [&_th]:bg-[rgba(255,255,255,0.03)] [&_th]:px-2 [&_th]:py-1.5 [&_th]:text-left [&_td]:border [&_td]:border-[rgba(142,163,179,0.14)] [&_td]:px-2 [&_td]:py-1.5 [&_code]:rounded-none [&_code]:bg-[rgba(255,255,255,0.06)] [&_code]:px-1.5 [&_code]:py-0.5 [&_code]:font-[JetBrains_Mono,monospace] [&_code]:text-[12px] [&_hr]:my-3 [&_hr]:border-0 [&_hr]:border-t [&_hr]:border-[var(--line)]";function zk({blockKey:t,className:l,children:i,collapsed:a,onToggleCollapsed:u}){const[s,c]=w.useState(!1),d=w.useMemo(()=>(String(l??"").match(/language-([\w-]+)/i)?.[1]??"text").toLowerCase(),[l]),x=w.useMemo(()=>String(i??"").replace(/\n$/,""),[i]),h=async()=>{try{await navigator.clipboard.writeText(x),c(!0),setTimeout(()=>c(!1),1200)}catch{c(!1)}},g=()=>{u(t)};return m.jsxs("div",{className:"my-2 block min-w-0 max-w-full overflow-hidden border border-[rgba(142,163,179,0.14)] bg-[rgba(255,255,255,0.01)]",children:[m.jsxs("div",{className:"flex cursor-pointer items-center justify-between gap-2 border-b border-[rgba(142,163,179,0.12)] bg-[rgba(255,255,255,0.03)] px-2.5 py-1.75",role:"button",tabIndex:0,onClick:g,onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),g())},"aria-label":a?"展开代码块":"折叠代码块",children:[m.jsx("span",{className:"font-[JetBrains_Mono,monospace] text-xs text-[#8ba0b0]",children:d}),m.jsx("div",{className:"flex items-center gap-2",children:m.jsx("button",{className:"cursor-pointer border border-(--line) bg-transparent px-2 py-1 text-xs text-(--muted) transition-[border-color,background-color,color] hover:border-[#2a3c4b] hover:bg-[rgba(142,163,179,0.08)]",type:"button",onClick:b=>{b.stopPropagation(),h()},children:s?"Copied":"Copy"})})]}),a?null:m.jsx("pre",{className:"m-0 block min-w-0 w-full max-w-full overflow-hidden bg-transparent p-0 whitespace-pre-wrap break-all wrap-anywhere",children:m.jsx("code",{className:`${l??""} block min-w-0 w-full max-w-full whitespace-pre-wrap break-all rounded-none bg-transparent px-0 py-0 font-[JetBrains_Mono,monospace] text-[13px] leading-[1.45] text-inherit wrap-anywhere`,children:x})})]})}function uy({content:t,className:l=""}){const[i,a]=w.useState({}),u=s=>{a(c=>({...c,[s]:!(c[s]??!0)}))};return m.jsx("div",{className:`${Lk} ${l}`.trim(),children:m.jsx(hE,{remarkPlugins:[Rk],rehypePlugins:[kE],components:{pre({node:s,children:c}){const d=w.Children.toArray(c)[0];if(!w.isValidElement(d))return m.jsx("pre",{children:c});const x=d.props.className,h=d.props.children,g=String(h??"").replace(/\n$/,""),b=String(x??"").toLowerCase(),y=s?.position?.start?.offset,v=typeof y=="number"?String(y):g.slice(0,64),N=`${b}::${v}`;return m.jsx(zk,{blockKey:N,className:x,collapsed:i[N]??!0,onToggleCollapsed:u,children:h})}},children:t})})}function Kn({value:t,options:l,onChange:i,disabled:a=!1,ariaLabel:u,triggerClassName:s=On,onClose:c}){const[d,x]=w.useState(!1),h=w.useRef(null),g=w.useRef(c);w.useEffect(()=>{g.current=c},[c]);const b=()=>{setTimeout(()=>{g.current?.()},0)};w.useEffect(()=>{if(!d)return;const v=N=>{h.current&&!h.current.contains(N.target)&&(x(!1),b())};return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[d,c]),w.useEffect(()=>{a&&d&&x(!1)},[a,d]);const y=w.useMemo(()=>{const v=l.find(N=>N.value===t);return v?v.label:l[0]?.label??"-"},[l,t]);return m.jsxs("div",{className:"relative min-w-0",ref:h,children:[m.jsxs("button",{type:"button",className:`${s} relative block w-full text-left leading-[1.2] outline-none transition-[border-color,background-color,color] ${d?"border-[#3b5868] bg-[rgba(24,39,47,0.92)]":"hover:border-[#36505f] hover:bg-[rgba(22,36,44,0.94)]"} disabled:cursor-not-allowed disabled:opacity-55`,onClick:()=>{a||x(v=>{const N=!v;return v&&!N&&b(),N})},onKeyDown:v=>{v.key==="Escape"&&(x(!1),b())},disabled:a,"aria-label":u,children:[m.jsx("span",{className:"block min-w-0 overflow-hidden pr-5 text-left text-ellipsis whitespace-nowrap",children:y}),m.jsx("span",{className:`pointer-events-none absolute top-1/2 right-2 inline-flex -translate-y-1/2 items-center justify-center leading-none ${d?"text-[#62cfc0]":"text-[var(--muted)]"}`,"aria-hidden":"true",children:m.jsx("svg",{viewBox:"0 0 16 16",width:"12",height:"12",focusable:"false",children:m.jsx("path",{d:"M4 6.5 8 10l4-3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),d?m.jsx("div",{className:"absolute inset-x-0 top-[calc(100%+4px)] z-[8] max-h-[220px] overflow-x-hidden overflow-y-auto border border-[#29414f] bg-[rgba(18,31,38,0.98)] p-0 overscroll-contain shadow-[inset_0_1px_0_rgba(255,255,255,0.03)]",children:l.map(v=>m.jsx("button",{type:"button",className:`block w-full border-0 border-l-2 px-2 py-1.5 text-left text-xs leading-[1.2] font-normal ${v.value===t?"border-l-[#62cfc0] bg-[rgba(50,215,186,0.12)] text-[#dffaf5]":"border-l-transparent bg-transparent text-[var(--text)] hover:bg-[rgba(22,36,44,0.9)]"}`,onClick:()=>{i(v.value),x(!1),b()},children:v.label},v.value))}):null]})}const $k={width:24,height:24};function cy({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:$k,content:'<path class="sty1tsbbo"/>',fallback:"lucide:x"})}function _l({size:t=14}){return m.jsx(cy,{width:String(t),height:String(t)})}const Ik={width:24,height:24};function sm({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:Ik,content:'<path class="vxmqaru-n"/>',fallback:"lucide:plus"})}function Hk({size:t=14}){return m.jsx(sm,{width:String(t),height:String(t)})}function Uk({className:t}){return m.jsxs("svg",{viewBox:"0 0 76.05 83.85","aria-hidden":"true",className:t,fill:"currentColor",children:[m.jsx("path",{d:"M12.29,64.28c-1.12,0-2.24-.47-3.03-1.38C3.29,56,0,47.17,0,38.03,0,17.06,17.06,0,38.03,0c5.29,0,10.41,1.07,15.21,3.17,2.02.88,2.95,3.24,2.06,5.27-.89,2.03-3.24,2.95-5.27,2.06-3.79-1.66-7.83-2.5-12.01-2.5-16.56,0-30.03,13.47-30.03,30.03,0,7.22,2.6,14.19,7.31,19.64,1.45,1.67,1.26,4.2-.41,5.64-.76.66-1.69.98-2.62.98Z"}),m.jsx("path",{d:"M63.76,64.29c-.93,0-1.86-.32-2.62-.98-1.67-1.45-1.85-3.97-.41-5.64,4.72-5.45,7.31-12.42,7.31-19.64,0-2.86-.4-5.69-1.19-8.4-.62-2.12.6-4.34,2.72-4.96,2.12-.62,4.34.6,4.96,2.72,1,3.44,1.51,7.02,1.51,10.64,0,9.14-3.29,17.97-9.26,24.88-.79.91-1.91,1.38-3.03,1.38Z"}),m.jsx("path",{d:"M42.14,69.28c0,1.54-.85,2.89-2.11,3.59v8.98c0,1.1-.9,2-2,2s-2-.9-2-2v-8.98c-1.26-.7-2.11-2.05-2.11-3.59s.85-2.89,2.11-3.59v-9.13c0-1.1.9-2,2-2s2,.9,2,2v9.13c1.26.7,2.11,2.05,2.11,3.59Z"}),m.jsx("path",{d:"M54.61,66.83c0,1.54-.85,2.89-2.11,3.59v4.87c0,1.11-.89,2-2,2s-2-.89-2-2v-4.88c-1.25-.7-2.1-2.04-2.1-3.58s.85-2.88,2.1-3.58v-9.77c0-1.11.9-2,2-2s2,.89,2,2v9.76c1.26.7,2.11,2.05,2.11,3.59Z"}),m.jsx("path",{d:"M28.61,66.83c0,1.54-.85,2.89-2.11,3.59v4.87c0,1.11-.9,2-2,2s-2-.89-2-2v-4.87c-1.26-.7-2.11-2.05-2.11-3.59s.85-2.89,2.11-3.59v-9.76c0-1.11.9-2,2-2s2,.89,2,2v9.76c1.26.7,2.11,2.05,2.11,3.59Z"}),m.jsx("circle",{cx:"64.46",cy:"15.07",r:"5.46"}),m.jsx("path",{d:"M48.51,23.51h-20.96c-3.11,0-5.92,1.26-7.96,3.3-2.04,2.03-3.3,4.84-3.3,7.95,0,6.22,5.04,11.26,11.26,11.26h20.96c3.1,0,5.92-1.26,7.95-3.3,2.04-2.03,3.3-4.85,3.3-7.96,0-6.21-5.04-11.25-11.25-11.25ZM27.82,39.56c-2.65,0-4.79-2.15-4.79-4.8s2.14-4.79,4.79-4.79,4.79,2.15,4.79,4.79-2.14,4.8-4.79,4.8ZM48.84,39.56c-2.65,0-4.8-2.15-4.8-4.8s2.15-4.79,4.8-4.79,4.79,2.15,4.79,4.79-2.15,4.8-4.79,4.8Z"})]})}function Ug({navItems:t,active:l,onChangeActive:i,onNavigateHome:a,collapsed:u=!1,onCloseDrawer:s,variant:c="inline"}){const d=c==="overlay",x=d?!0:!u,h=d?!1:u,g=d?`fixed left-0 top-0 bottom-0 z-50 w-52 bg-[var(--bg)] border-r border-[var(--line)] transition-transform duration-300 ease-in-out flex min-h-0 flex-col overflow-auto ${u?"-translate-x-full":"translate-x-0"}`:"flex min-h-0 flex-col overflow-auto border-r border-[var(--line)]";return m.jsxs("aside",{className:g,children:[m.jsxs("button",{className:`m-0 flex w-full cursor-pointer items-center border-0 border-b border-(--line) bg-transparent px-3 py-2.5 min-h-[60px] text-left font-inherit text-inherit leading-inherit transition-[background-color] hover:bg-[rgba(142,163,179,0.06)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--live)] focus-visible:outline-offset-[-2px] ${h?"justify-center":"gap-2"}`,type:"button",onClick:()=>{a?a():i("总览"),s?.()},"aria-label":"返回主页",title:"返回主页",children:[m.jsx(Uk,{className:"h-7 w-7 shrink-0 text-(--live)"}),x?m.jsx("strong",{className:"truncate text-[18px] leading-[1.1] font-bold text-(--live)",children:"TaskMeld"}):null]}),t.map(({label:b,icon:y})=>m.jsx("div",{children:m.jsx("button",{className:`w-full cursor-pointer border-0 py-2.5 min-h-[44px] font-medium transition-[background-color,color,box-shadow] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--live)] focus-visible:outline-offset-[-2px] ${h?"px-0 text-center":"px-3 text-left"} ${l===b?"bg-[rgba(50,215,186,0.12)] text-(--live) shadow-[inset_3px_0_0_0_var(--live)]":"bg-transparent text-(--muted) hover:bg-[rgba(142,163,179,0.08)] hover:text-(--text)"}`,onClick:()=>{i(b),s?.()},children:m.jsxs("span",{className:`flex items-center ${h?"justify-center":"gap-2.5"}`,children:[m.jsx(y,{width:"20",height:"20",className:"shrink-0"}),x?m.jsx("span",{children:b}):null]})})},b))]})}const vl="mb-2 flex items-center justify-between gap-2 px-3 pt-3",Ji="flex w-full min-w-0 flex-wrap gap-2 p-3 pt-0 mt-2 ",rh="h-full min-h-0 min-w-0 overflow-hidden",fy="detail-panel grid h-full min-h-0 content-start gap-[10px] overflow-x-hidden overflow-y-auto p-3",dy=vl,hy="shrink whitespace-nowrap",Gk="detail-head-status ml-auto flex min-w-0 flex-nowrap items-center justify-end gap-2",qk=Ji,Pk="mb-1.5 flex items-center justify-between gap-2",Vk="relative min-w-0",Yk="border-[#3b5868] bg-[rgba(24,39,47,0.92)]",Qk="absolute inset-x-0 top-[calc(100%+4px)] z-[4] grid max-h-[180px] overflow-y-auto overflow-x-hidden border border-[#29414f] bg-[rgba(18,31,38,0.98)] px-0 py-0 text-[var(--text)] shadow-none",Jk="grid min-w-0 cursor-pointer grid-cols-[10px_minmax(0,1fr)] items-center gap-x-3 px-2 py-1.5 text-xs leading-[1.2] text-[var(--text)] transition-[background-color,color] hover:bg-[rgba(22,36,44,0.9)]",Xk="bg-[rgba(50,215,186,0.12)]",Kk="m-0 h-[10px] w-[10px] cursor-pointer appearance-none border border-[var(--line)] bg-transparent transition-[border-color,background-color] hover:border-[#2a3c4b] checked:border-[var(--live)] checked:bg-[var(--live)] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[var(--live)] focus-visible:outline-offset-1",Zk="mx-2 my-1.5 text-xs text-[var(--muted)]",Wk="grid gap-2 overflow-hidden border border-[#29414f] bg-[rgba(18,31,38,0.9)] p-[10px]",e3="mb-1.5 flex min-w-0 items-center justify-between gap-2",t3="flex min-h-8 flex-wrap content-start gap-2",n3="inline-flex items-center gap-2 border border-[#29414f] bg-[rgba(24,39,47,0.92)] px-2 py-1 whitespace-nowrap",l3="cursor-pointer border-0 bg-transparent p-0 leading-none text-[var(--muted)] hover:text-[var(--bad)]",i3="grid items-stretch gap-2 border-t border-[rgba(142,163,179,0.12)] pt-2 grid-cols-[minmax(0,1fr)_auto]",r3="grid gap-1.5 border border-[#29414f] bg-[rgba(24,39,47,0.72)] p-2",a3="relative h-6 w-[54px] shrink-0 cursor-pointer border border-[#29414f] bg-[rgba(24,39,47,0.92)] p-0 transition-[background-color,border-color] disabled:cursor-not-allowed disabled:opacity-50",s3="border-[var(--live-25)] bg-[rgba(50,215,186,0.14)]",o3="absolute top-1/2 flex h-5 w-[24px] -translate-y-1/2 items-center justify-center border border-[var(--line)] bg-[rgba(18,31,38,0.98)] text-center text-[10px] leading-[20px] font-semibold text-[var(--muted)] transition-[left,right,color,border-color,background-color]",u3="left-[2px] right-auto",c3="right-[2px] left-auto border-[var(--live-25)] bg-[rgba(50,215,186,0.22)] text-[var(--live)]",Pi="yes",ai="no",Gg="grid min-w-0 items-center gap-x-2 gap-y-0 grid-cols-[40px_minmax(0,1fr)] max-[760px]:grid-cols-1 max-[760px]:gap-y-1.5",f3="grid min-w-0 gap-1.5",qg="font-[JetBrains_Mono,monospace]",Vi="min-w-0",va="mb-1.5 block text-xs text-[var(--muted)]",d3="block overflow-wrap-anywhere text-xs whitespace-pre-line break-words border border-[#29414f] bg-[rgba(18,31,38,0.9)] p-[10px] overflow-wrap-anywhere whitespace-pre-line break-words border border-[#29414f] bg-[rgba(18,31,38,0.9)] p-[10px]",Pg="inline-flex w-fit items-center rounded-none px-2 py-[2px] text-xs uppercase",Vg={good:"bg-[rgba(50,215,186,0.15)] text-[var(--live)]",live:"bg-[rgba(50,215,186,0.15)] text-[var(--live)]",warn:"bg-[rgba(255,184,77,0.16)] text-[var(--warn)]",bad:"bg-[rgba(255,107,107,0.16)] text-[var(--bad)]",muted:"bg-[rgba(142,163,179,0.2)] text-[#a5b9c8]"},Yg="mt-0 cursor-pointer border border-[var(--live-25)] bg-transparent px-[10px] py-2 font-semibold text-[var(--live)] hover:bg-[rgba(50,215,186,0.1)]";function h3({selectedNode:t,selectedWorkflowNode:l,agentOptions:i,dependencyOptions:a,routeTargetOptions:u,draftTitle:s,draftAgentId:c,draftExecutorSessionId:d,draftInstruction:x,draftDependsOn:h,draftAllowReject:g,draftMaxRejectCount:b,draftWorkflowLane:y,draftWorkflowRouteAllowed:v,draftWorkflowRouteTargets:N,isSavingWorkflowConfig:k,savingConfig:_,hasPipelineExecution:j,onChangeDraftTitle:B,onChangeDraftAgentId:$,onChangeDraftExecutorSessionId:ne,onChangeDraftInstruction:se,sessionOptions:I,onChangeDraftDependsOn:T,onChangeDraftAllowReject:P,onChangeDraftMaxRejectCount:Y,onChangeDraftWorkflowLane:D,onChangeDraftWorkflowRouteAllowed:X,onChangeDraftWorkflowRouteTarget:K,onBlurSave:U,onRetry:oe,statusTone:le,statusLabel:C}){const[R,V]=w.useState(!1),ae=w.useRef(null),M=Array.from(new Set(v.split(",").map(he=>he.trim()).filter(Boolean))),O=M.length>0?Array.from(new Set([Pi,ai,...M])).slice(0,5):[],L=O.filter(he=>he!==Pi),[A,xe]=w.useState(""),Se=_||k;w.useEffect(()=>{if(!R)return;const he=Ue=>{ae.current&&!ae.current.contains(Ue.target)&&(V(!1),U())};return document.addEventListener("mousedown",he),()=>{document.removeEventListener("mousedown",he)}},[R,U]),w.useEffect(()=>{V(!1)},[t?.id]),w.useEffect(()=>{xe("")},[t?.id]);const Ee=(he,Ue)=>{if(!he)return;const Te=Ue?Array.from(new Set([...h,he])):h.filter(de=>de!==he);T(Te)},Fe=t&&!j&&(t.status==="queued"||t.status==="blocked")?"ready":t?.status??"queued",tt=he=>{const Ue=he.map(de=>de.trim()).filter(de=>de&&de!==Pi&&de!==ai),Te=Ue.length>0||he.includes(ai)?Array.from(new Set([Pi,ai,...Ue])).slice(0,5):[];X(Te.join(","))},Ve=()=>{const he=A.trim();!he||he===Pi||he===ai||O.includes(he)||O.length>=5||(tt([...O,he]),xe(""))},Lt=he=>{he===Pi||he===ai||(tt(O.filter(Ue=>Ue!==he)),K(he,""))},Ut=()=>{tt([ai])},_t=()=>{for(const he of O)K(he,"");tt([])};return m.jsxs("aside",{className:fy,children:[m.jsxs("div",{className:dy,children:[m.jsx("h2",{className:hy,children:"节点详情"}),m.jsxs("div",{className:Gk,children:[Se?m.jsx("span",{className:`${Pg} ${Vg.live}`,children:"保存中"}):null,m.jsx("span",{className:`${Pg} ${Vg[le[Fe]??"muted"]}`,children:t?C[Fe]:"-"})]})]}),m.jsxs("div",{className:Vi,children:[m.jsx("label",{className:va,children:"节点标题"}),m.jsx("input",{className:On,value:s,onChange:he=>B(he.target.value),onBlur:U,disabled:!t})]}),m.jsxs("div",{className:Gg,children:[m.jsx("label",{className:"block text-xs text-(--muted)",children:"Agent"}),m.jsx(Kn,{value:c,options:(i.length?i:[c||"-"]).map(he=>({value:he,label:he})),onChange:he=>{$(he),U()},onClose:U,triggerClassName:On,disabled:!t,ariaLabel:"Agent"})]}),m.jsxs("div",{className:Gg,children:[m.jsx("label",{className:"block text-xs text-(--muted)",children:"会话"}),m.jsx(Kn,{value:d,options:(I.length?I:[{id:d||"-",title:d||"-"}]).map(he=>({value:he.id,label:he.id})),onChange:he=>{ne(he),U()},onClose:U,triggerClassName:On,disabled:!t,ariaLabel:"选择会话"})]}),m.jsxs("div",{className:f3,children:[m.jsx("label",{className:"block text-xs text-(--muted)",children:"让 Agent 干嘛"}),m.jsx("textarea",{className:Iu,value:x,onChange:he=>se(he.target.value),onBlur:U,disabled:!t,rows:5})]}),m.jsxs("div",{className:Vi,children:[m.jsx("label",{className:va,children:"泳道(workflow)"}),m.jsx(Kn,{value:y,options:[{value:"main",label:"main"},{value:"branch",label:"branch"}],onChange:he=>D(he==="branch"?"branch":"main"),triggerClassName:On,disabled:!t,ariaLabel:"选择泳道"})]}),m.jsxs("div",{className:Vi,children:[m.jsxs("div",{className:e3,children:[m.jsx("label",{className:"block text-xs text-[var(--muted)]",children:"路由 allowed(workflow)"}),m.jsx("button",{type:"button",className:`${a3} ${O.length>0?s3:""}`,onClick:O.length>0?_t:Ut,disabled:!t,"aria-pressed":O.length>0,"aria-label":"切换分流",title:"切换分流",children:m.jsx("span",{className:`${o3} ${O.length>0?c3:u3}`,children:O.length>0?"开":"关"})})]}),O.length>0?m.jsxs("div",{className:Wk,children:[m.jsx("div",{className:t3,children:O.length?O.map(he=>m.jsxs("span",{className:`${n3} ${qg}`,children:[m.jsx("span",{children:he}),m.jsx("button",{type:"button",className:l3,onClick:()=>Lt(he),disabled:!t||he===Pi||he===ai,"aria-label":`删除路由 ${he}`,children:"x"})]},he)):m.jsx("span",{className:`${qg} text-xs text-(--muted)`,children:"暂无 route,添加 2-5 个自定义值"})}),m.jsxs("div",{className:i3,children:[m.jsx("input",{className:`${fn} min-h-9 box-border`,value:A,onChange:he=>xe(he.target.value),onKeyDown:he=>{he.key==="Enter"&&(he.preventDefault(),Ve())},disabled:!t||O.length>=5,placeholder:"输入自定义 route,例如 holo"}),m.jsx("button",{type:"button",className:`${Yg} inline-grid h-9 w-9 min-w-9 place-items-center self-stretch p-0`,onClick:Ve,disabled:!t||!A.trim()||A.trim()===Pi||A.trim()===ai||O.length>=5,"aria-label":"添加路由",title:"添加路由",children:m.jsx(Hk,{})})]})]}):null]}),L.length>0?m.jsxs("div",{className:Vi,children:[m.jsx("label",{className:va,children:"分流目标(按 route 发给节点)"}),L.map(he=>m.jsxs("div",{className:r3,children:[m.jsx("label",{className:"mb-0 text-(--text)",children:he}),m.jsx(Kn,{value:N[he]??"",options:[{value:"",label:"未配置"},...u.map(Ue=>({value:Ue.id,label:`${Ue.id} - ${Ue.title}`}))],onChange:Ue=>K(he,Ue),triggerClassName:On,disabled:!t,ariaLabel:`选择 route ${he} 的目标节点`})]},he))]}):null,m.jsxs("div",{className:Vi,children:[m.jsx("div",{className:Pk,children:m.jsx("label",{className:"block text-xs text-(--muted)",children:"依赖节点(仅上游,可多选)"})}),m.jsxs("div",{className:Vk,ref:ae,children:[m.jsx("div",{className:`${On} ${R?Yk:""}`,title:h.join(","),role:"button",tabIndex:t?0:-1,onClick:()=>{t&&V(he=>{const Ue=!he;return he&&!Ue&&U(),Ue})},onKeyDown:he=>{t&&(he.key==="Enter"||he.key===" ")&&(he.preventDefault(),V(Ue=>{const Te=!Ue;return Ue&&!Te&&U(),Te}))},"aria-label":"编辑依赖节点",children:h.length?h.join(","):"-"}),R?m.jsx("div",{className:Qk,children:a.length?a.map(he=>m.jsxs("label",{className:`${Jk} ${h.includes(he.id)?Xk:""}`,children:[m.jsx("input",{type:"checkbox",className:Kk,checked:h.includes(he.id),onChange:Ue=>Ee(he.id,Ue.target.checked)}),m.jsxs("span",{className:"block min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:`${he.id} - ${he.title}`,children:[he.id," - ",he.title]})]},he.id)):m.jsx("p",{className:Zk,children:"暂无可选上游节点"})}):null]})]}),m.jsxs("div",{className:Vi,children:[m.jsx("label",{className:va,children:"允许打回上游"}),m.jsx(Kn,{value:g?"yes":"no",options:[{value:"no",label:"否"},{value:"yes",label:"是"}],onChange:he=>{P(he==="yes"),U()},onClose:U,triggerClassName:On,disabled:!t,ariaLabel:"选择是否允许打回上游"})]}),g?m.jsxs("div",{className:Vi,children:[m.jsx("label",{className:va,children:"最大打回次数"}),m.jsx("input",{className:On,type:"number",min:0,max:10,step:1,value:Number.isFinite(b)?b:0,onChange:he=>Y(Number(he.target.value)),onBlur:U,disabled:!t})]}):null,m.jsxs("div",{className:Vi,children:[m.jsx("label",{className:va,children:"产物"}),m.jsx("code",{className:d3,children:t&&t.artifacts.length?t.artifacts.map(he=>`${he.type}@v${he.schemaVersion} ${he.path} (${he.hash})`).join(`
|
|
38
|
+
`):"空"})]}),m.jsx("button",{className:Yg,onClick:oe,children:"重试节点"})]})}const Qg=`${fn} static max-h-[180px] overflow-y-auto overflow-x-hidden p-0`,Jg="grid min-w-0 cursor-pointer grid-cols-[10px_minmax(0,1fr)] items-center gap-x-3 px-2 py-1.5 text-xs leading-[1.2] text-[var(--text)] transition-[background-color,color] hover:bg-[rgba(142,163,179,0.08)]",Xg="bg-[rgba(50,215,186,0.2)]",Kg="m-0 h-[10px] w-[10px] cursor-pointer appearance-none border border-[var(--line)] bg-transparent transition-[border-color,background-color] hover:border-[#2a3c4b] checked:border-[var(--live)] checked:bg-[var(--live)] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[var(--live)] focus-visible:outline-offset-1",Zg="mx-2 my-1.5 text-xs text-[var(--muted)]",Wg="font-[JetBrains_Mono,monospace]",si="min-w-0",oi="mb-1.5 block text-xs text-[var(--muted)]",_s="block overflow-wrap-anywhere text-xs whitespace-pre-line break-words border border-[var(--line)] bg-[#0f171d] p-[10px]",m3="inline-flex w-fit items-center rounded-none px-2 py-[2px] text-xs uppercase",p3={good:"bg-[rgba(50,215,186,0.15)] text-[var(--live)]",live:"bg-[rgba(50,215,186,0.15)] text-[var(--live)]",warn:"bg-[rgba(255,184,77,0.16)] text-[var(--warn)]",bad:"bg-[rgba(255,107,107,0.16)] text-[var(--bad)]",muted:"bg-[rgba(142,163,179,0.2)] text-[#a5b9c8]"},x3="mt-0 cursor-pointer border border-[var(--live-25)] bg-transparent px-[10px] py-2 font-semibold text-[var(--live)] hover:bg-[rgba(50,215,186,0.1)]",g3="mt-0 cursor-pointer border border-[var(--bad)] bg-transparent px-[10px] py-2 font-semibold text-[var(--bad)] hover:bg-[rgba(255,107,107,0.1)]";function b3({selectedGroup:t,groupMemberOptions:l,groupUpstreamOptions:i,draftGroupId:a,draftGroupMembers:u,draftGroupUpstreams:s,draftGroupJoinPolicy:c,isSaving:d,isDeleting:x=!1,statusTone:h,statusLabel:g,onChangeDraftGroupId:b,onChangeDraftGroupMembers:y,onChangeDraftGroupUpstreams:v,onChangeDraftGroupJoinPolicy:N,onSave:k,onDelete:_}){const j=(B,$,ne,se)=>{const I=ne?[...new Set([...B,$])]:B.filter(T=>T!==$);se(I)};return m.jsxs("aside",{className:fy,children:[m.jsxs("div",{className:dy,children:[m.jsx("h2",{className:hy,children:"并行组详情"}),m.jsx("span",{className:`${m3} ${p3[t?h[t.status]??"muted":"muted"]}`,children:t?g[t.status]??t.status:"-"})]}),m.jsxs("div",{className:si,children:[m.jsx("label",{className:oi,children:"运行时间"}),m.jsx("code",{className:_s,children:t?`${t.startedAt??"-"} -> ${t.finishedAt??"-"}`:"-"})]}),m.jsxs("div",{className:si,children:[m.jsx("label",{className:oi,children:"组 ID"}),m.jsx("input",{className:fn,value:a,onChange:B=>b(B.target.value),disabled:!t,placeholder:"例如 g_yes_parallel"})]}),m.jsxs("div",{className:si,children:[m.jsx("label",{className:oi,children:"组内成员"}),m.jsx("div",{className:Qg,children:l.length?l.map(B=>m.jsxs("label",{className:`${Jg} ${u.includes(B.id)?Xg:""}`,children:[m.jsx("input",{className:Kg,type:"checkbox",checked:u.includes(B.id),onChange:$=>j(u,B.id,$.target.checked,y),disabled:!t}),m.jsxs("span",{className:"block min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:`${B.id} - ${B.title}`,children:[B.id," - ",B.title]})]},B.id)):m.jsx("p",{className:Zg,children:"暂无可选组成员"})}),m.jsx("small",{className:`${Wg} mt-1.5 block text-xs text-(--muted)`,children:"直接勾选/取消,不再依赖 Ctrl 多选"})]}),m.jsxs("div",{className:si,children:[m.jsx("label",{className:oi,children:"公共上游"}),m.jsx("div",{className:Qg,children:i.length?i.map(B=>m.jsxs("label",{className:`${Jg} ${s.includes(B.id)?Xg:""}`,children:[m.jsx("input",{className:Kg,type:"checkbox",checked:s.includes(B.id),onChange:$=>j(s,B.id,$.target.checked,v),disabled:!t}),m.jsxs("span",{className:"block min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",title:`${B.id} - ${B.title}`,children:[B.id," - ",B.title]})]},B.id)):m.jsx("p",{className:Zg,children:"暂无可选公共上游"})})]}),m.jsxs("div",{className:si,children:[m.jsx("label",{className:oi,children:"汇聚策略"}),m.jsx(Kn,{value:c,options:[{value:"all",label:"all"},{value:"any",label:"any"},{value:"quorum",label:"quorum"}],onChange:B=>N(B),triggerClassName:On,disabled:!t,ariaLabel:"选择并行组汇聚策略"})]}),m.jsxs("div",{className:si,children:[m.jsx("label",{className:oi,children:"成员运行态"}),m.jsx("code",{className:_s,children:t?.memberRuns.length?t.memberRuns.map(B=>`${B.id} | ${B.title} | ${g[B.status]??B.status} | agent:${B.executor.agentId} | artifacts=${B.artifacts.length}`).join(`
|
|
39
|
+
`):"空"})]}),m.jsxs("div",{className:si,children:[m.jsx("label",{className:oi,children:"组 Item 运行"}),m.jsx("code",{className:_s,children:t?.itemRuns.length?t.itemRuns.map(B=>`${B.itemKey} | ${g[B.status]??B.status} | attempt=${B.attempt} | ${B.startedAt??"-"} -> ${B.finishedAt??"-"}${B.lastError?` | error=${B.lastError}`:""}`).join(`
|
|
40
|
+
`):"空"})]}),m.jsxs("div",{className:si,children:[m.jsx("label",{className:oi,children:"组产物"}),m.jsx("code",{className:_s,children:t?.artifacts.length?t.artifacts.map(B=>`${B.type}@v${B.schemaVersion} ${B.path} (${B.hash})`).join(`
|
|
41
|
+
`):"空"})]}),m.jsxs("div",{className:si,children:[m.jsx("label",{className:oi,children:"最近错误"}),m.jsx("code",{className:_s,children:t?.lastError||"空"})]}),m.jsx("small",{className:`${Wg} block text-xs text-(--muted)`,children:d?"并行组保存中...":"并行组字段需手动保存"}),m.jsxs("div",{className:qk,children:[m.jsx("button",{className:x3,type:"button",onClick:k,disabled:!t||d||x,children:"保存并行组配置"}),m.jsx("button",{className:g3,type:"button",onClick:_,disabled:!t||d||x,children:x?"删除中...":"删除并行组"})]})]})}const y3={width:24,height:24};function v3({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:y3,content:'<path class="o4qrpmb9t"/>',fallback:"lucide:arrow-down"})}const S3={width:24,height:24};function N3({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:S3,content:'<path class="xc2dpbbgc"/>',fallback:"lucide:arrow-up"})}const w3={width:24,height:24};function C3({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:w3,content:'<path class="acmnv-6wx"/>',fallback:"lucide:braces"})}const E3={width:24,height:24};function A3({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:E3,content:'<path class="iqbry7bab"/>',fallback:"lucide:chevron-down"})}const k3={width:24,height:24};function my({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:k3,content:'<path class="zvgwoyb4l"/>',fallback:"lucide:chevron-right"})}const j3={width:24,height:24};function M3({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:j3,content:'<path class="hy0q690mc"/>',fallback:"lucide:pencil"})}const D3={width:24,height:24};function T3({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:D3,content:'<path class="luedrwb0i"/>',fallback:"lucide:play"})}const O3={width:24,height:24};function B3({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:O3,content:'<path class="toh88ac3w"/>',fallback:"lucide:plug"})}const _3={width:24,height:24};function F3({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:_3,content:'<g class="nrj6p8qat"><path class="m_zjykfeh"/><path class="pj05ulbnh"/></g>',fallback:"lucide:save"})}const R3={width:24,height:24};function L3({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:R3,content:'<path class="rs7v3hkcx"/>',fallback:"lucide:loader-circle"})}const z3={width:24,height:24};function $3({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:z3,content:'<rect class="rz71kybyz"/>',fallback:"lucide:square"})}const I3={width:24,height:24};function Lh({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:I3,content:'<path class="kqvvusbak"/>',fallback:"lucide:trash-2"})}const H3="font-[JetBrains_Mono,monospace]";function U3({title:t,statusText:l,startBatch:i,isOperating:a,onChangeStartBatch:u}){return m.jsxs("div",{className:"mb-3 grid p-3 pt-0 gap-2 border-b border-(--line) bg-transparent",children:[m.jsx("div",{className:`${H3} text-xs text-(--muted)`,children:t}),m.jsx("code",{className:"block max-h-30 overflow-auto whitespace-pre-wrap wrap-break-word border border-(--line) bg-[#0f171d] p-2.5 text-xs",children:l}),m.jsxs("div",{className:"grid grid-cols-[180px_minmax(0,1fr)] items-end gap-2.5 max-[760px]:grid-cols-1",children:[m.jsx("input",{className:`${Ls} min-w-0 text-[13px]`,value:i,onChange:s=>u(s.target.value),placeholder:"起始批次",inputMode:"numeric",disabled:a}),m.jsx("div",{"aria-hidden":"true"})]})]})}const G3="font-[JetBrains_Mono,monospace]",ah="mt-0 w-full cursor-pointer border border-[var(--live-25)] bg-transparent px-[10px] py-2 font-semibold text-[var(--live)] hover:bg-[rgba(50,215,186,0.1)]";function q3({pipelineId:t,schedulerMode:l,schedulerEnabled:i,onToggleScheduler:a,onSwitchSchedulerMode:u,onManualTick:s,embedded:c=!1}){const d=c?"border-b border-(--line) bg-[rgba(15,23,29,0.42)] mb-3":"";return m.jsxs("section",{"data-center-card":!c,className:d,children:[m.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2 px-3 pt-0",children:[m.jsxs("div",{className:"font-[JetBrains_Mono,monospace] text-xs text-(--muted)",children:["调度器配置(DAG-",t,")"]}),m.jsx("span",{className:G3,children:`mode=${l}`})]}),m.jsxs("div",{className:`${Ji} mb-0.5 grid grid-cols-3 max-[980px]:grid-cols-2 max-[640px]:grid-cols-1`,children:[m.jsx("button",{className:ah,type:"button",onClick:a,children:i?"停用调度器":"启用调度器"}),m.jsxs("button",{className:ah,type:"button",onClick:u,children:["切到",l==="manual"?"自动":"手动","模式"]}),m.jsx("button",{className:ah,type:"button",onClick:s,children:"手动推进一步"})]})]})}const e1="mb-3 overflow-hidden bg-[rgba(9,15,21,0.1)] px-3 [background-image:repeating-linear-gradient(-45deg,rgba(150,170,190,0.07)_0,rgba(150,170,190,0.07)_2px,transparent_2px,transparent_8px)]",t1="grid max-h-[calc(96px*2+8px+2px)] grid-flow-row auto-rows-[minmax(96px,auto)] grid-cols-[repeat(auto-fill,minmax(230px,1fr))] content-start gap-3 overflow-x-hidden overflow-y-auto pb-0",Eu="bg-[rgba(9,15,21,0.1)] [background-image:repeating-linear-gradient(-45deg,rgba(150,170,190,0.07)_0,rgba(150,170,190,0.07)_2px,transparent_2px,transparent_8px)]",n1="border-x border-[#29414f]",l1=" border-y border-[#29414f]",i1="px-3",r1="min-w-0",sh="inline-flex h-5 w-5 items-center justify-center border border-(--line) bg-transparent p-0.5 text-(--muted) leading-none hover:border-[#3b5568] hover:bg-[rgba(142,163,179,0.08)] hover:text-(--text) disabled:cursor-not-allowed disabled:opacity-50",P3="inline-flex h-5 w-5 items-center justify-center border border-[rgba(255,107,107,0.2)] bg-transparent p-0.5 text-(--bad) leading-none hover:bg-[rgba(255,107,107,0.1)] disabled:cursor-not-allowed disabled:opacity-50",V3="relative grid h-full min-h-0 w-full min-w-0 grid-rows-[minmax(0,1fr)_auto] content-start gap-1.25 overflow-hidden border border-[color:rgb(from_var(--live)_r_g_b_/_0.06)] bg-[linear-gradient(180deg,rgb(from_var(--live)_r_g_b_/_0.22)_0%,rgba(15,25,31,0.8)_100%)] backdrop-blur-[8px] px-3 py-2 text-left text-[var(--text)] shadow-[inset_0_1px_0_rgba(255,255,255,0.06),0_16px_32px_rgba(4,10,14,0.16)] transition-[border-color,background-color,box-shadow] before:pointer-events-none before:absolute before:inset-0 before:border before:border-transparent before:content-[''] before:[border-image:linear-gradient(180deg,rgba(120,255,230,0.38)_0%,rgba(88,214,192,0.18)_34%,rgba(50,215,186,0.06)_62%,rgba(50,215,186,0)_100%)_1] hover:border-[color:rgb(from_var(--live)_r_g_b_/_0.1)] hover:bg-[linear-gradient(180deg,rgb(from_var(--live)_r_g_b_/_0.3)_0%,rgba(18,29,35,0.86)_100%)] hover:shadow-[inset_0_1px_0_rgba(255,255,255,0.08),0_18px_34px_rgba(4,10,14,0.2)] hover:before:[border-image:linear-gradient(180deg,rgba(140,255,235,0.48)_0%,rgba(92,224,200,0.24)_34%,rgba(50,215,186,0.1)_62%,rgba(50,215,186,0)_100%)_1]",Y3="grid cursor-pointer gap-2 border border-[color:rgb(from_var(--live)_r_g_b_/_0.16)] bg-[linear-gradient(180deg,rgb(from_var(--live)_r_g_b_/_0.14)_0%,rgba(10,17,23,0.72)_100%)] backdrop-blur-[6px] p-2",Q3="border border-[#29414f] bg-[linear-gradient(180deg,rgba(18,31,38,0.92)_0%,rgba(14,24,30,0.92)_100%)] [background-image:repeating-linear-gradient(-45deg,rgba(150,170,190,0.07)_0,rgba(150,170,190,0.07)_2px,transparent_2px,transparent_8px)] shadow-[inset_0_1px_0_rgba(255,255,255,0.03),0_12px_28px_rgba(2,6,10,0.14)]",Yi="font-[JetBrains_Mono,monospace]",J3="inline-flex h-5 w-fit items-center justify-center px-1.5 text-[12px] leading-none uppercase",X3={good:"bg-[rgba(50,215,186,0.15)] text-(--live)",live:"bg-[rgba(50,215,186,0.15)] text-(--live)",warn:"bg-[rgba(255,184,77,0.16)] text-(--warn)",bad:"bg-[rgba(255,107,107,0.16)] text-(--bad)",muted:"bg-[rgba(142,163,179,0.2)] text-(--muted)"},Er="mt-0 inline-flex h-8 w-8 items-center justify-center border border-(--live-25) bg-transparent p-0 text-(--live) hover:bg-[rgba(50,215,186,0.1)]",a1="relative grid h-full min-h-0 w-full min-w-0 content-center justify-items-center gap-1 border border-dashed border-[rgba(50,215,186,0.18)] bg-[rgba(18,31,38,0.7)] p-2.5 text-center text-(--text) shadow-[inset_0_1px_0_rgba(255,255,255,0.03)] hover:border-[rgba(50,215,186,0.3)] hover:bg-[rgba(23,39,47,0.84)]",K3=t=>{const l=t.trim();return l?l.startsWith("@")?l:`@${l}`:"未配置 Agent"};function Z3({sections:t,selectedNodeId:l,selectedGroupId:i,activePipelineId:a,onSelectNode:u,onSelectGroup:s,onRun:c,onStop:d,deletingEntity:x,deletingPipeline:h,savingNodeOrder:g,onToggleEditing:b,onOpenWorkflowJson:y,onOpenPlugins:v,onRenamePipeline:N,onRequestDeletePipeline:k,onRequestDeleteNode:_,onRequestDeleteGroup:j,onRequestCreateNode:B,onMoveNode:$,onReorderNode:ne,onChangeBatchStartBatch:se,onStartRemoteKeywordBatchRun:I,onToggleScheduler:T,onSwitchSchedulerMode:P,onManualTick:Y,statusTone:D,statusLabel:X}){const[K,U]=w.useState(""),[oe,le]=w.useState(""),[C,R]=w.useState("before"),[V,ae]=w.useState({}),[M,O]=w.useState(null),[L,A]=w.useState(""),xe=()=>{U(""),le(""),R("before")},Se=(de,Ae)=>{const Xe=de?document.querySelector(`[data-pipeline-node-id="${de}"]`):null;return Xe&&(Ae.compareDocumentPosition(Xe)&Node.DOCUMENT_POSITION_PRECEDING)!==0?"after":"before"},Ee=(de,Ae,Xe,it)=>{if(!Xe||g)return;const nt=`${Ae}:${it}`;U(nt),de.dataTransfer.effectAllowed="move",de.dataTransfer.setData("text/plain",nt)},Fe=(de,Ae,Xe,it)=>{const nt=`${Ae}:${it}`;if(!Xe||g||!K||K===nt)return;de.preventDefault(),de.dataTransfer.dropEffect="move";const[,pt]=K.split(":"),H=Se(pt??"",de.currentTarget);oe!==it&&le(it),C!==H&&R(H)},tt=(de,Ae,Xe,it)=>{if(!Xe||g)return;de.preventDefault();const nt=de.dataTransfer.getData("text/plain")||K;if(xe(),!nt||nt===it)return;const[pt,H]=nt.split(":");if(pt!==Ae||!H||H===it)return;const ve=Se(H,de.currentTarget);ne(Ae,H,it,ve)},Ve=(de,Ae,Xe,it)=>{const nt=Lt(Ae.status,it),pt=[V3,l===Ae.id&&a===de?"border-[#32d7ba]":"",Xe?"cursor-grab active:cursor-grabbing":"",g?"cursor-wait opacity-70":"",oe===Ae.id?`border-[#32d7ba] bg-[linear-gradient(180deg,rgb(from_var(--live)_r_g_b_/_0.38)_0%,rgba(18,33,40,0.94)_100%)] ${C==="before"?"shadow-[inset_0_2px_0_#32d7ba]":"shadow-[inset_0_-2px_0_#32d7ba]"}`:""].join(" ");return m.jsxs("div",{className:pt,"data-pipeline-node-id":Ae.id,onClick:H=>{H.stopPropagation(),u(de,Ae.id)},onKeyDown:H=>Ut(H,de,Ae.id),onDragStart:H=>Ee(H,de,Xe,Ae.id),onDragOver:H=>Fe(H,de,Xe,Ae.id),onDragLeave:()=>{oe===Ae.id&&le("")},onDrop:H=>tt(H,de,Xe,Ae.id),onDragEnd:xe,role:"button",tabIndex:0,draggable:Xe&&!g,children:[m.jsxs("div",{className:"min-w-0 space-y-1",children:[m.jsx("strong",{className:"block overflow-hidden text-ellipsis whitespace-nowrap text-base leading-tight font-medium",children:Ae.title}),m.jsxs("div",{className:"flex min-w-0 items-center gap-2 text-xs leading-none text-(--muted)",children:[m.jsxs("small",{className:`${Yi} inline-block max-w-[45%] overflow-hidden text-ellipsis whitespace-nowrap text-xs`,title:Ae.id,children:["#",Ae.id]}),m.jsx("small",{className:`${Yi} inline-block flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-right text-xs`,title:Ae.executor.agentId,children:K3(Ae.executor.agentId)})]})]}),m.jsxs("div",{className:"flex items-end justify-between gap-2",children:[m.jsx("small",{className:`${J3} ${X3[D[nt]??"muted"]}`,children:X[nt]}),Xe?m.jsxs("div",{className:"flex items-center gap-1.5 self-end",children:[m.jsx("button",{className:sh,type:"button",onClick:H=>{H.stopPropagation(),$(de,Ae.id,"up")},disabled:x||g,"aria-label":"上移节点",title:"上移节点",children:m.jsx(N3,{className:"h-full w-full"})}),m.jsx("button",{className:sh,type:"button",onClick:H=>{H.stopPropagation(),$(de,Ae.id,"down")},disabled:x||g,"aria-label":"下移节点",title:"下移节点",children:m.jsx(v3,{className:"h-full w-full"})}),m.jsx("button",{className:P3,type:"button",onClick:H=>{H.stopPropagation(),_(de,Ae.id)},disabled:x||g,"aria-label":"删除节点",title:"删除节点",children:m.jsx(Lh,{className:"h-full w-full"})})]}):null]})]},Ae.id)},Lt=(de,Ae)=>!Ae&&(de==="queued"||de==="blocked")?"ready":de,Ut=(de,Ae,Xe)=>{de.key!=="Enter"&&de.key!==" "||(de.preventDefault(),u(Ae,Xe))},_t=(de,Ae)=>m.jsx("div",{className:`${i1} ${Ae?.wrapperClassName??""}`.trim(),children:m.jsx("div",{className:`${r1} ${Ae?.contentClassName??""}`.trim(),children:de})}),he=(de,Ae)=>_t(de,{wrapperClassName:Ae?.wrapperClassName,contentClassName:[`${Yi} border border-dashed border-[#2b3e4d] text-xs text-[#6f8798]`,Ae?.padded===!1?"":"p-3",Ae?.contentClassName??""].filter(Boolean).join(" ")}),Ue=(de,Ae,Xe,it,nt,pt,H,ve)=>{if(Ae.length===0)return null;const Oe=new Map(Ae.map(ze=>[ze.id,ze])),At=new Map(it.map(ze=>[ze.id,ze])),ie=new Map;for(const ze of it)for(const Re of ze.members)ie.set(Re,ze.id);const pe=new Map(Xe.map((ze,Re)=>[ze,Re])),je=[...Ae].sort((ze,Re)=>{const Le=pe.get(ze.id)??Number.MAX_SAFE_INTEGER,et=pe.get(Re.id)??Number.MAX_SAFE_INTEGER;return Le!==et?Le-et:ze.id.localeCompare(Re.id)}),Be=[],_e=new Set;for(const ze of je){const Re=ie.get(ze.id)?.trim();if(!Re){Be.push({type:"node",node:ze});continue}if(_e.has(Re))continue;if((At.get(Re)?.members??[]).map(et=>Oe.get(et)).filter(et=>!!et).length<2){Be.push({type:"node",node:ze});continue}_e.add(Re),Be.push({type:"group",groupId:Re})}return m.jsx("div",{className:e1,children:m.jsxs("div",{className:`${t1} ${nt}`,children:[Be.map(ze=>ze.type==="node"?Ve(de,ze.node,pt,H):m.jsxs("div",{className:`${Y3} ${i===ze.groupId&&a===de?"border-[#32d7ba]":""}`,"data-pipeline-group-id":ze.groupId,onClick:()=>s(de,ze.groupId),onKeyDown:Re=>{Re.key!=="Enter"&&Re.key!==" "||(Re.preventDefault(),s(de,ze.groupId))},role:"button",tabIndex:0,children:[pt?m.jsx("button",{className:`${sh}`,type:"button",onClick:Re=>{Re.stopPropagation(),j(de,ze.groupId)},disabled:x,children:"删除组"}):null,m.jsxs("div",{className:`${Yi} text-xs text-[#95b4c8]`,children:["并行组: ",ze.groupId]}),m.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(210px,1fr))] gap-3",children:(At.get(ze.groupId)?.members??[]).map(Re=>Oe.get(Re)).filter(Re=>!!Re).map(Re=>Ve(de,Re,pt,H))})]},ze.groupId)),ve?m.jsxs("button",{className:a1,type:"button",onClick:B,children:[m.jsx("span",{className:`${Yi} text-[18px]`,children:"+"}),m.jsx("strong",{children:"新增对象"}),m.jsx("small",{children:"点击创建节点或并行组"})]}):null]})})},Te=({pipelineId:de,title:Ae,canDelete:Xe,nodes:it,workflowNodeOrder:nt,parallelGroups:pt,branchNodes:H,pluginState:ve,schedulerPluginEnabled:Oe,schedulerMode:At,schedulerEnabled:ie,batchStartBatch:pe,isBatchOperating:je,batchRunStatus:Be,batchRunProcessedItems:_e,batchRunTotalItems:ze,batchRunProcessedBatches:Re,batchRunTotalBatches:Le,batchRunBatchSize:et,batchRunError:zt,isRunning:qe,hasPipelineExecution:kn,isEditing:Ft,tone:on="default",showActions:ge,emptyMessage:Nl,showTopBand:dn=!0,showBottomBand:Sn=!0,collapsed:fl=!1})=>{const dl=on==="primary"||on==="secondary"?"border-[#29414f]":"",Ll=Be!==void 0?`status=${Be} | ${_e??0}/${ze??0} | batch ${Re??0}/${Le??0} | size=${Be==="idle"?5:et??0}${zt?` | error=${zt}`:""}`:"暂无批跑状态",Ce=ve.enabled,rt=[...it,...H??[]].some(Tt=>Tt.status==="running"),gt=!!(qe||Be==="running"||rt),Hn=Ce?!!je||Be==="running":gt,Ge=`grid grid-cols-[32px_minmax(0,1fr)_32px] ${dn&&Sn?"grid-rows-[32px_auto_32px]":dn?"grid-rows-[32px_auto]":Sn?"grid-rows-[auto_32px]":"grid-rows-[auto]"}`,jn=dn?"row-start-2":"row-start-1",ht=dn?"row-start-3":"row-start-2",rn=fl===!0,hn=M===de,Yt=async()=>{const Tt=L.trim();if(!Tt){A(Ae),O(null);return}if(Tt===Ae.trim()){O(null);return}(await N(de,Tt)).ok&&O(null)};return m.jsxs("div",{className:`${Ge} scroll-mt-16`,"data-pipeline-section-id":de,children:[dn?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:Eu,"aria-hidden":"true"}),m.jsx("div",{className:n1,"aria-hidden":"true"}),m.jsx("div",{className:Eu,"aria-hidden":"true"})]}):null,m.jsx("div",{className:`${l1} ${jn}`,"aria-hidden":"true"}),m.jsxs("section",{className:`${Q3} ${dl} ${jn}`.trim(),children:[m.jsx("div",{className:`${i1} ${rn?"border-b-0 mb-0":"border-b border-(--line) mb-3"} bg-transparent`,children:m.jsxs("div",{className:`${r1} flex items-center justify-between gap-3 max-[760px]:flex-col`,children:[m.jsx("div",{children:hn?m.jsx("input",{className:`${Yi} h-8 w-[min(420px,58vw)] border border-(--line) bg-[rgba(15,23,29,0.82)] px-2 text-sm italic text-(--text) outline-none focus:border-(--live)`,value:L,onChange:Tt=>A(Tt.target.value),onBlur:()=>{Yt()},onKeyDown:Tt=>{if(Tt.key==="Enter"){Tt.preventDefault(),Yt();return}Tt.key==="Escape"&&(Tt.preventDefault(),A(Ae),O(null))},autoFocus:!0}):m.jsx("p",{className:"m-0 cursor-text whitespace-nowrap text-base font-medium italic leading-none",title:"双击修改标题",onDoubleClick:()=>{O(de),A(Ae)},children:Ae})}),m.jsxs("div",{className:"flex w-full min-w-0 flex-wrap gap-2 ml-auto justify-end",children:[m.jsx("button",{className:Er,onClick:()=>ae(Tt=>({...Tt,[de]:!rn})),"aria-label":rn?"展开流水线":"折叠流水线",title:rn?"展开流水线":"折叠流水线",children:rn?m.jsx(my,{className:"h-4 w-4"}):m.jsx(A3,{className:"h-4 w-4"})}),m.jsx("button",{className:`${Er} ${gt?"border-[rgba(255,107,107,0.35)] text-(--bad) hover:bg-[rgba(255,107,107,0.1)]":"border-(--line) text-(--muted)"}`,onClick:()=>d(de),disabled:!gt||!!je,"aria-label":gt?"停止流水线":"流水线未运行",title:gt?"停止流水线":"流水线未运行",children:m.jsx($3,{className:"h-3.5 w-3.5"})}),m.jsx("button",{className:Er,onClick:()=>{if(Ce){I(de);return}c(de)},disabled:Hn,"aria-label":Ce?Hn?"远程批跑中":"启动远程批跑":qe?"运行启动中":"启动运行",title:Ce?Hn?"远程批跑中":"启动远程批跑":qe?"运行启动中":"启动运行",children:Hn?m.jsx(L3,{className:"h-4 w-4 animate-spin"}):m.jsx(T3,{className:"h-4 w-4"})}),m.jsx("button",{className:Er,onClick:()=>v(de),"aria-label":"插件配置",title:"插件配置",children:m.jsx(B3,{className:"h-4 w-4"})}),m.jsx("button",{className:Er,onClick:()=>y(de),"aria-label":"查看工作流 JSON",title:"查看工作流 JSON",children:m.jsx(C3,{className:"h-4 w-4"})}),m.jsx("button",{className:`${Er} ${Ft?"border-(--warn) text-(--warn) hover:bg-[rgba(255,184,77,0.12)]":""}`,onClick:()=>b(de,!Ft),"aria-label":Ft?"保存编辑":"进入编辑",title:Ft?"保存编辑":"进入编辑",children:Ft?m.jsx(F3,{className:"h-4 w-4"}):m.jsx(M3,{className:"h-4 w-4"})}),m.jsx("button",{className:Er,onClick:()=>k(de),disabled:!Xe||h,"aria-label":"删除流水线",title:Xe?"删除流水线":"至少保留一条流水线",children:m.jsx(Lh,{className:"h-4 w-4"})})]})]})}),!rn&&Oe?m.jsx(q3,{pipelineId:de,schedulerMode:At,schedulerEnabled:ie,onToggleScheduler:()=>T(de,!ie),onSwitchSchedulerMode:()=>P(de,At==="manual"?"auto":"manual"),onManualTick:()=>Y(de),embedded:!0}):null,!rn&&ve.enabled?m.jsx(U3,{title:`远程关键词池批跑(DAG-${de})`,statusText:Ll,startBatch:pe??"1",isOperating:!!je,onChangeStartBatch:Tt=>se(de,Tt)}):null,!rn&&it.length>0?Ue(de,it,nt,pt,"max-h-none",Ft,kn,Ft):rn?null:m.jsx("div",{className:e1,children:m.jsxs("div",{className:`${t1} max-h-none`,children:[he(Nl??"暂无节点",{wrapperClassName:"px-0"}),Ft?m.jsxs("button",{className:a1,type:"button",onClick:B,children:[m.jsx("span",{className:`${Yi} text-[18px]`,children:"+"}),m.jsx("strong",{children:"新增对象"}),m.jsx("small",{children:"点击创建节点或并行组"})]}):null]})}),!rn&&H?m.jsxs("div",{children:[_t("支线节点",{contentClassName:`${Yi} mb-2 text-xs text-[#8da2b3]`}),H.length>0?Ue(de,H,nt,pt,"max-h-none",Ft,kn,!1):he("暂无支线节点(可在 workflow.lane=branch 后显示)",{wrapperClassName:"mb-3",contentClassName:"p-2.5"})]}):null]}),m.jsx("div",{className:`${l1} ${jn}`,"aria-hidden":"true"}),Sn?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:`${Eu} ${ht}`,"aria-hidden":"true"}),m.jsx("div",{className:`${n1} ${ht}`,"aria-hidden":"true"}),m.jsx("div",{className:`${Eu} ${ht}`,"aria-hidden":"true"})]}):null]},de)};return m.jsx("section",{"data-center-card":!0,"data-pipeline-card":!0,className:"min-w-0",children:t.map((de,Ae)=>{const Xe=V[de.pipelineId]===!0,it=de.pipeline.filter(H=>H.lane!=="branch"),nt=de.pipeline.filter(H=>H.lane==="branch"),pt=Te({pipelineId:de.pipelineId,title:de.title,canDelete:de.canDelete,nodes:it,workflowNodeOrder:de.workflowNodeOrder,parallelGroups:de.parallelGroups,branchNodes:nt,pluginState:de.pluginState,schedulerPluginEnabled:de.schedulerPluginEnabled,schedulerMode:de.schedulerMode,schedulerEnabled:de.schedulerEnabled,batchStartBatch:de.batchStartBatch,isBatchOperating:de.isBatchOperating,batchRunStatus:de.batchRunStatus,batchRunProcessedItems:de.batchRunProcessedItems,batchRunTotalItems:de.batchRunTotalItems,batchRunProcessedBatches:de.batchRunProcessedBatches,batchRunTotalBatches:de.batchRunTotalBatches,batchRunBatchSize:de.batchRunBatchSize,batchRunError:de.batchRunError,isRunning:de.isRunning,hasPipelineExecution:de.hasPipelineExecution,isEditing:de.isEditing,tone:Ae===0?"primary":"secondary",showActions:!0,emptyMessage:`当前流水线 ${de.pipelineId} 暂无节点`,showTopBand:Ae===0,showBottomBand:!0,collapsed:Xe});return Ae===0?pt:m.jsx(w.Fragment,{children:pt},`pipeline-block-${de.pipelineId}`)})})}const Au="font-[JetBrains_Mono,monospace]",s1="h-4 w-4 rounded-none border border-(--line) bg-[#0f171d] text-(--live) accent-(--live)",ku="min-w-0",ju="mb-1.5 block text-xs text-(--muted)",W3="mt-0 cursor-pointer border border-(--live-25) bg-transparent px-2 py-2 font-semibold text-(--live) hover:bg-[rgba(50,215,186,0.1)]";function ej({pipelineId:t,pluginState:l,onClose:i,onSave:a}){const[u,s]=w.useState(l);return m.jsxs("div",{children:[m.jsxs("div",{className:vl,children:[m.jsxs("h2",{children:["插件配置(DAG-",t,")"]}),m.jsx("button",{className:Xn,type:"button",onClick:i,"aria-label":"关闭",children:m.jsx(_l,{})})]}),m.jsx("p",{className:`${Ol} ${Au}`,children:"所有流水线共享同一套插件能力;这里仅配置当前流水线要不要打开对应插件。"}),m.jsxs("label",{className:"flex items-center justify-between gap-3 border-y border-(--line) bg-transparent p-3 text-sm text-(--text)",children:[m.jsxs("div",{className:"grid gap-1",children:[m.jsx("strong",{children:"远程关键词池批跑"}),m.jsxs("span",{className:`${Au} text-xs text-(--muted)`,children:["启用后会在 DAG-",t," 卡片中显示该插件面板。"]})]}),m.jsx("input",{className:s1,type:"checkbox",checked:u.remoteBatch.enabled,onChange:c=>s(d=>({...d,remoteBatch:{...d.remoteBatch,enabled:c.target.checked}}))})]}),u.remoteBatch.enabled?m.jsxs("div",{className:"grid gap-3 border-b border-(--line) bg-transparent p-3",children:[m.jsxs("div",{className:ku,children:[m.jsx("label",{className:ju,children:"远程关键词池地址"}),m.jsx("input",{className:Ls,value:u.remoteBatch.url,onChange:c=>s(d=>({...d,remoteBatch:{...d.remoteBatch,url:c.target.value}})),placeholder:"http://host/path",spellCheck:!1})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-3 max-[760px]:grid-cols-1",children:[m.jsxs("div",{className:ku,children:[m.jsx("label",{className:ju,children:"每批可跑个数"}),m.jsx("input",{className:Ls,value:String(u.remoteBatch.batchSize),onChange:c=>s(d=>({...d,remoteBatch:{...d.remoteBatch,batchSize:Math.max(1,Math.trunc(Number(c.target.value)||1))}})),placeholder:"5",inputMode:"numeric"})]}),m.jsxs("div",{className:ku,children:[m.jsx("label",{className:ju,children:"默认起始批次"}),m.jsx("input",{className:Ls,value:String(u.remoteBatch.startBatch),onChange:c=>s(d=>({...d,remoteBatch:{...d.remoteBatch,startBatch:Math.max(1,Math.trunc(Number(c.target.value)||1))}})),placeholder:"1",inputMode:"numeric"})]})]}),m.jsxs("div",{className:ku,children:[m.jsx("label",{className:ju,children:"跑哪个字段"}),m.jsx("input",{className:Ls,value:u.remoteBatch.sourceField,onChange:c=>s(d=>({...d,remoteBatch:{...d.remoteBatch,sourceField:c.target.value}})),placeholder:"例如 list30 或 data.list30",spellCheck:!1}),m.jsx("small",{className:`${Au} mt-1.5 block text-xs text-(--muted)`,children:"支持点路径;取不到时后端会退回默认字段探测。"})]})]}):null,m.jsxs("label",{className:"mt-3 flex items-center justify-between gap-3 border-y border-(--line) bg-transparent p-3 text-sm text-(--text)",children:[m.jsxs("div",{className:"grid gap-1",children:[m.jsx("strong",{children:"调度器"}),m.jsx("span",{className:`${Au} text-xs text-(--muted)`,children:"启用后显示调度器卡片,并允许自动/手动调度。"})]}),m.jsx("input",{className:s1,type:"checkbox",checked:u.scheduler.enabled,onChange:c=>s(d=>({...d,scheduler:{enabled:c.target.checked}}))})]}),m.jsx("div",{className:`${Ji} mt-3`,children:m.jsx("button",{className:W3,type:"button",onClick:()=>a(u),children:"保存插件配置"})})]})}class om extends Error{status;body;constructor(l,i,a){super(l),this.name="ApiError",this.status=i,this.body=a}}const tj="",um=tj,nj=um.replace(/^http/i,"ws");async function dt(t,l){const i=await fetch(`${um}${t}`,l),a=await i.json().catch(()=>null);if(!i.ok)throw new om(`request_failed:${t}`,i.status,a);return a}const vn=(t,l)=>`/api/pipelines/${t}${l}`;async function o1(){const t=await dt("/api/pipelines");return Array.isArray(t.items)?t.items:[]}async function lj(t){return dt("/api/pipelines",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function ij(t){return dt(vn(t,""),{method:"DELETE"})}async function rj(t,l){return dt(vn(t,""),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:l})})}async function aj(t){return(await dt(vn(t,"/workflow"))).workflow??null}async function yl(t,l){return dt(vn(t,"/workflow"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workflow:l})})}async function sj(t,l){return dt(vn(t,"/scheduler/toggle"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:l})})}async function oj(t,l){return dt(vn(t,"/scheduler/mode"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:l})})}async function uj(t){return dt(vn(t,"/tick"),{method:"POST"})}async function cj(t,l,i){return dt(vn(t,`/nodes/${l}/retry`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}async function fj(t){return dt(vn(t,"/run"),{method:"POST"})}async function dj(t){return dt(vn(t,"/stop"),{method:"POST"})}async function hj(t,l){return dt(vn(t,"/batch-run/start-remote"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l??{})})}async function mj(t){return dt(vn(t,"/batch-run/stop"),{method:"POST"})}async function pj(t){const l=await dt(vn(t,"/outputs"));return Array.isArray(l.items)?l.items:[]}async function xj(){const t=await dt("/api/pipeline-links");return Array.isArray(t.items)?t.items:[]}async function gj(t){return dt("/api/pipeline-links",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function bj(t,l){return dt(`/api/pipeline-links/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function yj(t){return dt(`/api/pipeline-links/${t}`,{method:"DELETE"})}async function vj(t){const l=await dt(vn(t,"/queue"));return Array.isArray(l.items)?l.items:[]}async function Sj(t,l){return dt(vn(t,`/queue/${l}/retry`),{method:"POST"})}async function Nj(t,l,i){return dt(vn(t,`/queue/${l}/cancel`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reason:"canceled_by_user"})})}async function wj(t){return dt(vn(t,"/queue/drain"),{method:"POST"})}const Cj={width:24,height:24};function Ej({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:Cj,content:'<g class="nrj6p8qat"><path class="oqp-zlo1c"/><path class="eslg_bc-y"/><path class="vxr-ddbnw"/></g>',fallback:"lucide:refresh-cw"})}const oh="px-3 py-1.5 text-xs font-semibold border border-[var(--line)] cursor-pointer bg-transparent",uh="bg-[var(--live-15)] text-[var(--live)] border-[var(--live-35)]",Aj={pending:"warn",running:"live",success:"good",failed:"bad",canceled:"muted"},kj={pending:"等待中",running:"运行中",success:"成功",failed:"失败",canceled:"已取消"};function jj({pipelines:t}){const[l,i]=w.useState([]),[a,u]=w.useState(!0),[s,c]=w.useState(""),[d,x]=w.useState(!1),[h,g]=w.useState(""),[b,y]=w.useState(""),[v,N]=w.useState("continue"),[k,_]=w.useState(100),[j,B]=w.useState(!1),[$,ne]=w.useState(""),[se,I]=w.useState([]),[T,P]=w.useState([]),[Y,D]=w.useState(""),[X,K]=w.useState("links"),U=w.useCallback(async()=>{try{const L=await xj();i(L)}catch{}u(!1)},[]),oe=w.useCallback(async L=>{if(L)try{const A=await vj(L);I(A)}catch{I([])}},[]),le=w.useCallback(async L=>{if(L)try{const A=await pj(L);P(A)}catch{P([])}},[]);w.useEffect(()=>{U()},[U]),w.useEffect(()=>{X==="queue"&&$&&oe($)},[X,$,oe]),w.useEffect(()=>{X==="outputs"&&Y&&le(Y)},[X,Y,le]);const C=async()=>{if(!(!h||!b)){B(!0),c("");try{const L=await gj({fromPipelineId:h,toPipelineId:b,onJobFailed:v,maxPendingJobs:k});L.ok?(x(!1),g(""),y(""),await U()):c(L.error??"创建失败")}catch(L){c(String(L))}B(!1)}},R=async L=>{await bj(L.id,{enabled:!L.enabled}),await U()},V=async L=>{await yj(L),await U()},ae=async(L,A)=>{await Sj(L,A),await oe(L)},M=async(L,A)=>{await Nj(L,A),await oe(L)},O=async L=>{await wj(L),await oe(L)};return a?m.jsx("div",{className:"p-4 text-xs text-[var(--muted)]",children:"加载中..."}):m.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[m.jsxs("div",{className:"flex items-center gap-1 px-3 py-2 border-b border-[var(--line)]",children:[m.jsx("button",{className:`${oh} ${X==="links"?uh:""}`,onClick:()=>K("links"),children:"链接"}),m.jsx("button",{className:`${oh} ${X==="queue"?uh:""}`,onClick:()=>K("queue"),children:"队列"}),m.jsx("button",{className:`${oh} ${X==="outputs"?uh:""}`,onClick:()=>K("outputs"),children:"产物"})]}),m.jsxs("div",{className:"flex-1 overflow-y-auto min-h-0",children:[X==="links"&&m.jsxs("div",{className:"p-3",children:[m.jsxs("div",{className:"flex items-center justify-between mb-2",children:[m.jsxs("span",{className:"text-xs font-semibold text-[var(--text)]",children:["投递链接 (",l.length,")"]}),m.jsxs("button",{className:"inline-flex items-center gap-1 px-2 py-1 text-xs border border-[var(--live-25)] text-[var(--live)] cursor-pointer bg-transparent hover:bg-[var(--live-10)]",onClick:()=>{x(!d),c(""),h||g(t[0]?.id??""),b||y(t[1]?.id??t[0]?.id??"")},children:[m.jsx(sm,{className:"w-3 h-3"}),"创建链接"]})]}),s&&m.jsx("p",{className:`${Ol} mb-2 text-[var(--bad)]`,children:s}),d&&m.jsxs("div",{className:"mb-3 p-3 border border-[var(--line)] bg-[var(--surface-5)]",children:[m.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-2",children:[m.jsxs("div",{children:[m.jsx("label",{className:"block mb-1 text-[11px] text-[var(--muted)]",children:"上游流水线"}),m.jsx("select",{className:fn,value:h,onChange:L=>g(L.target.value),children:t.map(L=>m.jsxs("option",{value:L.id,children:[L.id," | ",L.title]},L.id))})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block mb-1 text-[11px] text-[var(--muted)]",children:"下游流水线"}),m.jsx("select",{className:fn,value:b,onChange:L=>y(L.target.value),children:t.map(L=>m.jsxs("option",{value:L.id,children:[L.id," | ",L.title]},L.id))})]})]}),m.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-2",children:[m.jsxs("div",{children:[m.jsx("label",{className:"block mb-1 text-[11px] text-[var(--muted)]",children:"失败策略"}),m.jsxs("select",{className:fn,value:v,onChange:L=>N(L.target.value),children:[m.jsx("option",{value:"continue",children:"continue(继续下一条)"}),m.jsx("option",{value:"pause",children:"pause(暂停队列)"})]})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block mb-1 text-[11px] text-[var(--muted)]",children:"最大排队数"}),m.jsx("input",{className:Eh,type:"number",min:1,max:1e4,value:k,onChange:L=>_(Number(L.target.value)||100)})]})]}),m.jsxs("div",{className:Ji,children:[m.jsx("button",{className:"px-3 py-1 text-xs border border-[var(--live-25)] bg-transparent text-[var(--live)] cursor-pointer",onClick:C,disabled:j||!h||!b||h===b,children:j?"创建中...":"确认创建"}),m.jsx("button",{className:"px-3 py-1 text-xs border border-[var(--line)] bg-transparent text-[var(--muted)] cursor-pointer",onClick:()=>x(!1),children:"取消"})]})]}),l.length===0?m.jsx("p",{className:"text-xs text-[var(--muted)]",children:"暂无投递链接"}):m.jsx("div",{className:"space-y-1",children:l.map(L=>m.jsxs("div",{className:"flex items-center gap-2 p-2 border border-[var(--line)] bg-[var(--surface-3)] text-xs",children:[m.jsx("span",{className:"text-[var(--live)] font-mono text-[11px]",children:L.id}),m.jsx("span",{className:"font-mono text-[var(--text)]",children:L.fromPipelineId}),m.jsx("span",{className:"text-[var(--muted)]",children:"→"}),m.jsx("span",{className:"font-mono text-[var(--text)]",children:L.toPipelineId}),L.inputContract?.requireType&&m.jsxs("span",{className:"text-[var(--muted)] text-[10px]",children:["type:",L.inputContract.requireType]}),m.jsx("span",{className:`ml-auto px-1.5 py-0.5 text-[10px] font-semibold ${L.enabled?"text-[var(--good)]":"text-[var(--muted)]"}`,children:L.enabled?"启用":"停用"}),m.jsxs("span",{className:"text-[10px] text-[var(--muted)]",children:["onFailed:",L.onJobFailed," | max:",L.maxPendingJobs]}),m.jsx("button",{className:"px-1.5 py-0.5 text-[10px] border border-[var(--line)] bg-transparent text-[var(--text)] cursor-pointer",onClick:()=>R(L),children:L.enabled?"停用":"启用"}),m.jsx("button",{className:"px-1.5 py-0.5 text-[10px] border border-[var(--bad-25)] bg-transparent text-[var(--bad)] cursor-pointer",onClick:()=>V(L.id),children:m.jsx(Lh,{className:"w-3 h-3"})})]},L.id))})]}),X==="queue"&&m.jsxs("div",{className:"p-3",children:[m.jsxs("div",{className:"mb-2",children:[m.jsx("label",{className:"block mb-1 text-[11px] text-[var(--muted)]",children:"选择流水线"}),m.jsxs("select",{className:fn,value:$,onChange:L=>ne(L.target.value),children:[m.jsx("option",{value:"",children:"-- 选择流水线 --"}),t.map(L=>m.jsxs("option",{value:L.id,children:[L.id," | ",L.title]},L.id))]})]}),$?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:"flex items-center justify-between mb-2",children:[m.jsx("span",{className:"text-[11px] text-[var(--muted)]",children:se.length===0?"队列为空":`共 ${se.length} 条`}),m.jsx("button",{className:"px-2 py-0.5 text-[10px] border border-[var(--live-25)] bg-transparent text-[var(--live)] cursor-pointer",onClick:()=>O($),children:"排空队列"})]}),se.length>0&&m.jsx("div",{className:"space-y-1",children:se.map(L=>m.jsxs("div",{className:"flex items-center gap-2 p-2 border border-[var(--line)] bg-[var(--surface-3)] text-xs",children:[m.jsx("span",{className:"font-mono text-[11px] text-[var(--text)] truncate max-w-[180px]",children:L.jobId}),m.jsx("span",{className:"text-[var(--muted)]",children:"←"}),m.jsx("span",{className:"font-mono text-[var(--text)]",children:L.fromPipelineId}),m.jsx("span",{className:`px-1 py-0.5 text-[10px] font-semibold text-[var(--${Aj[L.status]??"muted"})]`,children:kj[L.status]??L.status}),L.targetRunId&&m.jsxs("span",{className:"text-[10px] text-[var(--muted)]",children:["run:",L.targetRunId]}),m.jsx("span",{className:"text-[10px] text-[var(--muted)] ml-auto",children:new Date(L.createdAt).toLocaleString("zh-CN")}),(L.status==="failed"||L.status==="canceled")&&m.jsx("button",{className:"px-1.5 py-0.5 text-[10px] border border-[var(--live-25)] bg-transparent text-[var(--live)] cursor-pointer",onClick:()=>ae($,L.jobId),children:m.jsx(Ej,{className:"w-3 h-3"})}),L.status==="pending"&&m.jsx("button",{className:"px-1.5 py-0.5 text-[10px] border border-[var(--bad-25)] bg-transparent text-[var(--bad)] cursor-pointer",onClick:()=>M($,L.jobId),children:m.jsx(cy,{className:"w-3 h-3"})})]},L.jobId))})]}):m.jsx("p",{className:"text-xs text-[var(--muted)]",children:"请先选择流水线查看接收队列"})]}),X==="outputs"&&m.jsxs("div",{className:"p-3",children:[m.jsxs("div",{className:"mb-2",children:[m.jsx("label",{className:"block mb-1 text-[11px] text-[var(--muted)]",children:"选择流水线"}),m.jsxs("select",{className:fn,value:Y,onChange:L=>D(L.target.value),children:[m.jsx("option",{value:"",children:"-- 选择流水线 --"}),t.map(L=>m.jsxs("option",{value:L.id,children:[L.id," | ",L.title]},L.id))]})]}),Y?T.length===0?m.jsx("p",{className:"text-xs text-[var(--muted)]",children:"暂无产物"}):m.jsx("div",{className:"space-y-1",children:T.map(L=>m.jsxs("div",{className:"flex items-center gap-2 p-2 border border-[var(--line)] bg-[var(--surface-3)] text-xs",children:[m.jsx("span",{className:"font-mono text-[11px] text-[var(--text)]",children:L.outputId}),m.jsxs("span",{className:"text-[var(--muted)]",children:["node:",L.outputNodeId]}),m.jsxs("span",{className:"text-[10px] text-[var(--muted)]",children:["type:",L.artifactRef.type]}),m.jsx("span",{className:"text-[10px] text-[var(--muted)] ml-auto",children:new Date(L.producedAt).toLocaleString("zh-CN")}),m.jsxs("span",{className:"text-[10px] text-[var(--muted)]",children:["run:",L.runId]})]},L.outputId))}):m.jsx("p",{className:"text-xs text-[var(--muted)]",children:"请先选择流水线查看产物"})]})]})]})}function Mj(t){if(!Array.isArray(t))return[];const l=i=>{if(typeof i=="number"&&Number.isFinite(i))return i;if(typeof i=="string"&&i.trim()){const a=Number(i);if(Number.isFinite(a))return a;const u=Date.parse(i);if(Number.isFinite(u))return u}return null};return t.map((i,a)=>{const u=i??{},s=String(u.id??u.name??u.key??`agent-${a}`),c=String(u.role??"agent"),d=String(u.status??u.state??""),x=!!(u.online??u.enabled??(d?d==="online"||d==="ready"||d==="active":!0)),h=l(u.lastActiveAtMs??u.lastActiveAt??u.updatedAt??u.lastSeenAt??u.endedAt)??null,g=h?new Date(h).toISOString():null;return{id:s,role:c,online:x,lastActiveAt:g,lastActiveAtMs:h}}).sort((i,a)=>{const u=i.lastActiveAtMs??-1,s=a.lastActiveAtMs??-1;return u!==s?s-u:i.id.localeCompare(a.id)})}async function u1(){const t=await dt("/api/agents");return Mj(t.items)}async function Dj(t){const l=await dt(`/api/agents/${encodeURIComponent(t)}/files`);return(()=>{if(Array.isArray(l.items)&&l.items.length>0)return l.items;const a=l.raw??{};return Array.isArray(a.files)?a.files:Array.isArray(l.items)?l.items:[]})().map(a=>{const u=a??{},s=String(u.name??u.fileName??u.path??"").trim();if(!s)return null;const c=u.size,d=u.updatedAt??u.modifiedAt??u.mtime,x=u.updatedAtMs,h=typeof d=="string"?d:typeof x=="number"&&Number.isFinite(x)?new Date(x).toISOString():null;return{name:s,size:typeof c=="number"&&Number.isFinite(c)?c:null,updatedAt:h}}).filter(a=>!!a)}async function Tj(t,l){const a=(await dt(`/api/agents/${encodeURIComponent(t)}/files/${encodeURIComponent(l)}`)).item??{},s=a.file??null??a,c=String(s.name??s.fileName??l).trim()||l,d=s.content??s.text??s.body??s.value??"",x=typeof d=="string"?d:d==null?"":JSON.stringify(d,null,2);return{name:c,content:x}}async function Oj(t){const i=(await dt(`/api/agents/${encodeURIComponent(t.agentId)}/files/${encodeURIComponent(t.name)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t.content})})).item??{},u=i.file??null??i,s=String(u.name??u.fileName??t.name).trim()||t.name,c=u.content??u.text??u.body??u.value??t.content,d=typeof c=="string"?c:c==null?"":JSON.stringify(c,null,2);return{name:s,content:d}}function Bj(t){return Array.isArray(t)?t.map(l=>{const i=l??{},a=String(i.sessionKey??i.key??i.sessionId??i.id??"").trim();if(!a)return null;const u=String(i.title??i.name??a);return{id:a,title:u}}).filter(l=>!!l):[]}async function c1(){const t=await dt("/api/sessions");return Bj(t.items)}async function _j(t){return dt("/api/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async function Fj(t){return dt(`/api/sessions/${encodeURIComponent(t.sessionId)}/send`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:t.message,mode:t.mode})})}async function Rj(t){const l=`?limit=${Math.max(1,Math.floor(t.limit))}`,i=await dt(`/api/sessions/${encodeURIComponent(t.sessionId)}/history${l}`);return(Array.isArray(i.items)?i.items:[]).flatMap((u,s)=>{const c=u??{},d=String(c.role??c.senderRole??c.authorRole??c.sender?.role??"unknown").toLowerCase(),x=d==="user"||d==="assistant"||d==="system"?d:d==="toolresult"||d==="tool_result"||d==="tool"?"tool":"unknown",h=c.ts??c.time??c.createdAt??c.timestamp;let g=null;typeof h=="string"&&h.trim()?g=h:typeof h=="number"&&Number.isFinite(h)&&(g=new Date(h).toISOString());const b=typeof c.model=="string"&&c.model.trim()?c.model.trim():void 0,y=c.modelProvider??c.provider,v=typeof y=="string"&&y.trim()?y.trim():void 0,N=typeof c.api=="string"&&c.api.trim()?c.api.trim():void 0,k=D=>{const X={...D};return b&&(X.model=b),v&&(X.modelProvider=v),N&&(X.api=N),X},_=Array.isArray(c.content)?c.content.map(D=>D??{}):null;if(d==="assistant"&&_&&_.length>0){const D=_.filter(K=>String(K.type??"").toLowerCase()==="text").map(K=>typeof K.text=="string"?K.text:"").filter(K=>K.trim()),X=_.filter(K=>String(K.type??"").toLowerCase()==="toolcall");if(X.length>0){const K=[],U=String(c.id??c.eventId??c.seq??`${s}`);return D.length>0&&K.push(k({id:`${U}:assistant`,role:"assistant",text:D.join(`
|
|
42
|
+
`),ts:g})),X.forEach((oe,le)=>{const C=String(oe.name??oe.toolName??"tool").trim()||"tool",R=oe.id??oe.toolCallId??oe.tool_call_id??c.toolCallId??c.tool_call_id,V=typeof R=="string"&&R.trim()?R.trim():void 0,ae=oe.arguments,M=typeof ae=="string"?ae:ae&&typeof ae=="object"?JSON.stringify(ae,null,2):"";K.push({id:`${U}:toolcall:${le}`,role:"tool",text:M?`[toolCall] ${C}
|
|
43
|
+
${M}`:`[toolCall] ${C}`,ts:g,toolName:C,toolCallId:V,toolEventType:"call",toolArgs:typeof ae=="string"||ae&&typeof ae=="object"?ae:void 0})}),K}}const j=(()=>{const D=c.content;if(typeof D=="string"&&D.trim())return D;if(Array.isArray(D)){const U=D.some(le=>{const C=le??{};return String(C.type??"").toLowerCase()==="text"&&typeof C.text=="string"&&C.text.trim()}),oe=D.map(le=>{const C=le??{},R=String(C.type??"").toLowerCase();if(R==="text"){const V=C.text;return typeof V=="string"?V:""}if(R==="toolcall"){const V=String(C.name??"tool"),ae=C.arguments,M=ae&&typeof ae=="object"?JSON.stringify(ae,null,2):typeof ae=="string"?ae:"";return U?M?`[toolCall] ${V}
|
|
44
|
+
${M}`:`[toolCall] ${V}`:M?`[toolCall] ${V}
|
|
45
|
+
${M}`:`[toolCall] ${V}`}if(R==="toolresult"){const V=String(C.toolName??"tool"),ae=typeof C.text=="string"?C.text:"";return ae?`[toolResult:${V}] ${ae}`:`[toolResult:${V}]`}return""}).filter(Boolean);if(oe.length>0)return oe.join(`
|
|
46
|
+
`)}const K=[c.text,c.message,c.delta?.text,c.payload?.text].find(U=>typeof U=="string"&&String(U).trim().length>0);return typeof K=="string"?K:""})();if(!j.trim())return[];const B=d==="assistant"&&Array.isArray(c.content)&&c.content.length>0&&c.content.every(D=>String((D??{}).type??"").toLowerCase()==="toolcall"),$=B?"tool":x,ne=d==="toolresult"||d==="tool_result",se=(()=>{if($!=="tool")return;if(typeof c.toolName=="string"&&c.toolName.trim())return c.toolName.trim();if(Array.isArray(c.content)){const K=c.content[0]??{},U=K.name??K.toolName;if(typeof U=="string"&&U.trim())return U.trim()}const D=j.match(/^\[toolCall\]\s+([^\n]+)/i);if(D?.[1])return D[1].trim();const X=j.match(/^\[toolResult:([^\]]+)\]/i);if(X?.[1])return X[1].trim()})(),I=(()=>{if($!=="tool")return;const D=c.toolCallId??c.tool_call_id;return typeof D=="string"&&D.trim()?D.trim():void 0})(),T=B?"call":ne?"result":void 0,P=(()=>{if(B&&Array.isArray(c.content)&&c.content.length>0){const X=(c.content[0]??{}).arguments;if(typeof X=="string"||X&&typeof X=="object")return X}})(),Y={id:String(c.id??c.eventId??c.seq??`${s}`),role:$,text:j,ts:g};return se&&(Y.toolName=se),I&&(Y.toolCallId=I),T&&(Y.toolEventType=T),P&&(Y.toolArgs=P),[k(Y)]})}function Lj(t){try{const l=JSON.parse(t);return typeof l?.type!="string"?null:{type:l.type,payload:l.payload}}catch{return null}}function py(t,l){switch(t.type){case"bootstrap":l.bootstrap?.(t.payload);return;case"gateway.status":l.gatewayStatus?.(t.payload);return;case"gateway.ready":l.gatewayReady?.(t.payload);return;case"gateway.frame":l.gatewayFrame?.(t.payload);return;case"pipeline.updated":l.pipelineUpdated?.(t.payload);return;case"timeline.updated":l.timelineUpdated?.(t.payload);return;default:l.unknown?.(t)}}function xy(t){let l=!1;const i=new WebSocket(`${nj}/api/ws`);return i.onopen=()=>{l&&i.close()},i.onmessage=a=>{if(l)return;const u=Lj(a.data);u&&t(u)},()=>{l=!0,i.readyState===WebSocket.OPEN?i.close():(i.onopen=null,i.onmessage=null,i.onerror=null,i.onclose=null)}}const zj=t=>{const l=new Set,i=[];for(let a=0;a<t.length;a+=1){if(l.has(a))continue;const u=t[a];if(u.role!=="tool"){i.push({kind:"message",item:u});continue}if(u.toolEventType==="call"){let s=-1;for(let c=a+1;c<t.length;c+=1){if(l.has(c))continue;const d=t[c];if(d.role!=="tool"||d.toolEventType!=="result")continue;const x=u.toolCallId&&d.toolCallId&&u.toolCallId===d.toolCallId,h=u.toolName&&d.toolName&&u.toolName===d.toolName;if(x||h){s=c;break}}if(s>=0){const c=t[s];l.add(s),l.add(a);const d=(()=>{const x=u.toolArgs;if(typeof x=="string"&&x.trim())return x.trim();if(x&&typeof x=="object"){const h=x;return typeof h.command=="string"&&h.command.trim()?h.command.trim():typeof h.path=="string"&&h.path.trim()?h.path.trim():JSON.stringify(h)}return"-"})();i.push({kind:"tool",key:u.toolCallId??`${u.id}-${u.ts??""}`,toolName:u.toolName??c.toolName??"tool",commandText:d,outputText:c.text,ts:c.ts??u.ts})}continue}(u.toolEventType==="result"||!u.toolEventType)&&(l.add(a),i.push({kind:"tool",key:u.toolCallId??`${u.id}-${u.ts??""}`,toolName:u.toolName??"tool",commandText:"-",outputText:u.text,ts:u.ts}))}return i},$j=(t,l)=>{if(t.type!=="event")return null;const i=t.payload??{},a=String(i.sessionKey??i.sessionId??i.key??"").trim();if(!a||a!==l)return null;const u=String(i.stream??"").toLowerCase(),s=i.data??{};if(u==="lifecycle"){const g=String(s.phase??"").toLowerCase();if(g==="start")return{kind:"lifecycle-start"};if(g==="end")return{kind:"lifecycle-end"}}if(u==="assistant"){const g=typeof s.text=="string"?s.text:"";if(g.trim())return{kind:"assistant-text",text:g}}const c=i.delta??{},d=String(i.role??s.role??c.role??"").toLowerCase(),h=[c.text,i.text,s.text].find(g=>typeof g=="string"&&String(g).trim());return d==="assistant"&&typeof h=="string"?{kind:"assistant-text",text:h}:null},Ij=(t,l)=>t?l?l.startsWith(t)?l:t.endsWith(l)?t:`${t}${l}`:t:l,Hj=(t,l)=>{if(t.type!=="event"||t.event!=="agent"&&t.event!=="session.tool")return null;const i=t.payload??{},a=String(i.sessionKey??i.sessionId??i.key??"").trim();if(!a||a!==l)return null;const u=String(i.stream??"").toLowerCase();if(u!=="tool"&&u!=="command_output")return null;const s=i.data??{},c=String(s.phase??"").toLowerCase(),d=String(s.name??s.toolName??"tool").trim()||"tool",x=String(s.toolCallId??s.itemId??`${d}:${Date.now()}`).trim(),h=new Date().toISOString(),g=(()=>{const v=[s.arguments,s.args,s.input,s.command,s.path,s.title].find(N=>typeof N=="string"||N&&typeof N=="object");return typeof v=="string"&&v.trim()?v.trim():v&&typeof v=="object"?JSON.stringify(v):"-"})(),b=(()=>{const v=[s.output,s.text,s.result,s.message,s.meta,s.stdout,s.stderr].find(N=>typeof N=="string"||N&&typeof N=="object");return typeof v=="string"&&v.trim()?v.trim():v&&typeof v=="object"?JSON.stringify(v):""})();return u==="command_output"?c==="delta"||c==="update"?{kind:"tool-output",key:x,toolName:d,outputText:b,ts:h}:c==="end"||c==="result"?{kind:"tool-end",key:x,toolName:d,outputText:b,ts:h}:b?{kind:"tool-output",key:x,toolName:d,outputText:b,ts:h}:null:c==="start"?{kind:"tool-start",key:x,toolName:d,commandText:g,ts:h}:c==="result"?{kind:"tool-output",key:x,toolName:d,outputText:b,ts:h}:c==="update"?b?{kind:"tool-output",key:x,toolName:d,outputText:b,ts:h}:null:c==="end"?{kind:"tool-end",key:x,toolName:d,outputText:b,ts:h}:null},Uj=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],f1=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Gj(t){if(t<=255)return Uj[t];let l=0,i=f1.length-1;for(;l<=i;){const a=l+i>>1,u=f1[a];if(t<u[0]){i=a-1;continue}if(t>u[1]){l=a+1;continue}return u[2]}return"L"}function qj(t){const l=t.length;if(l===0)return null;const i=new Array(l);let a=!1;for(let h=0;h<l;){const g=t.charCodeAt(h);let b=g,y=1;if(g>=55296&&g<=56319&&h+1<l){const N=t.charCodeAt(h+1);N>=56320&&N<=57343&&(b=(g-55296<<10)+(N-56320)+65536,y=2)}const v=Gj(b);(v==="R"||v==="AL"||v==="AN")&&(a=!0);for(let N=0;N<y;N++)i[h+N]=v;h+=y}if(!a)return null;let u=0;for(let h=0;h<l;h++){const g=i[h];if(g==="L"){u=0;break}if(g==="R"||g==="AL"){u=1;break}}const s=new Int8Array(l);for(let h=0;h<l;h++)s[h]=u;const c=u&1?"R":"L",d=c;let x=d;for(let h=0;h<l;h++)i[h]==="NSM"?i[h]=x:x=i[h];x=d;for(let h=0;h<l;h++){const g=i[h];g==="EN"?i[h]=x==="AL"?"AN":"EN":(g==="R"||g==="L"||g==="AL")&&(x=g)}for(let h=0;h<l;h++)i[h]==="AL"&&(i[h]="R");for(let h=1;h<l-1;h++)i[h]==="ES"&&i[h-1]==="EN"&&i[h+1]==="EN"&&(i[h]="EN"),i[h]==="CS"&&(i[h-1]==="EN"||i[h-1]==="AN")&&i[h+1]===i[h-1]&&(i[h]=i[h-1]);for(let h=0;h<l;h++){if(i[h]!=="EN")continue;let g;for(g=h-1;g>=0&&i[g]==="ET";g--)i[g]="EN";for(g=h+1;g<l&&i[g]==="ET";g++)i[g]="EN"}for(let h=0;h<l;h++){const g=i[h];(g==="WS"||g==="ES"||g==="ET"||g==="CS")&&(i[h]="ON")}x=d;for(let h=0;h<l;h++){const g=i[h];g==="EN"?i[h]=x==="L"?"L":"EN":(g==="R"||g==="L")&&(x=g)}for(let h=0;h<l;h++){if(i[h]!=="ON")continue;let g=h+1;for(;g<l&&i[g]==="ON";)g++;const b=h>0?i[h-1]:d,y=g<l?i[g]:d,v=b!=="L"?"R":"L";if(v===(y!=="L"?"R":"L"))for(let k=h;k<g;k++)i[k]=v;h=g-1}for(let h=0;h<l;h++)i[h]==="ON"&&(i[h]=c);for(let h=0;h<l;h++){const g=i[h];(s[h]&1)===0?g==="R"?s[h]++:(g==="AN"||g==="EN")&&(s[h]+=2):(g==="L"||g==="AN"||g==="EN")&&s[h]++}return s}function Pj(t,l){const i=qj(t);if(i===null)return null;const a=new Int8Array(l.length);for(let u=0;u<l.length;u++)a[u]=i[l[u]];return a}const Vj=/[ \t\n\r\f]+/g,Yj=/[\t\n\r\f]| {2,}|^ | $/;function Qj(t){const l=t??"normal";return l==="pre-wrap"?{mode:l,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:l,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function Jj(t){if(!Yj.test(t))return t;let l=t.replace(Vj," ");return l.charCodeAt(0)===32&&(l=l.slice(1)),l.length>0&&l.charCodeAt(l.length-1)===32&&(l=l.slice(0,-1)),l}function Xj(t){return/[\r\f]/.test(t)?t.replace(/\r\n/g,`
|
|
47
|
+
`).replace(/[\r\f]/g,`
|
|
48
|
+
`):t.replace(/\r\n/g,`
|
|
49
|
+
`)}let ch=null,Kj;function Zj(){return ch===null&&(ch=new Intl.Segmenter(Kj,{granularity:"word"})),ch}const Wj=new RegExp("\\p{Script=Arabic}","u"),rc=new RegExp("\\p{M}","u"),gy=new RegExp("\\p{Nd}","u");function d1(t){return Wj.test(t)}function h1(t){return t>=19968&&t<=40959||t>=13312&&t<=19903||t>=131072&&t<=173791||t>=173824&&t<=177983||t>=177984&&t<=178207||t>=178208&&t<=183983||t>=183984&&t<=191471||t>=191472&&t<=192093||t>=194560&&t<=195103||t>=196608&&t<=201551||t>=201552&&t<=205743||t>=205744&&t<=210041||t>=63744&&t<=64255||t>=12288&&t<=12351||t>=12352&&t<=12447||t>=12448&&t<=12543||t>=44032&&t<=55215||t>=65280&&t<=65519}function fi(t){for(let l=0;l<t.length;l++){const i=t.charCodeAt(l);if(!(i<12288)){if(i>=55296&&i<=56319&&l+1<t.length){const a=t.charCodeAt(l+1);if(a>=56320&&a<=57343){const u=(i-55296<<10)+(a-56320)+65536;if(h1(u))return!0;l++;continue}}if(h1(i))return!0}}return!1}function eM(t){const l=sc(t);return l!==null&&(cm.has(l)||Tr.has(l))}const tM=new Set([" "," ","","\uFEFF"]);function nM(t){return fi(t)}function lM(t){const l=sc(t);return l!==null&&tM.has(l)}function zh(t){return!eM(t)&&!lM(t)}const cm=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),ac=new Set(['"',"(","[","{","“","‘","«","‹","(","〔","〈","《","「","『","【","〖","〘","〚"]),fm=new Set(["'","’"]),Tr=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),iM=new Set([":",".","،","؛"]),rM=new Set(["၏"]),aM=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function sM(t){if(dm(t))return!0;let l=!1;for(const i of t){if(Tr.has(i)){l=!0;continue}if(!(l&&rc.test(i)))return!1}return l}function oM(t){for(const l of t)if(!cm.has(l)&&!Tr.has(l))return!1;return t.length>0}function uM(t){if(dm(t))return!0;for(const l of t)if(!ac.has(l)&&!fm.has(l)&&!rc.test(l))return!1;return t.length>0}function dm(t){let l=!1;for(const i of t)if(!(i==="\\"||rc.test(i))){if(ac.has(i)||Tr.has(i)||fm.has(i)){l=!0;continue}return!1}return l}function by(t,l){const i=l-1;if(i<=0)return Math.max(i,0);const a=t.charCodeAt(i);if(a<56320||a>57343)return i;const u=i-1;if(u<0)return i;const s=t.charCodeAt(u);return s>=55296&&s<=56319?u:i}function sc(t){if(t.length===0)return null;const l=by(t,t.length);return t.slice(l)}function cM(t){const l=Array.from(t);let i=l.length;for(;i>0;){const a=l[i-1];if(rc.test(a)){i--;continue}if(ac.has(a)||fm.has(a)){i--;continue}break}return i<=0||i===l.length?null:{head:l.slice(0,i).join(""),tail:l.slice(i).join("")}}function fM(t,l,i){return i==="text"&&!l&&t.length===1&&t!=="-"&&t!=="—"?t:null}function m1(t,l,i,a){const u=l[a],s=t[a];if(u==null)return s;const c=i[a];if(s.length===c)return s;const d=u.repeat(c);return t[a]=d,d}function p1(t,l){return t&&l!==null&&iM.has(l)}function dM(t){const l=sc(t);return l!==null&&rM.has(l)}function hM(t){if(t.length<2||t[0]!==" ")return null;const l=t.slice(1);return new RegExp("^\\p{M}+$","u").test(l)?{space:" ",marks:l}:null}function $h(t){let l=t.length;for(;l>0;){const i=by(t,l),a=t.slice(i,l);if(aM.has(a))return!0;if(!Tr.has(a))return!1;l=i}return!1}function mM(t,l){if(l.preserveOrdinarySpaces||l.preserveHardBreaks){if(t===" ")return"preserved-space";if(t===" ")return"tab";if(l.preserveHardBreaks&&t===`
|
|
50
|
+
`)return"hard-break"}return t===" "?"space":t===" "||t===" "||t===""||t==="\uFEFF"?"glue":t===""?"zero-width-break":t===""?"soft-hyphen":"text"}const pM=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function cl(t){return t.length===1?t[0]:t.join("")}function xM(t,l){const i=[];for(let a=t.length-1;a>=0;a--)i.push(t[a]);return i.push(l),cl(i)}function gM(t,l,i,a){if(!pM.test(t))return[{text:t,isWordLike:l,kind:"text",start:i}];const u=[];let s=null,c=[],d=i,x=!1,h=0;for(const g of t){const b=mM(g,a),y=b==="text"&&l;if(s!==null&&b===s&&y===x){c.push(g),h+=g.length;continue}s!==null&&u.push({text:cl(c),isWordLike:x,kind:s,start:d}),s=b,c=[g],d=i+h,x=y,h+=g.length}return s!==null&&u.push({text:cl(c),isWordLike:x,kind:s,start:d}),u}function Ih(t){return t==="space"||t==="preserved-space"||t==="zero-width-break"||t==="hard-break"}const bM=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function yM(t,l){const i=t.texts[l];return i.startsWith("www.")?!0:bM.test(i)&&l+1<t.len&&t.kinds[l+1]==="text"&&t.texts[l+1]==="//"}function vM(t){return t.includes("?")&&(t.includes("://")||t.startsWith("www."))}function SM(t){const l=t.texts.slice(),i=t.isWordLike.slice(),a=t.kinds.slice(),u=t.starts.slice();for(let c=0;c<t.len;c++){if(a[c]!=="text"||!yM(t,c))continue;const d=[l[c]];let x=c+1;for(;x<t.len&&!Ih(a[x]);){d.push(l[x]),i[c]=!0;const h=l[x].includes("?");if(a[x]="text",l[x]="",x++,h)break}l[c]=cl(d)}let s=0;for(let c=0;c<l.length;c++){const d=l[c];d.length!==0&&(s!==c&&(l[s]=d,i[s]=i[c],a[s]=a[c],u[s]=u[c]),s++)}return l.length=s,i.length=s,a.length=s,u.length=s,{len:s,texts:l,isWordLike:i,kinds:a,starts:u}}function NM(t){const l=[],i=[],a=[],u=[];for(let s=0;s<t.len;s++){const c=t.texts[s];if(l.push(c),i.push(t.isWordLike[s]),a.push(t.kinds[s]),u.push(t.starts[s]),!vM(c))continue;const d=s+1;if(d>=t.len||Ih(t.kinds[d]))continue;const x=[],h=t.starts[d];let g=d;for(;g<t.len&&!Ih(t.kinds[g]);)x.push(t.texts[g]),g++;x.length>0&&(l.push(cl(x)),i.push(!0),a.push("text"),u.push(h),s=g-1)}return{len:l.length,texts:l,isWordLike:i,kinds:a,starts:u}}const wM=new Set([":","-","/","×",",",".","+","–","—"]),x1=/^[A-Za-z0-9_]+[,:;]*$/,g1=/[,:;]+$/;function yy(t){for(const l of t)if(gy.test(l))return!0;return!1}function qu(t){if(t.length===0)return!1;for(const l of t)if(!(gy.test(l)||wM.has(l)))return!1;return!0}function CM(t){const l=[],i=[],a=[],u=[];for(let s=0;s<t.len;s++){const c=t.texts[s],d=t.kinds[s];if(d==="text"&&qu(c)&&yy(c)){const x=[c];let h=s+1;for(;h<t.len&&t.kinds[h]==="text"&&qu(t.texts[h]);)x.push(t.texts[h]),h++;l.push(cl(x)),i.push(!0),a.push("text"),u.push(t.starts[s]),s=h-1;continue}l.push(c),i.push(t.isWordLike[s]),a.push(d),u.push(t.starts[s])}return{len:l.length,texts:l,isWordLike:i,kinds:a,starts:u}}function EM(t){const l=[],i=[],a=[],u=[];for(let s=0;s<t.len;s++){const c=t.texts[s],d=t.kinds[s],x=t.isWordLike[s];if(d==="text"&&x&&x1.test(c)){const h=[c];let g=g1.test(c),b=s+1;for(;g&&b<t.len&&t.kinds[b]==="text"&&t.isWordLike[b]&&x1.test(t.texts[b]);){const y=t.texts[b];h.push(y),g=g1.test(y),b++}l.push(cl(h)),i.push(!0),a.push("text"),u.push(t.starts[s]),s=b-1;continue}l.push(c),i.push(x),a.push(d),u.push(t.starts[s])}return{len:l.length,texts:l,isWordLike:i,kinds:a,starts:u}}function AM(t){const l=[],i=[],a=[],u=[];for(let s=0;s<t.len;s++){const c=t.texts[s];if(t.kinds[s]==="text"&&c.includes("-")){const d=c.split("-");let x=d.length>1;for(let h=0;h<d.length;h++){const g=d[h];if(!x)break;(g.length===0||!yy(g)||!qu(g))&&(x=!1)}if(x){let h=0;for(let g=0;g<d.length;g++){const b=d[g],y=g<d.length-1?`${b}-`:b;l.push(y),i.push(!0),a.push("text"),u.push(t.starts[s]+h),h+=y.length}continue}}l.push(c),i.push(t.isWordLike[s]),a.push(t.kinds[s]),u.push(t.starts[s])}return{len:l.length,texts:l,isWordLike:i,kinds:a,starts:u}}function kM(t){const l=[],i=[],a=[],u=[];let s=0;for(;s<t.len;){const c=[t.texts[s]];let d=t.isWordLike[s],x=t.kinds[s],h=t.starts[s];if(x==="glue"){const g=[c[0]],b=h;for(s++;s<t.len&&t.kinds[s]==="glue";)g.push(t.texts[s]),s++;const y=cl(g);if(s<t.len&&t.kinds[s]==="text")c[0]=y,c.push(t.texts[s]),d=t.isWordLike[s],x="text",h=b,s++;else{l.push(y),i.push(!1),a.push("glue"),u.push(b);continue}}else s++;if(x==="text")for(;s<t.len&&t.kinds[s]==="glue";){const g=[];for(;s<t.len&&t.kinds[s]==="glue";)g.push(t.texts[s]),s++;const b=cl(g);if(s<t.len&&t.kinds[s]==="text"){c.push(b,t.texts[s]),d=d||t.isWordLike[s],s++;continue}c.push(b)}l.push(cl(c)),i.push(d),a.push(x),u.push(h)}return{len:l.length,texts:l,isWordLike:i,kinds:a,starts:u}}function jM(t){const l=t.texts.slice(),i=t.isWordLike.slice(),a=t.kinds.slice(),u=t.starts.slice();for(let s=0;s<l.length-1;s++){if(a[s]!=="text"||a[s+1]!=="text"||!fi(l[s])||!fi(l[s+1]))continue;const c=cM(l[s]);c!==null&&(l[s]=c.head,l[s+1]=c.tail+l[s+1],u[s+1]=u[s]+c.head.length)}return{len:l.length,texts:l,isWordLike:i,kinds:a,starts:u}}function b1(t,l,i){const a=Zj();let u=0;const s=[],c=[],d=[],x=[],h=[],g=[],b=[],y=[],v=[],N=[],k=[],_=[];for(const T of a.segment(t))for(const P of gM(T.segment,T.isWordLike??!1,T.index,i)){let R=function(){g[C]!==null&&(c[C]=[m1(s,g,b,C)],g[C]=null),c[C].push(P.text),d[C]=d[C]||P.isWordLike,y[C]=y[C]||X,v[C]=v[C]||K,N[C]=oe,k[C]=le,_[C]=p1(v[C],U)};var I=R;const Y=P.kind==="text",D=fM(P.text,P.isWordLike,P.kind),X=fi(P.text),K=d1(P.text),U=sc(P.text),oe=$h(P.text),le=dM(P.text),C=u-1;l.carryCJKAfterClosingQuote&&Y&&u>0&&x[C]==="text"&&X&&y[C]&&N[C]||Y&&u>0&&x[C]==="text"&&oM(P.text)&&y[C]||Y&&u>0&&x[C]==="text"&&k[C]?R():Y&&u>0&&x[C]==="text"&&P.isWordLike&&K&&_[C]?(R(),d[C]=!0):D!==null&&u>0&&x[C]==="text"&&g[C]===D?b[C]=(b[C]??1)+1:Y&&!P.isWordLike&&u>0&&x[C]==="text"&&(sM(P.text)||P.text==="-"&&d[C])?R():(s[u]=P.text,c[u]=[P.text],d[u]=P.isWordLike,x[u]=P.kind,h[u]=P.start,g[u]=D,b[u]=D===null?0:1,y[u]=X,v[u]=K,N[u]=oe,k[u]=le,_[u]=p1(K,U),u++)}for(let T=0;T<u;T++){if(g[T]!==null){s[T]=m1(s,g,b,T);continue}s[T]=cl(c[T])}for(let T=1;T<u;T++)x[T]==="text"&&!d[T]&&dm(s[T])&&x[T-1]==="text"&&(s[T-1]+=s[T],d[T-1]=d[T-1]||d[T],s[T]="");const j=Array.from({length:u},()=>null);let B=-1;for(let T=u-1;T>=0;T--){const P=s[T];if(P.length!==0){if(x[T]==="text"&&!d[T]&&uM(P)&&B>=0&&x[B]==="text"){const Y=j[B]??[];Y.push(P),j[B]=Y,h[B]=h[T],s[T]="";continue}B=T}}for(let T=0;T<u;T++){const P=j[T];P!=null&&(s[T]=xM(P,s[T]))}let $=0;for(let T=0;T<u;T++){const P=s[T];P.length!==0&&($!==T&&(s[$]=P,d[$]=d[T],x[$]=x[T],h[$]=h[T]),$++)}s.length=$,d.length=$,x.length=$,h.length=$;const ne=kM({len:$,texts:s,isWordLike:d,kinds:x,starts:h}),se=jM(EM(AM(CM(NM(SM(ne))))));for(let T=0;T<se.len-1;T++){const P=hM(se.texts[T]);P!==null&&(se.kinds[T]!=="space"&&se.kinds[T]!=="preserved-space"||se.kinds[T+1]!=="text"||!d1(se.texts[T+1])||(se.texts[T]=P.space,se.isWordLike[T]=!1,se.kinds[T]=se.kinds[T]==="preserved-space"?"preserved-space":"space",se.texts[T+1]=P.marks+se.texts[T+1],se.starts[T+1]=se.starts[T]+P.space.length))}return se}function MM(t,l){if(t.len===0)return[];if(!l.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:t.len,consumedEndSegmentIndex:t.len}];const i=[];let a=0;for(let u=0;u<t.len;u++)t.kinds[u]==="hard-break"&&(i.push({startSegmentIndex:a,endSegmentIndex:u,consumedEndSegmentIndex:u+1}),a=u+1);return a<t.len&&i.push({startSegmentIndex:a,endSegmentIndex:t.len,consumedEndSegmentIndex:t.len}),i}function DM(t){if(t.len<=1)return t;const l=[],i=[],a=[],u=[];let s=null,c=!1,d=0,x=!1,h=!1;function g(){s!==null&&(l.push(cl(s)),i.push(c),a.push("text"),u.push(d),s=null)}for(let b=0;b<t.len;b++){const y=t.texts[b],v=t.kinds[b],N=t.isWordLike[b],k=t.starts[b];if(v==="text"){const _=nM(y),j=zh(y);if(s!==null&&x&&h){s.push(y),c=c||N,x=x||_,h=j;continue}g(),s=[y],c=N,d=k,x=_,h=j;continue}g(),l.push(y),i.push(N),a.push(v),u.push(k)}return g(),{len:l.length,texts:l,isWordLike:i,kinds:a,starts:u}}function TM(t,l,i="normal",a="normal"){const u=Qj(i),s=u.mode==="pre-wrap"?Xj(t):Jj(t);if(s.length===0)return{normalized:s,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const c=a==="keep-all"?DM(b1(s,l,u)):b1(s,l,u);return{normalized:s,chunks:MM(c,u),...c}}let Sa=null;const y1=new Map;let Na=null;const OM=96,BM=new RegExp("\\p{Emoji_Presentation}","u"),_M=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let fh=null;const v1=new Map;function hm(){if(Sa!==null)return Sa;if(typeof OffscreenCanvas<"u")return Sa=new OffscreenCanvas(1,1).getContext("2d"),Sa;if(typeof document<"u")return Sa=document.createElement("canvas").getContext("2d"),Sa;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function FM(t){let l=y1.get(t);return l||(l=new Map,y1.set(t,l)),l}function Xi(t,l){let i=l.get(t);return i===void 0&&(i={width:hm().measureText(t).width,containsCJK:fi(t)},l.set(t,i)),i}function oc(){if(Na!==null)return Na;if(typeof navigator>"u")return Na={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Na;const t=navigator.userAgent,i=navigator.vendor==="Apple Computer, Inc."&&t.includes("Safari/")&&!t.includes("Chrome/")&&!t.includes("Chromium/")&&!t.includes("CriOS/")&&!t.includes("FxiOS/")&&!t.includes("EdgiOS/"),a=t.includes("Chrome/")||t.includes("Chromium/")||t.includes("CriOS/")||t.includes("Edg/");return Na={lineFitEpsilon:i?1/64:.005,carryCJKAfterClosingQuote:a,preferPrefixWidthsForBreakableRuns:i,preferEarlySoftHyphenBreak:i},Na}function RM(t){const l=t.match(/(\d+(?:\.\d+)?)\s*px/);return l?parseFloat(l[1]):16}function vy(){return fh===null&&(fh=new Intl.Segmenter(void 0,{granularity:"grapheme"})),fh}function LM(t){return BM.test(t)||t.includes("️")}function zM(t){return _M.test(t)}function $M(t,l){let i=v1.get(t);if(i!==void 0)return i;const a=hm();a.font=t;const u=a.measureText("😀").width;if(i=0,u>l+.5&&typeof document<"u"&&document.body!==null){const s=document.createElement("span");s.style.font=t,s.style.display="inline-block",s.style.visibility="hidden",s.style.position="absolute",s.textContent="😀",document.body.appendChild(s);const c=s.getBoundingClientRect().width;document.body.removeChild(s),u-c>.5&&(i=u-c)}return v1.set(t,i),i}function IM(t){let l=0;const i=vy();for(const a of i.segment(t))LM(a.segment)&&l++;return l}function HM(t,l){return l.emojiCount===void 0&&(l.emojiCount=IM(t)),l.emojiCount}function Mr(t,l,i){return i===0?l.width:l.width-HM(t,l)*i}function UM(t,l,i,a,u){if(l.breakableFitAdvances!==void 0)return l.breakableFitAdvances;const s=vy(),c=[];for(const g of s.segment(t))c.push(g.segment);if(c.length<=1)return l.breakableFitAdvances=null,l.breakableFitAdvances;if(u==="sum-graphemes"){const g=[];for(const b of c){const y=Xi(b,i);g.push(Mr(b,y,a))}return l.breakableFitAdvances=g,l.breakableFitAdvances}if(u==="pair-context"||c.length>OM){const g=[];let b=null,y=0;for(const v of c){const N=Xi(v,i),k=Mr(v,N,a);if(b===null)g.push(k);else{const _=b+v,j=Xi(_,i);g.push(Mr(_,j,a)-y)}b=v,y=k}return l.breakableFitAdvances=g,l.breakableFitAdvances}const d=[];let x="",h=0;for(const g of c){x+=g;const b=Xi(x,i),y=Mr(x,b,a);d.push(y-h),h=y}return l.breakableFitAdvances=d,l.breakableFitAdvances}function GM(t,l){const i=hm();i.font=t;const a=FM(t),u=RM(t),s=l?$M(t,u):0;return{cache:a,fontSize:u,emojiCorrection:s}}function qM(t,l){for(;l<t.widths.length;){const i=t.kinds[l];if(i!=="space"&&i!=="zero-width-break"&&i!=="soft-hyphen")break;l++}return l}function PM(t,l){if(l<=0)return 0;const i=t%l;return Math.abs(i)<=1e-6?l:l-i}function VM(t,l,i,a,u){let s=0,c=l;for(;s<t.length;){const d=c+t[s];if((s+1<t.length?d+u:d)>i+a)break;c=d,s++}return{fitCount:s,fittedWidth:c}}function YM(t,l){return t.simpleLineWalkFastPath?Sy(t,l):QM(t,l)}function Sy(t,l,i){const{widths:a,kinds:u,breakableFitAdvances:s}=t;if(a.length===0)return 0;const d=oc().lineFitEpsilon,x=l+d;let h=0,g=0,b=!1,y=0,v=0,N=-1,k=0;function _(){N=-1,k=0}function j(T=y,P=v,Y=g){h++,g=0,b=!1,_()}function B(T,P){b=!0,y=T+1,v=0,g=P}function $(T,P,Y){b=!0,y=T,v=P+1,g=Y}function ne(T,P){if(!b){B(T,P);return}g+=P,y=T+1,v=0}function se(T,P){const Y=s[T];for(let D=P;D<Y.length;D++){const X=Y[D];b?g+X>x?(j(),$(T,D,X)):(g+=X,y=T,v=D+1):$(T,D,X)}b&&y===T&&v===Y.length&&(y=T+1,v=0)}let I=0;for(;I<a.length&&!(!b&&(I=qM(t,I),I>=a.length));){const T=a[I],P=u[I],Y=P==="space"||P==="preserved-space"||P==="tab"||P==="zero-width-break"||P==="soft-hyphen";if(!b){T>l&&s[I]!==null?se(I,0):B(I,T),Y&&(N=I+1,k=g-T),I++;continue}if(g+T>x){if(Y){ne(I,T),j(I+1,0,g-T),I++;continue}if(N>=0){if(y>N||y===N&&v>0){j();continue}j(N,0,k);continue}if(T>l&&s[I]!==null){j(),se(I,0),I++;continue}j();continue}ne(I,T),Y&&(N=I+1,k=g-T),I++}return b&&j(),h}function QM(t,l,i){if(t.simpleLineWalkFastPath)return Sy(t,l);const{widths:a,lineEndFitAdvances:u,lineEndPaintAdvances:s,kinds:c,breakableFitAdvances:d,discretionaryHyphenWidth:x,tabStopAdvance:h,chunks:g}=t;if(a.length===0||g.length===0)return 0;const b=oc(),y=b.lineFitEpsilon,v=l+y;let N=0,k=0,_=!1,j=0,B=0,$=-1,ne=0,se=0,I=null;function T(){$=-1,ne=0,se=0,I=null}function P(C=j,R=B,V=k){N++,k=0,_=!1,T()}function Y(C,R){_=!0,j=C+1,B=0,k=R}function D(C,R,V){_=!0,j=C,B=R+1,k=V}function X(C,R){if(!_){Y(C,R);return}k+=R,j=C+1,B=0}function K(C,R,V,ae){if(!R)return;const M=C==="tab"?0:u[V],O=C==="tab"?ae:s[V];$=V+1,ne=k-ae+M,se=k-ae+O,I=C}function U(C,R){const V=d[C];for(let ae=R;ae<V.length;ae++){const M=V[ae];_?k+M>v?(P(),D(C,ae,M)):(k+=M,j=C,B=ae+1):D(C,ae,M)}_&&j===C&&B===V.length&&(j=C+1,B=0)}function oe(C){if(I!=="soft-hyphen")return!1;const R=d[C];if(R==null)return!1;const{fitCount:V,fittedWidth:ae}=VM(R,k,l,y,x);return V===0?!1:(k=ae,j=C,B=V,T(),V===R.length?(j=C+1,B=0,!0):(P(C,V,ae+x),U(C,V),!0))}function le(C){N++,T()}for(let C=0;C<g.length;C++){const R=g[C];if(R.startSegmentIndex===R.endSegmentIndex){le();continue}_=!1,k=0,R.startSegmentIndex,j=R.startSegmentIndex,B=0,T();let V=R.startSegmentIndex;for(;V<R.endSegmentIndex;){const ae=c[V],M=ae==="space"||ae==="preserved-space"||ae==="tab"||ae==="zero-width-break"||ae==="soft-hyphen",O=ae==="tab"?PM(k,h):a[V];if(ae==="soft-hyphen"){_&&(j=V+1,B=0,$=V+1,ne=k+x,se=k+x,I=ae),V++;continue}if(!_){O>l&&d[V]!==null?U(V,0):Y(V,O),K(ae,M,V,O),V++;continue}if(k+O>v){const A=k+(ae==="tab"?0:u[V]),xe=k+(ae==="tab"?O:s[V]);if(I==="soft-hyphen"&&b.preferEarlySoftHyphenBreak&&ne<=v){P($,0,se);continue}if(I==="soft-hyphen"&&oe(V)){V++;continue}if(M&&A<=v){X(V,O),P(V+1,0,xe),V++;continue}if($>=0&&ne<=v){if(j>$||j===$&&B>0){P();continue}const Se=$;P(Se,0,se),V=Se;continue}if(O>l&&d[V]!==null){P(),U(V,0),V++;continue}P();continue}X(V,O),K(ae,M,V,O),V++}if(_){const ae=$===R.consumedEndSegmentIndex?se:k;P(R.consumedEndSegmentIndex,0,ae)}}return N}let dh=null;function JM(){return dh===null&&(dh=new Intl.Segmenter(void 0,{granularity:"grapheme"})),dh}function XM(t){return{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function KM(t,l){const i=[];let a=[],u=0,s=!1,c=!1,d=!1;function x(){a.length!==0&&(i.push({text:a.length===1?a[0]:a.join(""),start:u}),a=[],s=!1,c=!1,d=!1)}function h(b,y,v){a=[b],u=y,s=v,c=$h(b),d=ac.has(b)}function g(b,y){a.push(b),s=s||y;const v=$h(b);b.length===1&&Tr.has(b)?c=c||v:c=v,d=!1}for(const b of JM().segment(t)){const y=b.segment,v=fi(y);if(a.length===0){h(y,b.index,v);continue}if(d||cm.has(y)||Tr.has(y)||l.carryCJKAfterClosingQuote&&v&&c){g(y,v);continue}if(!s&&!v){g(y,v);continue}x(),h(y,b.index,v)}return x(),i}function ZM(t){if(t.length<=1)return t;const l=[];let i=[t[0].text],a=t[0].start,u=fi(t[0].text),s=zh(t[0].text);function c(){l.push({text:i.length===1?i[0]:i.join(""),start:a})}for(let d=1;d<t.length;d++){const x=t[d],h=fi(x.text),g=zh(x.text);if(u&&s){i.push(x.text),u=u||h,s=g;continue}c(),i=[x.text],a=x.start,u=h,s=g}return c(),l}function WM(t,l,i,a){const u=oc(),{cache:s,emojiCorrection:c}=GM(l,zM(t.normalized)),d=Mr("-",Xi("-",s),c),h=Mr(" ",Xi(" ",s),c)*8;if(t.len===0)return XM();const g=[],b=[],y=[],v=[];let N=t.chunks.length<=1;const k=null,_=[],j=i?[]:null,B=Array.from({length:t.len});function $(T,P,Y,D,X,K,U){X!=="text"&&X!=="space"&&X!=="zero-width-break"&&(N=!1),g.push(P),b.push(Y),y.push(D),v.push(X),_.push(U),j!==null&&j.push(T)}function ne(T,P,Y,D,X){const K=Xi(T,s),U=Mr(T,K,c),oe=P==="space"||P==="preserved-space"||P==="zero-width-break"?0:U,le=P==="space"||P==="zero-width-break"?0:U;if(X&&D&&T.length>1){let C="sum-graphemes";qu(T)?C="pair-context":u.preferPrefixWidthsForBreakableRuns&&(C="segment-prefixes");const R=UM(T,K,s,c,C);$(T,U,oe,le,P,Y,R);return}$(T,U,oe,le,P,Y,null)}for(let T=0;T<t.len;T++){B[T]=g.length;const P=t.texts[T],Y=t.isWordLike[T],D=t.kinds[T],X=t.starts[T];if(D==="soft-hyphen"){$(P,0,d,d,D,X,null);continue}if(D==="hard-break"){$(P,0,0,0,D,X,null);continue}if(D==="tab"){$(P,0,0,0,D,X,null);continue}const K=Xi(P,s);if(D==="text"&&K.containsCJK){const U=KM(P,u),oe=a==="keep-all"?ZM(U):U;for(let le=0;le<oe.length;le++){const C=oe[le];ne(C.text,"text",X+C.start,Y,a==="keep-all"||!fi(C.text))}continue}ne(P,D,X,Y,!0)}const se=e5(t.chunks,B,g.length),I=k===null?null:Pj(t.normalized,k);return j!==null?{widths:g,lineEndFitAdvances:b,lineEndPaintAdvances:y,kinds:v,simpleLineWalkFastPath:N,segLevels:I,breakableFitAdvances:_,discretionaryHyphenWidth:d,tabStopAdvance:h,chunks:se,segments:j}:{widths:g,lineEndFitAdvances:b,lineEndPaintAdvances:y,kinds:v,simpleLineWalkFastPath:N,segLevels:I,breakableFitAdvances:_,discretionaryHyphenWidth:d,tabStopAdvance:h,chunks:se}}function e5(t,l,i){const a=[];for(let u=0;u<t.length;u++){const s=t[u],c=s.startSegmentIndex<l.length?l[s.startSegmentIndex]:i,d=s.endSegmentIndex<l.length?l[s.endSegmentIndex]:i,x=s.consumedEndSegmentIndex<l.length?l[s.consumedEndSegmentIndex]:i;a.push({startSegmentIndex:c,endSegmentIndex:d,consumedEndSegmentIndex:x})}return a}function t5(t,l,i,a){const u=a?.wordBreak??"normal",s=TM(t,oc(),a?.whiteSpace,u);return WM(s,l,i,u)}function Pu(t,l,i){return t5(t,l,!1,i)}function Vu(t,l,i){const a=YM(t,l);return{lineCount:a,height:a*i}}const n5='13px "Space Grotesk", sans-serif',Mu=19,S1='12.5px "JetBrains Mono", monospace',Du=18,l5=240,Ny=780,wy=.92,i5=22,hh=36,r5=180,N1=34,a5=34,s5=18,o5=18,u5=2,c5=220,f5=260,mh=new Map,w1=new Map,Fs=(t,l)=>{let i=0;for(const a of t.matchAll(l))i+=1;return i},d5=t=>t.replace(/```[\s\S]*?```/g,`
|
|
51
|
+
[code block]
|
|
52
|
+
`).replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/!\[([^\]]*)\]\([^)]+\)/g,"$1").replace(/`([^`]+)`/g,"$1").replace(/^\s{0,3}(#{1,6})\s+/gm,"").replace(/^\s{0,3}>\s?/gm,"").replace(/^\s{0,3}(?:[-*+]|\d+\.)\s+/gm,"").replace(/\*\*|__|\*|_|~~/g,"").replace(/\n{3,}/g,`
|
|
53
|
+
|
|
54
|
+
`).trim(),h5=({viewportWidth:t})=>{const l=Math.min(Ny,Math.max(l5,Math.floor(t*wy)));return Math.max(120,l-i5)},m5=({viewportWidth:t})=>Math.max(r5,Math.min(Ny,Math.floor(t*wy))),p5=t=>Math.max(120,m5(t)-20),x5=t=>{const l=Fs(t,/^\s{0,3}#{1,6}\s+/gm),i=Fs(t,/^\s{0,3}(?:[-*+]|\d+\.)\s+/gm),a=Fs(t,/^\s{0,3}>\s?/gm),u=Fs(t,/```[\s\S]*?```/g),s=Fs(t,/\n{2,}/g);return l*8+i*4+a*6+u*12+s*3},g5=(t,l)=>{const i=d5(t),a=h5(l),u=`${a}::${i}`,s=mh.get(u);if(s!==void 0)return s;if(!i){const b=hh+Mu;return mh.set(u,b),b}const c=Pu(i,n5,{whiteSpace:"pre-wrap"}),{lineCount:d}=Vu(c,a,Mu),x=Math.max(1,d)*Mu,h=hh+x+x5(t),g=Math.max(hh+Mu,h);return mh.set(u,g),g},C1=({viewportWidth:t,commandText:l,outputText:i,toolCollapsed:a,toolOutputCollapsed:u})=>{if(a)return N1;const s=p5({viewportWidth:t}),c=[s,a?"1":"0",u?"1":"0",l,i].join("::"),d=w1.get(c);if(d!==void 0)return d;const x=l.trim()||"-",h=Pu(x,S1,{whiteSpace:"pre-wrap"}),g=Math.max(1,Vu(h,s,Du).lineCount),b=Math.min(c5,g*Du+s5);let y=N1+b+a5+u5;if(!u){const v=i.trim()||"...",N=Pu(v,S1,{whiteSpace:"pre-wrap"}),k=Math.max(1,Vu(N,s,Du).lineCount),_=Math.min(f5,k*Du+o5);y+=_}return w1.set(c,y),y},E1=10,A1=560,b5=640,y5=88,v5=26,Ru="font-[JetBrains_Mono,monospace]",S5=t=>`${t.id}-${t.ts??""}`,N5=t=>36+Math.max(1,t.split(/\n+/).length)*20;function k1(t,l,i,a,u,s){return m.jsxs("article",{className:`${i?"w-fit min-w-[180px] max-w-[min(72%,640px)]":"w-[min(92%,780px)]"} max-w-full min-w-0 justify-self-start border border-[rgba(142,163,179,0.14)] bg-[rgba(255,255,255,0.01)]`,children:[m.jsxs("button",{className:"flex w-full items-center justify-between gap-[10px] border-0 border-b border-[rgba(142,163,179,0.12)] bg-transparent px-[10px] py-2 text-left text-xs text-[#93a6b5] hover:bg-[rgba(142,163,179,0.04)]",type:"button",onClick:()=>u(t),children:[m.jsxs("span",{children:["tool ",l.toolName]}),m.jsx("span",{className:"inline-flex items-center justify-center leading-none text-[#7890a1]","aria-hidden":"true",children:m.jsx("svg",{viewBox:"0 0 12 12",width:"12",height:"12",focusable:"false",className:i?"":"rotate-90",children:m.jsx("path",{d:"M4 2.5L7.5 6L4 9.5",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),i?null:m.jsxs(m.Fragment,{children:[m.jsx("div",{className:`${Ru} max-h-[220px] overflow-auto border-b border-[rgba(142,163,179,0.12)] bg-[rgba(7,12,16,0.5)] px-[10px] py-2 text-[12.5px] leading-[1.45] whitespace-pre-wrap break-words text-[#d1dbe3]`,title:l.commandText,children:l.commandText}),m.jsxs("button",{className:"flex w-full items-center justify-between gap-[10px] border-0 border-b border-[rgba(142,163,179,0.12)] bg-transparent px-[10px] py-2 text-left text-xs text-[#93a6b5] hover:bg-[rgba(142,163,179,0.04)]",type:"button",onClick:()=>s(t),children:[m.jsxs("span",{children:["Tool output ",l.toolName]}),m.jsx("span",{className:"inline-flex items-center justify-center leading-none text-[#7890a1]","aria-hidden":"true",children:m.jsx("svg",{viewBox:"0 0 12 12",width:"12",height:"12",focusable:"false",className:a?"":"rotate-90",children:m.jsx("path",{d:"M4 2.5L7.5 6L4 9.5",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})})]}),a?null:m.jsx("div",{className:"max-h-[260px] overflow-auto bg-[rgba(7,12,16,0.5)] px-[10px] py-2",children:m.jsx("p",{className:"m-0 whitespace-pre-wrap break-words font-[JetBrains_Mono,monospace] text-[12.5px] leading-[1.45] text-[#b4c3cf]",children:l.outputText||"..."})})]})]})}const w5=w.memo(function({historyStatusText:l,historyViewportWidth:i,historyViewportHeight:a,historyScrollTop:u,mergedHistory:s,liveTools:c,isThinking:d,liveAssistantId:x,collapsedToolMap:h,collapsedToolOutputMap:g,onToggleToolCollapsed:b,onToggleToolOutputCollapsed:y,onVirtualStatsChange:v}){const N=w.useRef(new Map),k=w.useRef(null),_=w.useRef(null),[j,B]=w.useState(0);w.useEffect(()=>{if(!(typeof ResizeObserver>"u"))return k.current=new ResizeObserver(T=>{let P=!1;const Y=N.current;for(let D=0;D<T.length;D+=1){const X=T[D],K=X.target.dataset.rowKey;if(!K)continue;const U=Math.max(1,Math.ceil(X.contentRect.height));Y.get(K)!==U&&(Y.set(K,U),P=!0)}P&&B(D=>D+1)}),()=>{k.current?.disconnect(),k.current=null}},[]);const $=w.useMemo(()=>{if(l)return[{key:"status",estimatedHeight:v5,render:()=>m.jsx("p",{className:`${Ru} m-0 text-xs text-[var(--muted)]`,children:l})}];const T=[];for(let P=0;P<s.length;P+=1){const Y=s[P];if(Y.kind==="tool"){const C=Y.key,R=h[C]??!0,V=g[C]??!0;T.push({key:`history-tool:${C}`,estimatedHeight:i>0?C1({viewportWidth:i,commandText:Y.commandText,outputText:Y.outputText,toolCollapsed:R,toolOutputCollapsed:V}):42,render:()=>k1(C,Y,R,V,b,y)});continue}const D=Y.item,X=S5(D),K=D.role==="assistant"&&D.id===x,U=D.role==="assistant"||D.role==="user",oe=D.role==="assistant"&&D.model?D.modelProvider?`${D.modelProvider}/${D.model}`:D.model:"",le=i>0&&U?g5(D.text,{viewportWidth:i}):N5(D.text);T.push({key:`history-msg:${X}`,estimatedHeight:le,render:()=>m.jsxs("article",{className:`${D.role==="user"?"justify-self-end border-[rgba(50,215,186,0.15)] bg-[rgba(50,215,186,0.08)]":D.role==="assistant"?"justify-self-start border-[var(--line)]":D.role==="tool"?"justify-self-stretch w-full border-[rgba(142,163,179,0.24)] bg-[linear-gradient(180deg,rgba(255,255,255,0.05)_0%,rgba(255,255,255,0.02)_100%)]":"justify-self-start border-[var(--line)] border-dashed opacity-90"} min-w-0 max-w-full w-[min(92%,780px)] border bg-[#0f171d] px-[10px] py-2`,children:[m.jsxs("header",{className:`${Ru} mb-1.5 flex items-center justify-between gap-[10px] text-xs text-[var(--muted)] ${D.role==="tool"?"-mx-[10px] -mt-2 mb-2 border-b border-[rgba(142,163,179,0.22)] bg-[rgba(255,255,255,0.03)] px-[10px] py-[7px]":""}`,children:[m.jsx("span",{children:D.role}),m.jsxs("div",{className:"inline-flex items-center gap-2",children:[oe?m.jsx("span",{children:oe}):null,m.jsx("span",{children:D.ts?new Date(D.ts).toLocaleString("zh-CN",{hour12:!1}):"-"})]})]}),U?m.jsx("div",{className:"min-w-0 max-w-full overflow-hidden",children:m.jsx(uy,{content:D.text})}):m.jsxs("p",{className:D.role==="tool"?"m-0 whitespace-pre-wrap break-words font-[JetBrains_Mono,monospace] text-[12.5px] text-[#c6d2dd]":"m-0 whitespace-pre-wrap break-words text-[13px] leading-[1.45]",children:[D.text,K?m.jsx("span",{className:"ml-0.5 inline-block h-[1em] w-[6px] animate-pulse align-[-0.12em] bg-[var(--live)]","aria-hidden":"true"}):null]})]})})}for(let P=0;P<c.length;P+=1){const Y=c[P],D=`live-tool:${Y.key}`,X=h[D]??!0,K=g[D]??!0;T.push({key:D,estimatedHeight:i>0?C1({viewportWidth:i,commandText:Y.commandText,outputText:Y.outputText,toolCollapsed:X,toolOutputCollapsed:K}):42,render:()=>k1(D,Y,X,K,b,y)})}return d&&T.push({key:"live-thinking",estimatedHeight:y5,render:()=>m.jsxs("article",{className:"justify-self-start min-w-0 max-w-full w-[min(92%,780px)] border border-[var(--line)] bg-[#0f171d] px-[10px] py-2 opacity-92",children:[m.jsxs("header",{className:`${Ru} mb-1.5 flex items-center justify-between gap-[10px] text-xs text-[var(--muted)]`,children:[m.jsx("span",{children:"assistant"}),m.jsx("div",{className:"inline-flex items-center gap-2",children:m.jsx("span",{children:"思考中..."})})]}),m.jsxs("p",{className:"m-0 whitespace-pre-wrap break-words text-[13px] leading-[1.45] text-[var(--muted)]",children:["思考中",m.jsx("span",{className:"inline-block w-[0.6ch] animate-pulse text-center",children:"."}),m.jsx("span",{className:"inline-block w-[0.6ch] animate-pulse text-center [animation-delay:0.2s]",children:"."}),m.jsx("span",{className:"inline-block w-[0.6ch] animate-pulse text-center [animation-delay:0.4s]",children:"."})]})]})}),T},[l,s,c,d,x,h,g,b,y,i]),{totalHeight:ne,visibleRows:se}=w.useMemo(()=>{const T=N.current,P=a>0?a:b5,Y=Math.max(0,u-A1),D=u+P+A1;let X=0;const K=new Array($.length),U=new Array($.length);for(let V=0;V<$.length;V+=1){const ae=$[V];K[V]=X;const M=T.get(ae.key)??ae.estimatedHeight;U[V]=M,X+=M+E1}const oe=X>0?X-E1:0;if($.length===0)return{totalHeight:0,visibleRows:[]};let le=0;for(;le<$.length;){const V=K[le],ae=U[le];if(V+ae>=Y)break;le+=1}let C=le;for(;C<$.length&&!(K[C]>D);)C+=1;const R=[];for(let V=le;V<C;V+=1){const ae=$[V];R.push({key:ae.key,render:ae.render,top:K[V]})}return{totalHeight:oe,visibleRows:R}},[$,j,u,a]),I=w.useMemo(()=>se.map(T=>T.key).join("|"),[se]);return w.useLayoutEffect(()=>{const T=_.current,P=k.current;if(!T||!P)return;P.disconnect(),T.querySelectorAll("[data-virtual-history-row][data-row-key]").forEach(D=>P.observe(D))},[I]),w.useEffect(()=>{v?.({rendered:se.length,total:$.length})},[v,se.length,$.length]),$.length===0?null:m.jsx("div",{ref:_,className:"relative w-full",style:{height:`${Math.max(ne,0)}px`},children:se.map(T=>m.jsx("div",{className:"absolute inset-x-0 grid content-start","data-virtual-history-row":"true","data-row-key":T.key,style:{transform:`translateY(${Math.round(T.top)}px)`},children:T.render()},T.key))})}),ph="font-[JetBrains_Mono,monospace]";function C5({selectedAgentId:t,selectedFileName:l,updatedAtText:i,isEditingFile:a,isSavingFile:u,fileSaveError:s,fileEditDraft:c,onChangeDraft:d,onBeginEdit:x,onCancelEdit:h,onSave:g,canEditCurrentFile:b,canRenderMarkdown:y,filePaneText:v}){return m.jsxs("div",{className:"grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)] gap-2",children:[m.jsxs("div",{className:"flex items-center justify-between gap-[10px] bg-transparent px-0 py-[6px] pb-2 text-xs text-[var(--muted)]",children:[m.jsxs("div",{className:`${ph} flex min-w-0 gap-3`,children:[m.jsxs("span",{className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:["agent: ",t||"-"]}),m.jsxs("span",{className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:["file: ",l||"-"]}),m.jsxs("span",{className:"min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:["updated: ",i]})]}),m.jsx("div",{className:"flex shrink-0 items-center gap-1.5",children:a?m.jsxs(m.Fragment,{children:[m.jsx("button",{className:`${Xn} h-auto w-auto px-[9px] py-1 text-xs`,type:"button",onClick:h,disabled:u,children:"取消"}),m.jsx("button",{className:`${Xn} h-auto w-auto border-[var(--live)] px-[9px] py-1 text-xs text-[var(--live)] hover:bg-[rgba(50,215,186,0.12)]`,type:"button",onClick:g,disabled:u,children:u?"保存中...":"保存"})]}):m.jsx("button",{className:`${Xn} h-auto w-auto px-[9px] py-1 text-xs`,type:"button",onClick:x,disabled:!b,children:"编辑"})})]}),s?m.jsxs("p",{className:`${ph} m-0 text-xs text-[var(--bad)]`,children:["保存失败: ",s]}):null,m.jsx("div",{className:`${a?"overflow-hidden px-3 pt-0":"overflow-auto px-3 pt-2"} min-h-0`,children:a?m.jsx("textarea",{className:`${ph} block h-full min-h-0 w-full resize-none overflow-auto border border-[var(--line)] bg-[#0f171d] p-[10px] text-[13px] leading-[1.45] text-[var(--text)]`,value:c,onChange:N=>d(N.target.value),spellCheck:!1}):y?m.jsx(uy,{content:v}):m.jsx("pre",{className:"m-0 whitespace-pre-wrap break-words p-0 font-[JetBrains_Mono,monospace] text-[13px] leading-[1.45] text-[var(--text)]",children:v})})]})}const E5=({selectedAgentId:t,selectedFileName:l,fileContent:i,canEditCurrentFile:a,onSaved:u})=>{const[s,c]=w.useState(!1),[d,x]=w.useState(""),[h,g]=w.useState(""),[b,y]=w.useState(!1);w.useEffect(()=>{c(!1),x(""),g(""),y(!1)},[t,l]);const v=w.useCallback(()=>{a&&(g(""),x(i),c(!0))},[a,i]),N=w.useCallback(()=>{g(""),x(i),c(!1)},[i]),k=w.useCallback(async()=>{if(!(!t||!l)){y(!0),g("");try{const _=await Oj({agentId:t,name:l,content:d});u(_.content),c(!1)}catch(_){g(_ instanceof Error?_.message:String(_))}finally{y(!1)}}},[t,l,d,u]);return{isEditingFile:s,fileEditDraft:d,setFileEditDraft:x,fileSaveError:h,isSavingFile:b,beginFileEdit:v,cancelFileEdit:N,saveFileEdit:k}},A5=({open:t,activePanel:l,selectedSessionId:i,historySignature:a,liveTools:u,isThinking:s})=>{const[c,d]=w.useState(!1),[x,h]=w.useState(0),[g,b]=w.useState(0),[y,v]=w.useState(0),N=w.useRef(null),k=w.useRef(null),_=w.useRef(""),j=w.useRef(!0),B=w.useRef(!1),$=w.useRef(!1),ne=w.useRef(0),se=w.useRef("session"),I=w.useRef(""),T=w.useRef(null),P=w.useRef(null),Y=w.useRef(null),D=w.useCallback(()=>{const C=N.current;if(!C){$.current=!0;return}C.scrollTop=C.scrollHeight,ne.current=C.scrollTop,j.current=!0,B.current=!1,d(!1),$.current=!1},[]),X=w.useCallback(()=>{j.current=!0,B.current=!1,_.current="",d(!1)},[]);w.useEffect(()=>()=>{T.current!==null&&cancelAnimationFrame(T.current),P.current!==null&&cancelAnimationFrame(P.current),Y.current!==null&&clearTimeout(Y.current),k.current?.disconnect(),k.current=null},[]),w.useLayoutEffect(()=>{!t||l!=="session"||D()},[t,l,i,D]),w.useEffect(()=>{if(!t)return;const C=se.current!=="session"&&l==="session",R=l==="session"&&i&&i!==I.current;if(se.current=l,i&&(I.current=i),!C&&!R)return;T.current!==null&&cancelAnimationFrame(T.current),P.current!==null&&cancelAnimationFrame(P.current),Y.current!==null&&clearTimeout(Y.current);const V=()=>{if(B.current)return;const ae=N.current;if(!ae){$.current=!0;return}ae.scrollTop=ae.scrollHeight,ne.current=ae.scrollTop,j.current=!0,d(!1)};V(),T.current=requestAnimationFrame(()=>{V(),P.current=requestAnimationFrame(()=>{V()})}),Y.current=setTimeout(()=>{V()},90)},[t,l,i]),w.useEffect(()=>{if(l!=="session")return;const C=[a,u.map(R=>`${R.key}:${R.outputText.length}`).join("|"),s?"thinking":""].join("::");C!==_.current&&(_.current=C,j.current&&D())},[a,u,s,l,D]);const K=w.useCallback((C="smooth")=>{const R=N.current;R&&(R.scrollTo({top:R.scrollHeight,behavior:C}),ne.current=R.scrollHeight,j.current=!0,B.current=!1,d(!1))},[]),U=w.useCallback(C=>{if(k.current?.disconnect(),k.current=null,N.current=C,!C){h(0),b(0),v(0);return}if(h(C.clientWidth),b(C.clientHeight),v(C.scrollTop),typeof ResizeObserver<"u"){const R=new ResizeObserver(V=>{const ae=V[0];ae&&(h(Math.round(ae.contentRect.width)),b(Math.round(ae.contentRect.height)))});R.observe(C),k.current=R}ne.current=C.scrollTop,$.current&&(C.scrollTop=C.scrollHeight,ne.current=C.scrollTop,j.current=!0,B.current=!1,d(!1),$.current=!1,requestAnimationFrame(()=>{N.current===C&&(C.scrollTop=C.scrollHeight,ne.current=C.scrollTop)}))},[]),oe=w.useCallback(()=>{const C=N.current;if(!C)return;const R=ne.current,V=C.scrollTop;v(V),b(C.clientHeight);const ae=C.scrollHeight-C.scrollTop-C.clientHeight,M=ae<=4,O=V<R;if(M){j.current=!0,d(!1),ne.current=V;return}if(!B.current){ne.current=V;return}(O||ae>4)&&(j.current=!1,d(!0)),ne.current=V},[]),le=w.useCallback(()=>{B.current=!0},[]);return{showScrollToBottom:c,historyViewportWidth:x,historyViewportHeight:g,historyScrollTop:y,setHistoryScrollerNode:U,handleHistoryScroll:oe,markHistoryUserInteracted:le,scrollHistoryToBottom:K,resetHistoryScrollTracking:X}};function k5({open:t,selectedAgentId:l,selectedSessionId:i,sessions:a,sendMode:u,sessionMessage:s,onClose:c,onChangeSelectedSessionId:d,onChangeSendMode:x,onChangeMessage:h,onSendMessage:g}){const b="cursor-pointer border border-[var(--live-25)] bg-transparent px-[10px] py-2 font-semibold text-[var(--live)] hover:bg-[rgba(50,215,186,0.1)]",[y,v]=w.useState("session"),[N,k]=w.useState([]),[_,j]=w.useState(!1),[B,$]=w.useState(""),[ne,se]=w.useState(""),[I,T]=w.useState(""),[P,Y]=w.useState(!1),[D,X]=w.useState(""),[K,U]=w.useState([]),[oe,le]=w.useState(!1),[C,R]=w.useState(""),[V,ae]=w.useState({}),[M,O]=w.useState({}),[L,A]=w.useState(""),[xe,Se]=w.useState([]),[Ee,Fe]=w.useState(!1),[tt,Ve]=w.useState({rendered:0,total:0}),Lt=w.useRef(null),Ut=w.useRef(null),_t=w.useRef(""),he=w.useRef(null),Ue=a.length>0,Te=t&&!!l.trim(),de=w.useMemo(()=>K.map(Ce=>`${Ce.id}:${Ce.ts??""}`).join("|"),[K]),{showScrollToBottom:Ae,historyViewportWidth:Xe,historyViewportHeight:it,historyScrollTop:nt,setHistoryScrollerNode:pt,handleHistoryScroll:H,markHistoryUserInteracted:ve,scrollHistoryToBottom:Oe,resetHistoryScrollTracking:At}=A5({open:t,activePanel:y,selectedSessionId:i,historySignature:de,liveTools:xe,isThinking:Ee});w.useEffect(()=>{t&&v("session")},[t]),w.useEffect(()=>{if(!t)return;const Ce=rt=>{rt.key==="Escape"&&c()};return window.addEventListener("keydown",Ce),()=>window.removeEventListener("keydown",Ce)},[t,c]),w.useEffect(()=>{if(t)return;const Ce=document.activeElement;Ce&&Ut.current?.contains(Ce)&&Ce.blur()},[t]),w.useEffect(()=>{if(!t||y!=="session")return;if(At(),!i){U([]),R("");return}let Ce=!1;const rt=async(Hn=!1)=>{Hn&&le(!0);try{const Ge=await Rj({sessionId:i,limit:200});if(Ce)return;_t.current="",A(""),Se([]),Fe(!1),U(Ge),R("")}catch(Ge){if(Ce)return;R(Ge instanceof Error?Ge.message:String(Ge))}finally{if(Ce)return;Hn&&le(!1)}};rt(!0);const gt=xy(Hn=>{py(Hn,{gatewayFrame:Ge=>{if(!Ge||Ge.type!=="event")return;const jn=$j(Ge,i),ht=Hj(Ge,i);if(ht&&(Fe(!1),Se(hn=>{const Yt=hn.findIndex(bt=>bt.key===ht.key),Tt=(bt,an)=>an?!bt||an.startsWith(bt)?an:bt.endsWith(an)?bt:`${bt}
|
|
55
|
+
${an}`:bt;if(Yt<0)return ht.kind==="tool-start"?[...hn,{key:ht.key,toolName:ht.toolName,commandText:ht.commandText||"-",outputText:"",ts:ht.ts}]:[...hn,{key:ht.key,toolName:ht.toolName,commandText:"-",outputText:ht.outputText,ts:ht.ts}];const kt=[...hn],Nt=kt[Yt];return ht.kind==="tool-start"?(kt[Yt]={...Nt,toolName:ht.toolName||Nt.toolName,commandText:ht.commandText||Nt.commandText,ts:ht.ts??Nt.ts},kt):(kt[Yt]={...Nt,toolName:ht.toolName||Nt.toolName,outputText:Tt(Nt.outputText,ht.outputText),ts:ht.ts??Nt.ts},kt)})),!jn)return;if(jn.kind==="lifecycle-start"){_t.current=`live-assistant:${i}:${Date.now()}`,A(_t.current);return}if(jn.kind==="lifecycle-end"){_t.current="",A(""),Fe(!1),rt(!1);return}Fe(!1);const rn=new Date().toISOString();U(hn=>{const Yt=_t.current||`live-assistant:${i}:${Date.now()}`;_t.current||(_t.current=Yt,A(Yt));const Tt=hn.findIndex(an=>an.id===Yt);if(Tt<0)return[...hn,{id:Yt,role:"assistant",text:jn.text,ts:rn}];const kt=hn[Tt],Nt=Ij(kt.text,jn.text),bt=[...hn];return bt[Tt]={...kt,text:Nt,ts:rn},bt})}})});return()=>{Ce=!0,gt(),he.current&&(clearTimeout(he.current),he.current=null)}},[t,y,i,At]),w.useEffect(()=>{if(!Te)return;let Ce=!1;return j(!0),$(""),Dj(l).then(rt=>{Ce||k(rt)}).catch(rt=>{Ce||($(rt instanceof Error?rt.message:String(rt)),k([]))}).finally(()=>{Ce||j(!1)}),()=>{Ce=!0}},[Te,l]),w.useEffect(()=>{if(N.length===0){se("");return}N.some(rt=>rt.name===ne)||se(N[0].name)},[N,ne]),w.useEffect(()=>{if(!Te||!ne){T(""),X("");return}let Ce=!1;return Y(!0),X(""),Tj(l,ne).then(rt=>{Ce||T(rt.content??"")}).catch(rt=>{Ce||(T(""),X(rt instanceof Error?rt.message:String(rt)))}).finally(()=>{Ce||Y(!1)}),()=>{Ce=!0}},[Te,l,ne]);const ie=w.useMemo(()=>l?_?"核心文件加载中...":B?`核心文件加载失败: ${B}`:N.length===0?"该智能体暂无核心文件":ne?P?"文件内容加载中...":D?`文件加载失败: ${D}`:I||"文件为空":"请选择左侧文件":"未选择智能体",[l,_,B,N.length,ne,P,D,I]),pe=y==="files"&&!!l&&!!ne&&!P&&!D,je=w.useCallback(Ce=>{T(Ce),k(rt=>rt.map(gt=>gt.name===ne?{...gt,size:Ce.length,updatedAt:new Date().toISOString()}:gt))},[ne]),{isEditingFile:Be,fileEditDraft:_e,setFileEditDraft:ze,fileSaveError:Re,isSavingFile:Le,beginFileEdit:et,cancelFileEdit:zt,saveFileEdit:qe}=E5({selectedAgentId:l,selectedFileName:ne,fileContent:I,canEditCurrentFile:pe,onSaved:je}),kn=!!l&&!_&&!B&&N.length>0&&!!ne&&!Be&&!P&&!D,Ft=w.useMemo(()=>i?oe?"会话加载中...":C?`会话加载失败: ${C}`:K.length===0?"暂无会话消息":"":"请选择会话",[i,oe,C,K.length]),on=w.useMemo(()=>zj(K),[K]),ge=N.find(Ce=>Ce.name===ne)??null,Nl=ge?.updatedAt?new Date(ge.updatedAt).toLocaleString("zh-CN",{hour12:!1}):"-",dn=w.useCallback(Ce=>{ae(rt=>({...rt,[Ce]:!(rt[Ce]??!0)}))},[]),Sn=w.useCallback(Ce=>{O(rt=>({...rt,[Ce]:!(rt[Ce]??!0)}))},[]),fl=w.useCallback(Ce=>{Ve(Ce)},[]),dl=Ce=>{Ce.preventDefault();const rt=s.trim();!i||!rt||(U(gt=>[...gt,{id:`local-user:${i}:${Date.now()}`,role:"user",text:rt,ts:new Date().toISOString()}]),Fe(!0),he.current&&(clearTimeout(he.current),he.current=null),he.current=setTimeout(()=>{Fe(!1),he.current=null},3e4),g(Ce))},Ll=w.useCallback(Ce=>{Ce.key==="Enter"&&(Ce.shiftKey||Ce.nativeEvent.isComposing||(Ce.preventDefault(),Lt.current?.requestSubmit()))},[]);return m.jsxs(m.Fragment,{children:[m.jsx("div",{className:`${Is} ${t?Hs:Bu}`,onClick:c,"aria-hidden":!t}),m.jsx("aside",{ref:Ut,className:`${Us} ${t?Gs:_u}`,"aria-hidden":!t,onClick:c,children:m.jsxs("div",{className:`${Wu} grid h-[min(88vh,calc(100vh-24px))] max-h-[88vh] w-[min(1320px,98vw)] grid-rows-[auto_minmax(0,1fr)] overflow-hidden p-0 max-[760px]:h-screen max-[760px]:max-h-screen max-[760px]:w-screen`,onClick:Ce=>Ce.stopPropagation(),children:[m.jsxs("div",{className:`${vl} px-3 pt-3`,children:[m.jsx("h2",{children:"会话工具"}),m.jsx("button",{className:Xn,type:"button",onClick:c,"aria-label":"关闭会话弹窗",title:"关闭",children:m.jsx(_l,{})})]}),m.jsxs("div",{className:"m-0 grid h-full min-h-0 grid-cols-[220px_minmax(0,1fr)] border-t border-[var(--line)] overflow-hidden bg-[rgba(15,23,29,0.45)] max-[760px]:grid-cols-1",children:[m.jsxs("nav",{className:"grid min-h-0 content-start gap-2 overflow-hidden border-r border-[var(--line)] bg-transparent p-[10px] max-[760px]:max-h-[42vh] max-[760px]:border-r-0 max-[760px]:border-b",children:[m.jsx("button",{type:"button",className:`w-full border px-2 py-[7px] text-left transition-[border-color,background-color,color] ${y==="session"?"border-[var(--live)] bg-[rgba(50,215,186,0.08)] text-[var(--live)]":"border-[var(--line)] bg-transparent text-[var(--text)] hover:border-[#2a3c4b] hover:bg-[rgba(142,163,179,0.08)]"}`,onClick:()=>v("session"),children:"会话"}),m.jsx("div",{className:"mt-1 px-0.5 py-1 text-xs text-[var(--muted)]",children:"核心文件"}),m.jsxs("div",{className:"mt-0.5 grid gap-1.5 pt-2",children:[_?m.jsx("p",{children:"加载中..."}):null,!_&&N.length===0?m.jsx("p",{children:"暂无文件"}):null,N.map(Ce=>m.jsx("button",{type:"button",className:`break-all border px-2 py-1.5 text-left font-[JetBrains_Mono,monospace] text-xs transition-[border-color,background-color,color] ${y==="files"&&ne===Ce.name?"active":""} ${y==="files"&&ne===Ce.name?"border-[var(--live)] bg-[#0f171d] text-[var(--live)]":"border-[var(--line)] bg-[#0f171d] text-[var(--text)] hover:border-[#2a3c4b] hover:bg-[rgba(142,163,179,0.08)]"}`,onClick:()=>{se(Ce.name),v("files")},children:Ce.name},Ce.name))]})]}),m.jsx("div",{className:"h-full min-h-0 overflow-hidden bg-transparent px-0 pt-[10px] pb-3",children:y==="session"?m.jsxs("form",{ref:Lt,onSubmit:dl,className:"grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)_auto]",children:[m.jsx("div",{className:"px-3 pb-2",children:m.jsxs("div",{className:"grid gap-[10px] grid-cols-[minmax(0,1fr)_minmax(220px,34%)] max-[760px]:grid-cols-1",children:[m.jsxs("div",{className:"grid gap-1.5",children:[m.jsx("label",{className:"block text-xs text-[var(--muted)]",children:"会话 ID"}),m.jsx(Kn,{value:i,options:Ue?a.map(Ce=>({value:Ce.id,label:Ce.id})):[{value:"",label:"暂无可用会话"}],onChange:d,triggerClassName:fn,disabled:!Ue,ariaLabel:"选择会话 ID"})]}),m.jsxs("div",{className:"grid gap-1.5",children:[m.jsx("label",{className:"block text-xs text-[var(--muted)]",children:"发送模式"}),m.jsx(Kn,{value:u,options:[{value:"auto",label:"自动选择(推荐)"},{value:"chat",label:"仅 chat.send"},{value:"sessions",label:"仅 sessions.send"}],onChange:Ce=>x(Ce),triggerClassName:fn,ariaLabel:"选择发送模式"})]})]})}),m.jsxs("div",{className:"relative h-full min-h-0 overflow-hidden",children:[null,m.jsx("div",{className:"block h-full min-h-0 overflow-auto overflow-x-hidden px-3 pr-1 pb-8",ref:pt,onScroll:H,onWheel:ve,onTouchStart:ve,onPointerDown:ve,children:m.jsx(w5,{historyStatusText:Ft,historyViewportWidth:Xe,historyViewportHeight:it,historyScrollTop:nt,mergedHistory:on,liveTools:xe,isThinking:Ee,liveAssistantId:L,collapsedToolMap:V,collapsedToolOutputMap:M,onToggleToolCollapsed:dn,onToggleToolOutputCollapsed:Sn,onVirtualStatsChange:fl})}),!Ft&&Ae?m.jsx("button",{className:"absolute bottom-3 left-1/2 z-[2] -translate-x-1/2 cursor-pointer border border-[var(--line)] bg-[rgba(15,23,29,0.92)] px-[10px] py-1 text-xs text-[var(--text)] hover:border-[var(--live)] hover:text-[var(--live)]",type:"button",onClick:()=>Oe("smooth"),children:"回到底部"}):null]}),m.jsx("div",{className:"min-w-0 px-3 pt-2",children:m.jsxs("div",{className:"relative w-full min-w-0 overflow-hidden",children:[m.jsx("textarea",{value:s,onChange:Ce=>h(Ce.target.value),onKeyDown:Ll,rows:3,placeholder:Ue?"输入发送给会话的文本":"请先在系统中创建会话",className:`${Iu} block min-h-[86px] max-h-[220px] resize-none pb-8 pr-11`}),m.jsxs("button",{className:`${b} absolute right-[10px] bottom-[10px] m-0 inline-flex h-7 w-7 min-w-7 items-center justify-center p-0`,type:"submit",disabled:!Ue||!i,children:[m.jsx("span",{className:"absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0 [-webkit-clip-path:inset(50%)] [clip:rect(0,0,0,0)]",children:"发送消息"}),m.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16","aria-hidden":"true",focusable:"false",children:m.jsx("path",{d:"M4 12h12m0 0-4-4m4 4-4 4M4 5v6",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})})]})]})})]}):m.jsx(C5,{selectedAgentId:l,selectedFileName:ne,updatedAtText:Nl,isEditingFile:Be,isSavingFile:Le,fileSaveError:Re,fileEditDraft:_e,onChangeDraft:ze,onBeginEdit:et,onCancelEdit:zt,onSave:()=>{qe()},canEditCurrentFile:pe,canRenderMarkdown:kn,filePaneText:ie})})]})]})})]})}const j5=t=>{const l=new URLSearchParams;typeof t.offset=="number"&&l.set("offset",String(t.offset)),typeof t.limit=="number"&&l.set("limit",String(t.limit)),t.levels&&t.levels.length>0&&l.set("level",t.levels.join(",")),t.keyword?.trim()&&l.set("keyword",t.keyword.trim()),t.order&&l.set("order",t.order);const i=l.toString();return i?`?${i}`:""};async function j1(t){const l=encodeURIComponent(t.runId);return dt(`/api/logs/runs/${l}/timeline${j5(t)}`)}async function M5(){const t=await dt("/api/logs/runs");return Array.isArray(t.items)?t.items:[]}const D5=t=>`${um}/api/logs/runs/${encodeURIComponent(t)}/timeline/raw`,T5=(t,l)=>{const[i,a]=w.useState([]),[u,s]=w.useState(0),[c,d]=w.useState(0),[x,h]=w.useState(!1),[g,b]=w.useState(""),[y,v]=w.useState(""),[N,k]=w.useState(""),[_,j]=w.useState("desc"),[B,$]=w.useState([]),[ne,se]=w.useState(""),[I,T]=w.useState(null),[P,Y]=w.useState(!1),D=C=>{a([]),s(0),d(0),T(null),Y(!1),se(""),C?.keepError||b("")};w.useEffect(()=>{if(!l.trim()){D(),h(!1);return}let C=!1;return D(),h(!0),j1({runId:l,keyword:N,levels:B,order:_}).then(R=>{C||(a(R.items),s(R.total),d(R.parseErrorCount),T(R.nextOffset),se(R.items[0]?.id??""))}).catch(R=>{C||(b(R instanceof Error?R.message:String(R)),D({keepError:!0}))}).finally(()=>{C||h(!1)}),()=>{C=!0,D(),h(!1)}},[t,l,N,_,B]),w.useEffect(()=>{v(N)},[t,N]);const X=w.useMemo(()=>i.find(C=>C.id===ne)??i[0]??null,[i,ne]),K=()=>{k(y.trim())},U=async()=>{if(!(I===null||P)){Y(!0);try{const C=await j1({runId:l,keyword:N,levels:B,order:_,offset:I});a(R=>[...R,...C.items]),s(C.total),d(C.parseErrorCount),T(C.nextOffset)}catch(C){b(C instanceof Error?C.message:String(C))}finally{Y(!1)}}};return{items:i,total:u,parseErrorCount:c,loading:x,error:g,keywordDraft:y,setKeywordDraft:v,keyword:N,order:_,setOrder:j,selectedLevels:B,selectedItem:X,setSelectedId:se,applyFilters:K,toggleLevel:(C,R)=>{$(V=>R?[...new Set([...V,C])]:V.filter(ae=>ae!==C))},resetFilters:()=>{v(""),k(""),$([]),j("desc")},rawUrl:D5(l),hasMore:I!==null,loadingMore:P,loadMore:U}},O5='13px "JetBrains Mono", monospace',mm=19,B5=54,_5=96,F5=72,R5=420,M1=new Map,D1=new Map,L5=t=>t.replace(/\t/g," ").trim()||"-",Cy=(t,l)=>{const i=Pu(L5(t),O5,{whiteSpace:"pre-wrap"});return Math.max(1,Vu(i,Math.max(120,l),mm).lineCount)},z5=(t,l)=>{const i=`${l}::${t}`,a=M1.get(i);if(a!==void 0)return a;const u=Math.max(F5,B5+Cy(t,l)*mm);return M1.set(i,u),u},Ey=t=>{if(t===void 0)return"无 detail";if(typeof t=="string")return t;try{return JSON.stringify(t,null,2)}catch{return String(t)}},$5=(t,l)=>{const i=Ey(t),a=`${l}::${i}`,u=D1.get(a);if(u!==void 0)return u;const s=Math.min(R5,_5+Cy(i,l)*mm);return D1.set(a,s),s},T1={info:"信息",warn:"警告",error:"错误"},O1=10,B1=480,I5=640,H5="flex flex-wrap gap-2",_1="inline-flex cursor-pointer items-center gap-1.5 rounded-none px-2 py-[2px] text-xs uppercase",F1={info:"bg-[rgba(142,163,179,0.2)] text-[#a5b9c8]",warn:"bg-[rgba(255,184,77,0.16)] text-[var(--warn)]",error:"bg-[rgba(255,107,107,0.16)] text-[var(--bad)]"},U5="grid w-full gap-2 border border-[var(--line)] bg-[linear-gradient(180deg,rgba(15,23,29,0.92)_0%,rgba(11,17,22,0.92)_100%)] px-3 py-2.5 text-left text-[var(--text)]",R1="m-0 flex items-center justify-between border-b border-[var(--line)] bg-[rgba(15,23,29,0.9)] p-3",G5="cursor-pointer border px-[10px] text-(--muted) py-[10px] text-left border-transparent bg-transparent hover:border-[var(--line)] hover:bg-[#15212a]",ui="font-[JetBrains_Mono,monospace]",L1="mt-0 cursor-pointer border border-[var(--live-25)] bg-transparent px-[10px] py-2 font-semibold text-[var(--live)] hover:bg-[rgba(50,215,186,0.1)]";function q5({currentRunId:t}){const[l,i]=w.useState([]),[a,u]=w.useState(t),[s,c]=w.useState(520),[d,x]=w.useState(420),[h,g]=w.useState(0),[b,y]=w.useState(0),v=w.useRef(new Map),N=w.useRef(null),k=w.useRef(null),[_,j]=w.useState(0),B=T5(!0,a);w.useEffect(()=>{u(Y=>Y||t)},[t]),w.useEffect(()=>{let Y=!0;return M5().then(D=>{Y&&(i(D),!a&&D.length>0&&u(D[0]))}).catch(()=>{}),()=>{Y=!1}},[a]);const $=Ey(B.selectedItem?.detail),ne=$5(B.selectedItem?.detail,d);w.useEffect(()=>{if(!(typeof ResizeObserver>"u"))return N.current=new ResizeObserver(Y=>{let D=!1;const X=v.current;for(let K=0;K<Y.length;K+=1){const U=Y[K],oe=U.target.dataset.rowKey;if(!oe)continue;const le=Math.max(1,Math.ceil(U.contentRect.height));X.get(oe)!==le&&(X.set(oe,le),D=!0)}D&&j(K=>K+1)}),()=>{N.current?.disconnect(),N.current=null}},[]);const se=w.useMemo(()=>B.items.map(D=>({key:D.id,estimatedHeight:z5(D.text,s),render:()=>m.jsxs("button",{type:"button",className:`${U5} ${B.selectedItem?.id===D.id?"border-(--live) shadow-[inset_0_0_0_1px_rgba(138,180,255,0.18)]":""}`,onClick:()=>B.setSelectedId(D.id),children:[m.jsxs("div",{className:`${ui} flex items-center justify-between gap-3 text-xs text-(--muted)`,children:[m.jsx("span",{children:new Date(D.ts).toLocaleString("zh-CN",{hour12:!1})}),m.jsx("span",{className:`${_1} ${F1[D.level]}`,children:T1[D.level]})]}),m.jsx("p",{className:"m-0 wrap-break-word whitespace-pre-wrap font-[JetBrains_Mono,monospace] text-[13px] leading-normal",children:D.text})]})})),[B.items,B.selectedItem?.id,B.setSelectedId,s]),{totalHeight:I,visibleRows:T}=w.useMemo(()=>{const Y=v.current,D=b>0?b:I5,X=Math.max(0,h-B1),K=h+D+B1;let U=0;const oe=new Array(se.length),le=new Array(se.length);for(let M=0;M<se.length;M+=1){const O=se[M];oe[M]=U;const L=Y.get(O.key)??O.estimatedHeight;le[M]=L,U+=L+O1}const C=U>0?U-O1:0;let R=0;for(;R<se.length;){const M=oe[R],O=le[R];if(M+O>=X)break;R+=1}let V=R;for(;V<se.length&&!(oe[V]>K);)V+=1;const ae=[];for(let M=R;M<V;M+=1){const O=se[M];ae.push({key:O.key,top:oe[M],render:O.render})}return{totalHeight:C,visibleRows:ae}},[se,_,h,b]),P=w.useMemo(()=>T.map(Y=>Y.key).join("|"),[T]);return w.useLayoutEffect(()=>{const Y=k.current,D=N.current;if(!Y||!D)return;D.disconnect(),Y.querySelectorAll("[data-virtual-run-log-row][data-row-key]").forEach(K=>D.observe(K))},[P]),m.jsxs("section",{"data-center-card":!0,"data-run-log-page":!0,className:"grid h-full min-h-0 min-w-0 flex-1 grid-rows-[auto_minmax(0,1fr)] gap-3 overflow-hidden",children:[m.jsxs("div",{className:vl,children:[m.jsx("div",{children:m.jsx("h2",{children:"日志中心"})}),m.jsx("a",{className:L1,href:B.rawUrl,target:"_blank",rel:"noreferrer",children:"原始 NDJSON"})]}),m.jsxs("div",{className:"grid h-full min-h-0 gap-3 min-[1181px]:grid-cols-[minmax(220px,260px)_minmax(420px,1.15fr)_minmax(360px,0.95fr)] max-[1180px]:grid-cols-1",children:[m.jsx("aside",{className:"h-full min-h-0 overflow-hidden",children:m.jsxs("section",{className:"grid h-full min-h-0 grid-rows-[auto_minmax(0,1fr)] overflow-hidden border border-(--line) bg-[rgba(15,23,29,0.72)]",children:[m.jsxs("div",{className:R1,children:[m.jsx("h2",{children:"运行列表"}),m.jsx("span",{className:ui,children:l.length})]}),m.jsx("div",{className:"grid min-h-0 gap-2 overflow-auto p-2.5",children:(l.length>0?l:[t]).map(Y=>m.jsx("button",{type:"button",className:`${G5} ${a===Y?"border-(--live) bg-[rgba(50,215,186,0.12)] text-(--text) shadow-[inset_3px_0_0_0_var(--live)]":""}`,onClick:()=>u(Y),children:Y},Y))})]})}),m.jsxs("section",{className:"grid h-full min-h-0 grid-rows-[auto_auto_minmax(0,1fr)] overflow-hidden border border-(--line) bg-[rgba(15,23,29,0.72)]",ref:Y=>{Y&&c(Math.max(260,Y.clientWidth-34))},children:[m.jsxs("div",{className:R1,children:[m.jsx("h2",{children:"日志列表"}),m.jsx("span",{className:ui,children:B.total})]}),m.jsxs("div",{className:"flex flex-wrap items-center gap-2.5 border-b border-(--line) bg-[rgba(15,23,29,0.82)] p-3",children:[m.jsx("input",{className:`${fn} min-w-0 flex-[1_1_240px]`,value:B.keywordDraft,onChange:Y=>B.setKeywordDraft(Y.target.value),onKeyDown:Y=>{Y.key==="Enter"&&B.applyFilters()},placeholder:"关键字检索"}),m.jsx("div",{className:H5,children:["info","warn","error"].map(Y=>m.jsxs("label",{className:`${_1} ${F1[Y]}`,children:[m.jsx("input",{type:"checkbox",checked:B.selectedLevels.includes(Y),onChange:D=>B.toggleLevel(Y,D.target.checked)}),m.jsx("span",{children:T1[Y]})]},Y))}),m.jsx("button",{className:L1,type:"button",onClick:()=>B.setOrder(B.order==="desc"?"asc":"desc"),children:B.order==="desc"?"最新在前":"最早在前"})]}),m.jsxs("div",{className:"relative min-h-0 overflow-auto p-3",onScroll:Y=>g(Y.currentTarget.scrollTop),ref:Y=>{Y&&(y(Y.clientHeight),g(Y.scrollTop),c(Math.max(260,Y.clientWidth-34)))},children:[B.error?m.jsxs("div",{className:`${ui} grid min-h-45 place-items-center p-6 text-center text-xs text-(--muted)`,children:["日志加载失败: ",B.error]}):null,!B.error&&B.items.length===0&&!B.loading?m.jsx("div",{className:`${ui} grid min-h-45 place-items-center p-6 text-center text-xs text-(--muted)`,children:"暂无匹配日志"}):null,!B.error&&B.items.length>0?m.jsx("div",{ref:k,className:"relative w-full",style:{height:`${Math.max(I,0)}px`},children:T.map(Y=>m.jsx("div",{className:"absolute inset-x-0 grid content-start","data-virtual-run-log-row":"true","data-row-key":Y.key,style:{transform:`translateY(${Math.round(Y.top)}px)`},children:Y.render()},Y.key))}):null,B.error||B.items.length===0&&!B.loading?null:m.jsxs("div",{className:"sticky right-0 bottom-0 mt-2 flex items-center justify-end gap-2",children:[B.hasMore?m.jsx("button",{type:"button",disabled:B.loadingMore,onClick:()=>{B.loadMore()},className:`${ui} cursor-pointer border border-[var(--live-25)] bg-[rgba(7,12,16,0.84)] px-2 py-0.75 text-xs leading-[1.2] text-[var(--live)] hover:bg-[rgba(50,215,186,0.12)] disabled:opacity-50 disabled:cursor-wait`,children:B.loadingMore?"加载中…":"加载更多"}):null,m.jsxs("div",{className:`${ui} w-fit border border-[rgba(142,163,179,0.28)] bg-[rgba(7,12,16,0.84)] px-1.5 py-0.75 text-xs leading-[1.2] text-[#9ab1c2]`,children:["rendered ",T.length," / loaded ",se.length," / total ",B.total]})]})]})]}),m.jsx("aside",{className:"grid min-h-0 grid-rows-[auto_minmax(0,1fr)] border border-(--line) bg-[rgba(15,23,29,0.72)]",ref:Y=>{Y&&x(Math.max(220,Y.clientWidth-30))},children:B.selectedItem?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"border-b border-(--line) p-3",children:m.jsxs("div",{className:"grid gap-2",children:[m.jsx("strong",{className:"text-sm leading-normal",children:B.selectedItem.text}),m.jsxs("div",{className:`${ui} flex flex-wrap gap-2.5 text-xs text-(--muted)`,children:[m.jsx("span",{children:B.selectedItem.ts}),m.jsx("span",{children:B.selectedItem.level}),m.jsx("span",{children:B.selectedItem.runId})]})]})}),m.jsx("div",{className:"min-h-0 overflow-auto",style:{minHeight:`${ne}px`},children:m.jsx("pre",{className:"m-0 p-3 font-[JetBrains_Mono,monospace] text-[13px] leading-normal wrap-break-word whitespace-pre-wrap text-(--text)",children:$})})]}):m.jsx("div",{className:`${ui} grid min-h-45 place-items-center p-6 text-center text-xs text-(--muted)`,children:"选择中间日志后查看 detail"})})]})]})}function P5({navCollapsed:t,onToggleNav:l,routeText:i}){const a=(u,s)=>m.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14","aria-hidden":"true",children:[m.jsx("rect",{x:"1.5",y:"1.5",width:"13",height:"13",rx:"2",fill:"none",stroke:"currentColor",strokeWidth:"1.2"}),m.jsx("rect",{x:"2.5",y:"2.5",width:"4.5",height:"11",rx:"1",fill:s?"none":"currentColor",stroke:"currentColor",strokeWidth:"1"})]});return m.jsx("header",{className:"flex items-center justify-start gap-2.5 border-b border-r border-(--line) px-3 py-2 h-[60px]",children:m.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[m.jsx("div",{className:"inline-flex items-center gap-1.5",children:m.jsx("button",{className:`mt-0 inline-flex min-h-[32px] min-w-[32px] items-center justify-center border border-(--line) bg-[rgba(15,23,29,0.55)] p-2 text-(--muted) transition-[background-color,color] hover:bg-[#15212a] hover:text-(--text) focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--live)] focus-visible:outline-offset-[-2px] ${t?"bg-[rgba(15,23,29,0.8)] text-(--text)":""}`,type:"button",onClick:l,"aria-label":t?"展开导航":"收起导航",title:t?"展开导航":"收起导航",children:a("left",t)})}),m.jsxs("div",{className:"min-w-0 text-sm text-(--muted)",children:[m.jsx("span",{children:"主页"}),m.jsx("span",{className:"inline-flex px-1.5 align-middle text-(--muted)",children:m.jsx(my,{className:"h-3.5 w-3.5"})}),m.jsx("span",{className:"text-(--text)",children:i})]})]})})}const V5=t=>{try{return JSON.parse(t)}catch{return null}},Y5=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),Yu=t=>{const l=String(t??"").trim();if(!l)return null;if(l.includes("contract_violation:")||l.includes("openclaw_send_failed:")||l.includes("request_id_mismatch")||l.includes("result_envelope_missing"))return{kind:"structured",label:"结构化错误",code:"structured_contract_or_transport",message:l.replace(/^Error:\s*/i,""),raw:l};const i=V5(l);if(Y5(i)){const a=typeof i.code=="string"?i.code.trim():"",u=typeof i.message=="string"?i.message.trim():"";if(a||u)return{kind:"node_return",label:"节点返回错误",code:a||"node_error",message:u||a||l,raw:l}}return{kind:"unknown",label:"未知错误",code:"unknown_error",message:l.replace(/^Error:\s*/i,""),raw:l}},Q5=t=>{if(t.status!=="failed")return!1;const l=Yu(t.lastError);return l?l.kind==="structured"||l.kind==="unknown":!1},J5=t=>t.status!=="failed"?!1:Yu(t.lastError)?.kind==="node_return",Tl="font-[JetBrains_Mono,monospace]",X5="grid min-h-[220px] grid-rows-[auto_auto_1fr_auto] gap-3 border border-[#29414f] bg-[linear-gradient(180deg,rgba(18,31,38,0.92)_0%,rgba(14,24,30,0.92)_100%)] p-3 shadow-[inset_0_1px_0_rgba(255,255,255,0.03),0_12px_28px_rgba(2,6,10,0.14)]",K5=t=>t.some(l=>l.status==="running")?"running":t.some(l=>l.status==="failed")?"failed":t.some(l=>l.status==="stopped")?"stopped":t.some(l=>l.status==="blocked")?"blocked":t.some(l=>l.status==="waiting")?"waiting":t.some(l=>l.status==="success")?"success":"idle",Z5=t=>t==="running"?"bg-[rgba(50,215,186,0.15)] text-(--live)":t==="failed"?"bg-[rgba(255,107,107,0.16)] text-(--bad)":t==="blocked"||t==="waiting"?"bg-[rgba(255,184,77,0.16)] text-(--warn)":t==="success"?"bg-[rgba(50,215,186,0.15)] text-(--live)":"bg-[rgba(142,163,179,0.2)] text-(--muted)",W5=t=>t==="running"?"运行中":t==="failed"?"失败":t==="blocked"?"阻塞":t==="waiting"?"等待中":t==="stopped"?"已停止":t==="success"?"已完成":"空闲",e4=t=>t.find(l=>l.status==="running")??null,t4=t=>{const l=t.flatMap(i=>i.artifacts??[]);return l.length===0?null:[...l].sort((i,a)=>{const u=Date.parse(i.createdAt||"")||0;return(Date.parse(a.createdAt||"")||0)-u})[0]??null},z1=t=>{if(!t)return"-";const l=new Date(t);if(Number.isNaN(l.getTime()))return"-";const i=l.getFullYear(),a=String(l.getMonth()+1).padStart(2,"0"),u=String(l.getDate()).padStart(2,"0"),s=String(l.getHours()).padStart(2,"0"),c=String(l.getMinutes()).padStart(2,"0");return`${i}-${a}-${u} ${s}:${c}`};function n4({pipelines:t,onStartPipeline:l,onNavigatePipeline:i,onOpenAgentSession:a}){const[u,s]=X1.useState("");return m.jsxs("section",{"data-center-card":!0,className:"min-h-0 min-w-0",children:[m.jsx("div",{className:"px-3 pt-3",children:m.jsxs("div",{className:"border border-(--line) bg-[rgba(13,22,28,0.82)] px-3 py-2",children:[m.jsx("p",{className:"m-0 text-sm font-semibold text-(--text)",children:"部门运营总览"}),m.jsx("p",{className:"m-0 mt-1 text-xs text-(--muted)",children:"每个卡片代表一条流水线(部门),展示当前运行节点与最新产物。"})]})}),m.jsx("div",{className:"p-3",children:m.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(310px,1fr))] gap-3",children:t.map(c=>{const d=K5(c.nodes),x=e4(c.nodes),h=c.nodes.find(T=>T.status==="failed")??null,g=c.nodes.find(T=>Q5(T))??null,b=c.nodes.find(T=>J5(T))??null,y=b??g??h,v=y?.executor.agentId?.trim()??"",N=t4(c.nodes),k=c.nodes.filter(T=>T.status==="success").length,_=c.nodes.filter(T=>T.status==="failed").length,j=c.nodes.filter(T=>T.status==="blocked").length,B=c.nodes.filter(T=>["success","failed","skipped","stopped"].includes(T.status)).length,$=c.nodes.length,ne=x?.startedAt??N?.createdAt??c.nodes.find(T=>T.finishedAt)?.finishedAt??null,I=u===c.id||c.isRunning===!0;return m.jsxs("article",{className:X5,children:[m.jsxs("div",{className:"flex items-start justify-between gap-2",children:[m.jsxs("div",{className:"min-w-0",children:[m.jsx("p",{className:"m-0 truncate text-base font-semibold text-(--text)",children:c.title}),m.jsxs("p",{className:`${Tl} m-0 mt-1 text-xs text-(--muted)`,children:["DAG-",c.id]})]}),m.jsx("span",{className:`inline-flex h-5 items-center px-2 text-xs ${Z5(d)}`,children:W5(d)})]}),m.jsxs("div",{className:"border border-(--line) bg-[rgba(10,18,24,0.7)] px-2.5 py-2",children:[m.jsx("p",{className:"m-0 text-xs text-(--muted)",children:"当前运行节点"}),m.jsx("p",{className:`${Tl} m-0 mt-1 truncate text-sm text-(--text)`,children:x?`${x.id} · ${x.title}`:"暂无运行节点"})]}),m.jsxs("div",{className:"grid content-start gap-1",children:[m.jsx("p",{className:"m-0 text-xs text-(--muted)",children:"最新产物"}),m.jsx("p",{className:`${Tl} m-0 truncate text-sm text-(--text)`,children:N?.name??"暂无产物"}),m.jsx("p",{className:`${Tl} m-0 text-xs text-(--muted)`,children:N?`生成时间 ${z1(N.createdAt)}`:"-"})]}),m.jsxs("div",{className:"grid grid-cols-3 gap-2 border border-(--line) bg-[rgba(10,18,24,0.55)] px-2.5 py-2",children:[m.jsxs("div",{children:[m.jsx("p",{className:"m-0 text-[10px] text-(--muted)",children:"成功"}),m.jsx("p",{className:`${Tl} m-0 mt-0.5 text-sm text-(--live)`,children:k})]}),m.jsxs("div",{children:[m.jsx("p",{className:"m-0 text-[10px] text-(--muted)",children:"失败"}),m.jsx("p",{className:`${Tl} m-0 mt-0.5 text-sm text-(--bad)`,children:_})]}),m.jsxs("div",{children:[m.jsx("p",{className:"m-0 text-[10px] text-(--muted)",children:"阻塞"}),m.jsx("p",{className:`${Tl} m-0 mt-0.5 text-sm text-(--warn)`,children:j})]})]}),m.jsxs("div",{className:"grid gap-1.5 border border-[rgba(255,107,107,0.35)] bg-[linear-gradient(180deg,rgba(58,22,22,0.45)_0%,rgba(25,13,13,0.38)_100%)] px-2.5 py-2",children:[m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsx("p",{className:"m-0 text-xs text-(--muted)",children:"异常节点"}),m.jsx("button",{className:"inline-flex h-6 items-center justify-center border border-[rgba(255,107,107,0.45)] bg-[rgba(255,107,107,0.08)] px-2 text-xs font-semibold text-(--bad) hover:bg-[rgba(255,107,107,0.16)] disabled:cursor-not-allowed disabled:opacity-50",type:"button",disabled:!v,onClick:()=>{v&&a(v)},children:"打开会话"})]}),m.jsx("p",{className:`${Tl} m-0 truncate text-xs text-(--text)`,children:y?`${y.id} · ${y.title}`:"当前无失败节点"}),m.jsxs("p",{className:`${Tl} m-0 truncate text-xs text-(--muted)`,children:[g?`结构化: ${g.id} · ${Yu(g.lastError)?.message??"-"}`:"结构化: -"," ","|"," ",b?`节点返回: ${b.id} · ${Yu(b.lastError)?.message??"-"}`:"节点返回: -"]}),m.jsx("p",{className:`${Tl} m-0 truncate text-xs text-(--muted)`,children:v?`Agent: ${v}`:"Agent: -"})]}),m.jsxs("div",{className:"flex items-center justify-between border-t border-(--line) pt-2 text-xs text-(--muted)",children:[m.jsx("span",{children:`进度 ${B}/${$}`}),m.jsx("span",{children:`更新时间 ${z1(ne)}`})]}),m.jsxs("div",{className:"flex justify-end gap-2",children:[m.jsx("button",{className:"inline-flex h-8 items-center justify-center border border-(--line) bg-[rgba(15,23,29,0.6)] px-3 text-xs text-(--text) hover:bg-[rgba(19,34,43,0.82)]",type:"button",onClick:()=>i(c.id),children:"进入流水线"}),m.jsx("button",{className:"inline-flex h-8 items-center justify-center border border-(--live-25) bg-[rgba(50,215,186,0.1)] px-3 text-xs font-semibold text-(--live) hover:bg-[rgba(50,215,186,0.18)] disabled:cursor-not-allowed disabled:opacity-60",type:"button",onClick:async()=>{s(c.id);try{await l(c.id)}finally{s(T=>T===c.id?"":T)}},disabled:I,children:I?"工作中...":"开始工作"})]})]},c.id)})})})]})}const l4="font-[JetBrains_Mono,monospace]",i4="inline-flex h-7 items-center justify-center border px-2 text-xs transition-[background-color,color,border-color]",r4="border-[var(--live-25)] bg-[rgba(50,215,186,0.16)] text-[var(--live)]",a4="border-[var(--line)] bg-[rgba(15,23,29,0.55)] text-[var(--muted)] hover:bg-[rgba(24,39,47,0.72)] hover:text-[var(--text)]",Rs=`${On} h-8 px-2 py-1 text-xs`,Tu="inline-flex h-8 items-center justify-center border border-[var(--line)] bg-[rgba(15,23,29,0.62)] px-3 text-xs text-[var(--text)] hover:bg-[rgba(19,34,43,0.82)] disabled:cursor-not-allowed disabled:opacity-50",s4="relative min-w-0",o4=`${fn} h-8 cursor-pointer overflow-hidden px-2 py-1 text-ellipsis whitespace-nowrap text-xs`,u4="border-[#3b5868] bg-[rgba(24,39,47,0.92)]",c4="absolute inset-x-0 top-[calc(100%+4px)] z-[4] grid max-h-[180px] overflow-y-auto overflow-x-hidden border border-[#29414f] bg-[rgba(18,31,38,0.98)] px-0 py-0 text-[var(--text)] shadow-none",$1="grid min-w-0 cursor-pointer grid-cols-[10px_minmax(0,1fr)] items-center gap-x-3 px-2 py-1.5 text-xs leading-[1.2] text-[var(--text)] transition-[background-color,color] hover:bg-[rgba(22,36,44,0.9)]",I1="bg-[rgba(50,215,186,0.12)]",H1="m-0 h-[10px] w-[10px] cursor-pointer appearance-none border border-[var(--line)] bg-transparent transition-[border-color,background-color] hover:border-[#2a3c4b] checked:border-[var(--live)] checked:bg-[var(--live)] focus-visible:outline focus-visible:outline-1 focus-visible:outline-[var(--live)] focus-visible:outline-offset-1",f4="mx-2 my-1.5 text-xs text-[var(--muted)]";function d4({filters:t,pipelineOptions:l,nodeOptions:i,loading:a,exporting:u,onChangeFilters:s,onApply:c,onReset:d,onRefresh:x,onExport:h}){const[g,b]=w.useState(!1),y=w.useRef(null);w.useEffect(()=>{if(!g)return;const k=_=>{y.current&&!y.current.contains(_.target)&&b(!1)};return document.addEventListener("mousedown",k),()=>{document.removeEventListener("mousedown",k)}},[g]);const v=t.nodeIds.length===0?"全部":t.nodeIds.length<=3?t.nodeIds.join(", "):`${t.nodeIds.slice(0,3).join(", ")} 等${t.nodeIds.length}个`,N=(k,_)=>{k.trim()&&s(j=>{const B=_?Array.from(new Set([...j.nodeIds,k])):j.nodeIds.filter($=>$!==k);return{...j,nodeIds:B}})};return m.jsxs("section",{className:"grid gap-2 border border-(--line) bg-[rgba(13,22,28,0.82)] px-3 py-2",children:[m.jsxs("div",{className:"grid gap-2 lg:grid-cols-[auto_minmax(0,1fr)_auto] lg:items-start",children:[m.jsx("div",{className:"flex flex-wrap items-center gap-1.5",children:[{key:"today",label:"今天"},{key:"7d",label:"7天"},{key:"30d",label:"30天"},{key:"custom",label:"自定义"}].map(k=>m.jsx("button",{type:"button",className:`${i4} ${t.preset===k.key?r4:a4}`,onClick:()=>{s(_=>({..._,preset:k.key}))},disabled:a,children:k.label},k.key))}),m.jsxs("div",{className:"grid gap-2 sm:grid-cols-[minmax(0,1fr)_minmax(0,1fr)_minmax(0,1fr)_minmax(0,1fr)_minmax(0,1fr)_minmax(0,1fr)]",children:[m.jsx("input",{className:Rs,type:"date",value:t.customFrom,onChange:k=>{const _=k.target.value;s(j=>({...j,customFrom:_,preset:"custom"}))},disabled:a}),m.jsx("input",{className:Rs,type:"date",value:t.customTo,onChange:k=>{const _=k.target.value;s(j=>({...j,customTo:_,preset:"custom"}))},disabled:a}),m.jsxs("select",{className:Rs,value:t.pipelineId,onChange:k=>{const _=k.target.value;s(j=>({...j,pipelineId:_}))},disabled:a,children:[m.jsx("option",{value:"",children:"全部流水线"}),l.map(k=>m.jsxs("option",{value:k.id,children:[k.id," - ",k.title]},k.id))]}),m.jsxs("select",{className:Rs,value:t.statuses.join(","),onChange:k=>{const _=k.target.value;s(j=>({...j,statuses:_?_.split(","):[]}))},disabled:a,children:[m.jsx("option",{value:"",children:"全部状态"}),m.jsx("option",{value:"success",children:"success"}),m.jsx("option",{value:"failed",children:"failed"}),m.jsx("option",{value:"rejected",children:"rejected"}),m.jsx("option",{value:"success,failed",children:"success + failed"})]}),m.jsxs("select",{className:Rs,value:t.kinds.join(","),onChange:k=>{const _=k.target.value;s(j=>({...j,kinds:_?_.split(","):[]}))},disabled:a,children:[m.jsx("option",{value:"",children:"全部类型"}),m.jsx("option",{value:"artifact",children:"artifact"}),m.jsx("option",{value:"envelope",children:"envelope"}),m.jsx("option",{value:"adapter",children:"adapter"}),m.jsx("option",{value:"group",children:"group"})]}),m.jsxs("div",{className:s4,ref:y,children:[m.jsx("div",{className:`${o4} ${g?u4:""}`,title:v,role:"button",tabIndex:a?-1:0,onClick:()=>{a||b(k=>!k)},onKeyDown:k=>{a||(k.key==="Enter"||k.key===" ")&&(k.preventDefault(),b(_=>!_))},"aria-label":"编辑节点筛选",children:v}),g?m.jsxs("div",{className:c4,children:[m.jsxs("label",{className:`${$1} ${t.nodeIds.length===0?I1:""}`,children:[m.jsx("input",{type:"checkbox",className:H1,checked:t.nodeIds.length===0,onChange:()=>{s(k=>({...k,nodeIds:[]}))}}),m.jsx("span",{className:"block min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:"全部节点"})]}),i.length?i.map(k=>m.jsxs("label",{className:`${$1} ${t.nodeIds.includes(k.id)?I1:""}`,children:[m.jsx("input",{type:"checkbox",className:H1,checked:t.nodeIds.includes(k.id),onChange:_=>N(k.id,_.target.checked)}),m.jsx("span",{className:"block min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:k.id})]},k.id)):m.jsx("p",{className:f4,children:"当前筛选下暂无可选节点"})]}):null]})]}),m.jsxs("div",{className:"flex flex-wrap items-center justify-start gap-1.5 lg:justify-end",children:[m.jsx("button",{type:"button",className:Tu,onClick:c,disabled:a,children:"应用筛选"}),m.jsx("button",{type:"button",className:Tu,onClick:d,disabled:a,children:"重置"}),m.jsx("button",{type:"button",className:Tu,onClick:x,disabled:a,children:"刷新"}),m.jsx("button",{type:"button",className:Tu,onClick:h,disabled:a||u,children:u?"导出中...":"导出"})]})]}),m.jsxs("p",{className:`${l4} m-0 text-xs text-(--muted)`,children:["时间范围:",t.preset==="today"?"今天":t.preset==="7d"?"近7天":t.preset==="30d"?"近30天":"自定义"," | 流水线:",t.pipelineId||"全部"," | 节点:",v]})]})}const ci="font-[JetBrains_Mono,monospace]",h4=t=>{if(!t)return"";const l=t.content;if(l&&(Array.isArray(l.contents)||Array.isArray(l.logs))){const i=[];if(Array.isArray(l.contents)&&l.contents.length>0){i.push("=== 产物内容 ===");for(const a of l.contents)i.push(typeof a=="string"?a:JSON.stringify(a,null,2))}if(Array.isArray(l.logs)&&l.logs.length>0){i.push("=== 处理日志 ===");for(const a of l.logs)i.push(typeof a=="string"?a:JSON.stringify(a))}if(i.length>0)return i.join(`
|
|
56
|
+
|
|
57
|
+
`)}if(typeof t.content=="string")return t.content;try{return JSON.stringify(t.content,null,2)}catch{return t.rawText}};function m4({item:t,content:l,loadingKey:i,contentError:a}){const u=t?`${t.pipelineId}:${t.relativePath}`:"",s=!!t&&i===u,c=h4(l);return m.jsxs("section",{className:"grid min-h-0 grid-rows-[auto_auto_minmax(0,1fr)] border border-(--line) bg-[rgba(12,21,27,0.85)]",children:[m.jsx("div",{className:"border-b border-(--line) px-2 py-1.5 text-xs text-(--muted)",children:"产物详情"}),m.jsxs("div",{className:"grid gap-1 border-b border-(--line) px-2 py-2 text-xs text-(--muted)",children:[m.jsxs("div",{className:ci,children:["pipeline: ",t?.pipelineId??"-"]}),m.jsxs("div",{className:ci,children:["runId: ",t?.runId??"-"]}),m.jsxs("div",{className:ci,children:["status: ",t?.status??"-"]}),m.jsxs("div",{className:ci,children:["nodeId: ",t?.nodeId??"-"]}),m.jsxs("div",{className:ci,children:["size: ",t?.sizeBytes!=null?`${(t.sizeBytes/1024).toFixed(1)} KB`:"-"]}),m.jsxs("div",{className:ci,children:["path: ",t?.relativePath??"-"]})]}),m.jsxs("div",{className:"min-h-0 overflow-auto p-2",children:[t?null:m.jsx("p",{className:`${ci} m-0 text-xs text-(--muted)`,children:"请先在左侧选择一个产物文件"}),t&&s?m.jsx("p",{className:`${ci} m-0 text-xs text-(--muted)`,children:"内容加载中..."}):null,t&&!s&&a?m.jsxs("p",{className:`${ci} m-0 text-xs text-(--bad)`,children:["内容加载失败: ",a]}):null,t&&!s?m.jsx("code",{className:"block min-h-full whitespace-pre-wrap break-words border border-[rgba(142,163,179,0.18)] bg-[rgba(6,12,16,0.86)] p-2 text-xs text-(--text)",children:c||"内容为空"}):null]})]})}const Ar="font-[JetBrains_Mono,monospace]",p4=t=>{const l=Date.parse(t);if(!Number.isFinite(l))return"-";const i=new Date(l),a=String(i.getHours()).padStart(2,"0"),u=String(i.getMinutes()).padStart(2,"0"),s=String(i.getSeconds()).padStart(2,"0");return`${a}:${u}:${s}`};function x4({groups:t,selectedItemKey:l,loading:i,error:a,onSelect:u}){return m.jsxs("section",{className:"grid min-h-0 grid-rows-[auto_minmax(0,1fr)] border border-(--line) bg-[rgba(12,21,27,0.85)]",children:[m.jsx("div",{className:"border-b border-(--line) px-2 py-1.5 text-xs text-(--muted)",children:"产物目录"}),m.jsxs("div",{className:"min-h-0 overflow-auto px-2 py-1.5",children:[i?m.jsx("p",{className:`${Ar} m-0 text-xs text-(--muted)`,children:"加载中..."}):null,!i&&a?m.jsxs("p",{className:`${Ar} m-0 text-xs text-(--bad)`,children:["加载失败: ",a]}):null,!i&&!a&&t.length===0?m.jsx("p",{className:`${Ar} m-0 text-xs text-(--muted)`,children:"当前筛选条件下无产物"}):null,!a&&t.map(s=>m.jsxs("details",{open:!0,className:"group",children:[m.jsxs("summary",{className:`${Ar} flex cursor-pointer items-center gap-1 px-1 py-0.5 text-xs text-(--text) marker:text-(--muted) hover:bg-[rgba(142,163,179,0.08)]`,children:[m.jsx("span",{className:"truncate",children:s.dateKey}),m.jsxs("span",{className:"text-(--muted)",children:["(",s.total,")"]})]}),m.jsx("div",{className:"ml-3 border-l border-[rgba(142,163,179,0.2)] pl-2",children:s.pipelines.map(c=>m.jsxs("details",{open:!0,className:"group mt-0.5",children:[m.jsxs("summary",{className:`${Ar} flex cursor-pointer items-center gap-1 px-1 py-0.5 text-xs text-(--text) marker:text-(--muted) hover:bg-[rgba(142,163,179,0.08)]`,children:[m.jsxs("span",{className:"truncate",children:[c.pipelineId," - ",c.pipelineTitle]}),m.jsxs("span",{className:"text-(--muted)",children:["(",c.total,")"]})]}),m.jsx("div",{className:"ml-3 border-l border-[rgba(142,163,179,0.18)] pl-2",children:c.runs.map(d=>m.jsxs("details",{open:!0,className:"group mt-0.5",children:[m.jsxs("summary",{className:`${Ar} flex cursor-pointer items-center gap-1 px-1 py-0.5 text-xs text-(--text) marker:text-(--muted) hover:bg-[rgba(142,163,179,0.08)]`,children:[m.jsx("span",{className:"truncate",children:d.runId}),m.jsxs("span",{className:"text-[rgba(142,163,179,0.78)]",children:["(",d.items.length,")"]})]}),m.jsx("div",{className:"ml-3 border-l border-[rgba(142,163,179,0.16)] pl-2",children:d.items.map(x=>{const h=`${x.pipelineId}:${x.relativePath}`,g=h===l;return m.jsxs("button",{type:"button",className:`${Ar} mt-0.5 grid w-full cursor-pointer appearance-none grid-cols-[auto_1fr] items-center gap-x-2 border-0 bg-transparent px-1.5 py-0.5 text-left text-xs shadow-none outline-none ${g?"bg-[rgba(50,215,186,0.16)] text-(--text)":"text-(--muted) hover:bg-[rgba(142,163,179,0.1)] hover:text-(--text)"}`,onClick:()=>{u(x)},children:[m.jsx("span",{className:"text-[rgba(142,163,179,0.88)]",children:p4(x.updatedAt)}),m.jsx("span",{className:"truncate",children:x.fileName})]},h)})})]},`${c.pipelineId}:${d.runId}`))})]},`${s.dateKey}:${c.pipelineId}`))})]},s.dateKey))]})]})}const pm=t=>{const l=new URLSearchParams;for(const[a,u]of Object.entries(t))u==null||u===""||l.set(a,String(u));const i=l.toString();return i?`?${i}`:""};async function g4(t){const l=pm({pipelineId:t?.pipelineId,nodeId:t?.nodeId,dateFrom:t?.dateFrom,dateTo:t?.dateTo,limit:t?.limit,status:t?.status,kind:t?.kind,cursor:t?.cursor,batchRunId:t?.batchRunId,runId:t?.runId}),i=await dt(`/api/artifacts${l}`);return Array.isArray(i.items)?i.items:[]}async function b4(t){const l=pm({pipelineId:t.pipelineId,relativePath:t.relativePath});return(await dt(`/api/artifacts/content${l}`)).content??null}async function y4(t){const l=pm({pipelineId:t?.pipelineId,nodeId:t?.nodeId,dateFrom:t?.dateFrom,dateTo:t?.dateTo,limit:t?.limit,status:t?.status,kind:t?.kind,batchRunId:t?.batchRunId,runId:t?.runId});return(await dt(`/api/artifacts/export${l}`)).data??{}}const U1=1440*60*1e3,G1=t=>String(t).padStart(2,"0"),Lu=t=>`${t.getFullYear()}-${G1(t.getMonth()+1)}-${G1(t.getDate())}`,v4=(t,l=new Date)=>{const i=new Date(l);i.setHours(0,0,0,0);const a=Lu(i);if(t==="today")return{dateFrom:a,dateTo:a};if(t==="7d"){const u=new Date(i.getTime()-U1*6);return{dateFrom:Lu(u),dateTo:a}}if(t==="30d"){const u=new Date(i.getTime()-U1*29);return{dateFrom:Lu(u),dateTo:a}}return{dateFrom:a,dateTo:a}},q1=t=>{const l=t.nodeIds.length>0?t.nodeIds.join(","):"";return t.preset==="custom"?!t.customFrom||!t.customTo||t.customFrom>t.customTo?null:{dateFrom:t.customFrom,dateTo:t.customTo,...t.pipelineId?{pipelineId:t.pipelineId}:{},...l?{nodeId:l}:{}}:{...v4(t.preset),...t.pipelineId?{pipelineId:t.pipelineId}:{},...l?{nodeId:l}:{}}},xh=t=>{const l=Date.parse(t);return Number.isFinite(l)?l:0},S4=t=>[...t].sort((l,i)=>i.latestUpdatedAtMs-l.latestUpdatedAtMs),N4=t=>[...t].sort((l,i)=>i.latestUpdatedAtMs-l.latestUpdatedAtMs),w4=t=>[...t].sort((l,i)=>i.latestUpdatedAtMs-l.latestUpdatedAtMs),C4=t=>{const l=new Map;for(const a of t){const u=a.dateBucket||"unknown",s=l.get(u)??new Map,c=s.get(a.pipelineId)??new Map,d=a.runId?.trim()||"unknown",x=c.get(d)??{runId:d,items:[],latestUpdatedAtMs:0};x.items.push(a),x.latestUpdatedAtMs=Math.max(x.latestUpdatedAtMs,xh(a.updatedAt)),c.set(d,x),s.set(a.pipelineId,c),l.set(u,s)}const i=[];for(const[a,u]of l.entries()){const s=[];for(const[d,x]of u.entries()){const h=S4([...x.values()].map(v=>({...v,items:[...v.items].sort((N,k)=>xh(k.updatedAt)-xh(N.updatedAt))}))),g=h.reduce((v,N)=>v+N.items.length,0),b=h[0]?.latestUpdatedAtMs??0,y=h[0]?.items[0]?.pipelineTitle??d;s.push({pipelineId:d,pipelineTitle:y,runs:h,total:g,latestUpdatedAtMs:b})}const c=N4(s);i.push({dateKey:a,pipelines:c,total:c.reduce((d,x)=>d+x.total,0),latestUpdatedAtMs:c[0]?.latestUpdatedAtMs??0})}return w4(i)},gh=()=>{const t=Lu(new Date);return{preset:"today",pipelineId:"",nodeIds:[],statuses:[],kinds:[],customFrom:t,customTo:t}},E4=t=>{const l=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),u=String(t.getHours()).padStart(2,"0"),s=String(t.getMinutes()).padStart(2,"0"),c=String(t.getSeconds()).padStart(2,"0");return`${l}${i}${a}-${u}${s}${c}`},A4=t=>{const[l,i]=w.useState(gh),[a,u]=w.useState(gh),[s,c]=w.useState([]),[d,x]=w.useState(!1),[h,g]=w.useState(!1),[b,y]=w.useState(""),[v,N]=w.useState(""),[k,_]=w.useState(""),[j,B]=w.useState(""),[$,ne]=w.useState({}),se=w.useMemo(()=>C4(s),[s]),I=v?$[v]??null:null,T=async C=>{const R=q1(C);if(!R){y("自定义日期范围无效,请检查开始/结束日期。");return}x(!0),y("");try{const V=await g4({pipelineId:R.pipelineId,nodeId:R.nodeId,dateFrom:R.dateFrom,dateTo:R.dateTo,status:C.statuses.length>0?C.statuses.join(","):void 0,kind:C.kinds.length>0?C.kinds.join(","):void 0,limit:2e4});c(V),N(""),B("")}catch(V){y(V instanceof Error?V.message:String(V)),c([])}finally{x(!1)}},P=async()=>{u(l),await T(l)},Y=async()=>{const C=gh();i(C),u(C),await T(C)},D=async()=>{await T(a)},X=async()=>{const C=q1(a);if(!C){y("导出失败:当前筛选条件无效。");return}g(!0),y("");try{const R=await y4({pipelineId:C.pipelineId,nodeId:C.nodeId,status:a.statuses.length>0?a.statuses.join(","):void 0,kind:a.kinds.length>0?a.kinds.join(","):void 0,batchRunId:a.batchRunId||void 0,dateFrom:C.dateFrom,dateTo:C.dateTo,limit:2e4}),V=JSON.stringify(R,null,2),ae=new Blob([V],{type:"application/json;charset=utf-8"}),M=URL.createObjectURL(ae),O=document.createElement("a");O.href=M,O.download=`artifacts-export-${E4(new Date)}.json`,document.body.appendChild(O),O.click(),O.remove(),URL.revokeObjectURL(M)}catch(R){y(R instanceof Error?R.message:String(R))}finally{g(!1)}},K=async C=>{const R=`${C.pipelineId}:${C.relativePath}`;if(N(R),B(""),!Object.prototype.hasOwnProperty.call($,R)){_(R);try{const V=await b4({pipelineId:C.pipelineId,relativePath:C.relativePath});ne(ae=>({...ae,[R]:V}))}catch(V){ne(ae=>({...ae,[R]:null})),B(V instanceof Error?V.message:String(V))}finally{_("")}}},U=v?s.find(C=>`${C.pipelineId}:${C.relativePath}`===v):void 0,oe=w.useMemo(()=>{const C=new Map;for(const R of t)R.id.trim()&&C.set(R.id,R);for(const R of s)R.pipelineId.trim()&&(C.has(R.pipelineId)||C.set(R.pipelineId,{id:R.pipelineId,title:R.pipelineTitle||R.pipelineId}));return[...C.values()].sort((R,V)=>R.title.localeCompare(V.title,"zh-CN"))},[t,s]),le=w.useMemo(()=>{const C=new Set;for(const R of s){const V=R.nodeId?.trim();V&&C.add(V)}return[...C].sort((R,V)=>R.localeCompare(V,"zh-CN")).map(R=>({id:R}))},[s]);return{draftFilters:l,setDraftFilters:i,appliedFilters:a,items:s,groups:se,loading:d,error:b,selectedItemKey:v,selectedItem:U,selectedContent:I,contentLoadingKey:k,contentError:j,mergedPipelineOptions:oe,mergedNodeOptions:le,exporting:h,applyFilters:P,resetFilters:Y,refresh:D,exportFilteredArtifacts:X,selectItem:K}};function k4({pipelines:t,onNavigatePipeline:l}){const i=A4(t);return w.useEffect(()=>{i.applyFilters()},[]),m.jsxs("section",{"data-center-card":!0,className:"grid min-h-0 min-w-0 flex-1 grid-rows-[auto_minmax(0,1fr)] overflow-hidden",children:[m.jsx("div",{className:"p-3",children:m.jsx(d4,{filters:i.draftFilters,pipelineOptions:i.mergedPipelineOptions,nodeOptions:i.mergedNodeOptions,loading:i.loading,exporting:i.exporting,onChangeFilters:a=>{i.setDraftFilters(u=>a(u))},onApply:()=>{i.applyFilters()},onReset:()=>{i.resetFilters()},onRefresh:()=>{i.refresh()},onExport:()=>{i.exportFilteredArtifacts()}})}),m.jsxs("div",{className:"grid min-h-0 min-w-0 gap-3 overflow-hidden px-3 pb-3 lg:grid-cols-[minmax(340px,42%)_minmax(0,1fr)]",children:[m.jsx(x4,{groups:i.groups,selectedItemKey:i.selectedItemKey,loading:i.loading,error:i.error,onSelect:a=>{i.selectItem(a)}}),m.jsx(m4,{item:i.selectedItem,content:i.selectedContent,loadingKey:i.contentLoadingKey,contentError:i.contentError})]})]})}function j4(t){const[l,i]=w.useState(()=>typeof window>"u"?!1:window.matchMedia(t).matches);return w.useEffect(()=>{const a=window.matchMedia(t),u=s=>i(s.matches);return i(a.matches),a.addEventListener("change",u),()=>a.removeEventListener("change",u)},[t]),l}const M4={width:24,height:24};function D4({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:M4,content:'<g class="nrj6p8qat"><path class="w7_vazn9d"/><rect class="wh0tzmd6d"/><path class="jefb58bpl"/></g>',fallback:"lucide:bot"})}const T4={width:24,height:24};function O4({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:T4,content:'<g class="nrj6p8qat"><path class="faeb4ph9u"/><path class="qggg1kbck"/></g>',fallback:"lucide:boxes"})}const B4={width:24,height:24};function _4({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:B4,content:'<g class="nrj6p8qat"><path class="oge_lhbou"/><path class="ht7qx0byx"/></g>',fallback:"lucide:file-text"})}const F4={width:24,height:24};function R4({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:F4,content:'<g class="nrj6p8qat"><path class="mfojsy6pj"/><path class="a7iy2kw9d"/></g>',fallback:"lucide:history"})}const L4={width:24,height:24};function z4({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:L4,content:'<g class="nrj6p8qat"><rect class="aoxhq7npe"/><rect class="ilpqg2l0q"/><rect class="ovvq_obta"/><rect class="ll6_4rblg"/></g>',fallback:"lucide:layout-dashboard"})}const $4={width:24,height:24};function I4({width:t,height:l,...i}){return w.createElement(Gt,{...i,width:t,height:l,viewBox:$4,content:'<g class="nrj6p8qat"><rect class="j4kl21b2v"/><path class="ce22cyb5j"/><rect class="sqw8o7bkk"/></g>',fallback:"lucide:workflow"})}const P1=[{label:"总览",icon:z4},{label:"智能体",icon:D4},{label:"流水线",icon:I4},{label:"运行记录",icon:R4},{label:"产物",icon:O4},{label:"日志",icon:_4}];function H4(){return{retryNode:async(l,i)=>{i&&await cj(l,i)}}}function U4({reload:t}){const[l,i]=w.useState("{}");return{sessionCreatePayload:l,setSessionCreatePayload:i,createSession:async u=>{u.preventDefault();try{const s=JSON.parse(l);await _j(s),await t()}catch(s){if(s instanceof om){alert(`新建会话失败: HTTP ${s.status}`);return}alert("新建会话 JSON 格式不正确")}}}}function G4({reload:t}){const[l,i]=w.useState(""),[a,u]=w.useState(""),[s,c]=w.useState("auto"),[d,x]=w.useState(""),h=v=>{v.length!==0&&i(N=>N||v[0].id)},g=(v,N)=>{const k=v.trim(),_=N.trim();return!k||!_?!1:k===_||k.startsWith(`agent:${_}:`)};return{selectedSessionId:l,setSelectedSessionId:i,sessionMessage:a,setSessionMessage:u,sendMode:s,setSendMode:c,lastSendInfo:d,ensureDefaultSession:h,selectPreferredSessionForAgent:(v,N)=>{const k=N.find(_=>_.id===`agent:${v}:main`)??N.find(_=>g(_.id,v));if(k){i(k.id);return}i(`agent:${v}:main`)},sendSessionMessage:async v=>{if(v.preventDefault(),!(!l||!a.trim()))try{const N=await Fj({sessionId:l,message:a,mode:s}),k=N?.model?`${N.modelProvider?`${N.modelProvider}/`:""}${N.model}`:"-";x(`发送成功
|
|
58
|
+
method: ${N?.usedMethod??"-"}
|
|
59
|
+
model: ${k}
|
|
60
|
+
params: ${JSON.stringify(N?.usedParams??{},null,2)}`),u(""),await t()}catch(N){if(N instanceof om){const _=N.body,j=_?.attempts?.slice(0,3).join(`
|
|
61
|
+
`)??_?.error??`HTTP ${N.status}`;x(`发送失败
|
|
62
|
+
${j}`),alert(`发送失败:
|
|
63
|
+
${j}`);return}const k=N instanceof Error?N.message:"unknown error";x(`发送失败
|
|
64
|
+
${k}`),alert(`发送失败:
|
|
65
|
+
${k}`)}}}}const bh="yes",q4="no",zs=t=>{const l=new Set,i=[];for(const a of t){const u=`${a.from}|${a.to}|${a.when??""}`;l.has(u)||(l.add(u),i.push(a))}return i},P4=(t,l)=>t.edges.filter(i=>i.to===l&&i.when===null).map(i=>i.from),V4=(t,l)=>t.nodes.filter(i=>(i.parallelGroupId??"").trim()===l).map(i=>i.id),Fl=t=>{const l=new Map(t.groups.map(a=>[a.id,a]));return Array.from(new Set(t.nodes.map(a=>(a.parallelGroupId??"").trim()).filter(Boolean))).map(a=>{const u=V4(t,a);if(u.length<2)return null;const s=l.get(a)??null;return s?{id:s.id,members:u,joinPolicy:s.joinPolicy}:{id:a,members:u,joinPolicy:"all"}}).filter(a=>!!a)},ja=(t,l,i,a)=>{const u={...t,nodes:l,groups:a};return Fl(u).map(s=>({id:s.id,type:"parallel",members:s.members,joinPolicy:s.joinPolicy}))},Ay=(t,l,i,a="before")=>{if(!l||!i||l===i)return t;const u=t.nodes.findIndex(y=>y.id===l),s=t.nodes.findIndex(y=>y.id===i);if(u<0||s<0)return t;const c=t.nodes[u]?.lane==="branch"?"branch":"main",d=t.nodes[s]?.lane==="branch"?"branch":"main";if(c!==d)return t;const x=[...t.nodes],[h]=x.splice(u,1);if(!h)return t;const g=x.findIndex(y=>y.id===i);if(g<0)return t;const b=a==="after"?g+1:g;return x.splice(b,0,h),{...t,nodes:x}},Y4=(t,l,i)=>{const a=t.nodes.findIndex(g=>g.id===l);if(a<0)return t;const s=t.nodes[a].lane==="branch"?"branch":"main",c=t.nodes.reduce((g,b,y)=>((b.lane==="branch"?"branch":"main")===s&&g.push(y),g),[]),d=c.indexOf(a);if(d<0)return t;const x=i==="up"?c[d-1]:c[d+1];if(x===void 0)return t;const h=t.nodes[x]?.id??"";return h?Ay(t,l,h,i==="up"?"before":"after"):t},Q4=({workflow:t,previousGroupId:l,nextGroupId:i,memberIds:a,upstreamIds:u,joinPolicy:s})=>{const d=Fl(t).find(j=>j.id===l)??null;if(!d)return t;const x=d.members,h=x.filter(j=>!a.includes(j)),g=[...new Set([...x,...a])],b=ky(t,l,x),y=t.groups.filter(j=>j.id!==l&&j.id!==i),v=t.nodes.map(j=>h.includes(j.id)?{...j,parallelGroupId:null}:a.includes(j.id)?{...j,parallelGroupId:i}:j),N=j=>j===l?i:j,k=zs([...t.edges.map(j=>({...j,from:N(j.from),to:N(j.to)})).filter(j=>j.when!==null?j.from!==l&&j.to!==l:!(j.from===i||j.to===i||g.includes(j.from)||g.includes(j.to))),...u.map(j=>({from:j,to:i,when:null})),...b.map(j=>({from:i,to:j,when:null})),...h.flatMap(j=>[...u.map(B=>({from:B,to:j,when:null})),...b.map(B=>({from:j,to:B,when:null}))])]),_=ja(t,v,k,[...y,{id:i,type:"parallel",members:a,joinPolicy:s}]);return{...t,nodes:v,edges:k,groups:_}},J4=(t,l,i)=>{const a=t.edges.filter(d=>d.to===l).map(d=>d.from);if(a.length>0)return[...new Set(a)];if(i.length===0)return[];const u=i.map(d=>new Set(t.edges.filter(x=>x.to===d&&x.when===null&&!i.includes(x.from)).map(x=>x.from))),[s,...c]=u;return[...s].filter(d=>c.every(x=>x.has(d)))},ky=(t,l,i)=>{const a=t.edges.filter(d=>d.from===l&&d.when===null).map(d=>d.to);if(a.length>0)return[...new Set(a)];if(i.length===0)return[];const u=i.map(d=>new Set(t.edges.filter(x=>x.from===d&&x.when===null&&!i.includes(x.to)).map(x=>x.to))),[s,...c]=u;return[...s].filter(d=>c.every(x=>x.has(d)))},V1=(t,l)=>{const i=new Set([l]),u=((t.nodes.find(c=>c.id===l)??null)?.parallelGroupId??"").trim();if(!u)return i;const s=Fl(t).find(c=>c.id===u)??null;if(!s)return i;i.add(u);for(const c of s.members)c!==l&&i.add(c);for(const c of t.edges)c.to===u&&i.add(c.from);return i},X4=(t,l)=>{if(t&&t.nodes.length>0){const i=new Map(l.map(a=>[a.id,a]));return t.nodes.map(a=>{const u=i.get(a.id);return{id:a.id,title:a.name??u?.title??a.id,executor:a.executor??u?.executor??{agentId:"operator-main",role:"operator",fallbackAgentId:null,sessionId:null},instruction:a.instruction??u?.instruction??"",outputSpec:a.outputSpec??u?.outputSpec??{type:"generic.v1",schemaVersion:1},dependsOn:P4(t,a.id),allowReject:a.allowReject??u?.allowReject??!1,maxRejectCount:a.maxRejectCount??u?.maxRejectCount??3}})}return l.map(i=>({id:i.id,title:i.title,executor:i.executor,instruction:i.instruction,outputSpec:i.outputSpec,dependsOn:i.dependsOn,allowReject:i.allowReject,maxRejectCount:i.maxRejectCount}))},K4=(t,l,i)=>{const a=l.lane==="branch"?"branch":"main",u=Fl(t),s=new Map(t.nodes.map((y,v)=>[y.id,v])),c=new Map(u.map(y=>[y.id,Math.max(...y.members.map(v=>s.get(v)??-1))])),d=y=>{const v=c.get(y);return typeof v=="number"&&v>=0?v:s.get(y)??-1},x=t.nodes.findIndex(y=>(y.lane==="branch"?"branch":"main")===a),h=Array.from(new Set(i.map(y=>y.trim()).filter(Boolean))),g=h.length===0?x>=0?x:t.nodes.length:Math.max(...h.map(d))+1,b=[...t.nodes];return b.splice(Math.max(0,Math.min(g,t.nodes.length)),0,l),b},Z4=t=>t.match(/\bevent:[^\s,)\]]+/i)?.[0]??"",W4=(t,l,i,a)=>{const u=(()=>{const s={},c=/Agent\s+([^\s]+)\s+开始工作/,d=/Agent\s+([^\s]+)\s+结束工作/;for(const x of[...i].reverse()){const h=x.text??"",g=h.match(c);if(g){const y=g[1];s[y]=(s[y]??0)+1;continue}const b=h.match(d);if(b){const y=b[1],v=s[y]??0;v<=1?delete s[y]:s[y]=v-1}}return s})();return t.map(s=>{const c=l.filter(y=>y.executor.agentId===s.id),d=(u[s.id]??0)>0,x=i.find(y=>y.text.includes(`Agent ${s.id} `)||y.text.includes(`agent:${s.id}`))?.text??"",h=Z4(x),g=a[s.id],b=c.filter(y=>y.status==="success"||y.status==="failed").sort((y,v)=>{const N=Date.parse(y.finishedAt??"")||0;return(Date.parse(v.finishedAt??"")||0)-N})[0];return{...s,workStatus:d?"busy":"idle",outputRunId:g?.runId??null,outputContent:g?.content??"",outputPreview:g?.content?`${g.content.slice(0,72)}${g.content.length>72?"...":""}`:"",eventPreview:h,lastExecution:b?{nodeId:b.id,nodeTitle:b.title,status:b.status==="success"?"success":"failed",finishedAt:b.finishedAt}:null}})},Y1=(t,l)=>l||t.some(i=>i.status==="running"||i.status==="success"||i.status==="failed"||(i.attempt??0)>0||!!i.startedAt||!!i.finishedAt),eD=t=>!t||typeof t!="object"?!1:typeof t.status=="number",cn=t=>eD(t)?String((()=>{const l=t.body??null;return l?.error&&l?.detail?`${l.error}: ${l.detail}`:l?.error??`HTTP ${t.status}`})()):t instanceof Error?t.message:"unknown_error",wa=t=>{if(t.version!=="3.0")return{ok:!1,message:`workflow.version 非法,仅支持 3.0: ${String(t.version)}`};if(!Array.isArray(t.nodes)||!Array.isArray(t.edges)||!Array.isArray(t.groups))return{ok:!1,message:"workflow.nodes/edges/groups 必须为数组"};const l=new Set(t.nodes.map(y=>y.id)),i=new Set(t.groups.map(y=>y.id)),a=new Set([...l,...i]);if(l.size!==t.nodes.length)return{ok:!1,message:"workflow.nodes 存在重复 id"};if(i.size!==t.groups.length)return{ok:!1,message:"workflow.groups 存在重复 id"};const u=new Set,s=new Map,c=new Map,d=new Map,x=new Map([...a].map(y=>[y,0]));for(const y of t.edges){if(!a.has(y.from)||!a.has(y.to))return{ok:!1,message:`边引用了不存在实体: ${y.from} -> ${y.to}`};if(y.from===y.to)return{ok:!1,message:`检测到自环边: ${y.from} -> ${y.to}`};const v=`${y.from}|${y.to}|${y.when??""}`;if(u.has(v))return{ok:!1,message:`检测到重复边: ${y.from} -> ${y.to}`};u.add(v);const N=y.when===null?"dependency":"route",k=s.get(y.from)??new Set;k.add(N),s.set(y.from,k),c.set(y.from,[...c.get(y.from)??[],y]),d.set(y.from,[...d.get(y.from)??[],y.to]),x.set(y.to,(x.get(y.to)??0)+1)}for(const[y,v]of s.entries())if(!(v.size<=1||t.nodes.find(k=>k.id===y)?.routePolicy))return{ok:!1,message:`节点 ${y} 同时存在 dependency 与 route 出边,禁止保存`};for(const y of t.nodes){const v=y.routePolicy?.allowed??[];if(v.length===0)continue;if(!v.includes(bh)||!v.includes(q4))return{ok:!1,message:`节点 ${y.id} 开启分流后必须包含 yes 和 no`};const N=c.get(y.id)??[];if(N.filter(j=>j.when===null).length>1)return{ok:!1,message:`节点 ${y.id} 的 yes 主线依赖边最多只能有 1 条`};const _=new Map;for(const j of N.filter(B=>B.when!==null)){if(_.set(j.when??"",(_.get(j.when??"")??0)+1),j.when===bh)return{ok:!1,message:`节点 ${y.id} 的 yes 不能保存为路由边`};if(!v.includes(j.when??""))return{ok:!1,message:`节点 ${y.id} 存在未声明的路由边: ${j.when}`};const B=t.nodes.find(I=>I.id===j.to),$=t.groups.find(I=>I.id===j.to),ne=$?$.members.map(I=>t.nodes.find(T=>T.id===I)).filter(Boolean):[];if(!(B?.lane==="branch"||ne.length>0&&ne.every(I=>I?.lane==="branch")))return{ok:!1,message:`节点 ${y.id} 的路由 ${j.when} 只能指向支线节点或支线并行组`}}for(const j of v.filter(B=>B!==bh))if((_.get(j)??0)!==1)return{ok:!1,message:`节点 ${y.id} 的路由 ${j} 必须配置且只能配置 1 个支线目标`}}for(const y of t.groups){if(y.type!=="parallel")return{ok:!1,message:`并行组 ${y.id} 的 type 非法`};if(!Array.isArray(y.members)||y.members.length<2)return{ok:!1,message:`并行组 ${y.id} 成员数量至少为 2`};if(new Set(y.members).size!==y.members.length)return{ok:!1,message:`并行组 ${y.id} 存在重复成员`};for(const N of y.members)if(!l.has(N))return{ok:!1,message:`并行组 ${y.id} 引用了不存在成员 ${N}`}}const h=new Map(t.groups.map(y=>[y.id,y]));for(const y of t.nodes){const v=(y.parallelGroupId??"").trim();if(!v)continue;const N=h.get(v);if(!N)return{ok:!1,message:`节点 ${y.id} 引用了不存在并行组 ${v}`};if(!N.members.includes(y.id))return{ok:!1,message:`节点 ${y.id} 未加入其声明的并行组 ${v}`}}for(const y of t.groups){const v=new Set(y.members),N=new Set(t.edges.filter(k=>k.to===y.id).map(k=>k.from));for(const k of t.edges)if(k.when===null&&v.has(k.to)){if(k.from===y.id)return{ok:!1,message:`并行组 ${y.id} 不能直接连入成员节点`};if(v.has(k.from))return{ok:!1,message:`并行组 ${y.id} 成员之间禁止直接依赖`};if(N.has(k.from))return{ok:!1,message:`并行组 ${y.id} 的入口节点不能直连成员`}}}const g=[...[...a].filter(y=>(x.get(y)??0)===0)];let b=0;for(;g.length>0;){const y=g.shift();b+=1;for(const v of d.get(y)??[]){const N=(x.get(v)??0)-1;x.set(v,N),N===0&&g.push(v)}}return b!==a.size?{ok:!1,message:"工作流存在环路,无法保存"}:{ok:!0}};function tD({selectedNode:t,selectedWorkflowNode:l,selectedGroup:i,selectedRouteTargets:a,workflow:u,isSessionForAgent:s}){const[c,d]=w.useState(""),[x,h]=w.useState(""),[g,b]=w.useState(""),[y,v]=w.useState(""),[N,k]=w.useState([]),[_,j]=w.useState(!1),[B,$]=w.useState(3),[ne,se]=w.useState("main"),[I,T]=w.useState(""),[P,Y]=w.useState({}),[D,X]=w.useState(""),[K,U]=w.useState([]),[oe,le]=w.useState([]),[C,R]=w.useState("all"),[V,ae]=w.useState(""),[M,O]=w.useState("node"),[L,A]=w.useState(""),[xe,Se]=w.useState(""),[Ee,Fe]=w.useState(""),[tt,Ve]=w.useState(""),[Lt,Ut]=w.useState([]),[_t,he]=w.useState(""),[Ue,Te]=w.useState([]),[de,Ae]=w.useState([]),[Xe,it]=w.useState("all");w.useEffect(()=>{if(!t){d(""),h(""),b(""),v(""),k([]),j(!1),$(3);return}d(t.title);const ve=t.executor.agentId;h(ve),b(t.executor.sessionId?.trim()||""),v(t.instruction??""),k(t.dependsOn),j(t.allowReject===!0),$(Number.isFinite(t.maxRejectCount)?t.maxRejectCount:3)},[t?.id,t?.title,t?.executor.agentId,t?.executor.sessionId,t?.instruction,t?.dependsOn,t?.allowReject,t?.maxRejectCount]),w.useEffect(()=>{const ve=x.trim();if(!ve){g&&b("");return}const Oe=g.trim();Oe&&!s(Oe,ve)&&b("")},[x,g,s]),w.useEffect(()=>{if(!l){se("main"),T(""),Y({});return}se(l.lane==="branch"?"branch":"main"),T(l.routePolicy?.allowed?.join(", ")??""),Y(a)},[l?.lane,l?.routePolicy,a]),w.useEffect(()=>{if(!i){X(""),U([]),le([]),R("all");return}X(i.id),U(i.members),le(i.upstreams),R(i.joinPolicy)},[i]),w.useEffect(()=>{if(!u){ae("");return}ae(JSON.stringify(u,null,2))},[u]);const nt=w.useMemo(()=>{if(!t)return!1;const ve=Array.from(new Set(N.map(ie=>ie.trim()).filter(Boolean))),Oe=Array.from(new Set((t.dependsOn??[]).map(ie=>ie.trim()).filter(Boolean))),At=ve.length===Oe.length&&ve.every((ie,pe)=>ie===Oe[pe]);return c.trim()!==(t.title??"").trim()||x.trim()!==(t.executor.agentId??"").trim()||g.trim()!==(t.executor.sessionId&&t.executor.sessionId.trim()||"")||(y??"").trim()!==(t.instruction??"").trim()||_!==(t.allowReject===!0)||Math.max(0,Math.min(10,Math.trunc(Number(B)||0)))!==Math.max(0,Math.min(10,Math.trunc(Number(t.maxRejectCount)||0)))||!At},[t,c,x,g,y,N,_,B]),pt=w.useMemo(()=>{if(!l)return!1;const ve=l.lane==="branch"?"branch":"main",Oe=l.routePolicy?.allowed??[],At=Array.from(new Set(Oe.map(Re=>Re.trim()).filter(Boolean))),ie=Array.from(new Set(I.split(",").map(Re=>Re.trim()).filter(Boolean))),pe=At.length===ie.length&&At.every((Re,Le)=>Re===ie[Le]);if(ve!==ne||!pe)return!0;const je=Object.fromEntries(At.map(Re=>[Re,(a[Re]??"").trim()])),Be=Object.fromEntries(ie.map(Re=>[Re,(P[Re]??"").trim()])),_e=Object.keys(je),ze=Object.keys(Be);return _e.length!==ze.length?!0:ze.some(Re=>je[Re]!==Be[Re])},[l,a,ne,I,P]);return{draftTitle:c,setDraftTitle:d,draftAgentId:x,setDraftAgentId:h,draftExecutorSessionId:g,setDraftExecutorSessionId:b,draftInstruction:y,setDraftInstruction:v,draftDependsOn:N,setDraftDependsOn:k,draftAllowReject:_,setDraftAllowReject:j,draftMaxRejectCount:B,setDraftMaxRejectCount:$,draftWorkflowLane:ne,setDraftWorkflowLane:se,draftWorkflowRouteAllowed:I,setDraftWorkflowRouteAllowed:T,draftWorkflowRouteTargets:P,setDraftWorkflowRouteTargets:Y,setDraftWorkflowRouteTarget:(ve,Oe)=>{Y(At=>({...At,[ve]:Oe}))},draftGroupId:D,setDraftGroupId:X,draftGroupMembers:K,setDraftGroupMembers:U,draftGroupUpstreams:oe,setDraftGroupUpstreams:le,draftGroupJoinPolicy:C,setDraftGroupJoinPolicy:R,workflowJsonDraft:V,setWorkflowJsonDraft:ae,draftCreateKind:M,setDraftCreateKind:O,draftNewNodeId:L,setDraftNewNodeId:A,draftNewNodeTitle:xe,setDraftNewNodeTitle:Se,draftNewNodeAgentId:Ee,setDraftNewNodeAgentId:Fe,draftNewNodeInstruction:tt,setDraftNewNodeInstruction:Ve,draftNewNodeDependsOn:Lt,setDraftNewNodeDependsOn:Ut,draftNewGroupId:_t,setDraftNewGroupId:he,draftNewGroupMembers:Ue,setDraftNewGroupMembers:Te,draftNewGroupUpstreams:de,setDraftNewGroupUpstreams:Ae,draftNewGroupJoinPolicy:Xe,setDraftNewGroupJoinPolicy:it,hasNodeDraftChanges:nt,hasWorkflowDraftChanges:pt}}const nD={enabled:!1,url:"",startBatch:1,batchSize:5,sourceField:"list30"},Q1={remoteBatch:nD,scheduler:{enabled:!0}},Qu="yes",lD="no",iD=t=>{const l=t.map(i=>i.trim()).filter(Boolean);return l.length===0?[]:Array.from(new Set([Qu,lD,...l])).slice(0,5)},rD=()=>({runId:"run-241",pipeline:[],workflow:null,schedulerState:null,pipelineItems:[],pipelineGroups:[],pipelineGroupItems:[],batchRunState:null,isRunning:!1}),aD=t=>{const l=t.lastIndexOf("::");if(l<0)return null;const i=t.slice(l+2),a=i.indexOf(":");return a<=0||a===i.length-1?null:{parentItemKey:t.slice(0,l),splitNodeId:i.slice(0,a),route:i.slice(a+1)}},sD=(t,l,i)=>{const a=new Set([l]),u=new Set,s=t.edges.filter(d=>d.from===l&&(i===Qu?d.when===null:d.when===i)).map(d=>d.to),c=new Map(t.groups.map(d=>[d.id,d.members]));for(;s.length>0;){const d=s.shift();if(!d||u.has(d))continue;u.add(d);const x=c.get(d);if(x)for(const h of x)a.add(h),u.has(h)||s.push(h);else a.add(d);for(const h of t.edges)h.from===d&&s.push(h.to)}return a};function oD(){const[t,l]=w.useState("总览"),[i,a]=w.useState(""),[u,s]=w.useState(!1),[c,d]=w.useState(""),[x,h]=w.useState(""),[g,b]=w.useState(""),[y,v]=w.useState({status:"idle",protocol:null,scopes:[],lastError:null}),[N,k]=w.useState("-"),[_,j]=w.useState(null),[B,$]=w.useState([]),[ne,se]=w.useState([]),[I,T]=w.useState([]),[P,Y]=w.useState({}),[D,X]=w.useState([]),[K,U]=w.useState(""),[oe,le]=w.useState(!1),[C,R]=w.useState(!1),[V,ae]=w.useState(!1),[M,O]=w.useState(!1),[L,A]=w.useState({}),[xe,Se]=w.useState(null),[Ee,Fe]=w.useState(!1),[tt,Ve]=w.useState(""),[Lt,Ut]=w.useState(""),[_t,he]=w.useState(""),[Ue,Te]=w.useState(!1),[de,Ae]=w.useState(!1),[Xe,it]=w.useState(!1),[nt,pt]=w.useState(!1),[H,ve]=w.useState(!1),[Oe,At]=w.useState(!1),[ie,pe]=w.useState({}),je=w.useRef(new Map),Be=w.useRef(null),_e=w.useCallback((F,q)=>q[F]??rD(),[]),ze=w.useRef(I),Re=w.useRef(i);w.useEffect(()=>{ze.current=I},[I]),w.useEffect(()=>{Re.current=i},[i]);const Le=w.useCallback((F,q)=>{Y(J=>({...J,[F]:q(_e(F,J))}))},[_e]),et=(F,q)=>{const J=F.trim(),me=q.trim();return!J||!me?!1:J===me||J.startsWith(`agent:${me}:`)},zt=F=>`agent:${F}:main`,qe=_e(i,P),kn=I.find(F=>F.id===i)?.title??"",Ft=qe.runId,on=qe.pipeline,ge=qe.workflow,Nl=qe.schedulerState,dn=qe.pipelineItems,Sn=qe.pipelineGroups,fl=qe.pipelineGroupItems,dl=qe.batchRunState,Ll=qe.isRunning,Ce=xe===i,rt=L[i]||String(qe.workflow?.plugins.remoteBatch.startBatch||1),gt=w.useMemo(()=>ge?Fl(ge):[],[ge]),Hn=w.useMemo(()=>gt.map(F=>({id:F.id,members:F.members})),[gt]),Ge=w.useMemo(()=>g?void 0:on.find(F=>F.id===x),[x,g,on]),jn=w.useMemo(()=>x&&!g?ge?.nodes.find(F=>F.id===x)??null:null,[ge,x,g]),ht=w.useMemo(()=>{if(!ge||!g)return null;const F=gt.find(ee=>ee.id===g)??null;if(!F)return null;const q=Sn.find(ee=>ee.id===g)??null,J=F.members.map(ee=>on.find(Ne=>Ne.id===ee)).filter(ee=>!!ee),me=fl.filter(ee=>ee.groupId===g);return{id:F.id,members:F.members,upstreams:J4(ge,F.id,F.members),joinPolicy:F.joinPolicy,status:q?.status??"blocked",artifacts:q?.artifacts??[],startedAt:q?.startedAt??null,finishedAt:q?.finishedAt??null,lastError:q?.lastError??null,memberRuns:J,itemRuns:me}},[ge,g,gt,Sn,fl,on]),rn=w.useMemo(()=>{if(!ge||dn.length===0)return dn;const F=new Map;return dn.filter(q=>{const J=aD(q.itemKey);if(!J)return!0;const me=`${J.splitNodeId}:${J.route}`;let ee=F.get(me);return ee||(ee=sD(ge,J.splitNodeId,J.route),F.set(me,ee)),ee.has(q.nodeId)})},[ge,dn]),hn=w.useMemo(()=>!ge||!x?{}:ge.edges.filter(F=>F.from===x&&F.when).reduce((F,q)=>(q.when&&(F[q.when]=q.to),F),{}),[ge,x]),{draftTitle:Yt,setDraftTitle:Tt,draftAgentId:kt,setDraftAgentId:Nt,draftExecutorSessionId:bt,setDraftExecutorSessionId:an,draftInstruction:zl,setDraftInstruction:uc,draftDependsOn:Zi,setDraftDependsOn:to,draftAllowReject:hl,setDraftAllowReject:_a,draftMaxRejectCount:Wn,setDraftMaxRejectCount:hi,draftWorkflowLane:wl,setDraftWorkflowLane:mi,draftWorkflowRouteAllowed:qt,setDraftWorkflowRouteAllowed:no,draftWorkflowRouteTargets:Br,setDraftWorkflowRouteTarget:$l,draftGroupId:Cl,setDraftGroupId:cc,draftGroupMembers:_r,setDraftGroupMembers:lo,draftGroupUpstreams:Fa,setDraftGroupUpstreams:Fr,draftGroupJoinPolicy:pi,setDraftGroupJoinPolicy:ml,workflowJsonDraft:mn,setWorkflowJsonDraft:io,draftCreateKind:fc,setDraftCreateKind:Rr,draftNewNodeId:Ra,setDraftNewNodeId:Wi,draftNewNodeTitle:ro,setDraftNewNodeTitle:Mn,draftNewNodeAgentId:Lr,setDraftNewNodeAgentId:xi,draftNewNodeInstruction:zr,setDraftNewNodeInstruction:Il,draftNewNodeDependsOn:La,setDraftNewNodeDependsOn:za,draftNewGroupId:Hl,setDraftNewGroupId:ao,draftNewGroupMembers:er,setDraftNewGroupMembers:$a,draftNewGroupUpstreams:$r,setDraftNewGroupUpstreams:so,draftNewGroupJoinPolicy:oo,setDraftNewGroupJoinPolicy:tr,hasNodeDraftChanges:el,hasWorkflowDraftChanges:Ir}=tD({selectedNode:Ge,selectedWorkflowNode:jn,selectedGroup:ht,selectedRouteTargets:hn,workflow:ge,isSessionForAgent:et}),Qt=w.useMemo(()=>X4(ge,on),[ge,on]),gi=w.useMemo(()=>{if(!Ge||!ge)return[];const F=V1(ge,Ge.id),q=Qt.findIndex(ee=>ee.id===Ge.id),J=q<=0?[]:Qt.slice(0,q).filter(ee=>!F.has(ee.id)).map(ee=>({id:ee.id,title:ee.title})),me=gt.filter(ee=>!F.has(ee.id)).map(ee=>({id:ee.id,title:`并行组 ${ee.id}`}));return[...J,...me]},[Ge?.id,Qt,ge,gt]),bi=w.useMemo(()=>{const F=new Set(ht?.members??[]);return[...Qt.filter(q=>!F.has(q.id)).map(q=>({id:q.id,title:q.title})),...gt.filter(q=>q.id!==ht?.id&&!q.members.some(J=>F.has(J))).map(q=>({id:q.id,title:`并行组 ${q.id}`}))]},[ht?.members,ht?.id,Qt,gt]),uo=w.useMemo(()=>{const F=new Set(er);return[...Qt.filter(q=>!F.has(q.id)).map(q=>({id:q.id,title:q.title})),...gt.filter(q=>!q.members.some(J=>F.has(J))).map(q=>({id:q.id,title:`并行组 ${q.id}`}))]},[Qt,er,gt]),Ia=w.useMemo(()=>Qt.map(F=>({id:F.id,title:F.title})),[Qt]),co=w.useMemo(()=>{if(!ge||!x)return[];const F=Fl(ge),q=Qt.filter(me=>me.id===x?!1:ge.nodes.find(Ne=>Ne.id===me.id)?.lane==="branch"),J=[];for(const me of F){const ee=new Set(q.map(Ne=>Ne.id));me.members.some(Ne=>ee.has(Ne))&&J.push({id:me.id,title:`支线并行组 | ${me.id} | ${me.members.join(", ")}`})}for(const me of q)J.push({id:me.id,title:`支线 | ${me.title} | agent:${me.executor.agentId}`});return J},[Qt,x,ge]),yi=w.useMemo(()=>[...Qt.map(F=>({id:F.id,title:F.title})),...gt.map(F=>({id:F.id,title:`并行组 ${F.id}`}))],[Qt,gt]),pl=yi,Ha=w.useMemo(()=>{const F=kt.trim();if(!F)return[];const q=ne.filter(ee=>et(ee.id,F)),J=zt(F);q.some(ee=>ee.id===J)||q.unshift({id:J,title:J});const me=new Set;return q.filter(ee=>!ee.id||me.has(ee.id)?!1:(me.add(ee.id),!0))},[ne,kt]),nr=w.useMemo(()=>{const F=kt.trim(),q=bt.trim();return F?q||zt(F):q},[kt,bt]),El=w.useCallback(F=>{const q=F.trim();Nt(q),an(J=>{const me=J.trim();return!q||!me?"":et(me,q)?me:""})},[Nt,an]),Ul=w.useMemo(()=>{if(!c)return ne;const F=ne.filter(q=>et(q.id,c));return F.length>0?F:[{id:`agent:${c}:main`,title:`agent:${c}:main`}]},[ne,c]),Hr=w.useMemo(()=>W4(B,on,D,ie),[B,on,D,ie]),fo=w.useMemo(()=>Y1(on,Ll),[Ll,on]),lr=w.useCallback(F=>_e(F,P).workflow?.plugins.remoteBatch??Q1.remoteBatch,[_e,P]),vi=w.useCallback(F=>_e(F,P).workflow?.plugins??Q1,[_e,P]),ho=w.useCallback(F=>vi(F).scheduler,[vi]),pn=w.useCallback(async()=>{const F=performance.now(),[q,J,me]=await Promise.allSettled([o1(),u1(),c1()]),ee=q.status==="fulfilled"&&q.value.length>0?q.value:ze.current,Ne=ee.map(we=>we.id),Ye=await Promise.allSettled(Ne.map(we=>aj(we)));j(Math.round(performance.now()-F)),q.status==="fulfilled"&&T(ee),J.status==="fulfilled"&&($(J.value),xi(we=>we||J.value[0]?.id||"operator-main")),me.status==="fulfilled"&&se(me.value),Y(we=>{const Ke={};for(let Me=0;Me<Ne.length;Me+=1){const yt=Ne[Me],Qe=Ye[Me],ye=_e(yt,we),Jt=Qe?.status==="fulfilled"?Qe.value:ye.workflow;Ke[yt]={...ye,workflow:Jt}}return Ke}),A(we=>{const Ke={};for(let Me=0;Me<Ne.length;Me+=1){const yt=Ye[Me],Qe=Ne[Me],ye=we[Qe]?.trim();Ke[Qe]=ye||(yt?.status==="fulfilled"&&yt.value?String(yt.value.plugins.remoteBatch.startBatch||1):"")}return Ke}),ee.length>0?(a(we=>ee.some(Ke=>Ke.id===we)?we:ee[0].id),Se(we=>we&&ee.some(Ke=>Ke.id===we)?we:null)):(a(""),Se(null),h(""),b("")),[q,J,me,...Ye].some(we=>we.status==="rejected")&&U(we=>we||"部分数据加载失败,已保留可用数据。")},[_e,xi]),ut=w.useCallback(async()=>{const[F,q,J]=await Promise.allSettled([o1(),u1(),c1()]),me=F.status==="fulfilled"&&F.value.length>0?F.value:ze.current;F.status==="fulfilled"&&T(me),q.status==="fulfilled"&&($(q.value),xi(ee=>ee||q.value[0]?.id||"operator-main")),J.status==="fulfilled"&&se(J.value),me.length>0?(a(ee=>me.some(Ne=>Ne.id===ee)?ee:me[0].id),Se(ee=>ee&&me.some(Ne=>Ne.id===ee)?ee:null)):(a(""),Se(null),h(""),b(""))},[xi]);w.useEffect(()=>{pn()},[pn]),w.useEffect(()=>{if(I.length===0){i&&a(""),xe&&Se(null),x&&h(""),g&&b("");return}I.some(F=>F.id===i)||(a(I[0].id),h(""),b("")),xe&&!I.some(F=>F.id===xe)&&Se(null)},[i,xe,I,g,x]),w.useEffect(()=>{const F=xy(q=>{py(q,{bootstrap:J=>{if(J){if(J.status&&v(J.status),J.pipelines){const me=Object.entries(J.pipelines);T(me.map(([ee,Ne])=>({id:ee,title:Ne.title}))),Y(ee=>{const Ne={};for(const[Ye,we]of me){const Ke=we.run,Me=_e(Ye,ee);Ne[Ye]={...Me,runId:we.runId??Ke?.id??Me.runId,pipeline:we.pipeline??Ke?.nodes??Me.pipeline,pipelineGroups:Array.isArray(Ke?.groups)?Ke.groups:Me.pipelineGroups,pipelineGroupItems:Array.isArray(Ke?.groupItemRuns)?Ke.groupItemRuns:Me.pipelineGroupItems,schedulerState:we.scheduler??Me.schedulerState,pipelineItems:Array.isArray(Ke?.itemRuns)?Ke.itemRuns:Me.pipelineItems,batchRunState:we.batchRunState!==void 0?we.batchRunState:Me.batchRunState}}return Ne})}else{const me=ze.current[0]?.id??Re.current??"A";J.run&&Le(me,ee=>({...ee,runId:J.run?.id??ee.runId,pipeline:J.run?.nodes??ee.pipeline,pipelineGroups:Array.isArray(J.run?.groups)?J.run.groups:ee.pipelineGroups,pipelineGroupItems:Array.isArray(J.run?.groupItemRuns)?J.run.groupItemRuns:ee.pipelineGroupItems})),J.pipeline&&Le(me,ee=>({...ee,pipeline:J.pipeline??ee.pipeline})),J.runId&&Le(me,ee=>({...ee,runId:J.runId??ee.runId})),J.scheduler&&Le(me,ee=>({...ee,schedulerState:J.scheduler??ee.schedulerState}))}J.timeline&&X(J.timeline),k(J.hello?.server?.version??"-")}},gatewayStatus:J=>{J&&v(J)},gatewayReady:J=>{k(J?.server?.version??"-")},gatewayFrame:J=>{if(!J||J.type!=="event"||J.event!=="agent")return;const me=J.payload;if(!me)return;const ee=typeof me.sessionKey=="string"?me.sessionKey.trim():"",Ne=typeof me.runId=="string"?me.runId.trim():"";if(!ee||!Ne)return;const Ye=ee.match(/^agent:([^:]+):/i);if(!Ye)return;const we=Ye[1],Ke=typeof me.stream=="string"?me.stream:"",Me=me.data??{},yt=`${Ne}::${we}`;if(Ke==="assistant"){const Qe=typeof Me.text=="string"?Me.text:"";if(!Qe)return;je.current.set(yt,Qe);return}if(Ke==="lifecycle"){const Qe=typeof Me.phase=="string"?Me.phase:"";if(Qe==="start"){je.current.delete(yt);return}if(Qe==="end"){const ye=je.current.get(yt)??"";if(!ye.trim())return;pe(Jt=>({...Jt,[we]:{runId:Ne,content:ye,updatedAt:Date.now()}}))}}},pipelineUpdated:J=>{if(!J)return;const me=J.pipelineId??ze.current[0]?.id??Re.current??"A";if(J.scheduler&&Le(me,ee=>({...ee,schedulerState:J.scheduler??ee.schedulerState})),J.batchRunState!==void 0&&Le(me,ee=>({...ee,batchRunState:J.batchRunState??ee.batchRunState})),J.run){Le(me,ee=>({...ee,runId:J.run?.id??ee.runId,pipeline:J.run?.nodes??ee.pipeline,pipelineGroups:Array.isArray(J.run?.groups)?J.run.groups:ee.pipelineGroups,pipelineGroupItems:Array.isArray(J.run?.groupItemRuns)?J.run.groupItemRuns:ee.pipelineGroupItems,pipelineItems:Array.isArray(J.run?.itemRuns)?J.run.itemRuns:ee.pipelineItems}));return}J.runId&&Le(me,ee=>({...ee,runId:J.runId??ee.runId})),Array.isArray(J.nodes)&&Le(me,ee=>({...ee,pipeline:J.nodes??ee.pipeline}))},timelineUpdated:J=>{if(J?.item){const me=J.item;X(ee=>{const Ne=[me,...ee];return Ne.length>200&&(Ne.length=200),Ne})}}})});return()=>F()},[_e,Le]);const{selectedSessionId:Si,setSelectedSessionId:Gl,sessionMessage:dc,setSessionMessage:Ua,sendMode:Ga,setSendMode:ir,lastSendInfo:Ur,ensureDefaultSession:mo,selectPreferredSessionForAgent:hc,sendSessionMessage:mc}=G4({reload:ut}),{sessionCreatePayload:pc,setSessionCreatePayload:qa,createSession:xc}=U4({reload:ut}),{retryNode:gc}=H4();w.useEffect(()=>{mo(ne)},[ne]);const bc=F=>{d(F),hc(F,ne.filter(q=>et(q.id,F))),s(!0)},yc=(F,q)=>{a(F),b(""),h(q)},vc=(F,q)=>{a(F),h(""),b(q)},Pa=(F,q)=>{a(F),Se(J=>q?F:J===F?null:J)},Sc=(F,q)=>{A(J=>({...J,[F]:q}))},Nc=w.useCallback(async(F,q)=>{const J=_e(F,P).workflow;if(!J){U("插件配置保存失败: workflow 未加载");return}const me={...J,plugins:q,scheduler:q.scheduler.enabled?J.scheduler:{...J.scheduler,enabled:!1}};try{await yl(F,me),Le(F,ee=>({...ee,workflow:me})),A(ee=>({...ee,[F]:ee[F]?.trim()?ee[F]:String(q.remoteBatch.startBatch||1)}))}catch(ee){const Ne=cn(ee);U(`插件配置保存失败: ${Ne}`)}},[_e,P]),wc=w.useCallback(async F=>{const q=F.id.trim(),J=F.title?.trim()??"",me=F.cloneFrom?.trim()||void 0;if(!q)return{ok:!1,message:"流水线 ID 不能为空"};R(!0),U("");try{const Ne=(await lj({id:q,title:J||void 0,cloneFrom:me})).item?.id??q;return await ut(),a(Ne),h(""),b(""),Se(null),U(`流水线 ${Ne} 已创建`),{ok:!0,pipelineId:Ne}}catch(ee){const Ne=cn(ee);return U(`新增流水线失败: ${Ne}`),{ok:!1,message:Ne}}finally{R(!1)}},[ut]),Cc=w.useCallback(async(F,q)=>{const J=F.trim(),me=q.trim();if(!J)return{ok:!1,message:"pipelineId 不能为空"};if(!me)return{ok:!1,message:"流水线标题不能为空"};O(!0),U("");try{return await rj(J,me),await ut(),U(`流水线 ${J} 标题已更新`),{ok:!0,pipelineId:J}}catch(ee){const Ne=cn(ee);return U(`流水线重命名失败: ${Ne}`),{ok:!1,message:Ne}}finally{O(!1)}},[ut]),Va=w.useCallback(async F=>{if(!F.trim())return{ok:!1,message:"pipelineId 不能为空"};ae(!0),U("");try{return await ij(F),Se(q=>q===F?null:q),Re.current===F&&(h(""),b("")),await ut(),U(`流水线 ${F} 已删除`),{ok:!0,pipelineId:F}}catch(q){const J=cn(q);return U(`删除流水线失败: ${J}`),{ok:!1,message:J}}finally{ae(!1)}},[ut]);w.useEffect(()=>{if(!u||!c||Ul.length===0)return;Ul.some(q=>q.id===Si)||Gl(Ul[0].id)},[u,c,Ul,Si,Gl]);const Ec=async(F=i)=>{Be.current?await Be.current:F===i&&Ge&&el&&await rr({silentSuccess:!0}),a(F),Le(F,q=>({...q,isRunning:!0})),U("");try{const q=await fj(F);q.run&&Le(F,J=>({...J,runId:q.run?.id??J.runId,pipeline:q.run?.nodes??J.pipeline})),await ut()}catch(q){const J=cn(q);U(`启动运行失败: ${J}`)}finally{Le(F,q=>({...q,isRunning:!1}))}},Ac=async(F,q=i)=>{await sj(q,F),await ut()},kc=async(F,q=i)=>{await oj(q,F),await ut()},po=async(F=i)=>{await uj(F),await ut()},jc=async(F=i)=>{le(!0),U("");try{const q=lr(F),J=Math.max(1,Math.trunc(Number(L[F]||String(q.startBatch||1))||q.startBatch||1)),me=q.url.trim(),ee=await hj(F,{batchSize:q.batchSize,startBatch:J,url:me||void 0});ee.state&&Le(F,Ne=>({...Ne,batchRunState:ee.state??Ne.batchRunState})),U(`远程关键词池批跑已启动: 从第 ${J} 批开始, 共 ${ee.totalFetched??ee.state?.totalItems??0} 个, 每批 ${ee.state?.batchSize??5} 个`),await ut()}catch(q){const J=cn(q);U(`远程关键词池批跑启动失败: ${J}`)}finally{le(!1)}},Mc=async(F=i)=>{le(!0);try{const q=await mj(F);q.state&&Le(F,J=>({...J,batchRunState:q.state??J.batchRunState})),U("已请求停止批跑(当前批次完成后生效)"),await ut()}catch(q){const J=cn(q);U(`停止批跑失败: ${J}`)}finally{le(!1)}},Dc=async(F=i)=>{le(!0),U("");try{const q=await dj(F);q.status?.batchRun&&Le(F,J=>({...J,batchRunState:q.status?.batchRun??J.batchRunState})),Le(F,J=>({...J,isRunning:!1})),U(q.mode==="remote_batch"?"已请求停止批跑(当前执行节点收到停止信号后生效)":"已请求停止流水线"),await ut()}catch(q){const J=cn(q);U(`停止流水线失败: ${J}`)}finally{le(!1)}},xo=({includeNodeConfig:F,includeWorkflowConfig:q})=>{if(!ge||!Ge)return{ok:!1,error:"节点配置保存失败: workflow 未加载"};if(!ge.nodes.find(lt=>lt.id===Ge.id))return{ok:!1,error:`节点配置保存失败: 找不到 workflow 节点(${Ge.id})`};const me=Yt.trim(),ee=kt.trim(),Ne=bt.trim(),Ye=Ne&&et(Ne,ee)?Ne:zt(ee),we=Array.from(new Set(Zi.map(lt=>lt.trim()).filter(Boolean))),Ke=Math.max(0,Math.min(10,Math.trunc(Number(Wn)||0))),Me=Array.from(new Set(qt.split(",").map(lt=>lt.trim()).filter(Boolean))),yt=iD(Me);if(F){if(!me||!ee)return{ok:!1,error:"节点配置保存失败: 标题/Agent 不能为空"};const lt=new Set([...ge.nodes.map(Al=>Al.id),...Fl(ge).map(Al=>Al.id)]),Zt=we.find(Al=>!lt.has(Al)||Al===Ge.id);if(Zt)return{ok:!1,error:`节点配置保存失败: 非法依赖(${Zt})`};const Dn=V1(ge,Ge.id),sr=we.find(Al=>Dn.has(Al));if(sr)return{ok:!1,error:`节点配置保存失败: 并行组内禁止依赖(${sr})`}}if(q&&yt.length>5)return{ok:!1,error:"路由策略保存失败: allowed 最多 5 个"};const Qe=yt.reduce((lt,Zt)=>{if(Zt===Qu)return lt;const Dn=(Br[Zt]??"").trim();return Dn&&(lt[Zt]=Dn),lt},{});if(q){const lt=new Set([...ge.nodes.map(Dn=>Dn.id),...ja(ge,ge.nodes,ge.edges,ge.groups).map(Dn=>Dn.id)]),Zt=Object.entries(Qe).find(([Dn,sr])=>!yt.includes(Dn)||!lt.has(sr)||sr===Ge.id||Dn===Qu);if(Zt)return{ok:!1,error:`路由策略保存失败: 非法分流目标(${Zt[0]} -> ${Zt[1]})`}}const ye=ge.nodes.map(lt=>lt.id!==Ge.id?lt:(()=>{const Zt=lt.executor??Ge.executor,Dn=(Zt.agentId??"").trim()!==ee;return{...lt,name:F?me:lt.name,instruction:F?zl.trim():lt.instruction,allowReject:F?hl:lt.allowReject,maxRejectCount:F?Ke:lt.maxRejectCount,executor:F?{...Zt,agentId:ee,sessionId:Ye,fallbackAgentId:Dn?null:Zt.fallbackAgentId}:Zt,lane:q?wl:lt.lane,isMainline:q?wl!=="branch":lt.isMainline,routePolicy:q?yt.length>=2?{allowed:yt}:null:lt.routePolicy}})());let Jt=[...ge.edges];return F&&(Jt=zs([...Jt.filter(lt=>!(lt.to===Ge.id&<.when===null)),...we.map(lt=>({from:lt,to:Ge.id,when:null}))])),q&&(Jt=Jt.filter(lt=>!(lt.from===Ge.id&<.when!==null)),Jt=zs([...Jt,...Object.entries(Qe).map(([lt,Zt])=>({from:Ge.id,to:Zt,when:lt}))])),{ok:!0,workflow:{...ge,nodes:ye,edges:Jt,groups:ja(ge,ye,Jt,ge.groups)}}},Ya=w.useCallback(async F=>{if(!(!ge||!Ge)){Te(!0),F?.silentSuccess||U("");try{const q=xo({includeNodeConfig:!1,includeWorkflowConfig:!0});if(!q.ok){U(q.error);return}const J=wa(q.workflow);if(!J.ok){U(`workflow 配置保存失败: ${J.message}`);return}await yl(i,q.workflow),Le(i,me=>({...me,workflow:q.workflow})),await ut(),F?.silentSuccess||U(`节点 ${Ge.id} workflow 配置已保存`)}catch(q){const J=cn(q);U(`workflow 配置保存失败: ${J}`)}finally{Te(!1)}}},[ge,Ge,Yt,kt,bt,Zi,zl,hl,Wn,wl,qt,Br,et]);w.useEffect(()=>{if(!Ge||!Ir||Ue)return;const F=setTimeout(()=>{Ya({silentSuccess:!0})},250);return()=>clearTimeout(F)},[Ge?.id,Ir,Ue,Ya]);const Tc=w.useCallback(async()=>{if(!ge||!ht)return;const F=Cl.trim(),q=Array.from(new Set(_r.map(Me=>Me.trim()).filter(Boolean)));if(!F){U("并行组保存失败: 组 ID 不能为空");return}if(q.length<2){U("并行组保存失败: 组成员至少 2 个");return}const J=new Set(ge.nodes.map(Me=>Me.id)),me=q.find(Me=>!J.has(Me));if(me){U(`并行组保存失败: 非法成员(${me})`);return}const ee=Array.from(new Set(Fa.map(Me=>Me.trim()).filter(Boolean))),Ne=new Set([...ge.nodes.map(Me=>Me.id),...Fl(ge).map(Me=>Me.id)]),Ye=ee.find(Me=>!Ne.has(Me)||q.includes(Me)||Me===F);if(Ye){U(`并行组保存失败: 非法组上游(${Ye})`);return}const we=Q4({workflow:ge,previousGroupId:ht.id,nextGroupId:F,memberIds:q,upstreamIds:ee,joinPolicy:pi}),Ke=wa(we);if(!Ke.ok){U(`并行组保存失败: ${Ke.message}`);return}Ae(!0);try{await yl(i,we),Le(i,Me=>({...Me,workflow:we})),b(F),U(`并行组 ${F} 配置已保存`),await ut()}catch(Me){const yt=cn(Me);U(`并行组保存失败: ${yt}`)}finally{Ae(!1)}},[ge,ht,Cl,_r,Fa,pi,ut]),go=w.useCallback(async(F,q,J)=>{if(nt)return;const me=_e(F,P).workflow;if(!me)return;const ee=Y4(me,q,J);if(ee!==me){pt(!0),U("");try{await yl(F,ee),Le(F,Ne=>({...Ne,workflow:ee})),a(F),h(q),U(`节点 ${q} 顺序已${J==="up"?"上移":"下移"}`),await ut()}catch(Ne){const Ye=cn(Ne);U(`节点顺序保存失败: ${Ye}`)}finally{pt(!1)}}},[_e,nt,P,ut,Le]),Oc=w.useCallback(async(F,q,J,me="before")=>{if(nt)return;const ee=_e(F,P).workflow;if(!ee)return;const Ne=Ay(ee,q,J,me);if(Ne!==ee){pt(!0),U("");try{await yl(F,Ne),Le(F,Ye=>({...Ye,workflow:Ne})),a(F),h(q),U(`节点 ${q} 已拖动到 ${J} ${me==="after"?"后":"前"}`),await ut()}catch(Ye){const we=cn(Ye);U(`节点拖动保存失败: ${we}`)}finally{pt(!1)}}},[_e,nt,P,ut,Le]),Bc=w.useCallback(async()=>{if(!mn.trim()){U("workflow JSON 不能为空");return}let F;try{F=JSON.parse(mn)}catch(q){U(`workflow JSON 非法: ${String(q)}`);return}it(!0);try{const q=wa(F);if(!q.ok){U(`workflow JSON 保存失败: ${q.message}`);return}await yl(i,F),Le(i,J=>({...J,workflow:F})),await ut(),U("workflow JSON 已保存")}catch(q){const J=cn(q);U(`workflow JSON 保存失败: ${J}`)}finally{it(!1)}},[mn]),rr=w.useCallback(async F=>{if(!(!Ge||!ge)){pt(!0),F?.silentSuccess||U("");try{const q=xo({includeNodeConfig:!0,includeWorkflowConfig:!1});if(!q.ok){U(q.error);return}const J=wa(q.workflow);if(!J.ok){U(`节点配置保存失败: ${J.message}`);return}await yl(i,q.workflow),Le(i,me=>({...me,workflow:q.workflow,pipeline:me.pipeline.map(ee=>ee.id===Ge.id?(()=>{const Ne=Yt.trim(),Ye=kt.trim(),we=bt.trim(),Ke=we&&et(we,Ye)?we:zt(Ye),Me=Array.from(new Set(Zi.map(ye=>ye.trim()).filter(Boolean))),yt=Math.max(0,Math.min(10,Math.trunc(Number(Wn)||0))),Qe=(ee.executor.agentId??"").trim()!==Ye;return{...ee,title:Ne,instruction:zl.trim(),dependsOn:Me,allowReject:hl,maxRejectCount:yt,executor:{...ee.executor,agentId:Ye,sessionId:Ke,fallbackAgentId:Qe?null:ee.executor.fallbackAgentId}}})():ee)})),F?.silentSuccess||U(`节点 ${Ge.id} 配置已保存`),await ut()}catch(q){const J=cn(q);U(`节点配置保存失败: ${J}`)}finally{pt(!1)}}},[ge,Ge,Yt,kt,bt,Zi,zl,hl,Wn,et]);return{active:t,setActive:l,sessionModalOpen:u,setSessionModalOpen:s,selectedAgentId:c,gateway:y,pipelineList:I,activePipelineId:i,activePipelineTitle:kn,setActivePipelineId:a,pipelineStateById:P,runId:Ft,latencyMs:_,agents:B,sessions:ne,filteredSessionsForSelectedAgent:Ul,selectedSessionId:Si,setSelectedSessionId:Gl,sessionMessage:dc,setSessionMessage:Ua,sendMode:Ga,setSendMode:ir,lastSendInfo:Ur,sessionCreatePayload:pc,setSessionCreatePayload:qa,pipeline:on,workflow:ge,parallelGroups:Hn,getParallelGroupsForPipeline:F=>{const q=_e(F,P).workflow;return q?Fl(q).map(J=>({id:J.id,members:J.members})):[]},schedulerState:Nl,batchRunState:dl,batchStartBatch:rt,batchStartBatchById:L,agentCards:Hr,selectedNode:Ge,selectedGroup:ht,selectedWorkflowNode:jn,dependencyOptions:gi,groupMemberOptions:Ia,groupUpstreamOptions:bi,routeTargetOptions:co,newNodeDependencyOptions:yi,setSelectedNodeId:h,setSelectedGroupId:b,selectNodeInPipeline:yc,selectGroupInPipeline:vc,timeline:D,pipelineItems:rn,createSession:xc,sendSessionMessage:mc,retryNode:()=>gc(i,Ge?.id),openSessionModalForAgent:bc,serverVersion:N,actionMessage:K,isCreatingPipeline:C,isDeletingPipeline:V,isRenamingPipeline:M,isRunning:Ll,startPipelineRun:Ec,stopPipelineRun:Dc,createPipeline:wc,renamePipeline:Cc,deletePipeline:Va,getHasPipelineExecutionForPipeline:F=>Y1(_e(F,P).pipeline,_e(F,P).isRunning),isBatchOperating:oe,getPipelineRemoteBatchPlugin:lr,getPipelinePlugins:vi,getPipelineSchedulerPlugin:ho,savePipelinePlugins:Nc,setBatchStartBatch:Sc,startRemoteKeywordBatchRun:jc,stopKeywordBatchRun:Mc,toggleScheduler:Ac,switchSchedulerMode:kc,manualTick:po,workflowJsonDraft:mn,setWorkflowJsonDraft:io,isSavingWorkflowJson:Xe,saveWorkflowJsonDraft:Bc,hasPipelineExecution:fo,isPipelineEditing:Ce,getIsPipelineEditing:F=>xe===F,setIsPipelineEditing:F=>Pa(i,F),setPipelineEditing:Pa,isCreateNodeModalOpen:Ee,setIsCreateNodeModalOpen:Fe,deleteTargetNodeId:tt,setDeleteTargetNodeId:Ve,deleteTargetGroupId:Lt,setDeleteTargetGroupId:Ut,agentOutputModalAgentId:_t,setAgentOutputModalAgentId:he,draftTitle:Yt,setDraftTitle:Tt,draftAgentId:kt,setDraftAgentId:El,draftExecutorSessionId:nr,setDraftExecutorSessionId:an,nodeSessionOptions:Ha,draftInstruction:zl,setDraftInstruction:uc,draftDependsOn:Zi,setDraftDependsOn:to,draftAllowReject:hl,setDraftAllowReject:_a,draftMaxRejectCount:Wn,setDraftMaxRejectCount:hi,draftWorkflowLane:wl,setDraftWorkflowLane:mi,draftWorkflowRouteAllowed:qt,setDraftWorkflowRouteAllowed:no,draftWorkflowRouteTargets:Br,setDraftWorkflowRouteTarget:$l,isSavingWorkflowConfig:Ue,saveSelectedWorkflowNodeConfig:Ya,draftGroupId:Cl,setDraftGroupId:cc,draftGroupMembers:_r,setDraftGroupMembers:lo,draftGroupUpstreams:Fa,setDraftGroupUpstreams:Fr,draftGroupJoinPolicy:pi,setDraftGroupJoinPolicy:ml,isSavingGroupConfig:de,saveSelectedGroupConfig:Tc,isSavingNodeConfig:nt,saveSelectedNodeConfig:rr,saveSelectedNodeConfigOnBlur:()=>{if(!Ge||!el||nt)return;const F=rr({silentSuccess:!0});Be.current=F,F.finally(()=>{Be.current===F&&(Be.current=null)})},moveSelectedNodeUp:(F=Ge?.id??"",q=i)=>go(q,F,"up"),moveSelectedNodeDown:(F=Ge?.id??"",q=i)=>go(q,F,"down"),reorderNode:Oc,draftCreateKind:fc,setDraftCreateKind:Rr,draftNewNodeId:Ra,setDraftNewNodeId:Wi,draftNewNodeTitle:ro,setDraftNewNodeTitle:Mn,draftNewNodeAgentId:Lr,setDraftNewNodeAgentId:xi,draftNewNodeInstruction:zr,setDraftNewNodeInstruction:Il,draftNewNodeDependsOn:La,setDraftNewNodeDependsOn:za,draftNewGroupId:Hl,setDraftNewGroupId:ao,draftNewGroupMembers:er,setDraftNewGroupMembers:$a,draftNewGroupUpstreams:$r,setDraftNewGroupUpstreams:so,draftNewGroupJoinPolicy:oo,setDraftNewGroupJoinPolicy:tr,newGroupMemberOptions:pl,newGroupUpstreamOptions:uo,isAddingNode:H,addTemplateNode:async()=>{if(!ge){U("新增节点失败: workflow 未加载");return}const F=Ra.trim(),q=ro.trim(),J=Lr.trim(),me=zr.trim();if(!F||!q||!J){U("新增节点失败: 节点ID/标题/Agent 不能为空");return}if(Qt.some(Qe=>Qe.id===F)){U(`新增节点失败: 节点ID重复(${F})`);return}const ee=Array.from(new Set(La.map(Qe=>Qe.trim()).filter(Boolean))),Ne=new Set([...Qt.map(Qe=>Qe.id),...gt.map(Qe=>Qe.id),F]),Ye=ee.find(Qe=>!Ne.has(Qe)||Qe===F);if(Ye){U(`新增节点失败: 非法依赖(${Ye})`);return}const we=Ge?.outputSpec??{type:"generic.v1",schemaVersion:1},Ke={id:F,name:q,type:"task",enabled:!0,isMainline:!0,lane:"main",parallelGroupId:null,inputMode:"single",outputMode:"single",routePolicy:null,retryPolicy:{maxAttempts:2,backoffMs:0},executor:{agentId:J,role:"operator",fallbackAgentId:null,sessionId:zt(J)},instruction:me,outputSpec:{type:we.type,schemaVersion:we.schemaVersion},allowReject:!1,maxRejectCount:3},Me={...ge,nodes:K4(ge,Ke,ee),edges:zs([...ge.edges,...ee.map(Qe=>({from:Qe,to:F,when:null}))])},yt=wa(Me);if(!yt.ok){U(`新增节点失败: ${yt.message}`);return}ve(!0),U("");try{await yl(i,Me),Le(i,Qe=>({...Qe,workflow:Me})),Wi(""),Mn(""),Il(""),za([]),Fe(!1),U(`节点 ${F} 已新增`),await ut(),h(F)}catch(Qe){const ye=cn(Qe);U(`新增节点失败: ${ye}`)}finally{ve(!1)}},addParallelGroup:async()=>{if(!ge){U("新增并行组失败: workflow 未加载");return}const F=Hl.trim();if(!F){U("新增并行组失败: 组 ID 不能为空");return}if(ge.groups.some(ye=>ye.id===F)){U(`新增并行组失败: 组 ID 已存在(${F})`);return}const q=Array.from(new Set(er.map(ye=>ye.trim()).filter(Boolean)));if(q.length<2){U("新增并行组失败: 组成员至少 2 个");return}const J=new Set(ge.nodes.map(ye=>ye.id)),me=q.find(ye=>!J.has(ye));if(me){U(`新增并行组失败: 非法成员(${me})`);return}const ee=Array.from(new Set($r.map(ye=>ye.trim()).filter(Boolean))),Ne=new Set([...ge.nodes.map(ye=>ye.id),...Fl(ge).map(ye=>ye.id)]),Ye=ee.find(ye=>!Ne.has(ye)||q.includes(ye)||ye===F);if(Ye){U(`新增并行组失败: 非法组上游(${Ye})`);return}const we=ge.nodes.map(ye=>q.includes(ye.id)?{...ye,parallelGroupId:F}:ye),Ke=ky(ge,F,q);let Me=ge.edges.filter(ye=>ye.when!==null?!0:!(ye.to===F||ye.from===F||q.includes(ye.to)||q.includes(ye.from)&&!q.includes(ye.to)));Me=zs([...Me,...ee.map(ye=>({from:ye,to:F,when:null})),...Ke.map(ye=>({from:F,to:ye,when:null}))]);const yt={...ge,nodes:we,edges:Me,groups:ja(ge,we,Me,[...ge.groups,{id:F,type:"parallel",members:q,joinPolicy:oo}])},Qe=wa(yt);if(!Qe.ok){U(`新增并行组失败: ${Qe.message}`);return}ve(!0),U("");try{await yl(i,yt),Le(i,ye=>({...ye,workflow:yt})),ao(""),$a([]),so([]),tr("all"),Rr("node"),Fe(!1),h(""),b(F),U(`并行组 ${F} 已新增`),await ut()}catch(ye){const Jt=cn(ye);U(`新增并行组失败: ${Jt}`)}finally{ve(!1)}},isDeletingNode:Oe,deleteTemplateNodeById:async F=>{if(!ge){U("删除节点失败: workflow 未加载");return}const q=Qt.find(ye=>ye.id===F);if(!q)return;if(Qt.length<=1){U("删除节点失败: 至少保留一个节点");return}const J=ge.nodes.filter(ye=>ye.id!==F),me=ge.edges.filter(ye=>ye.to===F),ee=ge.edges.filter(ye=>ye.from===F),Ne=me.filter(ye=>ye.when===null),Ye=ee.filter(ye=>ye.when===null),we=Ne.length===1&&Ye.length===1?{from:Ne[0].from,to:Ye[0].to,when:null}:null,Ke=new Set([...me,...ee].map(ye=>`${ye.from}|${ye.when??""}|${ye.to}`)),Me=we?[...ge.edges.filter(ye=>!Ke.has(`${ye.from}|${ye.when??""}|${ye.to}`)),we]:ge.edges.filter(ye=>ye.from!==F&&ye.to!==F),yt=ge.groups.map(ye=>({...ye,members:ye.members.filter(Jt=>Jt!==F)})).filter(ye=>ye.members.length>=2),Qe={...ge,nodes:J,edges:Me,groups:yt};At(!0),U("");try{await yl(i,Qe),Le(i,ye=>({...ye,workflow:Qe})),Ve(""),U(`节点 ${q.id} 已删除`),await ut(),h(ye=>ye===F?"":ye)}catch(ye){const Jt=cn(ye);U(`删除节点失败: ${Jt}`)}finally{At(!1)}},deleteParallelGroupById:async F=>{if(!ge){U("删除并行组失败: workflow 未加载");return}const q=ja(ge,ge.nodes,ge.edges,ge.groups).find(we=>we.id===F);if(!q){U(`删除并行组失败: 找不到并行组(${F})`);return}const J=new Set(q.members),me=ge.nodes.map(we=>J.has(we.id)?{...we,parallelGroupId:null}:we),ee=ge.edges.filter(we=>we.when!==null?we.from!==F&&we.to!==F:!(we.from===F||we.to===F)),Ne=ge.groups.filter(we=>we.id!==F),Ye={...ge,nodes:me,edges:ee,groups:ja(ge,me,ee,Ne)};At(!0),U("");try{await yl(i,Ye),Le(i,we=>({...we,workflow:Ye})),Ut(""),b(we=>we===F?"":we),U(`并行组 ${F} 已删除`),await ut()}catch(we){const Ke=cn(we);U(`删除并行组失败: ${Ke}`)}finally{At(!1)}}}}const Ca=`${Wu} w-[min(560px,94vw)]`,uD=`${Wu} grid max-h-[90vh] w-[min(980px,96vw)] grid-rows-[auto_auto_minmax(0,1fr)] gap-[10px] max-[760px]:h-screen max-[760px]:max-h-screen max-[760px]:w-screen`,cD=`${Wu} max-h-[90vh] w-[min(1100px,96vw)] max-[760px]:h-screen max-[760px]:max-h-screen max-[760px]:w-screen`,yh="font-[JetBrains_Mono,monospace]",wn="mx-3 min-w-0",Cn="mb-1.5 block text-xs text-[var(--muted)]",kr="mt-0 cursor-pointer border border-[var(--live-25)] bg-transparent px-[10px] py-2 font-semibold text-[var(--live)] hover:bg-[rgba(50,215,186,0.1)]",J1="mt-0 inline-flex h-8 items-center justify-center cursor-pointer border border-[var(--live-25)] bg-[rgba(12,21,27,0.96)] px-[10px] text-[13px] font-semibold text-[var(--live)] hover:bg-[rgba(18,31,38,0.98)]",vh={ready:"muted",success:"good",running:"live",blocked:"warn",waiting:"warn",rejected:"warn",skipped:"muted",stopped:"muted",queued:"muted",failed:"bad"},Ou={ready:"就绪",connecting:"连接中",ws_open:"通道已开",challenged:"挑战校验中",connect_sent:"握手已发送",idle:"空闲",failed:"失败",success:"成功",running:"运行中",blocked:"阻塞",waiting:"等待中",rejected:"打回",skipped:"已跳过",stopped:"已停止",queued:"排队中"};function Ea({open:t,onClose:l,panelClassName:i,ariaLabel:a,children:u}){const s=w.useRef(null),c=w.useRef(l);c.current=l;const d=w.useCallback(x=>{x.key==="Escape"&&c.current()},[]);return w.useEffect(()=>{if(!t)return;document.addEventListener("keydown",d);const x=document.body.style.overflow;return document.body.style.overflow="hidden",s.current?.focus(),()=>{document.removeEventListener("keydown",d),document.body.style.overflow=x}},[t,d]),t?m.jsxs(m.Fragment,{children:[m.jsx("div",{className:`${Is} ${Hs}`,onClick:l,"aria-hidden":!0}),m.jsx("aside",{className:`${Us} ${Gs}`,"aria-hidden":!0,onClick:l,children:m.jsx("div",{ref:s,role:"dialog","aria-modal":"true","aria-label":a,tabIndex:-1,className:`${i} outline-none`,onClick:x=>x.stopPropagation(),children:u})})]}):null}function Aa({pageRoute:t="home",initialActive:l="总览",onNavigateByNav:i,onNavigateHome:a,focusPipelineId:u}){const s=oD(),c=t,d=c==="pipeline",x=c==="pipeline"?"流水线":c==="logs"?"日志":c==="agents"?"智能体":c==="artifacts"?"产物":"总览",h=j4("(max-width: 767px)"),[g,b]=w.useState(!1);w.useLayoutEffect(()=>{h&&b(!0)},[h]);const[y,v]=w.useState(!0),[N,k]=w.useState(!1),[_,j]=w.useState(null),[B,$]=w.useState(!1),[ne,se]=w.useState(""),[I,T]=w.useState(""),[P,Y]=w.useState(!1),[D,X]=w.useState(""),[K,U]=w.useState(""),[oe,le]=w.useState(null),[C,R]=w.useState(""),[V,ae]=w.useState(""),[M,O]=w.useState(null),[L,A]=w.useState(""),[xe,Se]=w.useState(!1),Ee=s.pipelineList.find(H=>H.id===oe)??null,Fe=s.pipelineList.find(H=>H.id===M)??null,tt=h?"grid h-screen overflow-hidden grid-cols-[minmax(0,1fr)]":["grid h-screen overflow-hidden",g?"grid-cols-[53px_minmax(0,1fr)]":"grid-cols-[210px_minmax(0,1fr)]"].join(" "),Ve="grid min-h-0 min-w-0 grid-rows-[auto_minmax(0,1fr)] overflow-hidden",Lt=["grid h-full min-h-0 grid-rows-[minmax(0,1fr)] overflow-hidden border-b border-r border-[var(--line)]",d?y?"grid-cols-[minmax(0,1fr)_0px]":"grid-cols-[minmax(0,1fr)_300px]":"grid-cols-[minmax(0,1fr)]"].join(" "),Ut=[`flex min-h-0 min-w-0 flex-col overflow-x-hidden ${c==="agents"||c==="pipeline"||c==="artifacts"?"overflow-y-hidden":"overflow-y-auto"} border-r border-[var(--line)]`,"[&>[data-center-card]]:min-h-0 [&>[data-center-card]]:min-w-0 [&>[data-center-card]]:shrink-0 [&>[data-center-card]]:border-b [&>[data-center-card]]:border-[var(--line)]","[&>[data-pipeline-card]]:shrink [&>[data-pipeline-card]]:flex-1 [&>[data-pipeline-card]]:overflow-y-auto","[&>[data-agent-card]]:shrink [&>[data-agent-card]]:flex-1 [&>[data-agent-card]]:overflow-hidden","[&>[data-center-card]:last-child]:border-b-0","[&>[data-run-log-page]]:min-h-0 [&>[data-run-log-page]]:flex-1 [&>[data-run-log-page]]:overflow-hidden [&>[data-run-log-page]]:border-b-0"].join(" "),_t=s.pipeline.find(H=>H.id===s.deleteTargetNodeId),he=s.parallelGroups.find(H=>H.id===s.deleteTargetGroupId),Ue=s.agentCards.find(H=>H.id===s.agentOutputModalAgentId),Te=()=>{document.activeElement?.blur()},de=H=>{_===H&&j(null),N&&s.activePipelineId===H&&k(!1),oe===H&&(ae(""),le(null)),s.activePipelineId===H&&(s.setIsCreateNodeModalOpen(!1),s.setDeleteTargetNodeId(""),s.setDeleteTargetGroupId(""),v(!0))},Ae=()=>{se(""),T(""),Y(!1),X(s.activePipelineId||s.pipelineList[0]?.id||""),U("")},Xe=()=>{ae(""),le(null),R("")},it=async()=>{const H=await s.createPipeline({id:ne,title:I,cloneFrom:P?D:void 0});if(!H.ok){U(H.message);return}Te(),$(!1),Ae()},nt=async()=>{if(!oe)return;const H=await s.renamePipeline(oe,C);if(!H.ok){ae(H.message);return}Te(),Xe()},pt=async H=>{const ve=await s.deletePipeline(H);if(!ve.ok){A(ve.message);return}A(""),de(H),Te(),O(null)};return w.useEffect(()=>{s.setActive(l)},[l,s.setActive]),w.useEffect(()=>{if(!d||y)return;const H=ve=>{const Oe=ve.target;Oe&&(Oe.closest("[data-pipeline-node-id]")||Oe.closest("[data-pipeline-group-id]")||Oe.closest("[data-pipeline-detail-panel]")||v(!0))};return window.addEventListener("pointerdown",H,!0),()=>window.removeEventListener("pointerdown",H,!0)},[y,d]),w.useEffect(()=>{if(!d||!u?.trim())return;const H=u.trim();s.setActivePipelineId(H);const ve=window.setTimeout(()=>{document.querySelector(`[data-pipeline-section-id="${H}"]`)?.scrollIntoView({block:"start",behavior:"smooth"})},0);return()=>window.clearTimeout(ve)},[u,d,s.setActivePipelineId]),w.useEffect(()=>{const H=ve=>{if(ve.key==="Escape"){if(oe){Te(),Xe();return}if(M){Te(),A(""),O(null);return}if(B){Te(),$(!1),Ae();return}if(s.agentOutputModalAgentId){Te(),s.setAgentOutputModalAgentId("");return}if(s.deleteTargetNodeId){Te(),s.setDeleteTargetNodeId("");return}if(s.deleteTargetGroupId){Te(),s.setDeleteTargetGroupId("");return}if(s.isCreateNodeModalOpen){Te(),s.setIsCreateNodeModalOpen(!1);return}if(N){Te(),k(!1);return}_&&(Te(),j(null))}};return window.addEventListener("keydown",H),()=>window.removeEventListener("keydown",H)},[B,oe,M,s.agentOutputModalAgentId,s.deleteTargetNodeId,s.deleteTargetGroupId,s.isCreateNodeModalOpen,N,_,s.setAgentOutputModalAgentId,s.setDeleteTargetNodeId,s.setDeleteTargetGroupId,s.setIsCreateNodeModalOpen]),w.useEffect(()=>{const H=new Set(s.pipelineList.map(ve=>ve.id));_&&!H.has(_)&&j(null),oe&&!H.has(oe)&&Xe(),M&&!H.has(M)&&(A(""),O(null)),N&&!s.activePipelineId&&k(!1)},[M,_,oe,s.activePipelineId,s.pipelineList,N]),m.jsxs("div",{className:tt,children:[h?m.jsxs(m.Fragment,{children:[!g&&m.jsx("div",{className:"fixed inset-0 z-40 bg-black/50",onClick:()=>b(!0),"aria-hidden":!0}),m.jsx(Ug,{navItems:P1,active:s.active,onChangeActive:H=>{s.setActive(H),i?.(H)},onNavigateHome:a,protocol:s.gateway.protocol,scopes:s.gateway.scopes,collapsed:g,variant:"overlay",onCloseDrawer:()=>b(!0)})]}):m.jsx(Ug,{navItems:P1,active:s.active,onChangeActive:H=>{s.setActive(H),i?.(H)},onNavigateHome:a,protocol:s.gateway.protocol,scopes:s.gateway.scopes,collapsed:g}),m.jsxs("div",{className:Ve,children:[m.jsx(P5,{runId:s.runId,gateway:s.gateway,latencyMs:s.latencyMs,agentCount:s.agents.length,sessionCount:s.sessions.length,statusLabel:Ou,navCollapsed:g,onToggleNav:()=>b(H=>!H),routeText:x}),m.jsxs("main",{className:Lt,id:"main-content",children:[m.jsx("section",{className:Ut,children:c==="logs"?m.jsx(q5,{currentRunId:s.runId}):c==="pipeline"?m.jsxs(m.Fragment,{children:[m.jsxs("div",{"data-center-card":!0,className:"sticky top-0 z-10 shrink-0 flex h-[66px] items-center justify-start px-8 [background-color:rgba(9,15,21,0.1)] [background-image:repeating-linear-gradient(-45deg,rgba(150,170,190,0.07)_0,rgba(150,170,190,0.07)_2px,transparent_2px,transparent_8px)]",children:[m.jsxs("button",{className:J1,type:"button",onClick:()=>{$(!0),se(""),T(""),Y(!!s.activePipelineId),X(s.activePipelineId||s.pipelineList[0]?.id||""),U("")},disabled:s.isCreatingPipeline||s.isDeletingPipeline||s.isRenamingPipeline,children:[m.jsx(sm,{className:"mr-1.5 h-4 w-4"}),s.isCreatingPipeline?"新增中...":"新增流水线"]}),m.jsx("button",{className:`${J1} ml-2`,type:"button",onClick:()=>Se(!0),children:"调度面板"})]}),m.jsx(Z3,{sections:s.pipelineList.map(H=>{const ve=H.id,Oe=s.pipelineStateById[ve];if(!Oe)return null;const ie=Oe.workflow?s.getParallelGroupsForPipeline(ve):[];return{pipelineId:ve,title:H.title,canDelete:s.pipelineList.length>1,pipeline:Oe.pipeline,workflowNodeOrder:Oe.workflow?.nodes.map(pe=>pe.id)??Oe.pipeline.map(pe=>pe.id),parallelGroups:ie,pluginState:s.getPipelineRemoteBatchPlugin(ve),schedulerPluginEnabled:s.getPipelineSchedulerPlugin(ve).enabled,schedulerMode:Oe.schedulerState?.mode??"-",schedulerEnabled:Oe.schedulerState?.enabled!==!1,batchStartBatch:s.batchStartBatchById[ve],isBatchOperating:s.isBatchOperating,batchRunStatus:Oe.batchRunState?.status,batchRunProcessedItems:Oe.batchRunState?.processedItems,batchRunTotalItems:Oe.batchRunState?.totalItems,batchRunProcessedBatches:Oe.batchRunState?.processedBatches,batchRunTotalBatches:Oe.batchRunState?.totalBatches,batchRunBatchSize:Oe.batchRunState?.batchSize,batchRunError:Oe.batchRunState?.error??null,isRunning:Oe.isRunning,hasPipelineExecution:s.getHasPipelineExecutionForPipeline(ve),isEditing:s.getIsPipelineEditing(ve)}}).filter(H=>!!H),selectedNodeId:s.selectedNode?.id??"",selectedGroupId:s.selectedGroup?.id??"",activePipelineId:s.activePipelineId,onSelectNode:(H,ve)=>{s.selectNodeInPipeline(H,ve),ve&&v(!1)},onSelectGroup:(H,ve)=>{s.selectGroupInPipeline(H,ve),ve&&v(!1)},onRun:H=>{s.startPipelineRun(H)},onStop:H=>{s.stopPipelineRun(H)},deletingEntity:s.isDeletingNode,savingNodeOrder:s.isSavingNodeConfig,onToggleEditing:(H,ve)=>s.setPipelineEditing(H,ve),onOpenWorkflowJson:H=>{s.setActivePipelineId(H),k(!0)},onOpenPlugins:H=>{s.setActivePipelineId(H),j(H)},onRenamePipeline:(H,ve)=>s.renamePipeline(H,ve),onRequestDeletePipeline:H=>{A(""),O(H)},onRequestDeleteNode:(H,ve)=>{s.setActivePipelineId(H),s.setDeleteTargetNodeId(ve)},onRequestDeleteGroup:(H,ve)=>{s.setActivePipelineId(H),s.setDeleteTargetGroupId(ve)},onRequestCreateNode:()=>s.setIsCreateNodeModalOpen(!0),onMoveNode:(H,ve,Oe)=>{s.selectNodeInPipeline(H,ve),Oe==="up"?s.moveSelectedNodeUp(ve,H):s.moveSelectedNodeDown(ve,H)},onReorderNode:(H,ve,Oe,At)=>{s.selectNodeInPipeline(H,ve),s.reorderNode(H,ve,Oe,At)},onChangeBatchStartBatch:(H,ve)=>s.setBatchStartBatch(H,ve),onStartRemoteKeywordBatchRun:H=>{s.startRemoteKeywordBatchRun(H)},onToggleScheduler:(H,ve)=>{s.toggleScheduler(ve,H)},onSwitchSchedulerMode:(H,ve)=>{s.switchSchedulerMode(ve,H)},onManualTick:H=>{s.manualTick(H)},deletingPipeline:s.isDeletingPipeline,statusTone:vh,statusLabel:Ou})]}):c==="agents"?m.jsx(nN,{agents:s.agentCards,onOpenAgentSession:s.openSessionModalForAgent,onOpenAgentOutput:H=>s.setAgentOutputModalAgentId(H)}):c==="artifacts"?m.jsx(k4,{pipelines:s.pipelineList.map(H=>({id:H.id,title:H.title})),onNavigatePipeline:H=>{s.setActivePipelineId(H),i?.("流水线",H)}}):m.jsx(n4,{pipelines:s.pipelineList.map(H=>({id:H.id,title:H.title,nodes:s.pipelineStateById[H.id]?.pipeline??[],isRunning:s.pipelineStateById[H.id]?.isRunning??!1})),onStartPipeline:async H=>{if(s.getPipelineRemoteBatchPlugin(H).enabled){await s.startRemoteKeywordBatchRun(H);return}await s.startPipelineRun(H)},onNavigatePipeline:H=>{s.setActivePipelineId(H),i?.("流水线",H)},onOpenAgentSession:s.openSessionModalForAgent})}),c==="pipeline"&&!y&&s.selectedNode?m.jsx("div",{className:rh,"data-pipeline-detail-panel":!0,children:m.jsx(h3,{selectedNode:s.selectedNode,selectedWorkflowNode:s.selectedWorkflowNode,agentOptions:s.agents.map(H=>H.id),dependencyOptions:s.dependencyOptions,routeTargetOptions:s.routeTargetOptions,draftTitle:s.draftTitle,draftAgentId:s.draftAgentId,draftExecutorSessionId:s.draftExecutorSessionId,draftInstruction:s.draftInstruction,draftDependsOn:s.draftDependsOn,draftAllowReject:s.draftAllowReject,draftMaxRejectCount:s.draftMaxRejectCount,draftWorkflowLane:s.draftWorkflowLane,draftWorkflowRouteAllowed:s.draftWorkflowRouteAllowed,draftWorkflowRouteTargets:s.draftWorkflowRouteTargets,isSavingWorkflowConfig:s.isSavingWorkflowConfig,savingConfig:s.isSavingNodeConfig,hasPipelineExecution:s.hasPipelineExecution,onChangeDraftTitle:s.setDraftTitle,onChangeDraftAgentId:s.setDraftAgentId,onChangeDraftExecutorSessionId:s.setDraftExecutorSessionId,onChangeDraftInstruction:s.setDraftInstruction,sessionOptions:s.nodeSessionOptions,onChangeDraftDependsOn:s.setDraftDependsOn,onChangeDraftAllowReject:s.setDraftAllowReject,onChangeDraftMaxRejectCount:s.setDraftMaxRejectCount,onChangeDraftWorkflowLane:s.setDraftWorkflowLane,onChangeDraftWorkflowRouteAllowed:s.setDraftWorkflowRouteAllowed,onChangeDraftWorkflowRouteTarget:s.setDraftWorkflowRouteTarget,onBlurSave:s.saveSelectedNodeConfigOnBlur,onRetry:s.retryNode,statusTone:vh,statusLabel:Ou})}):c==="pipeline"&&!y&&s.selectedGroup?m.jsx("div",{className:rh,"data-pipeline-detail-panel":!0,children:m.jsx(b3,{selectedGroup:s.selectedGroup,groupMemberOptions:s.groupMemberOptions,groupUpstreamOptions:s.groupUpstreamOptions,draftGroupId:s.draftGroupId,draftGroupMembers:s.draftGroupMembers,draftGroupUpstreams:s.draftGroupUpstreams,draftGroupJoinPolicy:s.draftGroupJoinPolicy,isSaving:s.isSavingGroupConfig,onChangeDraftGroupId:s.setDraftGroupId,onChangeDraftGroupMembers:s.setDraftGroupMembers,onChangeDraftGroupUpstreams:s.setDraftGroupUpstreams,onChangeDraftGroupJoinPolicy:s.setDraftGroupJoinPolicy,onSave:s.saveSelectedGroupConfig,isDeleting:s.isDeletingNode,statusTone:vh,statusLabel:Ou,onDelete:()=>s.setDeleteTargetGroupId(s.selectedGroup?.id??"")})}):y?null:m.jsx("aside",{className:rh})]})]}),m.jsxs(Ea,{open:B,onClose:()=>{Te(),$(!1),Ae()},panelClassName:Ca,ariaLabel:"创建流水线",children:[m.jsxs("div",{className:vl,children:[m.jsx("h2",{children:"新增流水线"}),m.jsx("button",{className:Xn,type:"button",onClick:()=>{Te(),$(!1),Ae()},"aria-label":"关闭",children:m.jsx(_l,{})})]}),m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"流水线 ID"}),m.jsx("input",{className:Eh,value:ne,onChange:H=>se(H.target.value),placeholder:"例如 C"})]}),m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"流水线标题"}),m.jsx("input",{className:$d,value:I,onChange:H=>T(H.target.value),placeholder:"例如 流水线 DAG-C"})]}),m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"创建方式"}),m.jsx(Kn,{value:P?"clone":"blank",options:[{value:"blank",label:"空白创建"},{value:"clone",label:"从现有流水线克隆"}],onChange:H=>{const ve=H==="clone";Y(ve),ve&&!D&&X(s.activePipelineId||s.pipelineList[0]?.id||"")},triggerClassName:On,ariaLabel:"选择创建方式"})]}),P?m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"克隆来源"}),m.jsx(Kn,{value:D,options:s.pipelineList.map(H=>({value:H.id,label:`${H.id} | ${H.title}`})),onChange:X,triggerClassName:On,ariaLabel:"选择克隆来源"})]}):null,K?m.jsx("p",{className:`${Ol} text-(--bad)`,children:K}):null,m.jsx("div",{className:Ji,children:m.jsx("button",{className:kr,type:"button",onClick:()=>{it()},disabled:s.isCreatingPipeline||P&&!D,children:s.isCreatingPipeline?"新增中...":"确认新增流水线"})})]}),m.jsxs(Ea,{open:!!oe,onClose:()=>{Te(),Xe()},panelClassName:Ca,ariaLabel:"重命名流水线",children:[m.jsxs("div",{className:vl,children:[m.jsx("h2",{children:"修改流水线标题"}),m.jsx("button",{className:Xn,type:"button",onClick:()=>{Te(),Xe()},"aria-label":"关闭",children:m.jsx(_l,{})})]}),m.jsxs("p",{className:Ol,children:["当前流水线 ",m.jsx("code",{children:Ee?.id??oe??"-"}),Ee?.title?`(当前标题:${Ee.title})`:"","。"]}),m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"新标题"}),m.jsx("input",{className:$d,value:C,onChange:H=>R(H.target.value),placeholder:"例如 流水线 DAG-A"})]}),V?m.jsx("p",{className:`${Ol} text-(--bad)`,children:V}):null,m.jsx("div",{className:Ji,children:m.jsx("button",{className:kr,type:"button",onClick:()=>{nt()},disabled:!oe||!C.trim()||s.isRenamingPipeline,children:s.isRenamingPipeline?"保存中...":"确认修改标题"})})]}),m.jsxs(Ea,{open:!!M,onClose:()=>{Te(),A(""),O(null)},panelClassName:Ca,ariaLabel:"确认删除流水线",children:[m.jsxs("div",{className:vl,children:[m.jsx("h2",{children:"确认删除流水线"}),m.jsx("button",{className:Xn,type:"button",onClick:()=>{Te(),A(""),O(null)},"aria-label":"关闭",children:m.jsx(_l,{})})]}),m.jsxs("p",{className:Ol,children:["将删除流水线 ",m.jsx("code",{children:Fe?.id??M??"-"}),Fe?.title?`(${Fe.title})`:"","。删除后目录会归档到 ",m.jsx("code",{children:".data/pipelines/_deleted"}),"。"]}),L?m.jsx("p",{className:`${Ol} text-(--bad)`,children:L}):null,m.jsx("div",{className:Ji,children:m.jsx("button",{className:kr,type:"button",onClick:()=>M&&void pt(M),disabled:!M||s.isDeletingPipeline,children:s.isDeletingPipeline?"删除中...":"确认删除流水线"})})]}),m.jsx("div",{className:`${Is} ${s.isCreateNodeModalOpen?Hs:Bu}`,onClick:()=>{Te(),s.setIsCreateNodeModalOpen(!1)},"aria-hidden":!s.isCreateNodeModalOpen}),m.jsx("aside",{className:`${Us} ${s.isCreateNodeModalOpen?Gs:_u}`,"aria-hidden":!s.isCreateNodeModalOpen,onClick:()=>{Te(),s.setIsCreateNodeModalOpen(!1)},children:m.jsxs("div",{className:Ca,onClick:H=>H.stopPropagation(),children:[m.jsxs("div",{className:vl,children:[m.jsx("h2",{children:"新增对象"}),m.jsx("button",{className:Xn,type:"button",onClick:()=>{Te(),s.setIsCreateNodeModalOpen(!1)},"aria-label":"关闭",children:m.jsx(_l,{})})]}),m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"创建类型"}),m.jsx(Kn,{value:s.draftCreateKind,options:[{value:"node",label:"节点"},{value:"group",label:"并行组"}],onChange:H=>s.setDraftCreateKind(H),triggerClassName:fn,ariaLabel:"选择创建类型"})]}),s.draftCreateKind==="node"?m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"节点 ID"}),m.jsx("input",{className:Eh,value:s.draftNewNodeId,onChange:H=>s.setDraftNewNodeId(H.target.value),placeholder:"例如 n5"})]}),m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"节点标题"}),m.jsx("input",{className:$d,value:s.draftNewNodeTitle,onChange:H=>s.setDraftNewNodeTitle(H.target.value),placeholder:"例如 变更汇总"})]}),m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"Agent"}),m.jsx(Kn,{value:s.draftNewNodeAgentId,options:(s.agents.length?s.agents.map(H=>H.id):[s.draftNewNodeAgentId||"-"]).map(H=>({value:H,label:H})),onChange:s.setDraftNewNodeAgentId,triggerClassName:On,ariaLabel:"Agent"})]}),m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"节点指令"}),m.jsx("textarea",{className:Iu,value:s.draftNewNodeInstruction,onChange:H=>s.setDraftNewNodeInstruction(H.target.value),rows:4,placeholder:"可留空,后续再编辑"})]}),m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"依赖节点(自动识别上游,可多选)"}),m.jsx("select",{className:fn,value:s.draftNewNodeDependsOn,onChange:H=>s.setDraftNewNodeDependsOn(Array.from(H.target.selectedOptions).map(ve=>ve.value).filter(Boolean)),multiple:!0,size:Math.max(3,Math.min(8,s.newNodeDependencyOptions.length||3)),children:s.newNodeDependencyOptions.map(H=>m.jsxs("option",{value:H.id,children:[H.id," - ",H.title]},H.id))}),m.jsx("small",{className:`${yh} mt-1.5 block text-xs text-(--muted)`,children:"按 Ctrl/Command 可多选"})]}),m.jsx("button",{className:kr,type:"button",onClick:s.addTemplateNode,disabled:s.isAddingNode,children:s.isAddingNode?"新增中...":"确认新增"})]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"组 ID"}),m.jsx("input",{className:fn,value:s.draftNewGroupId,onChange:H=>s.setDraftNewGroupId(H.target.value),placeholder:"例如 g_yes_parallel"})]}),m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"组内成员"}),m.jsx("select",{className:fn,value:s.draftNewGroupMembers,onChange:H=>s.setDraftNewGroupMembers(Array.from(H.target.selectedOptions).map(ve=>ve.value).filter(Boolean)),multiple:!0,size:Math.max(3,Math.min(8,s.newGroupMemberOptions.length||3)),children:s.newGroupMemberOptions.map(H=>m.jsxs("option",{value:H.id,children:[H.id," - ",H.title]},H.id))})]}),m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"公共上游"}),m.jsx("select",{className:fn,value:s.draftNewGroupUpstreams,onChange:H=>s.setDraftNewGroupUpstreams(Array.from(H.target.selectedOptions).map(ve=>ve.value).filter(Boolean)),multiple:!0,size:Math.max(3,Math.min(8,s.newGroupUpstreamOptions.length||3)),children:s.newGroupUpstreamOptions.map(H=>m.jsxs("option",{value:H.id,children:[H.id," - ",H.title]},H.id))})]}),m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"汇聚策略"}),m.jsx(Kn,{value:s.draftNewGroupJoinPolicy,options:[{value:"all",label:"all"},{value:"any",label:"any"},{value:"quorum",label:"quorum"}],onChange:H=>s.setDraftNewGroupJoinPolicy(H),triggerClassName:fn,ariaLabel:"选择新增并行组汇聚策略"})]}),m.jsx("button",{className:kr,type:"button",onClick:s.addParallelGroup,disabled:s.isAddingNode,children:s.isAddingNode?"新增中...":"确认新增并行组"})]})]})}),m.jsx("div",{className:`${Is} ${s.deleteTargetNodeId||s.deleteTargetGroupId?Hs:Bu}`,onClick:()=>{Te(),s.setDeleteTargetNodeId(""),s.setDeleteTargetGroupId("")},"aria-hidden":!s.deleteTargetNodeId&&!s.deleteTargetGroupId}),m.jsx("aside",{className:`${Us} ${s.deleteTargetNodeId||s.deleteTargetGroupId?Gs:_u}`,"aria-hidden":!s.deleteTargetNodeId&&!s.deleteTargetGroupId,onClick:()=>{Te(),s.setDeleteTargetNodeId(""),s.setDeleteTargetGroupId("")},children:m.jsxs("div",{className:Ca,onClick:H=>H.stopPropagation(),children:[m.jsxs("div",{className:vl,children:[m.jsx("h2",{children:s.deleteTargetGroupId?"确认删除并行组":"确认删除节点"}),m.jsx("button",{className:Xn,type:"button",onClick:()=>{Te(),s.setDeleteTargetNodeId(""),s.setDeleteTargetGroupId("")},"aria-label":"关闭",children:m.jsx(_l,{})})]}),s.deleteTargetGroupId?m.jsxs("p",{className:Ol,children:["将删除并行组 ",m.jsx("code",{children:he?.id??s.deleteTargetGroupId}),he?`,组内成员: ${he.members.join(", ")}`:"","。组成员会恢复为普通节点,汇聚边会被清理。"]}):m.jsxs("p",{className:Ol,children:["将删除节点 ",m.jsx("code",{children:_t?.id??s.deleteTargetNodeId}),_t?`(${_t.title})`:"",",并清理其他节点对它的依赖。此操作不可撤销。"]}),m.jsx("button",{className:kr,type:"button",onClick:()=>{s.deleteTargetGroupId?s.deleteParallelGroupById(s.deleteTargetGroupId):s.deleteTemplateNodeById(s.deleteTargetNodeId)},disabled:!s.deleteTargetNodeId&&!s.deleteTargetGroupId||s.isDeletingNode,children:s.isDeletingNode?"删除中...":"确认删除"})]})}),m.jsx("div",{className:`${Is} ${s.agentOutputModalAgentId?Hs:Bu}`,onClick:()=>{Te(),s.setAgentOutputModalAgentId("")},"aria-hidden":!s.agentOutputModalAgentId}),m.jsx("aside",{className:`${Us} ${s.agentOutputModalAgentId?Gs:_u}`,"aria-hidden":!s.agentOutputModalAgentId,onClick:()=>{Te(),s.setAgentOutputModalAgentId("")},children:m.jsxs("div",{className:uD,onClick:H=>H.stopPropagation(),children:[m.jsxs("div",{className:vl,children:[m.jsx("h2",{children:"最终输出内容"}),m.jsx("button",{className:Xn,type:"button",onClick:()=>{Te(),s.setAgentOutputModalAgentId("")},"aria-label":"关闭",children:m.jsx(_l,{})})]}),m.jsxs("div",{className:`${yh} flex items-center justify-between gap-3 overflow-hidden border border-(--line) bg-[rgba(15,23,29,0.6)] px-2.5 py-2 text-xs text-(--muted)`,children:[m.jsxs("span",{children:["Agent: ",Ue?.id??s.agentOutputModalAgentId]}),m.jsx("span",{children:Ue?.outputRunId??"run:unknown"})]}),m.jsx("div",{className:"min-h-26.25 max-h-[calc(90vh-160px)] overflow-auto border border-(--line) bg-[#0f171d] max-[760px]:h-full max-[760px]:min-h-0 max-[760px]:max-h-none",children:m.jsx("pre",{className:"m-0 whitespace-pre-wrap wrap-break-word p-3 font-[JetBrains_Mono,monospace] text-[13px] leading-[1.45] text-(--text)",children:Ue?.outputContent||"暂无最终输出内容"})})]})}),m.jsx(k5,{open:s.sessionModalOpen,selectedAgentId:s.selectedAgentId,selectedSessionId:s.selectedSessionId,sessions:s.filteredSessionsForSelectedAgent,sendMode:s.sendMode,sessionMessage:s.sessionMessage,onClose:()=>{Te(),s.setSessionModalOpen(!1)},onChangeSelectedSessionId:s.setSelectedSessionId,onChangeSendMode:s.setSendMode,onChangeMessage:s.setSessionMessage,onSendMessage:s.sendSessionMessage}),m.jsx(Ea,{open:!!_,onClose:()=>{Te(),j(null)},panelClassName:Ca,ariaLabel:"插件配置",children:_?m.jsx(ej,{pipelineId:_,pluginState:s.getPipelinePlugins(_),onClose:()=>{Te(),j(null)},onSave:H=>{s.savePipelinePlugins(_,H)}}):null}),m.jsxs(Ea,{open:N,onClose:()=>{Te(),k(!1)},panelClassName:cD,ariaLabel:"编辑工作流 JSON",children:[m.jsxs("div",{className:vl,children:[m.jsxs("h2",{children:["Workflow JSON(",s.activePipelineTitle||s.activePipelineId||"-",")"]}),m.jsx("button",{className:Xn,type:"button",onClick:()=>{Te(),k(!1)},"aria-label":"关闭",children:m.jsx(_l,{})})]}),m.jsx("p",{className:`${Ol} ${yh}`,children:s.workflow?`nodes=${s.workflow.nodes.length}`:"-"}),m.jsxs("div",{className:wn,children:[m.jsx("label",{className:Cn,children:"可编辑整份 workflow(含 edges/groups/scheduler)"}),m.jsx("textarea",{className:Iu,rows:18,value:s.workflowJsonDraft,onChange:H=>s.setWorkflowJsonDraft(H.target.value),placeholder:"workflow json"})]}),m.jsx("div",{className:Ji,children:m.jsx("button",{className:kr,type:"button",onClick:()=>{s.saveWorkflowJsonDraft()},disabled:s.isSavingWorkflowJson,children:s.isSavingWorkflowJson?"保存中...":"保存 Workflow JSON"})})]}),m.jsxs(Ea,{open:xe,onClose:()=>{Te(),Se(!1)},panelClassName:"overflow-auto border border-[var(--line)] bg-[linear-gradient(180deg,var(--panel)_0%,var(--panel-2)_100%)] p-0 max-h-[88vh] w-[min(760px,94vw)]",ariaLabel:"流水线调度管理",children:[m.jsxs("div",{className:"flex items-center justify-between px-3 pt-3 pb-2 border-b border-[var(--line)]",children:[m.jsx("h2",{className:"text-sm font-semibold text-[var(--text)]",children:"流水线调度管理"}),m.jsx("button",{className:Xn,type:"button",onClick:()=>{Te(),Se(!1)},"aria-label":"关闭",children:m.jsx(_l,{})})]}),m.jsx(jj,{pipelines:s.pipelineList.map(H=>({id:H.id,title:H.title}))})]})]})}const Ys="/pipeline",Ju="/logs",Xu="/agents",Ku="/artifacts",Ma="/overview",jr="/",Sh=t=>{const l=t.trim();return!l||l==="/"?jr:l.startsWith(Ma)?Ma:l.startsWith(Xu)?Xu:l.startsWith(Ys)?Ys:l.startsWith(Ku)?Ku:l.startsWith(Ju)?Ju:jr};function fD(){const[t,l]=w.useState(()=>({path:Sh(window.location.pathname),search:window.location.search}));w.useEffect(()=>{const c=()=>{l({path:Sh(window.location.pathname),search:window.location.search})};return window.addEventListener("popstate",c),()=>window.removeEventListener("popstate",c)},[]);const i=w.useCallback((c,d="")=>{const x=Sh(c),h=d.startsWith("?")||!d?d:`?${d}`;window.history.pushState({},"",`${x}${h}`),l({path:x,search:h})},[]),a=t.path===Ys?new URLSearchParams(t.search).get("pipeline")?.trim()??"":"",u=w.useCallback((c,d)=>{if(c==="总览"){i(Ma);return}if(c==="流水线"){i(Ys,d?.trim()?`pipeline=${encodeURIComponent(d.trim())}`:"");return}if(c==="智能体"){i(Xu);return}if(c==="产物"){i(Ku);return}if(c==="日志"){i(Ju);return}i(Ma)},[i]);let s;return t.path===Ys?s=m.jsx(Aa,{pageRoute:"pipeline",initialActive:"流水线",onNavigateByNav:u,onNavigateHome:()=>i(jr),focusPipelineId:a||void 0}):t.path===Ju?s=m.jsx(Aa,{pageRoute:"logs",initialActive:"日志",onNavigateByNav:u,onNavigateHome:()=>i(jr)}):t.path===Xu?s=m.jsx(Aa,{pageRoute:"agents",initialActive:"智能体",onNavigateByNav:u,onNavigateHome:()=>i(jr)}):t.path===Ku?s=m.jsx(Aa,{pageRoute:"artifacts",initialActive:"产物",onNavigateByNav:u,onNavigateHome:()=>i(jr)}):t.path===Ma?s=m.jsx(Aa,{pageRoute:"home",initialActive:"总览",onNavigateByNav:u,onNavigateHome:()=>i(jr)}):s=m.jsx(Aa,{pageRoute:"home",initialActive:"总览",onNavigateByNav:u,onNavigateHome:()=>i(Ma)}),m.jsxs(m.Fragment,{children:[m.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:top-3 focus:left-3 focus:z-(--z-tooltip) focus:inline-flex focus:h-10 focus:items-center focus:border focus:border-[var(--live)] focus:bg-[var(--panel)] focus:px-4 focus:text-sm focus:font-medium focus:text-[var(--live)] focus:shadow-lg focus:outline-none",children:"跳到主内容"}),s]})}sS.createRoot(document.getElementById("root")).render(m.jsx(X1.StrictMode,{children:m.jsx(fD,{})}));
|