truecourse 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli.mjs +6 -6
- package/db/migrations/0001_abnormal_random.sql +13 -0
- package/db/migrations/0002_slippery_fallen_one.sql +2 -0
- package/db/migrations/0003_yielding_mad_thinker.sql +2 -0
- package/db/migrations/meta/0001_snapshot.json +1583 -0
- package/db/migrations/meta/0002_snapshot.json +1583 -0
- package/db/migrations/meta/0003_snapshot.json +1602 -0
- package/db/migrations/meta/_journal.json +21 -0
- package/package.json +1 -1
- package/public/assets/index-B_clh7JM.css +1 -0
- package/public/assets/index-BcQKBiyG.js +386 -0
- package/public/index.html +2 -2
- package/server.mjs +84167 -11356
- package/public/assets/index-2JAhA9Km.js +0 -386
- package/public/assets/index-vuAqJRVb.css +0 -1
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
var FD=Object.defineProperty;var $D=(e,t,n)=>t in e?FD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var wc=(e,t,n)=>$D(e,typeof t!="symbol"?t+"":t,n);function YD(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 _c=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Np={exports:{}},il={};/**
|
|
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 GD(){if(CE)return il;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 il.Fragment=t,il.jsx=n,il.jsxs=n,il}var NE;function XD(){return NE||(NE=1,Np.exports=GD()),Np.exports}var b=XD(),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 KD(){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 w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,S={};function _(D,$,q){this.props=D,this.context=$,this.refs=S,this.updater=q||w}_.prototype.isReactComponent={},_.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")},_.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function C(){}C.prototype=_.prototype;function N(D,$,q){this.props=D,this.context=$,this.refs=S,this.updater=q||w}var k=N.prototype=new C;k.constructor=N,E(k,_.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 P(D,$,q){var Y=q.ref;return{$$typeof:e,type:D,key:$,ref:Y!==void 0?Y:null,props:q}}function K(D,$){return P(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,W){var Z=typeof D;(Z==="undefined"||Z==="boolean")&&(D=null);var te=!1;if(D===null)te=!0;else switch(Z){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,W)}}if(te)return W=W(D),te=Y===""?"."+L(D,0):Y,M(W)?(q="",te!=null&&(q=te.replace(X,"$&/")+"/"),z(W,$,q,"",function(ge){return ge})):W!=null&&(H(W)&&(W=K(W,q+(W.key==null||D&&D.key===W.key?"":(""+W.key).replace(X,"$&/")+"/")+te)),$.push(W)),1;te=0;var re=Y===""?".":Y+":";if(M(D))for(var se=0;se<D.length;se++)Y=D[se],Z=re+L(Y,se),te+=z(Y,$,q,Z,W);else if(se=v(D),typeof se=="function")for(D=se.call(D),se=0;!(Y=D.next()).done;)Y=Y.value,Z=re+L(Y,se++),te+=z(Y,$,q,Z,W);else if(Z==="object"){if(typeof D.then=="function")return z(B(D),$,q,Y,W);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 V(D,$,q){if(D==null)return D;var Y=[],W=0;return z(D,Y,"","",function(Z){return $.call(q,Z,W++)}),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:V,forEach:function(D,$,q){V(D,function(){$.apply(this,arguments)},q)},count:function(D){var $=0;return V(D,function(){$++}),$},toArray:function(D){return V(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=_,Qe.Fragment=n,Qe.Profiler=o,Qe.PureComponent=N,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),W=D.key;if($!=null)for(Z in $.key!==void 0&&(W=""+$.key),$)!I.call($,Z)||Z==="key"||Z==="__self"||Z==="__source"||Z==="ref"&&$.ref===void 0||(Y[Z]=$[Z]);var Z=arguments.length-2;if(Z===1)Y.children=q;else if(1<Z){for(var te=Array(Z),re=0;re<Z;re++)te[re]=arguments[re+2];Y.children=te}return P(D.type,W,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,W={},Z=null;if($!=null)for(Y in $.key!==void 0&&(Z=""+$.key),$)I.call($,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(W[Y]=$[Y]);var te=arguments.length-2;if(te===1)W.children=q;else if(1<te){for(var re=Array(te),se=0;se<te;se++)re[se]=arguments[se+2];W.children=re}if(D&&D.defaultProps)for(Y in te=D.defaultProps,te)W[Y]===void 0&&(W[Y]=te[Y]);return P(D,Z,W)},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(),W=O.S;W!==null&&W(q,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then(R,Q)}catch(Z){Q(Z)}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 Fl(){return TE||(TE=1,kp.exports=KD()),kp.exports}var T=Fl();const HM=Vl(T),UM=YD({__proto__:null,default:HM},[T]);var Tp={exports:{}},al={},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 QD(){return AE||(AE=1,(function(e){function t(z,V){var G=z.length;z.push(V);e:for(;0<G;){var Q=G-1>>>1,j=z[Q];if(0<o(j,V))z[Q]=V,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 V=z[0],G=z.pop();if(G!==V){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,W=z[Y];if(0>o(q,G))Y<j&&0>o(W,q)?(z[Q]=W,z[Y]=G,Q=Y):(z[Q]=q,z[$]=G,Q=$);else if(Y<j&&0>o(W,G))z[Q]=W,z[Y]=G,Q=Y;else break e}}return V}function o(z,V){var G=z.sortIndex-V.sortIndex;return G!==0?G:z.id-V.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,w=!1,E=!1,S=!1,_=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function k(z){for(var V=n(h);V!==null;){if(V.callback===null)i(h);else if(V.startTime<=z)i(h),V.sortIndex=V.expirationTime,t(f,V);else break;V=n(h)}}function M(z){if(E=!1,k(z),!w)if(n(f)!==null)w=!0,R||(R=!0,F());else{var V=n(h);V!==null&&B(M,V.startTime-z)}}var R=!1,O=-1,I=5,P=-1;function K(){return S?!0:!(e.unstable_now()-P<I)}function H(){if(S=!1,R){var z=e.unstable_now();P=z;var V=!0;try{e:{w=!1,E&&(E=!1,C(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),V=!0;break t}m===n(f)&&i(f),k(z)}else i(f);m=n(f)}if(m!==null)V=!0;else{var D=n(h);D!==null&&B(M,D.startTime-z),V=!1}}break e}finally{m=null,g=G,v=!1}V=void 0}}finally{V?F():R=!1}}}var F;if(typeof N=="function")F=function(){N(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(){_(H,0)};function B(z,V){O=_(function(){z(e.unstable_now())},V)}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 V=3;break;default:V=g}var G=g;g=V;try{return z()}finally{g=G}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(z,V){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var G=g;g=z;try{return V()}finally{g=G}},e.unstable_scheduleCallback=function(z,V,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:V,priorityLevel:z,startTime:G,expirationTime:j,sortIndex:-1},G>Q?(z.sortIndex=G,t(h,z),n(f)===null&&z===n(h)&&(E?(C(O),O=-1):E=!0,B(M,G-Q))):(z.sortIndex=j,t(f,z),w||v||(w=!0,R||(R=!0,F()))),z},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(z){var V=g;return function(){var G=g;g=V;try{return z.apply(this,arguments)}finally{g=G}}}})(Rp)),Rp}var RE;function ZD(){return RE||(RE=1,Ap.exports=QD()),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 WD(){if(ME)return pn;ME=1;var e=Fl();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=WD(),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 JD(){if(OE)return al;OE=1;var e=ZD(),t=Fl(),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,U=y.child;U;){if(U===u){A=!0,u=y,d=x;break}if(U===d){A=!0,d=y,u=x;break}U=U.sibling}if(!A){for(U=x.child;U;){if(U===u){A=!0,u=x,d=y;break}if(U===d){A=!0,d=x,u=y;break}U=U.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"),w=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),N=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"),P=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 _:return"Profiler";case S:return"StrictMode";case M:return"Suspense";case R:return"SuspenseList";case P:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case w:return"Portal";case N:return r.displayName||"Context";case C: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,V=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),W=D(null),Z=D(null),te=D(null);function re(r,a){switch(q(Z,a),q(W,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),$(W),$(Z)}function ge(r){r.memoizedState!==null&&q(te,r);var a=Y.current,u=KS(a,r.type);a!==u&&(q(W,r),q(Y,u))}function be(r){W.current===r&&($(Y),$(W)),te.current===r&&($(te),el._currentValue=G)}var ve,Ee;function pe(r){if(ve===void 0)try{throw Error()}catch(u){var a=u.stack.trim().match(/\n( *(at )?)/);ve=a&&a[1]||"",Ee=-1<u.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+ve+r+Ee}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],U=x[1];if(A&&U){var J=A.split(`
|
|
44
|
+
`),ae=U.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:"")?pe(u):""}function Re(r,a){switch(r.tag){case 26:case 27:case 5:return pe(r.type);case 16:return pe("Lazy");case 13:return r.child!==a&&a!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("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 pe("Activity");default:return""}}function vt(r){try{var a="",u=null;do a+=Re(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,He=e.unstable_cancelCallback,Se=e.unstable_shouldYield,Ue=e.unstable_requestPaint,Fe=e.unstable_now,kt=e.unstable_getCurrentPriorityLevel,ue=e.unstable_ImmediatePriority,me=e.unstable_UserBlockingPriority,Ae=e.unstable_NormalPriority,Ve=e.unstable_LowPriority,Ge=e.unstable_IdlePriority,Ut=e.log,zt=e.unstable_setDisableYieldValue,ft=null,ut=null;function Ft(r){if(typeof Ut=="function"&&zt(r),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(ft,r)}catch{}}var ct=Math.clz32?Math.clz32:Mr,gn=Math.log,Xt=Math.LN2;function Mr(r){return r>>>=0,r===0?32:31-(gn(r)/Xt|0)|0}var hr=256,jr=262144,Xn=4194304;function yn(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 Or(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 U=d&134217727;return U!==0?(d=U&~x,d!==0?y=yn(d):(A&=U,A!==0?y=yn(A):u||(u=U&~r,u!==0&&(y=yn(u))))):(U=d&~x,U!==0?y=yn(U):A!==0?y=yn(A):u||(u=d&~r,u!==0&&(y=yn(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 hn(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function dt(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 we(){var r=Xn;return Xn<<=1,(Xn&62914560)===0&&(Xn=4194304),r}function _e(r){for(var a=[],u=0;31>u;u++)a.push(r);return a}function Le(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function Et(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 U=r.entanglements,J=r.expirationTimes,ae=r.hiddenUpdates;for(u=A&~u;0<u;){var ce=31-ct(u),de=1<<ce;U[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&&Ie(r,d,0),x!==0&&y===0&&r.tag!==0&&(r.suspendedLanes|=x&~(A&~a))}function Ie(r,a,u){r.pendingLanes|=a,r.suspendedLanes&=~a;var d=31-ct(a);r.entangledLanes|=a,r.entanglements[d]=r.entanglements[d]|1073741824|u&261930}function Xe(r,a){var u=r.entangledLanes|=a;for(r=r.entanglements;u;){var d=31-ct(u),y=1<<d;y&a|r[d]&a&&(r[d]|=a),u&=~y}}function tt(r,a){var u=a&-a;return u=(u&42)!==0?1:Te(u),(u&(r.suspendedLanes|a))!==0?0:u}function Te(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 qe(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Tt(){var r=V.p;return r!==0?r:(r=window.event,r===void 0?32:vE(r.type))}function Ct(r,a){var u=V.p;try{return V.p=r,a()}finally{V.p=u}}var ke=Math.random().toString(36).slice(2),$e="__reactFiber$"+ke,Dt="__reactProps$"+ke,Lt="__reactContainer$"+ke,$t="__reactEvents$"+ke,pr="__reactListeners$"+ke,pa="__reactHandles$"+ke,mr="__reactResources$"+ke,Kn="__reactMarker$"+ke;function ma(r){delete r[$e],delete r[Dt],delete r[$t],delete r[pr],delete r[pa]}function Ei(r){var a=r[$e];if(a)return a;for(var u=r.parentNode;u;){if(a=u[Lt]||u[$e]){if(u=a.alternate,a.child!==null||u!==null&&u.child!==null)for(r=nE(r);r!==null;){if(u=r[$e])return u;r=nE(r)}return a}r=u,u=r.parentNode}return null}function Ci(r){if(r=r[$e]||r[Lt]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function Ni(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(i(33))}function ki(r){var a=r[mr];return a||(a=r[mr]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Kt(r){r[Kn]=!0}var ou=new Set,su={};function Kr(r,a){Ti(r,a),Ti(r+"Capture",a)}function Ti(r,a){for(su[r]=a,r=0;r<a.length;r++)ou.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]*$"),ms={},lu={};function xd(r){return he.call(lu,r)?!0:he.call(ms,r)?!1:vd.test(r)?lu[r]=!0:(ms[r]=!0,!1)}function Wa(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 Ja(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 gr(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 wn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function uu(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 Ai(r){if(!r._valueTracker){var a=uu(r)?"checked":"value";r._valueTracker=bd(r,a,""+r[a])}}function cu(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var u=a.getValue(),d="";return r&&(d=uu(r)?r.checked?"true":"false":r.value),r=d,r!==u?(a.setValue(r),!0):!1}function ga(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 _n(r){return r.replace(wd,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function ya(r,a,u,d,y,x,A,U){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=""+wn(a)):r.value!==""+wn(a)&&(r.value=""+wn(a)):A!=="submit"&&A!=="reset"||r.removeAttribute("value"),a!=null?gs(r,A,wn(a)):u!=null?gs(r,A,wn(u)):d!=null&&r.removeAttribute("value"),y==null&&x!=null&&(r.defaultChecked=!!x),y!=null&&(r.checked=y&&typeof y!="function"&&typeof y!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?r.name=""+wn(U):r.removeAttribute("name")}function fu(r,a,u,d,y,x,A,U){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)){Ai(r);return}u=u!=null?""+wn(u):"",a=a!=null?""+wn(a):u,U||a===r.value||(r.value=a),r.defaultValue=a}d=d??y,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=U?r.checked:!!d,r.defaultChecked=!!d,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(r.name=A),Ai(r)}function gs(r,a,u){a==="number"&&ga(r.ownerDocument)===r||r.defaultValue===""+u||(r.defaultValue=""+u)}function Qr(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=""+wn(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=""+wn(a),a!==r.value&&(r.value=a),u==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=u!=null?""+wn(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=wn(a),r.defaultValue=u,d=r.textContent,d===u&&d!==""&&d!==null&&(r.value=d),Ai(r)}function eo(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 du(r){return Uz.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Zr(){}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 to=null,no=null;function G1(r){var a=Ci(r);if(a&&(r=a.stateNode)){var u=r[Dt]||null;e:switch(r=a.stateNode,a.type){case"input":if(ya(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="'+_n(""+a)+'"][type="radio"]'),a=0;a<u.length;a++){var d=u[a];if(d!==r&&d.form===r.form){var y=d[Dt]||null;if(!y)throw Error(i(90));ya(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&&cu(d)}break e;case"textarea":V1(r,u.value,u.defaultValue);break e;case"select":a=u.value,a!=null&&Qr(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,(to!==null||no!==null)&&(Ju(),to&&(a=to,r=no,no=to=null,G1(a),r)))for(a=0;a<r.length;a++)G1(r[a])}}function ys(r,a){var u=r.stateNode;if(u===null)return null;var d=u[Dt]||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 Wr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nd=!1;if(Wr)try{var vs={};Object.defineProperty(vs,"passive",{get:function(){Nd=!0}}),window.addEventListener("test",vs,vs),window.removeEventListener("test",vs,vs)}catch{Nd=!1}var Ri=null,kd=null,hu=null;function K1(){if(hu)return hu;var r,a=kd,u=a.length,d,y="value"in Ri?Ri.value:Ri.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 hu=y.slice(r,1<d?1-d:void 0)}function pu(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 mu(){return!0}function Q1(){return!1}function Sn(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 U in r)r.hasOwnProperty(U)&&(u=r[U],this[U]=u?u(x):x[U]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?mu: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=mu)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=mu)},persist:function(){},isPersistent:mu}),a}var va={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gu=Sn(va),xs=m({},va,{view:0,detail:0}),Pz=Sn(xs),Td,Ad,bs,yu=m({},xs,{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!==bs&&(bs&&r.type==="mousemove"?(Td=r.screenX-bs.screenX,Ad=r.screenY-bs.screenY):Ad=Td=0,bs=r),Td)},movementY:function(r){return"movementY"in r?r.movementY:Ad}}),Z1=Sn(yu),Vz=m({},yu,{dataTransfer:0}),Fz=Sn(Vz),$z=m({},xs,{relatedTarget:0}),Rd=Sn($z),Yz=m({},va,{animationName:0,elapsedTime:0,pseudoElement:0}),Gz=Sn(Yz),Xz=m({},va,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),Kz=Sn(Xz),Qz=m({},va,{data:0}),W1=Sn(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 e4(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=Jz[r])?!!a[r]:!1}function Md(){return e4}var t4=m({},xs,{key:function(r){if(r.key){var a=Zz[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=pu(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"?pu(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?pu(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),n4=Sn(t4),r4=m({},yu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),J1=Sn(r4),i4=m({},xs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Md}),a4=Sn(i4),o4=m({},va,{propertyName:0,elapsedTime:0,pseudoElement:0}),s4=Sn(o4),l4=m({},yu,{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}),u4=Sn(l4),c4=m({},va,{newState:0,oldState:0}),f4=Sn(c4),d4=[9,13,27,32],jd=Wr&&"CompositionEvent"in window,ws=null;Wr&&"documentMode"in document&&(ws=document.documentMode);var h4=Wr&&"TextEvent"in window&&!ws,ew=Wr&&(!jd||ws&&8<ws&&11>=ws),tw=" ",nw=!1;function rw(r,a){switch(r){case"keyup":return d4.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 ro=!1;function p4(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 m4(r,a){if(ro)return r==="compositionend"||!jd&&rw(r,a)?(r=K1(),hu=kd=Ri=null,ro=!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 g4={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"?!!g4[r.type]:a==="textarea"}function ow(r,a,u,d){to?no?no.push(d):no=[d]:to=d,a=oc(a,"onChange"),0<a.length&&(u=new gu("onChange","change",null,u,d),r.push({event:u,listeners:a}))}var _s=null,Ss=null;function y4(r){PS(r,0)}function vu(r){var a=Ni(r);if(cu(a))return r}function sw(r,a){if(r==="change")return a}var lw=!1;if(Wr){var Od;if(Wr){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(){_s&&(_s.detachEvent("onpropertychange",fw),Ss=_s=null)}function fw(r){if(r.propertyName==="value"&&vu(Ss)){var a=[];ow(a,Ss,r,Ed(r)),X1(y4,a)}}function v4(r,a,u){r==="focusin"?(cw(),_s=a,Ss=u,_s.attachEvent("onpropertychange",fw)):r==="focusout"&&cw()}function x4(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return vu(Ss)}function b4(r,a){if(r==="click")return vu(a)}function w4(r,a){if(r==="input"||r==="change")return vu(a)}function _4(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var Dn=typeof Object.is=="function"?Object.is:_4;function Es(r,a){if(Dn(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)||!Dn(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=ga(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=ga(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 S4=Wr&&"documentMode"in document&&11>=document.documentMode,io=null,Ld=null,Cs=null,qd=!1;function gw(r,a,u){var d=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;qd||io==null||io!==ga(d)||(d=io,"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}),Cs&&Es(Cs,d)||(Cs=d,d=oc(Ld,"onSelect"),0<d.length&&(a=new gu("onSelect","select",null,a,u),r.push({event:a,listeners:d}),a.target=io)))}function xa(r,a){var u={};return u[r.toLowerCase()]=a.toLowerCase(),u["Webkit"+r]="webkit"+a,u["Moz"+r]="moz"+a,u}var ao={animationend:xa("Animation","AnimationEnd"),animationiteration:xa("Animation","AnimationIteration"),animationstart:xa("Animation","AnimationStart"),transitionrun:xa("Transition","TransitionRun"),transitionstart:xa("Transition","TransitionStart"),transitioncancel:xa("Transition","TransitionCancel"),transitionend:xa("Transition","TransitionEnd")},Id={},yw={};Wr&&(yw=document.createElement("div").style,"AnimationEvent"in window||(delete ao.animationend.animation,delete ao.animationiteration.animation,delete ao.animationstart.animation),"TransitionEvent"in window||delete ao.transitionend.transition);function ba(r){if(Id[r])return Id[r];if(!ao[r])return r;var a=ao[r],u;for(u in a)if(a.hasOwnProperty(u)&&u in yw)return Id[r]=a[u];return r}var vw=ba("animationend"),xw=ba("animationiteration"),bw=ba("animationstart"),E4=ba("transitionrun"),C4=ba("transitionstart"),N4=ba("transitioncancel"),ww=ba("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 yr(r,a){_w.set(r,a),Kr(a,[r])}var xu=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)},Qn=[],oo=0,Hd=0;function bu(){for(var r=oo,a=Hd=oo=0;a<r;){var u=Qn[a];Qn[a++]=null;var d=Qn[a];Qn[a++]=null;var y=Qn[a];Qn[a++]=null;var x=Qn[a];if(Qn[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 wu(r,a,u,d){Qn[oo++]=r,Qn[oo++]=a,Qn[oo++]=u,Qn[oo++]=d,Hd|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function Ud(r,a,u,d){return wu(r,a,u,d),_u(r)}function wa(r,a){return wu(r,null,null,a),_u(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-ct(u),r=x.hiddenUpdates,d=r[y],d===null?r[y]=[a]:d.push(a),a.lane=u|536870912),x):null}function _u(r){if(50<Gs)throw Gs=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 so={};function k4(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 Ln(r,a,u,d){return new k4(r,a,u,d)}function Pd(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Jr(r,a){var u=r.alternate;return u===null?(u=Ln(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 Su(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=jD(r,u,Y.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case P:return r=Ln(31,u,a,y),r.elementType=P,r.lanes=x,r;case E:return _a(u.children,y,x,a);case S:A=8,y|=24;break;case _:return r=Ln(12,u,a,y|2),r.elementType=_,r.lanes=x,r;case M:return r=Ln(13,u,a,y),r.elementType=M,r.lanes=x,r;case R:return r=Ln(19,u,a,y),r.elementType=R,r.lanes=x,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case N:A=10;break e;case C: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=Ln(A,u,a,y),a.elementType=r,a.type=d,a.lanes=x,a}function _a(r,a,u,d){return r=Ln(7,r,d,a),r.lanes=u,r}function Vd(r,a,u){return r=Ln(6,r,null,a),r.lanes=u,r}function Cw(r){var a=Ln(18,null,null,0);return a.stateNode=r,a}function Fd(r,a,u){return a=Ln(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 Zn(r,a){if(typeof r=="object"&&r!==null){var u=Nw.get(r);return u!==void 0?u:(a={value:r,source:a,stack:vt(a)},Nw.set(r,a),a)}return{value:r,source:a,stack:vt(a)}}var lo=[],uo=0,Eu=null,Ns=0,Wn=[],Jn=0,Mi=null,zr=1,Dr="";function ei(r,a){lo[uo++]=Ns,lo[uo++]=Eu,Eu=r,Ns=a}function kw(r,a,u){Wn[Jn++]=zr,Wn[Jn++]=Dr,Wn[Jn++]=Mi,Mi=r;var d=zr;r=Dr;var y=32-ct(d)-1;d&=~(1<<y),u+=1;var x=32-ct(a)+y;if(30<x){var A=y-y%5;x=(d&(1<<A)-1).toString(32),d>>=A,y-=A,zr=1<<32-ct(a)+y|u<<y|d,Dr=x+r}else zr=1<<x|u<<y|d,Dr=r}function $d(r){r.return!==null&&(ei(r,1),kw(r,1,0))}function Yd(r){for(;r===Eu;)Eu=lo[--uo],lo[uo]=null,Ns=lo[--uo],lo[uo]=null;for(;r===Mi;)Mi=Wn[--Jn],Wn[Jn]=null,Dr=Wn[--Jn],Wn[Jn]=null,zr=Wn[--Jn],Wn[Jn]=null}function Tw(r,a){Wn[Jn++]=zr,Wn[Jn++]=Dr,Wn[Jn++]=Mi,zr=a.id,Dr=a.overflow,Mi=r}var un=null,Mt=null,st=!1,ji=null,er=!1,Gd=Error(i(519));function Oi(r){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ks(Zn(a,r)),Gd}function Aw(r){var a=r.stateNode,u=r.type,d=r.memoizedProps;switch(a[$e]=r,a[Dt]=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<Ks.length;u++)rt(Ks[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),fu(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=Zr),a=!0):a=!1,a||Oi(r,!0)}function Rw(r){for(un=r.return;un;)switch(un.tag){case 5:case 31:case 13:er=!1;return;case 27:case 3:er=!0;return;default:un=un.return}}function co(r){if(r!==un)return!1;if(!st)return Rw(r),st=!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&&Mt&&Oi(r),Rw(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));Mt=tE(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));Mt=tE(r)}else a===27?(a=Mt,Gi(r.type)?(r=gp,gp=null,Mt=r):Mt=a):Mt=un?nr(r.stateNode.nextSibling):null;return!0}function Sa(){Mt=un=null,st=!1}function Xd(){var r=ji;return r!==null&&(kn===null?kn=r:kn.push.apply(kn,r),ji=null),r}function ks(r){ji===null?ji=[r]:ji.push(r)}var Kd=D(null),Ea=null,ti=null;function zi(r,a,u){q(Kd,a._currentValue),a._currentValue=u}function ni(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 U=x;x=y;for(var J=0;J<a.length;J++)if(U.context===a[J]){x.lanes|=u,U=x.alternate,U!==null&&(U.lanes|=u),Qd(x.return,u,r),d||(A=null);break e}x=U.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 fo(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 U=y.type;Dn(y.pendingProps.value,A.value)||(r!==null?r.push(U):r=[U])}}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(el):r=[el])}y=y.return}r!==null&&Zd(a,r,u,d),a.flags|=262144}function Cu(r){for(r=r.firstContext;r!==null;){if(!Dn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Ca(r){Ea=r,ti=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function cn(r){return Mw(Ea,r)}function Nu(r,a){return Ea===null&&Ca(r),Mw(r,a)}function Mw(r,a){var u=a._currentValue;if(a={context:a,memoizedValue:u,next:null},ti===null){if(r===null)throw Error(i(308));ti=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else ti=ti.next=a;return u}var T4=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()})}},A4=e.unstable_scheduleCallback,R4=e.unstable_NormalPriority,Qt={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wd(){return{controller:new T4,data:new Map,refCount:0}}function Ts(r){r.refCount--,r.refCount===0&&A4(R4,function(){r.controller.abort()})}var As=null,Jd=0,ho=0,po=null;function M4(r,a){if(As===null){var u=As=[];Jd=0,ho=np(),po={status:"pending",value:void 0,then:function(d){u.push(d)}}}return Jd++,a.then(jw,jw),a}function jw(){if(--Jd===0&&As!==null){po!==null&&(po.status="fulfilled");var r=As;As=null,ho=0,po=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function j4(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=Fe(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&M4(r,a),Ow!==null&&Ow(r,a)};var Na=D(null);function eh(){var r=Na.current;return r!==null?r:Nt.pooledCache}function ku(r,a){a===null?q(Na,Na.current):q(Na,a.pool)}function zw(){var r=eh();return r===null?null:{parent:Qt._currentValue,pool:r}}var mo=Error(i(460)),th=Error(i(474)),Tu=Error(i(542)),Au={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(Zr,Zr),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(Zr,Zr);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 Ta=a,mo}}function ka(r){try{var a=r._init;return a(r._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Ta=u,mo):u}}var Ta=null;function qw(){if(Ta===null)throw Error(i(459));var r=Ta;return Ta=null,r}function Iw(r){if(r===mo||r===Tu)throw Error(i(483))}var go=null,Rs=0;function Ru(r){var a=Rs;return Rs+=1,go===null&&(go=[]),Lw(go,r,a)}function Ms(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function Mu(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=Jr(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 U(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 Be=ie.type;return Be===E?ce(ne,ee,ie.props.children,fe,ie.key):ee!==null&&(ee.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===I&&ka(Be)===ee.type)?(ee=y(ee,ie.props),Ms(ee,ie),ee.return=ne,ee):(ee=Su(ie.type,ie.key,ie.props,null,ne.mode,fe),Ms(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,Be){return ee===null||ee.tag!==7?(ee=_a(ie,ne.mode,fe,Be),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=Su(ee.type,ee.key,ee.props,null,ne.mode,ie),Ms(ie,ee),ie.return=ne,ie;case w:return ee=Fd(ee,ne.mode,ie),ee.return=ne,ee;case I:return ee=ka(ee),de(ne,ee,ie)}if(B(ee)||F(ee))return ee=_a(ee,ne.mode,ie,null),ee.return=ne,ee;if(typeof ee.then=="function")return de(ne,Ru(ee),ie);if(ee.$$typeof===N)return de(ne,Nu(ne,ee),ie);Mu(ne,ee)}return null}function oe(ne,ee,ie,fe){var Be=ee!==null?ee.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Be!==null?null:U(ne,ee,""+ie,fe);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case v:return ie.key===Be?J(ne,ee,ie,fe):null;case w:return ie.key===Be?ae(ne,ee,ie,fe):null;case I:return ie=ka(ie),oe(ne,ee,ie,fe)}if(B(ie)||F(ie))return Be!==null?null:ce(ne,ee,ie,fe,null);if(typeof ie.then=="function")return oe(ne,ee,Ru(ie),fe);if(ie.$$typeof===N)return oe(ne,ee,Nu(ne,ie),fe);Mu(ne,ie)}return null}function le(ne,ee,ie,fe,Be){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return ne=ne.get(ie)||null,U(ee,ne,""+fe,Be);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,Be);case w:return ne=ne.get(fe.key===null?ie:fe.key)||null,ae(ee,ne,fe,Be);case I:return fe=ka(fe),le(ne,ee,ie,fe,Be)}if(B(fe)||F(fe))return ne=ne.get(ie)||null,ce(ee,ne,fe,Be,null);if(typeof fe.then=="function")return le(ne,ee,ie,Ru(fe),Be);if(fe.$$typeof===N)return le(ne,ee,ie,Nu(ee,fe),Be);Mu(ee,fe)}return null}function Me(ne,ee,ie,fe){for(var Be=null,ht=null,De=ee,We=ee=0,ot=null;De!==null&&We<ie.length;We++){De.index>We?(ot=De,De=null):ot=De.sibling;var pt=oe(ne,De,ie[We],fe);if(pt===null){De===null&&(De=ot);break}r&&De&&pt.alternate===null&&a(ne,De),ee=x(pt,ee,We),ht===null?Be=pt:ht.sibling=pt,ht=pt,De=ot}if(We===ie.length)return u(ne,De),st&&ei(ne,We),Be;if(De===null){for(;We<ie.length;We++)De=de(ne,ie[We],fe),De!==null&&(ee=x(De,ee,We),ht===null?Be=De:ht.sibling=De,ht=De);return st&&ei(ne,We),Be}for(De=d(De);We<ie.length;We++)ot=le(De,ne,We,ie[We],fe),ot!==null&&(r&&ot.alternate!==null&&De.delete(ot.key===null?We:ot.key),ee=x(ot,ee,We),ht===null?Be=ot:ht.sibling=ot,ht=ot);return r&&De.forEach(function(Wi){return a(ne,Wi)}),st&&ei(ne,We),Be}function Ye(ne,ee,ie,fe){if(ie==null)throw Error(i(151));for(var Be=null,ht=null,De=ee,We=ee=0,ot=null,pt=ie.next();De!==null&&!pt.done;We++,pt=ie.next()){De.index>We?(ot=De,De=null):ot=De.sibling;var Wi=oe(ne,De,pt.value,fe);if(Wi===null){De===null&&(De=ot);break}r&&De&&Wi.alternate===null&&a(ne,De),ee=x(Wi,ee,We),ht===null?Be=Wi:ht.sibling=Wi,ht=Wi,De=ot}if(pt.done)return u(ne,De),st&&ei(ne,We),Be;if(De===null){for(;!pt.done;We++,pt=ie.next())pt=de(ne,pt.value,fe),pt!==null&&(ee=x(pt,ee,We),ht===null?Be=pt:ht.sibling=pt,ht=pt);return st&&ei(ne,We),Be}for(De=d(De);!pt.done;We++,pt=ie.next())pt=le(De,ne,We,pt.value,fe),pt!==null&&(r&&pt.alternate!==null&&De.delete(pt.key===null?We:pt.key),ee=x(pt,ee,We),ht===null?Be=pt:ht.sibling=pt,ht=pt);return r&&De.forEach(function(VD){return a(ne,VD)}),st&&ei(ne,We),Be}function St(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 Be=ie.key;ee!==null;){if(ee.key===Be){if(Be=ie.type,Be===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===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===I&&ka(Be)===ee.type){u(ne,ee.sibling),fe=y(ee,ie.props),Ms(fe,ie),fe.return=ne,ne=fe;break e}u(ne,ee);break}else a(ne,ee);ee=ee.sibling}ie.type===E?(fe=_a(ie.props.children,ne.mode,fe,ie.key),fe.return=ne,ne=fe):(fe=Su(ie.type,ie.key,ie.props,null,ne.mode,fe),Ms(fe,ie),fe.return=ne,ne=fe)}return A(ne);case w:e:{for(Be=ie.key;ee!==null;){if(ee.key===Be)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=ka(ie),St(ne,ee,ie,fe)}if(B(ie))return Me(ne,ee,ie,fe);if(F(ie)){if(Be=F(ie),typeof Be!="function")throw Error(i(150));return ie=Be.call(ie),Ye(ne,ee,ie,fe)}if(typeof ie.then=="function")return St(ne,ee,Ru(ie),fe);if(ie.$$typeof===N)return St(ne,ee,Nu(ne,ie),fe);Mu(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{Rs=0;var Be=St(ne,ee,ie,fe);return go=null,Be}catch(De){if(De===mo||De===Tu)throw De;var ht=Ln(29,De,null,ne.mode);return ht.lanes=fe,ht.return=ne,ht}finally{}}}var Aa=Bw(!0),Hw=Bw(!1),Di=!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 Li(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function qi(r,a,u){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(gt&2)!==0){var y=d.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),d.pending=a,a=_u(r),Sw(r,null,u),a}return wu(r,d,a,u),_u(r)}function js(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,Xe(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 Os(){if(ah){var r=po;if(r!==null)throw r}}function zs(r,a,u,d){ah=!1;var y=r.updateQueue;Di=!1;var x=y.firstBaseUpdate,A=y.lastBaseUpdate,U=y.shared.pending;if(U!==null){y.shared.pending=null;var J=U,ae=J.next;J.next=null,A===null?x=ae:A.next=ae,A=J;var ce=r.alternate;ce!==null&&(ce=ce.updateQueue,U=ce.lastBaseUpdate,U!==A&&(U===null?ce.firstBaseUpdate=ae:U.next=ae,ce.lastBaseUpdate=J))}if(x!==null){var de=y.baseState;A=0,ce=ae=J=null,U=x;do{var oe=U.lane&-536870913,le=oe!==U.lane;if(le?(at&oe)===oe:(d&oe)===oe){oe!==0&&oe===ho&&(ah=!0),ce!==null&&(ce=ce.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var Me=r,Ye=U;oe=a;var St=u;switch(Ye.tag){case 1:if(Me=Ye.payload,typeof Me=="function"){de=Me.call(St,de,oe);break e}de=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=Ye.payload,oe=typeof Me=="function"?Me.call(St,de,oe):Me,oe==null)break e;de=m({},de,oe);break e;case 2:Di=!0}}oe=U.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:U.tag,payload:U.payload,callback:U.callback,next:null},ce===null?(ae=ce=le,J=de):ce=ce.next=le,A|=oe;if(U=U.next,U===null){if(U=y.shared.pending,U===null)break;le=U,U=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),Pi|=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 yo=D(null),ju=D(0);function Vw(r,a){r=fi,q(ju,r),q(yo,a),fi=r|a.baseLanes}function oh(){q(ju,fi),q(yo,yo.current)}function sh(){fi=ju.current,$(yo),$(ju)}var qn=D(null),tr=null;function Ii(r){var a=r.alternate;q(Yt,Yt.current&1),q(qn,r),tr===null&&(a===null||yo.current!==null||a.memoizedState!==null)&&(tr=r)}function lh(r){q(Yt,Yt.current),q(qn,r),tr===null&&(tr=r)}function Fw(r){r.tag===22?(q(Yt,Yt.current),q(qn,r),tr===null&&(tr=r)):Bi()}function Bi(){q(Yt,Yt.current),q(qn,qn.current)}function In(r){$(qn),tr===r&&(tr=null),$(Yt)}var Yt=D(0);function Ou(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 ri=0,Ze=null,wt=null,Zt=null,zu=!1,vo=!1,Ra=!1,Du=0,Ds=0,xo=null,O4=0;function Pt(){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(!Dn(r[u],a[u]))return!1;return!0}function ch(r,a,u,d,y,x){return ri=x,Ze=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,z.H=r===null||r.memoizedState===null?k_:Ch,Ra=!1,x=u(d,y),Ra=!1,vo&&(x=Yw(a,u,d,y)),$w(r),x}function $w(r){z.H=Is;var a=wt!==null&&wt.next!==null;if(ri=0,Zt=wt=Ze=null,zu=!1,Ds=0,xo=null,a)throw Error(i(300));r===null||Wt||(r=r.dependencies,r!==null&&Cu(r)&&(Wt=!0))}function Yw(r,a,u,d){Ze=r;var y=0;do{if(vo&&(xo=null),Ds=0,vo=!1,25<=y)throw Error(i(301));if(y+=1,Zt=wt=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(vo);return x}function z4(){var r=z.H,a=r.useState()[0];return a=typeof a.then=="function"?Ls(a):a,r=r.useState()[0],(wt!==null?wt.memoizedState:null)!==r&&(Ze.flags|=1024),a}function fh(){var r=Du!==0;return Du=0,r}function dh(r,a,u){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~u}function hh(r){if(zu){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}zu=!1}ri=0,Zt=wt=Ze=null,vo=!1,Ds=Du=0,xo=null}function vn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?Ze.memoizedState=Zt=r:Zt=Zt.next=r,Zt}function Gt(){if(wt===null){var r=Ze.alternate;r=r!==null?r.memoizedState:null}else r=wt.next;var a=Zt===null?Ze.memoizedState:Zt.next;if(a!==null)Zt=a,wt=r;else{if(r===null)throw Ze.alternate===null?Error(i(467)):Error(i(310));wt=r,r={memoizedState:wt.memoizedState,baseState:wt.baseState,baseQueue:wt.baseQueue,queue:wt.queue,next:null},Zt===null?Ze.memoizedState=Zt=r:Zt=Zt.next=r}return Zt}function Lu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ls(r){var a=Ds;return Ds+=1,xo===null&&(xo=[]),r=Lw(xo,r,a),a=Ze,(Zt===null?a.memoizedState:Zt.next)===null&&(a=a.alternate,z.H=a===null||a.memoizedState===null?k_:Ch),r}function qu(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Ls(r);if(r.$$typeof===N)return cn(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=Lu(),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 ii(r,a){return typeof a=="function"?a(r):a}function Iu(r){var a=Gt();return mh(a,wt,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 U=A=null,J=null,ae=a,ce=!1;do{var de=ae.lane&-536870913;if(de!==ae.lane?(at&de)===de:(ri&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===ho&&(ce=!0);else if((ri&oe)===oe){ae=ae.next,oe===ho&&(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?(U=J=de,A=x):J=J.next=de,Ze.lanes|=oe,Pi|=oe;de=ae.action,Ra&&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?(U=J=oe,A=x):J=J.next=oe,Ze.lanes|=de,Pi|=de;ae=ae.next}while(ae!==null&&ae!==a);if(J===null?A=x:J.next=U,!Dn(x,r.memoizedState)&&(Wt=!0,ce&&(u=po,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=Gt(),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);Dn(x,a.memoizedState)||(Wt=!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=Gt(),x=st;if(x){if(u===void 0)throw Error(i(407));u=u()}else u=a();var A=!Dn((wt||y).memoizedState,u);if(A&&(y.memoizedState=u,Wt=!0),y=y.queue,xh(Qw.bind(null,d,y,r),[r]),y.getSnapshot!==a||A||Zt!==null&&Zt.memoizedState.tag&1){if(d.flags|=2048,bo(9,{destroy:void 0},Kw.bind(null,d,y,u,a),null),Nt===null)throw Error(i(349));x||(ri&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=Lu(),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!Dn(r,u)}catch{return!0}}function Ww(r){var a=wa(r,2);a!==null&&Tn(a,r,2)}function yh(r){var a=vn();if(typeof r=="function"){var u=r;if(r=u(),Ra){Ft(!0);try{u()}finally{Ft(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ii,lastRenderedState:r},a}function Jw(r,a,u,d){return r.baseState=u,mh(r,wt,typeof d=="function"?d:ii)}function D4(r,a,u,d,y){if(Uu(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 U=u(y,d),J=z.S;J!==null&&J(A,U),t_(r,a,U)}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(st){var u=Nt.formState;if(u!==null){e:{var d=Ze;if(st){if(Mt){t:{for(var y=Mt,x=er;y.nodeType!==8;){if(!x){y=null;break t}if(y=nr(y.nextSibling),y===null){y=null;break t}}x=y.data,y=x==="F!"||x==="F"?y:null}if(y){Mt=nr(y.nextSibling),d=y.data==="F!";break e}}Oi(d)}d=!1}d&&(a=u[0])}}return u=vn(),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=vn(),y={state:a,dispatch:null,action:r,pending:null},d.queue=y,u=D4.bind(null,Ze,y,x,u),y.dispatch=u,d.memoizedState=r,[a,u,!1]}function o_(r){var a=Gt();return s_(a,wt,r)}function s_(r,a,u){if(a=mh(r,a,i_)[0],r=Iu(ii)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var d=Ls(a)}catch(A){throw A===mo?Tu:A}else d=a;a=Gt();var y=a.queue,x=y.dispatch;return u!==a.memoizedState&&(Ze.flags|=2048,bo(9,{destroy:void 0},L4.bind(null,y,u),null)),[d,x,r]}function L4(r,a){r.action=a}function l_(r){var a=Gt(),u=wt;if(u!==null)return s_(a,u,r);Gt(),a=a.memoizedState,u=Gt();var d=u.queue.dispatch;return u.memoizedState=r,[a,d,!1]}function bo(r,a,u,d){return r={tag:r,create:u,deps:d,inst:a,next:null},a=Ze.updateQueue,a===null&&(a=Lu(),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 Gt().memoizedState}function Bu(r,a,u,d){var y=vn();Ze.flags|=r,y.memoizedState=bo(1|a,{destroy:void 0},u,d===void 0?null:d)}function Hu(r,a,u,d){var y=Gt();d=d===void 0?null:d;var x=y.memoizedState.inst;wt!==null&&d!==null&&uh(d,wt.memoizedState.deps)?y.memoizedState=bo(a,x,u,d):(Ze.flags|=r,y.memoizedState=bo(1|a,x,u,d))}function c_(r,a){Bu(8390656,8,r,a)}function xh(r,a){Hu(2048,8,r,a)}function q4(r){Ze.flags|=4;var a=Ze.updateQueue;if(a===null)a=Lu(),Ze.updateQueue=a,a.events=[r];else{var u=a.events;u===null?a.events=[r]:u.push(r)}}function f_(r){var a=Gt().memoizedState;return q4({ref:a,nextImpl:r}),function(){if((gt&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function d_(r,a){return Hu(4,2,r,a)}function h_(r,a){return Hu(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,Hu(4,4,p_.bind(null,a,r),u)}function bh(){}function g_(r,a){var u=Gt();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=Gt();a=a===void 0?null:a;var d=u.memoizedState;if(a!==null&&uh(a,d[1]))return d[0];if(d=r(),Ra){Ft(!0);try{r()}finally{Ft(!1)}}return u.memoizedState=[d,a],d}function wh(r,a,u){return u===void 0||(ri&1073741824)!==0&&(at&261930)===0?r.memoizedState=a:(r.memoizedState=u,r=vS(),Ze.lanes|=r,Pi|=r,u)}function v_(r,a,u,d){return Dn(u,a)?u:yo.current!==null?(r=wh(r,u,d),Dn(r,a)||(Wt=!0),r):(ri&42)===0||(ri&1073741824)!==0&&(at&261930)===0?(Wt=!0,r.memoizedState=u):(r=vS(),Ze.lanes|=r,Pi|=r,a)}function x_(r,a,u,d,y){var x=V.p;V.p=x!==0&&8>x?x:8;var A=z.T,U={};z.T=U,Eh(r,!1,a,u);try{var J=y(),ae=z.S;if(ae!==null&&ae(U,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var ce=j4(J,d);qs(r,a,ce,Un(r))}else qs(r,a,d,Un(r))}catch(de){qs(r,a,{then:function(){},status:"rejected",reason:de},Un())}finally{V.p=x,A!==null&&U.types!==null&&(A.types=U.types),z.T=A}}function I4(){}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?I4: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:ii,lastRenderedState:G},next:null};var u={};return a.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ii,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),qs(r,a.next.queue,{},Un())}function Sh(){return cn(el)}function __(){return Gt().memoizedState}function S_(){return Gt().memoizedState}function B4(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var u=Un();r=Li(u);var d=qi(a,r,u);d!==null&&(Tn(d,a,u),js(d,a,u)),a={cache:Wd()},r.payload=a;return}a=a.return}}function H4(r,a,u){var d=Un();u={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Uu(r)?C_(a,u):(u=Ud(r,a,u,d),u!==null&&(Tn(u,r,d),N_(u,a,d)))}function E_(r,a,u){var d=Un();qs(r,a,u,d)}function qs(r,a,u,d){var y={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Uu(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,U=x(A,u);if(y.hasEagerState=!0,y.eagerState=U,Dn(U,A))return wu(r,a,y,0),Nt===null&&bu(),!1}catch{}finally{}if(u=Ud(r,a,y,d),u!==null)return Tn(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},Uu(r)){if(a)throw Error(i(479))}else a=Ud(r,u,d,2),a!==null&&Tn(a,r,2)}function Uu(r){var a=r.alternate;return r===Ze||a!==null&&a===Ze}function C_(r,a){vo=zu=!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,Xe(r,u)}}var Is={readContext:cn,use:qu,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useLayoutEffect:Pt,useInsertionEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useSyncExternalStore:Pt,useId:Pt,useHostTransitionStatus:Pt,useFormState:Pt,useActionState:Pt,useOptimistic:Pt,useMemoCache:Pt,useCacheRefresh:Pt};Is.useEffectEvent=Pt;var k_={readContext:cn,use:qu,useCallback:function(r,a){return vn().memoizedState=[r,a===void 0?null:a],r},useContext:cn,useEffect:c_,useImperativeHandle:function(r,a,u){u=u!=null?u.concat([r]):null,Bu(4194308,4,p_.bind(null,a,r),u)},useLayoutEffect:function(r,a){return Bu(4194308,4,r,a)},useInsertionEffect:function(r,a){Bu(4,2,r,a)},useMemo:function(r,a){var u=vn();a=a===void 0?null:a;var d=r();if(Ra){Ft(!0);try{r()}finally{Ft(!1)}}return u.memoizedState=[d,a],d},useReducer:function(r,a,u){var d=vn();if(u!==void 0){var y=u(a);if(Ra){Ft(!0);try{u(a)}finally{Ft(!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=H4.bind(null,Ze,r),[d.memoizedState,r]},useRef:function(r){var a=vn();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=vn();return wh(u,r,a)},useTransition:function(){var r=yh(!1);return r=x_.bind(null,Ze,r.queue,!0,!1),vn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,u){var d=Ze,y=vn();if(st){if(u===void 0)throw Error(i(407));u=u()}else{if(u=a(),Nt===null)throw Error(i(349));(at&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,bo(9,{destroy:void 0},Kw.bind(null,d,x,u,a),null),u},useId:function(){var r=vn(),a=Nt.identifierPrefix;if(st){var u=Dr,d=zr;u=(d&~(1<<32-ct(d)-1)).toString(32)+u,a="_"+a+"R_"+u,u=Du++,0<u&&(a+="H"+u.toString(32)),a+="_"}else u=O4++,a="_"+a+"r_"+u.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:Sh,useFormState:a_,useActionState:a_,useOptimistic:function(r){var a=vn();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 vn().memoizedState=B4.bind(null,Ze)},useEffectEvent:function(r){var a=vn(),u={impl:r};return a.memoizedState=u,function(){if((gt&2)!==0)throw Error(i(440));return u.impl.apply(void 0,arguments)}}},Ch={readContext:cn,use:qu,useCallback:g_,useContext:cn,useEffect:xh,useImperativeHandle:m_,useInsertionEffect:d_,useLayoutEffect:h_,useMemo:y_,useReducer:Iu,useRef:u_,useState:function(){return Iu(ii)},useDebugValue:bh,useDeferredValue:function(r,a){var u=Gt();return v_(u,wt.memoizedState,r,a)},useTransition:function(){var r=Iu(ii)[0],a=Gt().memoizedState;return[typeof r=="boolean"?r:Ls(r),a]},useSyncExternalStore:Gw,useId:__,useHostTransitionStatus:Sh,useFormState:o_,useActionState:o_,useOptimistic:function(r,a){var u=Gt();return Jw(u,wt,r,a)},useMemoCache:ph,useCacheRefresh:S_};Ch.useEffectEvent=f_;var T_={readContext:cn,use:qu,useCallback:g_,useContext:cn,useEffect:xh,useImperativeHandle:m_,useInsertionEffect:d_,useLayoutEffect:h_,useMemo:y_,useReducer:gh,useRef:u_,useState:function(){return gh(ii)},useDebugValue:bh,useDeferredValue:function(r,a){var u=Gt();return wt===null?wh(u,r,a):v_(u,wt.memoizedState,r,a)},useTransition:function(){var r=gh(ii)[0],a=Gt().memoizedState;return[typeof r=="boolean"?r:Ls(r),a]},useSyncExternalStore:Gw,useId:__,useHostTransitionStatus:Sh,useFormState:l_,useActionState:l_,useOptimistic:function(r,a){var u=Gt();return wt!==null?Jw(u,wt,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=Un(),y=Li(d);y.payload=a,u!=null&&(y.callback=u),a=qi(r,y,d),a!==null&&(Tn(a,r,d),js(a,r,d))},enqueueReplaceState:function(r,a,u){r=r._reactInternals;var d=Un(),y=Li(d);y.tag=1,y.payload=a,u!=null&&(y.callback=u),a=qi(r,y,d),a!==null&&(Tn(a,r,d),js(a,r,d))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var u=Un(),d=Li(u);d.tag=2,a!=null&&(d.callback=a),a=qi(r,d,u),a!==null&&(Tn(a,r,u),js(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?!Es(u,d)||!Es(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 Ma(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){xu(r)}function j_(r){console.error(r)}function O_(r){xu(r)}function Pu(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=Li(u),u.tag=3,u.payload={element:null},u.callback=function(){Pu(r,a)},u}function D_(r){return r=Li(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"&&(Vi===null?Vi=new Set([this]):Vi.add(this));var U=d.stack;this.componentDidCatch(d.value,{componentStack:U!==null?U:""})})}function U4(r,a,u,d,y){if(u.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(a=u.alternate,a!==null&&fo(a,u,y,!0),u=qn.current,u!==null){switch(u.tag){case 31:case 13:return tr===null?ec():u.alternate===null&&Vt===0&&(Vt=3),u.flags&=-257,u.flags|=65536,u.lanes=y,d===Au?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===Au?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),ec(),!1}if(st)return a=qn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=y,d!==Gd&&(r=Error(i(422),{cause:d}),ks(Zn(r,u)))):(d!==Gd&&(a=Error(i(423),{cause:d}),ks(Zn(a,u))),r=r.current.alternate,r.flags|=65536,y&=-y,r.lanes|=y,d=Zn(d,u),y=Th(r.stateNode,d,y),ih(r,y),Vt!==4&&(Vt=2)),!1;var x=Error(i(520),{cause:d});if(x=Zn(x,u),Ys===null?Ys=[x]:Ys.push(x),Vt!==4&&(Vt=2),a===null)return!0;d=Zn(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"&&(Vi===null||!Vi.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)),Wt=!1;function fn(r,a,u,d){a.child=r===null?Hw(a,null,u,d):Aa(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 U in d)U!=="ref"&&(A[U]=d[U])}else A=d;return Ca(a),d=ch(r,a,u,A,x,y),U=fh(),r!==null&&!Wt?(dh(r,a,y),ai(r,a,y)):(st&&U&&$d(a),a.flags|=1,fn(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=Su(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:Es,u(A,d)&&r.ref===a.ref)return ai(r,a,y)}return a.flags|=1,r=Jr(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(Es(x,d)&&r.ref===a.ref)if(Wt=!1,a.pendingProps=d=x,qh(r,y))(r.flags&131072)!==0&&(Wt=!0);else return a.lanes=r.lanes,ai(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&&ku(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?(ku(a,x.cachePool),Vw(a,x),Bi(),a.memoizedState=null):(r!==null&&ku(a,null),oh(),Bi());return fn(r,a,y,u),a.child}function Bs(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:Qt._currentValue,pool:x},a.memoizedState={baseLanes:u,cachePool:x},r!==null&&ku(a,null),oh(),Fw(a),r!==null&&fo(r,a,d,!0),a.childLanes=y,null}function Vu(r,a){return a=$u({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 Aa(a,r.child,null,u),r=Vu(a,a.pendingProps),r.flags|=2,In(a),a.memoizedState=null,r}function P4(r,a,u){var d=a.pendingProps,y=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(st){if(d.mode==="hidden")return r=Vu(a,d),a.lanes=536870912,Bs(null,r);if(lh(a),(r=Mt)?(r=eE(r,er),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:Mi!==null?{id:zr,overflow:Dr}:null,retryLane:536870912,hydrationErrors:null},u=Cw(r),u.return=a,a.child=u,un=a,Mt=null)):r=null,r===null)throw Oi(a);return a.lanes=536870912,null}return Vu(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(Wt||fo(r,a,u,!1),y=(u&r.childLanes)!==0,Wt||y){if(d=Nt,d!==null&&(A=tt(d,u),A!==0&&A!==x.retryLane))throw x.retryLane=A,wa(r,A),Tn(d,r,A),Ah;ec(),a=P_(r,a,u)}else r=x.treeContext,Mt=nr(A.nextSibling),un=a,st=!0,ji=null,er=!1,r!==null&&Tw(a,r),a=Vu(a,d),a.flags|=4096;return a}return r=Jr(r.child,{mode:d.mode,children:d.children}),r.ref=a.ref,a.child=r,r.return=a,r}function Fu(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 Ca(a),u=ch(r,a,u,d,void 0,y),d=fh(),r!==null&&!Wt?(dh(r,a,y),ai(r,a,y)):(st&&d&&$d(a),a.flags|=1,fn(r,a,u,y),a.child)}function V_(r,a,u,d,y,x){return Ca(a),a.updateQueue=null,u=Yw(a,d,u,y),$w(r),d=fh(),r!==null&&!Wt?(dh(r,a,x),ai(r,a,x)):(st&&d&&$d(a),a.flags|=1,fn(r,a,u,x),a.child)}function F_(r,a,u,d,y){if(Ca(a),a.stateNode===null){var x=so,A=u.contextType;typeof A=="object"&&A!==null&&(x=cn(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?cn(A):so,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),zs(a,d,x,y),Os(),x.state=a.memoizedState),typeof x.componentDidMount=="function"&&(a.flags|=4194308),d=!0}else if(r===null){x=a.stateNode;var U=a.memoizedProps,J=Ma(u,U);x.props=J;var ae=x.context,ce=u.contextType;A=so,typeof ce=="object"&&ce!==null&&(A=cn(ce));var de=u.getDerivedStateFromProps;ce=typeof de=="function"||typeof x.getSnapshotBeforeUpdate=="function",U=a.pendingProps!==U,ce||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(U||ae!==A)&&R_(a,x,d,A),Di=!1;var oe=a.memoizedState;x.state=oe,zs(a,d,x,y),Os(),ae=a.memoizedState,U||oe!==ae||Di?(typeof de=="function"&&(Nh(a,u,de,d),ae=a.memoizedState),(J=Di||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=Ma(u,A),x.props=ce,de=a.pendingProps,oe=x.context,ae=u.contextType,J=so,typeof ae=="object"&&ae!==null&&(J=cn(ae)),U=u.getDerivedStateFromProps,(ae=typeof U=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(A!==de||oe!==J)&&R_(a,x,d,J),Di=!1,oe=a.memoizedState,x.state=oe,zs(a,d,x,y),Os();var le=a.memoizedState;A!==de||oe!==le||Di||r!==null&&r.dependencies!==null&&Cu(r.dependencies)?(typeof U=="function"&&(Nh(a,u,U,d),le=a.memoizedState),(ce=Di||A_(a,u,ce,d,oe,le,J)||r!==null&&r.dependencies!==null&&Cu(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,Fu(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=Aa(a,r.child,null,y),a.child=Aa(a,null,u,y)):fn(r,a,u,y),a.memoizedState=x.state,r=a.child):r=ai(r,a,y),r}function $_(r,a,u,d){return Sa(),a.flags|=256,fn(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|=Hn),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:(Yt.current&2)!==0),A&&(y=!0,a.flags&=-129),A=(a.flags&32)!==0,a.flags&=-33,r===null){if(st){if(y?Ii(a):Bi(),(r=Mt)?(r=eE(r,er),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:Mi!==null?{id:zr,overflow:Dr}:null,retryLane:536870912,hydrationErrors:null},u=Cw(r),u.return=a,a.child=u,un=a,Mt=null)):r=null,r===null)throw Oi(a);return mp(r)?a.lanes=32:a.lanes=536870912,null}var U=d.children;return d=d.fallback,y?(Bi(),y=a.mode,U=$u({mode:"hidden",children:U},y),d=_a(d,y,u,null),U.return=a,d.return=a,U.sibling=d,a.child=U,d=a.child,d.memoizedState=jh(u),d.childLanes=Oh(r,A,u),a.memoizedState=Mh,Bs(null,d)):(Ii(a),zh(a,U))}var J=r.memoizedState;if(J!==null&&(U=J.dehydrated,U!==null)){if(x)a.flags&256?(Ii(a),a.flags&=-257,a=Dh(r,a,u)):a.memoizedState!==null?(Bi(),a.child=r.child,a.flags|=128,a=null):(Bi(),U=d.fallback,y=a.mode,d=$u({mode:"visible",children:d.children},y),U=_a(U,y,u,null),U.flags|=2,d.return=a,U.return=a,d.sibling=U,a.child=d,Aa(a,r.child,null,u),d=a.child,d.memoizedState=jh(u),d.childLanes=Oh(r,A,u),a.memoizedState=Mh,a=Bs(null,d));else if(Ii(a),mp(U)){if(A=U.nextSibling&&U.nextSibling.dataset,A)var ae=A.dgst;A=ae,d=Error(i(419)),d.stack="",d.digest=A,ks({value:d,source:null,stack:null}),a=Dh(r,a,u)}else if(Wt||fo(r,a,u,!1),A=(u&r.childLanes)!==0,Wt||A){if(A=Nt,A!==null&&(d=tt(A,u),d!==0&&d!==J.retryLane))throw J.retryLane=d,wa(r,d),Tn(A,r,d),Ah;pp(U)||ec(),a=Dh(r,a,u)}else pp(U)?(a.flags|=192,a.child=r.child,a=null):(r=J.treeContext,Mt=nr(U.nextSibling),un=a,st=!0,ji=null,er=!1,r!==null&&Tw(a,r),a=zh(a,d.children),a.flags|=4096);return a}return y?(Bi(),U=d.fallback,y=a.mode,J=r.child,ae=J.sibling,d=Jr(J,{mode:"hidden",children:d.children}),d.subtreeFlags=J.subtreeFlags&65011712,ae!==null?U=Jr(ae,U):(U=_a(U,y,u,null),U.flags|=2),U.return=a,d.return=a,d.sibling=U,a.child=d,Bs(null,d),d=a.child,U=r.child.memoizedState,U===null?U=jh(u):(y=U.cachePool,y!==null?(J=Qt._currentValue,y=y.parent!==J?{parent:J,pool:J}:y):y=zw(),U={baseLanes:U.baseLanes|u,cachePool:y}),d.memoizedState=U,d.childLanes=Oh(r,A,u),a.memoizedState=Mh,Bs(r.child,d)):(Ii(a),u=r.child,r=u.sibling,u=Jr(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=$u({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function $u(r,a){return r=Ln(22,r,null,a),r.lanes=0,r}function Dh(r,a,u){return Aa(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=Yt.current,U=(A&2)!==0;if(U?(A=A&1|2,a.flags|=128):A&=1,q(Yt,A),fn(r,a,d,u),d=st?Ns:0,!U&&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&&Ou(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&&Ou(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 ai(r,a,u){if(r!==null&&(a.dependencies=r.dependencies),Pi|=a.lanes,(u&a.childLanes)===0)if(r!==null){if(fo(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=Jr(r,r.pendingProps),a.child=u,u.return=a;r.sibling!==null;)r=r.sibling,u=u.sibling=Jr(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&&Cu(r)))}function V4(r,a,u){switch(a.tag){case 3:re(a,a.stateNode.containerInfo),zi(a,Qt,r.memoizedState.cache),Sa();break;case 27:case 5:ge(a);break;case 4:re(a,a.stateNode.containerInfo);break;case 10:zi(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?(Ii(a),a.flags|=128,null):(u&a.child.childLanes)!==0?Y_(r,a,u):(Ii(a),r=ai(r,a,u),r!==null?r.sibling:null);Ii(a);break;case 19:var y=(r.flags&128)!==0;if(d=(u&a.childLanes)!==0,d||(fo(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(Yt,Yt.current),d)break;return null;case 22:return a.lanes=0,H_(r,a,u,a.pendingProps);case 24:zi(a,Qt,r.memoizedState.cache)}return ai(r,a,u)}function K_(r,a,u){if(r!==null)if(r.memoizedProps!==a.pendingProps)Wt=!0;else{if(!qh(r,u)&&(a.flags&128)===0)return Wt=!1,V4(r,a,u);Wt=(r.flags&131072)!==0}else Wt=!1,st&&(a.flags&1048576)!==0&&kw(a,Ns,a.index);switch(a.lanes=0,a.tag){case 16:e:{var d=a.pendingProps;if(r=ka(a.elementType),a.type=r,typeof r=="function")Pd(r)?(d=Ma(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=Ma(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),zs(a,d,null,u);var A=a.memoizedState;if(d=A.cache,zi(a,Qt,d),d!==x.cache&&Zd(a,[Qt],u,!0),Os(),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=Zn(Error(i(424)),a),ks(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(Mt=nr(r.firstChild),un=a,st=!0,ji=null,er=!0,u=Hw(a,null,d,u),a.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(Sa(),d===y){a=ai(r,a,u);break e}fn(r,a,d,u)}a=a.child}return a;case 26:return Fu(r,a),r===null?(u=oE(a.type,null,a.pendingProps,null))?a.memoizedState=u:st||(u=a.type,r=a.pendingProps,d=sc(Z.current).createElement(u),d[$e]=a,d[Dt]=r,dn(d,u,r),Kt(d),a.stateNode=d):a.memoizedState=oE(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return ge(a),r===null&&st&&(d=a.stateNode=rE(a.type,a.pendingProps,Z.current),un=a,er=!0,y=Mt,Gi(a.type)?(gp=y,Mt=nr(d.firstChild)):Mt=y),fn(r,a,a.pendingProps.children,u),Fu(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&st&&((y=d=Mt)&&(d=xD(d,a.type,a.pendingProps,er),d!==null?(a.stateNode=d,un=a,Mt=nr(d.firstChild),er=!1,y=!0):y=!1),y||Oi(a)),ge(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,z4,null,null,u),el._currentValue=y),Fu(r,a),fn(r,a,d,u),a.child;case 6:return r===null&&st&&((r=u=Mt)&&(u=bD(u,a.pendingProps,er),u!==null?(a.stateNode=u,un=a,Mt=null,r=!0):r=!1),r||Oi(a)),null;case 13:return Y_(r,a,u);case 4:return re(a,a.stateNode.containerInfo),d=a.pendingProps,r===null?a.child=Aa(a,null,d,u):fn(r,a,d,u),a.child;case 11:return q_(r,a,a.type,a.pendingProps,u);case 7:return fn(r,a,a.pendingProps,u),a.child;case 8:return fn(r,a,a.pendingProps.children,u),a.child;case 12:return fn(r,a,a.pendingProps.children,u),a.child;case 10:return d=a.pendingProps,zi(a,a.type,d.value),fn(r,a,d.children,u),a.child;case 9:return y=a.type._context,d=a.pendingProps.children,Ca(a),y=cn(y),d=d(y),a.flags|=1,fn(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 P4(r,a,u);case 22:return H_(r,a,u,a.pendingProps);case 24:return Ca(a),d=cn(Qt),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),zi(a,Qt,y)):((r.lanes&u)!==0&&(rh(r,a),zs(a,null,null,u),Os()),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),zi(a,Qt,d)):(d=x.cache,zi(a,Qt,d),d!==y.cache&&Zd(a,[Qt],u,!0))),fn(r,a,a.pendingProps.children,u),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function oi(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 Ta=Au,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 Ta=Au,th}function Yu(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?we():536870912,r.lanes|=a,Eo|=a)}function Hs(r,a){if(!st)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 jt(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 F4(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 jt(a),null;case 1:return jt(a),null;case 3:return u=a.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),a.memoizedState.cache!==d&&(a.flags|=2048),ni(Qt),se(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(r===null||r.child===null)&&(co(a)?oi(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Xd())),jt(a),null;case 26:var y=a.type,x=a.memoizedState;return r===null?(oi(a),x!==null?(jt(a),Q_(a,x)):(jt(a),Ih(a,y,null,d,u))):x?x!==r.memoizedState?(oi(a),jt(a),Q_(a,x)):(jt(a),a.flags&=-16777217):(r=r.memoizedProps,r!==d&&oi(a),jt(a),Ih(a,y,r,d,u)),null;case 27:if(be(a),u=Z.current,y=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==d&&oi(a);else{if(!d){if(a.stateNode===null)throw Error(i(166));return jt(a),null}r=Y.current,co(a)?Aw(a):(r=rE(y,d,u),a.stateNode=r,oi(a))}return jt(a),null;case 5:if(be(a),y=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==d&&oi(a);else{if(!d){if(a.stateNode===null)throw Error(i(166));return jt(a),null}if(x=Y.current,co(a))Aw(a);else{var A=sc(Z.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[$e]=a,x[Dt]=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(dn(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&&oi(a)}}return jt(a),Ih(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,u),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==d&&oi(a);else{if(typeof d!="string"&&a.stateNode===null)throw Error(i(166));if(r=Z.current,co(a)){if(r=a.stateNode,u=a.memoizedProps,d=null,y=un,y!==null)switch(y.tag){case 27:case 5:d=y.memoizedProps}r[$e]=a,r=!!(r.nodeValue===u||d!==null&&d.suppressHydrationWarning===!0||YS(r.nodeValue,u)),r||Oi(a,!0)}else r=sc(r).createTextNode(d),r[$e]=a,a.stateNode=r}return jt(a),null;case 31:if(u=a.memoizedState,r===null||r.memoizedState!==null){if(d=co(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[$e]=a}else Sa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;jt(a),r=!1}else u=Xd(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=u),r=!0;if(!r)return a.flags&256?(In(a),a):(In(a),null);if((a.flags&128)!==0)throw Error(i(558))}return jt(a),null;case 13:if(d=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(y=co(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[$e]=a}else Sa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;jt(a),y=!1}else y=Xd(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=y),y=!0;if(!y)return a.flags&256?(In(a),a):(In(a),null)}return In(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),Yu(a,a.updateQueue),jt(a),null);case 4:return se(),r===null&&op(a.stateNode.containerInfo),jt(a),null;case 10:return ni(a.type),jt(a),null;case 19:if($(Yt),d=a.memoizedState,d===null)return jt(a),null;if(y=(a.flags&128)!==0,x=d.rendering,x===null)if(y)Hs(d,!1);else{if(Vt!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(x=Ou(r),x!==null){for(a.flags|=128,Hs(d,!1),r=x.updateQueue,a.updateQueue=r,Yu(a,r),a.subtreeFlags=0,r=u,u=a.child;u!==null;)Ew(u,r),u=u.sibling;return q(Yt,Yt.current&1|2),st&&ei(a,d.treeForkCount),a.child}r=r.sibling}d.tail!==null&&Fe()>Zu&&(a.flags|=128,y=!0,Hs(d,!1),a.lanes=4194304)}else{if(!y)if(r=Ou(x),r!==null){if(a.flags|=128,y=!0,r=r.updateQueue,a.updateQueue=r,Yu(a,r),Hs(d,!0),d.tail===null&&d.tailMode==="hidden"&&!x.alternate&&!st)return jt(a),null}else 2*Fe()-d.renderingStartTime>Zu&&u!==536870912&&(a.flags|=128,y=!0,Hs(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=Fe(),r.sibling=null,u=Yt.current,q(Yt,y?u&1|2:u&1),st&&ei(a,d.treeForkCount),r):(jt(a),null);case 22:case 23:return In(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&&(jt(a),a.subtreeFlags&6&&(a.flags|=8192)):jt(a),u=a.updateQueue,u!==null&&Yu(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&&$(Na),null;case 24:return u=null,r!==null&&(u=r.memoizedState.cache),a.memoizedState.cache!==u&&(a.flags|=2048),ni(Qt),jt(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function $4(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 ni(Qt),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(In(a),a.alternate===null)throw Error(i(340));Sa()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(In(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Sa()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return $(Yt),null;case 4:return se(),null;case 10:return ni(a.type),null;case 22:case 23:return In(a),sh(),r!==null&&$(Na),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return ni(Qt),null;case 25:return null;default:return null}}function Z_(r,a){switch(Yd(a),a.tag){case 3:ni(Qt),se();break;case 26:case 27:case 5:be(a);break;case 4:se();break;case 31:a.memoizedState!==null&&In(a);break;case 13:In(a);break;case 19:$(Yt);break;case 10:ni(a.type);break;case 22:case 23:In(a),sh(),r!==null&&$(Na);break;case 24:ni(Qt)}}function Us(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(U){bt(a,a.return,U)}}function Hi(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,U=A.destroy;if(U!==void 0){A.destroy=void 0,y=a;var J=u,ae=U;try{ae()}catch(ce){bt(y,J,ce)}}}d=d.next}while(d!==x)}}catch(ce){bt(a,a.return,ce)}}function W_(r){var a=r.updateQueue;if(a!==null){var u=r.stateNode;try{Pw(a,u)}catch(d){bt(r,r.return,d)}}}function J_(r,a,u){u.props=Ma(r.type,r.memoizedProps),u.state=r.memoizedState;try{u.componentWillUnmount()}catch(d){bt(r,a,d)}}function Ps(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){bt(r,a,y)}}function Lr(r,a){var u=r.ref,d=r.refCleanup;if(u!==null)if(typeof d=="function")try{d()}catch(y){bt(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){bt(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){bt(r,r.return,y)}}function Bh(r,a,u){try{var d=r.stateNode;hD(d,r.type,u,a),d[Dt]=a}catch(y){bt(r,r.return,y)}}function tS(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Gi(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&&Gi(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=Zr));else if(d!==4&&(d===27&&Gi(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 Gu(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&&Gi(r.type)&&(u=r.stateNode),r=r.child,r!==null))for(Gu(r,a,u),r=r.sibling;r!==null;)Gu(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]);dn(a,d,u),a[$e]=r,a[Dt]=u}catch(x){bt(r,r.return,x)}}var si=!1,Jt=!1,Ph=!1,rS=typeof WeakSet=="function"?WeakSet:Set,sn=null;function Y4(r,a){if(r=r.containerInfo,up=pc,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,U=-1,J=-1,ae=0,ce=0,de=r,oe=null;t:for(;;){for(var le;de!==u||y!==0&&de.nodeType!==3||(U=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&&(U=A),oe===x&&++ce===d&&(J=A),(le=de.nextSibling)!==null)break;de=oe,oe=de.parentNode}de=le}u=U===-1||J===-1?null:{start:U,end:J}}else u=null}u=u||{start:0,end:0}}else u=null;for(cp={focusedElem:r,selectionRange:u},pc=!1,sn=a;sn!==null;)if(a=sn,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,sn=r;else for(;sn!==null;){switch(a=sn,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 Me=Ma(u.type,y);r=d.getSnapshotBeforeUpdate(Me,x),d.__reactInternalSnapshotBeforeUpdate=r}catch(Ye){bt(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,sn=r;break}sn=a.return}}function iS(r,a,u){var d=u.flags;switch(u.tag){case 0:case 11:case 15:ui(r,u),d&4&&Us(5,u);break;case 1:if(ui(r,u),d&4)if(r=u.stateNode,a===null)try{r.componentDidMount()}catch(A){bt(u,u.return,A)}else{var y=Ma(u.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(y,a,r.__reactInternalSnapshotBeforeUpdate)}catch(A){bt(u,u.return,A)}}d&64&&W_(u),d&512&&Ps(u,u.return);break;case 3:if(ui(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){bt(u,u.return,A)}}break;case 27:a===null&&d&4&&nS(u);case 26:case 5:ui(r,u),a===null&&d&4&&eS(u),d&512&&Ps(u,u.return);break;case 12:ui(r,u);break;case 31:ui(r,u),d&4&&sS(r,u);break;case 13:ui(r,u),d&4&&lS(r,u),d&64&&(r=u.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(u=tD.bind(null,u),wD(r,u))));break;case 22:if(d=u.memoizedState!==null||si,!d){a=a!==null&&a.memoizedState!==null||Jt,y=si;var x=Jt;si=d,(Jt=a)&&!x?ci(r,u,(u.subtreeFlags&8772)!==0):ui(r,u),si=y,Jt=x}break;case 30:break;default:ui(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&&ma(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 qt=null,En=!1;function li(r,a,u){for(u=u.child;u!==null;)oS(r,a,u),u=u.sibling}function oS(r,a,u){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(ft,u)}catch{}switch(u.tag){case 26:Jt||Lr(u,a),li(r,a,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Jt||Lr(u,a);var d=qt,y=En;Gi(u.type)&&(qt=u.stateNode,En=!1),li(r,a,u),Zs(u.stateNode),qt=d,En=y;break;case 5:Jt||Lr(u,a);case 6:if(d=qt,y=En,qt=null,li(r,a,u),qt=d,En=y,qt!==null)if(En)try{(qt.nodeType===9?qt.body:qt.nodeName==="HTML"?qt.ownerDocument.body:qt).removeChild(u.stateNode)}catch(x){bt(u,a,x)}else try{qt.removeChild(u.stateNode)}catch(x){bt(u,a,x)}break;case 18:qt!==null&&(En?(r=qt,WS(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,u.stateNode),jo(r)):WS(qt,u.stateNode));break;case 4:d=qt,y=En,qt=u.stateNode.containerInfo,En=!0,li(r,a,u),qt=d,En=y;break;case 0:case 11:case 14:case 15:Hi(2,u,a),Jt||Hi(4,u,a),li(r,a,u);break;case 1:Jt||(Lr(u,a),d=u.stateNode,typeof d.componentWillUnmount=="function"&&J_(u,a,d)),li(r,a,u);break;case 21:li(r,a,u);break;case 22:Jt=(d=Jt)||u.memoizedState!==null,li(r,a,u),Jt=d;break;default:li(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{jo(r)}catch(u){bt(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{jo(r)}catch(u){bt(a,a.return,u)}}function G4(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 Xu(r,a){var u=G4(r);a.forEach(function(d){if(!u.has(d)){u.add(d);var y=nD.bind(null,r,d);d.then(y,y)}})}function Cn(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,U=A;e:for(;U!==null;){switch(U.tag){case 27:if(Gi(U.type)){qt=U.stateNode,En=!1;break e}break;case 5:qt=U.stateNode,En=!1;break e;case 3:case 4:qt=U.stateNode.containerInfo,En=!0;break e}U=U.return}if(qt===null)throw Error(i(160));oS(x,A,y),qt=null,En=!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 vr=null;function uS(r,a){var u=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:Cn(a,r),Nn(r),d&4&&(Hi(3,r,r.return),Us(3,r),Hi(5,r,r.return));break;case 1:Cn(a,r),Nn(r),d&512&&(Jt||u===null||Lr(u,u.return)),d&64&&si&&(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=vr;if(Cn(a,r),Nn(r),d&512&&(Jt||u===null||Lr(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[Kn]||x[$e]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=y.createElement(d),y.head.insertBefore(x,y.querySelector("head > title"))),dn(x,d,u),x[$e]=r,Kt(x),d=x;break e;case"link":var A=uE("link","href",y).get(d+(u.href||""));if(A){for(var U=0;U<A.length;U++)if(x=A[U],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(U,1);break t}}x=y.createElement(d),dn(x,d,u),y.head.appendChild(x);break;case"meta":if(A=uE("meta","content",y).get(d+(u.content||""))){for(U=0;U<A.length;U++)if(x=A[U],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(U,1);break t}}x=y.createElement(d),dn(x,d,u),y.head.appendChild(x);break;default:throw Error(i(468,d))}x[$e]=r,Kt(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:Cn(a,r),Nn(r),d&512&&(Jt||u===null||Lr(u,u.return)),u!==null&&d&4&&Bh(r,r.memoizedProps,u.memoizedProps);break;case 5:if(Cn(a,r),Nn(r),d&512&&(Jt||u===null||Lr(u,u.return)),r.flags&32){y=r.stateNode;try{eo(y,"")}catch(Me){bt(r,r.return,Me)}}d&4&&r.stateNode!=null&&(y=r.memoizedProps,Bh(r,y,u!==null?u.memoizedProps:y)),d&1024&&(Ph=!0);break;case 6:if(Cn(a,r),Nn(r),d&4){if(r.stateNode===null)throw Error(i(162));d=r.memoizedProps,u=r.stateNode;try{u.nodeValue=d}catch(Me){bt(r,r.return,Me)}}break;case 3:if(cc=null,y=vr,vr=lc(a.containerInfo),Cn(a,r),vr=y,Nn(r),d&4&&u!==null&&u.memoizedState.isDehydrated)try{jo(a.containerInfo)}catch(Me){bt(r,r.return,Me)}Ph&&(Ph=!1,cS(r));break;case 4:d=vr,vr=lc(r.stateNode.containerInfo),Cn(a,r),Nn(r),vr=d;break;case 12:Cn(a,r),Nn(r);break;case 31:Cn(a,r),Nn(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Xu(r,d)));break;case 13:Cn(a,r),Nn(r),r.child.flags&8192&&r.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(Qu=Fe()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Xu(r,d)));break;case 22:y=r.memoizedState!==null;var J=u!==null&&u.memoizedState!==null,ae=si,ce=Jt;if(si=ae||y,Jt=ce||J,Cn(a,r),Jt=ce,si=ae,Nn(r),d&8192)e:for(a=r.stateNode,a._visibility=y?a._visibility&-2:a._visibility|1,y&&(u===null||J||si||Jt||ja(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{U=J.stateNode;var de=J.memoizedProps.style,oe=de!=null&&de.hasOwnProperty("display")?de.display:null;U.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(Me){bt(J,J.return,Me)}}}else if(a.tag===6){if(u===null){J=a;try{J.stateNode.nodeValue=y?"":J.memoizedProps}catch(Me){bt(J,J.return,Me)}}}else if(a.tag===18){if(u===null){J=a;try{var le=J.stateNode;y?JS(le,!0):JS(J.stateNode,!1)}catch(Me){bt(J,J.return,Me)}}}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,Xu(r,u))));break;case 19:Cn(a,r),Nn(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Xu(r,d)));break;case 30:break;case 21:break;default:Cn(a,r),Nn(r)}}function Nn(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);Gu(r,x,y);break;case 5:var A=u.stateNode;u.flags&32&&(eo(A,""),u.flags&=-33);var U=Hh(r);Gu(r,U,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){bt(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 ui(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)iS(r,a.alternate,a),a=a.sibling}function ja(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:Hi(4,a,a.return),ja(a);break;case 1:Lr(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&J_(a,a.return,u),ja(a);break;case 27:Zs(a.stateNode);case 26:case 5:Lr(a,a.return),ja(a);break;case 22:a.memoizedState===null&&ja(a);break;case 30:ja(a);break;default:ja(a)}r=r.sibling}}function ci(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:ci(y,x,u),Us(4,x);break;case 1:if(ci(y,x,u),d=x,y=d.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(ae){bt(d,d.return,ae)}if(d=x,y=d.updateQueue,y!==null){var U=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],U)}catch(ae){bt(d,d.return,ae)}}u&&A&64&&W_(x),Ps(x,x.return);break;case 27:nS(x);case 26:case 5:ci(y,x,u),u&&d===null&&A&4&&eS(x),Ps(x,x.return);break;case 12:ci(y,x,u);break;case 31:ci(y,x,u),u&&A&4&&sS(y,x);break;case 13:ci(y,x,u),u&&A&4&&lS(y,x);break;case 22:x.memoizedState===null&&ci(y,x,u),Ps(x,x.return);break;case 30:break;default:ci(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&&Ts(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&&Ts(r))}function xr(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:xr(r,a,u,d),y&2048&&Us(9,a);break;case 1:xr(r,a,u,d);break;case 3:xr(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&&Ts(r)));break;case 12:if(y&2048){xr(r,a,u,d),r=a.stateNode;try{var x=a.memoizedProps,A=x.id,U=x.onPostCommit;typeof U=="function"&&U(A,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(J){bt(a,a.return,J)}}else xr(r,a,u,d);break;case 31:xr(r,a,u,d);break;case 13:xr(r,a,u,d);break;case 23:break;case 22:x=a.stateNode,A=a.alternate,a.memoizedState!==null?x._visibility&2?xr(r,a,u,d):Vs(r,a):x._visibility&2?xr(r,a,u,d):(x._visibility|=2,wo(r,a,u,d,(a.subtreeFlags&10256)!==0||!1)),y&2048&&Vh(A,a);break;case 24:xr(r,a,u,d),y&2048&&Fh(a.alternate,a);break;default:xr(r,a,u,d)}}function wo(r,a,u,d,y){for(y=y&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var x=r,A=a,U=u,J=d,ae=A.flags;switch(A.tag){case 0:case 11:case 15:wo(x,A,U,J,y),Us(8,A);break;case 23:break;case 22:var ce=A.stateNode;A.memoizedState!==null?ce._visibility&2?wo(x,A,U,J,y):Vs(x,A):(ce._visibility|=2,wo(x,A,U,J,y)),y&&ae&2048&&Vh(A.alternate,A);break;case 24:wo(x,A,U,J,y),y&&ae&2048&&Fh(A.alternate,A);break;default:wo(x,A,U,J,y)}a=a.sibling}}function Vs(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:Vs(u,d),y&2048&&Vh(d.alternate,d);break;case 24:Vs(u,d),y&2048&&Fh(d.alternate,d);break;default:Vs(u,d)}a=a.sibling}}var Fs=8192;function _o(r,a,u){if(r.subtreeFlags&Fs)for(r=r.child;r!==null;)dS(r,a,u),r=r.sibling}function dS(r,a,u){switch(r.tag){case 26:_o(r,a,u),r.flags&Fs&&r.memoizedState!==null&&OD(u,vr,r.memoizedState,r.memoizedProps);break;case 5:_o(r,a,u);break;case 3:case 4:var d=vr;vr=lc(r.stateNode.containerInfo),_o(r,a,u),vr=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=Fs,Fs=16777216,_o(r,a,u),Fs=d):_o(r,a,u));break;default:_o(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 $s(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];sn=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:$s(r),r.flags&2048&&Hi(9,r,r.return);break;case 3:$s(r);break;case 12:$s(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,Ku(r)):$s(r);break;default:$s(r)}}function Ku(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];sn=d,mS(d,r)}hS(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:Hi(8,a,a.return),Ku(a);break;case 22:u=a.stateNode,u._visibility&2&&(u._visibility&=-3,Ku(a));break;default:Ku(a)}r=r.sibling}}function mS(r,a){for(;sn!==null;){var u=sn;switch(u.tag){case 0:case 11:case 15:Hi(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:Ts(u.memoizedState.cache)}if(d=u.child,d!==null)d.return=u,sn=d;else e:for(u=r;sn!==null;){d=sn;var y=d.sibling,x=d.return;if(aS(d),d===u){sn=null;break e}if(y!==null){y.return=x,sn=y;break e}sn=x}}}var X4={getCacheForType:function(r){var a=cn(Qt),u=a.data.get(r);return u===void 0&&(u=r(),a.data.set(r,u)),u},cacheSignal:function(){return cn(Qt).controller.signal}},K4=typeof WeakMap=="function"?WeakMap:Map,gt=0,Nt=null,nt=null,at=0,xt=0,Bn=null,Ui=!1,So=!1,$h=!1,fi=0,Vt=0,Pi=0,Oa=0,Yh=0,Hn=0,Eo=0,Ys=null,kn=null,Gh=!1,Qu=0,gS=0,Zu=1/0,Wu=null,Vi=null,an=0,Fi=null,Co=null,di=0,Xh=0,Kh=null,yS=null,Gs=0,Qh=null;function Un(){return(gt&2)!==0&&at!==0?at&-at:z.T!==null?np():Tt()}function vS(){if(Hn===0)if((at&536870912)===0||st){var r=jr;jr<<=1,(jr&3932160)===0&&(jr=262144),Hn=r}else Hn=536870912;return r=qn.current,r!==null&&(r.flags|=32),Hn}function Tn(r,a,u){(r===Nt&&(xt===2||xt===9)||r.cancelPendingCommit!==null)&&(No(r,0),$i(r,at,Hn,!1)),Le(r,u),((gt&2)===0||r!==Nt)&&(r===Nt&&((gt&2)===0&&(Oa|=u),Vt===4&&$i(r,at,Hn,!1)),qr(r))}function xS(r,a,u){if((gt&6)!==0)throw Error(i(327));var d=!u&&(a&127)===0&&(a&r.expiredLanes)===0||hn(r,a),y=d?W4(r,a):Wh(r,a,!0),x=d;do{if(y===0){So&&!d&&$i(r,a,0,!1);break}else{if(u=r.current.alternate,x&&!Q4(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 U=r;y=Ys;var J=U.current.memoizedState.isDehydrated;if(J&&(No(U,A).flags|=256),A=Wh(U,A,!1),A!==2){if($h&&!J){U.errorRecoveryDisabledLanes|=x,Oa|=x,y=4;break e}x=kn,kn=y,x!==null&&(kn===null?kn=x:kn.push.apply(kn,x))}y=A}if(x=!1,y!==2)continue}}if(y===1){No(r,0),$i(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:$i(d,a,Hn,!Ui);break e;case 2:kn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(y=Qu+300-Fe(),10<y)){if($i(d,a,Hn,!Ui),Or(d,0,!0)!==0)break e;di=a,d.timeoutHandle=QS(bS.bind(null,d,u,kn,Wu,Gh,a,Hn,Oa,Eo,Ui,x,"Throttled",-0,0),y);break e}bS(d,u,kn,Wu,Gh,a,Hn,Oa,Eo,Ui,x,null,-0,0)}}break}while(!0);qr(r)}function bS(r,a,u,d,y,x,A,U,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:Zr},dS(a,x,de);var Me=(x&62914560)===x?Qu-Fe():(x&4194048)===x?gS-Fe():0;if(Me=zD(de,Me),Me!==null){di=x,r.cancelPendingCommit=Me(TS.bind(null,r,a,x,u,d,y,A,U,J,ce,de,null,oe,le)),$i(r,x,A,!ae);return}}TS(r,a,x,u,d,y,A,U,J)}function Q4(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(!Dn(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 $i(r,a,u,d){a&=~Yh,a&=~Oa,r.suspendedLanes|=a,r.pingedLanes&=~a,d&&(r.warmLanes|=a),d=r.expirationTimes;for(var y=a;0<y;){var x=31-ct(y),A=1<<x;d[x]=-1,y&=~A}u!==0&&Ie(r,u,a)}function Ju(){return(gt&6)===0?(Xs(0),!1):!0}function Zh(){if(nt!==null){if(xt===0)var r=nt.return;else r=nt,ti=Ea=null,hh(r),go=null,Rs=0,r=nt;for(;r!==null;)Z_(r.alternate,r),r=r.return;nt=null}}function No(r,a){var u=r.timeoutHandle;u!==-1&&(r.timeoutHandle=-1,gD(u)),u=r.cancelPendingCommit,u!==null&&(r.cancelPendingCommit=null,u()),di=0,Zh(),Nt=r,nt=u=Jr(r.current,null),at=a,xt=0,Bn=null,Ui=!1,So=hn(r,a),$h=!1,Eo=Hn=Yh=Oa=Pi=Vt=0,kn=Ys=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-ct(d),x=1<<y;a|=r[y],d&=~x}return fi=a,bu(),u}function wS(r,a){Ze=null,z.H=Is,a===mo||a===Tu?(a=qw(),xt=3):a===th?(a=qw(),xt=4):xt=a===Ah?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Bn=a,nt===null&&(Vt=1,Pu(r,Zn(a,r.current)))}function _S(){var r=qn.current;return r===null?!0:(at&4194048)===at?tr===null:(at&62914560)===at||(at&536870912)!==0?r===tr:!1}function SS(){var r=z.H;return z.H=Is,r===null?Is:r}function ES(){var r=z.A;return z.A=X4,r}function ec(){Vt=4,Ui||(at&4194048)!==at&&qn.current!==null||(So=!0),(Pi&134217727)===0&&(Oa&134217727)===0||Nt===null||$i(Nt,at,Hn,!1)}function Wh(r,a,u){var d=gt;gt|=2;var y=SS(),x=ES();(Nt!==r||at!==a)&&(Wu=null,No(r,a)),a=!1;var A=Vt;e:do try{if(xt!==0&&nt!==null){var U=nt,J=Bn;switch(xt){case 8:Zh(),A=6;break e;case 3:case 2:case 9:case 6:qn.current===null&&(a=!0);var ae=xt;if(xt=0,Bn=null,ko(r,U,J,ae),u&&So){A=0;break e}break;default:ae=xt,xt=0,Bn=null,ko(r,U,J,ae)}}Z4(),A=Vt;break}catch(ce){wS(r,ce)}while(!0);return a&&r.shellSuspendCounter++,ti=Ea=null,gt=d,z.H=y,z.A=x,nt===null&&(Nt=null,at=0,bu()),A}function Z4(){for(;nt!==null;)CS(nt)}function W4(r,a){var u=gt;gt|=2;var d=SS(),y=ES();Nt!==r||at!==a?(Wu=null,Zu=Fe()+500,No(r,a)):So=hn(r,a);e:do try{if(xt!==0&&nt!==null){a=nt;var x=Bn;t:switch(xt){case 1:xt=0,Bn=null,ko(r,a,x,1);break;case 2:case 9:if(Dw(x)){xt=0,Bn=null,NS(a);break}a=function(){xt!==2&&xt!==9||Nt!==r||(xt=7),qr(r)},x.then(a,a);break e;case 3:xt=7;break e;case 4:xt=5;break e;case 7:Dw(x)?(xt=0,Bn=null,NS(a)):(xt=0,Bn=null,ko(r,a,x,7));break;case 5:var A=null;switch(nt.tag){case 26:A=nt.memoizedState;case 5:case 27:var U=nt;if(A?fE(A):U.stateNode.complete){xt=0,Bn=null;var J=U.sibling;if(J!==null)nt=J;else{var ae=U.return;ae!==null?(nt=ae,tc(ae)):nt=null}break t}}xt=0,Bn=null,ko(r,a,x,5);break;case 6:xt=0,Bn=null,ko(r,a,x,6);break;case 8:Zh(),Vt=6;break e;default:throw Error(i(462))}}J4();break}catch(ce){wS(r,ce)}while(!0);return ti=Ea=null,z.H=d,z.A=y,gt=u,nt!==null?0:(Nt=null,at=0,bu(),Vt)}function J4(){for(;nt!==null&&!Se();)CS(nt)}function CS(r){var a=K_(r.alternate,r,fi);r.memoizedProps=r.pendingProps,a===null?tc(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,at);break;case 11:a=V_(u,a,a.pendingProps,a.type.render,a.ref,at);break;case 5:hh(a);default:Z_(u,a),a=nt=Ew(a,fi),a=K_(u,a,fi)}r.memoizedProps=r.pendingProps,a===null?tc(r):nt=a}function ko(r,a,u,d){ti=Ea=null,hh(a),go=null,Rs=0;var y=a.return;try{if(U4(r,y,a,u,at)){Vt=1,Pu(r,Zn(u,r.current)),nt=null;return}}catch(x){if(y!==null)throw nt=y,x;Vt=1,Pu(r,Zn(u,r.current)),nt=null;return}a.flags&32768?(st||d===1?r=!0:So||(at&536870912)!==0?r=!1:(Ui=r=!0,(d===2||d===9||d===3||d===6)&&(d=qn.current,d!==null&&d.tag===13&&(d.flags|=16384))),kS(a,r)):tc(a)}function tc(r){var a=r;do{if((a.flags&32768)!==0){kS(a,Ui);return}r=a.return;var u=F4(a.alternate,a,fi);if(u!==null){nt=u;return}if(a=a.sibling,a!==null){nt=a;return}nt=a=r}while(a!==null);Vt===0&&(Vt=5)}function kS(r,a){do{var u=$4(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);Vt=6,nt=null}function TS(r,a,u,d,y,x,A,U,J){r.cancelPendingCommit=null;do nc();while(an!==0);if((gt&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,Et(r,u,x,A,U,J),r===Nt&&(nt=Nt=null,at=0),Co=a,Fi=r,di=u,Xh=x,Kh=y,yS=d,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,rD(Ae,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=V.p,V.p=2,A=gt,gt|=4;try{Y4(r,a,u)}finally{gt=A,V.p=y,z.T=d}}an=1,AS(),RS(),MS()}}function AS(){if(an===1){an=0;var r=Fi,a=Co,u=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||u){u=z.T,z.T=null;var d=V.p;V.p=2;var y=gt;gt|=4;try{uS(a,r);var x=cp,A=mw(r.containerInfo),U=x.focusedElem,J=x.selectionRange;if(A!==U&&U&&U.ownerDocument&&pw(U.ownerDocument.documentElement,U)){if(J!==null&&Dd(U)){var ae=J.start,ce=J.end;if(ce===void 0&&(ce=ae),"selectionStart"in U)U.selectionStart=ae,U.selectionEnd=Math.min(ce,U.value.length);else{var de=U.ownerDocument||document,oe=de&&de.defaultView||window;if(oe.getSelection){var le=oe.getSelection(),Me=U.textContent.length,Ye=Math.min(J.start,Me),St=J.end===void 0?Ye:Math.min(J.end,Me);!le.extend&&Ye>St&&(A=St,St=Ye,Ye=A);var ne=hw(U,Ye),ee=hw(U,St);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>St?(le.addRange(ie),le.extend(ee.node,ee.offset)):(ie.setEnd(ee.node,ee.offset),le.addRange(ie))}}}}for(de=[],le=U;le=le.parentNode;)le.nodeType===1&&de.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<de.length;U++){var fe=de[U];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}pc=!!up,cp=up=null}finally{gt=y,V.p=d,z.T=u}}r.current=a,an=2}}function RS(){if(an===2){an=0;var r=Fi,a=Co,u=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||u){u=z.T,z.T=null;var d=V.p;V.p=2;var y=gt;gt|=4;try{iS(r,a.alternate,a)}finally{gt=y,V.p=d,z.T=u}}an=3}}function MS(){if(an===4||an===3){an=0,Ue();var r=Fi,a=Co,u=di,d=yS;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?an=5:(an=0,Co=Fi=null,jS(r,r.pendingLanes));var y=r.pendingLanes;if(y===0&&(Vi=null),qe(u),a=a.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(ft,a,void 0,(a.current.flags&128)===128)}catch{}if(d!==null){a=z.T,y=V.p,V.p=2,z.T=null;try{for(var x=r.onRecoverableError,A=0;A<d.length;A++){var U=d[A];x(U.value,{componentStack:U.stack})}}finally{z.T=a,V.p=y}}(di&3)!==0&&nc(),qr(r),y=r.pendingLanes,(u&261930)!==0&&(y&42)!==0?r===Qh?Gs++:(Gs=0,Qh=r):Gs=0,Xs(0)}}function jS(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,Ts(a)))}function nc(){return AS(),RS(),MS(),OS()}function OS(){if(an!==5)return!1;var r=Fi,a=Xh;Xh=0;var u=qe(di),d=z.T,y=V.p;try{V.p=32>u?32:u,z.T=null,u=Kh,Kh=null;var x=Fi,A=di;if(an=0,Co=Fi=null,di=0,(gt&6)!==0)throw Error(i(331));var U=gt;if(gt|=4,pS(x.current),fS(x,x.current,A,u),gt=U,Xs(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(ft,x)}catch{}return!0}finally{V.p=y,z.T=d,jS(r,a)}}function zS(r,a,u){a=Zn(u,a),a=Th(r.stateNode,a,2),r=qi(r,a,2),r!==null&&(Le(r,2),qr(r))}function bt(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"&&(Vi===null||!Vi.has(d))){r=Zn(u,r),u=D_(2),d=qi(a,u,2),d!==null&&(L_(u,d,a,r),Le(d,2),qr(d));break}}a=a.return}}function Jh(r,a,u){var d=r.pingCache;if(d===null){d=r.pingCache=new K4;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=eD.bind(null,r,a,u),a.then(r,r))}function eD(r,a,u){var d=r.pingCache;d!==null&&d.delete(a),r.pingedLanes|=r.suspendedLanes&u,r.warmLanes&=~u,Nt===r&&(at&u)===u&&(Vt===4||Vt===3&&(at&62914560)===at&&300>Fe()-Qu?(gt&2)===0&&No(r,0):Yh|=u,Eo===at&&(Eo=0)),qr(r)}function DS(r,a){a===0&&(a=we()),r=wa(r,a),r!==null&&(Le(r,a),qr(r))}function tD(r){var a=r.memoizedState,u=0;a!==null&&(u=a.retryLane),DS(r,u)}function nD(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 rD(r,a){return ye(r,a)}var rc=null,To=null,ep=!1,ic=!1,tp=!1,Yi=0;function qr(r){r!==To&&r.next===null&&(To===null?rc=To=r:To=To.next=r),ic=!0,ep||(ep=!0,aD())}function Xs(r,a){if(!tp&&ic){tp=!0;do for(var u=!1,d=rc;d!==null;){if(r!==0){var y=d.pendingLanes;if(y===0)var x=0;else{var A=d.suspendedLanes,U=d.pingedLanes;x=(1<<31-ct(42|r)+1)-1,x&=y&~(A&~U),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(u=!0,BS(d,x))}else x=at,x=Or(d,d===Nt?x:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(x&3)===0||hn(d,x)||(u=!0,BS(d,x));d=d.next}while(u);tp=!1}}function iD(){LS()}function LS(){ic=ep=!1;var r=0;Yi!==0&&mD()&&(r=Yi);for(var a=Fe(),u=null,d=rc;d!==null;){var y=d.next,x=qS(d,a);x===0?(d.next=null,u===null?rc=y:u.next=y,y===null&&(To=u)):(u=d,(r!==0||(x&3)!==0)&&(ic=!0)),d=y}an!==0&&an!==5||Xs(r),Yi!==0&&(Yi=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-ct(x),U=1<<A,J=y[A];J===-1?((U&u)===0||(U&d)!==0)&&(y[A]=dt(U,a)):J<=a&&(r.expiredLanes|=U),x&=~U}if(a=Nt,u=at,u=Or(r,r===a?u:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,u===0||r===a&&(xt===2||xt===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&He(d),r.callbackNode=null,r.callbackPriority=0;if((u&3)===0||hn(r,u)){if(a=u&-u,a===r.callbackPriority)return a;switch(d!==null&&He(d),qe(u)){case 2:case 8:u=me;break;case 32:u=Ae;break;case 268435456:u=Ge;break;default:u=Ae}return d=IS.bind(null,r),u=ye(u,d),r.callbackPriority=a,r.callbackNode=u,a}return d!==null&&d!==null&&He(d),r.callbackPriority=2,r.callbackNode=null,2}function IS(r,a){if(an!==0&&an!==5)return r.callbackNode=null,r.callbackPriority=0,null;var u=r.callbackNode;if(nc()&&r.callbackNode!==u)return null;var d=at;return d=Or(r,r===Nt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(xS(r,d,a),qS(r,Fe()),r.callbackNode!=null&&r.callbackNode===u?IS.bind(null,r):null)}function BS(r,a){if(nc())return null;xS(r,a,!0)}function aD(){yD(function(){(gt&6)!==0?ye(ue,iD):LS()})}function np(){if(Yi===0){var r=ho;r===0&&(r=hr,hr<<=1,(hr&261888)===0&&(hr=256)),Yi=r}return Yi}function HS(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:du(""+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 oD(r,a,u,d,y){if(a==="submit"&&u&&u.stateNode===y){var x=HS((y[Dt]||null).action),A=d.submitter;A&&(a=(a=A[Dt]||null)?HS(a.formAction):A.getAttribute("formAction"),a!==null&&(x=a,A=null));var U=new gu("action","action",null,d,y);r.push({event:U,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(Yi!==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"&&(U.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],sD=ip.toLowerCase(),lD=ip[0].toUpperCase()+ip.slice(1);yr(sD,"on"+lD)}yr(vw,"onAnimationEnd"),yr(xw,"onAnimationIteration"),yr(bw,"onAnimationStart"),yr("dblclick","onDoubleClick"),yr("focusin","onFocus"),yr("focusout","onBlur"),yr(E4,"onTransitionRun"),yr(C4,"onTransitionStart"),yr(N4,"onTransitionCancel"),yr(ww,"onTransitionEnd"),Ti("onMouseEnter",["mouseout","mouseover"]),Ti("onMouseLeave",["mouseout","mouseover"]),Ti("onPointerEnter",["pointerout","pointerover"]),Ti("onPointerLeave",["pointerout","pointerover"]),Kr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Kr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Kr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Kr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Kr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Kr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ks="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(" "),uD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ks));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 U=d[A],J=U.instance,ae=U.currentTarget;if(U=U.listener,J!==x&&y.isPropagationStopped())break e;x=U,y.currentTarget=ae;try{x(y)}catch(ce){xu(ce)}y.currentTarget=null,x=J}else for(A=0;A<d.length;A++){if(U=d[A],J=U.instance,ae=U.currentTarget,U=U.listener,J!==x&&y.isPropagationStopped())break e;x=U,y.currentTarget=ae;try{x(y)}catch(ce){xu(ce)}y.currentTarget=null,x=J}}}}function rt(r,a){var u=a[$t];u===void 0&&(u=a[$t]=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 ac="_reactListening"+Math.random().toString(36).slice(2);function op(r){if(!r[ac]){r[ac]=!0,ou.forEach(function(u){u!=="selectionchange"&&(uD.has(u)||ap(u,!1,r),ap(u,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[ac]||(a[ac]=!0,ap("selectionchange",!1,a))}}function VS(r,a,u,d){switch(vE(a)){case 2:var y=qD;break;case 8:y=ID;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 U=d.stateNode.containerInfo;if(U===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(;U!==null;){if(A=Ei(U),A===null)return;if(J=A.tag,J===5||J===6||J===26||J===27){d=x=A;continue e}U=U.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=gu,Me=r;switch(r){case"keypress":if(pu(u)===0)break e;case"keydown":case"keyup":le=n4;break;case"focusin":Me="focus",le=Rd;break;case"focusout":Me="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=a4;break;case vw:case xw:case bw:le=Gz;break;case ww:le=s4;break;case"scroll":case"scrollend":le=Pz;break;case"wheel":le=u4;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=f4}var Ye=(a&4)!==0,St=!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=ys(ee,ne),fe!=null&&Ye.push(Qs(ee,fe,ie))),St)break;ee=ee.return}0<Ye.length&&(oe=new le(oe,Me,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&&(Me=u.relatedTarget||u.fromElement)&&(Ei(Me)||Me[Lt]))break e;if((le||oe)&&(oe=ce.window===ce?ce:(oe=ce.ownerDocument)?oe.defaultView||oe.parentWindow:window,le?(Me=u.relatedTarget||u.toElement,le=ae,Me=Me?Ei(Me):null,Me!==null&&(St=s(Me),Ye=Me.tag,Me!==St||Ye!==5&&Ye!==27&&Ye!==6)&&(Me=null)):(le=null,Me=ae),le!==Me)){if(Ye=Z1,fe="onMouseLeave",ne="onMouseEnter",ee="mouse",(r==="pointerout"||r==="pointerover")&&(Ye=J1,fe="onPointerLeave",ne="onPointerEnter",ee="pointer"),St=le==null?oe:Ni(le),ie=Me==null?oe:Ni(Me),oe=new Ye(fe,ee+"leave",le,u,ce),oe.target=St,oe.relatedTarget=ie,fe=null,Ei(ce)===ae&&(Ye=new Ye(ne,ee+"enter",Me,u,ce),Ye.target=ie,Ye.relatedTarget=St,fe=Ye),St=fe,le&&Me)t:{for(Ye=cD,ne=le,ee=Me,ie=0,fe=ne;fe;fe=Ye(fe))ie++;fe=0;for(var Be=ee;Be;Be=Ye(Be))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),Me!==null&&St!==null&&FS(de,St,Me,Ye,!0)}}e:{if(oe=ae?Ni(ae):window,le=oe.nodeName&&oe.nodeName.toLowerCase(),le==="select"||le==="input"&&oe.type==="file")var ht=sw;else if(aw(oe))if(lw)ht=w4;else{ht=x4;var De=v4}else le=oe.nodeName,!le||le.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?ae&&_d(ae.elementType)&&(ht=sw):ht=b4;if(ht&&(ht=ht(r,ae))){ow(de,ht,u,ce);break e}De&&De(r,oe,ae),r==="focusout"&&ae&&oe.type==="number"&&ae.memoizedProps.value!=null&&gs(oe,"number",oe.value)}switch(De=ae?Ni(ae):window,r){case"focusin":(aw(De)||De.contentEditable==="true")&&(io=De,Ld=ae,Cs=null);break;case"focusout":Cs=Ld=io=null;break;case"mousedown":qd=!0;break;case"contextmenu":case"mouseup":case"dragend":qd=!1,gw(de,u,ce);break;case"selectionchange":if(S4)break;case"keydown":case"keyup":gw(de,u,ce)}var We;if(jd)e:{switch(r){case"compositionstart":var ot="onCompositionStart";break e;case"compositionend":ot="onCompositionEnd";break e;case"compositionupdate":ot="onCompositionUpdate";break e}ot=void 0}else ro?rw(r,u)&&(ot="onCompositionEnd"):r==="keydown"&&u.keyCode===229&&(ot="onCompositionStart");ot&&(ew&&u.locale!=="ko"&&(ro||ot!=="onCompositionStart"?ot==="onCompositionEnd"&&ro&&(We=K1()):(Ri=ce,kd="value"in Ri?Ri.value:Ri.textContent,ro=!0)),De=oc(ae,ot),0<De.length&&(ot=new W1(ot,r,null,u,ce),de.push({event:ot,listeners:De}),We?ot.data=We:(We=iw(u),We!==null&&(ot.data=We)))),(We=h4?p4(r,u):m4(r,u))&&(ot=oc(ae,"onBeforeInput"),0<ot.length&&(De=new W1("onBeforeInput","beforeinput",null,u,ce),de.push({event:De,listeners:ot}),De.data=We)),oD(de,r,ae,u,ce)}PS(de,a)})}function Qs(r,a,u){return{instance:r,listener:a,currentTarget:u}}function oc(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=ys(r,u),y!=null&&d.unshift(Qs(r,y,x)),y=ys(r,a),y!=null&&d.push(Qs(r,y,x))),r.tag===3)return d;r=r.return}return[]}function cD(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 U=u,J=U.alternate,ae=U.stateNode;if(U=U.tag,J!==null&&J===d)break;U!==5&&U!==26&&U!==27||ae===null||(J=ae,y?(ae=ys(u,x),ae!=null&&A.unshift(Qs(u,ae,J))):y||(ae=ys(u,x),ae!=null&&A.push(Qs(u,ae,J)))),u=u.return}A.length!==0&&r.push({event:a,listeners:A})}var fD=/\r\n?/g,dD=/\u0000|\uFFFD/g;function $S(r){return(typeof r=="string"?r:""+r).replace(fD,`
|
|
49
|
+
`).replace(dD,"")}function YS(r,a){return a=$S(a),$S(r)===a}function _t(r,a,u,d,y,x){switch(u){case"children":typeof d=="string"?a==="body"||a==="textarea"&&d===""||eo(r,d):(typeof d=="number"||typeof d=="bigint")&&a!=="body"&&eo(r,""+d);break;case"className":Ja(r,"class",d);break;case"tabIndex":Ja(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Ja(r,u,d);break;case"style":Y1(r,d,x);break;case"data":if(a!=="object"){Ja(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=du(""+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"&&_t(r,a,"name",y.name,y,null),_t(r,a,"formEncType",y.formEncType,y,null),_t(r,a,"formMethod",y.formMethod,y,null),_t(r,a,"formTarget",y.formTarget,y,null)):(_t(r,a,"encType",y.encType,y,null),_t(r,a,"method",y.method,y,null),_t(r,a,"target",y.target,y,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(u);break}d=du(""+d),r.setAttribute(u,d);break;case"onClick":d!=null&&(r.onclick=Zr);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=du(""+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),Wa(r,"popover",d);break;case"xlinkActuate":gr(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":gr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":gr(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":gr(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":gr(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":gr(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":gr(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":gr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":gr(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Wa(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,Wa(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"?eo(r,d):(typeof d=="number"||typeof d=="bigint")&&eo(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=Zr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!su.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[Dt]||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,""):Wa(r,u,d)}}}function dn(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:_t(r,a,x,A,u,null)}}y&&_t(r,a,"srcSet",u.srcSet,u,null),d&&_t(r,a,"src",u.src,u,null);return;case"input":rt("invalid",r);var U=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":U=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(i(137,a));break;default:_t(r,a,d,ce,u,null)}}fu(r,x,U,J,ae,A,y,!1);return;case"select":rt("invalid",r),d=A=x=null;for(y in u)if(u.hasOwnProperty(y)&&(U=u[y],U!=null))switch(y){case"value":x=U;break;case"defaultValue":A=U;break;case"multiple":d=U;default:_t(r,a,y,U,u,null)}a=x,u=A,r.multiple=!!d,a!=null?Qr(r,!!d,a,!1):u!=null&&Qr(r,!!d,u,!0);return;case"textarea":rt("invalid",r),x=y=d=null;for(A in u)if(u.hasOwnProperty(A)&&(U=u[A],U!=null))switch(A){case"value":d=U;break;case"defaultValue":y=U;break;case"children":x=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(i(91));break;default:_t(r,a,A,U,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:_t(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<Ks.length;d++)rt(Ks[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:_t(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(U in u)u.hasOwnProperty(U)&&(d=u[U],d!=null&&_t(r,a,U,d,u,null))}function hD(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,U=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)||_t(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":U=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(i(137,a));break;default:le!==de&&_t(r,a,oe,le,d,de)}}ya(r,A,U,J,ae,ce,x,y);return;case"select":le=A=U=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)||_t(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":U=x;break;case"multiple":A=x;default:x!==J&&_t(r,a,y,x,d,J)}a=U,u=A,d=le,oe!=null?Qr(r,!!u,oe,!1):!!d!=!!u&&(a!=null?Qr(r,!!u,a,!0):Qr(r,!!u,u?[]:"",!1));return;case"textarea":le=oe=null;for(U in u)if(y=u[U],u.hasOwnProperty(U)&&y!=null&&!d.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:_t(r,a,U,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&&_t(r,a,A,y,d,x)}V1(r,oe,le);return;case"option":for(var Me in u)if(oe=u[Me],u.hasOwnProperty(Me)&&oe!=null&&!d.hasOwnProperty(Me))switch(Me){case"selected":r.selected=!1;break;default:_t(r,a,Me,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:_t(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)&&_t(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:_t(r,a,ae,oe,d,le)}return;default:if(_d(a)){for(var St in u)oe=u[St],u.hasOwnProperty(St)&&oe!==void 0&&!d.hasOwnProperty(St)&&lp(r,a,St,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)&&_t(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||_t(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 pD(){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,U=y.duration;if(x&&U&&GS(A)){for(A=0,U=y.responseEnd,d+=1;d<u.length;d++){var J=u[d],ae=J.startTime;if(ae>U)break;var ce=J.transferSize,de=J.initiatorType;ce&&GS(de)&&(J=J.responseEnd,A+=ce*(J<U?1:(U-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 sc(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 mD(){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,gD=typeof clearTimeout=="function"?clearTimeout:void 0,ZS=typeof Promise=="function"?Promise:void 0,yD=typeof queueMicrotask=="function"?queueMicrotask:typeof ZS<"u"?function(r){return ZS.resolve(null).then(r).catch(vD)}:QS;function vD(r){setTimeout(function(){throw r})}function Gi(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),jo(a);return}d--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")d++;else if(u==="html")Zs(r.ownerDocument.documentElement);else if(u==="head"){u=r.ownerDocument.head,Zs(u);for(var x=u.firstChild;x;){var A=x.nextSibling,U=x.nodeName;x[Kn]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&x.rel.toLowerCase()==="stylesheet"||u.removeChild(x),x=A}}else u==="body"&&Zs(r.ownerDocument.body);u=y}while(u);jo(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),ma(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}r.removeChild(u)}}function xD(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[Kn])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=nr(r.nextSibling),r===null)break}return null}function bD(r,a,u){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!u||(r=nr(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=nr(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 wD(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 nr(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 nr(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=sc(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 Zs(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);ma(r)}var rr=new Map,iE=new Set;function lc(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var hi=V.d;V.d={f:_D,r:SD,D:ED,C:CD,L:ND,m:kD,X:AD,S:TD,M:RD};function _D(){var r=hi.f(),a=Ju();return r||a}function SD(r){var a=Ci(r);a!==null&&a.tag===5&&a.type==="form"?w_(a):hi.r(r)}var Ao=typeof document>"u"?null:document;function aE(r,a,u){var d=Ao;if(d&&typeof a=="string"&&a){var y=_n(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"),dn(a,"link",r),Kt(a),d.head.appendChild(a)))}}function ED(r){hi.D(r),aE("dns-prefetch",r,null)}function CD(r,a){hi.C(r,a),aE("preconnect",r,a)}function ND(r,a,u){hi.L(r,a,u);var d=Ao;if(d&&r&&a){var y='link[rel="preload"][as="'+_n(a)+'"]';a==="image"&&u&&u.imageSrcSet?(y+='[imagesrcset="'+_n(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(y+='[imagesizes="'+_n(u.imageSizes)+'"]')):y+='[href="'+_n(r)+'"]';var x=y;switch(a){case"style":x=Ro(r);break;case"script":x=Mo(r)}rr.has(x)||(r=m({rel:"preload",href:a==="image"&&u&&u.imageSrcSet?void 0:r,as:a},u),rr.set(x,r),d.querySelector(y)!==null||a==="style"&&d.querySelector(Ws(x))||a==="script"&&d.querySelector(Js(x))||(a=d.createElement("link"),dn(a,"link",r),Kt(a),d.head.appendChild(a)))}}function kD(r,a){hi.m(r,a);var u=Ao;if(u&&r){var d=a&&typeof a.as=="string"?a.as:"script",y='link[rel="modulepreload"][as="'+_n(d)+'"][href="'+_n(r)+'"]',x=y;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Mo(r)}if(!rr.has(x)&&(r=m({rel:"modulepreload",href:r},a),rr.set(x,r),u.querySelector(y)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Js(x)))return}d=u.createElement("link"),dn(d,"link",r),Kt(d),u.head.appendChild(d)}}}function TD(r,a,u){hi.S(r,a,u);var d=Ao;if(d&&r){var y=ki(d).hoistableStyles,x=Ro(r);a=a||"default";var A=y.get(x);if(!A){var U={loading:0,preload:null};if(A=d.querySelector(Ws(x)))U.loading=5;else{r=m({rel:"stylesheet",href:r,"data-precedence":a},u),(u=rr.get(x))&&yp(r,u);var J=A=d.createElement("link");Kt(J),dn(J,"link",r),J._p=new Promise(function(ae,ce){J.onload=ae,J.onerror=ce}),J.addEventListener("load",function(){U.loading|=1}),J.addEventListener("error",function(){U.loading|=2}),U.loading|=4,uc(A,a,d)}A={type:"stylesheet",instance:A,count:1,state:U},y.set(x,A)}}}function AD(r,a){hi.X(r,a);var u=Ao;if(u&&r){var d=ki(u).hoistableScripts,y=Mo(r),x=d.get(y);x||(x=u.querySelector(Js(y)),x||(r=m({src:r,async:!0},a),(a=rr.get(y))&&vp(r,a),x=u.createElement("script"),Kt(x),dn(x,"link",r),u.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},d.set(y,x))}}function RD(r,a){hi.M(r,a);var u=Ao;if(u&&r){var d=ki(u).hoistableScripts,y=Mo(r),x=d.get(y);x||(x=u.querySelector(Js(y)),x||(r=m({src:r,async:!0,type:"module"},a),(a=rr.get(y))&&vp(r,a),x=u.createElement("script"),Kt(x),dn(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=Z.current)?lc(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=Ro(u.href),u=ki(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=Ro(u.href);var x=ki(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(Ws(r)))&&!x._p&&(A.instance=x,A.state.loading=5),rr.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},rr.set(r,u),x||MD(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=Mo(u),u=ki(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 Ro(r){return'href="'+_n(r)+'"'}function Ws(r){return'link[rel="stylesheet"]['+r+"]"}function sE(r){return m({},r,{"data-precedence":r.precedence,precedence:null})}function MD(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}),dn(a,"link",u),Kt(a),r.head.appendChild(a))}function Mo(r){return'[src="'+_n(r)+'"]'}function Js(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~="'+_n(u.href)+'"]');if(d)return a.instance=d,Kt(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"),Kt(d),dn(d,"style",y),uc(d,u.precedence,r),a.instance=d;case"stylesheet":y=Ro(u.href);var x=r.querySelector(Ws(y));if(x)return a.state.loading|=4,a.instance=x,Kt(x),x;d=sE(u),(y=rr.get(y))&&yp(d,y),x=(r.ownerDocument||r).createElement("link"),Kt(x);var A=x;return A._p=new Promise(function(U,J){A.onload=U,A.onerror=J}),dn(x,"link",d),a.state.loading|=4,uc(x,u.precedence,r),a.instance=x;case"script":return x=Mo(u.src),(y=r.querySelector(Js(x)))?(a.instance=y,Kt(y),y):(d=u,(y=rr.get(x))&&(d=m({},u),vp(d,y)),r=r.ownerDocument||r,y=r.createElement("script"),Kt(y),dn(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,uc(d,u.precedence,r));return a.instance}function uc(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 U=d[A];if(U.dataset.precedence===a)x=U;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 cc=null;function uE(r,a,u){if(cc===null){var d=new Map,y=cc=new Map;y.set(u,d)}else y=cc,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[Kn]||x[$e]||r==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var A=x.getAttribute(a)||"";A=r+A;var U=d.get(A);U?U.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 jD(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 OD(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=Ro(d.href),x=a.querySelector(Ws(y));if(x){a=x._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=fc.bind(r),a.then(r,r)),u.state.loading|=4,u.instance=x,Kt(x);return}x=a.ownerDocument||a,d=sE(d),(y=rr.get(y))&&yp(d,y),x=x.createElement("link"),Kt(x);var A=x;A._p=new Promise(function(U,J){A.onload=U,A.onerror=J}),dn(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=fc.bind(r),a.addEventListener("load",u),a.addEventListener("error",u))}}var xp=0;function zD(r,a){return r.stylesheets&&r.count===0&&hc(r,r.stylesheets),0<r.count||0<r.imgCount?function(u){var d=setTimeout(function(){if(r.stylesheets&&hc(r,r.stylesheets),r.unsuspend){var x=r.unsuspend;r.unsuspend=null,x()}},6e4+a);0<r.imgBytes&&xp===0&&(xp=62500*pD());var y=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&hc(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 fc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hc(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var dc=null;function hc(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,dc=new Map,a.forEach(DD,r),dc=null,fc.call(r))}function DD(r,a){if(!(a.state.loading&4)){var u=dc.get(r);if(u)var d=u.get(null);else{u=new Map,dc.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=fc.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 el={$$typeof:N,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function LD(r,a,u,d,y,x,A,U,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=_e(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_e(0),this.hiddenUpdates=_e(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,U,J,ae,ce,de){return r=new LD(r,a,u,A,J,ae,ce,de,U),a=1,x===!0&&(a|=24),x=Ln(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=so,r):so}function pE(r,a,u,d,y,x){y=hE(y),d.context===null?d.context=y:d.pendingContext=y,d=Li(a),d.payload={element:u},x=x===void 0?null:x,x!==null&&(d.callback=x),u=qi(r,d,a),u!==null&&(Tn(u,r,a),js(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=wa(r,67108864);a!==null&&Tn(a,r,67108864),bp(r,67108864)}}function yE(r){if(r.tag===13||r.tag===31){var a=Un();a=Te(a);var u=wa(r,a);u!==null&&Tn(u,r,a),bp(r,a)}}var pc=!0;function qD(r,a,u,d){var y=z.T;z.T=null;var x=V.p;try{V.p=2,wp(r,a,u,d)}finally{V.p=x,z.T=y}}function ID(r,a,u,d){var y=z.T;z.T=null;var x=V.p;try{V.p=8,wp(r,a,u,d)}finally{V.p=x,z.T=y}}function wp(r,a,u,d){if(pc){var y=_p(d);if(y===null)sp(r,a,d,mc,u),xE(r,d);else if(HD(y,r,a,u,d))d.stopPropagation();else if(xE(r,d),a&4&&-1<BD.indexOf(r)){for(;y!==null;){var x=Ci(y);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var A=yn(x.pendingLanes);if(A!==0){var U=x;for(U.pendingLanes|=2,U.entangledLanes|=2;A;){var J=1<<31-ct(A);U.entanglements[1]|=J,A&=~J}qr(x),(gt&6)===0&&(Zu=Fe()+500,Xs(0))}}break;case 31:case 13:U=wa(x,2),U!==null&&Tn(U,x,2),Ju(),bp(x,2)}if(x=_p(d),x===null&&sp(r,a,d,mc,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 mc=null;function Sp(r){if(mc=null,r=Ei(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 mc=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(kt()){case ue:return 2;case me:return 8;case Ae:case Ve:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Ep=!1,Xi=null,Ki=null,Qi=null,tl=new Map,nl=new Map,Zi=[],BD="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":Xi=null;break;case"dragenter":case"dragleave":Ki=null;break;case"mouseover":case"mouseout":Qi=null;break;case"pointerover":case"pointerout":tl.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":nl.delete(a.pointerId)}}function rl(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=Ci(a),a!==null&&gE(a)),r):(r.eventSystemFlags|=d,a=r.targetContainers,y!==null&&a.indexOf(y)===-1&&a.push(y),r)}function HD(r,a,u,d,y){switch(a){case"focusin":return Xi=rl(Xi,r,a,u,d,y),!0;case"dragenter":return Ki=rl(Ki,r,a,u,d,y),!0;case"mouseover":return Qi=rl(Qi,r,a,u,d,y),!0;case"pointerover":var x=y.pointerId;return tl.set(x,rl(tl.get(x)||null,r,a,u,d,y)),!0;case"gotpointercapture":return x=y.pointerId,nl.set(x,rl(nl.get(x)||null,r,a,u,d,y)),!0}return!1}function bE(r){var a=Ei(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,Ct(r.priority,function(){yE(u)});return}}else if(a===31){if(a=c(u),a!==null){r.blockedOn=a,Ct(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 gc(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=Ci(u),a!==null&&gE(a),r.blockedOn=u,!1;a.shift()}return!0}function wE(r,a,u){gc(r)&&u.delete(a)}function UD(){Ep=!1,Xi!==null&&gc(Xi)&&(Xi=null),Ki!==null&&gc(Ki)&&(Ki=null),Qi!==null&&gc(Qi)&&(Qi=null),tl.forEach(wE),nl.forEach(wE)}function yc(r,a){r.blockedOn===a&&(r.blockedOn=null,Ep||(Ep=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,UD)))}var vc=null;function _E(r){vc!==r&&(vc=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){vc===r&&(vc=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=Ci(u);x!==null&&(r.splice(a,3),a-=3,_h(x,{pending:!0,data:y,method:u.method,action:d},d,y))}}))}function jo(r){function a(J){return yc(J,r)}Xi!==null&&yc(Xi,r),Ki!==null&&yc(Ki,r),Qi!==null&&yc(Qi,r),tl.forEach(a),nl.forEach(a);for(var u=0;u<Zi.length;u++){var d=Zi[u];d.blockedOn===r&&(d.blockedOn=null)}for(;0<Zi.length&&(u=Zi[0],u.blockedOn===null);)bE(u),u.blockedOn===null&&Zi.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[Dt]||null;if(typeof x=="function")A||_E(u);else if(A){var U=null;if(x&&x.hasAttribute("formAction")){if(y=x,A=x[Dt]||null)U=A.formAction;else if(Sp(y)!==null)continue}else U=A.action;typeof U=="function"?u[d+1]=U:(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}xc.prototype.render=Cp.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var u=a.current,d=Un();pE(u,d,r,a,null,null)},xc.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),Ju(),a[Lt]=null}};function xc(r){this._internalRoot=r}xc.prototype.unstable_scheduleHydration=function(r){if(r){var a=Tt();r={blockedOn:null,target:r,priority:a};for(var u=0;u<Zi.length&&a!==0&&a<Zi[u].priority;u++);Zi.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"));V.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 PD={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bc.isDisabled&&bc.supportsFiber)try{ft=bc.inject(PD),ut=bc}catch{}}return al.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[Lt]=a.current,op(r),new Cp(a)},al.hydrateRoot=function(r,a,u){if(!o(r))throw Error(i(299));var d=!1,y="",x=M_,A=j_,U=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&&(U=u.onRecoverableError),u.formState!==void 0&&(J=u.formState)),a=dE(r,1,!0,a,u??null,d,y,J,x,A,U,SE),a.context=hE(null),u=a.current,d=Un(),d=Te(d),y=Li(d),y.callback=null,qi(u,y,d),u=d,a.current.lanes=u,Le(a,u),qr(a),r[Lt]=a.current,op(r),new xc(a)},al.version="19.2.4",al}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=JD(),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:Ml(o)}return iL(t,n,null,e)}function It(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cr(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"?es(t):t,state:n,key:t&&t.key||i||rL(),unstable_mask:o}}function Ml({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 es(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(),_=S==null?null:S-h;h=S,f&&f({action:c,location:E.location,delta:_})}function g(S,_){c="PUSH";let C=LE(S)?S:zx(E.location,S,_);h=p()+1;let N=qE(C,h),k=E.createHref(C.unstable_mask||C);try{l.pushState(N,"",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,_){c="REPLACE";let C=LE(S)?S:zx(E.location,S,_);h=p();let N=qE(C,h),k=E.createHref(C.unstable_mask||C);l.replaceState(N,"",k),s&&f&&f({action:c,location:E.location,delta:0})}function w(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:w,encodeLocation(S){let _=w(S);return{pathname:_.pathname,search:_.search,hash:_.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),It(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:Ml(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"?es(t):t,s=xi(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;It(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=Ur([i,p.relativePath]),g=n.concat(p);l.children&&l.children.length>0&&(It(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=uf({path:f.relativePath,caseSensitive:f.caseSensitive,end:h},p),g=f.route;if(!m&&h&&n&&!i[i.length-1].route.index&&(m=uf({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},p)),!m)return null;Object.assign(o,m.params),l.push({params:o,pathname:Ur([s,m.pathname]),pathnameBase:_L(Ur([s,m.pathnameBase])),route:g}),m.pathnameBase!=="/"&&(s=Ur([s,m.pathnameBase]))}return l}function uf(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 w=c[g]||"";l=s.slice(0,s.length-w.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){cr(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 cr(!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 xi(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"?es(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 Af(e,t,n,i=!1){let o;typeof e=="string"?o=es(e):(o={...e},It(!o.pathname||!o.pathname.includes("?"),jp("?","pathname","search",o)),It(!o.pathname||!o.pathname.includes("#"),jp("#","pathname","hash",o)),It(!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 Ur=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=xi(l.pathname,t);l.origin===s.origin&&c!=null?n=c+l.search+l.hash:o=!0}catch{cr(!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 ts=T.createContext(null);ts.displayName="DataRouter";var Rf=T.createContext(null);Rf.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 Yn=T.createContext(null);Yn.displayName="Navigation";var $l=T.createContext(null);$l.displayName="Location";var Tr=T.createContext({outlet:null,matches:[],isDataRoute:!1});Tr.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}={}){It(ns(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=T.useContext(Yn),{hash:o,pathname:s,search:l}=Yl(e,{relative:t}),c=s;return n!=="/"&&(c=s==="/"?n:Ur([n,s])),i.createHref({pathname:c,search:l,hash:o})}function ns(){return T.useContext($l)!=null}function Yr(){return It(ns(),"useLocation() may be used only in the context of a <Router> component."),T.useContext($l).location}var ZM="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function WM(e){T.useContext(Yn).static||T.useLayoutEffect(e)}function Mf(){let{isDataRoute:e}=T.useContext(Tr);return e?QL():qL()}function qL(){It(ns(),"useNavigate() may be used only in the context of a <Router> component.");let e=T.useContext(ts),{basename:t,navigator:n}=T.useContext(Yn),{matches:i}=T.useContext(Tr),{pathname:o}=Yr(),s=JSON.stringify(wb(i)),l=T.useRef(!1);return WM(()=>{l.current=!0}),T.useCallback((f,h={})=>{if(cr(l.current,ZM),!l.current)return;if(typeof f=="number"){n.go(f);return}let p=Af(f,JSON.parse(s),o,h.relative==="path");e==null&&t!=="/"&&(p.pathname=p.pathname==="/"?t:Ur([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(Tr),t=e[e.length-1];return t?t.params:{}}function Yl(e,{relative:t}={}){let{matches:n}=T.useContext(Tr),{pathname:i}=Yr(),o=JSON.stringify(wb(n));return T.useMemo(()=>Af(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;It(ns(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=T.useContext(Yn),{matches:o}=T.useContext(Tr),s=o[o.length-1],l=s?s.params:{},c=s?s.pathname:"/",f=s?s.pathnameBase:"/",h=s&&s.route;{let _=h&&h.path||"";t3(c,!h||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${_}">) 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="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let p=Yr(),m;if(t){let _=typeof t=="string"?es(t):t;It(f==="/"||((S=_.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 "${_.pathname}" was given in the \`location\` prop.`),m=_}else m=p;let g=m.pathname||"/",v=g;if(f!=="/"){let _=f.replace(/^\//,"").split("/");v="/"+g.replace(/^\//,"").split("/").slice(_.length).join("/")}let w=VM(e,{pathname:v});cr(h||w!=null,`No routes matched location "${m.pathname}${m.search}${m.hash}" `),cr(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.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(w&&w.map(_=>Object.assign({},_,{params:Object.assign({},l,_.params),pathname:Ur([f,i.encodeLocation?i.encodeLocation(_.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?f:Ur([f,i.encodeLocation?i.encodeLocation(_.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),o,n);return t&&E?T.createElement($l.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(Tr.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(Yn);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(ts);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),T.createElement(Tr.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);It(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,w=m.route.loader&&!g.hasOwnProperty(m.route.id)&&(!v||v[m.route.id]===void 0);if(m.route.lazy||w){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,w=!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"),w=!0,S=null):c===g&&(w=!0,S=m.route.hydrateFallbackElement||null)));let _=t.concat(o.slice(0,g+1)),C=()=>{let N;return v?N=E:w?N=S:m.route.Component?N=T.createElement(m.route.Component,null):m.route.element?N=m.route.element:N=p,T.createElement(VL,{match:m,routeContext:{outlet:p,matches:_,isDataRoute:i!=null},children:N})};return i&&(m.route.ErrorBoundary||m.route.errorElement||g===0)?T.createElement(e3,{location:i.location,revalidation:i.revalidation,component:E,error:v,children:C(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:h}):C()},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(ts);return It(t,Sb(e)),t}function YL(e){let t=T.useContext(Rf);return It(t,Sb(e)),t}function GL(e){let t=T.useContext(Tr);return It(t,Sb(e)),t}function Eb(e){let t=GL(e),n=t.matches[t.matches.length-1];return It(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={})=>{cr(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,cr(!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}){It(ns(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=T.useContext(Yn);cr(!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(Tr),{pathname:l}=Yr(),c=Mf(),f=Af(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){It(!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}){It(!ns(),"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=es(n));let{pathname:h="/",search:p="",hash:m="",state:g=null,key:v="default",unstable_mask:w}=n,E=T.useMemo(()=>{let S=xi(h,c);return S==null?null:{location:{pathname:S,search:p,hash:m,state:g,key:v,unstable_mask:w},navigationType:i}},[c,h,p,m,g,v,i,w]);return cr(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(Yn.Provider,{value:f},T.createElement($l.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}It(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>`),It(!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 Yc="get",Gc="application/x-www-form-urlencoded";function jf(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function tq(e){return jf(e)&&e.tagName.toLowerCase()==="button"}function nq(e){return jf(e)&&e.tagName.toLowerCase()==="form"}function rq(e){return jf(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 Sc=null;function sq(){if(Sc===null)try{new FormData(document.createElement("form"),0),Sc=!1}catch{Sc=!0}return Sc}var lq=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function zp(e){return e!=null&&!lq.has(e)?(cr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gc}"`),null):e}function uq(e,t){let n,i,o,s,l;if(nq(e)){let c=e.getAttribute("action");i=c?xi(c,t):null,n=e.getAttribute("method")||Yc,o=zp(e.getAttribute("enctype"))||Gc,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?xi(f,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||Yc,o=zp(e.getAttribute("formenctype"))||zp(c.getAttribute("enctype"))||Gc,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(jf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Yc,i=null,o=Gc,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&&xi(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(ts);return Cb(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function vq(){let e=T.useContext(Rf);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=_=>{_.forEach(C=>{l(C.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)},w=()=>{o(!1),l(!1)};return n?e!=="intent"?[s,g,{}]:[s,g,{onFocus:ol(c,v),onBlur:ol(f,w),onMouseEnter:ol(h,v),onMouseLeave:ol(p,w),onTouchStart:ol(m,v)}]:[!1,g,{}]}function ol(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=Yr(),{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(C=>{var k;let N=s.routes[C.route.id];!N||!N.hasLoader||(!p.some(M=>M.route.id===C.route.id)&&C.route.id in f&&((k=l[C.route.id])!=null&&k.shouldRevalidate)||N.hasClientLoader?S=!0:E.add(C.route.id))}),E.size===0)return[];let _=cq(e,c,o.unstable_trailingSlashAwareDataRequests,"data");return S&&E.size>0&&_.searchParams.set("_routes",t.filter(C=>E.has(C.route.id)).map(C=>C.route.id).join(",")),[_.pathname+_.search]},[c,o.unstable_trailingSlashAwareDataRequests,f,i,s,p,t,e,l]),v=T.useMemo(()=>pq(m,s),[m,s]),w=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})),w.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,jl=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,...w},E){let{basename:S,navigator:_,unstable_useTransitions:C}=T.useContext(Yn),N=typeof p=="string"&&i3.test(p),k=GM(p,S);p=k.to;let M=LL(p,{relative:o}),R=Yr(),O=null;if(c){let B=Af(c,[],R.unstable_mask?R.unstable_mask.pathname:"/",!0);S!=="/"&&(B.pathname=B.pathname==="/"?S:Ur([S,B.pathname])),O=_.createHref(B)}let[I,P,K]=xq(i,w),H=Aq(p,{replace:l,unstable_mask:c,state:f,target:h,preventScrollReset:m,relative:o,viewTransition:g,unstable_defaultShouldRevalidate:v,unstable_useTransitions:C});function F(B){t&&t(B),B.defaultPrevented||H(B)}let X=!(k.isExternal||s),L=T.createElement("a",{...w,...K,href:(X?O:void 0)||k.absoluteURL||M,onClick:X?F:t,ref:Sq(E,P),target:h,"data-discover":!N&&n==="render"?"true":void 0});return I&&!N?T.createElement(T.Fragment,null,L,T.createElement(bq,{page:M})):L});jl.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=Yl(l,{relative:h.relative}),g=Yr(),v=T.useContext(Rf),{navigator:w,basename:E}=T.useContext(Yn),S=v!=null&&Dq(m)&&c===!0,_=w.encodeLocation?w.encodeLocation(m).pathname:m.pathname,C=g.pathname,N=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(C=C.toLowerCase(),N=N?N.toLowerCase():null,_=_.toLowerCase()),N&&E&&(N=xi(N,E)||N);const k=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let M=C===_||!o&&C.startsWith(_)&&C.charAt(k)==="/",R=N!=null&&(N===_||!o&&N.startsWith(_)&&N.charAt(_.length)==="/"),O={isActive:M,isPending:R,isTransitioning:S},I=M?t:void 0,P;typeof i=="function"?P=i(O):P=[i,M?"active":null,R?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let K=typeof s=="function"?s(O):s;return T.createElement(jl,{...h,"aria-current":I,className:P,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=Yc,action:c,onSubmit:f,relative:h,preventScrollReset:p,viewTransition:m,unstable_defaultShouldRevalidate:g,...v},w)=>{let{unstable_useTransitions:E}=T.useContext(Yn),S=Oq(),_=zq(c,{relative:h}),C=l.toLowerCase()==="get"?"get":"post",N=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:w,method:C,action:_,onSubmit:i?f:k,...v,"data-discover":!N&&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(ts);return It(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=Mf(),m=Yr(),g=Yl(e,{relative:l});return T.useCallback(v=>{if(aq(v,t)){v.preventDefault();let w=n!==void 0?n:Ml(m)===Ml(g),E=()=>p(e,{replace:w,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){cr(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=Yr(),o=T.useMemo(()=>oq(i.search,n.current?null:t.current),[i.search]),s=Mf(),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(Yn),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(Yn),i=T.useContext(Tr);It(i,"useFormAction must be used inside a RouteContext");let[o]=i.matches.slice(-1),s={...Yl(e||".",{relative:t})},l=Yr();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:Ur([n,s.pathname])),Ml(s)}function Dq(e,{relative:t}={}){let n=T.useContext(KM);It(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=Yl(e,{relative:t});if(!n.isTransitioning)return!1;let s=xi(n.currentLocation.pathname,i)||n.currentLocation.pathname,l=xi(n.nextLocation.pathname,i)||n.nextLocation.pathname;return uf(o.pathname,l)!=null||uf(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 Fa=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 Of=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 Xc=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 El=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 lr=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 rs=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 $o=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 Cr=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 is(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 la(e){const t=is(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=()=>{},ur=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 Cl={};function Mb(e,t,n,i,o){let s={...Vx(e,Cl)};return t&&(s=Kc(s,t)),n&&(s=Kc(s,n)),i&&(s=Kc(s,i)),s}function w6(e){if(e.length===0)return Cl;if(e.length===1)return Vx(e[0],Cl);let t={...Vx(e[0],Cl)};for(let n=1;n<e.length;n+=1)t=Kc(t,e[n]);return t}function Kc(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??Cl}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 as=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(as(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]);ur(p,[p]);const m=T.useCallback((v={})=>{const{onClick:w,onMouseDown:E,onKeyUp:S,onKeyDown:_,onPointerDown:C,...N}=v;return Mb({type:o?"button":void 0,onClick(M){if(t){M.preventDefault();return}w==null||w(M)},onMouseDown(M){t||E==null||E(M)},onKeyDown(M){if(t||(Fx(M),_==null||_(M),M.baseUIHandlerPrevented))return;const R=M.target===M.currentTarget,O=M.currentTarget,I=Lp(O),P=!o&&M6(O),K=R&&(o?I:!P),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(),P||o&&I?(O.click(),M.preventBaseUIHandler()):K&&(w==null||w(M),M.preventBaseUIHandler());return}K&&(!o&&(F||H)&&M.preventDefault(),!o&&H&&(w==null||w(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===" "&&(w==null||w(M))}},onPointerDown(M){if(t){M.preventDefault();return}C==null||C(M)}},o?void 0:{role:"button"},h,N)},[t,h,f,o]),g=la(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=is(_3).current;return O6(o,e,t,n,i)&&S3(o,[e,t,n,i]),o.callback}function j6(e){const t=is(_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 or(){}const gi=Object.freeze({});function Gn(e,t,n={}){const i=t.render,o=H6(t,n);if(n.enabled===!1)return null;const s=n.state??gi;return P6(e,i,o,s)}function H6(e,t={}){const{className:n,style:i,render:o}=e,{state:s=gi,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):gi,v=h?Px(g,Array.isArray(c)?w6(c):c)??gi:gi;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):gi}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(as(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 Gn("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(w=>{let[E,S]=w;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}),cf="-",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(cf),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(cf):e.slice(t).join(cf),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(cf),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 w=h&&h>f?h-f:void 0;return KE(s,v,g,w)};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:w,maybePostfixModifierPosition:E}=n(p);if(m){f=p+(f.length>0?" "+f:f);continue}let S=!!E,_=i(S?w.substring(0,E):w);if(!_){if(!S){f=p+(f.length>0?" "+f:f);continue}if(_=i(w),!_){f=p+(f.length>0?" "+f:f);continue}S=!1}const C=g.length===0?"":g.length===1?g[0]:s(g).join(":"),N=v?C+$x:C,k=N+_;if(l.indexOf(k)>-1)continue;l.push(k);const M=o(_,S);for(let R=0;R<M.length;++R){const O=M[R];l.push(N+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=[],on=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)\(.+\)$/,Ji=e=>hI.test(e),et=e=>!!e&&!Number.isNaN(Number(e)),ea=e=>!!e&&Number.isInteger(Number(e)),qp=e=>e.endsWith("%")&&et(e.slice(0,-1)),pi=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=>!je(e)&&!ze(e),SI=e=>fa(e,D3,zb),je=e=>R3.test(e),za=e=>fa(e,L3,xI),QE=e=>fa(e,MI,et),EI=e=>fa(e,I3,j3),CI=e=>fa(e,q3,zb),ZE=e=>fa(e,O3,zb),NI=e=>fa(e,z3,wI),Ec=e=>fa(e,B3,bI),ze=e=>M3.test(e),sl=e=>$a(e,L3),kI=e=>$a(e,q3),WE=e=>$a(e,O3),TI=e=>$a(e,D3),AI=e=>$a(e,z3),Cc=e=>$a(e,B3,!0),RI=e=>$a(e,I3,!0),fa=(e,t,n)=>{const i=R3.exec(e);return i?i[1]?t(i[1]):n(i[2]):!1},$a=(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=on("color"),t=on("font"),n=on("text"),i=on("font-weight"),o=on("tracking"),s=on("leading"),l=on("breakpoint"),c=on("container"),f=on("spacing"),h=on("radius"),p=on("shadow"),m=on("inset-shadow"),g=on("text-shadow"),v=on("drop-shadow"),w=on("blur"),E=on("perspective"),S=on("aspect"),_=on("ease"),C=on("animate"),N=()=>["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(),ze,je],R=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],I=()=>[ze,je,f],P=()=>[Ji,"full","auto",...I()],K=()=>[ea,"none","subgrid",ze,je],H=()=>["auto",{span:["full",ea,ze,je]},ea,ze,je],F=()=>[ea,"auto",ze,je],X=()=>["auto","min","max","fr",ze,je],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()],V=()=>[Ji,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],G=()=>[Ji,"screen","full","dvw","lvw","svw","min","max","fit",...I()],Q=()=>[Ji,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],j=()=>[e,ze,je],D=()=>[...k(),WE,ZE,{position:[ze,je]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],q=()=>["auto","cover","contain",TI,SI,{size:[ze,je]}],Y=()=>[qp,sl,za],W=()=>["","none","full",h,ze,je],Z=()=>["",et,sl,za],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],ge=()=>["","none",w,ze,je],be=()=>["none",et,ze,je],ve=()=>["none",et,ze,je],Ee=()=>[et,ze,je],pe=()=>[Ji,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pi],breakpoint:[pi],color:[j3],container:[pi],"drop-shadow":[pi],ease:["in","out","in-out"],font:[_I],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pi],shadow:[pi],spacing:["px",et],text:[pi],"text-shadow":[pi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ji,je,ze,S]}],container:["container"],columns:[{columns:[et,je,ze,c]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[ea,"auto",ze,je]}],basis:[{basis:[Ji,"full","auto",c,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[et,Ji,"auto","initial","none",je]}],grow:[{grow:["",et,ze,je]}],shrink:[{shrink:["",et,ze,je]}],order:[{order:[ea,"first","last","none",ze,je]}],"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:V()}],"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",...V()]}],"min-w":[{"min-w":[c,"screen","none",...V()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",n,sl,za]}],"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,je]}],"font-family":[{font:[kI,CI,t]}],"font-features":[{"font-features":[je]}],"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,ze,je]}],"line-clamp":[{"line-clamp":[et,"none",ze,QE]}],leading:[{leading:[s,...I()]}],"list-image":[{"list-image":["none",ze,je]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ze,je]}],"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",ze,za]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[et,"auto",ze,je]}],"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",ze,je]}],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",ze,je]}],"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"]},ea,ze,je],radial:["",ze,je],conic:[ea,ze,je]},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:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-bs":[{"border-bs":Z()}],"border-w-be":[{"border-be":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"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,ze,je]}],"outline-w":[{outline:["",et,sl,za]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",p,Cc,Ec]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",m,Cc,Ec]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[et,za]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",g,Cc,Ec]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[et,ze,je]}],"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":[ze,je]}],"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",ze,je]}],filter:[{filter:["","none",ze,je]}],blur:[{blur:ge()}],brightness:[{brightness:[et,ze,je]}],contrast:[{contrast:[et,ze,je]}],"drop-shadow":[{"drop-shadow":["","none",v,Cc,Ec]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",et,ze,je]}],"hue-rotate":[{"hue-rotate":[et,ze,je]}],invert:[{invert:["",et,ze,je]}],saturate:[{saturate:[et,ze,je]}],sepia:[{sepia:["",et,ze,je]}],"backdrop-filter":[{"backdrop-filter":["","none",ze,je]}],"backdrop-blur":[{"backdrop-blur":ge()}],"backdrop-brightness":[{"backdrop-brightness":[et,ze,je]}],"backdrop-contrast":[{"backdrop-contrast":[et,ze,je]}],"backdrop-grayscale":[{"backdrop-grayscale":["",et,ze,je]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[et,ze,je]}],"backdrop-invert":[{"backdrop-invert":["",et,ze,je]}],"backdrop-opacity":[{"backdrop-opacity":[et,ze,je]}],"backdrop-saturate":[{"backdrop-saturate":[et,ze,je]}],"backdrop-sepia":[{"backdrop-sepia":["",et,ze,je]}],"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",ze,je]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[et,"initial",ze,je]}],ease:[{ease:["linear","initial",_,ze,je]}],delay:[{delay:[et,ze,je]}],animate:[{animate:["none",C,ze,je]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,ze,je]}],"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:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[ze,je,"","none","gpu","cpu"]}],"transform-origin":[{origin:M()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"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",ze,je]}],"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",ze,je]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[et,sl,za,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 bn(...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 Rn({className:e,variant:t="default",size:n="default",...i}){return b.jsx(F6,{"data-slot":"button",className:bn(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,analyses:m,selectedAnalysisId:g,onSelectAnalysis:v}){const[w,E]=T.useState(!1),[S,_]=T.useState(!1),C=T.useRef(null);T.useEffect(()=>{E(document.documentElement.classList.contains("dark"))},[]),T.useEffect(()=>{const k=M=>{C.current&&!C.current.contains(M.target)&&_(!1)};return S&&document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[S]);const N=()=>{const k=!w;E(k),document.documentElement.classList.toggle("dark",k),localStorage.setItem("theme",k?"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(jl,{to:s,className:H3({variant:"ghost",size:"icon-sm"}),children:b.jsx(s3,{className:"h-5 w-5"})}),b.jsxs(jl,{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}),m&&m.length>1&&v&&b.jsxs("div",{className:"relative",ref:C,children:[b.jsxs("button",{className:"flex items-center gap-1 rounded-md border border-border bg-card px-2 py-1 text-xs text-muted-foreground hover:text-foreground transition-colors",onClick:()=>_(k=>!k),children:[g?"Past analysis":"Latest",b.jsx(Fa,{className:"h-3 w-3"})]}),S&&b.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-56 rounded-md border border-border bg-popover shadow-lg",children:b.jsxs("div",{className:"max-h-64 overflow-y-auto py-1",children:[b.jsx("button",{className:`w-full whitespace-nowrap px-3 py-1.5 text-left text-xs hover:bg-accent transition-colors ${g?"text-muted-foreground":"bg-accent/50 font-medium text-foreground"}`,onClick:()=>{v(null),_(!1)},children:"Latest"}),m.map((k,M)=>{const R=new Date(k.createdAt),O=`${R.toLocaleDateString()} ${R.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`,I=M===0;return b.jsxs("button",{className:`w-full whitespace-nowrap px-3 py-1.5 text-left text-xs hover:bg-accent transition-colors ${(I?!g:g===k.id)?"bg-accent/50 font-medium text-foreground":"text-muted-foreground"}`,onClick:()=>{v(I?null:k.id),_(!1)},children:[b.jsx("span",{children:O}),k.branch&&b.jsx("span",{className:"ml-1.5 font-mono opacity-60",children:k.branch}),M===0&&b.jsx("span",{className:"ml-1.5 text-primary/70",children:"(latest)"})]},k.id)})]})})]}),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(Rn,{size:"sm",onClick:n,disabled:i,children:[i&&b.jsx(lr,{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(Rn,{variant:l?"default":"outline",size:"sm",onClick:c,"aria-label":"Toggle Chat",children:[b.jsx(rs,{className:"h-4 w-4"}),"Chat"]}),b.jsx(Rn,{variant:"ghost",size:"icon-sm",onClick:N,"aria-label":"Toggle theme",children:w?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},yl={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},DI={disabled:!1,...yl},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:or,disabled:void 0,touched:yl.touched,setTouched:or,dirty:yl.dirty,setDirty:or,filled:yl.filled,setFilled:or,focused:yl.focused,setFocused:or,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:DI,markedDirtyRef:{current:!1},validation:{getValidationProps:(e=gi)=>e,getInputValidationProps:(e=gi)=>e,inputRef:{current:null},commit:async()=>{}}});function P3(e=!0){const t=T.useContext(qI);if(t.setValidityData===or&&!e)throw new Error(as(28));return t}const II=T.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:or,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:or,labelId:void 0,setLabelId:or,messageIds:[],setMessageIds:or,getDescriptionProps:e=>e});function V3(){return T.useContext(PI)}const VI=[];function FI(e){T.useEffect(e,VI)}const ll=0;class Lb{constructor(){wc(this,"currentId",ll);wc(this,"clear",()=>{this.currentId!==ll&&(clearTimeout(this.currentId),this.currentId=ll)});wc(this,"disposeEffect",()=>this.clear)}static create(){return new Lb}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=ll,n()},t)}isStarted(){return this.currentId!==ll}}function ff(){const e=is(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 zf=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);zf&&GI.toLowerCase().startsWith("mac")&&navigator.maxTouchPoints;XI.includes("jsdom/");function QI(){if(!zf)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(!zf)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(!zf)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 ur(()=>(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=is(()=>Symbol("labelable-control")),h=T.useRef(!1),p=T.useRef(t!=null),m=la(()=>{!h.current||s===or||(h.current=!1,s(f.current,void 0))});return ur(()=>{if(s===or)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=la(e.getValue);ur(()=>{if(!t)return;let v=n;v===void 0&&(v=g()),p.initialValue===null&&v!==null&&m(w=>({...w,initialValue:v}))},[t,m,n,p.initialValue,g]),ur(()=>{!t||!i||c.current.fields.set(i,{getValue:g,name:o,controlRef:s,validityData:$I(p,f),validate(v=!0){let w=n;w===void 0&&(w=g()),h.current=!0,v?kb.flushSync(()=>l(w)):l(w)}})},[l,s,t,c,g,i,f,h,o,p,n]),ur(()=>{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=gi;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:w,disabled:E,setTouched:S,setDirty:_,validityData:C,setFocused:N,setFilled:k,validationMode:M,validation:R}=P3(),O=E||f,I=w??l,P={...v,disabled:O},{labelId:K}=V3(),H=r8({id:s});ur(()=>{var G;const V=c!=null;(G=R.inputRef.current)!=null&&G.value||V&&c!==""?k(!0):V&&c===""&&k(!1)},[R.inputRef,k,c]);const F=T.useRef(null);ur(()=>{m&&F.current===JI(YI(F.current))&&N(!0)},[m,N]);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 V;return(V=R.inputRef.current)==null?void 0:V.value},controlRef:R.inputRef}),Gn("input",t,{ref:[n,F],state:P,props:[{id:H,disabled:O,name:I,ref:R.inputRef,"aria-labelledby":K,autoFocus:m,...L?{value:B}:{defaultValue:p},onChange(V){const G=V.currentTarget.value;h==null||h(G,o8(a8,V.nativeEvent)),_(G!==C.initialValue),k(G!=="")},onFocus(){N(!0)},onBlur(V){S(!0),N(!1),M==="onBlur"&&R.commit(V.currentTarget.value)},onKeyDown(V){V.currentTarget.tagName==="INPUT"&&V.key==="Enter"&&(S(!0),R.commit(V.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:bn("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(Rn,{type:"submit",disabled:i||!t.trim(),children:[i?b.jsx(lr,{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, violations, 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(jl,{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 ln(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 ln("/api/repos")}function d8(e){return ln(`/api/repos/${e}`)}function h8(e){return ln("/api/repos",{method:"POST",body:JSON.stringify({path:e})})}function p8(e){return ln(`/api/repos/${e}`,{method:"DELETE"})}function G3(e,t){return ln(`/api/repos/${e}/analyze`,{method:"POST",body:JSON.stringify({branch:t})})}function m8(e){return ln(`/api/repos/${e}/analyses`)}function g8(e,t){const n=new URLSearchParams;t!=null&&t.branch&&n.set("branch",t.branch),t!=null&&t.level&&n.set("level",t.level),t!=null&&t.analysisId&&n.set("analysisId",t.analysisId);const i=n.toString();return ln(`/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 ln(`/api/repos/${e}/graph/positions${s?`?${s}`:""}`,{method:"PUT",body:JSON.stringify({positions:t})})}function y8(e,t,n){const i=new URLSearchParams;t&&i.set("branch",t),n&&i.set("level",n);const o=i.toString();return ln(`/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 ln(`/api/repos/${e}/graph/collapsed${s?`?${s}`:""}`,{method:"PUT",body:JSON.stringify({collapsedIds:t})})}function v8(e){return ln(`/api/repos/${e}/files`)}function x8(e,t){const n=new URLSearchParams;t&&n.set("analysisId",t);const i=n.toString();return ln(`/api/repos/${e}/violations${i?`?${i}`:""}`)}function b8(e,t){return ln(`/api/repos/${e}/databases/${t}/schema`)}function w8(){return ln("/api/rules")}function _8(e){return ln(`/api/repos/${e}/diff-check`,{method:"POST"})}function S8(e){return ln(`/api/repos/${e}/diff-check`)}function E8(e){return ln(`/api/repos/${e}/conversations`)}function C8(e,t){return ln(`/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:w,value:E}=await p.read();if(w)break;g+=m.decode(E,{stream:!0});const S=g.split(`
|
|
351
|
+
`);g=S.pop()||"";for(const _ of S)if(_.startsWith("data: ")){const C=_.slice(6);if(C==="[DONE]"){i(h);return}try{const N=JSON.parse(C);N.content&&n(N.content)}catch{n(C)}}}i(h)}).catch(f=>{f.name!=="AbortError"&&o(f)}),l}function N8(){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 k8=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 Qc({className:e,variant:t,...n}){return b.jsx("div",{"data-slot":"alert",role:"alert",className:bn(k8({variant:t}),e),...n})}function a2({className:e,...t}){return b.jsx("div",{"data-slot":"alert-title",className:bn("font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground",e),...t})}function Zc({className:e,...t}){return b.jsx("div",{"data-slot":"alert-description",className:bn("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 T8(){const{repos:e,isLoading:t,error:n,addRepo:i,deleteRepo:o}=N8(),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(Qc,{variant:"destructive",className:"mb-6",children:b.jsx(Zc,{children:n})}),t?b.jsx("div",{className:"flex items-center justify-center py-16",children:b.jsx(lr,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):b.jsx(c8,{repos:e,onDelete:s})]})]})}const X3=T.createContext(void 0);function Df(){const e=T.useContext(X3);if(e===void 0)throw new Error(as(53));return e}let df=(function(e){return e.scrollAreaCornerHeight="--scroll-area-corner-height",e.scrollAreaCornerWidth="--scroll-area-corner-width",e})({});const Nc=500,o2=16;function sr(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 A8=(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 kc="base-ui-disable-scrollbar",K3={className:kc,getElement(e){return b.jsx("style",{nonce:e,href:kc,precedence:"base-ui:low",children:`.${kc}{scrollbar-width:none}.${kc}::-webkit-scrollbar{display:none}`})}};let Oo=(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?{[Oo.hasOverflowX]:""}:null,hasOverflowY:e=>e?{[Oo.hasOverflowY]:""}:null,overflowXStart:e=>e?{[Oo.overflowXStart]:""}:null,overflowXEnd:e=>e?{[Oo.overflowXEnd]:""}:null,overflowYStart:e=>e?{[Oo.overflowYStart]:""}:null,overflowYEnd:e=>e?{[Oo.overflowYEnd]:""}:null,cornerHidden:()=>null},R8=T.createContext(void 0),M8={disableStyleElements:!1};function j8(){return T.useContext(R8)??M8}const O8={x:0,y:0},s2={width:0,height:0},z8={xStart:!1,xEnd:!1,yStart:!1,yEnd:!1},D8={x:!0,y:!0,corner:!0},L8=T.forwardRef(function(t,n){const{render:i,className:o,overflowEdgeThreshold:s,...l}=t,c=q8(s),f=Db(),h=ff(),p=ff(),{nonce:m,disableStyleElements:g}=j8(),[v,w]=T.useState(!1),[E,S]=T.useState(!1),[_,C]=T.useState(!1),[N,k]=T.useState(!1),[M,R]=T.useState(!1),[O,I]=T.useState(s2),[P,K]=T.useState(s2),[H,F]=T.useState(z8),[X,L]=T.useState(D8),B=T.useRef(null),z=T.useRef(null),V=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),W=T.useRef(0),Z=T.useRef(0),te=T.useRef("vertical"),re=T.useRef(O8),se=la(he=>{const ye=he.x-re.current.x,He=he.y-re.current.y;re.current=he,He!==0&&(C(!0),h.start(Nc,()=>{C(!1)})),ye!==0&&(S(!0),p.start(Nc,()=>{S(!1)}))}),ge=la(he=>{he.button===0&&($.current=!0,q.current=he.clientY,Y.current=he.clientX,te.current=he.currentTarget.getAttribute(A8.orientation),z.current&&(W.current=z.current.scrollTop,Z.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=la(he=>{if(!$.current)return;const ye=he.clientY-q.current,He=he.clientX-Y.current;if(z.current){const Se=z.current.scrollHeight,Ue=z.current.clientHeight,Fe=z.current.scrollWidth,kt=z.current.clientWidth;if(Q.current&&V.current&&te.current==="vertical"){const ue=sr(V.current,"padding","y"),me=sr(Q.current,"margin","y"),Ae=Q.current.offsetHeight,Ve=V.current.offsetHeight-Ae-ue-me,Ge=ye/Ve;z.current.scrollTop=W.current+Ge*(Se-Ue),he.preventDefault(),C(!0),h.start(Nc,()=>{C(!1)})}if(j.current&&G.current&&te.current==="horizontal"){const ue=sr(G.current,"padding","x"),me=sr(j.current,"margin","x"),Ae=j.current.offsetWidth,Ve=G.current.offsetWidth-Ae-ue-me,Ge=He/Ve;z.current.scrollLeft=Z.current+Ge*(Fe-kt),he.preventDefault(),S(!0),p.start(Nc,()=>{S(!1)})}}}),ve=la(he=>{$.current=!1,Q.current&&te.current==="vertical"&&Q.current.releasePointerCapture(he.pointerId),j.current&&te.current==="horizontal"&&j.current.releasePointerCapture(he.pointerId)});function Ee(he){k(he.pointerType==="touch")}function pe(he){if(Ee(he),he.pointerType!=="touch"){const ye=e8(B.current,he.target);w(ye)}}const Ne=T.useMemo(()=>({scrolling:E||_,hasOverflowX:!X.x,hasOverflowY:!X.y,overflowXStart:H.xStart,overflowXEnd:H.xEnd,overflowYStart:H.yStart,overflowYEnd:H.yEnd,cornerHidden:X.corner}),[E,_,X.x,X.y,X.corner,H]),Oe={role:"presentation",onPointerEnter:pe,onPointerMove:pe,onPointerDown:Ee,onPointerLeave(){w(!1)},style:{position:"relative",[df.scrollAreaCornerHeight]:`${O.height}px`,[df.scrollAreaCornerWidth]:`${O.width}px`}},Re=Gn("div",t,{state:Ne,ref:[n,B],props:[Oe,l],stateAttributesMapping:Ib}),vt=T.useMemo(()=>({handlePointerDown:ge,handlePointerMove:be,handlePointerUp:ve,handleScroll:se,cornerSize:O,setCornerSize:I,thumbSize:P,setThumbSize:K,hasMeasuredScrollbar:M,setHasMeasuredScrollbar:R,touchModality:N,cornerRef:D,scrollingX:E,setScrollingX:S,scrollingY:_,setScrollingY:C,hovering:v,setHovering:w,viewportRef:z,rootRef:B,scrollbarYRef:V,scrollbarXRef:G,thumbYRef:Q,thumbXRef:j,rootId:f,hiddenState:X,setHiddenState:L,overflowEdges:H,setOverflowEdges:F,viewportState:Ne,overflowEdgeThreshold:c}),[ge,be,ve,se,O,P,M,N,E,S,_,C,v,w,f,X,H,Ne,c]);return b.jsxs(X3.Provider,{value:vt,children:[!g&&K3.getElement(m),Re]})});function q8(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 I8=T.createContext(void 0),B8=T.createContext(void 0);function Q3(){const e=T.useContext(B8);return(e==null?void 0:e.direction)??"ltr"}function qo(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function H8(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 ua=(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=qo(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 U8(){c2||KI||(typeof CSS<"u"&&"registerProperty"in CSS&&[ua.scrollAreaOverflowXStart,ua.scrollAreaOverflowXEnd,ua.scrollAreaOverflowYStart,ua.scrollAreaOverflowYEnd].forEach(e=>{try{CSS.registerProperty({name:e,syntax:"<length>",inherits:!1,initialValue:"0px"})}catch{}}),c2=!0)}const P8=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:w,rootId:E,setHiddenState:S,hiddenState:_,setHasMeasuredScrollbar:C,handleScroll:N,setHovering:k,setOverflowEdges:M,overflowEdges:R,overflowEdgeThreshold:O,scrollingX:I,scrollingY:P}=Df(),K=Q3(),H=T.useRef(!0),F=T.useRef([NaN,NaN,NaN,NaN]),X=ff(),L=ff(),B=la(()=>{const D=l.current,$=c.current,q=f.current,Y=h.current,W=p.current,Z=m.current;if(!D)return;const te=D.scrollHeight,re=D.scrollWidth,se=D.clientHeight,ge=D.clientWidth,be=D.scrollTop,ve=D.scrollLeft,Ee=F.current,pe=Number.isNaN(Ee[0]);if(Ee[0]=se,Ee[1]=te,Ee[2]=ge,Ee[3]=re,pe&&C(!0),te===0||re===0)return;const Ne=V8(D),Oe=Ne.y,Re=Ne.x,vt=ge/re,he=se/te,ye=Math.max(0,re-ge),He=Math.max(0,te-se);let Se=0,Ue=0;if(!Re){let dt=0;K==="rtl"?dt=qo(-ve,0,ye):dt=qo(ve,0,ye),Se=u2(dt,ye),Ue=ye-Se}const Fe=Oe?0:qo(be,0,He),kt=Oe?0:u2(Fe,He),ue=Oe?0:He-kt,me=Re?0:ge,Ae=Oe?0:se;let Ve=0,Ge=0;!Re&&!Oe&&(Ve=($==null?void 0:$.offsetWidth)||0,Ge=(q==null?void 0:q.offsetHeight)||0);const Ut=g.width===0&&g.height===0,zt=Ut?Ve:0,ft=Ut?Ge:0,ut=sr(q,"padding","x"),Ft=sr($,"padding","y"),ct=sr(W,"margin","x"),gn=sr(Y,"margin","y"),Xt=me-ut-ct,Mr=Ae-Ft-gn,hr=q?Math.min(q.offsetWidth-zt,Xt):Xt,jr=$?Math.min($.offsetHeight-ft,Mr):Mr,Xn=Math.max(o2,hr*vt),yn=Math.max(o2,jr*he);if(w(dt=>dt.height===yn&&dt.width===Xn?dt:{width:Xn,height:yn}),$&&Y){const dt=$.offsetHeight-yn-Ft-gn,we=te-se,_e=we===0?0:be/we,Le=Math.min(dt,Math.max(0,_e*dt));Y.style.transform=`translate3d(0,${Le}px,0)`}if(q&&W){const dt=q.offsetWidth-Xn-ut-ct,we=re-ge,_e=we===0?0:ve/we,Le=K==="rtl"?qo(_e*dt,-dt,0):qo(_e*dt,0,dt);W.style.transform=`translate3d(${Le}px,0,0)`}const Or=[[ua.scrollAreaOverflowXStart,Se],[ua.scrollAreaOverflowXEnd,Ue],[ua.scrollAreaOverflowYStart,kt],[ua.scrollAreaOverflowYEnd,ue]];for(const[dt,we]of Or)D.style.setProperty(dt,`${we}px`);Z&&(Re||Oe?v({width:0,height:0}):!Re&&!Oe&&v({width:Ve,height:Ge})),S(dt=>F8(dt,Ne));const hn={xStart:!Re&&Se>O.xStart,xEnd:!Re&&Ue>O.xEnd,yStart:!Oe&&kt>O.yStart,yEnd:!Oe&&ue>O.yEnd};M(dt=>dt.xStart===hn.xStart&&dt.xEnd===hn.xEnd&&dt.yStart===hn.yStart&&dt.yEnd===hn.yEnd?dt:hn)});ur(()=>{if(l.current&&(U8(),!f2))return H8(l.current,()=>{B()})},[B,l]),ur(()=>{queueMicrotask(B)},[B,_,K]),ur(()=>{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(W=>W.finished)).then(B).catch(()=>{})}),()=>{q.disconnect(),L.clear()}},[B,l,L]);function z(){H.current=!1}const V={role:"presentation",...E&&{"data-id":`${E}-viewport`},tabIndex:_.x&&_.y?-1:0,className:K3.className,style:{overflow:"scroll"},onScroll(){l.current&&(B(),H.current||N({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||P,hasOverflowX:!_.x,hasOverflowY:!_.y,overflowXStart:R.xStart,overflowXEnd:R.xEnd,overflowYStart:R.yStart,overflowYEnd:R.yEnd,cornerHidden:_.corner}),[I,P,_.x,_.y,_.corner,R]),Q=Gn("div",t,{ref:[n,l],state:G,props:[V,s],stateAttributesMapping:Ib}),j=T.useMemo(()=>({computeThumbPosition:B}),[B]);return b.jsx(I8.Provider,{value:j,children:Q})});function V8(e){const t=e.clientHeight>=e.scrollHeight,n=e.clientWidth>=e.scrollWidth;return{y:t,x:n,corner:t||n}}function F8(e,t){return e.y===t.y&&e.x===t.x&&e.corner===t.corner?e:t}const Z3=T.createContext(void 0);function $8(){const e=T.useContext(Z3);if(e===void 0)throw new Error(as(54));return e}let hf=(function(e){return e.scrollAreaThumbHeight="--scroll-area-thumb-height",e.scrollAreaThumbWidth="--scroll-area-thumb-width",e})({});const Y8=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:w,viewportRef:E,thumbYRef:S,thumbXRef:_,handlePointerDown:C,handlePointerUp:N,rootId:k,thumbSize:M,hasMeasuredScrollbar:R}=Df(),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(),P=!R&&!l;T.useEffect(()=>{const B=E.current,z=s==="vertical"?v.current:w.current;if(!z)return;function V(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",V,{passive:!1}),()=>{z.removeEventListener("wheel",V)}},[s,w,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=sr(S.current,"margin","y"),V=sr(v.current,"padding","y"),G=S.current.offsetHeight,Q=v.current.getBoundingClientRect(),j=B.clientY-Q.top-G/2-V+z/2,D=E.current.scrollHeight,$=E.current.clientHeight,q=v.current.offsetHeight-G-V-z,W=j/q*(D-$);E.current.scrollTop=W}if(_.current&&w.current&&s==="horizontal"){const z=sr(_.current,"margin","x"),V=sr(w.current,"padding","x"),G=_.current.offsetWidth,Q=w.current.getBoundingClientRect(),j=B.clientX-Q.left-G/2-V+z/2,D=E.current.scrollWidth,$=E.current.clientWidth,q=w.current.offsetWidth-G-V-z,Y=j/q;let W;I==="rtl"?(W=(1-Y)*(D-$),E.current.scrollLeft<=0&&(W=-W)):W=Y*(D-$),E.current.scrollLeft=W}C(B)}},onPointerUp:N,style:{position:"absolute",touchAction:"none",WebkitUserSelect:"none",userSelect:"none",visibility:P?"hidden":void 0,...s==="vertical"&&{top:0,bottom:`var(${df.scrollAreaCornerHeight})`,insetInlineEnd:0,[hf.scrollAreaThumbHeight]:`${M.height}px`},...s==="horizontal"&&{insetInlineStart:0,insetInlineEnd:`var(${df.scrollAreaCornerWidth})`,bottom:0,[hf.scrollAreaThumbWidth]:`${M.width}px`}}},H=Gn("div",t,{ref:[n,s==="vertical"?v:w],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}),G8=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}=Df(),{orientation:w}=$8();return Gn("div",t,{ref:[n,w==="vertical"?l:c],state:{orientation:w},props:[{onPointerDown:f,onPointerMove:h,onPointerUp(_){w==="vertical"&&g(!1),w==="horizontal"&&m(!1),p(_)},style:{visibility:v?void 0:"hidden",...w==="vertical"&&{height:`var(${hf.scrollAreaThumbHeight})`},...w==="horizontal"&&{width:`var(${hf.scrollAreaThumbWidth})`}}},s]})}),X8=T.forwardRef(function(t,n){const{render:i,className:o,...s}=t,{cornerRef:l,cornerSize:c,hiddenState:f}=Df(),h=Gn("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 K8({className:e,children:t,...n}){return b.jsxs(L8,{"data-slot":"scroll-area",className:bn("relative",e),...n,children:[b.jsx(P8,{"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(Q8,{}),b.jsx(X8,{})]})}function Q8({className:e,orientation:t="vertical",...n}){return b.jsx(Y8,{"data-slot":"scroll-area-scrollbar","data-orientation":t,orientation:t,className:bn("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(G8,{"data-slot":"scroll-area-thumb",className:"relative flex-1 rounded-full bg-border"})})}function Z8({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=w=>{if(!c.current)return;const E=p-w.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(K8,{className:"h-full",children:e})]}):null}const W8=[{id:"violations",icon:Cr,label:"Violations"},{id:"rules",icon:Ux,label:"Rules"},{id:"files",icon:Xq,label:"Files"}];function J8({activeTab:e,onTabChange:t,children:n,defaultWidth:i=350,minWidth:o=260,badgeCounts:s}){const[l,c]=T.useState(i),[f,h]=T.useState(800),p=T.useRef(!1);T.useEffect(()=>{const v=()=>Math.floor(window.innerWidth*.8);h(v());const w=()=>h(v());return window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[]);const m=T.useCallback(v=>{v.preventDefault(),p.current=!0;const w=v.clientX,E=l,S=C=>{if(!p.current)return;const N=C.clientX-w;c(Math.min(f,Math.max(o,E+N)))},_=()=>{p.current=!1,document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",_)};document.addEventListener("mousemove",S),document.addEventListener("mouseup",_)},[l,o,f]),g=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:W8.map(v=>{const w=v.icon,E=e===v.id;return b.jsxs("button",{onClick:()=>t(E?null:v.id),className:`group relative flex h-10 w-10 items-center justify-center rounded-md transition-colors ${E?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"}`,"aria-label":v.label,children:[E&&b.jsx("div",{className:"absolute left-0 top-1.5 bottom-1.5 w-0.5 rounded-r bg-primary"}),b.jsx(w,{className:"h-5 w-5"}),(()=>{const S=s==null?void 0:s[v.id];return S==null?null:typeof S=="number"?S>0?b.jsx("span",{className:"absolute -right-0.5 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary px-1 text-[9px] font-bold text-primary-foreground",children:S}):null:S.newCount+S.resolvedCount>0?b.jsxs("span",{className:"absolute -right-1 -top-1 flex items-center gap-px rounded-full bg-card border border-border px-1 py-px",children:[S.newCount>0&&b.jsxs("span",{className:"text-[8px] font-bold text-red-400",children:["+",S.newCount]}),S.resolvedCount>0&&b.jsxs("span",{className:"text-[8px] font-bold text-emerald-400",children:["-",S.resolvedCount]})]}):null})()]},v.id)})}),g&&b.jsxs("aside",{className:"relative flex-shrink-0 border-r border-border bg-card",style:{width:l},children:[b.jsxs("div",{className:"flex h-10 items-center gap-2 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"}),(()=>{const v=e?s==null?void 0:s[e]:void 0;return v==null?null:typeof v=="number"?v>0?b.jsx("span",{className:"rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground",children:v}):null:v.newCount+v.resolvedCount>0?b.jsxs("span",{className:"flex items-center gap-1.5 rounded-full bg-muted px-1.5 py-0.5 text-[10px] font-medium",children:[v.newCount>0&&b.jsxs("span",{className:"text-red-400",children:["+",v.newCount," new"]}),v.resolvedCount>0&&b.jsxs("span",{className:"text-emerald-400",children:["-",v.resolvedCount," resolved"]})]}):null})()]}),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:m})]})]})}function nn(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=nn(e[n]))!==""&&(t+=(t&&" ")+i);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var eB={value:()=>{}};function Lf(){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 Wc(n)}function Wc(e){this._=e}function tB(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}})}Wc.prototype=Lf.prototype={constructor:Wc,on:function(e,t){var n=this._,i=tB(e+"",n),o,s=-1,l=i.length;if(arguments.length<2){for(;++s<l;)if((o=(e=i[s]).type)&&(o=nB(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 Wc(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 nB(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]=eB,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 qf(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 rB(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 iB(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function W3(e){var t=qf(e);return(t.local?iB:rB)(t)}function aB(){}function Bb(e){return e==null?aB:function(){return this.querySelector(e)}}function oB(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 $n(i,this._parents)}function sB(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function lB(){return[]}function J3(e){return e==null?lB:function(){return this.querySelectorAll(e)}}function uB(e){return function(){return sB(e.apply(this,arguments))}}function cB(e){typeof e=="function"?e=uB(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 $n(i,o)}function ej(e){return function(){return this.matches(e)}}function tj(e){return function(t){return t.matches(e)}}var fB=Array.prototype.find;function dB(e){return function(){return fB.call(this.children,e)}}function hB(){return this.firstElementChild}function pB(e){return this.select(e==null?hB:dB(typeof e=="function"?e:tj(e)))}var mB=Array.prototype.filter;function gB(){return Array.from(this.children)}function yB(e){return function(){return mB.call(this.children,e)}}function vB(e){return this.selectAll(e==null?gB:yB(typeof e=="function"?e:tj(e)))}function xB(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 $n(i,this._parents)}function nj(e){return new Array(e.length)}function bB(){return new $n(this._enter||this._groups.map(nj),this._parents)}function pf(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}pf.prototype={constructor:pf,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 wB(e){return function(){return e}}function _B(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 pf(e,s[l]);for(;l<f;++l)(c=t[l])&&(o[l]=c)}function SB(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 pf(e,s[c]);for(c=0;c<p;++c)(f=t[c])&&h.get(g[c])===f&&(o[c]=f)}function EB(e){return e.__data__}function CB(e,t){if(!arguments.length)return Array.from(this,EB);var n=t?SB:_B,i=this._parents,o=this._groups;typeof e!="function"&&(e=wB(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=NB(e.call(p,p&&p.__data__,h,i)),w=v.length,E=c[h]=new Array(w),S=l[h]=new Array(w),_=f[h]=new Array(g);n(p,m,E,S,_,v,t);for(var C=0,N=0,k,M;C<w;++C)if(k=E[C]){for(C>=N&&(N=C+1);!(M=S[N])&&++N<w;);k._next=M||null}}return l=new $n(l,i),l._enter=c,l._exit=f,l}function NB(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function kB(){return new $n(this._exit||this._groups.map(nj),this._parents)}function TB(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 AB(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,w=0;w<m;++w)(v=h[w]||p[w])&&(g[w]=v);for(;f<o;++f)c[f]=n[f];return new $n(c,this._parents)}function RB(){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 MB(e){e||(e=jB);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 $n(o,this._parents).order()}function jB(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function OB(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function zB(){return Array.from(this)}function DB(){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 LB(){let e=0;for(const t of this)++e;return e}function qB(){return!this.node()}function IB(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 BB(e){return function(){this.removeAttribute(e)}}function HB(e){return function(){this.removeAttributeNS(e.space,e.local)}}function UB(e,t){return function(){this.setAttribute(e,t)}}function PB(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function VB(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function FB(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 $B(e,t){var n=qf(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?HB:BB:typeof t=="function"?n.local?FB:VB:n.local?PB:UB)(n,t))}function rj(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function YB(e){return function(){this.style.removeProperty(e)}}function GB(e,t,n){return function(){this.style.setProperty(e,t,n)}}function XB(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function KB(e,t,n){return arguments.length>1?this.each((t==null?YB:typeof t=="function"?XB:GB)(e,t,n??"")):Yo(this.node(),e)}function Yo(e,t){return e.style.getPropertyValue(t)||rj(e).getComputedStyle(e,null).getPropertyValue(t)}function QB(e){return function(){delete this[e]}}function ZB(e,t){return function(){this[e]=t}}function WB(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function JB(e,t){return arguments.length>1?this.each((t==null?QB:typeof t=="function"?WB:ZB)(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 eH(e){return function(){oj(this,e)}}function tH(e){return function(){sj(this,e)}}function nH(e,t){return function(){(t.apply(this,arguments)?oj:sj)(this,e)}}function rH(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"?nH:t?eH:tH)(n,t))}function iH(){this.textContent=""}function aH(e){return function(){this.textContent=e}}function oH(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function sH(e){return arguments.length?this.each(e==null?iH:(typeof e=="function"?oH:aH)(e)):this.node().textContent}function lH(){this.innerHTML=""}function uH(e){return function(){this.innerHTML=e}}function cH(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function fH(e){return arguments.length?this.each(e==null?lH:(typeof e=="function"?cH:uH)(e)):this.node().innerHTML}function dH(){this.nextSibling&&this.parentNode.appendChild(this)}function hH(){return this.each(dH)}function pH(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mH(){return this.each(pH)}function gH(e){var t=typeof e=="function"?e:W3(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function yH(){return null}function vH(e,t){var n=typeof e=="function"?e:W3(e),i=t==null?yH:typeof t=="function"?t:Bb(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function xH(){var e=this.parentNode;e&&e.removeChild(this)}function bH(){return this.each(xH)}function wH(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _H(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function SH(e){return this.select(e?_H:wH)}function EH(e){return arguments.length?this.property("__data__",e):this.node().__data__}function CH(e){return function(t){e.call(this,t,this.__data__)}}function NH(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 kH(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 TH(e,t,n){return function(){var i=this.__on,o,s=CH(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 AH(e,t,n){var i=NH(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?TH:kH,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 RH(e,t){return function(){return lj(this,e,t)}}function MH(e,t){return function(){return lj(this,e,t.apply(this,arguments))}}function jH(e,t){return this.each((typeof t=="function"?MH:RH)(e,t))}function*OH(){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 $n(e,t){this._groups=e,this._parents=t}function Gl(){return new $n([[document.documentElement]],uj)}function zH(){return this}$n.prototype=Gl.prototype={constructor:$n,select:oB,selectAll:cB,selectChild:pB,selectChildren:vB,filter:xB,data:CB,enter:bB,exit:kB,join:TB,merge:AB,selection:zH,order:RB,sort:MB,call:OB,nodes:zB,node:DB,size:LB,empty:qB,each:IB,attr:$B,style:KB,property:JB,classed:rH,text:sH,html:fH,raise:hH,lower:mH,append:gH,insert:vH,remove:bH,clone:SH,datum:EH,on:AH,dispatch:jH,[Symbol.iterator]:OH};function Vn(e){return typeof e=="string"?new $n([[document.querySelector(e)]],[document.documentElement]):new $n([[e]],uj)}function DH(e){let t;for(;t=e.sourceEvent;)e=t;return e}function br(e,t){if(e=DH(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 LH={passive:!1},Ol={capture:!0,passive:!1};function Bp(e){e.stopImmediatePropagation()}function Uo(e){e.preventDefault(),e.stopImmediatePropagation()}function cj(e){var t=e.document.documentElement,n=Vn(e).on("dragstart.drag",Uo,Ol);"onselectstart"in t?n.on("selectstart.drag",Uo,Ol):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function fj(e,t){var n=e.document.documentElement,i=Vn(e).on("dragstart.drag",null);t&&(i.on("click.drag",Uo,Ol),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 Tc=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 qH(e){return!e.ctrlKey&&!e.button}function IH(){return this.parentNode}function BH(e,t){return t??{x:e.x,y:e.y}}function HH(){return navigator.maxTouchPoints||"ontouchstart"in this}function dj(){var e=qH,t=IH,n=BH,i=HH,o={},s=Lf("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",_,LH).on("touchend.drag touchcancel.drag",C).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=N(this,t.call(this,k,M),k,M,"mouse");R&&(Vn(k.view).on("mousemove.drag",w,Ol).on("mouseup.drag",E,Ol),cj(k.view),Bp(k),h=!1,c=k.clientX,f=k.clientY,R("start",k))}}function w(k){if(Uo(k),!h){var M=k.clientX-c,R=k.clientY-f;h=M*M+R*R>m}o.mouse("drag",k)}function E(k){Vn(k.view).on("mousemove.drag mouseup.drag",null),fj(k.view,h),Uo(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,P,K;for(P=0;P<I;++P)(K=N(this,O,k,M,R[P].identifier,R[P]))&&(Bp(k),K("start",k,R[P]))}}function _(k){var M=k.changedTouches,R=M.length,O,I;for(O=0;O<R;++O)(I=o[M[O].identifier])&&(Uo(k),I("drag",k,M[O]))}function C(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 N(k,M,R,O,I,P){var K=s.copy(),H=br(P||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,V,G){var Q=H,j;switch(z){case"start":o[I]=B,j=l++;break;case"end":delete o[I],--l;case"drag":H=br(G||V,M),j=l;break}K.call(z,k,new Gx(z,{sourceEvent:V,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:Tc(!!k),g):e},g.container=function(k){return arguments.length?(t=typeof k=="function"?k:Tc(k),g):t},g.subject=function(k){return arguments.length?(n=typeof k=="function"?k:Tc(k),g):n},g.touchable=function(k){return arguments.length?(i=typeof k=="function"?k:Tc(!!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 Xl(){}var zl=.7,mf=1/zl,Po="\\s*([+-]?\\d+)\\s*",Dl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",UH=/^#([0-9a-f]{3,8})$/,PH=new RegExp(`^rgb\\(${Po},${Po},${Po}\\)$`),VH=new RegExp(`^rgb\\(${Pr},${Pr},${Pr}\\)$`),FH=new RegExp(`^rgba\\(${Po},${Po},${Po},${Dl}\\)$`),$H=new RegExp(`^rgba\\(${Pr},${Pr},${Pr},${Dl}\\)$`),YH=new RegExp(`^hsl\\(${Dl},${Pr},${Pr}\\)$`),GH=new RegExp(`^hsla\\(${Dl},${Pr},${Pr},${Dl}\\)$`),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(Xl,Ha,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:m2,formatHex:m2,formatHex8:XH,formatHsl:KH,formatRgb:g2,toString:g2});function m2(){return this.rgb().formatHex()}function XH(){return this.rgb().formatHex8()}function KH(){return pj(this).formatHsl()}function g2(){return this.rgb().formatRgb()}function Ha(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=UH.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?y2(t):n===3?new Mn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Ac(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Ac(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=PH.exec(e))?new Mn(t[1],t[2],t[3],1):(t=VH.exec(e))?new Mn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=FH.exec(e))?Ac(t[1],t[2],t[3],t[4]):(t=$H.exec(e))?Ac(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=YH.exec(e))?b2(t[1],t[2]/100,t[3]/100,1):(t=GH.exec(e))?b2(t[1],t[2]/100,t[3]/100,t[4]):p2.hasOwnProperty(e)?y2(p2[e]):e==="transparent"?new Mn(NaN,NaN,NaN,0):null}function y2(e){return new Mn(e>>16&255,e>>8&255,e&255,1)}function Ac(e,t,n,i){return i<=0&&(e=t=n=NaN),new Mn(e,t,n,i)}function QH(e){return e instanceof Xl||(e=Ha(e)),e?(e=e.rgb(),new Mn(e.r,e.g,e.b,e.opacity)):new Mn}function Xx(e,t,n,i){return arguments.length===1?QH(e):new Mn(e,t,n,i??1)}function Mn(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}Ub(Mn,Xx,hj(Xl,{brighter(e){return e=e==null?mf:Math.pow(mf,e),new Mn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?zl:Math.pow(zl,e),new Mn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Mn(Ia(this.r),Ia(this.g),Ia(this.b),gf(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:ZH,formatRgb:x2,toString:x2}));function v2(){return`#${La(this.r)}${La(this.g)}${La(this.b)}`}function ZH(){return`#${La(this.r)}${La(this.g)}${La(this.b)}${La((isNaN(this.opacity)?1:this.opacity)*255)}`}function x2(){const e=gf(this.opacity);return`${e===1?"rgb(":"rgba("}${Ia(this.r)}, ${Ia(this.g)}, ${Ia(this.b)}${e===1?")":`, ${e})`}`}function gf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ia(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function La(e){return e=Ia(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 _r(e,t,n,i)}function pj(e){if(e instanceof _r)return new _r(e.h,e.s,e.l,e.opacity);if(e instanceof Xl||(e=Ha(e)),!e)return new _r;if(e instanceof _r)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 _r(l,c,f,e.opacity)}function WH(e,t,n,i){return arguments.length===1?pj(e):new _r(e,t,n,i??1)}function _r(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}Ub(_r,WH,hj(Xl,{brighter(e){return e=e==null?mf:Math.pow(mf,e),new _r(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?zl:Math.pow(zl,e),new _r(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 Mn(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 _r(w2(this.h),Rc(this.s),Rc(this.l),gf(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=gf(this.opacity);return`${e===1?"hsl(":"hsla("}${w2(this.h)}, ${Rc(this.s)*100}%, ${Rc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function w2(e){return e=(e||0)%360,e<0?e+360:e}function Rc(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 JH(e,t){return function(n){return e+n*t}}function e9(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 t9(e){return(e=+e)==1?mj:function(t,n){return n-t?e9(t,n,e):Pb(isNaN(t)?n:t)}}function mj(e,t){var n=t-e;return n?JH(e,n):Pb(isNaN(e)?t:e)}const yf=(function e(t){var n=t9(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 n9(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 r9(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function i9(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]=Nl(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 a9(e,t){var n=new Date;return e=+e,t=+t,function(i){return n.setTime(e*(1-i)+t*i),n}}function Br(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function o9(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]=Nl(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 s9(e){return function(){return e}}function l9(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:Br(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]?l9(f[0].x):s9(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 Nl(e,t){var n=typeof t,i;return t==null||n==="boolean"?Pb(t):(n==="number"?Br:n==="string"?(i=Ha(t))?(t=i,yf):gj:t instanceof Ha?yf:t instanceof Date?a9:r9(t)?n9:Array.isArray(t)?i9:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?o9:Br)(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 Mc;function u9(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 c9(e){return e==null||(Mc||(Mc=document.createElementNS("http://www.w3.org/2000/svg","g")),Mc.setAttribute("transform",e),!(e=Mc.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,w){if(h!==m||p!==g){var E=v.push("translate(",null,t,null,n);w.push({i:E-4,x:Br(h,m)},{i:E-2,x:Br(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:Br(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:Br(h,p)}):p&&m.push(o(m)+"skewX("+p+i)}function f(h,p,m,g,v,w){if(h!==m||p!==g){var E=v.push(o(v)+"scale(",null,",",null,")");w.push({i:E-4,x:Br(h,m)},{i:E-2,x:Br(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 w=-1,E=g.length,S;++w<E;)m[(S=g[w]).i]=S.x(v);return m.join("")}}}var f9=vj(u9,"px, ","px)","deg)"),d9=vj(c9,", ",")",")"),h9=1e-12;function S2(e){return((e=Math.exp(e))+1/e)/2}function p9(e){return((e=Math.exp(e))-1/e)/2}function m9(e){return((e=Math.exp(2*e))-1)/(e+1)}const Jc=(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,w=m-f,E=v*v+w*w,S,_;if(E<h9)_=Math.log(g/h)/t,S=function(O){return[c+O*v,f+O*w,h*Math.exp(t*O*_)]};else{var C=Math.sqrt(E),N=(g*g-h*h+i*E)/(2*h*n*C),k=(g*g-h*h-i*E)/(2*g*n*C),M=Math.log(Math.sqrt(N*N+1)-N),R=Math.log(Math.sqrt(k*k+1)-k);_=(R-M)/t,S=function(O){var I=O*_,P=S2(M),K=h/(n*C)*(P*m9(t*I+M)-p9(M));return[c+K*v,f+K*w,h*P/S2(t*I+M)]}}return S.duration=_*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 Go=0,vl=0,ul=0,xj=1e3,vf,xl,xf=0,Ua=0,If=0,Ll=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 Ua||(bj(g9),Ua=Ll.now()+If)}function g9(){Ua=0}function bf(){this._call=this._time=this._next=null}bf.prototype=wj.prototype={constructor:bf,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&&xl!==this&&(xl?xl._next=this:vf=this,xl=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 bf;return i.restart(e,t,n),i}function y9(){Vb(),++Go;for(var e=vf,t;e;)(t=Ua-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Go}function E2(){Ua=(xf=Ll.now())+If,Go=vl=0;try{y9()}finally{Go=0,x9(),Ua=0}}function v9(){var e=Ll.now(),t=e-xf;t>xj&&(If-=t,xf=e)}function x9(){for(var e,t=vf,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:vf=n);xl=e,Zx(i)}function Zx(e){if(!Go){vl&&(vl=clearTimeout(vl));var t=e-Ua;t>24?(e<1/0&&(vl=setTimeout(E2,e-Ll.now()-If)),ul&&(ul=clearInterval(ul))):(ul||(xf=Ll.now(),ul=setInterval(v9,xj)),Go=1,bj(E2))}}function C2(e,t,n){var i=new bf;return t=t==null?0:+t,i.restart(o=>{i.stop(),e(o+t)},t,n),i}var b9=Lf("start","end","cancel","interrupt"),w9=[],_j=0,N2=1,Wx=2,ef=3,k2=4,Jx=5,tf=6;function Bf(e,t,n,i,o,s){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;_9(e,n,{name:t,index:i,group:o,on:b9,tween:w9,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:_j})}function Fb(e,t){var n=Ar(e,t);if(n.state>_j)throw new Error("too late; already scheduled");return n}function Gr(e,t){var n=Ar(e,t);if(n.state>ef)throw new Error("too late; already running");return n}function Ar(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function _9(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===ef)return C2(l);v.state===k2?(v.state=tf,v.timer.stop(),v.on.call("interrupt",e,e.__data__,v.index,v.group),delete i[p]):+p<t&&(v.state=tf,v.timer.stop(),v.on.call("cancel",e,e.__data__,v.index,v.group),delete i[p])}if(C2(function(){n.state===ef&&(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=ef,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=tf,n.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function nf(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=tf,i.timer.stop(),i.on.call(o?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[l]}s&&delete e.__transition}}function S9(e){return this.each(function(){nf(this,e)})}function E9(e,t){var n,i;return function(){var o=Gr(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 C9(e,t,n){var i,o;if(typeof n!="function")throw new Error;return function(){var s=Gr(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 N9(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=Ar(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?E9:C9)(n,e,t))}function $b(e,t,n){var i=e._id;return e.each(function(){var o=Gr(this,i);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Ar(o,i).value[t]}}function Sj(e,t){var n;return(typeof t=="number"?Br:t instanceof Ha?yf:(n=Ha(t))?(t=n,yf):gj)(e,t)}function k9(e){return function(){this.removeAttribute(e)}}function T9(e){return function(){this.removeAttributeNS(e.space,e.local)}}function A9(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 R9(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 M9(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 j9(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 O9(e,t){var n=qf(e),i=n==="transform"?d9:Sj;return this.attrTween(e,typeof t=="function"?(n.local?j9:M9)(n,i,$b(this,"attr."+e,t)):t==null?(n.local?T9:k9)(n):(n.local?R9:A9)(n,i,t))}function z9(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function D9(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function L9(e,t){var n,i;function o(){var s=t.apply(this,arguments);return s!==i&&(n=(i=s)&&D9(e,s)),n}return o._value=t,o}function q9(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 I9(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=qf(e);return this.tween(n,(i.local?L9:q9)(i,t))}function B9(e,t){return function(){Fb(this,e).delay=+t.apply(this,arguments)}}function H9(e,t){return t=+t,function(){Fb(this,e).delay=t}}function U9(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?B9:H9)(t,e)):Ar(this.node(),t).delay}function P9(e,t){return function(){Gr(this,e).duration=+t.apply(this,arguments)}}function V9(e,t){return t=+t,function(){Gr(this,e).duration=t}}function F9(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?P9:V9)(t,e)):Ar(this.node(),t).duration}function $9(e,t){if(typeof t!="function")throw new Error;return function(){Gr(this,e).ease=t}}function Y9(e){var t=this._id;return arguments.length?this.each($9(t,e)):Ar(this.node(),t).ease}function G9(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Gr(this,e).ease=n}}function X9(e){if(typeof e!="function")throw new Error;return this.each(G9(this._id,e))}function K9(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 bi(i,this._parents,this._name,this._id)}function Q9(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 bi(l,this._parents,this._name,this._id)}function Z9(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 W9(e,t,n){var i,o,s=Z9(t)?Fb:Gr;return function(){var l=s(this,e),c=l.on;c!==i&&(o=(i=c).copy()).on(t,n),l.on=o}}function J9(e,t){var n=this._id;return arguments.length<2?Ar(this.node(),n).on.on(e):this.each(W9(n,e,t))}function eU(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function tU(){return this.on("end.remove",eU(this._id))}function nU(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,Bf(h[g],t,n,g,h,Ar(p,n)));return new bi(s,this._parents,t,n)}function rU(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,w=Ar(p,n),E=0,S=g.length;E<S;++E)(v=g[E])&&Bf(v,t,n,E,g,w);s.push(g),l.push(p)}return new bi(s,l,t,n)}var iU=Gl.prototype.constructor;function aU(){return new iU(this._groups,this._parents)}function oU(e,t){var n,i,o;return function(){var s=Yo(this,e),l=(this.style.removeProperty(e),Yo(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 sU(e,t,n){var i,o=n+"",s;return function(){var l=Yo(this,e);return l===o?null:l===i?s:s=t(i=l,n)}}function lU(e,t,n){var i,o,s;return function(){var l=Yo(this,e),c=n(this),f=c+"";return c==null&&(f=c=(this.style.removeProperty(e),Yo(this,e))),l===f?null:l===i&&f===o?s:(o=f,s=t(i=l,c))}}function uU(e,t){var n,i,o,s="style."+t,l="end."+s,c;return function(){var f=Gr(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 cU(e,t,n){var i=(e+="")=="transform"?f9:Sj;return t==null?this.styleTween(e,oU(e,i)).on("end.style."+e,Ej(e)):typeof t=="function"?this.styleTween(e,lU(e,i,$b(this,"style."+e,t))).each(uU(this._id,e)):this.styleTween(e,sU(e,i,t),n).on("end.style."+e,null)}function fU(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function dU(e,t,n){var i,o;function s(){var l=t.apply(this,arguments);return l!==o&&(i=(o=l)&&fU(e,l,n)),i}return s._value=t,s}function hU(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,dU(e,t,n??""))}function pU(e){return function(){this.textContent=e}}function mU(e){return function(){var t=e(this);this.textContent=t??""}}function gU(e){return this.tween("text",typeof e=="function"?mU($b(this,"text",e)):pU(e==null?"":e+""))}function yU(e){return function(t){this.textContent=e.call(this,t)}}function vU(e){var t,n;function i(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&yU(o)),t}return i._value=e,i}function xU(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,vU(e))}function bU(){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=Ar(f,t);Bf(f,e,n,h,l,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new bi(i,this._parents,e,n)}function wU(){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=Gr(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 _U=0;function bi(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function Cj(){return++_U}var mi=Gl.prototype;bi.prototype={constructor:bi,select:nU,selectAll:rU,selectChild:mi.selectChild,selectChildren:mi.selectChildren,filter:K9,merge:Q9,selection:aU,transition:bU,call:mi.call,nodes:mi.nodes,node:mi.node,size:mi.size,empty:mi.empty,each:mi.each,on:J9,attr:O9,attrTween:I9,style:cU,styleTween:hU,text:gU,textTween:xU,remove:tU,tween:N9,delay:U9,duration:F9,ease:Y9,easeVarying:X9,end:wU,[Symbol.iterator]:mi[Symbol.iterator]};function SU(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var EU={time:null,delay:0,duration:250,ease:SU};function CU(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 NU(e){var t,n;e instanceof bi?(t=e._id,e=e._name):(t=Cj(),(n=EU).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])&&Bf(f,e,t,h,l,n||CU(f,t));return new bi(i,this._parents,e,t)}Gl.prototype.interrupt=S9;Gl.prototype.transition=NU;const jc=e=>()=>e;function kU(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 yi(e,t,n){this.k=e,this.x=t,this.y=n}yi.prototype={constructor:yi,scale:function(e){return e===1?this:new yi(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new yi(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 Hf=new yi(1,0,0);Nj.prototype=yi.prototype;function Nj(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Hf;return e.__zoom}function Pp(e){e.stopImmediatePropagation()}function cl(e){e.preventDefault(),e.stopImmediatePropagation()}function TU(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function AU(){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||Hf}function RU(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function MU(){return navigator.maxTouchPoints||"ontouchstart"in this}function jU(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=TU,t=AU,n=jU,i=RU,o=MU,s=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,f=Jc,h=Lf("start","zoom","end"),p,m,g,v=500,w=150,E=0,S=10;function _(L){L.property("__zoom",T2).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",P).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)")}_.transform=function(L,B,z,V){var G=L.selection?L.selection():L;G.property("__zoom",T2),L!==G?M(L,B,z,V):G.interrupt().each(function(){R(this,arguments).event(V).start().zoom(null,typeof B=="function"?B.apply(this,arguments):B).end()})},_.scaleBy=function(L,B,z,V){_.scaleTo(L,function(){var G=this.__zoom.k,Q=typeof B=="function"?B.apply(this,arguments):B;return G*Q},z,V)},_.scaleTo=function(L,B,z,V){_.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(N(C(Q,$),j,D),G,l)},z,V)},_.translateBy=function(L,B,z,V){_.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,V)},_.translateTo=function(L,B,z,V,G){_.transform(L,function(){var Q=t.apply(this,arguments),j=this.__zoom,D=V==null?k(Q):typeof V=="function"?V.apply(this,arguments):V;return n(Hf.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)},V,G)};function C(L,B){return B=Math.max(s[0],Math.min(s[1],B)),B===L.k?L:new yi(B,L.x,L.y)}function N(L,B,z){var V=B[0]-z[0]*L.k,G=B[1]-z[1]*L.k;return V===L.x&&G===L.y?L:new yi(L.k,V,G)}function k(L){return[(+L[0][0]+ +L[1][0])/2,(+L[0][1]+ +L[1][1])/2]}function M(L,B,z,V){L.on("start.zoom",function(){R(this,arguments).event(V).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(V).end()}).tween("zoom",function(){var G=this,Q=arguments,j=R(G,Q).event(V),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,W=typeof B=="function"?B.apply(G,Q):B,Z=f(Y.invert($).concat(q/Y.k),W.invert($).concat(q/W.k));return function(te){if(te===1)te=W;else{var re=Z(te),se=q/re[2];te=new yi(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=Vn(this.that).datum();h.call(L,this.that,new kU(L,{sourceEvent:this.sourceEvent,target:_,transform:this.that.__zoom,dispatch:h}),B)}};function I(L,...B){if(!e.apply(this,arguments))return;var z=R(this,B).event(L),V=this.__zoom,G=Math.max(s[0],Math.min(s[1],V.k*Math.pow(2,i.apply(this,arguments)))),Q=br(L);if(z.wheel)(z.mouse[0][0]!==Q[0]||z.mouse[0][1]!==Q[1])&&(z.mouse[1]=V.invert(z.mouse[0]=Q)),clearTimeout(z.wheel);else{if(V.k===G)return;z.mouse=[Q,V.invert(Q)],nf(this),z.start()}cl(L),z.wheel=setTimeout(j,w),z.zoom("mouse",n(N(C(V,G),z.mouse[0],z.mouse[1]),z.extent,l));function j(){z.wheel=null,z.end()}}function P(L,...B){if(g||!e.apply(this,arguments))return;var z=L.currentTarget,V=R(this,B,!0).event(L),G=Vn(L.view).on("mousemove.zoom",$,!0).on("mouseup.zoom",q,!0),Q=br(L,z),j=L.clientX,D=L.clientY;cj(L.view),Pp(L),V.mouse=[Q,this.__zoom.invert(Q)],nf(this),V.start();function $(Y){if(cl(Y),!V.moved){var W=Y.clientX-j,Z=Y.clientY-D;V.moved=W*W+Z*Z>E}V.event(Y).zoom("mouse",n(N(V.that.__zoom,V.mouse[0]=br(Y,z),V.mouse[1]),V.extent,l))}function q(Y){G.on("mousemove.zoom mouseup.zoom",null),fj(Y.view,V.moved),cl(Y),V.event(Y).end()}}function K(L,...B){if(e.apply(this,arguments)){var z=this.__zoom,V=br(L.changedTouches?L.changedTouches[0]:L,this),G=z.invert(V),Q=z.k*(L.shiftKey?.5:2),j=n(N(C(z,Q),V,G),t.apply(this,B),l);cl(L),c>0?Vn(this).transition().duration(c).call(M,j,V,L):Vn(this).call(_.transform,j,V,L)}}function H(L,...B){if(e.apply(this,arguments)){var z=L.touches,V=z.length,G=R(this,B,L.changedTouches.length===V).event(L),Q,j,D,$;for(Pp(L),j=0;j<V;++j)D=z[j],$=br(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)),nf(this),G.start())}}function F(L,...B){if(this.__zooming){var z=R(this,B).event(L),V=L.changedTouches,G=V.length,Q,j,D,$;for(cl(L),Q=0;Q<G;++Q)j=V[Q],D=br(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],W=z.touch1[0],Z=z.touch1[1],te=(te=W[0]-q[0])*te+(te=W[1]-q[1])*te,re=(re=Z[0]-Y[0])*re+(re=Z[1]-Y[1])*re;j=C(j,Math.sqrt(te/re)),D=[(q[0]+W[0])/2,(q[1]+W[1])/2],$=[(Y[0]+Z[0])/2,(Y[1]+Z[1])/2]}else if(z.touch0)D=z.touch0[0],$=z.touch0[1];else return;z.zoom("touch",n(N(j,D,$),z.extent,l))}}function X(L,...B){if(this.__zooming){var z=R(this,B).event(L),V=L.changedTouches,G=V.length,Q,j;for(Pp(L),g&&clearTimeout(g),g=setTimeout(function(){g=null},v),Q=0;Q<G;++Q)j=V[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=br(j,this),Math.hypot(m[0]-j[0],m[1]-j[1])<S)){var D=Vn(this).on("dblclick.zoom");D&&D.apply(this,arguments)}}}return _.wheelDelta=function(L){return arguments.length?(i=typeof L=="function"?L:jc(+L),_):i},_.filter=function(L){return arguments.length?(e=typeof L=="function"?L:jc(!!L),_):e},_.touchable=function(L){return arguments.length?(o=typeof L=="function"?L:jc(!!L),_):o},_.extent=function(L){return arguments.length?(t=typeof L=="function"?L:jc([[+L[0][0],+L[0][1]],[+L[1][0],+L[1][1]]]),_):t},_.scaleExtent=function(L){return arguments.length?(s[0]=+L[0],s[1]=+L[1],_):[s[0],s[1]]},_.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],_):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},_.constrain=function(L){return arguments.length?(n=L,_):n},_.duration=function(L){return arguments.length?(c=+L,_):c},_.interpolate=function(L){return arguments.length?(f=L,_):f},_.on=function(){var L=h.on.apply(h,arguments);return L===h?_:L},_.clickDistance=function(L){return arguments.length?(E=(L=+L)*L,_):Math.sqrt(E)},_.tapDistance=function(L){return arguments.length?(S=+L,_):S},_}const Nr={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."},ql=[[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 Xo;(function(e){e.Strict="strict",e.Loose="loose"})(Xo||(Xo={}));var Ba;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Ba||(Ba={}));var Il;(function(e){e.Partial="partial",e.Full="full"})(Il||(Il={}));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 sa;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(sa||(sa={}));var wf;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(wf||(wf={}));var Ce;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Ce||(Ce={}));const A2={[Ce.Left]:Ce.Right,[Ce.Right]:Ce.Left,[Ce.Top]:Ce.Bottom,[Ce.Bottom]:Ce.Top};function OU(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,zU=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),Kl=(e,t=[0,0])=>{const{width:n,height:i}=wi(e),o=e.origin??t,s=n*o[0],l=i*o[1];return{x:e.position.x-s,y:e.position.y-l}},DU=(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?_f(l,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Uf(i,c)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Pf(n)},Ql=(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=Uf(n,_f(o)),i=!0)}),i?Pf(n):{x:0,y:0,width:0,height:0}},Gb=(e,t,[n,i,o]=[0,0,1],s=!1,l=!1)=>{const c={...Wl(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,w=p.height??h.height??h.initialHeight??null,E=Bl(c,Qo(h)),S=(v??0)*(w??0),_=s&&E>0;(!h.internals.handleBounds||_||E>=S||h.dragging)&&f.push(h)}return f},LU=(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 qU(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 IU({nodes:e,width:t,height:n,panZoom:i,minZoom:o,maxZoom:s},l){if(e.size===0)return Promise.resolve(!0);const c=qU(e,l),f=Ql(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",Nr.error005());else{const v=c.measured.width,w=c.measured.height;v&&w&&(m=[[f,h],[f+v,h+w]])}else c&&Zo(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=Zo(m)?Pa(t,m,l.measured):t;return(l.measured.width===void 0||l.measured.height===void 0)&&(s==null||s("015",Nr.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 BU({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),w=!v&&g.parentId&&l.find(E=>E.id===g.parentId);(v||w)&&l.push(g)}const c=new Set(t.map(g=>g.id)),f=i.filter(g=>g.deletable!==!1),p=LU(l,f);for(const g of f)c.has(g.id)&&!p.find(w=>w.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 Ko=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Pa=(e={x:0,y:0},t,n)=>({x:Ko(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:Ko(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}=wi(n),{x:s,y:l}=n.internals.positionAbsolute;return Pa(e,[[s,l],[s+i,l+o]],t)}const M2=(e,t,n)=>e<t?Ko(Math.abs(e-t),1,t)/t:e>n?-Ko(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]},Uf=(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}),Pf=({x:e,y:t,x2:n,y2:i})=>({x:e,y:t,width:n-e,height:i-t}),Qo=(e,t=[0,0])=>{var o,s;const{x:n,y:i}=Yb(e)?e.internals.positionAbsolute:Kl(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}},_f=(e,t=[0,0])=>{var o,s;const{x:n,y:i}=Yb(e)?e.internals.positionAbsolute:Kl(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)=>Pf(Uf(eb(e),eb(t))),Bl=(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=>Sr(e.width)&&Sr(e.height)&&Sr(e.x)&&Sr(e.y),Sr=e=>!isNaN(e)&&isFinite(e),HU=(e,t)=>{},Zl=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Wl=({x:e,y:t},[n,i,o],s=!1,l=[1,1])=>{const c={x:(e-n)/o,y:(t-i)/o};return s?Zl(c,l):c},Sf=({x:e,y:t},[n,i,o])=>({x:e*o+n,y:t*o+i});function zo(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 UU(e,t,n){if(typeof e=="string"||typeof e=="number"){const i=zo(e,n),o=zo(e,t);return{top:i,right:o,bottom:i,left:o,x:o*2,y:i*2}}if(typeof e=="object"){const i=zo(e.top??e.y??0,n),o=zo(e.bottom??e.y??0,n),s=zo(e.left??e.x??0,t),l=zo(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 PU(e,t,n,i,o,s){const{x:l,y:c}=Sf(e,[t,n,i]),{x:f,y:h}=Sf({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=UU(s,t,n),c=(t-l.x)/e.width,f=(n-l.y)/e.height,h=Math.min(c,f),p=Ko(h,i,o),m=e.x+e.width/2,g=e.y+e.height/2,v=t/2-m*p,w=n/2-g*p,E=PU(e,v,w,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:w-S.top+S.bottom,zoom:p}},Hl=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Zo(e){return e!=null&&e!=="parent"}function wi(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 VU(){let e,t;return{promise:new Promise((i,o)=>{e=i,t=o}),resolve:e,reject:t}}function FU(e){return{...Aj,...e||{}}}function kl(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:i,containerBounds:o}){const{x:s,y:l}=Er(e),c=Wl({x:s-((o==null?void 0:o.left)??0),y:l-((o==null?void 0:o.top)??0)},i),{x:f,y:h}=n?Zl(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)},$U=["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:$U.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const Uj=e=>"clientX"in e,Er=(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 Oc(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 Ce.Left:return[t-Oc(t-i,s),n];case Ce.Right:return[t+Oc(i-t,s),n];case Ce.Top:return[t,n-Oc(n-o,s)];case Ce.Bottom:return[t,n+Oc(o-n,s)]}}function os({sourceX:e,sourceY:t,sourcePosition:n=Ce.Bottom,targetX:i,targetY:o,targetPosition:s=Ce.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,w]=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,w]}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 YU({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 GU({sourceNode:e,targetNode:t,width:n,height:i,transform:o}){const s=Uf(_f(e),_f(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 Bl(l,Pf(s))>0}const XU=({source:e,sourceHandle:t,target:n,targetHandle:i})=>`xy-edge__${e}${t||""}-${n}${i||""}`,KU=(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)),QU=(e,t,n={})=>{if(!e.source||!e.target)return t;const i=n.getEdgeId||XU;let o;return jj(e)?o={...e}:o={...e,id:i(e)},KU(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={[Ce.Left]:{x:-1,y:0},[Ce.Right]:{x:1,y:0},[Ce.Top]:{x:0,y:-1},[Ce.Bottom]:{x:0,y:1}},ZU=({source:e,sourcePosition:t=Ce.Bottom,target:n})=>t===Ce.Left||t===Ce.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 WU({source:e,sourcePosition:t=Ce.Bottom,target:n,targetPosition:i=Ce.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=ZU({source:h,sourcePosition:t,target:p}),g=m.x!==0?"x":"y",v=m[g];let w=[],E,S;const _={x:0,y:0},C={x:0,y:0},[,,N,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?w=g==="x"?R:O:w=g==="x"?O:R}else{const R=[{x:h.x,y:p.y}],O=[{x:p.x,y:h.y}];if(g==="x"?w=c.x===v?O:R:w=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?_[g]=(h[g]>e[g]?-1:1)*X:C[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))&&(w=g==="x"?R:O)}const I={x:h.x+_.x,y:h.y+_.y},P={x:p.x+C.x,y:p.y+C.y},K=Math.max(Math.abs(I.x-w[0].x),Math.abs(P.x-w[0].x)),H=Math.max(Math.abs(I.y-w[0].y),Math.abs(P.y-w[0].y));K>=H?(E=(I.x+P.x)/2,S=w[0].y):(E=w[0].x,S=(I.y+P.y)/2)}return[[e,{x:h.x+_.x,y:h.y+_.y},...w,{x:p.x+C.x,y:p.y+C.y},n],E,S,N,k]}function JU(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 Wo({sourceX:e,sourceY:t,sourcePosition:n=Ce.Bottom,targetX:i,targetY:o,targetPosition:s=Ce.Top,borderRadius:l=5,centerX:c,centerY:f,offset:h=20,stepPosition:p=.5}){const[m,g,v,w,E]=WU({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((_,C,N)=>{let k="";return N>0&&N<m.length-1?k=JU(m[N-1],C,m[N+1],l):k=`${N===0?"M":"L"}${C.x} ${C.y}`,_+=k,_},""),g,v,w,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 e7(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===Xo.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",Nr.error008(s?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const c=(s==null?void 0:s.position)||Ce.Bottom,f=(l==null?void 0:l.position)||Ce.Top,h=Va(t,s,c),p=Va(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 Va(e,t,n=Ce.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??wi(e);if(i)return{x:o+l/2,y:s+c/2};switch((t==null?void 0:t.position)??n){case Ce.Top:return{x:o+l/2,y:s};case Ce.Right:return{x:o+l,y:s+c/2};case Ce.Bottom:return{x:o+l/2,y:s+c};case Ce.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 t7(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,n7=10,Qb={nodeOrigin:[0,0],nodeExtent:ql,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},r7={...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 i7(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=Kl(o,i.nodeOrigin),l=Zo(o.extent)?o.extent:i.nodeExtent,c=Pa(s,l,wi(o));o.internals.positionAbsolute=c}}function a7(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(r7,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=Kl(m,o.nodeOrigin),w=Zo(m.extent)?m.extent:o.nodeExtent,E=Pa(v,w,wi(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:a7(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 o7(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}o7(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*n7),o&&p.internals.rootParentIndex!==void 0&&(o.i=p.internals.rootParentIndex);const m=s&&!Wb(f)?$j:0,{x:g,y:v,z:w}=s7(e,p,l,c,m,f),{positionAbsolute:E}=e.internals,S=g!==E.x||v!==E.y;(S||w!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:S?{x:g,y:v}:E,z:w}})}function Yj(e,t,n){const i=Sr(e.zIndex)?e.zIndex:0;return Wb(n)?i:i+(e.selected?t:0)}function s7(e,t,n,i,o,s){const{x:l,y:c}=t.internals.positionAbsolute,f=wi(e),h=Kl(e,n),p=Zo(e.extent)?Pa(h,e.extent,f):h;let m=Pa({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)??Qo(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 N;const p=f.internals.positionAbsolute,m=wi(f),g=f.origin??i,v=c.x<p.x?Math.round(Math.abs(p.x-c.x)):0,w=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)),_=(E-m.width)*g[0],C=(S-m.height)*g[1];(v>0||w>0||_||C)&&(o.push({id:h,type:"position",position:{x:f.position.x-v+_,y:f.position.y-w+C}}),(N=n.get(h))==null||N.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+w}})})),(m.width<c.width||m.height<c.height||v||w)&&o.push({id:h,type:"dimensions",setAttributes:!0,dimensions:{width:E+(v?g[0]*v-_:0),height:S+(w?g[1]*w-C:0)}})}),o}function l7(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 w=t.get(v.id);if(!w)continue;if(w.hidden){t.set(w.id,{...w,internals:{...w.internals,handleBounds:void 0}}),f=!0;continue}const E=Kb(v.nodeElement),S=w.measured.width!==E.width||w.measured.height!==E.height;if(!!(E.width&&E.height&&(S||!w.internals.handleBounds||v.force))){const C=v.nodeElement.getBoundingClientRect(),N=Zo(w.extent)?w.extent:s;let{positionAbsolute:k}=w.internals;w.parentId&&w.extent==="parent"?k=zj(k,E,t.get(w.parentId)):N&&(k=Pa(k,N,E));const M={...w,measured:E,internals:{...w.internals,positionAbsolute:k,handleBounds:{source:z2("source",v.nodeElement,C,m,w.id),target:z2("target",v.nodeElement,C,m,w.id)}}};t.set(w.id,M),w.parentId&&Jb(M,t,n,{nodeOrigin:o,zIndexMode:l}),f=!0,S&&(h.push({id:w.id,type:"dimensions",dimensions:E}),w.expandParent&&w.parentId&&g.push({id:w.id,parentId:w.parentId,rect:Qo(M,o)}))}}if(g.length>0){const v=e1(g,t,n,o);h.push(...v)}return{changes:h,updatedInternals:f}}async function u7({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 c7(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 f7({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=Zl(s,t);return{x:l.x-s.x,y:l.y-s.y}}function d7({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,w=!1,E=null;function S({noDragClassName:C,handleSelector:N,domNode:k,isSelectable:M,nodeId:R,nodeClickDistance:O=0}){g=Vn(k);function I({x:F,y:X}){const{nodeLookup:L,nodeExtent:B,snapGrid:z,snapToGrid:V,nodeOrigin:G,onNodeDrag:Q,onSelectionDrag:j,onError:D,updateNodePositions:$}=t();s={x:F,y:X};let q=!1;const Y=c.size>1,W=Y&&B?eb(Ql(c)):null,Z=Y&&V?f7({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};V&&(se=Z?{x:Math.round(se.x+Z.x),y:Math.round(se.y+Z.y)}:Zl(se,z));let ge=null;if(Y&&B&&!re.extent&&W){const{positionAbsolute:Ee}=re.internals,pe=Ee.x-W.x+B[0][0],Ne=Ee.x+re.measured.width-W.x2+B[1][0],Oe=Ee.y-W.y+B[0][1],Re=Ee.y+re.measured.height-W.y2+B[1][1];ge=[[pe,Oe],[Ne,Re]]}const{position:be,positionAbsolute:ve}=Oj({nodeId:te,nextPosition:se,nodeLookup:L,nodeExtent:ge||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(w=w||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 P(){if(!p)return;const{transform:F,panBy:X,autoPanSpeed:L,autoPanOnNodeDrag:B}=t();if(!B){f=!1,cancelAnimationFrame(l);return}const[z,V]=Dj(h,p,L);(z!==0||V!==0)&&(s.x=(s.x??0)-z/F[2],s.y=(s.y??0)-V/F[2],await X({x:z,y:V})&&I(s)),l=requestAnimationFrame(P)}function K(F){var Y;const{nodeLookup:X,multiSelectionActive:L,nodesDraggable:B,transform:z,snapGrid:V,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=kl(F.sourceEvent,{transform:z,snapGrid:V,snapToGrid:G,containerBounds:p});if(s=q,c=c7(X,B,q,R),c.size>0&&(n||j||!R&&D)){const[W,Z]=Vp({nodeId:R,dragItems:c,nodeLookup:X});n==null||n(F.sourceEvent,c,W,Z),j==null||j(F.sourceEvent,W,Z),R||D==null||D(F.sourceEvent,Z)}}const H=dj().clickDistance(O).on("start",F=>{const{domNode:X,nodeDragThreshold:L,transform:B,snapGrid:z,snapToGrid:V}=t();p=(X==null?void 0:X.getBoundingClientRect())||null,v=!1,w=!1,E=F.sourceEvent,L===0&&K(F),s=kl(F.sourceEvent,{transform:B,snapGrid:z,snapToGrid:V,containerBounds:p}),h=Er(F.sourceEvent,p)}).on("drag",F=>{const{autoPanOnNodeDrag:X,transform:L,snapGrid:B,snapToGrid:z,nodeDragThreshold:V,nodeLookup:G}=t(),Q=kl(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,P()),!m){const j=Er(F.sourceEvent,p),D=j.x-h.x,$=j.y-h.y;Math.sqrt(D*D+$*$)>V&&K(F)}(s.x!==Q.xSnapped||s.y!==Q.ySnapped)&&c&&m&&(h=Er(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(w&&(L(c,!1),w=!1),o||B||!R&&z){const[V,G]=Vp({nodeId:R,dragItems:c,nodeLookup:X,dragging:!1});o==null||o(F.sourceEvent,c,V,G),B==null||B(F.sourceEvent,V,G),R||z==null||z(F.sourceEvent,G)}}}).filter(F=>{const X=F.target;return!F.button&&(!C||!P2(X,`.${C}`,k))&&(!N||P2(X,N,k))});g.call(H)}function _(){g==null||g.on(".drag",null)}return{update:S,destroy:_}}function h7(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())Bl(o,Qo(s))>0&&i.push(s);return i}const p7=250;function m7(e,t,n,i){var c,f;let o=[],s=1/0;const l=h7(e,n,t+p7);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}=Va(h,m,m.position,!0),w=Math.sqrt(Math.pow(g-e.x,2)+Math.pow(v-e.y,2));w>t||(w<s?(o=[{...m,x:g,y:v}],s=w):w===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,...Va(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 g7(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const Zj=()=>!0;function y7(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:w,onConnect:E,onConnectEnd:S,isValidConnection:_=Zj,onReconnectEnd:C,updateConnection:N,getTransform:k,getFromHandle:M,autoPanSpeed:R,dragThreshold:O=1,handleDomNode:I}){const P=Bj(e.target);let K=0,H;const{x:F,y:X}=Er(e),L=Qj(s,I),B=c==null?void 0:c.getBoundingClientRect();let z=!1;if(!B||!L)return;const V=Kj(o,L,i,f,t);if(!V)return;let G=Er(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={...V,nodeId:o,type:L,position:V.position},W=f.get(o);let te={inProgress:!0,isValid:null,from:Va(W,Y,Ce.Left,!0),fromHandle:Y,fromPosition:Y.position,fromNode:W,to:G,toHandle:null,toPosition:A2[Y.position],toNode:null,pointer:G};function re(){z=!0,N(te),w==null||w(e,{nodeId:o,handleId:i,handleType:L})}O===0&&re();function se(be){if(!z){const{x:Re,y:vt}=Er(be),he=Re-F,ye=vt-X;if(!(he*he+ye*ye>O*O))return;re()}if(!M()||!Y){ge(be);return}const ve=k();G=Er(be,B),H=m7(Wl(G,ve,!1,[1,1]),n,f,Y),Q||(q(),Q=!0);const Ee=Wj(be,{handle:H,connectionMode:t,fromNodeId:o,fromHandleId:i,fromType:l?"target":"source",isValidConnection:_,doc:P,lib:h,flowId:m,nodeLookup:f});$=Ee.handleDomNode,j=Ee.connection,D=g7(!!H,Ee.isValid);const pe=f.get(o),Ne=pe?Va(pe,Y,Ce.Left,!0):te.from,Oe={...te,from:Ne,isValid:D,to:Ee.toHandle&&D?Sf({x:Ee.toHandle.x,y:Ee.toHandle.y},ve):G,toHandle:Ee.toHandle,toPosition:D&&Ee.toHandle?Ee.toHandle.position:A2[Y.position],toNode:Ee.toHandle?f.get(Ee.toHandle.nodeId):null,pointer:G};N(Oe),te=Oe}function ge(be){if(!("touches"in be&&be.touches.length>0)){if(z){(H||$)&&j&&D&&(E==null||E(j));const{inProgress:ve,...Ee}=te,pe={...Ee,toPosition:te.toHandle?te.toPosition:null};S==null||S(be,pe),s&&(C==null||C(be,pe))}v(),cancelAnimationFrame(K),Q=!1,D=!1,j=null,$=null,P.removeEventListener("mousemove",se),P.removeEventListener("mouseup",ge),P.removeEventListener("touchmove",se),P.removeEventListener("touchend",ge)}}P.addEventListener("mousemove",se),P.addEventListener("mouseup",ge),P.addEventListener("touchmove",se),P.addEventListener("touchend",ge)}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:w}=Er(e),E=l.elementFromPoint(v,w),S=E!=null&&E.classList.contains(`${c}-flow__handle`)?E:g,_={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const C=Qj(void 0,S),N=S.getAttribute("data-nodeid"),k=S.getAttribute("data-handleid"),M=S.classList.contains("connectable"),R=S.classList.contains("connectableend");if(!N||!C)return _;const O={source:m?N:i,sourceHandle:m?k:o,target:m?i:N,targetHandle:m?o:k};_.connection=O;const P=M&&R&&(n===Xo.Strict?m&&C==="source"||!m&&C==="target":N!==i||k!==o);_.isValid=P&&h(O),_.toHandle=Kj(N,C,k,p,n,!0)}return _}const rb={onPointerDown:y7,isValid:Wj};function v7({domNode:e,panZoom:t,getTransform:n,getViewScale:i}){const o=Vn(e);function s({translateExtent:c,width:f,height:h,zoomStep:p=1,pannable:m=!0,zoomable:g=!0,inversePan:v=!1}){const w=N=>{if(N.sourceEvent.type!=="wheel"||!t)return;const k=n(),M=N.sourceEvent.ctrlKey&&Hl()?10:1,R=-N.sourceEvent.deltaY*(N.sourceEvent.deltaMode===1?.05:N.sourceEvent.deltaMode?1:.002)*p,O=k[2]*Math.pow(2,R*M);t.scaleTo(O)};let E=[0,0];const S=N=>{(N.sourceEvent.type==="mousedown"||N.sourceEvent.type==="touchstart")&&(E=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY])},_=N=>{const k=n();if(N.sourceEvent.type!=="mousemove"&&N.sourceEvent.type!=="touchmove"||!t)return;const M=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.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},P=[[0,0],[f,h]];t.setViewportConstrained({x:I.x,y:I.y,zoom:k[2]},P,c)},C=kj().on("start",S).on("zoom",m?_:null).on("zoom.wheel",g?w:null);o.call(C,{})}function l(){o.on("zoom",null)}return{update:s,destroy:l,pointer:br}}const Vf=e=>({x:e.x,y:e.y,zoom:e.k}),Fp=({x:e,y:t,zoom:n})=>Hf.translate(e,t).scale(n),Io=(e,t)=>e.target.closest(`.${t}`),Jj=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),x7=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,$p=(e,t=0,n=x7,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&&Hl()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function b7({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:i,panOnScrollMode:o,panOnScrollSpeed:s,zoomOnPinch:l,onPanZoomStart:c,onPanZoom:f,onPanZoomEnd:h}){return p=>{if(Io(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=br(p),_=e5(p),C=m*Math.pow(2,_);i.scaleTo(n,C,S,p);return}const g=p.deltaMode===1?20:1;let v=o===Ba.Vertical?0:p.deltaX*g,w=o===Ba.Horizontal?0:p.deltaY*g;!Hl()&&p.shiftKey&&o!==Ba.Vertical&&(v=p.deltaY*g,w=0),i.translateBy(n,-(v/m)*s,-(w/m)*s,{internal:!0});const E=Vf(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 w7({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(i,o){const s=i.type==="wheel",l=!t&&s&&!i.ctrlKey,c=Io(i,e);if(i.ctrlKey&&s&&c&&i.preventDefault(),l||c)return null;i.preventDefault(),n.call(this,i,o)}}function _7({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return i=>{var s,l,c;if((s=i.sourceEvent)!=null&&s.internal)return;const o=Vf(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 S7({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,Vf(s.transform)))}}function E7({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=Vf(l.transform);e.prevViewport=f,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o==null||o(l.sourceEvent,f)},n?150:0)}}}function C7({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,w=m.type==="wheel";if(m.button===1&&m.type==="mousedown"&&(Io(m,`${h}-flow__node`)||Io(m,`${h}-flow__edge`)))return!0;if(!i&&!g&&!o&&!s&&!n||l||p&&!w||Io(m,c)&&w||Io(m,f)&&(!w||o&&w&&!e)||!n&&m.ctrlKey&&w)return!1;if(!n&&m.type==="touchstart"&&((S=m.touches)==null?void 0:S.length)>1)return m.preventDefault(),!1;if(!g&&!o&&!v&&w||!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||w)&&E}}function N7({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=Vn(e).call(m);C({x:o.x,y:o.y,zoom:Ko(o.zoom,t,n)},[[0,0],[p.width,p.height]],i);const v=g.on("wheel.zoom"),w=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"?Nl:Jc).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:V,panOnScrollSpeed:G,preventScrolling:Q,zoomOnPinch:j,zoomOnScroll:D,zoomOnDoubleClick:$,zoomActivationKeyPressed:q,lib:Y,onTransformChange:W,connectionInProgress:Z,paneClickDistance:te,selectionOnDrag:re}){L&&!h.isZoomingOrPanning&&_();const se=B&&!q&&!L;m.clickDistance(re?1/0:!Sr(te)||te<0?0:te);const ge=se?b7({zoomPanValues:h,noWheelClassName:H,d3Selection:g,d3Zoom:m,panOnScrollMode:V,panOnScrollSpeed:G,zoomOnPinch:j,onPanZoomStart:l,onPanZoom:s,onPanZoomEnd:c}):w7({noWheelClassName:H,preventScrolling:Q,d3ZoomHandler:v});if(g.on("wheel.zoom",ge,{passive:!1}),!L){const ve=_7({zoomPanValues:h,onDraggingChange:f,onPanZoomStart:l});m.on("start",ve);const Ee=S7({zoomPanValues:h,panOnDrag:z,onPaneContextMenu:!!X,onPanZoom:s,onTransformChange:W});m.on("zoom",Ee);const pe=E7({zoomPanValues:h,panOnDrag:z,panOnScroll:B,onPaneContextMenu:X,onPanZoomEnd:c,onDraggingChange:f});m.on("end",pe)}const be=C7({zoomActivationKeyPressed:q,panOnDrag:z,zoomOnScroll:D,panOnScroll:B,zoomOnDoubleClick:$,zoomOnPinch:j,userSelectionActive:L,noPanClassName:F,noWheelClassName:H,lib:Y,connectionInProgress:Z});m.filter(be),$?g.on("dblclick.zoom",w):g.on("dblclick.zoom",null)}function _(){m.on("zoom",null)}async function C(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 N(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"?Nl:Jc).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"?Nl:Jc).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 P(H){m==null||m.translateExtent(H)}function K(H){const F=!Sr(H)||H<0?0:H;m==null||m.clickDistance(F)}return{update:S,destroy:_,setViewport:N,setViewportConstrained:C,getViewport:M,scaleTo:R,scaleBy:O,setScaleExtent:I,setTranslateExtent:P,syncViewport:k,setClickDistance:K}}var Jo;(function(e){e.Line="line",e.Handle="handle"})(Jo||(Jo={}));function k7({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 ta(e,t){return Math.max(0,t-e)}function na(e,t){return Math.max(0,e-t)}function zc(e,t,n){return Math.max(0,t-e,e-n)}function F2(e,t){return e?!t:t}function T7(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:w}=n,{minWidth:E,maxWidth:S,minHeight:_,maxHeight:C}=i,{x:N,y:k,width:M,height:R,aspectRatio:O}=e;let I=Math.floor(p?v-e.pointerX:0),P=Math.floor(m?w-e.pointerY:0);const K=M+(f?-I:I),H=R+(h?-P:P),F=-s[0]*M,X=-s[1]*R;let L=zc(K,E,S),B=zc(H,_,C);if(l){let G=0,Q=0;f&&I<0?G=ta(N+I+F,l[0][0]):!f&&I>0&&(G=na(N+K+F,l[1][0])),h&&P<0?Q=ta(k+P+X,l[0][1]):!h&&P>0&&(Q=na(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=na(N+I,c[0][0]):!f&&I<0&&(G=ta(N+K,c[1][0])),h&&P>0?Q=na(k+P,c[0][1]):!h&&P<0&&(Q=ta(k+H,c[1][1])),L=Math.max(L,G),B=Math.max(B,Q)}if(o){if(p){const G=zc(K/O,_,C)*O;if(L=Math.max(L,G),l){let Q=0;!f&&!h||f&&!h&&g?Q=na(k+X+K/O,l[1][1])*O:Q=ta(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=ta(k+K/O,c[1][1])*O:Q=na(k+(f?I:-I)/O,c[0][1])*O,L=Math.max(L,Q)}}if(m){const G=zc(H*O,E,S)/O;if(B=Math.max(B,G),l){let Q=0;!f&&!h||h&&!f&&g?Q=na(N+H*O+F,l[1][0])/O:Q=ta(N+(h?P:-P)*O+F,l[0][0])/O,B=Math.max(B,Q)}if(c){let Q=0;!f&&!h||h&&!f&&g?Q=ta(N+H*O,c[1][0])/O:Q=na(N+(h?P:-P)*O,c[0][0])/O,B=Math.max(B,Q)}}}P=P+(P<0?B:-B),I=I+(I<0?L:-L),o&&(g?K>H*O?P=(F2(f,h)?-I:I)/O:I=(F2(f,h)?-P:P)*O:p?(P=I/O,h=f):(I=P*O,f=h));const z=f?N+I:N,V=h?k+P:k;return{width:M+(f?-I:I),height:R+(h?-P:P),x:s[0]*I*(f?-1:1)+z,y:s[1]*P*(h?-1:1)+V}}const t5={width:0,height:0,x:0,y:0},A7={...t5,pointerX:0,pointerY:0,aspectRatio:1};function R7(e){return[[0,0],[e.measured.width,e.measured.height]]}function M7(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 j7({domNode:e,nodeId:t,getStoreItems:n,onChange:i,onEnd:o}){const s=Vn(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:w,onResizeEnd:E,shouldResize:S}){let _={...t5},C={...A7};l={boundaries:p,resizeDirection:g,keepAspectRatio:m,controlDirection:V2(h)};let N,k=null,M=[],R,O,I,P=!1;const K=dj().on("start",H=>{const{nodeLookup:F,transform:X,snapGrid:L,snapToGrid:B,nodeOrigin:z,paneDomNode:V}=n();if(N=F.get(t),!N)return;k=(V==null?void 0:V.getBoundingClientRect())??null;const{xSnapped:G,ySnapped:Q}=kl(H.sourceEvent,{transform:X,snapGrid:L,snapToGrid:B,containerBounds:k});_={width:N.measured.width??0,height:N.measured.height??0,x:N.position.x??0,y:N.position.y??0},C={..._,pointerX:G,pointerY:Q,aspectRatio:_.width/_.height},R=void 0,N.parentId&&(N.extent==="parent"||N.expandParent)&&(R=F.get(N.parentId),O=R&&N.extent==="parent"?R7(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 $=M7(D,N,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,{..._})}).on("drag",H=>{const{transform:F,snapGrid:X,snapToGrid:L,nodeOrigin:B}=n(),z=kl(H.sourceEvent,{transform:F,snapGrid:X,snapToGrid:L,containerBounds:k}),V=[];if(!N)return;const{x:G,y:Q,width:j,height:D}=_,$={},q=N.origin??B,{width:Y,height:W,x:Z,y:te}=T7(C,l.controlDirection,z,l.boundaries,l.keepAspectRatio,q,O,I),re=Y!==j,se=W!==D,ge=Z!==G&&re,be=te!==Q&&se;if(!ge&&!be&&!re&&!se)return;if((ge||be||q[0]===1||q[1]===1)&&($.x=ge?Z:_.x,$.y=be?te:_.y,_.x=$.x,_.y=$.y,M.length>0)){const Ne=Z-G,Oe=te-Q;for(const Re of M)Re.position={x:Re.position.x-Ne+q[0]*(Y-j),y:Re.position.y-Oe+q[1]*(W-D)},V.push(Re)}if((re||se)&&($.width=re&&(!l.resizeDirection||l.resizeDirection==="horizontal")?Y:_.width,$.height=se&&(!l.resizeDirection||l.resizeDirection==="vertical")?W:_.height,_.width=$.width,_.height=$.height),R&&N.expandParent){const Ne=q[0]*($.width??0);$.x&&$.x<Ne&&(_.x=Ne,C.x=C.x-($.x-Ne));const Oe=q[1]*($.height??0);$.y&&$.y<Oe&&(_.y=Oe,C.y=C.y-($.y-Oe))}const ve=k7({width:_.width,prevWidth:j,height:_.height,prevHeight:D,affectsX:l.controlDirection.affectsX,affectsY:l.controlDirection.affectsY}),Ee={..._,direction:ve};(S==null?void 0:S(H,Ee))!==!1&&(P=!0,w==null||w(H,Ee),i($,V))}).on("end",H=>{P&&(E==null||E(H,{..._}),o==null||o({..._}),P=!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 O7(){if($2)return Kp;$2=1;var e=Fl();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(),w=i({inst:{value:v,getSnapshot:g}}),E=w[0].inst,S=w[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 z7(){return Y2||(Y2=1,Xp.exports=O7()),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 D7(){if(G2)return Gp;G2=1;var e=Fl(),t=z7();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 w=s(null);if(w.current===null){var E={hasValue:!1,value:null};w.current=E}else E=w.current;w=c(function(){function _(R){if(!C){if(C=!0,N=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(N,R))return O;var I=g(R);return v!==void 0&&v(O,I)?(N=R,O):(N=R,k=I)}var C=!1,N,k,M=m===void 0?null:m;return[function(){return _(p())},M===null?void 0:function(){return _(M())}]},[p,m,g,v]);var S=o(h,w[0],w[1]);return l(function(){E.hasValue=!0,E.value=S},[S]),f(S),S},Gp}var X2;function L7(){return X2||(X2=1,Yp.exports=D7()),Yp.exports}var q7=L7();const I7=Vl(q7),B7={},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(w=>w(t,v))}},o=()=>t,f={setState:i,getState:o,getInitialState:()=>h,subscribe:p=>(n.add(p),()=>n.delete(p)),destroy:()=>{(B7?"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},H7=e=>e?K2(e):K2,{useDebugValue:U7}=HM,{useSyncExternalStoreWithSelector:P7}=I7,V7=e=>e;function n5(e,t=V7,n){const i=P7(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return U7(i),i}const Q2=(e,t)=>{const n=H7(e),i=(o,s=t)=>n5(n,o,s);return Object.assign(i,n),i},F7=(e,t)=>e?Q2(e,t):Q2;function Ot(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 Ff=T.createContext(null),$7=Ff.Provider,r5=Nr.error001();function it(e,t){const n=T.useContext(Ff);if(n===null)throw new Error(r5);return n5(n,e,t)}function Bt(){const e=T.useContext(Ff);if(e===null)throw new Error(r5);return T.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const Z2={display:"none"},Y7={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",G7="react-flow__aria-live",X7=e=>e.ariaLiveMessage,K7=e=>e.ariaLabelConfig;function Q7({rfId:e}){const t=it(X7);return b.jsx("div",{id:`${G7}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Y7,children:t})}function Z7({rfId:e,disableKeyboardA11y:t}){const n=it(K7);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(Q7,{rfId:e})]})}const $f=T.forwardRef(({position:e="top-left",children:t,className:n,style:i,...o},s)=>{const l=`${e}`.split("-");return b.jsx("div",{className:nn(["react-flow__panel",n,...l]),style:i,ref:s,...o,children:t})});$f.displayName="Panel";function W7({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:b.jsx($f,{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 J7=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}},Dc=e=>e.id;function eP(e,t){return Ot(e.selectedNodes.map(Dc),t.selectedNodes.map(Dc))&&Ot(e.selectedEdges.map(Dc),t.selectedEdges.map(Dc))}function tP({onSelectionChange:e}){const t=Bt(),{selectedNodes:n,selectedEdges:i}=it(J7,eP);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 nP=e=>!!e.onSelectionChangeHandlers;function rP({onSelectionChange:e}){const t=it(nP);return e||t?b.jsx(tP,{onSelectionChange:e}):null}const o5=[0,0],iP={x:0,y:0,zoom:1},aP=["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=[...aP,"rfId"],oP=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:ql,nodeOrigin:o5,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function sP(e){const{setNodes:t,setEdges:n,setMinZoom:i,setMaxZoom:o,setTranslateExtent:s,setNodeExtent:l,reset:c,setDefaultNodesAndEdges:f}=it(oP,Ot),h=Bt();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:FU(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 lP(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 Ul(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,_;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 C=((_=(S=v.composedPath)==null?void 0:S.call(v))==null?void 0:_[0])||v.target,N=(C==null?void 0:C.nodeName)==="BUTTON"||(C==null?void 0:C.nodeName)==="A";t.preventDefault!==!1&&(o.current||!N)&&v.preventDefault(),i(!0)}},m=v=>{const w=rC(v.code,c);nC(l,s.current,!0)?(i(!1),s.current.clear()):s.current.delete(v[w]),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 uP=()=>{const e=Bt();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 Wl(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=Sf(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)cP(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 cP(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 Da(e,t){return{id:e,type:"select",selected:t}}function Bo(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(Da(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=>zU(e),fP=e=>jj(e);function c5(e){return T.forwardRef(e)}const dP=typeof window<"u"?T.useLayoutEffect:T.useEffect;function sC(e){const[t,n]=T.useState(BigInt(0)),[i]=T.useState(()=>hP(()=>n(o=>o+BigInt(1))));return dP(()=>{const o=i.get();o.length&&(e(o),i.reset())},[t]),i}function hP(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const f5=T.createContext(null);function pP({children:e}){const t=Bt(),n=T.useCallback(c=>{const{nodes:f=[],setNodes:h,hasDefaultNodes:p,onNodesChange:m,nodeLookup:g,fitViewQueued:v,onNodesChangeMiddlewareMap:w}=t.getState();let E=f;for(const _ of c)E=typeof _=="function"?_(E):_;let S=iC({items:E,lookup:g});for(const _ of w.values())S=_(S);p&&h(E),S.length>0?m==null||m(S):v&&window.requestAnimationFrame(()=>{const{fitViewQueued:_,nodes:C,setNodes:N}=t.getState();_&&N(C)})},[]),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 w of c)v=typeof w=="function"?w(v):w;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 mP(){const e=T.useContext(f5);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const gP=e=>!!e.panZoom;function Ya(){const e=uP(),t=Bt(),n=mP(),i=it(gP),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 _,C;const{nodeLookup:g,nodeOrigin:v}=t.getState(),w=oC(m)?m:g.get(m.id),E=w.parentId?Ij(w.position,w.measured,w.parentId,g,v):w.position,S={...w,position:E,width:((_=w.measured)==null?void 0:_.width)??w.width,height:((C=w.measured)==null?void 0:C.height)??w.height};return Qo(S)},h=(m,g,v={replace:!1})=>{l(w=>w.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(w=>w.map(E=>{if(E.id===m){const S=typeof g=="function"?g(E):g;return v.replace&&fP(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(),[w,E,S]=v;return{nodes:m.map(_=>({..._})),edges:g.map(_=>({..._})),viewport:{x:w,y:E,zoom:S}}},deleteElements:async({nodes:m=[],edges:g=[]})=>{const{nodes:v,edges:w,onNodesDelete:E,onEdgesDelete:S,triggerNodeChanges:_,triggerEdgeChanges:C,onDelete:N,onBeforeDelete:k}=t.getState(),{nodes:M,edges:R}=await BU({nodesToRemove:m,edgesToRemove:g,nodes:v,edges:w,onBeforeDelete:k}),O=R.length>0,I=M.length>0;if(O){const P=R.map(aC);S==null||S(R),C(P)}if(I){const P=M.map(aC);E==null||E(M),_(P)}return(I||O)&&(N==null||N({nodes:M,edges:R})),{deletedNodes:M,deletedEdges:R}},getIntersectingNodes:(m,g=!0,v)=>{const w=j2(m),E=w?m:f(m),S=v!==void 0;return E?(v||t.getState().nodes).filter(_=>{const C=t.getState().nodeLookup.get(_.id);if(C&&!w&&(_.id===m.id||!C.internals.positionAbsolute))return!1;const N=Qo(S?_:C),k=Bl(N,E);return g&&k>0||k>=N.width*N.height||k>=E.width*E.height}):[]},isNodeIntersecting:(m,g,v=!0)=>{const E=j2(m)?m:f(m);if(!E)return!1;const S=Bl(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,w=>{const E=typeof g=="function"?g(w):g;return v.replace?{...w,data:E}:{...w,data:{...w.data,...E}}},v)},updateEdge:p,updateEdgeData:(m,g,v={replace:!1})=>{p(m,w=>{const E=typeof g=="function"?g(w):g;return v.replace?{...w,data:E}:{...w,data:{...w.data,...E}}},v)},getNodesBounds:m=>{const{nodeLookup:g,nodeOrigin:v}=t.getState();return DU(m,{nodeLookup:g,nodeOrigin:v})},getHandleConnections:({type:m,id:g,nodeId:v})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${v}-${m}${g?`-${g}`:""}`))==null?void 0:w.values())??[])},getNodeConnections:({type:m,handleId:g,nodeId:v})=>{var w;return Array.from(((w=t.getState().connectionLookup.get(`${v}${m?g?`-${m}-${g}`:`-${m}`:""}`))==null?void 0:w.values())??[])},fitView:async m=>{const g=t.getState().fitViewResolver??VU();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,yP=typeof window<"u"?window:void 0;function vP({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Bt(),{deleteElements:i}=Ya(),o=Ul(e,{actInsideInputWithModifier:!1}),s=Ul(t,{target:yP});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 xP(e){const t=Bt();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",Nr.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 Yf={position:"absolute",width:"100%",height:"100%",top:0,left:0},bP=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function wP({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:i=!1,panOnScrollSpeed:o=.5,panOnScrollMode:s=Ba.Free,zoomOnDoubleClick:l=!0,panOnDrag:c=!0,defaultViewport:f,translateExtent:h,minZoom:p,maxZoom:m,zoomActivationKeyCode:g,preventScrolling:v=!0,children:w,noWheelClassName:E,noPanClassName:S,onViewportChange:_,isControlledViewport:C,paneClickDistance:N,selectionOnDrag:k}){const M=Bt(),R=T.useRef(null),{userSelectionActive:O,lib:I,connectionInProgress:P}=it(bP,Ot),K=Ul(g),H=T.useRef();xP(R);const F=T.useCallback(X=>{_==null||_({x:X[0],y:X[1],zoom:X[2]}),C||M.setState({transform:X})},[_,C]);return T.useEffect(()=>{if(R.current){H.current=N7({domNode:R.current,minZoom:p,maxZoom:m,translateExtent:h,viewport:f,onDraggingChange:z=>M.setState(V=>V.paneDragging===z?V:{paneDragging:z}),onPanZoomStart:(z,V)=>{const{onViewportChangeStart:G,onMoveStart:Q}=M.getState();Q==null||Q(z,V),G==null||G(V)},onPanZoom:(z,V)=>{const{onViewportChange:G,onMove:Q}=M.getState();Q==null||Q(z,V),G==null||G(V)},onPanZoomEnd:(z,V)=>{const{onViewportChangeEnd:G,onMoveEnd:Q}=M.getState();Q==null||Q(z,V),G==null||G(V)}});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:P,selectionOnDrag:k,paneClickDistance:N})},[e,t,n,i,o,s,l,c,K,v,S,O,E,I,F,P,k,N]),b.jsx("div",{className:"react-flow__renderer",ref:R,style:Yf,children:w})}const _P=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function SP(){const{userSelectionActive:e,userSelectionRect:t}=it(_P,Ot);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))},EP=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function CP({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Il.Full,panOnDrag:i,paneClickDistance:o,selectionOnDrag:s,onSelectionStart:l,onSelectionEnd:c,onPaneClick:f,onPaneContextMenu:h,onPaneScroll:p,onPaneMouseEnter:m,onPaneMouseMove:g,onPaneMouseLeave:v,children:w}){const E=Bt(),{userSelectionActive:S,elementsSelectable:_,dragging:C,connectionInProgress:N}=it(EP,Ot),k=_&&(e||S),M=T.useRef(null),R=T.useRef(),O=T.useRef(new Set),I=T.useRef(new Set),P=T.useRef(!1),K=G=>{if(P.current||N){P.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=>{P.current&&(G.stopPropagation(),P.current=!1)},L=G=>{var W,Z;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;(Z=(W=G.target)==null?void 0:W.setPointerCapture)==null||Z.call(W,G.pointerId),P.current=!1;const{x:q,y:Y}=Er(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:W,defaultEdgeOptions:Z,resetSelectedElements:te}=E.getState();if(!R.current||!Q)return;const{x:re,y:se}=Er(G.nativeEvent,R.current),{startX:ge,startY:be}=Q;if(!P.current){const Oe=t?0:o;if(Math.hypot(re-ge,se-be)<=Oe)return;te(),l==null||l(G)}P.current=!0;const ve={startX:ge,startY:be,x:re<ge?re:ge,y:se<be?se:be,width:Math.abs(re-ge),height:Math.abs(se-be)},Ee=O.current,pe=I.current;O.current=new Set(Gb(D,ve,j,n===Il.Partial,!0).map(Oe=>Oe.id)),I.current=new Set;const Ne=(Z==null?void 0:Z.selectable)??!0;for(const Oe of O.current){const Re=q.get(Oe);if(Re)for(const{edgeId:vt}of Re.values()){const he=$.get(vt);he&&(he.selectable??Ne)&&I.current.add(vt)}}if(!O2(Ee,O.current)){const Oe=Bo(D,O.current,!0);Y(Oe)}if(!O2(pe,I.current)){const Oe=Bo($,I.current);W(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}),P.current&&(c==null||c(G),E.setState({nodesSelectionActive:O.current.size>0})))},V=i===!0||Array.isArray(i)&&i.includes(0);return b.jsxs("div",{className:nn(["react-flow__pane",{draggable:V,dragging:C,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:Yf,children:[w,b.jsx(SP,{})]})}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",Nr.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=Bt(),[f,h]=T.useState(!1),p=T.useRef();return T.useEffect(()=>{p.current=d7({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 NP=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function h5(){const e=Bt();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=NP(l),v=o?s[0]:5,w=o?s[1]:5,E=n.direction.x*v*n.factor,S=n.direction.y*w*n.factor;for(const[,_]of h){if(!g(_))continue;let C={x:_.internals.positionAbsolute.x+E,y:_.internals.positionAbsolute.y+S};o&&(C=Zl(C,s));const{position:N,positionAbsolute:k}=Oj({nodeId:_.id,nextPosition:C,nodeLookup:h,nodeExtent:i,nodeOrigin:p,onError:c});_.position=N,_.internals.positionAbsolute=k,m.set(_.id,_)}f(m)},[])}const t1=T.createContext(null),kP=t1.Provider;t1.Consumer;const n1=()=>T.useContext(t1),TP=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),AP=(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===Xo.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 RP({type:e="source",position:t=Ce.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 w=l||null,E=e==="target",S=Bt(),_=n1(),{connectOnClick:C,noPanClassName:N,rfId:k}=it(TP,Ot),{connectingFrom:M,connectingTo:R,clickConnecting:O,isPossibleEndHandle:I,connectionInProcess:P,clickConnectionInProcess:K,valid:H}=it(AP(_,w,e),Ot);_||(z=(B=S.getState()).onError)==null||z.call(B,"010",Nr.error010());const F=V=>{const{defaultEdgeOptions:G,onConnect:Q,hasDefaultEdges:j}=S.getState(),D={...G,...V};if(j){const{edges:$,setEdges:q}=S.getState();q(QU(D,$))}Q==null||Q(D),c==null||c(D)},X=V=>{if(!_)return;const G=Uj(V.nativeEvent);if(o&&(G&&V.button===0||!G)){const Q=S.getState();rb.onPointerDown(V.nativeEvent,{handleDomNode:V.currentTarget,autoPanOnConnect:Q.autoPanOnConnect,connectionMode:Q.connectionMode,connectionRadius:Q.connectionRadius,domNode:Q.domNode,nodeLookup:Q.nodeLookup,lib:Q.lib,isTarget:E,handleId:w,nodeId:_,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(V):m==null||m(V)},L=V=>{const{onClickConnectStart:G,onClickConnectEnd:Q,connectionClickStartHandle:j,connectionMode:D,isValidConnection:$,lib:q,rfId:Y,nodeLookup:W,connection:Z}=S.getState();if(!_||!j&&!o)return;if(!j){G==null||G(V.nativeEvent,{nodeId:_,handleId:w,handleType:e}),S.setState({connectionClickStartHandle:{nodeId:_,type:e,id:w}});return}const te=Bj(V.target),re=n||$,{connection:se,isValid:ge}=rb.isValid(V.nativeEvent,{handle:{nodeId:_,id:w,type:e},connectionMode:D,fromNodeId:j.nodeId,fromHandleId:j.id||null,fromType:j.type,isValidConnection:re,flowId:Y,doc:te,lib:q,nodeLookup:W});ge&&se&&F(se);const be=structuredClone(Z);delete be.inProgress,be.toPosition=be.toHandle?be.toHandle.position:null,Q==null||Q(V,be),S.setState({connectionClickStartHandle:null})};return b.jsx("div",{"data-handleid":w,"data-nodeid":_,"data-handlepos":t,"data-id":`${k}-${_}-${w}-${e}`,className:nn(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",N,h,{source:!E,target:E,connectable:i,connectablestart:o,connectableend:s,clickconnecting:O,connectingfrom:M,connectingto:R,valid:H,connectionindicator:i&&(!P||I)&&(P||K?s:o)}]),onMouseDown:X,onTouchStart:X,onClick:C?L:void 0,ref:v,...g,children:f})}const mt=T.memo(c5(RP));function MP({data:e,isConnectable:t,sourcePosition:n=Ce.Bottom}){return b.jsxs(b.Fragment,{children:[e==null?void 0:e.label,b.jsx(mt,{type:"source",position:n,isConnectable:t})]})}function jP({data:e,isConnectable:t,targetPosition:n=Ce.Top,sourcePosition:i=Ce.Bottom}){return b.jsxs(b.Fragment,{children:[b.jsx(mt,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,b.jsx(mt,{type:"source",position:i,isConnectable:t})]})}function OP(){return null}function zP({data:e,isConnectable:t,targetPosition:n=Ce.Top}){return b.jsxs(b.Fragment,{children:[b.jsx(mt,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Ef={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},uC={input:MP,default:jP,output:zP,group:OP};function DP(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 LP=e=>{const{width:t,height:n,x:i,y:o}=Ql(e.nodeLookup,{filter:s=>!!s.selected});return{width:Sr(t)?t:null,height:Sr(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 qP({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const i=Bt(),{width:o,height:s,transformString:l,userSelectionActive:c}=it(LP,Ot),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 w=i.getState().nodes.filter(E=>E.selected);e(v,w)}:void 0,g=v=>{Object.prototype.hasOwnProperty.call(Ef,v.key)&&(v.preventDefault(),f({direction:Ef[v.key],factor:v.shiftKey?4:1}))};return b.jsx("div",{className:nn(["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,IP=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:w,panActivationKeyCode:E,zoomActivationKeyCode:S,elementsSelectable:_,zoomOnScroll:C,zoomOnPinch:N,panOnScroll:k,panOnScrollSpeed:M,panOnScrollMode:R,zoomOnDoubleClick:O,panOnDrag:I,defaultViewport:P,translateExtent:K,minZoom:H,maxZoom:F,preventScrolling:X,onSelectionContextMenu:L,noWheelClassName:B,noPanClassName:z,disableKeyboardA11y:V,onViewportChange:G,isControlledViewport:Q}){const{nodesSelectionActive:j,userSelectionActive:D}=it(IP,Ot),$=Ul(h,{target:cC}),q=Ul(E,{target:cC}),Y=q||I,W=q||k,Z=p&&Y!==!0,te=$||D||Z;return vP({deleteKeyCode:f,multiSelectionKeyCode:w}),b.jsx(wP,{onPaneContextMenu:s,elementsSelectable:_,zoomOnScroll:C,zoomOnPinch:N,panOnScroll:W,panOnScrollSpeed:M,panOnScrollMode:R,zoomOnDoubleClick:O,panOnDrag:!$&&Y,defaultViewport:P,translateExtent:K,minZoom:H,maxZoom:F,zoomActivationKeyCode:S,preventScrolling:X,noWheelClassName:B,noPanClassName:z,onViewportChange:G,isControlledViewport:Q,paneClickDistance:c,selectionOnDrag:Z,children:b.jsxs(CP,{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:Z,children:[e,j&&b.jsx(qP,{onSelectionContextMenu:L,noPanClassName:z,disableKeyboardA11y:V})]})})}p5.displayName="FlowRenderer";const BP=T.memo(p5),HP=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 UP(e){return it(T.useCallback(HP(e),[e]),Ot)}const PP=e=>e.updateNodeInternals;function VP(){const e=it(PP),[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 FP({node:e,nodeType:t,hasDimensions:n,resizeObserver:i}){const o=Bt(),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 $P({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:w,rfId:E,nodeTypes:S,nodeClickDistance:_,onError:C}){const{node:N,internals:k,isParent:M}=it(re=>{const se=re.nodeLookup.get(e),ge=re.parentLookup.has(e);return{node:se,internals:se.internals,isParent:ge}},Ot);let R=N.type||"default",O=(S==null?void 0:S[R])||uC[R];O===void 0&&(C==null||C("003",Nr.error003(R)),R="default",O=(S==null?void 0:S.default)||uC.default);const I=!!(N.draggable||c&&typeof N.draggable>"u"),P=!!(N.selectable||f&&typeof N.selectable>"u"),K=!!(N.connectable||h&&typeof N.connectable>"u"),H=!!(N.focusable||p&&typeof N.focusable>"u"),F=Bt(),X=qj(N),L=FP({node:N,nodeType:R,hasDimensions:X,resizeObserver:m}),B=d5({nodeRef:L,disabled:N.hidden||!I,noDragClassName:g,handleSelector:N.dragHandle,nodeId:e,isSelectable:P,nodeClickDistance:_}),z=h5();if(N.hidden)return null;const V=wi(N),G=DP(N),Q=P||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,W=re=>{const{selectNodesOnDrag:se,nodeDragThreshold:ge}=F.getState();P&&(!se||!I||ge>0)&&ib({id:e,store:F,nodeRef:L}),t&&t(re,{...k.userNode})},Z=re=>{if(!(Hj(re.nativeEvent)||w)){if(Tj.includes(re.key)&&P){const se=re.key==="Escape";ib({id:e,store:F,unselect:se,nodeRef:L})}else if(I&&N.selected&&Object.prototype.hasOwnProperty.call(Ef,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:Ef[re.key],factor:re.shiftKey?4:1})}}},te=()=>{var pe;if(w||!((pe=L.current)!=null&&pe.matches(":focus-visible")))return;const{transform:re,width:se,height:ge,autoPanOnNodeFocus:be,setCenter:ve}=F.getState();if(!be)return;Gb(new Map([[e,N]]),{x:0,y:0,width:se,height:ge},re,!0).length>0||ve(N.position.x+V.width/2,N.position.y+V.height/2,{zoom:re[2]})};return b.jsx("div",{className:nn(["react-flow__node",`react-flow__node-${R}`,{[v]:I},N.className,{selected:N.selected,selectable:P,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",...N.style,...G},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:j,onMouseMove:D,onMouseLeave:$,onContextMenu:q,onClick:W,onDoubleClick:Y,onKeyDown:H?Z:void 0,tabIndex:H?0:void 0,onFocus:H?te:void 0,role:N.ariaRole??(H?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${i5}-${E}`,"aria-label":N.ariaLabel,...N.domAttributes,children:b.jsx(kP,{value:e,children:b.jsx(O,{id:e,data:N.data,type:R,positionAbsoluteX:k.positionAbsolute.x,positionAbsoluteY:k.positionAbsolute.y,selected:N.selected??!1,selectable:P,draggable:I,deletable:N.deletable??!0,isConnectable:K,sourcePosition:N.sourcePosition,targetPosition:N.targetPosition,dragging:B,dragHandle:N.dragHandle,zIndex:k.z,parentId:N.parentId,...V})})})}var YP=T.memo($P);const GP=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(GP,Ot),l=UP(e.onlyRenderVisibleElements),c=VP();return b.jsx("div",{className:"react-flow__nodes",style:Yf,children:l.map(f=>b.jsx(YP,{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 XP=T.memo(m5);function KP(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&&GU({sourceNode:s,targetNode:l,width:n.width,height:n.height,transform:n.transform})&&i.push(o.id)}return i},[e]),Ot)}const QP=({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"})},ZP=({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={[wf.Arrow]:QP,[wf.ArrowClosed]:ZP};function WP(e){const t=Bt();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",Nr.error009(e)),null)},[e])}const JP=({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=WP(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(()=>t7(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(JP,{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 eV=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=nn(["react-flow__edge-textwrapper",h]),w=T.useRef(null);return T.useEffect(()=>{if(w.current){const E=w.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:w,style:i,children:n}),f]}):null}y5.displayName="EdgeText";const tV=T.memo(y5);function Gf({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:nn(["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&&Sr(t)&&Sr(n)?b.jsx(tV,{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===Ce.Left||e===Ce.Right?[.5*(t+i),n]:[t,.5*(n+o)]}function v5({sourceX:e,sourceY:t,sourcePosition:n=Ce.Bottom,targetX:i,targetY:o,targetPosition:s=Ce.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:w,markerEnd:E,markerStart:S,interactionWidth:_})=>{const[C,N,k]=v5({sourceX:n,sourceY:i,sourcePosition:l,targetX:o,targetY:s,targetPosition:c}),M=e.isInternal?void 0:t;return b.jsx(Gf,{id:M,path:C,labelX:N,labelY:k,label:f,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:w,markerEnd:E,markerStart:S,interactionWidth:_})})}const nV=x5({isInternal:!1}),b5=x5({isInternal:!0});nV.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=Ce.Bottom,targetPosition:w=Ce.Top,markerEnd:E,markerStart:S,pathOptions:_,interactionWidth:C})=>{const[N,k,M]=Wo({sourceX:n,sourceY:i,sourcePosition:v,targetX:o,targetY:s,targetPosition:w,borderRadius:_==null?void 0:_.borderRadius,offset:_==null?void 0:_.offset,stepPosition:_==null?void 0:_.stepPosition}),R=e.isInternal?void 0:t;return b.jsx(Gf,{id:R,path:N,labelX:k,labelY:M,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:E,markerStart:S,interactionWidth:C})})}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 rV=E5({isInternal:!1}),C5=E5({isInternal:!0});rV.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:w,interactionWidth:E})=>{const[S,_,C]=Fj({sourceX:n,sourceY:i,targetX:o,targetY:s}),N=e.isInternal?void 0:t;return b.jsx(Gf,{id:N,path:S,labelX:_,labelY:C,label:l,labelStyle:c,labelShowBg:f,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:w,interactionWidth:E})})}const iV=N5({isInternal:!1}),k5=N5({isInternal:!0});iV.displayName="StraightEdge";k5.displayName="StraightEdgeInternal";function T5(e){return T.memo(({id:t,sourceX:n,sourceY:i,targetX:o,targetY:s,sourcePosition:l=Ce.Bottom,targetPosition:c=Ce.Top,label:f,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:w,markerEnd:E,markerStart:S,pathOptions:_,interactionWidth:C})=>{const[N,k,M]=os({sourceX:n,sourceY:i,sourcePosition:l,targetX:o,targetY:s,targetPosition:c,curvature:_==null?void 0:_.curvature}),R=e.isInternal?void 0:t;return b.jsx(Gf,{id:R,path:N,labelX:k,labelY:M,label:f,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:w,markerEnd:E,markerStart:S,interactionWidth:C})})}const aV=T5({isInternal:!1}),A5=T5({isInternal:!0});aV.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},oV=(e,t,n)=>n===Ce.Left?e-t:n===Ce.Right?e+t:e,sV=(e,t,n)=>n===Ce.Top?e-t:n===Ce.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:nn([mC,`${mC}-${c}`]),cx:oV(t,i,e),cy:sV(n,i,e),r:i,stroke:"transparent",fill:"transparent"})}function lV({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 w=Bt(),E=(k,M)=>{if(k.button!==0)return;const{autoPanOnConnect:R,domNode:O,connectionMode:I,connectionRadius:P,lib:K,onConnectStart:H,cancelConnection:F,nodeLookup:X,rfId:L,panBy:B,updateConnection:z}=w.getState(),V=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:P,domNode:O,handleId:M.id,nodeId:M.nodeId,nodeLookup:X,isTarget:V,edgeUpdaterType:M.type,lib:K,flowId:L,cancelConnection:F,panBy:B,isValidConnection:(...D)=>{var $,q;return((q=($=w.getState()).isValidConnection)==null?void 0:q.call($,...D))??!0},onConnect:Q,onConnectStart:j,onConnectEnd:(...D)=>{var $,q;return(q=($=w.getState()).onConnectEnd)==null?void 0:q.call($,...D)},onReconnectEnd:G,updateConnection:z,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,dragThreshold:w.getState().connectionDragThreshold,handleDomNode:k.currentTarget})},S=k=>E(k,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),_=k=>E(k,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),C=()=>v(!0),N=()=>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:C,onMouseOut:N,type:"source"}),(e===!0||e==="target")&&b.jsx(gC,{position:f,centerX:s,centerY:l,radius:t,onMouseDown:_,onMouseEnter:C,onMouseOut:N,type:"target"})]})}function uV({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:w,edgeTypes:E,noPanClassName:S,onError:_,disableKeyboardA11y:C}){let N=it(ve=>ve.edgeLookup.get(e));const k=it(ve=>ve.defaultEdgeOptions);N=k?{...k,...N}:N;let M=N.type||"default",R=(E==null?void 0:E[M])||hC[M];R===void 0&&(_==null||_("011",Nr.error011(M)),M="default",R=(E==null?void 0:E.default)||hC.default);const O=!!(N.focusable||t&&typeof N.focusable>"u"),I=typeof m<"u"&&(N.reconnectable||n&&typeof N.reconnectable>"u"),P=!!(N.selectable||i&&typeof N.selectable>"u"),K=T.useRef(null),[H,F]=T.useState(!1),[X,L]=T.useState(!1),B=Bt(),{zIndex:z,sourceX:V,sourceY:G,targetX:Q,targetY:j,sourcePosition:D,targetPosition:$}=it(T.useCallback(ve=>{const Ee=ve.nodeLookup.get(N.source),pe=ve.nodeLookup.get(N.target);if(!Ee||!pe)return{zIndex:N.zIndex,...pC};const Ne=e7({id:e,sourceNode:Ee,targetNode:pe,sourceHandle:N.sourceHandle||null,targetHandle:N.targetHandle||null,connectionMode:ve.connectionMode,onError:_});return{zIndex:YU({selected:N.selected,zIndex:N.zIndex,sourceNode:Ee,targetNode:pe,elevateOnSelect:ve.elevateEdgesOnSelect,zIndexMode:ve.zIndexMode}),...Ne||pC}},[N.source,N.target,N.sourceHandle,N.targetHandle,N.selected,N.zIndex]),Ot),q=T.useMemo(()=>N.markerStart?`url('#${tb(N.markerStart,w)}')`:void 0,[N.markerStart,w]),Y=T.useMemo(()=>N.markerEnd?`url('#${tb(N.markerEnd,w)}')`:void 0,[N.markerEnd,w]);if(N.hidden||V===null||G===null||Q===null||j===null)return null;const W=ve=>{var Oe;const{addSelectedEdges:Ee,unselectNodesAndEdges:pe,multiSelectionActive:Ne}=B.getState();P&&(B.setState({nodesSelectionActive:!1}),N.selected&&Ne?(pe({nodes:[],edges:[N]}),(Oe=K.current)==null||Oe.blur()):Ee([e])),o&&o(ve,N)},Z=s?ve=>{s(ve,{...N})}:void 0,te=l?ve=>{l(ve,{...N})}:void 0,re=c?ve=>{c(ve,{...N})}:void 0,se=f?ve=>{f(ve,{...N})}:void 0,ge=h?ve=>{h(ve,{...N})}:void 0,be=ve=>{var Ee;if(!C&&Tj.includes(ve.key)&&P){const{unselectNodesAndEdges:pe,addSelectedEdges:Ne}=B.getState();ve.key==="Escape"?((Ee=K.current)==null||Ee.blur(),pe({edges:[N]})):Ne([e])}};return b.jsx("svg",{style:{zIndex:z},children:b.jsxs("g",{className:nn(["react-flow__edge",`react-flow__edge-${M}`,N.className,S,{selected:N.selected,animated:N.animated,inactive:!P&&!o,updating:H,selectable:P}]),onClick:W,onDoubleClick:Z,onContextMenu:te,onMouseEnter:re,onMouseMove:se,onMouseLeave:ge,onKeyDown:O?be:void 0,tabIndex:O?0:void 0,role:N.ariaRole??(O?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":N.ariaLabel===null?void 0:N.ariaLabel||`Edge from ${N.source} to ${N.target}`,"aria-describedby":O?`${a5}-${w}`:void 0,ref:K,...N.domAttributes,children:[!X&&b.jsx(R,{id:e,source:N.source,target:N.target,type:N.type,selected:N.selected,animated:N.animated,selectable:P,deletable:N.deletable??!0,label:N.label,labelStyle:N.labelStyle,labelShowBg:N.labelShowBg,labelBgStyle:N.labelBgStyle,labelBgPadding:N.labelBgPadding,labelBgBorderRadius:N.labelBgBorderRadius,sourceX:V,sourceY:G,targetX:Q,targetY:j,sourcePosition:D,targetPosition:$,data:N.data,style:N.style,sourceHandleId:N.sourceHandle,targetHandleId:N.targetHandle,markerStart:q,markerEnd:Y,pathOptions:"pathOptions"in N?N.pathOptions:void 0,interactionWidth:N.interactionWidth}),I&&b.jsx(lV,{edge:N,isReconnectable:I,reconnectRadius:p,onReconnect:m,onReconnectStart:g,onReconnectEnd:v,sourceX:V,sourceY:G,targetX:Q,targetY:j,sourcePosition:D,targetPosition:$,setUpdateHover:F,setReconnecting:L})]})})}var cV=T.memo(uV);const fV=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:w,disableKeyboardA11y:E}){const{edgesFocusable:S,edgesReconnectable:_,elementsSelectable:C,onError:N}=it(fV,Ot),k=KP(t);return b.jsxs("div",{className:"react-flow__edges",children:[b.jsx(eV,{defaultColor:e,rfId:n}),k.map(M=>b.jsx(cV,{id:M,edgesFocusable:S,edgesReconnectable:_,elementsSelectable:C,noPanClassName:o,onReconnect:s,onContextMenu:l,onMouseEnter:c,onMouseMove:f,onMouseLeave:h,onClick:p,reconnectRadius:m,onDoubleClick:g,onReconnectStart:v,onReconnectEnd:w,rfId:n,onError:N,edgeTypes:i,disableKeyboardA11y:E},M))]})}R5.displayName="EdgeRenderer";const dV=T.memo(R5),hV=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function pV({children:e}){const t=it(hV);return b.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function mV(e){const t=Ya(),n=T.useRef(!1);T.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const gV=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function yV(e){const t=it(gV),n=Bt();return T.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function vV(e){return e.connection.inProgress?{...e.connection,to:Wl(e.connection.to,e.transform)}:{...e.connection}}function xV(e){return vV}function bV(e){const t=xV();return it(t,Ot)}const wV=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function _V({containerStyle:e,style:t,type:n,component:i}){const{nodesConnectable:o,width:s,height:l,isValid:c,inProgress:f}=it(wV,Ot);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:nn(["react-flow__connection",Mj(c)]),children:b.jsx(M5,{style:t,type:n,CustomComponent:i,isValid:c})})})}const M5=({style:e,type:t=sa.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}=bV();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 w="";const E={sourceX:s.x,sourceY:s.y,sourcePosition:f,targetX:h.x,targetY:h.y,targetPosition:g};switch(t){case sa.Bezier:[w]=os(E);break;case sa.SimpleBezier:[w]=v5(E);break;case sa.Step:[w]=Wo({...E,borderRadius:0});break;case sa.SmoothStep:[w]=Wo(E);break;default:[w]=Fj(E)}return b.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};M5.displayName="ConnectionLine";const SV={};function yC(e=SV){T.useRef(e),Bt(),T.useEffect(()=>{},[e])}function EV(){Bt(),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:w,connectionLineStyle:E,connectionLineComponent:S,connectionLineContainerStyle:_,selectionKeyCode:C,selectionOnDrag:N,selectionMode:k,multiSelectionKeyCode:M,panActivationKeyCode:R,zoomActivationKeyCode:O,deleteKeyCode:I,onlyRenderVisibleElements:P,elementsSelectable:K,defaultViewport:H,translateExtent:F,minZoom:X,maxZoom:L,preventScrolling:B,defaultMarkerColor:z,zoomOnScroll:V,zoomOnPinch:G,panOnScroll:Q,panOnScrollSpeed:j,panOnScrollMode:D,zoomOnDoubleClick:$,panOnDrag:q,onPaneClick:Y,onPaneMouseEnter:W,onPaneMouseMove:Z,onPaneMouseLeave:te,onPaneScroll:re,onPaneContextMenu:se,paneClickDistance:ge,nodeClickDistance:be,onEdgeContextMenu:ve,onEdgeMouseEnter:Ee,onEdgeMouseMove:pe,onEdgeMouseLeave:Ne,reconnectRadius:Oe,onReconnect:Re,onReconnectStart:vt,onReconnectEnd:he,noDragClassName:ye,noWheelClassName:He,noPanClassName:Se,disableKeyboardA11y:Ue,nodeExtent:Fe,rfId:kt,viewport:ue,onViewportChange:me}){return yC(e),yC(t),EV(),mV(n),yV(ue),b.jsx(BP,{onPaneClick:Y,onPaneMouseEnter:W,onPaneMouseMove:Z,onPaneMouseLeave:te,onPaneContextMenu:se,onPaneScroll:re,paneClickDistance:ge,deleteKeyCode:I,selectionKeyCode:C,selectionOnDrag:N,selectionMode:k,onSelectionStart:g,onSelectionEnd:v,multiSelectionKeyCode:M,panActivationKeyCode:R,zoomActivationKeyCode:O,elementsSelectable:K,zoomOnScroll:V,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:He,noPanClassName:Se,disableKeyboardA11y:Ue,onViewportChange:me,isControlledViewport:!!ue,children:b.jsxs(pV,{children:[b.jsx(dV,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:l,onReconnect:Re,onReconnectStart:vt,onReconnectEnd:he,onlyRenderVisibleElements:P,onEdgeContextMenu:ve,onEdgeMouseEnter:Ee,onEdgeMouseMove:pe,onEdgeMouseLeave:Ne,reconnectRadius:Oe,defaultMarkerColor:z,noPanClassName:Se,disableKeyboardA11y:Ue,rfId:kt}),b.jsx(_V,{style:E,type:w,component:S,containerStyle:_}),b.jsx("div",{className:"react-flow__edgelabel-renderer"}),b.jsx(XP,{nodeTypes:e,onNodeClick:i,onNodeDoubleClick:s,onNodeMouseEnter:c,onNodeMouseMove:f,onNodeMouseLeave:h,onNodeContextMenu:p,nodeClickDistance:be,onlyRenderVisibleElements:P,noPanClassName:Se,noDragClassName:ye,disableKeyboardA11y:Ue,nodeExtent:Fe,rfId:kt}),b.jsx("div",{className:"react-flow__viewport-portal"})]})})}j5.displayName="GraphView";const CV=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,w=new Map,E=new Map,S=new Map,_=i??t??[],C=n??e??[],N=p??[0,0],k=m??ql;Gj(E,S,_);const M=nb(C,v,w,{nodeOrigin:N,nodeExtent:k,zIndexMode:g});let R=[0,0,1];if(l&&o&&s){const O=Ql(v,{filter:H=>!!((H.width||H.initialWidth)&&(H.height||H.initialHeight))}),{x:I,y:P,zoom:K}=Xb(O,o,s,f,h,(c==null?void 0:c.padding)??.1);R=[I,P,K]}return{rfId:"1",width:o??0,height:s??0,transform:R,nodes:C,nodesInitialized:M,nodeLookup:v,parentLookup:w,edges:_,edgeLookup:S,connectionLookup:E,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:i!==void 0,panZoom:null,minZoom:f,maxZoom:h,translateExtent:ql,nodeExtent:k,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Xo.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:N,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:HU,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Aj,zIndexMode:g,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},NV=({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})=>F7((v,w)=>{async function E(){const{nodeLookup:S,panZoom:_,fitViewOptions:C,fitViewResolver:N,width:k,height:M,minZoom:R,maxZoom:O}=w();_&&(await IU({nodes:S,width:k,height:M,panZoom:_,minZoom:R,maxZoom:O},C),N==null||N.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:_,parentLookup:C,nodeOrigin:N,elevateNodesOnSelect:k,fitViewQueued:M,zIndexMode:R}=w(),O=nb(S,_,C,{nodeOrigin:N,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:_,edgeLookup:C}=w();Gj(_,C,S),v({edges:S})},setDefaultNodesAndEdges:(S,_)=>{if(S){const{setNodes:C}=w();C(S),v({hasDefaultNodes:!0})}if(_){const{setEdges:C}=w();C(_),v({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:_,nodeLookup:C,parentLookup:N,domNode:k,nodeOrigin:M,nodeExtent:R,debug:O,fitViewQueued:I,zIndexMode:P}=w(),{changes:K,updatedInternals:H}=l7(S,C,N,k,M,R,P);H&&(i7(C,N,{nodeOrigin:M,nodeExtent:R,zIndexMode:P}),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),_==null||_(K)))},updateNodePositions:(S,_=!1)=>{const C=[];let N=[];const{nodeLookup:k,triggerNodeChanges:M,connection:R,updateConnection:O,onNodesChangeMiddlewareMap:I}=w();for(const[P,K]of S){const H=k.get(P),F=!!(H!=null&&H.expandParent&&(H!=null&&H.parentId)&&(K!=null&&K.position)),X={id:P,type:"position",position:F?{x:Math.max(0,K.position.x),y:Math.max(0,K.position.y)}:K.position,dragging:_};if(H&&R.inProgress&&R.fromNode.id===H.id){const L=Va(H,R.fromHandle,Ce.Left,!0);O({...R,from:L})}F&&H.parentId&&C.push({id:P,parentId:H.parentId,rect:{...K.internals.positionAbsolute,width:K.measured.width??0,height:K.measured.height??0}}),N.push(X)}if(C.length>0){const{parentLookup:P,nodeOrigin:K}=w(),H=e1(C,k,P,K);N.push(...H)}for(const P of I.values())N=P(N);M(N)},triggerNodeChanges:S=>{const{onNodesChange:_,setNodes:C,nodes:N,hasDefaultNodes:k,debug:M}=w();if(S!=null&&S.length){if(k){const R=l5(S,N);C(R)}M&&console.log("React Flow: trigger node changes",S),_==null||_(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:_,setEdges:C,edges:N,hasDefaultEdges:k,debug:M}=w();if(S!=null&&S.length){if(k){const R=u5(S,N);C(R)}M&&console.log("React Flow: trigger edge changes",S),_==null||_(S)}},addSelectedNodes:S=>{const{multiSelectionActive:_,edgeLookup:C,nodeLookup:N,triggerNodeChanges:k,triggerEdgeChanges:M}=w();if(_){const R=S.map(O=>Da(O,!0));k(R);return}k(Bo(N,new Set([...S]),!0)),M(Bo(C))},addSelectedEdges:S=>{const{multiSelectionActive:_,edgeLookup:C,nodeLookup:N,triggerNodeChanges:k,triggerEdgeChanges:M}=w();if(_){const R=S.map(O=>Da(O,!0));M(R);return}M(Bo(C,new Set([...S]))),k(Bo(N,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:_}={})=>{const{edges:C,nodes:N,nodeLookup:k,triggerNodeChanges:M,triggerEdgeChanges:R}=w(),O=S||N,I=_||C,P=[];for(const H of O){if(!H.selected)continue;const F=k.get(H.id);F&&(F.selected=!1),P.push(Da(H.id,!1))}const K=[];for(const H of I)H.selected&&K.push(Da(H.id,!1));M(P),R(K)},setMinZoom:S=>{const{panZoom:_,maxZoom:C}=w();_==null||_.setScaleExtent([S,C]),v({minZoom:S})},setMaxZoom:S=>{const{panZoom:_,minZoom:C}=w();_==null||_.setScaleExtent([C,S]),v({maxZoom:S})},setTranslateExtent:S=>{var _;(_=w().panZoom)==null||_.setTranslateExtent(S),v({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:_,triggerNodeChanges:C,triggerEdgeChanges:N,elementsSelectable:k}=w();if(!k)return;const M=_.reduce((O,I)=>I.selected?[...O,Da(I.id,!1)]:O,[]),R=S.reduce((O,I)=>I.selected?[...O,Da(I.id,!1)]:O,[]);C(M),N(R)},setNodeExtent:S=>{const{nodes:_,nodeLookup:C,parentLookup:N,nodeOrigin:k,elevateNodesOnSelect:M,nodeExtent:R,zIndexMode:O}=w();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(_,C,N,{nodeOrigin:k,nodeExtent:S,elevateNodesOnSelect:M,checkEquality:!1,zIndexMode:O}),v({nodeExtent:S}))},panBy:S=>{const{transform:_,width:C,height:N,panZoom:k,translateExtent:M}=w();return u7({delta:S,panZoom:k,transform:_,translateExtent:M,width:C,height:N})},setCenter:async(S,_,C)=>{const{width:N,height:k,maxZoom:M,panZoom:R}=w();if(!R)return Promise.resolve(!1);const O=typeof(C==null?void 0:C.zoom)<"u"?C.zoom:M;return await R.setViewport({x:N/2-S*O,y:k/2-_*O,zoom:O},{duration:C==null?void 0:C.duration,ease:C==null?void 0:C.ease,interpolate:C==null?void 0:C.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[w]=T.useState(()=>NV({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($7,{value:w,children:b.jsx(pP,{children:v})})}function kV({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(Ff)?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 TV={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function AV({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:w,onConnectEnd:E,onClickConnectStart:S,onClickConnectEnd:_,onNodeMouseEnter:C,onNodeMouseMove:N,onNodeMouseLeave:k,onNodeContextMenu:M,onNodeDoubleClick:R,onNodeDragStart:O,onNodeDrag:I,onNodeDragStop:P,onNodesDelete:K,onEdgesDelete:H,onDelete:F,onSelectionChange:X,onSelectionDragStart:L,onSelectionDrag:B,onSelectionDragStop:z,onSelectionContextMenu:V,onSelectionStart:G,onSelectionEnd:Q,onBeforeDelete:j,connectionMode:D,connectionLineType:$=sa.Bezier,connectionLineStyle:q,connectionLineComponent:Y,connectionLineContainerStyle:W,deleteKeyCode:Z="Backspace",selectionKeyCode:te="Shift",selectionOnDrag:re=!1,selectionMode:se=Il.Full,panActivationKeyCode:ge="Space",multiSelectionKeyCode:be=Hl()?"Meta":"Control",zoomActivationKeyCode:ve=Hl()?"Meta":"Control",snapToGrid:Ee,snapGrid:pe,onlyRenderVisibleElements:Ne=!1,selectNodesOnDrag:Oe,nodesDraggable:Re,autoPanOnNodeFocus:vt,nodesConnectable:he,nodesFocusable:ye,nodeOrigin:He=o5,edgesFocusable:Se,edgesReconnectable:Ue,elementsSelectable:Fe=!0,defaultViewport:kt=iP,minZoom:ue=.5,maxZoom:me=2,translateExtent:Ae=ql,preventScrolling:Ve=!0,nodeExtent:Ge,defaultMarkerColor:Ut="#b1b1b7",zoomOnScroll:zt=!0,zoomOnPinch:ft=!0,panOnScroll:ut=!1,panOnScrollSpeed:Ft=.5,panOnScrollMode:ct=Ba.Free,zoomOnDoubleClick:gn=!0,panOnDrag:Xt=!0,onPaneClick:Mr,onPaneMouseEnter:hr,onPaneMouseMove:jr,onPaneMouseLeave:Xn,onPaneScroll:yn,onPaneContextMenu:Or,paneClickDistance:hn=1,nodeClickDistance:dt=0,children:we,onReconnect:_e,onReconnectStart:Le,onReconnectEnd:Et,onEdgeContextMenu:Ie,onEdgeDoubleClick:Xe,onEdgeMouseEnter:tt,onEdgeMouseMove:Te,onEdgeMouseLeave:qe,reconnectRadius:Tt=10,onNodesChange:Ct,onEdgesChange:ke,noDragClassName:$e="nodrag",noWheelClassName:Dt="nowheel",noPanClassName:Lt="nopan",fitView:$t,fitViewOptions:pr,connectOnClick:pa,attributionPosition:mr,proOptions:Kn,defaultEdgeOptions:ma,elevateNodesOnSelect:Ei=!0,elevateEdgesOnSelect:Ci=!1,disableKeyboardA11y:Ni=!1,autoPanOnConnect:ki,autoPanOnNodeDrag:Kt,autoPanSpeed:ou,connectionRadius:su,isValidConnection:Kr,onError:Ti,style:vd,id:ms,nodeDragThreshold:lu,connectionDragThreshold:xd,viewport:Wa,onViewportChange:Ja,width:gr,height:wn,colorMode:uu="light",debug:bd,onScroll:Ai,ariaLabelConfig:cu,zIndexMode:ga="basic",...wd},_n){const ya=ms||"1",fu=lP(uu),gs=T.useCallback(Qr=>{Qr.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ai==null||Ai(Qr)},[Ai]);return b.jsx("div",{"data-testid":"rf__wrapper",...wd,onScroll:gs,style:{...vd,...TV},ref:_n,className:nn(["react-flow",o,fu]),id:ms,role:"application",children:b.jsxs(kV,{nodes:e,edges:t,width:gr,height:wn,fitView:$t,fitViewOptions:pr,minZoom:ue,maxZoom:me,nodeOrigin:He,nodeExtent:Ge,zIndexMode:ga,children:[b.jsx(CV,{onInit:h,onNodeClick:c,onEdgeClick:f,onNodeMouseEnter:C,onNodeMouseMove:N,onNodeMouseLeave:k,onNodeContextMenu:M,onNodeDoubleClick:R,nodeTypes:s,edgeTypes:l,connectionLineType:$,connectionLineStyle:q,connectionLineComponent:Y,connectionLineContainerStyle:W,selectionKeyCode:te,selectionOnDrag:re,selectionMode:se,deleteKeyCode:Z,multiSelectionKeyCode:be,panActivationKeyCode:ge,zoomActivationKeyCode:ve,onlyRenderVisibleElements:Ne,defaultViewport:kt,translateExtent:Ae,minZoom:ue,maxZoom:me,preventScrolling:Ve,zoomOnScroll:zt,zoomOnPinch:ft,zoomOnDoubleClick:gn,panOnScroll:ut,panOnScrollSpeed:Ft,panOnScrollMode:ct,panOnDrag:Xt,onPaneClick:Mr,onPaneMouseEnter:hr,onPaneMouseMove:jr,onPaneMouseLeave:Xn,onPaneScroll:yn,onPaneContextMenu:Or,paneClickDistance:hn,nodeClickDistance:dt,onSelectionContextMenu:V,onSelectionStart:G,onSelectionEnd:Q,onReconnect:_e,onReconnectStart:Le,onReconnectEnd:Et,onEdgeContextMenu:Ie,onEdgeDoubleClick:Xe,onEdgeMouseEnter:tt,onEdgeMouseMove:Te,onEdgeMouseLeave:qe,reconnectRadius:Tt,defaultMarkerColor:Ut,noDragClassName:$e,noWheelClassName:Dt,noPanClassName:Lt,rfId:ya,disableKeyboardA11y:Ni,nodeExtent:Ge,viewport:Wa,onViewportChange:Ja}),b.jsx(sP,{nodes:e,edges:t,defaultNodes:n,defaultEdges:i,onConnect:v,onConnectStart:w,onConnectEnd:E,onClickConnectStart:S,onClickConnectEnd:_,nodesDraggable:Re,autoPanOnNodeFocus:vt,nodesConnectable:he,nodesFocusable:ye,edgesFocusable:Se,edgesReconnectable:Ue,elementsSelectable:Fe,elevateNodesOnSelect:Ei,elevateEdgesOnSelect:Ci,minZoom:ue,maxZoom:me,nodeExtent:Ge,onNodesChange:Ct,onEdgesChange:ke,snapToGrid:Ee,snapGrid:pe,connectionMode:D,translateExtent:Ae,connectOnClick:pa,defaultEdgeOptions:ma,fitView:$t,fitViewOptions:pr,onNodesDelete:K,onEdgesDelete:H,onDelete:F,onNodeDragStart:O,onNodeDrag:I,onNodeDragStop:P,onSelectionDrag:B,onSelectionDragStart:L,onSelectionDragStop:z,onMove:p,onMoveStart:m,onMoveEnd:g,noPanClassName:Lt,nodeOrigin:He,rfId:ya,autoPanOnConnect:ki,autoPanOnNodeDrag:Kt,autoPanSpeed:ou,onError:Ti,connectionRadius:su,isValidConnection:Kr,selectNodesOnDrag:Oe,nodeDragThreshold:lu,connectionDragThreshold:xd,onBeforeDelete:j,debug:bd,ariaLabelConfig:cu,zIndexMode:ga}),b.jsx(rP,{onSelectionChange:X}),we,b.jsx(W7,{proOptions:Kn,position:mr}),b.jsx(Z7,{rfId:ya,disableKeyboardA11y:Ni})]})})}var O5=c5(AV);const RV=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function Xf({children:e}){const t=it(RV);return t?kb.createPortal(e,t):null}const MV=e=>({x:e.transform[0],y:e.transform[1],zoom:e.transform[2]});function jV(){return it(MV,Ot)}function z5(e){const[t,n]=T.useState(e),i=T.useCallback(o=>n(s=>l5(o,s)),[]);return[t,n,i]}function OV(e){const[t,n]=T.useState(e),i=T.useCallback(o=>n(s=>u5(o,s)),[]);return[t,n,i]}const zV=Nr.error014();function xn({id:e,handleType:t,handleId:n,onConnect:i,onDisconnect:o}={}){const s=n1(),l=e??s;if(!l)throw new Error(zV);const c=T.useRef(null),f=it(h=>h.connectionLookup.get(`${l}${t?n?`-${t}-${n}`:`-${t}`:""}`),OU);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 DV({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:nn(["react-flow__background-pattern",n,i])})}function LV({radius:e,className:t}){return b.jsx("circle",{cx:e,cy:e,r:e,className:nn(["react-flow__background-pattern","dots",t])})}var vi;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(vi||(vi={}));const qV={[vi.Dots]:1,[vi.Lines]:1,[vi.Cross]:6},IV=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function D5({id:e,variant:t=vi.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(IV,Ot),w=i||qV[t],E=t===vi.Dots,S=t===vi.Cross,_=Array.isArray(n)?n:[n,n],C=[_[0]*g[2]||1,_[1]*g[2]||1],N=w*g[2],k=Array.isArray(s)?s:[s,s],M=S?[N,N]:C,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:nn(["react-flow__background",h]),style:{...f,...Yf,"--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]%C[0],y:g[1]%C[1],width:C[0],height:C[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${R[0]},-${R[1]})`,children:E?b.jsx(LV,{radius:N/2,className:p}):b.jsx(DV,{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 BV(){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 HV(){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 UV(){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 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 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 VV(){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 Lc({children:e,className:t,...n}){return b.jsx("button",{type:"button",className:nn(["react-flow__controls-button",t]),...n,children:e})}const FV=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 w=Bt(),{isInteractive:E,minZoomReached:S,maxZoomReached:_,ariaLabelConfig:C}=it(FV,Ot),{zoomIn:N,zoomOut:k,fitView:M}=Ya(),R=()=>{N(),s==null||s()},O=()=>{k(),l==null||l()},I=()=>{M(o),c==null||c()},P=()=>{w.setState({nodesDraggable:!E,nodesConnectable:!E,elementsSelectable:!E}),f==null||f(!E)},K=g==="horizontal"?"horizontal":"vertical";return b.jsxs($f,{className:nn(["react-flow__controls",K,h]),position:m,style:e,"data-testid":"rf__controls","aria-label":v??C["controls.ariaLabel"],children:[t&&b.jsxs(b.Fragment,{children:[b.jsx(Lc,{onClick:R,className:"react-flow__controls-zoomin",title:C["controls.zoomIn.ariaLabel"],"aria-label":C["controls.zoomIn.ariaLabel"],disabled:_,children:b.jsx(BV,{})}),b.jsx(Lc,{onClick:O,className:"react-flow__controls-zoomout",title:C["controls.zoomOut.ariaLabel"],"aria-label":C["controls.zoomOut.ariaLabel"],disabled:S,children:b.jsx(HV,{})})]}),n&&b.jsx(Lc,{className:"react-flow__controls-fitview",onClick:I,title:C["controls.fitView.ariaLabel"],"aria-label":C["controls.fitView.ariaLabel"],children:b.jsx(UV,{})}),i&&b.jsx(Lc,{className:"react-flow__controls-interactive",onClick:P,title:C["controls.interactive.ariaLabel"],"aria-label":C["controls.interactive.ariaLabel"],children:E?b.jsx(VV,{}):b.jsx(PV,{})}),p]})}q5.displayName="Controls";T.memo(q5);function $V({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:w,backgroundColor:E}=s||{},S=l||w||E;return b.jsx("rect",{className:nn(["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?_=>v(_,e):void 0})}const YV=T.memo($V),GV=e=>e.nodes.map(t=>t.id),Zp=e=>e instanceof Function?e:()=>e;function XV({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:i=5,nodeStrokeWidth:o,nodeComponent:s=YV,onClick:l}){const c=it(GV,Ot),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(QV,{id:g,nodeColorFunc:f,nodeStrokeColorFunc:h,nodeClassNameFunc:p,nodeBorderRadius:i,nodeStrokeWidth:o,NodeComponent:s,onClick:l,shapeRendering:m},g))})}function KV({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(w=>{const E=w.nodeLookup.get(e);if(!E)return{node:void 0,x:0,y:0,width:0,height:0};const S=E.internals.userNode,{x:_,y:C}=E.internals.positionAbsolute,{width:N,height:k}=wi(S);return{node:S,x:_,y:C,width:N,height:k}},Ot);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 QV=T.memo(KV);var ZV=T.memo(XV);const WV=200,JV=150,eF=e=>!e.hidden,tF=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(Ql(e.nodeLookup,{filter:eF}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},nF="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:w,pannable:E=!1,zoomable:S=!1,ariaLabel:_,inversePan:C,zoomStep:N=1,offsetScale:k=5}){const M=Bt(),R=T.useRef(null),{boundingRect:O,viewBB:I,rfId:P,panZoom:K,translateExtent:H,flowWidth:F,flowHeight:X,ariaLabelConfig:L}=it(tF,Ot),B=(e==null?void 0:e.width)??WV,z=(e==null?void 0:e.height)??JV,V=O.width/B,G=O.height/z,Q=Math.max(V,G),j=Q*B,D=Q*z,$=k*Q,q=O.x-(j-O.width)/2-$,Y=O.y-(D-O.height)/2-$,W=j+$*2,Z=D+$*2,te=`${nF}-${P}`,re=T.useRef(0),se=T.useRef();re.current=Q,T.useEffect(()=>{if(R.current&&K)return se.current=v7({domNode:R.current,panZoom:K,getTransform:()=>M.getState().transform,getViewScale:()=>re.current}),()=>{var Ee;(Ee=se.current)==null||Ee.destroy()}},[K]),T.useEffect(()=>{var Ee;(Ee=se.current)==null||Ee.update({translateExtent:H,width:F,height:X,inversePan:C,pannable:E,zoomStep:N,zoomable:S})},[E,S,C,N,H,F,X]);const ge=v?Ee=>{var Oe;const[pe,Ne]=((Oe=se.current)==null?void 0:Oe.pointer(Ee))||[0,0];v(Ee,{x:pe,y:Ne})}:void 0,be=w?T.useCallback((Ee,pe)=>{const Ne=M.getState().nodeLookup.get(pe).internals.userNode;w(Ee,Ne)},[]):void 0,ve=_??L["minimap.ariaLabel"];return b.jsx($f,{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:nn(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:b.jsxs("svg",{width:B,height:z,viewBox:`${q} ${Y} ${W} ${Z}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":te,ref:R,onClick:ge,children:[ve&&b.jsx("title",{id:te,children:ve}),b.jsx(ZV,{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${W+$*2}v${Z+$*2}h${-W-$*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 rF=T.memo(I5),iF=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,aF={[Jo.Line]:"right",[Jo.Handle]:"bottom-right"};function oF({nodeId:e,position:t,variant:n=Jo.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:w,onResizeStart:E,onResize:S,onResizeEnd:_}){const C=n1(),N=typeof e=="string"?e:C,k=Bt(),M=T.useRef(null),R=n===Jo.Handle,O=it(T.useCallback(iF(R&&v),[R,v]),Ot),I=T.useRef(null),P=t??aF[n];T.useEffect(()=>{if(!(!M.current||!N))return I.current||(I.current=j7({domNode:M.current,nodeId:N,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(),V=[],G={x:H.x,y:H.y},Q=L.get(N);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);V.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:N,type:"position",position:{...G}};V.push(j)}if(H.width!==void 0&&H.height!==void 0){const D={id:N,type:"dimensions",resizing:!0,setAttributes:g?g==="horizontal"?"width":"height":!0,dimensions:{width:H.width,height:H.height}};V.push(D)}for(const j of F){const D={...j,type:"position"};V.push(D)}X(V)},onEnd:({width:H,height:F})=>{const X={id:N,type:"dimensions",resizing:!1,dimensions:{width:H,height:F}};k.getState().triggerNodeChanges([X])}})),I.current.update({controlPosition:P,boundaries:{minWidth:c,minHeight:f,maxWidth:h,maxHeight:p},keepAspectRatio:m,resizeDirection:g,onResizeStart:E,onResize:S,onResizeEnd:_,shouldResize:w}),()=>{var H;(H=I.current)==null||H.destroy()}},[P,c,f,h,p,m,E,S,_,w]);const K=P.split("-");return b.jsx("div",{className:nn(["react-flow__resize-control","nodrag",...K,n,i]),ref:M,style:{...o,scale:O,...l&&{[R?"backgroundColor":"borderColor"]:l}},children:s})}T.memo(oF);function B5({className:e,size:t="default",...n}){return b.jsx("div",{"data-slot":"card","data-size":t,className:bn("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:bn("px-4 group-data-[size=sm]/card:px-3",e),...t})}const Ho={api:"Routes & Controllers",service:"Business Logic",data:"Database & ORM",external:"HTTP Clients"},sF=[{layer:"api",color:"#3b82f6",label:Ho.api},{layer:"service",color:"#8b5cf6",label:Ho.service},{layer:"data",color:"#10b981",label:Ho.data},{layer:"external",color:"#f97316",label:Ho.external}],lF={frontend:m3,"api-server":v3,worker:c3,library:$o,unknown:$o},xC="!bg-muted-foreground !border-none !w-[5px] !h-[5px] !z-10",bC="!invisible";function uF({id:e,data:t,selected:n}){const{label:i,description:o,serviceInfo:s,violationCount:l,hasHighSeverity:c,onExplain:f,diffBadge:h}=t,p=lF[s.type]||$o,m=xn({handleType:"target",handleId:"top"}),g=xn({handleType:"source",handleId:"bottom"}),v=s.layers.map(w=>w.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(mt,{type:"target",position:Ce.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(Cr,{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:sF.map(({layer:w,label:E,color:S})=>v.includes(w)?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},w):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," violation",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:w=>{w.stopPropagation(),f(e)},children:[b.jsx(rs,{className:"h-2.5 w-2.5"}),"Explain"]})]})]}),b.jsx(mt,{type:"source",position:Ce.Bottom,id:"bottom",className:g.length>0?xC:bC})]})}const cF=T.memo(uF),wC=5,qc="!bg-muted-foreground !border-none !w-[5px] !h-[5px] !z-10",ra="!invisible";function fF({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=Ho[n]||n,{setEdges:w}=Ya(),E=p.flatMap(P=>{var K;return(K=P.edgeIds)!=null&&K.length?P.edgeIds:P.edgeId?[P.edgeId]:[]}),S=T.useCallback(()=>{if(E.length===0)return;const P=new Set(E);w(K=>K.map(H=>P.has(H.id)?{...H,data:{...H.data,highlighted:!0}}:H))},[w,E]),_=T.useCallback(()=>{if(E.length===0)return;const P=new Set(E);w(K=>K.map(H=>P.has(H.id)?{...H,data:{...H.data,highlighted:!1}}:H))},[w,E]),C=xn({handleType:"target",handleId:"top"}),N=xn({handleType:"source",handleId:"bottom"}),k=xn({handleType:"source",handleId:"right-src"}),M=xn({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:_,children:[b.jsx(Cr,{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((P,K)=>b.jsxs("p",{className:"text-[10px] text-muted-foreground leading-tight",children:["Depends on ",b.jsx("span",{className:"font-medium text-foreground",children:Ho[P.targetLayer]||P.targetLayer})," — ",P.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(mt,{type:"target",position:Ce.Top,id:"top",className:ra}),b.jsx(mt,{type:"source",position:Ce.Bottom,id:"bottom",className:ra}),b.jsx(mt,{type:"source",position:Ce.Right,id:"right-src",className:ra}),b.jsx(mt,{type:"target",position:Ce.Right,id:"right-tgt",className:ra}),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:P=>{P.stopPropagation(),f(e)},children:c?b.jsx(Of,{className:"h-3 w-3"}):b.jsx(Fa,{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(mt,{type:"target",position:Ce.Top,id:"top",className:C.length>0?qc:ra}),b.jsx(mt,{type:"source",position:Ce.Bottom,id:"bottom",className:N.length>0?qc:ra}),b.jsx(mt,{type:"source",position:Ce.Right,id:"right-src",className:k.length>0?qc:ra,style:{top:"75%"}}),b.jsx(mt,{type:"target",position:Ce.Right,id:"right-tgt",className:M.length>0?qc:ra,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:P=>{P.stopPropagation(),m(e)},title:"Explain",children:b.jsx(rs,{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(P=>b.jsx("div",{className:"truncate text-[10px] text-muted-foreground leading-[18px]",children:P},P)),I>0&&b.jsxs("div",{className:"text-[10px] text-muted-foreground/60 leading-[18px]",children:["+",I," more"]})]})]})}const dF=T.memo(fF),hF={frontend:m3,"api-server":v3,worker:c3,library:$o,unknown:$o};function pF({data:e,selected:t}){const{label:n,serviceType:i,framework:o,diffBadge:s}=e,l=hF[i]||$o;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(mt,{type:"target",position:Ce.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(mt,{type:"source",position:Ce.Bottom,className:"!invisible"})]})}const mF=T.memo(pF),gF={postgres:"#336791",redis:"#DC382D",mongodb:"#47A248",mysql:"#4479A1",sqlite:"#003B57"},yF={postgres:"PostgreSQL",redis:"Redis",mongodb:"MongoDB",mysql:"MySQL",sqlite:"SQLite"},vF="!invisible";function xF({id:e,data:t,selected:n}){const{label:i,databaseType:o,tableCount:s,connectedServices:l,framework:c}=t,f=gF[o]||"#6b7280",h=xn({handleType:"target",handleId:"top"}),p=yF[o]||o,m=o==="redis",g=m?Tb:El;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(mt,{type:"target",position:Ce.Top,id:"top",className:h.length>0?"!border-none !w-[5px] !h-[5px] !z-10":vF,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(mt,{type:"source",position:Ce.Bottom,className:"!invisible"})]})}const bF=T.memo(xF),wF={class:l3,interface:Uq,standalone:f3},ia="!bg-muted-foreground !border-none !w-[5px] !h-[5px] !z-10",aa="!invisible";function _F({id:e,data:t,selected:n}){const{label:i,moduleKind:o,methodCount:s,isDead:l,isContainer:c,isCollapsed:f,onToggleCollapse:h,violations:p,onExplain:m}=t,g=wF[o]||f3,{setEdges:v}=Ya(),w=(p||[]).flatMap(O=>O.edgeIds||[]),E=T.useCallback(()=>{if(w.length===0)return;const O=new Set(w);v(I=>I.map(P=>O.has(P.id)?{...P,data:{...P.data,highlighted:!0}}:P))},[v,w]),S=T.useCallback(()=>{if(w.length===0)return;const O=new Set(w);v(I=>I.map(P=>O.has(P.id)?{...P,data:{...P.data,highlighted:!1}}:P))},[v,w]),_=xn({handleType:"target",handleId:"top"}),C=xn({handleType:"source",handleId:"bottom"}),N=xn({handleType:"source",handleId:"right-src"}),k=xn({handleType:"target",handleId:"right-tgt"}),M=p&&p.length>0&&b.jsxs("div",{className:"group/violation relative shrink-0",onMouseEnter:E,onMouseLeave:S,children:[b.jsx(Cr,{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((O,I)=>b.jsx("p",{className:"text-[10px] text-muted-foreground leading-tight",children:O.reason},I))]})})]}),R=l&&b.jsxs("div",{className:"group/dead relative shrink-0",children:[b.jsx(Cr,{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 c?b.jsxs("div",{className:`rounded-md border bg-muted/10 ${p!=null&&p.length?"border-red-500/60":l?"border-dashed border-amber-500/60":"border-border/50"}`,style:{width:"100%",height:"100%"},children:[b.jsx(mt,{type:"target",position:Ce.Top,id:"top",className:_.length>0?ia:aa}),b.jsx(mt,{type:"source",position:Ce.Bottom,id:"bottom",className:C.length>0?ia:aa}),b.jsx(mt,{type:"source",position:Ce.Right,id:"right-src",className:N.length>0?ia:aa}),b.jsx(mt,{type:"target",position:Ce.Right,id:"right-tgt",className:k.length>0?ia:aa}),b.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1",children:[h&&b.jsx("button",{className:"flex items-center justify-center text-muted-foreground hover:text-foreground transition-colors nodrag",onClick:O=>{O.stopPropagation(),h(e)},children:f?b.jsx(Of,{className:"h-3 w-3"}):b.jsx(Fa,{className:"h-3 w-3"})}),b.jsx(g,{className:"h-2.5 w-2.5 text-muted-foreground"}),b.jsx("span",{className:"text-[10px] font-medium text-muted-foreground truncate",children:i}),M,R,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 ${p!=null&&p.length?"border-red-500/60":l?"border-dashed border-amber-500/60 bg-card/60":"bg-card/80"} ${n?"animate-border-pulse":""}`,children:[b.jsx(mt,{type:"target",position:Ce.Top,id:"top",className:_.length>0?ia:aa}),b.jsx(mt,{type:"source",position:Ce.Bottom,id:"bottom",className:C.length>0?ia:aa}),b.jsx(mt,{type:"source",position:Ce.Right,id:"right-src",className:N.length>0?ia:aa,style:{top:"75%"}}),b.jsx(mt,{type:"target",position:Ce.Right,id:"right-tgt",className:k.length>0?ia:aa,style:{top:"25%"}}),b.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1.5 min-w-0",children:[b.jsx(g,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),b.jsx("span",{className:"text-xs font-medium text-foreground truncate",children:i}),M,R,b.jsxs("span",{className:"ml-auto shrink-0 text-[10px] text-muted-foreground",children:[s," ",s===1?"method":"methods"]}),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:O=>{O.stopPropagation(),m(e)},title:"Explain",children:b.jsx(rs,{className:"h-2.5 w-2.5"})})]})]})}const SF=T.memo(_F),Ic="!bg-muted-foreground !border-none !w-[4px] !h-[4px] !z-10",Bc="!invisible";function EF({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=xn({handleType:"target",handleId:"top"}),v=xn({handleType:"source",handleId:"bottom"}),w=xn({handleType:"source",handleId:"right-src"}),E=xn({handleType:"target",handleId:"right-tgt"}),S=h&&b.jsxs("div",{className:"group/dead relative shrink-0",children:[b.jsx(Cr,{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(mt,{type:"target",position:Ce.Top,id:"top",className:g.length>0?Ic:Bc}),b.jsx(mt,{type:"source",position:Ce.Bottom,id:"bottom",className:v.length>0?Ic:Bc}),b.jsx(mt,{type:"source",position:Ce.Right,id:"right-src",className:w.length>0?Ic:Bc,style:{top:"75%"}}),b.jsx(mt,{type:"target",position:Ce.Right,id:"right-tgt",className:E.length>0?Ic:Bc,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(Cr,{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:_=>{_.stopPropagation(),p(e)},title:"Explain",children:b.jsx(rs,{className:"h-2.5 w-2.5"})})]})]})}const CF=T.memo(EF);function NF({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,w=(c==null?void 0:c.hidden)===!0,E=(c==null?void 0:c.edgeStyle)==="step",S=g||f,_=p?S?3:2:S?2:h?1.5:1,C=E?Wo:os,[N,k,M]=C({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:w?0:v?.08:.6})})}),b.jsx("path",{id:e,d:N,fill:"none",stroke:R,strokeWidth:_,strokeDasharray:h?"8 4":"2 3",opacity:w?0:v?.08:S?1:.6,markerEnd:`url(#${O})`,className:v||w?"":"animate-edge-flow",style:{transition:"opacity 0.2s ease",pointerEvents:w?"none":void 0}}),m&&!v&&!w&&b.jsx(Xf,{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(NF);function kF({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,w=(c==null?void 0:c.hidden)===!0,E=(c==null?void 0:c.edgeStyle)==="step",S=s===l,[_,C,N]=S||E?Wo({sourceX:t,sourceY:n,targetX:i,targetY:o,sourcePosition:s,targetPosition:l,borderRadius:8}):os({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=w?0:v?.08:k?1:.6,I=p?"8 4":"2 3",P=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:_,fill:"none",stroke:M,strokeWidth:R,strokeDasharray:I,opacity:O,markerEnd:`url(#${K})`,className:v||w?"":"animate-edge-flow",style:{transition:"opacity 0.2s ease",pointerEvents:w?"none":void 0}}),P&&!v&&!w&&b.jsx(Xf,{children:b.jsx("div",{style:{position:"absolute",transform:`translate(-50%, -50%) translate(${C}px, ${N}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:P})})]})}const TF=T.memo(kF);function AF({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?Wo:os,[v,w,E]=g({sourceX:t,sourceY:n,targetX:i,targetY:o,sourcePosition:s,targetPosition:l,...m?{borderRadius:8}:{}}),S=f,_=S?"var(--primary)":"#f59e0b",C=S?2:1.5,N=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:_,opacity:N})})}),b.jsx("path",{id:e,d:v,fill:"none",stroke:_,strokeWidth:C,strokeDasharray:"6 3",opacity:N,markerEnd:`url(#${k})`,className:h||p?"":"animate-edge-flow",style:{transition:"opacity 0.2s ease",pointerEvents:p?"none":void 0}}),!h&&!p&&b.jsx(Xf,{children:b.jsx("div",{style:{position:"absolute",transform:`translate(-50%, -50%) translate(${w}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 RF=T.memo(AF),MF=T.forwardRef(function(t,n){const{className:i,render:o,orientation:s="horizontal",...l}=t;return Gn("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(MF,{"data-slot":"separator",orientation:t,className:bn("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}=Ya();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(Rn,{variant:"ghost",size:"icon-xs",onClick:()=>i(),"aria-label":"Zoom in",children:b.jsx(f6,{className:"h-4 w-4"})}),b.jsx(Rn,{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(Rn,{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(Rn,{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(Rn,{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 jF({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 OF(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 _=new Set(S);return _.has(E)?_.delete(E):_.add(E),p(_),_})},[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]),w=T.useCallback(()=>{const E=c.current;return c.current=!1,E},[]);return{collapsedIds:s,toggle:m,expandAll:g,collapseAll:v,isBulkAction:w}}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 zF(){if(EC)return Jp;EC=1;function e(){this.__data__=[],this.size=0}return Jp=e,Jp}var em,CC;function ss(){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 Kf(){if(NC)return tm;NC=1;var e=ss();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 DF(){if(kC)return nm;kC=1;var e=Kf(),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 LF(){if(TC)return rm;TC=1;var e=Kf();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 qF(){if(AC)return im;AC=1;var e=Kf();function t(n){return e(this.__data__,n)>-1}return im=t,im}var am,RC;function IF(){if(RC)return am;RC=1;var e=Kf();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 Qf(){if(MC)return om;MC=1;var e=zF(),t=DF(),n=LF(),i=qF(),o=IF();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 BF(){if(jC)return sm;jC=1;var e=Qf();function t(){this.__data__=new e,this.size=0}return sm=t,sm}var lm,OC;function HF(){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 UF(){if(zC)return um;zC=1;function e(t){return this.__data__.get(t)}return um=e,um}var cm,DC;function PF(){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 _c=="object"&&_c&&_c.Object===Object&&_c;return fm=e,fm}var dm,qC;function Rr(){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 ls(){if(IC)return hm;IC=1;var e=Rr(),t=e.Symbol;return hm=t,hm}var pm,BC;function VF(){if(BC)return pm;BC=1;var e=ls(),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 FF(){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 Ga(){if(UC)return gm;UC=1;var e=ls(),t=VF(),n=FF(),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 fr(){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 Jl(){if(VC)return vm;VC=1;var e=Ga(),t=fr(),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 $F(){if(FC)return xm;FC=1;var e=Rr(),t=e["__core-js_shared__"];return xm=t,xm}var bm,$C;function YF(){if($C)return bm;$C=1;var e=$F(),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 GF(){if(GC)return _m;GC=1;var e=Jl(),t=YF(),n=fr(),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 XF(){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 Xa(){if(KC)return Em;KC=1;var e=GF(),t=XF();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=Xa(),t=Rr(),n=e(t,"Map");return Cm=n,Cm}var Nm,ZC;function Zf(){if(ZC)return Nm;ZC=1;var e=Xa(),t=e(Object,"create");return Nm=t,Nm}var km,WC;function KF(){if(WC)return km;WC=1;var e=Zf();function t(){this.__data__=e?e(null):{},this.size=0}return km=t,km}var Tm,JC;function QF(){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 ZF(){if(eN)return Am;eN=1;var e=Zf(),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 WF(){if(tN)return Rm;tN=1;var e=Zf(),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 JF(){if(nN)return Mm;nN=1;var e=Zf(),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 e$(){if(rN)return jm;rN=1;var e=KF(),t=QF(),n=ZF(),i=WF(),o=JF();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 t$(){if(iN)return Om;iN=1;var e=e$(),t=Qf(),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 n$(){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 Wf(){if(oN)return Dm;oN=1;var e=n$();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 r$(){if(sN)return Lm;sN=1;var e=Wf();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 i$(){if(lN)return qm;lN=1;var e=Wf();function t(n){return e(this,n).get(n)}return qm=t,qm}var Im,uN;function a$(){if(uN)return Im;uN=1;var e=Wf();function t(n){return e(this,n).has(n)}return Im=t,Im}var Bm,cN;function o$(){if(cN)return Bm;cN=1;var e=Wf();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=t$(),t=r$(),n=i$(),i=a$(),o=o$();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 s$(){if(dN)return Um;dN=1;var e=Qf(),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 Jf(){if(hN)return Pm;hN=1;var e=Qf(),t=BF(),n=HF(),i=UF(),o=PF(),s=s$();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=Xa(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return Fm=t,Fm}var $m,gN;function ed(){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 td(){if(yN)return Ym;yN=1;var e=ed(),t=ss(),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 eu(){if(vN)return Gm;vN=1;var e=td(),t=ed();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 l$(){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 Xr(){if(bN)return Km;bN=1;function e(t){return t!=null&&typeof t=="object"}return Km=e,Km}var Qm,wN;function u$(){if(wN)return Qm;wN=1;var e=Ga(),t=Xr(),n="[object Arguments]";function i(o){return t(o)&&e(o)==n}return Qm=i,Qm}var Zm,_N;function tu(){if(_N)return Zm;_N=1;var e=u$(),t=Xr(),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 rn(){if(SN)return Wm;SN=1;var e=Array.isArray;return Wm=e,Wm}var bl={exports:{}},Jm,EN;function c$(){if(EN)return Jm;EN=1;function e(){return!1}return Jm=e,Jm}bl.exports;var CN;function us(){return CN||(CN=1,(function(e,t){var n=Rr(),i=c$(),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})(bl,bl.exports)),bl.exports}var eg,NN;function nd(){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 f$(){if(TN)return ng;TN=1;var e=Ga(),t=l1(),n=Xr(),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]",w="[object String]",E="[object WeakMap]",S="[object ArrayBuffer]",_="[object DataView]",C="[object Float32Array]",N="[object Float64Array]",k="[object Int8Array]",M="[object Int16Array]",R="[object Int32Array]",O="[object Uint8Array]",I="[object Uint8ClampedArray]",P="[object Uint16Array]",K="[object Uint32Array]",H={};H[C]=H[N]=H[k]=H[M]=H[R]=H[O]=H[I]=H[P]=H[K]=!0,H[i]=H[o]=H[S]=H[s]=H[_]=H[l]=H[c]=H[f]=H[h]=H[p]=H[m]=H[g]=H[v]=H[w]=H[E]=!1;function F(X){return n(X)&&t(X.length)&&!!H[e(X)]}return ng=F,ng}var rg,AN;function rd(){if(AN)return rg;AN=1;function e(t){return function(n){return t(n)}}return rg=e,rg}var wl={exports:{}};wl.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})(wl,wl.exports)),wl.exports}var ig,MN;function nu(){if(MN)return ig;MN=1;var e=f$(),t=rd(),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=l$(),t=tu(),n=rn(),i=us(),o=nd(),s=nu(),l=Object.prototype,c=l.hasOwnProperty;function f(h,p){var m=n(h),g=!m&&t(h),v=!m&&!g&&i(h),w=!m&&!g&&!v&&s(h),E=m||g||v||w,S=E?e(h.length,String):[],_=S.length;for(var C in h)(p||c.call(h,C))&&!(E&&(C=="length"||v&&(C=="offset"||C=="parent")||w&&(C=="buffer"||C=="byteLength"||C=="byteOffset")||o(C,_)))&&S.push(C);return S}return ag=f,ag}var og,ON;function id(){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 d$(){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=id(),t=d$(),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 _i(){if(qN)return cg;qN=1;var e=Jl(),t=l1();function n(i){return i!=null&&t(i.length)&&!e(i)}return cg=n,cg}var fg,IN;function da(){if(IN)return fg;IN=1;var e=$5(),t=c1(),n=_i();function i(o){return n(o)?e(o):t(o)}return fg=i,fg}var dg,BN;function h$(){if(BN)return dg;BN=1;var e=eu(),t=da();function n(i,o){return i&&e(o,t(o),i)}return dg=n,dg}var hg,HN;function p$(){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 m$(){if(UN)return pg;UN=1;var e=fr(),t=id(),n=p$(),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 Ka(){if(PN)return mg;PN=1;var e=$5(),t=m$(),n=_i();function i(o){return n(o)?e(o,!0):t(o)}return mg=i,mg}var gg,VN;function g$(){if(VN)return gg;VN=1;var e=eu(),t=Ka();function n(i,o){return i&&e(o,t(o),i)}return gg=n,gg}var _l={exports:{}};_l.exports;var FN;function G5(){return FN||(FN=1,(function(e,t){var n=Rr(),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})(_l,_l.exports)),_l.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 y$(){if(KN)return wg;KN=1;var e=eu(),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 ad(){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=ad(),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 v$(){if(JN)return Cg;JN=1;var e=eu(),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=rn();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=da();function i(o){return e(o,n,t)}return kg=i,kg}var Tg,nk;function x$(){if(nk)return Tg;nk=1;var e=W5(),t=Z5(),n=Ka();function i(o){return e(o,n,t)}return Tg=i,Tg}var Ag,rk;function b$(){if(rk)return Ag;rk=1;var e=Xa(),t=Rr(),n=e(t,"DataView");return Ag=n,Ag}var Rg,ik;function w$(){if(ik)return Rg;ik=1;var e=Xa(),t=Rr(),n=e(t,"Promise");return Rg=n,Rg}var Mg,ak;function eO(){if(ak)return Mg;ak=1;var e=Xa(),t=Rr(),n=e(t,"Set");return Mg=n,Mg}var jg,ok;function _$(){if(ok)return jg;ok=1;var e=Xa(),t=Rr(),n=e(t,"WeakMap");return jg=n,jg}var Og,sk;function cs(){if(sk)return Og;sk=1;var e=b$(),t=a1(),n=w$(),i=eO(),o=_$(),s=Ga(),l=V5(),c="[object Map]",f="[object Object]",h="[object Promise]",p="[object Set]",m="[object WeakMap]",g="[object DataView]",v=l(e),w=l(t),E=l(n),S=l(i),_=l(o),C=s;return(e&&C(new e(new ArrayBuffer(1)))!=g||t&&C(new t)!=c||n&&C(n.resolve())!=h||i&&C(new i)!=p||o&&C(new o)!=m)&&(C=function(N){var k=s(N),M=k==f?N.constructor:void 0,R=M?l(M):"";if(R)switch(R){case v:return g;case w:return c;case E:return h;case S:return p;case _:return m}return k}),Og=C,Og}var zg,lk;function S$(){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=Rr(),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 E$(){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 C$(){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 N$(){if(hk)return Bg;hk=1;var e=ls(),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 k$(){if(mk)return Ug;mk=1;var e=h1(),t=E$(),n=C$(),i=N$(),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]",w="[object DataView]",E="[object Float32Array]",S="[object Float64Array]",_="[object Int8Array]",C="[object Int16Array]",N="[object Int32Array]",k="[object Uint8Array]",M="[object Uint8ClampedArray]",R="[object Uint16Array]",O="[object Uint32Array]";function I(P,K,H){var F=P.constructor;switch(K){case v:return e(P);case s:case l:return new F(+P);case w:return t(P,H);case E:case S:case _:case C:case N:case k:case M:case R:case O:return o(P,H);case c:return new F;case f:case m:return new F(P);case h:return n(P);case p:return new F;case g:return i(P)}}return Ug=I,Ug}var Pg,gk;function rO(){if(gk)return Pg;gk=1;var e=fr(),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=ad(),n=id();function i(o){return typeof o.constructor=="function"&&!n(o)?e(t(o)):{}}return Vg=i,Vg}var Fg,vk;function T$(){if(vk)return Fg;vk=1;var e=cs(),t=Xr(),n="[object Map]";function i(o){return t(o)&&e(o)==n}return Fg=i,Fg}var $g,xk;function A$(){if(xk)return $g;xk=1;var e=T$(),t=rd(),n=u1(),i=n&&n.isMap,o=i?t(i):e;return $g=o,$g}var Yg,bk;function R$(){if(bk)return Yg;bk=1;var e=cs(),t=Xr(),n="[object Set]";function i(o){return t(o)&&e(o)==n}return Yg=i,Yg}var Gg,wk;function M$(){if(wk)return Gg;wk=1;var e=R$(),t=rd(),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=Jf(),t=s1(),n=td(),i=h$(),o=g$(),s=G5(),l=X5(),c=y$(),f=v$(),h=J5(),p=x$(),m=cs(),g=S$(),v=k$(),w=iO(),E=rn(),S=us(),_=A$(),C=fr(),N=M$(),k=da(),M=Ka(),R=1,O=2,I=4,P="[object Arguments]",K="[object Array]",H="[object Boolean]",F="[object Date]",X="[object Error]",L="[object Function]",B="[object GeneratorFunction]",z="[object Map]",V="[object Number]",G="[object Object]",Q="[object RegExp]",j="[object Set]",D="[object String]",$="[object Symbol]",q="[object WeakMap]",Y="[object ArrayBuffer]",W="[object DataView]",Z="[object Float32Array]",te="[object Float64Array]",re="[object Int8Array]",se="[object Int16Array]",ge="[object Int32Array]",be="[object Uint8Array]",ve="[object Uint8ClampedArray]",Ee="[object Uint16Array]",pe="[object Uint32Array]",Ne={};Ne[P]=Ne[K]=Ne[Y]=Ne[W]=Ne[H]=Ne[F]=Ne[Z]=Ne[te]=Ne[re]=Ne[se]=Ne[ge]=Ne[z]=Ne[V]=Ne[G]=Ne[Q]=Ne[j]=Ne[D]=Ne[$]=Ne[be]=Ne[ve]=Ne[Ee]=Ne[pe]=!0,Ne[X]=Ne[L]=Ne[q]=!1;function Oe(Re,vt,he,ye,He,Se){var Ue,Fe=vt&R,kt=vt&O,ue=vt&I;if(he&&(Ue=He?he(Re,ye,He,Se):he(Re)),Ue!==void 0)return Ue;if(!C(Re))return Re;var me=E(Re);if(me){if(Ue=g(Re),!Fe)return l(Re,Ue)}else{var Ae=m(Re),Ve=Ae==L||Ae==B;if(S(Re))return s(Re,Fe);if(Ae==G||Ae==P||Ve&&!He){if(Ue=kt||Ve?{}:w(Re),!Fe)return kt?f(Re,o(Ue,Re)):c(Re,i(Ue,Re))}else{if(!Ne[Ae])return He?Re:{};Ue=v(Re,Ae,Fe)}}Se||(Se=new e);var Ge=Se.get(Re);if(Ge)return Ge;Se.set(Re,Ue),N(Re)?Re.forEach(function(ft){Ue.add(Oe(ft,vt,he,ft,Re,Se))}):_(Re)&&Re.forEach(function(ft,ut){Ue.set(ut,Oe(ft,vt,he,ut,Re,Se))});var Ut=ue?kt?p:h:kt?M:k,zt=me?void 0:Ut(Re);return t(zt||Re,function(ft,ut){zt&&(ut=ft,ft=Re[ut]),n(Ue,ut,Oe(ft,vt,he,ut,Re,Se))}),Ue}return Xg=Oe,Xg}var Kg,Sk;function j$(){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 O$(){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=O$(),t=e();return Wg=t,Wg}var Jg,kk;function g1(){if(kk)return Jg;kk=1;var e=m1(),t=da();function n(i,o){return i&&e(i,o,t)}return Jg=n,Jg}var ey,Tk;function z$(){if(Tk)return ey;Tk=1;var e=_i();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 od(){if(Ak)return ty;Ak=1;var e=g1(),t=z$(),n=t(e);return ty=n,ty}var ny,Rk;function Qa(){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=Qa();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=od(),n=oO(),i=rn();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 D$(){if(zk)return oy;zk=1;var e=od();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 L$(){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 q$(){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=L$(),n=q$();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 I$(){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=I$(),n=cO(),i=1,o=2;function s(l,c,f,h,p,m){var g=f&i,v=l.length,w=c.length;if(v!=w&&!(g&&w>v))return!1;var E=m.get(l),S=m.get(c);if(E&&S)return E==c&&S==l;var _=-1,C=!0,N=f&o?new e:void 0;for(m.set(l,c),m.set(c,l);++_<v;){var k=l[_],M=c[_];if(h)var R=g?h(M,k,_,c,l,m):h(k,M,_,l,c,m);if(R!==void 0){if(R)continue;C=!1;break}if(N){if(!t(c,function(O,I){if(!n(N,I)&&(k===O||p(k,O,f,h,m)))return N.push(I)})){C=!1;break}}else if(!(k===M||p(k,M,f,h,m))){C=!1;break}}return m.delete(l),m.delete(c),C}return dy=s,dy}var hy,Uk;function B$(){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 H$(){if(Vk)return my;Vk=1;var e=ls(),t=tO(),n=ss(),i=fO(),o=B$(),s=y1(),l=1,c=2,f="[object Boolean]",h="[object Date]",p="[object Error]",m="[object Map]",g="[object Number]",v="[object RegExp]",w="[object Set]",E="[object String]",S="[object Symbol]",_="[object ArrayBuffer]",C="[object DataView]",N=e?e.prototype:void 0,k=N?N.valueOf:void 0;function M(R,O,I,P,K,H,F){switch(I){case C:if(R.byteLength!=O.byteLength||R.byteOffset!=O.byteOffset)return!1;R=R.buffer,O=O.buffer;case _: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 w:var L=P&l;if(X||(X=s),R.size!=O.size&&!L)return!1;var B=F.get(R);if(B)return B==O;P|=c,F.set(R,O);var z=i(X(R),X(O),P,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 U$(){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,w=e(l),E=w.length;if(v!=E&&!m)return!1;for(var S=v;S--;){var _=g[S];if(!(m?_ in l:i.call(l,_)))return!1}var C=p.get(s),N=p.get(l);if(C&&N)return C==l&&N==s;var k=!0;p.set(s,l),p.set(l,s);for(var M=m;++S<v;){_=g[S];var R=s[_],O=l[_];if(f)var I=m?f(O,R,_,l,s,p):f(R,O,_,s,l,p);if(!(I===void 0?R===O||h(R,O,c,f,p):I)){k=!1;break}M||(M=_=="constructor")}if(k&&!M){var P=s.constructor,K=l.constructor;P!=K&&"constructor"in s&&"constructor"in l&&!(typeof P=="function"&&P instanceof P&&typeof K=="function"&&K instanceof K)&&(k=!1)}return p.delete(s),p.delete(l),k}return gy=o,gy}var yy,$k;function P$(){if($k)return yy;$k=1;var e=Jf(),t=fO(),n=H$(),i=U$(),o=cs(),s=rn(),l=us(),c=nu(),f=1,h="[object Arguments]",p="[object Array]",m="[object Object]",g=Object.prototype,v=g.hasOwnProperty;function w(E,S,_,C,N,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 P=O==m,K=I==m,H=O==I;if(H&&l(E)){if(!l(S))return!1;M=!0,P=!1}if(H&&!P)return k||(k=new e),M||c(E)?t(E,S,_,C,N,k):n(E,S,O,_,C,N,k);if(!(_&f)){var F=P&&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),N(L,B,_,C,k)}}return H?(k||(k=new e),i(E,S,_,C,N,k)):!1}return yy=w,yy}var vy,Yk;function dO(){if(Yk)return vy;Yk=1;var e=P$(),t=Xr();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 V$(){if(Gk)return xy;Gk=1;var e=Jf(),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],w=s[v],E=g[1];if(m&&g[2]){if(w===void 0&&!(v in s))return!1}else{var S=new e;if(f)var _=f(w,E,v,s,l,S);if(!(_===void 0?t(E,w,n|i,f,S):_))return!1}}return!0}return xy=o,xy}var by,Xk;function hO(){if(Xk)return by;Xk=1;var e=fr();function t(n){return n===n&&!e(n)}return by=t,by}var wy,Kk;function F$(){if(Kk)return wy;Kk=1;var e=hO(),t=da();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 $$(){if(Zk)return Sy;Zk=1;var e=V$(),t=F$(),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 fs(){if(Wk)return Ey;Wk=1;var e=Ga(),t=Xr(),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=rn(),t=fs(),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 Y$(){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 G$(){if(tT)return ky;tT=1;var e=Y$(),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 X$(){if(nT)return Ty;nT=1;var e=G$(),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 sd(){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 K$(){if(iT)return Ry;iT=1;var e=ls(),t=sd(),n=rn(),i=fs(),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=K$();function t(n){return n==null?"":e(n)}return My=t,My}var jy,oT;function ld(){if(oT)return jy;oT=1;var e=rn(),t=v1(),n=X$(),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 ru(){if(sT)return Oy;sT=1;var e=fs();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 ud(){if(lT)return zy;lT=1;var e=ld(),t=ru();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 Q$(){if(uT)return Dy;uT=1;var e=ud();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 Z$(){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=ld(),t=tu(),n=rn(),i=nd(),o=l1(),s=ru();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=Z$(),t=gO();function n(i,o){return i!=null&&t(i,o,e)}return Iy=n,Iy}var By,hT;function W$(){if(hT)return By;hT=1;var e=dO(),t=Q$(),n=yO(),i=v1(),o=hO(),s=pO(),l=ru(),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 J$(){if(mT)return Uy;mT=1;var e=ud();function t(n){return function(i){return e(i,n)}}return Uy=t,Uy}var Py,gT;function eY(){if(gT)return Py;gT=1;var e=vO(),t=J$(),n=v1(),i=ru();function o(s){return n(s)?e(i(s)):t(s)}return Py=o,Py}var Vy,yT;function Si(){if(yT)return Vy;yT=1;var e=$$(),t=W$(),n=Qa(),i=rn(),o=eY();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=D$(),n=Si(),i=rn();function o(s,l){var c=i(s)?e:t;return c(s,n(l,3))}return Fy=o,Fy}var $y,xT;function tY(){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=tY(),t=gO();function n(i,o){return i!=null&&t(i,o,e)}return Yy=n,Yy}var Gy,wT;function nY(){if(wT)return Gy;wT=1;var e=c1(),t=cs(),n=tu(),i=rn(),o=_i(),s=us(),l=id(),c=nu(),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 w=t(v);if(w==f||w==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=od(),t=_i();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=sd(),t=Si(),n=_O(),i=rn();function o(s,l){var c=i(s)?e:n;return c(s,t(l,3))}return Qy=o,Qy}var Zy,CT;function rY(){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 iY(){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=rY(),t=od(),n=Si(),i=iY(),o=rn();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 aY(){if(TT)return ev;TT=1;var e=Ga(),t=rn(),n=Xr(),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 oY(){if(AT)return tv;AT=1;var e=vO(),t=e("length");return tv=t,tv}var nv,RT;function sY(){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 lY(){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",w=h+"?",E="["+s+"]?",S="(?:"+v+"(?:"+[p,m,g].join("|")+")"+E+w+")*",_=E+w+S,C="(?:"+[p+c+"?",c,m,g,l].join("|")+")",N=RegExp(f+"(?="+f+")|"+C+_,"g");function k(M){for(var R=N.lastIndex=0;N.test(M);)++R;return R}return rv=k,rv}var iv,jT;function uY(){if(jT)return iv;jT=1;var e=oY(),t=sY(),n=lY();function i(o){return t(o)?n(o):e(o)}return iv=i,iv}var av,OT;function cY(){if(OT)return av;OT=1;var e=c1(),t=cs(),n=_i(),i=aY(),o=uY(),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 fY(){if(zT)return ov;zT=1;var e=s1(),t=rO(),n=g1(),i=Si(),o=ad(),s=rn(),l=us(),c=Jl(),f=fr(),h=nu();function p(m,g,v){var w=s(m),E=w||l(m)||h(m);if(g=i(g,4),v==null){var S=m&&m.constructor;E?v=w?new S:[]:f(m)?v=c(S)?t(o(m)):{}:v={}}return(E?e:n)(m,function(_,C,N){return g(v,_,C,N)}),v}return ov=p,ov}var sv,DT;function dY(){if(DT)return sv;DT=1;var e=ls(),t=tu(),n=rn(),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=dY();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 hY(){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=hY(),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 pY(){if(BT)return fv;BT=1;var e=p1(),t=F5(),n=Qa(),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 mY(){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=pY(),t=mY(),n=t(e);return hv=n,hv}var pv,PT;function cd(){if(PT)return pv;PT=1;var e=Qa(),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 gY(){if(FT)return gv;FT=1;function e(t){return t!==t}return gv=e,gv}var yv,$T;function yY(){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 vY(){if(YT)return vv;YT=1;var e=kO(),t=gY(),n=yY();function i(o,s,l){return s===s?n(o,s,l):e(o,t,l)}return vv=i,vv}var xv,GT;function xY(){if(GT)return xv;GT=1;var e=vY();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 bY(){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 wY(){if(KT)return wv;KT=1;function e(){}return wv=e,wv}var _v,QT;function _Y(){if(QT)return _v;QT=1;var e=eO(),t=wY(),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 SY(){if(ZT)return Sv;ZT=1;var e=uO(),t=xY(),n=bY(),i=cO(),o=_Y(),s=y1(),l=200;function c(f,h,p){var m=-1,g=t,v=f.length,w=!0,E=[],S=E;if(p)w=!1,g=n;else if(v>=l){var _=h?null:o(f);if(_)return s(_);w=!1,g=i,S=new e}else S=h?[]:E;e:for(;++m<v;){var C=f[m],N=h?h(C):C;if(C=p||C!==0?C:0,w&&N===N){for(var k=S.length;k--;)if(S[k]===N)continue e;h&&S.push(N),E.push(C)}else g(S,N,p)||(S!==E&&S.push(N),E.push(C))}return E}return Sv=c,Sv}var Ev,WT;function TO(){if(WT)return Ev;WT=1;var e=_i(),t=Xr();function n(i){return t(i)&&e(i)}return Ev=n,Ev}var Cv,JT;function EY(){if(JT)return Cv;JT=1;var e=x1(),t=cd(),n=SY(),i=TO(),o=t(function(s){return n(e(s,1,i,!0))});return Cv=o,Cv}var Nv,eA;function CY(){if(eA)return Nv;eA=1;var e=sd();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=CY(),t=da();function n(i){return i==null?[]:e(i,t(i))}return kv=n,kv}var Tv,nA;function dr(){if(nA)return Tv;nA=1;var e;if(typeof i1=="function")try{e={clone:j$(),constant:p1(),each:lO(),filter:xO(),has:bO(),isArray:rn(),isEmpty:nY(),isFunction:Jl(),isUndefined:wO(),keys:da(),map:SO(),reduce:EO(),size:cY(),transform:fY(),union:EY(),values:AO()}}catch{}return e||(e=window._),Tv=e,Tv}var Av,rA;function b1(){if(rA)return Av;rA=1;var e=dr();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(w){g.length>1?v.setNode(w,m):v.setNode(w)}),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 w(E){var S=g.parent(E);return S===void 0||m.hasNode(S)?(v[E]=S,S):S in v?v[S]:w(S)}return this._isCompound&&e.each(m.nodes(),function(E){m.setParent(E,w(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(w,E){return v.length>1?g.setEdge(w,E,m):g.setEdge(w,E),E}),this},o.prototype.setEdge=function(){var p,m,g,v,w=!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],w=!0)):(p=E,m=arguments[1],g=arguments[3],arguments.length>2&&(v=arguments[2],w=!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 w&&(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]=w?v:this._defaultEdgeLabelFn(p,m,g);var _=f(this._isDirected,p,m,g);return p=_.v,m=_.w,Object.freeze(_),this._edgeObjs[S]=_,s(this._preds[m],p),s(this._sucs[p],m),this._in[m][S]=_,this._out[p][S]=_,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),w=this._edgeObjs[v];return w&&(p=w.v,m=w.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(w){return w.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(w){return w.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 w=""+m,E=""+g;if(!p&&w>E){var S=w;w=E,E=S}return w+i+E+i+(e.isUndefined(v)?t:v)}function f(p,m,g,v){var w=""+m,E=""+g;if(!p&&w>E){var S=w;w=E,E=S}var _={v:w,w:E};return v&&(_.name=v),_}function h(p,m){return c(p,m.v,m.w,m.name)}return Av}var Rv,iA;function NY(){return iA||(iA=1,Rv="2.1.8"),Rv}var Mv,aA;function kY(){return aA||(aA=1,Mv={Graph:b1(),version:NY()}),Mv}var jv,oA;function TY(){if(oA)return jv;oA=1;var e=dr(),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 AY(){if(sA)return Ov;sA=1;var e=dr();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=dr();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=dr(),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(w){var E=w.v!==m?w.v:w.w,S=h[E],_=c(w),C=g.distance+_;if(_<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+w+" Weight: "+_);C<S.distance&&(S.distance=C,S.predecessor=m,p.decrease(E,C))};for(s.nodes().forEach(function(w){var E=w===l?0:Number.POSITIVE_INFINITY;h[w]={distance:E},p.add(w,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 RY(){if(cA)return Lv;cA=1;var e=MO(),t=dr();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=dr();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 MY(){if(dA)return Iv;dA=1;var e=dr(),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 jY(){if(hA)return Bv;hA=1;var e=dr();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 w=g[h],E=p[v],S=g[v],_=w.distance+E.distance;_<S.distance&&(S.distance=_,S.predecessor=E.predecessor)})})}),c}return Bv}var Hv,pA;function OO(){if(pA)return Hv;pA=1;var e=dr();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 OY(){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=dr();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 zY(){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 DY(){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 LY(){if(xA)return $v;xA=1;var e=dr(),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,w=f.priority(v);if(w!==void 0){var E=s(g);E<w&&(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 qY(){return bA||(bA=1,Yv={components:AY(),dijkstra:MO(),dijkstraAll:RY(),findCycles:MY(),floydWarshall:jY(),isAcyclic:OY(),postorder:zY(),preorder:DY(),prim:LY(),tarjan:jO(),topsort:OO()}),Yv}var Gv,wA;function IY(){if(wA)return Gv;wA=1;var e=kY();return Gv={Graph:e.Graph,json:TY(),alg:qY(),version:e.version},Gv}var Xv,_A;function kr(){if(_A)return Xv;_A=1;var e;if(typeof i1=="function")try{e=IY()}catch{}return e||(e=window.graphlib),Xv=e,Xv}var Kv,SA;function BY(){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 fd(){if(EA)return Qv;EA=1;var e=ss(),t=_i(),n=nd(),i=fr();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 HY(){if(CA)return Zv;CA=1;var e=cd(),t=ss(),n=fd(),i=Ka(),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),w=-1,E=v.length;++w<E;){var S=v[w],_=c[S];(_===void 0||t(_,o[S])&&!s.call(c,S))&&(c[S]=g[S])}return c});return Zv=l,Zv}var Wv,NA;function UY(){if(NA)return Wv;NA=1;var e=Si(),t=_i(),n=da();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 PY(){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 VY(){if(TA)return e0;TA=1;var e=PY(),t=/^\s+/;function n(i){return i&&i.slice(0,e(i)+1).replace(t,"")}return e0=n,e0}var t0,AA;function FY(){if(AA)return t0;AA=1;var e=VY(),t=fr(),n=fs(),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=FY(),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 $Y(){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 YY(){if(jA)return i0;jA=1;var e=kO(),t=Si(),n=$Y(),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 GY(){if(OA)return a0;OA=1;var e=UY(),t=YY(),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 XY(){if(DA)return s0;DA=1;var e=m1(),t=oO(),n=Ka();function i(o,s){return o==null?o:e(o,t(s),n)}return s0=i,s0}var l0,LA;function KY(){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 QY(){if(qA)return u0;qA=1;var e=ed(),t=g1(),n=Si();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=fs();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 ZY(){if(BA)return f0;BA=1;function e(t,n){return t>n}return f0=e,f0}var d0,HA;function WY(){if(HA)return d0;HA=1;var e=w1(),t=ZY(),n=Qa();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=ed(),t=ss();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 JY(){if(PA)return p0;PA=1;var e=Ga(),t=ad(),n=Xr(),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 eG(){if(FA)return g0;FA=1;var e=eu(),t=Ka();function n(i){return e(i,t(i))}return g0=n,g0}var y0,$A;function tG(){if($A)return y0;$A=1;var e=qO(),t=G5(),n=nO(),i=X5(),o=iO(),s=tu(),l=rn(),c=TO(),f=us(),h=Jl(),p=fr(),m=JY(),g=nu(),v=IO(),w=eG();function E(S,_,C,N,k,M,R){var O=v(S,C),I=v(_,C),P=R.get(I);if(P){e(S,C,P);return}var K=M?M(O,I,C+"",S,_,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=w(O):(!p(O)||h(O))&&(K=o(I))):H=!1}H&&(R.set(I,K),k(K,I,N,M,R),R.delete(I)),e(S,C,K)}return y0=E,y0}var v0,YA;function nG(){if(YA)return v0;YA=1;var e=Jf(),t=qO(),n=m1(),i=tG(),o=fr(),s=Ka(),l=IO();function c(f,h,p,m,g){f!==h&&n(h,function(v,w){if(g||(g=new e),o(v))i(f,h,w,p,c,m,g);else{var E=m?m(l(f,w),v,w+"",f,h,g):void 0;E===void 0&&(E=v),t(f,w,E)}},s)}return v0=c,v0}var x0,GA;function rG(){if(GA)return x0;GA=1;var e=cd(),t=fd();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 iG(){if(XA)return b0;XA=1;var e=nG(),t=rG(),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 aG(){if(QA)return _0;QA=1;var e=w1(),t=BO(),n=Qa();function i(o){return o&&o.length?e(o,n,t):void 0}return _0=i,_0}var S0,ZA;function oG(){if(ZA)return S0;ZA=1;var e=w1(),t=Si(),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 sG(){if(WA)return E0;WA=1;var e=Rr(),t=function(){return e.Date.now()};return E0=t,E0}var C0,JA;function lG(){if(JA)return C0;JA=1;var e=td(),t=ld(),n=nd(),i=fr(),o=ru();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 w=o(c[p]),E=f;if(w==="__proto__"||w==="constructor"||w==="prototype")return l;if(p!=g){var S=v[w];E=h?h(S,w,v):void 0,E===void 0&&(E=i(S)?S:n(c[p+1])?[]:{})}e(v,w,E),v=v[w]}return l}return C0=s,C0}var N0,eR;function uG(){if(eR)return N0;eR=1;var e=ud(),t=lG(),n=ld();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 cG(){if(tR)return k0;tR=1;var e=uG(),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 fG(){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 dG(){if(rR)return A0;rR=1;var e=cG(),t=fG(),n=t(function(i,o){return i==null?{}:e(i,o)});return A0=n,A0}var R0,iR;function hG(){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 pG(){if(aR)return M0;aR=1;var e=hG(),t=fd(),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 mG(){if(oR)return j0;oR=1;var e=pG(),t=e();return j0=t,j0}var O0,sR;function gG(){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 yG(){if(lR)return z0;lR=1;var e=fs();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 vG(){if(uR)return D0;uR=1;var e=yG();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 xG(){if(cR)return L0;cR=1;var e=sd(),t=ud(),n=Si(),i=_O(),o=gG(),s=rd(),l=vG(),c=Qa(),f=rn();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 w=i(p,function(E,S,_){var C=e(m,function(N){return N(E)});return{criteria:C,index:++v,value:E}});return o(w,function(E,S){return l(E,S,g)})}return L0=h,L0}var q0,fR;function bG(){if(fR)return q0;fR=1;var e=x1(),t=xG(),n=cd(),i=fd(),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 wG(){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 _G(){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 SG(){if(pR)return H0;pR=1;var e=td(),t=_G();function n(i,o){return t(i||[],o||[],e)}return H0=n,H0}var U0,mR;function Ht(){if(mR)return U0;mR=1;var e;if(typeof i1=="function")try{e={cloneDeep:BY(),constant:p1(),defaults:HY(),each:lO(),filter:xO(),find:GY(),flatten:LO(),forEach:sO(),forIn:XY(),has:bO(),isUndefined:wO(),last:KY(),map:SO(),mapValues:QY(),max:WY(),merge:iG(),min:aG(),minBy:oG(),now:sG(),pick:dG(),range:mG(),reduce:EO(),sortBy:bG(),uniqueId:wG(),values:AO(),zipObject:SG()}}catch{}return e||(e=window._),U0=e,U0}var P0,gR;function EG(){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 CG(){if(yR)return V0;yR=1;var e=Ht(),t=kr().Graph,n=EG();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],w=p[0],E;h.nodeCount();){for(;E=w.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 w=v?[]:void 0;return e.forEach(h.inEdges(g.v),function(E){var S=h.edge(E),_=h.node(E.v);v&&w.push({v:E.v,w:E.w}),_.out-=S,f(p,m,_)}),e.forEach(h.outEdges(g.v),function(E){var S=h.edge(E),_=E.w,C=h.node(_);C.in-=S,f(p,m,C)}),h.removeNode(g.v),w}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 _=m.edge(S.v,S.w)||0,C=p(S),N=_+C;m.setEdge(S.v,S.w,N),v=Math.max(v,m.node(S.v).out+=C),g=Math.max(g,m.node(S.w).in+=C)});var w=e.range(v+g+3).map(function(){return new n}),E=g+1;return e.forEach(m.nodes(),function(S){f(w,E,m.node(S))}),{graph:m,buckets:w,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 NG(){if(vR)return F0;vR=1;var e=Ht(),t=CG();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 jn(){if(xR)return $0;xR=1;var e=Ht(),t=kr().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:w,notime:E};function n(S,_,C,N){var k;do k=e.uniqueId(N);while(S.hasNode(k));return C.dummy=_,S.setNode(k,C),k}function i(S){var _=new t().setGraph(S.graph());return e.forEach(S.nodes(),function(C){_.setNode(C,S.node(C))}),e.forEach(S.edges(),function(C){var N=_.edge(C.v,C.w)||{weight:0,minlen:1},k=S.edge(C);_.setEdge(C.v,C.w,{weight:N.weight+k.weight,minlen:Math.max(N.minlen,k.minlen)})}),_}function o(S){var _=new t({multigraph:S.isMultigraph()}).setGraph(S.graph());return e.forEach(S.nodes(),function(C){S.children(C).length||_.setNode(C,S.node(C))}),e.forEach(S.edges(),function(C){_.setEdge(C,S.edge(C))}),_}function s(S){var _=e.map(S.nodes(),function(C){var N={};return e.forEach(S.outEdges(C),function(k){N[k.w]=(N[k.w]||0)+S.edge(k).weight}),N});return e.zipObject(S.nodes(),_)}function l(S){var _=e.map(S.nodes(),function(C){var N={};return e.forEach(S.inEdges(C),function(k){N[k.v]=(N[k.v]||0)+S.edge(k).weight}),N});return e.zipObject(S.nodes(),_)}function c(S,_){var C=S.x,N=S.y,k=_.x-C,M=_.y-N,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,P;return Math.abs(M)*R>Math.abs(k)*O?(M<0&&(O=-O),I=O*k/M,P=O):(k<0&&(R=-R),I=R,P=R*M/k),{x:C+I,y:N+P}}function f(S){var _=e.map(e.range(g(S)+1),function(){return[]});return e.forEach(S.nodes(),function(C){var N=S.node(C),k=N.rank;e.isUndefined(k)||(_[k][N.order]=C)}),_}function h(S){var _=e.min(e.map(S.nodes(),function(C){return S.node(C).rank}));e.forEach(S.nodes(),function(C){var N=S.node(C);e.has(N,"rank")&&(N.rank-=_)})}function p(S){var _=e.min(e.map(S.nodes(),function(M){return S.node(M).rank})),C=[];e.forEach(S.nodes(),function(M){var R=S.node(M).rank-_;C[R]||(C[R]=[]),C[R].push(M)});var N=0,k=S.graph().nodeRankFactor;e.forEach(C,function(M,R){e.isUndefined(M)&&R%k!==0?--N:N&&e.forEach(M,function(O){S.node(O).rank+=N})})}function m(S,_,C,N){var k={width:0,height:0};return arguments.length>=4&&(k.rank=C,k.order=N),n(S,"border",k,_)}function g(S){return e.max(e.map(S.nodes(),function(_){var C=S.node(_).rank;if(!e.isUndefined(C))return C}))}function v(S,_){var C={lhs:[],rhs:[]};return e.forEach(S,function(N){_(N)?C.lhs.push(N):C.rhs.push(N)}),C}function w(S,_){var C=e.now();try{return _()}finally{console.log(S+" time: "+(e.now()-C)+"ms")}}function E(S,_){return _()}return $0}var Y0,bR;function kG(){if(bR)return Y0;bR=1;var e=Ht(),t=jn();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 w,E,S;for(S=0,++f;f<p;++S,++f)g.points=[],E={width:0,height:0,edgeLabel:g,edgeObj:l,rank:f},w=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,w,{weight:g.weight},m),S===0&&s.graph().dummyChains.push(w),c=w;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 Cf(){if(wR)return G0;wR=1;var e=Ht();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=Ht(),t=kr().Graph,n=Cf().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 TG(){if(SR)return K0;SR=1;var e=Ht(),t=HO(),n=Cf().slack,i=Cf().longestPath,o=kr().alg.preorder,s=kr().alg.postorder,l=jn().simplify;K0=c,c.initLowLimValues=m,c.initCutValues=f,c.calcCutValue=p,c.leaveEdge=v,c.enterEdge=w,c.exchangeEdges=E;function c(N){N=l(N),i(N);var k=t(N);m(k),f(k,N);for(var M,R;M=v(k);)R=w(k,N,M),E(k,N,M,R)}function f(N,k){var M=s(N,N.nodes());M=M.slice(0,M.length-1),e.forEach(M,function(R){h(N,k,R)})}function h(N,k,M){var R=N.node(M),O=R.parent;N.edge(M,O).cutvalue=p(N,k,M)}function p(N,k,M){var R=N.node(M),O=R.parent,I=!0,P=k.edge(M,O),K=0;return P||(I=!1,P=k.edge(O,M)),K=P.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,_(N,M,X)){var z=N.edge(M,X).cutvalue;K+=L?-z:z}}}),K}function m(N,k){arguments.length<2&&(k=N.nodes()[0]),g(N,{},1,k)}function g(N,k,M,R,O){var I=M,P=N.node(R);return k[R]=!0,e.forEach(N.neighbors(R),function(K){e.has(k,K)||(M=g(N,k,M,K,R))}),P.low=I,P.lim=M++,O?P.parent=O:delete P.parent,M}function v(N){return e.find(N.edges(),function(k){return N.edge(k).cutvalue<0})}function w(N,k,M){var R=M.v,O=M.w;k.hasEdge(R,O)||(R=M.w,O=M.v);var I=N.node(R),P=N.node(O),K=I,H=!1;I.lim>P.lim&&(K=P,H=!0);var F=e.filter(k.edges(),function(X){return H===C(N,N.node(X.v),K)&&H!==C(N,N.node(X.w),K)});return e.minBy(F,function(X){return n(k,X)})}function E(N,k,M,R){var O=M.v,I=M.w;N.removeEdge(O,I),N.setEdge(R.v,R.w,{}),m(N),f(N,k),S(N,k)}function S(N,k){var M=e.find(N.nodes(),function(O){return!k.node(O).parent}),R=o(N,M);R=R.slice(1),e.forEach(R,function(O){var I=N.node(O).parent,P=k.edge(O,I),K=!1;P||(P=k.edge(I,O),K=!0),k.node(O).rank=k.node(I).rank+(K?P.minlen:-P.minlen)})}function _(N,k,M){return N.hasEdge(k,M)}function C(N,k,M){return M.low<=k.lim&&k.lim<=M.lim}return K0}var Q0,ER;function AG(){if(ER)return Q0;ER=1;var e=Cf(),t=e.longestPath,n=HO(),i=TG();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 RG(){if(CR)return Z0;CR=1;var e=Ht();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],w=!0;l!==f.w;){if(c=o.node(l),w){for(;(v=p[g])!==m&&o.node(v).maxRank<c.rank;)g++;v===m&&(w=!1)}if(!w){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 MG(){if(NR)return W0;NR=1;var e=Ht(),t=jn();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 w=c.children(v);if(!w.length){v!==f&&c.setEdge(f,v,{weight:0,minlen:h});return}var E=t.addBorderNode(c,"_bt"),S=t.addBorderNode(c,"_bb"),_=c.node(v);c.setParent(E,v),_.borderTop=E,c.setParent(S,v),_.borderBottom=S,e.forEach(w,function(C){i(c,f,h,p,m,g,C);var N=c.node(C),k=N.borderTop?N.borderTop:C,M=N.borderBottom?N.borderBottom:C,R=N.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 jG(){if(kR)return J0;kR=1;var e=Ht(),t=jn();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 OG(){if(TR)return ex;TR=1;var e=Ht();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 zG(){if(AR)return tx;AR=1;var e=Ht();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 DG(){if(RR)return nx;RR=1;var e=Ht();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 w=0;v>0;)v%2&&(w+=p[v+1]),v=v-1>>1,p[v]+=g.weight;m+=g.weight*w})),m}return nx}var rx,MR;function LG(){if(MR)return rx;MR=1;var e=Ht();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 qG(){if(jR)return ix;jR=1;var e=Ht();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 IG(){if(OR)return ax;OR=1;var e=Ht(),t=jn();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 w={vs:e.flatten(p,!0)};return g&&(w.barycenter=m/g,w.weight=g),w}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 BG(){if(zR)return ox;zR=1;var e=Ht(),t=LG(),n=qG(),i=IG();ox=o;function o(c,f,h,p){var m=c.children(f),g=c.node(f),v=g?g.borderLeft:void 0,w=g?g.borderRight:void 0,E={};v&&(m=e.filter(m,function(M){return M!==v&&M!==w}));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 _=n(S,h);s(_,E);var C=i(_,p);if(v&&(C.vs=e.flatten([v,C.vs,w],!0),c.predecessors(v).length)){var N=c.node(c.predecessors(v)[0]),k=c.node(c.predecessors(w)[0]);e.has(C,"barycenter")||(C.barycenter=0,C.weight=0),C.barycenter=(C.barycenter*C.weight+N.order+k.order)/(C.weight+2),C.weight+=2}return C}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 HG(){if(DR)return sx;DR=1;var e=Ht(),t=kr().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,w=f.edge(v,h),E=e.isUndefined(w)?0:w.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 UG(){if(LR)return lx;LR=1;var e=Ht();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 PG(){if(qR)return ux;qR=1;var e=Ht(),t=zG(),n=DG(),i=BG(),o=HG(),s=UG(),l=kr().Graph,c=jn();ux=f;function f(g){var v=c.maxRank(g),w=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 _=Number.POSITIVE_INFINITY,C,N=0,k=0;k<4;++N,++k){p(N%2?w:E,N%4>=2),S=c.buildLayerMatrix(g);var M=n(g,S);M<_&&(k=0,C=e.cloneDeep(S),_=M)}m(g,C)}function h(g,v,w){return e.map(v,function(E){return o(g,E,w)})}function p(g,v){var w=new l;e.forEach(g,function(E){var S=E.graph().root,_=i(E,S,w,v);e.forEach(_.vs,function(C,N){E.node(C).order=N}),s(E,w,_.vs)})}function m(g,v){e.forEach(v,function(w){e.forEach(w,function(E,S){g.node(E).order=S})})}return ux}var cx,IR;function VG(){if(IR)return cx;IR=1;var e=Ht(),t=kr().Graph,n=jn();cx={positionX:w,findType1Conflicts:i,findType2Conflicts:o,addConflict:l,hasConflict:c,verticalAlignment:f,horizontalCompaction:h,alignCoordinates:g,findSmallestWidthAlignment:m,balance:v};function i(_,C){var N={};function k(M,R){var O=0,I=0,P=M.length,K=e.last(R);return e.forEach(R,function(H,F){var X=s(_,H),L=X?_.node(X).order:P;(X||H===K)&&(e.forEach(R.slice(I,F+1),function(B){e.forEach(_.predecessors(B),function(z){var V=_.node(z),G=V.order;(G<O||L<G)&&!(V.dummy&&_.node(B).dummy)&&l(N,z,B)})}),I=F+1,O=L)}),R}return e.reduce(C,k),N}function o(_,C){var N={};function k(R,O,I,P,K){var H;e.forEach(e.range(O,I),function(F){H=R[F],_.node(H).dummy&&e.forEach(_.predecessors(H),function(X){var L=_.node(X);L.dummy&&(L.order<P||L.order>K)&&l(N,X,H)})})}function M(R,O){var I=-1,P,K=0;return e.forEach(O,function(H,F){if(_.node(H).dummy==="border"){var X=_.predecessors(H);X.length&&(P=_.node(X[0]).order,k(O,K,F,I,P),K=F,I=P)}k(O,K,O.length,P,R.length)}),O}return e.reduce(C,M),N}function s(_,C){if(_.node(C).dummy)return e.find(_.predecessors(C),function(N){return _.node(N).dummy})}function l(_,C,N){if(C>N){var k=C;C=N,N=k}var M=_[C];M||(_[C]=M={}),M[N]=!0}function c(_,C,N){if(C>N){var k=C;C=N,N=k}return e.has(_[C],N)}function f(_,C,N,k){var M={},R={},O={};return e.forEach(C,function(I){e.forEach(I,function(P,K){M[P]=P,R[P]=P,O[P]=K})}),e.forEach(C,function(I){var P=-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&&P<O[B]&&!c(N,K,B)&&(R[B]=K,R[K]=M[K]=M[B],P=O[B])}}})}),{root:M,align:R}}function h(_,C,N,k,M){var R={},O=p(_,C,N,M),I=M?"borderLeft":"borderRight";function P(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=_.node(F);X!==Number.POSITIVE_INFINITY&&L.borderType!==I&&(R[F]=Math.max(R[F],X))}return P(K,O.predecessors.bind(O)),P(H,O.successors.bind(O)),e.forEach(k,function(F){R[F]=R[N[F]]}),R}function p(_,C,N,k){var M=new t,R=_.graph(),O=E(R.nodesep,R.edgesep,k);return e.forEach(C,function(I){var P;e.forEach(I,function(K){var H=N[K];if(M.setNode(H),P){var F=N[P],X=M.edge(F,H);M.setEdge(F,H,Math.max(O(_,K,P),X||0))}P=K})}),M}function m(_,C){return e.minBy(e.values(C),function(N){var k=Number.NEGATIVE_INFINITY,M=Number.POSITIVE_INFINITY;return e.forIn(N,function(R,O){var I=S(_,O)/2;k=Math.max(R+I,k),M=Math.min(R-I,M)}),k-M})}function g(_,C){var N=e.values(C),k=e.min(N),M=e.max(N);e.forEach(["u","d"],function(R){e.forEach(["l","r"],function(O){var I=R+O,P=_[I],K;if(P!==C){var H=e.values(P);K=O==="l"?k-e.min(H):M-e.max(H),K&&(_[I]=e.mapValues(P,function(F){return F+K}))}})})}function v(_,C){return e.mapValues(_.ul,function(N,k){if(C)return _[C.toLowerCase()][k];var M=e.sortBy(e.map(_,k));return(M[1]+M[2])/2})}function w(_){var C=n.buildLayerMatrix(_),N=e.merge(i(_,C),o(_,C)),k={},M;e.forEach(["u","d"],function(O){M=O==="u"?C:e.values(C).reverse(),e.forEach(["l","r"],function(I){I==="r"&&(M=e.map(M,function(F){return e.values(F).reverse()}));var P=(O==="u"?_.predecessors:_.successors).bind(_),K=f(_,M,N,P),H=h(_,M,K.root,K.align,I==="r");I==="r"&&(H=e.mapValues(H,function(F){return-F})),k[O+I]=H})});var R=m(_,k);return g(k,R),v(k,_.graph().align)}function E(_,C,N){return function(k,M,R){var O=k.node(M),I=k.node(R),P=0,K;if(P+=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&&(P+=N?K:-K),K=0,P+=(O.dummy?C:_)/2,P+=(I.dummy?C:_)/2,P+=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&&(P+=N?K:-K),K=0,P}}function S(_,C){return _.node(C).width}return cx}var fx,BR;function FG(){if(BR)return fx;BR=1;var e=Ht(),t=jn(),n=VG().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 $G(){if(HR)return dx;HR=1;var e=Ht(),t=NG(),n=kG(),i=AG(),o=jn().normalizeRanks,s=RG(),l=jn().removeEmptyRanks,c=MG(),f=jG(),h=OG(),p=PG(),m=FG(),g=jn(),v=kr().Graph;dx=w;function w(Y,W){var Z=W&&W.debugTiming?g.time:g.notime;Z("layout",function(){var te=Z(" buildLayoutGraph",function(){return P(Y)});Z(" runLayout",function(){E(te,Z)}),Z(" updateInputGraph",function(){S(Y,te)})})}function E(Y,W){W(" makeSpaceForEdgeLabels",function(){K(Y)}),W(" removeSelfEdges",function(){Q(Y)}),W(" acyclic",function(){t.run(Y)}),W(" nestingGraph.run",function(){c.run(Y)}),W(" rank",function(){i(g.asNonCompoundGraph(Y))}),W(" injectEdgeLabelProxies",function(){H(Y)}),W(" removeEmptyRanks",function(){l(Y)}),W(" nestingGraph.cleanup",function(){c.cleanup(Y)}),W(" normalizeRanks",function(){o(Y)}),W(" assignRankMinMax",function(){F(Y)}),W(" removeEdgeLabelProxies",function(){X(Y)}),W(" normalize.run",function(){n.run(Y)}),W(" parentDummyChains",function(){s(Y)}),W(" addBorderSegments",function(){f(Y)}),W(" order",function(){p(Y)}),W(" insertSelfEdges",function(){j(Y)}),W(" adjustCoordinateSystem",function(){h.adjust(Y)}),W(" position",function(){m(Y)}),W(" positionSelfEdges",function(){D(Y)}),W(" removeBorderNodes",function(){G(Y)}),W(" normalize.undo",function(){n.undo(Y)}),W(" fixupEdgeLabelCoords",function(){z(Y)}),W(" undoCoordinateSystem",function(){h.undo(Y)}),W(" translateGraph",function(){L(Y)}),W(" assignNodeIntersects",function(){B(Y)}),W(" reversePoints",function(){V(Y)}),W(" acyclic.undo",function(){t.undo(Y)})}function S(Y,W){e.forEach(Y.nodes(),function(Z){var te=Y.node(Z),re=W.node(Z);te&&(te.x=re.x,te.y=re.y,W.children(Z).length&&(te.width=re.width,te.height=re.height))}),e.forEach(Y.edges(),function(Z){var te=Y.edge(Z),re=W.edge(Z);te.points=re.points,e.has(re,"x")&&(te.x=re.x,te.y=re.y)}),Y.graph().width=W.graph().width,Y.graph().height=W.graph().height}var _=["nodesep","edgesep","ranksep","marginx","marginy"],C={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},N=["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 P(Y){var W=new v({multigraph:!0,compound:!0}),Z=q(Y.graph());return W.setGraph(e.merge({},C,$(Z,_),e.pick(Z,N))),e.forEach(Y.nodes(),function(te){var re=q(Y.node(te));W.setNode(te,e.defaults($(re,k),M)),W.setParent(te,Y.parent(te))}),e.forEach(Y.edges(),function(te){var re=q(Y.edge(te));W.setEdge(te,e.merge({},O,$(re,R),e.pick(re,I)))}),W}function K(Y){var W=Y.graph();W.ranksep/=2,e.forEach(Y.edges(),function(Z){var te=Y.edge(Z);te.minlen*=2,te.labelpos.toLowerCase()!=="c"&&(W.rankdir==="TB"||W.rankdir==="BT"?te.width+=te.labeloffset:te.height+=te.labeloffset)})}function H(Y){e.forEach(Y.edges(),function(W){var Z=Y.edge(W);if(Z.width&&Z.height){var te=Y.node(W.v),re=Y.node(W.w),se={rank:(re.rank-te.rank)/2+te.rank,e:W};g.addDummyNode(Y,"edge-proxy",se,"_ep")}})}function F(Y){var W=0;e.forEach(Y.nodes(),function(Z){var te=Y.node(Z);te.borderTop&&(te.minRank=Y.node(te.borderTop).rank,te.maxRank=Y.node(te.borderBottom).rank,W=e.max(W,te.maxRank))}),Y.graph().maxRank=W}function X(Y){e.forEach(Y.nodes(),function(W){var Z=Y.node(W);Z.dummy==="edge-proxy"&&(Y.edge(Z.e).labelRank=Z.rank,Y.removeNode(W))})}function L(Y){var W=Number.POSITIVE_INFINITY,Z=0,te=Number.POSITIVE_INFINITY,re=0,se=Y.graph(),ge=se.marginx||0,be=se.marginy||0;function ve(Ee){var pe=Ee.x,Ne=Ee.y,Oe=Ee.width,Re=Ee.height;W=Math.min(W,pe-Oe/2),Z=Math.max(Z,pe+Oe/2),te=Math.min(te,Ne-Re/2),re=Math.max(re,Ne+Re/2)}e.forEach(Y.nodes(),function(Ee){ve(Y.node(Ee))}),e.forEach(Y.edges(),function(Ee){var pe=Y.edge(Ee);e.has(pe,"x")&&ve(pe)}),W-=ge,te-=be,e.forEach(Y.nodes(),function(Ee){var pe=Y.node(Ee);pe.x-=W,pe.y-=te}),e.forEach(Y.edges(),function(Ee){var pe=Y.edge(Ee);e.forEach(pe.points,function(Ne){Ne.x-=W,Ne.y-=te}),e.has(pe,"x")&&(pe.x-=W),e.has(pe,"y")&&(pe.y-=te)}),se.width=Z-W+ge,se.height=re-te+be}function B(Y){e.forEach(Y.edges(),function(W){var Z=Y.edge(W),te=Y.node(W.v),re=Y.node(W.w),se,ge;Z.points?(se=Z.points[0],ge=Z.points[Z.points.length-1]):(Z.points=[],se=re,ge=te),Z.points.unshift(g.intersectRect(te,se)),Z.points.push(g.intersectRect(re,ge))})}function z(Y){e.forEach(Y.edges(),function(W){var Z=Y.edge(W);if(e.has(Z,"x"))switch((Z.labelpos==="l"||Z.labelpos==="r")&&(Z.width-=Z.labeloffset),Z.labelpos){case"l":Z.x-=Z.width/2+Z.labeloffset;break;case"r":Z.x+=Z.width/2+Z.labeloffset;break}})}function V(Y){e.forEach(Y.edges(),function(W){var Z=Y.edge(W);Z.reversed&&Z.points.reverse()})}function G(Y){e.forEach(Y.nodes(),function(W){if(Y.children(W).length){var Z=Y.node(W),te=Y.node(Z.borderTop),re=Y.node(Z.borderBottom),se=Y.node(e.last(Z.borderLeft)),ge=Y.node(e.last(Z.borderRight));Z.width=Math.abs(ge.x-se.x),Z.height=Math.abs(re.y-te.y),Z.x=se.x+Z.width/2,Z.y=te.y+Z.height/2}}),e.forEach(Y.nodes(),function(W){Y.node(W).dummy==="border"&&Y.removeNode(W)})}function Q(Y){e.forEach(Y.edges(),function(W){if(W.v===W.w){var Z=Y.node(W.v);Z.selfEdges||(Z.selfEdges=[]),Z.selfEdges.push({e:W,label:Y.edge(W)}),Y.removeEdge(W)}})}function j(Y){var W=g.buildLayerMatrix(Y);e.forEach(W,function(Z){var te=0;e.forEach(Z,function(re,se){var ge=Y.node(re);ge.order=se+te,e.forEach(ge.selfEdges,function(be){g.addDummyNode(Y,"selfedge",{width:be.label.width,height:be.label.height,rank:ge.rank,order:se+ ++te,e:be.e,label:be.label},"_se")}),delete ge.selfEdges})})}function D(Y){e.forEach(Y.nodes(),function(W){var Z=Y.node(W);if(Z.dummy==="selfedge"){var te=Y.node(Z.e.v),re=te.x+te.width/2,se=te.y,ge=Z.x-re,be=te.height/2;Y.setEdge(Z.e,Z.label),Y.removeNode(W),Z.label.points=[{x:re+2*ge/3,y:se-be},{x:re+5*ge/6,y:se-be},{x:re+ge,y:se},{x:re+5*ge/6,y:se+be},{x:re+2*ge/3,y:se+be}],Z.label.x=Z.x,Z.label.y=Z.y}})}function $(Y,W){return e.mapValues(e.pick(Y,W),Number)}function q(Y){var W={};return e.forEach(Y,function(Z,te){W[te.toLowerCase()]=Z}),W}return dx}var hx,UR;function YG(){if(UR)return hx;UR=1;var e=Ht(),t=jn(),n=kr().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 GG(){return PR||(PR=1,px="0.8.5"),px}var mx,VR;function XG(){return VR||(VR=1,mx={graphlib:kr(),layout:$G(),debug:YG(),util:{time:jn().time,notime:jn().notime},version:GG()}),mx}var KG=XG();const Nf=Vl(KG),Hc=32,fl=260;function QG(e,t,n,i,o=!1){var N,k,M,R,O,I,P,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 $=((N=D.style)==null?void 0:N.height)||(((k=D.measured)==null?void 0:k.height)??100),q=Hc-$;p.set(D.id,q),B+=q,g.add(D.id)}else if(i==="methods"){const $=(l.get(D.id)||[]).map(Z=>s.get(Z)).filter(Z=>(Z==null?void 0:Z.type)==="module").sort((Z,te)=>Z.position.y-te.position.y),q=[];let Y=-1/0;for(const Z of $)Math.abs(Z.position.y-Y)>1&&(q.push([]),Y=Z.position.y),q[q.length-1].push(Z);let W=0;$.length>0;for(const Z of q){if(W!==0)for(const ge of Z)m.set(ge.id,W);let te=0,re=0;for(const ge of Z){const be=((M=ge.style)==null?void 0:M.height)||(((R=ge.measured)==null?void 0:R.height)??80);te=Math.max(te,be),n.has(ge.id)?(p.set(ge.id,Hc-be),re=Math.max(re,Hc)):re=Math.max(re,be)}const se=re-te;se!==0&&(W+=se)}W!==0&&(p.set(D.id,(p.get(D.id)||0)+W),B+=W)}B!==0&&p.set(X.id,B);const z=20,V=X.style,G=(V==null?void 0:V.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,fl);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,w=[];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),V=n.has(X.id),G=g.has(X.id);if(B||z||V||G){let Q=B?{...X.position,y:X.position.y+B}:X.position;const j=X.style;let D=j?{...j}:{};if(V){if(D={...D,height:Hc},X.type==="module"){const $=(j==null?void 0:j.width)??fl-24;D={...D,width:Math.min($,fl-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:$??fl+v*2}}else if(X.type==="layer"){const $=p.get(`__layerW__${X.id}`);D={...D,width:$??fl}}}L={...X,position:Q,...Object.keys(D).length>0?{style:D}:{}}}w.push(L)}if(o){const X=w.filter(L=>L.type==="serviceGroup"||L.type==="database");if(X.length>1){const L=new Set(X.map(V=>V.id)),B=new Nf.graphlib.Graph;B.setGraph({rankdir:"TB",nodesep:150,ranksep:200,marginx:60,marginy:60}),B.setDefaultEdgeLabel(()=>({}));for(const V of X){const G=V.style;B.setNode(V.id,{width:(G==null?void 0:G.width)??((O=V.measured)==null?void 0:O.width)??280,height:(G==null?void 0:G.height)??((I=V.measured)==null?void 0:I.height)??120})}const z=new Set;for(const V of t){const G=_(V.source),Q=_(V.target),j=G&&L.has(G)?G:L.has(V.source)?V.source:null,D=Q&&L.has(Q)?Q:L.has(V.target)?V.target:null;if(j&&D&&j!==D){const $=`${j}::${D}`;z.has($)||(z.add($),B.setEdge(j,D))}}Nf.layout(B);for(const V of w){if(!L.has(V.id))continue;const G=B.node(V.id);if(!G)continue;const Q=V.style,j=(Q==null?void 0:Q.width)??((P=V.measured)==null?void 0:P.width)??280,D=(Q==null?void 0:Q.height)??((K=V.measured)==null?void 0:K.height)??120;V.position={x:G.x-j/2,y:G.y-D/2}}}}const E=new Set(w.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 _(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 C=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}`,V=C.get(z);if(V){const G=((H=V.data)==null?void 0:H.dependencyCount)||0,Q=((F=X.data)==null?void 0:F.dependencyCount)||0;C.set(z,{...V,data:{...V.data,dependencyCount:G+Q}})}else{const G=_(L),Q=_(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"}:{};C.set(z,{...X,id:D?`promoted-${z}`:X.id,source:L,target:B,...$})}}return{nodes:w,edges:[...C.values()]}}const ZG={service:cF,layer:dF,serviceGroup:mF,database:bF,module:SF,method:CF},WG={dependency:_C,violation:_C,intraLayer:TF,database:RF};function JG({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:w,hasProgressBar:E,onEnterDiffMode:S,onExitDiffMode:_,highlightedNodeIds:C,savedCollapsedIds:N}){const[k,M]=T.useState(!1),[R,O]=T.useState(()=>typeof window>"u"?!0:localStorage.getItem("truecourse:animations")!=="off"),[I,P]=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}=Ya(),[z,V,G]=z5(e),[Q,j,D]=OV(t),{collapsedIds:$,toggle:q,expandAll:Y,collapseAll:W,isBulkAction:Z}=OF(s,f,e,l,N),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]),ge=T.useCallback(()=>{W(),te()},[W,te]);L.current=z;const be=T.useMemo(()=>{const he=new Map;for(const ye of e){const He=ye.parentId;He&&ye.type==="module"&&he.set(He,(he.get(He)||0)+1)}return he},[e]);T.useMemo(()=>{const he=Se=>Se===o||Se===p;let ye;f==="services"?ye=e.map(Se=>({...Se,selected:he(Se.id),data:{...Se.data,onExplain:i}})):ye=e.map(Se=>Se.type==="layer"&&Se.data.isContainer?{...Se,selected:he(Se.id),data:{...Se.data,isCollapsed:$.has(Se.id),onToggleCollapse:re,moduleCount:be.get(Se.id)||0}}:Se.type==="module"&&Se.data.isContainer?{...Se,selected:he(Se.id),data:{...Se.data,onExplain:i,isCollapsed:$.has(Se.id),onToggleCollapse:re}}:Se.type==="module"||Se.type==="method"?{...Se,selected:he(Se.id),data:{...Se.data,onExplain:i}}:{...Se,selected:he(Se.id)});let He=t.map(Se=>({...Se,data:{...Se.data,edgeStyle:I,hidden:K}}));if(f!=="services"){const Se=QG(ye,He,$,f,!0);ye=Se.nodes,He=Se.edges.map(Ue=>({...Ue,data:{...Ue.data,edgeStyle:I,hidden:K}}))}if(C&&C.size>0){const Se=new Set;for(const Ue of He)(C.has(Ue.source)||C.has(Ue.target))&&Se.add(Ue.id);He=He.map(Ue=>{var Fe;return{...Ue,data:{...Ue.data,dimmed:!Se.has(Ue.id),hidden:K?!Se.has(Ue.id):(Fe=Ue.data)==null?void 0:Fe.hidden}}})}V(ye),j(He)},[e,t,V,j,i,o,p,f,I,$,re,be,K,C]);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(()=>{C&&C.size>0?B({nodes:[...C].map(ye=>({id:ye})),padding:.3,duration:ve}):B({padding:.3,duration:ve})});return()=>cancelAnimationFrame(he)},[C,B,ve]),T.useEffect(()=>{if(!Z())return;const he=requestAnimationFrame(()=>{B({padding:.3,duration:ve})});return()=>cancelAnimationFrame(he)},[$,B,ve,Z]),T.useEffect(()=>{if(!p)return;const he=L.current.find(ye=>ye.id===p);he&&(V(ye=>ye.map(He=>({...He,selected:He.id===p}))),setTimeout(()=>{if(he.type==="serviceGroup"){const ye=L.current.filter(Se=>Se.parentId===he.id).map(Se=>Se.id),He=[he.id,...ye];B({nodes:He.map(Se=>({id:Se})),padding:.5,duration:ve})}else if(he.type==="module"||he.type==="method"){const ye=he.parentId;if(ye){const He=L.current.filter(Se=>Se.parentId===ye).map(Se=>Se.id);B({nodes:[{id:ye},...He.map(Se=>({id:Se}))],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,V]);const Ee=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]),pe=T.useCallback(()=>{y8(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 He=L.current.filter(Ue=>Ue.parentId===ye.id).map(Ue=>Ue.id),Se=[ye.id,...He];setTimeout(()=>{B({nodes:Se.map(Ue=>({id:Ue})),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(He=>{const Se=new Set;for(const Fe of He)(Fe.source===ye.id||Fe.target===ye.id)&&Se.add(Fe.id);const Ue=new Set(L.current.filter(Fe=>Fe.parentId===ye.id).map(Fe=>Fe.id));for(const Fe of He)(Ue.has(Fe.source)||Ue.has(Fe.target))&&Se.add(Fe.id);return He.map(Fe=>{var kt;return{...Fe,data:{...Fe.data,dimmed:!Se.has(Fe.id),hidden:K?!Se.has(Fe.id):(kt=Fe.data)==null?void 0:kt.hidden}}})})},[j,K]),Re=T.useCallback(()=>{j(he=>he.map(ye=>{var He,Se;return{...ye,data:{...ye.data,dimmed:(He=ye.data)!=null&&He.dimmed?!1:(Se=ye.data)==null?void 0:Se.dimmed,hidden:!!K}}}))},[j,K]),vt=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(jF,{level:f,onChange:h}),f!=="services"&&b.jsx("button",{onClick:()=>{$.size>0?se():ge()},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:()=>P(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:Re,onNodeDragStop:Ee,onPaneClick:vt,nodeTypes:ZG,edgeTypes:WG,nodesConnectable:!1,nodesDraggable:!F,elementsSelectable:!F,minZoom:.1,maxZoom:2,proOptions:{hideAttribution:!0},children:[b.jsx(L5,{variant:vi.Dots,gap:20,size:1}),b.jsx(rF,{nodeStrokeWidth:3,className:"!bg-card !border-border",maskColor:"rgba(0, 0, 0, 0.1)"}),b.jsx(U5,{onAutoLayout:pe,panMode:F,onTogglePanMode:()=>X(he=>!he)})]}),g&&!v&&!w&&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&&w&&!E&&b.jsxs("div",{className:"absolute 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(lr,{className:"h-3 w-3 animate-spin"}),"Scanning pending changes..."]}),g&&v&&!w&&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 eX(e){return b.jsx(r1,{children:b.jsx(JG,{...e})})}function tX(e){return Gn(e.defaultTagName??"div",e,e)}const nX=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 tX({defaultTagName:"span",props:Mb({className:bn(nX({variant:t}),e)},i),render:n,state:{slot:"badge",variant:t}})}const rX={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({violation: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 ${rX[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(Rn,{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(Rn,{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(Fa,{className:"h-3 w-3"}),"Fix Prompt"]}),b.jsx(Rn,{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 iX({data:e,selected:t}){var o,s;const n=((o=e.violations)==null?void 0:o.length)??0,i=(s=e.violations)==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(mt,{type:"target",position:Ce.Left,className:"!w-2 !h-2 !bg-primary !border-background"}),e.hasSourceEdge&&b.jsx(mt,{type:"source",position:Ce.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(Cr,{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.violations.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 aX({id:e,sourceX:t,sourceY:n,targetX:i,targetY:o,sourcePosition:s,targetPosition:l,data:c}){const[f,h,p]=os({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}`,w=`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:w,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:w,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(#${w})`}),(c==null?void 0:c.label)&&b.jsx(Xf,{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 oX={tableNode:iX},sX={crowsfoot:aX};function lX(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 Nf.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 Nf.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 uX({violations:e,isFullscreen:t}){const[n,i]=T.useState(!1),{zoom:o}=jV(),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(Cr,{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(Fa,{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 cX({schema:e,violations:t=[],isFullscreen:n}){const{initialNodes:i,edges:o}=T.useMemo(()=>{const p=new Set(e.relations.map(_=>_.sourceTable)),m=new Set(e.relations.map(_=>_.targetTable)),g=new Map;for(const _ of t)if(_.targetTable){const C=g.get(_.targetTable)||[];C.push({title:_.title,severity:_.severity}),g.set(_.targetTable,C)}const v=e.tables.map(_=>({id:_.name,type:"tableNode",data:{label:_.name,columns:_.columns,primaryKey:_.primaryKey,hasSourceEdge:p.has(_.name),hasTargetEdge:m.has(_.name),violations:g.get(_.name)},position:{x:0,y:0},sourcePosition:Ce.Right,targetPosition:Ce.Left})),w=e.relations.map((_,C)=>{const N=lX(_.relationType);return{id:`rel-${C}`,source:_.sourceTable,target:_.targetTable,type:"crowsfoot",data:{sourceCardinality:N.source,targetCardinality:N.target,label:_.foreignKeyColumn}}}),E=new Map;for(const _ of e.tables)E.set(_.name,28+_.columns.length*18+8);return{initialNodes:YR(v,w,E),edges:w}},[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(uX,{violations:s,isFullscreen:n}),b.jsx(O5,{nodes:l,onNodesChange:f,edges:o,nodeTypes:oX,edgeTypes:sX,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,violations:t,isFullscreen:n}){return b.jsx(r1,{children:b.jsx(cX,{schema:e,violations:t,isFullscreen:n})})}function fX({repoId:e,databaseId:t,violations: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=w=>{w.key==="Escape"&&g(!1)};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[m]),T.useEffect(()=>{l(!0),b8(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(El,{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(El,{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,violations:n,isFullscreen:!1})}),h==="list"&&b.jsx("div",{className:"flex-1 overflow-y-auto",children:i.tables.map(v=>{const w=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(w?null:v.name),children:[w?b.jsx(Fa,{className:"h-3 w-3 text-muted-foreground"}):b.jsx(Of,{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":""]})]}),w&&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,_)=>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,")"]})]},_))]})]})]},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(El,{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,violations:n,isFullscreen:!0})})]}),document.body)]})}function dX({violations:e,isLoading:t,repoId:n,selectedService:i,selectedServiceName:o,selectedDatabaseId:s,isDiffMode:l,diffResult:c,onLocateNode:f,selectedPath:h,nodeFilePathMap:p}){const[m,g]=T.useState(264),v=T.useRef(!1),w=T.useCallback(_=>{_.preventDefault(),v.current=!0;const C=_.clientY,N=m,k=R=>{if(!v.current)return;const O=C-R.clientY;g(Math.min(500,Math.max(120,N+O)))},M=()=>{v.current=!1,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",M)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",M)},[m]),E=T.useMemo(()=>{if(!l||!c)return null;const _=[];for(const k of c.newViolations)_.push({violation:{id:`new-${_.length}`,type:k.type,title:k.title,content:k.content,severity:k.severity,targetServiceId:k.targetServiceId??null,targetServiceName:k.targetServiceName,targetModuleId:k.targetModuleId??null,targetModuleName:k.targetModuleName,targetMethodId:k.targetMethodId??null,targetMethodName:k.targetMethodName,fixPrompt:k.fixPrompt,createdAt:new Date().toISOString()},diffStatus:"new"});for(const k of c.resolvedViolations||[])_.push({violation:k,diffStatus:"resolved"});const C={critical:0,high:1,medium:2,low:3,info:4},N={service:0,module:1,function:2,database:3};return _.sort((k,M)=>{const R=(k.diffStatus==="new"?0:1)-(M.diffStatus==="new"?0:1);if(R!==0)return R;const O=(C[k.violation.severity]??5)-(C[M.violation.severity]??5);if(O!==0)return O;const I=(N[k.violation.type]??9)-(N[M.violation.type]??9);return I!==0?I:new Date(M.violation.createdAt).getTime()-new Date(k.violation.createdAt).getTime()}),_},[l,c]),S=T.useMemo(()=>!h||!p?e:e.filter(_=>{const C=_.targetMethodId||_.targetModuleId||_.targetServiceId;if(!C)return!0;const N=p.get(C);if(!N||N.includes(h))return!0;const k=N.split("/");for(let M=k.length-1;M>=1;M--){const R=k.slice(M).join("/");if(h.startsWith(R+"/")||h===R)return!0}return!1}),[e,h,p]);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&&E!==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(Xc,{className:"h-3.5 w-3.5 shrink-0"}),"Baseline analysis has changed. Click Analyze to refresh."]}),E.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[b.jsx(Cr,{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:E.map(({violation:_,diffStatus:C})=>b.jsx($R,{violation:_,onLocateNode:f,isResolved:C==="resolved",diffStatus:C},_.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(lr,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):S.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[b.jsx(Cr,{className:"mb-3 h-8 w-8 text-muted-foreground"}),b.jsx("p",{className:"text-sm text-muted-foreground",children:h?"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:S.map(_=>b.jsx($R,{violation:_,onLocateNode:f},_.id))})]})}),s&&!l&&b.jsxs("div",{className:"relative flex-shrink-0 border-t border-border",style:{height:m},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:w}),b.jsx(fX,{repoId:n,databaseId:s,violations:e})]})]})})}const hX={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"},pX={deterministic:"bg-emerald-500/20 text-emerald-400 border-emerald-500/30",llm:"bg-violet-500/20 text-violet-400 border-violet-500/30"},mX={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"},gX={service:"Service",module:"Module",database:"Database"};function yX(){const[e,t]=T.useState([]),[n,i]=T.useState(!0),[o,s]=T.useState("all");T.useEffect(()=>{w8().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(El,{className:"h-3.5 w-3.5"})}];return n?b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsx(lr,{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 ${hX[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 ${mX[m.category]||""}`,children:gX[m.category]||m.category}),b.jsx("span",{className:`rounded border px-1.5 py-0.5 text-[10px] font-medium ${pX[m.type]||""}`,children:m.type==="deterministic"?"Deterministic":"LLM"})]})]},m.key))})]})}function vX(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 xX({repoId:e,selectedPath:t,onSelectPath:n}){const[i,o]=T.useState([]),[s,l]=T.useState(!0);T.useEffect(()=>{l(!0),v8(e).then(f=>o(f.files)).catch(()=>{}).finally(()=>l(!1))},[e]);const c=T.useMemo(()=>vX(i),[i]);return s?b.jsx("div",{className:"flex items-center justify-center py-12",children:b.jsx(lr,{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(Fa,{className:"h-3 w-3"}):b.jsx(Of,{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 bX(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const wX=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_X=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,SX={};function XR(e,t){return(SX.jsx?_X:wX).test(e)}const EX=/[ \t\n\f\r]/g;function CX(e){return typeof e=="object"?e.type==="text"?KR(e.value):!1:KR(e)}function KR(e){return e.replace(EX,"")===""}class iu{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}iu.prototype.normal={};iu.prototype.property={};iu.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 iu(n,i,t)}function ab(e){return e.toLowerCase()}class zn{constructor(t,n){this.attribute=n,this.property=t}}zn.prototype.attribute="";zn.prototype.booleanish=!1;zn.prototype.boolean=!1;zn.prototype.commaOrSpaceSeparated=!1;zn.prototype.commaSeparated=!1;zn.prototype.defined=!1;zn.prototype.mustUseProperty=!1;zn.prototype.number=!1;zn.prototype.overloadedBoolean=!1;zn.prototype.property="";zn.prototype.spaceSeparated=!1;zn.prototype.space=void 0;let NX=0;const Je=Za(),en=Za(),ob=Za(),xe=Za(),At=Za(),Vo=Za(),Pn=Za();function Za(){return 2**++NX}const sb=Object.freeze(Object.defineProperty({__proto__:null,boolean:Je,booleanish:en,commaOrSpaceSeparated:Pn,commaSeparated:Vo,number:xe,overloadedBoolean:ob,spaceSeparated:At},Symbol.toStringTag,{value:"Module"})),yx=Object.keys(sb);class _1 extends zn{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 ds(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 iu(t,n,e.space)}const $O=ds({properties:{ariaActiveDescendant:null,ariaAtomic:en,ariaAutoComplete:null,ariaBusy:en,ariaChecked:en,ariaColCount:xe,ariaColIndex:xe,ariaColSpan:xe,ariaControls:At,ariaCurrent:null,ariaDescribedBy:At,ariaDetails:null,ariaDisabled:en,ariaDropEffect:At,ariaErrorMessage:null,ariaExpanded:en,ariaFlowTo:At,ariaGrabbed:en,ariaHasPopup:null,ariaHidden:en,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:At,ariaLevel:xe,ariaLive:null,ariaModal:en,ariaMultiLine:en,ariaMultiSelectable:en,ariaOrientation:null,ariaOwns:At,ariaPlaceholder:null,ariaPosInSet:xe,ariaPressed:en,ariaReadOnly:en,ariaRelevant:null,ariaRequired:en,ariaRoleDescription:At,ariaRowCount:xe,ariaRowIndex:xe,ariaRowSpan:xe,ariaSelected:en,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 kX=ds({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Vo,acceptCharset:At,accessKey:At,action:null,allow:null,allowFullScreen:Je,allowPaymentRequest:Je,allowUserMedia:Je,alt:null,as:null,async:Je,autoCapitalize:null,autoComplete:At,autoFocus:Je,autoPlay:Je,blocking:At,capture:null,charSet:null,checked:Je,cite:null,className:At,cols:xe,colSpan:null,content:null,contentEditable:en,controls:Je,controlsList:At,coords:xe|Vo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Je,defer:Je,dir:null,dirName:null,disabled:Je,download:ob,draggable:en,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Je,formTarget:null,headers:At,height:xe,hidden:ob,high:xe,href:null,hrefLang:null,htmlFor:At,httpEquiv:At,id:null,imageSizes:null,imageSrcSet:null,inert:Je,inputMode:null,integrity:null,is:null,isMap:Je,itemId:null,itemProp:At,itemRef:At,itemScope:Je,itemType:At,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:At,placeholder:null,playsInline:Je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Je,referrerPolicy:null,rel:At,required:Je,reversed:Je,rows:xe,rowSpan:xe,sandbox:At,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:en,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:en,width:xe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:At,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:en,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}),TX=ds({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:Pn,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:At,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:Vo,g2:Vo,glyphName:Vo,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:Pn,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:At,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:xe,pointsAtY:xe,pointsAtZ:xe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pn,rev:Pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pn,requiredFeatures:Pn,requiredFonts:Pn,requiredFormats:Pn,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:Pn,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:Pn,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:Pn,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=ds({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=ds({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:GO}),QO=ds({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),AX={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"},RX=/[A-Z]/g,ZR=/-[a-z]/g,MX=/^data[-\w.:]+$/i;function jX(e,t){const n=ab(t);let i=t,o=zn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&MX.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(ZR,zX);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!ZR.test(s)){let l=s.replace(RX,OX);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}o=_1}return new o(i,t)}function OX(e){return"-"+e.toLowerCase()}function zX(e){return e.charAt(1).toUpperCase()}const DX=FO([$O,kX,XO,KO,QO],"html"),S1=FO([$O,TX,XO,KO,QO],"svg");function LX(e){return e.join(" ").trim()}var Do={},vx,WR;function qX(){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 w(S,_){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];_=_||{};var C=1,N=1;function k(L){var B=L.match(t);B&&(C+=B.length);var z=L.lastIndexOf(f);N=~z?L.length-z:N+L.length}function M(){var L={line:C,column:N};return function(B){return B.position=new R(L),P(),B}}function R(L){this.start=L,this.end={line:C,column:N},this.source=_.source}R.prototype.content=S;function O(L){var B=new Error(_.source+":"+C+":"+N+": "+L);if(B.reason=L,B.filename=_.source,B.line=C,B.column=N,B.source=S,!_.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 P(){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 N+=2,k(z),S=S.slice(B),N+=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),V=L({type:v,property:E(B[0].replace(e,m)),value:z?E(z[0].replace(e,m)):m});return I(l),V}}function X(){var L=[];K(L);for(var B;B=F();)B!==!1&&(L.push(B),K(L));return L}return P(),X()}function E(S){return S?S.replace(c,m):m}return vx=w,vx}var JR;function IX(){if(JR)return Do;JR=1;var e=Do&&Do.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Do,"__esModule",{value:!0}),Do.default=n;const t=e(qX());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 Do}var dl={},eM;function BX(){if(eM)return dl;eM=1,Object.defineProperty(dl,"__esModule",{value:!0}),dl.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 dl.camelCase=f,dl}var hl,tM;function HX(){if(tM)return hl;tM=1;var e=hl&&hl.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(IX()),n=BX();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,hl=i,hl}var UX=HX();const PX=Vl(UX),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 VX(e){const t=E1(e),n=ZO(e);if(t&&n)return{start:t,end:n}}function Tl(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=Tl(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,FX=new Map,$X=/[A-Z]/g,YX=new Set(["table","tbody","thead","tfoot","tr"]),GX=new Set(["td","th"]),JO="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function XX(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=nK(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=tK(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:DX,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 KX(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return QX(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return WX(e,t,n);if(t.type==="mdxjsEsm")return ZX(e,t);if(t.type==="root")return JX(e,t,n);if(t.type==="text")return eK(e,t)}function KX(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=rK(e,t);let c=k1(e,t);return YX.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!CX(f):!0})),tz(e,l,s,t),N1(l,c),e.ancestors.pop(),e.schema=i,e.create(t,s,l,n)}function QX(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)}Pl(e,t.position)}function ZX(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Pl(e,t.position)}function WX(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=iK(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 JX(e,t,n){const i={};return N1(i,k1(e,t)),e.create(t,e.Fragment,i,n)}function eK(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 tK(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 nK(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 rK(e,t){const n={};let i,o;for(o in t.properties)if(o!=="children"&&C1.call(t.properties,o)){const s=aK(e,o,t.properties[o]);if(s){const[l,c]=s;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&GX.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 iK(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 Pl(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 Pl(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:FX;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 aK(e,t,n){const i=jX(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?bX(n):LX(n)),i.property==="style"){let o=typeof n=="object"?n:oK(e,String(n));return e.stylePropertyNameCase==="css"&&(o=sK(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&i.space?AX[i.property]||i.property:i.attribute,n]}}function oK(e,t){try{return PX(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);Pl(e)}function Pl(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 sK(e){const t={};let n;for(n in e)C1.call(e,n)&&(t[lK(n)]=e[n]);return t}function lK(e){let t=e.replace($X,uK);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function uK(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"]},cK={};function fK(e,t){const n=cK,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(dK(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 dK(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 Fr(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 ir(e,t){return e.length>0?(Fr(e,e.length,0,t),e):t}const oM={}.hasOwnProperty;function hK(e){const t={};let n=-1;for(;++n<e.length;)pK(t,e[n]);return t}function pK(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];mK(o[l],Array.isArray(c)?c:c?[c]:[])}}}function mK(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);Fr(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 Fo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Hr=ha(/[A-Za-z]/),Fn=ha(/[\dA-Za-z]/),gK=ha(/[#-'*+\--9=?A-Z^-~]/);function ub(e){return e!==null&&(e<32||e===127)}const cb=ha(/\d/),yK=ha(/[\dA-Fa-f]/),vK=ha(/[!-/:-@[-`{-~]/);function Ke(e){return e!==null&&e<-2}function On(e){return e!==null&&(e<0||e===32)}function yt(e){return e===-2||e===-1||e===32}const xK=ha(new RegExp("\\p{P}|\\p{S}","u")),bK=ha(/\s/);function ha(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function hs(e){const t=[];let n=-1,i=0,o=0;for(;++n<e.length;){const s=e.charCodeAt(n);let l="";if(s===37&&Fn(e.charCodeAt(n+1))&&Fn(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 Rt(e,t,n,i){const o=i?i-1:Number.POSITIVE_INFINITY;let s=0;return l;function l(f){return yt(f)?(e.enter(n),c(f)):t(f)}function c(f){return yt(f)&&s++<o?(e.consume(f),c):(e.exit(n),t(f))}}const wK={tokenize:_K};function _K(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"),Rt(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 Ke(c)?(e.consume(c),e.exit("chunkText"),s):(e.consume(c),l)}}const SK={tokenize:EK},sM={tokenize:CK};function EK(e){const t=this,n=[];let i=0,o,s,l;return c;function c(N){if(i<n.length){const k=n[i];return t.containerState=k[1],e.attempt(k[0].continuation,f,h)(N)}return h(N)}function f(N){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&C();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}_(i);let O=k;for(;O<t.events.length;)t.events[O][1].end={...R},O++;return Fr(t.events,M+1,0,t.events.slice(k)),t.events.length=O,h(N)}return c(N)}function h(N){if(i===n.length){if(!o)return g(N);if(o.currentConstruct&&o.currentConstruct.concrete)return w(N);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(sM,p,m)(N)}function p(N){return o&&C(),_(i),g(N)}function m(N){return t.parser.lazy[t.now().line]=i!==n.length,l=t.now().offset,w(N)}function g(N){return t.containerState={},e.attempt(sM,v,w)(N)}function v(N){return i++,n.push([t.currentConstruct,t.containerState]),g(N)}function w(N){if(N===null){o&&C(),_(0),e.consume(N);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),E(N)}function E(N){if(N===null){S(e.exit("chunkFlow"),!0),_(0),e.consume(N);return}return Ke(N)?(e.consume(N),S(e.exit("chunkFlow")),i=0,t.interrupt=void 0,c):(e.consume(N),E)}function S(N,k){const M=t.sliceStream(N);if(k&&M.push(null),N.previous=s,s&&(s.next=N),s=N,o.defineSkip(N.start),o.write(M),t.parser.lazy[N.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,P,K;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(P){K=t.events[I][1].end;break}P=!0}for(_(i),R=O;R<t.events.length;)t.events[R][1].end={...K},R++;Fr(t.events,I+1,0,t.events.slice(O)),t.events.length=R}}function _(N){let k=n.length;for(;k-- >N;){const M=n[k];t.containerState=M[1],M[0].exit.call(t,e)}n.length=N}function C(){o.write([null]),s=void 0,o=void 0,t.containerState._closeFlow=void 0}}function CK(e,t,n){return Rt(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||On(e)||bK(e))return 1;if(xK(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:NK,tokenize:kK};function NK(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=ir(h,[["enter",e[i][1],t],["exit",e[i][1],t]])),h=ir(h,[["enter",o,t],["enter",l,t],["exit",l,t],["enter",s,t]]),h=ir(h,A1(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),h=ir(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=ir(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Fr(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 kK(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 TK={name:"autolink",tokenize:AK};function AK(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 Hr(v)?(e.consume(v),l):v===64?n(v):h(v)}function l(v){return v===43||v===45||v===46||Fn(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||Fn(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):gK(v)?(e.consume(v),h):n(v)}function p(v){return Fn(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||Fn(v))&&i++<63){const w=v===45?g:m;return e.consume(v),w}return n(v)}}const dd={partial:!0,tokenize:RK};function RK(e,t,n){return i;function i(s){return yt(s)?Rt(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Ke(s)?t(s):n(s)}}const az={continuation:{tokenize:jK},exit:OK,name:"blockQuote",tokenize:MK};function MK(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 yt(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function jK(e,t,n){const i=this;return o;function o(l){return yt(l)?Rt(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 OK(e){e.exit("blockQuote")}const oz={name:"characterEscape",tokenize:zK};function zK(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 vK(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const sz={name:"characterReference",tokenize:DK};function DK(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=Fn,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=yK,p):(e.enter("characterReferenceValue"),s=7,l=cb,p(m))}function p(m){if(m===59&&o){const g=e.exit("characterReferenceValue");return l===Fn&&!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:qK},fM={concrete:!0,name:"codeFenced",tokenize:LK};function LK(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"),yt(R)?Rt(e,m,"whitespace")(R):m(R))}function m(R){return R===null||Ke(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||Ke(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):yt(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Rt(e,v,"whitespace")(R)):R===96&&R===c?n(R):(e.consume(R),g)}function v(R){return R===null||Ke(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(R))}function w(R){return R===null||Ke(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===c?n(R):(e.consume(R),w)}function E(R){return e.attempt(o,k,S)(R)}function S(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),_}function _(R){return s>0&&yt(R)?Rt(e,C,"linePrefix",s+1)(R):C(R)}function C(R){return R===null||Ke(R)?e.check(cM,E,k)(R):(e.enter("codeFlowValue"),N(R))}function N(R){return R===null||Ke(R)?(e.exit("codeFlowValue"),C(R)):(e.consume(R),N)}function k(R){return e.exit("codeFenced"),t(R)}function M(R,O,I){let P=0;return K;function K(B){return R.enter("lineEnding"),R.consume(B),R.exit("lineEnding"),H}function H(B){return R.enter("codeFencedFence"),yt(B)?Rt(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?(P++,R.consume(B),X):P>=l?(R.exit("codeFencedFenceSequence"),yt(B)?Rt(R,L,"whitespace")(B):L(B)):I(B)}function L(B){return B===null||Ke(B)?(R.exit("codeFencedFence"),O(B)):I(B)}}}function qK(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:BK},IK={partial:!0,tokenize:HK};function BK(e,t,n){const i=this;return o;function o(h){return e.enter("codeIndented"),Rt(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):Ke(h)?e.attempt(IK,l,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Ke(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function HK(e,t,n){const i=this;return o;function o(l){return i.parser.lazy[i.now().line]?n(l):Ke(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):Rt(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):Ke(l)?o(l):n(l)}}const UK={name:"codeText",previous:VK,resolve:PK,tokenize:FK};function PK(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 VK(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function FK(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)):Ke(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||Ke(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 $K{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&&pl(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),pl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),pl(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);pl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);pl(this.left,n.reverse())}}}function pl(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 $K(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,YK(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 Fr(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function YK(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,w=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 _=c.slice(S[g],S[g+1]),C=s.pop();f.push([C,C+_.length-1]),e.splice(C,2,_)}for(f.reverse(),g=-1;++g<f.length;)h[w+f[g][0]]=w+f[g][1],w+=f[g][1]-f[g][0]-1;return h}const GK={resolve:KK,tokenize:QK},XK={partial:!0,tokenize:ZK};function KK(e){return lz(e),e}function QK(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):Ke(c)?e.check(XK,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 ZK(e,t,n){const i=this;return o;function o(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Rt(e,s,"linePrefix")}function s(l){if(l===null||Ke(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(_){return _===60?(e.enter(i),e.enter(o),e.enter(s),e.consume(_),e.exit(s),g):_===null||_===32||_===41||ub(_)?n(_):(e.enter(i),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),E(_))}function g(_){return _===62?(e.enter(s),e.consume(_),e.exit(s),e.exit(o),e.exit(i),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(c),g(_)):_===null||_===60||Ke(_)?n(_):(e.consume(_),_===92?w:v)}function w(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function E(_){return!p&&(_===null||_===41||On(_))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(i),t(_)):p<h&&_===40?(e.consume(_),p++,E):_===41?(e.consume(_),p--,E):_===null||_===32||_===40||ub(_)?n(_):(e.consume(_),_===92?S:E)}function S(_){return _===40||_===41||_===92?(e.consume(_),E):E(_)}}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):Ke(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||Ke(v)||c++>999?(e.exit("chunkString"),p(v)):(e.consume(v),f||(f=!yt(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):Ke(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Rt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===l||g===null||Ke(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 Al(e,t){let n;return i;function i(o){return Ke(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,i):yt(o)?Rt(e,i,n?"linePrefix":"lineSuffix")(o):t(o)}}const WK={name:"definition",tokenize:eQ},JK={partial:!0,tokenize:tQ};function eQ(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=Fo(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 On(v)?Al(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(JK,m,m)(v)}function m(v){return yt(v)?Rt(e,g,"whitespace")(v):g(v)}function g(v){return v===null||Ke(v)?(e.exit("definition"),i.parser.defined.push(o),t(v)):n(v)}}function tQ(e,t,n){return i;function i(c){return On(c)?Al(e,o)(c):n(c)}function o(c){return fz(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function s(c){return yt(c)?Rt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||Ke(c)?t(c):n(c)}}const nQ={name:"hardBreakEscape",tokenize:rQ};function rQ(e,t,n){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return Ke(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const iQ={name:"headingAtx",resolve:aQ,tokenize:oQ};function aQ(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"},Fr(e,i,n-i+1,[["enter",o,t],["enter",s,t],["exit",s,t],["exit",o,t]])),e}function oQ(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||On(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),f(p)):p===null||Ke(p)?(e.exit("atxHeading"),t(p)):yt(p)?Rt(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||On(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const sQ=["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"],lQ={concrete:!0,name:"htmlFlow",resolveTo:fQ,tokenize:dQ},uQ={partial:!0,tokenize:pQ},cQ={partial:!0,tokenize:hQ};function fQ(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 dQ(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):Hr(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,w):Hr(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 w(q){const Y="CDATA[";return q===Y.charCodeAt(c++)?(e.consume(q),c===Y.length?i.interrupt?t:F:w):n(q)}function E(q){return Hr(q)?(e.consume(q),l=String.fromCharCode(q),S):n(q)}function S(q){if(q===null||q===47||q===62||On(q)){const Y=q===47,W=l.toLowerCase();return!Y&&!s&&dM.includes(W)?(o=1,i.interrupt?t(q):F(q)):sQ.includes(l.toLowerCase())?(o=6,Y?(e.consume(q),_):i.interrupt?t(q):F(q)):(o=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(q):s?C(q):N(q))}return q===45||Fn(q)?(e.consume(q),l+=String.fromCharCode(q),S):n(q)}function _(q){return q===62?(e.consume(q),i.interrupt?t:F):n(q)}function C(q){return yt(q)?(e.consume(q),C):K(q)}function N(q){return q===47?(e.consume(q),K):q===58||q===95||Hr(q)?(e.consume(q),k):yt(q)?(e.consume(q),N):K(q)}function k(q){return q===45||q===46||q===58||q===95||Fn(q)?(e.consume(q),k):M(q)}function M(q){return q===61?(e.consume(q),R):yt(q)?(e.consume(q),M):N(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):yt(q)?(e.consume(q),R):I(q)}function O(q){return q===f?(e.consume(q),f=null,P):q===null||Ke(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||On(q)?M(q):(e.consume(q),I)}function P(q){return q===47||q===62||yt(q)?N(q):n(q)}function K(q){return q===62?(e.consume(q),H):n(q)}function H(q){return q===null||Ke(q)?F(q):yt(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),V):q===62&&o===4?(e.consume(q),D):q===63&&o===3?(e.consume(q),j):q===93&&o===5?(e.consume(q),Q):Ke(q)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(uQ,$,X)(q)):q===null||Ke(q)?(e.exit("htmlFlowData"),X(q)):(e.consume(q),F)}function X(q){return e.check(cQ,L,$)(q)}function L(q){return e.enter("lineEnding"),e.consume(q),e.exit("lineEnding"),B}function B(q){return q===null||Ke(q)?X(q):(e.enter("htmlFlowData"),F(q))}function z(q){return q===45?(e.consume(q),j):F(q)}function V(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 Hr(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||Ke(q)?(e.exit("htmlFlowData"),$(q)):(e.consume(q),D)}function $(q){return e.exit("htmlFlow"),t(q)}}function hQ(e,t,n){const i=this;return o;function o(l){return Ke(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 pQ(e,t,n){return i;function i(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(dd,t,n)}}const mQ={name:"htmlText",tokenize:gQ};function gQ(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),N):Hr(j)?(e.consume(j),I):n(j)}function h(j){return j===45?(e.consume(j),p):j===91?(e.consume(j),s=0,w):Hr(j)?(e.consume(j),C):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):Ke(j)?(l=m,V(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 w(j){const D="CDATA[";return j===D.charCodeAt(s++)?(e.consume(j),s===D.length?E:w):n(j)}function E(j){return j===null?n(j):j===93?(e.consume(j),S):Ke(j)?(l=E,V(j)):(e.consume(j),E)}function S(j){return j===93?(e.consume(j),_):E(j)}function _(j){return j===62?z(j):j===93?(e.consume(j),_):E(j)}function C(j){return j===null||j===62?z(j):Ke(j)?(l=C,V(j)):(e.consume(j),C)}function N(j){return j===null?n(j):j===63?(e.consume(j),k):Ke(j)?(l=N,V(j)):(e.consume(j),N)}function k(j){return j===62?z(j):N(j)}function M(j){return Hr(j)?(e.consume(j),R):n(j)}function R(j){return j===45||Fn(j)?(e.consume(j),R):O(j)}function O(j){return Ke(j)?(l=O,V(j)):yt(j)?(e.consume(j),O):z(j)}function I(j){return j===45||Fn(j)?(e.consume(j),I):j===47||j===62||On(j)?P(j):n(j)}function P(j){return j===47?(e.consume(j),z):j===58||j===95||Hr(j)?(e.consume(j),K):Ke(j)?(l=P,V(j)):yt(j)?(e.consume(j),P):z(j)}function K(j){return j===45||j===46||j===58||j===95||Fn(j)?(e.consume(j),K):H(j)}function H(j){return j===61?(e.consume(j),F):Ke(j)?(l=H,V(j)):yt(j)?(e.consume(j),H):P(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):Ke(j)?(l=F,V(j)):yt(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):Ke(j)?(l=X,V(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||On(j)?P(j):(e.consume(j),L)}function B(j){return j===47||j===62||On(j)?P(j):n(j)}function z(j){return j===62?(e.consume(j),e.exit("htmlTextData"),e.exit("htmlText"),t):n(j)}function V(j){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),G}function G(j){return yt(j)?Rt(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:bQ,resolveTo:wQ,tokenize:_Q},yQ={tokenize:SQ},vQ={tokenize:EQ},xQ={tokenize:CQ};function bQ(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&&Fr(e,0,e.length,n),e}function wQ(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=ir(c,e.slice(s+1,s+i+3)),c=ir(c,[["enter",p,t]]),c=ir(c,A1(t.parser.constructs.insideSpan.null,e.slice(s+i+4,l-3),t)),c=ir(c,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),c=ir(c,e.slice(l+1)),c=ir(c,[["exit",f,t]]),Fr(e,s,e.length,c),e}function _Q(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(Fo(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(yQ,p,l?p:m)(g):g===91?e.attempt(vQ,p,l?h:m)(g):l?p(g):m(g)}function h(g){return e.attempt(xQ,p,m)(g)}function p(g){return t(g)}function m(g){return s._balanced=!0,n(g)}}function SQ(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 On(m)?Al(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 On(m)?Al(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 On(m)?Al(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 EQ(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(Fo(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function CQ(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 NQ={name:"labelStartImage",resolveAll:R1.resolveAll,tokenize:kQ};function kQ(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 TQ={name:"labelStartLink",resolveAll:R1.resolveAll,tokenize:AQ};function AQ(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:RQ};function RQ(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Rt(e,t,"linePrefix")}}const rf={name:"thematicBreak",tokenize:MQ};function MQ(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||Ke(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===o?(e.consume(h),i++,f):(e.exit("thematicBreakSequence"),yt(h)?Rt(e,c,"whitespace")(h):c(h))}}const An={continuation:{tokenize:DQ},exit:qQ,name:"list",tokenize:zQ},jQ={partial:!0,tokenize:IQ},OQ={partial:!0,tokenize:LQ};function zQ(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 w=i.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!i.containerState.marker||v===i.containerState.marker:cb(v)){if(i.containerState.type||(i.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(rf,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(dd,i.interrupt?n:p,e.attempt(jQ,g,m))}function p(v){return i.containerState.initialBlankLine=!0,s++,g(v)}function m(v){return yt(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 DQ(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(dd,o,s);function o(c){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Rt(e,t,"listItemIndent",i.containerState.size+1)(c)}function s(c){return i.containerState.furtherBlankLines||!yt(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(OQ,t,l)(c))}function l(c){return i.containerState._closeFlow=!0,i.interrupt=void 0,Rt(e,e.attempt(An,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function LQ(e,t,n){const i=this;return Rt(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 qQ(e){e.exit(this.containerState.type)}function IQ(e,t,n){const i=this;return Rt(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!yt(s)&&l&&l[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const hM={name:"setextUnderline",resolveTo:BQ,tokenize:HQ};function BQ(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 HQ(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"),yt(h)?Rt(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Ke(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const UQ={tokenize:PQ};function PQ(e){const t=this,n=e.attempt(dd,i,e.attempt(this.parser.constructs.flowInitial,o,Rt(e,e.attempt(this.parser.constructs.flow,o,e.attempt(GK,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 VQ={resolveAll:hz()},FQ=dz("string"),$Q=dz("text");function dz(e){return{resolveAll:hz(e==="text"?YQ: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 YQ(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 GQ={42:An,43:An,45:An,48:An,49:An,50:An,51:An,52:An,53:An,54:An,55:An,56:An,57:An,62:az},XQ={91:WK},KQ={[-2]:bx,[-1]:bx,32:bx},QQ={35:iQ,42:rf,45:[hM,rf],60:lQ,61:hM,95:rf,96:fM,126:fM},ZQ={38:sz,92:oz},WQ={[-5]:wx,[-4]:wx,[-3]:wx,33:NQ,38:sz,42:fb,60:[TK,mQ],91:TQ,92:[nQ,oz],93:R1,95:fb,96:UK},JQ={null:[fb,VQ]},eZ={null:[42,95]},tZ={null:[]},nZ=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:eZ,contentInitial:XQ,disable:tZ,document:GQ,flow:QQ,flowInitial:KQ,insideSpan:JQ,string:ZQ,text:WQ},Symbol.toStringTag,{value:"Module"}));function rZ(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:C,enter:N,exit:k,interrupt:O(R,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:w,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=ir(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 aZ(v(H),F)}function v(H){return iZ(l,H)}function w(){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;)_(F.charCodeAt(i._bufferIndex));else _(F)}}function _(H){p=p(H)}function C(H){Ke(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 N(H,F){const X=F||{};return X.type=H,X.start=w(),h.events.push(["enter",X,h]),c.push(X),X}function k(H){const F=c.pop();return F.end=w(),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 V,G,Q,j;return Array.isArray(L)?$(L):"tokenize"in L?$([L]):D(L);function D(Z){return te;function te(re){const se=re!==null&&Z[re],ge=re!==null&&Z.null,be=[...Array.isArray(se)?se:se?[se]:[],...Array.isArray(ge)?ge:ge?[ge]:[]];return $(be)(re)}}function $(Z){return V=Z,G=0,Z.length===0?z:q(Z[G])}function q(Z){return te;function te(re){return j=P(),Q=Z,Z.partial||(h.currentConstruct=Z),Z.name&&h.parser.constructs.disable.null.includes(Z.name)?W():Z.tokenize.call(F?Object.assign(Object.create(h),F):h,f,Y,W)(re)}}function Y(Z){return H(Q,j),B}function W(Z){return j.restore(),++G<V.length?q(V[G]):z}}}function I(H,F){H.resolveAll&&!s.includes(H)&&s.push(H),H.resolve&&Fr(h.events,F,h.events.length-F,H.resolve(h.events.slice(F),h)),H.resolveTo&&(h.events=H.resolveTo(h.events,h))}function P(){const H=w(),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 iZ(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 aZ(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 oZ(e){const i={constructs:hK([nZ,...(e||{}).extensions||[]]),content:o(wK),defined:[],document:o(SK),flow:o(UQ),lazy:{},string:o(FQ),text:o($Q)};return i;function o(s){return l;function l(c){return rZ(i,s,c)}}}function sZ(e){for(;!lz(e););return e}const pM=/[\0\t\n\r]/g;function lZ(){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 uZ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function cZ(e){return e.replace(uZ,fZ)}function fZ(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 dZ(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),hZ(n)(sZ(oZ(n).document().write(lZ()(e,t,!0))))}function hZ(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(he),autolinkProtocol:P,autolinkEmail:P,atxHeading:s(Ne),blockQuote:s(ge),characterEscape:P,characterReference:P,codeFenced:s(be),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:s(be,l),codeText:s(ve,l),codeTextData:P,data:P,codeFlowValue:P,definition:s(Ee),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:s(pe),hardBreakEscape:s(Oe),hardBreakTrailing:s(Oe),htmlFlow:s(Re,l),htmlFlowData:P,htmlText:s(Re,l),htmlTextData:P,image:s(vt),label:l,link:s(he),listItem:s(He),listItemValue:g,listOrdered:s(ye,m),listUnordered:s(ye),paragraph:s(Se),reference:q,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:s(Ne),strong:s(Ue),thematicBreak:s(kt)},exit:{atxHeading:f(),atxHeadingSequence:M,autolink:f(),autolinkEmail:se,autolinkProtocol:re,blockQuote:f(),characterEscapeValue:K,characterReferenceMarkerHexadecimal:W,characterReferenceMarkerNumeric:W,characterReferenceValue:Z,characterReference:te,codeFenced:f(S),codeFencedFence:E,codeFencedFenceInfo:v,codeFencedFenceMeta:w,codeFlowValue:K,codeIndented:f(_),codeText:f(B),codeTextData:K,data:K,definition:f(),definitionDestinationString:k,definitionLabelString:C,definitionTitleString:N,emphasis:f(),hardBreakEscape:f(F),hardBreakTrailing:f(F),htmlFlow:f(X),htmlFlowData:K,htmlText:f(L),htmlTextData:K,image:f(V),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 me={type:"root",children:[]};const Ae={stack:[me],tokenStack:[],config:t,enter:c,exit:h,buffer:l,resume:p,data:n},Ve=[];let Ge=-1;for(;++Ge<ue.length;)if(ue[Ge][1].type==="listOrdered"||ue[Ge][1].type==="listUnordered")if(ue[Ge][0]==="enter")Ve.push(Ge);else{const Ut=Ve.pop();Ge=o(ue,Ut,Ge)}for(Ge=-1;++Ge<ue.length;){const Ut=t[ue[Ge][0]];pz.call(Ut,ue[Ge][1].type)&&Ut[ue[Ge][1].type].call(Object.assign({sliceSerialize:ue[Ge][2].sliceSerialize},Ae),ue[Ge][1])}if(Ae.tokenStack.length>0){const Ut=Ae.tokenStack[Ae.tokenStack.length-1];(Ut[1]||mM).call(Ae,void 0,Ut[0])}for(me.position={start:oa(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:oa(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},Ge=-1;++Ge<t.transforms.length;)me=t.transforms[Ge](me)||me;return me}function o(ue,me,Ae){let Ve=me-1,Ge=-1,Ut=!1,zt,ft,ut,Ft;for(;++Ve<=Ae;){const ct=ue[Ve];switch(ct[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ct[0]==="enter"?Ge++:Ge--,Ft=void 0;break}case"lineEndingBlank":{ct[0]==="enter"&&(zt&&!Ft&&!Ge&&!ut&&(ut=Ve),Ft=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ft=void 0}if(!Ge&&ct[0]==="enter"&&ct[1].type==="listItemPrefix"||Ge===-1&&ct[0]==="exit"&&(ct[1].type==="listUnordered"||ct[1].type==="listOrdered")){if(zt){let gn=Ve;for(ft=void 0;gn--;){const Xt=ue[gn];if(Xt[1].type==="lineEnding"||Xt[1].type==="lineEndingBlank"){if(Xt[0]==="exit")continue;ft&&(ue[ft][1].type="lineEndingBlank",Ut=!0),Xt[1].type="lineEnding",ft=gn}else if(!(Xt[1].type==="linePrefix"||Xt[1].type==="blockQuotePrefix"||Xt[1].type==="blockQuotePrefixWhitespace"||Xt[1].type==="blockQuoteMarker"||Xt[1].type==="listItemIndent"))break}ut&&(!ft||ut<ft)&&(zt._spread=!0),zt.end=Object.assign({},ft?ue[ft][1].start:ct[1].end),ue.splice(ft||Ve,0,["exit",zt,ct[2]]),Ve++,Ae++}if(ct[1].type==="listItemPrefix"){const gn={type:"listItem",_spread:!1,start:Object.assign({},ct[1].start),end:void 0};zt=gn,ue.splice(Ve,0,["enter",gn,ct[2]]),Ve++,Ae++,ut=void 0,Ft=!0}}}return ue[me][1]._spread=Ut,Ae}function s(ue,me){return Ae;function Ae(Ve){c.call(this,ue(Ve),Ve),me&&me.call(this,Ve)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(ue,me,Ae){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([me,Ae||void 0]),ue.position={start:oa(me.start),end:void 0}}function f(ue){return me;function me(Ae){ue&&ue.call(this,Ae),h.call(this,Ae)}}function h(ue,me){const Ae=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==ue.type&&(me?me.call(this,ue,Ve[0]):(Ve[1]||mM).call(this,ue,Ve[0]));else throw new Error("Cannot close `"+ue.type+"` ("+Tl({start:ue.start,end:ue.end})+"): it’s not open");Ae.position.end=oa(ue.end)}function p(){return fK(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function g(ue){if(this.data.expectingFirstListItemValue){const me=this.stack[this.stack.length-2];me.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ue=this.resume(),me=this.stack[this.stack.length-1];me.lang=ue}function w(){const ue=this.resume(),me=this.stack[this.stack.length-1];me.meta=ue}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ue=this.resume(),me=this.stack[this.stack.length-1];me.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ue=this.resume(),me=this.stack[this.stack.length-1];me.value=ue.replace(/(\r?\n|\r)$/g,"")}function C(ue){const me=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=me,Ae.identifier=Fo(this.sliceSerialize(ue)).toLowerCase()}function N(){const ue=this.resume(),me=this.stack[this.stack.length-1];me.title=ue}function k(){const ue=this.resume(),me=this.stack[this.stack.length-1];me.url=ue}function M(ue){const me=this.stack[this.stack.length-1];if(!me.depth){const Ae=this.sliceSerialize(ue).length;me.depth=Ae}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function O(ue){const me=this.stack[this.stack.length-1];me.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function P(ue){const Ae=this.stack[this.stack.length-1].children;let Ve=Ae[Ae.length-1];(!Ve||Ve.type!=="text")&&(Ve=Fe(),Ve.position={start:oa(ue.start),end:void 0},Ae.push(Ve)),this.stack.push(Ve)}function K(ue){const me=this.stack.pop();me.value+=this.sliceSerialize(ue),me.position.end=oa(ue.end)}function H(ue){const me=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ae=me.children[me.children.length-1];Ae.position.end=oa(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(me.type)&&(P.call(this,ue),K.call(this,ue))}function F(){this.data.atHardBreak=!0}function X(){const ue=this.resume(),me=this.stack[this.stack.length-1];me.value=ue}function L(){const ue=this.resume(),me=this.stack[this.stack.length-1];me.value=ue}function B(){const ue=this.resume(),me=this.stack[this.stack.length-1];me.value=ue}function z(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=me,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function V(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=me,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function G(ue){const me=this.sliceSerialize(ue),Ae=this.stack[this.stack.length-2];Ae.label=cZ(me),Ae.identifier=Fo(me).toLowerCase()}function Q(){const ue=this.stack[this.stack.length-1],me=this.resume(),Ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ae.type==="link"){const Ve=ue.children;Ae.children=Ve}else Ae.alt=me}function j(){const ue=this.resume(),me=this.stack[this.stack.length-1];me.url=ue}function D(){const ue=this.resume(),me=this.stack[this.stack.length-1];me.title=ue}function $(){this.data.inReference=void 0}function q(){this.data.referenceType="collapsed"}function Y(ue){const me=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=me,Ae.identifier=Fo(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function W(ue){this.data.characterReferenceType=ue.type}function Z(ue){const me=this.sliceSerialize(ue),Ae=this.data.characterReferenceType;let Ve;Ae?(Ve=iz(me,Ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=T1(me);const Ge=this.stack[this.stack.length-1];Ge.value+=Ve}function te(ue){const me=this.stack.pop();me.position.end=oa(ue.end)}function re(ue){K.call(this,ue);const me=this.stack[this.stack.length-1];me.url=this.sliceSerialize(ue)}function se(ue){K.call(this,ue);const me=this.stack[this.stack.length-1];me.url="mailto:"+this.sliceSerialize(ue)}function ge(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function ve(){return{type:"inlineCode",value:""}}function Ee(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function pe(){return{type:"emphasis",children:[]}}function Ne(){return{type:"heading",depth:0,children:[]}}function Oe(){return{type:"break"}}function Re(){return{type:"html",value:""}}function vt(){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 He(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function Se(){return{type:"paragraph",children:[]}}function Ue(){return{type:"strong",children:[]}}function Fe(){return{type:"text",value:""}}function kt(){return{type:"thematicBreak"}}}function oa(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):pZ(e,i)}}function pZ(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+"` ("+Tl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Tl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Tl({start:t.start,end:t.end})+") is still open")}function mZ(e){const t=this;t.parser=n;function n(i){return dZ(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function gZ(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 yZ(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
377
|
+
`}]}function vZ(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 xZ(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bZ(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wZ(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),o=hs(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 _Z(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 SZ(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 EZ(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return gz(e,t);const o={src:hs(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 CZ(e,t){const n={src:hs(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 NZ(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 kZ(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return gz(e,t);const o={href:hs(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 TZ(e,t){const n={href:hs(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 AZ(e,t,n){const i=e.all(t),o=n?RZ(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 RZ(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 MZ(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 jZ(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function OZ(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function zZ(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DZ(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 LZ(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 w={type:"element",tagName:s,properties:g,children:[]};m&&(w.children=e.all(m),e.patch(m,w),w=e.applyData(m,w)),h.push(w)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function qZ(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 IZ(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 BZ(e,t){const n={type:"text",value:IZ(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function HZ(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const UZ={blockquote:gZ,break:yZ,code:vZ,delete:xZ,emphasis:bZ,footnoteReference:wZ,heading:_Z,html:SZ,imageReference:EZ,image:CZ,inlineCode:NZ,linkReference:kZ,link:TZ,listItem:AZ,list:MZ,paragraph:jZ,root:OZ,strong:zZ,table:DZ,tableCell:qZ,tableRow:LZ,text:BZ,thematicBreak:HZ,toml:Uc,yaml:Uc,definition:Uc,footnoteDefinition:Uc};function Uc(){}const vz=-1,hd=0,Rl=1,kf=2,M1=3,j1=4,O1=5,z1=6,xz=7,bz=8,xM=typeof self=="object"?self:globalThis,PZ=(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 hd:case vz:return n(l,o);case Rl:{const c=n([],o);for(const f of l)c.push(i(f));return c}case kf:{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=>PZ(new Map,e)(0),Lo="",{toString:VZ}={},{keys:FZ}=Object,ml=e=>{const t=typeof e;if(t!=="object"||!e)return[hd,t];const n=VZ.call(e).slice(8,-1);switch(n){case"Array":return[Rl,Lo];case"Object":return[kf,Lo];case"Date":return[M1,Lo];case"RegExp":return[j1,Lo];case"Map":return[O1,Lo];case"Set":return[z1,Lo];case"DataView":return[Rl,n]}return n.includes("Array")?[Rl,n]:n.includes("Error")?[xz,n]:[kf,n]},Pc=([e,t])=>e===hd&&(t==="function"||t==="symbol"),$Z=(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]=ml(l);switch(c){case hd:{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 Rl:{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 kf:{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 FZ(l))(e||!Pc(ml(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||!(Pc(ml(g))||Pc(ml(v))))&&p.push([s(g),s(v)]);return m}case z1:{const p=[],m=o([c,p],l);for(const g of l)(e||!Pc(ml(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 $Z(!(t||n),!!t,new Map,i)(e),i},Tf=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 YZ(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 GZ(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function XZ(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||YZ,i=e.options.footnoteBackLabel||GZ,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=hs(m.toLowerCase());let v=0;const w=[],E=e.footnoteCounts.get(m);for(;E!==void 0&&++v<=E;){w.length>0&&w.push({type:"text",value:" "});let C=typeof n=="string"?n:n(f,v);typeof C=="string"&&(C={type:"text",value:C}),w.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(C)?C:[C]})}const S=p[p.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const C=S.children[S.children.length-1];C&&C.type==="text"?C.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...w)}else p.push(...w);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+g},children:e.wrap(p,!0)};e.patch(h,_),c.push(_)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Tf(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 WZ;if(typeof e=="function")return pd(e);if(typeof e=="object")return Array.isArray(e)?KZ(e):QZ(e);if(typeof e=="string")return ZZ(e);throw new Error("Expected function, string, or object as test")});function KZ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=wz(e[n]);return pd(i);function i(...o){let s=-1;for(;++s<t.length;)if(t[s].apply(this,o))return!0;return!1}}function QZ(e){const t=e;return pd(n);function n(i){const o=i;let s;for(s in e)if(o[s]!==t[s])return!1;return!0}}function ZZ(e){return pd(t);function t(n){return n&&n.type===e}}function pd(e){return t;function t(n,i,o){return!!(JZ(n)&&e.call(this,n,typeof i=="number"?i:void 0,o||void 0))}}function WZ(){return!0}function JZ(e){return e!==null&&typeof e=="object"&&"type"in e}const _z=[],eW=!0,_M=!1,tW="skip";function nW(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,w,E,S;if((!t||s(f,h,p[p.length-1]||void 0))&&(v=rW(n(f,p)),v[0]===_M))return v;if("children"in f&&f.children){const _=f;if(_.children&&v[0]!==tW)for(E=(i?_.children.length:-1)+l,S=p.concat(_);E>-1&&E<_.children.length;){const C=_.children[E];if(w=c(C,E,S)(),w[0]===_M)return w;E=typeof w[1]=="number"?w[1]:E+l}}return v}}}function rW(e){return Array.isArray(e)?e:typeof e=="number"?[eW,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),nW(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,iW={};function aW(e,t){const n=t||iW,i=new Map,o=new Map,s=new Map,l={...UZ,...n.handlers},c={all:h,applyData:sW,definitionById:i,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:l,one:f,options:n,patch:oW,wrap:uW};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,_=Tf(S);return _.children=c.all(p),_}return Tf(p)}return(c.options.unknownHandler||lW)(c,p,m)}function h(p){const m=[];if("children"in p){const g=p.children;let v=-1;for(;++v<g.length;){const w=c.one(g[v],p);if(w){if(v&&g[v-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=SM(w.value)),!Array.isArray(w)&&w.type==="element")){const E=w.children[0];E&&E.type==="text"&&(E.value=SM(E.value))}Array.isArray(w)?m.push(...w):m.push(w)}}}return m}}function oW(e,t){e.position&&(t.position=VX(e))}function sW(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,Tf(s)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function lW(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 uW(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=aW(e,t),i=n.one(e,void 0),o=XZ(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 cW(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 fW(){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,w,E=arguments[0],S=1,_=arguments.length,C=!1;for(typeof E=="boolean"&&(C=E,E=arguments[1]||{},S=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});S<_;++S)if(h=arguments[S],h!=null)for(p in h)m=c(E,p),g=c(h,p),E!==g&&(C&&g&&(s(g)||(v=o(g)))?(v?(v=!1,w=m&&o(m)?m:[]):w=m&&s(m)?m:{},l(E,{name:p,newValue:f(C,w,g)})):typeof g<"u"&&l(E,{name:p,newValue:g}));return E},_x}var dW=fW();const Sx=Vl(dW);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 hW(){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?pW(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 pW(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 Ir={basename:mW,dirname:gW,extname:yW,join:vW,sep:"/"};function mW(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');au(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 gW(e){if(au(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 yW(e){au(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 vW(...e){let t=-1,n;for(;++t<e.length;)au(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":xW(n)}function xW(e){au(e);const t=e.codePointAt(0)===47;let n=bW(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function bW(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 au(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const wW={cwd:_W};function _W(){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 SW(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 EW(e)}function EW(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"||CW(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":wW.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"?Ir.basename(this.path):void 0}set basename(t){Nx(t,"basename"),Cx(t,"basename"),this.path=Ir.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ir.dirname(this.path):void 0}set dirname(t){kM(this.basename,"dirname"),this.path=Ir.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ir.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=Ir.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){pb(t)&&(t=SW(t)),Nx(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ir.basename(this.path,this.extname):void 0}set stem(t){Nx(t,"stem"),Cx(t,"stem"),this.path=Ir.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(Ir.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ir.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 CW(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const NW=(function(e){const i=this.constructor.prototype,o=i[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),kW={}.hasOwnProperty;class D1 extends NW{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=hW()}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):kW.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=Vc(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=Vc(t),f=i.parse(c);i.run(f,c,function(p,m,g){if(p||!m||!g)return h(p);const v=m,w=i.stringify(v,g);RW(w)?g.value=w:g.result=w,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=Vc(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=Vc(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,...w]=p;const E=i[g][1];hb(E)&&hb(v)&&(v=Sx(!0,E,v)),i[g]=[h,v,...w]}}}}const TW=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 Vc(e){return AW(e)?e:new Ez(e)}function AW(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function RW(e){return typeof e=="string"||MW(e)}function MW(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const jW="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",RM=[],MM={allowDangerousHtml:!0},OW=/^(https?|ircs?|mailto|xmpp)$/i,zW=[{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 DW(e){const t=LW(e),n=qW(e);return IW(t.runSync(t.parse(n),n),e)}function LW(e){const t=e.rehypePlugins||RM,n=e.remarkPlugins||RM,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...MM}:MM;return TW().use(mZ).use(n).use(cW,i).use(t)}function qW(e){const t=e.children||"",n=new Ez;return typeof t=="string"&&(n.value=t),n}function IW(e,t){const n=t.allowedElements,i=t.allowElement,o=t.components,s=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||BW;for(const p of zW)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+jW+p.id,void 0);return Sz(e,h),XX(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 w=p.properties[v],E=xx[v];(E===null||E.includes(p.tagName))&&(p.properties[v]=f(String(w||""),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 BW(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||OW.test(e.slice(0,t))?e:""}function HW({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(DW,{children:e.content})})})}function UW({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 PW(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(C=>{if(!C.trim()||i)return;const N={id:g(),role:"user",content:C,timestamp:new Date},k=g(),M={id:k,role:"assistant",content:"",timestamp:new Date};n(R=>[...R,N,M]),o(!0),h.current=i2(e,C,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]),w=T.useCallback((C,N,k,M)=>{if(i)return;const O=`Explain the "${N}" ${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},P=g(),K={id:P,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===P?{...X,content:X.content+H}:X))},H=>{H&&(p.current=H),o(!1)},H=>{n(F=>F.map(X=>X.id===P?{...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 C=await E8(e);l(C)}catch{}},[e]),_=T.useCallback(async C=>{if(!i){f(!0);try{const N=await C8(e,C);p.current=C,n(N.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:w,newConversation:E,fetchConversations:S,loadConversation:_}}function VW({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}=PW(e),g=T.useRef(null),v=T.useRef(null),[w,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 _=M=>{c(M)},C=()=>{p(),E(!0)},N=M=>{m(M),E(!1)},k=()=>{h(),E(!1)};return w?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:()=>N(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:C,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(lr,{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(rs,{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(HW,{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(lr,{className:"h-3 w-3 animate-spin"}),"Thinking..."]})})})()]})}),b.jsx(UW,{onSend:_,disabled:o})]})}const FW={api:"Routes & Controllers",service:"Business Logic",data:"Database & ORM",external:"HTTP Clients"};function $W({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,_)=>{const C=new Set(S);return C.has(_)?C.delete(_):C.add(_),C},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),w=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))})]}),w&&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"}),FW[S]||S]},S))})]})]})]})}function YW(e,t,n="services",i){const[o,s]=T.useState([]),[l,c]=T.useState([]),[f,h]=T.useState(void 0),[p,m]=T.useState(!0),[g,v]=T.useState(null),w=T.useCallback(async()=>{if(e){m(!0),v(null);try{const E=await g8(e,{branch:t,level:n,analysisId:i});if(n==="modules"||n==="methods"){const S=E.nodes.map(C=>C.type==="databaseNode"?{id:C.id,type:"database",position:C.position,data:{label:C.data.label,databaseType:C.data.databaseType||C.data.serviceType,tableCount:C.data.tableCount??C.data.fileCount??0,connectedServices:C.data.connectedServices||[],framework:C.data.framework}}:C.type==="methodNode"?{id:C.id,type:"method",position:C.position,parentId:C.parentId,extent:C.extent,style:C.style,data:{...C.data,filePath:C.data.rootPath||""}}:C.type==="moduleNode"?{id:C.id,type:"module",position:C.position,parentId:C.parentId,extent:C.extent,style:C.style,data:{label:C.data.label,moduleKind:C.data.moduleKind||C.data.serviceType||"standalone",methodCount:C.data.methodCount??C.data.fileCount??0,propertyCount:C.data.propertyCount,importCount:C.data.importCount,exportCount:C.data.exportCount,superClass:C.data.superClass,layerColor:C.data.layerColor||"#6b7280",isDead:C.data.isDead||!1,isContainer:C.data.isContainer||!1,violations:C.data.violations,filePath:C.data.rootPath||""}}:C.type==="layerNode"?{id:C.id,type:"layer",position:C.position,parentId:C.parentId,extent:C.extent,style:C.style,data:{label:C.data.label,layer:C.data.label,fileCount:C.data.fileCount||0,layerColor:C.data.layerColor||"#6b7280",fileNames:C.data.fileNames||[],filePaths:C.data.filePaths||[],isContainer:C.data.isContainer||!1,violations:C.data.violations||[]}}:{id:C.id,type:"serviceGroup",position:C.position,style:C.style,data:{label:C.data.label,description:C.data.description,serviceType:C.data.serviceType||"unknown",framework:C.data.framework,fileCount:C.data.fileCount||0,layers:C.data.layers||[],rootPath:C.data.rootPath||"",violations:C.data.violations||[]}}),_=E.edges.map(C=>({id:C.id,source:C.source,target:C.target,sourceHandle:C.sourceHandle,targetHandle:C.targetHandle,type:C.data.dependencyType==="database"?"database":"intraLayer",data:{label:"",dependencyCount:C.data.dependencyCount||0,hasHttpCalls:C.data.dependencyType==="http",isViolation:C.data.isViolation||!1,violationReason:C.data.violationReason}}));s(S),c(_),h(E.collapsedIds)}else{const S=E.nodes.map(C=>C.type==="databaseNode"?{id:C.id,type:"database",position:C.position,data:{label:C.data.label,databaseType:C.data.databaseType||C.data.serviceType,tableCount:C.data.tableCount??C.data.fileCount??0,connectedServices:C.data.connectedServices||[],framework:C.data.framework}}:{id:C.id,type:"service",position:C.position,data:{label:C.data.label,description:C.data.description,serviceInfo:{type:C.data.serviceType||"unknown",framework:C.data.framework||null,fileCount:C.data.fileCount||0,layers:(C.data.layers||[]).map(N=>({layer:N,confidence:1,evidence:[]})),rootPath:C.data.rootPath??""},violationCount:0,hasHighSeverity:!1}}),_=E.edges.map(C=>({id:C.id,source:C.source,target:C.target,sourceHandle:C.sourceHandle,targetHandle:C.targetHandle,type:C.data.dependencyType==="database"?"database":"dependency",data:{label:C.data.dependencyType==="http"?`${C.data.dependencyCount||0} HTTP call${(C.data.dependencyCount||0)!==1?"s":""}`:C.data.dependencyType==="database"?"":`${C.data.dependencyCount||0} import${(C.data.dependencyCount||0)!==1?"s":""}`,dependencyCount:C.data.dependencyCount||0,hasHttpCalls:C.data.dependencyType==="http"}}));s(S),c(_),h(E.collapsedIds)}}catch(E){v(E instanceof Error?E.message:"Failed to fetch graph")}finally{m(!1)}}},[e,t,n,i]);return T.useEffect(()=>{w()},[w]),{nodes:o,edges:l,savedCollapsedIds:f,isLoading:p,error:g,refetch:w,setNodes:s,setEdges:c}}const $r=Object.create(null);$r.open="0";$r.close="1";$r.ping="2";$r.pong="3";$r.message="4";$r.upgrade="5";$r.noop="6";const af=Object.create(null);Object.keys($r).forEach(e=>{af[$r[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($r[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 GW(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+/",Sl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<zM.length;e++)Sl[zM.charCodeAt(e)]=e;const XW=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=Sl[e.charCodeAt(i)],l=Sl[e.charCodeAt(i+1)],c=Sl[e.charCodeAt(i+2)],f=Sl[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},KW=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:QW(e.substring(1),t)}:af[n]?e.length>1?{type:af[n],data:e.substring(1)}:{type:af[n]}:mb},QW=(e,t)=>{if(KW){const n=XW(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="",ZW=(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))})})},WW=(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 JW(){return new TransformStream({transform(e,t){GW(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 Fc(e){return e.reduce((t,n)=>t+n.length,0)}function $c(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 eJ(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(Fc(n)<1)break;const f=$c(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(Fc(n)<2)break;const f=$c(n,2);o=new DataView(f.buffer,f.byteOffset,f.length).getUint16(0),i=3}else if(i===2){if(Fc(n)<8)break;const f=$c(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(Fc(n)<o)break;const f=$c(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 tn(e){if(e)return tJ(e)}function tJ(e){for(var t in tn.prototype)e[t]=tn.prototype[t];return e}tn.prototype.on=tn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};tn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};tn.prototype.off=tn.prototype.removeListener=tn.prototype.removeAllListeners=tn.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};tn.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};tn.prototype.emitReserved=tn.prototype.emit;tn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};tn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const md=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ar=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),nJ="arraybuffer";function Mz(e,...t){return t.reduce((n,i)=>(e.hasOwnProperty(i)&&(n[i]=e[i]),n),{})}const rJ=ar.setTimeout,iJ=ar.clearTimeout;function gd(e,t){t.useNativeTimers?(e.setTimeoutFn=rJ.bind(ar),e.clearTimeoutFn=iJ.bind(ar)):(e.setTimeoutFn=ar.setTimeout.bind(ar),e.clearTimeoutFn=ar.clearTimeout.bind(ar))}const aJ=1.33;function oJ(e){return typeof e=="string"?sJ(e):Math.ceil((e.byteLength||e.size)*aJ)}function sJ(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 lJ(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function uJ(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 cJ extends Error{constructor(t,n,i){super(t),this.description=n,this.context=i,this.type="TransportError"}}class I1 extends tn{constructor(t){super(),this.writable=!1,gd(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 cJ(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=lJ(t);return n.length?"?"+n:""}}class fJ 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)};WW(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,ZW(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 dJ=Oz;function hJ(){}class pJ extends fJ{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 Vr extends tn{constructor(t,n,i){super(),this.createRequest=t,gd(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=Vr.requestsCount++,Vr.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=hJ,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Vr.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()}}Vr.requestsCount=0;Vr.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",DM);else if(typeof addEventListener=="function"){const e="onpagehide"in ar?"pagehide":"unload";addEventListener(e,DM,!1)}}function DM(){for(let e in Vr.requests)Vr.requests.hasOwnProperty(e)&&Vr.requests[e].abort()}const mJ=(function(){const e=zz({xdomain:!1});return e&&e.responseType!==null})();class gJ extends pJ{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=mJ&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Vr(zz,this.uri(),t)}}function zz(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||dJ))return new XMLHttpRequest}catch{}if(!t)try{return new ar[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Dz=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class yJ 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&&md(()=>{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=ar.WebSocket||ar.MozWebSocket;class vJ extends yJ{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 xJ 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=eJ(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(n).getReader(),o=JW();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&&md(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const bJ={websocket:vJ,webtransport:xJ,polling:gJ},wJ=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,_J=["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=wJ.exec(e||""),s={},l=14;for(;l--;)s[_J[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=SJ(s,s.path),s.queryKey=EJ(s,s.query),s}function SJ(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 EJ(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",of=[];yb&&addEventListener("offline",()=>{of.forEach(e=>e())},!1);class ca extends tn{constructor(t,n){if(super(),this.binaryType=nJ,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);gd(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=uJ(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"})},of.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&&ca.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",ca.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+=oJ(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,md(()=>{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(ca.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=of.indexOf(this._offlineEventListener);i!==-1&&of.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ca.protocol=Rz;class CJ extends ca{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;ca.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;ca.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 NJ=class extends CJ{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=>bJ[o]).filter(o=>!!o)),super(t,i)}};function kJ(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 TJ=typeof ArrayBuffer=="function",AJ=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Lz=Object.prototype.toString,RJ=typeof Blob=="function"||typeof Blob<"u"&&Lz.call(Blob)==="[object BlobConstructor]",MJ=typeof File=="function"||typeof File<"u"&&Lz.call(File)==="[object FileConstructor]";function B1(e){return TJ&&(e instanceof ArrayBuffer||AJ(e))||RJ&&e instanceof Blob||MJ&&e instanceof File}function sf(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,i=e.length;n<i;n++)if(sf(e[n]))return!0;return!1}if(B1(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return sf(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&sf(e[n]))return!0;return!1}function jJ(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 OJ(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 zJ=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var lt;(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"})(lt||(lt={}));class DJ{constructor(t){this.replacer=t}encode(t){return(t.type===lt.EVENT||t.type===lt.ACK)&&sf(t)?this.encodeAsBinary({type:t.type===lt.EVENT?lt.BINARY_EVENT:lt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===lt.BINARY_EVENT||t.type===lt.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=jJ(t),i=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(i),o}}class H1 extends tn{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===lt.BINARY_EVENT;i||n.type===lt.BINARY_ACK?(n.type=i?lt.EVENT:lt.ACK,this.reconstructor=new LJ(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(lt[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===lt.BINARY_EVENT||i.type===lt.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 lt.CONNECT:return LM(n);case lt.DISCONNECT:return n===void 0;case lt.CONNECT_ERROR:return typeof n=="string"||LM(n);case lt.EVENT:case lt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&zJ.indexOf(n[0])===-1);case lt.ACK:case lt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class LJ{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=OJ(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 qJ=Object.freeze(Object.defineProperty({__proto__:null,Decoder:H1,Encoder:DJ,get PacketType(){return lt}},Symbol.toStringTag,{value:"Module"}));function wr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const IJ=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class qz extends tn{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=[wr(t,"open",this.onopen.bind(this)),wr(t,"packet",this.onpacket.bind(this)),wr(t,"error",this.onerror.bind(this)),wr(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(IJ.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:lt.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:lt.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 lt.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 lt.EVENT:case lt.BINARY_EVENT:this.onevent(t);break;case lt.ACK:case lt.BINARY_ACK:this.onack(t);break;case lt.DISCONNECT:this.ondisconnect();break;case lt.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:lt.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:lt.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 ps(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}ps.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};ps.prototype.reset=function(){this.attempts=0};ps.prototype.setMin=function(e){this.ms=e};ps.prototype.setMax=function(e){this.max=e};ps.prototype.setJitter=function(e){this.jitter=e};class bb extends tn{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,gd(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 ps({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||qJ;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 NJ(this.uri,this.opts);const n=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const o=wr(n,"open",function(){i.onopen(),t&&t()}),s=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},l=wr(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(wr(t,"ping",this.onping.bind(this)),wr(t,"data",this.ondata.bind(this)),wr(t,"error",this.onerror.bind(this)),wr(t,"close",this.onclose.bind(this)),wr(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){md(()=>{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 gl={};function lf(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=kJ(e,t.path||"/socket.io"),i=n.source,o=n.id,s=n.path,l=gl[o]&&s in gl[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||l;let f;return c?f=new bb(i,t):(gl[o]||(gl[o]=new bb(i,t)),f=gl[o]),n.query&&!t.query&&(t.query=n.queryKey),f.socket(n.path,t)}Object.assign(lf,{Manager:bb,Socket:qz,io:lf,connect:lf});const BJ=$3()||(typeof window<"u"?window.location.origin:"");let qa=null;function U1(){return qa||(qa=lf(BJ,{autoConnect:!1,reconnection:!0,reconnectionAttempts:10,reconnectionDelay:1e3,reconnectionDelayMax:5e3,transports:["websocket","polling"]})),qa}function HJ(){const e=U1();return e.connected||e.connect(),e}function UJ(){qa!=null&&qa.connected&&qa.disconnect()}function qM(e){const t=U1();t.connected&&t.emit("joinRepo",e)}function PJ(e){const t=U1();t.connected&&t.emit("leaveRepo",e)}function VJ(e){const[t,n]=T.useState(!1),[i,o]=T.useState(null),s=T.useRef(new Map);T.useEffect(()=>{const c=HJ();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(w=>w(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(w=>w(g))}),c.on("violations:ready",g=>{var v;o(null),(v=s.current.get("violations:ready"))==null||v.forEach(w=>w(g))}),c.connected&&e&&qM(e),()=>{e&&PJ(e),c.off("connect",f),c.off("disconnect",h),c.off("analysis:progress",p),c.off("analysis:complete",m),UJ()}},[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 FJ(e,t,n){const[i,o]=T.useState([]),[s,l]=T.useState(!0),[c,f]=T.useState(null),h=T.useCallback(async()=>{if(e){l(!0),f(null);try{const m=await x8(e,n);o(m)}catch(m){f(m instanceof Error?m.message:"Failed to fetch violations")}finally{l(!1)}}},[e,n]);return T.useEffect(()=>{h()},[h]),{violations:T.useMemo(()=>{const m={critical:0,high:1,medium:2,low:3,info:4},g={service:0,module:1,function:2,database:3},v=[...i].sort((w,E)=>{const S=(m[w.severity]??5)-(m[E.severity]??5);if(S!==0)return S;const _=(g[w.type]??9)-(g[E.type]??9);return _!==0?_:new Date(E.createdAt).getTime()-new Date(w.createdAt).getTime()});return t?v.filter(w=>w.targetServiceId===t||w.targetDatabaseId===t||w.targetModuleId===t||w.targetMethodId===t):v},[i,t]),allViolations:i,isLoading:s,error:c,refetch:h}}function $J(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 _8(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 S8(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 YJ(e){const[t,n]=T.useState([]),[i,o]=T.useState(!0),s=T.useCallback(async()=>{if(e){o(!0);try{const l=await m8(e);n(l)}catch{}finally{o(!1)}}},[e]);return T.useEffect(()=>{s()},[s]),{analyses:t,isLoading:i,refetch:s}}function GJ(e){const t=is(XJ,e).current;return t.next=e,ur(t.effect),t}function XJ(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const KJ={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},QJ={...KJ,position:"fixed",top:0,left:0},IM=new Map;function ZJ(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?"":ZJ(t,n).format(e)}function WJ(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(as(51));return e}let Ox=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const yd={status(e){return e==="progressing"?{[Ox.progressing]:""}:e==="complete"?{[Ox.complete]:""}:e==="indeterminate"?{[Ox.indeterminate]:""}:null}};function JJ(e,t){return t==null?"indeterminate progress":e||`${t}%`}const eee=T.forwardRef(function(t,n){const{format:i,getAriaValueText:o=JJ,locale:s,max:l=100,min:c=0,value:f,render:h,className:p,children:m,...g}=t,[v,w]=T.useState(),E=GJ(i);let S="indeterminate";Number.isFinite(f)&&(S=f===l?"complete":"progressing");const _=WJ(f,s,E.current),C=T.useMemo(()=>({status:S}),[S]),N={"aria-labelledby":v,"aria-valuemax":l,"aria-valuemin":c,"aria-valuenow":f??void 0,"aria-valuetext":o(_,f),role:"progressbar",children:b.jsxs(T.Fragment,{children:[m,b.jsx("span",{role:"presentation",style:QJ,children:"x"})]})},k=T.useMemo(()=>({formattedValue:_,max:l,min:c,setLabelId:w,state:C,status:S,value:f}),[_,l,c,w,C,S,f]),M=Gn("div",t,{state:C,ref:n,props:[N,g],stateAttributesMapping:yd});return b.jsx(Iz.Provider,{value:k,children:M})}),tee=T.forwardRef(function(t,n){const{render:i,className:o,...s}=t,{state:l}=P1();return Gn("div",t,{state:l,ref:n,props:s,stateAttributesMapping:yd})});function nee(e,t,n){return(e-t)*100/(n-t)}const ree=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?nee(f,c,l):null,m=T.useCallback(()=>p==null?{}:{insetInlineStart:0,height:"inherit",width:`${p}%`},[p]);return Gn("div",t,{state:h,ref:n,props:[{style:m()},s],stateAttributesMapping:yd})}),iee=T.forwardRef(function(t,n){const{render:i,className:o,id:s,...l}=t,{setLabelId:c,state:f}=P1(),h=t8(s,c);return Gn("span",t,{state:f,ref:n,props:[{id:h,role:"presentation"},l],stateAttributesMapping:yd})});function aee({className:e,children:t,value:n,...i}){return b.jsxs(eee,{value:n,"data-slot":"progress",className:bn("flex flex-wrap gap-3",e),...i,children:[t,b.jsx(oee,{children:b.jsx(see,{})})]})}function oee({className:e,...t}){return b.jsx(tee,{className:bn("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",e),"data-slot":"progress-track",...t})}function see({className:e,...t}){return b.jsx(ree,{"data-slot":"progress-indicator",className:bn("h-full bg-primary transition-all",e),...t})}function lee({className:e,...t}){return b.jsx(iee,{className:bn("text-sm font-medium",e),"data-slot":"progress-label",...t})}function uee(){var hn,dt;const{repoId:e=""}=IL(),[t]=Rq(),n=Mf(),[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(we=>{g(we);const _e=new URL(window.location.href);we==="services"?_e.searchParams.delete("mode"):_e.searchParams.set("mode",f[we]),n(_e.pathname+_e.search,{replace:!0})},[n]),[w,E]=T.useState([]),[S,_]=T.useState([]),[C,N]=T.useState(!1),[k,M]=T.useState(null),[R,O]=T.useState(!1),[I,P]=T.useState("violations"),[K,H]=T.useState(null),[F,X]=T.useState((t==null?void 0:t.get("view"))==="diff"),[L,B]=T.useState(null),[z,V]=T.useState(null),G=i==null?void 0:i.defaultBranch,{isConnected:Q,analysisProgress:j,onEvent:D}=VJ(e),{violations:$,allViolations:q,isLoading:Y,refetch:W}=FJ(e,s??void 0,z??void 0),{diffResult:Z,isChecking:te,error:re,run:se,load:ge}=$J(e),{analyses:be,refetch:ve}=YJ(e),Ee=F&&(Z!=null&&Z.diffAnalysisId)?Z.diffAnalysisId:z??void 0,{nodes:pe,edges:Ne,savedCollapsedIds:Oe,isLoading:Re,error:vt,refetch:he}=YW(e,G,m,Ee),ye=!!z,He=z?be.find(we=>we.id===z):null;T.useEffect(()=>{e&&d8(e).then(o).catch(()=>{})},[e]),T.useEffect(()=>{F&&ge()},[]),T.useEffect(()=>{E(pe),_(Ne)},[pe,Ne]),T.useEffect(()=>{j&&!C&&!F&&N(!0)},[j,C,F]),T.useEffect(()=>D("analysis:complete",()=>{N(!1),he(),ve()}),[D,he,ve]),T.useEffect(()=>D("violations:ready",()=>{N(!1),W()}),[D,W]);const Se=async()=>{if(F)se();else try{N(!0),await G3(e)}catch{N(!1)}},[Ue,Fe]=T.useState(null),kt=T.useCallback(we=>{if(l(we),we){const _e=pe.find(Le=>Le.id===we);if(_e&&_e.type==="database"){Fe(we),P("violations");return}}Fe(null)},[pe]),ue=T.useCallback(we=>{var Te;const _e=pe.find(qe=>qe.id===we),Le=_e==null?void 0:_e.data,Et=(Le==null?void 0:Le.label)||we,Ie={};if(Le){const{onExplain:qe,onToggleCollapse:Tt,isCollapsed:Ct,isContainer:ke,...$e}=Le;Object.assign(Ie,$e)}if(_e!=null&&_e.parentId){const qe=pe.find(Tt=>Tt.id===_e.parentId);qe&&(Ie.parentName=(Te=qe.data)==null?void 0:Te.label,Ie.parentType=qe.type)}const Xe=Ne.filter(qe=>qe.target===we).map(qe=>{var Ct,ke;const Tt=pe.find($e=>$e.id===qe.source);return{from:(Ct=Tt==null?void 0:Tt.data)==null?void 0:Ct.label,type:(ke=qe.data)==null?void 0:ke.dependencyType}}),tt=Ne.filter(qe=>qe.source===we).map(qe=>{var Ct,ke;const Tt=pe.find($e=>$e.id===qe.target);return{to:(Ct=Tt==null?void 0:Tt.data)==null?void 0:Ct.label,type:(ke=qe.data)==null?void 0:ke.dependencyType}});Xe.length&&(Ie.dependedOnBy=Xe),tt.length&&(Ie.dependsOn=tt),l(we),O(!0),M({nodeId:we,nodeName:Et,nodeType:_e==null?void 0:_e.type,nodeContext:Ie})},[pe,Ne]),me=T.useCallback(we=>{const _e=new Set;if(m==="services")for(const Xe of pe){const tt=Xe.data,Te=tt.serviceInfo;Te&&we.excludedTypes.size>0&&we.excludedTypes.has(Te.type)&&_e.add(Xe.id),Te!=null&&Te.framework&&we.excludedFrameworks.size>0&&we.excludedFrameworks.has(Te.framework)&&_e.add(Xe.id),we.searchQuery&&((tt.label||"").toLowerCase().includes(we.searchQuery.toLowerCase())||_e.add(Xe.id)),!we.showDatabases&&Xe.type==="database"&&_e.add(Xe.id)}else{const Xe=new Map;for(const Te of pe){const qe=Te.parentId;qe&&Xe.set(Te.id,qe)}if(!we.showDatabases)for(const Te of pe)Te.type==="database"&&_e.add(Te.id);for(const Te of pe){if(Te.type!=="serviceGroup")continue;const qe=Te.data;we.excludedTypes.size>0&&we.excludedTypes.has(qe.serviceType)&&_e.add(Te.id),qe.framework&&we.excludedFrameworks.size>0&&we.excludedFrameworks.has(qe.framework)&&_e.add(Te.id)}if(we.excludedLayers.size>0)for(const Te of pe){if(Te.type!=="layer")continue;const qe=Te.data;we.excludedLayers.has(qe.label)&&_e.add(Te.id)}let tt=!0;for(;tt;){tt=!1;for(const Te of pe){if(_e.has(Te.id))continue;const qe=Xe.get(Te.id);qe&&_e.has(qe)&&(_e.add(Te.id),tt=!0)}}if(we.searchQuery){const Te=we.searchQuery.toLowerCase(),qe=new Set;for(const Ct of pe){if(_e.has(Ct.id))continue;if((Ct.data.label||"").toLowerCase().includes(Te)){qe.add(Ct.id);let $e=Xe.get(Ct.id);for(;$e;)qe.add($e),$e=Xe.get($e)}}let Tt=!0;for(;Tt;){Tt=!1;for(const Ct of pe){if(qe.has(Ct.id))continue;const ke=Xe.get(Ct.id);ke&&qe.has(ke)&&(qe.add(Ct.id),Tt=!0)}}for(const Ct of pe)Ct.type!=="database"&&(qe.has(Ct.id)||_e.add(Ct.id))}for(const Te of pe){if(Te.type!=="serviceGroup"||_e.has(Te.id))continue;pe.some(Tt=>Xe.get(Tt.id)===Te.id&&!_e.has(Tt.id))||_e.add(Te.id)}}const Le=pe.filter(Xe=>!_e.has(Xe.id)),Et=new Set(Le.map(Xe=>Xe.id)),Ie=Ne.filter(Xe=>Et.has(Xe.source)&&Et.has(Xe.target));E(Le),_(Ie)},[pe,Ne,m]),Ae=T.useCallback(we=>{X(we);const _e=new URL(window.location.href);we?_e.searchParams.set("view","diff"):_e.searchParams.delete("view"),n(_e.pathname+_e.search,{replace:!0})},[n]),Ve=T.useCallback(()=>{Ae(!0),ge()},[Ae,ge]),Ge=T.useCallback(()=>{Ae(!1)},[Ae]),Ut=T.useMemo(()=>{if(!F||!Z)return w;const we=new Set(Z.affectedNodeIds.services),_e=new Set(Z.affectedNodeIds.layers),Le=new Set(Z.affectedNodeIds.modules),Et=new Set(Z.affectedNodeIds.methods),Ie=new Map,Xe=new Map,tt=new Map,Te=new Map,qe=new Map,Tt=new Map;for(const ke of Z.newViolations){if(ke.targetServiceName&&Ie.set(ke.targetServiceName,(Ie.get(ke.targetServiceName)||0)+1),ke.targetModuleName&&ke.targetServiceName){const $e=`${ke.targetServiceName}::${ke.targetModuleName}`;tt.set($e,(tt.get($e)||0)+1)}if(ke.targetMethodName&&ke.targetModuleName&&ke.targetServiceName){const $e=`${ke.targetServiceName}::${ke.targetModuleName}::${ke.targetMethodName}`;Te.set($e,(Te.get($e)||0)+1)}}for(const ke of Z.resolvedViolations||[]){if(ke.targetServiceName&&Xe.set(ke.targetServiceName,(Xe.get(ke.targetServiceName)||0)+1),ke.targetModuleName&&ke.targetServiceName){const $e=`${ke.targetServiceName}::${ke.targetModuleName}`;qe.set($e,(qe.get($e)||0)+1)}if(ke.targetMethodName&&ke.targetModuleName&&ke.targetServiceName){const $e=`${ke.targetServiceName}::${ke.targetModuleName}::${ke.targetMethodName}`;Tt.set($e,(Tt.get($e)||0)+1)}}const Ct=ke=>{let $e=ke;for(;;){const Dt=$e.parentId;if(!Dt)return"";const Lt=w.find($t=>$t.id===Dt);if(!Lt)return"";if(Lt.type==="serviceGroup")return Lt.data.label;$e=Lt}};return w.map(ke=>{const $e=ke.data,Dt=$e.label;if(ke.type==="service"||ke.type==="serviceGroup"){const Lt=Dt,$t=we.has(Lt);return{...ke,data:{...$e,diffBadge:$t?{newCount:Ie.get(Lt)||0,resolvedCount:Xe.get(Lt)||0}:void 0},style:$t?ke.style:{...ke.style,opacity:.4}}}if(ke.type==="layer"){const Lt=ke.parentId,$t=Lt?w.find(Kn=>Kn.id===Lt):void 0,pa=`${$t?$t.data.label:""}::${Dt}`,mr=_e.has(pa);return{...ke,data:{...$e,diffBadge:mr?{newCount:0,resolvedCount:0}:void 0},style:mr?ke.style:{...ke.style,opacity:.4}}}if(ke.type==="module"){const $t=`${Ct(ke)}::${Dt}`,pr=Le.has($t);return{...ke,data:{...$e,diffBadge:pr?{newCount:tt.get($t)||0,resolvedCount:qe.get($t)||0}:void 0},style:pr?ke.style:{...ke.style,opacity:.4}}}if(ke.type==="method"){const Lt=Ct(ke),$t=ke.parentId,pr=$t?w.find(ma=>ma.id===$t):void 0,pa=pr?pr.data.label:"",mr=`${Lt}::${pa}::${Dt}`,Kn=Et.has(mr);return{...ke,data:{...$e,diffBadge:Kn?{newCount:Te.get(mr)||0,resolvedCount:Tt.get(mr)||0}:void 0},style:Kn?ke.style:{...ke.style,opacity:.4}}}return{...ke,style:{...ke.style,opacity:.4}}})},[w,F,Z]),zt=T.useCallback((we,_e)=>{if(!we||!_e)return!1;if(we.includes(_e))return!0;const Le=we.split("/");for(let Et=Le.length-1;Et>=1;Et--){const Ie=Le.slice(Et).join("/");if(_e.startsWith(Ie+"/")||_e===Ie)return!0}return!1},[]),ft=T.useMemo(()=>{const we=F?Ut:w;if(!L)return we;const _e=new Map;for(const Ie of we){const Xe=Ie.parentId;Xe&&_e.set(Ie.id,Xe)}const Le=new Set;for(const Ie of we){const Xe=Ie.data;let tt=!1;if(Ie.type==="module"||Ie.type==="method"){const Te=Xe.filePath||Xe.rootPath||"";zt(Te,L)&&(tt=!0)}else if(Ie.type==="layer"){const Te=Xe.filePaths;Te!=null&&Te.some(qe=>zt(qe,L))&&(tt=!0)}else if(Ie.type==="serviceGroup"){const Te=Xe.rootPath||"";zt(Te,L)&&(tt=!0)}else if(Ie.type==="service"){const Te=Xe.serviceInfo,qe=(Te==null?void 0:Te.rootPath)||"";zt(qe,L)&&(tt=!0)}if(tt){Le.add(Ie.id);let Te=_e.get(Ie.id);for(;Te;)Le.add(Te),Te=_e.get(Te)}}let Et=!0;for(;Et;){Et=!1;for(const Ie of we){if(Le.has(Ie.id))continue;const Xe=_e.get(Ie.id);if(!Xe||!Le.has(Xe))continue;const tt=Ie.data;if(Ie.type==="module"||Ie.type==="method"){const Te=tt.filePath||tt.rootPath||"";zt(Te,L)&&(Le.add(Ie.id),Et=!0)}else if(Ie.type==="layer"){const Te=tt.filePaths;Te!=null&&Te.some(qe=>zt(qe,L))&&(Le.add(Ie.id),Et=!0)}}}return we.map(Ie=>Le.has(Ie.id)?Ie:{...Ie,style:{...Ie.style,opacity:.15}})},[w,Ut,F,L,zt]),ut=T.useMemo(()=>{var _e;if(!L)return null;const we=new Set;for(const Le of ft)((_e=Le.style)==null?void 0:_e.opacity)!==.15&&we.add(Le.id);return we},[ft,L]),Ft=T.useMemo(()=>{const we=new Map;for(const _e of pe){const Le=_e.data;let Et=Le.filePath||Le.rootPath;if(!Et&&_e.type==="service"){const Ie=Le.serviceInfo;Et=(Ie==null?void 0:Ie.rootPath)||""}Et&&we.set(_e.id,Et)}return we},[pe]);if(!e)return b.jsx(WL,{to:"/",replace:!0});const ct=s?((dt=(hn=pe.find(we=>we.id===s))==null?void 0:hn.data)==null?void 0:dt.label)??null:null,gn=pe.some(we=>we.type==="database"),Xt=new Set,Mr=new Set,hr=new Set;for(const we of pe){const _e=we.data;if(we.type==="service"){const Le=_e.serviceInfo;Le!=null&&Le.type&&Xt.add(Le.type),Le!=null&&Le.framework&&Mr.add(Le.framework)}we.type==="serviceGroup"&&(_e.serviceType&&Xt.add(_e.serviceType),_e.framework&&Mr.add(_e.framework)),we.type==="layer"&&hr.add(_e.label)}const jr=[...Xt],Xn=[...Mr],yn=[...hr],Or=T.useCallback((we,_e)=>{_e&&_e!==m?(v(_e),setTimeout(()=>H({nodeId:we,key:Date.now()}),500)):H({nodeId:we,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:G,onAnalyze:ye?void 0:Se,isAnalyzing:C||te,showBack:!0,backHref:"/",isChatOpen:R,onToggleChat:()=>O(we=>!we),isDiffMode:F,onEnterDiffMode:ye?void 0:Ve,onExitDiffMode:ye?void 0:Ge,analyses:be,selectedAnalysisId:z,onSelectAnalysis:V}),b.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[b.jsxs(J8,{activeTab:I,onTabChange:P,badgeCounts:{violations:F&&Z?{newCount:Z.summary.newCount,resolvedCount:Z.summary.resolvedCount}:q.length},children:[I==="violations"&&b.jsx(dX,{violations:$,isLoading:Y,repoId:e,selectedService:s,selectedServiceName:ct,selectedDatabaseId:Ue,isDiffMode:F,diffResult:Z,onLocateNode:Or,selectedPath:L,nodeFilePathMap:Ft}),I==="rules"&&b.jsx(yX,{}),I==="files"&&b.jsx(xX,{repoId:e,selectedPath:L,onSelectPath:we=>{if(B(we),!we){kt(null);return}let _e=null;for(const Le of pe){if(Le.type!=="service"&&Le.type!=="serviceGroup")continue;const Et=Le.data;let Ie="";if(Le.type==="service"){const tt=Et.serviceInfo;Ie=(tt==null?void 0:tt.rootPath)||""}else Ie=Et.rootPath||"";if(!Ie)continue;const Xe=Ie.split("/");for(let tt=Xe.length-1;tt>=0;tt--){const Te=Xe.slice(tt).join("/");if(we.startsWith(Te)||we.startsWith(Te+"/")){const qe=Xe.length-tt;(!_e||qe>_e.depth)&&(_e={id:Le.id,depth:qe});break}}}kt((_e==null?void 0:_e.id)??null)}})]}),b.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[ye&&He&&b.jsxs("div",{className:"flex shrink-0 items-center justify-center gap-2 bg-amber-500/10 border-b border-amber-500/30 px-4 py-1.5 text-xs text-amber-500",children:[b.jsxs("span",{children:["Viewing analysis from"," ",new Date(He.createdAt).toLocaleString([],{dateStyle:"medium",timeStyle:"short"})," ","— not the latest"]}),b.jsx("button",{className:"underline hover:text-amber-400 transition-colors",onClick:()=>V(null),children:"Return to latest"})]}),F&&(Z==null?void 0:Z.diffAnalysisId)&&b.jsx("div",{className:"flex shrink-0 items-center justify-center gap-2 bg-blue-500/10 border-b border-blue-500/30 px-4 py-1.5 text-xs text-blue-400",children:b.jsx("span",{children:"Showing working tree state (uncommitted changes)"})}),b.jsxs("div",{className:"relative flex-1",children:[j&&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(lr,{className:"h-3.5 w-3.5 shrink-0 animate-spin text-primary"}),b.jsx(aee,{value:j.percent,className:"flex-1 gap-1",children:b.jsx("div",{className:"flex w-full items-center justify-between",children:b.jsx(lee,{className:"text-[11px] font-medium capitalize",children:j.step})})})]}),j.detail&&b.jsx("p",{className:"mt-1.5 pl-6 text-[10px] text-muted-foreground",children:j.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"})]})}),Re?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(lr,{className:"h-10 w-10 animate-spin text-primary"}),b.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading graph..."})]})}):vt?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(Xc,{className:"h-10 w-10 text-destructive"}),b.jsxs(Qc,{variant:"destructive",className:"max-w-sm",children:[b.jsx(a2,{children:"Failed to load graph"}),b.jsx(Zc,{children:vt})]}),b.jsx(Rn,{onClick:()=>he(),className:"mt-2",children:"Retry"})]})}):w.length===0&&pe.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(Xc,{className:"h-10 w-10 text-muted-foreground"}),b.jsxs(Qc,{className:"max-w-sm",children:[b.jsx(a2,{children:"No graph data"}),b.jsx(Zc,{children:"Run an analysis to generate the architecture graph"})]}),b.jsxs(Rn,{onClick:Se,disabled:C,className:"mt-2",children:[C&&b.jsx(lr,{className:"h-4 w-4 animate-spin"}),C?"Analyzing...":"Analyze Repository"]}),F&&re&&b.jsxs(Qc,{className:"mt-3 max-w-sm border-amber-500/30 text-amber-500",children:[b.jsx(Xc,{className:"h-4 w-4"}),b.jsx(Zc,{className:"text-amber-500/90",children:re})]})]})}):b.jsxs(b.Fragment,{children:[b.jsx($W,{depthLevel:m,serviceTypes:jr,frameworks:Xn,layerTypes:yn,hasDatabases:gn,onFilterChange:me}),b.jsx(eX,{initialNodes:ft,initialEdges:S,onNodeSelect:kt,onExplainNode:ue,selectedNodeId:s,repoId:e,branch:G,onRefetch:he,depthLevel:m,onDepthChange:v,focusNodeId:(K==null?void 0:K.nodeId)??null,focusKey:(K==null?void 0:K.key)??0,isDiffMode:F,diffResult:Z,isDiffChecking:te,hasProgressBar:!!j,onEnterDiffMode:Ve,onExitDiffMode:Ge,highlightedNodeIds:ut,savedCollapsedIds:Oe})]})]})]}),b.jsx(Z8,{isOpen:R,children:b.jsx(VW,{repoId:e,selectedService:s,explainRequest:k,onExplainHandled:()=>M(null)})})]})]})}function cee(){return b.jsx(Cq,{children:b.jsxs(eq,{children:[b.jsx(Dx,{path:"/",element:b.jsx(T8,{})}),b.jsx(Dx,{path:"/repos/:repoId",element:b.jsx(T.Suspense,{children:b.jsx(uee,{})})})]})})}tL.createRoot(document.getElementById("root")).render(b.jsx(T.StrictMode,{children:b.jsx(cee,{})}));
|