@super-line/control-center 0.3.0 → 0.4.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"]'))l(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"&&l(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 l(a){if(a.ep)return;a.ep=!0;const u=i(a);fetch(a.href,u)}})();function Mh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Eu={exports:{}},ii={},Nu={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 Jf;function dy(){if(Jf)return Ce;Jf=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=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 _(){}_.prototype=k.prototype;function I(b,j,te){this.props=b,this.context=j,this.refs=C,this.updater=te||w}var E=I.prototype=new _;E.constructor=I,S(E,k.prototype),E.isPureReactComponent=!0;var M=Array.isArray,O=Object.prototype.hasOwnProperty,A={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function X(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)O.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 J(b){return typeof b=="object"&&b!==null&&b.$$typeof===t}function V(b){var j={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(te){return j[te]})}var H=/\/+/g;function ee(b,j){return typeof b=="object"&&b!==null&&b.key!=null?V(""+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===""?"."+ee(ue,0):oe,M(ae)?(te="",b!=null&&(te=b.replace(H,"$&/")+"/"),z(ae,j,te,"",function(ge){return ge})):ae!=null&&(J(ae)&&(ae=q(ae,te+(!ae.key||ue&&ue.key===ae.key?"":(""+ae.key).replace(H,"$&/")+"/")+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+ee(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+ee(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 D(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 F(){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(!J(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=l,Ce.Suspense=h,Ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T,Ce.act=F,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)O.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=X,Ce.createFactory=function(b){var j=X.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=J,Ce.lazy=function(b){return{$$typeof:v,_payload:{_status:-1,_result:b},_init:D}},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=F,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 ep;function Ei(){return ep||(ep=1,Nu.exports=dy()),Nu.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 tp;function fy(){if(tp)return ii;tp=1;var t=Ei(),r=Symbol.for("react.element"),i=Symbol.for("react.fragment"),l=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)l.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 np;function py(){return np||(np=1,Eu.exports=fy()),Eu.exports}var N=py(),G=Ei();const hy=Mh(G);var Gs={},Cu={exports:{}},xt={},bu={exports:{}},Mu={};/**
|
|
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 rp;function gy(){return rp||(rp=1,(function(t){function r(L,T){var F=L.length;L.push(T);e:for(;0<F;){var b=F-1>>>1,j=L[b];if(0<a(j,T))L[b]=T,L[F]=j,F=b;else break e}}function i(L){return L.length===0?null:L[0]}function l(L){if(L.length===0)return null;var T=L[0],F=L.pop();if(F!==T){L[0]=F;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,F))ce<j&&0>a(ue,ae)?(L[b]=ue,L[ce]=F,b=ce):(L[b]=ae,L[oe]=F,b=oe);else if(ce<j&&0>a(ue,F))L[b]=ue,L[ce]=F,b=ce;else break e}}return T}function a(L,T){var F=L.sortIndex-T.sortIndex;return F!==0?F: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,_=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 E(L){for(var T=i(m);T!==null;){if(T.callback===null)l(m);else if(T.startTime<=L)l(m),T.sortIndex=T.expirationTime,r(h,T);else break;T=i(m)}}function M(L){if(C=!1,E(L),!S)if(i(h)!==null)S=!0,D(O);else{var T=i(m);T!==null&&W(M,T.startTime-L)}}function O(L,T){S=!1,C&&(C=!1,_(X),X=-1),w=!0;var F=y;try{for(E(T),g=i(h);g!==null&&(!(g.expirationTime>T)||L&&!V());){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)&&l(h),E(T)}else l(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=F,w=!1}}var A=!1,B=null,X=-1,q=5,J=-1;function V(){return!(t.unstable_now()-J<q)}function H(){if(B!==null){var L=t.unstable_now();J=L;var T=!0;try{T=B(!0,L)}finally{T?ee():(A=!1,B=null)}}else A=!1}var ee;if(typeof I=="function")ee=function(){I(H)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,U=z.port2;z.port1.onmessage=H,ee=function(){U.postMessage(null)}}else ee=function(){k(H,0)};function D(L){B=L,A||(A=!0,ee())}function W(L,T){X=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,D(O))},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 F=y;y=T;try{return L()}finally{y=F}},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 F=y;y=L;try{return T()}finally{y=F}},t.unstable_scheduleCallback=function(L,T,F){var b=t.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?b+F:b):F=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=F+j,L={id:v++,callback:T,priorityLevel:L,startTime:F,expirationTime:j,sortIndex:-1},F>b?(L.sortIndex=F,r(m,L),i(h)===null&&L===i(m)&&(C?(_(X),X=-1):C=!0,W(M,F-b))):(L.sortIndex=j,r(h,L),S||w||(S=!0,D(O))),L},t.unstable_shouldYield=V,t.unstable_wrapCallback=function(L){var T=y;return function(){var F=y;y=T;try{return L.apply(this,arguments)}finally{y=F}}}})(Mu)),Mu}var op;function my(){return op||(op=1,bu.exports=gy()),bu.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 ip;function yy(){if(ip)return xt;ip=1;var t=Ei(),r=my();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 l=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++)l.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,s){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return s?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function S(e,n,o,s){if(n===null||typeof n>"u"||w(e,n,o,s))return!0;if(s)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,s,c,p,x){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=s,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 _=/[\-:]([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(_,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(_,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(_,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 E(e,n,o,s){var c=k.hasOwnProperty(n)?k[n]:null;(c!==null?c.type!==0:s||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(S(n,o,c,s)&&(o=null),s||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,s=c.attributeNamespace,o===null?e.removeAttribute(n):(c=c.type,o=c===3||c===4&&o===!0?"":""+o,s?e.setAttributeNS(s,n,o):e.setAttribute(n,o))))}var M=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=Symbol.for("react.element"),A=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),J=Symbol.for("react.provider"),V=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),D=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 F=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 s=K}Reflect.construct(e,[],n)}else{try{n.call()}catch(K){s=K}e.call(n.prototype)}else{try{throw Error()}catch(K){s=K}e()}}catch(K){if(K&&s&&typeof K.stack=="string"){for(var c=K.stack.split(`
|
|
35
|
-
`),p=s.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 X:return"StrictMode";case ee:return"Suspense";case z:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case V:return(e.displayName||"Context")+".Consumer";case J:return(e._context.displayName||"Context")+".Provider";case H: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 D: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===X?"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),s=""+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){s=""+x,p.call(this,x)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(x){s=""+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(),s="";return e&&(s=se(e)?e.checked?"true":"false":e.value),e=s,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 F({},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,s=n.checked!=null?n.checked:n.defaultChecked;o=Z(n.value!=null?n.value:o),e._wrapperState={initialChecked:s,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Ie(e,n){n=n.checked,n!=null&&E(e,"checked",n,!1)}function Re(e,n){Ie(e,n);var o=Z(n.value),s=n.type;if(o!=null)s==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(s==="submit"||s==="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 s=n.type;if(!(s!=="submit"&&s!=="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 tt=Array.isArray;function nt(e,n,o,s){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&&s&&(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,s&&(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 F({},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(tt(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),s=Z(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),s!=null&&(e.defaultValue=""+s)}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,s,c){MSApp.execUnsafeLocalFunction(function(){return e(n,o,s,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},Tl=["Webkit","ms","Moz","O"];Object.keys(Kn).forEach(function(e){Tl.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 s=o.indexOf("--")===0,c=Ii(o,n[o],s);o==="float"&&(o="cssFloat"),s?e.setProperty(o,c):e[o]=c}}var jl=F({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(jl[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,_n=null,En=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){_n?En?En.push(e):En=[e]:_n=e}function Li(){if(_n){var e=_n,n=En;if(En=_n=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,(_n!==null||En!==null)&&($i(),Li())}}function Zn(e,n){var o=e.stateNode;if(o===null)return null;var s=us(o);if(s===null)return null;o=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;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 Rl(e,n,o,s,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,Ll={onError:function(e){er=!0,Nr=e}};function Al(e,n,o,s,c,p,x,P,R){er=!1,Nr=null,Rl.apply(Ll,arguments)}function $l(e,n,o,s,c,p,x,P,R){if(Al.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 Dl(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,s=n;;){var c=o.return;if(c===null)break;var p=c.alternate;if(p===null){if(s=c.return,s!==null){o=s;continue}break}if(c.child===p.child){for(p=c.child;p;){if(p===o)return No(c),e;if(p===s)return No(c),n;p=p.sibling}throw Error(i(188))}if(o.return!==s.return)o=c,s=p;else{for(var x=!1,P=c.child;P;){if(P===o){x=!0,o=c,s=p;break}if(P===s){x=!0,s=c,o=p;break}P=P.sibling}if(!x){for(P=p.child;P;){if(P===o){x=!0,o=p,s=c;break}if(P===s){x=!0,s=p,o=c;break}P=P.sibling}if(!x)throw Error(i(189))}}if(o.alternate!==s)throw Error(i(190))}if(o.tag!==3)throw Error(i(188));return o.stateNode.current===o?e:n}function Oi(e){return e=Dl(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,Ol=r.unstable_shouldYield,Bi=r.unstable_requestPaint,Ve=r.unstable_now,Fl=r.unstable_getCurrentPriorityLevel,Co=r.unstable_ImmediatePriority,Wi=r.unstable_UserBlockingPriority,br=r.unstable_NormalPriority,Vl=r.unstable_LowPriority,Ui=r.unstable_IdlePriority,Mr=null,kt=null;function Hl(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:Ul,Bl=Math.log,Wl=Math.LN2;function Ul(e){return e>>>=0,e===0?32:31-(Bl(e)/Wl|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 s=0,c=e.suspendedLanes,p=e.pingedLanes,x=o&268435455;if(x!==0){var P=x&~c;P!==0?s=tr(P):(p&=x,p!==0&&(s=tr(p)))}else x=o&~c,x!==0?s=tr(x):p!==0&&(s=tr(p));if(s===0)return 0;if(n!==0&&n!==s&&(n&c)===0&&(c=s&-s,p=n&-n,c>=p||c===16&&(p&4194240)!==0))return n;if((s&4)!==0&&(s|=o&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=s;0<n;)o=31-_t(n),c=1<<o,s|=e[o],n&=~c;return s}function Yl(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,s=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&s)!==0)&&(c[x]=Yl(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 Xl(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 s=e.eventTimes;for(e=e.expirationTimes;0<o;){var c=31-_t(o),p=1<<c;n[c]=0,s[c]=-1,e[c]=-1,o&=~p}}function Ir(e,n){var o=e.entangledLanes|=n;for(e=e.entanglements;o;){var s=31-_t(o),c=1<<s;c&n|e[s]&n&&(e[s]|=n),o&=~c}}var Te=0;function zc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Ic,Gl,Tc,jc,Rc,Ql=!1,Gi=[],Nn=null,Cn=null,bn=null,Mo=new Map,Po=new Map,Mn=[],jm="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 Lc(e,n){switch(e){case"focusin":case"focusout":Nn=null;break;case"dragenter":case"dragleave":Cn=null;break;case"mouseover":case"mouseout":bn=null;break;case"pointerover":case"pointerout":Mo.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Po.delete(n.pointerId)}}function zo(e,n,o,s,c,p){return e===null||e.nativeEvent!==p?(e={blockedOn:n,domEventName:o,eventSystemFlags:s,nativeEvent:p,targetContainers:[c]},n!==null&&(n=Wo(n),n!==null&&Gl(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function Rm(e,n,o,s,c){switch(n){case"focusin":return Nn=zo(Nn,e,n,o,s,c),!0;case"dragenter":return Cn=zo(Cn,e,n,o,s,c),!0;case"mouseover":return bn=zo(bn,e,n,o,s,c),!0;case"pointerover":var p=c.pointerId;return Mo.set(p,zo(Mo.get(p)||null,e,n,o,s,c)),!0;case"gotpointercapture":return p=c.pointerId,Po.set(p,zo(Po.get(p)||null,e,n,o,s,c)),!0}return!1}function Ac(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,Rc(e.priority,function(){Tc(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=Kl(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o===null){o=e.nativeEvent;var s=new o.constructor(o.type,o);vo=s,o.target.dispatchEvent(s),vo=null}else return n=Wo(o),n!==null&&Gl(n),e.blockedOn=o,!1;n.shift()}return!0}function $c(e,n,o){Qi(e)&&o.delete(n)}function Lm(){Ql=!1,Nn!==null&&Qi(Nn)&&(Nn=null),Cn!==null&&Qi(Cn)&&(Cn=null),bn!==null&&Qi(bn)&&(bn=null),Mo.forEach($c),Po.forEach($c)}function Io(e,n){e.blockedOn===n&&(e.blockedOn=null,Ql||(Ql=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Lm)))}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 s=Gi[o];s.blockedOn===e&&(s.blockedOn=null)}}for(Nn!==null&&Io(Nn,e),Cn!==null&&Io(Cn,e),bn!==null&&Io(bn,e),Mo.forEach(n),Po.forEach(n),o=0;o<Mn.length;o++)s=Mn[o],s.blockedOn===e&&(s.blockedOn=null);for(;0<Mn.length&&(o=Mn[0],o.blockedOn===null);)Ac(o),o.blockedOn===null&&Mn.shift()}var Tr=M.ReactCurrentBatchConfig,qi=!0;function Am(e,n,o,s){var c=Te,p=Tr.transition;Tr.transition=null;try{Te=1,ql(e,n,o,s)}finally{Te=c,Tr.transition=p}}function $m(e,n,o,s){var c=Te,p=Tr.transition;Tr.transition=null;try{Te=4,ql(e,n,o,s)}finally{Te=c,Tr.transition=p}}function ql(e,n,o,s){if(qi){var c=Kl(e,n,o,s);if(c===null)ha(e,n,s,Ki,o),Lc(e,s);else if(Rm(c,e,n,o,s))s.stopPropagation();else if(Lc(e,s),n&4&&-1<jm.indexOf(e)){for(;c!==null;){var p=Wo(c);if(p!==null&&Ic(p),p=Kl(e,n,o,s),p===null&&ha(e,n,s,Ki,o),p===c)break;c=p}c!==null&&s.stopPropagation()}else ha(e,n,s,null,o)}}var Ki=null;function Kl(e,n,o,s){if(Ki=null,e=xo(s),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 Dc(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(Fl()){case Co:return 1;case Wi:return 4;case br:case Vl:return 16;case Ui:return 536870912;default:return 16}default:return 16}}var Pn=null,Zl=null,Zi=null;function Oc(){if(Zi)return Zi;var e,n=Zl,o=n.length,s,c="value"in Pn?Pn.value:Pn.textContent,p=c.length;for(e=0;e<o&&n[e]===c[e];e++);var x=o-e;for(s=1;s<=x&&n[o-s]===c[p-s];s++);return Zi=c.slice(e,1<s?1-s: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 Fc(){return!1}function Et(e){function n(o,s,c,p,x){this._reactName=o,this._targetInst=c,this.type=s,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:Fc,this.isPropagationStopped=Fc,this}return F(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},Jl=Et(jr),jo=F({},jr,{view:0,detail:0}),Dm=Et(jo),ea,ta,Ro,ts=F({},jo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ra,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"?(ea=e.screenX-Ro.screenX,ta=e.screenY-Ro.screenY):ta=ea=0,Ro=e),ea)},movementY:function(e){return"movementY"in e?e.movementY:ta}}),Vc=Et(ts),Om=F({},ts,{dataTransfer:0}),Fm=Et(Om),Vm=F({},jo,{relatedTarget:0}),na=Et(Vm),Hm=F({},jr,{animationName:0,elapsedTime:0,pseudoElement:0}),Bm=Et(Hm),Wm=F({},jr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Um=Et(Wm),Ym=F({},jr,{data:0}),Hc=Et(Ym),Xm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Gm={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"},Qm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qm(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Qm[e])?!!n[e]:!1}function ra(){return qm}var Km=F({},jo,{key:function(e){if(e.key){var n=Xm[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"?Gm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ra,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}}),Zm=Et(Km),Jm=F({},ts,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bc=Et(Jm),e0=F({},jo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ra}),t0=Et(e0),n0=F({},jr,{propertyName:0,elapsedTime:0,pseudoElement:0}),r0=Et(n0),o0=F({},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}),i0=Et(o0),s0=[9,13,27,32],oa=f&&"CompositionEvent"in window,Lo=null;f&&"documentMode"in document&&(Lo=document.documentMode);var l0=f&&"TextEvent"in window&&!Lo,Wc=f&&(!oa||Lo&&8<Lo&&11>=Lo),Uc=" ",Yc=!1;function Xc(e,n){switch(e){case"keyup":return s0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rr=!1;function a0(e,n){switch(e){case"compositionend":return Gc(n);case"keypress":return n.which!==32?null:(Yc=!0,Uc);case"textInput":return e=n.data,e===Uc&&Yc?null:e;default:return null}}function u0(e,n){if(Rr)return e==="compositionend"||!oa&&Xc(e,n)?(e=Oc(),Zi=Zl=Pn=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 Wc&&n.locale!=="ko"?null:n.data;default:return null}}var c0={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 Qc(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!c0[e.type]:n==="textarea"}function qc(e,n,o,s){Ri(s),n=ss(n,"onChange"),0<n.length&&(o=new Jl("onChange","change",null,o,s),e.push({event:o,listeners:n}))}var Ao=null,$o=null;function d0(e){hd(e,0)}function ns(e){var n=Or(e);if(ve(n))return e}function f0(e,n){if(e==="change")return n}var Kc=!1;if(f){var ia;if(f){var sa="oninput"in document;if(!sa){var Zc=document.createElement("div");Zc.setAttribute("oninput","return;"),sa=typeof Zc.oninput=="function"}ia=sa}else ia=!1;Kc=ia&&(!document.documentMode||9<document.documentMode)}function Jc(){Ao&&(Ao.detachEvent("onpropertychange",ed),$o=Ao=null)}function ed(e){if(e.propertyName==="value"&&ns($o)){var n=[];qc(n,$o,e,xo(e)),Di(d0,n)}}function p0(e,n,o){e==="focusin"?(Jc(),Ao=n,$o=o,Ao.attachEvent("onpropertychange",ed)):e==="focusout"&&Jc()}function h0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ns($o)}function g0(e,n){if(e==="click")return ns(n)}function m0(e,n){if(e==="input"||e==="change")return ns(n)}function y0(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Dt=typeof Object.is=="function"?Object.is:y0;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),s=Object.keys(n);if(o.length!==s.length)return!1;for(s=0;s<o.length;s++){var c=o[s];if(!h.call(n,c)||!Dt(e[c],n[c]))return!1}return!0}function td(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nd(e,n){var o=td(e);e=0;for(var s;o;){if(o.nodeType===3){if(s=e+o.textContent.length,e<=n&&s>=n)return{node:o,offset:n-e};e=s}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=td(o)}}function rd(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?rd(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function od(){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 la(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 v0(e){var n=od(),o=e.focusedElem,s=e.selectionRange;if(n!==o&&o&&o.ownerDocument&&rd(o.ownerDocument.documentElement,o)){if(s!==null&&la(o)){if(n=s.start,e=s.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(s.start,c);s=s.end===void 0?p:Math.min(s.end,c),!e.extend&&p>s&&(c=s,s=p,p=c),c=nd(o,p);var x=nd(o,s);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>s?(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 x0=f&&"documentMode"in document&&11>=document.documentMode,Lr=null,aa=null,Oo=null,ua=!1;function id(e,n,o){var s=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;ua||Lr==null||Lr!==me(s)||(s=Lr,"selectionStart"in s&&la(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Oo&&Do(Oo,s)||(Oo=s,s=ss(aa,"onSelect"),0<s.length&&(n=new Jl("onSelect","select",null,n,o),e.push({event:n,listeners:s}),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")},ca={},sd={};f&&(sd=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(ca[e])return ca[e];if(!Ar[e])return e;var n=Ar[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in sd)return ca[e]=n[o];return e}var ld=os("animationend"),ad=os("animationiteration"),ud=os("animationstart"),cd=os("transitionend"),dd=new Map,fd="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 zn(e,n){dd.set(e,n),u(n,[e])}for(var da=0;da<fd.length;da++){var fa=fd[da],w0=fa.toLowerCase(),S0=fa[0].toUpperCase()+fa.slice(1);zn(w0,"on"+S0)}zn(ld,"onAnimationEnd"),zn(ad,"onAnimationIteration"),zn(ud,"onAnimationStart"),zn("dblclick","onDoubleClick"),zn("focusin","onFocus"),zn("focusout","onBlur"),zn(cd,"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(" "),k0=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fo));function pd(e,n,o){var s=e.type||"unknown-event";e.currentTarget=o,$l(s,n,void 0,e),e.currentTarget=null}function hd(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var s=e[o],c=s.event;s=s.listeners;e:{var p=void 0;if(n)for(var x=s.length-1;0<=x;x--){var P=s[x],R=P.instance,K=P.currentTarget;if(P=P.listener,R!==p&&c.isPropagationStopped())break e;pd(c,P,K),p=R}else for(x=0;x<s.length;x++){if(P=s[x],R=P.instance,K=P.currentTarget,P=P.listener,R!==p&&c.isPropagationStopped())break e;pd(c,P,K),p=R}}}if(Cr)throw e=_o,Cr=!1,_o=null,e}function Le(e,n){var o=n[wa];o===void 0&&(o=n[wa]=new Set);var s=e+"__bubble";o.has(s)||(gd(n,e,2,!1),o.add(s))}function pa(e,n,o){var s=0;n&&(s|=4),gd(o,e,s,n)}var is="_reactListening"+Math.random().toString(36).slice(2);function Vo(e){if(!e[is]){e[is]=!0,l.forEach(function(o){o!=="selectionchange"&&(k0.has(o)||pa(o,!1,e),pa(o,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[is]||(n[is]=!0,pa("selectionchange",!1,n))}}function gd(e,n,o,s){switch(Dc(n)){case 1:var c=Am;break;case 4:c=$m;break;default:c=ql}o=c.bind(null,n,o,e),c=void 0,!ko||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),s?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 ha(e,n,o,s,c){var p=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var x=s.tag;if(x===3||x===4){var P=s.stateNode.containerInfo;if(P===c||P.nodeType===8&&P.parentNode===c)break;if(x===4)for(x=s.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){s=p=x;continue e}P=P.parentNode}}s=s.return}Di(function(){var K=p,re=xo(o),ie=[];e:{var ne=dd.get(e);if(ne!==void 0){var de=Jl,pe=e;switch(e){case"keypress":if(Ji(o)===0)break e;case"keydown":case"keyup":de=Zm;break;case"focusin":pe="focus",de=na;break;case"focusout":pe="blur",de=na;break;case"beforeblur":case"afterblur":de=na;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=Vc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":de=Fm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":de=t0;break;case ld:case ad:case ud:de=Bm;break;case cd:de=r0;break;case"scroll":de=Dm;break;case"wheel":de=i0;break;case"copy":case"cut":case"paste":de=Um;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":de=Bc}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=Vc,le="onMouseLeave",Y="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(he=Bc,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&&md(ie,ne,de,he,!1),pe!==null&&Ue!==null&&md(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=f0;else if(Qc(ne))if(Kc)ye=m0;else{ye=h0;var Se=p0}else(de=ne.nodeName)&&de.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(ye=g0);if(ye&&(ye=ye(e,K))){qc(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":(Qc(Se)||Se.contentEditable==="true")&&(Lr=Se,aa=K,Oo=null);break;case"focusout":Oo=aa=Lr=null;break;case"mousedown":ua=!0;break;case"contextmenu":case"mouseup":case"dragend":ua=!1,id(ie,o,re);break;case"selectionchange":if(x0)break;case"keydown":case"keyup":id(ie,o,re)}var ke;if(oa)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?Xc(e,o)&&(_e="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(_e="onCompositionStart");_e&&(Wc&&o.locale!=="ko"&&(Rr||_e!=="onCompositionStart"?_e==="onCompositionEnd"&&Rr&&(ke=Oc()):(Pn=re,Zl="value"in Pn?Pn.value:Pn.textContent,Rr=!0)),Se=ss(K,_e),0<Se.length&&(_e=new Hc(_e,e,null,o,re),ie.push({event:_e,listeners:Se}),ke?_e.data=ke:(ke=Gc(o),ke!==null&&(_e.data=ke)))),(ke=l0?a0(e,o):u0(e,o))&&(K=ss(K,"onBeforeInput"),0<K.length&&(re=new Hc("onBeforeInput","beforeinput",null,o,re),ie.push({event:re,listeners:K}),re.data=ke))}hd(ie,n)})}function Ho(e,n,o){return{instance:e,listener:n,currentTarget:o}}function ss(e,n){for(var o=n+"Capture",s=[];e!==null;){var c=e,p=c.stateNode;c.tag===5&&p!==null&&(c=p,p=Zn(e,o),p!=null&&s.unshift(Ho(e,p,c)),p=Zn(e,n),p!=null&&s.push(Ho(e,p,c))),e=e.return}return s}function $r(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function md(e,n,o,s,c){for(var p=n._reactName,x=[];o!==null&&o!==s;){var P=o,R=P.alternate,K=P.stateNode;if(R!==null&&R===s)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 _0=/\r\n?/g,E0=/\u0000|\uFFFD/g;function yd(e){return(typeof e=="string"?e:""+e).replace(_0,`
|
|
38
|
-
`).replace(E0,"")}function ls(e,n,o){if(n=yd(n),yd(e)!==n&&o)throw Error(i(425))}function as(){}var ga=null,ma=null;function ya(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 va=typeof setTimeout=="function"?setTimeout:void 0,N0=typeof clearTimeout=="function"?clearTimeout:void 0,vd=typeof Promise=="function"?Promise:void 0,C0=typeof queueMicrotask=="function"?queueMicrotask:typeof vd<"u"?function(e){return vd.resolve(null).then(e).catch(b0)}:va;function b0(e){setTimeout(function(){throw e})}function xa(e,n){var o=n,s=0;do{var c=o.nextSibling;if(e.removeChild(o),c&&c.nodeType===8)if(o=c.data,o==="/$"){if(s===0){e.removeChild(c),To(n);return}s--}else o!=="$"&&o!=="$?"&&o!=="$!"||s++;o=c}while(o);To(n)}function In(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 xd(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,wa="__reactEvents$"+Dr,M0="__reactListeners$"+Dr,P0="__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=xd(e);e!==null;){if(o=e[Jt])return o;e=xd(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 Sa=[],Fr=-1;function Tn(e){return{current:e}}function Ae(e){0>Fr||(e.current=Sa[Fr],Sa[Fr]=null,Fr--)}function je(e,n){Fr++,Sa[Fr]=e.current,e.current=n}var jn={},rt=Tn(jn),ht=Tn(!1),ir=jn;function Vr(e,n){var o=e.type.contextTypes;if(!o)return jn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===n)return s.__reactInternalMemoizedMaskedChildContext;var c={},p;for(p in o)c[p]=n[p];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=c),c}function gt(e){return e=e.childContextTypes,e!=null}function cs(){Ae(ht),Ae(rt)}function wd(e,n,o){if(rt.current!==jn)throw Error(i(168));je(rt,n),je(ht,o)}function Sd(e,n,o){var s=e.stateNode;if(n=n.childContextTypes,typeof s.getChildContext!="function")return o;s=s.getChildContext();for(var c in s)if(!(c in n))throw Error(i(108,ue(e)||"Unknown",c));return F({},o,s)}function ds(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jn,ir=rt.current,je(rt,e),je(ht,ht.current),!0}function kd(e,n,o){var s=e.stateNode;if(!s)throw Error(i(169));o?(e=Sd(e,n,ir),s.__reactInternalMemoizedMergedChildContext=e,Ae(ht),Ae(rt),je(rt,e)):Ae(ht),je(ht,o)}var dn=null,fs=!1,ka=!1;function _d(e){dn===null?dn=[e]:dn.push(e)}function z0(e){fs=!0,_d(e)}function Rn(){if(!ka&&dn!==null){ka=!0;var e=0,n=Te;try{var o=dn;for(Te=1;e<o.length;e++){var s=o[e];do s=s(!0);while(s!==null)}dn=null,fs=!1}catch(c){throw dn!==null&&(dn=dn.slice(e+1)),Vi(Co,Rn),c}finally{Te=n,ka=!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 Ed(e,n,o){Tt[jt++]=fn,Tt[jt++]=pn,Tt[jt++]=sr,sr=e;var s=fn;e=pn;var c=32-_t(s)-1;s&=~(1<<c),o+=1;var p=32-_t(n)+c;if(30<p){var x=c-c%5;p=(s&(1<<x)-1).toString(32),s>>=x,c-=x,fn=1<<32-_t(n)+c|o<<c|s,pn=p+e}else fn=1<<p|o<<c|s,pn=e}function _a(e){e.return!==null&&(lr(e,1),Ed(e,1,0))}function Ea(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 Nd(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 Cd(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=In(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 Na(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ca(e){if(De){var n=Ct;if(n){var o=n;if(!Cd(e,n)){if(Na(e))throw Error(i(418));n=In(o.nextSibling);var s=Nt;n&&Cd(e,n)?Nd(s,o):(e.flags=e.flags&-4097|2,De=!1,Nt=e)}}else{if(Na(e))throw Error(i(418));e.flags=e.flags&-4097|2,De=!1,Nt=e}}}function bd(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 bd(e),De=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!ya(e.type,e.memoizedProps)),n&&(n=Ct)){if(Na(e))throw Md(),Error(i(418));for(;n;)Nd(e,n),n=In(n.nextSibling)}if(bd(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=In(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}Ct=null}}else Ct=Nt?In(e.stateNode.nextSibling):null;return!0}function Md(){for(var e=Ct;e;)e=In(e.nextSibling)}function Wr(){Ct=Nt=null,De=!1}function ba(e){Ot===null?Ot=[e]:Ot.push(e)}var I0=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 s=o.stateNode}if(!s)throw Error(i(147,e));var c=s,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 Pd(e){var n=e._init;return n(e._payload)}function zd(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 s(Y,$){for(Y=new Map;$!==null;)$.key!==null?Y.set($.key,$):Y.set($.index,$),$=$.sibling;return Y}function c(Y,$){return Y=Hn(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?($=vu(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===D&&Pd(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?($=xu(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 $=vu(""+$,Y.mode,Q),$.return=Y,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case O:return Q=Fs($.type,$.key,$.props,null,Y.mode,Q),Q.ref=Uo(Y,null,$),Q.return=Y,Q;case A:return $=xu($,Y.mode,Q),$.return=Y,$;case D:var le=$._init;return ie(Y,le($._payload),Q)}if(tt($)||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 O:return Q.key===ye?R(Y,$,Q,le):null;case A:return Q.key===ye?K(Y,$,Q,le):null;case D:return ye=Q._init,ne(Y,$,ye(Q._payload),le)}if(tt(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 O: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 D:var Se=le._init;return de(Y,$,Q,Se(le._payload),ye)}if(tt(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=s(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(Bn){return n(Y,Bn)}),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 Bn=ne(Y,ke,ze.value,le);if(Bn===null){ke===null&&(ke=Ze);break}e&&ke&&Bn.alternate===null&&n(Y,ke),$=p(Bn,$,_e),Se===null?ye=Bn:Se.sibling=Bn,Se=Bn,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=s(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(cy){return n(Y,cy)}),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 O: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===D&&Pd(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}$=xu(Q,Y.mode,le),$.return=Y,Y=$}return x(Y);case D:return Se=Q._init,Ue(Y,$,Se(Q._payload),le)}if(tt(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,$),$=vu(Q,Y.mode,le),$.return=Y,Y=$),x(Y)):o(Y,$)}return Ue}var Ur=zd(!0),Id=zd(!1),ys=Tn(null),vs=null,Yr=null,Ma=null;function Pa(){Ma=Yr=vs=null}function za(e){var n=ys.current;Ae(ys),e._currentValue=n}function Ia(e,n,o){for(;e!==null;){var s=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),e===o)break;e=e.return}}function Xr(e,n){vs=e,Ma=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(Ma!==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 Ta(e){ar===null?ar=[e]:ar.push(e)}function Td(e,n,o,s){var c=n.interleaved;return c===null?(o.next=o,Ta(n)):(o.next=c.next,c.next=o),n.interleaved=o,hn(e,s)}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 Ln=!1;function ja(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function jd(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 An(e,n,o){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Pe&2)!==0){var c=s.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),s.pending=n,hn(e,o)}return c=s.interleaved,c===null?(n.next=n,Ta(s)):(n.next=c.next,c.next=n),s.interleaved=n,hn(e,o)}function xs(e,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194240)!==0)){var s=n.lanes;s&=e.pendingLanes,o|=s,n.lanes=o,Ir(e,o)}}function Rd(e,n){var o=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,o===s)){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:s.baseState,firstBaseUpdate:c,lastBaseUpdate:p,shared:s.shared,effects:s.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function ws(e,n,o,s){var c=e.updateQueue;Ln=!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((s&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=F({},ie,ne);break e;case 2:Ln=!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 Ld(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var s=e[n],c=s.callback;if(c!==null){if(s.callback=null,s=o,typeof c!="function")throw Error(i(191,c));c.call(s)}}}var Yo={},en=Tn(Yo),Xo=Tn(Yo),Go=Tn(Yo);function ur(e){if(e===Yo)throw Error(i(174));return e}function Ra(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 Ad(e){ur(Go.current);var n=ur(en.current),o=St(n,e.type);n!==o&&(je(Xo,e),je(en,o))}function La(e){Xo.current===e&&(Ae(en),Ae(Xo))}var He=Tn(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 Aa=[];function $a(){for(var e=0;e<Aa.length;e++)Aa[e]._workInProgressVersionPrimary=null;Aa.length=0}var ks=M.ReactCurrentDispatcher,Da=M.ReactCurrentBatchConfig,cr=0,Be=null,Ge=null,qe=null,_s=!1,Qo=!1,qo=0,T0=0;function ot(){throw Error(i(321))}function Oa(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 Fa(e,n,o,s,c,p){if(cr=p,Be=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,ks.current=e===null||e.memoizedState===null?A0:$0,e=o(s,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=D0,e=o(s,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 Va(){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 Ha(e){var n=Lt(),o=n.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=e;var s=Ge,c=s.baseQueue,p=o.pending;if(p!==null){if(c!==null){var x=c.next;c.next=p.next,p.next=x}s.baseQueue=c=p,o.pending=null}if(c!==null){p=c.next,s=s.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}),s=K.hasEagerState?K.eagerState:e(s,K.action);else{var ie={lane:re,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null};R===null?(P=R=ie,x=s):R=R.next=ie,Be.lanes|=re,dr|=re}K=K.next}while(K!==null&&K!==p);R===null?x=s:R.next=P,Dt(s,n.memoizedState)||(mt=!0),n.memoizedState=s,n.baseState=x,n.baseQueue=R,o.lastRenderedState=s}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 Ba(e){var n=Lt(),o=n.queue;if(o===null)throw Error(i(311));o.lastRenderedReducer=e;var s=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,s]}function $d(){}function Dd(e,n){var o=Be,s=Lt(),c=n(),p=!Dt(s.memoizedState,c);if(p&&(s.memoizedState=c,mt=!0),s=s.queue,Wa(Vd.bind(null,o,s,e),[e]),s.getSnapshot!==n||p||qe!==null&&qe.memoizedState.tag&1){if(o.flags|=2048,Zo(9,Fd.bind(null,o,s,c,n),void 0,null),Ke===null)throw Error(i(349));(cr&30)!==0||Od(o,n,c)}return c}function Od(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 Fd(e,n,o,s){n.value=o,n.getSnapshot=s,Hd(n)&&Bd(e)}function Vd(e,n,o){return o(function(){Hd(n)&&Bd(e)})}function Hd(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!Dt(e,o)}catch{return!0}}function Bd(e){var n=hn(e,1);n!==null&&Bt(n,e,1,-1)}function Wd(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=L0.bind(null,Be,e),[n.memoizedState,e]}function Zo(e,n,o,s){return e={tag:e,create:n,destroy:o,deps:s,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:(s=o.next,o.next=e,e.next=s,n.lastEffect=e)),e}function Ud(){return Lt().memoizedState}function Es(e,n,o,s){var c=tn();Be.flags|=e,c.memoizedState=Zo(1|n,o,void 0,s===void 0?null:s)}function Ns(e,n,o,s){var c=Lt();s=s===void 0?null:s;var p=void 0;if(Ge!==null){var x=Ge.memoizedState;if(p=x.destroy,s!==null&&Oa(s,x.deps)){c.memoizedState=Zo(n,o,p,s);return}}Be.flags|=e,c.memoizedState=Zo(1|n,o,p,s)}function Yd(e,n){return Es(8390656,8,e,n)}function Wa(e,n){return Ns(2048,8,e,n)}function Xd(e,n){return Ns(4,2,e,n)}function Gd(e,n){return Ns(4,4,e,n)}function Qd(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 qd(e,n,o){return o=o!=null?o.concat([e]):null,Ns(4,4,Qd.bind(null,n,e),o)}function Ua(){}function Kd(e,n){var o=Lt();n=n===void 0?null:n;var s=o.memoizedState;return s!==null&&n!==null&&Oa(n,s[1])?s[0]:(o.memoizedState=[e,n],e)}function Zd(e,n){var o=Lt();n=n===void 0?null:n;var s=o.memoizedState;return s!==null&&n!==null&&Oa(n,s[1])?s[0]:(e=e(),o.memoizedState=[e,n],e)}function Jd(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 j0(e,n){var o=Te;Te=o!==0&&4>o?o:4,e(!0);var s=Da.transition;Da.transition={};try{e(!1),n()}finally{Te=o,Da.transition=s}}function ef(){return Lt().memoizedState}function R0(e,n,o){var s=Fn(e);if(o={lane:s,action:o,hasEagerState:!1,eagerState:null,next:null},tf(e))nf(n,o);else if(o=Td(e,n,o,s),o!==null){var c=dt();Bt(o,e,s,c),rf(o,n,s)}}function L0(e,n,o){var s=Fn(e),c={lane:s,action:o,hasEagerState:!1,eagerState:null,next:null};if(tf(e))nf(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,Ta(n)):(c.next=R.next,R.next=c),n.interleaved=c;return}}catch{}finally{}o=Td(e,n,c,s),o!==null&&(c=dt(),Bt(o,e,s,c),rf(o,n,s))}}function tf(e){var n=e.alternate;return e===Be||n!==null&&n===Be}function nf(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 rf(e,n,o){if((o&4194240)!==0){var s=n.lanes;s&=e.pendingLanes,o|=s,n.lanes=o,Ir(e,o)}}var Cs={readContext:Rt,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useInsertionEffect:ot,useLayoutEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useMutableSource:ot,useSyncExternalStore:ot,useId:ot,unstable_isNewReconciler:!1},A0={readContext:Rt,useCallback:function(e,n){return tn().memoizedState=[e,n===void 0?null:n],e},useContext:Rt,useEffect:Yd,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,Es(4194308,4,Qd.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 s=tn();return n=o!==void 0?o(n):n,s.memoizedState=s.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},s.queue=e,e=e.dispatch=R0.bind(null,Be,e),[s.memoizedState,e]},useRef:function(e){var n=tn();return e={current:e},n.memoizedState=e},useState:Wd,useDebugValue:Ua,useDeferredValue:function(e){return tn().memoizedState=e},useTransition:function(){var e=Wd(!1),n=e[0];return e=j0.bind(null,e[1]),tn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,o){var s=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||Od(s,n,o)}c.memoizedState=o;var p={value:o,getSnapshot:n};return c.queue=p,Yd(Vd.bind(null,s,p,e),[e]),s.flags|=2048,Zo(9,Fd.bind(null,s,p,o,n),void 0,null),o},useId:function(){var e=tn(),n=Ke.identifierPrefix;if(De){var o=pn,s=fn;o=(s&~(1<<32-_t(s)-1)).toString(32)+o,n=":"+n+"R"+o,o=qo++,0<o&&(n+="H"+o.toString(32)),n+=":"}else o=T0++,n=":"+n+"r"+o.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},$0={readContext:Rt,useCallback:Kd,useContext:Rt,useEffect:Wa,useImperativeHandle:qd,useInsertionEffect:Xd,useLayoutEffect:Gd,useMemo:Zd,useReducer:Ha,useRef:Ud,useState:function(){return Ha(Ko)},useDebugValue:Ua,useDeferredValue:function(e){var n=Lt();return Jd(n,Ge.memoizedState,e)},useTransition:function(){var e=Ha(Ko)[0],n=Lt().memoizedState;return[e,n]},useMutableSource:$d,useSyncExternalStore:Dd,useId:ef,unstable_isNewReconciler:!1},D0={readContext:Rt,useCallback:Kd,useContext:Rt,useEffect:Wa,useImperativeHandle:qd,useInsertionEffect:Xd,useLayoutEffect:Gd,useMemo:Zd,useReducer:Ba,useRef:Ud,useState:function(){return Ba(Ko)},useDebugValue:Ua,useDeferredValue:function(e){var n=Lt();return Ge===null?n.memoizedState=e:Jd(n,Ge.memoizedState,e)},useTransition:function(){var e=Ba(Ko)[0],n=Lt().memoizedState;return[e,n]},useMutableSource:$d,useSyncExternalStore:Dd,useId:ef,unstable_isNewReconciler:!1};function Ft(e,n){if(e&&e.defaultProps){n=F({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}function Ya(e,n,o,s){n=e.memoizedState,o=o(s,n),o=o==null?n:F({},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 s=dt(),c=Fn(e),p=gn(s,c);p.payload=n,o!=null&&(p.callback=o),n=An(e,p,c),n!==null&&(Bt(n,e,c,s),xs(n,e,c))},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var s=dt(),c=Fn(e),p=gn(s,c);p.tag=1,p.payload=n,o!=null&&(p.callback=o),n=An(e,p,c),n!==null&&(Bt(n,e,c,s),xs(n,e,c))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=dt(),s=Fn(e),c=gn(o,s);c.tag=2,n!=null&&(c.callback=n),n=An(e,c,s),n!==null&&(Bt(n,e,s,o),xs(n,e,s))}};function of(e,n,o,s,c,p,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,p,x):n.prototype&&n.prototype.isPureReactComponent?!Do(o,s)||!Do(c,p):!0}function sf(e,n,o){var s=!1,c=jn,p=n.contextType;return typeof p=="object"&&p!==null?p=Rt(p):(c=gt(n)?ir:rt.current,s=n.contextTypes,p=(s=s!=null)?Vr(e,c):jn),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,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=p),n}function lf(e,n,o,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,s),n.state!==e&&bs.enqueueReplaceState(n,n.state,null)}function Xa(e,n,o,s){var c=e.stateNode;c.props=o,c.state=e.memoizedState,c.refs={},ja(e);var p=n.contextType;typeof p=="object"&&p!==null?c.context=Rt(p):(p=gt(n)?ir:rt.current,c.context=Vr(e,p)),c.state=e.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(Ya(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,s),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function Qr(e,n){try{var o="",s=n;do o+=ae(s),s=s.return;while(s);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 Ga(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function Qa(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var O0=typeof WeakMap=="function"?WeakMap:Map;function af(e,n,o){o=gn(-1,o),o.tag=3,o.payload={element:null};var s=n.value;return o.callback=function(){Rs||(Rs=!0,cu=s),Qa(e,n)},o}function uf(e,n,o){o=gn(-1,o),o.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var c=n.value;o.payload=function(){return s(c)},o.callback=function(){Qa(e,n)}}var p=e.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(o.callback=function(){Qa(e,n),typeof s!="function"&&(Dn===null?Dn=new Set([this]):Dn.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})}),o}function cf(e,n,o){var s=e.pingCache;if(s===null){s=e.pingCache=new O0;var c=new Set;s.set(n,c)}else c=s.get(n),c===void 0&&(c=new Set,s.set(n,c));c.has(o)||(c.add(o),e=J0.bind(null,e,n,o),n.then(e,e))}function df(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 ff(e,n,o,s,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,An(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var F0=M.ReactCurrentOwner,mt=!1;function ct(e,n,o,s){n.child=e===null?Id(n,null,o,s):Ur(n,e.child,o,s)}function pf(e,n,o,s,c){o=o.render;var p=n.ref;return Xr(n,c),s=Fa(e,n,o,s,p,c),o=Va(),e!==null&&!mt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,mn(e,n,c)):(De&&o&&_a(n),n.flags|=1,ct(e,n,s,c),n.child)}function hf(e,n,o,s,c){if(e===null){var p=o.type;return typeof p=="function"&&!yu(p)&&p.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=p,gf(e,n,p,s,c)):(e=Fs(o.type,null,s,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,s)&&e.ref===n.ref)return mn(e,n,c)}return n.flags|=1,e=Hn(p,s),e.ref=n.ref,e.return=n,n.child=e}function gf(e,n,o,s,c){if(e!==null){var p=e.memoizedProps;if(Do(p,s)&&e.ref===n.ref)if(mt=!1,n.pendingProps=s=p,(e.lanes&c)!==0)(e.flags&131072)!==0&&(mt=!0);else return n.lanes=e.lanes,mn(e,n,c)}return qa(e,n,o,s,c)}function mf(e,n,o){var s=n.pendingProps,c=s.children,p=e!==null?e.memoizedState:null;if(s.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},s=p!==null?p.baseLanes:o,je(Kr,bt),bt|=s}else p!==null?(s=p.baseLanes|o,n.memoizedState=null):s=o,je(Kr,bt),bt|=s;return ct(e,n,c,o),n.child}function yf(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function qa(e,n,o,s,c){var p=gt(o)?ir:rt.current;return p=Vr(n,p),Xr(n,c),o=Fa(e,n,o,s,p,c),s=Va(),e!==null&&!mt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,mn(e,n,c)):(De&&s&&_a(n),n.flags|=1,ct(e,n,o,c),n.child)}function vf(e,n,o,s,c){if(gt(o)){var p=!0;ds(n)}else p=!1;if(Xr(n,c),n.stateNode===null)Ps(e,n),sf(n,o,s),Xa(n,o,s,c),s=!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:rt.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!==s||R!==K)&&lf(n,x,s,K),Ln=!1;var ne=n.memoizedState;x.state=ne,ws(n,s,x,c),R=n.memoizedState,P!==s||ne!==R||ht.current||Ln?(typeof re=="function"&&(Ya(n,o,re,s),R=n.memoizedState),(P=Ln||of(n,o,P,s,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=s,n.memoizedState=R),x.props=s,x.state=R,x.context=K,s=P):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{x=n.stateNode,jd(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:rt.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)&&lf(n,x,s,R),Ln=!1,ne=n.memoizedState,x.state=ne,ws(n,s,x,c);var pe=n.memoizedState;P!==ie||ne!==pe||ht.current||Ln?(typeof de=="function"&&(Ya(n,o,de,s),pe=n.memoizedState),(K=Ln||of(n,o,K,s,ne,pe,R)||!1)?(re||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(s,pe,R),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(s,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=s,n.memoizedState=pe),x.props=s,x.state=pe,x.context=R,s=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),s=!1)}return Ka(e,n,o,s,p,c)}function Ka(e,n,o,s,c,p){yf(e,n);var x=(n.flags&128)!==0;if(!s&&!x)return c&&kd(n,o,!1),mn(e,n,p);s=n.stateNode,F0.current=n;var P=x&&typeof o.getDerivedStateFromError!="function"?null:s.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=s.state,c&&kd(n,o,!0),n.child}function xf(e){var n=e.stateNode;n.pendingContext?wd(e,n.pendingContext,n.pendingContext!==n.context):n.context&&wd(e,n.context,!1),Ra(e,n.containerInfo)}function wf(e,n,o,s,c){return Wr(),ba(c),n.flags|=256,ct(e,n,o,s),n.child}var Za={dehydrated:null,treeContext:null,retryLane:0};function Ja(e){return{baseLanes:e,cachePool:null,transitions:null}}function Sf(e,n,o){var s=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 Ca(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=s.children,e=s.fallback,p?(s=n.mode,p=n.child,x={mode:"hidden",children:x},(s&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=x):p=Vs(x,s,0,null),e=gr(e,s,o,null),p.return=n,e.return=n,p.sibling=e,n.child=p,n.child.memoizedState=Ja(o),n.memoizedState=Za,e):eu(n,x));if(c=e.memoizedState,c!==null&&(P=c.dehydrated,P!==null))return V0(e,n,x,s,P,c,o);if(p){p=s.fallback,x=n.mode,c=e.child,P=c.sibling;var R={mode:"hidden",children:s.children};return(x&1)===0&&n.child!==c?(s=n.child,s.childLanes=0,s.pendingProps=R,n.deletions=null):(s=Hn(c,R),s.subtreeFlags=c.subtreeFlags&14680064),P!==null?p=Hn(P,p):(p=gr(p,x,o,null),p.flags|=2),p.return=n,s.return=n,s.sibling=p,n.child=s,s=p,p=n.child,x=e.child.memoizedState,x=x===null?Ja(o):{baseLanes:x.baseLanes|o,cachePool:null,transitions:x.transitions},p.memoizedState=x,p.childLanes=e.childLanes&~o,n.memoizedState=Za,s}return p=e.child,e=p.sibling,s=Hn(p,{mode:"visible",children:s.children}),(n.mode&1)===0&&(s.lanes=o),s.return=n,s.sibling=null,e!==null&&(o=n.deletions,o===null?(n.deletions=[e],n.flags|=16):o.push(e)),n.child=s,n.memoizedState=null,s}function eu(e,n){return n=Vs({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Ms(e,n,o,s){return s!==null&&ba(s),Ur(n,e.child,null,o),e=eu(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function V0(e,n,o,s,c,p,x){if(o)return n.flags&256?(n.flags&=-257,s=Ga(Error(i(422))),Ms(e,n,x,s)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(p=s.fallback,c=n.mode,s=Vs({mode:"visible",children:s.children},c,0,null),p=gr(p,c,x,null),p.flags|=2,s.return=n,p.return=n,s.sibling=p,n.child=s,(n.mode&1)!==0&&Ur(n,e.child,null,x),n.child.memoizedState=Ja(x),n.memoizedState=Za,p);if((n.mode&1)===0)return Ms(e,n,x,null);if(c.data==="$!"){if(s=c.nextSibling&&c.nextSibling.dataset,s)var P=s.dgst;return s=P,p=Error(i(419)),s=Ga(p,s,void 0),Ms(e,n,x,s)}if(P=(x&e.childLanes)!==0,mt||P){if(s=Ke,s!==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&(s.suspendedLanes|x))!==0?0:c,c!==0&&c!==p.retryLane&&(p.retryLane=c,hn(e,c),Bt(s,e,c,-1))}return mu(),s=Ga(Error(i(421))),Ms(e,n,x,s)}return c.data==="$?"?(n.flags|=128,n.child=e.child,n=ey.bind(null,e),c._reactRetry=n,null):(e=p.treeContext,Ct=In(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=eu(n,s.children),n.flags|=4096,n)}function kf(e,n,o){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),Ia(e.return,n,o)}function tu(e,n,o,s,c){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:o,tailMode:c}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=s,p.tail=o,p.tailMode=c)}function _f(e,n,o){var s=n.pendingProps,c=s.revealOrder,p=s.tail;if(ct(e,n,s.children,o),s=He.current,(s&2)!==0)s=s&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&&kf(e,o,n);else if(e.tag===19)kf(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}s&=1}if(je(He,s),(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),tu(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}tu(n,!0,o,null,p);break;case"together":tu(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=Hn(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=Hn(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}function H0(e,n,o){switch(n.tag){case 3:xf(n),Wr();break;case 5:Ad(n);break;case 1:gt(n.type)&&ds(n);break;case 4:Ra(n,n.stateNode.containerInfo);break;case 10:var s=n.type._context,c=n.memoizedProps.value;je(ys,s._currentValue),s._currentValue=c;break;case 13:if(s=n.memoizedState,s!==null)return s.dehydrated!==null?(je(He,He.current&1),n.flags|=128,null):(o&n.child.childLanes)!==0?Sf(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(s=(o&n.childLanes)!==0,(e.flags&128)!==0){if(s)return _f(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),s)break;return null;case 22:case 23:return n.lanes=0,mf(e,n,o)}return mn(e,n,o)}var Ef,nu,Nf,Cf;Ef=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}},nu=function(){},Nf=function(e,n,o,s){var c=e.memoizedProps;if(c!==s){e=n.stateNode,ur(en.current);var p=null;switch(o){case"input":c=Ee(e,c),s=Ee(e,s),p=[];break;case"select":c=F({},c,{value:void 0}),s=F({},s,{value:void 0}),p=[];break;case"textarea":c=ln(e,c),s=ln(e,s),p=[];break;default:typeof c.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=as)}mo(o,s);var x;o=null;for(K in c)if(!s.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 s){var R=s[K];if(P=c!=null?c[K]:void 0,s.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)}},Cf=function(e,n,o,s){o!==s&&(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 s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function it(e){var n=e.alternate!==null&&e.alternate.child===e.child,o=0,s=0;if(n)for(var c=e.child;c!==null;)o|=c.lanes|c.childLanes,s|=c.subtreeFlags&14680064,s|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)o|=c.lanes|c.childLanes,s|=c.subtreeFlags,s|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=s,e.childLanes=o,n}function B0(e,n,o){var s=n.pendingProps;switch(Ea(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(n),null;case 1:return gt(n.type)&&cs(),it(n),null;case 3:return s=n.stateNode,Gr(),Ae(ht),Ae(rt),$a(),s.pendingContext&&(s.context=s.pendingContext,s.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&&(pu(Ot),Ot=null))),nu(e,n),it(n),null;case 5:La(n);var c=ur(Go.current);if(o=n.type,e!==null&&n.stateNode!=null)Nf(e,n,o,s,c),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!s){if(n.stateNode===null)throw Error(i(166));return it(n),null}if(e=ur(en.current),gs(n)){s=n.stateNode,o=n.type;var p=n.memoizedProps;switch(s[Jt]=n,s[Bo]=p,e=(n.mode&1)!==0,o){case"dialog":Le("cancel",s),Le("close",s);break;case"iframe":case"object":case"embed":Le("load",s);break;case"video":case"audio":for(c=0;c<Fo.length;c++)Le(Fo[c],s);break;case"source":Le("error",s);break;case"img":case"image":case"link":Le("error",s),Le("load",s);break;case"details":Le("toggle",s);break;case"input":Me(s,p),Le("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!p.multiple},Le("invalid",s);break;case"textarea":qt(s,p),Le("invalid",s)}mo(o,p),c=null;for(var x in p)if(p.hasOwnProperty(x)){var P=p[x];x==="children"?typeof P=="string"?s.textContent!==P&&(p.suppressHydrationWarning!==!0&&ls(s.textContent,P,e),c=["children",P]):typeof P=="number"&&s.textContent!==""+P&&(p.suppressHydrationWarning!==!0&&ls(s.textContent,P,e),c=["children",""+P]):a.hasOwnProperty(x)&&P!=null&&x==="onScroll"&&Le("scroll",s)}switch(o){case"input":we(s),ut(s,p,!0);break;case"textarea":we(s),pt(s);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(s.onclick=as)}s=c,n.updateQueue=s,s!==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 s.is=="string"?e=x.createElement(o,{is:s.is}):(e=x.createElement(o),o==="select"&&(x=e,s.multiple?x.multiple=!0:s.size&&(x.size=s.size))):e=x.createElementNS(e,o),e[Jt]=n,e[Bo]=s,Ef(e,n,!1,!1),n.stateNode=e;e:{switch(x=yo(o,s),o){case"dialog":Le("cancel",e),Le("close",e),c=s;break;case"iframe":case"object":case"embed":Le("load",e),c=s;break;case"video":case"audio":for(c=0;c<Fo.length;c++)Le(Fo[c],e);c=s;break;case"source":Le("error",e),c=s;break;case"img":case"image":case"link":Le("error",e),Le("load",e),c=s;break;case"details":Le("toggle",e),c=s;break;case"input":Me(e,s),c=Ee(e,s),Le("invalid",e);break;case"option":c=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},c=F({},s,{value:void 0}),Le("invalid",e);break;case"textarea":qt(e,s),c=ln(e,s),Le("invalid",e);break;default:c=s}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&&E(e,p,R,x))}switch(o){case"input":we(e),ut(e,s,!1);break;case"textarea":we(e),pt(e);break;case"option":s.value!=null&&e.setAttribute("value",""+Z(s.value));break;case"select":e.multiple=!!s.multiple,p=s.value,p!=null?nt(e,!!s.multiple,p,!1):s.defaultValue!=null&&nt(e,!!s.multiple,s.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=as)}switch(o){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return it(n),null;case 6:if(e&&n.stateNode!=null)Cf(e,n,e.memoizedProps,s);else{if(typeof s!="string"&&n.stateNode===null)throw Error(i(166));if(o=ur(Go.current),ur(en.current),gs(n)){if(s=n.stateNode,o=n.memoizedProps,s[Jt]=n,(p=s.nodeValue!==o)&&(e=Nt,e!==null))switch(e.tag){case 3:ls(s.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ls(s.nodeValue,o,(e.mode&1)!==0)}p&&(n.flags|=4)}else s=(o.nodeType===9?o:o.ownerDocument).createTextNode(s),s[Jt]=n,n.stateNode=s}return it(n),null;case 13:if(Ae(He),s=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(De&&Ct!==null&&(n.mode&1)!==0&&(n.flags&128)===0)Md(),Wr(),n.flags|=98560,p=!1;else if(p=gs(n),s!==null&&s.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;it(n),p=!1}else Ot!==null&&(pu(Ot),Ot=null),p=!0;if(!p)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=o,n):(s=s!==null,s!==(e!==null&&e.memoizedState!==null)&&s&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(He.current&1)!==0?Qe===0&&(Qe=3):mu())),n.updateQueue!==null&&(n.flags|=4),it(n),null);case 4:return Gr(),nu(e,n),e===null&&Vo(n.stateNode.containerInfo),it(n),null;case 10:return za(n.type._context),it(n),null;case 17:return gt(n.type)&&cs(),it(n),null;case 19:if(Ae(He),p=n.memoizedState,p===null)return it(n),null;if(s=(n.flags&128)!==0,x=p.rendering,x===null)if(s)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),s=x.updateQueue,s!==null&&(n.updateQueue=s,n.flags|=4),n.subtreeFlags=0,s=o,o=n.child;o!==null;)p=o,e=s,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,s=!0,Jo(p,!1),n.lanes=4194304)}else{if(!s)if(e=Ss(x),e!==null){if(n.flags|=128,s=!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 it(n),null}else 2*Ve()-p.renderingStartTime>Zr&&o!==1073741824&&(n.flags|=128,s=!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,s?o&1|2:o&1),n):(it(n),null);case 22:case 23:return gu(),s=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(n.flags|=8192),s&&(n.mode&1)!==0?(bt&1073741824)!==0&&(it(n),n.subtreeFlags&6&&(n.flags|=8192)):it(n),null;case 24:return null;case 25:return null}throw Error(i(156,n.tag))}function W0(e,n){switch(Ea(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(rt),$a(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return La(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 za(n.type._context),null;case 22:case 23:return gu(),null;case 24:return null;default:return null}}var zs=!1,st=!1,U0=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(s){We(e,n,s)}else o.current=null}function ru(e,n,o){try{o()}catch(s){We(e,n,s)}}var bf=!1;function Y0(e,n){if(ga=qi,e=od(),la(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var s=o.getSelection&&o.getSelection();if(s&&s.rangeCount!==0){o=s.anchorNode;var c=s.anchorOffset,p=s.focusNode;s=s.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||s!==0&&ie.nodeType!==3||(R=x+s),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===s&&(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(ma={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=bf,bf=!1,pe}function ei(e,n,o){var s=n.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&e)===e){var p=c.destroy;c.destroy=void 0,p!==void 0&&ru(n,o,p)}c=c.next}while(c!==s)}}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 s=o.create;o.destroy=s()}o=o.next}while(o!==n)}}function ou(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 Mf(e){var n=e.alternate;n!==null&&(e.alternate=null,Mf(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[wa],delete n[M0],delete n[P0])),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 Pf(e){return e.tag===5||e.tag===3||e.tag===4}function zf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Pf(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 iu(e,n,o){var s=e.tag;if(s===5||s===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(s!==4&&(e=e.child,e!==null))for(iu(e,n,o),e=e.sibling;e!==null;)iu(e,n,o),e=e.sibling}function su(e,n,o){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?o.insertBefore(e,n):o.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(su(e,n,o),e=e.sibling;e!==null;)su(e,n,o),e=e.sibling}var Je=null,Vt=!1;function $n(e,n,o){for(o=o.child;o!==null;)If(e,n,o),o=o.sibling}function If(e,n,o){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(Mr,o)}catch{}switch(o.tag){case 5:st||qr(o,n);case 6:var s=Je,c=Vt;Je=null,$n(e,n,o),Je=s,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?xa(e.parentNode,o):e.nodeType===1&&xa(e,o),To(e)):xa(Je,o.stateNode));break;case 4:s=Je,c=Vt,Je=o.stateNode.containerInfo,Vt=!0,$n(e,n,o),Je=s,Vt=c;break;case 0:case 11:case 14:case 15:if(!st&&(s=o.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){c=s=s.next;do{var p=c,x=p.destroy;p=p.tag,x!==void 0&&((p&2)!==0||(p&4)!==0)&&ru(o,n,x),c=c.next}while(c!==s)}$n(e,n,o);break;case 1:if(!st&&(qr(o,n),s=o.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=o.memoizedProps,s.state=o.memoizedState,s.componentWillUnmount()}catch(P){We(o,n,P)}$n(e,n,o);break;case 21:$n(e,n,o);break;case 22:o.mode&1?(st=(s=st)||o.memoizedState!==null,$n(e,n,o),st=s):$n(e,n,o);break;default:$n(e,n,o)}}function Tf(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new U0),n.forEach(function(s){var c=ty.bind(null,e,s);o.has(s)||(o.add(s),s.then(c,c))})}}function Ht(e,n){var o=n.deletions;if(o!==null)for(var s=0;s<o.length;s++){var c=o[s];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));If(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;)jf(n,e),n=n.sibling}function jf(e,n){var o=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ht(n,e),nn(e),s&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),s&512&&o!==null&&qr(o,o.return);break;case 5:if(Ht(n,e),nn(e),s&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(s&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):E(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?nt(c,!!p.multiple,de,!1):ne!==!!p.multiple&&(p.defaultValue!=null?nt(c,!!p.multiple,p.defaultValue,!0):nt(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),s&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),s&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||(uu=Ve())),s&4&&Tf(e);break;case 22:if(re=o!==null&&o.memoizedState!==null,e.mode&1?(st=(K=st)||re,Ht(n,e),st=K):Ht(n,e),nn(e),s&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"){s=ne,o=ne.return;try{n=s,pe.props=n.memoizedProps,pe.state=n.memoizedState,pe.componentWillUnmount()}catch(he){We(s,o,he)}}break;case 5:qr(ne,ne.return);break;case 22:if(ne.memoizedState!==null){Af(ie);continue}}de!==null?(de.return=ne,fe=de):Af(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),s&4&&Tf(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(Pf(o)){var s=o;break e}o=o.return}throw Error(i(160))}switch(s.tag){case 5:var c=s.stateNode;s.flags&32&&(an(c,""),s.flags&=-33);var p=zf(e);su(e,p,c);break;case 3:case 4:var x=s.stateNode.containerInfo,P=zf(e);iu(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 X0(e,n,o){fe=e,Rf(e)}function Rf(e,n,o){for(var s=(e.mode&1)!==0;fe!==null;){var c=fe,p=c.child;if(c.tag===22&&s){var x=c.memoizedState!==null||zs;if(!x){var P=c.alternate,R=P!==null&&P.memoizedState!==null||st;P=zs;var K=st;if(zs=x,(st=R)&&!K)for(fe=c;fe!==null;)x=fe,R=x.child,x.tag===22&&x.memoizedState!==null?$f(c):R!==null?(R.return=x,fe=R):$f(c);for(;p!==null;)fe=p,Rf(p),p=p.sibling;fe=c,zs=P,st=K}Lf(e)}else(c.subtreeFlags&8772)!==0&&p!==null?(p.return=c,fe=p):Lf(e)}}function Lf(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:st||Is(5,n);break;case 1:var s=n.stateNode;if(n.flags&4&&!st)if(o===null)s.componentDidMount();else{var c=n.elementType===n.type?o.memoizedProps:Ft(n.type,o.memoizedProps);s.componentDidUpdate(c,o.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var p=n.updateQueue;p!==null&&Ld(n,p,s);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}Ld(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))}st||n.flags&512&&ou(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 Af(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 $f(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 s=n.stateNode;if(typeof s.componentDidMount=="function"){var c=n.return;try{s.componentDidMount()}catch(R){We(n,c,R)}}var p=n.return;try{ou(n)}catch(R){We(n,p,R)}break;case 5:var x=n.return;try{ou(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 G0=Math.ceil,Ts=M.ReactCurrentDispatcher,lu=M.ReactCurrentOwner,At=M.ReactCurrentBatchConfig,Pe=0,Ke=null,Ye=null,et=0,bt=0,Kr=Tn(0),Qe=0,ti=null,dr=0,js=0,au=0,ni=null,yt=null,uu=0,Zr=1/0,yn=null,Rs=!1,cu=null,Dn=null,Ls=!1,On=null,As=0,ri=0,du=null,$s=-1,Ds=0;function dt(){return(Pe&6)!==0?Ve():$s!==-1?$s:$s=Ve()}function Fn(e){return(e.mode&1)===0?1:(Pe&2)!==0&&et!==0?et&-et:I0.transition!==null?(Ds===0&&(Ds=Xi()),Ds):(e=Te,e!==0||(e=window.event,e=e===void 0?16:Dc(e.type)),e)}function Bt(e,n,o,s){if(50<ri)throw ri=0,du=null,Error(i(185));rr(e,o,s),((Pe&2)===0||e!==Ke)&&(e===Ke&&((Pe&2)===0&&(js|=o),Qe===4&&Vn(e,et)),vt(e,s),o===1&&Pe===0&&(n.mode&1)===0&&(Zr=Ve()+500,fs&&Rn()))}function vt(e,n){var o=e.callbackNode;Yi(e,n);var s=un(e,e===Ke?et:0);if(s===0)o!==null&&Hi(o),e.callbackNode=null,e.callbackPriority=0;else if(n=s&-s,e.callbackPriority!==n){if(o!=null&&Hi(o),n===1)e.tag===0?z0(Of.bind(null,e)):_d(Of.bind(null,e)),C0(function(){(Pe&6)===0&&Rn()}),o=null;else{switch(zc(s)){case 1:o=Co;break;case 4:o=Wi;break;case 16:o=br;break;case 536870912:o=Ui;break;default:o=br}o=Xf(o,Df.bind(null,e))}e.callbackPriority=n,e.callbackNode=o}}function Df(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 s=un(e,e===Ke?et:0);if(s===0)return null;if((s&30)!==0||(s&e.expiredLanes)!==0||n)n=Os(e,s);else{n=s;var c=Pe;Pe|=2;var p=Vf();(Ke!==e||et!==n)&&(yn=null,Zr=Ve()+500,pr(e,n));do try{K0();break}catch(P){Ff(e,P)}while(!0);Pa(),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&&(s=c,n=fu(e,c))),n===1)throw o=ti,pr(e,0),Vn(e,s),vt(e,Ve()),o;if(n===6)Vn(e,s);else{if(c=e.current.alternate,(s&30)===0&&!Q0(c)&&(n=Os(e,s),n===2&&(p=bo(e),p!==0&&(s=p,n=fu(e,p))),n===1))throw o=ti,pr(e,0),Vn(e,s),vt(e,Ve()),o;switch(e.finishedWork=c,e.finishedLanes=s,n){case 0:case 1:throw Error(i(345));case 2:hr(e,yt,yn);break;case 3:if(Vn(e,s),(s&130023424)===s&&(n=uu+500-Ve(),10<n)){if(un(e,0)!==0)break;if(c=e.suspendedLanes,(c&s)!==s){dt(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=va(hr.bind(null,e,yt,yn),n);break}hr(e,yt,yn);break;case 4:if(Vn(e,s),(s&4194240)===s)break;for(n=e.eventTimes,c=-1;0<s;){var x=31-_t(s);p=1<<x,x=n[x],x>c&&(c=x),s&=~p}if(s=c,s=Ve()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*G0(s/1960))-s,10<s){e.timeoutHandle=va(hr.bind(null,e,yt,yn),s);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?Df.bind(null,e):null}function fu(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&&pu(n)),e}function pu(e){yt===null?yt=e:yt.push.apply(yt,e)}function Q0(e){for(var n=e;;){if(n.flags&16384){var o=n.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var s=0;s<o.length;s++){var c=o[s],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 Vn(e,n){for(n&=~au,n&=~js,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-_t(n),s=1<<o;e[o]=-1,n&=~s}}function Of(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 s=bo(e);s!==0&&(n=s,o=fu(e,s))}if(o===1)throw o=ti,pr(e,0),Vn(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 hu(e,n){var o=Pe;Pe|=1;try{return e(n)}finally{Pe=o,Pe===0&&(Zr=Ve()+500,fs&&Rn())}}function fr(e){On!==null&&On.tag===0&&(Pe&6)===0&&Jr();var n=Pe;Pe|=1;var o=At.transition,s=Te;try{if(At.transition=null,Te=1,e)return e()}finally{Te=s,At.transition=o,Pe=n,(Pe&6)===0&&Rn()}}function gu(){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,N0(o)),Ye!==null)for(o=Ye.return;o!==null;){var s=o;switch(Ea(s),s.tag){case 1:s=s.type.childContextTypes,s!=null&&cs();break;case 3:Gr(),Ae(ht),Ae(rt),$a();break;case 5:La(s);break;case 4:Gr();break;case 13:Ae(He);break;case 19:Ae(He);break;case 10:za(s.type._context);break;case 22:case 23:gu()}o=o.return}if(Ke=e,Ye=e=Hn(e.current,null),et=bt=n,Qe=0,ti=null,au=js=dr=0,yt=ni=null,ar!==null){for(n=0;n<ar.length;n++)if(o=ar[n],s=o.interleaved,s!==null){o.interleaved=null;var c=s.next,p=o.pending;if(p!==null){var x=p.next;p.next=c,s.next=x}o.pending=s}ar=null}return e}function Ff(e,n){do{var o=Ye;try{if(Pa(),ks.current=Cs,_s){for(var s=Be.memoizedState;s!==null;){var c=s.queue;c!==null&&(c.pending=null),s=s.next}_s=!1}if(cr=0,qe=Ge=Be=null,Qo=!1,qo=0,lu.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=df(x);if(de!==null){de.flags&=-257,ff(de,x,P,p,n),de.mode&1&&cf(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){cf(p,K,n),mu();break e}R=Error(i(426))}}else if(De&&P.mode&1){var Ue=df(x);if(Ue!==null){(Ue.flags&65536)===0&&(Ue.flags|=256),ff(Ue,x,P,p,n),ba(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=af(p,R,n);Rd(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"&&(Dn===null||!Dn.has(Q)))){p.flags|=65536,n&=-n,p.lanes|=n;var le=uf(p,P,n);Rd(p,le);break e}}p=p.return}while(p!==null)}Bf(o)}catch(ye){n=ye,Ye===o&&o!==null&&(Ye=o=o.return);continue}break}while(!0)}function Vf(){var e=Ts.current;return Ts.current=Cs,e===null?Cs:e}function mu(){(Qe===0||Qe===3||Qe===2)&&(Qe=4),Ke===null||(dr&268435455)===0&&(js&268435455)===0||Vn(Ke,et)}function Os(e,n){var o=Pe;Pe|=2;var s=Vf();(Ke!==e||et!==n)&&(yn=null,pr(e,n));do try{q0();break}catch(c){Ff(e,c)}while(!0);if(Pa(),Pe=o,Ts.current=s,Ye!==null)throw Error(i(261));return Ke=null,et=0,Qe}function q0(){for(;Ye!==null;)Hf(Ye)}function K0(){for(;Ye!==null&&!Ol();)Hf(Ye)}function Hf(e){var n=Yf(e.alternate,e,bt);e.memoizedProps=e.pendingProps,n===null?Bf(e):Ye=n,lu.current=null}function Bf(e){var n=e;do{var o=n.alternate;if(e=n.return,(n.flags&32768)===0){if(o=B0(o,n,bt),o!==null){Ye=o;return}}else{if(o=W0(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 s=Te,c=At.transition;try{At.transition=null,Te=1,Z0(e,n,o,s)}finally{At.transition=c,Te=s}return null}function Z0(e,n,o,s){do Jr();while(On!==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(Xl(e,p),e===Ke&&(Ye=Ke=null,et=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Ls||(Ls=!0,Xf(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,lu.current=null,Y0(e,o),jf(o,e),v0(ma),qi=!!ga,ma=ga=null,e.current=o,X0(o),Bi(),Pe=P,Te=x,At.transition=p}else e.current=o;if(Ls&&(Ls=!1,On=e,As=c),p=e.pendingLanes,p===0&&(Dn=null),Hl(o.stateNode),vt(e,Ve()),n!==null)for(s=e.onRecoverableError,o=0;o<n.length;o++)c=n[o],s(c.value,{componentStack:c.stack,digest:c.digest});if(Rs)throw Rs=!1,e=cu,cu=null,e;return(As&1)!==0&&e.tag!==0&&Jr(),p=e.pendingLanes,(p&1)!==0?e===du?ri++:(ri=0,du=e):ri=0,Rn(),null}function Jr(){if(On!==null){var e=zc(As),n=At.transition,o=Te;try{if(At.transition=null,Te=16>e?16:e,On===null)var s=!1;else{if(e=On,On=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(Mf(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,Rn(),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(Mr,e)}catch{}s=!0}return s}finally{Te=o,At.transition=n}}return!1}function Wf(e,n,o){n=Qr(o,n),n=af(e,n,1),e=An(e,n,1),n=dt(),e!==null&&(rr(e,1,n),vt(e,n))}function We(e,n,o){if(e.tag===3)Wf(e,e,o);else for(;n!==null;){if(n.tag===3){Wf(n,e,o);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Dn===null||!Dn.has(s))){e=Qr(o,e),e=uf(n,e,1),n=An(n,e,1),e=dt(),n!==null&&(rr(n,1,e),vt(n,e));break}}n=n.return}}function J0(e,n,o){var s=e.pingCache;s!==null&&s.delete(n),n=dt(),e.pingedLanes|=e.suspendedLanes&o,Ke===e&&(et&o)===o&&(Qe===4||Qe===3&&(et&130023424)===et&&500>Ve()-uu?pr(e,0):au|=o),vt(e,n)}function Uf(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 ey(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),Uf(e,o)}function ty(e,n){var o=0;switch(e.tag){case 13:var s=e.stateNode,c=e.memoizedState;c!==null&&(o=c.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(i(314))}s!==null&&s.delete(n),Uf(e,o)}var Yf;Yf=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,H0(e,n,o);mt=(e.flags&131072)!==0}else mt=!1,De&&(n.flags&1048576)!==0&&Ed(n,hs,n.index);switch(n.lanes=0,n.tag){case 2:var s=n.type;Ps(e,n),e=n.pendingProps;var c=Vr(n,rt.current);Xr(n,o),c=Fa(null,n,s,e,c,o);var p=Va();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(s)?(p=!0,ds(n)):p=!1,n.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,ja(n),c.updater=bs,n.stateNode=c,c._reactInternals=n,Xa(n,s,e,o),n=Ka(null,n,s,!0,p,o)):(n.tag=0,De&&p&&_a(n),ct(null,n,c,o),n=n.child),n;case 16:s=n.elementType;e:{switch(Ps(e,n),e=n.pendingProps,c=s._init,s=c(s._payload),n.type=s,c=n.tag=ry(s),e=Ft(s,e),c){case 0:n=qa(null,n,s,e,o);break e;case 1:n=vf(null,n,s,e,o);break e;case 11:n=pf(null,n,s,e,o);break e;case 14:n=hf(null,n,s,Ft(s.type,e),o);break e}throw Error(i(306,s,""))}return n;case 0:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:Ft(s,c),qa(e,n,s,c,o);case 1:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:Ft(s,c),vf(e,n,s,c,o);case 3:e:{if(xf(n),e===null)throw Error(i(387));s=n.pendingProps,p=n.memoizedState,c=p.element,jd(e,n),ws(n,s,null,o);var x=n.memoizedState;if(s=x.element,p.isDehydrated)if(p={element:s,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=wf(e,n,s,o,c);break e}else if(s!==c){c=Qr(Error(i(424)),n),n=wf(e,n,s,o,c);break e}else for(Ct=In(n.stateNode.containerInfo.firstChild),Nt=n,De=!0,Ot=null,o=Id(n,null,s,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Wr(),s===c){n=mn(e,n,o);break e}ct(e,n,s,o)}n=n.child}return n;case 5:return Ad(n),e===null&&Ca(n),s=n.type,c=n.pendingProps,p=e!==null?e.memoizedProps:null,x=c.children,ya(s,c)?x=null:p!==null&&ya(s,p)&&(n.flags|=32),yf(e,n),ct(e,n,x,o),n.child;case 6:return e===null&&Ca(n),null;case 13:return Sf(e,n,o);case 4:return Ra(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=Ur(n,null,s,o):ct(e,n,s,o),n.child;case 11:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:Ft(s,c),pf(e,n,s,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(s=n.type._context,c=n.pendingProps,p=n.memoizedProps,x=c.value,je(ys,s._currentValue),s._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===s){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),Ia(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),Ia(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,s=n.pendingProps.children,Xr(n,o),c=Rt(c),s=s(c),n.flags|=1,ct(e,n,s,o),n.child;case 14:return s=n.type,c=Ft(s,n.pendingProps),c=Ft(s.type,c),hf(e,n,s,c,o);case 15:return gf(e,n,n.type,n.pendingProps,o);case 17:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:Ft(s,c),Ps(e,n),n.tag=1,gt(s)?(e=!0,ds(n)):e=!1,Xr(n,o),sf(n,s,c),Xa(n,s,c,o),Ka(null,n,s,!0,e,o);case 19:return _f(e,n,o);case 22:return mf(e,n,o)}throw Error(i(156,n.tag))};function Xf(e,n){return Vi(e,n)}function ny(e,n,o,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $t(e,n,o,s){return new ny(e,n,o,s)}function yu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ry(e){if(typeof e=="function")return yu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===H)return 11;if(e===U)return 14}return 2}function Hn(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,s,c,p){var x=2;if(s=e,typeof e=="function")yu(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case B:return gr(o.children,c,p,n);case X:x=8,c|=8;break;case q:return e=$t(12,o,n,c|2),e.elementType=q,e.lanes=p,e;case ee:return e=$t(13,o,n,c),e.elementType=ee,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 J:x=10;break e;case V:x=9;break e;case H:x=11;break e;case U:x=14;break e;case D:x=16,s=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return n=$t(x,o,n,c),n.elementType=e,n.type=s,n.lanes=p,n}function gr(e,n,o,s){return e=$t(7,e,s,n),e.lanes=o,e}function Vs(e,n,o,s){return e=$t(22,e,s,n),e.elementType=W,e.lanes=o,e.stateNode={isHidden:!1},e}function vu(e,n,o){return e=$t(6,e,null,n),e.lanes=o,e}function xu(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 oy(e,n,o,s,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=s,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function wu(e,n,o,s,c,p,x,P,R){return e=new oy(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:s,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},ja(p),e}function iy(e,n,o){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:s==null?null:""+s,children:e,containerInfo:n,implementation:o}}function Gf(e){if(!e)return jn;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 Sd(e,o,n)}return n}function Qf(e,n,o,s,c,p,x,P,R){return e=wu(o,s,!0,e,c,p,x,P,R),e.context=Gf(null),o=e.current,s=dt(),c=Fn(o),p=gn(s,c),p.callback=n??null,An(o,p,c),e.current.lanes=c,rr(e,c,s),vt(e,s),e}function Hs(e,n,o,s){var c=n.current,p=dt(),x=Fn(c);return o=Gf(o),n.context===null?n.context=o:n.pendingContext=o,n=gn(p,x),n.payload={element:e},s=s===void 0?null:s,s!==null&&(n.callback=s),e=An(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 qf(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function Su(e,n){qf(e,n),(e=e.alternate)&&qf(e,n)}function sy(){return null}var Kf=typeof reportError=="function"?reportError:function(e){console.error(e)};function ku(e){this._internalRoot=e}Ws.prototype.render=ku.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(i(409));Hs(e,n,null,null)},Ws.prototype.unmount=ku.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=jc();e={blockedOn:null,target:e,priority:n};for(var o=0;o<Mn.length&&n!==0&&n<Mn[o].priority;o++);Mn.splice(o,0,e),o===0&&Ac(e)}};function _u(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 Zf(){}function ly(e,n,o,s,c){if(c){if(typeof s=="function"){var p=s;s=function(){var K=Bs(x);p.call(K)}}var x=Qf(n,s,e,0,null,!1,!1,"",Zf);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 s=="function"){var P=s;s=function(){var K=Bs(R);P.call(K)}}var R=wu(e,0,!1,null,null,!1,!1,"",Zf);return e._reactRootContainer=R,e[cn]=R.current,Vo(e.nodeType===8?e.parentNode:e),fr(function(){Hs(n,R,o,s)}),R}function Ys(e,n,o,s,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=ly(o,n,e,c,s);return Bs(x)}Ic=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,Rn()))}break;case 13:fr(function(){var s=hn(e,1);if(s!==null){var c=dt();Bt(s,e,1,c)}}),Su(e,1)}},Gl=function(e){if(e.tag===13){var n=hn(e,134217728);if(n!==null){var o=dt();Bt(n,e,134217728,o)}Su(e,134217728)}},Tc=function(e){if(e.tag===13){var n=Fn(e),o=hn(e,n);if(o!==null){var s=dt();Bt(o,e,n,s)}Su(e,n)}},jc=function(){return Te},Rc=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 s=o[n];if(s!==e&&s.form===e.form){var c=us(s);if(!c)throw Error(i(90));ve(s),Re(s,c)}}}break;case"textarea":Kt(e,o);break;case"select":n=o.value,n!=null&&nt(e,!!o.multiple,n,!1)}},Ai=hu,$i=fr;var ay={usingClientEntryPoint:!1,Events:[Wo,Or,us,Ri,Li,hu]},oi={findFiberByHostInstance:or,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},uy={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||sy,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(uy),kt=Xs}catch{}}return xt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ay,xt.createPortal=function(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_u(n))throw Error(i(200));return iy(e,n,null,o)},xt.createRoot=function(e,n){if(!_u(e))throw Error(i(299));var o=!1,s="",c=Kf;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(c=n.onRecoverableError)),n=wu(e,1,!1,null,null,o,!1,s,c),e[cn]=n.current,Vo(e.nodeType===8?e.parentNode:e),new ku(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(!_u(e))throw Error(i(405));var s=o!=null&&o.hydratedSources||null,c=!1,p="",x=Kf;if(o!=null&&(o.unstable_strictMode===!0&&(c=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onRecoverableError!==void 0&&(x=o.onRecoverableError)),n=Qf(n,null,e,1,o??null,c,!1,p,x),e[cn]=n.current,Vo(e),s)for(e=0;e<s.length;e++)o=s[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=hu,xt.unstable_renderSubtreeIntoContainer=function(e,n,o,s){if(!Us(o))throw Error(i(200));if(e==null||e._reactInternals===void 0)throw Error(i(38));return Ys(e,n,o,!1,s)},xt.version="18.3.1-next-f1338f8080-20240426",xt}var sp;function Ph(){if(sp)return Cu.exports;sp=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(),Cu.exports=yy(),Cu.exports}var lp;function vy(){if(lp)return Gs;lp=1;var t=Ph();return Gs.createRoot=t.createRoot,Gs.hydrateRoot=t.hydrateRoot,Gs}var xy=vy();/**
|
|
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 wy=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zh=(...t)=>t.filter((r,i,l)=>!!r&&r.trim()!==""&&l.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 Sy={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 ky=G.forwardRef(({color:t="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:a="",children:u,iconNode:d,...f},h)=>G.createElement("svg",{ref:h,...Sy,width:r,height:r,stroke:t,strokeWidth:l?Number(i)*24/Number(r):i,className:zh("lucide",a),...f},[...d.map(([m,v])=>G.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=G.forwardRef(({className:l,...a},u)=>G.createElement(ky,{ref:u,iconNode:r,className:zh(`lucide-${wy(t)}`,l),...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 _y=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 Ey=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 Ny=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 Cy=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 by=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 My=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 Py=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 zy=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 Iy=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 Ty=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 jy=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 Ry=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 Ly=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 Ay=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 $y=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 Dy=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"}]]),Oy=new TextDecoder,Pu={encode:t=>JSON.stringify(t),decode:t=>JSON.parse(typeof t=="string"?t:Oy.decode(t))},Fy="superline.inspector.v1";function Vy(t){const r=t.WebSocket??globalThis.WebSocket;if(!r)throw new Error("No WebSocket implementation found; pass opts.WebSocket");const i=r,l=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 _ of u)_(k)}function w(){y("connecting"),f=new i(t.url,Fy),f.binaryType="arraybuffer",f.onopen=()=>{y("open"),f.send(Pu.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||!l){y("closed");return}y("closed"),g=setTimeout(w,1e3)},f.onerror=()=>{}}function S(k){let _;try{_=Pu.decode(typeof k=="string"?k:new Uint8Array(k))}catch{return}if(_.t==="pub"&&_.c==="events"){for(const E of a)E(_.d);return}if(_.i===void 0)return;const I=d.get(_.i);I&&(d.delete(_.i),_.t==="res"?I.resolve(_.d):_.t==="err"&&I.reject(new Error(_.code??"INSPECTOR_ERROR")))}function C(k,_){return new Promise((I,E)=>{if(v!=="open"){E(new Error("Inspector not connected"));return}const M=h++;d.set(M,{resolve:I,reject:E}),f.send(Pu.encode({t:"req",i:M,m:k,d:_}))})}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 Hy(t){const[r,i]=G.useState(null),[l,a]=G.useState("connecting");return G.useEffect(()=>{if(!t)return;const u=Vy({url:t});i(u);const d=u.onStatus(a);return()=>{d(),u.close(),i(null)}},[t]),{client:r,status:l}}function Ih(t){var r,i,l="";if(typeof t=="string"||typeof t=="number")l+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(r=0;r<a;r++)t[r]&&(i=Ih(t[r]))&&(l&&(l+=" "),l+=i)}else for(i in t)t[i]&&(l&&(l+=" "),l+=i);return l}function Th(){for(var t,r,i=0,l="",a=arguments.length;i<a;i++)(t=arguments[i])&&(r=Ih(t))&&(l&&(l+=" "),l+=r);return l}const ap=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,up=Th,jh=(t,r)=>i=>{var l;if((r==null?void 0:r.variants)==null)return up(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=ap(v)||ap(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||(l=r.compoundVariants)===null||l===void 0?void 0:l.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 up(t,d,h,i==null?void 0:i.class,i==null?void 0:i.className)},uc="-",By=t=>{const r=Uy(t),{conflictingClassGroups:i,conflictingClassGroupModifiers:l}=t;return{getClassGroupId:d=>{const f=d.split(uc);return f[0]===""&&f.length!==1&&f.shift(),Rh(f,r)||Wy(d)},getConflictingClassGroupIds:(d,f)=>{const h=i[d]||[];return f&&l[d]?[...h,...l[d]]:h}}},Rh=(t,r)=>{var d;if(t.length===0)return r.classGroupId;const i=t[0],l=r.nextPart.get(i),a=l?Rh(t.slice(1),l):void 0;if(a)return a;if(r.validators.length===0)return;const u=t.join(uc);return(d=r.validators.find(({validator:f})=>f(u)))==null?void 0:d.classGroupId},cp=/^\[(.+)\]$/,Wy=t=>{if(cp.test(t)){const r=cp.exec(t)[1],i=r==null?void 0:r.substring(0,r.indexOf(":"));if(i)return"arbitrary.."+i}},Uy=t=>{const{theme:r,prefix:i}=t,l={nextPart:new Map,validators:[]};return Xy(Object.entries(t.classGroups),i).forEach(([u,d])=>{Gu(d,l,u,r)}),l},Gu=(t,r,i,l)=>{t.forEach(a=>{if(typeof a=="string"){const u=a===""?r:dp(r,a);u.classGroupId=i;return}if(typeof a=="function"){if(Yy(a)){Gu(a(l),r,i,l);return}r.validators.push({validator:a,classGroupId:i});return}Object.entries(a).forEach(([u,d])=>{Gu(d,dp(r,u),i,l)})})},dp=(t,r)=>{let i=t;return r.split(uc).forEach(l=>{i.nextPart.has(l)||i.nextPart.set(l,{nextPart:new Map,validators:[]}),i=i.nextPart.get(l)}),i},Yy=t=>t.isThemeGetter,Xy=(t,r)=>r?t.map(([i,l])=>{const a=l.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,Gy=t=>{if(t<1)return{get:()=>{},set:()=>{}};let r=0,i=new Map,l=new Map;const a=(u,d)=>{i.set(u,d),r++,r>t&&(r=0,l=i,i=new Map)};return{get(u){let d=i.get(u);if(d!==void 0)return d;if((d=l.get(u))!==void 0)return a(u,d),d},set(u,d){i.has(u)?i.set(u,d):a(u,d)}}},Lh="!",Qy=t=>{const{separator:r,experimentalParseClassName:i}=t,l=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 _=f[k];if(m===0){if(_===a&&(l||f.slice(k,k+u)===r)){h.push(f.slice(v,k)),v=k+u;continue}if(_==="/"){g=k;continue}}_==="["?m++:_==="]"&&m--}const y=h.length===0?f:f.substring(v),w=y.startsWith(Lh),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},qy=t=>{if(t.length<=1)return t;const r=[];let i=[];return t.forEach(l=>{l[0]==="["?(r.push(...i.sort(),l),i=[]):i.push(l)}),r.push(...i.sort()),r},Ky=t=>({cache:Gy(t.cacheSize),parseClassName:Qy(t),...By(t)}),Zy=/\s+/,Jy=(t,r)=>{const{parseClassName:i,getClassGroupId:l,getConflictingClassGroupIds:a}=r,u=[],d=t.trim().split(Zy);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=l(S?y.substring(0,w):y);if(!C){if(!S){f=m+(f.length>0?" "+f:f);continue}if(C=l(y),!C){f=m+(f.length>0?" "+f:f);continue}S=!1}const k=qy(v).join(":"),_=g?k+Lh:k,I=_+C;if(u.includes(I))continue;u.push(I);const E=a(C,S);for(let M=0;M<E.length;++M){const O=E[M];u.push(_+O)}f=m+(f.length>0?" "+f:f)}return f};function ev(){let t=0,r,i,l="";for(;t<arguments.length;)(r=arguments[t++])&&(i=Ah(r))&&(l&&(l+=" "),l+=i);return l}const Ah=t=>{if(typeof t=="string")return t;let r,i="";for(let l=0;l<t.length;l++)t[l]&&(r=Ah(t[l]))&&(i&&(i+=" "),i+=r);return i};function tv(t,...r){let i,l,a,u=d;function d(h){const m=r.reduce((v,g)=>g(v),t());return i=Ky(m),l=i.cache.get,a=i.cache.set,u=f,f(h)}function f(h){const m=l(h);if(m)return m;const v=Jy(h,i);return a(h,v),v}return function(){return u(ev.apply(null,arguments))}}const $e=t=>{const r=i=>i[t]||[];return r.isThemeGetter=!0,r},$h=/^\[(?:([a-z-]+):)?(.+)\]$/i,nv=/^\d+\/\d+$/,rv=new Set(["px","full","screen"]),ov=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iv=/\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$/,sv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,lv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,av=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,vn=t=>ro(t)||rv.has(t)||nv.test(t),Wn=t=>ho(t,"length",mv),ro=t=>!!t&&!Number.isNaN(Number(t)),zu=t=>ho(t,"number",ro),si=t=>!!t&&Number.isInteger(Number(t)),uv=t=>t.endsWith("%")&&ro(t.slice(0,-1)),Ne=t=>$h.test(t),Un=t=>ov.test(t),cv=new Set(["length","size","percentage"]),dv=t=>ho(t,cv,Dh),fv=t=>ho(t,"position",Dh),pv=new Set(["image","url"]),hv=t=>ho(t,pv,vv),gv=t=>ho(t,"",yv),li=()=>!0,ho=(t,r,i)=>{const l=$h.exec(t);return l?l[1]?typeof r=="string"?l[1]===r:r.has(l[1]):i(l[2]):!1},mv=t=>iv.test(t)&&!sv.test(t),Dh=()=>!1,yv=t=>lv.test(t),vv=t=>av.test(t),xv=()=>{const t=$e("colors"),r=$e("spacing"),i=$e("blur"),l=$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("opacity"),I=$e("padding"),E=$e("saturate"),M=$e("scale"),O=$e("sepia"),A=$e("skew"),B=$e("space"),X=$e("translate"),q=()=>["auto","contain","none"],J=()=>["auto","hidden","clip","visible","scroll"],V=()=>["auto",Ne,r],H=()=>[Ne,r],ee=()=>["",vn,Wn],z=()=>["auto",ro,Ne],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["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],F=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>[ro,Ne];return{cacheSize:500,separator:":",theme:{colors:[li],spacing:[vn,Wn],blur:["none","",Un,Ne],brightness:b(),borderColor:[t],borderRadius:["none","","full",Un,Ne],borderSpacing:H(),borderWidth:ee(),contrast:b(),grayscale:T(),hueRotate:b(),invert:T(),gap:H(),gradientColorStops:[t],gradientColorStopPositions:[uv,Wn],inset:V(),margin:V(),opacity:b(),padding:H(),saturate:b(),scale:b(),sepia:T(),skew:b(),space:H(),translate:H()},classGroups:{aspect:[{aspect:["auto","square","video",Ne]}],container:["container"],columns:[{columns:[Un]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"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:J()}],"overflow-x":[{"overflow-x":J()}],"overflow-y":[{"overflow-y":J()}],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:V()}],"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:[Un]},Un]}],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",Un,Wn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",zu]}],"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,zu]}],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":[_]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[_]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",vn,Wn]}],"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:H()}],"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":[_]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),fv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",dv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},hv]}],"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":[_]}],"border-style":[{border:[...D(),"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":[_]}],"divide-style":[{divide:D()}],"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:["",...D()]}],"outline-offset":[{"outline-offset":[vn,Ne]}],"outline-w":[{outline:[vn,Wn]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[_]}],"ring-offset-w":[{"ring-offset":[vn,Wn]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Un,gv]}],"shadow-color":[{shadow:[li]}],opacity:[{opacity:[_]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[i]}],brightness:[{brightness:[l]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",Un,Ne]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[g]}],saturate:[{saturate:[E]}],sepia:[{sepia:[O]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[i]}],"backdrop-brightness":[{"backdrop-brightness":[l]}],"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":[_]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[O]}],"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":[X]}],"translate-y":[{"translate-y":[X]}],"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":H()}],"scroll-mx":[{"scroll-mx":H()}],"scroll-my":[{"scroll-my":H()}],"scroll-ms":[{"scroll-ms":H()}],"scroll-me":[{"scroll-me":H()}],"scroll-mt":[{"scroll-mt":H()}],"scroll-mr":[{"scroll-mr":H()}],"scroll-mb":[{"scroll-mb":H()}],"scroll-ml":[{"scroll-ml":H()}],"scroll-p":[{"scroll-p":H()}],"scroll-px":[{"scroll-px":H()}],"scroll-py":[{"scroll-py":H()}],"scroll-ps":[{"scroll-ps":H()}],"scroll-pe":[{"scroll-pe":H()}],"scroll-pt":[{"scroll-pt":H()}],"scroll-pr":[{"scroll-pr":H()}],"scroll-pb":[{"scroll-pb":H()}],"scroll-pl":[{"scroll-pl":H()}],"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,Wn,zu]}],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"]}}},wv=tv(xv);function lt(...t){return wv(Th(t))}const Sv=jh("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 fp({className:t,variant:r,...i}){return N.jsx("span",{className:lt(Sv({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,l;i<t.length;i++)(l=Xe(t[i]))!==""&&(r+=(r&&" ")+l);else for(let i in t)t[i]&&(r+=(r&&" ")+i);return r}var kv={value:()=>{}};function wl(){for(var t=0,r=arguments.length,i={},l;t<r;++t){if(!(l=arguments[t]+"")||l in i||/[\s.]/.test(l))throw new Error("illegal type: "+l);i[l]=[]}return new ol(i)}function ol(t){this._=t}function _v(t,r){return t.trim().split(/^|\s+/).map(function(i){var l="",a=i.indexOf(".");if(a>=0&&(l=i.slice(a+1),i=i.slice(0,a)),i&&!r.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:l}})}ol.prototype=wl.prototype={constructor:ol,on:function(t,r){var i=this._,l=_v(t+"",i),a,u=-1,d=l.length;if(arguments.length<2){for(;++u<d;)if((a=(t=l[u]).type)&&(a=Ev(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=l[u]).type)i[a]=pp(i[a],t.name,r);else if(r==null)for(a in i)i[a]=pp(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 ol(t)},call:function(t,r){if((a=arguments.length-2)>0)for(var i=new Array(a),l=0,a,u;l<a;++l)i[l]=arguments[l+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(u=this._[t],l=0,a=u.length;l<a;++l)u[l].value.apply(r,i)},apply:function(t,r,i){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var l=this._[t],a=0,u=l.length;a<u;++a)l[a].value.apply(r,i)}};function Ev(t,r){for(var i=0,l=t.length,a;i<l;++i)if((a=t[i]).name===r)return a.value}function pp(t,r,i){for(var l=0,a=t.length;l<a;++l)if(t[l].name===r){t[l]=kv,t=t.slice(0,l).concat(t.slice(l+1));break}return i!=null&&t.push({name:r,value:i}),t}var Qu="http://www.w3.org/1999/xhtml";const hp={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 Sl(t){var r=t+="",i=r.indexOf(":");return i>=0&&(r=t.slice(0,i))!=="xmlns"&&(t=t.slice(i+1)),hp.hasOwnProperty(r)?{space:hp[r],local:t}:t}function Nv(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 Cv(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Oh(t){var r=Sl(t);return(r.local?Cv:Nv)(r)}function bv(){}function cc(t){return t==null?bv:function(){return this.querySelector(t)}}function Mv(t){typeof t!="function"&&(t=cc(t));for(var r=this._groups,i=r.length,l=new Array(i),a=0;a<i;++a)for(var u=r[a],d=u.length,f=l[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(l,this._parents)}function Pv(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function zv(){return[]}function Fh(t){return t==null?zv:function(){return this.querySelectorAll(t)}}function Iv(t){return function(){return Pv(t.apply(this,arguments))}}function Tv(t){typeof t=="function"?t=Iv(t):t=Fh(t);for(var r=this._groups,i=r.length,l=[],a=[],u=0;u<i;++u)for(var d=r[u],f=d.length,h,m=0;m<f;++m)(h=d[m])&&(l.push(t.call(h,h.__data__,m,d)),a.push(h));return new Pt(l,a)}function Vh(t){return function(){return this.matches(t)}}function Hh(t){return function(r){return r.matches(t)}}var jv=Array.prototype.find;function Rv(t){return function(){return jv.call(this.children,t)}}function Lv(){return this.firstElementChild}function Av(t){return this.select(t==null?Lv:Rv(typeof t=="function"?t:Hh(t)))}var $v=Array.prototype.filter;function Dv(){return Array.from(this.children)}function Ov(t){return function(){return $v.call(this.children,t)}}function Fv(t){return this.selectAll(t==null?Dv:Ov(typeof t=="function"?t:Hh(t)))}function Vv(t){typeof t!="function"&&(t=Vh(t));for(var r=this._groups,i=r.length,l=new Array(i),a=0;a<i;++a)for(var u=r[a],d=u.length,f=l[a]=[],h,m=0;m<d;++m)(h=u[m])&&t.call(h,h.__data__,m,u)&&f.push(h);return new Pt(l,this._parents)}function Bh(t){return new Array(t.length)}function Hv(){return new Pt(this._enter||this._groups.map(Bh),this._parents)}function ul(t,r){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=r}ul.prototype={constructor:ul,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 Bv(t){return function(){return t}}function Wv(t,r,i,l,a,u){for(var d=0,f,h=r.length,m=u.length;d<m;++d)(f=r[d])?(f.__data__=u[d],l[d]=f):i[d]=new ul(t,u[d]);for(;d<h;++d)(f=r[d])&&(a[d]=f)}function Uv(t,r,i,l,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))?(l[f]=h,h.__data__=u[f],m.delete(w)):i[f]=new ul(t,u[f]);for(f=0;f<v;++f)(h=r[f])&&m.get(y[f])===h&&(a[f]=h)}function Yv(t){return t.__data__}function Xv(t,r){if(!arguments.length)return Array.from(this,Yv);var i=r?Uv:Wv,l=this._parents,a=this._groups;typeof t!="function"&&(t=Bv(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=l[m],g=a[m],y=g.length,w=Gv(t.call(v,v&&v.__data__,m,l)),S=w.length,C=f[m]=new Array(S),k=d[m]=new Array(S),_=h[m]=new Array(y);i(v,g,C,k,_,w,r);for(var I=0,E=0,M,O;I<S;++I)if(M=C[I]){for(I>=E&&(E=I+1);!(O=k[E])&&++E<S;);M._next=O||null}}return d=new Pt(d,l),d._enter=f,d._exit=h,d}function Gv(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Qv(){return new Pt(this._exit||this._groups.map(Bh),this._parents)}function qv(t,r,i){var l=this.enter(),a=this,u=this.exit();return typeof t=="function"?(l=t(l),l&&(l=l.selection())):l=l.append(t+""),r!=null&&(a=r(a),a&&(a=a.selection())),i==null?u.remove():i(u),l&&a?l.merge(a).order():a}function Kv(t){for(var r=t.selection?t.selection():t,i=this._groups,l=r._groups,a=i.length,u=l.length,d=Math.min(a,u),f=new Array(a),h=0;h<d;++h)for(var m=i[h],v=l[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 Zv(){for(var t=this._groups,r=-1,i=t.length;++r<i;)for(var l=t[r],a=l.length-1,u=l[a],d;--a>=0;)(d=l[a])&&(u&&d.compareDocumentPosition(u)^4&&u.parentNode.insertBefore(d,u),u=d);return this}function Jv(t){t||(t=ex);function r(g,y){return g&&y?t(g.__data__,y.__data__):!g-!y}for(var i=this._groups,l=i.length,a=new Array(l),u=0;u<l;++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 ex(t,r){return t<r?-1:t>r?1:t>=r?0:NaN}function tx(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function nx(){return Array.from(this)}function rx(){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var l=t[r],a=0,u=l.length;a<u;++a){var d=l[a];if(d)return d}return null}function ox(){let t=0;for(const r of this)++t;return t}function ix(){return!this.node()}function sx(t){for(var r=this._groups,i=0,l=r.length;i<l;++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 lx(t){return function(){this.removeAttribute(t)}}function ax(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ux(t,r){return function(){this.setAttribute(t,r)}}function cx(t,r){return function(){this.setAttributeNS(t.space,t.local,r)}}function dx(t,r){return function(){var i=r.apply(this,arguments);i==null?this.removeAttribute(t):this.setAttribute(t,i)}}function fx(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 px(t,r){var i=Sl(t);if(arguments.length<2){var l=this.node();return i.local?l.getAttributeNS(i.space,i.local):l.getAttribute(i)}return this.each((r==null?i.local?ax:lx:typeof r=="function"?i.local?fx:dx:i.local?cx:ux)(i,r))}function Wh(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function hx(t){return function(){this.style.removeProperty(t)}}function gx(t,r,i){return function(){this.style.setProperty(t,r,i)}}function mx(t,r,i){return function(){var l=r.apply(this,arguments);l==null?this.style.removeProperty(t):this.style.setProperty(t,l,i)}}function yx(t,r,i){return arguments.length>1?this.each((r==null?hx:typeof r=="function"?mx:gx)(t,r,i??"")):so(this.node(),t)}function so(t,r){return t.style.getPropertyValue(r)||Wh(t).getComputedStyle(t,null).getPropertyValue(r)}function vx(t){return function(){delete this[t]}}function xx(t,r){return function(){this[t]=r}}function wx(t,r){return function(){var i=r.apply(this,arguments);i==null?delete this[t]:this[t]=i}}function Sx(t,r){return arguments.length>1?this.each((r==null?vx:typeof r=="function"?wx:xx)(t,r)):this.node()[t]}function Uh(t){return t.trim().split(/^|\s+/)}function dc(t){return t.classList||new Yh(t)}function Yh(t){this._node=t,this._names=Uh(t.getAttribute("class")||"")}Yh.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 Xh(t,r){for(var i=dc(t),l=-1,a=r.length;++l<a;)i.add(r[l])}function Gh(t,r){for(var i=dc(t),l=-1,a=r.length;++l<a;)i.remove(r[l])}function kx(t){return function(){Xh(this,t)}}function _x(t){return function(){Gh(this,t)}}function Ex(t,r){return function(){(r.apply(this,arguments)?Xh:Gh)(this,t)}}function Nx(t,r){var i=Uh(t+"");if(arguments.length<2){for(var l=dc(this.node()),a=-1,u=i.length;++a<u;)if(!l.contains(i[a]))return!1;return!0}return this.each((typeof r=="function"?Ex:r?kx:_x)(i,r))}function Cx(){this.textContent=""}function bx(t){return function(){this.textContent=t}}function Mx(t){return function(){var r=t.apply(this,arguments);this.textContent=r??""}}function Px(t){return arguments.length?this.each(t==null?Cx:(typeof t=="function"?Mx:bx)(t)):this.node().textContent}function zx(){this.innerHTML=""}function Ix(t){return function(){this.innerHTML=t}}function Tx(t){return function(){var r=t.apply(this,arguments);this.innerHTML=r??""}}function jx(t){return arguments.length?this.each(t==null?zx:(typeof t=="function"?Tx:Ix)(t)):this.node().innerHTML}function Rx(){this.nextSibling&&this.parentNode.appendChild(this)}function Lx(){return this.each(Rx)}function Ax(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function $x(){return this.each(Ax)}function Dx(t){var r=typeof t=="function"?t:Oh(t);return this.select(function(){return this.appendChild(r.apply(this,arguments))})}function Ox(){return null}function Fx(t,r){var i=typeof t=="function"?t:Oh(t),l=r==null?Ox:typeof r=="function"?r:cc(r);return this.select(function(){return this.insertBefore(i.apply(this,arguments),l.apply(this,arguments)||null)})}function Vx(){var t=this.parentNode;t&&t.removeChild(this)}function Hx(){return this.each(Vx)}function Bx(){var t=this.cloneNode(!1),r=this.parentNode;return r?r.insertBefore(t,this.nextSibling):t}function Wx(){var t=this.cloneNode(!0),r=this.parentNode;return r?r.insertBefore(t,this.nextSibling):t}function Ux(t){return this.select(t?Wx:Bx)}function Yx(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Xx(t){return function(r){t.call(this,r,this.__data__)}}function Gx(t){return t.trim().split(/^|\s+/).map(function(r){var i="",l=r.indexOf(".");return l>=0&&(i=r.slice(l+1),r=r.slice(0,l)),{type:r,name:i}})}function Qx(t){return function(){var r=this.__on;if(r){for(var i=0,l=-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[++l]=u;++l?r.length=l:delete this.__on}}}function qx(t,r,i){return function(){var l=this.__on,a,u=Xx(r);if(l){for(var d=0,f=l.length;d<f;++d)if((a=l[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},l?l.push(a):this.__on=[a]}}function Kx(t,r,i){var l=Gx(t+""),a,u=l.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=l[a]).type===v.type&&d.name===v.name)return v.value}return}for(f=r?qx:Qx,a=0;a<u;++a)this.each(f(l[a],r,i));return this}function Qh(t,r,i){var l=Wh(t),a=l.CustomEvent;typeof a=="function"?a=new a(r,i):(a=l.document.createEvent("Event"),i?(a.initEvent(r,i.bubbles,i.cancelable),a.detail=i.detail):a.initEvent(r,!1,!1)),t.dispatchEvent(a)}function Zx(t,r){return function(){return Qh(this,t,r)}}function Jx(t,r){return function(){return Qh(this,t,r.apply(this,arguments))}}function e1(t,r){return this.each((typeof r=="function"?Jx:Zx)(t,r))}function*t1(){for(var t=this._groups,r=0,i=t.length;r<i;++r)for(var l=t[r],a=0,u=l.length,d;a<u;++a)(d=l[a])&&(yield d)}var qh=[null];function Pt(t,r){this._groups=t,this._parents=r}function Ni(){return new Pt([[document.documentElement]],qh)}function n1(){return this}Pt.prototype=Ni.prototype={constructor:Pt,select:Mv,selectAll:Tv,selectChild:Av,selectChildren:Fv,filter:Vv,data:Xv,enter:Hv,exit:Qv,join:qv,merge:Kv,selection:n1,order:Zv,sort:Jv,call:tx,nodes:nx,node:rx,size:ox,empty:ix,each:sx,attr:px,style:yx,property:Sx,classed:Nx,text:Px,html:jx,raise:Lx,lower:$x,append:Dx,insert:Fx,remove:Hx,clone:Ux,datum:Yx,on:Kx,dispatch:e1,[Symbol.iterator]:t1};function Mt(t){return typeof t=="string"?new Pt([[document.querySelector(t)]],[document.documentElement]):new Pt([[t]],qh)}function r1(t){let r;for(;r=t.sourceEvent;)t=r;return t}function Wt(t,r){if(t=r1(t),r===void 0&&(r=t.currentTarget),r){var i=r.ownerSVGElement||r;if(i.createSVGPoint){var l=i.createSVGPoint();return l.x=t.clientX,l.y=t.clientY,l=l.matrixTransform(r.getScreenCTM().inverse()),[l.x,l.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 o1={passive:!1},gi={capture:!0,passive:!1};function Iu(t){t.stopImmediatePropagation()}function oo(t){t.preventDefault(),t.stopImmediatePropagation()}function Kh(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 Zh(t,r){var i=t.document.documentElement,l=Mt(t).on("dragstart.drag",null);r&&(l.on("click.drag",oo,gi),setTimeout(function(){l.on("click.drag",null)},0)),"onselectstart"in i?l.on("selectstart.drag",null):(i.style.MozUserSelect=i.__noselect,delete i.__noselect)}const Qs=t=>()=>t;function qu(t,{sourceEvent:r,subject:i,target:l,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:l,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}})}qu.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function i1(t){return!t.ctrlKey&&!t.button}function s1(){return this.parentNode}function l1(t,r){return r??{x:t.x,y:t.y}}function a1(){return navigator.maxTouchPoints||"ontouchstart"in this}function Jh(){var t=i1,r=s1,i=l1,l=a1,a={},u=wl("start","drag","end"),d=0,f,h,m,v,g=0;function y(M){M.on("mousedown.drag",w).filter(l).on("touchstart.drag",k).on("touchmove.drag",_,o1).on("touchend.drag touchcancel.drag",I).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(M,O){if(!(v||!t.call(this,M,O))){var A=E(this,r.call(this,M,O),M,O,"mouse");A&&(Mt(M.view).on("mousemove.drag",S,gi).on("mouseup.drag",C,gi),Kh(M.view),Iu(M),m=!1,f=M.clientX,h=M.clientY,A("start",M))}}function S(M){if(oo(M),!m){var O=M.clientX-f,A=M.clientY-h;m=O*O+A*A>g}a.mouse("drag",M)}function C(M){Mt(M.view).on("mousemove.drag mouseup.drag",null),Zh(M.view,m),oo(M),a.mouse("end",M)}function k(M,O){if(t.call(this,M,O)){var A=M.changedTouches,B=r.call(this,M,O),X=A.length,q,J;for(q=0;q<X;++q)(J=E(this,B,M,O,A[q].identifier,A[q]))&&(Iu(M),J("start",M,A[q]))}}function _(M){var O=M.changedTouches,A=O.length,B,X;for(B=0;B<A;++B)(X=a[O[B].identifier])&&(oo(M),X("drag",M,O[B]))}function I(M){var O=M.changedTouches,A=O.length,B,X;for(v&&clearTimeout(v),v=setTimeout(function(){v=null},500),B=0;B<A;++B)(X=a[O[B].identifier])&&(Iu(M),X("end",M,O[B]))}function E(M,O,A,B,X,q){var J=u.copy(),V=Wt(q||A,O),H,ee,z;if((z=i.call(M,new qu("beforestart",{sourceEvent:A,target:y,identifier:X,active:d,x:V[0],y:V[1],dx:0,dy:0,dispatch:J}),B))!=null)return H=z.x-V[0]||0,ee=z.y-V[1]||0,function U(D,W,L){var T=V,F;switch(D){case"start":a[X]=U,F=d++;break;case"end":delete a[X],--d;case"drag":V=Wt(L||W,O),F=d;break}J.call(D,M,new qu(D,{sourceEvent:W,subject:z,target:y,identifier:X,active:F,x:V[0]+H,y:V[1]+ee,dx:V[0]-T[0],dy:V[1]-T[1],dispatch:J}),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?(l=typeof M=="function"?M:Qs(!!M),y):l},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 fc(t,r,i){t.prototype=r.prototype=i,i.constructor=t}function eg(t,r){var i=Object.create(t.prototype);for(var l in r)i[l]=r[l];return i}function Ci(){}var mi=.7,cl=1/mi,io="\\s*([+-]?\\d+)\\s*",yi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",on="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u1=/^#([0-9a-f]{3,8})$/,c1=new RegExp(`^rgb\\(${io},${io},${io}\\)$`),d1=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),f1=new RegExp(`^rgba\\(${io},${io},${io},${yi}\\)$`),p1=new RegExp(`^rgba\\(${on},${on},${on},${yi}\\)$`),h1=new RegExp(`^hsl\\(${yi},${on},${on}\\)$`),g1=new RegExp(`^hsla\\(${yi},${on},${on},${yi}\\)$`),gp={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};fc(Ci,wr,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:mp,formatHex:mp,formatHex8:m1,formatHsl:y1,formatRgb:yp,toString:yp});function mp(){return this.rgb().formatHex()}function m1(){return this.rgb().formatHex8()}function y1(){return tg(this).formatHsl()}function yp(){return this.rgb().formatRgb()}function wr(t){var r,i;return t=(t+"").trim().toLowerCase(),(r=u1.exec(t))?(i=r[1].length,r=parseInt(r[1],16),i===6?vp(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=c1.exec(t))?new wt(r[1],r[2],r[3],1):(r=d1.exec(t))?new wt(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=f1.exec(t))?qs(r[1],r[2],r[3],r[4]):(r=p1.exec(t))?qs(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=h1.exec(t))?Sp(r[1],r[2]/100,r[3]/100,1):(r=g1.exec(t))?Sp(r[1],r[2]/100,r[3]/100,r[4]):gp.hasOwnProperty(t)?vp(gp[t]):t==="transparent"?new wt(NaN,NaN,NaN,0):null}function vp(t){return new wt(t>>16&255,t>>8&255,t&255,1)}function qs(t,r,i,l){return l<=0&&(t=r=i=NaN),new wt(t,r,i,l)}function v1(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 Ku(t,r,i,l){return arguments.length===1?v1(t):new wt(t,r,i,l??1)}function wt(t,r,i,l){this.r=+t,this.g=+r,this.b=+i,this.opacity=+l}fc(wt,Ku,eg(Ci,{brighter(t){return t=t==null?cl:Math.pow(cl,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),dl(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:xp,formatHex:xp,formatHex8:x1,formatRgb:wp,toString:wp}));function xp(){return`#${yr(this.r)}${yr(this.g)}${yr(this.b)}`}function x1(){return`#${yr(this.r)}${yr(this.g)}${yr(this.b)}${yr((isNaN(this.opacity)?1:this.opacity)*255)}`}function wp(){const t=dl(this.opacity);return`${t===1?"rgb(":"rgba("}${vr(this.r)}, ${vr(this.g)}, ${vr(this.b)}${t===1?")":`, ${t})`}`}function dl(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 Sp(t,r,i,l){return l<=0?t=r=i=NaN:i<=0||i>=1?t=r=NaN:r<=0&&(t=NaN),new Ut(t,r,i,l)}function tg(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,l=t.b/255,a=Math.min(r,i,l),u=Math.max(r,i,l),d=NaN,f=u-a,h=(u+a)/2;return f?(r===u?d=(i-l)/f+(i<l)*6:i===u?d=(l-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 w1(t,r,i,l){return arguments.length===1?tg(t):new Ut(t,r,i,l??1)}function Ut(t,r,i,l){this.h=+t,this.s=+r,this.l=+i,this.opacity=+l}fc(Ut,w1,eg(Ci,{brighter(t){return t=t==null?cl:Math.pow(cl,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,l=i+(i<.5?i:1-i)*r,a=2*i-l;return new wt(Tu(t>=240?t-240:t+120,a,l),Tu(t,a,l),Tu(t<120?t+240:t-120,a,l),this.opacity)},clamp(){return new Ut(kp(this.h),Ks(this.s),Ks(this.l),dl(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=dl(this.opacity);return`${t===1?"hsl(":"hsla("}${kp(this.h)}, ${Ks(this.s)*100}%, ${Ks(this.l)*100}%${t===1?")":`, ${t})`}`}}));function kp(t){return t=(t||0)%360,t<0?t+360:t}function Ks(t){return Math.max(0,Math.min(1,t||0))}function Tu(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 pc=t=>()=>t;function S1(t,r){return function(i){return t+i*r}}function k1(t,r,i){return t=Math.pow(t,i),r=Math.pow(r,i)-t,i=1/i,function(l){return Math.pow(t+l*r,i)}}function _1(t){return(t=+t)==1?ng:function(r,i){return i-r?k1(r,i,t):pc(isNaN(r)?i:r)}}function ng(t,r){var i=r-t;return i?S1(t,i):pc(isNaN(t)?r:t)}const fl=(function t(r){var i=_1(r);function l(a,u){var d=i((a=Ku(a)).r,(u=Ku(u)).r),f=i(a.g,u.g),h=i(a.b,u.b),m=ng(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 l.gamma=t,l})(1);function E1(t,r){r||(r=[]);var i=t?Math.min(r.length,t.length):0,l=r.slice(),a;return function(u){for(a=0;a<i;++a)l[a]=t[a]*(1-u)+r[a]*u;return l}}function N1(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function C1(t,r){var i=r?r.length:0,l=t?Math.min(i,t.length):0,a=new Array(l),u=new Array(i),d;for(d=0;d<l;++d)a[d]=fi(t[d],r[d]);for(;d<i;++d)u[d]=r[d];return function(f){for(d=0;d<l;++d)u[d]=a[d](f);return u}}function b1(t,r){var i=new Date;return t=+t,r=+r,function(l){return i.setTime(t*(1-l)+r*l),i}}function rn(t,r){return t=+t,r=+r,function(i){return t*(1-i)+r*i}}function M1(t,r){var i={},l={},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]):l[a]=r[a];return function(u){for(a in i)l[a]=i[a](u);return l}}var Zu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ju=new RegExp(Zu.source,"g");function P1(t){return function(){return t}}function z1(t){return function(r){return t(r)+""}}function rg(t,r){var i=Zu.lastIndex=ju.lastIndex=0,l,a,u,d=-1,f=[],h=[];for(t=t+"",r=r+"";(l=Zu.exec(t))&&(a=ju.exec(r));)(u=a.index)>i&&(u=r.slice(i,u),f[d]?f[d]+=u:f[++d]=u),(l=l[0])===(a=a[0])?f[d]?f[d]+=a:f[++d]=a:(f[++d]=null,h.push({i:d,x:rn(l,a)})),i=ju.lastIndex;return i<r.length&&(u=r.slice(i),f[d]?f[d]+=u:f[++d]=u),f.length<2?h[0]?z1(h[0].x):P1(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,l;return r==null||i==="boolean"?pc(r):(i==="number"?rn:i==="string"?(l=wr(r))?(r=l,fl):rg:r instanceof wr?fl:r instanceof Date?b1:N1(r)?E1:Array.isArray(r)?C1:typeof r.valueOf!="function"&&typeof r.toString!="function"||isNaN(r)?M1:rn)(t,r)}var _p=180/Math.PI,Ju={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function og(t,r,i,l,a,u){var d,f,h;return(d=Math.sqrt(t*t+r*r))&&(t/=d,r/=d),(h=t*i+r*l)&&(i-=t*h,l-=r*h),(f=Math.sqrt(i*i+l*l))&&(i/=f,l/=f,h/=f),t*l<r*i&&(t=-t,r=-r,h=-h,d=-d),{translateX:a,translateY:u,rotate:Math.atan2(r,t)*_p,skewX:Math.atan(h)*_p,scaleX:d,scaleY:f}}var Zs;function I1(t){const r=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return r.isIdentity?Ju:og(r.a,r.b,r.c,r.d,r.e,r.f)}function T1(t){return t==null||(Zs||(Zs=document.createElementNS("http://www.w3.org/2000/svg","g")),Zs.setAttribute("transform",t),!(t=Zs.transform.baseVal.consolidate()))?Ju:(t=t.matrix,og(t.a,t.b,t.c,t.d,t.e,t.f))}function ig(t,r,i,l){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,l)-2,x:rn(m,v)})):v&&g.push(a(g)+"rotate("+v+l)}function f(m,v,g,y){m!==v?y.push({i:g.push(a(g)+"skewX(",null,l)-2,x:rn(m,v)}):v&&g.push(a(g)+"skewX("+v+l)}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 j1=ig(I1,"px, ","px)","deg)"),R1=ig(T1,", ",")",")"),L1=1e-12;function Ep(t){return((t=Math.exp(t))+1/t)/2}function A1(t){return((t=Math.exp(t))-1/t)/2}function $1(t){return((t=Math.exp(2*t))-1)/(t+1)}const il=(function t(r,i,l){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,_;if(C<L1)_=Math.log(y/m)/r,k=function(B){return[f+B*w,h+B*S,m*Math.exp(r*B*_)]};else{var I=Math.sqrt(C),E=(y*y-m*m+l*C)/(2*m*i*I),M=(y*y-m*m-l*C)/(2*y*i*I),O=Math.log(Math.sqrt(E*E+1)-E),A=Math.log(Math.sqrt(M*M+1)-M);_=(A-O)/r,k=function(B){var X=B*_,q=Ep(O),J=m/(i*I)*(q*$1(r*X+O)-A1(O));return[f+J*w,h+J*S,m*q/Ep(r*X+O)]}}return k.duration=_*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,sg=1e3,pl,di,hl=0,Sr=0,kl=0,vi=typeof performance=="object"&&performance.now?performance:Date,lg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function hc(){return Sr||(lg(D1),Sr=vi.now()+kl)}function D1(){Sr=0}function gl(){this._call=this._time=this._next=null}gl.prototype=ag.prototype={constructor:gl,restart:function(t,r,i){if(typeof t!="function")throw new TypeError("callback is not a function");i=(i==null?hc():+i)+(r==null?0:+r),!this._next&&di!==this&&(di?di._next=this:pl=this,di=this),this._call=t,this._time=i,ec()},stop:function(){this._call&&(this._call=null,this._time=1/0,ec())}};function ag(t,r,i){var l=new gl;return l.restart(t,r,i),l}function O1(){hc(),++lo;for(var t=pl,r;t;)(r=Sr-t._time)>=0&&t._call.call(void 0,r),t=t._next;--lo}function Np(){Sr=(hl=vi.now())+kl,lo=ci=0;try{O1()}finally{lo=0,V1(),Sr=0}}function F1(){var t=vi.now(),r=t-hl;r>sg&&(kl-=r,hl=t)}function V1(){for(var t,r=pl,i,l=1/0;r;)r._call?(l>r._time&&(l=r._time),t=r,r=r._next):(i=r._next,r._next=null,r=t?t._next=i:pl=i);di=t,ec(l)}function ec(t){if(!lo){ci&&(ci=clearTimeout(ci));var r=t-Sr;r>24?(t<1/0&&(ci=setTimeout(Np,t-vi.now()-kl)),ai&&(ai=clearInterval(ai))):(ai||(hl=vi.now(),ai=setInterval(F1,sg)),lo=1,lg(Np))}}function Cp(t,r,i){var l=new gl;return r=r==null?0:+r,l.restart(a=>{l.stop(),t(a+r)},r,i),l}var H1=wl("start","end","cancel","interrupt"),B1=[],ug=0,bp=1,tc=2,sl=3,Mp=4,nc=5,ll=6;function _l(t,r,i,l,a,u){var d=t.__transition;if(!d)t.__transition={};else if(i in d)return;W1(t,i,{name:r,index:l,group:a,on:H1,tween:B1,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:ug})}function gc(t,r){var i=Qt(t,r);if(i.state>ug)throw new Error("too late; already scheduled");return i}function sn(t,r){var i=Qt(t,r);if(i.state>sl)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 W1(t,r,i){var l=t.__transition,a;l[r]=i,i.timer=ag(u,0,i.time);function u(m){i.state=bp,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!==bp)return h();for(v in l)if(w=l[v],w.name===i.name){if(w.state===sl)return Cp(d);w.state===Mp?(w.state=ll,w.timer.stop(),w.on.call("interrupt",t,t.__data__,w.index,w.group),delete l[v]):+v<r&&(w.state=ll,w.timer.stop(),w.on.call("cancel",t,t.__data__,w.index,w.group),delete l[v])}if(Cp(function(){i.state===sl&&(i.state=Mp,i.timer.restart(f,i.delay,i.time),f(m))}),i.state=tc,i.on.call("start",t,t.__data__,i.index,i.group),i.state===tc){for(i.state=sl,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=nc,1),g=-1,y=a.length;++g<y;)a[g].call(t,v);i.state===nc&&(i.on.call("end",t,t.__data__,i.index,i.group),h())}function h(){i.state=ll,i.timer.stop(),delete l[r];for(var m in l)return;delete t.__transition}}function al(t,r){var i=t.__transition,l,a,u=!0,d;if(i){r=r==null?null:r+"";for(d in i){if((l=i[d]).name!==r){u=!1;continue}a=l.state>tc&&l.state<nc,l.state=ll,l.timer.stop(),l.on.call(a?"interrupt":"cancel",t,t.__data__,l.index,l.group),delete i[d]}u&&delete t.__transition}}function U1(t){return this.each(function(){al(this,t)})}function Y1(t,r){var i,l;return function(){var a=sn(this,t),u=a.tween;if(u!==i){l=i=u;for(var d=0,f=l.length;d<f;++d)if(l[d].name===r){l=l.slice(),l.splice(d,1);break}}a.tween=l}}function X1(t,r,i){var l,a;if(typeof i!="function")throw new Error;return function(){var u=sn(this,t),d=u.tween;if(d!==l){a=(l=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 G1(t,r){var i=this._id;if(t+="",arguments.length<2){for(var l=Qt(this.node(),i).tween,a=0,u=l.length,d;a<u;++a)if((d=l[a]).name===t)return d.value;return null}return this.each((r==null?Y1:X1)(i,t,r))}function mc(t,r,i){var l=t._id;return t.each(function(){var a=sn(this,l);(a.value||(a.value={}))[r]=i.apply(this,arguments)}),function(a){return Qt(a,l).value[r]}}function cg(t,r){var i;return(typeof r=="number"?rn:r instanceof wr?fl:(i=wr(r))?(r=i,fl):rg)(t,r)}function Q1(t){return function(){this.removeAttribute(t)}}function q1(t){return function(){this.removeAttributeNS(t.space,t.local)}}function K1(t,r,i){var l,a=i+"",u;return function(){var d=this.getAttribute(t);return d===a?null:d===l?u:u=r(l=d,i)}}function Z1(t,r,i){var l,a=i+"",u;return function(){var d=this.getAttributeNS(t.space,t.local);return d===a?null:d===l?u:u=r(l=d,i)}}function J1(t,r,i){var l,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===l&&h===a?u:(a=h,u=r(l=d,f)))}}function ew(t,r,i){var l,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===l&&h===a?u:(a=h,u=r(l=d,f)))}}function tw(t,r){var i=Sl(t),l=i==="transform"?R1:cg;return this.attrTween(t,typeof r=="function"?(i.local?ew:J1)(i,l,mc(this,"attr."+t,r)):r==null?(i.local?q1:Q1)(i):(i.local?Z1:K1)(i,l,r))}function nw(t,r){return function(i){this.setAttribute(t,r.call(this,i))}}function rw(t,r){return function(i){this.setAttributeNS(t.space,t.local,r.call(this,i))}}function ow(t,r){var i,l;function a(){var u=r.apply(this,arguments);return u!==l&&(i=(l=u)&&rw(t,u)),i}return a._value=r,a}function iw(t,r){var i,l;function a(){var u=r.apply(this,arguments);return u!==l&&(i=(l=u)&&nw(t,u)),i}return a._value=r,a}function sw(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 l=Sl(t);return this.tween(i,(l.local?ow:iw)(l,r))}function lw(t,r){return function(){gc(this,t).delay=+r.apply(this,arguments)}}function aw(t,r){return r=+r,function(){gc(this,t).delay=r}}function uw(t){var r=this._id;return arguments.length?this.each((typeof t=="function"?lw:aw)(r,t)):Qt(this.node(),r).delay}function cw(t,r){return function(){sn(this,t).duration=+r.apply(this,arguments)}}function dw(t,r){return r=+r,function(){sn(this,t).duration=r}}function fw(t){var r=this._id;return arguments.length?this.each((typeof t=="function"?cw:dw)(r,t)):Qt(this.node(),r).duration}function pw(t,r){if(typeof r!="function")throw new Error;return function(){sn(this,t).ease=r}}function hw(t){var r=this._id;return arguments.length?this.each(pw(r,t)):Qt(this.node(),r).ease}function gw(t,r){return function(){var i=r.apply(this,arguments);if(typeof i!="function")throw new Error;sn(this,t).ease=i}}function mw(t){if(typeof t!="function")throw new Error;return this.each(gw(this._id,t))}function yw(t){typeof t!="function"&&(t=Vh(t));for(var r=this._groups,i=r.length,l=new Array(i),a=0;a<i;++a)for(var u=r[a],d=u.length,f=l[a]=[],h,m=0;m<d;++m)(h=u[m])&&t.call(h,h.__data__,m,u)&&f.push(h);return new Sn(l,this._parents,this._name,this._id)}function vw(t){if(t._id!==this._id)throw new Error;for(var r=this._groups,i=t._groups,l=r.length,a=i.length,u=Math.min(l,a),d=new Array(l),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<l;++f)d[f]=r[f];return new Sn(d,this._parents,this._name,this._id)}function xw(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 ww(t,r,i){var l,a,u=xw(r)?gc:sn;return function(){var d=u(this,t),f=d.on;f!==l&&(a=(l=f).copy()).on(r,i),d.on=a}}function Sw(t,r){var i=this._id;return arguments.length<2?Qt(this.node(),i).on.on(t):this.each(ww(i,t,r))}function kw(t){return function(){var r=this.parentNode;for(var i in this.__transition)if(+i!==t)return;r&&r.removeChild(this)}}function _w(){return this.on("end.remove",kw(this._id))}function Ew(t){var r=this._name,i=this._id;typeof t!="function"&&(t=cc(t));for(var l=this._groups,a=l.length,u=new Array(a),d=0;d<a;++d)for(var f=l[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,_l(m[y],r,i,y,m,Qt(v,i)));return new Sn(u,this._parents,r,i)}function Nw(t){var r=this._name,i=this._id;typeof t!="function"&&(t=Fh(t));for(var l=this._groups,a=l.length,u=[],d=[],f=0;f<a;++f)for(var h=l[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])&&_l(w,r,i,C,y,S);u.push(y),d.push(v)}return new Sn(u,d,r,i)}var Cw=Ni.prototype.constructor;function bw(){return new Cw(this._groups,this._parents)}function Mw(t,r){var i,l,a;return function(){var u=so(this,t),d=(this.style.removeProperty(t),so(this,t));return u===d?null:u===i&&d===l?a:a=r(i=u,l=d)}}function dg(t){return function(){this.style.removeProperty(t)}}function Pw(t,r,i){var l,a=i+"",u;return function(){var d=so(this,t);return d===a?null:d===l?u:u=r(l=d,i)}}function zw(t,r,i){var l,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===l&&h===a?u:(a=h,u=r(l=d,f))}}function Iw(t,r){var i,l,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=dg(r)):void 0;(m!==i||a!==v)&&(l=(i=m).copy()).on(d,a=v),h.on=l}}function Tw(t,r,i){var l=(t+="")=="transform"?j1:cg;return r==null?this.styleTween(t,Mw(t,l)).on("end.style."+t,dg(t)):typeof r=="function"?this.styleTween(t,zw(t,l,mc(this,"style."+t,r))).each(Iw(this._id,t)):this.styleTween(t,Pw(t,l,r),i).on("end.style."+t,null)}function jw(t,r,i){return function(l){this.style.setProperty(t,r.call(this,l),i)}}function Rw(t,r,i){var l,a;function u(){var d=r.apply(this,arguments);return d!==a&&(l=(a=d)&&jw(t,d,i)),l}return u._value=r,u}function Lw(t,r,i){var l="style."+(t+="");if(arguments.length<2)return(l=this.tween(l))&&l._value;if(r==null)return this.tween(l,null);if(typeof r!="function")throw new Error;return this.tween(l,Rw(t,r,i??""))}function Aw(t){return function(){this.textContent=t}}function $w(t){return function(){var r=t(this);this.textContent=r??""}}function Dw(t){return this.tween("text",typeof t=="function"?$w(mc(this,"text",t)):Aw(t==null?"":t+""))}function Ow(t){return function(r){this.textContent=t.call(this,r)}}function Fw(t){var r,i;function l(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Ow(a)),r}return l._value=t,l}function Vw(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,Fw(t))}function Hw(){for(var t=this._name,r=this._id,i=fg(),l=this._groups,a=l.length,u=0;u<a;++u)for(var d=l[u],f=d.length,h,m=0;m<f;++m)if(h=d[m]){var v=Qt(h,r);_l(h,t,i,m,d,{time:v.time+v.delay+v.duration,delay:0,duration:v.duration,ease:v.ease})}return new Sn(l,this._parents,t,i)}function Bw(){var t,r,i=this,l=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,l),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 Ww=0;function Sn(t,r,i,l){this._groups=t,this._parents=r,this._name=i,this._id=l}function fg(){return++Ww}var xn=Ni.prototype;Sn.prototype={constructor:Sn,select:Ew,selectAll:Nw,selectChild:xn.selectChild,selectChildren:xn.selectChildren,filter:yw,merge:vw,selection:bw,transition:Hw,call:xn.call,nodes:xn.nodes,node:xn.node,size:xn.size,empty:xn.empty,each:xn.each,on:Sw,attr:tw,attrTween:sw,style:Tw,styleTween:Lw,text:Dw,textTween:Vw,remove:_w,tween:G1,delay:uw,duration:fw,ease:hw,easeVarying:mw,end:Bw,[Symbol.iterator]:xn[Symbol.iterator]};function Uw(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Yw={time:null,delay:0,duration:250,ease:Uw};function Xw(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 Gw(t){var r,i;t instanceof Sn?(r=t._id,t=t._name):(r=fg(),(i=Yw).time=hc(),t=t==null?null:t+"");for(var l=this._groups,a=l.length,u=0;u<a;++u)for(var d=l[u],f=d.length,h,m=0;m<f;++m)(h=d[m])&&_l(h,t,r,m,d,i||Xw(h,r));return new Sn(l,this._parents,t,r)}Ni.prototype.interrupt=U1;Ni.prototype.transition=Gw;const Js=t=>()=>t;function Qw(t,{sourceEvent:r,target:i,transform:l,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:l,enumerable:!0,configurable:!0},_:{value:a}})}function wn(t,r,i){this.k=t,this.x=r,this.y=i}wn.prototype={constructor:wn,scale:function(t){return t===1?this:new wn(this.k*t,this.x,this.y)},translate:function(t,r){return t===0&r===0?this:new wn(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 El=new wn(1,0,0);pg.prototype=wn.prototype;function pg(t){for(;!t.__zoom;)if(!(t=t.parentNode))return El;return t.__zoom}function Ru(t){t.stopImmediatePropagation()}function ui(t){t.preventDefault(),t.stopImmediatePropagation()}function qw(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Kw(){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 Pp(){return this.__zoom||El}function Zw(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Jw(){return navigator.maxTouchPoints||"ontouchstart"in this}function e2(t,r,i){var l=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>l?(l+a)/2:Math.min(0,l)||Math.max(0,a),d>u?(u+d)/2:Math.min(0,u)||Math.max(0,d))}function hg(){var t=qw,r=Kw,i=e2,l=Zw,a=Jw,u=[0,1/0],d=[[-1/0,-1/0],[1/0,1/0]],f=250,h=il,m=wl("start","zoom","end"),v,g,y,w=500,S=150,C=0,k=10;function _(z){z.property("__zoom",Pp).on("wheel.zoom",X,{passive:!1}).on("mousedown.zoom",q).on("dblclick.zoom",J).filter(a).on("touchstart.zoom",V).on("touchmove.zoom",H).on("touchend.zoom touchcancel.zoom",ee).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(z,U,D,W){var L=z.selection?z.selection():z;L.property("__zoom",Pp),z!==L?O(z,U,D,W):L.interrupt().each(function(){A(this,arguments).event(W).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},_.scaleBy=function(z,U,D,W){_.scaleTo(z,function(){var L=this.__zoom.k,T=typeof U=="function"?U.apply(this,arguments):U;return L*T},D,W)},_.scaleTo=function(z,U,D,W){_.transform(z,function(){var L=r.apply(this,arguments),T=this.__zoom,F=D==null?M(L):typeof D=="function"?D.apply(this,arguments):D,b=T.invert(F),j=typeof U=="function"?U.apply(this,arguments):U;return i(E(I(T,j),F,b),L,d)},D,W)},_.translateBy=function(z,U,D,W){_.transform(z,function(){return i(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof D=="function"?D.apply(this,arguments):D),r.apply(this,arguments),d)},null,W)},_.translateTo=function(z,U,D,W,L){_.transform(z,function(){var T=r.apply(this,arguments),F=this.__zoom,b=W==null?M(T):typeof W=="function"?W.apply(this,arguments):W;return i(El.translate(b[0],b[1]).scale(F.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof D=="function"?-D.apply(this,arguments):-D),T,d)},W,L)};function I(z,U){return U=Math.max(u[0],Math.min(u[1],U)),U===z.k?z:new wn(U,z.x,z.y)}function E(z,U,D){var W=U[0]-D[0]*z.k,L=U[1]-D[1]*z.k;return W===z.x&&L===z.y?z:new wn(z.k,W,L)}function M(z){return[(+z[0][0]+ +z[1][0])/2,(+z[0][1]+ +z[1][1])/2]}function O(z,U,D,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,F=A(L,T).event(W),b=r.apply(L,T),j=D==null?M(b):typeof D=="function"?D.apply(L,T):D,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 wn(se,j[0]-Z[0]*se,j[1]-Z[1]*se)}F.zoom(null,ue)}})}function A(z,U,D){return!D&&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 Qw(z,{sourceEvent:this.sourceEvent,target:_,transform:this.that.__zoom,dispatch:m}),U)}};function X(z,...U){if(!t.apply(this,arguments))return;var D=A(this,U).event(z),W=this.__zoom,L=Math.max(u[0],Math.min(u[1],W.k*Math.pow(2,l.apply(this,arguments)))),T=Wt(z);if(D.wheel)(D.mouse[0][0]!==T[0]||D.mouse[0][1]!==T[1])&&(D.mouse[1]=W.invert(D.mouse[0]=T)),clearTimeout(D.wheel);else{if(W.k===L)return;D.mouse=[T,W.invert(T)],al(this),D.start()}ui(z),D.wheel=setTimeout(F,S),D.zoom("mouse",i(E(I(W,L),D.mouse[0],D.mouse[1]),D.extent,d));function F(){D.wheel=null,D.end()}}function q(z,...U){if(y||!t.apply(this,arguments))return;var D=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,D),F=z.clientX,b=z.clientY;Kh(z.view),Ru(z),W.mouse=[T,this.__zoom.invert(T)],al(this),W.start();function j(oe){if(ui(oe),!W.moved){var ae=oe.clientX-F,ce=oe.clientY-b;W.moved=ae*ae+ce*ce>C}W.event(oe).zoom("mouse",i(E(W.that.__zoom,W.mouse[0]=Wt(oe,D),W.mouse[1]),W.extent,d))}function te(oe){L.on("mousemove.zoom mouseup.zoom",null),Zh(oe.view,W.moved),ui(oe),W.event(oe).end()}}function J(z,...U){if(t.apply(this,arguments)){var D=this.__zoom,W=Wt(z.changedTouches?z.changedTouches[0]:z,this),L=D.invert(W),T=D.k*(z.shiftKey?.5:2),F=i(E(I(D,T),W,L),r.apply(this,U),d);ui(z),f>0?Mt(this).transition().duration(f).call(O,F,W,z):Mt(this).call(_.transform,F,W,z)}}function V(z,...U){if(t.apply(this,arguments)){var D=z.touches,W=D.length,L=A(this,U,z.changedTouches.length===W).event(z),T,F,b,j;for(Ru(z),F=0;F<W;++F)b=D[F],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)),al(this),L.start())}}function H(z,...U){if(this.__zooming){var D=A(this,U).event(z),W=z.changedTouches,L=W.length,T,F,b,j;for(ui(z),T=0;T<L;++T)F=W[T],b=Wt(F,this),D.touch0&&D.touch0[2]===F.identifier?D.touch0[0]=b:D.touch1&&D.touch1[2]===F.identifier&&(D.touch1[0]=b);if(F=D.that.__zoom,D.touch1){var te=D.touch0[0],oe=D.touch0[1],ae=D.touch1[0],ce=D.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;F=I(F,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(D.touch0)b=D.touch0[0],j=D.touch0[1];else return;D.zoom("touch",i(E(F,b,j),D.extent,d))}}function ee(z,...U){if(this.__zooming){var D=A(this,U).event(z),W=z.changedTouches,L=W.length,T,F;for(Ru(z),y&&clearTimeout(y),y=setTimeout(function(){y=null},w),T=0;T<L;++T)F=W[T],D.touch0&&D.touch0[2]===F.identifier?delete D.touch0:D.touch1&&D.touch1[2]===F.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(F=Wt(F,this),Math.hypot(g[0]-F[0],g[1]-F[1])<k)){var b=Mt(this).on("dblclick.zoom");b&&b.apply(this,arguments)}}}return _.wheelDelta=function(z){return arguments.length?(l=typeof z=="function"?z:Js(+z),_):l},_.filter=function(z){return arguments.length?(t=typeof z=="function"?z:Js(!!z),_):t},_.touchable=function(z){return arguments.length?(a=typeof z=="function"?z:Js(!!z),_):a},_.extent=function(z){return arguments.length?(r=typeof z=="function"?z:Js([[+z[0][0],+z[0][1]],[+z[1][0],+z[1][1]]]),_):r},_.scaleExtent=function(z){return arguments.length?(u[0]=+z[0],u[1]=+z[1],_):[u[0],u[1]]},_.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],_):[[d[0][0],d[0][1]],[d[1][0],d[1][1]]]},_.constrain=function(z){return arguments.length?(i=z,_):i},_.duration=function(z){return arguments.length?(f=+z,_):f},_.interpolate=function(z){return arguments.length?(h=z,_):h},_.on=function(){var z=m.on.apply(m,arguments);return z===m?_:z},_.clickDistance=function(z){return arguments.length?(C=(z=+z)*z,_):Math.sqrt(C)},_.tapDistance=function(z){return arguments.length?(k=+z,_):k},_}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:l})=>`Couldn't create edge for ${t} handle id: "${t==="source"?i:l}", 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]],gg=["Enter"," ","Escape"],mg={"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 yg={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 ml;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(ml||(ml={}));var xe;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(xe||(xe={}));const zp={[xe.Left]:xe.Right,[xe.Right]:xe.Left,[xe.Top]:xe.Bottom,[xe.Bottom]:xe.Top};function vg(t){return t===null?null:t?"valid":"invalid"}const xg=t=>"id"in t&&"source"in t&&"target"in t,t2=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),yc=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),bi=(t,r=[0,0])=>{const{width:i,height:l}=kn(t),a=t.origin??r,u=i*a[0],d=l*a[1];return{x:t.position.x-u,y:t.position.y-d}},n2=(t,r={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const i=t.reduce((l,a)=>{const u=typeof a=="string";let d=!r.nodeLookup&&!u?a:void 0;r.nodeLookup&&(d=u?r.nodeLookup.get(a):yc(a)?a:r.nodeLookup.get(a.id));const f=d?yl(d,r.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Nl(l,f)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Cl(i)},Mi=(t,r={})=>{let i={x:1/0,y:1/0,x2:-1/0,y2:-1/0},l=!1;return t.forEach(a=>{(r.filter===void 0||r.filter(a))&&(i=Nl(i,yl(a)),l=!0)}),l?Cl(i):{x:0,y:0,width:0,height:0}},vc=(t,r,[i,l,a]=[0,0,1],u=!1,d=!1)=>{const f={...go(r,[i,l,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),_=u&&C>0;(!m.internals.handleBounds||_||C>=k||m.dragging)&&h.push(m)}return h},r2=(t,r)=>{const i=new Set;return t.forEach(l=>{i.add(l.id)}),r.filter(l=>i.has(l.source)||i.has(l.target))};function o2(t,r){const i=new Map,l=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)&&(!l||l.has(a.id))&&i.set(a.id,a)}),i}async function i2({nodes:t,width:r,height:i,panZoom:l,minZoom:a,maxZoom:u},d){if(t.size===0)return!0;const f=o2(t,d),h=Mi(f),m=wc(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 l.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 wg({nodeId:t,nextPosition:r,nodeLookup:i,nodeOrigin:l=[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??l;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 s2({nodesToRemove:t=[],edgesToRemove:r=[],nodes:i,edges:l,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=l.filter(y=>y.deletable!==!1),v=r2(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 Sg(t,r,i){const{width:l,height:a}=kn(i),{x:u,y:d}=i.internals.positionAbsolute;return kr(t,[[u,d],[u+l,d+a]],r)}const Ip=(t,r,i)=>t<r?uo(Math.abs(t-r),1,r)/r:t>i?-uo(Math.abs(t-i),1,r)/r:0,xc=(t,r,i=15,l=40)=>{const a=Ip(t.x,l,r.width-l)*i,u=Ip(t.y,l,r.height-l)*i;return[a,u]},Nl=(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)}),rc=({x:t,y:r,width:i,height:l})=>({x:t,y:r,x2:t+i,y2:r+l}),Cl=({x:t,y:r,x2:i,y2:l})=>({x:t,y:r,width:i-t,height:l-r}),co=(t,r=[0,0])=>{var a,u;const{x:i,y:l}=yc(t)?t.internals.positionAbsolute:bi(t,r);return{x:i,y:l,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}},yl=(t,r=[0,0])=>{var a,u;const{x:i,y:l}=yc(t)?t.internals.positionAbsolute:bi(t,r);return{x:i,y:l,x2:i+(((a=t.measured)==null?void 0:a.width)??t.width??t.initialWidth??0),y2:l+(((u=t.measured)==null?void 0:u.height)??t.height??t.initialHeight??0)}},kg=(t,r)=>Cl(Nl(rc(t),rc(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)),l=Math.max(0,Math.min(t.y+t.height,r.y+r.height)-Math.max(t.y,r.y));return Math.ceil(i*l)},Tp=t=>Yt(t.width)&&Yt(t.height)&&Yt(t.x)&&Yt(t.y),Yt=t=>!isNaN(t)&&isFinite(t),_g=(t,r)=>(i,l)=>{},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,l,a],u=!1,d=[1,1])=>{const f={x:(t-i)/a,y:(r-l)/a};return u?Pi(f,d):f},fo=({x:t,y:r},[i,l,a])=>({x:t*a+i,y:r*a+l});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 l2(t,r,i){if(typeof t=="string"||typeof t=="number"){const l=eo(t,i),a=eo(t,r);return{top:l,right:a,bottom:l,left:a,x:a*2,y:l*2}}if(typeof t=="object"){const l=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:l,right:d,bottom:a,left:u,x:u+d,y:l+a}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function a2(t,r,i,l,a,u){const{x:d,y:f}=fo(t,[r,i,l]),{x:h,y:m}=fo({x:t.x+t.width,y:t.y+t.height},[r,i,l]),v=a-h,g=u-m;return{left:Math.floor(d),top:Math.floor(f),right:Math.floor(v),bottom:Math.floor(g)}}const wc=(t,r,i,l,a,u)=>{const d=l2(u,r,i),f=(r-d.x)/t.width,h=(i-d.y)/t.height,m=Math.min(f,h),v=uo(m,l,a),g=t.x+t.width/2,y=t.y+t.height/2,w=r/2-g*v,S=i/2-y*v,C=a2(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 kn(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 Eg(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 Ng(t,r={width:0,height:0},i,l,a){const u={...t},d=l.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 jp(t,r){if(t.size!==r.size)return!1;for(const i of t)if(!r.has(i))return!1;return!0}function u2(){let t,r;return{promise:new Promise((l,a)=>{t=l,r=a}),resolve:t,reject:r}}function c2(t){return{...mg,...t||{}}}function pi(t,{snapGrid:r=[0,0],snapToGrid:i=!1,transform:l,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)},l),{x:h,y:m}=i?Pi(f,r):f;return{xSnapped:h,ySnapped:m,...f}}const Sc=t=>({width:t.offsetWidth,height:t.offsetHeight}),Cg=t=>{var r;return((r=t==null?void 0:t.getRootNode)==null?void 0:r.call(t))||(window==null?void 0:window.document)},d2=["INPUT","SELECT","TEXTAREA"];function bg(t){var l,a;const r=((a=(l=t.composedPath)==null?void 0:l.call(t))==null?void 0:a[0])||t.target;return(r==null?void 0:r.nodeType)!==1?!1:d2.includes(r.nodeName)||r.hasAttribute("contenteditable")||!!r.closest(".nokey")}const Mg=t=>"clientX"in t,Xt=(t,r)=>{var u,d;const i=Mg(t),l=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:l-((r==null?void 0:r.left)??0),y:a-((r==null?void 0:r.top)??0)}},Rp=(t,r,i,l,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)/l,y:(f.top-i.top)/l,...Sc(d)}})};function Pg({sourceX:t,sourceY:r,targetX:i,targetY:l,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+l*.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 Lp({pos:t,x1:r,y1:i,x2:l,y2:a,c:u}){switch(t){case xe.Left:return[r-el(r-l,u),i];case xe.Right:return[r+el(l-r,u),i];case xe.Top:return[r,i-el(i-a,u)];case xe.Bottom:return[r,i+el(a-i,u)]}}function zg({sourceX:t,sourceY:r,sourcePosition:i=xe.Bottom,targetX:l,targetY:a,targetPosition:u=xe.Top,curvature:d=.25}){const[f,h]=Lp({pos:i,x1:t,y1:r,x2:l,y2:a,c:d}),[m,v]=Lp({pos:u,x1:l,y1:a,x2:t,y2:r,c:d}),[g,y,w,S]=Pg({sourceX:t,sourceY:r,targetX:l,targetY:a,sourceControlX:f,sourceControlY:h,targetControlX:m,targetControlY:v});return[`M${t},${r} C${f},${h} ${m},${v} ${l},${a}`,g,y,w,S]}function Ig({sourceX:t,sourceY:r,targetX:i,targetY:l}){const a=Math.abs(i-t)/2,u=i<t?i+a:i-a,d=Math.abs(l-r)/2,f=l<r?l+d:l-d;return[u,f,a,d]}function f2({sourceNode:t,targetNode:r,selected:i=!1,zIndex:l=0,elevateOnSelect:a=!1,zIndexMode:u="basic"}){if(u==="manual")return l;const d=a&&i?l+1e3:l,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 p2({sourceNode:t,targetNode:r,width:i,height:l,transform:a}){const u=Nl(yl(t),yl(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:l/a[2]};return Si(d,Cl(u))>0}const h2=({source:t,sourceHandle:r,target:i,targetHandle:l})=>`xy-edge__${t}${r||""}-${i}${l||""}`,g2=(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)),m2=(t,r,i={})=>{var u;if(!t.source||!t.target)return(u=i.onError)==null||u.call(i,"006",Gt.error006()),r;const l=i.getEdgeId||h2;let a;return xg(t)?a={...t}:a={...t,id:l(t)},g2(a,r)?r:(a.sourceHandle===null&&delete a.sourceHandle,a.targetHandle===null&&delete a.targetHandle,r.concat(a))};function Tg({sourceX:t,sourceY:r,targetX:i,targetY:l}){const[a,u,d,f]=Ig({sourceX:t,sourceY:r,targetX:i,targetY:l});return[`M ${t},${r}L ${i},${l}`,a,u,d,f]}const Ap={[xe.Left]:{x:-1,y:0},[xe.Right]:{x:1,y:0},[xe.Top]:{x:0,y:-1},[xe.Bottom]:{x:0,y:1}},y2=({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},$p=(t,r)=>Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2));function v2({source:t,sourcePosition:r=xe.Bottom,target:i,targetPosition:l=xe.Top,center:a,offset:u,stepPosition:d}){const f=Ap[r],h=Ap[l],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=y2({source:m,sourcePosition:r,target:v}),y=g.x!==0?"x":"y",w=g[y];let S=[],C,k;const _={x:0,y:0},I={x:0,y:0},[,,E,M]=Ig({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 X=[{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"?X:q:S=y==="x"?q:X}else{const X=[{x:m.x,y:v.y}],q=[{x:v.x,y:m.y}];if(y==="x"?S=f.x===w?q:X:S=f.y===w?X:q,r===l){const z=Math.abs(t[y]-i[y]);if(z<=u){const U=Math.min(u-1,u-z);f[y]===w?_[y]=(m[y]>t[y]?-1:1)*U:I[y]=(v[y]>i[y]?-1:1)*U}}if(r!==l){const z=y==="x"?"y":"x",U=f[y]===h[z],D=m[z]>v[z],W=m[z]<v[z];(f[y]===1&&(!U&&D||U&&W)||f[y]!==1&&(!U&&W||U&&D))&&(S=y==="x"?X:q)}const J={x:m.x+_.x,y:m.y+_.y},V={x:v.x+I.x,y:v.y+I.y},H=Math.max(Math.abs(J.x-S[0].x),Math.abs(V.x-S[0].x)),ee=Math.max(Math.abs(J.y-S[0].y),Math.abs(V.y-S[0].y));H>=ee?(C=(J.x+V.x)/2,k=S[0].y):(C=S[0].x,k=(J.y+V.y)/2)}const O={x:m.x+_.x,y:m.y+_.y},A={x:v.x+I.x,y:v.y+I.y};return[[t,...O.x!==S[0].x||O.y!==S[0].y?[O]:[],...S,...A.x!==S[S.length-1].x||A.y!==S[S.length-1].y?[A]:[],i],C,k,E,M]}function x2(t,r,i,l){const a=Math.min($p(t,r)/2,$p(r,i)/2,l),{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 oc({sourceX:t,sourceY:r,sourcePosition:i=xe.Bottom,targetX:l,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]=v2({source:{x:t,y:r},sourcePosition:i,target:{x:l,y:a},targetPosition:u,center:{x:f,y:h},offset:m,stepPosition:v});let k=`M${g[0].x} ${g[0].y}`;for(let _=1;_<g.length-1;_++)k+=x2(g[_-1],g[_],g[_+1],d);return k+=`L${g[g.length-1].x} ${g[g.length-1].y}`,[k,y,w,S,C]}function Dp(t){var r;return t&&!!(t.internals.handleBounds||(r=t.handles)!=null&&r.length)&&!!(t.measured.width||t.width||t.initialWidth)}function w2(t){var g;const{sourceNode:r,targetNode:i}=t;if(!Dp(r)||!Dp(i))return null;const l=r.internals.handleBounds||Op(r.handles),a=i.internals.handleBounds||Op(i.handles),u=Fp((l==null?void 0:l.source)??[],t.sourceHandle),d=Fp(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 Op(t){if(!t)return null;const r=[],i=[];for(const l of t)l.width=l.width??1,l.height=l.height??1,l.type==="source"?r.push(l):l.type==="target"&&i.push(l);return{source:r,target:i}}function Er(t,r,i=xe.Left,l=!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??kn(t);if(l)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 Fp(t,r){return t&&(r?t.find(i=>i.id===r):t[0])||null}function ic(t,r){return t?typeof t=="string"?t:`${r?`${r}__`:""}${Object.keys(t).sort().map(l=>`${l}=${t[l]}`).join("&")}`:""}function S2(t,{id:r,defaultColor:i,defaultMarkerStart:l,defaultMarkerEnd:a}){const u=new Set;return t.reduce((d,f)=>([f.markerStart||l,f.markerEnd||a].forEach(h=>{if(h&&typeof h=="object"){const m=ic(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 jg=1e3,k2=10,kc={nodeOrigin:[0,0],nodeExtent:xi,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},_2={...kc,checkEquality:!0};function _c(t,r){const i={...t};for(const l in r)r[l]!==void 0&&(i[l]=r[l]);return i}function E2(t,r,i){const l=_c(kc,i);for(const a of t.values())if(a.parentId)Nc(a,t,r,l);else{const u=bi(a,l.nodeOrigin),d=_r(a.extent)?a.extent:l.nodeExtent,f=kr(u,d,kn(a));a.internals.positionAbsolute=f}}function N2(t,r){if(!t.handles)return t.measured?r==null?void 0:r.internals.handleBounds:void 0;const i=[],l=[];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"&&l.push(u)}return{source:i,target:l}}function Ec(t){return t==="manual"}function sc(t,r,i,l={}){var v,g;const a=_c(_2,l),u={i:0},d=new Map(r),f=a!=null&&a.elevateNodesOnSelect&&!Ec(a.zIndexMode)?jg: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,kn(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:N2(y,w),z:Rg(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&&Nc(w,r,i,l,u),m||(m=y.selected??!1)}return{nodesInitialized:h,hasSelectedNodes:m}}function C2(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 Nc(t,r,i,l,a){const{elevateNodesOnSelect:u,nodeOrigin:d,nodeExtent:f,zIndexMode:h}=_c(kc,l),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}C2(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*k2),a&&v.internals.rootParentIndex!==void 0&&(a.i=v.internals.rootParentIndex);const g=u&&!Ec(h)?jg:0,{x:y,y:w,z:S}=b2(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 Rg(t,r,i){const l=Yt(t.zIndex)?t.zIndex:0;return Ec(i)?l:l+(t.selected?r:0)}function b2(t,r,i,l,a,u){const{x:d,y:f}=r.internals.positionAbsolute,h=kn(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},l,h);t.extent==="parent"&&(g=Sg(g,h,r));const y=Rg(t,a,u),w=r.internals.z??0;return{x:g.x,y:g.y,z:w>=y?w+1:y}}function Cc(t,r,i,l=[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=kg(m,f.rect);u.set(f.parentId,{expandedRect:v,parent:h})}return u.size>0&&u.forEach(({expandedRect:f,parent:h},m)=>{var E;const v=h.internals.positionAbsolute,g=kn(h),y=h.origin??l,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)),_=(C-g.width)*y[0],I=(k-g.height)*y[1];(w>0||S>0||_||I)&&(a.push({id:m,type:"position",position:{x:h.position.x-w+_,y:h.position.y-S+I}}),(E=i.get(m))==null||E.forEach(M=>{t.some(O=>O.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-_:0),height:k+(S?y[1]*S-I:0)}})}),a}function M2(t,r,i,l,a,u,d){const f=l==null?void 0:l.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=Sc(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(),E=_r(S.extent)?S.extent:u;let{positionAbsolute:M}=S.internals;S.parentId&&S.extent==="parent"?M=Sg(M,C,r.get(S.parentId)):E&&(M=kr(M,E,C));const O={...S,measured:C,internals:{...S.internals,positionAbsolute:M,handleBounds:{source:Rp("source",w.nodeElement,I,g,S.id),target:Rp("target",w.nodeElement,I,g,S.id)}}};r.set(S.id,O),S.parentId&&Nc(O,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(O,a)}))}}if(y.length>0){const w=Cc(y,r,i,a);m.push(...w)}return{changes:m,updatedInternals:h}}async function P2({delta:t,panZoom:r,transform:i,translateExtent:l,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]],l);return!!d&&(d.x!==i[0]||d.y!==i[1]||d.k!==i[2])}function Vp(t,r,i,l,a,u){let d=a;const f=l.get(d)||new Map;l.set(d,f.set(i,r)),d=`${a}-${t}`;const h=l.get(d)||new Map;if(l.set(d,h.set(i,r)),u){d=`${a}-${t}-${u}`;const m=l.get(d)||new Map;l.set(d,m.set(i,r))}}function Lg(t,r,i){t.clear(),r.clear();for(const l of i){const{source:a,target:u,sourceHandle:d=null,targetHandle:f=null}=l,h={edgeId:l.id,source:a,target:u,sourceHandle:d,targetHandle:f},m=`${a}-${d}--${u}-${f}`,v=`${u}-${f}--${a}-${d}`;Vp("source",h,v,t,a,d),Vp("target",h,m,t,u,f),r.set(l.id,l)}}function Ag(t,r){if(!t.parentId)return!1;const i=r.get(t.parentId);return i?i.selected?!0:Ag(i,r):!1}function Hp(t,r,i){var a;let l=t;do{if((a=l==null?void 0:l.matches)!=null&&a.call(l,r))return!0;if(l===i)return!1;l=l==null?void 0:l.parentElement}while(l);return!1}function z2(t,r,i,l){const a=new Map;for(const[u,d]of t)if((d.selected||d.id===l)&&(!d.parentId||!Ag(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 Lu({nodeId:t,dragItems:r,nodeLookup:i,dragging:l=!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:l})}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:l}:a[0],a]}function I2({dragItems:t,snapGrid:r,x:i,y:l}){const a=t.values().next().value;if(!a)return null;const u={x:i-a.distance.x,y:l-a.distance.y},d=Pi(u,r);return{x:d.x-u.x,y:d.y-u.y}}function T2({onNodeMouseDown:t,getStoreItems:r,onDragStart:i,onDrag:l,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:E,domNode:M,isSelectable:O,nodeId:A,nodeClickDistance:B=0}){y=Mt(M);function X({x:H,y:ee}){const{nodeLookup:z,nodeExtent:U,snapGrid:D,snapToGrid:W,nodeOrigin:L,onNodeDrag:T,onSelectionDrag:F,onError:b,updateNodePositions:j}=r();u={x:H,y:ee};let te=!1;const oe=f.size>1,ae=oe&&U?rc(Mi(f)):null,ce=oe&&W?I2({dragItems:f,snapGrid:D,x:H,y:ee}):null;for(const[ue,Z]of f){if(!z.has(ue))continue;let se={x:H-Z.distance.x,y:ee-Z.distance.y};W&&(se=ce?{x:Math.round(se.x+ce.x),y:Math.round(se.y+ce.y)}:Pi(se,D));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}=wg({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&&(l||T||!A&&F))){const[ue,Z]=Lu({nodeId:A,dragItems:f,nodeLookup:z});l==null||l(C,f,ue,Z),T==null||T(C,ue,Z),A||F==null||F(C,Z)}}async function q(){if(!v)return;const{transform:H,panBy:ee,autoPanSpeed:z,autoPanOnNodeDrag:U}=r();if(!U){h=!1,cancelAnimationFrame(d);return}const[D,W]=xc(m,v,z);(D!==0||W!==0)&&(u.x=(u.x??0)-D/H[2],u.y=(u.y??0)-W/H[2],await ee({x:D,y:W})&&X(u)),d=requestAnimationFrame(q)}function J(H){var oe;const{nodeLookup:ee,multiSelectionActive:z,nodesDraggable:U,transform:D,snapGrid:W,snapToGrid:L,selectNodesOnDrag:T,onNodeDragStart:F,onSelectionDragStart:b,unselectNodesAndEdges:j}=r();g=!0,(!T||!O)&&!z&&A&&((oe=ee.get(A))!=null&&oe.selected||j()),O&&T&&A&&(t==null||t(A));const te=pi(H.sourceEvent,{transform:D,snapGrid:W,snapToGrid:L,containerBounds:v});if(u=te,f=z2(ee,U,te,A),f.size>0&&(i||F||!A&&b)){const[ae,ce]=Lu({nodeId:A,dragItems:f,nodeLookup:ee});i==null||i(H.sourceEvent,f,ae,ce),F==null||F(H.sourceEvent,ae,ce),A||b==null||b(H.sourceEvent,ce)}}const V=Jh().clickDistance(B).on("start",H=>{const{domNode:ee,nodeDragThreshold:z,transform:U,snapGrid:D,snapToGrid:W}=r();v=(ee==null?void 0:ee.getBoundingClientRect())||null,w=!1,S=!1,C=H.sourceEvent,z===0&&J(H),u=pi(H.sourceEvent,{transform:U,snapGrid:D,snapToGrid:W,containerBounds:v}),m=Xt(H.sourceEvent,v)}).on("drag",H=>{const{autoPanOnNodeDrag:ee,transform:z,snapGrid:U,snapToGrid:D,nodeDragThreshold:W,nodeLookup:L}=r(),T=pi(H.sourceEvent,{transform:z,snapGrid:U,snapToGrid:D,containerBounds:v});if(C=H.sourceEvent,(H.sourceEvent.type==="touchmove"&&H.sourceEvent.touches.length>1||A&&!L.has(A))&&(w=!0),!w){if(!h&&ee&&g&&(h=!0,q()),!g){const F=Xt(H.sourceEvent,v),b=F.x-m.x,j=F.y-m.y;Math.sqrt(b*b+j*j)>W&&J(H)}(u.x!==T.xSnapped||u.y!==T.ySnapped)&&f&&g&&(m=Xt(H.sourceEvent,v),X(T))}}).on("end",H=>{if(!g||w){w&&f.size>0&&r().updateNodePositions(f,!1);return}if(h=!1,g=!1,cancelAnimationFrame(d),f.size>0){const{nodeLookup:ee,updateNodePositions:z,onNodeDragStop:U,onSelectionDragStop:D}=r();if(S&&(z(f,!1),S=!1),a||U||!A&&D){const[W,L]=Lu({nodeId:A,dragItems:f,nodeLookup:ee,dragging:!1});a==null||a(H.sourceEvent,f,W,L),U==null||U(H.sourceEvent,W,L),A||D==null||D(H.sourceEvent,L)}}}).filter(H=>{const ee=H.target;return!H.button&&(!I||!Hp(ee,`.${I}`,M))&&(!E||Hp(ee,E,M))});y.call(V)}function _(){y==null||y.on(".drag",null)}return{update:k,destroy:_}}function j2(t,r,i){const l=[],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&&l.push(u);return l}const R2=250;function L2(t,r,i,l){var f,h;let a=[],u=1/0;const d=j2(t,i,r+R2);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(l.nodeId===g.nodeId&&l.type===g.type&&l.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=l.type==="source"?"target":"source";return a.find(v=>v.type===m)??a[0]}return a[0]}function $g(t,r,i,l,a,u=!1){var m,v,g;const d=l.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 Dg(t,r){return t||(r!=null&&r.classList.contains("target")?"target":r!=null&&r.classList.contains("source")?"source":null)}function A2(t,r){let i=null;return r?i=!0:t&&!r&&(i=!1),i}const Og=()=>!0;function $2(t,{connectionMode:r,connectionRadius:i,handleId:l,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:_=Og,onReconnectEnd:I,updateConnection:E,getTransform:M,getFromHandle:O,autoPanSpeed:A,dragThreshold:B=1,handleDomNode:X}){const q=Cg(t.target);let J=0,V;const{x:H,y:ee}=Xt(t),z=Dg(u,X),U=f==null?void 0:f.getBoundingClientRect();let D=!1;if(!U||!z)return;const W=$g(a,z,l,h,r);if(!W)return;let L=Xt(t,U),T=!1,F=null,b=!1,j=null;function te(){if(!v||!U)return;const[we,ve]=xc(L,U,A);y({x:we,y:ve}),J=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:zp[oe.position],toNode:null,pointer:L};function Z(){D=!0,E(ue),S==null||S(t,{nodeId:a,handleId:l,handleType:z})}B===0&&Z();function se(we){if(!D){const{x:Re,y:ut}=Xt(we),ft=Re-H,tt=ut-ee;if(!(ft*ft+tt*tt>B*B))return;Z()}if(!O()||!oe){ge(we);return}const ve=M();L=Xt(we,U),V=L2(go(L,ve,!1,[1,1]),i,h,oe),T||(te(),T=!0);const me=Fg(we,{handle:V,connectionMode:r,fromNodeId:a,fromHandleId:l,fromType:d?"target":"source",isValidConnection:_,doc:q,lib:m,flowId:g,nodeLookup:h});j=me.handleDomNode,F=me.connection,b=A2(!!V,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:zp[oe.position],toNode:me.toHandle?h.get(me.toHandle.nodeId):null,pointer:L};E(Ie),ue=Ie}function ge(we){if(!("touches"in we&&we.touches.length>0)){if(D){(V||j)&&F&&b&&(C==null||C(F));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(J),T=!1,b=!1,F=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 Fg(t,{handle:r,connectionMode:i,fromNodeId:l,fromHandleId:a,fromType:u,doc:d,lib:f,flowId:h,isValidConnection:m=Og,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,_={handleDomNode:k,isValid:!1,connection:null,toHandle:null};if(k){const I=Dg(void 0,k),E=k.getAttribute("data-nodeid"),M=k.getAttribute("data-handleid"),O=k.classList.contains("connectable"),A=k.classList.contains("connectableend");if(!E||!I)return _;const B={source:g?E:l,sourceHandle:g?M:a,target:g?l:E,targetHandle:g?a:M};_.connection=B;const q=O&&A&&(i===ao.Strict?g&&I==="source"||!g&&I==="target":E!==l||M!==a);_.isValid=q&&m(B),_.toHandle=$g(E,I,M,v,i,!0)}return _}const lc={onPointerDown:$2,isValid:Fg};function D2({domNode:t,panZoom:r,getTransform:i,getViewScale:l}){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=E=>{if(E.sourceEvent.type!=="wheel"||!r)return;const M=i(),O=E.sourceEvent.ctrlKey&&ki()?10:1,A=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*v,B=M[2]*Math.pow(2,A*O);r.scaleTo(B)};let C=[0,0];const k=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(C=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},_=E=>{const M=i();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!r)return;const O=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],A=[O[0]-C[0],O[1]-C[1]];C=O;const B=l()*Math.max(M[2],Math.log(M[2]))*(w?-1:1),X={x:M[0]-A[0]*B,y:M[1]-A[1]*B},q=[[0,0],[h,m]];r.setViewportConstrained({x:X.x,y:X.y,zoom:M[2]},q,f)},I=hg().on("start",k).on("zoom",g?_:null).on("zoom.wheel",y?S:null);a.call(I,{})}function d(){a.on("zoom",null)}return{update:u,destroy:d,pointer:Wt}}const bl=t=>({x:t.x,y:t.y,zoom:t.k}),Au=({x:t,y:r,zoom:i})=>El.translate(t,r).scale(i),to=(t,r)=>t.target.closest(`.${r}`),Vg=(t,r)=>r===2&&Array.isArray(t)&&t.includes(2),O2=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,$u=(t,r=0,i=O2,l=()=>{})=>{const a=typeof r=="number"&&r>0;return a||l(),a?t.transition().duration(r).ease(i).on("end",l):t},Hg=t=>{const r=t.ctrlKey&&ki()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*r};function F2({zoomPanValues:t,noWheelClassName:r,d3Selection:i,d3Zoom:l,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),_=Hg(v),I=g*Math.pow(2,_);l.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),l.translateBy(i,-(w/g)*u,-(S/g)*u,{internal:!0});const C=bl(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 V2({noWheelClassName:t,preventScrolling:r,d3ZoomHandler:i}){return function(l,a){const u=l.type==="wheel",d=!r&&u&&!l.ctrlKey,f=to(l,t);if(l.ctrlKey&&u&&f&&l.preventDefault(),d||f)return null;l.preventDefault(),i.call(this,l,a)}}function H2({zoomPanValues:t,onDraggingChange:r,onPanZoomStart:i}){return l=>{var u,d,f;if((u=l.sourceEvent)!=null&&u.internal)return;const a=bl(l.transform);t.mouseButton=((d=l.sourceEvent)==null?void 0:d.button)||0,t.isZoomingOrPanning=!0,t.prevViewport=a,((f=l.sourceEvent)==null?void 0:f.type)==="mousedown"&&r(!0),i&&(i==null||i(l.sourceEvent,a))}}function B2({zoomPanValues:t,panOnDrag:r,onPaneContextMenu:i,onTransformChange:l,onPanZoom:a}){return u=>{var d,f;t.usedRightMouseButton=!!(i&&Vg(r,t.mouseButton??0)),(d=u.sourceEvent)!=null&&d.sync||l([u.transform.x,u.transform.y,u.transform.k]),a&&!((f=u.sourceEvent)!=null&&f.internal)&&(a==null||a(u.sourceEvent,bl(u.transform)))}}function W2({zoomPanValues:t,panOnDrag:r,panOnScroll:i,onDraggingChange:l,onPanZoomEnd:a,onPaneContextMenu:u}){return d=>{var f;if(!((f=d.sourceEvent)!=null&&f.internal)&&(t.isZoomingOrPanning=!1,u&&Vg(r,t.mouseButton??0)&&!t.usedRightMouseButton&&d.sourceEvent&&u(d.sourceEvent),t.usedRightMouseButton=!1,l(!1),a)){const h=bl(d.transform);t.prevViewport=h,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{a==null||a(d.sourceEvent,h)},i?150:0)}}}function U2({zoomActivationKeyPressed:t,zoomOnScroll:r,zoomOnPinch:i,panOnDrag:l,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(!l&&!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||!l&&(g.type==="mousedown"||g.type==="touchstart")||Array.isArray(l)&&!l.includes(g.button)&&g.type==="mousedown")return!1;const C=Array.isArray(l)&&l.includes(g.button)||!g.button||g.button<=1;return(!g.ctrlKey||S)&&C}}function Y2({domNode:t,minZoom:r,maxZoom:i,translateExtent:l,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=hg().scaleExtent([r,i]).translateExtent(l),y=Mt(t).call(g);I({x:a.x,y:a.y,zoom:uo(a.zoom,r,i)},[[0,0],[v.width,v.height]],l);const w=y.on("wheel.zoom"),S=y.on("dblclick.zoom");g.wheelDelta(Hg);async function C(V,H){return y?new Promise(ee=>{g==null||g.interpolate((H==null?void 0:H.interpolate)==="linear"?fi:il).transform($u(y,H==null?void 0:H.duration,H==null?void 0:H.ease,()=>ee(!0)),V)}):!1}function k({noWheelClassName:V,noPanClassName:H,onPaneContextMenu:ee,userSelectionActive:z,panOnScroll:U,panOnDrag:D,panOnScrollMode:W,panOnScrollSpeed:L,preventScrolling:T,zoomOnPinch:F,zoomOnScroll:b,zoomOnDoubleClick:j,zoomActivationKeyPressed:te,lib:oe,onTransformChange:ae,connectionInProgress:ce,paneClickDistance:ue,selectionOnDrag:Z}){z&&!m.isZoomingOrPanning&&_();const se=U&&!te&&!z;g.clickDistance(Z?1/0:!Yt(ue)||ue<0?0:ue);const ge=se?F2({zoomPanValues:m,noWheelClassName:V,d3Selection:y,d3Zoom:g,panOnScrollMode:W,panOnScrollSpeed:L,zoomOnPinch:F,onPanZoomStart:d,onPanZoom:u,onPanZoomEnd:f}):V2({noWheelClassName:V,preventScrolling:T,d3ZoomHandler:w});y.on("wheel.zoom",ge,{passive:!1});const we=H2({zoomPanValues:m,onDraggingChange:h,onPanZoomStart:d});g.on("start",we);const ve=B2({zoomPanValues:m,panOnDrag:D,onPaneContextMenu:!!ee,onPanZoom:u,onTransformChange:ae});g.on("zoom",ve);const me=W2({zoomPanValues:m,panOnDrag:D,panOnScroll:U,onPaneContextMenu:ee,onPanZoomEnd:f,onDraggingChange:h});g.on("end",me);const Ee=U2({zoomActivationKeyPressed:te,panOnDrag:D,zoomOnScroll:b,panOnScroll:U,zoomOnDoubleClick:j,zoomOnPinch:F,userSelectionActive:z,noPanClassName:H,noWheelClassName:V,lib:oe,connectionInProgress:ce});g.filter(Ee),j?y.on("dblclick.zoom",S):y.on("dblclick.zoom",null)}function _(){g.on("zoom",null)}async function I(V,H,ee){const z=Au(V),U=g==null?void 0:g.constrain()(z,H,ee);return U&&await C(U),U}async function E(V,H){const ee=Au(V);return await C(ee,H),ee}function M(V){if(y){const H=Au(V),ee=y.property("__zoom");(ee.k!==V.zoom||ee.x!==V.x||ee.y!==V.y)&&(g==null||g.transform(y,H,null,{sync:!0}))}}function O(){const V=y?pg(y.node()):{x:0,y:0,k:1};return{x:V.x,y:V.y,zoom:V.k}}async function A(V,H){return y?new Promise(ee=>{g==null||g.interpolate((H==null?void 0:H.interpolate)==="linear"?fi:il).scaleTo($u(y,H==null?void 0:H.duration,H==null?void 0:H.ease,()=>ee(!0)),V)}):!1}async function B(V,H){return y?new Promise(ee=>{g==null||g.interpolate((H==null?void 0:H.interpolate)==="linear"?fi:il).scaleBy($u(y,H==null?void 0:H.duration,H==null?void 0:H.ease,()=>ee(!0)),V)}):!1}function X(V){g==null||g.scaleExtent(V)}function q(V){g==null||g.translateExtent(V)}function J(V){const H=!Yt(V)||V<0?0:V;g==null||g.clickDistance(H)}return{update:k,destroy:_,setViewport:E,setViewportConstrained:I,getViewport:O,scaleTo:A,scaleBy:B,setScaleExtent:X,setTranslateExtent:q,syncViewport:M,setClickDistance:J}}var po;(function(t){t.Line="line",t.Handle="handle"})(po||(po={}));function X2({width:t,prevWidth:r,height:i,prevHeight:l,affectsX:a,affectsY:u}){const d=t-r,f=i-l,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 Bp(t){const r=t.includes("right")||t.includes("left"),i=t.includes("bottom")||t.includes("top"),l=t.includes("left"),a=t.includes("top");return{isHorizontal:r,isVertical:i,affectsX:l,affectsY:a}}function Yn(t,r){return Math.max(0,r-t)}function Xn(t,r){return Math.max(0,t-r)}function tl(t,r,i){return Math.max(0,r-t,t-i)}function Wp(t,r){return t?!r:r}function G2(t,r,i,l,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:_,maxHeight:I}=l,{x:E,y:M,width:O,height:A,aspectRatio:B}=t;let X=Math.floor(v?w-t.pointerX:0),q=Math.floor(g?S-t.pointerY:0);const J=O+(h?-X:X),V=A+(m?-q:q),H=-u[0]*O,ee=-u[1]*A;let z=tl(J,C,k),U=tl(V,_,I);if(d){let L=0,T=0;h&&X<0?L=Yn(E+X+H,d[0][0]):!h&&X>0&&(L=Xn(E+J+H,d[1][0])),m&&q<0?T=Yn(M+q+ee,d[0][1]):!m&&q>0&&(T=Xn(M+V+ee,d[1][1])),z=Math.max(z,L),U=Math.max(U,T)}if(f){let L=0,T=0;h&&X>0?L=Xn(E+X,f[0][0]):!h&&X<0&&(L=Yn(E+J,f[1][0])),m&&q>0?T=Xn(M+q,f[0][1]):!m&&q<0&&(T=Yn(M+V,f[1][1])),z=Math.max(z,L),U=Math.max(U,T)}if(a){if(v){const L=tl(J/B,_,I)*B;if(z=Math.max(z,L),d){let T=0;!h&&!m||h&&!m&&y?T=Xn(M+ee+J/B,d[1][1])*B:T=Yn(M+ee+(h?X:-X)/B,d[0][1])*B,z=Math.max(z,T)}if(f){let T=0;!h&&!m||h&&!m&&y?T=Yn(M+J/B,f[1][1])*B:T=Xn(M+(h?X:-X)/B,f[0][1])*B,z=Math.max(z,T)}}if(g){const L=tl(V*B,C,k)/B;if(U=Math.max(U,L),d){let T=0;!h&&!m||m&&!h&&y?T=Xn(E+V*B+H,d[1][0])/B:T=Yn(E+(m?q:-q)*B+H,d[0][0])/B,U=Math.max(U,T)}if(f){let T=0;!h&&!m||m&&!h&&y?T=Yn(E+V*B,f[1][0])/B:T=Xn(E+(m?q:-q)*B,f[0][0])/B,U=Math.max(U,T)}}}q=q+(q<0?U:-U),X=X+(X<0?z:-z),a&&(y?J>V*B?q=(Wp(h,m)?-X:X)/B:X=(Wp(h,m)?-q:q)*B:v?(q=X/B,m=h):(X=q*B,h=m));const D=h?E+X:E,W=m?M+q:M;return{width:O+(h?-X:X),height:A+(m?-q:q),x:u[0]*X*(h?-1:1)+D,y:u[1]*q*(m?-1:1)+W}}const Bg={width:0,height:0,x:0,y:0},Q2={...Bg,pointerX:0,pointerY:0,aspectRatio:1};function q2(t,r,i){const l=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[[l-f,a-h],[l+u-f,a+d-h]]}function K2({domNode:t,nodeId:r,getStoreItems:i,onChange:l,onEnd:a}){const u=Mt(t);let d={controlDirection:Bp("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 _={...Bg},I={...Q2};d={boundaries:v,resizeDirection:y,keepAspectRatio:g,controlDirection:Bp(m)};let E,M=null,O=[],A,B,X,q=!1;const J=Jh().on("start",V=>{const{nodeLookup:H,transform:ee,snapGrid:z,snapToGrid:U,nodeOrigin:D,paneDomNode:W}=i();if(E=H.get(r),!E)return;M=(W==null?void 0:W.getBoundingClientRect())??null;const{xSnapped:L,ySnapped:T}=pi(V.sourceEvent,{transform:ee,snapGrid:z,snapToGrid:U,containerBounds:M});_={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},I={..._,pointerX:L,pointerY:T,aspectRatio:_.width/_.height},A=void 0,B=_r(E.extent)?E.extent:void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(A=H.get(E.parentId)),A&&E.extent==="parent"&&(B=[[0,0],[A.measured.width,A.measured.height]]),O=[],X=void 0;for(const[F,b]of H)if(b.parentId===r&&(O.push({id:F,position:{...b.position},extent:b.extent}),b.extent==="parent"||b.expandParent)){const j=q2(b,E,b.origin??D);X?X=[[Math.min(j[0][0],X[0][0]),Math.min(j[0][1],X[0][1])],[Math.max(j[1][0],X[1][0]),Math.max(j[1][1],X[1][1])]]:X=j}w==null||w(V,{..._})}).on("drag",V=>{const{transform:H,snapGrid:ee,snapToGrid:z,nodeOrigin:U}=i(),D=pi(V.sourceEvent,{transform:H,snapGrid:ee,snapToGrid:z,containerBounds:M}),W=[];if(!E)return;const{x:L,y:T,width:F,height:b}=_,j={},te=E.origin??U,{width:oe,height:ae,x:ce,y:ue}=G2(I,d.controlDirection,D,d.boundaries,d.keepAspectRatio,te,B,X),Z=oe!==F,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:_.x,j.y=we?ue:_.y,_.x=j.x,_.y=j.y,O.length>0)){const Me=ce-L,Ie=ue-T;for(const Re of O)Re.position={x:Re.position.x-Me+te[0]*(oe-F),y:Re.position.y-Ie+te[1]*(ae-b)},W.push(Re)}if((Z||se)&&(j.width=Z&&(!d.resizeDirection||d.resizeDirection==="horizontal")?oe:_.width,j.height=se&&(!d.resizeDirection||d.resizeDirection==="vertical")?ae:_.height,_.width=j.width,_.height=j.height),A&&E.expandParent){const Me=te[0]*(j.width??0);j.x&&j.x<Me&&(_.x=Me,I.x=I.x-(j.x-Me));const Ie=te[1]*(j.height??0);j.y&&j.y<Ie&&(_.y=Ie,I.y=I.y-(j.y-Ie))}const ve=X2({width:_.width,prevWidth:F,height:_.height,prevHeight:b,affectsX:d.controlDirection.affectsX,affectsY:d.controlDirection.affectsY}),me={..._,direction:ve};(k==null?void 0:k(V,me))!==!1&&(q=!0,S==null||S(V,me),l(j,W))}).on("end",V=>{q&&(C==null||C(V,{..._}),a==null||a({..._}),q=!1)});u.call(J)}function h(){u.on(".drag",null)}return{update:f,destroy:h}}var Du={exports:{}},Ou={},Fu={exports:{}},Vu={};/**
|
|
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 Up;function Z2(){if(Up)return Vu;Up=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,l=t.useState,a=t.useEffect,u=t.useLayoutEffect,d=t.useDebugValue;function f(g,y){var w=y(),S=l({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 Vu.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v,Vu}var Yp;function J2(){return Yp||(Yp=1,Fu.exports=Z2()),Fu.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 Xp;function eS(){if(Xp)return Ou;Xp=1;var t=Ei(),r=J2();function i(m,v){return m===v&&(m!==0||1/m===1/v)||m!==m&&v!==v}var l=typeof Object.is=="function"?Object.is:i,a=r.useSyncExternalStore,u=t.useRef,d=t.useEffect,f=t.useMemo,h=t.useDebugValue;return Ou.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 _(A){if(!I){if(I=!0,E=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,l(E,A))return B;var X=y(A);return w!==void 0&&w(B,X)?(E=A,B):(E=A,M=X)}var I=!1,E,M,O=g===void 0?null:g;return[function(){return _(v())},O===null?void 0:function(){return _(O())}]},[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},Ou}var Gp;function tS(){return Gp||(Gp=1,Du.exports=eS()),Du.exports}var nS=tS();const rS=Mh(nS),oS={},Qp=t=>{let r;const i=new Set,l=(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:l,getState:a,getInitialState:()=>m,subscribe:v=>(i.add(v),()=>i.delete(v)),destroy:()=>{(oS?"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(l,a,h);return h},iS=t=>t?Qp(t):Qp,{useDebugValue:sS}=hy,{useSyncExternalStoreWithSelector:lS}=rS,aS=t=>t;function Wg(t,r=aS,i){const l=lS(t.subscribe,t.getState,t.getServerState||t.getInitialState,r,i);return sS(l),l}const qp=(t,r)=>{const i=iS(t),l=(a,u=r)=>Wg(i,a,u);return Object.assign(l,i),l},uS=(t,r)=>t?qp(t,r):qp;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[l,a]of t)if(!Object.is(a,r.get(l)))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(const l of t)if(!r.has(l))return!1;return!0}const i=Object.keys(t);if(i.length!==Object.keys(r).length)return!1;for(const l of i)if(!Object.prototype.hasOwnProperty.call(r,l)||!Object.is(t[l],r[l]))return!1;return!0}Ph();const Ml=G.createContext(null),cS=Ml.Provider,Ug=Gt.error001("react");function be(t,r){const i=G.useContext(Ml);if(i===null)throw new Error(Ug);return Wg(i,t,r)}function Fe(){const t=G.useContext(Ml);if(t===null)throw new Error(Ug);return G.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const Kp={display:"none"},dS={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Yg="react-flow__node-desc",Xg="react-flow__edge-desc",fS="react-flow__aria-live",pS=t=>t.ariaLiveMessage,hS=t=>t.ariaLabelConfig;function gS({rfId:t}){const r=be(pS);return N.jsx("div",{id:`${fS}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:dS,children:r})}function mS({rfId:t,disableKeyboardA11y:r}){const i=be(hS);return N.jsxs(N.Fragment,{children:[N.jsx("div",{id:`${Yg}-${t}`,style:Kp,children:r?i["node.a11yDescription.default"]:i["node.a11yDescription.keyboardDisabled"]}),N.jsx("div",{id:`${Xg}-${t}`,style:Kp,children:i["edge.a11yDescription.default"]}),!r&&N.jsx(gS,{rfId:t})]})}const Pl=G.forwardRef(({position:t="top-left",children:r,className:i,style:l,...a},u)=>{const d=`${t}`.split("-");return N.jsx("div",{className:Xe(["react-flow__panel",i,...d]),style:l,ref:u,...a,children:r})});Pl.displayName="Panel";function yS({proOptions:t,position:r="bottom-right"}){return t!=null&&t.hideAttribution?null:N.jsx(Pl,{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:N.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const vS=t=>{const r=[],i=[];for(const[,l]of t.nodeLookup)l.selected&&r.push(l.internals.userNode);for(const[,l]of t.edgeLookup)l.selected&&i.push(l);return{selectedNodes:r,selectedEdges:i}},nl=t=>t.id;function xS(t,r){return Oe(t.selectedNodes.map(nl),r.selectedNodes.map(nl))&&Oe(t.selectedEdges.map(nl),r.selectedEdges.map(nl))}function wS({onSelectionChange:t}){const r=Fe(),{selectedNodes:i,selectedEdges:l}=be(vS,xS);return G.useEffect(()=>{const a={nodes:i,edges:l};t==null||t(a),r.getState().onSelectionChangeHandlers.forEach(u=>u(a))},[i,l,t]),null}const SS=t=>!!t.onSelectionChangeHandlers;function kS({onSelectionChange:t}){const r=be(SS);return t||r?N.jsx(wS,{onSelectionChange:t}):null}const Gg=[0,0],_S={x:0,y:0,zoom:1},ES=["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"],Zp=[...ES,"rfId"],NS=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}),Jp={translateExtent:xi,nodeOrigin:Gg,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function CS(t){const{setNodes:r,setEdges:i,setMinZoom:l,setMaxZoom:a,setTranslateExtent:u,setNodeExtent:d,reset:f,setDefaultNodesAndEdges:h}=be(NS,Oe),m=Fe();G.useEffect(()=>(h(t.defaultNodes,t.defaultEdges),()=>{v.current=Jp,f()}),[]);const v=G.useRef(Jp);return G.useEffect(()=>{for(const g of Zp){const y=t[g],w=v.current[g];y!==w&&(typeof t[g]>"u"||(g==="nodes"?r(y):g==="edges"?i(y):g==="minZoom"?l(y):g==="maxZoom"?a(y):g==="translateExtent"?u(y):g==="nodeExtent"?d(y):g==="ariaLabelConfig"?m.setState({ariaLabelConfig:c2(y)}):g==="fitView"?m.setState({fitViewQueued:y}):g==="fitViewOptions"?m.setState({fitViewOptions:y}):m.setState({[g]:y})))}v.current=t},Zp.map(g=>t[g])),null}function eh(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function bS(t){var l;const[r,i]=G.useState(t==="system"?null:t);return G.useEffect(()=>{if(t!=="system"){i(t);return}const a=eh(),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:(l=eh())!=null&&l.matches?"dark":"light"}const th=typeof document<"u"?document:null;function _i(t=null,r={target:th,actInsideInputWithModifier:!0}){const[i,l]=G.useState(!1),a=G.useRef(!1),u=G.useRef(new Set([])),[d,f]=G.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 G.useEffect(()=>{const h=(r==null?void 0:r.target)??th,m=(r==null?void 0:r.actInsideInputWithModifier)??!0;if(t!==null){const v=w=>{var k,_;if(a.current=w.ctrlKey||w.metaKey||w.shiftKey||w.altKey,(!a.current||a.current&&!m)&&bg(w))return!1;const C=rh(w.code,f);if(u.current.add(w[C]),nh(d,u.current,!1)){const I=((_=(k=w.composedPath)==null?void 0:k.call(w))==null?void 0:_[0])||w.target,E=(I==null?void 0:I.nodeName)==="BUTTON"||(I==null?void 0:I.nodeName)==="A";r.preventDefault!==!1&&(a.current||!E)&&w.preventDefault(),l(!0)}},g=w=>{const S=rh(w.code,f);nh(d,u.current,!0)?(l(!1),u.current.clear()):u.current.delete(w[S]),w.key==="Meta"&&u.current.clear(),a.current=!1},y=()=>{u.current.clear(),l(!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,l]),i}function nh(t,r,i){return t.filter(l=>i||l.length===r.size).some(l=>l.every(a=>r.has(a)))}function rh(t,r){return r.includes(t)?"code":"key"}const MS=()=>{const t=Fe();return G.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:l}=t.getState();return l?l.scaleTo(r,i):!1},getZoom:()=>t.getState().transform[2],setViewport:async(r,i)=>{const{transform:[l,a,u],panZoom:d}=t.getState();return d?(await d.setViewport({x:r.x??l,y:r.y??a,zoom:r.zoom??u},i),!0):!1},getViewport:()=>{const[r,i,l]=t.getState().transform;return{x:r,y:i,zoom:l}},setCenter:async(r,i,l)=>t.getState().setCenter(r,i,l),fitBounds:async(r,i)=>{const{width:l,height:a,minZoom:u,maxZoom:d,panZoom:f}=t.getState(),h=wc(r,l,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:l,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,l,g,v)},flowToScreenPosition:r=>{const{transform:i,domNode:l}=t.getState();if(!l)return r;const{x:a,y:u}=l.getBoundingClientRect(),d=fo(r,i);return{x:d.x+a,y:d.y+u}}}),[])};function Qg(t,r){const i=[],l=new Map,a=[];for(const u of t)if(u.type==="add"){a.push(u);continue}else if(u.type==="remove"||u.type==="replace")l.set(u.id,[u]);else{const d=l.get(u.id);d?d.push(u):l.set(u.id,[u])}for(const u of r){const d=l.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)PS(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 PS(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 zS(t,r){return Qg(t,r)}function IS(t,r){return Qg(t,r)}function mr(t,r){return{id:t,type:"select",selected:r}}function no(t,r=new Set,i=!1){const l=[];for(const[a,u]of t){const d=r.has(a);!(u.selected===void 0&&!d)&&u.selected!==d&&(i&&(u.selected=d),l.push(mr(u.id,d)))}return l}function oh({items:t=[],lookup:r}){var a;const i=[],l=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)l.get(u)===void 0&&i.push({id:u,type:"remove"});return i}function ih(t){return{id:t.id,type:"remove"}}const TS=_g();function jS(t,r,i={}){return m2(t,r,{...i,onError:i.onError??TS})}const sh=t=>t2(t),RS=t=>xg(t);function qg(t){return G.forwardRef(t)}const LS=typeof window<"u"?G.useLayoutEffect:G.useEffect;function lh(t){const[r,i]=G.useState(BigInt(0)),[l]=G.useState(()=>AS(()=>i(a=>a+BigInt(1))));return LS(()=>{const a=l.get();a.length&&(t(a),l.reset())},[r]),l}function AS(t){let r=[];return{get:()=>r,reset:()=>{r=[]},push:i=>{r.push(i),t()}}}const Kg=G.createContext(null);function $S({children:t}){const r=Fe(),i=G.useCallback(f=>{const{nodes:h=[],setNodes:m,hasDefaultNodes:v,onNodesChange:g,nodeLookup:y,fitViewQueued:w,onNodesChangeMiddlewareMap:S}=r.getState();let C=h;for(const _ of f)C=typeof _=="function"?_(C):_;let k=oh({items:C,lookup:y});for(const _ of S.values())k=_(k);v&&m(C),k.length>0?g==null||g(k):w&&window.requestAnimationFrame(()=>{const{fitViewQueued:_,nodes:I,setNodes:E}=r.getState();_&&E(I)})},[]),l=lh(i),a=G.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(oh({items:w,lookup:y}))},[]),u=lh(a),d=G.useMemo(()=>({nodeQueue:l,edgeQueue:u}),[]);return N.jsx(Kg.Provider,{value:d,children:t})}function DS(){const t=G.useContext(Kg);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const OS=t=>!!t.panZoom;function bc(){const t=MS(),r=Fe(),i=DS(),l=be(OS),a=G.useMemo(()=>{const u=g=>r.getState().nodeLookup.get(g),d=g=>{i.nodeQueue.push(g)},f=g=>{i.edgeQueue.push(g)},h=g=>{var _,I;const{nodeLookup:y,nodeOrigin:w}=r.getState(),S=sh(g)?g:y.get(g.id),C=S.parentId?Ng(S.position,S.measured,S.parentId,y,w):S.position,k={...S,position:C,width:((_=S.measured)==null?void 0:_.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&&sh(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&&RS(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(_=>({..._})),edges:y.map(_=>({..._})),viewport:{x:S,y:C,zoom:k}}},deleteElements:async({nodes:g=[],edges:y=[]})=>{const{nodes:w,edges:S,onNodesDelete:C,onEdgesDelete:k,triggerNodeChanges:_,triggerEdgeChanges:I,onDelete:E,onBeforeDelete:M}=r.getState(),{nodes:O,edges:A}=await s2({nodesToRemove:g,edgesToRemove:y,nodes:w,edges:S,onBeforeDelete:M}),B=A.length>0,X=O.length>0;if(B){const q=A.map(ih);k==null||k(A),I(q)}if(X){const q=O.map(ih);C==null||C(O),_(q)}return(X||B)&&(E==null||E({nodes:O,edges:A})),{deletedNodes:O,deletedEdges:A}},getIntersectingNodes:(g,y=!0,w)=>{const S=Tp(g),C=S?g:h(g),k=w!==void 0;return C?(w||r.getState().nodes).filter(_=>{const I=r.getState().nodeLookup.get(_.id);if(I&&!S&&(_.id===g.id||!I.internals.positionAbsolute))return!1;const E=co(k?_:I),M=Si(E,C);return y&&M>0||M>=E.width*E.height||M>=C.width*C.height}):[]},isNodeIntersecting:(g,y,w=!0)=>{const C=Tp(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 n2(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??u2();return r.setState({fitViewQueued:!0,fitViewOptions:g,fitViewResolver:y}),i.nodeQueue.push(w=>[...w]),y.promise}}},[]);return G.useMemo(()=>({...a,...t,viewportInitialized:l}),[l])}const ah=t=>t.selected,FS=typeof window<"u"?window:void 0;function VS({deleteKeyCode:t,multiSelectionKeyCode:r}){const i=Fe(),{deleteElements:l}=bc(),a=_i(t,{actInsideInputWithModifier:!1}),u=_i(r,{target:FS});G.useEffect(()=>{if(a){const{edges:d,nodes:f}=i.getState();l({nodes:f.filter(ah),edges:d.filter(ah)}),i.setState({nodesSelectionActive:!1})}},[a]),G.useEffect(()=>{i.setState({multiSelectionActive:u})},[u])}function HS(t){const r=Fe();G.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 l=Sc(t.current);(l.height===0||l.width===0)&&((f=(d=r.getState()).onError)==null||f.call(d,"004",Gt.error004())),r.setState({width:l.width||500,height:l.height||500})};if(t.current){i(),window.addEventListener("resize",i);const l=new ResizeObserver(()=>i());return l.observe(t.current),()=>{window.removeEventListener("resize",i),l&&t.current&&l.unobserve(t.current)}}},[])}const zl={position:"absolute",width:"100%",height:"100%",top:0,left:0},BS=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function WS({onPaneContextMenu:t,zoomOnScroll:r=!0,zoomOnPinch:i=!0,panOnScroll:l=!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:_,isControlledViewport:I,paneClickDistance:E,selectionOnDrag:M}){const O=Fe(),A=G.useRef(null),{userSelectionActive:B,lib:X,connectionInProgress:q}=be(BS,Oe),J=_i(y),V=G.useRef();HS(A);const H=G.useCallback(ee=>{_==null||_({x:ee[0],y:ee[1],zoom:ee[2]}),I||O.setState({transform:ee})},[_,I]);return G.useEffect(()=>{if(A.current){V.current=Y2({domNode:A.current,minZoom:v,maxZoom:g,translateExtent:m,viewport:h,onDraggingChange:D=>O.setState(W=>W.paneDragging===D?W:{paneDragging:D}),onPanZoomStart:(D,W)=>{const{onViewportChangeStart:L,onMoveStart:T}=O.getState();T==null||T(D,W),L==null||L(W)},onPanZoom:(D,W)=>{const{onViewportChange:L,onMove:T}=O.getState();T==null||T(D,W),L==null||L(W)},onPanZoomEnd:(D,W)=>{const{onViewportChangeEnd:L,onMoveEnd:T}=O.getState();T==null||T(D,W),L==null||L(W)}});const{x:ee,y:z,zoom:U}=V.current.getViewport();return O.setState({panZoom:V.current,transform:[ee,z,U],domNode:A.current.closest(".react-flow")}),()=>{var D;(D=V.current)==null||D.destroy()}}},[]),G.useEffect(()=>{var ee;(ee=V.current)==null||ee.update({onPaneContextMenu:t,zoomOnScroll:r,zoomOnPinch:i,panOnScroll:l,panOnScrollSpeed:a,panOnScrollMode:u,zoomOnDoubleClick:d,panOnDrag:f,zoomActivationKeyPressed:J,preventScrolling:w,noPanClassName:k,userSelectionActive:B,noWheelClassName:C,lib:X,onTransformChange:H,connectionInProgress:q,selectionOnDrag:M,paneClickDistance:E})},[t,r,i,l,a,u,d,f,J,w,k,B,C,X,H,q,M,E]),N.jsx("div",{className:"react-flow__renderer",ref:A,style:zl,children:S})}const US=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function YS(){const{userSelectionActive:t,userSelectionRect:r}=be(US,Oe);return t&&r?N.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 Hu=(t,r)=>i=>{i.target===r.current&&(t==null||t(i))},XS=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging,panBy:t.panBy,autoPanSpeed:t.autoPanSpeed});function GS({isSelecting:t,selectionKeyPressed:r,selectionMode:i=wi.Full,panOnDrag:l,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=G.useRef(0),_=Fe(),{userSelectionActive:I,elementsSelectable:E,dragging:M,connectionInProgress:O,panBy:A,autoPanSpeed:B}=be(XS,Oe),X=E&&(t||I),q=G.useRef(null),J=G.useRef(),V=G.useRef(new Set),H=G.useRef(new Set),ee=G.useRef(!1),z=G.useRef({x:0,y:0}),U=G.useRef(!1),D=Z=>{if(ee.current||O){ee.current=!1;return}m==null||m(Z),_.getState().resetSelectedElements(),_.setState({nodesSelectionActive:!1})},W=Z=>{if(Array.isArray(l)&&(l!=null&&l.includes(2))){Z.preventDefault();return}v==null||v(Z)},L=g?Z=>g(Z):void 0,T=Z=>{ee.current&&(Z.stopPropagation(),ee.current=!1)},F=Z=>{var Re,ut;const{domNode:se,transform:ge}=_.getState();if(J.current=se==null?void 0:se.getBoundingClientRect(),!J.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),ee.current=!1;const{x:Ee,y:Me}=Xt(Z.nativeEvent,J.current),Ie=go({x:Ee,y:Me},ge);_.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}=_.getState();if(!ge)return;const{transform:we,nodeLookup:ve,edgeLookup:me,connectionLookup:Ee,triggerNodeChanges:Me,triggerEdgeChanges:Ie,defaultEdgeOptions:Re}=_.getState(),ut={x:ge.startX,y:ge.startY},{x:ft,y:tt}=fo(ut,we),nt={startX:ut.x,startY:ut.y,x:Z<ft?Z:ft,y:se<tt?se:tt,width:Math.abs(Z-ft),height:Math.abs(se-tt)},ln=V.current,qt=H.current;V.current=new Set(vc(ve,nt,we,i===wi.Partial,!0).map(pt=>pt.id)),H.current=new Set;const Kt=(Re==null?void 0:Re.selectable)??!0;for(const pt of V.current){const zt=Ee.get(pt);if(zt)for(const{edgeId:St}of zt.values()){const It=me.get(St);It&&(It.selectable??Kt)&&H.current.add(St)}}if(!jp(ln,V.current)){const pt=no(ve,V.current,!0);Me(pt)}if(!jp(qt,H.current)){const pt=no(me,H.current);Ie(pt)}_.setState({userSelectionRect:nt,userSelectionActive:!0,nodesSelectionActive:!1})}function j(){if(!a||!J.current)return;const[Z,se]=xc(z.current,J.current,B);A({x:Z,y:se}).then(ge=>{if(!ee.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};G.useEffect(()=>()=>te(),[]);const oe=Z=>{const{userSelectionRect:se,transform:ge,resetSelectedElements:we}=_.getState();if(!J.current||!se)return;const{x:ve,y:me}=Xt(Z.nativeEvent,J.current);z.current={x:ve,y:me};const Ee=fo({x:se.startX,y:se.startY},ge);if(!ee.current){const Me=r?0:u;if(Math.hypot(ve-Ee.x,me-Ee.y)<=Me)return;we(),f==null||f(Z)}ee.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&&_.getState().userSelectionRect&&(D==null||D(Z)),_.setState({userSelectionActive:!1,userSelectionRect:null}),ee.current&&(h==null||h(Z),_.setState({nodesSelectionActive:V.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=l===!0||Array.isArray(l)&&l.includes(0);return N.jsxs("div",{className:Xe(["react-flow__pane",{draggable:ue,dragging:M,selection:t}]),onClick:X?void 0:Hu(D,q),onContextMenu:Hu(W,q),onWheel:Hu(L,q),onPointerEnter:X?void 0:y,onPointerMove:X?oe:w,onPointerUp:X?ae:void 0,onPointerCancel:X?ce:void 0,onPointerDownCapture:X?F:void 0,onClickCapture:X?T:void 0,onPointerLeave:S,ref:q,style:zl,children:[C,N.jsx(YS,{})]})}function ac({id:t,store:r,unselect:i=!1,nodeRef:l}){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=l==null?void 0:l.current)==null?void 0:v.blur()})):a([t])}function Zg({nodeRef:t,disabled:r=!1,noDragClassName:i,handleSelector:l,nodeId:a,isSelectable:u,nodeClickDistance:d}){const f=Fe(),[h,m]=G.useState(!1),v=G.useRef();return G.useEffect(()=>{v.current=T2({getStoreItems:()=>f.getState(),onNodeMouseDown:g=>{ac({id:g,store:f,nodeRef:t})},onDragStart:()=>{m(!0)},onDragStop:()=>{m(!1)}})},[]),G.useEffect(()=>{if(!(r||!t.current||!v.current))return v.current.update({noDragClassName:i,handleSelector:l,domNode:t.current,isSelectable:u,nodeId:a,nodeClickDistance:d}),()=>{var g;(g=v.current)==null||g.destroy()}},[i,l,r,u,t,a,d]),h}const QS=t=>r=>r.selected&&(r.draggable||t&&typeof r.draggable>"u");function Jg(){const t=Fe();return G.useCallback(i=>{const{nodeExtent:l,snapToGrid:a,snapGrid:u,nodesDraggable:d,onError:f,updateNodePositions:h,nodeLookup:m,nodeOrigin:v}=t.getState(),g=new Map,y=QS(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[,_]of m){if(!y(_))continue;let I={x:_.internals.positionAbsolute.x+C,y:_.internals.positionAbsolute.y+k};a&&(I=Pi(I,u));const{position:E,positionAbsolute:M}=wg({nodeId:_.id,nextPosition:I,nodeLookup:m,nodeExtent:l,nodeOrigin:v,onError:f});_.position=E,_.internals.positionAbsolute=M,g.set(_.id,_)}h(g)},[])}const Mc=G.createContext(null),qS=Mc.Provider;Mc.Consumer;const em=()=>G.useContext(Mc),KS=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),ZS=(t,r,i)=>l=>{const{connectionClickStartHandle:a,connectionMode:u,connection:d}=l,{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 JS({type:t="source",position:r=xe.Top,isValidConnection:i,isConnectable:l=!0,isConnectableStart:a=!0,isConnectableEnd:u=!0,id:d,onConnect:f,children:h,className:m,onMouseDown:v,onTouchStart:g,...y},w){var U,D;const S=d||null,C=t==="target",k=Fe(),_=em(),{connectOnClick:I,noPanClassName:E,rfId:M}=be(KS,Oe),{connectingFrom:O,connectingTo:A,clickConnecting:B,isPossibleEndHandle:X,connectionInProcess:q,clickConnectionInProcess:J,valid:V}=be(ZS(_,S,t),Oe);_||(D=(U=k.getState()).onError)==null||D.call(U,"010",Gt.error010());const H=W=>{const{defaultEdgeOptions:L,onConnect:T,hasDefaultEdges:F}=k.getState(),b={...L,...W};if(F){const{edges:j,setEdges:te,onError:oe}=k.getState();te(jS(b,j,{onError:oe}))}T==null||T(b),f==null||f(b)},ee=W=>{if(!_)return;const L=Mg(W.nativeEvent);if(a&&(L&&W.button===0||!L)){const T=k.getState();lc.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:_,flowId:T.rfId,panBy:T.panBy,cancelConnection:T.cancelConnection,onConnectStart:T.onConnectStart,onConnectEnd:(...F)=>{var b,j;return(j=(b=k.getState()).onConnectEnd)==null?void 0:j.call(b,...F)},updateConnection:T.updateConnection,onConnect:H,isValidConnection:i||((...F)=>{var b,j;return((j=(b=k.getState()).isValidConnection)==null?void 0:j.call(b,...F))??!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:F,connectionMode:b,isValidConnection:j,lib:te,rfId:oe,nodeLookup:ae,connection:ce}=k.getState();if(!_||!F&&!a)return;if(!F){L==null||L(W.nativeEvent,{nodeId:_,handleId:S,handleType:t}),k.setState({connectionClickStartHandle:{nodeId:_,type:t,id:S}});return}const ue=Cg(W.target),Z=i||j,{connection:se,isValid:ge}=lc.isValid(W.nativeEvent,{handle:{nodeId:_,id:S,type:t},connectionMode:b,fromNodeId:F.nodeId,fromHandleId:F.id||null,fromType:F.type,isValidConnection:Z,flowId:oe,doc:ue,lib:te,nodeLookup:ae});ge&&se&&H(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 N.jsx("div",{"data-handleid":S,"data-nodeid":_,"data-handlepos":r,"data-id":`${M}-${_}-${S}-${t}`,className:Xe(["react-flow__handle",`react-flow__handle-${r}`,"nodrag",E,m,{source:!C,target:C,connectable:l,connectablestart:a,connectableend:u,clickconnecting:B,connectingfrom:O,connectingto:A,valid:V,connectionindicator:l&&(!q||X)&&(q||J?u:a)}]),onMouseDown:ee,onTouchStart:ee,onClick:I?z:void 0,ref:w,...y,children:h})}const vl=G.memo(qg(JS));function ek({data:t,isConnectable:r,sourcePosition:i=xe.Bottom}){return N.jsxs(N.Fragment,{children:[t==null?void 0:t.label,N.jsx(vl,{type:"source",position:i,isConnectable:r})]})}function tk({data:t,isConnectable:r,targetPosition:i=xe.Top,sourcePosition:l=xe.Bottom}){return N.jsxs(N.Fragment,{children:[N.jsx(vl,{type:"target",position:i,isConnectable:r}),t==null?void 0:t.label,N.jsx(vl,{type:"source",position:l,isConnectable:r})]})}function nk(){return null}function rk({data:t,isConnectable:r,targetPosition:i=xe.Top}){return N.jsxs(N.Fragment,{children:[N.jsx(vl,{type:"target",position:i,isConnectable:r}),t==null?void 0:t.label]})}const xl={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},uh={input:ek,default:tk,output:rk,group:nk};function ok(t){var r,i,l,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??((l=t.style)==null?void 0:l.width),height:t.height??((a=t.style)==null?void 0:a.height)}}const ik=t=>{const{width:r,height:i,x:l,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(${l}px,${a}px)`}};function sk({onSelectionContextMenu:t,noPanClassName:r,disableKeyboardA11y:i}){const l=Fe(),{width:a,height:u,transformString:d,userSelectionActive:f}=be(ik,Oe),h=Jg(),m=G.useRef(null);G.useEffect(()=>{var w;i||(w=m.current)==null||w.focus({preventScroll:!0})},[i]);const v=!f&&a!==null&&u!==null;if(Zg({nodeRef:m,disabled:!v}),!v)return null;const g=t?w=>{const S=l.getState().nodes.filter(C=>C.selected);t(w,S)}:void 0,y=w=>{Object.prototype.hasOwnProperty.call(xl,w.key)&&(w.preventDefault(),h({direction:xl[w.key],factor:w.shiftKey?4:1}))};return N.jsx("div",{className:Xe(["react-flow__nodesselection","react-flow__container",r]),style:{transform:d},children:N.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 ch=typeof window<"u"?window:void 0,lk=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function tm({children:t,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:l,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:_,zoomOnScroll:I,zoomOnPinch:E,panOnScroll:M,panOnScrollSpeed:O,panOnScrollMode:A,zoomOnDoubleClick:B,panOnDrag:X,autoPanOnSelection:q,defaultViewport:J,translateExtent:V,minZoom:H,maxZoom:ee,preventScrolling:z,onSelectionContextMenu:U,noWheelClassName:D,noPanClassName:W,disableKeyboardA11y:L,onViewportChange:T,isControlledViewport:F}){const{nodesSelectionActive:b,userSelectionActive:j}=be(lk,Oe),te=_i(m,{target:ch}),oe=_i(C,{target:ch}),ae=oe||X,ce=oe||M,ue=v&&ae!==!0,Z=te||j||ue;return VS({deleteKeyCode:h,multiSelectionKeyCode:S}),N.jsx(WS,{onPaneContextMenu:u,elementsSelectable:_,zoomOnScroll:I,zoomOnPinch:E,panOnScroll:ce,panOnScrollSpeed:O,panOnScrollMode:A,zoomOnDoubleClick:B,panOnDrag:!te&&ae,defaultViewport:J,translateExtent:V,minZoom:H,maxZoom:ee,zoomActivationKeyCode:k,preventScrolling:z,noWheelClassName:D,noPanClassName:W,onViewportChange:T,isControlledViewport:F,paneClickDistance:f,selectionOnDrag:ue,children:N.jsxs(GS,{onSelectionStart:y,onSelectionEnd:w,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:l,onPaneMouseLeave:a,onPaneContextMenu:u,onPaneScroll:d,panOnDrag:ae,autoPanOnSelection:q,isSelecting:!!Z,selectionMode:g,selectionKeyPressed:te,paneClickDistance:f,selectionOnDrag:ue,children:[t,b&&N.jsx(sk,{onSelectionContextMenu:U,noPanClassName:W,disableKeyboardA11y:L})]})})}tm.displayName="FlowRenderer";const ak=G.memo(tm),uk=t=>r=>t?vc(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 ck(t){return be(G.useCallback(uk(t),[t]),Oe)}const dk=t=>t.updateNodeInternals;function fk(){const t=be(dk),[r]=G.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(i=>{const l=new Map;i.forEach(a=>{const u=a.target.getAttribute("data-id");l.set(u,{id:u,nodeElement:a.target,force:!0})}),t(l)}));return G.useEffect(()=>()=>{r==null||r.disconnect()},[r]),r}function pk({node:t,nodeType:r,hasDimensions:i,resizeObserver:l}){const a=Fe(),u=G.useRef(null),d=G.useRef(null),f=G.useRef(t.sourcePosition),h=G.useRef(t.targetPosition),m=G.useRef(r),v=i&&!!t.internals.handleBounds;return G.useEffect(()=>{u.current&&!t.hidden&&(!v||d.current!==u.current)&&(d.current&&(l==null||l.unobserve(d.current)),l==null||l.observe(u.current),d.current=u.current)},[v,t.hidden]),G.useEffect(()=>()=>{d.current&&(l==null||l.unobserve(d.current),d.current=null)},[]),G.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 hk({id:t,onClick:r,onMouseEnter:i,onMouseMove:l,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:_,onError:I}){const{node:E,internals:M,isParent:O}=be(Z=>{const se=Z.nodeLookup.get(t),ge=Z.parentLookup.has(t);return{node:se,internals:se.internals,isParent:ge}},Oe);let A=E.type||"default",B=(k==null?void 0:k[A])||uh[A];B===void 0&&(I==null||I("003",Gt.error003(A)),A="default",B=(k==null?void 0:k.default)||uh.default);const X=!!(E.draggable||f&&typeof E.draggable>"u"),q=!!(E.selectable||h&&typeof E.selectable>"u"),J=!!(E.connectable||m&&typeof E.connectable>"u"),V=!!(E.focusable||v&&typeof E.focusable>"u"),H=Fe(),ee=Eg(E),z=pk({node:E,nodeType:A,hasDimensions:ee,resizeObserver:g}),U=Zg({nodeRef:z,disabled:E.hidden||!X,noDragClassName:y,handleSelector:E.dragHandle,nodeId:t,isSelectable:q,nodeClickDistance:_}),D=Jg();if(E.hidden)return null;const W=kn(E),L=ok(E),T=q||X||r||i||l||a,F=i?Z=>i(Z,{...M.userNode}):void 0,b=l?Z=>l(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}=H.getState();q&&(!se||!X||ge>0)&&ac({id:t,store:H,nodeRef:z}),r&&r(Z,{...M.userNode})},ce=Z=>{if(!(bg(Z.nativeEvent)||S)){if(gg.includes(Z.key)&&q){const se=Z.key==="Escape";ac({id:t,store:H,unselect:se,nodeRef:z})}else if(X&&E.selected&&Object.prototype.hasOwnProperty.call(xl,Z.key)){Z.preventDefault();const{ariaLabelConfig:se}=H.getState();H.setState({ariaLiveMessage:se["node.a11yDescription.ariaLiveMessage"]({direction:Z.key.replace("Arrow","").toLowerCase(),x:~~M.positionAbsolute.x,y:~~M.positionAbsolute.y})}),D({direction:xl[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}=H.getState();if(!we)return;vc(new Map([[t,E]]),{x:0,y:0,width:se,height:ge},Z,!0).length>0||ve(E.position.x+W.width/2,E.position.y+W.height/2,{zoom:Z[2]})};return N.jsx("div",{className:Xe(["react-flow__node",`react-flow__node-${A}`,{[w]:X},E.className,{selected:E.selected,selectable:q,parent:O,draggable:X,dragging:U}]),ref:z,style:{zIndex:M.z,transform:`translate(${M.positionAbsolute.x}px,${M.positionAbsolute.y}px)`,pointerEvents:T?"all":"none",visibility:ee?"visible":"hidden",...E.style,...L},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:F,onMouseMove:b,onMouseLeave:j,onContextMenu:te,onClick:ae,onDoubleClick:oe,onKeyDown:V?ce:void 0,tabIndex:V?0:void 0,onFocus:V?ue:void 0,role:E.ariaRole??(V?"group":void 0),"aria-roledescription":"node","aria-describedby":S?void 0:`${Yg}-${C}`,"aria-label":E.ariaLabel,...E.domAttributes,children:N.jsx(qS,{value:t,children:N.jsx(B,{id:t,data:E.data,type:A,positionAbsoluteX:M.positionAbsolute.x,positionAbsoluteY:M.positionAbsolute.y,selected:E.selected??!1,selectable:q,draggable:X,deletable:E.deletable??!0,isConnectable:J,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:U,dragHandle:E.dragHandle,zIndex:M.z,parentId:E.parentId,...W})})})}var gk=G.memo(hk);const mk=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function nm(t){const{nodesDraggable:r,nodesConnectable:i,nodesFocusable:l,elementsSelectable:a,onError:u}=be(mk,Oe),d=ck(t.onlyRenderVisibleElements),f=fk();return N.jsx("div",{className:"react-flow__nodes",style:zl,children:d.map(h=>N.jsx(gk,{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:l,elementsSelectable:a,nodeClickDistance:t.nodeClickDistance,onError:u},h))})}nm.displayName="NodeRenderer";const yk=G.memo(nm);function vk(t){return be(G.useCallback(i=>{if(!t)return i.edges.map(a=>a.id);const l=[];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&&p2({sourceNode:u,targetNode:d,width:i.width,height:i.height,transform:i.transform})&&l.push(a.id)}return l},[t]),Oe)}const xk=({color:t="none",strokeWidth:r=1})=>{const i={strokeWidth:r,...t&&{stroke:t}};return N.jsx("polyline",{className:"arrow",style:i,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},wk=({color:t="none",strokeWidth:r=1})=>{const i={strokeWidth:r,...t&&{stroke:t,fill:t}};return N.jsx("polyline",{className:"arrowclosed",style:i,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},dh={[ml.Arrow]:xk,[ml.ArrowClosed]:wk};function Sk(t){const r=Fe();return G.useMemo(()=>{var a,u;return Object.prototype.hasOwnProperty.call(dh,t)?dh[t]:((u=(a=r.getState()).onError)==null||u.call(a,"009",Gt.error009(t)),null)},[t])}const kk=({id:t,type:r,color:i,width:l=12.5,height:a=12.5,markerUnits:u="strokeWidth",strokeWidth:d,orient:f="auto-start-reverse"})=>{const h=Sk(r);return h?N.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${l}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:u,orient:f,refX:"0",refY:"0",children:N.jsx(h,{color:i,strokeWidth:d})}):null},rm=({defaultColor:t,rfId:r})=>{const i=be(u=>u.edges),l=be(u=>u.defaultEdgeOptions),a=G.useMemo(()=>S2(i,{id:r,defaultColor:t,defaultMarkerStart:l==null?void 0:l.markerStart,defaultMarkerEnd:l==null?void 0:l.markerEnd}),[i,l,r,t]);return a.length?N.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:N.jsx("defs",{children:a.map(u=>N.jsx(kk,{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};rm.displayName="MarkerDefinitions";var _k=G.memo(rm);function om({x:t,y:r,label:i,labelStyle:l,labelShowBg:a=!0,labelBgStyle:u,labelBgPadding:d=[2,4],labelBgBorderRadius:f=2,children:h,className:m,...v}){const[g,y]=G.useState({x:1,y:0,width:0,height:0}),w=Xe(["react-flow__edge-textwrapper",m]),S=G.useRef(null);return G.useEffect(()=>{if(S.current){const C=S.current.getBBox();y({x:C.x,y:C.y,width:C.width,height:C.height})}},[i]),i?N.jsxs("g",{transform:`translate(${t-g.width/2} ${r-g.height/2})`,className:w,visibility:g.width?"visible":"hidden",...v,children:[a&&N.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}),N.jsx("text",{className:"react-flow__edge-text",y:g.height/2,dy:"0.3em",ref:S,style:l,children:i}),h]}):null}om.displayName="EdgeText";const Ek=G.memo(om);function Il({path:t,labelX:r,labelY:i,label:l,labelStyle:a,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h,interactionWidth:m=20,...v}){return N.jsxs(N.Fragment,{children:[N.jsx("path",{...v,d:t,fill:"none",className:Xe(["react-flow__edge-path",v.className])}),m?N.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:m,className:"react-flow__edge-interaction"}):null,l&&Yt(r)&&Yt(i)?N.jsx(Ek,{x:r,y:i,label:l,labelStyle:a,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:h}):null]})}function fh({pos:t,x1:r,y1:i,x2:l,y2:a}){return t===xe.Left||t===xe.Right?[.5*(r+l),i]:[r,.5*(i+a)]}function im({sourceX:t,sourceY:r,sourcePosition:i=xe.Bottom,targetX:l,targetY:a,targetPosition:u=xe.Top}){const[d,f]=fh({pos:i,x1:t,y1:r,x2:l,y2:a}),[h,m]=fh({pos:u,x1:l,y1:a,x2:t,y2:r}),[v,g,y,w]=Pg({sourceX:t,sourceY:r,targetX:l,targetY:a,sourceControlX:d,sourceControlY:f,targetControlX:h,targetControlY:m});return[`M${t},${r} C${d},${f} ${h},${m} ${l},${a}`,v,g,y,w]}function sm(t){return G.memo(({id:r,sourceX:i,sourceY:l,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:_})=>{const[I,E,M]=im({sourceX:i,sourceY:l,sourcePosition:d,targetX:a,targetY:u,targetPosition:f}),O=t.isInternal?void 0:r;return N.jsx(Il,{id:O,path:I,labelX:E,labelY:M,label:h,labelStyle:m,labelShowBg:v,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:w,style:S,markerEnd:C,markerStart:k,interactionWidth:_})})}const Nk=sm({isInternal:!1}),lm=sm({isInternal:!0});Nk.displayName="SimpleBezierEdge";lm.displayName="SimpleBezierEdgeInternal";function am(t){return G.memo(({id:r,sourceX:i,sourceY:l,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:_,interactionWidth:I})=>{const[E,M,O]=oc({sourceX:i,sourceY:l,sourcePosition:w,targetX:a,targetY:u,targetPosition:S,borderRadius:_==null?void 0:_.borderRadius,offset:_==null?void 0:_.offset,stepPosition:_==null?void 0:_.stepPosition}),A=t.isInternal?void 0:r;return N.jsx(Il,{id:A,path:E,labelX:M,labelY:O,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:v,labelBgBorderRadius:g,style:y,markerEnd:C,markerStart:k,interactionWidth:I})})}const um=am({isInternal:!1}),cm=am({isInternal:!0});um.displayName="SmoothStepEdge";cm.displayName="SmoothStepEdgeInternal";function dm(t){return G.memo(({id:r,...i})=>{var a;const l=t.isInternal?void 0:r;return N.jsx(um,{...i,id:l,pathOptions:G.useMemo(()=>{var u;return{borderRadius:0,offset:(u=i.pathOptions)==null?void 0:u.offset}},[(a=i.pathOptions)==null?void 0:a.offset])})})}const Ck=dm({isInternal:!1}),fm=dm({isInternal:!0});Ck.displayName="StepEdge";fm.displayName="StepEdgeInternal";function pm(t){return G.memo(({id:r,sourceX:i,sourceY:l,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,_,I]=Tg({sourceX:i,sourceY:l,targetX:a,targetY:u}),E=t.isInternal?void 0:r;return N.jsx(Il,{id:E,path:k,labelX:_,labelY:I,label:d,labelStyle:f,labelShowBg:h,labelBgStyle:m,labelBgPadding:v,labelBgBorderRadius:g,style:y,markerEnd:w,markerStart:S,interactionWidth:C})})}const bk=pm({isInternal:!1}),hm=pm({isInternal:!0});bk.displayName="StraightEdge";hm.displayName="StraightEdgeInternal";function gm(t){return G.memo(({id:r,sourceX:i,sourceY:l,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:_,interactionWidth:I})=>{const[E,M,O]=zg({sourceX:i,sourceY:l,sourcePosition:d,targetX:a,targetY:u,targetPosition:f,curvature:_==null?void 0:_.curvature}),A=t.isInternal?void 0:r;return N.jsx(Il,{id:A,path:E,labelX:M,labelY:O,label:h,labelStyle:m,labelShowBg:v,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:w,style:S,markerEnd:C,markerStart:k,interactionWidth:I})})}const Mk=gm({isInternal:!1}),mm=gm({isInternal:!0});Mk.displayName="BezierEdge";mm.displayName="BezierEdgeInternal";const ph={default:mm,straight:hm,step:fm,smoothstep:cm,simplebezier:lm},hh={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},Pk=(t,r,i)=>i===xe.Left?t-r:i===xe.Right?t+r:t,zk=(t,r,i)=>i===xe.Top?t-r:i===xe.Bottom?t+r:t,gh="react-flow__edgeupdater";function mh({position:t,centerX:r,centerY:i,radius:l=10,onMouseDown:a,onMouseEnter:u,onMouseOut:d,type:f}){return N.jsx("circle",{onMouseDown:a,onMouseEnter:u,onMouseOut:d,className:Xe([gh,`${gh}-${f}`]),cx:Pk(r,l,t),cy:zk(i,l,t),r:l,stroke:"transparent",fill:"transparent"})}function Ik({isReconnectable:t,reconnectRadius:r,edge:i,sourceX:l,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,O)=>{if(M.button!==0)return;const{autoPanOnConnect:A,domNode:B,connectionMode:X,connectionRadius:q,lib:J,onConnectStart:V,cancelConnection:H,nodeLookup:ee,rfId:z,panBy:U,updateConnection:D}=S.getState(),W=O.type==="target",L=(b,j)=>{y(!1),g==null||g(b,i,O.type,j)},T=b=>m==null?void 0:m(i,b),F=(b,j)=>{y(!0),v==null||v(M,i,O.type),V==null||V(b,j)};lc.onPointerDown(M.nativeEvent,{autoPanOnConnect:A,connectionMode:X,connectionRadius:q,domNode:B,handleId:O.id,nodeId:O.nodeId,nodeLookup:ee,isTarget:W,edgeUpdaterType:O.type,lib:J,flowId:z,cancelConnection:H,panBy:U,isValidConnection:(...b)=>{var j,te;return((te=(j=S.getState()).isValidConnection)==null?void 0:te.call(j,...b))??!0},onConnect:T,onConnectStart:F,onConnectEnd:(...b)=>{var j,te;return(te=(j=S.getState()).onConnectEnd)==null?void 0:te.call(j,...b)},onReconnectEnd:L,updateConnection:D,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"}),_=M=>C(M,{nodeId:i.source,id:i.sourceHandle??null,type:"source"}),I=()=>w(!0),E=()=>w(!1);return N.jsxs(N.Fragment,{children:[(t===!0||t==="source")&&N.jsx(mh,{position:f,centerX:l,centerY:a,radius:r,onMouseDown:k,onMouseEnter:I,onMouseOut:E,type:"source"}),(t===!0||t==="target")&&N.jsx(mh,{position:h,centerX:u,centerY:d,radius:r,onMouseDown:_,onMouseEnter:I,onMouseOut:E,type:"target"})]})}function Tk({id:t,edgesFocusable:r,edgesReconnectable:i,elementsSelectable:l,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:_,disableKeyboardA11y:I}){let E=be(ve=>ve.edgeLookup.get(t));const M=be(ve=>ve.defaultEdgeOptions);E=M?{...M,...E}:E;let O=E.type||"default",A=(C==null?void 0:C[O])||ph[O];A===void 0&&(_==null||_("011",Gt.error011(O)),O="default",A=(C==null?void 0:C.default)||ph.default);const B=!!(E.focusable||r&&typeof E.focusable>"u"),X=typeof g<"u"&&(E.reconnectable||i&&typeof E.reconnectable>"u"),q=!!(E.selectable||l&&typeof E.selectable>"u"),J=G.useRef(null),[V,H]=G.useState(!1),[ee,z]=G.useState(!1),U=Fe(),{zIndex:D,sourceX:W,sourceY:L,targetX:T,targetY:F,sourcePosition:b,targetPosition:j}=be(G.useCallback(ve=>{const me=ve.nodeLookup.get(E.source),Ee=ve.nodeLookup.get(E.target);if(!me||!Ee)return{zIndex:E.zIndex,...hh};const Me=w2({id:t,sourceNode:me,targetNode:Ee,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:ve.connectionMode,onError:_});return{zIndex:f2({selected:E.selected,zIndex:E.zIndex,sourceNode:me,targetNode:Ee,elevateOnSelect:ve.elevateEdgesOnSelect,zIndexMode:ve.zIndexMode}),...Me||hh}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),Oe),te=G.useMemo(()=>E.markerStart?`url('#${ic(E.markerStart,S)}')`:void 0,[E.markerStart,S]),oe=G.useMemo(()=>E.markerEnd?`url('#${ic(E.markerEnd,S)}')`:void 0,[E.markerEnd,S]);if(E.hidden||W===null||L===null||T===null||F===null)return null;const ae=ve=>{var Ie;const{addSelectedEdges:me,unselectNodesAndEdges:Ee,multiSelectionActive:Me}=U.getState();q&&(U.setState({nodesSelectionActive:!1}),E.selected&&Me?(Ee({nodes:[],edges:[E]}),(Ie=J.current)==null||Ie.blur()):me([t])),a&&a(ve,E)},ce=u?ve=>{u(ve,{...E})}:void 0,ue=d?ve=>{d(ve,{...E})}:void 0,Z=f?ve=>{f(ve,{...E})}:void 0,se=h?ve=>{h(ve,{...E})}:void 0,ge=m?ve=>{m(ve,{...E})}:void 0,we=ve=>{var me;if(!I&&gg.includes(ve.key)&&q){const{unselectNodesAndEdges:Ee,addSelectedEdges:Me}=U.getState();ve.key==="Escape"?((me=J.current)==null||me.blur(),Ee({edges:[E]})):Me([t])}};return N.jsx("svg",{style:{zIndex:D},children:N.jsxs("g",{className:Xe(["react-flow__edge",`react-flow__edge-${O}`,E.className,k,{selected:E.selected,animated:E.animated,inactive:!q&&!a,updating:V,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:E.ariaRole??(B?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":B?`${Xg}-${S}`:void 0,ref:J,...E.domAttributes,children:[!ee&&N.jsx(A,{id:t,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:q,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:W,sourceY:L,targetX:T,targetY:F,sourcePosition:b,targetPosition:j,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:te,markerEnd:oe,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),X&&N.jsx(Ik,{edge:E,isReconnectable:X,reconnectRadius:v,onReconnect:g,onReconnectStart:y,onReconnectEnd:w,sourceX:W,sourceY:L,targetX:T,targetY:F,sourcePosition:b,targetPosition:j,setUpdateHover:H,setReconnecting:z})]})})}var jk=G.memo(Tk);const Rk=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function ym({defaultMarkerColor:t,onlyRenderVisibleElements:r,rfId:i,edgeTypes:l,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:_,elementsSelectable:I,onError:E}=be(Rk,Oe),M=vk(r);return N.jsxs("div",{className:"react-flow__edges",children:[N.jsx(_k,{defaultColor:t,rfId:i}),M.map(O=>N.jsx(jk,{id:O,edgesFocusable:k,edgesReconnectable:_,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:E,edgeTypes:l,disableKeyboardA11y:C},O))]})}ym.displayName="EdgeRenderer";const Lk=G.memo(ym),Ak=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function $k({children:t}){const r=be(Ak);return N.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:r},children:t})}function Dk(t){const r=bc(),i=G.useRef(!1);G.useEffect(()=>{!i.current&&r.viewportInitialized&&t&&(setTimeout(()=>t(r),1),i.current=!0)},[t,r.viewportInitialized])}const Ok=t=>{var r;return(r=t.panZoom)==null?void 0:r.syncViewport};function Fk(t){const r=be(Ok),i=Fe();return G.useEffect(()=>{t&&(r==null||r(t),i.setState({transform:[t.x,t.y,t.zoom]}))},[t,r]),null}function Vk(t){return t.connection.inProgress?{...t.connection,to:go(t.connection.to,t.transform)}:{...t.connection}}function Hk(t){return Vk}function Bk(t){const r=Hk();return be(r,Oe)}const Wk=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function Uk({containerStyle:t,style:r,type:i,component:l}){const{nodesConnectable:a,width:u,height:d,isValid:f,inProgress:h}=be(Wk,Oe);return!(u&&a&&h)?null:N.jsx("svg",{style:t,width:u,height:d,className:"react-flow__connectionline react-flow__container",children:N.jsx("g",{className:Xe(["react-flow__connection",vg(f)]),children:N.jsx(vm,{style:r,type:i,CustomComponent:l,isValid:f})})})}const vm=({style:t,type:r=Qn.Bezier,CustomComponent:i,isValid:l})=>{const{inProgress:a,from:u,fromNode:d,fromHandle:f,fromPosition:h,to:m,toNode:v,toHandle:g,toPosition:y,pointer:w}=Bk();if(!a)return;if(i)return N.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:vg(l),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]=zg(C);break;case Qn.SimpleBezier:[S]=im(C);break;case Qn.Step:[S]=oc({...C,borderRadius:0});break;case Qn.SmoothStep:[S]=oc(C);break;default:[S]=Tg(C)}return N.jsx("path",{d:S,fill:"none",className:"react-flow__connection-path",style:t})};vm.displayName="ConnectionLine";const Yk={};function yh(t=Yk){G.useRef(t),Fe(),G.useEffect(()=>{},[t])}function Xk(){Fe(),G.useRef(!1),G.useEffect(()=>{},[])}function xm({nodeTypes:t,edgeTypes:r,onInit:i,onNodeClick:l,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:_,selectionKeyCode:I,selectionOnDrag:E,selectionMode:M,multiSelectionKeyCode:O,panActivationKeyCode:A,zoomActivationKeyCode:B,deleteKeyCode:X,onlyRenderVisibleElements:q,elementsSelectable:J,defaultViewport:V,translateExtent:H,minZoom:ee,maxZoom:z,preventScrolling:U,defaultMarkerColor:D,zoomOnScroll:W,zoomOnPinch:L,panOnScroll:T,panOnScrollSpeed:F,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:tt,noDragClassName:nt,noWheelClassName:ln,noPanClassName:qt,disableKeyboardA11y:Kt,nodeExtent:pt,rfId:zt,viewport:St,onViewportChange:It}){return yh(t),yh(r),Xk(),Dk(i),Fk(St),N.jsx(ak,{onPaneClick:ae,onPaneMouseEnter:ce,onPaneMouseMove:ue,onPaneMouseLeave:Z,onPaneContextMenu:ge,onPaneScroll:se,paneClickDistance:we,deleteKeyCode:X,selectionKeyCode:I,selectionOnDrag:E,selectionMode:M,onSelectionStart:y,onSelectionEnd:w,multiSelectionKeyCode:O,panActivationKeyCode:A,zoomActivationKeyCode:B,elementsSelectable:J,zoomOnScroll:W,zoomOnPinch:L,zoomOnDoubleClick:j,panOnScroll:T,panOnScrollSpeed:F,panOnScrollMode:b,panOnDrag:te,autoPanOnSelection:oe,defaultViewport:V,translateExtent:H,minZoom:ee,maxZoom:z,onSelectionContextMenu:g,preventScrolling:U,noDragClassName:nt,noWheelClassName:ln,noPanClassName:qt,disableKeyboardA11y:Kt,onViewportChange:It,isControlledViewport:!!St,children:N.jsxs($k,{children:[N.jsx(Lk,{edgeTypes:r,onEdgeClick:a,onEdgeDoubleClick:d,onReconnect:ut,onReconnectStart:ft,onReconnectEnd:tt,onlyRenderVisibleElements:q,onEdgeContextMenu:me,onEdgeMouseEnter:Ee,onEdgeMouseMove:Me,onEdgeMouseLeave:Ie,reconnectRadius:Re,defaultMarkerColor:D,noPanClassName:qt,disableKeyboardA11y:Kt,rfId:zt}),N.jsx(Uk,{style:C,type:S,component:k,containerStyle:_}),N.jsx("div",{className:"react-flow__edgelabel-renderer"}),N.jsx(yk,{nodeTypes:t,onNodeClick:l,onNodeDoubleClick:u,onNodeMouseEnter:f,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:v,nodeClickDistance:ve,onlyRenderVisibleElements:q,noPanClassName:qt,noDragClassName:nt,disableKeyboardA11y:Kt,nodeExtent:pt,rfId:zt}),N.jsx("div",{className:"react-flow__viewport-portal"})]})})}xm.displayName="GraphView";const Gk=G.memo(xm),Qk=_g(),vh=({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,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,_=l??r??[],I=i??t??[],E=v??[0,0],M=g??xi;Lg(C,k,_);const{nodesInitialized:O}=sc(I,w,S,{nodeOrigin:E,nodeExtent:M,zIndexMode:y});let A=[0,0,1];if(d&&a&&u){const B=Mi(w,{filter:V=>!!((V.width||V.initialWidth)&&(V.height||V.initialHeight))}),{x:X,y:q,zoom:J}=wc(B,a,u,h,m,(f==null?void 0:f.padding)??.1);A=[X,q,J]}return{rfId:"1",width:a??0,height:u??0,transform:A,nodes:I,nodesInitialized:O,nodeLookup:w,parentLookup:S,edges:_,edgeLookup:k,connectionLookup:C,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:i!==void 0,hasDefaultEdges:l!==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:E,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:{...yg},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Qk,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:mg,zIndexMode:y,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},qk=({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,width:a,height:u,fitView:d,fitViewOptions:f,minZoom:h,maxZoom:m,nodeOrigin:v,nodeExtent:g,zIndexMode:y})=>uS((w,S)=>{async function C(){const{nodeLookup:k,panZoom:_,fitViewOptions:I,fitViewResolver:E,width:M,height:O,minZoom:A,maxZoom:B}=S();_&&(await i2({nodes:k,width:M,height:O,panZoom:_,minZoom:A,maxZoom:B},I),E==null||E.resolve(!0),w({fitViewResolver:null}))}return{...vh({nodes:t,edges:r,width:a,height:u,fitView:d,fitViewOptions:f,minZoom:h,maxZoom:m,nodeOrigin:v,nodeExtent:g,defaultNodes:i,defaultEdges:l,zIndexMode:y}),setNodes:k=>{const{nodeLookup:_,parentLookup:I,nodeOrigin:E,elevateNodesOnSelect:M,fitViewQueued:O,zIndexMode:A,nodesSelectionActive:B}=S(),{nodesInitialized:X,hasSelectedNodes:q}=sc(k,_,I,{nodeOrigin:E,nodeExtent:g,elevateNodesOnSelect:M,checkEquality:!0,zIndexMode:A}),J=B&&q;O&&X?(C(),w({nodes:k,nodesInitialized:X,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:J})):w({nodes:k,nodesInitialized:X,nodesSelectionActive:J})},setEdges:k=>{const{connectionLookup:_,edgeLookup:I}=S();Lg(_,I,k),w({edges:k})},setDefaultNodesAndEdges:(k,_)=>{if(k){const{setNodes:I}=S();I(k),w({hasDefaultNodes:!0})}if(_){const{setEdges:I}=S();I(_),w({hasDefaultEdges:!0})}},updateNodeInternals:k=>{const{triggerNodeChanges:_,nodeLookup:I,parentLookup:E,domNode:M,nodeOrigin:O,nodeExtent:A,debug:B,fitViewQueued:X,zIndexMode:q}=S(),{changes:J,updatedInternals:V}=M2(k,I,E,M,O,A,q);V&&(E2(I,E,{nodeOrigin:O,nodeExtent:A,zIndexMode:q}),X?(C(),w({fitViewQueued:!1,fitViewOptions:void 0})):w({}),(J==null?void 0:J.length)>0&&(B&&console.log("React Flow: trigger node changes",J),_==null||_(J)))},updateNodePositions:(k,_=!1)=>{const I=[];let E=[];const{nodeLookup:M,triggerNodeChanges:O,connection:A,updateConnection:B,onNodesChangeMiddlewareMap:X}=S();for(const[q,J]of k){const V=M.get(q),H=!!(V!=null&&V.expandParent&&(V!=null&&V.parentId)&&(J!=null&&J.position)),ee={id:q,type:"position",position:H?{x:Math.max(0,J.position.x),y:Math.max(0,J.position.y)}:J.position,dragging:_};if(V&&A.inProgress&&A.fromNode.id===V.id){const z=Er(V,A.fromHandle,xe.Left,!0);B({...A,from:z})}H&&V.parentId&&I.push({id:q,parentId:V.parentId,rect:{...J.internals.positionAbsolute,width:J.measured.width??0,height:J.measured.height??0}}),E.push(ee)}if(I.length>0){const{parentLookup:q,nodeOrigin:J}=S(),V=Cc(I,M,q,J);E.push(...V)}for(const q of X.values())E=q(E);O(E)},triggerNodeChanges:k=>{const{onNodesChange:_,setNodes:I,nodes:E,hasDefaultNodes:M,debug:O}=S();if(k!=null&&k.length){if(M){const A=zS(k,E);I(A)}O&&console.log("React Flow: trigger node changes",k),_==null||_(k)}},triggerEdgeChanges:k=>{const{onEdgesChange:_,setEdges:I,edges:E,hasDefaultEdges:M,debug:O}=S();if(k!=null&&k.length){if(M){const A=IS(k,E);I(A)}O&&console.log("React Flow: trigger edge changes",k),_==null||_(k)}},addSelectedNodes:k=>{const{multiSelectionActive:_,edgeLookup:I,nodeLookup:E,triggerNodeChanges:M,triggerEdgeChanges:O}=S();if(_){const A=k.map(B=>mr(B,!0));M(A);return}M(no(E,new Set([...k]),!0)),O(no(I))},addSelectedEdges:k=>{const{multiSelectionActive:_,edgeLookup:I,nodeLookup:E,triggerNodeChanges:M,triggerEdgeChanges:O}=S();if(_){const A=k.map(B=>mr(B,!0));O(A);return}O(no(I,new Set([...k]))),M(no(E,new Set,!0))},unselectNodesAndEdges:({nodes:k,edges:_}={})=>{const{edges:I,nodes:E,nodeLookup:M,triggerNodeChanges:O,triggerEdgeChanges:A}=S(),B=k||E,X=_||I,q=[];for(const V of B){if(!V.selected)continue;const H=M.get(V.id);H&&(H.selected=!1),q.push(mr(V.id,!1))}const J=[];for(const V of X)V.selected&&J.push(mr(V.id,!1));O(q),A(J)},setMinZoom:k=>{const{panZoom:_,maxZoom:I}=S();_==null||_.setScaleExtent([k,I]),w({minZoom:k})},setMaxZoom:k=>{const{panZoom:_,minZoom:I}=S();_==null||_.setScaleExtent([I,k]),w({maxZoom:k})},setTranslateExtent:k=>{var _;(_=S().panZoom)==null||_.setTranslateExtent(k),w({translateExtent:k})},resetSelectedElements:()=>{const{edges:k,nodes:_,triggerNodeChanges:I,triggerEdgeChanges:E,elementsSelectable:M}=S();if(!M)return;const O=_.reduce((B,X)=>X.selected?[...B,mr(X.id,!1)]:B,[]),A=k.reduce((B,X)=>X.selected?[...B,mr(X.id,!1)]:B,[]);I(O),E(A)},setNodeExtent:k=>{const{nodes:_,nodeLookup:I,parentLookup:E,nodeOrigin:M,elevateNodesOnSelect:O,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]||(sc(_,I,E,{nodeOrigin:M,nodeExtent:k,elevateNodesOnSelect:O,checkEquality:!1,zIndexMode:B}),w({nodeExtent:k}))},panBy:k=>{const{transform:_,width:I,height:E,panZoom:M,translateExtent:O}=S();return P2({delta:k,panZoom:M,transform:_,translateExtent:O,width:I,height:E})},setCenter:async(k,_,I)=>{const{width:E,height:M,maxZoom:O,panZoom:A}=S();if(!A)return!1;const B=typeof(I==null?void 0:I.zoom)<"u"?I.zoom:O;return await A.setViewport({x:E/2-k*B,y:M/2-_*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:{...yg}})},updateConnection:k=>{w({connection:k})},reset:()=>w({...vh()})}},Object.is);function Kk({initialNodes:t,initialEdges:r,defaultNodes:i,defaultEdges:l,initialWidth:a,initialHeight:u,initialMinZoom:d,initialMaxZoom:f,initialFitViewOptions:h,fitView:m,nodeOrigin:v,nodeExtent:g,zIndexMode:y,children:w}){const[S]=G.useState(()=>qk({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,width:a,height:u,fitView:m,minZoom:d,maxZoom:f,fitViewOptions:h,nodeOrigin:v,nodeExtent:g,zIndexMode:y}));return N.jsx(cS,{value:S,children:N.jsx($S,{children:w})})}function Zk({children:t,nodes:r,edges:i,defaultNodes:l,defaultEdges:a,width:u,height:d,fitView:f,fitViewOptions:h,minZoom:m,maxZoom:v,nodeOrigin:g,nodeExtent:y,zIndexMode:w}){return G.useContext(Ml)?N.jsx(N.Fragment,{children:t}):N.jsx(Kk,{initialNodes:r,initialEdges:i,defaultNodes:l,defaultEdges:a,initialWidth:u,initialHeight:d,fitView:f,initialFitViewOptions:h,initialMinZoom:m,initialMaxZoom:v,nodeOrigin:g,nodeExtent:y,zIndexMode:w,children:t})}const Jk={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function e_({nodes:t,edges:r,defaultNodes:i,defaultEdges:l,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:_,onNodeMouseEnter:I,onNodeMouseMove:E,onNodeMouseLeave:M,onNodeContextMenu:O,onNodeDoubleClick:A,onNodeDragStart:B,onNodeDrag:X,onNodeDragStop:q,onNodesDelete:J,onEdgesDelete:V,onDelete:H,onSelectionChange:ee,onSelectionDragStart:z,onSelectionDrag:U,onSelectionDragStop:D,onSelectionContextMenu:W,onSelectionStart:L,onSelectionEnd:T,onBeforeDelete:F,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:tt,nodeOrigin:nt=Gg,edgesFocusable:ln,edgesReconnectable:qt,elementsSelectable:Kt=!0,defaultViewport:pt=_S,minZoom:zt=.5,maxZoom:St=2,translateExtent:It=xi,preventScrolling:zi=!0,nodeExtent:an,defaultMarkerColor:Kn="#b1b1b7",zoomOnScroll:Tl=!0,zoomOnPinch:Ii=!0,panOnScroll:Ti=!1,panOnScrollSpeed:jl=.5,panOnScrollMode:mo=xr.Free,zoomOnDoubleClick:yo=!0,panOnDrag:vo=!0,onPaneClick:xo,onPaneMouseEnter:wo,onPaneMouseMove:_n,onPaneMouseLeave:En,onPaneScroll:ji,onPaneContextMenu:Ri,paneClickDistance:Li=1,nodeClickDistance:Ai=0,children:$i,onReconnect:So,onReconnectStart:Di,onReconnectEnd:Zn,onEdgeContextMenu:ko,onEdgeDoubleClick:Jn,onEdgeMouseEnter:Rl,onEdgeMouseMove:er,onEdgeMouseLeave:Nr,reconnectRadius:Cr=10,onNodesChange:_o,onEdgesChange:Ll,noDragClassName:Al="nodrag",noWheelClassName:$l="nowheel",noPanClassName:Zt="nopan",fitView:Eo,fitViewOptions:No,connectOnClick:Dl,attributionPosition:Oi,proOptions:Fi,defaultEdgeOptions:Vi,elevateNodesOnSelect:Hi=!0,elevateEdgesOnSelect:Ol=!1,disableKeyboardA11y:Bi=!1,autoPanOnConnect:Ve,autoPanOnNodeDrag:Fl,autoPanOnSelection:Co=!0,autoPanSpeed:Wi,connectionRadius:br,isValidConnection:Vl,onError:Ui,style:Mr,id:kt,nodeDragThreshold:Hl,connectionDragThreshold:_t,viewport:Bl,onViewportChange:Wl,width:Ul,height:Pr,colorMode:zr="light",debug:tr,onScroll:un,ariaLabelConfig:Yl,zIndexMode:Yi="basic",...bo},Xi){const nr=kt||"1",rr=bS(zr),Xl=G.useCallback(Ir=>{Ir.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),un==null||un(Ir)},[un]);return N.jsx("div",{"data-testid":"rf__wrapper",...bo,onScroll:Xl,style:{...Mr,...Jk},ref:Xi,className:Xe(["react-flow",a,rr]),id:kt,role:"application",children:N.jsxs(Zk,{nodes:t,edges:r,width:Ul,height:Pr,fitView:Eo,fitViewOptions:No,minZoom:zt,maxZoom:St,nodeOrigin:nt,nodeExtent:an,zIndexMode:Yi,children:[N.jsx(CS,{nodes:t,edges:r,defaultNodes:i,defaultEdges:l,onConnect:w,onConnectStart:S,onConnectEnd:C,onClickConnectStart:k,onClickConnectEnd:_,nodesDraggable:Re,autoPanOnNodeFocus:ut,nodesConnectable:ft,nodesFocusable:tt,edgesFocusable:ln,edgesReconnectable:qt,elementsSelectable:Kt,elevateNodesOnSelect:Hi,elevateEdgesOnSelect:Ol,minZoom:zt,maxZoom:St,nodeExtent:an,onNodesChange:_o,onEdgesChange:Ll,snapToGrid:me,snapGrid:Ee,connectionMode:b,translateExtent:It,connectOnClick:Dl,defaultEdgeOptions:Vi,fitView:Eo,fitViewOptions:No,onNodesDelete:J,onEdgesDelete:V,onDelete:H,onNodeDragStart:B,onNodeDrag:X,onNodeDragStop:q,onSelectionDrag:U,onSelectionDragStart:z,onSelectionDragStop:D,onMove:v,onMoveStart:g,onMoveEnd:y,noPanClassName:Zt,nodeOrigin:nt,rfId:nr,autoPanOnConnect:Ve,autoPanOnNodeDrag:Fl,autoPanSpeed:Wi,onError:Ui,connectionRadius:br,isValidConnection:Vl,selectNodesOnDrag:Ie,nodeDragThreshold:Hl,connectionDragThreshold:_t,onBeforeDelete:F,debug:tr,ariaLabelConfig:Yl,zIndexMode:Yi}),N.jsx(Gk,{onInit:m,onNodeClick:f,onEdgeClick:h,onNodeMouseEnter:I,onNodeMouseMove:E,onNodeMouseLeave:M,onNodeContextMenu:O,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:Tl,zoomOnPinch:Ii,zoomOnDoubleClick:yo,panOnScroll:Ti,panOnScrollSpeed:jl,panOnScrollMode:mo,panOnDrag:vo,autoPanOnSelection:Co,onPaneClick:xo,onPaneMouseEnter:wo,onPaneMouseMove:_n,onPaneMouseLeave:En,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:Rl,onEdgeMouseMove:er,onEdgeMouseLeave:Nr,reconnectRadius:Cr,defaultMarkerColor:Kn,noDragClassName:Al,noWheelClassName:$l,noPanClassName:Zt,rfId:nr,disableKeyboardA11y:Bi,nodeExtent:an,viewport:Bl,onViewportChange:Wl}),N.jsx(kS,{onSelectionChange:ee}),$i,N.jsx(yS,{proOptions:Fi,position:Oi}),N.jsx(mS,{rfId:nr,disableKeyboardA11y:Bi})]})})}var t_=qg(e_);function n_({dimensions:t,lineWidth:r,variant:i,className:l}){return N.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,l])})}function r_({radius:t,className:r}){return N.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 o_={[qn.Dots]:1,[qn.Lines]:1,[qn.Cross]:6},i_=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function wm({id:t,variant:r=qn.Dots,gap:i=20,size:l,lineWidth:a=1,offset:u=0,color:d,bgColor:f,style:h,className:m,patternClassName:v}){const g=G.useRef(null),{transform:y,patternId:w}=be(i_,Oe),S=l||o_[r],C=r===qn.Dots,k=r===qn.Cross,_=Array.isArray(i)?i:[i,i],I=[_[0]*y[2]||1,_[1]*y[2]||1],E=S*y[2],M=Array.isArray(u)?u:[u,u],O=k?[E,E]:I,A=[M[0]*y[2]||1+O[0]/2,M[1]*y[2]||1+O[1]/2],B=`${w}${t||""}`;return N.jsxs("svg",{className:Xe(["react-flow__background",m]),style:{...h,...zl,"--xy-background-color-props":f,"--xy-background-pattern-color-props":d},ref:g,"data-testid":"rf__background",children:[N.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?N.jsx(r_,{radius:E/2,className:v}):N.jsx(n_,{dimensions:O,lineWidth:a,variant:r,className:v})}),N.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${B})`})]})}wm.displayName="Background";const s_=G.memo(wm);function l_(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:N.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function a_(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:N.jsx("path",{d:"M0 0h32v4.2H0z"})})}function u_(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:N.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 c_(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:N.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 d_(){return N.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:N.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 N.jsx("button",{type:"button",className:Xe(["react-flow__controls-button",r]),...i,children:t})}const f_=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function Sm({style:t,showZoom:r=!0,showFitView:i=!0,showInteractive:l=!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:_,ariaLabelConfig:I}=be(f_,Oe),{zoomIn:E,zoomOut:M,fitView:O}=bc(),A=()=>{E(),u==null||u()},B=()=>{M(),d==null||d()},X=()=>{O(a),f==null||f()},q=()=>{S.setState({nodesDraggable:!C,nodesConnectable:!C,elementsSelectable:!C}),h==null||h(!C)},J=y==="horizontal"?"horizontal":"vertical";return N.jsxs(Pl,{className:Xe(["react-flow__controls",J,m]),position:g,style:t,"data-testid":"rf__controls","aria-label":w??I["controls.ariaLabel"],children:[r&&N.jsxs(N.Fragment,{children:[N.jsx(rl,{onClick:A,className:"react-flow__controls-zoomin",title:I["controls.zoomIn.ariaLabel"],"aria-label":I["controls.zoomIn.ariaLabel"],disabled:_,children:N.jsx(l_,{})}),N.jsx(rl,{onClick:B,className:"react-flow__controls-zoomout",title:I["controls.zoomOut.ariaLabel"],"aria-label":I["controls.zoomOut.ariaLabel"],disabled:k,children:N.jsx(a_,{})})]}),i&&N.jsx(rl,{className:"react-flow__controls-fitview",onClick:X,title:I["controls.fitView.ariaLabel"],"aria-label":I["controls.fitView.ariaLabel"],children:N.jsx(u_,{})}),l&&N.jsx(rl,{className:"react-flow__controls-interactive",onClick:q,title:I["controls.interactive.ariaLabel"],"aria-label":I["controls.interactive.ariaLabel"],children:C?N.jsx(d_,{}):N.jsx(c_,{})}),v]})}Sm.displayName="Controls";const p_=G.memo(Sm);function h_({id:t,x:r,y:i,width:l,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 N.jsx("rect",{className:Xe(["react-flow__minimap-node",{selected:y},m]),x:r,y:i,rx:v,ry:v,width:l,height:a,style:{fill:k,stroke:f,strokeWidth:h},shapeRendering:g,onClick:w?_=>w(_,t):void 0})}const g_=G.memo(h_),m_=t=>t.nodes.map(r=>r.id),Bu=t=>t instanceof Function?t:()=>t;function y_({nodeStrokeColor:t,nodeColor:r,nodeClassName:i="",nodeBorderRadius:l=5,nodeStrokeWidth:a,nodeComponent:u=g_,onClick:d}){const f=be(m_,Oe),h=Bu(r),m=Bu(t),v=Bu(i),g=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return N.jsx(N.Fragment,{children:f.map(y=>N.jsx(x_,{id:y,nodeColorFunc:h,nodeStrokeColorFunc:m,nodeClassNameFunc:v,nodeBorderRadius:l,nodeStrokeWidth:a,NodeComponent:u,onClick:d,shapeRendering:g},y))})}function v_({id:t,nodeColorFunc:r,nodeStrokeColorFunc:i,nodeClassNameFunc:l,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:_,y:I}=C.internals.positionAbsolute,{width:E,height:M}=kn(k);return{node:k,x:_,y:I,width:E,height:M}},Oe);return!m||m.hidden||!Eg(m)?null:N.jsx(f,{x:v,y:g,width:y,height:w,style:m.style,selected:!!m.selected,className:l(m),color:r(m),borderRadius:a,strokeColor:i(m),strokeWidth:u,shapeRendering:d,onClick:h,id:m.id})}const x_=G.memo(v_);var w_=G.memo(y_);const S_=200,k_=150,__=t=>!t.hidden,E_=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?kg(Mi(t.nodeLookup,{filter:__}),r):r,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},N_="react-flow__minimap-desc";function km({style:t,className:r,nodeStrokeColor:i,nodeColor:l,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:_,inversePan:I,zoomStep:E=1,offsetScale:M=5}){const O=Fe(),A=G.useRef(null),{boundingRect:B,viewBB:X,rfId:q,panZoom:J,translateExtent:V,flowWidth:H,flowHeight:ee,ariaLabelConfig:z}=be(E_,Oe),U=(t==null?void 0:t.width)??S_,D=(t==null?void 0:t.height)??k_,W=B.width/U,L=B.height/D,T=Math.max(W,L),F=T*U,b=T*D,j=M*T,te=B.x-(F-B.width)/2-j,oe=B.y-(b-B.height)/2-j,ae=F+j*2,ce=b+j*2,ue=`${N_}-${q}`,Z=G.useRef(0),se=G.useRef();Z.current=T,G.useEffect(()=>{if(A.current&&J)return se.current=D2({domNode:A.current,panZoom:J,getTransform:()=>O.getState().transform,getViewScale:()=>Z.current}),()=>{var me;(me=se.current)==null||me.destroy()}},[J]),G.useEffect(()=>{var me;(me=se.current)==null||me.update({translateExtent:V,width:H,height:ee,inversePan:I,pannable:C,zoomStep:E,zoomable:k})},[C,k,I,E,V,H,ee]);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?G.useCallback((me,Ee)=>{const Me=O.getState().nodeLookup.get(Ee).internals.userNode;S(me,Me)},[]):void 0,ve=_??z["minimap.ariaLabel"];return N.jsx(Pl,{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 l=="string"?l: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:N.jsxs("svg",{width:U,height:D,viewBox:`${te} ${oe} ${ae} ${ce}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ue,ref:A,onClick:ge,children:[ve&&N.jsx("title",{id:ue,children:ve}),N.jsx(w_,{onClick:we,nodeColor:l,nodeStrokeColor:i,nodeBorderRadius:u,nodeClassName:a,nodeStrokeWidth:d,nodeComponent:f}),N.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${X.x},${X.y}h${X.width}v${X.height}h${-X.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}km.displayName="MiniMap";G.memo(km);const C_=t=>r=>t?`${Math.max(1/r.transform[2],1)}`:void 0,b_={[po.Line]:"right",[po.Handle]:"bottom-right"};function M_({nodeId:t,position:r,variant:i=po.Handle,className:l,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:_}){const I=em(),E=typeof t=="string"?t:I,M=Fe(),O=G.useRef(null),A=i===po.Handle,B=be(G.useCallback(C_(A&&w),[A,w]),Oe),X=G.useRef(null),q=r??b_[i];G.useEffect(()=>{if(!(!O.current||!E))return X.current||(X.current=K2({domNode:O.current,nodeId:E,getStoreItems:()=>{const{nodeLookup:V,transform:H,snapGrid:ee,snapToGrid:z,nodeOrigin:U,domNode:D}=M.getState();return{nodeLookup:V,transform:H,snapGrid:ee,snapToGrid:z,nodeOrigin:U,paneDomNode:D}},onChange:(V,H)=>{const{triggerNodeChanges:ee,nodeLookup:z,parentLookup:U,nodeOrigin:D}=M.getState(),W=[],L={x:V.x,y:V.y},T=z.get(E);if(T&&T.expandParent&&T.parentId){const F=T.origin??D,b=V.width??T.measured.width??0,j=V.height??T.measured.height??0,te={id:T.id,parentId:T.parentId,rect:{width:b,height:j,...Ng({x:V.x??T.position.x,y:V.y??T.position.y},{width:b,height:j},T.parentId,z,F)}},oe=Cc([te],z,U,D);W.push(...oe),L.x=V.x?Math.max(F[0]*b,V.x):void 0,L.y=V.y?Math.max(F[1]*j,V.y):void 0}if(L.x!==void 0&&L.y!==void 0){const F={id:E,type:"position",position:{...L}};W.push(F)}if(V.width!==void 0&&V.height!==void 0){const b={id:E,type:"dimensions",resizing:!0,setAttributes:y?y==="horizontal"?"width":"height":!0,dimensions:{width:V.width,height:V.height}};W.push(b)}for(const F of H){const b={...F,type:"position"};W.push(b)}ee(W)},onEnd:({width:V,height:H})=>{const ee={id:E,type:"dimensions",resizing:!1,dimensions:{width:V,height:H}};M.getState().triggerNodeChanges([ee])}})),X.current.update({controlPosition:q,boundaries:{minWidth:f,minHeight:h,maxWidth:m,maxHeight:v},keepAspectRatio:g,resizeDirection:y,onResizeStart:C,onResize:k,onResizeEnd:_,shouldResize:S}),()=>{var V;(V=X.current)==null||V.destroy()}},[q,f,h,m,v,g,C,k,_,S]);const J=q.split("-");return N.jsx("div",{className:Xe(["react-flow__resize-control","nodrag",...J,i,l]),ref:O,style:{...a,scale:B,...d&&{[A?"backgroundColor":"borderColor"]:d}},children:u})}G.memo(M_);const Wu=["#22d3ee","#a78bfa","#f472b6","#facc15","#34d399","#fb923c","#60a5fa","#f87171"];function Pc(t){let r=0;for(let i=0;i<t.length;i++)r=r*31+t.charCodeAt(i)>>>0;return Wu[r%Wu.length]??Wu[0]}const xh="__bus",P_=500,wh=320,Sh=160;function z_(t,r,i){const l=[],a=new Set;for(const y of t)a.has(y.nodeId)||(a.add(y.nodeId),l.push(y.nodeId));i&&!a.has(i.nodeId)&&(a.add(i.nodeId),l.push(i.nodeId));const u=new Map(t.map(y=>[y.nodeId,y])),d=l.length>=2,f=[],h=[];d&&f.push({id:xh,kind:"bus",x:0,y:0,label:"Adapter · bus"});const m=r.slice(0,P_),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 l.forEach((y,w)=>{var M;const S=l.length===1?0:w/l.length*Math.PI*2-Math.PI/2,C=d?Math.cos(S)*wh:0,k=d?Math.sin(S)*wh:0,_=u.get(y),I=(_==null?void 0:_.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:(_==null?void 0:_.alive)??!0,connCount:(_==null?void 0:_.connections)??((M=g.get(y))==null?void 0:M.length)??0}),d&&h.push({id:`e-bus-${y}`,source:y,target:xh,kind:"bus"});const E=g.get(y)??[];E.forEach((O,A)=>{const B=A/Math.max(E.length,1)*Math.PI*2;f.push({id:O.id,kind:"conn",x:C+Math.cos(B)*Sh,y:k+Math.sin(B)*Sh,label:O.role,role:O.role,userId:O.userId,rooms:O.rooms}),h.push({id:`e-${O.id}`,source:O.id,target:y,kind:"conn"})})}),{nodes:f,edges:h,truncated:v}}function I_(t){const r=new Set;for(const i of t)for(const l of i.rooms)r.add(l);return[...r].sort()}function T_(t){return t.kind==="bus"?"Adapter · bus":t.kind==="server"?N.jsxs("div",{className:"text-center leading-tight",children:[N.jsx("div",{className:"font-semibold",children:t.label}),N.jsxs("div",{className:"text-[10px] opacity-70",children:[t.connCount," conns",t.alive?"":" · dead"]})]}):N.jsxs("div",{className:"leading-tight",children:[N.jsx("div",{className:"font-medium",children:t.role}),t.userId?N.jsx("div",{className:"text-[10px] opacity-70",children:t.userId}):null]})}function j_(t,r){var d,f;const l={fontSize:11,opacity:r!==null&&t.kind==="conn"&&!((d=t.rooms)!=null&&d.includes(r))?.16:1,transition:"opacity 120ms"};if(t.kind==="bus")return{...l,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{...l,background:"var(--color-card)",border:"1px solid var(--color-border)",color:"var(--color-foreground)",borderRadius:12,padding:"8px 12px",minWidth:96};const a=Pc(t.role??""),u=r!==null&&((f=t.rooms)==null?void 0:f.includes(r));return{...l,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 R_({topology:t,connections:r,node:i,highlightRoom:l}){const{nodes:a,edges:u,truncated:d}=G.useMemo(()=>{const f=z_(t,r,i),h=f.nodes.map(v=>({id:v.id,position:{x:v.x,y:v.y},data:{label:T_(v)},style:j_(v,l),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,l]);return N.jsxs("div",{className:"relative h-full w-full",children:[N.jsxs(t_,{nodes:a,edges:u,fitView:!0,nodesConnectable:!1,edgesFocusable:!1,minZoom:.2,children:[N.jsx(s_,{color:"#2b2b35",gap:20}),N.jsx(p_,{showInteractive:!1})]}),d>0?N.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 Uu({title:t,children:r}){return N.jsxs("div",{className:"mb-4",children:[N.jsx("div",{className:"mb-1.5 px-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:t}),r]})}const Yu=()=>N.jsx("div",{className:"px-2 py-0.5 text-xs text-muted-foreground",children:"none"});function L_({roles:t,rooms:r,topics:i,selected:l,onSelect:a}){return N.jsxs("aside",{className:"w-60 shrink-0 overflow-auto border-l bg-card/30 p-3",children:[N.jsx(Uu,{title:"Roles",children:t.length===0?N.jsx(Yu,{}):t.map(u=>N.jsxs("div",{className:"flex items-center gap-2 px-1 py-0.5 text-sm",children:[N.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{background:Pc(u)}}),u]},u))}),N.jsx(Uu,{title:"Rooms · highlight",children:r.length===0?N.jsx(Yu,{}):r.map(u=>N.jsx("button",{onClick:()=>a(l===u?null:u),className:lt("block w-full truncate rounded px-2 py-1 text-left text-sm",l===u?"bg-accent text-accent-foreground":"hover:bg-accent/50"),children:u},u))}),N.jsx(Uu,{title:"Topics · this node",children:i.length===0?N.jsx(Yu,{}):i.map(u=>N.jsx("div",{className:"truncate px-2 py-0.5 text-sm text-muted-foreground",children:u},u))})]})}function _m(t,r,i){return i?`${i} (${t})`:`${t} ${r.slice(0,8)}`}function Gn(t,r){const i=r==null?void 0:r.conn(t);return i?_m(i.role,i.id,i.userId):t.slice(0,8)}function A_(t,r){var i,l;switch(t.type){case"connect":{const a=t.descriptor;return`${_m(a.role,a.id,a.userId)} on ${a.nodeName}`}case"disconnect":return`${t.userId??Gn(t.connId,r)} on ${(r==null?void 0:r.nodeName(t.nodeId))??t.nodeId.slice(0,8)}`;case"room.add":case"room.remove":return`${Gn(t.connId,r)} · ${t.room}`;case"topic.sub":case"topic.unsub":return`${Gn(t.connId,r)} · ${t.topic}`;case"msg.request":return`${Gn(t.connId,r)} → ${t.name}`;case"msg.response":return`${Gn(t.connId,r)} ← ${t.name} · ${t.ok?"ok":((i=t.error)==null?void 0:i.code)??"error"}`;case"msg.event":return`→ ${Gn(t.target,r)} · ${t.name}`;case"msg.broadcast":return`${t.room} ⇒ ${t.name}`;case"msg.publish":return t.topic;case"msg.serverRequest":return`→ ${Gn(t.target,r)} · ${t.name}`;case"msg.serverReply":return`← ${Gn(t.target,r)} · ${t.name} · ${t.ok?"ok":((l=t.error)==null?void 0:l.code)??"error"}`}}function $_(t){return t==="msg.request"||t==="msg.response"||t==="msg.serverRequest"||t==="msg.serverReply"?"requests":t.startsWith("msg.")?"events":"lifecycle"}function D_(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;default:return}}function O_(t){return t==="connect"?"bg-primary":t==="disconnect"?"bg-destructive":t.startsWith("room")?"bg-violet-400":t.startsWith("topic")?"bg-amber-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 F_={request:"#22d3ee",event:"#34d399",topic:"#a78bfa",serverRequest:"#60a5fa"};function V_(t){return F_[t]}function Em(t){return new Date(t).toLocaleTimeString()}function Nm(t,r=Date.now()){const i=Math.max(0,Math.floor((r-t)/1e3));if(i<60)return`${i}s`;const l=Math.floor(i/60);if(l<60)return`${l}m`;const a=Math.floor(l/60);return a<24?`${a}h ${l%60}m`:`${Math.floor(a/24)}d ${a%24}h`}function H_({connections:t,selectedId:r,onSelect:i}){return t.length===0?N.jsx("p",{className:"text-sm text-muted-foreground",children:"No connections."}):N.jsx("div",{className:"overflow-auto rounded-md border",children:N.jsxs("table",{className:"w-full border-collapse text-sm",children:[N.jsx("thead",{children:N.jsxs("tr",{className:"border-b bg-card/50 text-left text-[11px] uppercase tracking-wide text-muted-foreground",children:[N.jsx("th",{className:"px-3 py-2 font-medium",children:"role"}),N.jsx("th",{className:"px-3 py-2 font-medium",children:"id"}),N.jsx("th",{className:"px-3 py-2 font-medium",children:"user"}),N.jsx("th",{className:"px-3 py-2 font-medium",children:"node"}),N.jsx("th",{className:"px-3 py-2 font-medium",children:"rooms"}),N.jsx("th",{className:"px-3 py-2 font-medium",children:"connected"})]})}),N.jsx("tbody",{children:t.map(l=>N.jsxs("tr",{onClick:()=>i(l.id),className:lt("cursor-pointer border-b last:border-0 hover:bg-accent/40",r===l.id&&"bg-accent/60"),children:[N.jsx("td",{className:"px-3 py-2",children:N.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[N.jsx("span",{className:"h-2 w-2 rounded-full",style:{background:Pc(l.role)}}),l.role]})}),N.jsx("td",{className:"px-3 py-2 font-mono text-xs",children:l.id.slice(0,8)}),N.jsx("td",{className:"px-3 py-2",children:l.userId??"—"}),N.jsx("td",{className:"px-3 py-2 text-xs",children:l.nodeName}),N.jsx("td",{className:"px-3 py-2 text-muted-foreground",children:l.rooms.length?l.rooms.join(", "):"—"}),N.jsxs("td",{className:"px-3 py-2 text-xs text-muted-foreground",children:[Em(l.connectedAt)," ",N.jsxs("span",{className:"opacity-60",children:["· ",Nm(l.connectedAt)]})]})]},l.id))})]})})}function hi({data:t,className:r}){const i=G.useMemo(()=>JSON.stringify(t,null,2),[t]),[l,a]=G.useState(!1),u=()=>{var d;(d=navigator.clipboard)==null||d.writeText(i).then(()=>{a(!0),setTimeout(()=>a(!1),1200)})};return N.jsxs("div",{className:"relative",children:[N.jsx("pre",{className:lt("max-h-[72vh] overflow-auto rounded-md border bg-background/40 p-3 text-xs leading-relaxed",r),children:i}),N.jsx("button",{type:"button",onClick:u,"aria-label":"Copy JSON",title:l?"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:l?N.jsx(Ny,{className:"h-3.5 w-3.5"}):N.jsx(by,{className:"h-3.5 w-3.5"})})]})}const B_=jh("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 Cm({className:t,variant:r,size:i,...l}){return N.jsx("button",{className:lt(B_({variant:r,size:i,className:t})),...l})}function Xu({title:t,children:r}){return N.jsxs("div",{className:"mt-3",children:[N.jsx("div",{className:"mb-1 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:t}),r]})}function W_({client:t,connId:r,onClose:i}){const[l,a]=G.useState(null),[u,d]=G.useState(null);return G.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?N.jsxs("div",{className:"absolute inset-0 z-10 flex",children:[N.jsx("button",{className:"flex-1 bg-black/40",onClick:i,"aria-label":"Close detail"}),N.jsxs("div",{className:"w-[26rem] overflow-auto border-l bg-card p-4",children:[N.jsxs("div",{className:"flex items-center justify-between",children:[N.jsxs("h3",{className:"text-sm font-semibold",children:["Connection ",r.slice(0,8)]}),N.jsx(Cm,{size:"sm",variant:"ghost",onClick:i,children:"close"})]}),u?N.jsx("p",{className:"mt-3 text-sm text-destructive",children:u}):null,l?N.jsxs(N.Fragment,{children:[N.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:[l.descriptor.nodeName," · connected ",Em(l.descriptor.connectedAt)," ·"," ",Nm(l.descriptor.connectedAt)," ago"]}),N.jsx(Xu,{title:"descriptor",children:N.jsx(hi,{data:l.descriptor,className:"max-h-72"})}),l.ctxAvailable?N.jsxs(N.Fragment,{children:[N.jsx(Xu,{title:"ctx · node-local, best-effort",children:N.jsx(hi,{data:l.ctx,className:"max-h-72"})}),N.jsx(Xu,{title:"conn.data",children:N.jsx(hi,{data:l.data,className:"max-h-72"})})]}):N.jsxs("p",{className:"mt-3 text-xs text-muted-foreground",children:["ctx / conn.data live on node ",l.descriptor.nodeId.slice(0,8)," — point the Control Center at that node to inspect them."]})]}):u?null:N.jsx("p",{className:"mt-3 text-sm text-muted-foreground",children:"Loading…"})]})]}):null}function U_({flavor:t}){const r=V_(t);return N.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 Y_({message:t}){const[r,i]=G.useState(!1),l=[["input",t.input],["output",t.output],["payload",t.payload]].filter(([,u])=>u!==void 0),a=l.length>0;return N.jsxs("div",{className:"rounded-md border",children:[N.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:[N.jsx(U_,{flavor:t.flavor}),N.jsx("span",{className:"font-mono text-sm",children:t.name}),a?N.jsx("span",{className:"ml-auto text-xs text-muted-foreground",children:r?"−":"+"}):null]}),r?N.jsxs("div",{className:"space-y-2 border-t p-3",children:[l.map(([u,d])=>N.jsxs("div",{children:[N.jsx("div",{className:"mb-1 text-[10px] uppercase tracking-wide text-muted-foreground",children:u}),N.jsx(hi,{data:d,className:"max-h-72"})]},u)),N.jsx("p",{className:"text-[10px] text-muted-foreground",children:"schema · best-effort (refinements / transforms may be dropped)"})]}):null]})}function kh({label:t,messages:r}){return r.length===0?null:N.jsxs("div",{children:[N.jsx("div",{className:"mb-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground",children:t}),N.jsx("div",{className:"flex flex-col gap-1.5",children:r.map(i=>N.jsx(Y_,{message:i},i.name))})]})}function _h({title:t,dir:r}){return r.clientToServer.length===0&&r.serverToClient.length===0?null:N.jsxs("div",{className:"rounded-lg border bg-card/40 p-3",children:[N.jsx("div",{className:"mb-2 text-sm font-semibold",children:t}),N.jsxs("div",{className:"flex flex-col gap-3",children:[N.jsx(kh,{label:"client → server",messages:r.clientToServer}),N.jsx(kh,{label:"server → client",messages:r.serverToClient})]})]})}function X_({contract:t}){return N.jsxs("div",{className:"flex max-w-3xl flex-col gap-3",children:[N.jsx(_h,{title:"shared",dir:t.shared}),Object.entries(t.roles).map(([r,i])=>N.jsx(_h,{title:`role · ${r}`,dir:i},r))]})}const G_=[{id:"lifecycle",label:"Lifecycle"},{id:"requests",label:"Requests"},{id:"events",label:"Events"}];function Q_({event:t,resolver:r}){const[i,l]=G.useState(!1),a=D_(t),u=a!==void 0;return N.jsxs("li",{className:"rounded-md border",children:[N.jsxs("button",{type:"button",disabled:!u,onClick:()=>l(d=>!d),className:lt("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:[N.jsx("span",{className:lt("h-2 w-2 shrink-0 rounded-full",O_(t.type))}),N.jsx("span",{className:"w-28 shrink-0 font-mono text-xs text-muted-foreground",children:t.type}),N.jsx("span",{className:"truncate font-mono text-xs",children:A_(t,r)}),u?N.jsx(Cy,{className:lt("ml-auto h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform",i&&"rotate-90")}):null]}),i&&u?N.jsx("div",{className:"px-2.5 pb-2",children:N.jsx(hi,{data:a,className:"max-h-60"})}):null]})}function q_({events:t,connections:r=[]}){const[i,l]=G.useState(()=>new Set(["lifecycle","requests","events"])),[a,u]=G.useState(!1),[d,f]=G.useState([]),h=()=>{u(w=>(w||f(t),!w))},m=w=>l(S=>{const C=new Set(S);return C.has(w)?C.delete(w):C.add(w),C}),v=G.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)}},[r]),y=(a?d:t).filter(w=>i.has($_(w.type)));return N.jsxs("div",{className:"flex h-full flex-col gap-2",children:[N.jsxs("div",{className:"flex items-center gap-1.5",children:[G_.map(w=>N.jsx("button",{onClick:()=>m(w.id),className:lt("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)),N.jsxs("button",{onClick:h,className:lt("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?N.jsx(Ly,{className:"h-3.5 w-3.5"}):N.jsx(Ry,{className:"h-3.5 w-3.5"}),a?"Paused":"Pause"]})]}),y.length===0?N.jsx("p",{className:"text-sm text-muted-foreground",children:t.length===0?"Waiting for events…":"No events match the filter."}):N.jsx("ul",{className:"flex min-h-0 flex-1 flex-col gap-1 overflow-auto",children:y.map((w,S)=>N.jsx(Q_,{event:w,resolver:v},S))})]})}function bm({className:t,...r}){return N.jsx("div",{className:lt("rounded-lg border bg-card text-card-foreground shadow-sm",t),...r})}function Mm({className:t,...r}){return N.jsx("div",{className:lt("flex flex-col gap-1 px-4 py-3 border-b",t),...r})}function Pm({className:t,...r}){return N.jsx("div",{className:lt("text-sm font-semibold tracking-tight",t),...r})}function zm({className:t,...r}){return N.jsx("div",{className:lt("p-4",t),...r})}function Im({status:t}){const r=t==="open"?"bg-primary":t==="connecting"?"bg-muted-foreground":"bg-destructive";return N.jsxs("span",{className:"inline-flex items-center gap-2 text-xs text-muted-foreground",children:[N.jsx("span",{className:lt("h-2 w-2 rounded-full",r)}),t]})}function K_({url:t,status:r,onConnect:i}){const[l,a]=G.useState(t);G.useEffect(()=>{a(t)},[t]);const u=l.trim()!==t;return N.jsx("div",{className:"max-w-2xl",children:N.jsxs(bm,{children:[N.jsxs(Mm,{children:[N.jsx(Pm,{children:"Inspector connection"}),N.jsxs("p",{className:"text-xs text-muted-foreground",children:["The WebSocket endpoint of a super-line server started with ",N.jsx("code",{children:"inspector: true"}),". Saved to this browser and reused next time."]})]}),N.jsxs(zm,{className:"flex flex-col gap-3",children:[N.jsx("label",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",htmlFor:"cc-url",children:"URL"}),N.jsxs("form",{className:"flex items-center gap-2",onSubmit:d=>{d.preventDefault(),i(l.trim())},children:[N.jsx("input",{id:"cc-url",value:l,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"}),N.jsx(Cm,{type:"submit",size:"sm",variant:u?"default":"secondary",children:u?"Connect":"Reconnect"})]}),N.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[N.jsx("span",{children:"Status"}),N.jsx(Im,{status:r})]})]})]})})}const Z_=[{icon:Dy,title:"super-line",href:"https://mertdogar.github.io/super-line/",blurb:"The home page — what super-line is and why typesafe WebSockets."},{icon:_y,title:"Documentation",href:"https://mertdogar.github.io/super-line/guide/getting-started",blurb:"Guides, the full API reference, and runnable examples."},{icon:zy,title:"GitHub",href:"https://github.com/mertdogar/super-line",blurb:"Browse the source, report issues, and contribute."},{icon:jy,title:"npm",href:"https://www.npmjs.com/package/@super-line/core",blurb:"The @super-line/* packages — core, server, client, react, adapters."}];function J_(){return N.jsx("div",{className:"grid max-w-3xl grid-cols-1 gap-3 sm:grid-cols-2",children:Z_.map(t=>N.jsx("a",{href:t.href,target:"_blank",rel:"noreferrer",className:"group block",children:N.jsxs(bm,{className:"h-full transition-colors hover:border-primary/60 hover:bg-accent/30",children:[N.jsx(Mm,{children:N.jsxs(Pm,{className:"flex items-center gap-2",children:[N.jsx(t.icon,{className:"h-4 w-4 text-primary"}),t.title,N.jsx(My,{className:"ml-auto h-3.5 w-3.5 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"})]})}),N.jsx(zm,{className:"text-xs text-muted-foreground",children:t.blurb})]})},t.title))})}const Eh=[{id:"topology",label:"Topology",icon:Ty},{id:"connections",label:"Connections",icon:Ey},{id:"contract",label:"Contract",icon:Py},{id:"feed",label:"Live feed",icon:Ay}],Nh=[{id:"settings",label:"Settings",icon:$y},{id:"resources",label:"Resources",icon:Iy}],Tm="superline.cc.url",eE="ws://localhost:3000";function tE(){const t=new URLSearchParams(window.location.search).get("url");if(t)return t;try{const i=localStorage.getItem(Tm);if(i)return i}catch{}const r=window.__CC_DEFAULT_URL__;return r||eE}function Ch({item:t,active:r,onClick:i}){return N.jsxs("button",{onClick:i,className:lt("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:[N.jsx(t.icon,{className:"h-4 w-4"}),t.label]})}function nE(){const[t,r]=G.useState(tE),[i,l]=G.useState("topology"),{client:a,status:u}=Hy(t),[d,f]=G.useState([]),[h,m]=G.useState([]),[v,g]=G.useState(null),[y,w]=G.useState(null),[S,C]=G.useState([]),[k,_]=G.useState(null),[I,E]=G.useState(null),M=G.useCallback(J=>{r(J);try{localStorage.setItem(Tm,J)}catch{}},[]);G.useEffect(()=>{if(!a||u!=="open")return;let J=!0;const V=()=>{Promise.all([a.getTopology(),a.listConnections(),a.getContract(),a.getNode()]).then(([ee,z,U,D])=>{J&&(f(ee),m(z),g(U),w(D))}).catch(()=>{})};V();const H=a.onEvent(ee=>{J&&(C(z=>[ee,...z].slice(0,200)),V())});return()=>{J=!1,H()}},[a,u]);const O=d.reduce((J,V)=>J+V.connections,0),A=G.useMemo(()=>[...new Set(h.map(J=>J.role))].sort(),[h]),B=G.useMemo(()=>I_(h),[h]),X=[...Eh,...Nh].find(J=>J.id===i),q=i==="connections"?`${h.length} connections`:i==="feed"?`${S.length} events`:"";return N.jsxs("div",{className:"flex h-screen w-screen overflow-hidden",children:[N.jsxs("aside",{className:"flex w-56 shrink-0 flex-col border-r bg-card/40",children:[N.jsxs("div",{className:"flex items-center gap-2 px-4 py-4",children:[N.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-primary"}),N.jsx("span",{className:"text-sm font-semibold tracking-tight",children:"Control Center"})]}),N.jsx("nav",{className:"flex flex-col gap-1 px-2",children:Eh.map(J=>N.jsx(Ch,{item:J,active:i===J.id,onClick:()=>l(J.id)},J.id))}),N.jsx("nav",{className:"mt-auto flex flex-col gap-1 border-t px-2 py-2",children:Nh.map(J=>N.jsx(Ch,{item:J,active:i===J.id,onClick:()=>l(J.id)},J.id))}),N.jsx("div",{className:"px-4 py-3 text-[11px] text-muted-foreground",children:"super-line · v1"})]}),N.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[N.jsxs("header",{className:"flex items-center justify-between gap-3 border-b px-4 py-3",children:[N.jsxs("div",{className:"flex items-center gap-2 text-sm font-semibold",children:[X?N.jsx(X.icon,{className:"h-4 w-4 text-muted-foreground"}):null,X==null?void 0:X.label,q?N.jsx("span",{className:"text-xs font-normal text-muted-foreground",children:q}):null]}),N.jsxs("div",{className:"flex items-center gap-3",children:[N.jsx(Im,{status:u}),N.jsxs(fp,{variant:"muted",children:[d.length," nodes"]}),N.jsxs(fp,{variant:"muted",children:[O," conns"]})]})]}),N.jsxs("main",{className:"relative min-h-0 flex-1 overflow-hidden",children:[i==="topology"?N.jsxs("div",{className:"flex h-full",children:[N.jsx("div",{className:"min-w-0 flex-1",children:N.jsx(R_,{topology:d,connections:h,node:y,highlightRoom:k})}),N.jsx(L_,{roles:A,rooms:B,topics:(y==null?void 0:y.topics)??[],selected:k,onSelect:_})]}):N.jsxs("div",{className:"h-full overflow-auto p-4",children:[i==="connections"&&N.jsx(H_,{connections:h,selectedId:I,onSelect:E}),i==="contract"&&(v?N.jsx(X_,{contract:v}):N.jsx("p",{className:"text-sm text-muted-foreground",children:"No contract."})),i==="feed"&&N.jsx(q_,{events:S,connections:h}),i==="settings"&&N.jsx(K_,{url:t,status:u,onConnect:M}),i==="resources"&&N.jsx(J_,{})]}),i==="connections"&&N.jsx(W_,{client:a,connId:I,onClose:()=>E(null)})]})]})]})}const bh=document.getElementById("root");bh&&xy.createRoot(bh).render(N.jsx(G.StrictMode,{children:N.jsx(nE,{})}));
|