truecourse 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/cli.mjs +3 -0
  2. package/package.json +1 -1
  3. package/public/assets/index-2JAhA9Km.js +386 -0
  4. package/public/assets/index-vuAqJRVb.css +1 -0
  5. package/public/index.html +29 -12
  6. package/server.mjs +5 -36
  7. package/public/404.html +0 -12
  8. package/public/_next/static/chunks/381-85180243c39f893f.js +0 -1
  9. package/public/_next/static/chunks/552-6917726d81ee49a3.js +0 -1
  10. package/public/_next/static/chunks/572-f3883e9a1f12af9b.js +0 -1
  11. package/public/_next/static/chunks/597-bdc49f9b0afbcc65.js +0 -1
  12. package/public/_next/static/chunks/7273c211-cf17e181dbeacc49.js +0 -1
  13. package/public/_next/static/chunks/a51c26f2-8f567e78114a65f0.js +0 -1
  14. package/public/_next/static/chunks/app/_not-found/page-7ce89933d9d660c3.js +0 -1
  15. package/public/_next/static/chunks/app/layout-7b61f0cc08a2b70c.js +0 -1
  16. package/public/_next/static/chunks/app/page-cfec34672a92b197.js +0 -1
  17. package/public/_next/static/chunks/app/repos/[[...slug]]/page-775a75a81164bb72.js +0 -1
  18. package/public/_next/static/chunks/framework-56b72e8a5f911564.js +0 -1
  19. package/public/_next/static/chunks/main-19f32cbfea665136.js +0 -1
  20. package/public/_next/static/chunks/main-app-11a30c55aba12d50.js +0 -1
  21. package/public/_next/static/chunks/pages/_app-23d1cfabc23fb6da.js +0 -1
  22. package/public/_next/static/chunks/pages/_error-647008f4bf4249c2.js +0 -1
  23. package/public/_next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
  24. package/public/_next/static/chunks/webpack-f20a7a6e701c70d8.js +0 -1
  25. package/public/_next/static/css/599369d853c61df7.css +0 -31
  26. package/public/_next/static/css/bfb5d4bf473c84ea.css +0 -1
  27. package/public/_next/static/g3B4jJ8IBEpckT1UcilLp/_buildManifest.js +0 -1
  28. package/public/_next/static/g3B4jJ8IBEpckT1UcilLp/_ssgManifest.js +0 -1
  29. package/public/index.txt +0 -19
  30. package/public/repos.html +0 -12
  31. package/public/repos.txt +0 -17
@@ -0,0 +1,386 @@
1
+ var F4=Object.defineProperty;var $4=(e,t,n)=>t in e?F4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var bc=(e,t,n)=>$4(e,typeof t!="symbol"?t+"":t,n);function Y4(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const o in i)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(i,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>i[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const l of s.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();var wc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Hl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Np={exports:{}},tl={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var CE;function G4(){if(CE)return tl;CE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(i,o,s){var l=null;if(s!==void 0&&(l=""+s),o.key!==void 0&&(l=""+o.key),"key"in o){s={};for(var c in o)c!=="key"&&(s[c]=o[c])}else s=o;return o=s.ref,{$$typeof:e,type:i,key:l,ref:o!==void 0?o:null,props:s}}return tl.Fragment=t,tl.jsx=n,tl.jsxs=n,tl}var NE;function X4(){return NE||(NE=1,Np.exports=G4()),Np.exports}var b=X4(),kp={exports:{}},Qe={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var kE;function K4(){if(kE)return Qe;kE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.iterator;function v(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,S={};function w(D,$,q){this.props=D,this.context=$,this.refs=S,this.updater=q||_}w.prototype.isReactComponent={},w.prototype.setState=function(D,$){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,$,"setState")},w.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function N(){}N.prototype=w.prototype;function C(D,$,q){this.props=D,this.context=$,this.refs=S,this.updater=q||_}var k=C.prototype=new N;k.constructor=C,E(k,w.prototype),k.isPureReactComponent=!0;var M=Array.isArray;function R(){}var O={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function V(D,$,q){var Y=q.ref;return{$$typeof:e,type:D,key:$,ref:Y!==void 0?Y:null,props:q}}function K(D,$){return V(D.type,$,D.props)}function H(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function F(D){var $={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(q){return $[q]})}var X=/\/+/g;function L(D,$){return typeof D=="object"&&D!==null&&D.key!=null?F(""+D.key):$.toString(36)}function B(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(R,R):(D.status="pending",D.then(function($){D.status==="pending"&&(D.status="fulfilled",D.value=$)},function($){D.status==="pending"&&(D.status="rejected",D.reason=$)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function z(D,$,q,Y,Z){var W=typeof D;(W==="undefined"||W==="boolean")&&(D=null);var te=!1;if(D===null)te=!0;else switch(W){case"bigint":case"string":case"number":te=!0;break;case"object":switch(D.$$typeof){case e:case t:te=!0;break;case p:return te=D._init,z(te(D._payload),$,q,Y,Z)}}if(te)return Z=Z(D),te=Y===""?"."+L(D,0):Y,M(Z)?(q="",te!=null&&(q=te.replace(X,"$&/")+"/"),z(Z,$,q,"",function(me){return me})):Z!=null&&(H(Z)&&(Z=K(Z,q+(Z.key==null||D&&D.key===Z.key?"":(""+Z.key).replace(X,"$&/")+"/")+te)),$.push(Z)),1;te=0;var re=Y===""?".":Y+":";if(M(D))for(var se=0;se<D.length;se++)Y=D[se],W=re+L(Y,se),te+=z(Y,$,q,W,Z);else if(se=v(D),typeof se=="function")for(D=se.call(D),se=0;!(Y=D.next()).done;)Y=Y.value,W=re+L(Y,se++),te+=z(Y,$,q,W,Z);else if(W==="object"){if(typeof D.then=="function")return z(B(D),$,q,Y,Z);throw $=String(D),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return te}function U(D,$,q){if(D==null)return D;var Y=[],Z=0;return z(D,Y,"","",function(W){return $.call(q,W,Z++)}),Y}function G(D){if(D._status===-1){var $=D._result;$=$(),$.then(function(q){(D._status===0||D._status===-1)&&(D._status=1,D._result=q)},function(q){(D._status===0||D._status===-1)&&(D._status=2,D._result=q)}),D._status===-1&&(D._status=0,D._result=$)}if(D._status===1)return D._result.default;throw D._result}var Q=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},j={map:U,forEach:function(D,$,q){U(D,function(){$.apply(this,arguments)},q)},count:function(D){var $=0;return U(D,function(){$++}),$},toArray:function(D){return U(D,function($){return $})||[]},only:function(D){if(!H(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return Qe.Activity=m,Qe.Children=j,Qe.Component=w,Qe.Fragment=n,Qe.Profiler=o,Qe.PureComponent=C,Qe.StrictMode=i,Qe.Suspense=f,Qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,Qe.__COMPILER_RUNTIME={__proto__:null,c:function(D){return O.H.useMemoCache(D)}},Qe.cache=function(D){return function(){return D.apply(null,arguments)}},Qe.cacheSignal=function(){return null},Qe.cloneElement=function(D,$,q){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var Y=E({},D.props),Z=D.key;if($!=null)for(W in $.key!==void 0&&(Z=""+$.key),$)!I.call($,W)||W==="key"||W==="__self"||W==="__source"||W==="ref"&&$.ref===void 0||(Y[W]=$[W]);var W=arguments.length-2;if(W===1)Y.children=q;else if(1<W){for(var te=Array(W),re=0;re<W;re++)te[re]=arguments[re+2];Y.children=te}return V(D.type,Z,Y)},Qe.createContext=function(D){return D={$$typeof:l,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:s,_context:D},D},Qe.createElement=function(D,$,q){var Y,Z={},W=null;if($!=null)for(Y in $.key!==void 0&&(W=""+$.key),$)I.call($,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(Z[Y]=$[Y]);var te=arguments.length-2;if(te===1)Z.children=q;else if(1<te){for(var re=Array(te),se=0;se<te;se++)re[se]=arguments[se+2];Z.children=re}if(D&&D.defaultProps)for(Y in te=D.defaultProps,te)Z[Y]===void 0&&(Z[Y]=te[Y]);return V(D,W,Z)},Qe.createRef=function(){return{current:null}},Qe.forwardRef=function(D){return{$$typeof:c,render:D}},Qe.isValidElement=H,Qe.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:G}},Qe.memo=function(D,$){return{$$typeof:h,type:D,compare:$===void 0?null:$}},Qe.startTransition=function(D){var $=O.T,q={};O.T=q;try{var Y=D(),Z=O.S;Z!==null&&Z(q,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then(R,Q)}catch(W){Q(W)}finally{$!==null&&q.types!==null&&($.types=q.types),O.T=$}},Qe.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},Qe.use=function(D){return O.H.use(D)},Qe.useActionState=function(D,$,q){return O.H.useActionState(D,$,q)},Qe.useCallback=function(D,$){return O.H.useCallback(D,$)},Qe.useContext=function(D){return O.H.useContext(D)},Qe.useDebugValue=function(){},Qe.useDeferredValue=function(D,$){return O.H.useDeferredValue(D,$)},Qe.useEffect=function(D,$){return O.H.useEffect(D,$)},Qe.useEffectEvent=function(D){return O.H.useEffectEvent(D)},Qe.useId=function(){return O.H.useId()},Qe.useImperativeHandle=function(D,$,q){return O.H.useImperativeHandle(D,$,q)},Qe.useInsertionEffect=function(D,$){return O.H.useInsertionEffect(D,$)},Qe.useLayoutEffect=function(D,$){return O.H.useLayoutEffect(D,$)},Qe.useMemo=function(D,$){return O.H.useMemo(D,$)},Qe.useOptimistic=function(D,$){return O.H.useOptimistic(D,$)},Qe.useReducer=function(D,$,q){return O.H.useReducer(D,$,q)},Qe.useRef=function(D){return O.H.useRef(D)},Qe.useState=function(D){return O.H.useState(D)},Qe.useSyncExternalStore=function(D,$,q){return O.H.useSyncExternalStore(D,$,q)},Qe.useTransition=function(){return O.H.useTransition()},Qe.version="19.2.4",Qe}var TE;function Ul(){return TE||(TE=1,kp.exports=K4()),kp.exports}var T=Ul();const HM=Hl(T),UM=Y4({__proto__:null,default:HM},[T]);var Tp={exports:{}},nl={},Ap={exports:{}},Rp={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var AE;function Q4(){return AE||(AE=1,(function(e){function t(z,U){var G=z.length;z.push(U);e:for(;0<G;){var Q=G-1>>>1,j=z[Q];if(0<o(j,U))z[Q]=U,z[G]=j,G=Q;else break e}}function n(z){return z.length===0?null:z[0]}function i(z){if(z.length===0)return null;var U=z[0],G=z.pop();if(G!==U){z[0]=G;e:for(var Q=0,j=z.length,D=j>>>1;Q<D;){var $=2*(Q+1)-1,q=z[$],Y=$+1,Z=z[Y];if(0>o(q,G))Y<j&&0>o(Z,q)?(z[Q]=Z,z[Y]=G,Q=Y):(z[Q]=q,z[$]=G,Q=$);else if(Y<j&&0>o(Z,G))z[Q]=Z,z[Y]=G,Q=Y;else break e}}return U}function o(z,U){var G=z.sortIndex-U.sortIndex;return G!==0?G:z.id-U.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],h=[],p=1,m=null,g=3,v=!1,_=!1,E=!1,S=!1,w=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function k(z){for(var U=n(h);U!==null;){if(U.callback===null)i(h);else if(U.startTime<=z)i(h),U.sortIndex=U.expirationTime,t(f,U);else break;U=n(h)}}function M(z){if(E=!1,k(z),!_)if(n(f)!==null)_=!0,R||(R=!0,F());else{var U=n(h);U!==null&&B(M,U.startTime-z)}}var R=!1,O=-1,I=5,V=-1;function K(){return S?!0:!(e.unstable_now()-V<I)}function H(){if(S=!1,R){var z=e.unstable_now();V=z;var U=!0;try{e:{_=!1,E&&(E=!1,N(O),O=-1),v=!0;var G=g;try{t:{for(k(z),m=n(f);m!==null&&!(m.expirationTime>z&&K());){var Q=m.callback;if(typeof Q=="function"){m.callback=null,g=m.priorityLevel;var j=Q(m.expirationTime<=z);if(z=e.unstable_now(),typeof j=="function"){m.callback=j,k(z),U=!0;break t}m===n(f)&&i(f),k(z)}else i(f);m=n(f)}if(m!==null)U=!0;else{var D=n(h);D!==null&&B(M,D.startTime-z),U=!1}}break e}finally{m=null,g=G,v=!1}U=void 0}}finally{U?F():R=!1}}}var F;if(typeof C=="function")F=function(){C(H)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,L=X.port2;X.port1.onmessage=H,F=function(){L.postMessage(null)}}else F=function(){w(H,0)};function B(z,U){O=w(function(){z(e.unstable_now())},U)}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(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_next=function(z){switch(g){case 1:case 2:case 3:var U=3;break;default:U=g}var G=g;g=U;try{return z()}finally{g=G}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(z,U){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var G=g;g=z;try{return U()}finally{g=G}},e.unstable_scheduleCallback=function(z,U,G){var Q=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?Q+G:Q):G=Q,z){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=G+j,z={id:p++,callback:U,priorityLevel:z,startTime:G,expirationTime:j,sortIndex:-1},G>Q?(z.sortIndex=G,t(h,z),n(f)===null&&z===n(h)&&(E?(N(O),O=-1):E=!0,B(M,G-Q))):(z.sortIndex=j,t(f,z),_||v||(_=!0,R||(R=!0,F()))),z},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(z){var U=g;return function(){var G=g;g=U;try{return z.apply(this,arguments)}finally{g=G}}}})(Rp)),Rp}var RE;function Z4(){return RE||(RE=1,Ap.exports=Q4()),Ap.exports}var Mp={exports:{}},pn={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var ME;function W4(){if(ME)return pn;ME=1;var e=Ul();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(f,h,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:m==null?null:""+m,children:f,containerInfo:h,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return pn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,pn.createPortal=function(f,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return s(f,h,null,p)},pn.flushSync=function(f){var h=l.T,p=i.p;try{if(l.T=null,i.p=2,f)return f()}finally{l.T=h,i.p=p,i.d.f()}},pn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(f,h))},pn.prefetchDNS=function(f){typeof f=="string"&&i.d.D(f)},pn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var p=h.as,m=c(p,h.crossOrigin),g=typeof h.integrity=="string"?h.integrity:void 0,v=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?i.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:g,fetchPriority:v}):p==="script"&&i.d.X(f,{crossOrigin:m,integrity:g,fetchPriority:v,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},pn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=c(h.as,h.crossOrigin);i.d.M(f,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(f)},pn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,m=c(p,h.crossOrigin);i.d.L(f,p,{crossOrigin:m,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},pn.preloadModule=function(f,h){if(typeof f=="string")if(h){var p=c(h.as,h.crossOrigin);i.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(f)},pn.requestFormReset=function(f){i.d.r(f)},pn.unstable_batchedUpdates=function(f,h){return f(h)},pn.useFormState=function(f,h,p){return l.H.useFormState(f,h,p)},pn.useFormStatus=function(){return l.H.useHostTransitionStatus()},pn.version="19.2.4",pn}var jE;function PM(){if(jE)return Mp.exports;jE=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Mp.exports=W4(),Mp.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var OE;function J4(){if(OE)return nl;OE=1;var e=Z4(),t=Ul(),n=PM();function i(r){var a="https://react.dev/errors/"+r;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)a+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+r+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function s(r){var a=r,u=r;if(r.alternate)for(;a.return;)a=a.return;else{r=a;do a=r,(a.flags&4098)!==0&&(u=a.return),r=a.return;while(r)}return a.tag===3?u:null}function l(r){if(r.tag===13){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function c(r){if(r.tag===31){var a=r.memoizedState;if(a===null&&(r=r.alternate,r!==null&&(a=r.memoizedState)),a!==null)return a.dehydrated}return null}function f(r){if(s(r)!==r)throw Error(i(188))}function h(r){var a=r.alternate;if(!a){if(a=s(r),a===null)throw Error(i(188));return a!==r?null:r}for(var u=r,d=a;;){var y=u.return;if(y===null)break;var x=y.alternate;if(x===null){if(d=y.return,d!==null){u=d;continue}break}if(y.child===x.child){for(x=y.child;x;){if(x===u)return f(y),r;if(x===d)return f(y),a;x=x.sibling}throw Error(i(188))}if(u.return!==d.return)u=y,d=x;else{for(var A=!1,P=y.child;P;){if(P===u){A=!0,u=y,d=x;break}if(P===d){A=!0,d=y,u=x;break}P=P.sibling}if(!A){for(P=x.child;P;){if(P===u){A=!0,u=x,d=y;break}if(P===d){A=!0,d=x,u=y;break}P=P.sibling}if(!A)throw Error(i(189))}}if(u.alternate!==d)throw Error(i(190))}if(u.tag!==3)throw Error(i(188));return u.stateNode.current===u?r:a}function p(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r;for(r=r.child;r!==null;){if(a=p(r),a!==null)return a;r=r.sibling}return null}var m=Object.assign,g=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),N=Symbol.for("react.consumer"),C=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),V=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function F(r){return r===null||typeof r!="object"?null:(r=H&&r[H]||r["@@iterator"],typeof r=="function"?r:null)}var X=Symbol.for("react.client.reference");function L(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===X?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case E:return"Fragment";case w:return"Profiler";case S:return"StrictMode";case M:return"Suspense";case R:return"SuspenseList";case V:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case _:return"Portal";case C:return r.displayName||"Context";case N:return(r._context.displayName||"Context")+".Consumer";case k:var a=r.render;return r=r.displayName,r||(r=a.displayName||a.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case O:return a=r.displayName||null,a!==null?a:L(r.type)||"Memo";case I:a=r._payload,r=r._init;try{return L(r(a))}catch{}}return null}var B=Array.isArray,z=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},Q=[],j=-1;function D(r){return{current:r}}function $(r){0>j||(r.current=Q[j],Q[j]=null,j--)}function q(r,a){j++,Q[j]=r.current,r.current=a}var Y=D(null),Z=D(null),W=D(null),te=D(null);function re(r,a){switch(q(W,a),q(Z,r),q(Y,null),a.nodeType){case 9:case 11:r=(r=a.documentElement)&&(r=r.namespaceURI)?XS(r):0;break;default:if(r=a.tagName,a=a.namespaceURI)a=XS(a),r=KS(a,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}$(Y),q(Y,r)}function se(){$(Y),$(Z),$(W)}function me(r){r.memoizedState!==null&&q(te,r);var a=Y.current,u=KS(a,r.type);a!==u&&(q(Z,r),q(Y,u))}function be(r){Z.current===r&&($(Y),$(Z)),te.current===r&&($(te),Zs._currentValue=G)}var ve,we;function ke(r){if(ve===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);ve=a&&a[1]||"",we=-1<u.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+ve+r+we}var Ne=!1;function Oe(r,a){if(!r||Ne)return"";Ne=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(a){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(le){var oe=le}Reflect.construct(r,[],de)}else{try{de.call()}catch(le){oe=le}r.call(de.prototype)}}else{try{throw Error()}catch(le){oe=le}(de=r())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(le){if(le&&oe&&typeof le.stack=="string")return[le.stack,oe.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=d.DetermineComponentFrameRoot(),A=x[0],P=x[1];if(A&&P){var J=A.split(`
44
+ `),ae=P.split(`
45
+ `);for(y=d=0;d<J.length&&!J[d].includes("DetermineComponentFrameRoot");)d++;for(;y<ae.length&&!ae[y].includes("DetermineComponentFrameRoot");)y++;if(d===J.length||y===ae.length)for(d=J.length-1,y=ae.length-1;1<=d&&0<=y&&J[d]!==ae[y];)y--;for(;1<=d&&0<=y;d--,y--)if(J[d]!==ae[y]){if(d!==1||y!==1)do if(d--,y--,0>y||J[d]!==ae[y]){var ce=`
46
+ `+J[d].replace(" at new "," at ");return r.displayName&&ce.includes("<anonymous>")&&(ce=ce.replace("<anonymous>",r.displayName)),ce}while(1<=d&&0<=y);break}}}finally{Ne=!1,Error.prepareStackTrace=u}return(u=r?r.displayName||r.name:"")?ke(u):""}function Te(r,a){switch(r.tag){case 26:case 27:case 5:return ke(r.type);case 16:return ke("Lazy");case 13:return r.child!==a&&a!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return Oe(r.type,!1);case 11:return Oe(r.type.render,!1);case 1:return Oe(r.type,!0);case 31:return ke("Activity");default:return""}}function _t(r){try{var a="",u=null;do a+=Te(r,u),u=r,r=r.return;while(r);return a}catch(d){return`
47
+ Error generating stack: `+d.message+`
48
+ `+d.stack}}var he=Object.prototype.hasOwnProperty,ye=e.unstable_scheduleCallback,Ue=e.unstable_cancelCallback,_e=e.unstable_shouldYield,Ie=e.unstable_requestPaint,Ve=e.unstable_now,jt=e.unstable_getCurrentPriorityLevel,ue=e.unstable_ImmediatePriority,pe=e.unstable_UserBlockingPriority,Me=e.unstable_NormalPriority,$e=e.unstable_LowPriority,Ge=e.unstable_IdlePriority,Ot=e.log,en=e.unstable_setDisableYieldValue,xt=null,ct=null;function Ht(r){if(typeof Ot=="function"&&en(r),ct&&typeof ct.setStrictMode=="function")try{ct.setStrictMode(xt,r)}catch{}}var ft=Math.clz32?Math.clz32:Ce,dn=Math.log,tn=Math.LN2;function Ce(r){return r>>>=0,r===0?32:31-(dn(r)/tn|0)|0}var Se=256,Be=262144,tt=4194304;function Re(r){var a=r&42;if(a!==0)return a;switch(r&-r){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Fe(r,a,u){var d=r.pendingLanes;if(d===0)return 0;var y=0,x=r.suspendedLanes,A=r.pingedLanes;r=r.warmLanes;var P=d&134217727;return P!==0?(d=P&~x,d!==0?y=Re(d):(A&=P,A!==0?y=Re(A):u||(u=P&~r,u!==0&&(y=Re(u))))):(P=d&~x,P!==0?y=Re(P):A!==0?y=Re(A):u||(u=d&~r,u!==0&&(y=Re(u)))),y===0?0:a!==0&&a!==y&&(a&x)===0&&(x=y&-y,u=a&-a,x>=u||x===32&&(u&4194048)!==0)?a:y}function Ke(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function ge(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function De(){var r=tt;return tt<<=1,(tt&62914560)===0&&(tt=4194304),r}function ht(r){for(var a=[],u=0;31>u;u++)a.push(r);return a}function dt(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Ae(r,a,u,d,y,x){var A=r.pendingLanes;r.pendingLanes=u,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=u,r.entangledLanes&=u,r.errorRecoveryDisabledLanes&=u,r.shellSuspendCounter=0;var P=r.entanglements,J=r.expirationTimes,ae=r.hiddenUpdates;for(u=A&~u;0<u;){var ce=31-ft(u),de=1<<ce;P[ce]=0,J[ce]=-1;var oe=ae[ce];if(oe!==null)for(ae[ce]=null,ce=0;ce<oe.length;ce++){var le=oe[ce];le!==null&&(le.lane&=-536870913)}u&=~de}d!==0&&at(r,d,0),x!==0&&y===0&&r.tag!==0&&(r.suspendedLanes|=x&~(A&~a))}function at(r,a,u){r.pendingLanes|=a,r.suspendedLanes&=~a;var d=31-ft(a);r.entangledLanes|=a,r.entanglements[d]=r.entanglements[d]|1073741824|u&261930}function Gn(r,a){var u=r.entangledLanes|=a;for(r=r.entanglements;u;){var d=31-ft(u),y=1<<d;y&a|r[d]&a&&(r[d]|=a),u&=~y}}function nn(r,a){var u=a&-a;return u=(u&42)!==0?1:Ft(u),(u&(r.suspendedLanes|a))!==0?0:u}function Ft(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function Xn(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function xi(){var r=U.p;return r!==0?r:(r=window.event,r===void 0?32:vE(r.type))}function dr(r,a){var u=U.p;try{return U.p=r,a()}finally{U.p=u}}var gn=Math.random().toString(36).slice(2),Ut="__reactFiber$"+gn,hn="__reactProps$"+gn,Vr="__reactContainer$"+gn,Ya="__reactEvents$"+gn,ru="__reactListeners$"+gn,yd="__reactHandles$"+gn,iu="__reactResources$"+gn,ca="__reactMarker$"+gn;function fs(r){delete r[Ut],delete r[hn],delete r[Ya],delete r[ru],delete r[yd]}function bi(r){var a=r[Ut];if(a)return a;for(var u=r.parentNode;u;){if(a=u[Vr]||u[Ut]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(r=nE(r);r!==null;){if(u=r[Ut])return u;r=nE(r)}return a}r=u,u=r.parentNode}return null}function wi(r){if(r=r[Ut]||r[Vr]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function _i(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(i(33))}function Si(r){var a=r[iu];return a||(a=r[iu]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function $t(r){r[ca]=!0}var au=new Set,ou={};function Fr(r,a){Ei(r,a),Ei(r+"Capture",a)}function Ei(r,a){for(ou[r]=a,r=0;r<a.length;r++)au.add(a[r])}var vd=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),ds={},su={};function xd(r){return he.call(su,r)?!0:he.call(ds,r)?!1:vd.test(r)?su[r]=!0:(ds[r]=!0,!1)}function Ga(r,a,u){if(xd(a))if(u===null)r.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var d=a.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+u)}}function Xa(r,a,u){if(u===null)r.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+u)}}function hr(r,a,u,d){if(d===null)r.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(u);return}r.setAttributeNS(a,u,""+d)}}function bn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function lu(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function bd(r,a,u){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var y=d.get,x=d.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return y.call(this)},set:function(A){u=""+A,x.call(this,A)}}),Object.defineProperty(r,a,{enumerable:d.enumerable}),{getValue:function(){return u},setValue:function(A){u=""+A},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function Ci(r){if(!r._valueTracker){var a=lu(r)?"checked":"value";r._valueTracker=bd(r,a,""+r[a])}}function uu(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var u=a.getValue(),d="";return r&&(d=lu(r)?r.checked?"true":"false":r.value),r=d,r!==u?(a.setValue(r),!0):!1}function fa(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var wd=/[\n"\\]/g;function wn(r){return r.replace(wd,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function da(r,a,u,d,y,x,A,P){r.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?r.type=A:r.removeAttribute("type"),a!=null?A==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+bn(a)):r.value!==""+bn(a)&&(r.value=""+bn(a)):A!=="submit"&&A!=="reset"||r.removeAttribute("value"),a!=null?hs(r,A,bn(a)):u!=null?hs(r,A,bn(u)):d!=null&&r.removeAttribute("value"),y==null&&x!=null&&(r.defaultChecked=!!x),y!=null&&(r.checked=y&&typeof y!="function"&&typeof y!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?r.name=""+bn(P):r.removeAttribute("name")}function cu(r,a,u,d,y,x,A,P){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(r.type=x),a!=null||u!=null){if(!(x!=="submit"&&x!=="reset"||a!=null)){Ci(r);return}u=u!=null?""+bn(u):"",a=a!=null?""+bn(a):u,P||a===r.value||(r.value=a),r.defaultValue=a}d=d??y,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=P?r.checked:!!d,r.defaultChecked=!!d,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(r.name=A),Ci(r)}function hs(r,a,u){a==="number"&&fa(r.ownerDocument)===r||r.defaultValue===""+u||(r.defaultValue=""+u)}function $r(r,a,u,d){if(r=r.options,a){a={};for(var y=0;y<u.length;y++)a["$"+u[y]]=!0;for(u=0;u<r.length;u++)y=a.hasOwnProperty("$"+r[u].value),r[u].selected!==y&&(r[u].selected=y),y&&d&&(r[u].defaultSelected=!0)}else{for(u=""+bn(u),a=null,y=0;y<r.length;y++){if(r[y].value===u){r[y].selected=!0,d&&(r[y].defaultSelected=!0);return}a!==null||r[y].disabled||(a=r[y])}a!==null&&(a.selected=!0)}}function V1(r,a,u){if(a!=null&&(a=""+bn(a),a!==r.value&&(r.value=a),u==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=u!=null?""+bn(u):""}function F1(r,a,u,d){if(a==null){if(d!=null){if(u!=null)throw Error(i(92));if(B(d)){if(1<d.length)throw Error(i(93));d=d[0]}u=d}u==null&&(u=""),a=u}u=bn(a),r.defaultValue=u,d=r.textContent,d===u&&d!==""&&d!==null&&(r.value=d),Ci(r)}function Ka(r,a){if(a){var u=r.firstChild;if(u&&u===r.lastChild&&u.nodeType===3){u.nodeValue=a;return}}r.textContent=a}var Bz=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function $1(r,a,u){var d=a.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?d?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":d?r.setProperty(a,u):typeof u!="number"||u===0||Bz.has(a)?a==="float"?r.cssFloat=u:r[a]=(""+u).trim():r[a]=u+"px"}function Y1(r,a,u){if(a!=null&&typeof a!="object")throw Error(i(62));if(r=r.style,u!=null){for(var d in u)!u.hasOwnProperty(d)||a!=null&&a.hasOwnProperty(d)||(d.indexOf("--")===0?r.setProperty(d,""):d==="float"?r.cssFloat="":r[d]="");for(var y in a)d=a[y],a.hasOwnProperty(y)&&u[y]!==d&&$1(r,y,d)}else for(var x in a)a.hasOwnProperty(x)&&$1(r,x,a[x])}function _d(r){if(r.indexOf("-")===-1)return!1;switch(r){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 Hz=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Uz=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function fu(r){return Uz.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Yr(){}var Sd=null;function Ed(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Qa=null,Za=null;function G1(r){var a=wi(r);if(a&&(r=a.stateNode)){var u=r[hn]||null;e:switch(r=a.stateNode,a.type){case"input":if(da(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),a=u.name,u.type==="radio"&&a!=null){for(u=r;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+wn(""+a)+'"][type="radio"]'),a=0;a<u.length;a++){var d=u[a];if(d!==r&&d.form===r.form){var y=d[hn]||null;if(!y)throw Error(i(90));da(d,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(a=0;a<u.length;a++)d=u[a],d.form===r.form&&uu(d)}break e;case"textarea":V1(r,u.value,u.defaultValue);break e;case"select":a=u.value,a!=null&&$r(r,!!u.multiple,a,!1)}}}var Cd=!1;function X1(r,a,u){if(Cd)return r(a,u);Cd=!0;try{var d=r(a);return d}finally{if(Cd=!1,(Qa!==null||Za!==null)&&(Wu(),Qa&&(a=Qa,r=Za,Za=Qa=null,G1(a),r)))for(a=0;a<r.length;a++)G1(r[a])}}function ps(r,a){var u=r.stateNode;if(u===null)return null;var d=u[hn]||null;if(d===null)return null;u=d[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(u&&typeof u!="function")throw Error(i(231,a,typeof u));return u}var Gr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nd=!1;if(Gr)try{var ms={};Object.defineProperty(ms,"passive",{get:function(){Nd=!0}}),window.addEventListener("test",ms,ms),window.removeEventListener("test",ms,ms)}catch{Nd=!1}var Ni=null,kd=null,du=null;function K1(){if(du)return du;var r,a=kd,u=a.length,d,y="value"in Ni?Ni.value:Ni.textContent,x=y.length;for(r=0;r<u&&a[r]===y[r];r++);var A=u-r;for(d=1;d<=A&&a[u-d]===y[x-d];d++);return du=y.slice(r,1<d?1-d:void 0)}function hu(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function pu(){return!0}function Q1(){return!1}function _n(r){function a(u,d,y,x,A){this._reactName=u,this._targetInst=y,this.type=d,this.nativeEvent=x,this.target=A,this.currentTarget=null;for(var P in r)r.hasOwnProperty(P)&&(u=r[P],this[P]=u?u(x):x[P]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?pu:Q1,this.isPropagationStopped=Q1,this}return m(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=pu)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=pu)},persist:function(){},isPersistent:pu}),a}var ha={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mu=_n(ha),gs=m({},ha,{view:0,detail:0}),Pz=_n(gs),Td,Ad,ys,gu=m({},gs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Md,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==ys&&(ys&&r.type==="mousemove"?(Td=r.screenX-ys.screenX,Ad=r.screenY-ys.screenY):Ad=Td=0,ys=r),Td)},movementY:function(r){return"movementY"in r?r.movementY:Ad}}),Z1=_n(gu),Vz=m({},gu,{dataTransfer:0}),Fz=_n(Vz),$z=m({},gs,{relatedTarget:0}),Rd=_n($z),Yz=m({},ha,{animationName:0,elapsedTime:0,pseudoElement:0}),Gz=_n(Yz),Xz=m({},ha,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Kz=_n(Xz),Qz=m({},ha,{data:0}),W1=_n(Qz),Zz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Wz={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"},Jz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eD(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=Jz[r])?!!a[r]:!1}function Md(){return eD}var tD=m({},gs,{key:function(r){if(r.key){var a=Zz[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=hu(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?Wz[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Md,charCode:function(r){return r.type==="keypress"?hu(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?hu(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),nD=_n(tD),rD=m({},gu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),J1=_n(rD),iD=m({},gs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Md}),aD=_n(iD),oD=m({},ha,{propertyName:0,elapsedTime:0,pseudoElement:0}),sD=_n(oD),lD=m({},gu,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),uD=_n(lD),cD=m({},ha,{newState:0,oldState:0}),fD=_n(cD),dD=[9,13,27,32],jd=Gr&&"CompositionEvent"in window,vs=null;Gr&&"documentMode"in document&&(vs=document.documentMode);var hD=Gr&&"TextEvent"in window&&!vs,ew=Gr&&(!jd||vs&&8<vs&&11>=vs),tw=" ",nw=!1;function rw(r,a){switch(r){case"keyup":return dD.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function iw(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Wa=!1;function pD(r,a){switch(r){case"compositionend":return iw(a);case"keypress":return a.which!==32?null:(nw=!0,tw);case"textInput":return r=a.data,r===tw&&nw?null:r;default:return null}}function mD(r,a){if(Wa)return r==="compositionend"||!jd&&rw(r,a)?(r=K1(),du=kd=Ni=null,Wa=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return ew&&a.locale!=="ko"?null:a.data;default:return null}}var gD={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 aw(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!gD[r.type]:a==="textarea"}function ow(r,a,u,d){Qa?Za?Za.push(d):Za=[d]:Qa=d,a=ac(a,"onChange"),0<a.length&&(u=new mu("onChange","change",null,u,d),r.push({event:u,listeners:a}))}var xs=null,bs=null;function yD(r){PS(r,0)}function yu(r){var a=_i(r);if(uu(a))return r}function sw(r,a){if(r==="change")return a}var lw=!1;if(Gr){var Od;if(Gr){var zd="oninput"in document;if(!zd){var uw=document.createElement("div");uw.setAttribute("oninput","return;"),zd=typeof uw.oninput=="function"}Od=zd}else Od=!1;lw=Od&&(!document.documentMode||9<document.documentMode)}function cw(){xs&&(xs.detachEvent("onpropertychange",fw),bs=xs=null)}function fw(r){if(r.propertyName==="value"&&yu(bs)){var a=[];ow(a,bs,r,Ed(r)),X1(yD,a)}}function vD(r,a,u){r==="focusin"?(cw(),xs=a,bs=u,xs.attachEvent("onpropertychange",fw)):r==="focusout"&&cw()}function xD(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return yu(bs)}function bD(r,a){if(r==="click")return yu(a)}function wD(r,a){if(r==="input"||r==="change")return yu(a)}function _D(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var zn=typeof Object.is=="function"?Object.is:_D;function ws(r,a){if(zn(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var u=Object.keys(r),d=Object.keys(a);if(u.length!==d.length)return!1;for(d=0;d<u.length;d++){var y=u[d];if(!he.call(a,y)||!zn(r[y],a[y]))return!1}return!0}function dw(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function hw(r,a){var u=dw(r);r=0;for(var d;u;){if(u.nodeType===3){if(d=r+u.textContent.length,r<=a&&d>=a)return{node:u,offset:a-r};r=d}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=dw(u)}}function pw(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?pw(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function mw(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=fa(r.document);a instanceof r.HTMLIFrameElement;){try{var u=typeof a.contentWindow.location.href=="string"}catch{u=!1}if(u)r=a.contentWindow;else break;a=fa(r.document)}return a}function Dd(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var SD=Gr&&"documentMode"in document&&11>=document.documentMode,Ja=null,Ld=null,_s=null,qd=!1;function gw(r,a,u){var d=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;qd||Ja==null||Ja!==fa(d)||(d=Ja,"selectionStart"in d&&Dd(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),_s&&ws(_s,d)||(_s=d,d=ac(Ld,"onSelect"),0<d.length&&(a=new mu("onSelect","select",null,a,u),r.push({event:a,listeners:d}),a.target=Ja)))}function pa(r,a){var u={};return u[r.toLowerCase()]=a.toLowerCase(),u["Webkit"+r]="webkit"+a,u["Moz"+r]="moz"+a,u}var eo={animationend:pa("Animation","AnimationEnd"),animationiteration:pa("Animation","AnimationIteration"),animationstart:pa("Animation","AnimationStart"),transitionrun:pa("Transition","TransitionRun"),transitionstart:pa("Transition","TransitionStart"),transitioncancel:pa("Transition","TransitionCancel"),transitionend:pa("Transition","TransitionEnd")},Id={},yw={};Gr&&(yw=document.createElement("div").style,"AnimationEvent"in window||(delete eo.animationend.animation,delete eo.animationiteration.animation,delete eo.animationstart.animation),"TransitionEvent"in window||delete eo.transitionend.transition);function ma(r){if(Id[r])return Id[r];if(!eo[r])return r;var a=eo[r],u;for(u in a)if(a.hasOwnProperty(u)&&u in yw)return Id[r]=a[u];return r}var vw=ma("animationend"),xw=ma("animationiteration"),bw=ma("animationstart"),ED=ma("transitionrun"),CD=ma("transitionstart"),ND=ma("transitioncancel"),ww=ma("transitionend"),_w=new Map,Bd="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Bd.push("scrollEnd");function pr(r,a){_w.set(r,a),Fr(a,[r])}var vu=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Kn=[],to=0,Hd=0;function xu(){for(var r=to,a=Hd=to=0;a<r;){var u=Kn[a];Kn[a++]=null;var d=Kn[a];Kn[a++]=null;var y=Kn[a];Kn[a++]=null;var x=Kn[a];if(Kn[a++]=null,d!==null&&y!==null){var A=d.pending;A===null?y.next=y:(y.next=A.next,A.next=y),d.pending=y}x!==0&&Sw(u,y,x)}}function bu(r,a,u,d){Kn[to++]=r,Kn[to++]=a,Kn[to++]=u,Kn[to++]=d,Hd|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function Ud(r,a,u,d){return bu(r,a,u,d),wu(r)}function ga(r,a){return bu(r,null,null,a),wu(r)}function Sw(r,a,u){r.lanes|=u;var d=r.alternate;d!==null&&(d.lanes|=u);for(var y=!1,x=r.return;x!==null;)x.childLanes|=u,d=x.alternate,d!==null&&(d.childLanes|=u),x.tag===22&&(r=x.stateNode,r===null||r._visibility&1||(y=!0)),r=x,x=x.return;return r.tag===3?(x=r.stateNode,y&&a!==null&&(y=31-ft(u),r=x.hiddenUpdates,d=r[y],d===null?r[y]=[a]:d.push(a),a.lane=u|536870912),x):null}function wu(r){if(50<Fs)throw Fs=0,Qh=null,Error(i(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var no={};function kD(r,a,u,d){this.tag=r,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(r,a,u,d){return new kD(r,a,u,d)}function Pd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Xr(r,a){var u=r.alternate;return u===null?(u=Dn(r.tag,a,r.key,r.mode),u.elementType=r.elementType,u.type=r.type,u.stateNode=r.stateNode,u.alternate=r,r.alternate=u):(u.pendingProps=a,u.type=r.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=r.flags&65011712,u.childLanes=r.childLanes,u.lanes=r.lanes,u.child=r.child,u.memoizedProps=r.memoizedProps,u.memoizedState=r.memoizedState,u.updateQueue=r.updateQueue,a=r.dependencies,u.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},u.sibling=r.sibling,u.index=r.index,u.ref=r.ref,u.refCleanup=r.refCleanup,u}function Ew(r,a){r.flags&=65011714;var u=r.alternate;return u===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=u.childLanes,r.lanes=u.lanes,r.child=u.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=u.memoizedProps,r.memoizedState=u.memoizedState,r.updateQueue=u.updateQueue,r.type=u.type,a=u.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function _u(r,a,u,d,y,x){var A=0;if(d=r,typeof r=="function")Pd(r)&&(A=1);else if(typeof r=="string")A=j4(r,u,Y.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case V:return r=Dn(31,u,a,y),r.elementType=V,r.lanes=x,r;case E:return ya(u.children,y,x,a);case S:A=8,y|=24;break;case w:return r=Dn(12,u,a,y|2),r.elementType=w,r.lanes=x,r;case M:return r=Dn(13,u,a,y),r.elementType=M,r.lanes=x,r;case R:return r=Dn(19,u,a,y),r.elementType=R,r.lanes=x,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case C:A=10;break e;case N:A=9;break e;case k:A=11;break e;case O:A=14;break e;case I:A=16,d=null;break e}A=29,u=Error(i(130,r===null?"null":typeof r,"")),d=null}return a=Dn(A,u,a,y),a.elementType=r,a.type=d,a.lanes=x,a}function ya(r,a,u,d){return r=Dn(7,r,d,a),r.lanes=u,r}function Vd(r,a,u){return r=Dn(6,r,null,a),r.lanes=u,r}function Cw(r){var a=Dn(18,null,null,0);return a.stateNode=r,a}function Fd(r,a,u){return a=Dn(4,r.children!==null?r.children:[],r.key,a),a.lanes=u,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var Nw=new WeakMap;function Qn(r,a){if(typeof r=="object"&&r!==null){var u=Nw.get(r);return u!==void 0?u:(a={value:r,source:a,stack:_t(a)},Nw.set(r,a),a)}return{value:r,source:a,stack:_t(a)}}var ro=[],io=0,Su=null,Ss=0,Zn=[],Wn=0,ki=null,Tr=1,Ar="";function Kr(r,a){ro[io++]=Ss,ro[io++]=Su,Su=r,Ss=a}function kw(r,a,u){Zn[Wn++]=Tr,Zn[Wn++]=Ar,Zn[Wn++]=ki,ki=r;var d=Tr;r=Ar;var y=32-ft(d)-1;d&=~(1<<y),u+=1;var x=32-ft(a)+y;if(30<x){var A=y-y%5;x=(d&(1<<A)-1).toString(32),d>>=A,y-=A,Tr=1<<32-ft(a)+y|u<<y|d,Ar=x+r}else Tr=1<<x|u<<y|d,Ar=r}function $d(r){r.return!==null&&(Kr(r,1),kw(r,1,0))}function Yd(r){for(;r===Su;)Su=ro[--io],ro[io]=null,Ss=ro[--io],ro[io]=null;for(;r===ki;)ki=Zn[--Wn],Zn[Wn]=null,Ar=Zn[--Wn],Zn[Wn]=null,Tr=Zn[--Wn],Zn[Wn]=null}function Tw(r,a){Zn[Wn++]=Tr,Zn[Wn++]=Ar,Zn[Wn++]=ki,Tr=a.id,Ar=a.overflow,ki=r}var sn=null,At=null,lt=!1,Ti=null,Jn=!1,Gd=Error(i(519));function Ai(r){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Es(Qn(a,r)),Gd}function Aw(r){var a=r.stateNode,u=r.type,d=r.memoizedProps;switch(a[Ut]=r,a[hn]=d,u){case"dialog":rt("cancel",a),rt("close",a);break;case"iframe":case"object":case"embed":rt("load",a);break;case"video":case"audio":for(u=0;u<Ys.length;u++)rt(Ys[u],a);break;case"source":rt("error",a);break;case"img":case"image":case"link":rt("error",a),rt("load",a);break;case"details":rt("toggle",a);break;case"input":rt("invalid",a),cu(a,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":rt("invalid",a);break;case"textarea":rt("invalid",a),F1(a,d.value,d.defaultValue,d.children)}u=d.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||a.textContent===""+u||d.suppressHydrationWarning===!0||YS(a.textContent,u)?(d.popover!=null&&(rt("beforetoggle",a),rt("toggle",a)),d.onScroll!=null&&rt("scroll",a),d.onScrollEnd!=null&&rt("scrollend",a),d.onClick!=null&&(a.onclick=Yr),a=!0):a=!1,a||Ai(r,!0)}function Rw(r){for(sn=r.return;sn;)switch(sn.tag){case 5:case 31:case 13:Jn=!1;return;case 27:case 3:Jn=!0;return;default:sn=sn.return}}function ao(r){if(r!==sn)return!1;if(!lt)return Rw(r),lt=!0,!1;var a=r.tag,u;if((u=a!==3&&a!==27)&&((u=a===5)&&(u=r.type,u=!(u!=="form"&&u!=="button")||fp(r.type,r.memoizedProps)),u=!u),u&&At&&Ai(r),Rw(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));At=tE(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));At=tE(r)}else a===27?(a=At,Vi(r.type)?(r=gp,gp=null,At=r):At=a):At=sn?tr(r.stateNode.nextSibling):null;return!0}function va(){At=sn=null,lt=!1}function Xd(){var r=Ti;return r!==null&&(Nn===null?Nn=r:Nn.push.apply(Nn,r),Ti=null),r}function Es(r){Ti===null?Ti=[r]:Ti.push(r)}var Kd=D(null),xa=null,Qr=null;function Ri(r,a,u){q(Kd,a._currentValue),a._currentValue=u}function Zr(r){r._currentValue=Kd.current,$(Kd)}function Qd(r,a,u){for(;r!==null;){var d=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,d!==null&&(d.childLanes|=a)):d!==null&&(d.childLanes&a)!==a&&(d.childLanes|=a),r===u)break;r=r.return}}function Zd(r,a,u,d){var y=r.child;for(y!==null&&(y.return=r);y!==null;){var x=y.dependencies;if(x!==null){var A=y.child;x=x.firstContext;e:for(;x!==null;){var P=x;x=y;for(var J=0;J<a.length;J++)if(P.context===a[J]){x.lanes|=u,P=x.alternate,P!==null&&(P.lanes|=u),Qd(x.return,u,r),d||(A=null);break e}x=P.next}}else if(y.tag===18){if(A=y.return,A===null)throw Error(i(341));A.lanes|=u,x=A.alternate,x!==null&&(x.lanes|=u),Qd(A,u,r),A=null}else A=y.child;if(A!==null)A.return=y;else for(A=y;A!==null;){if(A===r){A=null;break}if(y=A.sibling,y!==null){y.return=A.return,A=y;break}A=A.return}y=A}}function oo(r,a,u,d){r=null;for(var y=a,x=!1;y!==null;){if(!x){if((y.flags&524288)!==0)x=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var A=y.alternate;if(A===null)throw Error(i(387));if(A=A.memoizedProps,A!==null){var P=y.type;zn(y.pendingProps.value,A.value)||(r!==null?r.push(P):r=[P])}}else if(y===te.current){if(A=y.alternate,A===null)throw Error(i(387));A.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(r!==null?r.push(Zs):r=[Zs])}y=y.return}r!==null&&Zd(a,r,u,d),a.flags|=262144}function Eu(r){for(r=r.firstContext;r!==null;){if(!zn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function ba(r){xa=r,Qr=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function ln(r){return Mw(xa,r)}function Cu(r,a){return xa===null&&ba(r),Mw(r,a)}function Mw(r,a){var u=a._currentValue;if(a={context:a,memoizedValue:u,next:null},Qr===null){if(r===null)throw Error(i(308));Qr=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else Qr=Qr.next=a;return u}var TD=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(u,d){r.push(d)}};this.abort=function(){a.aborted=!0,r.forEach(function(u){return u()})}},AD=e.unstable_scheduleCallback,RD=e.unstable_NormalPriority,Yt={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wd(){return{controller:new TD,data:new Map,refCount:0}}function Cs(r){r.refCount--,r.refCount===0&&AD(RD,function(){r.controller.abort()})}var Ns=null,Jd=0,so=0,lo=null;function MD(r,a){if(Ns===null){var u=Ns=[];Jd=0,so=np(),lo={status:"pending",value:void 0,then:function(d){u.push(d)}}}return Jd++,a.then(jw,jw),a}function jw(){if(--Jd===0&&Ns!==null){lo!==null&&(lo.status="fulfilled");var r=Ns;Ns=null,so=0,lo=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function jD(r,a){var u=[],d={status:"pending",value:null,reason:null,then:function(y){u.push(y)}};return r.then(function(){d.status="fulfilled",d.value=a;for(var y=0;y<u.length;y++)(0,u[y])(a)},function(y){for(d.status="rejected",d.reason=y,y=0;y<u.length;y++)(0,u[y])(void 0)}),d}var Ow=z.S;z.S=function(r,a){gS=Ve(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&MD(r,a),Ow!==null&&Ow(r,a)};var wa=D(null);function eh(){var r=wa.current;return r!==null?r:Nt.pooledCache}function Nu(r,a){a===null?q(wa,wa.current):q(wa,a.pool)}function zw(){var r=eh();return r===null?null:{parent:Yt._currentValue,pool:r}}var uo=Error(i(460)),th=Error(i(474)),ku=Error(i(542)),Tu={then:function(){}};function Dw(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Lw(r,a,u){switch(u=r[u],u===void 0?r.push(a):u!==a&&(a.then(Yr,Yr),a=u),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,Iw(r),r;default:if(typeof a.status=="string")a.then(Yr,Yr);else{if(r=Nt,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=a,r.status="pending",r.then(function(d){if(a.status==="pending"){var y=a;y.status="fulfilled",y.value=d}},function(d){if(a.status==="pending"){var y=a;y.status="rejected",y.reason=d}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,Iw(r),r}throw Sa=a,uo}}function _a(r){try{var a=r._init;return a(r._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Sa=u,uo):u}}var Sa=null;function qw(){if(Sa===null)throw Error(i(459));var r=Sa;return Sa=null,r}function Iw(r){if(r===uo||r===ku)throw Error(i(483))}var co=null,ks=0;function Au(r){var a=ks;return ks+=1,co===null&&(co=[]),Lw(co,r,a)}function Ts(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function Ru(r,a){throw a.$$typeof===g?Error(i(525)):(r=Object.prototype.toString.call(a),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function Bw(r){function a(ne,ee){if(r){var ie=ne.deletions;ie===null?(ne.deletions=[ee],ne.flags|=16):ie.push(ee)}}function u(ne,ee){if(!r)return null;for(;ee!==null;)a(ne,ee),ee=ee.sibling;return null}function d(ne){for(var ee=new Map;ne!==null;)ne.key!==null?ee.set(ne.key,ne):ee.set(ne.index,ne),ne=ne.sibling;return ee}function y(ne,ee){return ne=Xr(ne,ee),ne.index=0,ne.sibling=null,ne}function x(ne,ee,ie){return ne.index=ie,r?(ie=ne.alternate,ie!==null?(ie=ie.index,ie<ee?(ne.flags|=67108866,ee):ie):(ne.flags|=67108866,ee)):(ne.flags|=1048576,ee)}function A(ne){return r&&ne.alternate===null&&(ne.flags|=67108866),ne}function P(ne,ee,ie,fe){return ee===null||ee.tag!==6?(ee=Vd(ie,ne.mode,fe),ee.return=ne,ee):(ee=y(ee,ie),ee.return=ne,ee)}function J(ne,ee,ie,fe){var He=ie.type;return He===E?ce(ne,ee,ie.props.children,fe,ie.key):ee!==null&&(ee.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===I&&_a(He)===ee.type)?(ee=y(ee,ie.props),Ts(ee,ie),ee.return=ne,ee):(ee=_u(ie.type,ie.key,ie.props,null,ne.mode,fe),Ts(ee,ie),ee.return=ne,ee)}function ae(ne,ee,ie,fe){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==ie.containerInfo||ee.stateNode.implementation!==ie.implementation?(ee=Fd(ie,ne.mode,fe),ee.return=ne,ee):(ee=y(ee,ie.children||[]),ee.return=ne,ee)}function ce(ne,ee,ie,fe,He){return ee===null||ee.tag!==7?(ee=ya(ie,ne.mode,fe,He),ee.return=ne,ee):(ee=y(ee,ie),ee.return=ne,ee)}function de(ne,ee,ie){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=Vd(""+ee,ne.mode,ie),ee.return=ne,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case v:return ie=_u(ee.type,ee.key,ee.props,null,ne.mode,ie),Ts(ie,ee),ie.return=ne,ie;case _:return ee=Fd(ee,ne.mode,ie),ee.return=ne,ee;case I:return ee=_a(ee),de(ne,ee,ie)}if(B(ee)||F(ee))return ee=ya(ee,ne.mode,ie,null),ee.return=ne,ee;if(typeof ee.then=="function")return de(ne,Au(ee),ie);if(ee.$$typeof===C)return de(ne,Cu(ne,ee),ie);Ru(ne,ee)}return null}function oe(ne,ee,ie,fe){var He=ee!==null?ee.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return He!==null?null:P(ne,ee,""+ie,fe);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case v:return ie.key===He?J(ne,ee,ie,fe):null;case _:return ie.key===He?ae(ne,ee,ie,fe):null;case I:return ie=_a(ie),oe(ne,ee,ie,fe)}if(B(ie)||F(ie))return He!==null?null:ce(ne,ee,ie,fe,null);if(typeof ie.then=="function")return oe(ne,ee,Au(ie),fe);if(ie.$$typeof===C)return oe(ne,ee,Cu(ne,ie),fe);Ru(ne,ie)}return null}function le(ne,ee,ie,fe,He){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return ne=ne.get(ie)||null,P(ee,ne,""+fe,He);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case v:return ne=ne.get(fe.key===null?ie:fe.key)||null,J(ee,ne,fe,He);case _:return ne=ne.get(fe.key===null?ie:fe.key)||null,ae(ee,ne,fe,He);case I:return fe=_a(fe),le(ne,ee,ie,fe,He)}if(B(fe)||F(fe))return ne=ne.get(ie)||null,ce(ee,ne,fe,He,null);if(typeof fe.then=="function")return le(ne,ee,ie,Au(fe),He);if(fe.$$typeof===C)return le(ne,ee,ie,Cu(ee,fe),He);Ru(ee,fe)}return null}function je(ne,ee,ie,fe){for(var He=null,pt=null,qe=ee,We=ee=0,st=null;qe!==null&&We<ie.length;We++){qe.index>We?(st=qe,qe=null):st=qe.sibling;var mt=oe(ne,qe,ie[We],fe);if(mt===null){qe===null&&(qe=st);break}r&&qe&&mt.alternate===null&&a(ne,qe),ee=x(mt,ee,We),pt===null?He=mt:pt.sibling=mt,pt=mt,qe=st}if(We===ie.length)return u(ne,qe),lt&&Kr(ne,We),He;if(qe===null){for(;We<ie.length;We++)qe=de(ne,ie[We],fe),qe!==null&&(ee=x(qe,ee,We),pt===null?He=qe:pt.sibling=qe,pt=qe);return lt&&Kr(ne,We),He}for(qe=d(qe);We<ie.length;We++)st=le(qe,ne,We,ie[We],fe),st!==null&&(r&&st.alternate!==null&&qe.delete(st.key===null?We:st.key),ee=x(st,ee,We),pt===null?He=st:pt.sibling=st,pt=st);return r&&qe.forEach(function(Xi){return a(ne,Xi)}),lt&&Kr(ne,We),He}function Ye(ne,ee,ie,fe){if(ie==null)throw Error(i(151));for(var He=null,pt=null,qe=ee,We=ee=0,st=null,mt=ie.next();qe!==null&&!mt.done;We++,mt=ie.next()){qe.index>We?(st=qe,qe=null):st=qe.sibling;var Xi=oe(ne,qe,mt.value,fe);if(Xi===null){qe===null&&(qe=st);break}r&&qe&&Xi.alternate===null&&a(ne,qe),ee=x(Xi,ee,We),pt===null?He=Xi:pt.sibling=Xi,pt=Xi,qe=st}if(mt.done)return u(ne,qe),lt&&Kr(ne,We),He;if(qe===null){for(;!mt.done;We++,mt=ie.next())mt=de(ne,mt.value,fe),mt!==null&&(ee=x(mt,ee,We),pt===null?He=mt:pt.sibling=mt,pt=mt);return lt&&Kr(ne,We),He}for(qe=d(qe);!mt.done;We++,mt=ie.next())mt=le(qe,ne,We,mt.value,fe),mt!==null&&(r&&mt.alternate!==null&&qe.delete(mt.key===null?We:mt.key),ee=x(mt,ee,We),pt===null?He=mt:pt.sibling=mt,pt=mt);return r&&qe.forEach(function(V4){return a(ne,V4)}),lt&&Kr(ne,We),He}function Ct(ne,ee,ie,fe){if(typeof ie=="object"&&ie!==null&&ie.type===E&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case v:e:{for(var He=ie.key;ee!==null;){if(ee.key===He){if(He=ie.type,He===E){if(ee.tag===7){u(ne,ee.sibling),fe=y(ee,ie.props.children),fe.return=ne,ne=fe;break e}}else if(ee.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===I&&_a(He)===ee.type){u(ne,ee.sibling),fe=y(ee,ie.props),Ts(fe,ie),fe.return=ne,ne=fe;break e}u(ne,ee);break}else a(ne,ee);ee=ee.sibling}ie.type===E?(fe=ya(ie.props.children,ne.mode,fe,ie.key),fe.return=ne,ne=fe):(fe=_u(ie.type,ie.key,ie.props,null,ne.mode,fe),Ts(fe,ie),fe.return=ne,ne=fe)}return A(ne);case _:e:{for(He=ie.key;ee!==null;){if(ee.key===He)if(ee.tag===4&&ee.stateNode.containerInfo===ie.containerInfo&&ee.stateNode.implementation===ie.implementation){u(ne,ee.sibling),fe=y(ee,ie.children||[]),fe.return=ne,ne=fe;break e}else{u(ne,ee);break}else a(ne,ee);ee=ee.sibling}fe=Fd(ie,ne.mode,fe),fe.return=ne,ne=fe}return A(ne);case I:return ie=_a(ie),Ct(ne,ee,ie,fe)}if(B(ie))return je(ne,ee,ie,fe);if(F(ie)){if(He=F(ie),typeof He!="function")throw Error(i(150));return ie=He.call(ie),Ye(ne,ee,ie,fe)}if(typeof ie.then=="function")return Ct(ne,ee,Au(ie),fe);if(ie.$$typeof===C)return Ct(ne,ee,Cu(ne,ie),fe);Ru(ne,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,ee!==null&&ee.tag===6?(u(ne,ee.sibling),fe=y(ee,ie),fe.return=ne,ne=fe):(u(ne,ee),fe=Vd(ie,ne.mode,fe),fe.return=ne,ne=fe),A(ne)):u(ne,ee)}return function(ne,ee,ie,fe){try{ks=0;var He=Ct(ne,ee,ie,fe);return co=null,He}catch(qe){if(qe===uo||qe===ku)throw qe;var pt=Dn(29,qe,null,ne.mode);return pt.lanes=fe,pt.return=ne,pt}finally{}}}var Ea=Bw(!0),Hw=Bw(!1),Mi=!1;function nh(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rh(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function ji(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Oi(r,a,u){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(yt&2)!==0){var y=d.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),d.pending=a,a=wu(r),Sw(r,null,u),a}return bu(r,d,a,u),wu(r)}function As(r,a,u){if(a=a.updateQueue,a!==null&&(a=a.shared,(u&4194048)!==0)){var d=a.lanes;d&=r.pendingLanes,u|=d,a.lanes=u,Gn(r,u)}}function ih(r,a){var u=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,u===d)){var y=null,x=null;if(u=u.firstBaseUpdate,u!==null){do{var A={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};x===null?y=x=A:x=x.next=A,u=u.next}while(u!==null);x===null?y=x=a:x=x.next=a}else y=x=a;u={baseState:d.baseState,firstBaseUpdate:y,lastBaseUpdate:x,shared:d.shared,callbacks:d.callbacks},r.updateQueue=u;return}r=u.lastBaseUpdate,r===null?u.firstBaseUpdate=a:r.next=a,u.lastBaseUpdate=a}var ah=!1;function Rs(){if(ah){var r=lo;if(r!==null)throw r}}function Ms(r,a,u,d){ah=!1;var y=r.updateQueue;Mi=!1;var x=y.firstBaseUpdate,A=y.lastBaseUpdate,P=y.shared.pending;if(P!==null){y.shared.pending=null;var J=P,ae=J.next;J.next=null,A===null?x=ae:A.next=ae,A=J;var ce=r.alternate;ce!==null&&(ce=ce.updateQueue,P=ce.lastBaseUpdate,P!==A&&(P===null?ce.firstBaseUpdate=ae:P.next=ae,ce.lastBaseUpdate=J))}if(x!==null){var de=y.baseState;A=0,ce=ae=J=null,P=x;do{var oe=P.lane&-536870913,le=oe!==P.lane;if(le?(ot&oe)===oe:(d&oe)===oe){oe!==0&&oe===so&&(ah=!0),ce!==null&&(ce=ce.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var je=r,Ye=P;oe=a;var Ct=u;switch(Ye.tag){case 1:if(je=Ye.payload,typeof je=="function"){de=je.call(Ct,de,oe);break e}de=je;break e;case 3:je.flags=je.flags&-65537|128;case 0:if(je=Ye.payload,oe=typeof je=="function"?je.call(Ct,de,oe):je,oe==null)break e;de=m({},de,oe);break e;case 2:Mi=!0}}oe=P.callback,oe!==null&&(r.flags|=64,le&&(r.flags|=8192),le=y.callbacks,le===null?y.callbacks=[oe]:le.push(oe))}else le={lane:oe,tag:P.tag,payload:P.payload,callback:P.callback,next:null},ce===null?(ae=ce=le,J=de):ce=ce.next=le,A|=oe;if(P=P.next,P===null){if(P=y.shared.pending,P===null)break;le=P,P=le.next,le.next=null,y.lastBaseUpdate=le,y.shared.pending=null}}while(!0);ce===null&&(J=de),y.baseState=J,y.firstBaseUpdate=ae,y.lastBaseUpdate=ce,x===null&&(y.shared.lanes=0),Ii|=A,r.lanes=A,r.memoizedState=de}}function Uw(r,a){if(typeof r!="function")throw Error(i(191,r));r.call(a)}function Pw(r,a){var u=r.callbacks;if(u!==null)for(r.callbacks=null,r=0;r<u.length;r++)Uw(u[r],a)}var fo=D(null),Mu=D(0);function Vw(r,a){r=oi,q(Mu,r),q(fo,a),oi=r|a.baseLanes}function oh(){q(Mu,oi),q(fo,fo.current)}function sh(){oi=Mu.current,$(fo),$(Mu)}var Ln=D(null),er=null;function zi(r){var a=r.alternate;q(Pt,Pt.current&1),q(Ln,r),er===null&&(a===null||fo.current!==null||a.memoizedState!==null)&&(er=r)}function lh(r){q(Pt,Pt.current),q(Ln,r),er===null&&(er=r)}function Fw(r){r.tag===22?(q(Pt,Pt.current),q(Ln,r),er===null&&(er=r)):Di()}function Di(){q(Pt,Pt.current),q(Ln,Ln.current)}function qn(r){$(Ln),er===r&&(er=null),$(Pt)}var Pt=D(0);function ju(r){for(var a=r;a!==null;){if(a.tag===13){var u=a.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||pp(u)||mp(u)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Wr=0,Ze=null,St=null,Gt=null,Ou=!1,ho=!1,Ca=!1,zu=0,js=0,po=null,OD=0;function It(){throw Error(i(321))}function uh(r,a){if(a===null)return!1;for(var u=0;u<a.length&&u<r.length;u++)if(!zn(r[u],a[u]))return!1;return!0}function ch(r,a,u,d,y,x){return Wr=x,Ze=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,z.H=r===null||r.memoizedState===null?k_:Ch,Ca=!1,x=u(d,y),Ca=!1,ho&&(x=Yw(a,u,d,y)),$w(r),x}function $w(r){z.H=Ds;var a=St!==null&&St.next!==null;if(Wr=0,Gt=St=Ze=null,Ou=!1,js=0,po=null,a)throw Error(i(300));r===null||Xt||(r=r.dependencies,r!==null&&Eu(r)&&(Xt=!0))}function Yw(r,a,u,d){Ze=r;var y=0;do{if(ho&&(po=null),js=0,ho=!1,25<=y)throw Error(i(301));if(y+=1,Gt=St=null,r.updateQueue!=null){var x=r.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}z.H=T_,x=a(u,d)}while(ho);return x}function zD(){var r=z.H,a=r.useState()[0];return a=typeof a.then=="function"?Os(a):a,r=r.useState()[0],(St!==null?St.memoizedState:null)!==r&&(Ze.flags|=1024),a}function fh(){var r=zu!==0;return zu=0,r}function dh(r,a,u){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~u}function hh(r){if(Ou){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}Ou=!1}Wr=0,Gt=St=Ze=null,ho=!1,js=zu=0,po=null}function yn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Gt===null?Ze.memoizedState=Gt=r:Gt=Gt.next=r,Gt}function Vt(){if(St===null){var r=Ze.alternate;r=r!==null?r.memoizedState:null}else r=St.next;var a=Gt===null?Ze.memoizedState:Gt.next;if(a!==null)Gt=a,St=r;else{if(r===null)throw Ze.alternate===null?Error(i(467)):Error(i(310));St=r,r={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},Gt===null?Ze.memoizedState=Gt=r:Gt=Gt.next=r}return Gt}function Du(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Os(r){var a=js;return js+=1,po===null&&(po=[]),r=Lw(po,r,a),a=Ze,(Gt===null?a.memoizedState:Gt.next)===null&&(a=a.alternate,z.H=a===null||a.memoizedState===null?k_:Ch),r}function Lu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Os(r);if(r.$$typeof===C)return ln(r)}throw Error(i(438,String(r)))}function ph(r){var a=null,u=Ze.updateQueue;if(u!==null&&(a=u.memoCache),a==null){var d=Ze.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(a={data:d.data.map(function(y){return y.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),u===null&&(u=Du(),Ze.updateQueue=u),u.memoCache=a,u=a.data[a.index],u===void 0)for(u=a.data[a.index]=Array(r),d=0;d<r;d++)u[d]=K;return a.index++,u}function Jr(r,a){return typeof a=="function"?a(r):a}function qu(r){var a=Vt();return mh(a,St,r)}function mh(r,a,u){var d=r.queue;if(d===null)throw Error(i(311));d.lastRenderedReducer=u;var y=r.baseQueue,x=d.pending;if(x!==null){if(y!==null){var A=y.next;y.next=x.next,x.next=A}a.baseQueue=y=x,d.pending=null}if(x=r.baseState,y===null)r.memoizedState=x;else{a=y.next;var P=A=null,J=null,ae=a,ce=!1;do{var de=ae.lane&-536870913;if(de!==ae.lane?(ot&de)===de:(Wr&de)===de){var oe=ae.revertLane;if(oe===0)J!==null&&(J=J.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),de===so&&(ce=!0);else if((Wr&oe)===oe){ae=ae.next,oe===so&&(ce=!0);continue}else de={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},J===null?(P=J=de,A=x):J=J.next=de,Ze.lanes|=oe,Ii|=oe;de=ae.action,Ca&&u(x,de),x=ae.hasEagerState?ae.eagerState:u(x,de)}else oe={lane:de,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},J===null?(P=J=oe,A=x):J=J.next=oe,Ze.lanes|=de,Ii|=de;ae=ae.next}while(ae!==null&&ae!==a);if(J===null?A=x:J.next=P,!zn(x,r.memoizedState)&&(Xt=!0,ce&&(u=lo,u!==null)))throw u;r.memoizedState=x,r.baseState=A,r.baseQueue=J,d.lastRenderedState=x}return y===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function gh(r){var a=Vt(),u=a.queue;if(u===null)throw Error(i(311));u.lastRenderedReducer=r;var d=u.dispatch,y=u.pending,x=a.memoizedState;if(y!==null){u.pending=null;var A=y=y.next;do x=r(x,A.action),A=A.next;while(A!==y);zn(x,a.memoizedState)||(Xt=!0),a.memoizedState=x,a.baseQueue===null&&(a.baseState=x),u.lastRenderedState=x}return[x,d]}function Gw(r,a,u){var d=Ze,y=Vt(),x=lt;if(x){if(u===void 0)throw Error(i(407));u=u()}else u=a();var A=!zn((St||y).memoizedState,u);if(A&&(y.memoizedState=u,Xt=!0),y=y.queue,xh(Qw.bind(null,d,y,r),[r]),y.getSnapshot!==a||A||Gt!==null&&Gt.memoizedState.tag&1){if(d.flags|=2048,mo(9,{destroy:void 0},Kw.bind(null,d,y,u,a),null),Nt===null)throw Error(i(349));x||(Wr&127)!==0||Xw(d,a,u)}return u}function Xw(r,a,u){r.flags|=16384,r={getSnapshot:a,value:u},a=Ze.updateQueue,a===null?(a=Du(),Ze.updateQueue=a,a.stores=[r]):(u=a.stores,u===null?a.stores=[r]:u.push(r))}function Kw(r,a,u,d){a.value=u,a.getSnapshot=d,Zw(a)&&Ww(r)}function Qw(r,a,u){return u(function(){Zw(a)&&Ww(r)})}function Zw(r){var a=r.getSnapshot;r=r.value;try{var u=a();return!zn(r,u)}catch{return!0}}function Ww(r){var a=ga(r,2);a!==null&&kn(a,r,2)}function yh(r){var a=yn();if(typeof r=="function"){var u=r;if(r=u(),Ca){Ht(!0);try{u()}finally{Ht(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jr,lastRenderedState:r},a}function Jw(r,a,u,d){return r.baseState=u,mh(r,St,typeof d=="function"?d:Jr)}function DD(r,a,u,d,y){if(Hu(r))throw Error(i(485));if(r=a.action,r!==null){var x={payload:y,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){x.listeners.push(A)}};z.T!==null?u(!0):x.isTransition=!1,d(x),u=a.pending,u===null?(x.next=a.pending=x,e_(a,x)):(x.next=u.next,a.pending=u.next=x)}}function e_(r,a){var u=a.action,d=a.payload,y=r.state;if(a.isTransition){var x=z.T,A={};z.T=A;try{var P=u(y,d),J=z.S;J!==null&&J(A,P),t_(r,a,P)}catch(ae){vh(r,a,ae)}finally{x!==null&&A.types!==null&&(x.types=A.types),z.T=x}}else try{x=u(y,d),t_(r,a,x)}catch(ae){vh(r,a,ae)}}function t_(r,a,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(d){n_(r,a,d)},function(d){return vh(r,a,d)}):n_(r,a,u)}function n_(r,a,u){a.status="fulfilled",a.value=u,r_(a),r.state=u,a=r.pending,a!==null&&(u=a.next,u===a?r.pending=null:(u=u.next,a.next=u,e_(r,u)))}function vh(r,a,u){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do a.status="rejected",a.reason=u,r_(a),a=a.next;while(a!==d)}r.action=null}function r_(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function i_(r,a){return a}function a_(r,a){if(lt){var u=Nt.formState;if(u!==null){e:{var d=Ze;if(lt){if(At){t:{for(var y=At,x=Jn;y.nodeType!==8;){if(!x){y=null;break t}if(y=tr(y.nextSibling),y===null){y=null;break t}}x=y.data,y=x==="F!"||x==="F"?y:null}if(y){At=tr(y.nextSibling),d=y.data==="F!";break e}}Ai(d)}d=!1}d&&(a=u[0])}}return u=yn(),u.memoizedState=u.baseState=a,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i_,lastRenderedState:a},u.queue=d,u=E_.bind(null,Ze,d),d.dispatch=u,d=yh(!1),x=Eh.bind(null,Ze,!1,d.queue),d=yn(),y={state:a,dispatch:null,action:r,pending:null},d.queue=y,u=DD.bind(null,Ze,y,x,u),y.dispatch=u,d.memoizedState=r,[a,u,!1]}function o_(r){var a=Vt();return s_(a,St,r)}function s_(r,a,u){if(a=mh(r,a,i_)[0],r=qu(Jr)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var d=Os(a)}catch(A){throw A===uo?ku:A}else d=a;a=Vt();var y=a.queue,x=y.dispatch;return u!==a.memoizedState&&(Ze.flags|=2048,mo(9,{destroy:void 0},LD.bind(null,y,u),null)),[d,x,r]}function LD(r,a){r.action=a}function l_(r){var a=Vt(),u=St;if(u!==null)return s_(a,u,r);Vt(),a=a.memoizedState,u=Vt();var d=u.queue.dispatch;return u.memoizedState=r,[a,d,!1]}function mo(r,a,u,d){return r={tag:r,create:u,deps:d,inst:a,next:null},a=Ze.updateQueue,a===null&&(a=Du(),Ze.updateQueue=a),u=a.lastEffect,u===null?a.lastEffect=r.next=r:(d=u.next,u.next=r,r.next=d,a.lastEffect=r),r}function u_(){return Vt().memoizedState}function Iu(r,a,u,d){var y=yn();Ze.flags|=r,y.memoizedState=mo(1|a,{destroy:void 0},u,d===void 0?null:d)}function Bu(r,a,u,d){var y=Vt();d=d===void 0?null:d;var x=y.memoizedState.inst;St!==null&&d!==null&&uh(d,St.memoizedState.deps)?y.memoizedState=mo(a,x,u,d):(Ze.flags|=r,y.memoizedState=mo(1|a,x,u,d))}function c_(r,a){Iu(8390656,8,r,a)}function xh(r,a){Bu(2048,8,r,a)}function qD(r){Ze.flags|=4;var a=Ze.updateQueue;if(a===null)a=Du(),Ze.updateQueue=a,a.events=[r];else{var u=a.events;u===null?a.events=[r]:u.push(r)}}function f_(r){var a=Vt().memoizedState;return qD({ref:a,nextImpl:r}),function(){if((yt&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function d_(r,a){return Bu(4,2,r,a)}function h_(r,a){return Bu(4,4,r,a)}function p_(r,a){if(typeof a=="function"){r=r();var u=a(r);return function(){typeof u=="function"?u():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function m_(r,a,u){u=u!=null?u.concat([r]):null,Bu(4,4,p_.bind(null,a,r),u)}function bh(){}function g_(r,a){var u=Vt();a=a===void 0?null:a;var d=u.memoizedState;return a!==null&&uh(a,d[1])?d[0]:(u.memoizedState=[r,a],r)}function y_(r,a){var u=Vt();a=a===void 0?null:a;var d=u.memoizedState;if(a!==null&&uh(a,d[1]))return d[0];if(d=r(),Ca){Ht(!0);try{r()}finally{Ht(!1)}}return u.memoizedState=[d,a],d}function wh(r,a,u){return u===void 0||(Wr&1073741824)!==0&&(ot&261930)===0?r.memoizedState=a:(r.memoizedState=u,r=vS(),Ze.lanes|=r,Ii|=r,u)}function v_(r,a,u,d){return zn(u,a)?u:fo.current!==null?(r=wh(r,u,d),zn(r,a)||(Xt=!0),r):(Wr&42)===0||(Wr&1073741824)!==0&&(ot&261930)===0?(Xt=!0,r.memoizedState=u):(r=vS(),Ze.lanes|=r,Ii|=r,a)}function x_(r,a,u,d,y){var x=U.p;U.p=x!==0&&8>x?x:8;var A=z.T,P={};z.T=P,Eh(r,!1,a,u);try{var J=y(),ae=z.S;if(ae!==null&&ae(P,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var ce=jD(J,d);zs(r,a,ce,Hn(r))}else zs(r,a,d,Hn(r))}catch(de){zs(r,a,{then:function(){},status:"rejected",reason:de},Hn())}finally{U.p=x,A!==null&&P.types!==null&&(A.types=P.types),z.T=A}}function ID(){}function _h(r,a,u,d){if(r.tag!==5)throw Error(i(476));var y=b_(r).queue;x_(r,y,a,G,u===null?ID:function(){return w_(r),u(d)})}function b_(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jr,lastRenderedState:G},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jr,lastRenderedState:u},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function w_(r){var a=b_(r);a.next===null&&(a=r.alternate.memoizedState),zs(r,a.next.queue,{},Hn())}function Sh(){return ln(Zs)}function __(){return Vt().memoizedState}function S_(){return Vt().memoizedState}function BD(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var u=Hn();r=ji(u);var d=Oi(a,r,u);d!==null&&(kn(d,a,u),As(d,a,u)),a={cache:Wd()},r.payload=a;return}a=a.return}}function HD(r,a,u){var d=Hn();u={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Hu(r)?C_(a,u):(u=Ud(r,a,u,d),u!==null&&(kn(u,r,d),N_(u,a,d)))}function E_(r,a,u){var d=Hn();zs(r,a,u,d)}function zs(r,a,u,d){var y={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Hu(r))C_(a,y);else{var x=r.alternate;if(r.lanes===0&&(x===null||x.lanes===0)&&(x=a.lastRenderedReducer,x!==null))try{var A=a.lastRenderedState,P=x(A,u);if(y.hasEagerState=!0,y.eagerState=P,zn(P,A))return bu(r,a,y,0),Nt===null&&xu(),!1}catch{}finally{}if(u=Ud(r,a,y,d),u!==null)return kn(u,r,d),N_(u,a,d),!0}return!1}function Eh(r,a,u,d){if(d={lane:2,revertLane:np(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},Hu(r)){if(a)throw Error(i(479))}else a=Ud(r,u,d,2),a!==null&&kn(a,r,2)}function Hu(r){var a=r.alternate;return r===Ze||a!==null&&a===Ze}function C_(r,a){ho=Ou=!0;var u=r.pending;u===null?a.next=a:(a.next=u.next,u.next=a),r.pending=a}function N_(r,a,u){if((u&4194048)!==0){var d=a.lanes;d&=r.pendingLanes,u|=d,a.lanes=u,Gn(r,u)}}var Ds={readContext:ln,use:Lu,useCallback:It,useContext:It,useEffect:It,useImperativeHandle:It,useLayoutEffect:It,useInsertionEffect:It,useMemo:It,useReducer:It,useRef:It,useState:It,useDebugValue:It,useDeferredValue:It,useTransition:It,useSyncExternalStore:It,useId:It,useHostTransitionStatus:It,useFormState:It,useActionState:It,useOptimistic:It,useMemoCache:It,useCacheRefresh:It};Ds.useEffectEvent=It;var k_={readContext:ln,use:Lu,useCallback:function(r,a){return yn().memoizedState=[r,a===void 0?null:a],r},useContext:ln,useEffect:c_,useImperativeHandle:function(r,a,u){u=u!=null?u.concat([r]):null,Iu(4194308,4,p_.bind(null,a,r),u)},useLayoutEffect:function(r,a){return Iu(4194308,4,r,a)},useInsertionEffect:function(r,a){Iu(4,2,r,a)},useMemo:function(r,a){var u=yn();a=a===void 0?null:a;var d=r();if(Ca){Ht(!0);try{r()}finally{Ht(!1)}}return u.memoizedState=[d,a],d},useReducer:function(r,a,u){var d=yn();if(u!==void 0){var y=u(a);if(Ca){Ht(!0);try{u(a)}finally{Ht(!1)}}}else y=a;return d.memoizedState=d.baseState=y,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:y},d.queue=r,r=r.dispatch=HD.bind(null,Ze,r),[d.memoizedState,r]},useRef:function(r){var a=yn();return r={current:r},a.memoizedState=r},useState:function(r){r=yh(r);var a=r.queue,u=E_.bind(null,Ze,a);return a.dispatch=u,[r.memoizedState,u]},useDebugValue:bh,useDeferredValue:function(r,a){var u=yn();return wh(u,r,a)},useTransition:function(){var r=yh(!1);return r=x_.bind(null,Ze,r.queue,!0,!1),yn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,u){var d=Ze,y=yn();if(lt){if(u===void 0)throw Error(i(407));u=u()}else{if(u=a(),Nt===null)throw Error(i(349));(ot&127)!==0||Xw(d,a,u)}y.memoizedState=u;var x={value:u,getSnapshot:a};return y.queue=x,c_(Qw.bind(null,d,x,r),[r]),d.flags|=2048,mo(9,{destroy:void 0},Kw.bind(null,d,x,u,a),null),u},useId:function(){var r=yn(),a=Nt.identifierPrefix;if(lt){var u=Ar,d=Tr;u=(d&~(1<<32-ft(d)-1)).toString(32)+u,a="_"+a+"R_"+u,u=zu++,0<u&&(a+="H"+u.toString(32)),a+="_"}else u=OD++,a="_"+a+"r_"+u.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:Sh,useFormState:a_,useActionState:a_,useOptimistic:function(r){var a=yn();a.memoizedState=a.baseState=r;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=u,a=Eh.bind(null,Ze,!0,u),u.dispatch=a,[r,a]},useMemoCache:ph,useCacheRefresh:function(){return yn().memoizedState=BD.bind(null,Ze)},useEffectEvent:function(r){var a=yn(),u={impl:r};return a.memoizedState=u,function(){if((yt&2)!==0)throw Error(i(440));return u.impl.apply(void 0,arguments)}}},Ch={readContext:ln,use:Lu,useCallback:g_,useContext:ln,useEffect:xh,useImperativeHandle:m_,useInsertionEffect:d_,useLayoutEffect:h_,useMemo:y_,useReducer:qu,useRef:u_,useState:function(){return qu(Jr)},useDebugValue:bh,useDeferredValue:function(r,a){var u=Vt();return v_(u,St.memoizedState,r,a)},useTransition:function(){var r=qu(Jr)[0],a=Vt().memoizedState;return[typeof r=="boolean"?r:Os(r),a]},useSyncExternalStore:Gw,useId:__,useHostTransitionStatus:Sh,useFormState:o_,useActionState:o_,useOptimistic:function(r,a){var u=Vt();return Jw(u,St,r,a)},useMemoCache:ph,useCacheRefresh:S_};Ch.useEffectEvent=f_;var T_={readContext:ln,use:Lu,useCallback:g_,useContext:ln,useEffect:xh,useImperativeHandle:m_,useInsertionEffect:d_,useLayoutEffect:h_,useMemo:y_,useReducer:gh,useRef:u_,useState:function(){return gh(Jr)},useDebugValue:bh,useDeferredValue:function(r,a){var u=Vt();return St===null?wh(u,r,a):v_(u,St.memoizedState,r,a)},useTransition:function(){var r=gh(Jr)[0],a=Vt().memoizedState;return[typeof r=="boolean"?r:Os(r),a]},useSyncExternalStore:Gw,useId:__,useHostTransitionStatus:Sh,useFormState:l_,useActionState:l_,useOptimistic:function(r,a){var u=Vt();return St!==null?Jw(u,St,r,a):(u.baseState=r,[r,u.queue.dispatch])},useMemoCache:ph,useCacheRefresh:S_};T_.useEffectEvent=f_;function Nh(r,a,u,d){a=r.memoizedState,u=u(d,a),u=u==null?a:m({},a,u),r.memoizedState=u,r.lanes===0&&(r.updateQueue.baseState=u)}var kh={enqueueSetState:function(r,a,u){r=r._reactInternals;var d=Hn(),y=ji(d);y.payload=a,u!=null&&(y.callback=u),a=Oi(r,y,d),a!==null&&(kn(a,r,d),As(a,r,d))},enqueueReplaceState:function(r,a,u){r=r._reactInternals;var d=Hn(),y=ji(d);y.tag=1,y.payload=a,u!=null&&(y.callback=u),a=Oi(r,y,d),a!==null&&(kn(a,r,d),As(a,r,d))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var u=Hn(),d=ji(u);d.tag=2,a!=null&&(d.callback=a),a=Oi(r,d,u),a!==null&&(kn(a,r,u),As(a,r,u))}};function A_(r,a,u,d,y,x,A){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,x,A):a.prototype&&a.prototype.isPureReactComponent?!ws(u,d)||!ws(y,x):!0}function R_(r,a,u,d){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(u,d),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(u,d),a.state!==r&&kh.enqueueReplaceState(a,a.state,null)}function Na(r,a){var u=a;if("ref"in a){u={};for(var d in a)d!=="ref"&&(u[d]=a[d])}if(r=r.defaultProps){u===a&&(u=m({},u));for(var y in r)u[y]===void 0&&(u[y]=r[y])}return u}function M_(r){vu(r)}function j_(r){console.error(r)}function O_(r){vu(r)}function Uu(r,a){try{var u=r.onUncaughtError;u(a.value,{componentStack:a.stack})}catch(d){setTimeout(function(){throw d})}}function z_(r,a,u){try{var d=r.onCaughtError;d(u.value,{componentStack:u.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function Th(r,a,u){return u=ji(u),u.tag=3,u.payload={element:null},u.callback=function(){Uu(r,a)},u}function D_(r){return r=ji(r),r.tag=3,r}function L_(r,a,u,d){var y=u.type.getDerivedStateFromError;if(typeof y=="function"){var x=d.value;r.payload=function(){return y(x)},r.callback=function(){z_(a,u,d)}}var A=u.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(r.callback=function(){z_(a,u,d),typeof y!="function"&&(Bi===null?Bi=new Set([this]):Bi.add(this));var P=d.stack;this.componentDidCatch(d.value,{componentStack:P!==null?P:""})})}function UD(r,a,u,d,y){if(u.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(a=u.alternate,a!==null&&oo(a,u,y,!0),u=Ln.current,u!==null){switch(u.tag){case 31:case 13:return er===null?Ju():u.alternate===null&&Bt===0&&(Bt=3),u.flags&=-257,u.flags|=65536,u.lanes=y,d===Tu?u.flags|=16384:(a=u.updateQueue,a===null?u.updateQueue=new Set([d]):a.add(d),Jh(r,d,y)),!1;case 22:return u.flags|=65536,d===Tu?u.flags|=16384:(a=u.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([d])},u.updateQueue=a):(u=a.retryQueue,u===null?a.retryQueue=new Set([d]):u.add(d)),Jh(r,d,y)),!1}throw Error(i(435,u.tag))}return Jh(r,d,y),Ju(),!1}if(lt)return a=Ln.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,d!==Gd&&(r=Error(i(422),{cause:d}),Es(Qn(r,u)))):(d!==Gd&&(a=Error(i(423),{cause:d}),Es(Qn(a,u))),r=r.current.alternate,r.flags|=65536,y&=-y,r.lanes|=y,d=Qn(d,u),y=Th(r.stateNode,d,y),ih(r,y),Bt!==4&&(Bt=2)),!1;var x=Error(i(520),{cause:d});if(x=Qn(x,u),Vs===null?Vs=[x]:Vs.push(x),Bt!==4&&(Bt=2),a===null)return!0;d=Qn(d,u),u=a;do{switch(u.tag){case 3:return u.flags|=65536,r=y&-y,u.lanes|=r,r=Th(u.stateNode,d,r),ih(u,r),!1;case 1:if(a=u.type,x=u.stateNode,(u.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Bi===null||!Bi.has(x))))return u.flags|=65536,y&=-y,u.lanes|=y,y=D_(y),L_(y,r,u,d),ih(u,y),!1}u=u.return}while(u!==null);return!1}var Ah=Error(i(461)),Xt=!1;function un(r,a,u,d){a.child=r===null?Hw(a,null,u,d):Ea(a,r.child,u,d)}function q_(r,a,u,d,y){u=u.render;var x=a.ref;if("ref"in d){var A={};for(var P in d)P!=="ref"&&(A[P]=d[P])}else A=d;return ba(a),d=ch(r,a,u,A,x,y),P=fh(),r!==null&&!Xt?(dh(r,a,y),ei(r,a,y)):(lt&&P&&$d(a),a.flags|=1,un(r,a,d,y),a.child)}function I_(r,a,u,d,y){if(r===null){var x=u.type;return typeof x=="function"&&!Pd(x)&&x.defaultProps===void 0&&u.compare===null?(a.tag=15,a.type=x,B_(r,a,x,d,y)):(r=_u(u.type,null,d,a,a.mode,y),r.ref=a.ref,r.return=a,a.child=r)}if(x=r.child,!qh(r,y)){var A=x.memoizedProps;if(u=u.compare,u=u!==null?u:ws,u(A,d)&&r.ref===a.ref)return ei(r,a,y)}return a.flags|=1,r=Xr(x,d),r.ref=a.ref,r.return=a,a.child=r}function B_(r,a,u,d,y){if(r!==null){var x=r.memoizedProps;if(ws(x,d)&&r.ref===a.ref)if(Xt=!1,a.pendingProps=d=x,qh(r,y))(r.flags&131072)!==0&&(Xt=!0);else return a.lanes=r.lanes,ei(r,a,y)}return Rh(r,a,u,d,y)}function H_(r,a,u,d){var y=d.children,x=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((a.flags&128)!==0){if(x=x!==null?x.baseLanes|u:u,r!==null){for(d=a.child=r.child,y=0;d!==null;)y=y|d.lanes|d.childLanes,d=d.sibling;d=y&~x}else d=0,a.child=null;return U_(r,a,x,u,d)}if((u&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&Nu(a,x!==null?x.cachePool:null),x!==null?Vw(a,x):oh(),Fw(a);else return d=a.lanes=536870912,U_(r,a,x!==null?x.baseLanes|u:u,u,d)}else x!==null?(Nu(a,x.cachePool),Vw(a,x),Di(),a.memoizedState=null):(r!==null&&Nu(a,null),oh(),Di());return un(r,a,y,u),a.child}function Ls(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function U_(r,a,u,d,y){var x=eh();return x=x===null?null:{parent:Yt._currentValue,pool:x},a.memoizedState={baseLanes:u,cachePool:x},r!==null&&Nu(a,null),oh(),Fw(a),r!==null&&oo(r,a,d,!0),a.childLanes=y,null}function Pu(r,a){return a=Fu({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function P_(r,a,u){return Ea(a,r.child,null,u),r=Pu(a,a.pendingProps),r.flags|=2,qn(a),a.memoizedState=null,r}function PD(r,a,u){var d=a.pendingProps,y=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(lt){if(d.mode==="hidden")return r=Pu(a,d),a.lanes=536870912,Ls(null,r);if(lh(a),(r=At)?(r=eE(r,Jn),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ki!==null?{id:Tr,overflow:Ar}:null,retryLane:536870912,hydrationErrors:null},u=Cw(r),u.return=a,a.child=u,sn=a,At=null)):r=null,r===null)throw Ai(a);return a.lanes=536870912,null}return Pu(a,d)}var x=r.memoizedState;if(x!==null){var A=x.dehydrated;if(lh(a),y)if(a.flags&256)a.flags&=-257,a=P_(r,a,u);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(i(558));else if(Xt||oo(r,a,u,!1),y=(u&r.childLanes)!==0,Xt||y){if(d=Nt,d!==null&&(A=nn(d,u),A!==0&&A!==x.retryLane))throw x.retryLane=A,ga(r,A),kn(d,r,A),Ah;Ju(),a=P_(r,a,u)}else r=x.treeContext,At=tr(A.nextSibling),sn=a,lt=!0,Ti=null,Jn=!1,r!==null&&Tw(a,r),a=Pu(a,d),a.flags|=4096;return a}return r=Xr(r.child,{mode:d.mode,children:d.children}),r.ref=a.ref,a.child=r,r.return=a,r}function Vu(r,a){var u=a.ref;if(u===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(i(284));(r===null||r.ref!==u)&&(a.flags|=4194816)}}function Rh(r,a,u,d,y){return ba(a),u=ch(r,a,u,d,void 0,y),d=fh(),r!==null&&!Xt?(dh(r,a,y),ei(r,a,y)):(lt&&d&&$d(a),a.flags|=1,un(r,a,u,y),a.child)}function V_(r,a,u,d,y,x){return ba(a),a.updateQueue=null,u=Yw(a,d,u,y),$w(r),d=fh(),r!==null&&!Xt?(dh(r,a,x),ei(r,a,x)):(lt&&d&&$d(a),a.flags|=1,un(r,a,u,x),a.child)}function F_(r,a,u,d,y){if(ba(a),a.stateNode===null){var x=no,A=u.contextType;typeof A=="object"&&A!==null&&(x=ln(A)),x=new u(d,x),a.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=kh,a.stateNode=x,x._reactInternals=a,x=a.stateNode,x.props=d,x.state=a.memoizedState,x.refs={},nh(a),A=u.contextType,x.context=typeof A=="object"&&A!==null?ln(A):no,x.state=a.memoizedState,A=u.getDerivedStateFromProps,typeof A=="function"&&(Nh(a,u,A,d),x.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(A=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),A!==x.state&&kh.enqueueReplaceState(x,x.state,null),Ms(a,d,x,y),Rs(),x.state=a.memoizedState),typeof x.componentDidMount=="function"&&(a.flags|=4194308),d=!0}else if(r===null){x=a.stateNode;var P=a.memoizedProps,J=Na(u,P);x.props=J;var ae=x.context,ce=u.contextType;A=no,typeof ce=="object"&&ce!==null&&(A=ln(ce));var de=u.getDerivedStateFromProps;ce=typeof de=="function"||typeof x.getSnapshotBeforeUpdate=="function",P=a.pendingProps!==P,ce||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(P||ae!==A)&&R_(a,x,d,A),Mi=!1;var oe=a.memoizedState;x.state=oe,Ms(a,d,x,y),Rs(),ae=a.memoizedState,P||oe!==ae||Mi?(typeof de=="function"&&(Nh(a,u,de,d),ae=a.memoizedState),(J=Mi||A_(a,u,J,d,oe,ae,A))?(ce||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(a.flags|=4194308)):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=d,a.memoizedState=ae),x.props=d,x.state=ae,x.context=A,d=J):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),d=!1)}else{x=a.stateNode,rh(r,a),A=a.memoizedProps,ce=Na(u,A),x.props=ce,de=a.pendingProps,oe=x.context,ae=u.contextType,J=no,typeof ae=="object"&&ae!==null&&(J=ln(ae)),P=u.getDerivedStateFromProps,(ae=typeof P=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(A!==de||oe!==J)&&R_(a,x,d,J),Mi=!1,oe=a.memoizedState,x.state=oe,Ms(a,d,x,y),Rs();var le=a.memoizedState;A!==de||oe!==le||Mi||r!==null&&r.dependencies!==null&&Eu(r.dependencies)?(typeof P=="function"&&(Nh(a,u,P,d),le=a.memoizedState),(ce=Mi||A_(a,u,ce,d,oe,le,J)||r!==null&&r.dependencies!==null&&Eu(r.dependencies))?(ae||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(d,le,J),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(d,le,J)),typeof x.componentDidUpdate=="function"&&(a.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof x.componentDidUpdate!="function"||A===r.memoizedProps&&oe===r.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||A===r.memoizedProps&&oe===r.memoizedState||(a.flags|=1024),a.memoizedProps=d,a.memoizedState=le),x.props=d,x.state=le,x.context=J,d=ce):(typeof x.componentDidUpdate!="function"||A===r.memoizedProps&&oe===r.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||A===r.memoizedProps&&oe===r.memoizedState||(a.flags|=1024),d=!1)}return x=d,Vu(r,a),d=(a.flags&128)!==0,x||d?(x=a.stateNode,u=d&&typeof u.getDerivedStateFromError!="function"?null:x.render(),a.flags|=1,r!==null&&d?(a.child=Ea(a,r.child,null,y),a.child=Ea(a,null,u,y)):un(r,a,u,y),a.memoizedState=x.state,r=a.child):r=ei(r,a,y),r}function $_(r,a,u,d){return va(),a.flags|=256,un(r,a,u,d),a.child}var Mh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function jh(r){return{baseLanes:r,cachePool:zw()}}function Oh(r,a,u){return r=r!==null?r.childLanes&~u:0,a&&(r|=Bn),r}function Y_(r,a,u){var d=a.pendingProps,y=!1,x=(a.flags&128)!==0,A;if((A=x)||(A=r!==null&&r.memoizedState===null?!1:(Pt.current&2)!==0),A&&(y=!0,a.flags&=-129),A=(a.flags&32)!==0,a.flags&=-33,r===null){if(lt){if(y?zi(a):Di(),(r=At)?(r=eE(r,Jn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:ki!==null?{id:Tr,overflow:Ar}:null,retryLane:536870912,hydrationErrors:null},u=Cw(r),u.return=a,a.child=u,sn=a,At=null)):r=null,r===null)throw Ai(a);return mp(r)?a.lanes=32:a.lanes=536870912,null}var P=d.children;return d=d.fallback,y?(Di(),y=a.mode,P=Fu({mode:"hidden",children:P},y),d=ya(d,y,u,null),P.return=a,d.return=a,P.sibling=d,a.child=P,d=a.child,d.memoizedState=jh(u),d.childLanes=Oh(r,A,u),a.memoizedState=Mh,Ls(null,d)):(zi(a),zh(a,P))}var J=r.memoizedState;if(J!==null&&(P=J.dehydrated,P!==null)){if(x)a.flags&256?(zi(a),a.flags&=-257,a=Dh(r,a,u)):a.memoizedState!==null?(Di(),a.child=r.child,a.flags|=128,a=null):(Di(),P=d.fallback,y=a.mode,d=Fu({mode:"visible",children:d.children},y),P=ya(P,y,u,null),P.flags|=2,d.return=a,P.return=a,d.sibling=P,a.child=d,Ea(a,r.child,null,u),d=a.child,d.memoizedState=jh(u),d.childLanes=Oh(r,A,u),a.memoizedState=Mh,a=Ls(null,d));else if(zi(a),mp(P)){if(A=P.nextSibling&&P.nextSibling.dataset,A)var ae=A.dgst;A=ae,d=Error(i(419)),d.stack="",d.digest=A,Es({value:d,source:null,stack:null}),a=Dh(r,a,u)}else if(Xt||oo(r,a,u,!1),A=(u&r.childLanes)!==0,Xt||A){if(A=Nt,A!==null&&(d=nn(A,u),d!==0&&d!==J.retryLane))throw J.retryLane=d,ga(r,d),kn(A,r,d),Ah;pp(P)||Ju(),a=Dh(r,a,u)}else pp(P)?(a.flags|=192,a.child=r.child,a=null):(r=J.treeContext,At=tr(P.nextSibling),sn=a,lt=!0,Ti=null,Jn=!1,r!==null&&Tw(a,r),a=zh(a,d.children),a.flags|=4096);return a}return y?(Di(),P=d.fallback,y=a.mode,J=r.child,ae=J.sibling,d=Xr(J,{mode:"hidden",children:d.children}),d.subtreeFlags=J.subtreeFlags&65011712,ae!==null?P=Xr(ae,P):(P=ya(P,y,u,null),P.flags|=2),P.return=a,d.return=a,d.sibling=P,a.child=d,Ls(null,d),d=a.child,P=r.child.memoizedState,P===null?P=jh(u):(y=P.cachePool,y!==null?(J=Yt._currentValue,y=y.parent!==J?{parent:J,pool:J}:y):y=zw(),P={baseLanes:P.baseLanes|u,cachePool:y}),d.memoizedState=P,d.childLanes=Oh(r,A,u),a.memoizedState=Mh,Ls(r.child,d)):(zi(a),u=r.child,r=u.sibling,u=Xr(u,{mode:"visible",children:d.children}),u.return=a,u.sibling=null,r!==null&&(A=a.deletions,A===null?(a.deletions=[r],a.flags|=16):A.push(r)),a.child=u,a.memoizedState=null,u)}function zh(r,a){return a=Fu({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function Fu(r,a){return r=Dn(22,r,null,a),r.lanes=0,r}function Dh(r,a,u){return Ea(a,r.child,null,u),r=zh(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function G_(r,a,u){r.lanes|=a;var d=r.alternate;d!==null&&(d.lanes|=a),Qd(r.return,a,u)}function Lh(r,a,u,d,y,x){var A=r.memoizedState;A===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:y,treeForkCount:x}:(A.isBackwards=a,A.rendering=null,A.renderingStartTime=0,A.last=d,A.tail=u,A.tailMode=y,A.treeForkCount=x)}function X_(r,a,u){var d=a.pendingProps,y=d.revealOrder,x=d.tail;d=d.children;var A=Pt.current,P=(A&2)!==0;if(P?(A=A&1|2,a.flags|=128):A&=1,q(Pt,A),un(r,a,d,u),d=lt?Ss:0,!P&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&G_(r,u,a);else if(r.tag===19)G_(r,u,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(y){case"forwards":for(u=a.child,y=null;u!==null;)r=u.alternate,r!==null&&ju(r)===null&&(y=u),u=u.sibling;u=y,u===null?(y=a.child,a.child=null):(y=u.sibling,u.sibling=null),Lh(a,!1,y,u,x,d);break;case"backwards":case"unstable_legacy-backwards":for(u=null,y=a.child,a.child=null;y!==null;){if(r=y.alternate,r!==null&&ju(r)===null){a.child=y;break}r=y.sibling,y.sibling=u,u=y,y=r}Lh(a,!0,u,null,x,d);break;case"together":Lh(a,!1,null,null,void 0,d);break;default:a.memoizedState=null}return a.child}function ei(r,a,u){if(r!==null&&(a.dependencies=r.dependencies),Ii|=a.lanes,(u&a.childLanes)===0)if(r!==null){if(oo(r,a,u,!1),(u&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(i(153));if(a.child!==null){for(r=a.child,u=Xr(r,r.pendingProps),a.child=u,u.return=a;r.sibling!==null;)r=r.sibling,u=u.sibling=Xr(r,r.pendingProps),u.return=a;u.sibling=null}return a.child}function qh(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&Eu(r)))}function VD(r,a,u){switch(a.tag){case 3:re(a,a.stateNode.containerInfo),Ri(a,Yt,r.memoizedState.cache),va();break;case 27:case 5:me(a);break;case 4:re(a,a.stateNode.containerInfo);break;case 10:Ri(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,lh(a),null;break;case 13:var d=a.memoizedState;if(d!==null)return d.dehydrated!==null?(zi(a),a.flags|=128,null):(u&a.child.childLanes)!==0?Y_(r,a,u):(zi(a),r=ei(r,a,u),r!==null?r.sibling:null);zi(a);break;case 19:var y=(r.flags&128)!==0;if(d=(u&a.childLanes)!==0,d||(oo(r,a,u,!1),d=(u&a.childLanes)!==0),y){if(d)return X_(r,a,u);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),q(Pt,Pt.current),d)break;return null;case 22:return a.lanes=0,H_(r,a,u,a.pendingProps);case 24:Ri(a,Yt,r.memoizedState.cache)}return ei(r,a,u)}function K_(r,a,u){if(r!==null)if(r.memoizedProps!==a.pendingProps)Xt=!0;else{if(!qh(r,u)&&(a.flags&128)===0)return Xt=!1,VD(r,a,u);Xt=(r.flags&131072)!==0}else Xt=!1,lt&&(a.flags&1048576)!==0&&kw(a,Ss,a.index);switch(a.lanes=0,a.tag){case 16:e:{var d=a.pendingProps;if(r=_a(a.elementType),a.type=r,typeof r=="function")Pd(r)?(d=Na(r,d),a.tag=1,a=F_(null,a,r,d,u)):(a.tag=0,a=Rh(null,a,r,d,u));else{if(r!=null){var y=r.$$typeof;if(y===k){a.tag=11,a=q_(null,a,r,d,u);break e}else if(y===O){a.tag=14,a=I_(null,a,r,d,u);break e}}throw a=L(r)||r,Error(i(306,a,""))}}return a;case 0:return Rh(r,a,a.type,a.pendingProps,u);case 1:return d=a.type,y=Na(d,a.pendingProps),F_(r,a,d,y,u);case 3:e:{if(re(a,a.stateNode.containerInfo),r===null)throw Error(i(387));d=a.pendingProps;var x=a.memoizedState;y=x.element,rh(r,a),Ms(a,d,null,u);var A=a.memoizedState;if(d=A.cache,Ri(a,Yt,d),d!==x.cache&&Zd(a,[Yt],u,!0),Rs(),d=A.element,x.isDehydrated)if(x={element:d,isDehydrated:!1,cache:A.cache},a.updateQueue.baseState=x,a.memoizedState=x,a.flags&256){a=$_(r,a,d,u);break e}else if(d!==y){y=Qn(Error(i(424)),a),Es(y),a=$_(r,a,d,u);break e}else{switch(r=a.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(At=tr(r.firstChild),sn=a,lt=!0,Ti=null,Jn=!0,u=Hw(a,null,d,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(va(),d===y){a=ei(r,a,u);break e}un(r,a,d,u)}a=a.child}return a;case 26:return Vu(r,a),r===null?(u=oE(a.type,null,a.pendingProps,null))?a.memoizedState=u:lt||(u=a.type,r=a.pendingProps,d=oc(W.current).createElement(u),d[Ut]=a,d[hn]=r,cn(d,u,r),$t(d),a.stateNode=d):a.memoizedState=oE(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return me(a),r===null&&lt&&(d=a.stateNode=rE(a.type,a.pendingProps,W.current),sn=a,Jn=!0,y=At,Vi(a.type)?(gp=y,At=tr(d.firstChild)):At=y),un(r,a,a.pendingProps.children,u),Vu(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&lt&&((y=d=At)&&(d=x4(d,a.type,a.pendingProps,Jn),d!==null?(a.stateNode=d,sn=a,At=tr(d.firstChild),Jn=!1,y=!0):y=!1),y||Ai(a)),me(a),y=a.type,x=a.pendingProps,A=r!==null?r.memoizedProps:null,d=x.children,fp(y,x)?d=null:A!==null&&fp(y,A)&&(a.flags|=32),a.memoizedState!==null&&(y=ch(r,a,zD,null,null,u),Zs._currentValue=y),Vu(r,a),un(r,a,d,u),a.child;case 6:return r===null&&lt&&((r=u=At)&&(u=b4(u,a.pendingProps,Jn),u!==null?(a.stateNode=u,sn=a,At=null,r=!0):r=!1),r||Ai(a)),null;case 13:return Y_(r,a,u);case 4:return re(a,a.stateNode.containerInfo),d=a.pendingProps,r===null?a.child=Ea(a,null,d,u):un(r,a,d,u),a.child;case 11:return q_(r,a,a.type,a.pendingProps,u);case 7:return un(r,a,a.pendingProps,u),a.child;case 8:return un(r,a,a.pendingProps.children,u),a.child;case 12:return un(r,a,a.pendingProps.children,u),a.child;case 10:return d=a.pendingProps,Ri(a,a.type,d.value),un(r,a,d.children,u),a.child;case 9:return y=a.type._context,d=a.pendingProps.children,ba(a),y=ln(y),d=d(y),a.flags|=1,un(r,a,d,u),a.child;case 14:return I_(r,a,a.type,a.pendingProps,u);case 15:return B_(r,a,a.type,a.pendingProps,u);case 19:return X_(r,a,u);case 31:return PD(r,a,u);case 22:return H_(r,a,u,a.pendingProps);case 24:return ba(a),d=ln(Yt),r===null?(y=eh(),y===null&&(y=Nt,x=Wd(),y.pooledCache=x,x.refCount++,x!==null&&(y.pooledCacheLanes|=u),y=x),a.memoizedState={parent:d,cache:y},nh(a),Ri(a,Yt,y)):((r.lanes&u)!==0&&(rh(r,a),Ms(a,null,null,u),Rs()),y=r.memoizedState,x=a.memoizedState,y.parent!==d?(y={parent:d,cache:d},a.memoizedState=y,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=y),Ri(a,Yt,d)):(d=x.cache,Ri(a,Yt,d),d!==y.cache&&Zd(a,[Yt],u,!0))),un(r,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function ti(r){r.flags|=4}function Ih(r,a,u,d,y){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(y&335544128)===y)if(r.stateNode.complete)r.flags|=8192;else if(_S())r.flags|=8192;else throw Sa=Tu,th}else r.flags&=-16777217}function Q_(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!fE(a))if(_S())r.flags|=8192;else throw Sa=Tu,th}function $u(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?De():536870912,r.lanes|=a,xo|=a)}function qs(r,a){if(!lt)switch(r.tailMode){case"hidden":a=r.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?r.tail=null:u.sibling=null;break;case"collapsed":u=r.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Rt(r){var a=r.alternate!==null&&r.alternate.child===r.child,u=0,d=0;if(a)for(var y=r.child;y!==null;)u|=y.lanes|y.childLanes,d|=y.subtreeFlags&65011712,d|=y.flags&65011712,y.return=r,y=y.sibling;else for(y=r.child;y!==null;)u|=y.lanes|y.childLanes,d|=y.subtreeFlags,d|=y.flags,y.return=r,y=y.sibling;return r.subtreeFlags|=d,r.childLanes=u,a}function FD(r,a,u){var d=a.pendingProps;switch(Yd(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rt(a),null;case 1:return Rt(a),null;case 3:return u=a.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),a.memoizedState.cache!==d&&(a.flags|=2048),Zr(Yt),se(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(r===null||r.child===null)&&(ao(a)?ti(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Xd())),Rt(a),null;case 26:var y=a.type,x=a.memoizedState;return r===null?(ti(a),x!==null?(Rt(a),Q_(a,x)):(Rt(a),Ih(a,y,null,d,u))):x?x!==r.memoizedState?(ti(a),Rt(a),Q_(a,x)):(Rt(a),a.flags&=-16777217):(r=r.memoizedProps,r!==d&&ti(a),Rt(a),Ih(a,y,r,d,u)),null;case 27:if(be(a),u=W.current,y=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==d&&ti(a);else{if(!d){if(a.stateNode===null)throw Error(i(166));return Rt(a),null}r=Y.current,ao(a)?Aw(a):(r=rE(y,d,u),a.stateNode=r,ti(a))}return Rt(a),null;case 5:if(be(a),y=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==d&&ti(a);else{if(!d){if(a.stateNode===null)throw Error(i(166));return Rt(a),null}if(x=Y.current,ao(a))Aw(a);else{var A=oc(W.current);switch(x){case 1:x=A.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:x=A.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":x=A.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":x=A.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":x=A.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof d.is=="string"?A.createElement("select",{is:d.is}):A.createElement("select"),d.multiple?x.multiple=!0:d.size&&(x.size=d.size);break;default:x=typeof d.is=="string"?A.createElement(y,{is:d.is}):A.createElement(y)}}x[Ut]=a,x[hn]=d;e:for(A=a.child;A!==null;){if(A.tag===5||A.tag===6)x.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===a)break e;for(;A.sibling===null;){if(A.return===null||A.return===a)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}a.stateNode=x;e:switch(cn(x,y,d),y){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&ti(a)}}return Rt(a),Ih(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,u),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==d&&ti(a);else{if(typeof d!="string"&&a.stateNode===null)throw Error(i(166));if(r=W.current,ao(a)){if(r=a.stateNode,u=a.memoizedProps,d=null,y=sn,y!==null)switch(y.tag){case 27:case 5:d=y.memoizedProps}r[Ut]=a,r=!!(r.nodeValue===u||d!==null&&d.suppressHydrationWarning===!0||YS(r.nodeValue,u)),r||Ai(a,!0)}else r=oc(r).createTextNode(d),r[Ut]=a,a.stateNode=r}return Rt(a),null;case 31:if(u=a.memoizedState,r===null||r.memoizedState!==null){if(d=ao(a),u!==null){if(r===null){if(!d)throw Error(i(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[Ut]=a}else va(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Rt(a),r=!1}else u=Xd(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=u),r=!0;if(!r)return a.flags&256?(qn(a),a):(qn(a),null);if((a.flags&128)!==0)throw Error(i(558))}return Rt(a),null;case 13:if(d=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(y=ao(a),d!==null&&d.dehydrated!==null){if(r===null){if(!y)throw Error(i(318));if(y=a.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(i(317));y[Ut]=a}else va(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Rt(a),y=!1}else y=Xd(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(qn(a),a):(qn(a),null)}return qn(a),(a.flags&128)!==0?(a.lanes=u,a):(u=d!==null,r=r!==null&&r.memoizedState!==null,u&&(d=a.child,y=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(y=d.alternate.memoizedState.cachePool.pool),x=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(x=d.memoizedState.cachePool.pool),x!==y&&(d.flags|=2048)),u!==r&&u&&(a.child.flags|=8192),$u(a,a.updateQueue),Rt(a),null);case 4:return se(),r===null&&op(a.stateNode.containerInfo),Rt(a),null;case 10:return Zr(a.type),Rt(a),null;case 19:if($(Pt),d=a.memoizedState,d===null)return Rt(a),null;if(y=(a.flags&128)!==0,x=d.rendering,x===null)if(y)qs(d,!1);else{if(Bt!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(x=ju(r),x!==null){for(a.flags|=128,qs(d,!1),r=x.updateQueue,a.updateQueue=r,$u(a,r),a.subtreeFlags=0,r=u,u=a.child;u!==null;)Ew(u,r),u=u.sibling;return q(Pt,Pt.current&1|2),lt&&Kr(a,d.treeForkCount),a.child}r=r.sibling}d.tail!==null&&Ve()>Qu&&(a.flags|=128,y=!0,qs(d,!1),a.lanes=4194304)}else{if(!y)if(r=ju(x),r!==null){if(a.flags|=128,y=!0,r=r.updateQueue,a.updateQueue=r,$u(a,r),qs(d,!0),d.tail===null&&d.tailMode==="hidden"&&!x.alternate&&!lt)return Rt(a),null}else 2*Ve()-d.renderingStartTime>Qu&&u!==536870912&&(a.flags|=128,y=!0,qs(d,!1),a.lanes=4194304);d.isBackwards?(x.sibling=a.child,a.child=x):(r=d.last,r!==null?r.sibling=x:a.child=x,d.last=x)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=Ve(),r.sibling=null,u=Pt.current,q(Pt,y?u&1|2:u&1),lt&&Kr(a,d.treeForkCount),r):(Rt(a),null);case 22:case 23:return qn(a),sh(),d=a.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(a.flags|=8192):d&&(a.flags|=8192),d?(u&536870912)!==0&&(a.flags&128)===0&&(Rt(a),a.subtreeFlags&6&&(a.flags|=8192)):Rt(a),u=a.updateQueue,u!==null&&$u(a,u.retryQueue),u=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),d=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),d!==u&&(a.flags|=2048),r!==null&&$(wa),null;case 24:return u=null,r!==null&&(u=r.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),Zr(Yt),Rt(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function $D(r,a){switch(Yd(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return Zr(Yt),se(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return be(a),null;case 31:if(a.memoizedState!==null){if(qn(a),a.alternate===null)throw Error(i(340));va()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(qn(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(i(340));va()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return $(Pt),null;case 4:return se(),null;case 10:return Zr(a.type),null;case 22:case 23:return qn(a),sh(),r!==null&&$(wa),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return Zr(Yt),null;case 25:return null;default:return null}}function Z_(r,a){switch(Yd(a),a.tag){case 3:Zr(Yt),se();break;case 26:case 27:case 5:be(a);break;case 4:se();break;case 31:a.memoizedState!==null&&qn(a);break;case 13:qn(a);break;case 19:$(Pt);break;case 10:Zr(a.type);break;case 22:case 23:qn(a),sh(),r!==null&&$(wa);break;case 24:Zr(Yt)}}function Is(r,a){try{var u=a.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var y=d.next;u=y;do{if((u.tag&r)===r){d=void 0;var x=u.create,A=u.inst;d=x(),A.destroy=d}u=u.next}while(u!==y)}}catch(P){wt(a,a.return,P)}}function Li(r,a,u){try{var d=a.updateQueue,y=d!==null?d.lastEffect:null;if(y!==null){var x=y.next;d=x;do{if((d.tag&r)===r){var A=d.inst,P=A.destroy;if(P!==void 0){A.destroy=void 0,y=a;var J=u,ae=P;try{ae()}catch(ce){wt(y,J,ce)}}}d=d.next}while(d!==x)}}catch(ce){wt(a,a.return,ce)}}function W_(r){var a=r.updateQueue;if(a!==null){var u=r.stateNode;try{Pw(a,u)}catch(d){wt(r,r.return,d)}}}function J_(r,a,u){u.props=Na(r.type,r.memoizedProps),u.state=r.memoizedState;try{u.componentWillUnmount()}catch(d){wt(r,a,d)}}function Bs(r,a){try{var u=r.ref;if(u!==null){switch(r.tag){case 26:case 27:case 5:var d=r.stateNode;break;case 30:d=r.stateNode;break;default:d=r.stateNode}typeof u=="function"?r.refCleanup=u(d):u.current=d}}catch(y){wt(r,a,y)}}function Rr(r,a){var u=r.ref,d=r.refCleanup;if(u!==null)if(typeof d=="function")try{d()}catch(y){wt(r,a,y)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(y){wt(r,a,y)}else u.current=null}function eS(r){var a=r.type,u=r.memoizedProps,d=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":u.autoFocus&&d.focus();break e;case"img":u.src?d.src=u.src:u.srcSet&&(d.srcset=u.srcSet)}}catch(y){wt(r,r.return,y)}}function Bh(r,a,u){try{var d=r.stateNode;h4(d,r.type,u,a),d[hn]=a}catch(y){wt(r,r.return,y)}}function tS(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Vi(r.type)||r.tag===4}function Hh(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||tS(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Vi(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function Uh(r,a,u){var d=r.tag;if(d===5||d===6)r=r.stateNode,a?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(r,a):(a=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,a.appendChild(r),u=u._reactRootContainer,u!=null||a.onclick!==null||(a.onclick=Yr));else if(d!==4&&(d===27&&Vi(r.type)&&(u=r.stateNode,a=null),r=r.child,r!==null))for(Uh(r,a,u),r=r.sibling;r!==null;)Uh(r,a,u),r=r.sibling}function Yu(r,a,u){var d=r.tag;if(d===5||d===6)r=r.stateNode,a?u.insertBefore(r,a):u.appendChild(r);else if(d!==4&&(d===27&&Vi(r.type)&&(u=r.stateNode),r=r.child,r!==null))for(Yu(r,a,u),r=r.sibling;r!==null;)Yu(r,a,u),r=r.sibling}function nS(r){var a=r.stateNode,u=r.memoizedProps;try{for(var d=r.type,y=a.attributes;y.length;)a.removeAttributeNode(y[0]);cn(a,d,u),a[Ut]=r,a[hn]=u}catch(x){wt(r,r.return,x)}}var ni=!1,Kt=!1,Ph=!1,rS=typeof WeakSet=="function"?WeakSet:Set,on=null;function YD(r,a){if(r=r.containerInfo,up=hc,r=mw(r),Dd(r)){if("selectionStart"in r)var u={start:r.selectionStart,end:r.selectionEnd};else e:{u=(u=r.ownerDocument)&&u.defaultView||window;var d=u.getSelection&&u.getSelection();if(d&&d.rangeCount!==0){u=d.anchorNode;var y=d.anchorOffset,x=d.focusNode;d=d.focusOffset;try{u.nodeType,x.nodeType}catch{u=null;break e}var A=0,P=-1,J=-1,ae=0,ce=0,de=r,oe=null;t:for(;;){for(var le;de!==u||y!==0&&de.nodeType!==3||(P=A+y),de!==x||d!==0&&de.nodeType!==3||(J=A+d),de.nodeType===3&&(A+=de.nodeValue.length),(le=de.firstChild)!==null;)oe=de,de=le;for(;;){if(de===r)break t;if(oe===u&&++ae===y&&(P=A),oe===x&&++ce===d&&(J=A),(le=de.nextSibling)!==null)break;de=oe,oe=de.parentNode}de=le}u=P===-1||J===-1?null:{start:P,end:J}}else u=null}u=u||{start:0,end:0}}else u=null;for(cp={focusedElem:r,selectionRange:u},hc=!1,on=a;on!==null;)if(a=on,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,on=r;else for(;on!==null;){switch(a=on,x=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(u=0;u<r.length;u++)y=r[u],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&x!==null){r=void 0,u=a,y=x.memoizedProps,x=x.memoizedState,d=u.stateNode;try{var je=Na(u.type,y);r=d.getSnapshotBeforeUpdate(je,x),d.__reactInternalSnapshotBeforeUpdate=r}catch(Ye){wt(u,u.return,Ye)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,u=r.nodeType,u===9)hp(r);else if(u===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":hp(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(i(163))}if(r=a.sibling,r!==null){r.return=a.return,on=r;break}on=a.return}}function iS(r,a,u){var d=u.flags;switch(u.tag){case 0:case 11:case 15:ii(r,u),d&4&&Is(5,u);break;case 1:if(ii(r,u),d&4)if(r=u.stateNode,a===null)try{r.componentDidMount()}catch(A){wt(u,u.return,A)}else{var y=Na(u.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(y,a,r.__reactInternalSnapshotBeforeUpdate)}catch(A){wt(u,u.return,A)}}d&64&&W_(u),d&512&&Bs(u,u.return);break;case 3:if(ii(r,u),d&64&&(r=u.updateQueue,r!==null)){if(a=null,u.child!==null)switch(u.child.tag){case 27:case 5:a=u.child.stateNode;break;case 1:a=u.child.stateNode}try{Pw(r,a)}catch(A){wt(u,u.return,A)}}break;case 27:a===null&&d&4&&nS(u);case 26:case 5:ii(r,u),a===null&&d&4&&eS(u),d&512&&Bs(u,u.return);break;case 12:ii(r,u);break;case 31:ii(r,u),d&4&&sS(r,u);break;case 13:ii(r,u),d&4&&lS(r,u),d&64&&(r=u.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(u=t4.bind(null,u),w4(r,u))));break;case 22:if(d=u.memoizedState!==null||ni,!d){a=a!==null&&a.memoizedState!==null||Kt,y=ni;var x=Kt;ni=d,(Kt=a)&&!x?ai(r,u,(u.subtreeFlags&8772)!==0):ii(r,u),ni=y,Kt=x}break;case 30:break;default:ii(r,u)}}function aS(r){var a=r.alternate;a!==null&&(r.alternate=null,aS(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&fs(a)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var zt=null,Sn=!1;function ri(r,a,u){for(u=u.child;u!==null;)oS(r,a,u),u=u.sibling}function oS(r,a,u){if(ct&&typeof ct.onCommitFiberUnmount=="function")try{ct.onCommitFiberUnmount(xt,u)}catch{}switch(u.tag){case 26:Kt||Rr(u,a),ri(r,a,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Kt||Rr(u,a);var d=zt,y=Sn;Vi(u.type)&&(zt=u.stateNode,Sn=!1),ri(r,a,u),Xs(u.stateNode),zt=d,Sn=y;break;case 5:Kt||Rr(u,a);case 6:if(d=zt,y=Sn,zt=null,ri(r,a,u),zt=d,Sn=y,zt!==null)if(Sn)try{(zt.nodeType===9?zt.body:zt.nodeName==="HTML"?zt.ownerDocument.body:zt).removeChild(u.stateNode)}catch(x){wt(u,a,x)}else try{zt.removeChild(u.stateNode)}catch(x){wt(u,a,x)}break;case 18:zt!==null&&(Sn?(r=zt,WS(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,u.stateNode),ko(r)):WS(zt,u.stateNode));break;case 4:d=zt,y=Sn,zt=u.stateNode.containerInfo,Sn=!0,ri(r,a,u),zt=d,Sn=y;break;case 0:case 11:case 14:case 15:Li(2,u,a),Kt||Li(4,u,a),ri(r,a,u);break;case 1:Kt||(Rr(u,a),d=u.stateNode,typeof d.componentWillUnmount=="function"&&J_(u,a,d)),ri(r,a,u);break;case 21:ri(r,a,u);break;case 22:Kt=(d=Kt)||u.memoizedState!==null,ri(r,a,u),Kt=d;break;default:ri(r,a,u)}}function sS(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{ko(r)}catch(u){wt(a,a.return,u)}}}function lS(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{ko(r)}catch(u){wt(a,a.return,u)}}function GD(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new rS),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new rS),a;default:throw Error(i(435,r.tag))}}function Gu(r,a){var u=GD(r);a.forEach(function(d){if(!u.has(d)){u.add(d);var y=n4.bind(null,r,d);d.then(y,y)}})}function En(r,a){var u=a.deletions;if(u!==null)for(var d=0;d<u.length;d++){var y=u[d],x=r,A=a,P=A;e:for(;P!==null;){switch(P.tag){case 27:if(Vi(P.type)){zt=P.stateNode,Sn=!1;break e}break;case 5:zt=P.stateNode,Sn=!1;break e;case 3:case 4:zt=P.stateNode.containerInfo,Sn=!0;break e}P=P.return}if(zt===null)throw Error(i(160));oS(x,A,y),zt=null,Sn=!1,x=y.alternate,x!==null&&(x.return=null),y.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)uS(a,r),a=a.sibling}var mr=null;function uS(r,a){var u=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:En(a,r),Cn(r),d&4&&(Li(3,r,r.return),Is(3,r),Li(5,r,r.return));break;case 1:En(a,r),Cn(r),d&512&&(Kt||u===null||Rr(u,u.return)),d&64&&ni&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(u=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=u===null?d:u.concat(d))));break;case 26:var y=mr;if(En(a,r),Cn(r),d&512&&(Kt||u===null||Rr(u,u.return)),d&4){var x=u!==null?u.memoizedState:null;if(d=r.memoizedState,u===null)if(d===null)if(r.stateNode===null){e:{d=r.type,u=r.memoizedProps,y=y.ownerDocument||y;t:switch(d){case"title":x=y.getElementsByTagName("title")[0],(!x||x[ca]||x[Ut]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=y.createElement(d),y.head.insertBefore(x,y.querySelector("head > title"))),cn(x,d,u),x[Ut]=r,$t(x),d=x;break e;case"link":var A=uE("link","href",y).get(d+(u.href||""));if(A){for(var P=0;P<A.length;P++)if(x=A[P],x.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&x.getAttribute("rel")===(u.rel==null?null:u.rel)&&x.getAttribute("title")===(u.title==null?null:u.title)&&x.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){A.splice(P,1);break t}}x=y.createElement(d),cn(x,d,u),y.head.appendChild(x);break;case"meta":if(A=uE("meta","content",y).get(d+(u.content||""))){for(P=0;P<A.length;P++)if(x=A[P],x.getAttribute("content")===(u.content==null?null:""+u.content)&&x.getAttribute("name")===(u.name==null?null:u.name)&&x.getAttribute("property")===(u.property==null?null:u.property)&&x.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&x.getAttribute("charset")===(u.charSet==null?null:u.charSet)){A.splice(P,1);break t}}x=y.createElement(d),cn(x,d,u),y.head.appendChild(x);break;default:throw Error(i(468,d))}x[Ut]=r,$t(x),d=x}r.stateNode=d}else cE(y,r.type,r.stateNode);else r.stateNode=lE(y,d,r.memoizedProps);else x!==d?(x===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):x.count--,d===null?cE(y,r.type,r.stateNode):lE(y,d,r.memoizedProps)):d===null&&r.stateNode!==null&&Bh(r,r.memoizedProps,u.memoizedProps)}break;case 27:En(a,r),Cn(r),d&512&&(Kt||u===null||Rr(u,u.return)),u!==null&&d&4&&Bh(r,r.memoizedProps,u.memoizedProps);break;case 5:if(En(a,r),Cn(r),d&512&&(Kt||u===null||Rr(u,u.return)),r.flags&32){y=r.stateNode;try{Ka(y,"")}catch(je){wt(r,r.return,je)}}d&4&&r.stateNode!=null&&(y=r.memoizedProps,Bh(r,y,u!==null?u.memoizedProps:y)),d&1024&&(Ph=!0);break;case 6:if(En(a,r),Cn(r),d&4){if(r.stateNode===null)throw Error(i(162));d=r.memoizedProps,u=r.stateNode;try{u.nodeValue=d}catch(je){wt(r,r.return,je)}}break;case 3:if(uc=null,y=mr,mr=sc(a.containerInfo),En(a,r),mr=y,Cn(r),d&4&&u!==null&&u.memoizedState.isDehydrated)try{ko(a.containerInfo)}catch(je){wt(r,r.return,je)}Ph&&(Ph=!1,cS(r));break;case 4:d=mr,mr=sc(r.stateNode.containerInfo),En(a,r),Cn(r),mr=d;break;case 12:En(a,r),Cn(r);break;case 31:En(a,r),Cn(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Gu(r,d)));break;case 13:En(a,r),Cn(r),r.child.flags&8192&&r.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Ku=Ve()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Gu(r,d)));break;case 22:y=r.memoizedState!==null;var J=u!==null&&u.memoizedState!==null,ae=ni,ce=Kt;if(ni=ae||y,Kt=ce||J,En(a,r),Kt=ce,ni=ae,Cn(r),d&8192)e:for(a=r.stateNode,a._visibility=y?a._visibility&-2:a._visibility|1,y&&(u===null||J||ni||Kt||ka(r)),u=null,a=r;;){if(a.tag===5||a.tag===26){if(u===null){J=u=a;try{if(x=J.stateNode,y)A=x.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{P=J.stateNode;var de=J.memoizedProps.style,oe=de!=null&&de.hasOwnProperty("display")?de.display:null;P.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(je){wt(J,J.return,je)}}}else if(a.tag===6){if(u===null){J=a;try{J.stateNode.nodeValue=y?"":J.memoizedProps}catch(je){wt(J,J.return,je)}}}else if(a.tag===18){if(u===null){J=a;try{var le=J.stateNode;y?JS(le,!0):JS(J.stateNode,!1)}catch(je){wt(J,J.return,je)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;u===a&&(u=null),a=a.return}u===a&&(u=null),a.sibling.return=a.return,a=a.sibling}d&4&&(d=r.updateQueue,d!==null&&(u=d.retryQueue,u!==null&&(d.retryQueue=null,Gu(r,u))));break;case 19:En(a,r),Cn(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Gu(r,d)));break;case 30:break;case 21:break;default:En(a,r),Cn(r)}}function Cn(r){var a=r.flags;if(a&2){try{for(var u,d=r.return;d!==null;){if(tS(d)){u=d;break}d=d.return}if(u==null)throw Error(i(160));switch(u.tag){case 27:var y=u.stateNode,x=Hh(r);Yu(r,x,y);break;case 5:var A=u.stateNode;u.flags&32&&(Ka(A,""),u.flags&=-33);var P=Hh(r);Yu(r,P,A);break;case 3:case 4:var J=u.stateNode.containerInfo,ae=Hh(r);Uh(r,ae,J);break;default:throw Error(i(161))}}catch(ce){wt(r,r.return,ce)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function cS(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;cS(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function ii(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)iS(r,a.alternate,a),a=a.sibling}function ka(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:Li(4,a,a.return),ka(a);break;case 1:Rr(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&J_(a,a.return,u),ka(a);break;case 27:Xs(a.stateNode);case 26:case 5:Rr(a,a.return),ka(a);break;case 22:a.memoizedState===null&&ka(a);break;case 30:ka(a);break;default:ka(a)}r=r.sibling}}function ai(r,a,u){for(u=u&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var d=a.alternate,y=r,x=a,A=x.flags;switch(x.tag){case 0:case 11:case 15:ai(y,x,u),Is(4,x);break;case 1:if(ai(y,x,u),d=x,y=d.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(ae){wt(d,d.return,ae)}if(d=x,y=d.updateQueue,y!==null){var P=d.stateNode;try{var J=y.shared.hiddenCallbacks;if(J!==null)for(y.shared.hiddenCallbacks=null,y=0;y<J.length;y++)Uw(J[y],P)}catch(ae){wt(d,d.return,ae)}}u&&A&64&&W_(x),Bs(x,x.return);break;case 27:nS(x);case 26:case 5:ai(y,x,u),u&&d===null&&A&4&&eS(x),Bs(x,x.return);break;case 12:ai(y,x,u);break;case 31:ai(y,x,u),u&&A&4&&sS(y,x);break;case 13:ai(y,x,u),u&&A&4&&lS(y,x);break;case 22:x.memoizedState===null&&ai(y,x,u),Bs(x,x.return);break;case 30:break;default:ai(y,x,u)}a=a.sibling}}function Vh(r,a){var u=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==u&&(r!=null&&r.refCount++,u!=null&&Cs(u))}function Fh(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Cs(r))}function gr(r,a,u,d){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)fS(r,a,u,d),a=a.sibling}function fS(r,a,u,d){var y=a.flags;switch(a.tag){case 0:case 11:case 15:gr(r,a,u,d),y&2048&&Is(9,a);break;case 1:gr(r,a,u,d);break;case 3:gr(r,a,u,d),y&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Cs(r)));break;case 12:if(y&2048){gr(r,a,u,d),r=a.stateNode;try{var x=a.memoizedProps,A=x.id,P=x.onPostCommit;typeof P=="function"&&P(A,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(J){wt(a,a.return,J)}}else gr(r,a,u,d);break;case 31:gr(r,a,u,d);break;case 13:gr(r,a,u,d);break;case 23:break;case 22:x=a.stateNode,A=a.alternate,a.memoizedState!==null?x._visibility&2?gr(r,a,u,d):Hs(r,a):x._visibility&2?gr(r,a,u,d):(x._visibility|=2,go(r,a,u,d,(a.subtreeFlags&10256)!==0||!1)),y&2048&&Vh(A,a);break;case 24:gr(r,a,u,d),y&2048&&Fh(a.alternate,a);break;default:gr(r,a,u,d)}}function go(r,a,u,d,y){for(y=y&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var x=r,A=a,P=u,J=d,ae=A.flags;switch(A.tag){case 0:case 11:case 15:go(x,A,P,J,y),Is(8,A);break;case 23:break;case 22:var ce=A.stateNode;A.memoizedState!==null?ce._visibility&2?go(x,A,P,J,y):Hs(x,A):(ce._visibility|=2,go(x,A,P,J,y)),y&&ae&2048&&Vh(A.alternate,A);break;case 24:go(x,A,P,J,y),y&&ae&2048&&Fh(A.alternate,A);break;default:go(x,A,P,J,y)}a=a.sibling}}function Hs(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var u=r,d=a,y=d.flags;switch(d.tag){case 22:Hs(u,d),y&2048&&Vh(d.alternate,d);break;case 24:Hs(u,d),y&2048&&Fh(d.alternate,d);break;default:Hs(u,d)}a=a.sibling}}var Us=8192;function yo(r,a,u){if(r.subtreeFlags&Us)for(r=r.child;r!==null;)dS(r,a,u),r=r.sibling}function dS(r,a,u){switch(r.tag){case 26:yo(r,a,u),r.flags&Us&&r.memoizedState!==null&&O4(u,mr,r.memoizedState,r.memoizedProps);break;case 5:yo(r,a,u);break;case 3:case 4:var d=mr;mr=sc(r.stateNode.containerInfo),yo(r,a,u),mr=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=Us,Us=16777216,yo(r,a,u),Us=d):yo(r,a,u));break;default:yo(r,a,u)}}function hS(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function Ps(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var d=a[u];on=d,mS(d,r)}hS(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)pS(r),r=r.sibling}function pS(r){switch(r.tag){case 0:case 11:case 15:Ps(r),r.flags&2048&&Li(9,r,r.return);break;case 3:Ps(r);break;case 12:Ps(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,Xu(r)):Ps(r);break;default:Ps(r)}}function Xu(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var u=0;u<a.length;u++){var d=a[u];on=d,mS(d,r)}hS(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:Li(8,a,a.return),Xu(a);break;case 22:u=a.stateNode,u._visibility&2&&(u._visibility&=-3,Xu(a));break;default:Xu(a)}r=r.sibling}}function mS(r,a){for(;on!==null;){var u=on;switch(u.tag){case 0:case 11:case 15:Li(8,u,a);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var d=u.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Cs(u.memoizedState.cache)}if(d=u.child,d!==null)d.return=u,on=d;else e:for(u=r;on!==null;){d=on;var y=d.sibling,x=d.return;if(aS(d),d===u){on=null;break e}if(y!==null){y.return=x,on=y;break e}on=x}}}var XD={getCacheForType:function(r){var a=ln(Yt),u=a.data.get(r);return u===void 0&&(u=r(),a.data.set(r,u)),u},cacheSignal:function(){return ln(Yt).controller.signal}},KD=typeof WeakMap=="function"?WeakMap:Map,yt=0,Nt=null,nt=null,ot=0,bt=0,In=null,qi=!1,vo=!1,$h=!1,oi=0,Bt=0,Ii=0,Ta=0,Yh=0,Bn=0,xo=0,Vs=null,Nn=null,Gh=!1,Ku=0,gS=0,Qu=1/0,Zu=null,Bi=null,rn=0,Hi=null,bo=null,si=0,Xh=0,Kh=null,yS=null,Fs=0,Qh=null;function Hn(){return(yt&2)!==0&&ot!==0?ot&-ot:z.T!==null?np():xi()}function vS(){if(Bn===0)if((ot&536870912)===0||lt){var r=Be;Be<<=1,(Be&3932160)===0&&(Be=262144),Bn=r}else Bn=536870912;return r=Ln.current,r!==null&&(r.flags|=32),Bn}function kn(r,a,u){(r===Nt&&(bt===2||bt===9)||r.cancelPendingCommit!==null)&&(wo(r,0),Ui(r,ot,Bn,!1)),dt(r,u),((yt&2)===0||r!==Nt)&&(r===Nt&&((yt&2)===0&&(Ta|=u),Bt===4&&Ui(r,ot,Bn,!1)),Mr(r))}function xS(r,a,u){if((yt&6)!==0)throw Error(i(327));var d=!u&&(a&127)===0&&(a&r.expiredLanes)===0||Ke(r,a),y=d?WD(r,a):Wh(r,a,!0),x=d;do{if(y===0){vo&&!d&&Ui(r,a,0,!1);break}else{if(u=r.current.alternate,x&&!QD(u)){y=Wh(r,a,!1),x=!1;continue}if(y===2){if(x=a,r.errorRecoveryDisabledLanes&x)var A=0;else A=r.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){a=A;e:{var P=r;y=Vs;var J=P.current.memoizedState.isDehydrated;if(J&&(wo(P,A).flags|=256),A=Wh(P,A,!1),A!==2){if($h&&!J){P.errorRecoveryDisabledLanes|=x,Ta|=x,y=4;break e}x=Nn,Nn=y,x!==null&&(Nn===null?Nn=x:Nn.push.apply(Nn,x))}y=A}if(x=!1,y!==2)continue}}if(y===1){wo(r,0),Ui(r,a,0,!0);break}e:{switch(d=r,x=y,x){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:Ui(d,a,Bn,!qi);break e;case 2:Nn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(y=Ku+300-Ve(),10<y)){if(Ui(d,a,Bn,!qi),Fe(d,0,!0)!==0)break e;si=a,d.timeoutHandle=QS(bS.bind(null,d,u,Nn,Zu,Gh,a,Bn,Ta,xo,qi,x,"Throttled",-0,0),y);break e}bS(d,u,Nn,Zu,Gh,a,Bn,Ta,xo,qi,x,null,-0,0)}}break}while(!0);Mr(r)}function bS(r,a,u,d,y,x,A,P,J,ae,ce,de,oe,le){if(r.timeoutHandle=-1,de=a.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yr},dS(a,x,de);var je=(x&62914560)===x?Ku-Ve():(x&4194048)===x?gS-Ve():0;if(je=z4(de,je),je!==null){si=x,r.cancelPendingCommit=je(TS.bind(null,r,a,x,u,d,y,A,P,J,ce,de,null,oe,le)),Ui(r,x,A,!ae);return}}TS(r,a,x,u,d,y,A,P,J)}function QD(r){for(var a=r;;){var u=a.tag;if((u===0||u===11||u===15)&&a.flags&16384&&(u=a.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var d=0;d<u.length;d++){var y=u[d],x=y.getSnapshot;y=y.value;try{if(!zn(x(),y))return!1}catch{return!1}}if(u=a.child,a.subtreeFlags&16384&&u!==null)u.return=a,a=u;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Ui(r,a,u,d){a&=~Yh,a&=~Ta,r.suspendedLanes|=a,r.pingedLanes&=~a,d&&(r.warmLanes|=a),d=r.expirationTimes;for(var y=a;0<y;){var x=31-ft(y),A=1<<x;d[x]=-1,y&=~A}u!==0&&at(r,u,a)}function Wu(){return(yt&6)===0?($s(0),!1):!0}function Zh(){if(nt!==null){if(bt===0)var r=nt.return;else r=nt,Qr=xa=null,hh(r),co=null,ks=0,r=nt;for(;r!==null;)Z_(r.alternate,r),r=r.return;nt=null}}function wo(r,a){var u=r.timeoutHandle;u!==-1&&(r.timeoutHandle=-1,g4(u)),u=r.cancelPendingCommit,u!==null&&(r.cancelPendingCommit=null,u()),si=0,Zh(),Nt=r,nt=u=Xr(r.current,null),ot=a,bt=0,In=null,qi=!1,vo=Ke(r,a),$h=!1,xo=Bn=Yh=Ta=Ii=Bt=0,Nn=Vs=null,Gh=!1,(a&8)!==0&&(a|=a&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=a;0<d;){var y=31-ft(d),x=1<<y;a|=r[y],d&=~x}return oi=a,xu(),u}function wS(r,a){Ze=null,z.H=Ds,a===uo||a===ku?(a=qw(),bt=3):a===th?(a=qw(),bt=4):bt=a===Ah?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,In=a,nt===null&&(Bt=1,Uu(r,Qn(a,r.current)))}function _S(){var r=Ln.current;return r===null?!0:(ot&4194048)===ot?er===null:(ot&62914560)===ot||(ot&536870912)!==0?r===er:!1}function SS(){var r=z.H;return z.H=Ds,r===null?Ds:r}function ES(){var r=z.A;return z.A=XD,r}function Ju(){Bt=4,qi||(ot&4194048)!==ot&&Ln.current!==null||(vo=!0),(Ii&134217727)===0&&(Ta&134217727)===0||Nt===null||Ui(Nt,ot,Bn,!1)}function Wh(r,a,u){var d=yt;yt|=2;var y=SS(),x=ES();(Nt!==r||ot!==a)&&(Zu=null,wo(r,a)),a=!1;var A=Bt;e:do try{if(bt!==0&&nt!==null){var P=nt,J=In;switch(bt){case 8:Zh(),A=6;break e;case 3:case 2:case 9:case 6:Ln.current===null&&(a=!0);var ae=bt;if(bt=0,In=null,_o(r,P,J,ae),u&&vo){A=0;break e}break;default:ae=bt,bt=0,In=null,_o(r,P,J,ae)}}ZD(),A=Bt;break}catch(ce){wS(r,ce)}while(!0);return a&&r.shellSuspendCounter++,Qr=xa=null,yt=d,z.H=y,z.A=x,nt===null&&(Nt=null,ot=0,xu()),A}function ZD(){for(;nt!==null;)CS(nt)}function WD(r,a){var u=yt;yt|=2;var d=SS(),y=ES();Nt!==r||ot!==a?(Zu=null,Qu=Ve()+500,wo(r,a)):vo=Ke(r,a);e:do try{if(bt!==0&&nt!==null){a=nt;var x=In;t:switch(bt){case 1:bt=0,In=null,_o(r,a,x,1);break;case 2:case 9:if(Dw(x)){bt=0,In=null,NS(a);break}a=function(){bt!==2&&bt!==9||Nt!==r||(bt=7),Mr(r)},x.then(a,a);break e;case 3:bt=7;break e;case 4:bt=5;break e;case 7:Dw(x)?(bt=0,In=null,NS(a)):(bt=0,In=null,_o(r,a,x,7));break;case 5:var A=null;switch(nt.tag){case 26:A=nt.memoizedState;case 5:case 27:var P=nt;if(A?fE(A):P.stateNode.complete){bt=0,In=null;var J=P.sibling;if(J!==null)nt=J;else{var ae=P.return;ae!==null?(nt=ae,ec(ae)):nt=null}break t}}bt=0,In=null,_o(r,a,x,5);break;case 6:bt=0,In=null,_o(r,a,x,6);break;case 8:Zh(),Bt=6;break e;default:throw Error(i(462))}}JD();break}catch(ce){wS(r,ce)}while(!0);return Qr=xa=null,z.H=d,z.A=y,yt=u,nt!==null?0:(Nt=null,ot=0,xu(),Bt)}function JD(){for(;nt!==null&&!_e();)CS(nt)}function CS(r){var a=K_(r.alternate,r,oi);r.memoizedProps=r.pendingProps,a===null?ec(r):nt=a}function NS(r){var a=r,u=a.alternate;switch(a.tag){case 15:case 0:a=V_(u,a,a.pendingProps,a.type,void 0,ot);break;case 11:a=V_(u,a,a.pendingProps,a.type.render,a.ref,ot);break;case 5:hh(a);default:Z_(u,a),a=nt=Ew(a,oi),a=K_(u,a,oi)}r.memoizedProps=r.pendingProps,a===null?ec(r):nt=a}function _o(r,a,u,d){Qr=xa=null,hh(a),co=null,ks=0;var y=a.return;try{if(UD(r,y,a,u,ot)){Bt=1,Uu(r,Qn(u,r.current)),nt=null;return}}catch(x){if(y!==null)throw nt=y,x;Bt=1,Uu(r,Qn(u,r.current)),nt=null;return}a.flags&32768?(lt||d===1?r=!0:vo||(ot&536870912)!==0?r=!1:(qi=r=!0,(d===2||d===9||d===3||d===6)&&(d=Ln.current,d!==null&&d.tag===13&&(d.flags|=16384))),kS(a,r)):ec(a)}function ec(r){var a=r;do{if((a.flags&32768)!==0){kS(a,qi);return}r=a.return;var u=FD(a.alternate,a,oi);if(u!==null){nt=u;return}if(a=a.sibling,a!==null){nt=a;return}nt=a=r}while(a!==null);Bt===0&&(Bt=5)}function kS(r,a){do{var u=$D(r.alternate,r);if(u!==null){u.flags&=32767,nt=u;return}if(u=r.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!a&&(r=r.sibling,r!==null)){nt=r;return}nt=r=u}while(r!==null);Bt=6,nt=null}function TS(r,a,u,d,y,x,A,P,J){r.cancelPendingCommit=null;do tc();while(rn!==0);if((yt&6)!==0)throw Error(i(327));if(a!==null){if(a===r.current)throw Error(i(177));if(x=a.lanes|a.childLanes,x|=Hd,Ae(r,u,x,A,P,J),r===Nt&&(nt=Nt=null,ot=0),bo=a,Hi=r,si=u,Xh=x,Kh=y,yS=d,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,r4(Me,function(){return OS(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||d){d=z.T,z.T=null,y=U.p,U.p=2,A=yt,yt|=4;try{YD(r,a,u)}finally{yt=A,U.p=y,z.T=d}}rn=1,AS(),RS(),MS()}}function AS(){if(rn===1){rn=0;var r=Hi,a=bo,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=z.T,z.T=null;var d=U.p;U.p=2;var y=yt;yt|=4;try{uS(a,r);var x=cp,A=mw(r.containerInfo),P=x.focusedElem,J=x.selectionRange;if(A!==P&&P&&P.ownerDocument&&pw(P.ownerDocument.documentElement,P)){if(J!==null&&Dd(P)){var ae=J.start,ce=J.end;if(ce===void 0&&(ce=ae),"selectionStart"in P)P.selectionStart=ae,P.selectionEnd=Math.min(ce,P.value.length);else{var de=P.ownerDocument||document,oe=de&&de.defaultView||window;if(oe.getSelection){var le=oe.getSelection(),je=P.textContent.length,Ye=Math.min(J.start,je),Ct=J.end===void 0?Ye:Math.min(J.end,je);!le.extend&&Ye>Ct&&(A=Ct,Ct=Ye,Ye=A);var ne=hw(P,Ye),ee=hw(P,Ct);if(ne&&ee&&(le.rangeCount!==1||le.anchorNode!==ne.node||le.anchorOffset!==ne.offset||le.focusNode!==ee.node||le.focusOffset!==ee.offset)){var ie=de.createRange();ie.setStart(ne.node,ne.offset),le.removeAllRanges(),Ye>Ct?(le.addRange(ie),le.extend(ee.node,ee.offset)):(ie.setEnd(ee.node,ee.offset),le.addRange(ie))}}}}for(de=[],le=P;le=le.parentNode;)le.nodeType===1&&de.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<de.length;P++){var fe=de[P];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}hc=!!up,cp=up=null}finally{yt=y,U.p=d,z.T=u}}r.current=a,rn=2}}function RS(){if(rn===2){rn=0;var r=Hi,a=bo,u=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||u){u=z.T,z.T=null;var d=U.p;U.p=2;var y=yt;yt|=4;try{iS(r,a.alternate,a)}finally{yt=y,U.p=d,z.T=u}}rn=3}}function MS(){if(rn===4||rn===3){rn=0,Ie();var r=Hi,a=bo,u=si,d=yS;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?rn=5:(rn=0,bo=Hi=null,jS(r,r.pendingLanes));var y=r.pendingLanes;if(y===0&&(Bi=null),Xn(u),a=a.stateNode,ct&&typeof ct.onCommitFiberRoot=="function")try{ct.onCommitFiberRoot(xt,a,void 0,(a.current.flags&128)===128)}catch{}if(d!==null){a=z.T,y=U.p,U.p=2,z.T=null;try{for(var x=r.onRecoverableError,A=0;A<d.length;A++){var P=d[A];x(P.value,{componentStack:P.stack})}}finally{z.T=a,U.p=y}}(si&3)!==0&&tc(),Mr(r),y=r.pendingLanes,(u&261930)!==0&&(y&42)!==0?r===Qh?Fs++:(Fs=0,Qh=r):Fs=0,$s(0)}}function jS(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,Cs(a)))}function tc(){return AS(),RS(),MS(),OS()}function OS(){if(rn!==5)return!1;var r=Hi,a=Xh;Xh=0;var u=Xn(si),d=z.T,y=U.p;try{U.p=32>u?32:u,z.T=null,u=Kh,Kh=null;var x=Hi,A=si;if(rn=0,bo=Hi=null,si=0,(yt&6)!==0)throw Error(i(331));var P=yt;if(yt|=4,pS(x.current),fS(x,x.current,A,u),yt=P,$s(0,!1),ct&&typeof ct.onPostCommitFiberRoot=="function")try{ct.onPostCommitFiberRoot(xt,x)}catch{}return!0}finally{U.p=y,z.T=d,jS(r,a)}}function zS(r,a,u){a=Qn(u,a),a=Th(r.stateNode,a,2),r=Oi(r,a,2),r!==null&&(dt(r,2),Mr(r))}function wt(r,a,u){if(r.tag===3)zS(r,r,u);else for(;a!==null;){if(a.tag===3){zS(a,r,u);break}else if(a.tag===1){var d=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Bi===null||!Bi.has(d))){r=Qn(u,r),u=D_(2),d=Oi(a,u,2),d!==null&&(L_(u,d,a,r),dt(d,2),Mr(d));break}}a=a.return}}function Jh(r,a,u){var d=r.pingCache;if(d===null){d=r.pingCache=new KD;var y=new Set;d.set(a,y)}else y=d.get(a),y===void 0&&(y=new Set,d.set(a,y));y.has(u)||($h=!0,y.add(u),r=e4.bind(null,r,a,u),a.then(r,r))}function e4(r,a,u){var d=r.pingCache;d!==null&&d.delete(a),r.pingedLanes|=r.suspendedLanes&u,r.warmLanes&=~u,Nt===r&&(ot&u)===u&&(Bt===4||Bt===3&&(ot&62914560)===ot&&300>Ve()-Ku?(yt&2)===0&&wo(r,0):Yh|=u,xo===ot&&(xo=0)),Mr(r)}function DS(r,a){a===0&&(a=De()),r=ga(r,a),r!==null&&(dt(r,a),Mr(r))}function t4(r){var a=r.memoizedState,u=0;a!==null&&(u=a.retryLane),DS(r,u)}function n4(r,a){var u=0;switch(r.tag){case 31:case 13:var d=r.stateNode,y=r.memoizedState;y!==null&&(u=y.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(i(314))}d!==null&&d.delete(a),DS(r,u)}function r4(r,a){return ye(r,a)}var nc=null,So=null,ep=!1,rc=!1,tp=!1,Pi=0;function Mr(r){r!==So&&r.next===null&&(So===null?nc=So=r:So=So.next=r),rc=!0,ep||(ep=!0,a4())}function $s(r,a){if(!tp&&rc){tp=!0;do for(var u=!1,d=nc;d!==null;){if(r!==0){var y=d.pendingLanes;if(y===0)var x=0;else{var A=d.suspendedLanes,P=d.pingedLanes;x=(1<<31-ft(42|r)+1)-1,x&=y&~(A&~P),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(u=!0,BS(d,x))}else x=ot,x=Fe(d,d===Nt?x:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(x&3)===0||Ke(d,x)||(u=!0,BS(d,x));d=d.next}while(u);tp=!1}}function i4(){LS()}function LS(){rc=ep=!1;var r=0;Pi!==0&&m4()&&(r=Pi);for(var a=Ve(),u=null,d=nc;d!==null;){var y=d.next,x=qS(d,a);x===0?(d.next=null,u===null?nc=y:u.next=y,y===null&&(So=u)):(u=d,(r!==0||(x&3)!==0)&&(rc=!0)),d=y}rn!==0&&rn!==5||$s(r),Pi!==0&&(Pi=0)}function qS(r,a){for(var u=r.suspendedLanes,d=r.pingedLanes,y=r.expirationTimes,x=r.pendingLanes&-62914561;0<x;){var A=31-ft(x),P=1<<A,J=y[A];J===-1?((P&u)===0||(P&d)!==0)&&(y[A]=ge(P,a)):J<=a&&(r.expiredLanes|=P),x&=~P}if(a=Nt,u=ot,u=Fe(r,r===a?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,u===0||r===a&&(bt===2||bt===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&Ue(d),r.callbackNode=null,r.callbackPriority=0;if((u&3)===0||Ke(r,u)){if(a=u&-u,a===r.callbackPriority)return a;switch(d!==null&&Ue(d),Xn(u)){case 2:case 8:u=pe;break;case 32:u=Me;break;case 268435456:u=Ge;break;default:u=Me}return d=IS.bind(null,r),u=ye(u,d),r.callbackPriority=a,r.callbackNode=u,a}return d!==null&&d!==null&&Ue(d),r.callbackPriority=2,r.callbackNode=null,2}function IS(r,a){if(rn!==0&&rn!==5)return r.callbackNode=null,r.callbackPriority=0,null;var u=r.callbackNode;if(tc()&&r.callbackNode!==u)return null;var d=ot;return d=Fe(r,r===Nt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(xS(r,d,a),qS(r,Ve()),r.callbackNode!=null&&r.callbackNode===u?IS.bind(null,r):null)}function BS(r,a){if(tc())return null;xS(r,a,!0)}function a4(){y4(function(){(yt&6)!==0?ye(ue,i4):LS()})}function np(){if(Pi===0){var r=so;r===0&&(r=Se,Se<<=1,(Se&261888)===0&&(Se=256)),Pi=r}return Pi}function HS(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:fu(""+r)}function US(r,a){var u=a.ownerDocument.createElement("input");return u.name=a.name,u.value=a.value,r.id&&u.setAttribute("form",r.id),a.parentNode.insertBefore(u,a),r=new FormData(r),u.parentNode.removeChild(u),r}function o4(r,a,u,d,y){if(a==="submit"&&u&&u.stateNode===y){var x=HS((y[hn]||null).action),A=d.submitter;A&&(a=(a=A[hn]||null)?HS(a.formAction):A.getAttribute("formAction"),a!==null&&(x=a,A=null));var P=new mu("action","action",null,d,y);r.push({event:P,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(Pi!==0){var J=A?US(y,A):new FormData(y);_h(u,{pending:!0,data:J,method:y.method,action:x},null,J)}}else typeof x=="function"&&(P.preventDefault(),J=A?US(y,A):new FormData(y),_h(u,{pending:!0,data:J,method:y.method,action:x},x,J))},currentTarget:y}]})}}for(var rp=0;rp<Bd.length;rp++){var ip=Bd[rp],s4=ip.toLowerCase(),l4=ip[0].toUpperCase()+ip.slice(1);pr(s4,"on"+l4)}pr(vw,"onAnimationEnd"),pr(xw,"onAnimationIteration"),pr(bw,"onAnimationStart"),pr("dblclick","onDoubleClick"),pr("focusin","onFocus"),pr("focusout","onBlur"),pr(ED,"onTransitionRun"),pr(CD,"onTransitionStart"),pr(ND,"onTransitionCancel"),pr(ww,"onTransitionEnd"),Ei("onMouseEnter",["mouseout","mouseover"]),Ei("onMouseLeave",["mouseout","mouseover"]),Ei("onPointerEnter",["pointerout","pointerover"]),Ei("onPointerLeave",["pointerout","pointerover"]),Fr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Fr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Fr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Fr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Fr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Fr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ys="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),u4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ys));function PS(r,a){a=(a&4)!==0;for(var u=0;u<r.length;u++){var d=r[u],y=d.event;d=d.listeners;e:{var x=void 0;if(a)for(var A=d.length-1;0<=A;A--){var P=d[A],J=P.instance,ae=P.currentTarget;if(P=P.listener,J!==x&&y.isPropagationStopped())break e;x=P,y.currentTarget=ae;try{x(y)}catch(ce){vu(ce)}y.currentTarget=null,x=J}else for(A=0;A<d.length;A++){if(P=d[A],J=P.instance,ae=P.currentTarget,P=P.listener,J!==x&&y.isPropagationStopped())break e;x=P,y.currentTarget=ae;try{x(y)}catch(ce){vu(ce)}y.currentTarget=null,x=J}}}}function rt(r,a){var u=a[Ya];u===void 0&&(u=a[Ya]=new Set);var d=r+"__bubble";u.has(d)||(VS(a,r,2,!1),u.add(d))}function ap(r,a,u){var d=0;a&&(d|=4),VS(u,r,d,a)}var ic="_reactListening"+Math.random().toString(36).slice(2);function op(r){if(!r[ic]){r[ic]=!0,au.forEach(function(u){u!=="selectionchange"&&(u4.has(u)||ap(u,!1,r),ap(u,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[ic]||(a[ic]=!0,ap("selectionchange",!1,a))}}function VS(r,a,u,d){switch(vE(a)){case 2:var y=q4;break;case 8:y=I4;break;default:y=wp}u=y.bind(null,a,u,r),y=void 0,!Nd||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(y=!0),d?y!==void 0?r.addEventListener(a,u,{capture:!0,passive:y}):r.addEventListener(a,u,!0):y!==void 0?r.addEventListener(a,u,{passive:y}):r.addEventListener(a,u,!1)}function sp(r,a,u,d,y){var x=d;if((a&1)===0&&(a&2)===0&&d!==null)e:for(;;){if(d===null)return;var A=d.tag;if(A===3||A===4){var P=d.stateNode.containerInfo;if(P===y)break;if(A===4)for(A=d.return;A!==null;){var J=A.tag;if((J===3||J===4)&&A.stateNode.containerInfo===y)return;A=A.return}for(;P!==null;){if(A=bi(P),A===null)return;if(J=A.tag,J===5||J===6||J===26||J===27){d=x=A;continue e}P=P.parentNode}}d=d.return}X1(function(){var ae=x,ce=Ed(u),de=[];e:{var oe=_w.get(r);if(oe!==void 0){var le=mu,je=r;switch(r){case"keypress":if(hu(u)===0)break e;case"keydown":case"keyup":le=nD;break;case"focusin":je="focus",le=Rd;break;case"focusout":je="blur",le=Rd;break;case"beforeblur":case"afterblur":le=Rd;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":le=Z1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=Fz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=aD;break;case vw:case xw:case bw:le=Gz;break;case ww:le=sD;break;case"scroll":case"scrollend":le=Pz;break;case"wheel":le=uD;break;case"copy":case"cut":case"paste":le=Kz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=J1;break;case"toggle":case"beforetoggle":le=fD}var Ye=(a&4)!==0,Ct=!Ye&&(r==="scroll"||r==="scrollend"),ne=Ye?oe!==null?oe+"Capture":null:oe;Ye=[];for(var ee=ae,ie;ee!==null;){var fe=ee;if(ie=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||ie===null||ne===null||(fe=ps(ee,ne),fe!=null&&Ye.push(Gs(ee,fe,ie))),Ct)break;ee=ee.return}0<Ye.length&&(oe=new le(oe,je,null,u,ce),de.push({event:oe,listeners:Ye}))}}if((a&7)===0){e:{if(oe=r==="mouseover"||r==="pointerover",le=r==="mouseout"||r==="pointerout",oe&&u!==Sd&&(je=u.relatedTarget||u.fromElement)&&(bi(je)||je[Vr]))break e;if((le||oe)&&(oe=ce.window===ce?ce:(oe=ce.ownerDocument)?oe.defaultView||oe.parentWindow:window,le?(je=u.relatedTarget||u.toElement,le=ae,je=je?bi(je):null,je!==null&&(Ct=s(je),Ye=je.tag,je!==Ct||Ye!==5&&Ye!==27&&Ye!==6)&&(je=null)):(le=null,je=ae),le!==je)){if(Ye=Z1,fe="onMouseLeave",ne="onMouseEnter",ee="mouse",(r==="pointerout"||r==="pointerover")&&(Ye=J1,fe="onPointerLeave",ne="onPointerEnter",ee="pointer"),Ct=le==null?oe:_i(le),ie=je==null?oe:_i(je),oe=new Ye(fe,ee+"leave",le,u,ce),oe.target=Ct,oe.relatedTarget=ie,fe=null,bi(ce)===ae&&(Ye=new Ye(ne,ee+"enter",je,u,ce),Ye.target=ie,Ye.relatedTarget=Ct,fe=Ye),Ct=fe,le&&je)t:{for(Ye=c4,ne=le,ee=je,ie=0,fe=ne;fe;fe=Ye(fe))ie++;fe=0;for(var He=ee;He;He=Ye(He))fe++;for(;0<ie-fe;)ne=Ye(ne),ie--;for(;0<fe-ie;)ee=Ye(ee),fe--;for(;ie--;){if(ne===ee||ee!==null&&ne===ee.alternate){Ye=ne;break t}ne=Ye(ne),ee=Ye(ee)}Ye=null}else Ye=null;le!==null&&FS(de,oe,le,Ye,!1),je!==null&&Ct!==null&&FS(de,Ct,je,Ye,!0)}}e:{if(oe=ae?_i(ae):window,le=oe.nodeName&&oe.nodeName.toLowerCase(),le==="select"||le==="input"&&oe.type==="file")var pt=sw;else if(aw(oe))if(lw)pt=wD;else{pt=xD;var qe=vD}else le=oe.nodeName,!le||le.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?ae&&_d(ae.elementType)&&(pt=sw):pt=bD;if(pt&&(pt=pt(r,ae))){ow(de,pt,u,ce);break e}qe&&qe(r,oe,ae),r==="focusout"&&ae&&oe.type==="number"&&ae.memoizedProps.value!=null&&hs(oe,"number",oe.value)}switch(qe=ae?_i(ae):window,r){case"focusin":(aw(qe)||qe.contentEditable==="true")&&(Ja=qe,Ld=ae,_s=null);break;case"focusout":_s=Ld=Ja=null;break;case"mousedown":qd=!0;break;case"contextmenu":case"mouseup":case"dragend":qd=!1,gw(de,u,ce);break;case"selectionchange":if(SD)break;case"keydown":case"keyup":gw(de,u,ce)}var We;if(jd)e:{switch(r){case"compositionstart":var st="onCompositionStart";break e;case"compositionend":st="onCompositionEnd";break e;case"compositionupdate":st="onCompositionUpdate";break e}st=void 0}else Wa?rw(r,u)&&(st="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(st="onCompositionStart");st&&(ew&&u.locale!=="ko"&&(Wa||st!=="onCompositionStart"?st==="onCompositionEnd"&&Wa&&(We=K1()):(Ni=ce,kd="value"in Ni?Ni.value:Ni.textContent,Wa=!0)),qe=ac(ae,st),0<qe.length&&(st=new W1(st,r,null,u,ce),de.push({event:st,listeners:qe}),We?st.data=We:(We=iw(u),We!==null&&(st.data=We)))),(We=hD?pD(r,u):mD(r,u))&&(st=ac(ae,"onBeforeInput"),0<st.length&&(qe=new W1("onBeforeInput","beforeinput",null,u,ce),de.push({event:qe,listeners:st}),qe.data=We)),o4(de,r,ae,u,ce)}PS(de,a)})}function Gs(r,a,u){return{instance:r,listener:a,currentTarget:u}}function ac(r,a){for(var u=a+"Capture",d=[];r!==null;){var y=r,x=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||x===null||(y=ps(r,u),y!=null&&d.unshift(Gs(r,y,x)),y=ps(r,a),y!=null&&d.push(Gs(r,y,x))),r.tag===3)return d;r=r.return}return[]}function c4(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function FS(r,a,u,d,y){for(var x=a._reactName,A=[];u!==null&&u!==d;){var P=u,J=P.alternate,ae=P.stateNode;if(P=P.tag,J!==null&&J===d)break;P!==5&&P!==26&&P!==27||ae===null||(J=ae,y?(ae=ps(u,x),ae!=null&&A.unshift(Gs(u,ae,J))):y||(ae=ps(u,x),ae!=null&&A.push(Gs(u,ae,J)))),u=u.return}A.length!==0&&r.push({event:a,listeners:A})}var f4=/\r\n?/g,d4=/\u0000|\uFFFD/g;function $S(r){return(typeof r=="string"?r:""+r).replace(f4,`
49
+ `).replace(d4,"")}function YS(r,a){return a=$S(a),$S(r)===a}function Et(r,a,u,d,y,x){switch(u){case"children":typeof d=="string"?a==="body"||a==="textarea"&&d===""||Ka(r,d):(typeof d=="number"||typeof d=="bigint")&&a!=="body"&&Ka(r,""+d);break;case"className":Xa(r,"class",d);break;case"tabIndex":Xa(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Xa(r,u,d);break;case"style":Y1(r,d,x);break;case"data":if(a!=="object"){Xa(r,"data",d);break}case"src":case"href":if(d===""&&(a!=="a"||u!=="href")){r.removeAttribute(u);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(u);break}d=fu(""+d),r.setAttribute(u,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(u==="formAction"?(a!=="input"&&Et(r,a,"name",y.name,y,null),Et(r,a,"formEncType",y.formEncType,y,null),Et(r,a,"formMethod",y.formMethod,y,null),Et(r,a,"formTarget",y.formTarget,y,null)):(Et(r,a,"encType",y.encType,y,null),Et(r,a,"method",y.method,y,null),Et(r,a,"target",y.target,y,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(u);break}d=fu(""+d),r.setAttribute(u,d);break;case"onClick":d!=null&&(r.onclick=Yr);break;case"onScroll":d!=null&&rt("scroll",r);break;case"onScrollEnd":d!=null&&rt("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(i(61));if(u=d.__html,u!=null){if(y.children!=null)throw Error(i(60));r.innerHTML=u}}break;case"multiple":r.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":r.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){r.removeAttribute("xlink:href");break}u=fu(""+d),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(u,""+d):r.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(u,""):r.removeAttribute(u);break;case"capture":case"download":d===!0?r.setAttribute(u,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(u,d):r.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(u,d):r.removeAttribute(u);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(u):r.setAttribute(u,d);break;case"popover":rt("beforetoggle",r),rt("toggle",r),Ga(r,"popover",d);break;case"xlinkActuate":hr(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":hr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":hr(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":hr(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":hr(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":hr(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":hr(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":hr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":hr(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Ga(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=Hz.get(u)||u,Ga(r,u,d))}}function lp(r,a,u,d,y,x){switch(u){case"style":Y1(r,d,x);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(i(61));if(u=d.__html,u!=null){if(y.children!=null)throw Error(i(60));r.innerHTML=u}}break;case"children":typeof d=="string"?Ka(r,d):(typeof d=="number"||typeof d=="bigint")&&Ka(r,""+d);break;case"onScroll":d!=null&&rt("scroll",r);break;case"onScrollEnd":d!=null&&rt("scrollend",r);break;case"onClick":d!=null&&(r.onclick=Yr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ou.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(y=u.endsWith("Capture"),a=u.slice(2,y?u.length-7:void 0),x=r[hn]||null,x=x!=null?x[u]:null,typeof x=="function"&&r.removeEventListener(a,x,y),typeof d=="function")){typeof x!="function"&&x!==null&&(u in r?r[u]=null:r.hasAttribute(u)&&r.removeAttribute(u)),r.addEventListener(a,d,y);break e}u in r?r[u]=d:d===!0?r.setAttribute(u,""):Ga(r,u,d)}}}function cn(r,a,u){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":rt("error",r),rt("load",r);var d=!1,y=!1,x;for(x in u)if(u.hasOwnProperty(x)){var A=u[x];if(A!=null)switch(x){case"src":d=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Et(r,a,x,A,u,null)}}y&&Et(r,a,"srcSet",u.srcSet,u,null),d&&Et(r,a,"src",u.src,u,null);return;case"input":rt("invalid",r);var P=x=A=y=null,J=null,ae=null;for(d in u)if(u.hasOwnProperty(d)){var ce=u[d];if(ce!=null)switch(d){case"name":y=ce;break;case"type":A=ce;break;case"checked":J=ce;break;case"defaultChecked":ae=ce;break;case"value":x=ce;break;case"defaultValue":P=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(i(137,a));break;default:Et(r,a,d,ce,u,null)}}cu(r,x,P,J,ae,A,y,!1);return;case"select":rt("invalid",r),d=A=x=null;for(y in u)if(u.hasOwnProperty(y)&&(P=u[y],P!=null))switch(y){case"value":x=P;break;case"defaultValue":A=P;break;case"multiple":d=P;default:Et(r,a,y,P,u,null)}a=x,u=A,r.multiple=!!d,a!=null?$r(r,!!d,a,!1):u!=null&&$r(r,!!d,u,!0);return;case"textarea":rt("invalid",r),x=y=d=null;for(A in u)if(u.hasOwnProperty(A)&&(P=u[A],P!=null))switch(A){case"value":d=P;break;case"defaultValue":y=P;break;case"children":x=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(i(91));break;default:Et(r,a,A,P,u,null)}F1(r,d,y,x);return;case"option":for(J in u)if(u.hasOwnProperty(J)&&(d=u[J],d!=null))switch(J){case"selected":r.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:Et(r,a,J,d,u,null)}return;case"dialog":rt("beforetoggle",r),rt("toggle",r),rt("cancel",r),rt("close",r);break;case"iframe":case"object":rt("load",r);break;case"video":case"audio":for(d=0;d<Ys.length;d++)rt(Ys[d],r);break;case"image":rt("error",r),rt("load",r);break;case"details":rt("toggle",r);break;case"embed":case"source":case"link":rt("error",r),rt("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in u)if(u.hasOwnProperty(ae)&&(d=u[ae],d!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:Et(r,a,ae,d,u,null)}return;default:if(_d(a)){for(ce in u)u.hasOwnProperty(ce)&&(d=u[ce],d!==void 0&&lp(r,a,ce,d,u,void 0));return}}for(P in u)u.hasOwnProperty(P)&&(d=u[P],d!=null&&Et(r,a,P,d,u,null))}function h4(r,a,u,d){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,x=null,A=null,P=null,J=null,ae=null,ce=null;for(le in u){var de=u[le];if(u.hasOwnProperty(le)&&de!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":J=de;default:d.hasOwnProperty(le)||Et(r,a,le,null,d,de)}}for(var oe in d){var le=d[oe];if(de=u[oe],d.hasOwnProperty(oe)&&(le!=null||de!=null))switch(oe){case"type":x=le;break;case"name":y=le;break;case"checked":ae=le;break;case"defaultChecked":ce=le;break;case"value":A=le;break;case"defaultValue":P=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(i(137,a));break;default:le!==de&&Et(r,a,oe,le,d,de)}}da(r,A,P,J,ae,ce,x,y);return;case"select":le=A=P=oe=null;for(x in u)if(J=u[x],u.hasOwnProperty(x)&&J!=null)switch(x){case"value":break;case"multiple":le=J;default:d.hasOwnProperty(x)||Et(r,a,x,null,d,J)}for(y in d)if(x=d[y],J=u[y],d.hasOwnProperty(y)&&(x!=null||J!=null))switch(y){case"value":oe=x;break;case"defaultValue":P=x;break;case"multiple":A=x;default:x!==J&&Et(r,a,y,x,d,J)}a=P,u=A,d=le,oe!=null?$r(r,!!u,oe,!1):!!d!=!!u&&(a!=null?$r(r,!!u,a,!0):$r(r,!!u,u?[]:"",!1));return;case"textarea":le=oe=null;for(P in u)if(y=u[P],u.hasOwnProperty(P)&&y!=null&&!d.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:Et(r,a,P,null,d,y)}for(A in d)if(y=d[A],x=u[A],d.hasOwnProperty(A)&&(y!=null||x!=null))switch(A){case"value":oe=y;break;case"defaultValue":le=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(i(91));break;default:y!==x&&Et(r,a,A,y,d,x)}V1(r,oe,le);return;case"option":for(var je in u)if(oe=u[je],u.hasOwnProperty(je)&&oe!=null&&!d.hasOwnProperty(je))switch(je){case"selected":r.selected=!1;break;default:Et(r,a,je,null,d,oe)}for(J in d)if(oe=d[J],le=u[J],d.hasOwnProperty(J)&&oe!==le&&(oe!=null||le!=null))switch(J){case"selected":r.selected=oe&&typeof oe!="function"&&typeof oe!="symbol";break;default:Et(r,a,J,oe,d,le)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ye in u)oe=u[Ye],u.hasOwnProperty(Ye)&&oe!=null&&!d.hasOwnProperty(Ye)&&Et(r,a,Ye,null,d,oe);for(ae in d)if(oe=d[ae],le=u[ae],d.hasOwnProperty(ae)&&oe!==le&&(oe!=null||le!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(i(137,a));break;default:Et(r,a,ae,oe,d,le)}return;default:if(_d(a)){for(var Ct in u)oe=u[Ct],u.hasOwnProperty(Ct)&&oe!==void 0&&!d.hasOwnProperty(Ct)&&lp(r,a,Ct,void 0,d,oe);for(ce in d)oe=d[ce],le=u[ce],!d.hasOwnProperty(ce)||oe===le||oe===void 0&&le===void 0||lp(r,a,ce,oe,d,le);return}}for(var ne in u)oe=u[ne],u.hasOwnProperty(ne)&&oe!=null&&!d.hasOwnProperty(ne)&&Et(r,a,ne,null,d,oe);for(de in d)oe=d[de],le=u[de],!d.hasOwnProperty(de)||oe===le||oe==null&&le==null||Et(r,a,de,oe,d,le)}function GS(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function p4(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,u=performance.getEntriesByType("resource"),d=0;d<u.length;d++){var y=u[d],x=y.transferSize,A=y.initiatorType,P=y.duration;if(x&&P&&GS(A)){for(A=0,P=y.responseEnd,d+=1;d<u.length;d++){var J=u[d],ae=J.startTime;if(ae>P)break;var ce=J.transferSize,de=J.initiatorType;ce&&GS(de)&&(J=J.responseEnd,A+=ce*(J<P?1:(P-ae)/(J-ae)))}if(--d,a+=8*(x+A)/(y.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var up=null,cp=null;function oc(r){return r.nodeType===9?r:r.ownerDocument}function XS(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function KS(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function fp(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var dp=null;function m4(){var r=window.event;return r&&r.type==="popstate"?r===dp?!1:(dp=r,!0):(dp=null,!1)}var QS=typeof setTimeout=="function"?setTimeout:void 0,g4=typeof clearTimeout=="function"?clearTimeout:void 0,ZS=typeof Promise=="function"?Promise:void 0,y4=typeof queueMicrotask=="function"?queueMicrotask:typeof ZS<"u"?function(r){return ZS.resolve(null).then(r).catch(v4)}:QS;function v4(r){setTimeout(function(){throw r})}function Vi(r){return r==="head"}function WS(r,a){var u=a,d=0;do{var y=u.nextSibling;if(r.removeChild(u),y&&y.nodeType===8)if(u=y.data,u==="/$"||u==="/&"){if(d===0){r.removeChild(y),ko(a);return}d--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")d++;else if(u==="html")Xs(r.ownerDocument.documentElement);else if(u==="head"){u=r.ownerDocument.head,Xs(u);for(var x=u.firstChild;x;){var A=x.nextSibling,P=x.nodeName;x[ca]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&x.rel.toLowerCase()==="stylesheet"||u.removeChild(x),x=A}}else u==="body"&&Xs(r.ownerDocument.body);u=y}while(u);ko(a)}function JS(r,a){var u=r;r=0;do{var d=u.nextSibling;if(u.nodeType===1?a?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(a?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),d&&d.nodeType===8)if(u=d.data,u==="/$"){if(r===0)break;r--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||r++;u=d}while(u)}function hp(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var u=a;switch(a=a.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":hp(u),fs(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}r.removeChild(u)}}function x4(r,a,u,d){for(;r.nodeType===1;){var y=u;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[ca])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(x=r.getAttribute("rel"),x==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(x!==y.rel||r.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||r.getAttribute("title")!==(y.title==null?null:y.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(x=r.getAttribute("src"),(x!==(y.src==null?null:y.src)||r.getAttribute("type")!==(y.type==null?null:y.type)||r.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&x&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var x=y.name==null?null:""+y.name;if(y.type==="hidden"&&r.getAttribute("name")===x)return r}else return r;if(r=tr(r.nextSibling),r===null)break}return null}function b4(r,a,u){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!u||(r=tr(r.nextSibling),r===null))return null;return r}function eE(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=tr(r.nextSibling),r===null))return null;return r}function pp(r){return r.data==="$?"||r.data==="$~"}function mp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function w4(r,a){var u=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||u.readyState!=="loading")a();else{var d=function(){a(),u.removeEventListener("DOMContentLoaded",d)};u.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function tr(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var gp=null;function tE(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="/$"||u==="/&"){if(a===0)return tr(r.nextSibling);a--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||a++}r=r.nextSibling}return null}function nE(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var u=r.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(a===0)return r;a--}else u!=="/$"&&u!=="/&"||a++}r=r.previousSibling}return null}function rE(r,a,u){switch(a=oc(u),r){case"html":if(r=a.documentElement,!r)throw Error(i(452));return r;case"head":if(r=a.head,!r)throw Error(i(453));return r;case"body":if(r=a.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function Xs(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);fs(r)}var nr=new Map,iE=new Set;function sc(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var li=U.d;U.d={f:_4,r:S4,D:E4,C:C4,L:N4,m:k4,X:A4,S:T4,M:R4};function _4(){var r=li.f(),a=Wu();return r||a}function S4(r){var a=wi(r);a!==null&&a.tag===5&&a.type==="form"?w_(a):li.r(r)}var Eo=typeof document>"u"?null:document;function aE(r,a,u){var d=Eo;if(d&&typeof a=="string"&&a){var y=wn(a);y='link[rel="'+r+'"][href="'+y+'"]',typeof u=="string"&&(y+='[crossorigin="'+u+'"]'),iE.has(y)||(iE.add(y),r={rel:r,crossOrigin:u,href:a},d.querySelector(y)===null&&(a=d.createElement("link"),cn(a,"link",r),$t(a),d.head.appendChild(a)))}}function E4(r){li.D(r),aE("dns-prefetch",r,null)}function C4(r,a){li.C(r,a),aE("preconnect",r,a)}function N4(r,a,u){li.L(r,a,u);var d=Eo;if(d&&r&&a){var y='link[rel="preload"][as="'+wn(a)+'"]';a==="image"&&u&&u.imageSrcSet?(y+='[imagesrcset="'+wn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(y+='[imagesizes="'+wn(u.imageSizes)+'"]')):y+='[href="'+wn(r)+'"]';var x=y;switch(a){case"style":x=Co(r);break;case"script":x=No(r)}nr.has(x)||(r=m({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:r,as:a},u),nr.set(x,r),d.querySelector(y)!==null||a==="style"&&d.querySelector(Ks(x))||a==="script"&&d.querySelector(Qs(x))||(a=d.createElement("link"),cn(a,"link",r),$t(a),d.head.appendChild(a)))}}function k4(r,a){li.m(r,a);var u=Eo;if(u&&r){var d=a&&typeof a.as=="string"?a.as:"script",y='link[rel="modulepreload"][as="'+wn(d)+'"][href="'+wn(r)+'"]',x=y;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=No(r)}if(!nr.has(x)&&(r=m({rel:"modulepreload",href:r},a),nr.set(x,r),u.querySelector(y)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Qs(x)))return}d=u.createElement("link"),cn(d,"link",r),$t(d),u.head.appendChild(d)}}}function T4(r,a,u){li.S(r,a,u);var d=Eo;if(d&&r){var y=Si(d).hoistableStyles,x=Co(r);a=a||"default";var A=y.get(x);if(!A){var P={loading:0,preload:null};if(A=d.querySelector(Ks(x)))P.loading=5;else{r=m({rel:"stylesheet",href:r,"data-precedence":a},u),(u=nr.get(x))&&yp(r,u);var J=A=d.createElement("link");$t(J),cn(J,"link",r),J._p=new Promise(function(ae,ce){J.onload=ae,J.onerror=ce}),J.addEventListener("load",function(){P.loading|=1}),J.addEventListener("error",function(){P.loading|=2}),P.loading|=4,lc(A,a,d)}A={type:"stylesheet",instance:A,count:1,state:P},y.set(x,A)}}}function A4(r,a){li.X(r,a);var u=Eo;if(u&&r){var d=Si(u).hoistableScripts,y=No(r),x=d.get(y);x||(x=u.querySelector(Qs(y)),x||(r=m({src:r,async:!0},a),(a=nr.get(y))&&vp(r,a),x=u.createElement("script"),$t(x),cn(x,"link",r),u.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},d.set(y,x))}}function R4(r,a){li.M(r,a);var u=Eo;if(u&&r){var d=Si(u).hoistableScripts,y=No(r),x=d.get(y);x||(x=u.querySelector(Qs(y)),x||(r=m({src:r,async:!0,type:"module"},a),(a=nr.get(y))&&vp(r,a),x=u.createElement("script"),$t(x),cn(x,"link",r),u.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},d.set(y,x))}}function oE(r,a,u,d){var y=(y=W.current)?sc(y):null;if(!y)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(a=Co(u.href),u=Si(y).hoistableStyles,d=u.get(a),d||(d={type:"style",instance:null,count:0,state:null},u.set(a,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){r=Co(u.href);var x=Si(y).hoistableStyles,A=x.get(r);if(A||(y=y.ownerDocument||y,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(r,A),(x=y.querySelector(Ks(r)))&&!x._p&&(A.instance=x,A.state.loading=5),nr.has(r)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},nr.set(r,u),x||M4(y,r,u,A.state))),a&&d===null)throw Error(i(528,""));return A}if(a&&d!==null)throw Error(i(529,""));return null;case"script":return a=u.async,u=u.src,typeof u=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=No(u),u=Si(y).hoistableScripts,d=u.get(a),d||(d={type:"script",instance:null,count:0,state:null},u.set(a,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function Co(r){return'href="'+wn(r)+'"'}function Ks(r){return'link[rel="stylesheet"]['+r+"]"}function sE(r){return m({},r,{"data-precedence":r.precedence,precedence:null})}function M4(r,a,u,d){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?d.loading=1:(a=r.createElement("link"),d.preload=a,a.addEventListener("load",function(){return d.loading|=1}),a.addEventListener("error",function(){return d.loading|=2}),cn(a,"link",u),$t(a),r.head.appendChild(a))}function No(r){return'[src="'+wn(r)+'"]'}function Qs(r){return"script[async]"+r}function lE(r,a,u){if(a.count++,a.instance===null)switch(a.type){case"style":var d=r.querySelector('style[data-href~="'+wn(u.href)+'"]');if(d)return a.instance=d,$t(d),d;var y=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),$t(d),cn(d,"style",y),lc(d,u.precedence,r),a.instance=d;case"stylesheet":y=Co(u.href);var x=r.querySelector(Ks(y));if(x)return a.state.loading|=4,a.instance=x,$t(x),x;d=sE(u),(y=nr.get(y))&&yp(d,y),x=(r.ownerDocument||r).createElement("link"),$t(x);var A=x;return A._p=new Promise(function(P,J){A.onload=P,A.onerror=J}),cn(x,"link",d),a.state.loading|=4,lc(x,u.precedence,r),a.instance=x;case"script":return x=No(u.src),(y=r.querySelector(Qs(x)))?(a.instance=y,$t(y),y):(d=u,(y=nr.get(x))&&(d=m({},u),vp(d,y)),r=r.ownerDocument||r,y=r.createElement("script"),$t(y),cn(y,"link",d),r.head.appendChild(y),a.instance=y);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(d=a.instance,a.state.loading|=4,lc(d,u.precedence,r));return a.instance}function lc(r,a,u){for(var d=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=d.length?d[d.length-1]:null,x=y,A=0;A<d.length;A++){var P=d[A];if(P.dataset.precedence===a)x=P;else if(x!==y)break}x?x.parentNode.insertBefore(r,x.nextSibling):(a=u.nodeType===9?u.head:u,a.insertBefore(r,a.firstChild))}function yp(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function vp(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var uc=null;function uE(r,a,u){if(uc===null){var d=new Map,y=uc=new Map;y.set(u,d)}else y=uc,d=y.get(u),d||(d=new Map,y.set(u,d));if(d.has(r))return d;for(d.set(r,null),u=u.getElementsByTagName(r),y=0;y<u.length;y++){var x=u[y];if(!(x[ca]||x[Ut]||r==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var A=x.getAttribute(a)||"";A=r+A;var P=d.get(A);P?P.push(x):d.set(A,[x])}}return d}function cE(r,a,u){r=r.ownerDocument||r,r.head.insertBefore(u,a==="title"?r.querySelector("head > title"):null)}function j4(r,a,u){if(u===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return r=a.disabled,typeof a.precedence=="string"&&r==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function fE(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function O4(r,a,u,d){if(u.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var y=Co(d.href),x=a.querySelector(Ks(y));if(x){a=x._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=cc.bind(r),a.then(r,r)),u.state.loading|=4,u.instance=x,$t(x);return}x=a.ownerDocument||a,d=sE(d),(y=nr.get(y))&&yp(d,y),x=x.createElement("link"),$t(x);var A=x;A._p=new Promise(function(P,J){A.onload=P,A.onerror=J}),cn(x,"link",d),u.instance=x}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(u,a),(a=u.state.preload)&&(u.state.loading&3)===0&&(r.count++,u=cc.bind(r),a.addEventListener("load",u),a.addEventListener("error",u))}}var xp=0;function z4(r,a){return r.stylesheets&&r.count===0&&dc(r,r.stylesheets),0<r.count||0<r.imgCount?function(u){var d=setTimeout(function(){if(r.stylesheets&&dc(r,r.stylesheets),r.unsuspend){var x=r.unsuspend;r.unsuspend=null,x()}},6e4+a);0<r.imgBytes&&xp===0&&(xp=62500*p4());var y=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&dc(r,r.stylesheets),r.unsuspend)){var x=r.unsuspend;r.unsuspend=null,x()}},(r.imgBytes>xp?50:800)+a);return r.unsuspend=u,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(y)}}:null}function cc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)dc(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var fc=null;function dc(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,fc=new Map,a.forEach(D4,r),fc=null,cc.call(r))}function D4(r,a){if(!(a.state.loading&4)){var u=fc.get(r);if(u)var d=u.get(null);else{u=new Map,fc.set(r,u);for(var y=r.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<y.length;x++){var A=y[x];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(u.set(A.dataset.precedence,A),d=A)}d&&u.set(null,d)}y=a.instance,A=y.getAttribute("data-precedence"),x=u.get(A)||d,x===d&&u.set(null,y),u.set(A,y),this.count++,d=cc.bind(this),y.addEventListener("load",d),y.addEventListener("error",d),x?x.parentNode.insertBefore(y,x.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(y,r.firstChild)),a.state.loading|=4}}var Zs={$$typeof:C,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function L4(r,a,u,d,y,x,A,P,J){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ht(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.hiddenUpdates=ht(null),this.identifierPrefix=d,this.onUncaughtError=y,this.onCaughtError=x,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.incompleteTransitions=new Map}function dE(r,a,u,d,y,x,A,P,J,ae,ce,de){return r=new L4(r,a,u,A,J,ae,ce,de,P),a=1,x===!0&&(a|=24),x=Dn(3,null,null,a),r.current=x,x.stateNode=r,a=Wd(),a.refCount++,r.pooledCache=a,a.refCount++,x.memoizedState={element:d,isDehydrated:u,cache:a},nh(x),r}function hE(r){return r?(r=no,r):no}function pE(r,a,u,d,y,x){y=hE(y),d.context===null?d.context=y:d.pendingContext=y,d=ji(a),d.payload={element:u},x=x===void 0?null:x,x!==null&&(d.callback=x),u=Oi(r,d,a),u!==null&&(kn(u,r,a),As(u,r,a))}function mE(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var u=r.retryLane;r.retryLane=u!==0&&u<a?u:a}}function bp(r,a){mE(r,a),(r=r.alternate)&&mE(r,a)}function gE(r){if(r.tag===13||r.tag===31){var a=ga(r,67108864);a!==null&&kn(a,r,67108864),bp(r,67108864)}}function yE(r){if(r.tag===13||r.tag===31){var a=Hn();a=Ft(a);var u=ga(r,a);u!==null&&kn(u,r,a),bp(r,a)}}var hc=!0;function q4(r,a,u,d){var y=z.T;z.T=null;var x=U.p;try{U.p=2,wp(r,a,u,d)}finally{U.p=x,z.T=y}}function I4(r,a,u,d){var y=z.T;z.T=null;var x=U.p;try{U.p=8,wp(r,a,u,d)}finally{U.p=x,z.T=y}}function wp(r,a,u,d){if(hc){var y=_p(d);if(y===null)sp(r,a,d,pc,u),xE(r,d);else if(H4(y,r,a,u,d))d.stopPropagation();else if(xE(r,d),a&4&&-1<B4.indexOf(r)){for(;y!==null;){var x=wi(y);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var A=Re(x.pendingLanes);if(A!==0){var P=x;for(P.pendingLanes|=2,P.entangledLanes|=2;A;){var J=1<<31-ft(A);P.entanglements[1]|=J,A&=~J}Mr(x),(yt&6)===0&&(Qu=Ve()+500,$s(0))}}break;case 31:case 13:P=ga(x,2),P!==null&&kn(P,x,2),Wu(),bp(x,2)}if(x=_p(d),x===null&&sp(r,a,d,pc,u),x===y)break;y=x}y!==null&&d.stopPropagation()}else sp(r,a,d,null,u)}}function _p(r){return r=Ed(r),Sp(r)}var pc=null;function Sp(r){if(pc=null,r=bi(r),r!==null){var a=s(r);if(a===null)r=null;else{var u=a.tag;if(u===13){if(r=l(a),r!==null)return r;r=null}else if(u===31){if(r=c(a),r!==null)return r;r=null}else if(u===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return pc=r,null}function vE(r){switch(r){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(jt()){case ue:return 2;case pe:return 8;case Me:case $e:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Ep=!1,Fi=null,$i=null,Yi=null,Ws=new Map,Js=new Map,Gi=[],B4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function xE(r,a){switch(r){case"focusin":case"focusout":Fi=null;break;case"dragenter":case"dragleave":$i=null;break;case"mouseover":case"mouseout":Yi=null;break;case"pointerover":case"pointerout":Ws.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Js.delete(a.pointerId)}}function el(r,a,u,d,y,x){return r===null||r.nativeEvent!==x?(r={blockedOn:a,domEventName:u,eventSystemFlags:d,nativeEvent:x,targetContainers:[y]},a!==null&&(a=wi(a),a!==null&&gE(a)),r):(r.eventSystemFlags|=d,a=r.targetContainers,y!==null&&a.indexOf(y)===-1&&a.push(y),r)}function H4(r,a,u,d,y){switch(a){case"focusin":return Fi=el(Fi,r,a,u,d,y),!0;case"dragenter":return $i=el($i,r,a,u,d,y),!0;case"mouseover":return Yi=el(Yi,r,a,u,d,y),!0;case"pointerover":var x=y.pointerId;return Ws.set(x,el(Ws.get(x)||null,r,a,u,d,y)),!0;case"gotpointercapture":return x=y.pointerId,Js.set(x,el(Js.get(x)||null,r,a,u,d,y)),!0}return!1}function bE(r){var a=bi(r.target);if(a!==null){var u=s(a);if(u!==null){if(a=u.tag,a===13){if(a=l(u),a!==null){r.blockedOn=a,dr(r.priority,function(){yE(u)});return}}else if(a===31){if(a=c(u),a!==null){r.blockedOn=a,dr(r.priority,function(){yE(u)});return}}else if(a===3&&u.stateNode.current.memoizedState.isDehydrated){r.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}r.blockedOn=null}function mc(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var u=_p(r.nativeEvent);if(u===null){u=r.nativeEvent;var d=new u.constructor(u.type,u);Sd=d,u.target.dispatchEvent(d),Sd=null}else return a=wi(u),a!==null&&gE(a),r.blockedOn=u,!1;a.shift()}return!0}function wE(r,a,u){mc(r)&&u.delete(a)}function U4(){Ep=!1,Fi!==null&&mc(Fi)&&(Fi=null),$i!==null&&mc($i)&&($i=null),Yi!==null&&mc(Yi)&&(Yi=null),Ws.forEach(wE),Js.forEach(wE)}function gc(r,a){r.blockedOn===a&&(r.blockedOn=null,Ep||(Ep=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,U4)))}var yc=null;function _E(r){yc!==r&&(yc=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){yc===r&&(yc=null);for(var a=0;a<r.length;a+=3){var u=r[a],d=r[a+1],y=r[a+2];if(typeof d!="function"){if(Sp(d||u)===null)continue;break}var x=wi(u);x!==null&&(r.splice(a,3),a-=3,_h(x,{pending:!0,data:y,method:u.method,action:d},d,y))}}))}function ko(r){function a(J){return gc(J,r)}Fi!==null&&gc(Fi,r),$i!==null&&gc($i,r),Yi!==null&&gc(Yi,r),Ws.forEach(a),Js.forEach(a);for(var u=0;u<Gi.length;u++){var d=Gi[u];d.blockedOn===r&&(d.blockedOn=null)}for(;0<Gi.length&&(u=Gi[0],u.blockedOn===null);)bE(u),u.blockedOn===null&&Gi.shift();if(u=(r.ownerDocument||r).$$reactFormReplay,u!=null)for(d=0;d<u.length;d+=3){var y=u[d],x=u[d+1],A=y[hn]||null;if(typeof x=="function")A||_E(u);else if(A){var P=null;if(x&&x.hasAttribute("formAction")){if(y=x,A=x[hn]||null)P=A.formAction;else if(Sp(y)!==null)continue}else P=A.action;typeof P=="function"?u[d+1]=P:(u.splice(d,3),d-=3),_E(u)}}}function SE(){function r(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(A){return y=A})},focusReset:"manual",scroll:"manual"})}function a(){y!==null&&(y(),y=null),d||setTimeout(u,20)}function u(){if(!d&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,y=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(u,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),y!==null&&(y(),y=null)}}}function Cp(r){this._internalRoot=r}vc.prototype.render=Cp.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var u=a.current,d=Hn();pE(u,d,r,a,null,null)},vc.prototype.unmount=Cp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;pE(r.current,2,null,r,null,null),Wu(),a[Vr]=null}};function vc(r){this._internalRoot=r}vc.prototype.unstable_scheduleHydration=function(r){if(r){var a=xi();r={blockedOn:null,target:r,priority:a};for(var u=0;u<Gi.length&&a!==0&&a<Gi[u].priority;u++);Gi.splice(u,0,r),u===0&&bE(r)}};var EE=t.version;if(EE!=="19.2.4")throw Error(i(527,EE,"19.2.4"));U.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=h(a),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var P4={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var xc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!xc.isDisabled&&xc.supportsFiber)try{xt=xc.inject(P4),ct=xc}catch{}}return nl.createRoot=function(r,a){if(!o(r))throw Error(i(299));var u=!1,d="",y=M_,x=j_,A=O_;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(A=a.onRecoverableError)),a=dE(r,1,!1,null,null,u,d,null,y,x,A,SE),r[Vr]=a.current,op(r),new Cp(a)},nl.hydrateRoot=function(r,a,u){if(!o(r))throw Error(i(299));var d=!1,y="",x=M_,A=j_,P=O_,J=null;return u!=null&&(u.unstable_strictMode===!0&&(d=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onUncaughtError!==void 0&&(x=u.onUncaughtError),u.onCaughtError!==void 0&&(A=u.onCaughtError),u.onRecoverableError!==void 0&&(P=u.onRecoverableError),u.formState!==void 0&&(J=u.formState)),a=dE(r,1,!0,a,u??null,d,y,J,x,A,P,SE),a.context=hE(null),u=a.current,d=Hn(),d=Ft(d),y=ji(d),y.callback=null,Oi(u,y,d),u=d,a.current.lanes=u,dt(a,u),Mr(a),r[Vr]=a.current,op(r),new vc(a)},nl.version="19.2.4",nl}var zE;function eL(){if(zE)return Tp.exports;zE=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Tp.exports=J4(),Tp.exports}var tL=eL();/**
50
+ * react-router v7.13.1
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var DE="popstate";function LE(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function nL(e={}){function t(i,o){var h;let s=(h=o.state)==null?void 0:h.masked,{pathname:l,search:c,hash:f}=s||i.location;return zx("",{pathname:l,search:c,hash:f},o.state&&o.state.usr||null,o.state&&o.state.key||"default",s?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function n(i,o){return typeof o=="string"?o:Tl(o)}return iL(t,n,null,e)}function Dt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ur(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rL(){return Math.random().toString(36).substring(2,10)}function qE(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function zx(e,t,n=null,i,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ko(t):t,state:n,key:t&&t.key||i||rL(),unstable_mask:o}}function Tl({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ko(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function iL(e,t,n,i={}){let{window:o=document.defaultView,v5Compat:s=!1}=i,l=o.history,c="POP",f=null,h=p();h==null&&(h=0,l.replaceState({...l.state,idx:h},""));function p(){return(l.state||{idx:null}).idx}function m(){c="POP";let S=p(),w=S==null?null:S-h;h=S,f&&f({action:c,location:E.location,delta:w})}function g(S,w){c="PUSH";let N=LE(S)?S:zx(E.location,S,w);h=p()+1;let C=qE(N,h),k=E.createHref(N.unstable_mask||N);try{l.pushState(C,"",k)}catch(M){if(M instanceof DOMException&&M.name==="DataCloneError")throw M;o.location.assign(k)}s&&f&&f({action:c,location:E.location,delta:1})}function v(S,w){c="REPLACE";let N=LE(S)?S:zx(E.location,S,w);h=p();let C=qE(N,h),k=E.createHref(N.unstable_mask||N);l.replaceState(C,"",k),s&&f&&f({action:c,location:E.location,delta:0})}function _(S){return aL(S)}let E={get action(){return c},get location(){return e(o,l)},listen(S){if(f)throw new Error("A history only accepts one active listener");return o.addEventListener(DE,m),f=S,()=>{o.removeEventListener(DE,m),f=null}},createHref(S){return t(o,S)},createURL:_,encodeLocation(S){let w=_(S);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:g,replace:v,go(S){return l.go(S)}};return E}function aL(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Dt(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Tl(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function VM(e,t,n="/"){return oL(e,t,n,!1)}function oL(e,t,n,i){let o=typeof t=="string"?Ko(t):t,s=pi(o.pathname||"/",n);if(s==null)return null;let l=FM(e);sL(l);let c=null;for(let f=0;c==null&&f<l.length;++f){let h=vL(s);c=gL(l[f],h,i)}return c}function FM(e,t=[],n=[],i="",o=!1){let s=(l,c,f=o,h)=>{let p={relativePath:h===void 0?l.path||"":h,caseSensitive:l.caseSensitive===!0,childrenIndex:c,route:l};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(i)&&f)return;Dt(p.relativePath.startsWith(i),`Absolute route path "${p.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(i.length)}let m=Dr([i,p.relativePath]),g=n.concat(p);l.children&&l.children.length>0&&(Dt(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),FM(l.children,t,g,m,f)),!(l.path==null&&!l.index)&&t.push({path:m,score:pL(m,l.index),routesMeta:g})};return e.forEach((l,c)=>{var f;if(l.path===""||!((f=l.path)!=null&&f.includes("?")))s(l,c);else for(let h of $M(l.path))s(l,c,!0,h)}),t}function $M(e){let t=e.split("/");if(t.length===0)return[];let[n,...i]=t,o=n.endsWith("?"),s=n.replace(/\?$/,"");if(i.length===0)return o?[s,""]:[s];let l=$M(i.join("/")),c=[];return c.push(...l.map(f=>f===""?s:[s,f].join("/"))),o&&c.push(...l),c.map(f=>e.startsWith("/")&&f===""?"/":f)}function sL(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mL(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var lL=/^:[\w-]+$/,uL=3,cL=2,fL=1,dL=10,hL=-2,IE=e=>e==="*";function pL(e,t){let n=e.split("/"),i=n.length;return n.some(IE)&&(i+=hL),t&&(i+=cL),n.filter(o=>!IE(o)).reduce((o,s)=>o+(lL.test(s)?uL:s===""?fL:dL),i)}function mL(e,t){return e.length===t.length&&e.slice(0,-1).every((i,o)=>i===t[o])?e[e.length-1]-t[t.length-1]:0}function gL(e,t,n=!1){let{routesMeta:i}=e,o={},s="/",l=[];for(let c=0;c<i.length;++c){let f=i[c],h=c===i.length-1,p=s==="/"?t:t.slice(s.length)||"/",m=lf({path:f.relativePath,caseSensitive:f.caseSensitive,end:h},p),g=f.route;if(!m&&h&&n&&!i[i.length-1].route.index&&(m=lf({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},p)),!m)return null;Object.assign(o,m.params),l.push({params:o,pathname:Dr([s,m.pathname]),pathnameBase:_L(Dr([s,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(s=Dr([s,m.pathnameBase]))}return l}function lf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=yL(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let s=o[0],l=s.replace(/(.)\/+$/,"$1"),c=o.slice(1);return{params:i.reduce((h,{paramName:p,isOptional:m},g)=>{if(p==="*"){let _=c[g]||"";l=s.slice(0,s.length-_.length).replace(/(.)\/+$/,"$1")}const v=c[g];return m&&!v?h[p]=void 0:h[p]=(v||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:l,pattern:e}}function yL(e,t=!1,n=!0){ur(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 i=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,c,f,h,p)=>{if(i.push({paramName:c,isOptional:f!=null}),f){let m=p.charAt(h+l.length);return m&&m!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),i]}function vL(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ur(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function pi(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}var xL=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function bL(e,t="/"){let{pathname:n,search:i="",hash:o=""}=typeof e=="string"?Ko(e):e,s;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?s=BE(n.substring(1),"/"):s=BE(n,t)):s=t,{pathname:s,search:SL(i),hash:EL(o)}}function BE(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function jp(e,t,n,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. 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 wL(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function wb(e){let t=wL(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function Tf(e,t,n,i=!1){let o;typeof e=="string"?o=Ko(e):(o={...e},Dt(!o.pathname||!o.pathname.includes("?"),jp("?","pathname","search",o)),Dt(!o.pathname||!o.pathname.includes("#"),jp("#","pathname","hash",o)),Dt(!o.search||!o.search.includes("#"),jp("#","search","hash",o)));let s=e===""||o.pathname==="",l=s?"/":o.pathname,c;if(l==null)c=n;else{let m=t.length-1;if(!i&&l.startsWith("..")){let g=l.split("/");for(;g[0]==="..";)g.shift(),m-=1;o.pathname=g.join("/")}c=m>=0?t[m]:"/"}let f=bL(o,c),h=l&&l!=="/"&&l.endsWith("/"),p=(s||l===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(h||p)&&(f.pathname+="/"),f}var Dr=e=>e.join("/").replace(/\/\/+/g,"/"),_L=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),SL=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,EL=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,CL=class{constructor(e,t,n,i=!1){this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function NL(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function kL(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var YM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function GM(e,t){let n=e;if(typeof n!="string"||!xL.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,o=!1;if(YM)try{let s=new URL(window.location.href),l=n.startsWith("//")?new URL(s.protocol+n):new URL(n),c=pi(l.pathname,t);l.origin===s.origin&&c!=null?n=c+l.search+l.hash:o=!0}catch{ur(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var XM=["POST","PUT","PATCH","DELETE"];new Set(XM);var TL=["GET",...XM];new Set(TL);var Qo=T.createContext(null);Qo.displayName="DataRouter";var Af=T.createContext(null);Af.displayName="DataRouterState";var AL=T.createContext(!1),KM=T.createContext({isTransitioning:!1});KM.displayName="ViewTransition";var RL=T.createContext(new Map);RL.displayName="Fetchers";var ML=T.createContext(null);ML.displayName="Await";var $n=T.createContext(null);$n.displayName="Navigation";var Pl=T.createContext(null);Pl.displayName="Location";var Cr=T.createContext({outlet:null,matches:[],isDataRoute:!1});Cr.displayName="Route";var _b=T.createContext(null);_b.displayName="RouteError";var QM="REACT_ROUTER_ERROR",jL="REDIRECT",OL="ROUTE_ERROR_RESPONSE";function zL(e){if(e.startsWith(`${QM}:${jL}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function DL(e){if(e.startsWith(`${QM}:${OL}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new CL(t.status,t.statusText,t.data)}catch{}}function LL(e,{relative:t}={}){Dt(Zo(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=T.useContext($n),{hash:o,pathname:s,search:l}=Vl(e,{relative:t}),c=s;return n!=="/"&&(c=s==="/"?n:Dr([n,s])),i.createHref({pathname:c,search:l,hash:o})}function Zo(){return T.useContext(Pl)!=null}function Hr(){return Dt(Zo(),"useLocation() may be used only in the context of a <Router> component."),T.useContext(Pl).location}var ZM="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function WM(e){T.useContext($n).static||T.useLayoutEffect(e)}function Rf(){let{isDataRoute:e}=T.useContext(Cr);return e?QL():qL()}function qL(){Dt(Zo(),"useNavigate() may be used only in the context of a <Router> component.");let e=T.useContext(Qo),{basename:t,navigator:n}=T.useContext($n),{matches:i}=T.useContext(Cr),{pathname:o}=Hr(),s=JSON.stringify(wb(i)),l=T.useRef(!1);return WM(()=>{l.current=!0}),T.useCallback((f,h={})=>{if(ur(l.current,ZM),!l.current)return;if(typeof f=="number"){n.go(f);return}let p=Tf(f,JSON.parse(s),o,h.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Dr([t,p.pathname])),(h.replace?n.replace:n.push)(p,h.state,h)},[t,n,s,o,e])}T.createContext(null);function IL(){let{matches:e}=T.useContext(Cr),t=e[e.length-1];return t?t.params:{}}function Vl(e,{relative:t}={}){let{matches:n}=T.useContext(Cr),{pathname:i}=Hr(),o=JSON.stringify(wb(n));return T.useMemo(()=>Tf(e,JSON.parse(o),i,t==="path"),[e,o,i,t])}function BL(e,t){return JM(e,t)}function JM(e,t,n){var S;Dt(Zo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=T.useContext($n),{matches:o}=T.useContext(Cr),s=o[o.length-1],l=s?s.params:{},c=s?s.pathname:"/",f=s?s.pathnameBase:"/",h=s&&s.route;{let w=h&&h.path||"";t3(c,!h||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${w}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
+
60
+ Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let p=Hr(),m;if(t){let w=typeof t=="string"?Ko(t):t;Dt(f==="/"||((S=w.pathname)==null?void 0:S.startsWith(f)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${f}" but pathname "${w.pathname}" was given in the \`location\` prop.`),m=w}else m=p;let g=m.pathname||"/",v=g;if(f!=="/"){let w=f.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(w.length).join("/")}let _=VM(e,{pathname:v});ur(h||_!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),ur(_==null||_[_.length-1].route.element!==void 0||_[_.length-1].route.Component!==void 0||_[_.length-1].route.lazy!==void 0,`Matched leaf route at location "${m.pathname}${m.search}${m.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=FL(_&&_.map(w=>Object.assign({},w,{params:Object.assign({},l,w.params),pathname:Dr([f,i.encodeLocation?i.encodeLocation(w.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?f:Dr([f,i.encodeLocation?i.encodeLocation(w.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:w.pathnameBase])})),o,n);return t&&E?T.createElement(Pl.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...m},navigationType:"POP"}},E):E}function HL(){let e=KL(),t=NL(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:i},s={padding:"2px 4px",backgroundColor:i},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=T.createElement(T.Fragment,null,T.createElement("p",null,"💿 Hey developer 👋"),T.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",T.createElement("code",{style:s},"ErrorBoundary")," or"," ",T.createElement("code",{style:s},"errorElement")," prop on your route.")),T.createElement(T.Fragment,null,T.createElement("h2",null,"Unexpected Application Error!"),T.createElement("h3",{style:{fontStyle:"italic"}},t),n?T.createElement("pre",{style:o},n):null,l)}var UL=T.createElement(HL,null),e3=class extends T.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=DL(e.digest);n&&(e=n)}let t=e!==void 0?T.createElement(Cr.Provider,{value:this.props.routeContext},T.createElement(_b.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?T.createElement(PL,{error:e},t):t}};e3.contextType=AL;var Op=new WeakMap;function PL({children:e,error:t}){let{basename:n}=T.useContext($n);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=zL(t.digest);if(i){let o=Op.get(t);if(o)throw o;let s=GM(i.location,n);if(YM&&!Op.get(t))if(s.isExternal||i.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:i.replace}));throw Op.set(t,l),l}return T.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return e}function VL({routeContext:e,match:t,children:n}){let i=T.useContext(Qo);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),T.createElement(Cr.Provider,{value:e},n)}function FL(e,t=[],n){let i=n==null?void 0:n.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let o=e,s=i==null?void 0:i.errors;if(s!=null){let p=o.findIndex(m=>m.route.id&&(s==null?void 0:s[m.route.id])!==void 0);Dt(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,p+1))}let l=!1,c=-1;if(n&&i){l=i.renderFallback;for(let p=0;p<o.length;p++){let m=o[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(c=p),m.route.id){let{loaderData:g,errors:v}=i,_=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!v||v[m.route.id]===void 0);if(m.route.lazy||_){n.isStatic&&(l=!0),c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}}let f=n==null?void 0:n.onError,h=i&&f?(p,m)=>{var g,v;f(p,{location:i.location,params:((v=(g=i.matches)==null?void 0:g[0])==null?void 0:v.params)??{},unstable_pattern:kL(i.matches),errorInfo:m})}:void 0;return o.reduceRight((p,m,g)=>{let v,_=!1,E=null,S=null;i&&(v=s&&m.route.id?s[m.route.id]:void 0,E=m.route.errorElement||UL,l&&(c<0&&g===0?(t3("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),_=!0,S=null):c===g&&(_=!0,S=m.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,g+1)),N=()=>{let C;return v?C=E:_?C=S:m.route.Component?C=T.createElement(m.route.Component,null):m.route.element?C=m.route.element:C=p,T.createElement(VL,{match:m,routeContext:{outlet:p,matches:w,isDataRoute:i!=null},children:C})};return i&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?T.createElement(e3,{location:i.location,revalidation:i.revalidation,component:E,error:v,children:N(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:h}):N()},null)}function Sb(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function $L(e){let t=T.useContext(Qo);return Dt(t,Sb(e)),t}function YL(e){let t=T.useContext(Af);return Dt(t,Sb(e)),t}function GL(e){let t=T.useContext(Cr);return Dt(t,Sb(e)),t}function Eb(e){let t=GL(e),n=t.matches[t.matches.length-1];return Dt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function XL(){return Eb("useRouteId")}function KL(){var i;let e=T.useContext(_b),t=YL("useRouteError"),n=Eb("useRouteError");return e!==void 0?e:(i=t.errors)==null?void 0:i[n]}function QL(){let{router:e}=$L("useNavigate"),t=Eb("useNavigate"),n=T.useRef(!1);return WM(()=>{n.current=!0}),T.useCallback(async(o,s={})=>{ur(n.current,ZM),n.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...s}))},[e,t])}var HE={};function t3(e,t,n){!t&&!HE[e]&&(HE[e]=!0,ur(!1,n))}T.memo(ZL);function ZL({routes:e,future:t,state:n,isStatic:i,onError:o}){return JM(e,void 0,{state:n,isStatic:i,onError:o})}function WL({to:e,replace:t,state:n,relative:i}){Dt(Zo(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=T.useContext($n);ur(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:s}=T.useContext(Cr),{pathname:l}=Hr(),c=Rf(),f=Tf(e,wb(s),l,i==="path"),h=JSON.stringify(f);return T.useEffect(()=>{c(JSON.parse(h),{replace:t,state:n,relative:i})},[c,h,i,t,n]),null}function Dx(e){Dt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function JL({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:o,static:s=!1,unstable_useTransitions:l}){Dt(!Zo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),f=T.useMemo(()=>({basename:c,navigator:o,static:s,unstable_useTransitions:l,future:{}}),[c,o,s,l]);typeof n=="string"&&(n=Ko(n));let{pathname:h="/",search:p="",hash:m="",state:g=null,key:v="default",unstable_mask:_}=n,E=T.useMemo(()=>{let S=pi(h,c);return S==null?null:{location:{pathname:S,search:p,hash:m,state:g,key:v,unstable_mask:_},navigationType:i}},[c,h,p,m,g,v,i,_]);return ur(E!=null,`<Router basename="${c}"> is not able to match the URL "${h}${p}${m}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:T.createElement($n.Provider,{value:f},T.createElement(Pl.Provider,{children:t,value:E}))}function eq({children:e,location:t}){return BL(Lx(e),t)}function Lx(e,t=[]){let n=[];return T.Children.forEach(e,(i,o)=>{if(!T.isValidElement(i))return;let s=[...t,o];if(i.type===T.Fragment){n.push.apply(n,Lx(i.props.children,s));return}Dt(i.type===Dx,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Dt(!i.props.index||!i.props.children,"An index route cannot have child routes.");let l={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(l.children=Lx(i.props.children,s)),n.push(l)}),n}var $c="get",Yc="application/x-www-form-urlencoded";function Mf(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function tq(e){return Mf(e)&&e.tagName.toLowerCase()==="button"}function nq(e){return Mf(e)&&e.tagName.toLowerCase()==="form"}function rq(e){return Mf(e)&&e.tagName.toLowerCase()==="input"}function iq(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function aq(e,t){return e.button===0&&(!t||t==="_self")&&!iq(e)}function qx(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let i=e[n];return t.concat(Array.isArray(i)?i.map(o=>[n,o]):[[n,i]])},[]))}function oq(e,t){let n=qx(e);return t&&t.forEach((i,o)=>{n.has(o)||t.getAll(o).forEach(s=>{n.append(o,s)})}),n}var _c=null;function sq(){if(_c===null)try{new FormData(document.createElement("form"),0),_c=!1}catch{_c=!0}return _c}var lq=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zp(e){return e!=null&&!lq.has(e)?(ur(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Yc}"`),null):e}function uq(e,t){let n,i,o,s,l;if(nq(e)){let c=e.getAttribute("action");i=c?pi(c,t):null,n=e.getAttribute("method")||$c,o=zp(e.getAttribute("enctype"))||Yc,s=new FormData(e)}else if(tq(e)||rq(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||c.getAttribute("action");if(i=f?pi(f,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||$c,o=zp(e.getAttribute("formenctype"))||zp(c.getAttribute("enctype"))||Yc,s=new FormData(c,e),!sq()){let{name:h,type:p,value:m}=e;if(p==="image"){let g=h?`${h}.`:"";s.append(`${g}x`,"0"),s.append(`${g}y`,"0")}else h&&s.append(h,m)}}else{if(Mf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=$c,i=null,o=Yc,l=e}return s&&o==="text/plain"&&(l=s,s=void 0),{action:i,method:n.toLowerCase(),encType:o,formData:s,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Cb(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cq(e,t,n,i){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${i}`:o.pathname=`${o.pathname}.${i}`:o.pathname==="/"?o.pathname=`_root.${i}`:t&&pi(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${i}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${i}`,o}async function fq(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function dq(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function hq(e,t,n){let i=await Promise.all(e.map(async o=>{let s=t.routes[o.route.id];if(s){let l=await fq(s,n);return l.links?l.links():[]}return[]}));return yq(i.flat(1).filter(dq).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function UE(e,t,n,i,o,s){let l=(f,h)=>n[h]?f.route.id!==n[h].route.id:!0,c=(f,h)=>{var p;return n[h].pathname!==f.pathname||((p=n[h].route.path)==null?void 0:p.endsWith("*"))&&n[h].params["*"]!==f.params["*"]};return s==="assets"?t.filter((f,h)=>l(f,h)||c(f,h)):s==="data"?t.filter((f,h)=>{var m;let p=i.routes[f.route.id];if(!p||!p.hasLoader)return!1;if(l(f,h)||c(f,h))return!0;if(f.route.shouldRevalidate){let g=f.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((m=n[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:f.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function pq(e,t,{includeHydrateFallback:n}={}){return mq(e.map(i=>{let o=t.routes[i.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}function mq(e){return[...new Set(e)]}function gq(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function yq(e,t){let n=new Set;return new Set(t),e.reduce((i,o)=>{let s=JSON.stringify(gq(o));return n.has(s)||(n.add(s),i.push({key:s,link:o})),i},[])}function n3(){let e=T.useContext(Qo);return Cb(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function vq(){let e=T.useContext(Af);return Cb(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Nb=T.createContext(void 0);Nb.displayName="FrameworkContext";function r3(){let e=T.useContext(Nb);return Cb(e,"You must render this element inside a <HydratedRouter> element"),e}function xq(e,t){let n=T.useContext(Nb),[i,o]=T.useState(!1),[s,l]=T.useState(!1),{onFocus:c,onBlur:f,onMouseEnter:h,onMouseLeave:p,onTouchStart:m}=t,g=T.useRef(null);T.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let E=w=>{w.forEach(N=>{l(N.isIntersecting)})},S=new IntersectionObserver(E,{threshold:.5});return g.current&&S.observe(g.current),()=>{S.disconnect()}}},[e]),T.useEffect(()=>{if(i){let E=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(E)}}},[i]);let v=()=>{o(!0)},_=()=>{o(!1),l(!1)};return n?e!=="intent"?[s,g,{}]:[s,g,{onFocus:rl(c,v),onBlur:rl(f,_),onMouseEnter:rl(h,v),onMouseLeave:rl(p,_),onTouchStart:rl(m,v)}]:[!1,g,{}]}function rl(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function bq({page:e,...t}){let{router:n}=n3(),i=T.useMemo(()=>VM(n.routes,e,n.basename),[n.routes,e,n.basename]);return i?T.createElement(_q,{page:e,matches:i,...t}):null}function wq(e){let{manifest:t,routeModules:n}=r3(),[i,o]=T.useState([]);return T.useEffect(()=>{let s=!1;return hq(e,t,n).then(l=>{s||o(l)}),()=>{s=!0}},[e,t,n]),i}function _q({page:e,matches:t,...n}){let i=Hr(),{future:o,manifest:s,routeModules:l}=r3(),{basename:c}=n3(),{loaderData:f,matches:h}=vq(),p=T.useMemo(()=>UE(e,t,h,s,i,"data"),[e,t,h,s,i]),m=T.useMemo(()=>UE(e,t,h,s,i,"assets"),[e,t,h,s,i]),g=T.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let E=new Set,S=!1;if(t.forEach(N=>{var k;let C=s.routes[N.route.id];!C||!C.hasLoader||(!p.some(M=>M.route.id===N.route.id)&&N.route.id in f&&((k=l[N.route.id])!=null&&k.shouldRevalidate)||C.hasClientLoader?S=!0:E.add(N.route.id))}),E.size===0)return[];let w=cq(e,c,o.unstable_trailingSlashAwareDataRequests,"data");return S&&E.size>0&&w.searchParams.set("_routes",t.filter(N=>E.has(N.route.id)).map(N=>N.route.id).join(",")),[w.pathname+w.search]},[c,o.unstable_trailingSlashAwareDataRequests,f,i,s,p,t,e,l]),v=T.useMemo(()=>pq(m,s),[m,s]),_=wq(m);return T.createElement(T.Fragment,null,g.map(E=>T.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...n})),v.map(E=>T.createElement("link",{key:E,rel:"modulepreload",href:E,...n})),_.map(({key:E,link:S})=>T.createElement("link",{key:E,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function Sq(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Eq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Eq&&(window.__reactRouterVersion="7.13.1")}catch{}function Cq({basename:e,children:t,unstable_useTransitions:n,window:i}){let o=T.useRef();o.current==null&&(o.current=nL({window:i,v5Compat:!0}));let s=o.current,[l,c]=T.useState({action:s.action,location:s.location}),f=T.useCallback(h=>{n===!1?c(h):T.startTransition(()=>c(h))},[n]);return T.useLayoutEffect(()=>s.listen(f),[s,f]),T.createElement(JL,{basename:e,children:t,location:l.location,navigationType:l.action,navigator:s,unstable_useTransitions:n})}var i3=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Al=T.forwardRef(function({onClick:t,discover:n="render",prefetch:i="none",relative:o,reloadDocument:s,replace:l,unstable_mask:c,state:f,target:h,to:p,preventScrollReset:m,viewTransition:g,unstable_defaultShouldRevalidate:v,..._},E){let{basename:S,navigator:w,unstable_useTransitions:N}=T.useContext($n),C=typeof p=="string"&&i3.test(p),k=GM(p,S);p=k.to;let M=LL(p,{relative:o}),R=Hr(),O=null;if(c){let B=Tf(c,[],R.unstable_mask?R.unstable_mask.pathname:"/",!0);S!=="/"&&(B.pathname=B.pathname==="/"?S:Dr([S,B.pathname])),O=w.createHref(B)}let[I,V,K]=xq(i,_),H=Aq(p,{replace:l,unstable_mask:c,state:f,target:h,preventScrollReset:m,relative:o,viewTransition:g,unstable_defaultShouldRevalidate:v,unstable_useTransitions:N});function F(B){t&&t(B),B.defaultPrevented||H(B)}let X=!(k.isExternal||s),L=T.createElement("a",{..._,...K,href:(X?O:void 0)||k.absoluteURL||M,onClick:X?F:t,ref:Sq(E,V),target:h,"data-discover":!C&&n==="render"?"true":void 0});return I&&!C?T.createElement(T.Fragment,null,L,T.createElement(bq,{page:M})):L});Al.displayName="Link";var Nq=T.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:i="",end:o=!1,style:s,to:l,viewTransition:c,children:f,...h},p){let m=Vl(l,{relative:h.relative}),g=Hr(),v=T.useContext(Af),{navigator:_,basename:E}=T.useContext($n),S=v!=null&&Dq(m)&&c===!0,w=_.encodeLocation?_.encodeLocation(m).pathname:m.pathname,N=g.pathname,C=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(N=N.toLowerCase(),C=C?C.toLowerCase():null,w=w.toLowerCase()),C&&E&&(C=pi(C,E)||C);const k=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let M=N===w||!o&&N.startsWith(w)&&N.charAt(k)==="/",R=C!=null&&(C===w||!o&&C.startsWith(w)&&C.charAt(w.length)==="/"),O={isActive:M,isPending:R,isTransitioning:S},I=M?t:void 0,V;typeof i=="function"?V=i(O):V=[i,M?"active":null,R?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let K=typeof s=="function"?s(O):s;return T.createElement(Al,{...h,"aria-current":I,className:V,ref:p,style:K,to:l,viewTransition:c},typeof f=="function"?f(O):f)});Nq.displayName="NavLink";var kq=T.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:o,state:s,method:l=$c,action:c,onSubmit:f,relative:h,preventScrollReset:p,viewTransition:m,unstable_defaultShouldRevalidate:g,...v},_)=>{let{unstable_useTransitions:E}=T.useContext($n),S=Oq(),w=zq(c,{relative:h}),N=l.toLowerCase()==="get"?"get":"post",C=typeof c=="string"&&i3.test(c),k=M=>{if(f&&f(M),M.defaultPrevented)return;M.preventDefault();let R=M.nativeEvent.submitter,O=(R==null?void 0:R.getAttribute("formmethod"))||l,I=()=>S(R||M.currentTarget,{fetcherKey:t,method:O,navigate:n,replace:o,state:s,relative:h,preventScrollReset:p,viewTransition:m,unstable_defaultShouldRevalidate:g});E&&n!==!1?T.startTransition(()=>I()):I()};return T.createElement("form",{ref:_,method:N,action:w,onSubmit:i?f:k,...v,"data-discover":!C&&e==="render"?"true":void 0})});kq.displayName="Form";function Tq(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function a3(e){let t=T.useContext(Qo);return Dt(t,Tq(e)),t}function Aq(e,{target:t,replace:n,unstable_mask:i,state:o,preventScrollReset:s,relative:l,viewTransition:c,unstable_defaultShouldRevalidate:f,unstable_useTransitions:h}={}){let p=Rf(),m=Hr(),g=Vl(e,{relative:l});return T.useCallback(v=>{if(aq(v,t)){v.preventDefault();let _=n!==void 0?n:Tl(m)===Tl(g),E=()=>p(e,{replace:_,unstable_mask:i,state:o,preventScrollReset:s,relative:l,viewTransition:c,unstable_defaultShouldRevalidate:f});h?T.startTransition(()=>E()):E()}},[m,p,g,n,i,o,t,e,s,l,c,f,h])}function Rq(e){ur(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=T.useRef(qx(e)),n=T.useRef(!1),i=Hr(),o=T.useMemo(()=>oq(i.search,n.current?null:t.current),[i.search]),s=Rf(),l=T.useCallback((c,f)=>{const h=qx(typeof c=="function"?c(new URLSearchParams(o)):c);n.current=!0,s("?"+h,f)},[s,o]);return[o,l]}var Mq=0,jq=()=>`__${String(++Mq)}__`;function Oq(){let{router:e}=a3("useSubmit"),{basename:t}=T.useContext($n),n=XL(),i=e.fetch,o=e.navigate;return T.useCallback(async(s,l={})=>{let{action:c,method:f,encType:h,formData:p,body:m}=uq(s,t);if(l.navigate===!1){let g=l.fetcherKey||jq();await i(g,n,l.action||c,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:p,body:m,formMethod:l.method||f,formEncType:l.encType||h,flushSync:l.flushSync})}else await o(l.action||c,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:p,body:m,formMethod:l.method||f,formEncType:l.encType||h,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[i,o,t,n])}function zq(e,{relative:t}={}){let{basename:n}=T.useContext($n),i=T.useContext(Cr);Dt(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),s={...Vl(e||".",{relative:t})},l=Hr();if(e==null){s.search=l.search;let c=new URLSearchParams(s.search),f=c.getAll("index");if(f.some(p=>p==="")){c.delete("index"),f.filter(m=>m).forEach(m=>c.append("index",m));let p=c.toString();s.search=p?`?${p}`:""}}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(s.pathname=s.pathname==="/"?n:Dr([n,s.pathname])),Tl(s)}function Dq(e,{relative:t}={}){let n=T.useContext(KM);Dt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=a3("useViewTransitionState"),o=Vl(e,{relative:t});if(!n.isTransitioning)return!1;let s=pi(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=pi(n.nextLocation.pathname,i)||n.nextLocation.pathname;return lf(o.pathname,l)!=null||lf(o.pathname,s)!=null}var kb=PM();/**
61
+ * @license lucide-react v0.468.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const Lq=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),o3=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim();/**
66
+ * @license lucide-react v0.468.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */var qq={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
71
+ * @license lucide-react v0.468.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const Iq=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:o="",children:s,iconNode:l,...c},f)=>T.createElement("svg",{ref:f,...qq,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:o3("lucide",o),...c},[...l.map(([h,p])=>T.createElement(h,p)),...Array.isArray(s)?s:[s]]));/**
76
+ * @license lucide-react v0.468.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const Pe=(e,t)=>{const n=T.forwardRef(({className:i,...o},s)=>T.createElement(Iq,{ref:s,iconNode:t,className:o3(`lucide-${Lq(e)}`,i),...o}));return n.displayName=`${e}`,n};/**
81
+ * @license lucide-react v0.468.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const s3=Pe("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
86
+ * @license lucide-react v0.468.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const Bq=Pe("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
91
+ * @license lucide-react v0.468.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const Hq=Pe("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
96
+ * @license lucide-react v0.468.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const l3=Pe("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/**
101
+ * @license lucide-react v0.468.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const Uq=Pe("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);/**
106
+ * @license lucide-react v0.468.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const Pq=Pe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
111
+ * @license lucide-react v0.468.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const Wo=Pe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
116
+ * @license lucide-react v0.468.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const jf=Pe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
121
+ * @license lucide-react v0.468.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const u3=Pe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
126
+ * @license lucide-react v0.468.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const Gc=Pe("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
131
+ * @license lucide-react v0.468.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const Ix=Pe("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
136
+ * @license lucide-react v0.468.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const c3=Pe("Cog",[["path",{d:"M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z",key:"sobvz5"}],["path",{d:"M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z",key:"11i496"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 22v-2",key:"1osdcq"}],["path",{d:"m17 20.66-1-1.73",key:"eq3orb"}],["path",{d:"M11 10.27 7 3.34",key:"16pf9h"}],["path",{d:"m20.66 17-1.73-1",key:"sg0v6f"}],["path",{d:"m3.34 7 1.73 1",key:"1ulond"}],["path",{d:"M14 12h8",key:"4f43i9"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"m20.66 7-1.73 1",key:"1ow05n"}],["path",{d:"m3.34 17 1.73-1",key:"nuk764"}],["path",{d:"m17 3.34-1 1.73",key:"2wel8s"}],["path",{d:"m11 13.73-4 6.93",key:"794ttg"}]]);/**
141
+ * @license lucide-react v0.468.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const Vq=Pe("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
146
+ * @license lucide-react v0.468.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const Fq=Pe("CornerDownRight",[["polyline",{points:"15 10 20 15 15 20",key:"1q7qjw"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]]);/**
151
+ * @license lucide-react v0.468.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const $q=Pe("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/**
156
+ * @license lucide-react v0.468.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const wl=Pe("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
161
+ * @license lucide-react v0.468.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const f3=Pe("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]]);/**
166
+ * @license lucide-react v0.468.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const Yq=Pe("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
171
+ * @license lucide-react v0.468.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const Gq=Pe("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
176
+ * @license lucide-react v0.468.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const Xq=Pe("FolderTree",[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]]);/**
181
+ * @license lucide-react v0.468.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const Bx=Pe("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
186
+ * @license lucide-react v0.468.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const Kq=Pe("Fullscreen",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["rect",{width:"10",height:"8",x:"7",y:"8",rx:"1",key:"vys8me"}]]);/**
191
+ * @license lucide-react v0.468.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const Qq=Pe("GitFork",[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]]);/**
196
+ * @license lucide-react v0.468.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const Zq=Pe("Hand",[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]);/**
201
+ * @license lucide-react v0.468.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const d3=Pe("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
206
+ * @license lucide-react v0.468.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const h3=Pe("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
211
+ * @license lucide-react v0.468.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const Wq=Pe("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
216
+ * @license lucide-react v0.468.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const Hx=Pe("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
221
+ * @license lucide-react v0.468.0 - ISC
222
+ *
223
+ * This source code is licensed under the ISC license.
224
+ * See the LICENSE file in the root directory of this source tree.
225
+ */const Jq=Pe("List",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]]);/**
226
+ * @license lucide-react v0.468.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */const sr=Pe("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
231
+ * @license lucide-react v0.468.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */const p3=Pe("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
236
+ * @license lucide-react v0.468.0 - ISC
237
+ *
238
+ * This source code is licensed under the ISC license.
239
+ * See the LICENSE file in the root directory of this source tree.
240
+ */const Jo=Pe("MessageCircle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);/**
241
+ * @license lucide-react v0.468.0 - ISC
242
+ *
243
+ * This source code is licensed under the ISC license.
244
+ * See the LICENSE file in the root directory of this source tree.
245
+ */const e6=Pe("Minimize2",[["polyline",{points:"4 14 10 14 10 20",key:"11kfnr"}],["polyline",{points:"20 10 14 10 14 4",key:"rlmsce"}],["line",{x1:"14",x2:"21",y1:"10",y2:"3",key:"o5lafz"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/**
246
+ * @license lucide-react v0.468.0 - ISC
247
+ *
248
+ * This source code is licensed under the ISC license.
249
+ * See the LICENSE file in the root directory of this source tree.
250
+ */const m3=Pe("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
251
+ * @license lucide-react v0.468.0 - ISC
252
+ *
253
+ * This source code is licensed under the ISC license.
254
+ * See the LICENSE file in the root directory of this source tree.
255
+ */const t6=Pe("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
256
+ * @license lucide-react v0.468.0 - ISC
257
+ *
258
+ * This source code is licensed under the ISC license.
259
+ * See the LICENSE file in the root directory of this source tree.
260
+ */const n6=Pe("Move",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m19 9 3 3-3 3",key:"1mg7y2"}],["path",{d:"M2 12h20",key:"9i4pu4"}],["path",{d:"m5 9-3 3 3 3",key:"j64kie"}],["path",{d:"m9 5 3-3 3 3",key:"l8vdw6"}]]);/**
261
+ * @license lucide-react v0.468.0 - ISC
262
+ *
263
+ * This source code is licensed under the ISC license.
264
+ * See the LICENSE file in the root directory of this source tree.
265
+ */const g3=Pe("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
266
+ * @license lucide-react v0.468.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */const Ho=Pe("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
271
+ * @license lucide-react v0.468.0 - ISC
272
+ *
273
+ * This source code is licensed under the ISC license.
274
+ * See the LICENSE file in the root directory of this source tree.
275
+ */const y3=Pe("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
276
+ * @license lucide-react v0.468.0 - ISC
277
+ *
278
+ * This source code is licensed under the ISC license.
279
+ * See the LICENSE file in the root directory of this source tree.
280
+ */const r6=Pe("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
281
+ * @license lucide-react v0.468.0 - ISC
282
+ *
283
+ * This source code is licensed under the ISC license.
284
+ * See the LICENSE file in the root directory of this source tree.
285
+ */const v3=Pe("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
286
+ * @license lucide-react v0.468.0 - ISC
287
+ *
288
+ * This source code is licensed under the ISC license.
289
+ * See the LICENSE file in the root directory of this source tree.
290
+ */const Ux=Pe("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
291
+ * @license lucide-react v0.468.0 - ISC
292
+ *
293
+ * This source code is licensed under the ISC license.
294
+ * See the LICENSE file in the root directory of this source tree.
295
+ */const i6=Pe("Spline",[["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}],["path",{d:"M5 17A12 12 0 0 1 17 5",key:"1okkup"}]]);/**
296
+ * @license lucide-react v0.468.0 - ISC
297
+ *
298
+ * This source code is licensed under the ISC license.
299
+ * See the LICENSE file in the root directory of this source tree.
300
+ */const a6=Pe("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
301
+ * @license lucide-react v0.468.0 - ISC
302
+ *
303
+ * This source code is licensed under the ISC license.
304
+ * See the LICENSE file in the root directory of this source tree.
305
+ */const o6=Pe("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
306
+ * @license lucide-react v0.468.0 - ISC
307
+ *
308
+ * This source code is licensed under the ISC license.
309
+ * See the LICENSE file in the root directory of this source tree.
310
+ */const s6=Pe("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
311
+ * @license lucide-react v0.468.0 - ISC
312
+ *
313
+ * This source code is licensed under the ISC license.
314
+ * See the LICENSE file in the root directory of this source tree.
315
+ */const _r=Pe("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
316
+ * @license lucide-react v0.468.0 - ISC
317
+ *
318
+ * This source code is licensed under the ISC license.
319
+ * See the LICENSE file in the root directory of this source tree.
320
+ */const l6=Pe("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
321
+ * @license lucide-react v0.468.0 - ISC
322
+ *
323
+ * This source code is licensed under the ISC license.
324
+ * See the LICENSE file in the root directory of this source tree.
325
+ */const u6=Pe("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
326
+ * @license lucide-react v0.468.0 - ISC
327
+ *
328
+ * This source code is licensed under the ISC license.
329
+ * See the LICENSE file in the root directory of this source tree.
330
+ */const x3=Pe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
331
+ * @license lucide-react v0.468.0 - ISC
332
+ *
333
+ * This source code is licensed under the ISC license.
334
+ * See the LICENSE file in the root directory of this source tree.
335
+ */const c6=Pe("ZapOff",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
336
+ * @license lucide-react v0.468.0 - ISC
337
+ *
338
+ * This source code is licensed under the ISC license.
339
+ * See the LICENSE file in the root directory of this source tree.
340
+ */const Tb=Pe("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);/**
341
+ * @license lucide-react v0.468.0 - ISC
342
+ *
343
+ * This source code is licensed under the ISC license.
344
+ * See the LICENSE file in the root directory of this source tree.
345
+ */const f6=Pe("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/**
346
+ * @license lucide-react v0.468.0 - ISC
347
+ *
348
+ * This source code is licensed under the ISC license.
349
+ * See the LICENSE file in the root directory of this source tree.
350
+ */const d6=Pe("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function Ab(){return typeof window<"u"}function Rb(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function h6(e){return Ab()?e instanceof Element||e instanceof Rb(e).Element:!1}function p6(e){return Ab()?e instanceof HTMLElement||e instanceof Rb(e).HTMLElement:!1}function m6(e){return!Ab()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Rb(e).ShadowRoot}const PE={};function es(e,t){const n=T.useRef(PE);return n.current===PE&&(n.current=e(t)),n}const Dp=UM[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],g6=Dp&&Dp!==T.useLayoutEffect?Dp:e=>e();function ia(e){const t=es(y6).current;return t.next=e,g6(t.effect),t.trampoline}function y6(){const e={next:void 0,callback:v6,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function v6(){}const x6={...UM},b6=()=>{},lr=typeof document<"u"?T.useLayoutEffect:b6;function Px(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const _l={};function Mb(e,t,n,i,o){let s={...Vx(e,_l)};return t&&(s=Xc(s,t)),n&&(s=Xc(s,n)),i&&(s=Xc(s,i)),s}function w6(e){if(e.length===0)return _l;if(e.length===1)return Vx(e[0],_l);let t={...Vx(e[0],_l)};for(let n=1;n<e.length;n+=1)t=Xc(t,e[n]);return t}function Xc(e,t){return b3(t)?t(e):_6(e,t)}function _6(e,t){if(!t)return e;for(const n in t){const i=t[n];switch(n){case"style":{e[n]=Px(e.style,i);break}case"className":{e[n]=w3(e.className,i);break}default:S6(n,i)?e[n]=E6(e[n],i):e[n]=i}}return e}function S6(e,t){const n=e.charCodeAt(0),i=e.charCodeAt(1),o=e.charCodeAt(2);return n===111&&i===110&&o>=65&&o<=90&&(typeof t=="function"||typeof t>"u")}function b3(e){return typeof e=="function"}function Vx(e,t){return b3(e)?e(t):e??_l}function E6(e,t){return t?e?n=>{if(C6(n)){const o=n;Fx(o);const s=t(o);return o.baseUIHandlerPrevented||e==null||e(o),s}const i=t(n);return e==null||e(n),i}:t:e}function Fx(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function w3(e,t){return t?e?t+" "+e:t:e}function C6(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function N6(e,t){return function(i,...o){const s=new URL(e);return s.searchParams.set("code",i.toString()),o.forEach(l=>s.searchParams.append("args[]",l)),`${t} error #${i}; visit ${s} for the full message.`}}const ts=N6("https://base-ui.com/production-error","Base UI"),k6=T.createContext(void 0);function T6(e=!1){const t=T.useContext(k6);if(t===void 0&&!e)throw new Error(ts(16));return t}function A6(e){const{focusableWhenDisabled:t,disabled:n,composite:i=!1,tabIndex:o=0,isNativeButton:s}=e,l=i&&t!==!1,c=i&&t===!1;return{props:T.useMemo(()=>{const h={onKeyDown(p){n&&t&&p.key!=="Tab"&&p.preventDefault()}};return i||(h.tabIndex=o,!s&&n&&(h.tabIndex=t?o:-1)),(s&&(t||l)||!s&&n)&&(h["aria-disabled"]=n),s&&(!t||c)&&(h.disabled=n),h},[i,n,t,l,c,s,o])}}function R6(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:i=0,native:o=!0,composite:s}=e,l=T.useRef(null),c=T6(!0),f=s??c!==void 0,{props:h}=A6({focusableWhenDisabled:n,disabled:t,composite:f,tabIndex:i,isNativeButton:o}),p=T.useCallback(()=>{const v=l.current;Lp(v)&&f&&t&&h.disabled===void 0&&v.disabled&&(v.disabled=!1)},[t,h.disabled,f]);lr(p,[p]);const m=T.useCallback((v={})=>{const{onClick:_,onMouseDown:E,onKeyUp:S,onKeyDown:w,onPointerDown:N,...C}=v;return Mb({type:o?"button":void 0,onClick(M){if(t){M.preventDefault();return}_==null||_(M)},onMouseDown(M){t||E==null||E(M)},onKeyDown(M){if(t||(Fx(M),w==null||w(M),M.baseUIHandlerPrevented))return;const R=M.target===M.currentTarget,O=M.currentTarget,I=Lp(O),V=!o&&M6(O),K=R&&(o?I:!V),H=M.key==="Enter",F=M.key===" ",X=O.getAttribute("role"),L=(X==null?void 0:X.startsWith("menuitem"))||X==="option"||X==="gridcell";if(R&&f&&F){if(M.defaultPrevented&&L)return;M.preventDefault(),V||o&&I?(O.click(),M.preventBaseUIHandler()):K&&(_==null||_(M),M.preventBaseUIHandler());return}K&&(!o&&(F||H)&&M.preventDefault(),!o&&H&&(_==null||_(M)))},onKeyUp(M){if(!t){if(Fx(M),S==null||S(M),M.target===M.currentTarget&&o&&f&&Lp(M.currentTarget)&&M.key===" "){M.preventDefault();return}M.baseUIHandlerPrevented||M.target===M.currentTarget&&!o&&!f&&M.key===" "&&(_==null||_(M))}},onPointerDown(M){if(t){M.preventDefault();return}N==null||N(M)}},o?void 0:{role:"button"},h,C)},[t,h,f,o]),g=ia(v=>{l.current=v,p()});return{getButtonProps:m,buttonRef:g}}function Lp(e){return p6(e)&&e.tagName==="BUTTON"}function M6(e){return!!((e==null?void 0:e.tagName)==="A"&&(e!=null&&e.href))}function VE(e,t,n,i){const o=es(_3).current;return O6(o,e,t,n,i)&&S3(o,[e,t,n,i]),o.callback}function j6(e){const t=es(_3).current;return z6(t,e)&&S3(t,e),t.callback}function _3(){return{callback:null,cleanup:null,refs:[]}}function O6(e,t,n,i,o){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==i||e.refs[3]!==o}function z6(e,t){return e.refs.length!==t.length||e.refs.some((n,i)=>n!==t[i])}function S3(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const i=Array(t.length).fill(null);for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=s(n);typeof l=="function"&&(i[o]=l);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let o=0;o<t.length;o+=1){const s=t[o];if(s!=null)switch(typeof s){case"function":{const l=i[o];typeof l=="function"?l():s(null);break}case"object":{s.current=null;break}}}}}}}const D6=parseInt(T.version,10);function L6(e){return D6>=e}function FE(e){if(!T.isValidElement(e))return null;const t=e,n=t.props;return(L6(19)?n==null?void 0:n.ref:t.ref)??null}function q6(e,t){const n={};for(const i in e){const o=e[i];if(t!=null&&t.hasOwnProperty(i)){const s=t[i](o);s!=null&&Object.assign(n,s);continue}o===!0?n[`data-${i.toLowerCase()}`]="":o&&(n[`data-${i.toLowerCase()}`]=o.toString())}return n}function I6(e,t){return typeof e=="function"?e(t):e}function B6(e,t){return typeof e=="function"?e(t):e}function ar(){}const fi=Object.freeze({});function Yn(e,t,n={}){const i=t.render,o=H6(t,n);if(n.enabled===!1)return null;const s=n.state??fi;return P6(e,i,o,s)}function H6(e,t={}){const{className:n,style:i,render:o}=e,{state:s=fi,ref:l,props:c,stateAttributesMapping:f,enabled:h=!0}=t,p=h?I6(n,s):void 0,m=h?B6(i,s):void 0,g=h?q6(s,f):fi,v=h?Px(g,Array.isArray(c)?w6(c):c)??fi:fi;return typeof document<"u"&&(h?Array.isArray(l)?v.ref=j6([v.ref,FE(o),...l]):v.ref=VE(v.ref,FE(o),l):VE(null,null)),h?(p!==void 0&&(v.className=w3(v.className,p)),m!==void 0&&(v.style=Px(v.style,m)),v):fi}const U6=Symbol.for("react.lazy");function P6(e,t,n,i){if(t){if(typeof t=="function")return t(n,i);const o=Mb(n,t.props);o.ref=n.ref;let s=t;return(s==null?void 0:s.$$typeof)===U6&&(s=T.Children.toArray(t)[0]),T.cloneElement(s,o)}if(e&&typeof e=="string")return V6(e,n);throw new Error(ts(8))}function V6(e,t){return e==="button"?T.createElement("button",{type:"button",...t,key:t.key}):e==="img"?T.createElement("img",{alt:"",...t,key:t.key}):T.createElement(e,t)}const F6=T.forwardRef(function(t,n){const{render:i,className:o,disabled:s=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,...f}=t,{getButtonProps:h,buttonRef:p}=R6({disabled:s,focusableWhenDisabled:l,native:c});return Yn("button",t,{state:{disabled:s},ref:[n,p],props:[f,h]})});function E3(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=E3(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function C3(){for(var e,t,n=0,i="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=E3(e))&&(i&&(i+=" "),i+=t);return i}const $E=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,YE=C3,jb=(e,t)=>n=>{var i;if((t==null?void 0:t.variants)==null)return YE(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,l=Object.keys(o).map(h=>{const p=n==null?void 0:n[h],m=s==null?void 0:s[h];if(p===null)return null;const g=$E(p)||$E(m);return o[h][g]}),c=n&&Object.entries(n).reduce((h,p)=>{let[m,g]=p;return g===void 0||(h[m]=g),h},{}),f=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((h,p)=>{let{class:m,className:g,...v}=p;return Object.entries(v).every(_=>{let[E,S]=_;return Array.isArray(S)?S.includes({...s,...c}[E]):{...s,...c}[E]===S})?[...h,m,g]:h},[]);return YE(e,l,f,n==null?void 0:n.class,n==null?void 0:n.className)},$6=(e,t)=>{const n=new Array(e.length+t.length);for(let i=0;i<e.length;i++)n[i]=e[i];for(let i=0;i<t.length;i++)n[e.length+i]=t[i];return n},Y6=(e,t)=>({classGroupId:e,validator:t}),N3=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),uf="-",GE=[],G6="arbitrary..",X6=e=>{const t=Q6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return K6(l);const c=l.split(uf),f=c[0]===""&&c.length>1?1:0;return k3(c,f,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const f=i[l],h=n[l];return f?h?$6(h,f):f:h||GE}return n[l]||GE}}},k3=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],s=n.nextPart.get(o);if(s){const h=k3(e,t+1,s);if(h)return h}const l=n.validators;if(l===null)return;const c=t===0?e.join(uf):e.slice(t).join(uf),f=l.length;for(let h=0;h<f;h++){const p=l[h];if(p.validator(c))return p.classGroupId}},K6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),i=t.slice(0,n);return i?G6+i:void 0})(),Q6=e=>{const{theme:t,classGroups:n}=e;return Z6(n,t)},Z6=(e,t)=>{const n=N3();for(const i in e){const o=e[i];Ob(o,n,i,t)}return n},Ob=(e,t,n,i)=>{const o=e.length;for(let s=0;s<o;s++){const l=e[s];W6(l,t,n,i)}},W6=(e,t,n,i)=>{if(typeof e=="string"){J6(e,t,n);return}if(typeof e=="function"){eI(e,t,n,i);return}tI(e,t,n,i)},J6=(e,t,n)=>{const i=e===""?t:T3(t,e);i.classGroupId=n},eI=(e,t,n,i)=>{if(nI(e)){Ob(e(i),t,n,i);return}t.validators===null&&(t.validators=[]),t.validators.push(Y6(n,e))},tI=(e,t,n,i)=>{const o=Object.entries(e),s=o.length;for(let l=0;l<s;l++){const[c,f]=o[l];Ob(f,T3(t,c),n,i)}},T3=(e,t)=>{let n=e;const i=t.split(uf),o=i.length;for(let s=0;s<o;s++){const l=i[s];let c=n.nextPart.get(l);c||(c=N3(),n.nextPart.set(l,c)),n=c}return n},nI=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,rI=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),i=Object.create(null);const o=(s,l)=>{n[s]=l,t++,t>e&&(t=0,i=n,n=Object.create(null))};return{get(s){let l=n[s];if(l!==void 0)return l;if((l=i[s])!==void 0)return o(s,l),l},set(s,l){s in n?n[s]=l:o(s,l)}}},$x="!",XE=":",iI=[],KE=(e,t,n,i,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:i,isExternal:o}),aI=e=>{const{prefix:t,experimentalParseClassName:n}=e;let i=o=>{const s=[];let l=0,c=0,f=0,h;const p=o.length;for(let E=0;E<p;E++){const S=o[E];if(l===0&&c===0){if(S===XE){s.push(o.slice(f,E)),f=E+1;continue}if(S==="/"){h=E;continue}}S==="["?l++:S==="]"?l--:S==="("?c++:S===")"&&c--}const m=s.length===0?o:o.slice(f);let g=m,v=!1;m.endsWith($x)?(g=m.slice(0,-1),v=!0):m.startsWith($x)&&(g=m.slice(1),v=!0);const _=h&&h>f?h-f:void 0;return KE(s,v,g,_)};if(t){const o=t+XE,s=i;i=l=>l.startsWith(o)?s(l.slice(o.length)):KE(iI,!1,l,void 0,!0)}if(n){const o=i;i=s=>n({className:s,parseClassName:o})}return i},oI=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,i)=>{t.set(n,1e6+i)}),n=>{const i=[];let o=[];for(let s=0;s<n.length;s++){const l=n[s],c=l[0]==="[",f=t.has(l);c||f?(o.length>0&&(o.sort(),i.push(...o),o=[]),i.push(l)):o.push(l)}return o.length>0&&(o.sort(),i.push(...o)),i}},sI=e=>({cache:rI(e.cacheSize),parseClassName:aI(e),sortModifiers:oI(e),...X6(e)}),lI=/\s+/,uI=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:o,sortModifiers:s}=t,l=[],c=e.trim().split(lI);let f="";for(let h=c.length-1;h>=0;h-=1){const p=c[h],{isExternal:m,modifiers:g,hasImportantModifier:v,baseClassName:_,maybePostfixModifierPosition:E}=n(p);if(m){f=p+(f.length>0?" "+f:f);continue}let S=!!E,w=i(S?_.substring(0,E):_);if(!w){if(!S){f=p+(f.length>0?" "+f:f);continue}if(w=i(_),!w){f=p+(f.length>0?" "+f:f);continue}S=!1}const N=g.length===0?"":g.length===1?g[0]:s(g).join(":"),C=v?N+$x:N,k=C+w;if(l.indexOf(k)>-1)continue;l.push(k);const M=o(w,S);for(let R=0;R<M.length;++R){const O=M[R];l.push(C+O)}f=p+(f.length>0?" "+f:f)}return f},cI=(...e)=>{let t=0,n,i,o="";for(;t<e.length;)(n=e[t++])&&(i=A3(n))&&(o&&(o+=" "),o+=i);return o},A3=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=A3(e[i]))&&(n&&(n+=" "),n+=t);return n},fI=(e,...t)=>{let n,i,o,s;const l=f=>{const h=t.reduce((p,m)=>m(p),e());return n=sI(h),i=n.cache.get,o=n.cache.set,s=c,c(f)},c=f=>{const h=i(f);if(h)return h;const p=uI(f,n);return o(f,p),p};return s=l,(...f)=>s(cI(...f))},dI=[],an=e=>{const t=n=>n[e]||dI;return t.isThemeGetter=!0,t},R3=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,M3=/^\((?:(\w[\w-]*):)?(.+)\)$/i,hI=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,pI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,mI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,gI=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yI=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vI=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ki=e=>hI.test(e),et=e=>!!e&&!Number.isNaN(Number(e)),Qi=e=>!!e&&Number.isInteger(Number(e)),qp=e=>e.endsWith("%")&&et(e.slice(0,-1)),ui=e=>pI.test(e),j3=()=>!0,xI=e=>mI.test(e)&&!gI.test(e),zb=()=>!1,bI=e=>yI.test(e),wI=e=>vI.test(e),_I=e=>!ze(e)&&!Le(e),SI=e=>sa(e,D3,zb),ze=e=>R3.test(e),Aa=e=>sa(e,L3,xI),QE=e=>sa(e,MI,et),EI=e=>sa(e,I3,j3),CI=e=>sa(e,q3,zb),ZE=e=>sa(e,O3,zb),NI=e=>sa(e,z3,wI),Sc=e=>sa(e,B3,bI),Le=e=>M3.test(e),il=e=>Ba(e,L3),kI=e=>Ba(e,q3),WE=e=>Ba(e,O3),TI=e=>Ba(e,D3),AI=e=>Ba(e,z3),Ec=e=>Ba(e,B3,!0),RI=e=>Ba(e,I3,!0),sa=(e,t,n)=>{const i=R3.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},Ba=(e,t,n=!1)=>{const i=M3.exec(e);return i?i[1]?t(i[1]):n:!1},O3=e=>e==="position"||e==="percentage",z3=e=>e==="image"||e==="url",D3=e=>e==="length"||e==="size"||e==="bg-size",L3=e=>e==="length",MI=e=>e==="number",q3=e=>e==="family-name",I3=e=>e==="number"||e==="weight",B3=e=>e==="shadow",jI=()=>{const e=an("color"),t=an("font"),n=an("text"),i=an("font-weight"),o=an("tracking"),s=an("leading"),l=an("breakpoint"),c=an("container"),f=an("spacing"),h=an("radius"),p=an("shadow"),m=an("inset-shadow"),g=an("text-shadow"),v=an("drop-shadow"),_=an("blur"),E=an("perspective"),S=an("aspect"),w=an("ease"),N=an("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],M=()=>[...k(),Le,ze],R=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],I=()=>[Le,ze,f],V=()=>[Ki,"full","auto",...I()],K=()=>[Qi,"none","subgrid",Le,ze],H=()=>["auto",{span:["full",Qi,Le,ze]},Qi,Le,ze],F=()=>[Qi,"auto",Le,ze],X=()=>["auto","min","max","fr",Le,ze],L=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...I()],U=()=>[Ki,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],G=()=>[Ki,"screen","full","dvw","lvw","svw","min","max","fit",...I()],Q=()=>[Ki,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],j=()=>[e,Le,ze],D=()=>[...k(),WE,ZE,{position:[Le,ze]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",TI,SI,{size:[Le,ze]}],Y=()=>[qp,il,Aa],Z=()=>["","none","full",h,Le,ze],W=()=>["",et,il,Aa],te=()=>["solid","dashed","dotted","double"],re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[et,qp,WE,ZE],me=()=>["","none",_,Le,ze],be=()=>["none",et,Le,ze],ve=()=>["none",et,Le,ze],we=()=>[et,Le,ze],ke=()=>[Ki,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ui],breakpoint:[ui],color:[j3],container:[ui],"drop-shadow":[ui],ease:["in","out","in-out"],font:[_I],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ui],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ui],shadow:[ui],spacing:["px",et],text:[ui],"text-shadow":[ui],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ki,ze,Le,S]}],container:["container"],columns:[{columns:[et,ze,Le,c]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:M()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:V()}],"inset-x":[{"inset-x":V()}],"inset-y":[{"inset-y":V()}],start:[{"inset-s":V(),start:V()}],end:[{"inset-e":V(),end:V()}],"inset-bs":[{"inset-bs":V()}],"inset-be":[{"inset-be":V()}],top:[{top:V()}],right:[{right:V()}],bottom:[{bottom:V()}],left:[{left:V()}],visibility:["visible","invisible","collapse"],z:[{z:[Qi,"auto",Le,ze]}],basis:[{basis:[Ki,"full","auto",c,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[et,Ki,"auto","initial","none",ze]}],grow:[{grow:["",et,Le,ze]}],shrink:[{shrink:["",et,Le,ze]}],order:[{order:[Qi,"first","last","none",Le,ze]}],"grid-cols":[{"grid-cols":K()}],"col-start-end":[{col:H()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":K()}],"row-start-end":[{row:H()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":X()}],"auto-rows":[{"auto-rows":X()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...L(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...L()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":L()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mbs:[{mbs:z()}],mbe:[{mbe:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],"inline-size":[{inline:["auto",...G()]}],"min-inline-size":[{"min-inline":["auto",...G()]}],"max-inline-size":[{"max-inline":["none",...G()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[c,"screen",...U()]}],"min-w":[{"min-w":[c,"screen","none",...U()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",n,il,Aa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,RI,EI]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qp,ze]}],"font-family":[{font:[kI,CI,t]}],"font-features":[{"font-features":[ze]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,Le,ze]}],"line-clamp":[{"line-clamp":[et,"none",Le,QE]}],leading:[{leading:[s,...I()]}],"list-image":[{"list-image":["none",Le,ze]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Le,ze]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:[et,"from-font","auto",Le,Aa]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[et,"auto",Le,ze]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Le,ze]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Le,ze]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Qi,Le,ze],radial:["",Le,ze],conic:[Qi,Le,ze]},AI,NI]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:Y()}],"gradient-via-pos":[{via:Y()}],"gradient-to-pos":[{to:Y()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-bs":[{"border-bs":W()}],"border-w-be":[{"border-be":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...te(),"hidden","none"]}],"divide-style":[{divide:[...te(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-bs":[{"border-bs":j()}],"border-color-be":[{"border-be":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...te(),"none","hidden"]}],"outline-offset":[{"outline-offset":[et,Le,ze]}],"outline-w":[{outline:["",et,il,Aa]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",p,Ec,Sc]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",m,Ec,Sc]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[et,Aa]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",g,Ec,Sc]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[et,Le,ze]}],"mix-blend":[{"mix-blend":[...re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[et]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[Le,ze]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[et]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Le,ze]}],filter:[{filter:["","none",Le,ze]}],blur:[{blur:me()}],brightness:[{brightness:[et,Le,ze]}],contrast:[{contrast:[et,Le,ze]}],"drop-shadow":[{"drop-shadow":["","none",v,Ec,Sc]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",et,Le,ze]}],"hue-rotate":[{"hue-rotate":[et,Le,ze]}],invert:[{invert:["",et,Le,ze]}],saturate:[{saturate:[et,Le,ze]}],sepia:[{sepia:["",et,Le,ze]}],"backdrop-filter":[{"backdrop-filter":["","none",Le,ze]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[et,Le,ze]}],"backdrop-contrast":[{"backdrop-contrast":[et,Le,ze]}],"backdrop-grayscale":[{"backdrop-grayscale":["",et,Le,ze]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[et,Le,ze]}],"backdrop-invert":[{"backdrop-invert":["",et,Le,ze]}],"backdrop-opacity":[{"backdrop-opacity":[et,Le,ze]}],"backdrop-saturate":[{"backdrop-saturate":[et,Le,ze]}],"backdrop-sepia":[{"backdrop-sepia":["",et,Le,ze]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Le,ze]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[et,"initial",Le,ze]}],ease:[{ease:["linear","initial",w,Le,ze]}],delay:[{delay:[et,Le,ze]}],animate:[{animate:["none",N,Le,ze]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,Le,ze]}],"perspective-origin":[{"perspective-origin":M()}],rotate:[{rotate:be()}],"rotate-x":[{"rotate-x":be()}],"rotate-y":[{"rotate-y":be()}],"rotate-z":[{"rotate-z":be()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:we()}],"skew-x":[{"skew-x":we()}],"skew-y":[{"skew-y":we()}],transform:[{transform:[Le,ze,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ke()}],"translate-x":[{"translate-x":ke()}],"translate-y":[{"translate-y":ke()}],"translate-z":[{"translate-z":ke()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Le,ze]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Le,ze]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[et,il,Aa,QE]}],stroke:[{stroke:["none",...j()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},OI=fI(jI);function xn(...e){return OI(C3(e))}const H3=jb("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function An({className:e,variant:t="default",size:n="default",...i}){return b.jsx(F6,{"data-slot":"button",className:xn(H3({variant:t,size:n,className:e})),...i})}function U3({repoName:e,currentBranch:t,onAnalyze:n,isAnalyzing:i,showBack:o,backHref:s="/",isChatOpen:l,onToggleChat:c,isDiffMode:f,onEnterDiffMode:h,onExitDiffMode:p}){const[m,g]=T.useState(!1);T.useEffect(()=>{g(document.documentElement.classList.contains("dark"))},[]);const v=()=>{const _=!m;g(_),document.documentElement.classList.toggle("dark",_),localStorage.setItem("theme",_?"dark":"light")};return b.jsxs("header",{className:"flex h-14 items-center justify-between border-b border-border bg-card px-4",children:[b.jsxs("div",{className:"flex items-center gap-3",children:[o&&b.jsx(Al,{to:s,className:H3({variant:"ghost",size:"icon-sm"}),children:b.jsx(s3,{className:"h-5 w-5"})}),b.jsxs(Al,{to:"/",className:"flex items-center gap-2 text-lg font-bold text-foreground",children:[b.jsx("img",{src:"/logo.svg",alt:"TrueCourse",className:"h-7 w-7"}),"TrueCourse"]})]}),b.jsxs("div",{className:"flex items-center gap-3",children:[e&&b.jsx("span",{className:"text-sm font-medium text-foreground",children:e}),t&&b.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:t}),h&&b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsxs("div",{className:"flex items-center rounded-md border border-border bg-card shadow-sm",children:[b.jsx("button",{className:`px-3 py-1.5 text-xs font-medium rounded-l-md transition-colors ${f?"text-muted-foreground hover:text-foreground":"bg-primary/20 text-primary"}`,onClick:()=>{f&&(p==null||p())},children:"Normal"}),b.jsx("button",{className:`px-3 py-1.5 text-xs font-medium rounded-r-md transition-colors ${f?"bg-amber-500/20 text-amber-500":"text-muted-foreground hover:text-foreground"}`,onClick:()=>{f||h==null||h()},children:"Git Diff"})]}),b.jsxs("div",{className:"group/info relative",children:[b.jsx(d3,{className:"h-3.5 w-3.5 text-muted-foreground/50 hover:text-muted-foreground cursor-help transition-colors"}),b.jsx("div",{className:"pointer-events-none absolute left-1/2 top-full mt-2 -translate-x-1/2 z-[9999] hidden group-hover/info:block",children:b.jsxs("div",{className:"rounded-lg border border-border bg-popover px-4 py-3 shadow-lg w-[280px] text-[11px] leading-relaxed text-popover-foreground",children:[b.jsx("p",{className:"font-semibold mb-1.5",children:"Normal mode"}),b.jsx("p",{className:"text-muted-foreground",children:"Stashes pending changes, analyzes the committed code, then restores your changes. The baseline is always the committed state."}),b.jsx("div",{className:"my-2 border-t border-border"}),b.jsx("p",{className:"font-semibold mb-1.5",children:"Git Diff mode"}),b.jsx("p",{className:"text-muted-foreground",children:"Compares your working tree against the last analysis baseline. Shows which violations your pending changes introduce or resolve."})]})})]})]}),n&&b.jsxs(An,{size:"sm",onClick:n,disabled:i,children:[i&&b.jsx(sr,{className:"h-3.5 w-3.5 animate-spin"}),i?"Analyzing...":"Analyze"]})]}),b.jsxs("div",{className:"flex items-center gap-1",children:[c&&b.jsxs(An,{variant:l?"default":"outline",size:"sm",onClick:c,"aria-label":"Toggle Chat",children:[b.jsx(Jo,{className:"h-4 w-4"}),"Chat"]}),b.jsx(An,{variant:"ghost",size:"icon-sm",onClick:v,"aria-label":"Toggle theme",children:m?b.jsx(a6,{className:"h-5 w-5"}):b.jsx(t6,{className:"h-5 w-5"})})]})]})}let JE=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const zI={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},pl={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},DI={disabled:!1,...pl},LI={valid(e){return e===null?null:e?{[JE.valid]:""}:{[JE.invalid]:""}}},qI=T.createContext({invalid:void 0,name:void 0,validityData:{state:zI,errors:[],error:"",value:"",initialValue:null},setValidityData:ar,disabled:void 0,touched:pl.touched,setTouched:ar,dirty:pl.dirty,setDirty:ar,filled:pl.filled,setFilled:ar,focused:pl.focused,setFocused:ar,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:DI,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=fi)=>e,getInputValidationProps:(e=fi)=>e,inputRef:{current:null},commit:async()=>{}}});function P3(e=!0){const t=T.useContext(qI);if(t.setValidityData===ar&&!e)throw new Error(ts(28));return t}const II=T.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:ar,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function BI(){return T.useContext(II)}let e2=0;function HI(e,t="mui"){const[n,i]=T.useState(e),o=e||n;return T.useEffect(()=>{n==null&&(e2+=1,i(`${t}-${e2}`))},[n,t]),o}const t2=x6.useId;function UI(e,t){if(t2!==void 0){const n=t2();return e??`${t}-${n}`}return HI(e,t)}function Db(e){return UI(e,"base-ui")}const PI=T.createContext({controlId:void 0,registerControlId:ar,labelId:void 0,setLabelId:ar,messageIds:[],setMessageIds:ar,getDescriptionProps:e=>e});function V3(){return T.useContext(PI)}const VI=[];function FI(e){T.useEffect(e,VI)}const al=0;class Lb{constructor(){bc(this,"currentId",al);bc(this,"clear",()=>{this.currentId!==al&&(clearTimeout(this.currentId),this.currentId=al)});bc(this,"disposeEffect",()=>this.clear)}static create(){return new Lb}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=al,n()},t)}isStarted(){return this.currentId!==al}}function cf(){const e=es(Lb.create).current;return FI(e.disposeEffect),e}function $I(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function YI(e){return(e==null?void 0:e.ownerDocument)||document}const Of=typeof navigator<"u",Ip=QI(),GI=WI(),XI=ZI(),KI=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none");Ip.platform==="MacIntel"&&Ip.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(Ip.platform);Of&&GI.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;XI.includes("jsdom/");function QI(){if(!Of)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function ZI(){if(!Of)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function WI(){if(!Of)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function JI(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function e8(e,t){var i;if(!e||!t)return!1;const n=(i=t.getRootNode)==null?void 0:i.call(t);if(e.contains(t))return!0;if(n&&m6(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function t8(e,t){const n=Db(e);return lr(()=>(t(n),()=>{t(void 0)}),[n,t]),n}function n8({controlled:e,default:t,name:n,state:i="value"}){const{current:o}=T.useRef(e!==void 0),[s,l]=T.useState(t),c=o?e:s,f=T.useCallback(h=>{o||l(h)},[]);return[c,f]}function r8(e={}){const{id:t,implicit:n=!1,controlRef:i}=e,{controlId:o,registerControlId:s}=V3(),l=Db(t),c=n?o:void 0,f=es(()=>Symbol("labelable-control")),h=T.useRef(!1),p=T.useRef(t!=null),m=ia(()=>{!h.current||s===ar||(h.current=!1,s(f.current,void 0))});return lr(()=>{if(s===ar)return;let g;if(n){const v=i==null?void 0:i.current;h6(v)&&v.closest("label")!=null?g=t??null:g=c??l}else if(t!=null)p.current=!0,g=t;else if(p.current)g=l;else{m();return}if(g===void 0){m();return}h.current=!0,s(f.current,g)},[t,i,c,s,n,l,f,m]),T.useEffect(()=>m,[m]),o??l}function i8(e){const{enabled:t=!0,value:n,id:i,name:o,controlRef:s,commit:l}=e,{formRef:c}=BI(),{invalid:f,markedDirtyRef:h,validityData:p,setValidityData:m}=P3(),g=ia(e.getValue);lr(()=>{if(!t)return;let v=n;v===void 0&&(v=g()),p.initialValue===null&&v!==null&&m(_=>({..._,initialValue:v}))},[t,m,n,p.initialValue,g]),lr(()=>{!t||!i||c.current.fields.set(i,{getValue:g,name:o,controlRef:s,validityData:$I(p,f),validate(v=!0){let _=n;_===void 0&&(_=g()),h.current=!0,v?kb.flushSync(()=>l(_)):l(_)}})},[l,s,t,c,g,i,f,h,o,p,n]),lr(()=>{const v=c.current.fields;return()=>{i&&v.delete(i)}},[c,i])}const a8="none";function o8(e,t,n,i){let o=!1,s=!1;const l=fi;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){s=!0},get isCanceled(){return o},get isPropagationAllowed(){return s},trigger:n,...l}}const s8=T.forwardRef(function(t,n){const{render:i,className:o,id:s,name:l,value:c,disabled:f=!1,onValueChange:h,defaultValue:p,autoFocus:m=!1,...g}=t,{state:v,name:_,disabled:E,setTouched:S,setDirty:w,validityData:N,setFocused:C,setFilled:k,validationMode:M,validation:R}=P3(),O=E||f,I=_??l,V={...v,disabled:O},{labelId:K}=V3(),H=r8({id:s});lr(()=>{var G;const U=c!=null;(G=R.inputRef.current)!=null&&G.value||U&&c!==""?k(!0):U&&c===""&&k(!1)},[R.inputRef,k,c]);const F=T.useRef(null);lr(()=>{m&&F.current===JI(YI(F.current))&&C(!0)},[m,C]);const[X]=n8({controlled:c,default:p,name:"FieldControl",state:"value"}),L=c!==void 0,B=L?X:void 0;return i8({id:H,name:I,commit:R.commit,value:B,getValue:()=>{var U;return(U=R.inputRef.current)==null?void 0:U.value},controlRef:R.inputRef}),Yn("input",t,{ref:[n,F],state:V,props:[{id:H,disabled:O,name:I,ref:R.inputRef,"aria-labelledby":K,autoFocus:m,...L?{value:B}:{defaultValue:p},onChange(U){const G=U.currentTarget.value;h==null||h(G,o8(a8,U.nativeEvent)),w(G!==N.initialValue),k(G!=="")},onFocus(){C(!0)},onBlur(U){S(!0),C(!1),M==="onBlur"&&R.commit(U.currentTarget.value)},onKeyDown(U){U.currentTarget.tagName==="INPUT"&&U.key==="Enter"&&(S(!0),R.commit(U.currentTarget.value))}},R.getInputValidationProps(),g],stateAttributesMapping:LI})}),l8=T.forwardRef(function(t,n){return b.jsx(s8,{ref:n,...t})});function F3({className:e,type:t,...n}){return b.jsx(l8,{type:t,"data-slot":"input",className:xn("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",e),...n})}function u8({onAdd:e}){const[t,n]=T.useState(""),[i,o]=T.useState(!1),[s,l]=T.useState(null),c=async f=>{if(f.preventDefault(),!!t.trim()){o(!0),l(null);try{await e(t.trim()),n("")}catch(h){l(h instanceof Error?h.message:"Failed to add repository")}finally{o(!1)}}};return b.jsxs("form",{onSubmit:c,className:"w-full",children:[b.jsxs("div",{className:"flex gap-2",children:[b.jsxs("div",{className:"relative flex-1",children:[b.jsx(Gq,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),b.jsx(F3,{type:"text",value:t,onChange:f=>n(f.target.value),placeholder:"Paste repository path...",className:"pl-10"})]}),b.jsxs(An,{type:"submit",disabled:i||!t.trim(),children:[i?b.jsx(sr,{className:"h-4 w-4 animate-spin"}):b.jsx(y3,{className:"h-4 w-4"}),"Add Repository"]})]}),s&&b.jsx("p",{className:"mt-2 text-sm text-destructive",children:s})]})}function c8({repos:e,onDelete:t}){const n=(i,o)=>{i.preventDefault(),i.stopPropagation();const s=o.lastAnalyzed?`Delete "${o.name}"? This will remove all analyses, insights, and chat history.`:`Delete "${o.name}"?`;confirm(s)&&t(o.id)};return e.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center rounded-lg border border-dashed border-border py-16",children:[b.jsx(Bx,{className:"mb-4 h-12 w-12 text-muted-foreground"}),b.jsx("p",{className:"text-lg font-medium text-foreground",children:"No repositories yet"}),b.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Add a repository path above to get started"})]}):b.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:e.map(i=>b.jsxs(Al,{to:`/repos/${i.id}`,className:"group relative flex flex-col rounded-xl border border-border bg-card p-4 ring-1 ring-foreground/10 transition-all hover:shadow-md hover:ring-primary/30",children:[b.jsx("button",{onClick:o=>n(o,i),className:"absolute right-3 top-3 rounded-md p-1 text-muted-foreground/50 opacity-0 transition-all hover:bg-destructive/10 hover:text-destructive group-hover:opacity-100","aria-label":"Delete repository",children:b.jsx(s6,{className:"h-3.5 w-3.5"})}),b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-lg bg-primary/10",children:b.jsx(Bx,{className:"h-5 w-5 text-primary"})}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("h3",{className:"truncate text-sm font-semibold text-foreground",children:i.name}),b.jsx("p",{className:"truncate text-[11px] text-muted-foreground",children:i.path})]})]}),b.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[i.lastAnalyzed?b.jsxs("div",{className:"flex items-center gap-1.5 text-[11px] text-muted-foreground",children:[b.jsx(Ix,{className:"h-3 w-3"}),b.jsxs("span",{children:["Analyzed"," ",new Date(i.lastAnalyzed).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})]})]}):b.jsx("span",{className:"text-[11px] text-muted-foreground/60",children:"Not analyzed yet"}),b.jsx(Bq,{className:"h-3.5 w-3.5 text-muted-foreground/50 transition-transform group-hover:translate-x-0.5 group-hover:text-primary"})]})]},i.id))})}function $3(){if(typeof window>"u")return"";const e=window.location.port;return e&&e!=="3001"?`http://${window.location.hostname}:3001`:""}const Y3=$3();class qb extends Error{constructor(t,n){super(n),this.status=t,this.name="ApiError"}}async function fn(e,t){const n=`${Y3}${e}`,i=await fetch(n,{...t,headers:{"Content-Type":"application/json",...t==null?void 0:t.headers}});if(!i.ok){const o=await i.text().catch(()=>"Unknown error");throw new qb(i.status,o)}if(i.status!==204)return i.json()}function f8(){return fn("/api/repos")}function d8(e){return fn(`/api/repos/${e}`)}function h8(e){return fn("/api/repos",{method:"POST",body:JSON.stringify({path:e})})}function p8(e){return fn(`/api/repos/${e}`,{method:"DELETE"})}function G3(e,t){return fn(`/api/repos/${e}/analyze`,{method:"POST",body:JSON.stringify({branch:t})})}function m8(e,t){const n=new URLSearchParams;t!=null&&t.branch&&n.set("branch",t.branch),t!=null&&t.level&&n.set("level",t.level);const i=n.toString();return fn(`/api/repos/${e}/graph${i?`?${i}`:""}`)}function n2(e,t,n,i){const o=new URLSearchParams;n&&o.set("branch",n),i&&o.set("level",i);const s=o.toString();return fn(`/api/repos/${e}/graph/positions${s?`?${s}`:""}`,{method:"PUT",body:JSON.stringify({positions:t})})}function g8(e,t,n){const i=new URLSearchParams;t&&i.set("branch",t),n&&i.set("level",n);const o=i.toString();return fn(`/api/repos/${e}/graph/positions${o?`?${o}`:""}`,{method:"DELETE"})}function r2(e,t,n,i){const o=new URLSearchParams;n&&o.set("branch",n),i&&o.set("level",i);const s=o.toString();return fn(`/api/repos/${e}/graph/collapsed${s?`?${s}`:""}`,{method:"PUT",body:JSON.stringify({collapsedIds:t})})}function y8(e){return fn(`/api/repos/${e}/files`)}function v8(e){return fn(`/api/repos/${e}/violations`)}function x8(e,t){return fn(`/api/repos/${e}/databases/${t}/schema`)}function b8(){return fn("/api/rules")}function w8(e){return fn(`/api/repos/${e}/diff-check`,{method:"POST"})}function _8(e){return fn(`/api/repos/${e}/diff-check`)}function S8(e){return fn(`/api/repos/${e}/conversations`)}function E8(e,t){return fn(`/api/repos/${e}/chat/${t}`)}function i2(e,t,n,i,o,s){const l=new AbortController,c=`${Y3}/api/repos/${e}/chat`;return fetch(c,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:t,nodeContext:s==null?void 0:s.nodeContext,conversationId:s==null?void 0:s.conversationId}),signal:l.signal}).then(async f=>{var v;if(!f.ok)throw new qb(f.status,await f.text());const h=f.headers.get("X-Conversation-Id")||void 0,p=(v=f.body)==null?void 0:v.getReader();if(!p)throw new Error("No response body");const m=new TextDecoder;let g="";for(;;){const{done:_,value:E}=await p.read();if(_)break;g+=m.decode(E,{stream:!0});const S=g.split(`
351
+ `);g=S.pop()||"";for(const w of S)if(w.startsWith("data: ")){const N=w.slice(6);if(N==="[DONE]"){i(h);return}try{const C=JSON.parse(N);C.content&&n(C.content)}catch{n(N)}}}i(h)}).catch(f=>{f.name!=="AbortError"&&o(f)}),l}function C8(){const[e,t]=T.useState([]),[n,i]=T.useState(!0),[o,s]=T.useState(null),l=T.useCallback(async()=>{i(!0),s(null);try{const p=await f8();t(p)}catch(p){s(p instanceof Error?p.message:"Failed to fetch repos")}finally{i(!1)}},[]);T.useEffect(()=>{l()},[l]);const c=T.useCallback(async p=>{try{const m=await h8(p);return t(g=>[...g,m]),m}catch(m){const g=m instanceof Error?m.message:"Failed to add repo";throw s(g),m}},[]),f=T.useCallback(async p=>{try{await p8(p),t(m=>m.filter(g=>g.id!==p))}catch(m){const g=m instanceof Error?m.message:"Failed to delete repo";throw s(g),m}},[]),h=T.useCallback(async(p,m)=>{try{return await G3(p,m)}catch(g){const v=g instanceof Error?g.message:"Failed to start analysis";throw s(v),g}},[]);return{repos:e,isLoading:n,error:o,addRepo:c,deleteRepo:f,analyzeRepo:h,refetch:l}}const N8=jb("group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"}},defaultVariants:{variant:"default"}});function Kc({className:e,variant:t,...n}){return b.jsx("div",{"data-slot":"alert",role:"alert",className:xn(N8({variant:t}),e),...n})}function a2({className:e,...t}){return b.jsx("div",{"data-slot":"alert-title",className:xn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",e),...t})}function Qc({className:e,...t}){return b.jsx("div",{"data-slot":"alert-description",className:xn("text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",e),...t})}function k8(){const{repos:e,isLoading:t,error:n,addRepo:i,deleteRepo:o}=C8(),s=async l=>{try{await o(l)}catch{}};return b.jsxs("div",{className:"flex min-h-screen flex-col",children:[b.jsx(U3,{}),b.jsxs("main",{className:"mx-auto w-full max-w-5xl flex-1 px-4 py-8",children:[b.jsxs("div",{className:"mb-8 text-center",children:[b.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"TrueCourse"}),b.jsx("p",{className:"mt-2 text-muted-foreground",children:"Visualize and understand your codebase architecture"})]}),b.jsxs("div",{className:"mb-8 space-y-5",children:[b.jsxs("div",{className:"flex flex-col items-center gap-2.5 rounded-lg border border-border bg-card p-6",children:[b.jsx("p",{className:"text-sm text-muted-foreground",children:"Run this from your project directory:"}),b.jsx("code",{className:"rounded-md bg-muted px-4 py-2.5 font-mono text-sm text-foreground select-all",children:"npx truecourse add"})]}),b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"h-px flex-1 bg-border"}),b.jsx("span",{className:"text-xs text-muted-foreground",children:"or add manually"}),b.jsx("div",{className:"h-px flex-1 bg-border"})]}),b.jsx(u8,{onAdd:i})]}),n&&b.jsx(Kc,{variant:"destructive",className:"mb-6",children:b.jsx(Qc,{children:n})}),t?b.jsx("div",{className:"flex items-center justify-center py-16",children:b.jsx(sr,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):b.jsx(c8,{repos:e,onDelete:s})]})]})}const X3=T.createContext(void 0);function zf(){const e=T.useContext(X3);if(e===void 0)throw new Error(ts(53));return e}let ff=(function(e){return e.scrollAreaCornerHeight="--scroll-area-corner-height",e.scrollAreaCornerWidth="--scroll-area-corner-width",e})({});const Cc=500,o2=16;function or(e,t,n){if(!e)return 0;const i=getComputedStyle(e),o=n==="x"?"Inline":"Block";return n==="x"&&t==="margin"?parseFloat(i[`${t}InlineStart`])*2:parseFloat(i[`${t}${o}Start`])+parseFloat(i[`${t}${o}End`])}let T8=(function(e){return e.orientation="data-orientation",e.hovering="data-hovering",e.scrolling="data-scrolling",e.hasOverflowX="data-has-overflow-x",e.hasOverflowY="data-has-overflow-y",e.overflowXStart="data-overflow-x-start",e.overflowXEnd="data-overflow-x-end",e.overflowYStart="data-overflow-y-start",e.overflowYEnd="data-overflow-y-end",e})({});const Nc="base-ui-disable-scrollbar",K3={className:Nc,getElement(e){return b.jsx("style",{nonce:e,href:Nc,precedence:"base-ui:low",children:`.${Nc}{scrollbar-width:none}.${Nc}::-webkit-scrollbar{display:none}`})}};let To=(function(e){return e.scrolling="data-scrolling",e.hasOverflowX="data-has-overflow-x",e.hasOverflowY="data-has-overflow-y",e.overflowXStart="data-overflow-x-start",e.overflowXEnd="data-overflow-x-end",e.overflowYStart="data-overflow-y-start",e.overflowYEnd="data-overflow-y-end",e})({});const Ib={hasOverflowX:e=>e?{[To.hasOverflowX]:""}:null,hasOverflowY:e=>e?{[To.hasOverflowY]:""}:null,overflowXStart:e=>e?{[To.overflowXStart]:""}:null,overflowXEnd:e=>e?{[To.overflowXEnd]:""}:null,overflowYStart:e=>e?{[To.overflowYStart]:""}:null,overflowYEnd:e=>e?{[To.overflowYEnd]:""}:null,cornerHidden:()=>null},A8=T.createContext(void 0),R8={disableStyleElements:!1};function M8(){return T.useContext(A8)??R8}const j8={x:0,y:0},s2={width:0,height:0},O8={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},z8={x:!0,y:!0,corner:!0},D8=T.forwardRef(function(t,n){const{render:i,className:o,overflowEdgeThreshold:s,...l}=t,c=L8(s),f=Db(),h=cf(),p=cf(),{nonce:m,disableStyleElements:g}=M8(),[v,_]=T.useState(!1),[E,S]=T.useState(!1),[w,N]=T.useState(!1),[C,k]=T.useState(!1),[M,R]=T.useState(!1),[O,I]=T.useState(s2),[V,K]=T.useState(s2),[H,F]=T.useState(O8),[X,L]=T.useState(z8),B=T.useRef(null),z=T.useRef(null),U=T.useRef(null),G=T.useRef(null),Q=T.useRef(null),j=T.useRef(null),D=T.useRef(null),$=T.useRef(!1),q=T.useRef(0),Y=T.useRef(0),Z=T.useRef(0),W=T.useRef(0),te=T.useRef("vertical"),re=T.useRef(j8),se=ia(he=>{const ye=he.x-re.current.x,Ue=he.y-re.current.y;re.current=he,Ue!==0&&(N(!0),h.start(Cc,()=>{N(!1)})),ye!==0&&(S(!0),p.start(Cc,()=>{S(!1)}))}),me=ia(he=>{he.button===0&&($.current=!0,q.current=he.clientY,Y.current=he.clientX,te.current=he.currentTarget.getAttribute(T8.orientation),z.current&&(Z.current=z.current.scrollTop,W.current=z.current.scrollLeft),Q.current&&te.current==="vertical"&&Q.current.setPointerCapture(he.pointerId),j.current&&te.current==="horizontal"&&j.current.setPointerCapture(he.pointerId))}),be=ia(he=>{if(!$.current)return;const ye=he.clientY-q.current,Ue=he.clientX-Y.current;if(z.current){const _e=z.current.scrollHeight,Ie=z.current.clientHeight,Ve=z.current.scrollWidth,jt=z.current.clientWidth;if(Q.current&&U.current&&te.current==="vertical"){const ue=or(U.current,"padding","y"),pe=or(Q.current,"margin","y"),Me=Q.current.offsetHeight,$e=U.current.offsetHeight-Me-ue-pe,Ge=ye/$e;z.current.scrollTop=Z.current+Ge*(_e-Ie),he.preventDefault(),N(!0),h.start(Cc,()=>{N(!1)})}if(j.current&&G.current&&te.current==="horizontal"){const ue=or(G.current,"padding","x"),pe=or(j.current,"margin","x"),Me=j.current.offsetWidth,$e=G.current.offsetWidth-Me-ue-pe,Ge=Ue/$e;z.current.scrollLeft=W.current+Ge*(Ve-jt),he.preventDefault(),S(!0),p.start(Cc,()=>{S(!1)})}}}),ve=ia(he=>{$.current=!1,Q.current&&te.current==="vertical"&&Q.current.releasePointerCapture(he.pointerId),j.current&&te.current==="horizontal"&&j.current.releasePointerCapture(he.pointerId)});function we(he){k(he.pointerType==="touch")}function ke(he){if(we(he),he.pointerType!=="touch"){const ye=e8(B.current,he.target);_(ye)}}const Ne=T.useMemo(()=>({scrolling:E||w,hasOverflowX:!X.x,hasOverflowY:!X.y,overflowXStart:H.xStart,overflowXEnd:H.xEnd,overflowYStart:H.yStart,overflowYEnd:H.yEnd,cornerHidden:X.corner}),[E,w,X.x,X.y,X.corner,H]),Oe={role:"presentation",onPointerEnter:ke,onPointerMove:ke,onPointerDown:we,onPointerLeave(){_(!1)},style:{position:"relative",[ff.scrollAreaCornerHeight]:`${O.height}px`,[ff.scrollAreaCornerWidth]:`${O.width}px`}},Te=Yn("div",t,{state:Ne,ref:[n,B],props:[Oe,l],stateAttributesMapping:Ib}),_t=T.useMemo(()=>({handlePointerDown:me,handlePointerMove:be,handlePointerUp:ve,handleScroll:se,cornerSize:O,setCornerSize:I,thumbSize:V,setThumbSize:K,hasMeasuredScrollbar:M,setHasMeasuredScrollbar:R,touchModality:C,cornerRef:D,scrollingX:E,setScrollingX:S,scrollingY:w,setScrollingY:N,hovering:v,setHovering:_,viewportRef:z,rootRef:B,scrollbarYRef:U,scrollbarXRef:G,thumbYRef:Q,thumbXRef:j,rootId:f,hiddenState:X,setHiddenState:L,overflowEdges:H,setOverflowEdges:F,viewportState:Ne,overflowEdgeThreshold:c}),[me,be,ve,se,O,V,M,C,E,S,w,N,v,_,f,X,H,Ne,c]);return b.jsxs(X3.Provider,{value:_t,children:[!g&&K3.getElement(m),Te]})});function L8(e){if(typeof e=="number"){const t=Math.max(0,e);return{xStart:t,xEnd:t,yStart:t,yEnd:t}}return{xStart:Math.max(0,(e==null?void 0:e.xStart)||0),xEnd:Math.max(0,(e==null?void 0:e.xEnd)||0),yStart:Math.max(0,(e==null?void 0:e.yStart)||0),yEnd:Math.max(0,(e==null?void 0:e.yEnd)||0)}}const q8=T.createContext(void 0),I8=T.createContext(void 0);function Q3(){const e=T.useContext(I8);return(e==null?void 0:e.direction)??"ltr"}function jo(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function B8(e,t){if(typeof IntersectionObserver>"u")return()=>{};const n=new IntersectionObserver(i=>{i.forEach(o=>{o.intersectionRatio>0&&(t(),n.disconnect())})});return n.observe(e),()=>{n.disconnect()}}let aa=(function(e){return e.scrollAreaOverflowXStart="--scroll-area-overflow-x-start",e.scrollAreaOverflowXEnd="--scroll-area-overflow-x-end",e.scrollAreaOverflowYStart="--scroll-area-overflow-y-start",e.scrollAreaOverflowYEnd="--scroll-area-overflow-y-end",e})({});const l2=1;function u2(e,t){if(t<=0)return 0;const n=jo(e,0,t),i=n,o=t-n,s=i<=l2,l=o<=l2;return s&&l?i<=o?0:t:s?0:l?t:n}let c2=!1;const f2=typeof ResizeObserver<"u";function H8(){c2||KI||(typeof CSS<"u"&&"registerProperty"in CSS&&[aa.scrollAreaOverflowXStart,aa.scrollAreaOverflowXEnd,aa.scrollAreaOverflowYStart,aa.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),c2=!0)}const U8=T.forwardRef(function(t,n){const{render:i,className:o,...s}=t,{viewportRef:l,scrollbarYRef:c,scrollbarXRef:f,thumbYRef:h,thumbXRef:p,cornerRef:m,cornerSize:g,setCornerSize:v,setThumbSize:_,rootId:E,setHiddenState:S,hiddenState:w,setHasMeasuredScrollbar:N,handleScroll:C,setHovering:k,setOverflowEdges:M,overflowEdges:R,overflowEdgeThreshold:O,scrollingX:I,scrollingY:V}=zf(),K=Q3(),H=T.useRef(!0),F=T.useRef([NaN,NaN,NaN,NaN]),X=cf(),L=cf(),B=ia(()=>{const D=l.current,$=c.current,q=f.current,Y=h.current,Z=p.current,W=m.current;if(!D)return;const te=D.scrollHeight,re=D.scrollWidth,se=D.clientHeight,me=D.clientWidth,be=D.scrollTop,ve=D.scrollLeft,we=F.current,ke=Number.isNaN(we[0]);if(we[0]=se,we[1]=te,we[2]=me,we[3]=re,ke&&N(!0),te===0||re===0)return;const Ne=P8(D),Oe=Ne.y,Te=Ne.x,_t=me/re,he=se/te,ye=Math.max(0,re-me),Ue=Math.max(0,te-se);let _e=0,Ie=0;if(!Te){let ge=0;K==="rtl"?ge=jo(-ve,0,ye):ge=jo(ve,0,ye),_e=u2(ge,ye),Ie=ye-_e}const Ve=Oe?0:jo(be,0,Ue),jt=Oe?0:u2(Ve,Ue),ue=Oe?0:Ue-jt,pe=Te?0:me,Me=Oe?0:se;let $e=0,Ge=0;!Te&&!Oe&&($e=($==null?void 0:$.offsetWidth)||0,Ge=(q==null?void 0:q.offsetHeight)||0);const Ot=g.width===0&&g.height===0,en=Ot?$e:0,xt=Ot?Ge:0,ct=or(q,"padding","x"),Ht=or($,"padding","y"),ft=or(Z,"margin","x"),dn=or(Y,"margin","y"),tn=pe-ct-ft,Ce=Me-Ht-dn,Se=q?Math.min(q.offsetWidth-en,tn):tn,Be=$?Math.min($.offsetHeight-xt,Ce):Ce,tt=Math.max(o2,Se*_t),Re=Math.max(o2,Be*he);if(_(ge=>ge.height===Re&&ge.width===tt?ge:{width:tt,height:Re}),$&&Y){const ge=$.offsetHeight-Re-Ht-dn,De=te-se,ht=De===0?0:be/De,dt=Math.min(ge,Math.max(0,ht*ge));Y.style.transform=`translate3d(0,${dt}px,0)`}if(q&&Z){const ge=q.offsetWidth-tt-ct-ft,De=re-me,ht=De===0?0:ve/De,dt=K==="rtl"?jo(ht*ge,-ge,0):jo(ht*ge,0,ge);Z.style.transform=`translate3d(${dt}px,0,0)`}const Fe=[[aa.scrollAreaOverflowXStart,_e],[aa.scrollAreaOverflowXEnd,Ie],[aa.scrollAreaOverflowYStart,jt],[aa.scrollAreaOverflowYEnd,ue]];for(const[ge,De]of Fe)D.style.setProperty(ge,`${De}px`);W&&(Te||Oe?v({width:0,height:0}):!Te&&!Oe&&v({width:$e,height:Ge})),S(ge=>V8(ge,Ne));const Ke={xStart:!Te&&_e>O.xStart,xEnd:!Te&&Ie>O.xEnd,yStart:!Oe&&jt>O.yStart,yEnd:!Oe&&ue>O.yEnd};M(ge=>ge.xStart===Ke.xStart&&ge.xEnd===Ke.xEnd&&ge.yStart===Ke.yStart&&ge.yEnd===Ke.yEnd?ge:Ke)});lr(()=>{if(l.current&&(H8(),!f2))return B8(l.current,()=>{B()})},[B,l]),lr(()=>{queueMicrotask(B)},[B,w,K]),lr(()=>{var D;(D=l.current)!=null&&D.matches(":hover")&&k(!0)},[l,k]),T.useEffect(()=>{const D=l.current;if(!f2||!D)return;let $=!1;const q=new ResizeObserver(()=>{if(!$){$=!0;const Y=F.current;if(Y[0]===D.clientHeight&&Y[1]===D.scrollHeight&&Y[2]===D.clientWidth&&Y[3]===D.scrollWidth)return}B()});return q.observe(D),L.start(0,()=>{const Y=D.getAnimations({subtree:!0});Y.length!==0&&Promise.allSettled(Y.map(Z=>Z.finished)).then(B).catch(()=>{})}),()=>{q.disconnect(),L.clear()}},[B,l,L]);function z(){H.current=!1}const U={role:"presentation",...E&&{"data-id":`${E}-viewport`},tabIndex:w.x&&w.y?-1:0,className:K3.className,style:{overflow:"scroll"},onScroll(){l.current&&(B(),H.current||C({x:l.current.scrollLeft,y:l.current.scrollTop}),X.start(100,()=>{H.current=!0}))},onWheel:z,onTouchMove:z,onPointerMove:z,onPointerEnter:z,onKeyDown:z},G=T.useMemo(()=>({scrolling:I||V,hasOverflowX:!w.x,hasOverflowY:!w.y,overflowXStart:R.xStart,overflowXEnd:R.xEnd,overflowYStart:R.yStart,overflowYEnd:R.yEnd,cornerHidden:w.corner}),[I,V,w.x,w.y,w.corner,R]),Q=Yn("div",t,{ref:[n,l],state:G,props:[U,s],stateAttributesMapping:Ib}),j=T.useMemo(()=>({computeThumbPosition:B}),[B]);return b.jsx(q8.Provider,{value:j,children:Q})});function P8(e){const t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function V8(e,t){return e.y===t.y&&e.x===t.x&&e.corner===t.corner?e:t}const Z3=T.createContext(void 0);function F8(){const e=T.useContext(Z3);if(e===void 0)throw new Error(ts(54));return e}let df=(function(e){return e.scrollAreaThumbHeight="--scroll-area-thumb-height",e.scrollAreaThumbWidth="--scroll-area-thumb-width",e})({});const $8=T.forwardRef(function(t,n){const{render:i,className:o,orientation:s="vertical",keepMounted:l=!1,...c}=t,{hovering:f,scrollingX:h,scrollingY:p,hiddenState:m,overflowEdges:g,scrollbarYRef:v,scrollbarXRef:_,viewportRef:E,thumbYRef:S,thumbXRef:w,handlePointerDown:N,handlePointerUp:C,rootId:k,thumbSize:M,hasMeasuredScrollbar:R}=zf(),O={hovering:f,scrolling:{horizontal:h,vertical:p}[s],orientation:s,hasOverflowX:!m.x,hasOverflowY:!m.y,overflowXStart:g.xStart,overflowXEnd:g.xEnd,overflowYStart:g.yStart,overflowYEnd:g.yEnd,cornerHidden:m.corner},I=Q3(),V=!R&&!l;T.useEffect(()=>{const B=E.current,z=s==="vertical"?v.current:_.current;if(!z)return;function U(G){if(!(!B||!z||G.ctrlKey)){if(G.preventDefault(),s==="vertical"){if(B.scrollTop===0&&G.deltaY<0)return}else if(B.scrollLeft===0&&G.deltaX<0)return;if(s==="vertical"){if(B.scrollTop===B.scrollHeight-B.clientHeight&&G.deltaY>0)return}else if(B.scrollLeft===B.scrollWidth-B.clientWidth&&G.deltaX>0)return;s==="vertical"?B.scrollTop+=G.deltaY:B.scrollLeft+=G.deltaX}}return z.addEventListener("wheel",U,{passive:!1}),()=>{z.removeEventListener("wheel",U)}},[s,_,v,E]);const K={...k&&{"data-id":`${k}-scrollbar`},onPointerDown(B){if(B.button===0&&B.currentTarget===B.target&&E.current){if(S.current&&v.current&&s==="vertical"){const z=or(S.current,"margin","y"),U=or(v.current,"padding","y"),G=S.current.offsetHeight,Q=v.current.getBoundingClientRect(),j=B.clientY-Q.top-G/2-U+z/2,D=E.current.scrollHeight,$=E.current.clientHeight,q=v.current.offsetHeight-G-U-z,Z=j/q*(D-$);E.current.scrollTop=Z}if(w.current&&_.current&&s==="horizontal"){const z=or(w.current,"margin","x"),U=or(_.current,"padding","x"),G=w.current.offsetWidth,Q=_.current.getBoundingClientRect(),j=B.clientX-Q.left-G/2-U+z/2,D=E.current.scrollWidth,$=E.current.clientWidth,q=_.current.offsetWidth-G-U-z,Y=j/q;let Z;I==="rtl"?(Z=(1-Y)*(D-$),E.current.scrollLeft<=0&&(Z=-Z)):Z=Y*(D-$),E.current.scrollLeft=Z}N(B)}},onPointerUp:C,style:{position:"absolute",touchAction:"none",WebkitUserSelect:"none",userSelect:"none",visibility:V?"hidden":void 0,...s==="vertical"&&{top:0,bottom:`var(${ff.scrollAreaCornerHeight})`,insetInlineEnd:0,[df.scrollAreaThumbHeight]:`${M.height}px`},...s==="horizontal"&&{insetInlineStart:0,insetInlineEnd:`var(${ff.scrollAreaCornerWidth})`,bottom:0,[df.scrollAreaThumbWidth]:`${M.width}px`}}},H=Yn("div",t,{ref:[n,s==="vertical"?v:_],state:O,props:[K,c],stateAttributesMapping:Ib}),F=T.useMemo(()=>({orientation:s}),[s]),X=s==="vertical"?m.y:m.x;return l||!X?b.jsx(Z3.Provider,{value:F,children:H}):null}),Y8=T.forwardRef(function(t,n){const{render:i,className:o,...s}=t,{thumbYRef:l,thumbXRef:c,handlePointerDown:f,handlePointerMove:h,handlePointerUp:p,setScrollingX:m,setScrollingY:g,hasMeasuredScrollbar:v}=zf(),{orientation:_}=F8();return Yn("div",t,{ref:[n,_==="vertical"?l:c],state:{orientation:_},props:[{onPointerDown:f,onPointerMove:h,onPointerUp(w){_==="vertical"&&g(!1),_==="horizontal"&&m(!1),p(w)},style:{visibility:v?void 0:"hidden",..._==="vertical"&&{height:`var(${df.scrollAreaThumbHeight})`},..._==="horizontal"&&{width:`var(${df.scrollAreaThumbWidth})`}}},s]})}),G8=T.forwardRef(function(t,n){const{render:i,className:o,...s}=t,{cornerRef:l,cornerSize:c,hiddenState:f}=zf(),h=Yn("div",t,{ref:[n,l],props:[{style:{position:"absolute",bottom:0,insetInlineEnd:0,width:c.width,height:c.height}},s]});return f.corner?null:h});function X8({className:e,children:t,...n}){return b.jsxs(D8,{"data-slot":"scroll-area",className:xn("relative",e),...n,children:[b.jsx(U8,{"data-slot":"scroll-area-viewport",className:"size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",children:t}),b.jsx(K8,{}),b.jsx(G8,{})]})}function K8({className:e,orientation:t="vertical",...n}){return b.jsx($8,{"data-slot":"scroll-area-scrollbar","data-orientation":t,orientation:t,className:xn("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",e),...n,children:b.jsx(Y8,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function Q8({children:e,isOpen:t,defaultWidth:n=387,minWidth:i=260,maxWidth:o=780}){const[s,l]=T.useState(n),c=T.useRef(!1),f=T.useCallback(h=>{h.preventDefault(),c.current=!0;const p=h.clientX,m=s,g=_=>{if(!c.current)return;const E=p-_.clientX,S=Math.min(o,Math.max(i,m+E));l(S)},v=()=>{c.current=!1,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",v)};document.addEventListener("mousemove",g),document.addEventListener("mouseup",v)},[s,i,o]);return t?b.jsxs("aside",{className:"relative flex-shrink-0 border-l border-border bg-card",style:{width:s},children:[b.jsx("div",{className:"absolute inset-y-0 left-0 z-10 w-1 cursor-col-resize hover:bg-primary/30 active:bg-primary/50",onMouseDown:f}),b.jsx(X8,{className:"h-full",children:e})]}):null}const Z8=[{id:"violations",icon:_r,label:"Violations"},{id:"rules",icon:Ux,label:"Rules"},{id:"files",icon:Xq,label:"Files"}];function W8({activeTab:e,onTabChange:t,children:n,defaultWidth:i=350,minWidth:o=260}){const[s,l]=T.useState(i),[c,f]=T.useState(800),h=T.useRef(!1);T.useEffect(()=>{const g=()=>Math.floor(window.innerWidth*.8);f(g());const v=()=>f(g());return window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]);const p=T.useCallback(g=>{g.preventDefault(),h.current=!0;const v=g.clientX,_=s,E=w=>{if(!h.current)return;const N=w.clientX-v;l(Math.min(c,Math.max(o,_+N)))},S=()=>{h.current=!1,document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",S)};document.addEventListener("mousemove",E),document.addEventListener("mouseup",S)},[s,o,c]),m=e!==null;return b.jsxs("div",{className:"flex flex-shrink-0 h-full",children:[b.jsx("div",{className:"flex w-12 flex-col items-center gap-1 border-r border-border bg-card pt-2",children:Z8.map(g=>{const v=g.icon,_=e===g.id;return b.jsxs("button",{onClick:()=>t(_?null:g.id),className:`group relative flex h-10 w-10 items-center justify-center rounded-md transition-colors ${_?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,"aria-label":g.label,children:[_&&b.jsx("div",{className:"absolute left-0 top-1.5 bottom-1.5 w-0.5 rounded-r bg-primary"}),b.jsx(v,{className:"h-5 w-5"})]},g.id)})}),m&&b.jsxs("aside",{className:"relative flex-shrink-0 border-r border-border bg-card",style:{width:s},children:[b.jsx("div",{className:"flex h-10 items-center border-b border-border px-3",children:b.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground",children:e==="violations"?"Violations":e==="rules"?"Rules":"Files"})}),b.jsx("div",{className:"h-[calc(100%-40px)] overflow-hidden",children:n}),b.jsx("div",{className:"absolute inset-y-0 right-0 z-10 w-1 cursor-col-resize hover:bg-primary/30 active:bg-primary/50",onMouseDown:p})]})]})}function Wt(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,i;n<e.length;n++)(i=Wt(e[n]))!==""&&(t+=(t&&" ")+i);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var J8={value:()=>{}};function Df(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Zc(n)}function Zc(e){this._=e}function eB(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",o=n.indexOf(".");if(o>=0&&(i=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Zc.prototype=Df.prototype={constructor:Zc,on:function(e,t){var n=this._,i=eB(e+"",n),o,s=-1,l=i.length;if(arguments.length<2){for(;++s<l;)if((o=(e=i[s]).type)&&(o=tB(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++s<l;)if(o=(e=i[s]).type)n[o]=d2(n[o],e.name,t);else if(t==null)for(o in n)n[o]=d2(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Zc(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),i=0,o,s;i<o;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(s=this._[e],i=0,o=s.length;i<o;++i)s[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],o=0,s=i.length;o<s;++o)i[o].value.apply(t,n)}};function tB(e,t){for(var n=0,i=e.length,o;n<i;++n)if((o=e[n]).name===t)return o.value}function d2(e,t,n){for(var i=0,o=e.length;i<o;++i)if(e[i].name===t){e[i]=J8,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}var Yx="http://www.w3.org/1999/xhtml";const h2={svg:"http://www.w3.org/2000/svg",xhtml:Yx,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Lf(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),h2.hasOwnProperty(t)?{space:h2[t],local:e}:e}function nB(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Yx&&t.documentElement.namespaceURI===Yx?t.createElement(e):t.createElementNS(n,e)}}function rB(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function W3(e){var t=Lf(e);return(t.local?rB:nB)(t)}function iB(){}function Bb(e){return e==null?iB:function(){return this.querySelector(e)}}function aB(e){typeof e!="function"&&(e=Bb(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var s=t[o],l=s.length,c=i[o]=new Array(l),f,h,p=0;p<l;++p)(f=s[p])&&(h=e.call(f,f.__data__,p,s))&&("__data__"in f&&(h.__data__=f.__data__),c[p]=h);return new Fn(i,this._parents)}function oB(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function sB(){return[]}function J3(e){return e==null?sB:function(){return this.querySelectorAll(e)}}function lB(e){return function(){return oB(e.apply(this,arguments))}}function uB(e){typeof e=="function"?e=lB(e):e=J3(e);for(var t=this._groups,n=t.length,i=[],o=[],s=0;s<n;++s)for(var l=t[s],c=l.length,f,h=0;h<c;++h)(f=l[h])&&(i.push(e.call(f,f.__data__,h,l)),o.push(f));return new Fn(i,o)}function ej(e){return function(){return this.matches(e)}}function tj(e){return function(t){return t.matches(e)}}var cB=Array.prototype.find;function fB(e){return function(){return cB.call(this.children,e)}}function dB(){return this.firstElementChild}function hB(e){return this.select(e==null?dB:fB(typeof e=="function"?e:tj(e)))}var pB=Array.prototype.filter;function mB(){return Array.from(this.children)}function gB(e){return function(){return pB.call(this.children,e)}}function yB(e){return this.selectAll(e==null?mB:gB(typeof e=="function"?e:tj(e)))}function vB(e){typeof e!="function"&&(e=ej(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var s=t[o],l=s.length,c=i[o]=[],f,h=0;h<l;++h)(f=s[h])&&e.call(f,f.__data__,h,s)&&c.push(f);return new Fn(i,this._parents)}function nj(e){return new Array(e.length)}function xB(){return new Fn(this._enter||this._groups.map(nj),this._parents)}function hf(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}hf.prototype={constructor:hf,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 bB(e){return function(){return e}}function wB(e,t,n,i,o,s){for(var l=0,c,f=t.length,h=s.length;l<h;++l)(c=t[l])?(c.__data__=s[l],i[l]=c):n[l]=new hf(e,s[l]);for(;l<f;++l)(c=t[l])&&(o[l]=c)}function _B(e,t,n,i,o,s,l){var c,f,h=new Map,p=t.length,m=s.length,g=new Array(p),v;for(c=0;c<p;++c)(f=t[c])&&(g[c]=v=l.call(f,f.__data__,c,t)+"",h.has(v)?o[c]=f:h.set(v,f));for(c=0;c<m;++c)v=l.call(e,s[c],c,s)+"",(f=h.get(v))?(i[c]=f,f.__data__=s[c],h.delete(v)):n[c]=new hf(e,s[c]);for(c=0;c<p;++c)(f=t[c])&&h.get(g[c])===f&&(o[c]=f)}function SB(e){return e.__data__}function EB(e,t){if(!arguments.length)return Array.from(this,SB);var n=t?_B:wB,i=this._parents,o=this._groups;typeof e!="function"&&(e=bB(e));for(var s=o.length,l=new Array(s),c=new Array(s),f=new Array(s),h=0;h<s;++h){var p=i[h],m=o[h],g=m.length,v=CB(e.call(p,p&&p.__data__,h,i)),_=v.length,E=c[h]=new Array(_),S=l[h]=new Array(_),w=f[h]=new Array(g);n(p,m,E,S,w,v,t);for(var N=0,C=0,k,M;N<_;++N)if(k=E[N]){for(N>=C&&(C=N+1);!(M=S[C])&&++C<_;);k._next=M||null}}return l=new Fn(l,i),l._enter=c,l._exit=f,l}function CB(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function NB(){return new Fn(this._exit||this._groups.map(nj),this._parents)}function kB(e,t,n){var i=this.enter(),o=this,s=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?s.remove():n(s),i&&o?i.merge(o).order():o}function TB(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,o=n.length,s=i.length,l=Math.min(o,s),c=new Array(o),f=0;f<l;++f)for(var h=n[f],p=i[f],m=h.length,g=c[f]=new Array(m),v,_=0;_<m;++_)(v=h[_]||p[_])&&(g[_]=v);for(;f<o;++f)c[f]=n[f];return new Fn(c,this._parents)}function AB(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],o=i.length-1,s=i[o],l;--o>=0;)(l=i[o])&&(s&&l.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(l,s),s=l);return this}function RB(e){e||(e=MB);function t(m,g){return m&&g?e(m.__data__,g.__data__):!m-!g}for(var n=this._groups,i=n.length,o=new Array(i),s=0;s<i;++s){for(var l=n[s],c=l.length,f=o[s]=new Array(c),h,p=0;p<c;++p)(h=l[p])&&(f[p]=h);f.sort(t)}return new Fn(o,this._parents).order()}function MB(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function jB(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function OB(){return Array.from(this)}function zB(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,s=i.length;o<s;++o){var l=i[o];if(l)return l}return null}function DB(){let e=0;for(const t of this)++e;return e}function LB(){return!this.node()}function qB(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var o=t[n],s=0,l=o.length,c;s<l;++s)(c=o[s])&&e.call(c,c.__data__,s,o);return this}function IB(e){return function(){this.removeAttribute(e)}}function BB(e){return function(){this.removeAttributeNS(e.space,e.local)}}function HB(e,t){return function(){this.setAttribute(e,t)}}function UB(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function PB(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function VB(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 FB(e,t){var n=Lf(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?BB:IB:typeof t=="function"?n.local?VB:PB:n.local?UB:HB)(n,t))}function rj(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function $B(e){return function(){this.style.removeProperty(e)}}function YB(e,t,n){return function(){this.style.setProperty(e,t,n)}}function GB(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function XB(e,t,n){return arguments.length>1?this.each((t==null?$B:typeof t=="function"?GB:YB)(e,t,n??"")):Uo(this.node(),e)}function Uo(e,t){return e.style.getPropertyValue(t)||rj(e).getComputedStyle(e,null).getPropertyValue(t)}function KB(e){return function(){delete this[e]}}function QB(e,t){return function(){this[e]=t}}function ZB(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function WB(e,t){return arguments.length>1?this.each((t==null?KB:typeof t=="function"?ZB:QB)(e,t)):this.node()[e]}function ij(e){return e.trim().split(/^|\s+/)}function Hb(e){return e.classList||new aj(e)}function aj(e){this._node=e,this._names=ij(e.getAttribute("class")||"")}aj.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 oj(e,t){for(var n=Hb(e),i=-1,o=t.length;++i<o;)n.add(t[i])}function sj(e,t){for(var n=Hb(e),i=-1,o=t.length;++i<o;)n.remove(t[i])}function JB(e){return function(){oj(this,e)}}function eH(e){return function(){sj(this,e)}}function tH(e,t){return function(){(t.apply(this,arguments)?oj:sj)(this,e)}}function nH(e,t){var n=ij(e+"");if(arguments.length<2){for(var i=Hb(this.node()),o=-1,s=n.length;++o<s;)if(!i.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?tH:t?JB:eH)(n,t))}function rH(){this.textContent=""}function iH(e){return function(){this.textContent=e}}function aH(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function oH(e){return arguments.length?this.each(e==null?rH:(typeof e=="function"?aH:iH)(e)):this.node().textContent}function sH(){this.innerHTML=""}function lH(e){return function(){this.innerHTML=e}}function uH(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function cH(e){return arguments.length?this.each(e==null?sH:(typeof e=="function"?uH:lH)(e)):this.node().innerHTML}function fH(){this.nextSibling&&this.parentNode.appendChild(this)}function dH(){return this.each(fH)}function hH(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function pH(){return this.each(hH)}function mH(e){var t=typeof e=="function"?e:W3(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function gH(){return null}function yH(e,t){var n=typeof e=="function"?e:W3(e),i=t==null?gH:typeof t=="function"?t:Bb(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function vH(){var e=this.parentNode;e&&e.removeChild(this)}function xH(){return this.each(vH)}function bH(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function wH(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _H(e){return this.select(e?wH:bH)}function SH(e){return arguments.length?this.property("__data__",e):this.node().__data__}function EH(e){return function(t){e.call(this,t,this.__data__)}}function CH(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function NH(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,o=t.length,s;n<o;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++i]=s;++i?t.length=i:delete this.__on}}}function kH(e,t,n){return function(){var i=this.__on,o,s=EH(t);if(i){for(var l=0,c=i.length;l<c;++l)if((o=i[l]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=n),o.value=t;return}}this.addEventListener(e.type,s,n),o={type:e.type,name:e.name,value:t,listener:s,options:n},i?i.push(o):this.__on=[o]}}function TH(e,t,n){var i=CH(e+""),o,s=i.length,l;if(arguments.length<2){var c=this.node().__on;if(c){for(var f=0,h=c.length,p;f<h;++f)for(o=0,p=c[f];o<s;++o)if((l=i[o]).type===p.type&&l.name===p.name)return p.value}return}for(c=t?kH:NH,o=0;o<s;++o)this.each(c(i[o],t,n));return this}function lj(e,t,n){var i=rj(e),o=i.CustomEvent;typeof o=="function"?o=new o(t,n):(o=i.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function AH(e,t){return function(){return lj(this,e,t)}}function RH(e,t){return function(){return lj(this,e,t.apply(this,arguments))}}function MH(e,t){return this.each((typeof t=="function"?RH:AH)(e,t))}function*jH(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],o=0,s=i.length,l;o<s;++o)(l=i[o])&&(yield l)}var uj=[null];function Fn(e,t){this._groups=e,this._parents=t}function Fl(){return new Fn([[document.documentElement]],uj)}function OH(){return this}Fn.prototype=Fl.prototype={constructor:Fn,select:aB,selectAll:uB,selectChild:hB,selectChildren:yB,filter:vB,data:EB,enter:xB,exit:NB,join:kB,merge:TB,selection:OH,order:AB,sort:RB,call:jB,nodes:OB,node:zB,size:DB,empty:LB,each:qB,attr:FB,style:XB,property:WB,classed:nH,text:oH,html:cH,raise:dH,lower:pH,append:mH,insert:yH,remove:xH,clone:_H,datum:SH,on:TH,dispatch:MH,[Symbol.iterator]:jH};function Pn(e){return typeof e=="string"?new Fn([[document.querySelector(e)]],[document.documentElement]):new Fn([[e]],uj)}function zH(e){let t;for(;t=e.sourceEvent;)e=t;return e}function yr(e,t){if(e=zH(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const DH={passive:!1},Rl={capture:!0,passive:!1};function Bp(e){e.stopImmediatePropagation()}function Lo(e){e.preventDefault(),e.stopImmediatePropagation()}function cj(e){var t=e.document.documentElement,n=Pn(e).on("dragstart.drag",Lo,Rl);"onselectstart"in t?n.on("selectstart.drag",Lo,Rl):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function fj(e,t){var n=e.document.documentElement,i=Pn(e).on("dragstart.drag",null);t&&(i.on("click.drag",Lo,Rl),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const kc=e=>()=>e;function Gx(e,{sourceEvent:t,subject:n,target:i,identifier:o,active:s,x:l,y:c,dx:f,dy:h,dispatch:p}){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:i,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:f,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:p}})}Gx.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function LH(e){return!e.ctrlKey&&!e.button}function qH(){return this.parentNode}function IH(e,t){return t??{x:e.x,y:e.y}}function BH(){return navigator.maxTouchPoints||"ontouchstart"in this}function dj(){var e=LH,t=qH,n=IH,i=BH,o={},s=Df("start","drag","end"),l=0,c,f,h,p,m=0;function g(k){k.on("mousedown.drag",v).filter(i).on("touchstart.drag",S).on("touchmove.drag",w,DH).on("touchend.drag touchcancel.drag",N).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(k,M){if(!(p||!e.call(this,k,M))){var R=C(this,t.call(this,k,M),k,M,"mouse");R&&(Pn(k.view).on("mousemove.drag",_,Rl).on("mouseup.drag",E,Rl),cj(k.view),Bp(k),h=!1,c=k.clientX,f=k.clientY,R("start",k))}}function _(k){if(Lo(k),!h){var M=k.clientX-c,R=k.clientY-f;h=M*M+R*R>m}o.mouse("drag",k)}function E(k){Pn(k.view).on("mousemove.drag mouseup.drag",null),fj(k.view,h),Lo(k),o.mouse("end",k)}function S(k,M){if(e.call(this,k,M)){var R=k.changedTouches,O=t.call(this,k,M),I=R.length,V,K;for(V=0;V<I;++V)(K=C(this,O,k,M,R[V].identifier,R[V]))&&(Bp(k),K("start",k,R[V]))}}function w(k){var M=k.changedTouches,R=M.length,O,I;for(O=0;O<R;++O)(I=o[M[O].identifier])&&(Lo(k),I("drag",k,M[O]))}function N(k){var M=k.changedTouches,R=M.length,O,I;for(p&&clearTimeout(p),p=setTimeout(function(){p=null},500),O=0;O<R;++O)(I=o[M[O].identifier])&&(Bp(k),I("end",k,M[O]))}function C(k,M,R,O,I,V){var K=s.copy(),H=yr(V||R,M),F,X,L;if((L=n.call(k,new Gx("beforestart",{sourceEvent:R,target:g,identifier:I,active:l,x:H[0],y:H[1],dx:0,dy:0,dispatch:K}),O))!=null)return F=L.x-H[0]||0,X=L.y-H[1]||0,function B(z,U,G){var Q=H,j;switch(z){case"start":o[I]=B,j=l++;break;case"end":delete o[I],--l;case"drag":H=yr(G||U,M),j=l;break}K.call(z,k,new Gx(z,{sourceEvent:U,subject:L,target:g,identifier:I,active:j,x:H[0]+F,y:H[1]+X,dx:H[0]-Q[0],dy:H[1]-Q[1],dispatch:K}),O)}}return g.filter=function(k){return arguments.length?(e=typeof k=="function"?k:kc(!!k),g):e},g.container=function(k){return arguments.length?(t=typeof k=="function"?k:kc(k),g):t},g.subject=function(k){return arguments.length?(n=typeof k=="function"?k:kc(k),g):n},g.touchable=function(k){return arguments.length?(i=typeof k=="function"?k:kc(!!k),g):i},g.on=function(){var k=s.on.apply(s,arguments);return k===s?g:k},g.clickDistance=function(k){return arguments.length?(m=(k=+k)*k,g):Math.sqrt(m)},g}function Ub(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function hj(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function $l(){}var Ml=.7,pf=1/Ml,qo="\\s*([+-]?\\d+)\\s*",jl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Lr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",HH=/^#([0-9a-f]{3,8})$/,UH=new RegExp(`^rgb\\(${qo},${qo},${qo}\\)$`),PH=new RegExp(`^rgb\\(${Lr},${Lr},${Lr}\\)$`),VH=new RegExp(`^rgba\\(${qo},${qo},${qo},${jl}\\)$`),FH=new RegExp(`^rgba\\(${Lr},${Lr},${Lr},${jl}\\)$`),$H=new RegExp(`^hsl\\(${jl},${Lr},${Lr}\\)$`),YH=new RegExp(`^hsla\\(${jl},${Lr},${Lr},${jl}\\)$`),p2={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};Ub($l,Da,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:m2,formatHex:m2,formatHex8:GH,formatHsl:XH,formatRgb:g2,toString:g2});function m2(){return this.rgb().formatHex()}function GH(){return this.rgb().formatHex8()}function XH(){return pj(this).formatHsl()}function g2(){return this.rgb().formatRgb()}function Da(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=HH.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?y2(t):n===3?new Rn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Tc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Tc(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=UH.exec(e))?new Rn(t[1],t[2],t[3],1):(t=PH.exec(e))?new Rn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=VH.exec(e))?Tc(t[1],t[2],t[3],t[4]):(t=FH.exec(e))?Tc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$H.exec(e))?b2(t[1],t[2]/100,t[3]/100,1):(t=YH.exec(e))?b2(t[1],t[2]/100,t[3]/100,t[4]):p2.hasOwnProperty(e)?y2(p2[e]):e==="transparent"?new Rn(NaN,NaN,NaN,0):null}function y2(e){return new Rn(e>>16&255,e>>8&255,e&255,1)}function Tc(e,t,n,i){return i<=0&&(e=t=n=NaN),new Rn(e,t,n,i)}function KH(e){return e instanceof $l||(e=Da(e)),e?(e=e.rgb(),new Rn(e.r,e.g,e.b,e.opacity)):new Rn}function Xx(e,t,n,i){return arguments.length===1?KH(e):new Rn(e,t,n,i??1)}function Rn(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}Ub(Rn,Xx,hj($l,{brighter(e){return e=e==null?pf:Math.pow(pf,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ml:Math.pow(Ml,e),new Rn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Rn(Oa(this.r),Oa(this.g),Oa(this.b),mf(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:v2,formatHex:v2,formatHex8:QH,formatRgb:x2,toString:x2}));function v2(){return`#${Ma(this.r)}${Ma(this.g)}${Ma(this.b)}`}function QH(){return`#${Ma(this.r)}${Ma(this.g)}${Ma(this.b)}${Ma((isNaN(this.opacity)?1:this.opacity)*255)}`}function x2(){const e=mf(this.opacity);return`${e===1?"rgb(":"rgba("}${Oa(this.r)}, ${Oa(this.g)}, ${Oa(this.b)}${e===1?")":`, ${e})`}`}function mf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Oa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ma(e){return e=Oa(e),(e<16?"0":"")+e.toString(16)}function b2(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new xr(e,t,n,i)}function pj(e){if(e instanceof xr)return new xr(e.h,e.s,e.l,e.opacity);if(e instanceof $l||(e=Da(e)),!e)return new xr;if(e instanceof xr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,o=Math.min(t,n,i),s=Math.max(t,n,i),l=NaN,c=s-o,f=(s+o)/2;return c?(t===s?l=(n-i)/c+(n<i)*6:n===s?l=(i-t)/c+2:l=(t-n)/c+4,c/=f<.5?s+o:2-s-o,l*=60):c=f>0&&f<1?0:l,new xr(l,c,f,e.opacity)}function ZH(e,t,n,i){return arguments.length===1?pj(e):new xr(e,t,n,i??1)}function xr(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}Ub(xr,ZH,hj($l,{brighter(e){return e=e==null?pf:Math.pow(pf,e),new xr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ml:Math.pow(Ml,e),new xr(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,i=n+(n<.5?n:1-n)*t,o=2*n-i;return new Rn(Hp(e>=240?e-240:e+120,o,i),Hp(e,o,i),Hp(e<120?e+240:e-120,o,i),this.opacity)},clamp(){return new xr(w2(this.h),Ac(this.s),Ac(this.l),mf(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=mf(this.opacity);return`${e===1?"hsl(":"hsla("}${w2(this.h)}, ${Ac(this.s)*100}%, ${Ac(this.l)*100}%${e===1?")":`, ${e})`}`}}));function w2(e){return e=(e||0)%360,e<0?e+360:e}function Ac(e){return Math.max(0,Math.min(1,e||0))}function Hp(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 Pb=e=>()=>e;function WH(e,t){return function(n){return e+n*t}}function JH(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function e9(e){return(e=+e)==1?mj:function(t,n){return n-t?JH(t,n,e):Pb(isNaN(t)?n:t)}}function mj(e,t){var n=t-e;return n?WH(e,n):Pb(isNaN(e)?t:e)}const gf=(function e(t){var n=e9(t);function i(o,s){var l=n((o=Xx(o)).r,(s=Xx(s)).r),c=n(o.g,s.g),f=n(o.b,s.b),h=mj(o.opacity,s.opacity);return function(p){return o.r=l(p),o.g=c(p),o.b=f(p),o.opacity=h(p),o+""}}return i.gamma=e,i})(1);function t9(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,i=t.slice(),o;return function(s){for(o=0;o<n;++o)i[o]=e[o]*(1-s)+t[o]*s;return i}}function n9(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function r9(e,t){var n=t?t.length:0,i=e?Math.min(n,e.length):0,o=new Array(i),s=new Array(n),l;for(l=0;l<i;++l)o[l]=Sl(e[l],t[l]);for(;l<n;++l)s[l]=t[l];return function(c){for(l=0;l<i;++l)s[l]=o[l](c);return s}}function i9(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function Or(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function a9(e,t){var n={},i={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=Sl(e[o],t[o]):i[o]=t[o];return function(s){for(o in n)i[o]=n[o](s);return i}}var Kx=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Up=new RegExp(Kx.source,"g");function o9(e){return function(){return e}}function s9(e){return function(t){return e(t)+""}}function gj(e,t){var n=Kx.lastIndex=Up.lastIndex=0,i,o,s,l=-1,c=[],f=[];for(e=e+"",t=t+"";(i=Kx.exec(e))&&(o=Up.exec(t));)(s=o.index)>n&&(s=t.slice(n,s),c[l]?c[l]+=s:c[++l]=s),(i=i[0])===(o=o[0])?c[l]?c[l]+=o:c[++l]=o:(c[++l]=null,f.push({i:l,x:Or(i,o)})),n=Up.lastIndex;return n<t.length&&(s=t.slice(n),c[l]?c[l]+=s:c[++l]=s),c.length<2?f[0]?s9(f[0].x):o9(t):(t=f.length,function(h){for(var p=0,m;p<t;++p)c[(m=f[p]).i]=m.x(h);return c.join("")})}function Sl(e,t){var n=typeof t,i;return t==null||n==="boolean"?Pb(t):(n==="number"?Or:n==="string"?(i=Da(t))?(t=i,gf):gj:t instanceof Da?gf:t instanceof Date?i9:n9(t)?t9:Array.isArray(t)?r9:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?a9:Or)(e,t)}var _2=180/Math.PI,Qx={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function yj(e,t,n,i,o,s){var l,c,f;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(f=e*n+t*i)&&(n-=e*f,i-=t*f),(c=Math.sqrt(n*n+i*i))&&(n/=c,i/=c,f/=c),e*i<t*n&&(e=-e,t=-t,f=-f,l=-l),{translateX:o,translateY:s,rotate:Math.atan2(t,e)*_2,skewX:Math.atan(f)*_2,scaleX:l,scaleY:c}}var Rc;function l9(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Qx:yj(t.a,t.b,t.c,t.d,t.e,t.f)}function u9(e){return e==null||(Rc||(Rc=document.createElementNS("http://www.w3.org/2000/svg","g")),Rc.setAttribute("transform",e),!(e=Rc.transform.baseVal.consolidate()))?Qx:(e=e.matrix,yj(e.a,e.b,e.c,e.d,e.e,e.f))}function vj(e,t,n,i){function o(h){return h.length?h.pop()+" ":""}function s(h,p,m,g,v,_){if(h!==m||p!==g){var E=v.push("translate(",null,t,null,n);_.push({i:E-4,x:Or(h,m)},{i:E-2,x:Or(p,g)})}else(m||g)&&v.push("translate("+m+t+g+n)}function l(h,p,m,g){h!==p?(h-p>180?p+=360:p-h>180&&(h+=360),g.push({i:m.push(o(m)+"rotate(",null,i)-2,x:Or(h,p)})):p&&m.push(o(m)+"rotate("+p+i)}function c(h,p,m,g){h!==p?g.push({i:m.push(o(m)+"skewX(",null,i)-2,x:Or(h,p)}):p&&m.push(o(m)+"skewX("+p+i)}function f(h,p,m,g,v,_){if(h!==m||p!==g){var E=v.push(o(v)+"scale(",null,",",null,")");_.push({i:E-4,x:Or(h,m)},{i:E-2,x:Or(p,g)})}else(m!==1||g!==1)&&v.push(o(v)+"scale("+m+","+g+")")}return function(h,p){var m=[],g=[];return h=e(h),p=e(p),s(h.translateX,h.translateY,p.translateX,p.translateY,m,g),l(h.rotate,p.rotate,m,g),c(h.skewX,p.skewX,m,g),f(h.scaleX,h.scaleY,p.scaleX,p.scaleY,m,g),h=p=null,function(v){for(var _=-1,E=g.length,S;++_<E;)m[(S=g[_]).i]=S.x(v);return m.join("")}}}var c9=vj(l9,"px, ","px)","deg)"),f9=vj(u9,", ",")",")"),d9=1e-12;function S2(e){return((e=Math.exp(e))+1/e)/2}function h9(e){return((e=Math.exp(e))-1/e)/2}function p9(e){return((e=Math.exp(2*e))-1)/(e+1)}const Wc=(function e(t,n,i){function o(s,l){var c=s[0],f=s[1],h=s[2],p=l[0],m=l[1],g=l[2],v=p-c,_=m-f,E=v*v+_*_,S,w;if(E<d9)w=Math.log(g/h)/t,S=function(O){return[c+O*v,f+O*_,h*Math.exp(t*O*w)]};else{var N=Math.sqrt(E),C=(g*g-h*h+i*E)/(2*h*n*N),k=(g*g-h*h-i*E)/(2*g*n*N),M=Math.log(Math.sqrt(C*C+1)-C),R=Math.log(Math.sqrt(k*k+1)-k);w=(R-M)/t,S=function(O){var I=O*w,V=S2(M),K=h/(n*N)*(V*p9(t*I+M)-h9(M));return[c+K*v,f+K*_,h*V/S2(t*I+M)]}}return S.duration=w*1e3*t/Math.SQRT2,S}return o.rho=function(s){var l=Math.max(.001,+s),c=l*l,f=c*c;return e(l,c,f)},o})(Math.SQRT2,2,4);var Po=0,ml=0,ol=0,xj=1e3,yf,gl,vf=0,La=0,qf=0,Ol=typeof performance=="object"&&performance.now?performance:Date,bj=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Vb(){return La||(bj(m9),La=Ol.now()+qf)}function m9(){La=0}function xf(){this._call=this._time=this._next=null}xf.prototype=wj.prototype={constructor:xf,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Vb():+n)+(t==null?0:+t),!this._next&&gl!==this&&(gl?gl._next=this:yf=this,gl=this),this._call=e,this._time=n,Zx()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zx())}};function wj(e,t,n){var i=new xf;return i.restart(e,t,n),i}function g9(){Vb(),++Po;for(var e=yf,t;e;)(t=La-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Po}function E2(){La=(vf=Ol.now())+qf,Po=ml=0;try{g9()}finally{Po=0,v9(),La=0}}function y9(){var e=Ol.now(),t=e-vf;t>xj&&(qf-=t,vf=e)}function v9(){for(var e,t=yf,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:yf=n);gl=e,Zx(i)}function Zx(e){if(!Po){ml&&(ml=clearTimeout(ml));var t=e-La;t>24?(e<1/0&&(ml=setTimeout(E2,e-Ol.now()-qf)),ol&&(ol=clearInterval(ol))):(ol||(vf=Ol.now(),ol=setInterval(y9,xj)),Po=1,bj(E2))}}function C2(e,t,n){var i=new xf;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,n),i}var x9=Df("start","end","cancel","interrupt"),b9=[],_j=0,N2=1,Wx=2,Jc=3,k2=4,Jx=5,ef=6;function If(e,t,n,i,o,s){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;w9(e,n,{name:t,index:i,group:o,on:x9,tween:b9,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:_j})}function Fb(e,t){var n=Nr(e,t);if(n.state>_j)throw new Error("too late; already scheduled");return n}function Ur(e,t){var n=Nr(e,t);if(n.state>Jc)throw new Error("too late; already running");return n}function Nr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function w9(e,t,n){var i=e.__transition,o;i[t]=n,n.timer=wj(s,0,n.time);function s(h){n.state=N2,n.timer.restart(l,n.delay,n.time),n.delay<=h&&l(h-n.delay)}function l(h){var p,m,g,v;if(n.state!==N2)return f();for(p in i)if(v=i[p],v.name===n.name){if(v.state===Jc)return C2(l);v.state===k2?(v.state=ef,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete i[p]):+p<t&&(v.state=ef,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete i[p])}if(C2(function(){n.state===Jc&&(n.state=k2,n.timer.restart(c,n.delay,n.time),c(h))}),n.state=Wx,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Wx){for(n.state=Jc,o=new Array(g=n.tween.length),p=0,m=-1;p<g;++p)(v=n.tween[p].value.call(e,e.__data__,n.index,n.group))&&(o[++m]=v);o.length=m+1}}function c(h){for(var p=h<n.duration?n.ease.call(null,h/n.duration):(n.timer.restart(f),n.state=Jx,1),m=-1,g=o.length;++m<g;)o[m].call(e,p);n.state===Jx&&(n.on.call("end",e,e.__data__,n.index,n.group),f())}function f(){n.state=ef,n.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function tf(e,t){var n=e.__transition,i,o,s=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((i=n[l]).name!==t){s=!1;continue}o=i.state>Wx&&i.state<Jx,i.state=ef,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[l]}s&&delete e.__transition}}function _9(e){return this.each(function(){tf(this,e)})}function S9(e,t){var n,i;return function(){var o=Ur(this,e),s=o.tween;if(s!==n){i=n=s;for(var l=0,c=i.length;l<c;++l)if(i[l].name===t){i=i.slice(),i.splice(l,1);break}}o.tween=i}}function E9(e,t,n){var i,o;if(typeof n!="function")throw new Error;return function(){var s=Ur(this,e),l=s.tween;if(l!==i){o=(i=l).slice();for(var c={name:t,value:n},f=0,h=o.length;f<h;++f)if(o[f].name===t){o[f]=c;break}f===h&&o.push(c)}s.tween=o}}function C9(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=Nr(this.node(),n).tween,o=0,s=i.length,l;o<s;++o)if((l=i[o]).name===e)return l.value;return null}return this.each((t==null?S9:E9)(n,e,t))}function $b(e,t,n){var i=e._id;return e.each(function(){var o=Ur(this,i);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Nr(o,i).value[t]}}function Sj(e,t){var n;return(typeof t=="number"?Or:t instanceof Da?gf:(n=Da(t))?(t=n,gf):gj)(e,t)}function N9(e){return function(){this.removeAttribute(e)}}function k9(e){return function(){this.removeAttributeNS(e.space,e.local)}}function T9(e,t,n){var i,o=n+"",s;return function(){var l=this.getAttribute(e);return l===o?null:l===i?s:s=t(i=l,n)}}function A9(e,t,n){var i,o=n+"",s;return function(){var l=this.getAttributeNS(e.space,e.local);return l===o?null:l===i?s:s=t(i=l,n)}}function R9(e,t,n){var i,o,s;return function(){var l,c=n(this),f;return c==null?void this.removeAttribute(e):(l=this.getAttribute(e),f=c+"",l===f?null:l===i&&f===o?s:(o=f,s=t(i=l,c)))}}function M9(e,t,n){var i,o,s;return function(){var l,c=n(this),f;return c==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),f=c+"",l===f?null:l===i&&f===o?s:(o=f,s=t(i=l,c)))}}function j9(e,t){var n=Lf(e),i=n==="transform"?f9:Sj;return this.attrTween(e,typeof t=="function"?(n.local?M9:R9)(n,i,$b(this,"attr."+e,t)):t==null?(n.local?k9:N9)(n):(n.local?A9:T9)(n,i,t))}function O9(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function z9(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function D9(e,t){var n,i;function o(){var s=t.apply(this,arguments);return s!==i&&(n=(i=s)&&z9(e,s)),n}return o._value=t,o}function L9(e,t){var n,i;function o(){var s=t.apply(this,arguments);return s!==i&&(n=(i=s)&&O9(e,s)),n}return o._value=t,o}function q9(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 i=Lf(e);return this.tween(n,(i.local?D9:L9)(i,t))}function I9(e,t){return function(){Fb(this,e).delay=+t.apply(this,arguments)}}function B9(e,t){return t=+t,function(){Fb(this,e).delay=t}}function H9(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?I9:B9)(t,e)):Nr(this.node(),t).delay}function U9(e,t){return function(){Ur(this,e).duration=+t.apply(this,arguments)}}function P9(e,t){return t=+t,function(){Ur(this,e).duration=t}}function V9(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?U9:P9)(t,e)):Nr(this.node(),t).duration}function F9(e,t){if(typeof t!="function")throw new Error;return function(){Ur(this,e).ease=t}}function $9(e){var t=this._id;return arguments.length?this.each(F9(t,e)):Nr(this.node(),t).ease}function Y9(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ur(this,e).ease=n}}function G9(e){if(typeof e!="function")throw new Error;return this.each(Y9(this._id,e))}function X9(e){typeof e!="function"&&(e=ej(e));for(var t=this._groups,n=t.length,i=new Array(n),o=0;o<n;++o)for(var s=t[o],l=s.length,c=i[o]=[],f,h=0;h<l;++h)(f=s[h])&&e.call(f,f.__data__,h,s)&&c.push(f);return new mi(i,this._parents,this._name,this._id)}function K9(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,o=n.length,s=Math.min(i,o),l=new Array(i),c=0;c<s;++c)for(var f=t[c],h=n[c],p=f.length,m=l[c]=new Array(p),g,v=0;v<p;++v)(g=f[v]||h[v])&&(m[v]=g);for(;c<i;++c)l[c]=t[c];return new mi(l,this._parents,this._name,this._id)}function Q9(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 Z9(e,t,n){var i,o,s=Q9(t)?Fb:Ur;return function(){var l=s(this,e),c=l.on;c!==i&&(o=(i=c).copy()).on(t,n),l.on=o}}function W9(e,t){var n=this._id;return arguments.length<2?Nr(this.node(),n).on.on(e):this.each(Z9(n,e,t))}function J9(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function eU(){return this.on("end.remove",J9(this._id))}function tU(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Bb(e));for(var i=this._groups,o=i.length,s=new Array(o),l=0;l<o;++l)for(var c=i[l],f=c.length,h=s[l]=new Array(f),p,m,g=0;g<f;++g)(p=c[g])&&(m=e.call(p,p.__data__,g,c))&&("__data__"in p&&(m.__data__=p.__data__),h[g]=m,If(h[g],t,n,g,h,Nr(p,n)));return new mi(s,this._parents,t,n)}function nU(e){var t=this._name,n=this._id;typeof e!="function"&&(e=J3(e));for(var i=this._groups,o=i.length,s=[],l=[],c=0;c<o;++c)for(var f=i[c],h=f.length,p,m=0;m<h;++m)if(p=f[m]){for(var g=e.call(p,p.__data__,m,f),v,_=Nr(p,n),E=0,S=g.length;E<S;++E)(v=g[E])&&If(v,t,n,E,g,_);s.push(g),l.push(p)}return new mi(s,l,t,n)}var rU=Fl.prototype.constructor;function iU(){return new rU(this._groups,this._parents)}function aU(e,t){var n,i,o;return function(){var s=Uo(this,e),l=(this.style.removeProperty(e),Uo(this,e));return s===l?null:s===n&&l===i?o:o=t(n=s,i=l)}}function Ej(e){return function(){this.style.removeProperty(e)}}function oU(e,t,n){var i,o=n+"",s;return function(){var l=Uo(this,e);return l===o?null:l===i?s:s=t(i=l,n)}}function sU(e,t,n){var i,o,s;return function(){var l=Uo(this,e),c=n(this),f=c+"";return c==null&&(f=c=(this.style.removeProperty(e),Uo(this,e))),l===f?null:l===i&&f===o?s:(o=f,s=t(i=l,c))}}function lU(e,t){var n,i,o,s="style."+t,l="end."+s,c;return function(){var f=Ur(this,e),h=f.on,p=f.value[s]==null?c||(c=Ej(t)):void 0;(h!==n||o!==p)&&(i=(n=h).copy()).on(l,o=p),f.on=i}}function uU(e,t,n){var i=(e+="")=="transform"?c9:Sj;return t==null?this.styleTween(e,aU(e,i)).on("end.style."+e,Ej(e)):typeof t=="function"?this.styleTween(e,sU(e,i,$b(this,"style."+e,t))).each(lU(this._id,e)):this.styleTween(e,oU(e,i,t),n).on("end.style."+e,null)}function cU(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function fU(e,t,n){var i,o;function s(){var l=t.apply(this,arguments);return l!==o&&(i=(o=l)&&cU(e,l,n)),i}return s._value=t,s}function dU(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,fU(e,t,n??""))}function hU(e){return function(){this.textContent=e}}function pU(e){return function(){var t=e(this);this.textContent=t??""}}function mU(e){return this.tween("text",typeof e=="function"?pU($b(this,"text",e)):hU(e==null?"":e+""))}function gU(e){return function(t){this.textContent=e.call(this,t)}}function yU(e){var t,n;function i(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&gU(o)),t}return i._value=e,i}function vU(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,yU(e))}function xU(){for(var e=this._name,t=this._id,n=Cj(),i=this._groups,o=i.length,s=0;s<o;++s)for(var l=i[s],c=l.length,f,h=0;h<c;++h)if(f=l[h]){var p=Nr(f,t);If(f,e,n,h,l,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new mi(i,this._parents,e,n)}function bU(){var e,t,n=this,i=n._id,o=n.size();return new Promise(function(s,l){var c={value:l},f={value:function(){--o===0&&s()}};n.each(function(){var h=Ur(this,i),p=h.on;p!==e&&(t=(e=p).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(f)),h.on=t}),o===0&&s()})}var wU=0;function mi(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function Cj(){return++wU}var ci=Fl.prototype;mi.prototype={constructor:mi,select:tU,selectAll:nU,selectChild:ci.selectChild,selectChildren:ci.selectChildren,filter:X9,merge:K9,selection:iU,transition:xU,call:ci.call,nodes:ci.nodes,node:ci.node,size:ci.size,empty:ci.empty,each:ci.each,on:W9,attr:j9,attrTween:q9,style:uU,styleTween:dU,text:mU,textTween:vU,remove:eU,tween:C9,delay:H9,duration:V9,ease:$9,easeVarying:G9,end:bU,[Symbol.iterator]:ci[Symbol.iterator]};function _U(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var SU={time:null,delay:0,duration:250,ease:_U};function EU(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 CU(e){var t,n;e instanceof mi?(t=e._id,e=e._name):(t=Cj(),(n=SU).time=Vb(),e=e==null?null:e+"");for(var i=this._groups,o=i.length,s=0;s<o;++s)for(var l=i[s],c=l.length,f,h=0;h<c;++h)(f=l[h])&&If(f,e,t,h,l,n||EU(f,t));return new mi(i,this._parents,e,t)}Fl.prototype.interrupt=_9;Fl.prototype.transition=CU;const Mc=e=>()=>e;function NU(e,{sourceEvent:t,target:n,transform:i,dispatch:o}){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:i,enumerable:!0,configurable:!0},_:{value:o}})}function di(e,t,n){this.k=e,this.x=t,this.y=n}di.prototype={constructor:di,scale:function(e){return e===1?this:new di(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new di(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 Bf=new di(1,0,0);Nj.prototype=di.prototype;function Nj(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Bf;return e.__zoom}function Pp(e){e.stopImmediatePropagation()}function sl(e){e.preventDefault(),e.stopImmediatePropagation()}function kU(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function TU(){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 T2(){return this.__zoom||Bf}function AU(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function RU(){return navigator.maxTouchPoints||"ontouchstart"in this}function MU(e,t,n){var i=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],l=e.invertY(t[1][1])-n[1][1];return e.translate(o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o),l>s?(s+l)/2:Math.min(0,s)||Math.max(0,l))}function kj(){var e=kU,t=TU,n=MU,i=AU,o=RU,s=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,f=Wc,h=Df("start","zoom","end"),p,m,g,v=500,_=150,E=0,S=10;function w(L){L.property("__zoom",T2).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",V).on("dblclick.zoom",K).filter(o).on("touchstart.zoom",H).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",X).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(L,B,z,U){var G=L.selection?L.selection():L;G.property("__zoom",T2),L!==G?M(L,B,z,U):G.interrupt().each(function(){R(this,arguments).event(U).start().zoom(null,typeof B=="function"?B.apply(this,arguments):B).end()})},w.scaleBy=function(L,B,z,U){w.scaleTo(L,function(){var G=this.__zoom.k,Q=typeof B=="function"?B.apply(this,arguments):B;return G*Q},z,U)},w.scaleTo=function(L,B,z,U){w.transform(L,function(){var G=t.apply(this,arguments),Q=this.__zoom,j=z==null?k(G):typeof z=="function"?z.apply(this,arguments):z,D=Q.invert(j),$=typeof B=="function"?B.apply(this,arguments):B;return n(C(N(Q,$),j,D),G,l)},z,U)},w.translateBy=function(L,B,z,U){w.transform(L,function(){return n(this.__zoom.translate(typeof B=="function"?B.apply(this,arguments):B,typeof z=="function"?z.apply(this,arguments):z),t.apply(this,arguments),l)},null,U)},w.translateTo=function(L,B,z,U,G){w.transform(L,function(){var Q=t.apply(this,arguments),j=this.__zoom,D=U==null?k(Q):typeof U=="function"?U.apply(this,arguments):U;return n(Bf.translate(D[0],D[1]).scale(j.k).translate(typeof B=="function"?-B.apply(this,arguments):-B,typeof z=="function"?-z.apply(this,arguments):-z),Q,l)},U,G)};function N(L,B){return B=Math.max(s[0],Math.min(s[1],B)),B===L.k?L:new di(B,L.x,L.y)}function C(L,B,z){var U=B[0]-z[0]*L.k,G=B[1]-z[1]*L.k;return U===L.x&&G===L.y?L:new di(L.k,U,G)}function k(L){return[(+L[0][0]+ +L[1][0])/2,(+L[0][1]+ +L[1][1])/2]}function M(L,B,z,U){L.on("start.zoom",function(){R(this,arguments).event(U).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(U).end()}).tween("zoom",function(){var G=this,Q=arguments,j=R(G,Q).event(U),D=t.apply(G,Q),$=z==null?k(D):typeof z=="function"?z.apply(G,Q):z,q=Math.max(D[1][0]-D[0][0],D[1][1]-D[0][1]),Y=G.__zoom,Z=typeof B=="function"?B.apply(G,Q):B,W=f(Y.invert($).concat(q/Y.k),Z.invert($).concat(q/Z.k));return function(te){if(te===1)te=Z;else{var re=W(te),se=q/re[2];te=new di(se,$[0]-re[0]*se,$[1]-re[1]*se)}j.zoom(null,te)}})}function R(L,B,z){return!z&&L.__zooming||new O(L,B)}function O(L,B){this.that=L,this.args=B,this.active=0,this.sourceEvent=null,this.extent=t.apply(L,B),this.taps=0}O.prototype={event:function(L){return L&&(this.sourceEvent=L),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(L,B){return this.mouse&&L!=="mouse"&&(this.mouse[1]=B.invert(this.mouse[0])),this.touch0&&L!=="touch"&&(this.touch0[1]=B.invert(this.touch0[0])),this.touch1&&L!=="touch"&&(this.touch1[1]=B.invert(this.touch1[0])),this.that.__zoom=B,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(L){var B=Pn(this.that).datum();h.call(L,this.that,new NU(L,{sourceEvent:this.sourceEvent,target:w,transform:this.that.__zoom,dispatch:h}),B)}};function I(L,...B){if(!e.apply(this,arguments))return;var z=R(this,B).event(L),U=this.__zoom,G=Math.max(s[0],Math.min(s[1],U.k*Math.pow(2,i.apply(this,arguments)))),Q=yr(L);if(z.wheel)(z.mouse[0][0]!==Q[0]||z.mouse[0][1]!==Q[1])&&(z.mouse[1]=U.invert(z.mouse[0]=Q)),clearTimeout(z.wheel);else{if(U.k===G)return;z.mouse=[Q,U.invert(Q)],tf(this),z.start()}sl(L),z.wheel=setTimeout(j,_),z.zoom("mouse",n(C(N(U,G),z.mouse[0],z.mouse[1]),z.extent,l));function j(){z.wheel=null,z.end()}}function V(L,...B){if(g||!e.apply(this,arguments))return;var z=L.currentTarget,U=R(this,B,!0).event(L),G=Pn(L.view).on("mousemove.zoom",$,!0).on("mouseup.zoom",q,!0),Q=yr(L,z),j=L.clientX,D=L.clientY;cj(L.view),Pp(L),U.mouse=[Q,this.__zoom.invert(Q)],tf(this),U.start();function $(Y){if(sl(Y),!U.moved){var Z=Y.clientX-j,W=Y.clientY-D;U.moved=Z*Z+W*W>E}U.event(Y).zoom("mouse",n(C(U.that.__zoom,U.mouse[0]=yr(Y,z),U.mouse[1]),U.extent,l))}function q(Y){G.on("mousemove.zoom mouseup.zoom",null),fj(Y.view,U.moved),sl(Y),U.event(Y).end()}}function K(L,...B){if(e.apply(this,arguments)){var z=this.__zoom,U=yr(L.changedTouches?L.changedTouches[0]:L,this),G=z.invert(U),Q=z.k*(L.shiftKey?.5:2),j=n(C(N(z,Q),U,G),t.apply(this,B),l);sl(L),c>0?Pn(this).transition().duration(c).call(M,j,U,L):Pn(this).call(w.transform,j,U,L)}}function H(L,...B){if(e.apply(this,arguments)){var z=L.touches,U=z.length,G=R(this,B,L.changedTouches.length===U).event(L),Q,j,D,$;for(Pp(L),j=0;j<U;++j)D=z[j],$=yr(D,this),$=[$,this.__zoom.invert($),D.identifier],G.touch0?!G.touch1&&G.touch0[2]!==$[2]&&(G.touch1=$,G.taps=0):(G.touch0=$,Q=!0,G.taps=1+!!p);p&&(p=clearTimeout(p)),Q&&(G.taps<2&&(m=$[0],p=setTimeout(function(){p=null},v)),tf(this),G.start())}}function F(L,...B){if(this.__zooming){var z=R(this,B).event(L),U=L.changedTouches,G=U.length,Q,j,D,$;for(sl(L),Q=0;Q<G;++Q)j=U[Q],D=yr(j,this),z.touch0&&z.touch0[2]===j.identifier?z.touch0[0]=D:z.touch1&&z.touch1[2]===j.identifier&&(z.touch1[0]=D);if(j=z.that.__zoom,z.touch1){var q=z.touch0[0],Y=z.touch0[1],Z=z.touch1[0],W=z.touch1[1],te=(te=Z[0]-q[0])*te+(te=Z[1]-q[1])*te,re=(re=W[0]-Y[0])*re+(re=W[1]-Y[1])*re;j=N(j,Math.sqrt(te/re)),D=[(q[0]+Z[0])/2,(q[1]+Z[1])/2],$=[(Y[0]+W[0])/2,(Y[1]+W[1])/2]}else if(z.touch0)D=z.touch0[0],$=z.touch0[1];else return;z.zoom("touch",n(C(j,D,$),z.extent,l))}}function X(L,...B){if(this.__zooming){var z=R(this,B).event(L),U=L.changedTouches,G=U.length,Q,j;for(Pp(L),g&&clearTimeout(g),g=setTimeout(function(){g=null},v),Q=0;Q<G;++Q)j=U[Q],z.touch0&&z.touch0[2]===j.identifier?delete z.touch0:z.touch1&&z.touch1[2]===j.identifier&&delete z.touch1;if(z.touch1&&!z.touch0&&(z.touch0=z.touch1,delete z.touch1),z.touch0)z.touch0[1]=this.__zoom.invert(z.touch0[0]);else if(z.end(),z.taps===2&&(j=yr(j,this),Math.hypot(m[0]-j[0],m[1]-j[1])<S)){var D=Pn(this).on("dblclick.zoom");D&&D.apply(this,arguments)}}}return w.wheelDelta=function(L){return arguments.length?(i=typeof L=="function"?L:Mc(+L),w):i},w.filter=function(L){return arguments.length?(e=typeof L=="function"?L:Mc(!!L),w):e},w.touchable=function(L){return arguments.length?(o=typeof L=="function"?L:Mc(!!L),w):o},w.extent=function(L){return arguments.length?(t=typeof L=="function"?L:Mc([[+L[0][0],+L[0][1]],[+L[1][0],+L[1][1]]]),w):t},w.scaleExtent=function(L){return arguments.length?(s[0]=+L[0],s[1]=+L[1],w):[s[0],s[1]]},w.translateExtent=function(L){return arguments.length?(l[0][0]=+L[0][0],l[1][0]=+L[1][0],l[0][1]=+L[0][1],l[1][1]=+L[1][1],w):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},w.constrain=function(L){return arguments.length?(n=L,w):n},w.duration=function(L){return arguments.length?(c=+L,w):c},w.interpolate=function(L){return arguments.length?(f=L,w):f},w.on=function(){var L=h.on.apply(h,arguments);return L===h?w:L},w.clickDistance=function(L){return arguments.length?(E=(L=+L)*L,w):Math.sqrt(E)},w.tapDistance=function(L){return arguments.length?(S=+L,w):S},w}const Sr={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:i})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:i}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},zl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Tj=["Enter"," ","Escape"],Aj={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Vo;(function(e){e.Strict="strict",e.Loose="loose"})(Vo||(Vo={}));var za;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(za||(za={}));var Dl;(function(e){e.Partial="partial",e.Full="full"})(Dl||(Dl={}));const Rj={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ra;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ra||(ra={}));var bf;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(bf||(bf={}));var Ee;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ee||(Ee={}));const A2={[Ee.Left]:Ee.Right,[Ee.Right]:Ee.Left,[Ee.Top]:Ee.Bottom,[Ee.Bottom]:Ee.Top};function jU(e,t){if(!e&&!t)return!0;if(!e||!t||e.size!==t.size)return!1;if(!e.size&&!t.size)return!0;for(const n of e.keys())if(!t.has(n))return!1;return!0}function R2(e,t,n){if(!n)return;const i=[];e.forEach((o,s)=>{t!=null&&t.has(s)||i.push(o)}),i.length&&n(i)}function Mj(e){return e===null?null:e?"valid":"invalid"}const jj=e=>"id"in e&&"source"in e&&"target"in e,OU=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Yb=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Yl=(e,t=[0,0])=>{const{width:n,height:i}=gi(e),o=e.origin??t,s=n*o[0],l=i*o[1];return{x:e.position.x-s,y:e.position.y-l}},zU=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((i,o)=>{const s=typeof o=="string";let l=!t.nodeLookup&&!s?o:void 0;t.nodeLookup&&(l=s?t.nodeLookup.get(o):Yb(o)?o:t.nodeLookup.get(o.id));const c=l?wf(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Hf(i,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Uf(n)},Gl=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},i=!1;return e.forEach(o=>{(t.filter===void 0||t.filter(o))&&(n=Hf(n,wf(o)),i=!0)}),i?Uf(n):{x:0,y:0,width:0,height:0}},Gb=(e,t,[n,i,o]=[0,0,1],s=!1,l=!1)=>{const c={...Kl(t,[n,i,o]),width:t.width/o,height:t.height/o},f=[];for(const h of e.values()){const{measured:p,selectable:m=!0,hidden:g=!1}=h;if(l&&!m||g)continue;const v=p.width??h.width??h.initialWidth??null,_=p.height??h.height??h.initialHeight??null,E=Ll(c,$o(h)),S=(v??0)*(_??0),w=s&&E>0;(!h.internals.handleBounds||w||E>=S||h.dragging)&&f.push(h)}return f},DU=(e,t)=>{const n=new Set;return e.forEach(i=>{n.add(i.id)}),t.filter(i=>n.has(i.source)||n.has(i.target))};function LU(e,t){const n=new Map,i=t!=null&&t.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{o.measured.width&&o.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!o.hidden)&&(!i||i.has(o.id))&&n.set(o.id,o)}),n}async function qU({nodes:e,width:t,height:n,panZoom:i,minZoom:o,maxZoom:s},l){if(e.size===0)return Promise.resolve(!0);const c=LU(e,l),f=Gl(c),h=Xb(f,t,n,(l==null?void 0:l.minZoom)??o,(l==null?void 0:l.maxZoom)??s,(l==null?void 0:l.padding)??.1);return await i.setViewport(h,{duration:l==null?void 0:l.duration,ease:l==null?void 0:l.ease,interpolate:l==null?void 0:l.interpolate}),Promise.resolve(!0)}function Oj({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:i=[0,0],nodeExtent:o,onError:s}){const l=n.get(e),c=l.parentId?n.get(l.parentId):void 0,{x:f,y:h}=c?c.internals.positionAbsolute:{x:0,y:0},p=l.origin??i;let m=l.extent||o;if(l.extent==="parent"&&!l.expandParent)if(!c)s==null||s("005",Sr.error005());else{const v=c.measured.width,_=c.measured.height;v&&_&&(m=[[f,h],[f+v,h+_]])}else c&&Yo(l.extent)&&(m=[[l.extent[0][0]+f,l.extent[0][1]+h],[l.extent[1][0]+f,l.extent[1][1]+h]]);const g=Yo(m)?qa(t,m,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&(s==null||s("015",Sr.error015())),{position:{x:g.x-f+(l.measured.width??0)*p[0],y:g.y-h+(l.measured.height??0)*p[1]},positionAbsolute:g}}async function IU({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:i,onBeforeDelete:o}){const s=new Set(e.map(g=>g.id)),l=[];for(const g of n){if(g.deletable===!1)continue;const v=s.has(g.id),_=!v&&g.parentId&&l.find(E=>E.id===g.parentId);(v||_)&&l.push(g)}const c=new Set(t.map(g=>g.id)),f=i.filter(g=>g.deletable!==!1),p=DU(l,f);for(const g of f)c.has(g.id)&&!p.find(_=>_.id===g.id)&&p.push(g);if(!o)return{edges:p,nodes:l};const m=await o({nodes:l,edges:p});return typeof m=="boolean"?m?{edges:p,nodes:l}:{edges:[],nodes:[]}:m}const Fo=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),qa=(e={x:0,y:0},t,n)=>({x:Fo(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Fo(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function zj(e,t,n){const{width:i,height:o}=gi(n),{x:s,y:l}=n.internals.positionAbsolute;return qa(e,[[s,l],[s+i,l+o]],t)}const M2=(e,t,n)=>e<t?Fo(Math.abs(e-t),1,t)/t:e>n?-Fo(Math.abs(e-n),1,t)/t:0,Dj=(e,t,n=15,i=40)=>{const o=M2(e.x,i,t.width-i)*n,s=M2(e.y,i,t.height-i)*n;return[o,s]},Hf=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),eb=({x:e,y:t,width:n,height:i})=>({x:e,y:t,x2:e+n,y2:t+i}),Uf=({x:e,y:t,x2:n,y2:i})=>({x:e,y:t,width:n-e,height:i-t}),$o=(e,t=[0,0])=>{var o,s;const{x:n,y:i}=Yb(e)?e.internals.positionAbsolute:Yl(e,t);return{x:n,y:i,width:((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0,height:((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0}},wf=(e,t=[0,0])=>{var o,s;const{x:n,y:i}=Yb(e)?e.internals.positionAbsolute:Yl(e,t);return{x:n,y:i,x2:n+(((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0),y2:i+(((s=e.measured)==null?void 0:s.height)??e.height??e.initialHeight??0)}},Lj=(e,t)=>Uf(Hf(eb(e),eb(t))),Ll=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),i=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*i)},j2=e=>br(e.width)&&br(e.height)&&br(e.x)&&br(e.y),br=e=>!isNaN(e)&&isFinite(e),BU=(e,t)=>{},Xl=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Kl=({x:e,y:t},[n,i,o],s=!1,l=[1,1])=>{const c={x:(e-n)/o,y:(t-i)/o};return s?Xl(c,l):c},_f=({x:e,y:t},[n,i,o])=>({x:e*o+n,y:t*o+i});function Ao(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function HU(e,t,n){if(typeof e=="string"||typeof e=="number"){const i=Ao(e,n),o=Ao(e,t);return{top:i,right:o,bottom:i,left:o,x:o*2,y:i*2}}if(typeof e=="object"){const i=Ao(e.top??e.y??0,n),o=Ao(e.bottom??e.y??0,n),s=Ao(e.left??e.x??0,t),l=Ao(e.right??e.x??0,t);return{top:i,right:l,bottom:o,left:s,x:s+l,y:i+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function UU(e,t,n,i,o,s){const{x:l,y:c}=_f(e,[t,n,i]),{x:f,y:h}=_f({x:e.x+e.width,y:e.y+e.height},[t,n,i]),p=o-f,m=s-h;return{left:Math.floor(l),top:Math.floor(c),right:Math.floor(p),bottom:Math.floor(m)}}const Xb=(e,t,n,i,o,s)=>{const l=HU(s,t,n),c=(t-l.x)/e.width,f=(n-l.y)/e.height,h=Math.min(c,f),p=Fo(h,i,o),m=e.x+e.width/2,g=e.y+e.height/2,v=t/2-m*p,_=n/2-g*p,E=UU(e,v,_,p,t,n),S={left:Math.min(E.left-l.left,0),top:Math.min(E.top-l.top,0),right:Math.min(E.right-l.right,0),bottom:Math.min(E.bottom-l.bottom,0)};return{x:v-S.left+S.right,y:_-S.top+S.bottom,zoom:p}},ql=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Yo(e){return e!=null&&e!=="parent"}function gi(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function qj(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function Ij(e,t={width:0,height:0},n,i,o){const s={...e},l=i.get(n);if(l){const c=l.origin||o;s.x+=l.internals.positionAbsolute.x-(t.width??0)*c[0],s.y+=l.internals.positionAbsolute.y-(t.height??0)*c[1]}return s}function O2(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function PU(){let e,t;return{promise:new Promise((i,o)=>{e=i,t=o}),resolve:e,reject:t}}function VU(e){return{...Aj,...e||{}}}function El(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:i,containerBounds:o}){const{x:s,y:l}=wr(e),c=Kl({x:s-((o==null?void 0:o.left)??0),y:l-((o==null?void 0:o.top)??0)},i),{x:f,y:h}=n?Xl(c,t):c;return{xSnapped:f,ySnapped:h,...c}}const Kb=e=>({width:e.offsetWidth,height:e.offsetHeight}),Bj=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},FU=["INPUT","SELECT","TEXTAREA"];function Hj(e){var i,o;const t=((o=(i=e.composedPath)==null?void 0:i.call(e))==null?void 0:o[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:FU.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Uj=e=>"clientX"in e,wr=(e,t)=>{var s,l;const n=Uj(e),i=n?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,o=n?e.clientY:(l=e.touches)==null?void 0:l[0].clientY;return{x:i-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},z2=(e,t,n,i,o)=>{const s=t.querySelectorAll(`.${e}`);return!s||!s.length?null:Array.from(s).map(l=>{const c=l.getBoundingClientRect();return{id:l.getAttribute("data-handleid"),type:e,nodeId:o,position:l.getAttribute("data-handlepos"),x:(c.left-n.left)/i,y:(c.top-n.top)/i,...Kb(l)}})};function Pj({sourceX:e,sourceY:t,targetX:n,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:l,targetControlY:c}){const f=e*.125+o*.375+l*.375+n*.125,h=t*.125+s*.375+c*.375+i*.125,p=Math.abs(f-e),m=Math.abs(h-t);return[f,h,p,m]}function jc(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function D2({pos:e,x1:t,y1:n,x2:i,y2:o,c:s}){switch(e){case Ee.Left:return[t-jc(t-i,s),n];case Ee.Right:return[t+jc(i-t,s),n];case Ee.Top:return[t,n-jc(n-o,s)];case Ee.Bottom:return[t,n+jc(o-n,s)]}}function ns({sourceX:e,sourceY:t,sourcePosition:n=Ee.Bottom,targetX:i,targetY:o,targetPosition:s=Ee.Top,curvature:l=.25}){const[c,f]=D2({pos:n,x1:e,y1:t,x2:i,y2:o,c:l}),[h,p]=D2({pos:s,x1:i,y1:o,x2:e,y2:t,c:l}),[m,g,v,_]=Pj({sourceX:e,sourceY:t,targetX:i,targetY:o,sourceControlX:c,sourceControlY:f,targetControlX:h,targetControlY:p});return[`M${e},${t} C${c},${f} ${h},${p} ${i},${o}`,m,g,v,_]}function Vj({sourceX:e,sourceY:t,targetX:n,targetY:i}){const o=Math.abs(n-e)/2,s=n<e?n+o:n-o,l=Math.abs(i-t)/2,c=i<t?i+l:i-l;return[s,c,o,l]}function $U({sourceNode:e,targetNode:t,selected:n=!1,zIndex:i=0,elevateOnSelect:o=!1,zIndexMode:s="basic"}){if(s==="manual")return i;const l=o&&n?i+1e3:i,c=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return l+c}function YU({sourceNode:e,targetNode:t,width:n,height:i,transform:o}){const s=Hf(wf(e),wf(t));s.x===s.x2&&(s.x2+=1),s.y===s.y2&&(s.y2+=1);const l={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:i/o[2]};return Ll(l,Uf(s))>0}const GU=({source:e,sourceHandle:t,target:n,targetHandle:i})=>`xy-edge__${e}${t||""}-${n}${i||""}`,XU=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),KU=(e,t,n={})=>{if(!e.source||!e.target)return t;const i=n.getEdgeId||GU;let o;return jj(e)?o={...e}:o={...e,id:i(e)},XU(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function Fj({sourceX:e,sourceY:t,targetX:n,targetY:i}){const[o,s,l,c]=Vj({sourceX:e,sourceY:t,targetX:n,targetY:i});return[`M ${e},${t}L ${n},${i}`,o,s,l,c]}const L2={[Ee.Left]:{x:-1,y:0},[Ee.Right]:{x:1,y:0},[Ee.Top]:{x:0,y:-1},[Ee.Bottom]:{x:0,y:1}},QU=({source:e,sourcePosition:t=Ee.Bottom,target:n})=>t===Ee.Left||t===Ee.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},q2=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function ZU({source:e,sourcePosition:t=Ee.Bottom,target:n,targetPosition:i=Ee.Top,center:o,offset:s,stepPosition:l}){const c=L2[t],f=L2[i],h={x:e.x+c.x*s,y:e.y+c.y*s},p={x:n.x+f.x*s,y:n.y+f.y*s},m=QU({source:h,sourcePosition:t,target:p}),g=m.x!==0?"x":"y",v=m[g];let _=[],E,S;const w={x:0,y:0},N={x:0,y:0},[,,C,k]=Vj({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(c[g]*f[g]===-1){g==="x"?(E=o.x??h.x+(p.x-h.x)*l,S=o.y??(h.y+p.y)/2):(E=o.x??(h.x+p.x)/2,S=o.y??h.y+(p.y-h.y)*l);const R=[{x:E,y:h.y},{x:E,y:p.y}],O=[{x:h.x,y:S},{x:p.x,y:S}];c[g]===v?_=g==="x"?R:O:_=g==="x"?O:R}else{const R=[{x:h.x,y:p.y}],O=[{x:p.x,y:h.y}];if(g==="x"?_=c.x===v?O:R:_=c.y===v?R:O,t===i){const F=Math.abs(e[g]-n[g]);if(F<=s){const X=Math.min(s-1,s-F);c[g]===v?w[g]=(h[g]>e[g]?-1:1)*X:N[g]=(p[g]>n[g]?-1:1)*X}}if(t!==i){const F=g==="x"?"y":"x",X=c[g]===f[F],L=h[F]>p[F],B=h[F]<p[F];(c[g]===1&&(!X&&L||X&&B)||c[g]!==1&&(!X&&B||X&&L))&&(_=g==="x"?R:O)}const I={x:h.x+w.x,y:h.y+w.y},V={x:p.x+N.x,y:p.y+N.y},K=Math.max(Math.abs(I.x-_[0].x),Math.abs(V.x-_[0].x)),H=Math.max(Math.abs(I.y-_[0].y),Math.abs(V.y-_[0].y));K>=H?(E=(I.x+V.x)/2,S=_[0].y):(E=_[0].x,S=(I.y+V.y)/2)}return[[e,{x:h.x+w.x,y:h.y+w.y},..._,{x:p.x+N.x,y:p.y+N.y},n],E,S,C,k]}function WU(e,t,n,i){const o=Math.min(q2(e,t)/2,q2(t,n)/2,i),{x:s,y:l}=t;if(e.x===s&&s===n.x||e.y===l&&l===n.y)return`L${s} ${l}`;if(e.y===l){const h=e.x<n.x?-1:1,p=e.y<n.y?1:-1;return`L ${s+o*h},${l}Q ${s},${l} ${s},${l+o*p}`}const c=e.x<n.x?1:-1,f=e.y<n.y?-1:1;return`L ${s},${l+o*f}Q ${s},${l} ${s+o*c},${l}`}function Go({sourceX:e,sourceY:t,sourcePosition:n=Ee.Bottom,targetX:i,targetY:o,targetPosition:s=Ee.Top,borderRadius:l=5,centerX:c,centerY:f,offset:h=20,stepPosition:p=.5}){const[m,g,v,_,E]=ZU({source:{x:e,y:t},sourcePosition:n,target:{x:i,y:o},targetPosition:s,center:{x:c,y:f},offset:h,stepPosition:p});return[m.reduce((w,N,C)=>{let k="";return C>0&&C<m.length-1?k=WU(m[C-1],N,m[C+1],l):k=`${C===0?"M":"L"}${N.x} ${N.y}`,w+=k,w},""),g,v,_,E]}function I2(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function JU(e){var m;const{sourceNode:t,targetNode:n}=e;if(!I2(t)||!I2(n))return null;const i=t.internals.handleBounds||B2(t.handles),o=n.internals.handleBounds||B2(n.handles),s=H2((i==null?void 0:i.source)??[],e.sourceHandle),l=H2(e.connectionMode===Vo.Strict?(o==null?void 0:o.target)??[]:((o==null?void 0:o.target)??[]).concat((o==null?void 0:o.source)??[]),e.targetHandle);if(!s||!l)return(m=e.onError)==null||m.call(e,"008",Sr.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const c=(s==null?void 0:s.position)||Ee.Bottom,f=(l==null?void 0:l.position)||Ee.Top,h=Ia(t,s,c),p=Ia(n,l,f);return{sourceX:h.x,sourceY:h.y,targetX:p.x,targetY:p.y,sourcePosition:c,targetPosition:f}}function B2(e){if(!e)return null;const t=[],n=[];for(const i of e)i.width=i.width??1,i.height=i.height??1,i.type==="source"?t.push(i):i.type==="target"&&n.push(i);return{source:t,target:n}}function Ia(e,t,n=Ee.Left,i=!1){const o=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,s=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:l,height:c}=t??gi(e);if(i)return{x:o+l/2,y:s+c/2};switch((t==null?void 0:t.position)??n){case Ee.Top:return{x:o+l/2,y:s};case Ee.Right:return{x:o+l,y:s+c/2};case Ee.Bottom:return{x:o+l/2,y:s+c};case Ee.Left:return{x:o,y:s+c/2}}}function H2(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function tb(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(i=>`${i}=${e[i]}`).join("&")}`:""}function e7(e,{id:t,defaultColor:n,defaultMarkerStart:i,defaultMarkerEnd:o}){const s=new Set;return e.reduce((l,c)=>([c.markerStart||i,c.markerEnd||o].forEach(f=>{if(f&&typeof f=="object"){const h=tb(f,t);s.has(h)||(l.push({id:h,color:f.color||n,...f}),s.add(h))}}),l),[]).sort((l,c)=>l.id.localeCompare(c.id))}const $j=1e3,t7=10,Qb={nodeOrigin:[0,0],nodeExtent:zl,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},n7={...Qb,checkEquality:!0};function Zb(e,t){const n={...e};for(const i in t)t[i]!==void 0&&(n[i]=t[i]);return n}function r7(e,t,n){const i=Zb(Qb,n);for(const o of e.values())if(o.parentId)Jb(o,e,t,i);else{const s=Yl(o,i.nodeOrigin),l=Yo(o.extent)?o.extent:i.nodeExtent,c=qa(s,l,gi(o));o.internals.positionAbsolute=c}}function i7(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],i=[];for(const o of e.handles){const s={id:o.id,width:o.width??1,height:o.height??1,nodeId:e.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?n.push(s):o.type==="target"&&i.push(s)}return{source:n,target:i}}function Wb(e){return e==="manual"}function nb(e,t,n,i={}){var h,p;const o=Zb(n7,i),s={i:0},l=new Map(t),c=o!=null&&o.elevateNodesOnSelect&&!Wb(o.zIndexMode)?$j:0;let f=e.length>0;t.clear(),n.clear();for(const m of e){let g=l.get(m.id);if(o.checkEquality&&m===(g==null?void 0:g.internals.userNode))t.set(m.id,g);else{const v=Yl(m,o.nodeOrigin),_=Yo(m.extent)?m.extent:o.nodeExtent,E=qa(v,_,gi(m));g={...o.defaults,...m,measured:{width:(h=m.measured)==null?void 0:h.width,height:(p=m.measured)==null?void 0:p.height},internals:{positionAbsolute:E,handleBounds:i7(m,g),z:Yj(m,c,o.zIndexMode),userNode:m}},t.set(m.id,g)}(g.measured===void 0||g.measured.width===void 0||g.measured.height===void 0)&&!g.hidden&&(f=!1),m.parentId&&Jb(g,t,n,i,s)}return f}function a7(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function Jb(e,t,n,i,o){const{elevateNodesOnSelect:s,nodeOrigin:l,nodeExtent:c,zIndexMode:f}=Zb(Qb,i),h=e.parentId,p=t.get(h);if(!p){console.warn(`Parent node ${h} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}a7(e,n),o&&!p.parentId&&p.internals.rootParentIndex===void 0&&f==="auto"&&(p.internals.rootParentIndex=++o.i,p.internals.z=p.internals.z+o.i*t7),o&&p.internals.rootParentIndex!==void 0&&(o.i=p.internals.rootParentIndex);const m=s&&!Wb(f)?$j:0,{x:g,y:v,z:_}=o7(e,p,l,c,m,f),{positionAbsolute:E}=e.internals,S=g!==E.x||v!==E.y;(S||_!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:g,y:v}:E,z:_}})}function Yj(e,t,n){const i=br(e.zIndex)?e.zIndex:0;return Wb(n)?i:i+(e.selected?t:0)}function o7(e,t,n,i,o,s){const{x:l,y:c}=t.internals.positionAbsolute,f=gi(e),h=Yl(e,n),p=Yo(e.extent)?qa(h,e.extent,f):h;let m=qa({x:l+p.x,y:c+p.y},i,f);e.extent==="parent"&&(m=zj(m,f,t));const g=Yj(e,o,s),v=t.internals.z??0;return{x:m.x,y:m.y,z:v>=g?v+1:g}}function e1(e,t,n,i=[0,0]){var l;const o=[],s=new Map;for(const c of e){const f=t.get(c.parentId);if(!f)continue;const h=((l=s.get(c.parentId))==null?void 0:l.expandedRect)??$o(f),p=Lj(h,c.rect);s.set(c.parentId,{expandedRect:p,parent:f})}return s.size>0&&s.forEach(({expandedRect:c,parent:f},h)=>{var C;const p=f.internals.positionAbsolute,m=gi(f),g=f.origin??i,v=c.x<p.x?Math.round(Math.abs(p.x-c.x)):0,_=c.y<p.y?Math.round(Math.abs(p.y-c.y)):0,E=Math.max(m.width,Math.round(c.width)),S=Math.max(m.height,Math.round(c.height)),w=(E-m.width)*g[0],N=(S-m.height)*g[1];(v>0||_>0||w||N)&&(o.push({id:h,type:"position",position:{x:f.position.x-v+w,y:f.position.y-_+N}}),(C=n.get(h))==null||C.forEach(k=>{e.some(M=>M.id===k.id)||o.push({id:k.id,type:"position",position:{x:k.position.x+v,y:k.position.y+_}})})),(m.width<c.width||m.height<c.height||v||_)&&o.push({id:h,type:"dimensions",setAttributes:!0,dimensions:{width:E+(v?g[0]*v-w:0),height:S+(_?g[1]*_-N:0)}})}),o}function s7(e,t,n,i,o,s,l){const c=i==null?void 0:i.querySelector(".xyflow__viewport");let f=!1;if(!c)return{changes:[],updatedInternals:f};const h=[],p=window.getComputedStyle(c),{m22:m}=new window.DOMMatrixReadOnly(p.transform),g=[];for(const v of e.values()){const _=t.get(v.id);if(!_)continue;if(_.hidden){t.set(_.id,{..._,internals:{..._.internals,handleBounds:void 0}}),f=!0;continue}const E=Kb(v.nodeElement),S=_.measured.width!==E.width||_.measured.height!==E.height;if(!!(E.width&&E.height&&(S||!_.internals.handleBounds||v.force))){const N=v.nodeElement.getBoundingClientRect(),C=Yo(_.extent)?_.extent:s;let{positionAbsolute:k}=_.internals;_.parentId&&_.extent==="parent"?k=zj(k,E,t.get(_.parentId)):C&&(k=qa(k,C,E));const M={..._,measured:E,internals:{..._.internals,positionAbsolute:k,handleBounds:{source:z2("source",v.nodeElement,N,m,_.id),target:z2("target",v.nodeElement,N,m,_.id)}}};t.set(_.id,M),_.parentId&&Jb(M,t,n,{nodeOrigin:o,zIndexMode:l}),f=!0,S&&(h.push({id:_.id,type:"dimensions",dimensions:E}),_.expandParent&&_.parentId&&g.push({id:_.id,parentId:_.parentId,rect:$o(M,o)}))}}if(g.length>0){const v=e1(g,t,n,o);h.push(...v)}return{changes:h,updatedInternals:f}}async function l7({delta:e,panZoom:t,transform:n,translateExtent:i,width:o,height:s}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const l=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,s]],i),c=!!l&&(l.x!==n[0]||l.y!==n[1]||l.k!==n[2]);return Promise.resolve(c)}function U2(e,t,n,i,o,s){let l=o;const c=i.get(l)||new Map;i.set(l,c.set(n,t)),l=`${o}-${e}`;const f=i.get(l)||new Map;if(i.set(l,f.set(n,t)),s){l=`${o}-${e}-${s}`;const h=i.get(l)||new Map;i.set(l,h.set(n,t))}}function Gj(e,t,n){e.clear(),t.clear();for(const i of n){const{source:o,target:s,sourceHandle:l=null,targetHandle:c=null}=i,f={edgeId:i.id,source:o,target:s,sourceHandle:l,targetHandle:c},h=`${o}-${l}--${s}-${c}`,p=`${s}-${c}--${o}-${l}`;U2("source",f,p,e,o,l),U2("target",f,h,e,s,c),t.set(i.id,i)}}function Xj(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:Xj(n,t):!1}function P2(e,t,n){var o;let i=e;do{if((o=i==null?void 0:i.matches)!=null&&o.call(i,t))return!0;if(i===n)return!1;i=i==null?void 0:i.parentElement}while(i);return!1}function u7(e,t,n,i){const o=new Map;for(const[s,l]of e)if((l.selected||l.id===i)&&(!l.parentId||!Xj(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){const c=e.get(s);c&&o.set(s,{id:s,position:c.position||{x:0,y:0},distance:{x:n.x-c.internals.positionAbsolute.x,y:n.y-c.internals.positionAbsolute.y},extent:c.extent,parentId:c.parentId,origin:c.origin,expandParent:c.expandParent,internals:{positionAbsolute:c.internals.positionAbsolute||{x:0,y:0}},measured:{width:c.measured.width??0,height:c.measured.height??0}})}return o}function Vp({nodeId:e,dragItems:t,nodeLookup:n,dragging:i=!0}){var l,c,f;const o=[];for(const[h,p]of t){const m=(l=n.get(h))==null?void 0:l.internals.userNode;m&&o.push({...m,position:p.position,dragging:i})}if(!e)return[o[0],o];const s=(c=n.get(e))==null?void 0:c.internals.userNode;return[s?{...s,position:((f=t.get(e))==null?void 0:f.position)||s.position,dragging:i}:o[0],o]}function c7({dragItems:e,snapGrid:t,x:n,y:i}){const o=e.values().next().value;if(!o)return null;const s={x:n-o.distance.x,y:i-o.distance.y},l=Xl(s,t);return{x:l.x-s.x,y:l.y-s.y}}function f7({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:i,onDragStop:o}){let s={x:null,y:null},l=0,c=new Map,f=!1,h={x:0,y:0},p=null,m=!1,g=null,v=!1,_=!1,E=null;function S({noDragClassName:N,handleSelector:C,domNode:k,isSelectable:M,nodeId:R,nodeClickDistance:O=0}){g=Pn(k);function I({x:F,y:X}){const{nodeLookup:L,nodeExtent:B,snapGrid:z,snapToGrid:U,nodeOrigin:G,onNodeDrag:Q,onSelectionDrag:j,onError:D,updateNodePositions:$}=t();s={x:F,y:X};let q=!1;const Y=c.size>1,Z=Y&&B?eb(Gl(c)):null,W=Y&&U?c7({dragItems:c,snapGrid:z,x:F,y:X}):null;for(const[te,re]of c){if(!L.has(te))continue;let se={x:F-re.distance.x,y:X-re.distance.y};U&&(se=W?{x:Math.round(se.x+W.x),y:Math.round(se.y+W.y)}:Xl(se,z));let me=null;if(Y&&B&&!re.extent&&Z){const{positionAbsolute:we}=re.internals,ke=we.x-Z.x+B[0][0],Ne=we.x+re.measured.width-Z.x2+B[1][0],Oe=we.y-Z.y+B[0][1],Te=we.y+re.measured.height-Z.y2+B[1][1];me=[[ke,Oe],[Ne,Te]]}const{position:be,positionAbsolute:ve}=Oj({nodeId:te,nextPosition:se,nodeLookup:L,nodeExtent:me||B,nodeOrigin:G,onError:D});q=q||re.position.x!==be.x||re.position.y!==be.y,re.position=be,re.internals.positionAbsolute=ve}if(_=_||q,!!q&&($(c,!0),E&&(i||Q||!R&&j))){const[te,re]=Vp({nodeId:R,dragItems:c,nodeLookup:L});i==null||i(E,c,te,re),Q==null||Q(E,te,re),R||j==null||j(E,re)}}async function V(){if(!p)return;const{transform:F,panBy:X,autoPanSpeed:L,autoPanOnNodeDrag:B}=t();if(!B){f=!1,cancelAnimationFrame(l);return}const[z,U]=Dj(h,p,L);(z!==0||U!==0)&&(s.x=(s.x??0)-z/F[2],s.y=(s.y??0)-U/F[2],await X({x:z,y:U})&&I(s)),l=requestAnimationFrame(V)}function K(F){var Y;const{nodeLookup:X,multiSelectionActive:L,nodesDraggable:B,transform:z,snapGrid:U,snapToGrid:G,selectNodesOnDrag:Q,onNodeDragStart:j,onSelectionDragStart:D,unselectNodesAndEdges:$}=t();m=!0,(!Q||!M)&&!L&&R&&((Y=X.get(R))!=null&&Y.selected||$()),M&&Q&&R&&(e==null||e(R));const q=El(F.sourceEvent,{transform:z,snapGrid:U,snapToGrid:G,containerBounds:p});if(s=q,c=u7(X,B,q,R),c.size>0&&(n||j||!R&&D)){const[Z,W]=Vp({nodeId:R,dragItems:c,nodeLookup:X});n==null||n(F.sourceEvent,c,Z,W),j==null||j(F.sourceEvent,Z,W),R||D==null||D(F.sourceEvent,W)}}const H=dj().clickDistance(O).on("start",F=>{const{domNode:X,nodeDragThreshold:L,transform:B,snapGrid:z,snapToGrid:U}=t();p=(X==null?void 0:X.getBoundingClientRect())||null,v=!1,_=!1,E=F.sourceEvent,L===0&&K(F),s=El(F.sourceEvent,{transform:B,snapGrid:z,snapToGrid:U,containerBounds:p}),h=wr(F.sourceEvent,p)}).on("drag",F=>{const{autoPanOnNodeDrag:X,transform:L,snapGrid:B,snapToGrid:z,nodeDragThreshold:U,nodeLookup:G}=t(),Q=El(F.sourceEvent,{transform:L,snapGrid:B,snapToGrid:z,containerBounds:p});if(E=F.sourceEvent,(F.sourceEvent.type==="touchmove"&&F.sourceEvent.touches.length>1||R&&!G.has(R))&&(v=!0),!v){if(!f&&X&&m&&(f=!0,V()),!m){const j=wr(F.sourceEvent,p),D=j.x-h.x,$=j.y-h.y;Math.sqrt(D*D+$*$)>U&&K(F)}(s.x!==Q.xSnapped||s.y!==Q.ySnapped)&&c&&m&&(h=wr(F.sourceEvent,p),I(Q))}}).on("end",F=>{if(!(!m||v)&&(f=!1,m=!1,cancelAnimationFrame(l),c.size>0)){const{nodeLookup:X,updateNodePositions:L,onNodeDragStop:B,onSelectionDragStop:z}=t();if(_&&(L(c,!1),_=!1),o||B||!R&&z){const[U,G]=Vp({nodeId:R,dragItems:c,nodeLookup:X,dragging:!1});o==null||o(F.sourceEvent,c,U,G),B==null||B(F.sourceEvent,U,G),R||z==null||z(F.sourceEvent,G)}}}).filter(F=>{const X=F.target;return!F.button&&(!N||!P2(X,`.${N}`,k))&&(!C||P2(X,C,k))});g.call(H)}function w(){g==null||g.on(".drag",null)}return{update:S,destroy:w}}function d7(e,t,n){const i=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const s of t.values())Ll(o,$o(s))>0&&i.push(s);return i}const h7=250;function p7(e,t,n,i){var c,f;let o=[],s=1/0;const l=d7(e,n,t+h7);for(const h of l){const p=[...((c=h.internals.handleBounds)==null?void 0:c.source)??[],...((f=h.internals.handleBounds)==null?void 0:f.target)??[]];for(const m of p){if(i.nodeId===m.nodeId&&i.type===m.type&&i.id===m.id)continue;const{x:g,y:v}=Ia(h,m,m.position,!0),_=Math.sqrt(Math.pow(g-e.x,2)+Math.pow(v-e.y,2));_>t||(_<s?(o=[{...m,x:g,y:v}],s=_):_===s&&o.push({...m,x:g,y:v}))}}if(!o.length)return null;if(o.length>1){const h=i.type==="source"?"target":"source";return o.find(p=>p.type===h)??o[0]}return o[0]}function Kj(e,t,n,i,o,s=!1){var h,p,m;const l=i.get(e);if(!l)return null;const c=o==="strict"?(h=l.internals.handleBounds)==null?void 0:h[t]:[...((p=l.internals.handleBounds)==null?void 0:p.source)??[],...((m=l.internals.handleBounds)==null?void 0:m.target)??[]],f=(n?c==null?void 0:c.find(g=>g.id===n):c==null?void 0:c[0])??null;return f&&s?{...f,...Ia(l,f,f.position,!0)}:f}function Qj(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function m7(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Zj=()=>!0;function g7(e,{connectionMode:t,connectionRadius:n,handleId:i,nodeId:o,edgeUpdaterType:s,isTarget:l,domNode:c,nodeLookup:f,lib:h,autoPanOnConnect:p,flowId:m,panBy:g,cancelConnection:v,onConnectStart:_,onConnect:E,onConnectEnd:S,isValidConnection:w=Zj,onReconnectEnd:N,updateConnection:C,getTransform:k,getFromHandle:M,autoPanSpeed:R,dragThreshold:O=1,handleDomNode:I}){const V=Bj(e.target);let K=0,H;const{x:F,y:X}=wr(e),L=Qj(s,I),B=c==null?void 0:c.getBoundingClientRect();let z=!1;if(!B||!L)return;const U=Kj(o,L,i,f,t);if(!U)return;let G=wr(e,B),Q=!1,j=null,D=!1,$=null;function q(){if(!p||!B)return;const[be,ve]=Dj(G,B,R);g({x:be,y:ve}),K=requestAnimationFrame(q)}const Y={...U,nodeId:o,type:L,position:U.position},Z=f.get(o);let te={inProgress:!0,isValid:null,from:Ia(Z,Y,Ee.Left,!0),fromHandle:Y,fromPosition:Y.position,fromNode:Z,to:G,toHandle:null,toPosition:A2[Y.position],toNode:null,pointer:G};function re(){z=!0,C(te),_==null||_(e,{nodeId:o,handleId:i,handleType:L})}O===0&&re();function se(be){if(!z){const{x:Te,y:_t}=wr(be),he=Te-F,ye=_t-X;if(!(he*he+ye*ye>O*O))return;re()}if(!M()||!Y){me(be);return}const ve=k();G=wr(be,B),H=p7(Kl(G,ve,!1,[1,1]),n,f,Y),Q||(q(),Q=!0);const we=Wj(be,{handle:H,connectionMode:t,fromNodeId:o,fromHandleId:i,fromType:l?"target":"source",isValidConnection:w,doc:V,lib:h,flowId:m,nodeLookup:f});$=we.handleDomNode,j=we.connection,D=m7(!!H,we.isValid);const ke=f.get(o),Ne=ke?Ia(ke,Y,Ee.Left,!0):te.from,Oe={...te,from:Ne,isValid:D,to:we.toHandle&&D?_f({x:we.toHandle.x,y:we.toHandle.y},ve):G,toHandle:we.toHandle,toPosition:D&&we.toHandle?we.toHandle.position:A2[Y.position],toNode:we.toHandle?f.get(we.toHandle.nodeId):null,pointer:G};C(Oe),te=Oe}function me(be){if(!("touches"in be&&be.touches.length>0)){if(z){(H||$)&&j&&D&&(E==null||E(j));const{inProgress:ve,...we}=te,ke={...we,toPosition:te.toHandle?te.toPosition:null};S==null||S(be,ke),s&&(N==null||N(be,ke))}v(),cancelAnimationFrame(K),Q=!1,D=!1,j=null,$=null,V.removeEventListener("mousemove",se),V.removeEventListener("mouseup",me),V.removeEventListener("touchmove",se),V.removeEventListener("touchend",me)}}V.addEventListener("mousemove",se),V.addEventListener("mouseup",me),V.addEventListener("touchmove",se),V.addEventListener("touchend",me)}function Wj(e,{handle:t,connectionMode:n,fromNodeId:i,fromHandleId:o,fromType:s,doc:l,lib:c,flowId:f,isValidConnection:h=Zj,nodeLookup:p}){const m=s==="target",g=t?l.querySelector(`.${c}-flow__handle[data-id="${f}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:v,y:_}=wr(e),E=l.elementFromPoint(v,_),S=E!=null&&E.classList.contains(`${c}-flow__handle`)?E:g,w={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const N=Qj(void 0,S),C=S.getAttribute("data-nodeid"),k=S.getAttribute("data-handleid"),M=S.classList.contains("connectable"),R=S.classList.contains("connectableend");if(!C||!N)return w;const O={source:m?C:i,sourceHandle:m?k:o,target:m?i:C,targetHandle:m?o:k};w.connection=O;const V=M&&R&&(n===Vo.Strict?m&&N==="source"||!m&&N==="target":C!==i||k!==o);w.isValid=V&&h(O),w.toHandle=Kj(C,N,k,p,n,!0)}return w}const rb={onPointerDown:g7,isValid:Wj};function y7({domNode:e,panZoom:t,getTransform:n,getViewScale:i}){const o=Pn(e);function s({translateExtent:c,width:f,height:h,zoomStep:p=1,pannable:m=!0,zoomable:g=!0,inversePan:v=!1}){const _=C=>{if(C.sourceEvent.type!=="wheel"||!t)return;const k=n(),M=C.sourceEvent.ctrlKey&&ql()?10:1,R=-C.sourceEvent.deltaY*(C.sourceEvent.deltaMode===1?.05:C.sourceEvent.deltaMode?1:.002)*p,O=k[2]*Math.pow(2,R*M);t.scaleTo(O)};let E=[0,0];const S=C=>{(C.sourceEvent.type==="mousedown"||C.sourceEvent.type==="touchstart")&&(E=[C.sourceEvent.clientX??C.sourceEvent.touches[0].clientX,C.sourceEvent.clientY??C.sourceEvent.touches[0].clientY])},w=C=>{const k=n();if(C.sourceEvent.type!=="mousemove"&&C.sourceEvent.type!=="touchmove"||!t)return;const M=[C.sourceEvent.clientX??C.sourceEvent.touches[0].clientX,C.sourceEvent.clientY??C.sourceEvent.touches[0].clientY],R=[M[0]-E[0],M[1]-E[1]];E=M;const O=i()*Math.max(k[2],Math.log(k[2]))*(v?-1:1),I={x:k[0]-R[0]*O,y:k[1]-R[1]*O},V=[[0,0],[f,h]];t.setViewportConstrained({x:I.x,y:I.y,zoom:k[2]},V,c)},N=kj().on("start",S).on("zoom",m?w:null).on("zoom.wheel",g?_:null);o.call(N,{})}function l(){o.on("zoom",null)}return{update:s,destroy:l,pointer:yr}}const Pf=e=>({x:e.x,y:e.y,zoom:e.k}),Fp=({x:e,y:t,zoom:n})=>Bf.translate(e,t).scale(n),Oo=(e,t)=>e.target.closest(`.${t}`),Jj=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),v7=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,$p=(e,t=0,n=v7,i=()=>{})=>{const o=typeof t=="number"&&t>0;return o||i(),o?e.transition().duration(t).ease(n).on("end",i):e},e5=e=>{const t=e.ctrlKey&&ql()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function x7({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:i,panOnScrollMode:o,panOnScrollSpeed:s,zoomOnPinch:l,onPanZoomStart:c,onPanZoom:f,onPanZoomEnd:h}){return p=>{if(Oo(p,t))return p.ctrlKey&&p.preventDefault(),!1;p.preventDefault(),p.stopImmediatePropagation();const m=n.property("__zoom").k||1;if(p.ctrlKey&&l){const S=yr(p),w=e5(p),N=m*Math.pow(2,w);i.scaleTo(n,N,S,p);return}const g=p.deltaMode===1?20:1;let v=o===za.Vertical?0:p.deltaX*g,_=o===za.Horizontal?0:p.deltaY*g;!ql()&&p.shiftKey&&o!==za.Vertical&&(v=p.deltaY*g,_=0),i.translateBy(n,-(v/m)*s,-(_/m)*s,{internal:!0});const E=Pf(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(f==null||f(p,E),e.panScrollTimeout=setTimeout(()=>{h==null||h(p,E),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,c==null||c(p,E))}}function b7({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(i,o){const s=i.type==="wheel",l=!t&&s&&!i.ctrlKey,c=Oo(i,e);if(i.ctrlKey&&s&&c&&i.preventDefault(),l||c)return null;i.preventDefault(),n.call(this,i,o)}}function w7({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return i=>{var s,l,c;if((s=i.sourceEvent)!=null&&s.internal)return;const o=Pf(i.transform);e.mouseButton=((l=i.sourceEvent)==null?void 0:l.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=o,((c=i.sourceEvent)==null?void 0:c.type)==="mousedown"&&t(!0),n&&(n==null||n(i.sourceEvent,o))}}function _7({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:i,onPanZoom:o}){return s=>{var l,c;e.usedRightMouseButton=!!(n&&Jj(t,e.mouseButton??0)),(l=s.sourceEvent)!=null&&l.sync||i([s.transform.x,s.transform.y,s.transform.k]),o&&!((c=s.sourceEvent)!=null&&c.internal)&&(o==null||o(s.sourceEvent,Pf(s.transform)))}}function S7({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:i,onPanZoomEnd:o,onPaneContextMenu:s}){return l=>{var c;if(!((c=l.sourceEvent)!=null&&c.internal)&&(e.isZoomingOrPanning=!1,s&&Jj(t,e.mouseButton??0)&&!e.usedRightMouseButton&&l.sourceEvent&&s(l.sourceEvent),e.usedRightMouseButton=!1,i(!1),o)){const f=Pf(l.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o==null||o(l.sourceEvent,f)},n?150:0)}}}function E7({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:i,panOnScroll:o,zoomOnDoubleClick:s,userSelectionActive:l,noWheelClassName:c,noPanClassName:f,lib:h,connectionInProgress:p}){return m=>{var S;const g=e||t,v=n&&m.ctrlKey,_=m.type==="wheel";if(m.button===1&&m.type==="mousedown"&&(Oo(m,`${h}-flow__node`)||Oo(m,`${h}-flow__edge`)))return!0;if(!i&&!g&&!o&&!s&&!n||l||p&&!_||Oo(m,c)&&_||Oo(m,f)&&(!_||o&&_&&!e)||!n&&m.ctrlKey&&_)return!1;if(!n&&m.type==="touchstart"&&((S=m.touches)==null?void 0:S.length)>1)return m.preventDefault(),!1;if(!g&&!o&&!v&&_||!i&&(m.type==="mousedown"||m.type==="touchstart")||Array.isArray(i)&&!i.includes(m.button)&&m.type==="mousedown")return!1;const E=Array.isArray(i)&&i.includes(m.button)||!m.button||m.button<=1;return(!m.ctrlKey||_)&&E}}function C7({domNode:e,minZoom:t,maxZoom:n,translateExtent:i,viewport:o,onPanZoom:s,onPanZoomStart:l,onPanZoomEnd:c,onDraggingChange:f}){const h={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},p=e.getBoundingClientRect(),m=kj().scaleExtent([t,n]).translateExtent(i),g=Pn(e).call(m);N({x:o.x,y:o.y,zoom:Fo(o.zoom,t,n)},[[0,0],[p.width,p.height]],i);const v=g.on("wheel.zoom"),_=g.on("dblclick.zoom");m.wheelDelta(e5);function E(H,F){return g?new Promise(X=>{m==null||m.interpolate((F==null?void 0:F.interpolate)==="linear"?Sl:Wc).transform($p(g,F==null?void 0:F.duration,F==null?void 0:F.ease,()=>X(!0)),H)}):Promise.resolve(!1)}function S({noWheelClassName:H,noPanClassName:F,onPaneContextMenu:X,userSelectionActive:L,panOnScroll:B,panOnDrag:z,panOnScrollMode:U,panOnScrollSpeed:G,preventScrolling:Q,zoomOnPinch:j,zoomOnScroll:D,zoomOnDoubleClick:$,zoomActivationKeyPressed:q,lib:Y,onTransformChange:Z,connectionInProgress:W,paneClickDistance:te,selectionOnDrag:re}){L&&!h.isZoomingOrPanning&&w();const se=B&&!q&&!L;m.clickDistance(re?1/0:!br(te)||te<0?0:te);const me=se?x7({zoomPanValues:h,noWheelClassName:H,d3Selection:g,d3Zoom:m,panOnScrollMode:U,panOnScrollSpeed:G,zoomOnPinch:j,onPanZoomStart:l,onPanZoom:s,onPanZoomEnd:c}):b7({noWheelClassName:H,preventScrolling:Q,d3ZoomHandler:v});if(g.on("wheel.zoom",me,{passive:!1}),!L){const ve=w7({zoomPanValues:h,onDraggingChange:f,onPanZoomStart:l});m.on("start",ve);const we=_7({zoomPanValues:h,panOnDrag:z,onPaneContextMenu:!!X,onPanZoom:s,onTransformChange:Z});m.on("zoom",we);const ke=S7({zoomPanValues:h,panOnDrag:z,panOnScroll:B,onPaneContextMenu:X,onPanZoomEnd:c,onDraggingChange:f});m.on("end",ke)}const be=E7({zoomActivationKeyPressed:q,panOnDrag:z,zoomOnScroll:D,panOnScroll:B,zoomOnDoubleClick:$,zoomOnPinch:j,userSelectionActive:L,noPanClassName:F,noWheelClassName:H,lib:Y,connectionInProgress:W});m.filter(be),$?g.on("dblclick.zoom",_):g.on("dblclick.zoom",null)}function w(){m.on("zoom",null)}async function N(H,F,X){const L=Fp(H),B=m==null?void 0:m.constrain()(L,F,X);return B&&await E(B),new Promise(z=>z(B))}async function C(H,F){const X=Fp(H);return await E(X,F),new Promise(L=>L(X))}function k(H){if(g){const F=Fp(H),X=g.property("__zoom");(X.k!==H.zoom||X.x!==H.x||X.y!==H.y)&&(m==null||m.transform(g,F,null,{sync:!0}))}}function M(){const H=g?Nj(g.node()):{x:0,y:0,k:1};return{x:H.x,y:H.y,zoom:H.k}}function R(H,F){return g?new Promise(X=>{m==null||m.interpolate((F==null?void 0:F.interpolate)==="linear"?Sl:Wc).scaleTo($p(g,F==null?void 0:F.duration,F==null?void 0:F.ease,()=>X(!0)),H)}):Promise.resolve(!1)}function O(H,F){return g?new Promise(X=>{m==null||m.interpolate((F==null?void 0:F.interpolate)==="linear"?Sl:Wc).scaleBy($p(g,F==null?void 0:F.duration,F==null?void 0:F.ease,()=>X(!0)),H)}):Promise.resolve(!1)}function I(H){m==null||m.scaleExtent(H)}function V(H){m==null||m.translateExtent(H)}function K(H){const F=!br(H)||H<0?0:H;m==null||m.clickDistance(F)}return{update:S,destroy:w,setViewport:C,setViewportConstrained:N,getViewport:M,scaleTo:R,scaleBy:O,setScaleExtent:I,setTranslateExtent:V,syncViewport:k,setClickDistance:K}}var Xo;(function(e){e.Line="line",e.Handle="handle"})(Xo||(Xo={}));function N7({width:e,prevWidth:t,height:n,prevHeight:i,affectsX:o,affectsY:s}){const l=e-t,c=n-i,f=[l>0?1:l<0?-1:0,c>0?1:c<0?-1:0];return l&&o&&(f[0]=f[0]*-1),c&&s&&(f[1]=f[1]*-1),f}function V2(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),i=e.includes("left"),o=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:i,affectsY:o}}function Zi(e,t){return Math.max(0,t-e)}function Wi(e,t){return Math.max(0,e-t)}function Oc(e,t,n){return Math.max(0,t-e,e-n)}function F2(e,t){return e?!t:t}function k7(e,t,n,i,o,s,l,c){let{affectsX:f,affectsY:h}=t;const{isHorizontal:p,isVertical:m}=t,g=p&&m,{xSnapped:v,ySnapped:_}=n,{minWidth:E,maxWidth:S,minHeight:w,maxHeight:N}=i,{x:C,y:k,width:M,height:R,aspectRatio:O}=e;let I=Math.floor(p?v-e.pointerX:0),V=Math.floor(m?_-e.pointerY:0);const K=M+(f?-I:I),H=R+(h?-V:V),F=-s[0]*M,X=-s[1]*R;let L=Oc(K,E,S),B=Oc(H,w,N);if(l){let G=0,Q=0;f&&I<0?G=Zi(C+I+F,l[0][0]):!f&&I>0&&(G=Wi(C+K+F,l[1][0])),h&&V<0?Q=Zi(k+V+X,l[0][1]):!h&&V>0&&(Q=Wi(k+H+X,l[1][1])),L=Math.max(L,G),B=Math.max(B,Q)}if(c){let G=0,Q=0;f&&I>0?G=Wi(C+I,c[0][0]):!f&&I<0&&(G=Zi(C+K,c[1][0])),h&&V>0?Q=Wi(k+V,c[0][1]):!h&&V<0&&(Q=Zi(k+H,c[1][1])),L=Math.max(L,G),B=Math.max(B,Q)}if(o){if(p){const G=Oc(K/O,w,N)*O;if(L=Math.max(L,G),l){let Q=0;!f&&!h||f&&!h&&g?Q=Wi(k+X+K/O,l[1][1])*O:Q=Zi(k+X+(f?I:-I)/O,l[0][1])*O,L=Math.max(L,Q)}if(c){let Q=0;!f&&!h||f&&!h&&g?Q=Zi(k+K/O,c[1][1])*O:Q=Wi(k+(f?I:-I)/O,c[0][1])*O,L=Math.max(L,Q)}}if(m){const G=Oc(H*O,E,S)/O;if(B=Math.max(B,G),l){let Q=0;!f&&!h||h&&!f&&g?Q=Wi(C+H*O+F,l[1][0])/O:Q=Zi(C+(h?V:-V)*O+F,l[0][0])/O,B=Math.max(B,Q)}if(c){let Q=0;!f&&!h||h&&!f&&g?Q=Zi(C+H*O,c[1][0])/O:Q=Wi(C+(h?V:-V)*O,c[0][0])/O,B=Math.max(B,Q)}}}V=V+(V<0?B:-B),I=I+(I<0?L:-L),o&&(g?K>H*O?V=(F2(f,h)?-I:I)/O:I=(F2(f,h)?-V:V)*O:p?(V=I/O,h=f):(I=V*O,f=h));const z=f?C+I:C,U=h?k+V:k;return{width:M+(f?-I:I),height:R+(h?-V:V),x:s[0]*I*(f?-1:1)+z,y:s[1]*V*(h?-1:1)+U}}const t5={width:0,height:0,x:0,y:0},T7={...t5,pointerX:0,pointerY:0,aspectRatio:1};function A7(e){return[[0,0],[e.measured.width,e.measured.height]]}function R7(e,t,n){const i=t.position.x+e.position.x,o=t.position.y+e.position.y,s=e.measured.width??0,l=e.measured.height??0,c=n[0]*s,f=n[1]*l;return[[i-c,o-f],[i+s-c,o+l-f]]}function M7({domNode:e,nodeId:t,getStoreItems:n,onChange:i,onEnd:o}){const s=Pn(e);let l={controlDirection:V2("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function c({controlPosition:h,boundaries:p,keepAspectRatio:m,resizeDirection:g,onResizeStart:v,onResize:_,onResizeEnd:E,shouldResize:S}){let w={...t5},N={...T7};l={boundaries:p,resizeDirection:g,keepAspectRatio:m,controlDirection:V2(h)};let C,k=null,M=[],R,O,I,V=!1;const K=dj().on("start",H=>{const{nodeLookup:F,transform:X,snapGrid:L,snapToGrid:B,nodeOrigin:z,paneDomNode:U}=n();if(C=F.get(t),!C)return;k=(U==null?void 0:U.getBoundingClientRect())??null;const{xSnapped:G,ySnapped:Q}=El(H.sourceEvent,{transform:X,snapGrid:L,snapToGrid:B,containerBounds:k});w={width:C.measured.width??0,height:C.measured.height??0,x:C.position.x??0,y:C.position.y??0},N={...w,pointerX:G,pointerY:Q,aspectRatio:w.width/w.height},R=void 0,C.parentId&&(C.extent==="parent"||C.expandParent)&&(R=F.get(C.parentId),O=R&&C.extent==="parent"?A7(R):void 0),M=[],I=void 0;for(const[j,D]of F)if(D.parentId===t&&(M.push({id:j,position:{...D.position},extent:D.extent}),D.extent==="parent"||D.expandParent)){const $=R7(D,C,D.origin??z);I?I=[[Math.min($[0][0],I[0][0]),Math.min($[0][1],I[0][1])],[Math.max($[1][0],I[1][0]),Math.max($[1][1],I[1][1])]]:I=$}v==null||v(H,{...w})}).on("drag",H=>{const{transform:F,snapGrid:X,snapToGrid:L,nodeOrigin:B}=n(),z=El(H.sourceEvent,{transform:F,snapGrid:X,snapToGrid:L,containerBounds:k}),U=[];if(!C)return;const{x:G,y:Q,width:j,height:D}=w,$={},q=C.origin??B,{width:Y,height:Z,x:W,y:te}=k7(N,l.controlDirection,z,l.boundaries,l.keepAspectRatio,q,O,I),re=Y!==j,se=Z!==D,me=W!==G&&re,be=te!==Q&&se;if(!me&&!be&&!re&&!se)return;if((me||be||q[0]===1||q[1]===1)&&($.x=me?W:w.x,$.y=be?te:w.y,w.x=$.x,w.y=$.y,M.length>0)){const Ne=W-G,Oe=te-Q;for(const Te of M)Te.position={x:Te.position.x-Ne+q[0]*(Y-j),y:Te.position.y-Oe+q[1]*(Z-D)},U.push(Te)}if((re||se)&&($.width=re&&(!l.resizeDirection||l.resizeDirection==="horizontal")?Y:w.width,$.height=se&&(!l.resizeDirection||l.resizeDirection==="vertical")?Z:w.height,w.width=$.width,w.height=$.height),R&&C.expandParent){const Ne=q[0]*($.width??0);$.x&&$.x<Ne&&(w.x=Ne,N.x=N.x-($.x-Ne));const Oe=q[1]*($.height??0);$.y&&$.y<Oe&&(w.y=Oe,N.y=N.y-($.y-Oe))}const ve=N7({width:w.width,prevWidth:j,height:w.height,prevHeight:D,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),we={...w,direction:ve};(S==null?void 0:S(H,we))!==!1&&(V=!0,_==null||_(H,we),i($,U))}).on("end",H=>{V&&(E==null||E(H,{...w}),o==null||o({...w}),V=!1)});s.call(K)}function f(){s.on(".drag",null)}return{update:c,destroy:f}}var Yp={exports:{}},Gp={},Xp={exports:{}},Kp={};/**
352
+ * @license React
353
+ * use-sync-external-store-shim.production.js
354
+ *
355
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
356
+ *
357
+ * This source code is licensed under the MIT license found in the
358
+ * LICENSE file in the root directory of this source tree.
359
+ */var $2;function j7(){if($2)return Kp;$2=1;var e=Ul();function t(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,o=e.useEffect,s=e.useLayoutEffect,l=e.useDebugValue;function c(m,g){var v=g(),_=i({inst:{value:v,getSnapshot:g}}),E=_[0].inst,S=_[1];return s(function(){E.value=v,E.getSnapshot=g,f(E)&&S({inst:E})},[m,v,g]),o(function(){return f(E)&&S({inst:E}),m(function(){f(E)&&S({inst:E})})},[m]),l(v),v}function f(m){var g=m.getSnapshot;m=m.value;try{var v=g();return!n(m,v)}catch{return!0}}function h(m,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:c;return Kp.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Kp}var Y2;function O7(){return Y2||(Y2=1,Xp.exports=j7()),Xp.exports}/**
360
+ * @license React
361
+ * use-sync-external-store-shim/with-selector.production.js
362
+ *
363
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
364
+ *
365
+ * This source code is licensed under the MIT license found in the
366
+ * LICENSE file in the root directory of this source tree.
367
+ */var G2;function z7(){if(G2)return Gp;G2=1;var e=Ul(),t=O7();function n(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var i=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,s=e.useRef,l=e.useEffect,c=e.useMemo,f=e.useDebugValue;return Gp.useSyncExternalStoreWithSelector=function(h,p,m,g,v){var _=s(null);if(_.current===null){var E={hasValue:!1,value:null};_.current=E}else E=_.current;_=c(function(){function w(R){if(!N){if(N=!0,C=R,R=g(R),v!==void 0&&E.hasValue){var O=E.value;if(v(O,R))return k=O}return k=R}if(O=k,i(C,R))return O;var I=g(R);return v!==void 0&&v(O,I)?(C=R,O):(C=R,k=I)}var N=!1,C,k,M=m===void 0?null:m;return[function(){return w(p())},M===null?void 0:function(){return w(M())}]},[p,m,g,v]);var S=o(h,_[0],_[1]);return l(function(){E.hasValue=!0,E.value=S},[S]),f(S),S},Gp}var X2;function D7(){return X2||(X2=1,Yp.exports=z7()),Yp.exports}var L7=D7();const q7=Hl(L7),I7={},K2=e=>{let t;const n=new Set,i=(p,m)=>{const g=typeof p=="function"?p(t):p;if(!Object.is(g,t)){const v=t;t=m??(typeof g!="object"||g===null)?g:Object.assign({},t,g),n.forEach(_=>_(t,v))}},o=()=>t,f={setState:i,getState:o,getInitialState:()=>h,subscribe:p=>(n.add(p),()=>n.delete(p)),destroy:()=>{(I7?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},h=t=e(i,o,f);return f},B7=e=>e?K2(e):K2,{useDebugValue:H7}=HM,{useSyncExternalStoreWithSelector:U7}=q7,P7=e=>e;function n5(e,t=P7,n){const i=U7(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return H7(i),i}const Q2=(e,t)=>{const n=B7(e),i=(o,s=t)=>n5(n,o,s);return Object.assign(i,n),i},V7=(e,t)=>e?Q2(e,t):Q2;function Mt(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,o]of e)if(!Object.is(o,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const i of n)if(!Object.prototype.hasOwnProperty.call(t,i)||!Object.is(e[i],t[i]))return!1;return!0}const Vf=T.createContext(null),F7=Vf.Provider,r5=Sr.error001();function it(e,t){const n=T.useContext(Vf);if(n===null)throw new Error(r5);return n5(n,e,t)}function Lt(){const e=T.useContext(Vf);if(e===null)throw new Error(r5);return T.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Z2={display:"none"},$7={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},i5="react-flow__node-desc",a5="react-flow__edge-desc",Y7="react-flow__aria-live",G7=e=>e.ariaLiveMessage,X7=e=>e.ariaLabelConfig;function K7({rfId:e}){const t=it(G7);return b.jsx("div",{id:`${Y7}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:$7,children:t})}function Q7({rfId:e,disableKeyboardA11y:t}){const n=it(X7);return b.jsxs(b.Fragment,{children:[b.jsx("div",{id:`${i5}-${e}`,style:Z2,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),b.jsx("div",{id:`${a5}-${e}`,style:Z2,children:n["edge.a11yDescription.default"]}),!t&&b.jsx(K7,{rfId:e})]})}const Ff=T.forwardRef(({position:e="top-left",children:t,className:n,style:i,...o},s)=>{const l=`${e}`.split("-");return b.jsx("div",{className:Wt(["react-flow__panel",n,...l]),style:i,ref:s,...o,children:t})});Ff.displayName="Panel";function Z7({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:b.jsx(Ff,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:b.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const W7=e=>{const t=[],n=[];for(const[,i]of e.nodeLookup)i.selected&&t.push(i.internals.userNode);for(const[,i]of e.edgeLookup)i.selected&&n.push(i);return{selectedNodes:t,selectedEdges:n}},zc=e=>e.id;function J7(e,t){return Mt(e.selectedNodes.map(zc),t.selectedNodes.map(zc))&&Mt(e.selectedEdges.map(zc),t.selectedEdges.map(zc))}function eP({onSelectionChange:e}){const t=Lt(),{selectedNodes:n,selectedEdges:i}=it(W7,J7);return T.useEffect(()=>{const o={nodes:n,edges:i};e==null||e(o),t.getState().onSelectionChangeHandlers.forEach(s=>s(o))},[n,i,e]),null}const tP=e=>!!e.onSelectionChangeHandlers;function nP({onSelectionChange:e}){const t=it(tP);return e||t?b.jsx(eP,{onSelectionChange:e}):null}const o5=[0,0],rP={x:0,y:0,zoom:1},iP=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],W2=[...iP,"rfId"],aP=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),J2={translateExtent:zl,nodeOrigin:o5,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function oP(e){const{setNodes:t,setEdges:n,setMinZoom:i,setMaxZoom:o,setTranslateExtent:s,setNodeExtent:l,reset:c,setDefaultNodesAndEdges:f}=it(aP,Mt),h=Lt();T.useEffect(()=>(f(e.defaultNodes,e.defaultEdges),()=>{p.current=J2,c()}),[]);const p=T.useRef(J2);return T.useEffect(()=>{for(const m of W2){const g=e[m],v=p.current[m];g!==v&&(typeof e[m]>"u"||(m==="nodes"?t(g):m==="edges"?n(g):m==="minZoom"?i(g):m==="maxZoom"?o(g):m==="translateExtent"?s(g):m==="nodeExtent"?l(g):m==="ariaLabelConfig"?h.setState({ariaLabelConfig:VU(g)}):m==="fitView"?h.setState({fitViewQueued:g}):m==="fitViewOptions"?h.setState({fitViewOptions:g}):h.setState({[m]:g})))}p.current=e},W2.map(m=>e[m])),null}function eC(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function sP(e){var i;const[t,n]=T.useState(e==="system"?null:e);return T.useEffect(()=>{if(e!=="system"){n(e);return}const o=eC(),s=()=>n(o!=null&&o.matches?"dark":"light");return s(),o==null||o.addEventListener("change",s),()=>{o==null||o.removeEventListener("change",s)}},[e]),t!==null?t:(i=eC())!=null&&i.matches?"dark":"light"}const tC=typeof document<"u"?document:null;function Il(e=null,t={target:tC,actInsideInputWithModifier:!0}){const[n,i]=T.useState(!1),o=T.useRef(!1),s=T.useRef(new Set([])),[l,c]=T.useMemo(()=>{if(e!==null){const h=(Array.isArray(e)?e:[e]).filter(m=>typeof m=="string").map(m=>m.replace("+",`
368
+ `).replace(`
369
+
370
+ `,`
371
+ +`).split(`
372
+ `)),p=h.reduce((m,g)=>m.concat(...g),[]);return[h,p]}return[[],[]]},[e]);return T.useEffect(()=>{const f=(t==null?void 0:t.target)??tC,h=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const p=v=>{var S,w;if(o.current=v.ctrlKey||v.metaKey||v.shiftKey||v.altKey,(!o.current||o.current&&!h)&&Hj(v))return!1;const E=rC(v.code,c);if(s.current.add(v[E]),nC(l,s.current,!1)){const N=((w=(S=v.composedPath)==null?void 0:S.call(v))==null?void 0:w[0])||v.target,C=(N==null?void 0:N.nodeName)==="BUTTON"||(N==null?void 0:N.nodeName)==="A";t.preventDefault!==!1&&(o.current||!C)&&v.preventDefault(),i(!0)}},m=v=>{const _=rC(v.code,c);nC(l,s.current,!0)?(i(!1),s.current.clear()):s.current.delete(v[_]),v.key==="Meta"&&s.current.clear(),o.current=!1},g=()=>{s.current.clear(),i(!1)};return f==null||f.addEventListener("keydown",p),f==null||f.addEventListener("keyup",m),window.addEventListener("blur",g),window.addEventListener("contextmenu",g),()=>{f==null||f.removeEventListener("keydown",p),f==null||f.removeEventListener("keyup",m),window.removeEventListener("blur",g),window.removeEventListener("contextmenu",g)}}},[e,i]),n}function nC(e,t,n){return e.filter(i=>n||i.length===t.size).some(i=>i.every(o=>t.has(o)))}function rC(e,t){return t.includes(e)?"code":"key"}const lP=()=>{const e=Lt();return T.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:t==null?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:i}=e.getState();return i?i.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[i,o,s],panZoom:l}=e.getState();return l?(await l.setViewport({x:t.x??i,y:t.y??o,zoom:t.zoom??s},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,i]=e.getState().transform;return{x:t,y:n,zoom:i}},setCenter:async(t,n,i)=>e.getState().setCenter(t,n,i),fitBounds:async(t,n)=>{const{width:i,height:o,minZoom:s,maxZoom:l,panZoom:c}=e.getState(),f=Xb(t,i,o,s,l,(n==null?void 0:n.padding)??.1);return c?(await c.setViewport(f,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:i,snapGrid:o,snapToGrid:s,domNode:l}=e.getState();if(!l)return t;const{x:c,y:f}=l.getBoundingClientRect(),h={x:t.x-c,y:t.y-f},p=n.snapGrid??o,m=n.snapToGrid??s;return Kl(h,i,m,p)},flowToScreenPosition:t=>{const{transform:n,domNode:i}=e.getState();if(!i)return t;const{x:o,y:s}=i.getBoundingClientRect(),l=_f(t,n);return{x:l.x+o,y:l.y+s}}}),[])};function s5(e,t){const n=[],i=new Map,o=[];for(const s of e)if(s.type==="add"){o.push(s);continue}else if(s.type==="remove"||s.type==="replace")i.set(s.id,[s]);else{const l=i.get(s.id);l?l.push(s):i.set(s.id,[s])}for(const s of t){const l=i.get(s.id);if(!l){n.push(s);continue}if(l[0].type==="remove")continue;if(l[0].type==="replace"){n.push({...l[0].item});continue}const c={...s};for(const f of l)uP(f,c);n.push(c)}return o.length&&o.forEach(s=>{s.index!==void 0?n.splice(s.index,0,{...s.item}):n.push({...s.item})}),n}function uP(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function l5(e,t){return s5(e,t)}function u5(e,t){return s5(e,t)}function Ra(e,t){return{id:e,type:"select",selected:t}}function zo(e,t=new Set,n=!1){const i=[];for(const[o,s]of e){const l=t.has(o);!(s.selected===void 0&&!l)&&s.selected!==l&&(n&&(s.selected=l),i.push(Ra(s.id,l)))}return i}function iC({items:e=[],lookup:t}){var o;const n=[],i=new Map(e.map(s=>[s.id,s]));for(const[s,l]of e.entries()){const c=t.get(l.id),f=((o=c==null?void 0:c.internals)==null?void 0:o.userNode)??c;f!==void 0&&f!==l&&n.push({id:l.id,item:l,type:"replace"}),f===void 0&&n.push({item:l,type:"add",index:s})}for(const[s]of t)i.get(s)===void 0&&n.push({id:s,type:"remove"});return n}function aC(e){return{id:e.id,type:"remove"}}const oC=e=>OU(e),cP=e=>jj(e);function c5(e){return T.forwardRef(e)}const fP=typeof window<"u"?T.useLayoutEffect:T.useEffect;function sC(e){const[t,n]=T.useState(BigInt(0)),[i]=T.useState(()=>dP(()=>n(o=>o+BigInt(1))));return fP(()=>{const o=i.get();o.length&&(e(o),i.reset())},[t]),i}function dP(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const f5=T.createContext(null);function hP({children:e}){const t=Lt(),n=T.useCallback(c=>{const{nodes:f=[],setNodes:h,hasDefaultNodes:p,onNodesChange:m,nodeLookup:g,fitViewQueued:v,onNodesChangeMiddlewareMap:_}=t.getState();let E=f;for(const w of c)E=typeof w=="function"?w(E):w;let S=iC({items:E,lookup:g});for(const w of _.values())S=w(S);p&&h(E),S.length>0?m==null||m(S):v&&window.requestAnimationFrame(()=>{const{fitViewQueued:w,nodes:N,setNodes:C}=t.getState();w&&C(N)})},[]),i=sC(n),o=T.useCallback(c=>{const{edges:f=[],setEdges:h,hasDefaultEdges:p,onEdgesChange:m,edgeLookup:g}=t.getState();let v=f;for(const _ of c)v=typeof _=="function"?_(v):_;p?h(v):m&&m(iC({items:v,lookup:g}))},[]),s=sC(o),l=T.useMemo(()=>({nodeQueue:i,edgeQueue:s}),[]);return b.jsx(f5.Provider,{value:l,children:e})}function pP(){const e=T.useContext(f5);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const mP=e=>!!e.panZoom;function Ha(){const e=lP(),t=Lt(),n=pP(),i=it(mP),o=T.useMemo(()=>{const s=m=>t.getState().nodeLookup.get(m),l=m=>{n.nodeQueue.push(m)},c=m=>{n.edgeQueue.push(m)},f=m=>{var w,N;const{nodeLookup:g,nodeOrigin:v}=t.getState(),_=oC(m)?m:g.get(m.id),E=_.parentId?Ij(_.position,_.measured,_.parentId,g,v):_.position,S={..._,position:E,width:((w=_.measured)==null?void 0:w.width)??_.width,height:((N=_.measured)==null?void 0:N.height)??_.height};return $o(S)},h=(m,g,v={replace:!1})=>{l(_=>_.map(E=>{if(E.id===m){const S=typeof g=="function"?g(E):g;return v.replace&&oC(S)?S:{...E,...S}}return E}))},p=(m,g,v={replace:!1})=>{c(_=>_.map(E=>{if(E.id===m){const S=typeof g=="function"?g(E):g;return v.replace&&cP(S)?S:{...E,...S}}return E}))};return{getNodes:()=>t.getState().nodes.map(m=>({...m})),getNode:m=>{var g;return(g=s(m))==null?void 0:g.internals.userNode},getInternalNode:s,getEdges:()=>{const{edges:m=[]}=t.getState();return m.map(g=>({...g}))},getEdge:m=>t.getState().edgeLookup.get(m),setNodes:l,setEdges:c,addNodes:m=>{const g=Array.isArray(m)?m:[m];n.nodeQueue.push(v=>[...v,...g])},addEdges:m=>{const g=Array.isArray(m)?m:[m];n.edgeQueue.push(v=>[...v,...g])},toObject:()=>{const{nodes:m=[],edges:g=[],transform:v}=t.getState(),[_,E,S]=v;return{nodes:m.map(w=>({...w})),edges:g.map(w=>({...w})),viewport:{x:_,y:E,zoom:S}}},deleteElements:async({nodes:m=[],edges:g=[]})=>{const{nodes:v,edges:_,onNodesDelete:E,onEdgesDelete:S,triggerNodeChanges:w,triggerEdgeChanges:N,onDelete:C,onBeforeDelete:k}=t.getState(),{nodes:M,edges:R}=await IU({nodesToRemove:m,edgesToRemove:g,nodes:v,edges:_,onBeforeDelete:k}),O=R.length>0,I=M.length>0;if(O){const V=R.map(aC);S==null||S(R),N(V)}if(I){const V=M.map(aC);E==null||E(M),w(V)}return(I||O)&&(C==null||C({nodes:M,edges:R})),{deletedNodes:M,deletedEdges:R}},getIntersectingNodes:(m,g=!0,v)=>{const _=j2(m),E=_?m:f(m),S=v!==void 0;return E?(v||t.getState().nodes).filter(w=>{const N=t.getState().nodeLookup.get(w.id);if(N&&!_&&(w.id===m.id||!N.internals.positionAbsolute))return!1;const C=$o(S?w:N),k=Ll(C,E);return g&&k>0||k>=C.width*C.height||k>=E.width*E.height}):[]},isNodeIntersecting:(m,g,v=!0)=>{const E=j2(m)?m:f(m);if(!E)return!1;const S=Ll(E,g);return v&&S>0||S>=g.width*g.height||S>=E.width*E.height},updateNode:h,updateNodeData:(m,g,v={replace:!1})=>{h(m,_=>{const E=typeof g=="function"?g(_):g;return v.replace?{..._,data:E}:{..._,data:{..._.data,...E}}},v)},updateEdge:p,updateEdgeData:(m,g,v={replace:!1})=>{p(m,_=>{const E=typeof g=="function"?g(_):g;return v.replace?{..._,data:E}:{..._,data:{..._.data,...E}}},v)},getNodesBounds:m=>{const{nodeLookup:g,nodeOrigin:v}=t.getState();return zU(m,{nodeLookup:g,nodeOrigin:v})},getHandleConnections:({type:m,id:g,nodeId:v})=>{var _;return Array.from(((_=t.getState().connectionLookup.get(`${v}-${m}${g?`-${g}`:""}`))==null?void 0:_.values())??[])},getNodeConnections:({type:m,handleId:g,nodeId:v})=>{var _;return Array.from(((_=t.getState().connectionLookup.get(`${v}${m?g?`-${m}-${g}`:`-${m}`:""}`))==null?void 0:_.values())??[])},fitView:async m=>{const g=t.getState().fitViewResolver??PU();return t.setState({fitViewQueued:!0,fitViewOptions:m,fitViewResolver:g}),n.nodeQueue.push(v=>[...v]),g.promise}}},[]);return T.useMemo(()=>({...o,...e,viewportInitialized:i}),[i])}const lC=e=>e.selected,gP=typeof window<"u"?window:void 0;function yP({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Lt(),{deleteElements:i}=Ha(),o=Il(e,{actInsideInputWithModifier:!1}),s=Il(t,{target:gP});T.useEffect(()=>{if(o){const{edges:l,nodes:c}=n.getState();i({nodes:c.filter(lC),edges:l.filter(lC)}),n.setState({nodesSelectionActive:!1})}},[o]),T.useEffect(()=>{n.setState({multiSelectionActive:s})},[s])}function vP(e){const t=Lt();T.useEffect(()=>{const n=()=>{var o,s,l,c;if(!e.current||!(((s=(o=e.current).checkVisibility)==null?void 0:s.call(o))??!0))return!1;const i=Kb(e.current);(i.height===0||i.width===0)&&((c=(l=t.getState()).onError)==null||c.call(l,"004",Sr.error004())),t.setState({width:i.width||500,height:i.height||500})};if(e.current){n(),window.addEventListener("resize",n);const i=new ResizeObserver(()=>n());return i.observe(e.current),()=>{window.removeEventListener("resize",n),i&&e.current&&i.unobserve(e.current)}}},[])}const $f={position:"absolute",width:"100%",height:"100%",top:0,left:0},xP=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function bP({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:i=!1,panOnScrollSpeed:o=.5,panOnScrollMode:s=za.Free,zoomOnDoubleClick:l=!0,panOnDrag:c=!0,defaultViewport:f,translateExtent:h,minZoom:p,maxZoom:m,zoomActivationKeyCode:g,preventScrolling:v=!0,children:_,noWheelClassName:E,noPanClassName:S,onViewportChange:w,isControlledViewport:N,paneClickDistance:C,selectionOnDrag:k}){const M=Lt(),R=T.useRef(null),{userSelectionActive:O,lib:I,connectionInProgress:V}=it(xP,Mt),K=Il(g),H=T.useRef();vP(R);const F=T.useCallback(X=>{w==null||w({x:X[0],y:X[1],zoom:X[2]}),N||M.setState({transform:X})},[w,N]);return T.useEffect(()=>{if(R.current){H.current=C7({domNode:R.current,minZoom:p,maxZoom:m,translateExtent:h,viewport:f,onDraggingChange:z=>M.setState(U=>U.paneDragging===z?U:{paneDragging:z}),onPanZoomStart:(z,U)=>{const{onViewportChangeStart:G,onMoveStart:Q}=M.getState();Q==null||Q(z,U),G==null||G(U)},onPanZoom:(z,U)=>{const{onViewportChange:G,onMove:Q}=M.getState();Q==null||Q(z,U),G==null||G(U)},onPanZoomEnd:(z,U)=>{const{onViewportChangeEnd:G,onMoveEnd:Q}=M.getState();Q==null||Q(z,U),G==null||G(U)}});const{x:X,y:L,zoom:B}=H.current.getViewport();return M.setState({panZoom:H.current,transform:[X,L,B],domNode:R.current.closest(".react-flow")}),()=>{var z;(z=H.current)==null||z.destroy()}}},[]),T.useEffect(()=>{var X;(X=H.current)==null||X.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:i,panOnScrollSpeed:o,panOnScrollMode:s,zoomOnDoubleClick:l,panOnDrag:c,zoomActivationKeyPressed:K,preventScrolling:v,noPanClassName:S,userSelectionActive:O,noWheelClassName:E,lib:I,onTransformChange:F,connectionInProgress:V,selectionOnDrag:k,paneClickDistance:C})},[e,t,n,i,o,s,l,c,K,v,S,O,E,I,F,V,k,C]),b.jsx("div",{className:"react-flow__renderer",ref:R,style:$f,children:_})}const wP=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function _P(){const{userSelectionActive:e,userSelectionRect:t}=it(wP,Mt);return e&&t?b.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const Qp=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},SP=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function EP({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Dl.Full,panOnDrag:i,paneClickDistance:o,selectionOnDrag:s,onSelectionStart:l,onSelectionEnd:c,onPaneClick:f,onPaneContextMenu:h,onPaneScroll:p,onPaneMouseEnter:m,onPaneMouseMove:g,onPaneMouseLeave:v,children:_}){const E=Lt(),{userSelectionActive:S,elementsSelectable:w,dragging:N,connectionInProgress:C}=it(SP,Mt),k=w&&(e||S),M=T.useRef(null),R=T.useRef(),O=T.useRef(new Set),I=T.useRef(new Set),V=T.useRef(!1),K=G=>{if(V.current||C){V.current=!1;return}f==null||f(G),E.getState().resetSelectedElements(),E.setState({nodesSelectionActive:!1})},H=G=>{if(Array.isArray(i)&&(i!=null&&i.includes(2))){G.preventDefault();return}h==null||h(G)},F=p?G=>p(G):void 0,X=G=>{V.current&&(G.stopPropagation(),V.current=!1)},L=G=>{var Z,W;const{domNode:Q}=E.getState();if(R.current=Q==null?void 0:Q.getBoundingClientRect(),!R.current)return;const j=G.target===M.current;if(!j&&!!G.target.closest(".nokey")||!e||!(s&&j||t)||G.button!==0||!G.isPrimary)return;(W=(Z=G.target)==null?void 0:Z.setPointerCapture)==null||W.call(Z,G.pointerId),V.current=!1;const{x:q,y:Y}=wr(G.nativeEvent,R.current);E.setState({userSelectionRect:{width:0,height:0,startX:q,startY:Y,x:q,y:Y}}),j||(G.stopPropagation(),G.preventDefault())},B=G=>{const{userSelectionRect:Q,transform:j,nodeLookup:D,edgeLookup:$,connectionLookup:q,triggerNodeChanges:Y,triggerEdgeChanges:Z,defaultEdgeOptions:W,resetSelectedElements:te}=E.getState();if(!R.current||!Q)return;const{x:re,y:se}=wr(G.nativeEvent,R.current),{startX:me,startY:be}=Q;if(!V.current){const Oe=t?0:o;if(Math.hypot(re-me,se-be)<=Oe)return;te(),l==null||l(G)}V.current=!0;const ve={startX:me,startY:be,x:re<me?re:me,y:se<be?se:be,width:Math.abs(re-me),height:Math.abs(se-be)},we=O.current,ke=I.current;O.current=new Set(Gb(D,ve,j,n===Dl.Partial,!0).map(Oe=>Oe.id)),I.current=new Set;const Ne=(W==null?void 0:W.selectable)??!0;for(const Oe of O.current){const Te=q.get(Oe);if(Te)for(const{edgeId:_t}of Te.values()){const he=$.get(_t);he&&(he.selectable??Ne)&&I.current.add(_t)}}if(!O2(we,O.current)){const Oe=zo(D,O.current,!0);Y(Oe)}if(!O2(ke,I.current)){const Oe=zo($,I.current);Z(Oe)}E.setState({userSelectionRect:ve,userSelectionActive:!0,nodesSelectionActive:!1})},z=G=>{var Q,j;G.button===0&&((j=(Q=G.target)==null?void 0:Q.releasePointerCapture)==null||j.call(Q,G.pointerId),!S&&G.target===M.current&&E.getState().userSelectionRect&&(K==null||K(G)),E.setState({userSelectionActive:!1,userSelectionRect:null}),V.current&&(c==null||c(G),E.setState({nodesSelectionActive:O.current.size>0})))},U=i===!0||Array.isArray(i)&&i.includes(0);return b.jsxs("div",{className:Wt(["react-flow__pane",{draggable:U,dragging:N,selection:e}]),onClick:k?void 0:Qp(K,M),onContextMenu:Qp(H,M),onWheel:Qp(F,M),onPointerEnter:k?void 0:m,onPointerMove:k?B:g,onPointerUp:k?z:void 0,onPointerDownCapture:k?L:void 0,onClickCapture:k?X:void 0,onPointerLeave:v,ref:M,style:$f,children:[_,b.jsx(_P,{})]})}function ib({id:e,store:t,unselect:n=!1,nodeRef:i}){const{addSelectedNodes:o,unselectNodesAndEdges:s,multiSelectionActive:l,nodeLookup:c,onError:f}=t.getState(),h=c.get(e);if(!h){f==null||f("012",Sr.error012(e));return}t.setState({nodesSelectionActive:!1}),h.selected?(n||h.selected&&l)&&(s({nodes:[h],edges:[]}),requestAnimationFrame(()=>{var p;return(p=i==null?void 0:i.current)==null?void 0:p.blur()})):o([e])}function d5({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:i,nodeId:o,isSelectable:s,nodeClickDistance:l}){const c=Lt(),[f,h]=T.useState(!1),p=T.useRef();return T.useEffect(()=>{p.current=f7({getStoreItems:()=>c.getState(),onNodeMouseDown:m=>{ib({id:m,store:c,nodeRef:e})},onDragStart:()=>{h(!0)},onDragStop:()=>{h(!1)}})},[]),T.useEffect(()=>{if(!(t||!e.current||!p.current))return p.current.update({noDragClassName:n,handleSelector:i,domNode:e.current,isSelectable:s,nodeId:o,nodeClickDistance:l}),()=>{var m;(m=p.current)==null||m.destroy()}},[n,i,t,s,e,o,l]),f}const CP=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function h5(){const e=Lt();return T.useCallback(n=>{const{nodeExtent:i,snapToGrid:o,snapGrid:s,nodesDraggable:l,onError:c,updateNodePositions:f,nodeLookup:h,nodeOrigin:p}=e.getState(),m=new Map,g=CP(l),v=o?s[0]:5,_=o?s[1]:5,E=n.direction.x*v*n.factor,S=n.direction.y*_*n.factor;for(const[,w]of h){if(!g(w))continue;let N={x:w.internals.positionAbsolute.x+E,y:w.internals.positionAbsolute.y+S};o&&(N=Xl(N,s));const{position:C,positionAbsolute:k}=Oj({nodeId:w.id,nextPosition:N,nodeLookup:h,nodeExtent:i,nodeOrigin:p,onError:c});w.position=C,w.internals.positionAbsolute=k,m.set(w.id,w)}f(m)},[])}const t1=T.createContext(null),NP=t1.Provider;t1.Consumer;const n1=()=>T.useContext(t1),kP=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),TP=(e,t,n)=>i=>{const{connectionClickStartHandle:o,connectionMode:s,connection:l}=i,{fromHandle:c,toHandle:f,isValid:h}=l,p=(f==null?void 0:f.nodeId)===e&&(f==null?void 0:f.id)===t&&(f==null?void 0:f.type)===n;return{connectingFrom:(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n,connectingTo:p,clickConnecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===t&&(o==null?void 0:o.type)===n,isPossibleEndHandle:s===Vo.Strict?(c==null?void 0:c.type)!==n:e!==(c==null?void 0:c.nodeId)||t!==(c==null?void 0:c.id),connectionInProcess:!!c,clickConnectionInProcess:!!o,valid:p&&h}};function AP({type:e="source",position:t=Ee.Top,isValidConnection:n,isConnectable:i=!0,isConnectableStart:o=!0,isConnectableEnd:s=!0,id:l,onConnect:c,children:f,className:h,onMouseDown:p,onTouchStart:m,...g},v){var B,z;const _=l||null,E=e==="target",S=Lt(),w=n1(),{connectOnClick:N,noPanClassName:C,rfId:k}=it(kP,Mt),{connectingFrom:M,connectingTo:R,clickConnecting:O,isPossibleEndHandle:I,connectionInProcess:V,clickConnectionInProcess:K,valid:H}=it(TP(w,_,e),Mt);w||(z=(B=S.getState()).onError)==null||z.call(B,"010",Sr.error010());const F=U=>{const{defaultEdgeOptions:G,onConnect:Q,hasDefaultEdges:j}=S.getState(),D={...G,...U};if(j){const{edges:$,setEdges:q}=S.getState();q(KU(D,$))}Q==null||Q(D),c==null||c(D)},X=U=>{if(!w)return;const G=Uj(U.nativeEvent);if(o&&(G&&U.button===0||!G)){const Q=S.getState();rb.onPointerDown(U.nativeEvent,{handleDomNode:U.currentTarget,autoPanOnConnect:Q.autoPanOnConnect,connectionMode:Q.connectionMode,connectionRadius:Q.connectionRadius,domNode:Q.domNode,nodeLookup:Q.nodeLookup,lib:Q.lib,isTarget:E,handleId:_,nodeId:w,flowId:Q.rfId,panBy:Q.panBy,cancelConnection:Q.cancelConnection,onConnectStart:Q.onConnectStart,onConnectEnd:(...j)=>{var D,$;return($=(D=S.getState()).onConnectEnd)==null?void 0:$.call(D,...j)},updateConnection:Q.updateConnection,onConnect:F,isValidConnection:n||((...j)=>{var D,$;return(($=(D=S.getState()).isValidConnection)==null?void 0:$.call(D,...j))??!0}),getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:Q.autoPanSpeed,dragThreshold:Q.connectionDragThreshold})}G?p==null||p(U):m==null||m(U)},L=U=>{const{onClickConnectStart:G,onClickConnectEnd:Q,connectionClickStartHandle:j,connectionMode:D,isValidConnection:$,lib:q,rfId:Y,nodeLookup:Z,connection:W}=S.getState();if(!w||!j&&!o)return;if(!j){G==null||G(U.nativeEvent,{nodeId:w,handleId:_,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:w,type:e,id:_}});return}const te=Bj(U.target),re=n||$,{connection:se,isValid:me}=rb.isValid(U.nativeEvent,{handle:{nodeId:w,id:_,type:e},connectionMode:D,fromNodeId:j.nodeId,fromHandleId:j.id||null,fromType:j.type,isValidConnection:re,flowId:Y,doc:te,lib:q,nodeLookup:Z});me&&se&&F(se);const be=structuredClone(W);delete be.inProgress,be.toPosition=be.toHandle?be.toHandle.position:null,Q==null||Q(U,be),S.setState({connectionClickStartHandle:null})};return b.jsx("div",{"data-handleid":_,"data-nodeid":w,"data-handlepos":t,"data-id":`${k}-${w}-${_}-${e}`,className:Wt(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",C,h,{source:!E,target:E,connectable:i,connectablestart:o,connectableend:s,clickconnecting:O,connectingfrom:M,connectingto:R,valid:H,connectionindicator:i&&(!V||I)&&(V||K?s:o)}]),onMouseDown:X,onTouchStart:X,onClick:N?L:void 0,ref:v,...g,children:f})}const gt=T.memo(c5(AP));function RP({data:e,isConnectable:t,sourcePosition:n=Ee.Bottom}){return b.jsxs(b.Fragment,{children:[e==null?void 0:e.label,b.jsx(gt,{type:"source",position:n,isConnectable:t})]})}function MP({data:e,isConnectable:t,targetPosition:n=Ee.Top,sourcePosition:i=Ee.Bottom}){return b.jsxs(b.Fragment,{children:[b.jsx(gt,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,b.jsx(gt,{type:"source",position:i,isConnectable:t})]})}function jP(){return null}function OP({data:e,isConnectable:t,targetPosition:n=Ee.Top}){return b.jsxs(b.Fragment,{children:[b.jsx(gt,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Sf={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},uC={input:RP,default:MP,output:OP,group:jP};function zP(e){var t,n,i,o;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((i=e.style)==null?void 0:i.width),height:e.height??((o=e.style)==null?void 0:o.height)}}const DP=e=>{const{width:t,height:n,x:i,y:o}=Gl(e.nodeLookup,{filter:s=>!!s.selected});return{width:br(t)?t:null,height:br(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${i}px,${o}px)`}};function LP({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const i=Lt(),{width:o,height:s,transformString:l,userSelectionActive:c}=it(DP,Mt),f=h5(),h=T.useRef(null);T.useEffect(()=>{var v;n||(v=h.current)==null||v.focus({preventScroll:!0})},[n]);const p=!c&&o!==null&&s!==null;if(d5({nodeRef:h,disabled:!p}),!p)return null;const m=e?v=>{const _=i.getState().nodes.filter(E=>E.selected);e(v,_)}:void 0,g=v=>{Object.prototype.hasOwnProperty.call(Sf,v.key)&&(v.preventDefault(),f({direction:Sf[v.key],factor:v.shiftKey?4:1}))};return b.jsx("div",{className:Wt(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l},children:b.jsx("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:m,tabIndex:n?void 0:-1,onKeyDown:n?void 0:g,style:{width:o,height:s}})})}const cC=typeof window<"u"?window:void 0,qP=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function p5({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:l,paneClickDistance:c,deleteKeyCode:f,selectionKeyCode:h,selectionOnDrag:p,selectionMode:m,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:_,panActivationKeyCode:E,zoomActivationKeyCode:S,elementsSelectable:w,zoomOnScroll:N,zoomOnPinch:C,panOnScroll:k,panOnScrollSpeed:M,panOnScrollMode:R,zoomOnDoubleClick:O,panOnDrag:I,defaultViewport:V,translateExtent:K,minZoom:H,maxZoom:F,preventScrolling:X,onSelectionContextMenu:L,noWheelClassName:B,noPanClassName:z,disableKeyboardA11y:U,onViewportChange:G,isControlledViewport:Q}){const{nodesSelectionActive:j,userSelectionActive:D}=it(qP,Mt),$=Il(h,{target:cC}),q=Il(E,{target:cC}),Y=q||I,Z=q||k,W=p&&Y!==!0,te=$||D||W;return yP({deleteKeyCode:f,multiSelectionKeyCode:_}),b.jsx(bP,{onPaneContextMenu:s,elementsSelectable:w,zoomOnScroll:N,zoomOnPinch:C,panOnScroll:Z,panOnScrollSpeed:M,panOnScrollMode:R,zoomOnDoubleClick:O,panOnDrag:!$&&Y,defaultViewport:V,translateExtent:K,minZoom:H,maxZoom:F,zoomActivationKeyCode:S,preventScrolling:X,noWheelClassName:B,noPanClassName:z,onViewportChange:G,isControlledViewport:Q,paneClickDistance:c,selectionOnDrag:W,children:b.jsxs(EP,{onSelectionStart:g,onSelectionEnd:v,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:i,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:l,panOnDrag:Y,isSelecting:!!te,selectionMode:m,selectionKeyPressed:$,paneClickDistance:c,selectionOnDrag:W,children:[e,j&&b.jsx(LP,{onSelectionContextMenu:L,noPanClassName:z,disableKeyboardA11y:U})]})})}p5.displayName="FlowRenderer";const IP=T.memo(p5),BP=e=>t=>e?Gb(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function HP(e){return it(T.useCallback(BP(e),[e]),Mt)}const UP=e=>e.updateNodeInternals;function PP(){const e=it(UP),[t]=T.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const i=new Map;n.forEach(o=>{const s=o.target.getAttribute("data-id");i.set(s,{id:s,nodeElement:o.target,force:!0})}),e(i)}));return T.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function VP({node:e,nodeType:t,hasDimensions:n,resizeObserver:i}){const o=Lt(),s=T.useRef(null),l=T.useRef(null),c=T.useRef(e.sourcePosition),f=T.useRef(e.targetPosition),h=T.useRef(t),p=n&&!!e.internals.handleBounds;return T.useEffect(()=>{s.current&&!e.hidden&&(!p||l.current!==s.current)&&(l.current&&(i==null||i.unobserve(l.current)),i==null||i.observe(s.current),l.current=s.current)},[p,e.hidden]),T.useEffect(()=>()=>{l.current&&(i==null||i.unobserve(l.current),l.current=null)},[]),T.useEffect(()=>{if(s.current){const m=h.current!==t,g=c.current!==e.sourcePosition,v=f.current!==e.targetPosition;(m||g||v)&&(h.current=t,c.current=e.sourcePosition,f.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:s.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),s}function FP({id:e,onClick:t,onMouseEnter:n,onMouseMove:i,onMouseLeave:o,onContextMenu:s,onDoubleClick:l,nodesDraggable:c,elementsSelectable:f,nodesConnectable:h,nodesFocusable:p,resizeObserver:m,noDragClassName:g,noPanClassName:v,disableKeyboardA11y:_,rfId:E,nodeTypes:S,nodeClickDistance:w,onError:N}){const{node:C,internals:k,isParent:M}=it(re=>{const se=re.nodeLookup.get(e),me=re.parentLookup.has(e);return{node:se,internals:se.internals,isParent:me}},Mt);let R=C.type||"default",O=(S==null?void 0:S[R])||uC[R];O===void 0&&(N==null||N("003",Sr.error003(R)),R="default",O=(S==null?void 0:S.default)||uC.default);const I=!!(C.draggable||c&&typeof C.draggable>"u"),V=!!(C.selectable||f&&typeof C.selectable>"u"),K=!!(C.connectable||h&&typeof C.connectable>"u"),H=!!(C.focusable||p&&typeof C.focusable>"u"),F=Lt(),X=qj(C),L=VP({node:C,nodeType:R,hasDimensions:X,resizeObserver:m}),B=d5({nodeRef:L,disabled:C.hidden||!I,noDragClassName:g,handleSelector:C.dragHandle,nodeId:e,isSelectable:V,nodeClickDistance:w}),z=h5();if(C.hidden)return null;const U=gi(C),G=zP(C),Q=V||I||t||n||i||o,j=n?re=>n(re,{...k.userNode}):void 0,D=i?re=>i(re,{...k.userNode}):void 0,$=o?re=>o(re,{...k.userNode}):void 0,q=s?re=>s(re,{...k.userNode}):void 0,Y=l?re=>l(re,{...k.userNode}):void 0,Z=re=>{const{selectNodesOnDrag:se,nodeDragThreshold:me}=F.getState();V&&(!se||!I||me>0)&&ib({id:e,store:F,nodeRef:L}),t&&t(re,{...k.userNode})},W=re=>{if(!(Hj(re.nativeEvent)||_)){if(Tj.includes(re.key)&&V){const se=re.key==="Escape";ib({id:e,store:F,unselect:se,nodeRef:L})}else if(I&&C.selected&&Object.prototype.hasOwnProperty.call(Sf,re.key)){re.preventDefault();const{ariaLabelConfig:se}=F.getState();F.setState({ariaLiveMessage:se["node.a11yDescription.ariaLiveMessage"]({direction:re.key.replace("Arrow","").toLowerCase(),x:~~k.positionAbsolute.x,y:~~k.positionAbsolute.y})}),z({direction:Sf[re.key],factor:re.shiftKey?4:1})}}},te=()=>{var ke;if(_||!((ke=L.current)!=null&&ke.matches(":focus-visible")))return;const{transform:re,width:se,height:me,autoPanOnNodeFocus:be,setCenter:ve}=F.getState();if(!be)return;Gb(new Map([[e,C]]),{x:0,y:0,width:se,height:me},re,!0).length>0||ve(C.position.x+U.width/2,C.position.y+U.height/2,{zoom:re[2]})};return b.jsx("div",{className:Wt(["react-flow__node",`react-flow__node-${R}`,{[v]:I},C.className,{selected:C.selected,selectable:V,parent:M,draggable:I,dragging:B}]),ref:L,style:{zIndex:k.z,transform:`translate(${k.positionAbsolute.x}px,${k.positionAbsolute.y}px)`,pointerEvents:Q?"all":"none",visibility:X?"visible":"hidden",...C.style,...G},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:j,onMouseMove:D,onMouseLeave:$,onContextMenu:q,onClick:Z,onDoubleClick:Y,onKeyDown:H?W:void 0,tabIndex:H?0:void 0,onFocus:H?te:void 0,role:C.ariaRole??(H?"group":void 0),"aria-roledescription":"node","aria-describedby":_?void 0:`${i5}-${E}`,"aria-label":C.ariaLabel,...C.domAttributes,children:b.jsx(NP,{value:e,children:b.jsx(O,{id:e,data:C.data,type:R,positionAbsoluteX:k.positionAbsolute.x,positionAbsoluteY:k.positionAbsolute.y,selected:C.selected??!1,selectable:V,draggable:I,deletable:C.deletable??!0,isConnectable:K,sourcePosition:C.sourcePosition,targetPosition:C.targetPosition,dragging:B,dragHandle:C.dragHandle,zIndex:k.z,parentId:C.parentId,...U})})})}var $P=T.memo(FP);const YP=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function m5(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:i,elementsSelectable:o,onError:s}=it(YP,Mt),l=HP(e.onlyRenderVisibleElements),c=PP();return b.jsx("div",{className:"react-flow__nodes",style:$f,children:l.map(f=>b.jsx($P,{id:f,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:c,nodesDraggable:t,nodesConnectable:n,nodesFocusable:i,elementsSelectable:o,nodeClickDistance:e.nodeClickDistance,onError:s},f))})}m5.displayName="NodeRenderer";const GP=T.memo(m5);function XP(e){return it(T.useCallback(n=>{if(!e)return n.edges.map(o=>o.id);const i=[];if(n.width&&n.height)for(const o of n.edges){const s=n.nodeLookup.get(o.source),l=n.nodeLookup.get(o.target);s&&l&&YU({sourceNode:s,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&i.push(o.id)}return i},[e]),Mt)}const KP=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return b.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},QP=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return b.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},fC={[bf.Arrow]:KP,[bf.ArrowClosed]:QP};function ZP(e){const t=Lt();return T.useMemo(()=>{var o,s;return Object.prototype.hasOwnProperty.call(fC,e)?fC[e]:((s=(o=t.getState()).onError)==null||s.call(o,"009",Sr.error009(e)),null)},[e])}const WP=({id:e,type:t,color:n,width:i=12.5,height:o=12.5,markerUnits:s="strokeWidth",strokeWidth:l,orient:c="auto-start-reverse"})=>{const f=ZP(t);return f?b.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${i}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:c,refX:"0",refY:"0",children:b.jsx(f,{color:n,strokeWidth:l})}):null},g5=({defaultColor:e,rfId:t})=>{const n=it(s=>s.edges),i=it(s=>s.defaultEdgeOptions),o=T.useMemo(()=>e7(n,{id:t,defaultColor:e,defaultMarkerStart:i==null?void 0:i.markerStart,defaultMarkerEnd:i==null?void 0:i.markerEnd}),[n,i,t,e]);return o.length?b.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:b.jsx("defs",{children:o.map(s=>b.jsx(WP,{id:s.id,type:s.type,color:s.color,width:s.width,height:s.height,markerUnits:s.markerUnits,strokeWidth:s.strokeWidth,orient:s.orient},s.id))})}):null};g5.displayName="MarkerDefinitions";var JP=T.memo(g5);function y5({x:e,y:t,label:n,labelStyle:i,labelShowBg:o=!0,labelBgStyle:s,labelBgPadding:l=[2,4],labelBgBorderRadius:c=2,children:f,className:h,...p}){const[m,g]=T.useState({x:1,y:0,width:0,height:0}),v=Wt(["react-flow__edge-textwrapper",h]),_=T.useRef(null);return T.useEffect(()=>{if(_.current){const E=_.current.getBBox();g({x:E.x,y:E.y,width:E.width,height:E.height})}},[n]),n?b.jsxs("g",{transform:`translate(${e-m.width/2} ${t-m.height/2})`,className:v,visibility:m.width?"visible":"hidden",...p,children:[o&&b.jsx("rect",{width:m.width+2*l[0],x:-l[0],y:-l[1],height:m.height+2*l[1],className:"react-flow__edge-textbg",style:s,rx:c,ry:c}),b.jsx("text",{className:"react-flow__edge-text",y:m.height/2,dy:"0.3em",ref:_,style:i,children:n}),f]}):null}y5.displayName="EdgeText";const eV=T.memo(y5);function Yf({path:e,labelX:t,labelY:n,label:i,labelStyle:o,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:f,interactionWidth:h=20,...p}){return b.jsxs(b.Fragment,{children:[b.jsx("path",{...p,d:e,fill:"none",className:Wt(["react-flow__edge-path",p.className])}),h?b.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}):null,i&&br(t)&&br(n)?b.jsx(eV,{x:t,y:n,label:i,labelStyle:o,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:f}):null]})}function dC({pos:e,x1:t,y1:n,x2:i,y2:o}){return e===Ee.Left||e===Ee.Right?[.5*(t+i),n]:[t,.5*(n+o)]}function v5({sourceX:e,sourceY:t,sourcePosition:n=Ee.Bottom,targetX:i,targetY:o,targetPosition:s=Ee.Top}){const[l,c]=dC({pos:n,x1:e,y1:t,x2:i,y2:o}),[f,h]=dC({pos:s,x1:i,y1:o,x2:e,y2:t}),[p,m,g,v]=Pj({sourceX:e,sourceY:t,targetX:i,targetY:o,sourceControlX:l,sourceControlY:c,targetControlX:f,targetControlY:h});return[`M${e},${t} C${l},${c} ${f},${h} ${i},${o}`,p,m,g,v]}function x5(e){return T.memo(({id:t,sourceX:n,sourceY:i,targetX:o,targetY:s,sourcePosition:l,targetPosition:c,label:f,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:_,markerEnd:E,markerStart:S,interactionWidth:w})=>{const[N,C,k]=v5({sourceX:n,sourceY:i,sourcePosition:l,targetX:o,targetY:s,targetPosition:c}),M=e.isInternal?void 0:t;return b.jsx(Yf,{id:M,path:N,labelX:C,labelY:k,label:f,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:_,markerEnd:E,markerStart:S,interactionWidth:w})})}const tV=x5({isInternal:!1}),b5=x5({isInternal:!0});tV.displayName="SimpleBezierEdge";b5.displayName="SimpleBezierEdgeInternal";function w5(e){return T.memo(({id:t,sourceX:n,sourceY:i,targetX:o,targetY:s,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,sourcePosition:v=Ee.Bottom,targetPosition:_=Ee.Top,markerEnd:E,markerStart:S,pathOptions:w,interactionWidth:N})=>{const[C,k,M]=Go({sourceX:n,sourceY:i,sourcePosition:v,targetX:o,targetY:s,targetPosition:_,borderRadius:w==null?void 0:w.borderRadius,offset:w==null?void 0:w.offset,stepPosition:w==null?void 0:w.stepPosition}),R=e.isInternal?void 0:t;return b.jsx(Yf,{id:R,path:C,labelX:k,labelY:M,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:E,markerStart:S,interactionWidth:N})})}const _5=w5({isInternal:!1}),S5=w5({isInternal:!0});_5.displayName="SmoothStepEdge";S5.displayName="SmoothStepEdgeInternal";function E5(e){return T.memo(({id:t,...n})=>{var o;const i=e.isInternal?void 0:t;return b.jsx(_5,{...n,id:i,pathOptions:T.useMemo(()=>{var s;return{borderRadius:0,offset:(s=n.pathOptions)==null?void 0:s.offset}},[(o=n.pathOptions)==null?void 0:o.offset])})})}const nV=E5({isInternal:!1}),C5=E5({isInternal:!0});nV.displayName="StepEdge";C5.displayName="StepEdgeInternal";function N5(e){return T.memo(({id:t,sourceX:n,sourceY:i,targetX:o,targetY:s,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:_,interactionWidth:E})=>{const[S,w,N]=Fj({sourceX:n,sourceY:i,targetX:o,targetY:s}),C=e.isInternal?void 0:t;return b.jsx(Yf,{id:C,path:S,labelX:w,labelY:N,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:_,interactionWidth:E})})}const rV=N5({isInternal:!1}),k5=N5({isInternal:!0});rV.displayName="StraightEdge";k5.displayName="StraightEdgeInternal";function T5(e){return T.memo(({id:t,sourceX:n,sourceY:i,targetX:o,targetY:s,sourcePosition:l=Ee.Bottom,targetPosition:c=Ee.Top,label:f,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:_,markerEnd:E,markerStart:S,pathOptions:w,interactionWidth:N})=>{const[C,k,M]=ns({sourceX:n,sourceY:i,sourcePosition:l,targetX:o,targetY:s,targetPosition:c,curvature:w==null?void 0:w.curvature}),R=e.isInternal?void 0:t;return b.jsx(Yf,{id:R,path:C,labelX:k,labelY:M,label:f,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:_,markerEnd:E,markerStart:S,interactionWidth:N})})}const iV=T5({isInternal:!1}),A5=T5({isInternal:!0});iV.displayName="BezierEdge";A5.displayName="BezierEdgeInternal";const hC={default:A5,straight:k5,step:C5,smoothstep:S5,simplebezier:b5},pC={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},aV=(e,t,n)=>n===Ee.Left?e-t:n===Ee.Right?e+t:e,oV=(e,t,n)=>n===Ee.Top?e-t:n===Ee.Bottom?e+t:e,mC="react-flow__edgeupdater";function gC({position:e,centerX:t,centerY:n,radius:i=10,onMouseDown:o,onMouseEnter:s,onMouseOut:l,type:c}){return b.jsx("circle",{onMouseDown:o,onMouseEnter:s,onMouseOut:l,className:Wt([mC,`${mC}-${c}`]),cx:aV(t,i,e),cy:oV(n,i,e),r:i,stroke:"transparent",fill:"transparent"})}function sV({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:i,sourceY:o,targetX:s,targetY:l,sourcePosition:c,targetPosition:f,onReconnect:h,onReconnectStart:p,onReconnectEnd:m,setReconnecting:g,setUpdateHover:v}){const _=Lt(),E=(k,M)=>{if(k.button!==0)return;const{autoPanOnConnect:R,domNode:O,connectionMode:I,connectionRadius:V,lib:K,onConnectStart:H,cancelConnection:F,nodeLookup:X,rfId:L,panBy:B,updateConnection:z}=_.getState(),U=M.type==="target",G=(D,$)=>{g(!1),m==null||m(D,n,M.type,$)},Q=D=>h==null?void 0:h(n,D),j=(D,$)=>{g(!0),p==null||p(k,n,M.type),H==null||H(D,$)};rb.onPointerDown(k.nativeEvent,{autoPanOnConnect:R,connectionMode:I,connectionRadius:V,domNode:O,handleId:M.id,nodeId:M.nodeId,nodeLookup:X,isTarget:U,edgeUpdaterType:M.type,lib:K,flowId:L,cancelConnection:F,panBy:B,isValidConnection:(...D)=>{var $,q;return((q=($=_.getState()).isValidConnection)==null?void 0:q.call($,...D))??!0},onConnect:Q,onConnectStart:j,onConnectEnd:(...D)=>{var $,q;return(q=($=_.getState()).onConnectEnd)==null?void 0:q.call($,...D)},onReconnectEnd:G,updateConnection:z,getTransform:()=>_.getState().transform,getFromHandle:()=>_.getState().connection.fromHandle,dragThreshold:_.getState().connectionDragThreshold,handleDomNode:k.currentTarget})},S=k=>E(k,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),w=k=>E(k,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),N=()=>v(!0),C=()=>v(!1);return b.jsxs(b.Fragment,{children:[(e===!0||e==="source")&&b.jsx(gC,{position:c,centerX:i,centerY:o,radius:t,onMouseDown:S,onMouseEnter:N,onMouseOut:C,type:"source"}),(e===!0||e==="target")&&b.jsx(gC,{position:f,centerX:s,centerY:l,radius:t,onMouseDown:w,onMouseEnter:N,onMouseOut:C,type:"target"})]})}function lV({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:i,onClick:o,onDoubleClick:s,onContextMenu:l,onMouseEnter:c,onMouseMove:f,onMouseLeave:h,reconnectRadius:p,onReconnect:m,onReconnectStart:g,onReconnectEnd:v,rfId:_,edgeTypes:E,noPanClassName:S,onError:w,disableKeyboardA11y:N}){let C=it(ve=>ve.edgeLookup.get(e));const k=it(ve=>ve.defaultEdgeOptions);C=k?{...k,...C}:C;let M=C.type||"default",R=(E==null?void 0:E[M])||hC[M];R===void 0&&(w==null||w("011",Sr.error011(M)),M="default",R=(E==null?void 0:E.default)||hC.default);const O=!!(C.focusable||t&&typeof C.focusable>"u"),I=typeof m<"u"&&(C.reconnectable||n&&typeof C.reconnectable>"u"),V=!!(C.selectable||i&&typeof C.selectable>"u"),K=T.useRef(null),[H,F]=T.useState(!1),[X,L]=T.useState(!1),B=Lt(),{zIndex:z,sourceX:U,sourceY:G,targetX:Q,targetY:j,sourcePosition:D,targetPosition:$}=it(T.useCallback(ve=>{const we=ve.nodeLookup.get(C.source),ke=ve.nodeLookup.get(C.target);if(!we||!ke)return{zIndex:C.zIndex,...pC};const Ne=JU({id:e,sourceNode:we,targetNode:ke,sourceHandle:C.sourceHandle||null,targetHandle:C.targetHandle||null,connectionMode:ve.connectionMode,onError:w});return{zIndex:$U({selected:C.selected,zIndex:C.zIndex,sourceNode:we,targetNode:ke,elevateOnSelect:ve.elevateEdgesOnSelect,zIndexMode:ve.zIndexMode}),...Ne||pC}},[C.source,C.target,C.sourceHandle,C.targetHandle,C.selected,C.zIndex]),Mt),q=T.useMemo(()=>C.markerStart?`url('#${tb(C.markerStart,_)}')`:void 0,[C.markerStart,_]),Y=T.useMemo(()=>C.markerEnd?`url('#${tb(C.markerEnd,_)}')`:void 0,[C.markerEnd,_]);if(C.hidden||U===null||G===null||Q===null||j===null)return null;const Z=ve=>{var Oe;const{addSelectedEdges:we,unselectNodesAndEdges:ke,multiSelectionActive:Ne}=B.getState();V&&(B.setState({nodesSelectionActive:!1}),C.selected&&Ne?(ke({nodes:[],edges:[C]}),(Oe=K.current)==null||Oe.blur()):we([e])),o&&o(ve,C)},W=s?ve=>{s(ve,{...C})}:void 0,te=l?ve=>{l(ve,{...C})}:void 0,re=c?ve=>{c(ve,{...C})}:void 0,se=f?ve=>{f(ve,{...C})}:void 0,me=h?ve=>{h(ve,{...C})}:void 0,be=ve=>{var we;if(!N&&Tj.includes(ve.key)&&V){const{unselectNodesAndEdges:ke,addSelectedEdges:Ne}=B.getState();ve.key==="Escape"?((we=K.current)==null||we.blur(),ke({edges:[C]})):Ne([e])}};return b.jsx("svg",{style:{zIndex:z},children:b.jsxs("g",{className:Wt(["react-flow__edge",`react-flow__edge-${M}`,C.className,S,{selected:C.selected,animated:C.animated,inactive:!V&&!o,updating:H,selectable:V}]),onClick:Z,onDoubleClick:W,onContextMenu:te,onMouseEnter:re,onMouseMove:se,onMouseLeave:me,onKeyDown:O?be:void 0,tabIndex:O?0:void 0,role:C.ariaRole??(O?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":C.ariaLabel===null?void 0:C.ariaLabel||`Edge from ${C.source} to ${C.target}`,"aria-describedby":O?`${a5}-${_}`:void 0,ref:K,...C.domAttributes,children:[!X&&b.jsx(R,{id:e,source:C.source,target:C.target,type:C.type,selected:C.selected,animated:C.animated,selectable:V,deletable:C.deletable??!0,label:C.label,labelStyle:C.labelStyle,labelShowBg:C.labelShowBg,labelBgStyle:C.labelBgStyle,labelBgPadding:C.labelBgPadding,labelBgBorderRadius:C.labelBgBorderRadius,sourceX:U,sourceY:G,targetX:Q,targetY:j,sourcePosition:D,targetPosition:$,data:C.data,style:C.style,sourceHandleId:C.sourceHandle,targetHandleId:C.targetHandle,markerStart:q,markerEnd:Y,pathOptions:"pathOptions"in C?C.pathOptions:void 0,interactionWidth:C.interactionWidth}),I&&b.jsx(sV,{edge:C,isReconnectable:I,reconnectRadius:p,onReconnect:m,onReconnectStart:g,onReconnectEnd:v,sourceX:U,sourceY:G,targetX:Q,targetY:j,sourcePosition:D,targetPosition:$,setUpdateHover:F,setReconnecting:L})]})})}var uV=T.memo(lV);const cV=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function R5({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:i,noPanClassName:o,onReconnect:s,onEdgeContextMenu:l,onEdgeMouseEnter:c,onEdgeMouseMove:f,onEdgeMouseLeave:h,onEdgeClick:p,reconnectRadius:m,onEdgeDoubleClick:g,onReconnectStart:v,onReconnectEnd:_,disableKeyboardA11y:E}){const{edgesFocusable:S,edgesReconnectable:w,elementsSelectable:N,onError:C}=it(cV,Mt),k=XP(t);return b.jsxs("div",{className:"react-flow__edges",children:[b.jsx(JP,{defaultColor:e,rfId:n}),k.map(M=>b.jsx(uV,{id:M,edgesFocusable:S,edgesReconnectable:w,elementsSelectable:N,noPanClassName:o,onReconnect:s,onContextMenu:l,onMouseEnter:c,onMouseMove:f,onMouseLeave:h,onClick:p,reconnectRadius:m,onDoubleClick:g,onReconnectStart:v,onReconnectEnd:_,rfId:n,onError:C,edgeTypes:i,disableKeyboardA11y:E},M))]})}R5.displayName="EdgeRenderer";const fV=T.memo(R5),dV=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function hV({children:e}){const t=it(dV);return b.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function pV(e){const t=Ha(),n=T.useRef(!1);T.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const mV=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function gV(e){const t=it(mV),n=Lt();return T.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function yV(e){return e.connection.inProgress?{...e.connection,to:Kl(e.connection.to,e.transform)}:{...e.connection}}function vV(e){return yV}function xV(e){const t=vV();return it(t,Mt)}const bV=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function wV({containerStyle:e,style:t,type:n,component:i}){const{nodesConnectable:o,width:s,height:l,isValid:c,inProgress:f}=it(bV,Mt);return!(s&&o&&f)?null:b.jsx("svg",{style:e,width:s,height:l,className:"react-flow__connectionline react-flow__container",children:b.jsx("g",{className:Wt(["react-flow__connection",Mj(c)]),children:b.jsx(M5,{style:t,type:n,CustomComponent:i,isValid:c})})})}const M5=({style:e,type:t=ra.Bezier,CustomComponent:n,isValid:i})=>{const{inProgress:o,from:s,fromNode:l,fromHandle:c,fromPosition:f,to:h,toNode:p,toHandle:m,toPosition:g,pointer:v}=xV();if(!o)return;if(n)return b.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:l,fromHandle:c,fromX:s.x,fromY:s.y,toX:h.x,toY:h.y,fromPosition:f,toPosition:g,connectionStatus:Mj(i),toNode:p,toHandle:m,pointer:v});let _="";const E={sourceX:s.x,sourceY:s.y,sourcePosition:f,targetX:h.x,targetY:h.y,targetPosition:g};switch(t){case ra.Bezier:[_]=ns(E);break;case ra.SimpleBezier:[_]=v5(E);break;case ra.Step:[_]=Go({...E,borderRadius:0});break;case ra.SmoothStep:[_]=Go(E);break;default:[_]=Fj(E)}return b.jsx("path",{d:_,fill:"none",className:"react-flow__connection-path",style:e})};M5.displayName="ConnectionLine";const _V={};function yC(e=_V){T.useRef(e),Lt(),T.useEffect(()=>{},[e])}function SV(){Lt(),T.useRef(!1),T.useEffect(()=>{},[])}function j5({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:i,onEdgeClick:o,onNodeDoubleClick:s,onEdgeDoubleClick:l,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:p,onSelectionContextMenu:m,onSelectionStart:g,onSelectionEnd:v,connectionLineType:_,connectionLineStyle:E,connectionLineComponent:S,connectionLineContainerStyle:w,selectionKeyCode:N,selectionOnDrag:C,selectionMode:k,multiSelectionKeyCode:M,panActivationKeyCode:R,zoomActivationKeyCode:O,deleteKeyCode:I,onlyRenderVisibleElements:V,elementsSelectable:K,defaultViewport:H,translateExtent:F,minZoom:X,maxZoom:L,preventScrolling:B,defaultMarkerColor:z,zoomOnScroll:U,zoomOnPinch:G,panOnScroll:Q,panOnScrollSpeed:j,panOnScrollMode:D,zoomOnDoubleClick:$,panOnDrag:q,onPaneClick:Y,onPaneMouseEnter:Z,onPaneMouseMove:W,onPaneMouseLeave:te,onPaneScroll:re,onPaneContextMenu:se,paneClickDistance:me,nodeClickDistance:be,onEdgeContextMenu:ve,onEdgeMouseEnter:we,onEdgeMouseMove:ke,onEdgeMouseLeave:Ne,reconnectRadius:Oe,onReconnect:Te,onReconnectStart:_t,onReconnectEnd:he,noDragClassName:ye,noWheelClassName:Ue,noPanClassName:_e,disableKeyboardA11y:Ie,nodeExtent:Ve,rfId:jt,viewport:ue,onViewportChange:pe}){return yC(e),yC(t),SV(),pV(n),gV(ue),b.jsx(IP,{onPaneClick:Y,onPaneMouseEnter:Z,onPaneMouseMove:W,onPaneMouseLeave:te,onPaneContextMenu:se,onPaneScroll:re,paneClickDistance:me,deleteKeyCode:I,selectionKeyCode:N,selectionOnDrag:C,selectionMode:k,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:M,panActivationKeyCode:R,zoomActivationKeyCode:O,elementsSelectable:K,zoomOnScroll:U,zoomOnPinch:G,zoomOnDoubleClick:$,panOnScroll:Q,panOnScrollSpeed:j,panOnScrollMode:D,panOnDrag:q,defaultViewport:H,translateExtent:F,minZoom:X,maxZoom:L,onSelectionContextMenu:m,preventScrolling:B,noDragClassName:ye,noWheelClassName:Ue,noPanClassName:_e,disableKeyboardA11y:Ie,onViewportChange:pe,isControlledViewport:!!ue,children:b.jsxs(hV,{children:[b.jsx(fV,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:l,onReconnect:Te,onReconnectStart:_t,onReconnectEnd:he,onlyRenderVisibleElements:V,onEdgeContextMenu:ve,onEdgeMouseEnter:we,onEdgeMouseMove:ke,onEdgeMouseLeave:Ne,reconnectRadius:Oe,defaultMarkerColor:z,noPanClassName:_e,disableKeyboardA11y:Ie,rfId:jt}),b.jsx(wV,{style:E,type:_,component:S,containerStyle:w}),b.jsx("div",{className:"react-flow__edgelabel-renderer"}),b.jsx(GP,{nodeTypes:e,onNodeClick:i,onNodeDoubleClick:s,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:p,nodeClickDistance:be,onlyRenderVisibleElements:V,noPanClassName:_e,noDragClassName:ye,disableKeyboardA11y:Ie,nodeExtent:Ve,rfId:jt}),b.jsx("div",{className:"react-flow__viewport-portal"})]})})}j5.displayName="GraphView";const EV=T.memo(j5),vC=({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:o,height:s,fitView:l,fitViewOptions:c,minZoom:f=.5,maxZoom:h=2,nodeOrigin:p,nodeExtent:m,zIndexMode:g="basic"}={})=>{const v=new Map,_=new Map,E=new Map,S=new Map,w=i??t??[],N=n??e??[],C=p??[0,0],k=m??zl;Gj(E,S,w);const M=nb(N,v,_,{nodeOrigin:C,nodeExtent:k,zIndexMode:g});let R=[0,0,1];if(l&&o&&s){const O=Gl(v,{filter:H=>!!((H.width||H.initialWidth)&&(H.height||H.initialHeight))}),{x:I,y:V,zoom:K}=Xb(O,o,s,f,h,(c==null?void 0:c.padding)??.1);R=[I,V,K]}return{rfId:"1",width:o??0,height:s??0,transform:R,nodes:N,nodesInitialized:M,nodeLookup:v,parentLookup:_,edges:w,edgeLookup:S,connectionLookup:E,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:i!==void 0,panZoom:null,minZoom:f,maxZoom:h,translateExtent:zl,nodeExtent:k,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Vo.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:C,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:l??!1,fitViewOptions:c,fitViewResolver:null,connection:{...Rj},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:BU,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Aj,zIndexMode:g,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},CV=({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:o,height:s,fitView:l,fitViewOptions:c,minZoom:f,maxZoom:h,nodeOrigin:p,nodeExtent:m,zIndexMode:g})=>V7((v,_)=>{async function E(){const{nodeLookup:S,panZoom:w,fitViewOptions:N,fitViewResolver:C,width:k,height:M,minZoom:R,maxZoom:O}=_();w&&(await qU({nodes:S,width:k,height:M,panZoom:w,minZoom:R,maxZoom:O},N),C==null||C.resolve(!0),v({fitViewResolver:null}))}return{...vC({nodes:e,edges:t,width:o,height:s,fitView:l,fitViewOptions:c,minZoom:f,maxZoom:h,nodeOrigin:p,nodeExtent:m,defaultNodes:n,defaultEdges:i,zIndexMode:g}),setNodes:S=>{const{nodeLookup:w,parentLookup:N,nodeOrigin:C,elevateNodesOnSelect:k,fitViewQueued:M,zIndexMode:R}=_(),O=nb(S,w,N,{nodeOrigin:C,nodeExtent:m,elevateNodesOnSelect:k,checkEquality:!0,zIndexMode:R});M&&O?(E(),v({nodes:S,nodesInitialized:O,fitViewQueued:!1,fitViewOptions:void 0})):v({nodes:S,nodesInitialized:O})},setEdges:S=>{const{connectionLookup:w,edgeLookup:N}=_();Gj(w,N,S),v({edges:S})},setDefaultNodesAndEdges:(S,w)=>{if(S){const{setNodes:N}=_();N(S),v({hasDefaultNodes:!0})}if(w){const{setEdges:N}=_();N(w),v({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:w,nodeLookup:N,parentLookup:C,domNode:k,nodeOrigin:M,nodeExtent:R,debug:O,fitViewQueued:I,zIndexMode:V}=_(),{changes:K,updatedInternals:H}=s7(S,N,C,k,M,R,V);H&&(r7(N,C,{nodeOrigin:M,nodeExtent:R,zIndexMode:V}),I?(E(),v({fitViewQueued:!1,fitViewOptions:void 0})):v({}),(K==null?void 0:K.length)>0&&(O&&console.log("React Flow: trigger node changes",K),w==null||w(K)))},updateNodePositions:(S,w=!1)=>{const N=[];let C=[];const{nodeLookup:k,triggerNodeChanges:M,connection:R,updateConnection:O,onNodesChangeMiddlewareMap:I}=_();for(const[V,K]of S){const H=k.get(V),F=!!(H!=null&&H.expandParent&&(H!=null&&H.parentId)&&(K!=null&&K.position)),X={id:V,type:"position",position:F?{x:Math.max(0,K.position.x),y:Math.max(0,K.position.y)}:K.position,dragging:w};if(H&&R.inProgress&&R.fromNode.id===H.id){const L=Ia(H,R.fromHandle,Ee.Left,!0);O({...R,from:L})}F&&H.parentId&&N.push({id:V,parentId:H.parentId,rect:{...K.internals.positionAbsolute,width:K.measured.width??0,height:K.measured.height??0}}),C.push(X)}if(N.length>0){const{parentLookup:V,nodeOrigin:K}=_(),H=e1(N,k,V,K);C.push(...H)}for(const V of I.values())C=V(C);M(C)},triggerNodeChanges:S=>{const{onNodesChange:w,setNodes:N,nodes:C,hasDefaultNodes:k,debug:M}=_();if(S!=null&&S.length){if(k){const R=l5(S,C);N(R)}M&&console.log("React Flow: trigger node changes",S),w==null||w(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:w,setEdges:N,edges:C,hasDefaultEdges:k,debug:M}=_();if(S!=null&&S.length){if(k){const R=u5(S,C);N(R)}M&&console.log("React Flow: trigger edge changes",S),w==null||w(S)}},addSelectedNodes:S=>{const{multiSelectionActive:w,edgeLookup:N,nodeLookup:C,triggerNodeChanges:k,triggerEdgeChanges:M}=_();if(w){const R=S.map(O=>Ra(O,!0));k(R);return}k(zo(C,new Set([...S]),!0)),M(zo(N))},addSelectedEdges:S=>{const{multiSelectionActive:w,edgeLookup:N,nodeLookup:C,triggerNodeChanges:k,triggerEdgeChanges:M}=_();if(w){const R=S.map(O=>Ra(O,!0));M(R);return}M(zo(N,new Set([...S]))),k(zo(C,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:w}={})=>{const{edges:N,nodes:C,nodeLookup:k,triggerNodeChanges:M,triggerEdgeChanges:R}=_(),O=S||C,I=w||N,V=[];for(const H of O){if(!H.selected)continue;const F=k.get(H.id);F&&(F.selected=!1),V.push(Ra(H.id,!1))}const K=[];for(const H of I)H.selected&&K.push(Ra(H.id,!1));M(V),R(K)},setMinZoom:S=>{const{panZoom:w,maxZoom:N}=_();w==null||w.setScaleExtent([S,N]),v({minZoom:S})},setMaxZoom:S=>{const{panZoom:w,minZoom:N}=_();w==null||w.setScaleExtent([N,S]),v({maxZoom:S})},setTranslateExtent:S=>{var w;(w=_().panZoom)==null||w.setTranslateExtent(S),v({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:w,triggerNodeChanges:N,triggerEdgeChanges:C,elementsSelectable:k}=_();if(!k)return;const M=w.reduce((O,I)=>I.selected?[...O,Ra(I.id,!1)]:O,[]),R=S.reduce((O,I)=>I.selected?[...O,Ra(I.id,!1)]:O,[]);N(M),C(R)},setNodeExtent:S=>{const{nodes:w,nodeLookup:N,parentLookup:C,nodeOrigin:k,elevateNodesOnSelect:M,nodeExtent:R,zIndexMode:O}=_();S[0][0]===R[0][0]&&S[0][1]===R[0][1]&&S[1][0]===R[1][0]&&S[1][1]===R[1][1]||(nb(w,N,C,{nodeOrigin:k,nodeExtent:S,elevateNodesOnSelect:M,checkEquality:!1,zIndexMode:O}),v({nodeExtent:S}))},panBy:S=>{const{transform:w,width:N,height:C,panZoom:k,translateExtent:M}=_();return l7({delta:S,panZoom:k,transform:w,translateExtent:M,width:N,height:C})},setCenter:async(S,w,N)=>{const{width:C,height:k,maxZoom:M,panZoom:R}=_();if(!R)return Promise.resolve(!1);const O=typeof(N==null?void 0:N.zoom)<"u"?N.zoom:M;return await R.setViewport({x:C/2-S*O,y:k/2-w*O,zoom:O},{duration:N==null?void 0:N.duration,ease:N==null?void 0:N.ease,interpolate:N==null?void 0:N.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{v({connection:{...Rj}})},updateConnection:S=>{v({connection:S})},reset:()=>v({...vC()})}},Object.is);function r1({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:i,initialWidth:o,initialHeight:s,initialMinZoom:l,initialMaxZoom:c,initialFitViewOptions:f,fitView:h,nodeOrigin:p,nodeExtent:m,zIndexMode:g,children:v}){const[_]=T.useState(()=>CV({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,width:o,height:s,fitView:h,minZoom:l,maxZoom:c,fitViewOptions:f,nodeOrigin:p,nodeExtent:m,zIndexMode:g}));return b.jsx(F7,{value:_,children:b.jsx(hP,{children:v})})}function NV({children:e,nodes:t,edges:n,defaultNodes:i,defaultEdges:o,width:s,height:l,fitView:c,fitViewOptions:f,minZoom:h,maxZoom:p,nodeOrigin:m,nodeExtent:g,zIndexMode:v}){return T.useContext(Vf)?b.jsx(b.Fragment,{children:e}):b.jsx(r1,{initialNodes:t,initialEdges:n,defaultNodes:i,defaultEdges:o,initialWidth:s,initialHeight:l,fitView:c,initialFitViewOptions:f,initialMinZoom:h,initialMaxZoom:p,nodeOrigin:m,nodeExtent:g,zIndexMode:v,children:e})}const kV={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function TV({nodes:e,edges:t,defaultNodes:n,defaultEdges:i,className:o,nodeTypes:s,edgeTypes:l,onNodeClick:c,onEdgeClick:f,onInit:h,onMove:p,onMoveStart:m,onMoveEnd:g,onConnect:v,onConnectStart:_,onConnectEnd:E,onClickConnectStart:S,onClickConnectEnd:w,onNodeMouseEnter:N,onNodeMouseMove:C,onNodeMouseLeave:k,onNodeContextMenu:M,onNodeDoubleClick:R,onNodeDragStart:O,onNodeDrag:I,onNodeDragStop:V,onNodesDelete:K,onEdgesDelete:H,onDelete:F,onSelectionChange:X,onSelectionDragStart:L,onSelectionDrag:B,onSelectionDragStop:z,onSelectionContextMenu:U,onSelectionStart:G,onSelectionEnd:Q,onBeforeDelete:j,connectionMode:D,connectionLineType:$=ra.Bezier,connectionLineStyle:q,connectionLineComponent:Y,connectionLineContainerStyle:Z,deleteKeyCode:W="Backspace",selectionKeyCode:te="Shift",selectionOnDrag:re=!1,selectionMode:se=Dl.Full,panActivationKeyCode:me="Space",multiSelectionKeyCode:be=ql()?"Meta":"Control",zoomActivationKeyCode:ve=ql()?"Meta":"Control",snapToGrid:we,snapGrid:ke,onlyRenderVisibleElements:Ne=!1,selectNodesOnDrag:Oe,nodesDraggable:Te,autoPanOnNodeFocus:_t,nodesConnectable:he,nodesFocusable:ye,nodeOrigin:Ue=o5,edgesFocusable:_e,edgesReconnectable:Ie,elementsSelectable:Ve=!0,defaultViewport:jt=rP,minZoom:ue=.5,maxZoom:pe=2,translateExtent:Me=zl,preventScrolling:$e=!0,nodeExtent:Ge,defaultMarkerColor:Ot="#b1b1b7",zoomOnScroll:en=!0,zoomOnPinch:xt=!0,panOnScroll:ct=!1,panOnScrollSpeed:Ht=.5,panOnScrollMode:ft=za.Free,zoomOnDoubleClick:dn=!0,panOnDrag:tn=!0,onPaneClick:Ce,onPaneMouseEnter:Se,onPaneMouseMove:Be,onPaneMouseLeave:tt,onPaneScroll:Re,onPaneContextMenu:Fe,paneClickDistance:Ke=1,nodeClickDistance:ge=0,children:De,onReconnect:ht,onReconnectStart:dt,onReconnectEnd:Ae,onEdgeContextMenu:at,onEdgeDoubleClick:Gn,onEdgeMouseEnter:nn,onEdgeMouseMove:Ft,onEdgeMouseLeave:Xn,reconnectRadius:xi=10,onNodesChange:dr,onEdgesChange:gn,noDragClassName:Ut="nodrag",noWheelClassName:hn="nowheel",noPanClassName:Vr="nopan",fitView:Ya,fitViewOptions:ru,connectOnClick:yd,attributionPosition:iu,proOptions:ca,defaultEdgeOptions:fs,elevateNodesOnSelect:bi=!0,elevateEdgesOnSelect:wi=!1,disableKeyboardA11y:_i=!1,autoPanOnConnect:Si,autoPanOnNodeDrag:$t,autoPanSpeed:au,connectionRadius:ou,isValidConnection:Fr,onError:Ei,style:vd,id:ds,nodeDragThreshold:su,connectionDragThreshold:xd,viewport:Ga,onViewportChange:Xa,width:hr,height:bn,colorMode:lu="light",debug:bd,onScroll:Ci,ariaLabelConfig:uu,zIndexMode:fa="basic",...wd},wn){const da=ds||"1",cu=sP(lu),hs=T.useCallback($r=>{$r.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ci==null||Ci($r)},[Ci]);return b.jsx("div",{"data-testid":"rf__wrapper",...wd,onScroll:hs,style:{...vd,...kV},ref:wn,className:Wt(["react-flow",o,cu]),id:ds,role:"application",children:b.jsxs(NV,{nodes:e,edges:t,width:hr,height:bn,fitView:Ya,fitViewOptions:ru,minZoom:ue,maxZoom:pe,nodeOrigin:Ue,nodeExtent:Ge,zIndexMode:fa,children:[b.jsx(EV,{onInit:h,onNodeClick:c,onEdgeClick:f,onNodeMouseEnter:N,onNodeMouseMove:C,onNodeMouseLeave:k,onNodeContextMenu:M,onNodeDoubleClick:R,nodeTypes:s,edgeTypes:l,connectionLineType:$,connectionLineStyle:q,connectionLineComponent:Y,connectionLineContainerStyle:Z,selectionKeyCode:te,selectionOnDrag:re,selectionMode:se,deleteKeyCode:W,multiSelectionKeyCode:be,panActivationKeyCode:me,zoomActivationKeyCode:ve,onlyRenderVisibleElements:Ne,defaultViewport:jt,translateExtent:Me,minZoom:ue,maxZoom:pe,preventScrolling:$e,zoomOnScroll:en,zoomOnPinch:xt,zoomOnDoubleClick:dn,panOnScroll:ct,panOnScrollSpeed:Ht,panOnScrollMode:ft,panOnDrag:tn,onPaneClick:Ce,onPaneMouseEnter:Se,onPaneMouseMove:Be,onPaneMouseLeave:tt,onPaneScroll:Re,onPaneContextMenu:Fe,paneClickDistance:Ke,nodeClickDistance:ge,onSelectionContextMenu:U,onSelectionStart:G,onSelectionEnd:Q,onReconnect:ht,onReconnectStart:dt,onReconnectEnd:Ae,onEdgeContextMenu:at,onEdgeDoubleClick:Gn,onEdgeMouseEnter:nn,onEdgeMouseMove:Ft,onEdgeMouseLeave:Xn,reconnectRadius:xi,defaultMarkerColor:Ot,noDragClassName:Ut,noWheelClassName:hn,noPanClassName:Vr,rfId:da,disableKeyboardA11y:_i,nodeExtent:Ge,viewport:Ga,onViewportChange:Xa}),b.jsx(oP,{nodes:e,edges:t,defaultNodes:n,defaultEdges:i,onConnect:v,onConnectStart:_,onConnectEnd:E,onClickConnectStart:S,onClickConnectEnd:w,nodesDraggable:Te,autoPanOnNodeFocus:_t,nodesConnectable:he,nodesFocusable:ye,edgesFocusable:_e,edgesReconnectable:Ie,elementsSelectable:Ve,elevateNodesOnSelect:bi,elevateEdgesOnSelect:wi,minZoom:ue,maxZoom:pe,nodeExtent:Ge,onNodesChange:dr,onEdgesChange:gn,snapToGrid:we,snapGrid:ke,connectionMode:D,translateExtent:Me,connectOnClick:yd,defaultEdgeOptions:fs,fitView:Ya,fitViewOptions:ru,onNodesDelete:K,onEdgesDelete:H,onDelete:F,onNodeDragStart:O,onNodeDrag:I,onNodeDragStop:V,onSelectionDrag:B,onSelectionDragStart:L,onSelectionDragStop:z,onMove:p,onMoveStart:m,onMoveEnd:g,noPanClassName:Vr,nodeOrigin:Ue,rfId:da,autoPanOnConnect:Si,autoPanOnNodeDrag:$t,autoPanSpeed:au,onError:Ei,connectionRadius:ou,isValidConnection:Fr,selectNodesOnDrag:Oe,nodeDragThreshold:su,connectionDragThreshold:xd,onBeforeDelete:j,debug:bd,ariaLabelConfig:uu,zIndexMode:fa}),b.jsx(nP,{onSelectionChange:X}),De,b.jsx(Z7,{proOptions:ca,position:iu}),b.jsx(Q7,{rfId:da,disableKeyboardA11y:_i})]})})}var O5=c5(TV);const AV=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function Gf({children:e}){const t=it(AV);return t?kb.createPortal(e,t):null}const RV=e=>({x:e.transform[0],y:e.transform[1],zoom:e.transform[2]});function MV(){return it(RV,Mt)}function z5(e){const[t,n]=T.useState(e),i=T.useCallback(o=>n(s=>l5(o,s)),[]);return[t,n,i]}function jV(e){const[t,n]=T.useState(e),i=T.useCallback(o=>n(s=>u5(o,s)),[]);return[t,n,i]}const OV=Sr.error014();function vn({id:e,handleType:t,handleId:n,onConnect:i,onDisconnect:o}={}){const s=n1(),l=e??s;if(!l)throw new Error(OV);const c=T.useRef(null),f=it(h=>h.connectionLookup.get(`${l}${t?n?`-${t}-${n}`:`-${t}`:""}`),jU);return T.useEffect(()=>{if(c.current&&c.current!==f){const h=f??new Map;R2(c.current,h,o),R2(h,c.current,i)}c.current=f??new Map},[f,i,o]),T.useMemo(()=>Array.from((f==null?void 0:f.values())??[]),[f])}function zV({dimensions:e,lineWidth:t,variant:n,className:i}){return b.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Wt(["react-flow__background-pattern",n,i])})}function DV({radius:e,className:t}){return b.jsx("circle",{cx:e,cy:e,r:e,className:Wt(["react-flow__background-pattern","dots",t])})}var hi;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(hi||(hi={}));const LV={[hi.Dots]:1,[hi.Lines]:1,[hi.Cross]:6},qV=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function D5({id:e,variant:t=hi.Dots,gap:n=20,size:i,lineWidth:o=1,offset:s=0,color:l,bgColor:c,style:f,className:h,patternClassName:p}){const m=T.useRef(null),{transform:g,patternId:v}=it(qV,Mt),_=i||LV[t],E=t===hi.Dots,S=t===hi.Cross,w=Array.isArray(n)?n:[n,n],N=[w[0]*g[2]||1,w[1]*g[2]||1],C=_*g[2],k=Array.isArray(s)?s:[s,s],M=S?[C,C]:N,R=[k[0]*g[2]||1+M[0]/2,k[1]*g[2]||1+M[1]/2],O=`${v}${e||""}`;return b.jsxs("svg",{className:Wt(["react-flow__background",h]),style:{...f,...$f,"--xy-background-color-props":c,"--xy-background-pattern-color-props":l},ref:m,"data-testid":"rf__background",children:[b.jsx("pattern",{id:O,x:g[0]%N[0],y:g[1]%N[1],width:N[0],height:N[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${R[0]},-${R[1]})`,children:E?b.jsx(DV,{radius:C/2,className:p}):b.jsx(zV,{dimensions:M,lineWidth:o,variant:t,className:p})}),b.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${O})`})]})}D5.displayName="Background";const L5=T.memo(D5);function IV(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:b.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function BV(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:b.jsx("path",{d:"M0 0h32v4.2H0z"})})}function HV(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:b.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function UV(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:b.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function PV(){return b.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:b.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Dc({children:e,className:t,...n}){return b.jsx("button",{type:"button",className:Wt(["react-flow__controls-button",t]),...n,children:e})}const VV=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function q5({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:i=!0,fitViewOptions:o,onZoomIn:s,onZoomOut:l,onFitView:c,onInteractiveChange:f,className:h,children:p,position:m="bottom-left",orientation:g="vertical","aria-label":v}){const _=Lt(),{isInteractive:E,minZoomReached:S,maxZoomReached:w,ariaLabelConfig:N}=it(VV,Mt),{zoomIn:C,zoomOut:k,fitView:M}=Ha(),R=()=>{C(),s==null||s()},O=()=>{k(),l==null||l()},I=()=>{M(o),c==null||c()},V=()=>{_.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),f==null||f(!E)},K=g==="horizontal"?"horizontal":"vertical";return b.jsxs(Ff,{className:Wt(["react-flow__controls",K,h]),position:m,style:e,"data-testid":"rf__controls","aria-label":v??N["controls.ariaLabel"],children:[t&&b.jsxs(b.Fragment,{children:[b.jsx(Dc,{onClick:R,className:"react-flow__controls-zoomin",title:N["controls.zoomIn.ariaLabel"],"aria-label":N["controls.zoomIn.ariaLabel"],disabled:w,children:b.jsx(IV,{})}),b.jsx(Dc,{onClick:O,className:"react-flow__controls-zoomout",title:N["controls.zoomOut.ariaLabel"],"aria-label":N["controls.zoomOut.ariaLabel"],disabled:S,children:b.jsx(BV,{})})]}),n&&b.jsx(Dc,{className:"react-flow__controls-fitview",onClick:I,title:N["controls.fitView.ariaLabel"],"aria-label":N["controls.fitView.ariaLabel"],children:b.jsx(HV,{})}),i&&b.jsx(Dc,{className:"react-flow__controls-interactive",onClick:V,title:N["controls.interactive.ariaLabel"],"aria-label":N["controls.interactive.ariaLabel"],children:E?b.jsx(PV,{}):b.jsx(UV,{})}),p]})}q5.displayName="Controls";T.memo(q5);function FV({id:e,x:t,y:n,width:i,height:o,style:s,color:l,strokeColor:c,strokeWidth:f,className:h,borderRadius:p,shapeRendering:m,selected:g,onClick:v}){const{background:_,backgroundColor:E}=s||{},S=l||_||E;return b.jsx("rect",{className:Wt(["react-flow__minimap-node",{selected:g},h]),x:t,y:n,rx:p,ry:p,width:i,height:o,style:{fill:S,stroke:c,strokeWidth:f},shapeRendering:m,onClick:v?w=>v(w,e):void 0})}const $V=T.memo(FV),YV=e=>e.nodes.map(t=>t.id),Zp=e=>e instanceof Function?e:()=>e;function GV({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:i=5,nodeStrokeWidth:o,nodeComponent:s=$V,onClick:l}){const c=it(YV,Mt),f=Zp(t),h=Zp(e),p=Zp(n),m=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return b.jsx(b.Fragment,{children:c.map(g=>b.jsx(KV,{id:g,nodeColorFunc:f,nodeStrokeColorFunc:h,nodeClassNameFunc:p,nodeBorderRadius:i,nodeStrokeWidth:o,NodeComponent:s,onClick:l,shapeRendering:m},g))})}function XV({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:i,nodeBorderRadius:o,nodeStrokeWidth:s,shapeRendering:l,NodeComponent:c,onClick:f}){const{node:h,x:p,y:m,width:g,height:v}=it(_=>{const E=_.nodeLookup.get(e);if(!E)return{node:void 0,x:0,y:0,width:0,height:0};const S=E.internals.userNode,{x:w,y:N}=E.internals.positionAbsolute,{width:C,height:k}=gi(S);return{node:S,x:w,y:N,width:C,height:k}},Mt);return!h||h.hidden||!qj(h)?null:b.jsx(c,{x:p,y:m,width:g,height:v,style:h.style,selected:!!h.selected,className:i(h),color:t(h),borderRadius:o,strokeColor:n(h),strokeWidth:s,shapeRendering:l,onClick:f,id:h.id})}const KV=T.memo(XV);var QV=T.memo(GV);const ZV=200,WV=150,JV=e=>!e.hidden,eF=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?Lj(Gl(e.nodeLookup,{filter:JV}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},tF="react-flow__minimap-desc";function I5({style:e,className:t,nodeStrokeColor:n,nodeColor:i,nodeClassName:o="",nodeBorderRadius:s=5,nodeStrokeWidth:l,nodeComponent:c,bgColor:f,maskColor:h,maskStrokeColor:p,maskStrokeWidth:m,position:g="bottom-right",onClick:v,onNodeClick:_,pannable:E=!1,zoomable:S=!1,ariaLabel:w,inversePan:N,zoomStep:C=1,offsetScale:k=5}){const M=Lt(),R=T.useRef(null),{boundingRect:O,viewBB:I,rfId:V,panZoom:K,translateExtent:H,flowWidth:F,flowHeight:X,ariaLabelConfig:L}=it(eF,Mt),B=(e==null?void 0:e.width)??ZV,z=(e==null?void 0:e.height)??WV,U=O.width/B,G=O.height/z,Q=Math.max(U,G),j=Q*B,D=Q*z,$=k*Q,q=O.x-(j-O.width)/2-$,Y=O.y-(D-O.height)/2-$,Z=j+$*2,W=D+$*2,te=`${tF}-${V}`,re=T.useRef(0),se=T.useRef();re.current=Q,T.useEffect(()=>{if(R.current&&K)return se.current=y7({domNode:R.current,panZoom:K,getTransform:()=>M.getState().transform,getViewScale:()=>re.current}),()=>{var we;(we=se.current)==null||we.destroy()}},[K]),T.useEffect(()=>{var we;(we=se.current)==null||we.update({translateExtent:H,width:F,height:X,inversePan:N,pannable:E,zoomStep:C,zoomable:S})},[E,S,N,C,H,F,X]);const me=v?we=>{var Oe;const[ke,Ne]=((Oe=se.current)==null?void 0:Oe.pointer(we))||[0,0];v(we,{x:ke,y:Ne})}:void 0,be=_?T.useCallback((we,ke)=>{const Ne=M.getState().nodeLookup.get(ke).internals.userNode;_(we,Ne)},[]):void 0,ve=w??L["minimap.ariaLabel"];return b.jsx(Ff,{position:g,style:{...e,"--xy-minimap-background-color-props":typeof f=="string"?f:void 0,"--xy-minimap-mask-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-width-props":typeof m=="number"?m*Q:void 0,"--xy-minimap-node-background-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof l=="number"?l:void 0},className:Wt(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:b.jsxs("svg",{width:B,height:z,viewBox:`${q} ${Y} ${Z} ${W}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":te,ref:R,onClick:me,children:[ve&&b.jsx("title",{id:te,children:ve}),b.jsx(QV,{onClick:be,nodeColor:i,nodeStrokeColor:n,nodeBorderRadius:s,nodeClassName:o,nodeStrokeWidth:l,nodeComponent:c}),b.jsx("path",{className:"react-flow__minimap-mask",d:`M${q-$},${Y-$}h${Z+$*2}v${W+$*2}h${-Z-$*2}z
373
+ M${I.x},${I.y}h${I.width}v${I.height}h${-I.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}I5.displayName="MiniMap";const nF=T.memo(I5),rF=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,iF={[Xo.Line]:"right",[Xo.Handle]:"bottom-right"};function aF({nodeId:e,position:t,variant:n=Xo.Handle,className:i,style:o=void 0,children:s,color:l,minWidth:c=10,minHeight:f=10,maxWidth:h=Number.MAX_VALUE,maxHeight:p=Number.MAX_VALUE,keepAspectRatio:m=!1,resizeDirection:g,autoScale:v=!0,shouldResize:_,onResizeStart:E,onResize:S,onResizeEnd:w}){const N=n1(),C=typeof e=="string"?e:N,k=Lt(),M=T.useRef(null),R=n===Xo.Handle,O=it(T.useCallback(rF(R&&v),[R,v]),Mt),I=T.useRef(null),V=t??iF[n];T.useEffect(()=>{if(!(!M.current||!C))return I.current||(I.current=M7({domNode:M.current,nodeId:C,getStoreItems:()=>{const{nodeLookup:H,transform:F,snapGrid:X,snapToGrid:L,nodeOrigin:B,domNode:z}=k.getState();return{nodeLookup:H,transform:F,snapGrid:X,snapToGrid:L,nodeOrigin:B,paneDomNode:z}},onChange:(H,F)=>{const{triggerNodeChanges:X,nodeLookup:L,parentLookup:B,nodeOrigin:z}=k.getState(),U=[],G={x:H.x,y:H.y},Q=L.get(C);if(Q&&Q.expandParent&&Q.parentId){const j=Q.origin??z,D=H.width??Q.measured.width??0,$=H.height??Q.measured.height??0,q={id:Q.id,parentId:Q.parentId,rect:{width:D,height:$,...Ij({x:H.x??Q.position.x,y:H.y??Q.position.y},{width:D,height:$},Q.parentId,L,j)}},Y=e1([q],L,B,z);U.push(...Y),G.x=H.x?Math.max(j[0]*D,H.x):void 0,G.y=H.y?Math.max(j[1]*$,H.y):void 0}if(G.x!==void 0&&G.y!==void 0){const j={id:C,type:"position",position:{...G}};U.push(j)}if(H.width!==void 0&&H.height!==void 0){const D={id:C,type:"dimensions",resizing:!0,setAttributes:g?g==="horizontal"?"width":"height":!0,dimensions:{width:H.width,height:H.height}};U.push(D)}for(const j of F){const D={...j,type:"position"};U.push(D)}X(U)},onEnd:({width:H,height:F})=>{const X={id:C,type:"dimensions",resizing:!1,dimensions:{width:H,height:F}};k.getState().triggerNodeChanges([X])}})),I.current.update({controlPosition:V,boundaries:{minWidth:c,minHeight:f,maxWidth:h,maxHeight:p},keepAspectRatio:m,resizeDirection:g,onResizeStart:E,onResize:S,onResizeEnd:w,shouldResize:_}),()=>{var H;(H=I.current)==null||H.destroy()}},[V,c,f,h,p,m,E,S,w,_]);const K=V.split("-");return b.jsx("div",{className:Wt(["react-flow__resize-control","nodrag",...K,n,i]),ref:M,style:{...o,scale:O,...l&&{[R?"backgroundColor":"borderColor"]:l}},children:s})}T.memo(aF);function B5({className:e,size:t="default",...n}){return b.jsx("div",{"data-slot":"card","data-size":t,className:xn("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",e),...n})}function H5({className:e,...t}){return b.jsx("div",{"data-slot":"card-content",className:xn("px-4 group-data-[size=sm]/card:px-3",e),...t})}const Do={api:"Routes & Controllers",service:"Business Logic",data:"Database & ORM",external:"HTTP Clients"},oF=[{layer:"api",color:"#3b82f6",label:Do.api},{layer:"service",color:"#8b5cf6",label:Do.service},{layer:"data",color:"#10b981",label:Do.data},{layer:"external",color:"#f97316",label:Do.external}],sF={frontend:m3,"api-server":v3,worker:c3,library:Ho,unknown:Ho},xC="!bg-muted-foreground !border-none !w-[5px] !h-[5px] !z-10",bC="!invisible";function lF({id:e,data:t,selected:n}){const{label:i,description:o,serviceInfo:s,insightCount:l,hasHighSeverity:c,onExplain:f,diffBadge:h}=t,p=sF[s.type]||Ho,m=vn({handleType:"target",handleId:"top"}),g=vn({handleType:"source",handleId:"bottom"}),v=s.layers.map(_=>_.layer);return b.jsxs(B5,{className:`relative min-w-[220px] !gap-0 !py-0 !overflow-visible rounded-md shadow-md transition-all !bg-card/80 ${n?"border-primary ring-1 ring-primary/30":""}`,children:[b.jsx(gt,{type:"target",position:Ee.Top,id:"top",className:m.length>0?xC:bC}),b.jsxs(H5,{className:"p-3",children:[b.jsxs("div",{className:"flex items-start gap-3",children:[b.jsx("div",{className:"flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-lg bg-muted",children:b.jsx(p,{className:"h-5 w-5 text-primary"})}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsx("h3",{className:"truncate text-sm font-bold text-foreground",children:i}),s.framework&&b.jsx("p",{className:"mt-0.5 text-[10px] italic text-muted-foreground",children:s.framework})]}),c&&b.jsx("div",{className:"flex-shrink-0",children:b.jsx(_r,{className:"h-4 w-4 text-amber-500"})}),h&&(h.newCount>0||h.resolvedCount>0)&&b.jsxs("div",{className:"flex flex-shrink-0 gap-1",children:[h.newCount>0&&b.jsxs("span",{className:"group/diff relative inline-flex items-center rounded-full bg-amber-500/20 px-1.5 py-0.5 text-[9px] font-semibold text-amber-500",children:["+",h.newCount,b.jsxs("span",{className:"pointer-events-none absolute left-1/2 bottom-full mb-1 -translate-x-1/2 z-[9999] hidden group-hover/diff:block whitespace-nowrap rounded bg-popover border border-border px-2 py-1 text-[10px] text-popover-foreground shadow-lg",children:[h.newCount," new violation",h.newCount!==1?"s":""," from pending changes"]})]}),h.resolvedCount>0&&b.jsxs("span",{className:"group/diff relative inline-flex items-center rounded-full bg-emerald-500/20 px-1.5 py-0.5 text-[9px] font-semibold text-emerald-500",children:["-",h.resolvedCount,b.jsxs("span",{className:"pointer-events-none absolute left-1/2 bottom-full mb-1 -translate-x-1/2 z-[9999] hidden group-hover/diff:block whitespace-nowrap rounded bg-popover border border-border px-2 py-1 text-[10px] text-popover-foreground shadow-lg",children:[h.resolvedCount," violation",h.resolvedCount!==1?"s":""," resolved by pending changes"]})]})]})]}),b.jsx("div",{className:"mx-auto mt-2 w-2/3 border-t border-border"}),o&&b.jsx("p",{className:"mt-2 max-w-[240px] text-[10px] leading-tight text-muted-foreground",children:o}),v.length>0&&b.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:oF.map(({layer:_,label:E,color:S})=>v.includes(_)?b.jsx("span",{className:"inline-flex items-center rounded-sm border px-1.5 py-0.5 text-[9px] text-muted-foreground",style:{borderColor:S},children:E},_):null)}),l>0&&b.jsxs("div",{className:"mt-2 rounded-md bg-muted px-2 py-1 text-center text-[10px] text-muted-foreground",children:[l," insight",l!==1?"s":""]}),b.jsx("div",{className:"mx-auto mt-2 w-2/3 border-t border-border"}),b.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[b.jsxs("span",{className:"text-[9px] text-muted-foreground",children:[s.fileCount," files"]}),f&&b.jsxs("button",{className:"flex items-center gap-1 rounded-sm border border-border bg-muted px-1.5 py-0.5 text-[9px] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",onClick:_=>{_.stopPropagation(),f(e)},children:[b.jsx(Jo,{className:"h-2.5 w-2.5"}),"Explain"]})]})]}),b.jsx(gt,{type:"source",position:Ee.Bottom,id:"bottom",className:g.length>0?xC:bC})]})}const uF=T.memo(lF),wC=5,Lc="!bg-muted-foreground !border-none !w-[5px] !h-[5px] !z-10",Ji="!invisible";function cF({id:e,data:t}){const{label:n,fileCount:i,layerColor:o,fileNames:s=[],isContainer:l,isCollapsed:c,onToggleCollapse:f,moduleCount:h,violations:p=[],onExplain:m,diffBadge:g}=t,v=Do[n]||n,{setEdges:_}=Ha(),E=p.flatMap(V=>{var K;return(K=V.edgeIds)!=null&&K.length?V.edgeIds:V.edgeId?[V.edgeId]:[]}),S=T.useCallback(()=>{if(E.length===0)return;const V=new Set(E);_(K=>K.map(H=>V.has(H.id)?{...H,data:{...H.data,highlighted:!0}}:H))},[_,E]),w=T.useCallback(()=>{if(E.length===0)return;const V=new Set(E);_(K=>K.map(H=>V.has(H.id)?{...H,data:{...H.data,highlighted:!1}}:H))},[_,E]),N=vn({handleType:"target",handleId:"top"}),C=vn({handleType:"source",handleId:"bottom"}),k=vn({handleType:"source",handleId:"right-src"}),M=vn({handleType:"target",handleId:"right-tgt"}),R=p.length>0&&b.jsxs("div",{className:"group/violation relative shrink-0 pointer-events-auto nodrag",onMouseEnter:S,onMouseLeave:w,children:[b.jsx(_r,{className:"h-3 w-3 text-red-500"}),b.jsx("div",{className:"pointer-events-none absolute left-1/2 bottom-full mb-1.5 -translate-x-1/2 z-[9999] hidden group-hover/violation:block",children:b.jsxs("div",{className:"rounded-md border border-red-500/30 bg-card px-2.5 py-2 shadow-lg w-[220px]",children:[b.jsx("p",{className:"text-[10px] font-semibold text-red-500 mb-1",children:"Layer Violation"}),p.map((V,K)=>b.jsxs("p",{className:"text-[10px] text-muted-foreground leading-tight",children:["Depends on ",b.jsx("span",{className:"font-medium text-foreground",children:Do[V.targetLayer]||V.targetLayer})," — ",V.reason]},K))]})})]});if(l)return b.jsxs("div",{className:"rounded-md border border-border/50 bg-muted/20",style:{width:"100%",height:"100%"},children:[b.jsx(gt,{type:"target",position:Ee.Top,id:"top",className:Ji}),b.jsx(gt,{type:"source",position:Ee.Bottom,id:"bottom",className:Ji}),b.jsx(gt,{type:"source",position:Ee.Right,id:"right-src",className:Ji}),b.jsx(gt,{type:"target",position:Ee.Right,id:"right-tgt",className:Ji}),b.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5",children:[f&&b.jsx("button",{className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors nodrag",onClick:V=>{V.stopPropagation(),f(e)},children:c?b.jsx(jf,{className:"h-3 w-3"}):b.jsx(Wo,{className:"h-3 w-3"})}),b.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:o}}),b.jsx("span",{className:"text-[10px] font-medium text-muted-foreground",children:v}),c&&h!==void 0&&b.jsxs("span",{className:"text-[9px] text-muted-foreground/60 ml-auto",children:[h," modules"]}),g&&(g.newCount>0||g.resolvedCount>0)&&b.jsxs("div",{className:"ml-auto flex gap-1",children:[g.newCount>0&&b.jsxs("span",{className:"inline-flex items-center rounded-full bg-amber-500/20 px-1 py-0.5 text-[8px] font-semibold text-amber-500",children:["+",g.newCount]}),g.resolvedCount>0&&b.jsxs("span",{className:"inline-flex items-center rounded-full bg-emerald-500/20 px-1 py-0.5 text-[8px] font-semibold text-emerald-500",children:["-",g.resolvedCount]})]})]})]});const O=s.slice(0,wC),I=s.length-wC;return b.jsxs("div",{className:"rounded-md border bg-card/80 shadow-sm",style:{borderLeftWidth:3,borderLeftColor:o,minWidth:260},children:[b.jsx(gt,{type:"target",position:Ee.Top,id:"top",className:N.length>0?Lc:Ji}),b.jsx(gt,{type:"source",position:Ee.Bottom,id:"bottom",className:C.length>0?Lc:Ji}),b.jsx(gt,{type:"source",position:Ee.Right,id:"right-src",className:k.length>0?Lc:Ji,style:{top:"75%"}}),b.jsx(gt,{type:"target",position:Ee.Right,id:"right-tgt",className:M.length>0?Lc:Ji,style:{top:"25%"}}),b.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:o}}),b.jsx("span",{className:"text-xs font-medium text-foreground",children:v}),R]}),b.jsxs("div",{className:"flex items-center gap-1.5",children:[g&&(g.newCount>0||g.resolvedCount>0)&&b.jsxs(b.Fragment,{children:[g.newCount>0&&b.jsxs("span",{className:"inline-flex items-center rounded-full bg-amber-500/20 px-1 py-0.5 text-[8px] font-semibold text-amber-500",children:["+",g.newCount]}),g.resolvedCount>0&&b.jsxs("span",{className:"inline-flex items-center rounded-full bg-emerald-500/20 px-1 py-0.5 text-[8px] font-semibold text-emerald-500",children:["-",g.resolvedCount]})]}),b.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[i," files"]}),m&&b.jsx("button",{className:"flex items-center justify-center rounded-sm border border-border bg-muted p-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",onClick:V=>{V.stopPropagation(),m(e)},title:"Explain",children:b.jsx(Jo,{className:"h-2.5 w-2.5"})})]})]}),O.length>0&&b.jsxs("div",{className:"border-t border-border px-3 py-1",children:[O.map(V=>b.jsx("div",{className:"truncate text-[10px] text-muted-foreground leading-[18px]",children:V},V)),I>0&&b.jsxs("div",{className:"text-[10px] text-muted-foreground/60 leading-[18px]",children:["+",I," more"]})]})]})}const fF=T.memo(cF),dF={frontend:m3,"api-server":v3,worker:c3,library:Ho,unknown:Ho};function hF({data:e,selected:t}){const{label:n,serviceType:i,framework:o,diffBadge:s}=e,l=dF[i]||Ho;return b.jsxs("div",{className:`rounded-lg bg-muted/30 p-0 relative ${t?"ring-1 ring-primary/30":"border border-border"}`,style:{width:"100%",height:"100%"},children:[b.jsx(gt,{type:"target",position:Ee.Top,className:"!invisible"}),b.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3 py-2",children:[b.jsx(l,{className:"h-4 w-4 text-primary"}),b.jsx("span",{className:"text-xs font-bold text-foreground",children:n}),o&&b.jsx("span",{className:"text-[9px] italic text-muted-foreground",children:o}),s&&(s.newCount>0||s.resolvedCount>0)&&b.jsxs("div",{className:"ml-auto flex gap-1",children:[s.newCount>0&&b.jsxs("span",{className:"inline-flex items-center rounded-full bg-amber-500/20 px-1.5 py-0.5 text-[9px] font-semibold text-amber-500",children:["+",s.newCount]}),s.resolvedCount>0&&b.jsxs("span",{className:"inline-flex items-center rounded-full bg-emerald-500/20 px-1.5 py-0.5 text-[9px] font-semibold text-emerald-500",children:["-",s.resolvedCount]})]})]}),b.jsx(gt,{type:"source",position:Ee.Bottom,className:"!invisible"})]})}const pF=T.memo(hF),mF={postgres:"#336791",redis:"#DC382D",mongodb:"#47A248",mysql:"#4479A1",sqlite:"#003B57"},gF={postgres:"PostgreSQL",redis:"Redis",mongodb:"MongoDB",mysql:"MySQL",sqlite:"SQLite"},yF="!invisible";function vF({id:e,data:t,selected:n}){const{label:i,databaseType:o,tableCount:s,connectedServices:l,framework:c}=t,f=mF[o]||"#6b7280",h=vn({handleType:"target",handleId:"top"}),p=gF[o]||o,m=o==="redis",g=m?Tb:wl;return b.jsxs("div",{className:`min-w-[180px] rounded-lg bg-card/80 shadow-md transition-all ${n?"ring-1 ring-primary/30":"border"}`,style:n?void 0:{borderColor:f},children:[b.jsx(gt,{type:"target",position:Ee.Top,id:"top",className:h.length>0?"!border-none !w-[5px] !h-[5px] !z-10":yF,style:h.length>0?{backgroundColor:f}:void 0}),b.jsxs("div",{className:"flex items-center gap-2 px-3 py-2",children:[b.jsx("div",{className:"flex items-center justify-center rounded-md p-1.5",style:{backgroundColor:`${f}20`},children:b.jsx(g,{className:"h-4 w-4",style:{color:f}})}),b.jsxs("div",{className:"flex flex-col",children:[b.jsx("span",{className:"text-xs font-bold text-foreground",children:i}),b.jsx("span",{className:"text-[10px] text-muted-foreground",children:p})]})]}),b.jsxs("div",{className:"border-t border-border px-3 py-1.5 flex items-center justify-between",children:[b.jsx("span",{className:"text-[10px] text-muted-foreground",children:m?"Cache store":`${s} table${s!==1?"s":""}`}),c&&b.jsx("span",{className:"text-[9px] italic text-muted-foreground",children:c})]}),l.length>0&&b.jsx("div",{className:"border-t border-border px-3 py-1",children:b.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[l.length," service",l.length!==1?"s":""," connected"]})}),b.jsx(gt,{type:"source",position:Ee.Bottom,className:"!invisible"})]})}const xF=T.memo(vF),bF={class:l3,interface:Uq,standalone:f3},ea="!bg-muted-foreground !border-none !w-[5px] !h-[5px] !z-10",ta="!invisible";function wF({id:e,data:t,selected:n}){const{label:i,moduleKind:o,methodCount:s,layerColor:l,isDead:c,isContainer:f,isCollapsed:h,onToggleCollapse:p,violations:m,onExplain:g}=t,v=bF[o]||f3,{setEdges:_}=Ha(),E=(m||[]).flatMap(I=>I.edgeIds||[]),S=T.useCallback(()=>{if(E.length===0)return;const I=new Set(E);_(V=>V.map(K=>I.has(K.id)?{...K,data:{...K.data,highlighted:!0}}:K))},[_,E]),w=T.useCallback(()=>{if(E.length===0)return;const I=new Set(E);_(V=>V.map(K=>I.has(K.id)?{...K,data:{...K.data,highlighted:!1}}:K))},[_,E]),N=vn({handleType:"target",handleId:"top"}),C=vn({handleType:"source",handleId:"bottom"}),k=vn({handleType:"source",handleId:"right-src"}),M=vn({handleType:"target",handleId:"right-tgt"}),R=m&&m.length>0&&b.jsxs("div",{className:"group/violation relative shrink-0",onMouseEnter:S,onMouseLeave:w,children:[b.jsx(_r,{className:"h-3 w-3 text-red-500"}),b.jsx("div",{className:"pointer-events-none absolute left-1/2 bottom-full mb-1.5 -translate-x-1/2 z-[9999] hidden group-hover/violation:block",children:b.jsxs("div",{className:"rounded-md border border-red-500/30 bg-card px-2.5 py-2 shadow-lg w-[220px]",children:[b.jsx("p",{className:"text-[10px] font-semibold text-red-500 mb-1",children:"Layer Violation"}),m.map((I,V)=>b.jsx("p",{className:"text-[10px] text-muted-foreground leading-tight",children:I.reason},V))]})})]}),O=c&&b.jsxs("div",{className:"group/dead relative shrink-0",children:[b.jsx(_r,{className:"h-3 w-3 text-amber-500"}),b.jsx("div",{className:"pointer-events-none absolute left-1/2 bottom-full mb-1.5 -translate-x-1/2 z-[9999] hidden group-hover/dead:block",children:b.jsxs("div",{className:"rounded-md border border-amber-500/30 bg-card px-2.5 py-2 shadow-lg w-[200px]",children:[b.jsx("p",{className:"text-[10px] font-semibold text-amber-500 mb-1",children:"Dead Module"}),b.jsxs("p",{className:"text-[10px] text-muted-foreground leading-tight",children:[b.jsx("span",{className:"font-medium text-foreground",children:i})," has no incoming or outgoing dependencies — it may be unused or missing imports."]})]})})]});return f?b.jsxs("div",{className:`rounded-md border bg-muted/10 ${m!=null&&m.length?"border-red-500/60":c?"border-dashed border-amber-500/60":"border-border/50"}`,style:{width:"100%",height:"100%"},children:[b.jsx(gt,{type:"target",position:Ee.Top,id:"top",className:N.length>0?ea:ta}),b.jsx(gt,{type:"source",position:Ee.Bottom,id:"bottom",className:C.length>0?ea:ta}),b.jsx(gt,{type:"source",position:Ee.Right,id:"right-src",className:k.length>0?ea:ta}),b.jsx(gt,{type:"target",position:Ee.Right,id:"right-tgt",className:M.length>0?ea:ta}),b.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1",children:[p&&b.jsx("button",{className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors nodrag",onClick:I=>{I.stopPropagation(),p(e)},children:h?b.jsx(jf,{className:"h-3 w-3"}):b.jsx(Wo,{className:"h-3 w-3"})}),b.jsx(v,{className:"h-2.5 w-2.5 text-muted-foreground"}),b.jsx("span",{className:"text-[10px] font-medium text-muted-foreground truncate",children:i}),R,O,b.jsxs("span",{className:"ml-auto shrink-0 text-[9px] text-muted-foreground/60",children:[s," ",s===1?"method":"methods"]})]})]}):b.jsxs("div",{className:`w-full overflow-hidden rounded-md shadow-sm transition-all border ${m!=null&&m.length?"border-red-500/60":c?"border-dashed border-amber-500/60 bg-card/60":"bg-card/80"} ${n?"animate-border-pulse":""}`,children:[b.jsx(gt,{type:"target",position:Ee.Top,id:"top",className:N.length>0?ea:ta}),b.jsx(gt,{type:"source",position:Ee.Bottom,id:"bottom",className:C.length>0?ea:ta}),b.jsx(gt,{type:"source",position:Ee.Right,id:"right-src",className:k.length>0?ea:ta,style:{top:"75%"}}),b.jsx(gt,{type:"target",position:Ee.Right,id:"right-tgt",className:M.length>0?ea:ta,style:{top:"25%"}}),b.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1.5 min-w-0",children:[b.jsx(v,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),b.jsx("span",{className:"text-xs font-medium text-foreground truncate",children:i}),R,O,b.jsxs("span",{className:"ml-auto shrink-0 text-[10px] text-muted-foreground",children:[s," ",s===1?"method":"methods"]}),g&&b.jsx("button",{className:"flex items-center justify-center rounded-sm border border-border bg-muted p-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",onClick:I=>{I.stopPropagation(),g(e)},title:"Explain",children:b.jsx(Jo,{className:"h-2.5 w-2.5"})})]})]})}const _F=T.memo(wF),qc="!bg-muted-foreground !border-none !w-[4px] !h-[4px] !z-10",Ic="!invisible";function SF({id:e,data:t,selected:n}){const{label:i,isAsync:o,isExported:s,paramCount:l,statementCount:c,maxNestingDepth:f,isDead:h,onExplain:p}=t,m=c!=null&&c>30||f!=null&&f>4||l>=5,g=vn({handleType:"target",handleId:"top"}),v=vn({handleType:"source",handleId:"bottom"}),_=vn({handleType:"source",handleId:"right-src"}),E=vn({handleType:"target",handleId:"right-tgt"}),S=h&&b.jsxs("div",{className:"group/dead relative shrink-0",children:[b.jsx(_r,{className:"h-2.5 w-2.5 text-amber-500"}),b.jsx("div",{className:"pointer-events-none absolute left-1/2 bottom-full mb-1.5 -translate-x-1/2 z-[9999] hidden group-hover/dead:block",children:b.jsxs("div",{className:"rounded-md border border-amber-500/30 bg-card px-2.5 py-2 shadow-lg w-[200px]",children:[b.jsx("p",{className:"text-[10px] font-semibold text-amber-500 mb-1",children:"Dead Method"}),b.jsxs("p",{className:"text-[10px] text-muted-foreground leading-tight",children:[b.jsx("span",{className:"font-medium text-foreground",children:i})," has no incoming or outgoing calls — it may be unused."]})]})})]});return b.jsxs("div",{className:`rounded transition-all overflow-hidden ${h?"border border-dashed border-amber-500/60 bg-card/60":"border border-border/50 bg-card/80"} ${n?"bg-card animate-border-pulse":""}`,style:{width:"100%",maxWidth:"100%"},children:[b.jsx(gt,{type:"target",position:Ee.Top,id:"top",className:g.length>0?qc:Ic}),b.jsx(gt,{type:"source",position:Ee.Bottom,id:"bottom",className:v.length>0?qc:Ic}),b.jsx(gt,{type:"source",position:Ee.Right,id:"right-src",className:_.length>0?qc:Ic,style:{top:"75%"}}),b.jsx(gt,{type:"target",position:Ee.Right,id:"right-tgt",className:E.length>0?qc:Ic,style:{top:"25%"}}),b.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 min-w-0",children:[o&&b.jsx(Tb,{className:"h-2.5 w-2.5 shrink-0 text-yellow-500"}),b.jsx("span",{className:`text-[11px] truncate ${s?"font-medium":""} text-foreground`,children:i}),b.jsx("span",{className:"ml-auto shrink-0"}),S,m&&!h&&b.jsx(_r,{className:"h-2.5 w-2.5 text-amber-500"}),p&&b.jsx("button",{className:"flex items-center justify-center rounded-sm border border-border bg-muted p-0.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",onClick:w=>{w.stopPropagation(),p(e)},title:"Explain",children:b.jsx(Jo,{className:"h-2.5 w-2.5"})})]})]})}const EF=T.memo(SF);function CF({id:e,sourceX:t,sourceY:n,targetX:i,targetY:o,sourcePosition:s,targetPosition:l,data:c,selected:f}){c==null||c.dependencyCount;const h=(c==null?void 0:c.hasHttpCalls)??!1,p=(c==null?void 0:c.isViolation)??!1,m=(c==null?void 0:c.label)??"",g=(c==null?void 0:c.highlighted)===!0,v=(c==null?void 0:c.dimmed)===!0,_=(c==null?void 0:c.hidden)===!0,E=(c==null?void 0:c.edgeStyle)==="step",S=g||f,w=p?S?3:2:S?2:h?1.5:1,N=E?Go:ns,[C,k,M]=N({sourceX:t,sourceY:n,targetX:i,targetY:o,sourcePosition:s,targetPosition:l,...E?{borderRadius:8}:{}}),R=p?"#ef4444":S?"var(--primary)":h?"#60a5fa":"var(--muted-foreground)",O=`dep-arrow-${e}`;return b.jsxs(b.Fragment,{children:[b.jsx("defs",{children:b.jsx("marker",{id:O,viewBox:"0 0 10 10",refX:"8",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto",children:b.jsx("path",{d:"M 0 1 L 8 5 L 0 9 z",fill:R,opacity:_?0:v?.08:.6})})}),b.jsx("path",{id:e,d:C,fill:"none",stroke:R,strokeWidth:w,strokeDasharray:h?"8 4":"2 3",opacity:_?0:v?.08:S?1:.6,markerEnd:`url(#${O})`,className:v||_?"":"animate-edge-flow",style:{transition:"opacity 0.2s ease",pointerEvents:_?"none":void 0}}),m&&!v&&!_&&b.jsx(Gf,{children:b.jsx("div",{style:{position:"absolute",transform:`translate(-50%, -50%) translate(${k}px, ${M}px)`,pointerEvents:"all"},className:"rounded bg-card px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground shadow-sm border border-border",children:m})})]})}const _C=T.memo(CF);function NF({id:e,sourceX:t,sourceY:n,targetX:i,targetY:o,sourcePosition:s,targetPosition:l,data:c,selected:f}){const h=(c==null?void 0:c.dependencyCount)??0,p=(c==null?void 0:c.hasHttpCalls)??!1,m=(c==null?void 0:c.isViolation)??!1,g=(c==null?void 0:c.highlighted)===!0,v=(c==null?void 0:c.dimmed)===!0,_=(c==null?void 0:c.hidden)===!0,E=(c==null?void 0:c.edgeStyle)==="step",S=s===l,[w,N,C]=S||E?Go({sourceX:t,sourceY:n,targetX:i,targetY:o,sourcePosition:s,targetPosition:l,borderRadius:8}):ns({sourceX:t,sourceY:n,targetX:i,targetY:o,sourcePosition:s,targetPosition:l}),k=g||f,M=m?"#ef4444":k?"var(--primary)":p?"#60a5fa":"var(--muted-foreground)",R=m?k?3:2:k?2:p?1.5:1,O=_?0:v?.08:k?1:.6,I=p?"8 4":"2 3",V=S?"":p?`${h} HTTP call${h!==1?"s":""}`:`${h} import${h!==1?"s":""}`,K=`layer-arrow-${e}`;return b.jsxs(b.Fragment,{children:[b.jsx("defs",{children:b.jsx("marker",{id:K,viewBox:"0 0 10 10",refX:"8",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto",children:b.jsx("path",{d:"M 0 1 L 8 5 L 0 9 z",fill:M,opacity:O})})}),b.jsx("path",{id:e,d:w,fill:"none",stroke:M,strokeWidth:R,strokeDasharray:I,opacity:O,markerEnd:`url(#${K})`,className:v||_?"":"animate-edge-flow",style:{transition:"opacity 0.2s ease",pointerEvents:_?"none":void 0}}),V&&!v&&!_&&b.jsx(Gf,{children:b.jsx("div",{style:{position:"absolute",transform:`translate(-50%, -50%) translate(${N}px, ${C}px)`,pointerEvents:"all"},className:"rounded bg-card px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground shadow-sm border border-border z-10",children:V})})]})}const kF=T.memo(NF);function TF({id:e,sourceX:t,sourceY:n,targetX:i,targetY:o,sourcePosition:s,targetPosition:l,data:c,selected:f}){const h=(c==null?void 0:c.dimmed)===!0,p=(c==null?void 0:c.hidden)===!0,m=(c==null?void 0:c.edgeStyle)==="step",g=m?Go:ns,[v,_,E]=g({sourceX:t,sourceY:n,targetX:i,targetY:o,sourcePosition:s,targetPosition:l,...m?{borderRadius:8}:{}}),S=f,w=S?"var(--primary)":"#f59e0b",N=S?2:1.5,C=p?0:h?.08:1,k=`db-arrow-${e}`;return b.jsxs(b.Fragment,{children:[b.jsx("defs",{children:b.jsx("marker",{id:k,viewBox:"0 0 10 10",refX:"8",refY:"5",markerWidth:"6",markerHeight:"6",orient:"auto",children:b.jsx("path",{d:"M 0 1 L 8 5 L 0 9 z",fill:w,opacity:C})})}),b.jsx("path",{id:e,d:v,fill:"none",stroke:w,strokeWidth:N,strokeDasharray:"6 3",opacity:C,markerEnd:`url(#${k})`,className:h||p?"":"animate-edge-flow",style:{transition:"opacity 0.2s ease",pointerEvents:p?"none":void 0}}),!h&&!p&&b.jsx(Gf,{children:b.jsx("div",{style:{position:"absolute",transform:`translate(-50%, -50%) translate(${_}px, ${E}px)`,pointerEvents:"all"},className:"rounded bg-card px-1.5 py-0.5 text-[10px] font-medium text-amber-500 shadow-sm border border-amber-500/30 z-10",children:b.jsx("span",{className:"flex items-center gap-1",children:"DB"})})})]})}const AF=T.memo(TF),RF=T.forwardRef(function(t,n){const{className:i,render:o,orientation:s="horizontal",...l}=t;return Yn("div",t,{state:{orientation:s},ref:n,props:[{role:"separator","aria-orientation":s},l]})});function Wp({className:e,orientation:t="horizontal",...n}){return b.jsx(RF,{"data-slot":"separator",orientation:t,className:xn("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",e),...n})}function U5({onAutoLayout:e,panMode:t,onTogglePanMode:n}){const{zoomIn:i,zoomOut:o,fitView:s}=Ha();return b.jsxs("div",{className:"absolute bottom-4 left-4 z-10 flex flex-col gap-1 rounded-lg border border-border bg-card p-1 shadow-md",children:[b.jsx(An,{variant:"ghost",size:"icon-xs",onClick:()=>i(),"aria-label":"Zoom in",children:b.jsx(f6,{className:"h-4 w-4"})}),b.jsx(An,{variant:"ghost",size:"icon-xs",onClick:()=>o(),"aria-label":"Zoom out",children:b.jsx(d6,{className:"h-4 w-4"})}),b.jsx(Wp,{}),b.jsx(An,{variant:"ghost",size:"icon-xs",onClick:()=>s({padding:.3,duration:300}),"aria-label":"Fit view",children:b.jsx(p3,{className:"h-4 w-4"})}),e&&b.jsxs(b.Fragment,{children:[b.jsx(Wp,{}),b.jsx(An,{variant:"ghost",size:"icon-xs",onClick:()=>{e(),setTimeout(()=>s({padding:.3,duration:300}),50)},"aria-label":"Auto layout",children:b.jsx(Wq,{className:"h-4 w-4"})})]}),n&&b.jsxs(b.Fragment,{children:[b.jsx(Wp,{}),b.jsx(An,{variant:"ghost",size:"icon-xs",onClick:n,"aria-label":t?"Switch to select mode":"Switch to move mode",title:t?"Switch to select mode":"Switch to move mode",children:t?b.jsx(n6,{className:"h-4 w-4"}):b.jsx(Zq,{className:"h-4 w-4"})})]})]})}const SC=[{value:"services",label:"Services"},{value:"modules",label:"Modules"},{value:"methods",label:"Functions"}];function MF({level:e,onChange:t}){return b.jsx("div",{className:"flex items-center rounded-md border border-border bg-card shadow-sm",children:SC.map(({value:n,label:i},o)=>b.jsx("button",{className:`px-3 py-1.5 text-xs font-medium transition-colors ${e===n?"bg-primary/20 text-primary":"text-muted-foreground hover:text-foreground"} ${o===0?"rounded-l-md":""} ${o===SC.length-1?"rounded-r-md":""}`,onClick:()=>t(n),children:i},n))})}function jF(e,t,n,i,o){const[s,l]=T.useState(new Set),c=T.useRef(!1),f=T.useRef(null),h=T.useRef(null);T.useEffect(()=>{if(t==="services"||!e||o===void 0)return;const E=`${e}:${t}:${o.join(",")}`;h.current!==E&&(h.current=E,l(new Set(o)))},[e,t,o]);const p=T.useCallback((E,S=!1)=>{t==="services"||!e||(f.current&&clearTimeout(f.current),S?r2(e,[...E],i,t).catch(()=>{}):f.current=setTimeout(()=>{r2(e,[...E],i,t).catch(()=>{})},300))},[e,i,t]),m=T.useCallback(E=>{l(S=>{const w=new Set(S);return w.has(E)?w.delete(E):w.add(E),p(w),w})},[p]),g=T.useCallback(()=>{c.current=!0;const E=new Set;l(E),p(E,!0)},[p]),v=T.useCallback(()=>{c.current=!0;const E=new Set;for(const S of n)S.type==="layer"&&S.data.isContainer&&E.add(S.id),t==="methods"&&S.type==="module"&&S.data.isContainer&&E.add(S.id);l(E),p(E,!0)},[n,t,p]),_=T.useCallback(()=>{const E=c.current;return c.current=!1,E},[]);return{collapsedIds:s,toggle:m,expandAll:g,collapseAll:v,isBulkAction:_}}function i1(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 Jp,EC;function OF(){if(EC)return Jp;EC=1;function e(){this.__data__=[],this.size=0}return Jp=e,Jp}var em,CC;function rs(){if(CC)return em;CC=1;function e(t,n){return t===n||t!==t&&n!==n}return em=e,em}var tm,NC;function Xf(){if(NC)return tm;NC=1;var e=rs();function t(n,i){for(var o=n.length;o--;)if(e(n[o][0],i))return o;return-1}return tm=t,tm}var nm,kC;function zF(){if(kC)return nm;kC=1;var e=Xf(),t=Array.prototype,n=t.splice;function i(o){var s=this.__data__,l=e(s,o);if(l<0)return!1;var c=s.length-1;return l==c?s.pop():n.call(s,l,1),--this.size,!0}return nm=i,nm}var rm,TC;function DF(){if(TC)return rm;TC=1;var e=Xf();function t(n){var i=this.__data__,o=e(i,n);return o<0?void 0:i[o][1]}return rm=t,rm}var im,AC;function LF(){if(AC)return im;AC=1;var e=Xf();function t(n){return e(this.__data__,n)>-1}return im=t,im}var am,RC;function qF(){if(RC)return am;RC=1;var e=Xf();function t(n,i){var o=this.__data__,s=e(o,n);return s<0?(++this.size,o.push([n,i])):o[s][1]=i,this}return am=t,am}var om,MC;function Kf(){if(MC)return om;MC=1;var e=OF(),t=zF(),n=DF(),i=LF(),o=qF();function s(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var h=l[c];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=i,s.prototype.set=o,om=s,om}var sm,jC;function IF(){if(jC)return sm;jC=1;var e=Kf();function t(){this.__data__=new e,this.size=0}return sm=t,sm}var lm,OC;function BF(){if(OC)return lm;OC=1;function e(t){var n=this.__data__,i=n.delete(t);return this.size=n.size,i}return lm=e,lm}var um,zC;function HF(){if(zC)return um;zC=1;function e(t){return this.__data__.get(t)}return um=e,um}var cm,DC;function UF(){if(DC)return cm;DC=1;function e(t){return this.__data__.has(t)}return cm=e,cm}var fm,LC;function P5(){if(LC)return fm;LC=1;var e=typeof wc=="object"&&wc&&wc.Object===Object&&wc;return fm=e,fm}var dm,qC;function kr(){if(qC)return dm;qC=1;var e=P5(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return dm=n,dm}var hm,IC;function is(){if(IC)return hm;IC=1;var e=kr(),t=e.Symbol;return hm=t,hm}var pm,BC;function PF(){if(BC)return pm;BC=1;var e=is(),t=Object.prototype,n=t.hasOwnProperty,i=t.toString,o=e?e.toStringTag:void 0;function s(l){var c=n.call(l,o),f=l[o];try{l[o]=void 0;var h=!0}catch{}var p=i.call(l);return h&&(c?l[o]=f:delete l[o]),p}return pm=s,pm}var mm,HC;function VF(){if(HC)return mm;HC=1;var e=Object.prototype,t=e.toString;function n(i){return t.call(i)}return mm=n,mm}var gm,UC;function Ua(){if(UC)return gm;UC=1;var e=is(),t=PF(),n=VF(),i="[object Null]",o="[object Undefined]",s=e?e.toStringTag:void 0;function l(c){return c==null?c===void 0?o:i:s&&s in Object(c)?t(c):n(c)}return gm=l,gm}var ym,PC;function cr(){if(PC)return ym;PC=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return ym=e,ym}var vm,VC;function Ql(){if(VC)return vm;VC=1;var e=Ua(),t=cr(),n="[object AsyncFunction]",i="[object Function]",o="[object GeneratorFunction]",s="[object Proxy]";function l(c){if(!t(c))return!1;var f=e(c);return f==i||f==o||f==n||f==s}return vm=l,vm}var xm,FC;function FF(){if(FC)return xm;FC=1;var e=kr(),t=e["__core-js_shared__"];return xm=t,xm}var bm,$C;function $F(){if($C)return bm;$C=1;var e=FF(),t=(function(){var i=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})();function n(i){return!!t&&t in i}return bm=n,bm}var wm,YC;function V5(){if(YC)return wm;YC=1;var e=Function.prototype,t=e.toString;function n(i){if(i!=null){try{return t.call(i)}catch{}try{return i+""}catch{}}return""}return wm=n,wm}var _m,GC;function YF(){if(GC)return _m;GC=1;var e=Ql(),t=$F(),n=cr(),i=V5(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,f=l.toString,h=c.hasOwnProperty,p=RegExp("^"+f.call(h).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function m(g){if(!n(g)||t(g))return!1;var v=e(g)?p:s;return v.test(i(g))}return _m=m,_m}var Sm,XC;function GF(){if(XC)return Sm;XC=1;function e(t,n){return t==null?void 0:t[n]}return Sm=e,Sm}var Em,KC;function Pa(){if(KC)return Em;KC=1;var e=YF(),t=GF();function n(i,o){var s=t(i,o);return e(s)?s:void 0}return Em=n,Em}var Cm,QC;function a1(){if(QC)return Cm;QC=1;var e=Pa(),t=kr(),n=e(t,"Map");return Cm=n,Cm}var Nm,ZC;function Qf(){if(ZC)return Nm;ZC=1;var e=Pa(),t=e(Object,"create");return Nm=t,Nm}var km,WC;function XF(){if(WC)return km;WC=1;var e=Qf();function t(){this.__data__=e?e(null):{},this.size=0}return km=t,km}var Tm,JC;function KF(){if(JC)return Tm;JC=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Tm=e,Tm}var Am,eN;function QF(){if(eN)return Am;eN=1;var e=Qf(),t="__lodash_hash_undefined__",n=Object.prototype,i=n.hasOwnProperty;function o(s){var l=this.__data__;if(e){var c=l[s];return c===t?void 0:c}return i.call(l,s)?l[s]:void 0}return Am=o,Am}var Rm,tN;function ZF(){if(tN)return Rm;tN=1;var e=Qf(),t=Object.prototype,n=t.hasOwnProperty;function i(o){var s=this.__data__;return e?s[o]!==void 0:n.call(s,o)}return Rm=i,Rm}var Mm,nN;function WF(){if(nN)return Mm;nN=1;var e=Qf(),t="__lodash_hash_undefined__";function n(i,o){var s=this.__data__;return this.size+=this.has(i)?0:1,s[i]=e&&o===void 0?t:o,this}return Mm=n,Mm}var jm,rN;function JF(){if(rN)return jm;rN=1;var e=XF(),t=KF(),n=QF(),i=ZF(),o=WF();function s(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var h=l[c];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=i,s.prototype.set=o,jm=s,jm}var Om,iN;function e$(){if(iN)return Om;iN=1;var e=JF(),t=Kf(),n=a1();function i(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Om=i,Om}var zm,aN;function t$(){if(aN)return zm;aN=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return zm=e,zm}var Dm,oN;function Zf(){if(oN)return Dm;oN=1;var e=t$();function t(n,i){var o=n.__data__;return e(i)?o[typeof i=="string"?"string":"hash"]:o.map}return Dm=t,Dm}var Lm,sN;function n$(){if(sN)return Lm;sN=1;var e=Zf();function t(n){var i=e(this,n).delete(n);return this.size-=i?1:0,i}return Lm=t,Lm}var qm,lN;function r$(){if(lN)return qm;lN=1;var e=Zf();function t(n){return e(this,n).get(n)}return qm=t,qm}var Im,uN;function i$(){if(uN)return Im;uN=1;var e=Zf();function t(n){return e(this,n).has(n)}return Im=t,Im}var Bm,cN;function a$(){if(cN)return Bm;cN=1;var e=Zf();function t(n,i){var o=e(this,n),s=o.size;return o.set(n,i),this.size+=o.size==s?0:1,this}return Bm=t,Bm}var Hm,fN;function o1(){if(fN)return Hm;fN=1;var e=e$(),t=n$(),n=r$(),i=i$(),o=a$();function s(l){var c=-1,f=l==null?0:l.length;for(this.clear();++c<f;){var h=l[c];this.set(h[0],h[1])}}return s.prototype.clear=e,s.prototype.delete=t,s.prototype.get=n,s.prototype.has=i,s.prototype.set=o,Hm=s,Hm}var Um,dN;function o$(){if(dN)return Um;dN=1;var e=Kf(),t=a1(),n=o1(),i=200;function o(s,l){var c=this.__data__;if(c instanceof e){var f=c.__data__;if(!t||f.length<i-1)return f.push([s,l]),this.size=++c.size,this;c=this.__data__=new n(f)}return c.set(s,l),this.size=c.size,this}return Um=o,Um}var Pm,hN;function Wf(){if(hN)return Pm;hN=1;var e=Kf(),t=IF(),n=BF(),i=HF(),o=UF(),s=o$();function l(c){var f=this.__data__=new e(c);this.size=f.size}return l.prototype.clear=t,l.prototype.delete=n,l.prototype.get=i,l.prototype.has=o,l.prototype.set=s,Pm=l,Pm}var Vm,pN;function s1(){if(pN)return Vm;pN=1;function e(t,n){for(var i=-1,o=t==null?0:t.length;++i<o&&n(t[i],i,t)!==!1;);return t}return Vm=e,Vm}var Fm,mN;function F5(){if(mN)return Fm;mN=1;var e=Pa(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Fm=t,Fm}var $m,gN;function Jf(){if(gN)return $m;gN=1;var e=F5();function t(n,i,o){i=="__proto__"&&e?e(n,i,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[i]=o}return $m=t,$m}var Ym,yN;function ed(){if(yN)return Ym;yN=1;var e=Jf(),t=rs(),n=Object.prototype,i=n.hasOwnProperty;function o(s,l,c){var f=s[l];(!(i.call(s,l)&&t(f,c))||c===void 0&&!(l in s))&&e(s,l,c)}return Ym=o,Ym}var Gm,vN;function Zl(){if(vN)return Gm;vN=1;var e=ed(),t=Jf();function n(i,o,s,l){var c=!s;s||(s={});for(var f=-1,h=o.length;++f<h;){var p=o[f],m=l?l(s[p],i[p],p,s,i):void 0;m===void 0&&(m=i[p]),c?t(s,p,m):e(s,p,m)}return s}return Gm=n,Gm}var Xm,xN;function s$(){if(xN)return Xm;xN=1;function e(t,n){for(var i=-1,o=Array(t);++i<t;)o[i]=n(i);return o}return Xm=e,Xm}var Km,bN;function Pr(){if(bN)return Km;bN=1;function e(t){return t!=null&&typeof t=="object"}return Km=e,Km}var Qm,wN;function l$(){if(wN)return Qm;wN=1;var e=Ua(),t=Pr(),n="[object Arguments]";function i(o){return t(o)&&e(o)==n}return Qm=i,Qm}var Zm,_N;function Wl(){if(_N)return Zm;_N=1;var e=l$(),t=Pr(),n=Object.prototype,i=n.hasOwnProperty,o=n.propertyIsEnumerable,s=e((function(){return arguments})())?e:function(l){return t(l)&&i.call(l,"callee")&&!o.call(l,"callee")};return Zm=s,Zm}var Wm,SN;function Jt(){if(SN)return Wm;SN=1;var e=Array.isArray;return Wm=e,Wm}var yl={exports:{}},Jm,EN;function u$(){if(EN)return Jm;EN=1;function e(){return!1}return Jm=e,Jm}yl.exports;var CN;function as(){return CN||(CN=1,(function(e,t){var n=kr(),i=u$(),o=t&&!t.nodeType&&t,s=o&&!0&&e&&!e.nodeType&&e,l=s&&s.exports===o,c=l?n.Buffer:void 0,f=c?c.isBuffer:void 0,h=f||i;e.exports=h})(yl,yl.exports)),yl.exports}var eg,NN;function td(){if(NN)return eg;NN=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(i,o){var s=typeof i;return o=o??e,!!o&&(s=="number"||s!="symbol"&&t.test(i))&&i>-1&&i%1==0&&i<o}return eg=n,eg}var tg,kN;function l1(){if(kN)return tg;kN=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return tg=t,tg}var ng,TN;function c$(){if(TN)return ng;TN=1;var e=Ua(),t=l1(),n=Pr(),i="[object Arguments]",o="[object Array]",s="[object Boolean]",l="[object Date]",c="[object Error]",f="[object Function]",h="[object Map]",p="[object Number]",m="[object Object]",g="[object RegExp]",v="[object Set]",_="[object String]",E="[object WeakMap]",S="[object ArrayBuffer]",w="[object DataView]",N="[object Float32Array]",C="[object Float64Array]",k="[object Int8Array]",M="[object Int16Array]",R="[object Int32Array]",O="[object Uint8Array]",I="[object Uint8ClampedArray]",V="[object Uint16Array]",K="[object Uint32Array]",H={};H[N]=H[C]=H[k]=H[M]=H[R]=H[O]=H[I]=H[V]=H[K]=!0,H[i]=H[o]=H[S]=H[s]=H[w]=H[l]=H[c]=H[f]=H[h]=H[p]=H[m]=H[g]=H[v]=H[_]=H[E]=!1;function F(X){return n(X)&&t(X.length)&&!!H[e(X)]}return ng=F,ng}var rg,AN;function nd(){if(AN)return rg;AN=1;function e(t){return function(n){return t(n)}}return rg=e,rg}var vl={exports:{}};vl.exports;var RN;function u1(){return RN||(RN=1,(function(e,t){var n=P5(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===i,l=s&&n.process,c=(function(){try{var f=o&&o.require&&o.require("util").types;return f||l&&l.binding&&l.binding("util")}catch{}})();e.exports=c})(vl,vl.exports)),vl.exports}var ig,MN;function Jl(){if(MN)return ig;MN=1;var e=c$(),t=nd(),n=u1(),i=n&&n.isTypedArray,o=i?t(i):e;return ig=o,ig}var ag,jN;function $5(){if(jN)return ag;jN=1;var e=s$(),t=Wl(),n=Jt(),i=as(),o=td(),s=Jl(),l=Object.prototype,c=l.hasOwnProperty;function f(h,p){var m=n(h),g=!m&&t(h),v=!m&&!g&&i(h),_=!m&&!g&&!v&&s(h),E=m||g||v||_,S=E?e(h.length,String):[],w=S.length;for(var N in h)(p||c.call(h,N))&&!(E&&(N=="length"||v&&(N=="offset"||N=="parent")||_&&(N=="buffer"||N=="byteLength"||N=="byteOffset")||o(N,w)))&&S.push(N);return S}return ag=f,ag}var og,ON;function rd(){if(ON)return og;ON=1;var e=Object.prototype;function t(n){var i=n&&n.constructor,o=typeof i=="function"&&i.prototype||e;return n===o}return og=t,og}var sg,zN;function Y5(){if(zN)return sg;zN=1;function e(t,n){return function(i){return t(n(i))}}return sg=e,sg}var lg,DN;function f$(){if(DN)return lg;DN=1;var e=Y5(),t=e(Object.keys,Object);return lg=t,lg}var ug,LN;function c1(){if(LN)return ug;LN=1;var e=rd(),t=f$(),n=Object.prototype,i=n.hasOwnProperty;function o(s){if(!e(s))return t(s);var l=[];for(var c in Object(s))i.call(s,c)&&c!="constructor"&&l.push(c);return l}return ug=o,ug}var cg,qN;function yi(){if(qN)return cg;qN=1;var e=Ql(),t=l1();function n(i){return i!=null&&t(i.length)&&!e(i)}return cg=n,cg}var fg,IN;function la(){if(IN)return fg;IN=1;var e=$5(),t=c1(),n=yi();function i(o){return n(o)?e(o):t(o)}return fg=i,fg}var dg,BN;function d$(){if(BN)return dg;BN=1;var e=Zl(),t=la();function n(i,o){return i&&e(o,t(o),i)}return dg=n,dg}var hg,HN;function h$(){if(HN)return hg;HN=1;function e(t){var n=[];if(t!=null)for(var i in Object(t))n.push(i);return n}return hg=e,hg}var pg,UN;function p$(){if(UN)return pg;UN=1;var e=cr(),t=rd(),n=h$(),i=Object.prototype,o=i.hasOwnProperty;function s(l){if(!e(l))return n(l);var c=t(l),f=[];for(var h in l)h=="constructor"&&(c||!o.call(l,h))||f.push(h);return f}return pg=s,pg}var mg,PN;function Va(){if(PN)return mg;PN=1;var e=$5(),t=p$(),n=yi();function i(o){return n(o)?e(o,!0):t(o)}return mg=i,mg}var gg,VN;function m$(){if(VN)return gg;VN=1;var e=Zl(),t=Va();function n(i,o){return i&&e(o,t(o),i)}return gg=n,gg}var xl={exports:{}};xl.exports;var FN;function G5(){return FN||(FN=1,(function(e,t){var n=kr(),i=t&&!t.nodeType&&t,o=i&&!0&&e&&!e.nodeType&&e,s=o&&o.exports===i,l=s?n.Buffer:void 0,c=l?l.allocUnsafe:void 0;function f(h,p){if(p)return h.slice();var m=h.length,g=c?c(m):new h.constructor(m);return h.copy(g),g}e.exports=f})(xl,xl.exports)),xl.exports}var yg,$N;function X5(){if($N)return yg;$N=1;function e(t,n){var i=-1,o=t.length;for(n||(n=Array(o));++i<o;)n[i]=t[i];return n}return yg=e,yg}var vg,YN;function K5(){if(YN)return vg;YN=1;function e(t,n){for(var i=-1,o=t==null?0:t.length,s=0,l=[];++i<o;){var c=t[i];n(c,i,t)&&(l[s++]=c)}return l}return vg=e,vg}var xg,GN;function Q5(){if(GN)return xg;GN=1;function e(){return[]}return xg=e,xg}var bg,XN;function f1(){if(XN)return bg;XN=1;var e=K5(),t=Q5(),n=Object.prototype,i=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(l){return l==null?[]:(l=Object(l),e(o(l),function(c){return i.call(l,c)}))}:t;return bg=s,bg}var wg,KN;function g$(){if(KN)return wg;KN=1;var e=Zl(),t=f1();function n(i,o){return e(i,t(i),o)}return wg=n,wg}var _g,QN;function d1(){if(QN)return _g;QN=1;function e(t,n){for(var i=-1,o=n.length,s=t.length;++i<o;)t[s+i]=n[i];return t}return _g=e,_g}var Sg,ZN;function id(){if(ZN)return Sg;ZN=1;var e=Y5(),t=e(Object.getPrototypeOf,Object);return Sg=t,Sg}var Eg,WN;function Z5(){if(WN)return Eg;WN=1;var e=d1(),t=id(),n=f1(),i=Q5(),o=Object.getOwnPropertySymbols,s=o?function(l){for(var c=[];l;)e(c,n(l)),l=t(l);return c}:i;return Eg=s,Eg}var Cg,JN;function y$(){if(JN)return Cg;JN=1;var e=Zl(),t=Z5();function n(i,o){return e(i,t(i),o)}return Cg=n,Cg}var Ng,ek;function W5(){if(ek)return Ng;ek=1;var e=d1(),t=Jt();function n(i,o,s){var l=o(i);return t(i)?l:e(l,s(i))}return Ng=n,Ng}var kg,tk;function J5(){if(tk)return kg;tk=1;var e=W5(),t=f1(),n=la();function i(o){return e(o,n,t)}return kg=i,kg}var Tg,nk;function v$(){if(nk)return Tg;nk=1;var e=W5(),t=Z5(),n=Va();function i(o){return e(o,n,t)}return Tg=i,Tg}var Ag,rk;function x$(){if(rk)return Ag;rk=1;var e=Pa(),t=kr(),n=e(t,"DataView");return Ag=n,Ag}var Rg,ik;function b$(){if(ik)return Rg;ik=1;var e=Pa(),t=kr(),n=e(t,"Promise");return Rg=n,Rg}var Mg,ak;function eO(){if(ak)return Mg;ak=1;var e=Pa(),t=kr(),n=e(t,"Set");return Mg=n,Mg}var jg,ok;function w$(){if(ok)return jg;ok=1;var e=Pa(),t=kr(),n=e(t,"WeakMap");return jg=n,jg}var Og,sk;function os(){if(sk)return Og;sk=1;var e=x$(),t=a1(),n=b$(),i=eO(),o=w$(),s=Ua(),l=V5(),c="[object Map]",f="[object Object]",h="[object Promise]",p="[object Set]",m="[object WeakMap]",g="[object DataView]",v=l(e),_=l(t),E=l(n),S=l(i),w=l(o),N=s;return(e&&N(new e(new ArrayBuffer(1)))!=g||t&&N(new t)!=c||n&&N(n.resolve())!=h||i&&N(new i)!=p||o&&N(new o)!=m)&&(N=function(C){var k=s(C),M=k==f?C.constructor:void 0,R=M?l(M):"";if(R)switch(R){case v:return g;case _:return c;case E:return h;case S:return p;case w:return m}return k}),Og=N,Og}var zg,lk;function _$(){if(lk)return zg;lk=1;var e=Object.prototype,t=e.hasOwnProperty;function n(i){var o=i.length,s=new i.constructor(o);return o&&typeof i[0]=="string"&&t.call(i,"index")&&(s.index=i.index,s.input=i.input),s}return zg=n,zg}var Dg,uk;function tO(){if(uk)return Dg;uk=1;var e=kr(),t=e.Uint8Array;return Dg=t,Dg}var Lg,ck;function h1(){if(ck)return Lg;ck=1;var e=tO();function t(n){var i=new n.constructor(n.byteLength);return new e(i).set(new e(n)),i}return Lg=t,Lg}var qg,fk;function S$(){if(fk)return qg;fk=1;var e=h1();function t(n,i){var o=i?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.byteLength)}return qg=t,qg}var Ig,dk;function E$(){if(dk)return Ig;dk=1;var e=/\w*$/;function t(n){var i=new n.constructor(n.source,e.exec(n));return i.lastIndex=n.lastIndex,i}return Ig=t,Ig}var Bg,hk;function C$(){if(hk)return Bg;hk=1;var e=is(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function i(o){return n?Object(n.call(o)):{}}return Bg=i,Bg}var Hg,pk;function nO(){if(pk)return Hg;pk=1;var e=h1();function t(n,i){var o=i?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}return Hg=t,Hg}var Ug,mk;function N$(){if(mk)return Ug;mk=1;var e=h1(),t=S$(),n=E$(),i=C$(),o=nO(),s="[object Boolean]",l="[object Date]",c="[object Map]",f="[object Number]",h="[object RegExp]",p="[object Set]",m="[object String]",g="[object Symbol]",v="[object ArrayBuffer]",_="[object DataView]",E="[object Float32Array]",S="[object Float64Array]",w="[object Int8Array]",N="[object Int16Array]",C="[object Int32Array]",k="[object Uint8Array]",M="[object Uint8ClampedArray]",R="[object Uint16Array]",O="[object Uint32Array]";function I(V,K,H){var F=V.constructor;switch(K){case v:return e(V);case s:case l:return new F(+V);case _:return t(V,H);case E:case S:case w:case N:case C:case k:case M:case R:case O:return o(V,H);case c:return new F;case f:case m:return new F(V);case h:return n(V);case p:return new F;case g:return i(V)}}return Ug=I,Ug}var Pg,gk;function rO(){if(gk)return Pg;gk=1;var e=cr(),t=Object.create,n=(function(){function i(){}return function(o){if(!e(o))return{};if(t)return t(o);i.prototype=o;var s=new i;return i.prototype=void 0,s}})();return Pg=n,Pg}var Vg,yk;function iO(){if(yk)return Vg;yk=1;var e=rO(),t=id(),n=rd();function i(o){return typeof o.constructor=="function"&&!n(o)?e(t(o)):{}}return Vg=i,Vg}var Fg,vk;function k$(){if(vk)return Fg;vk=1;var e=os(),t=Pr(),n="[object Map]";function i(o){return t(o)&&e(o)==n}return Fg=i,Fg}var $g,xk;function T$(){if(xk)return $g;xk=1;var e=k$(),t=nd(),n=u1(),i=n&&n.isMap,o=i?t(i):e;return $g=o,$g}var Yg,bk;function A$(){if(bk)return Yg;bk=1;var e=os(),t=Pr(),n="[object Set]";function i(o){return t(o)&&e(o)==n}return Yg=i,Yg}var Gg,wk;function R$(){if(wk)return Gg;wk=1;var e=A$(),t=nd(),n=u1(),i=n&&n.isSet,o=i?t(i):e;return Gg=o,Gg}var Xg,_k;function aO(){if(_k)return Xg;_k=1;var e=Wf(),t=s1(),n=ed(),i=d$(),o=m$(),s=G5(),l=X5(),c=g$(),f=y$(),h=J5(),p=v$(),m=os(),g=_$(),v=N$(),_=iO(),E=Jt(),S=as(),w=T$(),N=cr(),C=R$(),k=la(),M=Va(),R=1,O=2,I=4,V="[object Arguments]",K="[object Array]",H="[object Boolean]",F="[object Date]",X="[object Error]",L="[object Function]",B="[object GeneratorFunction]",z="[object Map]",U="[object Number]",G="[object Object]",Q="[object RegExp]",j="[object Set]",D="[object String]",$="[object Symbol]",q="[object WeakMap]",Y="[object ArrayBuffer]",Z="[object DataView]",W="[object Float32Array]",te="[object Float64Array]",re="[object Int8Array]",se="[object Int16Array]",me="[object Int32Array]",be="[object Uint8Array]",ve="[object Uint8ClampedArray]",we="[object Uint16Array]",ke="[object Uint32Array]",Ne={};Ne[V]=Ne[K]=Ne[Y]=Ne[Z]=Ne[H]=Ne[F]=Ne[W]=Ne[te]=Ne[re]=Ne[se]=Ne[me]=Ne[z]=Ne[U]=Ne[G]=Ne[Q]=Ne[j]=Ne[D]=Ne[$]=Ne[be]=Ne[ve]=Ne[we]=Ne[ke]=!0,Ne[X]=Ne[L]=Ne[q]=!1;function Oe(Te,_t,he,ye,Ue,_e){var Ie,Ve=_t&R,jt=_t&O,ue=_t&I;if(he&&(Ie=Ue?he(Te,ye,Ue,_e):he(Te)),Ie!==void 0)return Ie;if(!N(Te))return Te;var pe=E(Te);if(pe){if(Ie=g(Te),!Ve)return l(Te,Ie)}else{var Me=m(Te),$e=Me==L||Me==B;if(S(Te))return s(Te,Ve);if(Me==G||Me==V||$e&&!Ue){if(Ie=jt||$e?{}:_(Te),!Ve)return jt?f(Te,o(Ie,Te)):c(Te,i(Ie,Te))}else{if(!Ne[Me])return Ue?Te:{};Ie=v(Te,Me,Ve)}}_e||(_e=new e);var Ge=_e.get(Te);if(Ge)return Ge;_e.set(Te,Ie),C(Te)?Te.forEach(function(xt){Ie.add(Oe(xt,_t,he,xt,Te,_e))}):w(Te)&&Te.forEach(function(xt,ct){Ie.set(ct,Oe(xt,_t,he,ct,Te,_e))});var Ot=ue?jt?p:h:jt?M:k,en=pe?void 0:Ot(Te);return t(en||Te,function(xt,ct){en&&(ct=xt,xt=Te[ct]),n(Ie,ct,Oe(xt,_t,he,ct,Te,_e))}),Ie}return Xg=Oe,Xg}var Kg,Sk;function M$(){if(Sk)return Kg;Sk=1;var e=aO(),t=4;function n(i){return e(i,t)}return Kg=n,Kg}var Qg,Ek;function p1(){if(Ek)return Qg;Ek=1;function e(t){return function(){return t}}return Qg=e,Qg}var Zg,Ck;function j$(){if(Ck)return Zg;Ck=1;function e(t){return function(n,i,o){for(var s=-1,l=Object(n),c=o(n),f=c.length;f--;){var h=c[t?f:++s];if(i(l[h],h,l)===!1)break}return n}}return Zg=e,Zg}var Wg,Nk;function m1(){if(Nk)return Wg;Nk=1;var e=j$(),t=e();return Wg=t,Wg}var Jg,kk;function g1(){if(kk)return Jg;kk=1;var e=m1(),t=la();function n(i,o){return i&&e(i,o,t)}return Jg=n,Jg}var ey,Tk;function O$(){if(Tk)return ey;Tk=1;var e=yi();function t(n,i){return function(o,s){if(o==null)return o;if(!e(o))return n(o,s);for(var l=o.length,c=i?l:-1,f=Object(o);(i?c--:++c<l)&&s(f[c],c,f)!==!1;);return o}}return ey=t,ey}var ty,Ak;function ad(){if(Ak)return ty;Ak=1;var e=g1(),t=O$(),n=t(e);return ty=n,ty}var ny,Rk;function Fa(){if(Rk)return ny;Rk=1;function e(t){return t}return ny=e,ny}var ry,Mk;function oO(){if(Mk)return ry;Mk=1;var e=Fa();function t(n){return typeof n=="function"?n:e}return ry=t,ry}var iy,jk;function sO(){if(jk)return iy;jk=1;var e=s1(),t=ad(),n=oO(),i=Jt();function o(s,l){var c=i(s)?e:t;return c(s,n(l))}return iy=o,iy}var ay,Ok;function lO(){return Ok||(Ok=1,ay=sO()),ay}var oy,zk;function z$(){if(zk)return oy;zk=1;var e=ad();function t(n,i){var o=[];return e(n,function(s,l,c){i(s,l,c)&&o.push(s)}),o}return oy=t,oy}var sy,Dk;function D$(){if(Dk)return sy;Dk=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return sy=t,sy}var ly,Lk;function L$(){if(Lk)return ly;Lk=1;function e(t){return this.__data__.has(t)}return ly=e,ly}var uy,qk;function uO(){if(qk)return uy;qk=1;var e=o1(),t=D$(),n=L$();function i(o){var s=-1,l=o==null?0:o.length;for(this.__data__=new e;++s<l;)this.add(o[s])}return i.prototype.add=i.prototype.push=t,i.prototype.has=n,uy=i,uy}var cy,Ik;function q$(){if(Ik)return cy;Ik=1;function e(t,n){for(var i=-1,o=t==null?0:t.length;++i<o;)if(n(t[i],i,t))return!0;return!1}return cy=e,cy}var fy,Bk;function cO(){if(Bk)return fy;Bk=1;function e(t,n){return t.has(n)}return fy=e,fy}var dy,Hk;function fO(){if(Hk)return dy;Hk=1;var e=uO(),t=q$(),n=cO(),i=1,o=2;function s(l,c,f,h,p,m){var g=f&i,v=l.length,_=c.length;if(v!=_&&!(g&&_>v))return!1;var E=m.get(l),S=m.get(c);if(E&&S)return E==c&&S==l;var w=-1,N=!0,C=f&o?new e:void 0;for(m.set(l,c),m.set(c,l);++w<v;){var k=l[w],M=c[w];if(h)var R=g?h(M,k,w,c,l,m):h(k,M,w,l,c,m);if(R!==void 0){if(R)continue;N=!1;break}if(C){if(!t(c,function(O,I){if(!n(C,I)&&(k===O||p(k,O,f,h,m)))return C.push(I)})){N=!1;break}}else if(!(k===M||p(k,M,f,h,m))){N=!1;break}}return m.delete(l),m.delete(c),N}return dy=s,dy}var hy,Uk;function I$(){if(Uk)return hy;Uk=1;function e(t){var n=-1,i=Array(t.size);return t.forEach(function(o,s){i[++n]=[s,o]}),i}return hy=e,hy}var py,Pk;function y1(){if(Pk)return py;Pk=1;function e(t){var n=-1,i=Array(t.size);return t.forEach(function(o){i[++n]=o}),i}return py=e,py}var my,Vk;function B$(){if(Vk)return my;Vk=1;var e=is(),t=tO(),n=rs(),i=fO(),o=I$(),s=y1(),l=1,c=2,f="[object Boolean]",h="[object Date]",p="[object Error]",m="[object Map]",g="[object Number]",v="[object RegExp]",_="[object Set]",E="[object String]",S="[object Symbol]",w="[object ArrayBuffer]",N="[object DataView]",C=e?e.prototype:void 0,k=C?C.valueOf:void 0;function M(R,O,I,V,K,H,F){switch(I){case N:if(R.byteLength!=O.byteLength||R.byteOffset!=O.byteOffset)return!1;R=R.buffer,O=O.buffer;case w:return!(R.byteLength!=O.byteLength||!H(new t(R),new t(O)));case f:case h:case g:return n(+R,+O);case p:return R.name==O.name&&R.message==O.message;case v:case E:return R==O+"";case m:var X=o;case _:var L=V&l;if(X||(X=s),R.size!=O.size&&!L)return!1;var B=F.get(R);if(B)return B==O;V|=c,F.set(R,O);var z=i(X(R),X(O),V,K,H,F);return F.delete(R),z;case S:if(k)return k.call(R)==k.call(O)}return!1}return my=M,my}var gy,Fk;function H$(){if(Fk)return gy;Fk=1;var e=J5(),t=1,n=Object.prototype,i=n.hasOwnProperty;function o(s,l,c,f,h,p){var m=c&t,g=e(s),v=g.length,_=e(l),E=_.length;if(v!=E&&!m)return!1;for(var S=v;S--;){var w=g[S];if(!(m?w in l:i.call(l,w)))return!1}var N=p.get(s),C=p.get(l);if(N&&C)return N==l&&C==s;var k=!0;p.set(s,l),p.set(l,s);for(var M=m;++S<v;){w=g[S];var R=s[w],O=l[w];if(f)var I=m?f(O,R,w,l,s,p):f(R,O,w,s,l,p);if(!(I===void 0?R===O||h(R,O,c,f,p):I)){k=!1;break}M||(M=w=="constructor")}if(k&&!M){var V=s.constructor,K=l.constructor;V!=K&&"constructor"in s&&"constructor"in l&&!(typeof V=="function"&&V instanceof V&&typeof K=="function"&&K instanceof K)&&(k=!1)}return p.delete(s),p.delete(l),k}return gy=o,gy}var yy,$k;function U$(){if($k)return yy;$k=1;var e=Wf(),t=fO(),n=B$(),i=H$(),o=os(),s=Jt(),l=as(),c=Jl(),f=1,h="[object Arguments]",p="[object Array]",m="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function _(E,S,w,N,C,k){var M=s(E),R=s(S),O=M?p:o(E),I=R?p:o(S);O=O==h?m:O,I=I==h?m:I;var V=O==m,K=I==m,H=O==I;if(H&&l(E)){if(!l(S))return!1;M=!0,V=!1}if(H&&!V)return k||(k=new e),M||c(E)?t(E,S,w,N,C,k):n(E,S,O,w,N,C,k);if(!(w&f)){var F=V&&v.call(E,"__wrapped__"),X=K&&v.call(S,"__wrapped__");if(F||X){var L=F?E.value():E,B=X?S.value():S;return k||(k=new e),C(L,B,w,N,k)}}return H?(k||(k=new e),i(E,S,w,N,C,k)):!1}return yy=_,yy}var vy,Yk;function dO(){if(Yk)return vy;Yk=1;var e=U$(),t=Pr();function n(i,o,s,l,c){return i===o?!0:i==null||o==null||!t(i)&&!t(o)?i!==i&&o!==o:e(i,o,s,l,n,c)}return vy=n,vy}var xy,Gk;function P$(){if(Gk)return xy;Gk=1;var e=Wf(),t=dO(),n=1,i=2;function o(s,l,c,f){var h=c.length,p=h,m=!f;if(s==null)return!p;for(s=Object(s);h--;){var g=c[h];if(m&&g[2]?g[1]!==s[g[0]]:!(g[0]in s))return!1}for(;++h<p;){g=c[h];var v=g[0],_=s[v],E=g[1];if(m&&g[2]){if(_===void 0&&!(v in s))return!1}else{var S=new e;if(f)var w=f(_,E,v,s,l,S);if(!(w===void 0?t(E,_,n|i,f,S):w))return!1}}return!0}return xy=o,xy}var by,Xk;function hO(){if(Xk)return by;Xk=1;var e=cr();function t(n){return n===n&&!e(n)}return by=t,by}var wy,Kk;function V$(){if(Kk)return wy;Kk=1;var e=hO(),t=la();function n(i){for(var o=t(i),s=o.length;s--;){var l=o[s],c=i[l];o[s]=[l,c,e(c)]}return o}return wy=n,wy}var _y,Qk;function pO(){if(Qk)return _y;Qk=1;function e(t,n){return function(i){return i==null?!1:i[t]===n&&(n!==void 0||t in Object(i))}}return _y=e,_y}var Sy,Zk;function F$(){if(Zk)return Sy;Zk=1;var e=P$(),t=V$(),n=pO();function i(o){var s=t(o);return s.length==1&&s[0][2]?n(s[0][0],s[0][1]):function(l){return l===o||e(l,o,s)}}return Sy=i,Sy}var Ey,Wk;function ss(){if(Wk)return Ey;Wk=1;var e=Ua(),t=Pr(),n="[object Symbol]";function i(o){return typeof o=="symbol"||t(o)&&e(o)==n}return Ey=i,Ey}var Cy,Jk;function v1(){if(Jk)return Cy;Jk=1;var e=Jt(),t=ss(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,i=/^\w*$/;function o(s,l){if(e(s))return!1;var c=typeof s;return c=="number"||c=="symbol"||c=="boolean"||s==null||t(s)?!0:i.test(s)||!n.test(s)||l!=null&&s in Object(l)}return Cy=o,Cy}var Ny,eT;function $$(){if(eT)return Ny;eT=1;var e=o1(),t="Expected a function";function n(i,o){if(typeof i!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var s=function(){var l=arguments,c=o?o.apply(this,l):l[0],f=s.cache;if(f.has(c))return f.get(c);var h=i.apply(this,l);return s.cache=f.set(c,h)||f,h};return s.cache=new(n.Cache||e),s}return n.Cache=e,Ny=n,Ny}var ky,tT;function Y$(){if(tT)return ky;tT=1;var e=$$(),t=500;function n(i){var o=e(i,function(l){return s.size===t&&s.clear(),l}),s=o.cache;return o}return ky=n,ky}var Ty,nT;function G$(){if(nT)return Ty;nT=1;var e=Y$(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,i=e(function(o){var s=[];return o.charCodeAt(0)===46&&s.push(""),o.replace(t,function(l,c,f,h){s.push(f?h.replace(n,"$1"):c||l)}),s});return Ty=i,Ty}var Ay,rT;function od(){if(rT)return Ay;rT=1;function e(t,n){for(var i=-1,o=t==null?0:t.length,s=Array(o);++i<o;)s[i]=n(t[i],i,t);return s}return Ay=e,Ay}var Ry,iT;function X$(){if(iT)return Ry;iT=1;var e=is(),t=od(),n=Jt(),i=ss(),o=e?e.prototype:void 0,s=o?o.toString:void 0;function l(c){if(typeof c=="string")return c;if(n(c))return t(c,l)+"";if(i(c))return s?s.call(c):"";var f=c+"";return f=="0"&&1/c==-1/0?"-0":f}return Ry=l,Ry}var My,aT;function mO(){if(aT)return My;aT=1;var e=X$();function t(n){return n==null?"":e(n)}return My=t,My}var jy,oT;function sd(){if(oT)return jy;oT=1;var e=Jt(),t=v1(),n=G$(),i=mO();function o(s,l){return e(s)?s:t(s,l)?[s]:n(i(s))}return jy=o,jy}var Oy,sT;function eu(){if(sT)return Oy;sT=1;var e=ss();function t(n){if(typeof n=="string"||e(n))return n;var i=n+"";return i=="0"&&1/n==-1/0?"-0":i}return Oy=t,Oy}var zy,lT;function ld(){if(lT)return zy;lT=1;var e=sd(),t=eu();function n(i,o){o=e(o,i);for(var s=0,l=o.length;i!=null&&s<l;)i=i[t(o[s++])];return s&&s==l?i:void 0}return zy=n,zy}var Dy,uT;function K$(){if(uT)return Dy;uT=1;var e=ld();function t(n,i,o){var s=n==null?void 0:e(n,i);return s===void 0?o:s}return Dy=t,Dy}var Ly,cT;function Q$(){if(cT)return Ly;cT=1;function e(t,n){return t!=null&&n in Object(t)}return Ly=e,Ly}var qy,fT;function gO(){if(fT)return qy;fT=1;var e=sd(),t=Wl(),n=Jt(),i=td(),o=l1(),s=eu();function l(c,f,h){f=e(f,c);for(var p=-1,m=f.length,g=!1;++p<m;){var v=s(f[p]);if(!(g=c!=null&&h(c,v)))break;c=c[v]}return g||++p!=m?g:(m=c==null?0:c.length,!!m&&o(m)&&i(v,m)&&(n(c)||t(c)))}return qy=l,qy}var Iy,dT;function yO(){if(dT)return Iy;dT=1;var e=Q$(),t=gO();function n(i,o){return i!=null&&t(i,o,e)}return Iy=n,Iy}var By,hT;function Z$(){if(hT)return By;hT=1;var e=dO(),t=K$(),n=yO(),i=v1(),o=hO(),s=pO(),l=eu(),c=1,f=2;function h(p,m){return i(p)&&o(m)?s(l(p),m):function(g){var v=t(g,p);return v===void 0&&v===m?n(g,p):e(m,v,c|f)}}return By=h,By}var Hy,pT;function vO(){if(pT)return Hy;pT=1;function e(t){return function(n){return n==null?void 0:n[t]}}return Hy=e,Hy}var Uy,mT;function W$(){if(mT)return Uy;mT=1;var e=ld();function t(n){return function(i){return e(i,n)}}return Uy=t,Uy}var Py,gT;function J$(){if(gT)return Py;gT=1;var e=vO(),t=W$(),n=v1(),i=eu();function o(s){return n(s)?e(i(s)):t(s)}return Py=o,Py}var Vy,yT;function vi(){if(yT)return Vy;yT=1;var e=F$(),t=Z$(),n=Fa(),i=Jt(),o=J$();function s(l){return typeof l=="function"?l:l==null?n:typeof l=="object"?i(l)?t(l[0],l[1]):e(l):o(l)}return Vy=s,Vy}var Fy,vT;function xO(){if(vT)return Fy;vT=1;var e=K5(),t=z$(),n=vi(),i=Jt();function o(s,l){var c=i(s)?e:t;return c(s,n(l,3))}return Fy=o,Fy}var $y,xT;function eY(){if(xT)return $y;xT=1;var e=Object.prototype,t=e.hasOwnProperty;function n(i,o){return i!=null&&t.call(i,o)}return $y=n,$y}var Yy,bT;function bO(){if(bT)return Yy;bT=1;var e=eY(),t=gO();function n(i,o){return i!=null&&t(i,o,e)}return Yy=n,Yy}var Gy,wT;function tY(){if(wT)return Gy;wT=1;var e=c1(),t=os(),n=Wl(),i=Jt(),o=yi(),s=as(),l=rd(),c=Jl(),f="[object Map]",h="[object Set]",p=Object.prototype,m=p.hasOwnProperty;function g(v){if(v==null)return!0;if(o(v)&&(i(v)||typeof v=="string"||typeof v.splice=="function"||s(v)||c(v)||n(v)))return!v.length;var _=t(v);if(_==f||_==h)return!v.size;if(l(v))return!e(v).length;for(var E in v)if(m.call(v,E))return!1;return!0}return Gy=g,Gy}var Xy,_T;function wO(){if(_T)return Xy;_T=1;function e(t){return t===void 0}return Xy=e,Xy}var Ky,ST;function _O(){if(ST)return Ky;ST=1;var e=ad(),t=yi();function n(i,o){var s=-1,l=t(i)?Array(i.length):[];return e(i,function(c,f,h){l[++s]=o(c,f,h)}),l}return Ky=n,Ky}var Qy,ET;function SO(){if(ET)return Qy;ET=1;var e=od(),t=vi(),n=_O(),i=Jt();function o(s,l){var c=i(s)?e:n;return c(s,t(l,3))}return Qy=o,Qy}var Zy,CT;function nY(){if(CT)return Zy;CT=1;function e(t,n,i,o){var s=-1,l=t==null?0:t.length;for(o&&l&&(i=t[++s]);++s<l;)i=n(i,t[s],s,t);return i}return Zy=e,Zy}var Wy,NT;function rY(){if(NT)return Wy;NT=1;function e(t,n,i,o,s){return s(t,function(l,c,f){i=o?(o=!1,l):n(i,l,c,f)}),i}return Wy=e,Wy}var Jy,kT;function EO(){if(kT)return Jy;kT=1;var e=nY(),t=ad(),n=vi(),i=rY(),o=Jt();function s(l,c,f){var h=o(l)?e:i,p=arguments.length<3;return h(l,n(c,4),f,p,t)}return Jy=s,Jy}var ev,TT;function iY(){if(TT)return ev;TT=1;var e=Ua(),t=Jt(),n=Pr(),i="[object String]";function o(s){return typeof s=="string"||!t(s)&&n(s)&&e(s)==i}return ev=o,ev}var tv,AT;function aY(){if(AT)return tv;AT=1;var e=vO(),t=e("length");return tv=t,tv}var nv,RT;function oY(){if(RT)return nv;RT=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",o=t+n+i,s="\\ufe0e\\ufe0f",l="\\u200d",c=RegExp("["+l+e+o+s+"]");function f(h){return c.test(h)}return nv=f,nv}var rv,MT;function sY(){if(MT)return rv;MT=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",i="\\u20d0-\\u20ff",o=t+n+i,s="\\ufe0e\\ufe0f",l="["+e+"]",c="["+o+"]",f="\\ud83c[\\udffb-\\udfff]",h="(?:"+c+"|"+f+")",p="[^"+e+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",g="[\\ud800-\\udbff][\\udc00-\\udfff]",v="\\u200d",_=h+"?",E="["+s+"]?",S="(?:"+v+"(?:"+[p,m,g].join("|")+")"+E+_+")*",w=E+_+S,N="(?:"+[p+c+"?",c,m,g,l].join("|")+")",C=RegExp(f+"(?="+f+")|"+N+w,"g");function k(M){for(var R=C.lastIndex=0;C.test(M);)++R;return R}return rv=k,rv}var iv,jT;function lY(){if(jT)return iv;jT=1;var e=aY(),t=oY(),n=sY();function i(o){return t(o)?n(o):e(o)}return iv=i,iv}var av,OT;function uY(){if(OT)return av;OT=1;var e=c1(),t=os(),n=yi(),i=iY(),o=lY(),s="[object Map]",l="[object Set]";function c(f){if(f==null)return 0;if(n(f))return i(f)?o(f):f.length;var h=t(f);return h==s||h==l?f.size:e(f).length}return av=c,av}var ov,zT;function cY(){if(zT)return ov;zT=1;var e=s1(),t=rO(),n=g1(),i=vi(),o=id(),s=Jt(),l=as(),c=Ql(),f=cr(),h=Jl();function p(m,g,v){var _=s(m),E=_||l(m)||h(m);if(g=i(g,4),v==null){var S=m&&m.constructor;E?v=_?new S:[]:f(m)?v=c(S)?t(o(m)):{}:v={}}return(E?e:n)(m,function(w,N,C){return g(v,w,N,C)}),v}return ov=p,ov}var sv,DT;function fY(){if(DT)return sv;DT=1;var e=is(),t=Wl(),n=Jt(),i=e?e.isConcatSpreadable:void 0;function o(s){return n(s)||t(s)||!!(i&&s&&s[i])}return sv=o,sv}var lv,LT;function x1(){if(LT)return lv;LT=1;var e=d1(),t=fY();function n(i,o,s,l,c){var f=-1,h=i.length;for(s||(s=t),c||(c=[]);++f<h;){var p=i[f];o>0&&s(p)?o>1?n(p,o-1,s,l,c):e(c,p):l||(c[c.length]=p)}return c}return lv=n,lv}var uv,qT;function dY(){if(qT)return uv;qT=1;function e(t,n,i){switch(i.length){case 0:return t.call(n);case 1:return t.call(n,i[0]);case 2:return t.call(n,i[0],i[1]);case 3:return t.call(n,i[0],i[1],i[2])}return t.apply(n,i)}return uv=e,uv}var cv,IT;function CO(){if(IT)return cv;IT=1;var e=dY(),t=Math.max;function n(i,o,s){return o=t(o===void 0?i.length-1:o,0),function(){for(var l=arguments,c=-1,f=t(l.length-o,0),h=Array(f);++c<f;)h[c]=l[o+c];c=-1;for(var p=Array(o+1);++c<o;)p[c]=l[c];return p[o]=s(h),e(i,this,p)}}return cv=n,cv}var fv,BT;function hY(){if(BT)return fv;BT=1;var e=p1(),t=F5(),n=Fa(),i=t?function(o,s){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(s),writable:!0})}:n;return fv=i,fv}var dv,HT;function pY(){if(HT)return dv;HT=1;var e=800,t=16,n=Date.now;function i(o){var s=0,l=0;return function(){var c=n(),f=t-(c-l);if(l=c,f>0){if(++s>=e)return arguments[0]}else s=0;return o.apply(void 0,arguments)}}return dv=i,dv}var hv,UT;function NO(){if(UT)return hv;UT=1;var e=hY(),t=pY(),n=t(e);return hv=n,hv}var pv,PT;function ud(){if(PT)return pv;PT=1;var e=Fa(),t=CO(),n=NO();function i(o,s){return n(t(o,s,e),o+"")}return pv=i,pv}var mv,VT;function kO(){if(VT)return mv;VT=1;function e(t,n,i,o){for(var s=t.length,l=i+(o?1:-1);o?l--:++l<s;)if(n(t[l],l,t))return l;return-1}return mv=e,mv}var gv,FT;function mY(){if(FT)return gv;FT=1;function e(t){return t!==t}return gv=e,gv}var yv,$T;function gY(){if($T)return yv;$T=1;function e(t,n,i){for(var o=i-1,s=t.length;++o<s;)if(t[o]===n)return o;return-1}return yv=e,yv}var vv,YT;function yY(){if(YT)return vv;YT=1;var e=kO(),t=mY(),n=gY();function i(o,s,l){return s===s?n(o,s,l):e(o,t,l)}return vv=i,vv}var xv,GT;function vY(){if(GT)return xv;GT=1;var e=yY();function t(n,i){var o=n==null?0:n.length;return!!o&&e(n,i,0)>-1}return xv=t,xv}var bv,XT;function xY(){if(XT)return bv;XT=1;function e(t,n,i){for(var o=-1,s=t==null?0:t.length;++o<s;)if(i(n,t[o]))return!0;return!1}return bv=e,bv}var wv,KT;function bY(){if(KT)return wv;KT=1;function e(){}return wv=e,wv}var _v,QT;function wY(){if(QT)return _v;QT=1;var e=eO(),t=bY(),n=y1(),i=1/0,o=e&&1/n(new e([,-0]))[1]==i?function(s){return new e(s)}:t;return _v=o,_v}var Sv,ZT;function _Y(){if(ZT)return Sv;ZT=1;var e=uO(),t=vY(),n=xY(),i=cO(),o=wY(),s=y1(),l=200;function c(f,h,p){var m=-1,g=t,v=f.length,_=!0,E=[],S=E;if(p)_=!1,g=n;else if(v>=l){var w=h?null:o(f);if(w)return s(w);_=!1,g=i,S=new e}else S=h?[]:E;e:for(;++m<v;){var N=f[m],C=h?h(N):N;if(N=p||N!==0?N:0,_&&C===C){for(var k=S.length;k--;)if(S[k]===C)continue e;h&&S.push(C),E.push(N)}else g(S,C,p)||(S!==E&&S.push(C),E.push(N))}return E}return Sv=c,Sv}var Ev,WT;function TO(){if(WT)return Ev;WT=1;var e=yi(),t=Pr();function n(i){return t(i)&&e(i)}return Ev=n,Ev}var Cv,JT;function SY(){if(JT)return Cv;JT=1;var e=x1(),t=ud(),n=_Y(),i=TO(),o=t(function(s){return n(e(s,1,i,!0))});return Cv=o,Cv}var Nv,eA;function EY(){if(eA)return Nv;eA=1;var e=od();function t(n,i){return e(i,function(o){return n[o]})}return Nv=t,Nv}var kv,tA;function AO(){if(tA)return kv;tA=1;var e=EY(),t=la();function n(i){return i==null?[]:e(i,t(i))}return kv=n,kv}var Tv,nA;function fr(){if(nA)return Tv;nA=1;var e;if(typeof i1=="function")try{e={clone:M$(),constant:p1(),each:lO(),filter:xO(),has:bO(),isArray:Jt(),isEmpty:tY(),isFunction:Ql(),isUndefined:wO(),keys:la(),map:SO(),reduce:EO(),size:uY(),transform:cY(),union:SY(),values:AO()}}catch{}return e||(e=window._),Tv=e,Tv}var Av,rA;function b1(){if(rA)return Av;rA=1;var e=fr();Av=o;var t="\0",n="\0",i="";function o(p){this._isDirected=e.has(p,"directed")?p.directed:!0,this._isMultigraph=e.has(p,"multigraph")?p.multigraph:!1,this._isCompound=e.has(p,"compound")?p.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={}}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(p){return this._label=p,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(p){return e.isFunction(p)||(p=e.constant(p)),this._defaultNodeLabelFn=p,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return e.keys(this._nodes)},o.prototype.sources=function(){var p=this;return e.filter(this.nodes(),function(m){return e.isEmpty(p._in[m])})},o.prototype.sinks=function(){var p=this;return e.filter(this.nodes(),function(m){return e.isEmpty(p._out[m])})},o.prototype.setNodes=function(p,m){var g=arguments,v=this;return e.each(p,function(_){g.length>1?v.setNode(_,m):v.setNode(_)}),this},o.prototype.setNode=function(p,m){return e.has(this._nodes,p)?(arguments.length>1&&(this._nodes[p]=m),this):(this._nodes[p]=arguments.length>1?m:this._defaultNodeLabelFn(p),this._isCompound&&(this._parent[p]=n,this._children[p]={},this._children[n][p]=!0),this._in[p]={},this._preds[p]={},this._out[p]={},this._sucs[p]={},++this._nodeCount,this)},o.prototype.node=function(p){return this._nodes[p]},o.prototype.hasNode=function(p){return e.has(this._nodes,p)},o.prototype.removeNode=function(p){var m=this;if(e.has(this._nodes,p)){var g=function(v){m.removeEdge(m._edgeObjs[v])};delete this._nodes[p],this._isCompound&&(this._removeFromParentsChildList(p),delete this._parent[p],e.each(this.children(p),function(v){m.setParent(v)}),delete this._children[p]),e.each(e.keys(this._in[p]),g),delete this._in[p],delete this._preds[p],e.each(e.keys(this._out[p]),g),delete this._out[p],delete this._sucs[p],--this._nodeCount}return this},o.prototype.setParent=function(p,m){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(m))m=n;else{m+="";for(var g=m;!e.isUndefined(g);g=this.parent(g))if(g===p)throw new Error("Setting "+m+" as parent of "+p+" would create a cycle");this.setNode(m)}return this.setNode(p),this._removeFromParentsChildList(p),this._parent[p]=m,this._children[m][p]=!0,this},o.prototype._removeFromParentsChildList=function(p){delete this._children[this._parent[p]][p]},o.prototype.parent=function(p){if(this._isCompound){var m=this._parent[p];if(m!==n)return m}},o.prototype.children=function(p){if(e.isUndefined(p)&&(p=n),this._isCompound){var m=this._children[p];if(m)return e.keys(m)}else{if(p===n)return this.nodes();if(this.hasNode(p))return[]}},o.prototype.predecessors=function(p){var m=this._preds[p];if(m)return e.keys(m)},o.prototype.successors=function(p){var m=this._sucs[p];if(m)return e.keys(m)},o.prototype.neighbors=function(p){var m=this.predecessors(p);if(m)return e.union(m,this.successors(p))},o.prototype.isLeaf=function(p){var m;return this.isDirected()?m=this.successors(p):m=this.neighbors(p),m.length===0},o.prototype.filterNodes=function(p){var m=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});m.setGraph(this.graph());var g=this;e.each(this._nodes,function(E,S){p(S)&&m.setNode(S,E)}),e.each(this._edgeObjs,function(E){m.hasNode(E.v)&&m.hasNode(E.w)&&m.setEdge(E,g.edge(E))});var v={};function _(E){var S=g.parent(E);return S===void 0||m.hasNode(S)?(v[E]=S,S):S in v?v[S]:_(S)}return this._isCompound&&e.each(m.nodes(),function(E){m.setParent(E,_(E))}),m},o.prototype.setDefaultEdgeLabel=function(p){return e.isFunction(p)||(p=e.constant(p)),this._defaultEdgeLabelFn=p,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return e.values(this._edgeObjs)},o.prototype.setPath=function(p,m){var g=this,v=arguments;return e.reduce(p,function(_,E){return v.length>1?g.setEdge(_,E,m):g.setEdge(_,E),E}),this},o.prototype.setEdge=function(){var p,m,g,v,_=!1,E=arguments[0];typeof E=="object"&&E!==null&&"v"in E?(p=E.v,m=E.w,g=E.name,arguments.length===2&&(v=arguments[1],_=!0)):(p=E,m=arguments[1],g=arguments[3],arguments.length>2&&(v=arguments[2],_=!0)),p=""+p,m=""+m,e.isUndefined(g)||(g=""+g);var S=c(this._isDirected,p,m,g);if(e.has(this._edgeLabels,S))return _&&(this._edgeLabels[S]=v),this;if(!e.isUndefined(g)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(p),this.setNode(m),this._edgeLabels[S]=_?v:this._defaultEdgeLabelFn(p,m,g);var w=f(this._isDirected,p,m,g);return p=w.v,m=w.w,Object.freeze(w),this._edgeObjs[S]=w,s(this._preds[m],p),s(this._sucs[p],m),this._in[m][S]=w,this._out[p][S]=w,this._edgeCount++,this},o.prototype.edge=function(p,m,g){var v=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,m,g);return this._edgeLabels[v]},o.prototype.hasEdge=function(p,m,g){var v=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,m,g);return e.has(this._edgeLabels,v)},o.prototype.removeEdge=function(p,m,g){var v=arguments.length===1?h(this._isDirected,arguments[0]):c(this._isDirected,p,m,g),_=this._edgeObjs[v];return _&&(p=_.v,m=_.w,delete this._edgeLabels[v],delete this._edgeObjs[v],l(this._preds[m],p),l(this._sucs[p],m),delete this._in[m][v],delete this._out[p][v],this._edgeCount--),this},o.prototype.inEdges=function(p,m){var g=this._in[p];if(g){var v=e.values(g);return m?e.filter(v,function(_){return _.v===m}):v}},o.prototype.outEdges=function(p,m){var g=this._out[p];if(g){var v=e.values(g);return m?e.filter(v,function(_){return _.w===m}):v}},o.prototype.nodeEdges=function(p,m){var g=this.inEdges(p,m);if(g)return g.concat(this.outEdges(p,m))};function s(p,m){p[m]?p[m]++:p[m]=1}function l(p,m){--p[m]||delete p[m]}function c(p,m,g,v){var _=""+m,E=""+g;if(!p&&_>E){var S=_;_=E,E=S}return _+i+E+i+(e.isUndefined(v)?t:v)}function f(p,m,g,v){var _=""+m,E=""+g;if(!p&&_>E){var S=_;_=E,E=S}var w={v:_,w:E};return v&&(w.name=v),w}function h(p,m){return c(p,m.v,m.w,m.name)}return Av}var Rv,iA;function CY(){return iA||(iA=1,Rv="2.1.8"),Rv}var Mv,aA;function NY(){return aA||(aA=1,Mv={Graph:b1(),version:CY()}),Mv}var jv,oA;function kY(){if(oA)return jv;oA=1;var e=fr(),t=b1();jv={write:n,read:s};function n(l){var c={options:{directed:l.isDirected(),multigraph:l.isMultigraph(),compound:l.isCompound()},nodes:i(l),edges:o(l)};return e.isUndefined(l.graph())||(c.value=e.clone(l.graph())),c}function i(l){return e.map(l.nodes(),function(c){var f=l.node(c),h=l.parent(c),p={v:c};return e.isUndefined(f)||(p.value=f),e.isUndefined(h)||(p.parent=h),p})}function o(l){return e.map(l.edges(),function(c){var f=l.edge(c),h={v:c.v,w:c.w};return e.isUndefined(c.name)||(h.name=c.name),e.isUndefined(f)||(h.value=f),h})}function s(l){var c=new t(l.options).setGraph(l.value);return e.each(l.nodes,function(f){c.setNode(f.v,f.value),f.parent&&c.setParent(f.v,f.parent)}),e.each(l.edges,function(f){c.setEdge({v:f.v,w:f.w,name:f.name},f.value)}),c}return jv}var Ov,sA;function TY(){if(sA)return Ov;sA=1;var e=fr();Ov=t;function t(n){var i={},o=[],s;function l(c){e.has(i,c)||(i[c]=!0,s.push(c),e.each(n.successors(c),l),e.each(n.predecessors(c),l))}return e.each(n.nodes(),function(c){s=[],l(c),s.length&&o.push(s)}),o}return Ov}var zv,lA;function RO(){if(lA)return zv;lA=1;var e=fr();zv=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 i=this._keyIndices[n];if(i!==void 0)return this._arr[i].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,i){var o=this._keyIndices;if(n=String(n),!e.has(o,n)){var s=this._arr,l=s.length;return o[n]=l,s.push({key:n,priority:i}),this._decrease(l),!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,i){var o=this._keyIndices[n];if(i>this._arr[o].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[o].priority+" New: "+i);this._arr[o].priority=i,this._decrease(o)},t.prototype._heapify=function(n){var i=this._arr,o=2*n,s=o+1,l=n;o<i.length&&(l=i[o].priority<i[l].priority?o:l,s<i.length&&(l=i[s].priority<i[l].priority?s:l),l!==n&&(this._swap(n,l),this._heapify(l)))},t.prototype._decrease=function(n){for(var i=this._arr,o=i[n].priority,s;n!==0&&(s=n>>1,!(i[s].priority<o));)this._swap(n,s),n=s},t.prototype._swap=function(n,i){var o=this._arr,s=this._keyIndices,l=o[n],c=o[i];o[n]=c,o[i]=l,s[c.key]=n,s[l.key]=i},zv}var Dv,uA;function MO(){if(uA)return Dv;uA=1;var e=fr(),t=RO();Dv=i;var n=e.constant(1);function i(s,l,c,f){return o(s,String(l),c||n,f||function(h){return s.outEdges(h)})}function o(s,l,c,f){var h={},p=new t,m,g,v=function(_){var E=_.v!==m?_.v:_.w,S=h[E],w=c(_),N=g.distance+w;if(w<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+_+" Weight: "+w);N<S.distance&&(S.distance=N,S.predecessor=m,p.decrease(E,N))};for(s.nodes().forEach(function(_){var E=_===l?0:Number.POSITIVE_INFINITY;h[_]={distance:E},p.add(_,E)});p.size()>0&&(m=p.removeMin(),g=h[m],g.distance!==Number.POSITIVE_INFINITY);)f(m).forEach(v);return h}return Dv}var Lv,cA;function AY(){if(cA)return Lv;cA=1;var e=MO(),t=fr();Lv=n;function n(i,o,s){return t.transform(i.nodes(),function(l,c){l[c]=e(i,c,o,s)},{})}return Lv}var qv,fA;function jO(){if(fA)return qv;fA=1;var e=fr();qv=t;function t(n){var i=0,o=[],s={},l=[];function c(f){var h=s[f]={onStack:!0,lowlink:i,index:i++};if(o.push(f),n.successors(f).forEach(function(g){e.has(s,g)?s[g].onStack&&(h.lowlink=Math.min(h.lowlink,s[g].index)):(c(g),h.lowlink=Math.min(h.lowlink,s[g].lowlink))}),h.lowlink===h.index){var p=[],m;do m=o.pop(),s[m].onStack=!1,p.push(m);while(f!==m);l.push(p)}}return n.nodes().forEach(function(f){e.has(s,f)||c(f)}),l}return qv}var Iv,dA;function RY(){if(dA)return Iv;dA=1;var e=fr(),t=jO();Iv=n;function n(i){return e.filter(t(i),function(o){return o.length>1||o.length===1&&i.hasEdge(o[0],o[0])})}return Iv}var Bv,hA;function MY(){if(hA)return Bv;hA=1;var e=fr();Bv=n;var t=e.constant(1);function n(o,s,l){return i(o,s||t,l||function(c){return o.outEdges(c)})}function i(o,s,l){var c={},f=o.nodes();return f.forEach(function(h){c[h]={},c[h][h]={distance:0},f.forEach(function(p){h!==p&&(c[h][p]={distance:Number.POSITIVE_INFINITY})}),l(h).forEach(function(p){var m=p.v===h?p.w:p.v,g=s(p);c[h][m]={distance:g,predecessor:h}})}),f.forEach(function(h){var p=c[h];f.forEach(function(m){var g=c[m];f.forEach(function(v){var _=g[h],E=p[v],S=g[v],w=_.distance+E.distance;w<S.distance&&(S.distance=w,S.predecessor=E.predecessor)})})}),c}return Bv}var Hv,pA;function OO(){if(pA)return Hv;pA=1;var e=fr();Hv=t,t.CycleException=n;function t(i){var o={},s={},l=[];function c(f){if(e.has(s,f))throw new n;e.has(o,f)||(s[f]=!0,o[f]=!0,e.each(i.predecessors(f),c),delete s[f],l.push(f))}if(e.each(i.sinks(),c),e.size(o)!==i.nodeCount())throw new n;return l}function n(){}return n.prototype=new Error,Hv}var Uv,mA;function jY(){if(mA)return Uv;mA=1;var e=OO();Uv=t;function t(n){try{e(n)}catch(i){if(i instanceof e.CycleException)return!1;throw i}return!0}return Uv}var Pv,gA;function zO(){if(gA)return Pv;gA=1;var e=fr();Pv=t;function t(i,o,s){e.isArray(o)||(o=[o]);var l=(i.isDirected()?i.successors:i.neighbors).bind(i),c=[],f={};return e.each(o,function(h){if(!i.hasNode(h))throw new Error("Graph does not have node: "+h);n(i,h,s==="post",f,l,c)}),c}function n(i,o,s,l,c,f){e.has(l,o)||(l[o]=!0,s||f.push(o),e.each(c(o),function(h){n(i,h,s,l,c,f)}),s&&f.push(o))}return Pv}var Vv,yA;function OY(){if(yA)return Vv;yA=1;var e=zO();Vv=t;function t(n,i){return e(n,i,"post")}return Vv}var Fv,vA;function zY(){if(vA)return Fv;vA=1;var e=zO();Fv=t;function t(n,i){return e(n,i,"pre")}return Fv}var $v,xA;function DY(){if(xA)return $v;xA=1;var e=fr(),t=b1(),n=RO();$v=i;function i(o,s){var l=new t,c={},f=new n,h;function p(g){var v=g.v===h?g.w:g.v,_=f.priority(v);if(_!==void 0){var E=s(g);E<_&&(c[v]=h,f.decrease(v,E))}}if(o.nodeCount()===0)return l;e.each(o.nodes(),function(g){f.add(g,Number.POSITIVE_INFINITY),l.setNode(g)}),f.decrease(o.nodes()[0],0);for(var m=!1;f.size()>0;){if(h=f.removeMin(),e.has(c,h))l.setEdge(h,c[h]);else{if(m)throw new Error("Input graph is not connected: "+o);m=!0}o.nodeEdges(h).forEach(p)}return l}return $v}var Yv,bA;function LY(){return bA||(bA=1,Yv={components:TY(),dijkstra:MO(),dijkstraAll:AY(),findCycles:RY(),floydWarshall:MY(),isAcyclic:jY(),postorder:OY(),preorder:zY(),prim:DY(),tarjan:jO(),topsort:OO()}),Yv}var Gv,wA;function qY(){if(wA)return Gv;wA=1;var e=NY();return Gv={Graph:e.Graph,json:kY(),alg:LY(),version:e.version},Gv}var Xv,_A;function Er(){if(_A)return Xv;_A=1;var e;if(typeof i1=="function")try{e=qY()}catch{}return e||(e=window.graphlib),Xv=e,Xv}var Kv,SA;function IY(){if(SA)return Kv;SA=1;var e=aO(),t=1,n=4;function i(o){return e(o,t|n)}return Kv=i,Kv}var Qv,EA;function cd(){if(EA)return Qv;EA=1;var e=rs(),t=yi(),n=td(),i=cr();function o(s,l,c){if(!i(c))return!1;var f=typeof l;return(f=="number"?t(c)&&n(l,c.length):f=="string"&&l in c)?e(c[l],s):!1}return Qv=o,Qv}var Zv,CA;function BY(){if(CA)return Zv;CA=1;var e=ud(),t=rs(),n=cd(),i=Va(),o=Object.prototype,s=o.hasOwnProperty,l=e(function(c,f){c=Object(c);var h=-1,p=f.length,m=p>2?f[2]:void 0;for(m&&n(f[0],f[1],m)&&(p=1);++h<p;)for(var g=f[h],v=i(g),_=-1,E=v.length;++_<E;){var S=v[_],w=c[S];(w===void 0||t(w,o[S])&&!s.call(c,S))&&(c[S]=g[S])}return c});return Zv=l,Zv}var Wv,NA;function HY(){if(NA)return Wv;NA=1;var e=vi(),t=yi(),n=la();function i(o){return function(s,l,c){var f=Object(s);if(!t(s)){var h=e(l,3);s=n(s),l=function(m){return h(f[m],m,f)}}var p=o(s,l,c);return p>-1?f[h?s[p]:p]:void 0}}return Wv=i,Wv}var Jv,kA;function UY(){if(kA)return Jv;kA=1;var e=/\s/;function t(n){for(var i=n.length;i--&&e.test(n.charAt(i)););return i}return Jv=t,Jv}var e0,TA;function PY(){if(TA)return e0;TA=1;var e=UY(),t=/^\s+/;function n(i){return i&&i.slice(0,e(i)+1).replace(t,"")}return e0=n,e0}var t0,AA;function VY(){if(AA)return t0;AA=1;var e=PY(),t=cr(),n=ss(),i=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;function f(h){if(typeof h=="number")return h;if(n(h))return i;if(t(h)){var p=typeof h.valueOf=="function"?h.valueOf():h;h=t(p)?p+"":p}if(typeof h!="string")return h===0?h:+h;h=e(h);var m=s.test(h);return m||l.test(h)?c(h.slice(2),m?2:8):o.test(h)?i:+h}return t0=f,t0}var n0,RA;function DO(){if(RA)return n0;RA=1;var e=VY(),t=1/0,n=17976931348623157e292;function i(o){if(!o)return o===0?o:0;if(o=e(o),o===t||o===-t){var s=o<0?-1:1;return s*n}return o===o?o:0}return n0=i,n0}var r0,MA;function FY(){if(MA)return r0;MA=1;var e=DO();function t(n){var i=e(n),o=i%1;return i===i?o?i-o:i:0}return r0=t,r0}var i0,jA;function $Y(){if(jA)return i0;jA=1;var e=kO(),t=vi(),n=FY(),i=Math.max;function o(s,l,c){var f=s==null?0:s.length;if(!f)return-1;var h=c==null?0:n(c);return h<0&&(h=i(f+h,0)),e(s,t(l,3),h)}return i0=o,i0}var a0,OA;function YY(){if(OA)return a0;OA=1;var e=HY(),t=$Y(),n=e(t);return a0=n,a0}var o0,zA;function LO(){if(zA)return o0;zA=1;var e=x1();function t(n){var i=n==null?0:n.length;return i?e(n,1):[]}return o0=t,o0}var s0,DA;function GY(){if(DA)return s0;DA=1;var e=m1(),t=oO(),n=Va();function i(o,s){return o==null?o:e(o,t(s),n)}return s0=i,s0}var l0,LA;function XY(){if(LA)return l0;LA=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return l0=e,l0}var u0,qA;function KY(){if(qA)return u0;qA=1;var e=Jf(),t=g1(),n=vi();function i(o,s){var l={};return s=n(s,3),t(o,function(c,f,h){e(l,f,s(c,f,h))}),l}return u0=i,u0}var c0,IA;function w1(){if(IA)return c0;IA=1;var e=ss();function t(n,i,o){for(var s=-1,l=n.length;++s<l;){var c=n[s],f=i(c);if(f!=null&&(h===void 0?f===f&&!e(f):o(f,h)))var h=f,p=c}return p}return c0=t,c0}var f0,BA;function QY(){if(BA)return f0;BA=1;function e(t,n){return t>n}return f0=e,f0}var d0,HA;function ZY(){if(HA)return d0;HA=1;var e=w1(),t=QY(),n=Fa();function i(o){return o&&o.length?e(o,n,t):void 0}return d0=i,d0}var h0,UA;function qO(){if(UA)return h0;UA=1;var e=Jf(),t=rs();function n(i,o,s){(s!==void 0&&!t(i[o],s)||s===void 0&&!(o in i))&&e(i,o,s)}return h0=n,h0}var p0,PA;function WY(){if(PA)return p0;PA=1;var e=Ua(),t=id(),n=Pr(),i="[object Object]",o=Function.prototype,s=Object.prototype,l=o.toString,c=s.hasOwnProperty,f=l.call(Object);function h(p){if(!n(p)||e(p)!=i)return!1;var m=t(p);if(m===null)return!0;var g=c.call(m,"constructor")&&m.constructor;return typeof g=="function"&&g instanceof g&&l.call(g)==f}return p0=h,p0}var m0,VA;function IO(){if(VA)return m0;VA=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return m0=e,m0}var g0,FA;function JY(){if(FA)return g0;FA=1;var e=Zl(),t=Va();function n(i){return e(i,t(i))}return g0=n,g0}var y0,$A;function eG(){if($A)return y0;$A=1;var e=qO(),t=G5(),n=nO(),i=X5(),o=iO(),s=Wl(),l=Jt(),c=TO(),f=as(),h=Ql(),p=cr(),m=WY(),g=Jl(),v=IO(),_=JY();function E(S,w,N,C,k,M,R){var O=v(S,N),I=v(w,N),V=R.get(I);if(V){e(S,N,V);return}var K=M?M(O,I,N+"",S,w,R):void 0,H=K===void 0;if(H){var F=l(I),X=!F&&f(I),L=!F&&!X&&g(I);K=I,F||X||L?l(O)?K=O:c(O)?K=i(O):X?(H=!1,K=t(I,!0)):L?(H=!1,K=n(I,!0)):K=[]:m(I)||s(I)?(K=O,s(O)?K=_(O):(!p(O)||h(O))&&(K=o(I))):H=!1}H&&(R.set(I,K),k(K,I,C,M,R),R.delete(I)),e(S,N,K)}return y0=E,y0}var v0,YA;function tG(){if(YA)return v0;YA=1;var e=Wf(),t=qO(),n=m1(),i=eG(),o=cr(),s=Va(),l=IO();function c(f,h,p,m,g){f!==h&&n(h,function(v,_){if(g||(g=new e),o(v))i(f,h,_,p,c,m,g);else{var E=m?m(l(f,_),v,_+"",f,h,g):void 0;E===void 0&&(E=v),t(f,_,E)}},s)}return v0=c,v0}var x0,GA;function nG(){if(GA)return x0;GA=1;var e=ud(),t=cd();function n(i){return e(function(o,s){var l=-1,c=s.length,f=c>1?s[c-1]:void 0,h=c>2?s[2]:void 0;for(f=i.length>3&&typeof f=="function"?(c--,f):void 0,h&&t(s[0],s[1],h)&&(f=c<3?void 0:f,c=1),o=Object(o);++l<c;){var p=s[l];p&&i(o,p,l,f)}return o})}return x0=n,x0}var b0,XA;function rG(){if(XA)return b0;XA=1;var e=tG(),t=nG(),n=t(function(i,o,s){e(i,o,s)});return b0=n,b0}var w0,KA;function BO(){if(KA)return w0;KA=1;function e(t,n){return t<n}return w0=e,w0}var _0,QA;function iG(){if(QA)return _0;QA=1;var e=w1(),t=BO(),n=Fa();function i(o){return o&&o.length?e(o,n,t):void 0}return _0=i,_0}var S0,ZA;function aG(){if(ZA)return S0;ZA=1;var e=w1(),t=vi(),n=BO();function i(o,s){return o&&o.length?e(o,t(s,2),n):void 0}return S0=i,S0}var E0,WA;function oG(){if(WA)return E0;WA=1;var e=kr(),t=function(){return e.Date.now()};return E0=t,E0}var C0,JA;function sG(){if(JA)return C0;JA=1;var e=ed(),t=sd(),n=td(),i=cr(),o=eu();function s(l,c,f,h){if(!i(l))return l;c=t(c,l);for(var p=-1,m=c.length,g=m-1,v=l;v!=null&&++p<m;){var _=o(c[p]),E=f;if(_==="__proto__"||_==="constructor"||_==="prototype")return l;if(p!=g){var S=v[_];E=h?h(S,_,v):void 0,E===void 0&&(E=i(S)?S:n(c[p+1])?[]:{})}e(v,_,E),v=v[_]}return l}return C0=s,C0}var N0,eR;function lG(){if(eR)return N0;eR=1;var e=ld(),t=sG(),n=sd();function i(o,s,l){for(var c=-1,f=s.length,h={};++c<f;){var p=s[c],m=e(o,p);l(m,p)&&t(h,n(p,o),m)}return h}return N0=i,N0}var k0,tR;function uG(){if(tR)return k0;tR=1;var e=lG(),t=yO();function n(i,o){return e(i,o,function(s,l){return t(i,l)})}return k0=n,k0}var T0,nR;function cG(){if(nR)return T0;nR=1;var e=LO(),t=CO(),n=NO();function i(o){return n(t(o,void 0,e),o+"")}return T0=i,T0}var A0,rR;function fG(){if(rR)return A0;rR=1;var e=uG(),t=cG(),n=t(function(i,o){return i==null?{}:e(i,o)});return A0=n,A0}var R0,iR;function dG(){if(iR)return R0;iR=1;var e=Math.ceil,t=Math.max;function n(i,o,s,l){for(var c=-1,f=t(e((o-i)/(s||1)),0),h=Array(f);f--;)h[l?f:++c]=i,i+=s;return h}return R0=n,R0}var M0,aR;function hG(){if(aR)return M0;aR=1;var e=dG(),t=cd(),n=DO();function i(o){return function(s,l,c){return c&&typeof c!="number"&&t(s,l,c)&&(l=c=void 0),s=n(s),l===void 0?(l=s,s=0):l=n(l),c=c===void 0?s<l?1:-1:n(c),e(s,l,c,o)}}return M0=i,M0}var j0,oR;function pG(){if(oR)return j0;oR=1;var e=hG(),t=e();return j0=t,j0}var O0,sR;function mG(){if(sR)return O0;sR=1;function e(t,n){var i=t.length;for(t.sort(n);i--;)t[i]=t[i].value;return t}return O0=e,O0}var z0,lR;function gG(){if(lR)return z0;lR=1;var e=ss();function t(n,i){if(n!==i){var o=n!==void 0,s=n===null,l=n===n,c=e(n),f=i!==void 0,h=i===null,p=i===i,m=e(i);if(!h&&!m&&!c&&n>i||c&&f&&p&&!h&&!m||s&&f&&p||!o&&p||!l)return 1;if(!s&&!c&&!m&&n<i||m&&o&&l&&!s&&!c||h&&o&&l||!f&&l||!p)return-1}return 0}return z0=t,z0}var D0,uR;function yG(){if(uR)return D0;uR=1;var e=gG();function t(n,i,o){for(var s=-1,l=n.criteria,c=i.criteria,f=l.length,h=o.length;++s<f;){var p=e(l[s],c[s]);if(p){if(s>=h)return p;var m=o[s];return p*(m=="desc"?-1:1)}}return n.index-i.index}return D0=t,D0}var L0,cR;function vG(){if(cR)return L0;cR=1;var e=od(),t=ld(),n=vi(),i=_O(),o=mG(),s=nd(),l=yG(),c=Fa(),f=Jt();function h(p,m,g){m.length?m=e(m,function(E){return f(E)?function(S){return t(S,E.length===1?E[0]:E)}:E}):m=[c];var v=-1;m=e(m,s(n));var _=i(p,function(E,S,w){var N=e(m,function(C){return C(E)});return{criteria:N,index:++v,value:E}});return o(_,function(E,S){return l(E,S,g)})}return L0=h,L0}var q0,fR;function xG(){if(fR)return q0;fR=1;var e=x1(),t=vG(),n=ud(),i=cd(),o=n(function(s,l){if(s==null)return[];var c=l.length;return c>1&&i(s,l[0],l[1])?l=[]:c>2&&i(l[0],l[1],l[2])&&(l=[l[0]]),t(s,e(l,1),[])});return q0=o,q0}var I0,dR;function bG(){if(dR)return I0;dR=1;var e=mO(),t=0;function n(i){var o=++t;return e(i)+o}return I0=n,I0}var B0,hR;function wG(){if(hR)return B0;hR=1;function e(t,n,i){for(var o=-1,s=t.length,l=n.length,c={};++o<s;){var f=o<l?n[o]:void 0;i(c,t[o],f)}return c}return B0=e,B0}var H0,pR;function _G(){if(pR)return H0;pR=1;var e=ed(),t=wG();function n(i,o){return t(i||[],o||[],e)}return H0=n,H0}var U0,mR;function qt(){if(mR)return U0;mR=1;var e;if(typeof i1=="function")try{e={cloneDeep:IY(),constant:p1(),defaults:BY(),each:lO(),filter:xO(),find:YY(),flatten:LO(),forEach:sO(),forIn:GY(),has:bO(),isUndefined:wO(),last:XY(),map:SO(),mapValues:KY(),max:ZY(),merge:rG(),min:iG(),minBy:aG(),now:oG(),pick:fG(),range:pG(),reduce:EO(),sortBy:xG(),uniqueId:bG(),values:AO(),zipObject:_G()}}catch{}return e||(e=window._),U0=e,U0}var P0,gR;function SG(){if(gR)return P0;gR=1,P0=e;function e(){var i={};i._next=i._prev=i,this._sentinel=i}e.prototype.dequeue=function(){var i=this._sentinel,o=i._prev;if(o!==i)return t(o),o},e.prototype.enqueue=function(i){var o=this._sentinel;i._prev&&i._next&&t(i),i._next=o._next,o._next._prev=i,o._next=i,i._prev=o},e.prototype.toString=function(){for(var i=[],o=this._sentinel,s=o._prev;s!==o;)i.push(JSON.stringify(s,n)),s=s._prev;return"["+i.join(", ")+"]"};function t(i){i._prev._next=i._next,i._next._prev=i._prev,delete i._next,delete i._prev}function n(i,o){if(i!=="_next"&&i!=="_prev")return o}return P0}var V0,yR;function EG(){if(yR)return V0;yR=1;var e=qt(),t=Er().Graph,n=SG();V0=o;var i=e.constant(1);function o(h,p){if(h.nodeCount()<=1)return[];var m=c(h,p||i),g=s(m.graph,m.buckets,m.zeroIdx);return e.flatten(e.map(g,function(v){return h.outEdges(v.v,v.w)}),!0)}function s(h,p,m){for(var g=[],v=p[p.length-1],_=p[0],E;h.nodeCount();){for(;E=_.dequeue();)l(h,p,m,E);for(;E=v.dequeue();)l(h,p,m,E);if(h.nodeCount()){for(var S=p.length-2;S>0;--S)if(E=p[S].dequeue(),E){g=g.concat(l(h,p,m,E,!0));break}}}return g}function l(h,p,m,g,v){var _=v?[]:void 0;return e.forEach(h.inEdges(g.v),function(E){var S=h.edge(E),w=h.node(E.v);v&&_.push({v:E.v,w:E.w}),w.out-=S,f(p,m,w)}),e.forEach(h.outEdges(g.v),function(E){var S=h.edge(E),w=E.w,N=h.node(w);N.in-=S,f(p,m,N)}),h.removeNode(g.v),_}function c(h,p){var m=new t,g=0,v=0;e.forEach(h.nodes(),function(S){m.setNode(S,{v:S,in:0,out:0})}),e.forEach(h.edges(),function(S){var w=m.edge(S.v,S.w)||0,N=p(S),C=w+N;m.setEdge(S.v,S.w,C),v=Math.max(v,m.node(S.v).out+=N),g=Math.max(g,m.node(S.w).in+=N)});var _=e.range(v+g+3).map(function(){return new n}),E=g+1;return e.forEach(m.nodes(),function(S){f(_,E,m.node(S))}),{graph:m,buckets:_,zeroIdx:E}}function f(h,p,m){m.out?m.in?h[m.out-m.in+p].enqueue(m):h[h.length-1].enqueue(m):h[0].enqueue(m)}return V0}var F0,vR;function CG(){if(vR)return F0;vR=1;var e=qt(),t=EG();F0={run:n,undo:o};function n(s){var l=s.graph().acyclicer==="greedy"?t(s,c(s)):i(s);e.forEach(l,function(f){var h=s.edge(f);s.removeEdge(f),h.forwardName=f.name,h.reversed=!0,s.setEdge(f.w,f.v,h,e.uniqueId("rev"))});function c(f){return function(h){return f.edge(h).weight}}}function i(s){var l=[],c={},f={};function h(p){e.has(f,p)||(f[p]=!0,c[p]=!0,e.forEach(s.outEdges(p),function(m){e.has(c,m.w)?l.push(m):h(m.w)}),delete c[p])}return e.forEach(s.nodes(),h),l}function o(s){e.forEach(s.edges(),function(l){var c=s.edge(l);if(c.reversed){s.removeEdge(l);var f=c.forwardName;delete c.reversed,delete c.forwardName,s.setEdge(l.w,l.v,c,f)}})}return F0}var $0,xR;function Mn(){if(xR)return $0;xR=1;var e=qt(),t=Er().Graph;$0={addDummyNode:n,simplify:i,asNonCompoundGraph:o,successorWeights:s,predecessorWeights:l,intersectRect:c,buildLayerMatrix:f,normalizeRanks:h,removeEmptyRanks:p,addBorderNode:m,maxRank:g,partition:v,time:_,notime:E};function n(S,w,N,C){var k;do k=e.uniqueId(C);while(S.hasNode(k));return N.dummy=w,S.setNode(k,N),k}function i(S){var w=new t().setGraph(S.graph());return e.forEach(S.nodes(),function(N){w.setNode(N,S.node(N))}),e.forEach(S.edges(),function(N){var C=w.edge(N.v,N.w)||{weight:0,minlen:1},k=S.edge(N);w.setEdge(N.v,N.w,{weight:C.weight+k.weight,minlen:Math.max(C.minlen,k.minlen)})}),w}function o(S){var w=new t({multigraph:S.isMultigraph()}).setGraph(S.graph());return e.forEach(S.nodes(),function(N){S.children(N).length||w.setNode(N,S.node(N))}),e.forEach(S.edges(),function(N){w.setEdge(N,S.edge(N))}),w}function s(S){var w=e.map(S.nodes(),function(N){var C={};return e.forEach(S.outEdges(N),function(k){C[k.w]=(C[k.w]||0)+S.edge(k).weight}),C});return e.zipObject(S.nodes(),w)}function l(S){var w=e.map(S.nodes(),function(N){var C={};return e.forEach(S.inEdges(N),function(k){C[k.v]=(C[k.v]||0)+S.edge(k).weight}),C});return e.zipObject(S.nodes(),w)}function c(S,w){var N=S.x,C=S.y,k=w.x-N,M=w.y-C,R=S.width/2,O=S.height/2;if(!k&&!M)throw new Error("Not possible to find intersection inside of the rectangle");var I,V;return Math.abs(M)*R>Math.abs(k)*O?(M<0&&(O=-O),I=O*k/M,V=O):(k<0&&(R=-R),I=R,V=R*M/k),{x:N+I,y:C+V}}function f(S){var w=e.map(e.range(g(S)+1),function(){return[]});return e.forEach(S.nodes(),function(N){var C=S.node(N),k=C.rank;e.isUndefined(k)||(w[k][C.order]=N)}),w}function h(S){var w=e.min(e.map(S.nodes(),function(N){return S.node(N).rank}));e.forEach(S.nodes(),function(N){var C=S.node(N);e.has(C,"rank")&&(C.rank-=w)})}function p(S){var w=e.min(e.map(S.nodes(),function(M){return S.node(M).rank})),N=[];e.forEach(S.nodes(),function(M){var R=S.node(M).rank-w;N[R]||(N[R]=[]),N[R].push(M)});var C=0,k=S.graph().nodeRankFactor;e.forEach(N,function(M,R){e.isUndefined(M)&&R%k!==0?--C:C&&e.forEach(M,function(O){S.node(O).rank+=C})})}function m(S,w,N,C){var k={width:0,height:0};return arguments.length>=4&&(k.rank=N,k.order=C),n(S,"border",k,w)}function g(S){return e.max(e.map(S.nodes(),function(w){var N=S.node(w).rank;if(!e.isUndefined(N))return N}))}function v(S,w){var N={lhs:[],rhs:[]};return e.forEach(S,function(C){w(C)?N.lhs.push(C):N.rhs.push(C)}),N}function _(S,w){var N=e.now();try{return w()}finally{console.log(S+" time: "+(e.now()-N)+"ms")}}function E(S,w){return w()}return $0}var Y0,bR;function NG(){if(bR)return Y0;bR=1;var e=qt(),t=Mn();Y0={run:n,undo:o};function n(s){s.graph().dummyChains=[],e.forEach(s.edges(),function(l){i(s,l)})}function i(s,l){var c=l.v,f=s.node(c).rank,h=l.w,p=s.node(h).rank,m=l.name,g=s.edge(l),v=g.labelRank;if(p!==f+1){s.removeEdge(l);var _,E,S;for(S=0,++f;f<p;++S,++f)g.points=[],E={width:0,height:0,edgeLabel:g,edgeObj:l,rank:f},_=t.addDummyNode(s,"edge",E,"_d"),f===v&&(E.width=g.width,E.height=g.height,E.dummy="edge-label",E.labelpos=g.labelpos),s.setEdge(c,_,{weight:g.weight},m),S===0&&s.graph().dummyChains.push(_),c=_;s.setEdge(c,h,{weight:g.weight},m)}}function o(s){e.forEach(s.graph().dummyChains,function(l){var c=s.node(l),f=c.edgeLabel,h;for(s.setEdge(c.edgeObj,f);c.dummy;)h=s.successors(l)[0],s.removeNode(l),f.points.push({x:c.x,y:c.y}),c.dummy==="edge-label"&&(f.x=c.x,f.y=c.y,f.width=c.width,f.height=c.height),l=h,c=s.node(l)})}return Y0}var G0,wR;function Ef(){if(wR)return G0;wR=1;var e=qt();G0={longestPath:t,slack:n};function t(i){var o={};function s(l){var c=i.node(l);if(e.has(o,l))return c.rank;o[l]=!0;var f=e.min(e.map(i.outEdges(l),function(h){return s(h.w)-i.edge(h).minlen}));return(f===Number.POSITIVE_INFINITY||f===void 0||f===null)&&(f=0),c.rank=f}e.forEach(i.sources(),s)}function n(i,o){return i.node(o.w).rank-i.node(o.v).rank-i.edge(o).minlen}return G0}var X0,_R;function HO(){if(_R)return X0;_R=1;var e=qt(),t=Er().Graph,n=Ef().slack;X0=i;function i(c){var f=new t({directed:!1}),h=c.nodes()[0],p=c.nodeCount();f.setNode(h,{});for(var m,g;o(f,c)<p;)m=s(f,c),g=f.hasNode(m.v)?n(c,m):-n(c,m),l(f,c,g);return f}function o(c,f){function h(p){e.forEach(f.nodeEdges(p),function(m){var g=m.v,v=p===g?m.w:g;!c.hasNode(v)&&!n(f,m)&&(c.setNode(v,{}),c.setEdge(p,v,{}),h(v))})}return e.forEach(c.nodes(),h),c.nodeCount()}function s(c,f){return e.minBy(f.edges(),function(h){if(c.hasNode(h.v)!==c.hasNode(h.w))return n(f,h)})}function l(c,f,h){e.forEach(c.nodes(),function(p){f.node(p).rank+=h})}return X0}var K0,SR;function kG(){if(SR)return K0;SR=1;var e=qt(),t=HO(),n=Ef().slack,i=Ef().longestPath,o=Er().alg.preorder,s=Er().alg.postorder,l=Mn().simplify;K0=c,c.initLowLimValues=m,c.initCutValues=f,c.calcCutValue=p,c.leaveEdge=v,c.enterEdge=_,c.exchangeEdges=E;function c(C){C=l(C),i(C);var k=t(C);m(k),f(k,C);for(var M,R;M=v(k);)R=_(k,C,M),E(k,C,M,R)}function f(C,k){var M=s(C,C.nodes());M=M.slice(0,M.length-1),e.forEach(M,function(R){h(C,k,R)})}function h(C,k,M){var R=C.node(M),O=R.parent;C.edge(M,O).cutvalue=p(C,k,M)}function p(C,k,M){var R=C.node(M),O=R.parent,I=!0,V=k.edge(M,O),K=0;return V||(I=!1,V=k.edge(O,M)),K=V.weight,e.forEach(k.nodeEdges(M),function(H){var F=H.v===M,X=F?H.w:H.v;if(X!==O){var L=F===I,B=k.edge(H).weight;if(K+=L?B:-B,w(C,M,X)){var z=C.edge(M,X).cutvalue;K+=L?-z:z}}}),K}function m(C,k){arguments.length<2&&(k=C.nodes()[0]),g(C,{},1,k)}function g(C,k,M,R,O){var I=M,V=C.node(R);return k[R]=!0,e.forEach(C.neighbors(R),function(K){e.has(k,K)||(M=g(C,k,M,K,R))}),V.low=I,V.lim=M++,O?V.parent=O:delete V.parent,M}function v(C){return e.find(C.edges(),function(k){return C.edge(k).cutvalue<0})}function _(C,k,M){var R=M.v,O=M.w;k.hasEdge(R,O)||(R=M.w,O=M.v);var I=C.node(R),V=C.node(O),K=I,H=!1;I.lim>V.lim&&(K=V,H=!0);var F=e.filter(k.edges(),function(X){return H===N(C,C.node(X.v),K)&&H!==N(C,C.node(X.w),K)});return e.minBy(F,function(X){return n(k,X)})}function E(C,k,M,R){var O=M.v,I=M.w;C.removeEdge(O,I),C.setEdge(R.v,R.w,{}),m(C),f(C,k),S(C,k)}function S(C,k){var M=e.find(C.nodes(),function(O){return!k.node(O).parent}),R=o(C,M);R=R.slice(1),e.forEach(R,function(O){var I=C.node(O).parent,V=k.edge(O,I),K=!1;V||(V=k.edge(I,O),K=!0),k.node(O).rank=k.node(I).rank+(K?V.minlen:-V.minlen)})}function w(C,k,M){return C.hasEdge(k,M)}function N(C,k,M){return M.low<=k.lim&&k.lim<=M.lim}return K0}var Q0,ER;function TG(){if(ER)return Q0;ER=1;var e=Ef(),t=e.longestPath,n=HO(),i=kG();Q0=o;function o(f){switch(f.graph().ranker){case"network-simplex":c(f);break;case"tight-tree":l(f);break;case"longest-path":s(f);break;default:c(f)}}var s=t;function l(f){t(f),n(f)}function c(f){i(f)}return Q0}var Z0,CR;function AG(){if(CR)return Z0;CR=1;var e=qt();Z0=t;function t(o){var s=i(o);e.forEach(o.graph().dummyChains,function(l){for(var c=o.node(l),f=c.edgeObj,h=n(o,s,f.v,f.w),p=h.path,m=h.lca,g=0,v=p[g],_=!0;l!==f.w;){if(c=o.node(l),_){for(;(v=p[g])!==m&&o.node(v).maxRank<c.rank;)g++;v===m&&(_=!1)}if(!_){for(;g<p.length-1&&o.node(v=p[g+1]).minRank<=c.rank;)g++;v=p[g]}o.setParent(l,v),l=o.successors(l)[0]}})}function n(o,s,l,c){var f=[],h=[],p=Math.min(s[l].low,s[c].low),m=Math.max(s[l].lim,s[c].lim),g,v;g=l;do g=o.parent(g),f.push(g);while(g&&(s[g].low>p||m>s[g].lim));for(v=g,g=c;(g=o.parent(g))!==v;)h.push(g);return{path:f.concat(h.reverse()),lca:v}}function i(o){var s={},l=0;function c(f){var h=l;e.forEach(o.children(f),c),s[f]={low:h,lim:l++}}return e.forEach(o.children(),c),s}return Z0}var W0,NR;function RG(){if(NR)return W0;NR=1;var e=qt(),t=Mn();W0={run:n,cleanup:l};function n(c){var f=t.addDummyNode(c,"root",{},"_root"),h=o(c),p=e.max(e.values(h))-1,m=2*p+1;c.graph().nestingRoot=f,e.forEach(c.edges(),function(v){c.edge(v).minlen*=m});var g=s(c)+1;e.forEach(c.children(),function(v){i(c,f,m,g,p,h,v)}),c.graph().nodeRankFactor=m}function i(c,f,h,p,m,g,v){var _=c.children(v);if(!_.length){v!==f&&c.setEdge(f,v,{weight:0,minlen:h});return}var E=t.addBorderNode(c,"_bt"),S=t.addBorderNode(c,"_bb"),w=c.node(v);c.setParent(E,v),w.borderTop=E,c.setParent(S,v),w.borderBottom=S,e.forEach(_,function(N){i(c,f,h,p,m,g,N);var C=c.node(N),k=C.borderTop?C.borderTop:N,M=C.borderBottom?C.borderBottom:N,R=C.borderTop?p:2*p,O=k!==M?1:m-g[v]+1;c.setEdge(E,k,{weight:R,minlen:O,nestingEdge:!0}),c.setEdge(M,S,{weight:R,minlen:O,nestingEdge:!0})}),c.parent(v)||c.setEdge(f,E,{weight:0,minlen:m+g[v]})}function o(c){var f={};function h(p,m){var g=c.children(p);g&&g.length&&e.forEach(g,function(v){h(v,m+1)}),f[p]=m}return e.forEach(c.children(),function(p){h(p,1)}),f}function s(c){return e.reduce(c.edges(),function(f,h){return f+c.edge(h).weight},0)}function l(c){var f=c.graph();c.removeNode(f.nestingRoot),delete f.nestingRoot,e.forEach(c.edges(),function(h){var p=c.edge(h);p.nestingEdge&&c.removeEdge(h)})}return W0}var J0,kR;function MG(){if(kR)return J0;kR=1;var e=qt(),t=Mn();J0=n;function n(o){function s(l){var c=o.children(l),f=o.node(l);if(c.length&&e.forEach(c,s),e.has(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(var h=f.minRank,p=f.maxRank+1;h<p;++h)i(o,"borderLeft","_bl",l,f,h),i(o,"borderRight","_br",l,f,h)}}e.forEach(o.children(),s)}function i(o,s,l,c,f,h){var p={width:0,height:0,rank:h,borderType:s},m=f[s][h-1],g=t.addDummyNode(o,"border",p,l);f[s][h]=g,o.setParent(g,c),m&&o.setEdge(m,g,{weight:1})}return J0}var ex,TR;function jG(){if(TR)return ex;TR=1;var e=qt();ex={adjust:t,undo:n};function t(h){var p=h.graph().rankdir.toLowerCase();(p==="lr"||p==="rl")&&i(h)}function n(h){var p=h.graph().rankdir.toLowerCase();(p==="bt"||p==="rl")&&s(h),(p==="lr"||p==="rl")&&(c(h),i(h))}function i(h){e.forEach(h.nodes(),function(p){o(h.node(p))}),e.forEach(h.edges(),function(p){o(h.edge(p))})}function o(h){var p=h.width;h.width=h.height,h.height=p}function s(h){e.forEach(h.nodes(),function(p){l(h.node(p))}),e.forEach(h.edges(),function(p){var m=h.edge(p);e.forEach(m.points,l),e.has(m,"y")&&l(m)})}function l(h){h.y=-h.y}function c(h){e.forEach(h.nodes(),function(p){f(h.node(p))}),e.forEach(h.edges(),function(p){var m=h.edge(p);e.forEach(m.points,f),e.has(m,"x")&&f(m)})}function f(h){var p=h.x;h.x=h.y,h.y=p}return ex}var tx,AR;function OG(){if(AR)return tx;AR=1;var e=qt();tx=t;function t(n){var i={},o=e.filter(n.nodes(),function(h){return!n.children(h).length}),s=e.max(e.map(o,function(h){return n.node(h).rank})),l=e.map(e.range(s+1),function(){return[]});function c(h){if(!e.has(i,h)){i[h]=!0;var p=n.node(h);l[p.rank].push(h),e.forEach(n.successors(h),c)}}var f=e.sortBy(o,function(h){return n.node(h).rank});return e.forEach(f,c),l}return tx}var nx,RR;function zG(){if(RR)return nx;RR=1;var e=qt();nx=t;function t(i,o){for(var s=0,l=1;l<o.length;++l)s+=n(i,o[l-1],o[l]);return s}function n(i,o,s){for(var l=e.zipObject(s,e.map(s,function(g,v){return v})),c=e.flatten(e.map(o,function(g){return e.sortBy(e.map(i.outEdges(g),function(v){return{pos:l[v.w],weight:i.edge(v).weight}}),"pos")}),!0),f=1;f<s.length;)f<<=1;var h=2*f-1;f-=1;var p=e.map(new Array(h),function(){return 0}),m=0;return e.forEach(c.forEach(function(g){var v=g.pos+f;p[v]+=g.weight;for(var _=0;v>0;)v%2&&(_+=p[v+1]),v=v-1>>1,p[v]+=g.weight;m+=g.weight*_})),m}return nx}var rx,MR;function DG(){if(MR)return rx;MR=1;var e=qt();rx=t;function t(n,i){return e.map(i,function(o){var s=n.inEdges(o);if(s.length){var l=e.reduce(s,function(c,f){var h=n.edge(f),p=n.node(f.v);return{sum:c.sum+h.weight*p.order,weight:c.weight+h.weight}},{sum:0,weight:0});return{v:o,barycenter:l.sum/l.weight,weight:l.weight}}else return{v:o}})}return rx}var ix,jR;function LG(){if(jR)return ix;jR=1;var e=qt();ix=t;function t(o,s){var l={};e.forEach(o,function(f,h){var p=l[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:h};e.isUndefined(f.barycenter)||(p.barycenter=f.barycenter,p.weight=f.weight)}),e.forEach(s.edges(),function(f){var h=l[f.v],p=l[f.w];!e.isUndefined(h)&&!e.isUndefined(p)&&(p.indegree++,h.out.push(l[f.w]))});var c=e.filter(l,function(f){return!f.indegree});return n(c)}function n(o){var s=[];function l(h){return function(p){p.merged||(e.isUndefined(p.barycenter)||e.isUndefined(h.barycenter)||p.barycenter>=h.barycenter)&&i(h,p)}}function c(h){return function(p){p.in.push(h),--p.indegree===0&&o.push(p)}}for(;o.length;){var f=o.pop();s.push(f),e.forEach(f.in.reverse(),l(f)),e.forEach(f.out,c(f))}return e.map(e.filter(s,function(h){return!h.merged}),function(h){return e.pick(h,["vs","i","barycenter","weight"])})}function i(o,s){var l=0,c=0;o.weight&&(l+=o.barycenter*o.weight,c+=o.weight),s.weight&&(l+=s.barycenter*s.weight,c+=s.weight),o.vs=s.vs.concat(o.vs),o.barycenter=l/c,o.weight=c,o.i=Math.min(s.i,o.i),s.merged=!0}return ix}var ax,OR;function qG(){if(OR)return ax;OR=1;var e=qt(),t=Mn();ax=n;function n(s,l){var c=t.partition(s,function(E){return e.has(E,"barycenter")}),f=c.lhs,h=e.sortBy(c.rhs,function(E){return-E.i}),p=[],m=0,g=0,v=0;f.sort(o(!!l)),v=i(p,h,v),e.forEach(f,function(E){v+=E.vs.length,p.push(E.vs),m+=E.barycenter*E.weight,g+=E.weight,v=i(p,h,v)});var _={vs:e.flatten(p,!0)};return g&&(_.barycenter=m/g,_.weight=g),_}function i(s,l,c){for(var f;l.length&&(f=e.last(l)).i<=c;)l.pop(),s.push(f.vs),c++;return c}function o(s){return function(l,c){return l.barycenter<c.barycenter?-1:l.barycenter>c.barycenter?1:s?c.i-l.i:l.i-c.i}}return ax}var ox,zR;function IG(){if(zR)return ox;zR=1;var e=qt(),t=DG(),n=LG(),i=qG();ox=o;function o(c,f,h,p){var m=c.children(f),g=c.node(f),v=g?g.borderLeft:void 0,_=g?g.borderRight:void 0,E={};v&&(m=e.filter(m,function(M){return M!==v&&M!==_}));var S=t(c,m);e.forEach(S,function(M){if(c.children(M.v).length){var R=o(c,M.v,h,p);E[M.v]=R,e.has(R,"barycenter")&&l(M,R)}});var w=n(S,h);s(w,E);var N=i(w,p);if(v&&(N.vs=e.flatten([v,N.vs,_],!0),c.predecessors(v).length)){var C=c.node(c.predecessors(v)[0]),k=c.node(c.predecessors(_)[0]);e.has(N,"barycenter")||(N.barycenter=0,N.weight=0),N.barycenter=(N.barycenter*N.weight+C.order+k.order)/(N.weight+2),N.weight+=2}return N}function s(c,f){e.forEach(c,function(h){h.vs=e.flatten(h.vs.map(function(p){return f[p]?f[p].vs:p}),!0)})}function l(c,f){e.isUndefined(c.barycenter)?(c.barycenter=f.barycenter,c.weight=f.weight):(c.barycenter=(c.barycenter*c.weight+f.barycenter*f.weight)/(c.weight+f.weight),c.weight+=f.weight)}return ox}var sx,DR;function BG(){if(DR)return sx;DR=1;var e=qt(),t=Er().Graph;sx=n;function n(o,s,l){var c=i(o),f=new t({compound:!0}).setGraph({root:c}).setDefaultNodeLabel(function(h){return o.node(h)});return e.forEach(o.nodes(),function(h){var p=o.node(h),m=o.parent(h);(p.rank===s||p.minRank<=s&&s<=p.maxRank)&&(f.setNode(h),f.setParent(h,m||c),e.forEach(o[l](h),function(g){var v=g.v===h?g.w:g.v,_=f.edge(v,h),E=e.isUndefined(_)?0:_.weight;f.setEdge(v,h,{weight:o.edge(g).weight+E})}),e.has(p,"minRank")&&f.setNode(h,{borderLeft:p.borderLeft[s],borderRight:p.borderRight[s]}))}),f}function i(o){for(var s;o.hasNode(s=e.uniqueId("_root")););return s}return sx}var lx,LR;function HG(){if(LR)return lx;LR=1;var e=qt();lx=t;function t(n,i,o){var s={},l;e.forEach(o,function(c){for(var f=n.parent(c),h,p;f;){if(h=n.parent(f),h?(p=s[h],s[h]=f):(p=l,l=f),p&&p!==f){i.setEdge(p,f);return}f=h}})}return lx}var ux,qR;function UG(){if(qR)return ux;qR=1;var e=qt(),t=OG(),n=zG(),i=IG(),o=BG(),s=HG(),l=Er().Graph,c=Mn();ux=f;function f(g){var v=c.maxRank(g),_=h(g,e.range(1,v+1),"inEdges"),E=h(g,e.range(v-1,-1,-1),"outEdges"),S=t(g);m(g,S);for(var w=Number.POSITIVE_INFINITY,N,C=0,k=0;k<4;++C,++k){p(C%2?_:E,C%4>=2),S=c.buildLayerMatrix(g);var M=n(g,S);M<w&&(k=0,N=e.cloneDeep(S),w=M)}m(g,N)}function h(g,v,_){return e.map(v,function(E){return o(g,E,_)})}function p(g,v){var _=new l;e.forEach(g,function(E){var S=E.graph().root,w=i(E,S,_,v);e.forEach(w.vs,function(N,C){E.node(N).order=C}),s(E,_,w.vs)})}function m(g,v){e.forEach(v,function(_){e.forEach(_,function(E,S){g.node(E).order=S})})}return ux}var cx,IR;function PG(){if(IR)return cx;IR=1;var e=qt(),t=Er().Graph,n=Mn();cx={positionX:_,findType1Conflicts:i,findType2Conflicts:o,addConflict:l,hasConflict:c,verticalAlignment:f,horizontalCompaction:h,alignCoordinates:g,findSmallestWidthAlignment:m,balance:v};function i(w,N){var C={};function k(M,R){var O=0,I=0,V=M.length,K=e.last(R);return e.forEach(R,function(H,F){var X=s(w,H),L=X?w.node(X).order:V;(X||H===K)&&(e.forEach(R.slice(I,F+1),function(B){e.forEach(w.predecessors(B),function(z){var U=w.node(z),G=U.order;(G<O||L<G)&&!(U.dummy&&w.node(B).dummy)&&l(C,z,B)})}),I=F+1,O=L)}),R}return e.reduce(N,k),C}function o(w,N){var C={};function k(R,O,I,V,K){var H;e.forEach(e.range(O,I),function(F){H=R[F],w.node(H).dummy&&e.forEach(w.predecessors(H),function(X){var L=w.node(X);L.dummy&&(L.order<V||L.order>K)&&l(C,X,H)})})}function M(R,O){var I=-1,V,K=0;return e.forEach(O,function(H,F){if(w.node(H).dummy==="border"){var X=w.predecessors(H);X.length&&(V=w.node(X[0]).order,k(O,K,F,I,V),K=F,I=V)}k(O,K,O.length,V,R.length)}),O}return e.reduce(N,M),C}function s(w,N){if(w.node(N).dummy)return e.find(w.predecessors(N),function(C){return w.node(C).dummy})}function l(w,N,C){if(N>C){var k=N;N=C,C=k}var M=w[N];M||(w[N]=M={}),M[C]=!0}function c(w,N,C){if(N>C){var k=N;N=C,C=k}return e.has(w[N],C)}function f(w,N,C,k){var M={},R={},O={};return e.forEach(N,function(I){e.forEach(I,function(V,K){M[V]=V,R[V]=V,O[V]=K})}),e.forEach(N,function(I){var V=-1;e.forEach(I,function(K){var H=k(K);if(H.length){H=e.sortBy(H,function(z){return O[z]});for(var F=(H.length-1)/2,X=Math.floor(F),L=Math.ceil(F);X<=L;++X){var B=H[X];R[K]===K&&V<O[B]&&!c(C,K,B)&&(R[B]=K,R[K]=M[K]=M[B],V=O[B])}}})}),{root:M,align:R}}function h(w,N,C,k,M){var R={},O=p(w,N,C,M),I=M?"borderLeft":"borderRight";function V(F,X){for(var L=O.nodes(),B=L.pop(),z={};B;)z[B]?F(B):(z[B]=!0,L.push(B),L=L.concat(X(B))),B=L.pop()}function K(F){R[F]=O.inEdges(F).reduce(function(X,L){return Math.max(X,R[L.v]+O.edge(L))},0)}function H(F){var X=O.outEdges(F).reduce(function(B,z){return Math.min(B,R[z.w]-O.edge(z))},Number.POSITIVE_INFINITY),L=w.node(F);X!==Number.POSITIVE_INFINITY&&L.borderType!==I&&(R[F]=Math.max(R[F],X))}return V(K,O.predecessors.bind(O)),V(H,O.successors.bind(O)),e.forEach(k,function(F){R[F]=R[C[F]]}),R}function p(w,N,C,k){var M=new t,R=w.graph(),O=E(R.nodesep,R.edgesep,k);return e.forEach(N,function(I){var V;e.forEach(I,function(K){var H=C[K];if(M.setNode(H),V){var F=C[V],X=M.edge(F,H);M.setEdge(F,H,Math.max(O(w,K,V),X||0))}V=K})}),M}function m(w,N){return e.minBy(e.values(N),function(C){var k=Number.NEGATIVE_INFINITY,M=Number.POSITIVE_INFINITY;return e.forIn(C,function(R,O){var I=S(w,O)/2;k=Math.max(R+I,k),M=Math.min(R-I,M)}),k-M})}function g(w,N){var C=e.values(N),k=e.min(C),M=e.max(C);e.forEach(["u","d"],function(R){e.forEach(["l","r"],function(O){var I=R+O,V=w[I],K;if(V!==N){var H=e.values(V);K=O==="l"?k-e.min(H):M-e.max(H),K&&(w[I]=e.mapValues(V,function(F){return F+K}))}})})}function v(w,N){return e.mapValues(w.ul,function(C,k){if(N)return w[N.toLowerCase()][k];var M=e.sortBy(e.map(w,k));return(M[1]+M[2])/2})}function _(w){var N=n.buildLayerMatrix(w),C=e.merge(i(w,N),o(w,N)),k={},M;e.forEach(["u","d"],function(O){M=O==="u"?N:e.values(N).reverse(),e.forEach(["l","r"],function(I){I==="r"&&(M=e.map(M,function(F){return e.values(F).reverse()}));var V=(O==="u"?w.predecessors:w.successors).bind(w),K=f(w,M,C,V),H=h(w,M,K.root,K.align,I==="r");I==="r"&&(H=e.mapValues(H,function(F){return-F})),k[O+I]=H})});var R=m(w,k);return g(k,R),v(k,w.graph().align)}function E(w,N,C){return function(k,M,R){var O=k.node(M),I=k.node(R),V=0,K;if(V+=O.width/2,e.has(O,"labelpos"))switch(O.labelpos.toLowerCase()){case"l":K=-O.width/2;break;case"r":K=O.width/2;break}if(K&&(V+=C?K:-K),K=0,V+=(O.dummy?N:w)/2,V+=(I.dummy?N:w)/2,V+=I.width/2,e.has(I,"labelpos"))switch(I.labelpos.toLowerCase()){case"l":K=I.width/2;break;case"r":K=-I.width/2;break}return K&&(V+=C?K:-K),K=0,V}}function S(w,N){return w.node(N).width}return cx}var fx,BR;function VG(){if(BR)return fx;BR=1;var e=qt(),t=Mn(),n=PG().positionX;fx=i;function i(s){s=t.asNonCompoundGraph(s),o(s),e.forEach(n(s),function(l,c){s.node(c).x=l})}function o(s){var l=t.buildLayerMatrix(s),c=s.graph().ranksep,f=0;e.forEach(l,function(h){var p=e.max(e.map(h,function(m){return s.node(m).height}));e.forEach(h,function(m){s.node(m).y=f+p/2}),f+=p+c})}return fx}var dx,HR;function FG(){if(HR)return dx;HR=1;var e=qt(),t=CG(),n=NG(),i=TG(),o=Mn().normalizeRanks,s=AG(),l=Mn().removeEmptyRanks,c=RG(),f=MG(),h=jG(),p=UG(),m=VG(),g=Mn(),v=Er().Graph;dx=_;function _(Y,Z){var W=Z&&Z.debugTiming?g.time:g.notime;W("layout",function(){var te=W(" buildLayoutGraph",function(){return V(Y)});W(" runLayout",function(){E(te,W)}),W(" updateInputGraph",function(){S(Y,te)})})}function E(Y,Z){Z(" makeSpaceForEdgeLabels",function(){K(Y)}),Z(" removeSelfEdges",function(){Q(Y)}),Z(" acyclic",function(){t.run(Y)}),Z(" nestingGraph.run",function(){c.run(Y)}),Z(" rank",function(){i(g.asNonCompoundGraph(Y))}),Z(" injectEdgeLabelProxies",function(){H(Y)}),Z(" removeEmptyRanks",function(){l(Y)}),Z(" nestingGraph.cleanup",function(){c.cleanup(Y)}),Z(" normalizeRanks",function(){o(Y)}),Z(" assignRankMinMax",function(){F(Y)}),Z(" removeEdgeLabelProxies",function(){X(Y)}),Z(" normalize.run",function(){n.run(Y)}),Z(" parentDummyChains",function(){s(Y)}),Z(" addBorderSegments",function(){f(Y)}),Z(" order",function(){p(Y)}),Z(" insertSelfEdges",function(){j(Y)}),Z(" adjustCoordinateSystem",function(){h.adjust(Y)}),Z(" position",function(){m(Y)}),Z(" positionSelfEdges",function(){D(Y)}),Z(" removeBorderNodes",function(){G(Y)}),Z(" normalize.undo",function(){n.undo(Y)}),Z(" fixupEdgeLabelCoords",function(){z(Y)}),Z(" undoCoordinateSystem",function(){h.undo(Y)}),Z(" translateGraph",function(){L(Y)}),Z(" assignNodeIntersects",function(){B(Y)}),Z(" reversePoints",function(){U(Y)}),Z(" acyclic.undo",function(){t.undo(Y)})}function S(Y,Z){e.forEach(Y.nodes(),function(W){var te=Y.node(W),re=Z.node(W);te&&(te.x=re.x,te.y=re.y,Z.children(W).length&&(te.width=re.width,te.height=re.height))}),e.forEach(Y.edges(),function(W){var te=Y.edge(W),re=Z.edge(W);te.points=re.points,e.has(re,"x")&&(te.x=re.x,te.y=re.y)}),Y.graph().width=Z.graph().width,Y.graph().height=Z.graph().height}var w=["nodesep","edgesep","ranksep","marginx","marginy"],N={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},C=["acyclicer","ranker","rankdir","align"],k=["width","height"],M={width:0,height:0},R=["minlen","weight","width","height","labeloffset"],O={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},I=["labelpos"];function V(Y){var Z=new v({multigraph:!0,compound:!0}),W=q(Y.graph());return Z.setGraph(e.merge({},N,$(W,w),e.pick(W,C))),e.forEach(Y.nodes(),function(te){var re=q(Y.node(te));Z.setNode(te,e.defaults($(re,k),M)),Z.setParent(te,Y.parent(te))}),e.forEach(Y.edges(),function(te){var re=q(Y.edge(te));Z.setEdge(te,e.merge({},O,$(re,R),e.pick(re,I)))}),Z}function K(Y){var Z=Y.graph();Z.ranksep/=2,e.forEach(Y.edges(),function(W){var te=Y.edge(W);te.minlen*=2,te.labelpos.toLowerCase()!=="c"&&(Z.rankdir==="TB"||Z.rankdir==="BT"?te.width+=te.labeloffset:te.height+=te.labeloffset)})}function H(Y){e.forEach(Y.edges(),function(Z){var W=Y.edge(Z);if(W.width&&W.height){var te=Y.node(Z.v),re=Y.node(Z.w),se={rank:(re.rank-te.rank)/2+te.rank,e:Z};g.addDummyNode(Y,"edge-proxy",se,"_ep")}})}function F(Y){var Z=0;e.forEach(Y.nodes(),function(W){var te=Y.node(W);te.borderTop&&(te.minRank=Y.node(te.borderTop).rank,te.maxRank=Y.node(te.borderBottom).rank,Z=e.max(Z,te.maxRank))}),Y.graph().maxRank=Z}function X(Y){e.forEach(Y.nodes(),function(Z){var W=Y.node(Z);W.dummy==="edge-proxy"&&(Y.edge(W.e).labelRank=W.rank,Y.removeNode(Z))})}function L(Y){var Z=Number.POSITIVE_INFINITY,W=0,te=Number.POSITIVE_INFINITY,re=0,se=Y.graph(),me=se.marginx||0,be=se.marginy||0;function ve(we){var ke=we.x,Ne=we.y,Oe=we.width,Te=we.height;Z=Math.min(Z,ke-Oe/2),W=Math.max(W,ke+Oe/2),te=Math.min(te,Ne-Te/2),re=Math.max(re,Ne+Te/2)}e.forEach(Y.nodes(),function(we){ve(Y.node(we))}),e.forEach(Y.edges(),function(we){var ke=Y.edge(we);e.has(ke,"x")&&ve(ke)}),Z-=me,te-=be,e.forEach(Y.nodes(),function(we){var ke=Y.node(we);ke.x-=Z,ke.y-=te}),e.forEach(Y.edges(),function(we){var ke=Y.edge(we);e.forEach(ke.points,function(Ne){Ne.x-=Z,Ne.y-=te}),e.has(ke,"x")&&(ke.x-=Z),e.has(ke,"y")&&(ke.y-=te)}),se.width=W-Z+me,se.height=re-te+be}function B(Y){e.forEach(Y.edges(),function(Z){var W=Y.edge(Z),te=Y.node(Z.v),re=Y.node(Z.w),se,me;W.points?(se=W.points[0],me=W.points[W.points.length-1]):(W.points=[],se=re,me=te),W.points.unshift(g.intersectRect(te,se)),W.points.push(g.intersectRect(re,me))})}function z(Y){e.forEach(Y.edges(),function(Z){var W=Y.edge(Z);if(e.has(W,"x"))switch((W.labelpos==="l"||W.labelpos==="r")&&(W.width-=W.labeloffset),W.labelpos){case"l":W.x-=W.width/2+W.labeloffset;break;case"r":W.x+=W.width/2+W.labeloffset;break}})}function U(Y){e.forEach(Y.edges(),function(Z){var W=Y.edge(Z);W.reversed&&W.points.reverse()})}function G(Y){e.forEach(Y.nodes(),function(Z){if(Y.children(Z).length){var W=Y.node(Z),te=Y.node(W.borderTop),re=Y.node(W.borderBottom),se=Y.node(e.last(W.borderLeft)),me=Y.node(e.last(W.borderRight));W.width=Math.abs(me.x-se.x),W.height=Math.abs(re.y-te.y),W.x=se.x+W.width/2,W.y=te.y+W.height/2}}),e.forEach(Y.nodes(),function(Z){Y.node(Z).dummy==="border"&&Y.removeNode(Z)})}function Q(Y){e.forEach(Y.edges(),function(Z){if(Z.v===Z.w){var W=Y.node(Z.v);W.selfEdges||(W.selfEdges=[]),W.selfEdges.push({e:Z,label:Y.edge(Z)}),Y.removeEdge(Z)}})}function j(Y){var Z=g.buildLayerMatrix(Y);e.forEach(Z,function(W){var te=0;e.forEach(W,function(re,se){var me=Y.node(re);me.order=se+te,e.forEach(me.selfEdges,function(be){g.addDummyNode(Y,"selfedge",{width:be.label.width,height:be.label.height,rank:me.rank,order:se+ ++te,e:be.e,label:be.label},"_se")}),delete me.selfEdges})})}function D(Y){e.forEach(Y.nodes(),function(Z){var W=Y.node(Z);if(W.dummy==="selfedge"){var te=Y.node(W.e.v),re=te.x+te.width/2,se=te.y,me=W.x-re,be=te.height/2;Y.setEdge(W.e,W.label),Y.removeNode(Z),W.label.points=[{x:re+2*me/3,y:se-be},{x:re+5*me/6,y:se-be},{x:re+me,y:se},{x:re+5*me/6,y:se+be},{x:re+2*me/3,y:se+be}],W.label.x=W.x,W.label.y=W.y}})}function $(Y,Z){return e.mapValues(e.pick(Y,Z),Number)}function q(Y){var Z={};return e.forEach(Y,function(W,te){Z[te.toLowerCase()]=W}),Z}return dx}var hx,UR;function $G(){if(UR)return hx;UR=1;var e=qt(),t=Mn(),n=Er().Graph;hx={debugOrdering:i};function i(o){var s=t.buildLayerMatrix(o),l=new n({compound:!0,multigraph:!0}).setGraph({});return e.forEach(o.nodes(),function(c){l.setNode(c,{label:c}),l.setParent(c,"layer"+o.node(c).rank)}),e.forEach(o.edges(),function(c){l.setEdge(c.v,c.w,{},c.name)}),e.forEach(s,function(c,f){var h="layer"+f;l.setNode(h,{rank:"same"}),e.reduce(c,function(p,m){return l.setEdge(p,m,{style:"invis"}),m})}),l}return hx}var px,PR;function YG(){return PR||(PR=1,px="0.8.5"),px}var mx,VR;function GG(){return VR||(VR=1,mx={graphlib:Er(),layout:FG(),debug:$G(),util:{time:Mn().time,notime:Mn().notime},version:YG()}),mx}var XG=GG();const Cf=Hl(XG),Bc=32,ll=260;function KG(e,t,n,i,o=!1){var C,k,M,R,O,I,V,K,H,F;if(i==="services")return{nodes:e,edges:t};if(n.size===0&&!o)return{nodes:e,edges:t};const s=new Map,l=new Map;for(const X of e){s.set(X.id,X);const L=X.parentId;if(L){const B=l.get(L)||[];B.push(X.id),l.set(L,B)}}const c=new Set;function f(X){const L=l.get(X)||[];for(const B of L)c.add(B),f(B)}for(const X of n)f(X);const h=e.filter(X=>X.type==="serviceGroup"),p=new Map,m=new Map,g=new Set;for(const X of h){const L=(l.get(X.id)||[]).map(D=>s.get(D)).filter(D=>(D==null?void 0:D.type)==="layer").sort((D,$)=>D.position.y-$.position.y);let B=0;L.length>0;for(const D of L)if(B!==0&&m.set(D.id,B),n.has(D.id)){const $=((C=D.style)==null?void 0:C.height)||(((k=D.measured)==null?void 0:k.height)??100),q=Bc-$;p.set(D.id,q),B+=q,g.add(D.id)}else if(i==="methods"){const $=(l.get(D.id)||[]).map(W=>s.get(W)).filter(W=>(W==null?void 0:W.type)==="module").sort((W,te)=>W.position.y-te.position.y),q=[];let Y=-1/0;for(const W of $)Math.abs(W.position.y-Y)>1&&(q.push([]),Y=W.position.y),q[q.length-1].push(W);let Z=0;$.length>0;for(const W of q){if(Z!==0)for(const me of W)m.set(me.id,Z);let te=0,re=0;for(const me of W){const be=((M=me.style)==null?void 0:M.height)||(((R=me.measured)==null?void 0:R.height)??80);te=Math.max(te,be),n.has(me.id)?(p.set(me.id,Bc-be),re=Math.max(re,Bc)):re=Math.max(re,be)}const se=re-te;se!==0&&(Z+=se)}Z!==0&&(p.set(D.id,(p.get(D.id)||0)+Z),B+=Z)}B!==0&&p.set(X.id,B);const z=20,U=X.style,G=(U==null?void 0:U.width)??500;let Q=0;for(const D of L){const $=p.get(`__layerW__${D.id}`);if($)Q=Math.max(Q,$);else if(g.has(D.id))Q=Math.max(Q,ll);else{const q=D.style;Q=Math.max(Q,(q==null?void 0:q.width)??G-z*2)}}const j=Q+z*2;j<G&&(g.add(X.id),p.set(`__groupW__${X.id}`,j))}const v=20,_=[];for(const X of e){if(c.has(X.id))continue;let L=X;const B=m.get(X.id),z=p.get(X.id),U=n.has(X.id),G=g.has(X.id);if(B||z||U||G){let Q=B?{...X.position,y:X.position.y+B}:X.position;const j=X.style;let D=j?{...j}:{};if(U){if(D={...D,height:Bc},X.type==="module"){const $=(j==null?void 0:j.width)??ll-24;D={...D,width:Math.min($,ll-24)}}}else z&&(j!=null&&j.height)&&(D={...D,height:j.height+z});if(X.type==="serviceGroup"&&z){const $=j==null?void 0:j.height;$&&(D={...D,height:$+z})}if(G){if(X.type==="serviceGroup"){const $=p.get(`__groupW__${X.id}`);D={...D,width:$??ll+v*2}}else if(X.type==="layer"){const $=p.get(`__layerW__${X.id}`);D={...D,width:$??ll}}}L={...X,position:Q,...Object.keys(D).length>0?{style:D}:{}}}_.push(L)}if(o){const X=_.filter(L=>L.type==="serviceGroup"||L.type==="database");if(X.length>1){const L=new Set(X.map(U=>U.id)),B=new Cf.graphlib.Graph;B.setGraph({rankdir:"TB",nodesep:150,ranksep:200,marginx:60,marginy:60}),B.setDefaultEdgeLabel(()=>({}));for(const U of X){const G=U.style;B.setNode(U.id,{width:(G==null?void 0:G.width)??((O=U.measured)==null?void 0:O.width)??280,height:(G==null?void 0:G.height)??((I=U.measured)==null?void 0:I.height)??120})}const z=new Set;for(const U of t){const G=w(U.source),Q=w(U.target),j=G&&L.has(G)?G:L.has(U.source)?U.source:null,D=Q&&L.has(Q)?Q:L.has(U.target)?U.target:null;if(j&&D&&j!==D){const $=`${j}::${D}`;z.has($)||(z.add($),B.setEdge(j,D))}}Cf.layout(B);for(const U of _){if(!L.has(U.id))continue;const G=B.node(U.id);if(!G)continue;const Q=U.style,j=(Q==null?void 0:Q.width)??((V=U.measured)==null?void 0:V.width)??280,D=(Q==null?void 0:Q.height)??((K=U.measured)==null?void 0:K.height)??120;U.position={x:G.x-j/2,y:G.y-D/2}}}}const E=new Set(_.map(X=>X.id));function S(X){if(E.has(X))return X;const L=s.get(X);if(!L)return null;const B=L.parentId;return B?S(B):null}function w(X){let L=s.get(X);for(;L;){if(L.type==="serviceGroup")return L.id;const B=L.parentId;if(!B)return null;L=s.get(B)}return null}const N=new Map;for(const X of t){const L=S(X.source),B=S(X.target);if(!L||!B||L===B)continue;const z=`${L}::${B}`,U=N.get(z);if(U){const G=((H=U.data)==null?void 0:H.dependencyCount)||0,Q=((F=X.data)==null?void 0:F.dependencyCount)||0;N.set(z,{...U,data:{...U.data,dependencyCount:G+Q}})}else{const G=w(L),Q=w(B),j=G&&Q&&G===Q,D=L!==X.source||B!==X.target,$=D?j?{sourceHandle:"right-src",targetHandle:"right-tgt"}:{sourceHandle:"bottom",targetHandle:"top"}:{};N.set(z,{...X,id:D?`promoted-${z}`:X.id,source:L,target:B,...$})}}return{nodes:_,edges:[...N.values()]}}const QG={service:uF,layer:fF,serviceGroup:pF,database:xF,module:_F,method:EF},ZG={dependency:_C,violation:_C,intraLayer:kF,database:AF};function WG({initialNodes:e,initialEdges:t,onNodeSelect:n,onExplainNode:i,selectedNodeId:o,repoId:s,branch:l,onRefetch:c,depthLevel:f,onDepthChange:h,focusNodeId:p,focusKey:m,isDiffMode:g,diffResult:v,isDiffChecking:_,hasProgressBar:E,onEnterDiffMode:S,onExitDiffMode:w,highlightedNodeIds:N,savedCollapsedIds:C}){const[k,M]=T.useState(!1),[R,O]=T.useState(()=>typeof window>"u"?!0:localStorage.getItem("truecourse:animations")!=="off"),[I,V]=T.useState(()=>typeof window>"u"?"bezier":localStorage.getItem("truecourse:edgeStyle")||"bezier"),[K,H]=T.useState(()=>typeof window>"u"?!1:localStorage.getItem("truecourse:focusMode")==="on"),[F,X]=T.useState(!0),L=T.useRef([]),{fitView:B}=Ha(),[z,U,G]=z5(e),[Q,j,D]=jV(t),{collapsedIds:$,toggle:q,expandAll:Y,collapseAll:Z,isBulkAction:W}=jF(s,f,e,l,C),te=T.useCallback(()=>{setTimeout(()=>{const he={};for(const ye of L.current)ye.type==="layer"||ye.type==="module"||ye.type==="method"||(he[ye.id]=ye.position);Object.keys(he).length>0&&n2(s,he,l,f)},600)},[s,l,f]),re=T.useCallback(he=>{q(he),te()},[q,te]),se=T.useCallback(()=>{Y(),te()},[Y,te]),me=T.useCallback(()=>{Z(),te()},[Z,te]);L.current=z;const be=T.useMemo(()=>{const he=new Map;for(const ye of e){const Ue=ye.parentId;Ue&&ye.type==="module"&&he.set(Ue,(he.get(Ue)||0)+1)}return he},[e]);T.useMemo(()=>{const he=_e=>_e===o||_e===p;let ye;f==="services"?ye=e.map(_e=>({..._e,selected:he(_e.id),data:{..._e.data,onExplain:i}})):ye=e.map(_e=>_e.type==="layer"&&_e.data.isContainer?{..._e,selected:he(_e.id),data:{..._e.data,isCollapsed:$.has(_e.id),onToggleCollapse:re,moduleCount:be.get(_e.id)||0}}:_e.type==="module"&&_e.data.isContainer?{..._e,selected:he(_e.id),data:{..._e.data,onExplain:i,isCollapsed:$.has(_e.id),onToggleCollapse:re}}:_e.type==="module"||_e.type==="method"?{..._e,selected:he(_e.id),data:{..._e.data,onExplain:i}}:{..._e,selected:he(_e.id)});let Ue=t.map(_e=>({..._e,data:{..._e.data,edgeStyle:I,hidden:K}}));if(f!=="services"){const _e=KG(ye,Ue,$,f,!0);ye=_e.nodes,Ue=_e.edges.map(Ie=>({...Ie,data:{...Ie.data,edgeStyle:I,hidden:K}}))}if(N&&N.size>0){const _e=new Set;for(const Ie of Ue)(N.has(Ie.source)||N.has(Ie.target))&&_e.add(Ie.id);Ue=Ue.map(Ie=>{var Ve;return{...Ie,data:{...Ie.data,dimmed:!_e.has(Ie.id),hidden:K?!_e.has(Ie.id):(Ve=Ie.data)==null?void 0:Ve.hidden}}})}U(ye),j(Ue)},[e,t,U,j,i,o,p,f,I,$,re,be,K,N]);const ve=R?300:0;T.useEffect(()=>{const he=requestAnimationFrame(()=>{B({padding:.3,duration:ve})});return()=>cancelAnimationFrame(he)},[f,e,B,ve]),T.useEffect(()=>{const he=requestAnimationFrame(()=>{N&&N.size>0?B({nodes:[...N].map(ye=>({id:ye})),padding:.3,duration:ve}):B({padding:.3,duration:ve})});return()=>cancelAnimationFrame(he)},[N,B,ve]),T.useEffect(()=>{if(!W())return;const he=requestAnimationFrame(()=>{B({padding:.3,duration:ve})});return()=>cancelAnimationFrame(he)},[$,B,ve,W]),T.useEffect(()=>{if(!p)return;const he=L.current.find(ye=>ye.id===p);he&&(U(ye=>ye.map(Ue=>({...Ue,selected:Ue.id===p}))),setTimeout(()=>{if(he.type==="serviceGroup"){const ye=L.current.filter(_e=>_e.parentId===he.id).map(_e=>_e.id),Ue=[he.id,...ye];B({nodes:Ue.map(_e=>({id:_e})),padding:.5,duration:ve})}else if(he.type==="module"||he.type==="method"){const ye=he.parentId;if(ye){const Ue=L.current.filter(_e=>_e.parentId===ye).map(_e=>_e.id);B({nodes:[{id:ye},...Ue.map(_e=>({id:_e}))],padding:.3,duration:ve})}else B({nodes:[{id:p}],padding:1,duration:ve})}else B({nodes:[{id:p}],padding:1.5,duration:ve})},50))},[m,p,B,U]);const we=T.useCallback(()=>{const he={};for(const ye of L.current)ye.type==="layer"||ye.type==="module"||ye.type==="method"||(he[ye.id]=ye.position);Object.keys(he).length!==0&&(M(!0),n2(s,he,l,f).finally(()=>M(!1)))},[s,l,f]),ke=T.useCallback(()=>{g8(s,l,f).then(()=>c==null?void 0:c()).catch(()=>{})},[s,l,f,c]),Ne=T.useCallback((he,ye)=>{if(n==null||n(ye.id),f==="services")setTimeout(()=>{B({nodes:[{id:ye.id}],padding:1.5,duration:ve})},50);else if(ye.type==="serviceGroup"){const Ue=L.current.filter(Ie=>Ie.parentId===ye.id).map(Ie=>Ie.id),_e=[ye.id,...Ue];setTimeout(()=>{B({nodes:_e.map(Ie=>({id:Ie})),padding:.5,duration:ve})},50)}else ye.type==="database"&&setTimeout(()=>{B({nodes:[{id:ye.id}],padding:1.5,duration:ve})},50)},[n,f,B,ve]),Oe=T.useCallback((he,ye)=>{j(Ue=>{const _e=new Set;for(const Ve of Ue)(Ve.source===ye.id||Ve.target===ye.id)&&_e.add(Ve.id);const Ie=new Set(L.current.filter(Ve=>Ve.parentId===ye.id).map(Ve=>Ve.id));for(const Ve of Ue)(Ie.has(Ve.source)||Ie.has(Ve.target))&&_e.add(Ve.id);return Ue.map(Ve=>{var jt;return{...Ve,data:{...Ve.data,dimmed:!_e.has(Ve.id),hidden:K?!_e.has(Ve.id):(jt=Ve.data)==null?void 0:jt.hidden}}})})},[j,K]),Te=T.useCallback(()=>{j(he=>he.map(ye=>{var Ue,_e;return{...ye,data:{...ye.data,dimmed:(Ue=ye.data)!=null&&Ue.dimmed?!1:(_e=ye.data)==null?void 0:_e.dimmed,hidden:!!K}}}))},[j,K]),_t=T.useCallback(()=>{n==null||n(null),j(he=>he.map(ye=>({...ye,data:{...ye.data,dimmed:!1,hidden:K}}))),B({padding:.3,duration:ve})},[n,f,B,j,K,ve]);return b.jsxs("div",{className:`h-full w-full${R?"":" no-animations"}`,children:[b.jsxs("div",{className:"absolute left-1/2 top-3 z-20 -translate-x-1/2 flex items-center gap-2",children:[b.jsx(MF,{level:f,onChange:h}),f!=="services"&&b.jsx("button",{onClick:()=>{$.size>0?se():me()},className:"flex items-center justify-center rounded-md border border-border bg-card p-1.5 shadow-sm text-muted-foreground hover:text-foreground transition-colors",title:$.size>0?"Expand All":"Collapse All",children:$.size>0?b.jsx(p3,{className:"h-3.5 w-3.5"}):b.jsx(e6,{className:"h-3.5 w-3.5"})}),b.jsx("button",{onClick:()=>H(he=>{const ye=!he;return localStorage.setItem("truecourse:focusMode",ye?"on":"off"),ye}),className:"flex items-center justify-center rounded-md border border-border bg-card p-1.5 shadow-sm text-muted-foreground hover:text-foreground transition-colors",title:K?"Show all edges":"Show edges on hover only",children:b.jsx(g3,{className:`h-3.5 w-3.5 ${K?"opacity-40":""}`})}),b.jsx("button",{onClick:()=>V(he=>{const ye=he==="bezier"?"step":"bezier";return localStorage.setItem("truecourse:edgeStyle",ye),ye}),className:"flex items-center justify-center rounded-md border border-border bg-card p-1.5 shadow-sm text-muted-foreground hover:text-foreground transition-colors",title:I==="bezier"?"Switch to L-shaped edges":"Switch to curved edges",children:I==="bezier"?b.jsx(Fq,{className:"h-3.5 w-3.5"}):b.jsx(i6,{className:"h-3.5 w-3.5"})}),b.jsx("button",{onClick:()=>O(he=>{const ye=!he;return localStorage.setItem("truecourse:animations",ye?"on":"off"),ye}),className:"flex items-center justify-center rounded-md border border-border bg-card p-1.5 shadow-sm text-muted-foreground hover:text-foreground transition-colors",title:R?"Disable animations":"Enable animations",children:R?b.jsx(Tb,{className:"h-3.5 w-3.5"}):b.jsx(c6,{className:"h-3.5 w-3.5"})}),k&&b.jsx("div",{className:"mt-2 rounded-md border border-border bg-card px-3 py-1 text-xs text-muted-foreground shadow-sm text-center",children:"Saving..."})]}),b.jsxs(O5,{nodes:z,edges:Q,onNodesChange:G,onEdgesChange:D,onNodeClick:Ne,onNodeMouseEnter:Oe,onNodeMouseLeave:Te,onNodeDragStop:we,onPaneClick:_t,nodeTypes:QG,edgeTypes:ZG,nodesConnectable:!1,nodesDraggable:!F,elementsSelectable:!F,minZoom:.1,maxZoom:2,proOptions:{hideAttribution:!0},children:[b.jsx(L5,{variant:hi.Dots,gap:20,size:1}),b.jsx(nF,{nodeStrokeWidth:3,className:"!bg-card !border-border",maskColor:"rgba(0, 0, 0, 0.1)"}),b.jsx(U5,{onAutoLayout:ke,panMode:F,onTogglePanMode:()=>X(he=>!he)})]}),g&&!v&&!_&&b.jsxs("div",{className:`absolute ${E?"bottom-24":"bottom-4"} left-1/2 z-20 -translate-x-1/2 rounded-lg border border-amber-500/30 bg-card px-4 py-2.5 shadow-lg text-xs text-muted-foreground`,children:["Diff mode — click ",b.jsx("span",{className:"font-medium text-foreground",children:"Analyze"})," to compare pending changes against your last analysis"]}),g&&_&&b.jsxs("div",{className:`absolute ${E?"bottom-24":"bottom-4"} left-1/2 z-20 -translate-x-1/2 rounded-lg border border-amber-500/30 bg-card px-4 py-2.5 shadow-lg text-xs text-muted-foreground flex items-center gap-2`,children:[b.jsx(sr,{className:"h-3 w-3 animate-spin"}),"Scanning pending changes..."]}),g&&v&&!_&&b.jsxs("div",{className:`absolute ${E?"bottom-24":"bottom-4"} left-1/2 z-20 -translate-x-1/2 rounded-lg border border-amber-500/30 bg-card px-4 py-2 shadow-lg flex items-center gap-3 text-xs`,children:[b.jsxs("span",{className:"text-amber-500 font-medium",children:["+",v.summary.newCount," new"]}),b.jsxs("span",{className:"text-emerald-500 font-medium",children:["-",v.summary.resolvedCount," resolved"]}),b.jsxs("span",{className:"border-l border-border pl-3 text-muted-foreground",children:[v.changedFiles.length," file",v.changedFiles.length!==1?"s":""," changed"]})]})]})}function JG(e){return b.jsx(r1,{children:b.jsx(WG,{...e})})}function eX(e){return Yn(e.defaultTagName??"div",e,e)}const tX=jb("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function gx({className:e,variant:t="default",render:n,...i}){return eX({defaultTagName:"span",props:Mb({className:xn(tX({variant:t}),e)},i),render:n,state:{slot:"badge",variant:t}})}const nX={info:"border-l-blue-500",low:"border-l-amber-500",medium:"border-l-orange-500",high:"border-l-red-500",critical:"border-l-red-600"},FR={info:"bg-blue-500/10 text-blue-600 dark:text-blue-400",low:"bg-amber-500/10 text-amber-600 dark:text-amber-400",medium:"bg-orange-500/10 text-orange-600 dark:text-orange-400",high:"bg-red-500/10 text-red-600 dark:text-red-400",critical:"bg-red-600/10 text-red-700 dark:text-red-500"};function $R({insight:e,onLocateNode:t,isResolved:n,diffStatus:i}){const[o,s]=T.useState(!1),[l,c]=T.useState(!1),f=async()=>{e.fixPrompt&&(await navigator.clipboard.writeText(e.fixPrompt),s(!0),setTimeout(()=>s(!1),2e3))},h=e.targetMethodId||e.targetModuleId||e.targetDatabaseId||e.targetServiceId,p=e.targetMethodName||e.targetModuleName||e.targetDatabaseName||e.targetServiceName,m=e.targetMethodId?"methods":e.targetModuleId?"modules":void 0;return b.jsx(B5,{className:`border-l-4 rounded-sm p-3 ${nX[e.severity]||"border-l-gray-500"}`,children:b.jsxs(H5,{className:"p-0",children:[b.jsxs("div",{className:"mb-1.5 flex items-center gap-2",children:[i&&b.jsx(gx,{className:`rounded-sm px-2 py-0.5 text-[10px] font-semibold uppercase ${i==="new"?"bg-amber-500/10 text-amber-600 dark:text-amber-400 border border-amber-500/30":"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 border border-emerald-500/30"}`,children:i}),b.jsx(gx,{className:`rounded-sm px-2 py-0.5 text-[10px] font-semibold uppercase ${FR[e.severity]||""}`,children:e.type}),b.jsx(gx,{className:`rounded-sm px-1.5 py-0.5 text-[10px] font-medium ${FR[e.severity]||""}`,children:e.severity}),t&&h&&b.jsxs(An,{variant:"outline",size:"xs",onClick:()=>t(h,m),className:"ml-auto text-[10px] text-muted-foreground hover:text-foreground",title:`Locate ${p||"target"} in graph`,children:[b.jsx($q,{className:"h-3 w-3"}),"Locate"]})]}),b.jsx("h4",{className:`text-sm font-bold ${n?"line-through opacity-60 text-muted-foreground":"text-foreground"}`,children:e.title}),b.jsx("p",{className:"mt-1 text-xs leading-relaxed text-muted-foreground",children:e.content}),(e.targetServiceName||e.targetDatabaseName)&&b.jsxs("p",{className:"mt-2 text-[10px] text-muted-foreground",children:["Target:"," ",b.jsx("span",{className:"font-medium text-foreground",children:e.targetServiceName||e.targetDatabaseName}),e.targetModuleName&&b.jsxs(b.Fragment,{children:[" / ",b.jsx("span",{className:"font-medium text-foreground",children:e.targetModuleName})]}),e.targetMethodName&&b.jsxs(b.Fragment,{children:[" / ",b.jsx("span",{className:"font-medium text-foreground",children:e.targetMethodName})]})]}),e.fixPrompt&&!n&&b.jsxs("div",{className:"mt-2",children:[b.jsxs("div",{className:"flex items-center gap-1.5",children:[b.jsxs(An,{variant:"outline",size:"xs",onClick:()=>c(g=>!g),className:"text-[10px] text-muted-foreground hover:text-foreground",children:[l?b.jsx(u3,{className:"h-3 w-3"}):b.jsx(Wo,{className:"h-3 w-3"}),"Fix Prompt"]}),b.jsx(An,{variant:"outline",size:"xs",onClick:f,className:"text-[10px] text-muted-foreground hover:text-foreground",children:o?b.jsxs(b.Fragment,{children:[b.jsx(Pq,{className:"h-3 w-3 text-emerald-500"}),"Copied!"]}):b.jsxs(b.Fragment,{children:[b.jsx(Vq,{className:"h-3 w-3"}),"Copy Fix"]})})]}),l&&b.jsx("pre",{className:"mt-1.5 rounded-md bg-muted px-2.5 py-2 text-[10px] leading-relaxed text-muted-foreground whitespace-pre-wrap break-words",children:e.fixPrompt})]})]})})}function rX({data:e,selected:t}){var o,s;const n=((o=e.insights)==null?void 0:o.length)??0,i=(s=e.insights)==null?void 0:s.some(l=>l.severity==="high"||l.severity==="critical");return b.jsxs("div",{className:`relative rounded-lg border bg-card shadow-md min-w-[180px] max-w-[260px] ${t?"border-primary ring-1 ring-primary/30":n>0?"border-amber-500/50":"border-border"}`,children:[e.hasTargetEdge&&b.jsx(gt,{type:"target",position:Ee.Left,className:"!w-2 !h-2 !bg-primary !border-background"}),e.hasSourceEdge&&b.jsx(gt,{type:"source",position:Ee.Right,className:"!w-2 !h-2 !bg-primary !border-background"}),b.jsxs("div",{className:"flex items-center gap-1.5 border-b border-border bg-amber-500/10 px-3 py-1.5 rounded-t-lg",children:[b.jsx("span",{className:"text-xs font-semibold text-foreground flex-1",children:e.label}),n>0&&b.jsxs("div",{className:"group relative flex items-center gap-1",children:[b.jsx(_r,{className:`h-3 w-3 ${i?"text-red-500":"text-amber-500"}`}),b.jsx("span",{className:`text-[9px] font-medium ${i?"text-red-500":"text-amber-500"}`,children:n}),b.jsx("div",{className:"pointer-events-none absolute left-full top-1/2 -translate-y-1/2 ml-2 z-50 hidden group-hover:block",children:b.jsx("div",{className:"rounded-md border border-border bg-card px-2.5 py-2 shadow-lg w-[260px]",children:e.insights.map((l,c)=>b.jsxs("div",{className:"text-[10px] text-muted-foreground leading-tight py-0.5",children:[b.jsxs("span",{className:`font-medium ${l.severity==="critical"||l.severity==="high"?"text-red-500":l.severity==="medium"?"text-amber-500":"text-muted-foreground"}`,children:["[",l.severity,"]"]})," ",l.title]},c))})})]})]}),b.jsx("div",{className:"px-1 py-1",children:e.columns.map(l=>b.jsxs("div",{className:"flex items-center gap-1 px-2 py-0.5 text-[10px] rounded hover:bg-muted/50",children:[l.isPrimaryKey&&b.jsx(h3,{className:"h-2.5 w-2.5 text-amber-500 flex-shrink-0"}),l.isForeignKey&&!l.isPrimaryKey&&b.jsx(Hx,{className:"h-2.5 w-2.5 text-blue-500 flex-shrink-0"}),!l.isPrimaryKey&&!l.isForeignKey&&b.jsx("span",{className:"w-2.5 flex-shrink-0"}),b.jsx("span",{className:"font-medium text-foreground",children:l.name}),b.jsx("span",{className:"ml-auto text-muted-foreground",children:l.type}),l.isNullable&&b.jsx("span",{className:"text-muted-foreground/60",children:"?"})]},l.name))})]})}function iX({id:e,sourceX:t,sourceY:n,targetX:i,targetY:o,sourcePosition:s,targetPosition:l,data:c}){const[f,h,p]=ns({sourceX:t,sourceY:n,targetX:i,targetY:o,sourcePosition:s,targetPosition:l}),m=(c==null?void 0:c.sourceCardinality)??"one",g=(c==null?void 0:c.targetCardinality)??"one",v=`cf-source-${e}`,_=`cf-target-${e}`;return b.jsxs(b.Fragment,{children:[b.jsxs("defs",{children:[m==="one"&&b.jsx("marker",{id:v,viewBox:"0 0 12 12",refX:"0",refY:"6",markerWidth:"10",markerHeight:"10",orient:"auto-start-reverse",children:b.jsx("line",{x1:"6",y1:"2",x2:"6",y2:"10",className:"stroke-muted-foreground",strokeWidth:"1.5",fill:"none"})}),m==="many"&&b.jsxs("marker",{id:v,viewBox:"0 0 16 16",refX:"0",refY:"8",markerWidth:"12",markerHeight:"12",orient:"auto-start-reverse",children:[b.jsx("line",{x1:"10",y1:"2",x2:"2",y2:"8",className:"stroke-muted-foreground",strokeWidth:"1.5",fill:"none"}),b.jsx("line",{x1:"2",y1:"8",x2:"10",y2:"14",className:"stroke-muted-foreground",strokeWidth:"1.5",fill:"none"}),b.jsx("line",{x1:"2",y1:"8",x2:"10",y2:"8",className:"stroke-muted-foreground",strokeWidth:"1.5",fill:"none"})]}),g==="one"&&b.jsx("marker",{id:_,viewBox:"0 0 12 12",refX:"12",refY:"6",markerWidth:"10",markerHeight:"10",orient:"auto-start-reverse",children:b.jsx("line",{x1:"6",y1:"2",x2:"6",y2:"10",className:"stroke-muted-foreground",strokeWidth:"1.5",fill:"none"})}),g==="many"&&b.jsxs("marker",{id:_,viewBox:"0 0 16 16",refX:"16",refY:"8",markerWidth:"12",markerHeight:"12",orient:"auto-start-reverse",children:[b.jsx("line",{x1:"6",y1:"2",x2:"14",y2:"8",className:"stroke-muted-foreground",strokeWidth:"1.5",fill:"none"}),b.jsx("line",{x1:"14",y1:"8",x2:"6",y2:"14",className:"stroke-muted-foreground",strokeWidth:"1.5",fill:"none"}),b.jsx("line",{x1:"14",y1:"8",x2:"6",y2:"8",className:"stroke-muted-foreground",strokeWidth:"1.5",fill:"none"})]})]}),b.jsx("path",{id:e,d:f,fill:"none",className:"stroke-muted-foreground",strokeWidth:1.5,opacity:.6,markerStart:`url(#${v})`,markerEnd:`url(#${_})`}),(c==null?void 0:c.label)&&b.jsx(Gf,{children:b.jsx("div",{style:{position:"absolute",transform:`translate(-50%, -50%) translate(${h}px, ${p}px)`,pointerEvents:"none"},className:"rounded bg-card px-1.5 py-0.5 text-[9px] text-muted-foreground border border-border",children:c.label})})]})}const aX={tableNode:rX},oX={crowsfoot:iX};function sX(e){switch(e){case"one-to-one":return{source:"one",target:"one",label:"1:1"};case"one-to-many":return{source:"many",target:"one",label:"1:N"};case"many-to-many":return{source:"many",target:"many",label:"N:N"};default:return{source:"one",target:"one",label:""}}}function YR(e,t,n){const i=new Cf.graphlib.Graph;i.setGraph({rankdir:"LR",ranksep:100,nodesep:50}),i.setDefaultEdgeLabel(()=>({}));for(const o of e){const s=n.get(o.id)||100;i.setNode(o.id,{width:200,height:s})}for(const o of t)i.setEdge(o.source,o.target);return Cf.layout(i),e.map(o=>{const s=i.node(o.id),l=n.get(o.id)||100;return{...o,position:{x:s.x-100,y:s.y-l/2}}})}function lX({insights:e,isFullscreen:t}){const[n,i]=T.useState(!1),{zoom:o}=MV(),s=e.some(l=>l.severity==="high"||l.severity==="critical");return b.jsxs("div",{className:"absolute left-3 top-3 z-10 origin-top-left",style:t?{transform:`scale(${o})`}:void 0,children:[b.jsxs("button",{onClick:()=>i(!n),className:`flex items-center gap-1.5 rounded-md border px-2.5 py-1.5 text-[11px] font-medium shadow-sm transition-colors ${s?"border-red-500/30 bg-red-500/10 text-red-500":"border-amber-500/30 bg-amber-500/10 text-amber-500"}`,title:t?void 0:`${e.length} database issue${e.length!==1?"s":""}`,children:[b.jsx(_r,{className:"h-3 w-3"}),t&&b.jsxs(b.Fragment,{children:[e.length," database issue",e.length!==1?"s":"",n?b.jsx(u3,{className:"h-3 w-3"}):b.jsx(Wo,{className:"h-3 w-3"})]}),!t&&b.jsx("span",{className:"text-[9px]",children:e.length})]}),n&&t&&b.jsx("div",{className:"mt-1 rounded-md border border-border bg-card px-2.5 py-2 shadow-lg w-[280px]",children:e.map((l,c)=>b.jsxs("div",{className:"text-[10px] text-muted-foreground leading-tight py-0.5",children:[b.jsxs("span",{className:`font-medium ${l.severity==="critical"||l.severity==="high"?"text-red-500":l.severity==="medium"?"text-amber-500":"text-muted-foreground"}`,children:["[",l.severity,"]"]})," ",l.title]},c))})]})}function uX({schema:e,insights:t=[],isFullscreen:n}){const{initialNodes:i,edges:o}=T.useMemo(()=>{const p=new Set(e.relations.map(w=>w.sourceTable)),m=new Set(e.relations.map(w=>w.targetTable)),g=new Map;for(const w of t)if(w.targetTable){const N=g.get(w.targetTable)||[];N.push({title:w.title,severity:w.severity}),g.set(w.targetTable,N)}const v=e.tables.map(w=>({id:w.name,type:"tableNode",data:{label:w.name,columns:w.columns,primaryKey:w.primaryKey,hasSourceEdge:p.has(w.name),hasTargetEdge:m.has(w.name),insights:g.get(w.name)},position:{x:0,y:0},sourcePosition:Ee.Right,targetPosition:Ee.Left})),_=e.relations.map((w,N)=>{const C=sX(w.relationType);return{id:`rel-${N}`,source:w.sourceTable,target:w.targetTable,type:"crowsfoot",data:{sourceCardinality:C.source,targetCardinality:C.target,label:w.foreignKeyColumn}}}),E=new Map;for(const w of e.tables)E.set(w.name,28+w.columns.length*18+8);return{initialNodes:YR(v,_,E),edges:_}},[e,t]),s=T.useMemo(()=>t.filter(p=>p.targetDatabaseId&&!p.targetTable).map(p=>({title:p.title,severity:p.severity})),[t]),[l,c,f]=z5(i),h=T.useCallback(()=>{const p=new Map;for(const m of e.tables)p.set(m.name,28+m.columns.length*18+8);c(m=>YR(m,o,p))},[e,o,c]);return b.jsxs("div",{className:"h-full w-full relative",children:[s.length>0&&b.jsx(lX,{insights:s,isFullscreen:n}),b.jsx(O5,{nodes:l,onNodesChange:f,edges:o,nodeTypes:aX,edgeTypes:oX,fitView:!0,fitViewOptions:{padding:.3},minZoom:.2,maxZoom:3,nodesDraggable:!0,nodesConnectable:!1,elementsSelectable:!0,proOptions:{hideAttribution:!0},children:b.jsx(L5,{gap:16,size:1})}),b.jsx(U5,{onAutoLayout:h})]})}function GR({schema:e,insights:t,isFullscreen:n}){return b.jsx(r1,{children:b.jsx(uX,{schema:e,insights:t,isFullscreen:n})})}function cX({repoId:e,databaseId:t,insights:n=[]}){const[i,o]=T.useState(null),[s,l]=T.useState(!0),[c,f]=T.useState(null),[h,p]=T.useState("diagram"),[m,g]=T.useState(!1);return T.useEffect(()=>{if(!m)return;const v=_=>{_.key==="Escape"&&g(!1)};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[m]),T.useEffect(()=>{l(!0),x8(e,t).then(o).catch(()=>o(null)).finally(()=>l(!1))},[e,t]),s?b.jsx("div",{className:"flex items-center justify-center p-8 text-sm text-muted-foreground",children:"Loading schema..."}):!i||i.tables.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center p-8 text-sm text-muted-foreground gap-2",children:[b.jsx(wl,{className:"h-8 w-8 opacity-50"}),b.jsx("span",{children:"No schema detected"})]}):b.jsxs("div",{className:"flex flex-col h-full",children:[b.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-4 py-3",children:[b.jsx(wl,{className:"h-4 w-4 text-primary"}),b.jsx("span",{className:"text-sm font-semibold text-foreground",children:i.name}),b.jsxs("span",{className:"text-xs text-muted-foreground",children:[i.tables.length," table",i.tables.length!==1?"s":""]}),b.jsxs("div",{className:"ml-auto flex items-center gap-1.5",children:[b.jsxs("div",{className:"flex items-center gap-0.5 rounded-md border border-border p-0.5",children:[b.jsx("button",{onClick:()=>p("diagram"),className:`rounded px-1.5 py-0.5 text-[10px] transition-colors ${h==="diagram"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"}`,title:"ER Diagram",children:b.jsx(Qq,{className:"h-3 w-3"})}),b.jsx("button",{onClick:()=>p("list"),className:`rounded px-1.5 py-0.5 text-[10px] transition-colors ${h==="list"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"}`,title:"Table List",children:b.jsx(Jq,{className:"h-3 w-3"})})]}),b.jsx("button",{onClick:()=>{p("diagram"),g(!0)},className:"rounded p-1 text-muted-foreground hover:text-foreground hover:bg-accent transition-colors",title:"Expand to fullscreen",children:b.jsx(Kq,{className:"h-3.5 w-3.5"})})]})]}),h==="diagram"&&b.jsx("div",{className:"flex-1 min-h-0",children:b.jsx(GR,{schema:i,insights:n,isFullscreen:!1})}),h==="list"&&b.jsx("div",{className:"flex-1 overflow-y-auto",children:i.tables.map(v=>{const _=c===v.name,E=i.relations.filter(S=>S.sourceTable===v.name||S.targetTable===v.name);return b.jsxs("div",{className:"border-b border-border",children:[b.jsxs("button",{className:"flex w-full items-center gap-2 px-4 py-2 text-left hover:bg-accent/50 transition-colors",onClick:()=>f(_?null:v.name),children:[_?b.jsx(Wo,{className:"h-3 w-3 text-muted-foreground"}):b.jsx(jf,{className:"h-3 w-3 text-muted-foreground"}),b.jsx(o6,{className:"h-3.5 w-3.5 text-amber-500"}),b.jsx("span",{className:"text-xs font-medium text-foreground",children:v.name}),b.jsxs("span",{className:"text-[10px] text-muted-foreground ml-auto",children:[v.columns.length," col",v.columns.length!==1?"s":""]})]}),_&&b.jsxs("div",{className:"px-4 pb-3",children:[b.jsx("div",{className:"rounded-md border border-border overflow-hidden",children:b.jsxs("table",{className:"w-full text-[11px]",children:[b.jsx("thead",{children:b.jsxs("tr",{className:"bg-muted/50",children:[b.jsx("th",{className:"text-left px-2 py-1 font-medium text-muted-foreground",children:"Column"}),b.jsx("th",{className:"text-left px-2 py-1 font-medium text-muted-foreground",children:"Type"}),b.jsx("th",{className:"text-center px-2 py-1 font-medium text-muted-foreground w-8"})]})}),b.jsx("tbody",{children:v.columns.map(S=>b.jsxs("tr",{className:"border-t border-border",children:[b.jsxs("td",{className:"px-2 py-1 text-foreground flex items-center gap-1",children:[S.isPrimaryKey&&b.jsx(h3,{className:"h-2.5 w-2.5 text-amber-500 flex-shrink-0"}),S.isForeignKey&&b.jsx(Hx,{className:"h-2.5 w-2.5 text-blue-500 flex-shrink-0"}),b.jsx("span",{children:S.name})]}),b.jsx("td",{className:"px-2 py-1 text-muted-foreground",children:S.type}),b.jsx("td",{className:"px-2 py-1 text-center text-muted-foreground",children:S.isNullable&&b.jsx("span",{className:"text-[9px]",children:"?"})})]},S.name))})]})}),E.length>0&&b.jsxs("div",{className:"mt-2",children:[b.jsx("div",{className:"text-[10px] font-medium text-muted-foreground mb-1",children:"Relations"}),E.map((S,w)=>b.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:[b.jsx(Hx,{className:"h-2.5 w-2.5 text-blue-500"}),b.jsxs("span",{children:[S.sourceTable,".",S.foreignKeyColumn," → ",S.targetTable]}),b.jsxs("span",{className:"text-[9px] italic",children:["(",S.relationType,")"]})]},w))]})]})]},v.name)})}),m&&kb.createPortal(b.jsxs("div",{className:"fixed inset-0 z-50 flex flex-col bg-background",children:[b.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-6 py-3",children:[b.jsx(wl,{className:"h-4 w-4 text-primary"}),b.jsx("span",{className:"text-sm font-semibold text-foreground",children:i.name}),b.jsxs("span",{className:"text-xs text-muted-foreground",children:[i.tables.length," table",i.tables.length!==1?"s":"",i.relations.length>0&&` · ${i.relations.length} relation${i.relations.length!==1?"s":""}`]}),b.jsx("button",{onClick:()=>g(!1),className:"ml-auto rounded p-1.5 text-muted-foreground hover:text-foreground hover:bg-accent transition-colors",title:"Close (Esc)",children:b.jsx(x3,{className:"h-4 w-4"})})]}),b.jsx("div",{className:"flex-1 min-h-0",children:b.jsx(GR,{schema:i,insights:n,isFullscreen:!0})})]}),document.body)]})}function fX({insights:e,isLoading:t,repoId:n,selectedService:i,selectedServiceName:o,selectedDatabaseId:s,isDiffMode:l,diffResult:c,onLocateNode:f,resolveNodeIdByName:h,selectedPath:p,nodeFilePathMap:m}){const[g,v]=T.useState(264),_=T.useRef(!1),E=T.useCallback(N=>{N.preventDefault(),_.current=!0;const C=N.clientY,k=g,M=O=>{if(!_.current)return;const I=C-O.clientY;v(Math.min(500,Math.max(120,k+I)))},R=()=>{_.current=!1,document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",R)};document.addEventListener("mousemove",M),document.addEventListener("mouseup",R)},[g]),S=T.useMemo(()=>{if(!l||!c)return null;const N=[];for(const M of c.newInsights){const R=M.targetServiceName&&h?h(M.targetServiceName,"service"):null,O=M.targetModuleName&&h?h(M.targetModuleName,"module"):null,I=M.targetMethodName&&h?h(M.targetMethodName,"method"):null;N.push({insight:{id:`new-${N.length}`,type:M.type,title:M.title,content:M.content,severity:M.severity,targetServiceId:R,targetServiceName:M.targetServiceName,targetModuleId:O,targetModuleName:M.targetModuleName,targetMethodId:I,targetMethodName:M.targetMethodName,fixPrompt:M.fixPrompt,createdAt:new Date().toISOString()},diffStatus:"new"})}for(const M of c.resolvedInsights||[])N.push({insight:M,diffStatus:"resolved"});const C={critical:0,high:1,medium:2,low:3,info:4},k={service:0,module:1,function:2,database:3};return N.sort((M,R)=>{const O=(M.diffStatus==="new"?0:1)-(R.diffStatus==="new"?0:1);if(O!==0)return O;const I=(C[M.insight.severity]??5)-(C[R.insight.severity]??5);if(I!==0)return I;const V=(k[M.insight.type]??9)-(k[R.insight.type]??9);return V!==0?V:new Date(R.insight.createdAt).getTime()-new Date(M.insight.createdAt).getTime()}),N},[l,c,h]),w=T.useMemo(()=>!p||!m?e:e.filter(N=>{const C=N.targetMethodId||N.targetModuleId||N.targetServiceId;if(!C)return!0;const k=m.get(C);if(!k||k.includes(p))return!0;const M=k.split("/");for(let R=M.length-1;R>=1;R--){const O=M.slice(R).join("/");if(p.startsWith(O+"/")||p===O)return!0}return!1}),[e,p,m]);return b.jsx("div",{className:"flex h-full flex-col overflow-hidden",children:b.jsxs("div",{className:"min-h-0 flex-1 flex flex-col overflow-hidden",children:[b.jsx("div",{className:"overflow-y-auto p-3 flex-1",children:l&&S!==null?b.jsxs(b.Fragment,{children:[(c==null?void 0:c.isStale)&&b.jsxs("div",{className:"mb-3 flex items-center gap-2 rounded-md border border-amber-500/30 bg-amber-500/5 px-3 py-2 text-xs text-amber-600 dark:text-amber-400",children:[b.jsx(Gc,{className:"h-3.5 w-3.5 shrink-0"}),"Baseline analysis has changed. Click Analyze to refresh."]}),S.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[b.jsx(_r,{className:"mb-3 h-8 w-8 text-muted-foreground"}),b.jsx("p",{className:"text-sm text-muted-foreground",children:"No diff results yet. Click Analyze to compare your working tree against the baseline."})]}):b.jsx("div",{className:"space-y-3",children:S.map(({insight:N,diffStatus:C})=>b.jsx($R,{insight:N,onLocateNode:f,isResolved:C==="resolved",diffStatus:C},N.id))})]}):b.jsxs(b.Fragment,{children:[i&&b.jsxs("div",{className:"mb-3 rounded-md bg-muted px-3 py-1.5 text-xs text-muted-foreground",children:["Filtered by:"," ",b.jsx("span",{className:"font-medium text-foreground",children:o||i})]}),t?b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsx(sr,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):w.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[b.jsx(_r,{className:"mb-3 h-8 w-8 text-muted-foreground"}),b.jsx("p",{className:"text-sm text-muted-foreground",children:p?"No violations in this path":i?"No violations for this service":"No violations yet. Run an analysis to detect violations."})]}):b.jsx("div",{className:"space-y-3",children:w.map(N=>b.jsx($R,{insight:N,onLocateNode:f},N.id))})]})}),s&&!l&&b.jsxs("div",{className:"relative flex-shrink-0 border-t border-border",style:{height:g},children:[b.jsx("div",{className:"absolute inset-x-0 top-0 z-10 h-1 cursor-row-resize hover:bg-primary/30 active:bg-primary/50",onMouseDown:E}),b.jsx(cX,{repoId:n,databaseId:s,insights:e})]})]})})}const dX={critical:"bg-red-500/20 text-red-400 border-red-500/30",high:"bg-orange-500/20 text-orange-400 border-orange-500/30",medium:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",low:"bg-blue-500/20 text-blue-400 border-blue-500/30",info:"bg-gray-500/20 text-gray-400 border-gray-500/30"},hX={deterministic:"bg-emerald-500/20 text-emerald-400 border-emerald-500/30",llm:"bg-violet-500/20 text-violet-400 border-violet-500/30"},pX={service:"bg-sky-500/20 text-sky-400 border-sky-500/30",module:"bg-teal-500/20 text-teal-400 border-teal-500/30",database:"bg-amber-500/20 text-amber-400 border-amber-500/30"},mX={service:"Service",module:"Module",database:"Database"};function gX(){const[e,t]=T.useState([]),[n,i]=T.useState(!0),[o,s]=T.useState("all");T.useEffect(()=>{b8().then(t).catch(()=>t([])).finally(()=>i(!1))},[]);const l={critical:0,high:1,medium:2,low:3,info:4},c={service:0,module:1,database:2},f={deterministic:0,llm:1},h=(o==="all"?e:e.filter(m=>m.category===o)).slice().sort((m,g)=>(l[m.severity]??5)-(l[g.severity]??5)||(c[m.category]??9)-(c[g.category]??9)||(f[m.type]??9)-(f[g.type]??9)),p=[{value:"all",label:"All",icon:b.jsx(Ux,{className:"h-3.5 w-3.5"})},{value:"service",label:"Service",icon:b.jsx(g3,{className:"h-3.5 w-3.5"})},{value:"module",label:"Module",icon:b.jsx(l3,{className:"h-3.5 w-3.5"})},{value:"database",label:"Database",icon:b.jsx(wl,{className:"h-3.5 w-3.5"})}];return n?b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsx(sr,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):b.jsxs("div",{className:"h-full overflow-y-auto p-3",children:[b.jsx("div",{className:"mb-3 flex gap-1.5 overflow-x-auto scrollbar-thin",children:p.map(m=>b.jsxs("button",{onClick:()=>s(m.value),className:`flex shrink-0 items-center gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors ${o===m.value?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,children:[m.icon,m.label]},m.value))}),h.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[b.jsx(Ux,{className:"mb-3 h-8 w-8 text-muted-foreground"}),b.jsx("p",{className:"text-sm text-muted-foreground",children:"No rules found"})]}):b.jsx("div",{className:"space-y-2",children:h.map(m=>b.jsxs("div",{className:"rounded-lg border border-border bg-card p-3",children:[b.jsxs("div",{className:"mb-1.5 flex items-start justify-between gap-2",children:[b.jsx("h4",{className:"text-sm font-medium text-foreground",children:m.name}),b.jsx("div",{className:"flex shrink-0 gap-1.5",children:b.jsx("span",{className:`rounded border px-1.5 py-0.5 text-[10px] font-medium uppercase ${dX[m.severity]||""}`,children:m.severity})})]}),b.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:m.description}),b.jsxs("div",{className:"mt-2 flex items-center gap-1.5",children:[b.jsx("span",{className:`rounded border px-1.5 py-0.5 text-[10px] font-medium ${pX[m.category]||""}`,children:mX[m.category]||m.category}),b.jsx("span",{className:`rounded border px-1.5 py-0.5 text-[10px] font-medium ${hX[m.type]||""}`,children:m.type==="deterministic"?"Deterministic":"LLM"})]})]},m.key))})]})}function yX(e){const t={name:"",path:"",isFile:!1,children:[]};for(const n of e){if(!n)continue;const i=n.split("/");let o=t;for(let s=0;s<i.length;s++){const l=i[s],c=s===i.length-1,f=i.slice(0,s+1).join("/");let h=o.children.find(p=>p.name===l);h||(h={name:l,path:f,isFile:c,children:[]},o.children.push(h)),o=h}}return UO(t),PO(t),t}function UO(e){e.children.sort((t,n)=>!t.isFile&&n.isFile?-1:t.isFile&&!n.isFile?1:t.name.localeCompare(n.name));for(const t of e.children)UO(t)}function PO(e){for(let t=0;t<e.children.length;t++){let n=e.children[t];for(;!n.isFile&&n.children.length===1&&!n.children[0].isFile;){const i=n.children[0];n={name:`${n.name}/${i.name}`,path:i.path,isFile:i.isFile,children:i.children},e.children[t]=n}PO(n)}}function vX({repoId:e,selectedPath:t,onSelectPath:n}){const[i,o]=T.useState([]),[s,l]=T.useState(!0);T.useEffect(()=>{l(!0),y8(e).then(f=>o(f.files)).catch(()=>{}).finally(()=>l(!1))},[e]);const c=T.useMemo(()=>yX(i),[i]);return s?b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsx(sr,{className:"h-5 w-5 animate-spin text-muted-foreground"})}):c.children.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center px-4",children:[b.jsx(Bx,{className:"mb-3 h-8 w-8 text-muted-foreground"}),b.jsx("p",{className:"text-sm text-muted-foreground",children:"No files found in repository."})]}):b.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[t&&b.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3 py-1.5 text-xs text-muted-foreground",children:[b.jsxs("span",{className:"truncate flex-1",children:["Filter: ",b.jsx("span",{className:"font-medium text-foreground",children:t})]}),b.jsx("button",{onClick:()=>n(null),className:"shrink-0 rounded p-0.5 hover:bg-muted",children:b.jsx(x3,{className:"h-3 w-3"})})]}),b.jsx("div",{className:"flex-1 overflow-y-auto py-1",children:c.children.map(f=>b.jsx(VO,{node:f,depth:0,selectedPath:t,onSelectPath:n},f.path))})]})}function VO({node:e,depth:t,selectedPath:n,onSelectPath:i}){const[o,s]=T.useState(t<1),l=n===e.path,c=n?n.startsWith(e.path+"/"):!1,f=T.useCallback(()=>{e.isFile?i(l?null:e.path):(i(l?null:e.path),s(!0))},[e.path,e.isFile,l,i]),h=T.useCallback(p=>{p.stopPropagation(),s(m=>!m)},[]);return b.jsxs("div",{children:[b.jsxs("button",{onClick:f,className:`flex w-full items-center gap-1.5 px-2 py-1 text-[13px] transition-colors ${l?"bg-accent text-accent-foreground":c?"bg-accent/50 text-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,style:{paddingLeft:`${8+t*12}px`},children:[e.isFile?b.jsx("span",{className:"w-4"}):b.jsx("span",{onClick:h,className:"shrink-0 flex items-center justify-center w-4 h-4",children:o?b.jsx(Wo,{className:"h-3 w-3"}):b.jsx(jf,{className:"h-3 w-3"})}),b.jsx("span",{className:"truncate",children:e.name})]}),!e.isFile&&o&&b.jsx("div",{children:e.children.map(p=>b.jsx(VO,{node:p,depth:t+1,selectedPath:n,onSelectPath:i},p.path))})]})}function xX(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const bX=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wX=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_X={};function XR(e,t){return(_X.jsx?wX:bX).test(e)}const SX=/[ \t\n\f\r]/g;function EX(e){return typeof e=="object"?e.type==="text"?KR(e.value):!1:KR(e)}function KR(e){return e.replace(SX,"")===""}class tu{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}tu.prototype.normal={};tu.prototype.property={};tu.prototype.space=void 0;function FO(e,t){const n={},i={};for(const o of e)Object.assign(n,o.property),Object.assign(i,o.normal);return new tu(n,i,t)}function ab(e){return e.toLowerCase()}class On{constructor(t,n){this.attribute=n,this.property=t}}On.prototype.attribute="";On.prototype.booleanish=!1;On.prototype.boolean=!1;On.prototype.commaOrSpaceSeparated=!1;On.prototype.commaSeparated=!1;On.prototype.defined=!1;On.prototype.mustUseProperty=!1;On.prototype.number=!1;On.prototype.overloadedBoolean=!1;On.prototype.property="";On.prototype.spaceSeparated=!1;On.prototype.space=void 0;let CX=0;const Je=$a(),Qt=$a(),ob=$a(),xe=$a(),kt=$a(),Io=$a(),Un=$a();function $a(){return 2**++CX}const sb=Object.freeze(Object.defineProperty({__proto__:null,boolean:Je,booleanish:Qt,commaOrSpaceSeparated:Un,commaSeparated:Io,number:xe,overloadedBoolean:ob,spaceSeparated:kt},Symbol.toStringTag,{value:"Module"})),yx=Object.keys(sb);class _1 extends On{constructor(t,n,i,o){let s=-1;if(super(t,n),QR(this,"space",o),typeof i=="number")for(;++s<yx.length;){const l=yx[s];QR(this,yx[s],(i&sb[l])===sb[l])}}}_1.prototype.defined=!0;function QR(e,t,n){n&&(e[t]=n)}function ls(e){const t={},n={};for(const[i,o]of Object.entries(e.properties)){const s=new _1(i,e.transform(e.attributes||{},i),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),t[i]=s,n[ab(i)]=i,n[ab(s.attribute)]=i}return new tu(t,n,e.space)}const $O=ls({properties:{ariaActiveDescendant:null,ariaAtomic:Qt,ariaAutoComplete:null,ariaBusy:Qt,ariaChecked:Qt,ariaColCount:xe,ariaColIndex:xe,ariaColSpan:xe,ariaControls:kt,ariaCurrent:null,ariaDescribedBy:kt,ariaDetails:null,ariaDisabled:Qt,ariaDropEffect:kt,ariaErrorMessage:null,ariaExpanded:Qt,ariaFlowTo:kt,ariaGrabbed:Qt,ariaHasPopup:null,ariaHidden:Qt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:kt,ariaLevel:xe,ariaLive:null,ariaModal:Qt,ariaMultiLine:Qt,ariaMultiSelectable:Qt,ariaOrientation:null,ariaOwns:kt,ariaPlaceholder:null,ariaPosInSet:xe,ariaPressed:Qt,ariaReadOnly:Qt,ariaRelevant:null,ariaRequired:Qt,ariaRoleDescription:kt,ariaRowCount:xe,ariaRowIndex:xe,ariaRowSpan:xe,ariaSelected:Qt,ariaSetSize:xe,ariaSort:null,ariaValueMax:xe,ariaValueMin:xe,ariaValueNow:xe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function YO(e,t){return t in e?e[t]:t}function GO(e,t){return YO(e,t.toLowerCase())}const NX=ls({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Io,acceptCharset:kt,accessKey:kt,action:null,allow:null,allowFullScreen:Je,allowPaymentRequest:Je,allowUserMedia:Je,alt:null,as:null,async:Je,autoCapitalize:null,autoComplete:kt,autoFocus:Je,autoPlay:Je,blocking:kt,capture:null,charSet:null,checked:Je,cite:null,className:kt,cols:xe,colSpan:null,content:null,contentEditable:Qt,controls:Je,controlsList:kt,coords:xe|Io,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Je,defer:Je,dir:null,dirName:null,disabled:Je,download:ob,draggable:Qt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Je,formTarget:null,headers:kt,height:xe,hidden:ob,high:xe,href:null,hrefLang:null,htmlFor:kt,httpEquiv:kt,id:null,imageSizes:null,imageSrcSet:null,inert:Je,inputMode:null,integrity:null,is:null,isMap:Je,itemId:null,itemProp:kt,itemRef:kt,itemScope:Je,itemType:kt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Je,low:xe,manifest:null,max:null,maxLength:xe,media:null,method:null,min:null,minLength:xe,multiple:Je,muted:Je,name:null,nonce:null,noModule:Je,noValidate:Je,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:Je,optimum:xe,pattern:null,ping:kt,placeholder:null,playsInline:Je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Je,referrerPolicy:null,rel:kt,required:Je,reversed:Je,rows:xe,rowSpan:xe,sandbox:kt,scope:null,scoped:Je,seamless:Je,selected:Je,shadowRootClonable:Je,shadowRootDelegatesFocus:Je,shadowRootMode:null,shape:null,size:xe,sizes:null,slot:null,span:xe,spellCheck:Qt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:xe,step:null,style:null,tabIndex:xe,target:null,title:null,translate:null,type:null,typeMustMatch:Je,useMap:null,value:Qt,width:xe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:kt,axis:null,background:null,bgColor:null,border:xe,borderColor:null,bottomMargin:xe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Je,declare:Je,event:null,face:null,frame:null,frameBorder:null,hSpace:xe,leftMargin:xe,link:null,longDesc:null,lowSrc:null,marginHeight:xe,marginWidth:xe,noResize:Je,noHref:Je,noShade:Je,noWrap:Je,object:null,profile:null,prompt:null,rev:null,rightMargin:xe,rules:null,scheme:null,scrolling:Qt,standby:null,summary:null,text:null,topMargin:xe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:xe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Je,disableRemotePlayback:Je,prefix:null,property:null,results:xe,security:null,unselectable:null},space:"html",transform:GO}),kX=ls({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:Un,accentHeight:xe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:xe,amplitude:xe,arabicForm:null,ascent:xe,attributeName:null,attributeType:null,azimuth:xe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:xe,by:null,calcMode:null,capHeight:xe,className:kt,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:xe,diffuseConstant:xe,direction:null,display:null,dur:null,divisor:xe,dominantBaseline:null,download:Je,dx:null,dy:null,edgeMode:null,editable:null,elevation:xe,enableBackground:null,end:null,event:null,exponent:xe,externalResourcesRequired:null,fill:null,fillOpacity:xe,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:Io,g2:Io,glyphName:Io,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:xe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:xe,horizOriginX:xe,horizOriginY:xe,id:null,ideographic:xe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:xe,k:xe,k1:xe,k2:xe,k3:xe,k4:xe,kernelMatrix:Un,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:xe,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:xe,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:xe,overlineThickness:xe,paintOrder:null,panose1:null,path:null,pathLength:xe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:kt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:xe,pointsAtY:xe,pointsAtZ:xe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Un,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Un,rev:Un,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Un,requiredFeatures:Un,requiredFonts:Un,requiredFormats:Un,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:xe,specularExponent:xe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:xe,strikethroughThickness:xe,string:null,stroke:null,strokeDashArray:Un,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:xe,strokeOpacity:xe,strokeWidth:null,style:null,surfaceScale:xe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Un,tabIndex:xe,tableValues:null,target:null,targetX:xe,targetY:xe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Un,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:xe,underlineThickness:xe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:xe,values:null,vAlphabetic:xe,vMathematical:xe,vectorEffect:null,vHanging:xe,vIdeographic:xe,version:null,vertAdvY:xe,vertOriginX:xe,vertOriginY:xe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:xe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:YO}),XO=ls({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()}}),KO=ls({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:GO}),QO=ls({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),TX={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"},AX=/[A-Z]/g,ZR=/-[a-z]/g,RX=/^data[-\w.:]+$/i;function MX(e,t){const n=ab(t);let i=t,o=On;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&RX.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(ZR,OX);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!ZR.test(s)){let l=s.replace(AX,jX);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=_1}return new o(i,t)}function jX(e){return"-"+e.toLowerCase()}function OX(e){return e.charAt(1).toUpperCase()}const zX=FO([$O,NX,XO,KO,QO],"html"),S1=FO([$O,kX,XO,KO,QO],"svg");function DX(e){return e.join(" ").trim()}var Ro={},vx,WR;function LX(){if(WR)return vx;WR=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
374
+ `,h="/",p="*",m="",g="comment",v="declaration";function _(S,w){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];w=w||{};var N=1,C=1;function k(L){var B=L.match(t);B&&(N+=B.length);var z=L.lastIndexOf(f);C=~z?L.length-z:C+L.length}function M(){var L={line:N,column:C};return function(B){return B.position=new R(L),V(),B}}function R(L){this.start=L,this.end={line:N,column:C},this.source=w.source}R.prototype.content=S;function O(L){var B=new Error(w.source+":"+N+":"+C+": "+L);if(B.reason=L,B.filename=w.source,B.line=N,B.column=C,B.source=S,!w.silent)throw B}function I(L){var B=L.exec(S);if(B){var z=B[0];return k(z),S=S.slice(z.length),B}}function V(){I(n)}function K(L){var B;for(L=L||[];B=H();)B!==!1&&L.push(B);return L}function H(){var L=M();if(!(h!=S.charAt(0)||p!=S.charAt(1))){for(var B=2;m!=S.charAt(B)&&(p!=S.charAt(B)||h!=S.charAt(B+1));)++B;if(B+=2,m===S.charAt(B-1))return O("End of comment missing");var z=S.slice(2,B-2);return C+=2,k(z),S=S.slice(B),C+=2,L({type:g,comment:z})}}function F(){var L=M(),B=I(i);if(B){if(H(),!I(o))return O("property missing ':'");var z=I(s),U=L({type:v,property:E(B[0].replace(e,m)),value:z?E(z[0].replace(e,m)):m});return I(l),U}}function X(){var L=[];K(L);for(var B;B=F();)B!==!1&&(L.push(B),K(L));return L}return V(),X()}function E(S){return S?S.replace(c,m):m}return vx=_,vx}var JR;function qX(){if(JR)return Ro;JR=1;var e=Ro&&Ro.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.default=n;const t=e(LX());function n(i,o){let s=null;if(!i||typeof i!="string")return s;const l=(0,t.default)(i),c=typeof o=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:p}=f;c?o(h,p,f):p&&(s=s||{},s[h]=p)}),s}return Ro}var ul={},eM;function IX(){if(eM)return ul;eM=1,Object.defineProperty(ul,"__esModule",{value:!0}),ul.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(h){return!h||n.test(h)||e.test(h)},l=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},f=function(h,p){return p===void 0&&(p={}),s(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(o,c):h=h.replace(i,c),h.replace(t,l))};return ul.camelCase=f,ul}var cl,tM;function BX(){if(tM)return cl;tM=1;var e=cl&&cl.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(qX()),n=IX();function i(o,s){var l={};return!o||typeof o!="string"||(0,t.default)(o,function(c,f){c&&f&&(l[(0,n.camelCase)(c,s)]=f)}),l}return i.default=i,cl=i,cl}var HX=BX();const UX=Hl(HX),ZO=WO("end"),E1=WO("start");function WO(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function PX(e){const t=E1(e),n=ZO(e);if(t&&n)return{start:t,end:n}}function Cl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?nM(e.position):"start"in e||"end"in e?nM(e):"line"in e||"column"in e?lb(e):""}function lb(e){return rM(e&&e.line)+":"+rM(e&&e.column)}function nM(e){return lb(e&&e.start)+"-"+lb(e&&e.end)}function rM(e){return e&&typeof e=="number"?e:1}class mn extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let o="",s={},l=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?o=t:!s.cause&&t&&(l=!0,o=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?s.ruleId=i:(s.source=i.slice(0,f),s.ruleId=i.slice(f+1))}if(!s.place&&s.ancestors&&s.ancestors){const f=s.ancestors[s.ancestors.length-1];f&&(s.place=f.position)}const c=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=c?c.line:void 0,this.name=Cl(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=l&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}mn.prototype.file="";mn.prototype.name="";mn.prototype.reason="";mn.prototype.message="";mn.prototype.stack="";mn.prototype.column=void 0;mn.prototype.line=void 0;mn.prototype.ancestors=void 0;mn.prototype.cause=void 0;mn.prototype.fatal=void 0;mn.prototype.place=void 0;mn.prototype.ruleId=void 0;mn.prototype.source=void 0;const C1={}.hasOwnProperty,VX=new Map,FX=/[A-Z]/g,$X=new Set(["table","tbody","thead","tfoot","tr"]),YX=new Set(["td","th"]),JO="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function GX(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=tK(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");i=eK(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,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"?S1:zX,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=ez(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function ez(e,t,n){if(t.type==="element")return XX(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return KX(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ZX(e,t,n);if(t.type==="mdxjsEsm")return QX(e,t);if(t.type==="root")return WX(e,t,n);if(t.type==="text")return JX(e,t)}function XX(e,t,n){const i=e.schema;let o=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(o=S1,e.schema=o),e.ancestors.push(t);const s=nz(e,t.tagName,!1),l=nK(e,t);let c=k1(e,t);return $X.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!EX(f):!0})),tz(e,l,s,t),N1(l,c),e.ancestors.pop(),e.schema=i,e.create(t,s,l,n)}function KX(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Bl(e,t.position)}function QX(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Bl(e,t.position)}function ZX(e,t,n){const i=e.schema;let o=i;t.name==="svg"&&i.space==="html"&&(o=S1,e.schema=o),e.ancestors.push(t);const s=t.name===null?e.Fragment:nz(e,t.name,!0),l=rK(e,t),c=k1(e,t);return tz(e,l,s,t),N1(l,c),e.ancestors.pop(),e.schema=i,e.create(t,s,l,n)}function WX(e,t,n){const i={};return N1(i,k1(e,t)),e.create(t,e.Fragment,i,n)}function JX(e,t){return t.value}function tz(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function N1(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function eK(e,t,n){return i;function i(o,s,l,c){const h=Array.isArray(l.children)?n:t;return c?h(s,l,c):h(s,l)}}function tK(e,t){return n;function n(i,o,s,l){const c=Array.isArray(s.children),f=E1(i);return t(o,s,l,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function nK(e,t){const n={};let i,o;for(o in t.properties)if(o!=="children"&&C1.call(t.properties,o)){const s=iK(e,o,t.properties[o]);if(s){const[l,c]=s;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&YX.has(t.tagName)?i=c:n[l]=c}}if(i){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function rK(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const l=s.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Bl(e,t.position);else{const o=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const c=i.value.data.estree.body[0];c.type,s=e.evaluater.evaluateExpression(c.expression)}else Bl(e,t.position);else s=i.value===null?!0:i.value;n[o]=s}return n}function k1(e,t){const n=[];let i=-1;const o=e.passKeys?new Map:VX;for(;++i<t.children.length;){const s=t.children[i];let l;if(e.passKeys){const f=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(f){const h=o.get(f)||0;l=f+"-"+h,o.set(f,h+1)}}const c=ez(e,s,l);c!==void 0&&n.push(c)}return n}function iK(e,t,n){const i=MX(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?xX(n):DX(n)),i.property==="style"){let o=typeof n=="object"?n:aK(e,String(n));return e.stylePropertyNameCase==="css"&&(o=oK(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?TX[i.property]||i.property:i.attribute,n]}}function aK(e,t){try{return UX(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,o=new mn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=JO+"#cannot-parse-style-attribute",o}}function nz(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let s=-1,l;for(;++s<o.length;){const c=XR(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(s&&c.type==="Literal"),optional:!1}:c}i=l}else i=XR(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const o=i.value;return C1.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(i);Bl(e)}function Bl(e,t){const n=new mn("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=JO+"#cannot-handle-mdx-estrees-without-createevaluater",n}function oK(e){const t={};let n;for(n in e)C1.call(e,n)&&(t[sK(n)]=e[n]);return t}function sK(e){let t=e.replace(FX,lK);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function lK(e){return"-"+e.toLowerCase()}const xx={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"]},uK={};function cK(e,t){const n=uK,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return rz(e,i,o)}function rz(e,t,n){if(fK(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 iM(e.children,t,n)}return Array.isArray(e)?iM(e,t,n):""}function iM(e,t,n){const i=[];let o=-1;for(;++o<e.length;)i[o]=rz(e[o],t,n);return i.join("")}function fK(e){return!!(e&&typeof e=="object")}const aM=document.createElement("i");function T1(e){const t="&"+e+";";aM.innerHTML=t;const n=aM.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Ir(e,t,n,i){const o=e.length;let s=0,l;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,i.length<1e4)l=Array.from(i),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);s<i.length;)l=i.slice(s,s+1e4),l.unshift(t,0),e.splice(...l),s+=1e4,t+=1e4}function rr(e,t){return e.length>0?(Ir(e,e.length,0,t),e):t}const oM={}.hasOwnProperty;function dK(e){const t={};let n=-1;for(;++n<e.length;)hK(t,e[n]);return t}function hK(e,t){let n;for(n in t){const o=(oM.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let l;if(s)for(l in s){oM.call(o,l)||(o[l]=[]);const c=s[l];pK(o[l],Array.isArray(c)?c:c?[c]:[])}}}function pK(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);Ir(e,0,0,i)}function iz(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 Bo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const zr=ua(/[A-Za-z]/),Vn=ua(/[\dA-Za-z]/),mK=ua(/[#-'*+\--9=?A-Z^-~]/);function ub(e){return e!==null&&(e<32||e===127)}const cb=ua(/\d/),gK=ua(/[\dA-Fa-f]/),yK=ua(/[!-/:-@[-`{-~]/);function Xe(e){return e!==null&&e<-2}function jn(e){return e!==null&&(e<0||e===32)}function vt(e){return e===-2||e===-1||e===32}const vK=ua(new RegExp("\\p{P}|\\p{S}","u")),xK=ua(/\s/);function ua(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function us(e){const t=[];let n=-1,i=0,o=0;for(;++n<e.length;){const s=e.charCodeAt(n);let l="";if(s===37&&Vn(e.charCodeAt(n+1))&&Vn(e.charCodeAt(n+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(l=String.fromCharCode(s));else if(s>55295&&s<57344){const c=e.charCodeAt(n+1);s<56320&&c>56319&&c<57344?(l=String.fromCharCode(s,c),o=1):l="�"}else l=String.fromCharCode(s);l&&(t.push(e.slice(i,n),encodeURIComponent(l)),i=n+o+1,l=""),o&&(n+=o,o=0)}return t.join("")+e.slice(i)}function Tt(e,t,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let s=0;return l;function l(f){return vt(f)?(e.enter(n),c(f)):t(f)}function c(f){return vt(f)&&s++<o?(e.consume(f),c):(e.exit(n),t(f))}}const bK={tokenize:wK};function wK(e){const t=e.attempt(this.parser.constructs.contentInitial,i,o);let n;return t;function i(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Tt(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),s(c)}function s(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Xe(c)?(e.consume(c),e.exit("chunkText"),s):(e.consume(c),l)}}const _K={tokenize:SK},sM={tokenize:EK};function SK(e){const t=this,n=[];let i=0,o,s,l;return c;function c(C){if(i<n.length){const k=n[i];return t.containerState=k[1],e.attempt(k[0].continuation,f,h)(C)}return h(C)}function f(C){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&N();const k=t.events.length;let M=k,R;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){R=t.events[M][1].end;break}w(i);let O=k;for(;O<t.events.length;)t.events[O][1].end={...R},O++;return Ir(t.events,M+1,0,t.events.slice(k)),t.events.length=O,h(C)}return c(C)}function h(C){if(i===n.length){if(!o)return g(C);if(o.currentConstruct&&o.currentConstruct.concrete)return _(C);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sM,p,m)(C)}function p(C){return o&&N(),w(i),g(C)}function m(C){return t.parser.lazy[t.now().line]=i!==n.length,l=t.now().offset,_(C)}function g(C){return t.containerState={},e.attempt(sM,v,_)(C)}function v(C){return i++,n.push([t.currentConstruct,t.containerState]),g(C)}function _(C){if(C===null){o&&N(),w(0),e.consume(C);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),E(C)}function E(C){if(C===null){S(e.exit("chunkFlow"),!0),w(0),e.consume(C);return}return Xe(C)?(e.consume(C),S(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(C),E)}function S(C,k){const M=t.sliceStream(C);if(k&&M.push(null),C.previous=s,s&&(s.next=C),s=C,o.defineSkip(C.start),o.write(M),t.parser.lazy[C.start.line]){let R=o.events.length;for(;R--;)if(o.events[R][1].start.offset<l&&(!o.events[R][1].end||o.events[R][1].end.offset>l))return;const O=t.events.length;let I=O,V,K;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(V){K=t.events[I][1].end;break}V=!0}for(w(i),R=O;R<t.events.length;)t.events[R][1].end={...K},R++;Ir(t.events,I+1,0,t.events.slice(O)),t.events.length=R}}function w(C){let k=n.length;for(;k-- >C;){const M=n[k];t.containerState=M[1],M[0].exit.call(t,e)}n.length=C}function N(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function EK(e,t,n){return Tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function lM(e){if(e===null||jn(e)||xK(e))return 1;if(vK(e))return 2}function A1(e,t,n){const i=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!i.includes(s)&&(t=s(t,n),i.push(s))}return t}const fb={name:"attention",resolveAll:CK,tokenize:NK};function CK(e,t){let n=-1,i,o,s,l,c,f,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[i][1].end},g={...e[n][1].start};uM(m,-f),uM(g,f),l={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[i][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},s={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},o={type:f>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[i][1].end={...l.start},e[n][1].start={...c.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=rr(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=rr(h,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",s,t]]),h=rr(h,A1(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=rr(h,[["exit",s,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=rr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Ir(e,i-1,n-i+3,h),n=i+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function NK(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,o=lM(i);let s;return l;function l(f){return s=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===s)return e.consume(f),c;const h=e.exit("attentionSequence"),p=lM(f),m=!p||p===2&&o||n.includes(f),g=!o||o===2&&p||n.includes(i);return h._open=!!(s===42?m:m&&(o||!g)),h._close=!!(s===42?g:g&&(p||!m)),t(f)}}function uM(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const kK={name:"autolink",tokenize:TK};function TK(e,t,n){let i=0;return o;function o(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(v){return zr(v)?(e.consume(v),l):v===64?n(v):h(v)}function l(v){return v===43||v===45||v===46||Vn(v)?(i=1,c(v)):h(v)}function c(v){return v===58?(e.consume(v),i=0,f):(v===43||v===45||v===46||Vn(v))&&i++<32?(e.consume(v),c):(i=0,h(v))}function f(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||ub(v)?n(v):(e.consume(v),f)}function h(v){return v===64?(e.consume(v),p):mK(v)?(e.consume(v),h):n(v)}function p(v){return Vn(v)?m(v):n(v)}function m(v){return v===46?(e.consume(v),i=0,p):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):g(v)}function g(v){if((v===45||Vn(v))&&i++<63){const _=v===45?g:m;return e.consume(v),_}return n(v)}}const fd={partial:!0,tokenize:AK};function AK(e,t,n){return i;function i(s){return vt(s)?Tt(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Xe(s)?t(s):n(s)}}const az={continuation:{tokenize:MK},exit:jK,name:"blockQuote",tokenize:RK};function RK(e,t,n){const i=this;return o;function o(l){if(l===62){const c=i.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),s}return n(l)}function s(l){return vt(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function MK(e,t,n){const i=this;return o;function o(l){return vt(l)?Tt(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):s(l)}function s(l){return e.attempt(az,t,n)(l)}}function jK(e){e.exit("blockQuote")}const oz={name:"characterEscape",tokenize:OK};function OK(e,t,n){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return yK(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const sz={name:"characterReference",tokenize:zK};function zK(e,t,n){const i=this;let o=0,s,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,l=Vn,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,l=gK,p):(e.enter("characterReferenceValue"),s=7,l=cb,p(m))}function p(m){if(m===59&&o){const g=e.exit("characterReferenceValue");return l===Vn&&!T1(i.sliceSerialize(g))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&o++<s?(e.consume(m),p):n(m)}}const cM={partial:!0,tokenize:LK},fM={concrete:!0,name:"codeFenced",tokenize:DK};function DK(e,t,n){const i=this,o={partial:!0,tokenize:M};let s=0,l=0,c;return f;function f(R){return h(R)}function h(R){const O=i.events[i.events.length-1];return s=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,c=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(R)}function p(R){return R===c?(l++,e.consume(R),p):l<3?n(R):(e.exit("codeFencedFenceSequence"),vt(R)?Tt(e,m,"whitespace")(R):m(R))}function m(R){return R===null||Xe(R)?(e.exit("codeFencedFence"),i.interrupt?t(R):e.check(cM,E,k)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(R))}function g(R){return R===null||Xe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):vt(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Tt(e,v,"whitespace")(R)):R===96&&R===c?n(R):(e.consume(R),g)}function v(R){return R===null||Xe(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(R))}function _(R){return R===null||Xe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===c?n(R):(e.consume(R),_)}function E(R){return e.attempt(o,k,S)(R)}function S(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),w}function w(R){return s>0&&vt(R)?Tt(e,N,"linePrefix",s+1)(R):N(R)}function N(R){return R===null||Xe(R)?e.check(cM,E,k)(R):(e.enter("codeFlowValue"),C(R))}function C(R){return R===null||Xe(R)?(e.exit("codeFlowValue"),N(R)):(e.consume(R),C)}function k(R){return e.exit("codeFenced"),t(R)}function M(R,O,I){let V=0;return K;function K(B){return R.enter("lineEnding"),R.consume(B),R.exit("lineEnding"),H}function H(B){return R.enter("codeFencedFence"),vt(B)?Tt(R,F,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):F(B)}function F(B){return B===c?(R.enter("codeFencedFenceSequence"),X(B)):I(B)}function X(B){return B===c?(V++,R.consume(B),X):V>=l?(R.exit("codeFencedFenceSequence"),vt(B)?Tt(R,L,"whitespace")(B):L(B)):I(B)}function L(B){return B===null||Xe(B)?(R.exit("codeFencedFence"),O(B)):I(B)}}}function LK(e,t,n){const i=this;return o;function o(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s)}function s(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}const bx={name:"codeIndented",tokenize:IK},qK={partial:!0,tokenize:BK};function IK(e,t,n){const i=this;return o;function o(h){return e.enter("codeIndented"),Tt(e,s,"linePrefix",5)(h)}function s(h){const p=i.events[i.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?f(h):Xe(h)?e.attempt(qK,l,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Xe(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function BK(e,t,n){const i=this;return o;function o(l){return i.parser.lazy[i.now().line]?n(l):Xe(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):Tt(e,s,"linePrefix",5)(l)}function s(l){const c=i.events[i.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):Xe(l)?o(l):n(l)}}const HK={name:"codeText",previous:PK,resolve:UK,tokenize:VK};function UK(e){let t=e.length-4,n=3,i,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)o===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(o=i):(i===t||e[i][1].type==="lineEnding")&&(e[o][1].type="codeTextData",i!==o+2&&(e[o][1].end=e[i-1][1].end,e.splice(o+2,i-o-2),t-=i-o-2,i=o+2),o=void 0);return e}function PK(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function VK(e,t,n){let i=0,o,s;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),i++,c):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(s=e.enter("codeTextSequence"),o=0,p(m)):Xe(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||Xe(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),o++,p):o===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(s.type="codeTextData",h(m))}}class FK{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 i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const o=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return i&&fl(this.left,i),s.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),fl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),fl(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);fl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);fl(this.left,n.reverse())}}}function fl(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 lz(e){const t={};let n=-1,i,o,s,l,c,f,h;const p=new FK(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(i=p.get(n),n&&i[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,s=0,s<f.length&&f[s][1].type==="lineEndingBlank"&&(s+=2),s<f.length&&f[s][1].type==="content"))for(;++s<f.length&&f[s][1].type!=="content";)f[s][1].type==="chunkText"&&(f[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,$K(p,n)),n=t[n],h=!0);else if(i[1]._container){for(s=n,o=void 0;s--;)if(l=p.get(s),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),l[1].type="lineEnding",o=s);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;o&&(i[1].end={...p.get(o)[1].start},c=p.slice(o,n),c.unshift(i),p.splice(o,n-o+1,c))}}return Ir(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function $K(e,t){const n=e.get(t)[1],i=e.get(t)[2];let o=t-1;const s=[];let l=n._tokenizer;l||(l=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,f=[],h={};let p,m,g=-1,v=n,_=0,E=0;const S=[E];for(;v;){for(;e.get(++o)[1]!==v;);s.push(o),v._tokenizer||(p=i.sliceStream(v),v.next||p.push(null),m&&l.defineSkip(v.start),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),v._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=v,v=v.next}for(v=n;++g<c.length;)c[g][0]==="exit"&&c[g-1][0]==="enter"&&c[g][1].type===c[g-1][1].type&&c[g][1].start.line!==c[g][1].end.line&&(E=g+1,S.push(E),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(l.events=[],v?(v._tokenizer=void 0,v.previous=void 0):S.pop(),g=S.length;g--;){const w=c.slice(S[g],S[g+1]),N=s.pop();f.push([N,N+w.length-1]),e.splice(N,2,w)}for(f.reverse(),g=-1;++g<f.length;)h[_+f[g][0]]=_+f[g][1],_+=f[g][1]-f[g][0]-1;return h}const YK={resolve:XK,tokenize:KK},GK={partial:!0,tokenize:QK};function XK(e){return lz(e),e}function KK(e,t){let n;return i;function i(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?s(c):Xe(c)?e.check(GK,l,s)(c):(e.consume(c),o)}function s(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function QK(e,t,n){const i=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Tt(e,s,"linePrefix")}function s(l){if(l===null||Xe(l))return n(l);const c=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(i.parser.constructs.flow,n,t)(l)}}function uz(e,t,n,i,o,s,l,c,f){const h=f||Number.POSITIVE_INFINITY;let p=0;return m;function m(w){return w===60?(e.enter(i),e.enter(o),e.enter(s),e.consume(w),e.exit(s),g):w===null||w===32||w===41||ub(w)?n(w):(e.enter(i),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),E(w))}function g(w){return w===62?(e.enter(s),e.consume(w),e.exit(s),e.exit(o),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),v(w))}function v(w){return w===62?(e.exit("chunkString"),e.exit(c),g(w)):w===null||w===60||Xe(w)?n(w):(e.consume(w),w===92?_:v)}function _(w){return w===60||w===62||w===92?(e.consume(w),v):v(w)}function E(w){return!p&&(w===null||w===41||jn(w))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(i),t(w)):p<h&&w===40?(e.consume(w),p++,E):w===41?(e.consume(w),p--,E):w===null||w===32||w===40||ub(w)?n(w):(e.consume(w),w===92?S:E)}function S(w){return w===40||w===41||w===92?(e.consume(w),E):E(w)}}function cz(e,t,n,i,o,s){const l=this;let c=0,f;return h;function h(v){return e.enter(i),e.enter(o),e.consume(v),e.exit(o),e.enter(s),p}function p(v){return c>999||v===null||v===91||v===93&&!f||v===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(v):v===93?(e.exit(s),e.enter(o),e.consume(v),e.exit(o),e.exit(i),t):Xe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||v===91||v===93||Xe(v)||c++>999?(e.exit("chunkString"),p(v)):(e.consume(v),f||(f=!vt(v)),v===92?g:m)}function g(v){return v===91||v===92||v===93?(e.consume(v),c++,m):m(v)}}function fz(e,t,n,i,o,s){let l;return c;function c(g){return g===34||g===39||g===40?(e.enter(i),e.enter(o),e.consume(g),e.exit(o),l=g===40?41:g,f):n(g)}function f(g){return g===l?(e.enter(o),e.consume(g),e.exit(o),e.exit(i),t):(e.enter(s),h(g))}function h(g){return g===l?(e.exit(s),f(l)):g===null?n(g):Xe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Tt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===l||g===null||Xe(g)?(e.exit("chunkString"),h(g)):(e.consume(g),g===92?m:p)}function m(g){return g===l||g===92?(e.consume(g),p):p(g)}}function Nl(e,t){let n;return i;function i(o){return Xe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):vt(o)?Tt(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}const ZK={name:"definition",tokenize:JK},WK={partial:!0,tokenize:eQ};function JK(e,t,n){const i=this;let o;return s;function s(v){return e.enter("definition"),l(v)}function l(v){return cz.call(i,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function c(v){return o=Bo(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),f):n(v)}function f(v){return jn(v)?Nl(e,h)(v):h(v)}function h(v){return uz(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function p(v){return e.attempt(WK,m,m)(v)}function m(v){return vt(v)?Tt(e,g,"whitespace")(v):g(v)}function g(v){return v===null||Xe(v)?(e.exit("definition"),i.parser.defined.push(o),t(v)):n(v)}}function eQ(e,t,n){return i;function i(c){return jn(c)?Nl(e,o)(c):n(c)}function o(c){return fz(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function s(c){return vt(c)?Tt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||Xe(c)?t(c):n(c)}}const tQ={name:"hardBreakEscape",tokenize:nQ};function nQ(e,t,n){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return Xe(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const rQ={name:"headingAtx",resolve:iQ,tokenize:aQ};function iQ(e,t){let n=e.length-2,i=3,o,s;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(o={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},s={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},Ir(e,i,n-i+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function aQ(e,t,n){let i=0;return o;function o(p){return e.enter("atxHeading"),s(p)}function s(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&i++<6?(e.consume(p),l):p===null||jn(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),f(p)):p===null||Xe(p)?(e.exit("atxHeading"),t(p)):vt(p)?Tt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function f(p){return p===35?(e.consume(p),f):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||jn(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const oQ=["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"],dM=["pre","script","style","textarea"],sQ={concrete:!0,name:"htmlFlow",resolveTo:cQ,tokenize:fQ},lQ={partial:!0,tokenize:hQ},uQ={partial:!0,tokenize:dQ};function cQ(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 fQ(e,t,n){const i=this;let o,s,l,c,f;return h;function h(q){return p(q)}function p(q){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(q),m}function m(q){return q===33?(e.consume(q),g):q===47?(e.consume(q),s=!0,E):q===63?(e.consume(q),o=3,i.interrupt?t:j):zr(q)?(e.consume(q),l=String.fromCharCode(q),S):n(q)}function g(q){return q===45?(e.consume(q),o=2,v):q===91?(e.consume(q),o=5,c=0,_):zr(q)?(e.consume(q),o=4,i.interrupt?t:j):n(q)}function v(q){return q===45?(e.consume(q),i.interrupt?t:j):n(q)}function _(q){const Y="CDATA[";return q===Y.charCodeAt(c++)?(e.consume(q),c===Y.length?i.interrupt?t:F:_):n(q)}function E(q){return zr(q)?(e.consume(q),l=String.fromCharCode(q),S):n(q)}function S(q){if(q===null||q===47||q===62||jn(q)){const Y=q===47,Z=l.toLowerCase();return!Y&&!s&&dM.includes(Z)?(o=1,i.interrupt?t(q):F(q)):oQ.includes(l.toLowerCase())?(o=6,Y?(e.consume(q),w):i.interrupt?t(q):F(q)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(q):s?N(q):C(q))}return q===45||Vn(q)?(e.consume(q),l+=String.fromCharCode(q),S):n(q)}function w(q){return q===62?(e.consume(q),i.interrupt?t:F):n(q)}function N(q){return vt(q)?(e.consume(q),N):K(q)}function C(q){return q===47?(e.consume(q),K):q===58||q===95||zr(q)?(e.consume(q),k):vt(q)?(e.consume(q),C):K(q)}function k(q){return q===45||q===46||q===58||q===95||Vn(q)?(e.consume(q),k):M(q)}function M(q){return q===61?(e.consume(q),R):vt(q)?(e.consume(q),M):C(q)}function R(q){return q===null||q===60||q===61||q===62||q===96?n(q):q===34||q===39?(e.consume(q),f=q,O):vt(q)?(e.consume(q),R):I(q)}function O(q){return q===f?(e.consume(q),f=null,V):q===null||Xe(q)?n(q):(e.consume(q),O)}function I(q){return q===null||q===34||q===39||q===47||q===60||q===61||q===62||q===96||jn(q)?M(q):(e.consume(q),I)}function V(q){return q===47||q===62||vt(q)?C(q):n(q)}function K(q){return q===62?(e.consume(q),H):n(q)}function H(q){return q===null||Xe(q)?F(q):vt(q)?(e.consume(q),H):n(q)}function F(q){return q===45&&o===2?(e.consume(q),z):q===60&&o===1?(e.consume(q),U):q===62&&o===4?(e.consume(q),D):q===63&&o===3?(e.consume(q),j):q===93&&o===5?(e.consume(q),Q):Xe(q)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(lQ,$,X)(q)):q===null||Xe(q)?(e.exit("htmlFlowData"),X(q)):(e.consume(q),F)}function X(q){return e.check(uQ,L,$)(q)}function L(q){return e.enter("lineEnding"),e.consume(q),e.exit("lineEnding"),B}function B(q){return q===null||Xe(q)?X(q):(e.enter("htmlFlowData"),F(q))}function z(q){return q===45?(e.consume(q),j):F(q)}function U(q){return q===47?(e.consume(q),l="",G):F(q)}function G(q){if(q===62){const Y=l.toLowerCase();return dM.includes(Y)?(e.consume(q),D):F(q)}return zr(q)&&l.length<8?(e.consume(q),l+=String.fromCharCode(q),G):F(q)}function Q(q){return q===93?(e.consume(q),j):F(q)}function j(q){return q===62?(e.consume(q),D):q===45&&o===2?(e.consume(q),j):F(q)}function D(q){return q===null||Xe(q)?(e.exit("htmlFlowData"),$(q)):(e.consume(q),D)}function $(q){return e.exit("htmlFlow"),t(q)}}function dQ(e,t,n){const i=this;return o;function o(l){return Xe(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):n(l)}function s(l){return i.parser.lazy[i.now().line]?n(l):t(l)}}function hQ(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(fd,t,n)}}const pQ={name:"htmlText",tokenize:mQ};function mQ(e,t,n){const i=this;let o,s,l;return c;function c(j){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(j),f}function f(j){return j===33?(e.consume(j),h):j===47?(e.consume(j),M):j===63?(e.consume(j),C):zr(j)?(e.consume(j),I):n(j)}function h(j){return j===45?(e.consume(j),p):j===91?(e.consume(j),s=0,_):zr(j)?(e.consume(j),N):n(j)}function p(j){return j===45?(e.consume(j),v):n(j)}function m(j){return j===null?n(j):j===45?(e.consume(j),g):Xe(j)?(l=m,U(j)):(e.consume(j),m)}function g(j){return j===45?(e.consume(j),v):m(j)}function v(j){return j===62?z(j):j===45?g(j):m(j)}function _(j){const D="CDATA[";return j===D.charCodeAt(s++)?(e.consume(j),s===D.length?E:_):n(j)}function E(j){return j===null?n(j):j===93?(e.consume(j),S):Xe(j)?(l=E,U(j)):(e.consume(j),E)}function S(j){return j===93?(e.consume(j),w):E(j)}function w(j){return j===62?z(j):j===93?(e.consume(j),w):E(j)}function N(j){return j===null||j===62?z(j):Xe(j)?(l=N,U(j)):(e.consume(j),N)}function C(j){return j===null?n(j):j===63?(e.consume(j),k):Xe(j)?(l=C,U(j)):(e.consume(j),C)}function k(j){return j===62?z(j):C(j)}function M(j){return zr(j)?(e.consume(j),R):n(j)}function R(j){return j===45||Vn(j)?(e.consume(j),R):O(j)}function O(j){return Xe(j)?(l=O,U(j)):vt(j)?(e.consume(j),O):z(j)}function I(j){return j===45||Vn(j)?(e.consume(j),I):j===47||j===62||jn(j)?V(j):n(j)}function V(j){return j===47?(e.consume(j),z):j===58||j===95||zr(j)?(e.consume(j),K):Xe(j)?(l=V,U(j)):vt(j)?(e.consume(j),V):z(j)}function K(j){return j===45||j===46||j===58||j===95||Vn(j)?(e.consume(j),K):H(j)}function H(j){return j===61?(e.consume(j),F):Xe(j)?(l=H,U(j)):vt(j)?(e.consume(j),H):V(j)}function F(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),o=j,X):Xe(j)?(l=F,U(j)):vt(j)?(e.consume(j),F):(e.consume(j),L)}function X(j){return j===o?(e.consume(j),o=void 0,B):j===null?n(j):Xe(j)?(l=X,U(j)):(e.consume(j),X)}function L(j){return j===null||j===34||j===39||j===60||j===61||j===96?n(j):j===47||j===62||jn(j)?V(j):(e.consume(j),L)}function B(j){return j===47||j===62||jn(j)?V(j):n(j)}function z(j){return j===62?(e.consume(j),e.exit("htmlTextData"),e.exit("htmlText"),t):n(j)}function U(j){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),G}function G(j){return vt(j)?Tt(e,Q,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):Q(j)}function Q(j){return e.enter("htmlTextData"),l(j)}}const R1={name:"labelEnd",resolveAll:xQ,resolveTo:bQ,tokenize:wQ},gQ={tokenize:_Q},yQ={tokenize:SQ},vQ={tokenize:EQ};function xQ(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const o=i.type==="labelImage"?4:2;i.type="data",t+=o}}return e.length!==n.length&&Ir(e,0,e.length,n),e}function bQ(e,t){let n=e.length,i=0,o,s,l,c;for(;n--;)if(o=e[n][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=n,o.type!=="labelLink")){i=2;break}}else o.type==="labelEnd"&&(l=n);const f={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[s][1].start},end:{...e[l][1].end}},p={type:"labelText",start:{...e[s+i+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",f,t],["enter",h,t]],c=rr(c,e.slice(s+1,s+i+3)),c=rr(c,[["enter",p,t]]),c=rr(c,A1(t.parser.constructs.insideSpan.null,e.slice(s+i+4,l-3),t)),c=rr(c,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),c=rr(c,e.slice(l+1)),c=rr(c,[["exit",f,t]]),Ir(e,s,e.length,c),e}function wQ(e,t,n){const i=this;let o=i.events.length,s,l;for(;o--;)if((i.events[o][1].type==="labelImage"||i.events[o][1].type==="labelLink")&&!i.events[o][1]._balanced){s=i.events[o][1];break}return c;function c(g){return s?s._inactive?m(g):(l=i.parser.defined.includes(Bo(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),f):n(g)}function f(g){return g===40?e.attempt(gQ,p,l?p:m)(g):g===91?e.attempt(yQ,p,l?h:m)(g):l?p(g):m(g)}function h(g){return e.attempt(vQ,p,m)(g)}function p(g){return t(g)}function m(g){return s._balanced=!0,n(g)}}function _Q(e,t,n){return i;function i(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return jn(m)?Nl(e,s)(m):s(m)}function s(m){return m===41?p(m):uz(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return jn(m)?Nl(e,f)(m):p(m)}function c(m){return n(m)}function f(m){return m===34||m===39||m===40?fz(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return jn(m)?Nl(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function SQ(e,t,n){const i=this;return o;function o(c){return cz.call(i,e,s,l,"reference","referenceMarker","referenceString")(c)}function s(c){return i.parser.defined.includes(Bo(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function EQ(e,t,n){return i;function i(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const CQ={name:"labelStartImage",resolveAll:R1.resolveAll,tokenize:NQ};function NQ(e,t,n){const i=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),s}function s(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(c):t(c)}}const kQ={name:"labelStartLink",resolveAll:R1.resolveAll,tokenize:TQ};function TQ(e,t,n){const i=this;return o;function o(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),s}function s(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):t(l)}}const wx={name:"lineEnding",tokenize:AQ};function AQ(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Tt(e,t,"linePrefix")}}const nf={name:"thematicBreak",tokenize:RQ};function RQ(e,t,n){let i=0,o;return s;function s(h){return e.enter("thematicBreak"),l(h)}function l(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),f(h)):i>=3&&(h===null||Xe(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===o?(e.consume(h),i++,f):(e.exit("thematicBreakSequence"),vt(h)?Tt(e,c,"whitespace")(h):c(h))}}const Tn={continuation:{tokenize:zQ},exit:LQ,name:"list",tokenize:OQ},MQ={partial:!0,tokenize:qQ},jQ={partial:!0,tokenize:DQ};function OQ(e,t,n){const i=this,o=i.events[i.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,l=0;return c;function c(v){const _=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:cb(v)){if(i.containerState.type||(i.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(nf,n,h)(v):h(v);if(!i.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(v)}return n(v)}function f(v){return cb(v)&&++l<10?(e.consume(v),f):(!i.interrupt||l<2)&&(i.containerState.marker?v===i.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):n(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||v,e.check(fd,i.interrupt?n:p,e.attempt(MQ,g,m))}function p(v){return i.containerState.initialBlankLine=!0,s++,g(v)}function m(v){return vt(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),g):n(v)}function g(v){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function zQ(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(fd,o,s);function o(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Tt(e,t,"listItemIndent",i.containerState.size+1)(c)}function s(c){return i.containerState.furtherBlankLines||!vt(c)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,l(c)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(jQ,t,l)(c))}function l(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,Tt(e,e.attempt(Tn,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function DQ(e,t,n){const i=this;return Tt(e,o,"listItemIndent",i.containerState.size+1);function o(s){const l=i.events[i.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===i.containerState.size?t(s):n(s)}}function LQ(e){e.exit(this.containerState.type)}function qQ(e,t,n){const i=this;return Tt(e,o,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const l=i.events[i.events.length-1];return!vt(s)&&l&&l[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const hM={name:"setextUnderline",resolveTo:IQ,tokenize:BQ};function IQ(e,t){let n=e.length,i,o,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const l={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",l,t]),e.splice(s+1,0,["exit",e[i][1],t]),e[i][1].end={...e[s][1].end}):e[i][1]=l,e.push(["exit",l,t]),e}function BQ(e,t,n){const i=this;let o;return s;function s(h){let p=i.events.length,m;for(;p--;)if(i.events[p][1].type!=="lineEnding"&&i.events[p][1].type!=="linePrefix"&&i.events[p][1].type!=="content"){m=i.events[p][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||m)?(e.enter("setextHeadingLine"),o=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),vt(h)?Tt(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Xe(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const HQ={tokenize:UQ};function UQ(e){const t=this,n=e.attempt(fd,i,e.attempt(this.parser.constructs.flowInitial,o,Tt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(YK,o)),"linePrefix")));return n;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const PQ={resolveAll:hz()},VQ=dz("string"),FQ=dz("text");function dz(e){return{resolveAll:hz(e==="text"?$Q:void 0),tokenize:t};function t(n){const i=this,o=this.parser.constructs[e],s=n.attempt(o,l,c);return l;function l(p){return h(p)?s(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),f}function f(p){return h(p)?(n.exit("data"),s(p)):(n.consume(p),f)}function h(p){if(p===null)return!0;const m=o[p];let g=-1;if(m)for(;++g<m.length;){const v=m[g];if(!v.previous||v.previous.call(i,i.previous))return!0}return!1}}}function hz(e){return t;function t(n,i){let o=-1,s;for(;++o<=n.length;)s===void 0?n[o]&&n[o][1].type==="data"&&(s=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==s+2&&(n[s][1].end=n[o-1][1].end,n.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(n,i):n}}function $Q(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 i=e[n-1][1],o=t.sliceStream(i);let s=o.length,l=-1,c=0,f;for(;s--;){const h=o[s];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(h===-2)f=!0,c++;else if(h!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?l:i.start._bufferIndex+l,_index:i.start._index+s,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const YQ={42:Tn,43:Tn,45:Tn,48:Tn,49:Tn,50:Tn,51:Tn,52:Tn,53:Tn,54:Tn,55:Tn,56:Tn,57:Tn,62:az},GQ={91:ZK},XQ={[-2]:bx,[-1]:bx,32:bx},KQ={35:rQ,42:nf,45:[hM,nf],60:sQ,61:hM,95:nf,96:fM,126:fM},QQ={38:sz,92:oz},ZQ={[-5]:wx,[-4]:wx,[-3]:wx,33:CQ,38:sz,42:fb,60:[kK,pQ],91:kQ,92:[tQ,oz],93:R1,95:fb,96:HK},WQ={null:[fb,PQ]},JQ={null:[42,95]},eZ={null:[]},tZ=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:JQ,contentInitial:GQ,disable:eZ,document:YQ,flow:KQ,flowInitial:XQ,insideSpan:WQ,string:QQ,text:ZQ},Symbol.toStringTag,{value:"Module"}));function nZ(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},s=[];let l=[],c=[];const f={attempt:O(M),check:O(R),consume:N,enter:C,exit:k,interrupt:O(R,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:_,parser:e,previous:null,sliceSerialize:g,sliceStream:v,write:m};let p=t.tokenize.call(h,f);return t.resolveAll&&s.push(t),h;function m(H){return l=rr(l,H),S(),l[l.length-1]!==null?[]:(I(t,0),h.events=A1(s,h.events,h),h.events)}function g(H,F){return iZ(v(H),F)}function v(H){return rZ(l,H)}function _(){const{_bufferIndex:H,_index:F,line:X,column:L,offset:B}=i;return{_bufferIndex:H,_index:F,line:X,column:L,offset:B}}function E(H){o[H.line]=H.column,K()}function S(){let H;for(;i._index<l.length;){const F=l[i._index];if(typeof F=="string")for(H=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===H&&i._bufferIndex<F.length;)w(F.charCodeAt(i._bufferIndex));else w(F)}}function w(H){p=p(H)}function N(H){Xe(H)?(i.line++,i.column=1,i.offset+=H===-3?2:1,K()):H!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===l[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=H}function C(H,F){const X=F||{};return X.type=H,X.start=_(),h.events.push(["enter",X,h]),c.push(X),X}function k(H){const F=c.pop();return F.end=_(),h.events.push(["exit",F,h]),F}function M(H,F){I(H,F.from)}function R(H,F){F.restore()}function O(H,F){return X;function X(L,B,z){let U,G,Q,j;return Array.isArray(L)?$(L):"tokenize"in L?$([L]):D(L);function D(W){return te;function te(re){const se=re!==null&&W[re],me=re!==null&&W.null,be=[...Array.isArray(se)?se:se?[se]:[],...Array.isArray(me)?me:me?[me]:[]];return $(be)(re)}}function $(W){return U=W,G=0,W.length===0?z:q(W[G])}function q(W){return te;function te(re){return j=V(),Q=W,W.partial||(h.currentConstruct=W),W.name&&h.parser.constructs.disable.null.includes(W.name)?Z():W.tokenize.call(F?Object.assign(Object.create(h),F):h,f,Y,Z)(re)}}function Y(W){return H(Q,j),B}function Z(W){return j.restore(),++G<U.length?q(U[G]):z}}}function I(H,F){H.resolveAll&&!s.includes(H)&&s.push(H),H.resolve&&Ir(h.events,F,h.events.length-F,H.resolve(h.events.slice(F),h)),H.resolveTo&&(h.events=H.resolveTo(h.events,h))}function V(){const H=_(),F=h.previous,X=h.currentConstruct,L=h.events.length,B=Array.from(c);return{from:L,restore:z};function z(){i=H,h.previous=F,h.currentConstruct=X,h.events.length=L,c=B,K()}}function K(){i.line in o&&i.column<2&&(i.column=o[i.line],i.offset+=o[i.line]-1)}}function rZ(e,t){const n=t.start._index,i=t.start._bufferIndex,o=t.end._index,s=t.end._bufferIndex;let l;if(n===o)l=[e[n].slice(i,s)];else{if(l=e.slice(n,o),i>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(i):l.shift()}s>0&&l.push(e[o].slice(0,s))}return l}function iZ(e,t){let n=-1;const i=[];let o;for(;++n<e.length;){const s=e[n];let l;if(typeof s=="string")l=s;else switch(s){case-5:{l="\r";break}case-4:{l=`
375
+ `;break}case-3:{l=`\r
376
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&o)continue;l=" ";break}default:l=String.fromCharCode(s)}o=s===-2,i.push(l)}return i.join("")}function aZ(e){const i={constructs:dK([tZ,...(e||{}).extensions||[]]),content:o(bK),defined:[],document:o(_K),flow:o(HQ),lazy:{},string:o(VQ),text:o(FQ)};return i;function o(s){return l;function l(c){return nZ(i,s,c)}}}function oZ(e){for(;!lz(e););return e}const pM=/[\0\t\n\r]/g;function sZ(){let e=1,t="",n=!0,i;return o;function o(s,l,c){const f=[];let h,p,m,g,v;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(l||void 0).decode(s)),m=0,t="",n&&(s.charCodeAt(0)===65279&&m++,n=void 0);m<s.length;){if(pM.lastIndex=m,h=pM.exec(s),g=h&&h.index!==void 0?h.index:s.length,v=s.charCodeAt(g),!h){t=s.slice(m);break}if(v===10&&m===g&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),m<g&&(f.push(s.slice(m,g)),e+=g-m),v){case 0:{f.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,f.push(-2);e++<p;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}m=g+1}return c&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}const lZ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function uZ(e){return e.replace(lZ,cZ)}function cZ(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),s=o===120||o===88;return iz(n.slice(s?2:1),s?16:10)}return T1(n)||e}const pz={}.hasOwnProperty;function fZ(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),dZ(n)(oZ(aZ(n).document().write(sZ()(e,t,!0))))}function dZ(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(he),autolinkProtocol:V,autolinkEmail:V,atxHeading:s(Ne),blockQuote:s(me),characterEscape:V,characterReference:V,codeFenced:s(be),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(be,l),codeText:s(ve,l),codeTextData:V,data:V,codeFlowValue:V,definition:s(we),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(ke),hardBreakEscape:s(Oe),hardBreakTrailing:s(Oe),htmlFlow:s(Te,l),htmlFlowData:V,htmlText:s(Te,l),htmlTextData:V,image:s(_t),label:l,link:s(he),listItem:s(Ue),listItemValue:g,listOrdered:s(ye,m),listUnordered:s(ye),paragraph:s(_e),reference:q,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(Ne),strong:s(Ie),thematicBreak:s(jt)},exit:{atxHeading:f(),atxHeadingSequence:M,autolink:f(),autolinkEmail:se,autolinkProtocol:re,blockQuote:f(),characterEscapeValue:K,characterReferenceMarkerHexadecimal:Z,characterReferenceMarkerNumeric:Z,characterReferenceValue:W,characterReference:te,codeFenced:f(S),codeFencedFence:E,codeFencedFenceInfo:v,codeFencedFenceMeta:_,codeFlowValue:K,codeIndented:f(w),codeText:f(B),codeTextData:K,data:K,definition:f(),definitionDestinationString:k,definitionLabelString:N,definitionTitleString:C,emphasis:f(),hardBreakEscape:f(F),hardBreakTrailing:f(F),htmlFlow:f(X),htmlFlowData:K,htmlText:f(L),htmlTextData:K,image:f(U),label:Q,labelText:G,lineEnding:H,link:f(z),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:Y,resourceDestinationString:j,resourceTitleString:D,resource:$,setextHeading:f(I),setextHeadingLineSequence:O,setextHeadingText:R,strong:f(),thematicBreak:f()}};mz(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(ue){let pe={type:"root",children:[]};const Me={stack:[pe],tokenStack:[],config:t,enter:c,exit:h,buffer:l,resume:p,data:n},$e=[];let Ge=-1;for(;++Ge<ue.length;)if(ue[Ge][1].type==="listOrdered"||ue[Ge][1].type==="listUnordered")if(ue[Ge][0]==="enter")$e.push(Ge);else{const Ot=$e.pop();Ge=o(ue,Ot,Ge)}for(Ge=-1;++Ge<ue.length;){const Ot=t[ue[Ge][0]];pz.call(Ot,ue[Ge][1].type)&&Ot[ue[Ge][1].type].call(Object.assign({sliceSerialize:ue[Ge][2].sliceSerialize},Me),ue[Ge][1])}if(Me.tokenStack.length>0){const Ot=Me.tokenStack[Me.tokenStack.length-1];(Ot[1]||mM).call(Me,void 0,Ot[0])}for(pe.position={start:na(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:na(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},Ge=-1;++Ge<t.transforms.length;)pe=t.transforms[Ge](pe)||pe;return pe}function o(ue,pe,Me){let $e=pe-1,Ge=-1,Ot=!1,en,xt,ct,Ht;for(;++$e<=Me;){const ft=ue[$e];switch(ft[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ft[0]==="enter"?Ge++:Ge--,Ht=void 0;break}case"lineEndingBlank":{ft[0]==="enter"&&(en&&!Ht&&!Ge&&!ct&&(ct=$e),Ht=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ht=void 0}if(!Ge&&ft[0]==="enter"&&ft[1].type==="listItemPrefix"||Ge===-1&&ft[0]==="exit"&&(ft[1].type==="listUnordered"||ft[1].type==="listOrdered")){if(en){let dn=$e;for(xt=void 0;dn--;){const tn=ue[dn];if(tn[1].type==="lineEnding"||tn[1].type==="lineEndingBlank"){if(tn[0]==="exit")continue;xt&&(ue[xt][1].type="lineEndingBlank",Ot=!0),tn[1].type="lineEnding",xt=dn}else if(!(tn[1].type==="linePrefix"||tn[1].type==="blockQuotePrefix"||tn[1].type==="blockQuotePrefixWhitespace"||tn[1].type==="blockQuoteMarker"||tn[1].type==="listItemIndent"))break}ct&&(!xt||ct<xt)&&(en._spread=!0),en.end=Object.assign({},xt?ue[xt][1].start:ft[1].end),ue.splice(xt||$e,0,["exit",en,ft[2]]),$e++,Me++}if(ft[1].type==="listItemPrefix"){const dn={type:"listItem",_spread:!1,start:Object.assign({},ft[1].start),end:void 0};en=dn,ue.splice($e,0,["enter",dn,ft[2]]),$e++,Me++,ct=void 0,Ht=!0}}}return ue[pe][1]._spread=Ot,Me}function s(ue,pe){return Me;function Me($e){c.call(this,ue($e),$e),pe&&pe.call(this,$e)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(ue,pe,Me){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([pe,Me||void 0]),ue.position={start:na(pe.start),end:void 0}}function f(ue){return pe;function pe(Me){ue&&ue.call(this,Me),h.call(this,Me)}}function h(ue,pe){const Me=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==ue.type&&(pe?pe.call(this,ue,$e[0]):($e[1]||mM).call(this,ue,$e[0]));else throw new Error("Cannot close `"+ue.type+"` ("+Cl({start:ue.start,end:ue.end})+"): it’s not open");Me.position.end=na(ue.end)}function p(){return cK(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function g(ue){if(this.data.expectingFirstListItemValue){const pe=this.stack[this.stack.length-2];pe.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ue=this.resume(),pe=this.stack[this.stack.length-1];pe.lang=ue}function _(){const ue=this.resume(),pe=this.stack[this.stack.length-1];pe.meta=ue}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ue=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const ue=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ue.replace(/(\r?\n|\r)$/g,"")}function N(ue){const pe=this.resume(),Me=this.stack[this.stack.length-1];Me.label=pe,Me.identifier=Bo(this.sliceSerialize(ue)).toLowerCase()}function C(){const ue=this.resume(),pe=this.stack[this.stack.length-1];pe.title=ue}function k(){const ue=this.resume(),pe=this.stack[this.stack.length-1];pe.url=ue}function M(ue){const pe=this.stack[this.stack.length-1];if(!pe.depth){const Me=this.sliceSerialize(ue).length;pe.depth=Me}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function O(ue){const pe=this.stack[this.stack.length-1];pe.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function V(ue){const Me=this.stack[this.stack.length-1].children;let $e=Me[Me.length-1];(!$e||$e.type!=="text")&&($e=Ve(),$e.position={start:na(ue.start),end:void 0},Me.push($e)),this.stack.push($e)}function K(ue){const pe=this.stack.pop();pe.value+=this.sliceSerialize(ue),pe.position.end=na(ue.end)}function H(ue){const pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Me=pe.children[pe.children.length-1];Me.position.end=na(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(pe.type)&&(V.call(this,ue),K.call(this,ue))}function F(){this.data.atHardBreak=!0}function X(){const ue=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ue}function L(){const ue=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ue}function B(){const ue=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ue}function z(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=pe,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function U(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=pe,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function G(ue){const pe=this.sliceSerialize(ue),Me=this.stack[this.stack.length-2];Me.label=uZ(pe),Me.identifier=Bo(pe).toLowerCase()}function Q(){const ue=this.stack[this.stack.length-1],pe=this.resume(),Me=this.stack[this.stack.length-1];if(this.data.inReference=!0,Me.type==="link"){const $e=ue.children;Me.children=$e}else Me.alt=pe}function j(){const ue=this.resume(),pe=this.stack[this.stack.length-1];pe.url=ue}function D(){const ue=this.resume(),pe=this.stack[this.stack.length-1];pe.title=ue}function $(){this.data.inReference=void 0}function q(){this.data.referenceType="collapsed"}function Y(ue){const pe=this.resume(),Me=this.stack[this.stack.length-1];Me.label=pe,Me.identifier=Bo(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function Z(ue){this.data.characterReferenceType=ue.type}function W(ue){const pe=this.sliceSerialize(ue),Me=this.data.characterReferenceType;let $e;Me?($e=iz(pe,Me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$e=T1(pe);const Ge=this.stack[this.stack.length-1];Ge.value+=$e}function te(ue){const pe=this.stack.pop();pe.position.end=na(ue.end)}function re(ue){K.call(this,ue);const pe=this.stack[this.stack.length-1];pe.url=this.sliceSerialize(ue)}function se(ue){K.call(this,ue);const pe=this.stack[this.stack.length-1];pe.url="mailto:"+this.sliceSerialize(ue)}function me(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function ve(){return{type:"inlineCode",value:""}}function we(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ke(){return{type:"emphasis",children:[]}}function Ne(){return{type:"heading",depth:0,children:[]}}function Oe(){return{type:"break"}}function Te(){return{type:"html",value:""}}function _t(){return{type:"image",title:null,url:"",alt:null}}function he(){return{type:"link",title:null,url:"",children:[]}}function ye(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function Ue(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function _e(){return{type:"paragraph",children:[]}}function Ie(){return{type:"strong",children:[]}}function Ve(){return{type:"text",value:""}}function jt(){return{type:"thematicBreak"}}}function na(e){return{line:e.line,column:e.column,offset:e.offset}}function mz(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?mz(e,i):hZ(e,i)}}function hZ(e,t){let n;for(n in t)if(pz.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function mM(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Cl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Cl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Cl({start:t.start,end:t.end})+") is still open")}function pZ(e){const t=this;t.parser=n;function n(i){return fZ(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function mZ(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 gZ(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
377
+ `}]}function yZ(e,t){const n=t.value?t.value+`
378
+ `:"",i={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(i.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function vZ(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xZ(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bZ(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=us(i.toLowerCase()),s=e.footnoteOrder.indexOf(i);let l,c=e.footnoteCounts.get(i);c===void 0?(c=0,e.footnoteOrder.push(i),l=e.footnoteOrder.length):l=s+1,c+=1,e.footnoteCounts.set(i,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function wZ(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 _Z(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function gz(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const o=e.all(t),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const l=o[o.length-1];return l&&l.type==="text"?l.value+=i:o.push({type:"text",value:i}),o}function SZ(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return gz(e,t);const o={src:us(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(o.title=i.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,s),e.applyData(t,s)}function EZ(e,t){const n={src:us(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 i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function CZ(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function NZ(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return gz(e,t);const o={href:us(i.url||"")};i.title!==null&&i.title!==void 0&&(o.title=i.title);const s={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function kZ(e,t){const n={href:us(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function TZ(e,t,n){const i=e.all(t),o=n?AZ(n):yz(t),s={},l=[];if(typeof t.checked=="boolean"){const p=i[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},i.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let c=-1;for(;++c<i.length;){const p=i[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
379
+ `}),p.type==="element"&&p.tagName==="p"&&!o?l.push(...p.children):l.push(p)}const f=i[i.length-1];f&&(o||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
380
+ `});const h={type:"element",tagName:"li",properties:s,children:l};return e.patch(t,h),e.applyData(t,h)}function AZ(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=yz(n[i])}return t}function yz(e){const t=e.spread;return t??e.children.length>1}function RZ(e,t){const n={},i=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<i.length;){const l=i[o];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function MZ(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jZ(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function OZ(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zZ(e,t){const n=e.all(t),i=n.shift(),o=[];if(i){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],l),o.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=E1(t.children[1]),f=ZO(t.children[t.children.length-1]);c&&f&&(l.position={start:c,end:f}),o.push(l)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,s),e.applyData(t,s)}function DZ(e,t,n){const i=n?n.children:void 0,s=(i?i.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let f=-1;const h=[];for(;++f<c;){const m=t.children[f],g={},v=l?l[f]:void 0;v&&(g.align=v);let _={type:"element",tagName:s,properties:g,children:[]};m&&(_.children=e.all(m),e.patch(m,_),_=e.applyData(m,_)),h.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function LZ(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const gM=9,yM=32;function qZ(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),o=0;const s=[];for(;i;)s.push(vM(t.slice(o,i.index),o>0,!0),i[0]),o=i.index+i[0].length,i=n.exec(t);return s.push(vM(t.slice(o),o>0,!1)),s.join("")}function vM(e,t,n){let i=0,o=e.length;if(t){let s=e.codePointAt(i);for(;s===gM||s===yM;)i++,s=e.codePointAt(i)}if(n){let s=e.codePointAt(o-1);for(;s===gM||s===yM;)o--,s=e.codePointAt(o-1)}return o>i?e.slice(i,o):""}function IZ(e,t){const n={type:"text",value:qZ(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function BZ(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const HZ={blockquote:mZ,break:gZ,code:yZ,delete:vZ,emphasis:xZ,footnoteReference:bZ,heading:wZ,html:_Z,imageReference:SZ,image:EZ,inlineCode:CZ,linkReference:NZ,link:kZ,listItem:TZ,list:RZ,paragraph:MZ,root:jZ,strong:OZ,table:zZ,tableCell:LZ,tableRow:DZ,text:IZ,thematicBreak:BZ,toml:Hc,yaml:Hc,definition:Hc,footnoteDefinition:Hc};function Hc(){}const vz=-1,dd=0,kl=1,Nf=2,M1=3,j1=4,O1=5,z1=6,xz=7,bz=8,xM=typeof self=="object"?self:globalThis,UZ=(e,t)=>{const n=(o,s)=>(e.set(s,o),o),i=o=>{if(e.has(o))return e.get(o);const[s,l]=t[o];switch(s){case dd:case vz:return n(l,o);case kl:{const c=n([],o);for(const f of l)c.push(i(f));return c}case Nf:{const c=n({},o);for(const[f,h]of l)c[i(f)]=i(h);return c}case M1:return n(new Date(l),o);case j1:{const{source:c,flags:f}=l;return n(new RegExp(c,f),o)}case O1:{const c=n(new Map,o);for(const[f,h]of l)c.set(i(f),i(h));return c}case z1:{const c=n(new Set,o);for(const f of l)c.add(i(f));return c}case xz:{const{name:c,message:f}=l;return n(new xM[c](f),o)}case bz:return n(BigInt(l),o);case"BigInt":return n(Object(BigInt(l)),o);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new xM[s](l),o)};return i},bM=e=>UZ(new Map,e)(0),Mo="",{toString:PZ}={},{keys:VZ}=Object,dl=e=>{const t=typeof e;if(t!=="object"||!e)return[dd,t];const n=PZ.call(e).slice(8,-1);switch(n){case"Array":return[kl,Mo];case"Object":return[Nf,Mo];case"Date":return[M1,Mo];case"RegExp":return[j1,Mo];case"Map":return[O1,Mo];case"Set":return[z1,Mo];case"DataView":return[kl,n]}return n.includes("Array")?[kl,n]:n.includes("Error")?[xz,n]:[Nf,n]},Uc=([e,t])=>e===dd&&(t==="function"||t==="symbol"),FZ=(e,t,n,i)=>{const o=(l,c)=>{const f=i.push(l)-1;return n.set(c,f),f},s=l=>{if(n.has(l))return n.get(l);let[c,f]=dl(l);switch(c){case dd:{let p=l;switch(f){case"bigint":c=bz,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);p=null;break;case"undefined":return o([vz],l)}return o([c,p],l)}case kl:{if(f){let g=l;return f==="DataView"?g=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(g=new Uint8Array(l)),o([f,[...g]],l)}const p=[],m=o([c,p],l);for(const g of l)p.push(s(g));return m}case Nf:{if(f)switch(f){case"BigInt":return o([f,l.toString()],l);case"Boolean":case"Number":case"String":return o([f,l.valueOf()],l)}if(t&&"toJSON"in l)return s(l.toJSON());const p=[],m=o([c,p],l);for(const g of VZ(l))(e||!Uc(dl(l[g])))&&p.push([s(g),s(l[g])]);return m}case M1:return o([c,l.toISOString()],l);case j1:{const{source:p,flags:m}=l;return o([c,{source:p,flags:m}],l)}case O1:{const p=[],m=o([c,p],l);for(const[g,v]of l)(e||!(Uc(dl(g))||Uc(dl(v))))&&p.push([s(g),s(v)]);return m}case z1:{const p=[],m=o([c,p],l);for(const g of l)(e||!Uc(dl(g)))&&p.push(s(g));return m}}const{message:h}=l;return o([c,{name:f,message:h}],l)};return s},wM=(e,{json:t,lossy:n}={})=>{const i=[];return FZ(!(t||n),!!t,new Map,i)(e),i},kf=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?bM(wM(e,t)):structuredClone(e):(e,t)=>bM(wM(e,t));function $Z(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 YZ(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function GZ(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||$Z,i=e.options.footnoteBackLabel||YZ,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const p=e.all(h),m=String(h.identifier).toUpperCase(),g=us(m.toLowerCase());let v=0;const _=[],E=e.footnoteCounts.get(m);for(;E!==void 0&&++v<=E;){_.length>0&&_.push({type:"text",value:" "});let N=typeof n=="string"?n:n(f,v);typeof N=="string"&&(N={type:"text",value:N}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+g+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,v),className:["data-footnote-backref"]},children:Array.isArray(N)?N:[N]})}const S=p[p.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const N=S.children[S.children.length-1];N&&N.type==="text"?N.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(..._)}else p.push(..._);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(p,!0)};e.patch(h,w),c.push(w)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...kf(l),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
381
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
382
+ `}]}}const wz=(function(e){if(e==null)return ZZ;if(typeof e=="function")return hd(e);if(typeof e=="object")return Array.isArray(e)?XZ(e):KZ(e);if(typeof e=="string")return QZ(e);throw new Error("Expected function, string, or object as test")});function XZ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=wz(e[n]);return hd(i);function i(...o){let s=-1;for(;++s<t.length;)if(t[s].apply(this,o))return!0;return!1}}function KZ(e){const t=e;return hd(n);function n(i){const o=i;let s;for(s in e)if(o[s]!==t[s])return!1;return!0}}function QZ(e){return hd(t);function t(n){return n&&n.type===e}}function hd(e){return t;function t(n,i,o){return!!(WZ(n)&&e.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function ZZ(){return!0}function WZ(e){return e!==null&&typeof e=="object"&&"type"in e}const _z=[],JZ=!0,_M=!1,eW="skip";function tW(e,t,n,i){let o;typeof t=="function"&&typeof n!="function"?(i=n,n=t):o=t;const s=wz(o),l=i?-1:1;c(e,void 0,[])();function c(f,h,p){const m=f&&typeof f=="object"?f:{};if(typeof m.type=="string"){const v=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(f.type+(v?"<"+v+">":""))+")"})}return g;function g(){let v=_z,_,E,S;if((!t||s(f,h,p[p.length-1]||void 0))&&(v=nW(n(f,p)),v[0]===_M))return v;if("children"in f&&f.children){const w=f;if(w.children&&v[0]!==eW)for(E=(i?w.children.length:-1)+l,S=p.concat(w);E>-1&&E<w.children.length;){const N=w.children[E];if(_=c(N,E,S)(),_[0]===_M)return _;E=typeof _[1]=="number"?_[1]:E+l}}return v}}}function nW(e){return Array.isArray(e)?e:typeof e=="number"?[JZ,e]:e==null?_z:[e]}function Sz(e,t,n,i){let o,s,l;typeof t=="function"&&typeof n!="function"?(s=void 0,l=t,o=n):(s=t,l=n,o=i),tW(e,s,c,o);function c(f,h){const p=h[h.length-1],m=p?p.children.indexOf(f):void 0;return l(f,m,p)}}const db={}.hasOwnProperty,rW={};function iW(e,t){const n=t||rW,i=new Map,o=new Map,s=new Map,l={...HZ,...n.handlers},c={all:h,applyData:oW,definitionById:i,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:l,one:f,options:n,patch:aW,wrap:lW};return Sz(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?i:o,g=String(p.identifier).toUpperCase();m.has(g)||m.set(g,p)}}),c;function f(p,m){const g=p.type,v=c.handlers[g];if(db.call(c.handlers,g)&&v)return v(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(g)){if("children"in p){const{children:E,...S}=p,w=kf(S);return w.children=c.all(p),w}return kf(p)}return(c.options.unknownHandler||sW)(c,p,m)}function h(p){const m=[];if("children"in p){const g=p.children;let v=-1;for(;++v<g.length;){const _=c.one(g[v],p);if(_){if(v&&g[v-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=SM(_.value)),!Array.isArray(_)&&_.type==="element")){const E=_.children[0];E&&E.type==="text"&&(E.value=SM(E.value))}Array.isArray(_)?m.push(..._):m.push(_)}}}return m}}function aW(e,t){e.position&&(t.position=PX(e))}function oW(e,t){let n=t;if(e&&e.data){const i=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const l="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:l}}n.type==="element"&&s&&Object.assign(n.properties,kf(s)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function sW(e,t){const n=t.data||{},i="value"in t&&!(db.call(n,"hProperties")||db.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function lW(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
383
+ `});++i<e.length;)i&&n.push({type:"text",value:`
384
+ `}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
385
+ `}),n}function SM(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function EM(e,t){const n=iW(e,t),i=n.one(e,void 0),o=GZ(n),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
386
+ `},o),s}function uW(e,t){return e&&"run"in e?async function(n,i){const o=EM(n,{file:i,...t});await e.run(o,i)}:function(n,i){return EM(n,{file:i,...e||t})}}function CM(e){if(e)throw e}var _x,NM;function cW(){if(NM)return _x;NM=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},s=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!m)return!1;var g;for(g in h);return typeof g>"u"||e.call(h,g)},l=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},c=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(i)return i(h,p).value}else return;return h[p]};return _x=function f(){var h,p,m,g,v,_,E=arguments[0],S=1,w=arguments.length,N=!1;for(typeof E=="boolean"&&(N=E,E=arguments[1]||{},S=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});S<w;++S)if(h=arguments[S],h!=null)for(p in h)m=c(E,p),g=c(h,p),E!==g&&(N&&g&&(s(g)||(v=o(g)))?(v?(v=!1,_=m&&o(m)?m:[]):_=m&&s(m)?m:{},l(E,{name:p,newValue:f(N,_,g)})):typeof g<"u"&&l(E,{name:p,newValue:g}));return E},_x}var fW=cW();const Sx=Hl(fW);function hb(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 dW(){const e=[],t={run:n,use:i};return t;function n(...o){let s=-1;const l=o.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...o);function c(f,...h){const p=e[++s];let m=-1;if(f){l(f);return}for(;++m<o.length;)(h[m]===null||h[m]===void 0)&&(h[m]=o[m]);o=h,p?hW(p,c)(...h):l(null,...h)}}function i(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function hW(e,t){let n;return i;function i(...l){const c=e.length>l.length;let f;c&&l.push(o);try{f=e.apply(this,l)}catch(h){const p=h;if(c&&n)throw p;return o(p)}c||(f&&f.then&&typeof f.then=="function"?f.then(s,o):f instanceof Error?o(f):s(f))}function o(l,...c){n||(n=!0,t(l,...c))}function s(l){o(null,l)}}const jr={basename:pW,dirname:mW,extname:gW,join:yW,sep:"/"};function pW(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');nu(e);let n=0,i=-1,o=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){n=o+1;break}}else i<0&&(s=!0,i=o+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let l=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){n=o+1;break}}else l<0&&(s=!0,l=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(i=o):(c=-1,i=l));return n===i?i=l:i<0&&(i=e.length),e.slice(n,i)}function mW(e){if(nu(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gW(e){nu(e);let t=e.length,n=-1,i=0,o=-1,s=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){i=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?o<0?o=t:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||n<0||s===0||s===1&&o===n-1&&o===i+1?"":e.slice(o,n)}function yW(...e){let t=-1,n;for(;++t<e.length;)nu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":vW(n)}function vW(e){nu(e);const t=e.codePointAt(0)===47;let n=xW(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function xW(e,t){let n="",i=0,o=-1,s=0,l=-1,c,f;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(o===l-1||s===1))if(o!==l-1&&s===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",i=0):(n=n.slice(0,f),i=n.length-1-n.lastIndexOf("/")),o=l,s=0;continue}}else if(n.length>0){n="",i=0,o=l,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(o+1,l):n=e.slice(o+1,l),i=l-o-1;o=l,s=0}else c===46&&s>-1?s++:s=-1}return n}function nu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const bW={cwd:wW};function wW(){return"/"}function pb(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function _W(e){if(typeof e=="string")e=new URL(e);else if(!pb(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 SW(e)}function SW(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Ex=["history","path","basename","stem","extname","dirname"];class Ez{constructor(t){let n;t?pb(t)?n={path:t}:typeof t=="string"||EW(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":bW.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Ex.length;){const s=Ex[i];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let o;for(o in n)Ex.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?jr.basename(this.path):void 0}set basename(t){Nx(t,"basename"),Cx(t,"basename"),this.path=jr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?jr.dirname(this.path):void 0}set dirname(t){kM(this.basename,"dirname"),this.path=jr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?jr.extname(this.path):void 0}set extname(t){if(Cx(t,"extname"),kM(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=jr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pb(t)&&(t=_W(t)),Nx(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?jr.basename(this.path,this.extname):void 0}set stem(t){Nx(t,"stem"),Cx(t,"stem"),this.path=jr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const o=this.message(t,n,i);throw o.fatal=!0,o}info(t,n,i){const o=this.message(t,n,i);return o.fatal=void 0,o}message(t,n,i){const o=new mn(t,n,i);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Cx(e,t){if(e&&e.includes(jr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+jr.sep+"`")}function Nx(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function kM(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function EW(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const CW=(function(e){const i=this.constructor.prototype,o=i[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),NW={}.hasOwnProperty;class D1 extends CW{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=dW()}copy(){const t=new D1;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Sx(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ax("data",this.frozen),this.namespace[t]=n,this):NW.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ax("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,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const o=n.call(t,...i);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Pc(t),i=this.parser||this.Parser;return kx("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),kx("process",this.parser||this.Parser),Tx("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(s,l){const c=Pc(t),f=i.parse(c);i.run(f,c,function(p,m,g){if(p||!m||!g)return h(p);const v=m,_=i.stringify(v,g);AW(_)?g.value=_:g.result=_,h(p,g)});function h(p,m){p||!m?l(p):s?s(m):n(void 0,m)}}}processSync(t){let n=!1,i;return this.freeze(),kx("processSync",this.parser||this.Parser),Tx("processSync",this.compiler||this.Compiler),this.process(t,o),AM("processSync","process",n),i;function o(s,l){n=!0,CM(s),i=l}}run(t,n,i){TM(t),this.freeze();const o=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?s(void 0,i):new Promise(s);function s(l,c){const f=Pc(n);o.run(t,f,h);function h(p,m,g){const v=m||t;p?c(p):l?l(v):i(void 0,v,g)}}}runSync(t,n){let i=!1,o;return this.run(t,n,s),AM("runSync","run",i),o;function s(l,c){CM(l),o=c,i=!0}}stringify(t,n){this.freeze();const i=Pc(n),o=this.compiler||this.Compiler;return Tx("stringify",o),TM(t),o(t,i)}use(t,...n){const i=this.attachers,o=this.namespace;if(Ax("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...m]=h;f(p,m)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(h.plugins),h.settings&&(o.settings=Sx(!0,o.settings,h.settings))}function c(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const m=h[p];s(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,p){let m=-1,g=-1;for(;++m<i.length;)if(i[m][0]===h){g=m;break}if(g===-1)i.push([h,...p]);else if(p.length>0){let[v,..._]=p;const E=i[g][1];hb(E)&&hb(v)&&(v=Sx(!0,E,v)),i[g]=[h,v,..._]}}}}const kW=new D1().freeze();function kx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Tx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ax(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 TM(e){if(!hb(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function AM(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Pc(e){return TW(e)?e:new Ez(e)}function TW(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function AW(e){return typeof e=="string"||RW(e)}function RW(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const MW="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",RM=[],MM={allowDangerousHtml:!0},jW=/^(https?|ircs?|mailto|xmpp)$/i,OW=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function zW(e){const t=DW(e),n=LW(e);return qW(t.runSync(t.parse(n),n),e)}function DW(e){const t=e.rehypePlugins||RM,n=e.remarkPlugins||RM,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...MM}:MM;return kW().use(pZ).use(n).use(uW,i).use(t)}function LW(e){const t=e.children||"",n=new Ez;return typeof t=="string"&&(n.value=t),n}function qW(e,t){const n=t.allowedElements,i=t.allowElement,o=t.components,s=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||IW;for(const p of OW)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+MW+p.id,void 0);return Sz(e,h),GX(e,{Fragment:b.Fragment,components:o,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0});function h(p,m,g){if(p.type==="raw"&&g&&typeof m=="number")return l?g.children.splice(m,1):g.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let v;for(v in xx)if(Object.hasOwn(xx,v)&&Object.hasOwn(p.properties,v)){const _=p.properties[v],E=xx[v];(E===null||E.includes(p.tagName))&&(p.properties[v]=f(String(_||""),v,p))}}if(p.type==="element"){let v=n?!n.includes(p.tagName):s?s.includes(p.tagName):!1;if(!v&&i&&typeof m=="number"&&(v=!i(p,m,g)),v&&g&&typeof m=="number")return c&&p.children?g.children.splice(m,1,...p.children):g.children.splice(m,1),m}}}function IW(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||i!==-1&&t>i||jW.test(e.slice(0,t))?e:""}function BW({message:e}){if(e.role==="system")return b.jsxs("div",{className:"flex items-center justify-center gap-1.5 py-2",children:[b.jsx(d3,{className:"h-3 w-3 text-muted-foreground"}),b.jsx("span",{className:"text-[11px] text-muted-foreground",children:e.content})]});const t=e.role==="user";return!t&&!e.content?null:t?b.jsx("div",{className:"flex justify-end",children:b.jsx("div",{className:"max-w-[85%] rounded-2xl bg-primary px-3 py-2 text-sm text-primary-foreground",children:b.jsx("p",{className:"whitespace-pre-wrap break-words leading-relaxed",children:e.content})})}):b.jsx("div",{className:"text-sm text-foreground",children:b.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none break-words leading-relaxed [&_p]:my-1 [&_ul]:my-1 [&_ol]:my-1 [&_li]:my-0 [&_h1]:text-base [&_h2]:text-sm [&_h3]:text-sm [&_pre]:text-xs [&_code]:text-xs",children:b.jsx(zW,{children:e.content})})})}function HW({onSend:e,disabled:t}){const[n,i]=T.useState(""),o=T.useRef(null),s=()=>{!n.trim()||t||(e(n.trim()),i(""),o.current&&(o.current.style.height="auto"))},l=f=>{f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),s())},c=()=>{const f=o.current;f&&(f.style.height="auto",f.style.height=`${Math.min(f.scrollHeight,150)}px`)};return b.jsx("div",{className:"border-t border-border p-3",children:b.jsxs("div",{className:"relative",children:[b.jsx("textarea",{ref:o,value:n,onChange:f=>i(f.target.value),onKeyDown:l,onInput:c,placeholder:"Ask about architecture...",rows:2,disabled:t,className:"w-full resize-none rounded-lg border border-border bg-muted px-3 py-2.5 pr-10 text-sm text-foreground placeholder:text-muted-foreground focus:border-primary focus:outline-none disabled:opacity-50",style:{maxHeight:150}}),b.jsx("button",{onClick:s,disabled:t||!n.trim(),"aria-label":"Send message",className:"absolute bottom-2.5 right-2.5 flex h-6 w-6 items-center justify-center rounded-full bg-primary text-primary-foreground transition-colors hover:bg-primary/90 disabled:opacity-30 disabled:cursor-not-allowed",children:b.jsx(Hq,{className:"h-3.5 w-3.5"})})]})})}function UW(e){const[t,n]=T.useState([]),[i,o]=T.useState(!1),[s,l]=T.useState([]),[c,f]=T.useState(!1),h=T.useRef(null),p=T.useRef(void 0),m=T.useRef(0),g=()=>(m.current+=1,`msg-${m.current}`),v=T.useCallback(N=>{if(!N.trim()||i)return;const C={id:g(),role:"user",content:N,timestamp:new Date},k=g(),M={id:k,role:"assistant",content:"",timestamp:new Date};n(R=>[...R,C,M]),o(!0),h.current=i2(e,N,R=>{n(O=>O.map(I=>I.id===k?{...I,content:I.content+R}:I))},R=>{R&&(p.current=R),o(!1)},R=>{n(O=>O.map(I=>I.id===k?{...I,content:`Error: ${R.message}`}:I)),o(!1)},{conversationId:p.current})},[e,i]),_=T.useCallback((N,C,k,M)=>{if(i)return;const O=`Explain the "${C}" ${k==="method"?"function":k==="module"?"module":k==="layer"?"layer":"service"}. What does it do, how does it fit into the architecture, and are there any concerns?`,I={id:g(),role:"user",content:O,timestamp:new Date},V=g(),K={id:V,role:"assistant",content:"",timestamp:new Date};n(H=>[...H,I,K]),o(!0),h.current=i2(e,O,H=>{n(F=>F.map(X=>X.id===V?{...X,content:X.content+H}:X))},H=>{H&&(p.current=H),o(!1)},H=>{n(F=>F.map(X=>X.id===V?{...X,content:`Error: ${H.message}`}:X)),o(!1)},{nodeContext:M,conversationId:p.current})},[e,i]),E=T.useCallback(()=>{h.current&&h.current.abort(),n([]),o(!1),p.current=void 0},[]),S=T.useCallback(async()=>{try{const N=await S8(e);l(N)}catch{}},[e]),w=T.useCallback(async N=>{if(!i){f(!0);try{const C=await E8(e,N);p.current=N,n(C.messages.map(k=>({id:k.id,role:k.role,content:k.content,timestamp:new Date(k.createdAt)})))}catch{}finally{f(!1)}}},[e,i]);return{messages:t,isStreaming:i,isLoadingHistory:c,conversationList:s,sendMessage:v,explainNode:_,newConversation:E,fetchConversations:S,loadConversation:w}}function PW({repoId:e,explainRequest:t,onExplainHandled:n}){const{messages:i,isStreaming:o,isLoadingHistory:s,conversationList:l,sendMessage:c,explainNode:f,newConversation:h,fetchConversations:p,loadConversation:m}=UW(e),g=T.useRef(null),v=T.useRef(null),[_,E]=T.useState(!1),S=i[i.length-1];T.useEffect(()=>{v.current&&(v.current.scrollTop=v.current.scrollHeight)},[S==null?void 0:S.content,i.length]),T.useEffect(()=>{t&&t.nodeId!==g.current&&(g.current=t.nodeId,f(t.nodeId,t.nodeName,t.nodeType,t.nodeContext),n==null||n())},[t,f,n]);const w=M=>{c(M)},N=()=>{p(),E(!0)},C=M=>{m(M),E(!1)},k=()=>{h(),E(!1)};return _?b.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[b.jsxs("div",{className:"flex items-center gap-2 border-b border-border px-3 py-2",children:[b.jsx("button",{onClick:()=>E(!1),className:"flex items-center justify-center rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground","aria-label":"Back to chat",children:b.jsx(s3,{className:"h-4 w-4"})}),b.jsx("span",{className:"text-sm font-medium text-foreground",children:"Conversations"})]}),b.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:l.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[b.jsx(Ix,{className:"mb-3 h-8 w-8 text-muted-foreground"}),b.jsx("p",{className:"text-sm text-muted-foreground",children:"No conversations yet"})]}):b.jsx("div",{className:"divide-y divide-border",children:l.map(M=>b.jsxs("button",{onClick:()=>C(M.id),className:"w-full px-3 py-2.5 text-left transition-colors hover:bg-accent",children:[b.jsx("p",{className:"truncate text-sm text-foreground",children:M.preview}),b.jsx("p",{className:"mt-0.5 text-[10px] text-muted-foreground",children:new Date(M.updatedAt).toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})})]},M.id))})})]}):b.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[b.jsxs("div",{className:"flex items-center justify-end gap-1 border-b border-border px-2 py-1.5",children:[b.jsx("button",{onClick:k,className:"flex items-center justify-center rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground","aria-label":"New conversation",title:"New conversation",children:b.jsx(y3,{className:"h-4 w-4"})}),b.jsx("button",{onClick:N,className:"flex items-center justify-center rounded-md p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground","aria-label":"Conversation history",title:"Conversation history",children:b.jsx(Ix,{className:"h-4 w-4"})})]}),b.jsx("div",{ref:v,className:"min-h-0 flex-1 overflow-y-auto",children:b.jsxs("div",{className:"space-y-3 p-3",children:[s?b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsx(sr,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):i.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[b.jsx(Jo,{className:"mb-3 h-8 w-8 text-muted-foreground"}),b.jsx("p",{className:"text-sm font-medium text-foreground",children:"Architecture Chat"}),b.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Ask questions about your codebase architecture"})]}):i.map(M=>b.jsx(BW,{message:M},M.id)),o&&(()=>{const M=[...i].reverse().find(O=>O.role==="assistant"),R=!!(M!=null&&M.content);return b.jsx("div",{className:"flex items-center gap-2 py-1 text-xs text-muted-foreground",children:R?b.jsxs("span",{className:"inline-flex gap-0.5",children:[b.jsx("span",{className:"h-1 w-1 animate-bounce rounded-full bg-muted-foreground [animation-delay:0ms]"}),b.jsx("span",{className:"h-1 w-1 animate-bounce rounded-full bg-muted-foreground [animation-delay:150ms]"}),b.jsx("span",{className:"h-1 w-1 animate-bounce rounded-full bg-muted-foreground [animation-delay:300ms]"})]}):b.jsxs(b.Fragment,{children:[b.jsx(sr,{className:"h-3 w-3 animate-spin"}),"Thinking..."]})})})()]})}),b.jsx(HW,{onSend:w,disabled:o})]})}const VW={api:"Routes & Controllers",service:"Business Logic",data:"Database & ORM",external:"HTTP Clients"};function FW({depthLevel:e,serviceTypes:t,frameworks:n,layerTypes:i,hasDatabases:o,onFilterChange:s}){const[l,c]=T.useState(!1),[f,h]=T.useState({excludedTypes:new Set,excludedFrameworks:new Set,excludedLayers:new Set,searchQuery:"",showDatabases:!0}),p=S=>{h(S),s(S)},m=(S,w)=>{const N=new Set(S);return N.has(w)?N.delete(w):N.add(w),N},g=f.excludedTypes.size>0||f.excludedFrameworks.size>0||f.excludedLayers.size>0||f.searchQuery.length>0||!f.showDatabases,v=f.excludedTypes.size+f.excludedFrameworks.size+f.excludedLayers.size+(f.searchQuery?1:0)+(f.showDatabases?0:1),_=e!=="services"&&i.length>0,E=e==="services"?"Search services...":e==="methods"?"Search functions...":e==="modules"?"Search modules...":"Search...";return b.jsxs("div",{className:"absolute left-4 top-3 z-10",children:[b.jsxs("button",{onClick:()=>c(!l),className:"flex items-center gap-1.5 rounded-md border border-border bg-card px-3 py-1.5 text-xs font-medium shadow-sm text-muted-foreground hover:text-foreground transition-colors",children:[b.jsx(Yq,{className:"h-3.5 w-3.5"}),"Filters",g&&b.jsx("span",{className:"ml-1 flex h-4 w-4 items-center justify-center rounded-full bg-primary text-[10px] text-primary-foreground",children:v})]}),l&&b.jsxs("div",{className:"mt-1.5 w-56 rounded-md border border-border bg-card p-2.5 shadow-lg max-h-[calc(100vh-120px)] overflow-y-auto",children:[b.jsxs("div",{className:"relative mb-2",children:[b.jsx(r6,{className:"absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-muted-foreground"}),b.jsx(F3,{type:"text",value:f.searchQuery,onChange:S=>p({...f,searchQuery:S.target.value}),placeholder:E,className:"h-7 pl-7 text-[11px]"})]}),(t.length>0||o)&&b.jsxs("div",{className:"mb-2",children:[b.jsx("h4",{className:"mb-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:"Type"}),b.jsxs("div",{className:"space-y-0.5",children:[t.map(S=>b.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 rounded px-1 py-0.5 text-[11px] text-foreground hover:bg-muted/50",children:[b.jsx("input",{type:"checkbox",checked:!f.excludedTypes.has(S),onChange:()=>p({...f,excludedTypes:m(f.excludedTypes,S)}),className:"rounded border-border accent-primary h-3 w-3"}),S]},S)),o&&b.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 rounded px-1 py-0.5 text-[11px] text-foreground hover:bg-muted/50",children:[b.jsx("input",{type:"checkbox",checked:f.showDatabases,onChange:()=>p({...f,showDatabases:!f.showDatabases}),className:"rounded border-border accent-primary h-3 w-3"}),"database"]})]})]}),n.length>0&&b.jsxs("div",{className:"mb-2",children:[b.jsx("h4",{className:"mb-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:"Framework"}),b.jsx("div",{className:"space-y-0.5",children:n.map(S=>b.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 rounded px-1 py-0.5 text-[11px] text-foreground hover:bg-muted/50",children:[b.jsx("input",{type:"checkbox",checked:!f.excludedFrameworks.has(S),onChange:()=>p({...f,excludedFrameworks:m(f.excludedFrameworks,S)}),className:"rounded border-border accent-primary h-3 w-3"}),S]},S))})]}),_&&b.jsxs("div",{children:[b.jsx("h4",{className:"mb-1 text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:"Layer"}),b.jsx("div",{className:"space-y-0.5",children:i.map(S=>b.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 rounded px-1 py-0.5 text-[11px] text-foreground hover:bg-muted/50",children:[b.jsx("input",{type:"checkbox",checked:!f.excludedLayers.has(S),onChange:()=>p({...f,excludedLayers:m(f.excludedLayers,S)}),className:"rounded border-border accent-primary h-3 w-3"}),VW[S]||S]},S))})]})]})]})}function $W(e,t,n="services"){const[i,o]=T.useState([]),[s,l]=T.useState([]),[c,f]=T.useState(void 0),[h,p]=T.useState(!0),[m,g]=T.useState(null),v=T.useCallback(async()=>{if(e){p(!0),g(null);try{const _=await m8(e,{branch:t,level:n});if(n==="modules"||n==="methods"){const E=_.nodes.map(w=>w.type==="databaseNode"?{id:w.id,type:"database",position:w.position,data:{label:w.data.label,databaseType:w.data.databaseType||w.data.serviceType,tableCount:w.data.tableCount??w.data.fileCount??0,connectedServices:w.data.connectedServices||[],framework:w.data.framework}}:w.type==="methodNode"?{id:w.id,type:"method",position:w.position,parentId:w.parentId,extent:w.extent,style:w.style,data:{...w.data,filePath:w.data.rootPath||""}}:w.type==="moduleNode"?{id:w.id,type:"module",position:w.position,parentId:w.parentId,extent:w.extent,style:w.style,data:{label:w.data.label,moduleKind:w.data.moduleKind||w.data.serviceType||"standalone",methodCount:w.data.methodCount??w.data.fileCount??0,propertyCount:w.data.propertyCount,importCount:w.data.importCount,exportCount:w.data.exportCount,superClass:w.data.superClass,layerColor:w.data.layerColor||"#6b7280",isDead:w.data.isDead||!1,isContainer:w.data.isContainer||!1,violations:w.data.violations,filePath:w.data.rootPath||""}}:w.type==="layerNode"?{id:w.id,type:"layer",position:w.position,parentId:w.parentId,extent:w.extent,style:w.style,data:{label:w.data.label,layer:w.data.label,fileCount:w.data.fileCount||0,layerColor:w.data.layerColor||"#6b7280",fileNames:w.data.fileNames||[],filePaths:w.data.filePaths||[],isContainer:w.data.isContainer||!1,violations:w.data.violations||[]}}:{id:w.id,type:"serviceGroup",position:w.position,style:w.style,data:{label:w.data.label,description:w.data.description,serviceType:w.data.serviceType||"unknown",framework:w.data.framework,fileCount:w.data.fileCount||0,layers:w.data.layers||[],rootPath:w.data.rootPath||"",violations:w.data.violations||[]}}),S=_.edges.map(w=>({id:w.id,source:w.source,target:w.target,sourceHandle:w.sourceHandle,targetHandle:w.targetHandle,type:w.data.dependencyType==="database"?"database":"intraLayer",data:{label:"",dependencyCount:w.data.dependencyCount||0,hasHttpCalls:w.data.dependencyType==="http",isViolation:w.data.isViolation||!1,violationReason:w.data.violationReason}}));o(E),l(S),f(_.collapsedIds)}else{const E=_.nodes.map(w=>w.type==="databaseNode"?{id:w.id,type:"database",position:w.position,data:{label:w.data.label,databaseType:w.data.databaseType||w.data.serviceType,tableCount:w.data.tableCount??w.data.fileCount??0,connectedServices:w.data.connectedServices||[],framework:w.data.framework}}:{id:w.id,type:"service",position:w.position,data:{label:w.data.label,description:w.data.description,serviceInfo:{type:w.data.serviceType||"unknown",framework:w.data.framework||null,fileCount:w.data.fileCount||0,layers:(w.data.layers||[]).map(N=>({layer:N,confidence:1,evidence:[]})),rootPath:w.data.rootPath??""},insightCount:0,hasHighSeverity:!1}}),S=_.edges.map(w=>({id:w.id,source:w.source,target:w.target,sourceHandle:w.sourceHandle,targetHandle:w.targetHandle,type:w.data.dependencyType==="database"?"database":"dependency",data:{label:w.data.dependencyType==="http"?`${w.data.dependencyCount||0} HTTP call${(w.data.dependencyCount||0)!==1?"s":""}`:w.data.dependencyType==="database"?"":`${w.data.dependencyCount||0} import${(w.data.dependencyCount||0)!==1?"s":""}`,dependencyCount:w.data.dependencyCount||0,hasHttpCalls:w.data.dependencyType==="http"}}));o(E),l(S),f(_.collapsedIds)}}catch(_){g(_ instanceof Error?_.message:"Failed to fetch graph")}finally{p(!1)}}},[e,t,n]);return T.useEffect(()=>{v()},[v]),{nodes:i,edges:s,savedCollapsedIds:c,isLoading:h,error:m,refetch:v,setNodes:o,setEdges:l}}const Br=Object.create(null);Br.open="0";Br.close="1";Br.ping="2";Br.pong="3";Br.message="4";Br.upgrade="5";Br.noop="6";const rf=Object.create(null);Object.keys(Br).forEach(e=>{rf[Br[e]]=e});const mb={type:"error",data:"parser error"},Cz=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Nz=typeof ArrayBuffer=="function",kz=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,L1=({type:e,data:t},n,i)=>Cz&&t instanceof Blob?n?i(t):jM(t,i):Nz&&(t instanceof ArrayBuffer||kz(t))?n?i(t):jM(new Blob([t]),i):i(Br[e]+(t||"")),jM=(e,t)=>{const n=new FileReader;return n.onload=function(){const i=n.result.split(",")[1];t("b"+(i||""))},n.readAsDataURL(e)};function OM(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Rx;function YW(e,t){if(Cz&&e.data instanceof Blob)return e.data.arrayBuffer().then(OM).then(t);if(Nz&&(e.data instanceof ArrayBuffer||kz(e.data)))return t(OM(e.data));L1(e,!1,n=>{Rx||(Rx=new TextEncoder),t(Rx.encode(n))})}const zM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<zM.length;e++)bl[zM.charCodeAt(e)]=e;const GW=e=>{let t=e.length*.75,n=e.length,i,o=0,s,l,c,f;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),p=new Uint8Array(h);for(i=0;i<n;i+=4)s=bl[e.charCodeAt(i)],l=bl[e.charCodeAt(i+1)],c=bl[e.charCodeAt(i+2)],f=bl[e.charCodeAt(i+3)],p[o++]=s<<2|l>>4,p[o++]=(l&15)<<4|c>>2,p[o++]=(c&3)<<6|f&63;return h},XW=typeof ArrayBuffer=="function",q1=(e,t)=>{if(typeof e!="string")return{type:"message",data:Tz(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:KW(e.substring(1),t)}:rf[n]?e.length>1?{type:rf[n],data:e.substring(1)}:{type:rf[n]}:mb},KW=(e,t)=>{if(XW){const n=GW(e);return Tz(n,t)}else return{base64:!0,data:e}},Tz=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Az="",QW=(e,t)=>{const n=e.length,i=new Array(n);let o=0;e.forEach((s,l)=>{L1(s,!1,c=>{i[l]=c,++o===n&&t(i.join(Az))})})},ZW=(e,t)=>{const n=e.split(Az),i=[];for(let o=0;o<n.length;o++){const s=q1(n[o],t);if(i.push(s),s.type==="error")break}return i};function WW(){return new TransformStream({transform(e,t){YW(e,n=>{const i=n.length;let o;if(i<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,i);else if(i<65536){o=new Uint8Array(3);const s=new DataView(o.buffer);s.setUint8(0,126),s.setUint16(1,i)}else{o=new Uint8Array(9);const s=new DataView(o.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(i))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Mx;function Vc(e){return e.reduce((t,n)=>t+n.length,0)}function Fc(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let i=0;for(let o=0;o<t;o++)n[o]=e[0][i++],i===e[0].length&&(e.shift(),i=0);return e.length&&i<e[0].length&&(e[0]=e[0].slice(i)),n}function JW(e,t){Mx||(Mx=new TextDecoder);const n=[];let i=0,o=-1,s=!1;return new TransformStream({transform(l,c){for(n.push(l);;){if(i===0){if(Vc(n)<1)break;const f=Fc(n,1);s=(f[0]&128)===128,o=f[0]&127,o<126?i=3:o===126?i=1:i=2}else if(i===1){if(Vc(n)<2)break;const f=Fc(n,2);o=new DataView(f.buffer,f.byteOffset,f.length).getUint16(0),i=3}else if(i===2){if(Vc(n)<8)break;const f=Fc(n,8),h=new DataView(f.buffer,f.byteOffset,f.length),p=h.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(mb);break}o=p*Math.pow(2,32)+h.getUint32(4),i=3}else{if(Vc(n)<o)break;const f=Fc(n,o);c.enqueue(q1(s?f:Mx.decode(f),t)),i=0}if(o===0||o>e){c.enqueue(mb);break}}}})}const Rz=4;function Zt(e){if(e)return eJ(e)}function eJ(e){for(var t in Zt.prototype)e[t]=Zt.prototype[t];return e}Zt.prototype.on=Zt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Zt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Zt.prototype.off=Zt.prototype.removeListener=Zt.prototype.removeAllListeners=Zt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var i,o=0;o<n.length;o++)if(i=n[o],i===t||i.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Zt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){n=n.slice(0);for(var i=0,o=n.length;i<o;++i)n[i].apply(this,t)}return this};Zt.prototype.emitReserved=Zt.prototype.emit;Zt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Zt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const pd=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ir=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),tJ="arraybuffer";function Mz(e,...t){return t.reduce((n,i)=>(e.hasOwnProperty(i)&&(n[i]=e[i]),n),{})}const nJ=ir.setTimeout,rJ=ir.clearTimeout;function md(e,t){t.useNativeTimers?(e.setTimeoutFn=nJ.bind(ir),e.clearTimeoutFn=rJ.bind(ir)):(e.setTimeoutFn=ir.setTimeout.bind(ir),e.clearTimeoutFn=ir.clearTimeout.bind(ir))}const iJ=1.33;function aJ(e){return typeof e=="string"?oJ(e):Math.ceil((e.byteLength||e.size)*iJ)}function oJ(e){let t=0,n=0;for(let i=0,o=e.length;i<o;i++)t=e.charCodeAt(i),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(i++,n+=4);return n}function jz(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function sJ(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function lJ(e){let t={},n=e.split("&");for(let i=0,o=n.length;i<o;i++){let s=n[i].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class uJ extends Error{constructor(t,n,i){super(t),this.description=n,this.context=i,this.type="TransportError"}}class I1 extends Zt{constructor(t){super(),this.writable=!1,md(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,i){return super.emitReserved("error",new uJ(t,n,i)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=q1(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=sJ(t);return n.length?"?"+n:""}}class cJ extends I1{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||n()})),this.writable||(i++,this.once("drain",function(){--i||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};ZW(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,QW(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=jz()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Oz=!1;try{Oz=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const fJ=Oz;function dJ(){}class hJ extends cJ{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let i=location.port;i||(i=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,n){const i=this.request({method:"POST",data:t});i.on("success",n),i.on("error",(o,s)=>{this.onError("xhr post error",o,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,i)=>{this.onError("xhr poll error",n,i)}),this.pollXhr=t}}class qr extends Zt{constructor(t,n,i){super(),this.createRequest=t,md(this,i),this._opts=i,this._method=i.method||"GET",this._uri=n,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;const n=Mz(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const i=this._xhr=this.createRequest(n);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&i.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var o;i.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=qr.requestsCount++,qr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=dJ,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete qr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}qr.requestsCount=0;qr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",DM);else if(typeof addEventListener=="function"){const e="onpagehide"in ir?"pagehide":"unload";addEventListener(e,DM,!1)}}function DM(){for(let e in qr.requests)qr.requests.hasOwnProperty(e)&&qr.requests[e].abort()}const pJ=(function(){const e=zz({xdomain:!1});return e&&e.responseType!==null})();class mJ extends hJ{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=pJ&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new qr(zz,this.uri(),t)}}function zz(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||fJ))return new XMLHttpRequest}catch{}if(!t)try{return new ir[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Dz=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class gJ extends I1{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,i=Dz?{}:Mz(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,i)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const i=t[n],o=n===t.length-1;L1(i,this.supportsBinary,s=>{try{this.doWrite(i,s)}catch{}o&&pd(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=jz()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const jx=ir.WebSocket||ir.MozWebSocket;class yJ extends gJ{createSocket(t,n,i){return Dz?new jx(t,n,i):n?new jx(t,n):new jx(t)}doWrite(t,n){this.ws.send(n)}}class vJ extends I1{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=JW(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(n).getReader(),o=WW();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const s=()=>{i.read().then(({done:c,value:f})=>{c||(this.onPacket(f),s())}).catch(c=>{})};s();const l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const i=t[n],o=n===t.length-1;this._writer.write(i).then(()=>{o&&pd(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const xJ={websocket:yJ,webtransport:vJ,polling:mJ},bJ=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,wJ=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gb(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),i=e.indexOf("]");n!=-1&&i!=-1&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));let o=bJ.exec(e||""),s={},l=14;for(;l--;)s[wJ[l]]=o[l]||"";return n!=-1&&i!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=_J(s,s.path),s.queryKey=SJ(s,s.query),s}function _J(e,t){const n=/\/{2,9}/g,i=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function SJ(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,o,s){o&&(n[o]=s)}),n}const yb=typeof addEventListener=="function"&&typeof removeEventListener=="function",af=[];yb&&addEventListener("offline",()=>{af.forEach(e=>e())},!1);class oa extends Zt{constructor(t,n){if(super(),this.binaryType=tJ,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const i=gb(t);n.hostname=i.host,n.secure=i.protocol==="https"||i.protocol==="wss",n.port=i.port,i.query&&(n.query=i.query)}else n.host&&(n.hostname=gb(n.host).host);md(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(i=>{const o=i.prototype.name;this.transports.push(o),this._transportsByName[o]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=lJ(this.opts.query)),yb&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},af.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Rz,n.transport=t,this.id&&(n.sid=this.id);const i=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&oa.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",oa.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let i=0;i<this.writeBuffer.length;i++){const o=this.writeBuffer[i].data;if(o&&(n+=aJ(o)),i>0&&n>this._maxPayload)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,pd(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,i){return this._sendPacket("message",t,n,i),this}send(t,n,i){return this._sendPacket("message",t,n,i),this}_sendPacket(t,n,i,o){if(typeof n=="function"&&(o=n,n=void 0),typeof i=="function"&&(o=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const s={type:t,data:n,options:i};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},i=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(oa.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),yb&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const i=af.indexOf(this._offlineEventListener);i!==-1&&af.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}oa.protocol=Rz;class EJ extends oa{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),i=!1;oa.priorWebsocketSuccess=!1;const o=()=>{i||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!i)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;oa.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const g=new Error("probe error");g.transport=n.name,this.emitReserved("upgradeError",g)}}))};function s(){i||(i=!0,p(),n.close(),n=null)}const l=m=>{const g=new Error("probe error: "+m);g.transport=n.name,s(),this.emitReserved("upgradeError",g)};function c(){l("transport closed")}function f(){l("socket closed")}function h(m){n&&m.name!==n.name&&s()}const p=()=>{n.removeListener("open",o),n.removeListener("error",l),n.removeListener("close",c),this.off("close",f),this.off("upgrading",h)};n.once("open",o),n.once("error",l),n.once("close",c),this.once("close",f),this.once("upgrading",h),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{i||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&n.push(t[i]);return n}}let CJ=class extends EJ{constructor(t,n={}){const i=typeof t=="object"?t:n;(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(o=>xJ[o]).filter(o=>!!o)),super(t,i)}};function NJ(e,t="",n){let i=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),i=gb(e)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const s=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+s+":"+i.port+t,i.href=i.protocol+"://"+s+(n&&n.port===i.port?"":":"+i.port),i}const kJ=typeof ArrayBuffer=="function",TJ=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Lz=Object.prototype.toString,AJ=typeof Blob=="function"||typeof Blob<"u"&&Lz.call(Blob)==="[object BlobConstructor]",RJ=typeof File=="function"||typeof File<"u"&&Lz.call(File)==="[object FileConstructor]";function B1(e){return kJ&&(e instanceof ArrayBuffer||TJ(e))||AJ&&e instanceof Blob||RJ&&e instanceof File}function of(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,i=e.length;n<i;n++)if(of(e[n]))return!0;return!1}if(B1(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return of(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&of(e[n]))return!0;return!1}function MJ(e){const t=[],n=e.data,i=e;return i.data=vb(n,t),i.attachments=t.length,{packet:i,buffers:t}}function vb(e,t){if(!e)return e;if(B1(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=vb(e[i],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=vb(e[i],t));return n}return e}function jJ(e,t){return e.data=xb(e.data,t),delete e.attachments,e}function xb(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=xb(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=xb(e[n],t));return e}const OJ=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ut;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(ut||(ut={}));class zJ{constructor(t){this.replacer=t}encode(t){return(t.type===ut.EVENT||t.type===ut.ACK)&&of(t)?this.encodeAsBinary({type:t.type===ut.EVENT?ut.BINARY_EVENT:ut.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ut.BINARY_EVENT||t.type===ut.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=MJ(t),i=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(i),o}}class H1 extends Zt{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const i=n.type===ut.BINARY_EVENT;i||n.type===ut.BINARY_ACK?(n.type=i?ut.EVENT:ut.ACK,this.reconstructor=new DJ(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(B1(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const i={type:Number(t.charAt(0))};if(ut[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===ut.BINARY_EVENT||i.type===ut.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const l=t.substring(s,n);if(l!=Number(l)||t.charAt(n)!=="-")throw new Error("Illegal attachments");i.attachments=Number(l)}if(t.charAt(n+1)==="/"){const s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););i.nsp=t.substring(s,n)}else i.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const s=n+1;for(;++n;){const l=t.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===t.length)break}i.id=Number(t.substring(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(H1.isPayloadValid(i.type,s))i.data=s;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case ut.CONNECT:return LM(n);case ut.DISCONNECT:return n===void 0;case ut.CONNECT_ERROR:return typeof n=="string"||LM(n);case ut.EVENT:case ut.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&OJ.indexOf(n[0])===-1);case ut.ACK:case ut.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class DJ{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=jJ(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function LM(e){return Object.prototype.toString.call(e)==="[object Object]"}const LJ=Object.freeze(Object.defineProperty({__proto__:null,Decoder:H1,Encoder:zJ,get PacketType(){return ut}},Symbol.toStringTag,{value:"Module"}));function vr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const qJ=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class qz extends Zt{constructor(t,n,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[vr(t,"open",this.onopen.bind(this)),vr(t,"packet",this.onpacket.bind(this)),vr(t,"error",this.onerror.bind(this)),vr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var i,o,s;if(qJ.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const l={type:ut.EVENT,data:n};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),l.id=p}const c=(o=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||o===void 0?void 0:o.writable,f=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!c||(f?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(t,n){var i;const o=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),l=(...c)=>{this.io.clearTimeoutFn(s),n.apply(this,c)};l.withError=!0,this.acks[t]=l}emitWithAck(t,...n){return new Promise((i,o)=>{const s=(l,c)=>l?o(l):i(c);s.withError=!0,n.push(s),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...s)=>(this._queue[0],o!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...s)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ut.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(i=>String(i.id)===t)){const i=this.acks[t];delete this.acks[t],i.withError&&i.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ut.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ut.EVENT:case ut.BINARY_EVENT:this.onevent(t);break;case ut.ACK:case ut.BINARY_ACK:this.onack(t);break;case ut.DISCONNECT:this.ondisconnect();break;case ut.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const i of n)i.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let i=!1;return function(...o){i||(i=!0,n.packet({type:ut.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ut.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const i of n)i.apply(this,t.data)}}}function cs(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}cs.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};cs.prototype.reset=function(){this.attempts=0};cs.prototype.setMin=function(e){this.ms=e};cs.prototype.setMax=function(e){this.max=e};cs.prototype.setJitter=function(e){this.jitter=e};class bb extends Zt{constructor(t,n){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,md(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((i=n.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new cs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||LJ;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new CJ(this.uri,this.opts);const n=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const o=vr(n,"open",function(){i.onopen(),t&&t()}),s=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},l=vr(n,"error",s);if(this._timeout!==!1){const c=this._timeout,f=this.setTimeoutFn(()=>{o(),s(new Error("timeout")),n.close()},c);this.opts.autoUnref&&f.unref(),this.subs.push(()=>{this.clearTimeoutFn(f)})}return this.subs.push(o),this.subs.push(l),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(vr(t,"ping",this.onping.bind(this)),vr(t,"data",this.ondata.bind(this)),vr(t,"error",this.onerror.bind(this)),vr(t,"close",this.onclose.bind(this)),vr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){pd(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new qz(this,t,n),this.nsps[t]=i),i}_destroy(t){const n=Object.keys(this.nsps);for(const i of n)if(this.nsps[i].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let i=0;i<n.length;i++)this.engine.write(n[i],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var i;this.cleanup(),(i=this.engine)===null||i===void 0||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const hl={};function sf(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=NJ(e,t.path||"/socket.io"),i=n.source,o=n.id,s=n.path,l=hl[o]&&s in hl[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let f;return c?f=new bb(i,t):(hl[o]||(hl[o]=new bb(i,t)),f=hl[o]),n.query&&!t.query&&(t.query=n.queryKey),f.socket(n.path,t)}Object.assign(sf,{Manager:bb,Socket:qz,io:sf,connect:sf});const IJ=$3()||(typeof window<"u"?window.location.origin:"");let ja=null;function U1(){return ja||(ja=sf(IJ,{autoConnect:!1,reconnection:!0,reconnectionAttempts:10,reconnectionDelay:1e3,reconnectionDelayMax:5e3,transports:["websocket","polling"]})),ja}function BJ(){const e=U1();return e.connected||e.connect(),e}function HJ(){ja!=null&&ja.connected&&ja.disconnect()}function qM(e){const t=U1();t.connected&&t.emit("joinRepo",e)}function UJ(e){const t=U1();t.connected&&t.emit("leaveRepo",e)}function PJ(e){const[t,n]=T.useState(!1),[i,o]=T.useState(null),s=T.useRef(new Map);T.useEffect(()=>{const c=BJ();function f(){n(!0),e&&qM(e)}function h(){n(!1)}function p(g){g.percent>=100?o(null):o(g)}function m(g){var v;o(null),(v=s.current.get("analysis:complete"))==null||v.forEach(_=>_(g))}return c.on("connect",f),c.on("disconnect",h),c.on("analysis:progress",p),c.on("analysis:complete",m),c.on("files:changed",g=>{var v;(v=s.current.get("files:changed"))==null||v.forEach(_=>_(g))}),c.on("violations:ready",g=>{var v;o(null),(v=s.current.get("violations:ready"))==null||v.forEach(_=>_(g))}),c.connected&&e&&qM(e),()=>{e&&UJ(e),c.off("connect",f),c.off("disconnect",h),c.off("analysis:progress",p),c.off("analysis:complete",m),HJ()}},[e]);const l=T.useCallback((c,f)=>{const h=s.current.get(c)||[];return h.push(f),s.current.set(c,h),()=>{const p=s.current.get(c)||[];s.current.set(c,p.filter(m=>m!==f))}},[]);return{isConnected:t,analysisProgress:i,onEvent:l}}function VJ(e,t){const[n,i]=T.useState([]),[o,s]=T.useState(!0),[l,c]=T.useState(null),f=T.useCallback(async()=>{if(e){s(!0),c(null);try{const p=await v8(e);i(p)}catch(p){c(p instanceof Error?p.message:"Failed to fetch insights")}finally{s(!1)}}},[e]);return T.useEffect(()=>{f()},[f]),{insights:T.useMemo(()=>{const p={critical:0,high:1,medium:2,low:3,info:4},m={service:0,module:1,function:2,database:3},g=[...n].sort((v,_)=>{const E=(p[v.severity]??5)-(p[_.severity]??5);if(E!==0)return E;const S=(m[v.type]??9)-(m[_.type]??9);return S!==0?S:new Date(_.createdAt).getTime()-new Date(v.createdAt).getTime()});return t?g.filter(v=>v.targetServiceId===t||v.targetDatabaseId===t||v.targetModuleId===t||v.targetMethodId===t):g},[n,t]),allInsights:n,isLoading:o,error:l,refetch:f}}function FJ(e){const[t,n]=T.useState(null),[i,o]=T.useState(!1),[s,l]=T.useState(null),c=T.useCallback(async()=>{o(!0),l(null);try{const p=await w8(e);n(p)}catch(p){p instanceof qb&&p.status===409?l("Switch to Normal mode and run an analysis first"):l(p instanceof Error?p.message:"Diff check failed"),n(null)}finally{o(!1)}},[e]),f=T.useCallback(async()=>{l(null);try{const p=await _8(e);n(p)}catch(p){l(p instanceof Error?p.message:"Failed to load diff check"),n(null)}},[e]),h=T.useCallback(()=>{n(null),l(null)},[]);return{diffResult:t,isChecking:i,error:s,run:c,load:f,clear:h}}function $J(e){const t=es(YJ,e).current;return t.next=e,lr(t.effect),t}function YJ(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const GJ={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},XJ={...GJ,position:"fixed",top:0,left:0},IM=new Map;function KJ(e,t){const n=JSON.stringify({locale:e,options:t}),i=IM.get(n);if(i)return i;const o=new Intl.NumberFormat(e,t);return IM.set(n,o),o}function BM(e,t,n){return e==null?"":KJ(t,n).format(e)}function QJ(e,t,n){return e==null?"":n?BM(e,t,n):BM(e/100,t,{style:"percent"})}const Iz=T.createContext(void 0);function P1(){const e=T.useContext(Iz);if(e===void 0)throw new Error(ts(51));return e}let Ox=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const gd={status(e){return e==="progressing"?{[Ox.progressing]:""}:e==="complete"?{[Ox.complete]:""}:e==="indeterminate"?{[Ox.indeterminate]:""}:null}};function ZJ(e,t){return t==null?"indeterminate progress":e||`${t}%`}const WJ=T.forwardRef(function(t,n){const{format:i,getAriaValueText:o=ZJ,locale:s,max:l=100,min:c=0,value:f,render:h,className:p,children:m,...g}=t,[v,_]=T.useState(),E=$J(i);let S="indeterminate";Number.isFinite(f)&&(S=f===l?"complete":"progressing");const w=QJ(f,s,E.current),N=T.useMemo(()=>({status:S}),[S]),C={"aria-labelledby":v,"aria-valuemax":l,"aria-valuemin":c,"aria-valuenow":f??void 0,"aria-valuetext":o(w,f),role:"progressbar",children:b.jsxs(T.Fragment,{children:[m,b.jsx("span",{role:"presentation",style:XJ,children:"x"})]})},k=T.useMemo(()=>({formattedValue:w,max:l,min:c,setLabelId:_,state:N,status:S,value:f}),[w,l,c,_,N,S,f]),M=Yn("div",t,{state:N,ref:n,props:[C,g],stateAttributesMapping:gd});return b.jsx(Iz.Provider,{value:k,children:M})}),JJ=T.forwardRef(function(t,n){const{render:i,className:o,...s}=t,{state:l}=P1();return Yn("div",t,{state:l,ref:n,props:s,stateAttributesMapping:gd})});function eee(e,t,n){return(e-t)*100/(n-t)}const tee=T.forwardRef(function(t,n){const{render:i,className:o,...s}=t,{max:l,min:c,value:f,state:h}=P1(),p=Number.isFinite(f)&&f!==null?eee(f,c,l):null,m=T.useCallback(()=>p==null?{}:{insetInlineStart:0,height:"inherit",width:`${p}%`},[p]);return Yn("div",t,{state:h,ref:n,props:[{style:m()},s],stateAttributesMapping:gd})}),nee=T.forwardRef(function(t,n){const{render:i,className:o,id:s,...l}=t,{setLabelId:c,state:f}=P1(),h=t8(s,c);return Yn("span",t,{state:f,ref:n,props:[{id:h,role:"presentation"},l],stateAttributesMapping:gd})});function ree({className:e,children:t,value:n,...i}){return b.jsxs(WJ,{value:n,"data-slot":"progress",className:xn("flex flex-wrap gap-3",e),...i,children:[t,b.jsx(iee,{children:b.jsx(aee,{})})]})}function iee({className:e,...t}){return b.jsx(JJ,{className:xn("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",e),"data-slot":"progress-track",...t})}function aee({className:e,...t}){return b.jsx(tee,{"data-slot":"progress-indicator",className:xn("h-full bg-primary transition-all",e),...t})}function oee({className:e,...t}){return b.jsx(nee,{className:xn("text-sm font-medium",e),"data-slot":"progress-label",...t})}function see(){var dn,tn;const{repoId:e=""}=IL(),[t]=Rq(),n=Rf(),[i,o]=T.useState(null),[s,l]=T.useState(null),c={services:"services",modules:"modules",functions:"methods"},f={services:"services",modules:"modules",methods:"functions"},h=(t==null?void 0:t.get("mode"))||"",p=c[h]||"services",[m,g]=T.useState(p),v=T.useCallback(Ce=>{g(Ce);const Se=new URL(window.location.href);Ce==="services"?Se.searchParams.delete("mode"):Se.searchParams.set("mode",f[Ce]),n(Se.pathname+Se.search,{replace:!0})},[n]),[_,E]=T.useState([]),[S,w]=T.useState([]),[N,C]=T.useState(!1),[k,M]=T.useState(null),[R,O]=T.useState(!1),[I,V]=T.useState("violations"),[K,H]=T.useState(null),[F,X]=T.useState(!1),[L,B]=T.useState(null),z=i==null?void 0:i.defaultBranch,{nodes:U,edges:G,savedCollapsedIds:Q,isLoading:j,error:D,refetch:$}=$W(e,z,m),{isConnected:q,analysisProgress:Y,onEvent:Z}=PJ(e),{insights:W,isLoading:te,refetch:re}=VJ(e,s??void 0),{diffResult:se,isChecking:me,error:be,run:ve,load:we}=FJ(e);T.useEffect(()=>{e&&d8(e).then(o).catch(()=>{})},[e]),T.useEffect(()=>{E(U),w(G)},[U,G]),T.useEffect(()=>{Y&&!N&&!F&&C(!0)},[Y,N,F]),T.useEffect(()=>Z("analysis:complete",()=>{C(!1),$()}),[Z,$]),T.useEffect(()=>Z("violations:ready",()=>{C(!1),re()}),[Z,re]);const ke=async()=>{if(F)ve();else try{C(!0),await G3(e)}catch{C(!1)}},[Ne,Oe]=T.useState(null),Te=T.useCallback(Ce=>{if(l(Ce),Ce){const Se=U.find(Be=>Be.id===Ce);if(Se&&Se.type==="database"){Oe(Ce),V("violations");return}}Oe(null)},[U]),_t=T.useCallback(Ce=>{var ge;const Se=U.find(De=>De.id===Ce),Be=Se==null?void 0:Se.data,tt=(Be==null?void 0:Be.label)||Ce,Re={};if(Be){const{onExplain:De,onToggleCollapse:ht,isCollapsed:dt,isContainer:Ae,...at}=Be;Object.assign(Re,at)}if(Se!=null&&Se.parentId){const De=U.find(ht=>ht.id===Se.parentId);De&&(Re.parentName=(ge=De.data)==null?void 0:ge.label,Re.parentType=De.type)}const Fe=G.filter(De=>De.target===Ce).map(De=>{var dt,Ae;const ht=U.find(at=>at.id===De.source);return{from:(dt=ht==null?void 0:ht.data)==null?void 0:dt.label,type:(Ae=De.data)==null?void 0:Ae.dependencyType}}),Ke=G.filter(De=>De.source===Ce).map(De=>{var dt,Ae;const ht=U.find(at=>at.id===De.target);return{to:(dt=ht==null?void 0:ht.data)==null?void 0:dt.label,type:(Ae=De.data)==null?void 0:Ae.dependencyType}});Fe.length&&(Re.dependedOnBy=Fe),Ke.length&&(Re.dependsOn=Ke),l(Ce),O(!0),M({nodeId:Ce,nodeName:tt,nodeType:Se==null?void 0:Se.type,nodeContext:Re})},[U,G]),he=T.useCallback(Ce=>{const Se=new Set;if(m==="services")for(const Fe of U){const Ke=Fe.data,ge=Ke.serviceInfo;ge&&Ce.excludedTypes.size>0&&Ce.excludedTypes.has(ge.type)&&Se.add(Fe.id),ge!=null&&ge.framework&&Ce.excludedFrameworks.size>0&&Ce.excludedFrameworks.has(ge.framework)&&Se.add(Fe.id),Ce.searchQuery&&((Ke.label||"").toLowerCase().includes(Ce.searchQuery.toLowerCase())||Se.add(Fe.id)),!Ce.showDatabases&&Fe.type==="database"&&Se.add(Fe.id)}else{const Fe=new Map;for(const ge of U){const De=ge.parentId;De&&Fe.set(ge.id,De)}if(!Ce.showDatabases)for(const ge of U)ge.type==="database"&&Se.add(ge.id);for(const ge of U){if(ge.type!=="serviceGroup")continue;const De=ge.data;Ce.excludedTypes.size>0&&Ce.excludedTypes.has(De.serviceType)&&Se.add(ge.id),De.framework&&Ce.excludedFrameworks.size>0&&Ce.excludedFrameworks.has(De.framework)&&Se.add(ge.id)}if(Ce.excludedLayers.size>0)for(const ge of U){if(ge.type!=="layer")continue;const De=ge.data;Ce.excludedLayers.has(De.label)&&Se.add(ge.id)}let Ke=!0;for(;Ke;){Ke=!1;for(const ge of U){if(Se.has(ge.id))continue;const De=Fe.get(ge.id);De&&Se.has(De)&&(Se.add(ge.id),Ke=!0)}}if(Ce.searchQuery){const ge=Ce.searchQuery.toLowerCase(),De=new Set;for(const dt of U){if(Se.has(dt.id))continue;if((dt.data.label||"").toLowerCase().includes(ge)){De.add(dt.id);let at=Fe.get(dt.id);for(;at;)De.add(at),at=Fe.get(at)}}let ht=!0;for(;ht;){ht=!1;for(const dt of U){if(De.has(dt.id))continue;const Ae=Fe.get(dt.id);Ae&&De.has(Ae)&&(De.add(dt.id),ht=!0)}}for(const dt of U)dt.type!=="database"&&(De.has(dt.id)||Se.add(dt.id))}for(const ge of U){if(ge.type!=="serviceGroup"||Se.has(ge.id))continue;U.some(ht=>Fe.get(ht.id)===ge.id&&!Se.has(ht.id))||Se.add(ge.id)}}const Be=U.filter(Fe=>!Se.has(Fe.id)),tt=new Set(Be.map(Fe=>Fe.id)),Re=G.filter(Fe=>tt.has(Fe.source)&&tt.has(Fe.target));E(Be),w(Re)},[U,G,m]),ye=T.useCallback(()=>{X(!0),we()},[we]),Ue=T.useCallback(()=>{X(!1)},[]),_e=T.useMemo(()=>{if(!F||!se)return _;const Ce=new Set(se.affectedNodeIds.services),Se=new Set(se.affectedNodeIds.layers),Be=new Set(se.affectedNodeIds.modules),tt=new Set(se.affectedNodeIds.methods),Re=new Map,Fe=new Map,Ke=new Map,ge=new Map,De=new Map,ht=new Map;for(const Ae of se.newInsights){if(Ae.targetServiceName&&Re.set(Ae.targetServiceName,(Re.get(Ae.targetServiceName)||0)+1),Ae.targetModuleName&&Ae.targetServiceName){const at=`${Ae.targetServiceName}::${Ae.targetModuleName}`;Ke.set(at,(Ke.get(at)||0)+1)}if(Ae.targetMethodName&&Ae.targetModuleName&&Ae.targetServiceName){const at=`${Ae.targetServiceName}::${Ae.targetModuleName}::${Ae.targetMethodName}`;ge.set(at,(ge.get(at)||0)+1)}}for(const Ae of se.resolvedInsights||[]){if(Ae.targetServiceName&&Fe.set(Ae.targetServiceName,(Fe.get(Ae.targetServiceName)||0)+1),Ae.targetModuleName&&Ae.targetServiceName){const at=`${Ae.targetServiceName}::${Ae.targetModuleName}`;De.set(at,(De.get(at)||0)+1)}if(Ae.targetMethodName&&Ae.targetModuleName&&Ae.targetServiceName){const at=`${Ae.targetServiceName}::${Ae.targetModuleName}::${Ae.targetMethodName}`;ht.set(at,(ht.get(at)||0)+1)}}const dt=Ae=>{let at=Ae;for(;;){const Gn=at.parentId;if(!Gn)return"";const nn=_.find(Ft=>Ft.id===Gn);if(!nn)return"";if(nn.type==="serviceGroup")return nn.data.label;at=nn}};return _.map(Ae=>{const at=Ae.data,Gn=at.label;if(Ae.type==="service"||Ae.type==="serviceGroup"){const nn=Gn,Ft=Ce.has(nn);return{...Ae,data:{...at,diffBadge:Ft?{newCount:Re.get(nn)||0,resolvedCount:Fe.get(nn)||0}:void 0},style:Ft?Ae.style:{...Ae.style,opacity:.4}}}if(Ae.type==="layer"){const nn=Ae.parentId,Ft=nn?_.find(gn=>gn.id===nn):void 0,xi=`${Ft?Ft.data.label:""}::${Gn}`,dr=Se.has(xi);return{...Ae,data:{...at,diffBadge:dr?{newCount:0,resolvedCount:0}:void 0},style:dr?Ae.style:{...Ae.style,opacity:.4}}}if(Ae.type==="module"){const Ft=`${dt(Ae)}::${Gn}`,Xn=Be.has(Ft);return{...Ae,data:{...at,diffBadge:Xn?{newCount:Ke.get(Ft)||0,resolvedCount:De.get(Ft)||0}:void 0},style:Xn?Ae.style:{...Ae.style,opacity:.4}}}if(Ae.type==="method"){const nn=dt(Ae),Ft=Ae.parentId,Xn=Ft?_.find(Ut=>Ut.id===Ft):void 0,xi=Xn?Xn.data.label:"",dr=`${nn}::${xi}::${Gn}`,gn=tt.has(dr);return{...Ae,data:{...at,diffBadge:gn?{newCount:ge.get(dr)||0,resolvedCount:ht.get(dr)||0}:void 0},style:gn?Ae.style:{...Ae.style,opacity:.4}}}return{...Ae,style:{...Ae.style,opacity:.4}}})},[_,F,se]),Ie=T.useCallback((Ce,Se)=>{if(!Ce||!Se)return!1;if(Ce.includes(Se))return!0;const Be=Ce.split("/");for(let tt=Be.length-1;tt>=1;tt--){const Re=Be.slice(tt).join("/");if(Se.startsWith(Re+"/")||Se===Re)return!0}return!1},[]),Ve=T.useMemo(()=>{const Ce=F?_e:_;if(!L)return Ce;const Se=new Map;for(const Re of Ce){const Fe=Re.parentId;Fe&&Se.set(Re.id,Fe)}const Be=new Set;for(const Re of Ce){const Fe=Re.data;let Ke=!1;if(Re.type==="module"||Re.type==="method"){const ge=Fe.filePath||Fe.rootPath||"";Ie(ge,L)&&(Ke=!0)}else if(Re.type==="layer"){const ge=Fe.filePaths;ge!=null&&ge.some(De=>Ie(De,L))&&(Ke=!0)}else if(Re.type==="serviceGroup"){const ge=Fe.rootPath||"";Ie(ge,L)&&(Ke=!0)}else if(Re.type==="service"){const ge=Fe.serviceInfo,De=(ge==null?void 0:ge.rootPath)||"";Ie(De,L)&&(Ke=!0)}if(Ke){Be.add(Re.id);let ge=Se.get(Re.id);for(;ge;)Be.add(ge),ge=Se.get(ge)}}let tt=!0;for(;tt;){tt=!1;for(const Re of Ce){if(Be.has(Re.id))continue;const Fe=Se.get(Re.id);if(!Fe||!Be.has(Fe))continue;const Ke=Re.data;if(Re.type==="module"||Re.type==="method"){const ge=Ke.filePath||Ke.rootPath||"";Ie(ge,L)&&(Be.add(Re.id),tt=!0)}else if(Re.type==="layer"){const ge=Ke.filePaths;ge!=null&&ge.some(De=>Ie(De,L))&&(Be.add(Re.id),tt=!0)}}}return Ce.map(Re=>Be.has(Re.id)?Re:{...Re,style:{...Re.style,opacity:.15}})},[_,_e,F,L,Ie]),jt=T.useMemo(()=>{var Se;if(!L)return null;const Ce=new Set;for(const Be of Ve)((Se=Be.style)==null?void 0:Se.opacity)!==.15&&Ce.add(Be.id);return Ce},[Ve,L]),ue=T.useMemo(()=>{const Ce=new Map;for(const Se of U){const Be=Se.data;let tt=Be.filePath||Be.rootPath;if(!tt&&Se.type==="service"){const Re=Be.serviceInfo;tt=(Re==null?void 0:Re.rootPath)||""}tt&&Ce.set(Se.id,tt)}return Ce},[U]);if(!e)return b.jsx(WL,{to:"/",replace:!0});const pe=T.useCallback((Ce,Se)=>{const Be=Se==="service"?["service","serviceGroup"]:Se==="module"?["module"]:Se==="method"?["method"]:void 0,tt=U.find(Re=>!(Re.data.label!==Ce||Be&&!Be.includes(Re.type||"")));return(tt==null?void 0:tt.id)??null},[U]),Me=s?((tn=(dn=U.find(Ce=>Ce.id===s))==null?void 0:dn.data)==null?void 0:tn.label)??null:null,$e=U.some(Ce=>Ce.type==="database"),Ge=new Set,Ot=new Set,en=new Set;for(const Ce of U){const Se=Ce.data;if(Ce.type==="service"){const Be=Se.serviceInfo;Be!=null&&Be.type&&Ge.add(Be.type),Be!=null&&Be.framework&&Ot.add(Be.framework)}Ce.type==="serviceGroup"&&(Se.serviceType&&Ge.add(Se.serviceType),Se.framework&&Ot.add(Se.framework)),Ce.type==="layer"&&en.add(Se.label)}const xt=[...Ge],ct=[...Ot],Ht=[...en],ft=T.useCallback((Ce,Se)=>{Se&&Se!==m?(v(Se),setTimeout(()=>H({nodeId:Ce,key:Date.now()}),500)):H({nodeId:Ce,key:Date.now()})},[m]);return b.jsxs("div",{className:"flex h-screen flex-col",children:[b.jsx(U3,{repoName:i==null?void 0:i.name,currentBranch:z,onAnalyze:ke,isAnalyzing:N,showBack:!0,backHref:"/",isChatOpen:R,onToggleChat:()=>O(Ce=>!Ce),isDiffMode:F,onEnterDiffMode:ye,onExitDiffMode:Ue}),b.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[b.jsxs(W8,{activeTab:I,onTabChange:V,children:[I==="violations"&&b.jsx(fX,{insights:W,isLoading:te,repoId:e,selectedService:s,selectedServiceName:Me,selectedDatabaseId:Ne,isDiffMode:F,diffResult:se,onLocateNode:ft,resolveNodeIdByName:pe,selectedPath:L,nodeFilePathMap:ue}),I==="rules"&&b.jsx(gX,{}),I==="files"&&b.jsx(vX,{repoId:e,selectedPath:L,onSelectPath:Ce=>{if(B(Ce),!Ce){Te(null);return}let Se=null;for(const Be of U){if(Be.type!=="service"&&Be.type!=="serviceGroup")continue;const tt=Be.data;let Re="";if(Be.type==="service"){const Ke=tt.serviceInfo;Re=(Ke==null?void 0:Ke.rootPath)||""}else Re=tt.rootPath||"";if(!Re)continue;const Fe=Re.split("/");for(let Ke=Fe.length-1;Ke>=0;Ke--){const ge=Fe.slice(Ke).join("/");if(Ce.startsWith(ge)||Ce.startsWith(ge+"/")){const De=Fe.length-Ke;(!Se||De>Se.depth)&&(Se={id:Be.id,depth:De});break}}}Te((Se==null?void 0:Se.id)??null)}})]}),b.jsxs("div",{className:"relative flex-1",children:[Y&&b.jsxs("div",{className:"absolute bottom-4 left-1/2 z-20 w-72 -translate-x-1/2 rounded-lg border border-border bg-card p-3 shadow-lg",children:[b.jsxs("div",{className:"flex items-center gap-2.5",children:[b.jsx(sr,{className:"h-3.5 w-3.5 shrink-0 animate-spin text-primary"}),b.jsx(ree,{value:Y.percent,className:"flex-1 gap-1",children:b.jsx("div",{className:"flex w-full items-center justify-between",children:b.jsx(oee,{className:"text-[11px] font-medium capitalize",children:Y.step})})})]}),Y.detail&&b.jsx("p",{className:"mt-1.5 pl-6 text-[10px] text-muted-foreground",children:Y.detail})]}),b.jsx("div",{className:"absolute right-3 top-2 z-20 flex items-center gap-1.5 rounded-full bg-card px-2 py-1 text-[10px] shadow-sm border border-border",children:q?b.jsxs(b.Fragment,{children:[b.jsx(u6,{className:"h-3 w-3 text-emerald-500"}),b.jsx("span",{className:"text-emerald-500",children:"Live"})]}):b.jsxs(b.Fragment,{children:[b.jsx(l6,{className:"h-3 w-3 text-muted-foreground"}),b.jsx("span",{className:"text-muted-foreground",children:"Offline"})]})}),j?b.jsx("div",{className:"flex h-full items-center justify-center",children:b.jsxs("div",{className:"flex flex-col items-center gap-3",children:[b.jsx(sr,{className:"h-10 w-10 animate-spin text-primary"}),b.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph..."})]})}):D?b.jsx("div",{className:"flex h-full items-center justify-center",children:b.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[b.jsx(Gc,{className:"h-10 w-10 text-destructive"}),b.jsxs(Kc,{variant:"destructive",className:"max-w-sm",children:[b.jsx(a2,{children:"Failed to load graph"}),b.jsx(Qc,{children:D})]}),b.jsx(An,{onClick:()=>$(),className:"mt-2",children:"Retry"})]})}):_.length===0&&U.length===0?b.jsx("div",{className:"flex h-full items-center justify-center",children:b.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[b.jsx(Gc,{className:"h-10 w-10 text-muted-foreground"}),b.jsxs(Kc,{className:"max-w-sm",children:[b.jsx(a2,{children:"No graph data"}),b.jsx(Qc,{children:"Run an analysis to generate the architecture graph"})]}),b.jsxs(An,{onClick:ke,disabled:N,className:"mt-2",children:[N&&b.jsx(sr,{className:"h-4 w-4 animate-spin"}),N?"Analyzing...":"Analyze Repository"]}),F&&be&&b.jsxs(Kc,{className:"mt-3 max-w-sm border-amber-500/30 text-amber-500",children:[b.jsx(Gc,{className:"h-4 w-4"}),b.jsx(Qc,{className:"text-amber-500/90",children:be})]})]})}):b.jsxs(b.Fragment,{children:[b.jsx(FW,{depthLevel:m,serviceTypes:xt,frameworks:ct,layerTypes:Ht,hasDatabases:$e,onFilterChange:he}),b.jsx(JG,{initialNodes:Ve,initialEdges:S,onNodeSelect:Te,onExplainNode:_t,selectedNodeId:s,repoId:e,branch:z,onRefetch:$,depthLevel:m,onDepthChange:v,focusNodeId:(K==null?void 0:K.nodeId)??null,focusKey:(K==null?void 0:K.key)??0,isDiffMode:F,diffResult:se,isDiffChecking:me,hasProgressBar:!!Y,onEnterDiffMode:ye,onExitDiffMode:Ue,highlightedNodeIds:jt,savedCollapsedIds:Q})]})]}),b.jsx(Q8,{isOpen:R,children:b.jsx(PW,{repoId:e,selectedService:s,explainRequest:k,onExplainHandled:()=>M(null)})})]})]})}function lee(){return b.jsx(Cq,{children:b.jsxs(eq,{children:[b.jsx(Dx,{path:"/",element:b.jsx(k8,{})}),b.jsx(Dx,{path:"/repos/:repoId",element:b.jsx(T.Suspense,{children:b.jsx(see,{})})})]})})}tL.createRoot(document.getElementById("root")).render(b.jsx(T.StrictMode,{children:b.jsx(lee,{})}));