@sashabogi/foundation 0.1.13 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +632 -238
- package/dist/cli.d.ts +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +336 -23
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +4 -6
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/fireworks.d.ts +5 -0
- package/dist/providers/fireworks.d.ts.map +1 -1
- package/dist/providers/fireworks.js +18 -0
- package/dist/providers/fireworks.js.map +1 -1
- package/dist/providers/kimi-code.d.ts +5 -0
- package/dist/providers/kimi-code.d.ts.map +1 -1
- package/dist/providers/kimi-code.js +18 -0
- package/dist/providers/kimi-code.js.map +1 -1
- package/dist/providers/zai.d.ts +5 -0
- package/dist/providers/zai.d.ts.map +1 -1
- package/dist/providers/zai.js +18 -0
- package/dist/providers/zai.js.map +1 -1
- package/dist/tools/gaia/index.d.ts +29 -15
- package/dist/tools/gaia/index.d.ts.map +1 -1
- package/dist/tools/gaia/index.js +1206 -274
- package/dist/tools/gaia/index.js.map +1 -1
- package/dist/tools/gaia/storage.d.ts +72 -0
- package/dist/tools/gaia/storage.d.ts.map +1 -0
- package/dist/tools/gaia/storage.js +344 -0
- package/dist/tools/gaia/storage.js.map +1 -0
- package/dist/tools/gaia/test-storage-manual.d.ts +6 -0
- package/dist/tools/gaia/test-storage-manual.d.ts.map +1 -0
- package/dist/tools/gaia/test-storage-manual.js +120 -0
- package/dist/tools/gaia/test-storage-manual.js.map +1 -0
- package/dist/tools/memoria/index.d.ts +25 -0
- package/dist/tools/memoria/index.d.ts.map +1 -0
- package/dist/tools/memoria/index.js +269 -0
- package/dist/tools/memoria/index.js.map +1 -0
- package/dist/tools/memoria/storage.d.ts +72 -0
- package/dist/tools/memoria/storage.d.ts.map +1 -0
- package/dist/tools/memoria/storage.js +344 -0
- package/dist/tools/memoria/storage.js.map +1 -0
- package/dist/tools/memoria/storage.test.d.ts +7 -0
- package/dist/tools/memoria/storage.test.d.ts.map +1 -0
- package/dist/tools/memoria/storage.test.js +350 -0
- package/dist/tools/memoria/storage.test.js.map +1 -0
- package/dist/tools/memoria/test-storage-manual.d.ts +6 -0
- package/dist/tools/memoria/test-storage-manual.d.ts.map +1 -0
- package/dist/tools/memoria/test-storage-manual.js +120 -0
- package/dist/tools/memoria/test-storage-manual.js.map +1 -0
- package/dist/types/index.d.ts +38 -0
- package/dist/types/index.d.ts.map +1 -1
- package/docs/MIGRATION-GUIDE.md +771 -0
- package/package.json +2 -2
- package/packages/ui/dist/assets/index-oiJTDMJ1.css +1 -0
- package/packages/ui/dist/assets/index-oivszLTx.js +352 -0
- package/packages/ui/dist/index.html +2 -2
- package/docs/REFACTORING-PLAN.md +0 -374
- package/docs/TESTING-WITH-NATIVE-SWARM.md +0 -266
- package/packages/ui/dist/assets/index-B7zz_B5Q.js +0 -312
- package/packages/ui/dist/assets/index-fYt-vaxP.css +0 -1
|
@@ -1,312 +0,0 @@
|
|
|
1
|
-
function Yj(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[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"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var ca=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var sN={exports:{}},du={},aN={exports:{}},fe={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its 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 qs=Symbol.for("react.element"),Kj=Symbol.for("react.portal"),Xj=Symbol.for("react.fragment"),Qj=Symbol.for("react.strict_mode"),Zj=Symbol.for("react.profiler"),Jj=Symbol.for("react.provider"),eO=Symbol.for("react.context"),tO=Symbol.for("react.forward_ref"),nO=Symbol.for("react.suspense"),rO=Symbol.for("react.memo"),oO=Symbol.for("react.lazy"),ix=Symbol.iterator;function iO(e){return e===null||typeof e!="object"?null:(e=ix&&e[ix]||e["@@iterator"],typeof e=="function"?e:null)}var lN={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uN=Object.assign,cN={};function hi(e,t,n){this.props=e,this.context=t,this.refs=cN,this.updater=n||lN}hi.prototype.isReactComponent={};hi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};hi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dN(){}dN.prototype=hi.prototype;function Wv(e,t,n){this.props=e,this.context=t,this.refs=cN,this.updater=n||lN}var Uv=Wv.prototype=new dN;Uv.constructor=Wv;uN(Uv,hi.prototype);Uv.isPureReactComponent=!0;var sx=Array.isArray,fN=Object.prototype.hasOwnProperty,Gv={current:null},hN={key:!0,ref:!0,__self:!0,__source:!0};function pN(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)fN.call(t,r)&&!hN.hasOwnProperty(r)&&(o[r]=t[r]);var a=arguments.length-2;if(a===1)o.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];o.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)o[r]===void 0&&(o[r]=a[r]);return{$$typeof:qs,type:e,key:i,ref:s,props:o,_owner:Gv.current}}function sO(e,t){return{$$typeof:qs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Yv(e){return typeof e=="object"&&e!==null&&e.$$typeof===qs}function aO(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ax=/\/+/g;function kc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?aO(""+e.key):t.toString(36)}function Ga(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case qs:case Kj:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+kc(s,0):r,sx(o)?(n="",e!=null&&(n=e.replace(ax,"$&/")+"/"),Ga(o,t,n,"",function(u){return u})):o!=null&&(Yv(o)&&(o=sO(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(ax,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",sx(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+kc(i,a);s+=Ga(i,t,n,l,o)}else if(l=iO(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+kc(i,a++),s+=Ga(i,t,n,l,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function da(e,t,n){if(e==null)return e;var r=[],o=0;return Ga(e,r,"","",function(i){return t.call(n,i,o++)}),r}function lO(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Je={current:null},Ya={transition:null},uO={ReactCurrentDispatcher:Je,ReactCurrentBatchConfig:Ya,ReactCurrentOwner:Gv};function mN(){throw Error("act(...) is not supported in production builds of React.")}fe.Children={map:da,forEach:function(e,t,n){da(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return da(e,function(){t++}),t},toArray:function(e){return da(e,function(t){return t})||[]},only:function(e){if(!Yv(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};fe.Component=hi;fe.Fragment=Xj;fe.Profiler=Zj;fe.PureComponent=Wv;fe.StrictMode=Qj;fe.Suspense=nO;fe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=uO;fe.act=mN;fe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=uN({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=Gv.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)fN.call(t,l)&&!hN.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:qs,type:e.type,key:o,ref:i,props:r,_owner:s}};fe.createContext=function(e){return e={$$typeof:eO,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Jj,_context:e},e.Consumer=e};fe.createElement=pN;fe.createFactory=function(e){var t=pN.bind(null,e);return t.type=e,t};fe.createRef=function(){return{current:null}};fe.forwardRef=function(e){return{$$typeof:tO,render:e}};fe.isValidElement=Yv;fe.lazy=function(e){return{$$typeof:oO,_payload:{_status:-1,_result:e},_init:lO}};fe.memo=function(e,t){return{$$typeof:rO,type:e,compare:t===void 0?null:t}};fe.startTransition=function(e){var t=Ya.transition;Ya.transition={};try{e()}finally{Ya.transition=t}};fe.unstable_act=mN;fe.useCallback=function(e,t){return Je.current.useCallback(e,t)};fe.useContext=function(e){return Je.current.useContext(e)};fe.useDebugValue=function(){};fe.useDeferredValue=function(e){return Je.current.useDeferredValue(e)};fe.useEffect=function(e,t){return Je.current.useEffect(e,t)};fe.useId=function(){return Je.current.useId()};fe.useImperativeHandle=function(e,t,n){return Je.current.useImperativeHandle(e,t,n)};fe.useInsertionEffect=function(e,t){return Je.current.useInsertionEffect(e,t)};fe.useLayoutEffect=function(e,t){return Je.current.useLayoutEffect(e,t)};fe.useMemo=function(e,t){return Je.current.useMemo(e,t)};fe.useReducer=function(e,t,n){return Je.current.useReducer(e,t,n)};fe.useRef=function(e){return Je.current.useRef(e)};fe.useState=function(e){return Je.current.useState(e)};fe.useSyncExternalStore=function(e,t,n){return Je.current.useSyncExternalStore(e,t,n)};fe.useTransition=function(){return Je.current.useTransition()};fe.version="18.3.1";aN.exports=fe;var y=aN.exports;const en=cu(y),Kv=Yj({__proto__:null,default:en},[y]);/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its 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 cO=y,dO=Symbol.for("react.element"),fO=Symbol.for("react.fragment"),hO=Object.prototype.hasOwnProperty,pO=cO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,mO={key:!0,ref:!0,__self:!0,__source:!0};function gN(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)hO.call(t,r)&&!mO.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:dO,type:e,key:i,ref:s,props:o,_owner:pO.current}}du.Fragment=fO;du.jsx=gN;du.jsxs=gN;sN.exports=du;var p=sN.exports,vg={},vN={exports:{}},xt={},yN={exports:{}},xN={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its 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
|
-
*/(function(e){function t(N,A){var D=N.length;N.push(A);e:for(;0<D;){var z=D-1>>>1,F=N[z];if(0<o(F,A))N[z]=A,N[D]=F,D=z;else break e}}function n(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var A=N[0],D=N.pop();if(D!==A){N[0]=D;e:for(var z=0,F=N.length,V=F>>>1;z<V;){var H=2*(z+1)-1,K=N[H],X=H+1,q=N[X];if(0>o(K,D))X<F&&0>o(q,K)?(N[z]=q,N[X]=D,z=X):(N[z]=K,N[H]=D,z=H);else if(X<F&&0>o(q,D))N[z]=q,N[X]=D,z=X;else break e}}return A}function o(N,A){var D=N.sortIndex-A.sortIndex;return D!==0?D:N.id-A.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,g=!1,m=!1,b=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(N){for(var A=n(u);A!==null;){if(A.callback===null)r(u);else if(A.startTime<=N)r(u),A.sortIndex=A.expirationTime,t(l,A);else break;A=n(u)}}function _(N){if(m=!1,x(N),!g)if(n(l)!==null)g=!0,M(C);else{var A=n(u);A!==null&&O(_,A.startTime-N)}}function C(N,A){g=!1,m&&(m=!1,v(k),k=-1),h=!0;var D=f;try{for(x(A),d=n(l);d!==null&&(!(d.expirationTime>A)||N&&!P());){var z=d.callback;if(typeof z=="function"){d.callback=null,f=d.priorityLevel;var F=z(d.expirationTime<=A);A=e.unstable_now(),typeof F=="function"?d.callback=F:d===n(l)&&r(l),x(A)}else r(l);d=n(l)}if(d!==null)var V=!0;else{var H=n(u);H!==null&&O(_,H.startTime-A),V=!1}return V}finally{d=null,f=D,h=!1}}var S=!1,E=null,k=-1,T=5,I=-1;function P(){return!(e.unstable_now()-I<T)}function j(){if(E!==null){var N=e.unstable_now();I=N;var A=!0;try{A=E(!0,N)}finally{A?$():(S=!1,E=null)}}else S=!1}var $;if(typeof w=="function")$=function(){w(j)};else if(typeof MessageChannel<"u"){var R=new MessageChannel,L=R.port2;R.port1.onmessage=j,$=function(){L.postMessage(null)}}else $=function(){b(j,0)};function M(N){E=N,S||(S=!0,$())}function O(N,A){k=b(function(){N(e.unstable_now())},A)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_continueExecution=function(){g||h||(g=!0,M(C))},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(N){switch(f){case 1:case 2:case 3:var A=3;break;default:A=f}var D=f;f=A;try{return N()}finally{f=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(N,A){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var D=f;f=N;try{return A()}finally{f=D}},e.unstable_scheduleCallback=function(N,A,D){var z=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?z+D:z):D=z,N){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=D+F,N={id:c++,callback:A,priorityLevel:N,startTime:D,expirationTime:F,sortIndex:-1},D>z?(N.sortIndex=D,t(u,N),n(l)===null&&N===n(u)&&(m?(v(k),k=-1):m=!0,O(_,D-z))):(N.sortIndex=F,t(l,N),g||h||(g=!0,M(C))),N},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(N){var A=f;return function(){var D=f;f=A;try{return N.apply(this,arguments)}finally{f=D}}}})(xN);yN.exports=xN;var gO=yN.exports;/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its 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 vO=y,vt=gO;function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var wN=new Set,ds={};function so(e,t){Uo(e,t),Uo(e+"Capture",t)}function Uo(e,t){for(ds[e]=t,e=0;e<t.length;e++)wN.add(t[e])}var In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yg=Object.prototype.hasOwnProperty,yO=/^[: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]*$/,lx={},ux={};function xO(e){return yg.call(ux,e)?!0:yg.call(lx,e)?!1:yO.test(e)?ux[e]=!0:(lx[e]=!0,!1)}function wO(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function bO(e,t,n,r){if(t===null||typeof t>"u"||wO(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function et(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var We={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){We[e]=new et(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];We[t]=new et(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){We[e]=new et(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){We[e]=new et(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){We[e]=new et(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){We[e]=new et(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){We[e]=new et(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){We[e]=new et(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){We[e]=new et(e,5,!1,e.toLowerCase(),null,!1,!1)});var Xv=/[\-:]([a-z])/g;function Qv(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Xv,Qv);We[t]=new et(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Xv,Qv);We[t]=new et(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Xv,Qv);We[t]=new et(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){We[e]=new et(e,1,!1,e.toLowerCase(),null,!1,!1)});We.xlinkHref=new et("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){We[e]=new et(e,1,!1,e.toLowerCase(),null,!0,!0)});function Zv(e,t,n,r){var o=We.hasOwnProperty(t)?We[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(bO(t,n,o,r)&&(n=null),r||o===null?xO(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var qn=vO.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,fa=Symbol.for("react.element"),_o=Symbol.for("react.portal"),So=Symbol.for("react.fragment"),Jv=Symbol.for("react.strict_mode"),xg=Symbol.for("react.profiler"),bN=Symbol.for("react.provider"),_N=Symbol.for("react.context"),ey=Symbol.for("react.forward_ref"),wg=Symbol.for("react.suspense"),bg=Symbol.for("react.suspense_list"),ty=Symbol.for("react.memo"),er=Symbol.for("react.lazy"),SN=Symbol.for("react.offscreen"),cx=Symbol.iterator;function Pi(e){return e===null||typeof e!="object"?null:(e=cx&&e[cx]||e["@@iterator"],typeof e=="function"?e:null)}var Pe=Object.assign,Rc;function Fi(e){if(Rc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Rc=t&&t[1]||""}return`
|
|
34
|
-
`+Rc+e}var Pc=!1;function Tc(e,t){if(!e||Pc)return"";Pc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
|
|
35
|
-
`),i=r.stack.split(`
|
|
36
|
-
`),s=o.length-1,a=i.length-1;1<=s&&0<=a&&o[s]!==i[a];)a--;for(;1<=s&&0<=a;s--,a--)if(o[s]!==i[a]){if(s!==1||a!==1)do if(s--,a--,0>a||o[s]!==i[a]){var l=`
|
|
37
|
-
`+o[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Pc=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fi(e):""}function _O(e){switch(e.tag){case 5:return Fi(e.type);case 16:return Fi("Lazy");case 13:return Fi("Suspense");case 19:return Fi("SuspenseList");case 0:case 2:case 15:return e=Tc(e.type,!1),e;case 11:return e=Tc(e.type.render,!1),e;case 1:return e=Tc(e.type,!0),e;default:return""}}function _g(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case So:return"Fragment";case _o:return"Portal";case xg:return"Profiler";case Jv:return"StrictMode";case wg:return"Suspense";case bg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case _N:return(e.displayName||"Context")+".Consumer";case bN:return(e._context.displayName||"Context")+".Provider";case ey:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ty:return t=e.displayName||null,t!==null?t:_g(e.type)||"Memo";case er:t=e._payload,e=e._init;try{return _g(e(t))}catch{}}return null}function SO(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return _g(t);case 8:return t===Jv?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function xr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function EN(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function EO(e){var t=EN(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ha(e){e._valueTracker||(e._valueTracker=EO(e))}function CN(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=EN(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function hl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Sg(e,t){var n=t.checked;return Pe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function dx(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=xr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function NN(e,t){t=t.checked,t!=null&&Zv(e,"checked",t,!1)}function Eg(e,t){NN(e,t);var n=xr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Cg(e,t.type,n):t.hasOwnProperty("defaultValue")&&Cg(e,t.type,xr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function fx(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Cg(e,t,n){(t!=="number"||hl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var qi=Array.isArray;function Lo(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+xr(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ng(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(W(91));return Pe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function hx(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(W(92));if(qi(n)){if(1<n.length)throw Error(W(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:xr(n)}}function kN(e,t){var n=xr(t.value),r=xr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function px(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function RN(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function kg(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?RN(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var pa,PN=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(pa=pa||document.createElement("div"),pa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function fs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ji={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},CO=["Webkit","ms","Moz","O"];Object.keys(Ji).forEach(function(e){CO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ji[t]=Ji[e]})});function TN(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ji.hasOwnProperty(e)&&Ji[e]?(""+t).trim():t+"px"}function AN(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=TN(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var NO=Pe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Rg(e,t){if(t){if(NO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function Pg(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Tg=null;function ny(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ag=null,Do=null,$o=null;function mx(e){if(e=Vs(e)){if(typeof Ag!="function")throw Error(W(280));var t=e.stateNode;t&&(t=gu(t),Ag(e.stateNode,e.type,t))}}function MN(e){Do?$o?$o.push(e):$o=[e]:Do=e}function IN(){if(Do){var e=Do,t=$o;if($o=Do=null,mx(e),t)for(e=0;e<t.length;e++)mx(t[e])}}function jN(e,t){return e(t)}function ON(){}var Ac=!1;function LN(e,t,n){if(Ac)return e(t,n);Ac=!0;try{return jN(e,t,n)}finally{Ac=!1,(Do!==null||$o!==null)&&(ON(),IN())}}function hs(e,t){var n=e.stateNode;if(n===null)return null;var r=gu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(W(231,t,typeof n));return n}var Mg=!1;if(In)try{var Ti={};Object.defineProperty(Ti,"passive",{get:function(){Mg=!0}}),window.addEventListener("test",Ti,Ti),window.removeEventListener("test",Ti,Ti)}catch{Mg=!1}function kO(e,t,n,r,o,i,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var es=!1,pl=null,ml=!1,Ig=null,RO={onError:function(e){es=!0,pl=e}};function PO(e,t,n,r,o,i,s,a,l){es=!1,pl=null,kO.apply(RO,arguments)}function TO(e,t,n,r,o,i,s,a,l){if(PO.apply(this,arguments),es){if(es){var u=pl;es=!1,pl=null}else throw Error(W(198));ml||(ml=!0,Ig=u)}}function ao(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function DN(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function gx(e){if(ao(e)!==e)throw Error(W(188))}function AO(e){var t=e.alternate;if(!t){if(t=ao(e),t===null)throw Error(W(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return gx(o),e;if(i===r)return gx(o),t;i=i.sibling}throw Error(W(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s)throw Error(W(189))}}if(n.alternate!==r)throw Error(W(190))}if(n.tag!==3)throw Error(W(188));return n.stateNode.current===n?e:t}function $N(e){return e=AO(e),e!==null?zN(e):null}function zN(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=zN(e);if(t!==null)return t;e=e.sibling}return null}var FN=vt.unstable_scheduleCallback,vx=vt.unstable_cancelCallback,MO=vt.unstable_shouldYield,IO=vt.unstable_requestPaint,Me=vt.unstable_now,jO=vt.unstable_getCurrentPriorityLevel,ry=vt.unstable_ImmediatePriority,qN=vt.unstable_UserBlockingPriority,gl=vt.unstable_NormalPriority,OO=vt.unstable_LowPriority,BN=vt.unstable_IdlePriority,fu=null,an=null;function LO(e){if(an&&typeof an.onCommitFiberRoot=="function")try{an.onCommitFiberRoot(fu,e,void 0,(e.current.flags&128)===128)}catch{}}var Ft=Math.clz32?Math.clz32:zO,DO=Math.log,$O=Math.LN2;function zO(e){return e>>>=0,e===0?32:31-(DO(e)/$O|0)|0}var ma=64,ga=4194304;function Bi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~o;a!==0?r=Bi(a):(i&=s,i!==0&&(r=Bi(i)))}else s=n&~o,s!==0?r=Bi(s):i!==0&&(r=Bi(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ft(t),o=1<<n,r|=e[n],t&=~o;return r}function FO(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qO(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Ft(i),a=1<<s,l=o[s];l===-1?(!(a&n)||a&r)&&(o[s]=FO(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function jg(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function HN(){var e=ma;return ma<<=1,!(ma&4194240)&&(ma=64),e}function Mc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Bs(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ft(t),e[t]=n}function BO(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Ft(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function oy(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ft(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var xe=0;function VN(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var WN,iy,UN,GN,YN,Og=!1,va=[],lr=null,ur=null,cr=null,ps=new Map,ms=new Map,nr=[],HO="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function yx(e,t){switch(e){case"focusin":case"focusout":lr=null;break;case"dragenter":case"dragleave":ur=null;break;case"mouseover":case"mouseout":cr=null;break;case"pointerover":case"pointerout":ps.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ms.delete(t.pointerId)}}function Ai(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Vs(t),t!==null&&iy(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function VO(e,t,n,r,o){switch(t){case"focusin":return lr=Ai(lr,e,t,n,r,o),!0;case"dragenter":return ur=Ai(ur,e,t,n,r,o),!0;case"mouseover":return cr=Ai(cr,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return ps.set(i,Ai(ps.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ms.set(i,Ai(ms.get(i)||null,e,t,n,r,o)),!0}return!1}function KN(e){var t=Or(e.target);if(t!==null){var n=ao(t);if(n!==null){if(t=n.tag,t===13){if(t=DN(n),t!==null){e.blockedOn=t,YN(e.priority,function(){UN(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ka(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Lg(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Tg=r,n.target.dispatchEvent(r),Tg=null}else return t=Vs(n),t!==null&&iy(t),e.blockedOn=n,!1;t.shift()}return!0}function xx(e,t,n){Ka(e)&&n.delete(t)}function WO(){Og=!1,lr!==null&&Ka(lr)&&(lr=null),ur!==null&&Ka(ur)&&(ur=null),cr!==null&&Ka(cr)&&(cr=null),ps.forEach(xx),ms.forEach(xx)}function Mi(e,t){e.blockedOn===t&&(e.blockedOn=null,Og||(Og=!0,vt.unstable_scheduleCallback(vt.unstable_NormalPriority,WO)))}function gs(e){function t(o){return Mi(o,e)}if(0<va.length){Mi(va[0],e);for(var n=1;n<va.length;n++){var r=va[n];r.blockedOn===e&&(r.blockedOn=null)}}for(lr!==null&&Mi(lr,e),ur!==null&&Mi(ur,e),cr!==null&&Mi(cr,e),ps.forEach(t),ms.forEach(t),n=0;n<nr.length;n++)r=nr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<nr.length&&(n=nr[0],n.blockedOn===null);)KN(n),n.blockedOn===null&&nr.shift()}var zo=qn.ReactCurrentBatchConfig,yl=!0;function UO(e,t,n,r){var o=xe,i=zo.transition;zo.transition=null;try{xe=1,sy(e,t,n,r)}finally{xe=o,zo.transition=i}}function GO(e,t,n,r){var o=xe,i=zo.transition;zo.transition=null;try{xe=4,sy(e,t,n,r)}finally{xe=o,zo.transition=i}}function sy(e,t,n,r){if(yl){var o=Lg(e,t,n,r);if(o===null)Bc(e,t,r,xl,n),yx(e,r);else if(VO(o,e,t,n,r))r.stopPropagation();else if(yx(e,r),t&4&&-1<HO.indexOf(e)){for(;o!==null;){var i=Vs(o);if(i!==null&&WN(i),i=Lg(e,t,n,r),i===null&&Bc(e,t,r,xl,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Bc(e,t,r,null,n)}}var xl=null;function Lg(e,t,n,r){if(xl=null,e=ny(r),e=Or(e),e!==null)if(t=ao(e),t===null)e=null;else if(n=t.tag,n===13){if(e=DN(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return xl=e,null}function XN(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(jO()){case ry:return 1;case qN:return 4;case gl:case OO:return 16;case BN:return 536870912;default:return 16}default:return 16}}var sr=null,ay=null,Xa=null;function QN(){if(Xa)return Xa;var e,t=ay,n=t.length,r,o="value"in sr?sr.value:sr.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return Xa=o.slice(e,1<r?1-r:void 0)}function Qa(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ya(){return!0}function wx(){return!1}function wt(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ya:wx,this.isPropagationStopped=wx,this}return Pe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ya)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ya)},persist:function(){},isPersistent:ya}),t}var pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ly=wt(pi),Hs=Pe({},pi,{view:0,detail:0}),YO=wt(Hs),Ic,jc,Ii,hu=Pe({},Hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uy,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ii&&(Ii&&e.type==="mousemove"?(Ic=e.screenX-Ii.screenX,jc=e.screenY-Ii.screenY):jc=Ic=0,Ii=e),Ic)},movementY:function(e){return"movementY"in e?e.movementY:jc}}),bx=wt(hu),KO=Pe({},hu,{dataTransfer:0}),XO=wt(KO),QO=Pe({},Hs,{relatedTarget:0}),Oc=wt(QO),ZO=Pe({},pi,{animationName:0,elapsedTime:0,pseudoElement:0}),JO=wt(ZO),eL=Pe({},pi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),tL=wt(eL),nL=Pe({},pi,{data:0}),_x=wt(nL),rL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oL={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"},iL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sL(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=iL[e])?!!t[e]:!1}function uy(){return sL}var aL=Pe({},Hs,{key:function(e){if(e.key){var t=rL[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qa(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?oL[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uy,charCode:function(e){return e.type==="keypress"?Qa(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qa(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),lL=wt(aL),uL=Pe({},hu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sx=wt(uL),cL=Pe({},Hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uy}),dL=wt(cL),fL=Pe({},pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),hL=wt(fL),pL=Pe({},hu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),mL=wt(pL),gL=[9,13,27,32],cy=In&&"CompositionEvent"in window,ts=null;In&&"documentMode"in document&&(ts=document.documentMode);var vL=In&&"TextEvent"in window&&!ts,ZN=In&&(!cy||ts&&8<ts&&11>=ts),Ex=" ",Cx=!1;function JN(e,t){switch(e){case"keyup":return gL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ek(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Eo=!1;function yL(e,t){switch(e){case"compositionend":return ek(t);case"keypress":return t.which!==32?null:(Cx=!0,Ex);case"textInput":return e=t.data,e===Ex&&Cx?null:e;default:return null}}function xL(e,t){if(Eo)return e==="compositionend"||!cy&&JN(e,t)?(e=QN(),Xa=ay=sr=null,Eo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return ZN&&t.locale!=="ko"?null:t.data;default:return null}}var wL={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 Nx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wL[e.type]:t==="textarea"}function tk(e,t,n,r){MN(r),t=wl(t,"onChange"),0<t.length&&(n=new ly("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var ns=null,vs=null;function bL(e){fk(e,0)}function pu(e){var t=ko(e);if(CN(t))return e}function _L(e,t){if(e==="change")return t}var nk=!1;if(In){var Lc;if(In){var Dc="oninput"in document;if(!Dc){var kx=document.createElement("div");kx.setAttribute("oninput","return;"),Dc=typeof kx.oninput=="function"}Lc=Dc}else Lc=!1;nk=Lc&&(!document.documentMode||9<document.documentMode)}function Rx(){ns&&(ns.detachEvent("onpropertychange",rk),vs=ns=null)}function rk(e){if(e.propertyName==="value"&&pu(vs)){var t=[];tk(t,vs,e,ny(e)),LN(bL,t)}}function SL(e,t,n){e==="focusin"?(Rx(),ns=t,vs=n,ns.attachEvent("onpropertychange",rk)):e==="focusout"&&Rx()}function EL(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return pu(vs)}function CL(e,t){if(e==="click")return pu(t)}function NL(e,t){if(e==="input"||e==="change")return pu(t)}function kL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:kL;function ys(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!yg.call(t,o)||!Bt(e[o],t[o]))return!1}return!0}function Px(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Tx(e,t){var n=Px(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Px(n)}}function ok(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ok(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ik(){for(var e=window,t=hl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=hl(e.document)}return t}function dy(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function RL(e){var t=ik(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ok(n.ownerDocument.documentElement,n)){if(r!==null&&dy(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=Tx(n,i);var s=Tx(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var PL=In&&"documentMode"in document&&11>=document.documentMode,Co=null,Dg=null,rs=null,$g=!1;function Ax(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;$g||Co==null||Co!==hl(r)||(r=Co,"selectionStart"in r&&dy(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),rs&&ys(rs,r)||(rs=r,r=wl(Dg,"onSelect"),0<r.length&&(t=new ly("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Co)))}function xa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var No={animationend:xa("Animation","AnimationEnd"),animationiteration:xa("Animation","AnimationIteration"),animationstart:xa("Animation","AnimationStart"),transitionend:xa("Transition","TransitionEnd")},$c={},sk={};In&&(sk=document.createElement("div").style,"AnimationEvent"in window||(delete No.animationend.animation,delete No.animationiteration.animation,delete No.animationstart.animation),"TransitionEvent"in window||delete No.transitionend.transition);function mu(e){if($c[e])return $c[e];if(!No[e])return e;var t=No[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in sk)return $c[e]=t[n];return e}var ak=mu("animationend"),lk=mu("animationiteration"),uk=mu("animationstart"),ck=mu("transitionend"),dk=new Map,Mx="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Er(e,t){dk.set(e,t),so(t,[e])}for(var zc=0;zc<Mx.length;zc++){var Fc=Mx[zc],TL=Fc.toLowerCase(),AL=Fc[0].toUpperCase()+Fc.slice(1);Er(TL,"on"+AL)}Er(ak,"onAnimationEnd");Er(lk,"onAnimationIteration");Er(uk,"onAnimationStart");Er("dblclick","onDoubleClick");Er("focusin","onFocus");Er("focusout","onBlur");Er(ck,"onTransitionEnd");Uo("onMouseEnter",["mouseout","mouseover"]);Uo("onMouseLeave",["mouseout","mouseover"]);Uo("onPointerEnter",["pointerout","pointerover"]);Uo("onPointerLeave",["pointerout","pointerover"]);so("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));so("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));so("onBeforeInput",["compositionend","keypress","textInput","paste"]);so("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));so("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));so("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hi="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(" "),ML=new Set("cancel close invalid load scroll toggle".split(" ").concat(Hi));function Ix(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,TO(r,t,void 0,e),e.currentTarget=null}function fk(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;Ix(o,a,u),i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;Ix(o,a,u),i=l}}}if(ml)throw e=Ig,ml=!1,Ig=null,e}function be(e,t){var n=t[Hg];n===void 0&&(n=t[Hg]=new Set);var r=e+"__bubble";n.has(r)||(hk(t,e,2,!1),n.add(r))}function qc(e,t,n){var r=0;t&&(r|=4),hk(n,e,r,t)}var wa="_reactListening"+Math.random().toString(36).slice(2);function xs(e){if(!e[wa]){e[wa]=!0,wN.forEach(function(n){n!=="selectionchange"&&(ML.has(n)||qc(n,!1,e),qc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[wa]||(t[wa]=!0,qc("selectionchange",!1,t))}}function hk(e,t,n,r){switch(XN(t)){case 1:var o=UO;break;case 4:o=GO;break;default:o=sy}n=o.bind(null,t,n,e),o=void 0,!Mg||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Bc(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===o||a.nodeType===8&&a.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===o||l.nodeType===8&&l.parentNode===o))return;s=s.return}for(;a!==null;){if(s=Or(a),s===null)return;if(l=s.tag,l===5||l===6){r=i=s;continue e}a=a.parentNode}}r=r.return}LN(function(){var u=i,c=ny(n),d=[];e:{var f=dk.get(e);if(f!==void 0){var h=ly,g=e;switch(e){case"keypress":if(Qa(n)===0)break e;case"keydown":case"keyup":h=lL;break;case"focusin":g="focus",h=Oc;break;case"focusout":g="blur",h=Oc;break;case"beforeblur":case"afterblur":h=Oc;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=bx;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=XO;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=dL;break;case ak:case lk:case uk:h=JO;break;case ck:h=hL;break;case"scroll":h=YO;break;case"wheel":h=mL;break;case"copy":case"cut":case"paste":h=tL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Sx}var m=(t&4)!==0,b=!m&&e==="scroll",v=m?f!==null?f+"Capture":null:f;m=[];for(var w=u,x;w!==null;){x=w;var _=x.stateNode;if(x.tag===5&&_!==null&&(x=_,v!==null&&(_=hs(w,v),_!=null&&m.push(ws(w,_,x)))),b)break;w=w.return}0<m.length&&(f=new h(f,g,null,n,c),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==Tg&&(g=n.relatedTarget||n.fromElement)&&(Or(g)||g[jn]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=u,g=g?Or(g):null,g!==null&&(b=ao(g),g!==b||g.tag!==5&&g.tag!==6)&&(g=null)):(h=null,g=u),h!==g)){if(m=bx,_="onMouseLeave",v="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(m=Sx,_="onPointerLeave",v="onPointerEnter",w="pointer"),b=h==null?f:ko(h),x=g==null?f:ko(g),f=new m(_,w+"leave",h,n,c),f.target=b,f.relatedTarget=x,_=null,Or(c)===u&&(m=new m(v,w+"enter",g,n,c),m.target=x,m.relatedTarget=b,_=m),b=_,h&&g)t:{for(m=h,v=g,w=0,x=m;x;x=go(x))w++;for(x=0,_=v;_;_=go(_))x++;for(;0<w-x;)m=go(m),w--;for(;0<x-w;)v=go(v),x--;for(;w--;){if(m===v||v!==null&&m===v.alternate)break t;m=go(m),v=go(v)}m=null}else m=null;h!==null&&jx(d,f,h,m,!1),g!==null&&b!==null&&jx(d,b,g,m,!0)}}e:{if(f=u?ko(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var C=_L;else if(Nx(f))if(nk)C=NL;else{C=EL;var S=SL}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=CL);if(C&&(C=C(e,u))){tk(d,C,n,c);break e}S&&S(e,f,u),e==="focusout"&&(S=f._wrapperState)&&S.controlled&&f.type==="number"&&Cg(f,"number",f.value)}switch(S=u?ko(u):window,e){case"focusin":(Nx(S)||S.contentEditable==="true")&&(Co=S,Dg=u,rs=null);break;case"focusout":rs=Dg=Co=null;break;case"mousedown":$g=!0;break;case"contextmenu":case"mouseup":case"dragend":$g=!1,Ax(d,n,c);break;case"selectionchange":if(PL)break;case"keydown":case"keyup":Ax(d,n,c)}var E;if(cy)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else Eo?JN(e,n)&&(k="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(k="onCompositionStart");k&&(ZN&&n.locale!=="ko"&&(Eo||k!=="onCompositionStart"?k==="onCompositionEnd"&&Eo&&(E=QN()):(sr=c,ay="value"in sr?sr.value:sr.textContent,Eo=!0)),S=wl(u,k),0<S.length&&(k=new _x(k,e,null,n,c),d.push({event:k,listeners:S}),E?k.data=E:(E=ek(n),E!==null&&(k.data=E)))),(E=vL?yL(e,n):xL(e,n))&&(u=wl(u,"onBeforeInput"),0<u.length&&(c=new _x("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=E))}fk(d,t)})}function ws(e,t,n){return{instance:e,listener:t,currentTarget:n}}function wl(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=hs(e,n),i!=null&&r.unshift(ws(e,i,o)),i=hs(e,t),i!=null&&r.push(ws(e,i,o))),e=e.return}return r}function go(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function jx(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,o?(l=hs(n,i),l!=null&&s.unshift(ws(n,l,a))):o||(l=hs(n,i),l!=null&&s.push(ws(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var IL=/\r\n?/g,jL=/\u0000|\uFFFD/g;function Ox(e){return(typeof e=="string"?e:""+e).replace(IL,`
|
|
38
|
-
`).replace(jL,"")}function ba(e,t,n){if(t=Ox(t),Ox(e)!==t&&n)throw Error(W(425))}function bl(){}var zg=null,Fg=null;function qg(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Bg=typeof setTimeout=="function"?setTimeout:void 0,OL=typeof clearTimeout=="function"?clearTimeout:void 0,Lx=typeof Promise=="function"?Promise:void 0,LL=typeof queueMicrotask=="function"?queueMicrotask:typeof Lx<"u"?function(e){return Lx.resolve(null).then(e).catch(DL)}:Bg;function DL(e){setTimeout(function(){throw e})}function Hc(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),gs(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);gs(t)}function dr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Dx(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var mi=Math.random().toString(36).slice(2),nn="__reactFiber$"+mi,bs="__reactProps$"+mi,jn="__reactContainer$"+mi,Hg="__reactEvents$"+mi,$L="__reactListeners$"+mi,zL="__reactHandles$"+mi;function Or(e){var t=e[nn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[jn]||n[nn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Dx(e);e!==null;){if(n=e[nn])return n;e=Dx(e)}return t}e=n,n=e.parentNode}return null}function Vs(e){return e=e[nn]||e[jn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ko(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function gu(e){return e[bs]||null}var Vg=[],Ro=-1;function Cr(e){return{current:e}}function _e(e){0>Ro||(e.current=Vg[Ro],Vg[Ro]=null,Ro--)}function we(e,t){Ro++,Vg[Ro]=e.current,e.current=t}var wr={},Xe=Cr(wr),st=Cr(!1),Wr=wr;function Go(e,t){var n=e.type.contextTypes;if(!n)return wr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function at(e){return e=e.childContextTypes,e!=null}function _l(){_e(st),_e(Xe)}function $x(e,t,n){if(Xe.current!==wr)throw Error(W(168));we(Xe,t),we(st,n)}function pk(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(W(108,SO(e)||"Unknown",o));return Pe({},n,r)}function Sl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wr,Wr=Xe.current,we(Xe,e),we(st,st.current),!0}function zx(e,t,n){var r=e.stateNode;if(!r)throw Error(W(169));n?(e=pk(e,t,Wr),r.__reactInternalMemoizedMergedChildContext=e,_e(st),_e(Xe),we(Xe,e)):_e(st),we(st,n)}var Cn=null,vu=!1,Vc=!1;function mk(e){Cn===null?Cn=[e]:Cn.push(e)}function FL(e){vu=!0,mk(e)}function Nr(){if(!Vc&&Cn!==null){Vc=!0;var e=0,t=xe;try{var n=Cn;for(xe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Cn=null,vu=!1}catch(o){throw Cn!==null&&(Cn=Cn.slice(e+1)),FN(ry,Nr),o}finally{xe=t,Vc=!1}}return null}var Po=[],To=0,El=null,Cl=0,bt=[],_t=0,Ur=null,Nn=1,kn="";function Mr(e,t){Po[To++]=Cl,Po[To++]=El,El=e,Cl=t}function gk(e,t,n){bt[_t++]=Nn,bt[_t++]=kn,bt[_t++]=Ur,Ur=e;var r=Nn;e=kn;var o=32-Ft(r)-1;r&=~(1<<o),n+=1;var i=32-Ft(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Nn=1<<32-Ft(t)+o|n<<o|r,kn=i+e}else Nn=1<<i|n<<o|r,kn=e}function fy(e){e.return!==null&&(Mr(e,1),gk(e,1,0))}function hy(e){for(;e===El;)El=Po[--To],Po[To]=null,Cl=Po[--To],Po[To]=null;for(;e===Ur;)Ur=bt[--_t],bt[_t]=null,kn=bt[--_t],bt[_t]=null,Nn=bt[--_t],bt[_t]=null}var mt=null,pt=null,Se=!1,Lt=null;function vk(e,t){var n=St(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Fx(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,mt=e,pt=dr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,mt=e,pt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ur!==null?{id:Nn,overflow:kn}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=St(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,mt=e,pt=null,!0):!1;default:return!1}}function Wg(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ug(e){if(Se){var t=pt;if(t){var n=t;if(!Fx(e,t)){if(Wg(e))throw Error(W(418));t=dr(n.nextSibling);var r=mt;t&&Fx(e,t)?vk(r,n):(e.flags=e.flags&-4097|2,Se=!1,mt=e)}}else{if(Wg(e))throw Error(W(418));e.flags=e.flags&-4097|2,Se=!1,mt=e}}}function qx(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mt=e}function _a(e){if(e!==mt)return!1;if(!Se)return qx(e),Se=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!qg(e.type,e.memoizedProps)),t&&(t=pt)){if(Wg(e))throw yk(),Error(W(418));for(;t;)vk(e,t),t=dr(t.nextSibling)}if(qx(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){pt=dr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}pt=null}}else pt=mt?dr(e.stateNode.nextSibling):null;return!0}function yk(){for(var e=pt;e;)e=dr(e.nextSibling)}function Yo(){pt=mt=null,Se=!1}function py(e){Lt===null?Lt=[e]:Lt.push(e)}var qL=qn.ReactCurrentBatchConfig;function ji(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(W(309));var r=n.stateNode}if(!r)throw Error(W(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var a=o.refs;s===null?delete a[i]:a[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(W(284));if(!n._owner)throw Error(W(290,e))}return e}function Sa(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Bx(e){var t=e._init;return t(e._payload)}function xk(e){function t(v,w){if(e){var x=v.deletions;x===null?(v.deletions=[w],v.flags|=16):x.push(w)}}function n(v,w){if(!e)return null;for(;w!==null;)t(v,w),w=w.sibling;return null}function r(v,w){for(v=new Map;w!==null;)w.key!==null?v.set(w.key,w):v.set(w.index,w),w=w.sibling;return v}function o(v,w){return v=mr(v,w),v.index=0,v.sibling=null,v}function i(v,w,x){return v.index=x,e?(x=v.alternate,x!==null?(x=x.index,x<w?(v.flags|=2,w):x):(v.flags|=2,w)):(v.flags|=1048576,w)}function s(v){return e&&v.alternate===null&&(v.flags|=2),v}function a(v,w,x,_){return w===null||w.tag!==6?(w=Qc(x,v.mode,_),w.return=v,w):(w=o(w,x),w.return=v,w)}function l(v,w,x,_){var C=x.type;return C===So?c(v,w,x.props.children,_,x.key):w!==null&&(w.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===er&&Bx(C)===w.type)?(_=o(w,x.props),_.ref=ji(v,w,x),_.return=v,_):(_=ol(x.type,x.key,x.props,null,v.mode,_),_.ref=ji(v,w,x),_.return=v,_)}function u(v,w,x,_){return w===null||w.tag!==4||w.stateNode.containerInfo!==x.containerInfo||w.stateNode.implementation!==x.implementation?(w=Zc(x,v.mode,_),w.return=v,w):(w=o(w,x.children||[]),w.return=v,w)}function c(v,w,x,_,C){return w===null||w.tag!==7?(w=qr(x,v.mode,_,C),w.return=v,w):(w=o(w,x),w.return=v,w)}function d(v,w,x){if(typeof w=="string"&&w!==""||typeof w=="number")return w=Qc(""+w,v.mode,x),w.return=v,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case fa:return x=ol(w.type,w.key,w.props,null,v.mode,x),x.ref=ji(v,null,w),x.return=v,x;case _o:return w=Zc(w,v.mode,x),w.return=v,w;case er:var _=w._init;return d(v,_(w._payload),x)}if(qi(w)||Pi(w))return w=qr(w,v.mode,x,null),w.return=v,w;Sa(v,w)}return null}function f(v,w,x,_){var C=w!==null?w.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return C!==null?null:a(v,w,""+x,_);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case fa:return x.key===C?l(v,w,x,_):null;case _o:return x.key===C?u(v,w,x,_):null;case er:return C=x._init,f(v,w,C(x._payload),_)}if(qi(x)||Pi(x))return C!==null?null:c(v,w,x,_,null);Sa(v,x)}return null}function h(v,w,x,_,C){if(typeof _=="string"&&_!==""||typeof _=="number")return v=v.get(x)||null,a(w,v,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case fa:return v=v.get(_.key===null?x:_.key)||null,l(w,v,_,C);case _o:return v=v.get(_.key===null?x:_.key)||null,u(w,v,_,C);case er:var S=_._init;return h(v,w,x,S(_._payload),C)}if(qi(_)||Pi(_))return v=v.get(x)||null,c(w,v,_,C,null);Sa(w,_)}return null}function g(v,w,x,_){for(var C=null,S=null,E=w,k=w=0,T=null;E!==null&&k<x.length;k++){E.index>k?(T=E,E=null):T=E.sibling;var I=f(v,E,x[k],_);if(I===null){E===null&&(E=T);break}e&&E&&I.alternate===null&&t(v,E),w=i(I,w,k),S===null?C=I:S.sibling=I,S=I,E=T}if(k===x.length)return n(v,E),Se&&Mr(v,k),C;if(E===null){for(;k<x.length;k++)E=d(v,x[k],_),E!==null&&(w=i(E,w,k),S===null?C=E:S.sibling=E,S=E);return Se&&Mr(v,k),C}for(E=r(v,E);k<x.length;k++)T=h(E,v,k,x[k],_),T!==null&&(e&&T.alternate!==null&&E.delete(T.key===null?k:T.key),w=i(T,w,k),S===null?C=T:S.sibling=T,S=T);return e&&E.forEach(function(P){return t(v,P)}),Se&&Mr(v,k),C}function m(v,w,x,_){var C=Pi(x);if(typeof C!="function")throw Error(W(150));if(x=C.call(x),x==null)throw Error(W(151));for(var S=C=null,E=w,k=w=0,T=null,I=x.next();E!==null&&!I.done;k++,I=x.next()){E.index>k?(T=E,E=null):T=E.sibling;var P=f(v,E,I.value,_);if(P===null){E===null&&(E=T);break}e&&E&&P.alternate===null&&t(v,E),w=i(P,w,k),S===null?C=P:S.sibling=P,S=P,E=T}if(I.done)return n(v,E),Se&&Mr(v,k),C;if(E===null){for(;!I.done;k++,I=x.next())I=d(v,I.value,_),I!==null&&(w=i(I,w,k),S===null?C=I:S.sibling=I,S=I);return Se&&Mr(v,k),C}for(E=r(v,E);!I.done;k++,I=x.next())I=h(E,v,k,I.value,_),I!==null&&(e&&I.alternate!==null&&E.delete(I.key===null?k:I.key),w=i(I,w,k),S===null?C=I:S.sibling=I,S=I);return e&&E.forEach(function(j){return t(v,j)}),Se&&Mr(v,k),C}function b(v,w,x,_){if(typeof x=="object"&&x!==null&&x.type===So&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case fa:e:{for(var C=x.key,S=w;S!==null;){if(S.key===C){if(C=x.type,C===So){if(S.tag===7){n(v,S.sibling),w=o(S,x.props.children),w.return=v,v=w;break e}}else if(S.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===er&&Bx(C)===S.type){n(v,S.sibling),w=o(S,x.props),w.ref=ji(v,S,x),w.return=v,v=w;break e}n(v,S);break}else t(v,S);S=S.sibling}x.type===So?(w=qr(x.props.children,v.mode,_,x.key),w.return=v,v=w):(_=ol(x.type,x.key,x.props,null,v.mode,_),_.ref=ji(v,w,x),_.return=v,v=_)}return s(v);case _o:e:{for(S=x.key;w!==null;){if(w.key===S)if(w.tag===4&&w.stateNode.containerInfo===x.containerInfo&&w.stateNode.implementation===x.implementation){n(v,w.sibling),w=o(w,x.children||[]),w.return=v,v=w;break e}else{n(v,w);break}else t(v,w);w=w.sibling}w=Zc(x,v.mode,_),w.return=v,v=w}return s(v);case er:return S=x._init,b(v,w,S(x._payload),_)}if(qi(x))return g(v,w,x,_);if(Pi(x))return m(v,w,x,_);Sa(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,w!==null&&w.tag===6?(n(v,w.sibling),w=o(w,x),w.return=v,v=w):(n(v,w),w=Qc(x,v.mode,_),w.return=v,v=w),s(v)):n(v,w)}return b}var Ko=xk(!0),wk=xk(!1),Nl=Cr(null),kl=null,Ao=null,my=null;function gy(){my=Ao=kl=null}function vy(e){var t=Nl.current;_e(Nl),e._currentValue=t}function Gg(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Fo(e,t){kl=e,my=Ao=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ot=!0),e.firstContext=null)}function Ct(e){var t=e._currentValue;if(my!==e)if(e={context:e,memoizedValue:t,next:null},Ao===null){if(kl===null)throw Error(W(308));Ao=e,kl.dependencies={lanes:0,firstContext:e}}else Ao=Ao.next=e;return t}var Lr=null;function yy(e){Lr===null?Lr=[e]:Lr.push(e)}function bk(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,yy(t)):(n.next=o.next,o.next=n),t.interleaved=n,On(e,r)}function On(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var tr=!1;function xy(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function _k(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function An(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,me&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,On(e,n)}return o=r.interleaved,o===null?(t.next=t,yy(r)):(t.next=o.next,o.next=t),r.interleaved=t,On(e,n)}function Za(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,oy(e,n)}}function Hx(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Rl(e,t,n,r){var o=e.updateQueue;tr=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?i=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;s=0,c=u=l=null,a=i;do{var f=a.lane,h=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,m=a;switch(f=t,h=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(h,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,f=typeof g=="function"?g.call(h,d,f):g,f==null)break e;d=Pe({},d,f);break e;case 2:tr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,s|=f;if(a=a.next,a===null){if(a=o.shared.pending,a===null)break;f=a,a=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(c===null&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Yr|=s,e.lanes=s,e.memoizedState=d}}function Vx(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(W(191,o));o.call(r)}}}var Ws={},ln=Cr(Ws),_s=Cr(Ws),Ss=Cr(Ws);function Dr(e){if(e===Ws)throw Error(W(174));return e}function wy(e,t){switch(we(Ss,t),we(_s,e),we(ln,Ws),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:kg(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=kg(t,e)}_e(ln),we(ln,t)}function Xo(){_e(ln),_e(_s),_e(Ss)}function Sk(e){Dr(Ss.current);var t=Dr(ln.current),n=kg(t,e.type);t!==n&&(we(_s,e),we(ln,n))}function by(e){_s.current===e&&(_e(ln),_e(_s))}var ke=Cr(0);function Pl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wc=[];function _y(){for(var e=0;e<Wc.length;e++)Wc[e]._workInProgressVersionPrimary=null;Wc.length=0}var Ja=qn.ReactCurrentDispatcher,Uc=qn.ReactCurrentBatchConfig,Gr=0,Re=null,$e=null,Fe=null,Tl=!1,os=!1,Es=0,BL=0;function Ge(){throw Error(W(321))}function Sy(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Bt(e[n],t[n]))return!1;return!0}function Ey(e,t,n,r,o,i){if(Gr=i,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ja.current=e===null||e.memoizedState===null?UL:GL,e=n(r,o),os){i=0;do{if(os=!1,Es=0,25<=i)throw Error(W(301));i+=1,Fe=$e=null,t.updateQueue=null,Ja.current=YL,e=n(r,o)}while(os)}if(Ja.current=Al,t=$e!==null&&$e.next!==null,Gr=0,Fe=$e=Re=null,Tl=!1,t)throw Error(W(300));return e}function Cy(){var e=Es!==0;return Es=0,e}function Jt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fe===null?Re.memoizedState=Fe=e:Fe=Fe.next=e,Fe}function Nt(){if($e===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=Fe===null?Re.memoizedState:Fe.next;if(t!==null)Fe=t,$e=e;else{if(e===null)throw Error(W(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},Fe===null?Re.memoizedState=Fe=e:Fe=Fe.next=e}return Fe}function Cs(e,t){return typeof t=="function"?t(e):t}function Gc(e){var t=Nt(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=$e,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var a=s=null,l=null,u=i;do{var c=u.lane;if((Gr&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,s=r):l=l.next=d,Re.lanes|=c,Yr|=c}u=u.next}while(u!==null&&u!==i);l===null?s=r:l.next=a,Bt(r,t.memoizedState)||(ot=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,Re.lanes|=i,Yr|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Yc(e){var t=Nt(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);Bt(i,t.memoizedState)||(ot=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Ek(){}function Ck(e,t){var n=Re,r=Nt(),o=t(),i=!Bt(r.memoizedState,o);if(i&&(r.memoizedState=o,ot=!0),r=r.queue,Ny(Rk.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Fe!==null&&Fe.memoizedState.tag&1){if(n.flags|=2048,Ns(9,kk.bind(null,n,r,o,t),void 0,null),qe===null)throw Error(W(349));Gr&30||Nk(n,t,o)}return o}function Nk(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kk(e,t,n,r){t.value=n,t.getSnapshot=r,Pk(t)&&Tk(e)}function Rk(e,t,n){return n(function(){Pk(t)&&Tk(e)})}function Pk(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bt(e,n)}catch{return!0}}function Tk(e){var t=On(e,1);t!==null&&qt(t,e,1,-1)}function Wx(e){var t=Jt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:e},t.queue=e,e=e.dispatch=WL.bind(null,Re,e),[t.memoizedState,e]}function Ns(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Re.updateQueue,t===null?(t={lastEffect:null,stores:null},Re.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Ak(){return Nt().memoizedState}function el(e,t,n,r){var o=Jt();Re.flags|=e,o.memoizedState=Ns(1|t,n,void 0,r===void 0?null:r)}function yu(e,t,n,r){var o=Nt();r=r===void 0?null:r;var i=void 0;if($e!==null){var s=$e.memoizedState;if(i=s.destroy,r!==null&&Sy(r,s.deps)){o.memoizedState=Ns(t,n,i,r);return}}Re.flags|=e,o.memoizedState=Ns(1|t,n,i,r)}function Ux(e,t){return el(8390656,8,e,t)}function Ny(e,t){return yu(2048,8,e,t)}function Mk(e,t){return yu(4,2,e,t)}function Ik(e,t){return yu(4,4,e,t)}function jk(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ok(e,t,n){return n=n!=null?n.concat([e]):null,yu(4,4,jk.bind(null,t,e),n)}function ky(){}function Lk(e,t){var n=Nt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Sy(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Dk(e,t){var n=Nt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Sy(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function $k(e,t,n){return Gr&21?(Bt(n,t)||(n=HN(),Re.lanes|=n,Yr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ot=!0),e.memoizedState=n)}function HL(e,t){var n=xe;xe=n!==0&&4>n?n:4,e(!0);var r=Uc.transition;Uc.transition={};try{e(!1),t()}finally{xe=n,Uc.transition=r}}function zk(){return Nt().memoizedState}function VL(e,t,n){var r=pr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Fk(e))qk(t,n);else if(n=bk(e,t,n,r),n!==null){var o=Ze();qt(n,e,r,o),Bk(n,t,r)}}function WL(e,t,n){var r=pr(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fk(e))qk(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,Bt(a,s)){var l=t.interleaved;l===null?(o.next=o,yy(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=bk(e,t,o,r),n!==null&&(o=Ze(),qt(n,e,r,o),Bk(n,t,r))}}function Fk(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function qk(e,t){os=Tl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Bk(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,oy(e,n)}}var Al={readContext:Ct,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useInsertionEffect:Ge,useLayoutEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useMutableSource:Ge,useSyncExternalStore:Ge,useId:Ge,unstable_isNewReconciler:!1},UL={readContext:Ct,useCallback:function(e,t){return Jt().memoizedState=[e,t===void 0?null:t],e},useContext:Ct,useEffect:Ux,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,el(4194308,4,jk.bind(null,t,e),n)},useLayoutEffect:function(e,t){return el(4194308,4,e,t)},useInsertionEffect:function(e,t){return el(4,2,e,t)},useMemo:function(e,t){var n=Jt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Jt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=VL.bind(null,Re,e),[r.memoizedState,e]},useRef:function(e){var t=Jt();return e={current:e},t.memoizedState=e},useState:Wx,useDebugValue:ky,useDeferredValue:function(e){return Jt().memoizedState=e},useTransition:function(){var e=Wx(!1),t=e[0];return e=HL.bind(null,e[1]),Jt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Re,o=Jt();if(Se){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),qe===null)throw Error(W(349));Gr&30||Nk(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Ux(Rk.bind(null,r,i,e),[e]),r.flags|=2048,Ns(9,kk.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Jt(),t=qe.identifierPrefix;if(Se){var n=kn,r=Nn;n=(r&~(1<<32-Ft(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Es++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=BL++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},GL={readContext:Ct,useCallback:Lk,useContext:Ct,useEffect:Ny,useImperativeHandle:Ok,useInsertionEffect:Mk,useLayoutEffect:Ik,useMemo:Dk,useReducer:Gc,useRef:Ak,useState:function(){return Gc(Cs)},useDebugValue:ky,useDeferredValue:function(e){var t=Nt();return $k(t,$e.memoizedState,e)},useTransition:function(){var e=Gc(Cs)[0],t=Nt().memoizedState;return[e,t]},useMutableSource:Ek,useSyncExternalStore:Ck,useId:zk,unstable_isNewReconciler:!1},YL={readContext:Ct,useCallback:Lk,useContext:Ct,useEffect:Ny,useImperativeHandle:Ok,useInsertionEffect:Mk,useLayoutEffect:Ik,useMemo:Dk,useReducer:Yc,useRef:Ak,useState:function(){return Yc(Cs)},useDebugValue:ky,useDeferredValue:function(e){var t=Nt();return $e===null?t.memoizedState=e:$k(t,$e.memoizedState,e)},useTransition:function(){var e=Yc(Cs)[0],t=Nt().memoizedState;return[e,t]},useMutableSource:Ek,useSyncExternalStore:Ck,useId:zk,unstable_isNewReconciler:!1};function It(e,t){if(e&&e.defaultProps){t=Pe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Yg(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Pe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var xu={isMounted:function(e){return(e=e._reactInternals)?ao(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ze(),o=pr(e),i=An(r,o);i.payload=t,n!=null&&(i.callback=n),t=fr(e,i,o),t!==null&&(qt(t,e,o,r),Za(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ze(),o=pr(e),i=An(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=fr(e,i,o),t!==null&&(qt(t,e,o,r),Za(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ze(),r=pr(e),o=An(n,r);o.tag=2,t!=null&&(o.callback=t),t=fr(e,o,r),t!==null&&(qt(t,e,r,n),Za(t,e,r))}};function Gx(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!ys(n,r)||!ys(o,i):!0}function Hk(e,t,n){var r=!1,o=wr,i=t.contextType;return typeof i=="object"&&i!==null?i=Ct(i):(o=at(t)?Wr:Xe.current,r=t.contextTypes,i=(r=r!=null)?Go(e,o):wr),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=xu,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Yx(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&xu.enqueueReplaceState(t,t.state,null)}function Kg(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},xy(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=Ct(i):(i=at(t)?Wr:Xe.current,o.context=Go(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Yg(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&xu.enqueueReplaceState(o,o.state,null),Rl(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Qo(e,t){try{var n="",r=t;do n+=_O(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
39
|
-
Error generating stack: `+i.message+`
|
|
40
|
-
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Kc(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Xg(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var KL=typeof WeakMap=="function"?WeakMap:Map;function Vk(e,t,n){n=An(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Il||(Il=!0,sv=r),Xg(e,t)},n}function Wk(e,t,n){n=An(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Xg(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Xg(e,t),typeof r!="function"&&(hr===null?hr=new Set([this]):hr.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Kx(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new KL;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=uD.bind(null,e,t,n),t.then(e,e))}function Xx(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Qx(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=An(-1,1),t.tag=2,fr(n,t,1))),n.lanes|=1),e)}var XL=qn.ReactCurrentOwner,ot=!1;function Qe(e,t,n,r){t.child=e===null?wk(t,null,n,r):Ko(t,e.child,n,r)}function Zx(e,t,n,r,o){n=n.render;var i=t.ref;return Fo(t,o),r=Ey(e,t,n,r,i,o),n=Cy(),e!==null&&!ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ln(e,t,o)):(Se&&n&&fy(t),t.flags|=1,Qe(e,t,r,o),t.child)}function Jx(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!Oy(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Uk(e,t,i,r,o)):(e=ol(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:ys,n(s,r)&&e.ref===t.ref)return Ln(e,t,o)}return t.flags|=1,e=mr(i,r),e.ref=t.ref,e.return=t,t.child=e}function Uk(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(ys(i,r)&&e.ref===t.ref)if(ot=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(ot=!0);else return t.lanes=e.lanes,Ln(e,t,o)}return Qg(e,t,n,r,o)}function Gk(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},we(Io,ct),ct|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,we(Io,ct),ct|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,we(Io,ct),ct|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,we(Io,ct),ct|=r;return Qe(e,t,o,n),t.child}function Yk(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Qg(e,t,n,r,o){var i=at(n)?Wr:Xe.current;return i=Go(t,i),Fo(t,o),n=Ey(e,t,n,r,i,o),r=Cy(),e!==null&&!ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ln(e,t,o)):(Se&&r&&fy(t),t.flags|=1,Qe(e,t,n,o),t.child)}function ew(e,t,n,r,o){if(at(n)){var i=!0;Sl(t)}else i=!1;if(Fo(t,o),t.stateNode===null)tl(e,t),Hk(t,n,r),Kg(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ct(u):(u=at(n)?Wr:Xe.current,u=Go(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Yx(t,s,r,u),tr=!1;var f=t.memoizedState;s.state=f,Rl(t,r,s,o),l=t.memoizedState,a!==r||f!==l||st.current||tr?(typeof c=="function"&&(Yg(t,n,c,r),l=t.memoizedState),(a=tr||Gx(t,n,a,r,f,l,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,_k(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:It(t.type,a),s.props=u,d=t.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Ct(l):(l=at(n)?Wr:Xe.current,l=Go(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||f!==l)&&Yx(t,s,r,l),tr=!1,f=t.memoizedState,s.state=f,Rl(t,r,s,o);var g=t.memoizedState;a!==d||f!==g||st.current||tr?(typeof h=="function"&&(Yg(t,n,h,r),g=t.memoizedState),(u=tr||Gx(t,n,u,r,f,g,l)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,g,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,g,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),s.props=r,s.state=g,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Zg(e,t,n,r,i,o)}function Zg(e,t,n,r,o,i){Yk(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&zx(t,n,!1),Ln(e,t,i);r=t.stateNode,XL.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Ko(t,e.child,null,i),t.child=Ko(t,null,a,i)):Qe(e,t,a,i),t.memoizedState=r.state,o&&zx(t,n,!0),t.child}function Kk(e){var t=e.stateNode;t.pendingContext?$x(e,t.pendingContext,t.pendingContext!==t.context):t.context&&$x(e,t.context,!1),wy(e,t.containerInfo)}function tw(e,t,n,r,o){return Yo(),py(o),t.flags|=256,Qe(e,t,n,r),t.child}var Jg={dehydrated:null,treeContext:null,retryLane:0};function ev(e){return{baseLanes:e,cachePool:null,transitions:null}}function Xk(e,t,n){var r=t.pendingProps,o=ke.current,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(o&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),we(ke,o&1),e===null)return Ug(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=s):i=_u(s,r,0,null),e=qr(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ev(n),t.memoizedState=Jg,e):Ry(t,s));if(o=e.memoizedState,o!==null&&(a=o.dehydrated,a!==null))return QL(e,t,s,r,a,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,a=o.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=mr(o,l),r.subtreeFlags=o.subtreeFlags&14680064),a!==null?i=mr(a,i):(i=qr(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?ev(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=Jg,r}return i=e.child,e=i.sibling,r=mr(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ry(e,t){return t=_u({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ea(e,t,n,r){return r!==null&&py(r),Ko(t,e.child,null,n),e=Ry(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function QL(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=Kc(Error(W(422))),Ea(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=_u({mode:"visible",children:r.children},o,0,null),i=qr(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Ko(t,e.child,null,s),t.child.memoizedState=ev(s),t.memoizedState=Jg,i);if(!(t.mode&1))return Ea(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(W(419)),r=Kc(i,r,void 0),Ea(e,t,s,r)}if(a=(s&e.childLanes)!==0,ot||a){if(r=qe,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|s)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,On(e,o),qt(r,e,o,-1))}return jy(),r=Kc(Error(W(421))),Ea(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=cD.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,pt=dr(o.nextSibling),mt=t,Se=!0,Lt=null,e!==null&&(bt[_t++]=Nn,bt[_t++]=kn,bt[_t++]=Ur,Nn=e.id,kn=e.overflow,Ur=t),t=Ry(t,r.children),t.flags|=4096,t)}function nw(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Gg(e.return,t,n)}function Xc(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Qk(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Qe(e,t,r.children,n),r=ke.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&nw(e,n,t);else if(e.tag===19)nw(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(we(ke,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Pl(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Xc(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Pl(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Xc(t,!0,n,null,i);break;case"together":Xc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function tl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ln(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Yr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,n=mr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=mr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ZL(e,t,n){switch(t.tag){case 3:Kk(t),Yo();break;case 5:Sk(t);break;case 1:at(t.type)&&Sl(t);break;case 4:wy(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;we(Nl,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(we(ke,ke.current&1),t.flags|=128,null):n&t.child.childLanes?Xk(e,t,n):(we(ke,ke.current&1),e=Ln(e,t,n),e!==null?e.sibling:null);we(ke,ke.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Qk(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),we(ke,ke.current),r)break;return null;case 22:case 23:return t.lanes=0,Gk(e,t,n)}return Ln(e,t,n)}var Zk,tv,Jk,e2;Zk=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};tv=function(){};Jk=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Dr(ln.current);var i=null;switch(n){case"input":o=Sg(e,o),r=Sg(e,r),i=[];break;case"select":o=Pe({},o,{value:void 0}),r=Pe({},r,{value:void 0}),i=[];break;case"textarea":o=Ng(e,o),r=Ng(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=bl)}Rg(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var a=o[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(ds.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(ds.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&be("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};e2=function(e,t,n,r){n!==r&&(t.flags|=4)};function Oi(e,t){if(!Se)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ye(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function JL(e,t,n){var r=t.pendingProps;switch(hy(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(t),null;case 1:return at(t.type)&&_l(),Ye(t),null;case 3:return r=t.stateNode,Xo(),_e(st),_e(Xe),_y(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(_a(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Lt!==null&&(uv(Lt),Lt=null))),tv(e,t),Ye(t),null;case 5:by(t);var o=Dr(Ss.current);if(n=t.type,e!==null&&t.stateNode!=null)Jk(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(W(166));return Ye(t),null}if(e=Dr(ln.current),_a(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[nn]=t,r[bs]=i,e=(t.mode&1)!==0,n){case"dialog":be("cancel",r),be("close",r);break;case"iframe":case"object":case"embed":be("load",r);break;case"video":case"audio":for(o=0;o<Hi.length;o++)be(Hi[o],r);break;case"source":be("error",r);break;case"img":case"image":case"link":be("error",r),be("load",r);break;case"details":be("toggle",r);break;case"input":dx(r,i),be("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},be("invalid",r);break;case"textarea":hx(r,i),be("invalid",r)}Rg(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var a=i[s];s==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&ba(r.textContent,a,e),o=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&ba(r.textContent,a,e),o=["children",""+a]):ds.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&be("scroll",r)}switch(n){case"input":ha(r),fx(r,i,!0);break;case"textarea":ha(r),px(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=bl)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=RN(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[nn]=t,e[bs]=r,Zk(e,t,!1,!1),t.stateNode=e;e:{switch(s=Pg(n,r),n){case"dialog":be("cancel",e),be("close",e),o=r;break;case"iframe":case"object":case"embed":be("load",e),o=r;break;case"video":case"audio":for(o=0;o<Hi.length;o++)be(Hi[o],e);o=r;break;case"source":be("error",e),o=r;break;case"img":case"image":case"link":be("error",e),be("load",e),o=r;break;case"details":be("toggle",e),o=r;break;case"input":dx(e,r),o=Sg(e,r),be("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Pe({},r,{value:void 0}),be("invalid",e);break;case"textarea":hx(e,r),o=Ng(e,r),be("invalid",e);break;default:o=r}Rg(n,o),a=o;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?AN(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&PN(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&fs(e,l):typeof l=="number"&&fs(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ds.hasOwnProperty(i)?l!=null&&i==="onScroll"&&be("scroll",e):l!=null&&Zv(e,i,l,s))}switch(n){case"input":ha(e),fx(e,r,!1);break;case"textarea":ha(e),px(e);break;case"option":r.value!=null&&e.setAttribute("value",""+xr(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Lo(e,!!r.multiple,i,!1):r.defaultValue!=null&&Lo(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=bl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Ye(t),null;case 6:if(e&&t.stateNode!=null)e2(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(W(166));if(n=Dr(Ss.current),Dr(ln.current),_a(t)){if(r=t.stateNode,n=t.memoizedProps,r[nn]=t,(i=r.nodeValue!==n)&&(e=mt,e!==null))switch(e.tag){case 3:ba(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ba(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[nn]=t,t.stateNode=r}return Ye(t),null;case 13:if(_e(ke),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Se&&pt!==null&&t.mode&1&&!(t.flags&128))yk(),Yo(),t.flags|=98560,i=!1;else if(i=_a(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(W(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(W(317));i[nn]=t}else Yo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ye(t),i=!1}else Lt!==null&&(uv(Lt),Lt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||ke.current&1?ze===0&&(ze=3):jy())),t.updateQueue!==null&&(t.flags|=4),Ye(t),null);case 4:return Xo(),tv(e,t),e===null&&xs(t.stateNode.containerInfo),Ye(t),null;case 10:return vy(t.type._context),Ye(t),null;case 17:return at(t.type)&&_l(),Ye(t),null;case 19:if(_e(ke),i=t.memoizedState,i===null)return Ye(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Oi(i,!1);else{if(ze!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Pl(e),s!==null){for(t.flags|=128,Oi(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return we(ke,ke.current&1|2),t.child}e=e.sibling}i.tail!==null&&Me()>Zo&&(t.flags|=128,r=!0,Oi(i,!1),t.lanes=4194304)}else{if(!r)if(e=Pl(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Oi(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!Se)return Ye(t),null}else 2*Me()-i.renderingStartTime>Zo&&n!==1073741824&&(t.flags|=128,r=!0,Oi(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Me(),t.sibling=null,n=ke.current,we(ke,r?n&1|2:n&1),t):(Ye(t),null);case 22:case 23:return Iy(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ct&1073741824&&(Ye(t),t.subtreeFlags&6&&(t.flags|=8192)):Ye(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function eD(e,t){switch(hy(t),t.tag){case 1:return at(t.type)&&_l(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xo(),_e(st),_e(Xe),_y(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return by(t),null;case 13:if(_e(ke),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));Yo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(ke),null;case 4:return Xo(),null;case 10:return vy(t.type._context),null;case 22:case 23:return Iy(),null;case 24:return null;default:return null}}var Ca=!1,Ke=!1,tD=typeof WeakSet=="function"?WeakSet:Set,J=null;function Mo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Te(e,t,r)}else n.current=null}function nv(e,t,n){try{n()}catch(r){Te(e,t,r)}}var rw=!1;function nD(e,t){if(zg=yl,e=ik(),dy(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||o!==0&&d.nodeType!==3||(a=s+o),d!==i||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===o&&(a=s),f===i&&++c===r&&(l=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Fg={focusedElem:e,selectionRange:n},yl=!1,J=t;J!==null;)if(t=J,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,J=e;else for(;J!==null;){t=J;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,b=g.memoizedState,v=t.stateNode,w=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:It(t.type,m),b);v.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(_){Te(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,J=e;break}J=t.return}return g=rw,rw=!1,g}function is(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&nv(t,n,i)}o=o.next}while(o!==r)}}function wu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function rv(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function t2(e){var t=e.alternate;t!==null&&(e.alternate=null,t2(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[nn],delete t[bs],delete t[Hg],delete t[$L],delete t[zL])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function n2(e){return e.tag===5||e.tag===3||e.tag===4}function ow(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||n2(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ov(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bl));else if(r!==4&&(e=e.child,e!==null))for(ov(e,t,n),e=e.sibling;e!==null;)ov(e,t,n),e=e.sibling}function iv(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(iv(e,t,n),e=e.sibling;e!==null;)iv(e,t,n),e=e.sibling}var He=null,jt=!1;function Yn(e,t,n){for(n=n.child;n!==null;)r2(e,t,n),n=n.sibling}function r2(e,t,n){if(an&&typeof an.onCommitFiberUnmount=="function")try{an.onCommitFiberUnmount(fu,n)}catch{}switch(n.tag){case 5:Ke||Mo(n,t);case 6:var r=He,o=jt;He=null,Yn(e,t,n),He=r,jt=o,He!==null&&(jt?(e=He,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):He.removeChild(n.stateNode));break;case 18:He!==null&&(jt?(e=He,n=n.stateNode,e.nodeType===8?Hc(e.parentNode,n):e.nodeType===1&&Hc(e,n),gs(e)):Hc(He,n.stateNode));break;case 4:r=He,o=jt,He=n.stateNode.containerInfo,jt=!0,Yn(e,t,n),He=r,jt=o;break;case 0:case 11:case 14:case 15:if(!Ke&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&(i&2||i&4)&&nv(n,t,s),o=o.next}while(o!==r)}Yn(e,t,n);break;case 1:if(!Ke&&(Mo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Te(n,t,a)}Yn(e,t,n);break;case 21:Yn(e,t,n);break;case 22:n.mode&1?(Ke=(r=Ke)||n.memoizedState!==null,Yn(e,t,n),Ke=r):Yn(e,t,n);break;default:Yn(e,t,n)}}function iw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new tD),t.forEach(function(r){var o=dD.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function At(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:He=a.stateNode,jt=!1;break e;case 3:He=a.stateNode.containerInfo,jt=!0;break e;case 4:He=a.stateNode.containerInfo,jt=!0;break e}a=a.return}if(He===null)throw Error(W(160));r2(i,s,o),He=null,jt=!1;var l=o.alternate;l!==null&&(l.return=null),o.return=null}catch(u){Te(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)o2(t,e),t=t.sibling}function o2(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(At(t,e),Zt(e),r&4){try{is(3,e,e.return),wu(3,e)}catch(m){Te(e,e.return,m)}try{is(5,e,e.return)}catch(m){Te(e,e.return,m)}}break;case 1:At(t,e),Zt(e),r&512&&n!==null&&Mo(n,n.return);break;case 5:if(At(t,e),Zt(e),r&512&&n!==null&&Mo(n,n.return),e.flags&32){var o=e.stateNode;try{fs(o,"")}catch(m){Te(e,e.return,m)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&NN(o,i),Pg(a,s);var u=Pg(a,i);for(s=0;s<l.length;s+=2){var c=l[s],d=l[s+1];c==="style"?AN(o,d):c==="dangerouslySetInnerHTML"?PN(o,d):c==="children"?fs(o,d):Zv(o,c,d,u)}switch(a){case"input":Eg(o,i);break;case"textarea":kN(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?Lo(o,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?Lo(o,!!i.multiple,i.defaultValue,!0):Lo(o,!!i.multiple,i.multiple?[]:"",!1))}o[bs]=i}catch(m){Te(e,e.return,m)}}break;case 6:if(At(t,e),Zt(e),r&4){if(e.stateNode===null)throw Error(W(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(m){Te(e,e.return,m)}}break;case 3:if(At(t,e),Zt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{gs(t.containerInfo)}catch(m){Te(e,e.return,m)}break;case 4:At(t,e),Zt(e);break;case 13:At(t,e),Zt(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(Ay=Me())),r&4&&iw(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Ke=(u=Ke)||c,At(t,e),Ke=u):At(t,e),Zt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(J=e,c=e.child;c!==null;){for(d=J=c;J!==null;){switch(f=J,h=f.child,f.tag){case 0:case 11:case 14:case 15:is(4,f,f.return);break;case 1:Mo(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){Te(r,n,m)}}break;case 5:Mo(f,f.return);break;case 22:if(f.memoizedState!==null){aw(d);continue}}h!==null?(h.return=f,J=h):aw(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{o=d.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=TN("display",s))}catch(m){Te(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){Te(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:At(t,e),Zt(e),r&4&&iw(e);break;case 21:break;default:At(t,e),Zt(e)}}function Zt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(n2(n)){var r=n;break e}n=n.return}throw Error(W(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(fs(o,""),r.flags&=-33);var i=ow(e);iv(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,a=ow(e);ov(e,a,s);break;default:throw Error(W(161))}}catch(l){Te(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rD(e,t,n){J=e,i2(e)}function i2(e,t,n){for(var r=(e.mode&1)!==0;J!==null;){var o=J,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||Ca;if(!s){var a=o.alternate,l=a!==null&&a.memoizedState!==null||Ke;a=Ca;var u=Ke;if(Ca=s,(Ke=l)&&!u)for(J=o;J!==null;)s=J,l=s.child,s.tag===22&&s.memoizedState!==null?lw(o):l!==null?(l.return=s,J=l):lw(o);for(;i!==null;)J=i,i2(i),i=i.sibling;J=o,Ca=a,Ke=u}sw(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,J=i):sw(e)}}function sw(e){for(;J!==null;){var t=J;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ke||wu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ke)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:It(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Vx(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Vx(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&gs(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}Ke||t.flags&512&&rv(t)}catch(f){Te(t,t.return,f)}}if(t===e){J=null;break}if(n=t.sibling,n!==null){n.return=t.return,J=n;break}J=t.return}}function aw(e){for(;J!==null;){var t=J;if(t===e){J=null;break}var n=t.sibling;if(n!==null){n.return=t.return,J=n;break}J=t.return}}function lw(e){for(;J!==null;){var t=J;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{wu(4,t)}catch(l){Te(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(l){Te(t,o,l)}}var i=t.return;try{rv(t)}catch(l){Te(t,i,l)}break;case 5:var s=t.return;try{rv(t)}catch(l){Te(t,s,l)}}}catch(l){Te(t,t.return,l)}if(t===e){J=null;break}var a=t.sibling;if(a!==null){a.return=t.return,J=a;break}J=t.return}}var oD=Math.ceil,Ml=qn.ReactCurrentDispatcher,Py=qn.ReactCurrentOwner,Et=qn.ReactCurrentBatchConfig,me=0,qe=null,je=null,Ve=0,ct=0,Io=Cr(0),ze=0,ks=null,Yr=0,bu=0,Ty=0,ss=null,nt=null,Ay=0,Zo=1/0,En=null,Il=!1,sv=null,hr=null,Na=!1,ar=null,jl=0,as=0,av=null,nl=-1,rl=0;function Ze(){return me&6?Me():nl!==-1?nl:nl=Me()}function pr(e){return e.mode&1?me&2&&Ve!==0?Ve&-Ve:qL.transition!==null?(rl===0&&(rl=HN()),rl):(e=xe,e!==0||(e=window.event,e=e===void 0?16:XN(e.type)),e):1}function qt(e,t,n,r){if(50<as)throw as=0,av=null,Error(W(185));Bs(e,n,r),(!(me&2)||e!==qe)&&(e===qe&&(!(me&2)&&(bu|=n),ze===4&&rr(e,Ve)),lt(e,r),n===1&&me===0&&!(t.mode&1)&&(Zo=Me()+500,vu&&Nr()))}function lt(e,t){var n=e.callbackNode;qO(e,t);var r=vl(e,e===qe?Ve:0);if(r===0)n!==null&&vx(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&vx(n),t===1)e.tag===0?FL(uw.bind(null,e)):mk(uw.bind(null,e)),LL(function(){!(me&6)&&Nr()}),n=null;else{switch(VN(r)){case 1:n=ry;break;case 4:n=qN;break;case 16:n=gl;break;case 536870912:n=BN;break;default:n=gl}n=h2(n,s2.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function s2(e,t){if(nl=-1,rl=0,me&6)throw Error(W(327));var n=e.callbackNode;if(qo()&&e.callbackNode!==n)return null;var r=vl(e,e===qe?Ve:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ol(e,r);else{t=r;var o=me;me|=2;var i=l2();(qe!==e||Ve!==t)&&(En=null,Zo=Me()+500,Fr(e,t));do try{aD();break}catch(a){a2(e,a)}while(!0);gy(),Ml.current=i,me=o,je!==null?t=0:(qe=null,Ve=0,t=ze)}if(t!==0){if(t===2&&(o=jg(e),o!==0&&(r=o,t=lv(e,o))),t===1)throw n=ks,Fr(e,0),rr(e,r),lt(e,Me()),n;if(t===6)rr(e,r);else{if(o=e.current.alternate,!(r&30)&&!iD(o)&&(t=Ol(e,r),t===2&&(i=jg(e),i!==0&&(r=i,t=lv(e,i))),t===1))throw n=ks,Fr(e,0),rr(e,r),lt(e,Me()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(W(345));case 2:Ir(e,nt,En);break;case 3:if(rr(e,r),(r&130023424)===r&&(t=Ay+500-Me(),10<t)){if(vl(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){Ze(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Bg(Ir.bind(null,e,nt,En),t);break}Ir(e,nt,En);break;case 4:if(rr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Ft(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=Me()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*oD(r/1960))-r,10<r){e.timeoutHandle=Bg(Ir.bind(null,e,nt,En),r);break}Ir(e,nt,En);break;case 5:Ir(e,nt,En);break;default:throw Error(W(329))}}}return lt(e,Me()),e.callbackNode===n?s2.bind(null,e):null}function lv(e,t){var n=ss;return e.current.memoizedState.isDehydrated&&(Fr(e,t).flags|=256),e=Ol(e,t),e!==2&&(t=nt,nt=n,t!==null&&uv(t)),e}function uv(e){nt===null?nt=e:nt.push.apply(nt,e)}function iD(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!Bt(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function rr(e,t){for(t&=~Ty,t&=~bu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ft(t),r=1<<n;e[n]=-1,t&=~r}}function uw(e){if(me&6)throw Error(W(327));qo();var t=vl(e,0);if(!(t&1))return lt(e,Me()),null;var n=Ol(e,t);if(e.tag!==0&&n===2){var r=jg(e);r!==0&&(t=r,n=lv(e,r))}if(n===1)throw n=ks,Fr(e,0),rr(e,t),lt(e,Me()),n;if(n===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ir(e,nt,En),lt(e,Me()),null}function My(e,t){var n=me;me|=1;try{return e(t)}finally{me=n,me===0&&(Zo=Me()+500,vu&&Nr())}}function Kr(e){ar!==null&&ar.tag===0&&!(me&6)&&qo();var t=me;me|=1;var n=Et.transition,r=xe;try{if(Et.transition=null,xe=1,e)return e()}finally{xe=r,Et.transition=n,me=t,!(me&6)&&Nr()}}function Iy(){ct=Io.current,_e(Io)}function Fr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,OL(n)),je!==null)for(n=je.return;n!==null;){var r=n;switch(hy(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&_l();break;case 3:Xo(),_e(st),_e(Xe),_y();break;case 5:by(r);break;case 4:Xo();break;case 13:_e(ke);break;case 19:_e(ke);break;case 10:vy(r.type._context);break;case 22:case 23:Iy()}n=n.return}if(qe=e,je=e=mr(e.current,null),Ve=ct=t,ze=0,ks=null,Ty=bu=Yr=0,nt=ss=null,Lr!==null){for(t=0;t<Lr.length;t++)if(n=Lr[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}Lr=null}return e}function a2(e,t){do{var n=je;try{if(gy(),Ja.current=Al,Tl){for(var r=Re.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}Tl=!1}if(Gr=0,Fe=$e=Re=null,os=!1,Es=0,Py.current=null,n===null||n.return===null){ze=1,ks=t,je=null;break}e:{var i=e,s=n.return,a=n,l=t;if(t=Ve,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Xx(s);if(h!==null){h.flags&=-257,Qx(h,s,a,i,t),h.mode&1&&Kx(i,u,t),t=h,l=u;var g=t.updateQueue;if(g===null){var m=new Set;m.add(l),t.updateQueue=m}else g.add(l);break e}else{if(!(t&1)){Kx(i,u,t),jy();break e}l=Error(W(426))}}else if(Se&&a.mode&1){var b=Xx(s);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Qx(b,s,a,i,t),py(Qo(l,a));break e}}i=l=Qo(l,a),ze!==4&&(ze=2),ss===null?ss=[i]:ss.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=Vk(i,l,t);Hx(i,v);break e;case 1:a=l;var w=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof w.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(hr===null||!hr.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=Wk(i,a,t);Hx(i,_);break e}}i=i.return}while(i!==null)}c2(n)}catch(C){t=C,je===n&&n!==null&&(je=n=n.return);continue}break}while(!0)}function l2(){var e=Ml.current;return Ml.current=Al,e===null?Al:e}function jy(){(ze===0||ze===3||ze===2)&&(ze=4),qe===null||!(Yr&268435455)&&!(bu&268435455)||rr(qe,Ve)}function Ol(e,t){var n=me;me|=2;var r=l2();(qe!==e||Ve!==t)&&(En=null,Fr(e,t));do try{sD();break}catch(o){a2(e,o)}while(!0);if(gy(),me=n,Ml.current=r,je!==null)throw Error(W(261));return qe=null,Ve=0,ze}function sD(){for(;je!==null;)u2(je)}function aD(){for(;je!==null&&!MO();)u2(je)}function u2(e){var t=f2(e.alternate,e,ct);e.memoizedProps=e.pendingProps,t===null?c2(e):je=t,Py.current=null}function c2(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=eD(n,t),n!==null){n.flags&=32767,je=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ze=6,je=null;return}}else if(n=JL(n,t,ct),n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);ze===0&&(ze=5)}function Ir(e,t,n){var r=xe,o=Et.transition;try{Et.transition=null,xe=1,lD(e,t,n,r)}finally{Et.transition=o,xe=r}return null}function lD(e,t,n,r){do qo();while(ar!==null);if(me&6)throw Error(W(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(BO(e,i),e===qe&&(je=qe=null,Ve=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Na||(Na=!0,h2(gl,function(){return qo(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=Et.transition,Et.transition=null;var s=xe;xe=1;var a=me;me|=4,Py.current=null,nD(e,n),o2(n,e),RL(Fg),yl=!!zg,Fg=zg=null,e.current=n,rD(n),IO(),me=a,xe=s,Et.transition=i}else e.current=n;if(Na&&(Na=!1,ar=e,jl=o),i=e.pendingLanes,i===0&&(hr=null),LO(n.stateNode),lt(e,Me()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Il)throw Il=!1,e=sv,sv=null,e;return jl&1&&e.tag!==0&&qo(),i=e.pendingLanes,i&1?e===av?as++:(as=0,av=e):as=0,Nr(),null}function qo(){if(ar!==null){var e=VN(jl),t=Et.transition,n=xe;try{if(Et.transition=null,xe=16>e?16:e,ar===null)var r=!1;else{if(e=ar,ar=null,jl=0,me&6)throw Error(W(331));var o=me;for(me|=4,J=e.current;J!==null;){var i=J,s=i.child;if(J.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(J=u;J!==null;){var c=J;switch(c.tag){case 0:case 11:case 15:is(8,c,i)}var d=c.child;if(d!==null)d.return=c,J=d;else for(;J!==null;){c=J;var f=c.sibling,h=c.return;if(t2(c),c===u){J=null;break}if(f!==null){f.return=h,J=f;break}J=h}}}var g=i.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var b=m.sibling;m.sibling=null,m=b}while(m!==null)}}J=i}}if(i.subtreeFlags&2064&&s!==null)s.return=i,J=s;else e:for(;J!==null;){if(i=J,i.flags&2048)switch(i.tag){case 0:case 11:case 15:is(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,J=v;break e}J=i.return}}var w=e.current;for(J=w;J!==null;){s=J;var x=s.child;if(s.subtreeFlags&2064&&x!==null)x.return=s,J=x;else e:for(s=w;J!==null;){if(a=J,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:wu(9,a)}}catch(C){Te(a,a.return,C)}if(a===s){J=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,J=_;break e}J=a.return}}if(me=o,Nr(),an&&typeof an.onPostCommitFiberRoot=="function")try{an.onPostCommitFiberRoot(fu,e)}catch{}r=!0}return r}finally{xe=n,Et.transition=t}}return!1}function cw(e,t,n){t=Qo(n,t),t=Vk(e,t,1),e=fr(e,t,1),t=Ze(),e!==null&&(Bs(e,1,t),lt(e,t))}function Te(e,t,n){if(e.tag===3)cw(e,e,n);else for(;t!==null;){if(t.tag===3){cw(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(hr===null||!hr.has(r))){e=Qo(n,e),e=Wk(t,e,1),t=fr(t,e,1),e=Ze(),t!==null&&(Bs(t,1,e),lt(t,e));break}}t=t.return}}function uD(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ze(),e.pingedLanes|=e.suspendedLanes&n,qe===e&&(Ve&n)===n&&(ze===4||ze===3&&(Ve&130023424)===Ve&&500>Me()-Ay?Fr(e,0):Ty|=n),lt(e,t)}function d2(e,t){t===0&&(e.mode&1?(t=ga,ga<<=1,!(ga&130023424)&&(ga=4194304)):t=1);var n=Ze();e=On(e,t),e!==null&&(Bs(e,t,n),lt(e,n))}function cD(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),d2(e,n)}function dD(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(W(314))}r!==null&&r.delete(t),d2(e,n)}var f2;f2=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||st.current)ot=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ot=!1,ZL(e,t,n);ot=!!(e.flags&131072)}else ot=!1,Se&&t.flags&1048576&&gk(t,Cl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;tl(e,t),e=t.pendingProps;var o=Go(t,Xe.current);Fo(t,n),o=Ey(null,t,r,e,o,n);var i=Cy();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,at(r)?(i=!0,Sl(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,xy(t),o.updater=xu,t.stateNode=o,o._reactInternals=t,Kg(t,r,e,n),t=Zg(null,t,r,!0,i,n)):(t.tag=0,Se&&i&&fy(t),Qe(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(tl(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=hD(r),e=It(r,e),o){case 0:t=Qg(null,t,r,e,n);break e;case 1:t=ew(null,t,r,e,n);break e;case 11:t=Zx(null,t,r,e,n);break e;case 14:t=Jx(null,t,r,It(r.type,e),n);break e}throw Error(W(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),Qg(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),ew(e,t,r,o,n);case 3:e:{if(Kk(t),e===null)throw Error(W(387));r=t.pendingProps,i=t.memoizedState,o=i.element,_k(e,t),Rl(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Qo(Error(W(423)),t),t=tw(e,t,r,n,o);break e}else if(r!==o){o=Qo(Error(W(424)),t),t=tw(e,t,r,n,o);break e}else for(pt=dr(t.stateNode.containerInfo.firstChild),mt=t,Se=!0,Lt=null,n=wk(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Yo(),r===o){t=Ln(e,t,n);break e}Qe(e,t,r,n)}t=t.child}return t;case 5:return Sk(t),e===null&&Ug(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,qg(r,o)?s=null:i!==null&&qg(r,i)&&(t.flags|=32),Yk(e,t),Qe(e,t,s,n),t.child;case 6:return e===null&&Ug(t),null;case 13:return Xk(e,t,n);case 4:return wy(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ko(t,null,r,n):Qe(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),Zx(e,t,r,o,n);case 7:return Qe(e,t,t.pendingProps,n),t.child;case 8:return Qe(e,t,t.pendingProps.children,n),t.child;case 12:return Qe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,we(Nl,r._currentValue),r._currentValue=s,i!==null)if(Bt(i.value,s)){if(i.children===o.children&&!st.current){t=Ln(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){s=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=An(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Gg(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(W(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Gg(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}Qe(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Fo(t,n),o=Ct(o),r=r(o),t.flags|=1,Qe(e,t,r,n),t.child;case 14:return r=t.type,o=It(r,t.pendingProps),o=It(r.type,o),Jx(e,t,r,o,n);case 15:return Uk(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:It(r,o),tl(e,t),t.tag=1,at(r)?(e=!0,Sl(t)):e=!1,Fo(t,n),Hk(t,r,o),Kg(t,r,o,n),Zg(null,t,r,!0,e,n);case 19:return Qk(e,t,n);case 22:return Gk(e,t,n)}throw Error(W(156,t.tag))};function h2(e,t){return FN(e,t)}function fD(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function St(e,t,n,r){return new fD(e,t,n,r)}function Oy(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hD(e){if(typeof e=="function")return Oy(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ey)return 11;if(e===ty)return 14}return 2}function mr(e,t){var n=e.alternate;return n===null?(n=St(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ol(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")Oy(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case So:return qr(n.children,o,i,t);case Jv:s=8,o|=8;break;case xg:return e=St(12,n,t,o|2),e.elementType=xg,e.lanes=i,e;case wg:return e=St(13,n,t,o),e.elementType=wg,e.lanes=i,e;case bg:return e=St(19,n,t,o),e.elementType=bg,e.lanes=i,e;case SN:return _u(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case bN:s=10;break e;case _N:s=9;break e;case ey:s=11;break e;case ty:s=14;break e;case er:s=16,r=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=St(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function qr(e,t,n,r){return e=St(7,e,r,t),e.lanes=n,e}function _u(e,t,n,r){return e=St(22,e,r,t),e.elementType=SN,e.lanes=n,e.stateNode={isHidden:!1},e}function Qc(e,t,n){return e=St(6,e,null,t),e.lanes=n,e}function Zc(e,t,n){return t=St(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pD(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mc(0),this.expirationTimes=Mc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mc(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Ly(e,t,n,r,o,i,s,a,l){return e=new pD(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=St(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},xy(i),e}function mD(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_o,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function p2(e){if(!e)return wr;e=e._reactInternals;e:{if(ao(e)!==e||e.tag!==1)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(at(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(W(171))}if(e.tag===1){var n=e.type;if(at(n))return pk(e,n,t)}return t}function m2(e,t,n,r,o,i,s,a,l){return e=Ly(n,r,!0,e,o,i,s,a,l),e.context=p2(null),n=e.current,r=Ze(),o=pr(n),i=An(r,o),i.callback=t??null,fr(n,i,o),e.current.lanes=o,Bs(e,o,r),lt(e,r),e}function Su(e,t,n,r){var o=t.current,i=Ze(),s=pr(o);return n=p2(n),t.context===null?t.context=n:t.pendingContext=n,t=An(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=fr(o,t,s),e!==null&&(qt(e,o,s,i),Za(e,o,s)),s}function Ll(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function dw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Dy(e,t){dw(e,t),(e=e.alternate)&&dw(e,t)}function gD(){return null}var g2=typeof reportError=="function"?reportError:function(e){console.error(e)};function $y(e){this._internalRoot=e}Eu.prototype.render=$y.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));Su(e,t,null,null)};Eu.prototype.unmount=$y.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Kr(function(){Su(null,e,null,null)}),t[jn]=null}};function Eu(e){this._internalRoot=e}Eu.prototype.unstable_scheduleHydration=function(e){if(e){var t=GN();e={blockedOn:null,target:e,priority:t};for(var n=0;n<nr.length&&t!==0&&t<nr[n].priority;n++);nr.splice(n,0,e),n===0&&KN(e)}};function zy(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Cu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function fw(){}function vD(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=Ll(s);i.call(u)}}var s=m2(t,r,e,0,null,!1,!1,"",fw);return e._reactRootContainer=s,e[jn]=s.current,xs(e.nodeType===8?e.parentNode:e),Kr(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var a=r;r=function(){var u=Ll(l);a.call(u)}}var l=Ly(e,0,!1,null,null,!1,!1,"",fw);return e._reactRootContainer=l,e[jn]=l.current,xs(e.nodeType===8?e.parentNode:e),Kr(function(){Su(t,l,n,r)}),l}function Nu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var a=o;o=function(){var l=Ll(s);a.call(l)}}Su(t,s,e,o)}else s=vD(n,t,e,o,r);return Ll(s)}WN=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Bi(t.pendingLanes);n!==0&&(oy(t,n|1),lt(t,Me()),!(me&6)&&(Zo=Me()+500,Nr()))}break;case 13:Kr(function(){var r=On(e,1);if(r!==null){var o=Ze();qt(r,e,1,o)}}),Dy(e,1)}};iy=function(e){if(e.tag===13){var t=On(e,134217728);if(t!==null){var n=Ze();qt(t,e,134217728,n)}Dy(e,134217728)}};UN=function(e){if(e.tag===13){var t=pr(e),n=On(e,t);if(n!==null){var r=Ze();qt(n,e,t,r)}Dy(e,t)}};GN=function(){return xe};YN=function(e,t){var n=xe;try{return xe=e,t()}finally{xe=n}};Ag=function(e,t,n){switch(t){case"input":if(Eg(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=gu(r);if(!o)throw Error(W(90));CN(r),Eg(r,o)}}}break;case"textarea":kN(e,n);break;case"select":t=n.value,t!=null&&Lo(e,!!n.multiple,t,!1)}};jN=My;ON=Kr;var yD={usingClientEntryPoint:!1,Events:[Vs,ko,gu,MN,IN,My]},Li={findFiberByHostInstance:Or,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},xD={bundleType:Li.bundleType,version:Li.version,rendererPackageName:Li.rendererPackageName,rendererConfig:Li.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=$N(e),e===null?null:e.stateNode},findFiberByHostInstance:Li.findFiberByHostInstance||gD,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ka=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ka.isDisabled&&ka.supportsFiber)try{fu=ka.inject(xD),an=ka}catch{}}xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yD;xt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zy(t))throw Error(W(200));return mD(e,t,null,n)};xt.createRoot=function(e,t){if(!zy(e))throw Error(W(299));var n=!1,r="",o=g2;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=Ly(e,1,!1,null,null,n,!1,r,o),e[jn]=t.current,xs(e.nodeType===8?e.parentNode:e),new $y(t)};xt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=$N(t),e=e===null?null:e.stateNode,e};xt.flushSync=function(e){return Kr(e)};xt.hydrate=function(e,t,n){if(!Cu(t))throw Error(W(200));return Nu(null,e,t,!0,n)};xt.hydrateRoot=function(e,t,n){if(!zy(e))throw Error(W(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=g2;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=m2(t,null,e,1,n??null,o,!1,i,s),e[jn]=t.current,xs(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Eu(t)};xt.render=function(e,t,n){if(!Cu(t))throw Error(W(200));return Nu(null,e,t,!1,n)};xt.unmountComponentAtNode=function(e){if(!Cu(e))throw Error(W(40));return e._reactRootContainer?(Kr(function(){Nu(null,null,e,!1,function(){e._reactRootContainer=null,e[jn]=null})}),!0):!1};xt.unstable_batchedUpdates=My;xt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Cu(n))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return Nu(e,t,n,!1,r)};xt.version="18.3.1-next-f1338f8080-20240426";function v2(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(v2)}catch(e){console.error(e)}}v2(),vN.exports=xt;var gi=vN.exports;const wD=cu(gi);var hw=gi;vg.createRoot=hw.createRoot,vg.hydrateRoot=hw.hydrateRoot;/**
|
|
41
|
-
* @license lucide-react v0.563.0 - ISC
|
|
42
|
-
*
|
|
43
|
-
* This source code is licensed under the ISC license.
|
|
44
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/const y2=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
46
|
-
* @license lucide-react v0.563.0 - ISC
|
|
47
|
-
*
|
|
48
|
-
* This source code is licensed under the ISC license.
|
|
49
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
50
|
-
*/const bD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
51
|
-
* @license lucide-react v0.563.0 - ISC
|
|
52
|
-
*
|
|
53
|
-
* This source code is licensed under the ISC license.
|
|
54
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/const _D=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
|
56
|
-
* @license lucide-react v0.563.0 - ISC
|
|
57
|
-
*
|
|
58
|
-
* This source code is licensed under the ISC license.
|
|
59
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
60
|
-
*/const pw=e=>{const t=_D(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
61
|
-
* @license lucide-react v0.563.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
|
-
*/var SD={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"};/**
|
|
66
|
-
* @license lucide-react v0.563.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
|
-
*/const ED=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
71
|
-
* @license lucide-react v0.563.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 CD=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:s,...a},l)=>y.createElement("svg",{ref:l,...SD,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:y2("lucide",o),...!i&&!ED(a)&&{"aria-hidden":"true"},...a},[...s.map(([u,c])=>y.createElement(u,c)),...Array.isArray(i)?i:[i]]));/**
|
|
76
|
-
* @license lucide-react v0.563.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 ye=(e,t)=>{const n=y.forwardRef(({className:r,...o},i)=>y.createElement(CD,{ref:i,iconNode:t,className:y2(`lucide-${bD(pw(e))}`,`lucide-${e}`,r),...o}));return n.displayName=pw(e),n};/**
|
|
81
|
-
* @license lucide-react v0.563.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 ND=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],kD=ye("activity",ND);/**
|
|
86
|
-
* @license lucide-react v0.563.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 RD=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]],PD=ye("arrow-down-up",RD);/**
|
|
91
|
-
* @license lucide-react v0.563.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 TD=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],AD=ye("arrow-left-right",TD);/**
|
|
96
|
-
* @license lucide-react v0.563.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 MD=[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]],ID=ye("arrow-right-left",MD);/**
|
|
101
|
-
* @license lucide-react v0.563.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 jD=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],OD=ye("chart-column",jD);/**
|
|
106
|
-
* @license lucide-react v0.563.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 LD=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],x2=ye("check",LD);/**
|
|
111
|
-
* @license lucide-react v0.563.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 DD=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Us=ye("chevron-down",DD);/**
|
|
116
|
-
* @license lucide-react v0.563.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 $D=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],zD=ye("chevron-right",$D);/**
|
|
121
|
-
* @license lucide-react v0.563.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 FD=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Fy=ye("chevron-up",FD);/**
|
|
126
|
-
* @license lucide-react v0.563.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 qD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],BD=ye("circle-check",qD);/**
|
|
131
|
-
* @license lucide-react v0.563.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 HD=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],VD=ye("code-xml",HD);/**
|
|
136
|
-
* @license lucide-react v0.563.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 WD=[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],UD=ye("file-code-corner",WD);/**
|
|
141
|
-
* @license lucide-react v0.563.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 GD=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],YD=ye("file-code",GD);/**
|
|
146
|
-
* @license lucide-react v0.563.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 KD=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],XD=ye("file-exclamation-point",KD);/**
|
|
151
|
-
* @license lucide-react v0.563.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 QD=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],ZD=ye("file",QD);/**
|
|
156
|
-
* @license lucide-react v0.563.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 JD=[["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"}]],Dl=ye("folder-open",JD);/**
|
|
161
|
-
* @license lucide-react v0.563.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 e3=[["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"}]],t3=ye("folder-tree",e3);/**
|
|
166
|
-
* @license lucide-react v0.563.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 n3=[["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"}]],r3=ye("folder",n3);/**
|
|
171
|
-
* @license lucide-react v0.563.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 o3=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],i3=ye("funnel",o3);/**
|
|
176
|
-
* @license lucide-react v0.563.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 s3=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],w2=ye("git-branch",s3);/**
|
|
181
|
-
* @license lucide-react v0.563.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 a3=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],mw=ye("link-2",a3);/**
|
|
186
|
-
* @license lucide-react v0.563.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 l3=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],u3=ye("maximize-2",l3);/**
|
|
191
|
-
* @license lucide-react v0.563.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 c3=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],d3=ye("minimize-2",c3);/**
|
|
196
|
-
* @license lucide-react v0.563.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 f3=[["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"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],h3=ye("package",f3);/**
|
|
201
|
-
* @license lucide-react v0.563.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 p3=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],m3=ye("panel-left",p3);/**
|
|
206
|
-
* @license lucide-react v0.563.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 g3=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],v3=ye("rotate-ccw",g3);/**
|
|
211
|
-
* @license lucide-react v0.563.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 y3=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],b2=ye("search",y3);/**
|
|
216
|
-
* @license lucide-react v0.563.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 x3=[["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"}]],_2=ye("triangle-alert",x3);/**
|
|
221
|
-
* @license lucide-react v0.563.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 w3=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],cv=ye("upload",w3);/**
|
|
226
|
-
* @license lucide-react v0.563.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 b3=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],S2=ye("x",b3);function E2(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=E2(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function C2(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=E2(e))&&(r&&(r+=" "),r+=t);return r}const _3=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},S3=(e,t)=>({classGroupId:e,validator:t}),N2=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),$l="-",gw=[],E3="arbitrary..",C3=e=>{const t=k3(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return N3(s);const a=s.split($l),l=a[0]===""&&a.length>1?1:0;return k2(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=r[s],u=n[s];return l?u?_3(u,l):l:u||gw}return n[s]||gw}}},k2=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const o=e[t],i=n.nextPart.get(o);if(i){const u=k2(e,t+1,i);if(u)return u}const s=n.validators;if(s===null)return;const a=t===0?e.join($l):e.slice(t).join($l),l=s.length;for(let u=0;u<l;u++){const c=s[u];if(c.validator(a))return c.classGroupId}},N3=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?E3+r:void 0})(),k3=e=>{const{theme:t,classGroups:n}=e;return R3(n,t)},R3=(e,t)=>{const n=N2();for(const r in e){const o=e[r];qy(o,n,r,t)}return n},qy=(e,t,n,r)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];P3(s,t,n,r)}},P3=(e,t,n,r)=>{if(typeof e=="string"){T3(e,t,n);return}if(typeof e=="function"){A3(e,t,n,r);return}M3(e,t,n,r)},T3=(e,t,n)=>{const r=e===""?t:R2(t,e);r.classGroupId=n},A3=(e,t,n,r)=>{if(I3(e)){qy(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(S3(n,e))},M3=(e,t,n,r)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];qy(l,R2(t,a),n,r)}},R2=(e,t)=>{let n=e;const r=t.split($l),o=r.length;for(let i=0;i<o;i++){const s=r[i];let a=n.nextPart.get(s);a||(a=N2(),n.nextPart.set(s,a)),n=a}return n},I3=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,j3=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const o=(i,s)=>{n[i]=s,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){i in n?n[i]=s:o(i,s)}}},dv="!",vw=":",O3=[],yw=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),L3=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const i=[];let s=0,a=0,l=0,u;const c=o.length;for(let m=0;m<c;m++){const b=o[m];if(s===0&&a===0){if(b===vw){i.push(o.slice(l,m)),l=m+1;continue}if(b==="/"){u=m;continue}}b==="["?s++:b==="]"?s--:b==="("?a++:b===")"&&a--}const d=i.length===0?o:o.slice(l);let f=d,h=!1;d.endsWith(dv)?(f=d.slice(0,-1),h=!0):d.startsWith(dv)&&(f=d.slice(1),h=!0);const g=u&&u>l?u-l:void 0;return yw(i,h,f,g)};if(t){const o=t+vw,i=r;r=s=>s.startsWith(o)?i(s.slice(o.length)):yw(O3,!1,s,void 0,!0)}if(n){const o=r;r=i=>n({className:i,parseClassName:o})}return r},D3=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let o=[];for(let i=0;i<n.length;i++){const s=n[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),r.push(...o),o=[]),r.push(s)):o.push(s)}return o.length>0&&(o.sort(),r.push(...o)),r}},$3=e=>({cache:j3(e.cacheSize),parseClassName:L3(e),sortModifiers:D3(e),...C3(e)}),z3=/\s+/,F3=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(z3);let l="";for(let u=a.length-1;u>=0;u-=1){const c=a[u],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:m}=n(c);if(d){l=c+(l.length>0?" "+l:l);continue}let b=!!m,v=r(b?g.substring(0,m):g);if(!v){if(!b){l=c+(l.length>0?" "+l:l);continue}if(v=r(g),!v){l=c+(l.length>0?" "+l:l);continue}b=!1}const w=f.length===0?"":f.length===1?f[0]:i(f).join(":"),x=h?w+dv:w,_=x+v;if(s.indexOf(_)>-1)continue;s.push(_);const C=o(v,b);for(let S=0;S<C.length;++S){const E=C[S];s.push(x+E)}l=c+(l.length>0?" "+l:l)}return l},q3=(...e)=>{let t=0,n,r,o="";for(;t<e.length;)(n=e[t++])&&(r=P2(n))&&(o&&(o+=" "),o+=r);return o},P2=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=P2(e[r]))&&(n&&(n+=" "),n+=t);return n},B3=(e,...t)=>{let n,r,o,i;const s=l=>{const u=t.reduce((c,d)=>d(c),e());return n=$3(u),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=l=>{const u=r(l);if(u)return u;const c=F3(l,n);return o(l,c),c};return i=s,(...l)=>i(q3(...l))},H3=[],De=e=>{const t=n=>n[e]||H3;return t.isThemeGetter=!0,t},T2=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,A2=/^\((?:(\w[\w-]*):)?(.+)\)$/i,V3=/^\d+\/\d+$/,W3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,U3=/\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$/,G3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Y3=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,K3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vo=e=>V3.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),Kn=e=>!!e&&Number.isInteger(Number(e)),Jc=e=>e.endsWith("%")&&ce(e.slice(0,-1)),bn=e=>W3.test(e),X3=()=>!0,Q3=e=>U3.test(e)&&!G3.test(e),M2=()=>!1,Z3=e=>Y3.test(e),J3=e=>K3.test(e),e4=e=>!ee(e)&&!te(e),t4=e=>vi(e,O2,M2),ee=e=>T2.test(e),Tr=e=>vi(e,L2,Q3),ed=e=>vi(e,s4,ce),xw=e=>vi(e,I2,M2),n4=e=>vi(e,j2,J3),Ra=e=>vi(e,D2,Z3),te=e=>A2.test(e),Di=e=>yi(e,L2),r4=e=>yi(e,a4),ww=e=>yi(e,I2),o4=e=>yi(e,O2),i4=e=>yi(e,j2),Pa=e=>yi(e,D2,!0),vi=(e,t,n)=>{const r=T2.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},yi=(e,t,n=!1)=>{const r=A2.exec(e);return r?r[1]?t(r[1]):n:!1},I2=e=>e==="position"||e==="percentage",j2=e=>e==="image"||e==="url",O2=e=>e==="length"||e==="size"||e==="bg-size",L2=e=>e==="length",s4=e=>e==="number",a4=e=>e==="family-name",D2=e=>e==="shadow",l4=()=>{const e=De("color"),t=De("font"),n=De("text"),r=De("font-weight"),o=De("tracking"),i=De("leading"),s=De("breakpoint"),a=De("container"),l=De("spacing"),u=De("radius"),c=De("shadow"),d=De("inset-shadow"),f=De("text-shadow"),h=De("drop-shadow"),g=De("blur"),m=De("perspective"),b=De("aspect"),v=De("ease"),w=De("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[..._(),te,ee],S=()=>["auto","hidden","clip","visible","scroll"],E=()=>["auto","contain","none"],k=()=>[te,ee,l],T=()=>[vo,"full","auto",...k()],I=()=>[Kn,"none","subgrid",te,ee],P=()=>["auto",{span:["full",Kn,te,ee]},Kn,te,ee],j=()=>[Kn,"auto",te,ee],$=()=>["auto","min","max","fr",te,ee],R=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...k()],O=()=>[vo,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],N=()=>[e,te,ee],A=()=>[..._(),ww,xw,{position:[te,ee]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",o4,t4,{size:[te,ee]}],F=()=>[Jc,Di,Tr],V=()=>["","none","full",u,te,ee],H=()=>["",ce,Di,Tr],K=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],q=()=>[ce,Jc,ww,xw],B=()=>["","none",g,te,ee],G=()=>["none",ce,te,ee],Q=()=>["none",ce,te,ee],Y=()=>[ce,te,ee],U=()=>[vo,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[bn],breakpoint:[bn],color:[X3],container:[bn],"drop-shadow":[bn],ease:["in","out","in-out"],font:[e4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[bn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[bn],shadow:[bn],spacing:["px",ce],text:[bn],"text-shadow":[bn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",vo,ee,te,b]}],container:["container"],columns:[{columns:[ce,ee,te,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:C()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:E()}],"overscroll-x":[{"overscroll-x":E()}],"overscroll-y":[{"overscroll-y":E()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[Kn,"auto",te,ee]}],basis:[{basis:[vo,"full","auto",a,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,vo,"auto","initial","none",ee]}],grow:[{grow:["",ce,te,ee]}],shrink:[{shrink:["",ce,te,ee]}],order:[{order:[Kn,"first","last","none",te,ee]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:P()}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:P()}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...R(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...R()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":R()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[a,"screen",...O()]}],"min-w":[{"min-w":[a,"screen","none",...O()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",n,Di,Tr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,te,ed]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Jc,ee]}],"font-family":[{font:[r4,ee,t]}],"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,te,ee]}],"line-clamp":[{"line-clamp":[ce,"none",te,ed]}],leading:[{leading:[i,...k()]}],"list-image":[{"list-image":["none",te,ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",te,ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...K(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",te,Tr]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[ce,"auto",te,ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",te,ee]}],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",te,ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:D()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Kn,te,ee],radial:["",te,ee],conic:[Kn,te,ee]},i4,n4]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:H()}],"border-w-x":[{"border-x":H()}],"border-w-y":[{"border-y":H()}],"border-w-s":[{"border-s":H()}],"border-w-e":[{"border-e":H()}],"border-w-t":[{"border-t":H()}],"border-w-r":[{"border-r":H()}],"border-w-b":[{"border-b":H()}],"border-w-l":[{"border-l":H()}],"divide-x":[{"divide-x":H()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":H()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...K(),"hidden","none"]}],"divide-style":[{divide:[...K(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...K(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,te,ee]}],"outline-w":[{outline:["",ce,Di,Tr]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",c,Pa,Ra]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",d,Pa,Ra]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:H()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[ce,Tr]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":H()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",f,Pa,Ra]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[ce,te,ee]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"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":[ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":q()}],"mask-image-linear-to-pos":[{"mask-linear-to":q()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":q()}],"mask-image-t-to-pos":[{"mask-t-to":q()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":q()}],"mask-image-r-to-pos":[{"mask-r-to":q()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":q()}],"mask-image-b-to-pos":[{"mask-b-to":q()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":q()}],"mask-image-l-to-pos":[{"mask-l-to":q()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":q()}],"mask-image-x-to-pos":[{"mask-x-to":q()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":q()}],"mask-image-y-to-pos":[{"mask-y-to":q()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[te,ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":q()}],"mask-image-radial-to-pos":[{"mask-radial-to":q()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"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":_()}],"mask-image-conic-pos":[{"mask-conic":[ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":q()}],"mask-image-conic-to-pos":[{"mask-conic-to":q()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:D()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",te,ee]}],filter:[{filter:["","none",te,ee]}],blur:[{blur:B()}],brightness:[{brightness:[ce,te,ee]}],contrast:[{contrast:[ce,te,ee]}],"drop-shadow":[{"drop-shadow":["","none",h,Pa,Ra]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",ce,te,ee]}],"hue-rotate":[{"hue-rotate":[ce,te,ee]}],invert:[{invert:["",ce,te,ee]}],saturate:[{saturate:[ce,te,ee]}],sepia:[{sepia:["",ce,te,ee]}],"backdrop-filter":[{"backdrop-filter":["","none",te,ee]}],"backdrop-blur":[{"backdrop-blur":B()}],"backdrop-brightness":[{"backdrop-brightness":[ce,te,ee]}],"backdrop-contrast":[{"backdrop-contrast":[ce,te,ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ce,te,ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ce,te,ee]}],"backdrop-invert":[{"backdrop-invert":["",ce,te,ee]}],"backdrop-opacity":[{"backdrop-opacity":[ce,te,ee]}],"backdrop-saturate":[{"backdrop-saturate":[ce,te,ee]}],"backdrop-sepia":[{"backdrop-sepia":["",ce,te,ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",te,ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ce,"initial",te,ee]}],ease:[{ease:["linear","initial",v,te,ee]}],delay:[{delay:[ce,te,ee]}],animate:[{animate:["none",w,te,ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,te,ee]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:G()}],"rotate-x":[{"rotate-x":G()}],"rotate-y":[{"rotate-y":G()}],"rotate-z":[{"rotate-z":G()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:Y()}],"skew-x":[{"skew-x":Y()}],"skew-y":[{"skew-y":Y()}],transform:[{transform:[te,ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:U()}],"translate-x":[{"translate-x":U()}],"translate-y":[{"translate-y":U()}],"translate-z":[{"translate-z":U()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"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",te,ee]}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",te,ee]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[ce,Di,Tr,ed]}],stroke:[{stroke:["none",...N()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},u4=B3(l4);function ne(...e){return u4(C2(e))}const Xr=y.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:ne("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Xr.displayName="Card";const Jo=y.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:ne("flex flex-col space-y-1.5 p-6",e),...t}));Jo.displayName="CardHeader";const ei=y.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:ne("font-semibold leading-none tracking-tight",e),...t}));ei.displayName="CardTitle";const $2=y.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:ne("text-sm text-muted-foreground",e),...t}));$2.displayName="CardDescription";const Qr=y.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:ne("p-6 pt-0",e),...t}));Qr.displayName="CardContent";const c4=y.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:ne("flex items-center p-6 pt-0",e),...t}));c4.displayName="CardFooter";const bw=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,_w=C2,Gs=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return _w(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const f=bw(c)||bw(d);return o[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(g=>{let[m,b]=g;return Array.isArray(b)?b.includes({...i,...a}[m]):{...i,...a}[m]===b})?[...u,d,f]:u},[]);return _w(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},d4=Gs("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function kt({className:e,variant:t,...n}){return p.jsx("div",{className:ne(d4({variant:t}),e),...n})}function zl(e){const t=e.split("/");return t[t.length-1]}function Ar({label:e,value:t,icon:n,status:r="neutral"}){return p.jsxs("div",{className:ne("flex flex-col items-center justify-center p-3 rounded-lg border min-w-0",r==="good"&&"bg-emerald-950/50 border-emerald-800/60",r==="bad"&&"bg-red-950/50 border-red-800/60",r==="warning"&&"bg-amber-950/50 border-amber-800/60",r==="neutral"&&"bg-neutral-900 border-neutral-700/60"),children:[p.jsxs("div",{className:"flex items-center gap-1.5 mb-0.5",children:[n&&p.jsx("span",{className:"text-muted-foreground",children:n}),p.jsx("span",{className:ne("text-2xl font-bold tabular-nums",r==="good"&&"text-emerald-400",r==="bad"&&"text-red-400",r==="warning"&&"text-amber-400",r==="neutral"&&"text-foreground"),children:t})]}),p.jsx("span",{className:"text-[10px] text-muted-foreground uppercase tracking-wide",children:e})]})}function td({title:e,rows:t,onFileSelect:n,selectedFile:r,countLabel:o,emptyMessage:i,maxItems:s=10}){const[a,l]=y.useState(!1),u=a?t:t.slice(0,s),c=t.length>s;return p.jsxs(Xr,{className:"flex flex-col",children:[p.jsx(Jo,{className:"pb-2 pt-3 px-3",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx(ei,{className:"text-sm font-medium",children:e}),p.jsx(kt,{variant:"secondary",className:"text-[10px] px-1.5 py-0",children:t.length})]})}),p.jsx(Qr,{className:"pt-0 px-3 pb-3 flex-1",children:t.length===0?p.jsx("p",{className:"text-xs text-muted-foreground py-2",children:i}):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"max-h-[240px] overflow-y-auto ",style:{scrollbarWidth:"thin"},children:p.jsxs("table",{className:"w-full text-xs",children:[p.jsx("thead",{className:"sticky top-0 bg-card z-10",children:p.jsxs("tr",{className:"border-b border-border/50",children:[p.jsx("th",{className:"text-left py-1.5 pr-2 text-muted-foreground font-medium",children:"File"}),p.jsx("th",{className:"text-right py-1.5 text-muted-foreground font-medium w-16",children:o})]})}),p.jsx("tbody",{children:u.map(d=>p.jsxs("tr",{className:ne("border-b border-border/30 cursor-pointer transition-colors",r===d.path?"bg-accent":"hover:bg-muted/50"),onClick:()=>n==null?void 0:n(d.path),children:[p.jsx("td",{className:"py-1.5 pr-2",children:p.jsx("span",{className:"font-mono text-foreground truncate block max-w-[200px]",title:d.path,children:zl(d.path)})}),p.jsx("td",{className:"py-1.5 text-right",children:p.jsx("span",{className:"font-mono text-primary tabular-nums",children:d.count})})]},d.path))})]})}),c&&p.jsx("button",{onClick:()=>l(!a),className:"w-full mt-2 py-1 text-[10px] text-muted-foreground hover:text-foreground flex items-center justify-center gap-1 transition-colors",children:a?p.jsxs(p.Fragment,{children:["Show less ",p.jsx(Fy,{className:"h-3 w-3"})]}):p.jsxs(p.Fragment,{children:["Show ",t.length-s," more ",p.jsx(Us,{className:"h-3 w-3"})]})})]})})]})}function f4({cycles:e,onFileSelect:t}){const n=e.length===0,[r,o]=y.useState(!1),i=r?e:e.slice(0,5),s=e.length>5;return p.jsxs(Xr,{className:ne("flex flex-col",n?"border-emerald-800/30":"border-red-800/30"),children:[p.jsx(Jo,{className:"pb-2 pt-3 px-3",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[n?p.jsx(BD,{className:"h-3.5 w-3.5 text-emerald-500"}):p.jsx(_2,{className:"h-3.5 w-3.5 text-red-500"}),p.jsx(ei,{className:"text-sm font-medium",children:"Circular Dependencies"})]}),p.jsx(kt,{variant:n?"secondary":"destructive",className:"text-[10px] px-1.5 py-0",children:n?"None":e.length})]})}),p.jsx(Qr,{className:"pt-0 px-3 pb-3 flex-1",children:n?p.jsx("p",{className:"text-xs text-emerald-500/80",children:"No circular dependencies detected"}):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"max-h-[240px] overflow-y-auto space-y-2",style:{scrollbarWidth:"thin"},children:i.map((a,l)=>p.jsx("div",{className:"bg-red-950/30 border border-red-900/40 rounded p-2",children:p.jsxs("div",{className:"flex flex-wrap items-center gap-1 text-[11px] font-mono",children:[a.cycle.map((u,c)=>p.jsxs("span",{className:"flex items-center",children:[p.jsx("button",{className:"text-foreground hover:text-primary transition-colors truncate max-w-[120px]",onClick:()=>t==null?void 0:t(u),title:u,children:zl(u)}),c<a.cycle.length-1&&p.jsx("span",{className:"text-red-500 mx-0.5",children:"→"})]},c)),p.jsx("span",{className:"text-red-500",children:"↺"})]})},l))}),s&&p.jsx("button",{onClick:()=>o(!r),className:"w-full mt-2 py-1 text-[10px] text-muted-foreground hover:text-foreground flex items-center justify-center gap-1 transition-colors",children:r?p.jsxs(p.Fragment,{children:["Show less ",p.jsx(Fy,{className:"h-3 w-3"})]}):p.jsxs(p.Fragment,{children:["Show ",e.length-5," more ",p.jsx(Us,{className:"h-3 w-3"})]})})]})})]})}function h4({files:e,imports:t,onFileSelect:n,selectedFile:r,metadata:o}){const i=y.useMemo(()=>new Set(e.map(_=>_.path)),[e]),{importers:s,dependencies:a}=y.useMemo(()=>{var S,E;const _=new Map,C=new Map;for(const k of e)_.set(k.path,new Set),C.set(k.path,new Set);for(const k of t)i.has(k.source)&&i.has(k.target)&&((S=_.get(k.target))==null||S.add(k.source),(E=C.get(k.source))==null||E.add(k.target));return{importers:_,dependencies:C}},[e,t,i]),l=y.useMemo(()=>{var C,S;const _=[];for(const E of e)(((C=s.get(E.path))==null?void 0:C.size)||0)===0&&_.push({path:E.path,count:((S=a.get(E.path))==null?void 0:S.size)||0,lines:E.lines});return _.sort((E,k)=>k.count-E.count)},[e,s,a]),u=y.useMemo(()=>{var C;const _=[];for(const S of e){const E=((C=s.get(S.path))==null?void 0:C.size)||0;E>0&&_.push({path:S.path,count:E,lines:S.lines})}return _.sort((S,E)=>E.count-S.count).slice(0,50)},[e,s]),c=y.useMemo(()=>{var C;const _=[];for(const S of e){const E=((C=a.get(S.path))==null?void 0:C.size)||0;E>0&&_.push({path:S.path,count:E,lines:S.lines})}return _.sort((S,E)=>E.count-S.count).slice(0,50)},[e,a]),d=y.useMemo(()=>{var C,S;const _=[];for(const E of e){const k=((C=s.get(E.path))==null?void 0:C.size)||0,T=((S=a.get(E.path))==null?void 0:S.size)||0;k===0&&T===0&&_.push({path:E.path,count:0,lines:E.lines})}return _},[e,s,a]),f=y.useMemo(()=>{var C;const _=[];for(const S of e){const E=((C=a.get(S.path))==null?void 0:C.size)||0;E>10&&_.push({path:S.path,count:E,lines:S.lines})}return _.sort((S,E)=>E.count-S.count)},[e,a]),h=y.useMemo(()=>{const _=[],C=new Set,S=new Set,E=[];function k(T){C.add(T),S.add(T),E.push(T);const I=a.get(T)||new Set;for(const P of I)if(!C.has(P))k(P);else if(S.has(P)){const j=E.indexOf(P);if(j!==-1){const $=E.slice(j),R=[...$].sort().join("|");_.find(M=>[...M.cycle].sort().join("|")===R)||_.push({cycle:$})}}E.pop(),S.delete(T)}for(const T of e)C.has(T.path)||k(T.path);return _},[e,a]),g=y.useMemo(()=>{const _=c.filter(S=>S.count>10).length,C=e.length>0?d.length/e.length:0;return Math.max(0,Math.min(100,100-h.length*10-Math.min(30,_*2)-(C>.1?10:0)))},[h.length,c,d.length,e.length]),m=_=>_>=80?"good":_>=50?"warning":"bad",b=t.filter(_=>i.has(_.source)&&i.has(_.target)).length,v=y.useMemo(()=>e.reduce((_,C)=>_+C.lines,0),[e]),w=y.useMemo(()=>o!=null&&o.symbolIndex?Object.keys(o.symbolIndex).length:0,[o]),x=y.useMemo(()=>{const _=new Map;for(const C of e){const S=C.extension||"other",E=_.get(S)||{count:0,lines:0};_.set(S,{count:E.count+1,lines:E.lines+C.lines})}return Array.from(_.entries()).sort((C,S)=>S[1].count-C[1].count)},[e]);return e.length===0?p.jsx("div",{className:"p-6 text-muted-foreground text-sm",children:"No file data available. Load a snapshot with enhanced metadata."}):t.length===0?p.jsx("div",{className:"p-6 text-muted-foreground text-sm",children:"No import data available. This snapshot may not include dependency information."}):p.jsxs("div",{className:"h-full overflow-y-auto p-4 space-y-4",children:[p.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-7 gap-2",children:[p.jsx(Ar,{label:"Total Files",value:e.length,icon:p.jsx(UD,{className:"h-4 w-4"}),status:"neutral"}),p.jsx(Ar,{label:"Total Lines",value:v.toLocaleString(),icon:p.jsx(VD,{className:"h-4 w-4"}),status:"neutral"}),p.jsx(Ar,{label:"Symbols",value:w.toLocaleString(),icon:p.jsx(h3,{className:"h-4 w-4"}),status:"neutral"}),p.jsx(Ar,{label:"Imports",value:b,icon:p.jsx(ID,{className:"h-4 w-4"}),status:"neutral"}),p.jsx(Ar,{label:"Entry Points",value:l.length,icon:p.jsx(w2,{className:"h-4 w-4"}),status:"neutral"}),p.jsx(Ar,{label:"Circular Deps",value:h.length,icon:p.jsx(mw,{className:"h-4 w-4"}),status:h.length===0?"good":"bad"}),p.jsx(Ar,{label:"Health Score",value:g,icon:p.jsx(kD,{className:"h-4 w-4"}),status:m(g)})]}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[p.jsx(td,{title:"Entry Points",rows:l,onFileSelect:n,selectedFile:r,countLabel:"Deps",emptyMessage:"All files are imported by at least one other file"}),p.jsx(td,{title:"Most Imported",rows:u,onFileSelect:n,selectedFile:r,countLabel:"Importers",emptyMessage:"No files are imported by other files"}),p.jsx(td,{title:"Highest Coupling",rows:c,onFileSelect:n,selectedFile:r,countLabel:"Imports",emptyMessage:"No files have dependencies"}),p.jsx(f4,{cycles:h,onFileSelect:n})]}),(d.length>0||f.length>0)&&p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[d.length>0&&p.jsxs(Xr,{className:"border-amber-800/30",children:[p.jsx(Jo,{className:"pb-2 pt-3 px-3",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(XD,{className:"h-3.5 w-3.5 text-amber-500"}),p.jsx(ei,{className:"text-sm font-medium",children:"Orphaned Files"})]}),p.jsx(kt,{variant:"secondary",className:"text-[10px] px-1.5 py-0 bg-amber-950/50 text-amber-400 border-amber-800/50",children:d.length})]})}),p.jsxs(Qr,{className:"pt-0 px-3 pb-3",children:[p.jsx("p",{className:"text-[10px] text-muted-foreground mb-2",children:"Files with no imports and no importers - may be unused"}),p.jsxs("div",{className:"max-h-[160px] overflow-y-auto space-y-1",style:{scrollbarWidth:"thin"},children:[d.slice(0,10).map(_=>p.jsx("button",{className:ne("w-full text-left px-2 py-1 rounded text-xs font-mono truncate transition-colors",r===_.path?"bg-accent":"hover:bg-muted/50"),onClick:()=>n==null?void 0:n(_.path),title:_.path,children:zl(_.path)},_.path)),d.length>10&&p.jsxs("p",{className:"text-[10px] text-muted-foreground px-2 py-1",children:["+",d.length-10," more orphaned files"]})]})]})]}),f.length>0&&p.jsxs(Xr,{className:"border-amber-800/30",children:[p.jsx(Jo,{className:"pb-2 pt-3 px-3",children:p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center gap-1.5",children:[p.jsx(mw,{className:"h-3.5 w-3.5 text-amber-500"}),p.jsx(ei,{className:"text-sm font-medium",children:"Deep Import Chains"})]}),p.jsx(kt,{variant:"secondary",className:"text-[10px] px-1.5 py-0 bg-amber-950/50 text-amber-400 border-amber-800/50",children:f.length})]})}),p.jsxs(Qr,{className:"pt-0 px-3 pb-3",children:[p.jsx("p",{className:"text-[10px] text-muted-foreground mb-2",children:"Files importing 10+ other files - consider refactoring"}),p.jsxs("div",{className:"max-h-[160px] overflow-y-auto ",style:{scrollbarWidth:"thin"},children:[p.jsx("table",{className:"w-full text-xs",children:p.jsx("tbody",{children:f.slice(0,8).map(_=>p.jsxs("tr",{className:ne("cursor-pointer transition-colors",r===_.path?"bg-accent":"hover:bg-muted/50"),onClick:()=>n==null?void 0:n(_.path),children:[p.jsx("td",{className:"py-1 pr-2",children:p.jsx("span",{className:"font-mono truncate block max-w-[180px]",title:_.path,children:zl(_.path)})}),p.jsx("td",{className:"py-1 text-right",children:p.jsx("span",{className:"font-mono text-amber-400 tabular-nums",children:_.count})})]},_.path))})}),f.length>8&&p.jsxs("p",{className:"text-[10px] text-muted-foreground px-2 py-1",children:["+",f.length-8," more files"]})]})]})]})]}),x.length>0&&p.jsxs("div",{className:"mt-6 pt-6 border-t border-neutral-800",children:[p.jsx("h3",{className:"text-sm font-medium text-neutral-400 mb-4",children:"File Type Distribution"}),p.jsx("div",{className:"flex flex-wrap gap-2",children:x.map(([_,C])=>p.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 bg-neutral-900 border border-neutral-700 rounded text-xs",children:[p.jsxs("span",{className:"font-mono text-neutral-200",children:[".",_]}),p.jsxs("span",{className:"text-neutral-500",children:["(",C.count,")"]})]},_))})]})]})}function Oe(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Oe(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var p4={value:()=>{}};function ku(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new il(n)}function il(e){this._=e}function m4(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}il.prototype=ku.prototype={constructor:il,on:function(e,t){var n=this._,r=m4(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=g4(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(o=(e=r[i]).type)n[o]=Sw(n[o],e.name,t);else if(t==null)for(o in n)n[o]=Sw(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 il(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,o=i.length;r<o;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};function g4(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function Sw(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=p4,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var fv="http://www.w3.org/1999/xhtml";const Ew={svg:"http://www.w3.org/2000/svg",xhtml:fv,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ru(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Ew.hasOwnProperty(t)?{space:Ew[t],local:e}:e}function v4(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===fv&&t.documentElement.namespaceURI===fv?t.createElement(e):t.createElementNS(n,e)}}function y4(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function z2(e){var t=Ru(e);return(t.local?y4:v4)(t)}function x4(){}function By(e){return e==null?x4:function(){return this.querySelector(e)}}function w4(e){typeof e!="function"&&(e=By(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=new Array(s),l,u,c=0;c<s;++c)(l=i[c])&&(u=e.call(l,l.__data__,c,i))&&("__data__"in l&&(u.__data__=l.__data__),a[c]=u);return new yt(r,this._parents)}function b4(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function _4(){return[]}function F2(e){return e==null?_4:function(){return this.querySelectorAll(e)}}function S4(e){return function(){return b4(e.apply(this,arguments))}}function E4(e){typeof e=="function"?e=S4(e):e=F2(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var s=t[i],a=s.length,l,u=0;u<a;++u)(l=s[u])&&(r.push(e.call(l,l.__data__,u,s)),o.push(l));return new yt(r,o)}function q2(e){return function(){return this.matches(e)}}function B2(e){return function(t){return t.matches(e)}}var C4=Array.prototype.find;function N4(e){return function(){return C4.call(this.children,e)}}function k4(){return this.firstElementChild}function R4(e){return this.select(e==null?k4:N4(typeof e=="function"?e:B2(e)))}var P4=Array.prototype.filter;function T4(){return Array.from(this.children)}function A4(e){return function(){return P4.call(this.children,e)}}function M4(e){return this.selectAll(e==null?T4:A4(typeof e=="function"?e:B2(e)))}function I4(e){typeof e!="function"&&(e=q2(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=[],l,u=0;u<s;++u)(l=i[u])&&e.call(l,l.__data__,u,i)&&a.push(l);return new yt(r,this._parents)}function H2(e){return new Array(e.length)}function j4(){return new yt(this._enter||this._groups.map(H2),this._parents)}function Fl(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Fl.prototype={constructor:Fl,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 O4(e){return function(){return e}}function L4(e,t,n,r,o,i){for(var s=0,a,l=t.length,u=i.length;s<u;++s)(a=t[s])?(a.__data__=i[s],r[s]=a):n[s]=new Fl(e,i[s]);for(;s<l;++s)(a=t[s])&&(o[s]=a)}function D4(e,t,n,r,o,i,s){var a,l,u=new Map,c=t.length,d=i.length,f=new Array(c),h;for(a=0;a<c;++a)(l=t[a])&&(f[a]=h=s.call(l,l.__data__,a,t)+"",u.has(h)?o[a]=l:u.set(h,l));for(a=0;a<d;++a)h=s.call(e,i[a],a,i)+"",(l=u.get(h))?(r[a]=l,l.__data__=i[a],u.delete(h)):n[a]=new Fl(e,i[a]);for(a=0;a<c;++a)(l=t[a])&&u.get(f[a])===l&&(o[a]=l)}function $4(e){return e.__data__}function z4(e,t){if(!arguments.length)return Array.from(this,$4);var n=t?D4:L4,r=this._parents,o=this._groups;typeof e!="function"&&(e=O4(e));for(var i=o.length,s=new Array(i),a=new Array(i),l=new Array(i),u=0;u<i;++u){var c=r[u],d=o[u],f=d.length,h=F4(e.call(c,c&&c.__data__,u,r)),g=h.length,m=a[u]=new Array(g),b=s[u]=new Array(g),v=l[u]=new Array(f);n(c,d,m,b,v,h,t);for(var w=0,x=0,_,C;w<g;++w)if(_=m[w]){for(w>=x&&(x=w+1);!(C=b[x])&&++x<g;);_._next=C||null}}return s=new yt(s,r),s._enter=a,s._exit=l,s}function F4(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function q4(){return new yt(this._exit||this._groups.map(H2),this._parents)}function B4(e,t,n){var r=this.enter(),o=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function H4(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),a=new Array(o),l=0;l<s;++l)for(var u=n[l],c=r[l],d=u.length,f=a[l]=new Array(d),h,g=0;g<d;++g)(h=u[g]||c[g])&&(f[g]=h);for(;l<o;++l)a[l]=n[l];return new yt(a,this._parents)}function V4(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],s;--o>=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function W4(e){e||(e=U4);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s=n[i],a=s.length,l=o[i]=new Array(a),u,c=0;c<a;++c)(u=s[c])&&(l[c]=u);l.sort(t)}return new yt(o,this._parents).order()}function U4(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function G4(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Y4(){return Array.from(this)}function K4(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var s=r[o];if(s)return s}return null}function X4(){let e=0;for(const t of this)++e;return e}function Q4(){return!this.node()}function Z4(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,s=o.length,a;i<s;++i)(a=o[i])&&e.call(a,a.__data__,i,o);return this}function J4(e){return function(){this.removeAttribute(e)}}function e$(e){return function(){this.removeAttributeNS(e.space,e.local)}}function t$(e,t){return function(){this.setAttribute(e,t)}}function n$(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function r$(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function o$(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 i$(e,t){var n=Ru(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?e$:J4:typeof t=="function"?n.local?o$:r$:n.local?n$:t$)(n,t))}function V2(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function s$(e){return function(){this.style.removeProperty(e)}}function a$(e,t,n){return function(){this.style.setProperty(e,t,n)}}function l$(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function u$(e,t,n){return arguments.length>1?this.each((t==null?s$:typeof t=="function"?l$:a$)(e,t,n??"")):ti(this.node(),e)}function ti(e,t){return e.style.getPropertyValue(t)||V2(e).getComputedStyle(e,null).getPropertyValue(t)}function c$(e){return function(){delete this[e]}}function d$(e,t){return function(){this[e]=t}}function f$(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function h$(e,t){return arguments.length>1?this.each((t==null?c$:typeof t=="function"?f$:d$)(e,t)):this.node()[e]}function W2(e){return e.trim().split(/^|\s+/)}function Hy(e){return e.classList||new U2(e)}function U2(e){this._node=e,this._names=W2(e.getAttribute("class")||"")}U2.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 G2(e,t){for(var n=Hy(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function Y2(e,t){for(var n=Hy(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function p$(e){return function(){G2(this,e)}}function m$(e){return function(){Y2(this,e)}}function g$(e,t){return function(){(t.apply(this,arguments)?G2:Y2)(this,e)}}function v$(e,t){var n=W2(e+"");if(arguments.length<2){for(var r=Hy(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?g$:t?p$:m$)(n,t))}function y$(){this.textContent=""}function x$(e){return function(){this.textContent=e}}function w$(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function b$(e){return arguments.length?this.each(e==null?y$:(typeof e=="function"?w$:x$)(e)):this.node().textContent}function _$(){this.innerHTML=""}function S$(e){return function(){this.innerHTML=e}}function E$(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function C$(e){return arguments.length?this.each(e==null?_$:(typeof e=="function"?E$:S$)(e)):this.node().innerHTML}function N$(){this.nextSibling&&this.parentNode.appendChild(this)}function k$(){return this.each(N$)}function R$(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function P$(){return this.each(R$)}function T$(e){var t=typeof e=="function"?e:z2(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function A$(){return null}function M$(e,t){var n=typeof e=="function"?e:z2(e),r=t==null?A$:typeof t=="function"?t:By(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function I$(){var e=this.parentNode;e&&e.removeChild(this)}function j$(){return this.each(I$)}function O$(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function L$(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function D$(e){return this.select(e?L$:O$)}function $$(e){return arguments.length?this.property("__data__",e):this.node().__data__}function z$(e){return function(t){e.call(this,t,this.__data__)}}function F$(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function q$(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n<o;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function B$(e,t,n){return function(){var r=this.__on,o,i=z$(t);if(r){for(var s=0,a=r.length;s<a;++s)if((o=r[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function H$(e,t,n){var r=F$(e+""),o,i=r.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,u=a.length,c;l<u;++l)for(o=0,c=a[l];o<i;++o)if((s=r[o]).type===c.type&&s.name===c.name)return c.value}return}for(a=t?B$:q$,o=0;o<i;++o)this.each(a(r[o],t,n));return this}function K2(e,t,n){var r=V2(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function V$(e,t){return function(){return K2(this,e,t)}}function W$(e,t){return function(){return K2(this,e,t.apply(this,arguments))}}function U$(e,t){return this.each((typeof t=="function"?W$:V$)(e,t))}function*G$(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,s;o<i;++o)(s=r[o])&&(yield s)}var X2=[null];function yt(e,t){this._groups=e,this._parents=t}function Ys(){return new yt([[document.documentElement]],X2)}function Y$(){return this}yt.prototype=Ys.prototype={constructor:yt,select:w4,selectAll:E4,selectChild:R4,selectChildren:M4,filter:I4,data:z4,enter:j4,exit:q4,join:B4,merge:H4,selection:Y$,order:V4,sort:W4,call:G4,nodes:Y4,node:K4,size:X4,empty:Q4,each:Z4,attr:i$,style:u$,property:h$,classed:v$,text:b$,html:C$,raise:k$,lower:P$,append:T$,insert:M$,remove:j$,clone:D$,datum:$$,on:H$,dispatch:U$,[Symbol.iterator]:G$};function ht(e){return typeof e=="string"?new yt([[document.querySelector(e)]],[document.documentElement]):new yt([[e]],X2)}function K$(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ot(e,t){if(e=K$(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const X$={passive:!1},Rs={capture:!0,passive:!1};function nd(e){e.stopImmediatePropagation()}function Bo(e){e.preventDefault(),e.stopImmediatePropagation()}function Q2(e){var t=e.document.documentElement,n=ht(e).on("dragstart.drag",Bo,Rs);"onselectstart"in t?n.on("selectstart.drag",Bo,Rs):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Z2(e,t){var n=e.document.documentElement,r=ht(e).on("dragstart.drag",null);t&&(r.on("click.drag",Bo,Rs),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Ta=e=>()=>e;function hv(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:a,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:a,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}hv.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Q$(e){return!e.ctrlKey&&!e.button}function Z$(){return this.parentNode}function J$(e,t){return t??{x:e.x,y:e.y}}function ez(){return navigator.maxTouchPoints||"ontouchstart"in this}function J2(){var e=Q$,t=Z$,n=J$,r=ez,o={},i=ku("start","drag","end"),s=0,a,l,u,c,d=0;function f(_){_.on("mousedown.drag",h).filter(r).on("touchstart.drag",b).on("touchmove.drag",v,X$).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(_,C){if(!(c||!e.call(this,_,C))){var S=x(this,t.call(this,_,C),_,C,"mouse");S&&(ht(_.view).on("mousemove.drag",g,Rs).on("mouseup.drag",m,Rs),Q2(_.view),nd(_),u=!1,a=_.clientX,l=_.clientY,S("start",_))}}function g(_){if(Bo(_),!u){var C=_.clientX-a,S=_.clientY-l;u=C*C+S*S>d}o.mouse("drag",_)}function m(_){ht(_.view).on("mousemove.drag mouseup.drag",null),Z2(_.view,u),Bo(_),o.mouse("end",_)}function b(_,C){if(e.call(this,_,C)){var S=_.changedTouches,E=t.call(this,_,C),k=S.length,T,I;for(T=0;T<k;++T)(I=x(this,E,_,C,S[T].identifier,S[T]))&&(nd(_),I("start",_,S[T]))}}function v(_){var C=_.changedTouches,S=C.length,E,k;for(E=0;E<S;++E)(k=o[C[E].identifier])&&(Bo(_),k("drag",_,C[E]))}function w(_){var C=_.changedTouches,S=C.length,E,k;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),E=0;E<S;++E)(k=o[C[E].identifier])&&(nd(_),k("end",_,C[E]))}function x(_,C,S,E,k,T){var I=i.copy(),P=Ot(T||S,C),j,$,R;if((R=n.call(_,new hv("beforestart",{sourceEvent:S,target:f,identifier:k,active:s,x:P[0],y:P[1],dx:0,dy:0,dispatch:I}),E))!=null)return j=R.x-P[0]||0,$=R.y-P[1]||0,function L(M,O,N){var A=P,D;switch(M){case"start":o[k]=L,D=s++;break;case"end":delete o[k],--s;case"drag":P=Ot(N||O,C),D=s;break}I.call(M,_,new hv(M,{sourceEvent:O,subject:R,target:f,identifier:k,active:D,x:P[0]+j,y:P[1]+$,dx:P[0]-A[0],dy:P[1]-A[1],dispatch:I}),E)}}return f.filter=function(_){return arguments.length?(e=typeof _=="function"?_:Ta(!!_),f):e},f.container=function(_){return arguments.length?(t=typeof _=="function"?_:Ta(_),f):t},f.subject=function(_){return arguments.length?(n=typeof _=="function"?_:Ta(_),f):n},f.touchable=function(_){return arguments.length?(r=typeof _=="function"?_:Ta(!!_),f):r},f.on=function(){var _=i.on.apply(i,arguments);return _===i?f:_},f.clickDistance=function(_){return arguments.length?(d=(_=+_)*_,f):Math.sqrt(d)},f}function Vy(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function eR(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ks(){}var Ps=.7,ql=1/Ps,Ho="\\s*([+-]?\\d+)\\s*",Ts="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",un="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tz=/^#([0-9a-f]{3,8})$/,nz=new RegExp(`^rgb\\(${Ho},${Ho},${Ho}\\)$`),rz=new RegExp(`^rgb\\(${un},${un},${un}\\)$`),oz=new RegExp(`^rgba\\(${Ho},${Ho},${Ho},${Ts}\\)$`),iz=new RegExp(`^rgba\\(${un},${un},${un},${Ts}\\)$`),sz=new RegExp(`^hsl\\(${Ts},${un},${un}\\)$`),az=new RegExp(`^hsla\\(${Ts},${un},${un},${Ts}\\)$`),Cw={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};Vy(Ks,Zr,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Nw,formatHex:Nw,formatHex8:lz,formatHsl:uz,formatRgb:kw,toString:kw});function Nw(){return this.rgb().formatHex()}function lz(){return this.rgb().formatHex8()}function uz(){return tR(this).formatHsl()}function kw(){return this.rgb().formatRgb()}function Zr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=tz.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Rw(t):n===3?new it(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Aa(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Aa(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=nz.exec(e))?new it(t[1],t[2],t[3],1):(t=rz.exec(e))?new it(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=oz.exec(e))?Aa(t[1],t[2],t[3],t[4]):(t=iz.exec(e))?Aa(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=sz.exec(e))?Aw(t[1],t[2]/100,t[3]/100,1):(t=az.exec(e))?Aw(t[1],t[2]/100,t[3]/100,t[4]):Cw.hasOwnProperty(e)?Rw(Cw[e]):e==="transparent"?new it(NaN,NaN,NaN,0):null}function Rw(e){return new it(e>>16&255,e>>8&255,e&255,1)}function Aa(e,t,n,r){return r<=0&&(e=t=n=NaN),new it(e,t,n,r)}function cz(e){return e instanceof Ks||(e=Zr(e)),e?(e=e.rgb(),new it(e.r,e.g,e.b,e.opacity)):new it}function pv(e,t,n,r){return arguments.length===1?cz(e):new it(e,t,n,r??1)}function it(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Vy(it,pv,eR(Ks,{brighter(e){return e=e==null?ql:Math.pow(ql,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ps:Math.pow(Ps,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new it(Br(this.r),Br(this.g),Br(this.b),Bl(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:Pw,formatHex:Pw,formatHex8:dz,formatRgb:Tw,toString:Tw}));function Pw(){return`#${$r(this.r)}${$r(this.g)}${$r(this.b)}`}function dz(){return`#${$r(this.r)}${$r(this.g)}${$r(this.b)}${$r((isNaN(this.opacity)?1:this.opacity)*255)}`}function Tw(){const e=Bl(this.opacity);return`${e===1?"rgb(":"rgba("}${Br(this.r)}, ${Br(this.g)}, ${Br(this.b)}${e===1?")":`, ${e})`}`}function Bl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Br(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function $r(e){return e=Br(e),(e<16?"0":"")+e.toString(16)}function Aw(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Dt(e,t,n,r)}function tR(e){if(e instanceof Dt)return new Dt(e.h,e.s,e.l,e.opacity);if(e instanceof Ks||(e=Zr(e)),!e)return new Dt;if(e instanceof Dt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,a=i-o,l=(i+o)/2;return a?(t===i?s=(n-r)/a+(n<r)*6:n===i?s=(r-t)/a+2:s=(t-n)/a+4,a/=l<.5?i+o:2-i-o,s*=60):a=l>0&&l<1?0:s,new Dt(s,a,l,e.opacity)}function fz(e,t,n,r){return arguments.length===1?tR(e):new Dt(e,t,n,r??1)}function Dt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Vy(Dt,fz,eR(Ks,{brighter(e){return e=e==null?ql:Math.pow(ql,e),new Dt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ps:Math.pow(Ps,e),new Dt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new it(rd(e>=240?e-240:e+120,o,r),rd(e,o,r),rd(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Dt(Mw(this.h),Ma(this.s),Ma(this.l),Bl(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=Bl(this.opacity);return`${e===1?"hsl(":"hsla("}${Mw(this.h)}, ${Ma(this.s)*100}%, ${Ma(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Mw(e){return e=(e||0)%360,e<0?e+360:e}function Ma(e){return Math.max(0,Math.min(1,e||0))}function rd(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 Wy=e=>()=>e;function hz(e,t){return function(n){return e+n*t}}function pz(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function mz(e){return(e=+e)==1?nR:function(t,n){return n-t?pz(t,n,e):Wy(isNaN(t)?n:t)}}function nR(e,t){var n=t-e;return n?hz(e,n):Wy(isNaN(e)?t:e)}const Hl=function e(t){var n=mz(t);function r(o,i){var s=n((o=pv(o)).r,(i=pv(i)).r),a=n(o.g,i.g),l=n(o.b,i.b),u=nR(o.opacity,i.opacity);return function(c){return o.r=s(c),o.g=a(c),o.b=l(c),o.opacity=u(c),o+""}}return r.gamma=e,r}(1);function gz(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function vz(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function yz(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)o[s]=ls(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(a){for(s=0;s<r;++s)i[s]=o[s](a);return i}}function xz(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function tn(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function wz(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=ls(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var mv=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,od=new RegExp(mv.source,"g");function bz(e){return function(){return e}}function _z(e){return function(t){return e(t)+""}}function rR(e,t){var n=mv.lastIndex=od.lastIndex=0,r,o,i,s=-1,a=[],l=[];for(e=e+"",t=t+"";(r=mv.exec(e))&&(o=od.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),a[s]?a[s]+=i:a[++s]=i),(r=r[0])===(o=o[0])?a[s]?a[s]+=o:a[++s]=o:(a[++s]=null,l.push({i:s,x:tn(r,o)})),n=od.lastIndex;return n<t.length&&(i=t.slice(n),a[s]?a[s]+=i:a[++s]=i),a.length<2?l[0]?_z(l[0].x):bz(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)a[(d=l[c]).i]=d.x(u);return a.join("")})}function ls(e,t){var n=typeof t,r;return t==null||n==="boolean"?Wy(t):(n==="number"?tn:n==="string"?(r=Zr(t))?(t=r,Hl):rR:t instanceof Zr?Hl:t instanceof Date?xz:vz(t)?gz:Array.isArray(t)?yz:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?wz:tn)(e,t)}var Iw=180/Math.PI,gv={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function oR(e,t,n,r,o,i){var s,a,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(a=Math.sqrt(n*n+r*r))&&(n/=a,r/=a,l/=a),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*Iw,skewX:Math.atan(l)*Iw,scaleX:s,scaleY:a}}var Ia;function Sz(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?gv:oR(t.a,t.b,t.c,t.d,t.e,t.f)}function Ez(e){return e==null||(Ia||(Ia=document.createElementNS("http://www.w3.org/2000/svg","g")),Ia.setAttribute("transform",e),!(e=Ia.transform.baseVal.consolidate()))?gv:(e=e.matrix,oR(e.a,e.b,e.c,e.d,e.e,e.f))}function iR(e,t,n,r){function o(u){return u.length?u.pop()+" ":""}function i(u,c,d,f,h,g){if(u!==d||c!==f){var m=h.push("translate(",null,t,null,n);g.push({i:m-4,x:tn(u,d)},{i:m-2,x:tn(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function s(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(o(d)+"rotate(",null,r)-2,x:tn(u,c)})):c&&d.push(o(d)+"rotate("+c+r)}function a(u,c,d,f){u!==c?f.push({i:d.push(o(d)+"skewX(",null,r)-2,x:tn(u,c)}):c&&d.push(o(d)+"skewX("+c+r)}function l(u,c,d,f,h,g){if(u!==d||c!==f){var m=h.push(o(h)+"scale(",null,",",null,")");g.push({i:m-4,x:tn(u,d)},{i:m-2,x:tn(c,f)})}else(d!==1||f!==1)&&h.push(o(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,d,f),s(u.rotate,c.rotate,d,f),a(u.skewX,c.skewX,d,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var g=-1,m=f.length,b;++g<m;)d[(b=f[g]).i]=b.x(h);return d.join("")}}}var Cz=iR(Sz,"px, ","px)","deg)"),Nz=iR(Ez,", ",")",")"),kz=1e-12;function jw(e){return((e=Math.exp(e))+1/e)/2}function Rz(e){return((e=Math.exp(e))-1/e)/2}function Pz(e){return((e=Math.exp(2*e))-1)/(e+1)}const sl=function e(t,n,r){function o(i,s){var a=i[0],l=i[1],u=i[2],c=s[0],d=s[1],f=s[2],h=c-a,g=d-l,m=h*h+g*g,b,v;if(m<kz)v=Math.log(f/u)/t,b=function(E){return[a+E*h,l+E*g,u*Math.exp(t*E*v)]};else{var w=Math.sqrt(m),x=(f*f-u*u+r*m)/(2*u*n*w),_=(f*f-u*u-r*m)/(2*f*n*w),C=Math.log(Math.sqrt(x*x+1)-x),S=Math.log(Math.sqrt(_*_+1)-_);v=(S-C)/t,b=function(E){var k=E*v,T=jw(C),I=u/(n*w)*(T*Pz(t*k+C)-Rz(C));return[a+I*h,l+I*g,u*T/jw(t*k+C)]}}return b.duration=v*1e3*t/Math.SQRT2,b}return o.rho=function(i){var s=Math.max(.001,+i),a=s*s,l=a*a;return e(s,a,l)},o}(Math.SQRT2,2,4);var ni=0,Vi=0,$i=0,sR=1e3,Vl,Wi,Wl=0,Jr=0,Pu=0,As=typeof performance=="object"&&performance.now?performance:Date,aR=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Uy(){return Jr||(aR(Tz),Jr=As.now()+Pu)}function Tz(){Jr=0}function Ul(){this._call=this._time=this._next=null}Ul.prototype=lR.prototype={constructor:Ul,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Uy():+n)+(t==null?0:+t),!this._next&&Wi!==this&&(Wi?Wi._next=this:Vl=this,Wi=this),this._call=e,this._time=n,vv()},stop:function(){this._call&&(this._call=null,this._time=1/0,vv())}};function lR(e,t,n){var r=new Ul;return r.restart(e,t,n),r}function Az(){Uy(),++ni;for(var e=Vl,t;e;)(t=Jr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ni}function Ow(){Jr=(Wl=As.now())+Pu,ni=Vi=0;try{Az()}finally{ni=0,Iz(),Jr=0}}function Mz(){var e=As.now(),t=e-Wl;t>sR&&(Pu-=t,Wl=e)}function Iz(){for(var e,t=Vl,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Vl=n);Wi=e,vv(r)}function vv(e){if(!ni){Vi&&(Vi=clearTimeout(Vi));var t=e-Jr;t>24?(e<1/0&&(Vi=setTimeout(Ow,e-As.now()-Pu)),$i&&($i=clearInterval($i))):($i||(Wl=As.now(),$i=setInterval(Mz,sR)),ni=1,aR(Ow))}}function Lw(e,t,n){var r=new Ul;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var jz=ku("start","end","cancel","interrupt"),Oz=[],uR=0,Dw=1,yv=2,al=3,$w=4,xv=5,ll=6;function Tu(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;Lz(e,n,{name:t,index:r,group:o,on:jz,tween:Oz,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:uR})}function Gy(e,t){var n=Wt(e,t);if(n.state>uR)throw new Error("too late; already scheduled");return n}function hn(e,t){var n=Wt(e,t);if(n.state>al)throw new Error("too late; already running");return n}function Wt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Lz(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=lR(i,0,n.time);function i(u){n.state=Dw,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,d,f,h;if(n.state!==Dw)return l();for(c in r)if(h=r[c],h.name===n.name){if(h.state===al)return Lw(s);h.state===$w?(h.state=ll,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+c<t&&(h.state=ll,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[c])}if(Lw(function(){n.state===al&&(n.state=$w,n.timer.restart(a,n.delay,n.time),a(u))}),n.state=yv,n.on.call("start",e,e.__data__,n.index,n.group),n.state===yv){for(n.state=al,o=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=h);o.length=d+1}}function a(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=xv,1),d=-1,f=o.length;++d<f;)o[d].call(e,c);n.state===xv&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=ll,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function ul(e,t){var n=e.__transition,r,o,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}o=r.state>yv&&r.state<xv,r.state=ll,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function Dz(e){return this.each(function(){ul(this,e)})}function $z(e,t){var n,r;return function(){var o=hn(this,e),i=o.tween;if(i!==n){r=n=i;for(var s=0,a=r.length;s<a;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}o.tween=r}}function zz(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=hn(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var a={name:t,value:n},l=0,u=o.length;l<u;++l)if(o[l].name===t){o[l]=a;break}l===u&&o.push(a)}i.tween=o}}function Fz(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Wt(this.node(),n).tween,o=0,i=r.length,s;o<i;++o)if((s=r[o]).name===e)return s.value;return null}return this.each((t==null?$z:zz)(n,e,t))}function Yy(e,t,n){var r=e._id;return e.each(function(){var o=hn(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Wt(o,r).value[t]}}function cR(e,t){var n;return(typeof t=="number"?tn:t instanceof Zr?Hl:(n=Zr(t))?(t=n,Hl):rR)(e,t)}function qz(e){return function(){this.removeAttribute(e)}}function Bz(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Hz(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===r?i:i=t(r=s,n)}}function Vz(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===r?i:i=t(r=s,n)}}function Wz(e,t,n){var r,o,i;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(e):(s=this.getAttribute(e),l=a+"",s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a)))}}function Uz(e,t,n){var r,o,i;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),l=a+"",s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a)))}}function Gz(e,t){var n=Ru(e),r=n==="transform"?Nz:cR;return this.attrTween(e,typeof t=="function"?(n.local?Uz:Wz)(n,r,Yy(this,"attr."+e,t)):t==null?(n.local?Bz:qz)(n):(n.local?Vz:Hz)(n,r,t))}function Yz(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Kz(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Xz(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Kz(e,i)),n}return o._value=t,o}function Qz(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Yz(e,i)),n}return o._value=t,o}function Zz(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=Ru(e);return this.tween(n,(r.local?Xz:Qz)(r,t))}function Jz(e,t){return function(){Gy(this,e).delay=+t.apply(this,arguments)}}function e5(e,t){return t=+t,function(){Gy(this,e).delay=t}}function t5(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Jz:e5)(t,e)):Wt(this.node(),t).delay}function n5(e,t){return function(){hn(this,e).duration=+t.apply(this,arguments)}}function r5(e,t){return t=+t,function(){hn(this,e).duration=t}}function o5(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?n5:r5)(t,e)):Wt(this.node(),t).duration}function i5(e,t){if(typeof t!="function")throw new Error;return function(){hn(this,e).ease=t}}function s5(e){var t=this._id;return arguments.length?this.each(i5(t,e)):Wt(this.node(),t).ease}function a5(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;hn(this,e).ease=n}}function l5(e){if(typeof e!="function")throw new Error;return this.each(a5(this._id,e))}function u5(e){typeof e!="function"&&(e=q2(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,a=r[o]=[],l,u=0;u<s;++u)(l=i[u])&&e.call(l,l.__data__,u,i)&&a.push(l);return new Dn(r,this._parents,this._name,this._id)}function c5(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),s=new Array(r),a=0;a<i;++a)for(var l=t[a],u=n[a],c=l.length,d=s[a]=new Array(c),f,h=0;h<c;++h)(f=l[h]||u[h])&&(d[h]=f);for(;a<r;++a)s[a]=t[a];return new Dn(s,this._parents,this._name,this._id)}function d5(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 f5(e,t,n){var r,o,i=d5(t)?Gy:hn;return function(){var s=i(this,e),a=s.on;a!==r&&(o=(r=a).copy()).on(t,n),s.on=o}}function h5(e,t){var n=this._id;return arguments.length<2?Wt(this.node(),n).on.on(e):this.each(f5(n,e,t))}function p5(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function m5(){return this.on("end.remove",p5(this._id))}function g5(e){var t=this._name,n=this._id;typeof e!="function"&&(e=By(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var a=r[s],l=a.length,u=i[s]=new Array(l),c,d,f=0;f<l;++f)(c=a[f])&&(d=e.call(c,c.__data__,f,a))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,Tu(u[f],t,n,f,u,Wt(c,n)));return new Dn(i,this._parents,t,n)}function v5(e){var t=this._name,n=this._id;typeof e!="function"&&(e=F2(e));for(var r=this._groups,o=r.length,i=[],s=[],a=0;a<o;++a)for(var l=r[a],u=l.length,c,d=0;d<u;++d)if(c=l[d]){for(var f=e.call(c,c.__data__,d,l),h,g=Wt(c,n),m=0,b=f.length;m<b;++m)(h=f[m])&&Tu(h,t,n,m,f,g);i.push(f),s.push(c)}return new Dn(i,s,t,n)}var y5=Ys.prototype.constructor;function x5(){return new y5(this._groups,this._parents)}function w5(e,t){var n,r,o;return function(){var i=ti(this,e),s=(this.style.removeProperty(e),ti(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function dR(e){return function(){this.style.removeProperty(e)}}function b5(e,t,n){var r,o=n+"",i;return function(){var s=ti(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function _5(e,t,n){var r,o,i;return function(){var s=ti(this,e),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(e),ti(this,e))),s===l?null:s===r&&l===o?i:(o=l,i=t(r=s,a))}}function S5(e,t){var n,r,o,i="style."+t,s="end."+i,a;return function(){var l=hn(this,e),u=l.on,c=l.value[i]==null?a||(a=dR(t)):void 0;(u!==n||o!==c)&&(r=(n=u).copy()).on(s,o=c),l.on=r}}function E5(e,t,n){var r=(e+="")=="transform"?Cz:cR;return t==null?this.styleTween(e,w5(e,r)).on("end.style."+e,dR(e)):typeof t=="function"?this.styleTween(e,_5(e,r,Yy(this,"style."+e,t))).each(S5(this._id,e)):this.styleTween(e,b5(e,r,t),n).on("end.style."+e,null)}function C5(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function N5(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&C5(e,s,n)),r}return i._value=t,i}function k5(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,N5(e,t,n??""))}function R5(e){return function(){this.textContent=e}}function P5(e){return function(){var t=e(this);this.textContent=t??""}}function T5(e){return this.tween("text",typeof e=="function"?P5(Yy(this,"text",e)):R5(e==null?"":e+""))}function A5(e){return function(t){this.textContent=e.call(this,t)}}function M5(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&A5(o)),t}return r._value=e,r}function I5(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,M5(e))}function j5(){for(var e=this._name,t=this._id,n=fR(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],a=s.length,l,u=0;u<a;++u)if(l=s[u]){var c=Wt(l,t);Tu(l,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Dn(r,this._parents,e,n)}function O5(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,s){var a={value:s},l={value:function(){--o===0&&i()}};n.each(function(){var u=hn(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),u.on=t}),o===0&&i()})}var L5=0;function Dn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function fR(){return++L5}var _n=Ys.prototype;Dn.prototype={constructor:Dn,select:g5,selectAll:v5,selectChild:_n.selectChild,selectChildren:_n.selectChildren,filter:u5,merge:c5,selection:x5,transition:j5,call:_n.call,nodes:_n.nodes,node:_n.node,size:_n.size,empty:_n.empty,each:_n.each,on:h5,attr:Gz,attrTween:Zz,style:E5,styleTween:k5,text:T5,textTween:I5,remove:m5,tween:Fz,delay:t5,duration:o5,ease:s5,easeVarying:l5,end:O5,[Symbol.iterator]:_n[Symbol.iterator]};function D5(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var $5={time:null,delay:0,duration:250,ease:D5};function z5(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function F5(e){var t,n;e instanceof Dn?(t=e._id,e=e._name):(t=fR(),(n=$5).time=Uy(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],a=s.length,l,u=0;u<a;++u)(l=s[u])&&Tu(l,e,t,u,s,n||z5(l,t));return new Dn(r,this._parents,e,t)}Ys.prototype.interrupt=Dz;Ys.prototype.transition=F5;const ja=e=>()=>e;function q5(e,{sourceEvent:t,target:n,transform:r,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:r,enumerable:!0,configurable:!0},_:{value:o}})}function Rn(e,t,n){this.k=e,this.x=t,this.y=n}Rn.prototype={constructor:Rn,scale:function(e){return e===1?this:new Rn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Rn(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 Au=new Rn(1,0,0);hR.prototype=Rn.prototype;function hR(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Au;return e.__zoom}function id(e){e.stopImmediatePropagation()}function zi(e){e.preventDefault(),e.stopImmediatePropagation()}function B5(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function H5(){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 zw(){return this.__zoom||Au}function V5(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function W5(){return navigator.maxTouchPoints||"ontouchstart"in this}function U5(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function pR(){var e=B5,t=H5,n=U5,r=V5,o=W5,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,l=sl,u=ku("start","zoom","end"),c,d,f,h=500,g=150,m=0,b=10;function v(R){R.property("__zoom",zw).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",T).on("dblclick.zoom",I).filter(o).on("touchstart.zoom",P).on("touchmove.zoom",j).on("touchend.zoom touchcancel.zoom",$).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(R,L,M,O){var N=R.selection?R.selection():R;N.property("__zoom",zw),R!==N?C(R,L,M,O):N.interrupt().each(function(){S(this,arguments).event(O).start().zoom(null,typeof L=="function"?L.apply(this,arguments):L).end()})},v.scaleBy=function(R,L,M,O){v.scaleTo(R,function(){var N=this.__zoom.k,A=typeof L=="function"?L.apply(this,arguments):L;return N*A},M,O)},v.scaleTo=function(R,L,M,O){v.transform(R,function(){var N=t.apply(this,arguments),A=this.__zoom,D=M==null?_(N):typeof M=="function"?M.apply(this,arguments):M,z=A.invert(D),F=typeof L=="function"?L.apply(this,arguments):L;return n(x(w(A,F),D,z),N,s)},M,O)},v.translateBy=function(R,L,M,O){v.transform(R,function(){return n(this.__zoom.translate(typeof L=="function"?L.apply(this,arguments):L,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),s)},null,O)},v.translateTo=function(R,L,M,O,N){v.transform(R,function(){var A=t.apply(this,arguments),D=this.__zoom,z=O==null?_(A):typeof O=="function"?O.apply(this,arguments):O;return n(Au.translate(z[0],z[1]).scale(D.k).translate(typeof L=="function"?-L.apply(this,arguments):-L,typeof M=="function"?-M.apply(this,arguments):-M),A,s)},O,N)};function w(R,L){return L=Math.max(i[0],Math.min(i[1],L)),L===R.k?R:new Rn(L,R.x,R.y)}function x(R,L,M){var O=L[0]-M[0]*R.k,N=L[1]-M[1]*R.k;return O===R.x&&N===R.y?R:new Rn(R.k,O,N)}function _(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function C(R,L,M,O){R.on("start.zoom",function(){S(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(O).end()}).tween("zoom",function(){var N=this,A=arguments,D=S(N,A).event(O),z=t.apply(N,A),F=M==null?_(z):typeof M=="function"?M.apply(N,A):M,V=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),H=N.__zoom,K=typeof L=="function"?L.apply(N,A):L,X=l(H.invert(F).concat(V/H.k),K.invert(F).concat(V/K.k));return function(q){if(q===1)q=K;else{var B=X(q),G=V/B[2];q=new Rn(G,F[0]-B[0]*G,F[1]-B[1]*G)}D.zoom(null,q)}})}function S(R,L,M){return!M&&R.__zooming||new E(R,L)}function E(R,L){this.that=R,this.args=L,this.active=0,this.sourceEvent=null,this.extent=t.apply(R,L),this.taps=0}E.prototype={event:function(R){return R&&(this.sourceEvent=R),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(R,L){return this.mouse&&R!=="mouse"&&(this.mouse[1]=L.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=L.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=L.invert(this.touch1[0])),this.that.__zoom=L,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(R){var L=ht(this.that).datum();u.call(R,this.that,new q5(R,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:u}),L)}};function k(R,...L){if(!e.apply(this,arguments))return;var M=S(this,L).event(R),O=this.__zoom,N=Math.max(i[0],Math.min(i[1],O.k*Math.pow(2,r.apply(this,arguments)))),A=Ot(R);if(M.wheel)(M.mouse[0][0]!==A[0]||M.mouse[0][1]!==A[1])&&(M.mouse[1]=O.invert(M.mouse[0]=A)),clearTimeout(M.wheel);else{if(O.k===N)return;M.mouse=[A,O.invert(A)],ul(this),M.start()}zi(R),M.wheel=setTimeout(D,g),M.zoom("mouse",n(x(w(O,N),M.mouse[0],M.mouse[1]),M.extent,s));function D(){M.wheel=null,M.end()}}function T(R,...L){if(f||!e.apply(this,arguments))return;var M=R.currentTarget,O=S(this,L,!0).event(R),N=ht(R.view).on("mousemove.zoom",F,!0).on("mouseup.zoom",V,!0),A=Ot(R,M),D=R.clientX,z=R.clientY;Q2(R.view),id(R),O.mouse=[A,this.__zoom.invert(A)],ul(this),O.start();function F(H){if(zi(H),!O.moved){var K=H.clientX-D,X=H.clientY-z;O.moved=K*K+X*X>m}O.event(H).zoom("mouse",n(x(O.that.__zoom,O.mouse[0]=Ot(H,M),O.mouse[1]),O.extent,s))}function V(H){N.on("mousemove.zoom mouseup.zoom",null),Z2(H.view,O.moved),zi(H),O.event(H).end()}}function I(R,...L){if(e.apply(this,arguments)){var M=this.__zoom,O=Ot(R.changedTouches?R.changedTouches[0]:R,this),N=M.invert(O),A=M.k*(R.shiftKey?.5:2),D=n(x(w(M,A),O,N),t.apply(this,L),s);zi(R),a>0?ht(this).transition().duration(a).call(C,D,O,R):ht(this).call(v.transform,D,O,R)}}function P(R,...L){if(e.apply(this,arguments)){var M=R.touches,O=M.length,N=S(this,L,R.changedTouches.length===O).event(R),A,D,z,F;for(id(R),D=0;D<O;++D)z=M[D],F=Ot(z,this),F=[F,this.__zoom.invert(F),z.identifier],N.touch0?!N.touch1&&N.touch0[2]!==F[2]&&(N.touch1=F,N.taps=0):(N.touch0=F,A=!0,N.taps=1+!!c);c&&(c=clearTimeout(c)),A&&(N.taps<2&&(d=F[0],c=setTimeout(function(){c=null},h)),ul(this),N.start())}}function j(R,...L){if(this.__zooming){var M=S(this,L).event(R),O=R.changedTouches,N=O.length,A,D,z,F;for(zi(R),A=0;A<N;++A)D=O[A],z=Ot(D,this),M.touch0&&M.touch0[2]===D.identifier?M.touch0[0]=z:M.touch1&&M.touch1[2]===D.identifier&&(M.touch1[0]=z);if(D=M.that.__zoom,M.touch1){var V=M.touch0[0],H=M.touch0[1],K=M.touch1[0],X=M.touch1[1],q=(q=K[0]-V[0])*q+(q=K[1]-V[1])*q,B=(B=X[0]-H[0])*B+(B=X[1]-H[1])*B;D=w(D,Math.sqrt(q/B)),z=[(V[0]+K[0])/2,(V[1]+K[1])/2],F=[(H[0]+X[0])/2,(H[1]+X[1])/2]}else if(M.touch0)z=M.touch0[0],F=M.touch0[1];else return;M.zoom("touch",n(x(D,z,F),M.extent,s))}}function $(R,...L){if(this.__zooming){var M=S(this,L).event(R),O=R.changedTouches,N=O.length,A,D;for(id(R),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),A=0;A<N;++A)D=O[A],M.touch0&&M.touch0[2]===D.identifier?delete M.touch0:M.touch1&&M.touch1[2]===D.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(D=Ot(D,this),Math.hypot(d[0]-D[0],d[1]-D[1])<b)){var z=ht(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return v.wheelDelta=function(R){return arguments.length?(r=typeof R=="function"?R:ja(+R),v):r},v.filter=function(R){return arguments.length?(e=typeof R=="function"?R:ja(!!R),v):e},v.touchable=function(R){return arguments.length?(o=typeof R=="function"?R:ja(!!R),v):o},v.extent=function(R){return arguments.length?(t=typeof R=="function"?R:ja([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),v):t},v.scaleExtent=function(R){return arguments.length?(i[0]=+R[0],i[1]=+R[1],v):[i[0],i[1]]},v.translateExtent=function(R){return arguments.length?(s[0][0]=+R[0][0],s[1][0]=+R[1][0],s[0][1]=+R[0][1],s[1][1]=+R[1][1],v):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},v.constrain=function(R){return arguments.length?(n=R,v):n},v.duration=function(R){return arguments.length?(a=+R,v):a},v.interpolate=function(R){return arguments.length?(l=R,v):l},v.on=function(){var R=u.on.apply(u,arguments);return R===u?v:R},v.clickDistance=function(R){return arguments.length?(m=(R=+R)*R,v):Math.sqrt(m)},v.tapDistance=function(R){return arguments.length?(b=+R,v):b},v}const dn={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:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", 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."},Ms=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],mR=["Enter"," ","Escape"],gR={"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 ri;(function(e){e.Strict="strict",e.Loose="loose"})(ri||(ri={}));var Hr;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Hr||(Hr={}));var Is;(function(e){e.Partial="partial",e.Full="full"})(Is||(Is={}));const vR={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var or;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(or||(or={}));var js;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(js||(js={}));var re;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(re||(re={}));const Fw={[re.Left]:re.Right,[re.Right]:re.Left,[re.Top]:re.Bottom,[re.Bottom]:re.Top};function yR(e){return e===null?null:e?"valid":"invalid"}const xR=e=>"id"in e&&"source"in e&&"target"in e,G5=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Ky=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Xs=(e,t=[0,0])=>{const{width:n,height:r}=Bn(e),o=e.origin??t,i=n*o[0],s=r*o[1];return{x:e.position.x-i,y:e.position.y-s}},Y5=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,o)=>{const i=typeof o=="string";let s=!t.nodeLookup&&!i?o:void 0;t.nodeLookup&&(s=i?t.nodeLookup.get(o):Ky(o)?o:t.nodeLookup.get(o.id));const a=s?Gl(s,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Mu(r,a)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Iu(n)},Qs=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(o=>{(t.filter===void 0||t.filter(o))&&(n=Mu(n,Gl(o)),r=!0)}),r?Iu(n):{x:0,y:0,width:0,height:0}},Xy=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1)=>{const a={...Js(t,[n,r,o]),width:t.width/o,height:t.height/o},l=[];for(const u of e.values()){const{measured:c,selectable:d=!0,hidden:f=!1}=u;if(s&&!d||f)continue;const h=c.width??u.width??u.initialWidth??null,g=c.height??u.height??u.initialHeight??null,m=Os(a,ii(u)),b=(h??0)*(g??0),v=i&&m>0;(!u.internals.handleBounds||v||m>=b||u.dragging)&&l.push(u)}return l},K5=(e,t)=>{const n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function X5(e,t){const n=new Map,r=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)&&(!r||r.has(o.id))&&n.set(o.id,o)}),n}async function Q5({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:i},s){if(e.size===0)return Promise.resolve(!0);const a=X5(e,s),l=Qs(a),u=Qy(l,t,n,(s==null?void 0:s.minZoom)??o,(s==null?void 0:s.maxZoom)??i,(s==null?void 0:s.padding)??.1);return await r.setViewport(u,{duration:s==null?void 0:s.duration,ease:s==null?void 0:s.ease,interpolate:s==null?void 0:s.interpolate}),Promise.resolve(!0)}function wR({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:o,onError:i}){const s=n.get(e),a=s.parentId?n.get(s.parentId):void 0,{x:l,y:u}=a?a.internals.positionAbsolute:{x:0,y:0},c=s.origin??r;let d=s.extent||o;if(s.extent==="parent"&&!s.expandParent)if(!a)i==null||i("005",dn.error005());else{const h=a.measured.width,g=a.measured.height;h&&g&&(d=[[l,u],[l+h,u+g]])}else a&&si(s.extent)&&(d=[[s.extent[0][0]+l,s.extent[0][1]+u],[s.extent[1][0]+l,s.extent[1][1]+u]]);const f=si(d)?eo(t,d,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&(i==null||i("015",dn.error015())),{position:{x:f.x-l+(s.measured.width??0)*c[0],y:f.y-u+(s.measured.height??0)*c[1]},positionAbsolute:f}}async function Z5({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:o}){const i=new Set(e.map(f=>f.id)),s=[];for(const f of n){if(f.deletable===!1)continue;const h=i.has(f.id),g=!h&&f.parentId&&s.find(m=>m.id===f.parentId);(h||g)&&s.push(f)}const a=new Set(t.map(f=>f.id)),l=r.filter(f=>f.deletable!==!1),c=K5(s,l);for(const f of l)a.has(f.id)&&!c.find(g=>g.id===f.id)&&c.push(f);if(!o)return{edges:c,nodes:s};const d=await o({nodes:s,edges:c});return typeof d=="boolean"?d?{edges:c,nodes:s}:{edges:[],nodes:[]}:d}const oi=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),eo=(e={x:0,y:0},t,n)=>({x:oi(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:oi(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function bR(e,t,n){const{width:r,height:o}=Bn(n),{x:i,y:s}=n.internals.positionAbsolute;return eo(e,[[i,s],[i+r,s+o]],t)}const qw=(e,t,n)=>e<t?oi(Math.abs(e-t),1,t)/t:e>n?-oi(Math.abs(e-n),1,t)/t:0,_R=(e,t,n=15,r=40)=>{const o=qw(e.x,r,t.width-r)*n,i=qw(e.y,r,t.height-r)*n;return[o,i]},Mu=(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)}),wv=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Iu=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),ii=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=Ky(e)?e.internals.positionAbsolute:Xs(e,t);return{x:n,y:r,width:((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},Gl=(e,t=[0,0])=>{var o,i;const{x:n,y:r}=Ky(e)?e.internals.positionAbsolute:Xs(e,t);return{x:n,y:r,x2:n+(((o=e.measured)==null?void 0:o.width)??e.width??e.initialWidth??0),y2:r+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},SR=(e,t)=>Iu(Mu(wv(e),wv(t))),Os=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},Bw=e=>$t(e.width)&&$t(e.height)&&$t(e.x)&&$t(e.y),$t=e=>!isNaN(e)&&isFinite(e),J5=(e,t)=>{},Zs=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Js=({x:e,y:t},[n,r,o],i=!1,s=[1,1])=>{const a={x:(e-n)/o,y:(t-r)/o};return i?Zs(a,s):a},Yl=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function yo(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 eF(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=yo(e,n),o=yo(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){const r=yo(e.top??e.y??0,n),o=yo(e.bottom??e.y??0,n),i=yo(e.left??e.x??0,t),s=yo(e.right??e.x??0,t);return{top:r,right:s,bottom:o,left:i,x:i+s,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function tF(e,t,n,r,o,i){const{x:s,y:a}=Yl(e,[t,n,r]),{x:l,y:u}=Yl({x:e.x+e.width,y:e.y+e.height},[t,n,r]),c=o-l,d=i-u;return{left:Math.floor(s),top:Math.floor(a),right:Math.floor(c),bottom:Math.floor(d)}}const Qy=(e,t,n,r,o,i)=>{const s=eF(i,t,n),a=(t-s.x)/e.width,l=(n-s.y)/e.height,u=Math.min(a,l),c=oi(u,r,o),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*c,g=n/2-f*c,m=tF(e,h,g,c,t,n),b={left:Math.min(m.left-s.left,0),top:Math.min(m.top-s.top,0),right:Math.min(m.right-s.right,0),bottom:Math.min(m.bottom-s.bottom,0)};return{x:h-b.left+b.right,y:g-b.top+b.bottom,zoom:c}},Ls=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function si(e){return e!=null&&e!=="parent"}function Bn(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 ER(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 CR(e,t={width:0,height:0},n,r,o){const i={...e},s=r.get(n);if(s){const a=s.origin||o;i.x+=s.internals.positionAbsolute.x-(t.width??0)*a[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*a[1]}return i}function Hw(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function nF(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}function rF(e){return{...gR,...e||{}}}function us(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){const{x:i,y:s}=zt(e),a=Js({x:i-((o==null?void 0:o.left)??0),y:s-((o==null?void 0:o.top)??0)},r),{x:l,y:u}=n?Zs(a,t):a;return{xSnapped:l,ySnapped:u,...a}}const Zy=e=>({width:e.offsetWidth,height:e.offsetHeight}),NR=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},oF=["INPUT","SELECT","TEXTAREA"];function kR(e){var r,o;const t=((o=(r=e.composedPath)==null?void 0:r.call(e))==null?void 0:o[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:oF.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const RR=e=>"clientX"in e,zt=(e,t)=>{var i,s;const n=RR(e),r=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,o=n?e.clientY:(s=e.touches)==null?void 0:s[0].clientY;return{x:r-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}},Vw=(e,t,n,r,o)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{const a=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:o,position:s.getAttribute("data-handlepos"),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...Zy(s)}})};function PR({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:s,targetControlY:a}){const l=e*.125+o*.375+s*.375+n*.125,u=t*.125+i*.375+a*.375+r*.125,c=Math.abs(l-e),d=Math.abs(u-t);return[l,u,c,d]}function Oa(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Ww({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case re.Left:return[t-Oa(t-r,i),n];case re.Right:return[t+Oa(r-t,i),n];case re.Top:return[t,n-Oa(n-o,i)];case re.Bottom:return[t,n+Oa(o-n,i)]}}function TR({sourceX:e,sourceY:t,sourcePosition:n=re.Bottom,targetX:r,targetY:o,targetPosition:i=re.Top,curvature:s=.25}){const[a,l]=Ww({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[u,c]=Ww({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[d,f,h,g]=PR({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:a,sourceControlY:l,targetControlX:u,targetControlY:c});return[`M${e},${t} C${a},${l} ${u},${c} ${r},${o}`,d,f,h,g]}function AR({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,s=Math.abs(r-t)/2,a=r<t?r+s:r-s;return[i,a,o,s]}function iF({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:o=!1,zIndexMode:i="basic"}){if(i==="manual")return r;const s=o&&n?r+1e3:r,a=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return s+a}function sF({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){const i=Mu(Gl(e),Gl(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const s={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:r/o[2]};return Os(s,Iu(i))>0}const aF=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,lF=(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)),uF=(e,t,n={})=>{if(!e.source||!e.target)return t;const r=n.getEdgeId||aF;let o;return xR(e)?o={...e}:o={...e,id:r(e)},lF(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function MR({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,s,a]=AR({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,a]}const Uw={[re.Left]:{x:-1,y:0},[re.Right]:{x:1,y:0},[re.Top]:{x:0,y:-1},[re.Bottom]:{x:0,y:1}},cF=({source:e,sourcePosition:t=re.Bottom,target:n})=>t===re.Left||t===re.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},Gw=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function dF({source:e,sourcePosition:t=re.Bottom,target:n,targetPosition:r=re.Top,center:o,offset:i,stepPosition:s}){const a=Uw[t],l=Uw[r],u={x:e.x+a.x*i,y:e.y+a.y*i},c={x:n.x+l.x*i,y:n.y+l.y*i},d=cF({source:u,sourcePosition:t,target:c}),f=d.x!==0?"x":"y",h=d[f];let g=[],m,b;const v={x:0,y:0},w={x:0,y:0},[,,x,_]=AR({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[f]*l[f]===-1){f==="x"?(m=o.x??u.x+(c.x-u.x)*s,b=o.y??(u.y+c.y)/2):(m=o.x??(u.x+c.x)/2,b=o.y??u.y+(c.y-u.y)*s);const S=[{x:m,y:u.y},{x:m,y:c.y}],E=[{x:u.x,y:b},{x:c.x,y:b}];a[f]===h?g=f==="x"?S:E:g=f==="x"?E:S}else{const S=[{x:u.x,y:c.y}],E=[{x:c.x,y:u.y}];if(f==="x"?g=a.x===h?E:S:g=a.y===h?S:E,t===r){const j=Math.abs(e[f]-n[f]);if(j<=i){const $=Math.min(i-1,i-j);a[f]===h?v[f]=(u[f]>e[f]?-1:1)*$:w[f]=(c[f]>n[f]?-1:1)*$}}if(t!==r){const j=f==="x"?"y":"x",$=a[f]===l[j],R=u[j]>c[j],L=u[j]<c[j];(a[f]===1&&(!$&&R||$&&L)||a[f]!==1&&(!$&&L||$&&R))&&(g=f==="x"?S:E)}const k={x:u.x+v.x,y:u.y+v.y},T={x:c.x+w.x,y:c.y+w.y},I=Math.max(Math.abs(k.x-g[0].x),Math.abs(T.x-g[0].x)),P=Math.max(Math.abs(k.y-g[0].y),Math.abs(T.y-g[0].y));I>=P?(m=(k.x+T.x)/2,b=g[0].y):(m=g[0].x,b=(k.y+T.y)/2)}return[[e,{x:u.x+v.x,y:u.y+v.y},...g,{x:c.x+w.x,y:c.y+w.y},n],m,b,x,_]}function fF(e,t,n,r){const o=Math.min(Gw(e,t)/2,Gw(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){const u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${i+o*u},${s}Q ${i},${s} ${i},${s+o*c}`}const a=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${i},${s+o*l}Q ${i},${s} ${i+o*a},${s}`}function bv({sourceX:e,sourceY:t,sourcePosition:n=re.Bottom,targetX:r,targetY:o,targetPosition:i=re.Top,borderRadius:s=5,centerX:a,centerY:l,offset:u=20,stepPosition:c=.5}){const[d,f,h,g,m]=dF({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:a,y:l},offset:u,stepPosition:c});return[d.reduce((v,w,x)=>{let _="";return x>0&&x<d.length-1?_=fF(d[x-1],w,d[x+1],s):_=`${x===0?"M":"L"}${w.x} ${w.y}`,v+=_,v},""),f,h,g,m]}function Yw(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function hF(e){var d;const{sourceNode:t,targetNode:n}=e;if(!Yw(t)||!Yw(n))return null;const r=t.internals.handleBounds||Kw(t.handles),o=n.internals.handleBounds||Kw(n.handles),i=Xw((r==null?void 0:r.source)??[],e.sourceHandle),s=Xw(e.connectionMode===ri.Strict?(o==null?void 0:o.target)??[]:((o==null?void 0:o.target)??[]).concat((o==null?void 0:o.source)??[]),e.targetHandle);if(!i||!s)return(d=e.onError)==null||d.call(e,"008",dn.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const a=(i==null?void 0:i.position)||re.Bottom,l=(s==null?void 0:s.position)||re.Top,u=to(t,i,a),c=to(n,s,l);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:a,targetPosition:l}}function Kw(e){if(!e)return null;const t=[],n=[];for(const r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function to(e,t,n=re.Left,r=!1){const o=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:s,height:a}=t??Bn(e);if(r)return{x:o+s/2,y:i+a/2};switch((t==null?void 0:t.position)??n){case re.Top:return{x:o+s/2,y:i};case re.Right:return{x:o+s,y:i+a/2};case re.Bottom:return{x:o+s/2,y:i+a};case re.Left:return{x:o,y:i+a/2}}}function Xw(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function _v(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function pF(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:o}){const i=new Set;return e.reduce((s,a)=>([a.markerStart||r,a.markerEnd||o].forEach(l=>{if(l&&typeof l=="object"){const u=_v(l,t);i.has(u)||(s.push({id:u,color:l.color||n,...l}),i.add(u))}}),s),[]).sort((s,a)=>s.id.localeCompare(a.id))}const IR=1e3,mF=10,Jy={nodeOrigin:[0,0],nodeExtent:Ms,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},gF={...Jy,checkEquality:!0};function e0(e,t){const n={...e};for(const r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function vF(e,t,n){const r=e0(Jy,n);for(const o of e.values())if(o.parentId)n0(o,e,t,r);else{const i=Xs(o,r.nodeOrigin),s=si(o.extent)?o.extent:r.nodeExtent,a=eo(i,s,Bn(o));o.internals.positionAbsolute=a}}function yF(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],r=[];for(const o of e.handles){const i={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(i):o.type==="target"&&r.push(i)}return{source:n,target:r}}function t0(e){return e==="manual"}function Sv(e,t,n,r={}){var u,c;const o=e0(gF,r),i={i:0},s=new Map(t),a=o!=null&&o.elevateNodesOnSelect&&!t0(o.zIndexMode)?IR:0;let l=e.length>0;t.clear(),n.clear();for(const d of e){let f=s.get(d.id);if(o.checkEquality&&d===(f==null?void 0:f.internals.userNode))t.set(d.id,f);else{const h=Xs(d,o.nodeOrigin),g=si(d.extent)?d.extent:o.nodeExtent,m=eo(h,g,Bn(d));f={...o.defaults,...d,measured:{width:(u=d.measured)==null?void 0:u.width,height:(c=d.measured)==null?void 0:c.height},internals:{positionAbsolute:m,handleBounds:yF(d,f),z:jR(d,a,o.zIndexMode),userNode:d}},t.set(d.id,f)}(f.measured===void 0||f.measured.width===void 0||f.measured.height===void 0)&&!f.hidden&&(l=!1),d.parentId&&n0(f,t,n,r,i)}return l}function xF(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 n0(e,t,n,r,o){const{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:a,zIndexMode:l}=e0(Jy,r),u=e.parentId,c=t.get(u);if(!c){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}xF(e,n),o&&!c.parentId&&c.internals.rootParentIndex===void 0&&l==="auto"&&(c.internals.rootParentIndex=++o.i,c.internals.z=c.internals.z+o.i*mF),o&&c.internals.rootParentIndex!==void 0&&(o.i=c.internals.rootParentIndex);const d=i&&!t0(l)?IR:0,{x:f,y:h,z:g}=wF(e,c,s,a,d,l),{positionAbsolute:m}=e.internals,b=f!==m.x||h!==m.y;(b||g!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:b?{x:f,y:h}:m,z:g}})}function jR(e,t,n){const r=$t(e.zIndex)?e.zIndex:0;return t0(n)?r:r+(e.selected?t:0)}function wF(e,t,n,r,o,i){const{x:s,y:a}=t.internals.positionAbsolute,l=Bn(e),u=Xs(e,n),c=si(e.extent)?eo(u,e.extent,l):u;let d=eo({x:s+c.x,y:a+c.y},r,l);e.extent==="parent"&&(d=bR(d,l,t));const f=jR(e,o,i),h=t.internals.z??0;return{x:d.x,y:d.y,z:h>=f?h+1:f}}function r0(e,t,n,r=[0,0]){var s;const o=[],i=new Map;for(const a of e){const l=t.get(a.parentId);if(!l)continue;const u=((s=i.get(a.parentId))==null?void 0:s.expandedRect)??ii(l),c=SR(u,a.rect);i.set(a.parentId,{expandedRect:c,parent:l})}return i.size>0&&i.forEach(({expandedRect:a,parent:l},u)=>{var x;const c=l.internals.positionAbsolute,d=Bn(l),f=l.origin??r,h=a.x<c.x?Math.round(Math.abs(c.x-a.x)):0,g=a.y<c.y?Math.round(Math.abs(c.y-a.y)):0,m=Math.max(d.width,Math.round(a.width)),b=Math.max(d.height,Math.round(a.height)),v=(m-d.width)*f[0],w=(b-d.height)*f[1];(h>0||g>0||v||w)&&(o.push({id:u,type:"position",position:{x:l.position.x-h+v,y:l.position.y-g+w}}),(x=n.get(u))==null||x.forEach(_=>{e.some(C=>C.id===_.id)||o.push({id:_.id,type:"position",position:{x:_.position.x+h,y:_.position.y+g}})})),(d.width<a.width||d.height<a.height||h||g)&&o.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:m+(h?f[0]*h-v:0),height:b+(g?f[1]*g-w:0)}})}),o}function bF(e,t,n,r,o,i,s){const a=r==null?void 0:r.querySelector(".xyflow__viewport");let l=!1;if(!a)return{changes:[],updatedInternals:l};const u=[],c=window.getComputedStyle(a),{m22:d}=new window.DOMMatrixReadOnly(c.transform),f=[];for(const h of e.values()){const g=t.get(h.id);if(!g)continue;if(g.hidden){t.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),l=!0;continue}const m=Zy(h.nodeElement),b=g.measured.width!==m.width||g.measured.height!==m.height;if(!!(m.width&&m.height&&(b||!g.internals.handleBounds||h.force))){const w=h.nodeElement.getBoundingClientRect(),x=si(g.extent)?g.extent:i;let{positionAbsolute:_}=g.internals;g.parentId&&g.extent==="parent"?_=bR(_,m,t.get(g.parentId)):x&&(_=eo(_,x,m));const C={...g,measured:m,internals:{...g.internals,positionAbsolute:_,handleBounds:{source:Vw("source",h.nodeElement,w,d,g.id),target:Vw("target",h.nodeElement,w,d,g.id)}}};t.set(g.id,C),g.parentId&&n0(C,t,n,{nodeOrigin:o,zIndexMode:s}),l=!0,b&&(u.push({id:g.id,type:"dimensions",dimensions:m}),g.expandParent&&g.parentId&&f.push({id:g.id,parentId:g.parentId,rect:ii(C,o)}))}}if(f.length>0){const h=r0(f,t,n,o);u.push(...h)}return{changes:u,updatedInternals:l}}async function _F({delta:e,panZoom:t,transform:n,translateExtent:r,width:o,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,i]],r),a=!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2]);return Promise.resolve(a)}function Qw(e,t,n,r,o,i){let s=o;const a=r.get(s)||new Map;r.set(s,a.set(n,t)),s=`${o}-${e}`;const l=r.get(s)||new Map;if(r.set(s,l.set(n,t)),i){s=`${o}-${e}-${i}`;const u=r.get(s)||new Map;r.set(s,u.set(n,t))}}function OR(e,t,n){e.clear(),t.clear();for(const r of n){const{source:o,target:i,sourceHandle:s=null,targetHandle:a=null}=r,l={edgeId:r.id,source:o,target:i,sourceHandle:s,targetHandle:a},u=`${o}-${s}--${i}-${a}`,c=`${i}-${a}--${o}-${s}`;Qw("source",l,c,e,o,s),Qw("target",l,u,e,i,a),t.set(r.id,r)}}function LR(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:LR(n,t):!1}function Zw(e,t,n){var o;let r=e;do{if((o=r==null?void 0:r.matches)!=null&&o.call(r,t))return!0;if(r===n)return!1;r=r==null?void 0:r.parentElement}while(r);return!1}function SF(e,t,n,r){const o=new Map;for(const[i,s]of e)if((s.selected||s.id===r)&&(!s.parentId||!LR(s,e))&&(s.draggable||t&&typeof s.draggable>"u")){const a=e.get(i);a&&o.set(i,{id:i,position:a.position||{x:0,y:0},distance:{x:n.x-a.internals.positionAbsolute.x,y:n.y-a.internals.positionAbsolute.y},extent:a.extent,parentId:a.parentId,origin:a.origin,expandParent:a.expandParent,internals:{positionAbsolute:a.internals.positionAbsolute||{x:0,y:0}},measured:{width:a.measured.width??0,height:a.measured.height??0}})}return o}function sd({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){var s,a,l;const o=[];for(const[u,c]of t){const d=(s=n.get(u))==null?void 0:s.internals.userNode;d&&o.push({...d,position:c.position,dragging:r})}if(!e)return[o[0],o];const i=(a=n.get(e))==null?void 0:a.internals.userNode;return[i?{...i,position:((l=t.get(e))==null?void 0:l.position)||i.position,dragging:r}:o[0],o]}function EF({dragItems:e,snapGrid:t,x:n,y:r}){const o=e.values().next().value;if(!o)return null;const i={x:n-o.distance.x,y:r-o.distance.y},s=Zs(i,t);return{x:s.x-i.x,y:s.y-i.y}}function CF({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:o}){let i={x:null,y:null},s=0,a=new Map,l=!1,u={x:0,y:0},c=null,d=!1,f=null,h=!1,g=!1,m=null;function b({noDragClassName:w,handleSelector:x,domNode:_,isSelectable:C,nodeId:S,nodeClickDistance:E=0}){f=ht(_);function k({x:j,y:$}){const{nodeLookup:R,nodeExtent:L,snapGrid:M,snapToGrid:O,nodeOrigin:N,onNodeDrag:A,onSelectionDrag:D,onError:z,updateNodePositions:F}=t();i={x:j,y:$};let V=!1;const H=a.size>1,K=H&&L?wv(Qs(a)):null,X=H&&O?EF({dragItems:a,snapGrid:M,x:j,y:$}):null;for(const[q,B]of a){if(!R.has(q))continue;let G={x:j-B.distance.x,y:$-B.distance.y};O&&(G=X?{x:Math.round(G.x+X.x),y:Math.round(G.y+X.y)}:Zs(G,M));let Q=null;if(H&&L&&!B.extent&&K){const{positionAbsolute:Z}=B.internals,se=Z.x-K.x+L[0][0],oe=Z.x+B.measured.width-K.x2+L[1][0],le=Z.y-K.y+L[0][1],ie=Z.y+B.measured.height-K.y2+L[1][1];Q=[[se,le],[oe,ie]]}const{position:Y,positionAbsolute:U}=wR({nodeId:q,nextPosition:G,nodeLookup:R,nodeExtent:Q||L,nodeOrigin:N,onError:z});V=V||B.position.x!==Y.x||B.position.y!==Y.y,B.position=Y,B.internals.positionAbsolute=U}if(g=g||V,!!V&&(F(a,!0),m&&(r||A||!S&&D))){const[q,B]=sd({nodeId:S,dragItems:a,nodeLookup:R});r==null||r(m,a,q,B),A==null||A(m,q,B),S||D==null||D(m,B)}}async function T(){if(!c)return;const{transform:j,panBy:$,autoPanSpeed:R,autoPanOnNodeDrag:L}=t();if(!L){l=!1,cancelAnimationFrame(s);return}const[M,O]=_R(u,c,R);(M!==0||O!==0)&&(i.x=(i.x??0)-M/j[2],i.y=(i.y??0)-O/j[2],await $({x:M,y:O})&&k(i)),s=requestAnimationFrame(T)}function I(j){var H;const{nodeLookup:$,multiSelectionActive:R,nodesDraggable:L,transform:M,snapGrid:O,snapToGrid:N,selectNodesOnDrag:A,onNodeDragStart:D,onSelectionDragStart:z,unselectNodesAndEdges:F}=t();d=!0,(!A||!C)&&!R&&S&&((H=$.get(S))!=null&&H.selected||F()),C&&A&&S&&(e==null||e(S));const V=us(j.sourceEvent,{transform:M,snapGrid:O,snapToGrid:N,containerBounds:c});if(i=V,a=SF($,L,V,S),a.size>0&&(n||D||!S&&z)){const[K,X]=sd({nodeId:S,dragItems:a,nodeLookup:$});n==null||n(j.sourceEvent,a,K,X),D==null||D(j.sourceEvent,K,X),S||z==null||z(j.sourceEvent,X)}}const P=J2().clickDistance(E).on("start",j=>{const{domNode:$,nodeDragThreshold:R,transform:L,snapGrid:M,snapToGrid:O}=t();c=($==null?void 0:$.getBoundingClientRect())||null,h=!1,g=!1,m=j.sourceEvent,R===0&&I(j),i=us(j.sourceEvent,{transform:L,snapGrid:M,snapToGrid:O,containerBounds:c}),u=zt(j.sourceEvent,c)}).on("drag",j=>{const{autoPanOnNodeDrag:$,transform:R,snapGrid:L,snapToGrid:M,nodeDragThreshold:O,nodeLookup:N}=t(),A=us(j.sourceEvent,{transform:R,snapGrid:L,snapToGrid:M,containerBounds:c});if(m=j.sourceEvent,(j.sourceEvent.type==="touchmove"&&j.sourceEvent.touches.length>1||S&&!N.has(S))&&(h=!0),!h){if(!l&&$&&d&&(l=!0,T()),!d){const D=zt(j.sourceEvent,c),z=D.x-u.x,F=D.y-u.y;Math.sqrt(z*z+F*F)>O&&I(j)}(i.x!==A.xSnapped||i.y!==A.ySnapped)&&a&&d&&(u=zt(j.sourceEvent,c),k(A))}}).on("end",j=>{if(!(!d||h)&&(l=!1,d=!1,cancelAnimationFrame(s),a.size>0)){const{nodeLookup:$,updateNodePositions:R,onNodeDragStop:L,onSelectionDragStop:M}=t();if(g&&(R(a,!1),g=!1),o||L||!S&&M){const[O,N]=sd({nodeId:S,dragItems:a,nodeLookup:$,dragging:!1});o==null||o(j.sourceEvent,a,O,N),L==null||L(j.sourceEvent,O,N),S||M==null||M(j.sourceEvent,N)}}}).filter(j=>{const $=j.target;return!j.button&&(!w||!Zw($,`.${w}`,_))&&(!x||Zw($,x,_))});f.call(P)}function v(){f==null||f.on(".drag",null)}return{update:b,destroy:v}}function NF(e,t,n){const r=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())Os(o,ii(i))>0&&r.push(i);return r}const kF=250;function RF(e,t,n,r){var a,l;let o=[],i=1/0;const s=NF(e,n,t+kF);for(const u of s){const c=[...((a=u.internals.handleBounds)==null?void 0:a.source)??[],...((l=u.internals.handleBounds)==null?void 0:l.target)??[]];for(const d of c){if(r.nodeId===d.nodeId&&r.type===d.type&&r.id===d.id)continue;const{x:f,y:h}=to(u,d,d.position,!0),g=Math.sqrt(Math.pow(f-e.x,2)+Math.pow(h-e.y,2));g>t||(g<i?(o=[{...d,x:f,y:h}],i=g):g===i&&o.push({...d,x:f,y:h}))}}if(!o.length)return null;if(o.length>1){const u=r.type==="source"?"target":"source";return o.find(c=>c.type===u)??o[0]}return o[0]}function DR(e,t,n,r,o,i=!1){var u,c,d;const s=r.get(e);if(!s)return null;const a=o==="strict"?(u=s.internals.handleBounds)==null?void 0:u[t]:[...((c=s.internals.handleBounds)==null?void 0:c.source)??[],...((d=s.internals.handleBounds)==null?void 0:d.target)??[]],l=(n?a==null?void 0:a.find(f=>f.id===n):a==null?void 0:a[0])??null;return l&&i?{...l,...to(s,l,l.position,!0)}:l}function $R(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function PF(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const zR=()=>!0;function TF(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:i,isTarget:s,domNode:a,nodeLookup:l,lib:u,autoPanOnConnect:c,flowId:d,panBy:f,cancelConnection:h,onConnectStart:g,onConnect:m,onConnectEnd:b,isValidConnection:v=zR,onReconnectEnd:w,updateConnection:x,getTransform:_,getFromHandle:C,autoPanSpeed:S,dragThreshold:E=1,handleDomNode:k}){const T=NR(e.target);let I=0,P;const{x:j,y:$}=zt(e),R=$R(i,k),L=a==null?void 0:a.getBoundingClientRect();let M=!1;if(!L||!R)return;const O=DR(o,R,r,l,t);if(!O)return;let N=zt(e,L),A=!1,D=null,z=!1,F=null;function V(){if(!c||!L)return;const[Y,U]=_R(N,L,S);f({x:Y,y:U}),I=requestAnimationFrame(V)}const H={...O,nodeId:o,type:R,position:O.position},K=l.get(o);let q={inProgress:!0,isValid:null,from:to(K,H,re.Left,!0),fromHandle:H,fromPosition:H.position,fromNode:K,to:N,toHandle:null,toPosition:Fw[H.position],toNode:null,pointer:N};function B(){M=!0,x(q),g==null||g(e,{nodeId:o,handleId:r,handleType:R})}E===0&&B();function G(Y){if(!M){const{x:ie,y:Be}=zt(Y),Ae=ie-j,vn=Be-$;if(!(Ae*Ae+vn*vn>E*E))return;B()}if(!C()||!H){Q(Y);return}const U=_();N=zt(Y,L),P=RF(Js(N,U,!1,[1,1]),n,l,H),A||(V(),A=!0);const Z=FR(Y,{handle:P,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:s?"target":"source",isValidConnection:v,doc:T,lib:u,flowId:d,nodeLookup:l});F=Z.handleDomNode,D=Z.connection,z=PF(!!P,Z.isValid);const se=l.get(o),oe=se?to(se,H,re.Left,!0):q.from,le={...q,from:oe,isValid:z,to:Z.toHandle&&z?Yl({x:Z.toHandle.x,y:Z.toHandle.y},U):N,toHandle:Z.toHandle,toPosition:z&&Z.toHandle?Z.toHandle.position:Fw[H.position],toNode:Z.toHandle?l.get(Z.toHandle.nodeId):null,pointer:N};x(le),q=le}function Q(Y){if(!("touches"in Y&&Y.touches.length>0)){if(M){(P||F)&&D&&z&&(m==null||m(D));const{inProgress:U,...Z}=q,se={...Z,toPosition:q.toHandle?q.toPosition:null};b==null||b(Y,se),i&&(w==null||w(Y,se))}h(),cancelAnimationFrame(I),A=!1,z=!1,D=null,F=null,T.removeEventListener("mousemove",G),T.removeEventListener("mouseup",Q),T.removeEventListener("touchmove",G),T.removeEventListener("touchend",Q)}}T.addEventListener("mousemove",G),T.addEventListener("mouseup",Q),T.addEventListener("touchmove",G),T.addEventListener("touchend",Q)}function FR(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:i,doc:s,lib:a,flowId:l,isValidConnection:u=zR,nodeLookup:c}){const d=i==="target",f=t?s.querySelector(`.${a}-flow__handle[data-id="${l}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:h,y:g}=zt(e),m=s.elementFromPoint(h,g),b=m!=null&&m.classList.contains(`${a}-flow__handle`)?m:f,v={handleDomNode:b,isValid:!1,connection:null,toHandle:null};if(b){const w=$R(void 0,b),x=b.getAttribute("data-nodeid"),_=b.getAttribute("data-handleid"),C=b.classList.contains("connectable"),S=b.classList.contains("connectableend");if(!x||!w)return v;const E={source:d?x:r,sourceHandle:d?_:o,target:d?r:x,targetHandle:d?o:_};v.connection=E;const T=C&&S&&(n===ri.Strict?d&&w==="source"||!d&&w==="target":x!==r||_!==o);v.isValid=T&&u(E),v.toHandle=DR(x,w,_,c,n,!0)}return v}const Ev={onPointerDown:TF,isValid:FR};function AF({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){const o=ht(e);function i({translateExtent:a,width:l,height:u,zoomStep:c=1,pannable:d=!0,zoomable:f=!0,inversePan:h=!1}){const g=x=>{if(x.sourceEvent.type!=="wheel"||!t)return;const _=n(),C=x.sourceEvent.ctrlKey&&Ls()?10:1,S=-x.sourceEvent.deltaY*(x.sourceEvent.deltaMode===1?.05:x.sourceEvent.deltaMode?1:.002)*c,E=_[2]*Math.pow(2,S*C);t.scaleTo(E)};let m=[0,0];const b=x=>{(x.sourceEvent.type==="mousedown"||x.sourceEvent.type==="touchstart")&&(m=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY])},v=x=>{const _=n();if(x.sourceEvent.type!=="mousemove"&&x.sourceEvent.type!=="touchmove"||!t)return;const C=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY],S=[C[0]-m[0],C[1]-m[1]];m=C;const E=r()*Math.max(_[2],Math.log(_[2]))*(h?-1:1),k={x:_[0]-S[0]*E,y:_[1]-S[1]*E},T=[[0,0],[l,u]];t.setViewportConstrained({x:k.x,y:k.y,zoom:_[2]},T,a)},w=pR().on("start",b).on("zoom",d?v:null).on("zoom.wheel",f?g:null);o.call(w,{})}function s(){o.on("zoom",null)}return{update:i,destroy:s,pointer:Ot}}const ju=e=>({x:e.x,y:e.y,zoom:e.k}),ad=({x:e,y:t,zoom:n})=>Au.translate(e,t).scale(n),jo=(e,t)=>e.target.closest(`.${t}`),qR=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),MF=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,ld=(e,t=0,n=MF,r=()=>{})=>{const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},BR=e=>{const t=e.ctrlKey&&Ls()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function IF({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:a,onPanZoom:l,onPanZoomEnd:u}){return c=>{if(jo(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();const d=n.property("__zoom").k||1;if(c.ctrlKey&&s){const b=Ot(c),v=BR(c),w=d*Math.pow(2,v);r.scaleTo(n,w,b,c);return}const f=c.deltaMode===1?20:1;let h=o===Hr.Vertical?0:c.deltaX*f,g=o===Hr.Horizontal?0:c.deltaY*f;!Ls()&&c.shiftKey&&o!==Hr.Vertical&&(h=c.deltaY*f,g=0),r.translateBy(n,-(h/d)*i,-(g/d)*i,{internal:!0});const m=ju(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(l==null||l(c,m),e.panScrollTimeout=setTimeout(()=>{u==null||u(c,m),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,a==null||a(c,m))}}function jF({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){const i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,a=jo(r,e);if(r.ctrlKey&&i&&a&&r.preventDefault(),s||a)return null;r.preventDefault(),n.call(this,r,o)}}function OF({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{var i,s,a;if((i=r.sourceEvent)!=null&&i.internal)return;const o=ju(r.transform);e.mouseButton=((s=r.sourceEvent)==null?void 0:s.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=o,((a=r.sourceEvent)==null?void 0:a.type)==="mousedown"&&t(!0),n&&(n==null||n(r.sourceEvent,o))}}function LF({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return i=>{var s,a;e.usedRightMouseButton=!!(n&&qR(t,e.mouseButton??0)),(s=i.sourceEvent)!=null&&s.sync||r([i.transform.x,i.transform.y,i.transform.k]),o&&!((a=i.sourceEvent)!=null&&a.internal)&&(o==null||o(i.sourceEvent,ju(i.transform)))}}function DF({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:o,onPaneContextMenu:i}){return s=>{var a;if(!((a=s.sourceEvent)!=null&&a.internal)&&(e.isZoomingOrPanning=!1,i&&qR(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){const l=ju(s.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o==null||o(s.sourceEvent,l)},n?150:0)}}}function $F({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:r,panOnScroll:o,zoomOnDoubleClick:i,userSelectionActive:s,noWheelClassName:a,noPanClassName:l,lib:u,connectionInProgress:c}){return d=>{var b;const f=e||t,h=n&&d.ctrlKey,g=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(jo(d,`${u}-flow__node`)||jo(d,`${u}-flow__edge`)))return!0;if(!r&&!f&&!o&&!i&&!n||s||c&&!g||jo(d,a)&&g||jo(d,l)&&(!g||o&&g&&!e)||!n&&d.ctrlKey&&g)return!1;if(!n&&d.type==="touchstart"&&((b=d.touches)==null?void 0:b.length)>1)return d.preventDefault(),!1;if(!f&&!o&&!h&&g||!r&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(r)&&!r.includes(d.button)&&d.type==="mousedown")return!1;const m=Array.isArray(r)&&r.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||g)&&m}}function zF({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:o,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:a,onDraggingChange:l}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),d=pR().scaleExtent([t,n]).translateExtent(r),f=ht(e).call(d);w({x:o.x,y:o.y,zoom:oi(o.zoom,t,n)},[[0,0],[c.width,c.height]],r);const h=f.on("wheel.zoom"),g=f.on("dblclick.zoom");d.wheelDelta(BR);function m(P,j){return f?new Promise($=>{d==null||d.interpolate((j==null?void 0:j.interpolate)==="linear"?ls:sl).transform(ld(f,j==null?void 0:j.duration,j==null?void 0:j.ease,()=>$(!0)),P)}):Promise.resolve(!1)}function b({noWheelClassName:P,noPanClassName:j,onPaneContextMenu:$,userSelectionActive:R,panOnScroll:L,panOnDrag:M,panOnScrollMode:O,panOnScrollSpeed:N,preventScrolling:A,zoomOnPinch:D,zoomOnScroll:z,zoomOnDoubleClick:F,zoomActivationKeyPressed:V,lib:H,onTransformChange:K,connectionInProgress:X,paneClickDistance:q,selectionOnDrag:B}){R&&!u.isZoomingOrPanning&&v();const G=L&&!V&&!R;d.clickDistance(B?1/0:!$t(q)||q<0?0:q);const Q=G?IF({zoomPanValues:u,noWheelClassName:P,d3Selection:f,d3Zoom:d,panOnScrollMode:O,panOnScrollSpeed:N,zoomOnPinch:D,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:a}):jF({noWheelClassName:P,preventScrolling:A,d3ZoomHandler:h});if(f.on("wheel.zoom",Q,{passive:!1}),!R){const U=OF({zoomPanValues:u,onDraggingChange:l,onPanZoomStart:s});d.on("start",U);const Z=LF({zoomPanValues:u,panOnDrag:M,onPaneContextMenu:!!$,onPanZoom:i,onTransformChange:K});d.on("zoom",Z);const se=DF({zoomPanValues:u,panOnDrag:M,panOnScroll:L,onPaneContextMenu:$,onPanZoomEnd:a,onDraggingChange:l});d.on("end",se)}const Y=$F({zoomActivationKeyPressed:V,panOnDrag:M,zoomOnScroll:z,panOnScroll:L,zoomOnDoubleClick:F,zoomOnPinch:D,userSelectionActive:R,noPanClassName:j,noWheelClassName:P,lib:H,connectionInProgress:X});d.filter(Y),F?f.on("dblclick.zoom",g):f.on("dblclick.zoom",null)}function v(){d.on("zoom",null)}async function w(P,j,$){const R=ad(P),L=d==null?void 0:d.constrain()(R,j,$);return L&&await m(L),new Promise(M=>M(L))}async function x(P,j){const $=ad(P);return await m($,j),new Promise(R=>R($))}function _(P){if(f){const j=ad(P),$=f.property("__zoom");($.k!==P.zoom||$.x!==P.x||$.y!==P.y)&&(d==null||d.transform(f,j,null,{sync:!0}))}}function C(){const P=f?hR(f.node()):{x:0,y:0,k:1};return{x:P.x,y:P.y,zoom:P.k}}function S(P,j){return f?new Promise($=>{d==null||d.interpolate((j==null?void 0:j.interpolate)==="linear"?ls:sl).scaleTo(ld(f,j==null?void 0:j.duration,j==null?void 0:j.ease,()=>$(!0)),P)}):Promise.resolve(!1)}function E(P,j){return f?new Promise($=>{d==null||d.interpolate((j==null?void 0:j.interpolate)==="linear"?ls:sl).scaleBy(ld(f,j==null?void 0:j.duration,j==null?void 0:j.ease,()=>$(!0)),P)}):Promise.resolve(!1)}function k(P){d==null||d.scaleExtent(P)}function T(P){d==null||d.translateExtent(P)}function I(P){const j=!$t(P)||P<0?0:P;d==null||d.clickDistance(j)}return{update:b,destroy:v,setViewport:x,setViewportConstrained:w,getViewport:C,scaleTo:S,scaleBy:E,setScaleExtent:k,setTranslateExtent:T,syncViewport:_,setClickDistance:I}}var ai;(function(e){e.Line="line",e.Handle="handle"})(ai||(ai={}));function FF({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:o,affectsY:i}){const s=e-t,a=n-r,l=[s>0?1:s<0?-1:0,a>0?1:a<0?-1:0];return s&&o&&(l[0]=l[0]*-1),a&&i&&(l[1]=l[1]*-1),l}function Jw(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),o=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:o}}function Xn(e,t){return Math.max(0,t-e)}function Qn(e,t){return Math.max(0,e-t)}function La(e,t,n){return Math.max(0,t-e,e-n)}function eb(e,t){return e?!t:t}function qF(e,t,n,r,o,i,s,a){let{affectsX:l,affectsY:u}=t;const{isHorizontal:c,isVertical:d}=t,f=c&&d,{xSnapped:h,ySnapped:g}=n,{minWidth:m,maxWidth:b,minHeight:v,maxHeight:w}=r,{x,y:_,width:C,height:S,aspectRatio:E}=e;let k=Math.floor(c?h-e.pointerX:0),T=Math.floor(d?g-e.pointerY:0);const I=C+(l?-k:k),P=S+(u?-T:T),j=-i[0]*C,$=-i[1]*S;let R=La(I,m,b),L=La(P,v,w);if(s){let N=0,A=0;l&&k<0?N=Xn(x+k+j,s[0][0]):!l&&k>0&&(N=Qn(x+I+j,s[1][0])),u&&T<0?A=Xn(_+T+$,s[0][1]):!u&&T>0&&(A=Qn(_+P+$,s[1][1])),R=Math.max(R,N),L=Math.max(L,A)}if(a){let N=0,A=0;l&&k>0?N=Qn(x+k,a[0][0]):!l&&k<0&&(N=Xn(x+I,a[1][0])),u&&T>0?A=Qn(_+T,a[0][1]):!u&&T<0&&(A=Xn(_+P,a[1][1])),R=Math.max(R,N),L=Math.max(L,A)}if(o){if(c){const N=La(I/E,v,w)*E;if(R=Math.max(R,N),s){let A=0;!l&&!u||l&&!u&&f?A=Qn(_+$+I/E,s[1][1])*E:A=Xn(_+$+(l?k:-k)/E,s[0][1])*E,R=Math.max(R,A)}if(a){let A=0;!l&&!u||l&&!u&&f?A=Xn(_+I/E,a[1][1])*E:A=Qn(_+(l?k:-k)/E,a[0][1])*E,R=Math.max(R,A)}}if(d){const N=La(P*E,m,b)/E;if(L=Math.max(L,N),s){let A=0;!l&&!u||u&&!l&&f?A=Qn(x+P*E+j,s[1][0])/E:A=Xn(x+(u?T:-T)*E+j,s[0][0])/E,L=Math.max(L,A)}if(a){let A=0;!l&&!u||u&&!l&&f?A=Xn(x+P*E,a[1][0])/E:A=Qn(x+(u?T:-T)*E,a[0][0])/E,L=Math.max(L,A)}}}T=T+(T<0?L:-L),k=k+(k<0?R:-R),o&&(f?I>P*E?T=(eb(l,u)?-k:k)/E:k=(eb(l,u)?-T:T)*E:c?(T=k/E,u=l):(k=T*E,l=u));const M=l?x+k:x,O=u?_+T:_;return{width:C+(l?-k:k),height:S+(u?-T:T),x:i[0]*k*(l?-1:1)+M,y:i[1]*T*(u?-1:1)+O}}const HR={width:0,height:0,x:0,y:0},BF={...HR,pointerX:0,pointerY:0,aspectRatio:1};function HF(e){return[[0,0],[e.measured.width,e.measured.height]]}function VF(e,t,n){const r=t.position.x+e.position.x,o=t.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,a=n[0]*i,l=n[1]*s;return[[r-a,o-l],[r+i-a,o+s-l]]}function WF({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){const i=ht(e);let s={controlDirection:Jw("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function a({controlPosition:u,boundaries:c,keepAspectRatio:d,resizeDirection:f,onResizeStart:h,onResize:g,onResizeEnd:m,shouldResize:b}){let v={...HR},w={...BF};s={boundaries:c,resizeDirection:f,keepAspectRatio:d,controlDirection:Jw(u)};let x,_=null,C=[],S,E,k,T=!1;const I=J2().on("start",P=>{const{nodeLookup:j,transform:$,snapGrid:R,snapToGrid:L,nodeOrigin:M,paneDomNode:O}=n();if(x=j.get(t),!x)return;_=(O==null?void 0:O.getBoundingClientRect())??null;const{xSnapped:N,ySnapped:A}=us(P.sourceEvent,{transform:$,snapGrid:R,snapToGrid:L,containerBounds:_});v={width:x.measured.width??0,height:x.measured.height??0,x:x.position.x??0,y:x.position.y??0},w={...v,pointerX:N,pointerY:A,aspectRatio:v.width/v.height},S=void 0,x.parentId&&(x.extent==="parent"||x.expandParent)&&(S=j.get(x.parentId),E=S&&x.extent==="parent"?HF(S):void 0),C=[],k=void 0;for(const[D,z]of j)if(z.parentId===t&&(C.push({id:D,position:{...z.position},extent:z.extent}),z.extent==="parent"||z.expandParent)){const F=VF(z,x,z.origin??M);k?k=[[Math.min(F[0][0],k[0][0]),Math.min(F[0][1],k[0][1])],[Math.max(F[1][0],k[1][0]),Math.max(F[1][1],k[1][1])]]:k=F}h==null||h(P,{...v})}).on("drag",P=>{const{transform:j,snapGrid:$,snapToGrid:R,nodeOrigin:L}=n(),M=us(P.sourceEvent,{transform:j,snapGrid:$,snapToGrid:R,containerBounds:_}),O=[];if(!x)return;const{x:N,y:A,width:D,height:z}=v,F={},V=x.origin??L,{width:H,height:K,x:X,y:q}=qF(w,s.controlDirection,M,s.boundaries,s.keepAspectRatio,V,E,k),B=H!==D,G=K!==z,Q=X!==N&&B,Y=q!==A&&G;if(!Q&&!Y&&!B&&!G)return;if((Q||Y||V[0]===1||V[1]===1)&&(F.x=Q?X:v.x,F.y=Y?q:v.y,v.x=F.x,v.y=F.y,C.length>0)){const oe=X-N,le=q-A;for(const ie of C)ie.position={x:ie.position.x-oe+V[0]*(H-D),y:ie.position.y-le+V[1]*(K-z)},O.push(ie)}if((B||G)&&(F.width=B&&(!s.resizeDirection||s.resizeDirection==="horizontal")?H:v.width,F.height=G&&(!s.resizeDirection||s.resizeDirection==="vertical")?K:v.height,v.width=F.width,v.height=F.height),S&&x.expandParent){const oe=V[0]*(F.width??0);F.x&&F.x<oe&&(v.x=oe,w.x=w.x-(F.x-oe));const le=V[1]*(F.height??0);F.y&&F.y<le&&(v.y=le,w.y=w.y-(F.y-le))}const U=FF({width:v.width,prevWidth:D,height:v.height,prevHeight:z,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),Z={...v,direction:U};(b==null?void 0:b(P,Z))!==!1&&(T=!0,g==null||g(P,Z),r(F,O))}).on("end",P=>{T&&(m==null||m(P,{...v}),o==null||o({...v}),T=!1)});i.call(I)}function l(){i.on(".drag",null)}return{update:a,destroy:l}}var VR={exports:{}},WR={},UR={exports:{}},GR={};/**
|
|
231
|
-
* @license React
|
|
232
|
-
* use-sync-external-store-shim.production.js
|
|
233
|
-
*
|
|
234
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
235
|
-
*
|
|
236
|
-
* This source code is licensed under the MIT license found in the
|
|
237
|
-
* LICENSE file in the root directory of this source tree.
|
|
238
|
-
*/var li=y;function UF(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var GF=typeof Object.is=="function"?Object.is:UF,YF=li.useState,KF=li.useEffect,XF=li.useLayoutEffect,QF=li.useDebugValue;function ZF(e,t){var n=t(),r=YF({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return XF(function(){o.value=n,o.getSnapshot=t,ud(o)&&i({inst:o})},[e,n,t]),KF(function(){return ud(o)&&i({inst:o}),e(function(){ud(o)&&i({inst:o})})},[e]),QF(n),n}function ud(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!GF(e,n)}catch{return!0}}function JF(e,t){return t()}var eq=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?JF:ZF;GR.useSyncExternalStore=li.useSyncExternalStore!==void 0?li.useSyncExternalStore:eq;UR.exports=GR;var tq=UR.exports;/**
|
|
239
|
-
* @license React
|
|
240
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
241
|
-
*
|
|
242
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
243
|
-
*
|
|
244
|
-
* This source code is licensed under the MIT license found in the
|
|
245
|
-
* LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/var Ou=y,nq=tq;function rq(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var oq=typeof Object.is=="function"?Object.is:rq,iq=nq.useSyncExternalStore,sq=Ou.useRef,aq=Ou.useEffect,lq=Ou.useMemo,uq=Ou.useDebugValue;WR.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=sq(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=lq(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&s.hasValue){var g=s.value;if(o(g,h))return d=g}return d=h}if(g=d,oq(c,h))return g;var m=r(h);return o!==void 0&&o(g,m)?(c=h,g):(c=h,d=m)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var a=iq(e,i[0],i[1]);return aq(function(){s.hasValue=!0,s.value=a},[a]),uq(a),a};VR.exports=WR;var cq=VR.exports;const dq=cu(cq),fq={},tb=e=>{let t;const n=new Set,r=(c,d)=>{const f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){const h=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(g=>g(t,h))}},o=()=>t,l={setState:r,getState:o,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(fq?"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()}},u=t=e(r,o,l);return l},hq=e=>e?tb(e):tb,{useDebugValue:pq}=en,{useSyncExternalStoreWithSelector:mq}=dq,gq=e=>e;function YR(e,t=gq,n){const r=mq(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return pq(r),r}const nb=(e,t)=>{const n=hq(e),r=(o,i=t)=>YR(n,o,i);return Object.assign(r,n),r},vq=(e,t)=>e?nb(e,t):nb;function Ee(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[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}const Lu=y.createContext(null),yq=Lu.Provider,KR=dn.error001();function pe(e,t){const n=y.useContext(Lu);if(n===null)throw new Error(KR);return YR(n,e,t)}function Ce(){const e=y.useContext(Lu);if(e===null)throw new Error(KR);return y.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const rb={display:"none"},xq={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},XR="react-flow__node-desc",QR="react-flow__edge-desc",wq="react-flow__aria-live",bq=e=>e.ariaLiveMessage,_q=e=>e.ariaLabelConfig;function Sq({rfId:e}){const t=pe(bq);return p.jsx("div",{id:`${wq}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:xq,children:t})}function Eq({rfId:e,disableKeyboardA11y:t}){const n=pe(_q);return p.jsxs(p.Fragment,{children:[p.jsx("div",{id:`${XR}-${e}`,style:rb,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),p.jsx("div",{id:`${QR}-${e}`,style:rb,children:n["edge.a11yDescription.default"]}),!t&&p.jsx(Sq,{rfId:e})]})}const Du=y.forwardRef(({position:e="top-left",children:t,className:n,style:r,...o},i)=>{const s=`${e}`.split("-");return p.jsx("div",{className:Oe(["react-flow__panel",n,...s]),style:r,ref:i,...o,children:t})});Du.displayName="Panel";function Cq({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:p.jsx(Du,{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:p.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const Nq=e=>{const t=[],n=[];for(const[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(const[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},Da=e=>e.id;function kq(e,t){return Ee(e.selectedNodes.map(Da),t.selectedNodes.map(Da))&&Ee(e.selectedEdges.map(Da),t.selectedEdges.map(Da))}function Rq({onSelectionChange:e}){const t=Ce(),{selectedNodes:n,selectedEdges:r}=pe(Nq,kq);return y.useEffect(()=>{const o={nodes:n,edges:r};e==null||e(o),t.getState().onSelectionChangeHandlers.forEach(i=>i(o))},[n,r,e]),null}const Pq=e=>!!e.onSelectionChangeHandlers;function Tq({onSelectionChange:e}){const t=pe(Pq);return e||t?p.jsx(Rq,{onSelectionChange:e}):null}const ZR=[0,0],Aq={x:0,y:0,zoom:1},Mq=["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"],ob=[...Mq,"rfId"],Iq=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}),ib={translateExtent:Ms,nodeOrigin:ZR,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function jq(e){const{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:i,setNodeExtent:s,reset:a,setDefaultNodesAndEdges:l}=pe(Iq,Ee),u=Ce();y.useEffect(()=>(l(e.defaultNodes,e.defaultEdges),()=>{c.current=ib,a()}),[]);const c=y.useRef(ib);return y.useEffect(()=>{for(const d of ob){const f=e[d],h=c.current[d];f!==h&&(typeof e[d]>"u"||(d==="nodes"?t(f):d==="edges"?n(f):d==="minZoom"?r(f):d==="maxZoom"?o(f):d==="translateExtent"?i(f):d==="nodeExtent"?s(f):d==="ariaLabelConfig"?u.setState({ariaLabelConfig:rF(f)}):d==="fitView"?u.setState({fitViewQueued:f}):d==="fitViewOptions"?u.setState({fitViewOptions:f}):u.setState({[d]:f})))}c.current=e},ob.map(d=>e[d])),null}function sb(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function Oq(e){var r;const[t,n]=y.useState(e==="system"?null:e);return y.useEffect(()=>{if(e!=="system"){n(e);return}const o=sb(),i=()=>n(o!=null&&o.matches?"dark":"light");return i(),o==null||o.addEventListener("change",i),()=>{o==null||o.removeEventListener("change",i)}},[e]),t!==null?t:(r=sb())!=null&&r.matches?"dark":"light"}const ab=typeof document<"u"?document:null;function Ds(e=null,t={target:ab,actInsideInputWithModifier:!0}){const[n,r]=y.useState(!1),o=y.useRef(!1),i=y.useRef(new Set([])),[s,a]=y.useMemo(()=>{if(e!==null){const u=(Array.isArray(e)?e:[e]).filter(d=>typeof d=="string").map(d=>d.replace("+",`
|
|
247
|
-
`).replace(`
|
|
248
|
-
|
|
249
|
-
`,`
|
|
250
|
-
+`).split(`
|
|
251
|
-
`)),c=u.reduce((d,f)=>d.concat(...f),[]);return[u,c]}return[[],[]]},[e]);return y.useEffect(()=>{const l=(t==null?void 0:t.target)??ab,u=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const c=h=>{var b,v;if(o.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!o.current||o.current&&!u)&&kR(h))return!1;const m=ub(h.code,a);if(i.current.add(h[m]),lb(s,i.current,!1)){const w=((v=(b=h.composedPath)==null?void 0:b.call(h))==null?void 0:v[0])||h.target,x=(w==null?void 0:w.nodeName)==="BUTTON"||(w==null?void 0:w.nodeName)==="A";t.preventDefault!==!1&&(o.current||!x)&&h.preventDefault(),r(!0)}},d=h=>{const g=ub(h.code,a);lb(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(h[g]),h.key==="Meta"&&i.current.clear(),o.current=!1},f=()=>{i.current.clear(),r(!1)};return l==null||l.addEventListener("keydown",c),l==null||l.addEventListener("keyup",d),window.addEventListener("blur",f),window.addEventListener("contextmenu",f),()=>{l==null||l.removeEventListener("keydown",c),l==null||l.removeEventListener("keyup",d),window.removeEventListener("blur",f),window.removeEventListener("contextmenu",f)}}},[e,r]),n}function lb(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function ub(e,t){return t.includes(e)?"code":"key"}const Lq=()=>{const e=Ce();return y.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:r}=e.getState();return r?r.scaleTo(t,{duration:n==null?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[r,o,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??o,zoom:t.zoom??i},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{const{width:r,height:o,minZoom:i,maxZoom:s,panZoom:a}=e.getState(),l=Qy(t,r,o,i,s,(n==null?void 0:n.padding)??.1);return a?(await a.setViewport(l,{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:r,snapGrid:o,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;const{x:a,y:l}=s.getBoundingClientRect(),u={x:t.x-a,y:t.y-l},c=n.snapGrid??o,d=n.snapToGrid??i;return Js(u,r,d,c)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:i}=r.getBoundingClientRect(),s=Yl(t,n);return{x:s.x+o,y:s.y+i}}}),[])};function JR(e,t){const n=[],r=new Map,o=[];for(const i of e)if(i.type==="add"){o.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{const s=r.get(i.id);s?s.push(i):r.set(i.id,[i])}for(const i of t){const s=r.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}const a={...i};for(const l of s)Dq(l,a);n.push(a)}return o.length&&o.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function Dq(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 eP(e,t){return JR(e,t)}function tP(e,t){return JR(e,t)}function jr(e,t){return{id:e,type:"select",selected:t}}function Oo(e,t=new Set,n=!1){const r=[];for(const[o,i]of e){const s=t.has(o);!(i.selected===void 0&&!s)&&i.selected!==s&&(n&&(i.selected=s),r.push(jr(i.id,s)))}return r}function cb({items:e=[],lookup:t}){var o;const n=[],r=new Map(e.map(i=>[i.id,i]));for(const[i,s]of e.entries()){const a=t.get(s.id),l=((o=a==null?void 0:a.internals)==null?void 0:o.userNode)??a;l!==void 0&&l!==s&&n.push({id:s.id,item:s,type:"replace"}),l===void 0&&n.push({item:s,type:"add",index:i})}for(const[i]of t)r.get(i)===void 0&&n.push({id:i,type:"remove"});return n}function db(e){return{id:e.id,type:"remove"}}const fb=e=>G5(e),$q=e=>xR(e);function nP(e){return y.forwardRef(e)}const zq=typeof window<"u"?y.useLayoutEffect:y.useEffect;function hb(e){const[t,n]=y.useState(BigInt(0)),[r]=y.useState(()=>Fq(()=>n(o=>o+BigInt(1))));return zq(()=>{const o=r.get();o.length&&(e(o),r.reset())},[t]),r}function Fq(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const rP=y.createContext(null);function qq({children:e}){const t=Ce(),n=y.useCallback(a=>{const{nodes:l=[],setNodes:u,hasDefaultNodes:c,onNodesChange:d,nodeLookup:f,fitViewQueued:h,onNodesChangeMiddlewareMap:g}=t.getState();let m=l;for(const v of a)m=typeof v=="function"?v(m):v;let b=cb({items:m,lookup:f});for(const v of g.values())b=v(b);c&&u(m),b.length>0?d==null||d(b):h&&window.requestAnimationFrame(()=>{const{fitViewQueued:v,nodes:w,setNodes:x}=t.getState();v&&x(w)})},[]),r=hb(n),o=y.useCallback(a=>{const{edges:l=[],setEdges:u,hasDefaultEdges:c,onEdgesChange:d,edgeLookup:f}=t.getState();let h=l;for(const g of a)h=typeof g=="function"?g(h):g;c?u(h):d&&d(cb({items:h,lookup:f}))},[]),i=hb(o),s=y.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return p.jsx(rP.Provider,{value:s,children:e})}function Bq(){const e=y.useContext(rP);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const Hq=e=>!!e.panZoom;function o0(){const e=Lq(),t=Ce(),n=Bq(),r=pe(Hq),o=y.useMemo(()=>{const i=d=>t.getState().nodeLookup.get(d),s=d=>{n.nodeQueue.push(d)},a=d=>{n.edgeQueue.push(d)},l=d=>{var v,w;const{nodeLookup:f,nodeOrigin:h}=t.getState(),g=fb(d)?d:f.get(d.id),m=g.parentId?CR(g.position,g.measured,g.parentId,f,h):g.position,b={...g,position:m,width:((v=g.measured)==null?void 0:v.width)??g.width,height:((w=g.measured)==null?void 0:w.height)??g.height};return ii(b)},u=(d,f,h={replace:!1})=>{s(g=>g.map(m=>{if(m.id===d){const b=typeof f=="function"?f(m):f;return h.replace&&fb(b)?b:{...m,...b}}return m}))},c=(d,f,h={replace:!1})=>{a(g=>g.map(m=>{if(m.id===d){const b=typeof f=="function"?f(m):f;return h.replace&&$q(b)?b:{...m,...b}}return m}))};return{getNodes:()=>t.getState().nodes.map(d=>({...d})),getNode:d=>{var f;return(f=i(d))==null?void 0:f.internals.userNode},getInternalNode:i,getEdges:()=>{const{edges:d=[]}=t.getState();return d.map(f=>({...f}))},getEdge:d=>t.getState().edgeLookup.get(d),setNodes:s,setEdges:a,addNodes:d=>{const f=Array.isArray(d)?d:[d];n.nodeQueue.push(h=>[...h,...f])},addEdges:d=>{const f=Array.isArray(d)?d:[d];n.edgeQueue.push(h=>[...h,...f])},toObject:()=>{const{nodes:d=[],edges:f=[],transform:h}=t.getState(),[g,m,b]=h;return{nodes:d.map(v=>({...v})),edges:f.map(v=>({...v})),viewport:{x:g,y:m,zoom:b}}},deleteElements:async({nodes:d=[],edges:f=[]})=>{const{nodes:h,edges:g,onNodesDelete:m,onEdgesDelete:b,triggerNodeChanges:v,triggerEdgeChanges:w,onDelete:x,onBeforeDelete:_}=t.getState(),{nodes:C,edges:S}=await Z5({nodesToRemove:d,edgesToRemove:f,nodes:h,edges:g,onBeforeDelete:_}),E=S.length>0,k=C.length>0;if(E){const T=S.map(db);b==null||b(S),w(T)}if(k){const T=C.map(db);m==null||m(C),v(T)}return(k||E)&&(x==null||x({nodes:C,edges:S})),{deletedNodes:C,deletedEdges:S}},getIntersectingNodes:(d,f=!0,h)=>{const g=Bw(d),m=g?d:l(d),b=h!==void 0;return m?(h||t.getState().nodes).filter(v=>{const w=t.getState().nodeLookup.get(v.id);if(w&&!g&&(v.id===d.id||!w.internals.positionAbsolute))return!1;const x=ii(b?v:w),_=Os(x,m);return f&&_>0||_>=x.width*x.height||_>=m.width*m.height}):[]},isNodeIntersecting:(d,f,h=!0)=>{const m=Bw(d)?d:l(d);if(!m)return!1;const b=Os(m,f);return h&&b>0||b>=f.width*f.height||b>=m.width*m.height},updateNode:u,updateNodeData:(d,f,h={replace:!1})=>{u(d,g=>{const m=typeof f=="function"?f(g):f;return h.replace?{...g,data:m}:{...g,data:{...g.data,...m}}},h)},updateEdge:c,updateEdgeData:(d,f,h={replace:!1})=>{c(d,g=>{const m=typeof f=="function"?f(g):f;return h.replace?{...g,data:m}:{...g,data:{...g.data,...m}}},h)},getNodesBounds:d=>{const{nodeLookup:f,nodeOrigin:h}=t.getState();return Y5(d,{nodeLookup:f,nodeOrigin:h})},getHandleConnections:({type:d,id:f,nodeId:h})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${h}-${d}${f?`-${f}`:""}`))==null?void 0:g.values())??[])},getNodeConnections:({type:d,handleId:f,nodeId:h})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${h}${d?f?`-${d}-${f}`:`-${d}`:""}`))==null?void 0:g.values())??[])},fitView:async d=>{const f=t.getState().fitViewResolver??nF();return t.setState({fitViewQueued:!0,fitViewOptions:d,fitViewResolver:f}),n.nodeQueue.push(h=>[...h]),f.promise}}},[]);return y.useMemo(()=>({...o,...e,viewportInitialized:r}),[r])}const pb=e=>e.selected,Vq=typeof window<"u"?window:void 0;function Wq({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=Ce(),{deleteElements:r}=o0(),o=Ds(e,{actInsideInputWithModifier:!1}),i=Ds(t,{target:Vq});y.useEffect(()=>{if(o){const{edges:s,nodes:a}=n.getState();r({nodes:a.filter(pb),edges:s.filter(pb)}),n.setState({nodesSelectionActive:!1})}},[o]),y.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])}function Uq(e){const t=Ce();y.useEffect(()=>{const n=()=>{var o,i,s,a;if(!e.current||!(((i=(o=e.current).checkVisibility)==null?void 0:i.call(o))??!0))return!1;const r=Zy(e.current);(r.height===0||r.width===0)&&((a=(s=t.getState()).onError)==null||a.call(s,"004",dn.error004())),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);const r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r&&e.current&&r.unobserve(e.current)}}},[])}const $u={position:"absolute",width:"100%",height:"100%",top:0,left:0},Gq=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Yq({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panOnScrollSpeed:o=.5,panOnScrollMode:i=Hr.Free,zoomOnDoubleClick:s=!0,panOnDrag:a=!0,defaultViewport:l,translateExtent:u,minZoom:c,maxZoom:d,zoomActivationKeyCode:f,preventScrolling:h=!0,children:g,noWheelClassName:m,noPanClassName:b,onViewportChange:v,isControlledViewport:w,paneClickDistance:x,selectionOnDrag:_}){const C=Ce(),S=y.useRef(null),{userSelectionActive:E,lib:k,connectionInProgress:T}=pe(Gq,Ee),I=Ds(f),P=y.useRef();Uq(S);const j=y.useCallback($=>{v==null||v({x:$[0],y:$[1],zoom:$[2]}),w||C.setState({transform:$})},[v,w]);return y.useEffect(()=>{if(S.current){P.current=zF({domNode:S.current,minZoom:c,maxZoom:d,translateExtent:u,viewport:l,onDraggingChange:M=>C.setState({paneDragging:M}),onPanZoomStart:(M,O)=>{const{onViewportChangeStart:N,onMoveStart:A}=C.getState();A==null||A(M,O),N==null||N(O)},onPanZoom:(M,O)=>{const{onViewportChange:N,onMove:A}=C.getState();A==null||A(M,O),N==null||N(O)},onPanZoomEnd:(M,O)=>{const{onViewportChangeEnd:N,onMoveEnd:A}=C.getState();A==null||A(M,O),N==null||N(O)}});const{x:$,y:R,zoom:L}=P.current.getViewport();return C.setState({panZoom:P.current,transform:[$,R,L],domNode:S.current.closest(".react-flow")}),()=>{var M;(M=P.current)==null||M.destroy()}}},[]),y.useEffect(()=>{var $;($=P.current)==null||$.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panOnScrollSpeed:o,panOnScrollMode:i,zoomOnDoubleClick:s,panOnDrag:a,zoomActivationKeyPressed:I,preventScrolling:h,noPanClassName:b,userSelectionActive:E,noWheelClassName:m,lib:k,onTransformChange:j,connectionInProgress:T,selectionOnDrag:_,paneClickDistance:x})},[e,t,n,r,o,i,s,a,I,h,b,E,m,k,j,T,_,x]),p.jsx("div",{className:"react-flow__renderer",ref:S,style:$u,children:g})}const Kq=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Xq(){const{userSelectionActive:e,userSelectionRect:t}=pe(Kq,Ee);return e&&t?p.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 cd=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},Qq=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function Zq({isSelecting:e,selectionKeyPressed:t,selectionMode:n=Is.Full,panOnDrag:r,paneClickDistance:o,selectionOnDrag:i,onSelectionStart:s,onSelectionEnd:a,onPaneClick:l,onPaneContextMenu:u,onPaneScroll:c,onPaneMouseEnter:d,onPaneMouseMove:f,onPaneMouseLeave:h,children:g}){const m=Ce(),{userSelectionActive:b,elementsSelectable:v,dragging:w,connectionInProgress:x}=pe(Qq,Ee),_=v&&(e||b),C=y.useRef(null),S=y.useRef(),E=y.useRef(new Set),k=y.useRef(new Set),T=y.useRef(!1),I=N=>{if(T.current||x){T.current=!1;return}l==null||l(N),m.getState().resetSelectedElements(),m.setState({nodesSelectionActive:!1})},P=N=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){N.preventDefault();return}u==null||u(N)},j=c?N=>c(N):void 0,$=N=>{T.current&&(N.stopPropagation(),T.current=!1)},R=N=>{var K,X;const{domNode:A}=m.getState();if(S.current=A==null?void 0:A.getBoundingClientRect(),!S.current)return;const D=N.target===C.current;if(!D&&!!N.target.closest(".nokey")||!e||!(i&&D||t)||N.button!==0||!N.isPrimary)return;(X=(K=N.target)==null?void 0:K.setPointerCapture)==null||X.call(K,N.pointerId),T.current=!1;const{x:V,y:H}=zt(N.nativeEvent,S.current);m.setState({userSelectionRect:{width:0,height:0,startX:V,startY:H,x:V,y:H}}),D||(N.stopPropagation(),N.preventDefault())},L=N=>{const{userSelectionRect:A,transform:D,nodeLookup:z,edgeLookup:F,connectionLookup:V,triggerNodeChanges:H,triggerEdgeChanges:K,defaultEdgeOptions:X,resetSelectedElements:q}=m.getState();if(!S.current||!A)return;const{x:B,y:G}=zt(N.nativeEvent,S.current),{startX:Q,startY:Y}=A;if(!T.current){const le=t?0:o;if(Math.hypot(B-Q,G-Y)<=le)return;q(),s==null||s(N)}T.current=!0;const U={startX:Q,startY:Y,x:B<Q?B:Q,y:G<Y?G:Y,width:Math.abs(B-Q),height:Math.abs(G-Y)},Z=E.current,se=k.current;E.current=new Set(Xy(z,U,D,n===Is.Partial,!0).map(le=>le.id)),k.current=new Set;const oe=(X==null?void 0:X.selectable)??!0;for(const le of E.current){const ie=V.get(le);if(ie)for(const{edgeId:Be}of ie.values()){const Ae=F.get(Be);Ae&&(Ae.selectable??oe)&&k.current.add(Be)}}if(!Hw(Z,E.current)){const le=Oo(z,E.current,!0);H(le)}if(!Hw(se,k.current)){const le=Oo(F,k.current);K(le)}m.setState({userSelectionRect:U,userSelectionActive:!0,nodesSelectionActive:!1})},M=N=>{var A,D;N.button===0&&((D=(A=N.target)==null?void 0:A.releasePointerCapture)==null||D.call(A,N.pointerId),!b&&N.target===C.current&&m.getState().userSelectionRect&&(I==null||I(N)),m.setState({userSelectionActive:!1,userSelectionRect:null}),T.current&&(a==null||a(N),m.setState({nodesSelectionActive:E.current.size>0})))},O=r===!0||Array.isArray(r)&&r.includes(0);return p.jsxs("div",{className:Oe(["react-flow__pane",{draggable:O,dragging:w,selection:e}]),onClick:_?void 0:cd(I,C),onContextMenu:cd(P,C),onWheel:cd(j,C),onPointerEnter:_?void 0:d,onPointerMove:_?L:f,onPointerUp:_?M:void 0,onPointerDownCapture:_?R:void 0,onClickCapture:_?$:void 0,onPointerLeave:h,ref:C,style:$u,children:[g,p.jsx(Xq,{})]})}function Cv({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:a,onError:l}=t.getState(),u=a.get(e);if(!u){l==null||l("012",dn.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&s)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var c;return(c=r==null?void 0:r.current)==null?void 0:c.blur()})):o([e])}function oP({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,nodeClickDistance:s}){const a=Ce(),[l,u]=y.useState(!1),c=y.useRef();return y.useEffect(()=>{c.current=CF({getStoreItems:()=>a.getState(),onNodeMouseDown:d=>{Cv({id:d,store:a,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),y.useEffect(()=>{var d,f;if(t)(d=c.current)==null||d.destroy();else if(e.current)return(f=c.current)==null||f.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:o,nodeClickDistance:s}),()=>{var h;(h=c.current)==null||h.destroy()}},[n,r,t,i,e,o]),l}const Jq=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function iP(){const e=Ce();return y.useCallback(n=>{const{nodeExtent:r,snapToGrid:o,snapGrid:i,nodesDraggable:s,onError:a,updateNodePositions:l,nodeLookup:u,nodeOrigin:c}=e.getState(),d=new Map,f=Jq(s),h=o?i[0]:5,g=o?i[1]:5,m=n.direction.x*h*n.factor,b=n.direction.y*g*n.factor;for(const[,v]of u){if(!f(v))continue;let w={x:v.internals.positionAbsolute.x+m,y:v.internals.positionAbsolute.y+b};o&&(w=Zs(w,i));const{position:x,positionAbsolute:_}=wR({nodeId:v.id,nextPosition:w,nodeLookup:u,nodeExtent:r,nodeOrigin:c,onError:a});v.position=x,v.internals.positionAbsolute=_,d.set(v.id,v)}l(d)},[])}const i0=y.createContext(null),e8=i0.Provider;i0.Consumer;const sP=()=>y.useContext(i0),t8=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),n8=(e,t,n)=>r=>{const{connectionClickStartHandle:o,connectionMode:i,connection:s}=r,{fromHandle:a,toHandle:l,isValid:u}=s,c=(l==null?void 0:l.nodeId)===e&&(l==null?void 0:l.id)===t&&(l==null?void 0:l.type)===n;return{connectingFrom:(a==null?void 0:a.nodeId)===e&&(a==null?void 0:a.id)===t&&(a==null?void 0:a.type)===n,connectingTo:c,clickConnecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.id)===t&&(o==null?void 0:o.type)===n,isPossibleEndHandle:i===ri.Strict?(a==null?void 0:a.type)!==n:e!==(a==null?void 0:a.nodeId)||t!==(a==null?void 0:a.id),connectionInProcess:!!a,clickConnectionInProcess:!!o,valid:c&&u}};function r8({type:e="source",position:t=re.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:s,onConnect:a,children:l,className:u,onMouseDown:c,onTouchStart:d,...f},h){var L,M;const g=s||null,m=e==="target",b=Ce(),v=sP(),{connectOnClick:w,noPanClassName:x,rfId:_}=pe(t8,Ee),{connectingFrom:C,connectingTo:S,clickConnecting:E,isPossibleEndHandle:k,connectionInProcess:T,clickConnectionInProcess:I,valid:P}=pe(n8(v,g,e),Ee);v||(M=(L=b.getState()).onError)==null||M.call(L,"010",dn.error010());const j=O=>{const{defaultEdgeOptions:N,onConnect:A,hasDefaultEdges:D}=b.getState(),z={...N,...O};if(D){const{edges:F,setEdges:V}=b.getState();V(uF(z,F))}A==null||A(z),a==null||a(z)},$=O=>{if(!v)return;const N=RR(O.nativeEvent);if(o&&(N&&O.button===0||!N)){const A=b.getState();Ev.onPointerDown(O.nativeEvent,{handleDomNode:O.currentTarget,autoPanOnConnect:A.autoPanOnConnect,connectionMode:A.connectionMode,connectionRadius:A.connectionRadius,domNode:A.domNode,nodeLookup:A.nodeLookup,lib:A.lib,isTarget:m,handleId:g,nodeId:v,flowId:A.rfId,panBy:A.panBy,cancelConnection:A.cancelConnection,onConnectStart:A.onConnectStart,onConnectEnd:A.onConnectEnd,updateConnection:A.updateConnection,onConnect:j,isValidConnection:n||A.isValidConnection,getTransform:()=>b.getState().transform,getFromHandle:()=>b.getState().connection.fromHandle,autoPanSpeed:A.autoPanSpeed,dragThreshold:A.connectionDragThreshold})}N?c==null||c(O):d==null||d(O)},R=O=>{const{onClickConnectStart:N,onClickConnectEnd:A,connectionClickStartHandle:D,connectionMode:z,isValidConnection:F,lib:V,rfId:H,nodeLookup:K,connection:X}=b.getState();if(!v||!D&&!o)return;if(!D){N==null||N(O.nativeEvent,{nodeId:v,handleId:g,handleType:e}),b.setState({connectionClickStartHandle:{nodeId:v,type:e,id:g}});return}const q=NR(O.target),B=n||F,{connection:G,isValid:Q}=Ev.isValid(O.nativeEvent,{handle:{nodeId:v,id:g,type:e},connectionMode:z,fromNodeId:D.nodeId,fromHandleId:D.id||null,fromType:D.type,isValidConnection:B,flowId:H,doc:q,lib:V,nodeLookup:K});Q&&G&&j(G);const Y=structuredClone(X);delete Y.inProgress,Y.toPosition=Y.toHandle?Y.toHandle.position:null,A==null||A(O,Y),b.setState({connectionClickStartHandle:null})};return p.jsx("div",{"data-handleid":g,"data-nodeid":v,"data-handlepos":t,"data-id":`${_}-${v}-${g}-${e}`,className:Oe(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",x,u,{source:!m,target:m,connectable:r,connectablestart:o,connectableend:i,clickconnecting:E,connectingfrom:C,connectingto:S,valid:P,connectionindicator:r&&(!T||k)&&(T||I?i:o)}]),onMouseDown:$,onTouchStart:$,onClick:w?R:void 0,ref:h,...f,children:l})}const ui=y.memo(nP(r8));function o8({data:e,isConnectable:t,sourcePosition:n=re.Bottom}){return p.jsxs(p.Fragment,{children:[e==null?void 0:e.label,p.jsx(ui,{type:"source",position:n,isConnectable:t})]})}function i8({data:e,isConnectable:t,targetPosition:n=re.Top,sourcePosition:r=re.Bottom}){return p.jsxs(p.Fragment,{children:[p.jsx(ui,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,p.jsx(ui,{type:"source",position:r,isConnectable:t})]})}function s8(){return null}function a8({data:e,isConnectable:t,targetPosition:n=re.Top}){return p.jsxs(p.Fragment,{children:[p.jsx(ui,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const Kl={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},mb={input:o8,default:i8,output:a8,group:s8};function l8(e){var t,n,r,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??((r=e.style)==null?void 0:r.width),height:e.height??((o=e.style)==null?void 0:o.height)}}const u8=e=>{const{width:t,height:n,x:r,y:o}=Qs(e.nodeLookup,{filter:i=>!!i.selected});return{width:$t(t)?t:null,height:$t(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${o}px)`}};function c8({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=Ce(),{width:o,height:i,transformString:s,userSelectionActive:a}=pe(u8,Ee),l=iP(),u=y.useRef(null);if(y.useEffect(()=>{var f;n||(f=u.current)==null||f.focus({preventScroll:!0})},[n]),oP({nodeRef:u}),a||!o||!i)return null;const c=e?f=>{const h=r.getState().nodes.filter(g=>g.selected);e(f,h)}:void 0,d=f=>{Object.prototype.hasOwnProperty.call(Kl,f.key)&&(f.preventDefault(),l({direction:Kl[f.key],factor:f.shiftKey?4:1}))};return p.jsx("div",{className:Oe(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:p.jsx("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:c,tabIndex:n?void 0:-1,onKeyDown:n?void 0:d,style:{width:o,height:i}})})}const gb=typeof window<"u"?window:void 0,d8=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function aP({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:a,deleteKeyCode:l,selectionKeyCode:u,selectionOnDrag:c,selectionMode:d,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:g,panActivationKeyCode:m,zoomActivationKeyCode:b,elementsSelectable:v,zoomOnScroll:w,zoomOnPinch:x,panOnScroll:_,panOnScrollSpeed:C,panOnScrollMode:S,zoomOnDoubleClick:E,panOnDrag:k,defaultViewport:T,translateExtent:I,minZoom:P,maxZoom:j,preventScrolling:$,onSelectionContextMenu:R,noWheelClassName:L,noPanClassName:M,disableKeyboardA11y:O,onViewportChange:N,isControlledViewport:A}){const{nodesSelectionActive:D,userSelectionActive:z}=pe(d8,Ee),F=Ds(u,{target:gb}),V=Ds(m,{target:gb}),H=V||k,K=V||_,X=c&&H!==!0,q=F||z||X;return Wq({deleteKeyCode:l,multiSelectionKeyCode:g}),p.jsx(Yq,{onPaneContextMenu:i,elementsSelectable:v,zoomOnScroll:w,zoomOnPinch:x,panOnScroll:K,panOnScrollSpeed:C,panOnScrollMode:S,zoomOnDoubleClick:E,panOnDrag:!F&&H,defaultViewport:T,translateExtent:I,minZoom:P,maxZoom:j,zoomActivationKeyCode:b,preventScrolling:$,noWheelClassName:L,noPanClassName:M,onViewportChange:N,isControlledViewport:A,paneClickDistance:a,selectionOnDrag:X,children:p.jsxs(Zq,{onSelectionStart:f,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:H,isSelecting:!!q,selectionMode:d,selectionKeyPressed:F,paneClickDistance:a,selectionOnDrag:X,children:[e,D&&p.jsx(c8,{onSelectionContextMenu:R,noPanClassName:M,disableKeyboardA11y:O})]})})}aP.displayName="FlowRenderer";const f8=y.memo(aP),h8=e=>t=>e?Xy(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 p8(e){return pe(y.useCallback(h8(e),[e]),Ee)}const m8=e=>e.updateNodeInternals;function g8(){const e=pe(m8),[t]=y.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const r=new Map;n.forEach(o=>{const i=o.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:o.target,force:!0})}),e(r)}));return y.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function v8({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){const o=Ce(),i=y.useRef(null),s=y.useRef(null),a=y.useRef(e.sourcePosition),l=y.useRef(e.targetPosition),u=y.useRef(t),c=n&&!!e.internals.handleBounds;return y.useEffect(()=>{i.current&&!e.hidden&&(!c||s.current!==i.current)&&(s.current&&(r==null||r.unobserve(s.current)),r==null||r.observe(i.current),s.current=i.current)},[c,e.hidden]),y.useEffect(()=>()=>{s.current&&(r==null||r.unobserve(s.current),s.current=null)},[]),y.useEffect(()=>{if(i.current){const d=u.current!==t,f=a.current!==e.sourcePosition,h=l.current!==e.targetPosition;(d||f||h)&&(u.current=t,a.current=e.sourcePosition,l.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function y8({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onContextMenu:i,onDoubleClick:s,nodesDraggable:a,elementsSelectable:l,nodesConnectable:u,nodesFocusable:c,resizeObserver:d,noDragClassName:f,noPanClassName:h,disableKeyboardA11y:g,rfId:m,nodeTypes:b,nodeClickDistance:v,onError:w}){const{node:x,internals:_,isParent:C}=pe(B=>{const G=B.nodeLookup.get(e),Q=B.parentLookup.has(e);return{node:G,internals:G.internals,isParent:Q}},Ee);let S=x.type||"default",E=(b==null?void 0:b[S])||mb[S];E===void 0&&(w==null||w("003",dn.error003(S)),S="default",E=(b==null?void 0:b.default)||mb.default);const k=!!(x.draggable||a&&typeof x.draggable>"u"),T=!!(x.selectable||l&&typeof x.selectable>"u"),I=!!(x.connectable||u&&typeof x.connectable>"u"),P=!!(x.focusable||c&&typeof x.focusable>"u"),j=Ce(),$=ER(x),R=v8({node:x,nodeType:S,hasDimensions:$,resizeObserver:d}),L=oP({nodeRef:R,disabled:x.hidden||!k,noDragClassName:f,handleSelector:x.dragHandle,nodeId:e,isSelectable:T,nodeClickDistance:v}),M=iP();if(x.hidden)return null;const O=Bn(x),N=l8(x),A=T||k||t||n||r||o,D=n?B=>n(B,{..._.userNode}):void 0,z=r?B=>r(B,{..._.userNode}):void 0,F=o?B=>o(B,{..._.userNode}):void 0,V=i?B=>i(B,{..._.userNode}):void 0,H=s?B=>s(B,{..._.userNode}):void 0,K=B=>{const{selectNodesOnDrag:G,nodeDragThreshold:Q}=j.getState();T&&(!G||!k||Q>0)&&Cv({id:e,store:j,nodeRef:R}),t&&t(B,{..._.userNode})},X=B=>{if(!(kR(B.nativeEvent)||g)){if(mR.includes(B.key)&&T){const G=B.key==="Escape";Cv({id:e,store:j,unselect:G,nodeRef:R})}else if(k&&x.selected&&Object.prototype.hasOwnProperty.call(Kl,B.key)){B.preventDefault();const{ariaLabelConfig:G}=j.getState();j.setState({ariaLiveMessage:G["node.a11yDescription.ariaLiveMessage"]({direction:B.key.replace("Arrow","").toLowerCase(),x:~~_.positionAbsolute.x,y:~~_.positionAbsolute.y})}),M({direction:Kl[B.key],factor:B.shiftKey?4:1})}}},q=()=>{var se;if(g||!((se=R.current)!=null&&se.matches(":focus-visible")))return;const{transform:B,width:G,height:Q,autoPanOnNodeFocus:Y,setCenter:U}=j.getState();if(!Y)return;Xy(new Map([[e,x]]),{x:0,y:0,width:G,height:Q},B,!0).length>0||U(x.position.x+O.width/2,x.position.y+O.height/2,{zoom:B[2]})};return p.jsx("div",{className:Oe(["react-flow__node",`react-flow__node-${S}`,{[h]:k},x.className,{selected:x.selected,selectable:T,parent:C,draggable:k,dragging:L}]),ref:R,style:{zIndex:_.z,transform:`translate(${_.positionAbsolute.x}px,${_.positionAbsolute.y}px)`,pointerEvents:A?"all":"none",visibility:$?"visible":"hidden",...x.style,...N},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:D,onMouseMove:z,onMouseLeave:F,onContextMenu:V,onClick:K,onDoubleClick:H,onKeyDown:P?X:void 0,tabIndex:P?0:void 0,onFocus:P?q:void 0,role:x.ariaRole??(P?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${XR}-${m}`,"aria-label":x.ariaLabel,...x.domAttributes,children:p.jsx(e8,{value:e,children:p.jsx(E,{id:e,data:x.data,type:S,positionAbsoluteX:_.positionAbsolute.x,positionAbsoluteY:_.positionAbsolute.y,selected:x.selected??!1,selectable:T,draggable:k,deletable:x.deletable??!0,isConnectable:I,sourcePosition:x.sourcePosition,targetPosition:x.targetPosition,dragging:L,dragHandle:x.dragHandle,zIndex:_.z,parentId:x.parentId,...O})})})}var x8=y.memo(y8);const w8=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function lP(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,onError:i}=pe(w8,Ee),s=p8(e.onlyRenderVisibleElements),a=g8();return p.jsx("div",{className:"react-flow__nodes",style:$u,children:s.map(l=>p.jsx(x8,{id:l,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:a,nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,nodeClickDistance:e.nodeClickDistance,onError:i},l))})}lP.displayName="NodeRenderer";const b8=y.memo(lP);function _8(e){return pe(y.useCallback(n=>{if(!e)return n.edges.map(o=>o.id);const r=[];if(n.width&&n.height)for(const o of n.edges){const i=n.nodeLookup.get(o.source),s=n.nodeLookup.get(o.target);i&&s&&sF({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(o.id)}return r},[e]),Ee)}const S8=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return p.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},E8=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return p.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},vb={[js.Arrow]:S8,[js.ArrowClosed]:E8};function C8(e){const t=Ce();return y.useMemo(()=>{var o,i;return Object.prototype.hasOwnProperty.call(vb,e)?vb[e]:((i=(o=t.getState()).onError)==null||i.call(o,"009",dn.error009(e)),null)},[e])}const N8=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:a="auto-start-reverse"})=>{const l=C8(t);return l?p.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:a,refX:"0",refY:"0",children:p.jsx(l,{color:n,strokeWidth:s})}):null},uP=({defaultColor:e,rfId:t})=>{const n=pe(i=>i.edges),r=pe(i=>i.defaultEdgeOptions),o=y.useMemo(()=>pF(n,{id:t,defaultColor:e,defaultMarkerStart:r==null?void 0:r.markerStart,defaultMarkerEnd:r==null?void 0:r.markerEnd}),[n,r,t,e]);return o.length?p.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:p.jsx("defs",{children:o.map(i=>p.jsx(N8,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};uP.displayName="MarkerDefinitions";var k8=y.memo(uP);function cP({x:e,y:t,label:n,labelStyle:r,labelShowBg:o=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:a=2,children:l,className:u,...c}){const[d,f]=y.useState({x:1,y:0,width:0,height:0}),h=Oe(["react-flow__edge-textwrapper",u]),g=y.useRef(null);return y.useEffect(()=>{if(g.current){const m=g.current.getBBox();f({x:m.x,y:m.y,width:m.width,height:m.height})}},[n]),n?p.jsxs("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:h,visibility:d.width?"visible":"hidden",...c,children:[o&&p.jsx("rect",{width:d.width+2*s[0],x:-s[0],y:-s[1],height:d.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:a,ry:a}),p.jsx("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:g,style:r,children:n}),l]}):null}cP.displayName="EdgeText";const R8=y.memo(cP);function zu({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:l,interactionWidth:u=20,...c}){return p.jsxs(p.Fragment,{children:[p.jsx("path",{...c,d:e,fill:"none",className:Oe(["react-flow__edge-path",c.className])}),u?p.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&$t(t)&&$t(n)?p.jsx(R8,{x:t,y:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:a,labelBgBorderRadius:l}):null]})}function yb({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===re.Left||e===re.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function dP({sourceX:e,sourceY:t,sourcePosition:n=re.Bottom,targetX:r,targetY:o,targetPosition:i=re.Top}){const[s,a]=yb({pos:n,x1:e,y1:t,x2:r,y2:o}),[l,u]=yb({pos:i,x1:r,y1:o,x2:e,y2:t}),[c,d,f,h]=PR({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:a,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${a} ${l},${u} ${r},${o}`,c,d,f,h]}function fP(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s,targetPosition:a,label:l,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:b,interactionWidth:v})=>{const[w,x,_]=dP({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:a}),C=e.isInternal?void 0:t;return p.jsx(zu,{id:C,path:w,labelX:x,labelY:_,label:l,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:b,interactionWidth:v})})}const P8=fP({isInternal:!1}),hP=fP({isInternal:!0});P8.displayName="SimpleBezierEdge";hP.displayName="SimpleBezierEdgeInternal";function pP(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,sourcePosition:h=re.Bottom,targetPosition:g=re.Top,markerEnd:m,markerStart:b,pathOptions:v,interactionWidth:w})=>{const[x,_,C]=bv({sourceX:n,sourceY:r,sourcePosition:h,targetX:o,targetY:i,targetPosition:g,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset,stepPosition:v==null?void 0:v.stepPosition}),S=e.isInternal?void 0:t;return p.jsx(zu,{id:S,path:x,labelX:_,labelY:C,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:m,markerStart:b,interactionWidth:w})})}const mP=pP({isInternal:!1}),gP=pP({isInternal:!0});mP.displayName="SmoothStepEdge";gP.displayName="SmoothStepEdgeInternal";function vP(e){return y.memo(({id:t,...n})=>{var o;const r=e.isInternal?void 0:t;return p.jsx(mP,{...n,id:r,pathOptions:y.useMemo(()=>{var i;return{borderRadius:0,offset:(i=n.pathOptions)==null?void 0:i.offset}},[(o=n.pathOptions)==null?void 0:o.offset])})})}const T8=vP({isInternal:!1}),yP=vP({isInternal:!0});T8.displayName="StepEdge";yP.displayName="StepEdgeInternal";function xP(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:g,interactionWidth:m})=>{const[b,v,w]=MR({sourceX:n,sourceY:r,targetX:o,targetY:i}),x=e.isInternal?void 0:t;return p.jsx(zu,{id:x,path:b,labelX:v,labelY:w,label:s,labelStyle:a,labelShowBg:l,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:d,style:f,markerEnd:h,markerStart:g,interactionWidth:m})})}const A8=xP({isInternal:!1}),wP=xP({isInternal:!0});A8.displayName="StraightEdge";wP.displayName="StraightEdgeInternal";function bP(e){return y.memo(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s=re.Bottom,targetPosition:a=re.Top,label:l,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:b,pathOptions:v,interactionWidth:w})=>{const[x,_,C]=TR({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:a,curvature:v==null?void 0:v.curvature}),S=e.isInternal?void 0:t;return p.jsx(zu,{id:S,path:x,labelX:_,labelY:C,label:l,labelStyle:u,labelShowBg:c,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,style:g,markerEnd:m,markerStart:b,interactionWidth:w})})}const M8=bP({isInternal:!1}),_P=bP({isInternal:!0});M8.displayName="BezierEdge";_P.displayName="BezierEdgeInternal";const xb={default:_P,straight:wP,step:yP,smoothstep:gP,simplebezier:hP},wb={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},I8=(e,t,n)=>n===re.Left?e-t:n===re.Right?e+t:e,j8=(e,t,n)=>n===re.Top?e-t:n===re.Bottom?e+t:e,bb="react-flow__edgeupdater";function _b({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:s,type:a}){return p.jsx("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:s,className:Oe([bb,`${bb}-${a}`]),cx:I8(t,r,e),cy:j8(n,r,e),r,stroke:"transparent",fill:"transparent"})}function O8({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:a,targetPosition:l,onReconnect:u,onReconnectStart:c,onReconnectEnd:d,setReconnecting:f,setUpdateHover:h}){const g=Ce(),m=(_,C)=>{if(_.button!==0)return;const{autoPanOnConnect:S,domNode:E,isValidConnection:k,connectionMode:T,connectionRadius:I,lib:P,onConnectStart:j,onConnectEnd:$,cancelConnection:R,nodeLookup:L,rfId:M,panBy:O,updateConnection:N}=g.getState(),A=C.type==="target",D=(V,H)=>{f(!1),d==null||d(V,n,C.type,H)},z=V=>u==null?void 0:u(n,V),F=(V,H)=>{f(!0),c==null||c(_,n,C.type),j==null||j(V,H)};Ev.onPointerDown(_.nativeEvent,{autoPanOnConnect:S,connectionMode:T,connectionRadius:I,domNode:E,handleId:C.id,nodeId:C.nodeId,nodeLookup:L,isTarget:A,edgeUpdaterType:C.type,lib:P,flowId:M,cancelConnection:R,panBy:O,isValidConnection:k,onConnect:z,onConnectStart:F,onConnectEnd:$,onReconnectEnd:D,updateConnection:N,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold,handleDomNode:_.currentTarget})},b=_=>m(_,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),v=_=>m(_,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),w=()=>h(!0),x=()=>h(!1);return p.jsxs(p.Fragment,{children:[(e===!0||e==="source")&&p.jsx(_b,{position:a,centerX:r,centerY:o,radius:t,onMouseDown:b,onMouseEnter:w,onMouseOut:x,type:"source"}),(e===!0||e==="target")&&p.jsx(_b,{position:l,centerX:i,centerY:s,radius:t,onMouseDown:v,onMouseEnter:w,onMouseOut:x,type:"target"})]})}function L8({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:o,onDoubleClick:i,onContextMenu:s,onMouseEnter:a,onMouseMove:l,onMouseLeave:u,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,rfId:g,edgeTypes:m,noPanClassName:b,onError:v,disableKeyboardA11y:w}){let x=pe(U=>U.edgeLookup.get(e));const _=pe(U=>U.defaultEdgeOptions);x=_?{..._,...x}:x;let C=x.type||"default",S=(m==null?void 0:m[C])||xb[C];S===void 0&&(v==null||v("011",dn.error011(C)),C="default",S=(m==null?void 0:m.default)||xb.default);const E=!!(x.focusable||t&&typeof x.focusable>"u"),k=typeof d<"u"&&(x.reconnectable||n&&typeof x.reconnectable>"u"),T=!!(x.selectable||r&&typeof x.selectable>"u"),I=y.useRef(null),[P,j]=y.useState(!1),[$,R]=y.useState(!1),L=Ce(),{zIndex:M,sourceX:O,sourceY:N,targetX:A,targetY:D,sourcePosition:z,targetPosition:F}=pe(y.useCallback(U=>{const Z=U.nodeLookup.get(x.source),se=U.nodeLookup.get(x.target);if(!Z||!se)return{zIndex:x.zIndex,...wb};const oe=hF({id:e,sourceNode:Z,targetNode:se,sourceHandle:x.sourceHandle||null,targetHandle:x.targetHandle||null,connectionMode:U.connectionMode,onError:v});return{zIndex:iF({selected:x.selected,zIndex:x.zIndex,sourceNode:Z,targetNode:se,elevateOnSelect:U.elevateEdgesOnSelect,zIndexMode:U.zIndexMode}),...oe||wb}},[x.source,x.target,x.sourceHandle,x.targetHandle,x.selected,x.zIndex]),Ee),V=y.useMemo(()=>x.markerStart?`url('#${_v(x.markerStart,g)}')`:void 0,[x.markerStart,g]),H=y.useMemo(()=>x.markerEnd?`url('#${_v(x.markerEnd,g)}')`:void 0,[x.markerEnd,g]);if(x.hidden||O===null||N===null||A===null||D===null)return null;const K=U=>{var le;const{addSelectedEdges:Z,unselectNodesAndEdges:se,multiSelectionActive:oe}=L.getState();T&&(L.setState({nodesSelectionActive:!1}),x.selected&&oe?(se({nodes:[],edges:[x]}),(le=I.current)==null||le.blur()):Z([e])),o&&o(U,x)},X=i?U=>{i(U,{...x})}:void 0,q=s?U=>{s(U,{...x})}:void 0,B=a?U=>{a(U,{...x})}:void 0,G=l?U=>{l(U,{...x})}:void 0,Q=u?U=>{u(U,{...x})}:void 0,Y=U=>{var Z;if(!w&&mR.includes(U.key)&&T){const{unselectNodesAndEdges:se,addSelectedEdges:oe}=L.getState();U.key==="Escape"?((Z=I.current)==null||Z.blur(),se({edges:[x]})):oe([e])}};return p.jsx("svg",{style:{zIndex:M},children:p.jsxs("g",{className:Oe(["react-flow__edge",`react-flow__edge-${C}`,x.className,b,{selected:x.selected,animated:x.animated,inactive:!T&&!o,updating:P,selectable:T}]),onClick:K,onDoubleClick:X,onContextMenu:q,onMouseEnter:B,onMouseMove:G,onMouseLeave:Q,onKeyDown:E?Y:void 0,tabIndex:E?0:void 0,role:x.ariaRole??(E?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":x.ariaLabel===null?void 0:x.ariaLabel||`Edge from ${x.source} to ${x.target}`,"aria-describedby":E?`${QR}-${g}`:void 0,ref:I,...x.domAttributes,children:[!$&&p.jsx(S,{id:e,source:x.source,target:x.target,type:x.type,selected:x.selected,animated:x.animated,selectable:T,deletable:x.deletable??!0,label:x.label,labelStyle:x.labelStyle,labelShowBg:x.labelShowBg,labelBgStyle:x.labelBgStyle,labelBgPadding:x.labelBgPadding,labelBgBorderRadius:x.labelBgBorderRadius,sourceX:O,sourceY:N,targetX:A,targetY:D,sourcePosition:z,targetPosition:F,data:x.data,style:x.style,sourceHandleId:x.sourceHandle,targetHandleId:x.targetHandle,markerStart:V,markerEnd:H,pathOptions:"pathOptions"in x?x.pathOptions:void 0,interactionWidth:x.interactionWidth}),k&&p.jsx(O8,{edge:x,isReconnectable:k,reconnectRadius:c,onReconnect:d,onReconnectStart:f,onReconnectEnd:h,sourceX:O,sourceY:N,targetX:A,targetY:D,sourcePosition:z,targetPosition:F,setUpdateHover:j,setReconnecting:R})]})})}var D8=y.memo(L8);const $8=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function SP({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:o,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:a,onEdgeMouseMove:l,onEdgeMouseLeave:u,onEdgeClick:c,reconnectRadius:d,onEdgeDoubleClick:f,onReconnectStart:h,onReconnectEnd:g,disableKeyboardA11y:m}){const{edgesFocusable:b,edgesReconnectable:v,elementsSelectable:w,onError:x}=pe($8,Ee),_=_8(t);return p.jsxs("div",{className:"react-flow__edges",children:[p.jsx(k8,{defaultColor:e,rfId:n}),_.map(C=>p.jsx(D8,{id:C,edgesFocusable:b,edgesReconnectable:v,elementsSelectable:w,noPanClassName:o,onReconnect:i,onContextMenu:s,onMouseEnter:a,onMouseMove:l,onMouseLeave:u,onClick:c,reconnectRadius:d,onDoubleClick:f,onReconnectStart:h,onReconnectEnd:g,rfId:n,onError:x,edgeTypes:r,disableKeyboardA11y:m},C))]})}SP.displayName="EdgeRenderer";const z8=y.memo(SP),F8=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function q8({children:e}){const t=pe(F8);return p.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function B8(e){const t=o0(),n=y.useRef(!1);y.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const H8=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function V8(e){const t=pe(H8),n=Ce();return y.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function W8(e){return e.connection.inProgress?{...e.connection,to:Js(e.connection.to,e.transform)}:{...e.connection}}function U8(e){return W8}function G8(e){const t=U8();return pe(t,Ee)}const Y8=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function K8({containerStyle:e,style:t,type:n,component:r}){const{nodesConnectable:o,width:i,height:s,isValid:a,inProgress:l}=pe(Y8,Ee);return!(i&&o&&l)?null:p.jsx("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:p.jsx("g",{className:Oe(["react-flow__connection",yR(a)]),children:p.jsx(EP,{style:t,type:n,CustomComponent:r,isValid:a})})})}const EP=({style:e,type:t=or.Bezier,CustomComponent:n,isValid:r})=>{const{inProgress:o,from:i,fromNode:s,fromHandle:a,fromPosition:l,to:u,toNode:c,toHandle:d,toPosition:f,pointer:h}=G8();if(!o)return;if(n)return p.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:a,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:l,toPosition:f,connectionStatus:yR(r),toNode:c,toHandle:d,pointer:h});let g="";const m={sourceX:i.x,sourceY:i.y,sourcePosition:l,targetX:u.x,targetY:u.y,targetPosition:f};switch(t){case or.Bezier:[g]=TR(m);break;case or.SimpleBezier:[g]=dP(m);break;case or.Step:[g]=bv({...m,borderRadius:0});break;case or.SmoothStep:[g]=bv(m);break;default:[g]=MR(m)}return p.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};EP.displayName="ConnectionLine";const X8={};function Sb(e=X8){y.useRef(e),Ce(),y.useEffect(()=>{},[e])}function Q8(){Ce(),y.useRef(!1),y.useEffect(()=>{},[])}function CP({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:c,onSelectionContextMenu:d,onSelectionStart:f,onSelectionEnd:h,connectionLineType:g,connectionLineStyle:m,connectionLineComponent:b,connectionLineContainerStyle:v,selectionKeyCode:w,selectionOnDrag:x,selectionMode:_,multiSelectionKeyCode:C,panActivationKeyCode:S,zoomActivationKeyCode:E,deleteKeyCode:k,onlyRenderVisibleElements:T,elementsSelectable:I,defaultViewport:P,translateExtent:j,minZoom:$,maxZoom:R,preventScrolling:L,defaultMarkerColor:M,zoomOnScroll:O,zoomOnPinch:N,panOnScroll:A,panOnScrollSpeed:D,panOnScrollMode:z,zoomOnDoubleClick:F,panOnDrag:V,onPaneClick:H,onPaneMouseEnter:K,onPaneMouseMove:X,onPaneMouseLeave:q,onPaneScroll:B,onPaneContextMenu:G,paneClickDistance:Q,nodeClickDistance:Y,onEdgeContextMenu:U,onEdgeMouseEnter:Z,onEdgeMouseMove:se,onEdgeMouseLeave:oe,reconnectRadius:le,onReconnect:ie,onReconnectStart:Be,onReconnectEnd:Ae,noDragClassName:vn,noWheelClassName:Xt,noPanClassName:tt,disableKeyboardA11y:Ie,nodeExtent:Wn,rfId:yn,viewport:Un,onViewportChange:Gn}){return Sb(e),Sb(t),Q8(),B8(n),V8(Un),p.jsx(f8,{onPaneClick:H,onPaneMouseEnter:K,onPaneMouseMove:X,onPaneMouseLeave:q,onPaneContextMenu:G,onPaneScroll:B,paneClickDistance:Q,deleteKeyCode:k,selectionKeyCode:w,selectionOnDrag:x,selectionMode:_,onSelectionStart:f,onSelectionEnd:h,multiSelectionKeyCode:C,panActivationKeyCode:S,zoomActivationKeyCode:E,elementsSelectable:I,zoomOnScroll:O,zoomOnPinch:N,zoomOnDoubleClick:F,panOnScroll:A,panOnScrollSpeed:D,panOnScrollMode:z,panOnDrag:V,defaultViewport:P,translateExtent:j,minZoom:$,maxZoom:R,onSelectionContextMenu:d,preventScrolling:L,noDragClassName:vn,noWheelClassName:Xt,noPanClassName:tt,disableKeyboardA11y:Ie,onViewportChange:Gn,isControlledViewport:!!Un,children:p.jsxs(q8,{children:[p.jsx(z8,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:s,onReconnect:ie,onReconnectStart:Be,onReconnectEnd:Ae,onlyRenderVisibleElements:T,onEdgeContextMenu:U,onEdgeMouseEnter:Z,onEdgeMouseMove:se,onEdgeMouseLeave:oe,reconnectRadius:le,defaultMarkerColor:M,noPanClassName:tt,disableKeyboardA11y:Ie,rfId:yn}),p.jsx(K8,{style:m,type:g,component:b,containerStyle:v}),p.jsx("div",{className:"react-flow__edgelabel-renderer"}),p.jsx(b8,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:a,onNodeMouseMove:l,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:Y,onlyRenderVisibleElements:T,noPanClassName:tt,noDragClassName:vn,disableKeyboardA11y:Ie,nodeExtent:Wn,rfId:yn}),p.jsx("div",{className:"react-flow__viewport-portal"})]})})}CP.displayName="GraphView";const Z8=y.memo(CP),Eb=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:a,minZoom:l=.5,maxZoom:u=2,nodeOrigin:c,nodeExtent:d,zIndexMode:f="basic"}={})=>{const h=new Map,g=new Map,m=new Map,b=new Map,v=r??t??[],w=n??e??[],x=c??[0,0],_=d??Ms;OR(m,b,v);const C=Sv(w,h,g,{nodeOrigin:x,nodeExtent:_,zIndexMode:f});let S=[0,0,1];if(s&&o&&i){const E=Qs(h,{filter:P=>!!((P.width||P.initialWidth)&&(P.height||P.initialHeight))}),{x:k,y:T,zoom:I}=Qy(E,o,i,l,u,(a==null?void 0:a.padding)??.1);S=[k,T,I]}return{rfId:"1",width:o??0,height:i??0,transform:S,nodes:w,nodesInitialized:C,nodeLookup:h,parentLookup:g,edges:v,edgeLookup:b,connectionLookup:m,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:l,maxZoom:u,translateExtent:Ms,nodeExtent:_,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ri.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:x,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:s??!1,fitViewOptions:a,fitViewResolver:null,connection:{...vR},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:J5,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:gR,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},J8=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:a,minZoom:l,maxZoom:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f})=>vq((h,g)=>{async function m(){const{nodeLookup:b,panZoom:v,fitViewOptions:w,fitViewResolver:x,width:_,height:C,minZoom:S,maxZoom:E}=g();v&&(await Q5({nodes:b,width:_,height:C,panZoom:v,minZoom:S,maxZoom:E},w),x==null||x.resolve(!0),h({fitViewResolver:null}))}return{...Eb({nodes:e,edges:t,width:o,height:i,fitView:s,fitViewOptions:a,minZoom:l,maxZoom:u,nodeOrigin:c,nodeExtent:d,defaultNodes:n,defaultEdges:r,zIndexMode:f}),setNodes:b=>{const{nodeLookup:v,parentLookup:w,nodeOrigin:x,elevateNodesOnSelect:_,fitViewQueued:C,zIndexMode:S}=g(),E=Sv(b,v,w,{nodeOrigin:x,nodeExtent:d,elevateNodesOnSelect:_,checkEquality:!0,zIndexMode:S});C&&E?(m(),h({nodes:b,nodesInitialized:E,fitViewQueued:!1,fitViewOptions:void 0})):h({nodes:b,nodesInitialized:E})},setEdges:b=>{const{connectionLookup:v,edgeLookup:w}=g();OR(v,w,b),h({edges:b})},setDefaultNodesAndEdges:(b,v)=>{if(b){const{setNodes:w}=g();w(b),h({hasDefaultNodes:!0})}if(v){const{setEdges:w}=g();w(v),h({hasDefaultEdges:!0})}},updateNodeInternals:b=>{const{triggerNodeChanges:v,nodeLookup:w,parentLookup:x,domNode:_,nodeOrigin:C,nodeExtent:S,debug:E,fitViewQueued:k,zIndexMode:T}=g(),{changes:I,updatedInternals:P}=bF(b,w,x,_,C,S,T);P&&(vF(w,x,{nodeOrigin:C,nodeExtent:S,zIndexMode:T}),k?(m(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),(I==null?void 0:I.length)>0&&(E&&console.log("React Flow: trigger node changes",I),v==null||v(I)))},updateNodePositions:(b,v=!1)=>{const w=[];let x=[];const{nodeLookup:_,triggerNodeChanges:C,connection:S,updateConnection:E,onNodesChangeMiddlewareMap:k}=g();for(const[T,I]of b){const P=_.get(T),j=!!(P!=null&&P.expandParent&&(P!=null&&P.parentId)&&(I!=null&&I.position)),$={id:T,type:"position",position:j?{x:Math.max(0,I.position.x),y:Math.max(0,I.position.y)}:I.position,dragging:v};if(P&&S.inProgress&&S.fromNode.id===P.id){const R=to(P,S.fromHandle,re.Left,!0);E({...S,from:R})}j&&P.parentId&&w.push({id:T,parentId:P.parentId,rect:{...I.internals.positionAbsolute,width:I.measured.width??0,height:I.measured.height??0}}),x.push($)}if(w.length>0){const{parentLookup:T,nodeOrigin:I}=g(),P=r0(w,_,T,I);x.push(...P)}for(const T of k.values())x=T(x);C(x)},triggerNodeChanges:b=>{const{onNodesChange:v,setNodes:w,nodes:x,hasDefaultNodes:_,debug:C}=g();if(b!=null&&b.length){if(_){const S=eP(b,x);w(S)}C&&console.log("React Flow: trigger node changes",b),v==null||v(b)}},triggerEdgeChanges:b=>{const{onEdgesChange:v,setEdges:w,edges:x,hasDefaultEdges:_,debug:C}=g();if(b!=null&&b.length){if(_){const S=tP(b,x);w(S)}C&&console.log("React Flow: trigger edge changes",b),v==null||v(b)}},addSelectedNodes:b=>{const{multiSelectionActive:v,edgeLookup:w,nodeLookup:x,triggerNodeChanges:_,triggerEdgeChanges:C}=g();if(v){const S=b.map(E=>jr(E,!0));_(S);return}_(Oo(x,new Set([...b]),!0)),C(Oo(w))},addSelectedEdges:b=>{const{multiSelectionActive:v,edgeLookup:w,nodeLookup:x,triggerNodeChanges:_,triggerEdgeChanges:C}=g();if(v){const S=b.map(E=>jr(E,!0));C(S);return}C(Oo(w,new Set([...b]))),_(Oo(x,new Set,!0))},unselectNodesAndEdges:({nodes:b,edges:v}={})=>{const{edges:w,nodes:x,nodeLookup:_,triggerNodeChanges:C,triggerEdgeChanges:S}=g(),E=b||x,k=v||w,T=E.map(P=>{const j=_.get(P.id);return j&&(j.selected=!1),jr(P.id,!1)}),I=k.map(P=>jr(P.id,!1));C(T),S(I)},setMinZoom:b=>{const{panZoom:v,maxZoom:w}=g();v==null||v.setScaleExtent([b,w]),h({minZoom:b})},setMaxZoom:b=>{const{panZoom:v,minZoom:w}=g();v==null||v.setScaleExtent([w,b]),h({maxZoom:b})},setTranslateExtent:b=>{var v;(v=g().panZoom)==null||v.setTranslateExtent(b),h({translateExtent:b})},resetSelectedElements:()=>{const{edges:b,nodes:v,triggerNodeChanges:w,triggerEdgeChanges:x,elementsSelectable:_}=g();if(!_)return;const C=v.reduce((E,k)=>k.selected?[...E,jr(k.id,!1)]:E,[]),S=b.reduce((E,k)=>k.selected?[...E,jr(k.id,!1)]:E,[]);w(C),x(S)},setNodeExtent:b=>{const{nodes:v,nodeLookup:w,parentLookup:x,nodeOrigin:_,elevateNodesOnSelect:C,nodeExtent:S,zIndexMode:E}=g();b[0][0]===S[0][0]&&b[0][1]===S[0][1]&&b[1][0]===S[1][0]&&b[1][1]===S[1][1]||(Sv(v,w,x,{nodeOrigin:_,nodeExtent:b,elevateNodesOnSelect:C,checkEquality:!1,zIndexMode:E}),h({nodeExtent:b}))},panBy:b=>{const{transform:v,width:w,height:x,panZoom:_,translateExtent:C}=g();return _F({delta:b,panZoom:_,transform:v,translateExtent:C,width:w,height:x})},setCenter:async(b,v,w)=>{const{width:x,height:_,maxZoom:C,panZoom:S}=g();if(!S)return Promise.resolve(!1);const E=typeof(w==null?void 0:w.zoom)<"u"?w.zoom:C;return await S.setViewport({x:x/2-b*E,y:_/2-v*E,zoom:E},{duration:w==null?void 0:w.duration,ease:w==null?void 0:w.ease,interpolate:w==null?void 0:w.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{h({connection:{...vR}})},updateConnection:b=>{h({connection:b})},reset:()=>h({...Eb()})}},Object.is);function eB({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:o,initialHeight:i,initialMinZoom:s,initialMaxZoom:a,initialFitViewOptions:l,fitView:u,nodeOrigin:c,nodeExtent:d,zIndexMode:f,children:h}){const[g]=y.useState(()=>J8({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:u,minZoom:s,maxZoom:a,fitViewOptions:l,nodeOrigin:c,nodeExtent:d,zIndexMode:f}));return p.jsx(yq,{value:g,children:p.jsx(qq,{children:h})})}function tB({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:a,fitViewOptions:l,minZoom:u,maxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h}){return y.useContext(Lu)?p.jsx(p.Fragment,{children:e}):p.jsx(eB,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,fitView:a,initialFitViewOptions:l,initialMinZoom:u,initialMaxZoom:c,nodeOrigin:d,nodeExtent:f,zIndexMode:h,children:e})}const nB={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function rB({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i,edgeTypes:s,onNodeClick:a,onEdgeClick:l,onInit:u,onMove:c,onMoveStart:d,onMoveEnd:f,onConnect:h,onConnectStart:g,onConnectEnd:m,onClickConnectStart:b,onClickConnectEnd:v,onNodeMouseEnter:w,onNodeMouseMove:x,onNodeMouseLeave:_,onNodeContextMenu:C,onNodeDoubleClick:S,onNodeDragStart:E,onNodeDrag:k,onNodeDragStop:T,onNodesDelete:I,onEdgesDelete:P,onDelete:j,onSelectionChange:$,onSelectionDragStart:R,onSelectionDrag:L,onSelectionDragStop:M,onSelectionContextMenu:O,onSelectionStart:N,onSelectionEnd:A,onBeforeDelete:D,connectionMode:z,connectionLineType:F=or.Bezier,connectionLineStyle:V,connectionLineComponent:H,connectionLineContainerStyle:K,deleteKeyCode:X="Backspace",selectionKeyCode:q="Shift",selectionOnDrag:B=!1,selectionMode:G=Is.Full,panActivationKeyCode:Q="Space",multiSelectionKeyCode:Y=Ls()?"Meta":"Control",zoomActivationKeyCode:U=Ls()?"Meta":"Control",snapToGrid:Z,snapGrid:se,onlyRenderVisibleElements:oe=!1,selectNodesOnDrag:le,nodesDraggable:ie,autoPanOnNodeFocus:Be,nodesConnectable:Ae,nodesFocusable:vn,nodeOrigin:Xt=ZR,edgesFocusable:tt,edgesReconnectable:Ie,elementsSelectable:Wn=!0,defaultViewport:yn=Aq,minZoom:Un=.5,maxZoom:Gn=2,translateExtent:xn=Ms,preventScrolling:aa=!0,nodeExtent:mo,defaultMarkerColor:Cc="#b1b1b7",zoomOnScroll:la=!0,zoomOnPinch:Qt=!0,panOnScroll:wn=!1,panOnScrollSpeed:XI=.5,panOnScrollMode:QI=Hr.Free,zoomOnDoubleClick:ZI=!0,panOnDrag:JI=!0,onPaneClick:ej,onPaneMouseEnter:tj,onPaneMouseMove:nj,onPaneMouseLeave:rj,onPaneScroll:oj,onPaneContextMenu:ij,paneClickDistance:sj=1,nodeClickDistance:aj=0,children:lj,onReconnect:uj,onReconnectStart:cj,onReconnectEnd:dj,onEdgeContextMenu:fj,onEdgeDoubleClick:hj,onEdgeMouseEnter:pj,onEdgeMouseMove:mj,onEdgeMouseLeave:gj,reconnectRadius:vj=10,onNodesChange:yj,onEdgesChange:xj,noDragClassName:wj="nodrag",noWheelClassName:bj="nowheel",noPanClassName:Z0="nopan",fitView:J0,fitViewOptions:ex,connectOnClick:_j,attributionPosition:Sj,proOptions:Ej,defaultEdgeOptions:Cj,elevateNodesOnSelect:Nj=!0,elevateEdgesOnSelect:kj=!1,disableKeyboardA11y:tx=!1,autoPanOnConnect:Rj,autoPanOnNodeDrag:Pj,autoPanSpeed:Tj,connectionRadius:Aj,isValidConnection:Mj,onError:Ij,style:jj,id:nx,nodeDragThreshold:Oj,connectionDragThreshold:Lj,viewport:Dj,onViewportChange:$j,width:zj,height:Fj,colorMode:qj="light",debug:Bj,onScroll:ua,ariaLabelConfig:Hj,zIndexMode:rx="basic",...Vj},Wj){const Nc=nx||"1",Uj=Oq(qj),Gj=y.useCallback(ox=>{ox.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ua==null||ua(ox)},[ua]);return p.jsx("div",{"data-testid":"rf__wrapper",...Vj,onScroll:Gj,style:{...jj,...nB},ref:Wj,className:Oe(["react-flow",o,Uj]),id:nx,role:"application",children:p.jsxs(tB,{nodes:e,edges:t,width:zj,height:Fj,fitView:J0,fitViewOptions:ex,minZoom:Un,maxZoom:Gn,nodeOrigin:Xt,nodeExtent:mo,zIndexMode:rx,children:[p.jsx(Z8,{onInit:u,onNodeClick:a,onEdgeClick:l,onNodeMouseEnter:w,onNodeMouseMove:x,onNodeMouseLeave:_,onNodeContextMenu:C,onNodeDoubleClick:S,nodeTypes:i,edgeTypes:s,connectionLineType:F,connectionLineStyle:V,connectionLineComponent:H,connectionLineContainerStyle:K,selectionKeyCode:q,selectionOnDrag:B,selectionMode:G,deleteKeyCode:X,multiSelectionKeyCode:Y,panActivationKeyCode:Q,zoomActivationKeyCode:U,onlyRenderVisibleElements:oe,defaultViewport:yn,translateExtent:xn,minZoom:Un,maxZoom:Gn,preventScrolling:aa,zoomOnScroll:la,zoomOnPinch:Qt,zoomOnDoubleClick:ZI,panOnScroll:wn,panOnScrollSpeed:XI,panOnScrollMode:QI,panOnDrag:JI,onPaneClick:ej,onPaneMouseEnter:tj,onPaneMouseMove:nj,onPaneMouseLeave:rj,onPaneScroll:oj,onPaneContextMenu:ij,paneClickDistance:sj,nodeClickDistance:aj,onSelectionContextMenu:O,onSelectionStart:N,onSelectionEnd:A,onReconnect:uj,onReconnectStart:cj,onReconnectEnd:dj,onEdgeContextMenu:fj,onEdgeDoubleClick:hj,onEdgeMouseEnter:pj,onEdgeMouseMove:mj,onEdgeMouseLeave:gj,reconnectRadius:vj,defaultMarkerColor:Cc,noDragClassName:wj,noWheelClassName:bj,noPanClassName:Z0,rfId:Nc,disableKeyboardA11y:tx,nodeExtent:mo,viewport:Dj,onViewportChange:$j}),p.jsx(jq,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:g,onConnectEnd:m,onClickConnectStart:b,onClickConnectEnd:v,nodesDraggable:ie,autoPanOnNodeFocus:Be,nodesConnectable:Ae,nodesFocusable:vn,edgesFocusable:tt,edgesReconnectable:Ie,elementsSelectable:Wn,elevateNodesOnSelect:Nj,elevateEdgesOnSelect:kj,minZoom:Un,maxZoom:Gn,nodeExtent:mo,onNodesChange:yj,onEdgesChange:xj,snapToGrid:Z,snapGrid:se,connectionMode:z,translateExtent:xn,connectOnClick:_j,defaultEdgeOptions:Cj,fitView:J0,fitViewOptions:ex,onNodesDelete:I,onEdgesDelete:P,onDelete:j,onNodeDragStart:E,onNodeDrag:k,onNodeDragStop:T,onSelectionDrag:L,onSelectionDragStart:R,onSelectionDragStop:M,onMove:c,onMoveStart:d,onMoveEnd:f,noPanClassName:Z0,nodeOrigin:Xt,rfId:Nc,autoPanOnConnect:Rj,autoPanOnNodeDrag:Pj,autoPanSpeed:Tj,onError:Ij,connectionRadius:Aj,isValidConnection:Mj,selectNodesOnDrag:le,nodeDragThreshold:Oj,connectionDragThreshold:Lj,onBeforeDelete:D,debug:Bj,ariaLabelConfig:Hj,zIndexMode:rx}),p.jsx(Tq,{onSelectionChange:$}),lj,p.jsx(Cq,{proOptions:Ej,position:Sj}),p.jsx(Eq,{rfId:Nc,disableKeyboardA11y:tx})]})})}var oB=nP(rB);function iB(e){const[t,n]=y.useState(e),r=y.useCallback(o=>n(i=>eP(o,i)),[]);return[t,n,r]}function sB(e){const[t,n]=y.useState(e),r=y.useCallback(o=>n(i=>tP(o,i)),[]);return[t,n,r]}function aB({dimensions:e,lineWidth:t,variant:n,className:r}){return p.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Oe(["react-flow__background-pattern",n,r])})}function lB({radius:e,className:t}){return p.jsx("circle",{cx:e,cy:e,r:e,className:Oe(["react-flow__background-pattern","dots",t])})}var Mn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Mn||(Mn={}));const uB={[Mn.Dots]:1,[Mn.Lines]:1,[Mn.Cross]:6},cB=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function NP({id:e,variant:t=Mn.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=0,color:s,bgColor:a,style:l,className:u,patternClassName:c}){const d=y.useRef(null),{transform:f,patternId:h}=pe(cB,Ee),g=r||uB[t],m=t===Mn.Dots,b=t===Mn.Cross,v=Array.isArray(n)?n:[n,n],w=[v[0]*f[2]||1,v[1]*f[2]||1],x=g*f[2],_=Array.isArray(i)?i:[i,i],C=b?[x,x]:w,S=[_[0]*f[2]||1+C[0]/2,_[1]*f[2]||1+C[1]/2],E=`${h}${e||""}`;return p.jsxs("svg",{className:Oe(["react-flow__background",u]),style:{...l,...$u,"--xy-background-color-props":a,"--xy-background-pattern-color-props":s},ref:d,"data-testid":"rf__background",children:[p.jsx("pattern",{id:E,x:f[0]%w[0],y:f[1]%w[1],width:w[0],height:w[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`,children:m?p.jsx(lB,{radius:x/2,className:c}):p.jsx(aB,{dimensions:C,lineWidth:o,variant:t,className:c})}),p.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${E})`})]})}NP.displayName="Background";const dB=y.memo(NP);function fB(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:p.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function hB(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:p.jsx("path",{d:"M0 0h32v4.2H0z"})})}function pB(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:p.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function mB(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:p.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function gB(){return p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:p.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function $a({children:e,className:t,...n}){return p.jsx("button",{type:"button",className:Oe(["react-flow__controls-button",t]),...n,children:e})}const vB=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function kP({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:i,onZoomOut:s,onFitView:a,onInteractiveChange:l,className:u,children:c,position:d="bottom-left",orientation:f="vertical","aria-label":h}){const g=Ce(),{isInteractive:m,minZoomReached:b,maxZoomReached:v,ariaLabelConfig:w}=pe(vB,Ee),{zoomIn:x,zoomOut:_,fitView:C}=o0(),S=()=>{x(),i==null||i()},E=()=>{_(),s==null||s()},k=()=>{C(o),a==null||a()},T=()=>{g.setState({nodesDraggable:!m,nodesConnectable:!m,elementsSelectable:!m}),l==null||l(!m)},I=f==="horizontal"?"horizontal":"vertical";return p.jsxs(Du,{className:Oe(["react-flow__controls",I,u]),position:d,style:e,"data-testid":"rf__controls","aria-label":h??w["controls.ariaLabel"],children:[t&&p.jsxs(p.Fragment,{children:[p.jsx($a,{onClick:S,className:"react-flow__controls-zoomin",title:w["controls.zoomIn.ariaLabel"],"aria-label":w["controls.zoomIn.ariaLabel"],disabled:v,children:p.jsx(fB,{})}),p.jsx($a,{onClick:E,className:"react-flow__controls-zoomout",title:w["controls.zoomOut.ariaLabel"],"aria-label":w["controls.zoomOut.ariaLabel"],disabled:b,children:p.jsx(hB,{})})]}),n&&p.jsx($a,{className:"react-flow__controls-fitview",onClick:k,title:w["controls.fitView.ariaLabel"],"aria-label":w["controls.fitView.ariaLabel"],children:p.jsx(pB,{})}),r&&p.jsx($a,{className:"react-flow__controls-interactive",onClick:T,title:w["controls.interactive.ariaLabel"],"aria-label":w["controls.interactive.ariaLabel"],children:m?p.jsx(gB,{}):p.jsx(mB,{})}),c]})}kP.displayName="Controls";const yB=y.memo(kP);function xB({id:e,x:t,y:n,width:r,height:o,style:i,color:s,strokeColor:a,strokeWidth:l,className:u,borderRadius:c,shapeRendering:d,selected:f,onClick:h}){const{background:g,backgroundColor:m}=i||{},b=s||g||m;return p.jsx("rect",{className:Oe(["react-flow__minimap-node",{selected:f},u]),x:t,y:n,rx:c,ry:c,width:r,height:o,style:{fill:b,stroke:a,strokeWidth:l},shapeRendering:d,onClick:h?v=>h(v,e):void 0})}const wB=y.memo(xB),bB=e=>e.nodes.map(t=>t.id),dd=e=>e instanceof Function?e:()=>e;function _B({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:i=wB,onClick:s}){const a=pe(bB,Ee),l=dd(t),u=dd(e),c=dd(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return p.jsx(p.Fragment,{children:a.map(f=>p.jsx(EB,{id:f,nodeColorFunc:l,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:i,onClick:s,shapeRendering:d},f))})}function SB({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:a,onClick:l}){const{node:u,x:c,y:d,width:f,height:h}=pe(g=>{const{internals:m}=g.nodeLookup.get(e),b=m.userNode,{x:v,y:w}=m.positionAbsolute,{width:x,height:_}=Bn(b);return{node:b,x:v,y:w,width:x,height:_}},Ee);return!u||u.hidden||!ER(u)?null:p.jsx(a,{x:c,y:d,width:f,height:h,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:o,strokeColor:n(u),strokeWidth:i,shapeRendering:s,onClick:l,id:u.id})}const EB=y.memo(SB);var CB=y.memo(_B);const NB=200,kB=150,RB=e=>!e.hidden,PB=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?SR(Qs(e.nodeLookup,{filter:RB}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},TB="react-flow__minimap-desc";function RP({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:o="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:a,bgColor:l,maskColor:u,maskStrokeColor:c,maskStrokeWidth:d,position:f="bottom-right",onClick:h,onNodeClick:g,pannable:m=!1,zoomable:b=!1,ariaLabel:v,inversePan:w,zoomStep:x=1,offsetScale:_=5}){const C=Ce(),S=y.useRef(null),{boundingRect:E,viewBB:k,rfId:T,panZoom:I,translateExtent:P,flowWidth:j,flowHeight:$,ariaLabelConfig:R}=pe(PB,Ee),L=(e==null?void 0:e.width)??NB,M=(e==null?void 0:e.height)??kB,O=E.width/L,N=E.height/M,A=Math.max(O,N),D=A*L,z=A*M,F=_*A,V=E.x-(D-E.width)/2-F,H=E.y-(z-E.height)/2-F,K=D+F*2,X=z+F*2,q=`${TB}-${T}`,B=y.useRef(0),G=y.useRef();B.current=A,y.useEffect(()=>{if(S.current&&I)return G.current=AF({domNode:S.current,panZoom:I,getTransform:()=>C.getState().transform,getViewScale:()=>B.current}),()=>{var Z;(Z=G.current)==null||Z.destroy()}},[I]),y.useEffect(()=>{var Z;(Z=G.current)==null||Z.update({translateExtent:P,width:j,height:$,inversePan:w,pannable:m,zoomStep:x,zoomable:b})},[m,b,w,x,P,j,$]);const Q=h?Z=>{var le;const[se,oe]=((le=G.current)==null?void 0:le.pointer(Z))||[0,0];h(Z,{x:se,y:oe})}:void 0,Y=g?y.useCallback((Z,se)=>{const oe=C.getState().nodeLookup.get(se).internals.userNode;g(Z,oe)},[]):void 0,U=v??R["minimap.ariaLabel"];return p.jsx(Du,{position:f,style:{...e,"--xy-minimap-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-width-props":typeof d=="number"?d*A:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:Oe(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:p.jsxs("svg",{width:L,height:M,viewBox:`${V} ${H} ${K} ${X}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":q,ref:S,onClick:Q,children:[U&&p.jsx("title",{id:q,children:U}),p.jsx(CB,{onClick:Y,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:o,nodeStrokeWidth:s,nodeComponent:a}),p.jsx("path",{className:"react-flow__minimap-mask",d:`M${V-F},${H-F}h${K+F*2}v${X+F*2}h${-K-F*2}z
|
|
252
|
-
M${k.x},${k.y}h${k.width}v${k.height}h${-k.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}RP.displayName="MiniMap";const AB=y.memo(RP),MB=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,IB={[ai.Line]:"right",[ai.Handle]:"bottom-right"};function jB({nodeId:e,position:t,variant:n=ai.Handle,className:r,style:o=void 0,children:i,color:s,minWidth:a=10,minHeight:l=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:d=!1,resizeDirection:f,autoScale:h=!0,shouldResize:g,onResizeStart:m,onResize:b,onResizeEnd:v}){const w=sP(),x=typeof e=="string"?e:w,_=Ce(),C=y.useRef(null),S=n===ai.Handle,E=pe(y.useCallback(MB(S&&h),[S,h]),Ee),k=y.useRef(null),T=t??IB[n];y.useEffect(()=>{if(!(!C.current||!x))return k.current||(k.current=WF({domNode:C.current,nodeId:x,getStoreItems:()=>{const{nodeLookup:P,transform:j,snapGrid:$,snapToGrid:R,nodeOrigin:L,domNode:M}=_.getState();return{nodeLookup:P,transform:j,snapGrid:$,snapToGrid:R,nodeOrigin:L,paneDomNode:M}},onChange:(P,j)=>{const{triggerNodeChanges:$,nodeLookup:R,parentLookup:L,nodeOrigin:M}=_.getState(),O=[],N={x:P.x,y:P.y},A=R.get(x);if(A&&A.expandParent&&A.parentId){const D=A.origin??M,z=P.width??A.measured.width??0,F=P.height??A.measured.height??0,V={id:A.id,parentId:A.parentId,rect:{width:z,height:F,...CR({x:P.x??A.position.x,y:P.y??A.position.y},{width:z,height:F},A.parentId,R,D)}},H=r0([V],R,L,M);O.push(...H),N.x=P.x?Math.max(D[0]*z,P.x):void 0,N.y=P.y?Math.max(D[1]*F,P.y):void 0}if(N.x!==void 0&&N.y!==void 0){const D={id:x,type:"position",position:{...N}};O.push(D)}if(P.width!==void 0&&P.height!==void 0){const z={id:x,type:"dimensions",resizing:!0,setAttributes:f?f==="horizontal"?"width":"height":!0,dimensions:{width:P.width,height:P.height}};O.push(z)}for(const D of j){const z={...D,type:"position"};O.push(z)}$(O)},onEnd:({width:P,height:j})=>{const $={id:x,type:"dimensions",resizing:!1,dimensions:{width:P,height:j}};_.getState().triggerNodeChanges([$])}})),k.current.update({controlPosition:T,boundaries:{minWidth:a,minHeight:l,maxWidth:u,maxHeight:c},keepAspectRatio:d,resizeDirection:f,onResizeStart:m,onResize:b,onResizeEnd:v,shouldResize:g}),()=>{var P;(P=k.current)==null||P.destroy()}},[T,a,l,u,c,d,m,b,v,g]);const I=T.split("-");return p.jsx("div",{className:Oe(["react-flow__resize-control","nodrag",...I,n,r]),ref:C,style:{...o,scale:E,...s&&{[S?"backgroundColor":"borderColor"]:s}},children:i})}y.memo(jB);function s0(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 fd,Cb;function OB(){if(Cb)return fd;Cb=1;function e(){this.__data__=[],this.size=0}return fd=e,fd}var hd,Nb;function xi(){if(Nb)return hd;Nb=1;function e(t,n){return t===n||t!==t&&n!==n}return hd=e,hd}var pd,kb;function Fu(){if(kb)return pd;kb=1;var e=xi();function t(n,r){for(var o=n.length;o--;)if(e(n[o][0],r))return o;return-1}return pd=t,pd}var md,Rb;function LB(){if(Rb)return md;Rb=1;var e=Fu(),t=Array.prototype,n=t.splice;function r(o){var i=this.__data__,s=e(i,o);if(s<0)return!1;var a=i.length-1;return s==a?i.pop():n.call(i,s,1),--this.size,!0}return md=r,md}var gd,Pb;function DB(){if(Pb)return gd;Pb=1;var e=Fu();function t(n){var r=this.__data__,o=e(r,n);return o<0?void 0:r[o][1]}return gd=t,gd}var vd,Tb;function $B(){if(Tb)return vd;Tb=1;var e=Fu();function t(n){return e(this.__data__,n)>-1}return vd=t,vd}var yd,Ab;function zB(){if(Ab)return yd;Ab=1;var e=Fu();function t(n,r){var o=this.__data__,i=e(o,n);return i<0?(++this.size,o.push([n,r])):o[i][1]=r,this}return yd=t,yd}var xd,Mb;function qu(){if(Mb)return xd;Mb=1;var e=OB(),t=LB(),n=DB(),r=$B(),o=zB();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var u=s[a];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,xd=i,xd}var wd,Ib;function FB(){if(Ib)return wd;Ib=1;var e=qu();function t(){this.__data__=new e,this.size=0}return wd=t,wd}var bd,jb;function qB(){if(jb)return bd;jb=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return bd=e,bd}var _d,Ob;function BB(){if(Ob)return _d;Ob=1;function e(t){return this.__data__.get(t)}return _d=e,_d}var Sd,Lb;function HB(){if(Lb)return Sd;Lb=1;function e(t){return this.__data__.has(t)}return Sd=e,Sd}var Ed,Db;function PP(){if(Db)return Ed;Db=1;var e=typeof ca=="object"&&ca&&ca.Object===Object&&ca;return Ed=e,Ed}var Cd,$b;function Ut(){if($b)return Cd;$b=1;var e=PP(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return Cd=n,Cd}var Nd,zb;function wi(){if(zb)return Nd;zb=1;var e=Ut(),t=e.Symbol;return Nd=t,Nd}var kd,Fb;function VB(){if(Fb)return kd;Fb=1;var e=wi(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;function i(s){var a=n.call(s,o),l=s[o];try{s[o]=void 0;var u=!0}catch{}var c=r.call(s);return u&&(a?s[o]=l:delete s[o]),c}return kd=i,kd}var Rd,qb;function WB(){if(qb)return Rd;qb=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return Rd=n,Rd}var Pd,Bb;function lo(){if(Bb)return Pd;Bb=1;var e=wi(),t=VB(),n=WB(),r="[object Null]",o="[object Undefined]",i=e?e.toStringTag:void 0;function s(a){return a==null?a===void 0?o:r:i&&i in Object(a)?t(a):n(a)}return Pd=s,Pd}var Td,Hb;function Rt(){if(Hb)return Td;Hb=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Td=e,Td}var Ad,Vb;function ea(){if(Vb)return Ad;Vb=1;var e=lo(),t=Rt(),n="[object AsyncFunction]",r="[object Function]",o="[object GeneratorFunction]",i="[object Proxy]";function s(a){if(!t(a))return!1;var l=e(a);return l==r||l==o||l==n||l==i}return Ad=s,Ad}var Md,Wb;function UB(){if(Wb)return Md;Wb=1;var e=Ut(),t=e["__core-js_shared__"];return Md=t,Md}var Id,Ub;function GB(){if(Ub)return Id;Ub=1;var e=UB(),t=function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!t&&t in r}return Id=n,Id}var jd,Gb;function TP(){if(Gb)return jd;Gb=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return jd=n,jd}var Od,Yb;function YB(){if(Yb)return Od;Yb=1;var e=ea(),t=GB(),n=Rt(),r=TP(),o=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,s=Function.prototype,a=Object.prototype,l=s.toString,u=a.hasOwnProperty,c=RegExp("^"+l.call(u).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function d(f){if(!n(f)||t(f))return!1;var h=e(f)?c:i;return h.test(r(f))}return Od=d,Od}var Ld,Kb;function KB(){if(Kb)return Ld;Kb=1;function e(t,n){return t==null?void 0:t[n]}return Ld=e,Ld}var Dd,Xb;function uo(){if(Xb)return Dd;Xb=1;var e=YB(),t=KB();function n(r,o){var i=t(r,o);return e(i)?i:void 0}return Dd=n,Dd}var $d,Qb;function a0(){if(Qb)return $d;Qb=1;var e=uo(),t=Ut(),n=e(t,"Map");return $d=n,$d}var zd,Zb;function Bu(){if(Zb)return zd;Zb=1;var e=uo(),t=e(Object,"create");return zd=t,zd}var Fd,Jb;function XB(){if(Jb)return Fd;Jb=1;var e=Bu();function t(){this.__data__=e?e(null):{},this.size=0}return Fd=t,Fd}var qd,e1;function QB(){if(e1)return qd;e1=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return qd=e,qd}var Bd,t1;function ZB(){if(t1)return Bd;t1=1;var e=Bu(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function o(i){var s=this.__data__;if(e){var a=s[i];return a===t?void 0:a}return r.call(s,i)?s[i]:void 0}return Bd=o,Bd}var Hd,n1;function JB(){if(n1)return Hd;n1=1;var e=Bu(),t=Object.prototype,n=t.hasOwnProperty;function r(o){var i=this.__data__;return e?i[o]!==void 0:n.call(i,o)}return Hd=r,Hd}var Vd,r1;function eH(){if(r1)return Vd;r1=1;var e=Bu(),t="__lodash_hash_undefined__";function n(r,o){var i=this.__data__;return this.size+=this.has(r)?0:1,i[r]=e&&o===void 0?t:o,this}return Vd=n,Vd}var Wd,o1;function tH(){if(o1)return Wd;o1=1;var e=XB(),t=QB(),n=ZB(),r=JB(),o=eH();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var u=s[a];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Wd=i,Wd}var Ud,i1;function nH(){if(i1)return Ud;i1=1;var e=tH(),t=qu(),n=a0();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Ud=r,Ud}var Gd,s1;function rH(){if(s1)return Gd;s1=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Gd=e,Gd}var Yd,a1;function Hu(){if(a1)return Yd;a1=1;var e=rH();function t(n,r){var o=n.__data__;return e(r)?o[typeof r=="string"?"string":"hash"]:o.map}return Yd=t,Yd}var Kd,l1;function oH(){if(l1)return Kd;l1=1;var e=Hu();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Kd=t,Kd}var Xd,u1;function iH(){if(u1)return Xd;u1=1;var e=Hu();function t(n){return e(this,n).get(n)}return Xd=t,Xd}var Qd,c1;function sH(){if(c1)return Qd;c1=1;var e=Hu();function t(n){return e(this,n).has(n)}return Qd=t,Qd}var Zd,d1;function aH(){if(d1)return Zd;d1=1;var e=Hu();function t(n,r){var o=e(this,n),i=o.size;return o.set(n,r),this.size+=o.size==i?0:1,this}return Zd=t,Zd}var Jd,f1;function l0(){if(f1)return Jd;f1=1;var e=nH(),t=oH(),n=iH(),r=sH(),o=aH();function i(s){var a=-1,l=s==null?0:s.length;for(this.clear();++a<l;){var u=s[a];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=r,i.prototype.set=o,Jd=i,Jd}var ef,h1;function lH(){if(h1)return ef;h1=1;var e=qu(),t=a0(),n=l0(),r=200;function o(i,s){var a=this.__data__;if(a instanceof e){var l=a.__data__;if(!t||l.length<r-1)return l.push([i,s]),this.size=++a.size,this;a=this.__data__=new n(l)}return a.set(i,s),this.size=a.size,this}return ef=o,ef}var tf,p1;function Vu(){if(p1)return tf;p1=1;var e=qu(),t=FB(),n=qB(),r=BB(),o=HB(),i=lH();function s(a){var l=this.__data__=new e(a);this.size=l.size}return s.prototype.clear=t,s.prototype.delete=n,s.prototype.get=r,s.prototype.has=o,s.prototype.set=i,tf=s,tf}var nf,m1;function u0(){if(m1)return nf;m1=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o&&n(t[r],r,t)!==!1;);return t}return nf=e,nf}var rf,g1;function AP(){if(g1)return rf;g1=1;var e=uo(),t=function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}}();return rf=t,rf}var of,v1;function Wu(){if(v1)return of;v1=1;var e=AP();function t(n,r,o){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:o,writable:!0}):n[r]=o}return of=t,of}var sf,y1;function Uu(){if(y1)return sf;y1=1;var e=Wu(),t=xi(),n=Object.prototype,r=n.hasOwnProperty;function o(i,s,a){var l=i[s];(!(r.call(i,s)&&t(l,a))||a===void 0&&!(s in i))&&e(i,s,a)}return sf=o,sf}var af,x1;function ta(){if(x1)return af;x1=1;var e=Uu(),t=Wu();function n(r,o,i,s){var a=!i;i||(i={});for(var l=-1,u=o.length;++l<u;){var c=o[l],d=s?s(i[c],r[c],c,i,r):void 0;d===void 0&&(d=r[c]),a?t(i,c,d):e(i,c,d)}return i}return af=n,af}var lf,w1;function uH(){if(w1)return lf;w1=1;function e(t,n){for(var r=-1,o=Array(t);++r<t;)o[r]=n(r);return o}return lf=e,lf}var uf,b1;function pn(){if(b1)return uf;b1=1;function e(t){return t!=null&&typeof t=="object"}return uf=e,uf}var cf,_1;function cH(){if(_1)return cf;_1=1;var e=lo(),t=pn(),n="[object Arguments]";function r(o){return t(o)&&e(o)==n}return cf=r,cf}var df,S1;function na(){if(S1)return df;S1=1;var e=cH(),t=pn(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(s){return t(s)&&r.call(s,"callee")&&!o.call(s,"callee")};return df=i,df}var ff,E1;function Le(){if(E1)return ff;E1=1;var e=Array.isArray;return ff=e,ff}var Ui={exports:{}},hf,C1;function dH(){if(C1)return hf;C1=1;function e(){return!1}return hf=e,hf}Ui.exports;var N1;function bi(){return N1||(N1=1,function(e,t){var n=Ut(),r=dH(),o=t&&!t.nodeType&&t,i=o&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===o,a=s?n.Buffer:void 0,l=a?a.isBuffer:void 0,u=l||r;e.exports=u}(Ui,Ui.exports)),Ui.exports}var pf,k1;function Gu(){if(k1)return pf;k1=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,o){var i=typeof r;return o=o??e,!!o&&(i=="number"||i!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<o}return pf=n,pf}var mf,R1;function c0(){if(R1)return mf;R1=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return mf=t,mf}var gf,P1;function fH(){if(P1)return gf;P1=1;var e=lo(),t=c0(),n=pn(),r="[object Arguments]",o="[object Array]",i="[object Boolean]",s="[object Date]",a="[object Error]",l="[object Function]",u="[object Map]",c="[object Number]",d="[object Object]",f="[object RegExp]",h="[object Set]",g="[object String]",m="[object WeakMap]",b="[object ArrayBuffer]",v="[object DataView]",w="[object Float32Array]",x="[object Float64Array]",_="[object Int8Array]",C="[object Int16Array]",S="[object Int32Array]",E="[object Uint8Array]",k="[object Uint8ClampedArray]",T="[object Uint16Array]",I="[object Uint32Array]",P={};P[w]=P[x]=P[_]=P[C]=P[S]=P[E]=P[k]=P[T]=P[I]=!0,P[r]=P[o]=P[b]=P[i]=P[v]=P[s]=P[a]=P[l]=P[u]=P[c]=P[d]=P[f]=P[h]=P[g]=P[m]=!1;function j($){return n($)&&t($.length)&&!!P[e($)]}return gf=j,gf}var vf,T1;function Yu(){if(T1)return vf;T1=1;function e(t){return function(n){return t(n)}}return vf=e,vf}var Gi={exports:{}};Gi.exports;var A1;function d0(){return A1||(A1=1,function(e,t){var n=PP(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,s=i&&n.process,a=function(){try{var l=o&&o.require&&o.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();e.exports=a}(Gi,Gi.exports)),Gi.exports}var yf,M1;function ra(){if(M1)return yf;M1=1;var e=fH(),t=Yu(),n=d0(),r=n&&n.isTypedArray,o=r?t(r):e;return yf=o,yf}var xf,I1;function MP(){if(I1)return xf;I1=1;var e=uH(),t=na(),n=Le(),r=bi(),o=Gu(),i=ra(),s=Object.prototype,a=s.hasOwnProperty;function l(u,c){var d=n(u),f=!d&&t(u),h=!d&&!f&&r(u),g=!d&&!f&&!h&&i(u),m=d||f||h||g,b=m?e(u.length,String):[],v=b.length;for(var w in u)(c||a.call(u,w))&&!(m&&(w=="length"||h&&(w=="offset"||w=="parent")||g&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||o(w,v)))&&b.push(w);return b}return xf=l,xf}var wf,j1;function Ku(){if(j1)return wf;j1=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,o=typeof r=="function"&&r.prototype||e;return n===o}return wf=t,wf}var bf,O1;function IP(){if(O1)return bf;O1=1;function e(t,n){return function(r){return t(n(r))}}return bf=e,bf}var _f,L1;function hH(){if(L1)return _f;L1=1;var e=IP(),t=e(Object.keys,Object);return _f=t,_f}var Sf,D1;function f0(){if(D1)return Sf;D1=1;var e=Ku(),t=hH(),n=Object.prototype,r=n.hasOwnProperty;function o(i){if(!e(i))return t(i);var s=[];for(var a in Object(i))r.call(i,a)&&a!="constructor"&&s.push(a);return s}return Sf=o,Sf}var Ef,$1;function Hn(){if($1)return Ef;$1=1;var e=ea(),t=c0();function n(r){return r!=null&&t(r.length)&&!e(r)}return Ef=n,Ef}var Cf,z1;function kr(){if(z1)return Cf;z1=1;var e=MP(),t=f0(),n=Hn();function r(o){return n(o)?e(o):t(o)}return Cf=r,Cf}var Nf,F1;function pH(){if(F1)return Nf;F1=1;var e=ta(),t=kr();function n(r,o){return r&&e(o,t(o),r)}return Nf=n,Nf}var kf,q1;function mH(){if(q1)return kf;q1=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return kf=e,kf}var Rf,B1;function gH(){if(B1)return Rf;B1=1;var e=Rt(),t=Ku(),n=mH(),r=Object.prototype,o=r.hasOwnProperty;function i(s){if(!e(s))return n(s);var a=t(s),l=[];for(var u in s)u=="constructor"&&(a||!o.call(s,u))||l.push(u);return l}return Rf=i,Rf}var Pf,H1;function co(){if(H1)return Pf;H1=1;var e=MP(),t=gH(),n=Hn();function r(o){return n(o)?e(o,!0):t(o)}return Pf=r,Pf}var Tf,V1;function vH(){if(V1)return Tf;V1=1;var e=ta(),t=co();function n(r,o){return r&&e(o,t(o),r)}return Tf=n,Tf}var Yi={exports:{}};Yi.exports;var W1;function jP(){return W1||(W1=1,function(e,t){var n=Ut(),r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,s=i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;function l(u,c){if(c)return u.slice();var d=u.length,f=a?a(d):new u.constructor(d);return u.copy(f),f}e.exports=l}(Yi,Yi.exports)),Yi.exports}var Af,U1;function OP(){if(U1)return Af;U1=1;function e(t,n){var r=-1,o=t.length;for(n||(n=Array(o));++r<o;)n[r]=t[r];return n}return Af=e,Af}var Mf,G1;function LP(){if(G1)return Mf;G1=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,i=0,s=[];++r<o;){var a=t[r];n(a,r,t)&&(s[i++]=a)}return s}return Mf=e,Mf}var If,Y1;function DP(){if(Y1)return If;Y1=1;function e(){return[]}return If=e,If}var jf,K1;function h0(){if(K1)return jf;K1=1;var e=LP(),t=DP(),n=Object.prototype,r=n.propertyIsEnumerable,o=Object.getOwnPropertySymbols,i=o?function(s){return s==null?[]:(s=Object(s),e(o(s),function(a){return r.call(s,a)}))}:t;return jf=i,jf}var Of,X1;function yH(){if(X1)return Of;X1=1;var e=ta(),t=h0();function n(r,o){return e(r,t(r),o)}return Of=n,Of}var Lf,Q1;function p0(){if(Q1)return Lf;Q1=1;function e(t,n){for(var r=-1,o=n.length,i=t.length;++r<o;)t[i+r]=n[r];return t}return Lf=e,Lf}var Df,Z1;function Xu(){if(Z1)return Df;Z1=1;var e=IP(),t=e(Object.getPrototypeOf,Object);return Df=t,Df}var $f,J1;function $P(){if(J1)return $f;J1=1;var e=p0(),t=Xu(),n=h0(),r=DP(),o=Object.getOwnPropertySymbols,i=o?function(s){for(var a=[];s;)e(a,n(s)),s=t(s);return a}:r;return $f=i,$f}var zf,e_;function xH(){if(e_)return zf;e_=1;var e=ta(),t=$P();function n(r,o){return e(r,t(r),o)}return zf=n,zf}var Ff,t_;function zP(){if(t_)return Ff;t_=1;var e=p0(),t=Le();function n(r,o,i){var s=o(r);return t(r)?s:e(s,i(r))}return Ff=n,Ff}var qf,n_;function FP(){if(n_)return qf;n_=1;var e=zP(),t=h0(),n=kr();function r(o){return e(o,n,t)}return qf=r,qf}var Bf,r_;function wH(){if(r_)return Bf;r_=1;var e=zP(),t=$P(),n=co();function r(o){return e(o,n,t)}return Bf=r,Bf}var Hf,o_;function bH(){if(o_)return Hf;o_=1;var e=uo(),t=Ut(),n=e(t,"DataView");return Hf=n,Hf}var Vf,i_;function _H(){if(i_)return Vf;i_=1;var e=uo(),t=Ut(),n=e(t,"Promise");return Vf=n,Vf}var Wf,s_;function qP(){if(s_)return Wf;s_=1;var e=uo(),t=Ut(),n=e(t,"Set");return Wf=n,Wf}var Uf,a_;function SH(){if(a_)return Uf;a_=1;var e=uo(),t=Ut(),n=e(t,"WeakMap");return Uf=n,Uf}var Gf,l_;function _i(){if(l_)return Gf;l_=1;var e=bH(),t=a0(),n=_H(),r=qP(),o=SH(),i=lo(),s=TP(),a="[object Map]",l="[object Object]",u="[object Promise]",c="[object Set]",d="[object WeakMap]",f="[object DataView]",h=s(e),g=s(t),m=s(n),b=s(r),v=s(o),w=i;return(e&&w(new e(new ArrayBuffer(1)))!=f||t&&w(new t)!=a||n&&w(n.resolve())!=u||r&&w(new r)!=c||o&&w(new o)!=d)&&(w=function(x){var _=i(x),C=_==l?x.constructor:void 0,S=C?s(C):"";if(S)switch(S){case h:return f;case g:return a;case m:return u;case b:return c;case v:return d}return _}),Gf=w,Gf}var Yf,u_;function EH(){if(u_)return Yf;u_=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var o=r.length,i=new r.constructor(o);return o&&typeof r[0]=="string"&&t.call(r,"index")&&(i.index=r.index,i.input=r.input),i}return Yf=n,Yf}var Kf,c_;function BP(){if(c_)return Kf;c_=1;var e=Ut(),t=e.Uint8Array;return Kf=t,Kf}var Xf,d_;function m0(){if(d_)return Xf;d_=1;var e=BP();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return Xf=t,Xf}var Qf,f_;function CH(){if(f_)return Qf;f_=1;var e=m0();function t(n,r){var o=r?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.byteLength)}return Qf=t,Qf}var Zf,h_;function NH(){if(h_)return Zf;h_=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return Zf=t,Zf}var Jf,p_;function kH(){if(p_)return Jf;p_=1;var e=wi(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(o){return n?Object(n.call(o)):{}}return Jf=r,Jf}var eh,m_;function HP(){if(m_)return eh;m_=1;var e=m0();function t(n,r){var o=r?e(n.buffer):n.buffer;return new n.constructor(o,n.byteOffset,n.length)}return eh=t,eh}var th,g_;function RH(){if(g_)return th;g_=1;var e=m0(),t=CH(),n=NH(),r=kH(),o=HP(),i="[object Boolean]",s="[object Date]",a="[object Map]",l="[object Number]",u="[object RegExp]",c="[object Set]",d="[object String]",f="[object Symbol]",h="[object ArrayBuffer]",g="[object DataView]",m="[object Float32Array]",b="[object Float64Array]",v="[object Int8Array]",w="[object Int16Array]",x="[object Int32Array]",_="[object Uint8Array]",C="[object Uint8ClampedArray]",S="[object Uint16Array]",E="[object Uint32Array]";function k(T,I,P){var j=T.constructor;switch(I){case h:return e(T);case i:case s:return new j(+T);case g:return t(T,P);case m:case b:case v:case w:case x:case _:case C:case S:case E:return o(T,P);case a:return new j;case l:case d:return new j(T);case u:return n(T);case c:return new j;case f:return r(T)}}return th=k,th}var nh,v_;function VP(){if(v_)return nh;v_=1;var e=Rt(),t=Object.create,n=function(){function r(){}return function(o){if(!e(o))return{};if(t)return t(o);r.prototype=o;var i=new r;return r.prototype=void 0,i}}();return nh=n,nh}var rh,y_;function WP(){if(y_)return rh;y_=1;var e=VP(),t=Xu(),n=Ku();function r(o){return typeof o.constructor=="function"&&!n(o)?e(t(o)):{}}return rh=r,rh}var oh,x_;function PH(){if(x_)return oh;x_=1;var e=_i(),t=pn(),n="[object Map]";function r(o){return t(o)&&e(o)==n}return oh=r,oh}var ih,w_;function TH(){if(w_)return ih;w_=1;var e=PH(),t=Yu(),n=d0(),r=n&&n.isMap,o=r?t(r):e;return ih=o,ih}var sh,b_;function AH(){if(b_)return sh;b_=1;var e=_i(),t=pn(),n="[object Set]";function r(o){return t(o)&&e(o)==n}return sh=r,sh}var ah,__;function MH(){if(__)return ah;__=1;var e=AH(),t=Yu(),n=d0(),r=n&&n.isSet,o=r?t(r):e;return ah=o,ah}var lh,S_;function UP(){if(S_)return lh;S_=1;var e=Vu(),t=u0(),n=Uu(),r=pH(),o=vH(),i=jP(),s=OP(),a=yH(),l=xH(),u=FP(),c=wH(),d=_i(),f=EH(),h=RH(),g=WP(),m=Le(),b=bi(),v=TH(),w=Rt(),x=MH(),_=kr(),C=co(),S=1,E=2,k=4,T="[object Arguments]",I="[object Array]",P="[object Boolean]",j="[object Date]",$="[object Error]",R="[object Function]",L="[object GeneratorFunction]",M="[object Map]",O="[object Number]",N="[object Object]",A="[object RegExp]",D="[object Set]",z="[object String]",F="[object Symbol]",V="[object WeakMap]",H="[object ArrayBuffer]",K="[object DataView]",X="[object Float32Array]",q="[object Float64Array]",B="[object Int8Array]",G="[object Int16Array]",Q="[object Int32Array]",Y="[object Uint8Array]",U="[object Uint8ClampedArray]",Z="[object Uint16Array]",se="[object Uint32Array]",oe={};oe[T]=oe[I]=oe[H]=oe[K]=oe[P]=oe[j]=oe[X]=oe[q]=oe[B]=oe[G]=oe[Q]=oe[M]=oe[O]=oe[N]=oe[A]=oe[D]=oe[z]=oe[F]=oe[Y]=oe[U]=oe[Z]=oe[se]=!0,oe[$]=oe[R]=oe[V]=!1;function le(ie,Be,Ae,vn,Xt,tt){var Ie,Wn=Be&S,yn=Be&E,Un=Be&k;if(Ae&&(Ie=Xt?Ae(ie,vn,Xt,tt):Ae(ie)),Ie!==void 0)return Ie;if(!w(ie))return ie;var Gn=m(ie);if(Gn){if(Ie=f(ie),!Wn)return s(ie,Ie)}else{var xn=d(ie),aa=xn==R||xn==L;if(b(ie))return i(ie,Wn);if(xn==N||xn==T||aa&&!Xt){if(Ie=yn||aa?{}:g(ie),!Wn)return yn?l(ie,o(Ie,ie)):a(ie,r(Ie,ie))}else{if(!oe[xn])return Xt?ie:{};Ie=h(ie,xn,Wn)}}tt||(tt=new e);var mo=tt.get(ie);if(mo)return mo;tt.set(ie,Ie),x(ie)?ie.forEach(function(Qt){Ie.add(le(Qt,Be,Ae,Qt,ie,tt))}):v(ie)&&ie.forEach(function(Qt,wn){Ie.set(wn,le(Qt,Be,Ae,wn,ie,tt))});var Cc=Un?yn?c:u:yn?C:_,la=Gn?void 0:Cc(ie);return t(la||ie,function(Qt,wn){la&&(wn=Qt,Qt=ie[wn]),n(Ie,wn,le(Qt,Be,Ae,wn,ie,tt))}),Ie}return lh=le,lh}var uh,E_;function IH(){if(E_)return uh;E_=1;var e=UP(),t=4;function n(r){return e(r,t)}return uh=n,uh}var ch,C_;function g0(){if(C_)return ch;C_=1;function e(t){return function(){return t}}return ch=e,ch}var dh,N_;function jH(){if(N_)return dh;N_=1;function e(t){return function(n,r,o){for(var i=-1,s=Object(n),a=o(n),l=a.length;l--;){var u=a[t?l:++i];if(r(s[u],u,s)===!1)break}return n}}return dh=e,dh}var fh,k_;function v0(){if(k_)return fh;k_=1;var e=jH(),t=e();return fh=t,fh}var hh,R_;function y0(){if(R_)return hh;R_=1;var e=v0(),t=kr();function n(r,o){return r&&e(r,o,t)}return hh=n,hh}var ph,P_;function OH(){if(P_)return ph;P_=1;var e=Hn();function t(n,r){return function(o,i){if(o==null)return o;if(!e(o))return n(o,i);for(var s=o.length,a=r?s:-1,l=Object(o);(r?a--:++a<s)&&i(l[a],a,l)!==!1;);return o}}return ph=t,ph}var mh,T_;function Qu(){if(T_)return mh;T_=1;var e=y0(),t=OH(),n=t(e);return mh=n,mh}var gh,A_;function fo(){if(A_)return gh;A_=1;function e(t){return t}return gh=e,gh}var vh,M_;function GP(){if(M_)return vh;M_=1;var e=fo();function t(n){return typeof n=="function"?n:e}return vh=t,vh}var yh,I_;function YP(){if(I_)return yh;I_=1;var e=u0(),t=Qu(),n=GP(),r=Le();function o(i,s){var a=r(i)?e:t;return a(i,n(s))}return yh=o,yh}var xh,j_;function KP(){return j_||(j_=1,xh=YP()),xh}var wh,O_;function LH(){if(O_)return wh;O_=1;var e=Qu();function t(n,r){var o=[];return e(n,function(i,s,a){r(i,s,a)&&o.push(i)}),o}return wh=t,wh}var bh,L_;function DH(){if(L_)return bh;L_=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return bh=t,bh}var _h,D_;function $H(){if(D_)return _h;D_=1;function e(t){return this.__data__.has(t)}return _h=e,_h}var Sh,$_;function XP(){if($_)return Sh;$_=1;var e=l0(),t=DH(),n=$H();function r(o){var i=-1,s=o==null?0:o.length;for(this.__data__=new e;++i<s;)this.add(o[i])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Sh=r,Sh}var Eh,z_;function zH(){if(z_)return Eh;z_=1;function e(t,n){for(var r=-1,o=t==null?0:t.length;++r<o;)if(n(t[r],r,t))return!0;return!1}return Eh=e,Eh}var Ch,F_;function QP(){if(F_)return Ch;F_=1;function e(t,n){return t.has(n)}return Ch=e,Ch}var Nh,q_;function ZP(){if(q_)return Nh;q_=1;var e=XP(),t=zH(),n=QP(),r=1,o=2;function i(s,a,l,u,c,d){var f=l&r,h=s.length,g=a.length;if(h!=g&&!(f&&g>h))return!1;var m=d.get(s),b=d.get(a);if(m&&b)return m==a&&b==s;var v=-1,w=!0,x=l&o?new e:void 0;for(d.set(s,a),d.set(a,s);++v<h;){var _=s[v],C=a[v];if(u)var S=f?u(C,_,v,a,s,d):u(_,C,v,s,a,d);if(S!==void 0){if(S)continue;w=!1;break}if(x){if(!t(a,function(E,k){if(!n(x,k)&&(_===E||c(_,E,l,u,d)))return x.push(k)})){w=!1;break}}else if(!(_===C||c(_,C,l,u,d))){w=!1;break}}return d.delete(s),d.delete(a),w}return Nh=i,Nh}var kh,B_;function FH(){if(B_)return kh;B_=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o,i){r[++n]=[i,o]}),r}return kh=e,kh}var Rh,H_;function x0(){if(H_)return Rh;H_=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(o){r[++n]=o}),r}return Rh=e,Rh}var Ph,V_;function qH(){if(V_)return Ph;V_=1;var e=wi(),t=BP(),n=xi(),r=ZP(),o=FH(),i=x0(),s=1,a=2,l="[object Boolean]",u="[object Date]",c="[object Error]",d="[object Map]",f="[object Number]",h="[object RegExp]",g="[object Set]",m="[object String]",b="[object Symbol]",v="[object ArrayBuffer]",w="[object DataView]",x=e?e.prototype:void 0,_=x?x.valueOf:void 0;function C(S,E,k,T,I,P,j){switch(k){case w:if(S.byteLength!=E.byteLength||S.byteOffset!=E.byteOffset)return!1;S=S.buffer,E=E.buffer;case v:return!(S.byteLength!=E.byteLength||!P(new t(S),new t(E)));case l:case u:case f:return n(+S,+E);case c:return S.name==E.name&&S.message==E.message;case h:case m:return S==E+"";case d:var $=o;case g:var R=T&s;if($||($=i),S.size!=E.size&&!R)return!1;var L=j.get(S);if(L)return L==E;T|=a,j.set(S,E);var M=r($(S),$(E),T,I,P,j);return j.delete(S),M;case b:if(_)return _.call(S)==_.call(E)}return!1}return Ph=C,Ph}var Th,W_;function BH(){if(W_)return Th;W_=1;var e=FP(),t=1,n=Object.prototype,r=n.hasOwnProperty;function o(i,s,a,l,u,c){var d=a&t,f=e(i),h=f.length,g=e(s),m=g.length;if(h!=m&&!d)return!1;for(var b=h;b--;){var v=f[b];if(!(d?v in s:r.call(s,v)))return!1}var w=c.get(i),x=c.get(s);if(w&&x)return w==s&&x==i;var _=!0;c.set(i,s),c.set(s,i);for(var C=d;++b<h;){v=f[b];var S=i[v],E=s[v];if(l)var k=d?l(E,S,v,s,i,c):l(S,E,v,i,s,c);if(!(k===void 0?S===E||u(S,E,a,l,c):k)){_=!1;break}C||(C=v=="constructor")}if(_&&!C){var T=i.constructor,I=s.constructor;T!=I&&"constructor"in i&&"constructor"in s&&!(typeof T=="function"&&T instanceof T&&typeof I=="function"&&I instanceof I)&&(_=!1)}return c.delete(i),c.delete(s),_}return Th=o,Th}var Ah,U_;function HH(){if(U_)return Ah;U_=1;var e=Vu(),t=ZP(),n=qH(),r=BH(),o=_i(),i=Le(),s=bi(),a=ra(),l=1,u="[object Arguments]",c="[object Array]",d="[object Object]",f=Object.prototype,h=f.hasOwnProperty;function g(m,b,v,w,x,_){var C=i(m),S=i(b),E=C?c:o(m),k=S?c:o(b);E=E==u?d:E,k=k==u?d:k;var T=E==d,I=k==d,P=E==k;if(P&&s(m)){if(!s(b))return!1;C=!0,T=!1}if(P&&!T)return _||(_=new e),C||a(m)?t(m,b,v,w,x,_):n(m,b,E,v,w,x,_);if(!(v&l)){var j=T&&h.call(m,"__wrapped__"),$=I&&h.call(b,"__wrapped__");if(j||$){var R=j?m.value():m,L=$?b.value():b;return _||(_=new e),x(R,L,v,w,_)}}return P?(_||(_=new e),r(m,b,v,w,x,_)):!1}return Ah=g,Ah}var Mh,G_;function JP(){if(G_)return Mh;G_=1;var e=HH(),t=pn();function n(r,o,i,s,a){return r===o?!0:r==null||o==null||!t(r)&&!t(o)?r!==r&&o!==o:e(r,o,i,s,n,a)}return Mh=n,Mh}var Ih,Y_;function VH(){if(Y_)return Ih;Y_=1;var e=Vu(),t=JP(),n=1,r=2;function o(i,s,a,l){var u=a.length,c=u,d=!l;if(i==null)return!c;for(i=Object(i);u--;){var f=a[u];if(d&&f[2]?f[1]!==i[f[0]]:!(f[0]in i))return!1}for(;++u<c;){f=a[u];var h=f[0],g=i[h],m=f[1];if(d&&f[2]){if(g===void 0&&!(h in i))return!1}else{var b=new e;if(l)var v=l(g,m,h,i,s,b);if(!(v===void 0?t(m,g,n|r,l,b):v))return!1}}return!0}return Ih=o,Ih}var jh,K_;function eT(){if(K_)return jh;K_=1;var e=Rt();function t(n){return n===n&&!e(n)}return jh=t,jh}var Oh,X_;function WH(){if(X_)return Oh;X_=1;var e=eT(),t=kr();function n(r){for(var o=t(r),i=o.length;i--;){var s=o[i],a=r[s];o[i]=[s,a,e(a)]}return o}return Oh=n,Oh}var Lh,Q_;function tT(){if(Q_)return Lh;Q_=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return Lh=e,Lh}var Dh,Z_;function UH(){if(Z_)return Dh;Z_=1;var e=VH(),t=WH(),n=tT();function r(o){var i=t(o);return i.length==1&&i[0][2]?n(i[0][0],i[0][1]):function(s){return s===o||e(s,o,i)}}return Dh=r,Dh}var $h,J_;function Si(){if(J_)return $h;J_=1;var e=lo(),t=pn(),n="[object Symbol]";function r(o){return typeof o=="symbol"||t(o)&&e(o)==n}return $h=r,$h}var zh,eS;function w0(){if(eS)return zh;eS=1;var e=Le(),t=Si(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function o(i,s){if(e(i))return!1;var a=typeof i;return a=="number"||a=="symbol"||a=="boolean"||i==null||t(i)?!0:r.test(i)||!n.test(i)||s!=null&&i in Object(s)}return zh=o,zh}var Fh,tS;function GH(){if(tS)return Fh;tS=1;var e=l0(),t="Expected a function";function n(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var i=function(){var s=arguments,a=o?o.apply(this,s):s[0],l=i.cache;if(l.has(a))return l.get(a);var u=r.apply(this,s);return i.cache=l.set(a,u)||l,u};return i.cache=new(n.Cache||e),i}return n.Cache=e,Fh=n,Fh}var qh,nS;function YH(){if(nS)return qh;nS=1;var e=GH(),t=500;function n(r){var o=e(r,function(s){return i.size===t&&i.clear(),s}),i=o.cache;return o}return qh=n,qh}var Bh,rS;function KH(){if(rS)return Bh;rS=1;var e=YH(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(o){var i=[];return o.charCodeAt(0)===46&&i.push(""),o.replace(t,function(s,a,l,u){i.push(l?u.replace(n,"$1"):a||s)}),i});return Bh=r,Bh}var Hh,oS;function Zu(){if(oS)return Hh;oS=1;function e(t,n){for(var r=-1,o=t==null?0:t.length,i=Array(o);++r<o;)i[r]=n(t[r],r,t);return i}return Hh=e,Hh}var Vh,iS;function XH(){if(iS)return Vh;iS=1;var e=wi(),t=Zu(),n=Le(),r=Si(),o=e?e.prototype:void 0,i=o?o.toString:void 0;function s(a){if(typeof a=="string")return a;if(n(a))return t(a,s)+"";if(r(a))return i?i.call(a):"";var l=a+"";return l=="0"&&1/a==-1/0?"-0":l}return Vh=s,Vh}var Wh,sS;function nT(){if(sS)return Wh;sS=1;var e=XH();function t(n){return n==null?"":e(n)}return Wh=t,Wh}var Uh,aS;function Ju(){if(aS)return Uh;aS=1;var e=Le(),t=w0(),n=KH(),r=nT();function o(i,s){return e(i)?i:t(i,s)?[i]:n(r(i))}return Uh=o,Uh}var Gh,lS;function oa(){if(lS)return Gh;lS=1;var e=Si();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return Gh=t,Gh}var Yh,uS;function ec(){if(uS)return Yh;uS=1;var e=Ju(),t=oa();function n(r,o){o=e(o,r);for(var i=0,s=o.length;r!=null&&i<s;)r=r[t(o[i++])];return i&&i==s?r:void 0}return Yh=n,Yh}var Kh,cS;function QH(){if(cS)return Kh;cS=1;var e=ec();function t(n,r,o){var i=n==null?void 0:e(n,r);return i===void 0?o:i}return Kh=t,Kh}var Xh,dS;function ZH(){if(dS)return Xh;dS=1;function e(t,n){return t!=null&&n in Object(t)}return Xh=e,Xh}var Qh,fS;function rT(){if(fS)return Qh;fS=1;var e=Ju(),t=na(),n=Le(),r=Gu(),o=c0(),i=oa();function s(a,l,u){l=e(l,a);for(var c=-1,d=l.length,f=!1;++c<d;){var h=i(l[c]);if(!(f=a!=null&&u(a,h)))break;a=a[h]}return f||++c!=d?f:(d=a==null?0:a.length,!!d&&o(d)&&r(h,d)&&(n(a)||t(a)))}return Qh=s,Qh}var Zh,hS;function oT(){if(hS)return Zh;hS=1;var e=ZH(),t=rT();function n(r,o){return r!=null&&t(r,o,e)}return Zh=n,Zh}var Jh,pS;function JH(){if(pS)return Jh;pS=1;var e=JP(),t=QH(),n=oT(),r=w0(),o=eT(),i=tT(),s=oa(),a=1,l=2;function u(c,d){return r(c)&&o(d)?i(s(c),d):function(f){var h=t(f,c);return h===void 0&&h===d?n(f,c):e(d,h,a|l)}}return Jh=u,Jh}var ep,mS;function iT(){if(mS)return ep;mS=1;function e(t){return function(n){return n==null?void 0:n[t]}}return ep=e,ep}var tp,gS;function eV(){if(gS)return tp;gS=1;var e=ec();function t(n){return function(r){return e(r,n)}}return tp=t,tp}var np,vS;function tV(){if(vS)return np;vS=1;var e=iT(),t=eV(),n=w0(),r=oa();function o(i){return n(i)?e(r(i)):t(i)}return np=o,np}var rp,yS;function Vn(){if(yS)return rp;yS=1;var e=UH(),t=JH(),n=fo(),r=Le(),o=tV();function i(s){return typeof s=="function"?s:s==null?n:typeof s=="object"?r(s)?t(s[0],s[1]):e(s):o(s)}return rp=i,rp}var op,xS;function sT(){if(xS)return op;xS=1;var e=LP(),t=LH(),n=Vn(),r=Le();function o(i,s){var a=r(i)?e:t;return a(i,n(s,3))}return op=o,op}var ip,wS;function nV(){if(wS)return ip;wS=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,o){return r!=null&&t.call(r,o)}return ip=n,ip}var sp,bS;function aT(){if(bS)return sp;bS=1;var e=nV(),t=rT();function n(r,o){return r!=null&&t(r,o,e)}return sp=n,sp}var ap,_S;function rV(){if(_S)return ap;_S=1;var e=f0(),t=_i(),n=na(),r=Le(),o=Hn(),i=bi(),s=Ku(),a=ra(),l="[object Map]",u="[object Set]",c=Object.prototype,d=c.hasOwnProperty;function f(h){if(h==null)return!0;if(o(h)&&(r(h)||typeof h=="string"||typeof h.splice=="function"||i(h)||a(h)||n(h)))return!h.length;var g=t(h);if(g==l||g==u)return!h.size;if(s(h))return!e(h).length;for(var m in h)if(d.call(h,m))return!1;return!0}return ap=f,ap}var lp,SS;function lT(){if(SS)return lp;SS=1;function e(t){return t===void 0}return lp=e,lp}var up,ES;function uT(){if(ES)return up;ES=1;var e=Qu(),t=Hn();function n(r,o){var i=-1,s=t(r)?Array(r.length):[];return e(r,function(a,l,u){s[++i]=o(a,l,u)}),s}return up=n,up}var cp,CS;function cT(){if(CS)return cp;CS=1;var e=Zu(),t=Vn(),n=uT(),r=Le();function o(i,s){var a=r(i)?e:n;return a(i,t(s,3))}return cp=o,cp}var dp,NS;function oV(){if(NS)return dp;NS=1;function e(t,n,r,o){var i=-1,s=t==null?0:t.length;for(o&&s&&(r=t[++i]);++i<s;)r=n(r,t[i],i,t);return r}return dp=e,dp}var fp,kS;function iV(){if(kS)return fp;kS=1;function e(t,n,r,o,i){return i(t,function(s,a,l){r=o?(o=!1,s):n(r,s,a,l)}),r}return fp=e,fp}var hp,RS;function dT(){if(RS)return hp;RS=1;var e=oV(),t=Qu(),n=Vn(),r=iV(),o=Le();function i(s,a,l){var u=o(s)?e:r,c=arguments.length<3;return u(s,n(a,4),l,c,t)}return hp=i,hp}var pp,PS;function sV(){if(PS)return pp;PS=1;var e=lo(),t=Le(),n=pn(),r="[object String]";function o(i){return typeof i=="string"||!t(i)&&n(i)&&e(i)==r}return pp=o,pp}var mp,TS;function aV(){if(TS)return mp;TS=1;var e=iT(),t=e("length");return mp=t,mp}var gp,AS;function lV(){if(AS)return gp;AS=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,i="\\ufe0e\\ufe0f",s="\\u200d",a=RegExp("["+s+e+o+i+"]");function l(u){return a.test(u)}return gp=l,gp}var vp,MS;function uV(){if(MS)return vp;MS=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",o=t+n+r,i="\\ufe0e\\ufe0f",s="["+e+"]",a="["+o+"]",l="\\ud83c[\\udffb-\\udfff]",u="(?:"+a+"|"+l+")",c="[^"+e+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",g=u+"?",m="["+i+"]?",b="(?:"+h+"(?:"+[c,d,f].join("|")+")"+m+g+")*",v=m+g+b,w="(?:"+[c+a+"?",a,d,f,s].join("|")+")",x=RegExp(l+"(?="+l+")|"+w+v,"g");function _(C){for(var S=x.lastIndex=0;x.test(C);)++S;return S}return vp=_,vp}var yp,IS;function cV(){if(IS)return yp;IS=1;var e=aV(),t=lV(),n=uV();function r(o){return t(o)?n(o):e(o)}return yp=r,yp}var xp,jS;function dV(){if(jS)return xp;jS=1;var e=f0(),t=_i(),n=Hn(),r=sV(),o=cV(),i="[object Map]",s="[object Set]";function a(l){if(l==null)return 0;if(n(l))return r(l)?o(l):l.length;var u=t(l);return u==i||u==s?l.size:e(l).length}return xp=a,xp}var wp,OS;function fV(){if(OS)return wp;OS=1;var e=u0(),t=VP(),n=y0(),r=Vn(),o=Xu(),i=Le(),s=bi(),a=ea(),l=Rt(),u=ra();function c(d,f,h){var g=i(d),m=g||s(d)||u(d);if(f=r(f,4),h==null){var b=d&&d.constructor;m?h=g?new b:[]:l(d)?h=a(b)?t(o(d)):{}:h={}}return(m?e:n)(d,function(v,w,x){return f(h,v,w,x)}),h}return wp=c,wp}var bp,LS;function hV(){if(LS)return bp;LS=1;var e=wi(),t=na(),n=Le(),r=e?e.isConcatSpreadable:void 0;function o(i){return n(i)||t(i)||!!(r&&i&&i[r])}return bp=o,bp}var _p,DS;function b0(){if(DS)return _p;DS=1;var e=p0(),t=hV();function n(r,o,i,s,a){var l=-1,u=r.length;for(i||(i=t),a||(a=[]);++l<u;){var c=r[l];o>0&&i(c)?o>1?n(c,o-1,i,s,a):e(a,c):s||(a[a.length]=c)}return a}return _p=n,_p}var Sp,$S;function pV(){if($S)return Sp;$S=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return Sp=e,Sp}var Ep,zS;function fT(){if(zS)return Ep;zS=1;var e=pV(),t=Math.max;function n(r,o,i){return o=t(o===void 0?r.length-1:o,0),function(){for(var s=arguments,a=-1,l=t(s.length-o,0),u=Array(l);++a<l;)u[a]=s[o+a];a=-1;for(var c=Array(o+1);++a<o;)c[a]=s[a];return c[o]=i(u),e(r,this,c)}}return Ep=n,Ep}var Cp,FS;function mV(){if(FS)return Cp;FS=1;var e=g0(),t=AP(),n=fo(),r=t?function(o,i){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:n;return Cp=r,Cp}var Np,qS;function gV(){if(qS)return Np;qS=1;var e=800,t=16,n=Date.now;function r(o){var i=0,s=0;return function(){var a=n(),l=t-(a-s);if(s=a,l>0){if(++i>=e)return arguments[0]}else i=0;return o.apply(void 0,arguments)}}return Np=r,Np}var kp,BS;function hT(){if(BS)return kp;BS=1;var e=mV(),t=gV(),n=t(e);return kp=n,kp}var Rp,HS;function tc(){if(HS)return Rp;HS=1;var e=fo(),t=fT(),n=hT();function r(o,i){return n(t(o,i,e),o+"")}return Rp=r,Rp}var Pp,VS;function pT(){if(VS)return Pp;VS=1;function e(t,n,r,o){for(var i=t.length,s=r+(o?1:-1);o?s--:++s<i;)if(n(t[s],s,t))return s;return-1}return Pp=e,Pp}var Tp,WS;function vV(){if(WS)return Tp;WS=1;function e(t){return t!==t}return Tp=e,Tp}var Ap,US;function yV(){if(US)return Ap;US=1;function e(t,n,r){for(var o=r-1,i=t.length;++o<i;)if(t[o]===n)return o;return-1}return Ap=e,Ap}var Mp,GS;function xV(){if(GS)return Mp;GS=1;var e=pT(),t=vV(),n=yV();function r(o,i,s){return i===i?n(o,i,s):e(o,t,s)}return Mp=r,Mp}var Ip,YS;function wV(){if(YS)return Ip;YS=1;var e=xV();function t(n,r){var o=n==null?0:n.length;return!!o&&e(n,r,0)>-1}return Ip=t,Ip}var jp,KS;function bV(){if(KS)return jp;KS=1;function e(t,n,r){for(var o=-1,i=t==null?0:t.length;++o<i;)if(r(n,t[o]))return!0;return!1}return jp=e,jp}var Op,XS;function _V(){if(XS)return Op;XS=1;function e(){}return Op=e,Op}var Lp,QS;function SV(){if(QS)return Lp;QS=1;var e=qP(),t=_V(),n=x0(),r=1/0,o=e&&1/n(new e([,-0]))[1]==r?function(i){return new e(i)}:t;return Lp=o,Lp}var Dp,ZS;function EV(){if(ZS)return Dp;ZS=1;var e=XP(),t=wV(),n=bV(),r=QP(),o=SV(),i=x0(),s=200;function a(l,u,c){var d=-1,f=t,h=l.length,g=!0,m=[],b=m;if(c)g=!1,f=n;else if(h>=s){var v=u?null:o(l);if(v)return i(v);g=!1,f=r,b=new e}else b=u?[]:m;e:for(;++d<h;){var w=l[d],x=u?u(w):w;if(w=c||w!==0?w:0,g&&x===x){for(var _=b.length;_--;)if(b[_]===x)continue e;u&&b.push(x),m.push(w)}else f(b,x,c)||(b!==m&&b.push(x),m.push(w))}return m}return Dp=a,Dp}var $p,JS;function mT(){if(JS)return $p;JS=1;var e=Hn(),t=pn();function n(r){return t(r)&&e(r)}return $p=n,$p}var zp,eE;function CV(){if(eE)return zp;eE=1;var e=b0(),t=tc(),n=EV(),r=mT(),o=t(function(i){return n(e(i,1,r,!0))});return zp=o,zp}var Fp,tE;function NV(){if(tE)return Fp;tE=1;var e=Zu();function t(n,r){return e(r,function(o){return n[o]})}return Fp=t,Fp}var qp,nE;function gT(){if(nE)return qp;nE=1;var e=NV(),t=kr();function n(r){return r==null?[]:e(r,t(r))}return qp=n,qp}var Bp,rE;function Pt(){if(rE)return Bp;rE=1;var e;if(typeof s0=="function")try{e={clone:IH(),constant:g0(),each:KP(),filter:sT(),has:aT(),isArray:Le(),isEmpty:rV(),isFunction:ea(),isUndefined:lT(),keys:kr(),map:cT(),reduce:dT(),size:dV(),transform:fV(),union:CV(),values:gT()}}catch{}return e||(e=window._),Bp=e,Bp}var Hp,oE;function _0(){if(oE)return Hp;oE=1;var e=Pt();Hp=o;var t="\0",n="\0",r="";function o(c){this._isDirected=e.has(c,"directed")?c.directed:!0,this._isMultigraph=e.has(c,"multigraph")?c.multigraph:!1,this._isCompound=e.has(c,"compound")?c.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(c){return this._label=c,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(c){return e.isFunction(c)||(c=e.constant(c)),this._defaultNodeLabelFn=c,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return e.keys(this._nodes)},o.prototype.sources=function(){var c=this;return e.filter(this.nodes(),function(d){return e.isEmpty(c._in[d])})},o.prototype.sinks=function(){var c=this;return e.filter(this.nodes(),function(d){return e.isEmpty(c._out[d])})},o.prototype.setNodes=function(c,d){var f=arguments,h=this;return e.each(c,function(g){f.length>1?h.setNode(g,d):h.setNode(g)}),this},o.prototype.setNode=function(c,d){return e.has(this._nodes,c)?(arguments.length>1&&(this._nodes[c]=d),this):(this._nodes[c]=arguments.length>1?d:this._defaultNodeLabelFn(c),this._isCompound&&(this._parent[c]=n,this._children[c]={},this._children[n][c]=!0),this._in[c]={},this._preds[c]={},this._out[c]={},this._sucs[c]={},++this._nodeCount,this)},o.prototype.node=function(c){return this._nodes[c]},o.prototype.hasNode=function(c){return e.has(this._nodes,c)},o.prototype.removeNode=function(c){var d=this;if(e.has(this._nodes,c)){var f=function(h){d.removeEdge(d._edgeObjs[h])};delete this._nodes[c],this._isCompound&&(this._removeFromParentsChildList(c),delete this._parent[c],e.each(this.children(c),function(h){d.setParent(h)}),delete this._children[c]),e.each(e.keys(this._in[c]),f),delete this._in[c],delete this._preds[c],e.each(e.keys(this._out[c]),f),delete this._out[c],delete this._sucs[c],--this._nodeCount}return this},o.prototype.setParent=function(c,d){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(d))d=n;else{d+="";for(var f=d;!e.isUndefined(f);f=this.parent(f))if(f===c)throw new Error("Setting "+d+" as parent of "+c+" would create a cycle");this.setNode(d)}return this.setNode(c),this._removeFromParentsChildList(c),this._parent[c]=d,this._children[d][c]=!0,this},o.prototype._removeFromParentsChildList=function(c){delete this._children[this._parent[c]][c]},o.prototype.parent=function(c){if(this._isCompound){var d=this._parent[c];if(d!==n)return d}},o.prototype.children=function(c){if(e.isUndefined(c)&&(c=n),this._isCompound){var d=this._children[c];if(d)return e.keys(d)}else{if(c===n)return this.nodes();if(this.hasNode(c))return[]}},o.prototype.predecessors=function(c){var d=this._preds[c];if(d)return e.keys(d)},o.prototype.successors=function(c){var d=this._sucs[c];if(d)return e.keys(d)},o.prototype.neighbors=function(c){var d=this.predecessors(c);if(d)return e.union(d,this.successors(c))},o.prototype.isLeaf=function(c){var d;return this.isDirected()?d=this.successors(c):d=this.neighbors(c),d.length===0},o.prototype.filterNodes=function(c){var d=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});d.setGraph(this.graph());var f=this;e.each(this._nodes,function(m,b){c(b)&&d.setNode(b,m)}),e.each(this._edgeObjs,function(m){d.hasNode(m.v)&&d.hasNode(m.w)&&d.setEdge(m,f.edge(m))});var h={};function g(m){var b=f.parent(m);return b===void 0||d.hasNode(b)?(h[m]=b,b):b in h?h[b]:g(b)}return this._isCompound&&e.each(d.nodes(),function(m){d.setParent(m,g(m))}),d},o.prototype.setDefaultEdgeLabel=function(c){return e.isFunction(c)||(c=e.constant(c)),this._defaultEdgeLabelFn=c,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return e.values(this._edgeObjs)},o.prototype.setPath=function(c,d){var f=this,h=arguments;return e.reduce(c,function(g,m){return h.length>1?f.setEdge(g,m,d):f.setEdge(g,m),m}),this},o.prototype.setEdge=function(){var c,d,f,h,g=!1,m=arguments[0];typeof m=="object"&&m!==null&&"v"in m?(c=m.v,d=m.w,f=m.name,arguments.length===2&&(h=arguments[1],g=!0)):(c=m,d=arguments[1],f=arguments[3],arguments.length>2&&(h=arguments[2],g=!0)),c=""+c,d=""+d,e.isUndefined(f)||(f=""+f);var b=a(this._isDirected,c,d,f);if(e.has(this._edgeLabels,b))return g&&(this._edgeLabels[b]=h),this;if(!e.isUndefined(f)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(c),this.setNode(d),this._edgeLabels[b]=g?h:this._defaultEdgeLabelFn(c,d,f);var v=l(this._isDirected,c,d,f);return c=v.v,d=v.w,Object.freeze(v),this._edgeObjs[b]=v,i(this._preds[d],c),i(this._sucs[c],d),this._in[d][b]=v,this._out[c][b]=v,this._edgeCount++,this},o.prototype.edge=function(c,d,f){var h=arguments.length===1?u(this._isDirected,arguments[0]):a(this._isDirected,c,d,f);return this._edgeLabels[h]},o.prototype.hasEdge=function(c,d,f){var h=arguments.length===1?u(this._isDirected,arguments[0]):a(this._isDirected,c,d,f);return e.has(this._edgeLabels,h)},o.prototype.removeEdge=function(c,d,f){var h=arguments.length===1?u(this._isDirected,arguments[0]):a(this._isDirected,c,d,f),g=this._edgeObjs[h];return g&&(c=g.v,d=g.w,delete this._edgeLabels[h],delete this._edgeObjs[h],s(this._preds[d],c),s(this._sucs[c],d),delete this._in[d][h],delete this._out[c][h],this._edgeCount--),this},o.prototype.inEdges=function(c,d){var f=this._in[c];if(f){var h=e.values(f);return d?e.filter(h,function(g){return g.v===d}):h}},o.prototype.outEdges=function(c,d){var f=this._out[c];if(f){var h=e.values(f);return d?e.filter(h,function(g){return g.w===d}):h}},o.prototype.nodeEdges=function(c,d){var f=this.inEdges(c,d);if(f)return f.concat(this.outEdges(c,d))};function i(c,d){c[d]?c[d]++:c[d]=1}function s(c,d){--c[d]||delete c[d]}function a(c,d,f,h){var g=""+d,m=""+f;if(!c&&g>m){var b=g;g=m,m=b}return g+r+m+r+(e.isUndefined(h)?t:h)}function l(c,d,f,h){var g=""+d,m=""+f;if(!c&&g>m){var b=g;g=m,m=b}var v={v:g,w:m};return h&&(v.name=h),v}function u(c,d){return a(c,d.v,d.w,d.name)}return Hp}var Vp,iE;function kV(){return iE||(iE=1,Vp="2.1.8"),Vp}var Wp,sE;function RV(){return sE||(sE=1,Wp={Graph:_0(),version:kV()}),Wp}var Up,aE;function PV(){if(aE)return Up;aE=1;var e=Pt(),t=_0();Up={write:n,read:i};function n(s){var a={options:{directed:s.isDirected(),multigraph:s.isMultigraph(),compound:s.isCompound()},nodes:r(s),edges:o(s)};return e.isUndefined(s.graph())||(a.value=e.clone(s.graph())),a}function r(s){return e.map(s.nodes(),function(a){var l=s.node(a),u=s.parent(a),c={v:a};return e.isUndefined(l)||(c.value=l),e.isUndefined(u)||(c.parent=u),c})}function o(s){return e.map(s.edges(),function(a){var l=s.edge(a),u={v:a.v,w:a.w};return e.isUndefined(a.name)||(u.name=a.name),e.isUndefined(l)||(u.value=l),u})}function i(s){var a=new t(s.options).setGraph(s.value);return e.each(s.nodes,function(l){a.setNode(l.v,l.value),l.parent&&a.setParent(l.v,l.parent)}),e.each(s.edges,function(l){a.setEdge({v:l.v,w:l.w,name:l.name},l.value)}),a}return Up}var Gp,lE;function TV(){if(lE)return Gp;lE=1;var e=Pt();Gp=t;function t(n){var r={},o=[],i;function s(a){e.has(r,a)||(r[a]=!0,i.push(a),e.each(n.successors(a),s),e.each(n.predecessors(a),s))}return e.each(n.nodes(),function(a){i=[],s(a),i.length&&o.push(i)}),o}return Gp}var Yp,uE;function vT(){if(uE)return Yp;uE=1;var e=Pt();Yp=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var o=this._keyIndices;if(n=String(n),!e.has(o,n)){var i=this._arr,s=i.length;return o[n]=s,i.push({key:n,priority:r}),this._decrease(s),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,r){var o=this._keyIndices[n];if(r>this._arr[o].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[o].priority+" New: "+r);this._arr[o].priority=r,this._decrease(o)},t.prototype._heapify=function(n){var r=this._arr,o=2*n,i=o+1,s=n;o<r.length&&(s=r[o].priority<r[s].priority?o:s,i<r.length&&(s=r[i].priority<r[s].priority?i:s),s!==n&&(this._swap(n,s),this._heapify(s)))},t.prototype._decrease=function(n){for(var r=this._arr,o=r[n].priority,i;n!==0&&(i=n>>1,!(r[i].priority<o));)this._swap(n,i),n=i},t.prototype._swap=function(n,r){var o=this._arr,i=this._keyIndices,s=o[n],a=o[r];o[n]=a,o[r]=s,i[a.key]=n,i[s.key]=r},Yp}var Kp,cE;function yT(){if(cE)return Kp;cE=1;var e=Pt(),t=vT();Kp=r;var n=e.constant(1);function r(i,s,a,l){return o(i,String(s),a||n,l||function(u){return i.outEdges(u)})}function o(i,s,a,l){var u={},c=new t,d,f,h=function(g){var m=g.v!==d?g.v:g.w,b=u[m],v=a(g),w=f.distance+v;if(v<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+g+" Weight: "+v);w<b.distance&&(b.distance=w,b.predecessor=d,c.decrease(m,w))};for(i.nodes().forEach(function(g){var m=g===s?0:Number.POSITIVE_INFINITY;u[g]={distance:m},c.add(g,m)});c.size()>0&&(d=c.removeMin(),f=u[d],f.distance!==Number.POSITIVE_INFINITY);)l(d).forEach(h);return u}return Kp}var Xp,dE;function AV(){if(dE)return Xp;dE=1;var e=yT(),t=Pt();Xp=n;function n(r,o,i){return t.transform(r.nodes(),function(s,a){s[a]=e(r,a,o,i)},{})}return Xp}var Qp,fE;function xT(){if(fE)return Qp;fE=1;var e=Pt();Qp=t;function t(n){var r=0,o=[],i={},s=[];function a(l){var u=i[l]={onStack:!0,lowlink:r,index:r++};if(o.push(l),n.successors(l).forEach(function(f){e.has(i,f)?i[f].onStack&&(u.lowlink=Math.min(u.lowlink,i[f].index)):(a(f),u.lowlink=Math.min(u.lowlink,i[f].lowlink))}),u.lowlink===u.index){var c=[],d;do d=o.pop(),i[d].onStack=!1,c.push(d);while(l!==d);s.push(c)}}return n.nodes().forEach(function(l){e.has(i,l)||a(l)}),s}return Qp}var Zp,hE;function MV(){if(hE)return Zp;hE=1;var e=Pt(),t=xT();Zp=n;function n(r){return e.filter(t(r),function(o){return o.length>1||o.length===1&&r.hasEdge(o[0],o[0])})}return Zp}var Jp,pE;function IV(){if(pE)return Jp;pE=1;var e=Pt();Jp=n;var t=e.constant(1);function n(o,i,s){return r(o,i||t,s||function(a){return o.outEdges(a)})}function r(o,i,s){var a={},l=o.nodes();return l.forEach(function(u){a[u]={},a[u][u]={distance:0},l.forEach(function(c){u!==c&&(a[u][c]={distance:Number.POSITIVE_INFINITY})}),s(u).forEach(function(c){var d=c.v===u?c.w:c.v,f=i(c);a[u][d]={distance:f,predecessor:u}})}),l.forEach(function(u){var c=a[u];l.forEach(function(d){var f=a[d];l.forEach(function(h){var g=f[u],m=c[h],b=f[h],v=g.distance+m.distance;v<b.distance&&(b.distance=v,b.predecessor=m.predecessor)})})}),a}return Jp}var em,mE;function wT(){if(mE)return em;mE=1;var e=Pt();em=t,t.CycleException=n;function t(r){var o={},i={},s=[];function a(l){if(e.has(i,l))throw new n;e.has(o,l)||(i[l]=!0,o[l]=!0,e.each(r.predecessors(l),a),delete i[l],s.push(l))}if(e.each(r.sinks(),a),e.size(o)!==r.nodeCount())throw new n;return s}function n(){}return n.prototype=new Error,em}var tm,gE;function jV(){if(gE)return tm;gE=1;var e=wT();tm=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return tm}var nm,vE;function bT(){if(vE)return nm;vE=1;var e=Pt();nm=t;function t(r,o,i){e.isArray(o)||(o=[o]);var s=(r.isDirected()?r.successors:r.neighbors).bind(r),a=[],l={};return e.each(o,function(u){if(!r.hasNode(u))throw new Error("Graph does not have node: "+u);n(r,u,i==="post",l,s,a)}),a}function n(r,o,i,s,a,l){e.has(s,o)||(s[o]=!0,i||l.push(o),e.each(a(o),function(u){n(r,u,i,s,a,l)}),i&&l.push(o))}return nm}var rm,yE;function OV(){if(yE)return rm;yE=1;var e=bT();rm=t;function t(n,r){return e(n,r,"post")}return rm}var om,xE;function LV(){if(xE)return om;xE=1;var e=bT();om=t;function t(n,r){return e(n,r,"pre")}return om}var im,wE;function DV(){if(wE)return im;wE=1;var e=Pt(),t=_0(),n=vT();im=r;function r(o,i){var s=new t,a={},l=new n,u;function c(f){var h=f.v===u?f.w:f.v,g=l.priority(h);if(g!==void 0){var m=i(f);m<g&&(a[h]=u,l.decrease(h,m))}}if(o.nodeCount()===0)return s;e.each(o.nodes(),function(f){l.add(f,Number.POSITIVE_INFINITY),s.setNode(f)}),l.decrease(o.nodes()[0],0);for(var d=!1;l.size()>0;){if(u=l.removeMin(),e.has(a,u))s.setEdge(u,a[u]);else{if(d)throw new Error("Input graph is not connected: "+o);d=!0}o.nodeEdges(u).forEach(c)}return s}return im}var sm,bE;function $V(){return bE||(bE=1,sm={components:TV(),dijkstra:yT(),dijkstraAll:AV(),findCycles:MV(),floydWarshall:IV(),isAcyclic:jV(),postorder:OV(),preorder:LV(),prim:DV(),tarjan:xT(),topsort:wT()}),sm}var am,_E;function zV(){if(_E)return am;_E=1;var e=RV();return am={Graph:e.Graph,json:PV(),alg:$V(),version:e.version},am}var Xl;if(typeof s0=="function")try{Xl=zV()}catch{}Xl||(Xl=window.graphlib);var Gt=Xl,lm,SE;function FV(){if(SE)return lm;SE=1;var e=UP(),t=1,n=4;function r(o){return e(o,t|n)}return lm=r,lm}var um,EE;function nc(){if(EE)return um;EE=1;var e=xi(),t=Hn(),n=Gu(),r=Rt();function o(i,s,a){if(!r(a))return!1;var l=typeof s;return(l=="number"?t(a)&&n(s,a.length):l=="string"&&s in a)?e(a[s],i):!1}return um=o,um}var cm,CE;function qV(){if(CE)return cm;CE=1;var e=tc(),t=xi(),n=nc(),r=co(),o=Object.prototype,i=o.hasOwnProperty,s=e(function(a,l){a=Object(a);var u=-1,c=l.length,d=c>2?l[2]:void 0;for(d&&n(l[0],l[1],d)&&(c=1);++u<c;)for(var f=l[u],h=r(f),g=-1,m=h.length;++g<m;){var b=h[g],v=a[b];(v===void 0||t(v,o[b])&&!i.call(a,b))&&(a[b]=f[b])}return a});return cm=s,cm}var dm,NE;function BV(){if(NE)return dm;NE=1;var e=Vn(),t=Hn(),n=kr();function r(o){return function(i,s,a){var l=Object(i);if(!t(i)){var u=e(s,3);i=n(i),s=function(d){return u(l[d],d,l)}}var c=o(i,s,a);return c>-1?l[u?i[c]:c]:void 0}}return dm=r,dm}var fm,kE;function HV(){if(kE)return fm;kE=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return fm=t,fm}var hm,RE;function VV(){if(RE)return hm;RE=1;var e=HV(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return hm=n,hm}var pm,PE;function WV(){if(PE)return pm;PE=1;var e=VV(),t=Rt(),n=Si(),r=NaN,o=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt;function l(u){if(typeof u=="number")return u;if(n(u))return r;if(t(u)){var c=typeof u.valueOf=="function"?u.valueOf():u;u=t(c)?c+"":c}if(typeof u!="string")return u===0?u:+u;u=e(u);var d=i.test(u);return d||s.test(u)?a(u.slice(2),d?2:8):o.test(u)?r:+u}return pm=l,pm}var mm,TE;function _T(){if(TE)return mm;TE=1;var e=WV(),t=1/0,n=17976931348623157e292;function r(o){if(!o)return o===0?o:0;if(o=e(o),o===t||o===-t){var i=o<0?-1:1;return i*n}return o===o?o:0}return mm=r,mm}var gm,AE;function UV(){if(AE)return gm;AE=1;var e=_T();function t(n){var r=e(n),o=r%1;return r===r?o?r-o:r:0}return gm=t,gm}var vm,ME;function GV(){if(ME)return vm;ME=1;var e=pT(),t=Vn(),n=UV(),r=Math.max;function o(i,s,a){var l=i==null?0:i.length;if(!l)return-1;var u=a==null?0:n(a);return u<0&&(u=r(l+u,0)),e(i,t(s,3),u)}return vm=o,vm}var ym,IE;function YV(){if(IE)return ym;IE=1;var e=BV(),t=GV(),n=e(t);return ym=n,ym}var xm,jE;function ST(){if(jE)return xm;jE=1;var e=b0();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return xm=t,xm}var wm,OE;function KV(){if(OE)return wm;OE=1;var e=v0(),t=GP(),n=co();function r(o,i){return o==null?o:e(o,t(i),n)}return wm=r,wm}var bm,LE;function XV(){if(LE)return bm;LE=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return bm=e,bm}var _m,DE;function QV(){if(DE)return _m;DE=1;var e=Wu(),t=y0(),n=Vn();function r(o,i){var s={};return i=n(i,3),t(o,function(a,l,u){e(s,l,i(a,l,u))}),s}return _m=r,_m}var Sm,$E;function S0(){if($E)return Sm;$E=1;var e=Si();function t(n,r,o){for(var i=-1,s=n.length;++i<s;){var a=n[i],l=r(a);if(l!=null&&(u===void 0?l===l&&!e(l):o(l,u)))var u=l,c=a}return c}return Sm=t,Sm}var Em,zE;function ZV(){if(zE)return Em;zE=1;function e(t,n){return t>n}return Em=e,Em}var Cm,FE;function JV(){if(FE)return Cm;FE=1;var e=S0(),t=ZV(),n=fo();function r(o){return o&&o.length?e(o,n,t):void 0}return Cm=r,Cm}var Nm,qE;function ET(){if(qE)return Nm;qE=1;var e=Wu(),t=xi();function n(r,o,i){(i!==void 0&&!t(r[o],i)||i===void 0&&!(o in r))&&e(r,o,i)}return Nm=n,Nm}var km,BE;function e6(){if(BE)return km;BE=1;var e=lo(),t=Xu(),n=pn(),r="[object Object]",o=Function.prototype,i=Object.prototype,s=o.toString,a=i.hasOwnProperty,l=s.call(Object);function u(c){if(!n(c)||e(c)!=r)return!1;var d=t(c);if(d===null)return!0;var f=a.call(d,"constructor")&&d.constructor;return typeof f=="function"&&f instanceof f&&s.call(f)==l}return km=u,km}var Rm,HE;function CT(){if(HE)return Rm;HE=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return Rm=e,Rm}var Pm,VE;function t6(){if(VE)return Pm;VE=1;var e=ta(),t=co();function n(r){return e(r,t(r))}return Pm=n,Pm}var Tm,WE;function n6(){if(WE)return Tm;WE=1;var e=ET(),t=jP(),n=HP(),r=OP(),o=WP(),i=na(),s=Le(),a=mT(),l=bi(),u=ea(),c=Rt(),d=e6(),f=ra(),h=CT(),g=t6();function m(b,v,w,x,_,C,S){var E=h(b,w),k=h(v,w),T=S.get(k);if(T){e(b,w,T);return}var I=C?C(E,k,w+"",b,v,S):void 0,P=I===void 0;if(P){var j=s(k),$=!j&&l(k),R=!j&&!$&&f(k);I=k,j||$||R?s(E)?I=E:a(E)?I=r(E):$?(P=!1,I=t(k,!0)):R?(P=!1,I=n(k,!0)):I=[]:d(k)||i(k)?(I=E,i(E)?I=g(E):(!c(E)||u(E))&&(I=o(k))):P=!1}P&&(S.set(k,I),_(I,k,x,C,S),S.delete(k)),e(b,w,I)}return Tm=m,Tm}var Am,UE;function r6(){if(UE)return Am;UE=1;var e=Vu(),t=ET(),n=v0(),r=n6(),o=Rt(),i=co(),s=CT();function a(l,u,c,d,f){l!==u&&n(u,function(h,g){if(f||(f=new e),o(h))r(l,u,g,c,a,d,f);else{var m=d?d(s(l,g),h,g+"",l,u,f):void 0;m===void 0&&(m=h),t(l,g,m)}},i)}return Am=a,Am}var Mm,GE;function o6(){if(GE)return Mm;GE=1;var e=tc(),t=nc();function n(r){return e(function(o,i){var s=-1,a=i.length,l=a>1?i[a-1]:void 0,u=a>2?i[2]:void 0;for(l=r.length>3&&typeof l=="function"?(a--,l):void 0,u&&t(i[0],i[1],u)&&(l=a<3?void 0:l,a=1),o=Object(o);++s<a;){var c=i[s];c&&r(o,c,s,l)}return o})}return Mm=n,Mm}var Im,YE;function i6(){if(YE)return Im;YE=1;var e=r6(),t=o6(),n=t(function(r,o,i){e(r,o,i)});return Im=n,Im}var jm,KE;function NT(){if(KE)return jm;KE=1;function e(t,n){return t<n}return jm=e,jm}var Om,XE;function s6(){if(XE)return Om;XE=1;var e=S0(),t=NT(),n=fo();function r(o){return o&&o.length?e(o,n,t):void 0}return Om=r,Om}var Lm,QE;function a6(){if(QE)return Lm;QE=1;var e=S0(),t=Vn(),n=NT();function r(o,i){return o&&o.length?e(o,t(i,2),n):void 0}return Lm=r,Lm}var Dm,ZE;function l6(){if(ZE)return Dm;ZE=1;var e=Ut(),t=function(){return e.Date.now()};return Dm=t,Dm}var $m,JE;function u6(){if(JE)return $m;JE=1;var e=Uu(),t=Ju(),n=Gu(),r=Rt(),o=oa();function i(s,a,l,u){if(!r(s))return s;a=t(a,s);for(var c=-1,d=a.length,f=d-1,h=s;h!=null&&++c<d;){var g=o(a[c]),m=l;if(g==="__proto__"||g==="constructor"||g==="prototype")return s;if(c!=f){var b=h[g];m=u?u(b,g,h):void 0,m===void 0&&(m=r(b)?b:n(a[c+1])?[]:{})}e(h,g,m),h=h[g]}return s}return $m=i,$m}var zm,eC;function c6(){if(eC)return zm;eC=1;var e=ec(),t=u6(),n=Ju();function r(o,i,s){for(var a=-1,l=i.length,u={};++a<l;){var c=i[a],d=e(o,c);s(d,c)&&t(u,n(c,o),d)}return u}return zm=r,zm}var Fm,tC;function d6(){if(tC)return Fm;tC=1;var e=c6(),t=oT();function n(r,o){return e(r,o,function(i,s){return t(r,s)})}return Fm=n,Fm}var qm,nC;function f6(){if(nC)return qm;nC=1;var e=ST(),t=fT(),n=hT();function r(o){return n(t(o,void 0,e),o+"")}return qm=r,qm}var Bm,rC;function h6(){if(rC)return Bm;rC=1;var e=d6(),t=f6(),n=t(function(r,o){return r==null?{}:e(r,o)});return Bm=n,Bm}var Hm,oC;function p6(){if(oC)return Hm;oC=1;var e=Math.ceil,t=Math.max;function n(r,o,i,s){for(var a=-1,l=t(e((o-r)/(i||1)),0),u=Array(l);l--;)u[s?l:++a]=r,r+=i;return u}return Hm=n,Hm}var Vm,iC;function m6(){if(iC)return Vm;iC=1;var e=p6(),t=nc(),n=_T();function r(o){return function(i,s,a){return a&&typeof a!="number"&&t(i,s,a)&&(s=a=void 0),i=n(i),s===void 0?(s=i,i=0):s=n(s),a=a===void 0?i<s?1:-1:n(a),e(i,s,a,o)}}return Vm=r,Vm}var Wm,sC;function g6(){if(sC)return Wm;sC=1;var e=m6(),t=e();return Wm=t,Wm}var Um,aC;function v6(){if(aC)return Um;aC=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return Um=e,Um}var Gm,lC;function y6(){if(lC)return Gm;lC=1;var e=Si();function t(n,r){if(n!==r){var o=n!==void 0,i=n===null,s=n===n,a=e(n),l=r!==void 0,u=r===null,c=r===r,d=e(r);if(!u&&!d&&!a&&n>r||a&&l&&c&&!u&&!d||i&&l&&c||!o&&c||!s)return 1;if(!i&&!a&&!d&&n<r||d&&o&&s&&!i&&!a||u&&o&&s||!l&&s||!c)return-1}return 0}return Gm=t,Gm}var Ym,uC;function x6(){if(uC)return Ym;uC=1;var e=y6();function t(n,r,o){for(var i=-1,s=n.criteria,a=r.criteria,l=s.length,u=o.length;++i<l;){var c=e(s[i],a[i]);if(c){if(i>=u)return c;var d=o[i];return c*(d=="desc"?-1:1)}}return n.index-r.index}return Ym=t,Ym}var Km,cC;function w6(){if(cC)return Km;cC=1;var e=Zu(),t=ec(),n=Vn(),r=uT(),o=v6(),i=Yu(),s=x6(),a=fo(),l=Le();function u(c,d,f){d.length?d=e(d,function(m){return l(m)?function(b){return t(b,m.length===1?m[0]:m)}:m}):d=[a];var h=-1;d=e(d,i(n));var g=r(c,function(m,b,v){var w=e(d,function(x){return x(m)});return{criteria:w,index:++h,value:m}});return o(g,function(m,b){return s(m,b,f)})}return Km=u,Km}var Xm,dC;function b6(){if(dC)return Xm;dC=1;var e=b0(),t=w6(),n=tc(),r=nc(),o=n(function(i,s){if(i==null)return[];var a=s.length;return a>1&&r(i,s[0],s[1])?s=[]:a>2&&r(s[0],s[1],s[2])&&(s=[s[0]]),t(i,e(s,1),[])});return Xm=o,Xm}var Qm,fC;function _6(){if(fC)return Qm;fC=1;var e=nT(),t=0;function n(r){var o=++t;return e(r)+o}return Qm=n,Qm}var Zm,hC;function S6(){if(hC)return Zm;hC=1;function e(t,n,r){for(var o=-1,i=t.length,s=n.length,a={};++o<i;){var l=o<s?n[o]:void 0;r(a,t[o],l)}return a}return Zm=e,Zm}var Jm,pC;function E6(){if(pC)return Jm;pC=1;var e=Uu(),t=S6();function n(r,o){return t(r||[],o||[],e)}return Jm=n,Jm}var Ql;if(typeof s0=="function")try{Ql={cloneDeep:FV(),constant:g0(),defaults:qV(),each:KP(),filter:sT(),find:YV(),flatten:ST(),forEach:YP(),forIn:KV(),has:aT(),isUndefined:lT(),last:XV(),map:cT(),mapValues:QV(),max:JV(),merge:i6(),min:s6(),minBy:a6(),now:l6(),pick:h6(),range:g6(),reduce:dT(),sortBy:b6(),uniqueId:_6(),values:gT(),zipObject:E6()}}catch{}Ql||(Ql=window._);var Ne=Ql,C6=rc;function rc(){var e={};e._next=e._prev=e,this._sentinel=e}rc.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return kT(t),t};rc.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&kT(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};rc.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,N6)),n=n._prev;return"["+e.join(", ")+"]"};function kT(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function N6(e,t){if(e!=="_next"&&e!=="_prev")return t}var Pn=Ne,k6=Gt.Graph,R6=C6,P6=A6,T6=Pn.constant(1);function A6(e,t){if(e.nodeCount()<=1)return[];var n=I6(e,t||T6),r=M6(n.graph,n.buckets,n.zeroIdx);return Pn.flatten(Pn.map(r,function(o){return e.outEdges(o.v,o.w)}),!0)}function M6(e,t,n){for(var r=[],o=t[t.length-1],i=t[0],s;e.nodeCount();){for(;s=i.dequeue();)eg(e,t,n,s);for(;s=o.dequeue();)eg(e,t,n,s);if(e.nodeCount()){for(var a=t.length-2;a>0;--a)if(s=t[a].dequeue(),s){r=r.concat(eg(e,t,n,s,!0));break}}}return r}function eg(e,t,n,r,o){var i=o?[]:void 0;return Pn.forEach(e.inEdges(r.v),function(s){var a=e.edge(s),l=e.node(s.v);o&&i.push({v:s.v,w:s.w}),l.out-=a,Nv(t,n,l)}),Pn.forEach(e.outEdges(r.v),function(s){var a=e.edge(s),l=s.w,u=e.node(l);u.in-=a,Nv(t,n,u)}),e.removeNode(r.v),i}function I6(e,t){var n=new k6,r=0,o=0;Pn.forEach(e.nodes(),function(a){n.setNode(a,{v:a,in:0,out:0})}),Pn.forEach(e.edges(),function(a){var l=n.edge(a.v,a.w)||0,u=t(a),c=l+u;n.setEdge(a.v,a.w,c),o=Math.max(o,n.node(a.v).out+=u),r=Math.max(r,n.node(a.w).in+=u)});var i=Pn.range(o+r+3).map(function(){return new R6}),s=r+1;return Pn.forEach(n.nodes(),function(a){Nv(i,s,n.node(a))}),{graph:n,buckets:i,zeroIdx:s}}function Nv(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}var zr=Ne,j6=P6,O6={run:L6,undo:$6};function L6(e){var t=e.graph().acyclicer==="greedy"?j6(e,n(e)):D6(e);zr.forEach(t,function(r){var o=e.edge(r);e.removeEdge(r),o.forwardName=r.name,o.reversed=!0,e.setEdge(r.w,r.v,o,zr.uniqueId("rev"))});function n(r){return function(o){return r.edge(o).weight}}}function D6(e){var t=[],n={},r={};function o(i){zr.has(r,i)||(r[i]=!0,n[i]=!0,zr.forEach(e.outEdges(i),function(s){zr.has(n,s.w)?t.push(s):o(s.w)}),delete n[i])}return zr.forEach(e.nodes(),o),t}function $6(e){zr.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}var ge=Ne,RT=Gt.Graph,ut={addDummyNode:PT,simplify:z6,asNonCompoundGraph:F6,successorWeights:q6,predecessorWeights:B6,intersectRect:H6,buildLayerMatrix:V6,normalizeRanks:W6,removeEmptyRanks:U6,addBorderNode:G6,maxRank:TT,partition:Y6,time:K6,notime:X6};function PT(e,t,n,r){var o;do o=ge.uniqueId(r);while(e.hasNode(o));return n.dummy=t,e.setNode(o,n),o}function z6(e){var t=new RT().setGraph(e.graph());return ge.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),ge.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})}),t}function F6(e){var t=new RT({multigraph:e.isMultigraph()}).setGraph(e.graph());return ge.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),ge.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function q6(e){var t=ge.map(e.nodes(),function(n){var r={};return ge.forEach(e.outEdges(n),function(o){r[o.w]=(r[o.w]||0)+e.edge(o).weight}),r});return ge.zipObject(e.nodes(),t)}function B6(e){var t=ge.map(e.nodes(),function(n){var r={};return ge.forEach(e.inEdges(n),function(o){r[o.v]=(r[o.v]||0)+e.edge(o).weight}),r});return ge.zipObject(e.nodes(),t)}function H6(e,t){var n=e.x,r=e.y,o=t.x-n,i=t.y-r,s=e.width/2,a=e.height/2;if(!o&&!i)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(i)*s>Math.abs(o)*a?(i<0&&(a=-a),l=a*o/i,u=a):(o<0&&(s=-s),l=s,u=s*i/o),{x:n+l,y:r+u}}function V6(e){var t=ge.map(ge.range(TT(e)+1),function(){return[]});return ge.forEach(e.nodes(),function(n){var r=e.node(n),o=r.rank;ge.isUndefined(o)||(t[o][r.order]=n)}),t}function W6(e){var t=ge.min(ge.map(e.nodes(),function(n){return e.node(n).rank}));ge.forEach(e.nodes(),function(n){var r=e.node(n);ge.has(r,"rank")&&(r.rank-=t)})}function U6(e){var t=ge.min(ge.map(e.nodes(),function(i){return e.node(i).rank})),n=[];ge.forEach(e.nodes(),function(i){var s=e.node(i).rank-t;n[s]||(n[s]=[]),n[s].push(i)});var r=0,o=e.graph().nodeRankFactor;ge.forEach(n,function(i,s){ge.isUndefined(i)&&s%o!==0?--r:r&&ge.forEach(i,function(a){e.node(a).rank+=r})})}function G6(e,t,n,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),PT(e,"border",o,t)}function TT(e){return ge.max(ge.map(e.nodes(),function(t){var n=e.node(t).rank;if(!ge.isUndefined(n))return n}))}function Y6(e,t){var n={lhs:[],rhs:[]};return ge.forEach(e,function(r){t(r)?n.lhs.push(r):n.rhs.push(r)}),n}function K6(e,t){var n=ge.now();try{return t()}finally{console.log(e+" time: "+(ge.now()-n)+"ms")}}function X6(e,t){return t()}var AT=Ne,Q6=ut,Z6={run:J6,undo:tW};function J6(e){e.graph().dummyChains=[],AT.forEach(e.edges(),function(t){eW(e,t)})}function eW(e,t){var n=t.v,r=e.node(n).rank,o=t.w,i=e.node(o).rank,s=t.name,a=e.edge(t),l=a.labelRank;if(i!==r+1){e.removeEdge(t);var u,c,d;for(d=0,++r;r<i;++d,++r)a.points=[],c={width:0,height:0,edgeLabel:a,edgeObj:t,rank:r},u=Q6.addDummyNode(e,"edge",c,"_d"),r===l&&(c.width=a.width,c.height=a.height,c.dummy="edge-label",c.labelpos=a.labelpos),e.setEdge(n,u,{weight:a.weight},s),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,o,{weight:a.weight},s)}}function tW(e){AT.forEach(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,o;for(e.setEdge(n.edgeObj,r);n.dummy;)o=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=o,n=e.node(t)})}var za=Ne,oc={longestPath:nW,slack:rW};function nW(e){var t={};function n(r){var o=e.node(r);if(za.has(t,r))return o.rank;t[r]=!0;var i=za.min(za.map(e.outEdges(r),function(s){return n(s.w)-e.edge(s).minlen}));return(i===Number.POSITIVE_INFINITY||i===void 0||i===null)&&(i=0),o.rank=i}za.forEach(e.sources(),n)}function rW(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var Zl=Ne,oW=Gt.Graph,Jl=oc.slack,MT=iW;function iW(e){var t=new oW({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var o,i;sW(t,e)<r;)o=aW(t,e),i=t.hasNode(o.v)?Jl(e,o):-Jl(e,o),lW(t,e,i);return t}function sW(e,t){function n(r){Zl.forEach(t.nodeEdges(r),function(o){var i=o.v,s=r===i?o.w:i;!e.hasNode(s)&&!Jl(t,o)&&(e.setNode(s,{}),e.setEdge(r,s,{}),n(s))})}return Zl.forEach(e.nodes(),n),e.nodeCount()}function aW(e,t){return Zl.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return Jl(t,n)})}function lW(e,t,n){Zl.forEach(e.nodes(),function(r){t.node(r).rank+=n})}var $n=Ne,uW=MT,cW=oc.slack,dW=oc.longestPath,fW=Gt.alg.preorder,hW=Gt.alg.postorder,pW=ut.simplify,mW=ho;ho.initLowLimValues=C0;ho.initCutValues=E0;ho.calcCutValue=IT;ho.leaveEdge=OT;ho.enterEdge=LT;ho.exchangeEdges=DT;function ho(e){e=pW(e),dW(e);var t=uW(e);C0(t),E0(t,e);for(var n,r;n=OT(t);)r=LT(t,e,n),DT(t,e,n,r)}function E0(e,t){var n=hW(e,e.nodes());n=n.slice(0,n.length-1),$n.forEach(n,function(r){gW(e,t,r)})}function gW(e,t,n){var r=e.node(n),o=r.parent;e.edge(n,o).cutvalue=IT(e,t,n)}function IT(e,t,n){var r=e.node(n),o=r.parent,i=!0,s=t.edge(n,o),a=0;return s||(i=!1,s=t.edge(o,n)),a=s.weight,$n.forEach(t.nodeEdges(n),function(l){var u=l.v===n,c=u?l.w:l.v;if(c!==o){var d=u===i,f=t.edge(l).weight;if(a+=d?f:-f,yW(e,n,c)){var h=e.edge(n,c).cutvalue;a+=d?-h:h}}}),a}function C0(e,t){arguments.length<2&&(t=e.nodes()[0]),jT(e,{},1,t)}function jT(e,t,n,r,o){var i=n,s=e.node(r);return t[r]=!0,$n.forEach(e.neighbors(r),function(a){$n.has(t,a)||(n=jT(e,t,n,a,r))}),s.low=i,s.lim=n++,o?s.parent=o:delete s.parent,n}function OT(e){return $n.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function LT(e,t,n){var r=n.v,o=n.w;t.hasEdge(r,o)||(r=n.w,o=n.v);var i=e.node(r),s=e.node(o),a=i,l=!1;i.lim>s.lim&&(a=s,l=!0);var u=$n.filter(t.edges(),function(c){return l===mC(e,e.node(c.v),a)&&l!==mC(e,e.node(c.w),a)});return $n.minBy(u,function(c){return cW(t,c)})}function DT(e,t,n,r){var o=n.v,i=n.w;e.removeEdge(o,i),e.setEdge(r.v,r.w,{}),C0(e),E0(e,t),vW(e,t)}function vW(e,t){var n=$n.find(e.nodes(),function(o){return!t.node(o).parent}),r=fW(e,n);r=r.slice(1),$n.forEach(r,function(o){var i=e.node(o).parent,s=t.edge(o,i),a=!1;s||(s=t.edge(i,o),a=!0),t.node(o).rank=t.node(i).rank+(a?s.minlen:-s.minlen)})}function yW(e,t,n){return e.hasEdge(t,n)}function mC(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var xW=oc,$T=xW.longestPath,wW=MT,bW=mW,_W=SW;function SW(e){switch(e.graph().ranker){case"network-simplex":gC(e);break;case"tight-tree":CW(e);break;case"longest-path":EW(e);break;default:gC(e)}}var EW=$T;function CW(e){$T(e),wW(e)}function gC(e){bW(e)}var kv=Ne,NW=kW;function kW(e){var t=PW(e);kv.forEach(e.graph().dummyChains,function(n){for(var r=e.node(n),o=r.edgeObj,i=RW(e,t,o.v,o.w),s=i.path,a=i.lca,l=0,u=s[l],c=!0;n!==o.w;){if(r=e.node(n),c){for(;(u=s[l])!==a&&e.node(u).maxRank<r.rank;)l++;u===a&&(c=!1)}if(!c){for(;l<s.length-1&&e.node(u=s[l+1]).minRank<=r.rank;)l++;u=s[l]}e.setParent(n,u),n=e.successors(n)[0]}})}function RW(e,t,n,r){var o=[],i=[],s=Math.min(t[n].low,t[r].low),a=Math.max(t[n].lim,t[r].lim),l,u;l=n;do l=e.parent(l),o.push(l);while(l&&(t[l].low>s||a>t[l].lim));for(u=l,l=r;(l=e.parent(l))!==u;)i.push(l);return{path:o.concat(i.reverse()),lca:u}}function PW(e){var t={},n=0;function r(o){var i=n;kv.forEach(e.children(o),r),t[o]={low:i,lim:n++}}return kv.forEach(e.children(),r),t}var Tn=Ne,Rv=ut,TW={run:AW,cleanup:jW};function AW(e){var t=Rv.addDummyNode(e,"root",{},"_root"),n=MW(e),r=Tn.max(Tn.values(n))-1,o=2*r+1;e.graph().nestingRoot=t,Tn.forEach(e.edges(),function(s){e.edge(s).minlen*=o});var i=IW(e)+1;Tn.forEach(e.children(),function(s){zT(e,t,o,i,r,n,s)}),e.graph().nodeRankFactor=o}function zT(e,t,n,r,o,i,s){var a=e.children(s);if(!a.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:n});return}var l=Rv.addBorderNode(e,"_bt"),u=Rv.addBorderNode(e,"_bb"),c=e.node(s);e.setParent(l,s),c.borderTop=l,e.setParent(u,s),c.borderBottom=u,Tn.forEach(a,function(d){zT(e,t,n,r,o,i,d);var f=e.node(d),h=f.borderTop?f.borderTop:d,g=f.borderBottom?f.borderBottom:d,m=f.borderTop?r:2*r,b=h!==g?1:o-i[s]+1;e.setEdge(l,h,{weight:m,minlen:b,nestingEdge:!0}),e.setEdge(g,u,{weight:m,minlen:b,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,l,{weight:0,minlen:o+i[s]})}function MW(e){var t={};function n(r,o){var i=e.children(r);i&&i.length&&Tn.forEach(i,function(s){n(s,o+1)}),t[r]=o}return Tn.forEach(e.children(),function(r){n(r,1)}),t}function IW(e){return Tn.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function jW(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,Tn.forEach(e.edges(),function(n){var r=e.edge(n);r.nestingEdge&&e.removeEdge(n)})}var tg=Ne,OW=ut,LW=DW;function DW(e){function t(n){var r=e.children(n),o=e.node(n);if(r.length&&tg.forEach(r,t),tg.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var i=o.minRank,s=o.maxRank+1;i<s;++i)vC(e,"borderLeft","_bl",n,o,i),vC(e,"borderRight","_br",n,o,i)}}tg.forEach(e.children(),t)}function vC(e,t,n,r,o,i){var s={width:0,height:0,rank:i,borderType:t},a=o[t][i-1],l=OW.addDummyNode(e,"border",s,n);o[t][i]=l,e.setParent(l,r),a&&e.setEdge(a,l,{weight:1})}var on=Ne,$W={adjust:zW,undo:FW};function zW(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&FT(e)}function FW(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&qW(e),(t==="lr"||t==="rl")&&(BW(e),FT(e))}function FT(e){on.forEach(e.nodes(),function(t){yC(e.node(t))}),on.forEach(e.edges(),function(t){yC(e.edge(t))})}function yC(e){var t=e.width;e.width=e.height,e.height=t}function qW(e){on.forEach(e.nodes(),function(t){ng(e.node(t))}),on.forEach(e.edges(),function(t){var n=e.edge(t);on.forEach(n.points,ng),on.has(n,"y")&&ng(n)})}function ng(e){e.y=-e.y}function BW(e){on.forEach(e.nodes(),function(t){rg(e.node(t))}),on.forEach(e.edges(),function(t){var n=e.edge(t);on.forEach(n.points,rg),on.has(n,"x")&&rg(n)})}function rg(e){var t=e.x;e.x=e.y,e.y=t}var Sn=Ne,HW=VW;function VW(e){var t={},n=Sn.filter(e.nodes(),function(a){return!e.children(a).length}),r=Sn.max(Sn.map(n,function(a){return e.node(a).rank})),o=Sn.map(Sn.range(r+1),function(){return[]});function i(a){if(!Sn.has(t,a)){t[a]=!0;var l=e.node(a);o[l.rank].push(a),Sn.forEach(e.successors(a),i)}}var s=Sn.sortBy(n,function(a){return e.node(a).rank});return Sn.forEach(s,i),o}var Zn=Ne,WW=UW;function UW(e,t){for(var n=0,r=1;r<t.length;++r)n+=GW(e,t[r-1],t[r]);return n}function GW(e,t,n){for(var r=Zn.zipObject(n,Zn.map(n,function(u,c){return c})),o=Zn.flatten(Zn.map(t,function(u){return Zn.sortBy(Zn.map(e.outEdges(u),function(c){return{pos:r[c.w],weight:e.edge(c).weight}}),"pos")}),!0),i=1;i<n.length;)i<<=1;var s=2*i-1;i-=1;var a=Zn.map(new Array(s),function(){return 0}),l=0;return Zn.forEach(o.forEach(function(u){var c=u.pos+i;a[c]+=u.weight;for(var d=0;c>0;)c%2&&(d+=a[c+1]),c=c-1>>1,a[c]+=u.weight;l+=u.weight*d})),l}var xC=Ne,YW=KW;function KW(e,t){return xC.map(t,function(n){var r=e.inEdges(n);if(r.length){var o=xC.reduce(r,function(i,s){var a=e.edge(s),l=e.node(s.v);return{sum:i.sum+a.weight*l.order,weight:i.weight+a.weight}},{sum:0,weight:0});return{v:n,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:n}})}var dt=Ne,XW=QW;function QW(e,t){var n={};dt.forEach(e,function(o,i){var s=n[o.v]={indegree:0,in:[],out:[],vs:[o.v],i};dt.isUndefined(o.barycenter)||(s.barycenter=o.barycenter,s.weight=o.weight)}),dt.forEach(t.edges(),function(o){var i=n[o.v],s=n[o.w];!dt.isUndefined(i)&&!dt.isUndefined(s)&&(s.indegree++,i.out.push(n[o.w]))});var r=dt.filter(n,function(o){return!o.indegree});return ZW(r)}function ZW(e){var t=[];function n(i){return function(s){s.merged||(dt.isUndefined(s.barycenter)||dt.isUndefined(i.barycenter)||s.barycenter>=i.barycenter)&&JW(i,s)}}function r(i){return function(s){s.in.push(i),--s.indegree===0&&e.push(s)}}for(;e.length;){var o=e.pop();t.push(o),dt.forEach(o.in.reverse(),n(o)),dt.forEach(o.out,r(o))}return dt.map(dt.filter(t,function(i){return!i.merged}),function(i){return dt.pick(i,["vs","i","barycenter","weight"])})}function JW(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}var Ki=Ne,e7=ut,t7=n7;function n7(e,t){var n=e7.partition(e,function(c){return Ki.has(c,"barycenter")}),r=n.lhs,o=Ki.sortBy(n.rhs,function(c){return-c.i}),i=[],s=0,a=0,l=0;r.sort(r7(!!t)),l=wC(i,o,l),Ki.forEach(r,function(c){l+=c.vs.length,i.push(c.vs),s+=c.barycenter*c.weight,a+=c.weight,l=wC(i,o,l)});var u={vs:Ki.flatten(i,!0)};return a&&(u.barycenter=s/a,u.weight=a),u}function wC(e,t,n){for(var r;t.length&&(r=Ki.last(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function r7(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}var ir=Ne,o7=YW,i7=XW,s7=t7,a7=qT;function qT(e,t,n,r){var o=e.children(t),i=e.node(t),s=i?i.borderLeft:void 0,a=i?i.borderRight:void 0,l={};s&&(o=ir.filter(o,function(g){return g!==s&&g!==a}));var u=o7(e,o);ir.forEach(u,function(g){if(e.children(g.v).length){var m=qT(e,g.v,n,r);l[g.v]=m,ir.has(m,"barycenter")&&u7(g,m)}});var c=i7(u,n);l7(c,l);var d=s7(c,r);if(s&&(d.vs=ir.flatten([s,d.vs,a],!0),e.predecessors(s).length)){var f=e.node(e.predecessors(s)[0]),h=e.node(e.predecessors(a)[0]);ir.has(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+h.order)/(d.weight+2),d.weight+=2}return d}function l7(e,t){ir.forEach(e,function(n){n.vs=ir.flatten(n.vs.map(function(r){return t[r]?t[r].vs:r}),!0)})}function u7(e,t){ir.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var Xi=Ne,c7=Gt.Graph,d7=f7;function f7(e,t,n){var r=h7(e),o=new c7({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(i){return e.node(i)});return Xi.forEach(e.nodes(),function(i){var s=e.node(i),a=e.parent(i);(s.rank===t||s.minRank<=t&&t<=s.maxRank)&&(o.setNode(i),o.setParent(i,a||r),Xi.forEach(e[n](i),function(l){var u=l.v===i?l.w:l.v,c=o.edge(u,i),d=Xi.isUndefined(c)?0:c.weight;o.setEdge(u,i,{weight:e.edge(l).weight+d})}),Xi.has(s,"minRank")&&o.setNode(i,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]}))}),o}function h7(e){for(var t;e.hasNode(t=Xi.uniqueId("_root")););return t}var p7=Ne,m7=g7;function g7(e,t,n){var r={},o;p7.forEach(n,function(i){for(var s=e.parent(i),a,l;s;){if(a=e.parent(s),a?(l=r[a],r[a]=s):(l=o,o=s),l&&l!==s){t.setEdge(l,s);return}s=a}})}var gr=Ne,v7=HW,y7=WW,x7=a7,w7=d7,b7=m7,_7=Gt.Graph,bC=ut,S7=E7;function E7(e){var t=bC.maxRank(e),n=_C(e,gr.range(1,t+1),"inEdges"),r=_C(e,gr.range(t-1,-1,-1),"outEdges"),o=v7(e);SC(e,o);for(var i=Number.POSITIVE_INFINITY,s,a=0,l=0;l<4;++a,++l){C7(a%2?n:r,a%4>=2),o=bC.buildLayerMatrix(e);var u=y7(e,o);u<i&&(l=0,s=gr.cloneDeep(o),i=u)}SC(e,s)}function _C(e,t,n){return gr.map(t,function(r){return w7(e,r,n)})}function C7(e,t){var n=new _7;gr.forEach(e,function(r){var o=r.graph().root,i=x7(r,o,n,t);gr.forEach(i.vs,function(s,a){r.node(s).order=a}),b7(r,n,i.vs)})}function SC(e,t){gr.forEach(t,function(n){gr.forEach(n,function(r,o){e.node(r).order=o})})}var ae=Ne,N7=Gt.Graph,k7=ut,R7={positionX:z7};function P7(e,t){var n={};function r(o,i){var s=0,a=0,l=o.length,u=ae.last(i);return ae.forEach(i,function(c,d){var f=A7(e,c),h=f?e.node(f).order:l;(f||c===u)&&(ae.forEach(i.slice(a,d+1),function(g){ae.forEach(e.predecessors(g),function(m){var b=e.node(m),v=b.order;(v<s||h<v)&&!(b.dummy&&e.node(g).dummy)&&BT(n,m,g)})}),a=d+1,s=h)}),i}return ae.reduce(t,r),n}function T7(e,t){var n={};function r(i,s,a,l,u){var c;ae.forEach(ae.range(s,a),function(d){c=i[d],e.node(c).dummy&&ae.forEach(e.predecessors(c),function(f){var h=e.node(f);h.dummy&&(h.order<l||h.order>u)&&BT(n,f,c)})})}function o(i,s){var a=-1,l,u=0;return ae.forEach(s,function(c,d){if(e.node(c).dummy==="border"){var f=e.predecessors(c);f.length&&(l=e.node(f[0]).order,r(s,u,d,a,l),u=d,a=l)}r(s,u,s.length,l,i.length)}),s}return ae.reduce(t,o),n}function A7(e,t){if(e.node(t).dummy)return ae.find(e.predecessors(t),function(n){return e.node(n).dummy})}function BT(e,t,n){if(t>n){var r=t;t=n,n=r}var o=e[t];o||(e[t]=o={}),o[n]=!0}function M7(e,t,n){if(t>n){var r=t;t=n,n=r}return ae.has(e[t],n)}function I7(e,t,n,r){var o={},i={},s={};return ae.forEach(t,function(a){ae.forEach(a,function(l,u){o[l]=l,i[l]=l,s[l]=u})}),ae.forEach(t,function(a){var l=-1;ae.forEach(a,function(u){var c=r(u);if(c.length){c=ae.sortBy(c,function(m){return s[m]});for(var d=(c.length-1)/2,f=Math.floor(d),h=Math.ceil(d);f<=h;++f){var g=c[f];i[u]===u&&l<s[g]&&!M7(n,u,g)&&(i[g]=u,i[u]=o[u]=o[g],l=s[g])}}})}),{root:o,align:i}}function j7(e,t,n,r,o){var i={},s=O7(e,t,n,o),a=o?"borderLeft":"borderRight";function l(d,f){for(var h=s.nodes(),g=h.pop(),m={};g;)m[g]?d(g):(m[g]=!0,h.push(g),h=h.concat(f(g))),g=h.pop()}function u(d){i[d]=s.inEdges(d).reduce(function(f,h){return Math.max(f,i[h.v]+s.edge(h))},0)}function c(d){var f=s.outEdges(d).reduce(function(g,m){return Math.min(g,i[m.w]-s.edge(m))},Number.POSITIVE_INFINITY),h=e.node(d);f!==Number.POSITIVE_INFINITY&&h.borderType!==a&&(i[d]=Math.max(i[d],f))}return l(u,s.predecessors.bind(s)),l(c,s.successors.bind(s)),ae.forEach(r,function(d){i[d]=i[n[d]]}),i}function O7(e,t,n,r){var o=new N7,i=e.graph(),s=F7(i.nodesep,i.edgesep,r);return ae.forEach(t,function(a){var l;ae.forEach(a,function(u){var c=n[u];if(o.setNode(c),l){var d=n[l],f=o.edge(d,c);o.setEdge(d,c,Math.max(s(e,u,l),f||0))}l=u})}),o}function L7(e,t){return ae.minBy(ae.values(t),function(n){var r=Number.NEGATIVE_INFINITY,o=Number.POSITIVE_INFINITY;return ae.forIn(n,function(i,s){var a=q7(e,s)/2;r=Math.max(i+a,r),o=Math.min(i-a,o)}),r-o})}function D7(e,t){var n=ae.values(t),r=ae.min(n),o=ae.max(n);ae.forEach(["u","d"],function(i){ae.forEach(["l","r"],function(s){var a=i+s,l=e[a],u;if(l!==t){var c=ae.values(l);u=s==="l"?r-ae.min(c):o-ae.max(c),u&&(e[a]=ae.mapValues(l,function(d){return d+u}))}})})}function $7(e,t){return ae.mapValues(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var o=ae.sortBy(ae.map(e,r));return(o[1]+o[2])/2})}function z7(e){var t=k7.buildLayerMatrix(e),n=ae.merge(P7(e,t),T7(e,t)),r={},o;ae.forEach(["u","d"],function(s){o=s==="u"?t:ae.values(t).reverse(),ae.forEach(["l","r"],function(a){a==="r"&&(o=ae.map(o,function(d){return ae.values(d).reverse()}));var l=(s==="u"?e.predecessors:e.successors).bind(e),u=I7(e,o,n,l),c=j7(e,o,u.root,u.align,a==="r");a==="r"&&(c=ae.mapValues(c,function(d){return-d})),r[s+a]=c})});var i=L7(e,r);return D7(r,i),$7(r,e.graph().align)}function F7(e,t,n){return function(r,o,i){var s=r.node(o),a=r.node(i),l=0,u;if(l+=s.width/2,ae.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=-s.width/2;break;case"r":u=s.width/2;break}if(u&&(l+=n?u:-u),u=0,l+=(s.dummy?t:e)/2,l+=(a.dummy?t:e)/2,l+=a.width/2,ae.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=a.width/2;break;case"r":u=-a.width/2;break}return u&&(l+=n?u:-u),u=0,l}}function q7(e,t){return e.node(t).width}var Qi=Ne,HT=ut,B7=R7.positionX,H7=V7;function V7(e){e=HT.asNonCompoundGraph(e),W7(e),Qi.forEach(B7(e),function(t,n){e.node(n).x=t})}function W7(e){var t=HT.buildLayerMatrix(e),n=e.graph().ranksep,r=0;Qi.forEach(t,function(o){var i=Qi.max(Qi.map(o,function(s){return e.node(s).height}));Qi.forEach(o,function(s){e.node(s).y=r+i/2}),r+=i+n})}var de=Ne,EC=O6,CC=Z6,U7=_W,G7=ut.normalizeRanks,Y7=NW,K7=ut.removeEmptyRanks,NC=TW,X7=LW,kC=$W,Q7=S7,Z7=H7,br=ut,J7=Gt.Graph,e9=t9;function t9(e,t){var n=t&&t.debugTiming?br.time:br.notime;n("layout",function(){var r=n(" buildLayoutGraph",function(){return f9(e)});n(" runLayout",function(){n9(r,n)}),n(" updateInputGraph",function(){r9(e,r)})})}function n9(e,t){t(" makeSpaceForEdgeLabels",function(){h9(e)}),t(" removeSelfEdges",function(){_9(e)}),t(" acyclic",function(){EC.run(e)}),t(" nestingGraph.run",function(){NC.run(e)}),t(" rank",function(){U7(br.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){p9(e)}),t(" removeEmptyRanks",function(){K7(e)}),t(" nestingGraph.cleanup",function(){NC.cleanup(e)}),t(" normalizeRanks",function(){G7(e)}),t(" assignRankMinMax",function(){m9(e)}),t(" removeEdgeLabelProxies",function(){g9(e)}),t(" normalize.run",function(){CC.run(e)}),t(" parentDummyChains",function(){Y7(e)}),t(" addBorderSegments",function(){X7(e)}),t(" order",function(){Q7(e)}),t(" insertSelfEdges",function(){S9(e)}),t(" adjustCoordinateSystem",function(){kC.adjust(e)}),t(" position",function(){Z7(e)}),t(" positionSelfEdges",function(){E9(e)}),t(" removeBorderNodes",function(){b9(e)}),t(" normalize.undo",function(){CC.undo(e)}),t(" fixupEdgeLabelCoords",function(){x9(e)}),t(" undoCoordinateSystem",function(){kC.undo(e)}),t(" translateGraph",function(){v9(e)}),t(" assignNodeIntersects",function(){y9(e)}),t(" reversePoints",function(){w9(e)}),t(" acyclic.undo",function(){EC.undo(e)})}function r9(e,t){de.forEach(e.nodes(),function(n){var r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,t.children(n).length&&(r.width=o.width,r.height=o.height))}),de.forEach(e.edges(),function(n){var r=e.edge(n),o=t.edge(n);r.points=o.points,de.has(o,"x")&&(r.x=o.x,r.y=o.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var o9=["nodesep","edgesep","ranksep","marginx","marginy"],i9={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},s9=["acyclicer","ranker","rankdir","align"],a9=["width","height"],l9={width:0,height:0},u9=["minlen","weight","width","height","labeloffset"],c9={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},d9=["labelpos"];function f9(e){var t=new J7({multigraph:!0,compound:!0}),n=ig(e.graph());return t.setGraph(de.merge({},i9,og(n,o9),de.pick(n,s9))),de.forEach(e.nodes(),function(r){var o=ig(e.node(r));t.setNode(r,de.defaults(og(o,a9),l9)),t.setParent(r,e.parent(r))}),de.forEach(e.edges(),function(r){var o=ig(e.edge(r));t.setEdge(r,de.merge({},c9,og(o,u9),de.pick(o,d9)))}),t}function h9(e){var t=e.graph();t.ranksep/=2,de.forEach(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function p9(e){de.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),o=e.node(t.w),i={rank:(o.rank-r.rank)/2+r.rank,e:t};br.addDummyNode(e,"edge-proxy",i,"_ep")}})}function m9(e){var t=0;de.forEach(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=de.max(t,r.maxRank))}),e.graph().maxRank=t}function g9(e){de.forEach(e.nodes(),function(t){var n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function v9(e){var t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,o=0,i=e.graph(),s=i.marginx||0,a=i.marginy||0;function l(u){var c=u.x,d=u.y,f=u.width,h=u.height;t=Math.min(t,c-f/2),n=Math.max(n,c+f/2),r=Math.min(r,d-h/2),o=Math.max(o,d+h/2)}de.forEach(e.nodes(),function(u){l(e.node(u))}),de.forEach(e.edges(),function(u){var c=e.edge(u);de.has(c,"x")&&l(c)}),t-=s,r-=a,de.forEach(e.nodes(),function(u){var c=e.node(u);c.x-=t,c.y-=r}),de.forEach(e.edges(),function(u){var c=e.edge(u);de.forEach(c.points,function(d){d.x-=t,d.y-=r}),de.has(c,"x")&&(c.x-=t),de.has(c,"y")&&(c.y-=r)}),i.width=n-t+s,i.height=o-r+a}function y9(e){de.forEach(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),o=e.node(t.w),i,s;n.points?(i=n.points[0],s=n.points[n.points.length-1]):(n.points=[],i=o,s=r),n.points.unshift(br.intersectRect(r,i)),n.points.push(br.intersectRect(o,s))})}function x9(e){de.forEach(e.edges(),function(t){var n=e.edge(t);if(de.has(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function w9(e){de.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function b9(e){de.forEach(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),o=e.node(n.borderBottom),i=e.node(de.last(n.borderLeft)),s=e.node(de.last(n.borderRight));n.width=Math.abs(s.x-i.x),n.height=Math.abs(o.y-r.y),n.x=i.x+n.width/2,n.y=r.y+n.height/2}}),de.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function _9(e){de.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function S9(e){var t=br.buildLayerMatrix(e);de.forEach(t,function(n){var r=0;de.forEach(n,function(o,i){var s=e.node(o);s.order=i+r,de.forEach(s.selfEdges,function(a){br.addDummyNode(e,"selfedge",{width:a.label.width,height:a.label.height,rank:s.rank,order:i+ ++r,e:a.e,label:a.label},"_se")}),delete s.selfEdges})})}function E9(e){de.forEach(e.nodes(),function(t){var n=e.node(t);if(n.dummy==="selfedge"){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,s=n.x-o,a=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*s/3,y:i-a},{x:o+5*s/6,y:i-a},{x:o+s,y:i},{x:o+5*s/6,y:i+a},{x:o+2*s/3,y:i+a}],n.label.x=n.x,n.label.y=n.y}})}function og(e,t){return de.mapValues(de.pick(e,t),Number)}function ig(e){var t={};return de.forEach(e,function(n,r){t[r.toLowerCase()]=n}),t}var Fa=Ne,C9=ut,N9=Gt.Graph,k9={debugOrdering:R9};function R9(e){var t=C9.buildLayerMatrix(e),n=new N9({compound:!0,multigraph:!0}).setGraph({});return Fa.forEach(e.nodes(),function(r){n.setNode(r,{label:r}),n.setParent(r,"layer"+e.node(r).rank)}),Fa.forEach(e.edges(),function(r){n.setEdge(r.v,r.w,{},r.name)}),Fa.forEach(t,function(r,o){var i="layer"+o;n.setNode(i,{rank:"same"}),Fa.reduce(r,function(s,a){return n.setEdge(s,a,{style:"invis"}),a})}),n}var P9="0.8.5",T9={graphlib:Gt,layout:e9,debug:k9,util:{time:ut.time,notime:ut.notime},version:P9};const RC=cu(T9);function PC(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ei(...e){return t=>{let n=!1;const r=e.map(o=>{const i=PC(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():PC(e[o],null)}}}}function ve(...e){return y.useCallback(Ei(...e),e)}var A9=Symbol.for("react.lazy"),eu=Kv[" use ".trim().toString()];function M9(e){return typeof e=="object"&&e!==null&&"then"in e}function VT(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===A9&&"_payload"in e&&M9(e._payload)}function ic(e){const t=I9(e),n=y.forwardRef((r,o)=>{let{children:i,...s}=r;VT(i)&&typeof eu=="function"&&(i=eu(i._payload));const a=y.Children.toArray(i),l=a.find(O9);if(l){const u=l.props.children,c=a.map(d=>d===l?y.Children.count(u)>1?y.Children.only(null):y.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...s,ref:o,children:y.isValidElement(u)?y.cloneElement(u,void 0,c):null})}return p.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}var Ci=ic("Slot");function I9(e){const t=y.forwardRef((n,r)=>{let{children:o,...i}=n;if(VT(o)&&typeof eu=="function"&&(o=eu(o._payload)),y.isValidElement(o)){const s=D9(o),a=L9(i,o.props);return o.type!==y.Fragment&&(a.ref=r?Ei(r,s):s),y.cloneElement(o,a)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var j9=Symbol("radix.slottable");function O9(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===j9}function L9(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function D9(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const $9=Gs("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),vr=y.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?Ci:"button";return p.jsx(s,{className:ne($9({variant:t,size:n,className:e})),ref:i,...o})});vr.displayName="Button";function ue(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function z9(e,t){const n=y.createContext(t),r=i=>{const{children:s,...a}=i,l=y.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(i){const s=y.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function po(e,t=[]){let n=[];function r(i,s){const a=y.createContext(s),l=n.length;n=[...n,s];const u=d=>{var v;const{scope:f,children:h,...g}=d,m=((v=f==null?void 0:f[e])==null?void 0:v[l])||a,b=y.useMemo(()=>g,Object.values(g));return p.jsx(m.Provider,{value:b,children:h})};u.displayName=i+"Provider";function c(d,f){var m;const h=((m=f==null?void 0:f[e])==null?void 0:m[l])||a,g=y.useContext(h);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,c]}const o=()=>{const i=n.map(s=>y.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,F9(o,...t)]}function F9(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function q9(e){const t=B9(e),n=y.forwardRef((r,o)=>{const{children:i,...s}=r,a=y.Children.toArray(i),l=a.find(V9);if(l){const u=l.props.children,c=a.map(d=>d===l?y.Children.count(u)>1?y.Children.only(null):y.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...s,ref:o,children:y.isValidElement(u)?y.cloneElement(u,void 0,c):null})}return p.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function B9(e){const t=y.forwardRef((n,r)=>{const{children:o,...i}=n;if(y.isValidElement(o)){const s=U9(o),a=W9(i,o.props);return o.type!==y.Fragment&&(a.ref=r?Ei(r,s):s),y.cloneElement(o,a)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var H9=Symbol("radix.slottable");function V9(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===H9}function W9(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function U9(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var G9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],he=G9.reduce((e,t)=>{const n=q9(`Primitive.${t}`),r=y.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Y9(e,t){e&&gi.flushSync(()=>e.dispatchEvent(t))}function rt(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function K9(e,t=globalThis==null?void 0:globalThis.document){const n=rt(e);y.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var X9="DismissableLayer",Pv="dismissableLayer.update",Q9="dismissableLayer.pointerDownOutside",Z9="dismissableLayer.focusOutside",TC,WT=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),sc=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,u=y.useContext(WT),[c,d]=y.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=y.useState({}),g=ve(t,E=>d(E)),m=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(b),w=c?m.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,_=w>=v,C=tU(E=>{const k=E.target,T=[...u.branches].some(I=>I.contains(k));!_||T||(o==null||o(E),s==null||s(E),E.defaultPrevented||a==null||a())},f),S=nU(E=>{const k=E.target;[...u.branches].some(I=>I.contains(k))||(i==null||i(E),s==null||s(E),E.defaultPrevented||a==null||a())},f);return K9(E=>{w===u.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},f),y.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(TC=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),AC(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=TC)}},[c,f,n,u]),y.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),AC())},[c,u]),y.useEffect(()=>{const E=()=>h({});return document.addEventListener(Pv,E),()=>document.removeEventListener(Pv,E)},[]),p.jsx(he.div,{...l,ref:g,style:{pointerEvents:x?_?"auto":"none":void 0,...e.style},onFocusCapture:ue(e.onFocusCapture,S.onFocusCapture),onBlurCapture:ue(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:ue(e.onPointerDownCapture,C.onPointerDownCapture)})});sc.displayName=X9;var J9="DismissableLayerBranch",eU=y.forwardRef((e,t)=>{const n=y.useContext(WT),r=y.useRef(null),o=ve(t,r);return y.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),p.jsx(he.div,{...e,ref:o})});eU.displayName=J9;function tU(e,t=globalThis==null?void 0:globalThis.document){const n=rt(e),r=y.useRef(!1),o=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let l=function(){UT(Q9,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function nU(e,t=globalThis==null?void 0:globalThis.document){const n=rt(e),r=y.useRef(!1);return y.useEffect(()=>{const o=i=>{i.target&&!r.current&&UT(Z9,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function AC(){const e=new CustomEvent(Pv);document.dispatchEvent(e)}function UT(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Y9(o,i):o.dispatchEvent(i)}var Ue=globalThis!=null&&globalThis.document?y.useLayoutEffect:()=>{},rU=Kv[" useId ".trim().toString()]||(()=>{}),oU=0;function Vr(e){const[t,n]=y.useState(rU());return Ue(()=>{n(r=>r??String(oU++))},[e]),t?`radix-${t}`:""}const iU=["top","right","bottom","left"],_r=Math.min,ft=Math.max,tu=Math.round,qa=Math.floor,cn=e=>({x:e,y:e}),sU={left:"right",right:"left",bottom:"top",top:"bottom"},aU={start:"end",end:"start"};function Tv(e,t,n){return ft(e,_r(t,n))}function zn(e,t){return typeof e=="function"?e(t):e}function Fn(e){return e.split("-")[0]}function Ni(e){return e.split("-")[1]}function N0(e){return e==="x"?"y":"x"}function k0(e){return e==="y"?"height":"width"}const lU=new Set(["top","bottom"]);function sn(e){return lU.has(Fn(e))?"y":"x"}function R0(e){return N0(sn(e))}function uU(e,t,n){n===void 0&&(n=!1);const r=Ni(e),o=R0(e),i=k0(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=nu(s)),[s,nu(s)]}function cU(e){const t=nu(e);return[Av(e),t,Av(t)]}function Av(e){return e.replace(/start|end/g,t=>aU[t])}const MC=["left","right"],IC=["right","left"],dU=["top","bottom"],fU=["bottom","top"];function hU(e,t,n){switch(e){case"top":case"bottom":return n?t?IC:MC:t?MC:IC;case"left":case"right":return t?dU:fU;default:return[]}}function pU(e,t,n,r){const o=Ni(e);let i=hU(Fn(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Av)))),i}function nu(e){return e.replace(/left|right|bottom|top/g,t=>sU[t])}function mU(e){return{top:0,right:0,bottom:0,left:0,...e}}function GT(e){return typeof e!="number"?mU(e):{top:e,right:e,bottom:e,left:e}}function ru(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function jC(e,t,n){let{reference:r,floating:o}=e;const i=sn(t),s=R0(t),a=k0(s),l=Fn(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:c,y:r.y-o.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Ni(t)){case"start":h[s]-=f*(n&&u?-1:1);break;case"end":h[s]+=f*(n&&u?-1:1);break}return h}async function gU(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=zn(t,e),g=GT(h),b=a[f?d==="floating"?"reference":"floating":d],v=ru(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),w=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),_=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},C=ru(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:l}):w);return{top:(v.top-C.top+g.top)/_.y,bottom:(C.bottom-v.bottom+g.bottom)/_.y,left:(v.left-C.left+g.left)/_.x,right:(C.right-v.right+g.right)/_.x}}const vU=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=jC(u,r,l),f=r,h={},g=0;for(let b=0;b<a.length;b++){var m;const{name:v,fn:w}=a[b],{x,y:_,data:C,reset:S}=await w({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:u,platform:{...s,detectOverflow:(m=s.detectOverflow)!=null?m:gU},elements:{reference:e,floating:t}});c=x??c,d=_??d,h={...h,[v]:{...h[v],...C}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(u=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects),{x:c,y:d}=jC(u,f,l)),b=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:h}},yU=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:u,padding:c=0}=zn(e,t)||{};if(u==null)return{};const d=GT(c),f={x:n,y:r},h=R0(o),g=k0(h),m=await s.getDimensions(u),b=h==="y",v=b?"top":"left",w=b?"bottom":"right",x=b?"clientHeight":"clientWidth",_=i.reference[g]+i.reference[h]-f[h]-i.floating[g],C=f[h]-i.reference[h],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let E=S?S[x]:0;(!E||!await(s.isElement==null?void 0:s.isElement(S)))&&(E=a.floating[x]||i.floating[g]);const k=_/2-C/2,T=E/2-m[g]/2-1,I=_r(d[v],T),P=_r(d[w],T),j=I,$=E-m[g]-P,R=E/2-m[g]/2+k,L=Tv(j,R,$),M=!l.arrow&&Ni(o)!=null&&R!==L&&i.reference[g]/2-(R<j?I:P)-m[g]/2<0,O=M?R<j?R-j:R-$:0;return{[h]:f[h]+O,data:{[h]:L,centerOffset:R-L-O,...M&&{alignmentOffset:O}},reset:M}}}),xU=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...b}=zn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Fn(o),w=sn(a),x=Fn(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(x||!m?[nu(a)]:cU(a)),S=g!=="none";!f&&S&&C.push(...pU(a,m,g,_));const E=[a,...C],k=await l.detectOverflow(t,b),T=[];let I=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&T.push(k[v]),d){const R=uU(o,s,_);T.push(k[R[0]],k[R[1]])}if(I=[...I,{placement:o,overflows:T}],!T.every(R=>R<=0)){var P,j;const R=(((P=i.flip)==null?void 0:P.index)||0)+1,L=E[R];if(L&&(!(d==="alignment"?w!==sn(L):!1)||I.every(N=>sn(N.placement)===w?N.overflows[0]>0:!0)))return{data:{index:R,overflows:I},reset:{placement:L}};let M=(j=I.filter(O=>O.overflows[0]<=0).sort((O,N)=>O.overflows[1]-N.overflows[1])[0])==null?void 0:j.placement;if(!M)switch(h){case"bestFit":{var $;const O=($=I.filter(N=>{if(S){const A=sn(N.placement);return A===w||A==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(A=>A>0).reduce((A,D)=>A+D,0)]).sort((N,A)=>N[1]-A[1])[0])==null?void 0:$[0];O&&(M=O);break}case"initialPlacement":M=a;break}if(o!==M)return{reset:{placement:M}}}return{}}}};function OC(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function LC(e){return iU.some(t=>e[t]>=0)}const wU=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=zn(e,t);switch(o){case"referenceHidden":{const s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=OC(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:LC(a)}}}case"escaped":{const s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=OC(s,n.floating);return{data:{escapedOffsets:a,escaped:LC(a)}}}default:return{}}}}},YT=new Set(["left","top"]);async function bU(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Fn(n),a=Ni(n),l=sn(n)==="y",u=YT.has(s)?-1:1,c=i&&l?-1:1,d=zn(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const _U=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await bU(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},SU=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:v=>{let{x:w,y:x}=v;return{x:w,y:x}}},...u}=zn(e,t),c={x:n,y:r},d=await i.detectOverflow(t,u),f=sn(Fn(o)),h=N0(f);let g=c[h],m=c[f];if(s){const v=h==="y"?"top":"left",w=h==="y"?"bottom":"right",x=g+d[v],_=g-d[w];g=Tv(x,g,_)}if(a){const v=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=m+d[v],_=m-d[w];m=Tv(x,m,_)}const b=l.fn({...t,[h]:g,[f]:m});return{...b,data:{x:b.x-n,y:b.y-r,enabled:{[h]:s,[f]:a}}}}}},EU=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=zn(e,t),c={x:n,y:r},d=sn(o),f=N0(d);let h=c[f],g=c[d];const m=zn(a,t),b=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=f==="y"?"height":"width",_=i.reference[f]-i.floating[x]+b.mainAxis,C=i.reference[f]+i.reference[x]-b.mainAxis;h<_?h=_:h>C&&(h=C)}if(u){var v,w;const x=f==="y"?"width":"height",_=YT.has(Fn(o)),C=i.reference[d]-i.floating[x]+(_&&((v=s.offset)==null?void 0:v[d])||0)+(_?0:b.crossAxis),S=i.reference[d]+i.reference[x]+(_?0:((w=s.offset)==null?void 0:w[d])||0)-(_?b.crossAxis:0);g<C?g=C:g>S&&(g=S)}return{[f]:h,[d]:g}}}},CU=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...u}=zn(e,t),c=await s.detectOverflow(t,u),d=Fn(o),f=Ni(o),h=sn(o)==="y",{width:g,height:m}=i.floating;let b,v;d==="top"||d==="bottom"?(b=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(v=d,b=f==="end"?"top":"bottom");const w=m-c.top-c.bottom,x=g-c.left-c.right,_=_r(m-c[b],w),C=_r(g-c[v],x),S=!t.middlewareData.shift;let E=_,k=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=w),S&&!f){const I=ft(c.left,0),P=ft(c.right,0),j=ft(c.top,0),$=ft(c.bottom,0);h?k=g-2*(I!==0||P!==0?I+P:ft(c.left,c.right)):E=m-2*(j!==0||$!==0?j+$:ft(c.top,c.bottom))}await l({...t,availableWidth:k,availableHeight:E});const T=await s.getDimensions(a.floating);return g!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function ac(){return typeof window<"u"}function ki(e){return KT(e)?(e.nodeName||"").toLowerCase():"#document"}function gt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mn(e){var t;return(t=(KT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function KT(e){return ac()?e instanceof Node||e instanceof gt(e).Node:!1}function Ht(e){return ac()?e instanceof Element||e instanceof gt(e).Element:!1}function fn(e){return ac()?e instanceof HTMLElement||e instanceof gt(e).HTMLElement:!1}function DC(e){return!ac()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gt(e).ShadowRoot}const NU=new Set(["inline","contents"]);function ia(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Vt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!NU.has(o)}const kU=new Set(["table","td","th"]);function RU(e){return kU.has(ki(e))}const PU=[":popover-open",":modal"];function lc(e){return PU.some(t=>{try{return e.matches(t)}catch{return!1}})}const TU=["transform","translate","scale","rotate","perspective"],AU=["transform","translate","scale","rotate","perspective","filter"],MU=["paint","layout","strict","content"];function P0(e){const t=T0(),n=Ht(e)?Vt(e):e;return TU.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||AU.some(r=>(n.willChange||"").includes(r))||MU.some(r=>(n.contain||"").includes(r))}function IU(e){let t=Sr(e);for(;fn(t)&&!ci(t);){if(P0(t))return t;if(lc(t))return null;t=Sr(t)}return null}function T0(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const jU=new Set(["html","body","#document"]);function ci(e){return jU.has(ki(e))}function Vt(e){return gt(e).getComputedStyle(e)}function uc(e){return Ht(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sr(e){if(ki(e)==="html")return e;const t=e.assignedSlot||e.parentNode||DC(e)&&e.host||mn(e);return DC(t)?t.host:t}function XT(e){const t=Sr(e);return ci(t)?e.ownerDocument?e.ownerDocument.body:e.body:fn(t)&&ia(t)?t:XT(t)}function $s(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=XT(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=gt(o);if(i){const a=Mv(s);return t.concat(s,s.visualViewport||[],ia(o)?o:[],a&&n?$s(a):[])}return t.concat(o,$s(o,[],n))}function Mv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function QT(e){const t=Vt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=fn(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=tu(n)!==i||tu(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function A0(e){return Ht(e)?e:e.contextElement}function Vo(e){const t=A0(e);if(!fn(t))return cn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=QT(t);let s=(i?tu(n.width):n.width)/r,a=(i?tu(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const OU=cn(0);function ZT(e){const t=gt(e);return!T0()||!t.visualViewport?OU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LU(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==gt(e)?!1:t}function no(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=A0(e);let s=cn(1);t&&(r?Ht(r)&&(s=Vo(r)):s=Vo(e));const a=LU(i,n,r)?ZT(i):cn(0);let l=(o.left+a.x)/s.x,u=(o.top+a.y)/s.y,c=o.width/s.x,d=o.height/s.y;if(i){const f=gt(i),h=r&&Ht(r)?gt(r):r;let g=f,m=Mv(g);for(;m&&r&&h!==g;){const b=Vo(m),v=m.getBoundingClientRect(),w=Vt(m),x=v.left+(m.clientLeft+parseFloat(w.paddingLeft))*b.x,_=v.top+(m.clientTop+parseFloat(w.paddingTop))*b.y;l*=b.x,u*=b.y,c*=b.x,d*=b.y,l+=x,u+=_,g=gt(m),m=Mv(g)}}return ru({width:c,height:d,x:l,y:u})}function cc(e,t){const n=uc(e).scrollLeft;return t?t.left+n:no(mn(e)).left+n}function JT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-cc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function DU(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=mn(r),a=t?lc(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},u=cn(1);const c=cn(0),d=fn(r);if((d||!d&&!i)&&((ki(r)!=="body"||ia(s))&&(l=uc(r)),fn(r))){const h=no(r);u=Vo(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}const f=s&&!d&&!i?JT(s,l):cn(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function $U(e){return Array.from(e.getClientRects())}function zU(e){const t=mn(e),n=uc(e),r=e.ownerDocument.body,o=ft(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ft(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+cc(e);const a=-n.scrollTop;return Vt(r).direction==="rtl"&&(s+=ft(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const $C=25;function FU(e,t){const n=gt(e),r=mn(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=T0();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const u=cc(r);if(u<=0){const c=r.ownerDocument,d=c.body,f=getComputedStyle(d),h=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-h);g<=$C&&(i-=g)}else u<=$C&&(i+=u);return{width:i,height:s,x:a,y:l}}const qU=new Set(["absolute","fixed"]);function BU(e,t){const n=no(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=fn(e)?Vo(e):cn(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,u=r*i.y;return{width:s,height:a,x:l,y:u}}function zC(e,t,n){let r;if(t==="viewport")r=FU(e,n);else if(t==="document")r=zU(mn(e));else if(Ht(t))r=BU(t,n);else{const o=ZT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ru(r)}function eA(e,t){const n=Sr(e);return n===t||!Ht(n)||ci(n)?!1:Vt(n).position==="fixed"||eA(n,t)}function HU(e,t){const n=t.get(e);if(n)return n;let r=$s(e,[],!1).filter(a=>Ht(a)&&ki(a)!=="body"),o=null;const i=Vt(e).position==="fixed";let s=i?Sr(e):e;for(;Ht(s)&&!ci(s);){const a=Vt(s),l=P0(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&qU.has(o.position)||ia(s)&&!l&&eA(e,s))?r=r.filter(c=>c!==s):o=a,s=Sr(s)}return t.set(e,r),r}function VU(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?lc(t)?[]:HU(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((u,c)=>{const d=zC(t,c,o);return u.top=ft(d.top,u.top),u.right=_r(d.right,u.right),u.bottom=_r(d.bottom,u.bottom),u.left=ft(d.left,u.left),u},zC(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function WU(e){const{width:t,height:n}=QT(e);return{width:t,height:n}}function UU(e,t,n){const r=fn(t),o=mn(t),i=n==="fixed",s=no(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=cn(0);function u(){l.x=cc(o)}if(r||!r&&!i)if((ki(t)!=="body"||ia(o))&&(a=uc(t)),r){const h=no(t,!0,i,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&u();i&&!r&&o&&u();const c=o&&!r&&!i?JT(o,a):cn(0),d=s.left+a.scrollLeft-l.x-c.x,f=s.top+a.scrollTop-l.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function sg(e){return Vt(e).position==="static"}function FC(e,t){if(!fn(e)||Vt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return mn(e)===n&&(n=n.ownerDocument.body),n}function tA(e,t){const n=gt(e);if(lc(e))return n;if(!fn(e)){let o=Sr(e);for(;o&&!ci(o);){if(Ht(o)&&!sg(o))return o;o=Sr(o)}return n}let r=FC(e,t);for(;r&&RU(r)&&sg(r);)r=FC(r,t);return r&&ci(r)&&sg(r)&&!P0(r)?n:r||IU(e)||n}const GU=async function(e){const t=this.getOffsetParent||tA,n=this.getDimensions,r=await n(e.floating);return{reference:UU(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function YU(e){return Vt(e).direction==="rtl"}const KU={convertOffsetParentRelativeRectToViewportRelativeRect:DU,getDocumentElement:mn,getClippingRect:VU,getOffsetParent:tA,getElementRects:GU,getClientRects:$U,getDimensions:WU,getScale:Vo,isElement:Ht,isRTL:YU};function nA(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function XU(e,t){let n=null,r;const o=mn(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:h}=u;if(a||t(),!f||!h)return;const g=qa(d),m=qa(o.clientWidth-(c+f)),b=qa(o.clientHeight-(d+h)),v=qa(c),x={rootMargin:-g+"px "+-m+"px "+-b+"px "+-v+"px",threshold:ft(0,_r(1,l))||1};let _=!0;function C(S){const E=S[0].intersectionRatio;if(E!==l){if(!_)return s();E?s(!1,E):r=setTimeout(()=>{s(!1,1e-7)},1e3)}E===1&&!nA(u,e.getBoundingClientRect())&&s(),_=!1}try{n=new IntersectionObserver(C,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return s(!0),i}function QU(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=A0(e),c=o||i?[...u?$s(u):[],...$s(t)]:[];c.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=u&&a?XU(u,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(v=>{let[w]=v;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let g,m=l?no(e):null;l&&b();function b(){const v=no(e);m&&!nA(m,v)&&n(),m=v,g=requestAnimationFrame(b)}return n(),()=>{var v;c.forEach(w=>{o&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),d==null||d(),(v=h)==null||v.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const ZU=_U,JU=SU,eG=xU,tG=CU,nG=wU,qC=yU,rG=EU,oG=(e,t,n)=>{const r=new Map,o={platform:KU,...n},i={...o.platform,_c:r};return vU(e,t,{...o,platform:i})};var iG=typeof document<"u",sG=function(){},cl=iG?y.useLayoutEffect:sG;function ou(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ou(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!ou(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function rA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function BC(e,t){const n=rA(e);return Math.round(t*n)/n}function ag(e){const t=y.useRef(e);return cl(()=>{t.current=e}),t}function aG(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[c,d]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=y.useState(r);ou(f,r)||h(r);const[g,m]=y.useState(null),[b,v]=y.useState(null),w=y.useCallback(N=>{N!==S.current&&(S.current=N,m(N))},[]),x=y.useCallback(N=>{N!==E.current&&(E.current=N,v(N))},[]),_=i||g,C=s||b,S=y.useRef(null),E=y.useRef(null),k=y.useRef(c),T=l!=null,I=ag(l),P=ag(o),j=ag(u),$=y.useCallback(()=>{if(!S.current||!E.current)return;const N={placement:t,strategy:n,middleware:f};P.current&&(N.platform=P.current),oG(S.current,E.current,N).then(A=>{const D={...A,isPositioned:j.current!==!1};R.current&&!ou(k.current,D)&&(k.current=D,gi.flushSync(()=>{d(D)}))})},[f,t,n,P,j]);cl(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,d(N=>({...N,isPositioned:!1})))},[u]);const R=y.useRef(!1);cl(()=>(R.current=!0,()=>{R.current=!1}),[]),cl(()=>{if(_&&(S.current=_),C&&(E.current=C),_&&C){if(I.current)return I.current(_,C,$);$()}},[_,C,$,I,T]);const L=y.useMemo(()=>({reference:S,floating:E,setReference:w,setFloating:x}),[w,x]),M=y.useMemo(()=>({reference:_,floating:C}),[_,C]),O=y.useMemo(()=>{const N={position:n,left:0,top:0};if(!M.floating)return N;const A=BC(M.floating,c.x),D=BC(M.floating,c.y);return a?{...N,transform:"translate("+A+"px, "+D+"px)",...rA(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:D}},[n,a,M.floating,c.x,c.y]);return y.useMemo(()=>({...c,update:$,refs:L,elements:M,floatingStyles:O}),[c,$,L,M,O])}const lG=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?qC({element:r.current,padding:o}).fn(n):{}:r?qC({element:r,padding:o}).fn(n):{}}}},uG=(e,t)=>({...ZU(e),options:[e,t]}),cG=(e,t)=>({...JU(e),options:[e,t]}),dG=(e,t)=>({...rG(e),options:[e,t]}),fG=(e,t)=>({...eG(e),options:[e,t]}),hG=(e,t)=>({...tG(e),options:[e,t]}),pG=(e,t)=>({...nG(e),options:[e,t]}),mG=(e,t)=>({...lG(e),options:[e,t]});var gG="Arrow",oA=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return p.jsx(he.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});oA.displayName=gG;var vG=oA;function iA(e){const[t,n]=y.useState(void 0);return Ue(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,a=u.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var M0="Popper",[sA,dc]=po(M0),[yG,aA]=sA(M0),lA=e=>{const{__scopePopper:t,children:n}=e,[r,o]=y.useState(null);return p.jsx(yG,{scope:t,anchor:r,onAnchorChange:o,children:n})};lA.displayName=M0;var uA="PopperAnchor",cA=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=aA(uA,n),s=y.useRef(null),a=ve(t,s),l=y.useRef(null);return y.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||s.current,u!==l.current&&i.onAnchorChange(l.current)}),r?null:p.jsx(he.div,{...o,ref:a})});cA.displayName=uA;var I0="PopperContent",[xG,wG]=sA(I0),dA=y.forwardRef((e,t)=>{var q,B,G,Q,Y,U;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:g,...m}=e,b=aA(I0,n),[v,w]=y.useState(null),x=ve(t,Z=>w(Z)),[_,C]=y.useState(null),S=iA(_),E=(S==null?void 0:S.width)??0,k=(S==null?void 0:S.height)??0,T=r+(i!=="center"?"-"+i:""),I=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},P=Array.isArray(u)?u:[u],j=P.length>0,$={padding:I,boundary:P.filter(_G),altBoundary:j},{refs:R,floatingStyles:L,placement:M,isPositioned:O,middlewareData:N}=aG({strategy:"fixed",placement:T,whileElementsMounted:(...Z)=>QU(...Z,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[uG({mainAxis:o+k,alignmentAxis:s}),l&&cG({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?dG():void 0,...$}),l&&fG({...$}),hG({...$,apply:({elements:Z,rects:se,availableWidth:oe,availableHeight:le})=>{const{width:ie,height:Be}=se.reference,Ae=Z.floating.style;Ae.setProperty("--radix-popper-available-width",`${oe}px`),Ae.setProperty("--radix-popper-available-height",`${le}px`),Ae.setProperty("--radix-popper-anchor-width",`${ie}px`),Ae.setProperty("--radix-popper-anchor-height",`${Be}px`)}}),_&&mG({element:_,padding:a}),SG({arrowWidth:E,arrowHeight:k}),f&&pG({strategy:"referenceHidden",...$})]}),[A,D]=pA(M),z=rt(g);Ue(()=>{O&&(z==null||z())},[O,z]);const F=(q=N.arrow)==null?void 0:q.x,V=(B=N.arrow)==null?void 0:B.y,H=((G=N.arrow)==null?void 0:G.centerOffset)!==0,[K,X]=y.useState();return Ue(()=>{v&&X(window.getComputedStyle(v).zIndex)},[v]),p.jsx("div",{ref:R.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:O?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(Q=N.transformOrigin)==null?void 0:Q.x,(Y=N.transformOrigin)==null?void 0:Y.y].join(" "),...((U=N.hide)==null?void 0:U.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(xG,{scope:n,placedSide:A,onArrowChange:C,arrowX:F,arrowY:V,shouldHideArrow:H,children:p.jsx(he.div,{"data-side":A,"data-align":D,...m,ref:x,style:{...m.style,animation:O?void 0:"none"}})})})});dA.displayName=I0;var fA="PopperArrow",bG={top:"bottom",right:"left",bottom:"top",left:"right"},hA=y.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=wG(fA,r),s=bG[i.placedSide];return p.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:p.jsx(vG,{...o,ref:n,style:{...o.style,display:"block"}})})});hA.displayName=fA;function _G(e){return e!==null}var SG=e=>({name:"transformOrigin",options:e,fn(t){var b,v,w;const{placement:n,rects:r,middlewareData:o}=t,s=((b=o.arrow)==null?void 0:b.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,c]=pA(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((v=o.arrow)==null?void 0:v.x)??0)+a/2,h=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let g="",m="";return u==="bottom"?(g=s?d:`${f}px`,m=`${-l}px`):u==="top"?(g=s?d:`${f}px`,m=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=s?d:`${h}px`):u==="left"&&(g=`${r.floating.width+l}px`,m=s?d:`${h}px`),{data:{x:g,y:m}}}});function pA(e){const[t,n="center"]=e.split("-");return[t,n]}var mA=lA,gA=cA,vA=dA,yA=hA,EG="Portal",fc=y.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,i]=y.useState(!1);Ue(()=>i(!0),[]);const s=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?wD.createPortal(p.jsx(he.div,{...r,ref:t}),s):null});fc.displayName=EG;function CG(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Yt=e=>{const{present:t,children:n}=e,r=NG(t),o=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),i=ve(r.ref,kG(o));return typeof n=="function"||r.isPresent?y.cloneElement(o,{ref:i}):null};Yt.displayName="Presence";function NG(e){const[t,n]=y.useState(),r=y.useRef(null),o=y.useRef(e),i=y.useRef("none"),s=e?"mounted":"unmounted",[a,l]=CG(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const u=Ba(r.current);i.current=a==="mounted"?u:"none"},[a]),Ue(()=>{const u=r.current,c=o.current;if(c!==e){const f=i.current,h=Ba(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ue(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,d=h=>{const m=Ba(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&m&&(l("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},f=h=>{h.target===t&&(i.current=Ba(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:y.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Ba(e){return(e==null?void 0:e.animationName)||"none"}function kG(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var RG=Symbol("radix.slottable");function PG(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=RG,t}var TG=Kv[" useInsertionEffect ".trim().toString()]||Ue;function zs({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=AG({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const c=y.useRef(e!==void 0);y.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,r])}const u=y.useCallback(c=>{var d;if(a){const f=MG(c)?c(e):c;f!==e&&((d=s.current)==null||d.call(s,f))}else i(c)},[a,e,i,s]);return[l,u]}function AG({defaultProp:e,onChange:t}){const[n,r]=y.useState(e),o=y.useRef(n),i=y.useRef(t);return TG(()=>{i.current=t},[t]),y.useEffect(()=>{var s;o.current!==n&&((s=i.current)==null||s.call(i,n),o.current=n)},[n,o]),[n,r,i]}function MG(e){return typeof e=="function"}var xA=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),IG="VisuallyHidden",wA=y.forwardRef((e,t)=>p.jsx(he.span,{...e,ref:t,style:{...xA,...e.style}}));wA.displayName=IG;var jG=wA,[hc]=po("Tooltip",[dc]),pc=dc(),bA="TooltipProvider",OG=700,Iv="tooltip.open",[LG,j0]=hc(bA),_A=e=>{const{__scopeTooltip:t,delayDuration:n=OG,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=y.useRef(!0),a=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),p.jsx(LG,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:y.useCallback(u=>{a.current=u},[]),disableHoverableContent:o,children:i})};_A.displayName=bA;var Fs="Tooltip",[DG,sa]=hc(Fs),SA=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=j0(Fs,e.__scopeTooltip),u=pc(t),[c,d]=y.useState(null),f=Vr(),h=y.useRef(0),g=s??l.disableHoverableContent,m=a??l.delayDuration,b=y.useRef(!1),[v,w]=zs({prop:r,defaultProp:o??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(Iv))):l.onClose(),i==null||i(E)},caller:Fs}),x=y.useMemo(()=>v?b.current?"delayed-open":"instant-open":"closed",[v]),_=y.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b.current=!1,w(!0)},[w]),C=y.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),S=y.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,w(!0),h.current=0},m)},[m,w]);return y.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),p.jsx(mA,{...u,children:p.jsx(DG,{scope:t,contentId:f,open:v,stateAttribute:x,trigger:c,onTriggerChange:d,onTriggerEnter:y.useCallback(()=>{l.isOpenDelayedRef.current?S():_()},[l.isOpenDelayedRef,S,_]),onTriggerLeave:y.useCallback(()=>{g?C():(window.clearTimeout(h.current),h.current=0)},[C,g]),onOpen:_,onClose:C,disableHoverableContent:g,children:n})})};SA.displayName=Fs;var jv="TooltipTrigger",EA=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=sa(jv,n),i=j0(jv,n),s=pc(n),a=y.useRef(null),l=ve(t,a,o.onTriggerChange),u=y.useRef(!1),c=y.useRef(!1),d=y.useCallback(()=>u.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),p.jsx(gA,{asChild:!0,...s,children:p.jsx(he.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:ue(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),c.current=!0)}),onPointerLeave:ue(e.onPointerLeave,()=>{o.onTriggerLeave(),c.current=!1}),onPointerDown:ue(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ue(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:ue(e.onBlur,o.onClose),onClick:ue(e.onClick,o.onClose)})})});EA.displayName=jv;var O0="TooltipPortal",[$G,zG]=hc(O0,{forceMount:void 0}),CA=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=sa(O0,t);return p.jsx($G,{scope:t,forceMount:n,children:p.jsx(Yt,{present:n||i.open,children:p.jsx(fc,{asChild:!0,container:o,children:r})})})};CA.displayName=O0;var di="TooltipContent",NA=y.forwardRef((e,t)=>{const n=zG(di,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=sa(di,e.__scopeTooltip);return p.jsx(Yt,{present:r||s.open,children:s.disableHoverableContent?p.jsx(kA,{side:o,...i,ref:t}):p.jsx(FG,{side:o,...i,ref:t})})}),FG=y.forwardRef((e,t)=>{const n=sa(di,e.__scopeTooltip),r=j0(di,e.__scopeTooltip),o=y.useRef(null),i=ve(t,o),[s,a]=y.useState(null),{trigger:l,onClose:u}=n,c=o.current,{onPointerInTransitChange:d}=r,f=y.useCallback(()=>{a(null),d(!1)},[d]),h=y.useCallback((g,m)=>{const b=g.currentTarget,v={x:g.clientX,y:g.clientY},w=WG(v,b.getBoundingClientRect()),x=UG(v,w),_=GG(m.getBoundingClientRect()),C=KG([...x,..._]);a(C),d(!0)},[d]);return y.useEffect(()=>()=>f(),[f]),y.useEffect(()=>{if(l&&c){const g=b=>h(b,c),m=b=>h(b,l);return l.addEventListener("pointerleave",g),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",m)}}},[l,c,h,f]),y.useEffect(()=>{if(s){const g=m=>{const b=m.target,v={x:m.clientX,y:m.clientY},w=(l==null?void 0:l.contains(b))||(c==null?void 0:c.contains(b)),x=!YG(v,s);w?f():x&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,c,s,u,f]),p.jsx(kA,{...e,ref:i})}),[qG,BG]=hc(Fs,{isInside:!1}),HG=PG("TooltipContent"),kA=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=sa(di,n),u=pc(n),{onClose:c}=l;return y.useEffect(()=>(document.addEventListener(Iv,c),()=>document.removeEventListener(Iv,c)),[c]),y.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),p.jsx(sc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:p.jsxs(vA,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(HG,{children:r}),p.jsx(qG,{scope:n,isInside:!0,children:p.jsx(jG,{id:l.contentId,role:"tooltip",children:o||r})})]})})});NA.displayName=di;var RA="TooltipArrow",VG=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=pc(n);return BG(RA,n).isInside?null:p.jsx(yA,{...o,...r,ref:t})});VG.displayName=RA;function WG(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function UG(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function GG(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function YG(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],u=a.x,c=a.y,d=l.x,f=l.y;c>r!=f>r&&n<(d-u)*(r-c)/(f-c)+u&&(o=!o)}return o}function KG(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),XG(t)}function XG(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var QG=_A,ZG=SA,JG=EA,eY=CA,PA=NA;const TA=QG,AA=ZG,MA=JG,L0=y.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(eY,{children:p.jsx(PA,{ref:r,sideOffset:t,className:ne("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n})}));L0.displayName=PA.displayName;const tY=(e,t,n="TB")=>{const r=new RC.graphlib.Graph;r.setDefaultEdgeLabel(()=>({})),r.setGraph({rankdir:n,nodesep:50,ranksep:80});const o=200,i=70;return e.forEach(a=>{r.setNode(a.id,{width:o,height:i})}),t.forEach(a=>{r.setEdge(a.source,a.target)}),RC.layout(r),{nodes:e.map(a=>{const l=r.node(a.id);return{...a,position:{x:l.x-o/2,y:l.y-i/2},targetPosition:n==="TB"?re.Top:re.Left,sourcePosition:n==="TB"?re.Bottom:re.Right}}),edges:t}};function nY(e){const t=e.split("/"),n=t[t.length-1];return n.length>20?n.slice(0,17)+"...":n}function rY({data:e}){const t=ne("px-4 py-3 rounded-md border-2 transition-all duration-200 cursor-pointer min-w-[160px] shadow-sm","hover:shadow-lg hover:scale-105",{"bg-emerald-950 border-emerald-500 text-emerald-300":e.isEntryPoint&&!e.isSelected,"bg-red-950 border-red-500 text-red-300":e.isHighCoupling&&!e.isEntryPoint&&!e.isSelected,"bg-blue-950 border-blue-400 text-blue-200 ring-2 ring-blue-400/50 shadow-lg shadow-blue-500/20":e.isSelected,"bg-neutral-900 border-neutral-600 text-neutral-200":!e.isEntryPoint&&!e.isHighCoupling&&!e.isSelected,"opacity-20":e.isFaded});return p.jsx(TA,{children:p.jsxs(AA,{children:[p.jsx(MA,{asChild:!0,children:p.jsxs("div",{className:t,onDoubleClick:()=>e.onDoubleClick(e.fullPath),children:[p.jsx(ui,{type:"target",position:re.Top,className:"!bg-neutral-500 !w-3 !h-3 !border-2 !border-neutral-400"}),p.jsxs("div",{className:"flex flex-col items-center gap-2",children:[p.jsx("span",{className:"text-sm font-mono font-semibold text-center leading-tight",children:e.label}),p.jsxs("div",{className:"flex gap-1.5",children:[e.importerCount>0&&p.jsxs(kt,{variant:"secondary",className:"text-xs px-1.5 py-0.5 h-5 bg-neutral-800 text-neutral-300 border border-neutral-600",children:["↓",e.importerCount]}),e.importCount>0&&p.jsxs(kt,{variant:"secondary",className:"text-xs px-1.5 py-0.5 h-5 bg-neutral-800 text-neutral-300 border border-neutral-600",children:["↑",e.importCount]})]})]}),p.jsx(ui,{type:"source",position:re.Bottom,className:"!bg-neutral-500 !w-3 !h-3 !border-2 !border-neutral-400"})]})}),p.jsx(L0,{side:"bottom",className:"max-w-xs",children:p.jsx("p",{className:"font-mono text-xs break-all",children:e.fullPath})})]})})}const IA=y.memo(rY);IA.displayName="FileNode";const oY={fileNode:IA};function iY({files:e,imports:t,onFileSelect:n,selectedFile:r}){const[o,i]=y.useState("TB"),[s,a]=y.useState(!1),[l,u]=y.useState(null),{importers:c,dependencies:d,connectedFiles:f}=y.useMemo(()=>{var D,z;const M=new Set(e.map(F=>F.path)),O=new Map,N=new Map,A=new Set;for(const F of e)O.set(F.path,new Set),N.set(F.path,new Set);for(const F of t)M.has(F.source)&&M.has(F.target)&&((D=O.get(F.target))==null||D.add(F.source),(z=N.get(F.source))==null||z.add(F.target),A.add(F.source),A.add(F.target));return{importers:O,dependencies:N,connectedFiles:A}},[e,t]),h=y.useMemo(()=>{const M=e.map(N=>{var A;return((A=d.get(N.path))==null?void 0:A.size)||0});M.sort((N,A)=>A-N);const O=M[Math.floor(M.length*.1)]||5;return Math.max(O,5)},[e,d]),g=y.useCallback(M=>{const O=new Set;O.add(M);const N=d.get(M);N&&N.forEach(D=>O.add(D));const A=c.get(M);return A&&A.forEach(D=>O.add(D)),O},[c,d]),m=y.useCallback(M=>{n==null||n(M)},[n]),{initialNodes:b,initialEdges:v}=y.useMemo(()=>{const M=l?g(l):null,O=s?e.filter(z=>f.has(z.path)):e,N=O.map(z=>{var B,G;const F=((B=d.get(z.path))==null?void 0:B.size)||0,V=((G=c.get(z.path))==null?void 0:G.size)||0,H=V===0&&F>0,K=F>=h,X=r===z.path,q=M?!M.has(z.path):!1;return{id:z.path,type:"fileNode",position:{x:0,y:0},data:{label:nY(z.path),fullPath:z.path,importCount:F,importerCount:V,isEntryPoint:H,isHighCoupling:K,isSelected:X,isFaded:q,onDoubleClick:m}}}),A=new Set(O.map(z=>z.path)),D=t.filter(z=>A.has(z.source)&&A.has(z.target)).map((z,F)=>{const V=M&&M.has(z.source)&&M.has(z.target),H=M&&!V;return{id:`edge-${F}`,source:z.source,target:z.target,type:"smoothstep",markerEnd:{type:js.ArrowClosed,width:15,height:15,color:V?"hsl(var(--primary))":"hsl(var(--border))"},style:{stroke:V?"hsl(var(--primary))":"hsl(var(--border))",strokeWidth:V?2:1,opacity:H?.1:1},animated:V||!1}});return{initialNodes:N,initialEdges:D}},[e,t,c,d,f,h,r,l,s,g,m]),{nodes:w,edges:x}=y.useMemo(()=>tY(b,v,o),[b,v,o]),[_,C,S]=iB(w),[E,k,T]=sB(x);y.useEffect(()=>{C(w),k(x)},[w,x,C,k]);const I=y.useCallback((M,O)=>{u(N=>N===O.id?null:O.id)},[]),P=y.useCallback(()=>{u(null)},[]),j=y.useCallback(()=>{i(M=>M==="TB"?"LR":"TB")},[]),$=y.useCallback(()=>{a(M=>!M)},[]),R=e.length>500,L=s?[...f].length:e.length;return e.length===0?p.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:p.jsx("p",{children:"No file data available. Load a snapshot with enhanced metadata."})}):t.length===0?p.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:p.jsx("p",{children:"No import data available. This snapshot may not include dependency information."})}):p.jsxs("div",{className:"h-full w-full relative",children:[p.jsxs("div",{className:"absolute top-4 left-4 z-10 flex gap-2",children:[p.jsx(vr,{variant:"secondary",size:"sm",onClick:j,className:"gap-1",children:o==="TB"?p.jsxs(p.Fragment,{children:[p.jsx(PD,{className:"h-4 w-4"}),p.jsx("span",{className:"hidden sm:inline",children:"Vertical"})]}):p.jsxs(p.Fragment,{children:[p.jsx(AD,{className:"h-4 w-4"}),p.jsx("span",{className:"hidden sm:inline",children:"Horizontal"})]})}),p.jsxs(vr,{variant:s?"default":"secondary",size:"sm",onClick:$,className:"gap-1",children:[p.jsx(i3,{className:"h-4 w-4"}),p.jsx("span",{className:"hidden sm:inline",children:"Connected Only"})]}),l&&p.jsxs(vr,{variant:"secondary",size:"sm",onClick:P,className:"gap-1",children:[p.jsx(v3,{className:"h-4 w-4"}),p.jsx("span",{className:"hidden sm:inline",children:"Clear Focus"})]})]}),R&&!s&&p.jsx("div",{className:"absolute top-4 right-4 z-10",children:p.jsxs("div",{className:"flex items-center gap-2 bg-warning/10 border border-warning/30 text-warning-foreground px-3 py-2 rounded-md text-sm",children:[p.jsx(_2,{className:"h-4 w-4"}),p.jsxs("span",{children:["Large codebase (",e.length," files). Consider filtering by directory or enabling Connected Only."]})]})}),p.jsxs("div",{className:"absolute bottom-4 left-4 z-10 flex gap-4 bg-neutral-900/95 backdrop-blur-sm border border-neutral-700 rounded-md px-4 py-2.5 text-sm",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-4 h-4 rounded bg-emerald-950 border-2 border-emerald-500"}),p.jsx("span",{className:"text-neutral-300",children:"Entry Point"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-4 h-4 rounded bg-red-950 border-2 border-red-500"}),p.jsx("span",{className:"text-neutral-300",children:"High Coupling"})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("div",{className:"w-4 h-4 rounded bg-neutral-900 border-2 border-neutral-600"}),p.jsx("span",{className:"text-neutral-300",children:"Normal"})]})]}),p.jsx("div",{className:"absolute bottom-4 right-4 z-10",children:p.jsxs(kt,{variant:"secondary",children:[L," / ",e.length," files"]})}),p.jsxs(oB,{nodes:_,edges:E,onNodesChange:S,onEdgesChange:T,onNodeClick:I,nodeTypes:oY,fitView:!0,fitViewOptions:{padding:.2},minZoom:.1,maxZoom:2,defaultEdgeOptions:{type:"smoothstep"},children:[p.jsx(yB,{showInteractive:!1}),p.jsx(AB,{nodeColor:M=>{const O=M.data;return O.isSelected?"#3b82f6":O.isEntryPoint?"#10b981":O.isHighCoupling?"#ef4444":"#525252"},maskColor:"rgba(0, 0, 0, 0.8)",className:"!bg-neutral-900/90 !border-neutral-700"}),p.jsx(dB,{variant:Mn.Dots,gap:16,size:1})]})]})}var sY=y.createContext(void 0);function jA(e){const t=y.useContext(sY);return e||t||"ltr"}function Ov(e,[t,n]){return Math.min(n,Math.max(t,e))}function aY(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var D0="ScrollArea",[OA]=po(D0),[lY,Tt]=OA(D0),LA=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...s}=e,[a,l]=y.useState(null),[u,c]=y.useState(null),[d,f]=y.useState(null),[h,g]=y.useState(null),[m,b]=y.useState(null),[v,w]=y.useState(0),[x,_]=y.useState(0),[C,S]=y.useState(!1),[E,k]=y.useState(!1),T=ve(t,P=>l(P)),I=jA(o);return p.jsx(lY,{scope:n,type:r,dir:I,scrollHideDelay:i,scrollArea:a,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:C,onScrollbarXEnabledChange:S,scrollbarY:m,onScrollbarYChange:b,scrollbarYEnabled:E,onScrollbarYEnabledChange:k,onCornerWidthChange:w,onCornerHeightChange:_,children:p.jsx(he.div,{dir:I,...s,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});LA.displayName=D0;var DA="ScrollAreaViewport",$A=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...i}=e,s=Tt(DA,n),a=y.useRef(null),l=ve(t,a,s.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(he.div,{"data-radix-scroll-area-viewport":"",...i,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});$A.displayName=DA;var gn="ScrollAreaScrollbar",$0=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Tt(gn,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:s}=o,a=e.orientation==="horizontal";return y.useEffect(()=>(a?i(!0):s(!0),()=>{a?i(!1):s(!1)}),[a,i,s]),o.type==="hover"?p.jsx(uY,{...r,ref:t,forceMount:n}):o.type==="scroll"?p.jsx(cY,{...r,ref:t,forceMount:n}):o.type==="auto"?p.jsx(zA,{...r,ref:t,forceMount:n}):o.type==="always"?p.jsx(z0,{...r,ref:t}):null});$0.displayName=gn;var uY=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Tt(gn,e.__scopeScrollArea),[i,s]=y.useState(!1);return y.useEffect(()=>{const a=o.scrollArea;let l=0;if(a){const u=()=>{window.clearTimeout(l),s(!0)},c=()=>{l=window.setTimeout(()=>s(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",c)}}},[o.scrollArea,o.scrollHideDelay]),p.jsx(Yt,{present:n||i,children:p.jsx(zA,{"data-state":i?"visible":"hidden",...r,ref:t})})}),cY=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Tt(gn,e.__scopeScrollArea),i=e.orientation==="horizontal",s=gc(()=>l("SCROLL_END"),100),[a,l]=aY("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,o.scrollHideDelay,l]),y.useEffect(()=>{const u=o.viewport,c=i?"scrollLeft":"scrollTop";if(u){let d=u[c];const f=()=>{const h=u[c];d!==h&&(l("SCROLL"),s()),d=h};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[o.viewport,i,l,s]),p.jsx(Yt,{present:n||a!=="hidden",children:p.jsx(z0,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:ue(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ue(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),zA=y.forwardRef((e,t)=>{const n=Tt(gn,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,s]=y.useState(!1),a=e.orientation==="horizontal",l=gc(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,c=n.viewport.offsetHeight<n.viewport.scrollHeight;s(a?u:c)}},10);return fi(n.viewport,l),fi(n.content,l),p.jsx(Yt,{present:r||i,children:p.jsx(z0,{"data-state":i?"visible":"hidden",...o,ref:t})})}),z0=y.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=Tt(gn,e.__scopeScrollArea),i=y.useRef(null),s=y.useRef(0),[a,l]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=VA(a.viewport,a.content),c={...r,sizes:a,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function d(f,h){return gY(f,s.current,a,h)}return n==="horizontal"?p.jsx(dY,{...c,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollLeft,h=HC(f,a,o.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=d(f,o.dir))}}):n==="vertical"?p.jsx(fY,{...c,ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollTop,h=HC(f,a);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=d(f))}}):null}),dY=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Tt(gn,e.__scopeScrollArea),[s,a]=y.useState(),l=y.useRef(null),u=ve(t,l,i.onScrollbarXChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(qA,{"data-orientation":"horizontal",...o,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":mc(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(i.viewport){const f=i.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),UA(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:su(s.paddingLeft),paddingEnd:su(s.paddingRight)}})}})}),fY=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Tt(gn,e.__scopeScrollArea),[s,a]=y.useState(),l=y.useRef(null),u=ve(t,l,i.onScrollbarYChange);return y.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(qA,{"data-orientation":"vertical",...o,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":mc(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(i.viewport){const f=i.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),UA(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&i.viewport&&s&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:su(s.paddingTop),paddingEnd:su(s.paddingBottom)}})}})}),[hY,FA]=OA(gn),qA=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,h=Tt(gn,n),[g,m]=y.useState(null),b=ve(t,T=>m(T)),v=y.useRef(null),w=y.useRef(""),x=h.viewport,_=r.content-r.viewport,C=rt(c),S=rt(l),E=gc(d,10);function k(T){if(v.current){const I=T.clientX-v.current.left,P=T.clientY-v.current.top;u({x:I,y:P})}}return y.useEffect(()=>{const T=I=>{const P=I.target;(g==null?void 0:g.contains(P))&&C(I,_)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[x,g,_,C]),y.useEffect(S,[r,S]),fi(g,E),fi(h.content,E),p.jsx(hY,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:rt(i),onThumbPointerUp:rt(s),onThumbPositionChange:S,onThumbPointerDown:rt(a),children:p.jsx(he.div,{...f,ref:b,style:{position:"absolute",...f.style},onPointerDown:ue(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),v.current=g.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),k(T))}),onPointerMove:ue(e.onPointerMove,k),onPointerUp:ue(e.onPointerUp,T=>{const I=T.target;I.hasPointerCapture(T.pointerId)&&I.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=w.current,h.viewport&&(h.viewport.style.scrollBehavior=""),v.current=null})})})}),iu="ScrollAreaThumb",BA=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=FA(iu,e.__scopeScrollArea);return p.jsx(Yt,{present:n||o.hasThumb,children:p.jsx(pY,{ref:t,...r})})}),pY=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=Tt(iu,n),s=FA(iu,n),{onThumbPositionChange:a}=s,l=ve(t,d=>s.onThumbChange(d)),u=y.useRef(void 0),c=gc(()=>{u.current&&(u.current(),u.current=void 0)},100);return y.useEffect(()=>{const d=i.viewport;if(d){const f=()=>{if(c(),!u.current){const h=vY(d,a);u.current=h,a()}};return a(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[i.viewport,c,a]),p.jsx(he.div,{"data-state":s.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:ue(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),g=d.clientX-h.left,m=d.clientY-h.top;s.onThumbPointerDown({x:g,y:m})}),onPointerUp:ue(e.onPointerUp,s.onThumbPointerUp)})});BA.displayName=iu;var F0="ScrollAreaCorner",HA=y.forwardRef((e,t)=>{const n=Tt(F0,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.jsx(mY,{...e,ref:t}):null});HA.displayName=F0;var mY=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Tt(F0,n),[i,s]=y.useState(0),[a,l]=y.useState(0),u=!!(i&&a);return fi(o.scrollbarX,()=>{var d;const c=((d=o.scrollbarX)==null?void 0:d.offsetHeight)||0;o.onCornerHeightChange(c),l(c)}),fi(o.scrollbarY,()=>{var d;const c=((d=o.scrollbarY)==null?void 0:d.offsetWidth)||0;o.onCornerWidthChange(c),s(c)}),u?p.jsx(he.div,{...r,ref:t,style:{width:i,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function su(e){return e?parseInt(e,10):0}function VA(e,t){const n=e/t;return isNaN(n)?0:n}function mc(e){const t=VA(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function gY(e,t,n,r="ltr"){const o=mc(n),i=o/2,s=t||i,a=o-s,l=n.scrollbar.paddingStart+s,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,c=n.content-n.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return WA([l,u],d)(e)}function HC(e,t,n="ltr"){const r=mc(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,s=t.content-t.viewport,a=i-r,l=n==="ltr"?[0,s]:[s*-1,0],u=Ov(e,l);return WA([0,s],[0,a])(u)}function WA(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function UA(e,t){return e>0&&e<t}var vY=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},s=n.left!==i.left,a=n.top!==i.top;(s||a)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function gc(e,t){const n=rt(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function fi(e,t){const n=rt(t);Ue(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var GA=LA,yY=$A,xY=HA;const vc=y.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(GA,{ref:r,className:ne("relative overflow-hidden",e),...n,children:[p.jsx(yY,{className:"h-full w-full rounded-[inherit]",children:t}),p.jsx(YA,{}),p.jsx(xY,{})]}));vc.displayName=GA.displayName;const YA=y.forwardRef(({className:e,orientation:t="vertical",...n},r)=>p.jsx($0,{ref:r,orientation:t,className:ne("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:p.jsx(BA,{className:"relative flex-1 rounded-full bg-border"})}));YA.displayName=$0.displayName;function lg(e){const t=wY(e),n=bY(e);return{raw:e,metadata:t,fileContents:n}}function wY(e){if(!e.includes("METADATA: IMPORT GRAPH"))return null;const t=[],n=[],r=[],o={},i=/METADATA: IMPORT GRAPH\n={80}\n([\s\S]*?)(?=\n\n={80}\nMETADATA:|$)/g,s=[...e.matchAll(i)],a=s.length>0?s[s.length-1]:null;if(a){const g=a[1].trim();let m="";for(const b of g.split(`
|
|
253
|
-
`)){const v=b.match(/^([^\s].+):$/);if(v){m=v[1];continue}const w=b.match(/^\s+(?:→|->)\s*(.+)$/);w&&m&&n.push({source:m,target:w[1]})}}const l=/METADATA: EXPORT INDEX\n={80}\n([\s\S]*?)(?=\n\n={80}\nMETADATA:|$)/g,u=[...e.matchAll(l)],c=u.length>0?u[u.length-1]:null;if(c){const g=c[1].trim().split(`
|
|
254
|
-
`);for(const m of g){const b=m.match(/^([^:]+):\s*(.+)$/);if(b){const v=b[1].trim(),x=b[2].trim().split(",").map(_=>_.trim());x.length>0&&(o[v]=x[0]),r.push({file:v,symbols:x})}}}const d=e.match(/METADATA: FILE EXPORTS\n={80}\n([\s\S]*?)(?=\n\n={80}\nMETADATA:|={80}\nFILE:|$)/);if(d){const g=d[1].trim().split(`
|
|
255
|
-
`);for(const m of g){const b=m.match(/^([^:]+):\d+\s*-\s*\w+\s+(\S+)/);if(b){const v=b[1].trim(),w=b[2].split(" ")[0];o[w]=v}}}const f=/^={80}\nFILE: \.\/(.+?)\n={80}/gm;let h;for(;(h=f.exec(e))!==null;){const g=h[1],m=g.split(".").pop()||"",b=h.index+h[0].length,v=e.indexOf(`
|
|
256
|
-
================================================================================
|
|
257
|
-
FILE:`,b),w=e.indexOf(`
|
|
258
|
-
METADATA:`,b),x=Math.min(v===-1?e.length:v,w===-1?e.length:w),C=e.slice(b,x).split(`
|
|
259
|
-
`).length-1;t.push({path:g,lines:C,extension:m})}return{files:t,imports:n,exports:r,symbolIndex:o}}function bY(e){const t=new Map,n="=".repeat(80),r=e.split(n);for(let o=0;o<r.length;o++){const s=r[o].match(/^\nFILE: \.\/(.+?)\n$/);if(s&&o+1<r.length){const a=s[1];let l=r[o+1];l.startsWith(`
|
|
260
|
-
`)&&(l=l.slice(1)),l.endsWith(`
|
|
261
|
-
`)&&(l=l.slice(0,-1)),t.set(a,l)}}if(t.size===0){const o=/^={80}\n\/\/ File: (.+?) \(\d+ lines\)\n={80}\n([\s\S]*?)(?=^={80}|$)/gm;let i;for(;(i=o.exec(e))!==null;)t.set(i[1],i[2].trim())}return t}function _Y(e){var r;const t={name:"root",path:"",type:"directory",children:[]};for(const o of e){const i=o.path.split("/");let s=t;for(let a=0;a<i.length;a++){const l=i[a],u=a===i.length-1,c=i.slice(0,a+1).join("/");let d=(r=s.children)==null?void 0:r.find(f=>f.name===l);d||(d={name:l,path:c,type:u?"file":"directory",children:u?void 0:[],extension:u?o.extension:void 0,lines:u?o.lines:void 0},s.children=s.children||[],s.children.push(d)),s=d}}const n=o=>{o.children&&(o.children.sort((i,s)=>i.type!==s.type?i.type==="directory"?-1:1:i.name.localeCompare(s.name)),o.children.forEach(n))};return n(t),t}function SY(e,t,n={}){const{caseSensitive:r=!1,maxResults:o=100}=n,i=[],s=new RegExp(t,r?"g":"gi");for(const[a,l]of e.fileContents){const u=l.split(`
|
|
262
|
-
`);for(let c=0;c<u.length;c++){if(s.test(u[c])&&(i.push({file:a,line:c+1,content:u[c].trim()}),i.length>=o))return i;s.lastIndex=0}}return i}function KA(e){return{ts:"#3178c6",tsx:"#3178c6",js:"#f7df1e",jsx:"#61dafb",py:"#3776ab",rs:"#dea584",go:"#00add8",java:"#b07219",rb:"#cc342d",php:"#777bb4",md:"#083fa1",json:"#292929",css:"#264de4",scss:"#c6538c",html:"#e34c26"}[e]||"#8b949e"}function XA({node:e,depth:t,onFileSelect:n,selectedFile:r,expandedPaths:o,toggleExpanded:i}){const s=o.has(e.path),a=r===e.path,l=e.children&&e.children.length>0,u=()=>{e.type==="directory"?i(e.path):n&&n(e.path)},c=()=>{if(e.type==="directory")return s?p.jsx(Dl,{className:"h-4 w-4 text-muted-foreground"}):p.jsx(r3,{className:"h-4 w-4 text-muted-foreground"});const d=e.extension?KA(e.extension):void 0;return p.jsx(ZD,{className:"h-4 w-4",style:d?{color:d}:void 0})};return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:ne("flex items-center gap-1 px-2 py-1 cursor-pointer rounded-sm transition-colors",a?"bg-accent text-accent-foreground":"hover:bg-muted/50"),style:{paddingLeft:`${t*12+8}px`},onClick:u,children:[e.type==="directory"&&p.jsx("span",{className:"text-muted-foreground",children:s?p.jsx(Us,{className:"h-3 w-3"}):p.jsx(zD,{className:"h-3 w-3"})}),e.type==="file"&&p.jsx("span",{className:"w-3"}),c(),p.jsx("span",{className:"truncate flex-1 text-sm",children:e.name}),e.lines!==void 0&&p.jsx("span",{className:"text-xs text-muted-foreground tabular-nums",children:e.lines})]}),s&&l&&p.jsx("div",{children:e.children.map(d=>p.jsx(XA,{node:d,depth:t+1,onFileSelect:n,selectedFile:r,expandedPaths:o,toggleExpanded:i},d.path))})]})}function EY({tree:e,onFileSelect:t,selectedFile:n}){const[r,o]=y.useState(new Set([""])),i=y.useCallback(l=>{o(u=>{const c=new Set(u);return c.has(l)?c.delete(l):c.add(l),c})},[]),s=y.useCallback(()=>{const l=new Set,u=c=>{var d;c.type==="directory"&&(l.add(c.path),(d=c.children)==null||d.forEach(u))};u(e),o(l)},[e]),a=y.useCallback(()=>{o(new Set([""]))},[]);return!e.children||e.children.length===0?p.jsx("div",{className:"p-4 text-muted-foreground text-sm",children:"No files loaded. Drop a snapshot file or enter a path."}):p.jsxs("div",{className:"flex flex-col h-full",children:[p.jsxs("div",{className:"flex gap-1 p-2 border-b",children:[p.jsxs(vr,{variant:"ghost",size:"sm",onClick:s,className:"h-7 px-2 text-xs",children:[p.jsx(u3,{className:"h-3 w-3 mr-1"}),"Expand"]}),p.jsxs(vr,{variant:"ghost",size:"sm",onClick:a,className:"h-7 px-2 text-xs",children:[p.jsx(d3,{className:"h-3 w-3 mr-1"}),"Collapse"]})]}),p.jsx(vc,{className:"flex-1",children:p.jsx("div",{className:"py-1",children:e.children.map(l=>p.jsx(XA,{node:l,depth:0,onFileSelect:t,selectedFile:n,expandedPaths:r,toggleExpanded:i},l.path))})})]})}function VC({data:e,selectedFile:t,highlightLine:n}){const r=y.useMemo(()=>!e||!t?null:e.fileContents.get(t)||null,[e,t]),o=y.useMemo(()=>t&&t.split(".").pop()||"",[t]);if(!t)return p.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:p.jsxs("div",{className:"text-center",children:[p.jsx(YD,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),p.jsx("p",{children:"Select a file to view its contents"})]})});if(!r)return p.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:p.jsxs("div",{className:"text-center",children:[p.jsx("p",{children:"File content not found"}),p.jsx("p",{className:"text-sm mt-2 font-mono",children:t})]})});const i=r.split(`
|
|
263
|
-
`),s=KA(o);return p.jsxs("div",{className:"flex flex-col h-full",children:[p.jsxs("div",{className:"px-4 py-2 border-b flex items-center gap-2",children:[p.jsx("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:s}}),p.jsx("span",{className:"text-sm font-medium truncate flex-1",children:t}),p.jsxs(kt,{variant:"secondary",className:"text-xs",children:[i.length," lines"]})]}),p.jsx(vc,{className:"flex-1",children:p.jsx("table",{className:"w-full font-mono text-sm",children:p.jsx("tbody",{children:i.map((a,l)=>{const u=l+1,c=n===u;return p.jsxs("tr",{className:ne("hover:bg-muted/50",c&&"bg-primary/10"),id:`line-${u}`,children:[p.jsx("td",{className:"px-4 py-0.5 text-right text-muted-foreground select-none w-12 border-r tabular-nums",children:u}),p.jsx("td",{className:"px-4 py-0.5 whitespace-pre overflow-x-auto",children:a||" "})]},u)})})})})]})}const q0=y.forwardRef(({className:e,type:t,...n},r)=>p.jsx("input",{type:t,className:ne("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));q0.displayName="Input";function QA(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var yc="Checkbox",[CY]=po(yc),[NY,B0]=CY(yc);function kY(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:s,name:a,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[f,h]=zs({prop:n,defaultProp:o??!1,onChange:l,caller:yc}),[g,m]=y.useState(null),[b,v]=y.useState(null),w=y.useRef(!1),x=g?!!s||!!g.closest("form"):!0,_={checked:f,disabled:i,setChecked:h,control:g,setControl:m,name:a,form:s,value:c,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:yr(o)?!1:o,isFormControl:x,bubbleInput:b,setBubbleInput:v};return p.jsx(NY,{scope:t,..._,children:RY(d)?d(_):r})}var ZA="CheckboxTrigger",JA=y.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:i,value:s,disabled:a,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:h,bubbleInput:g}=B0(ZA,e),m=ve(o,c),b=y.useRef(l);return y.useEffect(()=>{const v=i==null?void 0:i.form;if(v){const w=()=>d(b.current);return v.addEventListener("reset",w),()=>v.removeEventListener("reset",w)}},[i,d]),p.jsx(he.button,{type:"button",role:"checkbox","aria-checked":yr(l)?"mixed":l,"aria-required":u,"data-state":oM(l),"data-disabled":a?"":void 0,disabled:a,value:s,...r,ref:m,onKeyDown:ue(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:ue(n,v=>{d(w=>yr(w)?!0:!w),g&&h&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});JA.displayName=ZA;var H0=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:s,disabled:a,value:l,onCheckedChange:u,form:c,...d}=e;return p.jsx(kY,{__scopeCheckbox:n,checked:o,defaultChecked:i,disabled:a,required:s,onCheckedChange:u,name:r,form:c,value:l,internal_do_not_use_render:({isFormControl:f})=>p.jsxs(p.Fragment,{children:[p.jsx(JA,{...d,ref:t,__scopeCheckbox:n}),f&&p.jsx(rM,{__scopeCheckbox:n})]})})});H0.displayName=yc;var eM="CheckboxIndicator",tM=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=B0(eM,n);return p.jsx(Yt,{present:r||yr(i.checked)||i.checked===!0,children:p.jsx(he.span,{"data-state":oM(i.checked),"data-disabled":i.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});tM.displayName=eM;var nM="CheckboxBubbleInput",rM=y.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:i,defaultChecked:s,required:a,disabled:l,name:u,value:c,form:d,bubbleInput:f,setBubbleInput:h}=B0(nM,e),g=ve(n,h),m=QA(i),b=iA(r);y.useEffect(()=>{const w=f;if(!w)return;const x=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(x,"checked").set,S=!o.current;if(m!==i&&C){const E=new Event("click",{bubbles:S});w.indeterminate=yr(i),C.call(w,yr(i)?!1:i),w.dispatchEvent(E)}},[f,m,i,o]);const v=y.useRef(yr(i)?!1:i);return p.jsx(he.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??v.current,required:a,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:g,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});rM.displayName=nM;function RY(e){return typeof e=="function"}function yr(e){return e==="indeterminate"}function oM(e){return yr(e)?"indeterminate":e?"checked":"unchecked"}const iM=y.forwardRef(({className:e,...t},n)=>p.jsx(H0,{ref:n,className:ne("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:p.jsx(tM,{className:ne("grid place-content-center text-current"),children:p.jsx(x2,{className:"h-4 w-4"})})}));iM.displayName=H0.displayName;var PY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],TY=PY.reduce((e,t)=>{const n=ic(`Primitive.${t}`),r=y.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),AY="Label",sM=y.forwardRef((e,t)=>p.jsx(TY.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));sM.displayName=AY;var aM=sM;const MY=Gs("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),lM=y.forwardRef(({className:e,...t},n)=>p.jsx(aM,{ref:n,className:ne(MY(),e),...t}));lM.displayName=aM.displayName;function IY({data:e,onFileSelect:t}){const[n,r]=y.useState(""),[o,i]=y.useState(!1),s=y.useMemo(()=>{if(!e||!n.trim()||n.length<2)return[];try{return SY(e,n,{caseSensitive:o,maxResults:100})}catch{return[]}},[e,n,o]),a=y.useMemo(()=>{const u=new Map;for(const c of s){const d=u.get(c.file)||[];d.push(c),u.set(c.file,d)}return u},[s]),l=(u,c)=>{t&&t(u,c)};return p.jsxs("div",{className:"flex flex-col h-full",children:[p.jsxs("div",{className:"p-3 border-b space-y-3",children:[p.jsxs("div",{className:"relative",children:[p.jsx(b2,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-muted-foreground"}),p.jsx(q0,{type:"text",value:n,onChange:u=>r(u.target.value),placeholder:"Search in codebase... (regex supported)",className:"pl-9"})]}),p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(iM,{id:"case-sensitive",checked:o,onCheckedChange:u=>i(u)}),p.jsx(lM,{htmlFor:"case-sensitive",className:"text-xs text-muted-foreground cursor-pointer",children:"Case sensitive"})]}),s.length>0&&p.jsxs(kt,{variant:"secondary",className:"text-xs",children:[s.length," in ",a.size," file",a.size!==1?"s":""]})]})]}),p.jsxs(vc,{className:"flex-1",children:[n.length>0&&n.length<2&&p.jsx("div",{className:"p-4 text-muted-foreground text-sm",children:"Type at least 2 characters to search"}),n.length>=2&&s.length===0&&p.jsxs("div",{className:"p-4 text-muted-foreground text-sm",children:['No results found for "',n,'"']}),Array.from(a.entries()).map(([u,c])=>p.jsxs("div",{className:"border-b",children:[p.jsxs("div",{className:"px-3 py-2 bg-muted/50 text-sm font-medium text-primary truncate flex items-center justify-between",children:[p.jsx("span",{className:"truncate",children:u}),p.jsx(kt,{variant:"outline",className:"text-xs ml-2 shrink-0",children:c.length})]}),p.jsx("div",{className:"divide-y divide-border/50",children:c.map((d,f)=>p.jsx("div",{className:"px-3 py-2 hover:bg-muted/50 cursor-pointer transition-colors",onClick:()=>l(u,d.line),children:p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx("span",{className:"text-xs text-muted-foreground font-mono min-w-[40px] tabular-nums",children:d.line}),p.jsx("code",{className:"text-sm break-all",children:jY(d.content,n,o)})]})},`${d.line}-${f}`))})]},u))]})]})}function jY(e,t,n){try{const r=new RegExp(`(${t})`,n?"g":"gi");return e.split(r).map((i,s)=>r.test(i)?(r.lastIndex=0,p.jsx("span",{className:"bg-chart-4/30 text-chart-4 px-0.5 rounded",children:i},s)):i)}catch{return e}}function OY(e,t=[]){let n=[];function r(i,s){const a=y.createContext(s);a.displayName=i+"Context";const l=n.length;n=[...n,s];const u=d=>{var v;const{scope:f,children:h,...g}=d,m=((v=f==null?void 0:f[e])==null?void 0:v[l])||a,b=y.useMemo(()=>g,Object.values(g));return p.jsx(m.Provider,{value:b,children:h})};u.displayName=i+"Provider";function c(d,f){var m;const h=((m=f==null?void 0:f[e])==null?void 0:m[l])||a,g=y.useContext(h);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${i}\``)}return[u,c]}const o=()=>{const i=n.map(s=>y.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return y.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,LY(o,...t)]}function LY(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...a,...d}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}var DY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],uM=DY.reduce((e,t)=>{const n=ic(`Primitive.${t}`),r=y.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),V0="Progress",W0=100,[$Y]=OY(V0),[zY,FY]=$Y(V0),cM=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=qY,...s}=e;(o||o===0)&&!WC(o)&&console.error(BY(`${o}`,"Progress"));const a=WC(o)?o:W0;r!==null&&!UC(r,a)&&console.error(HY(`${r}`,"Progress"));const l=UC(r,a)?r:null,u=au(l)?i(l,a):void 0;return p.jsx(zY,{scope:n,value:l,max:a,children:p.jsx(uM.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":au(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":hM(l,a),"data-value":l??void 0,"data-max":a,...s,ref:t})})});cM.displayName=V0;var dM="ProgressIndicator",fM=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=FY(dM,n);return p.jsx(uM.div,{"data-state":hM(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});fM.displayName=dM;function qY(e,t){return`${Math.round(e/t*100)}%`}function hM(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function au(e){return typeof e=="number"}function WC(e){return au(e)&&!isNaN(e)&&e>0}function UC(e,t){return au(e)&&!isNaN(e)&&e<=t&&e>=0}function BY(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${W0}\`.`}function HY(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
264
|
-
- a positive number
|
|
265
|
-
- less than the value passed to \`max\` (or ${W0} if no \`max\` prop is set)
|
|
266
|
-
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
267
|
-
|
|
268
|
-
Defaulting to \`null\`.`}var pM=cM,VY=fM;const WY=y.forwardRef(({className:e,value:t,...n},r)=>p.jsx(pM,{ref:r,className:ne("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",e),...n,children:p.jsx(VY,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));WY.displayName=pM.displayName;const ug=768;function UY(){const[e,t]=y.useState(void 0);return y.useEffect(()=>{const n=window.matchMedia(`(max-width: ${ug-1}px)`),r=()=>{t(window.innerWidth<ug)};return n.addEventListener("change",r),t(window.innerWidth<ug),()=>n.removeEventListener("change",r)},[]),!!e}var GY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],YY=GY.reduce((e,t)=>{const n=ic(`Primitive.${t}`),r=y.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),KY="Separator",GC="horizontal",XY=["horizontal","vertical"],mM=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=GC,...o}=e,i=QY(r)?r:GC,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return p.jsx(YY.div,{"data-orientation":i,...a,...o,ref:t})});mM.displayName=KY;function QY(e){return XY.includes(e)}var gM=mM;const cs=y.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...r},o)=>p.jsx(gM,{ref:o,decorative:n,orientation:t,className:ne("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...r}));cs.displayName=gM.displayName;var cg="focusScope.autoFocusOnMount",dg="focusScope.autoFocusOnUnmount",YC={bubbles:!1,cancelable:!0},ZY="FocusScope",U0=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=y.useState(null),u=rt(o),c=rt(i),d=y.useRef(null),f=ve(t,m=>l(m)),h=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let m=function(x){if(h.paused||!a)return;const _=x.target;a.contains(_)?d.current=_:Jn(d.current,{select:!0})},b=function(x){if(h.paused||!a)return;const _=x.relatedTarget;_!==null&&(a.contains(_)||Jn(d.current,{select:!0}))},v=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&Jn(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",b);const w=new MutationObserver(v);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",b),w.disconnect()}}},[r,a,h.paused]),y.useEffect(()=>{if(a){XC.add(h);const m=document.activeElement;if(!a.contains(m)){const v=new CustomEvent(cg,YC);a.addEventListener(cg,u),a.dispatchEvent(v),v.defaultPrevented||(JY(oK(vM(a)),{select:!0}),document.activeElement===m&&Jn(a))}return()=>{a.removeEventListener(cg,u),setTimeout(()=>{const v=new CustomEvent(dg,YC);a.addEventListener(dg,c),a.dispatchEvent(v),v.defaultPrevented||Jn(m??document.body,{select:!0}),a.removeEventListener(dg,c),XC.remove(h)},0)}}},[a,u,c,h]);const g=y.useCallback(m=>{if(!n&&!r||h.paused)return;const b=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(b&&v){const w=m.currentTarget,[x,_]=eK(w);x&&_?!m.shiftKey&&v===_?(m.preventDefault(),n&&Jn(x,{select:!0})):m.shiftKey&&v===x&&(m.preventDefault(),n&&Jn(_,{select:!0})):v===w&&m.preventDefault()}},[n,r,h.paused]);return p.jsx(he.div,{tabIndex:-1,...s,ref:f,onKeyDown:g})});U0.displayName=ZY;function JY(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Jn(r,{select:t}),document.activeElement!==n)return}function eK(e){const t=vM(e),n=KC(t,e),r=KC(t.reverse(),e);return[n,r]}function vM(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function KC(e,t){for(const n of e)if(!tK(n,{upTo:t}))return n}function tK(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function nK(e){return e instanceof HTMLInputElement&&"select"in e}function Jn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&nK(e)&&t&&e.select()}}var XC=rK();function rK(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=QC(e,t),e.unshift(t)},remove(t){var n;e=QC(e,t),(n=e[0])==null||n.resume()}}}function QC(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function oK(e){return e.filter(t=>t.tagName!=="A")}var fg=0;function yM(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ZC()),document.body.insertAdjacentElement("beforeend",e[1]??ZC()),fg++,()=>{fg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),fg--}},[])}function ZC(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var rn=function(){return rn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},rn.apply(this,arguments)};function xM(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function iK(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var dl="right-scroll-bar-position",fl="width-before-scroll-bar",sK="with-scroll-bars-hidden",aK="--removed-body-scroll-bar-size";function hg(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function lK(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var uK=typeof window<"u"?y.useLayoutEffect:y.useEffect,JC=new WeakMap;function cK(e,t){var n=lK(null,function(r){return e.forEach(function(o){return hg(o,r)})});return uK(function(){var r=JC.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||hg(a,null)}),i.forEach(function(a){o.has(a)||hg(a,s)})}JC.set(n,e)},[e]),n}function dK(e){return e}function fK(e,t){t===void 0&&(t=dK);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var c=s;s=[],c.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){s.push(c),u()},filter:function(c){return s=s.filter(c),n}}}};return o}function hK(e){e===void 0&&(e={});var t=fK(null);return t.options=rn({async:!0,ssr:!1},e),t}var wM=function(e){var t=e.sideCar,n=xM(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return y.createElement(r,rn({},n))};wM.isSideCarExport=!0;function pK(e,t){return e.useMedium(t),wM}var bM=hK(),pg=function(){},xc=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:pg,onWheelCapture:pg,onTouchMoveCapture:pg}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noRelative,g=e.noIsolation,m=e.inert,b=e.allowPinchZoom,v=e.as,w=v===void 0?"div":v,x=e.gapMode,_=xM(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,S=cK([n,t]),E=rn(rn({},_),o);return y.createElement(y.Fragment,null,c&&y.createElement(C,{sideCar:bM,removeScrollBar:u,shards:d,noRelative:h,noIsolation:g,inert:m,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:x}),s?y.cloneElement(y.Children.only(a),rn(rn({},E),{ref:S})):y.createElement(w,rn({},E,{className:l,ref:S}),a))});xc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};xc.classNames={fullWidth:fl,zeroRight:dl};var mK=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function gK(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=mK();return t&&e.setAttribute("nonce",t),e}function vK(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function yK(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xK=function(){var e=0,t=null;return{add:function(n){e==0&&(t=gK())&&(vK(t,n),yK(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wK=function(){var e=xK();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},_M=function(){var e=wK(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},bK={left:0,top:0,right:0,gap:0},mg=function(e){return parseInt(e||"",10)||0},_K=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[mg(n),mg(r),mg(o)]},SK=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return bK;var t=_K(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},EK=_M(),Wo="data-scroll-locked",CK=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
269
|
-
.`.concat(sK,` {
|
|
270
|
-
overflow: hidden `).concat(r,`;
|
|
271
|
-
padding-right: `).concat(a,"px ").concat(r,`;
|
|
272
|
-
}
|
|
273
|
-
body[`).concat(Wo,`] {
|
|
274
|
-
overflow: hidden `).concat(r,`;
|
|
275
|
-
overscroll-behavior: contain;
|
|
276
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
277
|
-
padding-left: `.concat(o,`px;
|
|
278
|
-
padding-top: `).concat(i,`px;
|
|
279
|
-
padding-right: `).concat(s,`px;
|
|
280
|
-
margin-left:0;
|
|
281
|
-
margin-top:0;
|
|
282
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
283
|
-
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.`).concat(dl,` {
|
|
287
|
-
right: `).concat(a,"px ").concat(r,`;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
.`).concat(fl,` {
|
|
291
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
.`).concat(dl," .").concat(dl,` {
|
|
295
|
-
right: 0 `).concat(r,`;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.`).concat(fl," .").concat(fl,` {
|
|
299
|
-
margin-right: 0 `).concat(r,`;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
body[`).concat(Wo,`] {
|
|
303
|
-
`).concat(aK,": ").concat(a,`px;
|
|
304
|
-
}
|
|
305
|
-
`)},eN=function(){var e=parseInt(document.body.getAttribute(Wo)||"0",10);return isFinite(e)?e:0},NK=function(){y.useEffect(function(){return document.body.setAttribute(Wo,(eN()+1).toString()),function(){var e=eN()-1;e<=0?document.body.removeAttribute(Wo):document.body.setAttribute(Wo,e.toString())}},[])},kK=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;NK();var i=y.useMemo(function(){return SK(o)},[o]);return y.createElement(EK,{styles:CK(i,!t,o,n?"":"!important")})},Lv=!1;if(typeof window<"u")try{var Ha=Object.defineProperty({},"passive",{get:function(){return Lv=!0,!0}});window.addEventListener("test",Ha,Ha),window.removeEventListener("test",Ha,Ha)}catch{Lv=!1}var xo=Lv?{passive:!1}:!1,RK=function(e){return e.tagName==="TEXTAREA"},SM=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!RK(e)&&n[t]==="visible")},PK=function(e){return SM(e,"overflowY")},TK=function(e){return SM(e,"overflowX")},tN=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=EM(e,r);if(o){var i=CM(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},AK=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},MK=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},EM=function(e,t){return e==="v"?PK(t):TK(t)},CM=function(e,t){return e==="v"?AK(t):MK(t)},IK=function(e,t){return e==="h"&&t==="rtl"?-1:1},jK=function(e,t,n,r,o){var i=IK(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),u=!1,c=s>0,d=0,f=0;do{if(!a)break;var h=CM(e,a),g=h[0],m=h[1],b=h[2],v=m-b-i*g;(g||v)&&EM(e,a)&&(d+=v,f+=g);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&Math.abs(d)<1||!c&&Math.abs(f)<1)&&(u=!0),u},Va=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},nN=function(e){return[e.deltaX,e.deltaY]},rN=function(e){return e&&"current"in e?e.current:e},OK=function(e,t){return e[0]===t[0]&&e[1]===t[1]},LK=function(e){return`
|
|
306
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
307
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
308
|
-
`)},DK=0,wo=[];function $K(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),o=y.useState(DK++)[0],i=y.useState(_M)[0],s=y.useRef(e);y.useEffect(function(){s.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=iK([e.lockRef.current],(e.shards||[]).map(rN),!0).filter(Boolean);return m.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=y.useCallback(function(m,b){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var v=Va(m),w=n.current,x="deltaX"in m?m.deltaX:w[0]-v[0],_="deltaY"in m?m.deltaY:w[1]-v[1],C,S=m.target,E=Math.abs(x)>Math.abs(_)?"h":"v";if("touches"in m&&E==="h"&&S.type==="range")return!1;var k=window.getSelection(),T=k&&k.anchorNode,I=T?T===S||T.contains(S):!1;if(I)return!1;var P=tN(E,S);if(!P)return!0;if(P?C=E:(C=E==="v"?"h":"v",P=tN(E,S)),!P)return!1;if(!r.current&&"changedTouches"in m&&(x||_)&&(r.current=C),!C)return!0;var j=r.current||C;return jK(j,b,m,j==="h"?x:_)},[]),l=y.useCallback(function(m){var b=m;if(!(!wo.length||wo[wo.length-1]!==i)){var v="deltaY"in b?nN(b):Va(b),w=t.current.filter(function(C){return C.name===b.type&&(C.target===b.target||b.target===C.shadowParent)&&OK(C.delta,v)})[0];if(w&&w.should){b.cancelable&&b.preventDefault();return}if(!w){var x=(s.current.shards||[]).map(rN).filter(Boolean).filter(function(C){return C.contains(b.target)}),_=x.length>0?a(b,x[0]):!s.current.noIsolation;_&&b.cancelable&&b.preventDefault()}}},[]),u=y.useCallback(function(m,b,v,w){var x={name:m,delta:b,target:v,should:w,shadowParent:zK(v)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(_){return _!==x})},1)},[]),c=y.useCallback(function(m){n.current=Va(m),r.current=void 0},[]),d=y.useCallback(function(m){u(m.type,nN(m),m.target,a(m,e.lockRef.current))},[]),f=y.useCallback(function(m){u(m.type,Va(m),m.target,a(m,e.lockRef.current))},[]);y.useEffect(function(){return wo.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,xo),document.addEventListener("touchmove",l,xo),document.addEventListener("touchstart",c,xo),function(){wo=wo.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,xo),document.removeEventListener("touchmove",l,xo),document.removeEventListener("touchstart",c,xo)}},[]);var h=e.removeScrollBar,g=e.inert;return y.createElement(y.Fragment,null,g?y.createElement(i,{styles:LK(o)}):null,h?y.createElement(kK,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function zK(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const FK=pK(bM,$K);var G0=y.forwardRef(function(e,t){return y.createElement(xc,rn({},e,{ref:t,sideCar:FK}))});G0.classNames=xc.classNames;var qK=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bo=new WeakMap,Wa=new WeakMap,Ua={},gg=0,NM=function(e){return e&&(e.host||NM(e.parentNode))},BK=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=NM(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},HK=function(e,t,n,r){var o=BK(t,Array.isArray(e)?e:[e]);Ua[n]||(Ua[n]=new WeakMap);var i=Ua[n],s=[],a=new Set,l=new Set(o),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};o.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))c(f);else try{var h=f.getAttribute(r),g=h!==null&&h!=="false",m=(bo.get(f)||0)+1,b=(i.get(f)||0)+1;bo.set(f,m),i.set(f,b),s.push(f),m===1&&g&&Wa.set(f,!0),b===1&&f.setAttribute(n,"true"),g||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return c(t),a.clear(),gg++,function(){s.forEach(function(d){var f=bo.get(d)-1,h=i.get(d)-1;bo.set(d,f),i.set(d,h),f||(Wa.has(d)||d.removeAttribute(r),Wa.delete(d)),h||d.removeAttribute(n)}),gg--,gg||(bo=new WeakMap,bo=new WeakMap,Wa=new WeakMap,Ua={})}},kM=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=qK(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),HK(r,o,n,"aria-hidden")):function(){return null}};function VK(e){const t=WK(e),n=y.forwardRef((r,o)=>{const{children:i,...s}=r,a=y.Children.toArray(i),l=a.find(GK);if(l){const u=l.props.children,c=a.map(d=>d===l?y.Children.count(u)>1?y.Children.only(null):y.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...s,ref:o,children:y.isValidElement(u)?y.cloneElement(u,void 0,c):null})}return p.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function WK(e){const t=y.forwardRef((n,r)=>{const{children:o,...i}=n;if(y.isValidElement(o)){const s=KK(o),a=YK(i,o.props);return o.type!==y.Fragment&&(a.ref=r?Ei(r,s):s),y.cloneElement(o,a)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var UK=Symbol("radix.slottable");function GK(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===UK}function YK(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function KK(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wc="Dialog",[RM]=po(wc),[XK,Kt]=RM(wc),PM=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=y.useRef(null),l=y.useRef(null),[u,c]=zs({prop:r,defaultProp:o??!1,onChange:i,caller:wc});return p.jsx(XK,{scope:t,triggerRef:a,contentRef:l,contentId:Vr(),titleId:Vr(),descriptionId:Vr(),open:u,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(d=>!d),[c]),modal:s,children:n})};PM.displayName=wc;var TM="DialogTrigger",QK=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Kt(TM,n),i=ve(t,o.triggerRef);return p.jsx(he.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":X0(o.open),...r,ref:i,onClick:ue(e.onClick,o.onOpenToggle)})});QK.displayName=TM;var Y0="DialogPortal",[ZK,AM]=RM(Y0,{forceMount:void 0}),MM=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=Kt(Y0,t);return p.jsx(ZK,{scope:t,forceMount:n,children:y.Children.map(r,s=>p.jsx(Yt,{present:n||i.open,children:p.jsx(fc,{asChild:!0,container:o,children:s})}))})};MM.displayName=Y0;var lu="DialogOverlay",IM=y.forwardRef((e,t)=>{const n=AM(lu,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Kt(lu,e.__scopeDialog);return i.modal?p.jsx(Yt,{present:r||i.open,children:p.jsx(eX,{...o,ref:t})}):null});IM.displayName=lu;var JK=VK("DialogOverlay.RemoveScroll"),eX=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Kt(lu,n);return p.jsx(G0,{as:JK,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(he.div,{"data-state":X0(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ro="DialogContent",jM=y.forwardRef((e,t)=>{const n=AM(ro,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=Kt(ro,e.__scopeDialog);return p.jsx(Yt,{present:r||i.open,children:i.modal?p.jsx(tX,{...o,ref:t}):p.jsx(nX,{...o,ref:t})})});jM.displayName=ro;var tX=y.forwardRef((e,t)=>{const n=Kt(ro,e.__scopeDialog),r=y.useRef(null),o=ve(t,n.contentRef,r);return y.useEffect(()=>{const i=r.current;if(i)return kM(i)},[]),p.jsx(OM,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ue(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:ue(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:ue(e.onFocusOutside,i=>i.preventDefault())})}),nX=y.forwardRef((e,t)=>{const n=Kt(ro,e.__scopeDialog),r=y.useRef(!1),o=y.useRef(!1);return p.jsx(OM,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),OM=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=Kt(ro,n),l=y.useRef(null),u=ve(t,l);return yM(),p.jsxs(p.Fragment,{children:[p.jsx(U0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:p.jsx(sc,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":X0(a.open),...s,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(rX,{titleId:a.titleId}),p.jsx(iX,{contentRef:l,descriptionId:a.descriptionId})]})]})}),K0="DialogTitle",LM=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Kt(K0,n);return p.jsx(he.h2,{id:o.titleId,...r,ref:t})});LM.displayName=K0;var DM="DialogDescription",$M=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Kt(DM,n);return p.jsx(he.p,{id:o.descriptionId,...r,ref:t})});$M.displayName=DM;var zM="DialogClose",FM=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Kt(zM,n);return p.jsx(he.button,{type:"button",...r,ref:t,onClick:ue(e.onClick,()=>o.onOpenChange(!1))})});FM.displayName=zM;function X0(e){return e?"open":"closed"}var qM="DialogTitleWarning",[bQ,BM]=z9(qM,{contentName:ro,titleName:K0,docsSlug:"dialog"}),rX=({titleId:e})=>{const t=BM(qM),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
309
|
-
|
|
310
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
311
|
-
|
|
312
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},oX="DialogDescriptionWarning",iX=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${BM(oX).contentName}}.`;return y.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},sX=PM,aX=MM,HM=IM,VM=jM,WM=LM,UM=$M,lX=FM;const uX=sX,cX=aX,GM=y.forwardRef(({className:e,...t},n)=>p.jsx(HM,{className:ne("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));GM.displayName=HM.displayName;const dX=Gs("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),YM=y.forwardRef(({side:e="right",className:t,children:n,...r},o)=>p.jsxs(cX,{children:[p.jsx(GM,{}),p.jsxs(VM,{ref:o,className:ne(dX({side:e}),t),...r,children:[p.jsxs(lX,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[p.jsx(S2,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));YM.displayName=VM.displayName;const KM=({className:e,...t})=>p.jsx("div",{className:ne("flex flex-col space-y-2 text-center sm:text-left",e),...t});KM.displayName="SheetHeader";const XM=y.forwardRef(({className:e,...t},n)=>p.jsx(WM,{ref:n,className:ne("text-lg font-semibold text-foreground",e),...t}));XM.displayName=WM.displayName;const QM=y.forwardRef(({className:e,...t},n)=>p.jsx(UM,{ref:n,className:ne("text-sm text-muted-foreground",e),...t}));QM.displayName=UM.displayName;function oN({className:e,...t}){return p.jsx("div",{className:ne("animate-pulse rounded-md bg-primary/10",e),...t})}const fX="sidebar_state",hX=60*60*24*7,pX="16rem",mX="18rem",gX="3rem",vX="b",ZM=y.createContext(null);function bc(){const e=y.useContext(ZM);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const JM=y.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...s},a)=>{const l=UY(),[u,c]=y.useState(!1),[d,f]=y.useState(e),h=t??d,g=y.useCallback(w=>{const x=typeof w=="function"?w(h):w;n?n(x):f(x),document.cookie=`${fX}=${x}; path=/; max-age=${hX}`},[n,h]),m=y.useCallback(()=>l?c(w=>!w):g(w=>!w),[l,g,c]);y.useEffect(()=>{const w=x=>{x.key===vX&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),m())};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[m]);const b=h?"expanded":"collapsed",v=y.useMemo(()=>({state:b,open:h,setOpen:g,isMobile:l,openMobile:u,setOpenMobile:c,toggleSidebar:m}),[b,h,g,l,u,c,m]);return p.jsx(ZM.Provider,{value:v,children:p.jsx(TA,{delayDuration:0,children:p.jsx("div",{style:{"--sidebar-width":pX,"--sidebar-width-icon":gX,...o},className:ne("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:a,...s,children:i})})})});JM.displayName="SidebarProvider";const eI=y.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...i},s)=>{const{isMobile:a,state:l,openMobile:u,setOpenMobile:c}=bc();return n==="none"?p.jsx("div",{className:ne("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:s,...i,children:o}):a?p.jsx(uX,{open:u,onOpenChange:c,...i,children:p.jsxs(YM,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":mX},side:e,children:[p.jsxs(KM,{className:"sr-only",children:[p.jsx(XM,{children:"Sidebar"}),p.jsx(QM,{children:"Displays the mobile sidebar."})]}),p.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):p.jsxs("div",{ref:s,className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":e,children:[p.jsx("div",{className:ne("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),p.jsx("div",{className:ne("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:p.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})});eI.displayName="Sidebar";const tI=y.forwardRef(({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o}=bc();return p.jsxs(vr,{ref:r,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:ne("h-7 w-7",e),onClick:i=>{t==null||t(i),o()},...n,children:[p.jsx(m3,{}),p.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});tI.displayName="SidebarTrigger";const nI=y.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:r}=bc();return p.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:ne("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});nI.displayName="SidebarRail";const rI=y.forwardRef(({className:e,...t},n)=>p.jsx("main",{ref:n,className:ne("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));rI.displayName="SidebarInset";const yX=y.forwardRef(({className:e,...t},n)=>p.jsx(q0,{ref:n,"data-sidebar":"input",className:ne("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));yX.displayName="SidebarInput";const oI=y.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,"data-sidebar":"header",className:ne("flex flex-col gap-2 p-2",e),...t}));oI.displayName="SidebarHeader";const iI=y.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,"data-sidebar":"footer",className:ne("flex flex-col gap-2 p-2",e),...t}));iI.displayName="SidebarFooter";const xX=y.forwardRef(({className:e,...t},n)=>p.jsx(cs,{ref:n,"data-sidebar":"separator",className:ne("mx-2 w-auto bg-sidebar-border",e),...t}));xX.displayName="SidebarSeparator";const sI=y.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,"data-sidebar":"content",className:ne("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));sI.displayName="SidebarContent";const Dv=y.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,"data-sidebar":"group",className:ne("relative flex w-full min-w-0 flex-col p-2",e),...t}));Dv.displayName="SidebarGroup";const $v=y.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?Ci:"div";return p.jsx(o,{ref:r,"data-sidebar":"group-label",className:ne("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});$v.displayName="SidebarGroupLabel";const wX=y.forwardRef(({className:e,asChild:t=!1,...n},r)=>{const o=t?Ci:"button";return p.jsx(o,{ref:r,"data-sidebar":"group-action",className:ne("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});wX.displayName="SidebarGroupAction";const zv=y.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,"data-sidebar":"group-content",className:ne("w-full text-sm",e),...t}));zv.displayName="SidebarGroupContent";const aI=y.forwardRef(({className:e,...t},n)=>p.jsx("ul",{ref:n,"data-sidebar":"menu",className:ne("flex w-full min-w-0 flex-col gap-1",e),...t}));aI.displayName="SidebarMenu";const lI=y.forwardRef(({className:e,...t},n)=>p.jsx("li",{ref:n,"data-sidebar":"menu-item",className:ne("group/menu-item relative",e),...t}));lI.displayName="SidebarMenuItem";const bX=Gs("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),uI=y.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...s},a)=>{const l=e?Ci:"button",{isMobile:u,state:c}=bc(),d=p.jsx(l,{ref:a,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:ne(bX({variant:n,size:r}),i),...s});return o?(typeof o=="string"&&(o={children:o}),p.jsxs(AA,{children:[p.jsx(MA,{asChild:!0,children:d}),p.jsx(L0,{side:"right",align:"center",hidden:c!=="collapsed"||u,...o})]})):d});uI.displayName="SidebarMenuButton";const _X=y.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const i=t?Ci:"button";return p.jsx(i,{ref:o,"data-sidebar":"menu-action",className:ne("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})});_X.displayName="SidebarMenuAction";const SX=y.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:ne("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));SX.displayName="SidebarMenuBadge";const EX=y.forwardRef(({className:e,showIcon:t=!1,...n},r)=>{const o=y.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return p.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:ne("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&p.jsx(oN,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),p.jsx(oN,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})});EX.displayName="SidebarMenuSkeleton";const CX=y.forwardRef(({className:e,...t},n)=>p.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:ne("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));CX.displayName="SidebarMenuSub";const NX=y.forwardRef(({...e},t)=>p.jsx("li",{ref:t,...e}));NX.displayName="SidebarMenuSubItem";const kX=y.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:r,...o},i)=>{const s=e?Ci:"a";return p.jsx(s,{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:ne("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})});kX.displayName="SidebarMenuSubButton";const RX=[{id:"analysis",label:"Analysis",icon:OD,description:"Dependency analysis"},{id:"graph",label:"Graph",icon:w2,description:"Dependency graph"},{id:"files",label:"Files",icon:t3,description:"File explorer"},{id:"search",label:"Search",icon:b2,description:"Search codebase"}];function PX({activeTab:e,onTabChange:t,hasSnapshot:n,fileCount:r=0,importCount:o=0,onClear:i,currentProjectPath:s}){return p.jsxs(eI,{collapsible:"icon",children:[p.jsx(oI,{className:"border-b border-sidebar-border",children:p.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[p.jsx("div",{className:"flex h-8 w-8 items-center justify-center rounded-md bg-primary text-primary-foreground",children:p.jsxs("svg",{className:"h-4 w-4",viewBox:"0 0 24 24",fill:"currentColor",children:[p.jsx("circle",{cx:"12",cy:"12",r:"10",fillOpacity:"0.2"}),p.jsx("circle",{cx:"12",cy:"12",r:"3"}),p.jsx("path",{d:"M12 2v4M12 18v4M2 12h4M18 12h4",stroke:"currentColor",strokeWidth:"2",fill:"none"})]})}),p.jsxs("div",{className:"flex flex-col group-data-[collapsible=icon]:hidden",children:[p.jsx("span",{className:"text-sm font-semibold",children:"Foundation"}),p.jsx("span",{className:"text-xs text-muted-foreground",children:"Codebase Explorer"})]})]})}),p.jsxs(sI,{children:[p.jsxs(Dv,{children:[p.jsx($v,{children:"Navigation"}),p.jsx(zv,{children:p.jsx(aI,{children:RX.map(a=>p.jsx(lI,{children:p.jsxs(uI,{isActive:e===a.id,onClick:()=>t(a.id),tooltip:a.label,disabled:!n&&a.id!=="analysis",children:[p.jsx(a.icon,{className:"h-4 w-4"}),p.jsx("span",{children:a.label})]})},a.id))})})]}),n&&p.jsxs(Dv,{children:[p.jsx($v,{children:"Snapshot Info"}),p.jsx(zv,{children:p.jsxs("div",{className:"px-2 space-y-2 group-data-[collapsible=icon]:hidden",children:[s&&p.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[p.jsx(Dl,{className:"h-4 w-4 text-muted-foreground shrink-0 mt-0.5"}),p.jsx("span",{className:"text-muted-foreground text-xs font-mono break-all leading-relaxed",children:s})]}),p.jsxs("div",{className:"flex items-center justify-between text-sm",children:[p.jsx("span",{className:"text-muted-foreground",children:"Files"}),p.jsx(kt,{variant:"secondary",children:r.toLocaleString()})]}),p.jsxs("div",{className:"flex items-center justify-between text-sm",children:[p.jsx("span",{className:"text-muted-foreground",children:"Imports"}),p.jsx(kt,{variant:"secondary",children:o.toLocaleString()})]})]})})]})]}),p.jsx(iI,{className:"border-t border-sidebar-border",children:n?p.jsxs(vr,{variant:"ghost",size:"sm",className:"w-full justify-start text-destructive hover:text-destructive hover:bg-destructive/10 group-data-[collapsible=icon]:justify-center",onClick:i,children:[p.jsx(S2,{className:"h-4 w-4 mr-2 group-data-[collapsible=icon]:mr-0"}),p.jsx("span",{className:"group-data-[collapsible=icon]:hidden",children:"Clear Snapshot"})]}):p.jsx("div",{className:"px-2 py-1 text-xs text-muted-foreground group-data-[collapsible=icon]:hidden",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(cv,{className:"h-3 w-3"}),p.jsx("span",{children:"Drop snapshot to load"})]})})}),p.jsx(nI,{})]})}function iN(e){const t=TX(e),n=y.forwardRef((r,o)=>{const{children:i,...s}=r,a=y.Children.toArray(i),l=a.find(MX);if(l){const u=l.props.children,c=a.map(d=>d===l?y.Children.count(u)>1?y.Children.only(null):y.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...s,ref:o,children:y.isValidElement(u)?y.cloneElement(u,void 0,c):null})}return p.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function TX(e){const t=y.forwardRef((n,r)=>{const{children:o,...i}=n;if(y.isValidElement(o)){const s=jX(o),a=IX(i,o.props);return o.type!==y.Fragment&&(a.ref=r?Ei(r,s):s),y.cloneElement(o,a)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var AX=Symbol("radix.slottable");function MX(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===AX}function IX(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function jX(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function OX(e){const t=e+"CollectionProvider",[n,r]=po(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:b,children:v}=m,w=en.useRef(null),x=en.useRef(new Map).current;return p.jsx(o,{scope:b,itemMap:x,collectionRef:w,children:v})};s.displayName=t;const a=e+"CollectionSlot",l=iN(a),u=en.forwardRef((m,b)=>{const{scope:v,children:w}=m,x=i(a,v),_=ve(b,x.collectionRef);return p.jsx(l,{ref:_,children:w})});u.displayName=a;const c=e+"CollectionItemSlot",d="data-radix-collection-item",f=iN(c),h=en.forwardRef((m,b)=>{const{scope:v,children:w,...x}=m,_=en.useRef(null),C=ve(b,_),S=i(c,v);return en.useEffect(()=>(S.itemMap.set(_,{ref:_,...x}),()=>void S.itemMap.delete(_))),p.jsx(f,{[d]:"",ref:C,children:w})});h.displayName=c;function g(m){const b=i(e+"CollectionConsumer",m);return en.useCallback(()=>{const w=b.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((S,E)=>x.indexOf(S.ref.current)-x.indexOf(E.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},g,r]}function LX(e){const t=DX(e),n=y.forwardRef((r,o)=>{const{children:i,...s}=r,a=y.Children.toArray(i),l=a.find(zX);if(l){const u=l.props.children,c=a.map(d=>d===l?y.Children.count(u)>1?y.Children.only(null):y.isValidElement(u)?u.props.children:null:d);return p.jsx(t,{...s,ref:o,children:y.isValidElement(u)?y.cloneElement(u,void 0,c):null})}return p.jsx(t,{...s,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function DX(e){const t=y.forwardRef((n,r)=>{const{children:o,...i}=n;if(y.isValidElement(o)){const s=qX(o),a=FX(i,o.props);return o.type!==y.Fragment&&(a.ref=r?Ei(r,s):s),y.cloneElement(o,a)}return y.Children.count(o)>1?y.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var $X=Symbol("radix.slottable");function zX(e){return y.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$X}function FX(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function qX(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var BX=[" ","Enter","ArrowUp","ArrowDown"],HX=[" ","Enter"],oo="Select",[_c,Sc,VX]=OX(oo),[Ri]=po(oo,[VX,dc]),Ec=dc(),[WX,Rr]=Ri(oo),[UX,GX]=Ri(oo),cI=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:h,form:g}=e,m=Ec(t),[b,v]=y.useState(null),[w,x]=y.useState(null),[_,C]=y.useState(!1),S=jA(u),[E,k]=zs({prop:r,defaultProp:o??!1,onChange:i,caller:oo}),[T,I]=zs({prop:s,defaultProp:a,onChange:l,caller:oo}),P=y.useRef(null),j=b?g||!!b.closest("form"):!0,[$,R]=y.useState(new Set),L=Array.from($).map(M=>M.props.value).join(";");return p.jsx(mA,{...m,children:p.jsxs(WX,{required:h,scope:t,trigger:b,onTriggerChange:v,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:_,onValueNodeHasChildrenChange:C,contentId:Vr(),value:T,onValueChange:I,open:E,onOpenChange:k,dir:S,triggerPointerDownPosRef:P,disabled:f,children:[p.jsx(_c.Provider,{scope:t,children:p.jsx(UX,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(M=>{R(O=>new Set(O).add(M))},[]),onNativeOptionRemove:y.useCallback(M=>{R(O=>{const N=new Set(O);return N.delete(M),N})},[]),children:n})}),j?p.jsxs(jI,{"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:d,value:T,onChange:M=>I(M.target.value),disabled:f,form:g,children:[T===void 0?p.jsx("option",{value:""}):null,Array.from($)]},L):null]})})};cI.displayName=oo;var dI="SelectTrigger",fI=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Ec(n),s=Rr(dI,n),a=s.disabled||r,l=ve(t,s.onTriggerChange),u=Sc(n),c=y.useRef("touch"),[d,f,h]=LI(m=>{const b=u().filter(x=>!x.disabled),v=b.find(x=>x.value===s.value),w=DI(b,m,v);w!==void 0&&s.onValueChange(w.value)}),g=m=>{a||(s.onOpenChange(!0),h()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return p.jsx(gA,{asChild:!0,...i,children:p.jsx(he.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":OI(s.value)?"":void 0,...o,ref:l,onClick:ue(o.onClick,m=>{m.currentTarget.focus(),c.current!=="mouse"&&g(m)}),onPointerDown:ue(o.onPointerDown,m=>{c.current=m.pointerType;const b=m.target;b.hasPointerCapture(m.pointerId)&&b.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:ue(o.onKeyDown,m=>{const b=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(b&&m.key===" ")&&BX.includes(m.key)&&(g(),m.preventDefault())})})})});fI.displayName=dI;var hI="SelectValue",pI=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:s="",...a}=e,l=Rr(hI,n),{onValueNodeHasChildrenChange:u}=l,c=i!==void 0,d=ve(t,l.onValueNodeChange);return Ue(()=>{u(c)},[u,c]),p.jsx(he.span,{...a,ref:d,style:{pointerEvents:"none"},children:OI(l.value)?p.jsx(p.Fragment,{children:s}):i})});pI.displayName=hI;var YX="SelectIcon",mI=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(he.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});mI.displayName=YX;var KX="SelectPortal",gI=e=>p.jsx(fc,{asChild:!0,...e});gI.displayName=KX;var io="SelectContent",vI=y.forwardRef((e,t)=>{const n=Rr(io,e.__scopeSelect),[r,o]=y.useState();if(Ue(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?gi.createPortal(p.jsx(yI,{scope:e.__scopeSelect,children:p.jsx(_c.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),i):null}return p.jsx(xI,{...e,ref:t})});vI.displayName=io;var Mt=10,[yI,Pr]=Ri(io),XX="SelectContentImpl",QX=LX("SelectContent.RemoveScroll"),xI=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:m,avoidCollisions:b,...v}=e,w=Rr(io,n),[x,_]=y.useState(null),[C,S]=y.useState(null),E=ve(t,q=>_(q)),[k,T]=y.useState(null),[I,P]=y.useState(null),j=Sc(n),[$,R]=y.useState(!1),L=y.useRef(!1);y.useEffect(()=>{if(x)return kM(x)},[x]),yM();const M=y.useCallback(q=>{const[B,...G]=j().map(U=>U.ref.current),[Q]=G.slice(-1),Y=document.activeElement;for(const U of q)if(U===Y||(U==null||U.scrollIntoView({block:"nearest"}),U===B&&C&&(C.scrollTop=0),U===Q&&C&&(C.scrollTop=C.scrollHeight),U==null||U.focus(),document.activeElement!==Y))return},[j,C]),O=y.useCallback(()=>M([k,x]),[M,k,x]);y.useEffect(()=>{$&&O()},[$,O]);const{onOpenChange:N,triggerPointerDownPosRef:A}=w;y.useEffect(()=>{if(x){let q={x:0,y:0};const B=Q=>{var Y,U;q={x:Math.abs(Math.round(Q.pageX)-(((Y=A.current)==null?void 0:Y.x)??0)),y:Math.abs(Math.round(Q.pageY)-(((U=A.current)==null?void 0:U.y)??0))}},G=Q=>{q.x<=10&&q.y<=10?Q.preventDefault():x.contains(Q.target)||N(!1),document.removeEventListener("pointermove",B),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",B),document.addEventListener("pointerup",G,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",B),document.removeEventListener("pointerup",G,{capture:!0})}}},[x,N,A]),y.useEffect(()=>{const q=()=>N(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[N]);const[D,z]=LI(q=>{const B=j().filter(Y=>!Y.disabled),G=B.find(Y=>Y.ref.current===document.activeElement),Q=DI(B,q,G);Q&&setTimeout(()=>Q.ref.current.focus())}),F=y.useCallback((q,B,G)=>{const Q=!L.current&&!G;(w.value!==void 0&&w.value===B||Q)&&(T(q),Q&&(L.current=!0))},[w.value]),V=y.useCallback(()=>x==null?void 0:x.focus(),[x]),H=y.useCallback((q,B,G)=>{const Q=!L.current&&!G;(w.value!==void 0&&w.value===B||Q)&&P(q)},[w.value]),K=r==="popper"?Fv:wI,X=K===Fv?{side:a,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:m,avoidCollisions:b}:{};return p.jsx(yI,{scope:n,content:x,viewport:C,onViewportChange:S,itemRefCallback:F,selectedItem:k,onItemLeave:V,itemTextRefCallback:H,focusSelectedItem:O,selectedItemText:I,position:r,isPositioned:$,searchRef:D,children:p.jsx(G0,{as:QX,allowPinchZoom:!0,children:p.jsx(U0,{asChild:!0,trapped:w.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:ue(o,q=>{var B;(B=w.trigger)==null||B.focus({preventScroll:!0}),q.preventDefault()}),children:p.jsx(sc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:p.jsx(K,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:q=>q.preventDefault(),...v,...X,onPlaced:()=>R(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:ue(v.onKeyDown,q=>{const B=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!B&&q.key.length===1&&z(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let Q=j().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);if(["ArrowUp","End"].includes(q.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){const Y=q.target,U=Q.indexOf(Y);Q=Q.slice(U+1)}setTimeout(()=>M(Q)),q.preventDefault()}})})})})})})});xI.displayName=XX;var ZX="SelectItemAlignedPosition",wI=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=Rr(io,n),s=Pr(io,n),[a,l]=y.useState(null),[u,c]=y.useState(null),d=ve(t,E=>c(E)),f=Sc(n),h=y.useRef(!1),g=y.useRef(!0),{viewport:m,selectedItem:b,selectedItemText:v,focusSelectedItem:w}=s,x=y.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&u&&m&&b&&v){const E=i.trigger.getBoundingClientRect(),k=u.getBoundingClientRect(),T=i.valueNode.getBoundingClientRect(),I=v.getBoundingClientRect();if(i.dir!=="rtl"){const Y=I.left-k.left,U=T.left-Y,Z=E.left-U,se=E.width+Z,oe=Math.max(se,k.width),le=window.innerWidth-Mt,ie=Ov(U,[Mt,Math.max(Mt,le-oe)]);a.style.minWidth=se+"px",a.style.left=ie+"px"}else{const Y=k.right-I.right,U=window.innerWidth-T.right-Y,Z=window.innerWidth-E.right-U,se=E.width+Z,oe=Math.max(se,k.width),le=window.innerWidth-Mt,ie=Ov(U,[Mt,Math.max(Mt,le-oe)]);a.style.minWidth=se+"px",a.style.right=ie+"px"}const P=f(),j=window.innerHeight-Mt*2,$=m.scrollHeight,R=window.getComputedStyle(u),L=parseInt(R.borderTopWidth,10),M=parseInt(R.paddingTop,10),O=parseInt(R.borderBottomWidth,10),N=parseInt(R.paddingBottom,10),A=L+M+$+N+O,D=Math.min(b.offsetHeight*5,A),z=window.getComputedStyle(m),F=parseInt(z.paddingTop,10),V=parseInt(z.paddingBottom,10),H=E.top+E.height/2-Mt,K=j-H,X=b.offsetHeight/2,q=b.offsetTop+X,B=L+M+q,G=A-B;if(B<=H){const Y=P.length>0&&b===P[P.length-1].ref.current;a.style.bottom="0px";const U=u.clientHeight-m.offsetTop-m.offsetHeight,Z=Math.max(K,X+(Y?V:0)+U+O),se=B+Z;a.style.height=se+"px"}else{const Y=P.length>0&&b===P[0].ref.current;a.style.top="0px";const Z=Math.max(H,L+m.offsetTop+(Y?F:0)+X)+G;a.style.height=Z+"px",m.scrollTop=B-H+m.offsetTop}a.style.margin=`${Mt}px 0`,a.style.minHeight=D+"px",a.style.maxHeight=j+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[f,i.trigger,i.valueNode,a,u,m,b,v,i.dir,r]);Ue(()=>x(),[x]);const[_,C]=y.useState();Ue(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const S=y.useCallback(E=>{E&&g.current===!0&&(x(),w==null||w(),g.current=!1)},[x,w]);return p.jsx(eQ,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:S,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:p.jsx(he.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});wI.displayName=ZX;var JX="SelectPopperPosition",Fv=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Mt,...i}=e,s=Ec(n);return p.jsx(vA,{...s,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Fv.displayName=JX;var[eQ,Q0]=Ri(io,{}),qv="SelectViewport",bI=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,i=Pr(qv,n),s=Q0(qv,n),a=ve(t,i.onViewportChange),l=y.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(_c.Slot,{scope:n,children:p.jsx(he.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:ue(o.onScroll,u=>{const c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=s;if(f!=null&&f.current&&d){const h=Math.abs(l.current-c.scrollTop);if(h>0){const g=window.innerHeight-Mt*2,m=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),v=Math.max(m,b);if(v<g){const w=v+h,x=Math.min(g,w),_=w-x;d.style.height=x+"px",d.style.bottom==="0px"&&(c.scrollTop=_>0?_:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});bI.displayName=qv;var _I="SelectGroup",[tQ,nQ]=Ri(_I),rQ=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Vr();return p.jsx(tQ,{scope:n,id:o,children:p.jsx(he.div,{role:"group","aria-labelledby":o,...r,ref:t})})});rQ.displayName=_I;var SI="SelectLabel",EI=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=nQ(SI,n);return p.jsx(he.div,{id:o.id,...r,ref:t})});EI.displayName=SI;var uu="SelectItem",[oQ,CI]=Ri(uu),NI=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...s}=e,a=Rr(uu,n),l=Pr(uu,n),u=a.value===r,[c,d]=y.useState(i??""),[f,h]=y.useState(!1),g=ve(t,w=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,w,r,o)}),m=Vr(),b=y.useRef("touch"),v=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(oQ,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:y.useCallback(w=>{d(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:p.jsx(_c.ItemSlot,{scope:n,value:r,disabled:o,textValue:c,children:p.jsx(he.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:g,onFocus:ue(s.onFocus,()=>h(!0)),onBlur:ue(s.onBlur,()=>h(!1)),onClick:ue(s.onClick,()=>{b.current!=="mouse"&&v()}),onPointerUp:ue(s.onPointerUp,()=>{b.current==="mouse"&&v()}),onPointerDown:ue(s.onPointerDown,w=>{b.current=w.pointerType}),onPointerMove:ue(s.onPointerMove,w=>{var x;b.current=w.pointerType,o?(x=l.onItemLeave)==null||x.call(l):b.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ue(s.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:ue(s.onKeyDown,w=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&w.key===" "||(HX.includes(w.key)&&v(),w.key===" "&&w.preventDefault())})})})})});NI.displayName=uu;var Zi="SelectItemText",kI=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,s=Rr(Zi,n),a=Pr(Zi,n),l=CI(Zi,n),u=GX(Zi,n),[c,d]=y.useState(null),f=ve(t,v=>d(v),l.onItemTextChange,v=>{var w;return(w=a.itemTextRefCallback)==null?void 0:w.call(a,v,l.value,l.disabled)}),h=c==null?void 0:c.textContent,g=y.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:b}=u;return Ue(()=>(m(g),()=>b(g)),[m,b,g]),p.jsxs(p.Fragment,{children:[p.jsx(he.span,{id:l.textId,...i,ref:f}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?gi.createPortal(i.children,s.valueNode):null]})});kI.displayName=Zi;var RI="SelectItemIndicator",PI=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return CI(RI,n).isSelected?p.jsx(he.span,{"aria-hidden":!0,...r,ref:t}):null});PI.displayName=RI;var Bv="SelectScrollUpButton",TI=y.forwardRef((e,t)=>{const n=Pr(Bv,e.__scopeSelect),r=Q0(Bv,e.__scopeSelect),[o,i]=y.useState(!1),s=ve(t,r.onScrollButtonChange);return Ue(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;i(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(MI,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});TI.displayName=Bv;var Hv="SelectScrollDownButton",AI=y.forwardRef((e,t)=>{const n=Pr(Hv,e.__scopeSelect),r=Q0(Hv,e.__scopeSelect),[o,i]=y.useState(!1),s=ve(t,r.onScrollButtonChange);return Ue(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,c=Math.ceil(l.scrollTop)<u;i(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(MI,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});AI.displayName=Hv;var MI=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=Pr("SelectScrollButton",n),s=y.useRef(null),a=Sc(n),l=y.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return y.useEffect(()=>()=>l(),[l]),Ue(()=>{var c;const u=a().find(d=>d.ref.current===document.activeElement);(c=u==null?void 0:u.ref.current)==null||c.scrollIntoView({block:"nearest"})},[a]),p.jsx(he.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:ue(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:ue(o.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:ue(o.onPointerLeave,()=>{l()})})}),iQ="SelectSeparator",II=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(he.div,{"aria-hidden":!0,...r,ref:t})});II.displayName=iQ;var Vv="SelectArrow",sQ=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Ec(n),i=Rr(Vv,n),s=Pr(Vv,n);return i.open&&s.position==="popper"?p.jsx(yA,{...o,...r,ref:t}):null});sQ.displayName=Vv;var aQ="SelectBubbleInput",jI=y.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=y.useRef(null),i=ve(r,o),s=QA(t);return y.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&c){const d=new Event("change",{bubbles:!0});c.call(a,t),a.dispatchEvent(d)}},[s,t]),p.jsx(he.select,{...n,style:{...xA,...n.style},ref:i,defaultValue:t})});jI.displayName=aQ;function OI(e){return e===""||e===void 0}function LI(e){const t=rt(e),n=y.useRef(""),r=y.useRef(0),o=y.useCallback(s=>{const a=n.current+s;t(a),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function DI(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=lQ(e,Math.max(i,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function lQ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var uQ=cI,$I=fI,cQ=pI,dQ=mI,fQ=gI,zI=vI,hQ=bI,FI=EI,qI=NI,pQ=kI,mQ=PI,BI=TI,HI=AI,VI=II;const gQ=uQ,vQ=cQ,WI=y.forwardRef(({className:e,children:t,...n},r)=>p.jsxs($I,{ref:r,className:ne("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,p.jsx(dQ,{asChild:!0,children:p.jsx(Us,{className:"h-4 w-4 opacity-50"})})]}));WI.displayName=$I.displayName;const UI=y.forwardRef(({className:e,...t},n)=>p.jsx(BI,{ref:n,className:ne("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Fy,{className:"h-4 w-4"})}));UI.displayName=BI.displayName;const GI=y.forwardRef(({className:e,...t},n)=>p.jsx(HI,{ref:n,className:ne("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Us,{className:"h-4 w-4"})}));GI.displayName=HI.displayName;const YI=y.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>p.jsx(fQ,{children:p.jsxs(zI,{ref:o,className:ne("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[p.jsx(UI,{}),p.jsx(hQ,{className:ne("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),p.jsx(GI,{})]})}));YI.displayName=zI.displayName;const yQ=y.forwardRef(({className:e,...t},n)=>p.jsx(FI,{ref:n,className:ne("px-2 py-1.5 text-sm font-semibold",e),...t}));yQ.displayName=FI.displayName;const KI=y.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(qI,{ref:r,className:ne("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(mQ,{children:p.jsx(x2,{className:"h-4 w-4"})})}),p.jsx(pQ,{children:t})]}));KI.displayName=qI.displayName;const xQ=y.forwardRef(({className:e,...t},n)=>p.jsx(VI,{ref:n,className:ne("-mx-1 my-1 h-px bg-muted",e),...t}));xQ.displayName=VI.displayName;function wQ(){var E,k,T;const[e,t]=y.useState(null),[n,r]=y.useState(null),[o,i]=y.useState(),[s,a]=y.useState("analysis"),[l,u]=y.useState(!1),[c,d]=y.useState([]),[f,h]=y.useState(""),[g,m]=y.useState(!1);y.useEffect(()=>{(async()=>{try{const P=await fetch("/api/projects");if(P.ok){const j=await P.json();d(j),j.length>0&&!f&&h(j[0].path)}}catch{console.log("Projects API not available"),d([])}})()},[]),y.useEffect(()=>{const I=async()=>{m(!0);try{const P=f?`/api/snapshot?project=${encodeURIComponent(f)}`:"/api/snapshot",j=await fetch(P);if(j.ok){const $=await j.text(),R=lg($);t(R),console.log("Loaded snapshot"+(f?` for ${f}`:""))}else t(null)}catch{console.log("No snapshot found"),t(null)}finally{m(!1)}};(f||c.length===0)&&I()},[f,c.length]);const b=y.useMemo(()=>{var I;return(I=e==null?void 0:e.metadata)!=null&&I.files?_Y(e.metadata.files):{name:"root",path:"",type:"directory",children:[]}},[e]),v=y.useCallback(I=>{I.preventDefault(),u(!1);const P=I.dataTransfer.files[0];if(P){const j=new FileReader;j.onload=$=>{var L;const R=(L=$.target)==null?void 0:L.result;if(R){const M=lg(R);t(M),r(null),i(void 0)}},j.readAsText(P)}},[]),w=y.useCallback(I=>{I.preventDefault(),u(!0)},[]),x=y.useCallback(()=>{u(!1)},[]),_=y.useCallback((I,P)=>{r(I),i(P),P&&setTimeout(()=>{const j=document.getElementById(`line-${P}`);j==null||j.scrollIntoView({behavior:"smooth",block:"center"})},100)},[]),C=y.useCallback(I=>{if(I.trim()){const P=lg(I);t(P),r(null),i(void 0)}},[]),S=y.useCallback(()=>{t(null),r(null),i(void 0)},[]);return p.jsx(JM,{defaultOpen:!0,children:p.jsxs("div",{className:"flex min-h-screen w-full",onDrop:v,onDragOver:w,onDragLeave:x,children:[p.jsx(PX,{activeTab:s,onTabChange:a,hasSnapshot:!!e,fileCount:((E=e==null?void 0:e.metadata)==null?void 0:E.files.length)||0,importCount:((k=e==null?void 0:e.metadata)==null?void 0:k.imports.length)||0,onClear:S,currentProjectPath:f}),p.jsxs(rI,{children:[p.jsxs("header",{className:"flex h-14 shrink-0 items-center gap-2 border-b px-4",children:[p.jsx(tI,{className:"-ml-1"}),p.jsx(cs,{orientation:"vertical",className:"mr-2 h-4"}),c.length>0&&p.jsxs(gQ,{value:f,onValueChange:h,children:[p.jsx(WI,{className:"w-[200px] h-8",children:p.jsx(vQ,{placeholder:"Select project",children:f&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Dl,{className:"h-4 w-4 text-muted-foreground shrink-0"}),p.jsx("span",{className:"truncate",children:((T=c.find(I=>I.path===f))==null?void 0:T.name)||"Select project"})]})})}),p.jsx(YI,{children:c.map(I=>p.jsx(KI,{value:I.path,children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(Dl,{className:"h-4 w-4 text-muted-foreground shrink-0"}),p.jsx("span",{children:I.name})]})},I.path))})]}),p.jsx(cs,{orientation:"vertical",className:"mx-2 h-4"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("h1",{className:"text-sm font-medium",children:s.charAt(0).toUpperCase()+s.slice(1)}),g&&p.jsx("span",{className:"text-xs text-muted-foreground animate-pulse",children:"Loading..."})]})]}),l&&p.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm",children:p.jsx(Xr,{className:"border-dashed border-2 border-primary",children:p.jsxs(Qr,{className:"flex flex-col items-center gap-2 p-8",children:[p.jsx(cv,{className:"h-8 w-8 text-primary"}),p.jsx("p",{className:"text-lg font-medium",children:"Drop snapshot file here"})]})})}),e?p.jsx("div",{className:"flex flex-1 overflow-hidden",children:s==="analysis"?p.jsx("div",{className:"flex-1 overflow-hidden",children:e.metadata?p.jsx(h4,{files:e.metadata.files,imports:e.metadata.imports,onFileSelect:_,selectedFile:n,metadata:e.metadata}):p.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:p.jsx("p",{children:"No dependency data available (basic snapshot)"})})}):s==="graph"?p.jsx("div",{className:"flex-1 overflow-hidden",children:e.metadata?p.jsx(iY,{files:e.metadata.files,imports:e.metadata.imports,onFileSelect:_,selectedFile:n}):p.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:p.jsx("p",{children:"No dependency data available (basic snapshot)"})})}):s==="files"?p.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[p.jsx("div",{className:"w-72 border-r overflow-hidden flex flex-col",children:p.jsx(EY,{tree:b,onFileSelect:_,selectedFile:n})}),p.jsx("div",{className:"flex-1 overflow-hidden",children:p.jsx(VC,{data:e,selectedFile:n,highlightLine:o})})]}):p.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[p.jsx("div",{className:"w-80 border-r overflow-hidden flex flex-col",children:p.jsx(IY,{data:e,onFileSelect:_})}),p.jsx("div",{className:"flex-1 overflow-hidden",children:p.jsx(VC,{data:e,selectedFile:n,highlightLine:o})})]})}):p.jsx("div",{className:"flex flex-1 items-center justify-center p-8",children:p.jsxs(Xr,{className:"max-w-2xl w-full",children:[p.jsxs(Jo,{className:"text-center",children:[p.jsx(ei,{className:"text-2xl",children:"Load a Snapshot"}),p.jsx($2,{children:"Drag and drop a snapshot file, or paste content below"})]}),p.jsxs(Qr,{className:"space-y-6",children:[p.jsxs("div",{className:"border-2 border-dashed border-border rounded-lg p-8 text-center hover:border-primary/50 transition-colors cursor-pointer",children:[p.jsx("input",{type:"file",id:"file-input",className:"hidden",accept:".txt",onChange:I=>{var j;const P=(j=I.target.files)==null?void 0:j[0];if(P){const $=new FileReader;$.onload=R=>{var M;const L=(M=R.target)==null?void 0:M.result;L&&C(L)},$.readAsText(P)}}}),p.jsxs("label",{htmlFor:"file-input",className:"cursor-pointer",children:[p.jsx(cv,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),p.jsx("p",{className:"text-muted-foreground",children:"Click to browse or drag & drop"})]})]}),p.jsxs("div",{className:"relative",children:[p.jsx("div",{className:"absolute inset-0 flex items-center",children:p.jsx(cs,{})}),p.jsx("div",{className:"relative flex justify-center",children:p.jsx("span",{className:"bg-card px-2 text-xs text-muted-foreground uppercase",children:"or"})})]}),p.jsx("textarea",{placeholder:"Paste snapshot content here...",className:"w-full h-48 p-4 bg-muted/50 border border-input rounded-lg text-sm font-mono resize-none focus:outline-none focus:ring-2 focus:ring-ring",onPaste:I=>{const P=I.clipboardData.getData("text");P&&C(P)}}),p.jsxs("div",{className:"text-center space-y-2",children:[p.jsxs("p",{className:"text-sm text-muted-foreground",children:["Create a snapshot with:"," ",p.jsx("code",{className:"bg-muted px-2 py-1 rounded text-xs",children:"foundation snapshot . -o snapshot.txt"})]}),c.length===0&&p.jsxs("p",{className:"text-sm text-muted-foreground",children:["Or run"," ",p.jsx("code",{className:"bg-muted px-2 py-1 rounded text-xs",children:"foundation snapshot"})," ","in your project directories to register them for quick switching."]})]})]})]})})]})]})})}vg.createRoot(document.getElementById("root")).render(p.jsx(en.StrictMode,{children:p.jsx(wQ,{})}));
|