@super-line/control-center 0.5.0 → 0.7.0
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.
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const u of a)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&s(d)}).observe(document,{childList:!0,subtree:!0});function i(a){const u={};return a.integrity&&(u.integrity=a.integrity),a.referrerPolicy&&(u.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?u.credentials="include":a.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function s(a){if(a.ep)return;a.ep=!0;const u=i(a);fetch(a.href,u)}})();function Lh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var bu={exports:{}},ii={},Mu={exports:{}},Ce={};/**
|
|
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 ip;function wy(){if(ip)return Ce;ip=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),g=Symbol.iterator;function y(b){return b===null||typeof b!="object"?null:(b=g&&b[g]||b["@@iterator"],typeof b=="function"?b:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function k(b,j,te){this.props=b,this.context=j,this.refs=C,this.updater=te||w}k.prototype.isReactComponent={},k.prototype.setState=function(b,j){if(typeof b!="object"&&typeof b!="function"&&b!=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,b,j,"setState")},k.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function E(){}E.prototype=k.prototype;function I(b,j,te){this.props=b,this.context=j,this.refs=C,this.updater=te||w}var N=I.prototype=new E;N.constructor=I,S(N,k.prototype),N.isPureReactComponent=!0;var M=Array.isArray,F=Object.prototype.hasOwnProperty,A={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function G(b,j,te){var oe,ae={},ce=null,ue=null;if(j!=null)for(oe in j.ref!==void 0&&(ue=j.ref),j.key!==void 0&&(ce=""+j.key),j)F.call(j,oe)&&!B.hasOwnProperty(oe)&&(ae[oe]=j[oe]);var Z=arguments.length-2;if(Z===1)ae.children=te;else if(1<Z){for(var se=Array(Z),ge=0;ge<Z;ge++)se[ge]=arguments[ge+2];ae.children=se}if(b&&b.defaultProps)for(oe in Z=b.defaultProps,Z)ae[oe]===void 0&&(ae[oe]=Z[oe]);return{$$typeof:t,type:b,key:ce,ref:ue,props:ae,_owner:A.current}}function q(b,j){return{$$typeof:t,type:b.type,key:j,ref:b.ref,props:b.props,_owner:b._owner}}function ee(b){return typeof b=="object"&&b!==null&&b.$$typeof===t}function D(b){var j={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(te){return j[te]})}var V=/\/+/g;function J(b,j){return typeof b=="object"&&b!==null&&b.key!=null?D(""+b.key):j.toString(36)}function z(b,j,te,oe,ae){var ce=typeof b;(ce==="undefined"||ce==="boolean")&&(b=null);var ue=!1;if(b===null)ue=!0;else switch(ce){case"string":case"number":ue=!0;break;case"object":switch(b.$$typeof){case t:case r:ue=!0}}if(ue)return ue=b,ae=ae(ue),b=oe===""?"."+J(ue,0):oe,M(ae)?(te="",b!=null&&(te=b.replace(V,"$&/")+"/"),z(ae,j,te,"",function(ge){return ge})):ae!=null&&(ee(ae)&&(ae=q(ae,te+(!ae.key||ue&&ue.key===ae.key?"":(""+ae.key).replace(V,"$&/")+"/")+b)),j.push(ae)),1;if(ue=0,oe=oe===""?".":oe+":",M(b))for(var Z=0;Z<b.length;Z++){ce=b[Z];var se=oe+J(ce,Z);ue+=z(ce,j,te,se,ae)}else if(se=y(b),typeof se=="function")for(b=se.call(b),Z=0;!(ce=b.next()).done;)ce=ce.value,se=oe+J(ce,Z++),ue+=z(ce,j,te,se,ae);else if(ce==="object")throw j=String(b),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.");return ue}function U(b,j,te){if(b==null)return b;var oe=[],ae=0;return z(b,oe,"","",function(ce){return j.call(te,ce,ae++)}),oe}function O(b){if(b._status===-1){var j=b._result;j=j(),j.then(function(te){(b._status===0||b._status===-1)&&(b._status=1,b._result=te)},function(te){(b._status===0||b._status===-1)&&(b._status=2,b._result=te)}),b._status===-1&&(b._status=0,b._result=j)}if(b._status===1)return b._result.default;throw b._result}var W={current:null},L={transition:null},T={ReactCurrentDispatcher:W,ReactCurrentBatchConfig:L,ReactCurrentOwner:A};function H(){throw Error("act(...) is not supported in production builds of React.")}return Ce.Children={map:U,forEach:function(b,j,te){U(b,function(){j.apply(this,arguments)},te)},count:function(b){var j=0;return U(b,function(){j++}),j},toArray:function(b){return U(b,function(j){return j})||[]},only:function(b){if(!ee(b))throw Error("React.Children.only expected to receive a single React element child.");return b}},Ce.Component=k,Ce.Fragment=i,Ce.Profiler=a,Ce.PureComponent=I,Ce.StrictMode=s,Ce.Suspense=h,Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T,Ce.act=H,Ce.cloneElement=function(b,j,te){if(b==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+b+".");var oe=S({},b.props),ae=b.key,ce=b.ref,ue=b._owner;if(j!=null){if(j.ref!==void 0&&(ce=j.ref,ue=A.current),j.key!==void 0&&(ae=""+j.key),b.type&&b.type.defaultProps)var Z=b.type.defaultProps;for(se in j)F.call(j,se)&&!B.hasOwnProperty(se)&&(oe[se]=j[se]===void 0&&Z!==void 0?Z[se]:j[se])}var se=arguments.length-2;if(se===1)oe.children=te;else if(1<se){Z=Array(se);for(var ge=0;ge<se;ge++)Z[ge]=arguments[ge+2];oe.children=Z}return{$$typeof:t,type:b.type,key:ae,ref:ce,props:oe,_owner:ue}},Ce.createContext=function(b){return b={$$typeof:d,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},b.Provider={$$typeof:u,_context:b},b.Consumer=b},Ce.createElement=G,Ce.createFactory=function(b){var j=G.bind(null,b);return j.type=b,j},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(b){return{$$typeof:f,render:b}},Ce.isValidElement=ee,Ce.lazy=function(b){return{$$typeof:v,_payload:{_status:-1,_result:b},_init:O}},Ce.memo=function(b,j){return{$$typeof:m,type:b,compare:j===void 0?null:j}},Ce.startTransition=function(b){var j=L.transition;L.transition={};try{b()}finally{L.transition=j}},Ce.unstable_act=H,Ce.useCallback=function(b,j){return W.current.useCallback(b,j)},Ce.useContext=function(b){return W.current.useContext(b)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(b){return W.current.useDeferredValue(b)},Ce.useEffect=function(b,j){return W.current.useEffect(b,j)},Ce.useId=function(){return W.current.useId()},Ce.useImperativeHandle=function(b,j,te){return W.current.useImperativeHandle(b,j,te)},Ce.useInsertionEffect=function(b,j){return W.current.useInsertionEffect(b,j)},Ce.useLayoutEffect=function(b,j){return W.current.useLayoutEffect(b,j)},Ce.useMemo=function(b,j){return W.current.useMemo(b,j)},Ce.useReducer=function(b,j,te){return W.current.useReducer(b,j,te)},Ce.useRef=function(b){return W.current.useRef(b)},Ce.useState=function(b){return W.current.useState(b)},Ce.useSyncExternalStore=function(b,j,te){return W.current.useSyncExternalStore(b,j,te)},Ce.useTransition=function(){return W.current.useTransition()},Ce.version="18.3.1",Ce}var sp;function Ei(){return sp||(sp=1,Mu.exports=wy()),Mu.exports}/**
|
|
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 lp;function Sy(){if(lp)return ii;lp=1;var t=Ei(),r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function d(f,h,m){var v,g={},y=null,w=null;m!==void 0&&(y=""+m),h.key!==void 0&&(y=""+h.key),h.ref!==void 0&&(w=h.ref);for(v in h)s.call(h,v)&&!u.hasOwnProperty(v)&&(g[v]=h[v]);if(f&&f.defaultProps)for(v in h=f.defaultProps,h)g[v]===void 0&&(g[v]=h[v]);return{$$typeof:r,type:f,key:y,ref:w,props:g,_owner:a.current}}return ii.Fragment=i,ii.jsx=d,ii.jsxs=d,ii}var ap;function ky(){return ap||(ap=1,bu.exports=Sy()),bu.exports}var _=ky(),X=Ei();const _y=Lh(X);var Gs={},Pu={exports:{}},xt={},zu={exports:{}},Iu={};/**
|
|
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
|
-
*/var up;function Ey(){return up||(up=1,(function(t){function r(L,T){var H=L.length;L.push(T);e:for(;0<H;){var b=H-1>>>1,j=L[b];if(0<a(j,T))L[b]=T,L[H]=j,H=b;else break e}}function i(L){return L.length===0?null:L[0]}function s(L){if(L.length===0)return null;var T=L[0],H=L.pop();if(H!==T){L[0]=H;e:for(var b=0,j=L.length,te=j>>>1;b<te;){var oe=2*(b+1)-1,ae=L[oe],ce=oe+1,ue=L[ce];if(0>a(ae,H))ce<j&&0>a(ue,ae)?(L[b]=ue,L[ce]=H,b=ce):(L[b]=ae,L[oe]=H,b=oe);else if(ce<j&&0>a(ue,H))L[b]=ue,L[ce]=H,b=ce;else break e}}return T}function a(L,T){var H=L.sortIndex-T.sortIndex;return H!==0?H:L.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var d=Date,f=d.now();t.unstable_now=function(){return d.now()-f}}var h=[],m=[],v=1,g=null,y=3,w=!1,S=!1,C=!1,k=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,I=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(L){for(var T=i(m);T!==null;){if(T.callback===null)s(m);else if(T.startTime<=L)s(m),T.sortIndex=T.expirationTime,r(h,T);else break;T=i(m)}}function M(L){if(C=!1,N(L),!S)if(i(h)!==null)S=!0,O(F);else{var T=i(m);T!==null&&W(M,T.startTime-L)}}function F(L,T){S=!1,C&&(C=!1,E(G),G=-1),w=!0;var H=y;try{for(N(T),g=i(h);g!==null&&(!(g.expirationTime>T)||L&&!D());){var b=g.callback;if(typeof b=="function"){g.callback=null,y=g.priorityLevel;var j=b(g.expirationTime<=T);T=t.unstable_now(),typeof j=="function"?g.callback=j:g===i(h)&&s(h),N(T)}else s(h);g=i(h)}if(g!==null)var te=!0;else{var oe=i(m);oe!==null&&W(M,oe.startTime-T),te=!1}return te}finally{g=null,y=H,w=!1}}var A=!1,B=null,G=-1,q=5,ee=-1;function D(){return!(t.unstable_now()-ee<q)}function V(){if(B!==null){var L=t.unstable_now();ee=L;var T=!0;try{T=B(!0,L)}finally{T?J():(A=!1,B=null)}}else A=!1}var J;if(typeof I=="function")J=function(){I(V)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,U=z.port2;z.port1.onmessage=V,J=function(){U.postMessage(null)}}else J=function(){k(V,0)};function O(L){B=L,A||(A=!0,J())}function W(L,T){G=k(function(){L(t.unstable_now())},T)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(L){L.callback=null},t.unstable_continueExecution=function(){S||w||(S=!0,O(F))},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_getFirstCallbackNode=function(){return i(h)},t.unstable_next=function(L){switch(y){case 1:case 2:case 3:var T=3;break;default:T=y}var H=y;y=T;try{return L()}finally{y=H}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(L,T){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var H=y;y=L;try{return T()}finally{y=H}},t.unstable_scheduleCallback=function(L,T,H){var b=t.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?b+H:b):H=b,L){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=H+j,L={id:v++,callback:T,priorityLevel:L,startTime:H,expirationTime:j,sortIndex:-1},H>b?(L.sortIndex=H,r(m,L),i(h)===null&&L===i(m)&&(C?(E(G),G=-1):C=!0,W(M,H-b))):(L.sortIndex=j,r(h,L),S||w||(S=!0,O(F))),L},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(L){var T=y;return function(){var H=y;y=T;try{return L.apply(this,arguments)}finally{y=H}}}})(Iu)),Iu}var cp;function Ny(){return cp||(cp=1,zu.exports=Ey()),zu.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 dp;function Cy(){if(dp)return xt;dp=1;var t=Ei(),r=Ny();function i(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function u(e,n){d(e,n),d(e+"Capture",n)}function d(e,n){for(a[e]=n,e=0;e<n.length;e++)s.add(n[e])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,m=/^[: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]*$/,v={},g={};function y(e){return h.call(g,e)?!0:h.call(v,e)?!1:m.test(e)?g[e]=!0:(v[e]=!0,!1)}function w(e,n,o,l){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return l?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function S(e,n,o,l){if(n===null||typeof n>"u"||w(e,n,o,l))return!0;if(l)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function C(e,n,o,l,c,p,x){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=l,this.attributeNamespace=c,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=p,this.removeEmptyString=x}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){k[e]=new C(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];k[n]=new C(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){k[e]=new C(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){k[e]=new C(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){k[e]=new C(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){k[e]=new C(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){k[e]=new C(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){k[e]=new C(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){k[e]=new C(e,5,!1,e.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function I(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 n=e.replace(E,I);k[n]=new C(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(E,I);k[n]=new C(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(E,I);k[n]=new C(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){k[e]=new C(e,1,!1,e.toLowerCase(),null,!1,!1)}),k.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){k[e]=new C(e,1,!1,e.toLowerCase(),null,!0,!0)});function N(e,n,o,l){var c=k.hasOwnProperty(n)?k[n]:null;(c!==null?c.type!==0:l||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(S(n,o,c,l)&&(o=null),l||c===null?y(n)&&(o===null?e.removeAttribute(n):e.setAttribute(n,""+o)):c.mustUseProperty?e[c.propertyName]=o===null?c.type===3?!1:"":o:(n=c.attributeName,l=c.attributeNamespace,o===null?e.removeAttribute(n):(c=c.type,o=c===3||c===4&&o===!0?"":""+o,l?e.setAttributeNS(l,n,o):e.setAttribute(n,o))))}var M=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,F=Symbol.for("react.element"),A=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),D=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),L=Symbol.iterator;function T(e){return e===null||typeof e!="object"?null:(e=L&&e[L]||e["@@iterator"],typeof e=="function"?e:null)}var H=Object.assign,b;function j(e){if(b===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);b=n&&n[1]||""}return`
|
|
34
|
-
`+b+e}var te=!1;function oe(e,n){if(!e||te)return"";te=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(K){var l=K}Reflect.construct(e,[],n)}else{try{n.call()}catch(K){l=K}e.call(n.prototype)}else{try{throw Error()}catch(K){l=K}e()}}catch(K){if(K&&l&&typeof K.stack=="string"){for(var c=K.stack.split(`
|
|
35
|
-
`),p=l.stack.split(`
|
|
36
|
-
`),x=c.length-1,P=p.length-1;1<=x&&0<=P&&c[x]!==p[P];)P--;for(;1<=x&&0<=P;x--,P--)if(c[x]!==p[P]){if(x!==1||P!==1)do if(x--,P--,0>P||c[x]!==p[P]){var R=`
|
|
37
|
-
`+c[x].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),R}while(1<=x&&0<=P);break}}}finally{te=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?j(e):""}function ae(e){switch(e.tag){case 5:return j(e.type);case 16:return j("Lazy");case 13:return j("Suspense");case 19:return j("SuspenseList");case 0:case 2:case 15:return e=oe(e.type,!1),e;case 11:return e=oe(e.type.render,!1),e;case 1:return e=oe(e.type,!0),e;default:return""}}function ce(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 B:return"Fragment";case A:return"Portal";case q:return"Profiler";case G:return"StrictMode";case J:return"Suspense";case z:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case D:return(e.displayName||"Context")+".Consumer";case ee:return(e._context.displayName||"Context")+".Provider";case V:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U:return n=e.displayName||null,n!==null?n:ce(e.type)||"Memo";case O:n=e._payload,e=e._init;try{return ce(e(n))}catch{}}return null}function ue(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(n);case 8:return n===G?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Z(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function se(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ge(e){var n=se(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),l=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,p=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(x){l=""+x,p.call(this,x)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(x){l=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function we(e){e._valueTracker||(e._valueTracker=ge(e))}function ve(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),l="";return e&&(l=se(e)?e.checked?"true":"false":e.value),e=l,e!==o?(n.setValue(e),!0):!1}function me(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 Ee(e,n){var o=n.checked;return H({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function Me(e,n){var o=n.defaultValue==null?"":n.defaultValue,l=n.checked!=null?n.checked:n.defaultChecked;o=Z(n.value!=null?n.value:o),e._wrapperState={initialChecked:l,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Ie(e,n){n=n.checked,n!=null&&N(e,"checked",n,!1)}function Re(e,n){Ie(e,n);var o=Z(n.value),l=n.type;if(o!=null)l==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(l==="submit"||l==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?ft(e,n.type,o):n.hasOwnProperty("defaultValue")&&ft(e,n.type,Z(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function ut(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var l=n.type;if(!(l!=="submit"&&l!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function ft(e,n,o){(n!=="number"||me(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var nt=Array.isArray;function rt(e,n,o,l){if(e=e.options,n){n={};for(var c=0;c<o.length;c++)n["$"+o[c]]=!0;for(o=0;o<e.length;o++)c=n.hasOwnProperty("$"+e[o].value),e[o].selected!==c&&(e[o].selected=c),c&&l&&(e[o].defaultSelected=!0)}else{for(o=""+Z(o),n=null,c=0;c<e.length;c++){if(e[c].value===o){e[c].selected=!0,l&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function ln(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(i(91));return H({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function qt(e,n){var o=n.value;if(o==null){if(o=n.children,n=n.defaultValue,o!=null){if(n!=null)throw Error(i(92));if(nt(o)){if(1<o.length)throw Error(i(93));o=o[0]}n=o}n==null&&(n=""),o=n}e._wrapperState={initialValue:Z(o)}}function Kt(e,n){var o=Z(n.value),l=Z(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),l!=null&&(e.defaultValue=""+l)}function pt(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function zt(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 St(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?zt(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var It,zi=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,o,l,c){MSApp.execUnsafeLocalFunction(function(){return e(n,o,l,c)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(It=It||document.createElement("div"),It.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=It.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function an(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var Kn={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},Ll=["Webkit","ms","Moz","O"];Object.keys(Kn).forEach(function(e){Ll.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Kn[n]=Kn[e]})});function Ii(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||Kn.hasOwnProperty(e)&&Kn[e]?(""+n).trim():n+"px"}function Ti(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var l=o.indexOf("--")===0,c=Ii(o,n[o],l);o==="float"&&(o="cssFloat"),l?e.setProperty(o,c):e[o]=c}}var Al=H({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 mo(e,n){if(n){if(Al[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(i(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(i(61))}if(n.style!=null&&typeof n.style!="object")throw Error(i(62))}}function yo(e,n){if(e.indexOf("-")===-1)return typeof n.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 vo=null;function xo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wo=null,En=null,Nn=null;function ji(e){if(e=Wo(e)){if(typeof wo!="function")throw Error(i(280));var n=e.stateNode;n&&(n=us(n),wo(e.stateNode,e.type,n))}}function Ri(e){En?Nn?Nn.push(e):Nn=[e]:En=e}function Li(){if(En){var e=En,n=Nn;if(Nn=En=null,ji(e),n)for(e=0;e<n.length;e++)ji(n[e])}}function Ai(e,n){return e(n)}function $i(){}var So=!1;function Di(e,n,o){if(So)return e(n,o);So=!0;try{return Ai(e,n,o)}finally{So=!1,(En!==null||Nn!==null)&&($i(),Li())}}function Zn(e,n){var o=e.stateNode;if(o===null)return null;var l=us(o);if(l===null)return null;o=l[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(i(231,n,typeof o));return o}var ko=!1;if(f)try{var Jn={};Object.defineProperty(Jn,"passive",{get:function(){ko=!0}}),window.addEventListener("test",Jn,Jn),window.removeEventListener("test",Jn,Jn)}catch{ko=!1}function $l(e,n,o,l,c,p,x,P,R){var K=Array.prototype.slice.call(arguments,3);try{n.apply(o,K)}catch(re){this.onError(re)}}var er=!1,Nr=null,Cr=!1,_o=null,Dl={onError:function(e){er=!0,Nr=e}};function Ol(e,n,o,l,c,p,x,P,R){er=!1,Nr=null,$l.apply(Dl,arguments)}function Fl(e,n,o,l,c,p,x,P,R){if(Ol.apply(this,arguments),er){if(er){var K=Nr;er=!1,Nr=null}else throw Error(i(198));Cr||(Cr=!0,_o=K)}}function Zt(e){var n=e,o=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(o=n.return),e=n.return;while(e)}return n.tag===3?o:null}function Eo(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function No(e){if(Zt(e)!==e)throw Error(i(188))}function Vl(e){var n=e.alternate;if(!n){if(n=Zt(e),n===null)throw Error(i(188));return n!==e?null:e}for(var o=e,l=n;;){var c=o.return;if(c===null)break;var p=c.alternate;if(p===null){if(l=c.return,l!==null){o=l;continue}break}if(c.child===p.child){for(p=c.child;p;){if(p===o)return No(c),e;if(p===l)return No(c),n;p=p.sibling}throw Error(i(188))}if(o.return!==l.return)o=c,l=p;else{for(var x=!1,P=c.child;P;){if(P===o){x=!0,o=c,l=p;break}if(P===l){x=!0,l=c,o=p;break}P=P.sibling}if(!x){for(P=p.child;P;){if(P===o){x=!0,o=p,l=c;break}if(P===l){x=!0,l=p,o=c;break}P=P.sibling}if(!x)throw Error(i(189))}}if(o.alternate!==l)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?e:n}function Oi(e){return e=Vl(e),e!==null?Fi(e):null}function Fi(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=Fi(e);if(n!==null)return n;e=e.sibling}return null}var Vi=r.unstable_scheduleCallback,Hi=r.unstable_cancelCallback,Hl=r.unstable_shouldYield,Bi=r.unstable_requestPaint,Ve=r.unstable_now,Bl=r.unstable_getCurrentPriorityLevel,Co=r.unstable_ImmediatePriority,Wi=r.unstable_UserBlockingPriority,br=r.unstable_NormalPriority,Wl=r.unstable_LowPriority,Ui=r.unstable_IdlePriority,Mr=null,kt=null;function Ul(e){if(kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(Mr,e,void 0,(e.current.flags&128)===128)}catch{}}var _t=Math.clz32?Math.clz32:Gl,Yl=Math.log,Xl=Math.LN2;function Gl(e){return e>>>=0,e===0?32:31-(Yl(e)/Xl|0)|0}var Pr=64,zr=4194304;function tr(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 un(e,n){var o=e.pendingLanes;if(o===0)return 0;var l=0,c=e.suspendedLanes,p=e.pingedLanes,x=o&268435455;if(x!==0){var P=x&~c;P!==0?l=tr(P):(p&=x,p!==0&&(l=tr(p)))}else x=o&~c,x!==0?l=tr(x):p!==0&&(l=tr(p));if(l===0)return 0;if(n!==0&&n!==l&&(n&c)===0&&(c=l&-l,p=n&-n,c>=p||c===16&&(p&4194240)!==0))return n;if((l&4)!==0&&(l|=o&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=l;0<n;)o=31-_t(n),c=1<<o,l|=e[o],n&=~c;return l}function Ql(e,n){switch(e){case 1:case 2:case 4:return n+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 n+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 Yi(e,n){for(var o=e.suspendedLanes,l=e.pingedLanes,c=e.expirationTimes,p=e.pendingLanes;0<p;){var x=31-_t(p),P=1<<x,R=c[x];R===-1?((P&o)===0||(P&l)!==0)&&(c[x]=Ql(P,n)):R<=n&&(e.expiredLanes|=P),p&=~P}}function bo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Xi(){var e=Pr;return Pr<<=1,(Pr&4194240)===0&&(Pr=64),e}function nr(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function rr(e,n,o){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-_t(n),e[n]=o}function ql(e,n){var o=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var l=e.eventTimes;for(e=e.expirationTimes;0<o;){var c=31-_t(o),p=1<<c;n[c]=0,l[c]=-1,e[c]=-1,o&=~p}}function Ir(e,n){var o=e.entangledLanes|=n;for(e=e.entanglements;o;){var l=31-_t(o),c=1<<l;c&n|e[l]&n&&(e[l]|=n),o&=~c}}var Te=0;function Ac(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var $c,Kl,Dc,Oc,Fc,Zl=!1,Gi=[],Cn=null,bn=null,Mn=null,Mo=new Map,Po=new Map,Pn=[],Hm="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 Vc(e,n){switch(e){case"focusin":case"focusout":Cn=null;break;case"dragenter":case"dragleave":bn=null;break;case"mouseover":case"mouseout":Mn=null;break;case"pointerover":case"pointerout":Mo.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Po.delete(n.pointerId)}}function zo(e,n,o,l,c,p){return e===null||e.nativeEvent!==p?(e={blockedOn:n,domEventName:o,eventSystemFlags:l,nativeEvent:p,targetContainers:[c]},n!==null&&(n=Wo(n),n!==null&&Kl(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function Bm(e,n,o,l,c){switch(n){case"focusin":return Cn=zo(Cn,e,n,o,l,c),!0;case"dragenter":return bn=zo(bn,e,n,o,l,c),!0;case"mouseover":return Mn=zo(Mn,e,n,o,l,c),!0;case"pointerover":var p=c.pointerId;return Mo.set(p,zo(Mo.get(p)||null,e,n,o,l,c)),!0;case"gotpointercapture":return p=c.pointerId,Po.set(p,zo(Po.get(p)||null,e,n,o,l,c)),!0}return!1}function Hc(e){var n=or(e.target);if(n!==null){var o=Zt(n);if(o!==null){if(n=o.tag,n===13){if(n=Eo(o),n!==null){e.blockedOn=n,Fc(e.priority,function(){Dc(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Qi(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=ea(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o===null){o=e.nativeEvent;var l=new o.constructor(o.type,o);vo=l,o.target.dispatchEvent(l),vo=null}else return n=Wo(o),n!==null&&Kl(n),e.blockedOn=o,!1;n.shift()}return!0}function Bc(e,n,o){Qi(e)&&o.delete(n)}function Wm(){Zl=!1,Cn!==null&&Qi(Cn)&&(Cn=null),bn!==null&&Qi(bn)&&(bn=null),Mn!==null&&Qi(Mn)&&(Mn=null),Mo.forEach(Bc),Po.forEach(Bc)}function Io(e,n){e.blockedOn===n&&(e.blockedOn=null,Zl||(Zl=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Wm)))}function To(e){function n(c){return Io(c,e)}if(0<Gi.length){Io(Gi[0],e);for(var o=1;o<Gi.length;o++){var l=Gi[o];l.blockedOn===e&&(l.blockedOn=null)}}for(Cn!==null&&Io(Cn,e),bn!==null&&Io(bn,e),Mn!==null&&Io(Mn,e),Mo.forEach(n),Po.forEach(n),o=0;o<Pn.length;o++)l=Pn[o],l.blockedOn===e&&(l.blockedOn=null);for(;0<Pn.length&&(o=Pn[0],o.blockedOn===null);)Hc(o),o.blockedOn===null&&Pn.shift()}var Tr=M.ReactCurrentBatchConfig,qi=!0;function Um(e,n,o,l){var c=Te,p=Tr.transition;Tr.transition=null;try{Te=1,Jl(e,n,o,l)}finally{Te=c,Tr.transition=p}}function Ym(e,n,o,l){var c=Te,p=Tr.transition;Tr.transition=null;try{Te=4,Jl(e,n,o,l)}finally{Te=c,Tr.transition=p}}function Jl(e,n,o,l){if(qi){var c=ea(e,n,o,l);if(c===null)ya(e,n,l,Ki,o),Vc(e,l);else if(Bm(c,e,n,o,l))l.stopPropagation();else if(Vc(e,l),n&4&&-1<Hm.indexOf(e)){for(;c!==null;){var p=Wo(c);if(p!==null&&$c(p),p=ea(e,n,o,l),p===null&&ya(e,n,l,Ki,o),p===c)break;c=p}c!==null&&l.stopPropagation()}else ya(e,n,l,null,o)}}var Ki=null;function ea(e,n,o,l){if(Ki=null,e=xo(l),e=or(e),e!==null)if(n=Zt(e),n===null)e=null;else if(o=n.tag,o===13){if(e=Eo(n),e!==null)return e;e=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return Ki=e,null}function Wc(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(Bl()){case Co:return 1;case Wi:return 4;case br:case Wl:return 16;case Ui:return 536870912;default:return 16}default:return 16}}var zn=null,ta=null,Zi=null;function Uc(){if(Zi)return Zi;var e,n=ta,o=n.length,l,c="value"in zn?zn.value:zn.textContent,p=c.length;for(e=0;e<o&&n[e]===c[e];e++);var x=o-e;for(l=1;l<=x&&n[o-l]===c[p-l];l++);return Zi=c.slice(e,1<l?1-l:void 0)}function Ji(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function es(){return!0}function Yc(){return!1}function Et(e){function n(o,l,c,p,x){this._reactName=o,this._targetInst=c,this.type=l,this.nativeEvent=p,this.target=x,this.currentTarget=null;for(var P in e)e.hasOwnProperty(P)&&(o=e[P],this[P]=o?o(p):p[P]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?es:Yc,this.isPropagationStopped=Yc,this}return H(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=es)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=es)},persist:function(){},isPersistent:es}),n}var jr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},na=Et(jr),jo=H({},jr,{view:0,detail:0}),Xm=Et(jo),ra,oa,Ro,ts=H({},jo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sa,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!==Ro&&(Ro&&e.type==="mousemove"?(ra=e.screenX-Ro.screenX,oa=e.screenY-Ro.screenY):oa=ra=0,Ro=e),ra)},movementY:function(e){return"movementY"in e?e.movementY:oa}}),Xc=Et(ts),Gm=H({},ts,{dataTransfer:0}),Qm=Et(Gm),qm=H({},jo,{relatedTarget:0}),ia=Et(qm),Km=H({},jr,{animationName:0,elapsedTime:0,pseudoElement:0}),Zm=Et(Km),Jm=H({},jr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),e0=Et(Jm),t0=H({},jr,{data:0}),Gc=Et(t0),n0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},r0={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"},o0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function i0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=o0[e])?!!n[e]:!1}function sa(){return i0}var s0=H({},jo,{key:function(e){if(e.key){var n=n0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ji(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?r0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sa,charCode:function(e){return e.type==="keypress"?Ji(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ji(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),l0=Et(s0),a0=H({},ts,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qc=Et(a0),u0=H({},jo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sa}),c0=Et(u0),d0=H({},jr,{propertyName:0,elapsedTime:0,pseudoElement:0}),f0=Et(d0),p0=H({},ts,{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}),h0=Et(p0),g0=[9,13,27,32],la=f&&"CompositionEvent"in window,Lo=null;f&&"documentMode"in document&&(Lo=document.documentMode);var m0=f&&"TextEvent"in window&&!Lo,qc=f&&(!la||Lo&&8<Lo&&11>=Lo),Kc=" ",Zc=!1;function Jc(e,n){switch(e){case"keyup":return g0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ed(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rr=!1;function y0(e,n){switch(e){case"compositionend":return ed(n);case"keypress":return n.which!==32?null:(Zc=!0,Kc);case"textInput":return e=n.data,e===Kc&&Zc?null:e;default:return null}}function v0(e,n){if(Rr)return e==="compositionend"||!la&&Jc(e,n)?(e=Uc(),Zi=ta=zn=null,Rr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return qc&&n.locale!=="ko"?null:n.data;default:return null}}var x0={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 td(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!x0[e.type]:n==="textarea"}function nd(e,n,o,l){Ri(l),n=ss(n,"onChange"),0<n.length&&(o=new na("onChange","change",null,o,l),e.push({event:o,listeners:n}))}var Ao=null,$o=null;function w0(e){wd(e,0)}function ns(e){var n=Or(e);if(ve(n))return e}function S0(e,n){if(e==="change")return n}var rd=!1;if(f){var aa;if(f){var ua="oninput"in document;if(!ua){var od=document.createElement("div");od.setAttribute("oninput","return;"),ua=typeof od.oninput=="function"}aa=ua}else aa=!1;rd=aa&&(!document.documentMode||9<document.documentMode)}function id(){Ao&&(Ao.detachEvent("onpropertychange",sd),$o=Ao=null)}function sd(e){if(e.propertyName==="value"&&ns($o)){var n=[];nd(n,$o,e,xo(e)),Di(w0,n)}}function k0(e,n,o){e==="focusin"?(id(),Ao=n,$o=o,Ao.attachEvent("onpropertychange",sd)):e==="focusout"&&id()}function _0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ns($o)}function E0(e,n){if(e==="click")return ns(n)}function N0(e,n){if(e==="input"||e==="change")return ns(n)}function C0(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Dt=typeof Object.is=="function"?Object.is:C0;function Do(e,n){if(Dt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var o=Object.keys(e),l=Object.keys(n);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++){var c=o[l];if(!h.call(n,c)||!Dt(e[c],n[c]))return!1}return!0}function ld(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ad(e,n){var o=ld(e);e=0;for(var l;o;){if(o.nodeType===3){if(l=e+o.textContent.length,e<=n&&l>=n)return{node:o,offset:n-e};e=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=ld(o)}}function ud(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?ud(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function cd(){for(var e=window,n=me();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=me(e.document)}return n}function ca(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function b0(e){var n=cd(),o=e.focusedElem,l=e.selectionRange;if(n!==o&&o&&o.ownerDocument&&ud(o.ownerDocument.documentElement,o)){if(l!==null&&ca(o)){if(n=l.start,e=l.end,e===void 0&&(e=n),"selectionStart"in o)o.selectionStart=n,o.selectionEnd=Math.min(e,o.value.length);else if(e=(n=o.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var c=o.textContent.length,p=Math.min(l.start,c);l=l.end===void 0?p:Math.min(l.end,c),!e.extend&&p>l&&(c=l,l=p,p=c),c=ad(o,p);var x=ad(o,l);c&&x&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(n=n.createRange(),n.setStart(c.node,c.offset),e.removeAllRanges(),p>l?(e.addRange(n),e.extend(x.node,x.offset)):(n.setEnd(x.node,x.offset),e.addRange(n)))}}for(n=[],e=o;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<n.length;o++)e=n[o],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var M0=f&&"documentMode"in document&&11>=document.documentMode,Lr=null,da=null,Oo=null,fa=!1;function dd(e,n,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;fa||Lr==null||Lr!==me(l)||(l=Lr,"selectionStart"in l&&ca(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Oo&&Do(Oo,l)||(Oo=l,l=ss(da,"onSelect"),0<l.length&&(n=new na("onSelect","select",null,n,o),e.push({event:n,listeners:l}),n.target=Lr)))}function rs(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}var Ar={animationend:rs("Animation","AnimationEnd"),animationiteration:rs("Animation","AnimationIteration"),animationstart:rs("Animation","AnimationStart"),transitionend:rs("Transition","TransitionEnd")},pa={},fd={};f&&(fd=document.createElement("div").style,"AnimationEvent"in window||(delete Ar.animationend.animation,delete Ar.animationiteration.animation,delete Ar.animationstart.animation),"TransitionEvent"in window||delete Ar.transitionend.transition);function os(e){if(pa[e])return pa[e];if(!Ar[e])return e;var n=Ar[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in fd)return pa[e]=n[o];return e}var pd=os("animationend"),hd=os("animationiteration"),gd=os("animationstart"),md=os("transitionend"),yd=new Map,vd="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 In(e,n){yd.set(e,n),u(n,[e])}for(var ha=0;ha<vd.length;ha++){var ga=vd[ha],P0=ga.toLowerCase(),z0=ga[0].toUpperCase()+ga.slice(1);In(P0,"on"+z0)}In(pd,"onAnimationEnd"),In(hd,"onAnimationIteration"),In(gd,"onAnimationStart"),In("dblclick","onDoubleClick"),In("focusin","onFocus"),In("focusout","onBlur"),In(md,"onTransitionEnd"),d("onMouseEnter",["mouseout","mouseover"]),d("onMouseLeave",["mouseout","mouseover"]),d("onPointerEnter",["pointerout","pointerover"]),d("onPointerLeave",["pointerout","pointerover"]),u("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),u("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),u("onBeforeInput",["compositionend","keypress","textInput","paste"]),u("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),u("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fo="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(" "),I0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fo));function xd(e,n,o){var l=e.type||"unknown-event";e.currentTarget=o,Fl(l,n,void 0,e),e.currentTarget=null}function wd(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var l=e[o],c=l.event;l=l.listeners;e:{var p=void 0;if(n)for(var x=l.length-1;0<=x;x--){var P=l[x],R=P.instance,K=P.currentTarget;if(P=P.listener,R!==p&&c.isPropagationStopped())break e;xd(c,P,K),p=R}else for(x=0;x<l.length;x++){if(P=l[x],R=P.instance,K=P.currentTarget,P=P.listener,R!==p&&c.isPropagationStopped())break e;xd(c,P,K),p=R}}}if(Cr)throw e=_o,Cr=!1,_o=null,e}function Le(e,n){var o=n[_a];o===void 0&&(o=n[_a]=new Set);var l=e+"__bubble";o.has(l)||(Sd(n,e,2,!1),o.add(l))}function ma(e,n,o){var l=0;n&&(l|=4),Sd(o,e,l,n)}var is="_reactListening"+Math.random().toString(36).slice(2);function Vo(e){if(!e[is]){e[is]=!0,s.forEach(function(o){o!=="selectionchange"&&(I0.has(o)||ma(o,!1,e),ma(o,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[is]||(n[is]=!0,ma("selectionchange",!1,n))}}function Sd(e,n,o,l){switch(Wc(n)){case 1:var c=Um;break;case 4:c=Ym;break;default:c=Jl}o=c.bind(null,n,o,e),c=void 0,!ko||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),l?c!==void 0?e.addEventListener(n,o,{capture:!0,passive:c}):e.addEventListener(n,o,!0):c!==void 0?e.addEventListener(n,o,{passive:c}):e.addEventListener(n,o,!1)}function ya(e,n,o,l,c){var p=l;if((n&1)===0&&(n&2)===0&&l!==null)e:for(;;){if(l===null)return;var x=l.tag;if(x===3||x===4){var P=l.stateNode.containerInfo;if(P===c||P.nodeType===8&&P.parentNode===c)break;if(x===4)for(x=l.return;x!==null;){var R=x.tag;if((R===3||R===4)&&(R=x.stateNode.containerInfo,R===c||R.nodeType===8&&R.parentNode===c))return;x=x.return}for(;P!==null;){if(x=or(P),x===null)return;if(R=x.tag,R===5||R===6){l=p=x;continue e}P=P.parentNode}}l=l.return}Di(function(){var K=p,re=xo(o),ie=[];e:{var ne=yd.get(e);if(ne!==void 0){var de=na,pe=e;switch(e){case"keypress":if(Ji(o)===0)break e;case"keydown":case"keyup":de=l0;break;case"focusin":pe="focus",de=ia;break;case"focusout":pe="blur",de=ia;break;case"beforeblur":case"afterblur":de=ia;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":de=Xc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=Qm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=c0;break;case pd:case hd:case gd:de=Zm;break;case md:de=f0;break;case"scroll":de=Xm;break;case"wheel":de=h0;break;case"copy":case"cut":case"paste":de=e0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=Qc}var he=(n&4)!==0,Ue=!he&&e==="scroll",Y=he?ne!==null?ne+"Capture":null:ne;he=[];for(var $=K,Q;$!==null;){Q=$;var le=Q.stateNode;if(Q.tag===5&&le!==null&&(Q=le,Y!==null&&(le=Zn($,Y),le!=null&&he.push(Ho($,le,Q)))),Ue)break;$=$.return}0<he.length&&(ne=new de(ne,pe,null,o,re),ie.push({event:ne,listeners:he}))}}if((n&7)===0){e:{if(ne=e==="mouseover"||e==="pointerover",de=e==="mouseout"||e==="pointerout",ne&&o!==vo&&(pe=o.relatedTarget||o.fromElement)&&(or(pe)||pe[cn]))break e;if((de||ne)&&(ne=re.window===re?re:(ne=re.ownerDocument)?ne.defaultView||ne.parentWindow:window,de?(pe=o.relatedTarget||o.toElement,de=K,pe=pe?or(pe):null,pe!==null&&(Ue=Zt(pe),pe!==Ue||pe.tag!==5&&pe.tag!==6)&&(pe=null)):(de=null,pe=K),de!==pe)){if(he=Xc,le="onMouseLeave",Y="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(he=Qc,le="onPointerLeave",Y="onPointerEnter",$="pointer"),Ue=de==null?ne:Or(de),Q=pe==null?ne:Or(pe),ne=new he(le,$+"leave",de,o,re),ne.target=Ue,ne.relatedTarget=Q,le=null,or(re)===K&&(he=new he(Y,$+"enter",pe,o,re),he.target=Q,he.relatedTarget=Ue,le=he),Ue=le,de&&pe)t:{for(he=de,Y=pe,$=0,Q=he;Q;Q=$r(Q))$++;for(Q=0,le=Y;le;le=$r(le))Q++;for(;0<$-Q;)he=$r(he),$--;for(;0<Q-$;)Y=$r(Y),Q--;for(;$--;){if(he===Y||Y!==null&&he===Y.alternate)break t;he=$r(he),Y=$r(Y)}he=null}else he=null;de!==null&&kd(ie,ne,de,he,!1),pe!==null&&Ue!==null&&kd(ie,Ue,pe,he,!0)}}e:{if(ne=K?Or(K):window,de=ne.nodeName&&ne.nodeName.toLowerCase(),de==="select"||de==="input"&&ne.type==="file")var ye=S0;else if(td(ne))if(rd)ye=N0;else{ye=_0;var Se=k0}else(de=ne.nodeName)&&de.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(ye=E0);if(ye&&(ye=ye(e,K))){nd(ie,ye,o,re);break e}Se&&Se(e,ne,K),e==="focusout"&&(Se=ne._wrapperState)&&Se.controlled&&ne.type==="number"&&ft(ne,"number",ne.value)}switch(Se=K?Or(K):window,e){case"focusin":(td(Se)||Se.contentEditable==="true")&&(Lr=Se,da=K,Oo=null);break;case"focusout":Oo=da=Lr=null;break;case"mousedown":fa=!0;break;case"contextmenu":case"mouseup":case"dragend":fa=!1,dd(ie,o,re);break;case"selectionchange":if(M0)break;case"keydown":case"keyup":dd(ie,o,re)}var ke;if(la)e:{switch(e){case"compositionstart":var _e="onCompositionStart";break e;case"compositionend":_e="onCompositionEnd";break e;case"compositionupdate":_e="onCompositionUpdate";break e}_e=void 0}else Rr?Jc(e,o)&&(_e="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(_e="onCompositionStart");_e&&(qc&&o.locale!=="ko"&&(Rr||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&Rr&&(ke=Uc()):(zn=re,ta="value"in zn?zn.value:zn.textContent,Rr=!0)),Se=ss(K,_e),0<Se.length&&(_e=new Gc(_e,e,null,o,re),ie.push({event:_e,listeners:Se}),ke?_e.data=ke:(ke=ed(o),ke!==null&&(_e.data=ke)))),(ke=m0?y0(e,o):v0(e,o))&&(K=ss(K,"onBeforeInput"),0<K.length&&(re=new Gc("onBeforeInput","beforeinput",null,o,re),ie.push({event:re,listeners:K}),re.data=ke))}wd(ie,n)})}function Ho(e,n,o){return{instance:e,listener:n,currentTarget:o}}function ss(e,n){for(var o=n+"Capture",l=[];e!==null;){var c=e,p=c.stateNode;c.tag===5&&p!==null&&(c=p,p=Zn(e,o),p!=null&&l.unshift(Ho(e,p,c)),p=Zn(e,n),p!=null&&l.push(Ho(e,p,c))),e=e.return}return l}function $r(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function kd(e,n,o,l,c){for(var p=n._reactName,x=[];o!==null&&o!==l;){var P=o,R=P.alternate,K=P.stateNode;if(R!==null&&R===l)break;P.tag===5&&K!==null&&(P=K,c?(R=Zn(o,p),R!=null&&x.unshift(Ho(o,R,P))):c||(R=Zn(o,p),R!=null&&x.push(Ho(o,R,P)))),o=o.return}x.length!==0&&e.push({event:n,listeners:x})}var T0=/\r\n?/g,j0=/\u0000|\uFFFD/g;function _d(e){return(typeof e=="string"?e:""+e).replace(T0,`
|
|
38
|
-
`).replace(j0,"")}function ls(e,n,o){if(n=_d(n),_d(e)!==n&&o)throw Error(i(425))}function as(){}var va=null,xa=null;function wa(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Sa=typeof setTimeout=="function"?setTimeout:void 0,R0=typeof clearTimeout=="function"?clearTimeout:void 0,Ed=typeof Promise=="function"?Promise:void 0,L0=typeof queueMicrotask=="function"?queueMicrotask:typeof Ed<"u"?function(e){return Ed.resolve(null).then(e).catch(A0)}:Sa;function A0(e){setTimeout(function(){throw e})}function ka(e,n){var o=n,l=0;do{var c=o.nextSibling;if(e.removeChild(o),c&&c.nodeType===8)if(o=c.data,o==="/$"){if(l===0){e.removeChild(c),To(n);return}l--}else o!=="$"&&o!=="$?"&&o!=="$!"||l++;o=c}while(o);To(n)}function Tn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function Nd(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return e;n--}else o==="/$"&&n++}e=e.previousSibling}return null}var Dr=Math.random().toString(36).slice(2),Jt="__reactFiber$"+Dr,Bo="__reactProps$"+Dr,cn="__reactContainer$"+Dr,_a="__reactEvents$"+Dr,$0="__reactListeners$"+Dr,D0="__reactHandles$"+Dr;function or(e){var n=e[Jt];if(n)return n;for(var o=e.parentNode;o;){if(n=o[cn]||o[Jt]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=Nd(e);e!==null;){if(o=e[Jt])return o;e=Nd(e)}return n}e=o,o=e.parentNode}return null}function Wo(e){return e=e[Jt]||e[cn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Or(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(i(33))}function us(e){return e[Bo]||null}var Ea=[],Fr=-1;function jn(e){return{current:e}}function Ae(e){0>Fr||(e.current=Ea[Fr],Ea[Fr]=null,Fr--)}function je(e,n){Fr++,Ea[Fr]=e.current,e.current=n}var Rn={},ot=jn(Rn),ht=jn(!1),ir=Rn;function Vr(e,n){var o=e.type.contextTypes;if(!o)return Rn;var l=e.stateNode;if(l&&l.__reactInternalMemoizedUnmaskedChildContext===n)return l.__reactInternalMemoizedMaskedChildContext;var c={},p;for(p in o)c[p]=n[p];return l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=c),c}function gt(e){return e=e.childContextTypes,e!=null}function cs(){Ae(ht),Ae(ot)}function Cd(e,n,o){if(ot.current!==Rn)throw Error(i(168));je(ot,n),je(ht,o)}function bd(e,n,o){var l=e.stateNode;if(n=n.childContextTypes,typeof l.getChildContext!="function")return o;l=l.getChildContext();for(var c in l)if(!(c in n))throw Error(i(108,ue(e)||"Unknown",c));return H({},o,l)}function ds(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Rn,ir=ot.current,je(ot,e),je(ht,ht.current),!0}function Md(e,n,o){var l=e.stateNode;if(!l)throw Error(i(169));o?(e=bd(e,n,ir),l.__reactInternalMemoizedMergedChildContext=e,Ae(ht),Ae(ot),je(ot,e)):Ae(ht),je(ht,o)}var dn=null,fs=!1,Na=!1;function Pd(e){dn===null?dn=[e]:dn.push(e)}function O0(e){fs=!0,Pd(e)}function Ln(){if(!Na&&dn!==null){Na=!0;var e=0,n=Te;try{var o=dn;for(Te=1;e<o.length;e++){var l=o[e];do l=l(!0);while(l!==null)}dn=null,fs=!1}catch(c){throw dn!==null&&(dn=dn.slice(e+1)),Vi(Co,Ln),c}finally{Te=n,Na=!1}}return null}var Hr=[],Br=0,ps=null,hs=0,Tt=[],jt=0,sr=null,fn=1,pn="";function lr(e,n){Hr[Br++]=hs,Hr[Br++]=ps,ps=e,hs=n}function zd(e,n,o){Tt[jt++]=fn,Tt[jt++]=pn,Tt[jt++]=sr,sr=e;var l=fn;e=pn;var c=32-_t(l)-1;l&=~(1<<c),o+=1;var p=32-_t(n)+c;if(30<p){var x=c-c%5;p=(l&(1<<x)-1).toString(32),l>>=x,c-=x,fn=1<<32-_t(n)+c|o<<c|l,pn=p+e}else fn=1<<p|o<<c|l,pn=e}function Ca(e){e.return!==null&&(lr(e,1),zd(e,1,0))}function ba(e){for(;e===ps;)ps=Hr[--Br],Hr[Br]=null,hs=Hr[--Br],Hr[Br]=null;for(;e===sr;)sr=Tt[--jt],Tt[jt]=null,pn=Tt[--jt],Tt[jt]=null,fn=Tt[--jt],Tt[jt]=null}var Nt=null,Ct=null,De=!1,Ot=null;function Id(e,n){var o=$t(5,null,null,0);o.elementType="DELETED",o.stateNode=n,o.return=e,n=e.deletions,n===null?(e.deletions=[o],e.flags|=16):n.push(o)}function Td(e,n){switch(e.tag){case 5:var o=e.type;return n=n.nodeType!==1||o.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Nt=e,Ct=Tn(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Nt=e,Ct=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(o=sr!==null?{id:fn,overflow:pn}:null,e.memoizedState={dehydrated:n,treeContext:o,retryLane:1073741824},o=$t(18,null,null,0),o.stateNode=n,o.return=e,e.child=o,Nt=e,Ct=null,!0):!1;default:return!1}}function Ma(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Pa(e){if(De){var n=Ct;if(n){var o=n;if(!Td(e,n)){if(Ma(e))throw Error(i(418));n=Tn(o.nextSibling);var l=Nt;n&&Td(e,n)?Id(l,o):(e.flags=e.flags&-4097|2,De=!1,Nt=e)}}else{if(Ma(e))throw Error(i(418));e.flags=e.flags&-4097|2,De=!1,Nt=e}}}function jd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Nt=e}function gs(e){if(e!==Nt)return!1;if(!De)return jd(e),De=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!wa(e.type,e.memoizedProps)),n&&(n=Ct)){if(Ma(e))throw Rd(),Error(i(418));for(;n;)Id(e,n),n=Tn(n.nextSibling)}if(jd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(i(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(n===0){Ct=Tn(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}Ct=null}}else Ct=Nt?Tn(e.stateNode.nextSibling):null;return!0}function Rd(){for(var e=Ct;e;)e=Tn(e.nextSibling)}function Wr(){Ct=Nt=null,De=!1}function za(e){Ot===null?Ot=[e]:Ot.push(e)}var F0=M.ReactCurrentBatchConfig;function Uo(e,n,o){if(e=o.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(i(309));var l=o.stateNode}if(!l)throw Error(i(147,e));var c=l,p=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===p?n.ref:(n=function(x){var P=c.refs;x===null?delete P[p]:P[p]=x},n._stringRef=p,n)}if(typeof e!="string")throw Error(i(284));if(!o._owner)throw Error(i(290,e))}return e}function ms(e,n){throw e=Object.prototype.toString.call(n),Error(i(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function Ld(e){var n=e._init;return n(e._payload)}function Ad(e){function n(Y,$){if(e){var Q=Y.deletions;Q===null?(Y.deletions=[$],Y.flags|=16):Q.push($)}}function o(Y,$){if(!e)return null;for(;$!==null;)n(Y,$),$=$.sibling;return null}function l(Y,$){for(Y=new Map;$!==null;)$.key!==null?Y.set($.key,$):Y.set($.index,$),$=$.sibling;return Y}function c(Y,$){return Y=Bn(Y,$),Y.index=0,Y.sibling=null,Y}function p(Y,$,Q){return Y.index=Q,e?(Q=Y.alternate,Q!==null?(Q=Q.index,Q<$?(Y.flags|=2,$):Q):(Y.flags|=2,$)):(Y.flags|=1048576,$)}function x(Y){return e&&Y.alternate===null&&(Y.flags|=2),Y}function P(Y,$,Q,le){return $===null||$.tag!==6?($=Su(Q,Y.mode,le),$.return=Y,$):($=c($,Q),$.return=Y,$)}function R(Y,$,Q,le){var ye=Q.type;return ye===B?re(Y,$,Q.props.children,le,Q.key):$!==null&&($.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===O&&Ld(ye)===$.type)?(le=c($,Q.props),le.ref=Uo(Y,$,Q),le.return=Y,le):(le=Fs(Q.type,Q.key,Q.props,null,Y.mode,le),le.ref=Uo(Y,$,Q),le.return=Y,le)}function K(Y,$,Q,le){return $===null||$.tag!==4||$.stateNode.containerInfo!==Q.containerInfo||$.stateNode.implementation!==Q.implementation?($=ku(Q,Y.mode,le),$.return=Y,$):($=c($,Q.children||[]),$.return=Y,$)}function re(Y,$,Q,le,ye){return $===null||$.tag!==7?($=gr(Q,Y.mode,le,ye),$.return=Y,$):($=c($,Q),$.return=Y,$)}function ie(Y,$,Q){if(typeof $=="string"&&$!==""||typeof $=="number")return $=Su(""+$,Y.mode,Q),$.return=Y,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case F:return Q=Fs($.type,$.key,$.props,null,Y.mode,Q),Q.ref=Uo(Y,null,$),Q.return=Y,Q;case A:return $=ku($,Y.mode,Q),$.return=Y,$;case O:var le=$._init;return ie(Y,le($._payload),Q)}if(nt($)||T($))return $=gr($,Y.mode,Q,null),$.return=Y,$;ms(Y,$)}return null}function ne(Y,$,Q,le){var ye=$!==null?$.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return ye!==null?null:P(Y,$,""+Q,le);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case F:return Q.key===ye?R(Y,$,Q,le):null;case A:return Q.key===ye?K(Y,$,Q,le):null;case O:return ye=Q._init,ne(Y,$,ye(Q._payload),le)}if(nt(Q)||T(Q))return ye!==null?null:re(Y,$,Q,le,null);ms(Y,Q)}return null}function de(Y,$,Q,le,ye){if(typeof le=="string"&&le!==""||typeof le=="number")return Y=Y.get(Q)||null,P($,Y,""+le,ye);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case F:return Y=Y.get(le.key===null?Q:le.key)||null,R($,Y,le,ye);case A:return Y=Y.get(le.key===null?Q:le.key)||null,K($,Y,le,ye);case O:var Se=le._init;return de(Y,$,Q,Se(le._payload),ye)}if(nt(le)||T(le))return Y=Y.get(Q)||null,re($,Y,le,ye,null);ms($,le)}return null}function pe(Y,$,Q,le){for(var ye=null,Se=null,ke=$,_e=$=0,Ze=null;ke!==null&&_e<Q.length;_e++){ke.index>_e?(Ze=ke,ke=null):Ze=ke.sibling;var ze=ne(Y,ke,Q[_e],le);if(ze===null){ke===null&&(ke=Ze);break}e&&ke&&ze.alternate===null&&n(Y,ke),$=p(ze,$,_e),Se===null?ye=ze:Se.sibling=ze,Se=ze,ke=Ze}if(_e===Q.length)return o(Y,ke),De&&lr(Y,_e),ye;if(ke===null){for(;_e<Q.length;_e++)ke=ie(Y,Q[_e],le),ke!==null&&($=p(ke,$,_e),Se===null?ye=ke:Se.sibling=ke,Se=ke);return De&&lr(Y,_e),ye}for(ke=l(Y,ke);_e<Q.length;_e++)Ze=de(ke,Y,_e,Q[_e],le),Ze!==null&&(e&&Ze.alternate!==null&&ke.delete(Ze.key===null?_e:Ze.key),$=p(Ze,$,_e),Se===null?ye=Ze:Se.sibling=Ze,Se=Ze);return e&&ke.forEach(function(Wn){return n(Y,Wn)}),De&&lr(Y,_e),ye}function he(Y,$,Q,le){var ye=T(Q);if(typeof ye!="function")throw Error(i(150));if(Q=ye.call(Q),Q==null)throw Error(i(151));for(var Se=ye=null,ke=$,_e=$=0,Ze=null,ze=Q.next();ke!==null&&!ze.done;_e++,ze=Q.next()){ke.index>_e?(Ze=ke,ke=null):Ze=ke.sibling;var Wn=ne(Y,ke,ze.value,le);if(Wn===null){ke===null&&(ke=Ze);break}e&&ke&&Wn.alternate===null&&n(Y,ke),$=p(Wn,$,_e),Se===null?ye=Wn:Se.sibling=Wn,Se=Wn,ke=Ze}if(ze.done)return o(Y,ke),De&&lr(Y,_e),ye;if(ke===null){for(;!ze.done;_e++,ze=Q.next())ze=ie(Y,ze.value,le),ze!==null&&($=p(ze,$,_e),Se===null?ye=ze:Se.sibling=ze,Se=ze);return De&&lr(Y,_e),ye}for(ke=l(Y,ke);!ze.done;_e++,ze=Q.next())ze=de(ke,Y,_e,ze.value,le),ze!==null&&(e&&ze.alternate!==null&&ke.delete(ze.key===null?_e:ze.key),$=p(ze,$,_e),Se===null?ye=ze:Se.sibling=ze,Se=ze);return e&&ke.forEach(function(xy){return n(Y,xy)}),De&&lr(Y,_e),ye}function Ue(Y,$,Q,le){if(typeof Q=="object"&&Q!==null&&Q.type===B&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case F:e:{for(var ye=Q.key,Se=$;Se!==null;){if(Se.key===ye){if(ye=Q.type,ye===B){if(Se.tag===7){o(Y,Se.sibling),$=c(Se,Q.props.children),$.return=Y,Y=$;break e}}else if(Se.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===O&&Ld(ye)===Se.type){o(Y,Se.sibling),$=c(Se,Q.props),$.ref=Uo(Y,Se,Q),$.return=Y,Y=$;break e}o(Y,Se);break}else n(Y,Se);Se=Se.sibling}Q.type===B?($=gr(Q.props.children,Y.mode,le,Q.key),$.return=Y,Y=$):(le=Fs(Q.type,Q.key,Q.props,null,Y.mode,le),le.ref=Uo(Y,$,Q),le.return=Y,Y=le)}return x(Y);case A:e:{for(Se=Q.key;$!==null;){if($.key===Se)if($.tag===4&&$.stateNode.containerInfo===Q.containerInfo&&$.stateNode.implementation===Q.implementation){o(Y,$.sibling),$=c($,Q.children||[]),$.return=Y,Y=$;break e}else{o(Y,$);break}else n(Y,$);$=$.sibling}$=ku(Q,Y.mode,le),$.return=Y,Y=$}return x(Y);case O:return Se=Q._init,Ue(Y,$,Se(Q._payload),le)}if(nt(Q))return pe(Y,$,Q,le);if(T(Q))return he(Y,$,Q,le);ms(Y,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,$!==null&&$.tag===6?(o(Y,$.sibling),$=c($,Q),$.return=Y,Y=$):(o(Y,$),$=Su(Q,Y.mode,le),$.return=Y,Y=$),x(Y)):o(Y,$)}return Ue}var Ur=Ad(!0),$d=Ad(!1),ys=jn(null),vs=null,Yr=null,Ia=null;function Ta(){Ia=Yr=vs=null}function ja(e){var n=ys.current;Ae(ys),e._currentValue=n}function Ra(e,n,o){for(;e!==null;){var l=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),e===o)break;e=e.return}}function Xr(e,n){vs=e,Ia=Yr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(mt=!0),e.firstContext=null)}function Rt(e){var n=e._currentValue;if(Ia!==e)if(e={context:e,memoizedValue:n,next:null},Yr===null){if(vs===null)throw Error(i(308));Yr=e,vs.dependencies={lanes:0,firstContext:e}}else Yr=Yr.next=e;return n}var ar=null;function La(e){ar===null?ar=[e]:ar.push(e)}function Dd(e,n,o,l){var c=n.interleaved;return c===null?(o.next=o,La(n)):(o.next=c.next,c.next=o),n.interleaved=o,hn(e,l)}function hn(e,n){e.lanes|=n;var o=e.alternate;for(o!==null&&(o.lanes|=n),o=e,e=e.return;e!==null;)e.childLanes|=n,o=e.alternate,o!==null&&(o.childLanes|=n),o=e,e=e.return;return o.tag===3?o.stateNode:null}var An=!1;function Aa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Od(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function gn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function $n(e,n,o){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Pe&2)!==0){var c=l.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),l.pending=n,hn(e,o)}return c=l.interleaved,c===null?(n.next=n,La(l)):(n.next=c.next,c.next=n),l.interleaved=n,hn(e,o)}function xs(e,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194240)!==0)){var l=n.lanes;l&=e.pendingLanes,o|=l,n.lanes=o,Ir(e,o)}}function Fd(e,n){var o=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var c=null,p=null;if(o=o.firstBaseUpdate,o!==null){do{var x={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};p===null?c=p=x:p=p.next=x,o=o.next}while(o!==null);p===null?c=p=n:p=p.next=n}else c=p=n;o={baseState:l.baseState,firstBaseUpdate:c,lastBaseUpdate:p,shared:l.shared,effects:l.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function ws(e,n,o,l){var c=e.updateQueue;An=!1;var p=c.firstBaseUpdate,x=c.lastBaseUpdate,P=c.shared.pending;if(P!==null){c.shared.pending=null;var R=P,K=R.next;R.next=null,x===null?p=K:x.next=K,x=R;var re=e.alternate;re!==null&&(re=re.updateQueue,P=re.lastBaseUpdate,P!==x&&(P===null?re.firstBaseUpdate=K:P.next=K,re.lastBaseUpdate=R))}if(p!==null){var ie=c.baseState;x=0,re=K=R=null,P=p;do{var ne=P.lane,de=P.eventTime;if((l&ne)===ne){re!==null&&(re=re.next={eventTime:de,lane:0,tag:P.tag,payload:P.payload,callback:P.callback,next:null});e:{var pe=e,he=P;switch(ne=n,de=o,he.tag){case 1:if(pe=he.payload,typeof pe=="function"){ie=pe.call(de,ie,ne);break e}ie=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=he.payload,ne=typeof pe=="function"?pe.call(de,ie,ne):pe,ne==null)break e;ie=H({},ie,ne);break e;case 2:An=!0}}P.callback!==null&&P.lane!==0&&(e.flags|=64,ne=c.effects,ne===null?c.effects=[P]:ne.push(P))}else de={eventTime:de,lane:ne,tag:P.tag,payload:P.payload,callback:P.callback,next:null},re===null?(K=re=de,R=ie):re=re.next=de,x|=ne;if(P=P.next,P===null){if(P=c.shared.pending,P===null)break;ne=P,P=ne.next,ne.next=null,c.lastBaseUpdate=ne,c.shared.pending=null}}while(!0);if(re===null&&(R=ie),c.baseState=R,c.firstBaseUpdate=K,c.lastBaseUpdate=re,n=c.shared.interleaved,n!==null){c=n;do x|=c.lane,c=c.next;while(c!==n)}else p===null&&(c.shared.lanes=0);dr|=x,e.lanes=x,e.memoizedState=ie}}function Vd(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var l=e[n],c=l.callback;if(c!==null){if(l.callback=null,l=o,typeof c!="function")throw Error(i(191,c));c.call(l)}}}var Yo={},en=jn(Yo),Xo=jn(Yo),Go=jn(Yo);function ur(e){if(e===Yo)throw Error(i(174));return e}function $a(e,n){switch(je(Go,n),je(Xo,e),je(en,Yo),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:St(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=St(n,e)}Ae(en),je(en,n)}function Gr(){Ae(en),Ae(Xo),Ae(Go)}function Hd(e){ur(Go.current);var n=ur(en.current),o=St(n,e.type);n!==o&&(je(Xo,e),je(en,o))}function Da(e){Xo.current===e&&(Ae(en),Ae(Xo))}var He=jn(0);function Ss(e){for(var n=e;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Oa=[];function Fa(){for(var e=0;e<Oa.length;e++)Oa[e]._workInProgressVersionPrimary=null;Oa.length=0}var ks=M.ReactCurrentDispatcher,Va=M.ReactCurrentBatchConfig,cr=0,Be=null,Ge=null,qe=null,_s=!1,Qo=!1,qo=0,V0=0;function it(){throw Error(i(321))}function Ha(e,n){if(n===null)return!1;for(var o=0;o<n.length&&o<e.length;o++)if(!Dt(e[o],n[o]))return!1;return!0}function Ba(e,n,o,l,c,p){if(cr=p,Be=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,ks.current=e===null||e.memoizedState===null?U0:Y0,e=o(l,c),Qo){p=0;do{if(Qo=!1,qo=0,25<=p)throw Error(i(301));p+=1,qe=Ge=null,n.updateQueue=null,ks.current=X0,e=o(l,c)}while(Qo)}if(ks.current=Cs,n=Ge!==null&&Ge.next!==null,cr=0,qe=Ge=Be=null,_s=!1,n)throw Error(i(300));return e}function Wa(){var e=qo!==0;return qo=0,e}function tn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return qe===null?Be.memoizedState=qe=e:qe=qe.next=e,qe}function Lt(){if(Ge===null){var e=Be.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var n=qe===null?Be.memoizedState:qe.next;if(n!==null)qe=n,Ge=e;else{if(e===null)throw Error(i(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},qe===null?Be.memoizedState=qe=e:qe=qe.next=e}return qe}function Ko(e,n){return typeof n=="function"?n(e):n}function Ua(e){var n=Lt(),o=n.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=e;var l=Ge,c=l.baseQueue,p=o.pending;if(p!==null){if(c!==null){var x=c.next;c.next=p.next,p.next=x}l.baseQueue=c=p,o.pending=null}if(c!==null){p=c.next,l=l.baseState;var P=x=null,R=null,K=p;do{var re=K.lane;if((cr&re)===re)R!==null&&(R=R.next={lane:0,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),l=K.hasEagerState?K.eagerState:e(l,K.action);else{var ie={lane:re,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null};R===null?(P=R=ie,x=l):R=R.next=ie,Be.lanes|=re,dr|=re}K=K.next}while(K!==null&&K!==p);R===null?x=l:R.next=P,Dt(l,n.memoizedState)||(mt=!0),n.memoizedState=l,n.baseState=x,n.baseQueue=R,o.lastRenderedState=l}if(e=o.interleaved,e!==null){c=e;do p=c.lane,Be.lanes|=p,dr|=p,c=c.next;while(c!==e)}else c===null&&(o.lanes=0);return[n.memoizedState,o.dispatch]}function Ya(e){var n=Lt(),o=n.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=e;var l=o.dispatch,c=o.pending,p=n.memoizedState;if(c!==null){o.pending=null;var x=c=c.next;do p=e(p,x.action),x=x.next;while(x!==c);Dt(p,n.memoizedState)||(mt=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),o.lastRenderedState=p}return[p,l]}function Bd(){}function Wd(e,n){var o=Be,l=Lt(),c=n(),p=!Dt(l.memoizedState,c);if(p&&(l.memoizedState=c,mt=!0),l=l.queue,Xa(Xd.bind(null,o,l,e),[e]),l.getSnapshot!==n||p||qe!==null&&qe.memoizedState.tag&1){if(o.flags|=2048,Zo(9,Yd.bind(null,o,l,c,n),void 0,null),Ke===null)throw Error(i(349));(cr&30)!==0||Ud(o,n,c)}return c}function Ud(e,n,o){e.flags|=16384,e={getSnapshot:n,value:o},n=Be.updateQueue,n===null?(n={lastEffect:null,stores:null},Be.updateQueue=n,n.stores=[e]):(o=n.stores,o===null?n.stores=[e]:o.push(e))}function Yd(e,n,o,l){n.value=o,n.getSnapshot=l,Gd(n)&&Qd(e)}function Xd(e,n,o){return o(function(){Gd(n)&&Qd(e)})}function Gd(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!Dt(e,o)}catch{return!0}}function Qd(e){var n=hn(e,1);n!==null&&Bt(n,e,1,-1)}function qd(e){var n=tn();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ko,lastRenderedState:e},n.queue=e,e=e.dispatch=W0.bind(null,Be,e),[n.memoizedState,e]}function Zo(e,n,o,l){return e={tag:e,create:n,destroy:o,deps:l,next:null},n=Be.updateQueue,n===null?(n={lastEffect:null,stores:null},Be.updateQueue=n,n.lastEffect=e.next=e):(o=n.lastEffect,o===null?n.lastEffect=e.next=e:(l=o.next,o.next=e,e.next=l,n.lastEffect=e)),e}function Kd(){return Lt().memoizedState}function Es(e,n,o,l){var c=tn();Be.flags|=e,c.memoizedState=Zo(1|n,o,void 0,l===void 0?null:l)}function Ns(e,n,o,l){var c=Lt();l=l===void 0?null:l;var p=void 0;if(Ge!==null){var x=Ge.memoizedState;if(p=x.destroy,l!==null&&Ha(l,x.deps)){c.memoizedState=Zo(n,o,p,l);return}}Be.flags|=e,c.memoizedState=Zo(1|n,o,p,l)}function Zd(e,n){return Es(8390656,8,e,n)}function Xa(e,n){return Ns(2048,8,e,n)}function Jd(e,n){return Ns(4,2,e,n)}function ef(e,n){return Ns(4,4,e,n)}function tf(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function nf(e,n,o){return o=o!=null?o.concat([e]):null,Ns(4,4,tf.bind(null,n,e),o)}function Ga(){}function rf(e,n){var o=Lt();n=n===void 0?null:n;var l=o.memoizedState;return l!==null&&n!==null&&Ha(n,l[1])?l[0]:(o.memoizedState=[e,n],e)}function of(e,n){var o=Lt();n=n===void 0?null:n;var l=o.memoizedState;return l!==null&&n!==null&&Ha(n,l[1])?l[0]:(e=e(),o.memoizedState=[e,n],e)}function sf(e,n,o){return(cr&21)===0?(e.baseState&&(e.baseState=!1,mt=!0),e.memoizedState=o):(Dt(o,n)||(o=Xi(),Be.lanes|=o,dr|=o,e.baseState=!0),n)}function H0(e,n){var o=Te;Te=o!==0&&4>o?o:4,e(!0);var l=Va.transition;Va.transition={};try{e(!1),n()}finally{Te=o,Va.transition=l}}function lf(){return Lt().memoizedState}function B0(e,n,o){var l=Vn(e);if(o={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null},af(e))uf(n,o);else if(o=Dd(e,n,o,l),o!==null){var c=dt();Bt(o,e,l,c),cf(o,n,l)}}function W0(e,n,o){var l=Vn(e),c={lane:l,action:o,hasEagerState:!1,eagerState:null,next:null};if(af(e))uf(n,c);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var x=n.lastRenderedState,P=p(x,o);if(c.hasEagerState=!0,c.eagerState=P,Dt(P,x)){var R=n.interleaved;R===null?(c.next=c,La(n)):(c.next=R.next,R.next=c),n.interleaved=c;return}}catch{}finally{}o=Dd(e,n,c,l),o!==null&&(c=dt(),Bt(o,e,l,c),cf(o,n,l))}}function af(e){var n=e.alternate;return e===Be||n!==null&&n===Be}function uf(e,n){Qo=_s=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function cf(e,n,o){if((o&4194240)!==0){var l=n.lanes;l&=e.pendingLanes,o|=l,n.lanes=o,Ir(e,o)}}var Cs={readContext:Rt,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useInsertionEffect:it,useLayoutEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useMutableSource:it,useSyncExternalStore:it,useId:it,unstable_isNewReconciler:!1},U0={readContext:Rt,useCallback:function(e,n){return tn().memoizedState=[e,n===void 0?null:n],e},useContext:Rt,useEffect:Zd,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,Es(4194308,4,tf.bind(null,n,e),o)},useLayoutEffect:function(e,n){return Es(4194308,4,e,n)},useInsertionEffect:function(e,n){return Es(4,2,e,n)},useMemo:function(e,n){var o=tn();return n=n===void 0?null:n,e=e(),o.memoizedState=[e,n],e},useReducer:function(e,n,o){var l=tn();return n=o!==void 0?o(n):n,l.memoizedState=l.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},l.queue=e,e=e.dispatch=B0.bind(null,Be,e),[l.memoizedState,e]},useRef:function(e){var n=tn();return e={current:e},n.memoizedState=e},useState:qd,useDebugValue:Ga,useDeferredValue:function(e){return tn().memoizedState=e},useTransition:function(){var e=qd(!1),n=e[0];return e=H0.bind(null,e[1]),tn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,o){var l=Be,c=tn();if(De){if(o===void 0)throw Error(i(407));o=o()}else{if(o=n(),Ke===null)throw Error(i(349));(cr&30)!==0||Ud(l,n,o)}c.memoizedState=o;var p={value:o,getSnapshot:n};return c.queue=p,Zd(Xd.bind(null,l,p,e),[e]),l.flags|=2048,Zo(9,Yd.bind(null,l,p,o,n),void 0,null),o},useId:function(){var e=tn(),n=Ke.identifierPrefix;if(De){var o=pn,l=fn;o=(l&~(1<<32-_t(l)-1)).toString(32)+o,n=":"+n+"R"+o,o=qo++,0<o&&(n+="H"+o.toString(32)),n+=":"}else o=V0++,n=":"+n+"r"+o.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},Y0={readContext:Rt,useCallback:rf,useContext:Rt,useEffect:Xa,useImperativeHandle:nf,useInsertionEffect:Jd,useLayoutEffect:ef,useMemo:of,useReducer:Ua,useRef:Kd,useState:function(){return Ua(Ko)},useDebugValue:Ga,useDeferredValue:function(e){var n=Lt();return sf(n,Ge.memoizedState,e)},useTransition:function(){var e=Ua(Ko)[0],n=Lt().memoizedState;return[e,n]},useMutableSource:Bd,useSyncExternalStore:Wd,useId:lf,unstable_isNewReconciler:!1},X0={readContext:Rt,useCallback:rf,useContext:Rt,useEffect:Xa,useImperativeHandle:nf,useInsertionEffect:Jd,useLayoutEffect:ef,useMemo:of,useReducer:Ya,useRef:Kd,useState:function(){return Ya(Ko)},useDebugValue:Ga,useDeferredValue:function(e){var n=Lt();return Ge===null?n.memoizedState=e:sf(n,Ge.memoizedState,e)},useTransition:function(){var e=Ya(Ko)[0],n=Lt().memoizedState;return[e,n]},useMutableSource:Bd,useSyncExternalStore:Wd,useId:lf,unstable_isNewReconciler:!1};function Ft(e,n){if(e&&e.defaultProps){n=H({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}function Qa(e,n,o,l){n=e.memoizedState,o=o(l,n),o=o==null?n:H({},n,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var bs={isMounted:function(e){return(e=e._reactInternals)?Zt(e)===e:!1},enqueueSetState:function(e,n,o){e=e._reactInternals;var l=dt(),c=Vn(e),p=gn(l,c);p.payload=n,o!=null&&(p.callback=o),n=$n(e,p,c),n!==null&&(Bt(n,e,c,l),xs(n,e,c))},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var l=dt(),c=Vn(e),p=gn(l,c);p.tag=1,p.payload=n,o!=null&&(p.callback=o),n=$n(e,p,c),n!==null&&(Bt(n,e,c,l),xs(n,e,c))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=dt(),l=Vn(e),c=gn(o,l);c.tag=2,n!=null&&(c.callback=n),n=$n(e,c,l),n!==null&&(Bt(n,e,l,o),xs(n,e,l))}};function df(e,n,o,l,c,p,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,p,x):n.prototype&&n.prototype.isPureReactComponent?!Do(o,l)||!Do(c,p):!0}function ff(e,n,o){var l=!1,c=Rn,p=n.contextType;return typeof p=="object"&&p!==null?p=Rt(p):(c=gt(n)?ir:ot.current,l=n.contextTypes,p=(l=l!=null)?Vr(e,c):Rn),n=new n(o,p),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=bs,e.stateNode=n,n._reactInternals=e,l&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=p),n}function pf(e,n,o,l){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,l),n.state!==e&&bs.enqueueReplaceState(n,n.state,null)}function qa(e,n,o,l){var c=e.stateNode;c.props=o,c.state=e.memoizedState,c.refs={},Aa(e);var p=n.contextType;typeof p=="object"&&p!==null?c.context=Rt(p):(p=gt(n)?ir:ot.current,c.context=Vr(e,p)),c.state=e.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(Qa(e,n,p,o),c.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(n=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),n!==c.state&&bs.enqueueReplaceState(c,c.state,null),ws(e,o,c,l),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function Qr(e,n){try{var o="",l=n;do o+=ae(l),l=l.return;while(l);var c=o}catch(p){c=`
|
|
39
|
-
Error generating stack: `+p.message+`
|
|
40
|
-
`+p.stack}return{value:e,source:n,stack:c,digest:null}}function Ka(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function Za(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var G0=typeof WeakMap=="function"?WeakMap:Map;function hf(e,n,o){o=gn(-1,o),o.tag=3,o.payload={element:null};var l=n.value;return o.callback=function(){Rs||(Rs=!0,pu=l),Za(e,n)},o}function gf(e,n,o){o=gn(-1,o),o.tag=3;var l=e.type.getDerivedStateFromError;if(typeof l=="function"){var c=n.value;o.payload=function(){return l(c)},o.callback=function(){Za(e,n)}}var p=e.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(o.callback=function(){Za(e,n),typeof l!="function"&&(On===null?On=new Set([this]):On.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})}),o}function mf(e,n,o){var l=e.pingCache;if(l===null){l=e.pingCache=new G0;var c=new Set;l.set(n,c)}else c=l.get(n),c===void 0&&(c=new Set,l.set(n,c));c.has(o)||(c.add(o),e=ay.bind(null,e,n,o),n.then(e,e))}function yf(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function vf(e,n,o,l,c){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(n=gn(-1,1),n.tag=2,$n(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var Q0=M.ReactCurrentOwner,mt=!1;function ct(e,n,o,l){n.child=e===null?$d(n,null,o,l):Ur(n,e.child,o,l)}function xf(e,n,o,l,c){o=o.render;var p=n.ref;return Xr(n,c),l=Ba(e,n,o,l,p,c),o=Wa(),e!==null&&!mt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,mn(e,n,c)):(De&&o&&Ca(n),n.flags|=1,ct(e,n,l,c),n.child)}function wf(e,n,o,l,c){if(e===null){var p=o.type;return typeof p=="function"&&!wu(p)&&p.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=p,Sf(e,n,p,l,c)):(e=Fs(o.type,null,l,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(p=e.child,(e.lanes&c)===0){var x=p.memoizedProps;if(o=o.compare,o=o!==null?o:Do,o(x,l)&&e.ref===n.ref)return mn(e,n,c)}return n.flags|=1,e=Bn(p,l),e.ref=n.ref,e.return=n,n.child=e}function Sf(e,n,o,l,c){if(e!==null){var p=e.memoizedProps;if(Do(p,l)&&e.ref===n.ref)if(mt=!1,n.pendingProps=l=p,(e.lanes&c)!==0)(e.flags&131072)!==0&&(mt=!0);else return n.lanes=e.lanes,mn(e,n,c)}return Ja(e,n,o,l,c)}function kf(e,n,o){var l=n.pendingProps,c=l.children,p=e!==null?e.memoizedState:null;if(l.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},je(Kr,bt),bt|=o;else{if((o&1073741824)===0)return e=p!==null?p.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,je(Kr,bt),bt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},l=p!==null?p.baseLanes:o,je(Kr,bt),bt|=l}else p!==null?(l=p.baseLanes|o,n.memoizedState=null):l=o,je(Kr,bt),bt|=l;return ct(e,n,c,o),n.child}function _f(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function Ja(e,n,o,l,c){var p=gt(o)?ir:ot.current;return p=Vr(n,p),Xr(n,c),o=Ba(e,n,o,l,p,c),l=Wa(),e!==null&&!mt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,mn(e,n,c)):(De&&l&&Ca(n),n.flags|=1,ct(e,n,o,c),n.child)}function Ef(e,n,o,l,c){if(gt(o)){var p=!0;ds(n)}else p=!1;if(Xr(n,c),n.stateNode===null)Ps(e,n),ff(n,o,l),qa(n,o,l,c),l=!0;else if(e===null){var x=n.stateNode,P=n.memoizedProps;x.props=P;var R=x.context,K=o.contextType;typeof K=="object"&&K!==null?K=Rt(K):(K=gt(o)?ir:ot.current,K=Vr(n,K));var re=o.getDerivedStateFromProps,ie=typeof re=="function"||typeof x.getSnapshotBeforeUpdate=="function";ie||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(P!==l||R!==K)&&pf(n,x,l,K),An=!1;var ne=n.memoizedState;x.state=ne,ws(n,l,x,c),R=n.memoizedState,P!==l||ne!==R||ht.current||An?(typeof re=="function"&&(Qa(n,o,re,l),R=n.memoizedState),(P=An||df(n,o,P,l,ne,R,K))?(ie||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(n.flags|=4194308)):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=l,n.memoizedState=R),x.props=l,x.state=R,x.context=K,l=P):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{x=n.stateNode,Od(e,n),P=n.memoizedProps,K=n.type===n.elementType?P:Ft(n.type,P),x.props=K,ie=n.pendingProps,ne=x.context,R=o.contextType,typeof R=="object"&&R!==null?R=Rt(R):(R=gt(o)?ir:ot.current,R=Vr(n,R));var de=o.getDerivedStateFromProps;(re=typeof de=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(P!==ie||ne!==R)&&pf(n,x,l,R),An=!1,ne=n.memoizedState,x.state=ne,ws(n,l,x,c);var pe=n.memoizedState;P!==ie||ne!==pe||ht.current||An?(typeof de=="function"&&(Qa(n,o,de,l),pe=n.memoizedState),(K=An||df(n,o,K,l,ne,pe,R)||!1)?(re||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(l,pe,R),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(l,pe,R)),typeof x.componentDidUpdate=="function"&&(n.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof x.componentDidUpdate!="function"||P===e.memoizedProps&&ne===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||P===e.memoizedProps&&ne===e.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=pe),x.props=l,x.state=pe,x.context=R,l=K):(typeof x.componentDidUpdate!="function"||P===e.memoizedProps&&ne===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||P===e.memoizedProps&&ne===e.memoizedState||(n.flags|=1024),l=!1)}return eu(e,n,o,l,p,c)}function eu(e,n,o,l,c,p){_f(e,n);var x=(n.flags&128)!==0;if(!l&&!x)return c&&Md(n,o,!1),mn(e,n,p);l=n.stateNode,Q0.current=n;var P=x&&typeof o.getDerivedStateFromError!="function"?null:l.render();return n.flags|=1,e!==null&&x?(n.child=Ur(n,e.child,null,p),n.child=Ur(n,null,P,p)):ct(e,n,P,p),n.memoizedState=l.state,c&&Md(n,o,!0),n.child}function Nf(e){var n=e.stateNode;n.pendingContext?Cd(e,n.pendingContext,n.pendingContext!==n.context):n.context&&Cd(e,n.context,!1),$a(e,n.containerInfo)}function Cf(e,n,o,l,c){return Wr(),za(c),n.flags|=256,ct(e,n,o,l),n.child}var tu={dehydrated:null,treeContext:null,retryLane:0};function nu(e){return{baseLanes:e,cachePool:null,transitions:null}}function bf(e,n,o){var l=n.pendingProps,c=He.current,p=!1,x=(n.flags&128)!==0,P;if((P=x)||(P=e!==null&&e.memoizedState===null?!1:(c&2)!==0),P?(p=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),je(He,c&1),e===null)return Pa(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(x=l.children,e=l.fallback,p?(l=n.mode,p=n.child,x={mode:"hidden",children:x},(l&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=x):p=Vs(x,l,0,null),e=gr(e,l,o,null),p.return=n,e.return=n,p.sibling=e,n.child=p,n.child.memoizedState=nu(o),n.memoizedState=tu,e):ru(n,x));if(c=e.memoizedState,c!==null&&(P=c.dehydrated,P!==null))return q0(e,n,x,l,P,c,o);if(p){p=l.fallback,x=n.mode,c=e.child,P=c.sibling;var R={mode:"hidden",children:l.children};return(x&1)===0&&n.child!==c?(l=n.child,l.childLanes=0,l.pendingProps=R,n.deletions=null):(l=Bn(c,R),l.subtreeFlags=c.subtreeFlags&14680064),P!==null?p=Bn(P,p):(p=gr(p,x,o,null),p.flags|=2),p.return=n,l.return=n,l.sibling=p,n.child=l,l=p,p=n.child,x=e.child.memoizedState,x=x===null?nu(o):{baseLanes:x.baseLanes|o,cachePool:null,transitions:x.transitions},p.memoizedState=x,p.childLanes=e.childLanes&~o,n.memoizedState=tu,l}return p=e.child,e=p.sibling,l=Bn(p,{mode:"visible",children:l.children}),(n.mode&1)===0&&(l.lanes=o),l.return=n,l.sibling=null,e!==null&&(o=n.deletions,o===null?(n.deletions=[e],n.flags|=16):o.push(e)),n.child=l,n.memoizedState=null,l}function ru(e,n){return n=Vs({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Ms(e,n,o,l){return l!==null&&za(l),Ur(n,e.child,null,o),e=ru(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function q0(e,n,o,l,c,p,x){if(o)return n.flags&256?(n.flags&=-257,l=Ka(Error(i(422))),Ms(e,n,x,l)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(p=l.fallback,c=n.mode,l=Vs({mode:"visible",children:l.children},c,0,null),p=gr(p,c,x,null),p.flags|=2,l.return=n,p.return=n,l.sibling=p,n.child=l,(n.mode&1)!==0&&Ur(n,e.child,null,x),n.child.memoizedState=nu(x),n.memoizedState=tu,p);if((n.mode&1)===0)return Ms(e,n,x,null);if(c.data==="$!"){if(l=c.nextSibling&&c.nextSibling.dataset,l)var P=l.dgst;return l=P,p=Error(i(419)),l=Ka(p,l,void 0),Ms(e,n,x,l)}if(P=(x&e.childLanes)!==0,mt||P){if(l=Ke,l!==null){switch(x&-x){case 4:c=2;break;case 16:c=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:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(l.suspendedLanes|x))!==0?0:c,c!==0&&c!==p.retryLane&&(p.retryLane=c,hn(e,c),Bt(l,e,c,-1))}return xu(),l=Ka(Error(i(421))),Ms(e,n,x,l)}return c.data==="$?"?(n.flags|=128,n.child=e.child,n=uy.bind(null,e),c._reactRetry=n,null):(e=p.treeContext,Ct=Tn(c.nextSibling),Nt=n,De=!0,Ot=null,e!==null&&(Tt[jt++]=fn,Tt[jt++]=pn,Tt[jt++]=sr,fn=e.id,pn=e.overflow,sr=n),n=ru(n,l.children),n.flags|=4096,n)}function Mf(e,n,o){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n),Ra(e.return,n,o)}function ou(e,n,o,l,c){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:c}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=l,p.tail=o,p.tailMode=c)}function Pf(e,n,o){var l=n.pendingProps,c=l.revealOrder,p=l.tail;if(ct(e,n,l.children,o),l=He.current,(l&2)!==0)l=l&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mf(e,o,n);else if(e.tag===19)Mf(e,o,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}l&=1}if(je(He,l),(n.mode&1)===0)n.memoizedState=null;else switch(c){case"forwards":for(o=n.child,c=null;o!==null;)e=o.alternate,e!==null&&Ss(e)===null&&(c=o),o=o.sibling;o=c,o===null?(c=n.child,n.child=null):(c=o.sibling,o.sibling=null),ou(n,!1,c,o,p);break;case"backwards":for(o=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&Ss(e)===null){n.child=c;break}e=c.sibling,c.sibling=o,o=c,c=e}ou(n,!0,o,null,p);break;case"together":ou(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function Ps(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function mn(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),dr|=n.lanes,(o&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(i(153));if(n.child!==null){for(e=n.child,o=Bn(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=Bn(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}function K0(e,n,o){switch(n.tag){case 3:Nf(n),Wr();break;case 5:Hd(n);break;case 1:gt(n.type)&&ds(n);break;case 4:$a(n,n.stateNode.containerInfo);break;case 10:var l=n.type._context,c=n.memoizedProps.value;je(ys,l._currentValue),l._currentValue=c;break;case 13:if(l=n.memoizedState,l!==null)return l.dehydrated!==null?(je(He,He.current&1),n.flags|=128,null):(o&n.child.childLanes)!==0?bf(e,n,o):(je(He,He.current&1),e=mn(e,n,o),e!==null?e.sibling:null);je(He,He.current&1);break;case 19:if(l=(o&n.childLanes)!==0,(e.flags&128)!==0){if(l)return Pf(e,n,o);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),je(He,He.current),l)break;return null;case 22:case 23:return n.lanes=0,kf(e,n,o)}return mn(e,n,o)}var zf,iu,If,Tf;zf=function(e,n){for(var o=n.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},iu=function(){},If=function(e,n,o,l){var c=e.memoizedProps;if(c!==l){e=n.stateNode,ur(en.current);var p=null;switch(o){case"input":c=Ee(e,c),l=Ee(e,l),p=[];break;case"select":c=H({},c,{value:void 0}),l=H({},l,{value:void 0}),p=[];break;case"textarea":c=ln(e,c),l=ln(e,l),p=[];break;default:typeof c.onClick!="function"&&typeof l.onClick=="function"&&(e.onclick=as)}mo(o,l);var x;o=null;for(K in c)if(!l.hasOwnProperty(K)&&c.hasOwnProperty(K)&&c[K]!=null)if(K==="style"){var P=c[K];for(x in P)P.hasOwnProperty(x)&&(o||(o={}),o[x]="")}else K!=="dangerouslySetInnerHTML"&&K!=="children"&&K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&K!=="autoFocus"&&(a.hasOwnProperty(K)?p||(p=[]):(p=p||[]).push(K,null));for(K in l){var R=l[K];if(P=c!=null?c[K]:void 0,l.hasOwnProperty(K)&&R!==P&&(R!=null||P!=null))if(K==="style")if(P){for(x in P)!P.hasOwnProperty(x)||R&&R.hasOwnProperty(x)||(o||(o={}),o[x]="");for(x in R)R.hasOwnProperty(x)&&P[x]!==R[x]&&(o||(o={}),o[x]=R[x])}else o||(p||(p=[]),p.push(K,o)),o=R;else K==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,P=P?P.__html:void 0,R!=null&&P!==R&&(p=p||[]).push(K,R)):K==="children"?typeof R!="string"&&typeof R!="number"||(p=p||[]).push(K,""+R):K!=="suppressContentEditableWarning"&&K!=="suppressHydrationWarning"&&(a.hasOwnProperty(K)?(R!=null&&K==="onScroll"&&Le("scroll",e),p||P===R||(p=[])):(p=p||[]).push(K,R))}o&&(p=p||[]).push("style",o);var K=p;(n.updateQueue=K)&&(n.flags|=4)}},Tf=function(e,n,o,l){o!==l&&(n.flags|=4)};function Jo(e,n){if(!De)switch(e.tailMode){case"hidden":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function st(e){var n=e.alternate!==null&&e.alternate.child===e.child,o=0,l=0;if(n)for(var c=e.child;c!==null;)o|=c.lanes|c.childLanes,l|=c.subtreeFlags&14680064,l|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)o|=c.lanes|c.childLanes,l|=c.subtreeFlags,l|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=l,e.childLanes=o,n}function Z0(e,n,o){var l=n.pendingProps;switch(ba(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return st(n),null;case 1:return gt(n.type)&&cs(),st(n),null;case 3:return l=n.stateNode,Gr(),Ae(ht),Ae(ot),Fa(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(gs(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Ot!==null&&(mu(Ot),Ot=null))),iu(e,n),st(n),null;case 5:Da(n);var c=ur(Go.current);if(o=n.type,e!==null&&n.stateNode!=null)If(e,n,o,l,c),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!l){if(n.stateNode===null)throw Error(i(166));return st(n),null}if(e=ur(en.current),gs(n)){l=n.stateNode,o=n.type;var p=n.memoizedProps;switch(l[Jt]=n,l[Bo]=p,e=(n.mode&1)!==0,o){case"dialog":Le("cancel",l),Le("close",l);break;case"iframe":case"object":case"embed":Le("load",l);break;case"video":case"audio":for(c=0;c<Fo.length;c++)Le(Fo[c],l);break;case"source":Le("error",l);break;case"img":case"image":case"link":Le("error",l),Le("load",l);break;case"details":Le("toggle",l);break;case"input":Me(l,p),Le("invalid",l);break;case"select":l._wrapperState={wasMultiple:!!p.multiple},Le("invalid",l);break;case"textarea":qt(l,p),Le("invalid",l)}mo(o,p),c=null;for(var x in p)if(p.hasOwnProperty(x)){var P=p[x];x==="children"?typeof P=="string"?l.textContent!==P&&(p.suppressHydrationWarning!==!0&&ls(l.textContent,P,e),c=["children",P]):typeof P=="number"&&l.textContent!==""+P&&(p.suppressHydrationWarning!==!0&&ls(l.textContent,P,e),c=["children",""+P]):a.hasOwnProperty(x)&&P!=null&&x==="onScroll"&&Le("scroll",l)}switch(o){case"input":we(l),ut(l,p,!0);break;case"textarea":we(l),pt(l);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(l.onclick=as)}l=c,n.updateQueue=l,l!==null&&(n.flags|=4)}else{x=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=zt(o)),e==="http://www.w3.org/1999/xhtml"?o==="script"?(e=x.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof l.is=="string"?e=x.createElement(o,{is:l.is}):(e=x.createElement(o),o==="select"&&(x=e,l.multiple?x.multiple=!0:l.size&&(x.size=l.size))):e=x.createElementNS(e,o),e[Jt]=n,e[Bo]=l,zf(e,n,!1,!1),n.stateNode=e;e:{switch(x=yo(o,l),o){case"dialog":Le("cancel",e),Le("close",e),c=l;break;case"iframe":case"object":case"embed":Le("load",e),c=l;break;case"video":case"audio":for(c=0;c<Fo.length;c++)Le(Fo[c],e);c=l;break;case"source":Le("error",e),c=l;break;case"img":case"image":case"link":Le("error",e),Le("load",e),c=l;break;case"details":Le("toggle",e),c=l;break;case"input":Me(e,l),c=Ee(e,l),Le("invalid",e);break;case"option":c=l;break;case"select":e._wrapperState={wasMultiple:!!l.multiple},c=H({},l,{value:void 0}),Le("invalid",e);break;case"textarea":qt(e,l),c=ln(e,l),Le("invalid",e);break;default:c=l}mo(o,c),P=c;for(p in P)if(P.hasOwnProperty(p)){var R=P[p];p==="style"?Ti(e,R):p==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&zi(e,R)):p==="children"?typeof R=="string"?(o!=="textarea"||R!=="")&&an(e,R):typeof R=="number"&&an(e,""+R):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(a.hasOwnProperty(p)?R!=null&&p==="onScroll"&&Le("scroll",e):R!=null&&N(e,p,R,x))}switch(o){case"input":we(e),ut(e,l,!1);break;case"textarea":we(e),pt(e);break;case"option":l.value!=null&&e.setAttribute("value",""+Z(l.value));break;case"select":e.multiple=!!l.multiple,p=l.value,p!=null?rt(e,!!l.multiple,p,!1):l.defaultValue!=null&&rt(e,!!l.multiple,l.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=as)}switch(o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}}l&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return st(n),null;case 6:if(e&&n.stateNode!=null)Tf(e,n,e.memoizedProps,l);else{if(typeof l!="string"&&n.stateNode===null)throw Error(i(166));if(o=ur(Go.current),ur(en.current),gs(n)){if(l=n.stateNode,o=n.memoizedProps,l[Jt]=n,(p=l.nodeValue!==o)&&(e=Nt,e!==null))switch(e.tag){case 3:ls(l.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ls(l.nodeValue,o,(e.mode&1)!==0)}p&&(n.flags|=4)}else l=(o.nodeType===9?o:o.ownerDocument).createTextNode(l),l[Jt]=n,n.stateNode=l}return st(n),null;case 13:if(Ae(He),l=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(De&&Ct!==null&&(n.mode&1)!==0&&(n.flags&128)===0)Rd(),Wr(),n.flags|=98560,p=!1;else if(p=gs(n),l!==null&&l.dehydrated!==null){if(e===null){if(!p)throw Error(i(318));if(p=n.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(i(317));p[Jt]=n}else Wr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;st(n),p=!1}else Ot!==null&&(mu(Ot),Ot=null),p=!0;if(!p)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=o,n):(l=l!==null,l!==(e!==null&&e.memoizedState!==null)&&l&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(He.current&1)!==0?Qe===0&&(Qe=3):xu())),n.updateQueue!==null&&(n.flags|=4),st(n),null);case 4:return Gr(),iu(e,n),e===null&&Vo(n.stateNode.containerInfo),st(n),null;case 10:return ja(n.type._context),st(n),null;case 17:return gt(n.type)&&cs(),st(n),null;case 19:if(Ae(He),p=n.memoizedState,p===null)return st(n),null;if(l=(n.flags&128)!==0,x=p.rendering,x===null)if(l)Jo(p,!1);else{if(Qe!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(x=Ss(e),x!==null){for(n.flags|=128,Jo(p,!1),l=x.updateQueue,l!==null&&(n.updateQueue=l,n.flags|=4),n.subtreeFlags=0,l=o,o=n.child;o!==null;)p=o,e=l,p.flags&=14680066,x=p.alternate,x===null?(p.childLanes=0,p.lanes=e,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=x.childLanes,p.lanes=x.lanes,p.child=x.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=x.memoizedProps,p.memoizedState=x.memoizedState,p.updateQueue=x.updateQueue,p.type=x.type,e=x.dependencies,p.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),o=o.sibling;return je(He,He.current&1|2),n.child}e=e.sibling}p.tail!==null&&Ve()>Zr&&(n.flags|=128,l=!0,Jo(p,!1),n.lanes=4194304)}else{if(!l)if(e=Ss(x),e!==null){if(n.flags|=128,l=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),Jo(p,!0),p.tail===null&&p.tailMode==="hidden"&&!x.alternate&&!De)return st(n),null}else 2*Ve()-p.renderingStartTime>Zr&&o!==1073741824&&(n.flags|=128,l=!0,Jo(p,!1),n.lanes=4194304);p.isBackwards?(x.sibling=n.child,n.child=x):(o=p.last,o!==null?o.sibling=x:n.child=x,p.last=x)}return p.tail!==null?(n=p.tail,p.rendering=n,p.tail=n.sibling,p.renderingStartTime=Ve(),n.sibling=null,o=He.current,je(He,l?o&1|2:o&1),n):(st(n),null);case 22:case 23:return vu(),l=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==l&&(n.flags|=8192),l&&(n.mode&1)!==0?(bt&1073741824)!==0&&(st(n),n.subtreeFlags&6&&(n.flags|=8192)):st(n),null;case 24:return null;case 25:return null}throw Error(i(156,n.tag))}function J0(e,n){switch(ba(n),n.tag){case 1:return gt(n.type)&&cs(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Gr(),Ae(ht),Ae(ot),Fa(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return Da(n),null;case 13:if(Ae(He),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(i(340));Wr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Ae(He),null;case 4:return Gr(),null;case 10:return ja(n.type._context),null;case 22:case 23:return vu(),null;case 24:return null;default:return null}}var zs=!1,lt=!1,ey=typeof WeakSet=="function"?WeakSet:Set,fe=null;function qr(e,n){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(l){We(e,n,l)}else o.current=null}function su(e,n,o){try{o()}catch(l){We(e,n,l)}}var jf=!1;function ty(e,n){if(va=qi,e=cd(),ca(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var c=l.anchorOffset,p=l.focusNode;l=l.focusOffset;try{o.nodeType,p.nodeType}catch{o=null;break e}var x=0,P=-1,R=-1,K=0,re=0,ie=e,ne=null;t:for(;;){for(var de;ie!==o||c!==0&&ie.nodeType!==3||(P=x+c),ie!==p||l!==0&&ie.nodeType!==3||(R=x+l),ie.nodeType===3&&(x+=ie.nodeValue.length),(de=ie.firstChild)!==null;)ne=ie,ie=de;for(;;){if(ie===e)break t;if(ne===o&&++K===c&&(P=x),ne===p&&++re===l&&(R=x),(de=ie.nextSibling)!==null)break;ie=ne,ne=ie.parentNode}ie=de}o=P===-1||R===-1?null:{start:P,end:R}}else o=null}o=o||{start:0,end:0}}else o=null;for(xa={focusedElem:e,selectionRange:o},qi=!1,fe=n;fe!==null;)if(n=fe,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,fe=e;else for(;fe!==null;){n=fe;try{var pe=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(pe!==null){var he=pe.memoizedProps,Ue=pe.memoizedState,Y=n.stateNode,$=Y.getSnapshotBeforeUpdate(n.elementType===n.type?he:Ft(n.type,he),Ue);Y.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var Q=n.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(le){We(n,n.return,le)}if(e=n.sibling,e!==null){e.return=n.return,fe=e;break}fe=n.return}return pe=jf,jf=!1,pe}function ei(e,n,o){var l=n.updateQueue;if(l=l!==null?l.lastEffect:null,l!==null){var c=l=l.next;do{if((c.tag&e)===e){var p=c.destroy;c.destroy=void 0,p!==void 0&&su(n,o,p)}c=c.next}while(c!==l)}}function Is(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var l=o.create;o.destroy=l()}o=o.next}while(o!==n)}}function lu(e){var n=e.ref;if(n!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof n=="function"?n(e):n.current=e}}function Rf(e){var n=e.alternate;n!==null&&(e.alternate=null,Rf(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Jt],delete n[Bo],delete n[_a],delete n[$0],delete n[D0])),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 Lf(e){return e.tag===5||e.tag===3||e.tag===4}function Af(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lf(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 au(e,n,o){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?o.nodeType===8?o.parentNode.insertBefore(e,n):o.insertBefore(e,n):(o.nodeType===8?(n=o.parentNode,n.insertBefore(e,o)):(n=o,n.appendChild(e)),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=as));else if(l!==4&&(e=e.child,e!==null))for(au(e,n,o),e=e.sibling;e!==null;)au(e,n,o),e=e.sibling}function uu(e,n,o){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?o.insertBefore(e,n):o.appendChild(e);else if(l!==4&&(e=e.child,e!==null))for(uu(e,n,o),e=e.sibling;e!==null;)uu(e,n,o),e=e.sibling}var Je=null,Vt=!1;function Dn(e,n,o){for(o=o.child;o!==null;)$f(e,n,o),o=o.sibling}function $f(e,n,o){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(Mr,o)}catch{}switch(o.tag){case 5:lt||qr(o,n);case 6:var l=Je,c=Vt;Je=null,Dn(e,n,o),Je=l,Vt=c,Je!==null&&(Vt?(e=Je,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):Je.removeChild(o.stateNode));break;case 18:Je!==null&&(Vt?(e=Je,o=o.stateNode,e.nodeType===8?ka(e.parentNode,o):e.nodeType===1&&ka(e,o),To(e)):ka(Je,o.stateNode));break;case 4:l=Je,c=Vt,Je=o.stateNode.containerInfo,Vt=!0,Dn(e,n,o),Je=l,Vt=c;break;case 0:case 11:case 14:case 15:if(!lt&&(l=o.updateQueue,l!==null&&(l=l.lastEffect,l!==null))){c=l=l.next;do{var p=c,x=p.destroy;p=p.tag,x!==void 0&&((p&2)!==0||(p&4)!==0)&&su(o,n,x),c=c.next}while(c!==l)}Dn(e,n,o);break;case 1:if(!lt&&(qr(o,n),l=o.stateNode,typeof l.componentWillUnmount=="function"))try{l.props=o.memoizedProps,l.state=o.memoizedState,l.componentWillUnmount()}catch(P){We(o,n,P)}Dn(e,n,o);break;case 21:Dn(e,n,o);break;case 22:o.mode&1?(lt=(l=lt)||o.memoizedState!==null,Dn(e,n,o),lt=l):Dn(e,n,o);break;default:Dn(e,n,o)}}function Df(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new ey),n.forEach(function(l){var c=cy.bind(null,e,l);o.has(l)||(o.add(l),l.then(c,c))})}}function Ht(e,n){var o=n.deletions;if(o!==null)for(var l=0;l<o.length;l++){var c=o[l];try{var p=e,x=n,P=x;e:for(;P!==null;){switch(P.tag){case 5:Je=P.stateNode,Vt=!1;break e;case 3:Je=P.stateNode.containerInfo,Vt=!0;break e;case 4:Je=P.stateNode.containerInfo,Vt=!0;break e}P=P.return}if(Je===null)throw Error(i(160));$f(p,x,c),Je=null,Vt=!1;var R=c.alternate;R!==null&&(R.return=null),c.return=null}catch(K){We(c,n,K)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Of(n,e),n=n.sibling}function Of(e,n){var o=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ht(n,e),nn(e),l&4){try{ei(3,e,e.return),Is(3,e)}catch(he){We(e,e.return,he)}try{ei(5,e,e.return)}catch(he){We(e,e.return,he)}}break;case 1:Ht(n,e),nn(e),l&512&&o!==null&&qr(o,o.return);break;case 5:if(Ht(n,e),nn(e),l&512&&o!==null&&qr(o,o.return),e.flags&32){var c=e.stateNode;try{an(c,"")}catch(he){We(e,e.return,he)}}if(l&4&&(c=e.stateNode,c!=null)){var p=e.memoizedProps,x=o!==null?o.memoizedProps:p,P=e.type,R=e.updateQueue;if(e.updateQueue=null,R!==null)try{P==="input"&&p.type==="radio"&&p.name!=null&&Ie(c,p),yo(P,x);var K=yo(P,p);for(x=0;x<R.length;x+=2){var re=R[x],ie=R[x+1];re==="style"?Ti(c,ie):re==="dangerouslySetInnerHTML"?zi(c,ie):re==="children"?an(c,ie):N(c,re,ie,K)}switch(P){case"input":Re(c,p);break;case"textarea":Kt(c,p);break;case"select":var ne=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!p.multiple;var de=p.value;de!=null?rt(c,!!p.multiple,de,!1):ne!==!!p.multiple&&(p.defaultValue!=null?rt(c,!!p.multiple,p.defaultValue,!0):rt(c,!!p.multiple,p.multiple?[]:"",!1))}c[Bo]=p}catch(he){We(e,e.return,he)}}break;case 6:if(Ht(n,e),nn(e),l&4){if(e.stateNode===null)throw Error(i(162));c=e.stateNode,p=e.memoizedProps;try{c.nodeValue=p}catch(he){We(e,e.return,he)}}break;case 3:if(Ht(n,e),nn(e),l&4&&o!==null&&o.memoizedState.isDehydrated)try{To(n.containerInfo)}catch(he){We(e,e.return,he)}break;case 4:Ht(n,e),nn(e);break;case 13:Ht(n,e),nn(e),c=e.child,c.flags&8192&&(p=c.memoizedState!==null,c.stateNode.isHidden=p,!p||c.alternate!==null&&c.alternate.memoizedState!==null||(fu=Ve())),l&4&&Df(e);break;case 22:if(re=o!==null&&o.memoizedState!==null,e.mode&1?(lt=(K=lt)||re,Ht(n,e),lt=K):Ht(n,e),nn(e),l&8192){if(K=e.memoizedState!==null,(e.stateNode.isHidden=K)&&!re&&(e.mode&1)!==0)for(fe=e,re=e.child;re!==null;){for(ie=fe=re;fe!==null;){switch(ne=fe,de=ne.child,ne.tag){case 0:case 11:case 14:case 15:ei(4,ne,ne.return);break;case 1:qr(ne,ne.return);var pe=ne.stateNode;if(typeof pe.componentWillUnmount=="function"){l=ne,o=ne.return;try{n=l,pe.props=n.memoizedProps,pe.state=n.memoizedState,pe.componentWillUnmount()}catch(he){We(l,o,he)}}break;case 5:qr(ne,ne.return);break;case 22:if(ne.memoizedState!==null){Hf(ie);continue}}de!==null?(de.return=ne,fe=de):Hf(ie)}re=re.sibling}e:for(re=null,ie=e;;){if(ie.tag===5){if(re===null){re=ie;try{c=ie.stateNode,K?(p=c.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(P=ie.stateNode,R=ie.memoizedProps.style,x=R!=null&&R.hasOwnProperty("display")?R.display:null,P.style.display=Ii("display",x))}catch(he){We(e,e.return,he)}}}else if(ie.tag===6){if(re===null)try{ie.stateNode.nodeValue=K?"":ie.memoizedProps}catch(he){We(e,e.return,he)}}else if((ie.tag!==22&&ie.tag!==23||ie.memoizedState===null||ie===e)&&ie.child!==null){ie.child.return=ie,ie=ie.child;continue}if(ie===e)break e;for(;ie.sibling===null;){if(ie.return===null||ie.return===e)break e;re===ie&&(re=null),ie=ie.return}re===ie&&(re=null),ie.sibling.return=ie.return,ie=ie.sibling}}break;case 19:Ht(n,e),nn(e),l&4&&Df(e);break;case 21:break;default:Ht(n,e),nn(e)}}function nn(e){var n=e.flags;if(n&2){try{e:{for(var o=e.return;o!==null;){if(Lf(o)){var l=o;break e}o=o.return}throw Error(i(160))}switch(l.tag){case 5:var c=l.stateNode;l.flags&32&&(an(c,""),l.flags&=-33);var p=Af(e);uu(e,p,c);break;case 3:case 4:var x=l.stateNode.containerInfo,P=Af(e);au(e,P,x);break;default:throw Error(i(161))}}catch(R){We(e,e.return,R)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function ny(e,n,o){fe=e,Ff(e)}function Ff(e,n,o){for(var l=(e.mode&1)!==0;fe!==null;){var c=fe,p=c.child;if(c.tag===22&&l){var x=c.memoizedState!==null||zs;if(!x){var P=c.alternate,R=P!==null&&P.memoizedState!==null||lt;P=zs;var K=lt;if(zs=x,(lt=R)&&!K)for(fe=c;fe!==null;)x=fe,R=x.child,x.tag===22&&x.memoizedState!==null?Bf(c):R!==null?(R.return=x,fe=R):Bf(c);for(;p!==null;)fe=p,Ff(p),p=p.sibling;fe=c,zs=P,lt=K}Vf(e)}else(c.subtreeFlags&8772)!==0&&p!==null?(p.return=c,fe=p):Vf(e)}}function Vf(e){for(;fe!==null;){var n=fe;if((n.flags&8772)!==0){var o=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:lt||Is(5,n);break;case 1:var l=n.stateNode;if(n.flags&4&&!lt)if(o===null)l.componentDidMount();else{var c=n.elementType===n.type?o.memoizedProps:Ft(n.type,o.memoizedProps);l.componentDidUpdate(c,o.memoizedState,l.__reactInternalSnapshotBeforeUpdate)}var p=n.updateQueue;p!==null&&Vd(n,p,l);break;case 3:var x=n.updateQueue;if(x!==null){if(o=null,n.child!==null)switch(n.child.tag){case 5:o=n.child.stateNode;break;case 1:o=n.child.stateNode}Vd(n,x,o)}break;case 5:var P=n.stateNode;if(o===null&&n.flags&4){o=P;var R=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&o.focus();break;case"img":R.src&&(o.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var K=n.alternate;if(K!==null){var re=K.memoizedState;if(re!==null){var ie=re.dehydrated;ie!==null&&To(ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(i(163))}lt||n.flags&512&&lu(n)}catch(ne){We(n,n.return,ne)}}if(n===e){fe=null;break}if(o=n.sibling,o!==null){o.return=n.return,fe=o;break}fe=n.return}}function Hf(e){for(;fe!==null;){var n=fe;if(n===e){fe=null;break}var o=n.sibling;if(o!==null){o.return=n.return,fe=o;break}fe=n.return}}function Bf(e){for(;fe!==null;){var n=fe;try{switch(n.tag){case 0:case 11:case 15:var o=n.return;try{Is(4,n)}catch(R){We(n,o,R)}break;case 1:var l=n.stateNode;if(typeof l.componentDidMount=="function"){var c=n.return;try{l.componentDidMount()}catch(R){We(n,c,R)}}var p=n.return;try{lu(n)}catch(R){We(n,p,R)}break;case 5:var x=n.return;try{lu(n)}catch(R){We(n,x,R)}}}catch(R){We(n,n.return,R)}if(n===e){fe=null;break}var P=n.sibling;if(P!==null){P.return=n.return,fe=P;break}fe=n.return}}var ry=Math.ceil,Ts=M.ReactCurrentDispatcher,cu=M.ReactCurrentOwner,At=M.ReactCurrentBatchConfig,Pe=0,Ke=null,Ye=null,et=0,bt=0,Kr=jn(0),Qe=0,ti=null,dr=0,js=0,du=0,ni=null,yt=null,fu=0,Zr=1/0,yn=null,Rs=!1,pu=null,On=null,Ls=!1,Fn=null,As=0,ri=0,hu=null,$s=-1,Ds=0;function dt(){return(Pe&6)!==0?Ve():$s!==-1?$s:$s=Ve()}function Vn(e){return(e.mode&1)===0?1:(Pe&2)!==0&&et!==0?et&-et:F0.transition!==null?(Ds===0&&(Ds=Xi()),Ds):(e=Te,e!==0||(e=window.event,e=e===void 0?16:Wc(e.type)),e)}function Bt(e,n,o,l){if(50<ri)throw ri=0,hu=null,Error(i(185));rr(e,o,l),((Pe&2)===0||e!==Ke)&&(e===Ke&&((Pe&2)===0&&(js|=o),Qe===4&&Hn(e,et)),vt(e,l),o===1&&Pe===0&&(n.mode&1)===0&&(Zr=Ve()+500,fs&&Ln()))}function vt(e,n){var o=e.callbackNode;Yi(e,n);var l=un(e,e===Ke?et:0);if(l===0)o!==null&&Hi(o),e.callbackNode=null,e.callbackPriority=0;else if(n=l&-l,e.callbackPriority!==n){if(o!=null&&Hi(o),n===1)e.tag===0?O0(Uf.bind(null,e)):Pd(Uf.bind(null,e)),L0(function(){(Pe&6)===0&&Ln()}),o=null;else{switch(Ac(l)){case 1:o=Co;break;case 4:o=Wi;break;case 16:o=br;break;case 536870912:o=Ui;break;default:o=br}o=Jf(o,Wf.bind(null,e))}e.callbackPriority=n,e.callbackNode=o}}function Wf(e,n){if($s=-1,Ds=0,(Pe&6)!==0)throw Error(i(327));var o=e.callbackNode;if(Jr()&&e.callbackNode!==o)return null;var l=un(e,e===Ke?et:0);if(l===0)return null;if((l&30)!==0||(l&e.expiredLanes)!==0||n)n=Os(e,l);else{n=l;var c=Pe;Pe|=2;var p=Xf();(Ke!==e||et!==n)&&(yn=null,Zr=Ve()+500,pr(e,n));do try{sy();break}catch(P){Yf(e,P)}while(!0);Ta(),Ts.current=p,Pe=c,Ye!==null?n=0:(Ke=null,et=0,n=Qe)}if(n!==0){if(n===2&&(c=bo(e),c!==0&&(l=c,n=gu(e,c))),n===1)throw o=ti,pr(e,0),Hn(e,l),vt(e,Ve()),o;if(n===6)Hn(e,l);else{if(c=e.current.alternate,(l&30)===0&&!oy(c)&&(n=Os(e,l),n===2&&(p=bo(e),p!==0&&(l=p,n=gu(e,p))),n===1))throw o=ti,pr(e,0),Hn(e,l),vt(e,Ve()),o;switch(e.finishedWork=c,e.finishedLanes=l,n){case 0:case 1:throw Error(i(345));case 2:hr(e,yt,yn);break;case 3:if(Hn(e,l),(l&130023424)===l&&(n=fu+500-Ve(),10<n)){if(un(e,0)!==0)break;if(c=e.suspendedLanes,(c&l)!==l){dt(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=Sa(hr.bind(null,e,yt,yn),n);break}hr(e,yt,yn);break;case 4:if(Hn(e,l),(l&4194240)===l)break;for(n=e.eventTimes,c=-1;0<l;){var x=31-_t(l);p=1<<x,x=n[x],x>c&&(c=x),l&=~p}if(l=c,l=Ve()-l,l=(120>l?120:480>l?480:1080>l?1080:1920>l?1920:3e3>l?3e3:4320>l?4320:1960*ry(l/1960))-l,10<l){e.timeoutHandle=Sa(hr.bind(null,e,yt,yn),l);break}hr(e,yt,yn);break;case 5:hr(e,yt,yn);break;default:throw Error(i(329))}}}return vt(e,Ve()),e.callbackNode===o?Wf.bind(null,e):null}function gu(e,n){var o=ni;return e.current.memoizedState.isDehydrated&&(pr(e,n).flags|=256),e=Os(e,n),e!==2&&(n=yt,yt=o,n!==null&&mu(n)),e}function mu(e){yt===null?yt=e:yt.push.apply(yt,e)}function oy(e){for(var n=e;;){if(n.flags&16384){var o=n.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var l=0;l<o.length;l++){var c=o[l],p=c.getSnapshot;c=c.value;try{if(!Dt(p(),c))return!1}catch{return!1}}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Hn(e,n){for(n&=~du,n&=~js,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-_t(n),l=1<<o;e[o]=-1,n&=~l}}function Uf(e){if((Pe&6)!==0)throw Error(i(327));Jr();var n=un(e,0);if((n&1)===0)return vt(e,Ve()),null;var o=Os(e,n);if(e.tag!==0&&o===2){var l=bo(e);l!==0&&(n=l,o=gu(e,l))}if(o===1)throw o=ti,pr(e,0),Hn(e,n),vt(e,Ve()),o;if(o===6)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,hr(e,yt,yn),vt(e,Ve()),null}function yu(e,n){var o=Pe;Pe|=1;try{return e(n)}finally{Pe=o,Pe===0&&(Zr=Ve()+500,fs&&Ln())}}function fr(e){Fn!==null&&Fn.tag===0&&(Pe&6)===0&&Jr();var n=Pe;Pe|=1;var o=At.transition,l=Te;try{if(At.transition=null,Te=1,e)return e()}finally{Te=l,At.transition=o,Pe=n,(Pe&6)===0&&Ln()}}function vu(){bt=Kr.current,Ae(Kr)}function pr(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,R0(o)),Ye!==null)for(o=Ye.return;o!==null;){var l=o;switch(ba(l),l.tag){case 1:l=l.type.childContextTypes,l!=null&&cs();break;case 3:Gr(),Ae(ht),Ae(ot),Fa();break;case 5:Da(l);break;case 4:Gr();break;case 13:Ae(He);break;case 19:Ae(He);break;case 10:ja(l.type._context);break;case 22:case 23:vu()}o=o.return}if(Ke=e,Ye=e=Bn(e.current,null),et=bt=n,Qe=0,ti=null,du=js=dr=0,yt=ni=null,ar!==null){for(n=0;n<ar.length;n++)if(o=ar[n],l=o.interleaved,l!==null){o.interleaved=null;var c=l.next,p=o.pending;if(p!==null){var x=p.next;p.next=c,l.next=x}o.pending=l}ar=null}return e}function Yf(e,n){do{var o=Ye;try{if(Ta(),ks.current=Cs,_s){for(var l=Be.memoizedState;l!==null;){var c=l.queue;c!==null&&(c.pending=null),l=l.next}_s=!1}if(cr=0,qe=Ge=Be=null,Qo=!1,qo=0,cu.current=null,o===null||o.return===null){Qe=1,ti=n,Ye=null;break}e:{var p=e,x=o.return,P=o,R=n;if(n=et,P.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var K=R,re=P,ie=re.tag;if((re.mode&1)===0&&(ie===0||ie===11||ie===15)){var ne=re.alternate;ne?(re.updateQueue=ne.updateQueue,re.memoizedState=ne.memoizedState,re.lanes=ne.lanes):(re.updateQueue=null,re.memoizedState=null)}var de=yf(x);if(de!==null){de.flags&=-257,vf(de,x,P,p,n),de.mode&1&&mf(p,K,n),n=de,R=K;var pe=n.updateQueue;if(pe===null){var he=new Set;he.add(R),n.updateQueue=he}else pe.add(R);break e}else{if((n&1)===0){mf(p,K,n),xu();break e}R=Error(i(426))}}else if(De&&P.mode&1){var Ue=yf(x);if(Ue!==null){(Ue.flags&65536)===0&&(Ue.flags|=256),vf(Ue,x,P,p,n),za(Qr(R,P));break e}}p=R=Qr(R,P),Qe!==4&&(Qe=2),ni===null?ni=[p]:ni.push(p),p=x;do{switch(p.tag){case 3:p.flags|=65536,n&=-n,p.lanes|=n;var Y=hf(p,R,n);Fd(p,Y);break e;case 1:P=R;var $=p.type,Q=p.stateNode;if((p.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(On===null||!On.has(Q)))){p.flags|=65536,n&=-n,p.lanes|=n;var le=gf(p,P,n);Fd(p,le);break e}}p=p.return}while(p!==null)}Qf(o)}catch(ye){n=ye,Ye===o&&o!==null&&(Ye=o=o.return);continue}break}while(!0)}function Xf(){var e=Ts.current;return Ts.current=Cs,e===null?Cs:e}function xu(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),Ke===null||(dr&268435455)===0&&(js&268435455)===0||Hn(Ke,et)}function Os(e,n){var o=Pe;Pe|=2;var l=Xf();(Ke!==e||et!==n)&&(yn=null,pr(e,n));do try{iy();break}catch(c){Yf(e,c)}while(!0);if(Ta(),Pe=o,Ts.current=l,Ye!==null)throw Error(i(261));return Ke=null,et=0,Qe}function iy(){for(;Ye!==null;)Gf(Ye)}function sy(){for(;Ye!==null&&!Hl();)Gf(Ye)}function Gf(e){var n=Zf(e.alternate,e,bt);e.memoizedProps=e.pendingProps,n===null?Qf(e):Ye=n,cu.current=null}function Qf(e){var n=e;do{var o=n.alternate;if(e=n.return,(n.flags&32768)===0){if(o=Z0(o,n,bt),o!==null){Ye=o;return}}else{if(o=J0(o,n),o!==null){o.flags&=32767,Ye=o;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qe=6,Ye=null;return}}if(n=n.sibling,n!==null){Ye=n;return}Ye=n=e}while(n!==null);Qe===0&&(Qe=5)}function hr(e,n,o){var l=Te,c=At.transition;try{At.transition=null,Te=1,ly(e,n,o,l)}finally{At.transition=c,Te=l}return null}function ly(e,n,o,l){do Jr();while(Fn!==null);if((Pe&6)!==0)throw Error(i(327));o=e.finishedWork;var c=e.finishedLanes;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var p=o.lanes|o.childLanes;if(ql(e,p),e===Ke&&(Ye=Ke=null,et=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Ls||(Ls=!0,Jf(br,function(){return Jr(),null})),p=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||p){p=At.transition,At.transition=null;var x=Te;Te=1;var P=Pe;Pe|=4,cu.current=null,ty(e,o),Of(o,e),b0(xa),qi=!!va,xa=va=null,e.current=o,ny(o),Bi(),Pe=P,Te=x,At.transition=p}else e.current=o;if(Ls&&(Ls=!1,Fn=e,As=c),p=e.pendingLanes,p===0&&(On=null),Ul(o.stateNode),vt(e,Ve()),n!==null)for(l=e.onRecoverableError,o=0;o<n.length;o++)c=n[o],l(c.value,{componentStack:c.stack,digest:c.digest});if(Rs)throw Rs=!1,e=pu,pu=null,e;return(As&1)!==0&&e.tag!==0&&Jr(),p=e.pendingLanes,(p&1)!==0?e===hu?ri++:(ri=0,hu=e):ri=0,Ln(),null}function Jr(){if(Fn!==null){var e=Ac(As),n=At.transition,o=Te;try{if(At.transition=null,Te=16>e?16:e,Fn===null)var l=!1;else{if(e=Fn,Fn=null,As=0,(Pe&6)!==0)throw Error(i(331));var c=Pe;for(Pe|=4,fe=e.current;fe!==null;){var p=fe,x=p.child;if((fe.flags&16)!==0){var P=p.deletions;if(P!==null){for(var R=0;R<P.length;R++){var K=P[R];for(fe=K;fe!==null;){var re=fe;switch(re.tag){case 0:case 11:case 15:ei(8,re,p)}var ie=re.child;if(ie!==null)ie.return=re,fe=ie;else for(;fe!==null;){re=fe;var ne=re.sibling,de=re.return;if(Rf(re),re===K){fe=null;break}if(ne!==null){ne.return=de,fe=ne;break}fe=de}}}var pe=p.alternate;if(pe!==null){var he=pe.child;if(he!==null){pe.child=null;do{var Ue=he.sibling;he.sibling=null,he=Ue}while(he!==null)}}fe=p}}if((p.subtreeFlags&2064)!==0&&x!==null)x.return=p,fe=x;else e:for(;fe!==null;){if(p=fe,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:ei(9,p,p.return)}var Y=p.sibling;if(Y!==null){Y.return=p.return,fe=Y;break e}fe=p.return}}var $=e.current;for(fe=$;fe!==null;){x=fe;var Q=x.child;if((x.subtreeFlags&2064)!==0&&Q!==null)Q.return=x,fe=Q;else e:for(x=$;fe!==null;){if(P=fe,(P.flags&2048)!==0)try{switch(P.tag){case 0:case 11:case 15:Is(9,P)}}catch(ye){We(P,P.return,ye)}if(P===x){fe=null;break e}var le=P.sibling;if(le!==null){le.return=P.return,fe=le;break e}fe=P.return}}if(Pe=c,Ln(),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(Mr,e)}catch{}l=!0}return l}finally{Te=o,At.transition=n}}return!1}function qf(e,n,o){n=Qr(o,n),n=hf(e,n,1),e=$n(e,n,1),n=dt(),e!==null&&(rr(e,1,n),vt(e,n))}function We(e,n,o){if(e.tag===3)qf(e,e,o);else for(;n!==null;){if(n.tag===3){qf(n,e,o);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(On===null||!On.has(l))){e=Qr(o,e),e=gf(n,e,1),n=$n(n,e,1),e=dt(),n!==null&&(rr(n,1,e),vt(n,e));break}}n=n.return}}function ay(e,n,o){var l=e.pingCache;l!==null&&l.delete(n),n=dt(),e.pingedLanes|=e.suspendedLanes&o,Ke===e&&(et&o)===o&&(Qe===4||Qe===3&&(et&130023424)===et&&500>Ve()-fu?pr(e,0):du|=o),vt(e,n)}function Kf(e,n){n===0&&((e.mode&1)===0?n=1:(n=zr,zr<<=1,(zr&130023424)===0&&(zr=4194304)));var o=dt();e=hn(e,n),e!==null&&(rr(e,n,o),vt(e,o))}function uy(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),Kf(e,o)}function cy(e,n){var o=0;switch(e.tag){case 13:var l=e.stateNode,c=e.memoizedState;c!==null&&(o=c.retryLane);break;case 19:l=e.stateNode;break;default:throw Error(i(314))}l!==null&&l.delete(n),Kf(e,o)}var Zf;Zf=function(e,n,o){if(e!==null)if(e.memoizedProps!==n.pendingProps||ht.current)mt=!0;else{if((e.lanes&o)===0&&(n.flags&128)===0)return mt=!1,K0(e,n,o);mt=(e.flags&131072)!==0}else mt=!1,De&&(n.flags&1048576)!==0&&zd(n,hs,n.index);switch(n.lanes=0,n.tag){case 2:var l=n.type;Ps(e,n),e=n.pendingProps;var c=Vr(n,ot.current);Xr(n,o),c=Ba(null,n,l,e,c,o);var p=Wa();return n.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,gt(l)?(p=!0,ds(n)):p=!1,n.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Aa(n),c.updater=bs,n.stateNode=c,c._reactInternals=n,qa(n,l,e,o),n=eu(null,n,l,!0,p,o)):(n.tag=0,De&&p&&Ca(n),ct(null,n,c,o),n=n.child),n;case 16:l=n.elementType;e:{switch(Ps(e,n),e=n.pendingProps,c=l._init,l=c(l._payload),n.type=l,c=n.tag=fy(l),e=Ft(l,e),c){case 0:n=Ja(null,n,l,e,o);break e;case 1:n=Ef(null,n,l,e,o);break e;case 11:n=xf(null,n,l,e,o);break e;case 14:n=wf(null,n,l,Ft(l.type,e),o);break e}throw Error(i(306,l,""))}return n;case 0:return l=n.type,c=n.pendingProps,c=n.elementType===l?c:Ft(l,c),Ja(e,n,l,c,o);case 1:return l=n.type,c=n.pendingProps,c=n.elementType===l?c:Ft(l,c),Ef(e,n,l,c,o);case 3:e:{if(Nf(n),e===null)throw Error(i(387));l=n.pendingProps,p=n.memoizedState,c=p.element,Od(e,n),ws(n,l,null,o);var x=n.memoizedState;if(l=x.element,p.isDehydrated)if(p={element:l,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){c=Qr(Error(i(423)),n),n=Cf(e,n,l,o,c);break e}else if(l!==c){c=Qr(Error(i(424)),n),n=Cf(e,n,l,o,c);break e}else for(Ct=Tn(n.stateNode.containerInfo.firstChild),Nt=n,De=!0,Ot=null,o=$d(n,null,l,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Wr(),l===c){n=mn(e,n,o);break e}ct(e,n,l,o)}n=n.child}return n;case 5:return Hd(n),e===null&&Pa(n),l=n.type,c=n.pendingProps,p=e!==null?e.memoizedProps:null,x=c.children,wa(l,c)?x=null:p!==null&&wa(l,p)&&(n.flags|=32),_f(e,n),ct(e,n,x,o),n.child;case 6:return e===null&&Pa(n),null;case 13:return bf(e,n,o);case 4:return $a(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Ur(n,null,l,o):ct(e,n,l,o),n.child;case 11:return l=n.type,c=n.pendingProps,c=n.elementType===l?c:Ft(l,c),xf(e,n,l,c,o);case 7:return ct(e,n,n.pendingProps,o),n.child;case 8:return ct(e,n,n.pendingProps.children,o),n.child;case 12:return ct(e,n,n.pendingProps.children,o),n.child;case 10:e:{if(l=n.type._context,c=n.pendingProps,p=n.memoizedProps,x=c.value,je(ys,l._currentValue),l._currentValue=x,p!==null)if(Dt(p.value,x)){if(p.children===c.children&&!ht.current){n=mn(e,n,o);break e}}else for(p=n.child,p!==null&&(p.return=n);p!==null;){var P=p.dependencies;if(P!==null){x=p.child;for(var R=P.firstContext;R!==null;){if(R.context===l){if(p.tag===1){R=gn(-1,o&-o),R.tag=2;var K=p.updateQueue;if(K!==null){K=K.shared;var re=K.pending;re===null?R.next=R:(R.next=re.next,re.next=R),K.pending=R}}p.lanes|=o,R=p.alternate,R!==null&&(R.lanes|=o),Ra(p.return,o,n),P.lanes|=o;break}R=R.next}}else if(p.tag===10)x=p.type===n.type?null:p.child;else if(p.tag===18){if(x=p.return,x===null)throw Error(i(341));x.lanes|=o,P=x.alternate,P!==null&&(P.lanes|=o),Ra(x,o,n),x=p.sibling}else x=p.child;if(x!==null)x.return=p;else for(x=p;x!==null;){if(x===n){x=null;break}if(p=x.sibling,p!==null){p.return=x.return,x=p;break}x=x.return}p=x}ct(e,n,c.children,o),n=n.child}return n;case 9:return c=n.type,l=n.pendingProps.children,Xr(n,o),c=Rt(c),l=l(c),n.flags|=1,ct(e,n,l,o),n.child;case 14:return l=n.type,c=Ft(l,n.pendingProps),c=Ft(l.type,c),wf(e,n,l,c,o);case 15:return Sf(e,n,n.type,n.pendingProps,o);case 17:return l=n.type,c=n.pendingProps,c=n.elementType===l?c:Ft(l,c),Ps(e,n),n.tag=1,gt(l)?(e=!0,ds(n)):e=!1,Xr(n,o),ff(n,l,c),qa(n,l,c,o),eu(null,n,l,!0,e,o);case 19:return Pf(e,n,o);case 22:return kf(e,n,o)}throw Error(i(156,n.tag))};function Jf(e,n){return Vi(e,n)}function dy(e,n,o,l){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(e,n,o,l){return new dy(e,n,o,l)}function wu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fy(e){if(typeof e=="function")return wu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===V)return 11;if(e===U)return 14}return 2}function Bn(e,n){var o=e.alternate;return o===null?(o=$t(e.tag,n,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=n,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,n=e.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Fs(e,n,o,l,c,p){var x=2;if(l=e,typeof e=="function")wu(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case B:return gr(o.children,c,p,n);case G:x=8,c|=8;break;case q:return e=$t(12,o,n,c|2),e.elementType=q,e.lanes=p,e;case J:return e=$t(13,o,n,c),e.elementType=J,e.lanes=p,e;case z:return e=$t(19,o,n,c),e.elementType=z,e.lanes=p,e;case W:return Vs(o,c,p,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ee:x=10;break e;case D:x=9;break e;case V:x=11;break e;case U:x=14;break e;case O:x=16,l=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return n=$t(x,o,n,c),n.elementType=e,n.type=l,n.lanes=p,n}function gr(e,n,o,l){return e=$t(7,e,l,n),e.lanes=o,e}function Vs(e,n,o,l){return e=$t(22,e,l,n),e.elementType=W,e.lanes=o,e.stateNode={isHidden:!1},e}function Su(e,n,o){return e=$t(6,e,null,n),e.lanes=o,e}function ku(e,n,o){return n=$t(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function py(e,n,o,l,c){this.tag=n,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=nr(0),this.expirationTimes=nr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nr(0),this.identifierPrefix=l,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function _u(e,n,o,l,c,p,x,P,R){return e=new py(e,n,o,P,R),n===1?(n=1,p===!0&&(n|=8)):n=0,p=$t(3,null,null,n),e.current=p,p.stateNode=e,p.memoizedState={element:l,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Aa(p),e}function hy(e,n,o){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:l==null?null:""+l,children:e,containerInfo:n,implementation:o}}function ep(e){if(!e)return Rn;e=e._reactInternals;e:{if(Zt(e)!==e||e.tag!==1)throw Error(i(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(gt(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(i(171))}if(e.tag===1){var o=e.type;if(gt(o))return bd(e,o,n)}return n}function tp(e,n,o,l,c,p,x,P,R){return e=_u(o,l,!0,e,c,p,x,P,R),e.context=ep(null),o=e.current,l=dt(),c=Vn(o),p=gn(l,c),p.callback=n??null,$n(o,p,c),e.current.lanes=c,rr(e,c,l),vt(e,l),e}function Hs(e,n,o,l){var c=n.current,p=dt(),x=Vn(c);return o=ep(o),n.context===null?n.context=o:n.pendingContext=o,n=gn(p,x),n.payload={element:e},l=l===void 0?null:l,l!==null&&(n.callback=l),e=$n(c,n,x),e!==null&&(Bt(e,c,x,p),xs(e,c,x)),x}function Bs(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 np(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function Eu(e,n){np(e,n),(e=e.alternate)&&np(e,n)}function gy(){return null}var rp=typeof reportError=="function"?reportError:function(e){console.error(e)};function Nu(e){this._internalRoot=e}Ws.prototype.render=Nu.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(i(409));Hs(e,n,null,null)},Ws.prototype.unmount=Nu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;fr(function(){Hs(null,e,null,null)}),n[cn]=null}};function Ws(e){this._internalRoot=e}Ws.prototype.unstable_scheduleHydration=function(e){if(e){var n=Oc();e={blockedOn:null,target:e,priority:n};for(var o=0;o<Pn.length&&n!==0&&n<Pn[o].priority;o++);Pn.splice(o,0,e),o===0&&Hc(e)}};function Cu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Us(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function op(){}function my(e,n,o,l,c){if(c){if(typeof l=="function"){var p=l;l=function(){var K=Bs(x);p.call(K)}}var x=tp(n,l,e,0,null,!1,!1,"",op);return e._reactRootContainer=x,e[cn]=x.current,Vo(e.nodeType===8?e.parentNode:e),fr(),x}for(;c=e.lastChild;)e.removeChild(c);if(typeof l=="function"){var P=l;l=function(){var K=Bs(R);P.call(K)}}var R=_u(e,0,!1,null,null,!1,!1,"",op);return e._reactRootContainer=R,e[cn]=R.current,Vo(e.nodeType===8?e.parentNode:e),fr(function(){Hs(n,R,o,l)}),R}function Ys(e,n,o,l,c){var p=o._reactRootContainer;if(p){var x=p;if(typeof c=="function"){var P=c;c=function(){var R=Bs(x);P.call(R)}}Hs(n,x,e,c)}else x=my(o,n,e,c,l);return Bs(x)}$c=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var o=tr(n.pendingLanes);o!==0&&(Ir(n,o|1),vt(n,Ve()),(Pe&6)===0&&(Zr=Ve()+500,Ln()))}break;case 13:fr(function(){var l=hn(e,1);if(l!==null){var c=dt();Bt(l,e,1,c)}}),Eu(e,1)}},Kl=function(e){if(e.tag===13){var n=hn(e,134217728);if(n!==null){var o=dt();Bt(n,e,134217728,o)}Eu(e,134217728)}},Dc=function(e){if(e.tag===13){var n=Vn(e),o=hn(e,n);if(o!==null){var l=dt();Bt(o,e,n,l)}Eu(e,n)}},Oc=function(){return Te},Fc=function(e,n){var o=Te;try{return Te=e,n()}finally{Te=o}},wo=function(e,n,o){switch(n){case"input":if(Re(e,o),n=o.name,o.type==="radio"&&n!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<o.length;n++){var l=o[n];if(l!==e&&l.form===e.form){var c=us(l);if(!c)throw Error(i(90));ve(l),Re(l,c)}}}break;case"textarea":Kt(e,o);break;case"select":n=o.value,n!=null&&rt(e,!!o.multiple,n,!1)}},Ai=yu,$i=fr;var yy={usingClientEntryPoint:!1,Events:[Wo,Or,us,Ri,Li,yu]},oi={findFiberByHostInstance:or,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vy={bundleType:oi.bundleType,version:oi.version,rendererPackageName:oi.rendererPackageName,rendererConfig:oi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Oi(e),e===null?null:e.stateNode},findFiberByHostInstance:oi.findFiberByHostInstance||gy,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 Xs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xs.isDisabled&&Xs.supportsFiber)try{Mr=Xs.inject(vy),kt=Xs}catch{}}return xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yy,xt.createPortal=function(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cu(n))throw Error(i(200));return hy(e,n,null,o)},xt.createRoot=function(e,n){if(!Cu(e))throw Error(i(299));var o=!1,l="",c=rp;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onRecoverableError!==void 0&&(c=n.onRecoverableError)),n=_u(e,1,!1,null,null,o,!1,l,c),e[cn]=n.current,Vo(e.nodeType===8?e.parentNode:e),new Nu(n)},xt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(i(188)):(e=Object.keys(e).join(","),Error(i(268,e)));return e=Oi(n),e=e===null?null:e.stateNode,e},xt.flushSync=function(e){return fr(e)},xt.hydrate=function(e,n,o){if(!Us(n))throw Error(i(200));return Ys(null,e,n,!0,o)},xt.hydrateRoot=function(e,n,o){if(!Cu(e))throw Error(i(405));var l=o!=null&&o.hydratedSources||null,c=!1,p="",x=rp;if(o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),n=tp(n,null,e,1,o??null,c,!1,p,x),e[cn]=n.current,Vo(e),l)for(e=0;e<l.length;e++)o=l[e],c=o._getVersion,c=c(o._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[o,c]:n.mutableSourceEagerHydrationData.push(o,c);return new Ws(n)},xt.render=function(e,n,o){if(!Us(n))throw Error(i(200));return Ys(null,e,n,!1,o)},xt.unmountComponentAtNode=function(e){if(!Us(e))throw Error(i(40));return e._reactRootContainer?(fr(function(){Ys(null,null,e,!1,function(){e._reactRootContainer=null,e[cn]=null})}),!0):!1},xt.unstable_batchedUpdates=yu,xt.unstable_renderSubtreeIntoContainer=function(e,n,o,l){if(!Us(o))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return Ys(e,n,o,!1,l)},xt.version="18.3.1-next-f1338f8080-20240426",xt}var fp;function Ah(){if(fp)return Pu.exports;fp=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),Pu.exports=Cy(),Pu.exports}var pp;function by(){if(pp)return Gs;pp=1;var t=Ah();return Gs.createRoot=t.createRoot,Gs.hydrateRoot=t.hydrateRoot,Gs}var My=by();/**
|
|
41
|
-
* @license lucide-react v0.468.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 Py=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),$h=(...t)=>t.filter((r,i,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===i).join(" ").trim();/**
|
|
46
|
-
* @license lucide-react v0.468.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
|
-
*/var zy={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"};/**
|
|
51
|
-
* @license lucide-react v0.468.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 Iy=X.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:s,className:a="",children:u,iconNode:d,...f},h)=>X.createElement("svg",{ref:h,...zy,width:r,height:r,stroke:t,strokeWidth:s?Number(i)*24/Number(r):i,className:$h("lucide",a),...f},[...d.map(([m,v])=>X.createElement(m,v)),...Array.isArray(u)?u:[u]]));/**
|
|
56
|
-
* @license lucide-react v0.468.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 at=(t,r)=>{const i=X.forwardRef(({className:s,...a},u)=>X.createElement(Iy,{ref:u,iconNode:r,className:$h(`lucide-${Py(t)}`,s),...a}));return i.displayName=`${t}`,i};/**
|
|
61
|
-
* @license lucide-react v0.468.0 - ISC
|
|
62
|
-
*
|
|
63
|
-
* This source code is licensed under the ISC license.
|
|
64
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
65
|
-
*/const Ty=at("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
|
|
66
|
-
* @license lucide-react v0.468.0 - ISC
|
|
67
|
-
*
|
|
68
|
-
* This source code is licensed under the ISC license.
|
|
69
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const jy=at("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/**
|
|
71
|
-
* @license lucide-react v0.468.0 - ISC
|
|
72
|
-
*
|
|
73
|
-
* This source code is licensed under the ISC license.
|
|
74
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
75
|
-
*/const Ry=at("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
76
|
-
* @license lucide-react v0.468.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const Ly=at("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
81
|
-
* @license lucide-react v0.468.0 - ISC
|
|
82
|
-
*
|
|
83
|
-
* This source code is licensed under the ISC license.
|
|
84
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const Ay=at("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
|
|
86
|
-
* @license lucide-react v0.468.0 - ISC
|
|
87
|
-
*
|
|
88
|
-
* This source code is licensed under the ISC license.
|
|
89
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
-
*/const $y=at("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
91
|
-
* @license lucide-react v0.468.0 - ISC
|
|
92
|
-
*
|
|
93
|
-
* This source code is licensed under the ISC license.
|
|
94
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/const Dy=at("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
96
|
-
* @license lucide-react v0.468.0 - ISC
|
|
97
|
-
*
|
|
98
|
-
* This source code is licensed under the ISC license.
|
|
99
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
-
*/const Oy=at("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
|
|
101
|
-
* @license lucide-react v0.468.0 - ISC
|
|
102
|
-
*
|
|
103
|
-
* This source code is licensed under the ISC license.
|
|
104
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
-
*/const Fy=at("LibraryBig",[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]]);/**
|
|
106
|
-
* @license lucide-react v0.468.0 - ISC
|
|
107
|
-
*
|
|
108
|
-
* This source code is licensed under the ISC license.
|
|
109
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const Vy=at("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/**
|
|
111
|
-
* @license lucide-react v0.468.0 - ISC
|
|
112
|
-
*
|
|
113
|
-
* This source code is licensed under the ISC license.
|
|
114
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
-
*/const Hy=at("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
|
|
116
|
-
* @license lucide-react v0.468.0 - ISC
|
|
117
|
-
*
|
|
118
|
-
* This source code is licensed under the ISC license.
|
|
119
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const By=at("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/**
|
|
121
|
-
* @license lucide-react v0.468.0 - ISC
|
|
122
|
-
*
|
|
123
|
-
* This source code is licensed under the ISC license.
|
|
124
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
-
*/const Wy=at("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
|
|
126
|
-
* @license lucide-react v0.468.0 - ISC
|
|
127
|
-
*
|
|
128
|
-
* This source code is licensed under the ISC license.
|
|
129
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
-
*/const Uy=at("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/**
|
|
131
|
-
* @license lucide-react v0.468.0 - ISC
|
|
132
|
-
*
|
|
133
|
-
* This source code is licensed under the ISC license.
|
|
134
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const Yy=at("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
136
|
-
* @license lucide-react v0.468.0 - ISC
|
|
137
|
-
*
|
|
138
|
-
* This source code is licensed under the ISC license.
|
|
139
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
-
*/const Xy=at("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),Gy=new TextDecoder,Tu={encode:t=>JSON.stringify(t),decode:t=>JSON.parse(typeof t=="string"?t:Gy.decode(t))},Qy="superline.inspector.v1";function qy(t){const r=t.WebSocket??globalThis.WebSocket;if(!r)throw new Error("No WebSocket implementation found; pass opts.WebSocket");const i=r,s=t.reconnect??!0,a=new Set,u=new Set,d=new Map;let f,h=1,m=!1,v="connecting",g;function y(k){v=k;for(const E of u)E(k)}function w(){y("connecting"),f=new i(t.url,Qy),f.binaryType="arraybuffer",f.onopen=()=>{y("open"),f.send(Tu.encode({t:"sub",i:h++,c:"events"}))},f.onmessage=k=>S(k.data),f.onclose=()=>{for(const[,k]of d)k.reject(new Error("Inspector disconnected"));if(d.clear(),m||!s){y("closed");return}y("closed"),g=setTimeout(w,1e3)},f.onerror=()=>{}}function S(k){let E;try{E=Tu.decode(typeof k=="string"?k:new Uint8Array(k))}catch{return}if(E.t==="pub"&&E.c==="events"){for(const N of a)N(E.d);return}if(E.i===void 0)return;const I=d.get(E.i);I&&(d.delete(E.i),E.t==="res"?I.resolve(E.d):E.t==="err"&&I.reject(new Error(E.code??"INSPECTOR_ERROR")))}function C(k,E){return new Promise((I,N)=>{if(v!=="open"){N(new Error("Inspector not connected"));return}const M=h++;d.set(M,{resolve:I,reject:N}),f.send(Tu.encode({t:"req",i:M,m:k,d:E}))})}return w(),{getContract:()=>C("getContract"),getTopology:()=>C("getTopology"),listConnections:()=>C("listConnections"),getNode:()=>C("getNode"),getConn:k=>C("getConn",{id:k}),onEvent(k){return a.add(k),()=>a.delete(k)},onStatus(k){return u.add(k),k(v),()=>u.delete(k)},close(){m=!0,g&&clearTimeout(g),f==null||f.close()}}}function Ky(t){const[r,i]=X.useState(null),[s,a]=X.useState("connecting");return X.useEffect(()=>{if(!t)return;const u=qy({url:t});i(u);const d=u.onStatus(a);return()=>{d(),u.close(),i(null)}},[t]),{client:r,status:s}}function Dh(t){var r,i,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(r=0;r<a;r++)t[r]&&(i=Dh(t[r]))&&(s&&(s+=" "),s+=i)}else for(i in t)t[i]&&(s&&(s+=" "),s+=i);return s}function Oh(){for(var t,r,i=0,s="",a=arguments.length;i<a;i++)(t=arguments[i])&&(r=Dh(t))&&(s&&(s+=" "),s+=r);return s}const hp=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,gp=Oh,Fh=(t,r)=>i=>{var s;if((r==null?void 0:r.variants)==null)return gp(t,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:a,defaultVariants:u}=r,d=Object.keys(a).map(m=>{const v=i==null?void 0:i[m],g=u==null?void 0:u[m];if(v===null)return null;const y=hp(v)||hp(g);return a[m][y]}),f=i&&Object.entries(i).reduce((m,v)=>{let[g,y]=v;return y===void 0||(m[g]=y),m},{}),h=r==null||(s=r.compoundVariants)===null||s===void 0?void 0:s.reduce((m,v)=>{let{class:g,className:y,...w}=v;return Object.entries(w).every(S=>{let[C,k]=S;return Array.isArray(k)?k.includes({...u,...f}[C]):{...u,...f}[C]===k})?[...m,g,y]:m},[]);return gp(t,d,h,i==null?void 0:i.class,i==null?void 0:i.className)},cc="-",Zy=t=>{const r=ev(t),{conflictingClassGroups:i,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:d=>{const f=d.split(cc);return f[0]===""&&f.length!==1&&f.shift(),Vh(f,r)||Jy(d)},getConflictingClassGroupIds:(d,f)=>{const h=i[d]||[];return f&&s[d]?[...h,...s[d]]:h}}},Vh=(t,r)=>{var d;if(t.length===0)return r.classGroupId;const i=t[0],s=r.nextPart.get(i),a=s?Vh(t.slice(1),s):void 0;if(a)return a;if(r.validators.length===0)return;const u=t.join(cc);return(d=r.validators.find(({validator:f})=>f(u)))==null?void 0:d.classGroupId},mp=/^\[(.+)\]$/,Jy=t=>{if(mp.test(t)){const r=mp.exec(t)[1],i=r==null?void 0:r.substring(0,r.indexOf(":"));if(i)return"arbitrary.."+i}},ev=t=>{const{theme:r,prefix:i}=t,s={nextPart:new Map,validators:[]};return nv(Object.entries(t.classGroups),i).forEach(([u,d])=>{Qu(d,s,u,r)}),s},Qu=(t,r,i,s)=>{t.forEach(a=>{if(typeof a=="string"){const u=a===""?r:yp(r,a);u.classGroupId=i;return}if(typeof a=="function"){if(tv(a)){Qu(a(s),r,i,s);return}r.validators.push({validator:a,classGroupId:i});return}Object.entries(a).forEach(([u,d])=>{Qu(d,yp(r,u),i,s)})})},yp=(t,r)=>{let i=t;return r.split(cc).forEach(s=>{i.nextPart.has(s)||i.nextPart.set(s,{nextPart:new Map,validators:[]}),i=i.nextPart.get(s)}),i},tv=t=>t.isThemeGetter,nv=(t,r)=>r?t.map(([i,s])=>{const a=s.map(u=>typeof u=="string"?r+u:typeof u=="object"?Object.fromEntries(Object.entries(u).map(([d,f])=>[r+d,f])):u);return[i,a]}):t,rv=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,i=new Map,s=new Map;const a=(u,d)=>{i.set(u,d),r++,r>t&&(r=0,s=i,i=new Map)};return{get(u){let d=i.get(u);if(d!==void 0)return d;if((d=s.get(u))!==void 0)return a(u,d),d},set(u,d){i.has(u)?i.set(u,d):a(u,d)}}},Hh="!",ov=t=>{const{separator:r,experimentalParseClassName:i}=t,s=r.length===1,a=r[0],u=r.length,d=f=>{const h=[];let m=0,v=0,g;for(let k=0;k<f.length;k++){let E=f[k];if(m===0){if(E===a&&(s||f.slice(k,k+u)===r)){h.push(f.slice(v,k)),v=k+u;continue}if(E==="/"){g=k;continue}}E==="["?m++:E==="]"&&m--}const y=h.length===0?f:f.substring(v),w=y.startsWith(Hh),S=w?y.substring(1):y,C=g&&g>v?g-v:void 0;return{modifiers:h,hasImportantModifier:w,baseClassName:S,maybePostfixModifierPosition:C}};return i?f=>i({className:f,parseClassName:d}):d},iv=t=>{if(t.length<=1)return t;const r=[];let i=[];return t.forEach(s=>{s[0]==="["?(r.push(...i.sort(),s),i=[]):i.push(s)}),r.push(...i.sort()),r},sv=t=>({cache:rv(t.cacheSize),parseClassName:ov(t),...Zy(t)}),lv=/\s+/,av=(t,r)=>{const{parseClassName:i,getClassGroupId:s,getConflictingClassGroupIds:a}=r,u=[],d=t.trim().split(lv);let f="";for(let h=d.length-1;h>=0;h-=1){const m=d[h],{modifiers:v,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:w}=i(m);let S=!!w,C=s(S?y.substring(0,w):y);if(!C){if(!S){f=m+(f.length>0?" "+f:f);continue}if(C=s(y),!C){f=m+(f.length>0?" "+f:f);continue}S=!1}const k=iv(v).join(":"),E=g?k+Hh:k,I=E+C;if(u.includes(I))continue;u.push(I);const N=a(C,S);for(let M=0;M<N.length;++M){const F=N[M];u.push(E+F)}f=m+(f.length>0?" "+f:f)}return f};function uv(){let t=0,r,i,s="";for(;t<arguments.length;)(r=arguments[t++])&&(i=Bh(r))&&(s&&(s+=" "),s+=i);return s}const Bh=t=>{if(typeof t=="string")return t;let r,i="";for(let s=0;s<t.length;s++)t[s]&&(r=Bh(t[s]))&&(i&&(i+=" "),i+=r);return i};function cv(t,...r){let i,s,a,u=d;function d(h){const m=r.reduce((v,g)=>g(v),t());return i=sv(m),s=i.cache.get,a=i.cache.set,u=f,f(h)}function f(h){const m=s(h);if(m)return m;const v=av(h,i);return a(h,v),v}return function(){return u(uv.apply(null,arguments))}}const $e=t=>{const r=i=>i[t]||[];return r.isThemeGetter=!0,r},Wh=/^\[(?:([a-z-]+):)?(.+)\]$/i,dv=/^\d+\/\d+$/,fv=new Set(["px","full","screen"]),pv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,hv=/\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$/,gv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vn=t=>ro(t)||fv.has(t)||dv.test(t),Un=t=>ho(t,"length",Nv),ro=t=>!!t&&!Number.isNaN(Number(t)),ju=t=>ho(t,"number",ro),si=t=>!!t&&Number.isInteger(Number(t)),vv=t=>t.endsWith("%")&&ro(t.slice(0,-1)),Ne=t=>Wh.test(t),Yn=t=>pv.test(t),xv=new Set(["length","size","percentage"]),wv=t=>ho(t,xv,Uh),Sv=t=>ho(t,"position",Uh),kv=new Set(["image","url"]),_v=t=>ho(t,kv,bv),Ev=t=>ho(t,"",Cv),li=()=>!0,ho=(t,r,i)=>{const s=Wh.exec(t);return s?s[1]?typeof r=="string"?s[1]===r:r.has(s[1]):i(s[2]):!1},Nv=t=>hv.test(t)&&!gv.test(t),Uh=()=>!1,Cv=t=>mv.test(t),bv=t=>yv.test(t),Mv=()=>{const t=$e("colors"),r=$e("spacing"),i=$e("blur"),s=$e("brightness"),a=$e("borderColor"),u=$e("borderRadius"),d=$e("borderSpacing"),f=$e("borderWidth"),h=$e("contrast"),m=$e("grayscale"),v=$e("hueRotate"),g=$e("invert"),y=$e("gap"),w=$e("gradientColorStops"),S=$e("gradientColorStopPositions"),C=$e("inset"),k=$e("margin"),E=$e("opacity"),I=$e("padding"),N=$e("saturate"),M=$e("scale"),F=$e("sepia"),A=$e("skew"),B=$e("space"),G=$e("translate"),q=()=>["auto","contain","none"],ee=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",Ne,r],V=()=>[Ne,r],J=()=>["",vn,Un],z=()=>["auto",ro,Ne],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],O=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],L=()=>["start","end","center","between","around","evenly","stretch"],T=()=>["","0",Ne],H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>[ro,Ne];return{cacheSize:500,separator:":",theme:{colors:[li],spacing:[vn,Un],blur:["none","",Yn,Ne],brightness:b(),borderColor:[t],borderRadius:["none","","full",Yn,Ne],borderSpacing:V(),borderWidth:J(),contrast:b(),grayscale:T(),hueRotate:b(),invert:T(),gap:V(),gradientColorStops:[t],gradientColorStopPositions:[vv,Un],inset:D(),margin:D(),opacity:b(),padding:V(),saturate:b(),scale:b(),sepia:T(),skew:b(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Ne]}],container:["container"],columns:[{columns:[Yn]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"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"],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:[...U(),Ne]}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[C]}],"inset-x":[{"inset-x":[C]}],"inset-y":[{"inset-y":[C]}],start:[{start:[C]}],end:[{end:[C]}],top:[{top:[C]}],right:[{right:[C]}],bottom:[{bottom:[C]}],left:[{left:[C]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",si,Ne]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ne]}],grow:[{grow:T()}],shrink:[{shrink:T()}],order:[{order:["first","last","none",si,Ne]}],"grid-cols":[{"grid-cols":[li]}],"col-start-end":[{col:["auto",{span:["full",si,Ne]},Ne]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[li]}],"row-start-end":[{row:["auto",{span:[si,Ne]},Ne]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ne]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ne]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...L()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...L(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...L(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ne,r]}],"min-w":[{"min-w":[Ne,r,"min","max","fit"]}],"max-w":[{"max-w":[Ne,r,"none","full","min","max","fit","prose",{screen:[Yn]},Yn]}],h:[{h:[Ne,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ne,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ne,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ne,r,"auto","min","max","fit"]}],"font-size":[{text:["base",Yn,Un]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ju]}],"font-family":[{font:[li]}],"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:["tighter","tight","normal","wide","wider","widest",Ne]}],"line-clamp":[{"line-clamp":["none",ro,ju]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",vn,Ne]}],"list-image":[{"list-image":["none",Ne]}],"list-style-type":[{list:["none","disc","decimal",Ne]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...O(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vn,Un]}],"underline-offset":[{"underline-offset":["auto",vn,Ne]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),Sv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_v]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[u]}],"rounded-s":[{"rounded-s":[u]}],"rounded-e":[{"rounded-e":[u]}],"rounded-t":[{"rounded-t":[u]}],"rounded-r":[{"rounded-r":[u]}],"rounded-b":[{"rounded-b":[u]}],"rounded-l":[{"rounded-l":[u]}],"rounded-ss":[{"rounded-ss":[u]}],"rounded-se":[{"rounded-se":[u]}],"rounded-ee":[{"rounded-ee":[u]}],"rounded-es":[{"rounded-es":[u]}],"rounded-tl":[{"rounded-tl":[u]}],"rounded-tr":[{"rounded-tr":[u]}],"rounded-br":[{"rounded-br":[u]}],"rounded-bl":[{"rounded-bl":[u]}],"border-w":[{border:[f]}],"border-w-x":[{"border-x":[f]}],"border-w-y":[{"border-y":[f]}],"border-w-s":[{"border-s":[f]}],"border-w-e":[{"border-e":[f]}],"border-w-t":[{"border-t":[f]}],"border-w-r":[{"border-r":[f]}],"border-w-b":[{"border-b":[f]}],"border-w-l":[{"border-l":[f]}],"border-opacity":[{"border-opacity":[E]}],"border-style":[{border:[...O(),"hidden"]}],"divide-x":[{"divide-x":[f]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[f]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[E]}],"divide-style":[{divide:O()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...O()]}],"outline-offset":[{"outline-offset":[vn,Ne]}],"outline-w":[{outline:[vn,Un]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[vn,Un]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Yn,Ev]}],"shadow-color":[{shadow:[li]}],opacity:[{opacity:[E]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[s]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",Yn,Ne]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[g]}],saturate:[{saturate:[N]}],sepia:[{sepia:[F]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ne]}],duration:[{duration:b()}],ease:[{ease:["linear","in","out","in-out",Ne]}],delay:[{delay:b()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ne]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[M]}],"scale-x":[{"scale-x":[M]}],"scale-y":[{"scale-y":[M]}],rotate:[{rotate:[si,Ne]}],"translate-x":[{"translate-x":[G]}],"translate-y":[{"translate-y":[G]}],"skew-x":[{"skew-x":[A]}],"skew-y":[{"skew-y":[A]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ne]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],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",Ne]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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",Ne]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[vn,Un,ju]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"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-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-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"],"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"]}}},Pv=cv(Mv);function tt(...t){return Pv(Oh(t))}const zv=Fh("inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium",{variants:{variant:{default:"border-transparent bg-primary/15 text-primary",secondary:"border-transparent bg-secondary text-secondary-foreground",outline:"text-foreground",muted:"border-transparent bg-muted text-muted-foreground"}},defaultVariants:{variant:"default"}});function vp({className:t,variant:r,...i}){return _.jsx("span",{className:tt(zv({variant:r}),t),...i})}function Xe(t){if(typeof t=="string"||typeof t=="number")return""+t;let r="";if(Array.isArray(t))for(let i=0,s;i<t.length;i++)(s=Xe(t[i]))!==""&&(r+=(r&&" ")+s);else for(let i in t)t[i]&&(r+=(r&&" ")+i);return r}var Iv={value:()=>{}};function _l(){for(var t=0,r=arguments.length,i={},s;t<r;++t){if(!(s=arguments[t]+"")||s in i||/[\s.]/.test(s))throw new Error("illegal type: "+s);i[s]=[]}return new ll(i)}function ll(t){this._=t}function Tv(t,r){return t.trim().split(/^|\s+/).map(function(i){var s="",a=i.indexOf(".");if(a>=0&&(s=i.slice(a+1),i=i.slice(0,a)),i&&!r.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:s}})}ll.prototype=_l.prototype={constructor:ll,on:function(t,r){var i=this._,s=Tv(t+"",i),a,u=-1,d=s.length;if(arguments.length<2){for(;++u<d;)if((a=(t=s[u]).type)&&(a=jv(i[a],t.name)))return a;return}if(r!=null&&typeof r!="function")throw new Error("invalid callback: "+r);for(;++u<d;)if(a=(t=s[u]).type)i[a]=xp(i[a],t.name,r);else if(r==null)for(a in i)i[a]=xp(i[a],t.name,null);return this},copy:function(){var t={},r=this._;for(var i in r)t[i]=r[i].slice();return new ll(t)},call:function(t,r){if((a=arguments.length-2)>0)for(var i=new Array(a),s=0,a,u;s<a;++s)i[s]=arguments[s+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(u=this._[t],s=0,a=u.length;s<a;++s)u[s].value.apply(r,i)},apply:function(t,r,i){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var s=this._[t],a=0,u=s.length;a<u;++a)s[a].value.apply(r,i)}};function jv(t,r){for(var i=0,s=t.length,a;i<s;++i)if((a=t[i]).name===r)return a.value}function xp(t,r,i){for(var s=0,a=t.length;s<a;++s)if(t[s].name===r){t[s]=Iv,t=t.slice(0,s).concat(t.slice(s+1));break}return i!=null&&t.push({name:r,value:i}),t}var qu="http://www.w3.org/1999/xhtml";const wp={svg:"http://www.w3.org/2000/svg",xhtml:qu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function El(t){var r=t+="",i=r.indexOf(":");return i>=0&&(r=t.slice(0,i))!=="xmlns"&&(t=t.slice(i+1)),wp.hasOwnProperty(r)?{space:wp[r],local:t}:t}function Rv(t){return function(){var r=this.ownerDocument,i=this.namespaceURI;return i===qu&&r.documentElement.namespaceURI===qu?r.createElement(t):r.createElementNS(i,t)}}function Lv(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Yh(t){var r=El(t);return(r.local?Lv:Rv)(r)}function Av(){}function dc(t){return t==null?Av:function(){return this.querySelector(t)}}function $v(t){typeof t!="function"&&(t=dc(t));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var u=r[a],d=u.length,f=s[a]=new Array(d),h,m,v=0;v<d;++v)(h=u[v])&&(m=t.call(h,h.__data__,v,u))&&("__data__"in h&&(m.__data__=h.__data__),f[v]=m);return new Pt(s,this._parents)}function Dv(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Ov(){return[]}function Xh(t){return t==null?Ov:function(){return this.querySelectorAll(t)}}function Fv(t){return function(){return Dv(t.apply(this,arguments))}}function Vv(t){typeof t=="function"?t=Fv(t):t=Xh(t);for(var r=this._groups,i=r.length,s=[],a=[],u=0;u<i;++u)for(var d=r[u],f=d.length,h,m=0;m<f;++m)(h=d[m])&&(s.push(t.call(h,h.__data__,m,d)),a.push(h));return new Pt(s,a)}function Gh(t){return function(){return this.matches(t)}}function Qh(t){return function(r){return r.matches(t)}}var Hv=Array.prototype.find;function Bv(t){return function(){return Hv.call(this.children,t)}}function Wv(){return this.firstElementChild}function Uv(t){return this.select(t==null?Wv:Bv(typeof t=="function"?t:Qh(t)))}var Yv=Array.prototype.filter;function Xv(){return Array.from(this.children)}function Gv(t){return function(){return Yv.call(this.children,t)}}function Qv(t){return this.selectAll(t==null?Xv:Gv(typeof t=="function"?t:Qh(t)))}function qv(t){typeof t!="function"&&(t=Gh(t));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var u=r[a],d=u.length,f=s[a]=[],h,m=0;m<d;++m)(h=u[m])&&t.call(h,h.__data__,m,u)&&f.push(h);return new Pt(s,this._parents)}function qh(t){return new Array(t.length)}function Kv(){return new Pt(this._enter||this._groups.map(qh),this._parents)}function fl(t,r){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=r}fl.prototype={constructor:fl,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,r){return this._parent.insertBefore(t,r)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function Zv(t){return function(){return t}}function Jv(t,r,i,s,a,u){for(var d=0,f,h=r.length,m=u.length;d<m;++d)(f=r[d])?(f.__data__=u[d],s[d]=f):i[d]=new fl(t,u[d]);for(;d<h;++d)(f=r[d])&&(a[d]=f)}function ex(t,r,i,s,a,u,d){var f,h,m=new Map,v=r.length,g=u.length,y=new Array(v),w;for(f=0;f<v;++f)(h=r[f])&&(y[f]=w=d.call(h,h.__data__,f,r)+"",m.has(w)?a[f]=h:m.set(w,h));for(f=0;f<g;++f)w=d.call(t,u[f],f,u)+"",(h=m.get(w))?(s[f]=h,h.__data__=u[f],m.delete(w)):i[f]=new fl(t,u[f]);for(f=0;f<v;++f)(h=r[f])&&m.get(y[f])===h&&(a[f]=h)}function tx(t){return t.__data__}function nx(t,r){if(!arguments.length)return Array.from(this,tx);var i=r?ex:Jv,s=this._parents,a=this._groups;typeof t!="function"&&(t=Zv(t));for(var u=a.length,d=new Array(u),f=new Array(u),h=new Array(u),m=0;m<u;++m){var v=s[m],g=a[m],y=g.length,w=rx(t.call(v,v&&v.__data__,m,s)),S=w.length,C=f[m]=new Array(S),k=d[m]=new Array(S),E=h[m]=new Array(y);i(v,g,C,k,E,w,r);for(var I=0,N=0,M,F;I<S;++I)if(M=C[I]){for(I>=N&&(N=I+1);!(F=k[N])&&++N<S;);M._next=F||null}}return d=new Pt(d,s),d._enter=f,d._exit=h,d}function rx(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function ox(){return new Pt(this._exit||this._groups.map(qh),this._parents)}function ix(t,r,i){var s=this.enter(),a=this,u=this.exit();return typeof t=="function"?(s=t(s),s&&(s=s.selection())):s=s.append(t+""),r!=null&&(a=r(a),a&&(a=a.selection())),i==null?u.remove():i(u),s&&a?s.merge(a).order():a}function sx(t){for(var r=t.selection?t.selection():t,i=this._groups,s=r._groups,a=i.length,u=s.length,d=Math.min(a,u),f=new Array(a),h=0;h<d;++h)for(var m=i[h],v=s[h],g=m.length,y=f[h]=new Array(g),w,S=0;S<g;++S)(w=m[S]||v[S])&&(y[S]=w);for(;h<a;++h)f[h]=i[h];return new Pt(f,this._parents)}function lx(){for(var t=this._groups,r=-1,i=t.length;++r<i;)for(var s=t[r],a=s.length-1,u=s[a],d;--a>=0;)(d=s[a])&&(u&&d.compareDocumentPosition(u)^4&&u.parentNode.insertBefore(d,u),u=d);return this}function ax(t){t||(t=ux);function r(g,y){return g&&y?t(g.__data__,y.__data__):!g-!y}for(var i=this._groups,s=i.length,a=new Array(s),u=0;u<s;++u){for(var d=i[u],f=d.length,h=a[u]=new Array(f),m,v=0;v<f;++v)(m=d[v])&&(h[v]=m);h.sort(r)}return new Pt(a,this._parents).order()}function ux(t,r){return t<r?-1:t>r?1:t>=r?0:NaN}function cx(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function dx(){return Array.from(this)}function fx(){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,u=s.length;a<u;++a){var d=s[a];if(d)return d}return null}function px(){let t=0;for(const r of this)++t;return t}function hx(){return!this.node()}function gx(t){for(var r=this._groups,i=0,s=r.length;i<s;++i)for(var a=r[i],u=0,d=a.length,f;u<d;++u)(f=a[u])&&t.call(f,f.__data__,u,a);return this}function mx(t){return function(){this.removeAttribute(t)}}function yx(t){return function(){this.removeAttributeNS(t.space,t.local)}}function vx(t,r){return function(){this.setAttribute(t,r)}}function xx(t,r){return function(){this.setAttributeNS(t.space,t.local,r)}}function wx(t,r){return function(){var i=r.apply(this,arguments);i==null?this.removeAttribute(t):this.setAttribute(t,i)}}function Sx(t,r){return function(){var i=r.apply(this,arguments);i==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,i)}}function kx(t,r){var i=El(t);if(arguments.length<2){var s=this.node();return i.local?s.getAttributeNS(i.space,i.local):s.getAttribute(i)}return this.each((r==null?i.local?yx:mx:typeof r=="function"?i.local?Sx:wx:i.local?xx:vx)(i,r))}function Kh(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function _x(t){return function(){this.style.removeProperty(t)}}function Ex(t,r,i){return function(){this.style.setProperty(t,r,i)}}function Nx(t,r,i){return function(){var s=r.apply(this,arguments);s==null?this.style.removeProperty(t):this.style.setProperty(t,s,i)}}function Cx(t,r,i){return arguments.length>1?this.each((r==null?_x:typeof r=="function"?Nx:Ex)(t,r,i??"")):so(this.node(),t)}function so(t,r){return t.style.getPropertyValue(r)||Kh(t).getComputedStyle(t,null).getPropertyValue(r)}function bx(t){return function(){delete this[t]}}function Mx(t,r){return function(){this[t]=r}}function Px(t,r){return function(){var i=r.apply(this,arguments);i==null?delete this[t]:this[t]=i}}function zx(t,r){return arguments.length>1?this.each((r==null?bx:typeof r=="function"?Px:Mx)(t,r)):this.node()[t]}function Zh(t){return t.trim().split(/^|\s+/)}function fc(t){return t.classList||new Jh(t)}function Jh(t){this._node=t,this._names=Zh(t.getAttribute("class")||"")}Jh.prototype={add:function(t){var r=this._names.indexOf(t);r<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var r=this._names.indexOf(t);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function eg(t,r){for(var i=fc(t),s=-1,a=r.length;++s<a;)i.add(r[s])}function tg(t,r){for(var i=fc(t),s=-1,a=r.length;++s<a;)i.remove(r[s])}function Ix(t){return function(){eg(this,t)}}function Tx(t){return function(){tg(this,t)}}function jx(t,r){return function(){(r.apply(this,arguments)?eg:tg)(this,t)}}function Rx(t,r){var i=Zh(t+"");if(arguments.length<2){for(var s=fc(this.node()),a=-1,u=i.length;++a<u;)if(!s.contains(i[a]))return!1;return!0}return this.each((typeof r=="function"?jx:r?Ix:Tx)(i,r))}function Lx(){this.textContent=""}function Ax(t){return function(){this.textContent=t}}function $x(t){return function(){var r=t.apply(this,arguments);this.textContent=r??""}}function Dx(t){return arguments.length?this.each(t==null?Lx:(typeof t=="function"?$x:Ax)(t)):this.node().textContent}function Ox(){this.innerHTML=""}function Fx(t){return function(){this.innerHTML=t}}function Vx(t){return function(){var r=t.apply(this,arguments);this.innerHTML=r??""}}function Hx(t){return arguments.length?this.each(t==null?Ox:(typeof t=="function"?Vx:Fx)(t)):this.node().innerHTML}function Bx(){this.nextSibling&&this.parentNode.appendChild(this)}function Wx(){return this.each(Bx)}function Ux(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Yx(){return this.each(Ux)}function Xx(t){var r=typeof t=="function"?t:Yh(t);return this.select(function(){return this.appendChild(r.apply(this,arguments))})}function Gx(){return null}function Qx(t,r){var i=typeof t=="function"?t:Yh(t),s=r==null?Gx:typeof r=="function"?r:dc(r);return this.select(function(){return this.insertBefore(i.apply(this,arguments),s.apply(this,arguments)||null)})}function qx(){var t=this.parentNode;t&&t.removeChild(this)}function Kx(){return this.each(qx)}function Zx(){var t=this.cloneNode(!1),r=this.parentNode;return r?r.insertBefore(t,this.nextSibling):t}function Jx(){var t=this.cloneNode(!0),r=this.parentNode;return r?r.insertBefore(t,this.nextSibling):t}function e1(t){return this.select(t?Jx:Zx)}function t1(t){return arguments.length?this.property("__data__",t):this.node().__data__}function n1(t){return function(r){t.call(this,r,this.__data__)}}function r1(t){return t.trim().split(/^|\s+/).map(function(r){var i="",s=r.indexOf(".");return s>=0&&(i=r.slice(s+1),r=r.slice(0,s)),{type:r,name:i}})}function o1(t){return function(){var r=this.__on;if(r){for(var i=0,s=-1,a=r.length,u;i<a;++i)u=r[i],(!t.type||u.type===t.type)&&u.name===t.name?this.removeEventListener(u.type,u.listener,u.options):r[++s]=u;++s?r.length=s:delete this.__on}}}function i1(t,r,i){return function(){var s=this.__on,a,u=n1(r);if(s){for(var d=0,f=s.length;d<f;++d)if((a=s[d]).type===t.type&&a.name===t.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=u,a.options=i),a.value=r;return}}this.addEventListener(t.type,u,i),a={type:t.type,name:t.name,value:r,listener:u,options:i},s?s.push(a):this.__on=[a]}}function s1(t,r,i){var s=r1(t+""),a,u=s.length,d;if(arguments.length<2){var f=this.node().__on;if(f){for(var h=0,m=f.length,v;h<m;++h)for(a=0,v=f[h];a<u;++a)if((d=s[a]).type===v.type&&d.name===v.name)return v.value}return}for(f=r?i1:o1,a=0;a<u;++a)this.each(f(s[a],r,i));return this}function ng(t,r,i){var s=Kh(t),a=s.CustomEvent;typeof a=="function"?a=new a(r,i):(a=s.document.createEvent("Event"),i?(a.initEvent(r,i.bubbles,i.cancelable),a.detail=i.detail):a.initEvent(r,!1,!1)),t.dispatchEvent(a)}function l1(t,r){return function(){return ng(this,t,r)}}function a1(t,r){return function(){return ng(this,t,r.apply(this,arguments))}}function u1(t,r){return this.each((typeof r=="function"?a1:l1)(t,r))}function*c1(){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var s=t[r],a=0,u=s.length,d;a<u;++a)(d=s[a])&&(yield d)}var rg=[null];function Pt(t,r){this._groups=t,this._parents=r}function Ni(){return new Pt([[document.documentElement]],rg)}function d1(){return this}Pt.prototype=Ni.prototype={constructor:Pt,select:$v,selectAll:Vv,selectChild:Uv,selectChildren:Qv,filter:qv,data:nx,enter:Kv,exit:ox,join:ix,merge:sx,selection:d1,order:lx,sort:ax,call:cx,nodes:dx,node:fx,size:px,empty:hx,each:gx,attr:kx,style:Cx,property:zx,classed:Rx,text:Dx,html:Hx,raise:Wx,lower:Yx,append:Xx,insert:Qx,remove:Kx,clone:e1,datum:t1,on:s1,dispatch:u1,[Symbol.iterator]:c1};function Mt(t){return typeof t=="string"?new Pt([[document.querySelector(t)]],[document.documentElement]):new Pt([[t]],rg)}function f1(t){let r;for(;r=t.sourceEvent;)t=r;return t}function Wt(t,r){if(t=f1(t),r===void 0&&(r=t.currentTarget),r){var i=r.ownerSVGElement||r;if(i.createSVGPoint){var s=i.createSVGPoint();return s.x=t.clientX,s.y=t.clientY,s=s.matrixTransform(r.getScreenCTM().inverse()),[s.x,s.y]}if(r.getBoundingClientRect){var a=r.getBoundingClientRect();return[t.clientX-a.left-r.clientLeft,t.clientY-a.top-r.clientTop]}}return[t.pageX,t.pageY]}const p1={passive:!1},gi={capture:!0,passive:!1};function Ru(t){t.stopImmediatePropagation()}function oo(t){t.preventDefault(),t.stopImmediatePropagation()}function og(t){var r=t.document.documentElement,i=Mt(t).on("dragstart.drag",oo,gi);"onselectstart"in r?i.on("selectstart.drag",oo,gi):(r.__noselect=r.style.MozUserSelect,r.style.MozUserSelect="none")}function ig(t,r){var i=t.document.documentElement,s=Mt(t).on("dragstart.drag",null);r&&(s.on("click.drag",oo,gi),setTimeout(function(){s.on("click.drag",null)},0)),"onselectstart"in i?s.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const Qs=t=>()=>t;function Ku(t,{sourceEvent:r,subject:i,target:s,identifier:a,active:u,x:d,y:f,dx:h,dy:m,dispatch:v}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:s,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:u,enumerable:!0,configurable:!0},x:{value:d,enumerable:!0,configurable:!0},y:{value:f,enumerable:!0,configurable:!0},dx:{value:h,enumerable:!0,configurable:!0},dy:{value:m,enumerable:!0,configurable:!0},_:{value:v}})}Ku.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function h1(t){return!t.ctrlKey&&!t.button}function g1(){return this.parentNode}function m1(t,r){return r??{x:t.x,y:t.y}}function y1(){return navigator.maxTouchPoints||"ontouchstart"in this}function sg(){var t=h1,r=g1,i=m1,s=y1,a={},u=_l("start","drag","end"),d=0,f,h,m,v,g=0;function y(M){M.on("mousedown.drag",w).filter(s).on("touchstart.drag",k).on("touchmove.drag",E,p1).on("touchend.drag touchcancel.drag",I).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(M,F){if(!(v||!t.call(this,M,F))){var A=N(this,r.call(this,M,F),M,F,"mouse");A&&(Mt(M.view).on("mousemove.drag",S,gi).on("mouseup.drag",C,gi),og(M.view),Ru(M),m=!1,f=M.clientX,h=M.clientY,A("start",M))}}function S(M){if(oo(M),!m){var F=M.clientX-f,A=M.clientY-h;m=F*F+A*A>g}a.mouse("drag",M)}function C(M){Mt(M.view).on("mousemove.drag mouseup.drag",null),ig(M.view,m),oo(M),a.mouse("end",M)}function k(M,F){if(t.call(this,M,F)){var A=M.changedTouches,B=r.call(this,M,F),G=A.length,q,ee;for(q=0;q<G;++q)(ee=N(this,B,M,F,A[q].identifier,A[q]))&&(Ru(M),ee("start",M,A[q]))}}function E(M){var F=M.changedTouches,A=F.length,B,G;for(B=0;B<A;++B)(G=a[F[B].identifier])&&(oo(M),G("drag",M,F[B]))}function I(M){var F=M.changedTouches,A=F.length,B,G;for(v&&clearTimeout(v),v=setTimeout(function(){v=null},500),B=0;B<A;++B)(G=a[F[B].identifier])&&(Ru(M),G("end",M,F[B]))}function N(M,F,A,B,G,q){var ee=u.copy(),D=Wt(q||A,F),V,J,z;if((z=i.call(M,new Ku("beforestart",{sourceEvent:A,target:y,identifier:G,active:d,x:D[0],y:D[1],dx:0,dy:0,dispatch:ee}),B))!=null)return V=z.x-D[0]||0,J=z.y-D[1]||0,function U(O,W,L){var T=D,H;switch(O){case"start":a[G]=U,H=d++;break;case"end":delete a[G],--d;case"drag":D=Wt(L||W,F),H=d;break}ee.call(O,M,new Ku(O,{sourceEvent:W,subject:z,target:y,identifier:G,active:H,x:D[0]+V,y:D[1]+J,dx:D[0]-T[0],dy:D[1]-T[1],dispatch:ee}),B)}}return y.filter=function(M){return arguments.length?(t=typeof M=="function"?M:Qs(!!M),y):t},y.container=function(M){return arguments.length?(r=typeof M=="function"?M:Qs(M),y):r},y.subject=function(M){return arguments.length?(i=typeof M=="function"?M:Qs(M),y):i},y.touchable=function(M){return arguments.length?(s=typeof M=="function"?M:Qs(!!M),y):s},y.on=function(){var M=u.on.apply(u,arguments);return M===u?y:M},y.clickDistance=function(M){return arguments.length?(g=(M=+M)*M,y):Math.sqrt(g)},y}function pc(t,r,i){t.prototype=r.prototype=i,i.constructor=t}function lg(t,r){var i=Object.create(t.prototype);for(var s in r)i[s]=r[s];return i}function Ci(){}var mi=.7,pl=1/mi,io="\\s*([+-]?\\d+)\\s*",yi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",on="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",v1=/^#([0-9a-f]{3,8})$/,x1=new RegExp(`^rgb\\(${io},${io},${io}\\)$`),w1=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),S1=new RegExp(`^rgba\\(${io},${io},${io},${yi}\\)$`),k1=new RegExp(`^rgba\\(${on},${on},${on},${yi}\\)$`),_1=new RegExp(`^hsl\\(${yi},${on},${on}\\)$`),E1=new RegExp(`^hsla\\(${yi},${on},${on},${yi}\\)$`),Sp={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};pc(Ci,wr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:kp,formatHex:kp,formatHex8:N1,formatHsl:C1,formatRgb:_p,toString:_p});function kp(){return this.rgb().formatHex()}function N1(){return this.rgb().formatHex8()}function C1(){return ag(this).formatHsl()}function _p(){return this.rgb().formatRgb()}function wr(t){var r,i;return t=(t+"").trim().toLowerCase(),(r=v1.exec(t))?(i=r[1].length,r=parseInt(r[1],16),i===6?Ep(r):i===3?new wt(r>>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):i===8?qs(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):i===4?qs(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=x1.exec(t))?new wt(r[1],r[2],r[3],1):(r=w1.exec(t))?new wt(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=S1.exec(t))?qs(r[1],r[2],r[3],r[4]):(r=k1.exec(t))?qs(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=_1.exec(t))?bp(r[1],r[2]/100,r[3]/100,1):(r=E1.exec(t))?bp(r[1],r[2]/100,r[3]/100,r[4]):Sp.hasOwnProperty(t)?Ep(Sp[t]):t==="transparent"?new wt(NaN,NaN,NaN,0):null}function Ep(t){return new wt(t>>16&255,t>>8&255,t&255,1)}function qs(t,r,i,s){return s<=0&&(t=r=i=NaN),new wt(t,r,i,s)}function b1(t){return t instanceof Ci||(t=wr(t)),t?(t=t.rgb(),new wt(t.r,t.g,t.b,t.opacity)):new wt}function Zu(t,r,i,s){return arguments.length===1?b1(t):new wt(t,r,i,s??1)}function wt(t,r,i,s){this.r=+t,this.g=+r,this.b=+i,this.opacity=+s}pc(wt,Zu,lg(Ci,{brighter(t){return t=t==null?pl:Math.pow(pl,t),new wt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?mi:Math.pow(mi,t),new wt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new wt(vr(this.r),vr(this.g),vr(this.b),hl(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:Np,formatHex:Np,formatHex8:M1,formatRgb:Cp,toString:Cp}));function Np(){return`#${yr(this.r)}${yr(this.g)}${yr(this.b)}`}function M1(){return`#${yr(this.r)}${yr(this.g)}${yr(this.b)}${yr((isNaN(this.opacity)?1:this.opacity)*255)}`}function Cp(){const t=hl(this.opacity);return`${t===1?"rgb(":"rgba("}${vr(this.r)}, ${vr(this.g)}, ${vr(this.b)}${t===1?")":`, ${t})`}`}function hl(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function vr(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function yr(t){return t=vr(t),(t<16?"0":"")+t.toString(16)}function bp(t,r,i,s){return s<=0?t=r=i=NaN:i<=0||i>=1?t=r=NaN:r<=0&&(t=NaN),new Ut(t,r,i,s)}function ag(t){if(t instanceof Ut)return new Ut(t.h,t.s,t.l,t.opacity);if(t instanceof Ci||(t=wr(t)),!t)return new Ut;if(t instanceof Ut)return t;t=t.rgb();var r=t.r/255,i=t.g/255,s=t.b/255,a=Math.min(r,i,s),u=Math.max(r,i,s),d=NaN,f=u-a,h=(u+a)/2;return f?(r===u?d=(i-s)/f+(i<s)*6:i===u?d=(s-r)/f+2:d=(r-i)/f+4,f/=h<.5?u+a:2-u-a,d*=60):f=h>0&&h<1?0:d,new Ut(d,f,h,t.opacity)}function P1(t,r,i,s){return arguments.length===1?ag(t):new Ut(t,r,i,s??1)}function Ut(t,r,i,s){this.h=+t,this.s=+r,this.l=+i,this.opacity=+s}pc(Ut,P1,lg(Ci,{brighter(t){return t=t==null?pl:Math.pow(pl,t),new Ut(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?mi:Math.pow(mi,t),new Ut(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,r=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,s=i+(i<.5?i:1-i)*r,a=2*i-s;return new wt(Lu(t>=240?t-240:t+120,a,s),Lu(t,a,s),Lu(t<120?t+240:t-120,a,s),this.opacity)},clamp(){return new Ut(Mp(this.h),Ks(this.s),Ks(this.l),hl(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 t=hl(this.opacity);return`${t===1?"hsl(":"hsla("}${Mp(this.h)}, ${Ks(this.s)*100}%, ${Ks(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Mp(t){return t=(t||0)%360,t<0?t+360:t}function Ks(t){return Math.max(0,Math.min(1,t||0))}function Lu(t,r,i){return(t<60?r+(i-r)*t/60:t<180?i:t<240?r+(i-r)*(240-t)/60:r)*255}const hc=t=>()=>t;function z1(t,r){return function(i){return t+i*r}}function I1(t,r,i){return t=Math.pow(t,i),r=Math.pow(r,i)-t,i=1/i,function(s){return Math.pow(t+s*r,i)}}function T1(t){return(t=+t)==1?ug:function(r,i){return i-r?I1(r,i,t):hc(isNaN(r)?i:r)}}function ug(t,r){var i=r-t;return i?z1(t,i):hc(isNaN(t)?r:t)}const gl=(function t(r){var i=T1(r);function s(a,u){var d=i((a=Zu(a)).r,(u=Zu(u)).r),f=i(a.g,u.g),h=i(a.b,u.b),m=ug(a.opacity,u.opacity);return function(v){return a.r=d(v),a.g=f(v),a.b=h(v),a.opacity=m(v),a+""}}return s.gamma=t,s})(1);function j1(t,r){r||(r=[]);var i=t?Math.min(r.length,t.length):0,s=r.slice(),a;return function(u){for(a=0;a<i;++a)s[a]=t[a]*(1-u)+r[a]*u;return s}}function R1(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function L1(t,r){var i=r?r.length:0,s=t?Math.min(i,t.length):0,a=new Array(s),u=new Array(i),d;for(d=0;d<s;++d)a[d]=fi(t[d],r[d]);for(;d<i;++d)u[d]=r[d];return function(f){for(d=0;d<s;++d)u[d]=a[d](f);return u}}function A1(t,r){var i=new Date;return t=+t,r=+r,function(s){return i.setTime(t*(1-s)+r*s),i}}function rn(t,r){return t=+t,r=+r,function(i){return t*(1-i)+r*i}}function $1(t,r){var i={},s={},a;(t===null||typeof t!="object")&&(t={}),(r===null||typeof r!="object")&&(r={});for(a in r)a in t?i[a]=fi(t[a],r[a]):s[a]=r[a];return function(u){for(a in i)s[a]=i[a](u);return s}}var Ju=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Au=new RegExp(Ju.source,"g");function D1(t){return function(){return t}}function O1(t){return function(r){return t(r)+""}}function cg(t,r){var i=Ju.lastIndex=Au.lastIndex=0,s,a,u,d=-1,f=[],h=[];for(t=t+"",r=r+"";(s=Ju.exec(t))&&(a=Au.exec(r));)(u=a.index)>i&&(u=r.slice(i,u),f[d]?f[d]+=u:f[++d]=u),(s=s[0])===(a=a[0])?f[d]?f[d]+=a:f[++d]=a:(f[++d]=null,h.push({i:d,x:rn(s,a)})),i=Au.lastIndex;return i<r.length&&(u=r.slice(i),f[d]?f[d]+=u:f[++d]=u),f.length<2?h[0]?O1(h[0].x):D1(r):(r=h.length,function(m){for(var v=0,g;v<r;++v)f[(g=h[v]).i]=g.x(m);return f.join("")})}function fi(t,r){var i=typeof r,s;return r==null||i==="boolean"?hc(r):(i==="number"?rn:i==="string"?(s=wr(r))?(r=s,gl):cg:r instanceof wr?gl:r instanceof Date?A1:R1(r)?j1:Array.isArray(r)?L1:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?$1:rn)(t,r)}var Pp=180/Math.PI,ec={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function dg(t,r,i,s,a,u){var d,f,h;return(d=Math.sqrt(t*t+r*r))&&(t/=d,r/=d),(h=t*i+r*s)&&(i-=t*h,s-=r*h),(f=Math.sqrt(i*i+s*s))&&(i/=f,s/=f,h/=f),t*s<r*i&&(t=-t,r=-r,h=-h,d=-d),{translateX:a,translateY:u,rotate:Math.atan2(r,t)*Pp,skewX:Math.atan(h)*Pp,scaleX:d,scaleY:f}}var Zs;function F1(t){const r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return r.isIdentity?ec:dg(r.a,r.b,r.c,r.d,r.e,r.f)}function V1(t){return t==null||(Zs||(Zs=document.createElementNS("http://www.w3.org/2000/svg","g")),Zs.setAttribute("transform",t),!(t=Zs.transform.baseVal.consolidate()))?ec:(t=t.matrix,dg(t.a,t.b,t.c,t.d,t.e,t.f))}function fg(t,r,i,s){function a(m){return m.length?m.pop()+" ":""}function u(m,v,g,y,w,S){if(m!==g||v!==y){var C=w.push("translate(",null,r,null,i);S.push({i:C-4,x:rn(m,g)},{i:C-2,x:rn(v,y)})}else(g||y)&&w.push("translate("+g+r+y+i)}function d(m,v,g,y){m!==v?(m-v>180?v+=360:v-m>180&&(m+=360),y.push({i:g.push(a(g)+"rotate(",null,s)-2,x:rn(m,v)})):v&&g.push(a(g)+"rotate("+v+s)}function f(m,v,g,y){m!==v?y.push({i:g.push(a(g)+"skewX(",null,s)-2,x:rn(m,v)}):v&&g.push(a(g)+"skewX("+v+s)}function h(m,v,g,y,w,S){if(m!==g||v!==y){var C=w.push(a(w)+"scale(",null,",",null,")");S.push({i:C-4,x:rn(m,g)},{i:C-2,x:rn(v,y)})}else(g!==1||y!==1)&&w.push(a(w)+"scale("+g+","+y+")")}return function(m,v){var g=[],y=[];return m=t(m),v=t(v),u(m.translateX,m.translateY,v.translateX,v.translateY,g,y),d(m.rotate,v.rotate,g,y),f(m.skewX,v.skewX,g,y),h(m.scaleX,m.scaleY,v.scaleX,v.scaleY,g,y),m=v=null,function(w){for(var S=-1,C=y.length,k;++S<C;)g[(k=y[S]).i]=k.x(w);return g.join("")}}}var H1=fg(F1,"px, ","px)","deg)"),B1=fg(V1,", ",")",")"),W1=1e-12;function zp(t){return((t=Math.exp(t))+1/t)/2}function U1(t){return((t=Math.exp(t))-1/t)/2}function Y1(t){return((t=Math.exp(2*t))-1)/(t+1)}const al=(function t(r,i,s){function a(u,d){var f=u[0],h=u[1],m=u[2],v=d[0],g=d[1],y=d[2],w=v-f,S=g-h,C=w*w+S*S,k,E;if(C<W1)E=Math.log(y/m)/r,k=function(B){return[f+B*w,h+B*S,m*Math.exp(r*B*E)]};else{var I=Math.sqrt(C),N=(y*y-m*m+s*C)/(2*m*i*I),M=(y*y-m*m-s*C)/(2*y*i*I),F=Math.log(Math.sqrt(N*N+1)-N),A=Math.log(Math.sqrt(M*M+1)-M);E=(A-F)/r,k=function(B){var G=B*E,q=zp(F),ee=m/(i*I)*(q*Y1(r*G+F)-U1(F));return[f+ee*w,h+ee*S,m*q/zp(r*G+F)]}}return k.duration=E*1e3*r/Math.SQRT2,k}return a.rho=function(u){var d=Math.max(.001,+u),f=d*d,h=f*f;return t(d,f,h)},a})(Math.SQRT2,2,4);var lo=0,ci=0,ai=0,pg=1e3,ml,di,yl=0,Sr=0,Nl=0,vi=typeof performance=="object"&&performance.now?performance:Date,hg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function gc(){return Sr||(hg(X1),Sr=vi.now()+Nl)}function X1(){Sr=0}function vl(){this._call=this._time=this._next=null}vl.prototype=gg.prototype={constructor:vl,restart:function(t,r,i){if(typeof t!="function")throw new TypeError("callback is not a function");i=(i==null?gc():+i)+(r==null?0:+r),!this._next&&di!==this&&(di?di._next=this:ml=this,di=this),this._call=t,this._time=i,tc()},stop:function(){this._call&&(this._call=null,this._time=1/0,tc())}};function gg(t,r,i){var s=new vl;return s.restart(t,r,i),s}function G1(){gc(),++lo;for(var t=ml,r;t;)(r=Sr-t._time)>=0&&t._call.call(void 0,r),t=t._next;--lo}function Ip(){Sr=(yl=vi.now())+Nl,lo=ci=0;try{G1()}finally{lo=0,q1(),Sr=0}}function Q1(){var t=vi.now(),r=t-yl;r>pg&&(Nl-=r,yl=t)}function q1(){for(var t,r=ml,i,s=1/0;r;)r._call?(s>r._time&&(s=r._time),t=r,r=r._next):(i=r._next,r._next=null,r=t?t._next=i:ml=i);di=t,tc(s)}function tc(t){if(!lo){ci&&(ci=clearTimeout(ci));var r=t-Sr;r>24?(t<1/0&&(ci=setTimeout(Ip,t-vi.now()-Nl)),ai&&(ai=clearInterval(ai))):(ai||(yl=vi.now(),ai=setInterval(Q1,pg)),lo=1,hg(Ip))}}function Tp(t,r,i){var s=new vl;return r=r==null?0:+r,s.restart(a=>{s.stop(),t(a+r)},r,i),s}var K1=_l("start","end","cancel","interrupt"),Z1=[],mg=0,jp=1,nc=2,ul=3,Rp=4,rc=5,cl=6;function Cl(t,r,i,s,a,u){var d=t.__transition;if(!d)t.__transition={};else if(i in d)return;J1(t,i,{name:r,index:s,group:a,on:K1,tween:Z1,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:mg})}function mc(t,r){var i=Qt(t,r);if(i.state>mg)throw new Error("too late; already scheduled");return i}function sn(t,r){var i=Qt(t,r);if(i.state>ul)throw new Error("too late; already running");return i}function Qt(t,r){var i=t.__transition;if(!i||!(i=i[r]))throw new Error("transition not found");return i}function J1(t,r,i){var s=t.__transition,a;s[r]=i,i.timer=gg(u,0,i.time);function u(m){i.state=jp,i.timer.restart(d,i.delay,i.time),i.delay<=m&&d(m-i.delay)}function d(m){var v,g,y,w;if(i.state!==jp)return h();for(v in s)if(w=s[v],w.name===i.name){if(w.state===ul)return Tp(d);w.state===Rp?(w.state=cl,w.timer.stop(),w.on.call("interrupt",t,t.__data__,w.index,w.group),delete s[v]):+v<r&&(w.state=cl,w.timer.stop(),w.on.call("cancel",t,t.__data__,w.index,w.group),delete s[v])}if(Tp(function(){i.state===ul&&(i.state=Rp,i.timer.restart(f,i.delay,i.time),f(m))}),i.state=nc,i.on.call("start",t,t.__data__,i.index,i.group),i.state===nc){for(i.state=ul,a=new Array(y=i.tween.length),v=0,g=-1;v<y;++v)(w=i.tween[v].value.call(t,t.__data__,i.index,i.group))&&(a[++g]=w);a.length=g+1}}function f(m){for(var v=m<i.duration?i.ease.call(null,m/i.duration):(i.timer.restart(h),i.state=rc,1),g=-1,y=a.length;++g<y;)a[g].call(t,v);i.state===rc&&(i.on.call("end",t,t.__data__,i.index,i.group),h())}function h(){i.state=cl,i.timer.stop(),delete s[r];for(var m in s)return;delete t.__transition}}function dl(t,r){var i=t.__transition,s,a,u=!0,d;if(i){r=r==null?null:r+"";for(d in i){if((s=i[d]).name!==r){u=!1;continue}a=s.state>nc&&s.state<rc,s.state=cl,s.timer.stop(),s.on.call(a?"interrupt":"cancel",t,t.__data__,s.index,s.group),delete i[d]}u&&delete t.__transition}}function ew(t){return this.each(function(){dl(this,t)})}function tw(t,r){var i,s;return function(){var a=sn(this,t),u=a.tween;if(u!==i){s=i=u;for(var d=0,f=s.length;d<f;++d)if(s[d].name===r){s=s.slice(),s.splice(d,1);break}}a.tween=s}}function nw(t,r,i){var s,a;if(typeof i!="function")throw new Error;return function(){var u=sn(this,t),d=u.tween;if(d!==s){a=(s=d).slice();for(var f={name:r,value:i},h=0,m=a.length;h<m;++h)if(a[h].name===r){a[h]=f;break}h===m&&a.push(f)}u.tween=a}}function rw(t,r){var i=this._id;if(t+="",arguments.length<2){for(var s=Qt(this.node(),i).tween,a=0,u=s.length,d;a<u;++a)if((d=s[a]).name===t)return d.value;return null}return this.each((r==null?tw:nw)(i,t,r))}function yc(t,r,i){var s=t._id;return t.each(function(){var a=sn(this,s);(a.value||(a.value={}))[r]=i.apply(this,arguments)}),function(a){return Qt(a,s).value[r]}}function yg(t,r){var i;return(typeof r=="number"?rn:r instanceof wr?gl:(i=wr(r))?(r=i,gl):cg)(t,r)}function ow(t){return function(){this.removeAttribute(t)}}function iw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function sw(t,r,i){var s,a=i+"",u;return function(){var d=this.getAttribute(t);return d===a?null:d===s?u:u=r(s=d,i)}}function lw(t,r,i){var s,a=i+"",u;return function(){var d=this.getAttributeNS(t.space,t.local);return d===a?null:d===s?u:u=r(s=d,i)}}function aw(t,r,i){var s,a,u;return function(){var d,f=i(this),h;return f==null?void this.removeAttribute(t):(d=this.getAttribute(t),h=f+"",d===h?null:d===s&&h===a?u:(a=h,u=r(s=d,f)))}}function uw(t,r,i){var s,a,u;return function(){var d,f=i(this),h;return f==null?void this.removeAttributeNS(t.space,t.local):(d=this.getAttributeNS(t.space,t.local),h=f+"",d===h?null:d===s&&h===a?u:(a=h,u=r(s=d,f)))}}function cw(t,r){var i=El(t),s=i==="transform"?B1:yg;return this.attrTween(t,typeof r=="function"?(i.local?uw:aw)(i,s,yc(this,"attr."+t,r)):r==null?(i.local?iw:ow)(i):(i.local?lw:sw)(i,s,r))}function dw(t,r){return function(i){this.setAttribute(t,r.call(this,i))}}function fw(t,r){return function(i){this.setAttributeNS(t.space,t.local,r.call(this,i))}}function pw(t,r){var i,s;function a(){var u=r.apply(this,arguments);return u!==s&&(i=(s=u)&&fw(t,u)),i}return a._value=r,a}function hw(t,r){var i,s;function a(){var u=r.apply(this,arguments);return u!==s&&(i=(s=u)&&dw(t,u)),i}return a._value=r,a}function gw(t,r){var i="attr."+t;if(arguments.length<2)return(i=this.tween(i))&&i._value;if(r==null)return this.tween(i,null);if(typeof r!="function")throw new Error;var s=El(t);return this.tween(i,(s.local?pw:hw)(s,r))}function mw(t,r){return function(){mc(this,t).delay=+r.apply(this,arguments)}}function yw(t,r){return r=+r,function(){mc(this,t).delay=r}}function vw(t){var r=this._id;return arguments.length?this.each((typeof t=="function"?mw:yw)(r,t)):Qt(this.node(),r).delay}function xw(t,r){return function(){sn(this,t).duration=+r.apply(this,arguments)}}function ww(t,r){return r=+r,function(){sn(this,t).duration=r}}function Sw(t){var r=this._id;return arguments.length?this.each((typeof t=="function"?xw:ww)(r,t)):Qt(this.node(),r).duration}function kw(t,r){if(typeof r!="function")throw new Error;return function(){sn(this,t).ease=r}}function _w(t){var r=this._id;return arguments.length?this.each(kw(r,t)):Qt(this.node(),r).ease}function Ew(t,r){return function(){var i=r.apply(this,arguments);if(typeof i!="function")throw new Error;sn(this,t).ease=i}}function Nw(t){if(typeof t!="function")throw new Error;return this.each(Ew(this._id,t))}function Cw(t){typeof t!="function"&&(t=Gh(t));for(var r=this._groups,i=r.length,s=new Array(i),a=0;a<i;++a)for(var u=r[a],d=u.length,f=s[a]=[],h,m=0;m<d;++m)(h=u[m])&&t.call(h,h.__data__,m,u)&&f.push(h);return new kn(s,this._parents,this._name,this._id)}function bw(t){if(t._id!==this._id)throw new Error;for(var r=this._groups,i=t._groups,s=r.length,a=i.length,u=Math.min(s,a),d=new Array(s),f=0;f<u;++f)for(var h=r[f],m=i[f],v=h.length,g=d[f]=new Array(v),y,w=0;w<v;++w)(y=h[w]||m[w])&&(g[w]=y);for(;f<s;++f)d[f]=r[f];return new kn(d,this._parents,this._name,this._id)}function Mw(t){return(t+"").trim().split(/^|\s+/).every(function(r){var i=r.indexOf(".");return i>=0&&(r=r.slice(0,i)),!r||r==="start"})}function Pw(t,r,i){var s,a,u=Mw(r)?mc:sn;return function(){var d=u(this,t),f=d.on;f!==s&&(a=(s=f).copy()).on(r,i),d.on=a}}function zw(t,r){var i=this._id;return arguments.length<2?Qt(this.node(),i).on.on(t):this.each(Pw(i,t,r))}function Iw(t){return function(){var r=this.parentNode;for(var i in this.__transition)if(+i!==t)return;r&&r.removeChild(this)}}function Tw(){return this.on("end.remove",Iw(this._id))}function jw(t){var r=this._name,i=this._id;typeof t!="function"&&(t=dc(t));for(var s=this._groups,a=s.length,u=new Array(a),d=0;d<a;++d)for(var f=s[d],h=f.length,m=u[d]=new Array(h),v,g,y=0;y<h;++y)(v=f[y])&&(g=t.call(v,v.__data__,y,f))&&("__data__"in v&&(g.__data__=v.__data__),m[y]=g,Cl(m[y],r,i,y,m,Qt(v,i)));return new kn(u,this._parents,r,i)}function Rw(t){var r=this._name,i=this._id;typeof t!="function"&&(t=Xh(t));for(var s=this._groups,a=s.length,u=[],d=[],f=0;f<a;++f)for(var h=s[f],m=h.length,v,g=0;g<m;++g)if(v=h[g]){for(var y=t.call(v,v.__data__,g,h),w,S=Qt(v,i),C=0,k=y.length;C<k;++C)(w=y[C])&&Cl(w,r,i,C,y,S);u.push(y),d.push(v)}return new kn(u,d,r,i)}var Lw=Ni.prototype.constructor;function Aw(){return new Lw(this._groups,this._parents)}function $w(t,r){var i,s,a;return function(){var u=so(this,t),d=(this.style.removeProperty(t),so(this,t));return u===d?null:u===i&&d===s?a:a=r(i=u,s=d)}}function vg(t){return function(){this.style.removeProperty(t)}}function Dw(t,r,i){var s,a=i+"",u;return function(){var d=so(this,t);return d===a?null:d===s?u:u=r(s=d,i)}}function Ow(t,r,i){var s,a,u;return function(){var d=so(this,t),f=i(this),h=f+"";return f==null&&(h=f=(this.style.removeProperty(t),so(this,t))),d===h?null:d===s&&h===a?u:(a=h,u=r(s=d,f))}}function Fw(t,r){var i,s,a,u="style."+r,d="end."+u,f;return function(){var h=sn(this,t),m=h.on,v=h.value[u]==null?f||(f=vg(r)):void 0;(m!==i||a!==v)&&(s=(i=m).copy()).on(d,a=v),h.on=s}}function Vw(t,r,i){var s=(t+="")=="transform"?H1:yg;return r==null?this.styleTween(t,$w(t,s)).on("end.style."+t,vg(t)):typeof r=="function"?this.styleTween(t,Ow(t,s,yc(this,"style."+t,r))).each(Fw(this._id,t)):this.styleTween(t,Dw(t,s,r),i).on("end.style."+t,null)}function Hw(t,r,i){return function(s){this.style.setProperty(t,r.call(this,s),i)}}function Bw(t,r,i){var s,a;function u(){var d=r.apply(this,arguments);return d!==a&&(s=(a=d)&&Hw(t,d,i)),s}return u._value=r,u}function Ww(t,r,i){var s="style."+(t+="");if(arguments.length<2)return(s=this.tween(s))&&s._value;if(r==null)return this.tween(s,null);if(typeof r!="function")throw new Error;return this.tween(s,Bw(t,r,i??""))}function Uw(t){return function(){this.textContent=t}}function Yw(t){return function(){var r=t(this);this.textContent=r??""}}function Xw(t){return this.tween("text",typeof t=="function"?Yw(yc(this,"text",t)):Uw(t==null?"":t+""))}function Gw(t){return function(r){this.textContent=t.call(this,r)}}function Qw(t){var r,i;function s(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Gw(a)),r}return s._value=t,s}function qw(t){var r="text";if(arguments.length<1)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,Qw(t))}function Kw(){for(var t=this._name,r=this._id,i=xg(),s=this._groups,a=s.length,u=0;u<a;++u)for(var d=s[u],f=d.length,h,m=0;m<f;++m)if(h=d[m]){var v=Qt(h,r);Cl(h,t,i,m,d,{time:v.time+v.delay+v.duration,delay:0,duration:v.duration,ease:v.ease})}return new kn(s,this._parents,t,i)}function Zw(){var t,r,i=this,s=i._id,a=i.size();return new Promise(function(u,d){var f={value:d},h={value:function(){--a===0&&u()}};i.each(function(){var m=sn(this,s),v=m.on;v!==t&&(r=(t=v).copy(),r._.cancel.push(f),r._.interrupt.push(f),r._.end.push(h)),m.on=r}),a===0&&u()})}var Jw=0;function kn(t,r,i,s){this._groups=t,this._parents=r,this._name=i,this._id=s}function xg(){return++Jw}var xn=Ni.prototype;kn.prototype={constructor:kn,select:jw,selectAll:Rw,selectChild:xn.selectChild,selectChildren:xn.selectChildren,filter:Cw,merge:bw,selection:Aw,transition:Kw,call:xn.call,nodes:xn.nodes,node:xn.node,size:xn.size,empty:xn.empty,each:xn.each,on:zw,attr:cw,attrTween:gw,style:Vw,styleTween:Ww,text:Xw,textTween:qw,remove:Tw,tween:rw,delay:vw,duration:Sw,ease:_w,easeVarying:Nw,end:Zw,[Symbol.iterator]:xn[Symbol.iterator]};function e2(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var t2={time:null,delay:0,duration:250,ease:e2};function n2(t,r){for(var i;!(i=t.__transition)||!(i=i[r]);)if(!(t=t.parentNode))throw new Error(`transition ${r} not found`);return i}function r2(t){var r,i;t instanceof kn?(r=t._id,t=t._name):(r=xg(),(i=t2).time=gc(),t=t==null?null:t+"");for(var s=this._groups,a=s.length,u=0;u<a;++u)for(var d=s[u],f=d.length,h,m=0;m<f;++m)(h=d[m])&&Cl(h,t,r,m,d,i||n2(h,r));return new kn(s,this._parents,t,r)}Ni.prototype.interrupt=ew;Ni.prototype.transition=r2;const Js=t=>()=>t;function o2(t,{sourceEvent:r,target:i,transform:s,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:s,enumerable:!0,configurable:!0},_:{value:a}})}function Sn(t,r,i){this.k=t,this.x=r,this.y=i}Sn.prototype={constructor:Sn,scale:function(t){return t===1?this:new Sn(this.k*t,this.x,this.y)},translate:function(t,r){return t===0&r===0?this:new Sn(this.k,this.x+this.k*t,this.y+this.k*r)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var bl=new Sn(1,0,0);wg.prototype=Sn.prototype;function wg(t){for(;!t.__zoom;)if(!(t=t.parentNode))return bl;return t.__zoom}function $u(t){t.stopImmediatePropagation()}function ui(t){t.preventDefault(),t.stopImmediatePropagation()}function i2(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function s2(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Lp(){return this.__zoom||bl}function l2(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function a2(){return navigator.maxTouchPoints||"ontouchstart"in this}function u2(t,r,i){var s=t.invertX(r[0][0])-i[0][0],a=t.invertX(r[1][0])-i[1][0],u=t.invertY(r[0][1])-i[0][1],d=t.invertY(r[1][1])-i[1][1];return t.translate(a>s?(s+a)/2:Math.min(0,s)||Math.max(0,a),d>u?(u+d)/2:Math.min(0,u)||Math.max(0,d))}function Sg(){var t=i2,r=s2,i=u2,s=l2,a=a2,u=[0,1/0],d=[[-1/0,-1/0],[1/0,1/0]],f=250,h=al,m=_l("start","zoom","end"),v,g,y,w=500,S=150,C=0,k=10;function E(z){z.property("__zoom",Lp).on("wheel.zoom",G,{passive:!1}).on("mousedown.zoom",q).on("dblclick.zoom",ee).filter(a).on("touchstart.zoom",D).on("touchmove.zoom",V).on("touchend.zoom touchcancel.zoom",J).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(z,U,O,W){var L=z.selection?z.selection():z;L.property("__zoom",Lp),z!==L?F(z,U,O,W):L.interrupt().each(function(){A(this,arguments).event(W).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},E.scaleBy=function(z,U,O,W){E.scaleTo(z,function(){var L=this.__zoom.k,T=typeof U=="function"?U.apply(this,arguments):U;return L*T},O,W)},E.scaleTo=function(z,U,O,W){E.transform(z,function(){var L=r.apply(this,arguments),T=this.__zoom,H=O==null?M(L):typeof O=="function"?O.apply(this,arguments):O,b=T.invert(H),j=typeof U=="function"?U.apply(this,arguments):U;return i(N(I(T,j),H,b),L,d)},O,W)},E.translateBy=function(z,U,O,W){E.transform(z,function(){return i(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof O=="function"?O.apply(this,arguments):O),r.apply(this,arguments),d)},null,W)},E.translateTo=function(z,U,O,W,L){E.transform(z,function(){var T=r.apply(this,arguments),H=this.__zoom,b=W==null?M(T):typeof W=="function"?W.apply(this,arguments):W;return i(bl.translate(b[0],b[1]).scale(H.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof O=="function"?-O.apply(this,arguments):-O),T,d)},W,L)};function I(z,U){return U=Math.max(u[0],Math.min(u[1],U)),U===z.k?z:new Sn(U,z.x,z.y)}function N(z,U,O){var W=U[0]-O[0]*z.k,L=U[1]-O[1]*z.k;return W===z.x&&L===z.y?z:new Sn(z.k,W,L)}function M(z){return[(+z[0][0]+ +z[1][0])/2,(+z[0][1]+ +z[1][1])/2]}function F(z,U,O,W){z.on("start.zoom",function(){A(this,arguments).event(W).start()}).on("interrupt.zoom end.zoom",function(){A(this,arguments).event(W).end()}).tween("zoom",function(){var L=this,T=arguments,H=A(L,T).event(W),b=r.apply(L,T),j=O==null?M(b):typeof O=="function"?O.apply(L,T):O,te=Math.max(b[1][0]-b[0][0],b[1][1]-b[0][1]),oe=L.__zoom,ae=typeof U=="function"?U.apply(L,T):U,ce=h(oe.invert(j).concat(te/oe.k),ae.invert(j).concat(te/ae.k));return function(ue){if(ue===1)ue=ae;else{var Z=ce(ue),se=te/Z[2];ue=new Sn(se,j[0]-Z[0]*se,j[1]-Z[1]*se)}H.zoom(null,ue)}})}function A(z,U,O){return!O&&z.__zooming||new B(z,U)}function B(z,U){this.that=z,this.args=U,this.active=0,this.sourceEvent=null,this.extent=r.apply(z,U),this.taps=0}B.prototype={event:function(z){return z&&(this.sourceEvent=z),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(z,U){return this.mouse&&z!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&z!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&z!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(z){var U=Mt(this.that).datum();m.call(z,this.that,new o2(z,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:m}),U)}};function G(z,...U){if(!t.apply(this,arguments))return;var O=A(this,U).event(z),W=this.__zoom,L=Math.max(u[0],Math.min(u[1],W.k*Math.pow(2,s.apply(this,arguments)))),T=Wt(z);if(O.wheel)(O.mouse[0][0]!==T[0]||O.mouse[0][1]!==T[1])&&(O.mouse[1]=W.invert(O.mouse[0]=T)),clearTimeout(O.wheel);else{if(W.k===L)return;O.mouse=[T,W.invert(T)],dl(this),O.start()}ui(z),O.wheel=setTimeout(H,S),O.zoom("mouse",i(N(I(W,L),O.mouse[0],O.mouse[1]),O.extent,d));function H(){O.wheel=null,O.end()}}function q(z,...U){if(y||!t.apply(this,arguments))return;var O=z.currentTarget,W=A(this,U,!0).event(z),L=Mt(z.view).on("mousemove.zoom",j,!0).on("mouseup.zoom",te,!0),T=Wt(z,O),H=z.clientX,b=z.clientY;og(z.view),$u(z),W.mouse=[T,this.__zoom.invert(T)],dl(this),W.start();function j(oe){if(ui(oe),!W.moved){var ae=oe.clientX-H,ce=oe.clientY-b;W.moved=ae*ae+ce*ce>C}W.event(oe).zoom("mouse",i(N(W.that.__zoom,W.mouse[0]=Wt(oe,O),W.mouse[1]),W.extent,d))}function te(oe){L.on("mousemove.zoom mouseup.zoom",null),ig(oe.view,W.moved),ui(oe),W.event(oe).end()}}function ee(z,...U){if(t.apply(this,arguments)){var O=this.__zoom,W=Wt(z.changedTouches?z.changedTouches[0]:z,this),L=O.invert(W),T=O.k*(z.shiftKey?.5:2),H=i(N(I(O,T),W,L),r.apply(this,U),d);ui(z),f>0?Mt(this).transition().duration(f).call(F,H,W,z):Mt(this).call(E.transform,H,W,z)}}function D(z,...U){if(t.apply(this,arguments)){var O=z.touches,W=O.length,L=A(this,U,z.changedTouches.length===W).event(z),T,H,b,j;for($u(z),H=0;H<W;++H)b=O[H],j=Wt(b,this),j=[j,this.__zoom.invert(j),b.identifier],L.touch0?!L.touch1&&L.touch0[2]!==j[2]&&(L.touch1=j,L.taps=0):(L.touch0=j,T=!0,L.taps=1+!!v);v&&(v=clearTimeout(v)),T&&(L.taps<2&&(g=j[0],v=setTimeout(function(){v=null},w)),dl(this),L.start())}}function V(z,...U){if(this.__zooming){var O=A(this,U).event(z),W=z.changedTouches,L=W.length,T,H,b,j;for(ui(z),T=0;T<L;++T)H=W[T],b=Wt(H,this),O.touch0&&O.touch0[2]===H.identifier?O.touch0[0]=b:O.touch1&&O.touch1[2]===H.identifier&&(O.touch1[0]=b);if(H=O.that.__zoom,O.touch1){var te=O.touch0[0],oe=O.touch0[1],ae=O.touch1[0],ce=O.touch1[1],ue=(ue=ae[0]-te[0])*ue+(ue=ae[1]-te[1])*ue,Z=(Z=ce[0]-oe[0])*Z+(Z=ce[1]-oe[1])*Z;H=I(H,Math.sqrt(ue/Z)),b=[(te[0]+ae[0])/2,(te[1]+ae[1])/2],j=[(oe[0]+ce[0])/2,(oe[1]+ce[1])/2]}else if(O.touch0)b=O.touch0[0],j=O.touch0[1];else return;O.zoom("touch",i(N(H,b,j),O.extent,d))}}function J(z,...U){if(this.__zooming){var O=A(this,U).event(z),W=z.changedTouches,L=W.length,T,H;for($u(z),y&&clearTimeout(y),y=setTimeout(function(){y=null},w),T=0;T<L;++T)H=W[T],O.touch0&&O.touch0[2]===H.identifier?delete O.touch0:O.touch1&&O.touch1[2]===H.identifier&&delete O.touch1;if(O.touch1&&!O.touch0&&(O.touch0=O.touch1,delete O.touch1),O.touch0)O.touch0[1]=this.__zoom.invert(O.touch0[0]);else if(O.end(),O.taps===2&&(H=Wt(H,this),Math.hypot(g[0]-H[0],g[1]-H[1])<k)){var b=Mt(this).on("dblclick.zoom");b&&b.apply(this,arguments)}}}return E.wheelDelta=function(z){return arguments.length?(s=typeof z=="function"?z:Js(+z),E):s},E.filter=function(z){return arguments.length?(t=typeof z=="function"?z:Js(!!z),E):t},E.touchable=function(z){return arguments.length?(a=typeof z=="function"?z:Js(!!z),E):a},E.extent=function(z){return arguments.length?(r=typeof z=="function"?z:Js([[+z[0][0],+z[0][1]],[+z[1][0],+z[1][1]]]),E):r},E.scaleExtent=function(z){return arguments.length?(u[0]=+z[0],u[1]=+z[1],E):[u[0],u[1]]},E.translateExtent=function(z){return arguments.length?(d[0][0]=+z[0][0],d[1][0]=+z[1][0],d[0][1]=+z[0][1],d[1][1]=+z[1][1],E):[[d[0][0],d[0][1]],[d[1][0],d[1][1]]]},E.constrain=function(z){return arguments.length?(i=z,E):i},E.duration=function(z){return arguments.length?(f=+z,E):f},E.interpolate=function(z){return arguments.length?(h=z,E):h},E.on=function(){var z=m.on.apply(m,arguments);return z===m?E:z},E.clickDistance=function(z){return arguments.length?(C=(z=+z)*z,E):Math.sqrt(C)},E.tapDistance=function(z){return arguments.length?(k=+z,E):k},E}const Gt={error001:(t="react")=>`Seems like you have not used zustand provider as an ancestor. Help: https://${t}flow.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:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The 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:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:r,sourceHandle:i,targetHandle:s})=>`Couldn't create edge for ${t} handle id: "${t==="source"?i:s}", edge id: ${r}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/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.",error016:t=>`Edge with id "${t}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},xi=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],kg=["Enter"," ","Escape"],_g={"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:t,x:r,y:i})=>`Moved selected node ${t}. New position, x: ${r}, y: ${i}`,"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 ao;(function(t){t.Strict="strict",t.Loose="loose"})(ao||(ao={}));var xr;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(xr||(xr={}));var wi;(function(t){t.Partial="partial",t.Full="full"})(wi||(wi={}));const Eg={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Qn;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Qn||(Qn={}));var xl;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(xl||(xl={}));var xe;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(xe||(xe={}));const Ap={[xe.Left]:xe.Right,[xe.Right]:xe.Left,[xe.Top]:xe.Bottom,[xe.Bottom]:xe.Top};function Ng(t){return t===null?null:t?"valid":"invalid"}const Cg=t=>"id"in t&&"source"in t&&"target"in t,c2=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),vc=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),bi=(t,r=[0,0])=>{const{width:i,height:s}=_n(t),a=t.origin??r,u=i*a[0],d=s*a[1];return{x:t.position.x-u,y:t.position.y-d}},d2=(t,r={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const i=t.reduce((s,a)=>{const u=typeof a=="string";let d=!r.nodeLookup&&!u?a:void 0;r.nodeLookup&&(d=u?r.nodeLookup.get(a):vc(a)?a:r.nodeLookup.get(a.id));const f=d?wl(d,r.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Ml(s,f)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Pl(i)},Mi=(t,r={})=>{let i={x:1/0,y:1/0,x2:-1/0,y2:-1/0},s=!1;return t.forEach(a=>{(r.filter===void 0||r.filter(a))&&(i=Ml(i,wl(a)),s=!0)}),s?Pl(i):{x:0,y:0,width:0,height:0}},xc=(t,r,[i,s,a]=[0,0,1],u=!1,d=!1)=>{const f={...go(r,[i,s,a]),width:r.width/a,height:r.height/a},h=[];for(const m of t.values()){const{measured:v,selectable:g=!0,hidden:y=!1}=m;if(d&&!g||y)continue;const w=v.width??m.width??m.initialWidth??null,S=v.height??m.height??m.initialHeight??null,C=Si(f,co(m)),k=(w??0)*(S??0),E=u&&C>0;(!m.internals.handleBounds||E||C>=k||m.dragging)&&h.push(m)}return h},f2=(t,r)=>{const i=new Set;return t.forEach(s=>{i.add(s.id)}),r.filter(s=>i.has(s.source)||i.has(s.target))};function p2(t,r){const i=new Map,s=r!=null&&r.nodes?new Set(r.nodes.map(a=>a.id)):null;return t.forEach(a=>{a.measured.width&&a.measured.height&&((r==null?void 0:r.includeHiddenNodes)||!a.hidden)&&(!s||s.has(a.id))&&i.set(a.id,a)}),i}async function h2({nodes:t,width:r,height:i,panZoom:s,minZoom:a,maxZoom:u},d){if(t.size===0)return!0;const f=p2(t,d),h=Mi(f),m=Sc(h,r,i,(d==null?void 0:d.minZoom)??a,(d==null?void 0:d.maxZoom)??u,(d==null?void 0:d.padding)??.1);return await s.setViewport(m,{duration:d==null?void 0:d.duration,ease:d==null?void 0:d.ease,interpolate:d==null?void 0:d.interpolate}),!0}function bg({nodeId:t,nextPosition:r,nodeLookup:i,nodeOrigin:s=[0,0],nodeExtent:a,onError:u}){const d=i.get(t),f=d.parentId?i.get(d.parentId):void 0,{x:h,y:m}=f?f.internals.positionAbsolute:{x:0,y:0},v=d.origin??s;let g=d.extent||a;if(d.extent==="parent"&&!d.expandParent)if(!f)u==null||u("005",Gt.error005());else{const w=f.measured.width,S=f.measured.height;w&&S&&(g=[[h,m],[h+w,m+S]])}else f&&_r(d.extent)&&(g=[[d.extent[0][0]+h,d.extent[0][1]+m],[d.extent[1][0]+h,d.extent[1][1]+m]]);const y=_r(g)?kr(r,g,d.measured):r;return(d.measured.width===void 0||d.measured.height===void 0)&&(u==null||u("015",Gt.error015())),{position:{x:y.x-h+(d.measured.width??0)*v[0],y:y.y-m+(d.measured.height??0)*v[1]},positionAbsolute:y}}async function g2({nodesToRemove:t=[],edgesToRemove:r=[],nodes:i,edges:s,onBeforeDelete:a}){const u=new Set(t.map(y=>y.id)),d=[];for(const y of i){if(y.deletable===!1)continue;const w=u.has(y.id),S=!w&&y.parentId&&d.find(C=>C.id===y.parentId);(w||S)&&d.push(y)}const f=new Set(r.map(y=>y.id)),h=s.filter(y=>y.deletable!==!1),v=f2(d,h);for(const y of h)f.has(y.id)&&!v.find(S=>S.id===y.id)&&v.push(y);if(!a)return{edges:v,nodes:d};const g=await a({nodes:d,edges:v});return typeof g=="boolean"?g?{edges:v,nodes:d}:{edges:[],nodes:[]}:g}const uo=(t,r=0,i=1)=>Math.min(Math.max(t,r),i),kr=(t={x:0,y:0},r,i)=>({x:uo(t.x,r[0][0],r[1][0]-((i==null?void 0:i.width)??0)),y:uo(t.y,r[0][1],r[1][1]-((i==null?void 0:i.height)??0))});function Mg(t,r,i){const{width:s,height:a}=_n(i),{x:u,y:d}=i.internals.positionAbsolute;return kr(t,[[u,d],[u+s,d+a]],r)}const $p=(t,r,i)=>t<r?uo(Math.abs(t-r),1,r)/r:t>i?-uo(Math.abs(t-i),1,r)/r:0,wc=(t,r,i=15,s=40)=>{const a=$p(t.x,s,r.width-s)*i,u=$p(t.y,s,r.height-s)*i;return[a,u]},Ml=(t,r)=>({x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x2,r.x2),y2:Math.max(t.y2,r.y2)}),oc=({x:t,y:r,width:i,height:s})=>({x:t,y:r,x2:t+i,y2:r+s}),Pl=({x:t,y:r,x2:i,y2:s})=>({x:t,y:r,width:i-t,height:s-r}),co=(t,r=[0,0])=>{var a,u;const{x:i,y:s}=vc(t)?t.internals.positionAbsolute:bi(t,r);return{x:i,y:s,width:((a=t.measured)==null?void 0:a.width)??t.width??t.initialWidth??0,height:((u=t.measured)==null?void 0:u.height)??t.height??t.initialHeight??0}},wl=(t,r=[0,0])=>{var a,u;const{x:i,y:s}=vc(t)?t.internals.positionAbsolute:bi(t,r);return{x:i,y:s,x2:i+(((a=t.measured)==null?void 0:a.width)??t.width??t.initialWidth??0),y2:s+(((u=t.measured)==null?void 0:u.height)??t.height??t.initialHeight??0)}},Pg=(t,r)=>Pl(Ml(oc(t),oc(r))),Si=(t,r)=>{const i=Math.max(0,Math.min(t.x+t.width,r.x+r.width)-Math.max(t.x,r.x)),s=Math.max(0,Math.min(t.y+t.height,r.y+r.height)-Math.max(t.y,r.y));return Math.ceil(i*s)},Dp=t=>Yt(t.width)&&Yt(t.height)&&Yt(t.x)&&Yt(t.y),Yt=t=>!isNaN(t)&&isFinite(t),zg=(t,r)=>(i,s)=>{},Pi=(t,r=[1,1])=>({x:r[0]*Math.round(t.x/r[0]),y:r[1]*Math.round(t.y/r[1])}),go=({x:t,y:r},[i,s,a],u=!1,d=[1,1])=>{const f={x:(t-i)/a,y:(r-s)/a};return u?Pi(f,d):f},fo=({x:t,y:r},[i,s,a])=>({x:t*a+i,y:r*a+s});function eo(t,r){if(typeof t=="number")return Math.floor((r-r/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const i=parseFloat(t);if(!Number.isNaN(i))return Math.floor(i)}if(typeof t=="string"&&t.endsWith("%")){const i=parseFloat(t);if(!Number.isNaN(i))return Math.floor(r*i*.01)}return console.error(`The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function m2(t,r,i){if(typeof t=="string"||typeof t=="number"){const s=eo(t,i),a=eo(t,r);return{top:s,right:a,bottom:s,left:a,x:a*2,y:s*2}}if(typeof t=="object"){const s=eo(t.top??t.y??0,i),a=eo(t.bottom??t.y??0,i),u=eo(t.left??t.x??0,r),d=eo(t.right??t.x??0,r);return{top:s,right:d,bottom:a,left:u,x:u+d,y:s+a}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function y2(t,r,i,s,a,u){const{x:d,y:f}=fo(t,[r,i,s]),{x:h,y:m}=fo({x:t.x+t.width,y:t.y+t.height},[r,i,s]),v=a-h,g=u-m;return{left:Math.floor(d),top:Math.floor(f),right:Math.floor(v),bottom:Math.floor(g)}}const Sc=(t,r,i,s,a,u)=>{const d=m2(u,r,i),f=(r-d.x)/t.width,h=(i-d.y)/t.height,m=Math.min(f,h),v=uo(m,s,a),g=t.x+t.width/2,y=t.y+t.height/2,w=r/2-g*v,S=i/2-y*v,C=y2(t,w,S,v,r,i),k={left:Math.min(C.left-d.left,0),top:Math.min(C.top-d.top,0),right:Math.min(C.right-d.right,0),bottom:Math.min(C.bottom-d.bottom,0)};return{x:w-k.left+k.right,y:S-k.top+k.bottom,zoom:v}},ki=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0};function _r(t){return t!=null&&t!=="parent"}function _n(t){var r,i;return{width:((r=t.measured)==null?void 0:r.width)??t.width??t.initialWidth??0,height:((i=t.measured)==null?void 0:i.height)??t.height??t.initialHeight??0}}function Ig(t){var r,i;return(((r=t.measured)==null?void 0:r.width)??t.width??t.initialWidth)!==void 0&&(((i=t.measured)==null?void 0:i.height)??t.height??t.initialHeight)!==void 0}function Tg(t,r={width:0,height:0},i,s,a){const u={...t},d=s.get(i);if(d){const f=d.origin||a;u.x+=d.internals.positionAbsolute.x-(r.width??0)*f[0],u.y+=d.internals.positionAbsolute.y-(r.height??0)*f[1]}return u}function Op(t,r){if(t.size!==r.size)return!1;for(const i of t)if(!r.has(i))return!1;return!0}function v2(){let t,r;return{promise:new Promise((s,a)=>{t=s,r=a}),resolve:t,reject:r}}function x2(t){return{..._g,...t||{}}}function pi(t,{snapGrid:r=[0,0],snapToGrid:i=!1,transform:s,containerBounds:a}){const{x:u,y:d}=Xt(t),f=go({x:u-((a==null?void 0:a.left)??0),y:d-((a==null?void 0:a.top)??0)},s),{x:h,y:m}=i?Pi(f,r):f;return{xSnapped:h,ySnapped:m,...f}}const kc=t=>({width:t.offsetWidth,height:t.offsetHeight}),jg=t=>{var r;return((r=t==null?void 0:t.getRootNode)==null?void 0:r.call(t))||(window==null?void 0:window.document)},w2=["INPUT","SELECT","TEXTAREA"];function Rg(t){var s,a;const r=((a=(s=t.composedPath)==null?void 0:s.call(t))==null?void 0:a[0])||t.target;return(r==null?void 0:r.nodeType)!==1?!1:w2.includes(r.nodeName)||r.hasAttribute("contenteditable")||!!r.closest(".nokey")}const Lg=t=>"clientX"in t,Xt=(t,r)=>{var u,d;const i=Lg(t),s=i?t.clientX:(u=t.touches)==null?void 0:u[0].clientX,a=i?t.clientY:(d=t.touches)==null?void 0:d[0].clientY;return{x:s-((r==null?void 0:r.left)??0),y:a-((r==null?void 0:r.top)??0)}},Fp=(t,r,i,s,a)=>{const u=r.querySelectorAll(`.${t}`);return!u||!u.length?null:Array.from(u).map(d=>{const f=d.getBoundingClientRect();return{id:d.getAttribute("data-handleid"),type:t,nodeId:a,position:d.getAttribute("data-handlepos"),x:(f.left-i.left)/s,y:(f.top-i.top)/s,...kc(d)}})};function Ag({sourceX:t,sourceY:r,targetX:i,targetY:s,sourceControlX:a,sourceControlY:u,targetControlX:d,targetControlY:f}){const h=t*.125+a*.375+d*.375+i*.125,m=r*.125+u*.375+f*.375+s*.125,v=Math.abs(h-t),g=Math.abs(m-r);return[h,m,v,g]}function el(t,r){return t>=0?.5*t:r*25*Math.sqrt(-t)}function Vp({pos:t,x1:r,y1:i,x2:s,y2:a,c:u}){switch(t){case xe.Left:return[r-el(r-s,u),i];case xe.Right:return[r+el(s-r,u),i];case xe.Top:return[r,i-el(i-a,u)];case xe.Bottom:return[r,i+el(a-i,u)]}}function $g({sourceX:t,sourceY:r,sourcePosition:i=xe.Bottom,targetX:s,targetY:a,targetPosition:u=xe.Top,curvature:d=.25}){const[f,h]=Vp({pos:i,x1:t,y1:r,x2:s,y2:a,c:d}),[m,v]=Vp({pos:u,x1:s,y1:a,x2:t,y2:r,c:d}),[g,y,w,S]=Ag({sourceX:t,sourceY:r,targetX:s,targetY:a,sourceControlX:f,sourceControlY:h,targetControlX:m,targetControlY:v});return[`M${t},${r} C${f},${h} ${m},${v} ${s},${a}`,g,y,w,S]}function Dg({sourceX:t,sourceY:r,targetX:i,targetY:s}){const a=Math.abs(i-t)/2,u=i<t?i+a:i-a,d=Math.abs(s-r)/2,f=s<r?s+d:s-d;return[u,f,a,d]}function S2({sourceNode:t,targetNode:r,selected:i=!1,zIndex:s=0,elevateOnSelect:a=!1,zIndexMode:u="basic"}){if(u==="manual")return s;const d=a&&i?s+1e3:s,f=Math.max(t.parentId||a&&t.selected?t.internals.z:0,r.parentId||a&&r.selected?r.internals.z:0);return d+f}function k2({sourceNode:t,targetNode:r,width:i,height:s,transform:a}){const u=Ml(wl(t),wl(r));u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const d={x:-a[0]/a[2],y:-a[1]/a[2],width:i/a[2],height:s/a[2]};return Si(d,Pl(u))>0}const _2=({source:t,sourceHandle:r,target:i,targetHandle:s})=>`xy-edge__${t}${r||""}-${i}${s||""}`,E2=(t,r)=>r.some(i=>i.source===t.source&&i.target===t.target&&(i.sourceHandle===t.sourceHandle||!i.sourceHandle&&!t.sourceHandle)&&(i.targetHandle===t.targetHandle||!i.targetHandle&&!t.targetHandle)),N2=(t,r,i={})=>{var u;if(!t.source||!t.target)return(u=i.onError)==null||u.call(i,"006",Gt.error006()),r;const s=i.getEdgeId||_2;let a;return Cg(t)?a={...t}:a={...t,id:s(t)},E2(a,r)?r:(a.sourceHandle===null&&delete a.sourceHandle,a.targetHandle===null&&delete a.targetHandle,r.concat(a))};function Og({sourceX:t,sourceY:r,targetX:i,targetY:s}){const[a,u,d,f]=Dg({sourceX:t,sourceY:r,targetX:i,targetY:s});return[`M ${t},${r}L ${i},${s}`,a,u,d,f]}const Hp={[xe.Left]:{x:-1,y:0},[xe.Right]:{x:1,y:0},[xe.Top]:{x:0,y:-1},[xe.Bottom]:{x:0,y:1}},C2=({source:t,sourcePosition:r=xe.Bottom,target:i})=>r===xe.Left||r===xe.Right?t.x<i.x?{x:1,y:0}:{x:-1,y:0}:t.y<i.y?{x:0,y:1}:{x:0,y:-1},Bp=(t,r)=>Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2));function b2({source:t,sourcePosition:r=xe.Bottom,target:i,targetPosition:s=xe.Top,center:a,offset:u,stepPosition:d}){const f=Hp[r],h=Hp[s],m={x:t.x+f.x*u,y:t.y+f.y*u},v={x:i.x+h.x*u,y:i.y+h.y*u},g=C2({source:m,sourcePosition:r,target:v}),y=g.x!==0?"x":"y",w=g[y];let S=[],C,k;const E={x:0,y:0},I={x:0,y:0},[,,N,M]=Dg({sourceX:t.x,sourceY:t.y,targetX:i.x,targetY:i.y});if(f[y]*h[y]===-1){y==="x"?(C=a.x??m.x+(v.x-m.x)*d,k=a.y??(m.y+v.y)/2):(C=a.x??(m.x+v.x)/2,k=a.y??m.y+(v.y-m.y)*d);const G=[{x:C,y:m.y},{x:C,y:v.y}],q=[{x:m.x,y:k},{x:v.x,y:k}];f[y]===w?S=y==="x"?G:q:S=y==="x"?q:G}else{const G=[{x:m.x,y:v.y}],q=[{x:v.x,y:m.y}];if(y==="x"?S=f.x===w?q:G:S=f.y===w?G:q,r===s){const z=Math.abs(t[y]-i[y]);if(z<=u){const U=Math.min(u-1,u-z);f[y]===w?E[y]=(m[y]>t[y]?-1:1)*U:I[y]=(v[y]>i[y]?-1:1)*U}}if(r!==s){const z=y==="x"?"y":"x",U=f[y]===h[z],O=m[z]>v[z],W=m[z]<v[z];(f[y]===1&&(!U&&O||U&&W)||f[y]!==1&&(!U&&W||U&&O))&&(S=y==="x"?G:q)}const ee={x:m.x+E.x,y:m.y+E.y},D={x:v.x+I.x,y:v.y+I.y},V=Math.max(Math.abs(ee.x-S[0].x),Math.abs(D.x-S[0].x)),J=Math.max(Math.abs(ee.y-S[0].y),Math.abs(D.y-S[0].y));V>=J?(C=(ee.x+D.x)/2,k=S[0].y):(C=S[0].x,k=(ee.y+D.y)/2)}const F={x:m.x+E.x,y:m.y+E.y},A={x:v.x+I.x,y:v.y+I.y};return[[t,...F.x!==S[0].x||F.y!==S[0].y?[F]:[],...S,...A.x!==S[S.length-1].x||A.y!==S[S.length-1].y?[A]:[],i],C,k,N,M]}function M2(t,r,i,s){const a=Math.min(Bp(t,r)/2,Bp(r,i)/2,s),{x:u,y:d}=r;if(t.x===u&&u===i.x||t.y===d&&d===i.y)return`L${u} ${d}`;if(t.y===d){const m=t.x<i.x?-1:1,v=t.y<i.y?1:-1;return`L ${u+a*m},${d}Q ${u},${d} ${u},${d+a*v}`}const f=t.x<i.x?1:-1,h=t.y<i.y?-1:1;return`L ${u},${d+a*h}Q ${u},${d} ${u+a*f},${d}`}function ic({sourceX:t,sourceY:r,sourcePosition:i=xe.Bottom,targetX:s,targetY:a,targetPosition:u=xe.Top,borderRadius:d=5,centerX:f,centerY:h,offset:m=20,stepPosition:v=.5}){const[g,y,w,S,C]=b2({source:{x:t,y:r},sourcePosition:i,target:{x:s,y:a},targetPosition:u,center:{x:f,y:h},offset:m,stepPosition:v});let k=`M${g[0].x} ${g[0].y}`;for(let E=1;E<g.length-1;E++)k+=M2(g[E-1],g[E],g[E+1],d);return k+=`L${g[g.length-1].x} ${g[g.length-1].y}`,[k,y,w,S,C]}function Wp(t){var r;return t&&!!(t.internals.handleBounds||(r=t.handles)!=null&&r.length)&&!!(t.measured.width||t.width||t.initialWidth)}function P2(t){var g;const{sourceNode:r,targetNode:i}=t;if(!Wp(r)||!Wp(i))return null;const s=r.internals.handleBounds||Up(r.handles),a=i.internals.handleBounds||Up(i.handles),u=Yp((s==null?void 0:s.source)??[],t.sourceHandle),d=Yp(t.connectionMode===ao.Strict?(a==null?void 0:a.target)??[]:((a==null?void 0:a.target)??[]).concat((a==null?void 0:a.source)??[]),t.targetHandle);if(!u||!d)return(g=t.onError)==null||g.call(t,"008",Gt.error008(u?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const f=(u==null?void 0:u.position)||xe.Bottom,h=(d==null?void 0:d.position)||xe.Top,m=Er(r,u,f),v=Er(i,d,h);return{sourceX:m.x,sourceY:m.y,targetX:v.x,targetY:v.y,sourcePosition:f,targetPosition:h}}function Up(t){if(!t)return null;const r=[],i=[];for(const s of t)s.width=s.width??1,s.height=s.height??1,s.type==="source"?r.push(s):s.type==="target"&&i.push(s);return{source:r,target:i}}function Er(t,r,i=xe.Left,s=!1){const a=((r==null?void 0:r.x)??0)+t.internals.positionAbsolute.x,u=((r==null?void 0:r.y)??0)+t.internals.positionAbsolute.y,{width:d,height:f}=r??_n(t);if(s)return{x:a+d/2,y:u+f/2};switch((r==null?void 0:r.position)??i){case xe.Top:return{x:a+d/2,y:u};case xe.Right:return{x:a+d,y:u+f/2};case xe.Bottom:return{x:a+d/2,y:u+f};case xe.Left:return{x:a,y:u+f/2}}}function Yp(t,r){return t&&(r?t.find(i=>i.id===r):t[0])||null}function sc(t,r){return t?typeof t=="string"?t:`${r?`${r}__`:""}${Object.keys(t).sort().map(s=>`${s}=${t[s]}`).join("&")}`:""}function z2(t,{id:r,defaultColor:i,defaultMarkerStart:s,defaultMarkerEnd:a}){const u=new Set;return t.reduce((d,f)=>([f.markerStart||s,f.markerEnd||a].forEach(h=>{if(h&&typeof h=="object"){const m=sc(h,r);u.has(m)||(d.push({id:m,color:h.color||i,...h}),u.add(m))}}),d),[]).sort((d,f)=>d.id.localeCompare(f.id))}const Fg=1e3,I2=10,_c={nodeOrigin:[0,0],nodeExtent:xi,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},T2={..._c,checkEquality:!0};function Ec(t,r){const i={...t};for(const s in r)r[s]!==void 0&&(i[s]=r[s]);return i}function j2(t,r,i){const s=Ec(_c,i);for(const a of t.values())if(a.parentId)Cc(a,t,r,s);else{const u=bi(a,s.nodeOrigin),d=_r(a.extent)?a.extent:s.nodeExtent,f=kr(u,d,_n(a));a.internals.positionAbsolute=f}}function R2(t,r){if(!t.handles)return t.measured?r==null?void 0:r.internals.handleBounds:void 0;const i=[],s=[];for(const a of t.handles){const u={id:a.id,width:a.width??1,height:a.height??1,nodeId:t.id,x:a.x,y:a.y,position:a.position,type:a.type};a.type==="source"?i.push(u):a.type==="target"&&s.push(u)}return{source:i,target:s}}function Nc(t){return t==="manual"}function lc(t,r,i,s={}){var v,g;const a=Ec(T2,s),u={i:0},d=new Map(r),f=a!=null&&a.elevateNodesOnSelect&&!Nc(a.zIndexMode)?Fg:0;let h=t.length>0,m=!1;r.clear(),i.clear();for(const y of t){let w=d.get(y.id);if(a.checkEquality&&y===(w==null?void 0:w.internals.userNode))r.set(y.id,w);else{const S=bi(y,a.nodeOrigin),C=_r(y.extent)?y.extent:a.nodeExtent,k=kr(S,C,_n(y));w={...a.defaults,...y,measured:{width:(v=y.measured)==null?void 0:v.width,height:(g=y.measured)==null?void 0:g.height},internals:{positionAbsolute:k,handleBounds:R2(y,w),z:Vg(y,f,a.zIndexMode),userNode:y}},r.set(y.id,w)}(w.measured===void 0||w.measured.width===void 0||w.measured.height===void 0)&&!w.hidden&&(h=!1),y.parentId&&Cc(w,r,i,s,u),m||(m=y.selected??!1)}return{nodesInitialized:h,hasSelectedNodes:m}}function L2(t,r){if(!t.parentId)return;const i=r.get(t.parentId);i?i.set(t.id,t):r.set(t.parentId,new Map([[t.id,t]]))}function Cc(t,r,i,s,a){const{elevateNodesOnSelect:u,nodeOrigin:d,nodeExtent:f,zIndexMode:h}=Ec(_c,s),m=t.parentId,v=r.get(m);if(!v){console.warn(`Parent node ${m} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}L2(t,i),a&&!v.parentId&&v.internals.rootParentIndex===void 0&&h==="auto"&&(v.internals.rootParentIndex=++a.i,v.internals.z=v.internals.z+a.i*I2),a&&v.internals.rootParentIndex!==void 0&&(a.i=v.internals.rootParentIndex);const g=u&&!Nc(h)?Fg:0,{x:y,y:w,z:S}=A2(t,v,d,f,g,h),{positionAbsolute:C}=t.internals,k=y!==C.x||w!==C.y;(k||S!==t.internals.z)&&r.set(t.id,{...t,internals:{...t.internals,positionAbsolute:k?{x:y,y:w}:C,z:S}})}function Vg(t,r,i){const s=Yt(t.zIndex)?t.zIndex:0;return Nc(i)?s:s+(t.selected?r:0)}function A2(t,r,i,s,a,u){const{x:d,y:f}=r.internals.positionAbsolute,h=_n(t),m=bi(t,i),v=_r(t.extent)?kr(m,t.extent,h):m;let g=kr({x:d+v.x,y:f+v.y},s,h);t.extent==="parent"&&(g=Mg(g,h,r));const y=Vg(t,a,u),w=r.internals.z??0;return{x:g.x,y:g.y,z:w>=y?w+1:y}}function bc(t,r,i,s=[0,0]){var d;const a=[],u=new Map;for(const f of t){const h=r.get(f.parentId);if(!h)continue;const m=((d=u.get(f.parentId))==null?void 0:d.expandedRect)??co(h),v=Pg(m,f.rect);u.set(f.parentId,{expandedRect:v,parent:h})}return u.size>0&&u.forEach(({expandedRect:f,parent:h},m)=>{var N;const v=h.internals.positionAbsolute,g=_n(h),y=h.origin??s,w=f.x<v.x?Math.round(Math.abs(v.x-f.x)):0,S=f.y<v.y?Math.round(Math.abs(v.y-f.y)):0,C=Math.max(g.width,Math.round(f.width)),k=Math.max(g.height,Math.round(f.height)),E=(C-g.width)*y[0],I=(k-g.height)*y[1];(w>0||S>0||E||I)&&(a.push({id:m,type:"position",position:{x:h.position.x-w+E,y:h.position.y-S+I}}),(N=i.get(m))==null||N.forEach(M=>{t.some(F=>F.id===M.id)||a.push({id:M.id,type:"position",position:{x:M.position.x+w,y:M.position.y+S}})})),(g.width<f.width||g.height<f.height||w||S)&&a.push({id:m,type:"dimensions",setAttributes:!0,dimensions:{width:C+(w?y[0]*w-E:0),height:k+(S?y[1]*S-I:0)}})}),a}function $2(t,r,i,s,a,u,d){const f=s==null?void 0:s.querySelector(".xyflow__viewport");let h=!1;if(!f)return{changes:[],updatedInternals:h};const m=[],v=window.getComputedStyle(f),{m22:g}=new window.DOMMatrixReadOnly(v.transform),y=[];for(const w of t.values()){const S=r.get(w.id);if(!S)continue;if(S.hidden){r.set(S.id,{...S,internals:{...S.internals,handleBounds:void 0}}),h=!0;continue}const C=kc(w.nodeElement),k=S.measured.width!==C.width||S.measured.height!==C.height;if(!!(C.width&&C.height&&(k||!S.internals.handleBounds||w.force))){const I=w.nodeElement.getBoundingClientRect(),N=_r(S.extent)?S.extent:u;let{positionAbsolute:M}=S.internals;S.parentId&&S.extent==="parent"?M=Mg(M,C,r.get(S.parentId)):N&&(M=kr(M,N,C));const F={...S,measured:C,internals:{...S.internals,positionAbsolute:M,handleBounds:{source:Fp("source",w.nodeElement,I,g,S.id),target:Fp("target",w.nodeElement,I,g,S.id)}}};r.set(S.id,F),S.parentId&&Cc(F,r,i,{nodeOrigin:a,zIndexMode:d}),h=!0,k&&(m.push({id:S.id,type:"dimensions",dimensions:C}),S.expandParent&&S.parentId&&y.push({id:S.id,parentId:S.parentId,rect:co(F,a)}))}}if(y.length>0){const w=bc(y,r,i,a);m.push(...w)}return{changes:m,updatedInternals:h}}async function D2({delta:t,panZoom:r,transform:i,translateExtent:s,width:a,height:u}){if(!r||!t.x&&!t.y)return!1;const d=await r.setViewportConstrained({x:i[0]+t.x,y:i[1]+t.y,zoom:i[2]},[[0,0],[a,u]],s);return!!d&&(d.x!==i[0]||d.y!==i[1]||d.k!==i[2])}function Xp(t,r,i,s,a,u){let d=a;const f=s.get(d)||new Map;s.set(d,f.set(i,r)),d=`${a}-${t}`;const h=s.get(d)||new Map;if(s.set(d,h.set(i,r)),u){d=`${a}-${t}-${u}`;const m=s.get(d)||new Map;s.set(d,m.set(i,r))}}function Hg(t,r,i){t.clear(),r.clear();for(const s of i){const{source:a,target:u,sourceHandle:d=null,targetHandle:f=null}=s,h={edgeId:s.id,source:a,target:u,sourceHandle:d,targetHandle:f},m=`${a}-${d}--${u}-${f}`,v=`${u}-${f}--${a}-${d}`;Xp("source",h,v,t,a,d),Xp("target",h,m,t,u,f),r.set(s.id,s)}}function Bg(t,r){if(!t.parentId)return!1;const i=r.get(t.parentId);return i?i.selected?!0:Bg(i,r):!1}function Gp(t,r,i){var a;let s=t;do{if((a=s==null?void 0:s.matches)!=null&&a.call(s,r))return!0;if(s===i)return!1;s=s==null?void 0:s.parentElement}while(s);return!1}function O2(t,r,i,s){const a=new Map;for(const[u,d]of t)if((d.selected||d.id===s)&&(!d.parentId||!Bg(d,t))&&(d.draggable||r&&typeof d.draggable>"u")){const f=t.get(u);f&&a.set(u,{id:u,position:f.position||{x:0,y:0},distance:{x:i.x-f.internals.positionAbsolute.x,y:i.y-f.internals.positionAbsolute.y},extent:f.extent,parentId:f.parentId,origin:f.origin,expandParent:f.expandParent,internals:{positionAbsolute:f.internals.positionAbsolute||{x:0,y:0}},measured:{width:f.measured.width??0,height:f.measured.height??0}})}return a}function Du({nodeId:t,dragItems:r,nodeLookup:i,dragging:s=!0}){var d,f,h;const a=[];for(const[m,v]of r){const g=(d=i.get(m))==null?void 0:d.internals.userNode;g&&a.push({...g,position:v.position,dragging:s})}if(!t)return[a[0],a];const u=(f=i.get(t))==null?void 0:f.internals.userNode;return[u?{...u,position:((h=r.get(t))==null?void 0:h.position)||u.position,dragging:s}:a[0],a]}function F2({dragItems:t,snapGrid:r,x:i,y:s}){const a=t.values().next().value;if(!a)return null;const u={x:i-a.distance.x,y:s-a.distance.y},d=Pi(u,r);return{x:d.x-u.x,y:d.y-u.y}}function V2({onNodeMouseDown:t,getStoreItems:r,onDragStart:i,onDrag:s,onDragStop:a}){let u={x:null,y:null},d=0,f=new Map,h=!1,m={x:0,y:0},v=null,g=!1,y=null,w=!1,S=!1,C=null;function k({noDragClassName:I,handleSelector:N,domNode:M,isSelectable:F,nodeId:A,nodeClickDistance:B=0}){y=Mt(M);function G({x:V,y:J}){const{nodeLookup:z,nodeExtent:U,snapGrid:O,snapToGrid:W,nodeOrigin:L,onNodeDrag:T,onSelectionDrag:H,onError:b,updateNodePositions:j}=r();u={x:V,y:J};let te=!1;const oe=f.size>1,ae=oe&&U?oc(Mi(f)):null,ce=oe&&W?F2({dragItems:f,snapGrid:O,x:V,y:J}):null;for(const[ue,Z]of f){if(!z.has(ue))continue;let se={x:V-Z.distance.x,y:J-Z.distance.y};W&&(se=ce?{x:Math.round(se.x+ce.x),y:Math.round(se.y+ce.y)}:Pi(se,O));let ge=null;if(oe&&U&&!Z.extent&&ae){const{positionAbsolute:me}=Z.internals,Ee=me.x-ae.x+U[0][0],Me=me.x+Z.measured.width-ae.x2+U[1][0],Ie=me.y-ae.y+U[0][1],Re=me.y+Z.measured.height-ae.y2+U[1][1];ge=[[Ee,Ie],[Me,Re]]}const{position:we,positionAbsolute:ve}=bg({nodeId:ue,nextPosition:se,nodeLookup:z,nodeExtent:ge||U,nodeOrigin:L,onError:b});te=te||Z.position.x!==we.x||Z.position.y!==we.y,Z.position=we,Z.internals.positionAbsolute=ve}if(S=S||te,!!te&&(j(f,!0),C&&(s||T||!A&&H))){const[ue,Z]=Du({nodeId:A,dragItems:f,nodeLookup:z});s==null||s(C,f,ue,Z),T==null||T(C,ue,Z),A||H==null||H(C,Z)}}async function q(){if(!v)return;const{transform:V,panBy:J,autoPanSpeed:z,autoPanOnNodeDrag:U}=r();if(!U){h=!1,cancelAnimationFrame(d);return}const[O,W]=wc(m,v,z);(O!==0||W!==0)&&(u.x=(u.x??0)-O/V[2],u.y=(u.y??0)-W/V[2],await J({x:O,y:W})&&G(u)),d=requestAnimationFrame(q)}function ee(V){var oe;const{nodeLookup:J,multiSelectionActive:z,nodesDraggable:U,transform:O,snapGrid:W,snapToGrid:L,selectNodesOnDrag:T,onNodeDragStart:H,onSelectionDragStart:b,unselectNodesAndEdges:j}=r();g=!0,(!T||!F)&&!z&&A&&((oe=J.get(A))!=null&&oe.selected||j()),F&&T&&A&&(t==null||t(A));const te=pi(V.sourceEvent,{transform:O,snapGrid:W,snapToGrid:L,containerBounds:v});if(u=te,f=O2(J,U,te,A),f.size>0&&(i||H||!A&&b)){const[ae,ce]=Du({nodeId:A,dragItems:f,nodeLookup:J});i==null||i(V.sourceEvent,f,ae,ce),H==null||H(V.sourceEvent,ae,ce),A||b==null||b(V.sourceEvent,ce)}}const D=sg().clickDistance(B).on("start",V=>{const{domNode:J,nodeDragThreshold:z,transform:U,snapGrid:O,snapToGrid:W}=r();v=(J==null?void 0:J.getBoundingClientRect())||null,w=!1,S=!1,C=V.sourceEvent,z===0&&ee(V),u=pi(V.sourceEvent,{transform:U,snapGrid:O,snapToGrid:W,containerBounds:v}),m=Xt(V.sourceEvent,v)}).on("drag",V=>{const{autoPanOnNodeDrag:J,transform:z,snapGrid:U,snapToGrid:O,nodeDragThreshold:W,nodeLookup:L}=r(),T=pi(V.sourceEvent,{transform:z,snapGrid:U,snapToGrid:O,containerBounds:v});if(C=V.sourceEvent,(V.sourceEvent.type==="touchmove"&&V.sourceEvent.touches.length>1||A&&!L.has(A))&&(w=!0),!w){if(!h&&J&&g&&(h=!0,q()),!g){const H=Xt(V.sourceEvent,v),b=H.x-m.x,j=H.y-m.y;Math.sqrt(b*b+j*j)>W&&ee(V)}(u.x!==T.xSnapped||u.y!==T.ySnapped)&&f&&g&&(m=Xt(V.sourceEvent,v),G(T))}}).on("end",V=>{if(!g||w){w&&f.size>0&&r().updateNodePositions(f,!1);return}if(h=!1,g=!1,cancelAnimationFrame(d),f.size>0){const{nodeLookup:J,updateNodePositions:z,onNodeDragStop:U,onSelectionDragStop:O}=r();if(S&&(z(f,!1),S=!1),a||U||!A&&O){const[W,L]=Du({nodeId:A,dragItems:f,nodeLookup:J,dragging:!1});a==null||a(V.sourceEvent,f,W,L),U==null||U(V.sourceEvent,W,L),A||O==null||O(V.sourceEvent,L)}}}).filter(V=>{const J=V.target;return!V.button&&(!I||!Gp(J,`.${I}`,M))&&(!N||Gp(J,N,M))});y.call(D)}function E(){y==null||y.on(".drag",null)}return{update:k,destroy:E}}function H2(t,r,i){const s=[],a={x:t.x-i,y:t.y-i,width:i*2,height:i*2};for(const u of r.values())Si(a,co(u))>0&&s.push(u);return s}const B2=250;function W2(t,r,i,s){var f,h;let a=[],u=1/0;const d=H2(t,i,r+B2);for(const m of d){const v=[...((f=m.internals.handleBounds)==null?void 0:f.source)??[],...((h=m.internals.handleBounds)==null?void 0:h.target)??[]];for(const g of v){if(s.nodeId===g.nodeId&&s.type===g.type&&s.id===g.id)continue;const{x:y,y:w}=Er(m,g,g.position,!0),S=Math.sqrt(Math.pow(y-t.x,2)+Math.pow(w-t.y,2));S>r||(S<u?(a=[{...g,x:y,y:w}],u=S):S===u&&a.push({...g,x:y,y:w}))}}if(!a.length)return null;if(a.length>1){const m=s.type==="source"?"target":"source";return a.find(v=>v.type===m)??a[0]}return a[0]}function Wg(t,r,i,s,a,u=!1){var m,v,g;const d=s.get(t);if(!d)return null;const f=a==="strict"?(m=d.internals.handleBounds)==null?void 0:m[r]:[...((v=d.internals.handleBounds)==null?void 0:v.source)??[],...((g=d.internals.handleBounds)==null?void 0:g.target)??[]],h=(i?f==null?void 0:f.find(y=>y.id===i):f==null?void 0:f[0])??null;return h&&u?{...h,...Er(d,h,h.position,!0)}:h}function Ug(t,r){return t||(r!=null&&r.classList.contains("target")?"target":r!=null&&r.classList.contains("source")?"source":null)}function U2(t,r){let i=null;return r?i=!0:t&&!r&&(i=!1),i}const Yg=()=>!0;function Y2(t,{connectionMode:r,connectionRadius:i,handleId:s,nodeId:a,edgeUpdaterType:u,isTarget:d,domNode:f,nodeLookup:h,lib:m,autoPanOnConnect:v,flowId:g,panBy:y,cancelConnection:w,onConnectStart:S,onConnect:C,onConnectEnd:k,isValidConnection:E=Yg,onReconnectEnd:I,updateConnection:N,getTransform:M,getFromHandle:F,autoPanSpeed:A,dragThreshold:B=1,handleDomNode:G}){const q=jg(t.target);let ee=0,D;const{x:V,y:J}=Xt(t),z=Ug(u,G),U=f==null?void 0:f.getBoundingClientRect();let O=!1;if(!U||!z)return;const W=Wg(a,z,s,h,r);if(!W)return;let L=Xt(t,U),T=!1,H=null,b=!1,j=null;function te(){if(!v||!U)return;const[we,ve]=wc(L,U,A);y({x:we,y:ve}),ee=requestAnimationFrame(te)}const oe={...W,nodeId:a,type:z,position:W.position},ae=h.get(a);let ue={inProgress:!0,isValid:null,from:Er(ae,oe,xe.Left,!0),fromHandle:oe,fromPosition:oe.position,fromNode:ae,to:L,toHandle:null,toPosition:Ap[oe.position],toNode:null,pointer:L};function Z(){O=!0,N(ue),S==null||S(t,{nodeId:a,handleId:s,handleType:z})}B===0&&Z();function se(we){if(!O){const{x:Re,y:ut}=Xt(we),ft=Re-V,nt=ut-J;if(!(ft*ft+nt*nt>B*B))return;Z()}if(!F()||!oe){ge(we);return}const ve=M();L=Xt(we,U),D=W2(go(L,ve,!1,[1,1]),i,h,oe),T||(te(),T=!0);const me=Xg(we,{handle:D,connectionMode:r,fromNodeId:a,fromHandleId:s,fromType:d?"target":"source",isValidConnection:E,doc:q,lib:m,flowId:g,nodeLookup:h});j=me.handleDomNode,H=me.connection,b=U2(!!D,me.isValid);const Ee=h.get(a),Me=Ee?Er(Ee,oe,xe.Left,!0):ue.from,Ie={...ue,from:Me,isValid:b,to:me.toHandle&&b?fo({x:me.toHandle.x,y:me.toHandle.y},ve):L,toHandle:me.toHandle,toPosition:b&&me.toHandle?me.toHandle.position:Ap[oe.position],toNode:me.toHandle?h.get(me.toHandle.nodeId):null,pointer:L};N(Ie),ue=Ie}function ge(we){if(!("touches"in we&&we.touches.length>0)){if(O){(D||j)&&H&&b&&(C==null||C(H));const{inProgress:ve,...me}=ue,Ee={...me,toPosition:ue.toHandle?ue.toPosition:null};k==null||k(we,Ee),u&&(I==null||I(we,Ee))}w(),cancelAnimationFrame(ee),T=!1,b=!1,H=null,j=null,q.removeEventListener("mousemove",se),q.removeEventListener("mouseup",ge),q.removeEventListener("touchmove",se),q.removeEventListener("touchend",ge)}}q.addEventListener("mousemove",se),q.addEventListener("mouseup",ge),q.addEventListener("touchmove",se),q.addEventListener("touchend",ge)}function Xg(t,{handle:r,connectionMode:i,fromNodeId:s,fromHandleId:a,fromType:u,doc:d,lib:f,flowId:h,isValidConnection:m=Yg,nodeLookup:v}){const g=u==="target",y=r?d.querySelector(`.${f}-flow__handle[data-id="${h}-${r==null?void 0:r.nodeId}-${r==null?void 0:r.id}-${r==null?void 0:r.type}"]`):null,{x:w,y:S}=Xt(t),C=d.elementFromPoint(w,S),k=C!=null&&C.classList.contains(`${f}-flow__handle`)?C:y,E={handleDomNode:k,isValid:!1,connection:null,toHandle:null};if(k){const I=Ug(void 0,k),N=k.getAttribute("data-nodeid"),M=k.getAttribute("data-handleid"),F=k.classList.contains("connectable"),A=k.classList.contains("connectableend");if(!N||!I)return E;const B={source:g?N:s,sourceHandle:g?M:a,target:g?s:N,targetHandle:g?a:M};E.connection=B;const q=F&&A&&(i===ao.Strict?g&&I==="source"||!g&&I==="target":N!==s||M!==a);E.isValid=q&&m(B),E.toHandle=Wg(N,I,M,v,i,!0)}return E}const ac={onPointerDown:Y2,isValid:Xg};function X2({domNode:t,panZoom:r,getTransform:i,getViewScale:s}){const a=Mt(t);function u({translateExtent:f,width:h,height:m,zoomStep:v=1,pannable:g=!0,zoomable:y=!0,inversePan:w=!1}){const S=N=>{if(N.sourceEvent.type!=="wheel"||!r)return;const M=i(),F=N.sourceEvent.ctrlKey&&ki()?10:1,A=-N.sourceEvent.deltaY*(N.sourceEvent.deltaMode===1?.05:N.sourceEvent.deltaMode?1:.002)*v,B=M[2]*Math.pow(2,A*F);r.scaleTo(B)};let C=[0,0];const k=N=>{(N.sourceEvent.type==="mousedown"||N.sourceEvent.type==="touchstart")&&(C=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY])},E=N=>{const M=i();if(N.sourceEvent.type!=="mousemove"&&N.sourceEvent.type!=="touchmove"||!r)return;const F=[N.sourceEvent.clientX??N.sourceEvent.touches[0].clientX,N.sourceEvent.clientY??N.sourceEvent.touches[0].clientY],A=[F[0]-C[0],F[1]-C[1]];C=F;const B=s()*Math.max(M[2],Math.log(M[2]))*(w?-1:1),G={x:M[0]-A[0]*B,y:M[1]-A[1]*B},q=[[0,0],[h,m]];r.setViewportConstrained({x:G.x,y:G.y,zoom:M[2]},q,f)},I=Sg().on("start",k).on("zoom",g?E:null).on("zoom.wheel",y?S:null);a.call(I,{})}function d(){a.on("zoom",null)}return{update:u,destroy:d,pointer:Wt}}const zl=t=>({x:t.x,y:t.y,zoom:t.k}),Ou=({x:t,y:r,zoom:i})=>bl.translate(t,r).scale(i),to=(t,r)=>t.target.closest(`.${r}`),Gg=(t,r)=>r===2&&Array.isArray(t)&&t.includes(2),G2=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,Fu=(t,r=0,i=G2,s=()=>{})=>{const a=typeof r=="number"&&r>0;return a||s(),a?t.transition().duration(r).ease(i).on("end",s):t},Qg=t=>{const r=t.ctrlKey&&ki()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*r};function Q2({zoomPanValues:t,noWheelClassName:r,d3Selection:i,d3Zoom:s,panOnScrollMode:a,panOnScrollSpeed:u,zoomOnPinch:d,onPanZoomStart:f,onPanZoom:h,onPanZoomEnd:m}){return v=>{if(to(v,r))return v.ctrlKey&&v.preventDefault(),!1;v.preventDefault(),v.stopImmediatePropagation();const g=i.property("__zoom").k||1;if(v.ctrlKey&&d){const k=Wt(v),E=Qg(v),I=g*Math.pow(2,E);s.scaleTo(i,I,k,v);return}const y=v.deltaMode===1?20:1;let w=a===xr.Vertical?0:v.deltaX*y,S=a===xr.Horizontal?0:v.deltaY*y;!ki()&&v.shiftKey&&a!==xr.Vertical&&(w=v.deltaY*y,S=0),s.translateBy(i,-(w/g)*u,-(S/g)*u,{internal:!0});const C=zl(i.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(h==null||h(v,C),t.panScrollTimeout=setTimeout(()=>{m==null||m(v,C),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,f==null||f(v,C))}}function q2({noWheelClassName:t,preventScrolling:r,d3ZoomHandler:i}){return function(s,a){const u=s.type==="wheel",d=!r&&u&&!s.ctrlKey,f=to(s,t);if(s.ctrlKey&&u&&f&&s.preventDefault(),d||f)return null;s.preventDefault(),i.call(this,s,a)}}function K2({zoomPanValues:t,onDraggingChange:r,onPanZoomStart:i}){return s=>{var u,d,f;if((u=s.sourceEvent)!=null&&u.internal)return;const a=zl(s.transform);t.mouseButton=((d=s.sourceEvent)==null?void 0:d.button)||0,t.isZoomingOrPanning=!0,t.prevViewport=a,((f=s.sourceEvent)==null?void 0:f.type)==="mousedown"&&r(!0),i&&(i==null||i(s.sourceEvent,a))}}function Z2({zoomPanValues:t,panOnDrag:r,onPaneContextMenu:i,onTransformChange:s,onPanZoom:a}){return u=>{var d,f;t.usedRightMouseButton=!!(i&&Gg(r,t.mouseButton??0)),(d=u.sourceEvent)!=null&&d.sync||s([u.transform.x,u.transform.y,u.transform.k]),a&&!((f=u.sourceEvent)!=null&&f.internal)&&(a==null||a(u.sourceEvent,zl(u.transform)))}}function J2({zoomPanValues:t,panOnDrag:r,panOnScroll:i,onDraggingChange:s,onPanZoomEnd:a,onPaneContextMenu:u}){return d=>{var f;if(!((f=d.sourceEvent)!=null&&f.internal)&&(t.isZoomingOrPanning=!1,u&&Gg(r,t.mouseButton??0)&&!t.usedRightMouseButton&&d.sourceEvent&&u(d.sourceEvent),t.usedRightMouseButton=!1,s(!1),a)){const h=zl(d.transform);t.prevViewport=h,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{a==null||a(d.sourceEvent,h)},i?150:0)}}}function eS({zoomActivationKeyPressed:t,zoomOnScroll:r,zoomOnPinch:i,panOnDrag:s,panOnScroll:a,zoomOnDoubleClick:u,userSelectionActive:d,noWheelClassName:f,noPanClassName:h,lib:m,connectionInProgress:v}){return g=>{var k;const y=t||r,w=i&&g.ctrlKey,S=g.type==="wheel";if(g.button===1&&g.type==="mousedown"&&(to(g,`${m}-flow__node`)||to(g,`${m}-flow__edge`)))return!0;if(!s&&!y&&!a&&!u&&!i||d||v&&!S||to(g,f)&&S||to(g,h)&&(!S||a&&S&&!t)||!i&&g.ctrlKey&&S)return!1;if(!i&&g.type==="touchstart"&&((k=g.touches)==null?void 0:k.length)>1)return g.preventDefault(),!1;if(!y&&!a&&!w&&S||!s&&(g.type==="mousedown"||g.type==="touchstart")||Array.isArray(s)&&!s.includes(g.button)&&g.type==="mousedown")return!1;const C=Array.isArray(s)&&s.includes(g.button)||!g.button||g.button<=1;return(!g.ctrlKey||S)&&C}}function tS({domNode:t,minZoom:r,maxZoom:i,translateExtent:s,viewport:a,onPanZoom:u,onPanZoomStart:d,onPanZoomEnd:f,onDraggingChange:h}){const m={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},v=t.getBoundingClientRect(),g=Sg().scaleExtent([r,i]).translateExtent(s),y=Mt(t).call(g);I({x:a.x,y:a.y,zoom:uo(a.zoom,r,i)},[[0,0],[v.width,v.height]],s);const w=y.on("wheel.zoom"),S=y.on("dblclick.zoom");g.wheelDelta(Qg);async function C(D,V){return y?new Promise(J=>{g==null||g.interpolate((V==null?void 0:V.interpolate)==="linear"?fi:al).transform(Fu(y,V==null?void 0:V.duration,V==null?void 0:V.ease,()=>J(!0)),D)}):!1}function k({noWheelClassName:D,noPanClassName:V,onPaneContextMenu:J,userSelectionActive:z,panOnScroll:U,panOnDrag:O,panOnScrollMode:W,panOnScrollSpeed:L,preventScrolling:T,zoomOnPinch:H,zoomOnScroll:b,zoomOnDoubleClick:j,zoomActivationKeyPressed:te,lib:oe,onTransformChange:ae,connectionInProgress:ce,paneClickDistance:ue,selectionOnDrag:Z}){z&&!m.isZoomingOrPanning&&E();const se=U&&!te&&!z;g.clickDistance(Z?1/0:!Yt(ue)||ue<0?0:ue);const ge=se?Q2({zoomPanValues:m,noWheelClassName:D,d3Selection:y,d3Zoom:g,panOnScrollMode:W,panOnScrollSpeed:L,zoomOnPinch:H,onPanZoomStart:d,onPanZoom:u,onPanZoomEnd:f}):q2({noWheelClassName:D,preventScrolling:T,d3ZoomHandler:w});y.on("wheel.zoom",ge,{passive:!1});const we=K2({zoomPanValues:m,onDraggingChange:h,onPanZoomStart:d});g.on("start",we);const ve=Z2({zoomPanValues:m,panOnDrag:O,onPaneContextMenu:!!J,onPanZoom:u,onTransformChange:ae});g.on("zoom",ve);const me=J2({zoomPanValues:m,panOnDrag:O,panOnScroll:U,onPaneContextMenu:J,onPanZoomEnd:f,onDraggingChange:h});g.on("end",me);const Ee=eS({zoomActivationKeyPressed:te,panOnDrag:O,zoomOnScroll:b,panOnScroll:U,zoomOnDoubleClick:j,zoomOnPinch:H,userSelectionActive:z,noPanClassName:V,noWheelClassName:D,lib:oe,connectionInProgress:ce});g.filter(Ee),j?y.on("dblclick.zoom",S):y.on("dblclick.zoom",null)}function E(){g.on("zoom",null)}async function I(D,V,J){const z=Ou(D),U=g==null?void 0:g.constrain()(z,V,J);return U&&await C(U),U}async function N(D,V){const J=Ou(D);return await C(J,V),J}function M(D){if(y){const V=Ou(D),J=y.property("__zoom");(J.k!==D.zoom||J.x!==D.x||J.y!==D.y)&&(g==null||g.transform(y,V,null,{sync:!0}))}}function F(){const D=y?wg(y.node()):{x:0,y:0,k:1};return{x:D.x,y:D.y,zoom:D.k}}async function A(D,V){return y?new Promise(J=>{g==null||g.interpolate((V==null?void 0:V.interpolate)==="linear"?fi:al).scaleTo(Fu(y,V==null?void 0:V.duration,V==null?void 0:V.ease,()=>J(!0)),D)}):!1}async function B(D,V){return y?new Promise(J=>{g==null||g.interpolate((V==null?void 0:V.interpolate)==="linear"?fi:al).scaleBy(Fu(y,V==null?void 0:V.duration,V==null?void 0:V.ease,()=>J(!0)),D)}):!1}function G(D){g==null||g.scaleExtent(D)}function q(D){g==null||g.translateExtent(D)}function ee(D){const V=!Yt(D)||D<0?0:D;g==null||g.clickDistance(V)}return{update:k,destroy:E,setViewport:N,setViewportConstrained:I,getViewport:F,scaleTo:A,scaleBy:B,setScaleExtent:G,setTranslateExtent:q,syncViewport:M,setClickDistance:ee}}var po;(function(t){t.Line="line",t.Handle="handle"})(po||(po={}));function nS({width:t,prevWidth:r,height:i,prevHeight:s,affectsX:a,affectsY:u}){const d=t-r,f=i-s,h=[d>0?1:d<0?-1:0,f>0?1:f<0?-1:0];return d&&a&&(h[0]=h[0]*-1),f&&u&&(h[1]=h[1]*-1),h}function Qp(t){const r=t.includes("right")||t.includes("left"),i=t.includes("bottom")||t.includes("top"),s=t.includes("left"),a=t.includes("top");return{isHorizontal:r,isVertical:i,affectsX:s,affectsY:a}}function Xn(t,r){return Math.max(0,r-t)}function Gn(t,r){return Math.max(0,t-r)}function tl(t,r,i){return Math.max(0,r-t,t-i)}function qp(t,r){return t?!r:r}function rS(t,r,i,s,a,u,d,f){let{affectsX:h,affectsY:m}=r;const{isHorizontal:v,isVertical:g}=r,y=v&&g,{xSnapped:w,ySnapped:S}=i,{minWidth:C,maxWidth:k,minHeight:E,maxHeight:I}=s,{x:N,y:M,width:F,height:A,aspectRatio:B}=t;let G=Math.floor(v?w-t.pointerX:0),q=Math.floor(g?S-t.pointerY:0);const ee=F+(h?-G:G),D=A+(m?-q:q),V=-u[0]*F,J=-u[1]*A;let z=tl(ee,C,k),U=tl(D,E,I);if(d){let L=0,T=0;h&&G<0?L=Xn(N+G+V,d[0][0]):!h&&G>0&&(L=Gn(N+ee+V,d[1][0])),m&&q<0?T=Xn(M+q+J,d[0][1]):!m&&q>0&&(T=Gn(M+D+J,d[1][1])),z=Math.max(z,L),U=Math.max(U,T)}if(f){let L=0,T=0;h&&G>0?L=Gn(N+G,f[0][0]):!h&&G<0&&(L=Xn(N+ee,f[1][0])),m&&q>0?T=Gn(M+q,f[0][1]):!m&&q<0&&(T=Xn(M+D,f[1][1])),z=Math.max(z,L),U=Math.max(U,T)}if(a){if(v){const L=tl(ee/B,E,I)*B;if(z=Math.max(z,L),d){let T=0;!h&&!m||h&&!m&&y?T=Gn(M+J+ee/B,d[1][1])*B:T=Xn(M+J+(h?G:-G)/B,d[0][1])*B,z=Math.max(z,T)}if(f){let T=0;!h&&!m||h&&!m&&y?T=Xn(M+ee/B,f[1][1])*B:T=Gn(M+(h?G:-G)/B,f[0][1])*B,z=Math.max(z,T)}}if(g){const L=tl(D*B,C,k)/B;if(U=Math.max(U,L),d){let T=0;!h&&!m||m&&!h&&y?T=Gn(N+D*B+V,d[1][0])/B:T=Xn(N+(m?q:-q)*B+V,d[0][0])/B,U=Math.max(U,T)}if(f){let T=0;!h&&!m||m&&!h&&y?T=Xn(N+D*B,f[1][0])/B:T=Gn(N+(m?q:-q)*B,f[0][0])/B,U=Math.max(U,T)}}}q=q+(q<0?U:-U),G=G+(G<0?z:-z),a&&(y?ee>D*B?q=(qp(h,m)?-G:G)/B:G=(qp(h,m)?-q:q)*B:v?(q=G/B,m=h):(G=q*B,h=m));const O=h?N+G:N,W=m?M+q:M;return{width:F+(h?-G:G),height:A+(m?-q:q),x:u[0]*G*(h?-1:1)+O,y:u[1]*q*(m?-1:1)+W}}const qg={width:0,height:0,x:0,y:0},oS={...qg,pointerX:0,pointerY:0,aspectRatio:1};function iS(t,r,i){const s=r.position.x+t.position.x,a=r.position.y+t.position.y,u=t.measured.width??0,d=t.measured.height??0,f=i[0]*u,h=i[1]*d;return[[s-f,a-h],[s+u-f,a+d-h]]}function sS({domNode:t,nodeId:r,getStoreItems:i,onChange:s,onEnd:a}){const u=Mt(t);let d={controlDirection:Qp("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function f({controlPosition:m,boundaries:v,keepAspectRatio:g,resizeDirection:y,onResizeStart:w,onResize:S,onResizeEnd:C,shouldResize:k}){let E={...qg},I={...oS};d={boundaries:v,resizeDirection:y,keepAspectRatio:g,controlDirection:Qp(m)};let N,M=null,F=[],A,B,G,q=!1;const ee=sg().on("start",D=>{const{nodeLookup:V,transform:J,snapGrid:z,snapToGrid:U,nodeOrigin:O,paneDomNode:W}=i();if(N=V.get(r),!N)return;M=(W==null?void 0:W.getBoundingClientRect())??null;const{xSnapped:L,ySnapped:T}=pi(D.sourceEvent,{transform:J,snapGrid:z,snapToGrid:U,containerBounds:M});E={width:N.measured.width??0,height:N.measured.height??0,x:N.position.x??0,y:N.position.y??0},I={...E,pointerX:L,pointerY:T,aspectRatio:E.width/E.height},A=void 0,B=_r(N.extent)?N.extent:void 0,N.parentId&&(N.extent==="parent"||N.expandParent)&&(A=V.get(N.parentId)),A&&N.extent==="parent"&&(B=[[0,0],[A.measured.width,A.measured.height]]),F=[],G=void 0;for(const[H,b]of V)if(b.parentId===r&&(F.push({id:H,position:{...b.position},extent:b.extent}),b.extent==="parent"||b.expandParent)){const j=iS(b,N,b.origin??O);G?G=[[Math.min(j[0][0],G[0][0]),Math.min(j[0][1],G[0][1])],[Math.max(j[1][0],G[1][0]),Math.max(j[1][1],G[1][1])]]:G=j}w==null||w(D,{...E})}).on("drag",D=>{const{transform:V,snapGrid:J,snapToGrid:z,nodeOrigin:U}=i(),O=pi(D.sourceEvent,{transform:V,snapGrid:J,snapToGrid:z,containerBounds:M}),W=[];if(!N)return;const{x:L,y:T,width:H,height:b}=E,j={},te=N.origin??U,{width:oe,height:ae,x:ce,y:ue}=rS(I,d.controlDirection,O,d.boundaries,d.keepAspectRatio,te,B,G),Z=oe!==H,se=ae!==b,ge=ce!==L&&Z,we=ue!==T&&se;if(!ge&&!we&&!Z&&!se)return;if((ge||we||te[0]===1||te[1]===1)&&(j.x=ge?ce:E.x,j.y=we?ue:E.y,E.x=j.x,E.y=j.y,F.length>0)){const Me=ce-L,Ie=ue-T;for(const Re of F)Re.position={x:Re.position.x-Me+te[0]*(oe-H),y:Re.position.y-Ie+te[1]*(ae-b)},W.push(Re)}if((Z||se)&&(j.width=Z&&(!d.resizeDirection||d.resizeDirection==="horizontal")?oe:E.width,j.height=se&&(!d.resizeDirection||d.resizeDirection==="vertical")?ae:E.height,E.width=j.width,E.height=j.height),A&&N.expandParent){const Me=te[0]*(j.width??0);j.x&&j.x<Me&&(E.x=Me,I.x=I.x-(j.x-Me));const Ie=te[1]*(j.height??0);j.y&&j.y<Ie&&(E.y=Ie,I.y=I.y-(j.y-Ie))}const ve=nS({width:E.width,prevWidth:H,height:E.height,prevHeight:b,affectsX:d.controlDirection.affectsX,affectsY:d.controlDirection.affectsY}),me={...E,direction:ve};(k==null?void 0:k(D,me))!==!1&&(q=!0,S==null||S(D,me),s(j,W))}).on("end",D=>{q&&(C==null||C(D,{...E}),a==null||a({...E}),q=!1)});u.call(ee)}function h(){u.on(".drag",null)}return{update:f,destroy:h}}var Vu={exports:{}},Hu={},Bu={exports:{}},Wu={};/**
|
|
141
|
-
* @license React
|
|
142
|
-
* use-sync-external-store-shim.production.js
|
|
143
|
-
*
|
|
144
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
145
|
-
*
|
|
146
|
-
* This source code is licensed under the MIT license found in the
|
|
147
|
-
* LICENSE file in the root directory of this source tree.
|
|
148
|
-
*/var Kp;function lS(){if(Kp)return Wu;Kp=1;var t=Ei();function r(g,y){return g===y&&(g!==0||1/g===1/y)||g!==g&&y!==y}var i=typeof Object.is=="function"?Object.is:r,s=t.useState,a=t.useEffect,u=t.useLayoutEffect,d=t.useDebugValue;function f(g,y){var w=y(),S=s({inst:{value:w,getSnapshot:y}}),C=S[0].inst,k=S[1];return u(function(){C.value=w,C.getSnapshot=y,h(C)&&k({inst:C})},[g,w,y]),a(function(){return h(C)&&k({inst:C}),g(function(){h(C)&&k({inst:C})})},[g]),d(w),w}function h(g){var y=g.getSnapshot;g=g.value;try{var w=y();return!i(g,w)}catch{return!0}}function m(g,y){return y()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:f;return Wu.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v,Wu}var Zp;function aS(){return Zp||(Zp=1,Bu.exports=lS()),Bu.exports}/**
|
|
149
|
-
* @license React
|
|
150
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
151
|
-
*
|
|
152
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the MIT license found in the
|
|
155
|
-
* LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/var Jp;function uS(){if(Jp)return Hu;Jp=1;var t=Ei(),r=aS();function i(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var s=typeof Object.is=="function"?Object.is:i,a=r.useSyncExternalStore,u=t.useRef,d=t.useEffect,f=t.useMemo,h=t.useDebugValue;return Hu.useSyncExternalStoreWithSelector=function(m,v,g,y,w){var S=u(null);if(S.current===null){var C={hasValue:!1,value:null};S.current=C}else C=S.current;S=f(function(){function E(A){if(!I){if(I=!0,N=A,A=y(A),w!==void 0&&C.hasValue){var B=C.value;if(w(B,A))return M=B}return M=A}if(B=M,s(N,A))return B;var G=y(A);return w!==void 0&&w(B,G)?(N=A,B):(N=A,M=G)}var I=!1,N,M,F=g===void 0?null:g;return[function(){return E(v())},F===null?void 0:function(){return E(F())}]},[v,g,y,w]);var k=a(m,S[0],S[1]);return d(function(){C.hasValue=!0,C.value=k},[k]),h(k),k},Hu}var eh;function cS(){return eh||(eh=1,Vu.exports=uS()),Vu.exports}var dS=cS();const fS=Lh(dS),pS={},th=t=>{let r;const i=new Set,s=(v,g)=>{const y=typeof v=="function"?v(r):v;if(!Object.is(y,r)){const w=r;r=g??(typeof y!="object"||y===null)?y:Object.assign({},r,y),i.forEach(S=>S(r,w))}},a=()=>r,h={setState:s,getState:a,getInitialState:()=>m,subscribe:v=>(i.add(v),()=>i.delete(v)),destroy:()=>{(pS?"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."),i.clear()}},m=r=t(s,a,h);return h},hS=t=>t?th(t):th,{useDebugValue:gS}=_y,{useSyncExternalStoreWithSelector:mS}=fS,yS=t=>t;function Kg(t,r=yS,i){const s=mS(t.subscribe,t.getState,t.getServerState||t.getInitialState,r,i);return gS(s),s}const nh=(t,r)=>{const i=hS(t),s=(a,u=r)=>Kg(i,a,u);return Object.assign(s,i),s},vS=(t,r)=>t?nh(t,r):nh;function Oe(t,r){if(Object.is(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(const[s,a]of t)if(!Object.is(a,r.get(s)))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(const s of t)if(!r.has(s))return!1;return!0}const i=Object.keys(t);if(i.length!==Object.keys(r).length)return!1;for(const s of i)if(!Object.prototype.hasOwnProperty.call(r,s)||!Object.is(t[s],r[s]))return!1;return!0}Ah();const Il=X.createContext(null),xS=Il.Provider,Zg=Gt.error001("react");function be(t,r){const i=X.useContext(Il);if(i===null)throw new Error(Zg);return Kg(i,t,r)}function Fe(){const t=X.useContext(Il);if(t===null)throw new Error(Zg);return X.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const rh={display:"none"},wS={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Jg="react-flow__node-desc",em="react-flow__edge-desc",SS="react-flow__aria-live",kS=t=>t.ariaLiveMessage,_S=t=>t.ariaLabelConfig;function ES({rfId:t}){const r=be(kS);return _.jsx("div",{id:`${SS}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:wS,children:r})}function NS({rfId:t,disableKeyboardA11y:r}){const i=be(_S);return _.jsxs(_.Fragment,{children:[_.jsx("div",{id:`${Jg}-${t}`,style:rh,children:r?i["node.a11yDescription.default"]:i["node.a11yDescription.keyboardDisabled"]}),_.jsx("div",{id:`${em}-${t}`,style:rh,children:i["edge.a11yDescription.default"]}),!r&&_.jsx(ES,{rfId:t})]})}const Tl=X.forwardRef(({position:t="top-left",children:r,className:i,style:s,...a},u)=>{const d=`${t}`.split("-");return _.jsx("div",{className:Xe(["react-flow__panel",i,...d]),style:s,ref:u,...a,children:r})});Tl.displayName="Panel";function CS({proOptions:t,position:r="bottom-right"}){return t!=null&&t.hideAttribution?null:_.jsx(Tl,{position:r,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:_.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const bS=t=>{const r=[],i=[];for(const[,s]of t.nodeLookup)s.selected&&r.push(s.internals.userNode);for(const[,s]of t.edgeLookup)s.selected&&i.push(s);return{selectedNodes:r,selectedEdges:i}},nl=t=>t.id;function MS(t,r){return Oe(t.selectedNodes.map(nl),r.selectedNodes.map(nl))&&Oe(t.selectedEdges.map(nl),r.selectedEdges.map(nl))}function PS({onSelectionChange:t}){const r=Fe(),{selectedNodes:i,selectedEdges:s}=be(bS,MS);return X.useEffect(()=>{const a={nodes:i,edges:s};t==null||t(a),r.getState().onSelectionChangeHandlers.forEach(u=>u(a))},[i,s,t]),null}const zS=t=>!!t.onSelectionChangeHandlers;function IS({onSelectionChange:t}){const r=be(zS);return t||r?_.jsx(PS,{onSelectionChange:t}):null}const tm=[0,0],TS={x:0,y:0,zoom:1},jS=["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"],oh=[...jS,"rfId"],RS=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),ih={translateExtent:xi,nodeOrigin:tm,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function LS(t){const{setNodes:r,setEdges:i,setMinZoom:s,setMaxZoom:a,setTranslateExtent:u,setNodeExtent:d,reset:f,setDefaultNodesAndEdges:h}=be(RS,Oe),m=Fe();X.useEffect(()=>(h(t.defaultNodes,t.defaultEdges),()=>{v.current=ih,f()}),[]);const v=X.useRef(ih);return X.useEffect(()=>{for(const g of oh){const y=t[g],w=v.current[g];y!==w&&(typeof t[g]>"u"||(g==="nodes"?r(y):g==="edges"?i(y):g==="minZoom"?s(y):g==="maxZoom"?a(y):g==="translateExtent"?u(y):g==="nodeExtent"?d(y):g==="ariaLabelConfig"?m.setState({ariaLabelConfig:x2(y)}):g==="fitView"?m.setState({fitViewQueued:y}):g==="fitViewOptions"?m.setState({fitViewOptions:y}):m.setState({[g]:y})))}v.current=t},oh.map(g=>t[g])),null}function sh(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function AS(t){var s;const[r,i]=X.useState(t==="system"?null:t);return X.useEffect(()=>{if(t!=="system"){i(t);return}const a=sh(),u=()=>i(a!=null&&a.matches?"dark":"light");return u(),a==null||a.addEventListener("change",u),()=>{a==null||a.removeEventListener("change",u)}},[t]),r!==null?r:(s=sh())!=null&&s.matches?"dark":"light"}const lh=typeof document<"u"?document:null;function _i(t=null,r={target:lh,actInsideInputWithModifier:!0}){const[i,s]=X.useState(!1),a=X.useRef(!1),u=X.useRef(new Set([])),[d,f]=X.useMemo(()=>{if(t!==null){const m=(Array.isArray(t)?t:[t]).filter(g=>typeof g=="string").map(g=>g.replace("+",`
|
|
157
|
-
`).replace(`
|
|
158
|
-
|
|
159
|
-
`,`
|
|
160
|
-
+`).split(`
|
|
161
|
-
`)),v=m.reduce((g,y)=>g.concat(...y),[]);return[m,v]}return[[],[]]},[t]);return X.useEffect(()=>{const h=(r==null?void 0:r.target)??lh,m=(r==null?void 0:r.actInsideInputWithModifier)??!0;if(t!==null){const v=w=>{var k,E;if(a.current=w.ctrlKey||w.metaKey||w.shiftKey||w.altKey,(!a.current||a.current&&!m)&&Rg(w))return!1;const C=uh(w.code,f);if(u.current.add(w[C]),ah(d,u.current,!1)){const I=((E=(k=w.composedPath)==null?void 0:k.call(w))==null?void 0:E[0])||w.target,N=(I==null?void 0:I.nodeName)==="BUTTON"||(I==null?void 0:I.nodeName)==="A";r.preventDefault!==!1&&(a.current||!N)&&w.preventDefault(),s(!0)}},g=w=>{const S=uh(w.code,f);ah(d,u.current,!0)?(s(!1),u.current.clear()):u.current.delete(w[S]),w.key==="Meta"&&u.current.clear(),a.current=!1},y=()=>{u.current.clear(),s(!1)};return h==null||h.addEventListener("keydown",v),h==null||h.addEventListener("keyup",g),window.addEventListener("blur",y),window.addEventListener("contextmenu",y),()=>{h==null||h.removeEventListener("keydown",v),h==null||h.removeEventListener("keyup",g),window.removeEventListener("blur",y),window.removeEventListener("contextmenu",y)}}},[t,s]),i}function ah(t,r,i){return t.filter(s=>i||s.length===r.size).some(s=>s.every(a=>r.has(a)))}function uh(t,r){return r.includes(t)?"code":"key"}const $S=()=>{const t=Fe();return X.useMemo(()=>({zoomIn:async r=>{const{panZoom:i}=t.getState();return i?i.scaleBy(1.2,r):!1},zoomOut:async r=>{const{panZoom:i}=t.getState();return i?i.scaleBy(1/1.2,r):!1},zoomTo:async(r,i)=>{const{panZoom:s}=t.getState();return s?s.scaleTo(r,i):!1},getZoom:()=>t.getState().transform[2],setViewport:async(r,i)=>{const{transform:[s,a,u],panZoom:d}=t.getState();return d?(await d.setViewport({x:r.x??s,y:r.y??a,zoom:r.zoom??u},i),!0):!1},getViewport:()=>{const[r,i,s]=t.getState().transform;return{x:r,y:i,zoom:s}},setCenter:async(r,i,s)=>t.getState().setCenter(r,i,s),fitBounds:async(r,i)=>{const{width:s,height:a,minZoom:u,maxZoom:d,panZoom:f}=t.getState(),h=Sc(r,s,a,u,d,(i==null?void 0:i.padding)??.1);return f?(await f.setViewport(h,{duration:i==null?void 0:i.duration,ease:i==null?void 0:i.ease,interpolate:i==null?void 0:i.interpolate}),!0):!1},screenToFlowPosition:(r,i={})=>{const{transform:s,snapGrid:a,snapToGrid:u,domNode:d}=t.getState();if(!d)return r;const{x:f,y:h}=d.getBoundingClientRect(),m={x:r.x-f,y:r.y-h},v=i.snapGrid??a,g=i.snapToGrid??u;return go(m,s,g,v)},flowToScreenPosition:r=>{const{transform:i,domNode:s}=t.getState();if(!s)return r;const{x:a,y:u}=s.getBoundingClientRect(),d=fo(r,i);return{x:d.x+a,y:d.y+u}}}),[])};function nm(t,r){const i=[],s=new Map,a=[];for(const u of t)if(u.type==="add"){a.push(u);continue}else if(u.type==="remove"||u.type==="replace")s.set(u.id,[u]);else{const d=s.get(u.id);d?d.push(u):s.set(u.id,[u])}for(const u of r){const d=s.get(u.id);if(!d){i.push(u);continue}if(d[0].type==="remove")continue;if(d[0].type==="replace"){i.push({...d[0].item});continue}const f={...u};for(const h of d)DS(h,f);i.push(f)}return a.length&&a.forEach(u=>{u.index!==void 0?i.splice(u.index,0,{...u.item}):i.push({...u.item})}),i}function DS(t,r){switch(t.type){case"select":{r.selected=t.selected;break}case"position":{typeof t.position<"u"&&(r.position=t.position),typeof t.dragging<"u"&&(r.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(r.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(r.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(r.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(r.resizing=t.resizing);break}}}function OS(t,r){return nm(t,r)}function FS(t,r){return nm(t,r)}function mr(t,r){return{id:t,type:"select",selected:r}}function no(t,r=new Set,i=!1){const s=[];for(const[a,u]of t){const d=r.has(a);!(u.selected===void 0&&!d)&&u.selected!==d&&(i&&(u.selected=d),s.push(mr(u.id,d)))}return s}function ch({items:t=[],lookup:r}){var a;const i=[],s=new Map(t.map(u=>[u.id,u]));for(const[u,d]of t.entries()){const f=r.get(d.id),h=((a=f==null?void 0:f.internals)==null?void 0:a.userNode)??f;h!==void 0&&h!==d&&i.push({id:d.id,item:d,type:"replace"}),h===void 0&&i.push({item:d,type:"add",index:u})}for(const[u]of r)s.get(u)===void 0&&i.push({id:u,type:"remove"});return i}function dh(t){return{id:t.id,type:"remove"}}const VS=zg();function HS(t,r,i={}){return N2(t,r,{...i,onError:i.onError??VS})}const fh=t=>c2(t),BS=t=>Cg(t);function rm(t){return X.forwardRef(t)}const WS=typeof window<"u"?X.useLayoutEffect:X.useEffect;function ph(t){const[r,i]=X.useState(BigInt(0)),[s]=X.useState(()=>US(()=>i(a=>a+BigInt(1))));return WS(()=>{const a=s.get();a.length&&(t(a),s.reset())},[r]),s}function US(t){let r=[];return{get:()=>r,reset:()=>{r=[]},push:i=>{r.push(i),t()}}}const om=X.createContext(null);function YS({children:t}){const r=Fe(),i=X.useCallback(f=>{const{nodes:h=[],setNodes:m,hasDefaultNodes:v,onNodesChange:g,nodeLookup:y,fitViewQueued:w,onNodesChangeMiddlewareMap:S}=r.getState();let C=h;for(const E of f)C=typeof E=="function"?E(C):E;let k=ch({items:C,lookup:y});for(const E of S.values())k=E(k);v&&m(C),k.length>0?g==null||g(k):w&&window.requestAnimationFrame(()=>{const{fitViewQueued:E,nodes:I,setNodes:N}=r.getState();E&&N(I)})},[]),s=ph(i),a=X.useCallback(f=>{const{edges:h=[],setEdges:m,hasDefaultEdges:v,onEdgesChange:g,edgeLookup:y}=r.getState();let w=h;for(const S of f)w=typeof S=="function"?S(w):S;v?m(w):g&&g(ch({items:w,lookup:y}))},[]),u=ph(a),d=X.useMemo(()=>({nodeQueue:s,edgeQueue:u}),[]);return _.jsx(om.Provider,{value:d,children:t})}function XS(){const t=X.useContext(om);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const GS=t=>!!t.panZoom;function Mc(){const t=$S(),r=Fe(),i=XS(),s=be(GS),a=X.useMemo(()=>{const u=g=>r.getState().nodeLookup.get(g),d=g=>{i.nodeQueue.push(g)},f=g=>{i.edgeQueue.push(g)},h=g=>{var E,I;const{nodeLookup:y,nodeOrigin:w}=r.getState(),S=fh(g)?g:y.get(g.id),C=S.parentId?Tg(S.position,S.measured,S.parentId,y,w):S.position,k={...S,position:C,width:((E=S.measured)==null?void 0:E.width)??S.width,height:((I=S.measured)==null?void 0:I.height)??S.height};return co(k)},m=(g,y,w={replace:!1})=>{d(S=>S.map(C=>{if(C.id===g){const k=typeof y=="function"?y(C):y;return w.replace&&fh(k)?k:{...C,...k}}return C}))},v=(g,y,w={replace:!1})=>{f(S=>S.map(C=>{if(C.id===g){const k=typeof y=="function"?y(C):y;return w.replace&&BS(k)?k:{...C,...k}}return C}))};return{getNodes:()=>r.getState().nodes.map(g=>({...g})),getNode:g=>{var y;return(y=u(g))==null?void 0:y.internals.userNode},getInternalNode:u,getEdges:()=>{const{edges:g=[]}=r.getState();return g.map(y=>({...y}))},getEdge:g=>r.getState().edgeLookup.get(g),setNodes:d,setEdges:f,addNodes:g=>{const y=Array.isArray(g)?g:[g];i.nodeQueue.push(w=>[...w,...y])},addEdges:g=>{const y=Array.isArray(g)?g:[g];i.edgeQueue.push(w=>[...w,...y])},toObject:()=>{const{nodes:g=[],edges:y=[],transform:w}=r.getState(),[S,C,k]=w;return{nodes:g.map(E=>({...E})),edges:y.map(E=>({...E})),viewport:{x:S,y:C,zoom:k}}},deleteElements:async({nodes:g=[],edges:y=[]})=>{const{nodes:w,edges:S,onNodesDelete:C,onEdgesDelete:k,triggerNodeChanges:E,triggerEdgeChanges:I,onDelete:N,onBeforeDelete:M}=r.getState(),{nodes:F,edges:A}=await g2({nodesToRemove:g,edgesToRemove:y,nodes:w,edges:S,onBeforeDelete:M}),B=A.length>0,G=F.length>0;if(B){const q=A.map(dh);k==null||k(A),I(q)}if(G){const q=F.map(dh);C==null||C(F),E(q)}return(G||B)&&(N==null||N({nodes:F,edges:A})),{deletedNodes:F,deletedEdges:A}},getIntersectingNodes:(g,y=!0,w)=>{const S=Dp(g),C=S?g:h(g),k=w!==void 0;return C?(w||r.getState().nodes).filter(E=>{const I=r.getState().nodeLookup.get(E.id);if(I&&!S&&(E.id===g.id||!I.internals.positionAbsolute))return!1;const N=co(k?E:I),M=Si(N,C);return y&&M>0||M>=N.width*N.height||M>=C.width*C.height}):[]},isNodeIntersecting:(g,y,w=!0)=>{const C=Dp(g)?g:h(g);if(!C)return!1;const k=Si(C,y);return w&&k>0||k>=y.width*y.height||k>=C.width*C.height},updateNode:m,updateNodeData:(g,y,w={replace:!1})=>{m(g,S=>{const C=typeof y=="function"?y(S):y;return w.replace?{...S,data:C}:{...S,data:{...S.data,...C}}},w)},updateEdge:v,updateEdgeData:(g,y,w={replace:!1})=>{v(g,S=>{const C=typeof y=="function"?y(S):y;return w.replace?{...S,data:C}:{...S,data:{...S.data,...C}}},w)},getNodesBounds:g=>{const{nodeLookup:y,nodeOrigin:w}=r.getState();return d2(g,{nodeLookup:y,nodeOrigin:w})},getHandleConnections:({type:g,id:y,nodeId:w})=>{var S;return Array.from(((S=r.getState().connectionLookup.get(`${w}-${g}${y?`-${y}`:""}`))==null?void 0:S.values())??[])},getNodeConnections:({type:g,handleId:y,nodeId:w})=>{var S;return Array.from(((S=r.getState().connectionLookup.get(`${w}${g?y?`-${g}-${y}`:`-${g}`:""}`))==null?void 0:S.values())??[])},fitView:async g=>{const y=r.getState().fitViewResolver??v2();return r.setState({fitViewQueued:!0,fitViewOptions:g,fitViewResolver:y}),i.nodeQueue.push(w=>[...w]),y.promise}}},[]);return X.useMemo(()=>({...a,...t,viewportInitialized:s}),[s])}const hh=t=>t.selected,QS=typeof window<"u"?window:void 0;function qS({deleteKeyCode:t,multiSelectionKeyCode:r}){const i=Fe(),{deleteElements:s}=Mc(),a=_i(t,{actInsideInputWithModifier:!1}),u=_i(r,{target:QS});X.useEffect(()=>{if(a){const{edges:d,nodes:f}=i.getState();s({nodes:f.filter(hh),edges:d.filter(hh)}),i.setState({nodesSelectionActive:!1})}},[a]),X.useEffect(()=>{i.setState({multiSelectionActive:u})},[u])}function KS(t){const r=Fe();X.useEffect(()=>{const i=()=>{var a,u,d,f;if(!t.current||!(((u=(a=t.current).checkVisibility)==null?void 0:u.call(a))??!0))return!1;const s=kc(t.current);(s.height===0||s.width===0)&&((f=(d=r.getState()).onError)==null||f.call(d,"004",Gt.error004())),r.setState({width:s.width||500,height:s.height||500})};if(t.current){i(),window.addEventListener("resize",i);const s=new ResizeObserver(()=>i());return s.observe(t.current),()=>{window.removeEventListener("resize",i),s&&t.current&&s.unobserve(t.current)}}},[])}const jl={position:"absolute",width:"100%",height:"100%",top:0,left:0},ZS=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function JS({onPaneContextMenu:t,zoomOnScroll:r=!0,zoomOnPinch:i=!0,panOnScroll:s=!1,panOnScrollSpeed:a=.5,panOnScrollMode:u=xr.Free,zoomOnDoubleClick:d=!0,panOnDrag:f=!0,defaultViewport:h,translateExtent:m,minZoom:v,maxZoom:g,zoomActivationKeyCode:y,preventScrolling:w=!0,children:S,noWheelClassName:C,noPanClassName:k,onViewportChange:E,isControlledViewport:I,paneClickDistance:N,selectionOnDrag:M}){const F=Fe(),A=X.useRef(null),{userSelectionActive:B,lib:G,connectionInProgress:q}=be(ZS,Oe),ee=_i(y),D=X.useRef();KS(A);const V=X.useCallback(J=>{E==null||E({x:J[0],y:J[1],zoom:J[2]}),I||F.setState({transform:J})},[E,I]);return X.useEffect(()=>{if(A.current){D.current=tS({domNode:A.current,minZoom:v,maxZoom:g,translateExtent:m,viewport:h,onDraggingChange:O=>F.setState(W=>W.paneDragging===O?W:{paneDragging:O}),onPanZoomStart:(O,W)=>{const{onViewportChangeStart:L,onMoveStart:T}=F.getState();T==null||T(O,W),L==null||L(W)},onPanZoom:(O,W)=>{const{onViewportChange:L,onMove:T}=F.getState();T==null||T(O,W),L==null||L(W)},onPanZoomEnd:(O,W)=>{const{onViewportChangeEnd:L,onMoveEnd:T}=F.getState();T==null||T(O,W),L==null||L(W)}});const{x:J,y:z,zoom:U}=D.current.getViewport();return F.setState({panZoom:D.current,transform:[J,z,U],domNode:A.current.closest(".react-flow")}),()=>{var O;(O=D.current)==null||O.destroy()}}},[]),X.useEffect(()=>{var J;(J=D.current)==null||J.update({onPaneContextMenu:t,zoomOnScroll:r,zoomOnPinch:i,panOnScroll:s,panOnScrollSpeed:a,panOnScrollMode:u,zoomOnDoubleClick:d,panOnDrag:f,zoomActivationKeyPressed:ee,preventScrolling:w,noPanClassName:k,userSelectionActive:B,noWheelClassName:C,lib:G,onTransformChange:V,connectionInProgress:q,selectionOnDrag:M,paneClickDistance:N})},[t,r,i,s,a,u,d,f,ee,w,k,B,C,G,V,q,M,N]),_.jsx("div",{className:"react-flow__renderer",ref:A,style:jl,children:S})}const ek=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function tk(){const{userSelectionActive:t,userSelectionRect:r}=be(ek,Oe);return t&&r?_.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:r.width,height:r.height,transform:`translate(${r.x}px, ${r.y}px)`}}):null}const Uu=(t,r)=>i=>{i.target===r.current&&(t==null||t(i))},nk=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging,panBy:t.panBy,autoPanSpeed:t.autoPanSpeed});function rk({isSelecting:t,selectionKeyPressed:r,selectionMode:i=wi.Full,panOnDrag:s,autoPanOnSelection:a,paneClickDistance:u,selectionOnDrag:d,onSelectionStart:f,onSelectionEnd:h,onPaneClick:m,onPaneContextMenu:v,onPaneScroll:g,onPaneMouseEnter:y,onPaneMouseMove:w,onPaneMouseLeave:S,children:C}){const k=X.useRef(0),E=Fe(),{userSelectionActive:I,elementsSelectable:N,dragging:M,connectionInProgress:F,panBy:A,autoPanSpeed:B}=be(nk,Oe),G=N&&(t||I),q=X.useRef(null),ee=X.useRef(),D=X.useRef(new Set),V=X.useRef(new Set),J=X.useRef(!1),z=X.useRef({x:0,y:0}),U=X.useRef(!1),O=Z=>{if(J.current||F){J.current=!1;return}m==null||m(Z),E.getState().resetSelectedElements(),E.setState({nodesSelectionActive:!1})},W=Z=>{if(Array.isArray(s)&&(s!=null&&s.includes(2))){Z.preventDefault();return}v==null||v(Z)},L=g?Z=>g(Z):void 0,T=Z=>{J.current&&(Z.stopPropagation(),J.current=!1)},H=Z=>{var Re,ut;const{domNode:se,transform:ge}=E.getState();if(ee.current=se==null?void 0:se.getBoundingClientRect(),!ee.current)return;const we=Z.target===q.current;if(!we&&!!Z.target.closest(".nokey")||!t||!(d&&we||r)||Z.button!==0||!Z.isPrimary)return;(ut=(Re=Z.target)==null?void 0:Re.setPointerCapture)==null||ut.call(Re,Z.pointerId),J.current=!1;const{x:Ee,y:Me}=Xt(Z.nativeEvent,ee.current),Ie=go({x:Ee,y:Me},ge);E.setState({userSelectionRect:{width:0,height:0,startX:Ie.x,startY:Ie.y,x:Ee,y:Me}}),we||(Z.stopPropagation(),Z.preventDefault())};function b(Z,se){const{userSelectionRect:ge}=E.getState();if(!ge)return;const{transform:we,nodeLookup:ve,edgeLookup:me,connectionLookup:Ee,triggerNodeChanges:Me,triggerEdgeChanges:Ie,defaultEdgeOptions:Re}=E.getState(),ut={x:ge.startX,y:ge.startY},{x:ft,y:nt}=fo(ut,we),rt={startX:ut.x,startY:ut.y,x:Z<ft?Z:ft,y:se<nt?se:nt,width:Math.abs(Z-ft),height:Math.abs(se-nt)},ln=D.current,qt=V.current;D.current=new Set(xc(ve,rt,we,i===wi.Partial,!0).map(pt=>pt.id)),V.current=new Set;const Kt=(Re==null?void 0:Re.selectable)??!0;for(const pt of D.current){const zt=Ee.get(pt);if(zt)for(const{edgeId:St}of zt.values()){const It=me.get(St);It&&(It.selectable??Kt)&&V.current.add(St)}}if(!Op(ln,D.current)){const pt=no(ve,D.current,!0);Me(pt)}if(!Op(qt,V.current)){const pt=no(me,V.current);Ie(pt)}E.setState({userSelectionRect:rt,userSelectionActive:!0,nodesSelectionActive:!1})}function j(){if(!a||!ee.current)return;const[Z,se]=wc(z.current,ee.current,B);A({x:Z,y:se}).then(ge=>{if(!J.current||!ge){k.current=requestAnimationFrame(j);return}const{x:we,y:ve}=z.current;b(we,ve),k.current=requestAnimationFrame(j)})}const te=()=>{cancelAnimationFrame(k.current),k.current=0,U.current=!1};X.useEffect(()=>()=>te(),[]);const oe=Z=>{const{userSelectionRect:se,transform:ge,resetSelectedElements:we}=E.getState();if(!ee.current||!se)return;const{x:ve,y:me}=Xt(Z.nativeEvent,ee.current);z.current={x:ve,y:me};const Ee=fo({x:se.startX,y:se.startY},ge);if(!J.current){const Me=r?0:u;if(Math.hypot(ve-Ee.x,me-Ee.y)<=Me)return;we(),f==null||f(Z)}J.current=!0,U.current||(j(),U.current=!0),b(ve,me)},ae=Z=>{var se,ge;Z.button===0&&((ge=(se=Z.target)==null?void 0:se.releasePointerCapture)==null||ge.call(se,Z.pointerId),!I&&Z.target===q.current&&E.getState().userSelectionRect&&(O==null||O(Z)),E.setState({userSelectionActive:!1,userSelectionRect:null}),J.current&&(h==null||h(Z),E.setState({nodesSelectionActive:D.current.size>0})),te())},ce=Z=>{var se,ge;(ge=(se=Z.target)==null?void 0:se.releasePointerCapture)==null||ge.call(se,Z.pointerId),te()},ue=s===!0||Array.isArray(s)&&s.includes(0);return _.jsxs("div",{className:Xe(["react-flow__pane",{draggable:ue,dragging:M,selection:t}]),onClick:G?void 0:Uu(O,q),onContextMenu:Uu(W,q),onWheel:Uu(L,q),onPointerEnter:G?void 0:y,onPointerMove:G?oe:w,onPointerUp:G?ae:void 0,onPointerCancel:G?ce:void 0,onPointerDownCapture:G?H:void 0,onClickCapture:G?T:void 0,onPointerLeave:S,ref:q,style:jl,children:[C,_.jsx(tk,{})]})}function uc({id:t,store:r,unselect:i=!1,nodeRef:s}){const{addSelectedNodes:a,unselectNodesAndEdges:u,multiSelectionActive:d,nodeLookup:f,onError:h}=r.getState(),m=f.get(t);if(!m){h==null||h("012",Gt.error012(t));return}r.setState({nodesSelectionActive:!1}),m.selected?(i||m.selected&&d)&&(u({nodes:[m],edges:[]}),requestAnimationFrame(()=>{var v;return(v=s==null?void 0:s.current)==null?void 0:v.blur()})):a([t])}function im({nodeRef:t,disabled:r=!1,noDragClassName:i,handleSelector:s,nodeId:a,isSelectable:u,nodeClickDistance:d}){const f=Fe(),[h,m]=X.useState(!1),v=X.useRef();return X.useEffect(()=>{v.current=V2({getStoreItems:()=>f.getState(),onNodeMouseDown:g=>{uc({id:g,store:f,nodeRef:t})},onDragStart:()=>{m(!0)},onDragStop:()=>{m(!1)}})},[]),X.useEffect(()=>{if(!(r||!t.current||!v.current))return v.current.update({noDragClassName:i,handleSelector:s,domNode:t.current,isSelectable:u,nodeId:a,nodeClickDistance:d}),()=>{var g;(g=v.current)==null||g.destroy()}},[i,s,r,u,t,a,d]),h}const ok=t=>r=>r.selected&&(r.draggable||t&&typeof r.draggable>"u");function sm(){const t=Fe();return X.useCallback(i=>{const{nodeExtent:s,snapToGrid:a,snapGrid:u,nodesDraggable:d,onError:f,updateNodePositions:h,nodeLookup:m,nodeOrigin:v}=t.getState(),g=new Map,y=ok(d),w=a?u[0]:5,S=a?u[1]:5,C=i.direction.x*w*i.factor,k=i.direction.y*S*i.factor;for(const[,E]of m){if(!y(E))continue;let I={x:E.internals.positionAbsolute.x+C,y:E.internals.positionAbsolute.y+k};a&&(I=Pi(I,u));const{position:N,positionAbsolute:M}=bg({nodeId:E.id,nextPosition:I,nodeLookup:m,nodeExtent:s,nodeOrigin:v,onError:f});E.position=N,E.internals.positionAbsolute=M,g.set(E.id,E)}h(g)},[])}const Pc=X.createContext(null),ik=Pc.Provider;Pc.Consumer;const lm=()=>X.useContext(Pc),sk=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),lk=(t,r,i)=>s=>{const{connectionClickStartHandle:a,connectionMode:u,connection:d}=s,{fromHandle:f,toHandle:h,isValid:m}=d,v=(h==null?void 0:h.nodeId)===t&&(h==null?void 0:h.id)===r&&(h==null?void 0:h.type)===i;return{connectingFrom:(f==null?void 0:f.nodeId)===t&&(f==null?void 0:f.id)===r&&(f==null?void 0:f.type)===i,connectingTo:v,clickConnecting:(a==null?void 0:a.nodeId)===t&&(a==null?void 0:a.id)===r&&(a==null?void 0:a.type)===i,isPossibleEndHandle:u===ao.Strict?(f==null?void 0:f.type)!==i:t!==(f==null?void 0:f.nodeId)||r!==(f==null?void 0:f.id),connectionInProcess:!!f,clickConnectionInProcess:!!a,valid:v&&m}};function ak({type:t="source",position:r=xe.Top,isValidConnection:i,isConnectable:s=!0,isConnectableStart:a=!0,isConnectableEnd:u=!0,id:d,onConnect:f,children:h,className:m,onMouseDown:v,onTouchStart:g,...y},w){var U,O;const S=d||null,C=t==="target",k=Fe(),E=lm(),{connectOnClick:I,noPanClassName:N,rfId:M}=be(sk,Oe),{connectingFrom:F,connectingTo:A,clickConnecting:B,isPossibleEndHandle:G,connectionInProcess:q,clickConnectionInProcess:ee,valid:D}=be(lk(E,S,t),Oe);E||(O=(U=k.getState()).onError)==null||O.call(U,"010",Gt.error010());const V=W=>{const{defaultEdgeOptions:L,onConnect:T,hasDefaultEdges:H}=k.getState(),b={...L,...W};if(H){const{edges:j,setEdges:te,onError:oe}=k.getState();te(HS(b,j,{onError:oe}))}T==null||T(b),f==null||f(b)},J=W=>{if(!E)return;const L=Lg(W.nativeEvent);if(a&&(L&&W.button===0||!L)){const T=k.getState();ac.onPointerDown(W.nativeEvent,{handleDomNode:W.currentTarget,autoPanOnConnect:T.autoPanOnConnect,connectionMode:T.connectionMode,connectionRadius:T.connectionRadius,domNode:T.domNode,nodeLookup:T.nodeLookup,lib:T.lib,isTarget:C,handleId:S,nodeId:E,flowId:T.rfId,panBy:T.panBy,cancelConnection:T.cancelConnection,onConnectStart:T.onConnectStart,onConnectEnd:(...H)=>{var b,j;return(j=(b=k.getState()).onConnectEnd)==null?void 0:j.call(b,...H)},updateConnection:T.updateConnection,onConnect:V,isValidConnection:i||((...H)=>{var b,j;return((j=(b=k.getState()).isValidConnection)==null?void 0:j.call(b,...H))??!0}),getTransform:()=>k.getState().transform,getFromHandle:()=>k.getState().connection.fromHandle,autoPanSpeed:T.autoPanSpeed,dragThreshold:T.connectionDragThreshold})}L?v==null||v(W):g==null||g(W)},z=W=>{const{onClickConnectStart:L,onClickConnectEnd:T,connectionClickStartHandle:H,connectionMode:b,isValidConnection:j,lib:te,rfId:oe,nodeLookup:ae,connection:ce}=k.getState();if(!E||!H&&!a)return;if(!H){L==null||L(W.nativeEvent,{nodeId:E,handleId:S,handleType:t}),k.setState({connectionClickStartHandle:{nodeId:E,type:t,id:S}});return}const ue=jg(W.target),Z=i||j,{connection:se,isValid:ge}=ac.isValid(W.nativeEvent,{handle:{nodeId:E,id:S,type:t},connectionMode:b,fromNodeId:H.nodeId,fromHandleId:H.id||null,fromType:H.type,isValidConnection:Z,flowId:oe,doc:ue,lib:te,nodeLookup:ae});ge&&se&&V(se);const we=structuredClone(ce);delete we.inProgress,we.toPosition=we.toHandle?we.toHandle.position:null,T==null||T(W,we),k.setState({connectionClickStartHandle:null})};return _.jsx("div",{"data-handleid":S,"data-nodeid":E,"data-handlepos":r,"data-id":`${M}-${E}-${S}-${t}`,className:Xe(["react-flow__handle",`react-flow__handle-${r}`,"nodrag",N,m,{source:!C,target:C,connectable:s,connectablestart:a,connectableend:u,clickconnecting:B,connectingfrom:F,connectingto:A,valid:D,connectionindicator:s&&(!q||G)&&(q||ee?u:a)}]),onMouseDown:J,onTouchStart:J,onClick:I?z:void 0,ref:w,...y,children:h})}const Sl=X.memo(rm(ak));function uk({data:t,isConnectable:r,sourcePosition:i=xe.Bottom}){return _.jsxs(_.Fragment,{children:[t==null?void 0:t.label,_.jsx(Sl,{type:"source",position:i,isConnectable:r})]})}function ck({data:t,isConnectable:r,targetPosition:i=xe.Top,sourcePosition:s=xe.Bottom}){return _.jsxs(_.Fragment,{children:[_.jsx(Sl,{type:"target",position:i,isConnectable:r}),t==null?void 0:t.label,_.jsx(Sl,{type:"source",position:s,isConnectable:r})]})}function dk(){return null}function fk({data:t,isConnectable:r,targetPosition:i=xe.Top}){return _.jsxs(_.Fragment,{children:[_.jsx(Sl,{type:"target",position:i,isConnectable:r}),t==null?void 0:t.label]})}const kl={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},gh={input:uk,default:ck,output:fk,group:dk};function pk(t){var r,i,s,a;return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??((r=t.style)==null?void 0:r.width),height:t.height??t.initialHeight??((i=t.style)==null?void 0:i.height)}:{width:t.width??((s=t.style)==null?void 0:s.width),height:t.height??((a=t.style)==null?void 0:a.height)}}const hk=t=>{const{width:r,height:i,x:s,y:a}=Mi(t.nodeLookup,{filter:u=>!!u.selected});return{width:Yt(r)?r:null,height:Yt(i)?i:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${s}px,${a}px)`}};function gk({onSelectionContextMenu:t,noPanClassName:r,disableKeyboardA11y:i}){const s=Fe(),{width:a,height:u,transformString:d,userSelectionActive:f}=be(hk,Oe),h=sm(),m=X.useRef(null);X.useEffect(()=>{var w;i||(w=m.current)==null||w.focus({preventScroll:!0})},[i]);const v=!f&&a!==null&&u!==null;if(im({nodeRef:m,disabled:!v}),!v)return null;const g=t?w=>{const S=s.getState().nodes.filter(C=>C.selected);t(w,S)}:void 0,y=w=>{Object.prototype.hasOwnProperty.call(kl,w.key)&&(w.preventDefault(),h({direction:kl[w.key],factor:w.shiftKey?4:1}))};return _.jsx("div",{className:Xe(["react-flow__nodesselection","react-flow__container",r]),style:{transform:d},children:_.jsx("div",{ref:m,className:"react-flow__nodesselection-rect",onContextMenu:g,tabIndex:i?void 0:-1,onKeyDown:i?void 0:y,style:{width:a,height:u}})})}const mh=typeof window<"u"?window:void 0,mk=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function am({children:t,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:s,onPaneMouseLeave:a,onPaneContextMenu:u,onPaneScroll:d,paneClickDistance:f,deleteKeyCode:h,selectionKeyCode:m,selectionOnDrag:v,selectionMode:g,onSelectionStart:y,onSelectionEnd:w,multiSelectionKeyCode:S,panActivationKeyCode:C,zoomActivationKeyCode:k,elementsSelectable:E,zoomOnScroll:I,zoomOnPinch:N,panOnScroll:M,panOnScrollSpeed:F,panOnScrollMode:A,zoomOnDoubleClick:B,panOnDrag:G,autoPanOnSelection:q,defaultViewport:ee,translateExtent:D,minZoom:V,maxZoom:J,preventScrolling:z,onSelectionContextMenu:U,noWheelClassName:O,noPanClassName:W,disableKeyboardA11y:L,onViewportChange:T,isControlledViewport:H}){const{nodesSelectionActive:b,userSelectionActive:j}=be(mk,Oe),te=_i(m,{target:mh}),oe=_i(C,{target:mh}),ae=oe||G,ce=oe||M,ue=v&&ae!==!0,Z=te||j||ue;return qS({deleteKeyCode:h,multiSelectionKeyCode:S}),_.jsx(JS,{onPaneContextMenu:u,elementsSelectable:E,zoomOnScroll:I,zoomOnPinch:N,panOnScroll:ce,panOnScrollSpeed:F,panOnScrollMode:A,zoomOnDoubleClick:B,panOnDrag:!te&&ae,defaultViewport:ee,translateExtent:D,minZoom:V,maxZoom:J,zoomActivationKeyCode:k,preventScrolling:z,noWheelClassName:O,noPanClassName:W,onViewportChange:T,isControlledViewport:H,paneClickDistance:f,selectionOnDrag:ue,children:_.jsxs(rk,{onSelectionStart:y,onSelectionEnd:w,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:s,onPaneMouseLeave:a,onPaneContextMenu:u,onPaneScroll:d,panOnDrag:ae,autoPanOnSelection:q,isSelecting:!!Z,selectionMode:g,selectionKeyPressed:te,paneClickDistance:f,selectionOnDrag:ue,children:[t,b&&_.jsx(gk,{onSelectionContextMenu:U,noPanClassName:W,disableKeyboardA11y:L})]})})}am.displayName="FlowRenderer";const yk=X.memo(am),vk=t=>r=>t?xc(r.nodeLookup,{x:0,y:0,width:r.width,height:r.height},r.transform,!0).map(i=>i.id):Array.from(r.nodeLookup.keys());function xk(t){return be(X.useCallback(vk(t),[t]),Oe)}const wk=t=>t.updateNodeInternals;function Sk(){const t=be(wk),[r]=X.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(i=>{const s=new Map;i.forEach(a=>{const u=a.target.getAttribute("data-id");s.set(u,{id:u,nodeElement:a.target,force:!0})}),t(s)}));return X.useEffect(()=>()=>{r==null||r.disconnect()},[r]),r}function kk({node:t,nodeType:r,hasDimensions:i,resizeObserver:s}){const a=Fe(),u=X.useRef(null),d=X.useRef(null),f=X.useRef(t.sourcePosition),h=X.useRef(t.targetPosition),m=X.useRef(r),v=i&&!!t.internals.handleBounds;return X.useEffect(()=>{u.current&&!t.hidden&&(!v||d.current!==u.current)&&(d.current&&(s==null||s.unobserve(d.current)),s==null||s.observe(u.current),d.current=u.current)},[v,t.hidden]),X.useEffect(()=>()=>{d.current&&(s==null||s.unobserve(d.current),d.current=null)},[]),X.useEffect(()=>{if(u.current){const g=m.current!==r,y=f.current!==t.sourcePosition,w=h.current!==t.targetPosition;(g||y||w)&&(m.current=r,f.current=t.sourcePosition,h.current=t.targetPosition,a.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:u.current,force:!0}]])))}},[t.id,r,t.sourcePosition,t.targetPosition]),u}function _k({id:t,onClick:r,onMouseEnter:i,onMouseMove:s,onMouseLeave:a,onContextMenu:u,onDoubleClick:d,nodesDraggable:f,elementsSelectable:h,nodesConnectable:m,nodesFocusable:v,resizeObserver:g,noDragClassName:y,noPanClassName:w,disableKeyboardA11y:S,rfId:C,nodeTypes:k,nodeClickDistance:E,onError:I}){const{node:N,internals:M,isParent:F}=be(Z=>{const se=Z.nodeLookup.get(t),ge=Z.parentLookup.has(t);return{node:se,internals:se.internals,isParent:ge}},Oe);let A=N.type||"default",B=(k==null?void 0:k[A])||gh[A];B===void 0&&(I==null||I("003",Gt.error003(A)),A="default",B=(k==null?void 0:k.default)||gh.default);const G=!!(N.draggable||f&&typeof N.draggable>"u"),q=!!(N.selectable||h&&typeof N.selectable>"u"),ee=!!(N.connectable||m&&typeof N.connectable>"u"),D=!!(N.focusable||v&&typeof N.focusable>"u"),V=Fe(),J=Ig(N),z=kk({node:N,nodeType:A,hasDimensions:J,resizeObserver:g}),U=im({nodeRef:z,disabled:N.hidden||!G,noDragClassName:y,handleSelector:N.dragHandle,nodeId:t,isSelectable:q,nodeClickDistance:E}),O=sm();if(N.hidden)return null;const W=_n(N),L=pk(N),T=q||G||r||i||s||a,H=i?Z=>i(Z,{...M.userNode}):void 0,b=s?Z=>s(Z,{...M.userNode}):void 0,j=a?Z=>a(Z,{...M.userNode}):void 0,te=u?Z=>u(Z,{...M.userNode}):void 0,oe=d?Z=>d(Z,{...M.userNode}):void 0,ae=Z=>{const{selectNodesOnDrag:se,nodeDragThreshold:ge}=V.getState();q&&(!se||!G||ge>0)&&uc({id:t,store:V,nodeRef:z}),r&&r(Z,{...M.userNode})},ce=Z=>{if(!(Rg(Z.nativeEvent)||S)){if(kg.includes(Z.key)&&q){const se=Z.key==="Escape";uc({id:t,store:V,unselect:se,nodeRef:z})}else if(G&&N.selected&&Object.prototype.hasOwnProperty.call(kl,Z.key)){Z.preventDefault();const{ariaLabelConfig:se}=V.getState();V.setState({ariaLiveMessage:se["node.a11yDescription.ariaLiveMessage"]({direction:Z.key.replace("Arrow","").toLowerCase(),x:~~M.positionAbsolute.x,y:~~M.positionAbsolute.y})}),O({direction:kl[Z.key],factor:Z.shiftKey?4:1})}}},ue=()=>{var Ee;if(S||!((Ee=z.current)!=null&&Ee.matches(":focus-visible")))return;const{transform:Z,width:se,height:ge,autoPanOnNodeFocus:we,setCenter:ve}=V.getState();if(!we)return;xc(new Map([[t,N]]),{x:0,y:0,width:se,height:ge},Z,!0).length>0||ve(N.position.x+W.width/2,N.position.y+W.height/2,{zoom:Z[2]})};return _.jsx("div",{className:Xe(["react-flow__node",`react-flow__node-${A}`,{[w]:G},N.className,{selected:N.selected,selectable:q,parent:F,draggable:G,dragging:U}]),ref:z,style:{zIndex:M.z,transform:`translate(${M.positionAbsolute.x}px,${M.positionAbsolute.y}px)`,pointerEvents:T?"all":"none",visibility:J?"visible":"hidden",...N.style,...L},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:H,onMouseMove:b,onMouseLeave:j,onContextMenu:te,onClick:ae,onDoubleClick:oe,onKeyDown:D?ce:void 0,tabIndex:D?0:void 0,onFocus:D?ue:void 0,role:N.ariaRole??(D?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${Jg}-${C}`,"aria-label":N.ariaLabel,...N.domAttributes,children:_.jsx(ik,{value:t,children:_.jsx(B,{id:t,data:N.data,type:A,positionAbsoluteX:M.positionAbsolute.x,positionAbsoluteY:M.positionAbsolute.y,selected:N.selected??!1,selectable:q,draggable:G,deletable:N.deletable??!0,isConnectable:ee,sourcePosition:N.sourcePosition,targetPosition:N.targetPosition,dragging:U,dragHandle:N.dragHandle,zIndex:M.z,parentId:N.parentId,...W})})})}var Ek=X.memo(_k);const Nk=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function um(t){const{nodesDraggable:r,nodesConnectable:i,nodesFocusable:s,elementsSelectable:a,onError:u}=be(Nk,Oe),d=xk(t.onlyRenderVisibleElements),f=Sk();return _.jsx("div",{className:"react-flow__nodes",style:jl,children:d.map(h=>_.jsx(Ek,{id:h,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:f,nodesDraggable:r,nodesConnectable:i,nodesFocusable:s,elementsSelectable:a,nodeClickDistance:t.nodeClickDistance,onError:u},h))})}um.displayName="NodeRenderer";const Ck=X.memo(um);function bk(t){return be(X.useCallback(i=>{if(!t)return i.edges.map(a=>a.id);const s=[];if(i.width&&i.height)for(const a of i.edges){const u=i.nodeLookup.get(a.source),d=i.nodeLookup.get(a.target);u&&d&&k2({sourceNode:u,targetNode:d,width:i.width,height:i.height,transform:i.transform})&&s.push(a.id)}return s},[t]),Oe)}const Mk=({color:t="none",strokeWidth:r=1})=>{const i={strokeWidth:r,...t&&{stroke:t}};return _.jsx("polyline",{className:"arrow",style:i,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},Pk=({color:t="none",strokeWidth:r=1})=>{const i={strokeWidth:r,...t&&{stroke:t,fill:t}};return _.jsx("polyline",{className:"arrowclosed",style:i,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},yh={[xl.Arrow]:Mk,[xl.ArrowClosed]:Pk};function zk(t){const r=Fe();return X.useMemo(()=>{var a,u;return Object.prototype.hasOwnProperty.call(yh,t)?yh[t]:((u=(a=r.getState()).onError)==null||u.call(a,"009",Gt.error009(t)),null)},[t])}const Ik=({id:t,type:r,color:i,width:s=12.5,height:a=12.5,markerUnits:u="strokeWidth",strokeWidth:d,orient:f="auto-start-reverse"})=>{const h=zk(r);return h?_.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${s}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:u,orient:f,refX:"0",refY:"0",children:_.jsx(h,{color:i,strokeWidth:d})}):null},cm=({defaultColor:t,rfId:r})=>{const i=be(u=>u.edges),s=be(u=>u.defaultEdgeOptions),a=X.useMemo(()=>z2(i,{id:r,defaultColor:t,defaultMarkerStart:s==null?void 0:s.markerStart,defaultMarkerEnd:s==null?void 0:s.markerEnd}),[i,s,r,t]);return a.length?_.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:_.jsx("defs",{children:a.map(u=>_.jsx(Ik,{id:u.id,type:u.type,color:u.color,width:u.width,height:u.height,markerUnits:u.markerUnits,strokeWidth:u.strokeWidth,orient:u.orient},u.id))})}):null};cm.displayName="MarkerDefinitions";var Tk=X.memo(cm);function dm({x:t,y:r,label:i,labelStyle:s,labelShowBg:a=!0,labelBgStyle:u,labelBgPadding:d=[2,4],labelBgBorderRadius:f=2,children:h,className:m,...v}){const[g,y]=X.useState({x:1,y:0,width:0,height:0}),w=Xe(["react-flow__edge-textwrapper",m]),S=X.useRef(null);return X.useEffect(()=>{if(S.current){const C=S.current.getBBox();y({x:C.x,y:C.y,width:C.width,height:C.height})}},[i]),i?_.jsxs("g",{transform:`translate(${t-g.width/2} ${r-g.height/2})`,className:w,visibility:g.width?"visible":"hidden",...v,children:[a&&_.jsx("rect",{width:g.width+2*d[0],x:-d[0],y:-d[1],height:g.height+2*d[1],className:"react-flow__edge-textbg",style:u,rx:f,ry:f}),_.jsx("text",{className:"react-flow__edge-text",y:g.height/2,dy:"0.3em",ref:S,style:s,children:i}),h]}):null}dm.displayName="EdgeText";const jk=X.memo(dm);function Rl({path:t,labelX:r,labelY:i,label:s,labelStyle:a,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,interactionWidth:m=20,...v}){return _.jsxs(_.Fragment,{children:[_.jsx("path",{...v,d:t,fill:"none",className:Xe(["react-flow__edge-path",v.className])}),m?_.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:m,className:"react-flow__edge-interaction"}):null,s&&Yt(r)&&Yt(i)?_.jsx(jk,{x:r,y:i,label:s,labelStyle:a,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h}):null]})}function vh({pos:t,x1:r,y1:i,x2:s,y2:a}){return t===xe.Left||t===xe.Right?[.5*(r+s),i]:[r,.5*(i+a)]}function fm({sourceX:t,sourceY:r,sourcePosition:i=xe.Bottom,targetX:s,targetY:a,targetPosition:u=xe.Top}){const[d,f]=vh({pos:i,x1:t,y1:r,x2:s,y2:a}),[h,m]=vh({pos:u,x1:s,y1:a,x2:t,y2:r}),[v,g,y,w]=Ag({sourceX:t,sourceY:r,targetX:s,targetY:a,sourceControlX:d,sourceControlY:f,targetControlX:h,targetControlY:m});return[`M${t},${r} C${d},${f} ${h},${m} ${s},${a}`,v,g,y,w]}function pm(t){return X.memo(({id:r,sourceX:i,sourceY:s,targetX:a,targetY:u,sourcePosition:d,targetPosition:f,label:h,labelStyle:m,labelShowBg:v,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:w,style:S,markerEnd:C,markerStart:k,interactionWidth:E})=>{const[I,N,M]=fm({sourceX:i,sourceY:s,sourcePosition:d,targetX:a,targetY:u,targetPosition:f}),F=t.isInternal?void 0:r;return _.jsx(Rl,{id:F,path:I,labelX:N,labelY:M,label:h,labelStyle:m,labelShowBg:v,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:w,style:S,markerEnd:C,markerStart:k,interactionWidth:E})})}const Rk=pm({isInternal:!1}),hm=pm({isInternal:!0});Rk.displayName="SimpleBezierEdge";hm.displayName="SimpleBezierEdgeInternal";function gm(t){return X.memo(({id:r,sourceX:i,sourceY:s,targetX:a,targetY:u,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:v,labelBgBorderRadius:g,style:y,sourcePosition:w=xe.Bottom,targetPosition:S=xe.Top,markerEnd:C,markerStart:k,pathOptions:E,interactionWidth:I})=>{const[N,M,F]=ic({sourceX:i,sourceY:s,sourcePosition:w,targetX:a,targetY:u,targetPosition:S,borderRadius:E==null?void 0:E.borderRadius,offset:E==null?void 0:E.offset,stepPosition:E==null?void 0:E.stepPosition}),A=t.isInternal?void 0:r;return _.jsx(Rl,{id:A,path:N,labelX:M,labelY:F,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:v,labelBgBorderRadius:g,style:y,markerEnd:C,markerStart:k,interactionWidth:I})})}const mm=gm({isInternal:!1}),ym=gm({isInternal:!0});mm.displayName="SmoothStepEdge";ym.displayName="SmoothStepEdgeInternal";function vm(t){return X.memo(({id:r,...i})=>{var a;const s=t.isInternal?void 0:r;return _.jsx(mm,{...i,id:s,pathOptions:X.useMemo(()=>{var u;return{borderRadius:0,offset:(u=i.pathOptions)==null?void 0:u.offset}},[(a=i.pathOptions)==null?void 0:a.offset])})})}const Lk=vm({isInternal:!1}),xm=vm({isInternal:!0});Lk.displayName="StepEdge";xm.displayName="StepEdgeInternal";function wm(t){return X.memo(({id:r,sourceX:i,sourceY:s,targetX:a,targetY:u,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:v,labelBgBorderRadius:g,style:y,markerEnd:w,markerStart:S,interactionWidth:C})=>{const[k,E,I]=Og({sourceX:i,sourceY:s,targetX:a,targetY:u}),N=t.isInternal?void 0:r;return _.jsx(Rl,{id:N,path:k,labelX:E,labelY:I,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:v,labelBgBorderRadius:g,style:y,markerEnd:w,markerStart:S,interactionWidth:C})})}const Ak=wm({isInternal:!1}),Sm=wm({isInternal:!0});Ak.displayName="StraightEdge";Sm.displayName="StraightEdgeInternal";function km(t){return X.memo(({id:r,sourceX:i,sourceY:s,targetX:a,targetY:u,sourcePosition:d=xe.Bottom,targetPosition:f=xe.Top,label:h,labelStyle:m,labelShowBg:v,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:w,style:S,markerEnd:C,markerStart:k,pathOptions:E,interactionWidth:I})=>{const[N,M,F]=$g({sourceX:i,sourceY:s,sourcePosition:d,targetX:a,targetY:u,targetPosition:f,curvature:E==null?void 0:E.curvature}),A=t.isInternal?void 0:r;return _.jsx(Rl,{id:A,path:N,labelX:M,labelY:F,label:h,labelStyle:m,labelShowBg:v,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:w,style:S,markerEnd:C,markerStart:k,interactionWidth:I})})}const $k=km({isInternal:!1}),_m=km({isInternal:!0});$k.displayName="BezierEdge";_m.displayName="BezierEdgeInternal";const xh={default:_m,straight:Sm,step:xm,smoothstep:ym,simplebezier:hm},wh={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Dk=(t,r,i)=>i===xe.Left?t-r:i===xe.Right?t+r:t,Ok=(t,r,i)=>i===xe.Top?t-r:i===xe.Bottom?t+r:t,Sh="react-flow__edgeupdater";function kh({position:t,centerX:r,centerY:i,radius:s=10,onMouseDown:a,onMouseEnter:u,onMouseOut:d,type:f}){return _.jsx("circle",{onMouseDown:a,onMouseEnter:u,onMouseOut:d,className:Xe([Sh,`${Sh}-${f}`]),cx:Dk(r,s,t),cy:Ok(i,s,t),r:s,stroke:"transparent",fill:"transparent"})}function Fk({isReconnectable:t,reconnectRadius:r,edge:i,sourceX:s,sourceY:a,targetX:u,targetY:d,sourcePosition:f,targetPosition:h,onReconnect:m,onReconnectStart:v,onReconnectEnd:g,setReconnecting:y,setUpdateHover:w}){const S=Fe(),C=(M,F)=>{if(M.button!==0)return;const{autoPanOnConnect:A,domNode:B,connectionMode:G,connectionRadius:q,lib:ee,onConnectStart:D,cancelConnection:V,nodeLookup:J,rfId:z,panBy:U,updateConnection:O}=S.getState(),W=F.type==="target",L=(b,j)=>{y(!1),g==null||g(b,i,F.type,j)},T=b=>m==null?void 0:m(i,b),H=(b,j)=>{y(!0),v==null||v(M,i,F.type),D==null||D(b,j)};ac.onPointerDown(M.nativeEvent,{autoPanOnConnect:A,connectionMode:G,connectionRadius:q,domNode:B,handleId:F.id,nodeId:F.nodeId,nodeLookup:J,isTarget:W,edgeUpdaterType:F.type,lib:ee,flowId:z,cancelConnection:V,panBy:U,isValidConnection:(...b)=>{var j,te;return((te=(j=S.getState()).isValidConnection)==null?void 0:te.call(j,...b))??!0},onConnect:T,onConnectStart:H,onConnectEnd:(...b)=>{var j,te;return(te=(j=S.getState()).onConnectEnd)==null?void 0:te.call(j,...b)},onReconnectEnd:L,updateConnection:O,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,dragThreshold:S.getState().connectionDragThreshold,handleDomNode:M.currentTarget})},k=M=>C(M,{nodeId:i.target,id:i.targetHandle??null,type:"target"}),E=M=>C(M,{nodeId:i.source,id:i.sourceHandle??null,type:"source"}),I=()=>w(!0),N=()=>w(!1);return _.jsxs(_.Fragment,{children:[(t===!0||t==="source")&&_.jsx(kh,{position:f,centerX:s,centerY:a,radius:r,onMouseDown:k,onMouseEnter:I,onMouseOut:N,type:"source"}),(t===!0||t==="target")&&_.jsx(kh,{position:h,centerX:u,centerY:d,radius:r,onMouseDown:E,onMouseEnter:I,onMouseOut:N,type:"target"})]})}function Vk({id:t,edgesFocusable:r,edgesReconnectable:i,elementsSelectable:s,onClick:a,onDoubleClick:u,onContextMenu:d,onMouseEnter:f,onMouseMove:h,onMouseLeave:m,reconnectRadius:v,onReconnect:g,onReconnectStart:y,onReconnectEnd:w,rfId:S,edgeTypes:C,noPanClassName:k,onError:E,disableKeyboardA11y:I}){let N=be(ve=>ve.edgeLookup.get(t));const M=be(ve=>ve.defaultEdgeOptions);N=M?{...M,...N}:N;let F=N.type||"default",A=(C==null?void 0:C[F])||xh[F];A===void 0&&(E==null||E("011",Gt.error011(F)),F="default",A=(C==null?void 0:C.default)||xh.default);const B=!!(N.focusable||r&&typeof N.focusable>"u"),G=typeof g<"u"&&(N.reconnectable||i&&typeof N.reconnectable>"u"),q=!!(N.selectable||s&&typeof N.selectable>"u"),ee=X.useRef(null),[D,V]=X.useState(!1),[J,z]=X.useState(!1),U=Fe(),{zIndex:O,sourceX:W,sourceY:L,targetX:T,targetY:H,sourcePosition:b,targetPosition:j}=be(X.useCallback(ve=>{const me=ve.nodeLookup.get(N.source),Ee=ve.nodeLookup.get(N.target);if(!me||!Ee)return{zIndex:N.zIndex,...wh};const Me=P2({id:t,sourceNode:me,targetNode:Ee,sourceHandle:N.sourceHandle||null,targetHandle:N.targetHandle||null,connectionMode:ve.connectionMode,onError:E});return{zIndex:S2({selected:N.selected,zIndex:N.zIndex,sourceNode:me,targetNode:Ee,elevateOnSelect:ve.elevateEdgesOnSelect,zIndexMode:ve.zIndexMode}),...Me||wh}},[N.source,N.target,N.sourceHandle,N.targetHandle,N.selected,N.zIndex]),Oe),te=X.useMemo(()=>N.markerStart?`url('#${sc(N.markerStart,S)}')`:void 0,[N.markerStart,S]),oe=X.useMemo(()=>N.markerEnd?`url('#${sc(N.markerEnd,S)}')`:void 0,[N.markerEnd,S]);if(N.hidden||W===null||L===null||T===null||H===null)return null;const ae=ve=>{var Ie;const{addSelectedEdges:me,unselectNodesAndEdges:Ee,multiSelectionActive:Me}=U.getState();q&&(U.setState({nodesSelectionActive:!1}),N.selected&&Me?(Ee({nodes:[],edges:[N]}),(Ie=ee.current)==null||Ie.blur()):me([t])),a&&a(ve,N)},ce=u?ve=>{u(ve,{...N})}:void 0,ue=d?ve=>{d(ve,{...N})}:void 0,Z=f?ve=>{f(ve,{...N})}:void 0,se=h?ve=>{h(ve,{...N})}:void 0,ge=m?ve=>{m(ve,{...N})}:void 0,we=ve=>{var me;if(!I&&kg.includes(ve.key)&&q){const{unselectNodesAndEdges:Ee,addSelectedEdges:Me}=U.getState();ve.key==="Escape"?((me=ee.current)==null||me.blur(),Ee({edges:[N]})):Me([t])}};return _.jsx("svg",{style:{zIndex:O},children:_.jsxs("g",{className:Xe(["react-flow__edge",`react-flow__edge-${F}`,N.className,k,{selected:N.selected,animated:N.animated,inactive:!q&&!a,updating:D,selectable:q}]),onClick:ae,onDoubleClick:ce,onContextMenu:ue,onMouseEnter:Z,onMouseMove:se,onMouseLeave:ge,onKeyDown:B?we:void 0,tabIndex:B?0:void 0,role:N.ariaRole??(B?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":N.ariaLabel===null?void 0:N.ariaLabel||`Edge from ${N.source} to ${N.target}`,"aria-describedby":B?`${em}-${S}`:void 0,ref:ee,...N.domAttributes,children:[!J&&_.jsx(A,{id:t,source:N.source,target:N.target,type:N.type,selected:N.selected,animated:N.animated,selectable:q,deletable:N.deletable??!0,label:N.label,labelStyle:N.labelStyle,labelShowBg:N.labelShowBg,labelBgStyle:N.labelBgStyle,labelBgPadding:N.labelBgPadding,labelBgBorderRadius:N.labelBgBorderRadius,sourceX:W,sourceY:L,targetX:T,targetY:H,sourcePosition:b,targetPosition:j,data:N.data,style:N.style,sourceHandleId:N.sourceHandle,targetHandleId:N.targetHandle,markerStart:te,markerEnd:oe,pathOptions:"pathOptions"in N?N.pathOptions:void 0,interactionWidth:N.interactionWidth}),G&&_.jsx(Fk,{edge:N,isReconnectable:G,reconnectRadius:v,onReconnect:g,onReconnectStart:y,onReconnectEnd:w,sourceX:W,sourceY:L,targetX:T,targetY:H,sourcePosition:b,targetPosition:j,setUpdateHover:V,setReconnecting:z})]})})}var Hk=X.memo(Vk);const Bk=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function Em({defaultMarkerColor:t,onlyRenderVisibleElements:r,rfId:i,edgeTypes:s,noPanClassName:a,onReconnect:u,onEdgeContextMenu:d,onEdgeMouseEnter:f,onEdgeMouseMove:h,onEdgeMouseLeave:m,onEdgeClick:v,reconnectRadius:g,onEdgeDoubleClick:y,onReconnectStart:w,onReconnectEnd:S,disableKeyboardA11y:C}){const{edgesFocusable:k,edgesReconnectable:E,elementsSelectable:I,onError:N}=be(Bk,Oe),M=bk(r);return _.jsxs("div",{className:"react-flow__edges",children:[_.jsx(Tk,{defaultColor:t,rfId:i}),M.map(F=>_.jsx(Hk,{id:F,edgesFocusable:k,edgesReconnectable:E,elementsSelectable:I,noPanClassName:a,onReconnect:u,onContextMenu:d,onMouseEnter:f,onMouseMove:h,onMouseLeave:m,onClick:v,reconnectRadius:g,onDoubleClick:y,onReconnectStart:w,onReconnectEnd:S,rfId:i,onError:N,edgeTypes:s,disableKeyboardA11y:C},F))]})}Em.displayName="EdgeRenderer";const Wk=X.memo(Em),Uk=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function Yk({children:t}){const r=be(Uk);return _.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:r},children:t})}function Xk(t){const r=Mc(),i=X.useRef(!1);X.useEffect(()=>{!i.current&&r.viewportInitialized&&t&&(setTimeout(()=>t(r),1),i.current=!0)},[t,r.viewportInitialized])}const Gk=t=>{var r;return(r=t.panZoom)==null?void 0:r.syncViewport};function Qk(t){const r=be(Gk),i=Fe();return X.useEffect(()=>{t&&(r==null||r(t),i.setState({transform:[t.x,t.y,t.zoom]}))},[t,r]),null}function qk(t){return t.connection.inProgress?{...t.connection,to:go(t.connection.to,t.transform)}:{...t.connection}}function Kk(t){return qk}function Zk(t){const r=Kk();return be(r,Oe)}const Jk=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function e_({containerStyle:t,style:r,type:i,component:s}){const{nodesConnectable:a,width:u,height:d,isValid:f,inProgress:h}=be(Jk,Oe);return!(u&&a&&h)?null:_.jsx("svg",{style:t,width:u,height:d,className:"react-flow__connectionline react-flow__container",children:_.jsx("g",{className:Xe(["react-flow__connection",Ng(f)]),children:_.jsx(Nm,{style:r,type:i,CustomComponent:s,isValid:f})})})}const Nm=({style:t,type:r=Qn.Bezier,CustomComponent:i,isValid:s})=>{const{inProgress:a,from:u,fromNode:d,fromHandle:f,fromPosition:h,to:m,toNode:v,toHandle:g,toPosition:y,pointer:w}=Zk();if(!a)return;if(i)return _.jsx(i,{connectionLineType:r,connectionLineStyle:t,fromNode:d,fromHandle:f,fromX:u.x,fromY:u.y,toX:m.x,toY:m.y,fromPosition:h,toPosition:y,connectionStatus:Ng(s),toNode:v,toHandle:g,pointer:w});let S="";const C={sourceX:u.x,sourceY:u.y,sourcePosition:h,targetX:m.x,targetY:m.y,targetPosition:y};switch(r){case Qn.Bezier:[S]=$g(C);break;case Qn.SimpleBezier:[S]=fm(C);break;case Qn.Step:[S]=ic({...C,borderRadius:0});break;case Qn.SmoothStep:[S]=ic(C);break;default:[S]=Og(C)}return _.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:t})};Nm.displayName="ConnectionLine";const t_={};function _h(t=t_){X.useRef(t),Fe(),X.useEffect(()=>{},[t])}function n_(){Fe(),X.useRef(!1),X.useEffect(()=>{},[])}function Cm({nodeTypes:t,edgeTypes:r,onInit:i,onNodeClick:s,onEdgeClick:a,onNodeDoubleClick:u,onEdgeDoubleClick:d,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:v,onSelectionContextMenu:g,onSelectionStart:y,onSelectionEnd:w,connectionLineType:S,connectionLineStyle:C,connectionLineComponent:k,connectionLineContainerStyle:E,selectionKeyCode:I,selectionOnDrag:N,selectionMode:M,multiSelectionKeyCode:F,panActivationKeyCode:A,zoomActivationKeyCode:B,deleteKeyCode:G,onlyRenderVisibleElements:q,elementsSelectable:ee,defaultViewport:D,translateExtent:V,minZoom:J,maxZoom:z,preventScrolling:U,defaultMarkerColor:O,zoomOnScroll:W,zoomOnPinch:L,panOnScroll:T,panOnScrollSpeed:H,panOnScrollMode:b,zoomOnDoubleClick:j,panOnDrag:te,autoPanOnSelection:oe,onPaneClick:ae,onPaneMouseEnter:ce,onPaneMouseMove:ue,onPaneMouseLeave:Z,onPaneScroll:se,onPaneContextMenu:ge,paneClickDistance:we,nodeClickDistance:ve,onEdgeContextMenu:me,onEdgeMouseEnter:Ee,onEdgeMouseMove:Me,onEdgeMouseLeave:Ie,reconnectRadius:Re,onReconnect:ut,onReconnectStart:ft,onReconnectEnd:nt,noDragClassName:rt,noWheelClassName:ln,noPanClassName:qt,disableKeyboardA11y:Kt,nodeExtent:pt,rfId:zt,viewport:St,onViewportChange:It}){return _h(t),_h(r),n_(),Xk(i),Qk(St),_.jsx(yk,{onPaneClick:ae,onPaneMouseEnter:ce,onPaneMouseMove:ue,onPaneMouseLeave:Z,onPaneContextMenu:ge,onPaneScroll:se,paneClickDistance:we,deleteKeyCode:G,selectionKeyCode:I,selectionOnDrag:N,selectionMode:M,onSelectionStart:y,onSelectionEnd:w,multiSelectionKeyCode:F,panActivationKeyCode:A,zoomActivationKeyCode:B,elementsSelectable:ee,zoomOnScroll:W,zoomOnPinch:L,zoomOnDoubleClick:j,panOnScroll:T,panOnScrollSpeed:H,panOnScrollMode:b,panOnDrag:te,autoPanOnSelection:oe,defaultViewport:D,translateExtent:V,minZoom:J,maxZoom:z,onSelectionContextMenu:g,preventScrolling:U,noDragClassName:rt,noWheelClassName:ln,noPanClassName:qt,disableKeyboardA11y:Kt,onViewportChange:It,isControlledViewport:!!St,children:_.jsxs(Yk,{children:[_.jsx(Wk,{edgeTypes:r,onEdgeClick:a,onEdgeDoubleClick:d,onReconnect:ut,onReconnectStart:ft,onReconnectEnd:nt,onlyRenderVisibleElements:q,onEdgeContextMenu:me,onEdgeMouseEnter:Ee,onEdgeMouseMove:Me,onEdgeMouseLeave:Ie,reconnectRadius:Re,defaultMarkerColor:O,noPanClassName:qt,disableKeyboardA11y:Kt,rfId:zt}),_.jsx(e_,{style:C,type:S,component:k,containerStyle:E}),_.jsx("div",{className:"react-flow__edgelabel-renderer"}),_.jsx(Ck,{nodeTypes:t,onNodeClick:s,onNodeDoubleClick:u,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:v,nodeClickDistance:ve,onlyRenderVisibleElements:q,noPanClassName:qt,noDragClassName:rt,disableKeyboardA11y:Kt,nodeExtent:pt,rfId:zt}),_.jsx("div",{className:"react-flow__viewport-portal"})]})})}Cm.displayName="GraphView";const r_=X.memo(Cm),o_=zg(),Eh=({nodes:t,edges:r,defaultNodes:i,defaultEdges:s,width:a,height:u,fitView:d,fitViewOptions:f,minZoom:h=.5,maxZoom:m=2,nodeOrigin:v,nodeExtent:g,zIndexMode:y="basic"}={})=>{const w=new Map,S=new Map,C=new Map,k=new Map,E=s??r??[],I=i??t??[],N=v??[0,0],M=g??xi;Hg(C,k,E);const{nodesInitialized:F}=lc(I,w,S,{nodeOrigin:N,nodeExtent:M,zIndexMode:y});let A=[0,0,1];if(d&&a&&u){const B=Mi(w,{filter:D=>!!((D.width||D.initialWidth)&&(D.height||D.initialHeight))}),{x:G,y:q,zoom:ee}=Sc(B,a,u,h,m,(f==null?void 0:f.padding)??.1);A=[G,q,ee]}return{rfId:"1",width:a??0,height:u??0,transform:A,nodes:I,nodesInitialized:F,nodeLookup:w,parentLookup:S,edges:E,edgeLookup:k,connectionLookup:C,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:i!==void 0,hasDefaultEdges:s!==void 0,panZoom:null,minZoom:h,maxZoom:m,translateExtent:xi,nodeExtent:M,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:ao.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:N,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:d??!1,fitViewOptions:f,fitViewResolver:null,connection:{...Eg},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:o_,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:_g,zIndexMode:y,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},i_=({nodes:t,edges:r,defaultNodes:i,defaultEdges:s,width:a,height:u,fitView:d,fitViewOptions:f,minZoom:h,maxZoom:m,nodeOrigin:v,nodeExtent:g,zIndexMode:y})=>vS((w,S)=>{async function C(){const{nodeLookup:k,panZoom:E,fitViewOptions:I,fitViewResolver:N,width:M,height:F,minZoom:A,maxZoom:B}=S();E&&(await h2({nodes:k,width:M,height:F,panZoom:E,minZoom:A,maxZoom:B},I),N==null||N.resolve(!0),w({fitViewResolver:null}))}return{...Eh({nodes:t,edges:r,width:a,height:u,fitView:d,fitViewOptions:f,minZoom:h,maxZoom:m,nodeOrigin:v,nodeExtent:g,defaultNodes:i,defaultEdges:s,zIndexMode:y}),setNodes:k=>{const{nodeLookup:E,parentLookup:I,nodeOrigin:N,elevateNodesOnSelect:M,fitViewQueued:F,zIndexMode:A,nodesSelectionActive:B}=S(),{nodesInitialized:G,hasSelectedNodes:q}=lc(k,E,I,{nodeOrigin:N,nodeExtent:g,elevateNodesOnSelect:M,checkEquality:!0,zIndexMode:A}),ee=B&&q;F&&G?(C(),w({nodes:k,nodesInitialized:G,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:ee})):w({nodes:k,nodesInitialized:G,nodesSelectionActive:ee})},setEdges:k=>{const{connectionLookup:E,edgeLookup:I}=S();Hg(E,I,k),w({edges:k})},setDefaultNodesAndEdges:(k,E)=>{if(k){const{setNodes:I}=S();I(k),w({hasDefaultNodes:!0})}if(E){const{setEdges:I}=S();I(E),w({hasDefaultEdges:!0})}},updateNodeInternals:k=>{const{triggerNodeChanges:E,nodeLookup:I,parentLookup:N,domNode:M,nodeOrigin:F,nodeExtent:A,debug:B,fitViewQueued:G,zIndexMode:q}=S(),{changes:ee,updatedInternals:D}=$2(k,I,N,M,F,A,q);D&&(j2(I,N,{nodeOrigin:F,nodeExtent:A,zIndexMode:q}),G?(C(),w({fitViewQueued:!1,fitViewOptions:void 0})):w({}),(ee==null?void 0:ee.length)>0&&(B&&console.log("React Flow: trigger node changes",ee),E==null||E(ee)))},updateNodePositions:(k,E=!1)=>{const I=[];let N=[];const{nodeLookup:M,triggerNodeChanges:F,connection:A,updateConnection:B,onNodesChangeMiddlewareMap:G}=S();for(const[q,ee]of k){const D=M.get(q),V=!!(D!=null&&D.expandParent&&(D!=null&&D.parentId)&&(ee!=null&&ee.position)),J={id:q,type:"position",position:V?{x:Math.max(0,ee.position.x),y:Math.max(0,ee.position.y)}:ee.position,dragging:E};if(D&&A.inProgress&&A.fromNode.id===D.id){const z=Er(D,A.fromHandle,xe.Left,!0);B({...A,from:z})}V&&D.parentId&&I.push({id:q,parentId:D.parentId,rect:{...ee.internals.positionAbsolute,width:ee.measured.width??0,height:ee.measured.height??0}}),N.push(J)}if(I.length>0){const{parentLookup:q,nodeOrigin:ee}=S(),D=bc(I,M,q,ee);N.push(...D)}for(const q of G.values())N=q(N);F(N)},triggerNodeChanges:k=>{const{onNodesChange:E,setNodes:I,nodes:N,hasDefaultNodes:M,debug:F}=S();if(k!=null&&k.length){if(M){const A=OS(k,N);I(A)}F&&console.log("React Flow: trigger node changes",k),E==null||E(k)}},triggerEdgeChanges:k=>{const{onEdgesChange:E,setEdges:I,edges:N,hasDefaultEdges:M,debug:F}=S();if(k!=null&&k.length){if(M){const A=FS(k,N);I(A)}F&&console.log("React Flow: trigger edge changes",k),E==null||E(k)}},addSelectedNodes:k=>{const{multiSelectionActive:E,edgeLookup:I,nodeLookup:N,triggerNodeChanges:M,triggerEdgeChanges:F}=S();if(E){const A=k.map(B=>mr(B,!0));M(A);return}M(no(N,new Set([...k]),!0)),F(no(I))},addSelectedEdges:k=>{const{multiSelectionActive:E,edgeLookup:I,nodeLookup:N,triggerNodeChanges:M,triggerEdgeChanges:F}=S();if(E){const A=k.map(B=>mr(B,!0));F(A);return}F(no(I,new Set([...k]))),M(no(N,new Set,!0))},unselectNodesAndEdges:({nodes:k,edges:E}={})=>{const{edges:I,nodes:N,nodeLookup:M,triggerNodeChanges:F,triggerEdgeChanges:A}=S(),B=k||N,G=E||I,q=[];for(const D of B){if(!D.selected)continue;const V=M.get(D.id);V&&(V.selected=!1),q.push(mr(D.id,!1))}const ee=[];for(const D of G)D.selected&&ee.push(mr(D.id,!1));F(q),A(ee)},setMinZoom:k=>{const{panZoom:E,maxZoom:I}=S();E==null||E.setScaleExtent([k,I]),w({minZoom:k})},setMaxZoom:k=>{const{panZoom:E,minZoom:I}=S();E==null||E.setScaleExtent([I,k]),w({maxZoom:k})},setTranslateExtent:k=>{var E;(E=S().panZoom)==null||E.setTranslateExtent(k),w({translateExtent:k})},resetSelectedElements:()=>{const{edges:k,nodes:E,triggerNodeChanges:I,triggerEdgeChanges:N,elementsSelectable:M}=S();if(!M)return;const F=E.reduce((B,G)=>G.selected?[...B,mr(G.id,!1)]:B,[]),A=k.reduce((B,G)=>G.selected?[...B,mr(G.id,!1)]:B,[]);I(F),N(A)},setNodeExtent:k=>{const{nodes:E,nodeLookup:I,parentLookup:N,nodeOrigin:M,elevateNodesOnSelect:F,nodeExtent:A,zIndexMode:B}=S();k[0][0]===A[0][0]&&k[0][1]===A[0][1]&&k[1][0]===A[1][0]&&k[1][1]===A[1][1]||(lc(E,I,N,{nodeOrigin:M,nodeExtent:k,elevateNodesOnSelect:F,checkEquality:!1,zIndexMode:B}),w({nodeExtent:k}))},panBy:k=>{const{transform:E,width:I,height:N,panZoom:M,translateExtent:F}=S();return D2({delta:k,panZoom:M,transform:E,translateExtent:F,width:I,height:N})},setCenter:async(k,E,I)=>{const{width:N,height:M,maxZoom:F,panZoom:A}=S();if(!A)return!1;const B=typeof(I==null?void 0:I.zoom)<"u"?I.zoom:F;return await A.setViewport({x:N/2-k*B,y:M/2-E*B,zoom:B},{duration:I==null?void 0:I.duration,ease:I==null?void 0:I.ease,interpolate:I==null?void 0:I.interpolate}),!0},cancelConnection:()=>{w({connection:{...Eg}})},updateConnection:k=>{w({connection:k})},reset:()=>w({...Eh()})}},Object.is);function s_({initialNodes:t,initialEdges:r,defaultNodes:i,defaultEdges:s,initialWidth:a,initialHeight:u,initialMinZoom:d,initialMaxZoom:f,initialFitViewOptions:h,fitView:m,nodeOrigin:v,nodeExtent:g,zIndexMode:y,children:w}){const[S]=X.useState(()=>i_({nodes:t,edges:r,defaultNodes:i,defaultEdges:s,width:a,height:u,fitView:m,minZoom:d,maxZoom:f,fitViewOptions:h,nodeOrigin:v,nodeExtent:g,zIndexMode:y}));return _.jsx(xS,{value:S,children:_.jsx(YS,{children:w})})}function l_({children:t,nodes:r,edges:i,defaultNodes:s,defaultEdges:a,width:u,height:d,fitView:f,fitViewOptions:h,minZoom:m,maxZoom:v,nodeOrigin:g,nodeExtent:y,zIndexMode:w}){return X.useContext(Il)?_.jsx(_.Fragment,{children:t}):_.jsx(s_,{initialNodes:r,initialEdges:i,defaultNodes:s,defaultEdges:a,initialWidth:u,initialHeight:d,fitView:f,initialFitViewOptions:h,initialMinZoom:m,initialMaxZoom:v,nodeOrigin:g,nodeExtent:y,zIndexMode:w,children:t})}const a_={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function u_({nodes:t,edges:r,defaultNodes:i,defaultEdges:s,className:a,nodeTypes:u,edgeTypes:d,onNodeClick:f,onEdgeClick:h,onInit:m,onMove:v,onMoveStart:g,onMoveEnd:y,onConnect:w,onConnectStart:S,onConnectEnd:C,onClickConnectStart:k,onClickConnectEnd:E,onNodeMouseEnter:I,onNodeMouseMove:N,onNodeMouseLeave:M,onNodeContextMenu:F,onNodeDoubleClick:A,onNodeDragStart:B,onNodeDrag:G,onNodeDragStop:q,onNodesDelete:ee,onEdgesDelete:D,onDelete:V,onSelectionChange:J,onSelectionDragStart:z,onSelectionDrag:U,onSelectionDragStop:O,onSelectionContextMenu:W,onSelectionStart:L,onSelectionEnd:T,onBeforeDelete:H,connectionMode:b,connectionLineType:j=Qn.Bezier,connectionLineStyle:te,connectionLineComponent:oe,connectionLineContainerStyle:ae,deleteKeyCode:ce="Backspace",selectionKeyCode:ue="Shift",selectionOnDrag:Z=!1,selectionMode:se=wi.Full,panActivationKeyCode:ge="Space",multiSelectionKeyCode:we=ki()?"Meta":"Control",zoomActivationKeyCode:ve=ki()?"Meta":"Control",snapToGrid:me,snapGrid:Ee,onlyRenderVisibleElements:Me=!1,selectNodesOnDrag:Ie,nodesDraggable:Re,autoPanOnNodeFocus:ut,nodesConnectable:ft,nodesFocusable:nt,nodeOrigin:rt=tm,edgesFocusable:ln,edgesReconnectable:qt,elementsSelectable:Kt=!0,defaultViewport:pt=TS,minZoom:zt=.5,maxZoom:St=2,translateExtent:It=xi,preventScrolling:zi=!0,nodeExtent:an,defaultMarkerColor:Kn="#b1b1b7",zoomOnScroll:Ll=!0,zoomOnPinch:Ii=!0,panOnScroll:Ti=!1,panOnScrollSpeed:Al=.5,panOnScrollMode:mo=xr.Free,zoomOnDoubleClick:yo=!0,panOnDrag:vo=!0,onPaneClick:xo,onPaneMouseEnter:wo,onPaneMouseMove:En,onPaneMouseLeave:Nn,onPaneScroll:ji,onPaneContextMenu:Ri,paneClickDistance:Li=1,nodeClickDistance:Ai=0,children:$i,onReconnect:So,onReconnectStart:Di,onReconnectEnd:Zn,onEdgeContextMenu:ko,onEdgeDoubleClick:Jn,onEdgeMouseEnter:$l,onEdgeMouseMove:er,onEdgeMouseLeave:Nr,reconnectRadius:Cr=10,onNodesChange:_o,onEdgesChange:Dl,noDragClassName:Ol="nodrag",noWheelClassName:Fl="nowheel",noPanClassName:Zt="nopan",fitView:Eo,fitViewOptions:No,connectOnClick:Vl,attributionPosition:Oi,proOptions:Fi,defaultEdgeOptions:Vi,elevateNodesOnSelect:Hi=!0,elevateEdgesOnSelect:Hl=!1,disableKeyboardA11y:Bi=!1,autoPanOnConnect:Ve,autoPanOnNodeDrag:Bl,autoPanOnSelection:Co=!0,autoPanSpeed:Wi,connectionRadius:br,isValidConnection:Wl,onError:Ui,style:Mr,id:kt,nodeDragThreshold:Ul,connectionDragThreshold:_t,viewport:Yl,onViewportChange:Xl,width:Gl,height:Pr,colorMode:zr="light",debug:tr,onScroll:un,ariaLabelConfig:Ql,zIndexMode:Yi="basic",...bo},Xi){const nr=kt||"1",rr=AS(zr),ql=X.useCallback(Ir=>{Ir.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),un==null||un(Ir)},[un]);return _.jsx("div",{"data-testid":"rf__wrapper",...bo,onScroll:ql,style:{...Mr,...a_},ref:Xi,className:Xe(["react-flow",a,rr]),id:kt,role:"application",children:_.jsxs(l_,{nodes:t,edges:r,width:Gl,height:Pr,fitView:Eo,fitViewOptions:No,minZoom:zt,maxZoom:St,nodeOrigin:rt,nodeExtent:an,zIndexMode:Yi,children:[_.jsx(LS,{nodes:t,edges:r,defaultNodes:i,defaultEdges:s,onConnect:w,onConnectStart:S,onConnectEnd:C,onClickConnectStart:k,onClickConnectEnd:E,nodesDraggable:Re,autoPanOnNodeFocus:ut,nodesConnectable:ft,nodesFocusable:nt,edgesFocusable:ln,edgesReconnectable:qt,elementsSelectable:Kt,elevateNodesOnSelect:Hi,elevateEdgesOnSelect:Hl,minZoom:zt,maxZoom:St,nodeExtent:an,onNodesChange:_o,onEdgesChange:Dl,snapToGrid:me,snapGrid:Ee,connectionMode:b,translateExtent:It,connectOnClick:Vl,defaultEdgeOptions:Vi,fitView:Eo,fitViewOptions:No,onNodesDelete:ee,onEdgesDelete:D,onDelete:V,onNodeDragStart:B,onNodeDrag:G,onNodeDragStop:q,onSelectionDrag:U,onSelectionDragStart:z,onSelectionDragStop:O,onMove:v,onMoveStart:g,onMoveEnd:y,noPanClassName:Zt,nodeOrigin:rt,rfId:nr,autoPanOnConnect:Ve,autoPanOnNodeDrag:Bl,autoPanSpeed:Wi,onError:Ui,connectionRadius:br,isValidConnection:Wl,selectNodesOnDrag:Ie,nodeDragThreshold:Ul,connectionDragThreshold:_t,onBeforeDelete:H,debug:tr,ariaLabelConfig:Ql,zIndexMode:Yi}),_.jsx(r_,{onInit:m,onNodeClick:f,onEdgeClick:h,onNodeMouseEnter:I,onNodeMouseMove:N,onNodeMouseLeave:M,onNodeContextMenu:F,onNodeDoubleClick:A,nodeTypes:u,edgeTypes:d,connectionLineType:j,connectionLineStyle:te,connectionLineComponent:oe,connectionLineContainerStyle:ae,selectionKeyCode:ue,selectionOnDrag:Z,selectionMode:se,deleteKeyCode:ce,multiSelectionKeyCode:we,panActivationKeyCode:ge,zoomActivationKeyCode:ve,onlyRenderVisibleElements:Me,defaultViewport:pt,translateExtent:It,minZoom:zt,maxZoom:St,preventScrolling:zi,zoomOnScroll:Ll,zoomOnPinch:Ii,zoomOnDoubleClick:yo,panOnScroll:Ti,panOnScrollSpeed:Al,panOnScrollMode:mo,panOnDrag:vo,autoPanOnSelection:Co,onPaneClick:xo,onPaneMouseEnter:wo,onPaneMouseMove:En,onPaneMouseLeave:Nn,onPaneScroll:ji,onPaneContextMenu:Ri,paneClickDistance:Li,nodeClickDistance:Ai,onSelectionContextMenu:W,onSelectionStart:L,onSelectionEnd:T,onReconnect:So,onReconnectStart:Di,onReconnectEnd:Zn,onEdgeContextMenu:ko,onEdgeDoubleClick:Jn,onEdgeMouseEnter:$l,onEdgeMouseMove:er,onEdgeMouseLeave:Nr,reconnectRadius:Cr,defaultMarkerColor:Kn,noDragClassName:Ol,noWheelClassName:Fl,noPanClassName:Zt,rfId:nr,disableKeyboardA11y:Bi,nodeExtent:an,viewport:Yl,onViewportChange:Xl}),_.jsx(IS,{onSelectionChange:J}),$i,_.jsx(CS,{proOptions:Fi,position:Oi}),_.jsx(NS,{rfId:nr,disableKeyboardA11y:Bi})]})})}var c_=rm(u_);function d_({dimensions:t,lineWidth:r,variant:i,className:s}){return _.jsx("path",{strokeWidth:r,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:Xe(["react-flow__background-pattern",i,s])})}function f_({radius:t,className:r}){return _.jsx("circle",{cx:t,cy:t,r:t,className:Xe(["react-flow__background-pattern","dots",r])})}var qn;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(qn||(qn={}));const p_={[qn.Dots]:1,[qn.Lines]:1,[qn.Cross]:6},h_=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function bm({id:t,variant:r=qn.Dots,gap:i=20,size:s,lineWidth:a=1,offset:u=0,color:d,bgColor:f,style:h,className:m,patternClassName:v}){const g=X.useRef(null),{transform:y,patternId:w}=be(h_,Oe),S=s||p_[r],C=r===qn.Dots,k=r===qn.Cross,E=Array.isArray(i)?i:[i,i],I=[E[0]*y[2]||1,E[1]*y[2]||1],N=S*y[2],M=Array.isArray(u)?u:[u,u],F=k?[N,N]:I,A=[M[0]*y[2]||1+F[0]/2,M[1]*y[2]||1+F[1]/2],B=`${w}${t||""}`;return _.jsxs("svg",{className:Xe(["react-flow__background",m]),style:{...h,...jl,"--xy-background-color-props":f,"--xy-background-pattern-color-props":d},ref:g,"data-testid":"rf__background",children:[_.jsx("pattern",{id:B,x:y[0]%I[0],y:y[1]%I[1],width:I[0],height:I[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${A[0]},-${A[1]})`,children:C?_.jsx(f_,{radius:N/2,className:v}):_.jsx(d_,{dimensions:F,lineWidth:a,variant:r,className:v})}),_.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${B})`})]})}bm.displayName="Background";const g_=X.memo(bm);function m_(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:_.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function y_(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:_.jsx("path",{d:"M0 0h32v4.2H0z"})})}function v_(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:_.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 x_(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:_.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 w_(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:_.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 rl({children:t,className:r,...i}){return _.jsx("button",{type:"button",className:Xe(["react-flow__controls-button",r]),...i,children:t})}const S_=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function Mm({style:t,showZoom:r=!0,showFitView:i=!0,showInteractive:s=!0,fitViewOptions:a,onZoomIn:u,onZoomOut:d,onFitView:f,onInteractiveChange:h,className:m,children:v,position:g="bottom-left",orientation:y="vertical","aria-label":w}){const S=Fe(),{isInteractive:C,minZoomReached:k,maxZoomReached:E,ariaLabelConfig:I}=be(S_,Oe),{zoomIn:N,zoomOut:M,fitView:F}=Mc(),A=()=>{N(),u==null||u()},B=()=>{M(),d==null||d()},G=()=>{F(a),f==null||f()},q=()=>{S.setState({nodesDraggable:!C,nodesConnectable:!C,elementsSelectable:!C}),h==null||h(!C)},ee=y==="horizontal"?"horizontal":"vertical";return _.jsxs(Tl,{className:Xe(["react-flow__controls",ee,m]),position:g,style:t,"data-testid":"rf__controls","aria-label":w??I["controls.ariaLabel"],children:[r&&_.jsxs(_.Fragment,{children:[_.jsx(rl,{onClick:A,className:"react-flow__controls-zoomin",title:I["controls.zoomIn.ariaLabel"],"aria-label":I["controls.zoomIn.ariaLabel"],disabled:E,children:_.jsx(m_,{})}),_.jsx(rl,{onClick:B,className:"react-flow__controls-zoomout",title:I["controls.zoomOut.ariaLabel"],"aria-label":I["controls.zoomOut.ariaLabel"],disabled:k,children:_.jsx(y_,{})})]}),i&&_.jsx(rl,{className:"react-flow__controls-fitview",onClick:G,title:I["controls.fitView.ariaLabel"],"aria-label":I["controls.fitView.ariaLabel"],children:_.jsx(v_,{})}),s&&_.jsx(rl,{className:"react-flow__controls-interactive",onClick:q,title:I["controls.interactive.ariaLabel"],"aria-label":I["controls.interactive.ariaLabel"],children:C?_.jsx(w_,{}):_.jsx(x_,{})}),v]})}Mm.displayName="Controls";const k_=X.memo(Mm);function __({id:t,x:r,y:i,width:s,height:a,style:u,color:d,strokeColor:f,strokeWidth:h,className:m,borderRadius:v,shapeRendering:g,selected:y,onClick:w}){const{background:S,backgroundColor:C}=u||{},k=d||S||C;return _.jsx("rect",{className:Xe(["react-flow__minimap-node",{selected:y},m]),x:r,y:i,rx:v,ry:v,width:s,height:a,style:{fill:k,stroke:f,strokeWidth:h},shapeRendering:g,onClick:w?E=>w(E,t):void 0})}const E_=X.memo(__),N_=t=>t.nodes.map(r=>r.id),Yu=t=>t instanceof Function?t:()=>t;function C_({nodeStrokeColor:t,nodeColor:r,nodeClassName:i="",nodeBorderRadius:s=5,nodeStrokeWidth:a,nodeComponent:u=E_,onClick:d}){const f=be(N_,Oe),h=Yu(r),m=Yu(t),v=Yu(i),g=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return _.jsx(_.Fragment,{children:f.map(y=>_.jsx(M_,{id:y,nodeColorFunc:h,nodeStrokeColorFunc:m,nodeClassNameFunc:v,nodeBorderRadius:s,nodeStrokeWidth:a,NodeComponent:u,onClick:d,shapeRendering:g},y))})}function b_({id:t,nodeColorFunc:r,nodeStrokeColorFunc:i,nodeClassNameFunc:s,nodeBorderRadius:a,nodeStrokeWidth:u,shapeRendering:d,NodeComponent:f,onClick:h}){const{node:m,x:v,y:g,width:y,height:w}=be(S=>{const C=S.nodeLookup.get(t);if(!C)return{node:void 0,x:0,y:0,width:0,height:0};const k=C.internals.userNode,{x:E,y:I}=C.internals.positionAbsolute,{width:N,height:M}=_n(k);return{node:k,x:E,y:I,width:N,height:M}},Oe);return!m||m.hidden||!Ig(m)?null:_.jsx(f,{x:v,y:g,width:y,height:w,style:m.style,selected:!!m.selected,className:s(m),color:r(m),borderRadius:a,strokeColor:i(m),strokeWidth:u,shapeRendering:d,onClick:h,id:m.id})}const M_=X.memo(b_);var P_=X.memo(C_);const z_=200,I_=150,T_=t=>!t.hidden,j_=t=>{const r={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};return{viewBB:r,boundingRect:t.nodeLookup.size>0?Pg(Mi(t.nodeLookup,{filter:T_}),r):r,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},R_="react-flow__minimap-desc";function Pm({style:t,className:r,nodeStrokeColor:i,nodeColor:s,nodeClassName:a="",nodeBorderRadius:u=5,nodeStrokeWidth:d,nodeComponent:f,bgColor:h,maskColor:m,maskStrokeColor:v,maskStrokeWidth:g,position:y="bottom-right",onClick:w,onNodeClick:S,pannable:C=!1,zoomable:k=!1,ariaLabel:E,inversePan:I,zoomStep:N=1,offsetScale:M=5}){const F=Fe(),A=X.useRef(null),{boundingRect:B,viewBB:G,rfId:q,panZoom:ee,translateExtent:D,flowWidth:V,flowHeight:J,ariaLabelConfig:z}=be(j_,Oe),U=(t==null?void 0:t.width)??z_,O=(t==null?void 0:t.height)??I_,W=B.width/U,L=B.height/O,T=Math.max(W,L),H=T*U,b=T*O,j=M*T,te=B.x-(H-B.width)/2-j,oe=B.y-(b-B.height)/2-j,ae=H+j*2,ce=b+j*2,ue=`${R_}-${q}`,Z=X.useRef(0),se=X.useRef();Z.current=T,X.useEffect(()=>{if(A.current&&ee)return se.current=X2({domNode:A.current,panZoom:ee,getTransform:()=>F.getState().transform,getViewScale:()=>Z.current}),()=>{var me;(me=se.current)==null||me.destroy()}},[ee]),X.useEffect(()=>{var me;(me=se.current)==null||me.update({translateExtent:D,width:V,height:J,inversePan:I,pannable:C,zoomStep:N,zoomable:k})},[C,k,I,N,D,V,J]);const ge=w?me=>{var Ie;const[Ee,Me]=((Ie=se.current)==null?void 0:Ie.pointer(me))||[0,0];w(me,{x:Ee,y:Me})}:void 0,we=S?X.useCallback((me,Ee)=>{const Me=F.getState().nodeLookup.get(Ee).internals.userNode;S(me,Me)},[]):void 0,ve=E??z["minimap.ariaLabel"];return _.jsx(Tl,{position:y,style:{...t,"--xy-minimap-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-background-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-color-props":typeof v=="string"?v:void 0,"--xy-minimap-mask-stroke-width-props":typeof g=="number"?g*T:void 0,"--xy-minimap-node-background-color-props":typeof s=="string"?s:void 0,"--xy-minimap-node-stroke-color-props":typeof i=="string"?i:void 0,"--xy-minimap-node-stroke-width-props":typeof d=="number"?d:void 0},className:Xe(["react-flow__minimap",r]),"data-testid":"rf__minimap",children:_.jsxs("svg",{width:U,height:O,viewBox:`${te} ${oe} ${ae} ${ce}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ue,ref:A,onClick:ge,children:[ve&&_.jsx("title",{id:ue,children:ve}),_.jsx(P_,{onClick:we,nodeColor:s,nodeStrokeColor:i,nodeBorderRadius:u,nodeClassName:a,nodeStrokeWidth:d,nodeComponent:f}),_.jsx("path",{className:"react-flow__minimap-mask",d:`M${te-j},${oe-j}h${ae+j*2}v${ce+j*2}h${-ae-j*2}z
|
|
162
|
-
M${G.x},${G.y}h${G.width}v${G.height}h${-G.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Pm.displayName="MiniMap";X.memo(Pm);const L_=t=>r=>t?`${Math.max(1/r.transform[2],1)}`:void 0,A_={[po.Line]:"right",[po.Handle]:"bottom-right"};function $_({nodeId:t,position:r,variant:i=po.Handle,className:s,style:a=void 0,children:u,color:d,minWidth:f=10,minHeight:h=10,maxWidth:m=Number.MAX_VALUE,maxHeight:v=Number.MAX_VALUE,keepAspectRatio:g=!1,resizeDirection:y,autoScale:w=!0,shouldResize:S,onResizeStart:C,onResize:k,onResizeEnd:E}){const I=lm(),N=typeof t=="string"?t:I,M=Fe(),F=X.useRef(null),A=i===po.Handle,B=be(X.useCallback(L_(A&&w),[A,w]),Oe),G=X.useRef(null),q=r??A_[i];X.useEffect(()=>{if(!(!F.current||!N))return G.current||(G.current=sS({domNode:F.current,nodeId:N,getStoreItems:()=>{const{nodeLookup:D,transform:V,snapGrid:J,snapToGrid:z,nodeOrigin:U,domNode:O}=M.getState();return{nodeLookup:D,transform:V,snapGrid:J,snapToGrid:z,nodeOrigin:U,paneDomNode:O}},onChange:(D,V)=>{const{triggerNodeChanges:J,nodeLookup:z,parentLookup:U,nodeOrigin:O}=M.getState(),W=[],L={x:D.x,y:D.y},T=z.get(N);if(T&&T.expandParent&&T.parentId){const H=T.origin??O,b=D.width??T.measured.width??0,j=D.height??T.measured.height??0,te={id:T.id,parentId:T.parentId,rect:{width:b,height:j,...Tg({x:D.x??T.position.x,y:D.y??T.position.y},{width:b,height:j},T.parentId,z,H)}},oe=bc([te],z,U,O);W.push(...oe),L.x=D.x?Math.max(H[0]*b,D.x):void 0,L.y=D.y?Math.max(H[1]*j,D.y):void 0}if(L.x!==void 0&&L.y!==void 0){const H={id:N,type:"position",position:{...L}};W.push(H)}if(D.width!==void 0&&D.height!==void 0){const b={id:N,type:"dimensions",resizing:!0,setAttributes:y?y==="horizontal"?"width":"height":!0,dimensions:{width:D.width,height:D.height}};W.push(b)}for(const H of V){const b={...H,type:"position"};W.push(b)}J(W)},onEnd:({width:D,height:V})=>{const J={id:N,type:"dimensions",resizing:!1,dimensions:{width:D,height:V}};M.getState().triggerNodeChanges([J])}})),G.current.update({controlPosition:q,boundaries:{minWidth:f,minHeight:h,maxWidth:m,maxHeight:v},keepAspectRatio:g,resizeDirection:y,onResizeStart:C,onResize:k,onResizeEnd:E,shouldResize:S}),()=>{var D;(D=G.current)==null||D.destroy()}},[q,f,h,m,v,g,C,k,E,S]);const ee=q.split("-");return _.jsx("div",{className:Xe(["react-flow__resize-control","nodrag",...ee,i,s]),ref:F,style:{...a,scale:B,...d&&{[A?"backgroundColor":"borderColor"]:d}},children:u})}X.memo($_);function zc(t){switch(t){case"websocket":return"websocket";case"sse":case"longpoll":return"http";case"libp2p":return"libp2p";case"loopback":return"loopback";default:return"unknown"}}function Ic(t){switch(t){case"websocket":return"WebSocket";case"sse":return"HTTP · SSE";case"longpoll":return"HTTP · long-poll";case"libp2p":return"libp2p";case"loopback":return"Loopback";case void 0:return"unknown";default:return t}}function Tc(t){return t==="websocket"?"ws":t}const D_={websocket:"#22d3ee",http:"#a78bfa",libp2p:"#34d399",loopback:"#64748b",unknown:"#64748b"};function jc(t){return D_[t]}function Rc(t){return jc(zc(t))}function Lc(t){const r=new Map;for(const i of t){const s=zc(i.transport);r.set(s,(r.get(s)??0)+1)}return[...r.entries()].map(([i,s])=>({family:i,count:s})).sort((i,s)=>s.count-i.count||i.family.localeCompare(s.family))}function O_(t){return Lc(t).map(({family:r,count:i})=>`${i} ${Tc(r)}`).join(" / ")}const Xu=["#22d3ee","#a78bfa","#f472b6","#facc15","#34d399","#fb923c","#60a5fa","#f87171"];function zm(t){let r=0;for(let i=0;i<t.length;i++)r=r*31+t.charCodeAt(i)>>>0;return Xu[r%Xu.length]??Xu[0]}const Nh="__bus",F_=500,Ch=320,bh=160;function V_(t,r,i){const s=[],a=new Set;for(const y of t)a.has(y.nodeId)||(a.add(y.nodeId),s.push(y.nodeId));i&&!a.has(i.nodeId)&&(a.add(i.nodeId),s.push(i.nodeId));const u=new Map(t.map(y=>[y.nodeId,y])),d=s.length>=2,f=[],h=[];d&&f.push({id:Nh,kind:"bus",x:0,y:0,label:"Adapter · bus"});const m=r.slice(0,F_),v=Math.max(0,r.length-m.length),g=new Map;for(const y of m){const w=g.get(y.nodeId)??[];w.push(y),g.set(y.nodeId,w)}return s.forEach((y,w)=>{var M;const S=s.length===1?0:w/s.length*Math.PI*2-Math.PI/2,C=d?Math.cos(S)*Ch:0,k=d?Math.sin(S)*Ch:0,E=u.get(y),I=(E==null?void 0:E.nodeName)??((i==null?void 0:i.nodeId)===y?i.nodeName:void 0)??y.slice(0,8);f.push({id:y,kind:"server",x:C,y:k,label:I,alive:(E==null?void 0:E.alive)??!0,connCount:(E==null?void 0:E.connections)??((M=g.get(y))==null?void 0:M.length)??0,breakdown:O_(g.get(y)??[])}),d&&h.push({id:`e-bus-${y}`,source:y,target:Nh,kind:"bus"});const N=g.get(y)??[];N.forEach((F,A)=>{const B=A/Math.max(N.length,1)*Math.PI*2;f.push({id:F.id,kind:"conn",x:C+Math.cos(B)*bh,y:k+Math.sin(B)*bh,label:F.role,role:F.role,userId:F.userId,rooms:F.rooms,transport:F.transport}),h.push({id:`e-${F.id}`,source:F.id,target:y,kind:"conn"})})}),{nodes:f,edges:h,truncated:v}}function H_(t){const r=new Set;for(const i of t)for(const s of i.rooms)r.add(s);return[...r].sort()}function B_(t){return t.kind==="bus"?"Adapter · bus":t.kind==="server"?_.jsxs("div",{className:"text-center leading-tight",children:[_.jsx("div",{className:"font-semibold",children:t.label}),_.jsxs("div",{className:"text-[10px] opacity-70",children:[t.connCount," conns",t.breakdown?` · ${t.breakdown}`:"",t.alive?"":" · dead"]})]}):_.jsxs("div",{className:"leading-tight",children:[_.jsx("div",{className:"font-medium",children:t.role}),t.userId?_.jsx("div",{className:"text-[10px] opacity-70",children:t.userId}):null]})}function Mh(t,r){var i;return r.kind==="room"?!!((i=t.rooms)!=null&&i.includes(r.value)):zc(t.transport)===r.value}function W_(t,r){const s={fontSize:11,opacity:r!==null&&t.kind==="conn"&&!Mh(t,r)?.16:1,transition:"opacity 120ms"};if(t.kind==="bus")return{...s,background:"var(--color-card)",border:"1px solid var(--color-primary)",color:"var(--color-primary)",borderRadius:999,padding:"8px 16px",fontWeight:600};if(t.kind==="server")return{...s,background:"var(--color-card)",border:"1px solid var(--color-border)",color:"var(--color-foreground)",borderRadius:12,padding:"8px 12px",minWidth:96};const a=Rc(t.transport),u=r!==null&&t.kind==="conn"&&Mh(t,r);return{...s,background:`${a}1f`,border:`1px solid ${a}`,color:"var(--color-foreground)",borderRadius:8,padding:"4px 9px",boxShadow:u?`0 0 0 2px ${a}`:"none"}}function U_({topology:t,connections:r,node:i,highlight:s}){const{nodes:a,edges:u,truncated:d}=X.useMemo(()=>{const f=V_(t,r,i),h=f.nodes.map(v=>({id:v.id,position:{x:v.x,y:v.y},data:{label:B_(v)},style:W_(v,s),draggable:!0,connectable:!1,selectable:!1})),m=f.edges.map(v=>({id:v.id,source:v.source,target:v.target,animated:v.kind==="bus",style:{stroke:v.kind==="bus"?"var(--color-primary)":"var(--color-border)",strokeWidth:v.kind==="bus"?1.5:1}}));return{nodes:h,edges:m,truncated:f.truncated}},[t,r,i,s]);return _.jsxs("div",{className:"relative h-full w-full",children:[_.jsxs(c_,{nodes:a,edges:u,fitView:!0,nodesConnectable:!1,edgesFocusable:!1,minZoom:.2,children:[_.jsx(g_,{color:"#2b2b35",gap:20}),_.jsx(k_,{showInteractive:!1})]}),d>0?_.jsxs("div",{className:"absolute left-3 top-3 rounded-md border bg-card/90 px-3 py-1.5 text-xs text-muted-foreground",children:["showing 500 of ",500+d," connections · Control Center targets small clusters"]}):null]})}function ol({title:t,children:r}){return _.jsxs("div",{className:"mb-4",children:[_.jsx("div",{className:"mb-1.5 px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:t}),r]})}const il=()=>_.jsx("div",{className:"px-2 py-0.5 text-xs text-muted-foreground",children:"none"});function Y_({roles:t,rooms:r,topics:i,transports:s,selected:a,onSelect:u}){const d=h=>u((a==null?void 0:a.kind)===h.kind&&a.value===h.value?null:h),f=h=>(a==null?void 0:a.kind)===h.kind&&a.value===h.value;return _.jsxs("aside",{className:"w-60 shrink-0 overflow-auto border-l bg-card/30 p-3",children:[_.jsx(ol,{title:"Roles",children:t.length===0?_.jsx(il,{}):t.map(h=>_.jsxs("div",{className:"flex items-center gap-2 px-1 py-0.5 text-sm",children:[_.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{background:zm(h)}}),h]},h))}),_.jsx(ol,{title:"Transports · highlight",children:s.length===0?_.jsx(il,{}):s.map(({family:h,count:m})=>_.jsxs("button",{onClick:()=>d({kind:"transport",value:h}),className:tt("flex w-full items-center gap-2 rounded px-2 py-1 text-left text-sm",f({kind:"transport",value:h})?"bg-accent text-accent-foreground":"hover:bg-accent/50"),children:[_.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{background:jc(h)}}),_.jsx("span",{className:"flex-1 truncate",children:Tc(h)}),_.jsx("span",{className:"text-xs text-muted-foreground",children:m})]},h))}),_.jsx(ol,{title:"Rooms · highlight",children:r.length===0?_.jsx(il,{}):r.map(h=>_.jsx("button",{onClick:()=>d({kind:"room",value:h}),className:tt("block w-full truncate rounded px-2 py-1 text-left text-sm",f({kind:"room",value:h})?"bg-accent text-accent-foreground":"hover:bg-accent/50"),children:h},h))}),_.jsx(ol,{title:"Topics · this node",children:i.length===0?_.jsx(il,{}):i.map(h=>_.jsx("div",{className:"truncate px-2 py-0.5 text-sm text-muted-foreground",children:h},h))})]})}function Im(t){return{kind:"one",label:Ic(t),color:Rc(t)}}function sl(t,r){const i=r==null?void 0:r.conn(t);return i?Im(i.transport):void 0}function X_(t,r){var i;switch(t.type){case"connect":return Im(t.descriptor.transport);case"disconnect":case"room.add":case"room.remove":case"topic.sub":case"topic.unsub":case"msg.request":case"msg.response":return sl(t.connId,r);case"msg.event":return sl(t.target,r);case"msg.broadcast":{const s=((i=r==null?void 0:r.roomWires)==null?void 0:i.call(r,t.room))??[];return s.length?{kind:"many",parts:s.map(a=>({short:Tc(a.family),count:a.count,color:jc(a.family)}))}:void 0}case"msg.publish":case"msg.serverRequest":case"msg.serverReply":return;case"store.subscribe":case"store.unsubscribe":return sl(t.connId,r);case"store.write":return t.connId?sl(t.connId,r):void 0;case"store.grant":case"store.revoke":return}}function Tm(t,r,i){return i?`${i} (${t})`:`${t} ${r.slice(0,8)}`}function wn(t,r){const i=r==null?void 0:r.conn(t);return i?Tm(i.role,i.id,i.userId):t.slice(0,8)}function G_(t,r){var i,s;switch(t.type){case"connect":{const a=t.descriptor;return`${Tm(a.role,a.id,a.userId)} on ${a.nodeName}`}case"disconnect":return`${t.userId??wn(t.connId,r)} on ${(r==null?void 0:r.nodeName(t.nodeId))??t.nodeId.slice(0,8)}`;case"room.add":case"room.remove":return`${wn(t.connId,r)} · ${t.room}`;case"topic.sub":case"topic.unsub":return`${wn(t.connId,r)} · ${t.topic}`;case"msg.request":return`${wn(t.connId,r)} → ${t.name}`;case"msg.response":return`${wn(t.connId,r)} ← ${t.name} · ${t.ok?"ok":((i=t.error)==null?void 0:i.code)??"error"}`;case"msg.event":return`→ ${wn(t.target,r)} · ${t.name}`;case"msg.broadcast":return`${t.room} ⇒ ${t.name}`;case"msg.publish":return t.topic;case"msg.serverRequest":return`→ ${wn(t.target,r)} · ${t.name}`;case"msg.serverReply":return`← ${wn(t.target,r)} · ${t.name} · ${t.ok?"ok":((s=t.error)==null?void 0:s.code)??"error"}`;case"store.write":return`${t.store}/${t.id}`;case"store.grant":return`${t.store}/${t.id} +${t.principal}`;case"store.revoke":return`${t.store}/${t.id} −${t.principal}`;case"store.subscribe":case"store.unsubscribe":return`${wn(t.connId,r)} · ${t.store}/${t.id}`}}function Q_(t){return t==="msg.request"||t==="msg.response"||t==="msg.serverRequest"||t==="msg.serverReply"?"requests":t.startsWith("store.")?"stores":t.startsWith("msg.")?"events":"lifecycle"}function q_(t){switch(t.type){case"msg.request":case"msg.serverRequest":return t.input;case"msg.response":case"msg.serverReply":return t.ok?t.output:t.error;case"msg.event":case"msg.broadcast":case"msg.publish":return t.data;case"store.write":return t.data;case"store.grant":return t.perms;default:return}}function K_(t){return t==="connect"?"bg-primary":t==="disconnect"?"bg-destructive":t.startsWith("room")?"bg-violet-400":t.startsWith("topic")?"bg-amber-400":t.startsWith("store")?"bg-orange-400":t==="msg.request"||t==="msg.serverRequest"?"bg-cyan-400":t==="msg.response"||t==="msg.serverReply"?"bg-emerald-400":t==="msg.event"||t==="msg.broadcast"||t==="msg.publish"?"bg-sky-400":"bg-amber-400"}const Z_={request:"#22d3ee",event:"#34d399",topic:"#a78bfa",serverRequest:"#60a5fa"};function J_(t){return Z_[t]}function jm(t){return new Date(t).toLocaleTimeString()}function Rm(t,r=Date.now()){const i=Math.max(0,Math.floor((r-t)/1e3));if(i<60)return`${i}s`;const s=Math.floor(i/60);if(s<60)return`${s}m`;const a=Math.floor(s/60);return a<24?`${a}h ${s%60}m`:`${Math.floor(a/24)}d ${a%24}h`}function eE({connections:t,selectedId:r,onSelect:i}){return t.length===0?_.jsx("p",{className:"text-sm text-muted-foreground",children:"No connections."}):_.jsx("div",{className:"overflow-auto rounded-md border",children:_.jsxs("table",{className:"w-full border-collapse text-sm",children:[_.jsx("thead",{children:_.jsxs("tr",{className:"border-b bg-card/50 text-left text-[11px] uppercase tracking-wide text-muted-foreground",children:[_.jsx("th",{className:"px-3 py-2 font-medium",children:"role"}),_.jsx("th",{className:"px-3 py-2 font-medium",children:"transport"}),_.jsx("th",{className:"px-3 py-2 font-medium",children:"id"}),_.jsx("th",{className:"px-3 py-2 font-medium",children:"user"}),_.jsx("th",{className:"px-3 py-2 font-medium",children:"node"}),_.jsx("th",{className:"px-3 py-2 font-medium",children:"rooms"}),_.jsx("th",{className:"px-3 py-2 font-medium",children:"connected"})]})}),_.jsx("tbody",{children:t.map(s=>_.jsxs("tr",{onClick:()=>i(s.id),className:tt("cursor-pointer border-b last:border-0 hover:bg-accent/40",r===s.id&&"bg-accent/60"),children:[_.jsx("td",{className:"px-3 py-2",children:_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[_.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:zm(s.role)}}),s.role]})}),_.jsx("td",{className:"px-3 py-2",children:_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[_.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:Rc(s.transport)}}),Ic(s.transport)]})}),_.jsx("td",{className:"px-3 py-2 font-mono text-xs",children:s.id.slice(0,8)}),_.jsx("td",{className:"px-3 py-2",children:s.userId??"—"}),_.jsx("td",{className:"px-3 py-2 text-xs",children:s.nodeName}),_.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:s.rooms.length?s.rooms.join(", "):"—"}),_.jsxs("td",{className:"px-3 py-2 text-xs text-muted-foreground",children:[jm(s.connectedAt)," ",_.jsxs("span",{className:"opacity-60",children:["· ",Rm(s.connectedAt)]})]})]},s.id))})]})})}function hi({data:t,className:r}){const i=X.useMemo(()=>JSON.stringify(t,null,2),[t]),[s,a]=X.useState(!1),u=()=>{var d;(d=navigator.clipboard)==null||d.writeText(i).then(()=>{a(!0),setTimeout(()=>a(!1),1200)})};return _.jsxs("div",{className:"relative",children:[_.jsx("pre",{className:tt("max-h-[72vh] overflow-auto rounded-md border bg-background/40 p-3 text-xs leading-relaxed",r),children:i}),_.jsx("button",{type:"button",onClick:u,"aria-label":"Copy JSON",title:s?"Copied":"Copy JSON",className:"absolute right-2 top-2 rounded-md border bg-card/80 p-1.5 text-muted-foreground opacity-70 transition-opacity hover:text-foreground hover:opacity-100",children:s?_.jsx(Ry,{className:"h-3.5 w-3.5"}):_.jsx(Ay,{className:"h-3.5 w-3.5"})})]})}const tE=Fh("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-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}});function Lm({className:t,variant:r,size:i,...s}){return _.jsx("button",{className:tt(tE({variant:r,size:i,className:t})),...s})}function Gu({title:t,children:r}){return _.jsxs("div",{className:"mt-3",children:[_.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:t}),r]})}function nE({client:t,connId:r,onClose:i}){const[s,a]=X.useState(null),[u,d]=X.useState(null);return X.useEffect(()=>{if(!t||!r)return;let f=!0;return a(null),d(null),t.getConn(r).then(h=>{f&&a(h)}).catch(h=>{f&&d(h instanceof Error?h.message:String(h))}),()=>{f=!1}},[t,r]),r?_.jsxs("div",{className:"absolute inset-0 z-10 flex",children:[_.jsx("button",{className:"flex-1 bg-black/40",onClick:i,"aria-label":"Close detail"}),_.jsxs("div",{className:"w-[26rem] overflow-auto border-l bg-card p-4",children:[_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsxs("h3",{className:"text-sm font-semibold",children:["Connection ",r.slice(0,8)]}),_.jsx(Lm,{size:"sm",variant:"ghost",onClick:i,children:"close"})]}),u?_.jsx("p",{className:"mt-3 text-sm text-destructive",children:u}):null,s?_.jsxs(_.Fragment,{children:[_.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[s.descriptor.nodeName," · over ",Ic(s.descriptor.transport)," · connected"," ",jm(s.descriptor.connectedAt)," · ",Rm(s.descriptor.connectedAt)," ago"]}),_.jsx(Gu,{title:"descriptor",children:_.jsx(hi,{data:s.descriptor,className:"max-h-72"})}),s.ctxAvailable?_.jsxs(_.Fragment,{children:[_.jsx(Gu,{title:"ctx · node-local, best-effort",children:_.jsx(hi,{data:s.ctx,className:"max-h-72"})}),_.jsx(Gu,{title:"conn.data",children:_.jsx(hi,{data:s.data,className:"max-h-72"})})]}):_.jsxs("p",{className:"mt-3 text-xs text-muted-foreground",children:["ctx / conn.data live on node ",s.descriptor.nodeId.slice(0,8)," — point the Control Center at that node to inspect them."]})]}):u?null:_.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:"Loading…"})]})]}):null}function rE({flavor:t}){const r=J_(t);return _.jsx("span",{className:"rounded px-1.5 py-0.5 text-[10px] font-medium",style:{background:`${r}22`,color:r,border:`1px solid ${r}66`},children:t})}function oE({message:t}){const[r,i]=X.useState(!1),s=[["input",t.input],["output",t.output],["payload",t.payload]].filter(([,u])=>u!==void 0),a=s.length>0;return _.jsxs("div",{className:"rounded-md border",children:[_.jsxs("button",{onClick:()=>a&&i(u=>!u),disabled:!a,className:"flex w-full items-center gap-2 px-3 py-1.5 text-left",children:[_.jsx(rE,{flavor:t.flavor}),_.jsx("span",{className:"font-mono text-sm",children:t.name}),a?_.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:r?"−":"+"}):null]}),r?_.jsxs("div",{className:"space-y-2 border-t p-3",children:[s.map(([u,d])=>_.jsxs("div",{children:[_.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:u}),_.jsx(hi,{data:d,className:"max-h-72"})]},u)),_.jsx("p",{className:"text-[10px] text-muted-foreground",children:"schema · best-effort (refinements / transforms may be dropped)"})]}):null]})}function Ph({label:t,messages:r}){return r.length===0?null:_.jsxs("div",{children:[_.jsx("div",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:t}),_.jsx("div",{className:"flex flex-col gap-1.5",children:r.map(i=>_.jsx(oE,{message:i},i.name))})]})}function zh({title:t,dir:r}){return r.clientToServer.length===0&&r.serverToClient.length===0?null:_.jsxs("div",{className:"rounded-lg border bg-card/40 p-3",children:[_.jsx("div",{className:"mb-2 text-sm font-semibold",children:t}),_.jsxs("div",{className:"flex flex-col gap-3",children:[_.jsx(Ph,{label:"client → server",messages:r.clientToServer}),_.jsx(Ph,{label:"server → client",messages:r.serverToClient})]})]})}function iE({contract:t}){return _.jsxs("div",{className:"flex max-w-3xl flex-col gap-3",children:[_.jsx(zh,{title:"shared",dir:t.shared}),Object.entries(t.roles).map(([r,i])=>_.jsx(zh,{title:`role · ${r}`,dir:i},r))]})}const sE=[{id:"lifecycle",label:"Lifecycle"},{id:"requests",label:"Requests"},{id:"events",label:"Events"},{id:"stores",label:"Store"}];function lE({event:t,resolver:r}){const i=X_(t,r);return i?i.kind==="one"?_.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground",children:[_.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{background:i.color}}),i.label]}):_.jsx("span",{className:"inline-flex items-center gap-1.5 text-[10px] text-muted-foreground",children:i.parts.map(s=>_.jsxs("span",{className:"inline-flex items-center gap-0.5",children:[_.jsx("span",{className:"h-1.5 w-1.5 rounded-full",style:{background:s.color}}),s.short,"×",s.count]},s.short))}):null}function aE({event:t,resolver:r}){const[i,s]=X.useState(!1),a=q_(t),u=a!==void 0;return _.jsxs("li",{className:"rounded-md border",children:[_.jsxs("button",{type:"button",disabled:!u,onClick:()=>s(d=>!d),className:tt("flex w-full items-center gap-2 px-2.5 py-1.5 text-left text-sm",u&&"cursor-pointer hover:bg-accent/40"),children:[_.jsx("span",{className:tt("h-2 w-2 shrink-0 rounded-full",K_(t.type))}),_.jsx("span",{className:"w-28 shrink-0 font-mono text-xs text-muted-foreground",children:t.type}),_.jsx("span",{className:"truncate font-mono text-xs",children:G_(t,r)}),_.jsxs("span",{className:"ml-auto flex shrink-0 items-center gap-2",children:[_.jsx(lE,{event:t,resolver:r}),u?_.jsx(Ly,{className:tt("h-3.5 w-3.5 text-muted-foreground transition-transform",i&&"rotate-90")}):null]})]}),i&&u?_.jsx("div",{className:"px-2.5 pb-2",children:_.jsx(hi,{data:a,className:"max-h-60"})}):null]})}function uE({events:t,connections:r=[]}){const[i,s]=X.useState(()=>new Set(["lifecycle","requests","events","stores"])),[a,u]=X.useState(!1),[d,f]=X.useState([]),h=()=>{u(w=>(w||f(t),!w))},m=w=>s(S=>{const C=new Set(S);return C.has(w)?C.delete(w):C.add(w),C}),v=X.useMemo(()=>{const w=new Map(r.map(C=>[C.id,C])),S=new Map(r.map(C=>[C.nodeId,C.nodeName]));return{conn:C=>w.get(C),nodeName:C=>S.get(C)??C.slice(0,8),roomWires:C=>Lc(r.filter(k=>k.rooms.includes(C)))}},[r]),y=(a?d:t).filter(w=>i.has(Q_(w.type)));return _.jsxs("div",{className:"flex h-full flex-col gap-2",children:[_.jsxs("div",{className:"flex items-center gap-1.5",children:[sE.map(w=>_.jsx("button",{onClick:()=>m(w.id),className:tt("rounded-md border px-2 py-1 text-xs transition-colors",i.has(w.id)?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/40"),children:w.label},w.id)),_.jsxs("button",{onClick:h,className:tt("ml-auto inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-xs transition-colors",a?"bg-amber-400/20 text-amber-300":"text-muted-foreground hover:bg-accent/40"),children:[a?_.jsx(Wy,{className:"h-3.5 w-3.5"}):_.jsx(By,{className:"h-3.5 w-3.5"}),a?"Paused":"Pause"]})]}),y.length===0?_.jsx("p",{className:"text-sm text-muted-foreground",children:t.length===0?"Waiting for events…":"No events match the filter."}):_.jsx("ul",{className:"flex min-h-0 flex-1 flex-col gap-1 overflow-auto",children:y.map((w,S)=>_.jsx(aE,{event:w,resolver:v},S))})]})}function Am({className:t,...r}){return _.jsx("div",{className:tt("rounded-lg border bg-card text-card-foreground shadow-sm",t),...r})}function $m({className:t,...r}){return _.jsx("div",{className:tt("flex flex-col gap-1 px-4 py-3 border-b",t),...r})}function Dm({className:t,...r}){return _.jsx("div",{className:tt("text-sm font-semibold tracking-tight",t),...r})}function Om({className:t,...r}){return _.jsx("div",{className:tt("p-4",t),...r})}function Fm({status:t}){const r=t==="open"?"bg-primary":t==="connecting"?"bg-muted-foreground":"bg-destructive";return _.jsxs("span",{className:"inline-flex items-center gap-2 text-xs text-muted-foreground",children:[_.jsx("span",{className:tt("h-2 w-2 rounded-full",r)}),t]})}function cE({url:t,status:r,onConnect:i}){const[s,a]=X.useState(t);X.useEffect(()=>{a(t)},[t]);const u=s.trim()!==t;return _.jsx("div",{className:"max-w-2xl",children:_.jsxs(Am,{children:[_.jsxs($m,{children:[_.jsx(Dm,{children:"Inspector connection"}),_.jsxs("p",{className:"text-xs text-muted-foreground",children:["The WebSocket endpoint of a super-line server started with ",_.jsx("code",{children:"inspector: true"}),". Saved to this browser and reused next time."]})]}),_.jsxs(Om,{className:"flex flex-col gap-3",children:[_.jsx("label",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",htmlFor:"cc-url",children:"URL"}),_.jsxs("form",{className:"flex items-center gap-2",onSubmit:d=>{d.preventDefault(),i(s.trim())},children:[_.jsx("input",{id:"cc-url",value:s,onChange:d=>a(d.target.value),placeholder:"ws://localhost:3000",className:"h-9 w-full rounded-md border bg-background px-3 text-sm outline-none focus:ring-2 focus:ring-ring"}),_.jsx(Lm,{type:"submit",size:"sm",variant:u?"default":"secondary",children:u?"Connect":"Reconnect"})]}),_.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[_.jsx("span",{children:"Status"}),_.jsx(Fm,{status:r})]})]})]})})}const dE=[{icon:Xy,title:"super-line",href:"https://mertdogar.github.io/super-line/",blurb:"The home page — what super-line is and why typesafe WebSockets."},{icon:Ty,title:"Documentation",href:"https://mertdogar.github.io/super-line/guide/getting-started",blurb:"Guides, the full API reference, and runnable examples."},{icon:Oy,title:"GitHub",href:"https://github.com/mertdogar/super-line",blurb:"Browse the source, report issues, and contribute."},{icon:Hy,title:"npm",href:"https://www.npmjs.com/package/@super-line/core",blurb:"The @super-line/* packages — core, server, client, react, adapters."}];function fE(){return _.jsx("div",{className:"grid max-w-3xl grid-cols-1 gap-3 sm:grid-cols-2",children:dE.map(t=>_.jsx("a",{href:t.href,target:"_blank",rel:"noreferrer",className:"group block",children:_.jsxs(Am,{className:"h-full transition-colors hover:border-primary/60 hover:bg-accent/30",children:[_.jsx($m,{children:_.jsxs(Dm,{className:"flex items-center gap-2",children:[_.jsx(t.icon,{className:"h-4 w-4 text-primary"}),t.title,_.jsx($y,{className:"ml-auto h-3.5 w-3.5 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]})}),_.jsx(Om,{className:"text-xs text-muted-foreground",children:t.blurb})]})},t.title))})}const Ih=[{id:"topology",label:"Topology",icon:Vy},{id:"connections",label:"Connections",icon:jy},{id:"contract",label:"Contract",icon:Dy},{id:"feed",label:"Live feed",icon:Uy}],Th=[{id:"settings",label:"Settings",icon:Yy},{id:"resources",label:"Resources",icon:Fy}],Vm="superline.cc.url",pE="ws://localhost:3000";function hE(){const t=new URLSearchParams(window.location.search).get("url");if(t)return t;try{const i=localStorage.getItem(Vm);if(i)return i}catch{}const r=window.__CC_DEFAULT_URL__;return r||pE}function jh({item:t,active:r,onClick:i}){return _.jsxs("button",{onClick:i,className:tt("flex items-center gap-2 rounded-md px-3 py-2 text-sm transition-colors",r?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent/50 hover:text-foreground"),children:[_.jsx(t.icon,{className:"h-4 w-4"}),t.label]})}function gE(){const[t,r]=X.useState(hE),[i,s]=X.useState("topology"),{client:a,status:u}=Ky(t),[d,f]=X.useState([]),[h,m]=X.useState([]),[v,g]=X.useState(null),[y,w]=X.useState(null),[S,C]=X.useState([]),[k,E]=X.useState(null),[I,N]=X.useState(null),M=X.useCallback(D=>{r(D);try{localStorage.setItem(Vm,D)}catch{}},[]);X.useEffect(()=>{if(!a||u!=="open")return;let D=!0;const V=()=>{Promise.all([a.getTopology(),a.listConnections(),a.getContract(),a.getNode()]).then(([z,U,O,W])=>{D&&(f(z),m(U),g(O),w(W))}).catch(()=>{})};V();const J=a.onEvent(z=>{D&&(C(U=>[z,...U].slice(0,200)),V())});return()=>{D=!1,J()}},[a,u]);const F=d.reduce((D,V)=>D+V.connections,0),A=X.useMemo(()=>[...new Set(h.map(D=>D.role))].sort(),[h]),B=X.useMemo(()=>H_(h),[h]),G=X.useMemo(()=>Lc(h),[h]),q=[...Ih,...Th].find(D=>D.id===i),ee=i==="connections"?`${h.length} connections`:i==="feed"?`${S.length} events`:"";return _.jsxs("div",{className:"flex h-screen w-screen overflow-hidden",children:[_.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r bg-card/40",children:[_.jsxs("div",{className:"flex items-center gap-2 px-4 py-4",children:[_.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-primary"}),_.jsx("span",{className:"text-sm font-semibold tracking-tight",children:"Control Center"})]}),_.jsx("nav",{className:"flex flex-col gap-1 px-2",children:Ih.map(D=>_.jsx(jh,{item:D,active:i===D.id,onClick:()=>s(D.id)},D.id))}),_.jsx("nav",{className:"mt-auto flex flex-col gap-1 border-t px-2 py-2",children:Th.map(D=>_.jsx(jh,{item:D,active:i===D.id,onClick:()=>s(D.id)},D.id))}),_.jsx("div",{className:"px-4 py-3 text-[11px] text-muted-foreground",children:"super-line · v1"})]}),_.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[_.jsxs("header",{className:"flex items-center justify-between gap-3 border-b px-4 py-3",children:[_.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[q?_.jsx(q.icon,{className:"h-4 w-4 text-muted-foreground"}):null,q==null?void 0:q.label,ee?_.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:ee}):null]}),_.jsxs("div",{className:"flex items-center gap-3",children:[_.jsx(Fm,{status:u}),_.jsxs(vp,{variant:"muted",children:[d.length," nodes"]}),_.jsxs(vp,{variant:"muted",children:[F," conns"]})]})]}),_.jsxs("main",{className:"relative min-h-0 flex-1 overflow-hidden",children:[i==="topology"?_.jsxs("div",{className:"flex h-full",children:[_.jsx("div",{className:"min-w-0 flex-1",children:_.jsx(U_,{topology:d,connections:h,node:y,highlight:k})}),_.jsx(Y_,{roles:A,rooms:B,topics:(y==null?void 0:y.topics)??[],transports:G,selected:k,onSelect:E})]}):_.jsxs("div",{className:"h-full overflow-auto p-4",children:[i==="connections"&&_.jsx(eE,{connections:h,selectedId:I,onSelect:N}),i==="contract"&&(v?_.jsx(iE,{contract:v}):_.jsx("p",{className:"text-sm text-muted-foreground",children:"No contract."})),i==="feed"&&_.jsx(uE,{events:S,connections:h}),i==="settings"&&_.jsx(cE,{url:t,status:u,onConnect:M}),i==="resources"&&_.jsx(fE,{})]}),i==="connections"&&_.jsx(nE,{client:a,connId:I,onClose:()=>N(null)})]})]})]})}const Rh=document.getElementById("root");Rh&&My.createRoot(Rh).render(_.jsx(X.StrictMode,{children:_.jsx(gE,{})}));
|