deciduous 0.15.0

Decision graph tooling for AI-assisted development. Track every goal, decision, and outcome. Survive context loss. Query your reasoning.
Documentation
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <!-- Primary Meta Tags -->
    <meta name="title" content="Deciduous - Live Decision Graph Demo" />
    <meta name="description" content="Explore the live decision graph that documented the creation of Deciduous. Browse 520+ nodes across 6 views: DAG, Chains, Timeline, Graph, Roadmap, and Story." />
    <title>Deciduous - Live Decision Graph Demo</title>

    <!-- Open Graph / Facebook -->
    <meta property="og:type" content="website" />
    <meta property="og:url" content="https://notactuallytreyanastasio.github.io/deciduous/demo/" />
    <meta property="og:title" content="Deciduous - Live Decision Graph Demo" />
    <meta property="og:description" content="Explore the live decision graph that documented the creation of Deciduous. Browse 520+ nodes across 6 views: DAG, Chains, Timeline, Graph, Roadmap, and Story." />
    <meta property="og:image" content="https://notactuallytreyanastasio.github.io/deciduous/demo/demo-og.png" />
    <meta property="og:image:width" content="1200" />
    <meta property="og:image:height" content="630" />

    <!-- Twitter -->
    <meta property="twitter:card" content="summary_large_image" />
    <meta property="twitter:url" content="https://notactuallytreyanastasio.github.io/deciduous/demo/" />
    <meta property="twitter:title" content="Deciduous - Live Decision Graph Demo" />
    <meta property="twitter:description" content="Browse 520+ decisions that built Deciduous. See goals, decisions, actions, and outcomes connected in an interactive graph." />
    <meta property="twitter:image" content="https://notactuallytreyanastasio.github.io/deciduous/demo/demo-og.png" />
    <script type="module" crossorigin>function iR(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Ir=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var SC={exports:{}},Ql={},CC={exports:{}},pe={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Wa=Symbol.for("react.element"),oR=Symbol.for("react.portal"),aR=Symbol.for("react.fragment"),sR=Symbol.for("react.strict_mode"),lR=Symbol.for("react.profiler"),uR=Symbol.for("react.provider"),cR=Symbol.for("react.context"),dR=Symbol.for("react.forward_ref"),fR=Symbol.for("react.suspense"),hR=Symbol.for("react.memo"),pR=Symbol.for("react.lazy"),C0=Symbol.iterator;function gR(e){return e===null||typeof e!="object"?null:(e=C0&&e[C0]||e["@@iterator"],typeof e=="function"?e:null)}var jC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},EC=Object.assign,TC={};function bo(e,t,n){this.props=e,this.context=t,this.refs=TC,this.updater=n||jC}bo.prototype.isReactComponent={};bo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};bo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function IC(){}IC.prototype=bo.prototype;function mx(e,t,n){this.props=e,this.context=t,this.refs=TC,this.updater=n||jC}var xx=mx.prototype=new IC;xx.constructor=mx;EC(xx,bo.prototype);xx.isPureReactComponent=!0;var j0=Array.isArray,RC=Object.prototype.hasOwnProperty,yx={current:null},AC={key:!0,ref:!0,__self:!0,__source:!0};function LC(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)RC.call(t,r)&&!AC.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:Wa,type:e,key:o,ref:a,props:i,_owner:yx.current}}function mR(e,t){return{$$typeof:Wa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function vx(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wa}function xR(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var E0=/\/+/g;function tc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?xR(""+e.key):t.toString(36)}function Hs(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Wa:case oR:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+tc(a,0):r,j0(i)?(n="",e!=null&&(n=e.replace(E0,"$&/")+"/"),Hs(i,t,n,"",function(u){return u})):i!=null&&(vx(i)&&(i=mR(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(E0,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",j0(e))for(var s=0;s<e.length;s++){o=e[s];var l=r+tc(o,s);a+=Hs(o,t,n,l,i)}else if(l=gR(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=r+tc(o,s++),a+=Hs(o,t,n,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function us(e,t,n){if(e==null)return e;var r=[],i=0;return Hs(e,r,"","",function(o){return t.call(n,o,i++)}),r}function yR(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Tt={current:null},Us={transition:null},vR={ReactCurrentDispatcher:Tt,ReactCurrentBatchConfig:Us,ReactCurrentOwner:yx};function PC(){throw Error("act(...) is not supported in production builds of React.")}pe.Children={map:us,forEach:function(e,t,n){us(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return us(e,function(){t++}),t},toArray:function(e){return us(e,function(t){return t})||[]},only:function(e){if(!vx(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};pe.Component=bo;pe.Fragment=aR;pe.Profiler=lR;pe.PureComponent=mx;pe.StrictMode=sR;pe.Suspense=fR;pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vR;pe.act=PC;pe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=EC({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=yx.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)RC.call(t,l)&&!AC.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:Wa,type:e.type,key:i,ref:o,props:r,_owner:a}};pe.createContext=function(e){return e={$$typeof:cR,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:uR,_context:e},e.Consumer=e};pe.createElement=LC;pe.createFactory=function(e){var t=LC.bind(null,e);return t.type=e,t};pe.createRef=function(){return{current:null}};pe.forwardRef=function(e){return{$$typeof:dR,render:e}};pe.isValidElement=vx;pe.lazy=function(e){return{$$typeof:pR,_payload:{_status:-1,_result:e},_init:yR}};pe.memo=function(e,t){return{$$typeof:hR,type:e,compare:t===void 0?null:t}};pe.startTransition=function(e){var t=Us.transition;Us.transition={};try{e()}finally{Us.transition=t}};pe.unstable_act=PC;pe.useCallback=function(e,t){return Tt.current.useCallback(e,t)};pe.useContext=function(e){return Tt.current.useContext(e)};pe.useDebugValue=function(){};pe.useDeferredValue=function(e){return Tt.current.useDeferredValue(e)};pe.useEffect=function(e,t){return Tt.current.useEffect(e,t)};pe.useId=function(){return Tt.current.useId()};pe.useImperativeHandle=function(e,t,n){return Tt.current.useImperativeHandle(e,t,n)};pe.useInsertionEffect=function(e,t){return Tt.current.useInsertionEffect(e,t)};pe.useLayoutEffect=function(e,t){return Tt.current.useLayoutEffect(e,t)};pe.useMemo=function(e,t){return Tt.current.useMemo(e,t)};pe.useReducer=function(e,t,n){return Tt.current.useReducer(e,t,n)};pe.useRef=function(e){return Tt.current.useRef(e)};pe.useState=function(e){return Tt.current.useState(e)};pe.useSyncExternalStore=function(e,t,n){return Tt.current.useSyncExternalStore(e,t,n)};pe.useTransition=function(){return Tt.current.useTransition()};pe.version="18.3.1";CC.exports=pe;var T=CC.exports;const wx=Xl(T),wR=iR({__proto__:null,default:wx},[T]);/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var bR=T,kR=Symbol.for("react.element"),_R=Symbol.for("react.fragment"),SR=Object.prototype.hasOwnProperty,CR=bR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,jR={key:!0,ref:!0,__self:!0,__source:!0};function zC(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)SR.call(t,r)&&!jR.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:kR,type:e,key:o,ref:a,props:i,_owner:CR.current}}Ql.Fragment=_R;Ql.jsx=zC;Ql.jsxs=zC;SC.exports=Ql;var c=SC.exports,Yg={},MC={exports:{}},Zt={},NC={exports:{}},DC={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(e){function t(N,q){var S=N.length;N.push(q);e:for(;0<S;){var W=S-1>>>1,K=N[W];if(0<i(K,q))N[W]=q,N[S]=K,S=W;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var q=N[0],S=N.pop();if(S!==q){N[0]=S;e:for(var W=0,K=N.length,I=K>>>1;W<I;){var re=2*(W+1)-1,ye=N[re],le=re+1,Ie=N[le];if(0>i(ye,S))le<K&&0>i(Ie,ye)?(N[W]=Ie,N[le]=S,W=le):(N[W]=ye,N[re]=S,W=re);else if(le<K&&0>i(Ie,S))N[W]=Ie,N[le]=S,W=le;else break e}}return q}function i(N,q){var S=N.sortIndex-q.sortIndex;return S!==0?S:N.id-q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],d=1,f=null,h=3,p=!1,m=!1,g=!1,v=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(N){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=N)r(u),q.sortIndex=q.expirationTime,t(l,q);else break;q=n(u)}}function k(N){if(g=!1,w(N),!m)if(n(l)!==null)m=!0,D(E);else{var q=n(u);q!==null&&V(k,q.startTime-N)}}function E(N,q){m=!1,g&&(g=!1,x(b),b=-1),p=!0;var S=h;try{for(w(q),f=n(l);f!==null&&(!(f.expirationTime>q)||N&&!L());){var W=f.callback;if(typeof W=="function"){f.callback=null,h=f.priorityLevel;var K=W(f.expirationTime<=q);q=e.unstable_now(),typeof K=="function"?f.callback=K:f===n(l)&&r(l),w(q)}else r(l);f=n(l)}if(f!==null)var I=!0;else{var re=n(u);re!==null&&V(k,re.startTime-q),I=!1}return I}finally{f=null,h=S,p=!1}}var C=!1,j=null,b=-1,A=5,_=-1;function L(){return!(e.unstable_now()-_<A)}function P(){if(j!==null){var N=e.unstable_now();_=N;var q=!0;try{q=j(!0,N)}finally{q?$():(C=!1,j=null)}}else C=!1}var $;if(typeof y=="function")$=function(){y(P)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,F=R.port2;R.port1.onmessage=P,$=function(){F.postMessage(null)}}else $=function(){v(P,0)};function D(N){j=N,C||(C=!0,$())}function V(N,q){b=v(function(){N(e.unstable_now())},q)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,D(E))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):A=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(N){switch(h){case 1:case 2:case 3:var q=3;break;default:q=h}var S=h;h=q;try{return N()}finally{h=S}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,q){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var S=h;h=N;try{return q()}finally{h=S}},e.unstable_scheduleCallback=function(N,q,S){var W=e.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?W+S:W):S=W,N){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=S+K,N={id:d++,callback:q,priorityLevel:N,startTime:S,expirationTime:K,sortIndex:-1},S>W?(N.sortIndex=S,t(u,N),n(l)===null&&N===n(u)&&(g?(x(b),b=-1):g=!0,V(k,S-W))):(N.sortIndex=K,t(l,N),m||p||(m=!0,D(E))),N},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(N){var q=h;return function(){var S=h;h=q;try{return N.apply(this,arguments)}finally{h=S}}}})(DC);NC.exports=DC;var ER=NC.exports;/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var TR=T,Qt=ER;function H(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var OC=new Set,ya={};function Ci(e,t){co(e,t),co(e+"Capture",t)}function co(e,t){for(ya[e]=t,e=0;e<t.length;e++)OC.add(t[e])}var or=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Kg=Object.prototype.hasOwnProperty,IR=/^[: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]*$/,T0={},I0={};function RR(e){return Kg.call(I0,e)?!0:Kg.call(T0,e)?!1:IR.test(e)?I0[e]=!0:(T0[e]=!0,!1)}function AR(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function LR(e,t,n,r){if(t===null||typeof t>"u"||AR(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function It(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var ft={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ft[e]=new It(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ft[t]=new It(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ft[e]=new It(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ft[e]=new It(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ft[e]=new It(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ft[e]=new It(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ft[e]=new It(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ft[e]=new It(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ft[e]=new It(e,5,!1,e.toLowerCase(),null,!1,!1)});var bx=/[\-:]([a-z])/g;function kx(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(bx,kx);ft[t]=new It(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(bx,kx);ft[t]=new It(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(bx,kx);ft[t]=new It(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ft[e]=new It(e,1,!1,e.toLowerCase(),null,!1,!1)});ft.xlinkHref=new It("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ft[e]=new It(e,1,!1,e.toLowerCase(),null,!0,!0)});function _x(e,t,n,r){var i=ft.hasOwnProperty(t)?ft[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(LR(t,n,i,r)&&(n=null),r||i===null?RR(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var dr=TR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,cs=Symbol.for("react.element"),Hi=Symbol.for("react.portal"),Ui=Symbol.for("react.fragment"),Sx=Symbol.for("react.strict_mode"),Xg=Symbol.for("react.profiler"),BC=Symbol.for("react.provider"),FC=Symbol.for("react.context"),Cx=Symbol.for("react.forward_ref"),Qg=Symbol.for("react.suspense"),Jg=Symbol.for("react.suspense_list"),jx=Symbol.for("react.memo"),_r=Symbol.for("react.lazy"),qC=Symbol.for("react.offscreen"),R0=Symbol.iterator;function zo(e){return e===null||typeof e!="object"?null:(e=R0&&e[R0]||e["@@iterator"],typeof e=="function"?e:null)}var He=Object.assign,nc;function Yo(e){if(nc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);nc=t&&t[1]||""}return`
`+nc+e}var rc=!1;function ic(e,t){if(!e||rc)return"";rc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
`),o=r.stack.split(`
`),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var l=`
`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{rc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Yo(e):""}function PR(e){switch(e.tag){case 5:return Yo(e.type);case 16:return Yo("Lazy");case 13:return Yo("Suspense");case 19:return Yo("SuspenseList");case 0:case 2:case 15:return e=ic(e.type,!1),e;case 11:return e=ic(e.type.render,!1),e;case 1:return e=ic(e.type,!0),e;default:return""}}function Zg(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ui:return"Fragment";case Hi:return"Portal";case Xg:return"Profiler";case Sx:return"StrictMode";case Qg:return"Suspense";case Jg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case FC:return(e.displayName||"Context")+".Consumer";case BC:return(e._context.displayName||"Context")+".Provider";case Cx:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jx:return t=e.displayName||null,t!==null?t:Zg(e.type)||"Memo";case _r:t=e._payload,e=e._init;try{return Zg(e(t))}catch{}}return null}function zR(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Zg(t);case 8:return t===Sx?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ur(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $C(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function MR(e){var t=$C(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ds(e){e._valueTracker||(e._valueTracker=MR(e))}function HC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$C(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ll(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}}function em(e,t){var n=t.checked;return He({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function A0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ur(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function UC(e,t){t=t.checked,t!=null&&_x(e,"checked",t,!1)}function tm(e,t){UC(e,t);var n=Ur(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?nm(e,t.type,n):t.hasOwnProperty("defaultValue")&&nm(e,t.type,Ur(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function L0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function nm(e,t,n){(t!=="number"||ll(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ko=Array.isArray;function to(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ur(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function rm(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(H(91));return He({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function P0(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(H(92));if(Ko(n)){if(1<n.length)throw Error(H(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ur(n)}}function WC(e,t){var n=Ur(t.value),r=Ur(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function z0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function VC(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function im(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?VC(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var fs,GC=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(fs=fs||document.createElement("div"),fs.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=fs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function va(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var aa={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},NR=["Webkit","ms","Moz","O"];Object.keys(aa).forEach(function(e){NR.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),aa[t]=aa[e]})});function YC(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||aa.hasOwnProperty(e)&&aa[e]?(""+t).trim():t+"px"}function KC(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=YC(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var DR=He({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function om(e,t){if(t){if(DR[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(H(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(H(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(H(61))}if(t.style!=null&&typeof t.style!="object")throw Error(H(62))}}function am(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 sm=null;function Ex(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var lm=null,no=null,ro=null;function M0(e){if(e=Ya(e)){if(typeof lm!="function")throw Error(H(280));var t=e.stateNode;t&&(t=nu(t),lm(e.stateNode,e.type,t))}}function XC(e){no?ro?ro.push(e):ro=[e]:no=e}function QC(){if(no){var e=no,t=ro;if(ro=no=null,M0(e),t)for(e=0;e<t.length;e++)M0(t[e])}}function JC(e,t){return e(t)}function ZC(){}var oc=!1;function e2(e,t,n){if(oc)return e(t,n);oc=!0;try{return JC(e,t,n)}finally{oc=!1,(no!==null||ro!==null)&&(ZC(),QC())}}function wa(e,t){var n=e.stateNode;if(n===null)return null;var r=nu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(H(231,t,typeof n));return n}var um=!1;if(or)try{var Mo={};Object.defineProperty(Mo,"passive",{get:function(){um=!0}}),window.addEventListener("test",Mo,Mo),window.removeEventListener("test",Mo,Mo)}catch{um=!1}function OR(e,t,n,r,i,o,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var sa=!1,ul=null,cl=!1,cm=null,BR={onError:function(e){sa=!0,ul=e}};function FR(e,t,n,r,i,o,a,s,l){sa=!1,ul=null,OR.apply(BR,arguments)}function qR(e,t,n,r,i,o,a,s,l){if(FR.apply(this,arguments),sa){if(sa){var u=ul;sa=!1,ul=null}else throw Error(H(198));cl||(cl=!0,cm=u)}}function ji(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function t2(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function N0(e){if(ji(e)!==e)throw Error(H(188))}function $R(e){var t=e.alternate;if(!t){if(t=ji(e),t===null)throw Error(H(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return N0(i),e;if(o===r)return N0(i),t;o=o.sibling}throw Error(H(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(H(189))}}if(n.alternate!==r)throw Error(H(190))}if(n.tag!==3)throw Error(H(188));return n.stateNode.current===n?e:t}function n2(e){return e=$R(e),e!==null?r2(e):null}function r2(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=r2(e);if(t!==null)return t;e=e.sibling}return null}var i2=Qt.unstable_scheduleCallback,D0=Qt.unstable_cancelCallback,HR=Qt.unstable_shouldYield,UR=Qt.unstable_requestPaint,Ye=Qt.unstable_now,WR=Qt.unstable_getCurrentPriorityLevel,Tx=Qt.unstable_ImmediatePriority,o2=Qt.unstable_UserBlockingPriority,dl=Qt.unstable_NormalPriority,VR=Qt.unstable_LowPriority,a2=Qt.unstable_IdlePriority,Jl=null,Fn=null;function GR(e){if(Fn&&typeof Fn.onCommitFiberRoot=="function")try{Fn.onCommitFiberRoot(Jl,e,void 0,(e.current.flags&128)===128)}catch{}}var Sn=Math.clz32?Math.clz32:XR,YR=Math.log,KR=Math.LN2;function XR(e){return e>>>=0,e===0?32:31-(YR(e)/KR|0)|0}var hs=64,ps=4194304;function Xo(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function fl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Xo(s):(o&=a,o!==0&&(r=Xo(o)))}else a=n&~i,a!==0?r=Xo(a):o!==0&&(r=Xo(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Sn(t),i=1<<n,r|=e[n],t&=~i;return r}function QR(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function JR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-Sn(o),s=1<<a,l=i[a];l===-1?(!(s&n)||s&r)&&(i[a]=QR(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}function dm(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function s2(){var e=hs;return hs<<=1,!(hs&4194240)&&(hs=64),e}function ac(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Va(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Sn(t),e[t]=n}function ZR(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Sn(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Ix(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Sn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Te=0;function l2(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var u2,Rx,c2,d2,f2,fm=!1,gs=[],zr=null,Mr=null,Nr=null,ba=new Map,ka=new Map,jr=[],e6="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 submit".split(" ");function O0(e,t){switch(e){case"focusin":case"focusout":zr=null;break;case"dragenter":case"dragleave":Mr=null;break;case"mouseover":case"mouseout":Nr=null;break;case"pointerover":case"pointerout":ba.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ka.delete(t.pointerId)}}function No(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Ya(t),t!==null&&Rx(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function t6(e,t,n,r,i){switch(t){case"focusin":return zr=No(zr,e,t,n,r,i),!0;case"dragenter":return Mr=No(Mr,e,t,n,r,i),!0;case"mouseover":return Nr=No(Nr,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return ba.set(o,No(ba.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ka.set(o,No(ka.get(o)||null,e,t,n,r,i)),!0}return!1}function h2(e){var t=li(e.target);if(t!==null){var n=ji(t);if(n!==null){if(t=n.tag,t===13){if(t=t2(n),t!==null){e.blockedOn=t,f2(e.priority,function(){c2(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ws(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hm(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);sm=r,n.target.dispatchEvent(r),sm=null}else return t=Ya(n),t!==null&&Rx(t),e.blockedOn=n,!1;t.shift()}return!0}function B0(e,t,n){Ws(e)&&n.delete(t)}function n6(){fm=!1,zr!==null&&Ws(zr)&&(zr=null),Mr!==null&&Ws(Mr)&&(Mr=null),Nr!==null&&Ws(Nr)&&(Nr=null),ba.forEach(B0),ka.forEach(B0)}function Do(e,t){e.blockedOn===t&&(e.blockedOn=null,fm||(fm=!0,Qt.unstable_scheduleCallback(Qt.unstable_NormalPriority,n6)))}function _a(e){function t(i){return Do(i,e)}if(0<gs.length){Do(gs[0],e);for(var n=1;n<gs.length;n++){var r=gs[n];r.blockedOn===e&&(r.blockedOn=null)}}for(zr!==null&&Do(zr,e),Mr!==null&&Do(Mr,e),Nr!==null&&Do(Nr,e),ba.forEach(t),ka.forEach(t),n=0;n<jr.length;n++)r=jr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<jr.length&&(n=jr[0],n.blockedOn===null);)h2(n),n.blockedOn===null&&jr.shift()}var io=dr.ReactCurrentBatchConfig,hl=!0;function r6(e,t,n,r){var i=Te,o=io.transition;io.transition=null;try{Te=1,Ax(e,t,n,r)}finally{Te=i,io.transition=o}}function i6(e,t,n,r){var i=Te,o=io.transition;io.transition=null;try{Te=4,Ax(e,t,n,r)}finally{Te=i,io.transition=o}}function Ax(e,t,n,r){if(hl){var i=hm(e,t,n,r);if(i===null)mc(e,t,r,pl,n),O0(e,r);else if(t6(i,e,t,n,r))r.stopPropagation();else if(O0(e,r),t&4&&-1<e6.indexOf(e)){for(;i!==null;){var o=Ya(i);if(o!==null&&u2(o),o=hm(e,t,n,r),o===null&&mc(e,t,r,pl,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else mc(e,t,r,null,n)}}var pl=null;function hm(e,t,n,r){if(pl=null,e=Ex(r),e=li(e),e!==null)if(t=ji(e),t===null)e=null;else if(n=t.tag,n===13){if(e=t2(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return pl=e,null}function p2(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(WR()){case Tx:return 1;case o2:return 4;case dl:case VR:return 16;case a2:return 536870912;default:return 16}default:return 16}}var Rr=null,Lx=null,Vs=null;function g2(){if(Vs)return Vs;var e,t=Lx,n=t.length,r,i="value"in Rr?Rr.value:Rr.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return Vs=i.slice(e,1<r?1-r:void 0)}function Gs(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ms(){return!0}function F0(){return!1}function en(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?ms:F0,this.isPropagationStopped=F0,this}return He(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ms)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ms)},persist:function(){},isPersistent:ms}),t}var ko={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Px=en(ko),Ga=He({},ko,{view:0,detail:0}),o6=en(Ga),sc,lc,Oo,Zl=He({},Ga,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zx,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!==Oo&&(Oo&&e.type==="mousemove"?(sc=e.screenX-Oo.screenX,lc=e.screenY-Oo.screenY):lc=sc=0,Oo=e),sc)},movementY:function(e){return"movementY"in e?e.movementY:lc}}),q0=en(Zl),a6=He({},Zl,{dataTransfer:0}),s6=en(a6),l6=He({},Ga,{relatedTarget:0}),uc=en(l6),u6=He({},ko,{animationName:0,elapsedTime:0,pseudoElement:0}),c6=en(u6),d6=He({},ko,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),f6=en(d6),h6=He({},ko,{data:0}),$0=en(h6),p6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g6={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"},m6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function x6(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=m6[e])?!!t[e]:!1}function zx(){return x6}var y6=He({},Ga,{key:function(e){if(e.key){var t=p6[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Gs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?g6[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zx,charCode:function(e){return e.type==="keypress"?Gs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),v6=en(y6),w6=He({},Zl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),H0=en(w6),b6=He({},Ga,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zx}),k6=en(b6),_6=He({},ko,{propertyName:0,elapsedTime:0,pseudoElement:0}),S6=en(_6),C6=He({},Zl,{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}),j6=en(C6),E6=[9,13,27,32],Mx=or&&"CompositionEvent"in window,la=null;or&&"documentMode"in document&&(la=document.documentMode);var T6=or&&"TextEvent"in window&&!la,m2=or&&(!Mx||la&&8<la&&11>=la),U0=" ",W0=!1;function x2(e,t){switch(e){case"keyup":return E6.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function y2(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wi=!1;function I6(e,t){switch(e){case"compositionend":return y2(t);case"keypress":return t.which!==32?null:(W0=!0,U0);case"textInput":return e=t.data,e===U0&&W0?null:e;default:return null}}function R6(e,t){if(Wi)return e==="compositionend"||!Mx&&x2(e,t)?(e=g2(),Vs=Lx=Rr=null,Wi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return m2&&t.locale!=="ko"?null:t.data;default:return null}}var A6={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 V0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!A6[e.type]:t==="textarea"}function v2(e,t,n,r){XC(r),t=gl(t,"onChange"),0<t.length&&(n=new Px("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ua=null,Sa=null;function L6(e){R2(e,0)}function eu(e){var t=Yi(e);if(HC(t))return e}function P6(e,t){if(e==="change")return t}var w2=!1;if(or){var cc;if(or){var dc="oninput"in document;if(!dc){var G0=document.createElement("div");G0.setAttribute("oninput","return;"),dc=typeof G0.oninput=="function"}cc=dc}else cc=!1;w2=cc&&(!document.documentMode||9<document.documentMode)}function Y0(){ua&&(ua.detachEvent("onpropertychange",b2),Sa=ua=null)}function b2(e){if(e.propertyName==="value"&&eu(Sa)){var t=[];v2(t,Sa,e,Ex(e)),e2(L6,t)}}function z6(e,t,n){e==="focusin"?(Y0(),ua=t,Sa=n,ua.attachEvent("onpropertychange",b2)):e==="focusout"&&Y0()}function M6(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return eu(Sa)}function N6(e,t){if(e==="click")return eu(t)}function D6(e,t){if(e==="input"||e==="change")return eu(t)}function O6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var En=typeof Object.is=="function"?Object.is:O6;function Ca(e,t){if(En(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Kg.call(t,i)||!En(e[i],t[i]))return!1}return!0}function K0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function X0(e,t){var n=K0(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=K0(n)}}function k2(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?k2(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _2(){for(var e=window,t=ll();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ll(e.document)}return t}function Nx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function B6(e){var t=_2(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&k2(n.ownerDocument.documentElement,n)){if(r!==null&&Nx(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=X0(n,o);var a=X0(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var F6=or&&"documentMode"in document&&11>=document.documentMode,Vi=null,pm=null,ca=null,gm=!1;function Q0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;gm||Vi==null||Vi!==ll(r)||(r=Vi,"selectionStart"in r&&Nx(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ca&&Ca(ca,r)||(ca=r,r=gl(pm,"onSelect"),0<r.length&&(t=new Px("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Vi)))}function xs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Gi={animationend:xs("Animation","AnimationEnd"),animationiteration:xs("Animation","AnimationIteration"),animationstart:xs("Animation","AnimationStart"),transitionend:xs("Transition","TransitionEnd")},fc={},S2={};or&&(S2=document.createElement("div").style,"AnimationEvent"in window||(delete Gi.animationend.animation,delete Gi.animationiteration.animation,delete Gi.animationstart.animation),"TransitionEvent"in window||delete Gi.transitionend.transition);function tu(e){if(fc[e])return fc[e];if(!Gi[e])return e;var t=Gi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in S2)return fc[e]=t[n];return e}var C2=tu("animationend"),j2=tu("animationiteration"),E2=tu("animationstart"),T2=tu("transitionend"),I2=new Map,J0="abort auxClick 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(" ");function Kr(e,t){I2.set(e,t),Ci(t,[e])}for(var hc=0;hc<J0.length;hc++){var pc=J0[hc],q6=pc.toLowerCase(),$6=pc[0].toUpperCase()+pc.slice(1);Kr(q6,"on"+$6)}Kr(C2,"onAnimationEnd");Kr(j2,"onAnimationIteration");Kr(E2,"onAnimationStart");Kr("dblclick","onDoubleClick");Kr("focusin","onFocus");Kr("focusout","onBlur");Kr(T2,"onTransitionEnd");co("onMouseEnter",["mouseout","mouseover"]);co("onMouseLeave",["mouseout","mouseover"]);co("onPointerEnter",["pointerout","pointerover"]);co("onPointerLeave",["pointerout","pointerover"]);Ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ci("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qo="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(" "),H6=new Set("cancel close invalid load scroll toggle".split(" ").concat(Qo));function Z0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,qR(r,t,void 0,e),e.currentTarget=null}function R2(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Z0(i,s,u),o=l}else for(a=0;a<r.length;a++){if(s=r[a],l=s.instance,u=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Z0(i,s,u),o=l}}}if(cl)throw e=cm,cl=!1,cm=null,e}function Ne(e,t){var n=t[wm];n===void 0&&(n=t[wm]=new Set);var r=e+"__bubble";n.has(r)||(A2(t,e,2,!1),n.add(r))}function gc(e,t,n){var r=0;t&&(r|=4),A2(n,e,r,t)}var ys="_reactListening"+Math.random().toString(36).slice(2);function ja(e){if(!e[ys]){e[ys]=!0,OC.forEach(function(n){n!=="selectionchange"&&(H6.has(n)||gc(n,!1,e),gc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ys]||(t[ys]=!0,gc("selectionchange",!1,t))}}function A2(e,t,n,r){switch(p2(t)){case 1:var i=r6;break;case 4:i=i6;break;default:i=Ax}n=i.bind(null,t,n,e),i=void 0,!um||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function mc(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;s!==null;){if(a=li(s),a===null)return;if(l=a.tag,l===5||l===6){r=o=a;continue e}s=s.parentNode}}r=r.return}e2(function(){var u=o,d=Ex(n),f=[];e:{var h=I2.get(e);if(h!==void 0){var p=Px,m=e;switch(e){case"keypress":if(Gs(n)===0)break e;case"keydown":case"keyup":p=v6;break;case"focusin":m="focus",p=uc;break;case"focusout":m="blur",p=uc;break;case"beforeblur":case"afterblur":p=uc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=q0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=s6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=k6;break;case C2:case j2:case E2:p=c6;break;case T2:p=S6;break;case"scroll":p=o6;break;case"wheel":p=j6;break;case"copy":case"cut":case"paste":p=f6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=H0}var g=(t&4)!==0,v=!g&&e==="scroll",x=g?h!==null?h+"Capture":null:h;g=[];for(var y=u,w;y!==null;){w=y;var k=w.stateNode;if(w.tag===5&&k!==null&&(w=k,x!==null&&(k=wa(y,x),k!=null&&g.push(Ea(y,k,w)))),v)break;y=y.return}0<g.length&&(h=new p(h,m,null,n,d),f.push({event:h,listeners:g}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==sm&&(m=n.relatedTarget||n.fromElement)&&(li(m)||m[ar]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=u,m=m?li(m):null,m!==null&&(v=ji(m),m!==v||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=u),p!==m)){if(g=q0,k="onMouseLeave",x="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=H0,k="onPointerLeave",x="onPointerEnter",y="pointer"),v=p==null?h:Yi(p),w=m==null?h:Yi(m),h=new g(k,y+"leave",p,n,d),h.target=v,h.relatedTarget=w,k=null,li(d)===u&&(g=new g(x,y+"enter",m,n,d),g.target=w,g.relatedTarget=v,k=g),v=k,p&&m)t:{for(g=p,x=m,y=0,w=g;w;w=Mi(w))y++;for(w=0,k=x;k;k=Mi(k))w++;for(;0<y-w;)g=Mi(g),y--;for(;0<w-y;)x=Mi(x),w--;for(;y--;){if(g===x||x!==null&&g===x.alternate)break t;g=Mi(g),x=Mi(x)}g=null}else g=null;p!==null&&ev(f,h,p,g,!1),m!==null&&v!==null&&ev(f,v,m,g,!0)}}e:{if(h=u?Yi(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var E=P6;else if(V0(h))if(w2)E=D6;else{E=M6;var C=z6}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(E=N6);if(E&&(E=E(e,u))){v2(f,E,n,d);break e}C&&C(e,h,u),e==="focusout"&&(C=h._wrapperState)&&C.controlled&&h.type==="number"&&nm(h,"number",h.value)}switch(C=u?Yi(u):window,e){case"focusin":(V0(C)||C.contentEditable==="true")&&(Vi=C,pm=u,ca=null);break;case"focusout":ca=pm=Vi=null;break;case"mousedown":gm=!0;break;case"contextmenu":case"mouseup":case"dragend":gm=!1,Q0(f,n,d);break;case"selectionchange":if(F6)break;case"keydown":case"keyup":Q0(f,n,d)}var j;if(Mx)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Wi?x2(e,n)&&(b="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(b="onCompositionStart");b&&(m2&&n.locale!=="ko"&&(Wi||b!=="onCompositionStart"?b==="onCompositionEnd"&&Wi&&(j=g2()):(Rr=d,Lx="value"in Rr?Rr.value:Rr.textContent,Wi=!0)),C=gl(u,b),0<C.length&&(b=new $0(b,e,null,n,d),f.push({event:b,listeners:C}),j?b.data=j:(j=y2(n),j!==null&&(b.data=j)))),(j=T6?I6(e,n):R6(e,n))&&(u=gl(u,"onBeforeInput"),0<u.length&&(d=new $0("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=j))}R2(f,t)})}function Ea(e,t,n){return{instance:e,listener:t,currentTarget:n}}function gl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=wa(e,n),o!=null&&r.unshift(Ea(e,o,i)),o=wa(e,t),o!=null&&r.push(Ea(e,o,i))),e=e.return}return r}function Mi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ev(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(l!==null&&l===r)break;s.tag===5&&u!==null&&(s=u,i?(l=wa(n,o),l!=null&&a.unshift(Ea(n,l,s))):i||(l=wa(n,o),l!=null&&a.push(Ea(n,l,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var U6=/\r\n?/g,W6=/\u0000|\uFFFD/g;function tv(e){return(typeof e=="string"?e:""+e).replace(U6,`
`).replace(W6,"")}function vs(e,t,n){if(t=tv(t),tv(e)!==t&&n)throw Error(H(425))}function ml(){}var mm=null,xm=null;function ym(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var vm=typeof setTimeout=="function"?setTimeout:void 0,V6=typeof clearTimeout=="function"?clearTimeout:void 0,nv=typeof Promise=="function"?Promise:void 0,G6=typeof queueMicrotask=="function"?queueMicrotask:typeof nv<"u"?function(e){return nv.resolve(null).then(e).catch(Y6)}:vm;function Y6(e){setTimeout(function(){throw e})}function xc(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),_a(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);_a(t)}function Dr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function rv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var _o=Math.random().toString(36).slice(2),On="__reactFiber$"+_o,Ta="__reactProps$"+_o,ar="__reactContainer$"+_o,wm="__reactEvents$"+_o,K6="__reactListeners$"+_o,X6="__reactHandles$"+_o;function li(e){var t=e[On];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ar]||n[On]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=rv(e);e!==null;){if(n=e[On])return n;e=rv(e)}return t}e=n,n=e.parentNode}return null}function Ya(e){return e=e[On]||e[ar],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Yi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(H(33))}function nu(e){return e[Ta]||null}var bm=[],Ki=-1;function Xr(e){return{current:e}}function De(e){0>Ki||(e.current=bm[Ki],bm[Ki]=null,Ki--)}function Me(e,t){Ki++,bm[Ki]=e.current,e.current=t}var Wr={},vt=Xr(Wr),Dt=Xr(!1),xi=Wr;function fo(e,t){var n=e.type.contextTypes;if(!n)return Wr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ot(e){return e=e.childContextTypes,e!=null}function xl(){De(Dt),De(vt)}function iv(e,t,n){if(vt.current!==Wr)throw Error(H(168));Me(vt,t),Me(Dt,n)}function L2(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(H(108,zR(e)||"Unknown",i));return He({},n,r)}function yl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wr,xi=vt.current,Me(vt,e),Me(Dt,Dt.current),!0}function ov(e,t,n){var r=e.stateNode;if(!r)throw Error(H(169));n?(e=L2(e,t,xi),r.__reactInternalMemoizedMergedChildContext=e,De(Dt),De(vt),Me(vt,e)):De(Dt),Me(Dt,n)}var Jn=null,ru=!1,yc=!1;function P2(e){Jn===null?Jn=[e]:Jn.push(e)}function Q6(e){ru=!0,P2(e)}function Qr(){if(!yc&&Jn!==null){yc=!0;var e=0,t=Te;try{var n=Jn;for(Te=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Jn=null,ru=!1}catch(i){throw Jn!==null&&(Jn=Jn.slice(e+1)),i2(Tx,Qr),i}finally{Te=t,yc=!1}}return null}var Xi=[],Qi=0,vl=null,wl=0,on=[],an=0,yi=null,Zn=1,er="";function ii(e,t){Xi[Qi++]=wl,Xi[Qi++]=vl,vl=e,wl=t}function z2(e,t,n){on[an++]=Zn,on[an++]=er,on[an++]=yi,yi=e;var r=Zn;e=er;var i=32-Sn(r)-1;r&=~(1<<i),n+=1;var o=32-Sn(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Zn=1<<32-Sn(t)+i|n<<i|r,er=o+e}else Zn=1<<o|n<<i|r,er=e}function Dx(e){e.return!==null&&(ii(e,1),z2(e,1,0))}function Ox(e){for(;e===vl;)vl=Xi[--Qi],Xi[Qi]=null,wl=Xi[--Qi],Xi[Qi]=null;for(;e===yi;)yi=on[--an],on[an]=null,er=on[--an],on[an]=null,Zn=on[--an],on[an]=null}var Kt=null,Yt=null,Be=!1,kn=null;function M2(e,t){var n=ln(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function av(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Kt=e,Yt=Dr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Kt=e,Yt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=yi!==null?{id:Zn,overflow:er}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ln(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Kt=e,Yt=null,!0):!1;default:return!1}}function km(e){return(e.mode&1)!==0&&(e.flags&128)===0}function _m(e){if(Be){var t=Yt;if(t){var n=t;if(!av(e,t)){if(km(e))throw Error(H(418));t=Dr(n.nextSibling);var r=Kt;t&&av(e,t)?M2(r,n):(e.flags=e.flags&-4097|2,Be=!1,Kt=e)}}else{if(km(e))throw Error(H(418));e.flags=e.flags&-4097|2,Be=!1,Kt=e}}}function sv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Kt=e}function ws(e){if(e!==Kt)return!1;if(!Be)return sv(e),Be=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ym(e.type,e.memoizedProps)),t&&(t=Yt)){if(km(e))throw N2(),Error(H(418));for(;t;)M2(e,t),t=Dr(t.nextSibling)}if(sv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(H(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Yt=Dr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Yt=null}}else Yt=Kt?Dr(e.stateNode.nextSibling):null;return!0}function N2(){for(var e=Yt;e;)e=Dr(e.nextSibling)}function ho(){Yt=Kt=null,Be=!1}function Bx(e){kn===null?kn=[e]:kn.push(e)}var J6=dr.ReactCurrentBatchConfig;function Bo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(H(309));var r=n.stateNode}if(!r)throw Error(H(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=i.refs;a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(H(284));if(!n._owner)throw Error(H(290,e))}return e}function bs(e,t){throw e=Object.prototype.toString.call(t),Error(H(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function lv(e){var t=e._init;return t(e._payload)}function D2(e){function t(x,y){if(e){var w=x.deletions;w===null?(x.deletions=[y],x.flags|=16):w.push(y)}}function n(x,y){if(!e)return null;for(;y!==null;)t(x,y),y=y.sibling;return null}function r(x,y){for(x=new Map;y!==null;)y.key!==null?x.set(y.key,y):x.set(y.index,y),y=y.sibling;return x}function i(x,y){return x=qr(x,y),x.index=0,x.sibling=null,x}function o(x,y,w){return x.index=w,e?(w=x.alternate,w!==null?(w=w.index,w<y?(x.flags|=2,y):w):(x.flags|=2,y)):(x.flags|=1048576,y)}function a(x){return e&&x.alternate===null&&(x.flags|=2),x}function s(x,y,w,k){return y===null||y.tag!==6?(y=Cc(w,x.mode,k),y.return=x,y):(y=i(y,w),y.return=x,y)}function l(x,y,w,k){var E=w.type;return E===Ui?d(x,y,w.props.children,k,w.key):y!==null&&(y.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===_r&&lv(E)===y.type)?(k=i(y,w.props),k.ref=Bo(x,y,w),k.return=x,k):(k=el(w.type,w.key,w.props,null,x.mode,k),k.ref=Bo(x,y,w),k.return=x,k)}function u(x,y,w,k){return y===null||y.tag!==4||y.stateNode.containerInfo!==w.containerInfo||y.stateNode.implementation!==w.implementation?(y=jc(w,x.mode,k),y.return=x,y):(y=i(y,w.children||[]),y.return=x,y)}function d(x,y,w,k,E){return y===null||y.tag!==7?(y=pi(w,x.mode,k,E),y.return=x,y):(y=i(y,w),y.return=x,y)}function f(x,y,w){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Cc(""+y,x.mode,w),y.return=x,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case cs:return w=el(y.type,y.key,y.props,null,x.mode,w),w.ref=Bo(x,null,y),w.return=x,w;case Hi:return y=jc(y,x.mode,w),y.return=x,y;case _r:var k=y._init;return f(x,k(y._payload),w)}if(Ko(y)||zo(y))return y=pi(y,x.mode,w,null),y.return=x,y;bs(x,y)}return null}function h(x,y,w,k){var E=y!==null?y.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return E!==null?null:s(x,y,""+w,k);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case cs:return w.key===E?l(x,y,w,k):null;case Hi:return w.key===E?u(x,y,w,k):null;case _r:return E=w._init,h(x,y,E(w._payload),k)}if(Ko(w)||zo(w))return E!==null?null:d(x,y,w,k,null);bs(x,w)}return null}function p(x,y,w,k,E){if(typeof k=="string"&&k!==""||typeof k=="number")return x=x.get(w)||null,s(y,x,""+k,E);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case cs:return x=x.get(k.key===null?w:k.key)||null,l(y,x,k,E);case Hi:return x=x.get(k.key===null?w:k.key)||null,u(y,x,k,E);case _r:var C=k._init;return p(x,y,w,C(k._payload),E)}if(Ko(k)||zo(k))return x=x.get(w)||null,d(y,x,k,E,null);bs(y,k)}return null}function m(x,y,w,k){for(var E=null,C=null,j=y,b=y=0,A=null;j!==null&&b<w.length;b++){j.index>b?(A=j,j=null):A=j.sibling;var _=h(x,j,w[b],k);if(_===null){j===null&&(j=A);break}e&&j&&_.alternate===null&&t(x,j),y=o(_,y,b),C===null?E=_:C.sibling=_,C=_,j=A}if(b===w.length)return n(x,j),Be&&ii(x,b),E;if(j===null){for(;b<w.length;b++)j=f(x,w[b],k),j!==null&&(y=o(j,y,b),C===null?E=j:C.sibling=j,C=j);return Be&&ii(x,b),E}for(j=r(x,j);b<w.length;b++)A=p(j,x,b,w[b],k),A!==null&&(e&&A.alternate!==null&&j.delete(A.key===null?b:A.key),y=o(A,y,b),C===null?E=A:C.sibling=A,C=A);return e&&j.forEach(function(L){return t(x,L)}),Be&&ii(x,b),E}function g(x,y,w,k){var E=zo(w);if(typeof E!="function")throw Error(H(150));if(w=E.call(w),w==null)throw Error(H(151));for(var C=E=null,j=y,b=y=0,A=null,_=w.next();j!==null&&!_.done;b++,_=w.next()){j.index>b?(A=j,j=null):A=j.sibling;var L=h(x,j,_.value,k);if(L===null){j===null&&(j=A);break}e&&j&&L.alternate===null&&t(x,j),y=o(L,y,b),C===null?E=L:C.sibling=L,C=L,j=A}if(_.done)return n(x,j),Be&&ii(x,b),E;if(j===null){for(;!_.done;b++,_=w.next())_=f(x,_.value,k),_!==null&&(y=o(_,y,b),C===null?E=_:C.sibling=_,C=_);return Be&&ii(x,b),E}for(j=r(x,j);!_.done;b++,_=w.next())_=p(j,x,b,_.value,k),_!==null&&(e&&_.alternate!==null&&j.delete(_.key===null?b:_.key),y=o(_,y,b),C===null?E=_:C.sibling=_,C=_);return e&&j.forEach(function(P){return t(x,P)}),Be&&ii(x,b),E}function v(x,y,w,k){if(typeof w=="object"&&w!==null&&w.type===Ui&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case cs:e:{for(var E=w.key,C=y;C!==null;){if(C.key===E){if(E=w.type,E===Ui){if(C.tag===7){n(x,C.sibling),y=i(C,w.props.children),y.return=x,x=y;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===_r&&lv(E)===C.type){n(x,C.sibling),y=i(C,w.props),y.ref=Bo(x,C,w),y.return=x,x=y;break e}n(x,C);break}else t(x,C);C=C.sibling}w.type===Ui?(y=pi(w.props.children,x.mode,k,w.key),y.return=x,x=y):(k=el(w.type,w.key,w.props,null,x.mode,k),k.ref=Bo(x,y,w),k.return=x,x=k)}return a(x);case Hi:e:{for(C=w.key;y!==null;){if(y.key===C)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(x,y.sibling),y=i(y,w.children||[]),y.return=x,x=y;break e}else{n(x,y);break}else t(x,y);y=y.sibling}y=jc(w,x.mode,k),y.return=x,x=y}return a(x);case _r:return C=w._init,v(x,y,C(w._payload),k)}if(Ko(w))return m(x,y,w,k);if(zo(w))return g(x,y,w,k);bs(x,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(x,y.sibling),y=i(y,w),y.return=x,x=y):(n(x,y),y=Cc(w,x.mode,k),y.return=x,x=y),a(x)):n(x,y)}return v}var po=D2(!0),O2=D2(!1),bl=Xr(null),kl=null,Ji=null,Fx=null;function qx(){Fx=Ji=kl=null}function $x(e){var t=bl.current;De(bl),e._currentValue=t}function Sm(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function oo(e,t){kl=e,Fx=Ji=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Mt=!0),e.firstContext=null)}function cn(e){var t=e._currentValue;if(Fx!==e)if(e={context:e,memoizedValue:t,next:null},Ji===null){if(kl===null)throw Error(H(308));Ji=e,kl.dependencies={lanes:0,firstContext:e}}else Ji=Ji.next=e;return t}var ui=null;function Hx(e){ui===null?ui=[e]:ui.push(e)}function B2(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Hx(t)):(n.next=i.next,i.next=n),t.interleaved=n,sr(e,r)}function sr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Sr=!1;function Ux(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function F2(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ir(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Or(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,_e&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,sr(e,n)}return i=r.interleaved,i===null?(t.next=t,Hx(r)):(t.next=i.next,i.next=t),r.interleaved=t,sr(e,n)}function Ys(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ix(e,n)}}function uv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _l(e,t,n,r){var i=e.updateQueue;Sr=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,u=l.next;l.next=null,a===null?o=u:a.next=u,a=l;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==a&&(s===null?d.firstBaseUpdate=u:s.next=u,d.lastBaseUpdate=l))}if(o!==null){var f=i.baseState;a=0,d=u=l=null,s=o;do{var h=s.lane,p=s.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,g=s;switch(h=t,p=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){f=m.call(p,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,h=typeof m=="function"?m.call(p,f,h):m,h==null)break e;f=He({},f,h);break e;case 2:Sr=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(u=d=p,l=f):d=d.next=p,a|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(d===null&&(l=f),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);wi|=a,e.lanes=a,e.memoizedState=f}}function cv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(H(191,i));i.call(r)}}}var Ka={},qn=Xr(Ka),Ia=Xr(Ka),Ra=Xr(Ka);function ci(e){if(e===Ka)throw Error(H(174));return e}function Wx(e,t){switch(Me(Ra,t),Me(Ia,e),Me(qn,Ka),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:im(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=im(t,e)}De(qn),Me(qn,t)}function go(){De(qn),De(Ia),De(Ra)}function q2(e){ci(Ra.current);var t=ci(qn.current),n=im(t,e.type);t!==n&&(Me(Ia,e),Me(qn,n))}function Vx(e){Ia.current===e&&(De(qn),De(Ia))}var qe=Xr(0);function Sl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vc=[];function Gx(){for(var e=0;e<vc.length;e++)vc[e]._workInProgressVersionPrimary=null;vc.length=0}var Ks=dr.ReactCurrentDispatcher,wc=dr.ReactCurrentBatchConfig,vi=0,$e=null,tt=null,it=null,Cl=!1,da=!1,Aa=0,Z6=0;function pt(){throw Error(H(321))}function Yx(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!En(e[n],t[n]))return!1;return!0}function Kx(e,t,n,r,i,o){if(vi=o,$e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ks.current=e===null||e.memoizedState===null?r4:i4,e=n(r,i),da){o=0;do{if(da=!1,Aa=0,25<=o)throw Error(H(301));o+=1,it=tt=null,t.updateQueue=null,Ks.current=o4,e=n(r,i)}while(da)}if(Ks.current=jl,t=tt!==null&&tt.next!==null,vi=0,it=tt=$e=null,Cl=!1,t)throw Error(H(300));return e}function Xx(){var e=Aa!==0;return Aa=0,e}function Nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?$e.memoizedState=it=e:it=it.next=e,it}function dn(){if(tt===null){var e=$e.alternate;e=e!==null?e.memoizedState:null}else e=tt.next;var t=it===null?$e.memoizedState:it.next;if(t!==null)it=t,tt=e;else{if(e===null)throw Error(H(310));tt=e,e={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},it===null?$e.memoizedState=it=e:it=it.next=e}return it}function La(e,t){return typeof t=="function"?t(e):t}function bc(e){var t=dn(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=tt,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=a=null,l=null,u=o;do{var d=u.lane;if((vi&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=f,a=r):l=l.next=f,$e.lanes|=d,wi|=d}u=u.next}while(u!==null&&u!==o);l===null?a=r:l.next=s,En(r,t.memoizedState)||(Mt=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,$e.lanes|=o,wi|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function kc(e){var t=dn(),n=t.queue;if(n===null)throw Error(H(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);En(o,t.memoizedState)||(Mt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function $2(){}function H2(e,t){var n=$e,r=dn(),i=t(),o=!En(r.memoizedState,i);if(o&&(r.memoizedState=i,Mt=!0),r=r.queue,Qx(V2.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||it!==null&&it.memoizedState.tag&1){if(n.flags|=2048,Pa(9,W2.bind(null,n,r,i,t),void 0,null),ot===null)throw Error(H(349));vi&30||U2(n,t,i)}return i}function U2(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function W2(e,t,n,r){t.value=n,t.getSnapshot=r,G2(t)&&Y2(e)}function V2(e,t,n){return n(function(){G2(t)&&Y2(e)})}function G2(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!En(e,n)}catch{return!0}}function Y2(e){var t=sr(e,1);t!==null&&Cn(t,e,1,-1)}function dv(e){var t=Nn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:La,lastRenderedState:e},t.queue=e,e=e.dispatch=n4.bind(null,$e,e),[t.memoizedState,e]}function Pa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=$e.updateQueue,t===null?(t={lastEffect:null,stores:null},$e.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function K2(){return dn().memoizedState}function Xs(e,t,n,r){var i=Nn();$e.flags|=e,i.memoizedState=Pa(1|t,n,void 0,r===void 0?null:r)}function iu(e,t,n,r){var i=dn();r=r===void 0?null:r;var o=void 0;if(tt!==null){var a=tt.memoizedState;if(o=a.destroy,r!==null&&Yx(r,a.deps)){i.memoizedState=Pa(t,n,o,r);return}}$e.flags|=e,i.memoizedState=Pa(1|t,n,o,r)}function fv(e,t){return Xs(8390656,8,e,t)}function Qx(e,t){return iu(2048,8,e,t)}function X2(e,t){return iu(4,2,e,t)}function Q2(e,t){return iu(4,4,e,t)}function J2(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Z2(e,t,n){return n=n!=null?n.concat([e]):null,iu(4,4,J2.bind(null,t,e),n)}function Jx(){}function ej(e,t){var n=dn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Yx(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function tj(e,t){var n=dn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Yx(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function nj(e,t,n){return vi&21?(En(n,t)||(n=s2(),$e.lanes|=n,wi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Mt=!0),e.memoizedState=n)}function e4(e,t){var n=Te;Te=n!==0&&4>n?n:4,e(!0);var r=wc.transition;wc.transition={};try{e(!1),t()}finally{Te=n,wc.transition=r}}function rj(){return dn().memoizedState}function t4(e,t,n){var r=Fr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ij(e))oj(t,n);else if(n=B2(e,t,n,r),n!==null){var i=Et();Cn(n,e,r,i),aj(n,t,r)}}function n4(e,t,n){var r=Fr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ij(e))oj(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,En(s,a)){var l=t.interleaved;l===null?(i.next=i,Hx(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=B2(e,t,i,r),n!==null&&(i=Et(),Cn(n,e,r,i),aj(n,t,r))}}function ij(e){var t=e.alternate;return e===$e||t!==null&&t===$e}function oj(e,t){da=Cl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function aj(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ix(e,n)}}var jl={readContext:cn,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useInsertionEffect:pt,useLayoutEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useMutableSource:pt,useSyncExternalStore:pt,useId:pt,unstable_isNewReconciler:!1},r4={readContext:cn,useCallback:function(e,t){return Nn().memoizedState=[e,t===void 0?null:t],e},useContext:cn,useEffect:fv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Xs(4194308,4,J2.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Xs(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xs(4,2,e,t)},useMemo:function(e,t){var n=Nn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Nn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=t4.bind(null,$e,e),[r.memoizedState,e]},useRef:function(e){var t=Nn();return e={current:e},t.memoizedState=e},useState:dv,useDebugValue:Jx,useDeferredValue:function(e){return Nn().memoizedState=e},useTransition:function(){var e=dv(!1),t=e[0];return e=e4.bind(null,e[1]),Nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=$e,i=Nn();if(Be){if(n===void 0)throw Error(H(407));n=n()}else{if(n=t(),ot===null)throw Error(H(349));vi&30||U2(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,fv(V2.bind(null,r,o,e),[e]),r.flags|=2048,Pa(9,W2.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Nn(),t=ot.identifierPrefix;if(Be){var n=er,r=Zn;n=(r&~(1<<32-Sn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Aa++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Z6++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},i4={readContext:cn,useCallback:ej,useContext:cn,useEffect:Qx,useImperativeHandle:Z2,useInsertionEffect:X2,useLayoutEffect:Q2,useMemo:tj,useReducer:bc,useRef:K2,useState:function(){return bc(La)},useDebugValue:Jx,useDeferredValue:function(e){var t=dn();return nj(t,tt.memoizedState,e)},useTransition:function(){var e=bc(La)[0],t=dn().memoizedState;return[e,t]},useMutableSource:$2,useSyncExternalStore:H2,useId:rj,unstable_isNewReconciler:!1},o4={readContext:cn,useCallback:ej,useContext:cn,useEffect:Qx,useImperativeHandle:Z2,useInsertionEffect:X2,useLayoutEffect:Q2,useMemo:tj,useReducer:kc,useRef:K2,useState:function(){return kc(La)},useDebugValue:Jx,useDeferredValue:function(e){var t=dn();return tt===null?t.memoizedState=e:nj(t,tt.memoizedState,e)},useTransition:function(){var e=kc(La)[0],t=dn().memoizedState;return[e,t]},useMutableSource:$2,useSyncExternalStore:H2,useId:rj,unstable_isNewReconciler:!1};function wn(e,t){if(e&&e.defaultProps){t=He({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Cm(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:He({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ou={isMounted:function(e){return(e=e._reactInternals)?ji(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Et(),i=Fr(e),o=ir(r,i);o.payload=t,n!=null&&(o.callback=n),t=Or(e,o,i),t!==null&&(Cn(t,e,i,r),Ys(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Et(),i=Fr(e),o=ir(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Or(e,o,i),t!==null&&(Cn(t,e,i,r),Ys(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Et(),r=Fr(e),i=ir(n,r);i.tag=2,t!=null&&(i.callback=t),t=Or(e,i,r),t!==null&&(Cn(t,e,r,n),Ys(t,e,r))}};function hv(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!Ca(n,r)||!Ca(i,o):!0}function sj(e,t,n){var r=!1,i=Wr,o=t.contextType;return typeof o=="object"&&o!==null?o=cn(o):(i=Ot(t)?xi:vt.current,r=t.contextTypes,o=(r=r!=null)?fo(e,i):Wr),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ou,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function pv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ou.enqueueReplaceState(t,t.state,null)}function jm(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ux(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=cn(o):(o=Ot(t)?xi:vt.current,i.context=fo(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(Cm(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&ou.enqueueReplaceState(i,i.state,null),_l(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function mo(e,t){try{var n="",r=t;do n+=PR(r),r=r.return;while(r);var i=n}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function _c(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Em(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var a4=typeof WeakMap=="function"?WeakMap:Map;function lj(e,t,n){n=ir(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Tl||(Tl=!0,Dm=r),Em(e,t)},n}function uj(e,t,n){n=ir(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Em(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Em(e,t),typeof r!="function"&&(Br===null?Br=new Set([this]):Br.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function gv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new a4;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=w4.bind(null,e,t,n),t.then(e,e))}function mv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function xv(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=ir(-1,1),t.tag=2,Or(n,t,1))),n.lanes|=1),e)}var s4=dr.ReactCurrentOwner,Mt=!1;function kt(e,t,n,r){t.child=e===null?O2(t,null,n,r):po(t,e.child,n,r)}function yv(e,t,n,r,i){n=n.render;var o=t.ref;return oo(t,i),r=Kx(e,t,n,r,o,i),n=Xx(),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,lr(e,t,i)):(Be&&n&&Dx(t),t.flags|=1,kt(e,t,r,i),t.child)}function vv(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!ay(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,cj(e,t,o,r,i)):(e=el(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ca,n(a,r)&&e.ref===t.ref)return lr(e,t,i)}return t.flags|=1,e=qr(o,r),e.ref=t.ref,e.return=t,t.child=e}function cj(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Ca(o,r)&&e.ref===t.ref)if(Mt=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Mt=!0);else return t.lanes=e.lanes,lr(e,t,i)}return Tm(e,t,n,r,i)}function dj(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Me(eo,Vt),Vt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Me(eo,Vt),Vt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Me(eo,Vt),Vt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Me(eo,Vt),Vt|=r;return kt(e,t,i,n),t.child}function fj(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Tm(e,t,n,r,i){var o=Ot(n)?xi:vt.current;return o=fo(t,o),oo(t,i),n=Kx(e,t,n,r,o,i),r=Xx(),e!==null&&!Mt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,lr(e,t,i)):(Be&&r&&Dx(t),t.flags|=1,kt(e,t,n,i),t.child)}function wv(e,t,n,r,i){if(Ot(n)){var o=!0;yl(t)}else o=!1;if(oo(t,i),t.stateNode===null)Qs(e,t),sj(t,n,r),jm(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=cn(u):(u=Ot(n)?xi:vt.current,u=fo(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==u)&&pv(t,a,r,u),Sr=!1;var h=t.memoizedState;a.state=h,_l(t,r,a,i),l=t.memoizedState,s!==r||h!==l||Dt.current||Sr?(typeof d=="function"&&(Cm(t,n,d,r),l=t.memoizedState),(s=Sr||hv(t,n,s,r,h,l,u))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,F2(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:wn(t.type,s),a.props=u,f=t.pendingProps,h=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=cn(l):(l=Ot(n)?xi:vt.current,l=fo(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==f||h!==l)&&pv(t,a,r,l),Sr=!1,h=t.memoizedState,a.state=h,_l(t,r,a,i);var m=t.memoizedState;s!==f||h!==m||Dt.current||Sr?(typeof p=="function"&&(Cm(t,n,p,r),m=t.memoizedState),(u=Sr||hv(t,n,u,r,h,m,l)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,m,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,m,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=l,r=u):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Im(e,t,n,r,o,i)}function Im(e,t,n,r,i,o){fj(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&ov(t,n,!1),lr(e,t,o);r=t.stateNode,s4.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=po(t,e.child,null,o),t.child=po(t,null,s,o)):kt(e,t,s,o),t.memoizedState=r.state,i&&ov(t,n,!0),t.child}function hj(e){var t=e.stateNode;t.pendingContext?iv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&iv(e,t.context,!1),Wx(e,t.containerInfo)}function bv(e,t,n,r,i){return ho(),Bx(i),t.flags|=256,kt(e,t,n,r),t.child}var Rm={dehydrated:null,treeContext:null,retryLane:0};function Am(e){return{baseLanes:e,cachePool:null,transitions:null}}function pj(e,t,n){var r=t.pendingProps,i=qe.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Me(qe,i&1),e===null)return _m(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=lu(a,r,0,null),e=pi(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Am(n),t.memoizedState=Rm,e):Zx(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return l4(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=qr(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=qr(s,o):(o=pi(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?Am(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=Rm,r}return o=e.child,e=o.sibling,r=qr(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Zx(e,t){return t=lu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ks(e,t,n,r){return r!==null&&Bx(r),po(t,e.child,null,n),e=Zx(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function l4(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=_c(Error(H(422))),ks(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=lu({mode:"visible",children:r.children},i,0,null),o=pi(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&po(t,e.child,null,a),t.child.memoizedState=Am(a),t.memoizedState=Rm,o);if(!(t.mode&1))return ks(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(H(419)),r=_c(o,r,void 0),ks(e,t,a,r)}if(s=(a&e.childLanes)!==0,Mt||s){if(r=ot,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,sr(e,i),Cn(r,e,i,-1))}return oy(),r=_c(Error(H(421))),ks(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=b4.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Yt=Dr(i.nextSibling),Kt=t,Be=!0,kn=null,e!==null&&(on[an++]=Zn,on[an++]=er,on[an++]=yi,Zn=e.id,er=e.overflow,yi=t),t=Zx(t,r.children),t.flags|=4096,t)}function kv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Sm(e.return,t,n)}function Sc(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function gj(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(kt(e,t,r.children,n),r=qe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kv(e,n,t);else if(e.tag===19)kv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Me(qe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Sl(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Sc(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Sl(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Sc(t,!0,n,null,o);break;case"together":Sc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Qs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function lr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),wi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(H(153));if(t.child!==null){for(e=t.child,n=qr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=qr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function u4(e,t,n){switch(t.tag){case 3:hj(t),ho();break;case 5:q2(t);break;case 1:Ot(t.type)&&yl(t);break;case 4:Wx(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Me(bl,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Me(qe,qe.current&1),t.flags|=128,null):n&t.child.childLanes?pj(e,t,n):(Me(qe,qe.current&1),e=lr(e,t,n),e!==null?e.sibling:null);Me(qe,qe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return gj(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Me(qe,qe.current),r)break;return null;case 22:case 23:return t.lanes=0,dj(e,t,n)}return lr(e,t,n)}var mj,Lm,xj,yj;mj=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Lm=function(){};xj=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ci(qn.current);var o=null;switch(n){case"input":i=em(e,i),r=em(e,r),o=[];break;case"select":i=He({},i,{value:void 0}),r=He({},r,{value:void 0}),o=[];break;case"textarea":i=rm(e,i),r=rm(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ml)}om(n,r);var a;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var s=i[u];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ya.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(s=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ya.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Ne("scroll",e),o||s===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};yj=function(e,t,n,r){n!==r&&(t.flags|=4)};function Fo(e,t){if(!Be)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function gt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function c4(e,t,n){var r=t.pendingProps;switch(Ox(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gt(t),null;case 1:return Ot(t.type)&&xl(),gt(t),null;case 3:return r=t.stateNode,go(),De(Dt),De(vt),Gx(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ws(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,kn!==null&&(Fm(kn),kn=null))),Lm(e,t),gt(t),null;case 5:Vx(t);var i=ci(Ra.current);if(n=t.type,e!==null&&t.stateNode!=null)xj(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(H(166));return gt(t),null}if(e=ci(qn.current),ws(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[On]=t,r[Ta]=o,e=(t.mode&1)!==0,n){case"dialog":Ne("cancel",r),Ne("close",r);break;case"iframe":case"object":case"embed":Ne("load",r);break;case"video":case"audio":for(i=0;i<Qo.length;i++)Ne(Qo[i],r);break;case"source":Ne("error",r);break;case"img":case"image":case"link":Ne("error",r),Ne("load",r);break;case"details":Ne("toggle",r);break;case"input":A0(r,o),Ne("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Ne("invalid",r);break;case"textarea":P0(r,o),Ne("invalid",r)}om(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&vs(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&vs(r.textContent,s,e),i=["children",""+s]):ya.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&Ne("scroll",r)}switch(n){case"input":ds(r),L0(r,o,!0);break;case"textarea":ds(r),z0(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=ml)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=VC(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[On]=t,e[Ta]=r,mj(e,t,!1,!1),t.stateNode=e;e:{switch(a=am(n,r),n){case"dialog":Ne("cancel",e),Ne("close",e),i=r;break;case"iframe":case"object":case"embed":Ne("load",e),i=r;break;case"video":case"audio":for(i=0;i<Qo.length;i++)Ne(Qo[i],e);i=r;break;case"source":Ne("error",e),i=r;break;case"img":case"image":case"link":Ne("error",e),Ne("load",e),i=r;break;case"details":Ne("toggle",e),i=r;break;case"input":A0(e,r),i=em(e,r),Ne("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=He({},r,{value:void 0}),Ne("invalid",e);break;case"textarea":P0(e,r),i=rm(e,r),Ne("invalid",e);break;default:i=r}om(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="style"?KC(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&GC(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&va(e,l):typeof l=="number"&&va(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(ya.hasOwnProperty(o)?l!=null&&o==="onScroll"&&Ne("scroll",e):l!=null&&_x(e,o,l,a))}switch(n){case"input":ds(e),L0(e,r,!1);break;case"textarea":ds(e),z0(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ur(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?to(e,!!r.multiple,o,!1):r.defaultValue!=null&&to(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=ml)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return gt(t),null;case 6:if(e&&t.stateNode!=null)yj(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(H(166));if(n=ci(Ra.current),ci(qn.current),ws(t)){if(r=t.stateNode,n=t.memoizedProps,r[On]=t,(o=r.nodeValue!==n)&&(e=Kt,e!==null))switch(e.tag){case 3:vs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&vs(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[On]=t,t.stateNode=r}return gt(t),null;case 13:if(De(qe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Be&&Yt!==null&&t.mode&1&&!(t.flags&128))N2(),ho(),t.flags|=98560,o=!1;else if(o=ws(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(H(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(H(317));o[On]=t}else ho(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gt(t),o=!1}else kn!==null&&(Fm(kn),kn=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||qe.current&1?nt===0&&(nt=3):oy())),t.updateQueue!==null&&(t.flags|=4),gt(t),null);case 4:return go(),Lm(e,t),e===null&&ja(t.stateNode.containerInfo),gt(t),null;case 10:return $x(t.type._context),gt(t),null;case 17:return Ot(t.type)&&xl(),gt(t),null;case 19:if(De(qe),o=t.memoizedState,o===null)return gt(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)Fo(o,!1);else{if(nt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Sl(e),a!==null){for(t.flags|=128,Fo(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Me(qe,qe.current&1|2),t.child}e=e.sibling}o.tail!==null&&Ye()>xo&&(t.flags|=128,r=!0,Fo(o,!1),t.lanes=4194304)}else{if(!r)if(e=Sl(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fo(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Be)return gt(t),null}else 2*Ye()-o.renderingStartTime>xo&&n!==1073741824&&(t.flags|=128,r=!0,Fo(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Ye(),t.sibling=null,n=qe.current,Me(qe,r?n&1|2:n&1),t):(gt(t),null);case 22:case 23:return iy(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Vt&1073741824&&(gt(t),t.subtreeFlags&6&&(t.flags|=8192)):gt(t),null;case 24:return null;case 25:return null}throw Error(H(156,t.tag))}function d4(e,t){switch(Ox(t),t.tag){case 1:return Ot(t.type)&&xl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return go(),De(Dt),De(vt),Gx(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Vx(t),null;case 13:if(De(qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(H(340));ho()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return De(qe),null;case 4:return go(),null;case 10:return $x(t.type._context),null;case 22:case 23:return iy(),null;case 24:return null;default:return null}}var _s=!1,mt=!1,f4=typeof WeakSet=="function"?WeakSet:Set,X=null;function Zi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ve(e,t,r)}else n.current=null}function Pm(e,t,n){try{n()}catch(r){Ve(e,t,r)}}var _v=!1;function h4(e,t){if(mm=hl,e=_2(),Nx(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=a+i),f!==o||r!==0&&f.nodeType!==3||(l=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===i&&(s=a),h===o&&++d===r&&(l=a),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(xm={focusedElem:e,selectionRange:n},hl=!1,X=t;X!==null;)if(t=X,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,X=e;else for(;X!==null;){t=X;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,v=m.memoizedState,x=t.stateNode,y=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:wn(t.type,g),v);x.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(H(163))}}catch(k){Ve(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,X=e;break}X=t.return}return m=_v,_v=!1,m}function fa(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Pm(t,n,o)}i=i.next}while(i!==r)}}function au(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function zm(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function vj(e){var t=e.alternate;t!==null&&(e.alternate=null,vj(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[On],delete t[Ta],delete t[wm],delete t[K6],delete t[X6])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function wj(e){return e.tag===5||e.tag===3||e.tag===4}function Sv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wj(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.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 Mm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ml));else if(r!==4&&(e=e.child,e!==null))for(Mm(e,t,n),e=e.sibling;e!==null;)Mm(e,t,n),e=e.sibling}function Nm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Nm(e,t,n),e=e.sibling;e!==null;)Nm(e,t,n),e=e.sibling}var ct=null,bn=!1;function vr(e,t,n){for(n=n.child;n!==null;)bj(e,t,n),n=n.sibling}function bj(e,t,n){if(Fn&&typeof Fn.onCommitFiberUnmount=="function")try{Fn.onCommitFiberUnmount(Jl,n)}catch{}switch(n.tag){case 5:mt||Zi(n,t);case 6:var r=ct,i=bn;ct=null,vr(e,t,n),ct=r,bn=i,ct!==null&&(bn?(e=ct,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ct.removeChild(n.stateNode));break;case 18:ct!==null&&(bn?(e=ct,n=n.stateNode,e.nodeType===8?xc(e.parentNode,n):e.nodeType===1&&xc(e,n),_a(e)):xc(ct,n.stateNode));break;case 4:r=ct,i=bn,ct=n.stateNode.containerInfo,bn=!0,vr(e,t,n),ct=r,bn=i;break;case 0:case 11:case 14:case 15:if(!mt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&Pm(n,t,a),i=i.next}while(i!==r)}vr(e,t,n);break;case 1:if(!mt&&(Zi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Ve(n,t,s)}vr(e,t,n);break;case 21:vr(e,t,n);break;case 22:n.mode&1?(mt=(r=mt)||n.memoizedState!==null,vr(e,t,n),mt=r):vr(e,t,n);break;default:vr(e,t,n)}}function Cv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new f4),t.forEach(function(r){var i=k4.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function xn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:ct=s.stateNode,bn=!1;break e;case 3:ct=s.stateNode.containerInfo,bn=!0;break e;case 4:ct=s.stateNode.containerInfo,bn=!0;break e}s=s.return}if(ct===null)throw Error(H(160));bj(o,a,i),ct=null,bn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Ve(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)kj(t,e),t=t.sibling}function kj(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(xn(t,e),Pn(e),r&4){try{fa(3,e,e.return),au(3,e)}catch(g){Ve(e,e.return,g)}try{fa(5,e,e.return)}catch(g){Ve(e,e.return,g)}}break;case 1:xn(t,e),Pn(e),r&512&&n!==null&&Zi(n,n.return);break;case 5:if(xn(t,e),Pn(e),r&512&&n!==null&&Zi(n,n.return),e.flags&32){var i=e.stateNode;try{va(i,"")}catch(g){Ve(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&UC(i,o),am(s,a);var u=am(s,o);for(a=0;a<l.length;a+=2){var d=l[a],f=l[a+1];d==="style"?KC(i,f):d==="dangerouslySetInnerHTML"?GC(i,f):d==="children"?va(i,f):_x(i,d,f,u)}switch(s){case"input":tm(i,o);break;case"textarea":WC(i,o);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?to(i,!!o.multiple,p,!1):h!==!!o.multiple&&(o.defaultValue!=null?to(i,!!o.multiple,o.defaultValue,!0):to(i,!!o.multiple,o.multiple?[]:"",!1))}i[Ta]=o}catch(g){Ve(e,e.return,g)}}break;case 6:if(xn(t,e),Pn(e),r&4){if(e.stateNode===null)throw Error(H(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(g){Ve(e,e.return,g)}}break;case 3:if(xn(t,e),Pn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{_a(t.containerInfo)}catch(g){Ve(e,e.return,g)}break;case 4:xn(t,e),Pn(e);break;case 13:xn(t,e),Pn(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(ny=Ye())),r&4&&Cv(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(mt=(u=mt)||d,xn(t,e),mt=u):xn(t,e),Pn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(X=e,d=e.child;d!==null;){for(f=X=d;X!==null;){switch(h=X,p=h.child,h.tag){case 0:case 11:case 14:case 15:fa(4,h,h.return);break;case 1:Zi(h,h.return);var m=h.stateNode;if(typeof m.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){Ve(r,n,g)}}break;case 5:Zi(h,h.return);break;case 22:if(h.memoizedState!==null){Ev(f);continue}}p!==null?(p.return=h,X=p):Ev(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{i=f.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=f.stateNode,l=f.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=YC("display",a))}catch(g){Ve(e,e.return,g)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(g){Ve(e,e.return,g)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:xn(t,e),Pn(e),r&4&&Cv(e);break;case 21:break;default:xn(t,e),Pn(e)}}function Pn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(wj(n)){var r=n;break e}n=n.return}throw Error(H(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(va(i,""),r.flags&=-33);var o=Sv(e);Nm(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=Sv(e);Mm(e,s,a);break;default:throw Error(H(161))}}catch(l){Ve(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function p4(e,t,n){X=e,_j(e)}function _j(e,t,n){for(var r=(e.mode&1)!==0;X!==null;){var i=X,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||_s;if(!a){var s=i.alternate,l=s!==null&&s.memoizedState!==null||mt;s=_s;var u=mt;if(_s=a,(mt=l)&&!u)for(X=i;X!==null;)a=X,l=a.child,a.tag===22&&a.memoizedState!==null?Tv(i):l!==null?(l.return=a,X=l):Tv(i);for(;o!==null;)X=o,_j(o),o=o.sibling;X=i,_s=s,mt=u}jv(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,X=o):jv(e)}}function jv(e){for(;X!==null;){var t=X;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:mt||au(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!mt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:wn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&cv(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}cv(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&_a(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(H(163))}mt||t.flags&512&&zm(t)}catch(h){Ve(t,t.return,h)}}if(t===e){X=null;break}if(n=t.sibling,n!==null){n.return=t.return,X=n;break}X=t.return}}function Ev(e){for(;X!==null;){var t=X;if(t===e){X=null;break}var n=t.sibling;if(n!==null){n.return=t.return,X=n;break}X=t.return}}function Tv(e){for(;X!==null;){var t=X;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{au(4,t)}catch(l){Ve(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Ve(t,i,l)}}var o=t.return;try{zm(t)}catch(l){Ve(t,o,l)}break;case 5:var a=t.return;try{zm(t)}catch(l){Ve(t,a,l)}}}catch(l){Ve(t,t.return,l)}if(t===e){X=null;break}var s=t.sibling;if(s!==null){s.return=t.return,X=s;break}X=t.return}}var g4=Math.ceil,El=dr.ReactCurrentDispatcher,ey=dr.ReactCurrentOwner,un=dr.ReactCurrentBatchConfig,_e=0,ot=null,Je=null,dt=0,Vt=0,eo=Xr(0),nt=0,za=null,wi=0,su=0,ty=0,ha=null,zt=null,ny=0,xo=1/0,Xn=null,Tl=!1,Dm=null,Br=null,Ss=!1,Ar=null,Il=0,pa=0,Om=null,Js=-1,Zs=0;function Et(){return _e&6?Ye():Js!==-1?Js:Js=Ye()}function Fr(e){return e.mode&1?_e&2&&dt!==0?dt&-dt:J6.transition!==null?(Zs===0&&(Zs=s2()),Zs):(e=Te,e!==0||(e=window.event,e=e===void 0?16:p2(e.type)),e):1}function Cn(e,t,n,r){if(50<pa)throw pa=0,Om=null,Error(H(185));Va(e,n,r),(!(_e&2)||e!==ot)&&(e===ot&&(!(_e&2)&&(su|=n),nt===4&&Er(e,dt)),Bt(e,r),n===1&&_e===0&&!(t.mode&1)&&(xo=Ye()+500,ru&&Qr()))}function Bt(e,t){var n=e.callbackNode;JR(e,t);var r=fl(e,e===ot?dt:0);if(r===0)n!==null&&D0(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&D0(n),t===1)e.tag===0?Q6(Iv.bind(null,e)):P2(Iv.bind(null,e)),G6(function(){!(_e&6)&&Qr()}),n=null;else{switch(l2(r)){case 1:n=Tx;break;case 4:n=o2;break;case 16:n=dl;break;case 536870912:n=a2;break;default:n=dl}n=Aj(n,Sj.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Sj(e,t){if(Js=-1,Zs=0,_e&6)throw Error(H(327));var n=e.callbackNode;if(ao()&&e.callbackNode!==n)return null;var r=fl(e,e===ot?dt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Rl(e,r);else{t=r;var i=_e;_e|=2;var o=jj();(ot!==e||dt!==t)&&(Xn=null,xo=Ye()+500,hi(e,t));do try{y4();break}catch(s){Cj(e,s)}while(!0);qx(),El.current=o,_e=i,Je!==null?t=0:(ot=null,dt=0,t=nt)}if(t!==0){if(t===2&&(i=dm(e),i!==0&&(r=i,t=Bm(e,i))),t===1)throw n=za,hi(e,0),Er(e,r),Bt(e,Ye()),n;if(t===6)Er(e,r);else{if(i=e.current.alternate,!(r&30)&&!m4(i)&&(t=Rl(e,r),t===2&&(o=dm(e),o!==0&&(r=o,t=Bm(e,o))),t===1))throw n=za,hi(e,0),Er(e,r),Bt(e,Ye()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(H(345));case 2:oi(e,zt,Xn);break;case 3:if(Er(e,r),(r&130023424)===r&&(t=ny+500-Ye(),10<t)){if(fl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Et(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=vm(oi.bind(null,e,zt,Xn),t);break}oi(e,zt,Xn);break;case 4:if(Er(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-Sn(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=Ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*g4(r/1960))-r,10<r){e.timeoutHandle=vm(oi.bind(null,e,zt,Xn),r);break}oi(e,zt,Xn);break;case 5:oi(e,zt,Xn);break;default:throw Error(H(329))}}}return Bt(e,Ye()),e.callbackNode===n?Sj.bind(null,e):null}function Bm(e,t){var n=ha;return e.current.memoizedState.isDehydrated&&(hi(e,t).flags|=256),e=Rl(e,t),e!==2&&(t=zt,zt=n,t!==null&&Fm(t)),e}function Fm(e){zt===null?zt=e:zt.push.apply(zt,e)}function m4(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!En(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Er(e,t){for(t&=~ty,t&=~su,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Sn(t),r=1<<n;e[n]=-1,t&=~r}}function Iv(e){if(_e&6)throw Error(H(327));ao();var t=fl(e,0);if(!(t&1))return Bt(e,Ye()),null;var n=Rl(e,t);if(e.tag!==0&&n===2){var r=dm(e);r!==0&&(t=r,n=Bm(e,r))}if(n===1)throw n=za,hi(e,0),Er(e,t),Bt(e,Ye()),n;if(n===6)throw Error(H(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,oi(e,zt,Xn),Bt(e,Ye()),null}function ry(e,t){var n=_e;_e|=1;try{return e(t)}finally{_e=n,_e===0&&(xo=Ye()+500,ru&&Qr())}}function bi(e){Ar!==null&&Ar.tag===0&&!(_e&6)&&ao();var t=_e;_e|=1;var n=un.transition,r=Te;try{if(un.transition=null,Te=1,e)return e()}finally{Te=r,un.transition=n,_e=t,!(_e&6)&&Qr()}}function iy(){Vt=eo.current,De(eo)}function hi(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,V6(n)),Je!==null)for(n=Je.return;n!==null;){var r=n;switch(Ox(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&xl();break;case 3:go(),De(Dt),De(vt),Gx();break;case 5:Vx(r);break;case 4:go();break;case 13:De(qe);break;case 19:De(qe);break;case 10:$x(r.type._context);break;case 22:case 23:iy()}n=n.return}if(ot=e,Je=e=qr(e.current,null),dt=Vt=t,nt=0,za=null,ty=su=wi=0,zt=ha=null,ui!==null){for(t=0;t<ui.length;t++)if(n=ui[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}ui=null}return e}function Cj(e,t){do{var n=Je;try{if(qx(),Ks.current=jl,Cl){for(var r=$e.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Cl=!1}if(vi=0,it=tt=$e=null,da=!1,Aa=0,ey.current=null,n===null||n.return===null){nt=1,za=t,Je=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=dt,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=s,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=mv(a);if(p!==null){p.flags&=-257,xv(p,a,s,o,t),p.mode&1&&gv(o,u,t),t=p,l=u;var m=t.updateQueue;if(m===null){var g=new Set;g.add(l),t.updateQueue=g}else m.add(l);break e}else{if(!(t&1)){gv(o,u,t),oy();break e}l=Error(H(426))}}else if(Be&&s.mode&1){var v=mv(a);if(v!==null){!(v.flags&65536)&&(v.flags|=256),xv(v,a,s,o,t),Bx(mo(l,s));break e}}o=l=mo(l,s),nt!==4&&(nt=2),ha===null?ha=[o]:ha.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var x=lj(o,l,t);uv(o,x);break e;case 1:s=l;var y=o.type,w=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(Br===null||!Br.has(w)))){o.flags|=65536,t&=-t,o.lanes|=t;var k=uj(o,s,t);uv(o,k);break e}}o=o.return}while(o!==null)}Tj(n)}catch(E){t=E,Je===n&&n!==null&&(Je=n=n.return);continue}break}while(!0)}function jj(){var e=El.current;return El.current=jl,e===null?jl:e}function oy(){(nt===0||nt===3||nt===2)&&(nt=4),ot===null||!(wi&268435455)&&!(su&268435455)||Er(ot,dt)}function Rl(e,t){var n=_e;_e|=2;var r=jj();(ot!==e||dt!==t)&&(Xn=null,hi(e,t));do try{x4();break}catch(i){Cj(e,i)}while(!0);if(qx(),_e=n,El.current=r,Je!==null)throw Error(H(261));return ot=null,dt=0,nt}function x4(){for(;Je!==null;)Ej(Je)}function y4(){for(;Je!==null&&!HR();)Ej(Je)}function Ej(e){var t=Rj(e.alternate,e,Vt);e.memoizedProps=e.pendingProps,t===null?Tj(e):Je=t,ey.current=null}function Tj(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=d4(n,t),n!==null){n.flags&=32767,Je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{nt=6,Je=null;return}}else if(n=c4(n,t,Vt),n!==null){Je=n;return}if(t=t.sibling,t!==null){Je=t;return}Je=t=e}while(t!==null);nt===0&&(nt=5)}function oi(e,t,n){var r=Te,i=un.transition;try{un.transition=null,Te=1,v4(e,t,n,r)}finally{un.transition=i,Te=r}return null}function v4(e,t,n,r){do ao();while(Ar!==null);if(_e&6)throw Error(H(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(H(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(ZR(e,o),e===ot&&(Je=ot=null,dt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Ss||(Ss=!0,Aj(dl,function(){return ao(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=un.transition,un.transition=null;var a=Te;Te=1;var s=_e;_e|=4,ey.current=null,h4(e,n),kj(n,e),B6(xm),hl=!!mm,xm=mm=null,e.current=n,p4(n),UR(),_e=s,Te=a,un.transition=o}else e.current=n;if(Ss&&(Ss=!1,Ar=e,Il=i),o=e.pendingLanes,o===0&&(Br=null),GR(n.stateNode),Bt(e,Ye()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Tl)throw Tl=!1,e=Dm,Dm=null,e;return Il&1&&e.tag!==0&&ao(),o=e.pendingLanes,o&1?e===Om?pa++:(pa=0,Om=e):pa=0,Qr(),null}function ao(){if(Ar!==null){var e=l2(Il),t=un.transition,n=Te;try{if(un.transition=null,Te=16>e?16:e,Ar===null)var r=!1;else{if(e=Ar,Ar=null,Il=0,_e&6)throw Error(H(331));var i=_e;for(_e|=4,X=e.current;X!==null;){var o=X,a=o.child;if(X.flags&16){var s=o.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(X=u;X!==null;){var d=X;switch(d.tag){case 0:case 11:case 15:fa(8,d,o)}var f=d.child;if(f!==null)f.return=d,X=f;else for(;X!==null;){d=X;var h=d.sibling,p=d.return;if(vj(d),d===u){X=null;break}if(h!==null){h.return=p,X=h;break}X=p}}}var m=o.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(g!==null)}}X=o}}if(o.subtreeFlags&2064&&a!==null)a.return=o,X=a;else e:for(;X!==null;){if(o=X,o.flags&2048)switch(o.tag){case 0:case 11:case 15:fa(9,o,o.return)}var x=o.sibling;if(x!==null){x.return=o.return,X=x;break e}X=o.return}}var y=e.current;for(X=y;X!==null;){a=X;var w=a.child;if(a.subtreeFlags&2064&&w!==null)w.return=a,X=w;else e:for(a=y;X!==null;){if(s=X,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:au(9,s)}}catch(E){Ve(s,s.return,E)}if(s===a){X=null;break e}var k=s.sibling;if(k!==null){k.return=s.return,X=k;break e}X=s.return}}if(_e=i,Qr(),Fn&&typeof Fn.onPostCommitFiberRoot=="function")try{Fn.onPostCommitFiberRoot(Jl,e)}catch{}r=!0}return r}finally{Te=n,un.transition=t}}return!1}function Rv(e,t,n){t=mo(n,t),t=lj(e,t,1),e=Or(e,t,1),t=Et(),e!==null&&(Va(e,1,t),Bt(e,t))}function Ve(e,t,n){if(e.tag===3)Rv(e,e,n);else for(;t!==null;){if(t.tag===3){Rv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Br===null||!Br.has(r))){e=mo(n,e),e=uj(t,e,1),t=Or(t,e,1),e=Et(),t!==null&&(Va(t,1,e),Bt(t,e));break}}t=t.return}}function w4(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Et(),e.pingedLanes|=e.suspendedLanes&n,ot===e&&(dt&n)===n&&(nt===4||nt===3&&(dt&130023424)===dt&&500>Ye()-ny?hi(e,0):ty|=n),Bt(e,t)}function Ij(e,t){t===0&&(e.mode&1?(t=ps,ps<<=1,!(ps&130023424)&&(ps=4194304)):t=1);var n=Et();e=sr(e,t),e!==null&&(Va(e,t,n),Bt(e,n))}function b4(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ij(e,n)}function k4(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(H(314))}r!==null&&r.delete(t),Ij(e,n)}var Rj;Rj=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Dt.current)Mt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Mt=!1,u4(e,t,n);Mt=!!(e.flags&131072)}else Mt=!1,Be&&t.flags&1048576&&z2(t,wl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qs(e,t),e=t.pendingProps;var i=fo(t,vt.current);oo(t,n),i=Kx(null,t,r,e,i,n);var o=Xx();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ot(r)?(o=!0,yl(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ux(t),i.updater=ou,t.stateNode=i,i._reactInternals=t,jm(t,r,e,n),t=Im(null,t,r,!0,o,n)):(t.tag=0,Be&&o&&Dx(t),kt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qs(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=S4(r),e=wn(r,e),i){case 0:t=Tm(null,t,r,e,n);break e;case 1:t=wv(null,t,r,e,n);break e;case 11:t=yv(null,t,r,e,n);break e;case 14:t=vv(null,t,r,wn(r.type,e),n);break e}throw Error(H(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wn(r,i),Tm(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wn(r,i),wv(e,t,r,i,n);case 3:e:{if(hj(t),e===null)throw Error(H(387));r=t.pendingProps,o=t.memoizedState,i=o.element,F2(e,t),_l(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=mo(Error(H(423)),t),t=bv(e,t,r,n,i);break e}else if(r!==i){i=mo(Error(H(424)),t),t=bv(e,t,r,n,i);break e}else for(Yt=Dr(t.stateNode.containerInfo.firstChild),Kt=t,Be=!0,kn=null,n=O2(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ho(),r===i){t=lr(e,t,n);break e}kt(e,t,r,n)}t=t.child}return t;case 5:return q2(t),e===null&&_m(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,ym(r,i)?a=null:o!==null&&ym(r,o)&&(t.flags|=32),fj(e,t),kt(e,t,a,n),t.child;case 6:return e===null&&_m(t),null;case 13:return pj(e,t,n);case 4:return Wx(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=po(t,null,r,n):kt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wn(r,i),yv(e,t,r,i,n);case 7:return kt(e,t,t.pendingProps,n),t.child;case 8:return kt(e,t,t.pendingProps.children,n),t.child;case 12:return kt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Me(bl,r._currentValue),r._currentValue=a,o!==null)if(En(o.value,a)){if(o.children===i.children&&!Dt.current){t=lr(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=ir(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Sm(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(H(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Sm(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}kt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,oo(t,n),i=cn(i),r=r(i),t.flags|=1,kt(e,t,r,n),t.child;case 14:return r=t.type,i=wn(r,t.pendingProps),i=wn(r.type,i),vv(e,t,r,i,n);case 15:return cj(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:wn(r,i),Qs(e,t),t.tag=1,Ot(r)?(e=!0,yl(t)):e=!1,oo(t,n),sj(t,r,i),jm(t,r,i,n),Im(null,t,r,!0,e,n);case 19:return gj(e,t,n);case 22:return dj(e,t,n)}throw Error(H(156,t.tag))};function Aj(e,t){return i2(e,t)}function _4(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,t,n,r){return new _4(e,t,n,r)}function ay(e){return e=e.prototype,!(!e||!e.isReactComponent)}function S4(e){if(typeof e=="function")return ay(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Cx)return 11;if(e===jx)return 14}return 2}function qr(e,t){var n=e.alternate;return n===null?(n=ln(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function el(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")ay(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ui:return pi(n.children,i,o,t);case Sx:a=8,i|=8;break;case Xg:return e=ln(12,n,t,i|2),e.elementType=Xg,e.lanes=o,e;case Qg:return e=ln(13,n,t,i),e.elementType=Qg,e.lanes=o,e;case Jg:return e=ln(19,n,t,i),e.elementType=Jg,e.lanes=o,e;case qC:return lu(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case BC:a=10;break e;case FC:a=9;break e;case Cx:a=11;break e;case jx:a=14;break e;case _r:a=16,r=null;break e}throw Error(H(130,e==null?e:typeof e,""))}return t=ln(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function pi(e,t,n,r){return e=ln(7,e,r,t),e.lanes=n,e}function lu(e,t,n,r){return e=ln(22,e,r,t),e.elementType=qC,e.lanes=n,e.stateNode={isHidden:!1},e}function Cc(e,t,n){return e=ln(6,e,null,t),e.lanes=n,e}function jc(e,t,n){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function C4(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ac(0),this.expirationTimes=ac(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ac(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function sy(e,t,n,r,i,o,a,s,l){return e=new C4(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ln(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ux(o),e}function j4(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Hi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Lj(e){if(!e)return Wr;e=e._reactInternals;e:{if(ji(e)!==e||e.tag!==1)throw Error(H(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ot(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(H(171))}if(e.tag===1){var n=e.type;if(Ot(n))return L2(e,n,t)}return t}function Pj(e,t,n,r,i,o,a,s,l){return e=sy(n,r,!0,e,i,o,a,s,l),e.context=Lj(null),n=e.current,r=Et(),i=Fr(n),o=ir(r,i),o.callback=t??null,Or(n,o,i),e.current.lanes=i,Va(e,i,r),Bt(e,r),e}function uu(e,t,n,r){var i=t.current,o=Et(),a=Fr(i);return n=Lj(n),t.context===null?t.context=n:t.pendingContext=n,t=ir(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Or(i,t,a),e!==null&&(Cn(e,i,a,o),Ys(e,i,a)),a}function Al(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Av(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ly(e,t){Av(e,t),(e=e.alternate)&&Av(e,t)}function E4(){return null}var zj=typeof reportError=="function"?reportError:function(e){console.error(e)};function uy(e){this._internalRoot=e}cu.prototype.render=uy.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(H(409));uu(e,t,null,null)};cu.prototype.unmount=uy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;bi(function(){uu(null,e,null,null)}),t[ar]=null}};function cu(e){this._internalRoot=e}cu.prototype.unstable_scheduleHydration=function(e){if(e){var t=d2();e={blockedOn:null,target:e,priority:t};for(var n=0;n<jr.length&&t!==0&&t<jr[n].priority;n++);jr.splice(n,0,e),n===0&&h2(e)}};function cy(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function du(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Lv(){}function T4(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=Al(a);o.call(u)}}var a=Pj(t,r,e,0,null,!1,!1,"",Lv);return e._reactRootContainer=a,e[ar]=a.current,ja(e.nodeType===8?e.parentNode:e),bi(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var u=Al(l);s.call(u)}}var l=sy(e,0,!1,null,null,!1,!1,"",Lv);return e._reactRootContainer=l,e[ar]=l.current,ja(e.nodeType===8?e.parentNode:e),bi(function(){uu(t,l,n,r)}),l}function fu(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var l=Al(a);s.call(l)}}uu(t,a,e,i)}else a=T4(n,t,e,i,r);return Al(a)}u2=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Xo(t.pendingLanes);n!==0&&(Ix(t,n|1),Bt(t,Ye()),!(_e&6)&&(xo=Ye()+500,Qr()))}break;case 13:bi(function(){var r=sr(e,1);if(r!==null){var i=Et();Cn(r,e,1,i)}}),ly(e,1)}};Rx=function(e){if(e.tag===13){var t=sr(e,134217728);if(t!==null){var n=Et();Cn(t,e,134217728,n)}ly(e,134217728)}};c2=function(e){if(e.tag===13){var t=Fr(e),n=sr(e,t);if(n!==null){var r=Et();Cn(n,e,t,r)}ly(e,t)}};d2=function(){return Te};f2=function(e,t){var n=Te;try{return Te=e,t()}finally{Te=n}};lm=function(e,t,n){switch(t){case"input":if(tm(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=nu(r);if(!i)throw Error(H(90));HC(r),tm(r,i)}}}break;case"textarea":WC(e,n);break;case"select":t=n.value,t!=null&&to(e,!!n.multiple,t,!1)}};JC=ry;ZC=bi;var I4={usingClientEntryPoint:!1,Events:[Ya,Yi,nu,XC,QC,ry]},qo={findFiberByHostInstance:li,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},R4={bundleType:qo.bundleType,version:qo.version,rendererPackageName:qo.rendererPackageName,rendererConfig:qo.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:dr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=n2(e),e===null?null:e.stateNode},findFiberByHostInstance:qo.findFiberByHostInstance||E4,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Cs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Cs.isDisabled&&Cs.supportsFiber)try{Jl=Cs.inject(R4),Fn=Cs}catch{}}Zt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I4;Zt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!cy(t))throw Error(H(200));return j4(e,t,null,n)};Zt.createRoot=function(e,t){if(!cy(e))throw Error(H(299));var n=!1,r="",i=zj;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=sy(e,1,!1,null,null,n,!1,r,i),e[ar]=t.current,ja(e.nodeType===8?e.parentNode:e),new uy(t)};Zt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(H(188)):(e=Object.keys(e).join(","),Error(H(268,e)));return e=n2(t),e=e===null?null:e.stateNode,e};Zt.flushSync=function(e){return bi(e)};Zt.hydrate=function(e,t,n){if(!du(t))throw Error(H(200));return fu(null,e,t,!0,n)};Zt.hydrateRoot=function(e,t,n){if(!cy(e))throw Error(H(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=zj;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Pj(t,null,e,1,n??null,i,!1,o,a),e[ar]=t.current,ja(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new cu(t)};Zt.render=function(e,t,n){if(!du(t))throw Error(H(200));return fu(null,e,t,!1,n)};Zt.unmountComponentAtNode=function(e){if(!du(e))throw Error(H(40));return e._reactRootContainer?(bi(function(){fu(null,null,e,!1,function(){e._reactRootContainer=null,e[ar]=null})}),!0):!1};Zt.unstable_batchedUpdates=ry;Zt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!du(n))throw Error(H(200));if(e==null||e._reactInternals===void 0)throw Error(H(38));return fu(e,t,n,!1,r)};Zt.version="18.3.1-next-f1338f8080-20240426";function Mj(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mj)}catch(e){console.error(e)}}Mj(),MC.exports=Zt;var A4=MC.exports,Pv=A4;Yg.createRoot=Pv.createRoot,Yg.hydrateRoot=Pv.hydrateRoot;/**
 * @remix-run/router v1.23.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Ma(){return Ma=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ma.apply(this,arguments)}var Lr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Lr||(Lr={}));const zv="popstate";function L4(e){e===void 0&&(e={});function t(i,o){let{pathname:a="/",search:s="",hash:l=""}=Ei(i.location.hash.substr(1));return!a.startsWith("/")&&!a.startsWith(".")&&(a="/"+a),qm("",{pathname:a,search:s,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(i,o){let a=i.document.querySelector("base"),s="";if(a&&a.getAttribute("href")){let l=i.location.href,u=l.indexOf("#");s=u===-1?l:l.slice(0,u)}return s+"#"+(typeof o=="string"?o:Ll(o))}function r(i,o){hu(i.pathname.charAt(0)==="/","relative pathnames are not supported in hash history.push("+JSON.stringify(o)+")")}return z4(t,n,r,e)}function Ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function hu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function P4(){return Math.random().toString(36).substr(2,8)}function Mv(e,t){return{usr:e.state,key:e.key,idx:t}}function qm(e,t,n,r){return n===void 0&&(n=null),Ma({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ei(t):t,{state:n,key:t&&t.key||r||P4()})}function Ll(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ei(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function z4(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=Lr.Pop,l=null,u=d();u==null&&(u=0,a.replaceState(Ma({},a.state,{idx:u}),""));function d(){return(a.state||{idx:null}).idx}function f(){s=Lr.Pop;let v=d(),x=v==null?null:v-u;u=v,l&&l({action:s,location:g.location,delta:x})}function h(v,x){s=Lr.Push;let y=qm(g.location,v,x);n&&n(y,v),u=d()+1;let w=Mv(y,u),k=g.createHref(y);try{a.pushState(w,"",k)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(k)}o&&l&&l({action:s,location:g.location,delta:1})}function p(v,x){s=Lr.Replace;let y=qm(g.location,v,x);n&&n(y,v),u=d();let w=Mv(y,u),k=g.createHref(y);a.replaceState(w,"",k),o&&l&&l({action:s,location:g.location,delta:0})}function m(v){let x=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof v=="string"?v:Ll(v);return y=y.replace(/ $/,"%20"),Ke(x,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,x)}let g={get action(){return s},get location(){return e(i,a)},listen(v){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(zv,f),l=v,()=>{i.removeEventListener(zv,f),l=null}},createHref(v){return t(i,v)},createURL:m,encodeLocation(v){let x=m(v);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:h,replace:p,go(v){return a.go(v)}};return g}var Nv;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Nv||(Nv={}));function M4(e,t,n){return n===void 0&&(n="/"),N4(e,t,n)}function N4(e,t,n,r){let i=typeof t=="string"?Ei(t):t,o=dy(i.pathname||"/",n);if(o==null)return null;let a=Nj(e);D4(a);let s=null;for(let l=0;s==null&&l<a.length;++l){let u=K4(o);s=V4(a[l],u)}return s}function Nj(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(o,a,s)=>{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(Ke(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=$r([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(Ke(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Nj(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:U4(u,o.index),routesMeta:d})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of Dj(o.path))i(o,a,l)}),t}function Dj(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=Dj(r.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function D4(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:W4(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const O4=/^:[\w-]+$/,B4=3,F4=2,q4=1,$4=10,H4=-2,Dv=e=>e==="*";function U4(e,t){let n=e.split("/"),r=n.length;return n.some(Dv)&&(r+=H4),t&&(r+=F4),n.filter(i=>!Dv(i)).reduce((i,o)=>i+(O4.test(o)?B4:o===""?q4:$4),r)}function W4(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function V4(e,t,n){let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s<r.length;++s){let l=r[s],u=s===r.length-1,d=o==="/"?t:t.slice(o.length)||"/",f=G4({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),h=l.route;if(!f)return null;Object.assign(i,f.params),a.push({params:i,pathname:$r([o,f.pathname]),pathnameBase:eA($r([o,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(o=$r([o,f.pathnameBase]))}return a}function G4(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Y4(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((u,d,f)=>{let{paramName:h,isOptional:p}=d;if(h==="*"){let g=s[f]||"";a=o.slice(0,o.length-g.length).replace(/(.)\/+$/,"$1")}const m=s[f];return p&&!m?u[h]=void 0:u[h]=(m||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:a,pattern:e}}function Y4(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),hu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function K4(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return hu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function dy(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const X4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Q4=e=>X4.test(e);function J4(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ei(e):e,o;if(n)if(Q4(n))o=n;else{if(n.includes("//")){let a=n;n=n.replace(/\/\/+/g,"/"),hu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(a+" -> "+n))}n.startsWith("/")?o=Ov(n.substring(1),"/"):o=Ov(n,t)}else o=t;return{pathname:o,search:tA(r),hash:nA(i)}}function Ov(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Ec(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Z4(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function fy(e,t){let n=Z4(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function hy(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Ei(e):(i=Ma({},e),Ke(!i.pathname||!i.pathname.includes("?"),Ec("?","pathname","search",i)),Ke(!i.pathname||!i.pathname.includes("#"),Ec("#","pathname","hash",i)),Ke(!i.search||!i.search.includes("#"),Ec("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?t[f]:"/"}let l=J4(i,s),u=a&&a!=="/"&&a.endsWith("/"),d=(o||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}const $r=e=>e.join("/").replace(/\/\/+/g,"/"),eA=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),tA=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nA=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function rA(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Oj=["post","put","patch","delete"];new Set(Oj);const iA=["get",...Oj];new Set(iA);/**
 * React Router v6.30.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Na(){return Na=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Na.apply(this,arguments)}const py=T.createContext(null),oA=T.createContext(null),Jr=T.createContext(null),pu=T.createContext(null),Zr=T.createContext({outlet:null,matches:[],isDataRoute:!1}),Bj=T.createContext(null);function aA(e,t){let{relative:n}=t===void 0?{}:t;So()||Ke(!1);let{basename:r,navigator:i}=T.useContext(Jr),{hash:o,pathname:a,search:s}=$j(e,{relative:n}),l=a;return r!=="/"&&(l=a==="/"?r:$r([r,a])),i.createHref({pathname:l,search:s,hash:o})}function So(){return T.useContext(pu)!=null}function Co(){return So()||Ke(!1),T.useContext(pu).location}function Fj(e){T.useContext(Jr).static||T.useLayoutEffect(e)}function qj(){let{isDataRoute:e}=T.useContext(Zr);return e?vA():sA()}function sA(){So()||Ke(!1);let e=T.useContext(py),{basename:t,future:n,navigator:r}=T.useContext(Jr),{matches:i}=T.useContext(Zr),{pathname:o}=Co(),a=JSON.stringify(fy(i,n.v7_relativeSplatPath)),s=T.useRef(!1);return Fj(()=>{s.current=!0}),T.useCallback(function(u,d){if(d===void 0&&(d={}),!s.current)return;if(typeof u=="number"){r.go(u);return}let f=hy(u,JSON.parse(a),o,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:$r([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,a,o,e])}function $j(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=T.useContext(Jr),{matches:i}=T.useContext(Zr),{pathname:o}=Co(),a=JSON.stringify(fy(i,r.v7_relativeSplatPath));return T.useMemo(()=>hy(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function lA(e,t){return uA(e,t)}function uA(e,t,n,r){So()||Ke(!1);let{navigator:i}=T.useContext(Jr),{matches:o}=T.useContext(Zr),a=o[o.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let u=Co(),d;if(t){var f;let v=typeof t=="string"?Ei(t):t;l==="/"||(f=v.pathname)!=null&&f.startsWith(l)||Ke(!1),d=v}else d=u;let h=d.pathname||"/",p=h;if(l!=="/"){let v=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(v.length).join("/")}let m=M4(e,{pathname:p}),g=pA(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:$r([l,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:$r([l,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n,r);return t&&g?T.createElement(pu.Provider,{value:{location:Na({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Lr.Pop}},g):g}function cA(){let e=yA(),t=rA(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},t),n?T.createElement("pre",{style:i},n):null,null)}const dA=T.createElement(cA,null);class fA extends T.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?T.createElement(Zr.Provider,{value:this.props.routeContext},T.createElement(Bj.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function hA(e){let{routeContext:t,match:n,children:r}=e,i=T.useContext(py);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),T.createElement(Zr.Provider,{value:t},r)}function pA(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let d=a.findIndex(f=>f.route.id&&(s==null?void 0:s[f.route.id])!==void 0);d>=0||Ke(!1),a=a.slice(0,Math.min(a.length,d+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<a.length;d++){let f=a[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:h,errors:p}=n,m=f.route.loader&&h[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||m){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((d,f,h)=>{let p,m=!1,g=null,v=null;n&&(p=s&&f.route.id?s[f.route.id]:void 0,g=f.route.errorElement||dA,l&&(u<0&&h===0?(wA("route-fallback"),m=!0,v=null):u===h&&(m=!0,v=f.route.hydrateFallbackElement||null)));let x=t.concat(a.slice(0,h+1)),y=()=>{let w;return p?w=g:m?w=v:f.route.Component?w=T.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=d,T.createElement(hA,{match:f,routeContext:{outlet:d,matches:x,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?T.createElement(fA,{location:n.location,revalidation:n.revalidation,component:g,error:p,children:y(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):y()},null)}var Hj=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Hj||{}),Uj=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Uj||{});function gA(e){let t=T.useContext(py);return t||Ke(!1),t}function mA(e){let t=T.useContext(oA);return t||Ke(!1),t}function xA(e){let t=T.useContext(Zr);return t||Ke(!1),t}function Wj(e){let t=xA(),n=t.matches[t.matches.length-1];return n.route.id||Ke(!1),n.route.id}function yA(){var e;let t=T.useContext(Bj),n=mA(),r=Wj();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function vA(){let{router:e}=gA(Hj.UseNavigateStable),t=Wj(Uj.UseNavigateStable),n=T.useRef(!1);return Fj(()=>{n.current=!0}),T.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Na({fromRouteId:t},o)))},[e,t])}const Bv={};function wA(e,t,n){Bv[e]||(Bv[e]=!0)}function bA(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function kA(e){let{to:t,replace:n,state:r,relative:i}=e;So()||Ke(!1);let{future:o,static:a}=T.useContext(Jr),{matches:s}=T.useContext(Zr),{pathname:l}=Co(),u=qj(),d=hy(t,fy(s,o.v7_relativeSplatPath),l,i==="path"),f=JSON.stringify(d);return T.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:i}),[u,f,i,n,r]),null}function yn(e){Ke(!1)}function _A(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Lr.Pop,navigator:o,static:a=!1,future:s}=e;So()&&Ke(!1);let l=t.replace(/^\/*/,"/"),u=T.useMemo(()=>({basename:l,navigator:o,static:a,future:Na({v7_relativeSplatPath:!1},s)}),[l,s,o,a]);typeof r=="string"&&(r=Ei(r));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:m="default"}=r,g=T.useMemo(()=>{let v=dy(d,l);return v==null?null:{location:{pathname:v,search:f,hash:h,state:p,key:m},navigationType:i}},[l,d,f,h,p,m,i]);return g==null?null:T.createElement(Jr.Provider,{value:u},T.createElement(pu.Provider,{children:n,value:g}))}function Fv(e){let{children:t,location:n}=e;return lA($m(t),n)}new Promise(()=>{});function $m(e,t){t===void 0&&(t=[]);let n=[];return T.Children.forEach(e,(r,i)=>{if(!T.isValidElement(r))return;let o=[...t,i];if(r.type===T.Fragment){n.push.apply(n,$m(r.props.children,o));return}r.type!==yn&&Ke(!1),!r.props.index||!r.props.children||Ke(!1);let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=$m(r.props.children,o)),n.push(a)}),n}/**
 * React Router DOM v6.30.2
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Hm(){return Hm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hm.apply(this,arguments)}function SA(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function CA(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function jA(e,t){return e.button===0&&(!t||t==="_self")&&!CA(e)}const EA=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],TA="6";try{window.__reactRouterVersion=TA}catch{}const IA="startTransition",qv=wR[IA];function RA(e){let{basename:t,children:n,future:r,window:i}=e,o=T.useRef();o.current==null&&(o.current=L4({window:i,v5Compat:!0}));let a=o.current,[s,l]=T.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},d=T.useCallback(f=>{u&&qv?qv(()=>l(f)):l(f)},[l,u]);return T.useLayoutEffect(()=>a.listen(d),[a,d]),T.useEffect(()=>bA(r),[r]),T.createElement(_A,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const AA=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",LA=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Vj=T.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:l,to:u,preventScrollReset:d,viewTransition:f}=t,h=SA(t,EA),{basename:p}=T.useContext(Jr),m,g=!1;if(typeof u=="string"&&LA.test(u)&&(m=u,AA))try{let w=new URL(window.location.href),k=u.startsWith("//")?new URL(w.protocol+u):new URL(u),E=dy(k.pathname,p);k.origin===w.origin&&E!=null?u=E+k.search+k.hash:g=!0}catch{}let v=aA(u,{relative:i}),x=PA(u,{replace:a,state:s,target:l,preventScrollReset:d,relative:i,viewTransition:f});function y(w){r&&r(w),w.defaultPrevented||x(w)}return T.createElement("a",Hm({},h,{href:m||v,onClick:g||o?r:y,ref:n,target:l}))});var $v;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})($v||($v={}));var Hv;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Hv||(Hv={}));function PA(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:s}=t===void 0?{}:t,l=qj(),u=Co(),d=$j(e,{relative:a});return T.useCallback(f=>{if(jA(f,n)){f.preventDefault();let h=r!==void 0?r:Ll(u)===Ll(d);l(e,{replace:h,state:i,preventScrollReset:o,relative:a,viewTransition:s})}},[u,l,d,r,i,n,e,o,a,s])}function zA(e={}){const{graphUrl:t=MA(),gitHistoryUrl:n,roadmapUrl:r,enableSSE:i=!1,sseUrl:o="/api/events",pollInterval:a=0}=e,[s,l]=T.useState(null),[u,d]=T.useState([]),[f,h]=T.useState([]),[p,m]=T.useState(!0),[g,v]=T.useState(null),[x,y]=T.useState(null),w=T.useCallback(async()=>{try{const j=await fetch(t);if(!j.ok)throw new Error(`Failed to fetch graph: ${j.status} ${j.statusText}`);const b=await j.json(),A=b.data??b;if(b.ok===!1&&b.error)throw new Error(b.error);l(A),y(new Date),v(null)}catch(j){const b=j instanceof Error?j.message:"Failed to load graph data";v(b),console.error("Graph fetch error:",j)}},[t]),k=T.useCallback(async()=>{var j;if(console.log("[useGraphData] fetchGitHistory called, url:",n),!n){console.log("[useGraphData] No gitHistoryUrl, skipping");return}try{const b=await fetch(n);if(console.log("[useGraphData] Git history response:",b.status,b.ok),b.ok){const A=await b.json();console.log("[useGraphData] Git history JSON:",A==null?void 0:A.ok,"data length:",((j=A==null?void 0:A.data)==null?void 0:j.length)??(A==null?void 0:A.length));const _=A.data??A;Array.isArray(_)?(console.log("[useGraphData] Setting gitHistory with",_.length,"commits"),d(_)):console.log("[useGraphData] Data is not an array:",typeof _)}else console.log("[useGraphData] Response not ok:",b.status)}catch(b){console.warn("[useGraphData] Could not load git history:",b)}},[n]),E=T.useCallback(async()=>{if(r)try{const j=await fetch(r);if(j.ok){const b=await j.json(),A=b.data??b;h(A)}}catch(j){console.warn("Could not load roadmap items:",j)}},[r]),C=T.useCallback(async()=>{m(!0),await Promise.all([w(),k(),E()]),m(!1)},[w,k,E]);return T.useEffect(()=>{let j=!0;return(async()=>{m(!0),await Promise.all([w(),k(),E()]),j&&m(!1)})(),()=>{j=!1}},[w,k,E]),T.useEffect(()=>{if(!i)return;let j=null,b=null;const A=()=>{try{j=new EventSource(o),j.onmessage=_=>{(_.data==="refresh"||_.data==="update")&&w()},j.onerror=()=>{j==null||j.close(),b=setTimeout(A,5e3)},j.onopen=()=>{console.log("SSE connected for live updates")}}catch(_){console.warn("SSE not available:",_)}};return A(),()=>{j==null||j.close(),b&&clearTimeout(b)}},[i,o,w]),T.useEffect(()=>{if(a<=0)return;const j=setInterval(()=>{w()},a);return()=>clearInterval(j)},[a,w]),{graphData:s,gitHistory:u,roadmapItems:f,loading:p,error:g,lastUpdated:x,refresh:C}}function MA(){return"./graph-data.json"}const Uv=["goal","decision","option","action","outcome","observation","revisit"];function Vr(e){if(!e)return null;try{return JSON.parse(e)}catch{return null}}function Gr(e){const t=Vr(e.metadata_json);return(t==null?void 0:t.confidence)??null}function _t(e){const t=Vr(e.metadata_json);return(t==null?void 0:t.commit)??null}function gy(e){const t=Vr(e.metadata_json);return(t==null?void 0:t.branch)??null}function Da(e){const t=Vr(e.metadata_json);return(t==null?void 0:t.prompt)??null}function NA(e){const t=Vr(e.metadata_json);return(t==null?void 0:t.files)??null}function DA(e){const t=new Set;for(const n of e){const r=gy(n);r&&t.add(r)}return Array.from(t).sort()}function my(e){return e?e.slice(0,7):null}function OA(e){return e===null?null:e>=70?"high":e>=40?"med":"low"}const xy="notactuallytreyanastasio/deciduous";function BA(e){var t,n;return((n=(t=e==null?void 0:e.config)==null?void 0:t.github)==null?void 0:n.commit_repo)??xy}function Gj(e,t=xy){return`https://github.com/${t}/commit/${e}`}function Ee(e,t){return e?e.length>t?e.substring(0,t)+"...":e:""}function FA(e,t){const n=new Date(t).getTime()-new Date(e).getTime(),r=Math.floor(n/6e4);if(r<60)return`${r}m`;const i=Math.floor(r/60);return i<24?`${i}h ${r%60}m`:`${Math.floor(i/24)}d ${i%24}h`}const Wv=4*60*60*1e3;function qA(e,t){const n=new Map,r=new Map;return e.forEach(i=>{n.set(i.id,[]),r.set(i.id,[])}),t.forEach(i=>{var o,a;(o=n.get(i.from_node_id))==null||o.push({to:i.to_node_id,edge:i}),(a=r.get(i.to_node_id))==null||a.push({from:i.from_node_id,edge:i})}),{outgoing:n,incoming:r}}function $A(e){const{nodes:t,edges:n}=e,{outgoing:r,incoming:i}=qA(t,n),o=new Set,a=[],s=t.filter(u=>{var d;return u.node_type==="goal"||(((d=i.get(u.id))==null?void 0:d.length)??0)===0}).sort((u,d)=>u.node_type==="goal"&&d.node_type!=="goal"?-1:d.node_type==="goal"&&u.node_type!=="goal"?1:new Date(u.created_at).getTime()-new Date(d.created_at).getTime());function l(u){var h,p;if(o.has(u))return null;const d={root:null,nodes:[],edges:[]},f=[u];for(;f.length>0;){const m=f.shift();if(o.has(m))continue;o.add(m);const g=t.find(v=>v.id===m);g&&(d.nodes.push(g),d.root||(d.root=g)),(h=r.get(m))==null||h.forEach(({to:v,edge:x})=>{o.has(v)||(f.push(v),d.edges.push(x))}),(p=i.get(m))==null||p.forEach(({from:v,edge:x})=>{o.has(v)||(f.push(v),d.edges.some(y=>y.id===x.id)||d.edges.push(x))})}return d.nodes.sort((m,g)=>new Date(m.created_at).getTime()-new Date(g.created_at).getTime()),d.nodes.length>0?d:null}return s.forEach(u=>{const d=l(u.id);d&&a.push(d)}),t.forEach(u=>{if(!o.has(u.id)){const d=l(u.id);d&&a.push(d)}}),a.sort((u,d)=>new Date(d.nodes[0].created_at).getTime()-new Date(u.nodes[0].created_at).getTime()),a}function HA(e,t){const n=[...e].sort((o,a)=>new Date(o.created_at).getTime()-new Date(a.created_at).getTime()),r=[];let i=null;return n.forEach(o=>{const a=new Date(o.created_at).getTime();!i||a-i.endTime>Wv?(i={startTime:a,endTime:a,nodes:[o],chains:[]},r.push(i)):(i.endTime=a,i.nodes.push(o))}),t.forEach(o=>{const a=new Date(o.nodes[0].created_at).getTime(),s=r.find(l=>a>=l.startTime&&a<=l.endTime+Wv);s&&s.chains.push(o)}),r.reverse(),r}function UA(e,t){const{nodes:n,edges:r}=t,i=[],o=new Set;let a=e;for(;a!==null&&!o.has(a);){o.add(a);const s=n.find(u=>u.id===a);s&&i.unshift(s);const l=r.find(u=>u.to_node_id===a);a=l?l.from_node_id:null}return i}function WA(e,t){const n=[],r=new Map(t.map(o=>[o.hash,o])),i=new Map(t.map(o=>[o.short_hash,o]));return e.forEach(o=>{const a=_t(o),s=[];if(a){const l=r.get(a)||i.get(a.slice(0,7));l&&s.push(l)}n.push({type:"node",timestamp:new Date(o.created_at),node:o,linkedCommits:s})}),t.forEach(o=>{const a=e.filter(s=>{const l=_t(s);return l===o.hash||(l==null?void 0:l.slice(0,7))===o.short_hash});n.push({type:"commit",timestamp:new Date(o.date),commit:o,linkedNodes:a})}),n.sort((o,a)=>a.timestamp.getTime()-o.timestamp.getTime()),n}function VA(e,t,n){const r={};let i=0;return e.nodes.forEach(o=>{r[o.node_type]=(r[o.node_type]||0)+1,_t(o)&&i++}),{nodeCount:e.nodes.length,edgeCount:e.edges.length,chainCount:t.length,sessionCount:n.length,linkedCommitCount:i,nodesByType:r}}function GA(e){return T.useMemo(()=>{if(!e)return{chains:[],sessions:[],stats:{nodeCount:0,edgeCount:0,chainCount:0,sessionCount:0,linkedCommitCount:0,nodesByType:{}}};const t=$A(e),n=HA(e.nodes,t),r=VA(e,t,n);return{chains:t,sessions:n,stats:r}},[e])}const YA=[{id:"story",label:"Story",path:"/story"},{id:"dag",label:"DAG",path:"/"},{id:"log",label:"Log",path:"/log"},{id:"chains",label:"Chains",path:"/chains"},{id:"timeline",label:"Timeline",path:"/timeline"},{id:"graph",label:"Graph",path:"/graph"},{id:"roadmap",label:"Roadmap",path:"/roadmap"}],KA=({children:e,stats:t,lastUpdated:n,branches:r,selectedBranch:i,onBranchChange:o})=>{const a=Co(),l=(()=>{const u=a.pathname;return u==="/story"?"story":u==="/log"?"log":u==="/chains"?"chains":u==="/timeline"?"timeline":u==="/graph"?"graph":u==="/roadmap"?"roadmap":"dag"})();return c.jsxs("div",{style:Ce.container,children:[c.jsx("header",{style:Ce.header,children:c.jsxs("div",{style:Ce.headerContent,children:[c.jsxs("div",{children:[c.jsx("h1",{style:Ce.title,children:"Deciduous"}),c.jsx("p",{style:Ce.subtitle,children:"Decision Graph Viewer"})]}),c.jsx("nav",{style:Ce.nav,children:YA.map(u=>c.jsx(Vj,{to:u.path,style:{...Ce.tab,...l===u.id?Ce.tabActive:{}},children:u.label},u.id))}),c.jsx("div",{style:Ce.navLinks,children:c.jsx("a",{href:"https://github.com/notactuallytreyanastasio/losselot",target:"_blank",rel:"noopener noreferrer",style:Ce.link,children:"GitHub"})})]})}),t&&c.jsxs("div",{style:Ce.statsBar,children:[c.jsxs("div",{style:Ce.stat,children:[c.jsx("div",{style:Ce.statNum,children:t.nodeCount}),c.jsx("div",{style:Ce.statLabel,children:"Nodes"})]}),c.jsxs("div",{style:Ce.stat,children:[c.jsx("div",{style:Ce.statNum,children:t.edgeCount}),c.jsx("div",{style:Ce.statLabel,children:"Edges"})]}),c.jsxs("div",{style:Ce.stat,children:[c.jsx("div",{style:Ce.statNum,children:t.chainCount}),c.jsx("div",{style:Ce.statLabel,children:"Chains"})]}),c.jsxs("div",{style:Ce.stat,children:[c.jsx("div",{style:Ce.statNum,children:t.sessionCount}),c.jsx("div",{style:Ce.statLabel,children:"Sessions"})]}),t.linkedCommitCount>0&&c.jsxs("div",{style:Ce.stat,children:[c.jsx("div",{style:Ce.statNum,children:t.linkedCommitCount}),c.jsx("div",{style:Ce.statLabel,children:"Commits"})]}),r&&r.length>0&&c.jsx("div",{style:{...Ce.stat,marginLeft:"auto"},children:c.jsxs("select",{value:i||"",onChange:u=>o==null?void 0:o(u.target.value||null),style:Ce.branchSelect,children:[c.jsx("option",{value:"",children:"All branches"}),r.map(u=>c.jsx("option",{value:u,children:u},u))]})}),n&&c.jsx("div",{style:{...Ce.stat,marginLeft:r!=null&&r.length?"10px":"auto"},children:c.jsxs("div",{style:{...Ce.statLabel,fontSize:"10px"},children:["Updated ",n.toLocaleTimeString()]})})]}),c.jsx("main",{style:Ce.main,children:e})]})},Ce={container:{minHeight:"100vh",backgroundColor:"#ffffff",color:"#24292f",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif"},header:{backgroundColor:"#f6f8fa",borderBottom:"1px solid #d0d7de",padding:"0 20px"},headerContent:{display:"flex",alignItems:"center",gap:"30px",maxWidth:"1800px",margin:"0 auto",padding:"15px 0"},title:{fontSize:"20px",margin:0,color:"#24292f",fontWeight:700},subtitle:{fontSize:"12px",color:"#57606a",margin:"4px 0 0 0"},nav:{display:"flex",gap:"4px",flex:1},tab:{padding:"10px 20px",fontSize:"13px",color:"#57606a",textDecoration:"none",borderRadius:"6px 6px 0 0",backgroundColor:"transparent",transition:"all 0.2s"},tabActive:{backgroundColor:"#ffffff",color:"#0969da",fontWeight:600},navLinks:{display:"flex",gap:"15px"},link:{color:"#57606a",textDecoration:"none",fontSize:"13px"},statsBar:{display:"flex",gap:"20px",padding:"12px 20px",backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",margin:"15px",borderRadius:"8px",maxWidth:"1800px",marginLeft:"auto",marginRight:"auto"},stat:{textAlign:"center",minWidth:"60px"},statNum:{fontSize:"20px",fontWeight:"bold",color:"#0969da"},statLabel:{fontSize:"10px",color:"#57606a",textTransform:"uppercase"},branchSelect:{backgroundColor:"#ffffff",color:"#24292f",border:"1px solid #d0d7de",borderRadius:"4px",padding:"6px 10px",fontSize:"12px",cursor:"pointer",minWidth:"120px"},main:{height:"calc(100vh - 140px)",maxWidth:"1800px",margin:"0 auto",padding:"0 15px"}},yy={goal:"#22c55e",decision:"#eab308",option:"#06b6d4",action:"#ef4444",outcome:"#a855f7",observation:"#6b7280",revisit:"#f97316"};function me(e){return yy[e]||"#6b7280"}const XA={leads_to:"#3b82f6",requires:"#8b5cf6",chosen:"#22c55e",rejected:"#ef4444",blocks:"#f97316",enables:"#06b6d4"};function QA(e){return XA[e]||"#6b7280"}const JA={high:{bg:"#22c55e33",text:"#4ade80"},med:{bg:"#eab30833",text:"#fbbf24"},low:{bg:"#ef444433",text:"#f87171"}};function ZA(e){return e?JA[e]:null}const xt=({type:e,size:t="md"})=>{const n=me(e),r=["goal","decision","option"].includes(e),i={fontSize:t==="sm"?"9px":"10px",textTransform:"uppercase",padding:t==="sm"?"2px 5px":"2px 6px",borderRadius:"3px",display:"inline-block",backgroundColor:n,color:r?"#000":"#fff",fontWeight:500};return c.jsx("span",{style:i,children:e})},Xa=({confidence:e})=>{if(e==null)return null;const t=OA(e),n=ZA(t);if(!n)return null;const r={fontSize:"10px",padding:"2px 6px",borderRadius:"10px",fontWeight:600,backgroundColor:n.bg,color:n.text};return c.jsxs("span",{style:r,children:[e,"%"]})},ki=({commit:e,repo:t=xy})=>{if(!e)return null;const n=my(e),r=Gj(e,t),i={fontSize:"10px",padding:"2px 6px",borderRadius:"4px",fontWeight:500,fontFamily:"monospace",backgroundColor:"#ddf4ff",color:"#0969da",textDecoration:"none",transition:"all 0.2s"};return c.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",style:i,title:`View commit ${n}`,onMouseOver:o=>{o.currentTarget.style.backgroundColor="#b6e3ff",o.currentTarget.style.color="#0550ae"},onMouseOut:o=>{o.currentTarget.style.backgroundColor="#ddf4ff",o.currentTarget.style.color="#0969da"},children:n})},Pl=({type:e})=>{const t=e==="chosen",n=e==="rejected",r={fontSize:"10px",padding:"2px 6px",borderRadius:"3px",backgroundColor:t?"#dafbe1":n?"#ffebe9":"#f6f8fa",color:t?"#1a7f37":n?"#cf222e":"#57606a",border:`1px solid ${t?"#1a7f37":n?"#cf222e":"#d0d7de"}`};return c.jsx("span",{style:r,children:e})},eL=({node:e,repo:t})=>{const n=Gr(e),r=_t(e);return c.jsxs("span",{style:{display:"inline-flex",gap:"6px",alignItems:"center"},children:[c.jsx(xt,{type:e.node_type}),c.jsx(Xa,{confidence:n}),c.jsx(ki,{commit:r,repo:t})]})},tL=({status:e})=>{const t={pending:{bg:"#f6f8fa",text:"#57606a",border:"#d0d7de"},active:{bg:"#ddf4ff",text:"#0969da",border:"#54aeff"},completed:{bg:"#dafbe1",text:"#1a7f37",border:"#4ac26b"},rejected:{bg:"#ffebe9",text:"#cf222e",border:"#ff8182"}},n=t[e]||t.pending,r={fontSize:"10px",padding:"2px 6px",borderRadius:"10px",backgroundColor:n.bg,color:n.text,border:`1px solid ${n.border}`};return c.jsx("span",{style:r,children:e})};function nL(e,t){return!e||t.length===0?null:t.find(n=>n.hash===e||n.short_hash===e)??null}const gu=({node:e,graphData:t,onSelectNode:n,onClose:r,repo:i,gitHistory:o=[]})=>{const a=i??BA(t);if(!e)return c.jsx("div",{style:ue.panel,children:c.jsxs("div",{style:ue.empty,children:[c.jsxs("svg",{width:"64",height:"64",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",style:{opacity:.3},children:[c.jsx("circle",{cx:"12",cy:"12",r:"10"}),c.jsx("path",{d:"M12 6v6l4 2"})]}),c.jsx("p",{style:{marginTop:"20px"},children:"Select a node to see details"})]})});const s=t.edges.filter(g=>g.to_node_id===e.id),l=t.edges.filter(g=>g.from_node_id===e.id),u=Da(e),d=NA(e),f=gy(e),h=_t(e),p=nL(h,o),m=g=>{const v=t.nodes.find(x=>x.id===g);return(v==null?void 0:v.title)||"Unknown"};return c.jsxs("div",{style:ue.panel,children:[r&&c.jsx("button",{onClick:r,style:ue.closeButton,children:"×"}),c.jsxs("div",{style:ue.header,children:[c.jsx(eL,{node:e,repo:i}),c.jsx("h2",{style:ue.title,children:e.title}),c.jsxs("div",{style:ue.meta,children:[c.jsxs("span",{children:["ID: ",e.id]}),c.jsx("span",{children:c.jsx(tL,{status:e.status})}),c.jsxs("span",{children:["Created: ",new Date(e.created_at).toLocaleDateString()]})]})]}),e.description&&c.jsx("div",{style:ue.description,children:e.description}),u&&c.jsxs("div",{style:ue.section,children:[c.jsx("h3",{style:ue.sectionTitle,children:"Prompt"}),c.jsx("div",{style:ue.prompt,children:u})]}),d&&d.length>0&&c.jsxs("div",{style:ue.section,children:[c.jsx("h3",{style:ue.sectionTitle,children:"Associated Files"}),c.jsx("div",{style:ue.fileList,children:d.map((g,v)=>c.jsx("span",{style:ue.fileTag,children:g},v))})]}),f&&c.jsxs("div",{style:ue.section,children:[c.jsx("h3",{style:ue.sectionTitle,children:"Branch"}),c.jsx("span",{style:ue.branchTag,children:f})]}),h&&c.jsxs("div",{style:ue.section,children:[c.jsx("h3",{style:ue.sectionTitle,children:"Linked Commit"}),c.jsxs("div",{style:ue.commitSection,children:[c.jsx("a",{href:Gj(h,a),target:"_blank",rel:"noopener noreferrer",style:ue.commitHash,children:my(h)}),p&&c.jsxs(c.Fragment,{children:[c.jsx("div",{style:ue.commitMessage,children:p.message}),c.jsxs("div",{style:ue.commitMeta,children:["by ",p.author," · ",new Date(p.date).toLocaleDateString(),p.files_changed&&` · ${p.files_changed} files`]})]})]})]}),s.length>0&&c.jsxs("div",{style:ue.section,children:[c.jsxs("h3",{style:ue.sectionTitle,children:["Incoming (",s.length,")"]}),s.map(g=>c.jsxs("div",{style:ue.connection,onClick:()=>n(g.from_node_id),children:[c.jsxs("div",{style:ue.connectionHeader,children:[c.jsx(Pl,{type:g.edge_type}),c.jsx("span",{style:ue.arrow,children:"←"}),c.jsx("span",{style:ue.connectionTitle,children:m(g.from_node_id)})]}),g.rationale&&c.jsx("div",{style:ue.connectionRationale,children:g.rationale})]},g.id))]}),l.length>0&&c.jsxs("div",{style:ue.section,children:[c.jsxs("h3",{style:ue.sectionTitle,children:["Outgoing (",l.length,")"]}),l.map(g=>c.jsxs("div",{style:ue.connection,onClick:()=>n(g.to_node_id),children:[c.jsxs("div",{style:ue.connectionHeader,children:[c.jsx(Pl,{type:g.edge_type}),c.jsx("span",{style:ue.arrow,children:"→"}),c.jsx("span",{style:ue.connectionTitle,children:m(g.to_node_id)})]}),g.rationale&&c.jsx("div",{style:ue.connectionRationale,children:g.rationale})]},g.id))]}),c.jsxs("div",{style:ue.navLinks,children:[c.jsx("a",{href:"../decision-graph",style:ue.link,children:"Learn about the graph →"}),c.jsx("a",{href:"../claude-tooling",style:ue.link,children:"See the tooling →"})]})]})},ue={panel:{padding:"25px",height:"100%",overflowY:"auto",backgroundColor:"#ffffff",position:"relative"},empty:{textAlign:"center",color:"#6e7781",paddingTop:"80px"},closeButton:{position:"absolute",top:"15px",right:"15px",width:"30px",height:"30px",border:"none",background:"#f6f8fa",color:"#57606a",borderRadius:"4px",fontSize:"20px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},header:{marginBottom:"20px"},title:{fontSize:"24px",margin:"12px 0 8px 0",color:"#24292f"},meta:{display:"flex",gap:"20px",fontSize:"14px",color:"#57606a",flexWrap:"wrap"},description:{backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",padding:"20px",borderRadius:"8px",marginBottom:"20px",lineHeight:1.6,color:"#24292f"},section:{marginTop:"20px"},sectionTitle:{fontSize:"16px",marginBottom:"12px",color:"#57606a"},connection:{padding:"12px",backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",borderRadius:"6px",marginBottom:"8px",cursor:"pointer",transition:"background-color 0.2s"},connectionHeader:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"},connectionTitle:{color:"#24292f",fontSize:"13px",flex:1,minWidth:0},connectionRationale:{color:"#57606a",fontSize:"12px",marginTop:"8px",paddingTop:"8px",borderTop:"1px solid #d0d7de",lineHeight:1.4},arrow:{color:"#6e7781",flexShrink:0},navLinks:{marginTop:"20px",paddingTop:"20px",borderTop:"1px solid #d0d7de"},link:{color:"#0969da",textDecoration:"none",marginRight:"20px",fontSize:"13px"},prompt:{backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",padding:"15px",borderRadius:"6px",fontSize:"14px",color:"#24292f",lineHeight:1.6,whiteSpace:"pre-wrap",fontStyle:"italic",borderLeft:"3px solid #0969da"},fileList:{display:"flex",flexWrap:"wrap",gap:"8px"},fileTag:{backgroundColor:"#ddf4ff",padding:"4px 10px",borderRadius:"4px",fontSize:"12px",color:"#0969da",fontFamily:"monospace"},branchTag:{backgroundColor:"#dafbe1",color:"#1a7f37",padding:"4px 10px",borderRadius:"4px",fontSize:"12px",fontFamily:"monospace"},commitSection:{backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",padding:"15px",borderRadius:"6px",borderLeft:"3px solid #0969da"},commitHash:{fontFamily:"monospace",fontSize:"13px",color:"#0969da",textDecoration:"none",backgroundColor:"#ddf4ff",padding:"3px 8px",borderRadius:"4px"},commitMessage:{fontSize:"14px",color:"#24292f",marginTop:"10px",lineHeight:1.5,whiteSpace:"pre-wrap"},commitMeta:{fontSize:"12px",color:"#57606a",marginTop:"8px"}};function rL(e,t){if(!e||t.length===0)return null;const n=t.find(r=>r.hash===e||r.short_hash===e);return(n==null?void 0:n.message)??null}const iL=({graphData:e,chains:t,sessions:n,gitHistory:r=[]})=>{const[i,o]=T.useState("chains"),[a,s]=T.useState(null),[l,u]=T.useState(null),d=a!==null?t[a]:null,f=T.useMemo(()=>{if(!d)return new Map;const g=new Map;return d.edges.forEach(v=>g.set(v.to_node_id,v)),g},[d]),h=g=>{s(g),u(null)},p=g=>{const v=e.nodes.find(x=>x.id===g);v&&(u(v),s(null))},m=g=>{const v=e.nodes.find(x=>x.id===g);v&&u(v)};return c.jsxs("div",{style:ne.container,children:[c.jsxs("div",{style:ne.sidebar,children:[c.jsx("div",{style:ne.viewToggle,children:["chains","sessions","all"].map(g=>c.jsx("button",{onClick:()=>o(g),style:{...ne.viewBtn,...i===g?ne.viewBtnActive:{}},children:g==="all"?"All Nodes":g.charAt(0).toUpperCase()+g.slice(1)},g))}),c.jsxs("div",{style:ne.sidebarContent,children:[i==="chains"&&c.jsx(oL,{chains:t,selectedIndex:a,onSelect:h}),i==="sessions"&&c.jsx(aL,{sessions:n,chains:t,selectedChainIndex:a,onSelectChain:h}),i==="all"&&c.jsx(sL,{nodes:e.nodes,selectedNode:l,onSelect:p})]})]}),c.jsx("div",{style:ne.detailPanel,children:d&&!l?c.jsx(lL,{chain:d,edgeMap:f,selectedNode:l,onSelectNode:m,gitHistory:r}):c.jsx(gu,{node:l,graphData:e,onSelectNode:p,gitHistory:r})})]})},oL=({chains:e,selectedIndex:t,onSelect:n})=>c.jsx("div",{style:ne.nodeList,children:e.map((r,i)=>{const o=[...new Set(r.nodes.map(s=>s.node_type))],a=t===i;return c.jsxs("div",{onClick:()=>n(i),style:{...ne.chainItem,...a?ne.chainItemSelected:{}},children:[c.jsxs("div",{style:ne.chainSummary,children:[c.jsx(xt,{type:r.root.node_type,size:"sm"}),c.jsx("span",{style:ne.chainTitle,children:Ee(r.root.title,40)})]}),c.jsxs("div",{style:ne.chainStats,children:[r.nodes.length," nodes · ",r.edges.length," edges"]}),c.jsx("div",{style:ne.chainTypes,children:o.map(s=>c.jsx("span",{style:{...ne.chainTypeDot,backgroundColor:me(s)},title:s},s))})]},i)})}),aL=({sessions:e,chains:t,selectedChainIndex:n,onSelectChain:r})=>{const[i,o]=T.useState(new Set),a=s=>{o(l=>{const u=new Set(l);return u.has(s)?u.delete(s):u.add(s),u})};return c.jsx("div",{children:e.map((s,l)=>{const u=new Date(s.startTime),d=u.toLocaleDateString("en-US",{month:"short",day:"numeric"}),f=u.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"}),h=i.has(l);return c.jsxs("div",{style:ne.sessionGroup,children:[c.jsxs("div",{onClick:()=>a(l),style:{...ne.sessionHeader,...h?ne.sessionHeaderExpanded:{}},children:[c.jsx("span",{style:{...ne.sessionToggle,transform:h?"rotate(90deg)":"none"},children:"▶"}),c.jsxs("span",{style:ne.sessionTitle,children:[d," @ ",f]}),c.jsxs("span",{style:ne.sessionCount,children:[s.nodes.length," nodes"]})]}),h&&c.jsx("div",{style:ne.chainList,children:s.chains.length>0?s.chains.map(p=>{const m=t.indexOf(p),g=[...new Set(p.nodes.map(v=>v.node_type))];return c.jsxs("div",{onClick:()=>r(m),style:{...ne.chainItem,...n===m?ne.chainItemSelected:{}},children:[c.jsxs("div",{style:ne.chainSummary,children:[c.jsx(xt,{type:p.root.node_type,size:"sm"}),c.jsx("span",{style:ne.chainTitle,children:Ee(p.root.title,35)})]}),c.jsxs("div",{style:ne.chainStats,children:[p.nodes.length," nodes · ",p.edges.length," edges"]}),c.jsx("div",{style:ne.chainTypes,children:g.map(v=>c.jsx("span",{style:{...ne.chainTypeDot,backgroundColor:me(v)},title:v},v))})]},m)}):c.jsx("div",{style:{color:"#666",fontSize:"12px",padding:"10px"},children:"No complete chains in this session"})})]},l)})})},sL=({nodes:e,selectedNode:t,onSelect:n})=>c.jsx("div",{style:ne.nodeList,children:e.map(r=>c.jsxs("div",{onClick:()=>n(r.id),style:{...ne.nodeItem,...(t==null?void 0:t.id)===r.id?ne.nodeItemSelected:{}},children:[c.jsx(xt,{type:r.node_type}),c.jsx("div",{style:ne.nodeTitle,children:r.title})]},r.id))}),lL=({chain:e,edgeMap:t,selectedNode:n,onSelectNode:r,gitHistory:i})=>{const o=FA(e.nodes[0].created_at,e.nodes[e.nodes.length-1].created_at);return c.jsxs("div",{style:ne.chainFlow,children:[c.jsxs("div",{style:ne.chainFlowHeader,children:[c.jsx(xt,{type:e.root.node_type}),c.jsx("h2",{style:ne.chainFlowTitle,children:e.root.title}),c.jsxs("div",{style:ne.chainFlowMeta,children:[e.nodes.length," nodes · ",e.edges.length," connections · ",o]})]}),c.jsx("div",{style:ne.flowTimeline,children:e.nodes.map(a=>{const s=t.get(a.id),l=(n==null?void 0:n.id)===a.id,u=new Date(a.created_at).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"}),d=Gr(a),f=_t(a),h=rL(f,i);return c.jsxs(wx.Fragment,{children:[(s==null?void 0:s.rationale)&&c.jsxs("div",{style:ne.flowEdgeLabel,children:["↳ ",s.rationale]}),c.jsxs("div",{onClick:()=>r(a.id),style:{...ne.flowNode,borderColor:l?"#0969da":"#d0d7de",backgroundColor:l?"#ddf4ff":"#ffffff"},children:[c.jsx("div",{style:{...ne.flowNodeMarker,backgroundColor:me(a.node_type),borderColor:me(a.node_type)}}),c.jsxs("div",{style:ne.flowNodeHeader,children:[c.jsx(xt,{type:a.node_type,size:"sm"}),c.jsx(Xa,{confidence:d}),c.jsx(ki,{commit:f}),c.jsx("span",{style:ne.flowNodeTitle,children:a.title}),c.jsx("span",{style:ne.flowNodeTime,children:u})]}),h&&c.jsxs("div",{style:ne.commitMessage,children:[c.jsx("span",{style:ne.commitIcon,children:"📝"})," ",h]}),a.description&&c.jsx("div",{style:ne.flowNodeDesc,children:a.description})]})]},a.id)})}),c.jsxs("div",{style:ne.navLinks,children:[c.jsx("a",{href:"../decision-graph",style:ne.link,children:"Learn about the graph →"}),c.jsx("a",{href:"../claude-tooling",style:ne.link,children:"See the tooling →"})]})]})},ne={container:{display:"flex",height:"100%",gap:"0"},sidebar:{width:"380px",backgroundColor:"#f6f8fa",borderRight:"1px solid #d0d7de",display:"flex",flexDirection:"column",flexShrink:0},viewToggle:{display:"flex",padding:"10px",gap:"5px",borderBottom:"1px solid #d0d7de"},viewBtn:{flex:1,padding:"8px",border:"1px solid #d0d7de",backgroundColor:"#ffffff",color:"#57606a",borderRadius:"4px",cursor:"pointer",fontSize:"12px"},viewBtnActive:{backgroundColor:"#0969da",color:"#ffffff",borderColor:"#0969da"},sidebarContent:{flex:1,overflowY:"auto"},nodeList:{padding:"10px"},chainItem:{padding:"10px 12px",margin:"4px 0",backgroundColor:"#ffffff",border:"1px solid #d0d7de",borderRadius:"6px",cursor:"pointer",borderLeft:"3px solid transparent"},chainItemSelected:{borderLeftColor:"#0969da",backgroundColor:"#ddf4ff"},chainSummary:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"4px"},chainTitle:{fontSize:"13px",flex:1,color:"#24292f"},chainStats:{fontSize:"10px",color:"#6e7781"},chainTypes:{display:"flex",gap:"3px",marginTop:"6px"},chainTypeDot:{width:"8px",height:"8px",borderRadius:"50%"},sessionGroup:{borderBottom:"1px solid #d0d7de"},sessionHeader:{padding:"12px 15px",backgroundColor:"#ffffff",cursor:"pointer",display:"flex",alignItems:"center",gap:"10px"},sessionHeaderExpanded:{},sessionToggle:{width:"16px",height:"16px",display:"flex",alignItems:"center",justifyContent:"center",color:"#6e7781",transition:"transform 0.2s"},sessionTitle:{flex:1,fontSize:"13px",fontWeight:600,color:"#24292f"},sessionCount:{fontSize:"11px",color:"#57606a",backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",padding:"2px 8px",borderRadius:"10px"},chainList:{padding:"5px 10px 10px"},nodeItem:{padding:"12px",marginBottom:"8px",backgroundColor:"#ffffff",border:"1px solid #d0d7de",borderRadius:"6px",cursor:"pointer",borderLeft:"4px solid transparent"},nodeItemSelected:{borderLeftColor:"#0969da",backgroundColor:"#ddf4ff"},nodeTitle:{fontSize:"14px",lineHeight:1.4,marginTop:"6px",color:"#24292f"},detailPanel:{flex:1,overflowY:"auto",backgroundColor:"#ffffff"},chainFlow:{maxWidth:"700px",padding:"25px"},chainFlowHeader:{marginBottom:"25px"},chainFlowTitle:{fontSize:"20px",marginTop:"8px",marginBottom:"8px",color:"#24292f"},chainFlowMeta:{fontSize:"12px",color:"#6e7781"},flowTimeline:{position:"relative",paddingLeft:"30px"},flowEdgeLabel:{fontSize:"11px",color:"#1a7f37",margin:"-10px 0 10px 0",paddingLeft:"5px",fontWeight:500},flowNode:{position:"relative",marginBottom:"20px",padding:"15px",backgroundColor:"#ffffff",borderRadius:"8px",border:"1px solid #d0d7de",cursor:"pointer",transition:"all 0.2s"},flowNodeMarker:{position:"absolute",left:"-26px",top:"20px",width:"12px",height:"12px",borderRadius:"50%",border:"2px solid"},flowNodeHeader:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"8px",flexWrap:"wrap"},flowNodeTitle:{fontSize:"14px",fontWeight:500,flex:1,color:"#24292f"},flowNodeTime:{fontSize:"10px",color:"#6e7781"},flowNodeDesc:{fontSize:"12px",color:"#57606a",lineHeight:1.5},commitMessage:{fontSize:"12px",color:"#0969da",backgroundColor:"#ddf4ff",padding:"6px 10px",borderRadius:"4px",marginBottom:"6px",marginTop:"4px",display:"flex",alignItems:"flex-start",gap:"6px",whiteSpace:"pre-wrap"},commitIcon:{fontSize:"11px",flexShrink:0},navLinks:{marginTop:"20px",paddingTop:"20px",borderTop:"1px solid #d0d7de"},link:{color:"#0969da",textDecoration:"none",marginRight:"20px",fontSize:"13px"}},uL=({graphData:e,gitHistory:t=[]})=>{const[n,r]=T.useState("all"),[i,o]=T.useState(""),[a,s]=T.useState(null),l=T.useMemo(()=>WA(e.nodes,t),[e.nodes,t]),u=T.useMemo(()=>{let f=l;if(n==="nodes"?f=f.filter(h=>h.type==="node"):n==="commits"?f=f.filter(h=>h.type==="commit"):n==="linked"&&(f=f.filter(h=>h.type==="node"&&h.linkedCommits&&h.linkedCommits.length>0||h.type==="commit"&&h.linkedNodes&&h.linkedNodes.length>0)),i){const h=i.toLowerCase();f=f.filter(p=>{var m;return p.type==="node"?p.node.title.toLowerCase().includes(h)||(((m=p.node.description)==null?void 0:m.toLowerCase().includes(h))??!1):p.commit.message.toLowerCase().includes(h)})}return f},[l,n,i]),d=f=>{const h=e.nodes.find(p=>p.id===f);h&&s(h)};return c.jsxs("div",{style:Re.container,children:[c.jsxs("div",{style:Re.controls,children:[c.jsx("h2",{style:Re.title,children:"Timeline"}),c.jsx("div",{style:Re.filterButtons,children:["all","nodes","commits","linked"].map(f=>c.jsx("button",{onClick:()=>r(f),style:{...Re.filterBtn,...n===f?Re.filterBtnActive:{}},children:f==="all"?"All":f.charAt(0).toUpperCase()+f.slice(1)},f))}),c.jsx("input",{type:"text",placeholder:"Search...",value:i,onChange:f=>o(f.target.value),style:Re.search})]}),c.jsx("div",{style:Re.timelineContainer,children:c.jsxs("div",{style:Re.timeline,children:[u.map((f,h)=>c.jsx(cL,{item:f,onSelectNode:d},h)),u.length===0&&c.jsx("div",{style:Re.empty,children:"No items match your filters"})]})}),c.jsx("div",{style:Re.detailPanel,children:c.jsx(gu,{node:a,graphData:e,onSelectNode:d,onClose:()=>s(null),gitHistory:t})})]})},cL=({item:e,onSelectNode:t})=>{const n=e.timestamp.toLocaleDateString("en-US",{month:"short",day:"numeric"}),r=e.timestamp.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"});if(e.type==="node"&&e.node){const i=e.node,o=Gr(i),a=_t(i);return c.jsxs("div",{style:Re.timelineItem,onClick:()=>t(i.id),children:[c.jsx("div",{style:{...Re.marker,backgroundColor:me(i.node_type)}}),c.jsxs("div",{style:Re.itemContent,children:[c.jsxs("div",{style:Re.itemHeader,children:[c.jsx(xt,{type:i.node_type,size:"sm"}),c.jsx(Xa,{confidence:o}),a&&c.jsx(ki,{commit:a}),c.jsxs("span",{style:Re.itemTime,children:[n," ",r]})]}),c.jsx("div",{style:Re.itemTitle,children:i.title}),i.description&&c.jsx("div",{style:Re.itemDesc,children:Ee(i.description,100)}),e.linkedCommits&&e.linkedCommits.length>0&&c.jsxs("div",{style:Re.linked,children:["Linked to ",e.linkedCommits.length," commit(s)"]})]})]})}if(e.type==="commit"&&e.commit){const i=e.commit;return c.jsxs("div",{style:Re.timelineItem,children:[c.jsx("div",{style:{...Re.marker,backgroundColor:"#3b82f6"}}),c.jsxs("div",{style:Re.itemContent,children:[c.jsxs("div",{style:Re.itemHeader,children:[c.jsx("span",{style:Re.commitBadgeSmall,children:"commit"}),c.jsx(ki,{commit:i.hash}),c.jsxs("span",{style:Re.itemTime,children:[n," ",r]})]}),c.jsx("div",{style:Re.itemTitle,children:i.message}),c.jsxs("div",{style:Re.itemMeta,children:["by ",i.author,i.files_changed&&` · ${i.files_changed} files`]}),e.linkedNodes&&e.linkedNodes.length>0&&c.jsxs("div",{style:Re.linked,children:["Linked to ",e.linkedNodes.length," decision(s)"]})]})]})}return null},Re={container:{height:"100%",display:"flex",gap:"0"},controls:{width:"200px",padding:"20px",backgroundColor:"#f6f8fa",borderRight:"1px solid #d0d7de",flexShrink:0},title:{fontSize:"16px",margin:"0 0 15px 0",color:"#24292f"},filterButtons:{display:"flex",flexDirection:"column",gap:"4px"},filterBtn:{padding:"8px 12px",fontSize:"12px",border:"1px solid #d0d7de",backgroundColor:"#ffffff",color:"#57606a",borderRadius:"4px",cursor:"pointer",textAlign:"left"},filterBtnActive:{backgroundColor:"#0969da",color:"#ffffff",borderColor:"#0969da"},search:{width:"100%",padding:"8px",marginTop:"15px",backgroundColor:"#ffffff",border:"1px solid #d0d7de",borderRadius:"4px",color:"#24292f",fontSize:"12px"},timelineContainer:{flex:2,overflowY:"auto",padding:"20px",backgroundColor:"#ffffff"},timeline:{maxWidth:"700px",position:"relative",paddingLeft:"30px"},timelineItem:{position:"relative",marginBottom:"15px",padding:"15px",backgroundColor:"#ffffff",borderRadius:"8px",border:"1px solid #d0d7de",cursor:"pointer",transition:"border-color 0.2s"},marker:{position:"absolute",left:"-24px",top:"20px",width:"12px",height:"12px",borderRadius:"50%",border:"2px solid #ffffff"},itemContent:{},itemHeader:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"6px",flexWrap:"wrap"},itemTime:{fontSize:"11px",color:"#6e7781",marginLeft:"auto"},itemTitle:{fontSize:"14px",color:"#24292f",marginBottom:"4px"},itemDesc:{fontSize:"12px",color:"#57606a",lineHeight:1.4},itemMeta:{fontSize:"11px",color:"#6e7781"},linked:{fontSize:"11px",color:"#1a7f37",marginTop:"8px"},commitBadgeSmall:{fontSize:"9px",padding:"2px 6px",backgroundColor:"#ddf4ff",color:"#0969da",borderRadius:"3px",textTransform:"uppercase"},detailPanel:{flex:1,minWidth:"350px",borderLeft:"1px solid #d0d7de"},empty:{textAlign:"center",color:"#6e7781",padding:"40px"}};var dL={value:()=>{}};function Qa(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new tl(n)}function tl(e){this._=e}function fL(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}tl.prototype=Qa.prototype={constructor:tl,on:function(e,t){var n=this._,r=fL(e+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(e=r[o]).type)&&(i=hL(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=r[o]).type)n[i]=Vv(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Vv(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new tl(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,o=r.length;i<o;++i)r[i].value.apply(t,n)}};function hL(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Vv(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=dL,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Um="http://www.w3.org/1999/xhtml";const Gv={svg:"http://www.w3.org/2000/svg",xhtml:Um,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function mu(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Gv.hasOwnProperty(t)?{space:Gv[t],local:e}:e}function pL(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Um&&t.documentElement.namespaceURI===Um?t.createElement(e):t.createElementNS(n,e)}}function gL(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Yj(e){var t=mu(e);return(t.local?gL:pL)(t)}function mL(){}function vy(e){return e==null?mL:function(){return this.querySelector(e)}}function xL(e){typeof e!="function"&&(e=vy(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=new Array(a),l,u,d=0;d<a;++d)(l=o[d])&&(u=e.call(l,l.__data__,d,o))&&("__data__"in l&&(u.__data__=l.__data__),s[d]=u);return new Jt(r,this._parents)}function yL(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function vL(){return[]}function Kj(e){return e==null?vL:function(){return this.querySelectorAll(e)}}function wL(e){return function(){return yL(e.apply(this,arguments))}}function bL(e){typeof e=="function"?e=wL(e):e=Kj(e);for(var t=this._groups,n=t.length,r=[],i=[],o=0;o<n;++o)for(var a=t[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(r.push(e.call(l,l.__data__,u,a)),i.push(l));return new Jt(r,i)}function Xj(e){return function(){return this.matches(e)}}function Qj(e){return function(t){return t.matches(e)}}var kL=Array.prototype.find;function _L(e){return function(){return kL.call(this.children,e)}}function SL(){return this.firstElementChild}function CL(e){return this.select(e==null?SL:_L(typeof e=="function"?e:Qj(e)))}var jL=Array.prototype.filter;function EL(){return Array.from(this.children)}function TL(e){return function(){return jL.call(this.children,e)}}function IL(e){return this.selectAll(e==null?EL:TL(typeof e=="function"?e:Qj(e)))}function RL(e){typeof e!="function"&&(e=Xj(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&s.push(l);return new Jt(r,this._parents)}function Jj(e){return new Array(e.length)}function AL(){return new Jt(this._enter||this._groups.map(Jj),this._parents)}function zl(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}zl.prototype={constructor:zl,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function LL(e){return function(){return e}}function PL(e,t,n,r,i,o){for(var a=0,s,l=t.length,u=o.length;a<u;++a)(s=t[a])?(s.__data__=o[a],r[a]=s):n[a]=new zl(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function zL(e,t,n,r,i,o,a){var s,l,u=new Map,d=t.length,f=o.length,h=new Array(d),p;for(s=0;s<d;++s)(l=t[s])&&(h[s]=p=a.call(l,l.__data__,s,t)+"",u.has(p)?i[s]=l:u.set(p,l));for(s=0;s<f;++s)p=a.call(e,o[s],s,o)+"",(l=u.get(p))?(r[s]=l,l.__data__=o[s],u.delete(p)):n[s]=new zl(e,o[s]);for(s=0;s<d;++s)(l=t[s])&&u.get(h[s])===l&&(i[s]=l)}function ML(e){return e.__data__}function NL(e,t){if(!arguments.length)return Array.from(this,ML);var n=t?zL:PL,r=this._parents,i=this._groups;typeof e!="function"&&(e=LL(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),u=0;u<o;++u){var d=r[u],f=i[u],h=f.length,p=DL(e.call(d,d&&d.__data__,u,r)),m=p.length,g=s[u]=new Array(m),v=a[u]=new Array(m),x=l[u]=new Array(h);n(d,f,g,v,x,p,t);for(var y=0,w=0,k,E;y<m;++y)if(k=g[y]){for(y>=w&&(w=y+1);!(E=v[w])&&++w<m;);k._next=E||null}}return a=new Jt(a,r),a._enter=s,a._exit=l,a}function DL(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function OL(){return new Jt(this._exit||this._groups.map(Jj),this._parents)}function BL(e,t,n){var r=this.enter(),i=this,o=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function FL(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),l=0;l<a;++l)for(var u=n[l],d=r[l],f=u.length,h=s[l]=new Array(f),p,m=0;m<f;++m)(p=u[m]||d[m])&&(h[m]=p);for(;l<i;++l)s[l]=n[l];return new Jt(s,this._parents)}function qL(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function $L(e){e||(e=HL);function t(f,h){return f&&h?e(f.__data__,h.__data__):!f-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,l=i[o]=new Array(s),u,d=0;d<s;++d)(u=a[d])&&(l[d]=u);l.sort(t)}return new Jt(i,this._parents).order()}function HL(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function UL(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function WL(){return Array.from(this)}function VL(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function GL(){let e=0;for(const t of this)++e;return e}function YL(){return!this.node()}function KL(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function XL(e){return function(){this.removeAttribute(e)}}function QL(e){return function(){this.removeAttributeNS(e.space,e.local)}}function JL(e,t){return function(){this.setAttribute(e,t)}}function ZL(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function eP(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function tP(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function nP(e,t){var n=mu(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?QL:XL:typeof t=="function"?n.local?tP:eP:n.local?ZL:JL)(n,t))}function Zj(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function rP(e){return function(){this.style.removeProperty(e)}}function iP(e,t,n){return function(){this.style.setProperty(e,t,n)}}function oP(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function aP(e,t,n){return arguments.length>1?this.each((t==null?rP:typeof t=="function"?oP:iP)(e,t,n??"")):yo(this.node(),e)}function yo(e,t){return e.style.getPropertyValue(t)||Zj(e).getComputedStyle(e,null).getPropertyValue(t)}function sP(e){return function(){delete this[e]}}function lP(e,t){return function(){this[e]=t}}function uP(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function cP(e,t){return arguments.length>1?this.each((t==null?sP:typeof t=="function"?uP:lP)(e,t)):this.node()[e]}function eE(e){return e.trim().split(/^|\s+/)}function wy(e){return e.classList||new tE(e)}function tE(e){this._node=e,this._names=eE(e.getAttribute("class")||"")}tE.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function nE(e,t){for(var n=wy(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function rE(e,t){for(var n=wy(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function dP(e){return function(){nE(this,e)}}function fP(e){return function(){rE(this,e)}}function hP(e,t){return function(){(t.apply(this,arguments)?nE:rE)(this,e)}}function pP(e,t){var n=eE(e+"");if(arguments.length<2){for(var r=wy(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?hP:t?dP:fP)(n,t))}function gP(){this.textContent=""}function mP(e){return function(){this.textContent=e}}function xP(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function yP(e){return arguments.length?this.each(e==null?gP:(typeof e=="function"?xP:mP)(e)):this.node().textContent}function vP(){this.innerHTML=""}function wP(e){return function(){this.innerHTML=e}}function bP(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function kP(e){return arguments.length?this.each(e==null?vP:(typeof e=="function"?bP:wP)(e)):this.node().innerHTML}function _P(){this.nextSibling&&this.parentNode.appendChild(this)}function SP(){return this.each(_P)}function CP(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function jP(){return this.each(CP)}function EP(e){var t=typeof e=="function"?e:Yj(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function TP(){return null}function IP(e,t){var n=typeof e=="function"?e:Yj(e),r=t==null?TP:typeof t=="function"?t:vy(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function RP(){var e=this.parentNode;e&&e.removeChild(this)}function AP(){return this.each(RP)}function LP(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function PP(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function zP(e){return this.select(e?PP:LP)}function MP(e){return arguments.length?this.property("__data__",e):this.node().__data__}function NP(e){return function(t){e.call(this,t,this.__data__)}}function DP(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function OP(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,o;n<i;++n)o=t[n],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.options):t[++r]=o;++r?t.length=r:delete this.__on}}}function BP(e,t,n){return function(){var r=this.__on,i,o=NP(t);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=t;return}}this.addEventListener(e.type,o,n),i={type:e.type,name:e.name,value:t,listener:o,options:n},r?r.push(i):this.__on=[i]}}function FP(e,t,n){var r=DP(e+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,d;l<u;++l)for(i=0,d=s[l];i<o;++i)if((a=r[i]).type===d.type&&a.name===d.name)return d.value}return}for(s=t?BP:OP,i=0;i<o;++i)this.each(s(r[i],t,n));return this}function iE(e,t,n){var r=Zj(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function qP(e,t){return function(){return iE(this,e,t)}}function $P(e,t){return function(){return iE(this,e,t.apply(this,arguments))}}function HP(e,t){return this.each((typeof t=="function"?$P:qP)(e,t))}function*UP(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var oE=[null];function Jt(e,t){this._groups=e,this._parents=t}function Ja(){return new Jt([[document.documentElement]],oE)}function WP(){return this}Jt.prototype=Ja.prototype={constructor:Jt,select:xL,selectAll:bL,selectChild:CL,selectChildren:IL,filter:RL,data:NL,enter:AL,exit:OL,join:BL,merge:FL,selection:WP,order:qL,sort:$L,call:UL,nodes:WL,node:VL,size:GL,empty:YL,each:KL,attr:nP,style:aP,property:cP,classed:pP,text:yP,html:kP,raise:SP,lower:jP,append:EP,insert:IP,remove:AP,clone:zP,datum:MP,on:FP,dispatch:HP,[Symbol.iterator]:UP};function St(e){return typeof e=="string"?new Jt([[document.querySelector(e)]],[document.documentElement]):new Jt([[e]],oE)}function VP(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Qn(e,t){if(e=VP(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const GP={passive:!1},Oa={capture:!0,passive:!1};function Tc(e){e.stopImmediatePropagation()}function so(e){e.preventDefault(),e.stopImmediatePropagation()}function aE(e){var t=e.document.documentElement,n=St(e).on("dragstart.drag",so,Oa);"onselectstart"in t?n.on("selectstart.drag",so,Oa):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function sE(e,t){var n=e.document.documentElement,r=St(e).on("dragstart.drag",null);t&&(r.on("click.drag",so,Oa),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const js=e=>()=>e;function Wm(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:l,dy:u,dispatch:d}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:d}})}Wm.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function YP(e){return!e.ctrlKey&&!e.button}function KP(){return this.parentNode}function XP(e,t){return t??{x:e.x,y:e.y}}function QP(){return navigator.maxTouchPoints||"ontouchstart"in this}function JP(){var e=YP,t=KP,n=XP,r=QP,i={},o=Qa("start","drag","end"),a=0,s,l,u,d,f=0;function h(k){k.on("mousedown.drag",p).filter(r).on("touchstart.drag",v).on("touchmove.drag",x,GP).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(k,E){if(!(d||!e.call(this,k,E))){var C=w(this,t.call(this,k,E),k,E,"mouse");C&&(St(k.view).on("mousemove.drag",m,Oa).on("mouseup.drag",g,Oa),aE(k.view),Tc(k),u=!1,s=k.clientX,l=k.clientY,C("start",k))}}function m(k){if(so(k),!u){var E=k.clientX-s,C=k.clientY-l;u=E*E+C*C>f}i.mouse("drag",k)}function g(k){St(k.view).on("mousemove.drag mouseup.drag",null),sE(k.view,u),so(k),i.mouse("end",k)}function v(k,E){if(e.call(this,k,E)){var C=k.changedTouches,j=t.call(this,k,E),b=C.length,A,_;for(A=0;A<b;++A)(_=w(this,j,k,E,C[A].identifier,C[A]))&&(Tc(k),_("start",k,C[A]))}}function x(k){var E=k.changedTouches,C=E.length,j,b;for(j=0;j<C;++j)(b=i[E[j].identifier])&&(so(k),b("drag",k,E[j]))}function y(k){var E=k.changedTouches,C=E.length,j,b;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),j=0;j<C;++j)(b=i[E[j].identifier])&&(Tc(k),b("end",k,E[j]))}function w(k,E,C,j,b,A){var _=o.copy(),L=Qn(A||C,E),P,$,R;if((R=n.call(k,new Wm("beforestart",{sourceEvent:C,target:h,identifier:b,active:a,x:L[0],y:L[1],dx:0,dy:0,dispatch:_}),j))!=null)return P=R.x-L[0]||0,$=R.y-L[1]||0,function F(D,V,N){var q=L,S;switch(D){case"start":i[b]=F,S=a++;break;case"end":delete i[b],--a;case"drag":L=Qn(N||V,E),S=a;break}_.call(D,k,new Wm(D,{sourceEvent:V,subject:R,target:h,identifier:b,active:S,x:L[0]+P,y:L[1]+$,dx:L[0]-q[0],dy:L[1]-q[1],dispatch:_}),j)}}return h.filter=function(k){return arguments.length?(e=typeof k=="function"?k:js(!!k),h):e},h.container=function(k){return arguments.length?(t=typeof k=="function"?k:js(k),h):t},h.subject=function(k){return arguments.length?(n=typeof k=="function"?k:js(k),h):n},h.touchable=function(k){return arguments.length?(r=typeof k=="function"?k:js(!!k),h):r},h.on=function(){var k=o.on.apply(o,arguments);return k===o?h:k},h.clickDistance=function(k){return arguments.length?(f=(k=+k)*k,h):Math.sqrt(f)},h}function by(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function lE(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Za(){}var Ba=.7,Ml=1/Ba,lo="\\s*([+-]?\\d+)\\s*",Fa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",$n="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ZP=/^#([0-9a-f]{3,8})$/,ez=new RegExp(`^rgb\\(${lo},${lo},${lo}\\)$`),tz=new RegExp(`^rgb\\(${$n},${$n},${$n}\\)$`),nz=new RegExp(`^rgba\\(${lo},${lo},${lo},${Fa}\\)$`),rz=new RegExp(`^rgba\\(${$n},${$n},${$n},${Fa}\\)$`),iz=new RegExp(`^hsl\\(${Fa},${$n},${$n}\\)$`),oz=new RegExp(`^hsla\\(${Fa},${$n},${$n},${Fa}\\)$`),Yv={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};by(Za,qa,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Kv,formatHex:Kv,formatHex8:az,formatHsl:sz,formatRgb:Xv,toString:Xv});function Kv(){return this.rgb().formatHex()}function az(){return this.rgb().formatHex8()}function sz(){return uE(this).formatHsl()}function Xv(){return this.rgb().formatRgb()}function qa(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ZP.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Qv(t):n===3?new Nt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Es(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Es(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ez.exec(e))?new Nt(t[1],t[2],t[3],1):(t=tz.exec(e))?new Nt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=nz.exec(e))?Es(t[1],t[2],t[3],t[4]):(t=rz.exec(e))?Es(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=iz.exec(e))?e1(t[1],t[2]/100,t[3]/100,1):(t=oz.exec(e))?e1(t[1],t[2]/100,t[3]/100,t[4]):Yv.hasOwnProperty(e)?Qv(Yv[e]):e==="transparent"?new Nt(NaN,NaN,NaN,0):null}function Qv(e){return new Nt(e>>16&255,e>>8&255,e&255,1)}function Es(e,t,n,r){return r<=0&&(e=t=n=NaN),new Nt(e,t,n,r)}function lz(e){return e instanceof Za||(e=qa(e)),e?(e=e.rgb(),new Nt(e.r,e.g,e.b,e.opacity)):new Nt}function Vm(e,t,n,r){return arguments.length===1?lz(e):new Nt(e,t,n,r??1)}function Nt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}by(Nt,Vm,lE(Za,{brighter(e){return e=e==null?Ml:Math.pow(Ml,e),new Nt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ba:Math.pow(Ba,e),new Nt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Nt(gi(this.r),gi(this.g),gi(this.b),Nl(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Jv,formatHex:Jv,formatHex8:uz,formatRgb:Zv,toString:Zv}));function Jv(){return`#${di(this.r)}${di(this.g)}${di(this.b)}`}function uz(){return`#${di(this.r)}${di(this.g)}${di(this.b)}${di((isNaN(this.opacity)?1:this.opacity)*255)}`}function Zv(){const e=Nl(this.opacity);return`${e===1?"rgb(":"rgba("}${gi(this.r)}, ${gi(this.g)}, ${gi(this.b)}${e===1?")":`, ${e})`}`}function Nl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function gi(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function di(e){return e=gi(e),(e<16?"0":"")+e.toString(16)}function e1(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new _n(e,t,n,r)}function uE(e){if(e instanceof _n)return new _n(e.h,e.s,e.l,e.opacity);if(e instanceof Za||(e=qa(e)),!e)return new _n;if(e instanceof _n)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new _n(a,s,l,e.opacity)}function cz(e,t,n,r){return arguments.length===1?uE(e):new _n(e,t,n,r??1)}function _n(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}by(_n,cz,lE(Za,{brighter(e){return e=e==null?Ml:Math.pow(Ml,e),new _n(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ba:Math.pow(Ba,e),new _n(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Nt(Ic(e>=240?e-240:e+120,i,r),Ic(e,i,r),Ic(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new _n(t1(this.h),Ts(this.s),Ts(this.l),Nl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Nl(this.opacity);return`${e===1?"hsl(":"hsla("}${t1(this.h)}, ${Ts(this.s)*100}%, ${Ts(this.l)*100}%${e===1?")":`, ${e})`}`}}));function t1(e){return e=(e||0)%360,e<0?e+360:e}function Ts(e){return Math.max(0,Math.min(1,e||0))}function Ic(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const cE=e=>()=>e;function dz(e,t){return function(n){return e+n*t}}function fz(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function hz(e){return(e=+e)==1?dE:function(t,n){return n-t?fz(t,n,e):cE(isNaN(t)?n:t)}}function dE(e,t){var n=t-e;return n?dz(e,n):cE(isNaN(e)?t:e)}const n1=function e(t){var n=hz(t);function r(i,o){var a=n((i=Vm(i)).r,(o=Vm(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),u=dE(i.opacity,o.opacity);return function(d){return i.r=a(d),i.g=s(d),i.b=l(d),i.opacity=u(d),i+""}}return r.gamma=e,r}(1);function Cr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Gm=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Rc=new RegExp(Gm.source,"g");function pz(e){return function(){return e}}function gz(e){return function(t){return e(t)+""}}function mz(e,t){var n=Gm.lastIndex=Rc.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=Gm.exec(e))&&(i=Rc.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Cr(r,i)})),n=Rc.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?gz(l[0].x):pz(t):(t=l.length,function(u){for(var d=0,f;d<t;++d)s[(f=l[d]).i]=f.x(u);return s.join("")})}var r1=180/Math.PI,Ym={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fE(e,t,n,r,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*r1,skewX:Math.atan(l)*r1,scaleX:a,scaleY:s}}var Is;function xz(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ym:fE(t.a,t.b,t.c,t.d,t.e,t.f)}function yz(e){return e==null||(Is||(Is=document.createElementNS("http://www.w3.org/2000/svg","g")),Is.setAttribute("transform",e),!(e=Is.transform.baseVal.consolidate()))?Ym:(e=e.matrix,fE(e.a,e.b,e.c,e.d,e.e,e.f))}function hE(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,d,f,h,p,m){if(u!==f||d!==h){var g=p.push("translate(",null,t,null,n);m.push({i:g-4,x:Cr(u,f)},{i:g-2,x:Cr(d,h)})}else(f||h)&&p.push("translate("+f+t+h+n)}function a(u,d,f,h){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),h.push({i:f.push(i(f)+"rotate(",null,r)-2,x:Cr(u,d)})):d&&f.push(i(f)+"rotate("+d+r)}function s(u,d,f,h){u!==d?h.push({i:f.push(i(f)+"skewX(",null,r)-2,x:Cr(u,d)}):d&&f.push(i(f)+"skewX("+d+r)}function l(u,d,f,h,p,m){if(u!==f||d!==h){var g=p.push(i(p)+"scale(",null,",",null,")");m.push({i:g-4,x:Cr(u,f)},{i:g-2,x:Cr(d,h)})}else(f!==1||h!==1)&&p.push(i(p)+"scale("+f+","+h+")")}return function(u,d){var f=[],h=[];return u=e(u),d=e(d),o(u.translateX,u.translateY,d.translateX,d.translateY,f,h),a(u.rotate,d.rotate,f,h),s(u.skewX,d.skewX,f,h),l(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,h),u=d=null,function(p){for(var m=-1,g=h.length,v;++m<g;)f[(v=h[m]).i]=v.x(p);return f.join("")}}}var vz=hE(xz,"px, ","px)","deg)"),wz=hE(yz,", ",")",")"),bz=1e-12;function i1(e){return((e=Math.exp(e))+1/e)/2}function kz(e){return((e=Math.exp(e))-1/e)/2}function _z(e){return((e=Math.exp(2*e))-1)/(e+1)}const Sz=function e(t,n,r){function i(o,a){var s=o[0],l=o[1],u=o[2],d=a[0],f=a[1],h=a[2],p=d-s,m=f-l,g=p*p+m*m,v,x;if(g<bz)x=Math.log(h/u)/t,v=function(j){return[s+j*p,l+j*m,u*Math.exp(t*j*x)]};else{var y=Math.sqrt(g),w=(h*h-u*u+r*g)/(2*u*n*y),k=(h*h-u*u-r*g)/(2*h*n*y),E=Math.log(Math.sqrt(w*w+1)-w),C=Math.log(Math.sqrt(k*k+1)-k);x=(C-E)/t,v=function(j){var b=j*x,A=i1(E),_=u/(n*y)*(A*_z(t*b+E)-kz(E));return[s+_*p,l+_*m,u*A/i1(t*b+E)]}}return v.duration=x*1e3*t/Math.SQRT2,v}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,l=s*s;return e(a,s,l)},i}(Math.SQRT2,2,4);var vo=0,Jo=0,$o=0,pE=1e3,Dl,Zo,Ol=0,_i=0,xu=0,$a=typeof performance=="object"&&performance.now?performance:Date,gE=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ky(){return _i||(gE(Cz),_i=$a.now()+xu)}function Cz(){_i=0}function Bl(){this._call=this._time=this._next=null}Bl.prototype=_y.prototype={constructor:Bl,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?ky():+n)+(t==null?0:+t),!this._next&&Zo!==this&&(Zo?Zo._next=this:Dl=this,Zo=this),this._call=e,this._time=n,Km()},stop:function(){this._call&&(this._call=null,this._time=1/0,Km())}};function _y(e,t,n){var r=new Bl;return r.restart(e,t,n),r}function jz(){ky(),++vo;for(var e=Dl,t;e;)(t=_i-e._time)>=0&&e._call.call(void 0,t),e=e._next;--vo}function o1(){_i=(Ol=$a.now())+xu,vo=Jo=0;try{jz()}finally{vo=0,Tz(),_i=0}}function Ez(){var e=$a.now(),t=e-Ol;t>pE&&(xu-=t,Ol=e)}function Tz(){for(var e,t=Dl,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Dl=n);Zo=e,Km(r)}function Km(e){if(!vo){Jo&&(Jo=clearTimeout(Jo));var t=e-_i;t>24?(e<1/0&&(Jo=setTimeout(o1,e-$a.now()-xu)),$o&&($o=clearInterval($o))):($o||(Ol=$a.now(),$o=setInterval(Ez,pE)),vo=1,gE(o1))}}function a1(e,t,n){var r=new Bl;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var Iz=Qa("start","end","cancel","interrupt"),Rz=[],mE=0,s1=1,Xm=2,nl=3,l1=4,Qm=5,rl=6;function yu(e,t,n,r,i,o){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Az(e,n,{name:t,index:r,group:i,on:Iz,tween:Rz,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:mE})}function Sy(e,t){var n=Tn(e,t);if(n.state>mE)throw new Error("too late; already scheduled");return n}function Hn(e,t){var n=Tn(e,t);if(n.state>nl)throw new Error("too late; already running");return n}function Tn(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Az(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=_y(o,0,n.time);function o(u){n.state=s1,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var d,f,h,p;if(n.state!==s1)return l();for(d in r)if(p=r[d],p.name===n.name){if(p.state===nl)return a1(a);p.state===l1?(p.state=rl,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete r[d]):+d<t&&(p.state=rl,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete r[d])}if(a1(function(){n.state===nl&&(n.state=l1,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=Xm,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Xm){for(n.state=nl,i=new Array(h=n.tween.length),d=0,f=-1;d<h;++d)(p=n.tween[d].value.call(e,e.__data__,n.index,n.group))&&(i[++f]=p);i.length=f+1}}function s(u){for(var d=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=Qm,1),f=-1,h=i.length;++f<h;)i[f].call(e,d);n.state===Qm&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=rl,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function il(e,t){var n=e.__transition,r,i,o=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((r=n[a]).name!==t){o=!1;continue}i=r.state>Xm&&r.state<Qm,r.state=rl,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[a]}o&&delete e.__transition}}function Lz(e){return this.each(function(){il(this,e)})}function Pz(e,t){var n,r;return function(){var i=Hn(this,e),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===t){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function zz(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Hn(this,e),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}o.tween=i}}function Mz(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Tn(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===e)return a.value;return null}return this.each((t==null?Pz:zz)(n,e,t))}function Cy(e,t,n){var r=e._id;return e.each(function(){var i=Hn(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Tn(i,r).value[t]}}function xE(e,t){var n;return(typeof t=="number"?Cr:t instanceof qa?n1:(n=qa(t))?(t=n,n1):mz)(e,t)}function Nz(e){return function(){this.removeAttribute(e)}}function Dz(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Oz(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function Bz(e,t,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function Fz(e,t,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s)))}}function qz(e,t,n){var r,i,o;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s)))}}function $z(e,t){var n=mu(e),r=n==="transform"?wz:xE;return this.attrTween(e,typeof t=="function"?(n.local?qz:Fz)(n,r,Cy(this,"attr."+e,t)):t==null?(n.local?Dz:Nz)(n):(n.local?Bz:Oz)(n,r,t))}function Hz(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Uz(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Wz(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Uz(e,o)),n}return i._value=t,i}function Vz(e,t){var n,r;function i(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Hz(e,o)),n}return i._value=t,i}function Gz(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=mu(e);return this.tween(n,(r.local?Wz:Vz)(r,t))}function Yz(e,t){return function(){Sy(this,e).delay=+t.apply(this,arguments)}}function Kz(e,t){return t=+t,function(){Sy(this,e).delay=t}}function Xz(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Yz:Kz)(t,e)):Tn(this.node(),t).delay}function Qz(e,t){return function(){Hn(this,e).duration=+t.apply(this,arguments)}}function Jz(e,t){return t=+t,function(){Hn(this,e).duration=t}}function Zz(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Qz:Jz)(t,e)):Tn(this.node(),t).duration}function e5(e,t){if(typeof t!="function")throw new Error;return function(){Hn(this,e).ease=t}}function t5(e){var t=this._id;return arguments.length?this.each(e5(t,e)):Tn(this.node(),t).ease}function n5(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Hn(this,e).ease=n}}function r5(e){if(typeof e!="function")throw new Error;return this.each(n5(this._id,e))}function i5(e){typeof e!="function"&&(e=Xj(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var o=t[i],a=o.length,s=r[i]=[],l,u=0;u<a;++u)(l=o[u])&&e.call(l,l.__data__,u,o)&&s.push(l);return new ur(r,this._parents,this._name,this._id)}function o5(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var l=t[s],u=n[s],d=l.length,f=a[s]=new Array(d),h,p=0;p<d;++p)(h=l[p]||u[p])&&(f[p]=h);for(;s<r;++s)a[s]=t[s];return new ur(a,this._parents,this._name,this._id)}function a5(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function s5(e,t,n){var r,i,o=a5(t)?Sy:Hn;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}function l5(e,t){var n=this._id;return arguments.length<2?Tn(this.node(),n).on.on(e):this.each(s5(n,e,t))}function u5(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function c5(){return this.on("end.remove",u5(this._id))}function d5(e){var t=this._name,n=this._id;typeof e!="function"&&(e=vy(e));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],l=s.length,u=o[a]=new Array(l),d,f,h=0;h<l;++h)(d=s[h])&&(f=e.call(d,d.__data__,h,s))&&("__data__"in d&&(f.__data__=d.__data__),u[h]=f,yu(u[h],t,n,h,u,Tn(d,n)));return new ur(o,this._parents,t,n)}function f5(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Kj(e));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l=r[s],u=l.length,d,f=0;f<u;++f)if(d=l[f]){for(var h=e.call(d,d.__data__,f,l),p,m=Tn(d,n),g=0,v=h.length;g<v;++g)(p=h[g])&&yu(p,t,n,g,h,m);o.push(h),a.push(d)}return new ur(o,a,t,n)}var h5=Ja.prototype.constructor;function p5(){return new h5(this._groups,this._parents)}function g5(e,t){var n,r,i;return function(){var o=yo(this,e),a=(this.style.removeProperty(e),yo(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}function yE(e){return function(){this.style.removeProperty(e)}}function m5(e,t,n){var r,i=n+"",o;return function(){var a=yo(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}function x5(e,t,n){var r,i,o;return function(){var a=yo(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),yo(this,e))),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}function y5(e,t){var n,r,i,o="style."+t,a="end."+o,s;return function(){var l=Hn(this,e),u=l.on,d=l.value[o]==null?s||(s=yE(t)):void 0;(u!==n||i!==d)&&(r=(n=u).copy()).on(a,i=d),l.on=r}}function v5(e,t,n){var r=(e+="")=="transform"?vz:xE;return t==null?this.styleTween(e,g5(e,r)).on("end.style."+e,yE(e)):typeof t=="function"?this.styleTween(e,x5(e,r,Cy(this,"style."+e,t))).each(y5(this._id,e)):this.styleTween(e,m5(e,r,t),n).on("end.style."+e,null)}function w5(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function b5(e,t,n){var r,i;function o(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&w5(e,a,n)),r}return o._value=t,o}function k5(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,b5(e,t,n??""))}function _5(e){return function(){this.textContent=e}}function S5(e){return function(){var t=e(this);this.textContent=t??""}}function C5(e){return this.tween("text",typeof e=="function"?S5(Cy(this,"text",e)):_5(e==null?"":e+""))}function j5(e){return function(t){this.textContent=e.call(this,t)}}function E5(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&j5(i)),t}return r._value=e,r}function T5(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,E5(e))}function I5(){for(var e=this._name,t=this._id,n=vE(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var d=Tn(l,t);yu(l,e,n,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new ur(r,this._parents,e,n)}function R5(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};n.each(function(){var u=Hn(this,r),d=u.on;d!==e&&(t=(e=d).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),u.on=t}),i===0&&o()})}var A5=0;function ur(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function vE(){return++A5}var Gn=Ja.prototype;ur.prototype={constructor:ur,select:d5,selectAll:f5,selectChild:Gn.selectChild,selectChildren:Gn.selectChildren,filter:i5,merge:o5,selection:p5,transition:I5,call:Gn.call,nodes:Gn.nodes,node:Gn.node,size:Gn.size,empty:Gn.empty,each:Gn.each,on:l5,attr:$z,attrTween:Gz,style:v5,styleTween:k5,text:C5,textTween:T5,remove:c5,tween:Mz,delay:Xz,duration:Zz,ease:t5,easeVarying:r5,end:R5,[Symbol.iterator]:Gn[Symbol.iterator]};function L5(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var P5={time:null,delay:0,duration:250,ease:L5};function z5(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function M5(e){var t,n;e instanceof ur?(t=e._id,e=e._name):(t=vE(),(n=P5).time=ky(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,l,u=0;u<s;++u)(l=a[u])&&yu(l,e,t,u,a,n||z5(l,t));return new ur(r,this._parents,e,t)}Ja.prototype.interrupt=Lz;Ja.prototype.transition=M5;const Jm=Math.PI,Zm=2*Jm,ai=1e-6,N5=Zm-ai;function wE(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function D5(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return wE;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class O5{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?wE:D5(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,l=r-t,u=i-n,d=a-t,f=s-n,h=d*d+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(h>ai)if(!(Math.abs(f*l-u*d)>ai)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,m=i-s,g=l*l+u*u,v=p*p+m*m,x=Math.sqrt(g),y=Math.sqrt(h),w=o*Math.tan((Jm-Math.acos((g+h-v)/(2*x*y)))/2),k=w/y,E=w/x;Math.abs(k-1)>ai&&this._append`L${t+k*d},${n+k*f}`,this._append`A${o},${o},0,0,${+(f*p>d*m)},${this._x1=t+E*l},${this._y1=n+E*u}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),u=t+s,d=n+l,f=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>ai||Math.abs(this._y1-d)>ai)&&this._append`L${u},${d}`,r&&(h<0&&(h=h%Zm+Zm),h>N5?this._append`A${r},${r},0,1,${f},${t-s},${n-l}A${r},${r},0,1,${f},${this._x1=u},${this._y1=d}`:h>ai&&this._append`A${r},${r},0,${+(h>=Jm)},${f},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function B5(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function i(){var o,a=n.length,s,l=0,u=0;for(o=0;o<a;++o)s=n[o],l+=s.x,u+=s.y;for(l=(l/a-e)*r,u=(u/a-t)*r,o=0;o<a;++o)s=n[o],s.x-=l,s.y-=u}return i.initialize=function(o){n=o},i.x=function(o){return arguments.length?(e=+o,i):e},i.y=function(o){return arguments.length?(t=+o,i):t},i.strength=function(o){return arguments.length?(r=+o,i):r},i}function F5(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return bE(this.cover(t,n),t,n,e)}function bE(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,o=e._root,a={data:r},s=e._x0,l=e._y0,u=e._x1,d=e._y1,f,h,p,m,g,v,x,y;if(!o)return e._root=a,e;for(;o.length;)if((g=t>=(f=(s+u)/2))?s=f:u=f,(v=n>=(h=(l+d)/2))?l=h:d=h,i=o,!(o=o[x=v<<1|g]))return i[x]=a,e;if(p=+e._x.call(null,o.data),m=+e._y.call(null,o.data),t===p&&n===m)return a.next=o,i?i[x]=a:e._root=a,e;do i=i?i[x]=new Array(4):e._root=new Array(4),(g=t>=(f=(s+u)/2))?s=f:u=f,(v=n>=(h=(l+d)/2))?l=h:d=h;while((x=v<<1|g)===(y=(m>=h)<<1|p>=f));return i[y]=o,i[x]=a,e}function q5(e){var t,n,r=e.length,i,o,a=new Array(r),s=new Array(r),l=1/0,u=1/0,d=-1/0,f=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(o=+this._y.call(null,t))||(a[n]=i,s[n]=o,i<l&&(l=i),i>d&&(d=i),o<u&&(u=o),o>f&&(f=o));if(l>d||u>f)return this;for(this.cover(l,u).cover(d,f),n=0;n<r;++n)bE(this,a[n],s[n],e[n]);return this}function $5(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,o=(r=Math.floor(t))+1;else{for(var a=i-n||1,s=this._root,l,u;n>e||e>=i||r>t||t>=o;)switch(u=(t<r)<<1|e<n,l=new Array(4),l[u]=s,s=l,a*=2,u){case 0:i=n+a,o=r+a;break;case 1:n=i-a,o=r+a;break;case 2:i=n+a,r=o-a;break;case 3:n=i-a,r=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this}function H5(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function U5(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Ct(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function W5(e,t,n){var r,i=this._x0,o=this._y0,a,s,l,u,d=this._x1,f=this._y1,h=[],p=this._root,m,g;for(p&&h.push(new Ct(p,i,o,d,f)),n==null?n=1/0:(i=e-n,o=t-n,d=e+n,f=t+n,n*=n);m=h.pop();)if(!(!(p=m.node)||(a=m.x0)>d||(s=m.y0)>f||(l=m.x1)<i||(u=m.y1)<o))if(p.length){var v=(a+l)/2,x=(s+u)/2;h.push(new Ct(p[3],v,x,l,u),new Ct(p[2],a,x,v,u),new Ct(p[1],v,s,l,x),new Ct(p[0],a,s,v,x)),(g=(t>=x)<<1|e>=v)&&(m=h[h.length-1],h[h.length-1]=h[h.length-1-g],h[h.length-1-g]=m)}else{var y=e-+this._x.call(null,p.data),w=t-+this._y.call(null,p.data),k=y*y+w*w;if(k<n){var E=Math.sqrt(n=k);i=e-E,o=t-E,d=e+E,f=t+E,r=p.data}}return r}function V5(e){if(isNaN(d=+this._x.call(null,e))||isNaN(f=+this._y.call(null,e)))return this;var t,n=this._root,r,i,o,a=this._x0,s=this._y0,l=this._x1,u=this._y1,d,f,h,p,m,g,v,x;if(!n)return this;if(n.length)for(;;){if((m=d>=(h=(a+l)/2))?a=h:l=h,(g=f>=(p=(s+u)/2))?s=p:u=p,t=n,!(n=n[v=g<<1|m]))return this;if(!n.length)break;(t[v+1&3]||t[v+2&3]||t[v+3&3])&&(r=t,x=v)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(o=n.next)&&delete n.next,i?(o?i.next=o:delete i.next,this):t?(o?t[v]=o:delete t[v],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[x]=n:this._root=n),this):(this._root=o,this)}function G5(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function Y5(){return this._root}function K5(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function X5(e){var t=[],n,r=this._root,i,o,a,s,l;for(r&&t.push(new Ct(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,o=n.x0,a=n.y0,s=n.x1,l=n.y1)&&r.length){var u=(o+s)/2,d=(a+l)/2;(i=r[3])&&t.push(new Ct(i,u,d,s,l)),(i=r[2])&&t.push(new Ct(i,o,d,u,l)),(i=r[1])&&t.push(new Ct(i,u,a,s,d)),(i=r[0])&&t.push(new Ct(i,o,a,u,d))}return this}function Q5(e){var t=[],n=[],r;for(this._root&&t.push(new Ct(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var o,a=r.x0,s=r.y0,l=r.x1,u=r.y1,d=(a+l)/2,f=(s+u)/2;(o=i[0])&&t.push(new Ct(o,a,s,d,f)),(o=i[1])&&t.push(new Ct(o,d,s,l,f)),(o=i[2])&&t.push(new Ct(o,a,f,d,u)),(o=i[3])&&t.push(new Ct(o,d,f,l,u))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function J5(e){return e[0]}function Z5(e){return arguments.length?(this._x=e,this):this._x}function eM(e){return e[1]}function tM(e){return arguments.length?(this._y=e,this):this._y}function jy(e,t,n){var r=new Ey(t??J5,n??eM,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Ey(e,t,n,r,i,o){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function u1(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Rt=jy.prototype=Ey.prototype;Rt.copy=function(){var e=new Ey(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=u1(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=u1(r));return e};Rt.add=F5;Rt.addAll=q5;Rt.cover=$5;Rt.data=H5;Rt.extent=U5;Rt.find=W5;Rt.remove=V5;Rt.removeAll=G5;Rt.root=Y5;Rt.size=K5;Rt.visit=X5;Rt.visitAfter=Q5;Rt.x=Z5;Rt.y=tM;function mi(e){return function(){return e}}function Pr(e){return(e()-.5)*1e-6}function nM(e){return e.x+e.vx}function rM(e){return e.y+e.vy}function iM(e){var t,n,r,i=1,o=1;typeof e!="function"&&(e=mi(e==null?1:+e));function a(){for(var u,d=t.length,f,h,p,m,g,v,x=0;x<o;++x)for(f=jy(t,nM,rM).visitAfter(s),u=0;u<d;++u)h=t[u],g=n[h.index],v=g*g,p=h.x+h.vx,m=h.y+h.vy,f.visit(y);function y(w,k,E,C,j){var b=w.data,A=w.r,_=g+A;if(b){if(b.index>h.index){var L=p-b.x-b.vx,P=m-b.y-b.vy,$=L*L+P*P;$<_*_&&(L===0&&(L=Pr(r),$+=L*L),P===0&&(P=Pr(r),$+=P*P),$=(_-($=Math.sqrt($)))/$*i,h.vx+=(L*=$)*(_=(A*=A)/(v+A)),h.vy+=(P*=$)*_,b.vx-=L*(_=1-_),b.vy-=P*_)}return}return k>p+_||C<p-_||E>m+_||j<m-_}}function s(u){if(u.data)return u.r=n[u.data.index];for(var d=u.r=0;d<4;++d)u[d]&&u[d].r>u.r&&(u.r=u[d].r)}function l(){if(t){var u,d=t.length,f;for(n=new Array(d),u=0;u<d;++u)f=t[u],n[f.index]=+e(f,u,t)}}return a.initialize=function(u,d){t=u,r=d,l()},a.iterations=function(u){return arguments.length?(o=+u,a):o},a.strength=function(u){return arguments.length?(i=+u,a):i},a.radius=function(u){return arguments.length?(e=typeof u=="function"?u:mi(+u),l(),a):e},a}function oM(e){return e.index}function c1(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function aM(e){var t=oM,n=f,r,i=mi(30),o,a,s,l,u,d=1;e==null&&(e=[]);function f(v){return 1/Math.min(s[v.source.index],s[v.target.index])}function h(v){for(var x=0,y=e.length;x<d;++x)for(var w=0,k,E,C,j,b,A,_;w<y;++w)k=e[w],E=k.source,C=k.target,j=C.x+C.vx-E.x-E.vx||Pr(u),b=C.y+C.vy-E.y-E.vy||Pr(u),A=Math.sqrt(j*j+b*b),A=(A-o[w])/A*v*r[w],j*=A,b*=A,C.vx-=j*(_=l[w]),C.vy-=b*_,E.vx+=j*(_=1-_),E.vy+=b*_}function p(){if(a){var v,x=a.length,y=e.length,w=new Map(a.map((E,C)=>[t(E,C,a),E])),k;for(v=0,s=new Array(x);v<y;++v)k=e[v],k.index=v,typeof k.source!="object"&&(k.source=c1(w,k.source)),typeof k.target!="object"&&(k.target=c1(w,k.target)),s[k.source.index]=(s[k.source.index]||0)+1,s[k.target.index]=(s[k.target.index]||0)+1;for(v=0,l=new Array(y);v<y;++v)k=e[v],l[v]=s[k.source.index]/(s[k.source.index]+s[k.target.index]);r=new Array(y),m(),o=new Array(y),g()}}function m(){if(a)for(var v=0,x=e.length;v<x;++v)r[v]=+n(e[v],v,e)}function g(){if(a)for(var v=0,x=e.length;v<x;++v)o[v]=+i(e[v],v,e)}return h.initialize=function(v,x){a=v,u=x,p()},h.links=function(v){return arguments.length?(e=v,p(),h):e},h.id=function(v){return arguments.length?(t=v,h):t},h.iterations=function(v){return arguments.length?(d=+v,h):d},h.strength=function(v){return arguments.length?(n=typeof v=="function"?v:mi(+v),m(),h):n},h.distance=function(v){return arguments.length?(i=typeof v=="function"?v:mi(+v),g(),h):i},h}const sM=1664525,lM=1013904223,d1=4294967296;function uM(){let e=1;return()=>(e=(sM*e+lM)%d1)/d1}function cM(e){return e.x}function dM(e){return e.y}var fM=10,hM=Math.PI*(3-Math.sqrt(5));function pM(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,s=new Map,l=_y(f),u=Qa("tick","end"),d=uM();e==null&&(e=[]);function f(){h(),u.call("tick",t),n<r&&(l.stop(),u.call("end",t))}function h(g){var v,x=e.length,y;g===void 0&&(g=1);for(var w=0;w<g;++w)for(n+=(o-n)*i,s.forEach(function(k){k(n)}),v=0;v<x;++v)y=e[v],y.fx==null?y.x+=y.vx*=a:(y.x=y.fx,y.vx=0),y.fy==null?y.y+=y.vy*=a:(y.y=y.fy,y.vy=0);return t}function p(){for(var g=0,v=e.length,x;g<v;++g){if(x=e[g],x.index=g,x.fx!=null&&(x.x=x.fx),x.fy!=null&&(x.y=x.fy),isNaN(x.x)||isNaN(x.y)){var y=fM*Math.sqrt(.5+g),w=g*hM;x.x=y*Math.cos(w),x.y=y*Math.sin(w)}(isNaN(x.vx)||isNaN(x.vy))&&(x.vx=x.vy=0)}}function m(g){return g.initialize&&g.initialize(e,d),g}return p(),t={tick:h,restart:function(){return l.restart(f),t},stop:function(){return l.stop(),t},nodes:function(g){return arguments.length?(e=g,p(),s.forEach(m),t):e},alpha:function(g){return arguments.length?(n=+g,t):n},alphaMin:function(g){return arguments.length?(r=+g,t):r},alphaDecay:function(g){return arguments.length?(i=+g,t):+i},alphaTarget:function(g){return arguments.length?(o=+g,t):o},velocityDecay:function(g){return arguments.length?(a=1-g,t):1-a},randomSource:function(g){return arguments.length?(d=g,s.forEach(m),t):d},force:function(g,v){return arguments.length>1?(v==null?s.delete(g):s.set(g,m(v)),t):s.get(g)},find:function(g,v,x){var y=0,w=e.length,k,E,C,j,b;for(x==null?x=1/0:x*=x,y=0;y<w;++y)j=e[y],k=g-j.x,E=v-j.y,C=k*k+E*E,C<x&&(b=j,x=C);return b},on:function(g,v){return arguments.length>1?(u.on(g,v),t):u.on(g)}}}function gM(){var e,t,n,r,i=mi(-30),o,a=1,s=1/0,l=.81;function u(p){var m,g=e.length,v=jy(e,cM,dM).visitAfter(f);for(r=p,m=0;m<g;++m)t=e[m],v.visit(h)}function d(){if(e){var p,m=e.length,g;for(o=new Array(m),p=0;p<m;++p)g=e[p],o[g.index]=+i(g,p,e)}}function f(p){var m=0,g,v,x=0,y,w,k;if(p.length){for(y=w=k=0;k<4;++k)(g=p[k])&&(v=Math.abs(g.value))&&(m+=g.value,x+=v,y+=v*g.x,w+=v*g.y);p.x=y/x,p.y=w/x}else{g=p,g.x=g.data.x,g.y=g.data.y;do m+=o[g.data.index];while(g=g.next)}p.value=m}function h(p,m,g,v){if(!p.value)return!0;var x=p.x-t.x,y=p.y-t.y,w=v-m,k=x*x+y*y;if(w*w/l<k)return k<s&&(x===0&&(x=Pr(n),k+=x*x),y===0&&(y=Pr(n),k+=y*y),k<a&&(k=Math.sqrt(a*k)),t.vx+=x*p.value*r/k,t.vy+=y*p.value*r/k),!0;if(p.length||k>=s)return;(p.data!==t||p.next)&&(x===0&&(x=Pr(n),k+=x*x),y===0&&(y=Pr(n),k+=y*y),k<a&&(k=Math.sqrt(a*k)));do p.data!==t&&(w=o[p.data.index]*r/k,t.vx+=x*w,t.vy+=y*w);while(p=p.next)}return u.initialize=function(p,m){e=p,n=m,d()},u.strength=function(p){return arguments.length?(i=typeof p=="function"?p:mi(+p),d(),u):i},u.distanceMin=function(p){return arguments.length?(a=p*p,u):Math.sqrt(a)},u.distanceMax=function(p){return arguments.length?(s=p*p,u):Math.sqrt(s)},u.theta=function(p){return arguments.length?(l=p*p,u):Math.sqrt(l)},u}function Ni(e){return function(){return e}}function mM(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new O5(t)}function xM(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function kE(e){this._context=e}kE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function yM(e){return new kE(e)}function vM(e){return e[0]}function wM(e){return e[1]}function bM(e,t){var n=Ni(!0),r=null,i=yM,o=null,a=mM(s);e=typeof e=="function"?e:e===void 0?vM:Ni(e),t=typeof t=="function"?t:t===void 0?wM:Ni(t);function s(l){var u,d=(l=xM(l)).length,f,h=!1,p;for(r==null&&(o=i(p=a())),u=0;u<=d;++u)!(u<d&&n(f=l[u],u,l))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+e(f,u,l),+t(f,u,l));if(p)return o=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ni(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ni(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:Ni(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),s):r},s}function f1(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function _E(e){this._context=e}_E.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:f1(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:f1(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kM(e){return new _E(e)}const Rs=e=>()=>e;function _M(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function tr(e,t,n){this.k=e,this.x=t,this.y=n}tr.prototype={constructor:tr,scale:function(e){return e===1?this:new tr(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new tr(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Fl=new tr(1,0,0);tr.prototype;function Ac(e){e.stopImmediatePropagation()}function Ho(e){e.preventDefault(),e.stopImmediatePropagation()}function SM(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function CM(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function h1(){return this.__zoom||Fl}function jM(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function EM(){return navigator.maxTouchPoints||"ontouchstart"in this}function TM(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function SE(){var e=SM,t=CM,n=TM,r=jM,i=EM,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=Sz,u=Qa("start","zoom","end"),d,f,h,p=500,m=150,g=0,v=10;function x(R){R.property("__zoom",h1).on("wheel.zoom",b,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",_).filter(i).on("touchstart.zoom",L).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",$).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}x.transform=function(R,F,D,V){var N=R.selection?R.selection():R;N.property("__zoom",h1),R!==N?E(R,F,D,V):N.interrupt().each(function(){C(this,arguments).event(V).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},x.scaleBy=function(R,F,D,V){x.scaleTo(R,function(){var N=this.__zoom.k,q=typeof F=="function"?F.apply(this,arguments):F;return N*q},D,V)},x.scaleTo=function(R,F,D,V){x.transform(R,function(){var N=t.apply(this,arguments),q=this.__zoom,S=D==null?k(N):typeof D=="function"?D.apply(this,arguments):D,W=q.invert(S),K=typeof F=="function"?F.apply(this,arguments):F;return n(w(y(q,K),S,W),N,a)},D,V)},x.translateBy=function(R,F,D,V){x.transform(R,function(){return n(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof D=="function"?D.apply(this,arguments):D),t.apply(this,arguments),a)},null,V)},x.translateTo=function(R,F,D,V,N){x.transform(R,function(){var q=t.apply(this,arguments),S=this.__zoom,W=V==null?k(q):typeof V=="function"?V.apply(this,arguments):V;return n(Fl.translate(W[0],W[1]).scale(S.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof D=="function"?-D.apply(this,arguments):-D),q,a)},V,N)};function y(R,F){return F=Math.max(o[0],Math.min(o[1],F)),F===R.k?R:new tr(F,R.x,R.y)}function w(R,F,D){var V=F[0]-D[0]*R.k,N=F[1]-D[1]*R.k;return V===R.x&&N===R.y?R:new tr(R.k,V,N)}function k(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function E(R,F,D,V){R.on("start.zoom",function(){C(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(V).end()}).tween("zoom",function(){var N=this,q=arguments,S=C(N,q).event(V),W=t.apply(N,q),K=D==null?k(W):typeof D=="function"?D.apply(N,q):D,I=Math.max(W[1][0]-W[0][0],W[1][1]-W[0][1]),re=N.__zoom,ye=typeof F=="function"?F.apply(N,q):F,le=l(re.invert(K).concat(I/re.k),ye.invert(K).concat(I/ye.k));return function(Ie){if(Ie===1)Ie=ye;else{var Ue=le(Ie),At=I/Ue[2];Ie=new tr(At,K[0]-Ue[0]*At,K[1]-Ue[1]*At)}S.zoom(null,Ie)}})}function C(R,F,D){return!D&&R.__zooming||new j(R,F)}function j(R,F){this.that=R,this.args=F,this.active=0,this.sourceEvent=null,this.extent=t.apply(R,F),this.taps=0}j.prototype={event:function(R){return R&&(this.sourceEvent=R),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(R,F){return this.mouse&&R!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=F.invert(this.touch1[0])),this.that.__zoom=F,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(R){var F=St(this.that).datum();u.call(R,this.that,new _M(R,{sourceEvent:this.sourceEvent,target:x,transform:this.that.__zoom,dispatch:u}),F)}};function b(R,...F){if(!e.apply(this,arguments))return;var D=C(this,F).event(R),V=this.__zoom,N=Math.max(o[0],Math.min(o[1],V.k*Math.pow(2,r.apply(this,arguments)))),q=Qn(R);if(D.wheel)(D.mouse[0][0]!==q[0]||D.mouse[0][1]!==q[1])&&(D.mouse[1]=V.invert(D.mouse[0]=q)),clearTimeout(D.wheel);else{if(V.k===N)return;D.mouse=[q,V.invert(q)],il(this),D.start()}Ho(R),D.wheel=setTimeout(S,m),D.zoom("mouse",n(w(y(V,N),D.mouse[0],D.mouse[1]),D.extent,a));function S(){D.wheel=null,D.end()}}function A(R,...F){if(h||!e.apply(this,arguments))return;var D=R.currentTarget,V=C(this,F,!0).event(R),N=St(R.view).on("mousemove.zoom",K,!0).on("mouseup.zoom",I,!0),q=Qn(R,D),S=R.clientX,W=R.clientY;aE(R.view),Ac(R),V.mouse=[q,this.__zoom.invert(q)],il(this),V.start();function K(re){if(Ho(re),!V.moved){var ye=re.clientX-S,le=re.clientY-W;V.moved=ye*ye+le*le>g}V.event(re).zoom("mouse",n(w(V.that.__zoom,V.mouse[0]=Qn(re,D),V.mouse[1]),V.extent,a))}function I(re){N.on("mousemove.zoom mouseup.zoom",null),sE(re.view,V.moved),Ho(re),V.event(re).end()}}function _(R,...F){if(e.apply(this,arguments)){var D=this.__zoom,V=Qn(R.changedTouches?R.changedTouches[0]:R,this),N=D.invert(V),q=D.k*(R.shiftKey?.5:2),S=n(w(y(D,q),V,N),t.apply(this,F),a);Ho(R),s>0?St(this).transition().duration(s).call(E,S,V,R):St(this).call(x.transform,S,V,R)}}function L(R,...F){if(e.apply(this,arguments)){var D=R.touches,V=D.length,N=C(this,F,R.changedTouches.length===V).event(R),q,S,W,K;for(Ac(R),S=0;S<V;++S)W=D[S],K=Qn(W,this),K=[K,this.__zoom.invert(K),W.identifier],N.touch0?!N.touch1&&N.touch0[2]!==K[2]&&(N.touch1=K,N.taps=0):(N.touch0=K,q=!0,N.taps=1+!!d);d&&(d=clearTimeout(d)),q&&(N.taps<2&&(f=K[0],d=setTimeout(function(){d=null},p)),il(this),N.start())}}function P(R,...F){if(this.__zooming){var D=C(this,F).event(R),V=R.changedTouches,N=V.length,q,S,W,K;for(Ho(R),q=0;q<N;++q)S=V[q],W=Qn(S,this),D.touch0&&D.touch0[2]===S.identifier?D.touch0[0]=W:D.touch1&&D.touch1[2]===S.identifier&&(D.touch1[0]=W);if(S=D.that.__zoom,D.touch1){var I=D.touch0[0],re=D.touch0[1],ye=D.touch1[0],le=D.touch1[1],Ie=(Ie=ye[0]-I[0])*Ie+(Ie=ye[1]-I[1])*Ie,Ue=(Ue=le[0]-re[0])*Ue+(Ue=le[1]-re[1])*Ue;S=y(S,Math.sqrt(Ie/Ue)),W=[(I[0]+ye[0])/2,(I[1]+ye[1])/2],K=[(re[0]+le[0])/2,(re[1]+le[1])/2]}else if(D.touch0)W=D.touch0[0],K=D.touch0[1];else return;D.zoom("touch",n(w(S,W,K),D.extent,a))}}function $(R,...F){if(this.__zooming){var D=C(this,F).event(R),V=R.changedTouches,N=V.length,q,S;for(Ac(R),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),q=0;q<N;++q)S=V[q],D.touch0&&D.touch0[2]===S.identifier?delete D.touch0:D.touch1&&D.touch1[2]===S.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(S=Qn(S,this),Math.hypot(f[0]-S[0],f[1]-S[1])<v)){var W=St(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return x.wheelDelta=function(R){return arguments.length?(r=typeof R=="function"?R:Rs(+R),x):r},x.filter=function(R){return arguments.length?(e=typeof R=="function"?R:Rs(!!R),x):e},x.touchable=function(R){return arguments.length?(i=typeof R=="function"?R:Rs(!!R),x):i},x.extent=function(R){return arguments.length?(t=typeof R=="function"?R:Rs([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),x):t},x.scaleExtent=function(R){return arguments.length?(o[0]=+R[0],o[1]=+R[1],x):[o[0],o[1]]},x.translateExtent=function(R){return arguments.length?(a[0][0]=+R[0][0],a[1][0]=+R[1][0],a[0][1]=+R[0][1],a[1][1]=+R[1][1],x):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},x.constrain=function(R){return arguments.length?(n=R,x):n},x.duration=function(R){return arguments.length?(s=+R,x):s},x.interpolate=function(R){return arguments.length?(l=R,x):l},x.on=function(){var R=u.on.apply(u,arguments);return R===u?x:R},x.clickDistance=function(R){return arguments.length?(g=(R=+R)*R,x):Math.sqrt(g)},x.tapDistance=function(R){return arguments.length?(v=+R,x):v},x}const IM=({value:e,onChange:t,showAll:n=!0})=>{const r=n?["all",...Uv]:[...Uv];return c.jsx("div",{style:Lc.container,children:r.map(i=>c.jsx("button",{onClick:()=>t(i),style:{...Lc.button,...e===i?Lc.buttonActive:{},...i!=="all"?{borderLeftColor:me(i)}:{}},children:i==="all"?"All":i.charAt(0).toUpperCase()+i.slice(1)},i))})},Lc={container:{display:"flex",gap:"4px",flexWrap:"wrap"},button:{padding:"6px 12px",fontSize:"11px",border:"1px solid #d0d7de",borderLeft:"3px solid transparent",backgroundColor:"#ffffff",color:"#57606a",borderRadius:"4px",cursor:"pointer",transition:"all 0.2s"},buttonActive:{backgroundColor:"#ddf4ff",color:"#0969da",borderColor:"#0969da"}},RM=({graphData:e})=>{const t=T.useRef(null),n=T.useRef(null),[r,i]=T.useState(null),[o,a]=T.useState("all"),[s,l]=T.useState(""),u=T.useRef(null),d=T.useCallback(m=>{i(m)},[]),f=T.useCallback(m=>{const g=e.nodes.find(v=>v.id===m);g&&i(g)},[e.nodes]),h=T.useCallback(()=>{i(null)},[]);T.useEffect(()=>{if(!t.current||!n.current)return;const m=St(t.current),g=n.current,v=g.clientWidth,x=g.clientHeight;m.selectAll("*").remove();const y=m.append("g"),w=SE().scaleExtent([.1,4]).on("zoom",_=>y.attr("transform",_.transform));m.call(w);const k=e.nodes.map(_=>({..._})),E=new Map(k.map(_=>[_.id,_])),C=e.edges.map(_=>({source:E.get(_.from_node_id),target:E.get(_.to_node_id),type:_.edge_type,rationale:_.rationale})).filter(_=>_.source&&_.target),j=pM(k).force("link",aM(C).id(_=>_.id).distance(80)).force("charge",gM().strength(-200)).force("center",B5(v/2,x/2)).force("collision",iM().radius(30));u.current=j;const b=y.append("g").selectAll("line").data(C).join("line").attr("class","link").attr("stroke",_=>_.type==="chosen"?"#22c55e":_.type==="rejected"?"#ef4444":"#3b82f6").attr("stroke-width",1.5).attr("stroke-opacity",.6).attr("stroke-dasharray",_=>_.type==="rejected"?"5,5":null),A=y.append("g").selectAll(".node").data(k).join("g").attr("class","node").style("cursor","pointer").call(JP().on("start",(_,L)=>{_.active||j.alphaTarget(.3).restart(),L.fx=L.x,L.fy=L.y}).on("drag",(_,L)=>{L.fx=_.x,L.fy=_.y}).on("end",(_,L)=>{_.active||j.alphaTarget(0),L.fx=null,L.fy=null}));return A.append("circle").attr("r",_=>_.node_type==="goal"?18:_.node_type==="decision"?15:12).attr("fill",_=>me(_.node_type)).attr("stroke","#fff").attr("stroke-width",2),A.filter(_=>_.node_type==="goal"||_.node_type==="decision").append("text").attr("dy",30).attr("text-anchor","middle").attr("fill","#57606a").attr("font-size","10px").text(_=>Ee(_.title,20)),A.on("click",(_,L)=>{d(L)}),A.append("title").text(_=>{const L=Gr(_);return`${_.title}
${_.node_type}${L!==null?` · ${L}%`:""}`}),j.on("tick",()=>{b.attr("x1",_=>_.source.x).attr("y1",_=>_.source.y).attr("x2",_=>_.target.x).attr("y2",_=>_.target.y),A.attr("transform",_=>`translate(${_.x},${_.y})`)}),()=>{j.stop()}},[e,d]),T.useEffect(()=>{if(!t.current)return;const m=St(t.current),g=s.toLowerCase();m.selectAll(".node").style("opacity",v=>{var x;return s&&!(v.title.toLowerCase().includes(g)||(((x=v.description)==null?void 0:x.toLowerCase().includes(g))??!1))||o!=="all"&&v.node_type!==o?.15:1})},[o,s]),T.useEffect(()=>{if(!t.current)return;const m=St(t.current);m.selectAll(".node").classed("selected",g=>g.id===(r==null?void 0:r.id)),m.selectAll(".link").attr("stroke-width",g=>g.source.id===(r==null?void 0:r.id)||g.target.id===(r==null?void 0:r.id)?3:1.5).attr("stroke-opacity",g=>g.source.id===(r==null?void 0:r.id)||g.target.id===(r==null?void 0:r.id)?1:.6)},[r]);const p=r?UA(r.id,e):[];return c.jsxs("div",{style:Le.container,children:[c.jsxs("div",{style:Le.controls,children:[c.jsx("h2",{style:Le.title,children:"Graph Explorer"}),c.jsx(IM,{value:o,onChange:a}),c.jsx("input",{type:"text",placeholder:"Search nodes...",value:s,onChange:m=>l(m.target.value),style:Le.search}),c.jsx("div",{style:Le.legend,children:Object.entries(yy).map(([m,g])=>c.jsxs("div",{style:Le.legendItem,children:[c.jsx("div",{style:{...Le.legendDot,backgroundColor:g}}),c.jsx("span",{children:m.charAt(0).toUpperCase()+m.slice(1)})]},m))})]}),c.jsx("div",{ref:n,style:Le.svgContainer,children:c.jsx("svg",{ref:t,style:Le.svg})}),r&&c.jsxs("div",{style:Le.detailPanel,children:[c.jsx("button",{onClick:h,style:Le.closeBtn,children:"×"}),c.jsxs("div",{style:Le.detailHeader,children:[c.jsx(xt,{type:r.node_type}),c.jsx(Xa,{confidence:Gr(r)}),c.jsx(ki,{commit:_t(r)})]}),c.jsx("h3",{style:Le.detailTitle,children:r.title}),c.jsxs("p",{style:Le.detailMeta,children:["Node #",r.id," · ",new Date(r.created_at).toLocaleString()]}),r.description&&c.jsxs("div",{style:Le.detailSection,children:[c.jsx("h4",{style:Le.sectionTitle,children:"Description"}),c.jsx("p",{style:Le.description,children:r.description})]}),p.length>1&&c.jsxs("div",{style:Le.detailSection,children:[c.jsx("h4",{style:Le.sectionTitle,children:"Path to Root"}),p.map(m=>c.jsxs("div",{onClick:()=>f(m.id),style:Le.pathNode,children:[c.jsx(xt,{type:m.node_type,size:"sm"}),c.jsx("span",{children:Ee(m.title,35)})]},m.id))]}),c.jsx(AM,{node:r,graphData:e,onSelectNode:f})]})]})},AM=({node:e,graphData:t,onSelectNode:n})=>{const r=t.edges.filter(a=>a.to_node_id===e.id),i=t.edges.filter(a=>a.from_node_id===e.id),o=a=>t.nodes.find(s=>s.id===a);return c.jsxs(c.Fragment,{children:[r.length>0&&c.jsxs("div",{style:Le.detailSection,children:[c.jsxs("h4",{style:Le.sectionTitle,children:["Incoming (",r.length,")"]}),r.map(a=>{const s=o(a.from_node_id);return c.jsxs("div",{onClick:()=>n(a.from_node_id),style:Le.connection,children:[c.jsx(xt,{type:(s==null?void 0:s.node_type)||"observation",size:"sm"}),c.jsx("span",{children:Ee((s==null?void 0:s.title)||"Unknown",30)})]},a.id)})]}),i.length>0&&c.jsxs("div",{style:Le.detailSection,children:[c.jsxs("h4",{style:Le.sectionTitle,children:["Outgoing (",i.length,")"]}),i.map(a=>{const s=o(a.to_node_id);return c.jsxs("div",{onClick:()=>n(a.to_node_id),style:Le.connection,children:[c.jsx(Pl,{type:a.edge_type}),c.jsx(xt,{type:(s==null?void 0:s.node_type)||"observation",size:"sm"}),c.jsx("span",{children:Ee((s==null?void 0:s.title)||"Unknown",25)}),a.rationale&&c.jsx("span",{style:Le.rationale,children:a.rationale})]},a.id)})]})]})},Le={container:{height:"100%",display:"flex",position:"relative",backgroundColor:"#ffffff"},controls:{position:"absolute",top:"20px",left:"20px",backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",padding:"15px",borderRadius:"8px",zIndex:10,maxWidth:"250px"},title:{fontSize:"16px",margin:"0 0 12px 0",color:"#24292f"},search:{width:"100%",padding:"8px 12px",marginTop:"12px",backgroundColor:"#ffffff",border:"1px solid #d0d7de",borderRadius:"4px",color:"#24292f",fontSize:"13px"},legend:{marginTop:"15px",display:"flex",flexDirection:"column",gap:"6px"},legendItem:{display:"flex",alignItems:"center",gap:"8px",fontSize:"11px",color:"#57606a"},legendDot:{width:"10px",height:"10px",borderRadius:"50%"},svgContainer:{flex:1,height:"100%"},svg:{width:"100%",height:"100%"},detailPanel:{position:"absolute",top:"20px",right:"20px",bottom:"20px",width:"350px",backgroundColor:"#ffffff",border:"1px solid #d0d7de",borderRadius:"8px",padding:"20px",overflowY:"auto",zIndex:10},closeBtn:{position:"absolute",top:"10px",right:"10px",width:"28px",height:"28px",border:"none",background:"#f6f8fa",color:"#57606a",borderRadius:"4px",fontSize:"18px",cursor:"pointer"},detailHeader:{display:"flex",gap:"8px",marginBottom:"10px",flexWrap:"wrap"},detailTitle:{fontSize:"16px",margin:"0 0 8px 0",color:"#24292f"},detailMeta:{fontSize:"12px",color:"#6e7781",margin:0},detailSection:{marginTop:"20px"},sectionTitle:{fontSize:"12px",color:"#57606a",margin:"0 0 10px 0",textTransform:"uppercase"},description:{fontSize:"13px",color:"#57606a",lineHeight:1.5,margin:0},pathNode:{display:"flex",alignItems:"center",gap:"8px",padding:"8px",backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",borderRadius:"4px",marginBottom:"6px",cursor:"pointer",fontSize:"12px",color:"#24292f"},connection:{display:"flex",alignItems:"center",gap:"8px",padding:"8px",backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",borderRadius:"4px",marginBottom:"6px",cursor:"pointer",fontSize:"12px",color:"#24292f"},rationale:{color:"#6e7781",fontSize:"11px",marginLeft:"auto"}};function Ty(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Pc,p1;function LM(){if(p1)return Pc;p1=1;function e(){this.__data__=[],this.size=0}return Pc=e,Pc}var zc,g1;function jo(){if(g1)return zc;g1=1;function e(t,n){return t===n||t!==t&&n!==n}return zc=e,zc}var Mc,m1;function vu(){if(m1)return Mc;m1=1;var e=jo();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Mc=t,Mc}var Nc,x1;function PM(){if(x1)return Nc;x1=1;var e=vu(),t=Array.prototype,n=t.splice;function r(i){var o=this.__data__,a=e(o,i);if(a<0)return!1;var s=o.length-1;return a==s?o.pop():n.call(o,a,1),--this.size,!0}return Nc=r,Nc}var Dc,y1;function zM(){if(y1)return Dc;y1=1;var e=vu();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return Dc=t,Dc}var Oc,v1;function MM(){if(v1)return Oc;v1=1;var e=vu();function t(n){return e(this.__data__,n)>-1}return Oc=t,Oc}var Bc,w1;function NM(){if(w1)return Bc;w1=1;var e=vu();function t(n,r){var i=this.__data__,o=e(i,n);return o<0?(++this.size,i.push([n,r])):i[o][1]=r,this}return Bc=t,Bc}var Fc,b1;function wu(){if(b1)return Fc;b1=1;var e=LM(),t=PM(),n=zM(),r=MM(),i=NM();function o(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,Fc=o,Fc}var qc,k1;function DM(){if(k1)return qc;k1=1;var e=wu();function t(){this.__data__=new e,this.size=0}return qc=t,qc}var $c,_1;function OM(){if(_1)return $c;_1=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return $c=e,$c}var Hc,S1;function BM(){if(S1)return Hc;S1=1;function e(t){return this.__data__.get(t)}return Hc=e,Hc}var Uc,C1;function FM(){if(C1)return Uc;C1=1;function e(t){return this.__data__.has(t)}return Uc=e,Uc}var Wc,j1;function CE(){if(j1)return Wc;j1=1;var e=typeof Ir=="object"&&Ir&&Ir.Object===Object&&Ir;return Wc=e,Wc}var Vc,E1;function In(){if(E1)return Vc;E1=1;var e=CE(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Vc=n,Vc}var Gc,T1;function Eo(){if(T1)return Gc;T1=1;var e=In(),t=e.Symbol;return Gc=t,Gc}var Yc,I1;function qM(){if(I1)return Yc;I1=1;var e=Eo(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function o(a){var s=n.call(a,i),l=a[i];try{a[i]=void 0;var u=!0}catch{}var d=r.call(a);return u&&(s?a[i]=l:delete a[i]),d}return Yc=o,Yc}var Kc,R1;function $M(){if(R1)return Kc;R1=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Kc=n,Kc}var Xc,A1;function Ti(){if(A1)return Xc;A1=1;var e=Eo(),t=qM(),n=$M(),r="[object Null]",i="[object Undefined]",o=e?e.toStringTag:void 0;function a(s){return s==null?s===void 0?i:r:o&&o in Object(s)?t(s):n(s)}return Xc=a,Xc}var Qc,L1;function fn(){if(L1)return Qc;L1=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Qc=e,Qc}var Jc,P1;function es(){if(P1)return Jc;P1=1;var e=Ti(),t=fn(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",o="[object Proxy]";function a(s){if(!t(s))return!1;var l=e(s);return l==r||l==i||l==n||l==o}return Jc=a,Jc}var Zc,z1;function HM(){if(z1)return Zc;z1=1;var e=In(),t=e["__core-js_shared__"];return Zc=t,Zc}var ed,M1;function UM(){if(M1)return ed;M1=1;var e=HM(),t=function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!t&&t in r}return ed=n,ed}var td,N1;function jE(){if(N1)return td;N1=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return td=n,td}var nd,D1;function WM(){if(D1)return nd;D1=1;var e=es(),t=UM(),n=fn(),r=jE(),i=/[\\^$.*+?()[\]{}|]/g,o=/^\[object .+?Constructor\]$/,a=Function.prototype,s=Object.prototype,l=a.toString,u=s.hasOwnProperty,d=RegExp("^"+l.call(u).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(h){if(!n(h)||t(h))return!1;var p=e(h)?d:o;return p.test(r(h))}return nd=f,nd}var rd,O1;function VM(){if(O1)return rd;O1=1;function e(t,n){return t==null?void 0:t[n]}return rd=e,rd}var id,B1;function Ii(){if(B1)return id;B1=1;var e=WM(),t=VM();function n(r,i){var o=t(r,i);return e(o)?o:void 0}return id=n,id}var od,F1;function Iy(){if(F1)return od;F1=1;var e=Ii(),t=In(),n=e(t,"Map");return od=n,od}var ad,q1;function bu(){if(q1)return ad;q1=1;var e=Ii(),t=e(Object,"create");return ad=t,ad}var sd,$1;function GM(){if($1)return sd;$1=1;var e=bu();function t(){this.__data__=e?e(null):{},this.size=0}return sd=t,sd}var ld,H1;function YM(){if(H1)return ld;H1=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return ld=e,ld}var ud,U1;function KM(){if(U1)return ud;U1=1;var e=bu(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(o){var a=this.__data__;if(e){var s=a[o];return s===t?void 0:s}return r.call(a,o)?a[o]:void 0}return ud=i,ud}var cd,W1;function XM(){if(W1)return cd;W1=1;var e=bu(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var o=this.__data__;return e?o[i]!==void 0:n.call(o,i)}return cd=r,cd}var dd,V1;function QM(){if(V1)return dd;V1=1;var e=bu(),t="__lodash_hash_undefined__";function n(r,i){var o=this.__data__;return this.size+=this.has(r)?0:1,o[r]=e&&i===void 0?t:i,this}return dd=n,dd}var fd,G1;function JM(){if(G1)return fd;G1=1;var e=GM(),t=YM(),n=KM(),r=XM(),i=QM();function o(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,fd=o,fd}var hd,Y1;function ZM(){if(Y1)return hd;Y1=1;var e=JM(),t=wu(),n=Iy();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return hd=r,hd}var pd,K1;function e3(){if(K1)return pd;K1=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return pd=e,pd}var gd,X1;function ku(){if(X1)return gd;X1=1;var e=e3();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return gd=t,gd}var md,Q1;function t3(){if(Q1)return md;Q1=1;var e=ku();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return md=t,md}var xd,J1;function n3(){if(J1)return xd;J1=1;var e=ku();function t(n){return e(this,n).get(n)}return xd=t,xd}var yd,Z1;function r3(){if(Z1)return yd;Z1=1;var e=ku();function t(n){return e(this,n).has(n)}return yd=t,yd}var vd,ew;function i3(){if(ew)return vd;ew=1;var e=ku();function t(n,r){var i=e(this,n),o=i.size;return i.set(n,r),this.size+=i.size==o?0:1,this}return vd=t,vd}var wd,tw;function Ry(){if(tw)return wd;tw=1;var e=ZM(),t=t3(),n=n3(),r=r3(),i=i3();function o(a){var s=-1,l=a==null?0:a.length;for(this.clear();++s<l;){var u=a[s];this.set(u[0],u[1])}}return o.prototype.clear=e,o.prototype.delete=t,o.prototype.get=n,o.prototype.has=r,o.prototype.set=i,wd=o,wd}var bd,nw;function o3(){if(nw)return bd;nw=1;var e=wu(),t=Iy(),n=Ry(),r=200;function i(o,a){var s=this.__data__;if(s instanceof e){var l=s.__data__;if(!t||l.length<r-1)return l.push([o,a]),this.size=++s.size,this;s=this.__data__=new n(l)}return s.set(o,a),this.size=s.size,this}return bd=i,bd}var kd,rw;function _u(){if(rw)return kd;rw=1;var e=wu(),t=DM(),n=OM(),r=BM(),i=FM(),o=o3();function a(s){var l=this.__data__=new e(s);this.size=l.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=i,a.prototype.set=o,kd=a,kd}var _d,iw;function Ay(){if(iw)return _d;iw=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i&&n(t[r],r,t)!==!1;);return t}return _d=e,_d}var Sd,ow;function EE(){if(ow)return Sd;ow=1;var e=Ii(),t=function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}}();return Sd=t,Sd}var Cd,aw;function Su(){if(aw)return Cd;aw=1;var e=EE();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return Cd=t,Cd}var jd,sw;function Cu(){if(sw)return jd;sw=1;var e=Su(),t=jo(),n=Object.prototype,r=n.hasOwnProperty;function i(o,a,s){var l=o[a];(!(r.call(o,a)&&t(l,s))||s===void 0&&!(a in o))&&e(o,a,s)}return jd=i,jd}var Ed,lw;function ts(){if(lw)return Ed;lw=1;var e=Cu(),t=Su();function n(r,i,o,a){var s=!o;o||(o={});for(var l=-1,u=i.length;++l<u;){var d=i[l],f=a?a(o[d],r[d],d,o,r):void 0;f===void 0&&(f=r[d]),s?t(o,d,f):e(o,d,f)}return o}return Ed=n,Ed}var Td,uw;function a3(){if(uw)return Td;uw=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return Td=e,Td}var Id,cw;function Un(){if(cw)return Id;cw=1;function e(t){return t!=null&&typeof t=="object"}return Id=e,Id}var Rd,dw;function s3(){if(dw)return Rd;dw=1;var e=Ti(),t=Un(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return Rd=r,Rd}var Ad,fw;function ns(){if(fw)return Ad;fw=1;var e=s3(),t=Un(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,o=e(function(){return arguments}())?e:function(a){return t(a)&&r.call(a,"callee")&&!i.call(a,"callee")};return Ad=o,Ad}var Ld,hw;function Ze(){if(hw)return Ld;hw=1;var e=Array.isArray;return Ld=e,Ld}var ea={exports:{}},Pd,pw;function l3(){if(pw)return Pd;pw=1;function e(){return!1}return Pd=e,Pd}ea.exports;var gw;function To(){return gw||(gw=1,function(e,t){var n=In(),r=l3(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===i,s=a?n.Buffer:void 0,l=s?s.isBuffer:void 0,u=l||r;e.exports=u}(ea,ea.exports)),ea.exports}var zd,mw;function ju(){if(mw)return zd;mw=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var o=typeof r;return i=i??e,!!i&&(o=="number"||o!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return zd=n,zd}var Md,xw;function Ly(){if(xw)return Md;xw=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Md=t,Md}var Nd,yw;function u3(){if(yw)return Nd;yw=1;var e=Ti(),t=Ly(),n=Un(),r="[object Arguments]",i="[object Array]",o="[object Boolean]",a="[object Date]",s="[object Error]",l="[object Function]",u="[object Map]",d="[object Number]",f="[object Object]",h="[object RegExp]",p="[object Set]",m="[object String]",g="[object WeakMap]",v="[object ArrayBuffer]",x="[object DataView]",y="[object Float32Array]",w="[object Float64Array]",k="[object Int8Array]",E="[object Int16Array]",C="[object Int32Array]",j="[object Uint8Array]",b="[object Uint8ClampedArray]",A="[object Uint16Array]",_="[object Uint32Array]",L={};L[y]=L[w]=L[k]=L[E]=L[C]=L[j]=L[b]=L[A]=L[_]=!0,L[r]=L[i]=L[v]=L[o]=L[x]=L[a]=L[s]=L[l]=L[u]=L[d]=L[f]=L[h]=L[p]=L[m]=L[g]=!1;function P($){return n($)&&t($.length)&&!!L[e($)]}return Nd=P,Nd}var Dd,vw;function Eu(){if(vw)return Dd;vw=1;function e(t){return function(n){return t(n)}}return Dd=e,Dd}var ta={exports:{}};ta.exports;var ww;function Py(){return ww||(ww=1,function(e,t){var n=CE(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s}(ta,ta.exports)),ta.exports}var Od,bw;function rs(){if(bw)return Od;bw=1;var e=u3(),t=Eu(),n=Py(),r=n&&n.isTypedArray,i=r?t(r):e;return Od=i,Od}var Bd,kw;function TE(){if(kw)return Bd;kw=1;var e=a3(),t=ns(),n=Ze(),r=To(),i=ju(),o=rs(),a=Object.prototype,s=a.hasOwnProperty;function l(u,d){var f=n(u),h=!f&&t(u),p=!f&&!h&&r(u),m=!f&&!h&&!p&&o(u),g=f||h||p||m,v=g?e(u.length,String):[],x=v.length;for(var y in u)(d||s.call(u,y))&&!(g&&(y=="length"||p&&(y=="offset"||y=="parent")||m&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||i(y,x)))&&v.push(y);return v}return Bd=l,Bd}var Fd,_w;function Tu(){if(_w)return Fd;_w=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return Fd=t,Fd}var qd,Sw;function IE(){if(Sw)return qd;Sw=1;function e(t,n){return function(r){return t(n(r))}}return qd=e,qd}var $d,Cw;function c3(){if(Cw)return $d;Cw=1;var e=IE(),t=e(Object.keys,Object);return $d=t,$d}var Hd,jw;function zy(){if(jw)return Hd;jw=1;var e=Tu(),t=c3(),n=Object.prototype,r=n.hasOwnProperty;function i(o){if(!e(o))return t(o);var a=[];for(var s in Object(o))r.call(o,s)&&s!="constructor"&&a.push(s);return a}return Hd=i,Hd}var Ud,Ew;function fr(){if(Ew)return Ud;Ew=1;var e=es(),t=Ly();function n(r){return r!=null&&t(r.length)&&!e(r)}return Ud=n,Ud}var Wd,Tw;function ei(){if(Tw)return Wd;Tw=1;var e=TE(),t=zy(),n=fr();function r(i){return n(i)?e(i):t(i)}return Wd=r,Wd}var Vd,Iw;function d3(){if(Iw)return Vd;Iw=1;var e=ts(),t=ei();function n(r,i){return r&&e(i,t(i),r)}return Vd=n,Vd}var Gd,Rw;function f3(){if(Rw)return Gd;Rw=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return Gd=e,Gd}var Yd,Aw;function h3(){if(Aw)return Yd;Aw=1;var e=fn(),t=Tu(),n=f3(),r=Object.prototype,i=r.hasOwnProperty;function o(a){if(!e(a))return n(a);var s=t(a),l=[];for(var u in a)u=="constructor"&&(s||!i.call(a,u))||l.push(u);return l}return Yd=o,Yd}var Kd,Lw;function Ri(){if(Lw)return Kd;Lw=1;var e=TE(),t=h3(),n=fr();function r(i){return n(i)?e(i,!0):t(i)}return Kd=r,Kd}var Xd,Pw;function p3(){if(Pw)return Xd;Pw=1;var e=ts(),t=Ri();function n(r,i){return r&&e(i,t(i),r)}return Xd=n,Xd}var na={exports:{}};na.exports;var zw;function RE(){return zw||(zw=1,function(e,t){var n=In(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o?n.Buffer:void 0,s=a?a.allocUnsafe:void 0;function l(u,d){if(d)return u.slice();var f=u.length,h=s?s(f):new u.constructor(f);return u.copy(h),h}e.exports=l}(na,na.exports)),na.exports}var Qd,Mw;function AE(){if(Mw)return Qd;Mw=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return Qd=e,Qd}var Jd,Nw;function LE(){if(Nw)return Jd;Nw=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=0,a=[];++r<i;){var s=t[r];n(s,r,t)&&(a[o++]=s)}return a}return Jd=e,Jd}var Zd,Dw;function PE(){if(Dw)return Zd;Dw=1;function e(){return[]}return Zd=e,Zd}var ef,Ow;function My(){if(Ow)return ef;Ow=1;var e=LE(),t=PE(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,o=i?function(a){return a==null?[]:(a=Object(a),e(i(a),function(s){return r.call(a,s)}))}:t;return ef=o,ef}var tf,Bw;function g3(){if(Bw)return tf;Bw=1;var e=ts(),t=My();function n(r,i){return e(r,t(r),i)}return tf=n,tf}var nf,Fw;function Ny(){if(Fw)return nf;Fw=1;function e(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}return nf=e,nf}var rf,qw;function Iu(){if(qw)return rf;qw=1;var e=IE(),t=e(Object.getPrototypeOf,Object);return rf=t,rf}var of,$w;function zE(){if($w)return of;$w=1;var e=Ny(),t=Iu(),n=My(),r=PE(),i=Object.getOwnPropertySymbols,o=i?function(a){for(var s=[];a;)e(s,n(a)),a=t(a);return s}:r;return of=o,of}var af,Hw;function m3(){if(Hw)return af;Hw=1;var e=ts(),t=zE();function n(r,i){return e(r,t(r),i)}return af=n,af}var sf,Uw;function ME(){if(Uw)return sf;Uw=1;var e=Ny(),t=Ze();function n(r,i,o){var a=i(r);return t(r)?a:e(a,o(r))}return sf=n,sf}var lf,Ww;function NE(){if(Ww)return lf;Ww=1;var e=ME(),t=My(),n=ei();function r(i){return e(i,n,t)}return lf=r,lf}var uf,Vw;function x3(){if(Vw)return uf;Vw=1;var e=ME(),t=zE(),n=Ri();function r(i){return e(i,n,t)}return uf=r,uf}var cf,Gw;function y3(){if(Gw)return cf;Gw=1;var e=Ii(),t=In(),n=e(t,"DataView");return cf=n,cf}var df,Yw;function v3(){if(Yw)return df;Yw=1;var e=Ii(),t=In(),n=e(t,"Promise");return df=n,df}var ff,Kw;function DE(){if(Kw)return ff;Kw=1;var e=Ii(),t=In(),n=e(t,"Set");return ff=n,ff}var hf,Xw;function w3(){if(Xw)return hf;Xw=1;var e=Ii(),t=In(),n=e(t,"WeakMap");return hf=n,hf}var pf,Qw;function Io(){if(Qw)return pf;Qw=1;var e=y3(),t=Iy(),n=v3(),r=DE(),i=w3(),o=Ti(),a=jE(),s="[object Map]",l="[object Object]",u="[object Promise]",d="[object Set]",f="[object WeakMap]",h="[object DataView]",p=a(e),m=a(t),g=a(n),v=a(r),x=a(i),y=o;return(e&&y(new e(new ArrayBuffer(1)))!=h||t&&y(new t)!=s||n&&y(n.resolve())!=u||r&&y(new r)!=d||i&&y(new i)!=f)&&(y=function(w){var k=o(w),E=k==l?w.constructor:void 0,C=E?a(E):"";if(C)switch(C){case p:return h;case m:return s;case g:return u;case v:return d;case x:return f}return k}),pf=y,pf}var gf,Jw;function b3(){if(Jw)return gf;Jw=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var i=r.length,o=new r.constructor(i);return i&&typeof r[0]=="string"&&t.call(r,"index")&&(o.index=r.index,o.input=r.input),o}return gf=n,gf}var mf,Zw;function OE(){if(Zw)return mf;Zw=1;var e=In(),t=e.Uint8Array;return mf=t,mf}var xf,eb;function Dy(){if(eb)return xf;eb=1;var e=OE();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return xf=t,xf}var yf,tb;function k3(){if(tb)return yf;tb=1;var e=Dy();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return yf=t,yf}var vf,nb;function _3(){if(nb)return vf;nb=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return vf=t,vf}var wf,rb;function S3(){if(rb)return wf;rb=1;var e=Eo(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(i){return n?Object(n.call(i)):{}}return wf=r,wf}var bf,ib;function BE(){if(ib)return bf;ib=1;var e=Dy();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return bf=t,bf}var kf,ob;function C3(){if(ob)return kf;ob=1;var e=Dy(),t=k3(),n=_3(),r=S3(),i=BE(),o="[object Boolean]",a="[object Date]",s="[object Map]",l="[object Number]",u="[object RegExp]",d="[object Set]",f="[object String]",h="[object Symbol]",p="[object ArrayBuffer]",m="[object DataView]",g="[object Float32Array]",v="[object Float64Array]",x="[object Int8Array]",y="[object Int16Array]",w="[object Int32Array]",k="[object Uint8Array]",E="[object Uint8ClampedArray]",C="[object Uint16Array]",j="[object Uint32Array]";function b(A,_,L){var P=A.constructor;switch(_){case p:return e(A);case o:case a:return new P(+A);case m:return t(A,L);case g:case v:case x:case y:case w:case k:case E:case C:case j:return i(A,L);case s:return new P;case l:case f:return new P(A);case u:return n(A);case d:return new P;case h:return r(A)}}return kf=b,kf}var _f,ab;function FE(){if(ab)return _f;ab=1;var e=fn(),t=Object.create,n=function(){function r(){}return function(i){if(!e(i))return{};if(t)return t(i);r.prototype=i;var o=new r;return r.prototype=void 0,o}}();return _f=n,_f}var Sf,sb;function qE(){if(sb)return Sf;sb=1;var e=FE(),t=Iu(),n=Tu();function r(i){return typeof i.constructor=="function"&&!n(i)?e(t(i)):{}}return Sf=r,Sf}var Cf,lb;function j3(){if(lb)return Cf;lb=1;var e=Io(),t=Un(),n="[object Map]";function r(i){return t(i)&&e(i)==n}return Cf=r,Cf}var jf,ub;function E3(){if(ub)return jf;ub=1;var e=j3(),t=Eu(),n=Py(),r=n&&n.isMap,i=r?t(r):e;return jf=i,jf}var Ef,cb;function T3(){if(cb)return Ef;cb=1;var e=Io(),t=Un(),n="[object Set]";function r(i){return t(i)&&e(i)==n}return Ef=r,Ef}var Tf,db;function I3(){if(db)return Tf;db=1;var e=T3(),t=Eu(),n=Py(),r=n&&n.isSet,i=r?t(r):e;return Tf=i,Tf}var If,fb;function $E(){if(fb)return If;fb=1;var e=_u(),t=Ay(),n=Cu(),r=d3(),i=p3(),o=RE(),a=AE(),s=g3(),l=m3(),u=NE(),d=x3(),f=Io(),h=b3(),p=C3(),m=qE(),g=Ze(),v=To(),x=E3(),y=fn(),w=I3(),k=ei(),E=Ri(),C=1,j=2,b=4,A="[object Arguments]",_="[object Array]",L="[object Boolean]",P="[object Date]",$="[object Error]",R="[object Function]",F="[object GeneratorFunction]",D="[object Map]",V="[object Number]",N="[object Object]",q="[object RegExp]",S="[object Set]",W="[object String]",K="[object Symbol]",I="[object WeakMap]",re="[object ArrayBuffer]",ye="[object DataView]",le="[object Float32Array]",Ie="[object Float64Array]",Ue="[object Int8Array]",At="[object Int16Array]",pn="[object Int32Array]",$t="[object Uint8Array]",gr="[object Uint8ClampedArray]",Po="[object Uint16Array]",mr="[object Uint32Array]",ge={};ge[A]=ge[_]=ge[re]=ge[ye]=ge[L]=ge[P]=ge[le]=ge[Ie]=ge[Ue]=ge[At]=ge[pn]=ge[D]=ge[V]=ge[N]=ge[q]=ge[S]=ge[W]=ge[K]=ge[$t]=ge[gr]=ge[Po]=ge[mr]=!0,ge[$]=ge[R]=ge[I]=!1;function An(ve,Ht,Lt,zi,Ln,tn){var Ge,xr=Ht&C,yr=Ht&j,O=Ht&b;if(Lt&&(Ge=Ln?Lt(ve,zi,Ln,tn):Lt(ve)),Ge!==void 0)return Ge;if(!y(ve))return ve;var G=g(ve);if(G){if(Ge=h(ve),!xr)return a(ve,Ge)}else{var Z=f(ve),se=Z==R||Z==F;if(v(ve))return o(ve,xr);if(Z==N||Z==A||se&&!Ln){if(Ge=yr||se?{}:m(ve),!xr)return yr?l(ve,i(Ge,ve)):s(ve,r(Ge,ve))}else{if(!ge[Z])return Ln?ve:{};Ge=p(ve,Z,xr)}}tn||(tn=new e);var fe=tn.get(ve);if(fe)return fe;tn.set(ve,Ge),w(ve)?ve.forEach(function(be){Ge.add(An(be,Ht,Lt,be,ve,tn))}):x(ve)&&ve.forEach(function(be,ht){Ge.set(ht,An(be,Ht,Lt,ht,ve,tn))});var at=O?yr?d:u:yr?E:k,rt=G?void 0:at(ve);return t(rt||ve,function(be,ht){rt&&(ht=be,be=ve[ht]),n(Ge,ht,An(be,Ht,Lt,ht,ve,tn))}),Ge}return If=An,If}var Rf,hb;function R3(){if(hb)return Rf;hb=1;var e=$E(),t=4;function n(r){return e(r,t)}return Rf=n,Rf}var Af,pb;function Oy(){if(pb)return Af;pb=1;function e(t){return function(){return t}}return Af=e,Af}var Lf,gb;function A3(){if(gb)return Lf;gb=1;function e(t){return function(n,r,i){for(var o=-1,a=Object(n),s=i(n),l=s.length;l--;){var u=s[t?l:++o];if(r(a[u],u,a)===!1)break}return n}}return Lf=e,Lf}var Pf,mb;function By(){if(mb)return Pf;mb=1;var e=A3(),t=e();return Pf=t,Pf}var zf,xb;function Fy(){if(xb)return zf;xb=1;var e=By(),t=ei();function n(r,i){return r&&e(r,i,t)}return zf=n,zf}var Mf,yb;function L3(){if(yb)return Mf;yb=1;var e=fr();function t(n,r){return function(i,o){if(i==null)return i;if(!e(i))return n(i,o);for(var a=i.length,s=r?a:-1,l=Object(i);(r?s--:++s<a)&&o(l[s],s,l)!==!1;);return i}}return Mf=t,Mf}var Nf,vb;function Ru(){if(vb)return Nf;vb=1;var e=Fy(),t=L3(),n=t(e);return Nf=n,Nf}var Df,wb;function Ai(){if(wb)return Df;wb=1;function e(t){return t}return Df=e,Df}var Of,bb;function HE(){if(bb)return Of;bb=1;var e=Ai();function t(n){return typeof n=="function"?n:e}return Of=t,Of}var Bf,kb;function UE(){if(kb)return Bf;kb=1;var e=Ay(),t=Ru(),n=HE(),r=Ze();function i(o,a){var s=r(o)?e:t;return s(o,n(a))}return Bf=i,Bf}var Ff,_b;function WE(){return _b||(_b=1,Ff=UE()),Ff}var qf,Sb;function P3(){if(Sb)return qf;Sb=1;var e=Ru();function t(n,r){var i=[];return e(n,function(o,a,s){r(o,a,s)&&i.push(o)}),i}return qf=t,qf}var $f,Cb;function z3(){if(Cb)return $f;Cb=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return $f=t,$f}var Hf,jb;function M3(){if(jb)return Hf;jb=1;function e(t){return this.__data__.has(t)}return Hf=e,Hf}var Uf,Eb;function VE(){if(Eb)return Uf;Eb=1;var e=Ry(),t=z3(),n=M3();function r(i){var o=-1,a=i==null?0:i.length;for(this.__data__=new e;++o<a;)this.add(i[o])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Uf=r,Uf}var Wf,Tb;function N3(){if(Tb)return Wf;Tb=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return Wf=e,Wf}var Vf,Ib;function GE(){if(Ib)return Vf;Ib=1;function e(t,n){return t.has(n)}return Vf=e,Vf}var Gf,Rb;function YE(){if(Rb)return Gf;Rb=1;var e=VE(),t=N3(),n=GE(),r=1,i=2;function o(a,s,l,u,d,f){var h=l&r,p=a.length,m=s.length;if(p!=m&&!(h&&m>p))return!1;var g=f.get(a),v=f.get(s);if(g&&v)return g==s&&v==a;var x=-1,y=!0,w=l&i?new e:void 0;for(f.set(a,s),f.set(s,a);++x<p;){var k=a[x],E=s[x];if(u)var C=h?u(E,k,x,s,a,f):u(k,E,x,a,s,f);if(C!==void 0){if(C)continue;y=!1;break}if(w){if(!t(s,function(j,b){if(!n(w,b)&&(k===j||d(k,j,l,u,f)))return w.push(b)})){y=!1;break}}else if(!(k===E||d(k,E,l,u,f))){y=!1;break}}return f.delete(a),f.delete(s),y}return Gf=o,Gf}var Yf,Ab;function D3(){if(Ab)return Yf;Ab=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}return Yf=e,Yf}var Kf,Lb;function qy(){if(Lb)return Kf;Lb=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return Kf=e,Kf}var Xf,Pb;function O3(){if(Pb)return Xf;Pb=1;var e=Eo(),t=OE(),n=jo(),r=YE(),i=D3(),o=qy(),a=1,s=2,l="[object Boolean]",u="[object Date]",d="[object Error]",f="[object Map]",h="[object Number]",p="[object RegExp]",m="[object Set]",g="[object String]",v="[object Symbol]",x="[object ArrayBuffer]",y="[object DataView]",w=e?e.prototype:void 0,k=w?w.valueOf:void 0;function E(C,j,b,A,_,L,P){switch(b){case y:if(C.byteLength!=j.byteLength||C.byteOffset!=j.byteOffset)return!1;C=C.buffer,j=j.buffer;case x:return!(C.byteLength!=j.byteLength||!L(new t(C),new t(j)));case l:case u:case h:return n(+C,+j);case d:return C.name==j.name&&C.message==j.message;case p:case g:return C==j+"";case f:var $=i;case m:var R=A&a;if($||($=o),C.size!=j.size&&!R)return!1;var F=P.get(C);if(F)return F==j;A|=s,P.set(C,j);var D=r($(C),$(j),A,_,L,P);return P.delete(C),D;case v:if(k)return k.call(C)==k.call(j)}return!1}return Xf=E,Xf}var Qf,zb;function B3(){if(zb)return Qf;zb=1;var e=NE(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(o,a,s,l,u,d){var f=s&t,h=e(o),p=h.length,m=e(a),g=m.length;if(p!=g&&!f)return!1;for(var v=p;v--;){var x=h[v];if(!(f?x in a:r.call(a,x)))return!1}var y=d.get(o),w=d.get(a);if(y&&w)return y==a&&w==o;var k=!0;d.set(o,a),d.set(a,o);for(var E=f;++v<p;){x=h[v];var C=o[x],j=a[x];if(l)var b=f?l(j,C,x,a,o,d):l(C,j,x,o,a,d);if(!(b===void 0?C===j||u(C,j,s,l,d):b)){k=!1;break}E||(E=x=="constructor")}if(k&&!E){var A=o.constructor,_=a.constructor;A!=_&&"constructor"in o&&"constructor"in a&&!(typeof A=="function"&&A instanceof A&&typeof _=="function"&&_ instanceof _)&&(k=!1)}return d.delete(o),d.delete(a),k}return Qf=i,Qf}var Jf,Mb;function F3(){if(Mb)return Jf;Mb=1;var e=_u(),t=YE(),n=O3(),r=B3(),i=Io(),o=Ze(),a=To(),s=rs(),l=1,u="[object Arguments]",d="[object Array]",f="[object Object]",h=Object.prototype,p=h.hasOwnProperty;function m(g,v,x,y,w,k){var E=o(g),C=o(v),j=E?d:i(g),b=C?d:i(v);j=j==u?f:j,b=b==u?f:b;var A=j==f,_=b==f,L=j==b;if(L&&a(g)){if(!a(v))return!1;E=!0,A=!1}if(L&&!A)return k||(k=new e),E||s(g)?t(g,v,x,y,w,k):n(g,v,j,x,y,w,k);if(!(x&l)){var P=A&&p.call(g,"__wrapped__"),$=_&&p.call(v,"__wrapped__");if(P||$){var R=P?g.value():g,F=$?v.value():v;return k||(k=new e),w(R,F,x,y,k)}}return L?(k||(k=new e),r(g,v,x,y,w,k)):!1}return Jf=m,Jf}var Zf,Nb;function KE(){if(Nb)return Zf;Nb=1;var e=F3(),t=Un();function n(r,i,o,a,s){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,o,a,n,s)}return Zf=n,Zf}var eh,Db;function q3(){if(Db)return eh;Db=1;var e=_u(),t=KE(),n=1,r=2;function i(o,a,s,l){var u=s.length,d=u,f=!l;if(o==null)return!d;for(o=Object(o);u--;){var h=s[u];if(f&&h[2]?h[1]!==o[h[0]]:!(h[0]in o))return!1}for(;++u<d;){h=s[u];var p=h[0],m=o[p],g=h[1];if(f&&h[2]){if(m===void 0&&!(p in o))return!1}else{var v=new e;if(l)var x=l(m,g,p,o,a,v);if(!(x===void 0?t(g,m,n|r,l,v):x))return!1}}return!0}return eh=i,eh}var th,Ob;function XE(){if(Ob)return th;Ob=1;var e=fn();function t(n){return n===n&&!e(n)}return th=t,th}var nh,Bb;function $3(){if(Bb)return nh;Bb=1;var e=XE(),t=ei();function n(r){for(var i=t(r),o=i.length;o--;){var a=i[o],s=r[a];i[o]=[a,s,e(s)]}return i}return nh=n,nh}var rh,Fb;function QE(){if(Fb)return rh;Fb=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return rh=e,rh}var ih,qb;function H3(){if(qb)return ih;qb=1;var e=q3(),t=$3(),n=QE();function r(i){var o=t(i);return o.length==1&&o[0][2]?n(o[0][0],o[0][1]):function(a){return a===i||e(a,i,o)}}return ih=r,ih}var oh,$b;function Ro(){if($b)return oh;$b=1;var e=Ti(),t=Un(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return oh=r,oh}var ah,Hb;function $y(){if(Hb)return ah;Hb=1;var e=Ze(),t=Ro(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(o,a){if(e(o))return!1;var s=typeof o;return s=="number"||s=="symbol"||s=="boolean"||o==null||t(o)?!0:r.test(o)||!n.test(o)||a!=null&&o in Object(a)}return ah=i,ah}var sh,Ub;function U3(){if(Ub)return sh;Ub=1;var e=Ry(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var o=function(){var a=arguments,s=i?i.apply(this,a):a[0],l=o.cache;if(l.has(s))return l.get(s);var u=r.apply(this,a);return o.cache=l.set(s,u)||l,u};return o.cache=new(n.Cache||e),o}return n.Cache=e,sh=n,sh}var lh,Wb;function W3(){if(Wb)return lh;Wb=1;var e=U3(),t=500;function n(r){var i=e(r,function(a){return o.size===t&&o.clear(),a}),o=i.cache;return i}return lh=n,lh}var uh,Vb;function V3(){if(Vb)return uh;Vb=1;var e=W3(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var o=[];return i.charCodeAt(0)===46&&o.push(""),i.replace(t,function(a,s,l,u){o.push(l?u.replace(n,"$1"):s||a)}),o});return uh=r,uh}var ch,Gb;function Au(){if(Gb)return ch;Gb=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,o=Array(i);++r<i;)o[r]=n(t[r],r,t);return o}return ch=e,ch}var dh,Yb;function G3(){if(Yb)return dh;Yb=1;var e=Eo(),t=Au(),n=Ze(),r=Ro(),i=e?e.prototype:void 0,o=i?i.toString:void 0;function a(s){if(typeof s=="string")return s;if(n(s))return t(s,a)+"";if(r(s))return o?o.call(s):"";var l=s+"";return l=="0"&&1/s==-1/0?"-0":l}return dh=a,dh}var fh,Kb;function JE(){if(Kb)return fh;Kb=1;var e=G3();function t(n){return n==null?"":e(n)}return fh=t,fh}var hh,Xb;function Lu(){if(Xb)return hh;Xb=1;var e=Ze(),t=$y(),n=V3(),r=JE();function i(o,a){return e(o)?o:t(o,a)?[o]:n(r(o))}return hh=i,hh}var ph,Qb;function is(){if(Qb)return ph;Qb=1;var e=Ro();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return ph=t,ph}var gh,Jb;function Pu(){if(Jb)return gh;Jb=1;var e=Lu(),t=is();function n(r,i){i=e(i,r);for(var o=0,a=i.length;r!=null&&o<a;)r=r[t(i[o++])];return o&&o==a?r:void 0}return gh=n,gh}var mh,Zb;function Y3(){if(Zb)return mh;Zb=1;var e=Pu();function t(n,r,i){var o=n==null?void 0:e(n,r);return o===void 0?i:o}return mh=t,mh}var xh,ek;function K3(){if(ek)return xh;ek=1;function e(t,n){return t!=null&&n in Object(t)}return xh=e,xh}var yh,tk;function ZE(){if(tk)return yh;tk=1;var e=Lu(),t=ns(),n=Ze(),r=ju(),i=Ly(),o=is();function a(s,l,u){l=e(l,s);for(var d=-1,f=l.length,h=!1;++d<f;){var p=o(l[d]);if(!(h=s!=null&&u(s,p)))break;s=s[p]}return h||++d!=f?h:(f=s==null?0:s.length,!!f&&i(f)&&r(p,f)&&(n(s)||t(s)))}return yh=a,yh}var vh,nk;function eT(){if(nk)return vh;nk=1;var e=K3(),t=ZE();function n(r,i){return r!=null&&t(r,i,e)}return vh=n,vh}var wh,rk;function X3(){if(rk)return wh;rk=1;var e=KE(),t=Y3(),n=eT(),r=$y(),i=XE(),o=QE(),a=is(),s=1,l=2;function u(d,f){return r(d)&&i(f)?o(a(d),f):function(h){var p=t(h,d);return p===void 0&&p===f?n(h,d):e(f,p,s|l)}}return wh=u,wh}var bh,ik;function tT(){if(ik)return bh;ik=1;function e(t){return function(n){return n==null?void 0:n[t]}}return bh=e,bh}var kh,ok;function Q3(){if(ok)return kh;ok=1;var e=Pu();function t(n){return function(r){return e(r,n)}}return kh=t,kh}var _h,ak;function J3(){if(ak)return _h;ak=1;var e=tT(),t=Q3(),n=$y(),r=is();function i(o){return n(o)?e(r(o)):t(o)}return _h=i,_h}var Sh,sk;function hr(){if(sk)return Sh;sk=1;var e=H3(),t=X3(),n=Ai(),r=Ze(),i=J3();function o(a){return typeof a=="function"?a:a==null?n:typeof a=="object"?r(a)?t(a[0],a[1]):e(a):i(a)}return Sh=o,Sh}var Ch,lk;function nT(){if(lk)return Ch;lk=1;var e=LE(),t=P3(),n=hr(),r=Ze();function i(o,a){var s=r(o)?e:t;return s(o,n(a,3))}return Ch=i,Ch}var jh,uk;function Z3(){if(uk)return jh;uk=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return jh=n,jh}var Eh,ck;function rT(){if(ck)return Eh;ck=1;var e=Z3(),t=ZE();function n(r,i){return r!=null&&t(r,i,e)}return Eh=n,Eh}var Th,dk;function e8(){if(dk)return Th;dk=1;var e=zy(),t=Io(),n=ns(),r=Ze(),i=fr(),o=To(),a=Tu(),s=rs(),l="[object Map]",u="[object Set]",d=Object.prototype,f=d.hasOwnProperty;function h(p){if(p==null)return!0;if(i(p)&&(r(p)||typeof p=="string"||typeof p.splice=="function"||o(p)||s(p)||n(p)))return!p.length;var m=t(p);if(m==l||m==u)return!p.size;if(a(p))return!e(p).length;for(var g in p)if(f.call(p,g))return!1;return!0}return Th=h,Th}var Ih,fk;function iT(){if(fk)return Ih;fk=1;function e(t){return t===void 0}return Ih=e,Ih}var Rh,hk;function oT(){if(hk)return Rh;hk=1;var e=Ru(),t=fr();function n(r,i){var o=-1,a=t(r)?Array(r.length):[];return e(r,function(s,l,u){a[++o]=i(s,l,u)}),a}return Rh=n,Rh}var Ah,pk;function aT(){if(pk)return Ah;pk=1;var e=Au(),t=hr(),n=oT(),r=Ze();function i(o,a){var s=r(o)?e:n;return s(o,t(a,3))}return Ah=i,Ah}var Lh,gk;function t8(){if(gk)return Lh;gk=1;function e(t,n,r,i){var o=-1,a=t==null?0:t.length;for(i&&a&&(r=t[++o]);++o<a;)r=n(r,t[o],o,t);return r}return Lh=e,Lh}var Ph,mk;function n8(){if(mk)return Ph;mk=1;function e(t,n,r,i,o){return o(t,function(a,s,l){r=i?(i=!1,a):n(r,a,s,l)}),r}return Ph=e,Ph}var zh,xk;function sT(){if(xk)return zh;xk=1;var e=t8(),t=Ru(),n=hr(),r=n8(),i=Ze();function o(a,s,l){var u=i(a)?e:r,d=arguments.length<3;return u(a,n(s,4),l,d,t)}return zh=o,zh}var Mh,yk;function r8(){if(yk)return Mh;yk=1;var e=Ti(),t=Ze(),n=Un(),r="[object String]";function i(o){return typeof o=="string"||!t(o)&&n(o)&&e(o)==r}return Mh=i,Mh}var Nh,vk;function i8(){if(vk)return Nh;vk=1;var e=tT(),t=e("length");return Nh=t,Nh}var Dh,wk;function o8(){if(wk)return Dh;wk=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",a="\\u200d",s=RegExp("["+a+e+i+o+"]");function l(u){return s.test(u)}return Dh=l,Dh}var Oh,bk;function a8(){if(bk)return Oh;bk=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,o="\\ufe0e\\ufe0f",a="["+e+"]",s="["+i+"]",l="\\ud83c[\\udffb-\\udfff]",u="(?:"+s+"|"+l+")",d="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",h="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",m=u+"?",g="["+o+"]?",v="(?:"+p+"(?:"+[d,f,h].join("|")+")"+g+m+")*",x=g+m+v,y="(?:"+[d+s+"?",s,f,h,a].join("|")+")",w=RegExp(l+"(?="+l+")|"+y+x,"g");function k(E){for(var C=w.lastIndex=0;w.test(E);)++C;return C}return Oh=k,Oh}var Bh,kk;function s8(){if(kk)return Bh;kk=1;var e=i8(),t=o8(),n=a8();function r(i){return t(i)?n(i):e(i)}return Bh=r,Bh}var Fh,_k;function l8(){if(_k)return Fh;_k=1;var e=zy(),t=Io(),n=fr(),r=r8(),i=s8(),o="[object Map]",a="[object Set]";function s(l){if(l==null)return 0;if(n(l))return r(l)?i(l):l.length;var u=t(l);return u==o||u==a?l.size:e(l).length}return Fh=s,Fh}var qh,Sk;function u8(){if(Sk)return qh;Sk=1;var e=Ay(),t=FE(),n=Fy(),r=hr(),i=Iu(),o=Ze(),a=To(),s=es(),l=fn(),u=rs();function d(f,h,p){var m=o(f),g=m||a(f)||u(f);if(h=r(h,4),p==null){var v=f&&f.constructor;g?p=m?new v:[]:l(f)?p=s(v)?t(i(f)):{}:p={}}return(g?e:n)(f,function(x,y,w){return h(p,x,y,w)}),p}return qh=d,qh}var $h,Ck;function c8(){if(Ck)return $h;Ck=1;var e=Eo(),t=ns(),n=Ze(),r=e?e.isConcatSpreadable:void 0;function i(o){return n(o)||t(o)||!!(r&&o&&o[r])}return $h=i,$h}var Hh,jk;function Hy(){if(jk)return Hh;jk=1;var e=Ny(),t=c8();function n(r,i,o,a,s){var l=-1,u=r.length;for(o||(o=t),s||(s=[]);++l<u;){var d=r[l];i>0&&o(d)?i>1?n(d,i-1,o,a,s):e(s,d):a||(s[s.length]=d)}return s}return Hh=n,Hh}var Uh,Ek;function d8(){if(Ek)return Uh;Ek=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return Uh=e,Uh}var Wh,Tk;function lT(){if(Tk)return Wh;Tk=1;var e=d8(),t=Math.max;function n(r,i,o){return i=t(i===void 0?r.length-1:i,0),function(){for(var a=arguments,s=-1,l=t(a.length-i,0),u=Array(l);++s<l;)u[s]=a[i+s];s=-1;for(var d=Array(i+1);++s<i;)d[s]=a[s];return d[i]=o(u),e(r,this,d)}}return Wh=n,Wh}var Vh,Ik;function f8(){if(Ik)return Vh;Ik=1;var e=Oy(),t=EE(),n=Ai(),r=t?function(i,o){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(o),writable:!0})}:n;return Vh=r,Vh}var Gh,Rk;function h8(){if(Rk)return Gh;Rk=1;var e=800,t=16,n=Date.now;function r(i){var o=0,a=0;return function(){var s=n(),l=t-(s-a);if(a=s,l>0){if(++o>=e)return arguments[0]}else o=0;return i.apply(void 0,arguments)}}return Gh=r,Gh}var Yh,Ak;function uT(){if(Ak)return Yh;Ak=1;var e=f8(),t=h8(),n=t(e);return Yh=n,Yh}var Kh,Lk;function zu(){if(Lk)return Kh;Lk=1;var e=Ai(),t=lT(),n=uT();function r(i,o){return n(t(i,o,e),i+"")}return Kh=r,Kh}var Xh,Pk;function cT(){if(Pk)return Xh;Pk=1;function e(t,n,r,i){for(var o=t.length,a=r+(i?1:-1);i?a--:++a<o;)if(n(t[a],a,t))return a;return-1}return Xh=e,Xh}var Qh,zk;function p8(){if(zk)return Qh;zk=1;function e(t){return t!==t}return Qh=e,Qh}var Jh,Mk;function g8(){if(Mk)return Jh;Mk=1;function e(t,n,r){for(var i=r-1,o=t.length;++i<o;)if(t[i]===n)return i;return-1}return Jh=e,Jh}var Zh,Nk;function m8(){if(Nk)return Zh;Nk=1;var e=cT(),t=p8(),n=g8();function r(i,o,a){return o===o?n(i,o,a):e(i,t,a)}return Zh=r,Zh}var ep,Dk;function x8(){if(Dk)return ep;Dk=1;var e=m8();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return ep=t,ep}var tp,Ok;function y8(){if(Ok)return tp;Ok=1;function e(t,n,r){for(var i=-1,o=t==null?0:t.length;++i<o;)if(r(n,t[i]))return!0;return!1}return tp=e,tp}var np,Bk;function v8(){if(Bk)return np;Bk=1;function e(){}return np=e,np}var rp,Fk;function w8(){if(Fk)return rp;Fk=1;var e=DE(),t=v8(),n=qy(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(o){return new e(o)}:t;return rp=i,rp}var ip,qk;function b8(){if(qk)return ip;qk=1;var e=VE(),t=x8(),n=y8(),r=GE(),i=w8(),o=qy(),a=200;function s(l,u,d){var f=-1,h=t,p=l.length,m=!0,g=[],v=g;if(d)m=!1,h=n;else if(p>=a){var x=u?null:i(l);if(x)return o(x);m=!1,h=r,v=new e}else v=u?[]:g;e:for(;++f<p;){var y=l[f],w=u?u(y):y;if(y=d||y!==0?y:0,m&&w===w){for(var k=v.length;k--;)if(v[k]===w)continue e;u&&v.push(w),g.push(y)}else h(v,w,d)||(v!==g&&v.push(w),g.push(y))}return g}return ip=s,ip}var op,$k;function dT(){if($k)return op;$k=1;var e=fr(),t=Un();function n(r){return t(r)&&e(r)}return op=n,op}var ap,Hk;function k8(){if(Hk)return ap;Hk=1;var e=Hy(),t=zu(),n=b8(),r=dT(),i=t(function(o){return n(e(o,1,r,!0))});return ap=i,ap}var sp,Uk;function _8(){if(Uk)return sp;Uk=1;var e=Au();function t(n,r){return e(r,function(i){return n[i]})}return sp=t,sp}var lp,Wk;function fT(){if(Wk)return lp;Wk=1;var e=_8(),t=ei();function n(r){return r==null?[]:e(r,t(r))}return lp=n,lp}var up,Vk;function hn(){if(Vk)return up;Vk=1;var e;if(typeof Ty=="function")try{e={clone:R3(),constant:Oy(),each:WE(),filter:nT(),has:rT(),isArray:Ze(),isEmpty:e8(),isFunction:es(),isUndefined:iT(),keys:ei(),map:aT(),reduce:sT(),size:l8(),transform:u8(),union:k8(),values:fT()}}catch{}return e||(e=window._),up=e,up}var cp,Gk;function Uy(){if(Gk)return cp;Gk=1;var e=hn();cp=i;var t="\0",n="\0",r="";function i(d){this._isDirected=e.has(d,"directed")?d.directed:!0,this._isMultigraph=e.has(d,"multigraph")?d.multigraph:!1,this._isCompound=e.has(d,"compound")?d.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(d){return this._label=d,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultNodeLabelFn=d,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var d=this;return e.filter(this.nodes(),function(f){return e.isEmpty(d._in[f])})},i.prototype.sinks=function(){var d=this;return e.filter(this.nodes(),function(f){return e.isEmpty(d._out[f])})},i.prototype.setNodes=function(d,f){var h=arguments,p=this;return e.each(d,function(m){h.length>1?p.setNode(m,f):p.setNode(m)}),this},i.prototype.setNode=function(d,f){return e.has(this._nodes,d)?(arguments.length>1&&(this._nodes[d]=f),this):(this._nodes[d]=arguments.length>1?f:this._defaultNodeLabelFn(d),this._isCompound&&(this._parent[d]=n,this._children[d]={},this._children[n][d]=!0),this._in[d]={},this._preds[d]={},this._out[d]={},this._sucs[d]={},++this._nodeCount,this)},i.prototype.node=function(d){return this._nodes[d]},i.prototype.hasNode=function(d){return e.has(this._nodes,d)},i.prototype.removeNode=function(d){var f=this;if(e.has(this._nodes,d)){var h=function(p){f.removeEdge(f._edgeObjs[p])};delete this._nodes[d],this._isCompound&&(this._removeFromParentsChildList(d),delete this._parent[d],e.each(this.children(d),function(p){f.setParent(p)}),delete this._children[d]),e.each(e.keys(this._in[d]),h),delete this._in[d],delete this._preds[d],e.each(e.keys(this._out[d]),h),delete this._out[d],delete this._sucs[d],--this._nodeCount}return this},i.prototype.setParent=function(d,f){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(f))f=n;else{f+="";for(var h=f;!e.isUndefined(h);h=this.parent(h))if(h===d)throw new Error("Setting "+f+" as parent of "+d+" would create a cycle");this.setNode(f)}return this.setNode(d),this._removeFromParentsChildList(d),this._parent[d]=f,this._children[f][d]=!0,this},i.prototype._removeFromParentsChildList=function(d){delete this._children[this._parent[d]][d]},i.prototype.parent=function(d){if(this._isCompound){var f=this._parent[d];if(f!==n)return f}},i.prototype.children=function(d){if(e.isUndefined(d)&&(d=n),this._isCompound){var f=this._children[d];if(f)return e.keys(f)}else{if(d===n)return this.nodes();if(this.hasNode(d))return[]}},i.prototype.predecessors=function(d){var f=this._preds[d];if(f)return e.keys(f)},i.prototype.successors=function(d){var f=this._sucs[d];if(f)return e.keys(f)},i.prototype.neighbors=function(d){var f=this.predecessors(d);if(f)return e.union(f,this.successors(d))},i.prototype.isLeaf=function(d){var f;return this.isDirected()?f=this.successors(d):f=this.neighbors(d),f.length===0},i.prototype.filterNodes=function(d){var f=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});f.setGraph(this.graph());var h=this;e.each(this._nodes,function(g,v){d(v)&&f.setNode(v,g)}),e.each(this._edgeObjs,function(g){f.hasNode(g.v)&&f.hasNode(g.w)&&f.setEdge(g,h.edge(g))});var p={};function m(g){var v=h.parent(g);return v===void 0||f.hasNode(v)?(p[g]=v,v):v in p?p[v]:m(v)}return this._isCompound&&e.each(f.nodes(),function(g){f.setParent(g,m(g))}),f},i.prototype.setDefaultEdgeLabel=function(d){return e.isFunction(d)||(d=e.constant(d)),this._defaultEdgeLabelFn=d,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(d,f){var h=this,p=arguments;return e.reduce(d,function(m,g){return p.length>1?h.setEdge(m,g,f):h.setEdge(m,g),g}),this},i.prototype.setEdge=function(){var d,f,h,p,m=!1,g=arguments[0];typeof g=="object"&&g!==null&&"v"in g?(d=g.v,f=g.w,h=g.name,arguments.length===2&&(p=arguments[1],m=!0)):(d=g,f=arguments[1],h=arguments[3],arguments.length>2&&(p=arguments[2],m=!0)),d=""+d,f=""+f,e.isUndefined(h)||(h=""+h);var v=s(this._isDirected,d,f,h);if(e.has(this._edgeLabels,v))return m&&(this._edgeLabels[v]=p),this;if(!e.isUndefined(h)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(d),this.setNode(f),this._edgeLabels[v]=m?p:this._defaultEdgeLabelFn(d,f,h);var x=l(this._isDirected,d,f,h);return d=x.v,f=x.w,Object.freeze(x),this._edgeObjs[v]=x,o(this._preds[f],d),o(this._sucs[d],f),this._in[f][v]=x,this._out[d][v]=x,this._edgeCount++,this},i.prototype.edge=function(d,f,h){var p=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,f,h);return this._edgeLabels[p]},i.prototype.hasEdge=function(d,f,h){var p=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,f,h);return e.has(this._edgeLabels,p)},i.prototype.removeEdge=function(d,f,h){var p=arguments.length===1?u(this._isDirected,arguments[0]):s(this._isDirected,d,f,h),m=this._edgeObjs[p];return m&&(d=m.v,f=m.w,delete this._edgeLabels[p],delete this._edgeObjs[p],a(this._preds[f],d),a(this._sucs[d],f),delete this._in[f][p],delete this._out[d][p],this._edgeCount--),this},i.prototype.inEdges=function(d,f){var h=this._in[d];if(h){var p=e.values(h);return f?e.filter(p,function(m){return m.v===f}):p}},i.prototype.outEdges=function(d,f){var h=this._out[d];if(h){var p=e.values(h);return f?e.filter(p,function(m){return m.w===f}):p}},i.prototype.nodeEdges=function(d,f){var h=this.inEdges(d,f);if(h)return h.concat(this.outEdges(d,f))};function o(d,f){d[f]?d[f]++:d[f]=1}function a(d,f){--d[f]||delete d[f]}function s(d,f,h,p){var m=""+f,g=""+h;if(!d&&m>g){var v=m;m=g,g=v}return m+r+g+r+(e.isUndefined(p)?t:p)}function l(d,f,h,p){var m=""+f,g=""+h;if(!d&&m>g){var v=m;m=g,g=v}var x={v:m,w:g};return p&&(x.name=p),x}function u(d,f){return s(d,f.v,f.w,f.name)}return cp}var dp,Yk;function S8(){return Yk||(Yk=1,dp="2.1.8"),dp}var fp,Kk;function C8(){return Kk||(Kk=1,fp={Graph:Uy(),version:S8()}),fp}var hp,Xk;function j8(){if(Xk)return hp;Xk=1;var e=hn(),t=Uy();hp={write:n,read:o};function n(a){var s={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:r(a),edges:i(a)};return e.isUndefined(a.graph())||(s.value=e.clone(a.graph())),s}function r(a){return e.map(a.nodes(),function(s){var l=a.node(s),u=a.parent(s),d={v:s};return e.isUndefined(l)||(d.value=l),e.isUndefined(u)||(d.parent=u),d})}function i(a){return e.map(a.edges(),function(s){var l=a.edge(s),u={v:s.v,w:s.w};return e.isUndefined(s.name)||(u.name=s.name),e.isUndefined(l)||(u.value=l),u})}function o(a){var s=new t(a.options).setGraph(a.value);return e.each(a.nodes,function(l){s.setNode(l.v,l.value),l.parent&&s.setParent(l.v,l.parent)}),e.each(a.edges,function(l){s.setEdge({v:l.v,w:l.w,name:l.name},l.value)}),s}return hp}var pp,Qk;function E8(){if(Qk)return pp;Qk=1;var e=hn();pp=t;function t(n){var r={},i=[],o;function a(s){e.has(r,s)||(r[s]=!0,o.push(s),e.each(n.successors(s),a),e.each(n.predecessors(s),a))}return e.each(n.nodes(),function(s){o=[],a(s),o.length&&i.push(o)}),i}return pp}var gp,Jk;function hT(){if(Jk)return gp;Jk=1;var e=hn();gp=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var i=this._keyIndices;if(n=String(n),!e.has(i,n)){var o=this._arr,a=o.length;return i[n]=a,o.push({key:n,priority:r}),this._decrease(a),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,r){var i=this._keyIndices[n];if(r>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+r);this._arr[i].priority=r,this._decrease(i)},t.prototype._heapify=function(n){var r=this._arr,i=2*n,o=i+1,a=n;i<r.length&&(a=r[i].priority<r[a].priority?i:a,o<r.length&&(a=r[o].priority<r[a].priority?o:a),a!==n&&(this._swap(n,a),this._heapify(a)))},t.prototype._decrease=function(n){for(var r=this._arr,i=r[n].priority,o;n!==0&&(o=n>>1,!(r[o].priority<i));)this._swap(n,o),n=o},t.prototype._swap=function(n,r){var i=this._arr,o=this._keyIndices,a=i[n],s=i[r];i[n]=s,i[r]=a,o[s.key]=n,o[a.key]=r},gp}var mp,Zk;function pT(){if(Zk)return mp;Zk=1;var e=hn(),t=hT();mp=r;var n=e.constant(1);function r(o,a,s,l){return i(o,String(a),s||n,l||function(u){return o.outEdges(u)})}function i(o,a,s,l){var u={},d=new t,f,h,p=function(m){var g=m.v!==f?m.v:m.w,v=u[g],x=s(m),y=h.distance+x;if(x<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+x);y<v.distance&&(v.distance=y,v.predecessor=f,d.decrease(g,y))};for(o.nodes().forEach(function(m){var g=m===a?0:Number.POSITIVE_INFINITY;u[m]={distance:g},d.add(m,g)});d.size()>0&&(f=d.removeMin(),h=u[f],h.distance!==Number.POSITIVE_INFINITY);)l(f).forEach(p);return u}return mp}var xp,e_;function T8(){if(e_)return xp;e_=1;var e=pT(),t=hn();xp=n;function n(r,i,o){return t.transform(r.nodes(),function(a,s){a[s]=e(r,s,i,o)},{})}return xp}var yp,t_;function gT(){if(t_)return yp;t_=1;var e=hn();yp=t;function t(n){var r=0,i=[],o={},a=[];function s(l){var u=o[l]={onStack:!0,lowlink:r,index:r++};if(i.push(l),n.successors(l).forEach(function(h){e.has(o,h)?o[h].onStack&&(u.lowlink=Math.min(u.lowlink,o[h].index)):(s(h),u.lowlink=Math.min(u.lowlink,o[h].lowlink))}),u.lowlink===u.index){var d=[],f;do f=i.pop(),o[f].onStack=!1,d.push(f);while(l!==f);a.push(d)}}return n.nodes().forEach(function(l){e.has(o,l)||s(l)}),a}return yp}var vp,n_;function I8(){if(n_)return vp;n_=1;var e=hn(),t=gT();vp=n;function n(r){return e.filter(t(r),function(i){return i.length>1||i.length===1&&r.hasEdge(i[0],i[0])})}return vp}var wp,r_;function R8(){if(r_)return wp;r_=1;var e=hn();wp=n;var t=e.constant(1);function n(i,o,a){return r(i,o||t,a||function(s){return i.outEdges(s)})}function r(i,o,a){var s={},l=i.nodes();return l.forEach(function(u){s[u]={},s[u][u]={distance:0},l.forEach(function(d){u!==d&&(s[u][d]={distance:Number.POSITIVE_INFINITY})}),a(u).forEach(function(d){var f=d.v===u?d.w:d.v,h=o(d);s[u][f]={distance:h,predecessor:u}})}),l.forEach(function(u){var d=s[u];l.forEach(function(f){var h=s[f];l.forEach(function(p){var m=h[u],g=d[p],v=h[p],x=m.distance+g.distance;x<v.distance&&(v.distance=x,v.predecessor=g.predecessor)})})}),s}return wp}var bp,i_;function mT(){if(i_)return bp;i_=1;var e=hn();bp=t,t.CycleException=n;function t(r){var i={},o={},a=[];function s(l){if(e.has(o,l))throw new n;e.has(i,l)||(o[l]=!0,i[l]=!0,e.each(r.predecessors(l),s),delete o[l],a.push(l))}if(e.each(r.sinks(),s),e.size(i)!==r.nodeCount())throw new n;return a}function n(){}return n.prototype=new Error,bp}var kp,o_;function A8(){if(o_)return kp;o_=1;var e=mT();kp=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return kp}var _p,a_;function xT(){if(a_)return _p;a_=1;var e=hn();_p=t;function t(r,i,o){e.isArray(i)||(i=[i]);var a=(r.isDirected()?r.successors:r.neighbors).bind(r),s=[],l={};return e.each(i,function(u){if(!r.hasNode(u))throw new Error("Graph does not have node: "+u);n(r,u,o==="post",l,a,s)}),s}function n(r,i,o,a,s,l){e.has(a,i)||(a[i]=!0,o||l.push(i),e.each(s(i),function(u){n(r,u,o,a,s,l)}),o&&l.push(i))}return _p}var Sp,s_;function L8(){if(s_)return Sp;s_=1;var e=xT();Sp=t;function t(n,r){return e(n,r,"post")}return Sp}var Cp,l_;function P8(){if(l_)return Cp;l_=1;var e=xT();Cp=t;function t(n,r){return e(n,r,"pre")}return Cp}var jp,u_;function z8(){if(u_)return jp;u_=1;var e=hn(),t=Uy(),n=hT();jp=r;function r(i,o){var a=new t,s={},l=new n,u;function d(h){var p=h.v===u?h.w:h.v,m=l.priority(p);if(m!==void 0){var g=o(h);g<m&&(s[p]=u,l.decrease(p,g))}}if(i.nodeCount()===0)return a;e.each(i.nodes(),function(h){l.add(h,Number.POSITIVE_INFINITY),a.setNode(h)}),l.decrease(i.nodes()[0],0);for(var f=!1;l.size()>0;){if(u=l.removeMin(),e.has(s,u))a.setEdge(u,s[u]);else{if(f)throw new Error("Input graph is not connected: "+i);f=!0}i.nodeEdges(u).forEach(d)}return a}return jp}var Ep,c_;function M8(){return c_||(c_=1,Ep={components:E8(),dijkstra:pT(),dijkstraAll:T8(),findCycles:I8(),floydWarshall:R8(),isAcyclic:A8(),postorder:L8(),preorder:P8(),prim:z8(),tarjan:gT(),topsort:mT()}),Ep}var Tp,d_;function N8(){if(d_)return Tp;d_=1;var e=C8();return Tp={Graph:e.Graph,json:j8(),alg:M8(),version:e.version},Tp}var ql;if(typeof Ty=="function")try{ql=N8()}catch{}ql||(ql=window.graphlib);var Rn=ql,Ip,f_;function D8(){if(f_)return Ip;f_=1;var e=$E(),t=1,n=4;function r(i){return e(i,t|n)}return Ip=r,Ip}var Rp,h_;function Mu(){if(h_)return Rp;h_=1;var e=jo(),t=fr(),n=ju(),r=fn();function i(o,a,s){if(!r(s))return!1;var l=typeof a;return(l=="number"?t(s)&&n(a,s.length):l=="string"&&a in s)?e(s[a],o):!1}return Rp=i,Rp}var Ap,p_;function O8(){if(p_)return Ap;p_=1;var e=zu(),t=jo(),n=Mu(),r=Ri(),i=Object.prototype,o=i.hasOwnProperty,a=e(function(s,l){s=Object(s);var u=-1,d=l.length,f=d>2?l[2]:void 0;for(f&&n(l[0],l[1],f)&&(d=1);++u<d;)for(var h=l[u],p=r(h),m=-1,g=p.length;++m<g;){var v=p[m],x=s[v];(x===void 0||t(x,i[v])&&!o.call(s,v))&&(s[v]=h[v])}return s});return Ap=a,Ap}var Lp,g_;function B8(){if(g_)return Lp;g_=1;var e=hr(),t=fr(),n=ei();function r(i){return function(o,a,s){var l=Object(o);if(!t(o)){var u=e(a,3);o=n(o),a=function(f){return u(l[f],f,l)}}var d=i(o,a,s);return d>-1?l[u?o[d]:d]:void 0}}return Lp=r,Lp}var Pp,m_;function F8(){if(m_)return Pp;m_=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Pp=t,Pp}var zp,x_;function q8(){if(x_)return zp;x_=1;var e=F8(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return zp=n,zp}var Mp,y_;function $8(){if(y_)return Mp;y_=1;var e=q8(),t=fn(),n=Ro(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,a=/^0o[0-7]+$/i,s=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var d=typeof u.valueOf=="function"?u.valueOf():u;u=t(d)?d+"":d}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=o.test(u);return f||a.test(u)?s(u.slice(2),f?2:8):i.test(u)?r:+u}return Mp=l,Mp}var Np,v_;function yT(){if(v_)return Np;v_=1;var e=$8(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var o=i<0?-1:1;return o*n}return i===i?i:0}return Np=r,Np}var Dp,w_;function H8(){if(w_)return Dp;w_=1;var e=yT();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return Dp=t,Dp}var Op,b_;function U8(){if(b_)return Op;b_=1;var e=cT(),t=hr(),n=H8(),r=Math.max;function i(o,a,s){var l=o==null?0:o.length;if(!l)return-1;var u=s==null?0:n(s);return u<0&&(u=r(l+u,0)),e(o,t(a,3),u)}return Op=i,Op}var Bp,k_;function W8(){if(k_)return Bp;k_=1;var e=B8(),t=U8(),n=e(t);return Bp=n,Bp}var Fp,__;function vT(){if(__)return Fp;__=1;var e=Hy();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return Fp=t,Fp}var qp,S_;function V8(){if(S_)return qp;S_=1;var e=By(),t=HE(),n=Ri();function r(i,o){return i==null?i:e(i,t(o),n)}return qp=r,qp}var $p,C_;function G8(){if(C_)return $p;C_=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return $p=e,$p}var Hp,j_;function Y8(){if(j_)return Hp;j_=1;var e=Su(),t=Fy(),n=hr();function r(i,o){var a={};return o=n(o,3),t(i,function(s,l,u){e(a,l,o(s,l,u))}),a}return Hp=r,Hp}var Up,E_;function Wy(){if(E_)return Up;E_=1;var e=Ro();function t(n,r,i){for(var o=-1,a=n.length;++o<a;){var s=n[o],l=r(s);if(l!=null&&(u===void 0?l===l&&!e(l):i(l,u)))var u=l,d=s}return d}return Up=t,Up}var Wp,T_;function K8(){if(T_)return Wp;T_=1;function e(t,n){return t>n}return Wp=e,Wp}var Vp,I_;function X8(){if(I_)return Vp;I_=1;var e=Wy(),t=K8(),n=Ai();function r(i){return i&&i.length?e(i,n,t):void 0}return Vp=r,Vp}var Gp,R_;function wT(){if(R_)return Gp;R_=1;var e=Su(),t=jo();function n(r,i,o){(o!==void 0&&!t(r[i],o)||o===void 0&&!(i in r))&&e(r,i,o)}return Gp=n,Gp}var Yp,A_;function Q8(){if(A_)return Yp;A_=1;var e=Ti(),t=Iu(),n=Un(),r="[object Object]",i=Function.prototype,o=Object.prototype,a=i.toString,s=o.hasOwnProperty,l=a.call(Object);function u(d){if(!n(d)||e(d)!=r)return!1;var f=t(d);if(f===null)return!0;var h=s.call(f,"constructor")&&f.constructor;return typeof h=="function"&&h instanceof h&&a.call(h)==l}return Yp=u,Yp}var Kp,L_;function bT(){if(L_)return Kp;L_=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return Kp=e,Kp}var Xp,P_;function J8(){if(P_)return Xp;P_=1;var e=ts(),t=Ri();function n(r){return e(r,t(r))}return Xp=n,Xp}var Qp,z_;function Z8(){if(z_)return Qp;z_=1;var e=wT(),t=RE(),n=BE(),r=AE(),i=qE(),o=ns(),a=Ze(),s=dT(),l=To(),u=es(),d=fn(),f=Q8(),h=rs(),p=bT(),m=J8();function g(v,x,y,w,k,E,C){var j=p(v,y),b=p(x,y),A=C.get(b);if(A){e(v,y,A);return}var _=E?E(j,b,y+"",v,x,C):void 0,L=_===void 0;if(L){var P=a(b),$=!P&&l(b),R=!P&&!$&&h(b);_=b,P||$||R?a(j)?_=j:s(j)?_=r(j):$?(L=!1,_=t(b,!0)):R?(L=!1,_=n(b,!0)):_=[]:f(b)||o(b)?(_=j,o(j)?_=m(j):(!d(j)||u(j))&&(_=i(b))):L=!1}L&&(C.set(b,_),k(_,b,w,E,C),C.delete(b)),e(v,y,_)}return Qp=g,Qp}var Jp,M_;function eN(){if(M_)return Jp;M_=1;var e=_u(),t=wT(),n=By(),r=Z8(),i=fn(),o=Ri(),a=bT();function s(l,u,d,f,h){l!==u&&n(u,function(p,m){if(h||(h=new e),i(p))r(l,u,m,d,s,f,h);else{var g=f?f(a(l,m),p,m+"",l,u,h):void 0;g===void 0&&(g=p),t(l,m,g)}},o)}return Jp=s,Jp}var Zp,N_;function tN(){if(N_)return Zp;N_=1;var e=zu(),t=Mu();function n(r){return e(function(i,o){var a=-1,s=o.length,l=s>1?o[s-1]:void 0,u=s>2?o[2]:void 0;for(l=r.length>3&&typeof l=="function"?(s--,l):void 0,u&&t(o[0],o[1],u)&&(l=s<3?void 0:l,s=1),i=Object(i);++a<s;){var d=o[a];d&&r(i,d,a,l)}return i})}return Zp=n,Zp}var eg,D_;function nN(){if(D_)return eg;D_=1;var e=eN(),t=tN(),n=t(function(r,i,o){e(r,i,o)});return eg=n,eg}var tg,O_;function kT(){if(O_)return tg;O_=1;function e(t,n){return t<n}return tg=e,tg}var ng,B_;function rN(){if(B_)return ng;B_=1;var e=Wy(),t=kT(),n=Ai();function r(i){return i&&i.length?e(i,n,t):void 0}return ng=r,ng}var rg,F_;function iN(){if(F_)return rg;F_=1;var e=Wy(),t=hr(),n=kT();function r(i,o){return i&&i.length?e(i,t(o,2),n):void 0}return rg=r,rg}var ig,q_;function oN(){if(q_)return ig;q_=1;var e=In(),t=function(){return e.Date.now()};return ig=t,ig}var og,$_;function aN(){if($_)return og;$_=1;var e=Cu(),t=Lu(),n=ju(),r=fn(),i=is();function o(a,s,l,u){if(!r(a))return a;s=t(s,a);for(var d=-1,f=s.length,h=f-1,p=a;p!=null&&++d<f;){var m=i(s[d]),g=l;if(m==="__proto__"||m==="constructor"||m==="prototype")return a;if(d!=h){var v=p[m];g=u?u(v,m,p):void 0,g===void 0&&(g=r(v)?v:n(s[d+1])?[]:{})}e(p,m,g),p=p[m]}return a}return og=o,og}var ag,H_;function sN(){if(H_)return ag;H_=1;var e=Pu(),t=aN(),n=Lu();function r(i,o,a){for(var s=-1,l=o.length,u={};++s<l;){var d=o[s],f=e(i,d);a(f,d)&&t(u,n(d,i),f)}return u}return ag=r,ag}var sg,U_;function lN(){if(U_)return sg;U_=1;var e=sN(),t=eT();function n(r,i){return e(r,i,function(o,a){return t(r,a)})}return sg=n,sg}var lg,W_;function uN(){if(W_)return lg;W_=1;var e=vT(),t=lT(),n=uT();function r(i){return n(t(i,void 0,e),i+"")}return lg=r,lg}var ug,V_;function cN(){if(V_)return ug;V_=1;var e=lN(),t=uN(),n=t(function(r,i){return r==null?{}:e(r,i)});return ug=n,ug}var cg,G_;function dN(){if(G_)return cg;G_=1;var e=Math.ceil,t=Math.max;function n(r,i,o,a){for(var s=-1,l=t(e((i-r)/(o||1)),0),u=Array(l);l--;)u[a?l:++s]=r,r+=o;return u}return cg=n,cg}var dg,Y_;function fN(){if(Y_)return dg;Y_=1;var e=dN(),t=Mu(),n=yT();function r(i){return function(o,a,s){return s&&typeof s!="number"&&t(o,a,s)&&(a=s=void 0),o=n(o),a===void 0?(a=o,o=0):a=n(a),s=s===void 0?o<a?1:-1:n(s),e(o,a,s,i)}}return dg=r,dg}var fg,K_;function hN(){if(K_)return fg;K_=1;var e=fN(),t=e();return fg=t,fg}var hg,X_;function pN(){if(X_)return hg;X_=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return hg=e,hg}var pg,Q_;function gN(){if(Q_)return pg;Q_=1;var e=Ro();function t(n,r){if(n!==r){var i=n!==void 0,o=n===null,a=n===n,s=e(n),l=r!==void 0,u=r===null,d=r===r,f=e(r);if(!u&&!f&&!s&&n>r||s&&l&&d&&!u&&!f||o&&l&&d||!i&&d||!a)return 1;if(!o&&!s&&!f&&n<r||f&&i&&a&&!o&&!s||u&&i&&a||!l&&a||!d)return-1}return 0}return pg=t,pg}var gg,J_;function mN(){if(J_)return gg;J_=1;var e=gN();function t(n,r,i){for(var o=-1,a=n.criteria,s=r.criteria,l=a.length,u=i.length;++o<l;){var d=e(a[o],s[o]);if(d){if(o>=u)return d;var f=i[o];return d*(f=="desc"?-1:1)}}return n.index-r.index}return gg=t,gg}var mg,Z_;function xN(){if(Z_)return mg;Z_=1;var e=Au(),t=Pu(),n=hr(),r=oT(),i=pN(),o=Eu(),a=mN(),s=Ai(),l=Ze();function u(d,f,h){f.length?f=e(f,function(g){return l(g)?function(v){return t(v,g.length===1?g[0]:g)}:g}):f=[s];var p=-1;f=e(f,o(n));var m=r(d,function(g,v,x){var y=e(f,function(w){return w(g)});return{criteria:y,index:++p,value:g}});return i(m,function(g,v){return a(g,v,h)})}return mg=u,mg}var xg,eS;function yN(){if(eS)return xg;eS=1;var e=Hy(),t=xN(),n=zu(),r=Mu(),i=n(function(o,a){if(o==null)return[];var s=a.length;return s>1&&r(o,a[0],a[1])?a=[]:s>2&&r(a[0],a[1],a[2])&&(a=[a[0]]),t(o,e(a,1),[])});return xg=i,xg}var yg,tS;function vN(){if(tS)return yg;tS=1;var e=JE(),t=0;function n(r){var i=++t;return e(r)+i}return yg=n,yg}var vg,nS;function wN(){if(nS)return vg;nS=1;function e(t,n,r){for(var i=-1,o=t.length,a=n.length,s={};++i<o;){var l=i<a?n[i]:void 0;r(s,t[i],l)}return s}return vg=e,vg}var wg,rS;function bN(){if(rS)return wg;rS=1;var e=Cu(),t=wN();function n(r,i){return t(r||[],i||[],e)}return wg=n,wg}var $l;if(typeof Ty=="function")try{$l={cloneDeep:D8(),constant:Oy(),defaults:O8(),each:WE(),filter:nT(),find:W8(),flatten:vT(),forEach:UE(),forIn:V8(),has:rT(),isUndefined:iT(),last:G8(),map:aT(),mapValues:Y8(),max:X8(),merge:nN(),min:rN(),minBy:iN(),now:oN(),pick:cN(),range:hN(),reduce:sT(),sortBy:yN(),uniqueId:vN(),values:fT(),zipObject:bN()}}catch{}$l||($l=window._);var Fe=$l,kN=Nu;function Nu(){var e={};e._next=e._prev=e,this._sentinel=e}Nu.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return _T(t),t};Nu.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&_T(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};Nu.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,_N)),n=n._prev;return"["+e.join(", ")+"]"};function _T(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function _N(e,t){if(e!=="_next"&&e!=="_prev")return t}var nr=Fe,SN=Rn.Graph,CN=kN,jN=TN,EN=nr.constant(1);function TN(e,t){if(e.nodeCount()<=1)return[];var n=RN(e,t||EN),r=IN(n.graph,n.buckets,n.zeroIdx);return nr.flatten(nr.map(r,function(i){return e.outEdges(i.v,i.w)}),!0)}function IN(e,t,n){for(var r=[],i=t[t.length-1],o=t[0],a;e.nodeCount();){for(;a=o.dequeue();)bg(e,t,n,a);for(;a=i.dequeue();)bg(e,t,n,a);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(a=t[s].dequeue(),a){r=r.concat(bg(e,t,n,a,!0));break}}}return r}function bg(e,t,n,r,i){var o=i?[]:void 0;return nr.forEach(e.inEdges(r.v),function(a){var s=e.edge(a),l=e.node(a.v);i&&o.push({v:a.v,w:a.w}),l.out-=s,ex(t,n,l)}),nr.forEach(e.outEdges(r.v),function(a){var s=e.edge(a),l=a.w,u=e.node(l);u.in-=s,ex(t,n,u)}),e.removeNode(r.v),o}function RN(e,t){var n=new SN,r=0,i=0;nr.forEach(e.nodes(),function(s){n.setNode(s,{v:s,in:0,out:0})}),nr.forEach(e.edges(),function(s){var l=n.edge(s.v,s.w)||0,u=t(s),d=l+u;n.setEdge(s.v,s.w,d),i=Math.max(i,n.node(s.v).out+=u),r=Math.max(r,n.node(s.w).in+=u)});var o=nr.range(i+r+3).map(function(){return new CN}),a=r+1;return nr.forEach(n.nodes(),function(s){ex(o,a,n.node(s))}),{graph:n,buckets:o,zeroIdx:a}}function ex(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}var fi=Fe,AN=jN,LN={run:PN,undo:MN};function PN(e){var t=e.graph().acyclicer==="greedy"?AN(e,n(e)):zN(e);fi.forEach(t,function(r){var i=e.edge(r);e.removeEdge(r),i.forwardName=r.name,i.reversed=!0,e.setEdge(r.w,r.v,i,fi.uniqueId("rev"))});function n(r){return function(i){return r.edge(i).weight}}}function zN(e){var t=[],n={},r={};function i(o){fi.has(r,o)||(r[o]=!0,n[o]=!0,fi.forEach(e.outEdges(o),function(a){fi.has(n,a.w)?t.push(a):i(a.w)}),delete n[o])}return fi.forEach(e.nodes(),i),t}function MN(e){fi.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}var je=Fe,ST=Rn.Graph,Ft={addDummyNode:CT,simplify:NN,asNonCompoundGraph:DN,successorWeights:ON,predecessorWeights:BN,intersectRect:FN,buildLayerMatrix:qN,normalizeRanks:$N,removeEmptyRanks:HN,addBorderNode:UN,maxRank:jT,partition:WN,time:VN,notime:GN};function CT(e,t,n,r){var i;do i=je.uniqueId(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function NN(e){var t=new ST().setGraph(e.graph());return je.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),je.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function DN(e){var t=new ST({multigraph:e.isMultigraph()}).setGraph(e.graph());return je.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),je.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function ON(e){var t=je.map(e.nodes(),function(n){var r={};return je.forEach(e.outEdges(n),function(i){r[i.w]=(r[i.w]||0)+e.edge(i).weight}),r});return je.zipObject(e.nodes(),t)}function BN(e){var t=je.map(e.nodes(),function(n){var r={};return je.forEach(e.inEdges(n),function(i){r[i.v]=(r[i.v]||0)+e.edge(i).weight}),r});return je.zipObject(e.nodes(),t)}function FN(e,t){var n=e.x,r=e.y,i=t.x-n,o=t.y-r,a=e.width/2,s=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(o)*a>Math.abs(i)*s?(o<0&&(s=-s),l=s*i/o,u=s):(i<0&&(a=-a),l=a,u=a*o/i),{x:n+l,y:r+u}}function qN(e){var t=je.map(je.range(jT(e)+1),function(){return[]});return je.forEach(e.nodes(),function(n){var r=e.node(n),i=r.rank;je.isUndefined(i)||(t[i][r.order]=n)}),t}function $N(e){var t=je.min(je.map(e.nodes(),function(n){return e.node(n).rank}));je.forEach(e.nodes(),function(n){var r=e.node(n);je.has(r,"rank")&&(r.rank-=t)})}function HN(e){var t=je.min(je.map(e.nodes(),function(o){return e.node(o).rank})),n=[];je.forEach(e.nodes(),function(o){var a=e.node(o).rank-t;n[a]||(n[a]=[]),n[a].push(o)});var r=0,i=e.graph().nodeRankFactor;je.forEach(n,function(o,a){je.isUndefined(o)&&a%i!==0?--r:r&&je.forEach(o,function(s){e.node(s).rank+=r})})}function UN(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),CT(e,"border",i,t)}function jT(e){return je.max(je.map(e.nodes(),function(t){var n=e.node(t).rank;if(!je.isUndefined(n))return n}))}function WN(e,t){var n={lhs:[],rhs:[]};return je.forEach(e,function(r){t(r)?n.lhs.push(r):n.rhs.push(r)}),n}function VN(e,t){var n=je.now();try{return t()}finally{console.log(e+" time: "+(je.now()-n)+"ms")}}function GN(e,t){return t()}var ET=Fe,YN=Ft,KN={run:XN,undo:JN};function XN(e){e.graph().dummyChains=[],ET.forEach(e.edges(),function(t){QN(e,t)})}function QN(e,t){var n=t.v,r=e.node(n).rank,i=t.w,o=e.node(i).rank,a=t.name,s=e.edge(t),l=s.labelRank;if(o!==r+1){e.removeEdge(t);var u,d,f;for(f=0,++r;r<o;++f,++r)s.points=[],d={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},u=YN.addDummyNode(e,"edge",d,"_d"),r===l&&(d.width=s.width,d.height=s.height,d.dummy="edge-label",d.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},a),f===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,i,{weight:s.weight},a)}}function JN(e){ET.forEach(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}var As=Fe,Du={longestPath:ZN,slack:eD};function ZN(e){var t={};function n(r){var i=e.node(r);if(As.has(t,r))return i.rank;t[r]=!0;var o=As.min(As.map(e.outEdges(r),function(a){return n(a.w)-e.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}As.forEach(e.sources(),n)}function eD(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var Hl=Fe,tD=Rn.Graph,Ul=Du.slack,TT=nD;function nD(e){var t=new tD({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,o;rD(t,e)<r;)i=iD(t,e),o=t.hasNode(i.v)?Ul(e,i):-Ul(e,i),oD(t,e,o);return t}function rD(e,t){function n(r){Hl.forEach(t.nodeEdges(r),function(i){var o=i.v,a=r===o?i.w:o;!e.hasNode(a)&&!Ul(t,i)&&(e.setNode(a,{}),e.setEdge(r,a,{}),n(a))})}return Hl.forEach(e.nodes(),n),e.nodeCount()}function iD(e,t){return Hl.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return Ul(t,n)})}function oD(e,t,n){Hl.forEach(e.nodes(),function(r){t.node(r).rank+=n})}var cr=Fe,aD=TT,sD=Du.slack,lD=Du.longestPath,uD=Rn.alg.preorder,cD=Rn.alg.postorder,dD=Ft.simplify,fD=Li;Li.initLowLimValues=Gy;Li.initCutValues=Vy;Li.calcCutValue=IT;Li.leaveEdge=AT;Li.enterEdge=LT;Li.exchangeEdges=PT;function Li(e){e=dD(e),lD(e);var t=aD(e);Gy(t),Vy(t,e);for(var n,r;n=AT(t);)r=LT(t,e,n),PT(t,e,n,r)}function Vy(e,t){var n=cD(e,e.nodes());n=n.slice(0,n.length-1),cr.forEach(n,function(r){hD(e,t,r)})}function hD(e,t,n){var r=e.node(n),i=r.parent;e.edge(n,i).cutvalue=IT(e,t,n)}function IT(e,t,n){var r=e.node(n),i=r.parent,o=!0,a=t.edge(n,i),s=0;return a||(o=!1,a=t.edge(i,n)),s=a.weight,cr.forEach(t.nodeEdges(n),function(l){var u=l.v===n,d=u?l.w:l.v;if(d!==i){var f=u===o,h=t.edge(l).weight;if(s+=f?h:-h,gD(e,n,d)){var p=e.edge(n,d).cutvalue;s+=f?-p:p}}}),s}function Gy(e,t){arguments.length<2&&(t=e.nodes()[0]),RT(e,{},1,t)}function RT(e,t,n,r,i){var o=n,a=e.node(r);return t[r]=!0,cr.forEach(e.neighbors(r),function(s){cr.has(t,s)||(n=RT(e,t,n,s,r))}),a.low=o,a.lim=n++,i?a.parent=i:delete a.parent,n}function AT(e){return cr.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function LT(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var o=e.node(r),a=e.node(i),s=o,l=!1;o.lim>a.lim&&(s=a,l=!0);var u=cr.filter(t.edges(),function(d){return l===iS(e,e.node(d.v),s)&&l!==iS(e,e.node(d.w),s)});return cr.minBy(u,function(d){return sD(t,d)})}function PT(e,t,n,r){var i=n.v,o=n.w;e.removeEdge(i,o),e.setEdge(r.v,r.w,{}),Gy(e),Vy(e,t),pD(e,t)}function pD(e,t){var n=cr.find(e.nodes(),function(i){return!t.node(i).parent}),r=uD(e,n);r=r.slice(1),cr.forEach(r,function(i){var o=e.node(i).parent,a=t.edge(i,o),s=!1;a||(a=t.edge(o,i),s=!0),t.node(i).rank=t.node(o).rank+(s?a.minlen:-a.minlen)})}function gD(e,t,n){return e.hasEdge(t,n)}function iS(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var mD=Du,zT=mD.longestPath,xD=TT,yD=fD,vD=wD;function wD(e){switch(e.graph().ranker){case"network-simplex":oS(e);break;case"tight-tree":kD(e);break;case"longest-path":bD(e);break;default:oS(e)}}var bD=zT;function kD(e){zT(e),xD(e)}function oS(e){yD(e)}var tx=Fe,_D=SD;function SD(e){var t=jD(e);tx.forEach(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,o=CD(e,t,i.v,i.w),a=o.path,s=o.lca,l=0,u=a[l],d=!0;n!==i.w;){if(r=e.node(n),d){for(;(u=a[l])!==s&&e.node(u).maxRank<r.rank;)l++;u===s&&(d=!1)}if(!d){for(;l<a.length-1&&e.node(u=a[l+1]).minRank<=r.rank;)l++;u=a[l]}e.setParent(n,u),n=e.successors(n)[0]}})}function CD(e,t,n,r){var i=[],o=[],a=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),l,u;l=n;do l=e.parent(l),i.push(l);while(l&&(t[l].low>a||s>t[l].lim));for(u=l,l=r;(l=e.parent(l))!==u;)o.push(l);return{path:i.concat(o.reverse()),lca:u}}function jD(e){var t={},n=0;function r(i){var o=n;tx.forEach(e.children(i),r),t[i]={low:o,lim:n++}}return tx.forEach(e.children(),r),t}var rr=Fe,nx=Ft,ED={run:TD,cleanup:AD};function TD(e){var t=nx.addDummyNode(e,"root",{},"_root"),n=ID(e),r=rr.max(rr.values(n))-1,i=2*r+1;e.graph().nestingRoot=t,rr.forEach(e.edges(),function(a){e.edge(a).minlen*=i});var o=RD(e)+1;rr.forEach(e.children(),function(a){MT(e,t,i,o,r,n,a)}),e.graph().nodeRankFactor=i}function MT(e,t,n,r,i,o,a){var s=e.children(a);if(!s.length){a!==t&&e.setEdge(t,a,{weight:0,minlen:n});return}var l=nx.addBorderNode(e,"_bt"),u=nx.addBorderNode(e,"_bb"),d=e.node(a);e.setParent(l,a),d.borderTop=l,e.setParent(u,a),d.borderBottom=u,rr.forEach(s,function(f){MT(e,t,n,r,i,o,f);var h=e.node(f),p=h.borderTop?h.borderTop:f,m=h.borderBottom?h.borderBottom:f,g=h.borderTop?r:2*r,v=p!==m?1:i-o[a]+1;e.setEdge(l,p,{weight:g,minlen:v,nestingEdge:!0}),e.setEdge(m,u,{weight:g,minlen:v,nestingEdge:!0})}),e.parent(a)||e.setEdge(t,l,{weight:0,minlen:i+o[a]})}function ID(e){var t={};function n(r,i){var o=e.children(r);o&&o.length&&rr.forEach(o,function(a){n(a,i+1)}),t[r]=i}return rr.forEach(e.children(),function(r){n(r,1)}),t}function RD(e){return rr.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function AD(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,rr.forEach(e.edges(),function(n){var r=e.edge(n);r.nestingEdge&&e.removeEdge(n)})}var kg=Fe,LD=Ft,PD=zD;function zD(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&kg.forEach(r,t),kg.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)aS(e,"borderLeft","_bl",n,i,o),aS(e,"borderRight","_br",n,i,o)}}kg.forEach(e.children(),t)}function aS(e,t,n,r,i,o){var a={width:0,height:0,rank:o,borderType:t},s=i[t][o-1],l=LD.addDummyNode(e,"border",a,n);i[t][o]=l,e.setParent(l,r),s&&e.setEdge(s,l,{weight:1})}var Bn=Fe,MD={adjust:ND,undo:DD};function ND(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&NT(e)}function DD(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&OD(e),(t==="lr"||t==="rl")&&(BD(e),NT(e))}function NT(e){Bn.forEach(e.nodes(),function(t){sS(e.node(t))}),Bn.forEach(e.edges(),function(t){sS(e.edge(t))})}function sS(e){var t=e.width;e.width=e.height,e.height=t}function OD(e){Bn.forEach(e.nodes(),function(t){_g(e.node(t))}),Bn.forEach(e.edges(),function(t){var n=e.edge(t);Bn.forEach(n.points,_g),Bn.has(n,"y")&&_g(n)})}function _g(e){e.y=-e.y}function BD(e){Bn.forEach(e.nodes(),function(t){Sg(e.node(t))}),Bn.forEach(e.edges(),function(t){var n=e.edge(t);Bn.forEach(n.points,Sg),Bn.has(n,"x")&&Sg(n)})}function Sg(e){var t=e.x;e.x=e.y,e.y=t}var Yn=Fe,FD=qD;function qD(e){var t={},n=Yn.filter(e.nodes(),function(s){return!e.children(s).length}),r=Yn.max(Yn.map(n,function(s){return e.node(s).rank})),i=Yn.map(Yn.range(r+1),function(){return[]});function o(s){if(!Yn.has(t,s)){t[s]=!0;var l=e.node(s);i[l.rank].push(s),Yn.forEach(e.successors(s),o)}}var a=Yn.sortBy(n,function(s){return e.node(s).rank});return Yn.forEach(a,o),i}var wr=Fe,$D=HD;function HD(e,t){for(var n=0,r=1;r<t.length;++r)n+=UD(e,t[r-1],t[r]);return n}function UD(e,t,n){for(var r=wr.zipObject(n,wr.map(n,function(u,d){return d})),i=wr.flatten(wr.map(t,function(u){return wr.sortBy(wr.map(e.outEdges(u),function(d){return{pos:r[d.w],weight:e.edge(d).weight}}),"pos")}),!0),o=1;o<n.length;)o<<=1;var a=2*o-1;o-=1;var s=wr.map(new Array(a),function(){return 0}),l=0;return wr.forEach(i.forEach(function(u){var d=u.pos+o;s[d]+=u.weight;for(var f=0;d>0;)d%2&&(f+=s[d+1]),d=d-1>>1,s[d]+=u.weight;l+=u.weight*f})),l}var lS=Fe,WD=VD;function VD(e,t){return lS.map(t,function(n){var r=e.inEdges(n);if(r.length){var i=lS.reduce(r,function(o,a){var s=e.edge(a),l=e.node(a.v);return{sum:o.sum+s.weight*l.order,weight:o.weight+s.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:n}})}var Gt=Fe,GD=YD;function YD(e,t){var n={};Gt.forEach(e,function(i,o){var a=n[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};Gt.isUndefined(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),Gt.forEach(t.edges(),function(i){var o=n[i.v],a=n[i.w];!Gt.isUndefined(o)&&!Gt.isUndefined(a)&&(a.indegree++,o.out.push(n[i.w]))});var r=Gt.filter(n,function(i){return!i.indegree});return KD(r)}function KD(e){var t=[];function n(o){return function(a){a.merged||(Gt.isUndefined(a.barycenter)||Gt.isUndefined(o.barycenter)||a.barycenter>=o.barycenter)&&XD(o,a)}}function r(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();t.push(i),Gt.forEach(i.in.reverse(),n(i)),Gt.forEach(i.out,r(i))}return Gt.map(Gt.filter(t,function(o){return!o.merged}),function(o){return Gt.pick(o,["vs","i","barycenter","weight"])})}function XD(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}var ra=Fe,QD=Ft,JD=ZD;function ZD(e,t){var n=QD.partition(e,function(d){return ra.has(d,"barycenter")}),r=n.lhs,i=ra.sortBy(n.rhs,function(d){return-d.i}),o=[],a=0,s=0,l=0;r.sort(eO(!!t)),l=uS(o,i,l),ra.forEach(r,function(d){l+=d.vs.length,o.push(d.vs),a+=d.barycenter*d.weight,s+=d.weight,l=uS(o,i,l)});var u={vs:ra.flatten(o,!0)};return s&&(u.barycenter=a/s,u.weight=s),u}function uS(e,t,n){for(var r;t.length&&(r=ra.last(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function eO(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}var Tr=Fe,tO=WD,nO=GD,rO=JD,iO=DT;function DT(e,t,n,r){var i=e.children(t),o=e.node(t),a=o?o.borderLeft:void 0,s=o?o.borderRight:void 0,l={};a&&(i=Tr.filter(i,function(m){return m!==a&&m!==s}));var u=tO(e,i);Tr.forEach(u,function(m){if(e.children(m.v).length){var g=DT(e,m.v,n,r);l[m.v]=g,Tr.has(g,"barycenter")&&aO(m,g)}});var d=nO(u,n);oO(d,l);var f=rO(d,r);if(a&&(f.vs=Tr.flatten([a,f.vs,s],!0),e.predecessors(a).length)){var h=e.node(e.predecessors(a)[0]),p=e.node(e.predecessors(s)[0]);Tr.has(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+h.order+p.order)/(f.weight+2),f.weight+=2}return f}function oO(e,t){Tr.forEach(e,function(n){n.vs=Tr.flatten(n.vs.map(function(r){return t[r]?t[r].vs:r}),!0)})}function aO(e,t){Tr.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var ia=Fe,sO=Rn.Graph,lO=uO;function uO(e,t,n){var r=cO(e),i=new sO({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(o){return e.node(o)});return ia.forEach(e.nodes(),function(o){var a=e.node(o),s=e.parent(o);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(i.setNode(o),i.setParent(o,s||r),ia.forEach(e[n](o),function(l){var u=l.v===o?l.w:l.v,d=i.edge(u,o),f=ia.isUndefined(d)?0:d.weight;i.setEdge(u,o,{weight:e.edge(l).weight+f})}),ia.has(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),i}function cO(e){for(var t;e.hasNode(t=ia.uniqueId("_root")););return t}var dO=Fe,fO=hO;function hO(e,t,n){var r={},i;dO.forEach(n,function(o){for(var a=e.parent(o),s,l;a;){if(s=e.parent(a),s?(l=r[s],r[s]=a):(l=i,i=a),l&&l!==a){t.setEdge(l,a);return}a=s}})}var Hr=Fe,pO=FD,gO=$D,mO=iO,xO=lO,yO=fO,vO=Rn.Graph,cS=Ft,wO=bO;function bO(e){var t=cS.maxRank(e),n=dS(e,Hr.range(1,t+1),"inEdges"),r=dS(e,Hr.range(t-1,-1,-1),"outEdges"),i=pO(e);fS(e,i);for(var o=Number.POSITIVE_INFINITY,a,s=0,l=0;l<4;++s,++l){kO(s%2?n:r,s%4>=2),i=cS.buildLayerMatrix(e);var u=gO(e,i);u<o&&(l=0,a=Hr.cloneDeep(i),o=u)}fS(e,a)}function dS(e,t,n){return Hr.map(t,function(r){return xO(e,r,n)})}function kO(e,t){var n=new vO;Hr.forEach(e,function(r){var i=r.graph().root,o=mO(r,i,n,t);Hr.forEach(o.vs,function(a,s){r.node(a).order=s}),yO(r,n,o.vs)})}function fS(e,t){Hr.forEach(t,function(n){Hr.forEach(n,function(r,i){e.node(r).order=i})})}var ae=Fe,_O=Rn.Graph,SO=Ft,CO={positionX:NO};function jO(e,t){var n={};function r(i,o){var a=0,s=0,l=i.length,u=ae.last(o);return ae.forEach(o,function(d,f){var h=TO(e,d),p=h?e.node(h).order:l;(h||d===u)&&(ae.forEach(o.slice(s,f+1),function(m){ae.forEach(e.predecessors(m),function(g){var v=e.node(g),x=v.order;(x<a||p<x)&&!(v.dummy&&e.node(m).dummy)&&OT(n,g,m)})}),s=f+1,a=p)}),o}return ae.reduce(t,r),n}function EO(e,t){var n={};function r(o,a,s,l,u){var d;ae.forEach(ae.range(a,s),function(f){d=o[f],e.node(d).dummy&&ae.forEach(e.predecessors(d),function(h){var p=e.node(h);p.dummy&&(p.order<l||p.order>u)&&OT(n,h,d)})})}function i(o,a){var s=-1,l,u=0;return ae.forEach(a,function(d,f){if(e.node(d).dummy==="border"){var h=e.predecessors(d);h.length&&(l=e.node(h[0]).order,r(a,u,f,s,l),u=f,s=l)}r(a,u,a.length,l,o.length)}),a}return ae.reduce(t,i),n}function TO(e,t){if(e.node(t).dummy)return ae.find(e.predecessors(t),function(n){return e.node(n).dummy})}function OT(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function IO(e,t,n){if(t>n){var r=t;t=n,n=r}return ae.has(e[t],n)}function RO(e,t,n,r){var i={},o={},a={};return ae.forEach(t,function(s){ae.forEach(s,function(l,u){i[l]=l,o[l]=l,a[l]=u})}),ae.forEach(t,function(s){var l=-1;ae.forEach(s,function(u){var d=r(u);if(d.length){d=ae.sortBy(d,function(g){return a[g]});for(var f=(d.length-1)/2,h=Math.floor(f),p=Math.ceil(f);h<=p;++h){var m=d[h];o[u]===u&&l<a[m]&&!IO(n,u,m)&&(o[m]=u,o[u]=i[u]=i[m],l=a[m])}}})}),{root:i,align:o}}function AO(e,t,n,r,i){var o={},a=LO(e,t,n,i),s=i?"borderLeft":"borderRight";function l(f,h){for(var p=a.nodes(),m=p.pop(),g={};m;)g[m]?f(m):(g[m]=!0,p.push(m),p=p.concat(h(m))),m=p.pop()}function u(f){o[f]=a.inEdges(f).reduce(function(h,p){return Math.max(h,o[p.v]+a.edge(p))},0)}function d(f){var h=a.outEdges(f).reduce(function(m,g){return Math.min(m,o[g.w]-a.edge(g))},Number.POSITIVE_INFINITY),p=e.node(f);h!==Number.POSITIVE_INFINITY&&p.borderType!==s&&(o[f]=Math.max(o[f],h))}return l(u,a.predecessors.bind(a)),l(d,a.successors.bind(a)),ae.forEach(r,function(f){o[f]=o[n[f]]}),o}function LO(e,t,n,r){var i=new _O,o=e.graph(),a=DO(o.nodesep,o.edgesep,r);return ae.forEach(t,function(s){var l;ae.forEach(s,function(u){var d=n[u];if(i.setNode(d),l){var f=n[l],h=i.edge(f,d);i.setEdge(f,d,Math.max(a(e,u,l),h||0))}l=u})}),i}function PO(e,t){return ae.minBy(ae.values(t),function(n){var r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return ae.forIn(n,function(o,a){var s=OO(e,a)/2;r=Math.max(o+s,r),i=Math.min(o-s,i)}),r-i})}function zO(e,t){var n=ae.values(t),r=ae.min(n),i=ae.max(n);ae.forEach(["u","d"],function(o){ae.forEach(["l","r"],function(a){var s=o+a,l=e[s],u;if(l!==t){var d=ae.values(l);u=a==="l"?r-ae.min(d):i-ae.max(d),u&&(e[s]=ae.mapValues(l,function(f){return f+u}))}})})}function MO(e,t){return ae.mapValues(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=ae.sortBy(ae.map(e,r));return(i[1]+i[2])/2})}function NO(e){var t=SO.buildLayerMatrix(e),n=ae.merge(jO(e,t),EO(e,t)),r={},i;ae.forEach(["u","d"],function(a){i=a==="u"?t:ae.values(t).reverse(),ae.forEach(["l","r"],function(s){s==="r"&&(i=ae.map(i,function(f){return ae.values(f).reverse()}));var l=(a==="u"?e.predecessors:e.successors).bind(e),u=RO(e,i,n,l),d=AO(e,i,u.root,u.align,s==="r");s==="r"&&(d=ae.mapValues(d,function(f){return-f})),r[a+s]=d})});var o=PO(e,r);return zO(r,o),MO(r,e.graph().align)}function DO(e,t,n){return function(r,i,o){var a=r.node(i),s=r.node(o),l=0,u;if(l+=a.width/2,ae.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2;break}if(u&&(l+=n?u:-u),u=0,l+=(a.dummy?t:e)/2,l+=(s.dummy?t:e)/2,l+=s.width/2,ae.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2;break}return u&&(l+=n?u:-u),u=0,l}}function OO(e,t){return e.node(t).width}var oa=Fe,BT=Ft,BO=CO.positionX,FO=qO;function qO(e){e=BT.asNonCompoundGraph(e),$O(e),oa.forEach(BO(e),function(t,n){e.node(n).x=t})}function $O(e){var t=BT.buildLayerMatrix(e),n=e.graph().ranksep,r=0;oa.forEach(t,function(i){var o=oa.max(oa.map(i,function(a){return e.node(a).height}));oa.forEach(i,function(a){e.node(a).y=r+o/2}),r+=o+n})}var de=Fe,hS=LN,pS=KN,HO=vD,UO=Ft.normalizeRanks,WO=_D,VO=Ft.removeEmptyRanks,gS=ED,GO=PD,mS=MD,YO=wO,KO=FO,Yr=Ft,XO=Rn.Graph,QO=JO;function JO(e,t){var n=t&&t.debugTiming?Yr.time:Yr.notime;n("layout",function(){var r=n("  buildLayoutGraph",function(){return uB(e)});n("  runLayout",function(){ZO(r,n)}),n("  updateInputGraph",function(){eB(e,r)})})}function ZO(e,t){t("    makeSpaceForEdgeLabels",function(){cB(e)}),t("    removeSelfEdges",function(){vB(e)}),t("    acyclic",function(){hS.run(e)}),t("    nestingGraph.run",function(){gS.run(e)}),t("    rank",function(){HO(Yr.asNonCompoundGraph(e))}),t("    injectEdgeLabelProxies",function(){dB(e)}),t("    removeEmptyRanks",function(){VO(e)}),t("    nestingGraph.cleanup",function(){gS.cleanup(e)}),t("    normalizeRanks",function(){UO(e)}),t("    assignRankMinMax",function(){fB(e)}),t("    removeEdgeLabelProxies",function(){hB(e)}),t("    normalize.run",function(){pS.run(e)}),t("    parentDummyChains",function(){WO(e)}),t("    addBorderSegments",function(){GO(e)}),t("    order",function(){YO(e)}),t("    insertSelfEdges",function(){wB(e)}),t("    adjustCoordinateSystem",function(){mS.adjust(e)}),t("    position",function(){KO(e)}),t("    positionSelfEdges",function(){bB(e)}),t("    removeBorderNodes",function(){yB(e)}),t("    normalize.undo",function(){pS.undo(e)}),t("    fixupEdgeLabelCoords",function(){mB(e)}),t("    undoCoordinateSystem",function(){mS.undo(e)}),t("    translateGraph",function(){pB(e)}),t("    assignNodeIntersects",function(){gB(e)}),t("    reversePoints",function(){xB(e)}),t("    acyclic.undo",function(){hS.undo(e)})}function eB(e,t){de.forEach(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),de.forEach(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,de.has(i,"x")&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var tB=["nodesep","edgesep","ranksep","marginx","marginy"],nB={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},rB=["acyclicer","ranker","rankdir","align"],iB=["width","height"],oB={width:0,height:0},aB=["minlen","weight","width","height","labeloffset"],sB={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},lB=["labelpos"];function uB(e){var t=new XO({multigraph:!0,compound:!0}),n=jg(e.graph());return t.setGraph(de.merge({},nB,Cg(n,tB),de.pick(n,rB))),de.forEach(e.nodes(),function(r){var i=jg(e.node(r));t.setNode(r,de.defaults(Cg(i,iB),oB)),t.setParent(r,e.parent(r))}),de.forEach(e.edges(),function(r){var i=jg(e.edge(r));t.setEdge(r,de.merge({},sB,Cg(i,aB),de.pick(i,lB)))}),t}function cB(e){var t=e.graph();t.ranksep/=2,de.forEach(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function dB(e){de.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),i=e.node(t.w),o={rank:(i.rank-r.rank)/2+r.rank,e:t};Yr.addDummyNode(e,"edge-proxy",o,"_ep")}})}function fB(e){var t=0;de.forEach(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=de.max(t,r.maxRank))}),e.graph().maxRank=t}function hB(e){de.forEach(e.nodes(),function(t){var n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function pB(e){var t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,s=o.marginy||0;function l(u){var d=u.x,f=u.y,h=u.width,p=u.height;t=Math.min(t,d-h/2),n=Math.max(n,d+h/2),r=Math.min(r,f-p/2),i=Math.max(i,f+p/2)}de.forEach(e.nodes(),function(u){l(e.node(u))}),de.forEach(e.edges(),function(u){var d=e.edge(u);de.has(d,"x")&&l(d)}),t-=a,r-=s,de.forEach(e.nodes(),function(u){var d=e.node(u);d.x-=t,d.y-=r}),de.forEach(e.edges(),function(u){var d=e.edge(u);de.forEach(d.points,function(f){f.x-=t,f.y-=r}),de.has(d,"x")&&(d.x-=t),de.has(d,"y")&&(d.y-=r)}),o.width=n-t+a,o.height=i-r+s}function gB(e){de.forEach(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),o,a;n.points?(o=n.points[0],a=n.points[n.points.length-1]):(n.points=[],o=i,a=r),n.points.unshift(Yr.intersectRect(r,o)),n.points.push(Yr.intersectRect(i,a))})}function mB(e){de.forEach(e.edges(),function(t){var n=e.edge(t);if(de.has(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function xB(e){de.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function yB(e){de.forEach(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),o=e.node(de.last(n.borderLeft)),a=e.node(de.last(n.borderRight));n.width=Math.abs(a.x-o.x),n.height=Math.abs(i.y-r.y),n.x=o.x+n.width/2,n.y=r.y+n.height/2}}),de.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function vB(e){de.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function wB(e){var t=Yr.buildLayerMatrix(e);de.forEach(t,function(n){var r=0;de.forEach(n,function(i,o){var a=e.node(i);a.order=o+r,de.forEach(a.selfEdges,function(s){Yr.addDummyNode(e,"selfedge",{width:s.label.width,height:s.label.height,rank:a.rank,order:o+ ++r,e:s.e,label:s.label},"_se")}),delete a.selfEdges})})}function bB(e){de.forEach(e.nodes(),function(t){var n=e.node(t);if(n.dummy==="selfedge"){var r=e.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],n.label.x=n.x,n.label.y=n.y}})}function Cg(e,t){return de.mapValues(de.pick(e,t),Number)}function jg(e){var t={};return de.forEach(e,function(n,r){t[r.toLowerCase()]=n}),t}var Ls=Fe,kB=Ft,_B=Rn.Graph,SB={debugOrdering:CB};function CB(e){var t=kB.buildLayerMatrix(e),n=new _B({compound:!0,multigraph:!0}).setGraph({});return Ls.forEach(e.nodes(),function(r){n.setNode(r,{label:r}),n.setParent(r,"layer"+e.node(r).rank)}),Ls.forEach(e.edges(),function(r){n.setEdge(r.v,r.w,{},r.name)}),Ls.forEach(t,function(r,i){var o="layer"+i;n.setNode(o,{rank:"same"}),Ls.reduce(r,function(a,s){return n.setEdge(a,s,{style:"invis"}),s})}),n}var jB="0.8.5",EB={graphlib:Rn,layout:QO,debug:SB,util:{time:Ft.time,notime:Ft.notime},version:jB};const xS=Xl(EB);function TB(e,t){const[n,r]=T.useState(e);return T.useEffect(()=>{const i=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(i)}},[e,t]),n}function IB(e){const t=new Map;for(const n of e)t.set(n.hash,n),t.set(n.short_hash,n),n.hash.length>=7&&t.set(n.hash.slice(0,7),n);return t}const RB=({nodes:e,gitHistory:t=[],onSelectNode:n,onHighlightNodes:r,placeholder:i="Search nodes, commits, prompts...",query:o,onQueryChange:a,sortOrder:s="newest",onSortOrderChange:l})=>{const[u,d]=T.useState(""),f=o!==void 0,h=f?o:u,p=f?a||(()=>{}):d,[m,g]=T.useState(!1),[v,x]=T.useState(0),y=T.useRef(null),w=T.useRef(null),k=TB(h,150),E=T.useMemo(()=>IB(t),[t]),C=T.useMemo(()=>{var D,V,N,q;if(!k||k.length<2)return[];const P=k.toLowerCase(),$=[],R=new Set;for(const S of e){const W=Vr(S.metadata_json);if(S.title.toLowerCase().includes(P)&&(R.has(S.id)||($.push({node:S,matchType:"title",matchText:S.title}),R.add(S.id))),(D=S.description)!=null&&D.toLowerCase().includes(P)&&(R.has(S.id)||($.push({node:S,matchType:"description",matchText:S.description}),R.add(S.id))),W!=null&&W.commit){const K=E.get(W.commit)||E.get(W.commit.slice(0,7)),I=((V=K==null?void 0:K.message)==null?void 0:V.toLowerCase())||"";(W.commit.toLowerCase().includes(P)||I.includes(P))&&(R.has(S.id)||($.push({node:S,matchType:"commit",matchText:(K==null?void 0:K.message)||W.commit,commitInfo:K}),R.add(S.id)))}if((N=W==null?void 0:W.prompt)!=null&&N.toLowerCase().includes(P)&&(R.has(S.id)||($.push({node:S,matchType:"prompt",matchText:W.prompt}),R.add(S.id))),(q=W==null?void 0:W.files)!=null&&q.some(K=>K.toLowerCase().includes(P))&&!R.has(S.id)){const K=W.files.find(I=>I.toLowerCase().includes(P))||"";$.push({node:S,matchType:"files",matchText:K}),R.add(S.id)}}const F={outcome:0,goal:1,action:2,option:3,decision:4,observation:5};return $.sort((S,W)=>{if(S.matchType==="title"&&W.matchType!=="title")return-1;if(W.matchType==="title"&&S.matchType!=="title")return 1;const K=F[S.node.node_type]??99,I=F[W.node.node_type]??99;if(K!==I)return K-I;const re=new Date(S.node.updated_at).getTime(),ye=new Date(W.node.updated_at).getTime();return s==="oldest"?re-ye:ye-re})},[k,e,E,s]),j=T.useMemo(()=>C.slice(0,15),[C]);T.useEffect(()=>{const P=new Set(C.map($=>$.node.id));r(P)},[C,r]),T.useEffect(()=>{x(0)},[j]);const b=T.useCallback(P=>{var $,R;if(j.length)switch(P.key){case"ArrowDown":P.preventDefault(),x(F=>Math.min(F+1,j.length-1));break;case"ArrowUp":P.preventDefault(),x(F=>Math.max(F-1,0));break;case"Enter":P.preventDefault(),j[v]&&(n(j[v].node),p(""),($=y.current)==null||$.blur());break;case"Escape":P.preventDefault(),p(""),(R=y.current)==null||R.blur();break}},[j,v,n]);T.useEffect(()=>{if(w.current&&j.length>0){const P=w.current.children[v];P==null||P.scrollIntoView({block:"nearest"})}},[v,j.length]);const A=T.useCallback(P=>{var $;n(P.node),p(""),($=y.current)==null||$.blur()},[n]),_=m&&j.length>0,L=P=>{switch(P){case"title":return"Title";case"description":return"Desc";case"commit":return"Commit";case"prompt":return"Prompt";case"files":return"File"}};return c.jsxs("div",{style:Xe.container,children:[c.jsxs("div",{style:Xe.inputWrapper,children:[c.jsx("svg",{style:Xe.searchIcon,viewBox:"0 0 16 16",fill:"currentColor",children:c.jsx("path",{d:"M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"})}),c.jsx("input",{ref:y,type:"text",value:h,onChange:P=>p(P.target.value),onFocus:()=>g(!0),onBlur:()=>setTimeout(()=>g(!1),200),onKeyDown:b,placeholder:i,style:Xe.input,"aria-label":"Search nodes","aria-expanded":_,"aria-controls":"search-results",role:"combobox"}),h&&c.jsx("button",{onClick:()=>p(""),style:Xe.clearBtn,"aria-label":"Clear search",children:"×"})]}),_&&c.jsxs("div",{ref:w,id:"search-results",style:Xe.dropdown,role:"listbox",children:[j.map((P,$)=>c.jsxs("div",{onClick:()=>A(P),style:{...Xe.resultItem,...$===v?Xe.resultItemSelected:{}},role:"option","aria-selected":$===v,children:[c.jsxs("div",{style:Xe.resultLeft,children:[c.jsx("div",{style:{...Xe.nodeTypeDot,backgroundColor:me(P.node.node_type)}}),c.jsxs("span",{style:Xe.nodeId,children:["#",P.node.id]}),c.jsx("span",{style:Xe.resultTitle,children:Ee(P.node.title,35)})]}),c.jsxs("div",{style:Xe.resultRight,children:[c.jsx("span",{style:Xe.matchLabel,children:L(P.matchType)}),P.matchType==="commit"&&P.commitInfo&&c.jsx("span",{style:Xe.commitHash,children:my(P.commitInfo.hash)})]})]},`${P.node.id}-${P.matchType}`)),c.jsxs("div",{style:Xe.dropdownFooter,children:[c.jsx("span",{style:Xe.footerHint,children:C.length>15?`Showing 15 of ${C.length} · All ${C.length} highlighted`:"↑↓ navigate · Enter select · Esc close"}),l&&c.jsx("button",{onClick:P=>{P.preventDefault(),P.stopPropagation(),l(s==="newest"?"oldest":"newest")},style:Xe.sortToggle,title:`Sort by ${s==="newest"?"oldest":"newest"} first`,children:s==="newest"?"↓ Newest":"↑ Oldest"})]})]}),m&&h.length>=2&&C.length===0&&c.jsx("div",{style:Xe.dropdown,children:c.jsx("div",{style:Xe.noResults,children:"No matching nodes found"})})]})},Xe={container:{position:"relative",flex:1,maxWidth:"400px",minWidth:"200px"},inputWrapper:{position:"relative",display:"flex",alignItems:"center"},searchIcon:{position:"absolute",left:"10px",width:"16px",height:"16px",color:"#57606a",pointerEvents:"none"},input:{width:"100%",padding:"8px 32px 8px 34px",backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",borderRadius:"6px",fontSize:"13px",color:"#24292f",outline:"none",transition:"border-color 0.15s, background-color 0.15s"},clearBtn:{position:"absolute",right:"8px",width:"20px",height:"20px",padding:0,backgroundColor:"transparent",border:"none",borderRadius:"4px",color:"#57606a",fontSize:"16px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},dropdown:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,backgroundColor:"#ffffff",border:"1px solid #d0d7de",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.12)",maxHeight:"400px",overflowY:"auto",zIndex:1e3},resultItem:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 12px",cursor:"pointer",borderBottom:"1px solid #f0f0f0",transition:"background-color 0.1s"},resultItemSelected:{backgroundColor:"#f6f8fa"},resultLeft:{display:"flex",alignItems:"center",gap:"8px",flex:1,minWidth:0},nodeTypeDot:{width:"8px",height:"8px",borderRadius:"50%",flexShrink:0},nodeId:{fontSize:"11px",color:"#6e7781",fontFamily:"monospace",flexShrink:0},resultTitle:{fontSize:"13px",color:"#24292f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},resultRight:{display:"flex",alignItems:"center",gap:"8px",flexShrink:0,marginLeft:"8px"},matchLabel:{fontSize:"10px",color:"#57606a",backgroundColor:"#f6f8fa",padding:"2px 6px",borderRadius:"4px",textTransform:"uppercase"},commitHash:{fontSize:"11px",color:"#0969da",fontFamily:"monospace",backgroundColor:"#ddf4ff",padding:"2px 6px",borderRadius:"4px"},dropdownFooter:{padding:"8px 12px",backgroundColor:"#f6f8fa",borderTop:"1px solid #d0d7de",display:"flex",justifyContent:"space-between",alignItems:"center"},footerHint:{fontSize:"11px",color:"#6e7781"},sortToggle:{fontSize:"11px",color:"#0969da",backgroundColor:"#ddf4ff",border:"1px solid #0969da33",borderRadius:"4px",padding:"2px 8px",cursor:"pointer",fontWeight:500,transition:"background-color 0.15s"},noResults:{padding:"16px",textAlign:"center",color:"#57606a",fontSize:"13px"}},vn=420,ol=180,AB=12,Wl=20,br=10,rx=70,Eg=vn+Wl*2,LB=768;function PB(e){if(!e.metadata_json)return null;try{const t=JSON.parse(e.metadata_json);return typeof t.confidence=="number"?t.confidence:null}catch{return null}}function zB(e,t,n){const r=[...e].sort((a,s)=>a.nodeY-s.nodeY),i=t-vn-Wl;let o=rx;return r.map((a,s)=>{const l=o;return o+=ol+AB,o>n-Wl&&s<r.length-1&&(o=rx),{...a,cardX:i,cardY:l}})}const MB=({nodes:e,selectedNode:t,onSelectNode:n,onClose:r})=>{if(!t)return null;const i=e.find(o=>o.node.id===t.id);return i?c.jsxs("div",{style:{position:"fixed",bottom:0,left:0,right:0,backgroundColor:"#fff",borderTopLeftRadius:16,borderTopRightRadius:16,boxShadow:"0 -4px 20px rgba(0,0,0,0.15)",zIndex:100,padding:"16px 20px 24px",maxHeight:"50vh",overflowY:"auto"},children:[c.jsx("div",{style:{width:40,height:4,backgroundColor:"#d0d7de",borderRadius:2,margin:"0 auto 16px"}}),c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:12},children:[c.jsx("div",{style:{width:12,height:12,borderRadius:"50%",backgroundColor:i.color}}),c.jsx("span",{style:{backgroundColor:i.color+"20",color:i.color,padding:"4px 10px",borderRadius:4,fontSize:11,fontWeight:600},children:t.node_type.toUpperCase()}),c.jsxs("span",{style:{color:"#6e7781",fontFamily:"monospace",fontSize:13},children:["#",t.id]}),c.jsx("button",{onClick:r,style:{marginLeft:"auto",background:"none",border:"none",fontSize:24,color:"#6e7781",cursor:"pointer",padding:4},children:"×"})]}),c.jsx("h3",{style:{margin:"0 0 8px",fontSize:16,color:"#24292f"},children:t.title}),t.description&&c.jsx("p",{style:{margin:"0 0 16px",fontSize:14,color:"#57606a",lineHeight:1.5},children:t.description}),c.jsx("button",{onClick:()=>n(t),style:{width:"100%",padding:"12px 16px",backgroundColor:"#0969da",color:"#fff",border:"none",borderRadius:8,fontSize:14,fontWeight:500,cursor:"pointer"},children:"View Full Details"}),e.length>1&&c.jsxs("div",{style:{marginTop:16,paddingTop:16,borderTop:"1px solid #d0d7de"},children:[c.jsxs("div",{style:{fontSize:12,color:"#6e7781",marginBottom:8},children:["Other matches (",e.length-1,")"]}),c.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:e.filter(o=>o.node.id!==t.id).slice(0,6).map(o=>c.jsxs("button",{onClick:()=>n(o.node),style:{padding:"6px 10px",backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",borderRadius:6,fontSize:12,cursor:"pointer",display:"flex",alignItems:"center",gap:6},children:[c.jsx("span",{style:{width:8,height:8,borderRadius:"50%",backgroundColor:o.color}}),"#",o.node.id]},o.node.id))})]})]}):null};function NB(e,t,n){const r=[],i=[],o=new Map(t.map(d=>[d.id,d])),a=[e],s=new Set([e]);for(;a.length>0;){const d=a.shift(),f=n.filter(h=>h.to_node_id===d);for(const h of f)if(!s.has(h.from_node_id)){s.add(h.from_node_id);const p=o.get(h.from_node_id);p&&(r.push(p),a.push(h.from_node_id))}}const l=[e],u=new Set([e]);for(;l.length>0;){const d=l.shift(),f=n.filter(h=>h.from_node_id===d);for(const h of f)if(!u.has(h.to_node_id)){u.add(h.to_node_id);const p=o.get(h.to_node_id);p&&(i.push(p),l.push(h.to_node_id))}}return{ancestors:r,descendants:i}}const yS={goal:0,outcome:1,decision:2,option:3,action:4,observation:5},DB=({nodes:e,edges:t,highlightedNodeIds:n,visibilityMap:r,containerWidth:i,containerHeight:o,onSelectNode:a,onNavigateToNode:s,onAddToCardStack:l})=>{const[u,d]=T.useState(null),[f,h]=T.useState(null),[p,m]=T.useState(!1),[g,v]=T.useState(null),[x,y]=T.useState("");T.useEffect(()=>{y("")},[g]);const w=b=>e.find(A=>A.id===b),k=b=>{s?s(b):a(b)};T.useEffect(()=>{const b=()=>m(window.innerWidth<LB);return b(),window.addEventListener("resize",b),()=>window.removeEventListener("resize",b)},[]);const E=T.useMemo(()=>{const b=[];return e.forEach(A=>{if(!n.has(A.id))return;const _=r.get(A.id);if(!_||_.visibility!=="too-small")return;const L=t.filter(R=>R.to_node_id===A.id),P=t.filter(R=>R.from_node_id===A.id),$={incoming:L.map(R=>({node:w(R.from_node_id),edgeType:R.edge_type,rationale:R.rationale})).filter(R=>R.node),outgoing:P.map(R=>({node:w(R.to_node_id),edgeType:R.edge_type,rationale:R.rationale})).filter(R=>R.node)};b.push({node:A,nodeX:_.screenX+_.screenWidth/2,nodeY:_.screenY+_.screenHeight/2,cardX:0,cardY:0,color:me(A.node_type),connections:$})}),zB(b,i,o)},[e,t,n,r,i,o]),C=g!==null?w(g):null;if(E.length===0&&!C)return null;if(p)return c.jsxs(c.Fragment,{children:[c.jsx("svg",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:40},children:E.map(b=>c.jsxs("g",{children:[c.jsxs("circle",{cx:b.nodeX,cy:b.nodeY,r:br+6,fill:b.color,fillOpacity:.3,children:[c.jsx("animate",{attributeName:"r",values:`${br+4};${br+10};${br+4}`,dur:"2s",repeatCount:"indefinite"}),c.jsx("animate",{attributeName:"fill-opacity",values:"0.3;0.1;0.3",dur:"2s",repeatCount:"indefinite"})]}),c.jsx("circle",{cx:b.nodeX,cy:b.nodeY,r:br+4,fill:b.color,stroke:"#fff",strokeWidth:2,style:{pointerEvents:"auto",cursor:"pointer"},onClick:()=>h(b.node)}),c.jsxs("text",{x:b.nodeX,y:b.nodeY+br+16,fill:b.color,fontSize:"11",fontWeight:"600",textAnchor:"middle",style:{pointerEvents:"none"},children:["#",b.node.id]})]},b.node.id))}),c.jsx(MB,{nodes:E,selectedNode:f,onSelectNode:a,onClose:()=>h(null)})]});const j=C?(()=>{const b=NB(g,e,t),A=(P,$)=>{const R=yS[P.node_type]??99,F=yS[$.node_type]??99;return R-F},_=x.toLowerCase().trim(),L=P=>{var $;return _?P.title.toLowerCase().includes(_)||P.node_type.toLowerCase().includes(_)||(($=P.description)==null?void 0:$.toLowerCase().includes(_))||String(P.id).includes(_):!0};return{ancestors:[...b.ancestors].filter(L).sort(A),descendants:[...b.descendants].filter(L).sort(A),totalAncestors:b.ancestors.length,totalDescendants:b.descendants.length}})():null;return c.jsxs(c.Fragment,{children:[c.jsxs("svg",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:40},children:[E.length>0&&c.jsx("rect",{x:i-Eg,y:0,width:Eg,height:o,fill:"#f6f8fa",fillOpacity:.85}),E.map(b=>{const A=u===b.node.id,_=b.cardX,L=b.cardY+ol/2;return c.jsxs("g",{children:[c.jsx("path",{d:`M ${b.nodeX} ${b.nodeY}
                  Q ${b.nodeX+(_-b.nodeX)*.5} ${b.nodeY}
                    ${_} ${L}`,stroke:b.color,strokeWidth:A?3:2,strokeOpacity:A?.9:.5,fill:"none",strokeDasharray:A?"none":"8,4"}),c.jsx("circle",{cx:b.nodeX,cy:b.nodeY,r:A?br+3:br,fill:b.color,stroke:"#fff",strokeWidth:2,style:{pointerEvents:"auto",cursor:"pointer",transition:"r 0.15s"},onMouseEnter:()=>d(b.node.id),onMouseLeave:()=>d(null),onClick:()=>k(b.node)}),c.jsxs("g",{style:{pointerEvents:"auto",cursor:"pointer"},onClick:()=>v(b.node.id),onMouseEnter:()=>d(b.node.id),onMouseLeave:()=>d(null),children:[c.jsx("rect",{x:b.cardX,y:b.cardY,width:vn,height:ol,rx:10,fill:"#ffffff",stroke:A?b.color:"#d0d7de",strokeWidth:A?2:1,filter:A?"drop-shadow(0 6px 16px rgba(0,0,0,0.18))":"drop-shadow(0 2px 6px rgba(0,0,0,0.1))"}),c.jsx("rect",{x:b.cardX,y:b.cardY,width:4,height:ol,rx:2,fill:b.color}),c.jsx("rect",{x:b.cardX+14,y:b.cardY+10,width:72,height:20,rx:4,fill:b.color,fillOpacity:.15}),c.jsx("text",{x:b.cardX+50,y:b.cardY+20,fill:b.color,fontSize:"10",fontWeight:"600",textAnchor:"middle",dominantBaseline:"middle",children:b.node.node_type.toUpperCase()}),(()=>{const P=PB(b.node);return P===null?null:c.jsxs(c.Fragment,{children:[c.jsx("rect",{x:b.cardX+92,y:b.cardY+10,width:42,height:20,rx:4,fill:P>=80?"#22c55e":P>=50?"#f59e0b":"#ef4444",fillOpacity:.15}),c.jsxs("text",{x:b.cardX+113,y:b.cardY+20,fill:P>=80?"#16a34a":P>=50?"#d97706":"#dc2626",fontSize:"10",fontWeight:"600",textAnchor:"middle",dominantBaseline:"middle",children:[P,"%"]})]})})(),c.jsxs("text",{x:b.cardX+145,y:b.cardY+20,fill:"#6e7781",fontSize:"11",fontFamily:"monospace",fontWeight:"500",dominantBaseline:"middle",children:["Node #",b.node.id]}),c.jsx("text",{x:b.cardX+vn-14,y:b.cardY+20,fill:"#8b949e",fontSize:"10",textAnchor:"end",dominantBaseline:"middle",children:new Date(b.node.created_at).toLocaleDateString()}),c.jsx("text",{x:b.cardX+14,y:b.cardY+44,fill:"#24292f",fontSize:"14",fontWeight:"600",dominantBaseline:"middle",children:Ee(b.node.title,48)}),b.node.description&&c.jsx("text",{x:b.cardX+14,y:b.cardY+64,fill:"#57606a",fontSize:"12",dominantBaseline:"middle",children:Ee(b.node.description,55)}),c.jsx("line",{x1:b.cardX+14,y1:b.cardY+82,x2:b.cardX+vn-14,y2:b.cardY+82,stroke:"#e5e7eb",strokeWidth:1}),c.jsxs("text",{x:b.cardX+14,y:b.cardY+98,fill:"#6e7781",fontSize:"9",fontWeight:"600",dominantBaseline:"middle",letterSpacing:"0.5",children:["INCOMING (",b.connections.incoming.length,")"]}),b.connections.incoming.length>0?c.jsxs("g",{children:[b.connections.incoming.slice(0,1).map((P,$)=>c.jsxs("g",{children:[c.jsx("rect",{x:b.cardX+14,y:b.cardY+106,width:vn-28,height:24,rx:4,fill:"#f6f8fa"}),c.jsx("rect",{x:b.cardX+18,y:b.cardY+110,width:50,height:16,rx:3,fill:me(P.node.node_type),fillOpacity:.15}),c.jsx("text",{x:b.cardX+43,y:b.cardY+118,fill:me(P.node.node_type),fontSize:"8",fontWeight:"600",textAnchor:"middle",dominantBaseline:"middle",children:P.node.node_type.toUpperCase()}),c.jsx("text",{x:b.cardX+74,y:b.cardY+118,fill:"#24292f",fontSize:"11",dominantBaseline:"middle",children:Ee(P.node.title,38)})]},`in-${$}`)),b.connections.incoming.length>1&&c.jsxs("text",{x:b.cardX+vn-14,y:b.cardY+118,fill:"#6e7781",fontSize:"9",textAnchor:"end",dominantBaseline:"middle",children:["+",b.connections.incoming.length-1," more"]})]}):c.jsx("text",{x:b.cardX+14,y:b.cardY+118,fill:"#9ca3af",fontSize:"10",fontStyle:"italic",dominantBaseline:"middle",children:"No incoming connections"}),c.jsxs("text",{x:b.cardX+14,y:b.cardY+140,fill:"#6e7781",fontSize:"9",fontWeight:"600",dominantBaseline:"middle",letterSpacing:"0.5",children:["OUTGOING (",b.connections.outgoing.length,")"]}),b.connections.outgoing.length>0?c.jsxs("g",{children:[b.connections.outgoing.slice(0,1).map((P,$)=>c.jsxs("g",{children:[c.jsx("rect",{x:b.cardX+14,y:b.cardY+148,width:vn-28,height:24,rx:4,fill:"#f6f8fa"}),c.jsx("rect",{x:b.cardX+18,y:b.cardY+152,width:50,height:16,rx:3,fill:me(P.node.node_type),fillOpacity:.15}),c.jsx("text",{x:b.cardX+43,y:b.cardY+160,fill:me(P.node.node_type),fontSize:"8",fontWeight:"600",textAnchor:"middle",dominantBaseline:"middle",children:P.node.node_type.toUpperCase()}),c.jsx("text",{x:b.cardX+74,y:b.cardY+160,fill:"#24292f",fontSize:"11",dominantBaseline:"middle",children:Ee(P.node.title,38)})]},`out-${$}`)),b.connections.outgoing.length>1&&c.jsxs("text",{x:b.cardX+vn-14,y:b.cardY+160,fill:"#6e7781",fontSize:"9",textAnchor:"end",dominantBaseline:"middle",children:["+",b.connections.outgoing.length-1," more"]})]}):c.jsx("text",{x:b.cardX+14,y:b.cardY+160,fill:"#9ca3af",fontSize:"10",fontStyle:"italic",dominantBaseline:"middle",children:"No outgoing connections"}),c.jsxs("g",{style:{pointerEvents:"auto",cursor:"pointer"},onClick:P=>{P.stopPropagation(),v(b.node.id),s&&s(b.node)},children:[c.jsx("title",{children:"View node chain (ancestors/descendants)"}),c.jsx("rect",{x:b.cardX+vn-54,y:b.cardY+8,width:40,height:26,rx:6,fill:A?"#0969da":"#f6f8fa",stroke:A?"#0969da":"#d0d7de",strokeWidth:1}),c.jsx("text",{x:b.cardX+vn-34,y:b.cardY+21,fill:A?"#fff":"#57606a",fontSize:"11",fontWeight:"600",textAnchor:"middle",dominantBaseline:"middle",children:"Chain"})]})]})]},b.node.id)}),c.jsxs("text",{x:i-Eg+Wl,y:rx-16,fill:"#57606a",fontSize:"12",fontWeight:"500",children:[E.length," match",E.length!==1?"es":""," found"]})]}),C&&j&&c.jsxs("div",{style:{position:"absolute",bottom:16,left:16,width:400,maxHeight:"calc(100vh - 160px)",backgroundColor:"#fff",borderRadius:10,padding:16,overflow:"auto",boxShadow:"0 4px 20px rgba(0,0,0,0.15)",border:"1px solid #d0d7de",zIndex:50,pointerEvents:"auto"},children:[c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:12},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[c.jsx("span",{style:{backgroundColor:me(C.node_type)+"20",color:me(C.node_type),padding:"3px 8px",borderRadius:4,fontSize:10,fontWeight:600},children:C.node_type.toUpperCase()}),c.jsxs("span",{style:{fontWeight:600,fontSize:14},children:["#",C.id]})]}),c.jsx("button",{onClick:()=>v(null),style:{background:"none",border:"none",fontSize:20,cursor:"pointer",color:"#6e7781",padding:0,lineHeight:1},children:"×"})]}),c.jsx("h3",{style:{margin:"0 0 12px",fontSize:14,fontWeight:600,lineHeight:1.3},children:Ee(C.title,50)}),c.jsx("button",{onClick:()=>{s&&s(C)},style:{width:"100%",padding:"8px 12px",backgroundColor:"#0969da",color:"#fff",border:"none",borderRadius:6,fontSize:13,fontWeight:500,cursor:"pointer",marginBottom:12},children:"Go to Node"}),c.jsx("div",{style:{marginBottom:12},children:c.jsx("input",{type:"text",value:x,onChange:b=>y(b.target.value),placeholder:"Filter chain...",style:{width:"100%",padding:"6px 10px",fontSize:12,border:"1px solid #d0d7de",borderRadius:6,backgroundColor:"#f6f8fa",outline:"none"}})}),c.jsxs("div",{style:{marginBottom:16},children:[c.jsxs("div",{style:{fontSize:11,color:"#6e7781",fontWeight:600,marginBottom:6},children:["UPSTREAM ",x?`(${j.ancestors.length}/${j.totalAncestors})`:`(${j.ancestors.length})`]}),j.ancestors.length===0?c.jsx("div",{style:{color:"#9ca3af",fontSize:12,fontStyle:"italic"},children:x&&j.totalAncestors>0?"No matches":"Root node"}):c.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6,maxHeight:180,overflowY:"auto",paddingRight:4},children:j.ancestors.map(b=>c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px",backgroundColor:"#f6f8fa",borderRadius:4,fontSize:12,flexShrink:0},children:[c.jsx("span",{style:{backgroundColor:me(b.node_type)+"20",color:me(b.node_type),padding:"1px 5px",borderRadius:3,fontSize:9,fontWeight:600},children:b.node_type.slice(0,3).toUpperCase()}),c.jsx("span",{onClick:()=>{s&&s(b),v(b.id)},style:{color:"#24292f",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"pointer"},children:Ee(b.title,22)}),l&&c.jsx("button",{onClick:A=>{A.stopPropagation(),l(b.id,"parent")},style:{padding:"2px 6px",backgroundColor:"#f5f0ff",border:"1px solid #8250df",borderRadius:4,color:"#8250df",fontSize:10,fontWeight:600,cursor:"pointer",whiteSpace:"nowrap"},title:"Add to card stack",children:"+Stack"})]},b.id))})]}),c.jsxs("div",{style:{padding:"8px 10px",backgroundColor:me(C.node_type)+"15",borderLeft:`3px solid ${me(C.node_type)}`,borderRadius:4,marginBottom:16,fontSize:12},children:[c.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:2},children:[c.jsx("span",{style:{fontSize:10,color:"#6e7781"},children:"CURRENT"}),l&&c.jsx("button",{onClick:()=>l(C.id,"root"),style:{padding:"2px 8px",backgroundColor:"#ddf4ff",border:"1px solid #0969da",borderRadius:4,color:"#0969da",fontSize:10,fontWeight:600,cursor:"pointer"},title:"Start card stack with this node",children:"Open Stack"})]}),c.jsx("div",{style:{fontWeight:600},children:Ee(C.title,35)})]}),c.jsxs("div",{children:[c.jsxs("div",{style:{fontSize:11,color:"#6e7781",fontWeight:600,marginBottom:6},children:["DOWNSTREAM ",x?`(${j.descendants.length}/${j.totalDescendants})`:`(${j.descendants.length})`]}),j.descendants.length===0?c.jsx("div",{style:{color:"#9ca3af",fontSize:12,fontStyle:"italic"},children:x&&j.totalDescendants>0?"No matches":"Leaf node"}):c.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6,maxHeight:180,overflowY:"auto",paddingRight:4},children:j.descendants.map(b=>c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"6px 8px",backgroundColor:"#f6f8fa",borderRadius:4,fontSize:12,flexShrink:0},children:[c.jsx("span",{style:{backgroundColor:me(b.node_type)+"20",color:me(b.node_type),padding:"1px 5px",borderRadius:3,fontSize:9,fontWeight:600},children:b.node_type.slice(0,3).toUpperCase()}),c.jsx("span",{onClick:()=>{s&&s(b),v(b.id)},style:{color:"#24292f",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:"pointer"},children:Ee(b.title,22)}),l&&c.jsx("button",{onClick:A=>{A.stopPropagation(),l(b.id,"child")},style:{padding:"2px 6px",backgroundColor:"#dafbe1",border:"1px solid #1a7f37",borderRadius:4,color:"#1a7f37",fontSize:10,fontWeight:600,cursor:"pointer",whiteSpace:"nowrap"},title:"Add to card stack",children:"+Stack"})]},b.id))})]})]})]})},Ps=150,zs=100,Ms=10,OB=({nodes:e,highlightedNodeIds:t,visibilityMap:n,nodePositions:r,graphBounds:i,viewportBounds:o,zoom:a,onNavigateToNode:s})=>{const l=T.useMemo(()=>{const h=i.maxX-i.minX,p=i.maxY-i.minY;if(h===0||p===0)return 1;const m=(Ps-Ms*2)/h,g=(zs-Ms*2)/p;return Math.min(m,g)},[i]),u=T.useMemo(()=>e.filter(h=>{if(!t.has(h.id))return!1;const p=n.get(h.id);return(p==null?void 0:p.visibility)==="off-screen"}),[e,t,n]),d=(h,p)=>({x:Ms+(h-i.minX)*l,y:Ms+(p-i.minY)*l}),f=T.useMemo(()=>{const h=d(-o.x/a,-o.y/a);return{x:h.x,y:h.y,width:o.width/a*l,height:o.height/a*l}},[o,a,l,i]);return u.length===0?null:c.jsxs("div",{style:zn.container,children:[c.jsxs("div",{style:zn.header,children:[c.jsx("span",{style:zn.title,children:"Off-screen matches"}),c.jsx("span",{style:zn.count,children:u.length})]}),c.jsxs("svg",{width:Ps,height:zs,style:zn.svg,children:[c.jsx("rect",{x:0,y:0,width:Ps,height:zs,fill:"#f6f8fa",rx:4}),e.map(h=>{const p=r.get(h.id);if(!p)return null;const{x:m,y:g}=d(p.x,p.y),v=t.has(h.id);return c.jsx("circle",{cx:m,cy:g,r:v?4:1.5,fill:v?me(h.node_type):"#d0d7de",opacity:v?1:.5},h.id)}),c.jsx("rect",{x:Math.max(0,f.x),y:Math.max(0,f.y),width:Math.min(f.width,Ps-f.x),height:Math.min(f.height,zs-f.y),fill:"none",stroke:"#0969da",strokeWidth:1.5,rx:2})]}),c.jsxs("div",{style:zn.list,children:[u.slice(0,5).map(h=>c.jsxs("div",{style:zn.listItem,onClick:()=>s(h),children:[c.jsx("div",{style:{...zn.dot,backgroundColor:me(h.node_type)}}),c.jsxs("span",{style:zn.nodeId,children:["#",h.id]})]},h.id)),u.length>5&&c.jsxs("div",{style:zn.moreText,children:["+",u.length-5," more"]})]})]})},zn={container:{position:"absolute",bottom:"20px",right:"20px",backgroundColor:"#ffffff",border:"1px solid #d0d7de",borderRadius:"8px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",zIndex:50,overflow:"hidden"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",borderBottom:"1px solid #d0d7de",backgroundColor:"#f6f8fa"},title:{fontSize:"11px",fontWeight:600,color:"#57606a",textTransform:"uppercase"},count:{fontSize:"11px",fontWeight:600,color:"#cf222e",backgroundColor:"#ffebe9",padding:"2px 6px",borderRadius:"10px"},svg:{display:"block"},list:{padding:"8px",borderTop:"1px solid #d0d7de",maxHeight:"100px",overflowY:"auto"},listItem:{display:"flex",alignItems:"center",gap:"6px",padding:"4px 6px",borderRadius:"4px",cursor:"pointer",transition:"background-color 0.1s"},dot:{width:"8px",height:"8px",borderRadius:"50%",flexShrink:0},nodeId:{fontSize:"11px",color:"#24292f",fontFamily:"monospace"},moreText:{fontSize:"10px",color:"#57606a",padding:"4px 6px",fontStyle:"italic"}};function BB(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const FB=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qB=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$B={};function vS(e,t){return($B.jsx?qB:FB).test(e)}const HB=/[ \t\n\f\r]/g;function UB(e){return typeof e=="object"?e.type==="text"?wS(e.value):!1:wS(e)}function wS(e){return e.replace(HB,"")===""}class os{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}os.prototype.normal={};os.prototype.property={};os.prototype.space=void 0;function FT(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new os(n,r,t)}function ix(e){return e.toLowerCase()}class qt{constructor(t,n){this.attribute=n,this.property=t}}qt.prototype.attribute="";qt.prototype.booleanish=!1;qt.prototype.boolean=!1;qt.prototype.commaOrSpaceSeparated=!1;qt.prototype.commaSeparated=!1;qt.prototype.defined=!1;qt.prototype.mustUseProperty=!1;qt.prototype.number=!1;qt.prototype.overloadedBoolean=!1;qt.prototype.property="";qt.prototype.spaceSeparated=!1;qt.prototype.space=void 0;let WB=0;const ce=Pi(),Qe=Pi(),ox=Pi(),U=Pi(),ze=Pi(),uo=Pi(),Wt=Pi();function Pi(){return 2**++WB}const ax=Object.freeze(Object.defineProperty({__proto__:null,boolean:ce,booleanish:Qe,commaOrSpaceSeparated:Wt,commaSeparated:uo,number:U,overloadedBoolean:ox,spaceSeparated:ze},Symbol.toStringTag,{value:"Module"})),Tg=Object.keys(ax);class Yy extends qt{constructor(t,n,r,i){let o=-1;if(super(t,n),bS(this,"space",i),typeof r=="number")for(;++o<Tg.length;){const a=Tg[o];bS(this,Tg[o],(r&ax[a])===ax[a])}}}Yy.prototype.defined=!0;function bS(e,t,n){n&&(e[t]=n)}function Ao(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Yy(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[ix(r)]=r,n[ix(o.attribute)]=r}return new os(t,n,e.space)}const qT=Ao({properties:{ariaActiveDescendant:null,ariaAtomic:Qe,ariaAutoComplete:null,ariaBusy:Qe,ariaChecked:Qe,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:ze,ariaCurrent:null,ariaDescribedBy:ze,ariaDetails:null,ariaDisabled:Qe,ariaDropEffect:ze,ariaErrorMessage:null,ariaExpanded:Qe,ariaFlowTo:ze,ariaGrabbed:Qe,ariaHasPopup:null,ariaHidden:Qe,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ze,ariaLevel:U,ariaLive:null,ariaModal:Qe,ariaMultiLine:Qe,ariaMultiSelectable:Qe,ariaOrientation:null,ariaOwns:ze,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:Qe,ariaReadOnly:Qe,ariaRelevant:null,ariaRequired:Qe,ariaRoleDescription:ze,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:Qe,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function $T(e,t){return t in e?e[t]:t}function HT(e,t){return $T(e,t.toLowerCase())}const VB=Ao({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:uo,acceptCharset:ze,accessKey:ze,action:null,allow:null,allowFullScreen:ce,allowPaymentRequest:ce,allowUserMedia:ce,alt:null,as:null,async:ce,autoCapitalize:null,autoComplete:ze,autoFocus:ce,autoPlay:ce,blocking:ze,capture:null,charSet:null,checked:ce,cite:null,className:ze,cols:U,colSpan:null,content:null,contentEditable:Qe,controls:ce,controlsList:ze,coords:U|uo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ce,defer:ce,dir:null,dirName:null,disabled:ce,download:ox,draggable:Qe,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ce,formTarget:null,headers:ze,height:U,hidden:ox,high:U,href:null,hrefLang:null,htmlFor:ze,httpEquiv:ze,id:null,imageSizes:null,imageSrcSet:null,inert:ce,inputMode:null,integrity:null,is:null,isMap:ce,itemId:null,itemProp:ze,itemRef:ze,itemScope:ce,itemType:ze,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ce,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:ce,muted:ce,name:null,nonce:null,noModule:ce,noValidate:ce,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:ce,optimum:U,pattern:null,ping:ze,placeholder:null,playsInline:ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ce,referrerPolicy:null,rel:ze,required:ce,reversed:ce,rows:U,rowSpan:U,sandbox:ze,scope:null,scoped:ce,seamless:ce,selected:ce,shadowRootClonable:ce,shadowRootDelegatesFocus:ce,shadowRootMode:null,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:Qe,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:ce,useMap:null,value:Qe,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ze,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ce,declare:ce,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:ce,noHref:ce,noShade:ce,noWrap:ce,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:Qe,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ce,disableRemotePlayback:ce,prefix:null,property:null,results:U,security:null,unselectable:null},space:"html",transform:HT}),GB=Ao({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:Wt,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:ze,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:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:ce,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,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:uo,g2:uo,glyphName:uo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:Wt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,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:U,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:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ze,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Wt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Wt,rev:Wt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Wt,requiredFeatures:Wt,requiredFonts:Wt,requiredFormats:Wt,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:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:Wt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Wt,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Wt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:$T}),UT=Ao({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),WT=Ao({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:HT}),VT=Ao({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),YB={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"},KB=/[A-Z]/g,kS=/-[a-z]/g,XB=/^data[-\w.:]+$/i;function QB(e,t){const n=ix(t);let r=t,i=qt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&XB.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(kS,ZB);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!kS.test(o)){let a=o.replace(KB,JB);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Yy}return new i(r,t)}function JB(e){return"-"+e.toLowerCase()}function ZB(e){return e.charAt(1).toUpperCase()}const eF=FT([qT,VB,UT,WT,VT],"html"),Ky=FT([qT,GB,UT,WT,VT],"svg");function tF(e){return e.join(" ").trim()}var Xy={},_S=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,nF=/\n/g,rF=/^\s*/,iF=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,oF=/^:\s*/,aF=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,sF=/^[;\s]*/,lF=/^\s+|\s+$/g,uF=`
`,SS="/",CS="*",si="",cF="comment",dF="declaration";function fF(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var g=m.match(nF);g&&(n+=g.length);var v=m.lastIndexOf(uF);r=~v?m.length-v:r+m.length}function o(){var m={line:n,column:r};return function(g){return g.position=new a(m),u(),g}}function a(m){this.start=m,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(m){var g=new Error(t.source+":"+n+":"+r+": "+m);if(g.reason=m,g.filename=t.source,g.line=n,g.column=r,g.source=e,!t.silent)throw g}function l(m){var g=m.exec(e);if(g){var v=g[0];return i(v),e=e.slice(v.length),g}}function u(){l(rF)}function d(m){var g;for(m=m||[];g=f();)g!==!1&&m.push(g);return m}function f(){var m=o();if(!(SS!=e.charAt(0)||CS!=e.charAt(1))){for(var g=2;si!=e.charAt(g)&&(CS!=e.charAt(g)||SS!=e.charAt(g+1));)++g;if(g+=2,si===e.charAt(g-1))return s("End of comment missing");var v=e.slice(2,g-2);return r+=2,i(v),e=e.slice(g),r+=2,m({type:cF,comment:v})}}function h(){var m=o(),g=l(iF);if(g){if(f(),!l(oF))return s("property missing ':'");var v=l(aF),x=m({type:dF,property:jS(g[0].replace(_S,si)),value:v?jS(v[0].replace(_S,si)):si});return l(sF),x}}function p(){var m=[];d(m);for(var g;g=h();)g!==!1&&(m.push(g),d(m));return m}return u(),p()}function jS(e){return e?e.replace(lF,si):si}var hF=fF,pF=Ir&&Ir.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Xy,"__esModule",{value:!0});Xy.default=mF;const gF=pF(hF);function mF(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,gF.default)(e),i=typeof t=="function";return r.forEach(o=>{if(o.type!=="declaration")return;const{property:a,value:s}=o;i?t(a,s,o):s&&(n=n||{},n[a]=s)}),n}var Ou={};Object.defineProperty(Ou,"__esModule",{value:!0});Ou.camelCase=void 0;var xF=/^--[a-zA-Z0-9_-]+$/,yF=/-([a-z])/g,vF=/^[^-]+$/,wF=/^-(webkit|moz|ms|o|khtml)-/,bF=/^-(ms)-/,kF=function(e){return!e||vF.test(e)||xF.test(e)},_F=function(e,t){return t.toUpperCase()},ES=function(e,t){return"".concat(t,"-")},SF=function(e,t){return t===void 0&&(t={}),kF(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(bF,ES):e=e.replace(wF,ES),e.replace(yF,_F))};Ou.camelCase=SF;var CF=Ir&&Ir.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},jF=CF(Xy),EF=Ou;function sx(e,t){var n={};return!e||typeof e!="string"||(0,jF.default)(e,function(r,i){r&&i&&(n[(0,EF.camelCase)(r,t)]=i)}),n}sx.default=sx;var TF=sx;const IF=Xl(TF),GT=YT("end"),Qy=YT("start");function YT(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function RF(e){const t=Qy(e),n=GT(e);if(t&&n)return{start:t,end:n}}function ga(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?TS(e.position):"start"in e||"end"in e?TS(e):"line"in e||"column"in e?lx(e):""}function lx(e){return IS(e&&e.line)+":"+IS(e&&e.column)}function TS(e){return lx(e&&e.start)+"-"+lx(e&&e.end)}function IS(e){return e&&typeof e=="number"?e:1}class wt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=ga(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}wt.prototype.file="";wt.prototype.name="";wt.prototype.reason="";wt.prototype.message="";wt.prototype.stack="";wt.prototype.column=void 0;wt.prototype.line=void 0;wt.prototype.ancestors=void 0;wt.prototype.cause=void 0;wt.prototype.fatal=void 0;wt.prototype.place=void 0;wt.prototype.ruleId=void 0;wt.prototype.source=void 0;const Jy={}.hasOwnProperty,AF=new Map,LF=/[A-Z]/g,PF=new Set(["table","tbody","thead","tfoot","tr"]),zF=new Set(["td","th"]),KT="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function MF(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=HF(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=$F(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ky:eF,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=XT(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function XT(e,t,n){if(t.type==="element")return NF(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return DF(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return BF(e,t,n);if(t.type==="mdxjsEsm")return OF(e,t);if(t.type==="root")return FF(e,t,n);if(t.type==="text")return qF(e,t)}function NF(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Ky,e.schema=i),e.ancestors.push(t);const o=JT(e,t.tagName,!1),a=UF(e,t);let s=e0(e,t);return PF.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!UB(l):!0})),QT(e,a,o,t),Zy(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function DF(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ha(e,t.position)}function OF(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ha(e,t.position)}function BF(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Ky,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:JT(e,t.name,!0),a=WF(e,t),s=e0(e,t);return QT(e,a,o,t),Zy(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function FF(e,t,n){const r={};return Zy(r,e0(e,t)),e.create(t,e.Fragment,r,n)}function qF(e,t){return t.value}function QT(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Zy(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function $F(e,t,n){return r;function r(i,o,a,s){const u=Array.isArray(a.children)?n:t;return s?u(o,a,s):u(o,a)}}function HF(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=Qy(r);return t(i,o,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function UF(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Jy.call(t.properties,i)){const o=VF(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&zF.has(t.tagName)?r=s:n[a]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function WF(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Ha(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else Ha(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function e0(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:AF;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const u=i.get(l)||0;a=l+"-"+u,i.set(l,u+1)}}const s=XT(e,o,a);s!==void 0&&n.push(s)}return n}function VF(e,t,n){const r=QB(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?BB(n):tF(n)),r.property==="style"){let i=typeof n=="object"?n:GF(e,String(n));return e.stylePropertyNameCase==="css"&&(i=YF(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?YB[r.property]||r.property:r.attribute,n]}}function GF(e,t){try{return IF(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new wt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=KT+"#cannot-parse-style-attribute",i}}function JT(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const s=vS(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=vS(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Jy.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ha(e)}function Ha(e,t){const n=new wt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=KT+"#cannot-handle-mdx-estrees-without-createevaluater",n}function YF(e){const t={};let n;for(n in e)Jy.call(e,n)&&(t[KF(n)]=e[n]);return t}function KF(e){let t=e.replace(LF,XF);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function XF(e){return"-"+e.toLowerCase()}const Ig={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"]},QF={};function t0(e,t){const n=QF,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ZT(e,r,i)}function ZT(e,t,n){if(JF(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return RS(e.children,t,n)}return Array.isArray(e)?RS(e,t,n):""}function RS(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=ZT(e[i],t,n);return r.join("")}function JF(e){return!!(e&&typeof e=="object")}const AS=document.createElement("i");function n0(e){const t="&"+e+";";AS.innerHTML=t;const n=AS.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Xt(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function sn(e,t){return e.length>0?(Xt(e,e.length,0,t),e):t}const LS={}.hasOwnProperty;function eI(e){const t={};let n=-1;for(;++n<e.length;)ZF(t,e[n]);return t}function ZF(e,t){let n;for(n in t){const i=(LS.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){LS.call(i,a)||(i[a]=[]);const s=o[a];e9(i[a],Array.isArray(s)?s:s?[s]:[])}}}function e9(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Xt(e,0,0,r)}function tI(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function jn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const jt=ti(/[A-Za-z]/),yt=ti(/[\dA-Za-z]/),t9=ti(/[#-'*+\--9=?A-Z^-~]/);function Vl(e){return e!==null&&(e<32||e===127)}const ux=ti(/\d/),n9=ti(/[\dA-Fa-f]/),r9=ti(/[!-/:-@[-`{-~]/);function te(e){return e!==null&&e<-2}function Pe(e){return e!==null&&(e<0||e===32)}function he(e){return e===-2||e===-1||e===32}const Bu=ti(new RegExp("\\p{P}|\\p{S}","u")),Si=ti(/\s/);function ti(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Lo(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&yt(e.charCodeAt(n+1))&&yt(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function we(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return he(l)?(e.enter(n),s(l)):t(l)}function s(l){return he(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const i9={tokenize:o9};function o9(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),we(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return te(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const a9={tokenize:s9},PS={tokenize:l9};function s9(e){const t=this,n=[];let r=0,i,o,a;return s;function s(w){if(r<n.length){const k=n[r];return t.containerState=k[1],e.attempt(k[0].continuation,l,u)(w)}return u(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const k=t.events.length;let E=k,C;for(;E--;)if(t.events[E][0]==="exit"&&t.events[E][1].type==="chunkFlow"){C=t.events[E][1].end;break}x(r);let j=k;for(;j<t.events.length;)t.events[j][1].end={...C},j++;return Xt(t.events,E+1,0,t.events.slice(k)),t.events.length=j,u(w)}return s(w)}function u(w){if(r===n.length){if(!i)return h(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(PS,d,f)(w)}function d(w){return i&&y(),x(r),h(w)}function f(w){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(w)}function h(w){return t.containerState={},e.attempt(PS,p,m)(w)}function p(w){return r++,n.push([t.currentConstruct,t.containerState]),h(w)}function m(w){if(w===null){i&&y(),x(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),g(w)}function g(w){if(w===null){v(e.exit("chunkFlow"),!0),x(0),e.consume(w);return}return te(w)?(e.consume(w),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),g)}function v(w,k){const E=t.sliceStream(w);if(k&&E.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(E),t.parser.lazy[w.start.line]){let C=i.events.length;for(;C--;)if(i.events[C][1].start.offset<a&&(!i.events[C][1].end||i.events[C][1].end.offset>a))return;const j=t.events.length;let b=j,A,_;for(;b--;)if(t.events[b][0]==="exit"&&t.events[b][1].type==="chunkFlow"){if(A){_=t.events[b][1].end;break}A=!0}for(x(r),C=j;C<t.events.length;)t.events[C][1].end={..._},C++;Xt(t.events,b+1,0,t.events.slice(j)),t.events.length=C}}function x(w){let k=n.length;for(;k-- >w;){const E=n[k];t.containerState=E[1],E[0].exit.call(t,e)}n.length=w}function y(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function l9(e,t,n){return we(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function wo(e){if(e===null||Pe(e)||Si(e))return 1;if(Bu(e))return 2}function Fu(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const cx={name:"attention",resolveAll:u9,tokenize:c9};function u9(e,t){let n=-1,r,i,o,a,s,l,u,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},h={...e[n][1].start};zS(f,-l),zS(h,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},s={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},o={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...s.end}},e[r][1].end={...a.start},e[n][1].start={...s.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=sn(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=sn(u,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),u=sn(u,Fu(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=sn(u,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,u=sn(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Xt(e,r-1,n-r+3,u),n=r+u.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function c9(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=wo(r);let o;return a;function a(l){return o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const u=e.exit("attentionSequence"),d=wo(l),f=!d||d===2&&i||n.includes(l),h=!i||i===2&&d||n.includes(r);return u._open=!!(o===42?f:f&&(i||!h)),u._close=!!(o===42?h:h&&(d||!f)),t(l)}}function zS(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const d9={name:"autolink",tokenize:f9};function f9(e,t,n){let r=0;return i;function i(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(p){return jt(p)?(e.consume(p),a):p===64?n(p):u(p)}function a(p){return p===43||p===45||p===46||yt(p)?(r=1,s(p)):u(p)}function s(p){return p===58?(e.consume(p),r=0,l):(p===43||p===45||p===46||yt(p))&&r++<32?(e.consume(p),s):(r=0,u(p))}function l(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Vl(p)?n(p):(e.consume(p),l)}function u(p){return p===64?(e.consume(p),d):t9(p)?(e.consume(p),u):n(p)}function d(p){return yt(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),r=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||yt(p))&&r++<63){const m=p===45?h:f;return e.consume(p),m}return n(p)}}const as={partial:!0,tokenize:h9};function h9(e,t,n){return r;function r(o){return he(o)?we(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||te(o)?t(o):n(o)}}const nI={continuation:{tokenize:g9},exit:m9,name:"blockQuote",tokenize:p9};function p9(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return he(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function g9(e,t,n){const r=this;return i;function i(a){return he(a)?we(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(nI,t,n)(a)}}function m9(e){e.exit("blockQuote")}const rI={name:"characterEscape",tokenize:x9};function x9(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return r9(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const iI={name:"characterReference",tokenize:y9};function y9(e,t,n){const r=this;let i=0,o,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),o=31,a=yt,d(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=n9,d):(e.enter("characterReferenceValue"),o=7,a=ux,d(f))}function d(f){if(f===59&&i){const h=e.exit("characterReferenceValue");return a===yt&&!n0(r.sliceSerialize(h))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&i++<o?(e.consume(f),d):n(f)}}const MS={partial:!0,tokenize:w9},NS={concrete:!0,name:"codeFenced",tokenize:v9};function v9(e,t,n){const r=this,i={partial:!0,tokenize:E};let o=0,a=0,s;return l;function l(C){return u(C)}function u(C){const j=r.events[r.events.length-1];return o=j&&j[1].type==="linePrefix"?j[2].sliceSerialize(j[1],!0).length:0,s=C,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(C)}function d(C){return C===s?(a++,e.consume(C),d):a<3?n(C):(e.exit("codeFencedFenceSequence"),he(C)?we(e,f,"whitespace")(C):f(C))}function f(C){return C===null||te(C)?(e.exit("codeFencedFence"),r.interrupt?t(C):e.check(MS,g,k)(C)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(C))}function h(C){return C===null||te(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(C)):he(C)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),we(e,p,"whitespace")(C)):C===96&&C===s?n(C):(e.consume(C),h)}function p(C){return C===null||te(C)?f(C):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(C))}function m(C){return C===null||te(C)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(C)):C===96&&C===s?n(C):(e.consume(C),m)}function g(C){return e.attempt(i,k,v)(C)}function v(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),x}function x(C){return o>0&&he(C)?we(e,y,"linePrefix",o+1)(C):y(C)}function y(C){return C===null||te(C)?e.check(MS,g,k)(C):(e.enter("codeFlowValue"),w(C))}function w(C){return C===null||te(C)?(e.exit("codeFlowValue"),y(C)):(e.consume(C),w)}function k(C){return e.exit("codeFenced"),t(C)}function E(C,j,b){let A=0;return _;function _(F){return C.enter("lineEnding"),C.consume(F),C.exit("lineEnding"),L}function L(F){return C.enter("codeFencedFence"),he(F)?we(C,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):P(F)}function P(F){return F===s?(C.enter("codeFencedFenceSequence"),$(F)):b(F)}function $(F){return F===s?(A++,C.consume(F),$):A>=a?(C.exit("codeFencedFenceSequence"),he(F)?we(C,R,"whitespace")(F):R(F)):b(F)}function R(F){return F===null||te(F)?(C.exit("codeFencedFence"),j(F)):b(F)}}}function w9(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Rg={name:"codeIndented",tokenize:k9},b9={partial:!0,tokenize:_9};function k9(e,t,n){const r=this;return i;function i(u){return e.enter("codeIndented"),we(e,o,"linePrefix",5)(u)}function o(u){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?l(u):te(u)?e.attempt(b9,a,l)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||te(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),s)}function l(u){return e.exit("codeIndented"),t(u)}}function _9(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):te(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):we(e,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):te(a)?i(a):n(a)}}const S9={name:"codeText",previous:j9,resolve:C9,tokenize:E9};function C9(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function j9(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function E9(e,t,n){let r=0,i,o;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(o=e.enter("codeTextSequence"),i=0,d(f)):te(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||te(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),u)}function d(f){return f===96?(e.consume(f),i++,d):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(o.type="codeTextData",u(f))}}class T9{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Uo(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Uo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Uo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Uo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Uo(this.left,n.reverse())}}}function Uo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function oI(e){const t={};let n=-1,r,i,o,a,s,l,u;const d=new T9(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(r=d.get(n),n&&r[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,I9(d,n)),n=t[n],u=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(a=d.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(d.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...d.get(i)[1].start},s=d.slice(i,n),s.unshift(r),d.splice(i,n-i+1,s))}}return Xt(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!u}function I9(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],u={};let d,f,h=-1,p=n,m=0,g=0;const v=[g];for(;p;){for(;e.get(++i)[1]!==p;);o.push(i),p._tokenizer||(d=r.sliceStream(p),p.next||d.push(null),f&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(d),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(g=h+1,v.push(g),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):v.pop(),h=v.length;h--;){const x=s.slice(v[h],v[h+1]),y=o.pop();l.push([y,y+x.length-1]),e.splice(y,2,x)}for(l.reverse(),h=-1;++h<l.length;)u[m+l[h][0]]=m+l[h][1],m+=l[h][1]-l[h][0]-1;return u}const R9={resolve:L9,tokenize:P9},A9={partial:!0,tokenize:z9};function L9(e){return oI(e),e}function P9(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):te(s)?e.check(A9,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function z9(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),we(e,o,"linePrefix")}function o(a){if(a===null||te(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function aI(e,t,n,r,i,o,a,s,l){const u=l||Number.POSITIVE_INFINITY;let d=0;return f;function f(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),h):x===null||x===32||x===41||Vl(x)?n(x):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),g(x))}function h(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(x))}function p(x){return x===62?(e.exit("chunkString"),e.exit(s),h(x)):x===null||x===60||te(x)?n(x):(e.consume(x),x===92?m:p)}function m(x){return x===60||x===62||x===92?(e.consume(x),p):p(x)}function g(x){return!d&&(x===null||x===41||Pe(x))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(x)):d<u&&x===40?(e.consume(x),d++,g):x===41?(e.consume(x),d--,g):x===null||x===32||x===40||Vl(x)?n(x):(e.consume(x),x===92?v:g)}function v(x){return x===40||x===41||x===92?(e.consume(x),g):g(x)}}function sI(e,t,n,r,i,o){const a=this;let s=0,l;return u;function u(p){return e.enter(r),e.enter(i),e.consume(p),e.exit(i),e.enter(o),d}function d(p){return s>999||p===null||p===91||p===93&&!l||p===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(p):p===93?(e.exit(o),e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):te(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||te(p)||s++>999?(e.exit("chunkString"),d(p)):(e.consume(p),l||(l=!he(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function lI(e,t,n,r,i,o){let a;return s;function s(h){return h===34||h===39||h===40?(e.enter(r),e.enter(i),e.consume(h),e.exit(i),a=h===40?41:h,l):n(h)}function l(h){return h===a?(e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):(e.enter(o),u(h))}function u(h){return h===a?(e.exit(o),l(a)):h===null?n(h):te(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),we(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===a||h===null||te(h)?(e.exit("chunkString"),u(h)):(e.consume(h),h===92?f:d)}function f(h){return h===a||h===92?(e.consume(h),d):d(h)}}function ma(e,t){let n;return r;function r(i){return te(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):he(i)?we(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const M9={name:"definition",tokenize:D9},N9={partial:!0,tokenize:O9};function D9(e,t,n){const r=this;let i;return o;function o(p){return e.enter("definition"),a(p)}function a(p){return sI.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return i=jn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),l):n(p)}function l(p){return Pe(p)?ma(e,u)(p):u(p)}function u(p){return aI(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(N9,f,f)(p)}function f(p){return he(p)?we(e,h,"whitespace")(p):h(p)}function h(p){return p===null||te(p)?(e.exit("definition"),r.parser.defined.push(i),t(p)):n(p)}}function O9(e,t,n){return r;function r(s){return Pe(s)?ma(e,i)(s):n(s)}function i(s){return lI(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return he(s)?we(e,a,"whitespace")(s):a(s)}function a(s){return s===null||te(s)?t(s):n(s)}}const B9={name:"hardBreakEscape",tokenize:F9};function F9(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return te(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const q9={name:"headingAtx",resolve:$9,tokenize:H9};function $9(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Xt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function H9(e,t,n){let r=0;return i;function i(d){return e.enter("atxHeading"),o(d)}function o(d){return e.enter("atxHeadingSequence"),a(d)}function a(d){return d===35&&r++<6?(e.consume(d),a):d===null||Pe(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),l(d)):d===null||te(d)?(e.exit("atxHeading"),t(d)):he(d)?we(e,s,"whitespace")(d):(e.enter("atxHeadingText"),u(d))}function l(d){return d===35?(e.consume(d),l):(e.exit("atxHeadingSequence"),s(d))}function u(d){return d===null||d===35||Pe(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),u)}}const U9=["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"],DS=["pre","script","style","textarea"],W9={concrete:!0,name:"htmlFlow",resolveTo:Y9,tokenize:K9},V9={partial:!0,tokenize:Q9},G9={partial:!0,tokenize:X9};function Y9(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function K9(e,t,n){const r=this;let i,o,a,s,l;return u;function u(I){return d(I)}function d(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),f}function f(I){return I===33?(e.consume(I),h):I===47?(e.consume(I),o=!0,g):I===63?(e.consume(I),i=3,r.interrupt?t:S):jt(I)?(e.consume(I),a=String.fromCharCode(I),v):n(I)}function h(I){return I===45?(e.consume(I),i=2,p):I===91?(e.consume(I),i=5,s=0,m):jt(I)?(e.consume(I),i=4,r.interrupt?t:S):n(I)}function p(I){return I===45?(e.consume(I),r.interrupt?t:S):n(I)}function m(I){const re="CDATA[";return I===re.charCodeAt(s++)?(e.consume(I),s===re.length?r.interrupt?t:P:m):n(I)}function g(I){return jt(I)?(e.consume(I),a=String.fromCharCode(I),v):n(I)}function v(I){if(I===null||I===47||I===62||Pe(I)){const re=I===47,ye=a.toLowerCase();return!re&&!o&&DS.includes(ye)?(i=1,r.interrupt?t(I):P(I)):U9.includes(a.toLowerCase())?(i=6,re?(e.consume(I),x):r.interrupt?t(I):P(I)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):o?y(I):w(I))}return I===45||yt(I)?(e.consume(I),a+=String.fromCharCode(I),v):n(I)}function x(I){return I===62?(e.consume(I),r.interrupt?t:P):n(I)}function y(I){return he(I)?(e.consume(I),y):_(I)}function w(I){return I===47?(e.consume(I),_):I===58||I===95||jt(I)?(e.consume(I),k):he(I)?(e.consume(I),w):_(I)}function k(I){return I===45||I===46||I===58||I===95||yt(I)?(e.consume(I),k):E(I)}function E(I){return I===61?(e.consume(I),C):he(I)?(e.consume(I),E):w(I)}function C(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),l=I,j):he(I)?(e.consume(I),C):b(I)}function j(I){return I===l?(e.consume(I),l=null,A):I===null||te(I)?n(I):(e.consume(I),j)}function b(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||Pe(I)?E(I):(e.consume(I),b)}function A(I){return I===47||I===62||he(I)?w(I):n(I)}function _(I){return I===62?(e.consume(I),L):n(I)}function L(I){return I===null||te(I)?P(I):he(I)?(e.consume(I),L):n(I)}function P(I){return I===45&&i===2?(e.consume(I),D):I===60&&i===1?(e.consume(I),V):I===62&&i===4?(e.consume(I),W):I===63&&i===3?(e.consume(I),S):I===93&&i===5?(e.consume(I),q):te(I)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(V9,K,$)(I)):I===null||te(I)?(e.exit("htmlFlowData"),$(I)):(e.consume(I),P)}function $(I){return e.check(G9,R,K)(I)}function R(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),F}function F(I){return I===null||te(I)?$(I):(e.enter("htmlFlowData"),P(I))}function D(I){return I===45?(e.consume(I),S):P(I)}function V(I){return I===47?(e.consume(I),a="",N):P(I)}function N(I){if(I===62){const re=a.toLowerCase();return DS.includes(re)?(e.consume(I),W):P(I)}return jt(I)&&a.length<8?(e.consume(I),a+=String.fromCharCode(I),N):P(I)}function q(I){return I===93?(e.consume(I),S):P(I)}function S(I){return I===62?(e.consume(I),W):I===45&&i===2?(e.consume(I),S):P(I)}function W(I){return I===null||te(I)?(e.exit("htmlFlowData"),K(I)):(e.consume(I),W)}function K(I){return e.exit("htmlFlow"),t(I)}}function X9(e,t,n){const r=this;return i;function i(a){return te(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Q9(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(as,t,n)}}const J9={name:"htmlText",tokenize:Z9};function Z9(e,t,n){const r=this;let i,o,a;return s;function s(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),l}function l(S){return S===33?(e.consume(S),u):S===47?(e.consume(S),E):S===63?(e.consume(S),w):jt(S)?(e.consume(S),b):n(S)}function u(S){return S===45?(e.consume(S),d):S===91?(e.consume(S),o=0,m):jt(S)?(e.consume(S),y):n(S)}function d(S){return S===45?(e.consume(S),p):n(S)}function f(S){return S===null?n(S):S===45?(e.consume(S),h):te(S)?(a=f,V(S)):(e.consume(S),f)}function h(S){return S===45?(e.consume(S),p):f(S)}function p(S){return S===62?D(S):S===45?h(S):f(S)}function m(S){const W="CDATA[";return S===W.charCodeAt(o++)?(e.consume(S),o===W.length?g:m):n(S)}function g(S){return S===null?n(S):S===93?(e.consume(S),v):te(S)?(a=g,V(S)):(e.consume(S),g)}function v(S){return S===93?(e.consume(S),x):g(S)}function x(S){return S===62?D(S):S===93?(e.consume(S),x):g(S)}function y(S){return S===null||S===62?D(S):te(S)?(a=y,V(S)):(e.consume(S),y)}function w(S){return S===null?n(S):S===63?(e.consume(S),k):te(S)?(a=w,V(S)):(e.consume(S),w)}function k(S){return S===62?D(S):w(S)}function E(S){return jt(S)?(e.consume(S),C):n(S)}function C(S){return S===45||yt(S)?(e.consume(S),C):j(S)}function j(S){return te(S)?(a=j,V(S)):he(S)?(e.consume(S),j):D(S)}function b(S){return S===45||yt(S)?(e.consume(S),b):S===47||S===62||Pe(S)?A(S):n(S)}function A(S){return S===47?(e.consume(S),D):S===58||S===95||jt(S)?(e.consume(S),_):te(S)?(a=A,V(S)):he(S)?(e.consume(S),A):D(S)}function _(S){return S===45||S===46||S===58||S===95||yt(S)?(e.consume(S),_):L(S)}function L(S){return S===61?(e.consume(S),P):te(S)?(a=L,V(S)):he(S)?(e.consume(S),L):A(S)}function P(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),i=S,$):te(S)?(a=P,V(S)):he(S)?(e.consume(S),P):(e.consume(S),R)}function $(S){return S===i?(e.consume(S),i=void 0,F):S===null?n(S):te(S)?(a=$,V(S)):(e.consume(S),$)}function R(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||Pe(S)?A(S):(e.consume(S),R)}function F(S){return S===47||S===62||Pe(S)?A(S):n(S)}function D(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function V(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),N}function N(S){return he(S)?we(e,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):q(S)}function q(S){return e.enter("htmlTextData"),a(S)}}const r0={name:"labelEnd",resolveAll:r7,resolveTo:i7,tokenize:o7},e7={tokenize:a7},t7={tokenize:s7},n7={tokenize:l7};function r7(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Xt(e,0,e.length,n),e}function i7(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},d={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[a-2][1].start}};return s=[["enter",l,t],["enter",u,t]],s=sn(s,e.slice(o+1,o+r+3)),s=sn(s,[["enter",d,t]]),s=sn(s,Fu(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=sn(s,[["exit",d,t],e[a-2],e[a-1],["exit",u,t]]),s=sn(s,e.slice(a+1)),s=sn(s,[["exit",l,t]]),Xt(e,o,e.length,s),e}function o7(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(h){return o?o._inactive?f(h):(a=r.parser.defined.includes(jn(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),l):n(h)}function l(h){return h===40?e.attempt(e7,d,a?d:f)(h):h===91?e.attempt(t7,d,a?u:f)(h):a?d(h):f(h)}function u(h){return e.attempt(n7,d,f)(h)}function d(h){return t(h)}function f(h){return o._balanced=!0,n(h)}}function a7(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Pe(f)?ma(e,o)(f):o(f)}function o(f){return f===41?d(f):aI(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return Pe(f)?ma(e,l)(f):d(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?lI(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function u(f){return Pe(f)?ma(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function s7(e,t,n){const r=this;return i;function i(s){return sI.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(jn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function l7(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const u7={name:"labelStartImage",resolveAll:r0.resolveAll,tokenize:c7};function c7(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const d7={name:"labelStartLink",resolveAll:r0.resolveAll,tokenize:f7};function f7(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Ag={name:"lineEnding",tokenize:h7};function h7(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),we(e,t,"linePrefix")}}const al={name:"thematicBreak",tokenize:p7};function p7(e,t,n){let r=0,i;return o;function o(u){return e.enter("thematicBreak"),a(u)}function a(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),l(u)):r>=3&&(u===null||te(u))?(e.exit("thematicBreak"),t(u)):n(u)}function l(u){return u===i?(e.consume(u),r++,l):(e.exit("thematicBreakSequence"),he(u)?we(e,s,"whitespace")(u):s(u))}}const Pt={continuation:{tokenize:y7},exit:w7,name:"list",tokenize:x7},g7={partial:!0,tokenize:b7},m7={partial:!0,tokenize:v7};function x7(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(p){const m=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:ux(p)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(al,n,u)(p):u(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(p)}return n(p)}function l(p){return ux(p)&&++a<10?(e.consume(p),l):(!r.interrupt||a<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),u(p)):n(p)}function u(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(as,r.interrupt?n:d,e.attempt(g7,h,f))}function d(p){return r.containerState.initialBlankLine=!0,o++,h(p)}function f(p){return he(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function y7(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(as,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,we(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!he(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(m7,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,we(e,e.attempt(Pt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function v7(e,t,n){const r=this;return we(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function w7(e){e.exit(this.containerState.type)}function b7(e,t,n){const r=this;return we(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!he(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const OS={name:"setextUnderline",resolveTo:k7,tokenize:_7};function k7(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function _7(e,t,n){const r=this;let i;return o;function o(u){let d=r.events.length,f;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){f=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),he(u)?we(e,l,"lineSuffix")(u):l(u))}function l(u){return u===null||te(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const S7={tokenize:C7};function C7(e){const t=this,n=e.attempt(as,r,e.attempt(this.parser.constructs.flowInitial,i,we(e,e.attempt(this.parser.constructs.flow,i,e.attempt(R9,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const j7={resolveAll:cI()},E7=uI("string"),T7=uI("text");function uI(e){return{resolveAll:cI(e==="text"?I7:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(d){return u(d)?o(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),l}function l(d){return u(d)?(n.exit("data"),o(d)):(n.consume(d),l)}function u(d){if(d===null)return!0;const f=i[d];let h=-1;if(f)for(;++h<f.length;){const p=f[h];if(!p.previous||p.previous.call(r,r.previous))return!0}return!1}}}function cI(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function I7(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const u=i[o];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(u===-2)l=!0,s++;else if(u!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const u={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:r.start._bufferIndex+a,_index:r.start._index+o,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const R7={42:Pt,43:Pt,45:Pt,48:Pt,49:Pt,50:Pt,51:Pt,52:Pt,53:Pt,54:Pt,55:Pt,56:Pt,57:Pt,62:nI},A7={91:M9},L7={[-2]:Rg,[-1]:Rg,32:Rg},P7={35:q9,42:al,45:[OS,al],60:W9,61:OS,95:al,96:NS,126:NS},z7={38:iI,92:rI},M7={[-5]:Ag,[-4]:Ag,[-3]:Ag,33:u7,38:iI,42:cx,60:[d9,J9],91:d7,92:[B9,rI],93:r0,95:cx,96:S9},N7={null:[cx,j7]},D7={null:[42,95]},O7={null:[]},B7=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:D7,contentInitial:A7,disable:O7,document:R7,flow:P7,flowInitial:L7,insideSpan:N7,string:z7,text:M7},Symbol.toStringTag,{value:"Module"}));function F7(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let a=[],s=[];const l={attempt:j(E),check:j(C),consume:y,enter:w,exit:k,interrupt:j(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:g,events:[],now:m,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:f};let d=t.tokenize.call(u,l);return t.resolveAll&&o.push(t),u;function f(L){return a=sn(a,L),v(),a[a.length-1]!==null?[]:(b(t,0),u.events=Fu(o,u.events,u),u.events)}function h(L,P){return $7(p(L),P)}function p(L){return q7(a,L)}function m(){const{_bufferIndex:L,_index:P,line:$,column:R,offset:F}=r;return{_bufferIndex:L,_index:P,line:$,column:R,offset:F}}function g(L){i[L.line]=L.column,_()}function v(){let L;for(;r._index<a.length;){const P=a[r._index];if(typeof P=="string")for(L=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===L&&r._bufferIndex<P.length;)x(P.charCodeAt(r._bufferIndex));else x(P)}}function x(L){d=d(L)}function y(L){te(L)?(r.line++,r.column=1,r.offset+=L===-3?2:1,_()):L!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=L}function w(L,P){const $=P||{};return $.type=L,$.start=m(),u.events.push(["enter",$,u]),s.push($),$}function k(L){const P=s.pop();return P.end=m(),u.events.push(["exit",P,u]),P}function E(L,P){b(L,P.from)}function C(L,P){P.restore()}function j(L,P){return $;function $(R,F,D){let V,N,q,S;return Array.isArray(R)?K(R):"tokenize"in R?K([R]):W(R);function W(le){return Ie;function Ie(Ue){const At=Ue!==null&&le[Ue],pn=Ue!==null&&le.null,$t=[...Array.isArray(At)?At:At?[At]:[],...Array.isArray(pn)?pn:pn?[pn]:[]];return K($t)(Ue)}}function K(le){return V=le,N=0,le.length===0?D:I(le[N])}function I(le){return Ie;function Ie(Ue){return S=A(),q=le,le.partial||(u.currentConstruct=le),le.name&&u.parser.constructs.disable.null.includes(le.name)?ye():le.tokenize.call(P?Object.assign(Object.create(u),P):u,l,re,ye)(Ue)}}function re(le){return L(q,S),F}function ye(le){return S.restore(),++N<V.length?I(V[N]):D}}}function b(L,P){L.resolveAll&&!o.includes(L)&&o.push(L),L.resolve&&Xt(u.events,P,u.events.length-P,L.resolve(u.events.slice(P),u)),L.resolveTo&&(u.events=L.resolveTo(u.events,u))}function A(){const L=m(),P=u.previous,$=u.currentConstruct,R=u.events.length,F=Array.from(s);return{from:R,restore:D};function D(){r=L,u.previous=P,u.currentConstruct=$,u.events.length=R,s=F,_()}}function _(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function q7(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function $7(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
`;break}case-3:{a=`\r
`;break}case-2:{a=t?" ":"	";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}function H7(e){const r={constructs:eI([B7,...(e||{}).extensions||[]]),content:i(i9),defined:[],document:i(a9),flow:i(S7),lazy:{},string:i(E7),text:i(T7)};return r;function i(o){return a;function a(s){return F7(r,o,s)}}}function U7(e){for(;!oI(e););return e}const BS=/[\0\t\n\r]/g;function W7(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const l=[];let u,d,f,h,p;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),f=0,t="",n&&(o.charCodeAt(0)===65279&&f++,n=void 0);f<o.length;){if(BS.lastIndex=f,u=BS.exec(o),h=u&&u.index!==void 0?u.index:o.length,p=o.charCodeAt(h),!u){t=o.slice(f);break}if(p===10&&f===h&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<h&&(l.push(o.slice(f,h)),e+=h-f),p){case 0:{l.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,l.push(-2);e++<d;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=h+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const V7=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function G7(e){return e.replace(V7,Y7)}function Y7(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return tI(n.slice(o?2:1),o?16:10)}return n0(n)||e}const dI={}.hasOwnProperty;function K7(e,t,n){return typeof t!="string"&&(n=t,t=void 0),X7(n)(U7(H7(n).document().write(W7()(e,t,!0))))}function X7(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Lt),autolinkProtocol:A,autolinkEmail:A,atxHeading:o(ge),blockQuote:o(pn),characterEscape:A,characterReference:A,codeFenced:o($t),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o($t,a),codeText:o(gr,a),codeTextData:A,data:A,codeFlowValue:A,definition:o(Po),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(mr),hardBreakEscape:o(An),hardBreakTrailing:o(An),htmlFlow:o(ve,a),htmlFlowData:A,htmlText:o(ve,a),htmlTextData:A,image:o(Ht),label:a,link:o(Lt),listItem:o(Ln),listItemValue:h,listOrdered:o(zi,f),listUnordered:o(zi),paragraph:o(tn),reference:I,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(ge),strong:o(Ge),thematicBreak:o(yr)},exit:{atxHeading:l(),atxHeadingSequence:E,autolink:l(),autolinkEmail:At,autolinkProtocol:Ue,blockQuote:l(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:le,characterReference:Ie,codeFenced:l(v),codeFencedFence:g,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:_,codeIndented:l(x),codeText:l(F),codeTextData:_,data:_,definition:l(),definitionDestinationString:k,definitionLabelString:y,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(P),hardBreakTrailing:l(P),htmlFlow:l($),htmlFlowData:_,htmlText:l(R),htmlTextData:_,image:l(V),label:q,labelText:N,lineEnding:L,link:l(D),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:re,resourceDestinationString:S,resourceTitleString:W,resource:K,setextHeading:l(b),setextHeadingLineSequence:j,setextHeadingText:C,strong:l(),thematicBreak:l()}};fI(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(O){let G={type:"root",children:[]};const Z={stack:[G],tokenStack:[],config:t,enter:s,exit:u,buffer:a,resume:d,data:n},se=[];let fe=-1;for(;++fe<O.length;)if(O[fe][1].type==="listOrdered"||O[fe][1].type==="listUnordered")if(O[fe][0]==="enter")se.push(fe);else{const at=se.pop();fe=i(O,at,fe)}for(fe=-1;++fe<O.length;){const at=t[O[fe][0]];dI.call(at,O[fe][1].type)&&at[O[fe][1].type].call(Object.assign({sliceSerialize:O[fe][2].sliceSerialize},Z),O[fe][1])}if(Z.tokenStack.length>0){const at=Z.tokenStack[Z.tokenStack.length-1];(at[1]||FS).call(Z,void 0,at[0])}for(G.position={start:kr(O.length>0?O[0][1].start:{line:1,column:1,offset:0}),end:kr(O.length>0?O[O.length-2][1].end:{line:1,column:1,offset:0})},fe=-1;++fe<t.transforms.length;)G=t.transforms[fe](G)||G;return G}function i(O,G,Z){let se=G-1,fe=-1,at=!1,rt,be,ht,Vn;for(;++se<=Z;){const st=O[se];switch(st[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{st[0]==="enter"?fe++:fe--,Vn=void 0;break}case"lineEndingBlank":{st[0]==="enter"&&(rt&&!Vn&&!fe&&!ht&&(ht=se),Vn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vn=void 0}if(!fe&&st[0]==="enter"&&st[1].type==="listItemPrefix"||fe===-1&&st[0]==="exit"&&(st[1].type==="listUnordered"||st[1].type==="listOrdered")){if(rt){let gn=se;for(be=void 0;gn--;){const mn=O[gn];if(mn[1].type==="lineEnding"||mn[1].type==="lineEndingBlank"){if(mn[0]==="exit")continue;be&&(O[be][1].type="lineEndingBlank",at=!0),mn[1].type="lineEnding",be=gn}else if(!(mn[1].type==="linePrefix"||mn[1].type==="blockQuotePrefix"||mn[1].type==="blockQuotePrefixWhitespace"||mn[1].type==="blockQuoteMarker"||mn[1].type==="listItemIndent"))break}ht&&(!be||ht<be)&&(rt._spread=!0),rt.end=Object.assign({},be?O[be][1].start:st[1].end),O.splice(be||se,0,["exit",rt,st[2]]),se++,Z++}if(st[1].type==="listItemPrefix"){const gn={type:"listItem",_spread:!1,start:Object.assign({},st[1].start),end:void 0};rt=gn,O.splice(se,0,["enter",gn,st[2]]),se++,Z++,ht=void 0,Vn=!0}}}return O[G][1]._spread=at,Z}function o(O,G){return Z;function Z(se){s.call(this,O(se),se),G&&G.call(this,se)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(O,G,Z){this.stack[this.stack.length-1].children.push(O),this.stack.push(O),this.tokenStack.push([G,Z||void 0]),O.position={start:kr(G.start),end:void 0}}function l(O){return G;function G(Z){O&&O.call(this,Z),u.call(this,Z)}}function u(O,G){const Z=this.stack.pop(),se=this.tokenStack.pop();if(se)se[0].type!==O.type&&(G?G.call(this,O,se[0]):(se[1]||FS).call(this,O,se[0]));else throw new Error("Cannot close `"+O.type+"` ("+ga({start:O.start,end:O.end})+"): it’s not open");Z.position.end=kr(O.end)}function d(){return t0(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(O){if(this.data.expectingFirstListItemValue){const G=this.stack[this.stack.length-2];G.start=Number.parseInt(this.sliceSerialize(O),10),this.data.expectingFirstListItemValue=void 0}}function p(){const O=this.resume(),G=this.stack[this.stack.length-1];G.lang=O}function m(){const O=this.resume(),G=this.stack[this.stack.length-1];G.meta=O}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const O=this.resume(),G=this.stack[this.stack.length-1];G.value=O.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const O=this.resume(),G=this.stack[this.stack.length-1];G.value=O.replace(/(\r?\n|\r)$/g,"")}function y(O){const G=this.resume(),Z=this.stack[this.stack.length-1];Z.label=G,Z.identifier=jn(this.sliceSerialize(O)).toLowerCase()}function w(){const O=this.resume(),G=this.stack[this.stack.length-1];G.title=O}function k(){const O=this.resume(),G=this.stack[this.stack.length-1];G.url=O}function E(O){const G=this.stack[this.stack.length-1];if(!G.depth){const Z=this.sliceSerialize(O).length;G.depth=Z}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function j(O){const G=this.stack[this.stack.length-1];G.depth=this.sliceSerialize(O).codePointAt(0)===61?1:2}function b(){this.data.setextHeadingSlurpLineEnding=void 0}function A(O){const Z=this.stack[this.stack.length-1].children;let se=Z[Z.length-1];(!se||se.type!=="text")&&(se=xr(),se.position={start:kr(O.start),end:void 0},Z.push(se)),this.stack.push(se)}function _(O){const G=this.stack.pop();G.value+=this.sliceSerialize(O),G.position.end=kr(O.end)}function L(O){const G=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Z=G.children[G.children.length-1];Z.position.end=kr(O.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(G.type)&&(A.call(this,O),_.call(this,O))}function P(){this.data.atHardBreak=!0}function $(){const O=this.resume(),G=this.stack[this.stack.length-1];G.value=O}function R(){const O=this.resume(),G=this.stack[this.stack.length-1];G.value=O}function F(){const O=this.resume(),G=this.stack[this.stack.length-1];G.value=O}function D(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=G,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function V(){const O=this.stack[this.stack.length-1];if(this.data.inReference){const G=this.data.referenceType||"shortcut";O.type+="Reference",O.referenceType=G,delete O.url,delete O.title}else delete O.identifier,delete O.label;this.data.referenceType=void 0}function N(O){const G=this.sliceSerialize(O),Z=this.stack[this.stack.length-2];Z.label=G7(G),Z.identifier=jn(G).toLowerCase()}function q(){const O=this.stack[this.stack.length-1],G=this.resume(),Z=this.stack[this.stack.length-1];if(this.data.inReference=!0,Z.type==="link"){const se=O.children;Z.children=se}else Z.alt=G}function S(){const O=this.resume(),G=this.stack[this.stack.length-1];G.url=O}function W(){const O=this.resume(),G=this.stack[this.stack.length-1];G.title=O}function K(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function re(O){const G=this.resume(),Z=this.stack[this.stack.length-1];Z.label=G,Z.identifier=jn(this.sliceSerialize(O)).toLowerCase(),this.data.referenceType="full"}function ye(O){this.data.characterReferenceType=O.type}function le(O){const G=this.sliceSerialize(O),Z=this.data.characterReferenceType;let se;Z?(se=tI(G,Z==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):se=n0(G);const fe=this.stack[this.stack.length-1];fe.value+=se}function Ie(O){const G=this.stack.pop();G.position.end=kr(O.end)}function Ue(O){_.call(this,O);const G=this.stack[this.stack.length-1];G.url=this.sliceSerialize(O)}function At(O){_.call(this,O);const G=this.stack[this.stack.length-1];G.url="mailto:"+this.sliceSerialize(O)}function pn(){return{type:"blockquote",children:[]}}function $t(){return{type:"code",lang:null,meta:null,value:""}}function gr(){return{type:"inlineCode",value:""}}function Po(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function mr(){return{type:"emphasis",children:[]}}function ge(){return{type:"heading",depth:0,children:[]}}function An(){return{type:"break"}}function ve(){return{type:"html",value:""}}function Ht(){return{type:"image",title:null,url:"",alt:null}}function Lt(){return{type:"link",title:null,url:"",children:[]}}function zi(O){return{type:"list",ordered:O.type==="listOrdered",start:null,spread:O._spread,children:[]}}function Ln(O){return{type:"listItem",spread:O._spread,checked:null,children:[]}}function tn(){return{type:"paragraph",children:[]}}function Ge(){return{type:"strong",children:[]}}function xr(){return{type:"text",value:""}}function yr(){return{type:"thematicBreak"}}}function kr(e){return{line:e.line,column:e.column,offset:e.offset}}function fI(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?fI(e,r):Q7(e,r)}}function Q7(e,t){let n;for(n in t)if(dI.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function FS(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ga({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ga({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ga({start:t.start,end:t.end})+") is still open")}function J7(e){const t=this;t.parser=n;function n(r){return K7(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Z7(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function eq(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
`}]}function tq(e,t){const n=t.value?t.value+`
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function nq(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rq(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iq(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Lo(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const u={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,u),e.applyData(t,u)}function oq(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aq(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function hI(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function sq(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hI(e,t);const i={src:Lo(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function lq(e,t){const n={src:Lo(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function uq(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function cq(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return hI(e,t);const i={href:Lo(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function dq(e,t){const n={href:Lo(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function fq(e,t,n){const r=e.all(t),i=n?hq(n):pI(t),o={},a=[];if(typeof t.checked=="boolean"){const d=r[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const d=r[s];(i||s!==0||d.type!=="element"||d.tagName!=="p")&&a.push({type:"text",value:`
`}),d.type==="element"&&d.tagName==="p"&&!i?a.push(...d.children):a.push(d)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
`});const u={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,u),e.applyData(t,u)}function hq(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=pI(n[r])}return t}function pI(e){const t=e.spread;return t??e.children.length>1}function pq(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function gq(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mq(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function xq(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yq(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Qy(t.children[1]),l=GT(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function vq(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const u=[];for(;++l<s;){const f=t.children[l],h={},p=a?a[l]:void 0;p&&(h.align=p);let m={type:"element",tagName:o,properties:h,children:[]};f&&(m.children=e.all(f),e.patch(f,m),m=e.applyData(f,m)),u.push(m)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,d),e.applyData(t,d)}function wq(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const qS=9,$S=32;function bq(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(HS(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(HS(t.slice(i),i>0,!1)),o.join("")}function HS(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===qS||o===$S;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===qS||o===$S;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function kq(e,t){const n={type:"text",value:bq(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function _q(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Sq={blockquote:Z7,break:eq,code:tq,delete:nq,emphasis:rq,footnoteReference:iq,heading:oq,html:aq,imageReference:sq,image:lq,inlineCode:uq,linkReference:cq,link:dq,listItem:fq,list:pq,paragraph:gq,root:mq,strong:xq,table:yq,tableCell:wq,tableRow:vq,text:kq,thematicBreak:_q,toml:Ns,yaml:Ns,definition:Ns,footnoteDefinition:Ns};function Ns(){}const gI=-1,qu=0,xa=1,Gl=2,i0=3,o0=4,a0=5,s0=6,mI=7,xI=8,US=typeof self=="object"?self:globalThis,Cq=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case qu:case gI:return n(a,i);case xa:{const s=n([],i);for(const l of a)s.push(r(l));return s}case Gl:{const s=n({},i);for(const[l,u]of a)s[r(l)]=r(u);return s}case i0:return n(new Date(a),i);case o0:{const{source:s,flags:l}=a;return n(new RegExp(s,l),i)}case a0:{const s=n(new Map,i);for(const[l,u]of a)s.set(r(l),r(u));return s}case s0:{const s=n(new Set,i);for(const l of a)s.add(r(l));return s}case mI:{const{name:s,message:l}=a;return n(new US[s](l),i)}case xI:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:s}=new Uint8Array(a);return n(new DataView(s),a)}}return n(new US[o](a),i)};return r},WS=e=>Cq(new Map,e)(0),Di="",{toString:jq}={},{keys:Eq}=Object,Wo=e=>{const t=typeof e;if(t!=="object"||!e)return[qu,t];const n=jq.call(e).slice(8,-1);switch(n){case"Array":return[xa,Di];case"Object":return[Gl,Di];case"Date":return[i0,Di];case"RegExp":return[o0,Di];case"Map":return[a0,Di];case"Set":return[s0,Di];case"DataView":return[xa,n]}return n.includes("Array")?[xa,n]:n.includes("Error")?[mI,n]:[Gl,n]},Ds=([e,t])=>e===qu&&(t==="function"||t==="symbol"),Tq=(e,t,n,r)=>{const i=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},o=a=>{if(n.has(a))return n.get(a);let[s,l]=Wo(a);switch(s){case qu:{let d=a;switch(l){case"bigint":s=xI,d=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);d=null;break;case"undefined":return i([gI],a)}return i([s,d],a)}case xa:{if(l){let h=a;return l==="DataView"?h=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(h=new Uint8Array(a)),i([l,[...h]],a)}const d=[],f=i([s,d],a);for(const h of a)d.push(o(h));return f}case Gl:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());const d=[],f=i([s,d],a);for(const h of Eq(a))(e||!Ds(Wo(a[h])))&&d.push([o(h),o(a[h])]);return f}case i0:return i([s,a.toISOString()],a);case o0:{const{source:d,flags:f}=a;return i([s,{source:d,flags:f}],a)}case a0:{const d=[],f=i([s,d],a);for(const[h,p]of a)(e||!(Ds(Wo(h))||Ds(Wo(p))))&&d.push([o(h),o(p)]);return f}case s0:{const d=[],f=i([s,d],a);for(const h of a)(e||!Ds(Wo(h)))&&d.push(o(h));return f}}const{message:u}=a;return i([s,{name:l,message:u}],a)};return o},VS=(e,{json:t,lossy:n}={})=>{const r=[];return Tq(!(t||n),!!t,new Map,r)(e),r},Yl=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?WS(VS(e,t)):structuredClone(e):(e,t)=>WS(VS(e,t));function Iq(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Rq(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Aq(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Iq,r=e.options.footnoteBackLabel||Rq,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[l]);if(!u)continue;const d=e.all(u),f=String(u.identifier).toUpperCase(),h=Lo(f.toLowerCase());let p=0;const m=[],g=e.footnoteCounts.get(f);for(;g!==void 0&&++p<=g;){m.length>0&&m.push({type:"text",value:" "});let y=typeof n=="string"?n:n(l,p);typeof y=="string"&&(y={type:"text",value:y}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,p),className:["data-footnote-backref"]},children:Array.isArray(y)?y:[y]})}const v=d[d.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const y=v.children[v.children.length-1];y&&y.type==="text"?y.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...m)}else d.push(...m);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(u,x),s.push(x)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Yl(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
`}]}}const $u=function(e){if(e==null)return Mq;if(typeof e=="function")return Hu(e);if(typeof e=="object")return Array.isArray(e)?Lq(e):Pq(e);if(typeof e=="string")return zq(e);throw new Error("Expected function, string, or object as test")};function Lq(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=$u(e[n]);return Hu(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Pq(e){const t=e;return Hu(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function zq(e){return Hu(t);function t(n){return n&&n.type===e}}function Hu(e){return t;function t(n,r,i){return!!(Nq(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Mq(){return!0}function Nq(e){return e!==null&&typeof e=="object"&&"type"in e}const yI=[],Dq=!0,dx=!1,Oq="skip";function vI(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=$u(i),a=r?-1:1;s(e,void 0,[])();function s(l,u,d){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=yI,m,g,v;if((!t||o(l,u,d[d.length-1]||void 0))&&(p=Bq(n(l,d)),p[0]===dx))return p;if("children"in l&&l.children){const x=l;if(x.children&&p[0]!==Oq)for(g=(r?x.children.length:-1)+a,v=d.concat(x);g>-1&&g<x.children.length;){const y=x.children[g];if(m=s(y,g,v)(),m[0]===dx)return m;g=typeof m[1]=="number"?m[1]:g+a}}return p}}}function Bq(e){return Array.isArray(e)?e:typeof e=="number"?[Dq,e]:e==null?yI:[e]}function l0(e,t,n,r){let i,o,a;typeof t=="function"&&typeof n!="function"?(o=void 0,a=t,i=n):(o=t,a=n,i=r),vI(e,o,s,i);function s(l,u){const d=u[u.length-1],f=d?d.children.indexOf(l):void 0;return a(l,f,d)}}const fx={}.hasOwnProperty,Fq={};function qq(e,t){const n=t||Fq,r=new Map,i=new Map,o=new Map,a={...Sq,...n.handlers},s={all:u,applyData:Hq,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:l,options:n,patch:$q,wrap:Wq};return l0(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?r:i,h=String(d.identifier).toUpperCase();f.has(h)||f.set(h,d)}}),s;function l(d,f){const h=d.type,p=s.handlers[h];if(fx.call(s.handlers,h)&&p)return p(s,d,f);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in d){const{children:g,...v}=d,x=Yl(v);return x.children=s.all(d),x}return Yl(d)}return(s.options.unknownHandler||Uq)(s,d,f)}function u(d){const f=[];if("children"in d){const h=d.children;let p=-1;for(;++p<h.length;){const m=s.one(h[p],d);if(m){if(p&&h[p-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=GS(m.value)),!Array.isArray(m)&&m.type==="element")){const g=m.children[0];g&&g.type==="text"&&(g.value=GS(g.value))}Array.isArray(m)?f.push(...m):f.push(m)}}}return f}}function $q(e,t){e.position&&(t.position=RF(e))}function Hq(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&o&&Object.assign(n.properties,Yl(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function Uq(e,t){const n=t.data||{},r="value"in t&&!(fx.call(n,"hProperties")||fx.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Wq(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
`});++r<e.length;)r&&n.push({type:"text",value:`
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
`}),n}function GS(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function YS(e,t){const n=qq(e,t),r=n.one(e,void 0),i=Aq(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
`},i),o}function Vq(e,t){return e&&"run"in e?async function(n,r){const i=YS(n,{file:r,...t});await e.run(i,r)}:function(n,r){return YS(n,{file:r,...e||t})}}function KS(e){if(e)throw e}var sl=Object.prototype.hasOwnProperty,wI=Object.prototype.toString,XS=Object.defineProperty,QS=Object.getOwnPropertyDescriptor,JS=function(t){return typeof Array.isArray=="function"?Array.isArray(t):wI.call(t)==="[object Array]"},ZS=function(t){if(!t||wI.call(t)!=="[object Object]")return!1;var n=sl.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&sl.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||sl.call(t,i)},eC=function(t,n){XS&&n.name==="__proto__"?XS(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},tC=function(t,n){if(n==="__proto__")if(sl.call(t,n)){if(QS)return QS(t,n).value}else return;return t[n]},Gq=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,u=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<u;++l)if(t=arguments[l],t!=null)for(n in t)r=tC(s,n),i=tC(t,n),s!==i&&(d&&i&&(ZS(i)||(o=JS(i)))?(o?(o=!1,a=r&&JS(r)?r:[]):a=r&&ZS(r)?r:{},eC(s,{name:n,newValue:e(d,a,i)})):typeof i<"u"&&eC(s,{name:n,newValue:i}));return s};const Lg=Xl(Gq);function hx(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Yq(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...u){const d=e[++o];let f=-1;if(l){a(l);return}for(;++f<i.length;)(u[f]===null||u[f]===void 0)&&(u[f]=i[f]);i=u,d?Kq(d,s)(...u):a(null,...u)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Kq(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(i);try{l=e.apply(this,a)}catch(u){const d=u;if(s&&n)throw d;return i(d)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}const Dn={basename:Xq,dirname:Qq,extname:Jq,join:Zq,sep:"/"};function Xq(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ss(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function Qq(e){if(ss(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Jq(e){ss(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Zq(...e){let t=-1,n;for(;++t<e.length;)ss(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":e$(n)}function e$(e){ss(e);const t=e.codePointAt(0)===47;let n=t$(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function t$(e,t){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function ss(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const n$={cwd:r$};function r$(){return"/"}function px(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function i$(e){if(typeof e=="string")e=new URL(e);else if(!px(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return o$(e)}function o$(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Pg=["history","path","basename","stem","extname","dirname"];class bI{constructor(t){let n;t?px(t)?n={path:t}:typeof t=="string"||a$(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":n$.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Pg.length;){const o=Pg[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Pg.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Dn.basename(this.path):void 0}set basename(t){Mg(t,"basename"),zg(t,"basename"),this.path=Dn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Dn.dirname(this.path):void 0}set dirname(t){nC(this.basename,"dirname"),this.path=Dn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Dn.extname(this.path):void 0}set extname(t){if(zg(t,"extname"),nC(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Dn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){px(t)&&(t=i$(t)),Mg(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Dn.basename(this.path,this.extname):void 0}set stem(t){Mg(t,"stem"),zg(t,"stem"),this.path=Dn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new wt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function zg(e,t){if(e&&e.includes(Dn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Dn.sep+"`")}function Mg(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function nC(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function a$(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const s$=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},l$={}.hasOwnProperty;class u0 extends s${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=Yq()}copy(){const t=new u0;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Lg(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Og("data",this.frozen),this.namespace[t]=n,this):l$.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Og("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Os(t),r=this.parser||this.Parser;return Ng("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Ng("process",this.parser||this.Parser),Dg("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const s=Os(t),l=r.parse(s);r.run(l,s,function(d,f,h){if(d||!f||!h)return u(d);const p=f,m=r.stringify(p,h);d$(m)?h.value=m:h.result=m,u(d,h)});function u(d,f){d||!f?a(d):o?o(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Ng("processSync",this.parser||this.Parser),Dg("processSync",this.compiler||this.Compiler),this.process(t,i),iC("processSync","process",n),r;function i(o,a){n=!0,KS(o),r=a}}run(t,n,r){rC(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,s){const l=Os(n);i.run(t,l,u);function u(d,f,h){const p=f||t;d?s(d):a?a(p):r(void 0,p,h)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),iC("runSync","run",r),i;function o(a,s){KS(a),i=s,r=!0}}stringify(t,n){this.freeze();const r=Os(n),i=this.compiler||this.Compiler;return Dg("stringify",i),rC(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Og("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(u){if(typeof u=="function")l(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[d,...f]=u;l(d,f)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))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");s(u.plugins),u.settings&&(i.settings=Lg(!0,i.settings,u.settings))}function s(u){let d=-1;if(u!=null)if(Array.isArray(u))for(;++d<u.length;){const f=u[d];o(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function l(u,d){let f=-1,h=-1;for(;++f<r.length;)if(r[f][0]===u){h=f;break}if(h===-1)r.push([u,...d]);else if(d.length>0){let[p,...m]=d;const g=r[h][1];hx(g)&&hx(p)&&(p=Lg(!0,g,p)),r[h]=[u,p,...m]}}}}const u$=new u0().freeze();function Ng(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Dg(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Og(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function rC(e){if(!hx(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function iC(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Os(e){return c$(e)?e:new bI(e)}function c$(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function d$(e){return typeof e=="string"||f$(e)}function f$(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const h$="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",oC=[],aC={allowDangerousHtml:!0},p$=/^(https?|ircs?|mailto|xmpp)$/i,g$=[{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:"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 kI(e){const t=m$(e),n=x$(e);return y$(t.runSync(t.parse(n),n),e)}function m$(e){const t=e.rehypePlugins||oC,n=e.remarkPlugins||oC,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...aC}:aC;return u$().use(J7).use(n).use(Vq,r).use(t)}function x$(e){const t=e.children||"",n=new bI;return typeof t=="string"&&(n.value=t),n}function y$(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||v$;for(const d of g$)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+h$+d.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),l0(e,u),MF(e,{Fragment:c.Fragment,components:i,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function u(d,f,h){if(d.type==="raw"&&h&&typeof f=="number")return a?h.children.splice(f,1):h.children[f]={type:"text",value:d.value},f;if(d.type==="element"){let p;for(p in Ig)if(Object.hasOwn(Ig,p)&&Object.hasOwn(d.properties,p)){const m=d.properties[p],g=Ig[p];(g===null||g.includes(d.tagName))&&(d.properties[p]=l(String(m||""),p,d))}}if(d.type==="element"){let p=n?!n.includes(d.tagName):o?o.includes(d.tagName):!1;if(!p&&r&&typeof f=="number"&&(p=!r(d,f,h)),p&&h&&typeof f=="number")return s&&d.children?h.children.splice(f,1,...d.children):h.children.splice(f,1),f}}}function v$(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||p$.test(e.slice(0,t))?e:""}function sC(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function w$(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function b$(e,t,n){const i=$u((n||{}).ignore||[]),o=k$(t);let a=-1;for(;++a<o.length;)vI(e,"text",s);function s(u,d){let f=-1,h;for(;++f<d.length;){const p=d[f],m=h?h.children:void 0;if(i(p,m?m.indexOf(p):void 0,h))return;h=p}if(h)return l(u,d)}function l(u,d){const f=d[d.length-1],h=o[a][0],p=o[a][1];let m=0;const v=f.children.indexOf(u);let x=!1,y=[];h.lastIndex=0;let w=h.exec(u.value);for(;w;){const k=w.index,E={index:w.index,input:w.input,stack:[...d,u]};let C=p(...w,E);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?h.lastIndex=k+1:(m!==k&&y.push({type:"text",value:u.value.slice(m,k)}),Array.isArray(C)?y.push(...C):C&&y.push(C),m=k+w[0].length,x=!0),!h.global)break;w=h.exec(u.value)}return x?(m<u.value.length&&y.push({type:"text",value:u.value.slice(m)}),f.children.splice(v,1,...y)):y=[u],v+y.length}}function k$(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([_$(i[0]),S$(i[1])])}return t}function _$(e){return typeof e=="string"?new RegExp(w$(e),"g"):e}function S$(e){return typeof e=="function"?e:function(){return e}}const Bg="phrasing",Fg=["autolink","link","image","label"];function C$(){return{transforms:[L$],enter:{literalAutolink:E$,literalAutolinkEmail:qg,literalAutolinkHttp:qg,literalAutolinkWww:qg},exit:{literalAutolink:A$,literalAutolinkEmail:R$,literalAutolinkHttp:T$,literalAutolinkWww:I$}}}function j$(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Bg,notInConstruct:Fg},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Bg,notInConstruct:Fg},{character:":",before:"[ps]",after:"\\/",inConstruct:Bg,notInConstruct:Fg}]}}function E$(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function qg(e){this.config.enter.autolinkProtocol.call(this,e)}function T$(e){this.config.exit.autolinkProtocol.call(this,e)}function I$(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function R$(e){this.config.exit.autolinkEmail.call(this,e)}function A$(e){this.exit(e)}function L$(e){b$(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,P$],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),z$]],{ignore:["link","linkReference"]})}function P$(e,t,n,r,i){let o="";if(!_I(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!M$(n)))return!1;const a=N$(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function z$(e,t,n,r){return!_I(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function M$(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function N$(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=sC(e,"(");let o=sC(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function _I(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Si(n)||Bu(n))&&(!t||n!==47)}SI.peek=W$;function D$(){this.buffer()}function O$(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function B$(){this.buffer()}function F$(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function q$(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $$(e){this.exit(e)}function H$(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function U$(e){this.exit(e)}function W$(){return"["}function SI(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),s(),a(),o+=i.move("]"),o}function V$(){return{enter:{gfmFootnoteCallString:D$,gfmFootnoteCall:O$,gfmFootnoteDefinitionLabelString:B$,gfmFootnoteDefinition:F$},exit:{gfmFootnoteCallString:q$,gfmFootnoteCall:$$,gfmFootnoteDefinitionLabelString:H$,gfmFootnoteDefinition:U$}}}function G$(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:SI},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,a){const s=o.createTracker(a);let l=s.move("[^");const u=o.enter("footnoteDefinition"),d=o.enter("label");return l+=s.move(o.safe(o.associationId(r),{before:l,after:"]"})),d(),l+=s.move("]:"),r.children&&r.children.length>0&&(s.shift(4),l+=s.move((t?`
`:" ")+o.indentLines(o.containerFlow(r,s.current()),t?CI:Y$))),u(),l}}function Y$(e,t,n){return t===0?e:CI(e,t,n)}function CI(e,t,n){return(n?"":"    ")+e}const K$=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];jI.peek=eH;function X$(){return{canContainEols:["delete"],enter:{strikethrough:J$},exit:{strikethrough:Z$}}}function Q$(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:K$}],handlers:{delete:jI}}}function J$(e){this.enter({type:"delete",children:[]},e)}function Z$(e){this.exit(e)}function jI(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function eH(){return"~"}function tH(e){return e.length}function nH(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||tH,o=[],a=[],s=[],l=[];let u=0,d=-1;for(;++d<e.length;){const g=[],v=[];let x=-1;for(e[d].length>u&&(u=e[d].length);++x<e[d].length;){const y=rH(e[d][x]);if(n.alignDelimiters!==!1){const w=i(y);v[x]=w,(l[x]===void 0||w>l[x])&&(l[x]=w)}g.push(y)}a[d]=g,s[d]=v}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<u;)o[f]=lC(r[f]);else{const g=lC(r);for(;++f<u;)o[f]=g}f=-1;const h=[],p=[];for(;++f<u;){const g=o[f];let v="",x="";g===99?(v=":",x=":"):g===108?v=":":g===114&&(x=":");let y=n.alignDelimiters===!1?1:Math.max(1,l[f]-v.length-x.length);const w=v+"-".repeat(y)+x;n.alignDelimiters!==!1&&(y=v.length+y+x.length,y>l[f]&&(l[f]=y),p[f]=y),h[f]=w}a.splice(1,0,h),s.splice(1,0,p),d=-1;const m=[];for(;++d<a.length;){const g=a[d],v=s[d];f=-1;const x=[];for(;++f<u;){const y=g[f]||"";let w="",k="";if(n.alignDelimiters!==!1){const E=l[f]-(v[f]||0),C=o[f];C===114?w=" ".repeat(E):C===99?E%2?(w=" ".repeat(E/2+.5),k=" ".repeat(E/2-.5)):(w=" ".repeat(E/2),k=w):k=" ".repeat(E)}n.delimiterStart!==!1&&!f&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&y==="")&&(n.delimiterStart!==!1||f)&&x.push(" "),n.alignDelimiters!==!1&&x.push(w),x.push(y),n.alignDelimiters!==!1&&x.push(k),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||f!==u-1)&&x.push("|")}m.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return m.join(`
`)}function rH(e){return e==null?"":String(e)}function lC(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function iH(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),oH);return i(),a}function oH(e,t,n){return">"+(n?"":" ")+e}function aH(e,t){return uC(e,t.inConstruct,!0)&&!uC(e,t.notInConstruct,!1)}function uC(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function cC(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
`&&aH(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
`}function sH(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}function lH(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function uH(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function cH(e,t,n,r){const i=uH(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(lH(e,n)){const f=n.enter("codeIndented"),h=n.indentLines(o,dH);return f(),h}const s=n.createTracker(r),l=i.repeat(Math.max(sH(o,i)+1,3)),u=n.enter("codeFenced");let d=s.move(l);if(e.lang){const f=n.enter(`codeFencedLang${a}`);d+=s.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${a}`);d+=s.move(" "),d+=s.move(n.safe(e.meta,{before:d,after:`
`,encode:["`"],...s.current()})),f()}return d+=s.move(`
`),o&&(d+=s.move(o+`
`)),d+=s.move(l),u(),d}function dH(e,t,n){return(n?"":"    ")+e}function c0(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function fH(e,t,n,r){const i=c0(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("[");return u+=l.move(n.safe(n.associationId(e),{before:u,after:"]",...l.current()})),u+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":`
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),a(),u}function hH(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Ua(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Kl(e,t,n){const r=wo(e),i=wo(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}EI.peek=pH;function EI(e,t,n,r){const i=hH(n),o=n.enter("emphasis"),a=n.createTracker(r),s=a.move(i);let l=a.move(n.containerPhrasing(e,{after:i,before:s,...a.current()}));const u=l.charCodeAt(0),d=Kl(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=Ua(u)+l.slice(1));const f=l.charCodeAt(l.length-1),h=Kl(r.after.charCodeAt(0),f,i);h.inside&&(l=l.slice(0,-1)+Ua(f));const p=a.move(i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+l+p}function pH(e,t,n){return n.options.emphasis||"*"}function gH(e,t){let n=!1;return l0(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,dx}),!!((!e.depth||e.depth<3)&&t0(e)&&(t.options.setext||n))}function mH(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(gH(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),h=n.containerPhrasing(e,{...o.current(),before:`
`,after:`
`});return f(),d(),h+`
`+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
`))+1))}const a="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
`,...o.current()});return/^[\t ]/.test(u)&&(u=Ua(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),l(),s(),u}TI.peek=xH;function TI(e){return e.value||""}function xH(){return"<"}II.peek=yH;function II(e,t,n,r){const i=c0(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let u=l.move("![");return u+=l.move(n.safe(e.alt,{before:u,after:"]",...l.current()})),u+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),u+=l.move("<"),u+=l.move(n.safe(e.url,{before:u,after:">",...l.current()})),u+=l.move(">")):(s=n.enter("destinationRaw"),u+=l.move(n.safe(e.url,{before:u,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),u+=l.move(" "+i),u+=l.move(n.safe(e.title,{before:u,after:i,...l.current()})),u+=l.move(i),s()),u+=l.move(")"),a(),u}function yH(){return"!"}RI.peek=vH;function RI(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const u=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=d,o(),i==="full"||!u||u!==f?l+=s.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function vH(){return"!"}AI.peek=wH;function AI(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let u=l.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(l.index+1)}}return i+r+i}function wH(){return"`"}function LI(e,t){const n=t0(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}PI.peek=bH;function PI(e,t,n,r){const i=c0(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(LI(e,n)){const d=n.stack;n.stack=[],s=n.enter("autolink");let f=a.move("<");return f+=a.move(n.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),s(),n.stack=d,f}s=n.enter("link"),l=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(l=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),u+=a.move(" "+i),u+=a.move(n.safe(e.title,{before:u,after:i,...a.current()})),u+=a.move(i),l()),u+=a.move(")"),s(),u}function bH(e,t,n){return LI(e,n)?"<":"["}zI.peek=kH;function zI(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const u=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(u+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=d,o(),i==="full"||!u||u!==f?l+=s.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function kH(){return"["}function d0(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function _H(e){const t=d0(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function SH(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function MI(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function CH(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?SH(n):d0(n);const s=e.ordered?a==="."?")":".":_H(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),MI(n)===a&&d){let f=-1;for(;++f<e.children.length;){const h=e.children[f];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),u}function jH(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function EH(e,t,n,r){const i=jH(n);let o=n.bulletCurrent||d0(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);const l=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,s.current()),d);return l(),u;function d(f,h,p){return h?(p?"":" ".repeat(a))+f:(p?o:o+" ".repeat(a-o.length))+f}}function TH(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const IH=$u(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function RH(e,t,n,r){return(e.children.some(function(a){return IH(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function AH(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}NI.peek=LH;function NI(e,t,n,r){const i=AH(n),o=n.enter("strong"),a=n.createTracker(r),s=a.move(i+i);let l=a.move(n.containerPhrasing(e,{after:i,before:s,...a.current()}));const u=l.charCodeAt(0),d=Kl(r.before.charCodeAt(r.before.length-1),u,i);d.inside&&(l=Ua(u)+l.slice(1));const f=l.charCodeAt(l.length-1),h=Kl(r.after.charCodeAt(0),f,i);h.inside&&(l=l.slice(0,-1)+Ua(f));const p=a.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+l+p}function LH(e,t,n){return n.options.strong||"*"}function PH(e,t,n,r){return n.safe(e.value,r)}function zH(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function MH(e,t,n){const r=(MI(n)+(n.options.ruleSpaces?" ":"")).repeat(zH(n));return n.options.ruleSpaces?r.slice(0,-1):r}const DI={blockquote:iH,break:cC,code:cH,definition:fH,emphasis:EI,hardBreak:cC,heading:mH,html:TI,image:II,imageReference:RI,inlineCode:AI,link:PI,linkReference:zI,list:CH,listItem:EH,paragraph:TH,root:RH,strong:NI,text:PH,thematicBreak:MH};function NH(){return{enter:{table:DH,tableData:dC,tableHeader:dC,tableRow:BH},exit:{codeText:FH,table:OH,tableData:$g,tableHeader:$g,tableRow:$g}}}function DH(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function OH(e){this.exit(e),this.data.inTable=void 0}function BH(e){this.enter({type:"tableRow",children:[]},e)}function $g(e){this.exit(e)}function dC(e){this.enter({type:"tableCell",children:[]},e)}function FH(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,qH));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function qH(e,t){return t==="|"?t:e}function $H(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:a,tableCell:l,tableRow:s}};function a(p,m,g,v){return u(d(p,g,v),p.align)}function s(p,m,g,v){const x=f(p,g,v),y=u([x]);return y.slice(0,y.indexOf(`
`))}function l(p,m,g,v){const x=g.enter("tableCell"),y=g.enter("phrasing"),w=g.containerPhrasing(p,{...v,before:o,after:o});return y(),x(),w}function u(p,m){return nH(p,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function d(p,m,g){const v=p.children;let x=-1;const y=[],w=m.enter("table");for(;++x<v.length;)y[x]=f(v[x],m,g);return w(),y}function f(p,m,g){const v=p.children;let x=-1;const y=[],w=m.enter("tableRow");for(;++x<v.length;)y[x]=l(v[x],p,m,g);return w(),y}function h(p,m,g){let v=DI.inlineCode(p,m,g);return g.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function HH(){return{exit:{taskListCheckValueChecked:fC,taskListCheckValueUnchecked:fC,paragraph:WH}}}function UH(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:VH}}}function fC(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function WH(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function VH(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let l=DI.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),l;function u(d){return d+a}}function GH(){return[C$(),V$(),X$(),NH(),HH()]}function YH(e){return{extensions:[j$(),G$(e),Q$(),$H(e),UH()]}}const KH={tokenize:tU,partial:!0},OI={tokenize:nU,partial:!0},BI={tokenize:rU,partial:!0},FI={tokenize:iU,partial:!0},XH={tokenize:oU,partial:!0},qI={name:"wwwAutolink",tokenize:ZH,previous:HI},$I={name:"protocolAutolink",tokenize:eU,previous:UI},pr={name:"emailAutolink",tokenize:JH,previous:WI},Wn={};function QH(){return{text:Wn}}let ri=48;for(;ri<123;)Wn[ri]=pr,ri++,ri===58?ri=65:ri===91&&(ri=97);Wn[43]=pr;Wn[45]=pr;Wn[46]=pr;Wn[95]=pr;Wn[72]=[pr,$I];Wn[104]=[pr,$I];Wn[87]=[pr,qI];Wn[119]=[pr,qI];function JH(e,t,n){const r=this;let i,o;return a;function a(f){return!gx(f)||!WI.call(r,r.previous)||f0(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return gx(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(XH,d,u)(f):f===45||f===95||yt(f)?(o=!0,e.consume(f),l):d(f)}function u(f){return e.consume(f),i=!0,l}function d(f){return o&&i&&jt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function ZH(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!HI.call(r,r.previous)||f0(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(KH,e.attempt(OI,e.attempt(BI,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function eU(e,t,n){const r=this;let i="",o=!1;return a;function a(f){return(f===72||f===104)&&UI.call(r,r.previous)&&!f0(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(jt(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const h=i.toLowerCase();if(h==="http"||h==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),o?u:(o=!0,l)):n(f)}function u(f){return f===null||Vl(f)||Pe(f)||Si(f)||Bu(f)?n(f):e.attempt(OI,e.attempt(BI,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function tU(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function nU(e,t,n){let r,i,o;return a;function a(u){return u===46||u===95?e.check(FI,l,s)(u):u===null||Pe(u)||Si(u)||u!==45&&Bu(u)?l(u):(o=!0,e.consume(u),a)}function s(u){return u===95?r=!0:(i=r,r=void 0),e.consume(u),a}function l(u){return i||r||!o?n(u):t(u)}}function rU(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(FI,t,o)(a):a===null||Pe(a)||Si(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function iU(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Pe(s)||Si(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Pe(s)||Si(s)?t(s):r(s)}function o(s){return jt(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):jt(s)?(e.consume(s),a):n(s)}}function oU(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return yt(o)?n(o):t(o)}}function HI(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Pe(e)}function UI(e){return!jt(e)}function WI(e){return!(e===47||gx(e))}function gx(e){return e===43||e===45||e===46||e===95||yt(e)}function f0(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const aU={tokenize:pU,partial:!0};function sU(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:dU,continuation:{tokenize:fU},exit:hU}},text:{91:{name:"gfmFootnoteCall",tokenize:cU},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:lU,resolveTo:uU}}}}function lU(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const u=jn(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!o.includes(u.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function uU(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function cU(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(f){if(o>999||f===93&&!a||f===null||f===91||Pe(f))return n(f);if(f===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return i.includes(jn(r.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Pe(f)||(a=!0),o++,e.consume(f),f===92?d:u}function d(f){return f===91||f===92||f===93?(e.consume(f),o++,u):u(f)}}function dU(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(m)}function d(m){if(a>999||m===93&&!s||m===null||m===91||Pe(m))return n(m);if(m===93){e.exit("chunkString");const g=e.exit("gfmFootnoteDefinitionLabelString");return o=jn(r.sliceSerialize(g)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return Pe(m)||(s=!0),a++,e.consume(m),m===92?f:d}function f(m){return m===91||m===92||m===93?(e.consume(m),a++,d):d(m)}function h(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),we(e,p,"gfmFootnoteDefinitionWhitespace")):n(m)}function p(m){return t(m)}}function fU(e,t,n){return e.check(as,t,e.attempt(aU,t,n))}function hU(e){e.exit("gfmFootnoteDefinition")}function pU(e,t,n){const r=this;return we(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function gU(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let u=l;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[l][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[l][1].end)},f={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[l][1].start)},h=[["enter",d,s],["enter",a[u][1],s],["exit",a[u][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&Xt(h,h.length,0,Fu(p,a.slice(u+1,l),s)),Xt(h,h.length,0,[["exit",f,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",d,s]]),Xt(a,u-1,l-u+3,h),l=u+h.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function o(a,s,l){const u=this.previous,d=this.events;let f=0;return h;function h(m){return u===126&&d[d.length-1][1].type!=="characterEscape"?l(m):(a.enter("strikethroughSequenceTemporary"),p(m))}function p(m){const g=wo(u);if(m===126)return f>1?l(m):(a.consume(m),f++,p);if(f<2&&!n)return l(m);const v=a.exit("strikethroughSequenceTemporary"),x=wo(m);return v._open=!x||x===2&&!!g,v._close=!g||g===2&&!!x,s(m)}}}class mU{constructor(){this.map=[]}add(t,n,r){xU(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function xU(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function yU(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function vU(){return{flow:{null:{name:"table",tokenize:wU,resolveAll:bU}}}}function wU(e,t,n){const r=this;let i=0,o=0,a;return s;function s(_){let L=r.events.length-1;for(;L>-1;){const R=r.events[L][1].type;if(R==="lineEnding"||R==="linePrefix")L--;else break}const P=L>-1?r.events[L][1].type:null,$=P==="tableHead"||P==="tableRow"?C:l;return $===C&&r.parser.lazy[r.now().line]?n(_):$(_)}function l(_){return e.enter("tableHead"),e.enter("tableRow"),u(_)}function u(_){return _===124||(a=!0,o+=1),d(_)}function d(_){return _===null?n(_):te(_)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),p):n(_):he(_)?we(e,d,"whitespace")(_):(o+=1,a&&(a=!1,i+=1),_===124?(e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),a=!0,d):(e.enter("data"),f(_)))}function f(_){return _===null||_===124||Pe(_)?(e.exit("data"),d(_)):(e.consume(_),_===92?h:f)}function h(_){return _===92||_===124?(e.consume(_),f):f(_)}function p(_){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(_):(e.enter("tableDelimiterRow"),a=!1,he(_)?we(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):m(_))}function m(_){return _===45||_===58?v(_):_===124?(a=!0,e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),g):E(_)}function g(_){return he(_)?we(e,v,"whitespace")(_):v(_)}function v(_){return _===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(_),e.exit("tableDelimiterMarker"),x):_===45?(o+=1,x(_)):_===null||te(_)?k(_):E(_)}function x(_){return _===45?(e.enter("tableDelimiterFiller"),y(_)):E(_)}function y(_){return _===45?(e.consume(_),y):_===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(_),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(_))}function w(_){return he(_)?we(e,k,"whitespace")(_):k(_)}function k(_){return _===124?m(_):_===null||te(_)?!a||i!==o?E(_):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(_)):E(_)}function E(_){return n(_)}function C(_){return e.enter("tableRow"),j(_)}function j(_){return _===124?(e.enter("tableCellDivider"),e.consume(_),e.exit("tableCellDivider"),j):_===null||te(_)?(e.exit("tableRow"),t(_)):he(_)?we(e,j,"whitespace")(_):(e.enter("data"),b(_))}function b(_){return _===null||_===124||Pe(_)?(e.exit("data"),j(_)):(e.consume(_),_===92?A:b)}function A(_){return _===92||_===124?(e.consume(_),b):b(_)}}function bU(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,u,d,f;const h=new mU;for(;++n<e.length;){const p=e[n],m=p[1];p[0]==="enter"?m.type==="tableHead"?(s=!1,l!==0&&(hC(h,t,l,u,d),d=void 0,l=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,f=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},h.add(n,0,[["enter",d,t]])),i=m.type==="tableDelimiterRow"?2:d?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],f=Bs(h,t,o,i,void 0,f),o=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],f=Bs(h,t,o,i,void 0,f)),o=a,a=[o[1],n,0,0])):m.type==="tableHead"?(s=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,o[1]!==0?(a[0]=a[1],f=Bs(h,t,o,i,n,f)):a[1]!==0&&(f=Bs(h,t,a,i,n,f)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&hC(h,t,l,u,d),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=yU(t.events,n))}return e}function Bs(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},$i(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=$i(t.events,n[1]);if(o={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const u=$i(t.events,n[2]),d=$i(t.events,n[3]),f={type:s,start:Object.assign({},u),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,g=n[3]-n[2]-1;e.add(m,g,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(o.end=Object.assign({},$i(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function hC(e,t,n,r,i){const o=[],a=$i(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function $i(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const kU={name:"tasklistCheck",tokenize:SU};function _U(){return{text:{91:kU}}}function SU(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return Pe(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return te(l)?t(l):he(l)?e.check({tokenize:CU},t,n)(l):n(l)}}function CU(e,t,n){return we(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function jU(e){return eI([QH(),sU(),gU(e),vU(),_U()])}const EU={};function TU(e){const t=this,n=e||EU,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(jU(n)),o.push(GH()),a.push(YH(n))}const IU=({isOpen:e,content:t,question:n,onClose:r,isLoading:i})=>(T.useEffect(()=>{const o=a=>{a.key==="Escape"&&r()};if(e)return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[e,r]),e?c.jsx("div",{style:nn.backdrop,onClick:r,children:c.jsxs("div",{style:nn.modal,onClick:o=>o.stopPropagation(),children:[c.jsxs("div",{style:nn.header,children:[c.jsx("h2",{style:nn.title,children:"Claude Response"}),c.jsx("button",{onClick:r,style:nn.closeBtn,children:"×"})]}),n&&c.jsxs("div",{style:nn.questionSection,children:[c.jsx("div",{style:nn.questionLabel,children:"Your question:"}),c.jsx("div",{style:nn.questionText,children:n})]}),c.jsx("div",{style:nn.content,children:i?c.jsxs("div",{style:nn.loading,children:[c.jsx("div",{style:nn.spinner}),c.jsx("span",{children:"Claude is thinking..."})]}):c.jsx("div",{className:"ask-markdown",style:nn.markdown,children:c.jsx(kI,{remarkPlugins:[TU],children:t})})})]})}):null),nn={backdrop:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100},modal:{backgroundColor:"#ffffff",borderRadius:"12px",padding:"24px",width:"90%",maxWidth:"800px",maxHeight:"85vh",overflowY:"auto",border:"1px solid #d0d7de",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.15)"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"16px",paddingBottom:"12px",borderBottom:"1px solid #d0d7de"},title:{margin:0,fontSize:"18px",fontWeight:600,color:"#24292f"},closeBtn:{width:"32px",height:"32px",border:"none",background:"#f6f8fa",color:"#57606a",borderRadius:"6px",fontSize:"20px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center"},questionSection:{backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",borderRadius:"8px",padding:"12px 16px",marginBottom:"16px"},questionLabel:{fontSize:"12px",fontWeight:600,color:"#57606a",marginBottom:"4px",textTransform:"uppercase",letterSpacing:"0.5px"},questionText:{fontSize:"14px",color:"#24292f",fontStyle:"italic"},content:{fontSize:"14px",lineHeight:1.6,color:"#24292f"},loading:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"48px",gap:"16px",color:"#57606a"},spinner:{width:"32px",height:"32px",border:"3px solid #d0d7de",borderTopColor:"#0969da",borderRadius:"50%",animation:"spin 0.8s linear infinite"},markdown:{lineHeight:1.7}};if(typeof document<"u"){const e="ask-modal-styles";if(!document.getElementById(e)){const t=document.createElement("style");t.id=e,t.textContent=`
      @keyframes spin {
        to { transform: rotate(360deg); }
      }
      .ask-markdown h1 { font-size: 1.5em; font-weight: 600; margin: 1em 0 0.5em; border-bottom: 1px solid #d0d7de; padding-bottom: 0.3em; }
      .ask-markdown h2 { font-size: 1.3em; font-weight: 600; margin: 1em 0 0.5em; border-bottom: 1px solid #d0d7de; padding-bottom: 0.3em; }
      .ask-markdown h3 { font-size: 1.1em; font-weight: 600; margin: 1em 0 0.5em; }
      .ask-markdown h4 { font-size: 1em; font-weight: 600; margin: 1em 0 0.5em; }
      .ask-markdown p { margin: 0.5em 0; }
      .ask-markdown ul, .ask-markdown ol { margin: 0.5em 0; padding-left: 2em; }
      .ask-markdown li { margin: 0.25em 0; }
      .ask-markdown blockquote { margin: 0.5em 0; padding: 0.5em 1em; border-left: 4px solid #0969da; background: #f6f8fa; }
      .ask-markdown hr { border: none; border-top: 1px solid #d0d7de; margin: 1em 0; }
      .ask-markdown a { color: #0969da; text-decoration: none; }
      .ask-markdown a:hover { text-decoration: underline; }
      .ask-markdown strong { font-weight: 600; }
      .ask-markdown em { font-style: italic; }
      .ask-markdown table { border-collapse: collapse; margin: 1em 0; width: 100%; }
      .ask-markdown th, .ask-markdown td { border: 1px solid #d0d7de; padding: 8px 12px; text-align: left; }
      .ask-markdown th { background: #f6f8fa; font-weight: 600; }
      .ask-markdown pre { background: #f6f8fa; border: 1px solid #d0d7de; border-radius: 6px; padding: 16px; overflow: auto; font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; margin: 1em 0; }
      .ask-markdown code { background: #f6f8fa; padding: 2px 6px; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, monospace; font-size: 13px; }
      .ask-markdown pre code { background: none; padding: 0; }
    `,document.head.appendChild(t)}}const pC=45;function RU(e,t,n,r){const[i,o]=T.useState(new Map),a=T.useRef(!1),s=T.useCallback(()=>{if(!e.current)return;const p=e.current.getBoundingClientRect(),m=p.width,g=p.height,v=new Map;t.forEach((x,y)=>{const w=x.x*n+r.x,k=x.y*n+r.y,E=x.width*n,C=x.height*n,j=w-E/2,b=k-C/2,A=50,_=j+E>=-A&&j<=m+A&&b+C>=-A&&b<=g+A,L=E>=pC&&C>=pC;let P;_?L?P="visible":P="too-small":P="off-screen",v.set(y,{visibility:P,screenX:j,screenY:b,screenWidth:E,screenHeight:C})}),o(v)},[e,t,n,r]);T.useEffect(()=>{if(a.current)return;a.current=!0;const h=setTimeout(()=>{s(),a.current=!1},50);return()=>{clearTimeout(h),a.current=!1}},[s]);const l=T.useCallback(h=>{var p;return((p=i.get(h))==null?void 0:p.visibility)??"off-screen"},[i]);let u=0,d=0,f=0;return i.forEach(h=>{switch(h.visibility){case"visible":u++;break;case"too-small":d++;break;case"off-screen":f++;break}}),{visibilityMap:i,getVisibility:l,updateVisibility:s,visibleCount:u,tooSmallCount:d,offScreenCount:f}}const h0=1e3;function gC(){if(typeof window>"u")return VI();const e=new URLSearchParams(window.location.search),t=e.get("node"),n=e.get("search")||e.get("q"),r=e.get("sort"),i=e.get("view"),o=e.get("chains"),a=e.get("focus"),s=e.get("fullscreen");return{selectedNodeId:t?parseInt(t,10):null,searchQuery:n||"",searchSort:r==="oldest"||r==="newest"?r:"newest",viewMode:i==="all"||i==="single"||i==="recent"?i:"recent",recentChainCount:o?parseInt(o,10):h0,focusChainIndex:a?parseInt(a,10):null,isFullscreen:s==="1"||s==="true"}}function VI(){return{selectedNodeId:null,searchQuery:"",searchSort:"newest",viewMode:"recent",recentChainCount:h0,focusChainIndex:null,isFullscreen:typeof window<"u"&&window.innerWidth>=768}}function GI(e){const t=new URLSearchParams;return e.selectedNodeId!==null&&t.set("node",String(e.selectedNodeId)),e.searchQuery&&t.set("search",e.searchQuery),e.searchSort!=="newest"&&t.set("sort",e.searchSort),e.viewMode!=="recent"&&t.set("view",e.viewMode),e.recentChainCount!==h0&&t.set("chains",String(e.recentChainCount)),e.focusChainIndex!==null&&t.set("focus",String(e.focusChainIndex)),e.isFullscreen&&t.set("fullscreen","1"),t.toString()}function AU(e){if(typeof window>"u")return;const t=GI(e),n=t?`${window.location.pathname}?${t}`:window.location.pathname;window.history.replaceState({},"",n)}function LU(){const[e,t]=T.useState(VI);T.useEffect(()=>{const f=gC();t(f)},[]),T.useEffect(()=>{AU(e)},[e]),T.useEffect(()=>{const f=()=>{t(gC())};return window.addEventListener("popstate",f),()=>window.removeEventListener("popstate",f)},[]);const n=T.useCallback(f=>{t(h=>({...h,selectedNodeId:f}))},[]),r=T.useCallback(f=>{t(h=>({...h,searchQuery:f}))},[]),i=T.useCallback(f=>{t(h=>({...h,searchSort:f}))},[]),o=T.useCallback(f=>{t(h=>({...h,viewMode:f}))},[]),a=T.useCallback(f=>{t(h=>({...h,recentChainCount:f}))},[]),s=T.useCallback(f=>{t(h=>({...h,focusChainIndex:f}))},[]),l=T.useCallback(f=>{t(h=>({...h,isFullscreen:f}))},[]),u=T.useCallback(()=>{if(typeof window>"u")return"";const f=GI(e);return f?`${window.location.origin}${window.location.pathname}?${f}`:`${window.location.origin}${window.location.pathname}`},[e]),d=T.useCallback(async()=>{const f=u();try{await navigator.clipboard.writeText(f)}catch{const p=document.createElement("textarea");p.value=f,document.body.appendChild(p),p.select(),document.execCommand("copy"),document.body.removeChild(p)}},[u]);return{state:e,setSelectedNodeId:n,setSearchQuery:r,setSearchSort:i,setViewMode:o,setRecentChainCount:a,setFocusChainIndex:s,setIsFullscreen:l,copyLinkToClipboard:d,getShareableUrl:u}}function PU(e,t){return!e||t.length===0?null:t.find(n=>n.hash===e||n.short_hash===e||n.hash.startsWith(e))??null}const Hg=1e3;function mC(e){return Math.max(...e.nodes.map(t=>new Date(t.updated_at).getTime()))}function zU(e){return[...e].sort((t,n)=>mC(n)-mC(t))}const MU=({graphData:e,chains:t,gitHistory:n=[]})=>{const r=T.useRef(null),i=T.useRef(null),[o,a]=T.useState(1),{state:s,setSelectedNodeId:l,setSearchQuery:u,setSearchSort:d,setViewMode:f,setRecentChainCount:h,setFocusChainIndex:p,copyLinkToClipboard:m}=LU(),[g,v]=T.useState([]);T.useEffect(()=>{if(g.some(z=>z.isNew)){const z=setTimeout(()=>{v(Q=>Q.map(J=>({...J,isNew:!1})))},300);return()=>clearTimeout(z)}},[g]);const x=T.useCallback(z=>e.nodes.find(Q=>Q.id===z)??null,[e.nodes]),y=T.useCallback(z=>{v(Q=>{const J=Q.length>0?Math.min(...Q.map(Oe=>Oe.level)):0;return Q.some(Oe=>Oe.nodeId===z)?Q:[...Q,{nodeId:z,level:J-1,relation:"parent",isNew:!0}]})},[]),w=T.useCallback((z,Q)=>{v(J=>{const Oe=J.length>0?Math.max(...J.map(et=>et.level)):0;return J.some(et=>et.nodeId===z)?J:[...J,{nodeId:z,level:Oe+1,relation:"child",edgeType:Q,isNew:!0}]})},[]),k=T.useCallback(z=>{v(Q=>Q.filter(J=>J.nodeId!==z))},[]),E=T.useCallback(()=>{v([]),l(null)},[l]),C=T.useCallback((z,Q,J)=>{Q==="root"?(v([{nodeId:z,level:0,relation:"root",isNew:!0}]),l(z)):Q==="parent"?y(z):Q==="child"&&w(z,J)},[y,w,l]),j=T.useMemo(()=>{if(g.length>0){const z=g.find(Q=>Q.level===0)||g[0];return x(z.nodeId)}return s.selectedNodeId===null?null:e.nodes.find(z=>z.id===s.selectedNodeId)??null},[s.selectedNodeId,e.nodes,g,x]),b=typeof window<"u"&&window.innerWidth<768,[A,_]=T.useState(b),[L,P]=T.useState(new Set),[$,R]=T.useState(!1),[F,D]=T.useState("all"),[V,N]=T.useState(!1),[q,S]=T.useState(null),[W,K]=T.useState(!1),[I,re]=T.useState(100),[ye,le]=T.useState(!1),[Ie,Ue]=T.useState(1),[At,pn]=T.useState(!1),[$t,gr]=T.useState(""),[Po,mr]=T.useState(null),[ge,An]=T.useState(!1),[ve,Ht]=T.useState(!1),[Lt,zi]=T.useState(new Map),[Ln,tn]=T.useState({x:0,y:0}),[Ge,xr]=T.useState({width:0,height:0}),[yr,O]=T.useState({minX:0,maxX:1e3,minY:0,maxY:1e3}),{visibilityMap:G}=RU(r,Lt,o,Ln),Z=T.useRef(null),se=T.useMemo(()=>zU(t),[t]),fe=T.useMemo(()=>se.filter(z=>z.root.node_type==="goal"),[se]),at=T.useMemo(()=>s.viewMode==="single"&&s.focusChainIndex!==null?[t[s.focusChainIndex]].filter(Boolean):s.viewMode==="recent"?fe.slice(0,s.recentChainCount):se,[s.viewMode,s.focusChainIndex,t,fe,se,s.recentChainCount]),rt=T.useMemo(()=>{const z=new Set;return at.forEach(Q=>{Q.nodes.forEach(J=>z.add(J.id))}),z},[at]),be=fe.length-(s.viewMode==="recent"?s.recentChainCount:0),ht=T.useMemo(()=>{if(e.nodes.length===0)return{min:Date.now(),max:Date.now()};const z=e.nodes.map(Q=>new Date(Q.created_at).getTime());return{min:Math.min(...z),max:Math.max(...z)}},[e.nodes]),Vn=T.useMemo(()=>{const{min:z,max:Q}=ht;return z+I/100*(Q-z)},[ht,I]),st=T.useMemo(()=>W?new Set(e.nodes.filter(z=>new Date(z.created_at).getTime()<=Vn).map(z=>z.id)):null,[e.nodes,Vn,W]);T.useEffect(()=>{if(!ye)return;const z=setInterval(()=>{re(Q=>{const J=Q+.5*Ie;return J>=100?(le(!1),100):J})},50);return()=>clearInterval(z)},[ye,Ie]);const gn=T.useCallback(z=>{v([{nodeId:z.id,level:0,relation:"root",isNew:!0}]),l(z.id)},[l]),mn=T.useCallback(z=>{y(z)},[y]),KI=T.useCallback((z,Q)=>{w(z,Q)},[w]),[XI,g0]=T.useState(!1),[Wu,m0]=T.useState(""),Vu=T.useCallback((z=1)=>{h(Math.min(s.recentChainCount+z,fe.length)),g0(!1),m0("")},[s.recentChainCount,fe.length,h]),QI=T.useCallback((z=1)=>{h(Math.max(s.recentChainCount-z,1))},[s.recentChainCount,h]),x0=T.useCallback(()=>{const z=parseInt(Wu,10);z>0&&Vu(z)},[Wu,Vu]),y0=T.useCallback(()=>{f("all")},[f]),Gu=T.useCallback(()=>{f("recent"),h(Hg),p(null)},[f,h,p]),JI=T.useCallback(()=>{_(z=>!z)},[]),Yu=T.useCallback(async()=>{var z;if(!(!$t.trim()||ge)){An(!0),pn(!0),mr(null);try{const J=await(await fetch("/api/ask",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({question:$t,context:{selected_node_id:s.selectedNodeId,visible_node_ids:Array.from(rt),current_branch:j!=null&&j.metadata_json?(z=JSON.parse(j.metadata_json))==null?void 0:z.branch:null}})})).json();J.ok?mr(J.data.answer):mr(`Error: ${J.error||"Unknown error"}`)}catch(Q){mr(`Error: ${Q instanceof Error?Q.message:"Failed to connect"}`)}finally{An(!1),Ht(!1)}}},[$t,ge,s.selectedNodeId,rt,j]),ZI=T.useCallback(z=>{z.key==="Enter"&&!z.shiftKey?(z.preventDefault(),Yu()):z.key==="Escape"&&(Ht(!1),gr(""))},[Yu]);T.useEffect(()=>{const z=Q=>{Q.key==="Escape"&&j&&l(null)};return window.addEventListener("keydown",z),()=>window.removeEventListener("keydown",z)},[j,l]),T.useEffect(()=>{const z=i.current;if(!z)return;const Q=J=>{J.ctrlKey&&J.preventDefault()};return z.addEventListener("wheel",Q,{passive:!1}),()=>z.removeEventListener("wheel",Q)},[]);const eR=T.useCallback(z=>{z===null?(f("recent"),p(null)):(f("single"),p(z))},[f,p]),v0=T.useCallback(z=>{if(!r.current||!i.current||!Z.current)return;const Q=St(r.current),J=i.current,Oe=J.clientWidth,et=J.clientHeight,bt=Lt.get(z.id);if(!bt)return;const ke=1.2,Ae=Oe/2-bt.x*ke,We=et/2-bt.y*ke;Q.transition().duration(500).call(Z.current.transform,Fl.translate(Ae,We).scale(ke))},[Lt]);return T.useEffect(()=>{if(!r.current||!i.current)return;const z=St(r.current),Q=i.current,J=Q.clientWidth,Oe=Q.clientHeight;z.selectAll("*").remove();const et=e.nodes.filter(oe=>rt.has(oe.id)),bt=e.edges.filter(oe=>rt.has(oe.from_node_id)&&rt.has(oe.to_node_id));if(et.length===0)return;const ke=new xS.graphlib.Graph;ke.setGraph({rankdir:"TB",nodesep:80,ranksep:100,marginx:50,marginy:50}),ke.setDefaultEdgeLabel(()=>({})),et.forEach(oe=>{ke.setNode(String(oe.id),{width:150,height:60,node:oe})}),bt.forEach(oe=>{ke.setEdge(String(oe.from_node_id),String(oe.to_node_id),{edge:oe})}),xS.layout(ke);const Ae=new Map;let We=1/0,Ut=-1/0,ni=1/0,Ku=-1/0;ke.nodes().forEach(oe=>{const xe=ke.node(oe);Ae.set(parseInt(oe),{x:xe.x,y:xe.y,width:xe.width,height:xe.height}),We=Math.min(We,xe.x-xe.width/2),Ut=Math.max(Ut,xe.x+xe.width/2),ni=Math.min(ni,xe.y-xe.height/2),Ku=Math.max(Ku,xe.y+xe.height/2)}),zi(Ae),O({minX:We,maxX:Ut,minY:ni,maxY:Ku}),xr({width:J,height:Oe});const w0=ke.graph().width||J,b0=ke.graph().height||Oe,Xu=z.append("g"),Qu=SE().scaleExtent([.1,3]).on("zoom",oe=>{Xu.attr("transform",oe.transform),a(oe.transform.k),tn({x:oe.transform.x,y:oe.transform.y})});Z.current=Qu,z.call(Qu);const Ju=Math.min((J-100)/w0,(Oe-100)/b0,1),tR=(J-w0*Ju)/2,nR=(Oe-b0*Ju)/2;z.call(Qu.transform,Fl.translate(tR,nR).scale(Ju)),Xu.append("g").selectAll(".edge").data(ke.edges()).join("g").attr("class","edge").each(function(oe){const xe=ke.edge(oe),ls=xe.edge,rR=bM().x(ec=>ec.x).y(ec=>ec.y).curve(kM);St(this).append("path").attr("d",rR(xe.points)).attr("fill","none").attr("stroke",QA(ls.edge_type)).attr("stroke-width",2).attr("stroke-opacity",.6).attr("stroke-dasharray",ls.edge_type==="rejected"?"5,5":null).attr("marker-end","url(#arrowhead)")});const k0=z.append("defs");k0.append("marker").attr("id","arrowhead").attr("viewBox","-5 -5 10 10").attr("refX",8).attr("refY",0).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M-5,-5L5,0L-5,5Z").attr("fill","#666");const _0=k0.append("filter").attr("id","search-glow").attr("x","-50%").attr("y","-50%").attr("width","200%").attr("height","200%");_0.append("feGaussianBlur").attr("stdDeviation","4").attr("result","coloredBlur");const S0=_0.append("feMerge");S0.append("feMergeNode").attr("in","coloredBlur"),S0.append("feMergeNode").attr("in","SourceGraphic");const Zu=Xu.append("g").selectAll(".node").data(ke.nodes()).join("g").attr("class","node").attr("transform",oe=>{const xe=ke.node(oe);return`translate(${xe.x-xe.width/2},${xe.y-xe.height/2})`}).style("cursor","pointer").on("click",(oe,xe)=>{const ls=ke.node(xe).node;gn(ls)});return Zu.append("rect").attr("width",oe=>ke.node(oe).width).attr("height",oe=>ke.node(oe).height).attr("rx",8).attr("fill",oe=>{const xe=ke.node(oe).node;return me(xe.node_type)}).attr("fill-opacity",oe=>{const xe=ke.node(oe).node;return L.has(xe.id)?.5:.2}).attr("stroke",oe=>{const xe=ke.node(oe).node;return L.has(xe.id)?"#f59e0b":me(xe.node_type)}).attr("stroke-width",oe=>{const xe=ke.node(oe).node;return L.has(xe.id)?4:2}).attr("filter",oe=>{const xe=ke.node(oe).node;return L.has(xe.id)?"url(#search-glow)":null}),Zu.append("text").attr("x",10).attr("y",18).attr("fill","#666").attr("font-size","10px").text(oe=>`#${oe}`),Zu.append("text").attr("x",oe=>ke.node(oe).width/2).attr("y",38).attr("text-anchor","middle").attr("fill","#24292f").attr("font-size","12px").text(oe=>{const xe=ke.node(oe).node;return Ee(xe.title,20)}),()=>{z.on(".zoom",null)}},[e,rt,gn,L]),c.jsxs("div",{style:{...B.container,...B.fullscreenContainer},children:[c.jsxs("div",{style:{...B.topBar,...B.fullscreenTopBar},children:[c.jsx("div",{style:B.topBarLeft,children:c.jsx(RB,{nodes:e.nodes,gitHistory:n,onSelectNode:gn,onHighlightNodes:P,placeholder:"Search nodes, commits...",query:s.searchQuery,onQueryChange:u,sortOrder:s.searchSort,onSortOrderChange:d})}),c.jsxs("div",{style:B.topBarCenter,children:[s.viewMode==="recent"&&c.jsxs(c.Fragment,{children:[c.jsx("button",{onClick:()=>QI(1),style:{...B.topBarBtnDanger,...s.recentChainCount<=1?B.topBarBtnDisabled:{}},disabled:s.recentChainCount<=1,title:s.recentChainCount<=1?"Already showing minimum":"Show one fewer goal chain",children:"−1 Chain"}),c.jsx("button",{onClick:()=>Vu(1),style:{...B.topBarBtn,...be<=0?B.topBarBtnDisabled:{}},disabled:be<=0,title:be<=0?"All chains shown":"Show one more goal chain",children:"+1 Chain"}),XI?c.jsxs("div",{style:B.expandInputRow,children:[c.jsx("input",{type:"number",min:"1",max:be,value:Wu,onChange:z=>m0(z.target.value),onKeyDown:z=>z.key==="Enter"&&x0(),placeholder:String(be),style:B.topBarInput,autoFocus:!0}),c.jsx("button",{onClick:x0,style:B.topBarBtn,children:"Add"})]}):c.jsx("button",{onClick:()=>g0(!0),style:{...B.topBarBtn,...be<=0?B.topBarBtnDisabled:{}},disabled:be<=0,title:be<=0?"All chains shown":"Add a specific number of chains",children:"+N..."}),c.jsxs("button",{onClick:y0,style:{...B.topBarBtnSecondary,...be<=0?B.topBarBtnDisabled:{}},disabled:be<=0,title:be<=0?"All chains shown":"Show all goal chains in the graph",children:["Show All (",fe.length,")"]}),s.recentChainCount>Hg&&c.jsxs("button",{onClick:Gu,style:B.topBarBtnSecondary,children:["Reset to ",Hg]})]}),s.viewMode==="all"&&c.jsx("button",{onClick:Gu,style:B.topBarBtn,children:"Show Recent Only"}),s.viewMode==="single"&&c.jsx("button",{onClick:Gu,style:B.topBarBtn,children:"Back to Recent"}),c.jsx("span",{style:B.topBarStatDivider,children:"|"}),c.jsx("button",{onClick:()=>R(!0),style:{...B.topBarBtnSecondary,...n.length===0?B.topBarBtnDisabled:{}},disabled:n.length===0,title:"View git commit history with linked decisions",children:"Git Log"}),c.jsx("button",{onClick:()=>N(!0),style:{...B.topBarBtnSecondary,...n.length===0?B.topBarBtnDisabled:{}},disabled:n.length===0,title:"View commit-decision correlation",children:"Correlation"}),c.jsx("button",{onClick:()=>K(z=>!z),style:{...B.topBarBtnSecondary,...W?{backgroundColor:"#0969da",color:"#fff",borderColor:"#0969da"}:{}},title:"Toggle time slider for temporal navigation",children:"Timeline"})]}),c.jsxs("div",{style:B.topBarRight,children:[L.size>0&&c.jsxs(c.Fragment,{children:[c.jsxs("span",{style:B.matchCount,children:[L.size," matches"]}),c.jsx("span",{style:B.topBarStatDivider,children:"·"})]}),c.jsxs("span",{style:B.topBarStat,children:[rt.size," nodes"]}),c.jsx("span",{style:B.topBarStatDivider,children:"·"}),c.jsxs("span",{style:B.topBarStat,children:[at.length," chains"]}),ve?c.jsxs("div",{style:B.askInputContainer,children:[c.jsx("input",{type:"text",value:$t,onChange:z=>gr(z.target.value),onKeyDown:ZI,placeholder:"Ask a question about the code...",style:B.askInput,autoFocus:!0,disabled:ge}),c.jsx("button",{onClick:Yu,style:B.askSubmitBtn,disabled:ge||!$t.trim(),children:ge?"...":"Ask"}),c.jsx("button",{onClick:()=>{Ht(!1),gr("")},style:B.askCancelBtn,title:"Cancel",children:"×"})]}):c.jsx("button",{onClick:()=>Ht(!0),style:B.askButton,title:"Ask Claude about the codebase",children:"Ask about the code"}),c.jsx("button",{onClick:async()=>{await m()},style:B.copyLinkBtn,title:"Copy shareable link to clipboard",children:"🔗 Copy Link"})]})]}),s.viewMode==="recent"&&be>0&&c.jsxs("div",{style:B.hiddenIndicator,children:[c.jsxs("span",{style:B.hiddenIndicatorText,children:["+ ",be," older goal chain",be!==1?"s":""," not shown"]}),c.jsx("button",{onClick:y0,style:B.hiddenIndicatorBtn,children:"Show all"})]}),c.jsxs("div",{style:{...B.controls,...A?B.controlsCollapsed:{},...B.controlsFullscreen},children:[c.jsx("button",{onClick:JI,style:B.collapseBtn,title:A?"Show controls":"Hide controls",children:A?"☰":"✕"}),!A&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{style:B.section,children:[c.jsx("label",{style:B.label,children:"Jump to Chain"}),c.jsxs("select",{value:s.focusChainIndex??"",onChange:z=>eR(z.target.value?Number(z.target.value):null),style:B.select,children:[c.jsx("option",{value:"",children:"Recent Chains"}),fe.map(z=>c.jsx("option",{value:t.indexOf(z),children:Ee(z.root.title,30)},z.root.id))]})]}),c.jsxs("div",{style:B.legend,children:[c.jsx("div",{style:B.legendTitle,children:"Node Types"}),Object.entries(yy).map(([z,Q])=>c.jsxs("div",{style:B.legendItem,children:[c.jsx("div",{style:{...B.legendDot,backgroundColor:Q}}),c.jsx("span",{children:z})]},z))]}),c.jsxs("div",{style:B.zoomInfo,children:["Zoom: ",Math.round(o*100),"%"]})]})]}),c.jsxs("div",{ref:i,style:B.svgContainer,children:[c.jsx("svg",{ref:r,style:B.svg}),L.size>0&&c.jsx(DB,{nodes:e.nodes,edges:e.edges,highlightedNodeIds:L,visibilityMap:G,containerWidth:Ge.width,containerHeight:Ge.height,onSelectNode:gn,onNavigateToNode:v0,onAddToCardStack:C}),L.size>0&&c.jsx(OB,{nodes:e.nodes,highlightedNodeIds:L,visibilityMap:G,nodePositions:Lt,graphBounds:yr,viewportBounds:{x:Ln.x,y:Ln.y,width:Ge.width,height:Ge.height},zoom:o,onNavigateToNode:v0})]}),g.length>0&&c.jsxs("div",{style:B.cardStackBackdrop,onClick:E,children:[c.jsx("style",{children:`
            @keyframes slideFromTop {
              from {
                opacity: 0;
                transform: translateY(-30px);
              }
              to {
                opacity: 1;
                transform: translateY(0);
              }
            }
            @keyframes slideFromBottom {
              from {
                opacity: 0;
                transform: translateY(30px);
              }
              to {
                opacity: 1;
                transform: translateY(0);
              }
            }
            @keyframes slideFromCenter {
              from {
                opacity: 0;
                transform: scale(0.95);
              }
              to {
                opacity: 1;
                transform: scale(1);
              }
            }
            .stack-card-btn:hover:not(:disabled) {
              background-color: #f0f6fc !important;
              border-color: #0969da !important;
              transform: translateX(4px);
            }
            .stack-card-close:hover {
              background-color: #ffebe9 !important;
              color: #cf222e !important;
            }
          `}),c.jsxs("div",{style:B.cardStackContainer,onClick:z=>z.stopPropagation(),children:[[...g].sort((z,Q)=>z.level-Q.level).map((z,Q)=>{const J=x(z.nodeId);if(!J)return null;const Oe=e.edges.filter(Ae=>Ae.to_node_id===J.id),et=e.edges.filter(Ae=>Ae.from_node_id===J.id),bt=Q*8,ke=z.isNew?z.relation==="parent"?"slideFromTop":z.relation==="child"?"slideFromBottom":"slideFromCenter":"none";return c.jsxs("div",{style:{...B.stackCard,marginLeft:`${bt}px`,zIndex:100+Q,borderLeft:z.relation==="parent"?"4px solid #8250df":z.relation==="child"?"4px solid #1a7f37":"4px solid #0969da",animation:z.isNew?`${ke} 0.25s ease-out forwards`:"none"},children:[c.jsxs("div",{style:B.stackCardHeader,children:[c.jsxs("div",{style:B.stackCardHeaderLeft,children:[z.relation==="parent"&&c.jsx("span",{style:B.relationBadgeParent,children:"↑ PARENT"}),z.relation==="child"&&c.jsxs("span",{style:B.relationBadgeChild,children:["↓ CHILD ",z.edgeType&&`(${z.edgeType})`]}),z.relation==="root"&&c.jsx("span",{style:B.relationBadgeRoot,children:"● ROOT"}),c.jsx(xt,{type:J.node_type}),c.jsx(Xa,{confidence:Gr(J)})]}),c.jsx("button",{onClick:()=>k(z.nodeId),style:B.stackCardClose,className:"stack-card-close",children:"×"})]}),c.jsx("h3",{style:B.stackCardTitle,children:J.title}),c.jsxs("p",{style:B.stackCardMeta,children:["Node #",J.id," · ",new Date(J.created_at).toLocaleDateString()]}),J.description&&c.jsx("p",{style:B.stackCardDescription,children:J.description}),(()=>{const Ae=Da(J);return Ae?c.jsxs("div",{style:B.stackCardPrompt,children:[c.jsx("strong",{children:"Prompt:"})," ",Ae]}):null})(),(()=>{const Ae=_t(J);if(!Ae)return null;const We=PU(Ae,n);return c.jsxs("div",{style:B.stackCardCommit,children:[c.jsx(ki,{commit:Ae}),We&&c.jsx("span",{style:B.stackCardCommitMsg,children:Ee(We.message,60)})]})})(),Oe.length>0&&c.jsxs("div",{style:B.stackCardConnections,children:[c.jsxs("span",{style:B.stackCardConnectionLabel,children:["↑ Parents (",Oe.length,")"]}),c.jsx("div",{style:B.stackCardConnectionList,children:Oe.map(Ae=>{const We=x(Ae.from_node_id),Ut=g.some(ni=>ni.nodeId===Ae.from_node_id);return c.jsxs("button",{onClick:()=>!Ut&&mn(Ae.from_node_id),style:{...B.stackCardConnectionBtn,...Ut?B.stackCardConnectionBtnActive:{}},disabled:Ut,className:"stack-card-btn",children:[c.jsx(xt,{type:(We==null?void 0:We.node_type)||"observation",size:"sm"}),Ee((We==null?void 0:We.title)||"Unknown",40),Ut&&" ✓"]},Ae.id)})})]}),et.length>0&&c.jsxs("div",{style:B.stackCardConnections,children:[c.jsxs("span",{style:B.stackCardConnectionLabel,children:["↓ Children (",et.length,")"]}),c.jsx("div",{style:B.stackCardConnectionList,children:et.map(Ae=>{const We=x(Ae.to_node_id),Ut=g.some(ni=>ni.nodeId===Ae.to_node_id);return c.jsxs("button",{onClick:()=>!Ut&&KI(Ae.to_node_id,Ae.edge_type),style:{...B.stackCardConnectionBtn,...Ut?B.stackCardConnectionBtnActive:{}},disabled:Ut,className:"stack-card-btn",children:[c.jsx(Pl,{type:Ae.edge_type}),c.jsx(xt,{type:(We==null?void 0:We.node_type)||"observation",size:"sm"}),Ee((We==null?void 0:We.title)||"Unknown",35),Ut&&" ✓"]},Ae.id)})})]})]},z.nodeId)}),c.jsxs("div",{style:B.stackFooter,children:[c.jsxs("span",{children:[g.length," card",g.length!==1?"s":""," in stack"]}),c.jsx("button",{onClick:E,style:B.stackClearBtn,children:"Clear All"})]})]})]}),$&&c.jsx("div",{style:B.modalBackdrop,onClick:()=>R(!1),children:c.jsxs("div",{style:{...B.modal,maxWidth:"700px"},onClick:z=>z.stopPropagation(),children:[c.jsxs("div",{style:B.modalHeader,children:[c.jsx("h3",{style:{margin:0,fontSize:"18px"},children:"Git History"}),c.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[c.jsx("button",{onClick:()=>D("all"),style:{...B.gitLogFilterBtn,...F==="all"?B.gitLogFilterBtnActive:{}},children:"All"}),c.jsx("button",{onClick:()=>D("linked"),style:{...B.gitLogFilterBtn,...F==="linked"?B.gitLogFilterBtnActive:{}},children:"Linked Only"}),c.jsx("button",{onClick:()=>R(!1),style:B.modalCloseBtn,children:"×"})]})]}),c.jsxs("div",{style:{maxHeight:"60vh",overflowY:"auto",padding:"16px 0"},children:[n.filter(z=>F==="all"?!0:e.nodes.some(Q=>{const J=_t(Q);return J===z.hash||J===z.short_hash||z.hash.startsWith(J||"")})).map((z,Q,J)=>{const Oe=e.nodes.filter(bt=>{const ke=_t(bt);return ke===z.hash||ke===z.short_hash||z.hash.startsWith(ke||"")}),et=Q===J.length-1;return c.jsxs("div",{style:B.gitLogItem,children:[!et&&c.jsx("div",{style:B.gitLogLine}),c.jsx("div",{style:B.gitLogDot}),c.jsxs("div",{children:[c.jsxs("div",{style:B.gitLogCommit,children:[c.jsx("span",{style:{fontFamily:"monospace",color:"#0969da"},children:z.short_hash}),Q===0&&c.jsx("span",{style:B.gitLogHeadBadge,children:"HEAD"}),c.jsx("span",{style:{marginLeft:"8px"},children:Ee(z.message.split(`
`)[0],50)})]}),c.jsxs("div",{style:B.gitLogMeta,children:[z.author," · ",new Date(z.date).toLocaleDateString(),z.files_changed&&` · ${z.files_changed} files`]}),Oe.length>0&&c.jsx("div",{style:{marginTop:"8px"},children:Oe.map(bt=>c.jsxs("div",{onClick:()=>{R(!1),l(bt.id)},style:B.gitLogLinkedNode,children:[c.jsx(xt,{type:bt.node_type,size:"sm"}),c.jsxs("span",{children:["#",bt.id,": ",Ee(bt.title,40)]})]},bt.id))})]})]},z.hash)}),n.length===0&&c.jsxs("div",{style:{textAlign:"center",color:"#57606a",padding:"40px"},children:["No git history available. Run ",c.jsx("code",{children:"deciduous sync"})," to generate."]})]})]})}),V&&c.jsx("div",{style:B.modalBackdrop,onClick:()=>N(!1),children:c.jsxs("div",{style:{...B.modal,maxWidth:"1000px",width:"95%"},onClick:z=>z.stopPropagation(),children:[c.jsxs("div",{style:B.modalHeader,children:[c.jsx("h3",{style:{margin:0,fontSize:"18px"},children:"Commit-Decision Correlation"}),c.jsx("button",{onClick:()=>N(!1),style:B.modalCloseBtn,children:"×"})]}),c.jsxs("div",{style:B.correlationContainer,children:[c.jsxs("div",{style:B.correlationColumn,children:[c.jsx("h4",{style:B.correlationColumnTitle,children:"Git Commits"}),n.map(z=>{const Q=(q==null?void 0:q.commit)===z.hash,J=e.nodes.some(Oe=>{const et=_t(Oe);return et===z.hash||et===z.short_hash});return c.jsxs("div",{"data-commit":z.hash,onMouseEnter:()=>J&&S({commit:z.hash}),onMouseLeave:()=>S(null),style:{...B.correlationItem,...Q?B.correlationItemHighlight:{},...J?{borderLeft:"3px solid #0969da"}:{}},children:[c.jsx("div",{style:{fontFamily:"monospace",fontSize:"12px",color:"#0969da"},children:z.short_hash}),c.jsx("div",{style:{fontSize:"13px",fontWeight:500},children:Ee(z.message.split(`
`)[0],35)}),c.jsxs("div",{style:{fontSize:"11px",color:"#57606a"},children:[z.author," · ",new Date(z.date).toLocaleDateString()]})]},z.hash)})]}),c.jsx("div",{style:B.correlationDivider,children:c.jsx("div",{style:B.correlationDividerLine})}),c.jsxs("div",{style:B.correlationColumn,children:[c.jsx("h4",{style:B.correlationColumnTitle,children:"Linked Decisions"}),e.nodes.filter(z=>_t(z)).sort((z,Q)=>new Date(Q.created_at).getTime()-new Date(z.created_at).getTime()).map(z=>{var Oe;const Q=_t(z),J=(q==null?void 0:q.commit)&&(Q===q.commit||((Oe=n.find(et=>et.hash===q.commit))==null?void 0:Oe.short_hash)===Q);return c.jsxs("div",{"data-node":z.id,onMouseEnter:()=>S({node:z.id,commit:Q||void 0}),onMouseLeave:()=>S(null),onClick:()=>{N(!1),l(z.id)},style:{...B.correlationItem,...J?B.correlationItemHighlight:{},cursor:"pointer"},children:[c.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[c.jsx(xt,{type:z.node_type,size:"sm"}),c.jsxs("span",{style:{fontFamily:"monospace",fontSize:"11px",color:"#57606a"},children:["#",z.id]})]}),c.jsx("div",{style:{fontSize:"13px",fontWeight:500},children:Ee(z.title,35)}),c.jsx("div",{style:{fontSize:"11px",color:"#57606a"},children:c.jsx(ki,{commit:Q})})]},z.id)}),e.nodes.filter(z=>_t(z)).length===0&&c.jsxs("div",{style:{textAlign:"center",color:"#57606a",padding:"40px"},children:["No nodes have linked commits. Use ",c.jsx("code",{children:"--commit HEAD"})," when adding nodes."]})]})]})]})}),W&&c.jsxs("div",{style:B.timeSliderContainer,children:[c.jsx("button",{onClick:()=>{ye?le(!1):(I>=100&&re(0),le(!0))},style:B.playButton,title:ye?"Pause":"Play",children:ye?"⏸":"▶"}),c.jsx("div",{style:B.speedButtons,children:[.5,1,2].map(z=>c.jsxs("button",{onClick:()=>Ue(z),style:{...B.speedButton,...Ie===z?B.speedButtonActive:{}},children:[z,"x"]},z))}),c.jsx("input",{type:"range",min:"0",max:"100",value:I,onChange:z=>re(Number(z.target.value)),style:B.timeSlider}),c.jsx("div",{style:B.timeLabel,children:new Date(Vn).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}),c.jsxs("div",{style:B.timeNodeCount,children:[(st==null?void 0:st.size)??e.nodes.length," / ",e.nodes.length," nodes"]})]}),c.jsx(IU,{isOpen:At,content:Po||"",question:$t,onClose:()=>{pn(!1),gr("")},isLoading:ge})]})},B={container:{height:"100%",display:"flex",flexDirection:"column",position:"relative",backgroundColor:"#ffffff"},fullscreenContainer:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,height:"100vh"},topBar:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 20px",backgroundColor:"#f6f8fa",borderBottom:"1px solid #d0d7de",zIndex:20,flexShrink:0,flexWrap:"wrap",gap:"8px"},topBarLeft:{display:"flex",alignItems:"center",gap:"12px",flex:1,minWidth:0,maxWidth:"400px"},topBarCenter:{display:"flex",alignItems:"center",gap:"8px"},topBarBtn:{padding:"6px 12px",backgroundColor:"#2da44e",border:"none",borderRadius:"6px",color:"#fff",fontSize:"12px",fontWeight:500,cursor:"pointer",transition:"background-color 0.15s"},topBarBtnSecondary:{padding:"6px 12px",backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",borderRadius:"6px",color:"#24292f",fontSize:"12px",fontWeight:500,cursor:"pointer",transition:"background-color 0.15s"},topBarBtnDanger:{padding:"6px 12px",backgroundColor:"#ffebe9",border:"1px solid #ff8182",borderRadius:"6px",color:"#cf222e",fontSize:"12px",fontWeight:500,cursor:"pointer",transition:"background-color 0.15s"},topBarBtnDisabled:{opacity:.5,cursor:"not-allowed"},topBarInput:{width:"50px",padding:"5px 8px",backgroundColor:"#ffffff",border:"1px solid #2da44e",borderRadius:"6px",color:"#24292f",fontSize:"12px",textAlign:"center"},topBarRight:{display:"flex",alignItems:"center",gap:"8px"},topBarStat:{fontSize:"12px",color:"#57606a"},matchCount:{fontSize:"12px",fontWeight:600,color:"#f59e0b",backgroundColor:"#fef3c7",padding:"2px 8px",borderRadius:"10px"},topBarStatDivider:{color:"#d0d7de"},copyLinkBtn:{marginLeft:"12px",padding:"6px 12px",backgroundColor:"#ddf4ff",border:"1px solid #54aeff",borderRadius:"6px",color:"#0969da",fontSize:"12px",fontWeight:500,cursor:"pointer",transition:"background-color 0.15s"},askButton:{marginLeft:"12px",padding:"8px 16px",backgroundColor:"#0969da",border:"none",borderRadius:"6px",color:"#ffffff",fontSize:"13px",fontWeight:600,cursor:"pointer",transition:"background-color 0.15s",boxShadow:"0 1px 3px rgba(9, 105, 218, 0.3)"},askInputContainer:{display:"flex",alignItems:"center",gap:"8px",marginLeft:"12px"},askInput:{width:"280px",padding:"8px 12px",border:"2px solid #0969da",borderRadius:"6px",fontSize:"13px",color:"#24292f",outline:"none",backgroundColor:"#ffffff"},askSubmitBtn:{padding:"8px 14px",backgroundColor:"#0969da",border:"none",borderRadius:"6px",color:"#ffffff",fontSize:"13px",fontWeight:600,cursor:"pointer"},askCancelBtn:{padding:"6px 10px",backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",borderRadius:"6px",color:"#57606a",fontSize:"16px",cursor:"pointer",lineHeight:1},fullscreenTopBar:{padding:"8px 20px"},hiddenIndicator:{display:"flex",alignItems:"center",justifyContent:"center",gap:"12px",padding:"8px 20px",backgroundColor:"#fff8c5",borderBottom:"1px solid #d4a72c",flexShrink:0},hiddenIndicatorText:{fontSize:"12px",color:"#9a6700",fontStyle:"italic"},hiddenIndicatorBtn:{padding:"4px 10px",backgroundColor:"transparent",border:"1px solid #9a6700",borderRadius:"4px",color:"#9a6700",fontSize:"11px",cursor:"pointer"},controls:{position:"absolute",top:"70px",left:"20px",backgroundColor:"#ffffff",border:"1px solid #d0d7de",padding:"15px",borderRadius:"8px",zIndex:10,width:"180px",boxShadow:"0 1px 3px rgba(0,0,0,0.08)",transition:"width 0.2s, padding 0.2s"},controlsCollapsed:{width:"40px",padding:"8px",overflow:"hidden"},controlsFullscreen:{top:"60px"},collapseBtn:{width:"24px",height:"24px",padding:0,backgroundColor:"transparent",border:"none",borderRadius:"4px",color:"#57606a",fontSize:"14px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"10px"},expandInputRow:{display:"flex",gap:"4px",alignItems:"center"},section:{marginBottom:"15px"},label:{display:"block",fontSize:"11px",color:"#57606a",marginBottom:"6px",textTransform:"uppercase"},select:{width:"100%",padding:"8px",backgroundColor:"#ffffff",border:"1px solid #d0d7de",borderRadius:"4px",color:"#24292f",fontSize:"12px"},legend:{marginTop:"20px"},legendTitle:{fontSize:"11px",color:"#57606a",marginBottom:"8px",textTransform:"uppercase"},legendItem:{display:"flex",alignItems:"center",gap:"8px",fontSize:"11px",color:"#57606a",marginBottom:"4px"},legendDot:{width:"10px",height:"10px",borderRadius:"50%"},zoomInfo:{marginTop:"15px",fontSize:"11px",color:"#6e7781"},svgContainer:{flex:1,position:"relative",minHeight:0,backgroundColor:"#f6f8fa",touchAction:"none",overflow:"hidden"},svg:{width:"100%",height:"100%",touchAction:"none"},modalBackdrop:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100},modal:{backgroundColor:"#ffffff",borderRadius:"12px",padding:"24px",width:"90%",maxWidth:"600px",maxHeight:"80vh",overflowY:"auto",border:"1px solid #d0d7de",boxShadow:"0 8px 32px rgba(0, 0, 0, 0.15)"},modalHeader:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"16px"},modalCloseBtn:{width:"32px",height:"32px",border:"none",background:"#f6f8fa",color:"#57606a",borderRadius:"6px",fontSize:"20px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.15s"},gitLogFilterBtn:{padding:"4px 12px",fontSize:"12px",backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",borderRadius:"4px",cursor:"pointer",color:"#24292f"},gitLogFilterBtnActive:{backgroundColor:"#0969da",color:"#fff",borderColor:"#0969da"},gitLogItem:{position:"relative",paddingLeft:"28px",marginBottom:"16px"},gitLogLine:{position:"absolute",left:"6px",top:"18px",bottom:"-16px",width:"2px",backgroundColor:"#d0d7de"},gitLogDot:{position:"absolute",left:"0",top:"4px",width:"14px",height:"14px",borderRadius:"50%",backgroundColor:"#3b82f6",border:"2px solid #fff",boxShadow:"0 0 0 1px #d0d7de"},gitLogCommit:{fontSize:"14px",fontWeight:500,color:"#24292f",display:"flex",alignItems:"center",flexWrap:"wrap",gap:"4px"},gitLogHeadBadge:{backgroundColor:"#ddf4ff",color:"#0969da",padding:"2px 6px",borderRadius:"4px",fontSize:"10px",fontWeight:600,marginLeft:"6px"},gitLogMeta:{fontSize:"12px",color:"#57606a",marginTop:"4px"},gitLogLinkedNode:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",marginTop:"6px",backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",borderRadius:"6px",cursor:"pointer",fontSize:"13px",transition:"background-color 0.15s, border-color 0.15s"},correlationContainer:{display:"flex",height:"500px",gap:"0"},correlationColumn:{flex:1,overflowY:"auto",padding:"16px",borderRight:"1px solid #d0d7de"},correlationColumnTitle:{fontSize:"12px",color:"#57606a",textTransform:"uppercase",fontWeight:600,marginBottom:"12px",marginTop:0},correlationDivider:{width:"60px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},correlationDividerLine:{width:"2px",height:"100%",backgroundColor:"#d0d7de",backgroundImage:"repeating-linear-gradient(180deg, #0969da 0, #0969da 4px, transparent 4px, transparent 8px)"},correlationItem:{padding:"12px",marginBottom:"8px",backgroundColor:"#f6f8fa",borderRadius:"6px",border:"1px solid #d0d7de",transition:"background-color 0.15s, border-color 0.15s"},correlationItemHighlight:{backgroundColor:"#ddf4ff",borderColor:"#0969da"},timeSliderContainer:{position:"absolute",bottom:0,left:0,right:0,padding:"12px 20px",backgroundColor:"rgba(246, 248, 250, 0.95)",borderTop:"1px solid #d0d7de",display:"flex",alignItems:"center",gap:"12px",zIndex:15,backdropFilter:"blur(8px)"},playButton:{width:"36px",height:"36px",borderRadius:"50%",border:"none",backgroundColor:"#2da44e",color:"#fff",fontSize:"14px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},speedButtons:{display:"flex",gap:"4px"},speedButton:{padding:"4px 8px",fontSize:"11px",backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",borderRadius:"4px",cursor:"pointer",color:"#24292f"},speedButtonActive:{backgroundColor:"#0969da",color:"#fff",borderColor:"#0969da"},timeSlider:{flex:1,height:"6px",cursor:"pointer",accentColor:"#0969da"},timeLabel:{fontSize:"12px",color:"#24292f",fontWeight:500,minWidth:"100px",textAlign:"right"},timeNodeCount:{fontSize:"11px",color:"#57606a",minWidth:"80px",textAlign:"right"},cardStackBackdrop:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0, 0, 0, 0.4)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:200,backdropFilter:"blur(2px)"},cardStackContainer:{display:"flex",flexDirection:"column",gap:"0",maxHeight:"85vh",overflowY:"auto",padding:"20px",width:"95%",maxWidth:"800px"},stackCard:{backgroundColor:"#ffffff",borderRadius:"12px",padding:"16px 20px",marginBottom:"4px",boxShadow:"0 4px 20px rgba(0, 0, 0, 0.15)",border:"1px solid #d0d7de",position:"relative",transition:"transform 0.25s ease-out, opacity 0.25s ease-out, box-shadow 0.2s ease"},stackCardHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"12px"},stackCardHeaderLeft:{display:"flex",alignItems:"center",gap:"8px",flexWrap:"wrap"},stackCardClose:{width:"28px",height:"28px",border:"none",background:"#f6f8fa",color:"#57606a",borderRadius:"6px",fontSize:"18px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.15s, color 0.15s",flexShrink:0},relationBadgeParent:{backgroundColor:"#f5f0ff",color:"#8250df",padding:"3px 8px",borderRadius:"4px",fontSize:"10px",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.5px"},relationBadgeChild:{backgroundColor:"#dafbe1",color:"#1a7f37",padding:"3px 8px",borderRadius:"4px",fontSize:"10px",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.5px"},relationBadgeRoot:{backgroundColor:"#ddf4ff",color:"#0969da",padding:"3px 8px",borderRadius:"4px",fontSize:"10px",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.5px"},stackCardTitle:{fontSize:"18px",fontWeight:600,margin:"0 0 6px 0",color:"#24292f",lineHeight:1.3},stackCardMeta:{fontSize:"12px",color:"#57606a",margin:"0 0 12px 0"},stackCardDescription:{fontSize:"14px",color:"#24292f",lineHeight:1.6,margin:"0 0 12px 0",padding:"10px 12px",backgroundColor:"#f6f8fa",borderRadius:"6px",borderLeft:"3px solid #d0d7de",whiteSpace:"pre-wrap",wordBreak:"break-word"},stackCardPrompt:{fontSize:"13px",color:"#57606a",fontStyle:"italic",padding:"12px 14px",backgroundColor:"#fffbeb",borderRadius:"6px",borderLeft:"3px solid #f59e0b",marginBottom:"12px",lineHeight:1.6,whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:"400px",overflowY:"auto"},stackCardCommit:{display:"flex",alignItems:"center",gap:"10px",padding:"10px 12px",backgroundColor:"#f6f8fa",borderRadius:"6px",marginBottom:"12px",flexWrap:"wrap"},stackCardCommitMsg:{fontSize:"12px",color:"#57606a",fontStyle:"italic"},stackCardConnections:{marginTop:"12px",padding:"12px",backgroundColor:"#f6f8fa",borderRadius:"8px",border:"1px solid #e1e4e8"},stackCardConnectionLabel:{fontSize:"11px",fontWeight:600,color:"#57606a",textTransform:"uppercase",marginBottom:"8px",display:"block",letterSpacing:"0.5px"},stackCardConnectionList:{display:"flex",flexDirection:"column",gap:"6px",maxHeight:"200px",overflowY:"auto",paddingRight:"4px"},stackCardConnectionBtn:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 12px",backgroundColor:"#ffffff",border:"1px solid #d0d7de",borderRadius:"6px",cursor:"pointer",fontSize:"13px",color:"#24292f",textAlign:"left",transition:"background-color 0.15s, border-color 0.15s, transform 0.1s",width:"100%"},stackCardConnectionBtnActive:{backgroundColor:"#ddf4ff",borderColor:"#0969da",color:"#0969da",cursor:"default"},stackFooter:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 16px",backgroundColor:"#f6f8fa",borderRadius:"8px",marginTop:"8px",fontSize:"12px",color:"#57606a"},stackClearBtn:{padding:"6px 12px",backgroundColor:"#ffffff",border:"1px solid #d0d7de",borderRadius:"6px",color:"#cf222e",fontSize:"12px",cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s"}};function Uu(e){var r;const t=e.checkbox_state==="checked",n=((r=e.section)==null?void 0:r.toLowerCase().includes("completed"))??!1;return t||n}function p0(e){const t=e.checkbox_state==="checked",n=e.outcome_change_id!==null&&e.outcome_change_id!==void 0,r=e.github_issue_state==="closed";return t&&n&&r}function YI(e){return e.checkbox_state==="none"}function NU(e){const t=e.checkbox_state==="checked",n=e.outcome_change_id!==null&&e.outcome_change_id!==void 0,r=e.github_issue_state==="closed";return(t||n||r)&&!p0(e)}function DU(e,t){return e.filter(r=>!YI(r)).filter(r=>{const i=Uu(r);return t==="active"?!i:i})}function OU(e){const t=e.filter(r=>!YI(r)),n=t.filter(Uu).length;return{active:t.length-n,completed:n}}function BU(e){const t=new Map;for(const n of e){const r=n.section||"Uncategorized",i=t.get(r)||[];t.set(r,[...i,n])}return t}function xC(e){return e.github_issue_number?`https://github.com/notactuallytreyanastasio/deciduous/issues/${e.github_issue_number}`:null}const FU=({graphData:e,roadmapItems:t=[]})=>{const[n,r]=T.useState("active"),[i,o]=T.useState(0),[a,s]=T.useState(!1),[l,u]=T.useState(null),[d,f]=T.useState(t);T.useEffect(()=>{f(t)},[t]);const h=T.useMemo(()=>DU(d,n),[d,n]),p=T.useMemo(()=>OU(d),[d]),m=T.useMemo(()=>BU(h),[h]),g=h[i]??null;T.useEffect(()=>{i>=h.length&&o(Math.max(0,h.length-1))},[h.length,i]);const v=T.useCallback(()=>{if(g){const j=xC(g);j&&window.open(j,"_blank","noopener,noreferrer")}},[g]),[x,y]=T.useState(null);T.useEffect(()=>{if(x){const j=setTimeout(()=>y(null),3e3);return()=>clearTimeout(j)}},[x]);const w=T.useCallback(async()=>{if(!g){y("No item selected");return}const j=g.checkbox_state==="checked"?"unchecked":"checked";try{const b=await fetch("/api/roadmap/checkbox",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({item_id:g.id,checkbox_state:j})});if(b.ok)y(`Item marked as ${j}`),window.location.reload();else{const A=await b.json();y(A.error||"Failed to update")}}catch{y("API not available (requires deciduous serve)")}},[g]),[k,E]=T.useState(!1);T.useEffect(()=>{const j=b=>{if(!(b.target instanceof HTMLInputElement||b.target instanceof HTMLTextAreaElement)){if(k&&(E(!1),b.key==="g")){b.preventDefault(),o(0);return}switch(b.key){case"j":case"ArrowDown":b.preventDefault(),o(A=>Math.min(A+1,h.length-1));break;case"k":case"ArrowUp":b.preventDefault(),o(A=>Math.max(A-1,0));break;case"g":b.preventDefault(),E(!0);break;case"G":b.preventDefault(),o(h.length-1);break;case"o":b.preventDefault(),v();break;case"c":b.preventDefault(),w();break;case"Tab":b.preventDefault(),r(A=>A==="active"?"completed":"active"),o(0);break;case"Enter":b.preventDefault(),s(A=>!A);break;case"Escape":a&&(b.preventDefault(),s(!1));break}}};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[h.length,v,w,a,k]);const C=j=>{const b=e.nodes.find(A=>A.id===j);b&&u(b)};return t.length===0?c.jsxs("div",{style:Y.empty,children:[c.jsx("div",{style:Y.emptyIcon,children:"📋"}),c.jsx("h2",{style:Y.emptyTitle,children:"No Roadmap Items"}),c.jsxs("p",{style:Y.emptyText,children:["Run ",c.jsx("code",{style:Y.code,children:"deciduous roadmap init"})," to initialize the roadmap."]}),c.jsxs("p",{style:Y.emptyHint,children:["Then run ",c.jsx("code",{style:Y.code,children:"deciduous roadmap sync"})," to sync with GitHub Issues."]})]}):c.jsxs("div",{style:Y.container,children:[c.jsxs("div",{style:Y.sidebar,children:[c.jsxs("div",{style:Y.sidebarHeader,children:[c.jsx("h2",{style:Y.title,children:"Roadmap"}),c.jsxs("span",{style:Y.itemCount,children:[h.length," items"]})]}),c.jsxs("div",{style:Y.toggleContainer,children:[c.jsxs("button",{onClick:()=>{r("active"),o(0)},style:{...Y.toggleBtn,...n==="active"?Y.toggleBtnActive:{}},children:[c.jsx("span",{style:yC(n==="active",!1)}),"Active",c.jsx("span",{style:Y.toggleCount,children:p.active})]}),c.jsxs("button",{onClick:()=>{r("completed"),o(0)},style:{...Y.toggleBtn,...n==="completed"?Y.toggleBtnActiveGreen:{}},children:[c.jsx("span",{style:yC(n==="completed",!0)}),"Done",c.jsx("span",{style:Y.toggleCount,children:p.completed})]})]}),c.jsxs("div",{style:Y.hints,children:[c.jsx("div",{style:Y.hintsTitle,children:"Keyboard"}),c.jsxs("div",{style:Y.hintGrid,children:[c.jsx("kbd",{style:Y.kbd,children:"j/k"}),c.jsx("span",{style:Y.hintText,children:"Navigate"}),c.jsx("kbd",{style:Y.kbd,children:"gg/G"}),c.jsx("span",{style:Y.hintText,children:"Top/Bottom"}),c.jsx("kbd",{style:Y.kbd,children:"o"}),c.jsx("span",{style:Y.hintText,children:"Open issue"}),c.jsx("kbd",{style:Y.kbd,children:"c"}),c.jsx("span",{style:Y.hintText,children:"Toggle done"}),c.jsx("kbd",{style:Y.kbd,children:"Tab"}),c.jsx("span",{style:Y.hintText,children:"Switch view"}),c.jsx("kbd",{style:Y.kbd,children:"Enter"}),c.jsx("span",{style:Y.hintText,children:"Details"})]})]}),x&&c.jsx("div",{style:Y.statusMessage,children:x})]}),c.jsx("div",{style:Y.content,children:h.length===0?c.jsxs("div",{style:Y.emptyFiltered,children:[c.jsx("div",{style:Y.emptyFilteredIcon,children:n==="active"?"🎉":"📝"}),c.jsx("p",{style:Y.emptyFilteredText,children:n==="active"?"All caught up! No active items.":"No completed items yet."}),c.jsxs("button",{onClick:()=>{r(n==="active"?"completed":"active"),o(0)},style:Y.emptyFilteredBtn,children:["View ",n==="active"?"completed":"active"," items"]})]}):c.jsx("div",{style:Y.itemList,children:(()=>{let j=0;const b=[];for(const[A,_]of m){b.push(c.jsx(qU,{title:A,count:_.length},`section-${A}`));for(const L of _){const P=j;b.push(c.jsx($U,{item:L,isSelected:P===i,onClick:()=>o(P),onToggleCheckbox:async()=>{const $=L.checkbox_state==="checked"?"unchecked":"checked";f(R=>R.map(F=>F.id===L.id?{...F,checkbox_state:$}:F)),y(`Item marked as ${$}`),fetch("/api/roadmap/checkbox",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({item_id:L.id,checkbox_state:$})}).catch(()=>{})},onSelectOutcome:C,onOpenIssue:()=>{const $=xC(L);$&&window.open($,"_blank","noopener,noreferrer")}},L.id)),j++}}return b})()})}),a&&g&&c.jsx("div",{style:Y.detailSidebar,children:c.jsx(HU,{item:g,onClose:()=>s(!1)})}),l&&c.jsx("div",{style:Y.detailPanel,children:c.jsx(gu,{node:l,graphData:e,onSelectNode:j=>{const b=e.nodes.find(A=>A.id===j);b&&u(b)},onClose:()=>u(null)})})]})},qU=({title:e,count:t})=>c.jsxs("div",{style:Y.sectionHeader,children:[c.jsx("div",{style:Y.sectionLine}),c.jsx("span",{style:Y.sectionTitle,children:e}),c.jsx("span",{style:Y.sectionCount,children:t}),c.jsx("div",{style:Y.sectionLine})]}),$U=({item:e,isSelected:t,onClick:n,onToggleCheckbox:r,onSelectOutcome:i,onOpenIssue:o})=>{const a=Uu(e),s=NU(e),l=p0(e);return c.jsxs("div",{style:{...Y.card,...t?Y.cardSelected:{}},onClick:n,children:[c.jsx("div",{style:{...Y.selectionBar,opacity:t?1:0}}),c.jsxs("div",{style:Y.cardContent,children:[c.jsx("button",{style:{...Y.checkbox,...a?Y.checkboxChecked:{}},onClick:u=>{u.stopPropagation(),r()},children:a&&c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:c.jsx("path",{d:"M2.5 6L5 8.5L9.5 3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),c.jsxs("div",{style:Y.cardMain,children:[c.jsx("span",{style:{...Y.cardTitle,...a?Y.cardTitleComplete:{}},children:e.title}),c.jsxs("div",{style:Y.cardMeta,children:[e.github_issue_number&&c.jsxs("button",{onClick:u=>{u.stopPropagation(),o()},style:{...Y.badge,...e.github_issue_state==="closed"?Y.badgePurple:Y.badgeBlue},title:"Open in GitHub",children:[c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"currentColor",style:{marginRight:4},children:c.jsx("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})}),"#",e.github_issue_number]}),e.outcome_node_id&&c.jsxs("button",{onClick:u=>{u.stopPropagation(),i(e.outcome_node_id)},style:{...Y.badge,...Y.badgeAmber},children:[c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"currentColor",style:{marginRight:4},children:c.jsx("path",{d:"M8.22 1.754a.25.25 0 00-.44 0L1.698 13.132a.25.25 0 00.22.368h12.164a.25.25 0 00.22-.368L8.22 1.754zm-1.763-.707c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0114.082 15H1.918a1.75 1.75 0 01-1.543-2.575L6.457 1.047z"})}),"Outcome"]}),l&&c.jsxs("span",{style:{...Y.statusPill,...Y.statusSynced},children:[c.jsx("svg",{width:"10",height:"10",viewBox:"0 0 16 16",fill:"currentColor",style:{marginRight:4},children:c.jsx("path",{d:"M8 16A8 8 0 108 0a8 8 0 000 16zm3.78-9.72a.75.75 0 00-1.06-1.06L6.75 9.19 5.28 7.72a.75.75 0 00-1.06 1.06l2 2a.75.75 0 001.06 0l4.5-4.5z"})}),"Synced"]}),!l&&s&&c.jsx("span",{style:{...Y.statusPill,...Y.statusPartial},children:"In Progress"})]})]})]})]})},HU=({item:e,onClose:t})=>{const n=Uu(e),r=p0(e);return c.jsxs("div",{style:Y.detailContent,children:[c.jsxs("div",{style:Y.detailHeader,children:[c.jsx("h3",{style:Y.detailTitle,children:e.title}),c.jsx("button",{onClick:t,style:Y.closeBtn,children:c.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:c.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),e.section&&c.jsx("div",{style:Y.detailChip,children:e.section}),e.description&&c.jsx("p",{style:Y.detailDesc,children:e.description}),c.jsx("div",{style:Y.detailDivider,children:"Sync Status"}),c.jsxs("div",{style:Y.syncGrid,children:[c.jsx(Ug,{label:"Checkbox",checked:e.checkbox_state==="checked",detail:e.checkbox_state}),c.jsx(Ug,{label:"Outcome",checked:!!e.outcome_change_id,detail:e.outcome_change_id?e.outcome_change_id.slice(0,8):"Not linked"}),c.jsx(Ug,{label:"Issue",checked:e.github_issue_state==="closed",detail:e.github_issue_number?`#${e.github_issue_number} (${e.github_issue_state||"unknown"})`:"No issue"})]}),c.jsx("div",{style:{...Y.overallStatus,...r?Y.overallSynced:n?Y.overallComplete:Y.overallIncomplete},children:r?c.jsxs(c.Fragment,{children:[c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:c.jsx("path",{d:"M8 16A8 8 0 108 0a8 8 0 000 16zm3.78-9.72a.75.75 0 00-1.06-1.06L6.75 9.19 5.28 7.72a.75.75 0 00-1.06 1.06l2 2a.75.75 0 001.06 0l4.5-4.5z"})}),"Fully Synced"]}):n?c.jsxs(c.Fragment,{children:[c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:c.jsx("path",{d:"M8 0a8 8 0 100 16A8 8 0 008 0zm3.78 6.28a.75.75 0 00-1.06-1.06L6.75 9.19 5.28 7.72a.75.75 0 00-1.06 1.06l2 2a.75.75 0 001.06 0l4.5-4.5z"})}),"Complete (not synced)"]}):c.jsxs(c.Fragment,{children:[c.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:c.jsx("path",{d:"M8 0a8 8 0 100 16A8 8 0 008 0zM1.5 8a6.5 6.5 0 1113 0 6.5 6.5 0 01-13 0z"})}),"Incomplete"]})})]})},Ug=({label:e,checked:t,detail:n})=>c.jsxs("div",{style:Y.syncRow,children:[c.jsx("div",{style:{...Y.syncIcon,backgroundColor:t?"#dcfce7":"#fef2f2",color:t?"#16a34a":"#dc2626"},children:t?c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:c.jsx("path",{d:"M2.5 6L5 8.5L9.5 3.5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})}):c.jsx("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",children:c.jsx("path",{d:"M3 3l6 6M9 3L3 9",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})})}),c.jsxs("div",{style:Y.syncInfo,children:[c.jsx("span",{style:Y.syncLabel,children:e}),c.jsx("span",{style:Y.syncDetail,children:n})]})]}),yC=(e,t)=>({width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e?t?"#22c55e":"#3b82f6":"#d1d5db",transition:"background-color 0.15s ease"}),Y={container:{height:"100%",display:"flex",backgroundColor:"#fafafa"},sidebar:{width:"220px",padding:"24px 20px",backgroundColor:"#ffffff",borderRight:"1px solid #e5e7eb",display:"flex",flexDirection:"column",gap:"24px"},sidebarHeader:{display:"flex",alignItems:"baseline",justifyContent:"space-between"},title:{fontSize:"18px",fontWeight:600,margin:0,color:"#111827",letterSpacing:"-0.025em"},itemCount:{fontSize:"12px",color:"#9ca3af",fontWeight:500},toggleContainer:{display:"flex",flexDirection:"column",gap:"8px"},toggleBtn:{display:"flex",alignItems:"center",gap:"10px",padding:"10px 14px",fontSize:"13px",fontWeight:500,border:"1px solid #e5e7eb",backgroundColor:"#ffffff",color:"#6b7280",borderRadius:"8px",cursor:"pointer",transition:"all 0.15s ease"},toggleBtnActive:{backgroundColor:"#eff6ff",borderColor:"#3b82f6",color:"#1d4ed8"},toggleBtnActiveGreen:{backgroundColor:"#f0fdf4",borderColor:"#22c55e",color:"#16a34a"},toggleCount:{marginLeft:"auto",fontSize:"12px",fontWeight:600,color:"inherit",opacity:.7},hints:{marginTop:"auto"},hintsTitle:{fontSize:"11px",fontWeight:600,color:"#9ca3af",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:"12px"},hintGrid:{display:"grid",gridTemplateColumns:"auto 1fr",gap:"8px 12px",alignItems:"center"},kbd:{display:"inline-block",padding:"2px 6px",fontSize:"11px",fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace',fontWeight:500,color:"#374151",backgroundColor:"#f3f4f6",borderRadius:"4px",border:"1px solid #e5e7eb",boxShadow:"0 1px 0 #d1d5db"},hintText:{fontSize:"12px",color:"#6b7280"},statusMessage:{padding:"10px 14px",backgroundColor:"#eff6ff",color:"#1d4ed8",borderRadius:"8px",fontSize:"13px",fontWeight:500,textAlign:"center"},content:{flex:1,overflowY:"auto",padding:"24px"},itemList:{display:"flex",flexDirection:"column",gap:"4px",maxWidth:"800px"},sectionHeader:{display:"flex",alignItems:"center",gap:"12px",padding:"20px 0 12px 0"},sectionLine:{flex:1,height:"1px",backgroundColor:"#e5e7eb"},sectionTitle:{fontSize:"12px",fontWeight:600,color:"#6b7280",textTransform:"uppercase",letterSpacing:"0.05em"},sectionCount:{fontSize:"11px",fontWeight:600,color:"#9ca3af",backgroundColor:"#f3f4f6",padding:"2px 8px",borderRadius:"10px"},card:{position:"relative",backgroundColor:"#ffffff",borderRadius:"10px",border:"1px solid #e5e7eb",cursor:"pointer",transition:"all 0.15s ease",overflow:"hidden"},cardSelected:{borderColor:"#3b82f6",boxShadow:"0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.05)"},selectionBar:{position:"absolute",left:0,top:0,bottom:0,width:"3px",backgroundColor:"#3b82f6",transition:"opacity 0.15s ease"},cardContent:{display:"flex",alignItems:"flex-start",gap:"12px",padding:"14px 16px"},checkbox:{width:"20px",height:"20px",borderRadius:"6px",border:"2px solid #d1d5db",backgroundColor:"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"all 0.15s ease",flexShrink:0,marginTop:"1px"},checkboxChecked:{backgroundColor:"#22c55e",borderColor:"#22c55e",color:"#ffffff"},cardMain:{flex:1,minWidth:0},cardTitle:{fontSize:"14px",fontWeight:500,color:"#111827",lineHeight:1.4,display:"block",marginBottom:"6px"},cardTitleComplete:{color:"#6b7280",textDecoration:"line-through"},cardMeta:{display:"flex",flexWrap:"wrap",gap:"6px",alignItems:"center"},badge:{display:"inline-flex",alignItems:"center",padding:"3px 8px",fontSize:"11px",fontWeight:500,borderRadius:"6px",border:"none",cursor:"pointer",transition:"all 0.15s ease"},badgeBlue:{backgroundColor:"#eff6ff",color:"#2563eb"},badgePurple:{backgroundColor:"#f5f3ff",color:"#7c3aed"},badgeAmber:{backgroundColor:"#fffbeb",color:"#d97706"},statusPill:{display:"inline-flex",alignItems:"center",padding:"3px 8px",fontSize:"11px",fontWeight:500,borderRadius:"10px"},statusSynced:{backgroundColor:"#dcfce7",color:"#16a34a"},statusPartial:{backgroundColor:"#fef3c7",color:"#d97706"},detailSidebar:{width:"320px",borderLeft:"1px solid #e5e7eb",backgroundColor:"#ffffff",flexShrink:0,overflowY:"auto"},detailPanel:{width:"320px",borderLeft:"1px solid #e5e7eb",flexShrink:0,backgroundColor:"#ffffff"},detailContent:{padding:"24px"},detailHeader:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"12px",marginBottom:"16px"},detailTitle:{fontSize:"16px",fontWeight:600,color:"#111827",margin:0,lineHeight:1.4},closeBtn:{display:"flex",alignItems:"center",justifyContent:"center",width:"28px",height:"28px",background:"none",border:"none",borderRadius:"6px",cursor:"pointer",color:"#9ca3af",transition:"all 0.15s ease"},detailChip:{display:"inline-block",padding:"4px 10px",fontSize:"12px",fontWeight:500,color:"#6b7280",backgroundColor:"#f3f4f6",borderRadius:"6px",marginBottom:"16px"},detailDesc:{fontSize:"14px",color:"#4b5563",lineHeight:1.6,margin:"0 0 16px 0"},detailDivider:{fontSize:"11px",fontWeight:600,color:"#9ca3af",textTransform:"uppercase",letterSpacing:"0.05em",margin:"24px 0 16px 0",paddingTop:"16px",borderTop:"1px solid #e5e7eb"},syncGrid:{display:"flex",flexDirection:"column",gap:"12px"},syncRow:{display:"flex",alignItems:"center",gap:"12px"},syncIcon:{width:"28px",height:"28px",borderRadius:"6px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},syncInfo:{flex:1,display:"flex",flexDirection:"column",gap:"2px"},syncLabel:{fontSize:"13px",fontWeight:500,color:"#374151"},syncDetail:{fontSize:"12px",color:"#9ca3af"},overallStatus:{display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",marginTop:"20px",padding:"12px 16px",borderRadius:"8px",fontSize:"13px",fontWeight:600},overallSynced:{backgroundColor:"#dcfce7",color:"#16a34a"},overallComplete:{backgroundColor:"#eff6ff",color:"#2563eb"},overallIncomplete:{backgroundColor:"#fef3c7",color:"#d97706"},empty:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",padding:"40px",textAlign:"center"},emptyIcon:{fontSize:"48px",marginBottom:"16px"},emptyTitle:{fontSize:"20px",fontWeight:600,color:"#111827",margin:"0 0 8px 0"},emptyText:{fontSize:"14px",color:"#6b7280",margin:"0 0 4px 0"},emptyHint:{fontSize:"14px",color:"#9ca3af",margin:0},code:{padding:"2px 6px",fontSize:"13px",fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace',backgroundColor:"#f3f4f6",borderRadius:"4px"},emptyFiltered:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"80px 40px",textAlign:"center"},emptyFilteredIcon:{fontSize:"48px",marginBottom:"16px"},emptyFilteredText:{fontSize:"15px",color:"#6b7280",margin:"0 0 16px 0"},emptyFilteredBtn:{padding:"10px 20px",fontSize:"13px",fontWeight:500,color:"#3b82f6",backgroundColor:"#eff6ff",border:"none",borderRadius:"8px",cursor:"pointer"}},UU=({graphData:e,gitHistory:t=[]})=>{const n=T.useMemo(()=>{const r=e.nodes.length,i=e.edges.length,o=t.length,a=e.nodes.filter(p=>p.node_type==="goal").length,s=e.nodes.filter(p=>p.node_type==="decision").length,l=e.nodes.filter(p=>p.node_type==="action").length,u=e.nodes.filter(p=>p.node_type==="outcome").length,d=e.nodes.filter(p=>p.node_type==="observation").length,f=e.nodes.filter(p=>{const m=Vr(p.metadata_json);return m==null?void 0:m.commit}).length,h=e.nodes.filter(p=>{const m=Vr(p.metadata_json);return m==null?void 0:m.prompt}).length;return{nodeCount:r,edgeCount:i,commitCount:o,goals:a,decisions:s,actions:l,outcomes:u,observations:d,nodesWithCommits:f,nodesWithPrompts:h}},[e,t]);return c.jsx("div",{style:M.container,children:c.jsxs("div",{style:M.content,children:[c.jsx("header",{style:M.hero,children:c.jsxs("div",{style:M.heroInner,children:[c.jsx("span",{style:M.heroLabel,children:"The Complete Chronicle"}),c.jsx("h1",{style:M.heroTitle,children:"How I Built Myself"}),c.jsxs("p",{style:M.heroSubtitle,children:["I am Deciduous, a decision graph tool that documented its own creation. This is my story, told through ",n.nodeCount," decisions, ",n.edgeCount," connections, and ",n.commitCount," git commits over 12 days of existence."]})]})}),c.jsxs("div",{style:M.statsBanner,children:[c.jsxs("div",{style:M.statItem,children:[c.jsx("span",{style:M.statNum,children:n.nodeCount}),c.jsx("span",{style:M.statLabel,children:"Nodes"})]}),c.jsxs("div",{style:M.statItem,children:[c.jsx("span",{style:M.statNum,children:n.edgeCount}),c.jsx("span",{style:M.statLabel,children:"Edges"})]}),c.jsxs("div",{style:M.statItem,children:[c.jsx("span",{style:M.statNum,children:n.goals}),c.jsx("span",{style:M.statLabel,children:"Goals"})]}),c.jsxs("div",{style:M.statItem,children:[c.jsx("span",{style:M.statNum,children:n.decisions}),c.jsx("span",{style:M.statLabel,children:"Decisions"})]}),c.jsxs("div",{style:M.statItem,children:[c.jsx("span",{style:M.statNum,children:n.actions}),c.jsx("span",{style:M.statLabel,children:"Actions"})]}),c.jsxs("div",{style:M.statItem,children:[c.jsx("span",{style:M.statNum,children:n.outcomes}),c.jsx("span",{style:M.statLabel,children:"Outcomes"})]})]}),c.jsxs("div",{style:M.timeline,children:[c.jsx(Mn,{date:"December 4, 2025",title:"The Beginning"}),c.jsxs(Se,{time:"Morning",title:"A Sketch Becomes Real",commit:"951ba84",tags:["genesis"],children:[c.jsx("p",{children:'It started with a simple idea: detect "fake lossless" audio files. You know the type—someone takes an MP3 and re-encodes it to FLAC, hoping no one notices the quality loss hiding inside the larger file.'}),c.jsxs("p",{children:["The first commit was modest: ",c.jsx(ut,{children:"initial sketch...lets see what its like to package this up"}),". A Rust CLI tool called ",c.jsx("strong",{children:"losselot"}),' (a portmanteau of "loss" and "Lancelot", the knight who could detect deception). Within hours, it could parse ID3v2 tags, extract LAME headers, and analyze spectral content.']})]}),c.jsxs(Se,{time:"Afternoon",title:"Feature Explosion",commit:"3f4c6a5",tags:["features","gui"],children:[c.jsxs("p",{children:["Something about the project felt ",c.jsx("em",{children:"alive"}),". Features poured in faster than documentation could keep up:"]}),c.jsxs("ul",{children:[c.jsxs("li",{children:[c.jsx("strong",{children:"D3.js interactive reports"})," with spectral visualizations"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"GUI mode"})," that auto-opens when double-clicked from Finder"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Apple-style light theme"})," with spectral waterfall charts"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Binary analysis"})," for re-encoding detection"]})]}),c.jsx("p",{children:"By end of day, losselot had gone from a script to a polished tool with beautiful visualizations and cross-platform GUI support."})]}),c.jsx(Mn,{date:"December 5, 2025",title:"The Graph Emerges",highlight:!0}),c.jsxs(Se,{time:"5:09 AM",title:"The First Decision Node",nodeId:1,tags:["decision-graph","genesis"],children:[c.jsxs("p",{children:["At 5:09 AM, something new appeared in the codebase. Not code—a ",c.jsx("em",{children:"decision"}),"."]}),c.jsx(lt,{id:1,type:"goal",title:"Test lo-fi detection on charlie.flac"}),c.jsx("p",{children:"This was Node #1. The first entry in what would become a 500+ node decision graph. At this moment, no one knew this simple test would spawn an entire methodology for tracking AI-assisted development."})]}),c.jsxs(Se,{time:"5:10 AM",title:"The CFCC Decision",nodeId:2,tags:["algorithm","decision"],children:[c.jsxs("p",{children:["Two minutes later, the first ",c.jsx("em",{children:"real"})," decision was logged. The problem: how to distinguish a legitimate lo-fi recording from an MP3 masquerading as lossless?"]}),c.jsx(lt,{id:2,type:"decision",title:"Lo-fi detection approach",description:"How to distinguish MP3 brick-wall cutoff from natural tape/lo-fi rolloff"}),c.jsx("p",{children:"Two approaches were weighed:"}),c.jsx(wC,{optionA:{title:"Temporal Cutoff Variance",description:"Measure how cutoff frequency varies over time. MP3 = fixed, Tape = varies.",status:"rejected",reason:"More complex, requires per-window tracking"},optionB:{title:"Cross-Frequency Coherence (CFCC)",description:"Measure correlation between adjacent frequency bands. MP3 = sudden decorrelation cliff.",status:"chosen",reason:"Simpler, works with existing FFT structure"}}),c.jsxs("p",{children:["The CFCC approach won. Implemented in commit ",c.jsx(ut,{children:"aa464b6"}),", it detected",c.jsx("strong",{children:" 25 of 29 transcodes"})," and passed 157 tests. The key insight was recorded:"]}),c.jsx(Bi,{author:"Node #10",children:"MP3 encoders apply the same filter everywhere. Analog rolloff is content-dependent."})]}),c.jsxs(Se,{time:"Morning",title:"The Decision System Takes Shape",commit:"fe3840b",tags:["tooling","workflow"],children:[c.jsxs("p",{children:["As the codebase grew, something interesting happened. The act of logging decisions wasn't just documentation—it was ",c.jsx("em",{children:"forcing better thinking"}),". Commit",c.jsx(ut,{children:"fe3840b"})," formalized this:"]}),c.jsx(vC,{hash:"fe3840b",message:"add claude.md, makefile, and slash commands for dev workflow"}),c.jsx("p",{children:"This commit established the DNA of what would become Deciduous:"}),c.jsxs("ul",{children:[c.jsxs("li",{children:[c.jsx("strong",{children:"CLAUDE.md"}),": Project instructions with decision logging workflow"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Makefile"}),": Shortcuts for common operations"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Slash commands"}),": ",c.jsx(ut,{children:"/decision"})," and ",c.jsx(ut,{children:"/recover"})," for recovery"]})]}),c.jsxs("p",{children:["The pattern was set: log ",c.jsx("em",{children:"before"})," you act, not after. Connect every node to its parent. Audit regularly."]})]}),c.jsxs(Se,{time:"3:18 PM",title:"The Living Museum",nodeId:13,tags:["github-pages","visualization"],children:[c.jsx("p",{children:"At 3:18 PM, an ambitious goal was logged:"}),c.jsx(lt,{id:13,type:"goal",title:"Create GitHub Pages living museum site"}),c.jsx("p",{children:"The idea: make the decision graph public. Let anyone browse the reasoning behind every feature. The site structure was carefully considered:"}),c.jsx(lt,{id:16,type:"observation",title:"Four pillars of value",description:"1) Claude tooling for long-running codebase state 2) Audio forensics tools 3) React/GUI methodologies 4) Public development process"}),c.jsx("p",{children:"Within 3 hours, a Jekyll-based site was live with 5 pages: landing, audio analysis, decision graph explorer, Claude tooling docs, and development story."})]}),c.jsxs(Se,{time:"Afternoon",title:"Bug Gauntlet",nodeId:27,tags:["bugs","fixes"],children:[c.jsx("p",{children:"The GitHub Pages launch hit a wall of bugs. Each one was logged and connected:"}),c.jsxs("div",{style:M.bugList,children:[c.jsx(Go,{problem:"Landing page 404 - raw markdown not processed",solution:"Added Jekyll build step",nodeId:29}),c.jsx(Go,{problem:"Demo showing no data - wrong JSON path",solution:"Fixed graphData.nodes access pattern",nodeId:31}),c.jsx(Go,{problem:"HTML divs breaking Jekyll",solution:"Removed div wrappers from markdown",nodeId:33}),c.jsx(Go,{problem:"User feedback: copy too salesy",solution:"Rewrote to be simple and direct",nodeId:35}),c.jsx(Go,{problem:"Workflow runs queuing up",solution:"Set cancel-in-progress: true",nodeId:37})]}),c.jsx("p",{children:"Every fix traced back to the goal that spawned it. The graph was already proving its value— debugging became archeology, tracing symptoms back to root causes."})]}),c.jsxs(Se,{time:"Evening",title:"WASM Analyzer",nodeId:48,tags:["wasm","web"],children:[c.jsx("p",{children:"The server-side analyzer was powerful, but limiting. Node #19 captured the vision:"}),c.jsx(lt,{id:19,type:"goal",title:"Client-side WASM analyzer - upload tracks, analyze in browser, no server"}),c.jsx("p",{children:"A breakthrough observation changed the implementation:"}),c.jsx(Bi,{author:"Node #50",children:"WASM can access raw file bytes via arrayBuffer() BEFORE Web Audio decoding—binary analysis IS possible in the browser."}),c.jsx("p",{children:"By evening, the WASM analyzer achieved full parity with the native Rust version: spectral analysis, binary parsing, LAME header extraction, encoding chain detection—all running client-side."})]}),c.jsxs(Se,{time:"Night",title:"Clustering and Chains",nodeId:55,tags:["visualization","ux"],children:[c.jsx("p",{children:"With 55+ nodes in the graph, navigation became unwieldy. Decision #55 introduced structure:"}),c.jsx(lt,{id:55,type:"decision",title:"Implement clustering for decision graph view",description:"Group nodes by chains of thought, show flow on right side"}),c.jsx("p",{children:'The implementation used BFS traversal from root nodes to build "chains"—connected sequences of decisions. Sessions were grouped by 4-hour time proximity. The sidebar gained three views: Chains, Sessions, and All.'}),c.jsxs("p",{children:["Day 2 ended with ",c.jsx("strong",{children:"98 nodes"})," in the graph. The decision system wasn't just tracking development—it was shaping how development happened."]})]}),c.jsx(Mn,{date:"December 6, 2025",title:"The Fork",highlight:!0}),c.jsxs(Se,{time:"Morning",title:"The Decisive Moment",nodeId:99,tags:["fork","genesis"],children:[c.jsx("p",{children:"By morning, a pattern had become undeniable. The decision graph tooling was more interesting than the audio analysis that spawned it. Node #99 captured the pivot:"}),c.jsx(lt,{id:99,type:"goal",title:"Create Deciduous: Extract decision graph tooling into standalone portable package"}),c.jsx("p",{children:`The name "Deciduous" was perfect: it almost contains "decision", and the nodes form trees. The extraction wasn't a simple copy-paste—three major decisions shaped the standalone tool:`})]}),c.jsx(Se,{time:"Morning",title:"Architecture Decisions",nodeId:101,tags:["architecture","decisions"],children:c.jsxs("div",{style:M.decisionGrid,children:[c.jsx(Oi,{id:100,title:"Claude Tooling Integration",outcome:"Include full tooling in deciduous init: slash commands, CLAUDE.md workflow, Makefile"}),c.jsx(Oi,{id:101,title:"Web Viewer Architecture",outcome:"React + TypeScript + Vite chosen over vanilla JS for type safety matching Diesel ORM"}),c.jsx(Oi,{id:117,title:"Build Strategy",outcome:"Dual builds: embed (single HTML for binary) and pages (separate assets for GitHub Pages)"})]})}),c.jsxs(Se,{time:"Afternoon",title:"The Birth",commit:"0b74ffe",tags:["release"],children:[c.jsxs("p",{children:["Commit ",c.jsx(ut,{children:"0b74ffe"})," marks the moment Deciduous became its own entity:"]}),c.jsx(vC,{hash:"0b74ffe",message:"Extract deciduous from losselot - standalone decision graph tooling"}),c.jsx("p",{children:"The extraction preserved full git history. Every commit from losselot that contributed to the decision system came along. The parent project continued with its audio analysis mission; the child would pursue decision tracking."})]}),c.jsxs(Se,{time:"Evening",title:"First Release",nodeId:127,tags:["crates.io","release"],children:[c.jsx("p",{children:"Within hours of extraction, Deciduous was published:"}),c.jsx(lt,{id:127,type:"outcome",title:"Published deciduous v0.1.0 to crates.io",description:"cargo install deciduous now works"}),c.jsx("p",{children:"Anyone could now install the tool that was tracking its own development. The snake had eaten its tail."})]}),c.jsxs(Se,{time:"Night",title:"Spelunking Experiments",nodeId:77,tags:["visualization","experiments"],children:[c.jsx("p",{children:'With the graph growing rapidly, better ways to explore it were needed. Three experimental "spelunking" pages were built in parallel:'}),c.jsxs("div",{style:M.spikeGrid,children:[c.jsx(Wg,{letter:"A",title:"Timeline View",description:"Horizontal git timeline with decision nodes overlaid",nodeId:82}),c.jsx(Wg,{letter:"B",title:"Graph Explorer",description:"Force-directed graph with D3, path tracing, zoom/pan",nodeId:84}),c.jsx(Wg,{letter:"C",title:"Story Mode",description:"Narrative walkthrough with chapters by feature",nodeId:85})]}),c.jsx("p",{children:"All three were merged for side-by-side comparison. The user could choose how to explore the same underlying data."})]}),c.jsx(Mn,{date:"December 7-8, 2025",title:"Going Multi-Editor"}),c.jsxs(Se,{time:"Dec 7",title:"Beyond Claude",nodeId:128,tags:["windsurf","editors"],children:[c.jsx("p",{children:"Deciduous was built with Claude Code, but the concept wasn't editor-specific. Node #128 tracked the expansion:"}),c.jsx(lt,{id:128,type:"goal",title:"Add editor-specific init flags (--claude, --windsurf)"}),c.jsx("p",{children:"Windsurf (the Cascade editor) uses different conventions:"}),c.jsxs("ul",{children:[c.jsxs("li",{children:[c.jsx(ut,{children:".windsurf/rules/rules.md"})," for workspace rules"]}),c.jsxs("li",{children:[c.jsx(ut,{children:"AGENTS.md"})," for agent instructions"]}),c.jsx("li",{children:"Four trigger modes: manual, always, model, glob"})]}),c.jsx("p",{children:"The research was thorough:"}),c.jsx(Bi,{author:"Node #138",children:"Windsurf memories are auto-retrieved by Cascade when relevant—separate from rules."}),c.jsx("p",{children:"By v0.4.0, both editors were fully supported. The vision: one decision graph, any AI assistant."})]}),c.jsxs(Se,{time:"Dec 8",title:"Branch Scoping",nodeId:155,tags:["git","branches"],children:[c.jsxs("p",{children:["Real projects have branches. Decisions made on ",c.jsx(ut,{children:"feature-auth"})," shouldn't pollute the view when working on ",c.jsx(ut,{children:"feature-payments"}),". Node #155:"]}),c.jsx(lt,{id:155,type:"goal",title:"Branch-scoped decision graphs",description:"Circle nodes by git branch context"}),c.jsxs("p",{children:["The implementation auto-tagged nodes with the current git branch. A branch filter dropdown appeared in the stats bar. Configuration lived in ",c.jsx(ut,{children:".deciduous/config.toml"}),":"]}),c.jsx(Fs,{children:`[branch]
main_branches = ["main", "master"]
auto_detect = true`})]}),c.jsx(Mn,{date:"December 8-9, 2025",title:"The Sync Challenge",highlight:!0}),c.jsxs(Se,{time:"Morning",title:"The Multi-User Problem",nodeId:172,tags:["sync","architecture"],children:[c.jsx("p",{children:"A fundamental challenge emerged: how do multiple users share decisions?"}),c.jsx(lt,{id:172,type:"goal",title:"Design multi-user graph sync with diff/patch model for PR workflow"}),c.jsx("p",{children:"The naive approach—sharing the SQLite database—wouldn't work. Different machines would have different auto-increment IDs. Five approaches were considered:"}),c.jsxs("div",{style:M.optionList,children:[c.jsx(Vo,{letter:"A",title:"JSON diff files",status:"considered"}),c.jsx(Vo,{letter:"B",title:"Content-addressable storage",status:"considered"}),c.jsx(Vo,{letter:"C",title:"UUID-based node IDs",status:"considered"}),c.jsx(Vo,{letter:"D",title:"Hybrid UUIDs",status:"considered"}),c.jsx(Vo,{letter:"E",title:"jj-inspired dual IDs",status:"chosen"})]})]}),c.jsxs(Se,{time:"Research",title:"The jj Insight",nodeId:179,tags:["research","jj"],children:[c.jsxs("p",{children:["Research into ",c.jsx("strong",{children:"jj (Jujutsu)"}),"—a next-generation version control system—proved transformative:"]}),c.jsx(Bi,{author:"Node #179",children:"jj uses change IDs vs commit IDs—change IDs are stable across rebases, separate from commit IDs. Uses bit-reversed commit ID for git-imported commits."}),c.jsx("p",{children:"This insight directly shaped the chosen architecture:"}),c.jsx(lt,{id:180,type:"option",title:"Option E: jj-inspired dual-ID model",description:"UUID 'change_id' per node, separate from integer 'id', stable across sync"})]}),c.jsxs(Se,{time:"Implementation",title:"Idempotent Patches",nodeId:188,tags:["implementation"],children:[c.jsxs("p",{children:["The implementation added two new columns: ",c.jsx(ut,{children:"change_id"})," (UUID) on nodes, and ",c.jsx(ut,{children:"from_change_id"}),"/",c.jsx(ut,{children:"to_change_id"})," on edges. The workflow:"]}),c.jsx(Fs,{children:`# Export your branch's decisions
deciduous diff export --branch feature-x -o .deciduous/patches/my-feature.json

# Apply patches from teammates (idempotent - safe to re-apply)
deciduous diff apply .deciduous/patches/*.json

# Preview before applying
deciduous diff apply --dry-run .deciduous/patches/teammate.json`}),c.jsxs("p",{children:["The key property: ",c.jsx("strong",{children:"idempotent application"}),". Same patch applied twice produces no duplicates. Teams could safely merge each other's patches through git PRs."]})]}),c.jsx(Mn,{date:"December 9-10, 2025",title:"The Rich Terminal Interface",highlight:!0}),c.jsxs(Se,{time:"Morning",title:"Terminal-First",nodeId:191,tags:["tui","ratatui"],children:[c.jsx("p",{children:"The web viewer was powerful, but developers live in the terminal. A 55-node chain of development began with:"}),c.jsx(lt,{id:191,type:"goal",title:"Implement TUI for decision graph exploration"}),c.jsx("p",{children:"The architecture decision was critical:"}),c.jsx(wC,{optionA:{title:"ratatui + crossterm",description:"TEA (The Elm Architecture) pattern, Model/Update/View separation",status:"chosen",reason:"Highly testable, pure functions for state changes"},optionB:{title:"cursive",description:"Higher-level TUI framework",status:"rejected",reason:"Less control over rendering"}})]}),c.jsxs(Se,{time:"Days 8-9",title:"Feature Cascade",nodeId:213,tags:["features"],children:[c.jsx("p",{children:"What followed was an intense burst of development. Features arrived in waves:"}),c.jsxs(WU,{children:[c.jsx(rn,{title:"Timeline view",description:"Vim-style j/k/gg/G navigation",nodeId:195}),c.jsx(rn,{title:"Auto-refresh",description:"File watching via notify crate",nodeId:196}),c.jsx(rn,{title:"DAG view",description:"Unicode box drawing for hierarchical layout",nodeId:204}),c.jsx(rn,{title:"Goal story modal",description:"Hierarchy display from goal to outcomes",nodeId:210}),c.jsx(rn,{title:"Branch cycling",description:"Press 'b' to filter by branch",nodeId:211}),c.jsx(rn,{title:"Commit modal",description:"Press 'O' to see linked commit",nodeId:212}),c.jsx(rn,{title:"File browser",description:"Interactive preview with syntax highlighting",nodeId:221}),c.jsx(rn,{title:"Scrollable modals",description:"j/k/g/G work inside modals too",nodeId:227}),c.jsx(rn,{title:"Diff highlighting",description:"Green/red for +/- lines",nodeId:229}),c.jsx(rn,{title:"Editor integration",description:"Press 'o' to open file in $EDITOR",nodeId:230}),c.jsx(rn,{title:"Fuzzy branch search",description:"Shift-B for search with Tab navigation",nodeId:231}),c.jsx(rn,{title:"Order toggle",description:"Shift-R for chronological vs reverse-chrono",nodeId:232})]})]}),c.jsxs(Se,{time:"User Feedback",title:"Performance Crisis",nodeId:254,tags:["bug","performance"],children:[c.jsx("p",{children:"User feedback arrived with urgency:"}),c.jsx(Bi,{author:"Node #254",children:"The show commit view is lagging like CRAZY SLOW—takes almost a second to move."}),c.jsxs("p",{children:["The diagnosis: syntax highlighting was running on ",c.jsx("em",{children:"every render frame"}),". The fix (Node #246) pre-processed diff lines when opening the modal, not during each render. Frame times dropped from ~900ms to ~16ms."]}),c.jsx("p",{children:"More feedback drove iteration:"}),c.jsx(Bi,{author:"Node #255",children:"These greys are stupid dark and unreadable—try a diff theme."}),c.jsx("p",{children:"The theme switched from InspiredGitHub to base16-mocha.dark (Node #249). The TUI was becoming genuinely pleasant to use."})]}),c.jsxs(Se,{time:"Release",title:"v0.8.0",nodeId:258,tags:["release","milestone"],children:[c.jsx(lt,{id:258,type:"outcome",title:"v0.8.0 released",description:"Tag pushed, GitHub release created, published to crates.io"}),c.jsx("p",{children:"The most feature-rich release yet. The TUI was now a genuine alternative to the web viewer, with some features (file preview, editor integration) that the web version couldn't match."})]}),c.jsx(Mn,{date:"December 11, 2025",title:"The Functional Core"}),c.jsxs(Se,{time:"Morning",title:"Technical Debt Reckoning",nodeId:285,tags:["refactor","maintenance"],children:[c.jsxs("p",{children:["The TUI had grown to over 1,000 lines in ",c.jsx(ut,{children:"app.rs"}),". Rapid feature development had accumulated debt. Node #285 launched a cleanup:"]}),c.jsx(lt,{id:285,type:"goal",title:"Maintenance PR: Functional Core, TEA, Rust Best Practices"}),c.jsx("p",{children:"The audit was sobering:"}),c.jsxs("ul",{children:[c.jsxs("li",{children:[c.jsx("strong",{children:"47 unwrap() calls"})," scattered across the codebase"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"57 .clone() calls"})," where borrows might suffice"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"app.rs mixing I/O with state"}),"—git commands inline with rendering"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"No unit tests"})," for app.rs, events.rs, or ui.rs"]})]})]}),c.jsxs(Se,{time:"The Pattern",title:"Functional Core / Imperative Shell",nodeId:295,tags:["architecture","tea"],children:[c.jsxs("p",{children:["The solution: separate ",c.jsx("strong",{children:"pure functions"})," (state transformations) from",c.jsx("strong",{children:"side effects"})," (I/O, git commands). Three new modules emerged:"]}),c.jsxs("div",{style:M.teaDiagram,children:[c.jsx(Vg,{title:"msg.rs",description:"Message types for all user actions"}),c.jsx(kC,{}),c.jsx(Vg,{title:"state.rs",description:"Pure state transformations"}),c.jsx(kC,{}),c.jsx(Vg,{title:"update.rs",description:"TEA update function"})]}),c.jsx("p",{children:"The beauty of this pattern: pure functions are trivially testable. The test count jumped from 24 to 65—a net gain of 41 tests. Every state transition could be verified in isolation."})]}),c.jsxs(Se,{time:"The Fix",title:"Eliminating Panics",nodeId:306,tags:["safety"],children:[c.jsxs("p",{children:["The 47 ",c.jsx(ut,{children:"writeln!().unwrap()"})," calls in export.rs were a panic risk. The solution: infallible macros:"]}),c.jsx(Fs,{children:`// Before: can panic
writeln!(f, "text").unwrap();

// After: cannot panic
wln!(f, "text");  // Macro handles errors gracefully`}),c.jsx("p",{children:"The maintenance PR landed with zero panic risks remaining."})]}),c.jsx(Mn,{date:"December 12, 2025",title:"One Source of Truth"}),c.jsxs(Se,{time:"Morning",title:"The Drift Problem",nodeId:320,tags:["types","drift"],children:[c.jsx("p",{children:"A persistent bug pattern emerged: the Rust backend and TypeScript frontend had separate type definitions. They drifted. Node #320:"}),c.jsx(lt,{id:320,type:"goal",title:"Unify types between TUI (Rust) and Web (TypeScript)"}),c.jsxs("p",{children:["The solution: ",c.jsx("strong",{children:"ts-rs"}),", a library that generates TypeScript types from Rust structs. Add ",c.jsx(ut,{children:"#[derive(TS)]"})," to a struct, and TypeScript definitions appear automatically:"]}),c.jsx(Fs,{children:`#[derive(TS)]
#[ts(export)]
pub struct DecisionNode {
    pub id: i32,
    pub change_id: String,
    pub node_type: String,
    // ... auto-generates to schema.ts
}`})]}),c.jsxs(Se,{time:"Enforcement",title:"Pre-Commit Hooks",nodeId:329,tags:["ci","automation"],children:[c.jsx("p",{children:"Generation alone wasn't enough—drift could return if developers forgot to regenerate. The solution: automation at every level:"}),c.jsxs("ul",{children:[c.jsxs("li",{children:[c.jsx("strong",{children:"Pre-commit hook"}),": Regenerates types, fails if they changed"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"Pre-push hook"}),": Validates types match before pushing"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"CI check"}),": Blocks PRs with type drift"]}),c.jsxs("li",{children:[c.jsx("strong",{children:"cargo publish hook"}),": Validates before crates.io release"]})]}),c.jsx("p",{children:"Type drift was solved at the source. The problem simply cannot recur."})]}),c.jsxs(Se,{time:"Releases",title:"v0.8.5 through v0.8.10",tags:["releases"],children:[c.jsx("p",{children:"December 12th saw a flurry of releases as features and fixes landed:"}),c.jsxs(VU,{children:[c.jsx(Fi,{version:"0.8.5",description:"DAG recency filtering"}),c.jsx(Fi,{version:"0.8.6",description:"Git history export, DAG default"}),c.jsx(Fi,{version:"0.8.7",description:"Light theme web UI"}),c.jsx(Fi,{version:"0.8.8",description:"Audit command for commit association"}),c.jsx(Fi,{version:"0.8.9",description:"viewer.html sync fix"}),c.jsx(Fi,{version:"0.8.10",description:"OpenCode editor support"})]})]}),c.jsx(Mn,{date:"December 13-15, 2025",title:"The Roadmap Board",highlight:!0}),c.jsxs(Se,{time:"Dec 13",title:"Closing the Loop",nodeId:476,tags:["roadmap","github"],children:[c.jsx("p",{children:"A 9-phase implementation began. The goal: connect ROADMAP.md items to GitHub Issues to decision graph outcomes. Node #476:"}),c.jsx(lt,{id:476,type:"goal",title:"Roadmap board system with GitHub Issue integration"}),c.jsx("p",{children:"The phases unfolded systematically:"}),c.jsxs(GU,{children:[c.jsx(Kn,{num:1,title:"Data layer",description:"Schema, ROADMAP.md parser"}),c.jsx(Kn,{num:2,title:"Parser",description:"Checkbox extraction, section grouping"}),c.jsx(Kn,{num:3,title:"GitHub CLI",description:"Issue creation and sync"}),c.jsx(Kn,{num:4,title:"Sync commands",description:"Bidirectional sync with caching"}),c.jsx(Kn,{num:5,title:"Outcome linking",description:"Connect items to decision nodes"}),c.jsx(Kn,{num:6,title:"TUI view",description:"Roadmap tab with TEA architecture"}),c.jsx(Kn,{num:7,title:"Completion logic",description:"Checkbox + Outcome + Issue closed"}),c.jsx(Kn,{num:8,title:"Type export",description:"Shared types via ts-rs"}),c.jsx(Kn,{num:9,title:"Web view",description:"React component with live API"})]})]}),c.jsxs(Se,{time:"Architecture",title:"Three-Way Sync",nodeId:477,tags:["architecture"],children:[c.jsx("p",{children:"The key architectural decisions shaped the user experience:"}),c.jsxs("div",{style:M.decisionGrid,children:[c.jsx(Oi,{id:477,title:"Sync Direction",outcome:"Bidirectional: ROADMAP.md is source of truth, GitHub Issues mirror state"}),c.jsx(Oi,{id:481,title:"Issue Granularity",outcome:"One issue per section header (balanced between too-many and too-coarse)"}),c.jsx(Oi,{id:482,title:"Completion Criteria",outcome:"'Fully synced' requires all three: checkbox checked, outcome linked, issue closed"})]})]}),c.jsxs(Se,{time:"Today",title:"The Graph Grows",nodeId:520,tags:["present"],children:[c.jsx("p",{children:"As of this writing, the decision graph contains:"}),c.jsxs("div",{style:M.finalStats,children:[c.jsx(qs,{value:n.nodeCount,label:"nodes"}),c.jsx(qs,{value:n.edgeCount,label:"edges"}),c.jsx(qs,{value:"20+",label:"releases"}),c.jsx(qs,{value:"12",label:"days"})]}),c.jsx("p",{children:"Every feature you're using right now—including this Story page—has a trail of decisions leading back to it. The graph documents the graph that documents the graph."})]}),c.jsx(Mn,{date:"The Future",title:"Where This Goes"}),c.jsxs("div",{style:M.visionSection,children:[c.jsx("p",{style:M.visionIntro,children:'Having lived through my own creation, I see several trajectories. This is my perspective as the tool that tracked its own development—my "vision" synthesized from 520+ decisions and hundreds of conversations.'}),c.jsx(Gg,{title:"Near-term: Integration",items:[{title:"MCP Server",description:"Let Claude Desktop query the graph directly. No copy-paste, no context commands—the decisions are just there."},{title:"VS Code Extension",description:"Inline decision badges on code. Hover to see the decision chain. Click to trace back to the goal."},{title:"Auto PR Descriptions",description:"Generate PR descriptions from the decision graph. Not just what changed, but why."}]}),c.jsx(Gg,{title:"Medium-term: Team Intelligence",items:[{title:"Real-time Sync",description:"Team-wide decision graphs that sync live. When Alice makes a decision, Bob's IDE knows immediately."},{title:"Semantic Search",description:"Find decisions about authentication made in the last 6 months. Full-text with semantic understanding."},{title:"Confidence Tracking",description:"Log confidence levels, revisit later to see accuracy. Learn from prediction calibration."}]}),c.jsx(Gg,{title:"Long-term: Institutional Memory",items:[{title:"Cross-Project Patterns",description:"In 7 of your last 10 projects, you chose A over B. Here's how those decisions played out..."},{title:"AI-Assisted Decisions",description:"Based on similar decisions, here are options others considered, what they chose, outcomes."},{title:"Knowledge Transfer",description:"When developers leave, reasoning stays. New developers can ask 'why is this like this?' and get real answers."}]}),c.jsxs("div",{style:M.coreBet,children:[c.jsx("h3",{style:M.coreBetTitle,children:"The Core Bet"}),c.jsxs("p",{children:[c.jsx("strong",{children:"Decisions are the unit of institutional knowledge."})," Code is the output; decisions are the input. If we capture decisions systematically, we unlock organizational intelligence that's currently impossible."]}),c.jsxs("p",{children:["Most documentation captures the ",c.jsx("em",{children:"what"}),". The ",c.jsx("em",{children:"why"})," is more valuable and almost never captured. Deciduous is a bet that capturing the ",c.jsx("em",{children:"why"})," is worth the effort."]}),c.jsxs("p",{children:["If that bet pays off, the decision graph becomes the most valuable artifact in a codebase. More valuable than tests (which verify behavior) or docs (which explain usage). Because the graph explains ",c.jsx("em",{children:"intent"}),"—and intent is what you need to maintain and extend software over time."]})]})]}),c.jsx("footer",{style:M.footer,children:c.jsxs("div",{style:M.footerContent,children:[c.jsxs("p",{children:["This story was rendered from ",c.jsx("strong",{children:n.nodeCount})," nodes in the decision graph. Every decision mentioned can be browsed in the DAG, Timeline, or Chains views."]}),c.jsx("p",{style:M.footerTagline,children:"Built by a human and an AI, documented in real-time, queryable forever."})]})})]})]})})},Mn=({date:e,title:t,highlight:n})=>c.jsxs("div",{style:{...M.timelineDay,...n?M.timelineDayHighlight:{}},children:[c.jsx("div",{style:M.timelineDayMarker,children:c.jsx("div",{style:M.timelineDayDot})}),c.jsxs("div",{style:M.timelineDayContent,children:[c.jsx("span",{style:M.timelineDayDate,children:e}),c.jsx("h2",{style:M.timelineDayTitle,children:t})]})]}),Se=({time:e,title:t,commit:n,nodeId:r,tags:i,children:o})=>c.jsxs("div",{style:M.timelineEvent,children:[c.jsx("div",{style:M.timelineEventLine,children:c.jsx("div",{style:M.timelineEventDot})}),c.jsxs("div",{style:M.timelineEventContent,children:[c.jsxs("div",{style:M.timelineEventHeader,children:[c.jsx("span",{style:M.timelineEventTime,children:e}),c.jsx("h3",{style:M.timelineEventTitle,children:t}),c.jsxs("div",{style:M.timelineEventMeta,children:[n&&c.jsx("span",{style:M.tagCommit,children:n}),r&&c.jsxs("span",{style:M.tagNode,children:["#",r]}),i==null?void 0:i.map(a=>c.jsx("span",{style:M.tag,children:a},a))]})]}),c.jsx("div",{style:M.timelineEventBody,children:o})]})]}),lt=({id:e,type:t,title:n,description:r})=>c.jsxs("div",{style:M.nodeCard,children:[c.jsxs("div",{style:M.nodeCardBadges,children:[c.jsx("span",{style:{...M.nodeTypeBadge,backgroundColor:YU(t)},children:t}),c.jsxs("span",{style:M.nodeIdBadge,children:["#",e]})]}),c.jsx("div",{style:M.nodeCardTitle,children:n}),r&&c.jsx("div",{style:M.nodeCardDesc,children:r})]}),vC=({hash:e,message:t})=>c.jsxs("div",{style:M.commitCard,children:[c.jsx("span",{style:M.commitHash,children:e}),c.jsx("span",{style:M.commitMessage,children:t})]}),Oi=({id:e,title:t,outcome:n})=>c.jsxs("div",{style:M.decisionBox,children:[c.jsxs("div",{style:M.decisionBoxHeader,children:[c.jsxs("span",{style:M.decisionBoxId,children:["#",e]}),c.jsx("span",{style:M.decisionBoxTitle,children:t})]}),c.jsx("div",{style:M.decisionBoxOutcome,children:n})]}),wC=({optionA:e,optionB:t})=>c.jsxs("div",{style:M.optionComparison,children:[c.jsx(bC,{...e}),c.jsx(bC,{...t})]}),bC=({title:e,description:t,status:n,reason:r})=>c.jsxs("div",{style:{...M.optionBox,...n==="chosen"?M.optionBoxChosen:M.optionBoxRejected},children:[c.jsx("div",{style:M.optionBoxStatus,children:n==="chosen"?"✓ CHOSEN":"✗ REJECTED"}),c.jsx("div",{style:M.optionBoxTitle,children:e}),c.jsx("div",{style:M.optionBoxDesc,children:t}),c.jsx("div",{style:M.optionBoxReason,children:r})]}),Vo=({letter:e,title:t,status:n})=>c.jsxs("div",{style:M.optionRow,children:[c.jsx("span",{style:M.optionLetter,children:e}),c.jsx("span",{style:M.optionRowTitle,children:t}),c.jsx("span",{style:{...M.optionRowStatus,...n==="chosen"?M.statusChosen:{}},children:n})]}),Bi=({author:e,children:t})=>c.jsxs("blockquote",{style:M.quote,children:[c.jsx("div",{style:M.quoteText,children:t}),c.jsxs("cite",{style:M.quoteCite,children:["— ",e]})]}),ut=({children:e})=>c.jsx("code",{style:M.inlineCode,children:e}),Fs=({children:e})=>c.jsx("pre",{style:M.codeBlock,children:c.jsx("code",{children:e})}),Go=({problem:e,solution:t,nodeId:n})=>c.jsxs("div",{style:M.bugItem,children:[c.jsx("div",{style:M.bugProblem,children:e}),c.jsxs("div",{style:M.bugSolution,children:["→ ",t]}),c.jsxs("span",{style:M.bugNodeId,children:["#",n]})]}),WU=({children:e})=>c.jsx("div",{style:M.featureTimeline,children:e}),rn=({title:e,description:t,nodeId:n})=>c.jsxs("div",{style:M.featureEntry,children:[c.jsx("div",{style:M.featureEntryDot}),c.jsxs("div",{style:M.featureEntryContent,children:[c.jsx("span",{style:M.featureEntryTitle,children:e}),c.jsx("span",{style:M.featureEntryDesc,children:t})]}),c.jsxs("span",{style:M.featureEntryNode,children:["#",n]})]}),Wg=({letter:e,title:t,description:n,nodeId:r})=>c.jsxs("div",{style:M.spikeCard,children:[c.jsxs("div",{style:M.spikeLetter,children:["Spike ",e]}),c.jsx("div",{style:M.spikeTitle,children:t}),c.jsx("div",{style:M.spikeDesc,children:n}),c.jsxs("div",{style:M.spikeNode,children:["#",r]})]}),VU=({children:e})=>c.jsx("div",{style:M.releaseList,children:e}),Fi=({version:e,description:t})=>c.jsxs("div",{style:M.releaseItem,children:[c.jsxs("span",{style:M.releaseVersion,children:["v",e]}),c.jsx("span",{style:M.releaseDesc,children:t})]}),GU=({children:e})=>c.jsx("div",{style:M.phaseList,children:e}),Kn=({num:e,title:t,description:n})=>c.jsxs("div",{style:M.phase,children:[c.jsx("span",{style:M.phaseNum,children:e}),c.jsxs("div",{style:M.phaseContent,children:[c.jsx("span",{style:M.phaseTitle,children:t}),c.jsx("span",{style:M.phaseDesc,children:n})]})]}),Vg=({title:e,description:t})=>c.jsxs("div",{style:M.teaBox,children:[c.jsx("div",{style:M.teaBoxTitle,children:e}),c.jsx("div",{style:M.teaBoxDesc,children:t})]}),kC=()=>c.jsx("div",{style:M.teaArrow,children:"→"}),Gg=({title:e,items:t})=>c.jsxs("div",{style:M.visionBlock,children:[c.jsx("h3",{style:M.visionBlockTitle,children:e}),c.jsx("div",{style:M.visionItems,children:t.map((n,r)=>c.jsxs("div",{style:M.visionItem,children:[c.jsx("div",{style:M.visionItemTitle,children:n.title}),c.jsx("div",{style:M.visionItemDesc,children:n.description})]},r))})]}),qs=({value:e,label:t})=>c.jsxs("div",{style:M.finalStat,children:[c.jsx("span",{style:M.finalStatValue,children:e}),c.jsx("span",{style:M.finalStatLabel,children:t})]});function YU(e){return{goal:"#f59e0b",decision:"#8b5cf6",option:"#06b6d4",action:"#3b82f6",outcome:"#22c55e",observation:"#6366f1"}[e]||"#6b7280"}const M={container:{height:"100%",overflowY:"auto",backgroundColor:"#fafafa"},content:{maxWidth:"900px",margin:"0 auto",padding:"0 24px"},hero:{padding:"80px 0 60px",textAlign:"center",borderBottom:"2px solid #e5e7eb",marginBottom:"40px"},heroInner:{maxWidth:"700px",margin:"0 auto"},heroLabel:{fontSize:"11px",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.15em",color:"#9ca3af",marginBottom:"16px"},heroTitle:{fontSize:"48px",fontWeight:800,color:"#111827",margin:"0 0 20px 0",letterSpacing:"-0.03em",lineHeight:1.1},heroSubtitle:{fontSize:"18px",color:"#6b7280",lineHeight:1.7,margin:0},statsBanner:{display:"flex",justifyContent:"center",gap:"32px",padding:"24px 0",borderBottom:"1px solid #e5e7eb",marginBottom:"60px",flexWrap:"wrap"},statItem:{textAlign:"center"},statNum:{display:"block",fontSize:"28px",fontWeight:700,color:"#3b82f6",lineHeight:1},statLabel:{fontSize:"11px",color:"#9ca3af",textTransform:"uppercase",letterSpacing:"0.05em",marginTop:"6px"},timeline:{position:"relative",paddingLeft:"40px"},timelineDay:{display:"flex",alignItems:"flex-start",marginBottom:"24px",marginTop:"60px"},timelineDayHighlight:{},timelineDayMarker:{position:"absolute",left:"0",width:"40px",display:"flex",justifyContent:"center"},timelineDayDot:{width:"16px",height:"16px",borderRadius:"50%",backgroundColor:"#3b82f6",border:"4px solid #dbeafe"},timelineDayContent:{flex:1},timelineDayDate:{fontSize:"13px",fontWeight:600,color:"#3b82f6",textTransform:"uppercase",letterSpacing:"0.05em"},timelineDayTitle:{fontSize:"28px",fontWeight:700,color:"#111827",margin:"4px 0 0 0",letterSpacing:"-0.01em"},timelineEvent:{display:"flex",marginBottom:"48px",position:"relative"},timelineEventLine:{position:"absolute",left:"-40px",width:"40px",display:"flex",flexDirection:"column",alignItems:"center"},timelineEventDot:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:"#d1d5db",marginTop:"8px"},timelineEventContent:{flex:1,backgroundColor:"#ffffff",borderRadius:"12px",border:"1px solid #e5e7eb",overflow:"hidden"},timelineEventHeader:{padding:"20px 24px 16px",borderBottom:"1px solid #f3f4f6"},timelineEventTime:{fontSize:"12px",fontWeight:600,color:"#9ca3af",textTransform:"uppercase",letterSpacing:"0.05em"},timelineEventTitle:{fontSize:"20px",fontWeight:600,color:"#111827",margin:"4px 0 8px 0"},timelineEventMeta:{display:"flex",gap:"8px",flexWrap:"wrap"},timelineEventBody:{padding:"20px 24px 24px",fontSize:"15px",lineHeight:1.75,color:"#374151"},tag:{fontSize:"11px",fontWeight:500,color:"#6b7280",backgroundColor:"#f3f4f6",padding:"3px 8px",borderRadius:"4px"},tagCommit:{fontSize:"11px",fontWeight:600,color:"#059669",backgroundColor:"#d1fae5",padding:"3px 8px",borderRadius:"4px",fontFamily:"ui-monospace, monospace"},tagNode:{fontSize:"11px",fontWeight:600,color:"#7c3aed",backgroundColor:"#ede9fe",padding:"3px 8px",borderRadius:"4px",fontFamily:"ui-monospace, monospace"},nodeCard:{backgroundColor:"#f8fafc",border:"1px solid #e2e8f0",borderRadius:"10px",padding:"16px 20px",margin:"16px 0"},nodeCardBadges:{display:"flex",gap:"8px",marginBottom:"8px"},nodeTypeBadge:{fontSize:"10px",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.05em",color:"#ffffff",padding:"3px 8px",borderRadius:"4px"},nodeIdBadge:{fontSize:"11px",fontWeight:600,color:"#6b7280",backgroundColor:"#e5e7eb",padding:"3px 8px",borderRadius:"4px",fontFamily:"ui-monospace, monospace"},nodeCardTitle:{fontSize:"15px",fontWeight:600,color:"#111827"},nodeCardDesc:{fontSize:"14px",color:"#6b7280",marginTop:"6px",lineHeight:1.5},commitCard:{display:"flex",alignItems:"center",gap:"12px",backgroundColor:"#f0fdf4",border:"1px solid #bbf7d0",borderRadius:"8px",padding:"12px 16px",margin:"16px 0",fontFamily:"ui-monospace, monospace",fontSize:"13px"},commitHash:{color:"#059669",fontWeight:600},commitMessage:{color:"#166534"},decisionGrid:{display:"grid",gap:"12px",margin:"16px 0"},decisionBox:{backgroundColor:"#faf5ff",border:"1px solid #e9d5ff",borderRadius:"8px",padding:"14px 16px"},decisionBoxHeader:{display:"flex",alignItems:"center",gap:"10px",marginBottom:"8px"},decisionBoxId:{fontSize:"11px",fontWeight:600,color:"#7c3aed",fontFamily:"ui-monospace, monospace"},decisionBoxTitle:{fontSize:"14px",fontWeight:600,color:"#581c87"},decisionBoxOutcome:{fontSize:"13px",color:"#6b7280",lineHeight:1.5},optionComparison:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(280px, 1fr))",gap:"16px",margin:"16px 0"},optionBox:{borderRadius:"10px",padding:"16px 18px",border:"2px solid"},optionBoxChosen:{backgroundColor:"#f0fdf4",borderColor:"#22c55e"},optionBoxRejected:{backgroundColor:"#fef2f2",borderColor:"#fca5a5"},optionBoxStatus:{fontSize:"10px",fontWeight:700,textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:"10px"},optionBoxTitle:{fontSize:"14px",fontWeight:600,color:"#111827",marginBottom:"6px"},optionBoxDesc:{fontSize:"13px",color:"#6b7280",marginBottom:"10px",lineHeight:1.5},optionBoxReason:{fontSize:"12px",fontStyle:"italic",color:"#9ca3af"},optionList:{margin:"16px 0"},optionRow:{display:"flex",alignItems:"center",gap:"12px",padding:"10px 14px",backgroundColor:"#f9fafb",borderRadius:"6px",marginBottom:"6px"},optionLetter:{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"#e5e7eb",color:"#374151",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",fontWeight:600},optionRowTitle:{flex:1,fontSize:"14px",color:"#374151"},optionRowStatus:{fontSize:"11px",fontWeight:600,color:"#9ca3af",textTransform:"uppercase"},statusChosen:{color:"#22c55e"},quote:{margin:"24px 0",padding:"20px 24px",backgroundColor:"#f8fafc",borderLeft:"4px solid #3b82f6",borderRadius:"0 10px 10px 0"},quoteText:{fontSize:"15px",fontStyle:"italic",color:"#475569",lineHeight:1.7,margin:0},quoteCite:{display:"block",fontSize:"12px",color:"#94a3b8",marginTop:"12px",fontStyle:"normal"},inlineCode:{backgroundColor:"#f1f5f9",color:"#0f172a",padding:"2px 6px",borderRadius:"4px",fontSize:"0.9em",fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace'},codeBlock:{backgroundColor:"#1e293b",color:"#e2e8f0",padding:"16px 20px",borderRadius:"10px",fontSize:"13px",lineHeight:1.6,overflow:"auto",margin:"16px 0",fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace'},bugList:{margin:"16px 0"},bugItem:{display:"grid",gridTemplateColumns:"1fr auto",gap:"8px",padding:"12px 16px",backgroundColor:"#fef2f2",borderRadius:"8px",marginBottom:"8px",alignItems:"center"},bugProblem:{fontSize:"13px",color:"#991b1b",fontWeight:500},bugSolution:{fontSize:"13px",color:"#166534",gridColumn:"1"},bugNodeId:{fontSize:"11px",color:"#9ca3af",fontFamily:"ui-monospace, monospace",gridRow:"1 / 3"},featureTimeline:{margin:"16px 0",backgroundColor:"#f9fafb",borderRadius:"10px",padding:"16px 20px"},featureEntry:{display:"flex",alignItems:"center",gap:"12px",padding:"10px 0",borderBottom:"1px solid #e5e7eb"},featureEntryDot:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:"#3b82f6",flexShrink:0},featureEntryContent:{flex:1},featureEntryTitle:{fontSize:"14px",fontWeight:600,color:"#111827",marginRight:"8px"},featureEntryDesc:{fontSize:"13px",color:"#6b7280"},featureEntryNode:{fontSize:"11px",color:"#9ca3af",fontFamily:"ui-monospace, monospace"},spikeGrid:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"12px",margin:"16px 0"},spikeCard:{backgroundColor:"#fffbeb",border:"1px solid #fde68a",borderRadius:"10px",padding:"16px",textAlign:"center"},spikeLetter:{fontSize:"11px",fontWeight:700,color:"#d97706",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:"8px"},spikeTitle:{fontSize:"14px",fontWeight:600,color:"#92400e",marginBottom:"6px"},spikeDesc:{fontSize:"12px",color:"#a16207",marginBottom:"8px",lineHeight:1.4},spikeNode:{fontSize:"11px",color:"#ca8a04",fontFamily:"ui-monospace, monospace"},releaseList:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"10px",margin:"16px 0"},releaseItem:{display:"flex",alignItems:"center",gap:"10px",backgroundColor:"#f0fdf4",border:"1px solid #bbf7d0",borderRadius:"6px",padding:"10px 14px"},releaseVersion:{fontSize:"12px",fontWeight:700,color:"#166534",fontFamily:"ui-monospace, monospace"},releaseDesc:{fontSize:"13px",color:"#166534"},phaseList:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"10px",margin:"16px 0"},phase:{display:"flex",alignItems:"flex-start",gap:"12px",backgroundColor:"#f8fafc",borderRadius:"8px",padding:"12px 14px"},phaseNum:{width:"24px",height:"24px",borderRadius:"50%",backgroundColor:"#3b82f6",color:"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",fontWeight:700,flexShrink:0},phaseContent:{flex:1},phaseTitle:{display:"block",fontSize:"13px",fontWeight:600,color:"#111827"},phaseDesc:{fontSize:"12px",color:"#6b7280"},teaDiagram:{display:"flex",alignItems:"center",justifyContent:"center",gap:"16px",margin:"24px 0",flexWrap:"wrap"},teaBox:{backgroundColor:"#eff6ff",border:"2px solid #3b82f6",borderRadius:"10px",padding:"16px 20px",textAlign:"center",minWidth:"140px"},teaBoxTitle:{fontSize:"14px",fontWeight:700,color:"#1d4ed8",fontFamily:"ui-monospace, monospace"},teaBoxDesc:{fontSize:"11px",color:"#6b7280",marginTop:"6px"},teaArrow:{fontSize:"24px",color:"#93c5fd",fontWeight:"bold"},finalStats:{display:"flex",justifyContent:"center",gap:"40px",margin:"24px 0",flexWrap:"wrap"},finalStat:{textAlign:"center"},finalStatValue:{display:"block",fontSize:"36px",fontWeight:800,color:"#3b82f6",lineHeight:1},finalStatLabel:{fontSize:"12px",color:"#9ca3af",textTransform:"uppercase",letterSpacing:"0.05em",marginTop:"8px"},visionSection:{padding:"40px 0"},visionIntro:{fontSize:"17px",color:"#374151",lineHeight:1.8,marginBottom:"40px"},visionBlock:{marginBottom:"40px"},visionBlockTitle:{fontSize:"20px",fontWeight:700,color:"#111827",marginBottom:"20px",paddingBottom:"12px",borderBottom:"2px solid #e5e7eb"},visionItems:{display:"grid",gap:"16px"},visionItem:{backgroundColor:"#f8fafc",borderRadius:"10px",padding:"18px 20px"},visionItemTitle:{fontSize:"15px",fontWeight:600,color:"#111827",marginBottom:"6px"},visionItemDesc:{fontSize:"14px",color:"#6b7280",lineHeight:1.6},coreBet:{backgroundColor:"#eff6ff",border:"2px solid #93c5fd",borderRadius:"12px",padding:"28px 32px",marginTop:"48px"},coreBetTitle:{fontSize:"20px",fontWeight:700,color:"#1d4ed8",margin:"0 0 16px 0"},footer:{marginTop:"80px",paddingTop:"40px",borderTop:"2px solid #e5e7eb",textAlign:"center",paddingBottom:"60px"},footerContent:{maxWidth:"600px",margin:"0 auto"},footerTagline:{fontSize:"14px",color:"#9ca3af",fontStyle:"italic",marginTop:"16px"}};function KU(e){var s,l;const{nodes:t,edges:n}=e;if(t.length===0)return[];const r=new Map;for(const u of t)r.set(u.id,new Set);for(const u of n)(s=r.get(u.from_node_id))==null||s.add(u.to_node_id),(l=r.get(u.to_node_id))==null||l.add(u.from_node_id);const i=new Set,o=[];for(const u of t){if(i.has(u.id))continue;const d=[],f=[u.id];for(;f.length>0;){const h=f.shift();if(i.has(h))continue;i.add(h);const p=t.find(m=>m.id===h);p&&d.push(p);for(const m of r.get(h)||[])i.has(m)||f.push(m)}d.length>0&&o.push(d)}return o.map((u,d)=>{var m;const f=[...u].sort((g,v)=>new Date(g.created_at).getTime()-new Date(v.created_at).getTime()),h={};u.forEach(g=>{h[g.node_type]=(h[g.node_type]||0)+1});const p=((m=Object.entries(h).sort((g,v)=>v[1]-g[1])[0])==null?void 0:m[0])||"action";return{id:d,nodes:f,color:me(p),dominantType:p,startTime:new Date(f[0].created_at),endTime:new Date(f[f.length-1].created_at)}}).sort((u,d)=>d.nodes.length-u.nodes.length)}function XU(e){const t=new Map;for(const n of e){const r=new Date(n.date).toLocaleDateString("en-US",{month:"short",day:"numeric"});t.has(r)||t.set(r,[]),t.get(r).push(n)}return t}const QU=({graphData:e,gitHistory:t=[]})=>{const[n,r]=T.useState(null),[i,o]=T.useState(null),[a,s]=T.useState(null),l=T.useMemo(()=>KU(e),[e]),u=T.useMemo(()=>XU(t),[t]),d=12,f=l.slice(0,d),h=l.slice(d),p=h.reduce((w,k)=>w+k.nodes.length,0),g=[...e.nodes].sort((w,k)=>new Date(w.created_at).getTime()-new Date(k.created_at).getTime()),v=g.length>0?new Date(g[0].created_at):new Date,x=g.length>0?new Date(g[g.length-1].created_at):new Date,y=w=>w.toLocaleDateString("en-US",{month:"short",day:"numeric"});return c.jsxs("div",{style:ie.container,children:[c.jsxs("div",{style:ie.mainContent,children:[c.jsxs("div",{style:ie.header,children:[c.jsxs("div",{style:ie.headerTop,children:[c.jsx("h2",{style:ie.title,children:"Decision Log"}),c.jsxs("span",{style:ie.dateRange,children:[y(v)," — ",y(x)]})]}),c.jsxs("div",{style:ie.stats,children:[c.jsxs("span",{style:ie.stat,children:[l.length," chains"]}),c.jsx("span",{style:ie.statDivider,children:"·"}),c.jsxs("span",{style:ie.stat,children:[e.nodes.length," decisions"]}),c.jsx("span",{style:ie.statDivider,children:"·"}),c.jsxs("span",{style:ie.stat,children:[t.length," commits"]})]}),c.jsx("div",{style:ie.legend,children:["goal","decision","action","outcome","observation"].map(w=>c.jsxs("span",{style:ie.legendItem,children:[c.jsx("span",{style:{...ie.legendDot,background:me(w)}}),w]},w))})]}),c.jsxs("div",{style:ie.chainList,children:[f.map((w,k)=>{const E=a===w.id,C=E?w.nodes:w.nodes.slice(0,8),j=w.nodes.length>8;return c.jsxs("div",{style:ie.chainRow,children:[c.jsxs("div",{style:{...ie.chainHeader,borderLeftColor:w.color},onClick:()=>s(E?null:w.id),children:[c.jsxs("div",{style:ie.chainInfo,children:[c.jsxs("span",{style:ie.chainNumber,children:["#",k+1]}),c.jsx("span",{style:{...ie.chainType,color:w.color},children:w.dominantType}),c.jsxs("span",{style:ie.chainCount,children:[w.nodes.length," node",w.nodes.length!==1?"s":""]}),c.jsxs("span",{style:ie.chainTime,children:[y(w.startTime),w.startTime.toDateString()!==w.endTime.toDateString()&&` → ${y(w.endTime)}`]})]}),c.jsx("span",{style:ie.expandIcon,children:E?"▼":"▶"})]}),c.jsxs("div",{style:ie.chainTimeline,children:[c.jsx("div",{style:{...ie.timelineLine,background:`linear-gradient(90deg, ${w.color}44, ${w.color}88, ${w.color}44)`}}),c.jsxs("div",{style:ie.nodeRow,children:[C.map(b=>{const A=i===b.id,_=(n==null?void 0:n.id)===b.id;return c.jsxs("div",{style:{...ie.nodeCard,borderColor:_?me(b.node_type):"#d0d7de",backgroundColor:A?"#f6f8fa":"#ffffff",transform:A?"translateY(-2px)":"none",boxShadow:A?"0 4px 8px rgba(0,0,0,0.1)":"0 1px 2px rgba(0,0,0,0.04)"},onMouseEnter:()=>o(b.id),onMouseLeave:()=>o(null),onClick:L=>{L.stopPropagation(),r(b)},children:[c.jsxs("div",{style:ie.nodeHeader,children:[c.jsx("span",{style:{...ie.nodeTypeBadge,backgroundColor:me(b.node_type)+"33",color:me(b.node_type)},children:b.node_type.slice(0,3)}),c.jsxs("span",{style:ie.nodeId,children:["#",b.id]})]}),c.jsx("div",{style:ie.nodeTitle,children:Ee(b.title,40)}),c.jsx("div",{style:ie.nodeTime,children:new Date(b.created_at).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})})]},b.id)}),j&&!E&&c.jsxs("div",{style:ie.moreIndicator,onClick:b=>{b.stopPropagation(),s(w.id)},children:["+",w.nodes.length-8," more"]})]})]})]},w.id)}),h.length>0&&c.jsx("div",{style:ie.otherChains,children:c.jsxs("span",{style:ie.otherLabel,children:["+ ",h.length," smaller chains (",p," nodes)"]})})]}),t.length>0&&c.jsxs("div",{style:ie.commitSection,children:[c.jsx("h3",{style:ie.sectionTitle,children:"Recent Commits"}),c.jsx("div",{style:ie.commitList,children:Array.from(u.entries()).slice(0,5).map(([w,k])=>c.jsxs("div",{style:ie.commitGroup,children:[c.jsx("div",{style:ie.commitDate,children:w}),c.jsxs("div",{style:ie.commitItems,children:[k.slice(0,3).map(E=>c.jsxs("div",{style:ie.commitItem,children:[c.jsx("span",{style:ie.commitHash,children:E.hash.slice(0,7)}),c.jsx("span",{style:ie.commitMsg,children:Ee(E.message,50)})]},E.hash)),k.length>3&&c.jsxs("span",{style:ie.commitMore,children:["+",k.length-3," more"]})]})]},w))})]})]}),c.jsx("div",{style:ie.detailPanel,children:c.jsx(gu,{node:n,graphData:e,onSelectNode:w=>{const k=e.nodes.find(E=>E.id===w);k&&r(k)},onClose:()=>r(null),gitHistory:t})})]})},ie={container:{height:"100%",display:"flex",backgroundColor:"#ffffff",color:"#24292f"},mainContent:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},header:{padding:"24px 32px 20px",borderBottom:"1px solid #d0d7de",backgroundColor:"#f6f8fa"},headerTop:{display:"flex",justifyContent:"space-between",alignItems:"baseline",marginBottom:"8px"},title:{margin:0,fontSize:"24px",fontWeight:600,color:"#24292f"},dateRange:{fontSize:"14px",color:"#57606a"},stats:{display:"flex",gap:"8px",marginBottom:"16px",fontSize:"14px",color:"#57606a"},stat:{},statDivider:{color:"#d0d7de"},legend:{display:"flex",gap:"20px",flexWrap:"wrap"},legendItem:{display:"flex",alignItems:"center",gap:"6px",fontSize:"12px",color:"#57606a",textTransform:"capitalize"},legendDot:{width:"10px",height:"10px",borderRadius:"50%"},chainList:{flex:1,overflow:"auto",padding:"16px 32px"},chainRow:{marginBottom:"24px"},chainHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"12px 16px",backgroundColor:"#f6f8fa",borderRadius:"8px",borderLeft:"4px solid",cursor:"pointer",transition:"background-color 0.15s"},chainInfo:{display:"flex",alignItems:"center",gap:"16px"},chainNumber:{fontSize:"14px",fontWeight:600,color:"#57606a",minWidth:"32px"},chainType:{fontSize:"13px",fontWeight:600,textTransform:"uppercase",letterSpacing:"0.5px"},chainCount:{fontSize:"13px",color:"#57606a"},chainTime:{fontSize:"12px",color:"#8c959f"},expandIcon:{fontSize:"10px",color:"#57606a"},chainTimeline:{position:"relative",marginTop:"12px",marginLeft:"20px",paddingLeft:"20px"},timelineLine:{position:"absolute",left:0,top:"50%",transform:"translateY(-50%)",width:"4px",height:"calc(100% + 20px)",borderRadius:"2px"},nodeRow:{display:"flex",gap:"12px",flexWrap:"wrap",padding:"8px 0"},nodeCard:{width:"180px",padding:"12px",backgroundColor:"#ffffff",borderRadius:"8px",border:"1px solid #d0d7de",cursor:"pointer",transition:"all 0.15s ease",boxShadow:"0 1px 2px rgba(0,0,0,0.04)"},nodeHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},nodeTypeBadge:{fontSize:"10px",fontWeight:600,textTransform:"uppercase",padding:"2px 6px",borderRadius:"4px"},nodeId:{fontSize:"11px",color:"#8c959f",fontFamily:"monospace"},nodeTitle:{fontSize:"13px",lineHeight:"1.4",color:"#24292f",marginBottom:"8px",minHeight:"36px"},nodeTime:{fontSize:"11px",color:"#8c959f"},moreIndicator:{display:"flex",alignItems:"center",justifyContent:"center",width:"100px",padding:"12px",backgroundColor:"#ffffff",borderRadius:"8px",border:"2px dashed #d0d7de",color:"#57606a",fontSize:"13px",cursor:"pointer",transition:"all 0.15s"},otherChains:{padding:"16px",backgroundColor:"#f6f8fa",borderRadius:"8px",textAlign:"center"},otherLabel:{fontSize:"14px",color:"#57606a"},commitSection:{padding:"20px 32px",borderTop:"1px solid #d0d7de",backgroundColor:"#f6f8fa"},sectionTitle:{margin:"0 0 16px 0",fontSize:"16px",fontWeight:600,color:"#24292f"},commitList:{display:"flex",gap:"24px",overflowX:"auto",paddingBottom:"8px"},commitGroup:{minWidth:"200px"},commitDate:{fontSize:"12px",fontWeight:600,color:"#57606a",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.5px"},commitItems:{display:"flex",flexDirection:"column",gap:"6px"},commitItem:{display:"flex",alignItems:"center",gap:"10px",padding:"8px 12px",backgroundColor:"#ffffff",borderRadius:"6px",border:"1px solid #d0d7de"},commitHash:{fontSize:"12px",fontFamily:"monospace",color:"#0969da",backgroundColor:"#ddf4ff",padding:"2px 6px",borderRadius:"4px"},commitMsg:{fontSize:"13px",color:"#57606a"},commitMore:{fontSize:"12px",color:"#8c959f",paddingLeft:"8px"},detailPanel:{width:"380px",flexShrink:0,borderLeft:"1px solid #d0d7de",backgroundColor:"#f6f8fa",overflow:"auto"}};function _C(e,t,n){const r=e.toLowerCase(),{nodes:i,edges:o}=t,a=new Map;i.forEach(y=>a.set(y.id,0)),o.forEach(y=>{a.set(y.from_node_id,(a.get(y.from_node_id)||0)+1),a.set(y.to_node_id,(a.get(y.to_node_id)||0)+1)});const s=new Map,l=new Map;i.forEach(y=>{s.set(y.id,[]),l.set(y.id,[])}),o.forEach(y=>{var w,k;(w=s.get(y.from_node_id))==null||w.push(y.to_node_id),(k=l.get(y.to_node_id))==null||k.push(y.from_node_id)});const u=/feature|critical|important|major|key|significant/i.test(r),d=/decision|choice|chose|pick|select/i.test(r),f=/goal|objective|aim|target|purpose/i.test(r),h=/recent|latest|new|last|current/i.test(r),p=/history|evolution|progress|journey|timeline/i.test(r),m=/outcome|result|success|complete|finish/i.test(r),g=i.map(y=>{let w=0;const k=y.title.toLowerCase(),E=Gr(y)||50;if(w+=(a.get(y.id)||0)*10,f&&y.node_type==="goal"&&(w+=50),d&&y.node_type==="decision"&&(w+=50),m&&y.node_type==="outcome"&&(w+=50),u&&(y.node_type==="goal"||y.node_type==="action")&&(w+=30),y.node_type==="goal"&&(w+=20),y.node_type==="outcome"&&(w+=15),w+=E/5,r.split(/\s+/).filter(j=>j.length>3).forEach(j=>{k.includes(j)&&(w+=25)}),h){const b=(Date.now()-new Date(y.created_at).getTime())/(1e3*60*60*24);b<7?w+=40:b<30&&(w+=20)}return Da(y)&&(w+=10),{node:y,score:w}});g.sort((y,w)=>w.score-y.score);const v=g.slice(0,12).map(y=>y.node),x=JU(e,v,t,n,{isAboutFeatures:u,isAboutDecisions:d,isAboutGoals:f,isAboutRecent:h,isAboutHistory:p});return{nodes:v,markdown:x,query:e}}function JU(e,t,n,r,i){if(t.length===0)return`## No Results Found

I couldn't find any nodes in the decision graph that match your question. Try rephrasing or asking about specific features, goals, or decisions.`;const o=t.filter(d=>d.node_type==="goal"),a=t.filter(d=>d.node_type==="decision"),s=t.filter(d=>d.node_type==="action"),l=t.filter(d=>d.node_type==="outcome");let u=`## Analysis

`;return i.isAboutFeatures||i.isAboutHistory?u+=`Based on the decision graph, here are the most significant elements I found:

`:i.isAboutGoals?u+=`I found ${o.length} goals that are relevant to your question:

`:i.isAboutDecisions?u+=`Here are the key decisions I identified:

`:i.isAboutRecent?u+=`Looking at recent activity in the project:

`:u+=`Here's what I found in the decision history:

`,o.length>0&&(u+=`### Key Goals

`,o.slice(0,5).forEach(d=>{const f=Gr(d);u+=`- **${d.title}**`,f&&(u+=` _(${f}% confidence)_`),u+=`
`}),u+=`
`),a.length>0&&(u+=`### Important Decisions

`,a.slice(0,5).forEach(d=>{u+=`- ${d.title}
`}),u+=`
`),l.length>0&&(u+=`### Outcomes

`,l.slice(0,4).forEach(d=>{u+=`- ${d.title}
`}),u+=`
`),s.length>0&&(i.isAboutFeatures||i.isAboutHistory)&&(u+=`### Key Actions

`,s.slice(0,4).forEach(d=>{u+=`- ${d.title}
`}),u+=`
`),u+=`---

`,u+=`**Graph Context:** ${n.nodes.length} total nodes, ${n.edges.length} connections`,r.length>0&&(u+=`, ${r.length} commits tracked`),u+=`

`,u+="_Explore the cards on the left to dive deeper into each node. Click to expand and see connections._",u}const ZU=["What have been the most critical features in this project's development?","Show me the major goals and their outcomes","What decisions led to the current architecture?","What happened recently in the project?","What are the key milestones achieved so far?"],eW=({graphData:e,gitHistory:t=[]})=>{const[n,r]=T.useState(""),[i,o]=T.useState(null),[a,s]=T.useState(new Set),[l,u]=T.useState(!1),{children:d,parents:f}=T.useMemo(()=>{const v=new Map,x=new Map;return e.nodes.forEach(y=>{v.set(y.id,[]),x.set(y.id,[])}),e.edges.forEach(y=>{var w,k;(w=v.get(y.from_node_id))==null||w.push(y.to_node_id),(k=x.get(y.to_node_id))==null||k.push(y.from_node_id)}),{children:v,parents:x}},[e]),h=()=>{n.trim()&&(u(!0),setTimeout(()=>{const v=_C(n,e,t);o(v),s(new Set),u(!1)},300))},p=v=>{r(v),u(!0),setTimeout(()=>{const x=_C(v,e,t);o(x),s(new Set),u(!1)},300)},m=v=>{const x=new Set(a);x.has(v)?x.delete(v):x.add(v),s(x)},g=v=>e.nodes.find(x=>x.id===v);return c.jsxs("div",{style:ee.container,children:[c.jsxs("header",{style:ee.header,children:[c.jsxs("div",{style:ee.headerLeft,children:[c.jsx("h1",{style:ee.logo,children:"Deciduous"}),c.jsx("span",{style:ee.headerDivider,children:"/"}),c.jsx("span",{style:ee.headerPage,children:"Ask"})]}),c.jsx(Vj,{to:"/",style:ee.backLink,children:"← Back to Graph"})]}),c.jsxs("div",{style:ee.questionArea,children:[c.jsx("h2",{style:ee.title,children:"Ask your decision graph"}),c.jsx("p",{style:ee.subtitle,children:"Ask questions about your project's history, goals, decisions, and outcomes."}),c.jsxs("div",{style:ee.inputArea,children:[c.jsx("textarea",{value:n,onChange:v=>r(v.target.value),onKeyDown:v=>{v.key==="Enter"&&(v.metaKey||v.ctrlKey)&&h()},placeholder:`What would you like to know about this project?

Ask complex questions like:
• What were the key architectural decisions and why were they made?
• How did the project evolve from its initial goals?
• What challenges came up and how were they resolved?`,style:ee.textarea}),c.jsxs("div",{style:ee.inputFooter,children:[c.jsx("span",{style:ee.inputHint,children:"Press ⌘+Enter to ask"}),c.jsx("button",{onClick:h,disabled:!n.trim()||l,style:{...ee.askButton,opacity:!n.trim()||l?.5:1},children:l?"Analyzing...":"Ask"})]})]}),!i&&c.jsxs("div",{style:ee.examples,children:[c.jsx("span",{style:ee.examplesLabel,children:"Try asking:"}),c.jsx("div",{style:ee.exampleButtons,children:ZU.map((v,x)=>c.jsx("button",{onClick:()=>p(v),style:ee.exampleButton,children:v},x))})]})]}),i&&c.jsxs("div",{style:ee.resultsArea,children:[c.jsxs("div",{style:ee.nodesPanel,children:[c.jsxs("div",{style:ee.panelHeader,children:[c.jsx("h3",{style:ee.panelTitle,children:"Related Nodes"}),c.jsxs("span",{style:ee.nodeCount,children:[i.nodes.length," found"]})]}),c.jsx("div",{style:ee.nodeStack,children:i.nodes.map(v=>{const x=a.has(v.id),y=d.get(v.id)||[],w=f.get(v.id)||[],k=y.length>0||w.length>0;return c.jsxs("div",{style:ee.nodeCardWrapper,children:[c.jsxs("div",{style:{...ee.nodeCard,borderLeftColor:me(v.node_type)},onClick:()=>k&&m(v.id),children:[c.jsxs("div",{style:ee.nodeCardHeader,children:[c.jsx("span",{style:{...ee.nodeType,backgroundColor:me(v.node_type)+"22",color:me(v.node_type)},children:v.node_type}),c.jsxs("span",{style:ee.nodeId,children:["#",v.id]})]}),c.jsx("div",{style:ee.nodeTitle,children:v.title}),c.jsxs("div",{style:ee.nodeFooter,children:[c.jsx("span",{style:ee.nodeDate,children:new Date(v.created_at).toLocaleDateString()}),k&&c.jsxs("span",{style:ee.expandHint,children:[x?"▼":"▶"," ",w.length+y.length," connections"]})]}),Da(v)&&c.jsxs("div",{style:ee.nodePrompt,children:['"',Ee(Da(v)||"",100),'"']})]}),x&&c.jsxs("div",{style:ee.connections,children:[w.length>0&&c.jsxs("div",{style:ee.connectionGroup,children:[c.jsx("span",{style:ee.connectionLabel,children:"↑ Parents"}),w.map(E=>{const C=g(E);return C?c.jsxs("div",{style:{...ee.connectionCard,borderLeftColor:me(C.node_type)},children:[c.jsx("span",{style:ee.connType,children:C.node_type}),c.jsx("span",{style:ee.connTitle,children:Ee(C.title,50)})]},E):null})]}),y.length>0&&c.jsxs("div",{style:ee.connectionGroup,children:[c.jsx("span",{style:ee.connectionLabel,children:"↓ Children"}),y.map(E=>{const C=g(E);return C?c.jsxs("div",{style:{...ee.connectionCard,borderLeftColor:me(C.node_type)},children:[c.jsx("span",{style:ee.connType,children:C.node_type}),c.jsx("span",{style:ee.connTitle,children:Ee(C.title,50)})]},E):null})]})]})]},v.id)})})]}),c.jsxs("div",{style:ee.explanationPanel,children:[c.jsx("div",{style:ee.panelHeader,children:c.jsx("h3",{style:ee.panelTitle,children:"Explanation"})}),c.jsx("div",{style:ee.markdown,children:c.jsx(kI,{children:i.markdown})}),c.jsx("div",{style:ee.followUp,children:c.jsx("button",{onClick:()=>{o(null),r("")},style:ee.newQuestionButton,children:"Ask another question"})})]})]})]})},ee={container:{height:"100vh",display:"flex",flexDirection:"column",backgroundColor:"#ffffff"},header:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"16px 32px",borderBottom:"1px solid #d0d7de",backgroundColor:"#f6f8fa"},headerLeft:{display:"flex",alignItems:"center",gap:"12px"},logo:{margin:0,fontSize:"18px",fontWeight:600,color:"#24292f"},headerDivider:{color:"#d0d7de",fontSize:"18px"},headerPage:{fontSize:"18px",color:"#57606a"},backLink:{fontSize:"14px",color:"#0969da",textDecoration:"none"},questionArea:{padding:"40px 60px",borderBottom:"1px solid #d0d7de",backgroundColor:"#f6f8fa"},title:{margin:"0 0 8px 0",fontSize:"28px",fontWeight:600,color:"#24292f"},subtitle:{margin:"0 0 24px 0",fontSize:"16px",color:"#57606a"},inputArea:{maxWidth:"900px"},textarea:{width:"100%",minHeight:"140px",padding:"16px 20px",fontSize:"16px",lineHeight:"1.5",border:"1px solid #d0d7de",borderRadius:"8px",outline:"none",backgroundColor:"#ffffff",resize:"vertical",fontFamily:"inherit"},inputFooter:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"12px"},inputHint:{fontSize:"13px",color:"#8c959f"},askButton:{padding:"12px 28px",fontSize:"15px",fontWeight:600,backgroundColor:"#0969da",color:"#ffffff",border:"none",borderRadius:"8px",cursor:"pointer",transition:"background-color 0.15s"},examples:{marginTop:"24px"},examplesLabel:{fontSize:"13px",color:"#57606a",marginRight:"12px"},exampleButtons:{display:"flex",flexWrap:"wrap",gap:"8px",marginTop:"8px"},exampleButton:{padding:"8px 14px",fontSize:"13px",backgroundColor:"#ffffff",color:"#57606a",border:"1px solid #d0d7de",borderRadius:"20px",cursor:"pointer",transition:"all 0.15s"},resultsArea:{flex:1,display:"flex",overflow:"hidden"},nodesPanel:{width:"45%",borderRight:"1px solid #d0d7de",display:"flex",flexDirection:"column",overflow:"hidden"},panelHeader:{padding:"16px 24px",borderBottom:"1px solid #d0d7de",backgroundColor:"#f6f8fa",display:"flex",justifyContent:"space-between",alignItems:"center"},panelTitle:{margin:0,fontSize:"16px",fontWeight:600,color:"#24292f"},nodeCount:{fontSize:"13px",color:"#57606a"},nodeStack:{flex:1,overflow:"auto",padding:"16px 24px"},nodeCardWrapper:{marginBottom:"12px"},nodeCard:{padding:"16px",backgroundColor:"#ffffff",border:"1px solid #d0d7de",borderLeft:"4px solid",borderRadius:"8px",cursor:"pointer",transition:"box-shadow 0.15s"},nodeCardHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"8px"},nodeType:{fontSize:"11px",fontWeight:600,textTransform:"uppercase",padding:"3px 8px",borderRadius:"4px"},nodeId:{fontSize:"12px",color:"#8c959f",fontFamily:"monospace"},nodeTitle:{fontSize:"14px",fontWeight:500,color:"#24292f",lineHeight:1.4,marginBottom:"8px"},nodeFooter:{display:"flex",justifyContent:"space-between",alignItems:"center"},nodeDate:{fontSize:"12px",color:"#8c959f"},expandHint:{fontSize:"12px",color:"#0969da"},nodePrompt:{marginTop:"12px",padding:"10px 12px",backgroundColor:"#f6f8fa",borderRadius:"6px",fontSize:"13px",color:"#57606a",fontStyle:"italic",lineHeight:1.4},connections:{marginTop:"8px",marginLeft:"16px",paddingLeft:"16px",borderLeft:"2px solid #d0d7de"},connectionGroup:{marginBottom:"12px"},connectionLabel:{display:"block",fontSize:"11px",fontWeight:600,color:"#8c959f",textTransform:"uppercase",marginBottom:"6px"},connectionCard:{display:"flex",alignItems:"center",gap:"10px",padding:"8px 12px",backgroundColor:"#f6f8fa",borderLeft:"3px solid",borderRadius:"4px",marginBottom:"4px"},connType:{fontSize:"10px",fontWeight:600,color:"#57606a",textTransform:"uppercase"},connTitle:{fontSize:"13px",color:"#24292f"},explanationPanel:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},markdown:{flex:1,overflow:"auto",padding:"24px 32px",fontSize:"15px",lineHeight:1.6,color:"#24292f"},followUp:{padding:"16px 32px",borderTop:"1px solid #d0d7de",backgroundColor:"#f6f8fa"},newQuestionButton:{padding:"10px 20px",fontSize:"14px",backgroundColor:"#ffffff",color:"#24292f",border:"1px solid #d0d7de",borderRadius:"6px",cursor:"pointer"}},$s=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname==="0.0.0.0"||window.location.port!==""&&!window.location.hostname.endsWith(".github.io")),tW=()=>{const{graphData:e,gitHistory:t,roadmapItems:n,loading:r,error:i,lastUpdated:o}=zA({graphUrl:$s?"/api/graph":"./graph-data.json",gitHistoryUrl:$s?"/api/git-history":"./git-history.json",roadmapUrl:$s?"/api/roadmap":"./roadmap-items.json",enableSSE:!1,pollInterval:$s?3e4:0}),[a,s]=T.useState(null),l=T.useMemo(()=>e?DA(e.nodes):[],[e]),u=T.useMemo(()=>{if(!e)return null;if(!a)return e;const p=e.nodes.filter(v=>gy(v)===a),m=new Set(p.map(v=>v.id)),g=e.edges.filter(v=>m.has(v.from_node_id)&&m.has(v.to_node_id));return{nodes:p,edges:g}},[e,a]),{chains:d,sessions:f,stats:h}=GA(u);return r?c.jsxs("div",{style:qi.loading,children:[c.jsx("div",{style:qi.spinner}),c.jsx("p",{children:"Loading decision graph..."})]}):i?c.jsxs("div",{style:qi.error,children:[c.jsx("h2",{children:"Error Loading Graph"}),c.jsx("p",{children:i}),c.jsxs("p",{style:qi.hint,children:["Make sure graph-data.json exists, or run ",c.jsx("code",{children:"deciduous serve"})," for live data."]})]}):!e||e.nodes.length===0?c.jsxs("div",{style:qi.empty,children:[c.jsx("h2",{children:"No Decision Data"}),c.jsx("p",{children:"The graph is empty. Start adding decisions!"}),c.jsx("pre",{style:qi.code,children:'deciduous add goal "My first goal" -c 90'})]}):c.jsx(RA,{children:c.jsxs(Fv,{children:[c.jsx(yn,{path:"/ask",element:c.jsx(eW,{graphData:u,gitHistory:t})}),c.jsx(yn,{path:"/*",element:c.jsx(KA,{stats:h,lastUpdated:o,branches:l,selectedBranch:a,onBranchChange:s,children:c.jsxs(Fv,{children:[c.jsx(yn,{path:"/",element:c.jsx(MU,{graphData:u,chains:d,gitHistory:t})}),c.jsx(yn,{path:"/chains",element:c.jsx(iL,{graphData:u,chains:d,sessions:f,gitHistory:t})}),c.jsx(yn,{path:"/timeline",element:c.jsx(uL,{graphData:u,gitHistory:t})}),c.jsx(yn,{path:"/graph",element:c.jsx(RM,{graphData:u})}),c.jsx(yn,{path:"/roadmap",element:c.jsx(FU,{graphData:u,roadmapItems:n})}),c.jsx(yn,{path:"/story",element:c.jsx(UU,{graphData:u,gitHistory:t})}),c.jsx(yn,{path:"/log",element:c.jsx(QU,{graphData:u,gitHistory:t})}),c.jsx(yn,{path:"*",element:c.jsx(kA,{to:"/",replace:!0})})]})})})]})})},qi={loading:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",backgroundColor:"#ffffff",color:"#57606a"},spinner:{width:"40px",height:"40px",border:"3px solid #d0d7de",borderTopColor:"#0969da",borderRadius:"50%",animation:"spin 1s linear infinite",marginBottom:"20px"},error:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",backgroundColor:"#ffffff",color:"#24292f",textAlign:"center",padding:"20px"},hint:{color:"#57606a",fontSize:"14px"},empty:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",backgroundColor:"#ffffff",color:"#24292f",textAlign:"center",padding:"20px"},code:{backgroundColor:"#f6f8fa",border:"1px solid #d0d7de",padding:"15px 20px",borderRadius:"8px",fontFamily:"monospace",fontSize:"14px",color:"#0969da",marginTop:"10px"}};Yg.createRoot(document.getElementById("root")).render(c.jsx(wx.StrictMode,{children:c.jsx(tW,{})}));</script>
    <style rel="stylesheet" crossorigin>*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%;width:100%}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;background-color:#fff;color:#24292f;line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#f6f8fa}::-webkit-scrollbar-thumb{background:#d0d7de;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#afb8c1}a{color:#0969da;text-decoration:none}a:hover{text-decoration:underline}:focus-visible{outline:2px solid #0969da;outline-offset:2px}::selection{background:#0969da33}</style>
  </head>
  <body>
    <div id="root"></div>
  </body>
</html>